From 3fe0218a72811649a8f39ec61dc0952a6bee9063 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 29 Jan 1999 12:23:55 +0000 Subject: [PATCH 0001/2134] --- eo/.cvsignore | 17 + eo/AUTHORS | 0 eo/COPYING | 340 +++++ eo/ChangeLog | 0 eo/INSTALL | 182 +++ eo/Makefile.am | 7 + eo/NEWS | 0 eo/README | 0 eo/autogen.sh | 53 + eo/config.guess | 890 ++++++++++++ eo/config.sub | 952 +++++++++++++ eo/configure.in | 10 + eo/doc/foot.html | 24 + eo/install-sh | 250 ++++ eo/ltconfig | 1555 ++++++++++++++++++++ eo/ltmain.sh | 2608 ++++++++++++++++++++++++++++++++++ eo/missing | 188 +++ eo/mkinstalldirs | 40 + eo/src/.cvsignore | 6 + eo/src/EO.h | 123 ++ eo/src/Makefile.am | 10 + eo/src/eo | 50 + eo/src/eo1d.h | 164 +++ eo/src/eoAged.h | 90 ++ eo/src/eoBin.h | 387 +++++ eo/src/eoDup.h | 45 + eo/src/eoESChrom.h | 108 ++ eo/src/eoEvalFunc.h | 34 + eo/src/eoEvaluator.h | 53 + eo/src/eoFactory.h | 55 + eo/src/eoFitness.h | 36 + eo/src/eoGA.h | 43 + eo/src/eoID.h | 92 ++ eo/src/eoKill.h | 44 + eo/src/eoLottery.h | 60 + eo/src/eoMerge.h | 63 + eo/src/eoMonOpFactory.h | 68 + eo/src/eoMultiMonOp.h | 63 + eo/src/eoMutation.h | 116 ++ eo/src/eoNegExp.h | 50 + eo/src/eoNormal.h | 74 + eo/src/eoObject.cpp | 25 + eo/src/eoObject.h | 48 + eo/src/eoOp.h | 182 +++ eo/src/eoOpSelector.h | 68 + eo/src/eoPersistent.cpp | 10 + eo/src/eoPersistent.h | 53 + eo/src/eoPop.h | 130 ++ eo/src/eoPopOps.h | 120 ++ eo/src/eoPrintable.cpp | 17 + eo/src/eoPrintable.h | 45 + eo/src/eoProblem.h | 23 + eo/src/eoProportionalOpSel.h | 132 ++ eo/src/eoRandomBreed.h | 183 +++ eo/src/eoRandomSelect.h | 80 ++ eo/src/eoRank.h | 105 ++ eo/src/eoRnd.h | 97 ++ eo/src/eoSelectFactory.h | 71 + eo/src/eoSimpleEval.h | 59 + eo/src/eoString.h | 122 ++ eo/src/eoTournament.h | 93 ++ eo/src/eoTranspose.h | 74 + eo/src/eoUniform.h | 53 + eo/src/eoVector.h | 150 ++ eo/src/eoXOver2.h | 89 ++ eo/win/EO.dsw | 197 +++ eo/win/eo.dsp | 140 ++ eo/win/eolib.dsp | 92 ++ eo/win/t_eoaged.dsp | 101 ++ eo/win/t_eoid.dsp | 101 ++ eo/win/t_eornd.dsp | 113 ++ eo/win/t_eostring.dsp | 101 ++ eo/win/t_eovector.dsp | 117 ++ eo/win/t_es.dsp | 101 ++ eo/win/t_opfactory.dsp | 101 ++ eo/win/t_ops.dsp | 101 ++ eo/win/t_opsel.dsp | 101 ++ eo/win/t_pop.dsp | 101 ++ eo/win/t_popops.dsp | 101 ++ 79 files changed, 12547 insertions(+) create mode 100644 eo/.cvsignore create mode 100644 eo/AUTHORS create mode 100644 eo/COPYING create mode 100644 eo/ChangeLog create mode 100644 eo/INSTALL create mode 100644 eo/Makefile.am create mode 100644 eo/NEWS create mode 100644 eo/README create mode 100755 eo/autogen.sh create mode 100755 eo/config.guess create mode 100755 eo/config.sub create mode 100644 eo/configure.in create mode 100644 eo/doc/foot.html create mode 100755 eo/install-sh create mode 100755 eo/ltconfig create mode 100644 eo/ltmain.sh create mode 100755 eo/missing create mode 100755 eo/mkinstalldirs create mode 100644 eo/src/.cvsignore create mode 100644 eo/src/EO.h create mode 100644 eo/src/Makefile.am create mode 100644 eo/src/eo create mode 100644 eo/src/eo1d.h create mode 100644 eo/src/eoAged.h create mode 100644 eo/src/eoBin.h create mode 100644 eo/src/eoDup.h create mode 100644 eo/src/eoESChrom.h create mode 100644 eo/src/eoEvalFunc.h create mode 100644 eo/src/eoEvaluator.h create mode 100644 eo/src/eoFactory.h create mode 100644 eo/src/eoFitness.h create mode 100644 eo/src/eoGA.h create mode 100644 eo/src/eoID.h create mode 100644 eo/src/eoKill.h create mode 100644 eo/src/eoLottery.h create mode 100644 eo/src/eoMerge.h create mode 100644 eo/src/eoMonOpFactory.h create mode 100644 eo/src/eoMultiMonOp.h create mode 100644 eo/src/eoMutation.h create mode 100644 eo/src/eoNegExp.h create mode 100644 eo/src/eoNormal.h create mode 100644 eo/src/eoObject.cpp create mode 100644 eo/src/eoObject.h create mode 100644 eo/src/eoOp.h create mode 100644 eo/src/eoOpSelector.h create mode 100644 eo/src/eoPersistent.cpp create mode 100644 eo/src/eoPersistent.h create mode 100644 eo/src/eoPop.h create mode 100644 eo/src/eoPopOps.h create mode 100644 eo/src/eoPrintable.cpp create mode 100644 eo/src/eoPrintable.h create mode 100644 eo/src/eoProblem.h create mode 100644 eo/src/eoProportionalOpSel.h create mode 100644 eo/src/eoRandomBreed.h create mode 100644 eo/src/eoRandomSelect.h create mode 100644 eo/src/eoRank.h create mode 100644 eo/src/eoRnd.h create mode 100644 eo/src/eoSelectFactory.h create mode 100644 eo/src/eoSimpleEval.h create mode 100644 eo/src/eoString.h create mode 100644 eo/src/eoTournament.h create mode 100644 eo/src/eoTranspose.h create mode 100644 eo/src/eoUniform.h create mode 100644 eo/src/eoVector.h create mode 100644 eo/src/eoXOver2.h create mode 100644 eo/win/EO.dsw create mode 100644 eo/win/eo.dsp create mode 100644 eo/win/eolib.dsp create mode 100644 eo/win/t_eoaged.dsp create mode 100644 eo/win/t_eoid.dsp create mode 100644 eo/win/t_eornd.dsp create mode 100644 eo/win/t_eostring.dsp create mode 100644 eo/win/t_eovector.dsp create mode 100644 eo/win/t_es.dsp create mode 100644 eo/win/t_opfactory.dsp create mode 100644 eo/win/t_ops.dsp create mode 100644 eo/win/t_opsel.dsp create mode 100644 eo/win/t_pop.dsp create mode 100644 eo/win/t_popops.dsp diff --git a/eo/.cvsignore b/eo/.cvsignore new file mode 100644 index 000000000..0339526b1 --- /dev/null +++ b/eo/.cvsignore @@ -0,0 +1,17 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in +aclocal.m4 +confdefs.h +config.h +config.h.in +configure +config.log +config.cache +config.status +libtool +stamp-h +stamp-h.in diff --git a/eo/AUTHORS b/eo/AUTHORS new file mode 100644 index 000000000..e69de29bb diff --git a/eo/COPYING b/eo/COPYING new file mode 100644 index 000000000..eeb586b39 --- /dev/null +++ b/eo/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/eo/ChangeLog b/eo/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/eo/INSTALL b/eo/INSTALL new file mode 100644 index 000000000..b42a17ac4 --- /dev/null +++ b/eo/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/eo/Makefile.am b/eo/Makefile.am new file mode 100644 index 000000000..cb4127aa7 --- /dev/null +++ b/eo/Makefile.am @@ -0,0 +1,7 @@ +############################################################################### +## +## Makefile.am for eo +## +############################################################################### + +SUBDIRS = src test diff --git a/eo/NEWS b/eo/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/eo/README b/eo/README new file mode 100644 index 000000000..e69de29bb diff --git a/eo/autogen.sh b/eo/autogen.sh new file mode 100755 index 000000000..31f1641b7 --- /dev/null +++ b/eo/autogen.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +DIE=0 + +PROG=eo + +(autoconf --version) < /dev/null > /dev/null 2>&1 || +{ + echo + echo "You must have autoconf installed to compile $PROG." + DIE=1 +} + +(libtool --version) < /dev/null > /dev/null 2>&1 || +{ + echo + echo "You must have libtool installed to compile $PROG." + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || +{ + echo + echo "You must have automake installed to compile $PROG." + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "I am going to run ./configure with no arguments - if you wish" + echo "to pass any to it, please specify them on the $0 command line." +fi + +for dir in . +do + echo processing $dir + ( + cd $dir; \ + aclocalinclude="$ACLOCAL_FLAGS"; \ + aclocal $aclocalinclude; \ + autoheader; \ + automake; \ + autoconf + ) +done + +./configure "$@" + +echo +echo "Now type 'make' to compile $PROG." diff --git a/eo/config.guess b/eo/config.guess new file mode 100755 index 000000000..30230b3df --- /dev/null +++ b/eo/config.guess @@ -0,0 +1,890 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <dummy.s + .globl main + .ent main +main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[3478]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin32 + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin32 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # uname on the ARM produces all sorts of strangeness, and we need to + # filter it out. + case "$UNAME_MACHINE" in + arm* | sa110*) UNAME_MACHINE="arm" ;; + esac + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + LIBC="" + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >dummy.c < +main(argc, argv) + int argc; + char *argv[]; +{ +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 diff --git a/eo/config.sub b/eo/config.sub new file mode 100755 index 000000000..e24b85041 --- /dev/null +++ b/eo/config.sub @@ -0,0 +1,952 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff --git a/eo/configure.in b/eo/configure.in new file mode 100644 index 000000000..644bf1464 --- /dev/null +++ b/eo/configure.in @@ -0,0 +1,10 @@ +AC_INIT(src/eo) + +AM_INIT_AUTOMAKE(eo, 0.0.0) + +AC_PROG_CXX +AM_PROG_LIBTOOL + +AM_MAINTAINER_MODE + +AC_OUTPUT(Makefile src/Makefile test/Makefile) diff --git a/eo/doc/foot.html b/eo/doc/foot.html new file mode 100644 index 000000000..f6efa307d --- /dev/null +++ b/eo/doc/foot.html @@ -0,0 +1,24 @@ + + + + + BinOp + + + +
+ + +
The EO framework has been created by  +GeNeura team
+and can be downloaded from ftp://geneura.ugr.es/pub/eo
+
+ Search EO documentation + + + + +
+ + + diff --git a/eo/install-sh b/eo/install-sh new file mode 100755 index 000000000..e8436696c --- /dev/null +++ b/eo/install-sh @@ -0,0 +1,250 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/eo/ltconfig b/eo/ltconfig new file mode 100755 index 000000000..527af3fb1 --- /dev/null +++ b/eo/ltconfig @@ -0,0 +1,1555 @@ +#! /bin/sh + +# ltconfig - Create a system-specific libtool. +# Copyright (C) 1996-1998 Free Software Foundation, Inc. +# Gordon Matzigkeit , 1996 +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A lot of this script is taken from autoconf-2.10. + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} +echo=echo +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec "$SHELL" "$0" --no-reexec ${1+"$@"} +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi + +if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH /usr/ucb; do + if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then + echo="$dir/echo" + break + fi + done + IFS="$save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running ltconfig again with it. + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi +fi + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# The name of this program. +progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` + +# Constants: +PROGRAM=ltconfig +PACKAGE=libtool +VERSION=1.2b +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' +rm="rm -f" + +help="Try \`$progname --help' for more information." + +# Global variables: +default_ofile=libtool +can_build_shared=yes +enable_shared=yes +# All known linkers require a `.a' archive for static linking. +enable_static=yes +ltmain= +silent= +srcdir= +ac_config_guess= +ac_config_sub= +host= +nonopt= +ofile="$default_ofile" +verify_host=yes +with_gcc=no +with_gnu_ld=no + +old_AR="$AR" +old_CC="$CC" +old_CFLAGS="$CFLAGS" +old_CPPFLAGS="$CPPFLAGS" +old_LD="$LD" +old_LN_S="$LN_S" +old_NM="$NM" +old_RANLIB="$RANLIB" + +# Parse the command line options. +args= +prev= +for option +do + case "$option" in + -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + eval "$prev=\$option" + prev= + continue + fi + + case "$option" in + --help) cat <&2 + echo "$help" 1>&2 + exit 1 + ;; + + *) + if test -z "$ltmain"; then + ltmain="$option" + elif test -z "$host"; then +# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 +# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then +# echo "$progname: warning \`$option' is not a valid host type" 1>&2 +# fi + host="$option" + else + echo "$progname: too many arguments" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac +done + +if test -z "$ltmain"; then + echo "$progname: you must specify a LTMAIN file" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +if test ! -f "$ltmain"; then + echo "$progname: \`$ltmain' does not exist" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +# Quote any args containing shell metacharacters. +ltconfig_args= +for arg +do + case "$arg" in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ltconfig_args="$ltconfig_args '$arg'" ;; + *) ltconfig_args="$ltconfig_args $arg" ;; + esac +done + +# A relevant subset of AC_INIT. + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 5 compiler messages saved in config.log +# 6 checking for... messages and results +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>>./config.log + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + +if test -z "$srcdir"; then + # Assume the source directory is the same one as the path to ltmain.sh. + srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` + test "$srcdir" = "$ltmain" && srcdir=. +fi + +trap "$rm conftest*; exit 1" 1 2 15 +if test "$verify_host" = yes; then + # Check for config.guess and config.sub. + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/config.guess; then + ac_aux_dir=$ac_dir + break + fi + done + if test -z "$ac_aux_dir"; then + echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 + echo "$help" 1>&2 + exit 1 + fi + ac_config_guess=$ac_aux_dir/config.guess + ac_config_sub=$ac_aux_dir/config.sub + + # Make sure we can run config.sub. + if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : + else + echo "$progname: cannot run $ac_config_sub" 1>&2 + echo "$help" 1>&2 + exit 1 + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 + + host_alias=$host + case "$host_alias" in + "") + if host_alias=`$SHELL $ac_config_guess`; then : + else + echo "$progname: cannot guess host type; you must specify one" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac + host=`$SHELL $ac_config_sub $host_alias` + echo "$ac_t$host" 1>&6 + + # Make sure the host verified. + test -z "$host" && exit 1 + +elif test -z "$host"; then + echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 + echo "$help" 1>&2 + exit 1 +else + host_alias=$host +fi + +# Transform linux* to *-*-linux-gnu*, to support old configure scripts. +case "$host_os" in +linux-gnu*) ;; +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` +esac + +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +case "$host_os" in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "${COLLECT_NAMES+set}" != set; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR cru $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +# Set a sane default for `AR'. +test -z "$AR" && AR=ar + +# If RANLIB is not set, then run the test. +if test "${RANLIB+set}" != "set"; then + result=no + + echo $ac_n "checking for ranlib... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/ranlib; then + RANLIB="ranlib" + result="ranlib" + break + fi + done + IFS="$save_ifs" + + echo "$ac_t$result" 1>&6 +fi + +if test -n "$RANLIB"; then + old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" + old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" +fi + +# Check to see if we are using GCC. +if test "$with_gcc" != yes || test -z "$CC"; then + # If CC is not set, then try to find GCC or a usable CC. + if test -z "$CC"; then + echo $ac_n "checking for gcc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + IFS="$save_ifs" + test -z "$dir" && dir=. + if test -f $dir/gcc; then + CC="gcc" + break + fi + done + IFS="$save_ifs" + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + fi + + # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". + if test -z "$CC"; then + echo $ac_n "checking for cc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + cc_rejected=no + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/cc; then + if test "$dir/cc" = "/usr/ucb/cc"; then + cc_rejected=yes + continue + fi + CC="cc" + break + fi + done + IFS="$save_ifs" + if test $cc_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same name, so the bogon will be chosen + # first if we set CC to just the name; use the full file name. + shift + set dummy "$dir/cc" "$@" + shift + CC="$@" + fi + fi + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$CC"; then + echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 + exit 1 + fi + fi + + # Now see if the compiler is really GCC. + with_gcc=no + echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 + echo "$progname:462: checking whether we are using GNU C" >&5 + + $rm conftest.c + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + with_gcc=yes + fi + $rm conftest.c + echo "$ac_t$with_gcc" 1>&6 +fi + +# Allow CC to be a program name with arguments. +set dummy $CC +compiler="$2" + +echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 +pic_flag= +special_shlib_compile_flags= +wl= +link_static_flag= +no_builtin_flag= + +if test "$with_gcc" = yes; then + wl='-Wl,' + link_static_flag='-static' + no_builtin_flag=' -fno-builtin' + + case "$host_os" in + aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) + # PIC is the default for these OSes. + ;; + os2*) + # We can build DLLs from non-PIC. + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + pic_flag='-m68020 -resident32 -malways-restore-a4' + ;; + *) + pic_flag='-fPIC' + ;; + esac +else + # PORTME Check for PIC flags for the system compiler. + case "$host_os" in + aix3* | aix4*) + # All AIX code is PIC. + link_static_flag='-bnso -bI:/lib/syscalls.exp' + ;; + + hpux9* | hpux10* | hpux11*) + # Is there a better link_static_flag that works with the bundled CC? + wl='-Wl,' + link_static_flag="${wl}-a ${wl}archive" + pic_flag='+Z' + ;; + + irix5* | irix6*) + wl='-Wl,' + link_static_flag='-non_shared' + # PIC (with -KPIC) is the default. + ;; + + os2*) + # We can build DLLs from non-PIC. + ;; + + osf3* | osf4*) + # All OSF/1 code is PIC. + wl='-Wl,' + link_static_flag='-non_shared' + ;; + + sco3.2v5*) + pic_flag='-Kpic' + link_static_flag='-dn' + special_shlib_compile_flags='-belf' + ;; + + solaris2*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + sunos4*) + pic_flag='-PIC' + link_static_flag='-Bstatic' + wl='-Qoption ld ' + ;; + + sysv4.2uw2*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + uts4*) + pic_flag='-pic' + link_static_flag='-Bstatic' + ;; + + *) + can_build_shared=no + ;; + esac +fi + +if test -n "$pic_flag"; then + echo "$ac_t$pic_flag" 1>&6 + + # Check to make sure the pic_flag actually works. + echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pic_flag -DPIC" + echo "$progname:585: checking if $compiler PIC flag $pic_flag works" >&5 + if { (eval echo $progname:586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + # On HP-UX, both CC and GCC only warn that PIC is supported... then they + # create non-PIC objects. So, if there were any warnings, we assume that + # PIC is not supported. + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + can_build_shared=no + pic_flag= + else + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + can_build_shared=no + pic_flag= + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + echo "$ac_t"none 1>&6 +fi + +# Check for any special shared library compilation flags. +if test -n "$special_shlib_compile_flags"; then + echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 + if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : + else + echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 + can_build_shared=no + fi +fi + +echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 +$rm conftest* +echo 'main(){return(0);}' > conftest.c +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $link_static_flag" +echo "$progname:629: checking if $compiler static flag $link_static_flag works" >&5 +if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + echo "$ac_t$link_static_flag" 1>&6 +else + echo "$ac_t"none 1>&6 + link_static_flag= +fi +LDFLAGS="$save_LDFLAGS" +$rm conftest* + +if test -z "$LN_S"; then + # Check to see if we can use ln -s, or we need hard links. + echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 + $rm conftestdata + if ln -s X conftestdata 2>/dev/null; then + $rm conftestdata + LN_S="ln -s" + else + LN_S=ln + fi + if test "$LN_S" = "ln -s"; then + echo "$ac_t"yes 1>&6 + else + echo "$ac_t"no 1>&6 + fi +fi + +# Make sure LD is an absolute path. +if test -z "$LD"; then + ac_prog=ld + if test "$with_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 + echo "$progname:662: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /* | [A-Za-z]:[/\\]*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we are not using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld... $ac_c" 1>&6 + echo "$progname:680: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 + echo "$progname:683: checking for non-GNU ld" >&5 + fi + + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog"; then + LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" + fi + + if test -n "$LD"; then + echo "$ac_t$LD" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$LD"; then + echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 + exit 1 + fi +fi + +# Check to see if it really is or is not GNU ld. +echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 +# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + with_gnu_ld=yes +else + with_gnu_ld=no +fi +echo "$ac_t$with_gnu_ld" 1>&6 + +# See if the linker supports building shared libraries. +echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 + +allow_undefined_flag= +no_undefined_flag= +archive_cmds= +old_archive_from_new_cmds= +export_dynamic_flag_spec= +whole_archive_flag_spec= +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no +hardcode_shlibpath_var=unsupported +runpath_var= + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + + # See if GNU ld supports shared libraries. + case "$host_os" in + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + fi +else + # PORTME fill in a description of your system's linker (not GNU ld) + case "$host_os" in + aix3*) + allow_undefined_flag=unsupported + archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$with_gcc" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4*) + allow_undefined_flag=unsupported + archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib$libobjs' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3, at last, uses gcc -shared to do shared libraries. + freebsd3*) + archive_cmds='$CC -shared -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + ;; + + hpux9*) + archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10* | hpux11*) + archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + irix5* | irix6*) + if test "$with_gcc" = yes; then + archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs' + else + archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + ;; + + netbsd*) + # Tested with NetBSD 1.2 ld + archive_cmds='$LD -Bshareable -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + openbsd*) + archive_cmds='$LD -Bshareable -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' + ;; + + osf3* | osf4*) + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -o $lib$libobjs' + hardcode_direct=yes + ;; + + solaris2*) + no_undefined_flag=' -z text' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + + # Solaris 2 before 2.5 hardcodes -L paths. + case "$host_os" in + solaris2.[0-4]*) + hardcode_minus_L=yes + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib$libobjs' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + can_build_shared=no + ;; + esac +fi +echo "$ac_t$ld_shlibs" 1>&6 + +if test -z "$NM"; then + echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 + case "$NM" in + /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path. + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -p" + else + NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$NM" && NM=nm + ;; + esac + echo "$ac_t$NM" 1>&6 +fi + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRSTU]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \1' + +# Define system-specific variables. +case "$host_os" in +aix*) + symcode='[BCDTU]' + ;; +irix*) + # Cannot use undefined symbols on IRIX because inlined functions mess us up. + symcode='[BCDEGRST]' + ;; +solaris2*) + symcode='[BDTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + symcode='[ABCDGISTUW]' +fi + +# Write the raw and C identifiers. +global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" + +# Check to see that the pipe works correctly. +pipe_works=no +$rm conftest* +cat > conftest.c <&5 +if { (eval echo $progname:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then + # Now try to grab the symbols. + nlist=conftest.nm + if { echo "$progname:1017: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + wcout=`wc "$nlist" 2>/dev/null` + count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` + (test "$count" -ge 0) 2>/dev/null || count=-1 + else + rm -f "$nlist"T + count=-1 + fi + + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.c +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c + + cat <> conftest.c +#if defined (__STDC__) && __STDC__ +# define __ptr_t void * +#else +# define __ptr_t char * +#endif + +/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ +int dld_preloaded_symbol_count = $count; + +/* The mapping between symbol names and symbols. */ +struct { + char *name; + __ptr_t address; +} +dld_preloaded_symbols[] = +{ +EOF + sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c + cat <<\EOF >> conftest.c + {0, (__ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.o conftestm.o + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS='conftestm.o' + CFLAGS="$CFLAGS$no_builtin_flag" + if { (eval echo $progname:1075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + LIBS="$save_LIBS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $global_symbol_pipe" >&5 + fi +else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 +fi +$rm conftest* + +# Do not use the global_symbol_pipe unless it works. +echo "$ac_t$pipe_works" 1>&6 +test "$pipe_works" = yes || global_symbol_pipe= + +# Check hardcoding attributes. +echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && \ + test "$hardcode_minus_L" != no && \ + test "$hardcode_shlibpath_var" != no; then + + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$ac_t$hardcode_action" 1>&6 + + +reload_flag= +reload_cmds='$LD$reload_flag -o $output$reload_objs' +echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 +# PORTME Some linkers may need a different reload flag. +reload_flag='-r' +echo "$ac_t$reload_flag" 1>&6 +test -n "$reload_flag" && reload_flag=" $reload_flag" + +# PORTME Fill in your ld.so characteristics +library_names_spec= +libname_spec='lib$name' +soname_spec= +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +version_type=none +dynamic_linker="$host_os ld.so" + +echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 +case "$host_os" in +aix3* | aix4*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}.so$major' + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + ;; + +freebsd2* | freebsd3*) + version_type=sunos + library_names_spec='${libname}${release}.so$versuffix $libname.so' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +gnu*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + dynamic_linker="$host_os dld.sl" + version_type=sunos + shlibpath_var=SHLIB_PATH + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' + soname_spec='${libname}${release}.sl$major' + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6*) + version_type=osf + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so$versuffix $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux-gnu*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + + if test -f /lib/ld.so.1; then + dynamic_linker='GNU ld.so' + else + # Only the GNU ld.so supports shared libraries on MkLinux. + case "$host_cpu" in + powerpc*) dynamic_linker=no ;; + *) dynamic_linker='Linux ld.so' ;; + esac + fi + ;; + +netbsd* | openbsd*) + version_type=sunos + library_names_spec='${libname}${release}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +os2*) + libname_spec='$name' + library_names_spec='$libname.dll $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4*) + version_type=osf + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so$versuffix $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris2*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}.so$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4.2uw2*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$ac_t$dynamic_linker" +test "$dynamic_linker" = no && can_build_shared=no + +# Report the final consequences. +echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 + +echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds;\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +esac + +echo "$ac_t$enable_shared" 1>&6 + +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes + +echo "checking whether to build static libraries... $enable_static" 1>&6 + +echo $ac_n "checking for objdir... $ac_c" 1>&6 +rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs +fi +rmdir .libs 2>/dev/null +echo "$ac_t$objdir" 1>&6 + +# Copy echo and quote the copy, instead of the original, because it is +# used later. +ltecho="$echo" + +# Now quote all the things that may contain metacharacters. +for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ + old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ + link_static_flag no_builtin_flag export_dynamic_flag_spec \ + whole_archive_flag_spec libname_spec library_names_spec soname_spec RANLIB \ + old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ + allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe \ + hardcode_libdir_flag_spec hardcode_libdir_separator; do + + case "$var" in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ + postinstall_cmds | postuninstall_cmds | finish_cmds) + # Double-quote double-evaled strings. + eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" + ;; + *) + eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" + ;; + esac +done + +trap "$rm \"$ofile\"; exit 1" 1 2 15 +echo "creating $ofile" +$rm "$ofile" +cat < "$ofile" +#! $SHELL + +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION +# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. +# +# Copyright (C) 1996-1998 Free Software Foundation, Inc. +# Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="sed -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi + +### BEGIN LIBTOOL CONFIG +# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ +# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ +# $0$ltconfig_args +# +# Compiler and other test output produced by $progname, useful for +# debugging $progname, is in ./config.log if it exists. + +# The version of $progname that generated this script. +LTCONFIG_VERSION="$VERSION" + +# Shell to use when invoking shell scripts. +SHELL="$SHELL" + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# The host system. +host_alias="$host_alias" +host="$host" + +# An echo program that does not interpret backslashes. +echo="$ltecho" + +# The archiver. +AR="$AR" + +# The default C compiler. +CC="$CC" + +# The linker used to build libraries. +LD="$LD" + +# Whether we need hard or soft links. +LN_S="$LN_S" + +# A BSD-compatible nm program. +NM="$NM" + +# The name of the directory that contains temporary libtool files. +objdir="$objdir" + +# How to create reloadable object files. +reload_flag="$reload_flag" +reload_cmds="$reload_cmds" + +# How to pass a linker flag through the compiler. +wl="$wl" + +# Additional compiler flags for building library objects. +pic_flag="$pic_flag" + +# Compiler flag to prevent dynamic linking. +link_static_flag="$link_static_flag" + +# Compiler flag to turn off builtin functions. +no_builtin_flag="$no_builtin_flag" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="$export_dynamic_flag_spec" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="$whole_archive_flag_spec" + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec="$libname_spec" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="$library_names_spec" + +# The coded name of the library, if different from the real name. +soname_spec="$soname_spec" + +# Commands used to build and install an old-style archive. +RANLIB="$RANLIB" +old_archive_cmds="$old_archive_cmds" +old_postinstall_cmds="$old_postinstall_cmds" +old_postuninstall_cmds="$old_postuninstall_cmds" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="$old_archive_from_new_cmds" + +# Commands used to build and install a shared archive. +archive_cmds="$archive_cmds" +postinstall_cmds="$postinstall_cmds" +postuninstall_cmds="$postuninstall_cmds" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="$allow_undefined_flag" + +# Flag that forces no undefined symbols. +no_undefined_flag="$no_undefined_flag" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="$finish_cmds" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="$finish_eval" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="$global_symbol_pipe" + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="$hardcode_libdir_separator" + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var +EOF + +case "$host_os" in +aix3*) + cat <<\EOF >> "$ofile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "${COLLECT_NAMES+set}" != set; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; +esac + +echo '### END LIBTOOL CONFIG' >> "$ofile" +echo >> "$ofile" + +# Append the ltmain.sh script. +cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + +chmod +x "$ofile" +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/eo/ltmain.sh b/eo/ltmain.sh new file mode 100644 index 000000000..cb8174715 --- /dev/null +++ b/eo/ltmain.sh @@ -0,0 +1,2608 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun ltconfig. +# +# Copyright (C) 1996-1998 Free Software Foundation, Inc. +# Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +# The name of this program. +progname=`$echo "$0" | sed 's%^.*/%%'` +modename="$progname" + +# Constants. +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.2b + +default_mode= +help="Try \`$progname --help' for more information." +magic="%%%MAGIC variable%%%" +mkdir="mkdir" +mv="mv -f" +rm="rm -f" + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +# We save the old values to restore during execute mode. +if test "${LC_ALL+set}" = set; then + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL +fi +if test "${LANG+set}" = set; then + save_LANG="$LANG"; LANG=C; export LANG +fi + +if test "$LTCONFIG_VERSION" != "$VERSION"; then + echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + echo "$modename: not configured to build any kind of library" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= + +# Parse our command line options once, thoroughly. +while test $# -gt 0 +do + arg="$1" + shift + + case "$arg" in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + execute_dlfiles) + eval "$prev=\"\$$prev \$arg\"" + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case "$arg" in + --help) + show_help=yes + ;; + + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION" + exit 0 + ;; + + --config) + sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 + exit 0 + ;; + + --debug) + echo "$progname: enabling shell trace mode" + set -x + ;; + + --dry-run | -n) + run=: + ;; + + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 +fi + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + case "$nonopt" in + *cc | *++ | gcc* | *-gcc*) + mode=link + for arg + do + case "$arg" in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case "$mode" in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + lastarg= + srcfile="$nonopt" + suppress_output= + + for arg + do + # Accept any command-line options. + case "$arg" in + -o) + $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + -static) + build_old_libs=yes + continue + ;; + esac + + # Accept the current argument as the source file. + lastarg="$srcfile" + srcfile="$arg" + + # Aesthetically quote the previous argument. + + # Backslashify any backslashes, double quotes, and dollar signs. + # These are the only characters that are still specially + # interpreted inside of double-quoted scrings. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly in scan + # sets, so we specify it separately. + case "$lastarg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + lastarg="\"$lastarg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + done + + # Get the name of the library object. + libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + + # Recognize several different file suffixes. + xform='[cCFSfms]' + case "$libobj" in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case "$libobj" in + *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;; + *) + $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2 + exit 1 + ;; + esac + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + $run $rm $obj $libobj + trap "$run $rm $obj $libobj; exit 1" 1 2 15 + else + $run $rm $libobj + trap "$run $rm $libobj; exit 1" 1 2 15 + fi + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + # All platforms use -DPIC, to notify preprocessed assembler code. + $show "$base_compile$pic_flag -DPIC $srcfile" + if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then : + else + test -n "$obj" && $run $rm $obj + exit 1 + fi + + # If we have no pic_flag, then copy the object into place and finish. + if test -z "$pic_flag"; then + $show "$LN_S $obj $libobj" + $run $LN_S $obj $libobj + exit $? + fi + + # Just move the object, then go on to compile the next one + $show "$mv $obj $libobj" + $run $mv $obj $libobj || exit $? + + # Allow error messages only from the first compilation. + suppress_output=' >/dev/null 2>&1' + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + # Suppress compiler output if we already did a PIC compilation. + $show "$base_compile $srcfile$suppress_output" + if $run eval "$base_compile \$srcfile$suppress_output"; then : + else + $run $rm $obj $libobj + exit 1 + fi + fi + + # Create an invalid libtool object if no PIC, so that we do not + # accidentally link it into a program. + if test "$build_libtool_libs" != yes; then + $show "echo timestamp > $libobj" + $run eval "echo timestamp > \$libobj" || exit $? + fi + + exit 0 + ;; + + # libtool link mode + link) + modename="$modename: link" + CC="$nonopt" + allow_undefined=yes + compile_command="$CC" + finalize_command="$CC" + + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + dlfiles= + dlprefiles= + export_dynamic=no + generated= + hardcode_libdirs= + libobjs= + link_against_libtool_libs= + ltlibs= + objs= + prev= + prevarg= + release= + rpath= + perm_rpath= + temp_rpath= + vinfo= + + # We need to know -static, to get the right output filenames. + for arg + do + case "$arg" in + -all-static | -static) + if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test $# -gt 0; do + arg="$1" + shift + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case "$prev" in + dlfiles|dlprefiles) + case "$arg" in + *.la | *.lo) ;; # We handle these cases below. + *) + dlprefiles="$dlprefiles $arg" + test "$prev" = dlfiles && dlfiles="$dlfiles $arg" + prev= + ;; + esac + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath) + rpath="$rpath $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi + + prevarg="$arg" + + case "$arg" in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + if test "$export_dynamic" != yes; then + export_dynamic=yes + if test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + else + arg= + fi + + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + fi + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` + case "$dir" in + /* | [A-Za-z]:[/\\]*) + # Add the corresponding hardcode_libdir_flag, if it is not identical. + ;; + *) + $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2 + exit 1 + ;; + esac + deplibs="$deplibs $arg" + ;; + + -l*) deplibs="$deplibs $arg" ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -static) + # If we have no pic_flag, then this is the same as -all-static. + if test -z "$pic_flag" && test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + + *.o | *.a) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A library object. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test "$build_libtool_libs" = yes; then + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/.o/'` + prev= + fi + libobjs="$libobjs $arg" + ;; + + *.la) + # A libtool-controlled library. + + dlname= + libdir= + library_names= + old_library= + + # Check to see that this really is a libtool archive. + if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 + exit 1 + fi + + # If there is no directory component, then add one. + case "$arg" in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 + exit 1 + fi + + # Find the relevant object directory and library name. + name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` + dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$arg"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + + if test -z "$libdir"; then + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $dir/$old_library"l + old_convenience="$old_convenience $dir/$old_library" + compile_command="$compile_command $dir/$old_library" + finalize_command="$finalize_command $dir/$old_library" + continue + fi + + # This library was specified with -dlopen. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test -z "$dlname"; then + # If there is no dlname, we need to preload. + prev=dlprefiles + else + # We should not create a dependency on this library, but we + # may need any libraries it requires. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + prev= + continue + fi + fi + + # The library was specified with -dlpreopen. + if test "$prev" = dlprefiles; then + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + dlprefiles="$dlprefiles $dir/$old_library" + else + dlprefiles="$dlprefiles $dir/$linklib" + fi + prev= + fi + + if test "$build_libtool_libs" = yes && test -n "$library_names"; then + link_against_libtool_libs="$link_against_libtool_libs $arg" + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + + # This is the magic to use -rpath. + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + # Put the magic libdir with the hardcode flag. + hardcode_libdirs="$libdir" + libdir="@HARDCODE_LIBDIRS@" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + libdir= + fi + fi + + if test -n "$libdir"; then + eval flag=\"$hardcode_libdir_flag_spec\" + + compile_command="$compile_command $flag" + finalize_command="$finalize_command $flag" + fi + elif test -n "$runpath_var"; then + # Do the same for the permanent run path. + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + + + lib_linked=yes + case "$hardcode_action" in + immediate | unsupported) + if test "$hardcode_direct" = no; then + compile_command="$compile_command $dir/$linklib" + elif test "$hardcode_minus_L" = no; then + compile_command="$compile_command -L$dir -l$name" + elif test "$hardcode_shlibpath_var" = no; then + compile_shlibpath="$compile_shlibpath$dir:" + compile_command="$compile_command -l$name" + else + lib_linked=no + fi + ;; + + relink) + # We need an absolute path. + case "$dir" in + /* | [A-Za-z]:[/\\]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 + fi + dir="$absdir" + ;; + esac + + if test "$hardcode_direct" = yes; then + compile_command="$compile_command $dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + compile_command="$compile_command -L$dir -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + compile_shlibpath="$compile_shlibpath$dir:" + compile_command="$compile_command -l$name" + else + lib_linked=no + fi + ;; + + *) + lib_linked=no + ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + finalize_command="$finalize_command $libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + finalize_command="$finalize_command -L$libdir -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + finalize_shlibpath="$finalize_shlibpath$libdir:" + finalize_command="$finalize_command -l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + finalize_command="$finalize_command -L$libdir -l$name" + fi + else + # Transform directly to old archives if we don't build new libraries. + if test -n "$pic_flag" && test -z "$old_library"; then + $echo "$modename: cannot find static library for \`$arg'" 1>&2 + exit 1 + fi + + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_command="$compile_command $dir/$linklib" + finalize_command="$finalize_command $dir/$linklib" + else + compile_command="$compile_command -L$dir -l$name" + finalize_command="$finalize_command -L$dir -l$name" + fi + fi + + # Add in any libraries that this one depends upon. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + esac + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + oldlibs= + case "$output" in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + */* | *\\*) + $echo "$modename: output file \`$output' must have no directory components" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *.a) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles"; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + ;; + + *.la) + # Make sure we only generate libraries of the form `libNAME.la'. + case "$output" in + lib*) ;; + *) + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval libname=\"$libname_spec\" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + if test -n "$objs"; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 + exit 1 + fi + + # How the heck are we supposed to write a wrapper for a shared library? + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 + exit 1 + fi + + if test -n "$dlfiles$dlprefiles"; then + $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test $# -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + # Now set the variables for building old libraries. + oldlibs="$objdir/$libname.a" + if test -z "$rpath"; then + # Building a libtool convenience library. + oldlibs="$objdir/$libname.al $oldlibs" + build_libtool_libs=convenience + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + current="$2" + revision="$3" + age="$4" + + # Check that each of the things are valid numbers. + case "$current" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$revision" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$age" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test $age -gt $current; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case "$version_type" in + none) ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test $loop != 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + versuffix= + verstring="0.0" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + # Add libc to deplibs on all systems. + dependency_libs="$deplibs" + deplibs="$deplibs -lc" + fi + + # Create the output directory, or remove our outputs if we need to. + if test -d $objdir; then + $show "${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" + $run ${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* + else + $show "$mkdir $objdir" + $run $mkdir $objdir + status=$? + if test $status -ne 0 && test ! -d $objdir; then + exit $status + fi + fi + + if test "$build_libtool_libs" = yes; then + # Get the real and link names of the library. + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + lib="$objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are PIC. + test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` + + # Transform .lo files to .o files. + test "$build_old_libs" = yes && oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` + + if test -n "$whole_archive_flag_spec"; then + if test -n "$convenience"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + else + for xlib in $convenience; do + # Extract the objects. + xdir="$xlib"x + generated="$generated $xdir" + xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x ../$xlib)" + $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $? + + libobjs="$libobjs `echo $xdir/*`" + done + fi + + # Do each of the archive commands. + eval cmds=\"$archive_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $objdir && $LN_S $realname $linkname)" + $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -export-dynamic was specified, set the dlname. + if test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + *.lo | *.o) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles"; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case "$output" in + *.lo) + if test -n "$objs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Create the old-style object. + reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` + + output="$obj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + test -z "$libobj" && exit 0 + + if test "$build_libtool_libs" != yes; then + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + $show "echo timestamp > $libobj" + $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs" + output="$libobj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + else + # Just create a symlink. + $show "$LN_S $obj $libobj" + $run $LN_S $obj $libobj || exit $? + fi + + exit 0 + ;; + + *) + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test -n "$rpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + # Put the magic libdir with the hardcode flag. + hardcode_libdirs="$libdir" + libdir="@HARDCODE_LIBDIRS@" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + libdir= + fi + fi + + if test -n "$libdir"; then + eval flag=\"$hardcode_libdir_flag_spec\" + + compile_command="$compile_command $flag" + finalize_command="$finalize_command $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + fi + + # Substitute the hardcoded libdirs into the compile commands. + if test -n "$hardcode_libdir_separator"; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` + fi + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` + finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` + fi + + if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${output}S.c" + else + dlsyms= + fi + + if test -n "$dlsyms"; then + # Add our own program objects to the preloaded list. + dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` + + # Discover the nlist of each of the dlfiles. + nlist="$objdir/${output}.nm" + + if test -d $objdir; then + $show "$rm $nlist ${nlist}T" + $run $rm "$nlist" "${nlist}T" + else + $show "$mkdir $objdir" + $run $mkdir $objdir + status=$? + if test $status -ne 0 && test ! -d $objdir; then + exit $status + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + # Parse the name list into a source file. + $show "creating $objdir/$dlsyms" + if test -z "$run"; then + # Make sure we at least have an empty file. + test -f "$nlist" || : > "$nlist" + + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + wcout=`wc "$nlist" 2>/dev/null` + count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` + (test "$count" -ge 0) 2>/dev/null || count=-1 + else + $rm "$nlist"T + count=-1 + fi + + case "$dlsyms" in + "") ;; + *.c) + $echo > "$objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define dld_preloaded_symbol_count some_other_symbol +#define dld_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test -f "$nlist"; then + sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms" + else + echo '/* NONE */' >> "$objdir/$dlsyms" + fi + + $echo >> "$objdir/$dlsyms" "\ + +#undef dld_preloaded_symbol_count +#undef dld_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define __ptr_t void * +#else +# define __ptr_t char * +#endif + +/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ +int dld_preloaded_symbol_count = $count; + +/* The mapping between symbol names and symbols. */ +struct { + char *name; + __ptr_t address; +} +dld_preloaded_symbols[] = +{\ +" + + if test -f "$nlist"; then + sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms" + fi + + $echo >> "$objdir/$dlsyms" "\ + {0, (__ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif\ +" + ;; + + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + fi + + # Now compile the dynamic symbol file. + $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")" + $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $? + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` + elif test "$export_dynamic" != yes; then + test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2 + else + # We keep going just in case the user didn't refer to + # dld_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + + # We have no uninstalled library dependencies, so finalize right now. + $show "$compile_command" + $run eval "$compile_command" + exit $? + fi + + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'` + finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` + + # Create the binary in the object directory, then wrap it. + if test ! -d $objdir; then + $show "$mkdir $objdir" + $run $mkdir $objdir + status=$? + if test $status -ne 0 && test ! -d $objdir; then + exit $status + fi + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case "$dir" in + /* | [A-Za-z]:[/\\]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + # Delete the old output file. + $run $rm $output + + if test -n "$compile_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command" + finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" + fi + + if test "$hardcode_action" = relink; then + # AGH! Flame the AIX and HP-UX people for me, will ya? + $echo "$modename: warning: using a buggy system linker" 1>&2 + $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 + fi + + $show "$compile_command" + $run eval "$compile_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the finalize command for shipping. + finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"` + + # Quote $echo for shipping. + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$output +# Generated by $PROGRAM - GNU $PACKAGE $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of \``pwd`'. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + link_against_libtool_libs='$link_against_libtool_libs' + finalize_command=\"$finalize_command\" +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" + + progdir=\"\$thisdir/$objdir\" + program='$output' + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\` + + export $shlibpath_var +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + + # Export the path to the program. + PATH=\"\$progdir:\$PATH\" + export PATH + + exec \$program \${1+\"\$@\"} + + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs" + addlibs="$convenience" + build_libtool_libs=no + else + addlibs="$old_convenience" + fi + + # Add in members from convenience archives. + for xlib in $addlibs; do + # Extract the objects. + xdir="$xlib"x + generated="$generated $xdir" + xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x ../$xlib)" + $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $? + + oldobjs="$oldobjs `echo $xdir/*`" + done + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + eval cmds=\"$old_archive_cmds\" + fi + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case "$output" in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.a" + $show "creating $output" + + # Only create the output if not a dry run. + if test -z "$run"; then + $echo > $output "\ +# $output - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION + +# The name that we can dlopen(3). +dlname='$dlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Directory that this library needs to be installed in: +libdir='$install_libdir'\ +" + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $objdir && $LN_S ../$output $output)" + $run eval "(cd $objdir && $LN_S ../$output $output)" || exit $? + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL"; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case "$arg" in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test $# -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case "$destdir" in + /* | [A-Za-z]:[/\\]*) ;; + *) + for file in $files; do + case "$file" in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case "$file" in + *.a) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$realname $destdir/$realname" + $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? + test "X$dlname" = "X$realname" && dlname= + + if test $# -gt 0; then + # Delete the old symlinks. + rmcmd="$rm" + for linkname + do + rmcmd="$rmcmd $destdir/$linkname" + done + $show "$rmcmd" + $run $rmcmd + + # ... and create new ones. + for linkname + do + test "X$dlname" = "X$linkname" && dlname= + $show "(cd $destdir && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $LN_S $realname $linkname)" + done + fi + + if test -n "$dlname"; then + # Install the dynamically-loadable library. + $show "$install_prog $dir/$dlname $destdir/$dlname" + $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + $show "$install_prog $file $destdir/$name" + $run eval "$install_prog $file $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case "$destfile" in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/.o/'` + ;; + *.o) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/.o/'` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + link_against_libtool_libs= + finalize_command= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Check the variables that should have been set. + if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $link_against_libtool_libs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case "$lib" in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + if test "$hardcode_action" = relink; then + if test "$finalize" = yes; then + $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 + $show "$finalize_command" + if $run eval "$finalize_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + continue + fi + file="$objdir/$file"T + else + $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec $SHELL $0 --finish$current_libdirs + exit 1 + fi + + exit 0 + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + echo " $libdir" + done + echo + echo "To link against installed libraries in a given directory, LIBDIR," + echo "you must use the \`-LLIBDIR' flag during linking." + echo + echo " You will also need to do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + echo "See any operating system documentation about shared libraries for" + echo "more information, such as the ld(1) and ld.so(8) manual pages." + echo "----------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case "$file" in + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case "$file" in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + + # Restore saved enviroment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now actually exec the command. + eval "exec \$cmd$args" + + $echo "$modename: cannot exec \$cmd$args" + exit 1 + else + # Display what would be done. + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool uninstall mode + uninstall) + modename="$modename: uninstall" + rm="$nonopt" + files= + + for arg + do + case "$arg" in + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + rmfiles="$file" + + case "$name" in + *.la) + # Possibly a libtool archive, so verify it. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $dir/$n" + test "X$n" = "X$dlname" && dlname= + done + test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" + test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" + + $show "$rm $rmfiles" + $run $rm $rmfiles + + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + # FIXME: should reinstall the best remaining shared library. + fi + ;; + + *.lo) + if test "$build_old_libs" = yes; then + oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/.o/'` + rmfiles="$rmfiles $dir/$oldobj" + fi + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + + *) + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + esac + done + exit 0 + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 +fi # test -z "$show_help" + +# We need to display help for each of the modes. +case "$mode" in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --version print version information + +MODE must be one of the following: + + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE." + exit 0 + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only +library objects (\`.lo' files) may be specified, and \`-rpath' is required. + +If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar' +and \`ranlib'. + +If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is +created, otherwise an executable program is created." + ;; + +uninstall) + $echo +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; +esac + +echo +$echo "Try \`$modename --help' for more information about other modes." + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/eo/missing b/eo/missing new file mode 100755 index 000000000..cbe2b0ef0 --- /dev/null +++ b/eo/missing @@ -0,0 +1,188 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` + if test -z "$files"; then + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` + test -z "$files" || files="$files.in" + else + files=`echo "$files" | sed -e 's/:/ /g'` + fi + test -z "$files" && files="config.h.in" + touch $files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print \ + | sed 's/^\(.*\).am$/touch \1.in/' \ + | sh + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/eo/mkinstalldirs b/eo/mkinstalldirs new file mode 100755 index 000000000..cb1c70a41 --- /dev/null +++ b/eo/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 1999-01-29 12:23:53 gustavo Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/eo/src/.cvsignore b/eo/src/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/src/EO.h b/eo/src/EO.h new file mode 100644 index 000000000..fb54364ba --- /dev/null +++ b/eo/src/EO.h @@ -0,0 +1,123 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EO.h +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#ifndef EO_H +#define EO_H + +//----------------------------------------------------------------------------- + +#include // runtime_error + +#include +#include + +//----------------------------------------------------------------------------- +/** EO is a base class for evolvable objects, that is, the subjects of evolution. + EOs have only got a fitness, which at the same time needs to be only an object with the + operation less than (<) defined. Fitness says how good is the object; evolution or change + of these objects is left to the genetic operators. A fitness less than another means a + worse fitness, in whatever the context; thus, fitness is always maximized; although + it can be minimized with a proper definition of the < operator.\\ + The fitness object must have, besides an void ctor, a copy ctor. +*/ +template class EO: public eoObject, public eoPersistent +{ +public: + typedef F Fitness; + + /** Default constructor. + Fitness must have a ctor which takes 0 as a value; we can not use void ctors here + since default types like float have no void initializer. VC++ allows it, but gcc does not + */ + EO(): repFitness(0), invalidFitness(true) {} + + /** Ctor from stream. + Fitness must have defined the lecture from an istream. + */ + EO( istream& _is ) { + _is >> repFitness; + validFitness = true; + }; + + /// Copy ctor + EO( const EO& _eo ): repFitness( _eo.repFitness ), invalidFitness( _eo.invalidFitness ) {}; + + /// Virtual dtor + virtual ~EO() {}; + + /// Return fitness value. + Fitness fitness() const + { + if (invalid()) + throw runtime_error("invalid fitness"); + return repFitness; + } + + // Set fitness as invalid. + void invalidate() { invalidFitness = true; } + + /** Set fitness. At the same time, validates it. + * @param _fitness New fitness value. + */ + void fitness(const Fitness& _fitness) + { + repFitness = _fitness; + invalidFitness = false; + } + + /** Return true If fitness value is invalid, false otherwise. + * @return true If fitness is invalid. + */ + bool invalid() const { return invalidFitness; } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "EO"; }; + + /** + * Read object.\\ + * Calls base class, just in case that one had something to do. The read and print + * methods should be compatible and have the same format. In principle, format is + * "plain": they just print a number + * @param _is a istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + _is >> repFitness; + invalidFitness = false; + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << repFitness << endl; + } + + //@} + +private: + Fitness repFitness; // value of fitness for this chromosome + bool invalidFitness; // true if the value of fitness is invalid +}; + +//----------------------------------------------------------------------------- + +template bool operator<(const EO& eo1, const EO& eo2) +{ + return eo1.fitness() < eo2.fitness(); +} + +//----------------------------------------------------------------------------- + + +#endif EO_H diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am new file mode 100644 index 000000000..ab0d64da9 --- /dev/null +++ b/eo/src/Makefile.am @@ -0,0 +1,10 @@ +############################################################################### +## +## Makefile.am for eo/src +## +############################################################################### + +lib_LTLIBRARIES = libeo.la +libeo_la_SOURCES = eoObject.cpp eoPersistent.cpp eoPrintable.cpp +libeoincdir = $(includedir)/eo +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h diff --git a/eo/src/eo b/eo/src/eo new file mode 100644 index 000000000..554bf70b6 --- /dev/null +++ b/eo/src/eo @@ -0,0 +1,50 @@ +//----------------------------------------------------------------------------- +// eo +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#ifndef _eo_ +#define _eo_ + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include // what's the matter with you? +#include // what's the matter with you? + +//#include + +//----------------------------------------------------------------------------- + +#endif _eo_ + diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h new file mode 100644 index 000000000..c33d7cb68 --- /dev/null +++ b/eo/src/eo1d.h @@ -0,0 +1,164 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eo1d.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EO1D_H +#define _EO1D_H + +#include // for ostream + +// EO Includes +#include +#include + +using namespace std; + +/** @name EO1d class +* Randomly accesible evolvable object with one dimension, with +variable length. +* Use this if you want to evolve "linear" things, like bitstrings, or +floating-point arrays. If you don't, subclass directly from EO +* @see EO +* @author GeNeura +* @version 0.2 +*/ + +//@{ + +/** eo1d: Base class for "chromosomes" with a single dimension +#T# is the type it will be instantiated with; this type must have, at +least, a copy ctor, assignment operators, +*/ +template +class eo1d: public EO< fitnessT > { +public: + + /// Declaration to make it accessible from subclasses + typedef T Type; + + /** Can be used as default ctor; should be called from derived + classes. Fitness should be at birth + */ + eo1d() + :EO ( ) {}; + + /** Ctor using a random number generator and with an specified size + @param _rndGen Random number generator + @param _size lineal dimension of the eo1d + @param _ID An ID string, preferably unique + */ + eo1d( unsigned _size, eoRnd& _rndGen, const string& _ID = ""); + + /** Ctor from a istream. It just passes the stream to EO. + @param _is the input stream; eo1d just cares about the fitness + */ + eo1d( istream& _is): EO( _is ){}; + + /// Copy ctor + eo1d( const eo1d& _eo ) + :EO ( _eo ) {}; + + /// Assignment operator + const eo1d& operator= ( const eo1d& _eo ) { + EO::operator = ( _eo ); + return *this; + } + + /// Needed virtual dtor + virtual ~eo1d(){}; + + /** Reads and returns a copy of the gene in position _i + This implies that T must have a copy ctor . + @param _i index of the gene, which is the minimal unit. Must be + an unsigned less than #length()# + @return what's inside the gene, with the correct type + @exception out_of_range if _i > size() + */ + virtual T gene( unsigned _i ) const = 0; + + /** Overwrites the gene placed in position _i with a + * new value. This means that the assignment operator + * for T must be defined . + @param _i index + @return what's inside the gene, with the correct type + @exception out_of_range if _i > size() + */ + virtual T& gene( unsigned _i ) = 0; + + /** Inserts a gene, moving the rest to the right. If + * _i = length(), it should insert it at the end. + * Obviously, changes length + @param _i index + @param _val new value + */ + virtual void insertGene( unsigned _i, T _val ) = 0; + + /** Eliminates the gene at position _i; all the other genes will + be shifted left + @param _i index of the gene that is going to be modified. + */ + virtual void deleteGene( unsigned _i ) = 0; + + /// Returns the number of genes in the eo1d + virtual unsigned length() const = 0; + + /// @name Methods from eoObject + //@{ + /** + * Read object. Theoretically, the length is known in advance. All objects + * Should call base class + * @param _s A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _s) { + + for ( unsigned i = 0; i < length(); i ++ ) { + _s >> gene( i ); + } + // there is no way of distinguishing fitness from the object, so + // it's skipped + } + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + it can be reimplemented anywhere. Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + for ( unsigned i = 0; i < length(); i ++ ) { + _s << gene( i ) << " "; + } + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eo1d";}; + + //@} + +}; + +//@} + + +// --------------- Implementations -------------------------- + +/* Ctor using a random number generator and with an specified size + @param _rndGen Random number generator + @param _size lineal dimension of the eo1d + @param _ID An ID string, preferably unique +*/ +template< class T, class fitnessT> +eo1d::eo1d( unsigned _size, eoRnd& _rndGen, + const string& _ID ) + :EO ( _ID ) { + for ( unsigned i = 0; i < size; i ++ ) { + insertGene( i, _rndGen() ); + } +}; + + +#endif diff --git a/eo/src/eoAged.h b/eo/src/eoAged.h new file mode 100644 index 000000000..a044688f4 --- /dev/null +++ b/eo/src/eoAged.h @@ -0,0 +1,90 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAge.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef EOAGED_H +#define EOAGED_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoAge +//----------------------------------------------------------------------------- + +/** eoAge is a template class that adds an age to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +printOn, readFrom. +@see eoObject +*/ +template +class eoAged: public Object +{ + public: + /// Main ctor from an already built Object. + eoAged( const Object& _o): Object( _o ), age(0) {}; + + /// Copy constructor. + eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoAged() {}; + + + ///returns the age of the object + unsigned long Age() const {return age;} + + /// Increments age + const eoAged& operator ++ () { age++; return *this;} + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ +//@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("eoAged")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + Object::readFrom( _is ); + _is >> age; + } + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const{ + Object::printOn( _os ); + _os << age; + } +//@} + + private: + + /** Default Constructor. \\ + It´s private so that it is not used anywhere; the right way of using this object + is to create an Object and passing it to an aged by means of the copy ctor; that way + it´s turned into an Aged object*/ + eoAged(): Object(), age(0) {}; + + unsigned long age; +}; + +#endif EOAGE_H diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h new file mode 100644 index 000000000..993e206d6 --- /dev/null +++ b/eo/src/eoBin.h @@ -0,0 +1,387 @@ +//----------------------------------------------------------------------------- +// eoBin.h +//----------------------------------------------------------------------------- + +#ifndef eoBin_h +#define eoBin_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bit_vector +#include // string +#include // EO +#include // eoMonOp +#include // eoUniform +#include // eoRnd + +//----------------------------------------------------------------------------- + +template class eoBin: public EO, public bit_vector +{ + public: + typedef bool Type; + + /// (Default) Constructor. + /// @param size Size of the binary string. + eoBin(const unsigned& size = 0, const bool& value = false): + bit_vector(size, value) {} + + /// (Default) Constructor. + /// @param size Size of the binary string. + eoBin(const unsigned& size, const eoRnd& rnd): bit_vector(size) + { + generate(begin(), end(), rnd); + } + + /// Constructor from istream. + /// @param is The istream to read from. + eoBin(istrstream& is) + { + readFrom(is); + } + + /// My class name. + string className() const + { + return "eoBin"; + } + + /// To print me on a stream. + /// @param os The ostream. + void printOn(ostream& os) const + { + copy(begin(), end(), ostream_iterator(os)); + } + + /// To read me from a stream. + /// @param is The istream. + void readFrom(istream& is) + { + string bits; + is >> bits; + if (is) + { + resize(bits.size()); + transform(bits.begin(), bits.end(), begin(), + bind2nd(equal_to(), '1')); + } + } +}; + +//----------------------------------------------------------------------------- +// eoBinRandom --> mofify a chromosome in a random way +//----------------------------------------------------------------------------- + +template class eoBinRandom: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinRandom"; } + + /// + void operator()(Chrom& chrom) const + { + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; + } +}; + + +//----------------------------------------------------------------------------- +// eoBinBitFlip --> chages a bit +//----------------------------------------------------------------------------- + +template class eoBinBitFlip: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinBitFlip"; } + + /// + void eoBinBitFlip::operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size()); + unsigned pos = uniform(); + chrom[pos] = !chrom[pos]; + } +}; + +//----------------------------------------------------------------------------- +// eoBinMutation --> classical mutation +//----------------------------------------------------------------------------- + +template class eoBinMutation: public eoMonOp +{ + public: + /// (Default) Constructor. + eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} + + /// The class name. + string className() const { return "eoBinMutation"; } + + /// + void operator()(Chrom& chrom) const + { + for (unsigned i = 0; i < chrom.size(); i++) + if (uniform() < rate) + chrom[i] = !chrom[i]; + } + + private: + double rate; + mutable eoUniform uniform; +}; + +//----------------------------------------------------------------------------- +// eoBinInversion --> inverts the bits of the chromosome between an interval +//----------------------------------------------------------------------------- + +template class eoBinInversion: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinInversion"; } + + /// + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size() + 1); + + unsigned u1 = uniform(), u2; + do u2 = uniform(); while (u1 == u2); + unsigned r1 = min(u1, u2), r2 = max(u1, u2); + + reverse(chrom.begin() + r1, chrom.begin() + r2); + } +}; + +//----------------------------------------------------------------------------- +// eoBinNext --> next binary value +//----------------------------------------------------------------------------- + +template class eoBinNext: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinNext"; } + + /// + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } + } +}; + +//----------------------------------------------------------------------------- +// eoBinPrev --> previos binary value +//----------------------------------------------------------------------------- + +template class eoBinPrev: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinPrev"; } + + /// + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } + } +}; + +//----------------------------------------------------------------------------- +// eoBinCrossover --> classic crossover +//----------------------------------------------------------------------------- + +template class eoBinCrossover: public eoBinOp +{ + public: + /// The class name. + string className() const { return "eoBinCrossover"; } + + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + eoUniform uniform(1, min(chrom1.size(), chrom2.size())); + swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); + } +}; + +//----------------------------------------------------------------------------- +// eoBinNxOver --> n-point crossover +//----------------------------------------------------------------------------- + +template class eoBinNxOver: public eoBinOp +{ + public: + /// (Defualt) Constructor. + eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) + { + if (num_points < 1) + { + cerr << "NxOver --> invalid number of points " << num_points << endl; + exit(EXIT_FAILURE); + } + } + + /// The class name. + string className() const { return "eoBinNxOver"; } + + /// + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_size = min(chrom1.size(), chrom2.size()); + unsigned max_points = min(max_size - 1, num_points); + + vector points(max_size, false); + eoUniform uniform(1, max_size); + + // select ranges of bits to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + max_points--; + } + } while (max_points); + + + // swap bits between chromosomes + bool change = false; + for (unsigned bit = 1; bit < points.size(); bit++) + { + if (points[bit]) + change = !change; + + if (change) + swap(chrom1[bit], chrom2[bit]); + } + } + + private: + unsigned num_points; +}; + +//----------------------------------------------------------------------------- +// eoBinGxOver --> gene crossover +//----------------------------------------------------------------------------- + +template class eoBinGxOver: public eoBinOp +{ + public: + /// Constructor. + eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + gene_size(_gene_size), num_points(_num_points) + { + if (gene_size < 1) + { + cerr << "GxOver --> invalid gene size " << gene_size << endl; + exit(EXIT_FAILURE); + } + if (num_points < 1) + { + cerr << "GxOver --> invalid number of points " << num_points << endl; + exit(EXIT_FAILURE); + } + } + + /// The class name + string className() const { return "eoBinGxOver"; } + + /// + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = min(max_genes, num_points); + + vector points(max_genes, false); + eoUniform uniform(0, max_genes); + + // selects genes to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } + } while (cut_genes); + + // swaps genes + for (unsigned i = 0; i < points.size(); i++) + if (points[i]) + swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); + } + + private: + unsigned gene_size; + unsigned num_points; +}; + +//----------------------------------------------------------------------------- +// eoBinUxOver --> uniform crossover +//----------------------------------------------------------------------------- + +template class eoBinUxOver: public eoBinOp +{ + public: + /// Constructor. + eoBinUxOver(const float _rate): rate(_rate) + { + if (rate < 0 || rate > 1) + { + cerr << "UxOver --> invalid rate " << rate << endl; + exit(EXIT_FAILURE); + } + } + + /// The class name. + string className() const { return "eoBinUxOver"; } + + /// + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned min_size = min(chrom1.size(), chrom2.size()); + eoUniform uniform(0, 1); + + for (unsigned bit = 0; bit < min_size; bit++) + if (uniform() < rate) + swap(chrom1[bit], chrom2[bit]); + } + + public: + float rate; +}; + +//----------------------------------------------------------------------------- + + +#endif eoBin_h diff --git a/eo/src/eoDup.h b/eo/src/eoDup.h new file mode 100644 index 000000000..be1f68c92 --- /dev/null +++ b/eo/src/eoDup.h @@ -0,0 +1,45 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoKill.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EODUP_h +#define _EODUP_h + +#include + +#include + +/// Dup or duplicate: duplicates a gene in a chromosome +template +class eoDup: public eoMonOp { +public: + /// + eoDup( ) + : eoMonOp< EOT >( ){}; + + /// needed virtual dtor + virtual ~eoDup() {}; + + /// + virtual void operator()( EOT& _eo ) const { + eoUniform uniform( 0, _eo.length() ); + unsigned pos = uniform(); + _eo.insertGene( pos, _eo.gene(pos) ); + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoDup";}; + //@} +}; + +#endif diff --git a/eo/src/eoESChrom.h b/eo/src/eoESChrom.h new file mode 100644 index 000000000..04a2e6d4a --- /dev/null +++ b/eo/src/eoESChrom.h @@ -0,0 +1,108 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESChrom.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + + +#ifndef _eoESCHROM_H +#define _eoESCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include + +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation +*/ +//@{ + +/** Each gene in an Evolution Strategies is composed of a value plus an standard +deviation, sigma, used for mutation*/ +struct eoESGene { + double val, sigma; + eoESGene( double _val = 0, double _sigma = 0 ): val( _val ), sigma( _sigma ) {}; +}; + +/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 +bool operator < ( eoESGene _e1, eoESGene _e2 ) { + return _e1.val < _e2.val; +} + +/// Tricky operator to avoid errors in some VC++ systems +bool operator == ( eoESGene _e1, eoESGene _e2 ) { + return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; +} + +/// +ostream & operator << ( ostream& _s, const eoESGene& _e ) { + _s << _e.val << ", " << _e.sigma << " | "; + return _s; +} + +/// Dummy >> +istream & operator >> ( istream& _s, const eoESGene& _e ) { + _s >> _e.val; + _s >> _e.sigma; + return _s; +} + + +/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and +Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene +@see eoESGene +*/ +template +class eoESChrom: public eoVector { +public: + /// Basic ctor + eoESChrom( ):eoVector() {}; + + /** Ctor using a couple of random number generators + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called. + @param _rndS another one, for the sigma + */ + eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) + : eoVector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + i->val = _rnd(); + i->sigma = _rndS(); + } + }; + + /// Copy ctor + eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; + + /// Assignment operator + const eoESChrom& operator =( const eoESChrom & _eoes ) { + if ( this != &_eoes ){ + eoVector::operator=( _eoes ); + } + return *this; + } + + /// + ~eoESChrom() {}; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoESChrom";}; + //@} + +}; + +//@} +#endif diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h new file mode 100644 index 000000000..76043898f --- /dev/null +++ b/eo/src/eoEvalFunc.h @@ -0,0 +1,34 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalFunc.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef eoEvalFunc_H +#define eoEvalFunc_H + +/** Evaluate: takes one EO and sets its "fitness" property + * returning this fitness also. That is why EOT is passed by + * non-const reference: it must be altered within evaluate.\\ + + The requirements on the types with which this class is to be + instantiated with are null, or else, they depend on the particular + class it's going to be applied to; EO does not impose any requirement + on it. If you subclass this abstract class, and use it to evaluate an + EO, the requirements on this EO will depend on the evaluator. + */ +template< class EOT > +struct eoEvalFunc { + +#ifdef _MSC_VER + typedef EOT::Fitness EOFitT; +#else + typedef typename Fitness::EOFitT EOFitT; +#endif + + /// Effectively applies the evaluation function to an EO or urEO + virtual EOFitT evaluate( EOT & _eo ) const = 0; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoEvaluator.h b/eo/src/eoEvaluator.h new file mode 100644 index 000000000..53e3e0836 --- /dev/null +++ b/eo/src/eoEvaluator.h @@ -0,0 +1,53 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvaluator.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOEVALUATOR_H +#define _EOEVALUATOR_H + +//----------------------------------------------------------------------------- +#include +#include + +//----------------------------------------------------------------------------- +/** Evaluator takes a vector of EOs and evaluates its fitness +* returning void. Template instances must be of fitness and EO type +*/ +template +class eoEvaluator: public eoTransform{ +public: + /// ctor + eoEvaluator( const eoEvalFunc< EOT> & _ef ) + : eoTransform(), repEF( _ef ){}; + + /// Needed virtual destructor + virtual ~eoEvaluator() {}; + + /* Sets the evaluation function + virtual void EF( const eoEvalFunc< EOT> & _ef ) { repEF= _ef;};*/ + + /// Gets the evaluation function + virtual const eoEvalFunc< EOT>& EF() { return repEF;}; + + /** This is the actual function operator(); it is left without implementation. + It takes a vector of pointers to eo + * @param _vEO is a vector of pointers to eo, that will be evaluated + */ + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual string className() const { return "eoEvaluator"; } + + /** Read and print are left without implementation */ + //@} + +private: + const eoEvalFunc< EOT> & repEF; +}; +//@} + +#endif diff --git a/eo/src/eoFactory.h b/eo/src/eoFactory.h new file mode 100644 index 000000000..ded9ab4c0 --- /dev/null +++ b/eo/src/eoFactory.h @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFactory.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOFACTORY_H +#define _EOFACTORY_H + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. A factory is used to create other objects. In particular, +it can be used so that objects of that kind can´t be created in any other +way. It should be instantiated with anything that needs a factory, like selectors +or whatever; but the instance class should be the parent class from which all the +object that are going to be created descend. This class basically defines an interface, +as usual. The base factory class for each hierarchy should be redefined every time a new +object is added to the hierarchy, which is not too good, but in any case, some code would +have to be modified*/ +template +class eoFactory: public eoObject { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoFactory( ) {} + + /// destructor + virtual ~eoFactory() {} + //@} + + /** Another factory methods: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual EOClass* make(istream& _is) = 0; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual string className() const { return "eoFactory"; } + + /** Read and print are left without implementation */ + //@} + +}; + + +#endif _EOFACTORY_H diff --git a/eo/src/eoFitness.h b/eo/src/eoFitness.h new file mode 100644 index 000000000..596cab00e --- /dev/null +++ b/eo/src/eoFitness.h @@ -0,0 +1,36 @@ +//----------------------------------------------------------------------------- +// eoFitness.cpp +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#ifndef EOFITNESS_H +#define EOFITNESS_H + +//----------------------------------------------------------------------------- + +class eoFitness: public eoPersistent +{ + public: + virtual bool operator<(const eoFitness& other) const = 0; + + bool operator>(const eoFitness& other) const + { + return !(*this < other || *this == other); + } + + bool operator==(const eoFitness& other) const + { + return !(other < *this || *this < other); + } + + bool operator!=(const eoFitness& other) const + { + return other < *this || *this < other; + } + + virtual operator float() const = 0; +}; + +//----------------------------------------------------------------------------- + +#endif EOFITNESS_H diff --git a/eo/src/eoGA.h b/eo/src/eoGA.h new file mode 100644 index 000000000..5fee041fb --- /dev/null +++ b/eo/src/eoGA.h @@ -0,0 +1,43 @@ +//----------------------------------------------------------------------------- +// eoGA.h +//----------------------------------------------------------------------------- + +#ifndef eoGA_h +#define eoGA_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include // eoSelect, eoTranform, eoMerge + +//----------------------------------------------------------------------------- +// eoGA +//----------------------------------------------------------------------------- + +class eoGA +{ + public: + /// Constructor. + eoGA(eoSelect& _select, eoTranform& _transform, eoMerge& _replace) + { + } + + /// + void operator()(eoPop& pop) + { + eoPop breeders; + + select(pop, breeders); + transform(breeders); + replace(breeders, pop); + } + + private: + eoSelect& select; + eoTranform& transform; + eoMerge& replace; +}; + +//----------------------------------------------------------------------------- + +#endif eoGA_h diff --git a/eo/src/eoID.h b/eo/src/eoID.h new file mode 100644 index 000000000..61f142f19 --- /dev/null +++ b/eo/src/eoID.h @@ -0,0 +1,92 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoID.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef EOID_H +#define EOID_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // for string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoID +//----------------------------------------------------------------------------- + +/** eoID is a template class that adds an ID to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +printOn, readFrom, that is why we don´t subclass eoObject to avoid multiple inheritance.\\ +IDs can be used to count objects of a a kind, or track them, or whatever. +@see eoObject +*/ +template +class eoID: public Object +{ + public: + /// Main ctor from an already built Object. + eoID( const Object& _o): Object( _o ), thisID(globalID++) {}; + + /// Copy constructor. + eoID( const eoID& _id): Object( _id ), thisID(globalID++ ) {}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoID() {}; + + + ///returns the age of the object + unsigned long ID() const {return thisID;} + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("[eoID]")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + Object::readFrom( _is ); + _is >> thisID; + } + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const{ + Object::printOn( _os ); + _os << thisID; + } +//@} + + private: + + /** Default Constructor. \\ + It´s private so that it is not used anywhere; the right way of using this object + is to create an Object and passing it to an aged by means of the copy ctor; that way + it´s turned into an Aged object*/ + eoID(): Object(), thisID( globalID++ ) {}; + + unsigned long thisID; + static unsigned long globalID; +}; + +template< class Object> +unsigned long eoID< Object >::globalID = 0; + +#endif EOID_H diff --git a/eo/src/eoKill.h b/eo/src/eoKill.h new file mode 100644 index 000000000..7810d6e09 --- /dev/null +++ b/eo/src/eoKill.h @@ -0,0 +1,44 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoKill.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOKILL_h +#define _EOKILL_h + +#include + +#include + +/// Kill eliminates a gen in a chromosome +template +class eoKill: public eoMonOp { +public: + /// + eoKill( ) + : eoMonOp< EOT >(){}; + + /// needed virtual dtor + virtual ~eoKill() {}; + + /// + virtual void operator()( EOT& _eo ) const { + eoUniform uniform( 0, _eo.length() ); + unsigned pos = uniform( ); + _eo.deleteGene( pos ); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoKill";}; + //@} +}; + +#endif diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h new file mode 100644 index 000000000..ff079e700 --- /dev/null +++ b/eo/src/eoLottery.h @@ -0,0 +1,60 @@ +//----------------------------------------------------------------------------- +// eoLottery.h +//----------------------------------------------------------------------------- + +#ifndef eoLottery_h +#define eoLottery_h + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +// eoLottery +//----------------------------------------------------------------------------- + +template class eoLottery: public eoSelect +{ + public: + eoLottery(const float& rate = 1.0): eoLottery(rate) {} + + void operator()(const eoPop& pop, eoPop& breeders) + { + // scores of chromosomes + vector score(pop.size()); + + // calculates accumulated scores for chromosomes + transform(pop.begin(), pop.end(), score.begin(), fitness); + float sum = accumulate(score.begin(), score.end(), MINFLOAT); + transform(score.begin(), score.end(), score.begin(), + bind2nd(divides(), sum)); + partial_sum(score.begin(), score.end(), score.begin()); + + // generates random numbers + vector random(pop.size()); + generate(random.begin(), random.end(), Uniform(0,1)); + sort(random.begin(), random.end(), less()); + + // selection of chromosomes + unsigned score_index = 0; // position in score vector + unsigned random_index = 0; // position in random vector + unsigned num_chroms = (unsigned)(rate * pop.size()); + do { + if(random[random_index] < score[score_index]) + { + breeders.push_back(pop[score_index]); + random_index++; + } + else + if (score_index < pop.size()) + score_index++; + else + fill_n(back_insert_iterator(breeders), + num_chroms - breeders.size(), pop.back()); + } while (breeders.size() < num_chroms); + } +}; + +//----------------------------------------------------------------------------- + +#endif eoLottery_h diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h new file mode 100644 index 000000000..c8e765cd8 --- /dev/null +++ b/eo/src/eoMerge.h @@ -0,0 +1,63 @@ +//----------------------------------------------------------------------------- +// eoMerge.h +//----------------------------------------------------------------------------- + +#ifndef eoMerge_h +#define eoMerge_h + +//----------------------------------------------------------------------------- + +#include // eoMerge + +//----------------------------------------------------------------------------- +// eoInsertion +//----------------------------------------------------------------------------- + +template class Insertion: public eoMerge +{ + public: + eoInsertion(const float& _rate = 1): eoMerge(rate) {} + + bool compare(const Chrom& chrom1, const Chrom& chrom2) + { + return chrom1.fitness() < chrom2.fitness(); + } + + void operator()(const Pop& breeders, Pop& pop) + { + sort(pop.begin(), pop.end() compare); + + pop.erase(pop.end() + (int)(pop.size() * (rate - 1) - breeders.size()), + pop.end()); + + copy(breeders.begin(), breeders.end(), + back_insert_iterator(pop)); + } +}; + +//----------------------------------------------------------------------------- + +template class Inclusion: public Replace +{ + public: + Inclusion(const float& rate = 1): Replace(rate) {} + + void operator()(Pop& breeders, Pop& pop) + { + Pop temp; + + sort(breeders.begin(), breeders.end(), compare); + sort(pop.begin(), pop.end(), compare); + + merge(breeders.begin(), breeders.end(), + pop.begin(), pop.end(), + back_insert_iterator(temp), compare); + + temp.erase(temp.begin() + (unsigned)(rate * pop.size()), temp.end()); + pop.swap(temp); + } +}; + +//----------------------------------------------------------------------------- + +#endif eoMerge_h diff --git a/eo/src/eoMonOpFactory.h b/eo/src/eoMonOpFactory.h new file mode 100644 index 000000000..79a76ae56 --- /dev/null +++ b/eo/src/eoMonOpFactory.h @@ -0,0 +1,68 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMonOpFactory.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOMONOPFACTORY_H +#define _EOMONOPFACTORY_H + +#include +#include +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. An instance of the factory class to create monary operators. +@see eoSelect*/ +template< class EOT> +class eoMonOpFactory: public eoFactory< eoMonOp > { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoMonOpFactory( ) {} + + /// destructor + virtual ~eoMonOpFactory() {} + //@} + + /** Another factory method: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual eoMonOp* make(istream& _is) { + eoMonOp * opPtr; + string objectTypeStr; + _is >> objectTypeStr; + if ( objectTypeStr == "eoDup") { + opPtr = new eoDup(); + } + if ( objectTypeStr == "eoKill" ) { + opPtr = new eoKill( ); + } + if ( objectTypeStr == "eoTranspose" ) { + opPtr = new eoTranspose( ); + } + if ( !opPtr ) { + throw runtime_error( "Incorrect selector type" ); + } + return opPtr; + } + + ///@name eoObject methods + //@{ + void printOn( ostream& _os ) const {}; + void readFrom( istream& _is ){}; + + /** className is inherited */ + //@} + +}; + + +#endif _EOFACTORY_H diff --git a/eo/src/eoMultiMonOp.h b/eo/src/eoMultiMonOp.h new file mode 100644 index 000000000..e44931b5d --- /dev/null +++ b/eo/src/eoMultiMonOp.h @@ -0,0 +1,63 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMultiMonOp.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOMULTIMONOP_h +#define _EOMULTIMONOP_h + +#include + +#include + +/** MultiMonOp combines several monary operators. By itself, it does nothing to the +EO it´s handled*/ +template +class eoMultiMonOp: public eoMonOp { +public: + /// Ctor from an already existing op + eoMultiMonOp( const eoMonOp* _op ) + : eoMonOp< EOT >( ), vOp(){ + vOp.push_back( _op ); + }; + + /// + eoMultiMonOp( ) + : eoMonOp< EOT >( ), vOp(){}; + + /// Ctor from an already existing op + void adOp( const eoMonOp* _op ){ + vOp.push_back( _op ); + }; + + /// needed virtual dtor + virtual ~eoMultiMonOp() {}; + + /// + /// Applies all operators to the EO + virtual void operator()( EOT& _eo ) const { + if ( vOp.begin() != vOp.end() ) { + for ( vector* >::const_iterator i = vOp.begin(); + i != vOp.end(); i++ ) { + (*i)->operator () ( _eo ); + } + } + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMonOp";}; + //@} +private: + vector< const eoMonOp* > vOp; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoMutation.h b/eo/src/eoMutation.h new file mode 100644 index 000000000..82c9c64e7 --- /dev/null +++ b/eo/src/eoMutation.h @@ -0,0 +1,116 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMutation.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- +#ifndef _EOMUTATION_H +#define _EOMUTATION_H + +#include +// EO includes +#include +#include + +/** Generic Mutation of an EO. + This is a virtual class, just to establish the interface +*/ + +template +class eoMutation: public eoMonOp { +public: + + /// + eoMutation(const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate) {}; + + /// + virtual ~eoMutation() {}; + + /// + virtual void operator()( EOT& _eo ) const { + for ( unsigned i = 0; i < _eo.length(); i ++ ) + applyAt( _eo, i ); + } + + /// To print me on a stream. + /// @param os The ostream. + void printOn(ostream& os) const { + os << rate ; + } + + /// To read me from a stream. + /// @param is The istream. + void readFrom(istream& is) { + is >> rate ; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMutation";}; + //@} + +protected: + double rate; + +private: +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO. It is empty, so each descent class must define it. + virtual void applyAt( EOT& _eo, unsigned _i ) const = 0 ; +}; + + + +/** Mutation of an eoString. + The eoString's genes are changed by adding or substracting 1 to +*/ + +template +class eoStringMutation: public eoMutation { + public: + + /// + eoStringMutation(const double _rate=0.0) : eoMutation< EOT >(_rate) {}; + + /// + virtual ~eoStringMutation() {}; + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoStringMutation";}; + //@} + + + private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. + virtual void applyAt( EOT& _eo, unsigned _i ) const { + eoUniform uniform( 0, 1 ); + if( rate < uniform() ) { + _eo.gene(_i) += ( uniform()>=0.5 )? (1) : (-1) ; + } + } + +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h new file mode 100644 index 000000000..db4f58366 --- /dev/null +++ b/eo/src/eoNegExp.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNegExp.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EONEGEXP_H +#define _EONEGEXP_H + +//----------------------------------------------------------------------------- + +#include +#include + +#include + +#include // for base class + +//----------------------------------------------------------------------------- +// Class eoNegExp +//----------------------------------------------------------------------------- + +/// Generates random numbers using a negative exponential distribution +template +class eoNegExp: public eoRnd +{ + public: + /** + * Default constructor. + * @param _mean Dsitribution mean + */ + eoNegExp(T _mean): eoRnd(), mean(_mean) {}; + + /** + * Copy constructor. + * @param _rnd the copyee + */ + eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; + + /// Returns an uniform dandom number over the interval [min, max). + virtual T operator()() { return - mean*log((double)rand() / RAND_MAX); } + + private: + T mean; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h new file mode 100644 index 000000000..81d120ac7 --- /dev/null +++ b/eo/src/eoNormal.h @@ -0,0 +1,74 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNormal.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EONORMAL_H +#define _EONORMAL_H + +//----------------------------------------------------------------------------- + +#include +#include + +#include + +#include // for base class + +//----------------------------------------------------------------------------- +// Class eoNormal +//----------------------------------------------------------------------------- + +/// Generates random number using a normal distribution +template +class eoNormal: public eoRnd +{ + public: + /** + * Default constructor. + * @param _mean Dsitribution mean + * @param _sd Standard Deviation + */ + eoNormal(T _mean, T _sd) + : eoRnd(), mean(_mean), sd(_sd), phase(false) {} + + /** + * Copy constructor. + * @param _rnd the other one + */ + eoNormal( const eoNormal& _rnd ) + : eoRnd( _rnd), mean(_rnd.mean), sd(_rnd.sd), phase(false) {} + + /** Returns an uniform random number over the interval [min, max). + @return an uniform random number over the interval [min, max). + */ + virtual T operator()() { + if (phase) { // Already have one stored up. + phase = false; + return T ( (sqRatio * q * sd) + mean ); + } + + double p, v; + do { + p = ((double)rand() / RAND_MAX)*2-1; + q = ((double)rand() / RAND_MAX)*2-1; + v = p*p + q*q; + } while(v > 1.0 || v <0.25); + + sqRatio = sqrt(-2*log((double)rand() / RAND_MAX) / v); + phase = true; + return T( (sqRatio * p * sd) + mean ); + }; + + private: + T mean; + T sd; + bool phase; + double sqRatio, q; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoObject.cpp b/eo/src/eoObject.cpp new file mode 100644 index 000000000..0dadd2c34 --- /dev/null +++ b/eo/src/eoObject.cpp @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------------- +// eoObject.cpp +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- + +// Implementation of these objects + +//----------------------------------------------------------------------------- +/* +ostream & operator << ( ostream& _os, const eoObject& _o ) { + _o.printOn(_os); + return _os; +} + +//----------------------------------------------------------------------------- + +istream & operator >> ( istream& _is, eoObject& _o ) { + _o.readFrom(_is); + return _is; +} +*/ +//----------------------------------------------------------------------------- diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h new file mode 100644 index 000000000..48e4945a2 --- /dev/null +++ b/eo/src/eoObject.h @@ -0,0 +1,48 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoObject.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef EOOBJECT_H +#define EOOBJECT_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoObject +//----------------------------------------------------------------------------- +/** +This is the base class for the whole hierarchy; an eoObject defines +basically an interface for the whole hierarchy: each object should +know its name (#className#). Previously, this object defined a print and read +interface, but it´s been moved to eoPrintable and eoPersistent. + */ +class eoObject +{ + public: + + /// Default Constructor. + eoObject() {} + + /// Copy constructor. + eoObject( const eoObject& ) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoObject() {} + + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return "eoObject"; } + +}; + +#endif EOOBJECT_H diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h new file mode 100644 index 000000000..20aeeff95 --- /dev/null +++ b/eo/src/eoOp.h @@ -0,0 +1,182 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody +should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here. +@author GeNeura Team +@version 0.0 +*/ +//@{ + +/// +enum Arity { unary = 0, binary = 1, Nary = 2}; + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + + /// Ctor + eoOp( Arity _arity = unary ) + :arity( _arity ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :arity( _eop.arity ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// Arity: number of operands + Arity readArity() const {return arity;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className(); + _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + + +private: + /// arity is the number of operands it takes + Arity arity; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + :eoOp( unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} + + +}; + +/** eoNaryOp is the N-ary operator: genetic operator that takes + several EOs. It could be called an {\em orgy} operator +*/ +template +class eoNaryOp: public eoOp { +public: + + /// Ctor + eoNaryOp( ) + :eoOp( Nary ) {}; + + /// Copy Ctor + eoNaryOp( const eoNaryOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoNaryOp() {}; + + /** applies randomly operator, to the object. + */ +// virtual void operator()( EOPop & _eop) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject. + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoNaryOp";}; + //@} + +}; +//@} + +#endif diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h new file mode 100644 index 000000000..651270594 --- /dev/null +++ b/eo/src/eoOpSelector.h @@ -0,0 +1,68 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpSelector.h +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#ifndef EOOPSELECTOR_H +#define EOOPSELECTOR_H + +//----------------------------------------------------------------------------- + +#include // runtime_error + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** An operator selector is an object that contains a set of EO operators, and +and selects one based on whatever criteria. It will be used in the breeder objects.\\ +This class is basically a generic interface for operator selection +*/ +template +class eoOpSelector: public eoObject, public eoPrintable +{ +public: + typedef unsigned ID; + + /** add an operator to the operator set + @param _op a genetic operator, that will be applied in some way + @param _arg the operator rate, usually, or any other argument to the operator + @return an ID that will be used to identify the operator + */ + virtual ID addOp( eoOp& _op, float _arg ) = 0; + + /** Gets a non-const reference to an operator, so that it can be changed, + modified or whatever + @param _id a previously assigned ID + @throw runtime_exception if the ID does not exist*/ + virtual eoOp& getOp( ID _id ) = 0; + + /** Remove an operator from the operator set + @param _id a previously assigned ID + @throw runtime_exception if the ID does not exist + */ + virtual deleteOp( ID _id ) = 0; + + /// Returns a genetic operator according to the established criteria + virtual const eoOp& Op() = 0; + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoOpSelector"; }; + + /** + * Read object and print objects are left for subclasses to define. + */ + //@} +}; + +//----------------------------------------------------------------------------- + +#endif EO_H diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp new file mode 100644 index 000000000..5ed66f3ee --- /dev/null +++ b/eo/src/eoPersistent.cpp @@ -0,0 +1,10 @@ +#include + +//Implementation of these objects + +//----------------------------------------------------------------------------- + +istream & operator >> ( istream& _is, eoPersistent& _o ) { + _o.readFrom(_is); + return _is; +}; \ No newline at end of file diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h new file mode 100644 index 000000000..cf2c2ba2b --- /dev/null +++ b/eo/src/eoPersistent.h @@ -0,0 +1,53 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPersistent.h +// (c) GeNeura Team, 1999 +//----------------------------------------------------------------------------- + +#ifndef EOPERSISTENT_H +#define EOPERSISTENT_H + +/// @name variables Some definitions of variables used throughout the program +//@{ +/// max length to store stuff read +const unsigned MAXLINELENGTH=1024; +//@} + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +//----------------------------------------------------------------------------- +#include + +using namespace std; + +//----------------------------------------------------------------------------- +// eoPersistent +//----------------------------------------------------------------------------- +/** +An persistent object that knows how to write (through functions inherited from +#eoPrintable#) and read itself + */ +class eoPersistent: public eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPersistent() {} + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) = 0; + +}; + +//----------------------------------------------------------------------------- +///Standard input for all objects in the EO hierarchy +istream & operator >> ( istream& _is, eoPersistent& _o ); + +#endif EOOBJECT_H diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h new file mode 100644 index 000000000..cc2edf25d --- /dev/null +++ b/eo/src/eoPop.h @@ -0,0 +1,130 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPop.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOPOP_H +#define _EOPOP_H + +#include +#include + +using namespace std; +// from file + +#include +#include + +/** Subpopulation: it is used to move parts of population + from one algorithm to another and one population to another. It is safer +to declare it as a separate object. I have no idea if a population can be +some other thing that a vector, but if somebody thinks of it, this concrete +implementation will be moved to "generic" and an abstract Population +interface will be provided. +It can be instantiated with anything, provided that it accepts a "size" and a +random generator in the ctor. This happens to all the eo1d chromosomes declared +so far. EOT must also have a copy ctor, since temporaries are created and copied +to the population. +@author Geneura Team +@version 0.0 +*/ + +template +class eoPop: public vector, public eoObject, public eoPersistent { + +/// Type is the type of each gene in the chromosome +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop() + :vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ + virtual void readFrom(istream& _is) { + while( _is ) { // reads line by line, and creates an object per + // line + char line[MAXLINELENGTH]; + _is.getline( line, MAXLINELENGTH-1 ); + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); + push_back( thisEOT ); + } + } + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. In this case, prints the population to + standard output. The EOT class must hav standard output with cout, + but since it should be an eoObject anyways, it's no big deal. + */ + virtual void printOn(ostream& _os) const { + copy( begin(), end(), ostream_iterator( _os, "\n") ); + }; + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoPop";}; + //@} + + protected: + +}; +#endif diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h new file mode 100644 index 000000000..7eabb475b --- /dev/null +++ b/eo/src/eoPopOps.h @@ -0,0 +1,120 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eo1d.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOPOPOPS_H +#define _EOPOPOPS_H + + +using namespace std; + +/** +@author Geneura Team +@version 0.0 +*/ + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- +/** eoTransform is a class that transforms or does something on a population. +*/ +template +class eoTransform: public eoObject{ + + public: + /** ctor + */ + eoTransform() {}; + + /// Dtor + virtual ~eoTransform(){}; + + /// Pure virtual transformation function. Does something on the population + virtual void operator () ( eoPop& _pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoTransform";}; + //@} + +}; + +/** eoSelect usually takes elements from one population, with or without +transformation, and transfers them to the other population +*/ +template +class eoSelect: public eoObject{ + + public: + /** ctor + */ + eoSelect() {}; + + /// Dtor + virtual ~eoSelect(){}; + + /** Pure virtual transformation function. Extracts something from the parents, + and transfers it to the siblings + @param _parents the initial generation. Will be kept constant + @param _siblings the created offspring. Will be usually an empty population + */ + virtual void operator () ( const eoPop& _parents, eoPop& _siblings ) const = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoSelect";}; + //@} + +}; + +/** eoMerge involves three populations, that can be merged and transformed to +give a third +*/ +template +class eoMerge: public eoObject{ + + public: + /// (Default) Constructor. + eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} + + /// Dtor + virtual ~eoMerge() {} + + /** Pure virtual transformation function. Extracts something from breeders + * and transfers it to the pop + * @param breeders Tranformed individuals. + * @param pop The original population at the begining, the result at the end + */ + virtual operator () ( const eoPop& breeders, eoPop& pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoMerge";}; + //@} + + /// Return the rate to be selected from the original population + float rate() const { return rep_rate; } + +private: + float rep_rate; +}; +#endif diff --git a/eo/src/eoPrintable.cpp b/eo/src/eoPrintable.cpp new file mode 100644 index 000000000..6810abefc --- /dev/null +++ b/eo/src/eoPrintable.cpp @@ -0,0 +1,17 @@ +//----------------------------------------------------------------------------- +// eoPrintable.cpp +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +//Implementation of these objects +//----------------------------------------------------------------------------- + +ostream & operator << ( ostream& _os, const eoPrintable& _o ) { + _o.printOn(_os); + return _os; +}; + +//----------------------------------------------------------------------------- + diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h new file mode 100644 index 000000000..f2c25a24a --- /dev/null +++ b/eo/src/eoPrintable.h @@ -0,0 +1,45 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPrintable.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef EOPRINTABLE_H +#define EOPRINTABLE_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoPrintable +//----------------------------------------------------------------------------- +/** +Base class for objects that can print themselves +(#printOn#). Besides, this file defines the standard output for all the objects; +if the objects define printOn there's no need to define #operator <<#.\\ +This functionality was separated from eoObject, since it makes no sense to print +some objects (for instance, a #eoFactory# or a random number generator. + */ +class eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPrintable() {} + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const = 0; +}; + +//----------------------------------------------------------------------------- +///Standard output for all objects in the EO hierarchy +ostream & operator << ( ostream& _os, const eoPrintable& _o ); + +#endif EOPRINTABLE_H diff --git a/eo/src/eoProblem.h b/eo/src/eoProblem.h new file mode 100644 index 000000000..a1f5e7b65 --- /dev/null +++ b/eo/src/eoProblem.h @@ -0,0 +1,23 @@ +//----------------------------------------------------------------------------- +// eoProblem.h +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#ifndef EOPROBLEM_H +#define EOPROBLEM_H + +//----------------------------------------------------------------------------- + +template class Problem +{ + public: + typedef T Chrom; + typedef typename T::Gene Gene; + typedef typename T::Fitness Fitness; + + virtual Fitness operator()(const Chrom& chrom) = 0; +}; + +//----------------------------------------------------------------------------- + +#endif EOPROBLEM_H diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h new file mode 100644 index 000000000..033e6897d --- /dev/null +++ b/eo/src/eoProportionalOpSel.h @@ -0,0 +1,132 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoProportionalOpSel.h +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#ifndef EOPROPORTIONALOPSEL_H +#define EOPROPORTIONALOPSEL_H + +//----------------------------------------------------------------------------- + +#include // runtime_error +#include // greater +#include + +// Includes from EO +#include +#include +#include + +//----------------------------------------------------------------------------- +/** This class selects operators according to probability. All operator percentages +should add up to one; if not, an exception will be raised.\\ +Operators are represented as pairs (proportion,operator) +*/ +template +class eoProportionalOpSel: public eoOpSelector, + public multimap*,greater > +{ +public: + + typedef multimap*,greater > MMF; + + /// default ctor + eoProportionalOpSel() + : eoOpSelector(), MMF(), opID(1) {}; + + /// virtual dtor + virtual ~eoProportionalOpSel() {}; + + /** Gets a non-const reference to an operator, so that it can be changed, + modified or whatever + @param _id a previously assigned ID + @throw runtime_error if the ID does not exist*/ + virtual eoOp& getOp( ID _id ) { + MMF::iterator i=begin(); + ID j = 1; + while ( (i++!=end()) && (j++ != _id) ); + if ( i == end() ) + throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); + return *(i->second); + } + + /** add an operator to the operator set + @param _op a genetic operator, that will be applied in some way + @param _arg an argument to the operator, usually operator rate + @return an ID that will be used to identify the operator + */ + virtual ID addOp( eoOp& _op, float _arg ) { + insert( MMF::value_type( _arg,& _op ) ); + return opID++; + } + + /** Remove an operator from the operator set + @param _id a previously assigned ID + @throw runtime_error if the ID does not exist + */ + virtual deleteOp( ID _id ) { + unsigned j; + MMF::iterator i; + for ( i=begin(), j=1; i!=end(); i++,j++ ) { + if( j == _id ) + erase( i ); + } + if ( i == end() ) + throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); + }; + + /// Returns a genetic operator according to the established criteria + virtual const eoOp& Op() { + // Check that all add up to one + float acc = 0; + MMF::iterator i; + unsigned j; + for ( i=begin(), j=1; i!=end(); i++,j++ ) { + acc +=i->first; + } + if ( acc != 1.0 ) + throw runtime_error( "Operator rates added up different from 1.0" ); + + // If here, operators ordered by rate and no problem + eoUniform u(0,1.0); + float aRnd = u(); + i=begin(); + acc = 0; + do { + acc += i->first; + } while ( (acc <= aRnd ) && (i++!=end() ) ); + if ( i == end() ) + throw runtime_error( "Operator not found in eoProportionalOpSelector" ); + return *(i->second); + } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoProportionalOpSel"; }; + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + it can be reimplemented anywhere. Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { + _s << i->first << "\t" << i->second << endl; + } + } + + + //@} + + private: + ID opID; + }; + + //----------------------------------------------------------------------------- + +#endif EO_H diff --git a/eo/src/eoRandomBreed.h b/eo/src/eoRandomBreed.h new file mode 100644 index 000000000..a0faa0f1c --- /dev/null +++ b/eo/src/eoRandomBreed.h @@ -0,0 +1,183 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRandomBreed.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EORANDOMBREED_H +#define _EORANDOMBREED_H + +#include + +/** Takes those on the selection list and creates a list of new individuals + * Destroys the genetic pool */ +template +class EORandomBreed: public EOBreeder{ +public: + + typedef vector< EOOp * > vecOpT; + + /// Ctor + EORandomBreed():vecOp() {}; + + /** Copy ctor + * Needs a copy ctor for the EO operators */ + EORandomBreed( const EORandomBreed& _rndBreeder) + :vecOp() { + copy( _rndBreeder.vecOp.begin(), _rndBreeder.vecOp.end(), + vecOp.begin() ); + }; + + /// Dtor + virtual ~EORandomBreed() {}; + + /// Adds a genetic operator to the Breeder with a rate + virtual void addOp( EOOp* _eop ) { + vecOp.push_back( _eop); + }; + + /// Takes the operator pointed to from the operator list + virtual void deleteOp( const EOOp* _eop); + + /** Takes the genetic pool, and returns next generation, destroying the + * genetic pool container + * Non-const because it might order the operator vector. In this case, + * it mates all members of the population randomly */ + virtual void operator() ( EOPop< EOT >& _ptVeo ); + +// I don´t like this, but I need it for the RandomBreedLog +protected: + vecOpT vecOp; + +}; + + +//_________________________ IMPLEMENTATIONS _____________________________ + +template< class EOT> +void EORandomBreed::deleteOp( const EOOp* _eop) { + vecOpT::iterator i; + for ( i = vecOp.begin(); i != vecOp.end(); i++ ) { + if ( *i == _eop ) { + vecOp.erase( i ); + } + } +} + +//________________________________________________________________________ +template +void EORandomBreed::operator() ( EOPop< EOT >& _ptVeo ) { + + unsigned select= _ptVeo.size(); // New population same size than old + sort( vecOp.begin(), vecOp.end(), SortEOpPt() ); + + unsigned i; + float totalPriority = 0; + for ( i = 0; i < vecOp.size(); i ++ ) { + totalPriority += vecOp[i]->Priority(); + } + + unsigned inLen = _ptVeo.size(); // size of in subPop + for ( i = 0; i < select; i ++ ) { + // Create an alias of a random input EO with copy ctor + EOT& newEO = _ptVeo[ i ]; + + // Choose operator + float randomDraw = totalPriority *(rand() % 1000) /1000.0; + vecOpT::const_iterator j; + float accumulated = 0; + for ( j = vecOp.begin(); + ( j != vecOp.end() ) && ( accumulated < randomDraw); + j ++ ) { + accumulated+= (*j)->Priority(); // the priority + } + + if ( j != vecOp.begin() ) + j--; // previous one + EOOp* thisOp = *j; + + if (thisOp->readArity() == unary ) { + MonOp* mopPt = dynamic_cast< MonOp* > ( thisOp ); + (*mopPt)( newEO ); + } else { + unsigned chosenMatch = rand() % inLen; + BinOp* bopPt = dynamic_cast< BinOp* > ( thisOp ); + (*bopPt)( newEO, _ptVeo[chosenMatch] ); + } + + } +} + +#include // For factory + +/** Exactly as RandomBreed, except that uses factories*/ +template +class EORandomBreedLog: public EORandomBreed{ +public: + + typedef vector< EOOp * > vecOpT; + + /// Ctor + EORandomBreedLog( EOFactory & _eof ):EORandomBreed(), factory( _eof ) {}; + + /** Copy ctor + * Needs a copy ctor for the EO operators */ + EORandomBreedLog( const EORandomBreedLog& _rndBreeder) + :EORandomBreed( _rndBreeder ), factory( _rndBreeder.factory) {}; + + /// Dtor + virtual ~EORandomBreedLog() {}; + + /** Takes the genetic pool, and returns next generation, destroying the + * genetic pool container + * Non-const because it might order the operator vector. In this case, it mates + * all population randomly */ + virtual void operator() ( EOPop< EOT >& _ptVeo ) { + + unsigned select= _ptVeo.size(); // New population same size than old + sort( vecOp.begin(), vecOp.end(), SortEOpPt() ); + + unsigned i; + float totalPriority = 0; + for ( i = 0; i < vecOp.size(); i ++ ) { + totalPriority += vecOp[i]->Priority(); + } + + unsigned inLen = _ptVeo.size(); // size of in subPop + for ( i = 0; i < select; i ++ ) { + // Create a copy of a random input EO with copy ctor + EOT* newEO = factory.make( _ptVeo[ i ] ); + + // Choose operator + float randomDraw = totalPriority *(rand() % 1000) /1000.0; + vecOpT::const_iterator j; + float accumulated = 0; + for ( j = vecOp.begin(); + ( j != vecOp.end() ) && ( accumulated < randomDraw); + j ++ ) { + accumulated+= (*j)->Priority(); // the priority + } + + if ( j != vecOp.begin() ) + j--; // previous one + EOOp* thisOp = *j; + + if (thisOp->readArity() == unary ) { + MonOp* mopPt = dynamic_cast< MonOp* > ( thisOp ); + (*mopPt)( *newEO ); + } else { + unsigned chosenMatch = rand() % inLen; + BinOp* bopPt = dynamic_cast< BinOp* > ( thisOp ); + (*bopPt)( *newEO, _ptVeo[chosenMatch] ); + } + + } + + }; +private: + EOFactory& factory; + +}; + +#endif diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h new file mode 100644 index 000000000..9b6ad0bc5 --- /dev/null +++ b/eo/src/eoRandomSelect.h @@ -0,0 +1,80 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRandomSelect.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef EORANDOMSELECT_H +#define EORANDOMSELECT_H + +//----------------------------------------------------------------------------- + +#include +#include // for accumulate +#include + +#include +#include + +//----------------------------------------------------------------------------- + +/** + * eoRandomSelect: an selection operator, which selects randomly a percentage + of the initial population. + */ +template class eoRandomSelect: public eoSelect +{ + public: + /// + eoRandomSelect(const float& _percent = 0.4): eoSelect(), rate(_percent) {}; + + /// + virtual ~eoRandomSelect() {}; + + /// Takes a percentage of the population randomly, and transfers it to siblings + virtual void operator() ( const eoPop& _parents, eoPop& _siblings ) const { + // generates random numbers + eoUniform uniform(0, _parents.size()-1); + unsigned num_chroms = (unsigned)(rate * _parents.size()); + + // selection of chromosomes + do { + _siblings.push_back(_parents[uniform()]); + } while (_siblings.size() < num_chroms); + } + + /// @name Methods from eoObject + //@{ + /** + * Read object. Reads the percentage + * Should call base class, just in case. + * @param _s A istream. + */ + virtual void readFrom(istream& _s) { + _s >> rate; + } + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + it can be reimplemented anywhere. Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + _s << rate; + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoRandomSelect";}; + + //@} + + + private: + float rate; +}; + +//----------------------------------------------------------------------------- + +#endif EOGSRANDOMSELECT_H diff --git a/eo/src/eoRank.h b/eo/src/eoRank.h new file mode 100644 index 000000000..db441dd59 --- /dev/null +++ b/eo/src/eoRank.h @@ -0,0 +1,105 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRank.h +// (c) GeNeura Team 1999 +//----------------------------------------------------------------------------- + +#ifndef _eoRank_H +#define _eoRank_H + +#include +#include + +/** + * Takes those on the selection list and creates a list of new individuals + * Destroys the genetic pool. There's no requisite on EOT, other than the + * genetic operators can be instantiated with it, so it fully depends on + * the genetic operators used. If generic genetic operators are used, then + * EOT must be an EO + */ + +template +class eoRank: public eoSelect{ + public: + + /// Ctor + eoRank( unsigned _newPopSize, eoOpSelector& _opSelector) + :eoSelect(), opSelector( _opSelector ), repNewPopSize( _newPopSize ) {}; + + /** Copy ctor + * Needs a copy ctor for the EO operators */ + eoRank( const eoRank& _rankBreeder) + :eoSelect( _rankBreeder), + opSelector( _rankBreeder.opSelector ), repNewPopSize( _rankBreeder.repNewPopSize ) {}; + + /// Dtor + virtual ~eoRank() {}; + + /** Takes the genetic pool, and returns next generation, destroying the + * genetic pool container + * Non-const because it might order the operator vector*/ + virtual void operator() ( const eoPop< EOT >& _ptVeo, + eoPop< EOT >& _siblings ) const { + + unsigned inLen = _ptVeo.size(); // size of subPop + if ( !inLen ) + throw runtime_error( "zero population in eoRank"); + + for ( unsigned i = 0; i < repNewPopSize; i ++ ) { + // Create a copy of a random input EO with copy ctor. The members of the + // population will be selected by rank, with a certain probability of + // being selected several times if the new population is bigger than the + // old + EOT newEO = _ptVeo[ i%inLen ]; + + // Choose operator + eoUniform u( 0, inLen ); + const eoOp& thisOp = opSelector.Op(); + if ( thisOp.readArity() == unary ) { + const eoMonOp& mopPt = dynamic_cast< const eoMonOp& > ( thisOp ); + mopPt( newEO ); + } else { + const eoBinOp& bopPt = dynamic_cast< const eoBinOp& > ( thisOp ); + EOT mate = _ptVeo[ u() ]; + bopPt( newEO, mate ); + } + + _siblings.push_back( newEO ); + } + }; + + /** This is a _new_ function, non defined in the parent class + * It´s used to set the selection rate */ + void select( unsigned _select ) { + repNewPopSize = _select; + } + + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoRank"; }; + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + it can be reimplemented anywhere. Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + _s << opSelector; + _s << repNewPopSize; + }; + + + //@} + +private: + eoOpSelector & opSelector; + unsigned repNewPopSize; + +}; + +#endif diff --git a/eo/src/eoRnd.h b/eo/src/eoRnd.h new file mode 100644 index 000000000..ef4c2328e --- /dev/null +++ b/eo/src/eoRnd.h @@ -0,0 +1,97 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRnd.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EORND_H +#define _EORND_H + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +// Class eoRnd +//----------------------------------------------------------------------------- + +#include // srand +#include // time +#include // runtime_error + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +/** + * Base class for a family of random number generators. Generates numbers + * according to the parameters given in the constructor. Uses the machine's + * own random number generators. Which is not too good, after all. + */ +template +class eoRnd: public eoObject, public eoPersistent +{ +public: + + /// default constructor + eoRnd(unsigned _seed = 0) { + if ( !started ) { + srand(_seed?_seed:time(0)); + started = true; + } + } + + /// Copy cotor + eoRnd(const eoRnd& _r ) {srand(time(0));}; + + /** Main function: random generators act as functors, that return random numbers. + It´s non-const because it might modify a seed + @return return a random number + */ + virtual T operator()() = 0; + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoRandom"; }; + + /** + * Read object. + * @param is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is); + + /** + * print object. Prints just the ID, since the seed is not accesible. + * @param is A ostream. + */ + void printOn(ostream& _os) const { _os << endl; }; + +private: + /// true if the RNG has been started already. If it starts every time, means trouble. + static bool started; +}; + +template bool eoRnd::started = false; + + +//-------------------------------------------------------------------------- + +/** + * Read object. + * @param is A istream. + * @throw runtime_exception If a valid object can't be read. + */ +template +void eoRnd::readFrom(istream& _is) { + if (!_is) + throw runtime_error("Problems reading from stream in eoRnd"); + long seed; + _is >> seed; + srand(seed); +} + +#endif diff --git a/eo/src/eoSelectFactory.h b/eo/src/eoSelectFactory.h new file mode 100644 index 000000000..2169bef25 --- /dev/null +++ b/eo/src/eoSelectFactory.h @@ -0,0 +1,71 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EOFactory.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOSELECTFACTORY_H +#define _EOSELECTFACTORY_H + +#include +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory.An instance of the factory class to create selectors, that is, +eoSelect objects +@see eoSelect*/ +template< class EOT> +class eoSelectFactory: public eoFactory > { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoSelectFactory( ) {} + + /// destructor + virtual ~eoSelectFactory() {} + //@} + + /** Another factory methods: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual eoSelect* make(istream& _is) { + eoSelect * selectPtr; + string objectTypeStr; + _is >> objectTypeStr; + // All selectors have a rate, the proportion of the original population + float rate; + _is >> rate; + if ( objectTypeStr == "eoTournament") { + // another parameter is necessary + unsigned tSize; + _is >> tSize; + selectPtr = new eoTournament( rate, tSize ); + } else { + if ( objectTypeStr == "eoRandomSelect" ) { + selectPtr = new eoRandomSelect( rate ); + } else { + throw runtime_error( "Incorrect selector type" ); + } + } + return selectPtr; + } + + ///@name eoObject methods + //@{ + void printOn( ostream& _os ) const {}; + void readFrom( istream& _is ){}; + + /** className is inherited */ + //@} + +}; + + +#endif _EOFACTORY_H diff --git a/eo/src/eoSimpleEval.h b/eo/src/eoSimpleEval.h new file mode 100644 index 000000000..5a1e895f5 --- /dev/null +++ b/eo/src/eoSimpleEval.h @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSimpleEval.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOSimpleEval_H +#define _EOSimpleEval_H + +#include // for evalFunc +#include // For sort + +/** Particular instantiation of the EOEvaluator class +It takes each member in the population, and evaluates it, applying +the evaluation function it´s been initialized with +*/ +template +class eoSimpleEval: public eoEvaluator { +public: + + /// Ctors/dtors + eoSimpleEval( eoEvalFunc & _ef ):eoEvaluator(_ef) {}; + + /// + virtual ~eoSimpleEval() {}; + +#ifdef _MSC_VER + typedef EOT::Fitness EOFitT; +#else + typedef typename EOT::Fitness EOFitT; +#endif + /** Applies evaluation function to all members in the population, and sets + their fitnesses + Reference is non-const since it orders the population by any order + it´s been defined + @param _vEO the population whose fitness is going to be computed*/ + virtual void operator() ( eoPop< EOT >& _vEO ) { + for ( eoPop::iterator i = _vEO.begin(); i != _vEO.end(); i ++ ){ + i->fitness( EF().evaluate( *i ) ); + } + sort( _vEO.begin(), _vEO.end() ); + }; + + ///@name eoObject methods + //@{ + /// + void printOn( ostream& _os ) const {}; + /// + void readFrom( istream& _is ){}; + + /// + string className() { return "eoSimpleEval";}; + + //@} + +}; + +#endif diff --git a/eo/src/eoString.h b/eo/src/eoString.h new file mode 100644 index 000000000..fc4c84f4b --- /dev/null +++ b/eo/src/eoString.h @@ -0,0 +1,122 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoString.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _eoString_H +#define _eoString_H + +// STL libraries +#include +#include + +using namespace std; + +// EO headers +#include + +//----------------------------------------------------------------------------- +// eoString +//----------------------------------------------------------------------------- + +/** Adaptor that turns an STL string into an EO */ +template +class eoString: public eo1d, public string { +public: + + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + /// ctor + eoString( const string& _str ="" ) + : eo1d(), string( _str ) {}; + + + /** Ctor using a random number generator + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called + */ + eoString( unsigned _size, eoRnd& _rnd ) + : eo1d(), string(){ + for ( unsigned i = 0; i < _size; i ++ ) { + *this += _rnd(); + } + }; + + /// copy ctor + eoString( const eoString& _eoStr ) + :eo1d( static_cast & > ( _eoStr ) ), + string( _eoStr ){}; + + /// Assignment operator + const eoString& operator =( const eoString& _eoStr ) { + if ( this != & _eoStr ) { + eo1d::operator = ( _eoStr ); + string::operator = ( _eoStr ); + } + return *this; + } + + /// dtor + virtual ~eoString() {}; +//@} + + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual char gene( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual char& gene( unsigned _i ) { + if ( _i >= size() ) + throw out_of_range( "out_of_range when writing a gene"); + return (*this)[_i]; + }; + + /** Inserts a value after _i, displacing anything to the right + @exception out_of_range if _i is larger than EO´s size + */ + virtual void insertGene( unsigned _i, char _val ) { + if (_i <= this->size() ) { + string::iterator i = this->begin()+_i; + this->insert( i, _val ); + } else + throw out_of_range( "out_of_range when inserting gene"); + }; + + /** Eliminates the gene at position _i + @exception out_of_range if _i is larger than EO´s size + */ + virtual void deleteGene( unsigned _i ) { + if (_i < this->size() ) { + string::iterator i = this->begin()+_i; + this->erase( i ); + } else + throw out_of_range( "out_of_range when deleting gene"); + }; + + /// methods that implement the EO protocol + virtual unsigned length() const { return this->size(); }; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoString";}; + //@} + + +}; + +#endif diff --git a/eo/src/eoTournament.h b/eo/src/eoTournament.h new file mode 100644 index 000000000..29b890647 --- /dev/null +++ b/eo/src/eoTournament.h @@ -0,0 +1,93 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTournament.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOGSTOURN_H +#define _EOGSTOURN_H + +//----------------------------------------------------------------------------- + +#include // for ceil +#include + +//----------------------------------------------------------------------------- + +/** Selects those who are going to reproduce using Tournament selection: + a subset of the population of size tournamentSize is chosen, + and the best is selected for the new population . +@author JJ Merelo, 1998 +*/ +template +class eoTournament:public eoSelect{ +public: + + /// Proportion of guys that are going to be eliminated + eoTournament( float _perc, unsigned _tSize): eoSelect(), + perc( _perc), repTournamentSize(_tSize){}; + + /// Virtual dtor + ~eoTournament(){}; + + /// Set tourn size + void tournamentSize( unsigned _size ) { repTournamentSize = _size; }; + + /** + * Selects from the initial pop using tournament selection, and copies it + * to the other population. + */ + virtual void operator() ( const eoPop& _vEO, eoPop& _aVEO) const { + + unsigned thisSize = _vEO.size(); + + // Build vector + for ( unsigned j = 0; j < thisSize*perc; j ++ ) { + // Randomly select a tournamentSize set, and choose the best + eoPop veoTournament; + eoUniform u( 0, thisSize); + for ( unsigned k = 0; k < repTournamentSize; k++ ) { + unsigned chosen = u(); + EOT newEO = _vEO[chosen]; + veoTournament.push_back( newEO ); + } + sort( veoTournament.begin(), veoTournament.end() ); + // The first is chosen for the new population + _aVEO.push_back( veoTournament.front() ); + } + }; + + /// @name Methods from eoObject + //@{ + /** + * Read object. Reads the percentage + * Should call base class, just in case. + * @param _s A istream. + */ + virtual void readFrom(istream& _s) { + _s >> perc >> repTournamentSize; + } + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + it can be reimplemented anywhere. Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + _s << perc << endl << repTournamentSize << endl; + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoTournament";}; + + //@} + + private: + float perc; + unsigned repTournamentSize; + +}; + +#endif diff --git a/eo/src/eoTranspose.h b/eo/src/eoTranspose.h new file mode 100644 index 000000000..bafd03f16 --- /dev/null +++ b/eo/src/eoTranspose.h @@ -0,0 +1,74 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTranspose.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOTRANSPOSE_h +#define _EOTRANSPOSE_h + +#include + +#include + +/** Transposition operator: interchanges the position of two genes +of an EO. These positions must be defined by an only index, that is, +EOT must subclass eo1d +*/ +template +class eoTranspose: public eoMonOp { +public: + /// + eoTranspose() + : eoMonOp< EOT >( ){}; + + /// needed virtual dtor + virtual ~eoTranspose() {}; + + /// + virtual void operator()( EOT& _eo ) const { + eoUniform uniform(0, _eo.length() ); + unsigned pos1 = uniform(), + pos2 = uniform(); + applyAt( _eo, pos1, pos2 ); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoTranspose";}; + //@} + +private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /** applies operator to one gene in the EO + @param _eo victim of transposition + @param i, j positions of the genes that are going to be changed + @throw runtime_exception if the positions to write are incorrect + */ + virtual void applyAt( EOT& _eo, unsigned _i, unsigned _j) const { + try { + Type tmp = _eo.gene( _i ); + _eo.gene( _i ) = _eo.gene( _j ); + _eo.gene( _j ) = tmp; + } catch ( exception& _e ) { + string msg = _e.what(); + msg += "Caught exception at eoTranspose"; + throw runtime_error( msg.c_str() ); + } + } + +}; + +#endif diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h new file mode 100644 index 000000000..d53ec9674 --- /dev/null +++ b/eo/src/eoUniform.h @@ -0,0 +1,53 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EOUniform.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOUNIFORM_H +#define _EOUNIFORM_H + +//----------------------------------------------------------------------------- + +#include +#include + +#include +//----------------------------------------------------------------------------- +// Class eoUniform +//----------------------------------------------------------------------------- + +/// Generates uniform random number over the interval [min, max) +template +class eoUniform: public eoRnd +{ + public: + /** + * Default constructor. + * @param _min The minimum value in the interval. + * @param _max The maximum value in the interval. + */ + eoUniform(T _min = 0, T _max = 1) + : eoRnd(), minim(_min), diff(_max - _min) {} + + /** + * copy constructor. + * @param _rnd the other rnd + */ + eoUniform( const eoUniform& _rnd) + : eoRnd( _rnd), minim(_rnd.minim), diff(_rnd.diff) {} + + /// Returns an uniform dandom number over the interval [min, max). + virtual T operator()() { + return minim+ T( (diff * rand() )/ RAND_MAX); + } + + private: + T minim; + double diff; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h new file mode 100644 index 000000000..02244721c --- /dev/null +++ b/eo/src/eoVector.h @@ -0,0 +1,150 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVector.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + + +#ifndef _eoVector_H +#define _eoVector_H + +// STL libraries +#include // For vector +#include +#include + +#include +#include + +/** Adaptor that turns an STL vector into an EO + with the same gene type as the type with which + the vector has been instantiated +*/ +template +class eoVector: public eo1d, public vector { +public: + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + + /** Ctor. + @param _size Lineal length of the object + @param _val Common initial value + */ + eoVector( unsigned _size, T _val = 0) + : eo1d(), vector( _size, _val ){ }; + + /** Ctor using a random number generator + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called + */ + eoVector( unsigned _size, eoRnd& _rnd ); + + /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, +which is supposed to be dynamic and dependent on environment. + @param _is the input stream; should have all values in a single line, separated by whitespace + */ + eoVector( istream& _is); + + + /// copy ctor + eoVector( const eoVector & _eo ) + : eo1d( _eo ), vector( _eo ){ }; + + /// Assignment operator + const eoVector& operator =( const eoVector & _eo ) { + if ( this != &_eo ){ + eo1d::operator=( _eo ); + vector::operator=( _eo ); + } + return *this; + } + + /// dtor + virtual ~eoVector() {}; + + //@} + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual T gene( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual T& gene( unsigned _i ) { + if ( _i >= size() ) + throw out_of_range( "out_of_range when writing a gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void insertGene( unsigned _i, T _val ) { + if (_i <= size() ) { + vector::iterator i = begin()+_i; + insert( i, _val ); + } else { + throw out_of_range( "out_of_range when inserting a gene"); + } + }; + + /** Eliminates the gene at position _i + @exception out_of_range if _i is larger than EO´s size + */ + virtual void deleteGene( unsigned _i ) { + if (_i < this->size() ) { + vector::iterator i = this->begin()+_i; + this->erase( i ); + } else { + throw out_of_range( "out_of_range when deleting a gene"); + }; + }; + + /// methods that implement the EO protocol + virtual unsigned length() const { return this->size(); }; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoVector";}; + //@} + +}; + + +//____________________________ Some method implementation _______________________ + +// Ctors______________________________________________________________________________ +//____________________________________________________________________________________ +template +eoVector::eoVector( unsigned _size, eoRnd& _rnd ) + : eo1d(), vector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + *i = _rnd(); + } +}; + +//____________________________________________________________________________________ +template +eoVector::eoVector( istream& _is) + : eo1d(), vector( ){ + while (_is ) { + T tmp; + _is >> tmp; + push_back( tmp ); + } + +}; + +#endif diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h new file mode 100644 index 000000000..8f70e030c --- /dev/null +++ b/eo/src/eoXOver2.h @@ -0,0 +1,89 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoXOver2.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOXOVER2_h +#define _EOXOVER2_h + + +// for swap +#if defined( __BORLANDC__ ) +#include +#else +#include +#endif + +// EO includes +#include +#include + +/** 2-point crossover: takes the genes in the central section of two EOs +and interchanges it +*/ +template +class eoXOver2: public eoBinOp { +public: + /// + eoXOver2() + : eoBinOp< EOT >(){}; + + /// + virtual ~eoXOver2() {}; + + /// + virtual void operator()( EOT& _eo1, + EOT& _eo2 ) const { + unsigned len1 = _eo1.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + eoUniform uniform( 0, len ); + unsigned pos1 = uniform(), pos2 = uniform() ; + + applyAt( _eo1, _eo2, pos1, pos2 ); + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoXOver2";}; + //@} + +private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO + virtual void applyAt( EOT& _eo, EOT& _eo2, + unsigned _i, unsigned _j = 0) const { + + if ( _j < _i ) + swap( _i, _j ); + + unsigned len1 = _eo.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + + if ( (_j > len) || (_i> len ) ) + throw runtime_error( "xOver2: applying xOver past boundaries"); + + for ( unsigned i = _i; i < _j; i++ ) { + Type tmp = _eo.gene( i ); + _eo.gene( i ) = _eo2.gene( i ); + _eo2.gene( i ) = tmp ; + } + + } + +}; + +#endif diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw new file mode 100644 index 000000000..84d15c9a7 --- /dev/null +++ b/eo/win/EO.dsw @@ -0,0 +1,197 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "prueba"=.\prueba\prueba.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoaged"=.\t_eoaged.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eornd"=.\t_eornd.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eostring"=.\t_eostring.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_es"=.\t_es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eval"=.\t_eval.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_factory"=.\t_factory.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_opfactory"=.\t_opfactory.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_ops"=.\t_ops.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_opsel"=.\t_opsel.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_pop"=.\t_pop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_popops"=.\t_popops.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp new file mode 100644 index 000000000..55ad35260 --- /dev/null +++ b/eo/win/eo.dsp @@ -0,0 +1,140 @@ +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "eo___Win32_Debug" +# PROP Intermediate_Dir "eo___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\EO.h +# End Source File +# Begin Source File + +SOURCE=..\src\eo1d.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoFitness.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoNegExp.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoNormal.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoObject.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoProblem.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoRnd.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoUniform.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoVector.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/eolib.dsp b/eo/win/eolib.dsp new file mode 100644 index 000000000..1d3f26db1 --- /dev/null +++ b/eo/win/eolib.dsp @@ -0,0 +1,92 @@ +# Microsoft Developer Studio Project File - Name="eolib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eolib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eolib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eolib.mak" CFG="eolib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eolib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eolib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eolib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eolib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "eolib - Win32 Release" +# Name "eolib - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoaged.dsp b/eo/win/t_eoaged.dsp new file mode 100644 index 000000000..8e24a5bb6 --- /dev/null +++ b/eo/win/t_eoaged.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eoaged" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoaged - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoaged.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoaged.mak" CFG="t_eoaged - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoaged - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoaged - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoaged - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoaged - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoaged - Win32 Release" +# Name "t_eoaged - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eoaged.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoid.dsp b/eo/win/t_eoid.dsp new file mode 100644 index 000000000..fe618927b --- /dev/null +++ b/eo/win/t_eoid.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eoid" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoid - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoid.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoid.mak" CFG="t_eoid - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoid - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoid - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoid - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoid - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoid___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoid___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoid___Win32_Debug" +# PROP Intermediate_Dir "t_eoid___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoid - Win32 Release" +# Name "t_eoid - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eoid.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eornd.dsp b/eo/win/t_eornd.dsp new file mode 100644 index 000000000..60d3f8afc --- /dev/null +++ b/eo/win/t_eornd.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="t_eornd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eornd - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eornd.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eornd.mak" CFG="t_eornd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eornd - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eornd - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eornd - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eornd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eornd - Win32 Release" +# Name "t_eornd - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eornd.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoNegExp.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoNormal.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoRnd.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoUniform.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_eostring.dsp b/eo/win/t_eostring.dsp new file mode 100644 index 000000000..336a3a6f6 --- /dev/null +++ b/eo/win/t_eostring.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eostring" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eostring - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eostring.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eostring.mak" CFG="t_eostring - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eostring - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eostring - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eostring - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eostring - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eostring___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eostring___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eostring___Win32_Debug" +# PROP Intermediate_Dir "t_eostring___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eostring - Win32 Release" +# Name "t_eostring - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eostring.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp new file mode 100644 index 000000000..75e2602f6 --- /dev/null +++ b/eo/win/t_eovector.dsp @@ -0,0 +1,117 @@ +# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovector - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovector - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovector___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eovector___Win32_Debug" +# PROP Intermediate_Dir "t_eovector___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eovector - Win32 Release" +# Name "t_eovector - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eovector.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\EO.h +# End Source File +# Begin Source File + +SOURCE=..\src\eo1d.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoNormal.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoRnd.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoVector.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_es.dsp b/eo/win/t_es.dsp new file mode 100644 index 000000000..9e6f495c2 --- /dev/null +++ b/eo/win/t_es.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_es.mak" CFG="t_es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_es - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_es - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_es___Win32_Debug" +# PROP BASE Intermediate_Dir "t_es___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_es___Win32_Debug" +# PROP Intermediate_Dir "t_es___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_es - Win32 Release" +# Name "t_es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_es.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_opfactory.dsp b/eo/win/t_opfactory.dsp new file mode 100644 index 000000000..1c3c39b13 --- /dev/null +++ b/eo/win/t_opfactory.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_opfactory" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opfactory - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opfactory.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opfactory.mak" CFG="t_opfactory - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opfactory - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opfactory - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opfactory - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_opfactory - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opfactory___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opfactory___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opfactory___Win32_Debug" +# PROP Intermediate_Dir "t_opfactory___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_opfactory - Win32 Release" +# Name "t_opfactory - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opfactory.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_ops.dsp b/eo/win/t_ops.dsp new file mode 100644 index 000000000..aa034a050 --- /dev/null +++ b/eo/win/t_ops.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_ops" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_ops - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_ops.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_ops.mak" CFG="t_ops - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_ops - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_ops - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_ops - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_ops - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_ops___Win32_Debug" +# PROP BASE Intermediate_Dir "t_ops___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_ops___Win32_Debug" +# PROP Intermediate_Dir "t_ops___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_ops - Win32 Release" +# Name "t_ops - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_ops.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_opsel.dsp b/eo/win/t_opsel.dsp new file mode 100644 index 000000000..9b46323f2 --- /dev/null +++ b/eo/win/t_opsel.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_opsel" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opsel - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opsel.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opsel.mak" CFG="t_opsel - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opsel - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opsel - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opsel - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_opsel - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opsel___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opsel___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opsel___Win32_Debug" +# PROP Intermediate_Dir "t_opsel___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_opsel - Win32 Release" +# Name "t_opsel - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opsel.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_pop.dsp b/eo/win/t_pop.dsp new file mode 100644 index 000000000..34a66eaf3 --- /dev/null +++ b/eo/win/t_pop.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_pop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_pop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_pop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_pop.mak" CFG="t_pop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_pop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_pop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_pop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_pop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_pop___Win32_Debug" +# PROP BASE Intermediate_Dir "t_pop___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_pop___Win32_Debug" +# PROP Intermediate_Dir "t_pop___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_pop - Win32 Release" +# Name "t_pop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_pop.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_popops.dsp b/eo/win/t_popops.dsp new file mode 100644 index 000000000..b08d64cfc --- /dev/null +++ b/eo/win/t_popops.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_popops" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_popops - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_popops.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_popops.mak" CFG="t_popops - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_popops - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_popops - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_popops - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_popops - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_popops___Win32_Debug" +# PROP BASE Intermediate_Dir "t_popops___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_popops___Win32_Debug" +# PROP Intermediate_Dir "t_popops___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_popops - Win32 Release" +# Name "t_popops - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_popops.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 6e9ddda69c70fd967542c554bc7df193cf6b8452 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 1 Feb 1999 18:18:39 +0000 Subject: [PATCH 0002/2134] Remove old eoObject.cpp --- eo/src/eoObject.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 eo/src/eoObject.cpp diff --git a/eo/src/eoObject.cpp b/eo/src/eoObject.cpp deleted file mode 100644 index 0dadd2c34..000000000 --- a/eo/src/eoObject.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//----------------------------------------------------------------------------- -// eoObject.cpp -//----------------------------------------------------------------------------- - -#include - -//----------------------------------------------------------------------------- - -// Implementation of these objects - -//----------------------------------------------------------------------------- -/* -ostream & operator << ( ostream& _os, const eoObject& _o ) { - _o.printOn(_os); - return _os; -} - -//----------------------------------------------------------------------------- - -istream & operator >> ( istream& _is, eoObject& _o ) { - _o.readFrom(_is); - return _is; -} -*/ -//----------------------------------------------------------------------------- From 2cafee6bc6ef57f249e90a89d8739dda968fe140 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 3 Feb 1999 17:26:52 +0000 Subject: [PATCH 0003/2134] Chenges to EO --- eo/src/EO.h | 9 +++++++-- eo/src/Makefile.am | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index fb54364ba..84552dadb 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -74,6 +74,11 @@ public: */ bool invalid() const { return invalidFitness; } + /** Returns true if + @return true if the fitness is higher + */ + bool operator<(const EO& _eo2) { return fitness() < _eo2.fitness();} + /// Methods inherited from eoObject //@{ @@ -112,9 +117,9 @@ private: //----------------------------------------------------------------------------- -template bool operator<(const EO& eo1, const EO& eo2) +template bool operator<(const EO& _eo1, const EO& _eo2) { - return eo1.fitness() < eo2.fitness(); + return _eo1.fitness() < _eo2.fitness(); } //----------------------------------------------------------------------------- diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index ab0d64da9..f22bc9791 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -5,6 +5,7 @@ ############################################################################### lib_LTLIBRARIES = libeo.la -libeo_la_SOURCES = eoObject.cpp eoPersistent.cpp eoPrintable.cpp +libeo_la_SOURCES = +libeo_la_SOURCES = eoPersistent.cpp eoPrint eoPersistent.cpp eoPrintable.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h From e20fb6c7aaa84685da5ce215b53e24ebbe082596 Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 3 Feb 1999 17:28:07 +0000 Subject: [PATCH 0004/2134] some changes to start, new work on eoLottery --- eo/src/eo | 5 +++++ eo/src/eoBin.h | 53 +++++++++++++++++++++++++++++++--------------- eo/src/eoFitness.h | 14 ++++++------ eo/src/eoLottery.h | 23 +++++++++++++++----- 4 files changed, 66 insertions(+), 29 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 554bf70b6..7fb1ceb9a 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -42,9 +42,14 @@ #include // what's the matter with you? #include // what's the matter with you? +#include + //#include //----------------------------------------------------------------------------- #endif _eo_ +// Local Variables: +// mode:C++ +// End: diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 993e206d6..110fc7b6a 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -15,6 +15,9 @@ #include // eoUniform #include // eoRnd +//----------------------------------------------------------------------------- +/// eoBin: implementation of binary chromosome. +/// based on STL's bit_vector (vector) //----------------------------------------------------------------------------- template class eoBin: public EO, public bit_vector @@ -79,7 +82,8 @@ template class eoBinRandom: public eoMonOp /// The class name. string className() const { return "eoBinRandom"; } - /// + /// Randomizes a cromosome. + /// @param chrom The cromosome to be randomize. void operator()(Chrom& chrom) const { eoUniform uniform(0.0, 1.0); @@ -99,12 +103,13 @@ template class eoBinBitFlip: public eoMonOp /// The class name. string className() const { return "eoBinBitFlip"; } - /// - void eoBinBitFlip::operator()(Chrom& chrom) const + /// Change one bit. + /// @param chrom The cromosome which one bit is going to be changed. + void operator()(Chrom& chrom) const { - eoUniform uniform(0, chrom.size()); - unsigned pos = uniform(); - chrom[pos] = !chrom[pos]; + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; } }; @@ -116,12 +121,14 @@ template class eoBinMutation: public eoMonOp { public: /// (Default) Constructor. + /// @param _rate Rate of mutation. eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} /// The class name. string className() const { return "eoBinMutation"; } - /// + /// Mutate a chromosome. + /// @param chrom The chromosome to be mutated. void operator()(Chrom& chrom) const { for (unsigned i = 0; i < chrom.size(); i++) @@ -144,7 +151,8 @@ template class eoBinInversion: public eoMonOp /// The class name. string className() const { return "eoBinInversion"; } - /// + /// Inverts a range of bits in a binary chromosome. + /// @param chrom The chromosome whos bits are going to be inverted (a range). void operator()(Chrom& chrom) const { eoUniform uniform(0, chrom.size() + 1); @@ -167,7 +175,8 @@ template class eoBinNext: public eoMonOp /// The class name. string className() const { return "eoBinNext"; } - /// + /// Change the bit string x to be x+1. + /// @param chrom The chromosome to be added one. void operator()(Chrom& chrom) const { for (int i = chrom.size() - 1; i >= 0; i--) @@ -194,7 +203,8 @@ template class eoBinPrev: public eoMonOp /// The class name. string className() const { return "eoBinPrev"; } - /// + /// Change the bit string x to be x-1. + /// @param chrom The chromosome to be substracted one. void operator()(Chrom& chrom) const { for (int i = chrom.size() - 1; i >= 0; i--) @@ -206,11 +216,11 @@ template class eoBinPrev: public eoMonOp else { chrom[i] = 1; - continue; + continue; } } }; - + //----------------------------------------------------------------------------- // eoBinCrossover --> classic crossover //----------------------------------------------------------------------------- @@ -221,6 +231,9 @@ template class eoBinCrossover: public eoBinOp /// The class name. string className() const { return "eoBinCrossover"; } + /// 2-point crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. void operator()(Chrom& chrom1, Chrom& chrom2) const { eoUniform uniform(1, min(chrom1.size(), chrom2.size())); @@ -248,7 +261,9 @@ template class eoBinNxOver: public eoBinOp /// The class name. string className() const { return "eoBinNxOver"; } - /// + /// n-point crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. void operator()(Chrom& chrom1, Chrom& chrom2) const { unsigned max_size = min(chrom1.size(), chrom2.size()); @@ -312,7 +327,9 @@ template class eoBinGxOver: public eoBinOp /// The class name string className() const { return "eoBinGxOver"; } - /// + /// Gene crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. void operator()(Chrom& chrom1, Chrom& chrom2) const { unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; @@ -353,8 +370,8 @@ template class eoBinGxOver: public eoBinOp template class eoBinUxOver: public eoBinOp { public: - /// Constructor. - eoBinUxOver(const float _rate): rate(_rate) + /// (Default) Constructor. + eoBinUxOver(const float _rate = 0.5): rate(_rate) { if (rate < 0 || rate > 1) { @@ -366,7 +383,9 @@ template class eoBinUxOver: public eoBinOp /// The class name. string className() const { return "eoBinUxOver"; } - /// + /// Uniform crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. void operator()(Chrom& chrom1, Chrom& chrom2) const { unsigned min_size = min(chrom1.size(), chrom2.size()); diff --git a/eo/src/eoFitness.h b/eo/src/eoFitness.h index 596cab00e..c7d87c9cc 100644 --- a/eo/src/eoFitness.h +++ b/eo/src/eoFitness.h @@ -11,24 +11,24 @@ class eoFitness: public eoPersistent { public: + virtual operator float() const = 0; + virtual bool operator<(const eoFitness& other) const = 0; - - bool operator>(const eoFitness& other) const + + virtual bool operator>(const eoFitness& other) const { return !(*this < other || *this == other); } - - bool operator==(const eoFitness& other) const + + virtual bool operator==(const eoFitness& other) const { return !(other < *this || *this < other); } - bool operator!=(const eoFitness& other) const + virtual bool operator!=(const eoFitness& other) const { return other < *this || *this < other; } - - virtual operator float() const = 0; }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index ff079e700..bf378eed9 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -16,15 +16,25 @@ template class eoLottery: public eoSelect { public: - eoLottery(const float& rate = 1.0): eoLottery(rate) {} - - void operator()(const eoPop& pop, eoPop& breeders) + /// (Default) Constructor. + eoLottery(const float& _rate = 1.0): rate(_rate) {} + + /// + void operator()(const eoPop& pop, eoPop& breeders) const { // scores of chromosomes vector score(pop.size()); // calculates accumulated scores for chromosomes + transform(pop.begin(), pop.end(), score.begin(), fitness); + + for (unsigned i = 0; i < pop.size(); i++) + score[i] = pop[i].fitness(); + + + + float sum = accumulate(score.begin(), score.end(), MINFLOAT); transform(score.begin(), score.end(), score.begin(), bind2nd(divides(), sum)); @@ -32,7 +42,7 @@ template class eoLottery: public eoSelect // generates random numbers vector random(pop.size()); - generate(random.begin(), random.end(), Uniform(0,1)); + generate(random.begin(), random.end(), eoUniform(0,1)); sort(random.begin(), random.end(), less()); // selection of chromosomes @@ -49,10 +59,13 @@ template class eoLottery: public eoSelect if (score_index < pop.size()) score_index++; else - fill_n(back_insert_iterator(breeders), + fill_n(back_insert_iterator >(breeders), num_chroms - breeders.size(), pop.back()); } while (breeders.size() < num_chroms); } + + private: + float rate; // selection rate }; //----------------------------------------------------------------------------- From b5cb78b70f8ffd8ee61230534cd0455fa704b9b8 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 3 Feb 1999 18:34:20 +0000 Subject: [PATCH 0005/2134] Changes to eo and opsel to quash compiling bugs --- eo/src/EO.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 84552dadb..e9ff84e75 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -77,7 +77,7 @@ public: /** Returns true if @return true if the fitness is higher */ - bool operator<(const EO& _eo2) { return fitness() < _eo2.fitness();} + bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness();} /// Methods inherited from eoObject //@{ @@ -117,12 +117,4 @@ private: //----------------------------------------------------------------------------- -template bool operator<(const EO& _eo1, const EO& _eo2) -{ - return _eo1.fitness() < _eo2.fitness(); -} - -//----------------------------------------------------------------------------- - - #endif EO_H From a44af3e7f462ebf52dcbbea33eccd2c270889bdc Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 3 Feb 1999 20:42:57 +0000 Subject: [PATCH 0006/2134] changes on eoLottery --- eo/src/eoLottery.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index bf378eed9..28b988b26 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -7,10 +7,14 @@ //----------------------------------------------------------------------------- -#include +#include // MINFLOAT +#include // accumulate +#include // eoPop eoSelect //----------------------------------------------------------------------------- -// eoLottery +/// eoLottery: a selection method. +/// requires that the fitness type of the chromosome inherits from eoFitness +/// or have a cast to float implemented //----------------------------------------------------------------------------- template class eoLottery: public eoSelect @@ -18,7 +22,7 @@ template class eoLottery: public eoSelect public: /// (Default) Constructor. eoLottery(const float& _rate = 1.0): rate(_rate) {} - + /// void operator()(const eoPop& pop, eoPop& breeders) const { @@ -26,15 +30,9 @@ template class eoLottery: public eoSelect vector score(pop.size()); // calculates accumulated scores for chromosomes - - transform(pop.begin(), pop.end(), score.begin(), fitness); - for (unsigned i = 0; i < pop.size(); i++) score[i] = pop[i].fitness(); - - - - + float sum = accumulate(score.begin(), score.end(), MINFLOAT); transform(score.begin(), score.end(), score.begin(), bind2nd(divides(), sum)); @@ -44,7 +42,7 @@ template class eoLottery: public eoSelect vector random(pop.size()); generate(random.begin(), random.end(), eoUniform(0,1)); sort(random.begin(), random.end(), less()); - + // selection of chromosomes unsigned score_index = 0; // position in score vector unsigned random_index = 0; // position in random vector @@ -63,7 +61,7 @@ template class eoLottery: public eoSelect num_chroms - breeders.size(), pop.back()); } while (breeders.size() < num_chroms); } - + private: float rate; // selection rate }; From 57e734fdf2e40561a190dabad737bb2a1cd66880 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 4 Feb 1999 17:38:39 +0000 Subject: [PATCH 0007/2134] adding acconfig.h --- eo/acconfig.h | 2 ++ eo/src/Makefile.am | 3 +-- eo/src/eoPersistent.cpp | 10 +++++----- eo/src/eoPersistent.h | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 eo/acconfig.h diff --git a/eo/acconfig.h b/eo/acconfig.h new file mode 100644 index 000000000..e1b82a582 --- /dev/null +++ b/eo/acconfig.h @@ -0,0 +1,2 @@ +#undef PACKAGE +#undef VERSION diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index f22bc9791..89b02cc0e 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -5,7 +5,6 @@ ############################################################################### lib_LTLIBRARIES = libeo.la -libeo_la_SOURCES = -libeo_la_SOURCES = eoPersistent.cpp eoPrint eoPersistent.cpp eoPrintable.cpp +libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 5ed66f3ee..174aee622 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -2,9 +2,9 @@ //Implementation of these objects -//----------------------------------------------------------------------------- - +//----------------------------------------------------------------------------- + istream & operator >> ( istream& _is, eoPersistent& _o ) { - _o.readFrom(_is); - return _is; -}; \ No newline at end of file + _o.readFrom(_is); + return _is; +}; diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index cf2c2ba2b..964134121 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -17,7 +17,7 @@ const unsigned MAXLINELENGTH=1024; //----------------------------------------------------------------------------- #include // istream, ostream -#include // para string +#include // para string //----------------------------------------------------------------------------- #include From 5247c976ce6c56b5dc43e9634f8626efa1e29ad9 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 5 Feb 1999 16:34:00 +0000 Subject: [PATCH 0008/2134] eoLottery finished --- eo/src/EO.h | 11 ++++++----- eo/src/Makefile.am | 2 +- eo/src/eoLottery.h | 9 ++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index e9ff84e75..16b332131 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -11,9 +11,9 @@ //----------------------------------------------------------------------------- #include // runtime_error - -#include -#include + +#include +#include //----------------------------------------------------------------------------- /** EO is a base class for evolvable objects, that is, the subjects of evolution. @@ -40,7 +40,7 @@ public: */ EO( istream& _is ) { _is >> repFitness; - validFitness = true; + invalidFitness = false; }; /// Copy ctor @@ -53,7 +53,8 @@ public: Fitness fitness() const { if (invalid()) - throw runtime_error("invalid fitness"); + //throw runtime_error("invalid fitness"); + cout << "invalid fitness" << endl; return repFitness; } diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 89b02cc0e..0bd70623b 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -7,4 +7,4 @@ lib_LTLIBRARIES = libeo.la libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 28b988b26..acd8d60f4 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -13,8 +13,7 @@ //----------------------------------------------------------------------------- /// eoLottery: a selection method. -/// requires that the fitness type of the chromosome inherits from eoFitness -/// or have a cast to float implemented +/// requires Chrom::Fitness to be float castable //----------------------------------------------------------------------------- template class eoLottery: public eoSelect @@ -28,11 +27,11 @@ template class eoLottery: public eoSelect { // scores of chromosomes vector score(pop.size()); - + // calculates accumulated scores for chromosomes for (unsigned i = 0; i < pop.size(); i++) - score[i] = pop[i].fitness(); - + score[i] = static_cast(pop[i].fitness()); + float sum = accumulate(score.begin(), score.end(), MINFLOAT); transform(score.begin(), score.end(), score.begin(), bind2nd(divides(), sum)); From 46e19b13c393683679e1af8ec1eaaafb55181879 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 5 Feb 1999 18:25:28 +0000 Subject: [PATCH 0009/2134] adding eoInsertion --- eo/Makefile.am | 1 + eo/doc/Makefile.am | 7 +++++++ eo/src/Makefile.am | 2 +- eo/src/eo | 15 ++++++++++---- eo/src/eoInsertion.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ eo/src/eoPopOps.h | 13 +++++++----- 6 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 eo/doc/Makefile.am create mode 100644 eo/src/eoInsertion.h diff --git a/eo/Makefile.am b/eo/Makefile.am index cb4127aa7..1f6b08014 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -5,3 +5,4 @@ ############################################################################### SUBDIRS = src test + diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am new file mode 100644 index 000000000..d2936d58b --- /dev/null +++ b/eo/doc/Makefile.am @@ -0,0 +1,7 @@ +############################################################################### +## +## Makefile.am for eo/doc +## +############################################################################### + +############################################################################### diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 0bd70623b..eaa8b4f63 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -7,4 +7,4 @@ lib_LTLIBRARIES = libeo.la libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h diff --git a/eo/src/eo b/eo/src/eo index 7fb1ceb9a..0bd7f3bf8 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -39,12 +39,19 @@ #include #include -#include // what's the matter with you? -#include // what's the matter with you? - #include -//#include +#include + + + +//----------------------------------------------------------------------------- +// to be continued ... +//----------------------------------------------------------------------------- + +#include // what's the matter with you? +#include // what's the matter with you? +// #include //----------------------------------------------------------------------------- diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h new file mode 100644 index 000000000..f05c29c53 --- /dev/null +++ b/eo/src/eoInsertion.h @@ -0,0 +1,49 @@ +//----------------------------------------------------------------------------- +// eoInsertion.h +//----------------------------------------------------------------------------- + +#ifndef eoInsertion_h +#define eoInsertion_h + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +// eoInsertion +//----------------------------------------------------------------------------- + +template class eoInsertion: public eoMerge +{ + public: + /// (Default) Constructor. + eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} + + /// + /// @param breeders + /// @param pop + void operator()(const eoPop& breeders, eoPop& pop) + { + cout << pop << endl; + + sort(pop.begin(), pop.end()); + + cout << pop << endl; + + cout << "cte = " + << (int)(pop.size() * (rate() - 1) - breeders.size()) << endl; + + pop.erase(pop.end() + (int)(pop.size() * (rate() - 1) - breeders.size()), + pop.end()); + + cout << "cte = " + << (int)(pop.size() * (rate() - 1) - breeders.size()) << endl; + + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); + } +}; + +//----------------------------------------------------------------------------- + +#endif eoInsertion_h diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 7eabb475b..cc0a10f93 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -8,7 +8,6 @@ #ifndef _EOPOPOPS_H #define _EOPOPOPS_H - using namespace std; /** @@ -99,13 +98,13 @@ class eoMerge: public eoObject{ * @param breeders Tranformed individuals. * @param pop The original population at the begining, the result at the end */ - virtual operator () ( const eoPop& breeders, eoPop& pop ) = 0; + virtual void operator () ( const eoPop& breeders, eoPop& pop ) = 0; - /** @name Methods from eoObject */ + /** @name Methods from eoObject */ //@{ - /** readFrom and printOn are not overriden + /** readFrom and printOn are not overriden */ - /** Inherited from eoObject. Returns the class name. + /** Inherited from eoObject. Returns the class name. @see eoObject */ string className() const {return "eoMerge";}; @@ -113,6 +112,10 @@ class eoMerge: public eoObject{ /// Return the rate to be selected from the original population float rate() const { return rep_rate; } + + /// Set the rate to be obtained after replacement. + /// @param _rate The rate. + void rate(const float& _rate) { rep_rate = _rate; } private: float rep_rate; From 93d15b9778ced0016ea7bfa79fc113c4074d0abc Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 8 Feb 1999 12:43:52 +0000 Subject: [PATCH 0010/2134] eoBin/eoBinOp division --- eo/src/Makefile.am | 2 +- eo/src/eo | 1 + eo/src/eoBin.h | 332 ------------------------------------------- eo/src/eoBinOp.h | 344 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 346 insertions(+), 333 deletions(-) create mode 100644 eo/src/eoBinOp.h diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index eaa8b4f63..645d84b09 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -7,4 +7,4 @@ lib_LTLIBRARIES = libeo.la libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoBinOp.h diff --git a/eo/src/eo b/eo/src/eo index 0bd7f3bf8..73fa67531 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -38,6 +38,7 @@ #include #include +#include #include diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 110fc7b6a..048ce5fef 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -11,9 +11,6 @@ #include // bit_vector #include // string #include // EO -#include // eoMonOp -#include // eoUniform -#include // eoRnd //----------------------------------------------------------------------------- /// eoBin: implementation of binary chromosome. @@ -73,334 +70,5 @@ template class eoBin: public EO, public bit_vector }; //----------------------------------------------------------------------------- -// eoBinRandom --> mofify a chromosome in a random way -//----------------------------------------------------------------------------- - -template class eoBinRandom: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinRandom"; } - - /// Randomizes a cromosome. - /// @param chrom The cromosome to be randomize. - void operator()(Chrom& chrom) const - { - eoUniform uniform(0.0, 1.0); - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; - } -}; - - -//----------------------------------------------------------------------------- -// eoBinBitFlip --> chages a bit -//----------------------------------------------------------------------------- - -template class eoBinBitFlip: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinBitFlip"; } - - /// Change one bit. - /// @param chrom The cromosome which one bit is going to be changed. - void operator()(Chrom& chrom) const - { - eoUniform uniform(0.0, 1.0); - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; - } -}; - -//----------------------------------------------------------------------------- -// eoBinMutation --> classical mutation -//----------------------------------------------------------------------------- - -template class eoBinMutation: public eoMonOp -{ - public: - /// (Default) Constructor. - /// @param _rate Rate of mutation. - eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} - - /// The class name. - string className() const { return "eoBinMutation"; } - - /// Mutate a chromosome. - /// @param chrom The chromosome to be mutated. - void operator()(Chrom& chrom) const - { - for (unsigned i = 0; i < chrom.size(); i++) - if (uniform() < rate) - chrom[i] = !chrom[i]; - } - - private: - double rate; - mutable eoUniform uniform; -}; - -//----------------------------------------------------------------------------- -// eoBinInversion --> inverts the bits of the chromosome between an interval -//----------------------------------------------------------------------------- - -template class eoBinInversion: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinInversion"; } - - /// Inverts a range of bits in a binary chromosome. - /// @param chrom The chromosome whos bits are going to be inverted (a range). - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size() + 1); - - unsigned u1 = uniform(), u2; - do u2 = uniform(); while (u1 == u2); - unsigned r1 = min(u1, u2), r2 = max(u1, u2); - - reverse(chrom.begin() + r1, chrom.begin() + r2); - } -}; - -//----------------------------------------------------------------------------- -// eoBinNext --> next binary value -//----------------------------------------------------------------------------- - -template class eoBinNext: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinNext"; } - - /// Change the bit string x to be x+1. - /// @param chrom The chromosome to be added one. - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - continue; - } - else - { - chrom[i] = 1; - break; - } - } -}; - -//----------------------------------------------------------------------------- -// eoBinPrev --> previos binary value -//----------------------------------------------------------------------------- - -template class eoBinPrev: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinPrev"; } - - /// Change the bit string x to be x-1. - /// @param chrom The chromosome to be substracted one. - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - break; - } - else - { - chrom[i] = 1; - continue; - } - } -}; - -//----------------------------------------------------------------------------- -// eoBinCrossover --> classic crossover -//----------------------------------------------------------------------------- - -template class eoBinCrossover: public eoBinOp -{ - public: - /// The class name. - string className() const { return "eoBinCrossover"; } - - /// 2-point crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - eoUniform uniform(1, min(chrom1.size(), chrom2.size())); - swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); - } -}; - -//----------------------------------------------------------------------------- -// eoBinNxOver --> n-point crossover -//----------------------------------------------------------------------------- - -template class eoBinNxOver: public eoBinOp -{ - public: - /// (Defualt) Constructor. - eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) - { - if (num_points < 1) - { - cerr << "NxOver --> invalid number of points " << num_points << endl; - exit(EXIT_FAILURE); - } - } - - /// The class name. - string className() const { return "eoBinNxOver"; } - - /// n-point crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_size = min(chrom1.size(), chrom2.size()); - unsigned max_points = min(max_size - 1, num_points); - - vector points(max_size, false); - eoUniform uniform(1, max_size); - - // select ranges of bits to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - max_points--; - } - } while (max_points); - - - // swap bits between chromosomes - bool change = false; - for (unsigned bit = 1; bit < points.size(); bit++) - { - if (points[bit]) - change = !change; - - if (change) - swap(chrom1[bit], chrom2[bit]); - } - } - - private: - unsigned num_points; -}; - -//----------------------------------------------------------------------------- -// eoBinGxOver --> gene crossover -//----------------------------------------------------------------------------- - -template class eoBinGxOver: public eoBinOp -{ - public: - /// Constructor. - eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): - gene_size(_gene_size), num_points(_num_points) - { - if (gene_size < 1) - { - cerr << "GxOver --> invalid gene size " << gene_size << endl; - exit(EXIT_FAILURE); - } - if (num_points < 1) - { - cerr << "GxOver --> invalid number of points " << num_points << endl; - exit(EXIT_FAILURE); - } - } - - /// The class name - string className() const { return "eoBinGxOver"; } - - /// Gene crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; - unsigned cut_genes = min(max_genes, num_points); - - vector points(max_genes, false); - eoUniform uniform(0, max_genes); - - // selects genes to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - cut_genes--; - } - } while (cut_genes); - - // swaps genes - for (unsigned i = 0; i < points.size(); i++) - if (points[i]) - swap_ranges(chrom1.begin() + i * gene_size, - chrom1.begin() + i * gene_size + gene_size, - chrom2.begin() + i * gene_size); - } - - private: - unsigned gene_size; - unsigned num_points; -}; - -//----------------------------------------------------------------------------- -// eoBinUxOver --> uniform crossover -//----------------------------------------------------------------------------- - -template class eoBinUxOver: public eoBinOp -{ - public: - /// (Default) Constructor. - eoBinUxOver(const float _rate = 0.5): rate(_rate) - { - if (rate < 0 || rate > 1) - { - cerr << "UxOver --> invalid rate " << rate << endl; - exit(EXIT_FAILURE); - } - } - - /// The class name. - string className() const { return "eoBinUxOver"; } - - /// Uniform crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned min_size = min(chrom1.size(), chrom2.size()); - eoUniform uniform(0, 1); - - for (unsigned bit = 0; bit < min_size; bit++) - if (uniform() < rate) - swap(chrom1[bit], chrom2[bit]); - } - - public: - float rate; -}; - -//----------------------------------------------------------------------------- - #endif eoBin_h diff --git a/eo/src/eoBinOp.h b/eo/src/eoBinOp.h new file mode 100644 index 000000000..67a8403d6 --- /dev/null +++ b/eo/src/eoBinOp.h @@ -0,0 +1,344 @@ +//----------------------------------------------------------------------------- +// eoBinOp.h +//----------------------------------------------------------------------------- + +#ifndef eoBinOp_h +#define eoBinOp_h + +//----------------------------------------------------------------------------- + +#include // eoBin +#include // eoMonOp + +//----------------------------------------------------------------------------- +// eoBinRandom --> mofify a chromosome in a random way +//----------------------------------------------------------------------------- + +template class eoBinRandom: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinRandom"; } + + /// Randomizes a cromosome. + /// @param chrom The cromosome to be randomize. + void operator()(Chrom& chrom) const + { + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; + } +}; + + +//----------------------------------------------------------------------------- +// eoBinBitFlip --> chages a bit +//----------------------------------------------------------------------------- + +template class eoBinBitFlip: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinBitFlip"; } + + /// Change one bit. + /// @param chrom The cromosome which one bit is going to be changed. + void operator()(Chrom& chrom) const + { + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; + } +}; + +//----------------------------------------------------------------------------- +// eoBinMutation --> classical mutation +//----------------------------------------------------------------------------- + +template class eoBinMutation: public eoMonOp +{ + public: + /// (Default) Constructor. + /// @param _rate Rate of mutation. + eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} + + /// The class name. + string className() const { return "eoBinMutation"; } + + /// Mutate a chromosome. + /// @param chrom The chromosome to be mutated. + void operator()(Chrom& chrom) const + { + for (unsigned i = 0; i < chrom.size(); i++) + if (uniform() < rate) + chrom[i] = !chrom[i]; + } + + private: + double rate; + mutable eoUniform uniform; +}; + +//----------------------------------------------------------------------------- +// eoBinInversion --> inverts the bits of the chromosome between an interval +//----------------------------------------------------------------------------- + +template class eoBinInversion: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinInversion"; } + + /// Inverts a range of bits in a binary chromosome. + /// @param chrom The chromosome whos bits are going to be inverted (a range). + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size() + 1); + + unsigned u1 = uniform(), u2; + do u2 = uniform(); while (u1 == u2); + unsigned r1 = min(u1, u2), r2 = max(u1, u2); + + reverse(chrom.begin() + r1, chrom.begin() + r2); + } +}; + +//----------------------------------------------------------------------------- +// eoBinNext --> next binary value +//----------------------------------------------------------------------------- + +template class eoBinNext: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinNext"; } + + /// Change the bit string x to be x+1. + /// @param chrom The chromosome to be added one. + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } + } +}; + +//----------------------------------------------------------------------------- +// eoBinPrev --> previos binary value +//----------------------------------------------------------------------------- + +template class eoBinPrev: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinPrev"; } + + /// Change the bit string x to be x-1. + /// @param chrom The chromosome to be substracted one. + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } + } +}; + +//----------------------------------------------------------------------------- +// eoBinCrossover --> classic crossover +//----------------------------------------------------------------------------- + +template class eoBinCrossover: public eoBinOp +{ + public: + /// The class name. + string className() const { return "eoBinCrossover"; } + + /// 2-point crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + eoUniform uniform(1, min(chrom1.size(), chrom2.size())); + swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); + } +}; + +//----------------------------------------------------------------------------- +// eoBinNxOver --> n-point crossover +//----------------------------------------------------------------------------- + +template class eoBinNxOver: public eoBinOp +{ + public: + /// (Defualt) Constructor. + eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) + { + if (num_points < 1) + { + cerr << "NxOver --> invalid number of points " << num_points << endl; + exit(EXIT_FAILURE); + } + } + + /// The class name. + string className() const { return "eoBinNxOver"; } + + /// n-point crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_size = min(chrom1.size(), chrom2.size()); + unsigned max_points = min(max_size - 1, num_points); + + vector points(max_size, false); + eoUniform uniform(1, max_size); + + // select ranges of bits to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + max_points--; + } + } while (max_points); + + + // swap bits between chromosomes + bool change = false; + for (unsigned bit = 1; bit < points.size(); bit++) + { + if (points[bit]) + change = !change; + + if (change) + swap(chrom1[bit], chrom2[bit]); + } + } + + private: + unsigned num_points; +}; + +//----------------------------------------------------------------------------- +// eoBinGxOver --> gene crossover +//----------------------------------------------------------------------------- + +template class eoBinGxOver: public eoBinOp +{ + public: + /// Constructor. + eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + gene_size(_gene_size), num_points(_num_points) + { + if (gene_size < 1) + { + cerr << "GxOver --> invalid gene size " << gene_size << endl; + exit(EXIT_FAILURE); + } + if (num_points < 1) + { + cerr << "GxOver --> invalid number of points " << num_points << endl; + exit(EXIT_FAILURE); + } + } + + /// The class name + string className() const { return "eoBinGxOver"; } + + /// Gene crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = min(max_genes, num_points); + + vector points(max_genes, false); + eoUniform uniform(0, max_genes); + + // selects genes to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } + } while (cut_genes); + + // swaps genes + for (unsigned i = 0; i < points.size(); i++) + if (points[i]) + swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); + } + + private: + unsigned gene_size; + unsigned num_points; +}; + +//----------------------------------------------------------------------------- +// eoBinUxOver --> uniform crossover +//----------------------------------------------------------------------------- + +template class eoBinUxOver: public eoBinOp +{ + public: + /// (Default) Constructor. + eoBinUxOver(const float _rate = 0.5): rate(_rate) + { + if (rate < 0 || rate > 1) + { + cerr << "UxOver --> invalid rate " << rate << endl; + exit(EXIT_FAILURE); + } + } + + /// The class name. + string className() const { return "eoBinUxOver"; } + + /// Uniform crossover for binary chromosomes. + /// @param chrom1 The first chromosome. + /// @param chrom2 The first chromosome. + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned min_size = min(chrom1.size(), chrom2.size()); + eoUniform uniform(0, 1); + + for (unsigned bit = 0; bit < min_size; bit++) + if (uniform() < rate) + swap(chrom1[bit], chrom2[bit]); + } + + public: + float rate; +}; + +//----------------------------------------------------------------------------- + + +#endif eoBinOp_h From 3d7d4a7a51098869069cc37b4a2ace453a881536 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 8 Feb 1999 14:15:11 +0000 Subject: [PATCH 0011/2134] learning about autoconf: eoBin and bvector.h --- eo/Makefile.am | 1 - eo/acconfig.h | 1 + eo/configure.in | 6 ++++++ eo/src/Makefile.am | 1 + eo/src/eoBinOp.h | 5 ++--- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 1f6b08014..cb4127aa7 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -5,4 +5,3 @@ ############################################################################### SUBDIRS = src test - diff --git a/eo/acconfig.h b/eo/acconfig.h index e1b82a582..498212945 100644 --- a/eo/acconfig.h +++ b/eo/acconfig.h @@ -1,2 +1,3 @@ #undef PACKAGE #undef VERSION +#undef HAVE_BIT_VECTOR diff --git a/eo/configure.in b/eo/configure.in index 644bf1464..0fcbd1c0e 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -2,7 +2,13 @@ AC_INIT(src/eo) AM_INIT_AUTOMAKE(eo, 0.0.0) +AM_CONFIG_HEADER(config.h:config.in) + AC_PROG_CXX + +AC_CHECK_HEADERS(bvector.h) +AC_EGREP_HEADER(bit_vector, bvector.h, AC_DEFINE(HAVE_BIT_VECTOR)) + AM_PROG_LIBTOOL AM_MAINTAINER_MODE diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 645d84b09..6bb9f723f 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -6,5 +6,6 @@ lib_LTLIBRARIES = libeo.la libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp + libeoincdir = $(includedir)/eo libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoBinOp.h diff --git a/eo/src/eoBinOp.h b/eo/src/eoBinOp.h index 67a8403d6..4708f2abc 100644 --- a/eo/src/eoBinOp.h +++ b/eo/src/eoBinOp.h @@ -7,8 +7,8 @@ //----------------------------------------------------------------------------- -#include // eoBin -#include // eoMonOp +#include // eoBin +#include // eoMonOp //----------------------------------------------------------------------------- // eoBinRandom --> mofify a chromosome in a random way @@ -340,5 +340,4 @@ template class eoBinUxOver: public eoBinOp //----------------------------------------------------------------------------- - #endif eoBinOp_h From 6e9bdc8b2ea0798c7f8f39b3e66749e97984420d Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 8 Feb 1999 16:11:55 +0000 Subject: [PATCH 0012/2134] some bug fix --- eo/configure.in | 2 +- eo/src/eoBin.h | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 0fcbd1c0e..d28c58ac5 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -6,7 +6,7 @@ AM_CONFIG_HEADER(config.h:config.in) AC_PROG_CXX -AC_CHECK_HEADERS(bvector.h) +AC_CHECK_HEADERS(vector bvector.h) AC_EGREP_HEADER(bit_vector, bvector.h, AC_DEFINE(HAVE_BIT_VECTOR)) AM_PROG_LIBTOOL diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 048ce5fef..148a55ab8 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -8,7 +8,21 @@ //----------------------------------------------------------------------------- #include // ostream, istream -#include // bit_vector +#include // bind2nd + +#ifdef HAVE_BVECTOR_H +#include +#error "incluyo bvector.h" +#elseif +#ifdef HAVE_VECTOR +#include +#define bit_vector vector +#error "incluyo vector" +#elseif +#error "are you kidding?" +#endif +#endif + #include // string #include // EO From 2141b13f9d1dd041e0487c3e2949e0e0e3655d32 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 8 Feb 1999 16:13:26 +0000 Subject: [PATCH 0013/2134] New files added and fixes for VC++ --- eo/src/eoDrawable.h | 47 +++++++++++++++++++++++ eo/src/eoLottery.h | 2 + eo/src/eoOpSelMason.h | 73 ++++++++++++++++++++++++++++++++++++ eo/src/eoOpSelector.h | 2 +- eo/src/eoProportionalOpSel.h | 15 +++++--- eo/win/EO.dsw | 24 ++++++++++++ eo/win/t_opfactory.dsp | 12 +++--- 7 files changed, 162 insertions(+), 13 deletions(-) create mode 100644 eo/src/eoDrawable.h create mode 100644 eo/src/eoOpSelMason.h diff --git a/eo/src/eoDrawable.h b/eo/src/eoDrawable.h new file mode 100644 index 000000000..72885dca2 --- /dev/null +++ b/eo/src/eoDrawable.h @@ -0,0 +1,47 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDrawable.h +// (c) GeNeura Team, 1999 +//----------------------------------------------------------------------------- + +#ifndef EODRAWABLE_H +#define EODRAWABLE_H + +//----------------------------------------------------------------------------- + +using namespace std; + +//----------------------------------------------------------------------------- +// eoDrawable +//----------------------------------------------------------------------------- + +/** eoDrawable is a template class that adds a drawing interface to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +eoDrawables can be drawn on any two-dimensional surface; it can be added to any +object with above characteristics. +@see eoObject +*/ +template +class eoDrawable +{ + public: + /// Main ctor from an already built Object. + eoDrawable( const Object& _o): Object( _o ){}; + + /// Copy constructor. + eoDrawable( const eoDrawable& _d): Object( _d ){}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoDrawable() {}; + + + /**Draws the object. It must be redefined in any subclass, it´s impossible + to have a general drawing method + @param _x, _y coorinates */ + virtual void draw( unsigned _x, unsigned _y) = 0; + +}; + +#endif EODRAWABLE_H diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index acd8d60f4..f2dcefb66 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -6,6 +6,8 @@ #define eoLottery_h //----------------------------------------------------------------------------- + +#include #include // MINFLOAT #include // accumulate diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h new file mode 100644 index 000000000..2497433d4 --- /dev/null +++ b/eo/src/eoOpSelMason.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpSelMason.h +// (c) GeNeura Team, 1999 +//----------------------------------------------------------------------------- + +#ifndef _EOOPSELMASON_H +#define _EOOPSELMASON_H + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- + +/** EO Mason, or builder, for operator selectors. A builder must allocate memory +to the objects it builds, and then deallocate it when it gets out of scope*/ +template +class eoOpSelMason: public eoFactory > { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoOpSelMason( ) {} + + /// destructor + virtual ~eoOpSelMason() {} + //@} + + /** Factory methods: creates an object from an istream, reading from + it whatever is needed to create the object. The format is + opSelClassName\\ + rate 1 operator1\\ + rate 2 operator2\\ + ...\\ + Stores all operators built in a database (#allocMap#), so that somebody + can destroy them later. The Mason is in charge or destroying the operators, + since the built object can´t do it itself. The objects built must be destroyed + from outside, using the #destroy# method + */ + virtual eoOpSelector* make(istream& _is) { + string opSelName; + _is >> opSelName; + eoMonOpFactory selMaker; + // read operator rate and name + while ( _is ) { + float rate; + _is >> rate; + + + // Create an stream + strstream s0; + eoMonOp* op0 = selMaker.make( s0 ); + } + + } + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual string className() const { return "eoFactory"; } + + /** Read and print are left without implementation */ + //@} + +private: + map*,vector* > > allocMap; +}; + + +#endif _EOFACTORY_H diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 651270594..4a8aae68c 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -38,7 +38,7 @@ public: modified or whatever @param _id a previously assigned ID @throw runtime_exception if the ID does not exist*/ - virtual eoOp& getOp( ID _id ) = 0; + virtual const eoOp& getOp( ID _id ) = 0; /** Remove an operator from the operator set @param _id a previously assigned ID diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index 033e6897d..7f14581f5 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -26,11 +26,11 @@ Operators are represented as pairs (proportion,operator) */ template class eoProportionalOpSel: public eoOpSelector, - public multimap*,greater > + public multimap*,greater > { public: - typedef multimap*,greater > MMF; + typedef multimap*,greater > MMF; /// default ctor eoProportionalOpSel() @@ -43,13 +43,14 @@ public: modified or whatever @param _id a previously assigned ID @throw runtime_error if the ID does not exist*/ - virtual eoOp& getOp( ID _id ) { + virtual const eoOp& getOp( ID _id ) { MMF::iterator i=begin(); ID j = 1; while ( (i++!=end()) && (j++ != _id) ); if ( i == end() ) throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); return *(i->second); + //return i->second; } /** add an operator to the operator set @@ -100,6 +101,7 @@ public: if ( i == end() ) throw runtime_error( "Operator not found in eoProportionalOpSelector" ); return *(i->second); + //return i->second; } /// Methods inherited from eoObject @@ -115,9 +117,10 @@ public: base classes, so you don´t have to worry about, for instance, fitness. @param _s the ostream in which things are written*/ virtual void printOn( ostream& _s ) const{ - for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { - _s << i->first << "\t" << i->second << endl; - } + _s << className() << endl; + for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { + _s << i->first << "\t" << *(i->second )<< endl; + } } diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw index 84d15c9a7..8ef52e626 100644 --- a/eo/win/EO.dsw +++ b/eo/win/EO.dsw @@ -39,6 +39,18 @@ Package=<4> ############################################################################### +Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> Package=<5> @@ -123,6 +135,18 @@ Package=<4> ############################################################################### +Project: "t_lottery"=.\t_lottery.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_opfactory"=.\t_opfactory.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/t_opfactory.dsp b/eo/win/t_opfactory.dsp index 1c3c39b13..21e392abc 100644 --- a/eo/win/t_opfactory.dsp +++ b/eo/win/t_opfactory.dsp @@ -48,8 +48,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "t_opfactory - Win32 Debug" @@ -64,16 +64,16 @@ LINK32=link.exe # PROP Intermediate_Dir "t_opfactory___Win32_Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF From 204b0bcac835821b74f15b4b2f16a247bc62266d Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 8 Feb 1999 18:47:07 +0000 Subject: [PATCH 0014/2134] looking for a bug in eoInsertion --- eo/configure.in | 5 ----- eo/src/eoBin.h | 26 ++++++++++---------------- eo/src/eoInsertion.h | 41 ++++++++++++++++++++++------------------- 3 files changed, 32 insertions(+), 40 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index d28c58ac5..98cb2e3d1 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -2,13 +2,8 @@ AC_INIT(src/eo) AM_INIT_AUTOMAKE(eo, 0.0.0) -AM_CONFIG_HEADER(config.h:config.in) - AC_PROG_CXX -AC_CHECK_HEADERS(vector bvector.h) -AC_EGREP_HEADER(bit_vector, bvector.h, AC_DEFINE(HAVE_BIT_VECTOR)) - AM_PROG_LIBTOOL AM_MAINTAINER_MODE diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 148a55ab8..2382b8cef 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -7,24 +7,18 @@ //----------------------------------------------------------------------------- -#include // ostream, istream -#include // bind2nd +#include // ostream, istream +#include // bind2nd -#ifdef HAVE_BVECTOR_H -#include -#error "incluyo bvector.h" -#elseif -#ifdef HAVE_VECTOR -#include -#define bit_vector vector -#error "incluyo vector" -#elseif -#error "are you kidding?" -#endif -#endif +#if defined( _MSC_VER ) || defined( __BCPLUSPLUS__ ) // +#include // +typedef vector bit_vector; // bit_vector +#else // +#include // +#endif // -#include // string -#include // EO +#include // string +#include // EO //----------------------------------------------------------------------------- /// eoBin: implementation of binary chromosome. diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index f05c29c53..16183421a 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -9,9 +9,13 @@ #include -//----------------------------------------------------------------------------- -// eoInsertion -//----------------------------------------------------------------------------- +/****************************************************************************** + * eoInsertion: A replacement algorithm. + * Takes two populations: breeders and original populations. At the en of the + * process, the original population has chenge in the followin way: + * (1) the worst individuals haa been erased + * (2) the best individuals from the breeders has been added + *****************************************************************************/ template class eoInsertion: public eoMerge { @@ -19,26 +23,25 @@ template class eoInsertion: public eoMerge /// (Default) Constructor. eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} - /// - /// @param breeders - /// @param pop + /** + * Creates a new population based on breeders and original population + * @param breeders The population of breeders. + * @param pop The original population. + */ void operator()(const eoPop& breeders, eoPop& pop) { - cout << pop << endl; - sort(pop.begin(), pop.end()); - cout << pop << endl; - - cout << "cte = " - << (int)(pop.size() * (rate() - 1) - breeders.size()) << endl; - - pop.erase(pop.end() + (int)(pop.size() * (rate() - 1) - breeders.size()), - pop.end()); - - cout << "cte = " - << (int)(pop.size() * (rate() - 1) - breeders.size()) << endl; - + if (rated() > 1) + pop.erase(pop.end() + + (int)(pop.size() * (rate() - 1) - breeders.size()), + pop.end()); + else + { + cout << "eoInsertion no funciona con rate < 1" + exit(1); + } + copy(breeders.begin(), breeders.end(), back_insert_iterator >(pop)); } From e721603cf2387dcc416a7ffdd73fe5a763f14ae9 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 8 Feb 1999 19:15:27 +0000 Subject: [PATCH 0015/2134] Changed monopfactory to opfactory; changes in the examples --- eo/src/{eoMonOpFactory.h => eoOpFactory.h} | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) rename eo/src/{eoMonOpFactory.h => eoOpFactory.h} (66%) diff --git a/eo/src/eoMonOpFactory.h b/eo/src/eoOpFactory.h similarity index 66% rename from eo/src/eoMonOpFactory.h rename to eo/src/eoOpFactory.h index 79a76ae56..661965d59 100644 --- a/eo/src/eoMonOpFactory.h +++ b/eo/src/eoOpFactory.h @@ -5,38 +5,43 @@ // (c) GeNeura Team, 1998 //----------------------------------------------------------------------------- -#ifndef _EOMONOPFACTORY_H -#define _EOMONOPFACTORY_H +#ifndef _EOOPFACTORY_H +#define _EOOPFACTORY_H #include #include #include #include +#include //----------------------------------------------------------------------------- /** EO Factory. An instance of the factory class to create monary operators. @see eoSelect*/ template< class EOT> -class eoMonOpFactory: public eoFactory< eoMonOp > { +class eoOpFactory: public eoFactory< eoOp > { public: /// @name ctors and dtors //{@ /// constructor - eoMonOpFactory( ) {} + eoOpFactory( ) {} /// destructor - virtual ~eoMonOpFactory() {} + virtual ~eoOpFactory() {} //@} /** Another factory method: creates an object from an istream, reading from it whatever is needed to create the object. Usually, the format for the istream will be\\ objectType parameter1 parameter2 ... parametern\\ + If there are problems, an exception is raised; it should be caught at the + upper level, because it might be something for that level + @param _is an stream from where a single line will be read + @throw runtime_exception if the object type is not known */ - virtual eoMonOp* make(istream& _is) { - eoMonOp * opPtr; + virtual eoOp* make(istream& _is) { + eoOp * opPtr; string objectTypeStr; _is >> objectTypeStr; if ( objectTypeStr == "eoDup") { @@ -48,21 +53,17 @@ public: if ( objectTypeStr == "eoTranspose" ) { opPtr = new eoTranspose( ); } + if ( objectTypeStr == "eoXOver2" ) { + opPtr = new eoXOver2( ); + } if ( !opPtr ) { throw runtime_error( "Incorrect selector type" ); } return opPtr; } - ///@name eoObject methods - //@{ - void printOn( ostream& _os ) const {}; - void readFrom( istream& _is ){}; - - /** className is inherited */ - //@} - + }; -#endif _EOFACTORY_H +#endif _EOOPFACTORY_H From a86873dcbf8424286e3672820d31358383a3f938 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 9 Feb 1999 17:27:22 +0000 Subject: [PATCH 0016/2134] new replacer --- eo/src/eo | 2 +- eo/src/eoInclusion.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ eo/src/eoInsertion.h | 35 +++++++++++++++++-------------- 3 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 eo/src/eoInclusion.h diff --git a/eo/src/eo b/eo/src/eo index 73fa67531..2a869c1b2 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -43,7 +43,7 @@ #include #include - +#include //----------------------------------------------------------------------------- diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h new file mode 100644 index 000000000..a74986c23 --- /dev/null +++ b/eo/src/eoInclusion.h @@ -0,0 +1,49 @@ +//----------------------------------------------------------------------------- +// eoInclusion.h +//----------------------------------------------------------------------------- + +#ifndef eoInclusion_h +#define eoInclusion_h + +//----------------------------------------------------------------------------- + +#include + +/****************************************************************************** + * eoInclusion: A replacement algorithm. + * Creates a new population by selecting the best individuals from the + * breeders and original populations + *****************************************************************************/ + +template class eoInclusion: public eoMerge +{ + public: + /// (Default) Constructor. + eoInclusion(const float& _rate = 1.0): eoMerge(_rate) {} + + /** + * Creates a new population based on breeders and original populations. + * @param breeders The population of breeders. + * @param pop The original population. + */ + void operator()(const eoPop& breeders, eoPop& pop) + { + eoPop all, tmp = breeders; + + sort(tmp.begin(), tmp.end()); + sort(pop.begin(), pop.end()); + + merge(tmp.begin(), tmp.end(), + pop.begin(), pop.end(), + back_insert_iterator >(all)); + + all.erase(all.begin(), + all.begin() + (unsigned)(all.size() - pop.size() * rate())); + + pop.swap(all); + } +}; + +//----------------------------------------------------------------------------- + +#endif eoInclusion_h diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 16183421a..3c6d90a94 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -11,10 +11,8 @@ /****************************************************************************** * eoInsertion: A replacement algorithm. - * Takes two populations: breeders and original populations. At the en of the - * process, the original population has chenge in the followin way: - * (1) the worst individuals haa been erased - * (2) the best individuals from the breeders has been added + * Creates a new population with all the breeders and the best individuals + * from the original population. *****************************************************************************/ template class eoInsertion: public eoMerge @@ -24,26 +22,33 @@ template class eoInsertion: public eoMerge eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} /** - * Creates a new population based on breeders and original population + * Creates a new population based on breeders and original populations. * @param breeders The population of breeders. * @param pop The original population. */ void operator()(const eoPop& breeders, eoPop& pop) { - sort(pop.begin(), pop.end()); + int new_size = static_cast(pop.size() * rate()); + cout << "new_size = " << new_size << endl; - if (rated() > 1) - pop.erase(pop.end() + - (int)(pop.size() * (rate() - 1) - breeders.size()), - pop.end()); + if (new_size == breeders.size()) + { + pop = breeders; + } + else if (new_size < breeders.size()) + { + pop = breeders; + sort(pop.begin(), pop.end()); + pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); + } else { - cout << "eoInsertion no funciona con rate < 1" - exit(1); + sort(pop.begin(), pop.end()); + pop.erase(pop.begin(), + pop.begin() + breeders.size() + pop.size() - new_size); + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); } - - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); } }; From 9860e201f24f7663dc7b933f30aa54586aae45af Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 9 Feb 1999 17:31:16 +0000 Subject: [PATCH 0017/2134] New bitOp factories and things like that --- eo/src/eoBin.h | 19 ++---- eo/src/{eoBinOp.h => eoBitOp.h} | 15 +++-- eo/src/eoBitOpFactory.h | 101 ++++++++++++++++++++++++++++++++ eo/src/eoOpFactory.h | 4 +- eo/win/EO.dsw | 12 ++++ eo/win/t_eobin.dsp | 101 ++++++++++++++++++++++++++++++++ eo/win/t_eobitfact.dsp | 101 ++++++++++++++++++++++++++++++++ eo/win/t_lottery.dsp | 101 ++++++++++++++++++++++++++++++++ 8 files changed, 435 insertions(+), 19 deletions(-) rename eo/src/{eoBinOp.h => eoBitOp.h} (98%) create mode 100644 eo/src/eoBitOpFactory.h create mode 100644 eo/win/t_eobin.dsp create mode 100644 eo/win/t_eobitfact.dsp create mode 100644 eo/win/t_lottery.dsp diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 2382b8cef..85574a080 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -10,22 +10,15 @@ #include // ostream, istream #include // bind2nd -#if defined( _MSC_VER ) || defined( __BCPLUSPLUS__ ) // -#include // -typedef vector bit_vector; // bit_vector -#else // -#include // -#endif // - #include // string -#include // EO +#include // EO //----------------------------------------------------------------------------- -/// eoBin: implementation of binary chromosome. -/// based on STL's bit_vector (vector) +/** eoBin: implementation of binary chromosome. + based on STL's bit_vector (vector)*/ //----------------------------------------------------------------------------- -template class eoBin: public EO, public bit_vector +template class eoBin: public eoVector { public: typedef bool Type; @@ -33,11 +26,11 @@ template class eoBin: public EO, public bit_vector /// (Default) Constructor. /// @param size Size of the binary string. eoBin(const unsigned& size = 0, const bool& value = false): - bit_vector(size, value) {} + eoVector(size, value) {} /// (Default) Constructor. /// @param size Size of the binary string. - eoBin(const unsigned& size, const eoRnd& rnd): bit_vector(size) + eoBin(const unsigned& size, const eoRnd& rnd): eoVector(size) { generate(begin(), end(), rnd); } diff --git a/eo/src/eoBinOp.h b/eo/src/eoBitOp.h similarity index 98% rename from eo/src/eoBinOp.h rename to eo/src/eoBitOp.h index 4708f2abc..1b1cda9f3 100644 --- a/eo/src/eoBinOp.h +++ b/eo/src/eoBitOp.h @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// eoBinOp.h +// eoBitOp.h //----------------------------------------------------------------------------- -#ifndef eoBinOp_h -#define eoBinOp_h +#ifndef eoBitOp_h +#define eoBitOp_h //----------------------------------------------------------------------------- #include // eoBin #include // eoMonOp + +#ifndef min +#define min _MIN +#endif +#ifndef max +#define max _MAX +#endif //----------------------------------------------------------------------------- // eoBinRandom --> mofify a chromosome in a random way @@ -340,4 +347,4 @@ template class eoBinUxOver: public eoBinOp //----------------------------------------------------------------------------- -#endif eoBinOp_h +#endif eoBitOp_h diff --git a/eo/src/eoBitOpFactory.h b/eo/src/eoBitOpFactory.h new file mode 100644 index 000000000..6ccda585c --- /dev/null +++ b/eo/src/eoBitOpFactory.h @@ -0,0 +1,101 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpFactory.h +// (c) GeNeura Team, 1998 +//----------------------------------------------------------------------------- + +#ifndef _EOBITOPFACTORY_H +#define _EOBITOPFACTORY_H + +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. An instance of the factory class to create operators that act +on bitstring chromosomes. Only those chromosomes can instantiate the operators +that are created here +@see eoSelect*/ +template< class EOT> +class eoBitOpFactory: public eoOpFactory { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoBitOpFactory( ) {}; + + /// destructor + virtual ~eoBitOpFactory() {}; + //@} + + /** Another factory method: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + If there are problems, an exception is raised; it should be caught at the + upper level, because it might be something for that level\\ + At the same time, it catches exceptions thrown at a lower level, which will + indicate that whatever is in the stream is for this method to process + @param _is an stream from where a single line will be read + @throw runtime_exception if the object type is not known + */ + virtual eoOp* make(istream& _is) { + eoOp * opPtr = NULL; + try { + opPtr = eoOpFactory::make( _is ); + } catch ( string& objectTypeStr ) { + if ( objectTypeStr == "eoBinRandom") { + opPtr = new eoBinRandom(); + } + if ( objectTypeStr == "eoBinBitFlip" ) { + opPtr = new eoBinBitFlip( ); + } + if ( objectTypeStr == "eoBinMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBinMutation( rate ); + } + if ( objectTypeStr == "eoBinInversion" ) { + opPtr = new eoBinInversion( ); + } + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBinNext( ); + } + if ( objectTypeStr == "eoBinPrev" ) { + opPtr = new eoBinPrev( ); + } + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBinNext( ); + } + if ( objectTypeStr == "eoBinCrossover" ) { + opPtr = new eoBinCrossover( ); + } + if ( objectTypeStr == "eoBinNxOver" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoBinNxOver( nPoints ); + } + if ( objectTypeStr == "eoBinGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBinGxOver( geneSize, nPoints ); + } + if ( objectTypeStr == "eoBinUxOver" ) { + float rate; + _is >> rate; + opPtr = new eoBinUxOver( rate ); + } + if ( !opPtr ) { // to be caught by the upper level + throw objectTypeStr; + } + } + return opPtr; + }; + + +}; + + +#endif _EOBITOPFACTORY_H diff --git a/eo/src/eoOpFactory.h b/eo/src/eoOpFactory.h index 661965d59..540e68d81 100644 --- a/eo/src/eoOpFactory.h +++ b/eo/src/eoOpFactory.h @@ -41,7 +41,7 @@ public: @throw runtime_exception if the object type is not known */ virtual eoOp* make(istream& _is) { - eoOp * opPtr; + eoOp * opPtr = NULL; string objectTypeStr; _is >> objectTypeStr; if ( objectTypeStr == "eoDup") { @@ -57,7 +57,7 @@ public: opPtr = new eoXOver2( ); } if ( !opPtr ) { - throw runtime_error( "Incorrect selector type" ); + throw objectTypeStr; } return opPtr; } diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw index 8ef52e626..1feab840d 100644 --- a/eo/win/EO.dsw +++ b/eo/win/EO.dsw @@ -51,6 +51,18 @@ Package=<4> ############################################################################### +Project: "t_eobitfact"=.\t_eobitfact.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp new file mode 100644 index 000000000..cd86ffbaf --- /dev/null +++ b/eo/win/t_eobin.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobin___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eobin___Win32_Debug" +# PROP Intermediate_Dir "t_eobin___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eobin - Win32 Release" +# Name "t_eobin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobin.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobitfact.dsp b/eo/win/t_eobitfact.dsp new file mode 100644 index 000000000..2e0e10f3f --- /dev/null +++ b/eo/win/t_eobitfact.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eobitfact" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobitfact - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobitfact.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobitfact.mak" CFG="t_eobitfact - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobitfact - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobitfact - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobitfact - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eobitfact - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobitfact___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eobitfact___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eobitfact___Win32_Debug" +# PROP Intermediate_Dir "t_eobitfact___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eobitfact - Win32 Release" +# Name "t_eobitfact - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eobitfact.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_lottery.dsp b/eo/win/t_lottery.dsp new file mode 100644 index 000000000..b06d1ac4a --- /dev/null +++ b/eo/win/t_lottery.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_lottery" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_lottery - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_lottery.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_lottery.mak" CFG="t_lottery - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_lottery - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_lottery - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_lottery - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_lottery - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_lottery___Win32_Debug" +# PROP BASE Intermediate_Dir "t_lottery___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_lottery___Win32_Debug" +# PROP Intermediate_Dir "t_lottery___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_lottery - Win32 Release" +# Name "t_lottery - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eolottery.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 5318810e816a04289b506bd6e47a3bb8ac6d5e82 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 9 Feb 1999 18:16:42 +0000 Subject: [PATCH 0018/2134] *** empty log message *** --- eo/AUTHORS | 4 ++++ eo/src/Makefile.am | 2 +- eo/src/eo | 2 +- eo/src/eoInclusion.h | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/eo/AUTHORS b/eo/AUTHORS index e69de29bb..75e662456 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -0,0 +1,4 @@ +Pedro Angel Castillo Valdivieso +Juan Julian Merelo Guervos +Victor Manuel Rivas Santos +Gustavo Romero Lopez diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 6bb9f723f..005a6a0e4 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,4 +8,4 @@ lib_LTLIBRARIES = libeo.la libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoBinOp.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoBitOp.h diff --git a/eo/src/eo b/eo/src/eo index 2a869c1b2..f538ac491 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -38,7 +38,7 @@ #include #include -#include +#include #include diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index a74986c23..8de6d5ec1 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -9,10 +9,10 @@ #include -/****************************************************************************** - * eoInclusion: A replacement algorithm. - * Creates a new population by selecting the best individuals from the - * breeders and original populations +/***************************************************************************** + * eoInclusion: A replacement algorithm. * + * Creates a new population by selecting the best individuals from the * + * breeders and original populations * *****************************************************************************/ template class eoInclusion: public eoMerge From a5d27679da3b939887c012d24ae6dabe6138db82 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 9 Feb 1999 18:40:00 +0000 Subject: [PATCH 0019/2134] Changes to makefiles and other things --- eo/src/Makefile.am | 4 ++-- eo/src/eoBitOp.h | 5 ++--- eo/src/eoBitOpFactory.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 005a6a0e4..12dd182b2 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,8 +4,8 @@ ## ############################################################################### -lib_LTLIBRARIES = libeo.la -libeo_la_SOURCES = eoPrintable.cpp eoPersistent.cpp +lib_LIBRARIES = libeo.a +libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoBitOp.h diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index 1b1cda9f3..98eea6e7d 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -10,13 +10,12 @@ #include // eoBin #include // eoMonOp -#ifndef min +#ifdef _MSC_VER #define min _MIN -#endif -#ifndef max #define max _MAX #endif + //----------------------------------------------------------------------------- // eoBinRandom --> mofify a chromosome in a random way //----------------------------------------------------------------------------- diff --git a/eo/src/eoBitOpFactory.h b/eo/src/eoBitOpFactory.h index 6ccda585c..2ca12d75e 100644 --- a/eo/src/eoBitOpFactory.h +++ b/eo/src/eoBitOpFactory.h @@ -45,7 +45,7 @@ public: eoOp * opPtr = NULL; try { opPtr = eoOpFactory::make( _is ); - } catch ( string& objectTypeStr ) { + } catch ( const string& objectTypeStr ) { if ( objectTypeStr == "eoBinRandom") { opPtr = new eoBinRandom(); } From 73f37176e82a9491d3d9af8ebee95b1d39978c7f Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 9 Feb 1999 19:06:51 +0000 Subject: [PATCH 0020/2134] *** empty log message *** --- eo/src/Makefile.am | 2 +- eo/src/eo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 12dd182b2..44a1dabd5 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,4 +8,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoBitOp.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h diff --git a/eo/src/eo b/eo/src/eo index f538ac491..91e354165 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -59,5 +59,5 @@ #endif _eo_ // Local Variables: -// mode:C++ +// mode: C++ // End: From 9d1fdcd126ff7a70178d50c438260958b9e45d25 Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 10 Feb 1999 13:39:48 +0000 Subject: [PATCH 0021/2134] small bug fixes --- eo/src/eoBin.h | 52 +++++++++++++++++++++++++++-------------------- eo/src/eoVector.h | 6 ++++-- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 85574a080..91ce6b092 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -7,36 +7,40 @@ //----------------------------------------------------------------------------- -#include // ostream, istream -#include // bind2nd +#include // ostream, istream +#include // bind2nd +#include // string +#include // EO -#include // string -#include // EO +/***************************************************************************** + * eoBin: implementation of binary chromosome. * + * based on STL's bit_vector (vector). * + *****************************************************************************/ -//----------------------------------------------------------------------------- -/** eoBin: implementation of binary chromosome. - based on STL's bit_vector (vector)*/ -//----------------------------------------------------------------------------- - -template class eoBin: public eoVector +template class eoBin: public eoVector { public: - typedef bool Type; - /// (Default) Constructor. - /// @param size Size of the binary string. + /** + * (Default) Constructor. + * @param size Size of the binary string. + */ eoBin(const unsigned& size = 0, const bool& value = false): eoVector(size, value) {} - - /// (Default) Constructor. - /// @param size Size of the binary string. + + /** + * Constructor. + * @param size Size of the binary string. + */ eoBin(const unsigned& size, const eoRnd& rnd): eoVector(size) { generate(begin(), end(), rnd); } - /// Constructor from istream. - /// @param is The istream to read from. + /** + * Constructor from istream. + * @param is The istream to read from. + */ eoBin(istrstream& is) { readFrom(is); @@ -48,15 +52,19 @@ template class eoBin: public eoVector return "eoBin"; } - /// To print me on a stream. - /// @param os The ostream. + /** + * To print me on a stream. + * @param os The ostream. + */ void printOn(ostream& os) const { copy(begin(), end(), ostream_iterator(os)); } - /// To read me from a stream. - /// @param is The istream. + /** + * To read me from a stream. + * @param is The istream. + */ void readFrom(istream& is) { string bits; diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 02244721c..a70723b75 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -24,6 +24,8 @@ template class eoVector: public eo1d, public vector { public: + typedef Type T; + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator //@{ @@ -31,7 +33,7 @@ public: @param _size Lineal length of the object @param _val Common initial value */ - eoVector( unsigned _size, T _val = 0) + eoVector( unsigned _size = 0, T _val = 0) : eo1d(), vector( _size, _val ){ }; /** Ctor using a random number generator @@ -80,7 +82,7 @@ which is supposed to be dynamic and dependent on environment. virtual T& gene( unsigned _i ) { if ( _i >= size() ) throw out_of_range( "out_of_range when writing a gene"); - return (*this)[_i]; + return operator[](_i); }; /** methods that implement the eo1d protocol From 044acb151be86f096a96fd275f87188e3695eade Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 10 Feb 1999 17:05:16 +0000 Subject: [PATCH 0022/2134] adding eoBreeder --- eo/src/eo | 2 + eo/src/eoBreeder.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 eo/src/eoBreeder.h diff --git a/eo/src/eo b/eo/src/eo index 91e354165..43e26d827 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -42,6 +42,8 @@ #include +#include + #include #include diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h new file mode 100644 index 000000000..fe13352d2 --- /dev/null +++ b/eo/src/eoBreeder.h @@ -0,0 +1,92 @@ +//----------------------------------------------------------------------------- +// eoBreeder.h +//----------------------------------------------------------------------------- + +#ifndef eoBreeder_h +#define eoBreeder_h + +//----------------------------------------------------------------------------- + +#include // vector +#include // pair +#include // eoTransform, eoUniform, eoOp, eoMonOp, eoBinOp, eoPop + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +template class eoBreeder: public eoTransform +{ + public: + /// Default constructor. + eoBreeder(): uniform(0.0, 1.0) {} + + /// Destructor. + ~eoBreeder() + { + for (Operators::iterator op = operators.begin(); + op != operators.end(); + op++) + delete op->second; + } + + /** + * Adds a genetic operator. + * @param operator The operator. + * @param rate Rate to apply the operator. + */ + void add(eoOp* operator, float rate = 1.0) + { + operators.push_back(pair * >(operator, rate)); + } + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) const + { + for (Operators::const_iterator op = operators.begin(); + op != operators.end(); + op++) + if (op->first < uniform()) + switch (op->second->readArity()) + { + case unary: + { + eoMonOp& monop = + dinamic_cast >(*(op->second)); + for_each(pop.begin(), pop.end(), monop); + break; + } + case binary: + { + eoBinOp& binop = + dinamic_cast >(*(op->second)); + for (unsigned i = 1; i < pop.size(); i += 2) + binop(pop[i - 1], pop[i]); + break; + } + default: + { + cerr << "eoBreeder:operator() Not implemented yet!" << endl; + exit(EXIT_FAILURE); + break; + } + } + } + + /// The class name. + string classname() const { return "eoBreeder"; } + + private: + typedef vector*> > Operators; + + eoUniform uniform; + Operators operators; +}; + +//----------------------------------------------------------------------------- + +#endif eoBreeder_h From 11be20aefa012ef1ba82e1ca6815f5f089d3c758 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 10 Feb 1999 17:14:08 +0000 Subject: [PATCH 0023/2134] Added some files, compiled some stuff in VC++, and finished eoOpSelMason --- eo/src/eoBin.h | 12 ++--- eo/src/eoBitOp.h | 29 ++++++----- eo/src/eoData.h | 41 ++++++++++++++++ eo/src/eoInsertion.h | 37 +++++++------- eo/src/eoLottery.h | 1 - eo/src/eoObject.h | 7 +-- eo/src/eoOp.h | 10 ++-- eo/src/eoOpFactory.h | 2 +- eo/src/eoOpSelMason.h | 49 +++++++++++++------ eo/win/EO.dsw | 36 +++++++++----- eo/win/t_eoinsertion.dsp | 100 ++++++++++++++++++++++++++++++++++++++ eo/win/t_lottery.dsp | 12 ++--- eo/win/t_opselmason.dsp | 101 +++++++++++++++++++++++++++++++++++++++ eo/win/t_pop.dsp | 4 ++ 14 files changed, 360 insertions(+), 81 deletions(-) create mode 100644 eo/src/eoData.h create mode 100644 eo/win/t_eoinsertion.dsp create mode 100644 eo/win/t_opselmason.dsp diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 91ce6b092..c5031deca 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -17,6 +17,7 @@ * based on STL's bit_vector (vector). * *****************************************************************************/ + template class eoBin: public eoVector { public: @@ -37,14 +38,9 @@ template class eoBin: public eoVector generate(begin(), end(), rnd); } - /** - * Constructor from istream. - * @param is The istream to read from. - */ - eoBin(istrstream& is) - { - readFrom(is); - } + /// Constructor from istream. + /// @param is The istream to read from. + eoBin(istream& _is):eoVector(_is){}; /// My class name. string className() const diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index 98eea6e7d..7f37ae524 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -10,16 +10,23 @@ #include // eoBin #include // eoMonOp -#ifdef _MSC_VER -#define min _MIN -#define max _MAX -#endif - - -//----------------------------------------------------------------------------- -// eoBinRandom --> mofify a chromosome in a random way -//----------------------------------------------------------------------------- - + +/** @name BitWise Genetic operators + +Even as these operators might seem general, they are particular versions of genetic +operators useful only for binary operators. As any set of genetic operators, it must +have a factory that knows how to build them from a description +@author GeNeura Team +@version 0.1 +@see eoBin +@see eoBitOpFactory +*/ + +//@{ + +/** + eoBinRandom --> mofify a chromosome in a random way +*/ template class eoBinRandom: public eoMonOp { public: @@ -345,5 +352,5 @@ template class eoBinUxOver: public eoBinOp }; //----------------------------------------------------------------------------- - +//@} #endif eoBitOp_h diff --git a/eo/src/eoData.h b/eo/src/eoData.h new file mode 100644 index 000000000..1b31eab78 --- /dev/null +++ b/eo/src/eoData.h @@ -0,0 +1,41 @@ +//----------------------------------------------------------------------------- +// eoData.h +//----------------------------------------------------------------------------- + +#ifndef EODATA_H +#define EODATA_H + +//----------------------------------------------------------------------------- + +#include // vector +#include // set +#include // string + +using namespace std; + + +#ifdef _MSC_VER + #include // MAXDOUBLE + #define MAXFLOAT numeric_limits::max() + #define MINFLOAT numeric_limits::min() + #define MAXDOUBLE numeric_limits::max() + #define MAXINT numeric_limits::max() + #define min _MIN + #define max _MAX +#else + #include + #ifndef MAXFLOAT + #define MAXFLOAT (float)1e127 + #define MAXDOUBLE (double)1.79769313486231570e+308 + #define MAXINT 2147483647 + #endif +#endif + +#ifndef _MSC_VER +#include +#define _isnan isnan +#endif + +//----------------------------------------------------------------------------- + +#endif npi_DATATYPES_H diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 3c6d90a94..17440d399 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -11,44 +11,39 @@ /****************************************************************************** * eoInsertion: A replacement algorithm. - * Creates a new population with all the breeders and the best individuals - * from the original population. + * Takes two populations: breeders and original populations. At the en of the + * process, the original population has chenge in the followin way: + * (1) the worst individuals haa been erased + * (2) the best individuals from the breeders has been added *****************************************************************************/ template class eoInsertion: public eoMerge { public: /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} + eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} /** - * Creates a new population based on breeders and original populations. + * Creates a new population based on breeders and original population * @param breeders The population of breeders. * @param pop The original population. */ void operator()(const eoPop& breeders, eoPop& pop) { - int new_size = static_cast(pop.size() * rate()); - cout << "new_size = " << new_size << endl; + sort(pop.begin(), pop.end()); - if (new_size == breeders.size()) - { - pop = breeders; - } - else if (new_size < breeders.size()) - { - pop = breeders; - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); - } + if (rated() > 1) + pop.erase(pop.end() + + (int)(pop.size() * (rate() - 1) - breeders.size()), + pop.end()); else { - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), - pop.begin() + breeders.size() + pop.size() - new_size); - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); + cout << "eoInsertion no funciona con rate < 1" + exit(1); } + + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); } }; diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index f2dcefb66..20c4eadf7 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -9,7 +9,6 @@ #include -#include // MINFLOAT #include // accumulate #include // eoPop eoSelect diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 48e4945a2..cfc5f8fa5 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -9,9 +9,10 @@ #define EOOBJECT_H //----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string + +#include // For limits definition +#include // istream, ostream +#include // para string using namespace std; diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 20aeeff95..d12a162a0 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -16,9 +16,13 @@ What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody -should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here. +should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. @author GeNeura Team -@version 0.0 +@version 0.1 +@see eoOpFactory */ //@{ @@ -57,7 +61,7 @@ public: */ virtual void printOn(ostream& _os) const { _os << className(); - _os << arity; +// _os << arity; }; /** Inherited from eoObject diff --git a/eo/src/eoOpFactory.h b/eo/src/eoOpFactory.h index 540e68d81..9ffe402b7 100644 --- a/eo/src/eoOpFactory.h +++ b/eo/src/eoOpFactory.h @@ -60,7 +60,7 @@ public: throw objectTypeStr; } return opPtr; - } + }; }; diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 2497433d4..d8fb07221 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -9,7 +9,10 @@ #define _EOOPSELMASON_H //----------------------------------------------------------------------------- -#include +#include +#include // for eoFactory and eoOpFactory + +#include //----------------------------------------------------------------------------- @@ -19,14 +22,16 @@ template class eoOpSelMason: public eoFactory > { public: - + typedef vector* > vOpP; + typedef map*, vOpP > MEV; + /// @name ctors and dtors //{@ /// constructor - eoOpSelMason( ) {} + eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; /// destructor - virtual ~eoOpSelMason() {} + virtual ~eoOpSelMason() {}; //@} /** Factory methods: creates an object from an istream, reading from @@ -41,33 +46,47 @@ public: from outside, using the #destroy# method */ virtual eoOpSelector* make(istream& _is) { + string opSelName; _is >> opSelName; - eoMonOpFactory selMaker; + eoOpSelector* opSelectorP; + // Build the operator selector + if ( opSelName == "eoProportionalOpSel" ) { + opSelectorP = new eoProportionalOpSel(); + } + + // Temp vector for storing pointers + vOpP tmpPVec; // read operator rate and name while ( _is ) { float rate; _is >> rate; - + if ( _is ) { + eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line + // Add the operators to the selector, don´t pay attention to the IDs + opSelectorP->addOp( *op, rate ); + // Keep it in the store, to destroy later + tmpPVec.push_back( op ); + } // if + } // while - // Create an stream - strstream s0; - eoMonOp* op0 = selMaker.make( s0 ); - } - - } + // Put it in the map + allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); + + return opSelectorP; + }; ///@name eoObject methods //@{ /** Return the class id */ - virtual string className() const { return "eoFactory"; } + virtual string className() const { return "eoOpSelMason"; } - /** Read and print are left without implementation */ //@} private: map*,vector* > > allocMap; + eoOpFactory& operatorFactory; }; -#endif _EOFACTORY_H +#endif _EOOPSELMASON_H diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw index 1feab840d..cddc547a7 100644 --- a/eo/win/EO.dsw +++ b/eo/win/EO.dsw @@ -15,18 +15,6 @@ Package=<4> ############################################################################### -Project: "prueba"=.\prueba\prueba.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "t_eoaged"=.\t_eoaged.dsp - Package Owner=<4> Package=<5> @@ -75,6 +63,18 @@ Package=<4> ############################################################################### +Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eornd"=.\t_eornd.dsp - Package Owner=<4> Package=<5> @@ -195,6 +195,18 @@ Package=<4> ############################################################################### +Project: "t_opselmason"=.\t_opselmason.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_pop"=.\t_pop.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/t_eoinsertion.dsp b/eo/win/t_eoinsertion.dsp new file mode 100644 index 000000000..1f2e7d870 --- /dev/null +++ b/eo/win/t_eoinsertion.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="t_eoinsertion" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoinsertion - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoinsertion.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoinsertion.mak" CFG="t_eoinsertion - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoinsertion - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoinsertion - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoinsertion - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoinsertion - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoinsertion___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoinsertion___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoinsertion___Win32_Debug" +# PROP Intermediate_Dir "t_eoinsertion___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoinsertion - Win32 Release" +# Name "t_eoinsertion - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoinsertion.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_lottery.dsp b/eo/win/t_lottery.dsp index b06d1ac4a..32f407dc4 100644 --- a/eo/win/t_lottery.dsp +++ b/eo/win/t_lottery.dsp @@ -48,8 +48,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "t_lottery - Win32 Debug" @@ -64,16 +64,16 @@ LINK32=link.exe # PROP Intermediate_Dir "t_lottery___Win32_Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF diff --git a/eo/win/t_opselmason.dsp b/eo/win/t_opselmason.dsp new file mode 100644 index 000000000..155f3acb0 --- /dev/null +++ b/eo/win/t_opselmason.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_opselmason" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opselmason - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opselmason.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opselmason.mak" CFG="t_opselmason - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opselmason - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opselmason - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opselmason - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_opselmason - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opselmason___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opselmason___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opselmason___Win32_Debug" +# PROP Intermediate_Dir "t_opselmason___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_opselmason - Win32 Release" +# Name "t_opselmason - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opselmason.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_pop.dsp b/eo/win/t_pop.dsp index 34a66eaf3..3f7d6b3fd 100644 --- a/eo/win/t_pop.dsp +++ b/eo/win/t_pop.dsp @@ -86,6 +86,10 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=..\test\t_opselmason.cpp +# End Source File +# Begin Source File + SOURCE=..\test\t_pop.cpp # End Source File # End Group From 9303c4b53dd49954f2445fba73afcbe542af3172 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 12 Feb 1999 17:43:28 +0000 Subject: [PATCH 0024/2134] eoBreeder almost finished --- eo/mkinstalldirs | 2 +- eo/src/eo | 1 + eo/src/eoBitOp.h | 125 +++++++++++++++++++++++-------------------- eo/src/eoBreeder.h | 73 ++++++++++++------------- eo/src/eoData.h | 9 ++-- eo/src/eoInsertion.h | 37 +++++++------ eo/src/eoLottery.h | 7 ++- 7 files changed, 137 insertions(+), 117 deletions(-) diff --git a/eo/mkinstalldirs b/eo/mkinstalldirs index cb1c70a41..42b58cdb1 100755 --- a/eo/mkinstalldirs +++ b/eo/mkinstalldirs @@ -4,7 +4,7 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.1 1999-01-29 12:23:53 gustavo Exp $ +# $Id: mkinstalldirs,v 5.1 1999-02-12 17:39:01 gustavo Exp $ errstatus=0 diff --git a/eo/src/eo b/eo/src/eo index 43e26d827..9f21e4dd4 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -8,6 +8,7 @@ //----------------------------------------------------------------------------- +#include #include #include #include diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index 7f37ae524..50b0bba56 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -24,17 +24,18 @@ have a factory that knows how to build them from a description //@{ -/** - eoBinRandom --> mofify a chromosome in a random way -*/ +/** eoBinRandom --> mofify a chromosome in a random way */ + template class eoBinRandom: public eoMonOp { public: /// The class name. string className() const { return "eoBinRandom"; } - /// Randomizes a cromosome. - /// @param chrom The cromosome to be randomize. + /** + * Randomizes a cromosome. + * @param chrom The cromosome to be randomize. + */ void operator()(Chrom& chrom) const { eoUniform uniform(0.0, 1.0); @@ -44,9 +45,7 @@ template class eoBinRandom: public eoMonOp }; -//----------------------------------------------------------------------------- -// eoBinBitFlip --> chages a bit -//----------------------------------------------------------------------------- +/** eoBinBitFlip --> chages a bit */ template class eoBinBitFlip: public eoMonOp { @@ -54,8 +53,10 @@ template class eoBinBitFlip: public eoMonOp /// The class name. string className() const { return "eoBinBitFlip"; } - /// Change one bit. - /// @param chrom The cromosome which one bit is going to be changed. + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ void operator()(Chrom& chrom) const { eoUniform uniform(0.0, 1.0); @@ -64,22 +65,25 @@ template class eoBinBitFlip: public eoMonOp } }; -//----------------------------------------------------------------------------- -// eoBinMutation --> classical mutation -//----------------------------------------------------------------------------- + +/** eoBinMutation --> classical mutation */ template class eoBinMutation: public eoMonOp { public: - /// (Default) Constructor. - /// @param _rate Rate of mutation. + /** + * (Default) Constructor. + * @param _rate Rate of mutation. + */ eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} /// The class name. string className() const { return "eoBinMutation"; } - /// Mutate a chromosome. - /// @param chrom The chromosome to be mutated. + /** + * Mutate a chromosome. + * @param chrom The chromosome to be mutated. + */ void operator()(Chrom& chrom) const { for (unsigned i = 0; i < chrom.size(); i++) @@ -92,9 +96,8 @@ template class eoBinMutation: public eoMonOp mutable eoUniform uniform; }; -//----------------------------------------------------------------------------- -// eoBinInversion --> inverts the bits of the chromosome between an interval -//----------------------------------------------------------------------------- + +/** eoBinInversion: inverts the bits of the chromosome between an interval */ template class eoBinInversion: public eoMonOp { @@ -102,8 +105,10 @@ template class eoBinInversion: public eoMonOp /// The class name. string className() const { return "eoBinInversion"; } - /// Inverts a range of bits in a binary chromosome. - /// @param chrom The chromosome whos bits are going to be inverted (a range). + /** + * Inverts a range of bits in a binary chromosome. + * @param chrom The chromosome whos bits are going to be inverted (a range). + */ void operator()(Chrom& chrom) const { eoUniform uniform(0, chrom.size() + 1); @@ -116,9 +121,8 @@ template class eoBinInversion: public eoMonOp } }; -//----------------------------------------------------------------------------- -// eoBinNext --> next binary value -//----------------------------------------------------------------------------- + +/** eoBinNext --> next binary value */ template class eoBinNext: public eoMonOp { @@ -126,8 +130,10 @@ template class eoBinNext: public eoMonOp /// The class name. string className() const { return "eoBinNext"; } - /// Change the bit string x to be x+1. - /// @param chrom The chromosome to be added one. + /** + * Change the bit string x to be x+1. + * @param chrom The chromosome to be added one. + */ void operator()(Chrom& chrom) const { for (int i = chrom.size() - 1; i >= 0; i--) @@ -144,18 +150,19 @@ template class eoBinNext: public eoMonOp } }; -//----------------------------------------------------------------------------- -// eoBinPrev --> previos binary value -//----------------------------------------------------------------------------- + +/** eoBinPrev --> previos binary value */ template class eoBinPrev: public eoMonOp { public: /// The class name. string className() const { return "eoBinPrev"; } - - /// Change the bit string x to be x-1. - /// @param chrom The chromosome to be substracted one. + + /** + * Change the bit string x to be x-1. + * @param chrom The chromosome to be substracted one. + */ void operator()(Chrom& chrom) const { for (int i = chrom.size() - 1; i >= 0; i--) @@ -172,9 +179,8 @@ template class eoBinPrev: public eoMonOp } }; -//----------------------------------------------------------------------------- -// eoBinCrossover --> classic crossover -//----------------------------------------------------------------------------- + +/** eoBinCrossover --> classic crossover */ template class eoBinCrossover: public eoBinOp { @@ -182,9 +188,11 @@ template class eoBinCrossover: public eoBinOp /// The class name. string className() const { return "eoBinCrossover"; } - /// 2-point crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. + /** + * 2-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ void operator()(Chrom& chrom1, Chrom& chrom2) const { eoUniform uniform(1, min(chrom1.size(), chrom2.size())); @@ -192,9 +200,8 @@ template class eoBinCrossover: public eoBinOp } }; -//----------------------------------------------------------------------------- -// eoBinNxOver --> n-point crossover -//----------------------------------------------------------------------------- + +/** eoBinNxOver --> n-point crossover */ template class eoBinNxOver: public eoBinOp { @@ -212,9 +219,11 @@ template class eoBinNxOver: public eoBinOp /// The class name. string className() const { return "eoBinNxOver"; } - /// n-point crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. + /** + * n-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ void operator()(Chrom& chrom1, Chrom& chrom2) const { unsigned max_size = min(chrom1.size(), chrom2.size()); @@ -252,9 +261,8 @@ template class eoBinNxOver: public eoBinOp unsigned num_points; }; -//----------------------------------------------------------------------------- -// eoBinGxOver --> gene crossover -//----------------------------------------------------------------------------- + +/** eoBinGxOver --> gene crossover */ template class eoBinGxOver: public eoBinOp { @@ -278,9 +286,11 @@ template class eoBinGxOver: public eoBinOp /// The class name string className() const { return "eoBinGxOver"; } - /// Gene crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. + /** + * Gene crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ void operator()(Chrom& chrom1, Chrom& chrom2) const { unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; @@ -314,9 +324,8 @@ template class eoBinGxOver: public eoBinOp unsigned num_points; }; -//----------------------------------------------------------------------------- -// eoBinUxOver --> uniform crossover -//----------------------------------------------------------------------------- + +/** eoBinUxOver --> uniform crossover */ template class eoBinUxOver: public eoBinOp { @@ -334,9 +343,11 @@ template class eoBinUxOver: public eoBinOp /// The class name. string className() const { return "eoBinUxOver"; } - /// Uniform crossover for binary chromosomes. - /// @param chrom1 The first chromosome. - /// @param chrom2 The first chromosome. + /** + * Uniform crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ void operator()(Chrom& chrom1, Chrom& chrom2) const { unsigned min_size = min(chrom1.size(), chrom2.size()); diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index fe13352d2..b21916856 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -22,59 +22,60 @@ template class eoBreeder: public eoTransform /// Default constructor. eoBreeder(): uniform(0.0, 1.0) {} - /// Destructor. - ~eoBreeder() - { - for (Operators::iterator op = operators.begin(); - op != operators.end(); - op++) - delete op->second; - } - /** * Adds a genetic operator. * @param operator The operator. * @param rate Rate to apply the operator. */ - void add(eoOp* operator, float rate = 1.0) + void add(eoOp& op, float rate = 1.0) { - operators.push_back(pair * >(operator, rate)); + operators.push_back(pair*>(rate, &op)); } /** * Transforms a population. * @param pop The population to be transformed. */ - void operator()(eoPop& pop) const + void operator()(eoPop& pop) { for (Operators::const_iterator op = operators.begin(); op != operators.end(); op++) - if (op->first < uniform()) - switch (op->second->readArity()) - { - case unary: - { - eoMonOp& monop = - dinamic_cast >(*(op->second)); - for_each(pop.begin(), pop.end(), monop); - break; - } - case binary: - { - eoBinOp& binop = - dinamic_cast >(*(op->second)); - for (unsigned i = 1; i < pop.size(); i += 2) - binop(pop[i - 1], pop[i]); - break; - } - default: - { - cerr << "eoBreeder:operator() Not implemented yet!" << endl; - exit(EXIT_FAILURE); - break; - } + switch (op->second->readArity()) + { + case unary: + { + eoMonOp& monop = (eoMonOp&)*(op->second); + for (unsigned i = 0; i < pop.size(); i++) + if (uniform() < op->first) + monop(pop[i]); + break; } + case binary: + { + vector pos(pop.size(), 1); + pos[0] = 0; + partial_sum(pos.begin(), pos.end(), pos.begin()); + random_shuffle(pos.begin(), pos.end()); + + cout << "pos = "; + copy(pos.begin(), pos.end(), + ostream_iterator(cout, " ")); + cout << endl; + + eoBinOp& binop = (eoBinOp&)*(op->second); + for (unsigned i = 1; i < pop.size(); i += 2) + if (uniform() < op->first) + binop(pop[pos[i - 1]], pop[pos[i]]); + break; + } + default: + { + cerr << "eoBreeder:operator() Not implemented yet!" << endl; + exit(EXIT_FAILURE); + break; + } + } } /// The class name. diff --git a/eo/src/eoData.h b/eo/src/eoData.h index 1b31eab78..d24938241 100644 --- a/eo/src/eoData.h +++ b/eo/src/eoData.h @@ -22,8 +22,11 @@ using namespace std; #define MAXINT numeric_limits::max() #define min _MIN #define max _MAX -#else - #include +#else + #include + #include + #include + #ifndef MAXFLOAT #define MAXFLOAT (float)1e127 #define MAXDOUBLE (double)1.79769313486231570e+308 @@ -38,4 +41,4 @@ using namespace std; //----------------------------------------------------------------------------- -#endif npi_DATATYPES_H +#endif EODATA_H diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 17440d399..3c6d90a94 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -11,39 +11,44 @@ /****************************************************************************** * eoInsertion: A replacement algorithm. - * Takes two populations: breeders and original populations. At the en of the - * process, the original population has chenge in the followin way: - * (1) the worst individuals haa been erased - * (2) the best individuals from the breeders has been added + * Creates a new population with all the breeders and the best individuals + * from the original population. *****************************************************************************/ template class eoInsertion: public eoMerge { public: /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} + eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} /** - * Creates a new population based on breeders and original population + * Creates a new population based on breeders and original populations. * @param breeders The population of breeders. * @param pop The original population. */ void operator()(const eoPop& breeders, eoPop& pop) { - sort(pop.begin(), pop.end()); + int new_size = static_cast(pop.size() * rate()); + cout << "new_size = " << new_size << endl; - if (rated() > 1) - pop.erase(pop.end() + - (int)(pop.size() * (rate() - 1) - breeders.size()), - pop.end()); + if (new_size == breeders.size()) + { + pop = breeders; + } + else if (new_size < breeders.size()) + { + pop = breeders; + sort(pop.begin(), pop.end()); + pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); + } else { - cout << "eoInsertion no funciona con rate < 1" - exit(1); + sort(pop.begin(), pop.end()); + pop.erase(pop.begin(), + pop.begin() + breeders.size() + pop.size() - new_size); + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); } - - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); } }; diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 20c4eadf7..ffbecade9 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -6,11 +6,10 @@ #define eoLottery_h //----------------------------------------------------------------------------- - -#include -#include // accumulate -#include // eoPop eoSelect +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT //----------------------------------------------------------------------------- /// eoLottery: a selection method. From 24b8b8045ac22fe59f07ef77a1c8370816ef1fdb Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 12 Feb 1999 17:56:55 +0000 Subject: [PATCH 0025/2134] bux fix in t-eoinsertion.cpp --- eo/src/eoInsertion.h | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 3c6d90a94..7d8507e18 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -29,7 +29,6 @@ template class eoInsertion: public eoMerge void operator()(const eoPop& breeders, eoPop& pop) { int new_size = static_cast(pop.size() * rate()); - cout << "new_size = " << new_size << endl; if (new_size == breeders.size()) { From 1eaeece266182bbcdca46bb486aeb1eb1e97d350 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 15 Feb 1999 11:55:59 +0000 Subject: [PATCH 0026/2134] doing things work on VC++ --- eo/src/eoBreeder.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index b21916856..d457d3c3d 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -38,6 +38,8 @@ template class eoBreeder: public eoTransform */ void operator()(eoPop& pop) { + unsigned i; + for (Operators::const_iterator op = operators.begin(); op != operators.end(); op++) @@ -46,16 +48,15 @@ template class eoBreeder: public eoTransform case unary: { eoMonOp& monop = (eoMonOp&)*(op->second); - for (unsigned i = 0; i < pop.size(); i++) + for (i = 0; i < pop.size(); i++) if (uniform() < op->first) monop(pop[i]); break; } case binary: - { - vector pos(pop.size(), 1); - pos[0] = 0; - partial_sum(pos.begin(), pos.end(), pos.begin()); + { + vector pos(pop.size()); + iota(pos.begin(), pos.end(), 0); random_shuffle(pos.begin(), pos.end()); cout << "pos = "; @@ -64,7 +65,7 @@ template class eoBreeder: public eoTransform cout << endl; eoBinOp& binop = (eoBinOp&)*(op->second); - for (unsigned i = 1; i < pop.size(); i += 2) + for (i = 1; i < pop.size(); i += 2) if (uniform() < op->first) binop(pop[pos[i - 1]], pop[pos[i]]); break; From e3bff7d45f1d09f271fb62561d44ea3327620d35 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 15 Feb 1999 16:01:35 +0000 Subject: [PATCH 0027/2134] Compiled new stuff on VC++, changes to breeder --- eo/src/eoBin.h | 2 +- eo/src/eoBreeder.h | 107 ++++++++++++++++------------------- eo/src/eoData.h | 3 - eo/src/eoInclusion.h | 2 +- eo/src/eoOp.h | 3 +- eo/src/eoOpSelector.h | 2 +- eo/src/eoProportionalOpSel.h | 8 +-- eo/win/EO.dsw | 24 ++++++++ 8 files changed, 83 insertions(+), 68 deletions(-) diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index c5031deca..7d8b3a0f2 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -33,7 +33,7 @@ template class eoBin: public eoVector * Constructor. * @param size Size of the binary string. */ - eoBin(const unsigned& size, const eoRnd& rnd): eoVector(size) + eoBin(const unsigned& size, const eoRnd& rnd): eoVector(size) { generate(begin(), end(), rnd); } diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index d457d3c3d..8fa445dcc 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -7,8 +7,10 @@ //----------------------------------------------------------------------------- -#include // vector -#include // pair +#include // vector + +using namespace std; + #include // eoTransform, eoUniform, eoOp, eoMonOp, eoBinOp, eoPop /***************************************************************************** @@ -20,73 +22,64 @@ template class eoBreeder: public eoTransform { public: /// Default constructor. - eoBreeder(): uniform(0.0, 1.0) {} - - /** - * Adds a genetic operator. - * @param operator The operator. - * @param rate Rate to apply the operator. - */ - void add(eoOp& op, float rate = 1.0) - { - operators.push_back(pair*>(rate, &op)); - } + eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} + + /// Destructor. + virtual ~eoBreeder() { } + /** * Transforms a population. * @param pop The population to be transformed. */ - void operator()(eoPop& pop) + + void operator()(eoPop& pop) { - unsigned i; - - for (Operators::const_iterator op = operators.begin(); - op != operators.end(); - op++) - switch (op->second->readArity()) - { - case unary: - { - eoMonOp& monop = (eoMonOp&)*(op->second); - for (i = 0; i < pop.size(); i++) - if (uniform() < op->first) - monop(pop[i]); - break; + for (unsigned i = 0; i < pop.size(); i ++ ) { + eoOp* op = opSel.Op(); + switch (op->readArity()) { + case unary: + { + eoMonOp* monop = static_cast* >(op); + (*monop)( pop[i] ); + break; + } + case binary: + { + eoBinOp* binop = + static_cast* >(op); + eoUniform u(0, pop.size() ); + (*binop)(pop[i], pop[ u() ] ); + break; + } + case Nary: + { + eoNaryOp* Nop = + static_cast* >(op); + eoUniform u(0, pop.size() ); + eoPop tmpVec; + tmpVec.push_back( pop[i] ); + for ( unsigned i = 0; i < u(); i ++ ) { + tmpVec.push_back( pop[ u() ] ); + } + (*Nop)( tmpVec ); + break; + } + default: + { + throw runtime_error( "eoBreeder:operator() Not implemented yet!" ); + break; + } } - case binary: - { - vector pos(pop.size()); - iota(pos.begin(), pos.end(), 0); - random_shuffle(pos.begin(), pos.end()); - - cout << "pos = "; - copy(pos.begin(), pos.end(), - ostream_iterator(cout, " ")); - cout << endl; - - eoBinOp& binop = (eoBinOp&)*(op->second); - for (i = 1; i < pop.size(); i += 2) - if (uniform() < op->first) - binop(pop[pos[i - 1]], pop[pos[i]]); - break; - } - default: - { - cerr << "eoBreeder:operator() Not implemented yet!" << endl; - exit(EXIT_FAILURE); - break; - } - } - } + } + }; /// The class name. string classname() const { return "eoBreeder"; } private: - typedef vector*> > Operators; - - eoUniform uniform; - Operators operators; + eoOpSelector& opSel; + }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoData.h b/eo/src/eoData.h index d24938241..fcbf013e4 100644 --- a/eo/src/eoData.h +++ b/eo/src/eoData.h @@ -20,13 +20,10 @@ using namespace std; #define MINFLOAT numeric_limits::min() #define MAXDOUBLE numeric_limits::max() #define MAXINT numeric_limits::max() - #define min _MIN - #define max _MAX #else #include #include #include - #ifndef MAXFLOAT #define MAXFLOAT (float)1e127 #define MAXDOUBLE (double)1.79769313486231570e+308 diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index 8de6d5ec1..e090e4567 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -19,7 +19,7 @@ template class eoInclusion: public eoMerge { public: /// (Default) Constructor. - eoInclusion(const float& _rate = 1.0): eoMerge(_rate) {} + eoInclusion(const float& _rate = 1.0): eoMerge(_rate) {} /** * Creates a new population based on breeders and original populations. diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index d12a162a0..ac7027616 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -148,6 +148,7 @@ public: }; +#include /** eoNaryOp is the N-ary operator: genetic operator that takes several EOs. It could be called an {\em orgy} operator */ @@ -168,7 +169,7 @@ public: /** applies randomly operator, to the object. */ -// virtual void operator()( EOPop & _eop) const = 0; + virtual void operator()( eoPop & _eop) const = 0; /** @name Methods from eoObject readFrom and printOn are directly inherited from eoObject. diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 4a8aae68c..717071c38 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -47,7 +47,7 @@ public: virtual deleteOp( ID _id ) = 0; /// Returns a genetic operator according to the established criteria - virtual const eoOp& Op() = 0; + virtual eoOp* Op() = 0; /// Methods inherited from eoObject //@{ diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index 7f14581f5..ba2556962 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -26,11 +26,11 @@ Operators are represented as pairs (proportion,operator) */ template class eoProportionalOpSel: public eoOpSelector, - public multimap*,greater > + public multimap*,greater > { public: - typedef multimap*,greater > MMF; + typedef multimap*,greater > MMF; /// default ctor eoProportionalOpSel() @@ -79,7 +79,7 @@ public: }; /// Returns a genetic operator according to the established criteria - virtual const eoOp& Op() { + virtual eoOp* Op() { // Check that all add up to one float acc = 0; MMF::iterator i; @@ -100,7 +100,7 @@ public: } while ( (acc <= aRnd ) && (i++!=end() ) ); if ( i == end() ) throw runtime_error( "Operator not found in eoProportionalOpSelector" ); - return *(i->second); + return i->second; //return i->second; } diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw index cddc547a7..4cac45ee6 100644 --- a/eo/win/EO.dsw +++ b/eo/win/EO.dsw @@ -51,6 +51,18 @@ Package=<4> ############################################################################### +Project: "t_eobreeder"=.\t_eobreeder.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> Package=<5> @@ -63,6 +75,18 @@ Package=<4> ############################################################################### +Project: "t_eoinclusion"=.\t_eoinclusion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> Package=<5> From c1481ac24f5dd5a057ac43a6f7faa10e28793d93 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 15 Feb 1999 16:03:04 +0000 Subject: [PATCH 0028/2134] New .dsp files for new test programs --- eo/win/t_eobreeder.dsp | 101 +++++++++++++++++++++++++++++++++++++++ eo/win/t_eoinclusion.dsp | 101 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 eo/win/t_eobreeder.dsp create mode 100644 eo/win/t_eoinclusion.dsp diff --git a/eo/win/t_eobreeder.dsp b/eo/win/t_eobreeder.dsp new file mode 100644 index 000000000..6a6c39781 --- /dev/null +++ b/eo/win/t_eobreeder.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eobreeder" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobreeder - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobreeder.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobreeder.mak" CFG="t_eobreeder - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobreeder - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobreeder - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobreeder - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eobreeder - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobreeder___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eobreeder___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eobreeder___Win32_Debug" +# PROP Intermediate_Dir "t_eobreeder___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eobreeder - Win32 Release" +# Name "t_eobreeder - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobreeder.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoinclusion.dsp b/eo/win/t_eoinclusion.dsp new file mode 100644 index 000000000..a8f352530 --- /dev/null +++ b/eo/win/t_eoinclusion.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_eoinclusion" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoinclusion - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoinclusion.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoinclusion.mak" CFG="t_eoinclusion - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoinclusion - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoinclusion - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoinclusion - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoinclusion - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoinclusion___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoinclusion___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoinclusion___Win32_Debug" +# PROP Intermediate_Dir "t_eoinclusion___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoinclusion - Win32 Release" +# Name "t_eoinclusion - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoinclusion.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From c1cddf3236f957069eb642653cb02e6f4a0f0933 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 15 Feb 1999 17:47:30 +0000 Subject: [PATCH 0029/2134] adding eoGeneration --- eo/src/eo | 2 +- eo/src/eoBitOp.h | 40 ++++++--------- eo/src/eoBreeder.h | 84 +++++++++++++++---------------- eo/src/{eoGA.h => eoGeneration.h} | 26 ++++++---- eo/src/eoPopOps.h | 39 +++++++------- 5 files changed, 91 insertions(+), 100 deletions(-) rename eo/src/{eoGA.h => eoGeneration.h} (68%) diff --git a/eo/src/eo b/eo/src/eo index 9f21e4dd4..f7addb710 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -48,6 +48,7 @@ #include #include +#include //----------------------------------------------------------------------------- // to be continued ... @@ -55,7 +56,6 @@ #include // what's the matter with you? #include // what's the matter with you? -// #include //----------------------------------------------------------------------------- diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index 50b0bba56..d69fe85f3 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -7,8 +7,10 @@ //----------------------------------------------------------------------------- -#include // eoBin -#include // eoMonOp +#include // swap_ranges +#include // eoUniform +#include // eoBin +#include // eoMonOp /** @name BitWise Genetic operators @@ -210,12 +212,9 @@ template class eoBinNxOver: public eoBinOp eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) { if (num_points < 1) - { - cerr << "NxOver --> invalid number of points " << num_points << endl; - exit(EXIT_FAILURE); - } + runtime_error("NxOver --> invalid number of points"); } - + /// The class name. string className() const { return "eoBinNxOver"; } @@ -272,20 +271,14 @@ template class eoBinGxOver: public eoBinOp gene_size(_gene_size), num_points(_num_points) { if (gene_size < 1) - { - cerr << "GxOver --> invalid gene size " << gene_size << endl; - exit(EXIT_FAILURE); - } + runtime_error("GxOver --> invalid gene size"); if (num_points < 1) - { - cerr << "GxOver --> invalid number of points " << num_points << endl; - exit(EXIT_FAILURE); - } + runtime_error("GxOver --> invalid number of points"); } /// The class name string className() const { return "eoBinGxOver"; } - + /** * Gene crossover for binary chromosomes. * @param chrom1 The first chromosome. @@ -310,7 +303,7 @@ template class eoBinGxOver: public eoBinOp cut_genes--; } } while (cut_genes); - + // swaps genes for (unsigned i = 0; i < points.size(); i++) if (points[i]) @@ -318,7 +311,7 @@ template class eoBinGxOver: public eoBinOp chrom1.begin() + i * gene_size + gene_size, chrom2.begin() + i * gene_size); } - + private: unsigned gene_size; unsigned num_points; @@ -326,23 +319,20 @@ template class eoBinGxOver: public eoBinOp /** eoBinUxOver --> uniform crossover */ - + template class eoBinUxOver: public eoBinOp { - public: +public: /// (Default) Constructor. eoBinUxOver(const float _rate = 0.5): rate(_rate) { if (rate < 0 || rate > 1) - { - cerr << "UxOver --> invalid rate " << rate << endl; - exit(EXIT_FAILURE); - } + runtime_error("UxOver --> invalid rate"); } /// The class name. string className() const { return "eoBinUxOver"; } - + /** * Uniform crossover for binary chromosomes. * @param chrom1 The first chromosome. diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index 8fa445dcc..75cda90e7 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -7,11 +7,14 @@ //----------------------------------------------------------------------------- -#include // vector - +#include // vector +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector + using namespace std; - -#include // eoTransform, eoUniform, eoOp, eoMonOp, eoBinOp, eoPop /***************************************************************************** * eoBreeder: transforms a population using genetic operators. * @@ -24,55 +27,48 @@ template class eoBreeder: public eoTransform /// Default constructor. eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} - /// Destructor. - virtual ~eoBreeder() { } + virtual ~eoBreeder() {} /** * Transforms a population. * @param pop The population to be transformed. */ - void operator()(eoPop& pop) { - for (unsigned i = 0; i < pop.size(); i ++ ) { - eoOp* op = opSel.Op(); - switch (op->readArity()) { - case unary: - { - eoMonOp* monop = static_cast* >(op); - (*monop)( pop[i] ); - break; - } - case binary: - { - eoBinOp* binop = - static_cast* >(op); - eoUniform u(0, pop.size() ); - (*binop)(pop[i], pop[ u() ] ); - break; - } - case Nary: - { - eoNaryOp* Nop = - static_cast* >(op); - eoUniform u(0, pop.size() ); - eoPop tmpVec; - tmpVec.push_back( pop[i] ); - for ( unsigned i = 0; i < u(); i ++ ) { - tmpVec.push_back( pop[ u() ] ); - } - (*Nop)( tmpVec ); - break; - } - default: - { - throw runtime_error( "eoBreeder:operator() Not implemented yet!" ); - break; - } + for (unsigned i = 0; i < pop.size(); i++) { + eoOp* op = opSel.Op(); + switch (op->readArity()) { + case unary: + { + eoMonOp* monop = static_cast* >(op); + (*monop)( pop[i] ); + break; + } + case binary: + { + eoBinOp* binop = + static_cast* >(op); + eoUniform u(0, pop.size() ); + (*binop)(pop[i], pop[ u() ] ); + break; + } + case Nary: + { + eoNaryOp* Nop = + static_cast* >(op); + eoUniform u(0, pop.size() ); + eoPop tmpVec; + tmpVec.push_back( pop[i] ); + for ( unsigned i = 0; i < u(); i ++ ) { + tmpVec.push_back( pop[ u() ] ); } - } - }; + (*Nop)( tmpVec ); + break; + } + } + } + }; /// The class name. string classname() const { return "eoBreeder"; } diff --git a/eo/src/eoGA.h b/eo/src/eoGeneration.h similarity index 68% rename from eo/src/eoGA.h rename to eo/src/eoGeneration.h index 5fee041fb..80aa24ff8 100644 --- a/eo/src/eoGA.h +++ b/eo/src/eoGeneration.h @@ -1,9 +1,9 @@ //----------------------------------------------------------------------------- -// eoGA.h +// eoGeneration.h //----------------------------------------------------------------------------- -#ifndef eoGA_h -#define eoGA_h +#ifndef eoGeneration_h +#define eoGeneration_h //----------------------------------------------------------------------------- @@ -11,18 +11,21 @@ #include // eoSelect, eoTranform, eoMerge //----------------------------------------------------------------------------- -// eoGA +// eoGeneration //----------------------------------------------------------------------------- -class eoGA +template class eoGeneration: public eoTransform { public: /// Constructor. - eoGA(eoSelect& _select, eoTranform& _transform, eoMerge& _replace) - { - } + eoGeneration(eoSelect& _select, + eoTranform& _transform, + eoMerge& _replace): + eoTransform() {} - /// + /** + * + */ void operator()(eoPop& pop) { eoPop breeders; @@ -32,6 +35,9 @@ class eoGA replace(breeders, pop); } + /// Class name. + string className() const { return "eoGeneration"; } + private: eoSelect& select; eoTranform& transform; @@ -40,4 +46,4 @@ class eoGA //----------------------------------------------------------------------------- -#endif eoGA_h +#endif eoGeneration_h diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index cc0a10f93..f97e7899d 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -25,26 +25,25 @@ template class eoTransform: public eoObject{ public: - /** ctor - */ - eoTransform() {}; - - /// Dtor - virtual ~eoTransform(){}; - - /// Pure virtual transformation function. Does something on the population - virtual void operator () ( eoPop& _pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoTransform";}; - //@} - + /** ctor */ + eoTransform() {}; + + /// Dtor + virtual ~eoTransform(){}; + + /// Pure virtual transformation function. Does something on the population + virtual void operator () ( eoPop& _pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoTransform";}; + //@} + }; /** eoSelect usually takes elements from one population, with or without From 9ac2220c5dd4c1dc7341ba9b8de691682e9a82b1 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 11:07:46 +0000 Subject: [PATCH 0030/2134] *** empty log message *** --- eo/src/EO.h | 1 - eo/src/eoBin.h | 1 - eo/src/eoNormal.h | 5 +---- eo/src/eoObject.h | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 16b332131..9ace34bc4 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -11,7 +11,6 @@ //----------------------------------------------------------------------------- #include // runtime_error - #include #include diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 7d8b3a0f2..e1a1c0210 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -17,7 +17,6 @@ * based on STL's bit_vector (vector). * *****************************************************************************/ - template class eoBin: public eoVector { public: diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h index 81d120ac7..a75adef99 100644 --- a/eo/src/eoNormal.h +++ b/eo/src/eoNormal.h @@ -10,11 +10,8 @@ //----------------------------------------------------------------------------- -#include -#include - +#include #include - #include // for base class //----------------------------------------------------------------------------- diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index cfc5f8fa5..7cd3365ca 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -12,7 +12,7 @@ #include // For limits definition #include // istream, ostream -#include // para string +#include // string using namespace std; From 50062e7c303ac84b853f498ccf8a368c93a0122e Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 11:48:42 +0000 Subject: [PATCH 0031/2134] adding examples for eoBin & other stuff --- eo/src/eo | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index f7addb710..26d58a985 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -48,15 +48,14 @@ #include #include -#include - //----------------------------------------------------------------------------- // to be continued ... //----------------------------------------------------------------------------- - -#include // what's the matter with you? -#include // what's the matter with you? - +/* +#include +#include +#include +*/ //----------------------------------------------------------------------------- #endif _eo_ From 0f4ff4691c8d623134e68325e2fb85985d713963 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 12:03:51 +0000 Subject: [PATCH 0032/2134] adding examples for eoBin & other stuff --- eo/test/Makefile.am | 152 +++++++++++ eo/test/Makefile.in | 560 ++++++++++++++++++++++++++++++++++++++ eo/test/t-eo.cpp | 21 ++ eo/test/t-eobin.cpp | 116 ++++++++ eo/test/t-eobreeder.cpp | 65 +++++ eo/test/t-eofitness.cpp | 77 ++++++ eo/test/t-eoinclusion.cpp | 105 +++++++ eo/test/t-eoinsertion.cpp | 105 +++++++ eo/test/t-eolottery.cpp | 53 ++++ eo/test/t-eoproblem.cpp | 52 ++++ 10 files changed, 1306 insertions(+) create mode 100644 eo/test/Makefile.am create mode 100644 eo/test/Makefile.in create mode 100644 eo/test/t-eo.cpp create mode 100644 eo/test/t-eobin.cpp create mode 100644 eo/test/t-eobreeder.cpp create mode 100644 eo/test/t-eofitness.cpp create mode 100644 eo/test/t-eoinclusion.cpp create mode 100644 eo/test/t-eoinsertion.cpp create mode 100644 eo/test/t-eolottery.cpp create mode 100644 eo/test/t-eoproblem.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am new file mode 100644 index 000000000..d8d2be5fc --- /dev/null +++ b/eo/test/Makefile.am @@ -0,0 +1,152 @@ +############################################################################### +## +## Makefile.am for eo/test +## +############################################################################### + +DEPS = $(top_builddir)/src/libeo.a + +############################################################################### + +INCLUDES = -I$(top_builddir)/src +LDADDS = $(top_builddir)/src/libeo.a + +############################################################################### + +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t_eornd t_eovector t_eoaged t_eoid t_eostring t_ops t_popops t_pop t_es t_opsel t_opfactory t_opMut t_eobitfact + +############################################################################### + +t_eobreeder_SOURCES = t-eobreeder.cpp +t_eobreeder_DEPENDENCIES = $(DEPS) +t_eobreeder_LDFLAGS = -lm +t_eobreeder_LDADD = $(LDADDS) + +############################################################################### + +t_eoinclusion_SOURCES = t-eoinclusion.cpp +t_eoinclusion_DEPENDENCIES = $(DEPS) +t_eoinclusion_LDFLAGS = -lm +t_eoinclusion_LDADD = $(LDADDS) + +############################################################################### + +t_eoinsertion_SOURCES = t-eoinsertion.cpp +t_eoinsertion_DEPENDENCIES = $(DEPS) +t_eoinsertion_LDFLAGS = -lm +t_eoinsertion_LDADD = $(LDADDS) + +############################################################################### + +t_eo_SOURCES = t-eo.cpp +t_eo_DEPENDENCIES = $(DEPS) +t_eo_LDADD = $(LDADDS) + +############################################################################### + +t_eofitness_SOURCES = t-eofitness.cpp +t_eofitness_DEPENDENCIES = $(DEPS) +t_eofitness_LDADD = $(LDADDS) + +############################################################################### + +t_eoproblem_SOURCES = t-eoproblem.cpp +t_eoproblem_LDFLAGS = -lm + +############################################################################### + +t_eobin_SOURCES = t-eobin.cpp +t_eobin_DEPENDENCIES = $(DEPS) +t_eobin_LDADD = $(LDADDS) + +############################################################################### + +t_eolottery_SOURCES = t-eolottery.cpp +t_eolottery_DEPENDENCIES = $(DEPS) +t_eovector_LDFLAGS = -lm +t_eolottery_LDADD = $(LDADDS) + +############################################################################### + +t_eornd_SOURCES = t_eornd.cpp +t_eornd_LDFLAGS = -lm + +############################################################################### + +t_eovector_SOURCES = t_eovector.cpp +t_eovector_LDFLAGS = -lm +t_eovector_LDADD = $(LDADDS) + +############################################################################### + +t_eoaged_SOURCES = t_eoaged.cpp +t_eoaged_DEPENDENCIES = $(DEPS) +t_eoaged_LDADD = $(LDADDS) + +############################################################################### + +t_eoid_SOURCES = t_eoid.cpp +t_eoid_DEPENDENCIES = $(DEPS) +t_eoid_LDADD = $(LDADDS) + +############################################################################### + +t_eostring_SOURCES = t_eostring.cpp +t_eostring_DEPENDENCIES = $(DEPS) +t_eostring_LDADD = $(LDADDS) + +############################################################################### + +t_eostring_SOURCES = t_eostring.cpp +t_eostring_DEPENDENCIES = $(DEPS) +t_eostring_LDADD = $(LDADDS) + +############################################################################### + +t_es_SOURCES = t_es.cpp +t_es_DEPENDENCIES = $(DEPS) +t_es_LDADD = $(LDADDS) + +############################################################################### + +t_ops_SOURCES = t_ops.cpp +t_ops_DEPENDENCIES = $(DEPS) +t_ops_LDADD = $(LDADDS) + +############################################################################### + +t_pop_SOURCES = t_pop.cpp +t_pop_DEPENDENCIES = $(DEPS) +t_pop_LDADD = $(LDADDS) + +############################################################################### + +t_popops_SOURCES = t_popops.cpp +t_popops_DEPENDENCIES = $(DEPS) +t_popops_LDADD = $(LDADDS) + +############################################################################### + +t_opsel_SOURCES = t_opsel.cpp +t_opsel_DEPENDENCIES = $(DEPS) +t_opsel_LDADD = $(LDADDS) + +############################################################################### + +t_opfactory_SOURCES = t_opfactory.cpp +t_opfactory_DEPENDENCIES = $(DEPS) +t_opfactory_LDADD = $(LDADDS) + +############################################################################### + +t_opMut_SOURCES = t_opMut.cpp +t_opMut_DEPENDENCIES = $(DEPS) +t_opMut_LDADD = $(LDADDS) + +############################################################################### + +t_eobitfact_SOURCES = t_eobitfact.cpp +t_eobitfact_DEPENDENCIES = $(DEPS) +t_eobitfact_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in new file mode 100644 index 000000000..7231bf672 --- /dev/null +++ b/eo/test/Makefile.in @@ -0,0 +1,560 @@ +# Makefile.in generated automatically by automake 1.3 from Makefile.am + +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +############################################################################### +############################################################################### + + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DISTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +CC = @CC@ +CXX = @CXX@ +LD = @LD@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NM = @NM@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ + +DEPS = $(top_builddir)/src/libeo.a + +############################################################################### + +INCLUDES = -I$(top_builddir)/src +LDADDS = $(top_builddir)/src/libeo.a + +############################################################################### + +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t_eornd t_eovector t_eoaged t_eoid t_eostring t_ops t_popops t_pop t_es t_opsel t_opfactory t_opMut t_eobitfact + +############################################################################### + +t_eobreeder_SOURCES = t-eobreeder.cpp +t_eobreeder_DEPENDENCIES = $(DEPS) +t_eobreeder_LDFLAGS = -lm +t_eobreeder_LDADD = $(LDADDS) + +############################################################################### + +t_eoinclusion_SOURCES = t-eoinclusion.cpp +t_eoinclusion_DEPENDENCIES = $(DEPS) +t_eoinclusion_LDFLAGS = -lm +t_eoinclusion_LDADD = $(LDADDS) + +############################################################################### + +t_eoinsertion_SOURCES = t-eoinsertion.cpp +t_eoinsertion_DEPENDENCIES = $(DEPS) +t_eoinsertion_LDFLAGS = -lm +t_eoinsertion_LDADD = $(LDADDS) + +############################################################################### + +t_eo_SOURCES = t-eo.cpp +t_eo_DEPENDENCIES = $(DEPS) +t_eo_LDADD = $(LDADDS) + +############################################################################### + +t_eofitness_SOURCES = t-eofitness.cpp +t_eofitness_DEPENDENCIES = $(DEPS) +t_eofitness_LDADD = $(LDADDS) + +############################################################################### + +t_eoproblem_SOURCES = t-eoproblem.cpp +t_eoproblem_LDFLAGS = -lm + +############################################################################### + +t_eobin_SOURCES = t-eobin.cpp +t_eobin_DEPENDENCIES = $(DEPS) +t_eobin_LDADD = $(LDADDS) + +############################################################################### + +t_eolottery_SOURCES = t-eolottery.cpp +t_eolottery_DEPENDENCIES = $(DEPS) +t_eovector_LDFLAGS = -lm +t_eolottery_LDADD = $(LDADDS) + +############################################################################### + +t_eornd_SOURCES = t_eornd.cpp +t_eornd_LDFLAGS = -lm + +############################################################################### + +t_eovector_SOURCES = t_eovector.cpp +t_eovector_LDFLAGS = -lm +t_eovector_LDADD = $(LDADDS) + +############################################################################### + +t_eoaged_SOURCES = t_eoaged.cpp +t_eoaged_DEPENDENCIES = $(DEPS) +t_eoaged_LDADD = $(LDADDS) + +############################################################################### + +t_eoid_SOURCES = t_eoid.cpp +t_eoid_DEPENDENCIES = $(DEPS) +t_eoid_LDADD = $(LDADDS) + +############################################################################### + +t_eostring_SOURCES = t_eostring.cpp +t_eostring_DEPENDENCIES = $(DEPS) +t_eostring_LDADD = $(LDADDS) + +############################################################################### + +t_eostring_SOURCES = t_eostring.cpp +t_eostring_DEPENDENCIES = $(DEPS) +t_eostring_LDADD = $(LDADDS) + +############################################################################### + +t_es_SOURCES = t_es.cpp +t_es_DEPENDENCIES = $(DEPS) +t_es_LDADD = $(LDADDS) + +############################################################################### + +t_ops_SOURCES = t_ops.cpp +t_ops_DEPENDENCIES = $(DEPS) +t_ops_LDADD = $(LDADDS) + +############################################################################### + +t_pop_SOURCES = t_pop.cpp +t_pop_DEPENDENCIES = $(DEPS) +t_pop_LDADD = $(LDADDS) + +############################################################################### + +t_popops_SOURCES = t_popops.cpp +t_popops_DEPENDENCIES = $(DEPS) +t_popops_LDADD = $(LDADDS) + +############################################################################### + +t_opsel_SOURCES = t_opsel.cpp +t_opsel_DEPENDENCIES = $(DEPS) +t_opsel_LDADD = $(LDADDS) + +############################################################################### + +t_opfactory_SOURCES = t_opfactory.cpp +t_opfactory_DEPENDENCIES = $(DEPS) +t_opfactory_LDADD = $(LDADDS) + +############################################################################### + +t_opMut_SOURCES = t_opMut.cpp +t_opMut_DEPENDENCIES = $(DEPS) +t_opMut_LDADD = $(LDADDS) + +############################################################################### + +t_eobitfact_SOURCES = t_eobitfact.cpp +t_eobitfact_DEPENDENCIES = $(DEPS) +t_eobitfact_LDADD = $(LDADDS) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +t_eobreeder_OBJECTS = t-eobreeder.o +t_eoinclusion_OBJECTS = t-eoinclusion.o +t_eoinsertion_OBJECTS = t-eoinsertion.o +t_eo_OBJECTS = t-eo.o +t_eo_LDFLAGS = +t_eofitness_OBJECTS = t-eofitness.o +t_eofitness_LDFLAGS = +t_eoproblem_OBJECTS = t-eoproblem.o +t_eoproblem_LDADD = $(LDADD) +t_eoproblem_DEPENDENCIES = +t_eobin_OBJECTS = t-eobin.o +t_eobin_LDFLAGS = +t_eolottery_OBJECTS = t-eolottery.o +t_eolottery_LDFLAGS = +t_eornd_OBJECTS = t_eornd.o +t_eornd_LDADD = $(LDADD) +t_eornd_DEPENDENCIES = +t_eovector_OBJECTS = t_eovector.o +t_eovector_DEPENDENCIES = $(top_builddir)/src/libeo.a +t_eoaged_OBJECTS = t_eoaged.o +t_eoaged_LDFLAGS = +t_eoid_OBJECTS = t_eoid.o +t_eoid_LDFLAGS = +t_eostring_OBJECTS = t_eostring.o +t_eostring_LDFLAGS = +t_ops_OBJECTS = t_ops.o +t_ops_LDFLAGS = +t_popops_OBJECTS = t_popops.o +t_popops_LDFLAGS = +t_pop_OBJECTS = t_pop.o +t_pop_LDFLAGS = +t_es_OBJECTS = t_es.o +t_es_LDFLAGS = +t_opsel_OBJECTS = t_opsel.o +t_opsel_LDFLAGS = +t_opfactory_OBJECTS = t_opfactory.o +t_opfactory_LDFLAGS = +t_opMut_OBJECTS = t_opMut.o +t_opMut_LDFLAGS = +t_eobitfact_OBJECTS = t_eobitfact.o +t_eobitfact_LDFLAGS = +CXXFLAGS = @CXXFLAGS@ +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) +CXXLINK = $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP = --best +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_eornd_SOURCES) $(t_eovector_SOURCES) $(t_eoaged_SOURCES) $(t_eoid_SOURCES) $(t_eostring_SOURCES) $(t_ops_SOURCES) $(t_popops_SOURCES) $(t_pop_SOURCES) $(t_es_SOURCES) $(t_opsel_SOURCES) $(t_opfactory_SOURCES) $(t_opMut_SOURCES) $(t_eobitfact_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_eornd_OBJECTS) $(t_eovector_OBJECTS) $(t_eoaged_OBJECTS) $(t_eoid_OBJECTS) $(t_eostring_OBJECTS) $(t_ops_OBJECTS) $(t_popops_OBJECTS) $(t_pop_OBJECTS) $(t_es_OBJECTS) $(t_opsel_OBJECTS) $(t_opfactory_OBJECTS) $(t_opMut_OBJECTS) $(t_eobitfact_OBJECTS) + +all: Makefile $(PROGRAMS) + +.SUFFIXES: +.SUFFIXES: .S .c .cpp .lo .o .s +$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstPROGRAMS: + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +distclean-noinstPROGRAMS: + +maintainer-clean-noinstPROGRAMS: + +.c.o: + $(COMPILE) -c $< + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +.s.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +.S.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + +maintainer-clean-libtool: + +t-eobreeder: $(t_eobreeder_OBJECTS) $(t_eobreeder_DEPENDENCIES) + @rm -f t-eobreeder + $(CXXLINK) $(t_eobreeder_LDFLAGS) $(t_eobreeder_OBJECTS) $(t_eobreeder_LDADD) $(LIBS) + +t-eoinclusion: $(t_eoinclusion_OBJECTS) $(t_eoinclusion_DEPENDENCIES) + @rm -f t-eoinclusion + $(CXXLINK) $(t_eoinclusion_LDFLAGS) $(t_eoinclusion_OBJECTS) $(t_eoinclusion_LDADD) $(LIBS) + +t-eoinsertion: $(t_eoinsertion_OBJECTS) $(t_eoinsertion_DEPENDENCIES) + @rm -f t-eoinsertion + $(CXXLINK) $(t_eoinsertion_LDFLAGS) $(t_eoinsertion_OBJECTS) $(t_eoinsertion_LDADD) $(LIBS) + +t-eo: $(t_eo_OBJECTS) $(t_eo_DEPENDENCIES) + @rm -f t-eo + $(CXXLINK) $(t_eo_LDFLAGS) $(t_eo_OBJECTS) $(t_eo_LDADD) $(LIBS) + +t-eofitness: $(t_eofitness_OBJECTS) $(t_eofitness_DEPENDENCIES) + @rm -f t-eofitness + $(CXXLINK) $(t_eofitness_LDFLAGS) $(t_eofitness_OBJECTS) $(t_eofitness_LDADD) $(LIBS) + +t-eoproblem: $(t_eoproblem_OBJECTS) $(t_eoproblem_DEPENDENCIES) + @rm -f t-eoproblem + $(CXXLINK) $(t_eoproblem_LDFLAGS) $(t_eoproblem_OBJECTS) $(t_eoproblem_LDADD) $(LIBS) + +t-eobin: $(t_eobin_OBJECTS) $(t_eobin_DEPENDENCIES) + @rm -f t-eobin + $(CXXLINK) $(t_eobin_LDFLAGS) $(t_eobin_OBJECTS) $(t_eobin_LDADD) $(LIBS) + +t-eolottery: $(t_eolottery_OBJECTS) $(t_eolottery_DEPENDENCIES) + @rm -f t-eolottery + $(CXXLINK) $(t_eolottery_LDFLAGS) $(t_eolottery_OBJECTS) $(t_eolottery_LDADD) $(LIBS) + +t_eornd: $(t_eornd_OBJECTS) $(t_eornd_DEPENDENCIES) + @rm -f t_eornd + $(CXXLINK) $(t_eornd_LDFLAGS) $(t_eornd_OBJECTS) $(t_eornd_LDADD) $(LIBS) + +t_eovector: $(t_eovector_OBJECTS) $(t_eovector_DEPENDENCIES) + @rm -f t_eovector + $(CXXLINK) $(t_eovector_LDFLAGS) $(t_eovector_OBJECTS) $(t_eovector_LDADD) $(LIBS) + +t_eoaged: $(t_eoaged_OBJECTS) $(t_eoaged_DEPENDENCIES) + @rm -f t_eoaged + $(CXXLINK) $(t_eoaged_LDFLAGS) $(t_eoaged_OBJECTS) $(t_eoaged_LDADD) $(LIBS) + +t_eoid: $(t_eoid_OBJECTS) $(t_eoid_DEPENDENCIES) + @rm -f t_eoid + $(CXXLINK) $(t_eoid_LDFLAGS) $(t_eoid_OBJECTS) $(t_eoid_LDADD) $(LIBS) + +t_eostring: $(t_eostring_OBJECTS) $(t_eostring_DEPENDENCIES) + @rm -f t_eostring + $(CXXLINK) $(t_eostring_LDFLAGS) $(t_eostring_OBJECTS) $(t_eostring_LDADD) $(LIBS) + +t_ops: $(t_ops_OBJECTS) $(t_ops_DEPENDENCIES) + @rm -f t_ops + $(CXXLINK) $(t_ops_LDFLAGS) $(t_ops_OBJECTS) $(t_ops_LDADD) $(LIBS) + +t_popops: $(t_popops_OBJECTS) $(t_popops_DEPENDENCIES) + @rm -f t_popops + $(CXXLINK) $(t_popops_LDFLAGS) $(t_popops_OBJECTS) $(t_popops_LDADD) $(LIBS) + +t_pop: $(t_pop_OBJECTS) $(t_pop_DEPENDENCIES) + @rm -f t_pop + $(CXXLINK) $(t_pop_LDFLAGS) $(t_pop_OBJECTS) $(t_pop_LDADD) $(LIBS) + +t_es: $(t_es_OBJECTS) $(t_es_DEPENDENCIES) + @rm -f t_es + $(CXXLINK) $(t_es_LDFLAGS) $(t_es_OBJECTS) $(t_es_LDADD) $(LIBS) + +t_opsel: $(t_opsel_OBJECTS) $(t_opsel_DEPENDENCIES) + @rm -f t_opsel + $(CXXLINK) $(t_opsel_LDFLAGS) $(t_opsel_OBJECTS) $(t_opsel_LDADD) $(LIBS) + +t_opfactory: $(t_opfactory_OBJECTS) $(t_opfactory_DEPENDENCIES) + @rm -f t_opfactory + $(CXXLINK) $(t_opfactory_LDFLAGS) $(t_opfactory_OBJECTS) $(t_opfactory_LDADD) $(LIBS) + +t_opMut: $(t_opMut_OBJECTS) $(t_opMut_DEPENDENCIES) + @rm -f t_opMut + $(CXXLINK) $(t_opMut_LDFLAGS) $(t_opMut_OBJECTS) $(t_opMut_LDADD) $(LIBS) + +t_eobitfact: $(t_eobitfact_OBJECTS) $(t_eobitfact_DEPENDENCIES) + @rm -f t_eobitfact + $(CXXLINK) $(t_eobitfact_LDFLAGS) $(t_eobitfact_OBJECTS) $(t_eobitfact_LDADD) $(LIBS) +.cpp.o: + $(CXXCOMPILE) -c $< +.cpp.lo: + $(LTCXXCOMPILE) -c $< + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = test + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file; \ + done +t-eobreeder.o: t-eobreeder.cpp ../src/eo ../src/eoData.h \ + ../src/eoObject.h ../src/eoPrintable.h ../src/eoPersistent.h \ + ../src/EO.h ../src/eoID.h ../src/eoAged.h ../src/eoVector.h \ + ../src/eo1d.h ../src/eoRnd.h ../src/eoString.h \ + ../src/eoESChrom.h ../src/eoBin.h ../src/eoUniform.h \ + ../src/eoNormal.h ../src/eoNegExp.h ../src/eoOp.h \ + ../src/eoMultiMonOp.h ../src/eoDup.h ../src/eoKill.h \ + ../src/eoTranspose.h ../src/eoXOver2.h ../src/eoMutation.h \ + ../src/eoPop.h ../src/eoPopOps.h ../src/eoBitOp.h \ + ../src/eoLottery.h ../src/eoBreeder.h ../src/eoInsertion.h \ + ../src/eoInclusion.h ../src/eoFitness.h ../src/eoProblem.h +t-eoinsertion.o: t-eoinsertion.cpp ../src/eo ../src/eoData.h \ + ../src/eoObject.h ../src/eoPrintable.h ../src/eoPersistent.h \ + ../src/EO.h ../src/eoID.h ../src/eoAged.h ../src/eoVector.h \ + ../src/eo1d.h ../src/eoRnd.h ../src/eoString.h \ + ../src/eoESChrom.h ../src/eoBin.h ../src/eoUniform.h \ + ../src/eoNormal.h ../src/eoNegExp.h ../src/eoOp.h \ + ../src/eoMultiMonOp.h ../src/eoDup.h ../src/eoKill.h \ + ../src/eoTranspose.h ../src/eoXOver2.h ../src/eoMutation.h \ + ../src/eoPop.h ../src/eoPopOps.h ../src/eoBitOp.h \ + ../src/eoLottery.h ../src/eoBreeder.h ../src/eoInsertion.h \ + ../src/eoInclusion.h ../src/eoFitness.h ../src/eoProblem.h + +info: +dvi: +check: all + $(MAKE) +installcheck: +install-exec: + @$(NORMAL_INSTALL) + +install-data: + @$(NORMAL_INSTALL) + +install: install-exec install-data all + @: + +uninstall: + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install +installdirs: + + +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(DISTCLEANFILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \ + mostlyclean-libtool mostlyclean-tags \ + mostlyclean-generic + +clean: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ + clean-generic mostlyclean + +distclean: distclean-noinstPROGRAMS distclean-compile distclean-libtool \ + distclean-tags distclean-generic clean + -rm -f config.status + -rm -f libtool + +maintainer-clean: maintainer-clean-noinstPROGRAMS \ + maintainer-clean-compile maintainer-clean-libtool \ + maintainer-clean-tags maintainer-clean-generic \ + distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ +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 dvi \ +installcheck install-exec install-data install uninstall all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +############################################################################### + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp new file mode 100644 index 000000000..86b0f723a --- /dev/null +++ b/eo/test/t-eo.cpp @@ -0,0 +1,21 @@ +//----------------------------------------------------------------------------- +// t-eo.cpp +//----------------------------------------------------------------------------- + +#include // EO + +//----------------------------------------------------------------------------- + +typedef EO Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + Chrom chrom1, chrom2; + + cout << "chrom1 = " << chrom1 << endl + << "chrom2 = " << chrom2 << endl; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp new file mode 100644 index 000000000..deac01e5b --- /dev/null +++ b/eo/test/t-eobin.cpp @@ -0,0 +1,116 @@ +//----------------------------------------------------------------------------- +// t-eobin.cpp +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // eoBin + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned SIZE = 8; + unsigned i, j; + + Chrom chrom(SIZE), chrom2; + + cout << "chrom: " << chrom << endl; + chrom[0] = chrom[SIZE - 1] = true; + cout << "chrom: " << chrom << endl; + chrom[0] = chrom[SIZE - 1] = false; + cout << "chrom: " << chrom << endl; + chrom[0] = chrom[SIZE - 1] = true; + + cout << "chrom.className() = " << chrom.className() << endl; + + cout << "chrom: " << chrom << endl + << "chrom2: " << chrom2 << endl; + + ostrstream os; + os << chrom; + istrstream is(os.str()); + is >> chrom2; + + cout << "chrom: " << chrom << endl + << "chrom2: " << chrom2 << endl; + + fill(chrom.begin(), chrom.end(), false); + cout << "--------------------------------------------------" + << endl << "eoMonOp's aplied to .......... " << chrom << endl; + + eoBinRandom random; + random(chrom); + cout << "after eoBinRandom ............ " << chrom << endl; + + eoBinBitFlip bitflip; + bitflip(chrom); + cout << "after eoBitFlip .............. " << chrom << endl; + + eoBinMutation mutation(0.5); + mutation(chrom); + cout << "after eoBinMutation(0.5) ..... " << chrom << endl; + + eoBinInversion inversion; + inversion(chrom); + cout << "after eoBinInversion ......... " << chrom << endl; + + eoBinNext next; + next(chrom); + cout << "after eoBinNext .............. " << chrom << endl; + + eoBinPrev prev; + prev(chrom); + cout << "after eoBinPrev .............. " << chrom << endl; + + fill(chrom.begin(), chrom.end(), false); + fill(chrom2.begin(), chrom2.end(), true); + cout << "--------------------------------------------------" + << endl << "eoBinOp's aplied to ... " + << chrom << " " << chrom2 << endl; + + eoBinCrossover xover; + fill(chrom.begin(), chrom.end(), false); + fill(chrom2.begin(), chrom2.end(), true); + xover(chrom, chrom2); + cout << "eoBinCrossover ........ " << chrom << " " << chrom2 << endl; + + for (i = 1; i < SIZE; i++) + { + eoBinNxOver nxover(i); + fill(chrom.begin(), chrom.end(), false); + fill(chrom2.begin(), chrom2.end(), true); + nxover(chrom, chrom2); + cout << "eoBinNxOver(" << i << ") ........ " + << chrom << " " << chrom2 << endl; + } + + for (i = 1; i < SIZE / 2; i++) + for (j = 1; j < SIZE / 2; j++) + { + eoBinGxOver gxover(i, j); + fill(chrom.begin(), chrom.end(), false); + fill(chrom2.begin(), chrom2.end(), true); + gxover(chrom, chrom2); + cout << "eoBinGxOver(" << i << ", " << j << ") ..... " + << chrom << " " << chrom2 << endl; + } + + for (float r = 0.1; r < 1.0; r += 0.1) + { + eoBinUxOver uxover(r); + fill(chrom.begin(), chrom.end(), false); + fill(chrom2.begin(), chrom2.end(), true); + uxover(chrom, chrom2); + cout << "eoBinUxOver(" << r << ") ...... " + << chrom << " " << chrom2 << endl; + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp new file mode 100644 index 000000000..dcb016280 --- /dev/null +++ b/eo/test/t-eobreeder.cpp @@ -0,0 +1,65 @@ +//----------------------------------------------------------------------------- +// t-eobreeder.cpp +//----------------------------------------------------------------------------- + +#include // srand +#include // time +#include // eoBin, eoPop, eoBreeder + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + srand(time(NULL)); + + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop, pop2; + + for (i = 0; i < POP_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoBreeder breeder; + breeder.add(bitflip, 1.0); + breeder.add(xover, 1.0); + + pop2 = pop; + breeder(pop2); + + for (i = 0; i < pop2.size(); i++) + binary_value(pop2[i]); + + cout << "population: \tnew population" << endl; + for (i = 0; i < pop.size(); i++) + cout << pop[i] << " " << pop[i].fitness() << " \t" + << pop2[i] << " " << pop2[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp new file mode 100644 index 000000000..9efe6dcc8 --- /dev/null +++ b/eo/test/t-eofitness.cpp @@ -0,0 +1,77 @@ +//----------------------------------------------------------------------------- +// t-eofitness.cpp +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#include // cout +#include // eoFitness + +//----------------------------------------------------------------------------- + +class eoFloat: public eoFitness +{ +public: + bool operator<(const eoFitness& other) const + { + const eoFloat& x = (const eoFloat&) other; + return fitness < x.fitness; + } + + operator float() const + { + return fitness; + } + + void printOn(ostream& os) const + { + os << fitness; + } + + void readFrom(istream& is) + { + is >> fitness; + } + +private: + float fitness; +}; + +//----------------------------------------------------------------------------- + +main() +{ + eoFloat a, b; + + unsigned repeat = 2; + while (repeat--) + { + cout << "------------------------------------------------------" << endl; + cout << "testing < "; + if (a < b) + cout << a << " < " << b << " is true" << endl; + else + cout << a << " < " << b << " is false" < "; + if (a > b) + cout << a << " > " << b << " is true" << endl; + else + cout << a << " > " << b << " is false" < // eoBin, eoPop, eoInclusion + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + + for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) + { + eoPop pop; + + for (unsigned i = 0; i < POP_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) + { + eoPop pop2, pop3, pop4, pop5; + + for (i = 0; i < POP2_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop2.push_back(chrom); + } + + cout << "--------------------------------------------------" << endl + << "breeders \tpop" << endl + << "--------------------------------------------------" << endl; + for (i = 0; i < max(pop.size(), pop2.size()); i++) + { + if (pop.size() > i) + cout << pop[i] << " " << pop[i].fitness() << " \t"; + else + cout << "\t\t"; + if (pop2.size() > i) + cout << pop2[i] << " " << pop2[i].fitness(); + cout << endl; + } + + eoInclusion inclusion(0.75); + pop3 = pop2; + inclusion(pop, pop3); + + eoInclusion inclusion2; + pop4 = pop2; + inclusion2(pop, pop4); + + eoInclusion inclusion3(1.5); + pop5 = pop2; + inclusion3(pop, pop5); + + cout << endl + << "0.75 \t\t1.0 \t\t1.5" << endl + << "---- \t\t--- \t\t---" << endl; + for (i = 0; i < pop5.size(); i++) + { + if (pop3.size() > i) + cout << pop3[i] << " " << pop3[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop4.size() > i) + cout << pop4[i] << " " << pop4[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop5.size() > i) + cout << pop5[i] << " " << pop5[i].fitness(); + cout << endl; + } + } + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoinsertion.cpp b/eo/test/t-eoinsertion.cpp new file mode 100644 index 000000000..ba8c50ad4 --- /dev/null +++ b/eo/test/t-eoinsertion.cpp @@ -0,0 +1,105 @@ +//----------------------------------------------------------------------------- +// t-eoinsertion.cpp +//----------------------------------------------------------------------------- + +#include // eoBin, eoPop, eoInsertion + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + + for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) + { + eoPop pop; + + for (i = 0; i < POP_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) + { + eoPop pop2, pop3, pop4, pop5; + + for (i = 0; i < POP2_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop2.push_back(chrom); + } + + cout << "--------------------------------------------------" << endl + << "breeders \tpop" << endl + << "--------------------------------------------------" << endl; + for (i = 0; i < max(pop.size(), pop2.size()); i++) + { + if (pop.size() > i) + cout << pop[i] << " " << pop[i].fitness() << " \t"; + else + cout << "\t\t"; + if (pop2.size() > i) + cout << pop2[i] << " " << pop2[i].fitness(); + cout << endl; + } + + eoInsertion insertion(0.75); + pop3 = pop2; + insertion(pop, pop3); + + eoInsertion insertion2; + pop4 = pop2; + insertion2(pop, pop4); + + eoInsertion insertion3(1.5); + pop5 = pop2; + insertion3(pop, pop5); + + cout << endl + << "0.75 \t\t1.0 \t\t1.5" << endl + << "---- \t\t--- \t\t---" << endl; + for (i = 0; i < pop5.size(); i++) + { + if (pop3.size() > i) + cout << pop3[i] << " " << pop3[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop4.size() > i) + cout << pop4[i] << " " << pop4[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop5.size() > i) + cout << pop5[i] << " " << pop5[i].fitness(); + cout << endl; + } + } + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eolottery.cpp b/eo/test/t-eolottery.cpp new file mode 100644 index 000000000..8ee3bc19a --- /dev/null +++ b/eo/test/t-eolottery.cpp @@ -0,0 +1,53 @@ +//----------------------------------------------------------------------------- +// t-eolottery.cpp +//----------------------------------------------------------------------------- + +#include // eoBin, eoPop, eoLottery + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, i); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + + eoUniform uniform(false, true); + eoPop pop, pop2; + eoBinRandom random; + unsigned i; + + for (i = 0; i < POP_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "original population:" << endl; + for (i = 0; i < pop.size(); i++) + cout << pop[i] << " " << pop[i].fitness() << endl; + + eoLottery lottery; + lottery(pop, pop2); + + cout << "selected by lottery population:" << endl; + for (i = 0; i < pop2.size(); i++) + cout << pop2[i] << " " << pop2[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoproblem.cpp b/eo/test/t-eoproblem.cpp new file mode 100644 index 000000000..81443c19a --- /dev/null +++ b/eo/test/t-eoproblem.cpp @@ -0,0 +1,52 @@ +//----------------------------------------------------------------------------- +// t-eoproblem.cpp +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#include // time +#include // fabs +#include // cout +#include // eoVector, eoProblem + +//----------------------------------------------------------------------------- + +typedef eoVector Chrom; + +//----------------------------------------------------------------------------- + +ostream& operator<<(ostream& os, const Chrom& chrom) +{ + copy(chrom.begin(), chrom.end(), ostream_iterator(os)); + return os; +} + +//----------------------------------------------------------------------------- + +class Easy//: public eoProblem +{ +public: + const size = 1; + + float operator()(const Chrom& chrom) + { + return 1.0 / (fabs(chrom[0]) + 1.0); + } +}; + +//----------------------------------------------------------------------------- + +main() +{ + Easy easy; + Chrom chrom(Easy::size); + + srand(time(0)); + + chrom[0] = ((float)rand()) / ((float)RAND_MAX); + chrom.fitness(easy(chrom)); + + cout << "chrom = " << chrom << endl + << "chrom.fitness() = " << chrom.fitness() << endl; +} + +//----------------------------------------------------------------------------- From 3214eead0ebef7a764e9187e4c79e99c2172d41d Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 12:05:57 +0000 Subject: [PATCH 0033/2134] *** empty log message *** --- eo/.cvsignore | 1 + eo/test/.cvsignore | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 eo/test/.cvsignore diff --git a/eo/.cvsignore b/eo/.cvsignore index 0339526b1..01f4e70db 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -1,5 +1,6 @@ *.lo *.la +*.gus .deps .libs Makefile diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore new file mode 100644 index 000000000..174565f36 --- /dev/null +++ b/eo/test/.cvsignore @@ -0,0 +1,3 @@ +*.o +core +Makefile From 8056d48505994eecbea4e8070db10ba4c311e73d Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 12:11:11 +0000 Subject: [PATCH 0034/2134] *** empty log message *** --- eo/.cvsignore | 1 - eo/test/Makefile.in | 222 +++++++++++++++++++++++++++----------------- 2 files changed, 136 insertions(+), 87 deletions(-) diff --git a/eo/.cvsignore b/eo/.cvsignore index 01f4e70db..0339526b1 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -1,6 +1,5 @@ *.lo *.la -*.gus .deps .libs Makefile diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 7231bf672..4e4daa163 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.3 from Makefile.am +# Makefile.in generated automatically by automake 1.4a from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,7 +14,7 @@ ############################################################################### -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -35,7 +35,7 @@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include -DISTDIR = +DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,6 +52,7 @@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -62,8 +63,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ +AS = @AS@ CC = @CC@ CXX = @CXX@ +DLLTOOL = @DLLTOOL@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ @@ -72,6 +75,7 @@ MAKEINFO = @MAKEINFO@ NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ +USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ VERSION = @VERSION@ DEPS = $(top_builddir)/src/libeo.a @@ -144,7 +148,6 @@ t_eornd_LDFLAGS = -lm ############################################################################### t_eovector_SOURCES = t_eovector.cpp -t_eovector_LDFLAGS = -lm t_eovector_LDADD = $(LDADDS) ############################################################################### @@ -167,12 +170,6 @@ t_eostring_LDADD = $(LDADDS) ############################################################################### -t_eostring_SOURCES = t_eostring.cpp -t_eostring_DEPENDENCIES = $(DEPS) -t_eostring_LDADD = $(LDADDS) - -############################################################################### - t_es_SOURCES = t_es.cpp t_es_DEPENDENCIES = $(DEPS) t_es_LDADD = $(LDADDS) @@ -269,27 +266,33 @@ t_opMut_LDFLAGS = t_eobitfact_OBJECTS = t_eobitfact.o t_eobitfact_LDFLAGS = CXXFLAGS = @CXXFLAGS@ -CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) -CXXLINK = $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar -GZIP = --best +TAR = gtar +GZIP_ENV = --best +DEP_FILES = .deps/t-eo.P .deps/t-eobin.P .deps/t-eobreeder.P \ +.deps/t-eofitness.P .deps/t-eoinclusion.P .deps/t-eoinsertion.P \ +.deps/t-eolottery.P .deps/t-eoproblem.P .deps/t_eoaged.P \ +.deps/t_eobitfact.P .deps/t_eoid.P .deps/t_eornd.P .deps/t_eostring.P \ +.deps/t_eovector.P .deps/t_es.P .deps/t_opMut.P .deps/t_opfactory.P \ +.deps/t_ops.P .deps/t_opsel.P .deps/t_pop.P .deps/t_popops.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_eornd_SOURCES) $(t_eovector_SOURCES) $(t_eoaged_SOURCES) $(t_eoid_SOURCES) $(t_eostring_SOURCES) $(t_ops_SOURCES) $(t_popops_SOURCES) $(t_pop_SOURCES) $(t_es_SOURCES) $(t_opsel_SOURCES) $(t_opfactory_SOURCES) $(t_opMut_SOURCES) $(t_eobitfact_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_eornd_OBJECTS) $(t_eovector_OBJECTS) $(t_eoaged_OBJECTS) $(t_eoid_OBJECTS) $(t_eostring_OBJECTS) $(t_ops_OBJECTS) $(t_popops_OBJECTS) $(t_pop_OBJECTS) $(t_es_OBJECTS) $(t_opsel_OBJECTS) $(t_opfactory_OBJECTS) $(t_opMut_OBJECTS) $(t_eobitfact_OBJECTS) -all: Makefile $(PROGRAMS) - +all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .cpp .lo .o .s -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + 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 @@ -303,9 +306,6 @@ distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: -.c.o: - $(COMPILE) -c $< - .s.o: $(COMPILE) -c $< @@ -322,9 +322,6 @@ distclean-compile: maintainer-clean-compile: -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< @@ -432,8 +429,12 @@ t_eobitfact: $(t_eobitfact_OBJECTS) $(t_eobitfact_DEPENDENCIES) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) + && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ @@ -459,98 +460,147 @@ 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); \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file; \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ done -t-eobreeder.o: t-eobreeder.cpp ../src/eo ../src/eoData.h \ - ../src/eoObject.h ../src/eoPrintable.h ../src/eoPersistent.h \ - ../src/EO.h ../src/eoID.h ../src/eoAged.h ../src/eoVector.h \ - ../src/eo1d.h ../src/eoRnd.h ../src/eoString.h \ - ../src/eoESChrom.h ../src/eoBin.h ../src/eoUniform.h \ - ../src/eoNormal.h ../src/eoNegExp.h ../src/eoOp.h \ - ../src/eoMultiMonOp.h ../src/eoDup.h ../src/eoKill.h \ - ../src/eoTranspose.h ../src/eoXOver2.h ../src/eoMutation.h \ - ../src/eoPop.h ../src/eoPopOps.h ../src/eoBitOp.h \ - ../src/eoLottery.h ../src/eoBreeder.h ../src/eoInsertion.h \ - ../src/eoInclusion.h ../src/eoFitness.h ../src/eoProblem.h -t-eoinsertion.o: t-eoinsertion.cpp ../src/eo ../src/eoData.h \ - ../src/eoObject.h ../src/eoPrintable.h ../src/eoPersistent.h \ - ../src/EO.h ../src/eoID.h ../src/eoAged.h ../src/eoVector.h \ - ../src/eo1d.h ../src/eoRnd.h ../src/eoString.h \ - ../src/eoESChrom.h ../src/eoBin.h ../src/eoUniform.h \ - ../src/eoNormal.h ../src/eoNegExp.h ../src/eoOp.h \ - ../src/eoMultiMonOp.h ../src/eoDup.h ../src/eoKill.h \ - ../src/eoTranspose.h ../src/eoXOver2.h ../src/eoMutation.h \ - ../src/eoPop.h ../src/eoPopOps.h ../src/eoBitOp.h \ - ../src/eoLottery.h ../src/eoBreeder.h ../src/eoInsertion.h \ - ../src/eoInclusion.h ../src/eoFitness.h ../src/eoProblem.h -info: -dvi: -check: all - $(MAKE) -installcheck: -install-exec: - @$(NORMAL_INSTALL) +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) -install-data: - @$(NORMAL_INSTALL) +-include $(DEP_FILES) -install: install-exec install-data all - @: +mostlyclean-depend: -uninstall: +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: %.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: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) +all-redirect: all-am install-strip: - $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install installdirs: mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(DISTCLEANFILES) + -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags \ +mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ mostlyclean-generic -clean: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ - clean-generic mostlyclean +mostlyclean: mostlyclean-am -distclean: distclean-noinstPROGRAMS distclean-compile distclean-libtool \ - distclean-tags distclean-generic clean - -rm -f config.status +clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstPROGRAMS distclean-compile \ + distclean-libtool distclean-tags distclean-depend \ + distclean-generic clean-am -rm -f libtool -maintainer-clean: maintainer-clean-noinstPROGRAMS \ +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-tags maintainer-clean-generic \ - distclean + 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." +maintainer-clean: maintainer-clean-am + .PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ 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 dvi \ -installcheck install-exec install-data install uninstall 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 ############################################################################### From b0232f9c0c810427df122be30015da0d2933286c Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 12:13:53 +0000 Subject: [PATCH 0035/2134] updating eo/test/.cvsignore for new eoBin tests --- eo/test/.cvsignore | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index 174565f36..c7c756d90 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -1,3 +1,9 @@ *.o -core +.deps Makefile +t-eo +t-eobin +t-eolottery +t-eoinclusion +t-eoinsertion +t-eoproblem From 06db0c058e48011852cca0a2af7c988825d8c6c2 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 10 Sep 1999 12:21:50 +0000 Subject: [PATCH 0036/2134] *** empty log message *** --- eo/test/Makefile.am | 85 +-------------------------------------------- 1 file changed, 1 insertion(+), 84 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index d8d2be5fc..85b62fec5 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t_eornd t_eovector t_eoaged t_eoid t_eostring t_ops t_popops t_pop t_es t_opsel t_opfactory t_opMut t_eobitfact +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery ############################################################################### @@ -67,86 +67,3 @@ t_eovector_LDFLAGS = -lm t_eolottery_LDADD = $(LDADDS) ############################################################################### - -t_eornd_SOURCES = t_eornd.cpp -t_eornd_LDFLAGS = -lm - -############################################################################### - -t_eovector_SOURCES = t_eovector.cpp -t_eovector_LDFLAGS = -lm -t_eovector_LDADD = $(LDADDS) - -############################################################################### - -t_eoaged_SOURCES = t_eoaged.cpp -t_eoaged_DEPENDENCIES = $(DEPS) -t_eoaged_LDADD = $(LDADDS) - -############################################################################### - -t_eoid_SOURCES = t_eoid.cpp -t_eoid_DEPENDENCIES = $(DEPS) -t_eoid_LDADD = $(LDADDS) - -############################################################################### - -t_eostring_SOURCES = t_eostring.cpp -t_eostring_DEPENDENCIES = $(DEPS) -t_eostring_LDADD = $(LDADDS) - -############################################################################### - -t_eostring_SOURCES = t_eostring.cpp -t_eostring_DEPENDENCIES = $(DEPS) -t_eostring_LDADD = $(LDADDS) - -############################################################################### - -t_es_SOURCES = t_es.cpp -t_es_DEPENDENCIES = $(DEPS) -t_es_LDADD = $(LDADDS) - -############################################################################### - -t_ops_SOURCES = t_ops.cpp -t_ops_DEPENDENCIES = $(DEPS) -t_ops_LDADD = $(LDADDS) - -############################################################################### - -t_pop_SOURCES = t_pop.cpp -t_pop_DEPENDENCIES = $(DEPS) -t_pop_LDADD = $(LDADDS) - -############################################################################### - -t_popops_SOURCES = t_popops.cpp -t_popops_DEPENDENCIES = $(DEPS) -t_popops_LDADD = $(LDADDS) - -############################################################################### - -t_opsel_SOURCES = t_opsel.cpp -t_opsel_DEPENDENCIES = $(DEPS) -t_opsel_LDADD = $(LDADDS) - -############################################################################### - -t_opfactory_SOURCES = t_opfactory.cpp -t_opfactory_DEPENDENCIES = $(DEPS) -t_opfactory_LDADD = $(LDADDS) - -############################################################################### - -t_opMut_SOURCES = t_opMut.cpp -t_opMut_DEPENDENCIES = $(DEPS) -t_opMut_LDADD = $(LDADDS) - -############################################################################### - -t_eobitfact_SOURCES = t_eobitfact.cpp -t_eobitfact_DEPENDENCIES = $(DEPS) -t_eobitfact_LDADD = $(LDADDS) - -############################################################################### From 759dba7ea83f1f9e6d09e40fe98c83cbdb5bf366 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 20 Sep 1999 11:35:01 +0000 Subject: [PATCH 0037/2134] Changes to eo1d interface and bug fixes --- eo/src/EO.h | 17 ++++ eo/src/eo | 18 ++++ eo/src/eo1d.h | 40 ++++++--- eo/src/eoAged.h | 18 ++++ eo/src/eoBin.h | 8 +- eo/src/eoBitOpFactory.h | 18 ++++ eo/src/eoDrawable.h | 17 ++++ eo/src/eoDup.h | 18 ++++ eo/src/eoESChrom.h | 17 ++++ eo/src/eoEvalFunc.h | 17 ++++ eo/src/eoEvaluator.h | 17 ++++ eo/src/eoFactory.h | 17 ++++ eo/src/eoFitness.h | 18 ++++ eo/src/eoID.h | 17 ++++ eo/src/eoInsertion.h | 2 +- eo/src/eoKill.h | 17 ++++ eo/src/eoMultiMonOp.h | 17 ++++ eo/src/eoMutation.h | 17 ++++ eo/src/eoNegExp.h | 17 ++++ eo/src/eoNormal.h | 17 ++++ eo/src/eoObject.h | 17 ++++ eo/src/eoOp.h | 17 ++++ eo/src/eoOpFactory.h | 18 ++++ eo/src/eoOpSelMason.h | 17 ++++ eo/src/eoOpSelector.h | 19 +++- eo/src/eoPersistent.h | 17 ++++ eo/src/eoPop.h | 17 ++++ eo/src/eoPopOps.h | 18 ++++ eo/src/eoPrintable.h | 17 ++++ eo/src/eoProblem.h | 17 ++++ eo/src/eoProportionalOpSel.h | 19 +++- eo/src/eoRandomBreed.h | 17 ++++ eo/src/eoRandomSelect.h | 17 ++++ eo/src/eoRank.h | 17 ++++ eo/src/eoRnd.h | 17 ++++ eo/src/eoSelectFactory.h | 18 ++++ eo/src/eoSimpleEval.h | 17 ++++ eo/src/eoString.h | 17 ++++ eo/src/eoTournament.h | 17 ++++ eo/src/eoTranspose.h | 17 ++++ eo/src/eoUniform.h | 18 ++++ eo/src/eoVector.h | 25 +++++- eo/src/eoXOver2.h | 17 ++++ eo/test/Makefile.in | 166 +---------------------------------- eo/test/t-eobreeder.cpp | 45 +++++----- eo/test/t-eoinclusion.cpp | 4 +- eo/test/t-eoproblem.cpp | 3 +- 47 files changed, 762 insertions(+), 207 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 9ace34bc4..233746bc8 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // EO.h // (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EO_H diff --git a/eo/src/eo b/eo/src/eo index 26d58a985..75e0716d9 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -1,6 +1,23 @@ //----------------------------------------------------------------------------- // eo // (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _eo_ @@ -12,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h index c33d7cb68..956d8a6fd 100644 --- a/eo/src/eo1d.h +++ b/eo/src/eo1d.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eo1d.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EO1D_H @@ -16,7 +33,7 @@ using namespace std; -/** @name EO1d class +/** @name eo1d class * Randomly accesible evolvable object with one dimension, with variable length. * Use this if you want to evolve "linear" things, like bitstrings, or @@ -52,8 +69,9 @@ public: */ eo1d( unsigned _size, eoRnd& _rndGen, const string& _ID = ""); - /** Ctor from a istream. It just passes the stream to EO. - @param _is the input stream; eo1d just cares about the fitness + /** Ctor from a istream. It just passes the stream to EO, subclasses should + have to implement this. + @param _is the input stream */ eo1d( istream& _is): EO( _is ){}; @@ -77,7 +95,7 @@ public: @return what's inside the gene, with the correct type @exception out_of_range if _i > size() */ - virtual T gene( unsigned _i ) const = 0; + virtual T getGene( unsigned _i ) const = 0; /** Overwrites the gene placed in position _i with a * new value. This means that the assignment operator @@ -86,7 +104,7 @@ public: @return what's inside the gene, with the correct type @exception out_of_range if _i > size() */ - virtual T& gene( unsigned _i ) = 0; + virtual void setGene( unsigned _i, const T& _value ) = 0; /** Inserts a gene, moving the rest to the right. If * _i = length(), it should insert it at the end. @@ -116,19 +134,21 @@ public: virtual void readFrom(istream& _s) { for ( unsigned i = 0; i < length(); i ++ ) { - _s >> gene( i ); + T tmp; + _s >> tmp; + setGene( i, tmp ); } // there is no way of distinguishing fitness from the object, so // it's skipped } - /** Print itself: inherited from eoObject implementation. Declared virtual so that - it can be reimplemented anywhere. Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. + /** Print itself: inherited from eoObject implementation. + Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. @param _s the ostream in which things are written*/ virtual void printOn( ostream& _s ) const{ for ( unsigned i = 0; i < length(); i ++ ) { - _s << gene( i ) << " "; + _s << getGene( i ) << " "; } } diff --git a/eo/src/eoAged.h b/eo/src/eoAged.h index a044688f4..7c626e019 100644 --- a/eo/src/eoAged.h +++ b/eo/src/eoAged.h @@ -1,8 +1,26 @@ +// eoAged.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoAge.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOAGED_H diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index e1a1c0210..b78cff475 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -25,20 +25,20 @@ template class eoBin: public eoVector * (Default) Constructor. * @param size Size of the binary string. */ - eoBin(const unsigned& size = 0, const bool& value = false): + eoBin(unsigned size = 0, bool value = false): eoVector(size, value) {} /** * Constructor. * @param size Size of the binary string. */ - eoBin(const unsigned& size, const eoRnd& rnd): eoVector(size) + eoBin(unsigned size, const eoRnd& rnd): eoVector(size) { generate(begin(), end(), rnd); } - /// Constructor from istream. - /// @param is The istream to read from. + /** Constructor from istream. + @param is The istream to read from.*/ eoBin(istream& _is):eoVector(_is){}; /// My class name. diff --git a/eo/src/eoBitOpFactory.h b/eo/src/eoBitOpFactory.h index 2ca12d75e..b47b6459a 100644 --- a/eo/src/eoBitOpFactory.h +++ b/eo/src/eoBitOpFactory.h @@ -1,8 +1,26 @@ +// eoBitOpFactory.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoOpFactory.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOBITOPFACTORY_H diff --git a/eo/src/eoDrawable.h b/eo/src/eoDrawable.h index 72885dca2..221bf2c1e 100644 --- a/eo/src/eoDrawable.h +++ b/eo/src/eoDrawable.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoDrawable.h // (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EODRAWABLE_H diff --git a/eo/src/eoDup.h b/eo/src/eoDup.h index be1f68c92..ade6c248f 100644 --- a/eo/src/eoDup.h +++ b/eo/src/eoDup.h @@ -1,8 +1,26 @@ +// eoDup.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoKill.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EODUP_h diff --git a/eo/src/eoESChrom.h b/eo/src/eoESChrom.h index 04a2e6d4a..b5a66a4e1 100644 --- a/eo/src/eoESChrom.h +++ b/eo/src/eoESChrom.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoESChrom.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 76043898f..1d6f98192 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoEvalFunc.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef eoEvalFunc_H diff --git a/eo/src/eoEvaluator.h b/eo/src/eoEvaluator.h index 53e3e0836..1e03b6046 100644 --- a/eo/src/eoEvaluator.h +++ b/eo/src/eoEvaluator.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoEvaluator.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOEVALUATOR_H diff --git a/eo/src/eoFactory.h b/eo/src/eoFactory.h index ded9ab4c0..05f9f8a43 100644 --- a/eo/src/eoFactory.h +++ b/eo/src/eoFactory.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoFactory.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOFACTORY_H diff --git a/eo/src/eoFitness.h b/eo/src/eoFitness.h index c7d87c9cc..8696f496c 100644 --- a/eo/src/eoFitness.h +++ b/eo/src/eoFitness.h @@ -1,6 +1,24 @@ +// eoFitness.h //----------------------------------------------------------------------------- // eoFitness.cpp // (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOFITNESS_H diff --git a/eo/src/eoID.h b/eo/src/eoID.h index 61f142f19..7488d26bd 100644 --- a/eo/src/eoID.h +++ b/eo/src/eoID.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoID.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOID_H diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 7d8507e18..994645e13 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -19,7 +19,7 @@ template class eoInsertion: public eoMerge { public: /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} + eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} /** * Creates a new population based on breeders and original populations. diff --git a/eo/src/eoKill.h b/eo/src/eoKill.h index 7810d6e09..bddcbb2bb 100644 --- a/eo/src/eoKill.h +++ b/eo/src/eoKill.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoKill.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOKILL_h diff --git a/eo/src/eoMultiMonOp.h b/eo/src/eoMultiMonOp.h index e44931b5d..c46f87779 100644 --- a/eo/src/eoMultiMonOp.h +++ b/eo/src/eoMultiMonOp.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoMultiMonOp.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOMULTIMONOP_h diff --git a/eo/src/eoMutation.h b/eo/src/eoMutation.h index 82c9c64e7..466c377ee 100644 --- a/eo/src/eoMutation.h +++ b/eo/src/eoMutation.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoMutation.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOMUTATION_H #define _EOMUTATION_H diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h index db4f58366..54812ed2b 100644 --- a/eo/src/eoNegExp.h +++ b/eo/src/eoNegExp.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoNegExp.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EONEGEXP_H diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h index a75adef99..c06916738 100644 --- a/eo/src/eoNormal.h +++ b/eo/src/eoNormal.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoNormal.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EONORMAL_H diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 7cd3365ca..56a746b58 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoObject.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOOBJECT_H diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index ac7027616..2b0b13e30 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoOp.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _eoOp_H diff --git a/eo/src/eoOpFactory.h b/eo/src/eoOpFactory.h index 9ffe402b7..f4182acd9 100644 --- a/eo/src/eoOpFactory.h +++ b/eo/src/eoOpFactory.h @@ -1,8 +1,26 @@ +// eoOpFactory.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoMonOpFactory.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOOPFACTORY_H diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index d8fb07221..3f96d8226 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoOpSelMason.h // (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOOPSELMASON_H diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 717071c38..2ee11205c 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoOpSelector.h // (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOOPSELECTOR_H @@ -44,7 +61,7 @@ public: @param _id a previously assigned ID @throw runtime_exception if the ID does not exist */ - virtual deleteOp( ID _id ) = 0; + virtual void deleteOp( ID _id ) = 0; /// Returns a genetic operator according to the established criteria virtual eoOp* Op() = 0; diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index 964134121..1fe0acdf2 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoPersistent.h // (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOPERSISTENT_H diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index cc2edf25d..bd1c3390b 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoPop.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOPOP_H diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index f97e7899d..7ece0de6a 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -1,8 +1,26 @@ +// eoPopOps.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eo1d.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOPOPOPS_H diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index f2c25a24a..dc761ebf6 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoPrintable.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOPRINTABLE_H diff --git a/eo/src/eoProblem.h b/eo/src/eoProblem.h index a1f5e7b65..c8ab40449 100644 --- a/eo/src/eoProblem.h +++ b/eo/src/eoProblem.h @@ -1,6 +1,23 @@ //----------------------------------------------------------------------------- // eoProblem.h // (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOPROBLEM_H diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index ba2556962..0e4d93add 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoProportionalOpSel.h // (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOPROPORTIONALOPSEL_H @@ -67,7 +84,7 @@ public: @param _id a previously assigned ID @throw runtime_error if the ID does not exist */ - virtual deleteOp( ID _id ) { + virtual void deleteOp( ID _id ) { unsigned j; MMF::iterator i; for ( i=begin(), j=1; i!=end(); i++,j++ ) { diff --git a/eo/src/eoRandomBreed.h b/eo/src/eoRandomBreed.h index a0faa0f1c..dd22d8437 100644 --- a/eo/src/eoRandomBreed.h +++ b/eo/src/eoRandomBreed.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoRandomBreed.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EORANDOMBREED_H diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 9b6ad0bc5..651174e8a 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoRandomSelect.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EORANDOMSELECT_H diff --git a/eo/src/eoRank.h b/eo/src/eoRank.h index db441dd59..adc3ff83b 100644 --- a/eo/src/eoRank.h +++ b/eo/src/eoRank.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoRank.h // (c) GeNeura Team 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _eoRank_H diff --git a/eo/src/eoRnd.h b/eo/src/eoRnd.h index ef4c2328e..84a4a66a9 100644 --- a/eo/src/eoRnd.h +++ b/eo/src/eoRnd.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoRnd.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EORND_H diff --git a/eo/src/eoSelectFactory.h b/eo/src/eoSelectFactory.h index 2169bef25..1d83f5f4c 100644 --- a/eo/src/eoSelectFactory.h +++ b/eo/src/eoSelectFactory.h @@ -1,8 +1,26 @@ +// eoSelectFactory.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // EOFactory.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOSELECTFACTORY_H diff --git a/eo/src/eoSimpleEval.h b/eo/src/eoSimpleEval.h index 5a1e895f5..40e735c65 100644 --- a/eo/src/eoSimpleEval.h +++ b/eo/src/eoSimpleEval.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoSimpleEval.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOSimpleEval_H diff --git a/eo/src/eoString.h b/eo/src/eoString.h index fc4c84f4b..f2e60f451 100644 --- a/eo/src/eoString.h +++ b/eo/src/eoString.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoString.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _eoString_H diff --git a/eo/src/eoTournament.h b/eo/src/eoTournament.h index 29b890647..c71e16ad9 100644 --- a/eo/src/eoTournament.h +++ b/eo/src/eoTournament.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoTournament.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOGSTOURN_H diff --git a/eo/src/eoTranspose.h b/eo/src/eoTranspose.h index bafd03f16..2987fca0a 100644 --- a/eo/src/eoTranspose.h +++ b/eo/src/eoTranspose.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoTranspose.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOTRANSPOSE_h diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index d53ec9674..eec13ac42 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -1,8 +1,26 @@ +// eoUniform.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // EOUniform.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOUNIFORM_H diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index a70723b75..f116608c7 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoVector.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- @@ -24,7 +41,7 @@ template class eoVector: public eo1d, public vector { public: - typedef Type T; + typedef T Type ; /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator //@{ @@ -70,7 +87,7 @@ which is supposed to be dynamic and dependent on environment. /** methods that implement the eo1d protocol @exception out_of_range if _i is larger than EO´s size */ - virtual T gene( unsigned _i ) const { + virtual T getGene( unsigned _i ) const { if ( _i >= length() ) throw out_of_range( "out_of_range when reading gene"); return (*this)[_i]; @@ -79,10 +96,10 @@ which is supposed to be dynamic and dependent on environment. /** methods that implement the eo1d protocol @exception out_of_range if _i is larger than EO´s size */ - virtual T& gene( unsigned _i ) { + virtual void setGene( unsigned _i, const T& _value ) { if ( _i >= size() ) throw out_of_range( "out_of_range when writing a gene"); - return operator[](_i); + (*this)[_i] = _value; }; /** methods that implement the eo1d protocol diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h index 8f70e030c..9361f91ec 100644 --- a/eo/src/eoXOver2.h +++ b/eo/src/eoXOver2.h @@ -3,6 +3,23 @@ //----------------------------------------------------------------------------- // eoXOver2.h // (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOXOVER2_h diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 4e4daa163..121631200 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -87,7 +87,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t_eornd t_eovector t_eoaged t_eoid t_eostring t_ops t_popops t_pop t_es t_opsel t_opfactory t_opMut t_eobitfact +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery ############################################################################### @@ -139,82 +139,6 @@ t_eolottery_SOURCES = t-eolottery.cpp t_eolottery_DEPENDENCIES = $(DEPS) t_eovector_LDFLAGS = -lm t_eolottery_LDADD = $(LDADDS) - -############################################################################### - -t_eornd_SOURCES = t_eornd.cpp -t_eornd_LDFLAGS = -lm - -############################################################################### - -t_eovector_SOURCES = t_eovector.cpp -t_eovector_LDADD = $(LDADDS) - -############################################################################### - -t_eoaged_SOURCES = t_eoaged.cpp -t_eoaged_DEPENDENCIES = $(DEPS) -t_eoaged_LDADD = $(LDADDS) - -############################################################################### - -t_eoid_SOURCES = t_eoid.cpp -t_eoid_DEPENDENCIES = $(DEPS) -t_eoid_LDADD = $(LDADDS) - -############################################################################### - -t_eostring_SOURCES = t_eostring.cpp -t_eostring_DEPENDENCIES = $(DEPS) -t_eostring_LDADD = $(LDADDS) - -############################################################################### - -t_es_SOURCES = t_es.cpp -t_es_DEPENDENCIES = $(DEPS) -t_es_LDADD = $(LDADDS) - -############################################################################### - -t_ops_SOURCES = t_ops.cpp -t_ops_DEPENDENCIES = $(DEPS) -t_ops_LDADD = $(LDADDS) - -############################################################################### - -t_pop_SOURCES = t_pop.cpp -t_pop_DEPENDENCIES = $(DEPS) -t_pop_LDADD = $(LDADDS) - -############################################################################### - -t_popops_SOURCES = t_popops.cpp -t_popops_DEPENDENCIES = $(DEPS) -t_popops_LDADD = $(LDADDS) - -############################################################################### - -t_opsel_SOURCES = t_opsel.cpp -t_opsel_DEPENDENCIES = $(DEPS) -t_opsel_LDADD = $(LDADDS) - -############################################################################### - -t_opfactory_SOURCES = t_opfactory.cpp -t_opfactory_DEPENDENCIES = $(DEPS) -t_opfactory_LDADD = $(LDADDS) - -############################################################################### - -t_opMut_SOURCES = t_opMut.cpp -t_opMut_DEPENDENCIES = $(DEPS) -t_opMut_LDADD = $(LDADDS) - -############################################################################### - -t_eobitfact_SOURCES = t_eobitfact.cpp -t_eobitfact_DEPENDENCIES = $(DEPS) -t_eobitfact_LDADD = $(LDADDS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) @@ -238,33 +162,6 @@ t_eobin_OBJECTS = t-eobin.o t_eobin_LDFLAGS = t_eolottery_OBJECTS = t-eolottery.o t_eolottery_LDFLAGS = -t_eornd_OBJECTS = t_eornd.o -t_eornd_LDADD = $(LDADD) -t_eornd_DEPENDENCIES = -t_eovector_OBJECTS = t_eovector.o -t_eovector_DEPENDENCIES = $(top_builddir)/src/libeo.a -t_eoaged_OBJECTS = t_eoaged.o -t_eoaged_LDFLAGS = -t_eoid_OBJECTS = t_eoid.o -t_eoid_LDFLAGS = -t_eostring_OBJECTS = t_eostring.o -t_eostring_LDFLAGS = -t_ops_OBJECTS = t_ops.o -t_ops_LDFLAGS = -t_popops_OBJECTS = t_popops.o -t_popops_LDFLAGS = -t_pop_OBJECTS = t_pop.o -t_pop_LDFLAGS = -t_es_OBJECTS = t_es.o -t_es_LDFLAGS = -t_opsel_OBJECTS = t_opsel.o -t_opsel_LDFLAGS = -t_opfactory_OBJECTS = t_opfactory.o -t_opfactory_LDFLAGS = -t_opMut_OBJECTS = t_opMut.o -t_opMut_LDFLAGS = -t_eobitfact_OBJECTS = t_eobitfact.o -t_eobitfact_LDFLAGS = CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -279,12 +176,9 @@ TAR = gtar GZIP_ENV = --best DEP_FILES = .deps/t-eo.P .deps/t-eobin.P .deps/t-eobreeder.P \ .deps/t-eofitness.P .deps/t-eoinclusion.P .deps/t-eoinsertion.P \ -.deps/t-eolottery.P .deps/t-eoproblem.P .deps/t_eoaged.P \ -.deps/t_eobitfact.P .deps/t_eoid.P .deps/t_eornd.P .deps/t_eostring.P \ -.deps/t_eovector.P .deps/t_es.P .deps/t_opMut.P .deps/t_opfactory.P \ -.deps/t_ops.P .deps/t_opsel.P .deps/t_pop.P .deps/t_popops.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_eornd_SOURCES) $(t_eovector_SOURCES) $(t_eoaged_SOURCES) $(t_eoid_SOURCES) $(t_eostring_SOURCES) $(t_ops_SOURCES) $(t_popops_SOURCES) $(t_pop_SOURCES) $(t_es_SOURCES) $(t_opsel_SOURCES) $(t_opfactory_SOURCES) $(t_opMut_SOURCES) $(t_eobitfact_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_eornd_OBJECTS) $(t_eovector_OBJECTS) $(t_eoaged_OBJECTS) $(t_eoid_OBJECTS) $(t_eostring_OBJECTS) $(t_ops_OBJECTS) $(t_popops_OBJECTS) $(t_pop_OBJECTS) $(t_es_OBJECTS) $(t_opsel_OBJECTS) $(t_opfactory_OBJECTS) $(t_opMut_OBJECTS) $(t_eobitfact_OBJECTS) +.deps/t-eolottery.P .deps/t-eoproblem.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) +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) all: all-redirect .SUFFIXES: @@ -369,58 +263,6 @@ t-eobin: $(t_eobin_OBJECTS) $(t_eobin_DEPENDENCIES) t-eolottery: $(t_eolottery_OBJECTS) $(t_eolottery_DEPENDENCIES) @rm -f t-eolottery $(CXXLINK) $(t_eolottery_LDFLAGS) $(t_eolottery_OBJECTS) $(t_eolottery_LDADD) $(LIBS) - -t_eornd: $(t_eornd_OBJECTS) $(t_eornd_DEPENDENCIES) - @rm -f t_eornd - $(CXXLINK) $(t_eornd_LDFLAGS) $(t_eornd_OBJECTS) $(t_eornd_LDADD) $(LIBS) - -t_eovector: $(t_eovector_OBJECTS) $(t_eovector_DEPENDENCIES) - @rm -f t_eovector - $(CXXLINK) $(t_eovector_LDFLAGS) $(t_eovector_OBJECTS) $(t_eovector_LDADD) $(LIBS) - -t_eoaged: $(t_eoaged_OBJECTS) $(t_eoaged_DEPENDENCIES) - @rm -f t_eoaged - $(CXXLINK) $(t_eoaged_LDFLAGS) $(t_eoaged_OBJECTS) $(t_eoaged_LDADD) $(LIBS) - -t_eoid: $(t_eoid_OBJECTS) $(t_eoid_DEPENDENCIES) - @rm -f t_eoid - $(CXXLINK) $(t_eoid_LDFLAGS) $(t_eoid_OBJECTS) $(t_eoid_LDADD) $(LIBS) - -t_eostring: $(t_eostring_OBJECTS) $(t_eostring_DEPENDENCIES) - @rm -f t_eostring - $(CXXLINK) $(t_eostring_LDFLAGS) $(t_eostring_OBJECTS) $(t_eostring_LDADD) $(LIBS) - -t_ops: $(t_ops_OBJECTS) $(t_ops_DEPENDENCIES) - @rm -f t_ops - $(CXXLINK) $(t_ops_LDFLAGS) $(t_ops_OBJECTS) $(t_ops_LDADD) $(LIBS) - -t_popops: $(t_popops_OBJECTS) $(t_popops_DEPENDENCIES) - @rm -f t_popops - $(CXXLINK) $(t_popops_LDFLAGS) $(t_popops_OBJECTS) $(t_popops_LDADD) $(LIBS) - -t_pop: $(t_pop_OBJECTS) $(t_pop_DEPENDENCIES) - @rm -f t_pop - $(CXXLINK) $(t_pop_LDFLAGS) $(t_pop_OBJECTS) $(t_pop_LDADD) $(LIBS) - -t_es: $(t_es_OBJECTS) $(t_es_DEPENDENCIES) - @rm -f t_es - $(CXXLINK) $(t_es_LDFLAGS) $(t_es_OBJECTS) $(t_es_LDADD) $(LIBS) - -t_opsel: $(t_opsel_OBJECTS) $(t_opsel_DEPENDENCIES) - @rm -f t_opsel - $(CXXLINK) $(t_opsel_LDFLAGS) $(t_opsel_OBJECTS) $(t_opsel_LDADD) $(LIBS) - -t_opfactory: $(t_opfactory_OBJECTS) $(t_opfactory_DEPENDENCIES) - @rm -f t_opfactory - $(CXXLINK) $(t_opfactory_LDFLAGS) $(t_opfactory_OBJECTS) $(t_opfactory_LDADD) $(LIBS) - -t_opMut: $(t_opMut_OBJECTS) $(t_opMut_DEPENDENCIES) - @rm -f t_opMut - $(CXXLINK) $(t_opMut_LDFLAGS) $(t_opMut_OBJECTS) $(t_opMut_LDADD) $(LIBS) - -t_eobitfact: $(t_eobitfact_OBJECTS) $(t_eobitfact_DEPENDENCIES) - @rm -f t_eobitfact - $(CXXLINK) $(t_eobitfact_LDFLAGS) $(t_eobitfact_OBJECTS) $(t_eobitfact_LDADD) $(LIBS) .cpp.o: $(CXXCOMPILE) -c $< .cpp.lo: diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index dcb016280..11e8ffb61 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -1,10 +1,15 @@ //----------------------------------------------------------------------------- // t-eobreeder.cpp //----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) -#include // srand -#include // time -#include // eoBin, eoPop, eoBreeder +#include // eoBin, eoPop, eoBreeder +#include +#include +#include +#include //----------------------------------------------------------------------------- @@ -25,14 +30,12 @@ void binary_value(Chrom& chrom) main() { - srand(time(NULL)); - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; unsigned i; eoUniform uniform(false, true); eoBinRandom random; - eoPop pop, pop2; + eoPop pop; for (i = 0; i < POP_SIZE; i++) { @@ -42,22 +45,22 @@ main() pop.push_back(chrom); } - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoBreeder breeder; - breeder.add(bitflip, 1.0); - breeder.add(xover, 1.0); - - pop2 = pop; - breeder(pop2); - - for (i = 0; i < pop2.size(); i++) - binary_value(pop2[i]); - - cout << "population: \tnew population" << endl; + cout << "population:" << endl; for (i = 0; i < pop.size(); i++) - cout << pop[i] << " " << pop[i].fitness() << " \t" - << pop2[i] << " " << pop2[i].fitness() << endl; + cout << pop[i] << " " << pop[i].fitness() << endl; + + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + breeder(pop); + + cout << "new population:" << endl; + for (i = 0; i < pop.size(); i++) + cout << pop[i] << " " << pop[i].fitness() << endl; return 0; } diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp index 8a2ea223a..415b7d209 100644 --- a/eo/test/t-eoinclusion.cpp +++ b/eo/test/t-eoinclusion.cpp @@ -32,8 +32,8 @@ main() for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) { eoPop pop; - - for (unsigned i = 0; i < POP_SIZE; i++) + unsigned i; + for ( i = 0; i < POP_SIZE; i++) { Chrom chrom(CHROM_SIZE); random(chrom); diff --git a/eo/test/t-eoproblem.cpp b/eo/test/t-eoproblem.cpp index 81443c19a..052652040 100644 --- a/eo/test/t-eoproblem.cpp +++ b/eo/test/t-eoproblem.cpp @@ -25,13 +25,14 @@ ostream& operator<<(ostream& os, const Chrom& chrom) class Easy//: public eoProblem { public: - const size = 1; + static const unsigned size; float operator()(const Chrom& chrom) { return 1.0 / (fabs(chrom[0]) + 1.0); } }; +const unsigned Easy::size = 1; //----------------------------------------------------------------------------- From 6daefd1ccff76994e781c6a9936928c61e72c030 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 20 Sep 1999 11:37:00 +0000 Subject: [PATCH 0038/2134] Added LICENSE --- eo/LICENSE | 504 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 504 insertions(+) create mode 100644 eo/LICENSE diff --git a/eo/LICENSE b/eo/LICENSE new file mode 100644 index 000000000..223ede7de --- /dev/null +++ b/eo/LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + From f3ebe8be708214e09e425324e420ac7465cb23f6 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 20 Sep 1999 11:48:52 +0000 Subject: [PATCH 0039/2134] fixing tests --- eo/src/eoBreeder.h | 6 ++---- eo/src/eoInclusion.h | 3 ++- eo/src/eoLottery.h | 28 ++++++++++++++-------------- eo/test/Makefile.am | 2 +- eo/test/Makefile.in | 3 +-- eo/test/t-eobreeder.cpp | 2 +- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index 75cda90e7..7d87c3d6a 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -47,16 +47,14 @@ template class eoBreeder: public eoTransform } case binary: { - eoBinOp* binop = - static_cast* >(op); + eoBinOp* binop = static_cast* >(op); eoUniform u(0, pop.size() ); (*binop)(pop[i], pop[ u() ] ); break; } case Nary: { - eoNaryOp* Nop = - static_cast* >(op); + eoNaryOp* Nop = static_cast* >(op); eoUniform u(0, pop.size() ); eoPop tmpVec; tmpVec.push_back( pop[i] ); diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index e090e4567..deb82b601 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -7,7 +7,8 @@ //----------------------------------------------------------------------------- -#include +#include // eoPop +#include // eoMerge /***************************************************************************** * eoInclusion: A replacement algorithm. * diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index ffbecade9..a009f0b19 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -38,27 +38,27 @@ template class eoLottery: public eoSelect partial_sum(score.begin(), score.end(), score.begin()); // generates random numbers - vector random(pop.size()); + vector random(rint(rate * pop.size())); generate(random.begin(), random.end(), eoUniform(0,1)); sort(random.begin(), random.end(), less()); // selection of chromosomes unsigned score_index = 0; // position in score vector unsigned random_index = 0; // position in random vector - unsigned num_chroms = (unsigned)(rate * pop.size()); - do { - if(random[random_index] < score[score_index]) - { - breeders.push_back(pop[score_index]); - random_index++; - } - else - if (score_index < pop.size()) - score_index++; + while (breeders.size() < random.size()) + { + if(random[random_index] < score[score_index]) + { + breeders.push_back(pop[score_index]); + random_index++; + } else - fill_n(back_insert_iterator >(breeders), - num_chroms - breeders.size(), pop.back()); - } while (breeders.size() < num_chroms); + if (score_index < pop.size()) + score_index++; + else + fill_n(back_insert_iterator >(breeders), + random.size() - breeders.size(), pop.back()); + } } private: diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 85b62fec5..fafe1a2bf 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -63,7 +63,7 @@ t_eobin_LDADD = $(LDADDS) t_eolottery_SOURCES = t-eolottery.cpp t_eolottery_DEPENDENCIES = $(DEPS) -t_eovector_LDFLAGS = -lm +t_eolottery_LDFLAGS = -lm t_eolottery_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 121631200..f7c0037cd 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -137,7 +137,7 @@ t_eobin_LDADD = $(LDADDS) t_eolottery_SOURCES = t-eolottery.cpp t_eolottery_DEPENDENCIES = $(DEPS) -t_eovector_LDFLAGS = -lm +t_eolottery_LDFLAGS = -lm t_eolottery_LDADD = $(LDADDS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = @@ -161,7 +161,6 @@ t_eoproblem_DEPENDENCIES = t_eobin_OBJECTS = t-eobin.o t_eobin_LDFLAGS = t_eolottery_OBJECTS = t-eolottery.o -t_eolottery_LDFLAGS = CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index 11e8ffb61..a0c5e4a47 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -50,7 +50,7 @@ main() cout << pop[i] << " " << pop[i].fitness() << endl; eoBinBitFlip bitflip; - eoBinCrossover xover; + eoBinCrossover xover; eoProportionalOpSel propSel; eoBreeder breeder( propSel ); propSel.addOp(bitflip, 0.25); From ad0a77bb61604058c356b8829b95c43756a53aab Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 20 Sep 1999 18:07:35 +0000 Subject: [PATCH 0040/2134] fixing cvsignore --- eo/test/.cvsignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index c7c756d90..a310ebb1f 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -3,7 +3,9 @@ Makefile t-eo t-eobin -t-eolottery +t-eobreeder +t-eofitness t-eoinclusion t-eoinsertion +t-eolottery t-eoproblem From 265c5671bf0bded411cefe738c0a8a87daa007e1 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 21 Sep 1999 11:36:38 +0000 Subject: [PATCH 0041/2134] pop need a reevaluation after breeding --- eo/test/t-eobreeder.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index a0c5e4a47..daaf62dea 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -37,7 +37,7 @@ main() eoBinRandom random; eoPop pop; - for (i = 0; i < POP_SIZE; i++) + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); random(chrom); @@ -46,7 +46,7 @@ main() } cout << "population:" << endl; - for (i = 0; i < pop.size(); i++) + for (i = 0; i < pop.size(); ++i) cout << pop[i] << " " << pop[i].fitness() << endl; eoBinBitFlip bitflip; @@ -58,8 +58,10 @@ main() breeder(pop); + for_each(pop.begin(), pop.end(), binary_value); + cout << "new population:" << endl; - for (i = 0; i < pop.size(); i++) + for (i = 0; i < pop.size(); ++i) cout << pop[i] << " " << pop[i].fitness() << endl; return 0; From bc9638f53c2e7300bc09e008de2e57ef8346da28 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 21 Sep 1999 18:14:39 +0000 Subject: [PATCH 0042/2134] fixing bugs in replacers and moving some code between files --- eo/src/eoInclusion.h | 21 ++++------ eo/src/eoInsertion.h | 26 +++++++++++- eo/src/eoMerge.h | 84 ++++++++++++++++++--------------------- eo/src/eoPopOps.h | 39 ------------------ eo/test/t-eobreeder.cpp | 1 + eo/test/t-eofitness.cpp | 14 ++++++- eo/test/t-eoinsertion.cpp | 13 +++--- 7 files changed, 92 insertions(+), 106 deletions(-) diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index deb82b601..709cb0c01 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -27,21 +27,16 @@ template class eoInclusion: public eoMerge * @param breeders The population of breeders. * @param pop The original population. */ - void operator()(const eoPop& breeders, eoPop& pop) + void operator()(eoPop& breeders, eoPop& pop) { - eoPop all, tmp = breeders; + unsigned target = min(static_cast(rint(pop.size() * rate())), + pop.size() + breeders.size()); - sort(tmp.begin(), tmp.end()); - sort(pop.begin(), pop.end()); - - merge(tmp.begin(), tmp.end(), - pop.begin(), pop.end(), - back_insert_iterator >(all)); - - all.erase(all.begin(), - all.begin() + (unsigned)(all.size() - pop.size() * rate())); - - pop.swap(all); + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); + partial_sort(pop.begin(), pop.begin() + target, pop.end(), + greater()); + pop.erase(pop.begin() + target, pop.end()); } }; diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 994645e13..be0f43739 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -7,7 +7,7 @@ //----------------------------------------------------------------------------- -#include +#include /****************************************************************************** * eoInsertion: A replacement algorithm. @@ -26,7 +26,7 @@ template class eoInsertion: public eoMerge * @param breeders The population of breeders. * @param pop The original population. */ - void operator()(const eoPop& breeders, eoPop& pop) + /*void operator()(eoPop& breeders, eoPop& pop) { int new_size = static_cast(pop.size() * rate()); @@ -48,6 +48,28 @@ template class eoInsertion: public eoMerge copy(breeders.begin(), breeders.end(), back_insert_iterator >(pop)); } + }*/ + + void operator()(eoPop& breeders, eoPop& pop) + { + unsigned target = static_cast(rint(pop.size() * rate())); + + pop.swap(breeders); + + if (target < pop.size()) + { + partial_sort(pop.begin(), pop.begin() + target, pop.end(), + greater()); + pop.erase(pop.begin() + target, pop.end()); + } + else + { + target = min(target - pop.size(), breeders.size()); + partial_sort(breeders.begin(), breeders.begin() + target, + breeders.end(), greater()); + copy(breeders.begin(), breeders.begin() + target, + back_insert_iterator >(pop)); + } } }; diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index c8e765cd8..62656af81 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -7,55 +7,49 @@ //----------------------------------------------------------------------------- -#include // eoMerge - -//----------------------------------------------------------------------------- -// eoInsertion -//----------------------------------------------------------------------------- - -template class Insertion: public eoMerge -{ - public: - eoInsertion(const float& _rate = 1): eoMerge(rate) {} - - bool compare(const Chrom& chrom1, const Chrom& chrom2) - { - return chrom1.fitness() < chrom2.fitness(); - } - - void operator()(const Pop& breeders, Pop& pop) - { - sort(pop.begin(), pop.end() compare); - - pop.erase(pop.end() + (int)(pop.size() * (rate - 1) - breeders.size()), - pop.end()); - - copy(breeders.begin(), breeders.end(), - back_insert_iterator(pop)); - } -}; +#include // eoPop //----------------------------------------------------------------------------- -template class Inclusion: public Replace -{ - public: - Inclusion(const float& rate = 1): Replace(rate) {} +/** eoMerge involves three populations, that can be merged and transformed to +give a third +*/ +template +class eoMerge: public eoObject{ + + public: + /// (Default) Constructor. + eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} - void operator()(Pop& breeders, Pop& pop) - { - Pop temp; - - sort(breeders.begin(), breeders.end(), compare); - sort(pop.begin(), pop.end(), compare); - - merge(breeders.begin(), breeders.end(), - pop.begin(), pop.end(), - back_insert_iterator(temp), compare); - - temp.erase(temp.begin() + (unsigned)(rate * pop.size()), temp.end()); - pop.swap(temp); - } + /// Dtor + virtual ~eoMerge() {} + + /** Pure virtual transformation function. Extracts something from breeders + * and transfers it to the pop + * @param breeders Tranformed individuals. + * @param pop The original population at the begining, the result at the end + */ + virtual void operator () ( eoPop& breeders, eoPop& pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoMerge";}; + //@} + + /// Return the rate to be selected from the original population + float rate() const { return rep_rate; } + + /// Set the rate to be obtained after replacement. + /// @param _rate The rate. + void rate(const float& _rate) { rep_rate = _rate; } + +private: + float rep_rate; }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 7ece0de6a..9c0dfc66f 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -97,44 +97,5 @@ class eoSelect: public eoObject{ }; -/** eoMerge involves three populations, that can be merged and transformed to -give a third -*/ -template -class eoMerge: public eoObject{ - - public: - /// (Default) Constructor. - eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} - - /// Dtor - virtual ~eoMerge() {} - - /** Pure virtual transformation function. Extracts something from breeders - * and transfers it to the pop - * @param breeders Tranformed individuals. - * @param pop The original population at the begining, the result at the end - */ - virtual void operator () ( const eoPop& breeders, eoPop& pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoMerge";}; - //@} - - /// Return the rate to be selected from the original population - float rate() const { return rep_rate; } - /// Set the rate to be obtained after replacement. - /// @param _rate The rate. - void rate(const float& _rate) { rep_rate = _rate; } - -private: - float rep_rate; -}; #endif diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index daaf62dea..0e632bc8b 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -58,6 +58,7 @@ main() breeder(pop); + // reevaluation of fitness for_each(pop.begin(), pop.end(), binary_value); cout << "new population:" << endl; diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index 9efe6dcc8..a8604d245 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -3,6 +3,8 @@ // (c) GeNeura Team 1998 //----------------------------------------------------------------------------- +#include // time +#include // srand, rand #include // cout #include // eoFitness @@ -11,6 +13,9 @@ class eoFloat: public eoFitness { public: + eoFloat(const float x) { fitness = x; } + eoFloat(const int x) { fitness = static_cast(x); } + bool operator<(const eoFitness& other) const { const eoFloat& x = (const eoFloat&) other; @@ -40,8 +45,13 @@ private: main() { - eoFloat a, b; + srand(time(0)); + eoFloat a = static_cast(rand()) / RAND_MAX, + b = static_cast(rand()) / RAND_MAX; + + cout.precision(2); + unsigned repeat = 2; while (repeat--) { @@ -62,7 +72,7 @@ main() if (a == b) cout << a << " == " << b << " is true" << endl; else - cout << a << " == " << b << " is false" < Date: Tue, 28 Sep 1999 10:26:39 +0000 Subject: [PATCH 0043/2134] finish eoGeneration... still to be tested --- eo/src/eoGeneration.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index 80aa24ff8..f604d02cf 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -14,24 +14,23 @@ // eoGeneration //----------------------------------------------------------------------------- -template class eoGeneration: public eoTransform +template class eoGeneration { public: /// Constructor. - eoGeneration(eoSelect& _select, + eoGeneration(eoSelect& _select, eoTranform& _transform, - eoMerge& _replace): - eoTransform() {} + eoMerge& _replace): + select(_select), transform(_transform), replace(_replace) {} - /** - * - */ + /// apply one generation of evolution to the population void operator()(eoPop& pop) { eoPop breeders; select(pop, breeders); transform(breeders); + for_each(pop.begin(), pop.end(), Chrom::Fitness); replace(breeders, pop); } From 1247f801fbeba3cf0f4d723444b3641df20e2a08 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 28 Sep 1999 11:56:21 +0000 Subject: [PATCH 0044/2134] testing and debugging eoGeneration --- eo/src/eo | 5 +- eo/src/eoGeneration.h | 21 ++--- eo/src/eoInsertion.h | 3 +- eo/src/eoMerge.h | 57 ------------- eo/src/eoPopOps.h | 188 ++++++++++++++++++++++++++---------------- eo/test/Makefile.am | 9 +- eo/test/Makefile.in | 22 +++-- 7 files changed, 156 insertions(+), 149 deletions(-) delete mode 100644 eo/src/eoMerge.h diff --git a/eo/src/eo b/eo/src/eo index 75e0716d9..8d180d543 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -60,11 +60,12 @@ #include #include - #include - #include #include +#include + +#include //----------------------------------------------------------------------------- // to be continued ... diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index f604d02cf..ac062bb26 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -18,19 +18,20 @@ template class eoGeneration { public: /// Constructor. - eoGeneration(eoSelect& _select, - eoTranform& _transform, - eoMerge& _replace): + eoGeneration(eoSelect& _select, + eoTransform& _transform, + eoMerge& _replace): select(_select), transform(_transform), replace(_replace) {} - /// apply one generation of evolution to the population - void operator()(eoPop& pop) + /// Apply one generation of evolution to the population. + template void operator()(eoPop& pop, + Evaluator evaluator) { - eoPop breeders; + eoPop breeders; select(pop, breeders); transform(breeders); - for_each(pop.begin(), pop.end(), Chrom::Fitness); + for_each(breeders.begin(), breeders.end(), evaluator); replace(breeders, pop); } @@ -38,9 +39,9 @@ template class eoGeneration string className() const { return "eoGeneration"; } private: - eoSelect& select; - eoTranform& transform; - eoMerge& replace; + eoSelect& select; + eoTransform& transform; + eoMerge& replace; }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index be0f43739..7674b958a 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -7,7 +7,8 @@ //----------------------------------------------------------------------------- -#include +#include // eoPop +#include // eoMerge /****************************************************************************** * eoInsertion: A replacement algorithm. diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h deleted file mode 100644 index 62656af81..000000000 --- a/eo/src/eoMerge.h +++ /dev/null @@ -1,57 +0,0 @@ -//----------------------------------------------------------------------------- -// eoMerge.h -//----------------------------------------------------------------------------- - -#ifndef eoMerge_h -#define eoMerge_h - -//----------------------------------------------------------------------------- - -#include // eoPop - -//----------------------------------------------------------------------------- - -/** eoMerge involves three populations, that can be merged and transformed to -give a third -*/ -template -class eoMerge: public eoObject{ - - public: - /// (Default) Constructor. - eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} - - /// Dtor - virtual ~eoMerge() {} - - /** Pure virtual transformation function. Extracts something from breeders - * and transfers it to the pop - * @param breeders Tranformed individuals. - * @param pop The original population at the begining, the result at the end - */ - virtual void operator () ( eoPop& breeders, eoPop& pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoMerge";}; - //@} - - /// Return the rate to be selected from the original population - float rate() const { return rep_rate; } - - /// Set the rate to be obtained after replacement. - /// @param _rate The rate. - void rate(const float& _rate) { rep_rate = _rate; } - -private: - float rep_rate; -}; - -//----------------------------------------------------------------------------- - -#endif eoMerge_h diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 9c0dfc66f..7f39c2100 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -1,28 +1,28 @@ // eoPopOps.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eo1d.h -// (c) GeNeura Team, 1998 +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eo1d.h +// (c) GeNeura Team, 1998 /* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -//----------------------------------------------------------------------------- - +//----------------------------------------------------------------------------- + #ifndef _EOPOPOPS_H #define _EOPOPOPS_H @@ -31,71 +31,113 @@ using namespace std; /** @author Geneura Team @version 0.0 -*/ - -//----------------------------------------------------------------------------- -#include - -//----------------------------------------------------------------------------- -/** eoTransform is a class that transforms or does something on a population. */ + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- +/** eoTransform is a class that transforms or does something on a population. + */ template class eoTransform: public eoObject{ public: /** ctor */ eoTransform() {}; - - /// Dtor - virtual ~eoTransform(){}; - - /// Pure virtual transformation function. Does something on the population - virtual void operator () ( eoPop& _pop ) = 0; - /** @name Methods from eoObject */ - //@{ + /// Dtor + virtual ~eoTransform(){}; + + /// Pure virtual transformation function. Does something on the population + virtual void operator () ( eoPop& _pop ) = 0; + + /** @name Methods from eoObject */ + //@{ /** readFrom and printOn are not overriden - */ + */ /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoTransform";}; + @see eoObject + */ + string className() const {return "eoTransform";}; //@} -}; - -/** eoSelect usually takes elements from one population, with or without -transformation, and transfers them to the other population -*/ -template -class eoSelect: public eoObject{ - - public: - /** ctor - */ - eoSelect() {}; - - /// Dtor - virtual ~eoSelect(){}; - - /** Pure virtual transformation function. Extracts something from the parents, - and transfers it to the siblings - @param _parents the initial generation. Will be kept constant - @param _siblings the created offspring. Will be usually an empty population - */ - virtual void operator () ( const eoPop& _parents, eoPop& _siblings ) const = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoSelect";}; - //@} - -}; - +}; + +//----------------------------------------------------------------------------- + +/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ +template +class eoSelect: public eoObject{ + + public: + /** ctor + */ + eoSelect() {}; + + /// Dtor + virtual ~eoSelect(){}; + + /** Pure virtual transformation function. Extracts something from the parents, + and transfers it to the siblings + @param _parents the initial generation. Will be kept constant + @param _siblings the created offspring. Will be usually an empty population + */ + virtual void operator () ( const eoPop& _parents, eoPop& _siblings ) const = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoSelect";}; + //@} + +}; + +/** eoMerge involves three populations, that can be merged and transformed to +give a third +*/ +template +class eoMerge: public eoObject{ + + public: + /// (Default) Constructor. + eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} + + /// Dtor + virtual ~eoMerge() {} + + /** Pure virtual transformation function. Extracts something from breeders + * and transfers it to the pop + * @param breeders Tranformed individuals. + * @param pop The original population at the begining, the result at the end + */ + virtual void operator () ( eoPop& breeders, eoPop& pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoMerge";}; + //@} + + /// Return the rate to be selected from the original population + float rate() const { return rep_rate; } + + /// Set the rate to be obtained after replacement. + /// @param _rate The rate. + void rate(const float& _rate) { rep_rate = _rate; } + + private: + float rep_rate; +}; + +//----------------------------------------------------------------------------- #endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index fafe1a2bf..e022db384 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,14 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery +noinst_PROGRAMS = t-eogeneration t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery + +############################################################################### + +t_eogeneration_SOURCES = t-eogeneration.cpp +t_eogeneration_DEPENDENCIES = $(DEPS) +t_eogeneration_LDFLAGS = -lm +t_eogeneration_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index f7c0037cd..61e66d154 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -87,7 +87,14 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery +noinst_PROGRAMS = t-eogeneration t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery + +############################################################################### + +t_eogeneration_SOURCES = t-eogeneration.cpp +t_eogeneration_DEPENDENCIES = $(DEPS) +t_eogeneration_LDFLAGS = -lm +t_eogeneration_LDADD = $(LDADDS) ############################################################################### @@ -148,6 +155,7 @@ DEFS = @DEFS@ -I. -I$(srcdir) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ +t_eogeneration_OBJECTS = t-eogeneration.o t_eobreeder_OBJECTS = t-eobreeder.o t_eoinclusion_OBJECTS = t-eoinclusion.o t_eoinsertion_OBJECTS = t-eoinsertion.o @@ -174,10 +182,10 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best DEP_FILES = .deps/t-eo.P .deps/t-eobin.P .deps/t-eobreeder.P \ -.deps/t-eofitness.P .deps/t-eoinclusion.P .deps/t-eoinsertion.P \ -.deps/t-eolottery.P .deps/t-eoproblem.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) -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) +.deps/t-eofitness.P .deps/t-eogeneration.P .deps/t-eoinclusion.P \ +.deps/t-eoinsertion.P .deps/t-eolottery.P .deps/t-eoproblem.P +SOURCES = $(t_eogeneration_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) +OBJECTS = $(t_eogeneration_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) all: all-redirect .SUFFIXES: @@ -231,6 +239,10 @@ distclean-libtool: maintainer-clean-libtool: +t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) + @rm -f t-eogeneration + $(CXXLINK) $(t_eogeneration_LDFLAGS) $(t_eogeneration_OBJECTS) $(t_eogeneration_LDADD) $(LIBS) + t-eobreeder: $(t_eobreeder_OBJECTS) $(t_eobreeder_DEPENDENCIES) @rm -f t-eobreeder $(CXXLINK) $(t_eobreeder_LDFLAGS) $(t_eobreeder_OBJECTS) $(t_eobreeder_LDADD) $(LIBS) From bed45e65a22c442032c5432fd8a7b97071246290 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 29 Sep 1999 11:41:34 +0000 Subject: [PATCH 0045/2134] Fixing a little bug in the random generator. Variable size was used instead of _size, which is the parameter the method gets --- eo/src/eo1d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h index 956d8a6fd..de33bf055 100644 --- a/eo/src/eo1d.h +++ b/eo/src/eo1d.h @@ -175,7 +175,7 @@ template< class T, class fitnessT> eo1d::eo1d( unsigned _size, eoRnd& _rndGen, const string& _ID ) :EO ( _ID ) { - for ( unsigned i = 0; i < size; i ++ ) { + for ( unsigned i = 0; i < _size; i ++ ) { insertGene( i, _rndGen() ); } }; From 8e4e9197ea8055f70e8db366e61ebcffe86cad2c Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 29 Sep 1999 11:43:34 +0000 Subject: [PATCH 0046/2134] Adding an interface for 2-dimensional chromosomes --- eo/src/eo2d.h | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 eo/src/eo2d.h diff --git a/eo/src/eo2d.h b/eo/src/eo2d.h new file mode 100644 index 000000000..5f0c95ab9 --- /dev/null +++ b/eo/src/eo2d.h @@ -0,0 +1,241 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +----------------------------------------------------------------------------- +File............: eo2d.h +Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) +Date............: 21-Sep-1999, at Fac. of Sciences, Univ. de Granada +Description.....: Implementation of a 2-dimensional chromosome. + + ================ Modif. 1 ================ + Author........: + Date..........: + Description...: + +----------------------------------------------------------------------------- +*/ +//----------------------------------------------------------------------------- +// eo2d.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EO2D_H +#define _EO2D_H + +#include // for ostream +#include + +// EO Includes +#include +#include + +using namespace std; + +/** @name eo2d class +* Randomly accesible evolvable object with two dimension, with +variable length each of them. +* Use this if you want to evolve "two-dimensional" things, like bit arrays, or +floating-point arrays. If you don't, subclass directly from EO +* @see EO +* @author GeNeura +* @version 0.2 +*/ + +//@{ + +/** eo2d: Base class for "chromosomes" with a double dimension +#T# is the type it will be instantiated with; this type must have, at +least, a copy ctor, assignment operators, +*/ +template +class eo2d: public EO< fitnessT > { +public: + + /// Declaration to make it accessible from subclasses + typedef T Type; + + /** Can be used as default ctor; should be called from derived + classes. Fitness should be at birth + */ + eo2d() + :EO ( ) {}; + + /** Ctor using a random number generator and with an specified size + @param _rows Initial number of rows + @param _columns Initial number of columns + @param _rndGen Random "T-type" generator + @param _ID An ID string, preferably unique + */ + eo2d( const unsigned _rows, + const unsigned _columns, + eoRnd& _rndGen, + const string& _ID = ""); + + /** Ctor from an istream. It just passes the stream to EO, subclasses should + have to implement this. + @param _is the input stream + */ + eo2d( istream& _is): EO( _is ){}; + + /// Copy ctor + eo2d( const eo2d& _eo ) + :EO ( _eo ) {}; + + /// Assignment operator + const eo2d& operator= ( const eo2d& _eo ) { + EO::operator = ( _eo ); + return *this; + } + + /// Needed virtual dtor + virtual ~eo1d(){}; + + /** Reads and returns a copy of the gene in position _r,_c.\ + This implies that T must have a copy ctor . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @return what's inside the gene, with the correct type + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual T getGene( const unsigned _r, + const unsigned _j ) const = 0; + + /** Overwrites the gene placed in position _r,_c with a + * new value. This means that the assignment operator + * for T must be defined . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @return what's inside the gene, with the correct type + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual void setGene( const unsigned _r, + const unsigned _c, + const T& _value ) = 0; + + /** Inserts a row, moving the rest to the bottom. + * If _r = numOfRows(), it insert it at the end. + * Obviously, changes number of rows. + @param _r Position where the new row will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_parameter if _val has not numOfCols() components. + */ + virtual void insertRow( const unsigned _r, + const vector& _val ) = 0; + + /** Eliminates the row at position _r; all the other genes will + be shifted up. + @param _r Number of he row to be deleted. + @exception out_of_range if _r >=numOfRows() + */ + virtual void deleteRow( const unsigned _r ) = 0; + + /** Inserts a column, moving the rest to the right. + * If _c = numOfCols(), it insert it at the end. + * Obviously, changes number of cols. + @param _r Position where the new column will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_parameter if _val has not numOfRows() components. + */ + virtual void insertCol( const unsigned _c, + const vector& _val ) = 0; + + /** Eliminates the column at position _c; all the other columns will + be shifted left. + @param _c Number of he column to be deleted. + @exception out_of_range if _c >=numOfCols() + */ + virtual void deleteCol( const unsigned _r ) = 0; + + /// Returns the number of rows in the eo2d + virtual unsigned numOfRows() const = 0; + + /// Returns the number of columns in the eo2d + virtual unsigned numOfCols() const = 0; + + /// @name Methods from eoObject + //@{ + /** + * Read object. Theoretically, the length is known in advance. All objects + * Should call base class + * @param _s A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _s) { + + for ( unsigned r = 0; r < numOfRows(); ++r ) { + for ( unsigned c = 0; c < numOfCols(); ++c ) { + T tmp; + _s >> tmp; + setGene( r, c, tmp ); + } + } + // there is no way of distinguishing fitness from the object, so + // it's skipped + } + + /** Print itself: inherited from eoObject implementation. + Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + for ( unsigned r = 0; r < numOfRows(); ++r ) { + for ( unsigned c = 0; c < numOfCols(); ++c ) { + _s << getGene( r,c ) << " "; + } + } + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eo2d";}; + + //@} + +}; + +//@} + + +// --------------- Implementations -------------------------- + +/** Ctor using a random number generator and with an specified size + @param _rows Initial number of rows + @param _columns Initial number of columns + @param _rndGen Random "T-type" generator + @param _ID An ID string, preferably unique +*/ +template< class T, class fitnessT> +eo2d::eo1d( const unsigned _rows, + const unsigned _columns, + eoRnd& _rndGen, + const string& _ID = "") + :EO ( _ID ) { + for ( unsigned r = 0; r < _rows; ++r ) { + for ( unsigned c = 0; c < _cols; ++c ) { + insertGene( r, c, _rndGen() ); + } + } +}; + + +#endif From a789371939706b82eb018d9a6f7ac62c1201b6fe Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 1 Oct 1999 16:32:46 +0000 Subject: [PATCH 0047/2134] Final (or almost) version by now. --- eo/src/eo2d.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eo/src/eo2d.h b/eo/src/eo2d.h index 5f0c95ab9..e02d5f159 100644 --- a/eo/src/eo2d.h +++ b/eo/src/eo2d.h @@ -4,7 +4,7 @@ ----------------------------------------------------------------------------- File............: eo2d.h Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) -Date............: 21-Sep-1999, at Fac. of Sciences, Univ. de Granada +Date............: 21-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) Description.....: Implementation of a 2-dimensional chromosome. ================ Modif. 1 ================ @@ -105,7 +105,7 @@ public: } /// Needed virtual dtor - virtual ~eo1d(){}; + virtual ~eo2d(){}; /** Reads and returns a copy of the gene in position _r,_c.\ This implies that T must have a copy ctor . @@ -136,7 +136,8 @@ public: * Obviously, changes number of rows. @param _r Position where the new row will be inserted. @param _val Vector containing the new values to be inserted. - @exception invalid_parameter if _val has not numOfCols() components. + @exception invalid_argument If _val has not numOfCols() components. + @exception out_of_range If _r is greater than numOfRows() */ virtual void insertRow( const unsigned _r, const vector& _val ) = 0; @@ -153,7 +154,7 @@ public: * Obviously, changes number of cols. @param _r Position where the new column will be inserted. @param _val Vector containing the new values to be inserted. - @exception invalid_parameter if _val has not numOfRows() components. + @exception invalid_argument if _val has not numOfRows() components. */ virtual void insertCol( const unsigned _c, const vector& _val ) = 0; @@ -163,7 +164,7 @@ public: @param _c Number of he column to be deleted. @exception out_of_range if _c >=numOfCols() */ - virtual void deleteCol( const unsigned _r ) = 0; + virtual void deleteCol( const unsigned _c ) = 0; /// Returns the number of rows in the eo2d virtual unsigned numOfRows() const = 0; @@ -225,7 +226,7 @@ public: @param _ID An ID string, preferably unique */ template< class T, class fitnessT> -eo2d::eo1d( const unsigned _rows, +eo2d::eo2d( const unsigned _rows, const unsigned _columns, eoRnd& _rndGen, const string& _ID = "") From 7c107635b07e8ed33b221f79fe951e8a8f73deae Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 1 Oct 1999 16:33:59 +0000 Subject: [PATCH 0048/2134] All the methods have been implemented. Only three of them (asignement operator, read from and write to a stream) remain unfinished. --- eo/src/eo2dVector.h | 333 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) create mode 100644 eo/src/eo2dVector.h diff --git a/eo/src/eo2dVector.h b/eo/src/eo2dVector.h new file mode 100644 index 000000000..edc82f3a1 --- /dev/null +++ b/eo/src/eo2dVector.h @@ -0,0 +1,333 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* +----------------------------------------------------------------------------- +File............: eo2dVector.h +Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) +Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) +Description.....: Implementation of a 2-dimensional chromosome usign STL + vectors. + + ================ Modif. 1 ================ + Author........: + Date..........: + Description...: + +QUEDA: Operador de asignación, lectura desde istream, escritura a ostream +----------------------------------------------------------------------------- +*/ +//----------------------------------------------------------------------------- +// eo2dVector.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eo2dVector_H +#define _eo2dVector_H + +// STL libraries +#include // For vector +#include +#include +#include + +#include +#include + +/** Adaptor that turns an STL vector of vectror into an EO + with the same gene type as the type with which + the vector of vector has been instantiated. +*/ +template +class eo2dVector: public eo2d, public vector< vector > { +public: + typedef T Type ; + + /** @name Canonical part of the objects: several ctors, copy ctor, \ + * dtor and assignment operator. + */ + //@{ + + /** Ctor. + @param _rows Number of rows. + @param _cols Number of columns. + @param _val Common initial value + */ + eo2dVector( const unsigned _rows = 0, + const unsigned _cols = 0, + T _val = T() ) + : eo2d(), vector< vector >( _rows, vector( _cols, _val ) ){}; + + /** Ctor using a random number generator. + @param _rows Number of rows. + @param _cols Number of columns. + @param _rnd A random "T-type" generator, which returns a random value each time it´s called. + */ + eo2dVector( const unsigned _rows, + const unsigned _cols, + eoRnd& _rnd ); + + /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, +which is supposed to be dynamic and dependent on environment. + @param _is the input stream; should have all values in a single line, separated by whitespace + */ + //eo2dVector( istream& _is); + + + /// copy ctor + eo2dVector( const eo2dVector & _eo ) + : eo2d( _eo ), vector< vector >( _eo ){ }; + + /// Assignment operator + /* + const eo2dVector& operator =( const eo2dVector & _eo ) { + if ( this != &_eo ){ + eo2d::operator=( _eo ); + vector< >::operator=( _eo ); + } + return *this; + } + */ + /// dtor + virtual ~eo2dVector() {}; + + //@} + /** Reads and returns a copy of the gene in position _r,_c.\ + This implies that T must have a copy ctor . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @return what's inside the gene, with the correct type + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual T getGene( const unsigned _r, + const unsigned _c ) const { + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::getGene: row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::getGene: column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + return (*this)[_r][_c]; + }; + /** Overwrites the gene placed in position _r,_c with a + * new value. This means that the assignment operator + * for T must be defined . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @return what's inside the gene, with the correct type + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual void setGene( const unsigned _r, + const unsigned _c, + const T& _value ) { + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::setGene: row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::setGene: column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + (*this)[_r][_c]=_value; + }; + + + + /** Inserts a row, moving the rest to the bottom. + * If _r = numOfRows(), it insert it at the end. + * Obviously, changes number of rows. + @param _r Position where the new row will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_argument If _val has not numOfCols() components. + @exception out_of_range If _r is greater than numOfRows() + */ + virtual void insertRow( const unsigned _r, + const vector& _val ) { + // Test errors. + if ( _r > numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertRow: row out of range. " + << "It should be <=" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _val.size() != numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertRow: " + << "Incorrect number of values to be added. " + << "It should be ==" << numOfCols() << '\0' << endl; + throw invalid_argument( msg.str() ); + } + + // Insert the row. + vector< vector >::iterator ite = begin()+_r; + insert( ite, _val ); + }; + + /** Eliminates the row at position _r; all the other genes will + be shifted up. + @param _r Number of he row to be deleted. + @exception out_of_range if _r >=numOfRows() + */ + virtual void deleteRow( const unsigned _r ) { + // Test error. + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::deleteRow: " + << "Row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + // Delete row. + vector< vector >::iterator ite = this->begin()+_r; + this->erase( ite ); + }; + + /** Inserts a column, moving the rest to the right. + * If _c = numOfCols(), it insert it at the end. + * Obviously, changes number of cols. + @param _r Position where the new column will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_argument if _val has not numOfRows() components. + */ + virtual void insertCol( const unsigned _c, + const vector& _val ) { + // Test errors. + if ( _c > numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertCol: " + << "Column out of range. " + << "It should be >=" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _val.size() != numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertCol: " + << "Incorrect number of values to be added. " + << "It should be ==" << numOfRows() << '\0' << endl; + throw invalid_argument( msg.str() ); + } + + // Insert column. + for( unsigned r=0; r >::iterator it1 = begin()+r; + vector::iterator it2 = (*it1).begin()+_c; + (*it1).insert( it2, _val[r] ); + }; + } + + /** Eliminates the column at position _c; all the other columns will + be shifted left. + @param _c Number of he column to be deleted. + @exception out_of_range if _c >=numOfCols() + */ + virtual void deleteCol( const unsigned _c ) { + // Test error. + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::deleteCol: " + << "Column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + // Delete columns. + for( unsigned r=0; r >::iterator it1 = begin()+r; + vector::iterator it2 = (*it1).begin()+_c; + (*it1).erase( it2 ); + } + }; + + /// Returns the number of rows in the eo2d + virtual unsigned numOfRows() const { + return size(); + }; + + /// Returns the number of columns in the eo2d + virtual unsigned numOfCols() const { + return begin()->size(); + }; + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eo2dVector";}; + //@} + +}; + + +//____________________________ Some method implementation ____________________ + +// Ctors_______________________________________________________________________ +//_____________________________________________________________________________ +template +eo2dVector::eo2dVector( const unsigned _rows, + const unsigned _cols, + eoRnd& _rnd ) + : eo2d(), vector< vector >( _rows, vector( _cols, T() ) ){ + for ( vector< vector >::iterator i = begin(); i != end(); ++i ) { + for( vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { + *j = _rnd(); + } + } +}; + +//_____________________________________________________________________________ +/*template +eoVector::eoVector( istream& _is) + : eo1d(), vector( ){ + while (_is ) { + T tmp; + _is >> tmp; + push_back( tmp ); + } + +}; +*/ + +//_____________________________________________________________________________ +template +ostream& operator<<( ostream& _os, const eo2dVector& _eo) { + for( unsigned i=0; i<_eo.numOfRows(); ++i ) { + for( unsigned j=0; j<_eo.numOfCols(); ++j ) { + _os << _eo.getGene( i,j ) << " "; + } + _os << endl; + } + return _os; +}; + +#endif From 90d6310aef89f51afbe4bd4521f4ff0a34af2259 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 1 Oct 1999 16:36:04 +0000 Subject: [PATCH 0049/2134] *** empty log message *** --- eo/test/t-eo2dVector.cc | 220 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 eo/test/t-eo2dVector.cc diff --git a/eo/test/t-eo2dVector.cc b/eo/test/t-eo2dVector.cc new file mode 100644 index 000000000..bce0e82be --- /dev/null +++ b/eo/test/t-eo2dVector.cc @@ -0,0 +1,220 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* +----------------------------------------------------------------------------- +File............: t-eo2dVector.cc +Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) +Date............: 01-Oct-1999, at Fac. of Sciences, Univ. of Granada (Spain) +Description.....: Test for 2 dimensional eoVector. + + ================ Modif. 1 ================ + Author........: + Date..........: + Description...: + +----------------------------------------------------------------------------- +*/ + +#include +#include // eo2dVector +#include // Random generator + +//----------------------------------------------------------------------------- + +typedef unsigned T; +typedef double fitnessT; +typedef eo2dVector C; + +//----------------------------------------------------------------------------- + +main() +{ + { + C c1; + cout << "Default constructor: " << endl + << c1 << endl; + } + { + C c1( 5,6,1 ); + cout << "Default constructor with values: " << endl + << c1 << endl; + + } + { + eoUniform aleat( 1,10 ); + C c1( 5,6, aleat ); + cout << "Random constructor: " << endl + << c1 << endl; + + } + { + C c1( 3,4,1 ), c2( c1 ); + cout << "Copy constructor: " << endl + << "Original chromosome: " << endl + << c1 << endl + << "Copy chromosome: " << endl + << c2 << endl; + } + + eoUniform aleat( 1,10 ); + C c1( 3,4,aleat ); + + cout << "-----------------------------------------------------" << endl + << "Since now on all the operations are applied to " << endl + << c1 + << "-----------------------------------------------------" << endl; + { + cout << "getGene(2,2): " + << c1.getGene(2,2) << endl; + } + { + c1.setGene( 2,2,300 ); + cout << "setGene(2,2,300): " << endl + << c1 << endl; + } + { + unsigned u1=0, u3=333, u5=555; + vector v1( 4,u1 ), v2( 4,u3 ), v3( 4,u5 ); + c1.insertRow( 0,v1 ); + c1.insertRow( 3,v2 ); + c1.insertRow( 5,v3 ); + cout << "Insert rows at positions 0, 3 and 5: " << endl + << c1 << endl; + } + { + c1.deleteRow( 5 ); + c1.deleteRow( 3 ); + c1.deleteRow( 0 ); + cout << "Delete rows at positions 5, 3 and 0: " << endl + << c1 << endl; + } + { + unsigned u1=0, u3=333, u6=666; + vector v1( 3,u1 ), v2( 3,u3 ), v3( 3,u6 ); + c1.insertCol( 0,v1 ); + c1.insertCol( 3,v2 ); + c1.insertCol( 6,v3 ); + cout << "Insert columns at positions 0, 3 and 6: " << endl + << c1 << endl; + } + { + c1.deleteCol( 6 ); + c1.deleteCol( 3 ); + c1.deleteCol( 0 ); + cout << "Delete columns at positions 6, 3 and 0: " << endl + << c1 << endl; + } + { + cout << "Number of Rows: " << endl + << c1.numOfRows() << endl; + } + { + cout << "Number of Columns: " << endl + << c1.numOfCols() << endl; + } + + { + cout << "Class Name: " << endl + << c1.className() << endl; + } + + + cout << "-----------------------------------------------------" << endl + << "Catching exceptions: " << endl + << c1 + << "-----------------------------------------------------" << endl; + { + cout << "* Trying getGene(10,1): " << endl; + try { + c1.getGene( 10,1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + cout << "* Trying getGene(1,10): " << endl; + try { + c1.getGene( 1,10) ; + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + cout << "* Trying setGene( 10,1,999 ): " << endl; + try { + c1.setGene( 10,1,999 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + cout << "* Trying setGene( 1,10,999 ): " << endl; + try { + c1.setGene( 1,10,999 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + unsigned u1=111; + vector v1( 4, u1 ); + cout << "* Trying insertRow( 10, v1 ): " << endl; + try { + c1.insertRow( 10,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + unsigned u1=111; + vector v1( 5, u1 ); + cout << "* Trying insertRow( 1, v1 ) with v1.size()=5: " << endl; + try { + c1.insertRow( 1,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + cout << "* Trying deleteRow( 10 ): " << endl; + try { + c1.deleteRow( 10 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + unsigned u1=111; + vector v1( 3, u1 ); + cout << "* Trying insertCol( 10,v1 ): " << endl; + try { + c1.insertCol( 10,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + unsigned u1=111; + vector v1( 5, u1 ); + cout << "* Trying insertCol( 1,v1 ) with v1.size()=5: " << endl; + try { + c1.insertCol( 1,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + cout << "* Trying deleteCol( 10 ): " << endl; + try { + c1.deleteCol( 10 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + +} + +//----------------------------------------------------------------------------- From f395b6d93e1decc1a8cb9c74a8b9f97717c1534e Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 1 Oct 1999 17:00:02 +0000 Subject: [PATCH 0050/2134] Updating Makefile.am to compile t-eo2dVector.h --- eo/test/Makefile.am | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index e022db384..b0aca05d9 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eogeneration t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration ############################################################################### @@ -74,3 +74,10 @@ t_eolottery_LDFLAGS = -lm t_eolottery_LDADD = $(LDADDS) ############################################################################### + +t_eo2dVector_SOURCES = t-eo2dVector.cc +t_eo2dVector_DEPENDENCIES = $(DEPS) +t_eo2dVector_LDFLAGS = -lm +t_eo2dVector_LDADD = $(LDADDS) + +############################################################################### From 648fd000c10ff292733aed5adced04f51a2ff512 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 1 Oct 1999 17:00:38 +0000 Subject: [PATCH 0051/2134] Updating Makefile.am to include eo2d.h and eo2dVector.h --- eo/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 44a1dabd5..8b8e57c0d 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,4 +8,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h From 7d7542e705852519dbec812ec2866ee730f70cae Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 4 Oct 1999 11:17:19 +0000 Subject: [PATCH 0052/2134] adding t-eogeneration.cpp --- eo/test/t-eogeneration.cpp | 88 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 eo/test/t-eogeneration.cpp diff --git a/eo/test/t-eogeneration.cpp b/eo/test/t-eogeneration.cpp new file mode 100644 index 000000000..1b5219b72 --- /dev/null +++ b/eo/test/t-eogeneration.cpp @@ -0,0 +1,88 @@ +//----------------------------------------------------------------------------- +// t-eogeneration.cpp +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + + // selection + eoLottery lottery; + + // breeder + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + // replacement + eoInclusion inclusion; + + // GA generation + eoGeneration generation(lottery, breeder, inclusion); + + // evolution + unsigned g = 0; + do { + try + { + generation(pop, binary_value); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop[" << ++g << "]" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + } while (pop[0].fitness() < pow(2.0, CHROM_SIZE) - 1); + + return 0; +} + +//----------------------------------------------------------------------------- From b5d3db43ade0189f2ef30c80405ace9d478008d1 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 5 Oct 1999 11:32:17 +0000 Subject: [PATCH 0053/2134] adding eoNonUniformOperator to eoOp.h --- eo/src/eoOp.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 2b0b13e30..b13359acd 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -201,4 +201,29 @@ public: }; //@} + +/** + eoNonUniformOperator: base class for non uniform operators +*/ + +class eoNonUniformOperator +{ +public: + eoNonUniformOperator(const unsigned _max_time = 1): + time_value(0), max_time_value(max(_max_time, 1u)) {} + + void reset() { time_value = 0; } + + unsigned time() const { return time_value; } + + unsigned max_time() const { return max_time_value; } + void max_time(const unsigned _max_time) { max_time_value = _max_time; } + + void operator++() { ++time_value; } + void operator++(int) { ++time_value; } + +private: + unsigned time_value, max_time_value; +}; + #endif From 0133499ac3166f2e81fcb1eb47820895bac35b9a Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 7 Oct 1999 11:38:14 +0000 Subject: [PATCH 0054/2134] putting eoNonUniform into a separate file --- eo/src/eoNonUniform.h | 27 +++++++++++++++++++++++++++ eo/src/eoOp.h | 25 ------------------------- 2 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 eo/src/eoNonUniform.h diff --git a/eo/src/eoNonUniform.h b/eo/src/eoNonUniform.h new file mode 100644 index 000000000..2ce8bbb99 --- /dev/null +++ b/eo/src/eoNonUniform.h @@ -0,0 +1,27 @@ +//----------------------------------------------------------------------------- +// eoNonUniform.h +//----------------------------------------------------------------------------- + +#ifndef eoNonUniform_h +#define eoNonUniform_h + +//----------------------------------------------------------------------------- +// eoNonUniform: base class for non uniform operators +//----------------------------------------------------------------------------- + +template class eoNonUniform +{ +public: + eoNonUniform(const Time& _time = Time(), const Time& _max_time = Time()): + time_value(_time), max_time_value(_max_time) {} + + const Time& time() const { return time_value; } + const Time& max_time() const { return max_time_value; } + +private: + Time &time_value, &max_time_value; +}; + +//----------------------------------------------------------------------------- + +#endif eoNonUniform_h diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index b13359acd..2b0b13e30 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -201,29 +201,4 @@ public: }; //@} - -/** - eoNonUniformOperator: base class for non uniform operators -*/ - -class eoNonUniformOperator -{ -public: - eoNonUniformOperator(const unsigned _max_time = 1): - time_value(0), max_time_value(max(_max_time, 1u)) {} - - void reset() { time_value = 0; } - - unsigned time() const { return time_value; } - - unsigned max_time() const { return max_time_value; } - void max_time(const unsigned _max_time) { max_time_value = _max_time; } - - void operator++() { ++time_value; } - void operator++(int) { ++time_value; } - -private: - unsigned time_value, max_time_value; -}; - #endif From dabbcdc7b43de66f56338b4d12ecef9c624620f7 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 7 Oct 1999 11:39:08 +0000 Subject: [PATCH 0055/2134] adding t-eogeneration --- eo/test/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index a310ebb1f..2e9f301a8 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -9,3 +9,4 @@ t-eoinclusion t-eoinsertion t-eolottery t-eoproblem +t-eogeneration From c85363121964c48a59a84fa52c787a19ec7ec8ff Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 8 Oct 1999 07:40:34 +0000 Subject: [PATCH 0056/2134] Cosmetic changes --- eo/src/eoEvaluator.h | 2 + eo/src/eoOp.h | 374 +++++++++++++++++++++---------------------- 2 files changed, 189 insertions(+), 187 deletions(-) diff --git a/eo/src/eoEvaluator.h b/eo/src/eoEvaluator.h index 1e03b6046..050caf853 100644 --- a/eo/src/eoEvaluator.h +++ b/eo/src/eoEvaluator.h @@ -53,6 +53,8 @@ public: It takes a vector of pointers to eo * @param _vEO is a vector of pointers to eo, that will be evaluated */ + + virtual void operator() ( EOT& _eot ) const = 0; ///@name eoObject methods //@{ diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 2b0b13e30..d93c2a36a 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,8 +1,8 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,185 +20,185 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody -should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ -//@{ - -/// -enum Arity { unary = 0, binary = 1, Nary = 2}; - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - - /// Ctor - eoOp( Arity _arity = unary ) - :arity( _arity ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :arity( _eop.arity ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// Arity: number of operands - Arity readArity() const {return arity;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); -// _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - - -private: - /// arity is the number of operands it takes - Arity arity; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - :eoOp( unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} - - -}; - -#include -/** eoNaryOp is the N-ary operator: genetic operator that takes - several EOs. It could be called an {\em orgy} operator -*/ -template -class eoNaryOp: public eoOp { -public: - - /// Ctor - eoNaryOp( ) - :eoOp( Nary ) {}; - - /// Copy Ctor - eoNaryOp( const eoNaryOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoNaryOp() {}; - - /** applies randomly operator, to the object. - */ - virtual void operator()( eoPop & _eop) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject. - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoNaryOp";}; - //@} - -}; -//@} - -#endif +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody +should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. +@author GeNeura Team +@version 0.1 +@see eoOpFactory +*/ +//@{ + +/// +enum Arity { unary = 0, binary = 1, Nary = 2}; + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + + /// Ctor + eoOp( Arity _arity = unary ) + :arity( _arity ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :arity( _eop.arity ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// Arity: number of operands + Arity readArity() const {return arity;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className(); +// _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + + +private: + /// arity is the number of operands it takes + Arity arity; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + :eoOp( unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} + + +}; + +#include +/** eoNaryOp is the N-ary operator: genetic operator that takes + several EOs. It could be called an {\em orgy} operator +*/ +template +class eoNaryOp: public eoOp { +public: + + /// Ctor + eoNaryOp( ) + :eoOp( Nary ) {}; + + /// Copy Ctor + eoNaryOp( const eoNaryOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoNaryOp() {}; + + /** applies randomly operator, to the object. + */ + virtual void operator()( eoPop & _eop) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject. + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoNaryOp";}; + //@} + +}; +//@} + +#endif From ba4ace6324a4d7071d3373325955d5bef076d324 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 8 Oct 1999 09:51:40 +0000 Subject: [PATCH 0057/2134] Changed stuff to make eoGeneration work --- eo/src/eo | 4 ++++ eo/src/eoEvalFunc.h | 6 ++--- eo/src/eoGeneration.h | 46 +++++++++++++++++++++++++++++--------- eo/test/t-eogeneration.cpp | 22 +++++++----------- 4 files changed, 50 insertions(+), 28 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 8d180d543..21bd61b69 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -59,6 +59,10 @@ #include #include +#include +#include +#include + #include #include #include diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 1d6f98192..6d5fc4cb2 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -41,11 +41,11 @@ struct eoEvalFunc { #ifdef _MSC_VER typedef EOT::Fitness EOFitT; #else - typedef typename Fitness::EOFitT EOFitT; + typedef typename EOT::Fitness EOFitT; #endif /// Effectively applies the evaluation function to an EO or urEO - virtual EOFitT evaluate( EOT & _eo ) const = 0; + virtual void operator() ( EOT & _eo ) const = 0; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index ac062bb26..e8beb9c35 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -1,5 +1,25 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- -// eoGeneration.h +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef eoGeneration_h @@ -7,31 +27,34 @@ //----------------------------------------------------------------------------- -#include // eoPop +#include // eoPop #include // eoSelect, eoTranform, eoMerge //----------------------------------------------------------------------------- // eoGeneration //----------------------------------------------------------------------------- -template class eoGeneration +template class eoGeneration: public eoAlgo { public: /// Constructor. eoGeneration(eoSelect& _select, eoTransform& _transform, - eoMerge& _replace): - select(_select), transform(_transform), replace(_replace) {} + eoMerge& _replace, + eoEvalFunc& _evaluator): + select(_select), transform(_transform), + replace(_replace), evaluator( _evaluator) {} /// Apply one generation of evolution to the population. - template void operator()(eoPop& pop, - Evaluator evaluator) - { - eoPop breeders; - + virtual void operator()(eoPop& pop) { + eoPop breeders; select(pop, breeders); transform(breeders); - for_each(breeders.begin(), breeders.end(), evaluator); + eoPop::iterator i; + // Can't use foreach here since foreach takes the + // parameter by reference + for ( i = breeders.begin(); i != breeders.end(); i++) + evaluator(*i); replace(breeders, pop); } @@ -42,6 +65,7 @@ template class eoGeneration eoSelect& select; eoTransform& transform; eoMerge& replace; + eoEvalFunc& evaluator; }; //----------------------------------------------------------------------------- diff --git a/eo/test/t-eogeneration.cpp b/eo/test/t-eogeneration.cpp index 1b5219b72..f9f68a019 100644 --- a/eo/test/t-eogeneration.cpp +++ b/eo/test/t-eogeneration.cpp @@ -7,23 +7,14 @@ #include +#include "binary_value.h" + //----------------------------------------------------------------------------- typedef eoBin Chrom; //----------------------------------------------------------------------------- -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - main() { const unsigned POP_SIZE = 8, CHROM_SIZE = 16; @@ -59,16 +50,19 @@ main() // replacement eoInclusion inclusion; - + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + // GA generation - eoGeneration generation(lottery, breeder, inclusion); + eoGeneration generation(lottery, breeder, inclusion, eval); // evolution unsigned g = 0; do { try { - generation(pop, binary_value); + generation(pop); } catch (exception& e) { From 378ee811e77f0ae494234f9daa6348ba6908d879 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 8 Oct 1999 09:52:31 +0000 Subject: [PATCH 0058/2134] Added two more files --- eo/src/eoAlgo.h | 55 ++++++++++++++++++++++++++++++++++++++++++ eo/src/eoEvalFuncPtr.h | 50 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 eo/src/eoAlgo.h create mode 100644 eo/src/eoEvalFuncPtr.h diff --git a/eo/src/eoAlgo.h b/eo/src/eoAlgo.h new file mode 100644 index 000000000..87dcaad2c --- /dev/null +++ b/eo/src/eoAlgo.h @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOALGO_H +#define _EOALGO_H + +#include // for population + +/** This is a generic class for population-transforming algorithms. There + is only one operator defined, which takes a population and does stuff to + it. It needn't be a complete algorithm, can be also a step of an + algorithm. This class just gives a common interface to linear + population-transforming algorithms. + @author GeNeura Team + @version 0.0 +*/ +template< class EOT > +class eoAlgo { +public: + + /// Dtor + virtual ~eoAlgo() {}; + + /** Run the algorithm on a population. This operation is not constant, + because somebody would want to change stuff in the algorithm each + time it's applied. + * @param _pop is the population that the algorithm is acting on + */ + virtual void operator() ( eoPop& _pop ) = 0; + +}; + + +#endif diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h new file mode 100644 index 000000000..cacd5c478 --- /dev/null +++ b/eo/src/eoEvalFuncPtr.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTR_H +#define EOEVALFUNCPTR_H + +#include + +/** EOEvalFuncPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + */ +template< class EOT > +struct eoEvalFuncPtr: public eoEvalFunc { + + eoEvalFuncPtr( void (* _eval)( EOT& ) ) + : eoEvalFunc(), evalFunc( _eval ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) const { + (*evalFunc)( _eo ); + }; + + private: + void (* evalFunc )( EOT& ); +}; + +#endif From 259420d9ce40977c084df0a529277d93bb1b864a Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 8 Oct 1999 11:39:20 +0000 Subject: [PATCH 0059/2134] Added a full algorithm to the new EO, with terminators, and things like that --- eo/src/eo | 10 ++++++ eo/src/eoEvalFunc.h | 65 +++++++++++++++++---------------- eo/src/eoFitTerm.h | 64 +++++++++++++++++++++++++++++++++ eo/src/eoGenTerm.h | 82 ++++++++++++++++++++++++++++++++++++++++++ eo/src/eoGeneration.h | 11 ++++-- eo/src/eoTerm.h | 50 ++++++++++++++++++++++++++ eo/test/Makefile.am | 9 ++++- eo/test/Makefile.in | 72 ++++++++++++++++++++++++++++++------- eo/test/t-eoEasyEA.cpp | 81 +++++++++++++++++++++++++++++++++++++++++ 9 files changed, 396 insertions(+), 48 deletions(-) create mode 100644 eo/src/eoFitTerm.h create mode 100644 eo/src/eoGenTerm.h create mode 100644 eo/src/eoTerm.h create mode 100644 eo/test/t-eoEasyEA.cpp diff --git a/eo/src/eo b/eo/src/eo index 21bd61b69..43e84fc79 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -59,10 +59,17 @@ #include #include +// Evaluation functions #include #include #include +// Terminators +#include +#include +#include + +// Selection and reproduction stuff #include #include #include @@ -71,6 +78,9 @@ #include +// Algorithms +#include + //----------------------------------------------------------------------------- // to be continued ... //----------------------------------------------------------------------------- diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 6d5fc4cb2..266303d6f 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -1,8 +1,8 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEvalFunc.h -// (c) GeNeura Team, 1998 +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalFunc.h +// (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,32 +20,31 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -//----------------------------------------------------------------------------- - -#ifndef eoEvalFunc_H -#define eoEvalFunc_H - -/** Evaluate: takes one EO and sets its "fitness" property - * returning this fitness also. That is why EOT is passed by - * non-const reference: it must be altered within evaluate.\\ - - The requirements on the types with which this class is to be - instantiated with are null, or else, they depend on the particular - class it's going to be applied to; EO does not impose any requirement - on it. If you subclass this abstract class, and use it to evaluate an - EO, the requirements on this EO will depend on the evaluator. - */ -template< class EOT > -struct eoEvalFunc { - -#ifdef _MSC_VER - typedef EOT::Fitness EOFitT; -#else - typedef typename EOT::Fitness EOFitT; -#endif - - /// Effectively applies the evaluation function to an EO or urEO - virtual void operator() ( EOT & _eo ) const = 0; -}; - +//----------------------------------------------------------------------------- + +#ifndef eoEvalFunc_H +#define eoEvalFunc_H + +/** Evaluate: takes one EO and sets its "fitness" property + * returning this fitness also. That is why EOT is passed by + * non-const reference: it must be altered within evaluate.\\ + + The requirements on the types with which this class is to be + instantiated with are null, or else, they depend on the particular + class it's going to be applied to; EO does not impose any requirement + on it. If you subclass this abstract class, and use it to evaluate an + EO, the requirements on this EO will depend on the evaluator. + */ +template struct eoEvalFunc { + +#ifdef _MSC_VER + typedef EOT::Fitness EOFitT; +#else + typedef typename EOT::Fitness EOFitT; +#endif + + /// Effectively applies the evaluation function to an EO or urEO + virtual void operator() ( EOT & _eo ) const = 0; +}; + #endif diff --git a/eo/src/eoFitTerm.h b/eo/src/eoFitTerm.h new file mode 100644 index 000000000..d8a7087e0 --- /dev/null +++ b/eo/src/eoFitTerm.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOFITTERM_H +#define _EOFITTERM_H + +#include + + +/** Fitness termination: terminates after a the difference between the +fitness of the best individual and a maximum fitness to achieve is less +than certain number called epsilon., i.e., |maximum-fitness| +class eoFitTerm: public eoTerm { +public: + + /// Ctors/dtors + eoFitTerm( const float _maximum, const float _epsilon ) + : eoTerm (), maximum( _maximum ), epsilon(_epsilon){}; + + /// Copy ctor + eoFitTerm( const eoFitTerm& _t ) + : eoTerm ( _t ), maximum( _t.maximum ), + epsilon(_t.epsilon){}; + + /// + virtual ~eoFitTerm() {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + float bestFitness=_vEO[0].fitness(); + float dif=bestFitness-maximum; + dif=(dif<0)?-dif:dif; + return (dif>epsilon ) || (bestFitness > maximum); + } + +private: + float maximum, epsilon; +}; + +#endif diff --git a/eo/src/eoGenTerm.h b/eo/src/eoGenTerm.h new file mode 100644 index 000000000..7da104c08 --- /dev/null +++ b/eo/src/eoGenTerm.h @@ -0,0 +1,82 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOGENTERM_H +#define _EOGENTERM_H + +#include + +/** Generational termination: terminates after a number of generations +*/ +template< class EOT> +class eoGenTerm: public eoTerm { +public: + + /// Ctors/dtors + eoGenTerm( unsigned _totalGens) + : eoTerm (), repTotalGenerations( _totalGens ), + thisGeneration(0){}; + + /// Copy Ctor + eoGenTerm( const eoGenTerm& _t) + : eoTerm ( _t ), repTotalGenerations( _t.repTotalGenerations ), + thisGeneration(0){}; + + /// Assignment Operator + const eoGenTerm& operator = ( const eoGenTerm& _t) { + if ( &_t != this ) { + repTotalGenerations = _t.repTotalGenerations; + thisGeneration = 0; + } + return *this; + } + + /// Dtor + virtual ~eoGenTerm() {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + // cout << " [" << thisGeneration << "] "; + return (thisGeneration < repTotalGenerations) ; // for the postincrement + } + + /** Sets the number of generations to reach + and sets the current generation to 0 (the begin)*/ + virtual void totalGenerations( unsigned _tg ) { + repTotalGenerations = _tg; + // thisGeneration = 0; + }; + + /** Returns the number of generations to reach*/ + virtual unsigned totalGenerations( ) { + return repTotalGenerations; + }; + +private: + unsigned repTotalGenerations, thisGeneration; +}; + +#endif diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index e8beb9c35..3adbb10e6 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -28,6 +28,7 @@ //----------------------------------------------------------------------------- #include // eoPop +#include #include // eoSelect, eoTranform, eoMerge //----------------------------------------------------------------------------- @@ -43,8 +44,14 @@ template class eoGeneration: public eoAlgo eoMerge& _replace, eoEvalFunc& _evaluator): select(_select), transform(_transform), - replace(_replace), evaluator( _evaluator) {} - + replace(_replace), evaluator( _evaluator) {}; + + /// Copy Constructor. + eoGeneration(eoGeneration& _gen): + select(_gen.select), transform(_gen.transform), + replace(_gen.replace), evaluator( _gen.evaluator ) {}; + + /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { eoPop breeders; diff --git a/eo/src/eoTerm.h b/eo/src/eoTerm.h new file mode 100644 index 000000000..0910a19b9 --- /dev/null +++ b/eo/src/eoTerm.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOTERM_H +#define _EOTERM_H + +#include + +/** Termination condition for the genetic algorithm + * Takes the population as input, returns true for continue, + * false for termination + */ +template< class EOT> +class eoTerm { +public: + + /// Ctors/dtors + virtual ~eoTerm() {}; + + /** Returns false if the training has to stop, true if it + continues \\ + It is non-const since it might change the internal state + of the object, for instance, updating a counter + */ + virtual bool operator() ( const eoPop< EOT >& _pop ) = 0 ; + +}; + +#endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index b0aca05d9..5ac001fe4 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA ############################################################################### @@ -24,6 +24,13 @@ t_eogeneration_LDADD = $(LDADDS) ############################################################################### +t_eoEasyEA_SOURCES = t-eoEasyEA.cpp +t_eoEasyEA_DEPENDENCIES = $(DEPS) +t_eoEasyEA_LDFLAGS = -lm +t_eoEasyEA_LDADD = $(LDADDS) + +############################################################################### + t_eobreeder_SOURCES = t-eobreeder.cpp t_eobreeder_DEPENDENCIES = $(DEPS) t_eobreeder_LDFLAGS = -lm diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 61e66d154..35a27402e 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -87,7 +87,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eogeneration t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA ############################################################################### @@ -98,6 +98,13 @@ t_eogeneration_LDADD = $(LDADDS) ############################################################################### +t_eoEasyEA_SOURCES = t-eoEasyEA.cpp +t_eoEasyEA_DEPENDENCIES = $(DEPS) +t_eoEasyEA_LDFLAGS = -lm +t_eoEasyEA_LDADD = $(LDADDS) + +############################################################################### + t_eobreeder_SOURCES = t-eobreeder.cpp t_eobreeder_DEPENDENCIES = $(DEPS) t_eobreeder_LDFLAGS = -lm @@ -146,6 +153,13 @@ t_eolottery_SOURCES = t-eolottery.cpp t_eolottery_DEPENDENCIES = $(DEPS) t_eolottery_LDFLAGS = -lm t_eolottery_LDADD = $(LDADDS) + +############################################################################### + +t_eo2dVector_SOURCES = t-eo2dVector.cc +t_eo2dVector_DEPENDENCIES = $(DEPS) +t_eo2dVector_LDFLAGS = -lm +t_eo2dVector_LDADD = $(LDADDS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) @@ -155,7 +169,6 @@ DEFS = @DEFS@ -I. -I$(srcdir) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ -t_eogeneration_OBJECTS = t-eogeneration.o t_eobreeder_OBJECTS = t-eobreeder.o t_eoinclusion_OBJECTS = t-eoinclusion.o t_eoinsertion_OBJECTS = t-eoinsertion.o @@ -169,6 +182,9 @@ t_eoproblem_DEPENDENCIES = t_eobin_OBJECTS = t-eobin.o t_eobin_LDFLAGS = t_eolottery_OBJECTS = t-eolottery.o +t_eo2dVector_OBJECTS = t-eo2dVector.o +t_eogeneration_OBJECTS = t-eogeneration.o +t_eoEasyEA_OBJECTS = t-eoEasyEA.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -181,15 +197,16 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best -DEP_FILES = .deps/t-eo.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 -SOURCES = $(t_eogeneration_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) -OBJECTS = $(t_eogeneration_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) +DEP_FILES = .deps/t-eo.P .deps/t-eo2dVector.P .deps/t-eoEasyEA.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 +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) +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) all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .cpp .lo .o .s +.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 test/Makefile @@ -239,10 +256,6 @@ distclean-libtool: maintainer-clean-libtool: -t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) - @rm -f t-eogeneration - $(CXXLINK) $(t_eogeneration_LDFLAGS) $(t_eogeneration_OBJECTS) $(t_eogeneration_LDADD) $(LIBS) - t-eobreeder: $(t_eobreeder_OBJECTS) $(t_eobreeder_DEPENDENCIES) @rm -f t-eobreeder $(CXXLINK) $(t_eobreeder_LDFLAGS) $(t_eobreeder_OBJECTS) $(t_eobreeder_LDADD) $(LIBS) @@ -274,6 +287,22 @@ t-eobin: $(t_eobin_OBJECTS) $(t_eobin_DEPENDENCIES) t-eolottery: $(t_eolottery_OBJECTS) $(t_eolottery_DEPENDENCIES) @rm -f t-eolottery $(CXXLINK) $(t_eolottery_LDFLAGS) $(t_eolottery_OBJECTS) $(t_eolottery_LDADD) $(LIBS) + +t-eo2dVector: $(t_eo2dVector_OBJECTS) $(t_eo2dVector_DEPENDENCIES) + @rm -f t-eo2dVector + $(CXXLINK) $(t_eo2dVector_LDFLAGS) $(t_eo2dVector_OBJECTS) $(t_eo2dVector_LDADD) $(LIBS) + +t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) + @rm -f t-eogeneration + $(CXXLINK) $(t_eogeneration_LDFLAGS) $(t_eogeneration_OBJECTS) $(t_eogeneration_LDADD) $(LIBS) + +t-eoEasyEA: $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_DEPENDENCIES) + @rm -f t-eoEasyEA + $(CXXLINK) $(t_eoEasyEA_LDFLAGS) $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_LDADD) $(LIBS) +.cc.o: + $(CXXCOMPILE) -c $< +.cc.lo: + $(LTCXXCOMPILE) -c $< .cpp.o: $(CXXCOMPILE) -c $< .cpp.lo: @@ -361,6 +390,25 @@ maintainer-clean-depend: >> .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 $< diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp new file mode 100644 index 000000000..59a1d33d6 --- /dev/null +++ b/eo/test/t-eoEasyEA.cpp @@ -0,0 +1,81 @@ +//----------------------------------------------------------------------------- +// t-eoEasyEA.cpp +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + + // selection + eoLottery lottery; + + // breeder + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + // replacement + eoInclusion inclusion; + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + + // Terminators + eoFitTerm term( pow(2.0, CHROM_SIZE), 1 ); + + // GA generation + eoEasyEA ea(lottery, breeder, inclusion, eval, term); + + // evolution + try + { + ea(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- From 557a06ff22d8c2bf8cb22c94e625b203c7d9ddca Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 8 Oct 1999 11:39:58 +0000 Subject: [PATCH 0060/2134] Two files left over added to the repo --- eo/src/eoEasyEA.h | 84 ++++++++++++++++++++++++++++++++++++++++++ eo/test/binary_value.h | 18 +++++++++ 2 files changed, 102 insertions(+) create mode 100644 eo/src/eoEasyEA.h create mode 100644 eo/test/binary_value.h diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h new file mode 100644 index 000000000..5c2f7c029 --- /dev/null +++ b/eo/src/eoEasyEA.h @@ -0,0 +1,84 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEasyEA.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEasyEA_h +#define _eoEasyEA_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include + +/** EOEasyEA: + An easy-to-use evolutionary algorithm; you can use any chromosome, + and any selection transformation, merging and evaluation + algorithms; you can even change in runtime parameters of those + sub-algorithms +*/ + +template class eoEasyEA: public eoAlgo +{ + public: + /// Constructor. + eoEasyEA(eoSelect& _select, + eoTransform& _transform, + eoMerge& _replace, + eoEvalFunc& _evaluator, + eoTerm& _terminator) + :step(_select, _transform, _replace, _evaluator), + terminator( _terminator){}; + + /// Constructor from an already created generation + eoEasyEA(eoGeneration& _gen, + eoTerm& _terminator): + step(_gen), + terminator( _terminator){}; + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + do { + try + { + step(pop); + } + catch (exception& e) + { + string s = e.what(); + s.append( " in eoEasyEA "); + throw runtime_error( s ); + } + } while ( terminator( pop ) ); + } + + /// Class name. + string className() const { return "eoEasyEA"; } + + private: + eoGeneration step; + eoTerm& terminator; +}; + +//----------------------------------------------------------------------------- + +#endif eoEasyEA_h diff --git a/eo/test/binary_value.h b/eo/test/binary_value.h new file mode 100644 index 000000000..f3e05e771 --- /dev/null +++ b/eo/test/binary_value.h @@ -0,0 +1,18 @@ +#include + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +void binary_value(Chrom& _chrom) +{ + float sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + if (_chrom[i]) + sum += pow(2, _chrom.size() - i - 1); + _chrom.fitness(sum); +} From 387059901b003f043761a2f313c6ac03ee946bb6 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 8 Oct 1999 17:45:49 +0000 Subject: [PATCH 0061/2134] adding more functions and tests for eoNonUniform --- eo/src/eo | 4 +- eo/src/eoNonUniform.h | 79 +++++++++++++++++++++++++++++++++----- eo/test/.cvsignore | 1 + eo/test/Makefile.am | 8 +++- eo/test/Makefile.in | 32 +++++++++------ eo/test/t-eoNonUniform.cpp | 31 +++++++++++++++ 6 files changed, 132 insertions(+), 23 deletions(-) create mode 100644 eo/test/t-eoNonUniform.cpp diff --git a/eo/src/eo b/eo/src/eo index 43e84fc79..1f8423c9f 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -81,13 +81,15 @@ // Algorithms #include +// aliens +#include + //----------------------------------------------------------------------------- // to be continued ... //----------------------------------------------------------------------------- /* #include #include -#include */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoNonUniform.h b/eo/src/eoNonUniform.h index 2ce8bbb99..438f72660 100644 --- a/eo/src/eoNonUniform.h +++ b/eo/src/eoNonUniform.h @@ -2,26 +2,85 @@ // eoNonUniform.h //----------------------------------------------------------------------------- -#ifndef eoNonUniform_h -#define eoNonUniform_h +#ifndef EONONUNIFORM_H +#define EONONUNIFORM_H //----------------------------------------------------------------------------- -// eoNonUniform: base class for non uniform operators + +#include // pow + +//----------------------------------------------------------------------------- +// eoNonUniform //----------------------------------------------------------------------------- -template class eoNonUniform +class eoNonUniform { public: - eoNonUniform(const Time& _time = Time(), const Time& _max_time = Time()): - time_value(_time), max_time_value(_max_time) {} + eoNonUniform(const unsigned _num_step): + step_value(0), num_step_value(_num_step) {} - const Time& time() const { return time_value; } - const Time& max_time() const { return max_time_value; } + void reset() { step_value = 0; } + + const unsigned& step() const { return step_value; } + const unsigned& num_step() const { return num_step_value; } + + operator int() const { return step_value < num_step_value; } + + void operator++() { ++step_value; } + void operator++(int) { ++step_value; } private: - Time &time_value, &max_time_value; + unsigned step_value, num_step_value; +}; + +//----------------------------------------------------------------------------- +// eoLinear +//----------------------------------------------------------------------------- + +class eoLinear +{ +public: + eoLinear(const double _first, + const double _last, + const eoNonUniform& _non_uniform): + first(_first), + diff((_last - _first) / (_non_uniform.num_step() - 1)), + non_uniform(_non_uniform) {} + + double operator()() const + { + return first + diff * non_uniform.step(); + } + +private: + double first, diff; + const eoNonUniform& non_uniform; +}; + +//----------------------------------------------------------------------------- +// eoNegExp2 +//----------------------------------------------------------------------------- + +class eoNegExp2 +{ + public: + eoNegExp2(const double _r, + const double _b, + const eoNonUniform& _non_uniform): + r(_r), b(_b), + non_uniform(_non_uniform) {} + + double operator()() const + { + return 1.0 - pow(r, pow(1.0 - (double)non_uniform.step() / + non_uniform.num_step(), b)); + } + + private: + double r, b; + const eoNonUniform& non_uniform; }; //----------------------------------------------------------------------------- -#endif eoNonUniform_h +#endif NON_UNIFORM_HH diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index 2e9f301a8..53ebcf49f 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -10,3 +10,4 @@ t-eoinsertion t-eolottery t-eoproblem t-eogeneration +t-eoNonUniform diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 5ac001fe4..43c6df123 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,13 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform +############################################################################### + +t_eoNonUniform_SOURCES = t-eoNonUniform.cpp +t_eoNonUniform_DEPENDENCIES = $(DEPS) +t_eoNonUniform_LDFLAGS = -lm +t_eoNonUniform_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 35a27402e..46075b193 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 = : @@ -87,7 +86,13 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform +############################################################################### + +t_eoNonUniform_SOURCES = t-eoNonUniform.cpp +t_eoNonUniform_DEPENDENCIES = $(DEPS) +t_eoNonUniform_LDFLAGS = -lm +t_eoNonUniform_LDADD = $(LDADDS) ############################################################################### @@ -185,6 +190,7 @@ t_eolottery_OBJECTS = t-eolottery.o t_eo2dVector_OBJECTS = t-eo2dVector.o t_eogeneration_OBJECTS = t-eogeneration.o t_eoEasyEA_OBJECTS = t-eoEasyEA.o +t_eoNonUniform_OBJECTS = t-eoNonUniform.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -198,11 +204,11 @@ 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-eoEasyEA.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 -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) -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) +.deps/t-eoNonUniform.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 +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) +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) all: all-redirect .SUFFIXES: @@ -299,6 +305,10 @@ t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) t-eoEasyEA: $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_DEPENDENCIES) @rm -f t-eoEasyEA $(CXXLINK) $(t_eoEasyEA_LDFLAGS) $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_LDADD) $(LIBS) + +t-eoNonUniform: $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_DEPENDENCIES) + @rm -f t-eoNonUniform + $(CXXLINK) $(t_eoNonUniform_LDFLAGS) $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: @@ -350,7 +360,7 @@ distdir: $(DISTFILES) @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 \ @@ -449,7 +459,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: diff --git a/eo/test/t-eoNonUniform.cpp b/eo/test/t-eoNonUniform.cpp new file mode 100644 index 000000000..352b229b2 --- /dev/null +++ b/eo/test/t-eoNonUniform.cpp @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------------- +// t-eoNonUniform.cc +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- + +main() +{ + eoNonUniform nu(1000); + + cout << "----------------------------------------------------------" << endl + << "nu.step() = " << nu.step() + << "\t nu.num_step() = " << nu.num_step() << endl + << "----------------------------------------------------------" << endl; + + eoLinear l1(0, 1, nu), l2(1, 0, nu); + eoNegExp2 n1(0.1, 8, nu), n2(0.75, 3, nu); + + for (; nu; ++nu) + { + cout << nu.step() + << "\t" << l1() << "\t" << l2() + << "\t" << n1() << "\t" << n2() + << endl; + } +} + +//----------------------------------------------------------------------------- From f92b133fd00a4fcf6988cd14a5c12d0b31d7e1db Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 11 Oct 1999 10:20:39 +0000 Subject: [PATCH 0062/2134] updating with new tests --- eo/test/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index 53ebcf49f..e298e5c79 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -11,3 +11,5 @@ t-eolottery t-eoproblem t-eogeneration t-eoNonUniform +t-eo2dVector +t-eoEasyEA From 661069d01cd16c36414eade4a06f9bb170d9a7f7 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 13 Oct 1999 08:38:33 +0000 Subject: [PATCH 0063/2134] Changes in configure y makefiles to account for new version and new files --- eo/configure.in | 2 +- eo/src/Makefile.am | 3 ++- eo/test/Makefile.in | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 98cb2e3d1..8bd8183c9 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,6 +1,6 @@ AC_INIT(src/eo) -AM_INIT_AUTOMAKE(eo, 0.0.0) +AM_INIT_AUTOMAKE(eo, 0.0.1) AC_PROG_CXX diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 8b8e57c0d..e08406085 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,4 +8,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h + diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 46075b193..64d307ff0 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -72,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 From 0e4d27ec4d6f55678c97452077d204d325451e04 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 15 Oct 1999 07:34:55 +0000 Subject: [PATCH 0064/2134] Small changes to makefiles --- eo/configure.in | 2 +- eo/src/Makefile.am | 2 +- eo/test/Makefile.am | 2 +- eo/test/Makefile.in | 13 ++++++------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 8bd8183c9..0025aabc3 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,6 +1,6 @@ AC_INIT(src/eo) -AM_INIT_AUTOMAKE(eo, 0.0.1) +AM_INIT_AUTOMAKE(eo, 0.0.3) AC_PROG_CXX diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index e08406085..a9c52e8a9 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,5 +8,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h eoNonUniform.h diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 43c6df123..fd1887290 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -30,7 +30,7 @@ t_eogeneration_LDADD = $(LDADDS) ############################################################################### -t_eoEasyEA_SOURCES = t-eoEasyEA.cpp +t_eoEasyEA_SOURCES = t-eoEasyEA.cpp binary_value.h t_eoEasyEA_DEPENDENCIES = $(DEPS) t_eoEasyEA_LDFLAGS = -lm t_eoEasyEA_LDADD = $(LDADDS) diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 64d307ff0..1dab5b481 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -62,17 +62,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ -AS = @AS@ CC = @CC@ CXX = @CXX@ -DLLTOOL = @DLLTOOL@ -LD = @LD@ LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -NM = @NM@ -OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ @@ -103,7 +97,7 @@ t_eogeneration_LDADD = $(LDADDS) ############################################################################### -t_eoEasyEA_SOURCES = t-eoEasyEA.cpp +t_eoEasyEA_SOURCES = t-eoEasyEA.cpp binary_value.h t_eoEasyEA_DEPENDENCIES = $(DEPS) t_eoEasyEA_LDFLAGS = -lm t_eoEasyEA_LDADD = $(LDADDS) @@ -196,6 +190,11 @@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in From bc922d38714d4ef68e070143dbd14fdd24c21294 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 15 Oct 1999 11:18:52 +0000 Subject: [PATCH 0065/2134] Changed eoBinBitFlip thanks to Jacques suggestion --- eo/src/eoBitOp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index d69fe85f3..bd21e937d 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -61,9 +61,9 @@ template class eoBinBitFlip: public eoMonOp */ void operator()(Chrom& chrom) const { - eoUniform uniform(0.0, 1.0); - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; + eoUniform uniform(0, chrom.size()); + unsigned i = uniform(); + chrom[i] = (chrom[i]) ? false : true; } }; From ef43aaf616e8ef28a938e3e4c1475bd32607995b Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 15 Oct 1999 13:16:50 +0000 Subject: [PATCH 0066/2134] bug fix in eoBinBitflip --- eo/src/eoBitOp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index bd21e937d..147872f4f 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -61,9 +61,9 @@ template class eoBinBitFlip: public eoMonOp */ void operator()(Chrom& chrom) const { - eoUniform uniform(0, chrom.size()); - unsigned i = uniform(); - chrom[i] = (chrom[i]) ? false : true; + eoUniform uniform(0, chrom.size()); + unsigned bit = uniform(); + chrom[bit] = !chrom[bit]; } }; From 18f6c3151390a7a2589e56a2d279799664113ee6 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 19 Oct 1999 11:47:15 +0000 Subject: [PATCH 0067/2134] Small modifications --- eo/src/EO.h | 88 +++++++++++++++++++++--------------------- eo/test/t-eoEasyEA.cpp | 1 + 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 233746bc8..bc5732008 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -1,5 +1,5 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- // EO.h // (c) GeNeura Team 1998 @@ -32,13 +32,13 @@ #include //----------------------------------------------------------------------------- -/** EO is a base class for evolvable objects, that is, the subjects of evolution. - EOs have only got a fitness, which at the same time needs to be only an object with the - operation less than (<) defined. Fitness says how good is the object; evolution or change - of these objects is left to the genetic operators. A fitness less than another means a - worse fitness, in whatever the context; thus, fitness is always maximized; although - it can be minimized with a proper definition of the < operator.\\ - The fitness object must have, besides an void ctor, a copy ctor. +/** EO is a base class for evolvable objects, that is, the subjects of evolution. + EOs have only got a fitness, which at the same time needs to be only an object with the + operation less than (<) defined. Fitness says how good is the object; evolution or change + of these objects is left to the genetic operators. A fitness less than another means a + worse fitness, in whatever the context; thus, fitness is always maximized; although + it can be minimized with a proper definition of the < operator.\\ + The fitness object must have, besides an void ctor, a copy ctor. */ template class EO: public eoObject, public eoPersistent { @@ -59,11 +59,11 @@ public: invalidFitness = false; }; - /// Copy ctor - EO( const EO& _eo ): repFitness( _eo.repFitness ), invalidFitness( _eo.invalidFitness ) {}; - - /// Virtual dtor - virtual ~EO() {}; + /// Copy ctor + EO( const EO& _eo ): repFitness( _eo.repFitness ), invalidFitness( _eo.invalidFitness ) {}; + + /// Virtual dtor + virtual ~EO() {}; /// Return fitness value. Fitness fitness() const @@ -89,43 +89,43 @@ public: /** Return true If fitness value is invalid, false otherwise. * @return true If fitness is invalid. */ - bool invalid() const { return invalidFitness; } + bool invalid() const { return invalidFitness; } /** Returns true if @return true if the fitness is higher */ bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness();} - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - * @return the class name as a string - */ - virtual string className() const { return "EO"; }; - - /** - * Read object.\\ - * Calls base class, just in case that one had something to do. The read and print - * methods should be compatible and have the same format. In principle, format is - * "plain": they just print a number - * @param _is a istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) { - _is >> repFitness; - invalidFitness = false; - } - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << repFitness << endl; - } + /// Methods inherited from eoObject + //@{ - //@} + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "EO"; }; + + /** + * Read object.\\ + * Calls base class, just in case that one had something to do. The read and print + * methods should be compatible and have the same format. In principle, format is + * "plain": they just print a number + * @param _is a istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + _is >> repFitness; + invalidFitness = false; + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << repFitness << endl; + } + + //@} private: Fitness repFitness; // value of fitness for this chromosome diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index 59a1d33d6..bf81e63dd 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -5,6 +5,7 @@ // to avoid long name warnings #pragma warning(disable:4786) + #include #include "binary_value.h" From 46b6a9e17a2254aaa2e0b620b57619145377274b Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 25 Oct 1999 08:25:42 +0000 Subject: [PATCH 0068/2134] Added new RNG and test files for it --- eo/configure.in | 2 +- eo/src/Makefile.am | 2 +- eo/src/eoBitOp.h | 6 +- eo/src/eoNegExp.h | 7 +- eo/src/eoNormal.h | 8 +- eo/src/eoRNG.h | 430 ++++++++++++++++++++++++++++++++++++++++ eo/src/eoUniform.h | 30 +-- eo/test/Makefile.am | 17 +- eo/test/Makefile.in | 44 +++- eo/test/t-eoRandom.cpp | 28 +++ eo/test/t-eoUniform.cpp | 22 ++ 11 files changed, 561 insertions(+), 35 deletions(-) create mode 100644 eo/src/eoRNG.h create mode 100644 eo/test/t-eoRandom.cpp create mode 100644 eo/test/t-eoUniform.cpp diff --git a/eo/configure.in b/eo/configure.in index 0025aabc3..2a9c2063c 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,6 +1,6 @@ AC_INIT(src/eo) -AM_INIT_AUTOMAKE(eo, 0.0.3) +AM_INIT_AUTOMAKE(eo, 0.0.4) AC_PROG_CXX diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index a9c52e8a9..7e91cf290 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,5 +8,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h eoNonUniform.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h eoNonUniform.h eoRNG.h diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index 147872f4f..bd21e937d 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -61,9 +61,9 @@ template class eoBinBitFlip: public eoMonOp */ void operator()(Chrom& chrom) const { - eoUniform uniform(0, chrom.size()); - unsigned bit = uniform(); - chrom[bit] = !chrom[bit]; + eoUniform uniform(0, chrom.size()); + unsigned i = uniform(); + chrom[i] = (chrom[i]) ? false : true; } }; diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h index 54812ed2b..3805669b7 100644 --- a/eo/src/eoNegExp.h +++ b/eo/src/eoNegExp.h @@ -27,12 +27,10 @@ //----------------------------------------------------------------------------- -#include -#include - #include #include // for base class +#include // for base class //----------------------------------------------------------------------------- // Class eoNegExp @@ -56,7 +54,8 @@ class eoNegExp: public eoRnd eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; /// Returns an uniform dandom number over the interval [min, max). - virtual T operator()() { return - mean*log((double)rand() / RAND_MAX); } + virtual T operator()() { + return T( -mean*log((double)rng.rand() / rng.rand_max())); } private: T mean; diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h index c06916738..5dfe49bd1 100644 --- a/eo/src/eoNormal.h +++ b/eo/src/eoNormal.h @@ -27,9 +27,9 @@ //----------------------------------------------------------------------------- -#include #include #include // for base class +#include // for random number generator //----------------------------------------------------------------------------- // Class eoNormal @@ -66,12 +66,12 @@ class eoNormal: public eoRnd double p, v; do { - p = ((double)rand() / RAND_MAX)*2-1; - q = ((double)rand() / RAND_MAX)*2-1; + p = ((double)rng.rand() / rng.rand_max())*2-1; + q = ((double)rng.rand() / rng.rand_max())*2-1; v = p*p + q*q; } while(v > 1.0 || v <0.25); - sqRatio = sqrt(-2*log((double)rand() / RAND_MAX) / v); + sqRatio = sqrt(-2*log((double)rand() / rng.rand_max()) / v); phase = true; return T( (sqRatio * p * sd) + mean ); }; diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h new file mode 100644 index 000000000..3f15988e6 --- /dev/null +++ b/eo/src/eoRNG.h @@ -0,0 +1,430 @@ +/* +* Random number generator adapted from (see comments below) +* +* The random number generator is modified into a class +* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +* transformation to generate normal deviates. +* +*/ + +/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ + +// This is the ``Mersenne Twister'' random number generator MT19937, which +// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) +// starting from any odd seed in 0..(2^32 - 1). This version is a recode +// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by +// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in +// July-August 1997). +// +// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +// generate 300 million random numbers; after recoding: 24.0 sec. for the same +// (i.e., 46.5% of original time), so speed is now about 12.5 million random +// number generations per second on this machine. +// +// According to the URL +// (and paraphrasing a bit in places), the Mersenne Twister is ``designed +// with consideration of the flaws of various existing generators,'' has +// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally +// equidistributed, and ``has passed many stringent tests, including the +// die-hard test of G. Marsaglia and the load test of P. Hellekalek and +// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 +// to 5012 bytes of static data, depending on data type sizes, and the code +// is quite short as well). It generates random numbers in batches of 624 +// at a time, so the caching and pipelining of modern systems is exploited. +// It is also divide- and mod-free. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Library General Public License as published by +// the Free Software Foundation (either version 2 of the License or, at your +// option, any later version). This library is distributed in the hope that +// it will be useful, but WITHOUT ANY WARRANTY, without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU Library General Public License for more details. You should have +// received a copy of the GNU Library General Public License along with this +// library; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307, USA. +// +// The code as Shawn received it included the following notice: +// +// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When +// you use this, send an e-mail to with +// an appropriate reference to your work. +// +// It would be nice to CC: when you write. +// + +// +// uint32 must be an unsigned integer type capable of holding at least 32 +// bits; exactly 32 should be fastest, but 64 is better on an Alpha with +// GCC at -O3 optimization so try your options and see what's best for you +// + +/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ + + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + +#include + +// TODO: check for various compilers if this is exactly 32 bits +// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// so neat preprocessing tricks will not work + +typedef unsigned long uint32; // Compiler and platform dependent! + +//----------------------------------------------------------------------------- +// eoRng +//----------------------------------------------------------------------------- +/** +eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +for generating random numbers. The various member functions implement useful functions +for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). + +Note for people porting EO to other platforms: please make sure that the typedef +uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not +shorter. If it is longer, file compatibility between EO on different platforms +may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + /** + ctor takes a seed not unintentionally defaulted at 42. + */ + eoRng(uint32 s = 42U) : state(0), next(0), left(-1), cached(false) + { + state = new uint32[N+1]; + initialize(s); + } + + ~eoRng(void) + { + delete [] state; + } + + /** + Re-initializes the Random Number Generator. + */ + void reseed(uint32 s) + { + initialize(s); + } + + /** + uniform(m = 1.0) returns a random double in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(rand_max()); + } + + /** + random() returns a random integer in the range [0, m) + */ + uint32 random(uint32 m) + { + return uint32(uniform() * double(m)); + } + + /** + flip() tosses a biased coin such that flip(x/100.0) will + returns true x% of the time + */ + bool flip(float bias) + { + return uniform() < bias; + } + + /** + normal() zero mean gaussian deviate with standard deviation of 1 + */ + double normal(void); // gaussian mutation, stdev 1 + + /** + normal(stdev) zero mean gaussian deviate with user defined standard deviation + */ + double normal(double stdev) + { + return stdev * normal(); + } + + /** + normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation + */ + double normal(double mean, double stdev) + { + return mean + normal(stdev); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32 rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32 rand_max(void) const { return (uint32) 0xffffffff; } + + /** + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, T total = 0) + { + if (total == 0) + { // count + for (int i = 0; i < vec.size(); ++i) + total += vec[i]; + } + + float change = uniform() * total; + + int i = 0; + + while (change > 0) + { + change -= vec[i++]; + } + + return --i; + } + + /// + void printOn(ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /// + void readFrom(istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + +private : + uint32 restart(void); + void initialize(uint32 seed); + + uint32* state; // the array for the state + uint32* next; + int left; + + bool cached; + float cacheValue; + + static const int N; + static const int M; + static const uint32 K; // a magic constant + +}; + +// Initialization of statics +const int eoRng::N = 624; +const int eoRng::M = 397; +const uint32 eoRng::K = (0x9908B0DFU); // a magic constant + +/** + The one and only global eoRng object +*/ +static eoRng rng; + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + +inline void eoRng::initialize(uint32 seed) + { + // + // We initialize state[0..(N-1)] via the generator + // + // x_new = (69069 * x_old) mod 2^32 + // + // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's + // _The Art of Computer Programming_, Volume 2, 3rd ed. + // + // Notes (SJC): I do not know what the initial state requirements + // of the Mersenne Twister are, but it seems this seeding generator + // could be better. It achieves the maximum period for its modulus + // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if + // x_initial can be even, you have sequences like 0, 0, 0, ...; + // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, + // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. + // + // Even if x_initial is odd, if x_initial is 1 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 0, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + // ... + // + // and if x_initial is 3 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 1, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + // ... + // + // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is + // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It + // also does well in the dimension 2..5 spectral tests, but it could be + // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + // + // Note that the random number user does not see the values generated + // here directly since restart() will always munge them first, so maybe + // none of all of this matters. In fact, the seed values made here could + // even be extra-special desirable if the Mersenne Twister theory says + // so-- that's why the only change I made is to restrict to odd seeds. + // + + left = -1; + + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU); + } + + +inline uint32 eoRng::restart(void) +{ + register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + +inline uint32 eoRng::rand(void) + { + uint32 y; + + if(--left < 0) + return(restart()); + + y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); + } + +inline double eoRng::normal(void) +{ + if (cached) + { + cached = false; + return cacheValue; + } + + float rSquare, factor, var1, var2; + + do + { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + + rSquare = var1 * var1 + var2 * var2; + } + while (rSquare >= 1.0 || rSquare == 0.0); + + factor = sqrt(-2.0 * log(rSquare) / rSquare); + + cacheValue = var1 * factor; + cached = true; + + return (var2 * factor); +} + +#endif diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index eec13ac42..fd9946bd5 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -28,10 +28,9 @@ //----------------------------------------------------------------------------- -#include -#include - #include +#include + //----------------------------------------------------------------------------- // Class eoUniform //----------------------------------------------------------------------------- @@ -47,22 +46,23 @@ class eoUniform: public eoRnd * @param _max The maximum value in the interval. */ eoUniform(T _min = 0, T _max = 1) - : eoRnd(), minim(_min), diff(_max - _min) {} - - /** - * copy constructor. - * @param _rnd the other rnd - */ - eoUniform( const eoUniform& _rnd) - : eoRnd( _rnd), minim(_rnd.minim), diff(_rnd.diff) {} + : eoRnd(), min(_min), diff(_max - _min) {} + + /** + * copy constructor. + * @param _rnd the other rnd + */ + eoUniform( const eoUniform& _rnd) + : eoRnd( _rnd), min(_rnd.minim), diff(_rnd.diff) {} - /// Returns an uniform dandom number over the interval [min, max). - virtual T operator()() { - return minim+ T( (diff * rand() )/ RAND_MAX); + /** Returns an uniform random number over the interval [min, max) + Uses global rng object */ + virtual T operator()() { + return min + T( rng.uniform( diff ) ); } private: - T minim; + T min; double diff; }; diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index fd1887290..7d6ffe8cb 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,8 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom + ############################################################################### t_eoNonUniform_SOURCES = t-eoNonUniform.cpp @@ -23,6 +24,20 @@ t_eoNonUniform_LDADD = $(LDADDS) ############################################################################### +t_eoUniform_SOURCES = t-eoUniform.cpp +t_eoUniform_DEPENDENCIES = $(DEPS) +t_eoUniform_LDFLAGS = -lm +t_eoUniform_LDADD = $(LDADDS) + +############################################################################### + +t_eoRandom_SOURCES = t-eoRandom.cpp +t_eoRandom_DEPENDENCIES = $(DEPS) +t_eoRandom_LDFLAGS = -lm +t_eoRandom_LDADD = $(LDADDS) + +############################################################################### + t_eogeneration_SOURCES = t-eogeneration.cpp t_eogeneration_DEPENDENCIES = $(DEPS) t_eogeneration_LDFLAGS = -lm diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 1dab5b481..8482c5f0d 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -62,11 +62,17 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ +AS = @AS@ CC = @CC@ CXX = @CXX@ +DLLTOOL = @DLLTOOL@ +LD = @LD@ LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +NM = @NM@ +OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ @@ -80,7 +86,8 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom + ############################################################################### t_eoNonUniform_SOURCES = t-eoNonUniform.cpp @@ -90,6 +97,20 @@ t_eoNonUniform_LDADD = $(LDADDS) ############################################################################### +t_eoUniform_SOURCES = t-eoUniform.cpp +t_eoUniform_DEPENDENCIES = $(DEPS) +t_eoUniform_LDFLAGS = -lm +t_eoUniform_LDADD = $(LDADDS) + +############################################################################### + +t_eoRandom_SOURCES = t-eoRandom.cpp +t_eoRandom_DEPENDENCIES = $(DEPS) +t_eoRandom_LDFLAGS = -lm +t_eoRandom_LDADD = $(LDADDS) + +############################################################################### + t_eogeneration_SOURCES = t-eogeneration.cpp t_eogeneration_DEPENDENCIES = $(DEPS) t_eogeneration_LDFLAGS = -lm @@ -185,6 +206,8 @@ t_eo2dVector_OBJECTS = t-eo2dVector.o t_eogeneration_OBJECTS = t-eogeneration.o t_eoEasyEA_OBJECTS = t-eoEasyEA.o t_eoNonUniform_OBJECTS = t-eoNonUniform.o +t_eoUniform_OBJECTS = t-eoUniform.o +t_eoRandom_OBJECTS = t-eoRandom.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -203,11 +226,12 @@ 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-eoEasyEA.P \ -.deps/t-eoNonUniform.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 -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) -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) +.deps/t-eoNonUniform.P .deps/t-eoRandom.P .deps/t-eoUniform.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 +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) +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) all: all-redirect .SUFFIXES: @@ -308,6 +332,14 @@ t-eoEasyEA: $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_DEPENDENCIES) t-eoNonUniform: $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_DEPENDENCIES) @rm -f t-eoNonUniform $(CXXLINK) $(t_eoNonUniform_LDFLAGS) $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_LDADD) $(LIBS) + +t-eoUniform: $(t_eoUniform_OBJECTS) $(t_eoUniform_DEPENDENCIES) + @rm -f t-eoUniform + $(CXXLINK) $(t_eoUniform_LDFLAGS) $(t_eoUniform_OBJECTS) $(t_eoUniform_LDADD) $(LIBS) + +t-eoRandom: $(t_eoRandom_OBJECTS) $(t_eoRandom_DEPENDENCIES) + @rm -f t-eoRandom + $(CXXLINK) $(t_eoRandom_LDFLAGS) $(t_eoRandom_OBJECTS) $(t_eoRandom_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp new file mode 100644 index 000000000..0923e8508 --- /dev/null +++ b/eo/test/t-eoRandom.cpp @@ -0,0 +1,28 @@ +//----------------------------------------------------------------------------- +// t-eouniform +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // eoBin +#include +#include + +//----------------------------------------------------------------------------- + +main() { + eoNormal n1(-2.5,3.5); + eoNormal n2(0.003, 0.0005 ); + eoNormal n3( 10000000U, 10000U); + eoNegExp e1(3.5); + eoNegExp e2(0.003 ); + eoNegExp e3( 10000U); + cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; + for ( unsigned i = 0; i < 100; i ++) { + cout << n1() << "\t" << n2() << "\t" << n3() << "\t" << + e1() << "\t" << e2() << "\t" << e3() << endl; + } + +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoUniform.cpp b/eo/test/t-eoUniform.cpp new file mode 100644 index 000000000..1e1e9594d --- /dev/null +++ b/eo/test/t-eoUniform.cpp @@ -0,0 +1,22 @@ +//----------------------------------------------------------------------------- +// t-eouniform +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // eoBin + +//----------------------------------------------------------------------------- + +main() { + eoUniform u1(-2.5,3.5); + eoUniform u2(0.003, 0 ); + eoUniform u3( 10000U, 10000000U); + cout << "u1\t\tu2\t\tu3" << endl; + for ( unsigned i = 0; i < 100; i ++) { + cout << u1() << "\t" << u2() << "\t" << u3() << endl; + } + +} + +//----------------------------------------------------------------------------- From 0d8648c0e67a395a787a3966e5000b159ca4e7b4 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 29 Oct 1999 11:23:10 +0000 Subject: [PATCH 0069/2134] Added eoParser --- eo/configure.in | 2 +- eo/src/Makefile.am | 2 +- eo/src/UException.h | 41 +++ eo/src/eoParser.h | 790 +++++++++++++++++++++++++++++++++++++++++++ eo/src/eoRNG.h | 16 + eo/test/Makefile.am | 9 +- eo/test/Makefile.in | 20 +- eo/test/t-parser.cpp | 165 +++++++++ 8 files changed, 1038 insertions(+), 7 deletions(-) create mode 100644 eo/src/UException.h create mode 100644 eo/src/eoParser.h create mode 100644 eo/test/t-parser.cpp diff --git a/eo/configure.in b/eo/configure.in index 2a9c2063c..715a42c9a 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,6 +1,6 @@ AC_INIT(src/eo) -AM_INIT_AUTOMAKE(eo, 0.0.4) +AM_INIT_AUTOMAKE(eo, 0.0.5) AC_PROG_CXX diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 7e91cf290..314a1275d 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,5 +8,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h eoNonUniform.h eoRNG.h +libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h eoNonUniform.h eoRNG.h eoParser.h diff --git a/eo/src/UException.h b/eo/src/UException.h new file mode 100644 index 000000000..41e8213f5 --- /dev/null +++ b/eo/src/UException.h @@ -0,0 +1,41 @@ +//----------------------------------------------------------------------------- +// UException.h +//----------------------------------------------------------------------------- + +#ifndef _UEXCEPTION_H +#define _UEXCEPTION_H + +#include +#if defined (__BCPLUSPLUS__) +#include +#else +#include +#endif + +using namespace std; + +//----------------------------------------------------------------------------- +// Class UException +//----------------------------------------------------------------------------- + +//@{ +/** + * This class manages exceptions. It´s barely an extension of the standard exception, + * but it can be initialized with an STL string. Called UException (utils-exception)+ + * to avoid conflicts with other classes. + */ +class UException: public exception { + public: + /// + UException( const string& _msg ): msg( _msg ) { }; + + /// + virtual const char* what() const { return msg.c_str(); }; + + private: + string msg; +}; + + +//@} +#endif diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h new file mode 100644 index 000000000..0bfe70c06 --- /dev/null +++ b/eo/src/eoParser.h @@ -0,0 +1,790 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +/* eoParser.h + some classes to parser either the command line or a parameter file + + (c) Marc Schoenauer and Geneura team, 1999 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +/* eoParser.h + some classes to parser either the command line or a parameter file + + (c) geneura team, 1999 +-----------------------------------------------------------------------------*/ + +#ifndef _PARSER_H +#define _PARSER_H + +// Standard C libraries +#include +#include +#include +#include +// STL includes +#include +#include +#include +#include +#include + +#include "UException.h" + +using namespace std; + + +//----------------------------------------------------------------------------- +// Class Param +//----------------------------------------------------------------------------- + +/** + * A param repesents an argument that can be passed to a program in the command line + */ +class Param { +public: + + /** + * Type of params + */ + enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; + + /** + * Construct an Param. + * @param _shortName Short name of the argument + * @param _longName Long name of the argument + * @param _default The default value + * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) + * @param _description Description of the parameter. What is useful for. + * @param _required If it is a necessary parameter or not + */ + Param (string _shortName="-h", string _longName="--help", + string _default = "", valueType _valType= STRING, + string _description="Shows this help", + bool _required=false ) + : repShortName(_shortName), repLongName(_longName), + repDescription(_description ), repEnv(""), repDefault(_default), + repValue(_default), repValType( _valType), + repRequired( _required), repChanged(false) { + + const char *c = repLongName.c_str(); + for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); + parse( param ); + params.push_back( param ); + + istrstream is(param.value().c_str()); + vector retValue; + string tmpStr; + + is >> tmpStr; + while(is){ + retValue.push_back(tmpStr); + is >> tmpStr; + } + return retValue; + }; + + /** + * Gets the int value of a param given the full description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + int getInt (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + int retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the unsigned lon value of a param given ... + * @param see above + * @exception BadType if the param's value isn't a correct unsigned long + */ + + int getUnsignedLong (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + unsigned long retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the float value of a param given the description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + float getFloat (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + float retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + + string parse_string (istream & _is) { + string paramValue; + _is >> paramValue; + //if the first character of the string or array is not a " => just one word or array-element. + if( paramValue[0] != '\"' ) + return paramValue; + + if( paramValue[1] == '\"' ) // the empty string + return "" ; + + //else => read until the next " (the end of the string). + const char *c = paramValue.c_str(); + string tmpStr = c+1;// skip the " + if (tmpStr[tmpStr.length()-1] == '\"') { // one word only + tmpStr[tmpStr.length()-1] = '\0'; + return tmpStr; + } + + bool stop = false; + while (_is && !stop) { + _is >> paramValue; + // test last character of paramValue for " + if (paramValue[paramValue.length()-1] == '\"') { + paramValue[paramValue.length()-1] = '\0'; + stop = true; + } + tmpStr = tmpStr + " " + paramValue ; + } + return tmpStr; + }; + + + void parse (Param & param) { + int i; + string tmpStr, ReadStr, FirstWord; + + // FIRST: look if the associated environment variables have any value, to use them. + if( getenv( param.environment().c_str() ) ) { + //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; + if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || + ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) + ) { // found the keyword + + Param::valueType tmp = param.valType(); + switch ( tmp ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + param.value("true" ); + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + is >> tmpStr; + param.value(tmpStr); + break; + + case Param::STRING: + tmpStr = parse_string(is); + param.value(tmpStr); + break; + + case Param::ARRAY: + ReadStr = parse_string(is); + if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array + param.value(ReadStr); + break; + } + // read next word - and keep it in case of <> mismatch + FirstWord = parse_string(is); + // test for empty array + if (FirstWord == ">") { + param.value(""); + break; + } + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_string(is); + while ( is && (ReadStr != ">") ) { + tmpStr = tmpStr + " " + ReadStr; + ReadStr = parse_string(is); + } + + if (!is) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + } + else + param.value(tmpStr); + break; + } + } + } + + + // LAST (highest priority) parse the command line arguments + for (i=1 ; i" --> a single string in the array + param.value(ReadStr); + }else{ + // read next word - and keep it in case of <> mismatch + FirstWord = parse_argv[i++]; + + // test for empty array + if (FirstWord == ">") { + param.value(""); + }else{ + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_argv[i++]; + while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + }else{ + param.value(tmpStr); + } + } + } + } + } + break; + } + + //MS after trying all possibilities, and if the value has not changed + // though the parameter was required, protest! + if (param.required() && !param.changed()) + throw Parser::MissingReqParam(param.shortName()); + + }; + + /** + * Sets a new value for a param given its short name or its long name. + * @param _name One of the names of the param. + * @param _value Value to be assigned. + * @exception UnknownArg if the param doesn't exist + * @exception MissingVal if the param hasn't got a value + */ + Param::valueType setParamValue (const string& _name, const char* _value){ + vector::iterator pos; + + for (pos=params.begin() ; pos!=params.end() ; pos++) + if (pos->shortName()==_name || pos->longName()==_name) + break; + + // if found ... + if (pos!=params.end()) { + switch ( pos->valType() ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + pos->value("true"); + break; + case Param::ARRAY : + case Param::INT: + case Param::UL: + case Param::FLOAT: + case Param::STRING: + if (_value != NULL){ + pos->value(_value); + }else{ + throw Parser::MissingVal(_name); + return Param::BOOL; + } + break; + } // switch + + return pos->valType(); + + }else{ + throw Parser::UnknownArg(_name); + return Param::BOOL; + } + }; + + friend ostream & operator<< ( ostream & os, Parser & _parser ) + { + vector::iterator p; + //print every param with its value + for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { + switch ( p->valType() ) { + case Param::BOOL : + if(p->value() == "true") + os << p->longName(); + else + os << "#" << p->longName() ; // so the name of the bool is commented out + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + os << p->longName()<<" "<value(); + break; + + case Param::ARRAY : + os << p->longName() << " < " << p->value() << " >" ; + break; + case Param::STRING: + os << p->longName()<<" \""<value()<<"\" "; + break; + case Param::TITLE: + os << endl; // Title is in the description below + break; + } // switch + os << "\t # " << p->description() << " [" << p->defValue() << "]" << endl; + } + return os; + }; + + /** + * Prints out the list of parameters in the output file (if specified) + */ + void outputParam(string _OutputFile="") + { + if (_OutputFile == "") { + _OutputFile = parse_argv[0]; + _OutputFile += ".status"; + } + + ofstream os(_OutputFile.c_str()); + os << "Parameters used by \"" << programName << "\" (" + << programDescription << ")" << endl << endl; + os << *this; + }; + + /** + * Prints an automatic help in the standard output using the information + * provided by parameters + */ + void printHelp() { + vector::iterator p; + unsigned i; + + // print program name and description + cout << this->programName <<":"<valType() != Param::TITLE ) { + if( p->valType() != Param::BOOL ){ + cout << ( (!p->required())?"[":""); + cout <shortName()<<" value"<required())?"]":"")<<" "; + }else{ + cout << "["<shortName()<<"] "; + } + } // for p + cout << endl<valType() != Param::TITLE ) { + cout << p->shortName()<<","<longName()<<":\t"<description()<valType() ) { + case Param::INT: cout <<"Integer"; break; + case Param::UL: cout <<"Unsigned Long Integer"; break; + case Param::FLOAT: cout <<"Float"; break; + case Param::STRING: cout <<"String"; break; + case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; + case Param::BOOL: cout << "Flag"; break; + case Param::TITLE: break; + } // switch + if(p->valType() == Param::BOOL) + cout << ") True if present" << endl; + else + cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()< in array value + */ + class BadArrayParam : public UException { + public: + + /** + * Constructor + * @param _param The param + * @param _first_word The first word read after the "<" + */ + BadArrayParam(const string& _param, const string &_first_word) : + UException("Array parameter " + _param + ": No matching > (" + _first_word + + "... )") {}; + }; + +private: + vector params; + string programName; + string programDescription; + int parse_argc; + char **parse_argv; + string InputFileName; + +}; + +#endif diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index 3f15988e6..4233f8e4a 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -5,6 +5,21 @@ * by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller * transformation to generate normal deviates. * + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ /* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ @@ -67,6 +82,7 @@ #define EO_RANDOM_NUMBER_GENERATOR #include +#include // TODO: check for various compilers if this is exactly 32 bits // Unfortunately MSVC's preprocessor does not comprehends sizeof() diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 7d6ffe8cb..3833080a7 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser ############################################################################### @@ -109,3 +109,10 @@ t_eo2dVector_LDFLAGS = -lm t_eo2dVector_LDADD = $(LDADDS) ############################################################################### + +t_parser_SOURCES = t-parser.cpp +t_parser_DEPENDENCIES = $(DEPS) +t_parser_LDFLAGS = -lm +t_parser_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 8482c5f0d..44669bf6b 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -86,7 +86,7 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser ############################################################################### @@ -180,6 +180,13 @@ t_eo2dVector_SOURCES = t-eo2dVector.cc t_eo2dVector_DEPENDENCIES = $(DEPS) t_eo2dVector_LDFLAGS = -lm t_eo2dVector_LDADD = $(LDADDS) + +############################################################################### + +t_parser_SOURCES = t-parser.cpp +t_parser_DEPENDENCIES = $(DEPS) +t_parser_LDFLAGS = -lm +t_parser_LDADD = $(LDADDS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) @@ -208,6 +215,7 @@ t_eoEasyEA_OBJECTS = t-eoEasyEA.o t_eoNonUniform_OBJECTS = t-eoNonUniform.o t_eoUniform_OBJECTS = t-eoUniform.o t_eoRandom_OBJECTS = t-eoRandom.o +t_parser_OBJECTS = t-parser.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -229,9 +237,9 @@ DEP_FILES = .deps/t-eo.P .deps/t-eo2dVector.P .deps/t-eoEasyEA.P \ .deps/t-eoNonUniform.P .deps/t-eoRandom.P .deps/t-eoUniform.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 -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) -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) +.deps/t-eolottery.P .deps/t-eoproblem.P .deps/t-parser.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) +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) all: all-redirect .SUFFIXES: @@ -340,6 +348,10 @@ t-eoUniform: $(t_eoUniform_OBJECTS) $(t_eoUniform_DEPENDENCIES) t-eoRandom: $(t_eoRandom_OBJECTS) $(t_eoRandom_DEPENDENCIES) @rm -f t-eoRandom $(CXXLINK) $(t_eoRandom_LDFLAGS) $(t_eoRandom_OBJECTS) $(t_eoRandom_LDADD) $(LIBS) + +t-parser: $(t_parser_OBJECTS) $(t_parser_DEPENDENCIES) + @rm -f t-parser + $(CXXLINK) $(t_parser_LDFLAGS) $(t_parser_OBJECTS) $(t_parser_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: diff --git a/eo/test/t-parser.cpp b/eo/test/t-parser.cpp new file mode 100644 index 000000000..2980bb436 --- /dev/null +++ b/eo/test/t-parser.cpp @@ -0,0 +1,165 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +/* parser.cpp + example of use of Parser.h + + (c) geneura team, 1999 +-----------------------------------------------------------------------------*/ + +#include +#include +#include + +void GetOutputParam(Parser & parser, + string & _string) { + + try { + parser.AddTitle("Separate parameter: the output file name"); + _string = parser.getString("-O", "--OutputFile", "", "The output file name" ); + } catch (UException & e) { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } catch (exception & e) { + cout << e.what() << endl; + exit(1); + } +} + +void sub(Parser & parser) { + int i; + cout << "Function sub:" << endl; + + try { + parser.AddTitle("Private parameters of subroutine sub"); + i = parser.getInt("-j", "--sint", "5", "private integer of subroutine" ); + } catch (UException & e) { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } catch (exception & e) { + cout << e.what() << endl; + exit(1); + } + + cout << "Read " << i << endl; +} + + +/// Uses the parser and returns param values +void getParams( Parser & parser, + unsigned & _integer, + float & _floating, + string & _string, + vector & _array, + bool & _boolean) { + + try { + _integer = parser.getInt("-i", "--int", "2", "interger number" ); + _floating = parser.getFloat("-f", "--float", "0.2", "floating point number" ); + _string = parser.getString("-s", "--string", "string", "a string" ); + _array = parser.getArray("-a", "--array", "a b", "an array enclosed within < >" ); + _boolean = parser.getBool("-b","--bool", "a bool value" ); + } + catch (UException & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + catch (exception & e) + { + cout << e.what() << endl; + exit(1); + } + +} + +/// Uses the parser and returns param values +void InitRandom( Parser & parser) { + unsigned long _seed; + try { + _seed = parser.getUnsignedLong("-S", "--seed", "0", "Seed for Random number generator" ); + } + catch (UException & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + catch (exception & e) + { + cout << e.what() << endl; + exit(1); + } + if (_seed == 0) { // use clock to get a "random" seed + struct timeval tval; + struct timezone tzp; + + gettimeofday (&tval, &tzp); // time since midnight January 1, 1970. + _seed = tval.tv_usec ; // micro seconds + char s[32]; + sprintf(s,"%ld", _seed); + parser.setParamValue("--seed", s); // so it will be printed out in the status file, and canbe later re-used to re-run EXACTLY the same run + } + rng.reseed(_seed); + + return; +} + +int main( int argc, char* argv[]) { + + unsigned in; + float f; + string s; + vector a; + bool b; + + // Create the command-line parser + Parser parser( argc, argv, "Parser example"); + InitRandom(parser); + parser.AddTitle("General parameters"); + getParams(parser, in, f, s, a, b); + + cout << "\n integer: " << in << endl + << " float: "<< f << endl + << " string: /"<< s << "/" << endl + << " boolean: "<< b << endl + << " array: < "; + vector::const_iterator i; + for (i=a.begin() ; i" << endl << endl ; + + // call to the subroutine that also needs some parameters + sub(parser); + + // writing all parameters + // + // if programmer wishes, the name of the output file can be set as a parameter itself + // otherwise it will be argv[0].status + string OutputFileName; + GetOutputParam(parser, OutputFileName); + + parser.outputParam(OutputFileName); + if( parser.getBool("-h" , "--help" , "Shows this help")) { + parser.printHelp(); + exit(1); + } + + // but progrmamer should be careful to write the parser parameters + // after the last bit that uses it has finished + + + // Now the main body of the program + + for (int i=0; i<20; i++) { + cout << rng.normal() << endl; + } + cout << "C'est fini" << endl; + + return 0; +} + From 449ed17ff850f629ba330eaf305f62637bacb3fa Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 15 Nov 1999 09:26:33 +0000 Subject: [PATCH 0070/2134] Added Marc's ES files and .dsp files for others --- eo/Makefile.am | 5 + eo/src/EO.h | 274 +++--- eo/src/Makefile.am | 13 +- eo/src/eo2dVector.h | 662 +++++++------- eo/src/eoAged.h | 124 +-- eo/src/eoAtomBitFlip.h | 57 ++ eo/src/eoAtomCreep.h | 65 ++ eo/src/eoAtomMutation.h | 95 ++ eo/src/eoAtomMutator.h | 61 ++ eo/src/eoAtomRandom.h | 63 ++ eo/src/eoBin.h | 156 ++-- eo/src/eoBitOpFactory.h | 52 +- eo/src/eoBreeder.h | 163 ++-- eo/src/eoData.h | 50 +- eo/src/eoDup.h | 36 +- eo/src/eoESChrom.h | 34 +- eo/src/eoESFullChrom.h | 270 ++++++ eo/src/eoESFullMut.h | 243 +++++ eo/src/eoEasyEA.h | 168 ++-- eo/src/eoEvalFuncPtr.h | 100 +-- eo/src/eoEvaluator.h | 86 +- eo/src/eoFitTerm.h | 128 +-- eo/src/eoFitness.h | 108 +-- eo/src/eoGenTerm.h | 162 ++-- eo/src/eoGeneration.h | 160 ++-- eo/src/eoID.h | 122 +-- eo/src/eoInsertion.h | 158 ++-- eo/src/eoKill.h | 34 +- eo/src/eoMultiMonOp.h | 34 +- eo/src/eoMutation.h | 223 ++--- eo/src/eoNegExp.h | 132 +-- eo/src/eoNonUniform.h | 172 ++-- eo/src/eoNormal.h | 162 ++-- eo/src/eoObject.h | 118 +-- eo/src/eoOp.h | 408 ++++----- eo/src/eoOpSelector.h | 34 +- eo/src/eoParser.h | 1637 ++++++++++++++++++---------------- eo/src/eoPersistent.cpp | 6 +- eo/src/eoPersistent.h | 102 +-- eo/src/eoPop.h | 244 ++--- eo/src/eoPopOps.h | 286 +++--- eo/src/eoPrintable.h | 108 +-- eo/src/eoProblem.h | 80 +- eo/src/eoProportionalOpSel.h | 35 +- eo/src/eoRNG.h | 895 ++++++++++--------- eo/src/eoRnd.h | 156 ++-- eo/src/eoString.h | 42 +- eo/src/eoStringMutation.h | 78 ++ eo/src/eoTranspose.h | 34 +- eo/src/eoUniform.h | 142 +-- eo/src/eoVector.h | 338 +++---- eo/src/eoXOver2.h | 36 +- eo/test/Makefile.am | 23 +- eo/test/Makefile.in | 167 ++-- eo/test/real_value.h | 23 + eo/test/t-eoAtomOps.cpp | 33 + eo/test/t-eoESFull.cpp | 107 +++ eo/test/t-eoESOps.cpp | 116 +++ eo/test/t-eoNonUniform.cpp | 62 +- eo/test/t-eoRandom.cpp | 57 +- eo/test/t-eoUniform.cpp | 44 +- eo/test/t-eobreeder.cpp | 128 +-- eo/test/t-eofitness.cpp | 174 ++-- eo/test/t-eogeneration.cpp | 164 ++-- eo/test/t-eoinsertion.cpp | 216 ++--- eo/test/t-parser.cpp | 298 +++---- eo/win/atomops.dsp | 101 +++ eo/win/eo.dsp | 44 +- eo/win/eo.dsw | 74 ++ eo/win/esfull.dsp | 101 +++ eo/win/random.dsp | 101 +++ 71 files changed, 6359 insertions(+), 4825 deletions(-) create mode 100644 eo/src/eoAtomBitFlip.h create mode 100644 eo/src/eoAtomCreep.h create mode 100644 eo/src/eoAtomMutation.h create mode 100644 eo/src/eoAtomMutator.h create mode 100644 eo/src/eoAtomRandom.h create mode 100644 eo/src/eoESFullChrom.h create mode 100644 eo/src/eoESFullMut.h create mode 100644 eo/src/eoStringMutation.h create mode 100644 eo/test/real_value.h create mode 100644 eo/test/t-eoAtomOps.cpp create mode 100644 eo/test/t-eoESFull.cpp create mode 100644 eo/test/t-eoESOps.cpp create mode 100644 eo/win/atomops.dsp create mode 100644 eo/win/eo.dsw create mode 100644 eo/win/esfull.dsp create mode 100644 eo/win/random.dsp diff --git a/eo/Makefile.am b/eo/Makefile.am index cb4127aa7..ba1a0dcc5 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -5,3 +5,8 @@ ############################################################################### SUBDIRS = src test +DOCDIR = ~/public_html/eodocs + +docs: + doc++ -d $(DOCDIR) -B foot.html -f src/*.h src/*.cpp + /home/jmerelo/bin/index -e html -i /home/jmerelo/index/neweo.idx /home/jmerelo/public_html/eodocs/ -v 3 \ No newline at end of file diff --git a/eo/src/EO.h b/eo/src/EO.h index bc5732008..9e71a4dea 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -1,137 +1,137 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// EO.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EO_H -#define EO_H - -//----------------------------------------------------------------------------- - -#include // runtime_error -#include -#include - -//----------------------------------------------------------------------------- -/** EO is a base class for evolvable objects, that is, the subjects of evolution. - EOs have only got a fitness, which at the same time needs to be only an object with the - operation less than (<) defined. Fitness says how good is the object; evolution or change - of these objects is left to the genetic operators. A fitness less than another means a - worse fitness, in whatever the context; thus, fitness is always maximized; although - it can be minimized with a proper definition of the < operator.\\ - The fitness object must have, besides an void ctor, a copy ctor. -*/ -template class EO: public eoObject, public eoPersistent -{ -public: - typedef F Fitness; - - /** Default constructor. - Fitness must have a ctor which takes 0 as a value; we can not use void ctors here - since default types like float have no void initializer. VC++ allows it, but gcc does not - */ - EO(): repFitness(0), invalidFitness(true) {} - - /** Ctor from stream. - Fitness must have defined the lecture from an istream. - */ - EO( istream& _is ) { - _is >> repFitness; - invalidFitness = false; - }; - - /// Copy ctor - EO( const EO& _eo ): repFitness( _eo.repFitness ), invalidFitness( _eo.invalidFitness ) {}; - - /// Virtual dtor - virtual ~EO() {}; - - /// Return fitness value. - Fitness fitness() const - { - if (invalid()) - //throw runtime_error("invalid fitness"); - cout << "invalid fitness" << endl; - return repFitness; - } - - // Set fitness as invalid. - void invalidate() { invalidFitness = true; } - - /** Set fitness. At the same time, validates it. - * @param _fitness New fitness value. - */ - void fitness(const Fitness& _fitness) - { - repFitness = _fitness; - invalidFitness = false; - } - - /** Return true If fitness value is invalid, false otherwise. - * @return true If fitness is invalid. - */ - bool invalid() const { return invalidFitness; } - - /** Returns true if - @return true if the fitness is higher - */ - bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness();} - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - * @return the class name as a string - */ - virtual string className() const { return "EO"; }; - - /** - * Read object.\\ - * Calls base class, just in case that one had something to do. The read and print - * methods should be compatible and have the same format. In principle, format is - * "plain": they just print a number - * @param _is a istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) { - _is >> repFitness; - invalidFitness = false; - } - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << repFitness << endl; - } - - //@} - -private: - Fitness repFitness; // value of fitness for this chromosome - bool invalidFitness; // true if the value of fitness is invalid -}; - -//----------------------------------------------------------------------------- - -#endif EO_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EO.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EO_H +#define EO_H + +//----------------------------------------------------------------------------- + +#include // runtime_error +#include +#include + +//----------------------------------------------------------------------------- +/** EO is a base class for evolvable objects, that is, the subjects of evolution. + EOs have only got a fitness, which at the same time needs to be only an object with the + operation less than (<) defined. Fitness says how good is the object; evolution or change + of these objects is left to the genetic operators. A fitness less than another means a + worse fitness, in whatever the context; thus, fitness is always maximized; although + it can be minimized with a proper definition of the < operator.\\ + The fitness object must have, besides an void ctor, a copy ctor. +*/ +template class EO: public eoObject, public eoPersistent +{ +public: + typedef F Fitness; + + /** Default constructor. + Fitness must have a ctor which takes 0 as a value; we can not use void ctors here + since default types like float have no void initializer. VC++ allows it, but gcc does not + */ + EO(): repFitness(0), invalidFitness(true) {} + + /** Ctor from stream. + Fitness must have defined the lecture from an istream. + */ + EO( istream& _is ) { + _is >> repFitness; + invalidFitness = false; + }; + + /// Copy ctor + EO( const EO& _eo ): repFitness( _eo.repFitness ), invalidFitness( _eo.invalidFitness ) {}; + + /// Virtual dtor + virtual ~EO() {}; + + /// Return fitness value. + Fitness fitness() const + { + if (invalid()) + //throw runtime_error("invalid fitness"); + cout << "invalid fitness" << endl; + return repFitness; + } + + // Set fitness as invalid. + void invalidate() { invalidFitness = true; } + + /** Set fitness. At the same time, validates it. + * @param _fitness New fitness value. + */ + void fitness(const Fitness& _fitness) + { + repFitness = _fitness; + invalidFitness = false; + } + + /** Return true If fitness value is invalid, false otherwise. + * @return true If fitness is invalid. + */ + bool invalid() const { return invalidFitness; } + + /** Returns true if + @return true if the fitness is higher + */ + bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness();} + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "EO"; }; + + /** + * Read object.\\ + * Calls base class, just in case that one had something to do. The read and print + * methods should be compatible and have the same format. In principle, format is + * "plain": they just print a number + * @param _is a istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + _is >> repFitness; + invalidFitness = false; + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << repFitness << endl; + } + + //@} + +private: + Fitness repFitness; // value of fitness for this chromosome + bool invalidFitness; // true if the value of fitness is invalid +}; + +//----------------------------------------------------------------------------- + +#endif EO_H diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 314a1275d..d7b9a9287 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,5 +8,16 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h eoPrintable.h eoPersistent.h eoLottery.h eoMutation.h eoPopOps.h eoUniform.h eoInsertion.h eoInclusion.h eoBitOp.h eoBitOpFactory.h eo2d.h eo2dVector.h eoData.h eoProportionalOpSel.h eoOpSelector.h eoBreeder.h eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoTerm.h eoGenTerm.h eoFitTerm.h eoGeneration.h eoAlgo.h eoEasyEA.h eoNonUniform.h eoRNG.h eoParser.h +libeoinc_HEADERS = EO.h eo eo1d.h eo2d.h eo2dVector.h eoAged.h eoAlgo.h\ + eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h \ + eoAtomRandom.h eoBin.h eoBitOp.h eoBitOpFactory.h eoBreeder.h\ + eoData.h eoDup.h eoESChrom.h eoESFullChrom.h eoESFullMut.h eoEasyEA.h\ + eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoFitTerm.h eoFitness.h\ + eoGenTerm.h eoGeneration.h eoID.h eoInclusion.h eoInsertion.h\ + eoKill.h eoLottery.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 eoProportionalOpSel.h eoRNG.h eoRnd.h eoString.h\ + eoTerm.h eoTranspose.h eoUniform.h eoVector.h eoXOver2.h + diff --git a/eo/src/eo2dVector.h b/eo/src/eo2dVector.h index edc82f3a1..13e007a9c 100644 --- a/eo/src/eo2dVector.h +++ b/eo/src/eo2dVector.h @@ -1,333 +1,333 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/* ------------------------------------------------------------------------------ -File............: eo2dVector.h -Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) -Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) -Description.....: Implementation of a 2-dimensional chromosome usign STL - vectors. - - ================ Modif. 1 ================ - Author........: - Date..........: - Description...: - -QUEDA: Operador de asignación, lectura desde istream, escritura a ostream ------------------------------------------------------------------------------ -*/ -//----------------------------------------------------------------------------- -// eo2dVector.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eo2dVector_H -#define _eo2dVector_H - -// STL libraries -#include // For vector -#include -#include -#include - -#include -#include - -/** Adaptor that turns an STL vector of vectror into an EO - with the same gene type as the type with which - the vector of vector has been instantiated. -*/ -template -class eo2dVector: public eo2d, public vector< vector > { -public: - typedef T Type ; - - /** @name Canonical part of the objects: several ctors, copy ctor, \ - * dtor and assignment operator. - */ - //@{ - - /** Ctor. - @param _rows Number of rows. - @param _cols Number of columns. - @param _val Common initial value - */ - eo2dVector( const unsigned _rows = 0, - const unsigned _cols = 0, - T _val = T() ) - : eo2d(), vector< vector >( _rows, vector( _cols, _val ) ){}; - - /** Ctor using a random number generator. - @param _rows Number of rows. - @param _cols Number of columns. - @param _rnd A random "T-type" generator, which returns a random value each time it´s called. - */ - eo2dVector( const unsigned _rows, - const unsigned _cols, - eoRnd& _rnd ); - - /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, -which is supposed to be dynamic and dependent on environment. - @param _is the input stream; should have all values in a single line, separated by whitespace - */ - //eo2dVector( istream& _is); - - - /// copy ctor - eo2dVector( const eo2dVector & _eo ) - : eo2d( _eo ), vector< vector >( _eo ){ }; - - /// Assignment operator - /* - const eo2dVector& operator =( const eo2dVector & _eo ) { - if ( this != &_eo ){ - eo2d::operator=( _eo ); - vector< >::operator=( _eo ); - } - return *this; - } - */ - /// dtor - virtual ~eo2dVector() {}; - - //@} - /** Reads and returns a copy of the gene in position _r,_c.\ - This implies that T must have a copy ctor . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* +----------------------------------------------------------------------------- +File............: eo2dVector.h +Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) +Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) +Description.....: Implementation of a 2-dimensional chromosome usign STL + vectors. + + ================ Modif. 1 ================ + Author........: + Date..........: + Description...: + +QUEDA: Operador de asignación, lectura desde istream, escritura a ostream +----------------------------------------------------------------------------- +*/ +//----------------------------------------------------------------------------- +// eo2dVector.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eo2dVector_H +#define _eo2dVector_H + +// STL libraries +#include // For vector +#include +#include +#include + +#include +#include + +/** Adaptor that turns an STL vector of vectror into an EO + with the same gene type as the type with which + the vector of vector has been instantiated. +*/ +template +class eo2dVector: public eo2d, public vector< vector > { +public: + typedef T Type ; + + /** @name Canonical part of the objects: several ctors, copy ctor, \ + * dtor and assignment operator. + */ + //@{ + + /** Ctor. + @param _rows Number of rows. + @param _cols Number of columns. + @param _val Common initial value + */ + eo2dVector( const unsigned _rows = 0, + const unsigned _cols = 0, + T _val = T() ) + : eo2d(), vector< vector >( _rows, vector( _cols, _val ) ){}; + + /** Ctor using a random number generator. + @param _rows Number of rows. + @param _cols Number of columns. + @param _rnd A random "T-type" generator, which returns a random value each time it´s called. + */ + eo2dVector( const unsigned _rows, + const unsigned _cols, + eoRnd& _rnd ); + + /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, +which is supposed to be dynamic and dependent on environment. + @param _is the input stream; should have all values in a single line, separated by whitespace + */ + //eo2dVector( istream& _is); + + + /// copy ctor + eo2dVector( const eo2dVector & _eo ) + : eo2d( _eo ), vector< vector >( _eo ){ }; + + /// Assignment operator + /* + const eo2dVector& operator =( const eo2dVector & _eo ) { + if ( this != &_eo ){ + eo2d::operator=( _eo ); + vector< >::operator=( _eo ); + } + return *this; + } + */ + /// dtor + virtual ~eo2dVector() {}; + + //@} + /** Reads and returns a copy of the gene in position _r,_c.\ + This implies that T must have a copy ctor . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() - */ - virtual T getGene( const unsigned _r, - const unsigned _c ) const { - if ( _r >= numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::getGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _c >= numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::getGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - return (*this)[_r][_c]; - }; - /** Overwrites the gene placed in position _r,_c with a - * new value. This means that the assignment operator - * for T must be defined . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual T getGene( const unsigned _r, + const unsigned _c ) const { + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::getGene: row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::getGene: column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + return (*this)[_r][_c]; + }; + /** Overwrites the gene placed in position _r,_c with a + * new value. This means that the assignment operator + * for T must be defined . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() - */ - virtual void setGene( const unsigned _r, - const unsigned _c, - const T& _value ) { - if ( _r >= numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::setGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _c >= numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::setGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - (*this)[_r][_c]=_value; - }; - - - - /** Inserts a row, moving the rest to the bottom. - * If _r = numOfRows(), it insert it at the end. - * Obviously, changes number of rows. - @param _r Position where the new row will be inserted. - @param _val Vector containing the new values to be inserted. - @exception invalid_argument If _val has not numOfCols() components. - @exception out_of_range If _r is greater than numOfRows() - */ - virtual void insertRow( const unsigned _r, - const vector& _val ) { - // Test errors. - if ( _r > numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertRow: row out of range. " - << "It should be <=" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _val.size() != numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertRow: " - << "Incorrect number of values to be added. " - << "It should be ==" << numOfCols() << '\0' << endl; - throw invalid_argument( msg.str() ); - } - - // Insert the row. - vector< vector >::iterator ite = begin()+_r; - insert( ite, _val ); - }; - - /** Eliminates the row at position _r; all the other genes will - be shifted up. - @param _r Number of he row to be deleted. - @exception out_of_range if _r >=numOfRows() - */ - virtual void deleteRow( const unsigned _r ) { - // Test error. - if ( _r >= numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::deleteRow: " - << "Row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - // Delete row. - vector< vector >::iterator ite = this->begin()+_r; - this->erase( ite ); - }; - - /** Inserts a column, moving the rest to the right. - * If _c = numOfCols(), it insert it at the end. - * Obviously, changes number of cols. - @param _r Position where the new column will be inserted. - @param _val Vector containing the new values to be inserted. - @exception invalid_argument if _val has not numOfRows() components. - */ - virtual void insertCol( const unsigned _c, - const vector& _val ) { - // Test errors. - if ( _c > numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertCol: " - << "Column out of range. " - << "It should be >=" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _val.size() != numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertCol: " - << "Incorrect number of values to be added. " - << "It should be ==" << numOfRows() << '\0' << endl; - throw invalid_argument( msg.str() ); - } - - // Insert column. - for( unsigned r=0; r >::iterator it1 = begin()+r; - vector::iterator it2 = (*it1).begin()+_c; - (*it1).insert( it2, _val[r] ); - }; - } - - /** Eliminates the column at position _c; all the other columns will - be shifted left. - @param _c Number of he column to be deleted. - @exception out_of_range if _c >=numOfCols() - */ - virtual void deleteCol( const unsigned _c ) { - // Test error. - if ( _c >= numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::deleteCol: " - << "Column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - // Delete columns. - for( unsigned r=0; r >::iterator it1 = begin()+r; - vector::iterator it2 = (*it1).begin()+_c; - (*it1).erase( it2 ); - } - }; - - /// Returns the number of rows in the eo2d - virtual unsigned numOfRows() const { - return size(); - }; - - /// Returns the number of columns in the eo2d - virtual unsigned numOfCols() const { - return begin()->size(); - }; - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eo2dVector";}; - //@} - -}; - - -//____________________________ Some method implementation ____________________ - -// Ctors_______________________________________________________________________ -//_____________________________________________________________________________ -template -eo2dVector::eo2dVector( const unsigned _rows, - const unsigned _cols, - eoRnd& _rnd ) - : eo2d(), vector< vector >( _rows, vector( _cols, T() ) ){ - for ( vector< vector >::iterator i = begin(); i != end(); ++i ) { - for( vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { - *j = _rnd(); - } - } -}; - -//_____________________________________________________________________________ -/*template -eoVector::eoVector( istream& _is) - : eo1d(), vector( ){ - while (_is ) { - T tmp; - _is >> tmp; - push_back( tmp ); - } - -}; -*/ - -//_____________________________________________________________________________ -template -ostream& operator<<( ostream& _os, const eo2dVector& _eo) { - for( unsigned i=0; i<_eo.numOfRows(); ++i ) { - for( unsigned j=0; j<_eo.numOfCols(); ++j ) { - _os << _eo.getGene( i,j ) << " "; - } - _os << endl; - } - return _os; -}; - -#endif + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual void setGene( const unsigned _r, + const unsigned _c, + const T& _value ) { + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::setGene: row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::setGene: column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + (*this)[_r][_c]=_value; + }; + + + + /** Inserts a row, moving the rest to the bottom. + * If _r = numOfRows(), it insert it at the end. + * Obviously, changes number of rows. + @param _r Position where the new row will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_argument If _val has not numOfCols() components. + @exception out_of_range If _r is greater than numOfRows() + */ + virtual void insertRow( const unsigned _r, + const vector& _val ) { + // Test errors. + if ( _r > numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertRow: row out of range. " + << "It should be <=" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _val.size() != numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertRow: " + << "Incorrect number of values to be added. " + << "It should be ==" << numOfCols() << '\0' << endl; + throw invalid_argument( msg.str() ); + } + + // Insert the row. + vector< vector >::iterator ite = begin()+_r; + insert( ite, _val ); + }; + + /** Eliminates the row at position _r; all the other genes will + be shifted up. + @param _r Number of he row to be deleted. + @exception out_of_range if _r >=numOfRows() + */ + virtual void deleteRow( const unsigned _r ) { + // Test error. + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::deleteRow: " + << "Row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + // Delete row. + vector< vector >::iterator ite = this->begin()+_r; + this->erase( ite ); + }; + + /** Inserts a column, moving the rest to the right. + * If _c = numOfCols(), it insert it at the end. + * Obviously, changes number of cols. + @param _r Position where the new column will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_argument if _val has not numOfRows() components. + */ + virtual void insertCol( const unsigned _c, + const vector& _val ) { + // Test errors. + if ( _c > numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertCol: " + << "Column out of range. " + << "It should be >=" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _val.size() != numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertCol: " + << "Incorrect number of values to be added. " + << "It should be ==" << numOfRows() << '\0' << endl; + throw invalid_argument( msg.str() ); + } + + // Insert column. + for( unsigned r=0; r >::iterator it1 = begin()+r; + vector::iterator it2 = (*it1).begin()+_c; + (*it1).insert( it2, _val[r] ); + }; + } + + /** Eliminates the column at position _c; all the other columns will + be shifted left. + @param _c Number of he column to be deleted. + @exception out_of_range if _c >=numOfCols() + */ + virtual void deleteCol( const unsigned _c ) { + // Test error. + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::deleteCol: " + << "Column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + // Delete columns. + for( unsigned r=0; r >::iterator it1 = begin()+r; + vector::iterator it2 = (*it1).begin()+_c; + (*it1).erase( it2 ); + } + }; + + /// Returns the number of rows in the eo2d + virtual unsigned numOfRows() const { + return size(); + }; + + /// Returns the number of columns in the eo2d + virtual unsigned numOfCols() const { + return begin()->size(); + }; + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eo2dVector";}; + //@} + +}; + + +//____________________________ Some method implementation ____________________ + +// Ctors_______________________________________________________________________ +//_____________________________________________________________________________ +template +eo2dVector::eo2dVector( const unsigned _rows, + const unsigned _cols, + eoRnd& _rnd ) + : eo2d(), vector< vector >( _rows, vector( _cols, T() ) ){ + for ( vector< vector >::iterator i = begin(); i != end(); ++i ) { + for( vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { + *j = _rnd(); + } + } +}; + +//_____________________________________________________________________________ +/*template +eoVector::eoVector( istream& _is) + : eo1d(), vector( ){ + while (_is ) { + T tmp; + _is >> tmp; + push_back( tmp ); + } + +}; +*/ + +//_____________________________________________________________________________ +template +ostream& operator<<( ostream& _os, const eo2dVector& _eo) { + for( unsigned i=0; i<_eo.numOfRows(); ++i ) { + for( unsigned j=0; j<_eo.numOfCols(); ++j ) { + _os << _eo.getGene( i,j ) << " "; + } + _os << endl; + } + return _os; +}; + +#endif diff --git a/eo/src/eoAged.h b/eo/src/eoAged.h index 7c626e019..2e37c1a1f 100644 --- a/eo/src/eoAged.h +++ b/eo/src/eoAged.h @@ -1,41 +1,41 @@ -// eoAged.h +// eoAged.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // eoAge.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOAGED_H -#define EOAGED_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOAGED_H +#define EOAGED_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string using namespace std; - -//----------------------------------------------------------------------------- -// eoAge -//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// eoAge +//----------------------------------------------------------------------------- /** eoAge is a template class that adds an age to an object.\\ Requisites for template instantiation are that the object must admit a default ctor @@ -43,18 +43,18 @@ and a copy ctor. The Object must be an eoObject, thus, it must have its methods: printOn, readFrom. @see eoObject */ -template -class eoAged: public Object -{ - public: +template +class eoAged: public Object +{ + public: /// Main ctor from an already built Object. eoAged( const Object& _o): Object( _o ), age(0) {}; - - /// Copy constructor. + + /// Copy constructor. eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoAged() {}; + virtual ~eoAged() {}; ///returns the age of the object @@ -66,32 +66,32 @@ class eoAged: public Object /** @name Methods from eoObject readFrom and printOn are directly inherited from eo1d */ -//@{ - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return string("eoAged")+Object::className(); }; - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ +//@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("eoAged")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ virtual void readFrom(istream& _is) { Object::readFrom( _is ); _is >> age; } - - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ virtual void printOn(ostream& _os) const{ Object::printOn( _os ); _os << age; - } + } //@} private: @@ -102,7 +102,7 @@ class eoAged: public Object it´s turned into an Aged object*/ eoAged(): Object(), age(0) {}; - unsigned long age; + unsigned long age; }; - -#endif EOAGE_H + +#endif EOAGE_H diff --git a/eo/src/eoAtomBitFlip.h b/eo/src/eoAtomBitFlip.h new file mode 100644 index 000000000..b96d33a50 --- /dev/null +++ b/eo/src/eoAtomBitFlip.h @@ -0,0 +1,57 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomCreep.h +// Increments or decrements by one a single element +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMCREEP_H +#define _EOATOMCREEP_H + +/** Flips a single bit +*/ +template +class eoAtomBitFlip: public eoAtomMutator { +public: + + /// + eoAtomBitFlip() {}; + + /// + virtual ~eoAtomBitFlip() {}; + + /// + virtual void operator()( T& _val ) const { + _val = !val; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoAtomBitFlip";}; + //@} + +}; + + +#endif diff --git a/eo/src/eoAtomCreep.h b/eo/src/eoAtomCreep.h new file mode 100644 index 000000000..2fc7d676c --- /dev/null +++ b/eo/src/eoAtomCreep.h @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomCreep.h +// Increments or decrements by one a single element +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMCREEP_H +#define _EOATOMCREEP_H + +#include +#include + +/** With uniform probability, decrements or increments by one the value. + The value type must admit post increment and decrement. +*/ +template +class eoAtomCreep: public eoAtomMutator { +public: + + /// + eoAtomCreep() {}; + + /// + virtual ~eoAtomCreep() {}; + + /// + virtual void operator()( T& _val ) const { + if ( rng.flip( 0.5 ) ) { + _val++; + } else { + _val--; + } + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoAtomCreep";}; + //@} + +}; + + +#endif diff --git a/eo/src/eoAtomMutation.h b/eo/src/eoAtomMutation.h new file mode 100644 index 000000000..c4ff91afb --- /dev/null +++ b/eo/src/eoAtomMutation.h @@ -0,0 +1,95 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomMutation.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMMUTATION_H +#define _EOATOMMUTATION_H + +// STL includes +#include + +// EO includes +#include +#include +#include +#include + +/** Atomic mutation of an EO. Acts on containers, and applies a mutation + operator to each element of the container with some probability. EOT must + be a container of any tipe +*/ +template +class eoAtomMutation: public eoMonOp { +public: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// + eoAtomMutation(const eoAtomMutator& _atomMut, const double _rate=0.0) + : eoMonOp< EOT >(), rate(_rate), atomMutator( _atomMut ) {}; + + /// + virtual ~eoAtomMutation() {}; + + /// + virtual void operator()( EOT& _eo ) const { + typename EOT::iterator i; + for ( i = _eo.begin(); i != _eo.end(); i ++ ) + if ( rng.flip( rate ) ) { + atomMutator( *i ); + } + } + + /** To print me on a stream. + @param os The ostream. + */ + void printOn(ostream& os) const { + os << rate ; + } + + /** To read me from a stream. + @param is The istream */ + void readFrom(istream& is) { + is >> rate ; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMutation";}; + //@} + +private: + + double rate; + const eoAtomMutator& atomMutator; +}; + + +#endif diff --git a/eo/src/eoAtomMutator.h b/eo/src/eoAtomMutator.h new file mode 100644 index 000000000..97510c583 --- /dev/null +++ b/eo/src/eoAtomMutator.h @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomMutator.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMMUTATOR_H +#define _EOATOMMUTATOR_H + +/** Abstract base class for functors that modify a single element in an EO + that is composed of several atomic components. An atom would, for instance, flip + a bit, or change a real number, or things like that. +*/ +template +class eoAtomMutator: public eoPrintable { +public: + + /// + eoAtomMutator() {}; + + /// + virtual ~eoAtomMutator() {}; + + /// + virtual void operator()( T& _val ) const = 0; + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + /// + virtual string className() const {return "eoAtomMutator";}; + + /// + void printOn(ostream& _os) const { _os << className() << endl; }; + + //@} + +}; + + +#endif diff --git a/eo/src/eoAtomRandom.h b/eo/src/eoAtomRandom.h new file mode 100644 index 000000000..e7faaab33 --- /dev/null +++ b/eo/src/eoAtomRandom.h @@ -0,0 +1,63 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomRandom.h +// Increments or decrements by one a single element +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMCREEP_H +#define _EOATOMCREEP_H + +#include + +/** Modifies using a random number generator, that is entered in the ctor. + The RNG must return positive or negative numbers, whatever. +*/ +template +class eoAtomRandom: public eoAtomMutator { +public: + + /// + eoAtomRandom( eoRandom& _rng): rng( _rng ) {}; + + /// + virtual ~eoAtomRandom() {}; + + /// + virtual void operator()( T& _val ) const { + _val += rng(); + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoAtomRandom";}; + //@} + +private: + eoRandom rng; + +}; + + +#endif diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index b78cff475..b56054ed7 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -1,78 +1,78 @@ -//----------------------------------------------------------------------------- -// eoBin.h -//----------------------------------------------------------------------------- - -#ifndef eoBin_h -#define eoBin_h - -//----------------------------------------------------------------------------- - -#include // ostream, istream -#include // bind2nd -#include // string -#include // EO - -/***************************************************************************** - * eoBin: implementation of binary chromosome. * - * based on STL's bit_vector (vector). * - *****************************************************************************/ - -template class eoBin: public eoVector -{ - public: - - /** - * (Default) Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size = 0, bool value = false): - eoVector(size, value) {} - - /** - * Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size, const eoRnd& rnd): eoVector(size) - { - generate(begin(), end(), rnd); - } - - /** Constructor from istream. - @param is The istream to read from.*/ - eoBin(istream& _is):eoVector(_is){}; - - /// My class name. - string className() const - { - return "eoBin"; - } - - /** - * To print me on a stream. - * @param os The ostream. - */ - void printOn(ostream& os) const - { - copy(begin(), end(), ostream_iterator(os)); - } - - /** - * To read me from a stream. - * @param is The istream. - */ - void readFrom(istream& is) - { - string bits; - is >> bits; - if (is) - { - resize(bits.size()); - transform(bits.begin(), bits.end(), begin(), - bind2nd(equal_to(), '1')); - } - } -}; - -//----------------------------------------------------------------------------- - -#endif eoBin_h +//----------------------------------------------------------------------------- +// eoBin.h +//----------------------------------------------------------------------------- + +#ifndef eoBin_h +#define eoBin_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // string +#include // EO + +/***************************************************************************** + * eoBin: implementation of binary chromosome. * + * based on STL's bit_vector (vector). * + *****************************************************************************/ + +template class eoBin: public eoVector +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size = 0, bool value = false): + eoVector(size, value) {} + + /** + * Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size, const eoRnd& rnd): eoVector(size) + { + generate(begin(), end(), rnd); + } + + /** Constructor from istream. + @param is The istream to read from.*/ + eoBin(istream& _is):eoVector(_is){}; + + /// My class name. + string className() const + { + return "eoBin"; + } + + /** + * To print me on a stream. + * @param os The ostream. + */ + void printOn(ostream& os) const + { + copy(begin(), end(), ostream_iterator(os)); + } + + /** + * To read me from a stream. + * @param is The istream. + */ + void readFrom(istream& is) + { + string bits; + is >> bits; + if (is) + { + resize(bits.size()); + transform(bits.begin(), bits.end(), begin(), + bind2nd(equal_to(), '1')); + } + } +}; + +//----------------------------------------------------------------------------- + +#endif eoBin_h diff --git a/eo/src/eoBitOpFactory.h b/eo/src/eoBitOpFactory.h index b47b6459a..b44a55067 100644 --- a/eo/src/eoBitOpFactory.h +++ b/eo/src/eoBitOpFactory.h @@ -1,27 +1,27 @@ -// eoBitOpFactory.h +// eoBitOpFactory.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- // eoOpFactory.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- #ifndef _EOBITOPFACTORY_H #define _EOBITOPFACTORY_H @@ -52,12 +52,12 @@ public: /** Another factory method: creates an object from an istream, reading from it whatever is needed to create the object. Usually, the format for the istream will be\\ objectType parameter1 parameter2 ... parametern\\ - If there are problems, an exception is raised; it should be caught at the + If there are problems, an exception is raised; it should be caught at the upper level, because it might be something for that level\\ At the same time, it catches exceptions thrown at a lower level, which will - indicate that whatever is in the stream is for this method to process - @param _is an stream from where a single line will be read - @throw runtime_exception if the object type is not known + indicate that whatever is in the stream is for this method to process + @param _is an stream from where a single line will be read + @throw runtime_exception if the object type is not known */ virtual eoOp* make(istream& _is) { eoOp * opPtr = NULL; @@ -112,7 +112,7 @@ public: return opPtr; }; - + }; diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index 7d87c3d6a..cd21f0ed3 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -1,81 +1,82 @@ -//----------------------------------------------------------------------------- -// eoBreeder.h -//----------------------------------------------------------------------------- - -#ifndef eoBreeder_h -#define eoBreeder_h - -//----------------------------------------------------------------------------- - -#include // vector -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector - -using namespace std; - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -template class eoBreeder: public eoTransform -{ - public: - /// Default constructor. - eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} - - /// Destructor. - virtual ~eoBreeder() {} - - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - for (unsigned i = 0; i < pop.size(); i++) { - eoOp* op = opSel.Op(); - switch (op->readArity()) { - case unary: - { - eoMonOp* monop = static_cast* >(op); - (*monop)( pop[i] ); - break; - } - case binary: - { - eoBinOp* binop = static_cast* >(op); - eoUniform u(0, pop.size() ); - (*binop)(pop[i], pop[ u() ] ); - break; - } - case Nary: - { - eoNaryOp* Nop = static_cast* >(op); - eoUniform u(0, pop.size() ); - eoPop tmpVec; - tmpVec.push_back( pop[i] ); - for ( unsigned i = 0; i < u(); i ++ ) { - tmpVec.push_back( pop[ u() ] ); - } - (*Nop)( tmpVec ); - break; - } - } - } - }; - - /// The class name. - string classname() const { return "eoBreeder"; } - - private: - eoOpSelector& opSel; - -}; - -//----------------------------------------------------------------------------- - -#endif eoBreeder_h +//----------------------------------------------------------------------------- +// eoBreeder.h +//----------------------------------------------------------------------------- + +#ifndef eoBreeder_h +#define eoBreeder_h + +//----------------------------------------------------------------------------- + +#include // vector +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector + +using namespace std; + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +template class eoBreeder: public eoTransform +{ + public: + /// Default constructor. + eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} + + /// Destructor. + virtual ~eoBreeder() {} + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + for (unsigned i = 0; i < pop.size(); i++) { + eoOp* op = opSel.Op(); + switch (op->readArity()) { + case unary: + { + eoMonOp* monop = static_cast* >(op); + (*monop)( pop[i] ); + break; + } + case binary: + { + eoBinOp* binop = static_cast* >(op); + eoUniform u(0, pop.size() ); + (*binop)(pop[i], pop[ u() ] ); + break; + } + case Nary: + { + eoNaryOp* Nop = static_cast* >(op); + eoUniform u(0, pop.size() ); + eoPop inVec, outVec; + inVec.push_back( pop[i] ); + unsigned numberOfOperands = u(); + for ( unsigned i = 0; i < numberOfOperands; i ++ ) { + inVec.push_back( pop[ u() ] ); + } + (*Nop)( inVec, outVec ); + break; + } + } + } + }; + + /// The class name. + string classname() const { return "eoBreeder"; } + + private: + eoOpSelector& opSel; + +}; + +//----------------------------------------------------------------------------- + +#endif eoBreeder_h diff --git a/eo/src/eoData.h b/eo/src/eoData.h index fcbf013e4..a90445d04 100644 --- a/eo/src/eoData.h +++ b/eo/src/eoData.h @@ -1,18 +1,18 @@ -//----------------------------------------------------------------------------- -// eoData.h -//----------------------------------------------------------------------------- - -#ifndef EODATA_H -#define EODATA_H - -//----------------------------------------------------------------------------- - -#include // vector -#include // set -#include // string +//----------------------------------------------------------------------------- +// eoData.h +//----------------------------------------------------------------------------- + +#ifndef EODATA_H +#define EODATA_H + +//----------------------------------------------------------------------------- + +#include // vector +#include // set +#include // string using namespace std; - + #ifdef _MSC_VER #include // MAXDOUBLE @@ -20,22 +20,22 @@ using namespace std; #define MINFLOAT numeric_limits::min() #define MAXDOUBLE numeric_limits::max() #define MAXINT numeric_limits::max() -#else - #include +#else + #include #include - #include + #include #ifndef MAXFLOAT #define MAXFLOAT (float)1e127 #define MAXDOUBLE (double)1.79769313486231570e+308 #define MAXINT 2147483647 #endif #endif - -#ifndef _MSC_VER -#include -#define _isnan isnan -#endif - -//----------------------------------------------------------------------------- - -#endif EODATA_H + +#ifndef _MSC_VER +#include +#define _isnan isnan +#endif + +//----------------------------------------------------------------------------- + +#endif EODATA_H diff --git a/eo/src/eoDup.h b/eo/src/eoDup.h index ade6c248f..7a13bd75d 100644 --- a/eo/src/eoDup.h +++ b/eo/src/eoDup.h @@ -1,26 +1,26 @@ -// eoDup.h +// eoDup.h // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoKill.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EODUP_h diff --git a/eo/src/eoESChrom.h b/eo/src/eoESChrom.h index b5a66a4e1..d8d87564d 100644 --- a/eo/src/eoESChrom.h +++ b/eo/src/eoESChrom.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoESChrom.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoESFullChrom.h b/eo/src/eoESFullChrom.h new file mode 100644 index 000000000..4d7d647a8 --- /dev/null +++ b/eo/src/eoESFullChrom.h @@ -0,0 +1,270 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESInd.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOESFULLCHROM_H +#define _EOESFULLCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include +#include +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation and a vector of correlations +*/ +//@{ + + +/**@name individuals for evolution strategies -MS- 22/10/99 +Each individual in an evolution strategy is composed of + a vector of floating point values + a vector of std deviations + a vector of rotation angles (for correlated mutations) + +THese individuals CANNOT BE IMPLEMENTED as vectors of anything + at least in the case of correlated mutations +*/ +//@{ + +template +class eoESFullChrom : public eoVector { + public: +/// constructor + eoESFullChrom( unsigned _num_genes = 1, + unsigned _num_sigma = 1, unsigned _num_correl = 0, + bool _verbose = false, + double _ObjMin = 0, double _ObjMax = 1, + double _StdDevInit = 0.3 ): + eoVector(_num_genes), + // ObjVar( _num_genes ), now an eoVector + StdDev( _num_sigma ), + CorCff( _num_correl ), + verbose( _verbose ), + ObjMin( _ObjMin ), + ObjMax(_ObjMax ), + StdDevInit( _StdDevInit ) {} + + /// copy constructor + eoESFullChrom( const eoESFullChrom& _eo ): + eoVector ( _eo ), // ObjVar ( _eo.ObjVar ), + StdDev ( _eo.StdDev ), CorCff( _eo.CorCff ), verbose( _eo.verbose ), + ObjMin( _eo.ObjMin ), ObjMax(_eo.ObjMax ), StdDevInit( _eo.StdDevInit ) {} + + + /* another constructor, for compatibility reasons */ + eoESFullChrom(istream& _s) {cout << "Not Yet implemented\n";exit(1);}; + + /* And now the useful constructor: from a parser (should be in the + factory, if such a thing exists one day for eoESFullChrom + */ + eoESFullChrom(Parser & parser) : StdDev(0), CorCff(0) { + parser.AddTitle("Description of ES individuals"); + int num_genes, num_sigma; + bool correlated_mutations; + try { + num_genes = parser.getInt("-Io", "--NbObjVar", "2", + "Number of Object Variables" ); + num_sigma = parser.getInt("-Is", "--NbSigma", "1", + "Number of Standard Deviations" ); + correlated_mutations = parser.getBool("-Ic", "--Correlated", + "Correlated mutation?" ); + ObjMin = parser.getFloat("-Im", "--min", "0", + "Minimum value for object variables" ); + ObjMax = parser.getFloat("-IM", "--max", "1", + "Maximum value for object variables" ); + StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", + "Initial value for std. dev. (scaled by range)" ); + verbose = parser.getBool("-Iv", "--verbose", + "Verbose listing of ES individuals (mutation parameters"); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + + // consistency tests + if (! num_sigma) { // no std dev??? EXCEPTION + throw invalid_argument( "No standard deviation: choose another representation please" ); + } + if (num_sigma > num_genes) { + cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; + num_sigma = num_genes; + // modify the Param value - so .status is OK + char sloc[20]; + sprintf(sloc, "%d", num_genes); + parser.setParamValue("--NbSigma", sloc); + } + // adjust the sizes!!! + resize(num_genes); + if (num_sigma) + StdDev.resize(num_sigma); + if (correlated_mutations) { + if (num_sigma < num_genes) { + cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; + cout << "Though possible, this is a strange setting" << endl; + } + // nb of rotation angles: N*(N-1)/2 (in general!) + CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); + } + }; + + + /// Operator = + const eoESFullChrom& operator = ( const eoESFullChrom& _eo ) { + if ( this != &_eo ) { + // Change EO part + eoVector::operator = (_eo); + + // Change this part + // ObjVar = _eo.ObjVar; + StdDev = _eo.StdDev; + CorCff = _eo.CorCff; + verbose = _eo.verbose; + ObjMin = _eo.ObjMin; + ObjMax = _eo.ObjMax; + StdDevInit = _eo.StdDevInit; + } + return *this; + } + + /// destructor + virtual ~eoESFullChrom() {} + + /// + double getStdDev( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading StdDev"); + return StdDev[ _i ]; + } + + /// + void setStdDev( unsigned _i, double _val ) { + if ( _i < length() ) { + StdDev[_i] = _val; + } else + throw out_of_range( "out_of_range when writing StdDev"); + } + + /// + double getCorCff( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading CorCff"); + return CorCff[ _i ]; + } + + /// + void setCorCff( unsigned _i, double _val ) { + if ( _i < length() ) { + CorCff[_i] = _val; + } else + throw out_of_range( "out_of_range when writing CorCff"); + } + + /// + void insertGene( unsigned _i, double _val ) { + throw FixedLengthChromosome(); + }; + + /// + void deleteGene( unsigned _i ) { + throw FixedLengthChromosome(); + }; + + /// + unsigned length() const { return size();}/* formerly ObjVar.size() */ + unsigned StdDevLength() const { return StdDev.size();} + unsigned CorCffLength() const { return CorCff.size();} + + + /** Print itself: inherited from eoObject implementation. + Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + copy( begin(), end(), ostream_iterator( _s, " ") ); + // The formatting instructinos shoudl be left to the caller + // _s << "\n"; + if (verbose) { + _s << "\n\tStd Dev. " ; + copy( StdDev.begin(), StdDev.end(), ostream_iterator( _s, " ") ); + if (CorCff.size()) { + _s << "\n\t"; + copy( CorCff.begin(), CorCff.end(), ostream_iterator( _s, " ") ); + } + } + }; + + /** This exception should be thrown when trying to insert or delete a gene + in a fixed length chromosome + */ + class FixedLengthChromosome : public exception { + + public: + /** + * Constructor + */ + FixedLengthChromosome() + : exception() { }; + + ~FixedLengthChromosome() {}; + }; + + // accessors + double getObjMin() const {return ObjMin;} + double getObjMax() const {return ObjMax;} + double getStdDevInit () const {return StdDevInit;} + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESFullChrom";}; + +private: + // vector ObjVar; /* object variable vector */ +// or shoudl the class be subclass of EOVector ??? + + vector StdDev; /* standard deviation vector */ + vector CorCff; /* correlation coefficient vector */ + + bool verbose; /* Print std deviations or not */ + + /** the range is used for mutation AND random initialization, + * while the StdDevInit is used only for random initialization + * this in a little inconsistent! + */ + double ObjMin, ObjMax; /* Range for Object variables */ + double StdDevInit; /* Initial value of Standard Deviations */ + +}; + +#endif + diff --git a/eo/src/eoESFullMut.h b/eo/src/eoESFullMut.h new file mode 100644 index 000000000..c8bdcb281 --- /dev/null +++ b/eo/src/eoESFullMut.h @@ -0,0 +1,243 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESMute.h : ES mutation +// (c) GeNeura Team, 1998 for the EO part +// Th. Baeck 1994 and EEAAX 1999 for the ES part +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOESMUT_H +#define _EOESMUT_H + +#include +#include +#include // for exp + +#include +#include + +const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ +// should not be a parameter ... + +/** ES-style mutation in the large: Obviously, valid only for eoESInd +*/ +template +class eoESMutate: public eoMonOp< eoESFullChrom > { +public: + /// + eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) + : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), + TauBeta(_TauBeta) {}; + + /* The parser constructor + */ + eoESMutate(Parser & parser, unsigned _stdDevLength, unsigned _size, bool _correlated ): + eoMonOp< eoESFullChrom >( ) { + parser.AddTitle("Parameters of ES mutation (before renormalization)"); + try { // we know that there is at least 1 std dev. + if (_stdDevLength == 1) { + TauLcl = parser.getInt("-Ml", "--TauLcl", "1", + "TauLcl, Mutation rate for the only Std Dev." ); + // different normalization in that case -- Thomas Baeck + TauLcl /= sqrt((double) _size); + } + else { /* more than 1 std dev */ + TauLcl = parser.getFloat("-Ml", "--TauLcl", "1", + "Local mutation rate for Std Dev." ); + TauGlb = parser.getFloat("-Mg", "--TauGlb", "1", + "Global mutation rate for Std Dev." ); + // renormalization + TauLcl /= sqrt( 2.0 * sqrt( (double)_size ) ); + TauGlb /= sqrt( 2.0 * ( (double) _size ) ); + + if ( _correlated ) { // Correlated Mutations + TauBeta = parser.getFloat("-Mb", "--TauBeta", "0.0873", + "Mutation rate for corr. coeff." ); + // rotation angles: no normalization + } + } + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + }; + + /// needed virtual dtor + virtual ~eoESMutate() {}; + + // virtual separation depending wether correlated mutations are present + virtual void operator() ( eoESFullChrom & _eo ) const { + if (_eo.CorCffLength()) + CorrelatedMutation(_eo); + else + StandardMutation(_eo); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESMutate";}; + +private: + /// mutations - standard et correlated + // ========= + /* + * Standard mutation of object variables and standard + * deviations in ESs. + * If there are fewer different standard deviations available + * than the dimension of the objective function requires, the + * last standard deviation is responsible for ALL remaining + * object variables. + * Schwefel 1977: Numerische Optimierung von Computer-Modellen + * mittels der Evolutionsstrategie, pp. 165 ff. + */ + + virtual void StandardMutation( eoESFullChrom & _eo ) const { + unsigned i,k; + double Glb, StdLoc; + + if (_eo.StdDevLength() == 1) { /* single StdDev -> No global factor */ + StdLoc = _eo.getStdDev(0); + StdLoc *= exp(TauLcl*rng.normal()); + if (StdLoc < ES_SIGEPS) + StdLoc = ES_SIGEPS; + _eo.setStdDev(0, StdLoc); + _eo.setGene( 0, _eo.getGene(0) + StdLoc*rng.normal()); + i = 1; + } + else { /* more than one std dev. */ + Glb = exp(TauGlb*rng.normal()); + for (i = 0; i < _eo.length() && i < _eo.StdDevLength(); i++) { + StdLoc = _eo.getStdDev(i); + StdLoc *= Glb * exp(TauLcl*rng.normal()); + if (StdLoc < ES_SIGEPS) + StdLoc = ES_SIGEPS; + _eo.setStdDev(i, StdLoc); + _eo.setGene( i, _eo.getGene(i) + StdLoc*rng.normal()); + } + } + // last object variables: same STdDev than the preceding one + for (k = i; k < _eo.length(); k++) { + _eo.setGene( k, _eo.getGene(k) + StdLoc*rng.normal() ); + } + } + + /* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + + // Code from Thomas Baeck + + virtual void CorrelatedMutation( eoESFullChrom & _eo ) const { + + + int i, k, n1, n2, nq; + + double d1, d2, S, C, Glb; + double tmp; + /* + * First: mutate standard deviations (as above). + */ + + Glb = exp(TauGlb*rng.normal()); + for (i = 0; i < _eo.StdDevLength(); i++) { + tmp = _eo.getStdDev(i); + _eo.setStdDev( i, tmp*Glb*exp(TauLcl*rng.normal()) ); + } + + /* + * Mutate rotation angles. + */ + + for (i = 0; i < _eo.CorCffLength(); i++) { + tmp = _eo.getCorCff(i); + tmp += TauBeta*rng.normal(); + // danger of VERY long loops --MS-- + // while (CorCff[i] > M_PI) + // CorCff[i] -= 2.0 * M_PI; + // while (CorCff[i] < - M_PI) + // CorCff[i] += 2.0 * M_PI; + if ( fabs(tmp) > M_PI ) { + tmp -= M_PI * (int) (tmp/M_PI) ; + } + _eo.setCorCff(i, tmp); + } + + /* + * Perform correlated mutations. + */ + vector VarStp(_eo.size()); + for (i = 0; i < _eo.size() && i < _eo.StdDevLength(); i++) + VarStp[i] = _eo.getStdDev(i)*rng.normal(); + for (k = i; k < _eo.size(); k++) + VarStp[k] = _eo.getStdDev(i-1)*rng.normal(); + nq = _eo.CorCffLength() - 1; + for (k = _eo.size()-_eo.StdDevLength(); k < _eo.size()-1; k++) { + n1 = _eo.size() - k - 1; + n2 = _eo.size() - 1; + for (i = 0; i < k; i++) { + d1 = VarStp[n1]; + d2 = VarStp[n2]; + S = sin( _eo.getCorCff(nq) ); + C = cos( _eo.getCorCff(nq) ); + VarStp[n2] = d1 * S + d2 * C; + VarStp[n1] = d1 * C - d2 * S; + n2--; + nq--; + } + } + for (i = 0; i < _eo.size(); i++) + _eo[i] += VarStp[i]; + + } + // the data + //========= + double TauLcl; /* Local factor for mutation of std deviations */ + double TauGlb; /* Global factor for mutation of std deviations */ + double TauBeta; /* Factor for mutation of correlation parameters */ +}; + +/* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ +// Not yet implemented! + +#endif + diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 5c2f7c029..6c6366494 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -1,84 +1,84 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEasyEA.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoEasyEA_h -#define _eoEasyEA_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include - -/** EOEasyEA: - An easy-to-use evolutionary algorithm; you can use any chromosome, - and any selection transformation, merging and evaluation - algorithms; you can even change in runtime parameters of those - sub-algorithms -*/ - -template class eoEasyEA: public eoAlgo -{ - public: - /// Constructor. - eoEasyEA(eoSelect& _select, - eoTransform& _transform, - eoMerge& _replace, - eoEvalFunc& _evaluator, - eoTerm& _terminator) - :step(_select, _transform, _replace, _evaluator), - terminator( _terminator){}; - - /// Constructor from an already created generation - eoEasyEA(eoGeneration& _gen, - eoTerm& _terminator): - step(_gen), - terminator( _terminator){}; - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - do { - try - { - step(pop); - } - catch (exception& e) - { - string s = e.what(); - s.append( " in eoEasyEA "); - throw runtime_error( s ); - } - } while ( terminator( pop ) ); - } - - /// Class name. - string className() const { return "eoEasyEA"; } - - private: - eoGeneration step; - eoTerm& terminator; -}; - -//----------------------------------------------------------------------------- - -#endif eoEasyEA_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEasyEA.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEasyEA_h +#define _eoEasyEA_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include + +/** EOEasyEA: + An easy-to-use evolutionary algorithm; you can use any chromosome, + and any selection transformation, merging and evaluation + algorithms; you can even change in runtime parameters of those + sub-algorithms +*/ + +template class eoEasyEA: public eoAlgo +{ + public: + /// Constructor. + eoEasyEA(eoSelect& _select, + eoTransform& _transform, + eoMerge& _replace, + eoEvalFunc& _evaluator, + eoTerm& _terminator) + :step(_select, _transform, _replace, _evaluator), + terminator( _terminator){}; + + /// Constructor from an already created generation + eoEasyEA(eoGeneration& _gen, + eoTerm& _terminator): + step(_gen), + terminator( _terminator){}; + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + do { + try + { + step(pop); + } + catch (exception& e) + { + string s = e.what(); + s.append( " in eoEasyEA "); + throw runtime_error( s ); + } + } while ( terminator( pop ) ); + } + + /// Class name. + string className() const { return "eoEasyEA"; } + + private: + eoGeneration step; + eoTerm& terminator; +}; + +//----------------------------------------------------------------------------- + +#endif eoEasyEA_h diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index cacd5c478..882f4b6da 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -1,50 +1,50 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOEVALFUNCPTR_H -#define EOEVALFUNCPTR_H - -#include - -/** EOEvalFuncPtr: This class - * takes an existing function pointer and converts it into a evaluation - * function class. That way, old style C or C++ functions can be adapted to EO - * function classes. - */ -template< class EOT > -struct eoEvalFuncPtr: public eoEvalFunc { - - eoEvalFuncPtr( void (* _eval)( EOT& ) ) - : eoEvalFunc(), evalFunc( _eval ) {}; - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const { - (*evalFunc)( _eo ); - }; - - private: - void (* evalFunc )( EOT& ); -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTR_H +#define EOEVALFUNCPTR_H + +#include + +/** EOEvalFuncPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + */ +template< class EOT > +struct eoEvalFuncPtr: public eoEvalFunc { + + eoEvalFuncPtr( void (* _eval)( EOT& ) ) + : eoEvalFunc(), evalFunc( _eval ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) const { + (*evalFunc)( _eo ); + }; + + private: + void (* evalFunc )( EOT& ); +}; + +#endif diff --git a/eo/src/eoEvaluator.h b/eo/src/eoEvaluator.h index 050caf853..3ddae376c 100644 --- a/eo/src/eoEvaluator.h +++ b/eo/src/eoEvaluator.h @@ -3,58 +3,58 @@ //----------------------------------------------------------------------------- // eoEvaluator.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- -#ifndef _EOEVALUATOR_H +#ifndef _EOEVALUATOR_H #define _EOEVALUATOR_H - + //----------------------------------------------------------------------------- #include #include - -//----------------------------------------------------------------------------- -/** Evaluator takes a vector of EOs and evaluates its fitness -* returning void. Template instances must be of fitness and EO type -*/ -template -class eoEvaluator: public eoTransform{ + +//----------------------------------------------------------------------------- +/** Evaluator takes a vector of EOs and evaluates its fitness +* returning void. Template instances must be of fitness and EO type +*/ +template +class eoEvaluator: public eoTransform{ public: /// ctor eoEvaluator( const eoEvalFunc< EOT> & _ef ) : eoTransform(), repEF( _ef ){}; - - /// Needed virtual destructor - virtual ~eoEvaluator() {}; - - /* Sets the evaluation function - virtual void EF( const eoEvalFunc< EOT> & _ef ) { repEF= _ef;};*/ + + /// Needed virtual destructor + virtual ~eoEvaluator() {}; + + /* Sets the evaluation function + virtual void EF( const eoEvalFunc< EOT> & _ef ) { repEF= _ef;};*/ /// Gets the evaluation function virtual const eoEvalFunc< EOT>& EF() { return repEF;}; - + /** This is the actual function operator(); it is left without implementation. - It takes a vector of pointers to eo - * @param _vEO is a vector of pointers to eo, that will be evaluated + It takes a vector of pointers to eo + * @param _vEO is a vector of pointers to eo, that will be evaluated */ - - virtual void operator() ( EOT& _eot ) const = 0; + + virtual void operator() ( EOT& _eot ) const = 0; ///@name eoObject methods //@{ @@ -62,11 +62,11 @@ public: virtual string className() const { return "eoEvaluator"; } /** Read and print are left without implementation */ - //@} + //@} private: - const eoEvalFunc< EOT> & repEF; -}; -//@} - -#endif + const eoEvalFunc< EOT> & repEF; +}; +//@} + +#endif diff --git a/eo/src/eoFitTerm.h b/eo/src/eoFitTerm.h index d8a7087e0..4181015fc 100644 --- a/eo/src/eoFitTerm.h +++ b/eo/src/eoFitTerm.h @@ -1,64 +1,64 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenTerm.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOFITTERM_H -#define _EOFITTERM_H - -#include - - -/** Fitness termination: terminates after a the difference between the -fitness of the best individual and a maximum fitness to achieve is less -than certain number called epsilon., i.e., |maximum-fitness| -class eoFitTerm: public eoTerm { -public: - - /// Ctors/dtors - eoFitTerm( const float _maximum, const float _epsilon ) - : eoTerm (), maximum( _maximum ), epsilon(_epsilon){}; - - /// Copy ctor - eoFitTerm( const eoFitTerm& _t ) - : eoTerm ( _t ), maximum( _t.maximum ), - epsilon(_t.epsilon){}; - - /// - virtual ~eoFitTerm() {}; - - /** Returns false when a certain number of generations is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - float bestFitness=_vEO[0].fitness(); - float dif=bestFitness-maximum; - dif=(dif<0)?-dif:dif; - return (dif>epsilon ) || (bestFitness > maximum); - } - -private: - float maximum, epsilon; -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOFITTERM_H +#define _EOFITTERM_H + +#include + + +/** Fitness termination: terminates after a the difference between the +fitness of the best individual and a maximum fitness to achieve is less +than certain number called epsilon., i.e., |maximum-fitness| +class eoFitTerm: public eoTerm { +public: + + /// Ctors/dtors + eoFitTerm( const float _maximum, const float _epsilon ) + : eoTerm (), maximum( _maximum ), epsilon(_epsilon){}; + + /// Copy ctor + eoFitTerm( const eoFitTerm& _t ) + : eoTerm ( _t ), maximum( _t.maximum ), + epsilon(_t.epsilon){}; + + /// + virtual ~eoFitTerm() {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + float bestFitness=_vEO[0].fitness(); + float dif=bestFitness-maximum; + dif=(dif<0)?-dif:dif; + return (dif>epsilon ) || (bestFitness > maximum); + } + +private: + float maximum, epsilon; +}; + +#endif diff --git a/eo/src/eoFitness.h b/eo/src/eoFitness.h index 8696f496c..8505c34fd 100644 --- a/eo/src/eoFitness.h +++ b/eo/src/eoFitness.h @@ -1,54 +1,54 @@ -// eoFitness.h -//----------------------------------------------------------------------------- -// eoFitness.cpp -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOFITNESS_H -#define EOFITNESS_H - -//----------------------------------------------------------------------------- - -class eoFitness: public eoPersistent -{ - public: - virtual operator float() const = 0; - - virtual bool operator<(const eoFitness& other) const = 0; - - virtual bool operator>(const eoFitness& other) const - { - return !(*this < other || *this == other); - } - - virtual bool operator==(const eoFitness& other) const - { - return !(other < *this || *this < other); - } - - virtual bool operator!=(const eoFitness& other) const - { - return other < *this || *this < other; - } -}; - -//----------------------------------------------------------------------------- - -#endif EOFITNESS_H +// eoFitness.h +//----------------------------------------------------------------------------- +// eoFitness.cpp +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOFITNESS_H +#define EOFITNESS_H + +//----------------------------------------------------------------------------- + +class eoFitness: public eoPersistent +{ + public: + virtual operator float() const = 0; + + virtual bool operator<(const eoFitness& other) const = 0; + + virtual bool operator>(const eoFitness& other) const + { + return !(*this < other || *this == other); + } + + virtual bool operator==(const eoFitness& other) const + { + return !(other < *this || *this < other); + } + + virtual bool operator!=(const eoFitness& other) const + { + return other < *this || *this < other; + } +}; + +//----------------------------------------------------------------------------- + +#endif EOFITNESS_H diff --git a/eo/src/eoGenTerm.h b/eo/src/eoGenTerm.h index 7da104c08..3e6b0aa54 100644 --- a/eo/src/eoGenTerm.h +++ b/eo/src/eoGenTerm.h @@ -1,82 +1,82 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenTerm.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOGENTERM_H -#define _EOGENTERM_H - -#include - -/** Generational termination: terminates after a number of generations -*/ -template< class EOT> -class eoGenTerm: public eoTerm { -public: - - /// Ctors/dtors - eoGenTerm( unsigned _totalGens) - : eoTerm (), repTotalGenerations( _totalGens ), - thisGeneration(0){}; - - /// Copy Ctor - eoGenTerm( const eoGenTerm& _t) - : eoTerm ( _t ), repTotalGenerations( _t.repTotalGenerations ), - thisGeneration(0){}; - - /// Assignment Operator - const eoGenTerm& operator = ( const eoGenTerm& _t) { - if ( &_t != this ) { - repTotalGenerations = _t.repTotalGenerations; - thisGeneration = 0; +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOGENTERM_H +#define _EOGENTERM_H + +#include + +/** Generational termination: terminates after a number of generations +*/ +template< class EOT> +class eoGenTerm: public eoTerm { +public: + + /// Ctors/dtors + eoGenTerm( unsigned _totalGens) + : eoTerm (), repTotalGenerations( _totalGens ), + thisGeneration(0){}; + + /// Copy Ctor + eoGenTerm( const eoGenTerm& _t) + : eoTerm ( _t ), repTotalGenerations( _t.repTotalGenerations ), + thisGeneration(0){}; + + /// Assignment Operator + const eoGenTerm& operator = ( const eoGenTerm& _t) { + if ( &_t != this ) { + repTotalGenerations = _t.repTotalGenerations; + thisGeneration = 0; } - return *this; - } - - /// Dtor - virtual ~eoGenTerm() {}; - - /** Returns false when a certain number of generations is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - thisGeneration++; - // cout << " [" << thisGeneration << "] "; - return (thisGeneration < repTotalGenerations) ; // for the postincrement - } - - /** Sets the number of generations to reach - and sets the current generation to 0 (the begin)*/ - virtual void totalGenerations( unsigned _tg ) { - repTotalGenerations = _tg; - // thisGeneration = 0; - }; - - /** Returns the number of generations to reach*/ - virtual unsigned totalGenerations( ) { - return repTotalGenerations; - }; - -private: - unsigned repTotalGenerations, thisGeneration; -}; - -#endif + return *this; + } + + /// Dtor + virtual ~eoGenTerm() {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + // cout << " [" << thisGeneration << "] "; + return (thisGeneration < repTotalGenerations) ; // for the postincrement + } + + /** Sets the number of generations to reach + and sets the current generation to 0 (the begin)*/ + virtual void totalGenerations( unsigned _tg ) { + repTotalGenerations = _tg; + // thisGeneration = 0; + }; + + /** Returns the number of generations to reach*/ + virtual unsigned totalGenerations( ) { + return repTotalGenerations; + }; + +private: + unsigned repTotalGenerations, thisGeneration; +}; + +#endif diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index 3adbb10e6..1bfec9a28 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -1,80 +1,80 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoGeneration_h -#define eoGeneration_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include -#include // eoSelect, eoTranform, eoMerge - -//----------------------------------------------------------------------------- -// eoGeneration -//----------------------------------------------------------------------------- - -template class eoGeneration: public eoAlgo -{ - public: - /// Constructor. - eoGeneration(eoSelect& _select, - eoTransform& _transform, - eoMerge& _replace, - eoEvalFunc& _evaluator): - select(_select), transform(_transform), - replace(_replace), evaluator( _evaluator) {}; - - /// Copy Constructor. - eoGeneration(eoGeneration& _gen): - select(_gen.select), transform(_gen.transform), - replace(_gen.replace), evaluator( _gen.evaluator ) {}; - - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - eoPop breeders; - select(pop, breeders); - transform(breeders); - eoPop::iterator i; - // Can't use foreach here since foreach takes the - // parameter by reference - for ( i = breeders.begin(); i != breeders.end(); i++) - evaluator(*i); - replace(breeders, pop); - } - - /// Class name. - string className() const { return "eoGeneration"; } - - private: - eoSelect& select; - eoTransform& transform; - eoMerge& replace; - eoEvalFunc& evaluator; -}; - -//----------------------------------------------------------------------------- - -#endif eoGeneration_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoGeneration_h +#define eoGeneration_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include +#include // eoSelect, eoTranform, eoMerge + +//----------------------------------------------------------------------------- +// eoGeneration +//----------------------------------------------------------------------------- + +template class eoGeneration: public eoAlgo +{ + public: + /// Constructor. + eoGeneration(eoSelect& _select, + eoTransform& _transform, + eoMerge& _replace, + eoEvalFunc& _evaluator): + select(_select), transform(_transform), + replace(_replace), evaluator( _evaluator) {}; + + /// Copy Constructor. + eoGeneration(eoGeneration& _gen): + select(_gen.select), transform(_gen.transform), + replace(_gen.replace), evaluator( _gen.evaluator ) {}; + + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + eoPop breeders; + select(pop, breeders); + transform(breeders); + eoPop::iterator i; + // Can't use foreach here since foreach takes the + // parameter by reference + for ( i = breeders.begin(); i != breeders.end(); i++) + evaluator(*i); + replace(breeders, pop); + } + + /// Class name. + string className() const { return "eoGeneration"; } + + private: + eoSelect& select; + eoTransform& transform; + eoMerge& replace; + eoEvalFunc& evaluator; +}; + +//----------------------------------------------------------------------------- + +#endif eoGeneration_h diff --git a/eo/src/eoID.h b/eo/src/eoID.h index 7488d26bd..ed8ceecd3 100644 --- a/eo/src/eoID.h +++ b/eo/src/eoID.h @@ -1,40 +1,40 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // eoID.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOID_H -#define EOID_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // for string +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOID_H +#define EOID_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // for string using namespace std; - -//----------------------------------------------------------------------------- -// eoID -//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// eoID +//----------------------------------------------------------------------------- /** eoID is a template class that adds an ID to an object.\\ Requisites for template instantiation are that the object must admit a default ctor @@ -43,18 +43,18 @@ printOn, readFrom, that is why we don IDs can be used to count objects of a a kind, or track them, or whatever. @see eoObject */ -template -class eoID: public Object -{ - public: +template +class eoID: public Object +{ + public: /// Main ctor from an already built Object. eoID( const Object& _o): Object( _o ), thisID(globalID++) {}; - - /// Copy constructor. + + /// Copy constructor. eoID( const eoID& _id): Object( _id ), thisID(globalID++ ) {}; /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoID() {}; + virtual ~eoID() {}; ///returns the age of the object @@ -63,32 +63,32 @@ class eoID: public Object /** @name Methods from eoObject readFrom and printOn are directly inherited from eo1d */ - //@{ - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return string("[eoID]")+Object::className(); }; - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ + //@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("[eoID]")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ virtual void readFrom(istream& _is) { Object::readFrom( _is ); _is >> thisID; } - - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ virtual void printOn(ostream& _os) const{ Object::printOn( _os ); _os << thisID; - } + } //@} private: @@ -100,10 +100,10 @@ class eoID: public Object eoID(): Object(), thisID( globalID++ ) {}; unsigned long thisID; - static unsigned long globalID; + static unsigned long globalID; }; template< class Object> unsigned long eoID< Object >::globalID = 0; - -#endif EOID_H + +#endif EOID_H diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 7674b958a..0e33cb74a 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -1,79 +1,79 @@ -//----------------------------------------------------------------------------- -// eoInsertion.h -//----------------------------------------------------------------------------- - -#ifndef eoInsertion_h -#define eoInsertion_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include // eoMerge - -/****************************************************************************** - * eoInsertion: A replacement algorithm. - * Creates a new population with all the breeders and the best individuals - * from the original population. - *****************************************************************************/ - -template class eoInsertion: public eoMerge -{ - public: - /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} - - /** - * Creates a new population based on breeders and original populations. - * @param breeders The population of breeders. - * @param pop The original population. - */ - /*void operator()(eoPop& breeders, eoPop& pop) - { - int new_size = static_cast(pop.size() * rate()); - - if (new_size == breeders.size()) - { - pop = breeders; - } - else if (new_size < breeders.size()) - { - pop = breeders; - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); - } - else - { - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), - pop.begin() + breeders.size() + pop.size() - new_size); - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); - } - }*/ - - void operator()(eoPop& breeders, eoPop& pop) - { - unsigned target = static_cast(rint(pop.size() * rate())); - - pop.swap(breeders); - - if (target < pop.size()) - { - partial_sort(pop.begin(), pop.begin() + target, pop.end(), - greater()); - pop.erase(pop.begin() + target, pop.end()); - } - else - { - target = min(target - pop.size(), breeders.size()); - partial_sort(breeders.begin(), breeders.begin() + target, - breeders.end(), greater()); - copy(breeders.begin(), breeders.begin() + target, - back_insert_iterator >(pop)); - } - } -}; - -//----------------------------------------------------------------------------- - -#endif eoInsertion_h +//----------------------------------------------------------------------------- +// eoInsertion.h +//----------------------------------------------------------------------------- + +#ifndef eoInsertion_h +#define eoInsertion_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include // eoMerge + +/****************************************************************************** + * eoInsertion: A replacement algorithm. + * Creates a new population with all the breeders and the best individuals + * from the original population. + *****************************************************************************/ + +template class eoInsertion: public eoMerge +{ + public: + /// (Default) Constructor. + eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} + + /** + * Creates a new population based on breeders and original populations. + * @param breeders The population of breeders. + * @param pop The original population. + */ + /*void operator()(eoPop& breeders, eoPop& pop) + { + int new_size = static_cast(pop.size() * rate()); + + if (new_size == breeders.size()) + { + pop = breeders; + } + else if (new_size < breeders.size()) + { + pop = breeders; + sort(pop.begin(), pop.end()); + pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); + } + else + { + sort(pop.begin(), pop.end()); + pop.erase(pop.begin(), + pop.begin() + breeders.size() + pop.size() - new_size); + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); + } + }*/ + + void operator()(eoPop& breeders, eoPop& pop) + { + unsigned target = static_cast(rint(pop.size() * rate())); + + pop.swap(breeders); + + if (target < pop.size()) + { + partial_sort(pop.begin(), pop.begin() + target, pop.end(), + greater()); + pop.erase(pop.begin() + target, pop.end()); + } + else + { + target = min(target - pop.size(), breeders.size()); + partial_sort(breeders.begin(), breeders.begin() + target, + breeders.end(), greater()); + copy(breeders.begin(), breeders.begin() + target, + back_insert_iterator >(pop)); + } + } +}; + +//----------------------------------------------------------------------------- + +#endif eoInsertion_h diff --git a/eo/src/eoKill.h b/eo/src/eoKill.h index bddcbb2bb..826274f06 100644 --- a/eo/src/eoKill.h +++ b/eo/src/eoKill.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoKill.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOKILL_h diff --git a/eo/src/eoMultiMonOp.h b/eo/src/eoMultiMonOp.h index c46f87779..c06a27947 100644 --- a/eo/src/eoMultiMonOp.h +++ b/eo/src/eoMultiMonOp.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoMultiMonOp.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOMULTIMONOP_h diff --git a/eo/src/eoMutation.h b/eo/src/eoMutation.h index 466c377ee..fbc3641c0 100644 --- a/eo/src/eoMutation.h +++ b/eo/src/eoMutation.h @@ -1,133 +1,90 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMutation.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOMUTATION_H -#define _EOMUTATION_H - -#include -// EO includes -#include -#include - -/** Generic Mutation of an EO. - This is a virtual class, just to establish the interface -*/ - -template -class eoMutation: public eoMonOp { -public: - - /// - eoMutation(const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate) {}; - - /// - virtual ~eoMutation() {}; - - /// - virtual void operator()( EOT& _eo ) const { - for ( unsigned i = 0; i < _eo.length(); i ++ ) - applyAt( _eo, i ); - } - - /// To print me on a stream. - /// @param os The ostream. - void printOn(ostream& os) const { - os << rate ; - } - - /// To read me from a stream. - /// @param is The istream. - void readFrom(istream& is) { - is >> rate ; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMutation";}; - //@} - -protected: - double rate; - -private: -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO. It is empty, so each descent class must define it. - virtual void applyAt( EOT& _eo, unsigned _i ) const = 0 ; -}; - - - -/** Mutation of an eoString. - The eoString's genes are changed by adding or substracting 1 to -*/ - -template -class eoStringMutation: public eoMutation { - public: - - /// - eoStringMutation(const double _rate=0.0) : eoMutation< EOT >(_rate) {}; - - /// - virtual ~eoStringMutation() {}; - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoStringMutation";}; - //@} - - - private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. - virtual void applyAt( EOT& _eo, unsigned _i ) const { - eoUniform uniform( 0, 1 ); - if( rate < uniform() ) { - _eo.gene(_i) += ( uniform()>=0.5 )? (1) : (-1) ; - } - } - -}; - -//----------------------------------------------------------------------------- - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMutation.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOMUTATION_H +#define _EOMUTATION_H + +#include +// EO includes +#include +#include + +/** Generic Mutation of an EO. + This is a virtual class, just to establish the interface for the ctor. + Mutation is usually type-specific +*/ + +template +class eoMutation: public eoMonOp { +public: + + /// + eoMutation(const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate) {}; + + /// + virtual ~eoMutation() {}; + + /// + virtual void operator()( EOT& _eo ) const { + typename EOT::iterator i; + for ( i = _eo.begin(); i != _eo.end(); i ++ ) + applyAt( _eo, *i ); + } + + /// To print me on a stream. + /// @param os The ostream. + void printOn(ostream& os) const { + os << rate ; + } + + /// To read me from a stream. + /// @param is The istream. + void readFrom(istream& is) { + is >> rate ; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMutation";}; + //@} + +protected: + double rate; + +private: +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO. It is empty, so each descent class must define it. + virtual void applyAt( EOT& _eo, unsigned _i ) const = 0 ; +}; + + +#endif diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h index 3805669b7..beb63479f 100644 --- a/eo/src/eoNegExp.h +++ b/eo/src/eoNegExp.h @@ -1,66 +1,66 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoNegExp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EONEGEXP_H -#define _EONEGEXP_H - -//----------------------------------------------------------------------------- - -#include - -#include // for base class -#include // for base class - -//----------------------------------------------------------------------------- -// Class eoNegExp -//----------------------------------------------------------------------------- - -/// Generates random numbers using a negative exponential distribution -template -class eoNegExp: public eoRnd -{ - public: - /** - * Default constructor. - * @param _mean Dsitribution mean - */ - eoNegExp(T _mean): eoRnd(), mean(_mean) {}; - - /** - * Copy constructor. - * @param _rnd the copyee - */ - eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; - - /// Returns an uniform dandom number over the interval [min, max). - virtual T operator()() { - return T( -mean*log((double)rng.rand() / rng.rand_max())); } - - private: - T mean; -}; - -//----------------------------------------------------------------------------- - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNegExp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EONEGEXP_H +#define _EONEGEXP_H + +//----------------------------------------------------------------------------- + +#include + +#include // for base class +#include // for base class + +//----------------------------------------------------------------------------- +// Class eoNegExp +//----------------------------------------------------------------------------- + +/// Generates random numbers using a negative exponential distribution +template +class eoNegExp: public eoRnd +{ + public: + /** + * Default constructor. + * @param _mean Dsitribution mean + */ + eoNegExp(T _mean): eoRnd(), mean(_mean) {}; + + /** + * Copy constructor. + * @param _rnd the copyee + */ + eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; + + /// Returns an uniform dandom number over the interval [min, max). + virtual T operator()() { + return T( -mean*log((double)rng.rand() / rng.rand_max())); } + + private: + T mean; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoNonUniform.h b/eo/src/eoNonUniform.h index 438f72660..c894806fb 100644 --- a/eo/src/eoNonUniform.h +++ b/eo/src/eoNonUniform.h @@ -1,86 +1,86 @@ -//----------------------------------------------------------------------------- -// eoNonUniform.h -//----------------------------------------------------------------------------- - -#ifndef EONONUNIFORM_H -#define EONONUNIFORM_H - -//----------------------------------------------------------------------------- - -#include // pow - -//----------------------------------------------------------------------------- -// eoNonUniform -//----------------------------------------------------------------------------- - -class eoNonUniform -{ -public: - eoNonUniform(const unsigned _num_step): - step_value(0), num_step_value(_num_step) {} - - void reset() { step_value = 0; } - - const unsigned& step() const { return step_value; } - const unsigned& num_step() const { return num_step_value; } - - operator int() const { return step_value < num_step_value; } - - void operator++() { ++step_value; } - void operator++(int) { ++step_value; } - -private: - unsigned step_value, num_step_value; -}; - -//----------------------------------------------------------------------------- -// eoLinear -//----------------------------------------------------------------------------- - -class eoLinear -{ -public: - eoLinear(const double _first, - const double _last, - const eoNonUniform& _non_uniform): - first(_first), - diff((_last - _first) / (_non_uniform.num_step() - 1)), - non_uniform(_non_uniform) {} - - double operator()() const - { - return first + diff * non_uniform.step(); - } - -private: - double first, diff; - const eoNonUniform& non_uniform; -}; - -//----------------------------------------------------------------------------- -// eoNegExp2 -//----------------------------------------------------------------------------- - -class eoNegExp2 -{ - public: - eoNegExp2(const double _r, - const double _b, - const eoNonUniform& _non_uniform): - r(_r), b(_b), - non_uniform(_non_uniform) {} - - double operator()() const - { - return 1.0 - pow(r, pow(1.0 - (double)non_uniform.step() / - non_uniform.num_step(), b)); - } - - private: - double r, b; - const eoNonUniform& non_uniform; -}; - -//----------------------------------------------------------------------------- - -#endif NON_UNIFORM_HH +//----------------------------------------------------------------------------- +// eoNonUniform.h +//----------------------------------------------------------------------------- + +#ifndef EONONUNIFORM_H +#define EONONUNIFORM_H + +//----------------------------------------------------------------------------- + +#include // pow + +//----------------------------------------------------------------------------- +// eoNonUniform +//----------------------------------------------------------------------------- + +class eoNonUniform +{ +public: + eoNonUniform(const unsigned _num_step): + step_value(0), num_step_value(_num_step) {} + + void reset() { step_value = 0; } + + const unsigned& step() const { return step_value; } + const unsigned& num_step() const { return num_step_value; } + + operator int() const { return step_value < num_step_value; } + + void operator++() { ++step_value; } + void operator++(int) { ++step_value; } + +private: + unsigned step_value, num_step_value; +}; + +//----------------------------------------------------------------------------- +// eoLinear +//----------------------------------------------------------------------------- + +class eoLinear +{ +public: + eoLinear(const double _first, + const double _last, + const eoNonUniform& _non_uniform): + first(_first), + diff((_last - _first) / (_non_uniform.num_step() - 1)), + non_uniform(_non_uniform) {} + + double operator()() const + { + return first + diff * non_uniform.step(); + } + +private: + double first, diff; + const eoNonUniform& non_uniform; +}; + +//----------------------------------------------------------------------------- +// eoNegExp2 +//----------------------------------------------------------------------------- + +class eoNegExp2 +{ + public: + eoNegExp2(const double _r, + const double _b, + const eoNonUniform& _non_uniform): + r(_r), b(_b), + non_uniform(_non_uniform) {} + + double operator()() const + { + return 1.0 - pow(r, pow(1.0 - (double)non_uniform.step() / + non_uniform.num_step(), b)); + } + + private: + double r, b; + const eoNonUniform& non_uniform; +}; + +//----------------------------------------------------------------------------- + +#endif NON_UNIFORM_HH diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h index 5dfe49bd1..e7302c76d 100644 --- a/eo/src/eoNormal.h +++ b/eo/src/eoNormal.h @@ -1,51 +1,51 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoNormal.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EONORMAL_H -#define _EONORMAL_H - -//----------------------------------------------------------------------------- - -#include -#include // for base class -#include // for random number generator - -//----------------------------------------------------------------------------- -// Class eoNormal -//----------------------------------------------------------------------------- - -/// Generates random number using a normal distribution -template -class eoNormal: public eoRnd -{ - public: - /** - * Default constructor. - * @param _mean Dsitribution mean - * @param _sd Standard Deviation - */ - eoNormal(T _mean, T _sd) +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNormal.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EONORMAL_H +#define _EONORMAL_H + +//----------------------------------------------------------------------------- + +#include +#include // for base class +#include // for random number generator + +//----------------------------------------------------------------------------- +// Class eoNormal +//----------------------------------------------------------------------------- + +/// Generates random number using a normal distribution +template +class eoNormal: public eoRnd +{ + public: + /** + * Default constructor. + * @param _mean Dsitribution mean + * @param _sd Standard Deviation + */ + eoNormal(T _mean, T _sd) : eoRnd(), mean(_mean), sd(_sd), phase(false) {} /** @@ -53,36 +53,36 @@ class eoNormal: public eoRnd * @param _rnd the other one */ eoNormal( const eoNormal& _rnd ) - : eoRnd( _rnd), mean(_rnd.mean), sd(_rnd.sd), phase(false) {} - - /** Returns an uniform random number over the interval [min, max). - @return an uniform random number over the interval [min, max). - */ - virtual T operator()() { - if (phase) { // Already have one stored up. - phase = false; - return T ( (sqRatio * q * sd) + mean ); - } - - double p, v; - do { - p = ((double)rng.rand() / rng.rand_max())*2-1; - q = ((double)rng.rand() / rng.rand_max())*2-1; - v = p*p + q*q; - } while(v > 1.0 || v <0.25); - - sqRatio = sqrt(-2*log((double)rand() / rng.rand_max()) / v); - phase = true; - return T( (sqRatio * p * sd) + mean ); - }; - - private: - T mean; - T sd; - bool phase; - double sqRatio, q; -}; - -//----------------------------------------------------------------------------- - -#endif + : eoRnd( _rnd), mean(_rnd.mean), sd(_rnd.sd), phase(false) {} + + /** Returns an uniform random number over the interval [min, max). + @return an uniform random number over the interval [min, max). + */ + virtual T operator()() { + if (phase) { // Already have one stored up. + phase = false; + return T ( (sqRatio * q * sd) + mean ); + } + + double p, v; + do { + p = ((double)rng.rand() / rng.rand_max())*2-1; + q = ((double)rng.rand() / rng.rand_max())*2-1; + v = p*p + q*q; + } while(v > 1.0 || v <0.25); + + sqRatio = sqrt(-2*log((double)rand() / rng.rand_max()) / v); + phase = true; + return T( (sqRatio * p * sd) + mean ); + }; + + private: + T mean; + T sd; + bool phase; + double sqRatio, q; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 56a746b58..8bf2e1372 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -1,66 +1,66 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // eoObject.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOOBJECT_H -#define EOOBJECT_H - -//----------------------------------------------------------------------------- +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. -#include // For limits definition -#include // istream, ostream -#include // string + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOOBJECT_H +#define EOOBJECT_H + +//----------------------------------------------------------------------------- + +#include // For limits definition +#include // istream, ostream +#include // string using namespace std; - -//----------------------------------------------------------------------------- -// eoObject -//----------------------------------------------------------------------------- -/** -This is the base class for the whole hierarchy; an eoObject defines -basically an interface for the whole hierarchy: each object should + +//----------------------------------------------------------------------------- +// eoObject +//----------------------------------------------------------------------------- +/** +This is the base class for the whole hierarchy; an eoObject defines +basically an interface for the whole hierarchy: each object should know its name (#className#). Previously, this object defined a print and read -interface, but it´s been moved to eoPrintable and eoPersistent. - */ -class eoObject -{ - public: - - /// Default Constructor. - eoObject() {} - - /// Copy constructor. - eoObject( const eoObject& ) {} - - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoObject() {} - - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return "eoObject"; } - -}; - -#endif EOOBJECT_H +interface, but it´s been moved to eoPrintable and eoPersistent. + */ +class eoObject +{ + public: + + /// Default Constructor. + eoObject() {} + + /// Copy constructor. + eoObject( const eoObject& ) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoObject() {} + + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return "eoObject"; } + +}; + +#endif EOOBJECT_H diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index d93c2a36a..5a1cb8288 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,204 +1,204 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody -should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ -//@{ - -/// -enum Arity { unary = 0, binary = 1, Nary = 2}; - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - - /// Ctor - eoOp( Arity _arity = unary ) - :arity( _arity ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :arity( _eop.arity ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// Arity: number of operands - Arity readArity() const {return arity;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); -// _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - - -private: - /// arity is the number of operands it takes - Arity arity; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - :eoOp( unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} - - -}; - -#include -/** eoNaryOp is the N-ary operator: genetic operator that takes - several EOs. It could be called an {\em orgy} operator -*/ -template -class eoNaryOp: public eoOp { -public: - - /// Ctor - eoNaryOp( ) - :eoOp( Nary ) {}; - - /// Copy Ctor - eoNaryOp( const eoNaryOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoNaryOp() {}; - - /** applies randomly operator, to the object. - */ - virtual void operator()( eoPop & _eop) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject. - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoNaryOp";}; - //@} - -}; -//@} - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody +should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. +@author GeNeura Team +@version 0.1 +@see eoOpFactory +*/ +//@{ + +/// +enum Arity { unary = 0, binary = 1, Nary = 2}; + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + + /// Ctor + eoOp( Arity _arity = unary ) + :arity( _arity ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :arity( _eop.arity ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// Arity: number of operands + Arity readArity() const {return arity;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className(); +// _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + + +private: + /// arity is the number of operands it takes + Arity arity; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. Modifies both operands. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + :eoOp( unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} + + +}; + +#include +/** eoNaryOp is the N-ary operator: genetic operator that takes + several EOs. It could be called an {\em orgy} operator. It's a general operator + that takes any number of inputs and spits out any number of outputs +*/ +template +class eoNaryOp: public eoOp { +public: + + /// Ctor + eoNaryOp( ) + :eoOp( Nary ) {}; + + /// Copy Ctor + eoNaryOp( const eoNaryOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoNaryOp() {}; + + /** applies randomly operator, to the object. + */ + virtual void operator()( const eoPop & _in, eoPop _out ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject. + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoNaryOp";}; + //@} + +}; +//@} + +#endif diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 2ee11205c..d4c9940b9 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoOpSelector.h // (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOOPSELECTOR_H diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index 0bfe70c06..df6ed49cc 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -1,790 +1,847 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -/* eoParser.h - some classes to parser either the command line or a parameter file - - (c) Marc Schoenauer and Geneura team, 1999 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -/* eoParser.h - some classes to parser either the command line or a parameter file - - (c) geneura team, 1999 ------------------------------------------------------------------------------*/ - -#ifndef _PARSER_H -#define _PARSER_H - -// Standard C libraries -#include -#include -#include -#include -// STL includes -#include -#include -#include -#include -#include - -#include "UException.h" - -using namespace std; - - -//----------------------------------------------------------------------------- -// Class Param -//----------------------------------------------------------------------------- - -/** - * A param repesents an argument that can be passed to a program in the command line - */ -class Param { -public: - - /** - * Type of params - */ - enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; - - /** - * Construct an Param. - * @param _shortName Short name of the argument - * @param _longName Long name of the argument - * @param _default The default value - * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) - * @param _description Description of the parameter. What is useful for. - * @param _required If it is a necessary parameter or not - */ - Param (string _shortName="-h", string _longName="--help", - string _default = "", valueType _valType= STRING, - string _description="Shows this help", - bool _required=false ) - : repShortName(_shortName), repLongName(_longName), - repDescription(_description ), repEnv(""), repDefault(_default), - repValue(_default), repValType( _valType), - repRequired( _required), repChanged(false) { - - const char *c = repLongName.c_str(); - for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); - parse( param ); - params.push_back( param ); - - istrstream is(param.value().c_str()); - vector retValue; - string tmpStr; - - is >> tmpStr; - while(is){ - retValue.push_back(tmpStr); - is >> tmpStr; - } - return retValue; - }; - - /** - * Gets the int value of a param given the full description of the parameter - * @param see above - * @exception BadType if the param's value isn't a correct int - */ - - int getInt (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - int retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the unsigned lon value of a param given ... - * @param see above - * @exception BadType if the param's value isn't a correct unsigned long - */ - - int getUnsignedLong (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - unsigned long retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the float value of a param given the description of the parameter - * @param see above - * @exception BadType if the param's value isn't a correct int - */ - - float getFloat (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - float retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - - string parse_string (istream & _is) { - string paramValue; - _is >> paramValue; - //if the first character of the string or array is not a " => just one word or array-element. - if( paramValue[0] != '\"' ) - return paramValue; - - if( paramValue[1] == '\"' ) // the empty string - return "" ; - - //else => read until the next " (the end of the string). - const char *c = paramValue.c_str(); - string tmpStr = c+1;// skip the " - if (tmpStr[tmpStr.length()-1] == '\"') { // one word only - tmpStr[tmpStr.length()-1] = '\0'; - return tmpStr; - } - - bool stop = false; - while (_is && !stop) { - _is >> paramValue; - // test last character of paramValue for " - if (paramValue[paramValue.length()-1] == '\"') { - paramValue[paramValue.length()-1] = '\0'; - stop = true; - } - tmpStr = tmpStr + " " + paramValue ; - } - return tmpStr; - }; - - - void parse (Param & param) { - int i; - string tmpStr, ReadStr, FirstWord; - - // FIRST: look if the associated environment variables have any value, to use them. - if( getenv( param.environment().c_str() ) ) { - //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; - if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || - ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) - ) { // found the keyword - - Param::valueType tmp = param.valType(); - switch ( tmp ) { - case Param::TITLE: - cerr << "Error, we should not be there" << endl; - exit(1); - break; - case Param::BOOL : - param.value("true" ); - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - is >> tmpStr; - param.value(tmpStr); - break; - - case Param::STRING: - tmpStr = parse_string(is); - param.value(tmpStr); - break; - - case Param::ARRAY: - ReadStr = parse_string(is); - if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array - param.value(ReadStr); - break; - } - // read next word - and keep it in case of <> mismatch - FirstWord = parse_string(is); - // test for empty array - if (FirstWord == ">") { - param.value(""); - break; - } - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_string(is); - while ( is && (ReadStr != ">") ) { - tmpStr = tmpStr + " " + ReadStr; - ReadStr = parse_string(is); - } - - if (!is) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string - } - else - param.value(tmpStr); - break; - } - } - } - - - // LAST (highest priority) parse the command line arguments - for (i=1 ; i" --> a single string in the array - param.value(ReadStr); - }else{ - // read next word - and keep it in case of <> mismatch - FirstWord = parse_argv[i++]; - - // test for empty array - if (FirstWord == ">") { - param.value(""); - }else{ - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_argv[i++]; - while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string - }else{ - param.value(tmpStr); - } - } - } - } - } - break; - } - - //MS after trying all possibilities, and if the value has not changed - // though the parameter was required, protest! - if (param.required() && !param.changed()) - throw Parser::MissingReqParam(param.shortName()); - - }; - - /** - * Sets a new value for a param given its short name or its long name. - * @param _name One of the names of the param. - * @param _value Value to be assigned. - * @exception UnknownArg if the param doesn't exist - * @exception MissingVal if the param hasn't got a value - */ - Param::valueType setParamValue (const string& _name, const char* _value){ - vector::iterator pos; - - for (pos=params.begin() ; pos!=params.end() ; pos++) - if (pos->shortName()==_name || pos->longName()==_name) - break; - - // if found ... - if (pos!=params.end()) { - switch ( pos->valType() ) { - case Param::TITLE: - cerr << "Error, we should not be there" << endl; - exit(1); - break; - case Param::BOOL : - pos->value("true"); - break; - case Param::ARRAY : - case Param::INT: - case Param::UL: - case Param::FLOAT: - case Param::STRING: - if (_value != NULL){ - pos->value(_value); - }else{ - throw Parser::MissingVal(_name); - return Param::BOOL; - } - break; - } // switch - - return pos->valType(); - - }else{ - throw Parser::UnknownArg(_name); - return Param::BOOL; - } - }; - - friend ostream & operator<< ( ostream & os, Parser & _parser ) - { - vector::iterator p; - //print every param with its value - for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { - switch ( p->valType() ) { - case Param::BOOL : - if(p->value() == "true") - os << p->longName(); - else - os << "#" << p->longName() ; // so the name of the bool is commented out - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - os << p->longName()<<" "<value(); - break; - - case Param::ARRAY : - os << p->longName() << " < " << p->value() << " >" ; - break; - case Param::STRING: - os << p->longName()<<" \""<value()<<"\" "; - break; - case Param::TITLE: - os << endl; // Title is in the description below - break; - } // switch - os << "\t # " << p->description() << " [" << p->defValue() << "]" << endl; - } - return os; - }; - - /** - * Prints out the list of parameters in the output file (if specified) - */ - void outputParam(string _OutputFile="") - { - if (_OutputFile == "") { - _OutputFile = parse_argv[0]; - _OutputFile += ".status"; - } - - ofstream os(_OutputFile.c_str()); - os << "Parameters used by \"" << programName << "\" (" - << programDescription << ")" << endl << endl; - os << *this; - }; - - /** - * Prints an automatic help in the standard output using the information - * provided by parameters - */ - void printHelp() { - vector::iterator p; - unsigned i; - - // print program name and description - cout << this->programName <<":"<valType() != Param::TITLE ) { - if( p->valType() != Param::BOOL ){ - cout << ( (!p->required())?"[":""); - cout <shortName()<<" value"<required())?"]":"")<<" "; - }else{ - cout << "["<shortName()<<"] "; - } - } // for p - cout << endl<valType() != Param::TITLE ) { - cout << p->shortName()<<","<longName()<<":\t"<description()<valType() ) { - case Param::INT: cout <<"Integer"; break; - case Param::UL: cout <<"Unsigned Long Integer"; break; - case Param::FLOAT: cout <<"Float"; break; - case Param::STRING: cout <<"String"; break; - case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; - case Param::BOOL: cout << "Flag"; break; - case Param::TITLE: break; - } // switch - if(p->valType() == Param::BOOL) - cout << ") True if present" << endl; - else - cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()< in array value - */ - class BadArrayParam : public UException { - public: - - /** - * Constructor - * @param _param The param - * @param _first_word The first word read after the "<" - */ - BadArrayParam(const string& _param, const string &_first_word) : - UException("Array parameter " + _param + ": No matching > (" + _first_word - + "... )") {}; - }; - -private: - vector params; - string programName; - string programDescription; - int parse_argc; - char **parse_argv; - string InputFileName; - -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +/* eoParser.h + some classes to parser either the command line or a parameter file + + (c) Marc Schoenauer and Geneura team, 1999 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _PARSER_H +#define _PARSER_H + +#include // for strcasecmp ... maybe there's a c++ way of doing it? +#ifdef _MSC_VER +#define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) +#endif + +// STL includes +#include +#include +#include +#include +#include +#include + +//----------------------------------------------------------------------------- +// Class UExceptions - probably useless ??? +//----------------------------------------------------------------------------- +/** + * This class manages exceptions. It´s barely an extension of the standard except +ion, + * but it can be initialized with an STL string. Called UException (utils-except +ion)+ + * to avoid conflicts with other classes. + */ +class UException: public exception { + public: + /// + UException( const string& _msg ): msg( _msg ) { }; + + /// + virtual const char* what() const { return msg.c_str(); }; + + private: + string msg; +}; + + +//----------------------------------------------------------------------------- +// Class Param +//----------------------------------------------------------------------------- + +/** + * A param repesents an argument that can be passed to a program in the command line + */ +class Param { +public: + + /** + * Type of params + */ + enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; + + /** + * Construct an Param. + * @param _shortName Short name of the argument + * @param _longName Long name of the argument + * @param _default The default value + * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) + * @param _description Description of the parameter. What is useful for. + * @param _required If it is a necessary parameter or not + */ + Param (string _shortName="-h", string _longName="--help", + string _default = "", valueType _valType= STRING, + string _description="Shows this help", + bool _required=false ) + : repShortName(_shortName), repLongName(_longName), + repDescription(_description ), repEnv(""), repDefault(_default), + repValue(_default), repValType( _valType), + repRequired( _required), repChanged(false) { + + const char *c = repLongName.c_str(); + for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); + parse( param ); + params.push_back( param ); + + istrstream is(param.value().c_str()); + vector retValue; + string tmpStr; + + is >> tmpStr; + while(is){ + retValue.push_back(tmpStr); + is >> tmpStr; + } + return retValue; + }; + + /** + * Gets the int value of a param given the full description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + int getInt (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + int retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the unsigned lon value of a param given ... + * @param see above + * @exception BadType if the param's value isn't a correct unsigned long + */ + + int getUnsignedLong (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + unsigned long retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the float value of a param given the description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + float getFloat (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + float retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + + string parse_string (istream & _is) { + string paramValue; + _is >> paramValue; + //if the first character of the string or array is not a " => just one word or array-element. + if( paramValue[0] != '\"' ) + return paramValue; + + if( paramValue[1] == '\"' ) // the empty string + return "" ; + + //else => read until the next " (the end of the string). + const char *c = paramValue.c_str(); + string tmpStr = c+1;// skip the " + if (tmpStr[tmpStr.length()-1] == '\"') { // one word only + tmpStr[tmpStr.length()-1] = '\0'; + return tmpStr; + } + + bool stop = false; + while (_is && !stop) { + _is >> paramValue; + // test last character of paramValue for " + if (paramValue[paramValue.length()-1] == '\"') { + paramValue[paramValue.length()-1] = '\0'; + stop = true; + } + tmpStr = tmpStr + " " + paramValue ; + } + return tmpStr; + }; + + + void parse (Param & param) { + int i; + string tmpStr, ReadStr, FirstWord; + + // FIRST: look if the associated environment variables have any value, to use them. + if( getenv( param.environment().c_str() ) ) { + //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; + if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || + ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) + ) { // found the keyword + + Param::valueType tmp = param.valType(); + switch ( tmp ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + param.value("true" ); + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + is >> tmpStr; + param.value(tmpStr); + break; + + case Param::STRING: + tmpStr = parse_string(is); + param.value(tmpStr); + break; + + case Param::ARRAY: + ReadStr = parse_string(is); + if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array + param.value(ReadStr); + break; + } + // read next word - and keep it in case of <> mismatch + FirstWord = parse_string(is); + // test for empty array + if (FirstWord == ">") { + param.value(""); + break; + } + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_string(is); + while ( is && (ReadStr != ">") ) { + tmpStr = tmpStr + " " + ReadStr; + ReadStr = parse_string(is); + } + + if (!is) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + } + else + param.value(tmpStr); + break; + } + } + } + } + + + // LAST (highest priority) parse the command line arguments + for (i=1 ; i" --> a single string in the array + param.value(ReadStr); + }else{ + // read next word - and keep it in case of <> mismatch + FirstWord = parse_argv[i++]; + + // test for empty array + if (FirstWord == ">") { + param.value(""); + }else{ + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_argv[i++]; + while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + }else{ + param.value(tmpStr); + } + } + } + } + } + break; + } + + //MS after trying all possibilities, and if the value has not changed + // though the parameter was required, protest! + if (param.required() && !param.changed()) + throw Parser::MissingReqParam(param.shortName()); + + }; + + /** + * Sets a new value for a param given its short name or its long name. + * @param _name One of the names of the param. + * @param _value Value to be assigned. + * @exception UnknownArg if the param doesn't exist + * @exception MissingVal if the param hasn't got a value + */ + Param::valueType setParamValue (const string& _name, const char* _value){ + vector::iterator pos; + + for (pos=params.begin() ; pos!=params.end() ; pos++) + if (pos->shortName()==_name || pos->longName()==_name) + break; + + // if found ... + if (pos!=params.end()) { + switch ( pos->valType() ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + pos->value("true"); + break; + case Param::ARRAY : + case Param::INT: + case Param::UL: + case Param::FLOAT: + case Param::STRING: + if (_value != NULL){ + pos->value(_value); + }else{ + throw Parser::MissingVal(_name); + return Param::BOOL; + } + break; + } // switch + + return pos->valType(); + + }else{ + throw Parser::UnknownArg(_name); + return Param::BOOL; + } + }; + + /// the output method - generate the .status file (unless other name is given) + friend ostream & operator<< ( ostream & os, Parser & _parser ) + { + vector::iterator p; + //print every param with its value + for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { + switch ( p->valType() ) { + case Param::BOOL : + if(p->value() == "true") + os << p->longName(); + else + os << "#" << p->longName() ; // so the name of the bool is commented out + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + os << p->longName()<<" "<value(); + break; + + case Param::ARRAY : + os << p->longName() << " < " << p->value().c_str() << " >" ; + break; + case Param::STRING: + os << p->longName()<<" \""<value().c_str()<<"\" "; + break; + case Param::TITLE: + os << endl; // Title is in the description below + break; + } // switch + os << "\t #" << p->shortName() << " : " << p->description(); + if (p->valType() != Param::TITLE) + os << " [" << p->defValue() << "]" ; + os << endl; + } + return os; + }; + + /** + * Prints out the list of parameters in the output file (if specified) + */ + void outputParam(string _OutputFile="") + { + if (_OutputFile == "") { + _OutputFile = parse_argv[0]; + _OutputFile += ".status"; + } + + ofstream os(_OutputFile.c_str()); + os << "Parameters used by \"" << programName << "\" (" + << programDescription << ")" << endl << endl; + os << *this; + }; + + /** + * Prints an automatic help in the standard output using the information + * provided by parameters + */ + void printHelp() { + vector::iterator p; +// unsigned i; + + // print program name and description + cout << this->programName <<": "<valType() != Param::TITLE ) { +// if( p->valType() != Param::BOOL ){ +// cout << ( (!p->required())?"[":""); +// cout <shortName()<<" value"<required())?"]":"")<<" "; +// }else{ +// cout << "["<shortName()<<"] "; +// } +// } // for p + cout << "Where:"<valType() != Param::TITLE ) { + cout << p->shortName()<<","<longName()<<":\t"<description()<valType() ) { + case Param::INT: cout <<"Integer"; break; + case Param::UL: cout <<"Unsigned Long Integer"; break; + case Param::FLOAT: cout <<"Float"; break; + case Param::STRING: cout <<"String"; break; + case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; + case Param::BOOL: cout << "Flag"; break; + case Param::TITLE: break; + } // switch + if(p->valType() == Param::BOOL) + cout << ") True if present" << endl; + else + cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<description() << endl; + } + } // for p + cout << endl; + }; + + /** + * This class managges unknown argument exceptions. + */ + class UnknownArg : public UException { + public: + + /** + * Constructor + * @param _arg string to be shown when the exception occurs + */ + UnknownArg( const string& _arg): UException( "Invalid argument: "+_arg ) { }; + }; + + /** + * This class managges bad param types. + */ + class BadType : public UException { + public: + + /** + * Constructor + * @param _param The param + * @param _value The value of the param + */ + BadType(const string& _param, const string& _value, const string& _correctType) + : UException("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; + }; + + /** + * This class managges exceptions produced when there isn't a value for a parameter. + */ + class MissingVal : public UException { + public: + + /** + * Constructor + * @param _param The param + */ + MissingVal(const string& _param) : UException("Missing value for parameter " + _param) {}; + }; + + /** + * This class managges exceptions produced when the user forgot a required parameter. + */ + class MissingReqParam : public UException { + public: + + /** + * Constructor + * @param _shortName The param's short name + */ + MissingReqParam(const string& _shortName) : UException("Missing required parameter " + _shortName) {}; + }; + + /** + * This class managges exceptions du to < without a > in array value + */ + class BadArrayParam : public UException { + public: + + /** + * Constructor + * @param _param The param + * @param _first_word The first word read after the "<" + */ + BadArrayParam(const string& _param, const string &_first_word) : + UException("Array parameter " + _param + ": No matching > (" + _first_word + + "... )") {}; + }; + +private: + vector params; + string programName; + string programDescription; + int parse_argc; + char **parse_argv; + string InputFileName; + +}; + +/// Reproducible random seed +// Maybe there is a better place for this subroutine (a separate .cpp?) +#include + +//---------------------------------- +void InitRandom( Parser & parser) { +//---------------------------------- + unsigned long _seed; + try { + _seed = parser.getUnsignedLong("-S", "--seed", "0", "Seed for Random number generator" ); + } + catch (UException & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + + if (_seed == 0) { // use clock to get a "random" seed + _seed = unsigned long( time( 0 ) ); + ostrstream s; + 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 + } + rng.reseed(_seed); + + return; +} + + +#endif diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 174aee622..756353f5f 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -2,9 +2,9 @@ //Implementation of these objects -//----------------------------------------------------------------------------- - +//----------------------------------------------------------------------------- + istream & operator >> ( istream& _is, eoPersistent& _o ) { _o.readFrom(_is); return _is; -}; +}; diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index 1fe0acdf2..2902e732d 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -1,70 +1,70 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // eoPersistent.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPERSISTENT_H -#define EOPERSISTENT_H +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPERSISTENT_H +#define EOPERSISTENT_H /// @name variables Some definitions of variables used throughout the program //@{ /// max length to store stuff read const unsigned MAXLINELENGTH=1024; //@} - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string //----------------------------------------------------------------------------- #include using namespace std; - -//----------------------------------------------------------------------------- -// eoPersistent -//----------------------------------------------------------------------------- -/** + +//----------------------------------------------------------------------------- +// eoPersistent +//----------------------------------------------------------------------------- +/** An persistent object that knows how to write (through functions inherited from -#eoPrintable#) and read itself - */ -class eoPersistent: public eoPrintable -{ - public: - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoPersistent() {} - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) = 0; - -}; +#eoPrintable#) and read itself + */ +class eoPersistent: public eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPersistent() {} + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) = 0; + +}; //----------------------------------------------------------------------------- ///Standard input for all objects in the EO hierarchy istream & operator >> ( istream& _is, eoPersistent& _o ); - -#endif EOOBJECT_H + +#endif EOOBJECT_H diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index bd1c3390b..89c5c2ff0 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -3,145 +3,145 @@ //----------------------------------------------------------------------------- // eoPop.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- -#ifndef _EOPOP_H -#define _EOPOP_H - -#include -#include - -using namespace std; -// from file - +#ifndef _EOPOP_H +#define _EOPOP_H + +#include +#include + +using namespace std; +// from file + #include -#include - -/** Subpopulation: it is used to move parts of population - from one algorithm to another and one population to another. It is safer -to declare it as a separate object. I have no idea if a population can be -some other thing that a vector, but if somebody thinks of it, this concrete -implementation will be moved to "generic" and an abstract Population -interface will be provided. -It can be instantiated with anything, provided that it accepts a "size" and a -random generator in the ctor. This happens to all the eo1d chromosomes declared -so far. EOT must also have a copy ctor, since temporaries are created and copied -to the population. -@author Geneura Team -@version 0.0 -*/ - -template -class eoPop: public vector, public eoObject, public eoPersistent { - -/// Type is the type of each gene in the chromosome -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes - */ - eoPop() - :vector() {}; - - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; - +#include + +/** Subpopulation: it is used to move parts of population + from one algorithm to another and one population to another. It is safer +to declare it as a separate object. I have no idea if a population can be +some other thing that a vector, but if somebody thinks of it, this concrete +implementation will be moved to "generic" and an abstract Population +interface will be provided. +It can be instantiated with anything, provided that it accepts a "size" and a +random generator in the ctor. This happens to all the eo1d chromosomes declared +so far. EOT must also have a copy ctor, since temporaries are created and copied +to the population. +@author Geneura Team +@version 0.0 +*/ + +template +class eoPop: public vector, public eoObject, public eoPersistent { + +/// Type is the type of each gene in the chromosome +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop() + :vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + /** @name Methods from eoObject */ //@{ /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. * @param _is A istream. - + */ virtual void readFrom(istream& _is) { - while( _is ) { // reads line by line, and creates an object per - // line - char line[MAXLINELENGTH]; + while( _is ) { // reads line by line, and creates an object per + // line + char line[MAXLINELENGTH]; _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT( s ); + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); push_back( thisEOT ); - } - } - } - + } + } + } + /** * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. In this case, prints the population to - standard output. The EOT class must hav standard output with cout, - but since it should be an eoObject anyways, it's no big deal. + * @param _os A ostream. In this case, prints the population to + standard output. The EOT class must hav standard output with cout, + but since it should be an eoObject anyways, it's no big deal. */ virtual void printOn(ostream& _os) const { - copy( begin(), end(), ostream_iterator( _os, "\n") ); + copy( begin(), end(), ostream_iterator( _os, "\n") ); }; - /** Inherited from eoObject. Returns the class name. + /** Inherited from eoObject. Returns the class name. @see eoObject */ - string className() const {return "eoPop";}; + virtual string className() const {return "eoPop";}; //@} - - protected: - -}; -#endif + + protected: + +}; +#endif diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 7f39c2100..8e8177497 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -1,143 +1,143 @@ -// eoPopOps.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eo1d.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOPOPOPS_H -#define _EOPOPOPS_H - -using namespace std; - -/** -@author Geneura Team -@version 0.0 -*/ - -//----------------------------------------------------------------------------- -#include - -//----------------------------------------------------------------------------- -/** eoTransform is a class that transforms or does something on a population. - */ -template -class eoTransform: public eoObject{ - - public: - /** ctor */ - eoTransform() {}; - - /// Dtor - virtual ~eoTransform(){}; - - /// Pure virtual transformation function. Does something on the population - virtual void operator () ( eoPop& _pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoTransform";}; - //@} - -}; - -//----------------------------------------------------------------------------- - -/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ -template -class eoSelect: public eoObject{ - - public: - /** ctor - */ - eoSelect() {}; - - /// Dtor - virtual ~eoSelect(){}; - - /** Pure virtual transformation function. Extracts something from the parents, - and transfers it to the siblings - @param _parents the initial generation. Will be kept constant - @param _siblings the created offspring. Will be usually an empty population - */ - virtual void operator () ( const eoPop& _parents, eoPop& _siblings ) const = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoSelect";}; - //@} - -}; - -/** eoMerge involves three populations, that can be merged and transformed to -give a third -*/ -template -class eoMerge: public eoObject{ - - public: - /// (Default) Constructor. - eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} - - /// Dtor - virtual ~eoMerge() {} - - /** Pure virtual transformation function. Extracts something from breeders - * and transfers it to the pop - * @param breeders Tranformed individuals. - * @param pop The original population at the begining, the result at the end - */ - virtual void operator () ( eoPop& breeders, eoPop& pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - string className() const {return "eoMerge";}; - //@} - - /// Return the rate to be selected from the original population - float rate() const { return rep_rate; } - - /// Set the rate to be obtained after replacement. - /// @param _rate The rate. - void rate(const float& _rate) { rep_rate = _rate; } - - private: - float rep_rate; -}; - -//----------------------------------------------------------------------------- - -#endif +// eoPopOps.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eo1d.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPOPOPS_H +#define _EOPOPOPS_H + +using namespace std; + +/** +@author Geneura Team +@version 0.0 +*/ + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- +/** eoTransform is a class that transforms or does something on a population. + */ +template +class eoTransform: public eoObject{ + + public: + /** ctor */ + eoTransform() {}; + + /// Dtor + virtual ~eoTransform(){}; + + /// Pure virtual transformation function. Does something on the population + virtual void operator () ( eoPop& _pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoTransform";}; + //@} + +}; + +//----------------------------------------------------------------------------- + +/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ +template +class eoSelect: public eoObject{ + + public: + /** ctor + */ + eoSelect() {}; + + /// Dtor + virtual ~eoSelect(){}; + + /** Pure virtual transformation function. Extracts something from the parents, + and transfers it to the siblings + @param _parents the initial generation. Will be kept constant + @param _siblings the created offspring. Will be usually an empty population + */ + virtual void operator () ( const eoPop& _parents, eoPop& _siblings ) const = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoSelect";}; + //@} + +}; + +/** eoMerge involves three populations, that can be merged and transformed to +give a third +*/ +template +class eoMerge: public eoObject{ + + public: + /// (Default) Constructor. + eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} + + /// Dtor + virtual ~eoMerge() {} + + /** Pure virtual transformation function. Extracts something from breeders + * and transfers it to the pop + * @param breeders Tranformed individuals. + * @param pop The original population at the begining, the result at the end + */ + virtual void operator () ( eoPop& breeders, eoPop& pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoMerge";}; + //@} + + /// Return the rate to be selected from the original population + float rate() const { return rep_rate; } + + /// Set the rate to be obtained after replacement. + /// @param _rate The rate. + void rate(const float& _rate) { rep_rate = _rate; } + + private: + float rep_rate; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index dc761ebf6..9757d36c3 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -1,62 +1,62 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // eoPrintable.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPRINTABLE_H -#define EOPRINTABLE_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPRINTABLE_H +#define EOPRINTABLE_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string using namespace std; - -//----------------------------------------------------------------------------- -// eoPrintable -//----------------------------------------------------------------------------- -/** -Base class for objects that can print themselves + +//----------------------------------------------------------------------------- +// eoPrintable +//----------------------------------------------------------------------------- +/** +Base class for objects that can print themselves (#printOn#). Besides, this file defines the standard output for all the objects; if the objects define printOn there's no need to define #operator <<#.\\ This functionality was separated from eoObject, since it makes no sense to print -some objects (for instance, a #eoFactory# or a random number generator. - */ -class eoPrintable -{ - public: - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoPrintable() {} - - /** - * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const = 0; -}; - -//----------------------------------------------------------------------------- -///Standard output for all objects in the EO hierarchy -ostream & operator << ( ostream& _os, const eoPrintable& _o ); - -#endif EOPRINTABLE_H +some objects (for instance, a #eoFactory# or a random number generator. + */ +class eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPrintable() {} + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const = 0; +}; + +//----------------------------------------------------------------------------- +///Standard output for all objects in the EO hierarchy +ostream & operator << ( ostream& _os, const eoPrintable& _o ); + +#endif EOPRINTABLE_H diff --git a/eo/src/eoProblem.h b/eo/src/eoProblem.h index c8ab40449..892a14e48 100644 --- a/eo/src/eoProblem.h +++ b/eo/src/eoProblem.h @@ -1,40 +1,40 @@ -//----------------------------------------------------------------------------- -// eoProblem.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPROBLEM_H -#define EOPROBLEM_H - -//----------------------------------------------------------------------------- - -template class Problem -{ - public: - typedef T Chrom; - typedef typename T::Gene Gene; - typedef typename T::Fitness Fitness; - - virtual Fitness operator()(const Chrom& chrom) = 0; -}; - -//----------------------------------------------------------------------------- - -#endif EOPROBLEM_H +//----------------------------------------------------------------------------- +// eoProblem.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPROBLEM_H +#define EOPROBLEM_H + +//----------------------------------------------------------------------------- + +template class Problem +{ + public: + typedef T Chrom; + typedef typename T::Gene Gene; + typedef typename T::Fitness Fitness; + + virtual Fitness operator()(const Chrom& chrom) = 0; +}; + +//----------------------------------------------------------------------------- + +#endif EOPROBLEM_H diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index 0e4d93add..d34fa47d6 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoProportionalOpSel.h // (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef EOPROPORTIONALOPSEL_H @@ -90,6 +90,7 @@ public: for ( i=begin(), j=1; i!=end(); i++,j++ ) { if( j == _id ) erase( i ); + return; } if ( i == end() ) throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index 4233f8e4a..e5998f365 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -1,446 +1,449 @@ -/* -* Random number generator adapted from (see comments below) -* -* The random number generator is modified into a class -* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller -* transformation to generate normal deviates. -* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ - -// This is the ``Mersenne Twister'' random number generator MT19937, which -// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) -// starting from any odd seed in 0..(2^32 - 1). This version is a recode -// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by -// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in -// July-August 1997). -// -// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha -// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to -// generate 300 million random numbers; after recoding: 24.0 sec. for the same -// (i.e., 46.5% of original time), so speed is now about 12.5 million random -// number generations per second on this machine. -// -// According to the URL -// (and paraphrasing a bit in places), the Mersenne Twister is ``designed -// with consideration of the flaws of various existing generators,'' has -// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally -// equidistributed, and ``has passed many stringent tests, including the -// die-hard test of G. Marsaglia and the load test of P. Hellekalek and -// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 -// to 5012 bytes of static data, depending on data type sizes, and the code -// is quite short as well). It generates random numbers in batches of 624 -// at a time, so the caching and pipelining of modern systems is exploited. -// It is also divide- and mod-free. -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Library General Public License as published by -// the Free Software Foundation (either version 2 of the License or, at your -// option, any later version). This library is distributed in the hope that -// it will be useful, but WITHOUT ANY WARRANTY, without even the implied -// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU Library General Public License for more details. You should have -// received a copy of the GNU Library General Public License along with this -// library; if not, write to the Free Software Foundation, Inc., 59 Temple -// Place, Suite 330, Boston, MA 02111-1307, USA. -// -// The code as Shawn received it included the following notice: -// -// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When -// you use this, send an e-mail to with -// an appropriate reference to your work. -// -// It would be nice to CC: when you write. -// - -// -// uint32 must be an unsigned integer type capable of holding at least 32 -// bits; exactly 32 should be fastest, but 64 is better on an Alpha with -// GCC at -O3 optimization so try your options and see what's best for you -// - -/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ - - -#ifndef EO_RANDOM_NUMBER_GENERATOR -#define EO_RANDOM_NUMBER_GENERATOR - -#include -#include - -// TODO: check for various compilers if this is exactly 32 bits -// Unfortunately MSVC's preprocessor does not comprehends sizeof() -// so neat preprocessing tricks will not work - -typedef unsigned long uint32; // Compiler and platform dependent! - -//----------------------------------------------------------------------------- -// eoRng -//----------------------------------------------------------------------------- -/** -eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 -for generating random numbers. The various member functions implement useful functions -for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). - -Note for people porting EO to other platforms: please make sure that the typedef -uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not -shorter. If it is longer, file compatibility between EO on different platforms -may be broken. -*/ -class eoRng : public eoObject, public eoPersistent -{ -public : - /** - ctor takes a seed not unintentionally defaulted at 42. - */ - eoRng(uint32 s = 42U) : state(0), next(0), left(-1), cached(false) - { - state = new uint32[N+1]; - initialize(s); - } - - ~eoRng(void) - { - delete [] state; - } - - /** - Re-initializes the Random Number Generator. - */ - void reseed(uint32 s) - { - initialize(s); - } - - /** - uniform(m = 1.0) returns a random double in the range [0, m) - */ - double uniform(double m = 1.0) - { // random number between [0, m] - return m * double(rand()) / double(rand_max()); - } - - /** - random() returns a random integer in the range [0, m) - */ - uint32 random(uint32 m) - { - return uint32(uniform() * double(m)); - } - - /** - flip() tosses a biased coin such that flip(x/100.0) will - returns true x% of the time - */ - bool flip(float bias) - { - return uniform() < bias; - } - - /** - normal() zero mean gaussian deviate with standard deviation of 1 - */ - double normal(void); // gaussian mutation, stdev 1 - - /** - normal(stdev) zero mean gaussian deviate with user defined standard deviation - */ - double normal(double stdev) - { - return stdev * normal(); - } - - /** - normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation - */ - double normal(double mean, double stdev) - { - return mean + normal(stdev); - } - - /** - rand() returns a random number in the range [0, rand_max) - */ - uint32 rand(); - - /** - rand_max() the maximum returned by rand() - */ - uint32 rand_max(void) const { return (uint32) 0xffffffff; } - - /** - roulette_wheel(vec, total = 0) does a roulette wheel selection - on the input vector vec. If the total is not supplied, it is - calculated. It returns an integer denoting the selected argument. - */ - template - int roulette_wheel(const std::vector& vec, T total = 0) - { - if (total == 0) - { // count - for (int i = 0; i < vec.size(); ++i) - total += vec[i]; - } - - float change = uniform() * total; - - int i = 0; - - while (change > 0) - { - change -= vec[i++]; - } - - return --i; - } - - /// - void printOn(ostream& _os) const - { - for (int i = 0; i < N; ++i) - { - _os << state[i] << ' '; - } - _os << int(next - state) << ' '; - _os << left << ' ' << cached << ' ' << cacheValue; - } - - /// - void readFrom(istream& _is) - { - for (int i = 0; i < N; ++i) - { - _is >> state[i]; - } - - int n; - _is >> n; - next = state + n; - - _is >> left; - _is >> cached; - _is >> cacheValue; - } - - -private : - uint32 restart(void); - void initialize(uint32 seed); - - uint32* state; // the array for the state - uint32* next; - int left; - - bool cached; - float cacheValue; - - static const int N; - static const int M; - static const uint32 K; // a magic constant - -}; - -// Initialization of statics -const int eoRng::N = 624; -const int eoRng::M = 397; -const uint32 eoRng::K = (0x9908B0DFU); // a magic constant - -/** - The one and only global eoRng object -*/ -static eoRng rng; - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -// Implementation of some eoRng members.... Don't mind the mess, it does work. - - -#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u -#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u -#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u -#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v - -inline void eoRng::initialize(uint32 seed) - { - // - // We initialize state[0..(N-1)] via the generator - // - // x_new = (69069 * x_old) mod 2^32 - // - // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's - // _The Art of Computer Programming_, Volume 2, 3rd ed. - // - // Notes (SJC): I do not know what the initial state requirements - // of the Mersenne Twister are, but it seems this seeding generator - // could be better. It achieves the maximum period for its modulus - // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if - // x_initial can be even, you have sequences like 0, 0, 0, ...; - // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, - // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. - // - // Even if x_initial is odd, if x_initial is 1 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 0, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , - // ... - // - // and if x_initial is 3 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 1, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , - // ... - // - // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is - // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It - // also does well in the dimension 2..5 spectral tests, but it could be - // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). - // - // Note that the random number user does not see the values generated - // here directly since restart() will always munge them first, so maybe - // none of all of this matters. In fact, the seed values made here could - // even be extra-special desirable if the Mersenne Twister theory says - // so-- that's why the only change I made is to restrict to odd seeds. - // - - left = -1; - - register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; - register int j; - - for(left=0, *s++=x, j=N; --j; - *s++ = (x*=69069U) & 0xFFFFFFFFU); - } - - -inline uint32 eoRng::restart(void) -{ - register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; - register int j; - - left=N-1, next=state+1; - - for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - for(pM=state, j=M; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - s1 ^= (s1 >> 11); - s1 ^= (s1 << 7) & 0x9D2C5680U; - s1 ^= (s1 << 15) & 0xEFC60000U; - return(s1 ^ (s1 >> 18)); -} - - -inline uint32 eoRng::rand(void) - { - uint32 y; - - if(--left < 0) - return(restart()); - - y = *next++; - y ^= (y >> 11); - y ^= (y << 7) & 0x9D2C5680U; - y ^= (y << 15) & 0xEFC60000U; - return(y ^ (y >> 18)); - } - -inline double eoRng::normal(void) -{ - if (cached) - { - cached = false; - return cacheValue; - } - - float rSquare, factor, var1, var2; - - do - { - var1 = 2.0 * uniform() - 1.0; - var2 = 2.0 * uniform() - 1.0; - - rSquare = var1 * var1 + var2 * var2; - } - while (rSquare >= 1.0 || rSquare == 0.0); - - factor = sqrt(-2.0 * log(rSquare) / rSquare); - - cacheValue = var1 * factor; - cached = true; - - return (var2 * factor); -} - -#endif +/* +* Random number generator adapted from (see comments below) +* +* The random number generator is modified into a class +* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +* transformation to generate normal deviates. +* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ + +// This is the ``Mersenne Twister'' random number generator MT19937, which +// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) +// starting from any odd seed in 0..(2^32 - 1). This version is a recode +// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by +// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in +// July-August 1997). +// +// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +// generate 300 million random numbers; after recoding: 24.0 sec. for the same +// (i.e., 46.5% of original time), so speed is now about 12.5 million random +// number generations per second on this machine. +// +// According to the URL +// (and paraphrasing a bit in places), the Mersenne Twister is ``designed +// with consideration of the flaws of various existing generators,'' has +// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally +// equidistributed, and ``has passed many stringent tests, including the +// die-hard test of G. Marsaglia and the load test of P. Hellekalek and +// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 +// to 5012 bytes of static data, depending on data type sizes, and the code +// is quite short as well). It generates random numbers in batches of 624 +// at a time, so the caching and pipelining of modern systems is exploited. +// It is also divide- and mod-free. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Library General Public License as published by +// the Free Software Foundation (either version 2 of the License or, at your +// option, any later version). This library is distributed in the hope that +// it will be useful, but WITHOUT ANY WARRANTY, without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU Library General Public License for more details. You should have +// received a copy of the GNU Library General Public License along with this +// library; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307, USA. +// +// The code as Shawn received it included the following notice: +// +// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When +// you use this, send an e-mail to with +// an appropriate reference to your work. +// +// It would be nice to CC: when you write. +// + +// +// uint32 must be an unsigned integer type capable of holding at least 32 +// bits; exactly 32 should be fastest, but 64 is better on an Alpha with +// GCC at -O3 optimization so try your options and see what's best for you +// + +/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ + + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + +#include + +#include +#include + +// TODO: check for various compilers if this is exactly 32 bits +// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// so neat preprocessing tricks will not work + +typedef unsigned long uint32; // Compiler and platform dependent! + +//----------------------------------------------------------------------------- +// eoRng +//----------------------------------------------------------------------------- +/** +eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +for generating random numbers. The various member functions implement useful functions +for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). + +Note for people porting EO to other platforms: please make sure that the typedef +uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not +shorter. If it is longer, file compatibility between EO on different platforms +may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + /** + ctor takes a random seed; if you want another seed, use reseed + @see reseed + */ + eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false) + { + state = new uint32[N+1]; + initialize(s); + } + + ~eoRng(void) + { + delete [] state; + } + + /** + Re-initializes the Random Number Generator. + */ + void reseed(uint32 s) + { + initialize(s); + } + + /** + uniform(m = 1.0) returns a random double in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(rand_max()); + } + + /** + random() returns a random integer in the range [0, m) + */ + uint32 random(uint32 m) + { + return uint32(uniform() * double(m)); + } + + /** + flip() tosses a biased coin such that flip(x/100.0) will + returns true x% of the time + */ + bool flip(float bias) + { + return uniform() < bias; + } + + /** + normal() zero mean gaussian deviate with standard deviation of 1 + */ + double normal(void); // gaussian mutation, stdev 1 + + /** + normal(stdev) zero mean gaussian deviate with user defined standard deviation + */ + double normal(double stdev) + { + return stdev * normal(); + } + + /** + normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation + */ + double normal(double mean, double stdev) + { + return mean + normal(stdev); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32 rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32 rand_max(void) const { return (uint32) 0xffffffff; } + + /** + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, T total = 0) + { + if (total == 0) + { // count + for (int i = 0; i < vec.size(); ++i) + total += vec[i]; + } + + float change = uniform() * total; + + int i = 0; + + while (change > 0) + { + change -= vec[i++]; + } + + return --i; + } + + /// + void printOn(ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /// + void readFrom(istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + +private : + uint32 restart(void); + void initialize(uint32 seed); + + uint32* state; // the array for the state + uint32* next; + int left; + + bool cached; + float cacheValue; + + static const int N; + static const int M; + static const uint32 K; // a magic constant + +}; + +// Initialization of statics +const int eoRng::N = 624; +const int eoRng::M = 397; +const uint32 eoRng::K = (0x9908B0DFU); // a magic constant + +/** + The one and only global eoRng object +*/ +static eoRng rng; + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + +inline void eoRng::initialize(uint32 seed) + { + // + // We initialize state[0..(N-1)] via the generator + // + // x_new = (69069 * x_old) mod 2^32 + // + // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's + // _The Art of Computer Programming_, Volume 2, 3rd ed. + // + // Notes (SJC): I do not know what the initial state requirements + // of the Mersenne Twister are, but it seems this seeding generator + // could be better. It achieves the maximum period for its modulus + // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if + // x_initial can be even, you have sequences like 0, 0, 0, ...; + // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, + // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. + // + // Even if x_initial is odd, if x_initial is 1 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 0, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + // ... + // + // and if x_initial is 3 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 1, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + // ... + // + // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is + // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It + // also does well in the dimension 2..5 spectral tests, but it could be + // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + // + // Note that the random number user does not see the values generated + // here directly since restart() will always munge them first, so maybe + // none of all of this matters. In fact, the seed values made here could + // even be extra-special desirable if the Mersenne Twister theory says + // so-- that's why the only change I made is to restrict to odd seeds. + // + + left = -1; + + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU); + } + + +inline uint32 eoRng::restart(void) +{ + register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + +inline uint32 eoRng::rand(void) + { + uint32 y; + + if(--left < 0) + return(restart()); + + y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); + } + +inline double eoRng::normal(void) +{ + if (cached) + { + cached = false; + return cacheValue; + } + + float rSquare, factor, var1, var2; + + do + { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + + rSquare = var1 * var1 + var2 * var2; + } + while (rSquare >= 1.0 || rSquare == 0.0); + + factor = sqrt(-2.0 * log(rSquare) / rSquare); + + cacheValue = var1 * factor; + cached = true; + + return (var2 * factor); +} + +#endif diff --git a/eo/src/eoRnd.h b/eo/src/eoRnd.h index 84a4a66a9..76e40324e 100644 --- a/eo/src/eoRnd.h +++ b/eo/src/eoRnd.h @@ -1,99 +1,99 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoRnd.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EORND_H -#define _EORND_H - -//----------------------------------------------------------------------------- - -#include - -//----------------------------------------------------------------------------- -// Class eoRnd -//----------------------------------------------------------------------------- - -#include // srand -#include // time -#include // runtime_error +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRnd.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EORND_H +#define _EORND_H + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +// Class eoRnd +//----------------------------------------------------------------------------- + +#include // srand +#include // time +#include // runtime_error //----------------------------------------------------------------------------- #include -//----------------------------------------------------------------------------- -/** - * Base class for a family of random number generators. Generates numbers - * according to the parameters given in the constructor. Uses the machine's - * own random number generators. Which is not too good, after all. - */ -template -class eoRnd: public eoObject, public eoPersistent -{ -public: - - /// default constructor +//----------------------------------------------------------------------------- +/** + * Base class for a family of random number generators. Generates numbers + * according to the parameters given in the constructor. Uses the machine's + * own random number generators. Which is not too good, after all. + */ +template +class eoRnd: public eoObject, public eoPersistent +{ +public: + + /// default constructor eoRnd(unsigned _seed = 0) { if ( !started ) { srand(_seed?_seed:time(0)); started = true; } - } - - /// Copy cotor - eoRnd(const eoRnd& _r ) {srand(time(0));}; - + } + + /// Copy cotor + eoRnd(const eoRnd& _r ) {srand(time(0));}; + /** Main function: random generators act as functors, that return random numbers. It´s non-const because it might modify a seed @return return a random number - */ - virtual T operator()() = 0; - + */ + virtual T operator()() = 0; + /** Return the class id. - @return the class name as a string - */ - virtual string className() const { return "eoRandom"; }; - - /** - * Read object. - * @param is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is); - - /** - * print object. Prints just the ID, since the seed is not accesible. - * @param is A ostream. - */ + @return the class name as a string + */ + virtual string className() const { return "eoRandom"; }; + + /** + * Read object. + * @param is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is); + + /** + * print object. Prints just the ID, since the seed is not accesible. + * @param is A ostream. + */ void printOn(ostream& _os) const { _os << endl; }; private: /// true if the RNG has been started already. If it starts every time, means trouble. - static bool started; + static bool started; }; -template bool eoRnd::started = false; - +template bool eoRnd::started = false; + //-------------------------------------------------------------------------- @@ -110,5 +110,5 @@ void eoRnd::readFrom(istream& _is) { _is >> seed; srand(seed); } - -#endif + +#endif diff --git a/eo/src/eoString.h b/eo/src/eoString.h index f2e60f451..548d4c354 100644 --- a/eo/src/eoString.h +++ b/eo/src/eoString.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoString.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _eoString_H @@ -83,7 +83,7 @@ public: /** methods that implement the eo1d protocol @exception out_of_range if _i is larger than EO´s size */ - virtual char gene( unsigned _i ) const { + virtual char getGene( unsigned _i ) const { if ( _i >= length() ) throw out_of_range( "out_of_range when reading gene"); return (*this)[_i]; @@ -92,10 +92,10 @@ public: /** methods that implement the eo1d protocol @exception out_of_range if _i is larger than EO´s size */ - virtual char& gene( unsigned _i ) { + virtual void setGene( unsigned _i, const char& _value ) { if ( _i >= size() ) throw out_of_range( "out_of_range when writing a gene"); - return (*this)[_i]; + (*this)[_i] = _value; }; /** Inserts a value after _i, displacing anything to the right @@ -130,7 +130,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoString";}; + virtual string className() const {return "eoString";}; //@} diff --git a/eo/src/eoStringMutation.h b/eo/src/eoStringMutation.h new file mode 100644 index 000000000..5cebc8ebc --- /dev/null +++ b/eo/src/eoStringMutation.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStringMutation.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOSTRINGMUTATION_H +#define _EOSRTINGMUTATION_H + +#include +// EO includes +#include +#include +#include + +/** Mutation of an eoString. + The eoString's genes are changed by adding or substracting 1 to +*/ + +template +class eoStringMutation: public eoMutation { + public: + + /// + eoStringMutation(const double _rate=0.0) : eoMutation< EOT >(_rate) {}; + + /// + virtual ~eoStringMutation() {}; + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoStringMutation";}; + //@} + + + private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. + virtual void applyAt( EOT& _eo, unsigned _i ) const { + eoUniform uniform( 0, 1 ); + if( rate < uniform() ) { + _eo.gene(_i) += ( uniform()>=0.5 )? (1) : (-1) ; + } + } + +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoTranspose.h b/eo/src/eoTranspose.h index 2987fca0a..a46b8328b 100644 --- a/eo/src/eoTranspose.h +++ b/eo/src/eoTranspose.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoTranspose.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOTRANSPOSE_h diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index fd9946bd5..b825d9ab1 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -1,71 +1,71 @@ -// eoUniform.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// EOUniform.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOUNIFORM_H -#define _EOUNIFORM_H - -//----------------------------------------------------------------------------- - -#include -#include - -//----------------------------------------------------------------------------- -// Class eoUniform -//----------------------------------------------------------------------------- - -/// Generates uniform random number over the interval [min, max) -template -class eoUniform: public eoRnd -{ - public: - /** - * Default constructor. - * @param _min The minimum value in the interval. - * @param _max The maximum value in the interval. - */ - eoUniform(T _min = 0, T _max = 1) - : eoRnd(), min(_min), diff(_max - _min) {} - - /** - * copy constructor. - * @param _rnd the other rnd - */ - eoUniform( const eoUniform& _rnd) - : eoRnd( _rnd), min(_rnd.minim), diff(_rnd.diff) {} - - /** Returns an uniform random number over the interval [min, max) - Uses global rng object */ - virtual T operator()() { - return min + T( rng.uniform( diff ) ); - } - - private: - T min; - double diff; -}; - -//----------------------------------------------------------------------------- - -#endif +// eoUniform.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EOUniform.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOUNIFORM_H +#define _EOUNIFORM_H + +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- +// Class eoUniform +//----------------------------------------------------------------------------- + +/// Generates uniform random number over the interval [min, max) +template +class eoUniform: public eoRnd +{ + public: + /** + * Default constructor. + * @param _min The minimum value in the interval. + * @param _max The maximum value in the interval. + */ + eoUniform(T _min = 0, T _max = 1) + : eoRnd(), min(_min), diff(_max - _min) {} + + /** + * copy constructor. + * @param _rnd the other rnd + */ + eoUniform( const eoUniform& _rnd) + : eoRnd( _rnd), min(_rnd.minim), diff(_rnd.diff) {} + + /** Returns an uniform random number over the interval [min, max) + Uses global rng object */ + virtual T operator()() { + return min + T( rng.uniform( diff ) ); + } + + private: + T min; + double diff; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index f116608c7..4a0a7e6f7 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -1,169 +1,169 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoVector.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eoVector_H -#define _eoVector_H - -// STL libraries -#include // For vector -#include -#include - -#include -#include - -/** Adaptor that turns an STL vector into an EO - with the same gene type as the type with which - the vector has been instantiated -*/ -template -class eoVector: public eo1d, public vector { -public: - typedef T Type ; - - /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator - //@{ - - /** Ctor. - @param _size Lineal length of the object - @param _val Common initial value - */ - eoVector( unsigned _size = 0, T _val = 0) - : eo1d(), vector( _size, _val ){ }; - - /** Ctor using a random number generator - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called - */ - eoVector( unsigned _size, eoRnd& _rnd ); - - /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, -which is supposed to be dynamic and dependent on environment. - @param _is the input stream; should have all values in a single line, separated by whitespace - */ - eoVector( istream& _is); - - - /// copy ctor - eoVector( const eoVector & _eo ) - : eo1d( _eo ), vector( _eo ){ }; - - /// Assignment operator - const eoVector& operator =( const eoVector & _eo ) { - if ( this != &_eo ){ - eo1d::operator=( _eo ); - vector::operator=( _eo ); - } - return *this; - } - - /// dtor - virtual ~eoVector() {}; - - //@} - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual T getGene( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading gene"); - return (*this)[_i]; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void setGene( unsigned _i, const T& _value ) { - if ( _i >= size() ) - throw out_of_range( "out_of_range when writing a gene"); - (*this)[_i] = _value; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void insertGene( unsigned _i, T _val ) { - if (_i <= size() ) { - vector::iterator i = begin()+_i; - insert( i, _val ); - } else { - throw out_of_range( "out_of_range when inserting a gene"); - } - }; - - /** Eliminates the gene at position _i - @exception out_of_range if _i is larger than EO´s size - */ - virtual void deleteGene( unsigned _i ) { - if (_i < this->size() ) { - vector::iterator i = this->begin()+_i; - this->erase( i ); - } else { - throw out_of_range( "out_of_range when deleting a gene"); - }; - }; - - /// methods that implement the EO protocol - virtual unsigned length() const { return this->size(); }; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoVector";}; - //@} - -}; - - -//____________________________ Some method implementation _______________________ - -// Ctors______________________________________________________________________________ -//____________________________________________________________________________________ -template -eoVector::eoVector( unsigned _size, eoRnd& _rnd ) - : eo1d(), vector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - *i = _rnd(); - } -}; - -//____________________________________________________________________________________ -template -eoVector::eoVector( istream& _is) - : eo1d(), vector( ){ - while (_is ) { - T tmp; - _is >> tmp; - push_back( tmp ); - } - -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVector.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoVector_H +#define _eoVector_H + +// STL libraries +#include // For vector +#include +#include + +#include +#include + +/** Adaptor that turns an STL vector into an EO + with the same gene type as the type with which + the vector has been instantiated +*/ +template +class eoVector: public eo1d, public vector { +public: + typedef T Type ; + + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + + /** Ctor. + @param _size Lineal length of the object + @param _val Common initial value + */ + eoVector( unsigned _size = 0, T _val = 0) + : eo1d(), vector( _size, _val ){ }; + + /** Ctor using a random number generator + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called + */ + eoVector( unsigned _size, eoRnd& _rnd ); + + /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, +which is supposed to be dynamic and dependent on environment. + @param _is the input stream; should have all values in a single line, separated by whitespace + */ + eoVector( istream& _is); + + + /// copy ctor + eoVector( const eoVector & _eo ) + : eo1d( _eo ), vector( _eo ){ }; + + /// Assignment operator + const eoVector& operator =( const eoVector & _eo ) { + if ( this != &_eo ){ + eo1d::operator=( _eo ); + vector::operator=( _eo ); + } + return *this; + } + + /// dtor + virtual ~eoVector() {}; + + //@} + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual T getGene( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void setGene( unsigned _i, const T& _value ) { + if ( _i >= size() ) + throw out_of_range( "out_of_range when writing a gene"); + (*this)[_i] = _value; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void insertGene( unsigned _i, T _val ) { + if (_i <= size() ) { + vector::iterator i = begin()+_i; + insert( i, _val ); + } else { + throw out_of_range( "out_of_range when inserting a gene"); + } + }; + + /** Eliminates the gene at position _i + @exception out_of_range if _i is larger than EO´s size + */ + virtual void deleteGene( unsigned _i ) { + if (_i < this->size() ) { + vector::iterator i = this->begin()+_i; + this->erase( i ); + } else { + throw out_of_range( "out_of_range when deleting a gene"); + }; + }; + + /// methods that implement the EO protocol + virtual unsigned length() const { return this->size(); }; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoVector";}; + //@} + +}; + + +//____________________________ Some method implementation _______________________ + +// Ctors______________________________________________________________________________ +//____________________________________________________________________________________ +template +eoVector::eoVector( unsigned _size, eoRnd& _rnd ) + : eo1d(), vector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + *i = _rnd(); + } +}; + +//____________________________________________________________________________________ +template +eoVector::eoVector( istream& _is) + : eo1d(), vector( ){ + while (_is ) { + T tmp; + _is >> tmp; + push_back( tmp ); + } + +}; + +#endif diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h index 9361f91ec..ddb6c41cb 100644 --- a/eo/src/eoXOver2.h +++ b/eo/src/eoXOver2.h @@ -3,23 +3,23 @@ //----------------------------------------------------------------------------- // eoXOver2.h // (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef _EOXOVER2_h @@ -103,4 +103,4 @@ private: }; -#endif +#endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 3833080a7..b83574807 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,28 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps + +############################################################################### + +t_eoAtomOps_SOURCES = t-eoAtomOps.cpp +t_eoAtomOps_DEPENDENCIES = $(DEPS) +t_eoAtomOps_LDFLAGS = -lm +t_eoAtomOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoESOps_SOURCES = t-eoESOps.cpp +t_eoESOps_DEPENDENCIES = $(DEPS) +t_eoESOps_LDFLAGS = -lm +t_eoESOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +t_eoESFull_DEPENDENCIES = $(DEPS) +t_eoESFull_LDFLAGS = -lm +t_eoESFull_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 44669bf6b..67ed6e7d8 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4a from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -49,9 +49,10 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -86,7 +87,28 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps + +############################################################################### + +t_eoAtomOps_SOURCES = t-eoAtomOps.cpp +t_eoAtomOps_DEPENDENCIES = $(DEPS) +t_eoAtomOps_LDFLAGS = -lm +t_eoAtomOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoESOps_SOURCES = t-eoESOps.cpp +t_eoESOps_DEPENDENCIES = $(DEPS) +t_eoESOps_LDFLAGS = -lm +t_eoESOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +t_eoESFull_DEPENDENCIES = $(DEPS) +t_eoESFull_LDFLAGS = -lm +t_eoESFull_LDADD = $(LDADDS) ############################################################################### @@ -216,6 +238,9 @@ t_eoNonUniform_OBJECTS = t-eoNonUniform.o t_eoUniform_OBJECTS = t-eoUniform.o t_eoRandom_OBJECTS = t-eoRandom.o t_parser_OBJECTS = t-parser.o +t_eoESFull_OBJECTS = t-eoESFull.o +t_eoESOps_OBJECTS = t-eoESOps.o +t_eoAtomOps_OBJECTS = t-eoAtomOps.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -233,21 +258,16 @@ 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-eoEasyEA.P \ -.deps/t-eoNonUniform.P .deps/t-eoRandom.P .deps/t-eoUniform.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 -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) -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) +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) +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) 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 test/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -261,6 +281,9 @@ distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: +.c.o: + $(COMPILE) -c $< + .s.o: $(COMPILE) -c $< @@ -277,6 +300,9 @@ distclean-compile: maintainer-clean-compile: +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< @@ -352,6 +378,18 @@ t-eoRandom: $(t_eoRandom_OBJECTS) $(t_eoRandom_DEPENDENCIES) t-parser: $(t_parser_OBJECTS) $(t_parser_DEPENDENCIES) @rm -f t-parser $(CXXLINK) $(t_parser_LDFLAGS) $(t_parser_OBJECTS) $(t_parser_LDADD) $(LIBS) + +t-eoESFull: $(t_eoESFull_OBJECTS) $(t_eoESFull_DEPENDENCIES) + @rm -f t-eoESFull + $(CXXLINK) $(t_eoESFull_LDFLAGS) $(t_eoESFull_OBJECTS) $(t_eoESFull_LDADD) $(LIBS) + +t-eoESOps: $(t_eoESOps_OBJECTS) $(t_eoESOps_DEPENDENCIES) + @rm -f t-eoESOps + $(CXXLINK) $(t_eoESOps_LDFLAGS) $(t_eoESOps_OBJECTS) $(t_eoESOps_LDADD) $(LIBS) + +t-eoAtomOps: $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_DEPENDENCIES) + @rm -f t-eoAtomOps + $(CXXLINK) $(t_eoAtomOps_LDFLAGS) $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: @@ -395,91 +433,16 @@ 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 $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$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: @@ -502,7 +465,7 @@ uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install installdirs: @@ -516,27 +479,27 @@ distclean-generic: maintainer-clean-generic: mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ + mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ - clean-depend clean-generic mostlyclean-am + clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-noinstPROGRAMS distclean-compile \ - distclean-libtool distclean-tags distclean-depend \ - distclean-generic clean-am + distclean-libtool distclean-tags 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-depend \ - maintainer-clean-generic distclean-am + maintainer-clean-tags 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." @@ -547,14 +510,12 @@ 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 \ -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 +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 ############################################################################### diff --git a/eo/test/real_value.h b/eo/test/real_value.h new file mode 100644 index 000000000..1822f2902 --- /dev/null +++ b/eo/test/real_value.h @@ -0,0 +1,23 @@ +#include + +//----------------------------------------------------------------------------- + +typedef vector Vec; + +/** Just a simple function that takes an eoVector and sets the fitnes + to -sphere (we'll see later how to minimize rather than maximize!) + @param _ind A floatingpoint vector +*/ +float the_real_value(Vec& _ind) +{ + double sum = 0; /* compute in double format, even if return a float */ + for (unsigned i = 0; i < _ind.size(); i++) + sum += _ind[i] * _ind[i]; + return -sum; +} + +typedef eoESFullChrom Ind; + +void real_value(Ind & _ind) { + _ind.fitness( the_real_value(_ind) ); +} diff --git a/eo/test/t-eoAtomOps.cpp b/eo/test/t-eoAtomOps.cpp new file mode 100644 index 000000000..03bb367d1 --- /dev/null +++ b/eo/test/t-eoAtomOps.cpp @@ -0,0 +1,33 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace std; + +// Operators we are going to test +#include +#include +#include +#include + +// Several EOs +#include + +main(int argc, char *argv[]) { + eoString aString("123456"); + eoAtomCreep creeper; + eoAtomMutation< eoString > mutator( creeper, 0.5 ); + + cout << "Before aString " << aString; + mutator( aString); + cout << " after mutator " << aString; + + return 0; // to avoid VC++ complaints +} + diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp new file mode 100644 index 000000000..71e573762 --- /dev/null +++ b/eo/test/t-eoESFull.cpp @@ -0,0 +1,107 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace std; + +// general +#include // though contained in all others! +// evolution specific +#include +//#include +//#include +// representation specific + +#include // though contained in following +//#include +//#include +//#include +// this fitness +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoESFullChrom Ind; + +main(int argc, char *argv[]) { +// unsigned mu, lambda; +// bool comma; + + // Create the command-line parser + Parser parser( argc, argv, "Basic EA for vector with adaptive mutations"); + + //reproducible random seed - thanks, Maarten + InitRandom(parser); + + // a first Ind, reading its parameters from the parser + // will be used later to inialize the whole population + Ind FirstEO(parser); + + // Evaluation + // here we should call some parser-based constructor, + // as many evaluation function need parameters + // and also have some preliminary stuffs to do + eoEvalFuncPtr eval( real_value ); + + /* + // Evolution and population parameters + eoScheme the_scheme(parser); + + // recombination and mutation operators, reading their parameters from the parser + eoESReco MyReco(parser, FirstEO); + eoESMutate MyMut(parser, FirstEO); + + // termination conditions read by the parser + eoTermVector the_terms(parser); + + // Initialization of the population + // shoudl be called using the parser, in case you want to read from file(s) + eoESRandomize randomize; // an eoESInd randomnizer + eoPop pop(the_scheme.PopSize(), FirstEO, randomize); + // eval(pop); // shoudl we call it from inside the constructor??? + + // ALL parmeters have been read: write them out + // Writing the parameters on arv[0].status + // but of course this can be modified - see the example parser.cpp + parser.outputParam(); + // except the help parameter??? + if( parser.getBool("-h" , "--help" , "Shows this help")) { + parser.printHelp(); + exit(1); + } + + unsigned i, iind; + + + cout << "Initial population: \n" << endl; + for (i = 0; i < pop.size(); ++i) { + eval(pop[i]); + cout << pop[i].fitness() << "\t" << pop[i] << endl; + } + + // the Operators + eoSequentialOpHolder seqholder; + // seqholder.addOp(MyReco, 1.0); + seqholder.addOp(MyMut, 1.0); + + // One generation + eoEvolStep evol_scheme(the_scheme, seqholder, eval); + + // the algorithm: + eoFullEA ea(evol_scheme, the_terms); + + ea(pop); + + cout << "Final population: \n" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i].fitness() << "\t" << pop[i] << endl; + */ + return 0; +} + diff --git a/eo/test/t-eoESOps.cpp b/eo/test/t-eoESOps.cpp new file mode 100644 index 000000000..253a830e5 --- /dev/null +++ b/eo/test/t-eoESOps.cpp @@ -0,0 +1,116 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace std; + +// general +#include // though contained in all others! +// evolution specific +#include +//#include +//#include +// representation specific + +#include // though contained in following +//#include +#include +//#include +// this fitness +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoESFullChrom Ind; + +main(int argc, char *argv[]) { + unsigned mu, lambda; + bool comma; + + // Create the command-line parser + Parser parser( argc, argv, "Basic EA for vector with adaptive mutations"); + + //reproducible random seed - thanks, Maarten + InitRandom(parser); + + // a first Ind, reading its parameters from the parser + // will be used later to inialize the whole population + Ind FirstEO(parser); + + // Evaluation + // here we should call some parser-based constructor, + // as many evaluation function need parameters + // and also have some preliminary stuffs to do + eoEvalFuncPtr eval( real_value ); + + // recombination and mutation operators, reading their parameters from the parser + eoESMutate MyMut(parser, + FirstEO.StdDevLength(), FirstEO.size(), + FirstEO.CorCffLength() ); + + cout << "First EO " << FirstEO << endl; + MyMut(FirstEO); + cout << "First EO mutated" << FirstEO << endl; + + /* + // Evolution and population parameters + eoScheme the_scheme(parser); + + // recombination and mutation operators, reading their parameters from the parser + eoESReco MyReco(parser, FirstEO); + eoESMutate MyMut(parser, FirstEO); + + // termination conditions read by the parser + eoTermVector the_terms(parser); + + // Initialization of the population + // shoudl be called using the parser, in case you want to read from file(s) + eoESRandomize randomize; // an eoESInd randomnizer + eoPop pop(the_scheme.PopSize(), FirstEO, randomize); + // eval(pop); // shoudl we call it from inside the constructor??? + + // ALL parmeters have been read: write them out + // Writing the parameters on arv[0].status + // but of course this can be modified - see the example parser.cpp + parser.outputParam(); + // except the help parameter??? + if( parser.getBool("-h" , "--help" , "Shows this help")) { + parser.printHelp(); + exit(1); + } + + unsigned i, iind; + + + cout << "Initial population: \n" << endl; + for (i = 0; i < pop.size(); ++i) { + eval(pop[i]); + cout << pop[i].fitness() << "\t" << pop[i] << endl; + } + + // the Operators + eoSequentialOpHolder seqholder; + // seqholder.addOp(MyReco, 1.0); + seqholder.addOp(MyMut, 1.0); + + // One generation + eoEvolStep evol_scheme(the_scheme, seqholder, eval); + + // the algorithm: + eoFullEA ea(evol_scheme, the_terms); + + ea(pop); + + cout << "Final population: \n" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i].fitness() << "\t" << pop[i] << endl; + return 0; + */ +} + diff --git a/eo/test/t-eoNonUniform.cpp b/eo/test/t-eoNonUniform.cpp index 352b229b2..647b78c92 100644 --- a/eo/test/t-eoNonUniform.cpp +++ b/eo/test/t-eoNonUniform.cpp @@ -1,31 +1,31 @@ -//----------------------------------------------------------------------------- -// t-eoNonUniform.cc -//----------------------------------------------------------------------------- - -#include -#include - -//----------------------------------------------------------------------------- - -main() -{ - eoNonUniform nu(1000); - - cout << "----------------------------------------------------------" << endl - << "nu.step() = " << nu.step() - << "\t nu.num_step() = " << nu.num_step() << endl - << "----------------------------------------------------------" << endl; - - eoLinear l1(0, 1, nu), l2(1, 0, nu); - eoNegExp2 n1(0.1, 8, nu), n2(0.75, 3, nu); - - for (; nu; ++nu) - { - cout << nu.step() - << "\t" << l1() << "\t" << l2() - << "\t" << n1() << "\t" << n2() - << endl; - } -} - -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eoNonUniform.cc +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- + +main() +{ + eoNonUniform nu(1000); + + cout << "----------------------------------------------------------" << endl + << "nu.step() = " << nu.step() + << "\t nu.num_step() = " << nu.num_step() << endl + << "----------------------------------------------------------" << endl; + + eoLinear l1(0, 1, nu), l2(1, 0, nu); + eoNegExp2 n1(0.1, 8, nu), n2(0.75, 3, nu); + + for (; nu; ++nu) + { + cout << nu.step() + << "\t" << l1() << "\t" << l2() + << "\t" << n1() << "\t" << n2() + << endl; + } +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 0923e8508..764b0dacb 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -1,28 +1,29 @@ -//----------------------------------------------------------------------------- -// t-eouniform -//----------------------------------------------------------------------------- - -#include // cout -#include // ostrstream, istrstream -#include // eoBin -#include -#include - -//----------------------------------------------------------------------------- - -main() { - eoNormal n1(-2.5,3.5); - eoNormal n2(0.003, 0.0005 ); - eoNormal n3( 10000000U, 10000U); - eoNegExp e1(3.5); - eoNegExp e2(0.003 ); - eoNegExp e3( 10000U); - cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; - for ( unsigned i = 0; i < 100; i ++) { - cout << n1() << "\t" << n2() << "\t" << n3() << "\t" << - e1() << "\t" << e2() << "\t" << e3() << endl; - } - -} - -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eouniform +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // eoBin +#include +#include + +//----------------------------------------------------------------------------- + +main() { + eoNormal n1(-2.5,3.5); + eoNormal n2(0.003, 0.0005 ); + eoNormal n3( 10000000U, 10000U); + eoNegExp e1(3.5); + eoNegExp e2(0.003 ); + eoNegExp e3( 10000U); + cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; + for ( unsigned i = 0; i < 100; i ++) { + cout << n1() << "\t" << n2() << "\t" << n3() << "\t" << + e1() << "\t" << e2() << "\t" << e3() << endl; + } + + return 0; // to avoid VC++ complaints +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoUniform.cpp b/eo/test/t-eoUniform.cpp index 1e1e9594d..5e14a7284 100644 --- a/eo/test/t-eoUniform.cpp +++ b/eo/test/t-eoUniform.cpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// t-eouniform -//----------------------------------------------------------------------------- - -#include // cout -#include // ostrstream, istrstream -#include // eoBin - -//----------------------------------------------------------------------------- - -main() { - eoUniform u1(-2.5,3.5); - eoUniform u2(0.003, 0 ); - eoUniform u3( 10000U, 10000000U); - cout << "u1\t\tu2\t\tu3" << endl; - for ( unsigned i = 0; i < 100; i ++) { - cout << u1() << "\t" << u2() << "\t" << u3() << endl; - } - -} - -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eouniform +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // eoBin + +//----------------------------------------------------------------------------- + +main() { + eoUniform u1(-2.5,3.5); + eoUniform u2(0.003, 0 ); + eoUniform u3( 10000U, 10000000U); + cout << "u1\t\tu2\t\tu3" << endl; + for ( unsigned i = 0; i < 100; i ++) { + cout << u1() << "\t" << u2() << "\t" << u3() << endl; + } + +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index 0e632bc8b..876aa94b1 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -1,71 +1,71 @@ -//----------------------------------------------------------------------------- -// t-eobreeder.cpp -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eobreeder.cpp +//----------------------------------------------------------------------------- // to avoid long name warnings #pragma warning(disable:4786) - -#include // eoBin, eoPop, eoBreeder + +#include // eoBin, eoPop, eoBreeder #include #include #include #include - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - unsigned i; - - eoUniform uniform(false, true); - eoBinRandom random; - eoPop pop; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - cout << "population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; - - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoProportionalOpSel propSel; - eoBreeder breeder( propSel ); - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - breeder(pop); - - // reevaluation of fitness - for_each(pop.begin(), pop.end(), binary_value); - - cout << "new population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; - - return 0; -} - -//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + breeder(pop); + + // reevaluation of fitness + for_each(pop.begin(), pop.end(), binary_value); + + cout << "new population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index a8604d245..f31616203 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -1,87 +1,87 @@ -//----------------------------------------------------------------------------- -// t-eofitness.cpp -// (c) GeNeura Team 1998 -//----------------------------------------------------------------------------- - -#include // time -#include // srand, rand -#include // cout -#include // eoFitness - -//----------------------------------------------------------------------------- - -class eoFloat: public eoFitness -{ -public: - eoFloat(const float x) { fitness = x; } - eoFloat(const int x) { fitness = static_cast(x); } - - bool operator<(const eoFitness& other) const - { - const eoFloat& x = (const eoFloat&) other; - return fitness < x.fitness; - } - - operator float() const - { - return fitness; - } - - void printOn(ostream& os) const - { - os << fitness; - } - - void readFrom(istream& is) - { - is >> fitness; - } - -private: - float fitness; -}; - -//----------------------------------------------------------------------------- - -main() -{ - srand(time(0)); - - eoFloat a = static_cast(rand()) / RAND_MAX, - b = static_cast(rand()) / RAND_MAX; - - cout.precision(2); - - unsigned repeat = 2; - while (repeat--) - { - cout << "------------------------------------------------------" << endl; - cout << "testing < "; - if (a < b) - cout << a << " < " << b << " is true" << endl; - else - cout << a << " < " << b << " is false" < "; - if (a > b) - cout << a << " > " << b << " is true" << endl; - else - cout << a << " > " << b << " is false" < // time +#include // srand, rand +#include // cout +#include // eoFitness + +//----------------------------------------------------------------------------- + +class eoFloat: public eoFitness +{ +public: + eoFloat(const float x) { fitness = x; } + eoFloat(const int x) { fitness = static_cast(x); } + + bool operator<(const eoFitness& other) const + { + const eoFloat& x = (const eoFloat&) other; + return fitness < x.fitness; + } + + operator float() const + { + return fitness; + } + + void printOn(ostream& os) const + { + os << fitness; + } + + void readFrom(istream& is) + { + is >> fitness; + } + +private: + float fitness; +}; + +//----------------------------------------------------------------------------- + +main() +{ + srand(time(0)); + + eoFloat a = static_cast(rand()) / RAND_MAX, + b = static_cast(rand()) / RAND_MAX; + + cout.precision(2); + + unsigned repeat = 2; + while (repeat--) + { + cout << "------------------------------------------------------" << endl; + cout << "testing < "; + if (a < b) + cout << a << " < " << b << " is true" << endl; + else + cout << a << " < " << b << " is false" < "; + if (a > b) + cout << a << " > " << b << " is true" << endl; + else + cout << a << " > " << b << " is false" < - -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 16; - unsigned i; - - eoUniform uniform(false, true); - eoBinRandom random; - eoPop pop; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - cout << "population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - - - // selection - eoLottery lottery; - - // breeder - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoProportionalOpSel propSel; - eoBreeder breeder( propSel ); - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - // replacement - eoInclusion inclusion; - - // Evaluation - eoEvalFuncPtr eval( binary_value ); - - // GA generation - eoGeneration generation(lottery, breeder, inclusion, eval); - - // evolution - unsigned g = 0; - do { - try - { - generation(pop); - } - catch (exception& e) - { - cout << "exception: " << e.what() << endl;; - exit(EXIT_FAILURE); - } - - cout << "pop[" << ++g << "]" << endl; - for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - - } while (pop[0].fitness() < pow(2.0, CHROM_SIZE) - 1); - - return 0; -} - -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eogeneration.cpp +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + + // selection + eoLottery lottery; + + // breeder + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + // replacement + eoInclusion inclusion; + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + + // GA generation + eoGeneration generation(lottery, breeder, inclusion, eval); + + // evolution + unsigned g = 0; + do { + try + { + generation(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop[" << ++g << "]" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + } while (pop[0].fitness() < pow(2.0, CHROM_SIZE) - 1); + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoinsertion.cpp b/eo/test/t-eoinsertion.cpp index c21c61d7c..cb590c262 100644 --- a/eo/test/t-eoinsertion.cpp +++ b/eo/test/t-eoinsertion.cpp @@ -1,108 +1,108 @@ -//----------------------------------------------------------------------------- -// t-eoinsertion.cpp -//----------------------------------------------------------------------------- - -#include // eoBin, eoPop, eoInsertion - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned CHROM_SIZE = 4; - unsigned i; - - eoUniform uniform(false, true); - eoBinRandom random; - - for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) - { - eoPop pop; - - for (i = 0; i < POP_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) - { - eoPop pop2, pop3, pop4, pop5, popx; - - for (i = 0; i < POP2_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop2.push_back(chrom); - } - - cout << "--------------------------------------------------" << endl - << "breeders \tpop" << endl - << "--------------------------------------------------" << endl; - for (i = 0; i < max(pop.size(), pop2.size()); i++) - { - if (pop.size() > i) - cout << pop[i] << " " << pop[i].fitness() << " \t"; - else - cout << "\t\t"; - if (pop2.size() > i) - cout << pop2[i] << " " << pop2[i].fitness(); - cout << endl; - } - - eoInsertion insertion(0.75); - popx = pop; - pop3 = pop2; - insertion(popx, pop3); - - eoInsertion insertion2; - popx = pop; - pop4 = pop2; - insertion2(popx, pop4); - - eoInsertion insertion3(1.5); - popx = pop; - pop5 = pop2; - insertion3(popx, pop5); - - cout << endl - << "0.75 \t\t1.0 \t\t1.5" << endl - << "---- \t\t--- \t\t---" << endl; - for (i = 0; i < pop5.size(); i++) - { - if (pop3.size() > i) - cout << pop3[i] << " " << pop3[i].fitness() << " \t"; - else - cout << " \t\t"; - if (pop4.size() > i) - cout << pop4[i] << " " << pop4[i].fitness() << " \t"; - else - cout << " \t\t"; - if (pop5.size() > i) - cout << pop5[i] << " " << pop5[i].fitness(); - cout << endl; - } - } - } - - return 0; -} - -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eoinsertion.cpp +//----------------------------------------------------------------------------- + +#include // eoBin, eoPop, eoInsertion + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + + for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) + { + eoPop pop; + + for (i = 0; i < POP_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) + { + eoPop pop2, pop3, pop4, pop5, popx; + + for (i = 0; i < POP2_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop2.push_back(chrom); + } + + cout << "--------------------------------------------------" << endl + << "breeders \tpop" << endl + << "--------------------------------------------------" << endl; + for (i = 0; i < max(pop.size(), pop2.size()); i++) + { + if (pop.size() > i) + cout << pop[i] << " " << pop[i].fitness() << " \t"; + else + cout << "\t\t"; + if (pop2.size() > i) + cout << pop2[i] << " " << pop2[i].fitness(); + cout << endl; + } + + eoInsertion insertion(0.75); + popx = pop; + pop3 = pop2; + insertion(popx, pop3); + + eoInsertion insertion2; + popx = pop; + pop4 = pop2; + insertion2(popx, pop4); + + eoInsertion insertion3(1.5); + popx = pop; + pop5 = pop2; + insertion3(popx, pop5); + + cout << endl + << "0.75 \t\t1.0 \t\t1.5" << endl + << "---- \t\t--- \t\t---" << endl; + for (i = 0; i < pop5.size(); i++) + { + if (pop3.size() > i) + cout << pop3[i] << " " << pop3[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop4.size() > i) + cout << pop4[i] << " " << pop4[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop5.size() > i) + cout << pop5[i] << " " << pop5[i].fitness(); + cout << endl; + } + } + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-parser.cpp b/eo/test/t-parser.cpp index 2980bb436..268f391c9 100644 --- a/eo/test/t-parser.cpp +++ b/eo/test/t-parser.cpp @@ -1,165 +1,133 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -/* parser.cpp - example of use of Parser.h - - (c) geneura team, 1999 ------------------------------------------------------------------------------*/ - -#include -#include -#include - -void GetOutputParam(Parser & parser, - string & _string) { - - try { - parser.AddTitle("Separate parameter: the output file name"); - _string = parser.getString("-O", "--OutputFile", "", "The output file name" ); - } catch (UException & e) { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } catch (exception & e) { - cout << e.what() << endl; - exit(1); - } -} - -void sub(Parser & parser) { - int i; - cout << "Function sub:" << endl; - - try { - parser.AddTitle("Private parameters of subroutine sub"); - i = parser.getInt("-j", "--sint", "5", "private integer of subroutine" ); - } catch (UException & e) { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } catch (exception & e) { - cout << e.what() << endl; - exit(1); - } - - cout << "Read " << i << endl; -} - - -/// Uses the parser and returns param values -void getParams( Parser & parser, - unsigned & _integer, - float & _floating, - string & _string, - vector & _array, - bool & _boolean) { - - try { - _integer = parser.getInt("-i", "--int", "2", "interger number" ); - _floating = parser.getFloat("-f", "--float", "0.2", "floating point number" ); - _string = parser.getString("-s", "--string", "string", "a string" ); - _array = parser.getArray("-a", "--array", "a b", "an array enclosed within < >" ); - _boolean = parser.getBool("-b","--bool", "a bool value" ); - } - catch (UException & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - catch (exception & e) - { - cout << e.what() << endl; - exit(1); - } - -} - -/// Uses the parser and returns param values -void InitRandom( Parser & parser) { - unsigned long _seed; - try { - _seed = parser.getUnsignedLong("-S", "--seed", "0", "Seed for Random number generator" ); - } - catch (UException & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - catch (exception & e) - { - cout << e.what() << endl; - exit(1); - } - if (_seed == 0) { // use clock to get a "random" seed - struct timeval tval; - struct timezone tzp; - - gettimeofday (&tval, &tzp); // time since midnight January 1, 1970. - _seed = tval.tv_usec ; // micro seconds - char s[32]; - sprintf(s,"%ld", _seed); - parser.setParamValue("--seed", s); // so it will be printed out in the status file, and canbe later re-used to re-run EXACTLY the same run - } - rng.reseed(_seed); - - return; -} - -int main( int argc, char* argv[]) { - - unsigned in; - float f; - string s; - vector a; - bool b; - - // Create the command-line parser - Parser parser( argc, argv, "Parser example"); - InitRandom(parser); - parser.AddTitle("General parameters"); - getParams(parser, in, f, s, a, b); - - cout << "\n integer: " << in << endl - << " float: "<< f << endl - << " string: /"<< s << "/" << endl - << " boolean: "<< b << endl - << " array: < "; - vector::const_iterator i; - for (i=a.begin() ; i" << endl << endl ; - - // call to the subroutine that also needs some parameters - sub(parser); - - // writing all parameters - // - // if programmer wishes, the name of the output file can be set as a parameter itself - // otherwise it will be argv[0].status - string OutputFileName; - GetOutputParam(parser, OutputFileName); - - parser.outputParam(OutputFileName); - if( parser.getBool("-h" , "--help" , "Shows this help")) { - parser.printHelp(); - exit(1); - } - - // but progrmamer should be careful to write the parser parameters - // after the last bit that uses it has finished - - - // Now the main body of the program - - for (int i=0; i<20; i++) { - cout << rng.normal() << endl; - } - cout << "C'est fini" << endl; - - return 0; -} - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +/* parser.cpp + example of use of Parser.h + + (c) geneura team, 1999 +-----------------------------------------------------------------------------*/ + +#include +#include +#include + +void GetOutputParam(Parser & parser, + string & _string) { + + try { + parser.AddTitle("Separate parameter: the output file name"); + _string = parser.getString("-O", "--OutputFile", "", "The output file name" ); + } catch (UException & e) { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } catch (exception & e) { + cout << e.what() << endl; + exit(1); + } +} + +void sub(Parser & parser) { + int i; + cout << "Function sub:" << endl; + + try { + parser.AddTitle("Private parameters of subroutine sub"); + i = parser.getInt("-j", "--sint", "5", "private integer of subroutine" ); + } catch (UException & e) { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } catch (exception & e) { + cout << e.what() << endl; + exit(1); + } + + cout << "Read " << i << endl; +} + + +/// Uses the parser and returns param values +void getParams( Parser & parser, + unsigned & _integer, + float & _floating, + string & _string, + vector & _array, + bool & _boolean) { + + try { + _integer = parser.getInt("-i", "--int", "2", "interger number" ); + _floating = parser.getFloat("-f", "--float", "0.2", "floating point number" ); + _string = parser.getString("-s", "--string", "string", "a string" ); + _array = parser.getArray("-a", "--array", "a b", "an array enclosed within < >" ); + _boolean = parser.getBool("-b","--bool", "a bool value" ); + } + catch (UException & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + catch (exception & e) + { + cout << e.what() << endl; + exit(1); + } + +} + +int main( int argc, char* argv[]) { + + unsigned in; + float f; + string s; + vector a; + bool b; + + // Create the command-line parser + Parser parser( argc, argv, "Parser example"); + InitRandom(parser); + parser.AddTitle("General parameters"); + getParams(parser, in, f, s, a, b); + + cout << "\n integer: " << in << endl + << " float: "<< f << endl + << " string: /"<< s << "/" << endl + << " boolean: "<< b << endl + << " array: < "; + vector::const_iterator i; + for (i=a.begin() ; i" << endl << endl ; + + // call to the subroutine that also needs some parameters + sub(parser); + + // writing all parameters + // + // if programmer wishes, the name of the output file can be set as a parameter itself + // otherwise it will be argv[0].status + string OutputFileName; + GetOutputParam(parser, OutputFileName); + + parser.outputParam(OutputFileName); + if( parser.getBool("-h" , "--help" , "Shows this help")) { + parser.printHelp(); + exit(1); + } + + // but progrmamer should be careful to write the parser parameters + // after the last bit that uses it has finished + + + // Now the main body of the program + + for (int i=0; i<20; i++) { + cout << rng.normal() << endl; + } + cout << "C'est fini" << endl; + + return 0; +} + diff --git a/eo/win/atomops.dsp b/eo/win/atomops.dsp new file mode 100644 index 000000000..7ca9d3b0b --- /dev/null +++ b/eo/win/atomops.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="atomops" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=atomops - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "atomops.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "atomops.mak" CFG="atomops - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "atomops - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "atomops - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "atomops - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "atomops - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "atomops___Win32_Debug" +# PROP BASE Intermediate_Dir "atomops___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "atomops___Win32_Debug" +# PROP Intermediate_Dir "atomops___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "atomops - Win32 Release" +# Name "atomops - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoAtomOps.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 55ad35260..c735f606b 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -63,8 +63,8 @@ LIB32=link.exe -lib # PROP Output_Dir "eo___Win32_Debug" # PROP Intermediate_Dir "eo___Win32_Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /d "_DEBUG" BSC32=bscmake.exe @@ -95,46 +95,6 @@ SOURCE=..\src\eoPrintable.cpp # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\EO.h -# End Source File -# Begin Source File - -SOURCE=..\src\eo1d.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoFitness.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoNegExp.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoNormal.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoObject.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoProblem.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoRnd.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoUniform.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoVector.h -# End Source File # End Group # End Target # End Project diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw new file mode 100644 index 000000000..176e89324 --- /dev/null +++ b/eo/win/eo.dsw @@ -0,0 +1,74 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "atomops"=".\atomops.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "eo"=".\eo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name random + End Project Dependency + Begin Project Dependency + Project_Dep_Name atomops + End Project Dependency + Begin Project Dependency + Project_Dep_Name esfull + End Project Dependency +}}} + +############################################################################### + +Project: "esfull"=".\esfull.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "random"=".\random.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/esfull.dsp b/eo/win/esfull.dsp new file mode 100644 index 000000000..f1b5bac36 --- /dev/null +++ b/eo/win/esfull.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="esfull" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=esfull - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "esfull.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "esfull.mak" CFG="esfull - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "esfull - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "esfull - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "esfull - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "esfull - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "esfull___Win32_Debug" +# PROP BASE Intermediate_Dir "esfull___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "esfull___Win32_Debug" +# PROP Intermediate_Dir "esfull___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "esfull - Win32 Release" +# Name "esfull - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESFull.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/random.dsp b/eo/win/random.dsp new file mode 100644 index 000000000..63fe9bb02 --- /dev/null +++ b/eo/win/random.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="random" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=random - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "random.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "random.mak" CFG="random - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "random - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "random - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "random - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "random - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "random___Win32_Debug" +# PROP BASE Intermediate_Dir "random___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "random___Win32_Debug" +# PROP Intermediate_Dir "random___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "random - Win32 Release" +# Name "random - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoRandom.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 91f5ddbdaadfd608ccad0ccfac798bc45343d841 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 22 Nov 1999 09:47:32 +0000 Subject: [PATCH 0071/2134] Added changes mainly by Marc --- eo/src/Makefile.am | 9 +- eo/src/eo | 7 +- eo/src/eoAtomBitFlip.h | 6 +- eo/src/eoBitOp.h | 651 ++++++++++++++++++------------------- eo/src/eoBreeder.h | 185 ++++++----- eo/src/eoDetTournament.h | 78 +++++ eo/src/eoESFullChrom.h | 6 +- eo/src/eoESFullMut.h | 486 +++++++++++++-------------- eo/src/eoEasyEA.h | 6 +- eo/src/eoEvalFunc.h | 2 +- eo/src/eoEvaluator.h | 72 ---- eo/src/eoGeneration.h | 160 ++++----- eo/src/eoInclusion.h | 25 +- eo/src/eoInsertion.h | 175 +++++----- eo/src/eoLottery.h | 25 +- eo/src/eoMerge.h | 115 +++++++ eo/src/eoMultiBinOp.h | 99 ++++++ eo/src/eoOp.h | 408 +++++++++++------------ eo/src/eoParser.h | 2 +- eo/src/eoPop.h | 291 ++++++++--------- eo/src/eoPopOps.h | 284 ++++++++-------- eo/src/eoScheme.h | 360 ++++++++++++++++++++ eo/src/eoSelfEval.h | 23 ++ eo/src/eoSimpleEval.h | 76 ----- eo/src/eoStochTournament.h | 78 +++++ eo/src/eoUniformSelect.h | 64 ++++ eo/src/eoUniformXOver.h | 90 +++++ eo/src/eoXOver2.h | 212 ++++++------ 28 files changed, 2400 insertions(+), 1595 deletions(-) create mode 100644 eo/src/eoDetTournament.h delete mode 100644 eo/src/eoEvaluator.h create mode 100644 eo/src/eoMerge.h create mode 100644 eo/src/eoMultiBinOp.h create mode 100644 eo/src/eoScheme.h create mode 100644 eo/src/eoSelfEval.h delete mode 100644 eo/src/eoSimpleEval.h create mode 100644 eo/src/eoStochTournament.h create mode 100644 eo/src/eoUniformSelect.h create mode 100644 eo/src/eoUniformXOver.h diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index d7b9a9287..23f08b5ce 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,13 +11,14 @@ libeoincdir = $(includedir)/eo libeoinc_HEADERS = EO.h eo eo1d.h eo2d.h eo2dVector.h eoAged.h eoAlgo.h\ eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h \ eoAtomRandom.h eoBin.h eoBitOp.h eoBitOpFactory.h eoBreeder.h\ - eoData.h eoDup.h eoESChrom.h eoESFullChrom.h eoESFullMut.h eoEasyEA.h\ - eoEvalFunc.h eoEvalFuncPtr.h eoEvaluator.h eoFitTerm.h eoFitness.h\ + eoData.h eoDetTournament.h eoDup.h eoESChrom.h eoESFullChrom.h eoESFullMut.h eoEasyEA.h\ + eoEvalFunc.h eoEvalFuncPtr.h eoFitTerm.h eoFitness.h\ eoGenTerm.h eoGeneration.h eoID.h eoInclusion.h eoInsertion.h\ - eoKill.h eoLottery.h eoMultiMonOp.h eoMutation.h eoNegExp.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 eoProportionalOpSel.h eoRNG.h eoRnd.h eoString.h\ - eoTerm.h eoTranspose.h eoUniform.h eoVector.h eoXOver2.h + eoStochTournament.h eoTerm.h eoTranspose.h eoUniform.h \ + eoUniformSelect.h eoUniformXOver.h eoVector.h eoXOver2.h diff --git a/eo/src/eo b/eo/src/eo index 1f8423c9f..4ec7688f3 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -48,21 +48,23 @@ #include #include +#include #include #include #include #include +#include #include #include #include +#include #include // Evaluation functions #include #include -#include // Terminators #include @@ -70,6 +72,9 @@ #include // Selection and reproduction stuff +#include +#include +#include #include #include #include diff --git a/eo/src/eoAtomBitFlip.h b/eo/src/eoAtomBitFlip.h index b96d33a50..f9d769d05 100644 --- a/eo/src/eoAtomBitFlip.h +++ b/eo/src/eoAtomBitFlip.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoAtomCreep.h +// eoAtomBitFlip.h // Increments or decrements by one a single element // (c) GeNeura Team, 1998 /* @@ -22,8 +22,8 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ //----------------------------------------------------------------------------- -#ifndef _EOATOMCREEP_H -#define _EOATOMCREEP_H +#ifndef _EOATOMBITFLIP_H +#define _EOATOMBITFLIP_H /** Flips a single bit */ diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index bd21e937d..cfe3d68d7 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -1,16 +1,16 @@ -//----------------------------------------------------------------------------- -// eoBitOp.h -//----------------------------------------------------------------------------- - -#ifndef eoBitOp_h -#define eoBitOp_h - -//----------------------------------------------------------------------------- - -#include // swap_ranges -#include // eoUniform -#include // eoBin -#include // eoMonOp +//----------------------------------------------------------------------------- +// eoBitOp.h +//----------------------------------------------------------------------------- + +#ifndef eoBitOp_h +#define eoBitOp_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include // eoUniform +#include // eoBin +#include // eoMonOp /** @name BitWise Genetic operators @@ -24,334 +24,301 @@ have a factory that knows how to build them from a description @see eoBitOpFactory */ -//@{ +//@{ + +/** eoBinRandom --> mofify a chromosome in a random way */ + +template class eoBinRandom: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinRandom"; } + + /** + * Randomizes a cromosome. + * @param chrom The cromosome to be randomize. + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; + } +}; + + +/** eoBinBitFlip --> chages a bit */ + +template class eoBinBitFlip: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinBitFlip"; } + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size()); + unsigned i = uniform(); + chrom[i] = (chrom[i]) ? false : true; + } +}; + + +/** eoBinMutation --> classical mutation */ + +template class eoBinMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _rate Rate of mutation. + */ + eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} + + /// The class name. + string className() const { return "eoBinMutation"; } + + /** + * Mutate a chromosome. + * @param chrom The chromosome to be mutated. + */ + void operator()(Chrom& chrom) const + { + for (unsigned i = 0; i < chrom.size(); i++) + if (uniform() < rate) + chrom[i] = !chrom[i]; + } + + private: + double rate; + mutable eoUniform uniform; +}; + + +/** eoBinInversion: inverts the bits of the chromosome between an interval */ + +template class eoBinInversion: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinInversion"; } + + /** + * Inverts a range of bits in a binary chromosome. + * @param chrom The chromosome whos bits are going to be inverted (a range). + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size() + 1); + + unsigned u1 = uniform(), u2; + do u2 = uniform(); while (u1 == u2); + unsigned r1 = min(u1, u2), r2 = max(u1, u2); + + reverse(chrom.begin() + r1, chrom.begin() + r2); + } +}; + + +/** eoBinNext --> next binary value */ + +template class eoBinNext: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinNext"; } + + /** + * Change the bit string x to be x+1. + * @param chrom The chromosome to be added one. + */ + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } + } +}; + + +/** eoBinPrev --> previos binary value */ + +template class eoBinPrev: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinPrev"; } + + /** + * Change the bit string x to be x-1. + * @param chrom The chromosome to be substracted one. + */ + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } + } +}; + + +/** eoBinCrossover --> classic crossover */ + +template class eoBinCrossover: public eoBinOp +{ + public: + /// The class name. + string className() const { return "eoBinCrossover"; } + + /** + * 2-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + eoUniform uniform(1, min(chrom1.size(), chrom2.size())); + swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); + } +}; + + +/** eoBinNxOver --> n-point crossover */ + +template class eoBinNxOver: public eoBinOp +{ + public: + /// (Defualt) Constructor. + eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) + { + if (num_points < 1) + runtime_error("NxOver --> invalid number of points"); + } + + /// The class name. + string className() const { return "eoBinNxOver"; } + + /** + * n-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_size = min(chrom1.size(), chrom2.size()); + unsigned max_points = min(max_size - 1, num_points); + + vector points(max_size, false); + eoUniform uniform(1, max_size); + + // select ranges of bits to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + max_points--; + } + } while (max_points); + + + // swap bits between chromosomes + bool change = false; + for (unsigned bit = 1; bit < points.size(); bit++) + { + if (points[bit]) + change = !change; + + if (change) + swap(chrom1[bit], chrom2[bit]); + } + } + + private: + unsigned num_points; +}; + + +/** eoBinGxOver --> gene crossover */ + +template class eoBinGxOver: public eoBinOp +{ + public: + /// Constructor. + eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + gene_size(_gene_size), num_points(_num_points) + { + if (gene_size < 1) + runtime_error("GxOver --> invalid gene size"); + if (num_points < 1) + runtime_error("GxOver --> invalid number of points"); + } + + /// The class name + string className() const { return "eoBinGxOver"; } + + /** + * Gene crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = min(max_genes, num_points); + + vector points(max_genes, false); + eoUniform uniform(0, max_genes); + + // selects genes to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } + } while (cut_genes); + + // swaps genes + for (unsigned i = 0; i < points.size(); i++) + if (points[i]) + swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); + } + + private: + unsigned gene_size; + unsigned num_points; +}; + -/** eoBinRandom --> mofify a chromosome in a random way */ -template class eoBinRandom: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinRandom"; } - - /** - * Randomizes a cromosome. - * @param chrom The cromosome to be randomize. - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0.0, 1.0); - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; - } -}; - - -/** eoBinBitFlip --> chages a bit */ - -template class eoBinBitFlip: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinBitFlip"; } - - /** - * Change one bit. - * @param chrom The cromosome which one bit is going to be changed. - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size()); - unsigned i = uniform(); - chrom[i] = (chrom[i]) ? false : true; - } -}; - - -/** eoBinMutation --> classical mutation */ - -template class eoBinMutation: public eoMonOp -{ - public: - /** - * (Default) Constructor. - * @param _rate Rate of mutation. - */ - eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} - - /// The class name. - string className() const { return "eoBinMutation"; } - - /** - * Mutate a chromosome. - * @param chrom The chromosome to be mutated. - */ - void operator()(Chrom& chrom) const - { - for (unsigned i = 0; i < chrom.size(); i++) - if (uniform() < rate) - chrom[i] = !chrom[i]; - } - - private: - double rate; - mutable eoUniform uniform; -}; - - -/** eoBinInversion: inverts the bits of the chromosome between an interval */ - -template class eoBinInversion: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinInversion"; } - - /** - * Inverts a range of bits in a binary chromosome. - * @param chrom The chromosome whos bits are going to be inverted (a range). - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size() + 1); - - unsigned u1 = uniform(), u2; - do u2 = uniform(); while (u1 == u2); - unsigned r1 = min(u1, u2), r2 = max(u1, u2); - - reverse(chrom.begin() + r1, chrom.begin() + r2); - } -}; - - -/** eoBinNext --> next binary value */ - -template class eoBinNext: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinNext"; } - - /** - * Change the bit string x to be x+1. - * @param chrom The chromosome to be added one. - */ - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - continue; - } - else - { - chrom[i] = 1; - break; - } - } -}; - - -/** eoBinPrev --> previos binary value */ - -template class eoBinPrev: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinPrev"; } - - /** - * Change the bit string x to be x-1. - * @param chrom The chromosome to be substracted one. - */ - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - break; - } - else - { - chrom[i] = 1; - continue; - } - } -}; - - -/** eoBinCrossover --> classic crossover */ - -template class eoBinCrossover: public eoBinOp -{ - public: - /// The class name. - string className() const { return "eoBinCrossover"; } - - /** - * 2-point crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - eoUniform uniform(1, min(chrom1.size(), chrom2.size())); - swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); - } -}; - - -/** eoBinNxOver --> n-point crossover */ - -template class eoBinNxOver: public eoBinOp -{ - public: - /// (Defualt) Constructor. - eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) - { - if (num_points < 1) - runtime_error("NxOver --> invalid number of points"); - } - - /// The class name. - string className() const { return "eoBinNxOver"; } - - /** - * n-point crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_size = min(chrom1.size(), chrom2.size()); - unsigned max_points = min(max_size - 1, num_points); - - vector points(max_size, false); - eoUniform uniform(1, max_size); - - // select ranges of bits to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - max_points--; - } - } while (max_points); - - - // swap bits between chromosomes - bool change = false; - for (unsigned bit = 1; bit < points.size(); bit++) - { - if (points[bit]) - change = !change; - - if (change) - swap(chrom1[bit], chrom2[bit]); - } - } - - private: - unsigned num_points; -}; - - -/** eoBinGxOver --> gene crossover */ - -template class eoBinGxOver: public eoBinOp -{ - public: - /// Constructor. - eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): - gene_size(_gene_size), num_points(_num_points) - { - if (gene_size < 1) - runtime_error("GxOver --> invalid gene size"); - if (num_points < 1) - runtime_error("GxOver --> invalid number of points"); - } - - /// The class name - string className() const { return "eoBinGxOver"; } - - /** - * Gene crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; - unsigned cut_genes = min(max_genes, num_points); - - vector points(max_genes, false); - eoUniform uniform(0, max_genes); - - // selects genes to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - cut_genes--; - } - } while (cut_genes); - - // swaps genes - for (unsigned i = 0; i < points.size(); i++) - if (points[i]) - swap_ranges(chrom1.begin() + i * gene_size, - chrom1.begin() + i * gene_size + gene_size, - chrom2.begin() + i * gene_size); - } - - private: - unsigned gene_size; - unsigned num_points; -}; - - -/** eoBinUxOver --> uniform crossover */ - -template class eoBinUxOver: public eoBinOp -{ -public: - /// (Default) Constructor. - eoBinUxOver(const float _rate = 0.5): rate(_rate) - { - if (rate < 0 || rate > 1) - runtime_error("UxOver --> invalid rate"); - } - - /// The class name. - string className() const { return "eoBinUxOver"; } - - /** - * Uniform crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned min_size = min(chrom1.size(), chrom2.size()); - eoUniform uniform(0, 1); - - for (unsigned bit = 0; bit < min_size; bit++) - if (uniform() < rate) - swap(chrom1[bit], chrom2[bit]); - } - - public: - float rate; -}; - -//----------------------------------------------------------------------------- -//@} -#endif eoBitOp_h +//----------------------------------------------------------------------------- +//@} +#endif eoBitOp_h diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index cd21f0ed3..66eb0aedb 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -1,82 +1,103 @@ -//----------------------------------------------------------------------------- -// eoBreeder.h -//----------------------------------------------------------------------------- - -#ifndef eoBreeder_h -#define eoBreeder_h - -//----------------------------------------------------------------------------- - -#include // vector -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector - -using namespace std; - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -template class eoBreeder: public eoTransform -{ - public: - /// Default constructor. - eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} - - /// Destructor. - virtual ~eoBreeder() {} - - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - for (unsigned i = 0; i < pop.size(); i++) { - eoOp* op = opSel.Op(); - switch (op->readArity()) { - case unary: - { - eoMonOp* monop = static_cast* >(op); - (*monop)( pop[i] ); - break; - } - case binary: - { - eoBinOp* binop = static_cast* >(op); - eoUniform u(0, pop.size() ); - (*binop)(pop[i], pop[ u() ] ); - break; - } - case Nary: - { - eoNaryOp* Nop = static_cast* >(op); - eoUniform u(0, pop.size() ); - eoPop inVec, outVec; - inVec.push_back( pop[i] ); - unsigned numberOfOperands = u(); - for ( unsigned i = 0; i < numberOfOperands; i ++ ) { - inVec.push_back( pop[ u() ] ); - } - (*Nop)( inVec, outVec ); - break; - } - } - } - }; - - /// The class name. - string classname() const { return "eoBreeder"; } - - private: - eoOpSelector& opSel; - -}; - -//----------------------------------------------------------------------------- - -#endif eoBreeder_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBreeder.h +// Takes two populations and mixes them +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoBreeder_h +#define eoBreeder_h + +//----------------------------------------------------------------------------- + +#include // vector +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector + +using namespace std; + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +template class eoBreeder: public eoMonPopOp +{ + public: + /// Default constructor. + eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} + + /// Destructor. + virtual ~eoBreeder() {} + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + for (unsigned i = 0; i < pop.size(); i++) { + eoOp* op = opSel.Op(); + switch (op->readArity()) { + case unary: + { + eoMonOp* monop = static_cast* >(op); + (*monop)( pop[i] ); + break; + } + case binary: + { + eoBinOp* binop = static_cast* >(op); + eoUniform u(0, pop.size() ); + (*binop)(pop[i], pop[ u() ] ); + break; + } + case Nary: + { + eoNaryOp* Nop = static_cast* >(op); + eoUniform u(0, pop.size() ); + eoPop inVec, outVec; + inVec.push_back( pop[i] ); + unsigned numberOfOperands = u(); + for ( unsigned i = 0; i < numberOfOperands; i ++ ) { + inVec.push_back( pop[ u() ] ); + } + (*Nop)( inVec, outVec ); + break; + } + } + } + }; + + /// The class name. + string classname() const { return "eoBreeder"; } + + private: + eoOpSelector& opSel; + +}; + +//----------------------------------------------------------------------------- + +#endif eoBreeder_h diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h new file mode 100644 index 000000000..a01fc0807 --- /dev/null +++ b/eo/src/eoDetTournament.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDetTournament.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoDetTournament_h +#define eoDetTournament_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoDetTournament: a selection method that selects ONE individual by + deterministic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoDetTournament: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { + // consistency check + if (Tsize < 2) { + cout << "Warning, Tournament size shoudl be >= 2\nAdjusted\n"; + Tsize = 2; + } + } + + /** DANGER: if you want to be able to minimize as well as maximizem + DON'T cast the fitness to a float, use the EOT comparator! */ + virtual const EOT& operator()(const eoPop& pop) { + unsigned best = rng.random(pop.size()); // random individual + + for (unsigned i = 0; i { cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; num_sigma = num_genes; // modify the Param value - so .status is OK - char sloc[20]; - sprintf(sloc, "%d", num_genes); - parser.setParamValue("--NbSigma", sloc); + ostrstream sloc; + sloc << num_genes; + parser.setParamValue("--NbSigma", sloc.str()); } // adjust the sizes!!! resize(num_genes); diff --git a/eo/src/eoESFullMut.h b/eo/src/eoESFullMut.h index c8bdcb281..d30232af8 100644 --- a/eo/src/eoESFullMut.h +++ b/eo/src/eoESFullMut.h @@ -1,243 +1,243 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESMute.h : ES mutation -// (c) GeNeura Team, 1998 for the EO part -// Th. Baeck 1994 and EEAAX 1999 for the ES part -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - marc.schoenauer@polytechnique.fr - http://eeaax.cmap.polytchnique.fr/ - */ -//----------------------------------------------------------------------------- - - -#ifndef _EOESMUT_H -#define _EOESMUT_H - -#include -#include -#include // for exp - -#include -#include - -const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ -// should not be a parameter ... - -/** ES-style mutation in the large: Obviously, valid only for eoESInd -*/ -template -class eoESMutate: public eoMonOp< eoESFullChrom > { -public: - /// - eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) - : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), - TauBeta(_TauBeta) {}; - - /* The parser constructor - */ - eoESMutate(Parser & parser, unsigned _stdDevLength, unsigned _size, bool _correlated ): - eoMonOp< eoESFullChrom >( ) { - parser.AddTitle("Parameters of ES mutation (before renormalization)"); - try { // we know that there is at least 1 std dev. - if (_stdDevLength == 1) { - TauLcl = parser.getInt("-Ml", "--TauLcl", "1", - "TauLcl, Mutation rate for the only Std Dev." ); - // different normalization in that case -- Thomas Baeck - TauLcl /= sqrt((double) _size); - } - else { /* more than 1 std dev */ - TauLcl = parser.getFloat("-Ml", "--TauLcl", "1", - "Local mutation rate for Std Dev." ); - TauGlb = parser.getFloat("-Mg", "--TauGlb", "1", - "Global mutation rate for Std Dev." ); - // renormalization - TauLcl /= sqrt( 2.0 * sqrt( (double)_size ) ); - TauGlb /= sqrt( 2.0 * ( (double) _size ) ); - - if ( _correlated ) { // Correlated Mutations - TauBeta = parser.getFloat("-Mb", "--TauBeta", "0.0873", - "Mutation rate for corr. coeff." ); - // rotation angles: no normalization - } - } - } - catch (exception & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - }; - - /// needed virtual dtor - virtual ~eoESMutate() {}; - - // virtual separation depending wether correlated mutations are present - virtual void operator() ( eoESFullChrom & _eo ) const { - if (_eo.CorCffLength()) - CorrelatedMutation(_eo); - else - StandardMutation(_eo); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoESMutate";}; - -private: - /// mutations - standard et correlated - // ========= - /* - * Standard mutation of object variables and standard - * deviations in ESs. - * If there are fewer different standard deviations available - * than the dimension of the objective function requires, the - * last standard deviation is responsible for ALL remaining - * object variables. - * Schwefel 1977: Numerische Optimierung von Computer-Modellen - * mittels der Evolutionsstrategie, pp. 165 ff. - */ - - virtual void StandardMutation( eoESFullChrom & _eo ) const { - unsigned i,k; - double Glb, StdLoc; - - if (_eo.StdDevLength() == 1) { /* single StdDev -> No global factor */ - StdLoc = _eo.getStdDev(0); - StdLoc *= exp(TauLcl*rng.normal()); - if (StdLoc < ES_SIGEPS) - StdLoc = ES_SIGEPS; - _eo.setStdDev(0, StdLoc); - _eo.setGene( 0, _eo.getGene(0) + StdLoc*rng.normal()); - i = 1; - } - else { /* more than one std dev. */ - Glb = exp(TauGlb*rng.normal()); - for (i = 0; i < _eo.length() && i < _eo.StdDevLength(); i++) { - StdLoc = _eo.getStdDev(i); - StdLoc *= Glb * exp(TauLcl*rng.normal()); - if (StdLoc < ES_SIGEPS) - StdLoc = ES_SIGEPS; - _eo.setStdDev(i, StdLoc); - _eo.setGene( i, _eo.getGene(i) + StdLoc*rng.normal()); - } - } - // last object variables: same STdDev than the preceding one - for (k = i; k < _eo.length(); k++) { - _eo.setGene( k, _eo.getGene(k) + StdLoc*rng.normal() ); - } - } - - /* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ - - // Code from Thomas Baeck - - virtual void CorrelatedMutation( eoESFullChrom & _eo ) const { - - - int i, k, n1, n2, nq; - - double d1, d2, S, C, Glb; - double tmp; - /* - * First: mutate standard deviations (as above). - */ - - Glb = exp(TauGlb*rng.normal()); - for (i = 0; i < _eo.StdDevLength(); i++) { - tmp = _eo.getStdDev(i); - _eo.setStdDev( i, tmp*Glb*exp(TauLcl*rng.normal()) ); - } - - /* - * Mutate rotation angles. - */ - - for (i = 0; i < _eo.CorCffLength(); i++) { - tmp = _eo.getCorCff(i); - tmp += TauBeta*rng.normal(); - // danger of VERY long loops --MS-- - // while (CorCff[i] > M_PI) - // CorCff[i] -= 2.0 * M_PI; - // while (CorCff[i] < - M_PI) - // CorCff[i] += 2.0 * M_PI; - if ( fabs(tmp) > M_PI ) { - tmp -= M_PI * (int) (tmp/M_PI) ; - } - _eo.setCorCff(i, tmp); - } - - /* - * Perform correlated mutations. - */ - vector VarStp(_eo.size()); - for (i = 0; i < _eo.size() && i < _eo.StdDevLength(); i++) - VarStp[i] = _eo.getStdDev(i)*rng.normal(); - for (k = i; k < _eo.size(); k++) - VarStp[k] = _eo.getStdDev(i-1)*rng.normal(); - nq = _eo.CorCffLength() - 1; - for (k = _eo.size()-_eo.StdDevLength(); k < _eo.size()-1; k++) { - n1 = _eo.size() - k - 1; - n2 = _eo.size() - 1; - for (i = 0; i < k; i++) { - d1 = VarStp[n1]; - d2 = VarStp[n2]; - S = sin( _eo.getCorCff(nq) ); - C = cos( _eo.getCorCff(nq) ); - VarStp[n2] = d1 * S + d2 * C; - VarStp[n1] = d1 * C - d2 * S; - n2--; - nq--; - } - } - for (i = 0; i < _eo.size(); i++) - _eo[i] += VarStp[i]; - - } - // the data - //========= - double TauLcl; /* Local factor for mutation of std deviations */ - double TauGlb; /* Global factor for mutation of std deviations */ - double TauBeta; /* Factor for mutation of correlation parameters */ -}; - -/* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ -// Not yet implemented! - -#endif - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESMute.h : ES mutation +// (c) GeNeura Team, 1998 for the EO part +// Th. Baeck 1994 and EEAAX 1999 for the ES part +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOESMUT_H +#define _EOESMUT_H + +#include +#include +#include // for exp + +#include +#include + +const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ +// should not be a parameter ... + +/** ES-style mutation in the large: Obviously, valid only for eoESInd +*/ +template +class eoESMutate: public eoMonOp< eoESFullChrom > { +public: + /// + eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) + : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), + TauBeta(_TauBeta) {}; + + /* The parser constructor + */ + eoESMutate(Parser & parser, unsigned _stdDevLength, unsigned _size, bool _correlated ): + eoMonOp< eoESFullChrom >( ) { + parser.AddTitle("Parameters of ES mutation (before renormalization)"); + try { // we know that there is at least 1 std dev. + if (_stdDevLength == 1) { + TauLcl = parser.getInt("-Ml", "--TauLcl", "1", + "TauLcl, Mutation rate for the only Std Dev." ); + // different normalization in that case -- Thomas Baeck + TauLcl /= sqrt((double) _size); + } + else { /* more than 1 std dev */ + TauLcl = parser.getFloat("-Ml", "--TauLcl", "1", + "Local mutation rate for Std Dev." ); + TauGlb = parser.getFloat("-Mg", "--TauGlb", "1", + "Global mutation rate for Std Dev." ); + // renormalization + TauLcl /= sqrt( 2.0 * sqrt( (double)_size ) ); + TauGlb /= sqrt( 2.0 * ( (double) _size ) ); + + if ( _correlated ) { // Correlated Mutations + TauBeta = parser.getFloat("-Mb", "--TauBeta", "0.0873", + "Mutation rate for corr. coeff." ); + // rotation angles: no normalization + } + } + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + }; + + /// needed virtual dtor + virtual ~eoESMutate() {}; + + // virtual separation depending wether correlated mutations are present + virtual void operator() ( eoESFullChrom & _eo ) const { + if (_eo.CorCffLength()) + CorrelatedMutation(_eo); + else + StandardMutation(_eo); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESMutate";}; + +private: + /// mutations - standard et correlated + // ========= + /* + * Standard mutation of object variables and standard + * deviations in ESs. + * If there are fewer different standard deviations available + * than the dimension of the objective function requires, the + * last standard deviation is responsible for ALL remaining + * object variables. + * Schwefel 1977: Numerische Optimierung von Computer-Modellen + * mittels der Evolutionsstrategie, pp. 165 ff. + */ + + virtual void StandardMutation( eoESFullChrom & _eo ) const { + unsigned i,k; + double Glb, StdLoc; + + if (_eo.StdDevLength() == 1) { /* single StdDev -> No global factor */ + StdLoc = _eo.getStdDev(0); + StdLoc *= exp(TauLcl*rng.normal()); + if (StdLoc < ES_SIGEPS) + StdLoc = ES_SIGEPS; + _eo.setStdDev(0, StdLoc); + _eo.setGene( 0, _eo.getGene(0) + StdLoc*rng.normal()); + i = 1; + } + else { /* more than one std dev. */ + Glb = exp(TauGlb*rng.normal()); + for (i = 0; i < _eo.length() && i < _eo.StdDevLength(); i++) { + StdLoc = _eo.getStdDev(i); + StdLoc *= Glb * exp(TauLcl*rng.normal()); + if (StdLoc < ES_SIGEPS) + StdLoc = ES_SIGEPS; + _eo.setStdDev(i, StdLoc); + _eo.setGene( i, _eo.getGene(i) + StdLoc*rng.normal()); + } + } + // last object variables: same STdDev than the preceding one + for (k = i; k < _eo.length(); k++) { + _eo.setGene( k, _eo.getGene(k) + StdLoc*rng.normal() ); + } + } + + /* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + + // Code from Thomas Baeck + + virtual void CorrelatedMutation( eoESFullChrom & _eo ) const { + + + int i, k, n1, n2, nq; + + double d1, d2, S, C, Glb; + double tmp; + /* + * First: mutate standard deviations (as above). + */ + + Glb = exp(TauGlb*rng.normal()); + for (i = 0; i < _eo.StdDevLength(); i++) { + tmp = _eo.getStdDev(i); + _eo.setStdDev( i, tmp*Glb*exp(TauLcl*rng.normal()) ); + } + + /* + * Mutate rotation angles. + */ + + for (i = 0; i < _eo.CorCffLength(); i++) { + tmp = _eo.getCorCff(i); + tmp += TauBeta*rng.normal(); + // danger of VERY long loops --MS-- + // while (CorCff[i] > M_PI) + // CorCff[i] -= 2.0 * M_PI; + // while (CorCff[i] < - M_PI) + // CorCff[i] += 2.0 * M_PI; + if ( fabs(tmp) > M_PI ) { + tmp -= M_PI * (int) (tmp/M_PI) ; + } + _eo.setCorCff(i, tmp); + } + + /* + * Perform correlated mutations. + */ + vector VarStp(_eo.size()); + for (i = 0; i < _eo.size() && i < _eo.StdDevLength(); i++) + VarStp[i] = _eo.getStdDev(i)*rng.normal(); + for (k = i; k < _eo.size(); k++) + VarStp[k] = _eo.getStdDev(i-1)*rng.normal(); + nq = _eo.CorCffLength() - 1; + for (k = _eo.size()-_eo.StdDevLength(); k < _eo.size()-1; k++) { + n1 = _eo.size() - k - 1; + n2 = _eo.size() - 1; + for (i = 0; i < k; i++) { + d1 = VarStp[n1]; + d2 = VarStp[n2]; + S = sin( _eo.getCorCff(nq) ); + C = cos( _eo.getCorCff(nq) ); + VarStp[n2] = d1 * S + d2 * C; + VarStp[n1] = d1 * C - d2 * S; + n2--; + nq--; + } + } + for (i = 0; i < _eo.size(); i++) + _eo[i] += VarStp[i]; + + } + // the data + //========= + double TauLcl; /* Local factor for mutation of std deviations */ + double TauGlb; /* Global factor for mutation of std deviations */ + double TauBeta; /* Factor for mutation of correlation parameters */ +}; + +/* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ +// Not yet implemented! + +#endif + diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 6c6366494..49a905ebf 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -41,9 +41,9 @@ template class eoEasyEA: public eoAlgo { public: /// Constructor. - eoEasyEA(eoSelect& _select, - eoTransform& _transform, - eoMerge& _replace, + eoEasyEA(eoBinPopOp& _select, + eoMonPopOp& _transform, + eoBinPopOp& _replace, eoEvalFunc& _evaluator, eoTerm& _terminator) :step(_select, _transform, _replace, _evaluator), diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 266303d6f..6ff28f2ca 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -43,7 +43,7 @@ template struct eoEvalFunc { typedef typename EOT::Fitness EOFitT; #endif - /// Effectively applies the evaluation function to an EO or urEO + /// Effectively applies the evaluation function to an EO virtual void operator() ( EOT & _eo ) const = 0; }; diff --git a/eo/src/eoEvaluator.h b/eo/src/eoEvaluator.h deleted file mode 100644 index 3ddae376c..000000000 --- a/eo/src/eoEvaluator.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEvaluator.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOEVALUATOR_H -#define _EOEVALUATOR_H - -//----------------------------------------------------------------------------- -#include -#include - -//----------------------------------------------------------------------------- -/** Evaluator takes a vector of EOs and evaluates its fitness -* returning void. Template instances must be of fitness and EO type -*/ -template -class eoEvaluator: public eoTransform{ -public: - /// ctor - eoEvaluator( const eoEvalFunc< EOT> & _ef ) - : eoTransform(), repEF( _ef ){}; - - /// Needed virtual destructor - virtual ~eoEvaluator() {}; - - /* Sets the evaluation function - virtual void EF( const eoEvalFunc< EOT> & _ef ) { repEF= _ef;};*/ - - /// Gets the evaluation function - virtual const eoEvalFunc< EOT>& EF() { return repEF;}; - - /** This is the actual function operator(); it is left without implementation. - It takes a vector of pointers to eo - * @param _vEO is a vector of pointers to eo, that will be evaluated - */ - - virtual void operator() ( EOT& _eot ) const = 0; - - ///@name eoObject methods - //@{ - /** Return the class id */ - virtual string className() const { return "eoEvaluator"; } - - /** Read and print are left without implementation */ - //@} - -private: - const eoEvalFunc< EOT> & repEF; -}; -//@} - -#endif diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index 1bfec9a28..81c2f50b4 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -1,80 +1,80 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoGeneration_h -#define eoGeneration_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include -#include // eoSelect, eoTranform, eoMerge - -//----------------------------------------------------------------------------- -// eoGeneration -//----------------------------------------------------------------------------- - -template class eoGeneration: public eoAlgo -{ - public: - /// Constructor. - eoGeneration(eoSelect& _select, - eoTransform& _transform, - eoMerge& _replace, - eoEvalFunc& _evaluator): - select(_select), transform(_transform), - replace(_replace), evaluator( _evaluator) {}; - - /// Copy Constructor. - eoGeneration(eoGeneration& _gen): - select(_gen.select), transform(_gen.transform), - replace(_gen.replace), evaluator( _gen.evaluator ) {}; - - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - eoPop breeders; - select(pop, breeders); - transform(breeders); - eoPop::iterator i; - // Can't use foreach here since foreach takes the - // parameter by reference - for ( i = breeders.begin(); i != breeders.end(); i++) - evaluator(*i); - replace(breeders, pop); - } - - /// Class name. - string className() const { return "eoGeneration"; } - - private: - eoSelect& select; - eoTransform& transform; - eoMerge& replace; - eoEvalFunc& evaluator; -}; - -//----------------------------------------------------------------------------- - -#endif eoGeneration_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoGeneration_h +#define eoGeneration_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include +#include // eoSelect, eoTranform, eoMerge + +//----------------------------------------------------------------------------- +// eoGeneration +//----------------------------------------------------------------------------- + +template class eoGeneration: public eoAlgo +{ + public: + /// Constructor. + eoGeneration(eoBinPopOp& _select, + eoMonPopOp& _transform, + eoBinPopOp& _replace, + eoEvalFunc& _evaluator): + select(_select), transform(_transform), + replace(_replace), evaluator( _evaluator) {}; + + /// Copy Constructor. + eoGeneration(eoGeneration& _gen): + select(_gen.select), transform(_gen.transform), + replace(_gen.replace), evaluator( _gen.evaluator ) {}; + + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + eoPop breeders; + select(pop, breeders); + transform(breeders); + eoPop::iterator i; + // Can't use foreach here since foreach takes the + // parameter by reference + for ( i = breeders.begin(); i != breeders.end(); i++) + evaluator(*i); + replace(breeders, pop); + } + + /// Class name. + string className() const { return "eoGeneration"; } + + private: + eoBinPopOp& select; + eoMonPopOp& transform; + eoBinPopOp& replace; + eoEvalFunc& evaluator; +}; + +//----------------------------------------------------------------------------- + +#endif eoGeneration_h diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index 709cb0c01..c776aaafd 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -7,8 +7,11 @@ //----------------------------------------------------------------------------- -#include // eoPop -#include // eoMerge +#include + +// EO includes +#include +#include /***************************************************************************** * eoInclusion: A replacement algorithm. * @@ -20,7 +23,13 @@ template class eoInclusion: public eoMerge { public: /// (Default) Constructor. - eoInclusion(const float& _rate = 1.0): eoMerge(_rate) {} + eoInclusion(const float& _rate = 1.0): eoMerge( _rate ) {} + + /// Ctor from istream + eoInclusion( istream& _is): eoBinPopOp( _is ) {}; + + /// Dtor + virtual ~eoInclusion() {}; /** * Creates a new population based on breeders and original populations. @@ -38,6 +47,16 @@ template class eoInclusion: public eoMerge greater()); pop.erase(pop.begin() + target, pop.end()); } + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn inherited from eoMerge */ + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoMerge";}; + //@} }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 0e33cb74a..4f1b8a207 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -1,79 +1,96 @@ -//----------------------------------------------------------------------------- -// eoInsertion.h -//----------------------------------------------------------------------------- - -#ifndef eoInsertion_h -#define eoInsertion_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include // eoMerge - -/****************************************************************************** - * eoInsertion: A replacement algorithm. - * Creates a new population with all the breeders and the best individuals - * from the original population. - *****************************************************************************/ - -template class eoInsertion: public eoMerge -{ - public: - /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} - - /** - * Creates a new population based on breeders and original populations. - * @param breeders The population of breeders. - * @param pop The original population. - */ - /*void operator()(eoPop& breeders, eoPop& pop) - { - int new_size = static_cast(pop.size() * rate()); - - if (new_size == breeders.size()) - { - pop = breeders; - } - else if (new_size < breeders.size()) - { - pop = breeders; - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); - } - else - { - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), - pop.begin() + breeders.size() + pop.size() - new_size); - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); - } - }*/ - - void operator()(eoPop& breeders, eoPop& pop) - { - unsigned target = static_cast(rint(pop.size() * rate())); - - pop.swap(breeders); - - if (target < pop.size()) - { - partial_sort(pop.begin(), pop.begin() + target, pop.end(), - greater()); - pop.erase(pop.begin() + target, pop.end()); - } - else - { - target = min(target - pop.size(), breeders.size()); - partial_sort(breeders.begin(), breeders.begin() + target, - breeders.end(), greater()); - copy(breeders.begin(), breeders.begin() + target, - back_insert_iterator >(pop)); - } - } -}; - -//----------------------------------------------------------------------------- - -#endif eoInsertion_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInsertion.h +// Inserts new members into the population +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoInsertion_h +#define eoInsertion_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoMerge + +/****************************************************************************** + * eoInsertion: A replacement algorithm. + * Creates a new population with all the breeders and the best individuals + * from the original population. + *****************************************************************************/ + +template class eoInsertion: public eoMerge +{ + public: + /// (Default) Constructor. + eoInsertion(const float& _rate = 1.0): eoMerge( _rate ) {} + + /// Ctor from istream + eoInsertion( istream& _is): eoBinPopOp( _is ) {}; + + /// Dtor + virtual ~eoInsertion() {}; + + /** + * Creates a new population based on breeders and original populations. + * @param breeders The population of breeders. Should be sorted to work correctly + * @param pop The original population. + */ + void operator()( eoPop& _breeders, eoPop& _pop) + { + unsigned target = static_cast(rint(_pop.size() * rate())); + + _pop.swap(_breeders); + + if (target < _pop.size()) + { + partial_sort(_pop.begin(), _pop.begin() + target, _pop.end(), + greater()); + _pop.erase(_pop.begin() + target, _pop.end()); + } + else + { + target = min(target - _pop.size(), _breeders.size()); + partial_sort(_breeders.begin(), _breeders.begin() + target, + _breeders.end(), greater()); + copy(_breeders.begin(), _breeders.begin() + target, + back_insert_iterator >(_pop)); + } + }; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn inherited from eoMerge */ + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoInsertion";}; + //@} + +}; + +//----------------------------------------------------------------------------- + +#endif eoInsertion_h diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index a009f0b19..60e8bc7a4 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -1,5 +1,26 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- // eoLottery.h +// Implements the lottery procedure for selection +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- #ifndef eoLottery_h @@ -16,14 +37,14 @@ /// requires Chrom::Fitness to be float castable //----------------------------------------------------------------------------- -template class eoLottery: public eoSelect +template class eoLottery: public eoBinPopOp { public: /// (Default) Constructor. eoLottery(const float& _rate = 1.0): rate(_rate) {} /// - void operator()(const eoPop& pop, eoPop& breeders) const + void operator()( eoPop& pop, eoPop& breeders) { // scores of chromosomes vector score(pop.size()); diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h new file mode 100644 index 000000000..77b89d514 --- /dev/null +++ b/eo/src/eoMerge.h @@ -0,0 +1,115 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMerge.h +// Base class for population-merging classes +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoMerge_h +#define eoMerge_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoMerge + +/** + * eoMerge: Base class for replacement algorithms + */ + +template class eoMerge: public eoBinPopOp +{ + public: + /// (Default) Constructor. + eoMerge(const float& _rate = 1.0): eoBinPopOp(), repRate( _rate ) {} + + /// Ctor from istream + eoMerge( istream& _is): eoBinPopOp() { readFrom( _is ); }; + + /** + * Creates a new population based on breeders and original populations. + * @param breeders The population of breeders. Should be sorted to work correctly + * @param pop The original population. + */ + void operator()( eoPop& _breeders, eoPop& _pop) + { + unsigned target = static_cast(rint(_pop.size() * rate())); + + _pop.swap(_breeders); + + if (target < _pop.size()) + { + partial_sort(_pop.begin(), _pop.begin() + target, _pop.end(), + greater()); + _pop.erase(_pop.begin() + target, _pop.end()); + } + else + { + target = min(target - _pop.size(), _breeders.size()); + partial_sort(_breeders.begin(), _breeders.begin() + target, + _breeders.end(), greater()); + copy(_breeders.begin(), _breeders.begin() + target, + back_insert_iterator >(_pop)); + } + }; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ + virtual void readFrom(istream& _is) { + _is >> repRate; + } + + /** + * Write object. Prints relevant parameters to standard output + * @param _os A ostream. In this case, prints the population to + standard output. The EOT class must hav standard output with cout, + but since it should be an eoObject anyways, it's no big deal. + */ + virtual void printOn(ostream& _os) const { + _os << repRate; + }; + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoMerge";}; + //@} + + protected: + float rate() { return repRate;}; + + private: + float repRate; + +}; + +//----------------------------------------------------------------------------- + +#endif eoInsertion_h diff --git a/eo/src/eoMultiBinOp.h b/eo/src/eoMultiBinOp.h new file mode 100644 index 000000000..ddb30c5df --- /dev/null +++ b/eo/src/eoMultiBinOp.h @@ -0,0 +1,99 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMultiBinOp.h +// Class that combines several binary or unary operators +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOMULTIBINOP_h +#define _EOMULTIBINOP_h + +#include + +#include + +/** MultiMonOp combines several monary operators. By itself, it does nothing to the +EO it´s handled*/ +template +class eoMultiBinOp: public eoBinOp { +public: + /// Ctor from an already existing op + eoMultiBinOp( const eoBinOp* _op ) + : eoBinOp< EOT >( ), vOp(){ + vOp.push_back( _op ); + }; + + /// + eoMultiBinOp( ) + : eoBinOp< EOT >( ), vOp(){}; + + /// Ads a new operator + void adOp( const eoOp* _op ){ + vOp.push_back( _op ); + }; + + /// needed virtual dtor + virtual ~eoMultiBinOp() {}; + + /// + /// Applies all operators to the EO + virtual void operator()( EOT& _eo1, EOT& _eo2 ) const { + if ( vOp.begin() != vOp.end() ) { // which would mean it's empty + for ( vector< const eoOp* >::const_iterator i = vOp.begin(); + i != vOp.end(); i++ ) { + // Admits only unary or binary operator + switch ((*i)->readArity()) { + case unary: + { + const eoMonOp* monop = static_cast* >(*i); + (*monop)( _eo1 ); + (*monop)( _eo2 ); + break; + } + case binary: + { + const eoBinOp* binop = static_cast* >(*i); + (*binop)( _eo1, _eo2 ); + break; + } + } + } + } + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMultiBinOp";}; + //@} + +private: + + /// uses pointers to base class since operators can be unary or binary + vector< const eoOp* > vOp; +}; + +#endif diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 5a1cb8288..e046824a6 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,204 +1,204 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody -should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ -//@{ - -/// -enum Arity { unary = 0, binary = 1, Nary = 2}; - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - - /// Ctor - eoOp( Arity _arity = unary ) - :arity( _arity ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :arity( _eop.arity ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// Arity: number of operands - Arity readArity() const {return arity;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); -// _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - - -private: - /// arity is the number of operands it takes - Arity arity; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - :eoOp( unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} - - -}; - -#include -/** eoNaryOp is the N-ary operator: genetic operator that takes - several EOs. It could be called an {\em orgy} operator. It's a general operator - that takes any number of inputs and spits out any number of outputs -*/ -template -class eoNaryOp: public eoOp { -public: - - /// Ctor - eoNaryOp( ) - :eoOp( Nary ) {}; - - /// Copy Ctor - eoNaryOp( const eoNaryOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoNaryOp() {}; - - /** applies randomly operator, to the object. - */ - virtual void operator()( const eoPop & _in, eoPop _out ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject. - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoNaryOp";}; - //@} - -}; -//@} - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody +should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. +@author GeNeura Team +@version 0.1 +@see eoOpFactory +*/ +//@{ + +/// +enum Arity { unary = 0, binary = 1, Nary = 2}; + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + + /// Ctor + eoOp( Arity _arity = unary ) + :arity( _arity ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :arity( _eop.arity ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// Arity: number of operands + Arity readArity() const {return arity;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className(); +// _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + + +private: + /// arity is the number of operands it takes + Arity arity; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. Modifies both operands. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + :eoOp( unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} + + +}; + +#include +/** eoNaryOp is the N-ary operator: genetic operator that takes + several EOs. It could be called an {\em orgy} operator. It's a general operator + that takes any number of inputs and spits out any number of outputs +*/ +template +class eoNaryOp: public eoOp { +public: + + /// Ctor + eoNaryOp( ) + :eoOp( Nary ) {}; + + /// Copy Ctor + eoNaryOp( const eoNaryOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoNaryOp() {}; + + /** applies randomly operator, to the object. + */ + virtual void operator()( const eoPop & _in, eoPop _out ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject. + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoNaryOp";}; + //@} + +}; +//@} + +#endif diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index df6ed49cc..7e110f4e8 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -833,7 +833,7 @@ void InitRandom( Parser & parser) { } if (_seed == 0) { // use clock to get a "random" seed - _seed = unsigned long( time( 0 ) ); + _seed = (unsigned long)( time( 0 ) ); ostrstream s; 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 diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 89c5c2ff0..e6cf0aef9 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -1,147 +1,144 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoPop.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOPOP_H -#define _EOPOP_H - -#include -#include - -using namespace std; -// from file - -#include -#include - -/** Subpopulation: it is used to move parts of population - from one algorithm to another and one population to another. It is safer -to declare it as a separate object. I have no idea if a population can be -some other thing that a vector, but if somebody thinks of it, this concrete -implementation will be moved to "generic" and an abstract Population -interface will be provided. -It can be instantiated with anything, provided that it accepts a "size" and a -random generator in the ctor. This happens to all the eo1d chromosomes declared -so far. EOT must also have a copy ctor, since temporaries are created and copied -to the population. -@author Geneura Team -@version 0.0 -*/ - -template -class eoPop: public vector, public eoObject, public eoPersistent { - -/// Type is the type of each gene in the chromosome -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes - */ - eoPop() - :vector() {}; - - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; - - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ - virtual void readFrom(istream& _is) { - while( _is ) { // reads line by line, and creates an object per - // line - char line[MAXLINELENGTH]; - _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT( s ); - push_back( thisEOT ); - } - } - } - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. In this case, prints the population to - standard output. The EOT class must hav standard output with cout, - but since it should be an eoObject anyways, it's no big deal. - */ - virtual void printOn(ostream& _os) const { - copy( begin(), end(), ostream_iterator( _os, "\n") ); - }; - - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoPop";}; - //@} - - protected: - -}; -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPop.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPOP_H +#define _EOPOP_H + +#include +#include + +// EO includes +#include +#include + +/** Subpopulation: it is used to move parts of population + from one algorithm to another and one population to another. It is safer +to declare it as a separate object. I have no idea if a population can be +some other thing that a vector, but if somebody thinks of it, this concrete +implementation will be moved to "generic" and an abstract Population +interface will be provided. +It can be instantiated with anything, provided that it accepts a "size" and a +random generator in the ctor. This happens to all the eo1d chromosomes declared +so far. EOT must also have a copy ctor, since temporaries are created and copied +to the population. +@author Geneura Team +@version 0.0 +*/ + +template +class eoPop: public vector, public eoObject, public eoPersistent { + +/// Type is the type of each gene in the chromosome +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop() :vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ + virtual void readFrom(istream& _is) { + while( _is ) { // reads line by line, and creates an object per + // line + char line[MAXLINELENGTH]; + _is.getline( line, MAXLINELENGTH-1 ); + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); + push_back( thisEOT ); + } + } + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. In this case, prints the population to + standard output. The EOT class must hav standard output with cout, + but since it should be an eoObject anyways, it's no big deal. + */ + virtual void printOn(ostream& _os) const { + copy( begin(), end(), ostream_iterator( _os, "\n") ); + }; + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoPop";}; + //@} + + protected: + +}; +#endif diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 8e8177497..6f2eb3b87 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -1,143 +1,141 @@ -// eoPopOps.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eo1d.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOPOPOPS_H -#define _EOPOPOPS_H - -using namespace std; - -/** -@author Geneura Team -@version 0.0 -*/ - -//----------------------------------------------------------------------------- -#include - -//----------------------------------------------------------------------------- -/** eoTransform is a class that transforms or does something on a population. - */ -template -class eoTransform: public eoObject{ - - public: - /** ctor */ - eoTransform() {}; - - /// Dtor - virtual ~eoTransform(){}; - - /// Pure virtual transformation function. Does something on the population - virtual void operator () ( eoPop& _pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoTransform";}; - //@} - -}; - -//----------------------------------------------------------------------------- - -/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ -template -class eoSelect: public eoObject{ - - public: - /** ctor - */ - eoSelect() {}; - - /// Dtor - virtual ~eoSelect(){}; - - /** Pure virtual transformation function. Extracts something from the parents, - and transfers it to the siblings - @param _parents the initial generation. Will be kept constant - @param _siblings the created offspring. Will be usually an empty population - */ - virtual void operator () ( const eoPop& _parents, eoPop& _siblings ) const = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoSelect";}; - //@} - -}; - -/** eoMerge involves three populations, that can be merged and transformed to -give a third -*/ -template -class eoMerge: public eoObject{ - - public: - /// (Default) Constructor. - eoMerge(const float& _rate = 1.0): rep_rate(_rate) {} - - /// Dtor - virtual ~eoMerge() {} - - /** Pure virtual transformation function. Extracts something from breeders - * and transfers it to the pop - * @param breeders Tranformed individuals. - * @param pop The original population at the begining, the result at the end - */ - virtual void operator () ( eoPop& breeders, eoPop& pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoMerge";}; - //@} - - /// Return the rate to be selected from the original population - float rate() const { return rep_rate; } - - /// Set the rate to be obtained after replacement. - /// @param _rate The rate. - void rate(const float& _rate) { rep_rate = _rate; } - - private: - float rep_rate; -}; - -//----------------------------------------------------------------------------- - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPopOps.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPOPOPS_H +#define _EOPOPOPS_H + +using namespace std; + +/** +@author Geneura Team +@version 0.0 + +@version 0.1 : -MS- 22/10/99 + added the added the derived class eoSelectOne for which you only have + to define the selection of 1 individual + (e.g. for tournament, age selection in SSGA, ...) + added at the BASE level (after all it's themost frequen case) + the pure virtual operator that selects one single individual: + EOT eoSelect::operator ( const eoPop& _parents, + const EOT& _first = 0) + added the optional second parameter to transform::operator() +*/ + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- +/** eoTransform is a class that transforms or does something on a population. + */ +template +class eoMonPopOp: public eoObject{ + + public: + /** ctor */ + eoMonPopOp() {}; + + /// Dtor + virtual ~eoMonPopOp(){}; + + /// Pure virtual transformation function. Does something on the population + virtual void operator () ( eoPop& _pop ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoMonPopOp";}; + //@} + +}; + +//----------------------------------------------------------------------------- + +/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ +template +class eoBinPopOp: public eoObject{ + + public: + /** ctor + */ + eoBinPopOp() {}; + + /// Dtor + virtual ~eoBinPopOp(){}; + + /** Pure virtual transformation function. Extracts something from the parents, + and transfers it to the siblings + @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; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoBinPopOp";}; + //@} + +}; + +//----------------------------------------------------------------------------- + +/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ +template +class eoSelectOne: public eoObject{ + + public: + /** ctor + */ + eoSelectOne() {}; + + /// Dtor + virtual ~eoSelectOne(){}; + + /** Pure virtual transformation function. Extracts something from the parents, + and transfers it to the siblings + @param _parents the initial generation. Will be kept constant + @param _siblings the created offspring. Will be usually an empty population + */ + virtual const EOT& operator () ( const eoPop& _parents ) = 0; + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn are not overriden + */ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoSelectOne";}; + //@} + +}; +#endif diff --git a/eo/src/eoScheme.h b/eo/src/eoScheme.h new file mode 100644 index 000000000..be074e28d --- /dev/null +++ b/eo/src/eoScheme.h @@ -0,0 +1,360 @@ +// eoScheme.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoScheme.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOSCHEME_H +#define _EOSCHEME_H + +using namespace std; + +/** +@author Geneura Team -- EEAAX 99 +@version 0.0 + Evolution scheme + + + It seems to me that some important conceptual object is missing + (and God knows I hate turning everything into objects! + + So here is the evolution scheme: + + regroups selection (nb of offspring to generate AND selection method + and replacement (from parents + offspring) + + allows to include elitism, eugenism of the worst, ... more easily + + a generation is then simply an evolution scheme and some operators + and a full algo is a generation + a termination condition + + this is mainly a container class +*/ + +//----------------------------------------------------------------------------- + +#include +#include "eoStochTournament.h" +#include "eoDetTournament.h" +#include "eoLottery.h" +#include "eoUniformSelect.h" +#include "eoInclusion.h" +#include "eoESReplace.h" +#include "eoEPTournament.h" + +/** eoScheme is a class that does more sophisticated evolution that eoEasyEA + */ +template +class eoScheme: public eoAlgo{ + + public: + + // Dtor + virtual ~eoScheme() {}; + + // copy ctor is impossible because of pointers to pure virual types. + // any idea???? --- leave the default copy ctor -- JJ + + /** the Parser-based constructor + these switch cases could be turned into as many subclasses + - but how do you return the subclass to the caller of the constructor??? + */ + eoScheme(Parser & parser) { + // read the popsize + parser.AddTitle("Description of evolution"); + string Evol; + string SelectString; + // temporary + float rate_offspring; + + try { + Evol = parser.getString("-EE", "--evolution", "GGA", + "Evolution scheme (GGA, SSGA, ESPlus, ESComma, EP, General)" ); + popsize = parser.getInt("-EP", "--population", "10", + "Population size" ); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + // now the big switch + if (! strcasecmp(Evol.c_str(), "GGA") ) { + // GGA parameters: popsize, selection method (and its parameters) + nb_offspring = 0; + rate_offspring = 1.0; // generational replacement: #offspring=popsize + try { + // parser.AddTitle("GGA Parameters"); + SelectString = parser.getString("-ES", "--selection", "Tournament", + "Selection method (Roulette, tournament)" ); + if (! strcasecmp(SelectString.c_str(), "roulette") ) { + ptselect = new eoLottery (); + ptselect_mate = new eoLottery (); + } + if (! strcasecmp(SelectString.c_str(), "tournament") ) { + float rate = parser.getFloat("-Et", "--TselectSize", "2", + "Tournament size or rate" ); + if (rate < 0.5) + throw out_of_range("Invalid tournament rate"); + else if ( rate < 1 ) { // binary stochastic tournament + ptselect = new eoStochTournament(rate); + ptselect_mate = new eoStochTournament(rate); + } else { // determeinistic tournament of size (int)rate + ptselect = new eoDetTournament((int)rate); + ptselect_mate = new eoDetTournament((int)rate); + } + } + // end choice of selection + ptreplace = new eoInclusion(); + // put here the choice of elitism + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + } // end of GGA + + // SSGA - standard, one offspring only at the moment + if (! strcasecmp(Evol.c_str(), "SSGA") ) { + // SSGA parameters: popsize, selection tournament size + // the replacement is limited to repace_worst, though + // it could be easy to add the anti-tournament replacement method + nb_offspring = 1; + // NOTE: of course it's a bit of a waste to use the standard loop + // for one single offspring ... + try { + // parser.AddTitle("SSGA Parameters"); + float _rate = parser.getFloat("-ET", "--TSelectSize", "2", + "Selection tournament size" ); + if ( _rate < 1 ) { // binary stochastic tournament + ptselect = new eoStochTournament(_rate); + ptselect_mate = new eoStochTournament(_rate); + } else { // determeinistic tournament of size (int)rate + ptselect = new eoDetTournament((int)_rate); + ptselect_mate = new eoDetTournament((int)_rate); + } + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + // end choice of selection + ptreplace = new eoInclusion(); + // put here the choice of elitism + } // end of SSGA + + if (! strcasecmp(Evol.c_str(), "ESPlus") ) { + // ES evolution parameters: lambda = _nb_offspring + + try { + // parser.AddTitle("ES Scheme parameters"); + nb_offspring = parser.getInt("-EL", "--lambda", "50", + "Lambda" ); + ptselect = new eoUniformSelect(); + ptselect_mate = new eoUniformSelect(); + ptreplace = new eoESPlus(); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + } // end of ESPlus + + if (! strcasecmp(Evol.c_str(), "ESComma") ) { + // ES evolution parameters: lambda = _nb_offspring + + try { + // parser.AddTitle("ES Scheme parameters"); + nb_offspring = parser.getInt("-EL", "--lambda", "50", + "Lambda" ); + ptselect = new eoUniformSelect(); + ptselect_mate = new eoUniformSelect(); + ptreplace = new eoESComma(); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + } // end of ESCOmma + + if (! strcasecmp(Evol.c_str(), "EP") ) { + // EP evoltion scheme: only the EP-tournament replacement size is neede + + try { + // parser.AddTitle("EP Scheme parameters"); + nb_offspring = popsize; + ptselect = new eoCopySelect; /* no selection */ + ptselect_mate = new eoUniformSelect(); + /* What, crossover in EP :-) */ + unsigned tsize = parser.getInt("-ET", "--TournamentSize", "6", + "Size of stocahstic replacement tournament" ); + ptreplace = new eoEPTournament(tsize); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + } // end of EP + + + // everyting is read: now the consistency checks and other preliminary steps + nb_offspring = (nb_offspring ? nb_offspring : + (int) rint (rate_offspring * popsize) ); + if (!nb_offspring) + nb_offspring = 1; /* al least one offspring */ + + } + + + // accessors + unsigned PopSize(){return popsize;} + unsigned NbOffspring(){return nb_offspring ;} + eoSelect* PtSelect(){return ptselect;} + eoSelect* PtSelectMate(){return ptselect_mate;} + eoMerge* PtMerge() {return ptreplace;} + // NOTE: need pointers otherwise you have many warnings when initializing + + /** @name Methods from eoObject */ + //@{ + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + string className() const {return "eoScheme";}; + //@} + private: + unsigned popsize; /* but should it be here ??? */ + unsigned nb_offspring; /* to generate through selection+operators */ + + // these are provisional for later use + + // float rate_offspring; /* or rate */ + // unsigned nb_survive; /* the best guys that are transmitted anyway */ + // float rate_survive; /* or rate */ + // unsigned nb_die; /* the worst guys that do not enev enter selection */ + // float rate_die; /* or rate */ + + eoSelect * ptselect; + eoSelect* ptselect_mate; + eoMerge* ptreplace; + bool elitism; /* put back old best in the new population if necessary */ +}; +/* examples: + for most populat schemes, nb_survive = nb_die = 0 + in GGA and EP, nb_offspring = pop.size() + in ES, nb_offspring = lambda + in SSGA, nb_offspring = 1 (usually) + + elitism can be used anywhere - though stupid in ES, EP and SSGA who are + elist by definition +*/ + +#endif _EOSCHEME_H + +/* + ///////////////////////////////// + /// Applies one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + // Determine the number of offspring to create + // either prescribed, or given as a rate + unsigned nb_off_local = (nb_offspring ? nb_offspring : + (int) rint (rate_offspring * pop.size()) ); + nb_off_local = (nb_off_local ? nb_off_local : 1); // in case it is rounded to 0! + + // the worst die immediately + unsigned nb_die_local = (nb_die ? nb_die : + (int) rint (rate_die * pop.size()) ); + // and the best will survive without selection + unsigned nb_survive_local = (nb_survive ? nb_survive : + (int) rint (rate_survive * pop.size()) ); + + // before selection, erase the one to die + // sort old pop - just in case! + sort(pop.begin(), pop.end(), greater()); + Fitness oldBest = pop[0].fitness(); // store for elitism + eoPop fertilepop = pop; + if (nb_die_local) + erase(fertilepop.end()-nb_die_local, fertilepop.end()); + + eoPop offspring; // = select(fertilepop, nb_off_local); + select(fertilepop, offspring, nb_off_local); + + // now apply the operators to offspring + for (unsigned i=0; i* op = seqselop.Op(&id); + while (op) { // NULL if no more operator + EOT mate; + if (op->readArity() == binary) // can eventually be skipped + mate = select_mate(pop, tmp); // though useless ig mutation + else + mate = tmp; // assumed: mate will not be used! + cout << op->className() << " for offspring " << i << endl; + tmp = (*op)( tmp, mate, pop ); + op = seqselop.Op(&id); + } + offspring[i]=tmp; //* where it belongs + } + + eoPop::iterator i; + // Can't use foreach here since foreach takes the + // parameter by reference + for ( i = offspring.begin(); i != offspring.end(); i++) + evaluator(*i); + + //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // not exact - later!!! + // -MS- + + // first, copy the ones that need to survive + // assumed: pop is still sorted! + eoPop finalPop; + // and the best survive without selection + if (nb_survive_local) { + finalPop.resize(nb_survive_local); + copy( finalPop.begin(), fertilepop.begin(), + fertilepop.begin()+nb_survive_local ); + } + + // now call the replacement method + replace(finalPop, tmpPop); + + // handle elitlism + sort(finalPop.begin(), finalPop.end(), greater()); + if (elitism) { + if ( finalPop[0].fitness() < oldBest ) // best fitness has decreased! + copy(finalPop.end()-1, pop[0]); + } + // return finalPop; + } +*/ diff --git a/eo/src/eoSelfEval.h b/eo/src/eoSelfEval.h new file mode 100644 index 000000000..de4e78167 --- /dev/null +++ b/eo/src/eoSelfEval.h @@ -0,0 +1,23 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EO.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- diff --git a/eo/src/eoSimpleEval.h b/eo/src/eoSimpleEval.h deleted file mode 100644 index 40e735c65..000000000 --- a/eo/src/eoSimpleEval.h +++ /dev/null @@ -1,76 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSimpleEval.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOSimpleEval_H -#define _EOSimpleEval_H - -#include // for evalFunc -#include // For sort - -/** Particular instantiation of the EOEvaluator class -It takes each member in the population, and evaluates it, applying -the evaluation function it´s been initialized with -*/ -template -class eoSimpleEval: public eoEvaluator { -public: - - /// Ctors/dtors - eoSimpleEval( eoEvalFunc & _ef ):eoEvaluator(_ef) {}; - - /// - virtual ~eoSimpleEval() {}; - -#ifdef _MSC_VER - typedef EOT::Fitness EOFitT; -#else - typedef typename EOT::Fitness EOFitT; -#endif - /** Applies evaluation function to all members in the population, and sets - their fitnesses - Reference is non-const since it orders the population by any order - it´s been defined - @param _vEO the population whose fitness is going to be computed*/ - virtual void operator() ( eoPop< EOT >& _vEO ) { - for ( eoPop::iterator i = _vEO.begin(); i != _vEO.end(); i ++ ){ - i->fitness( EF().evaluate( *i ) ); - } - sort( _vEO.begin(), _vEO.end() ); - }; - - ///@name eoObject methods - //@{ - /// - void printOn( ostream& _os ) const {}; - /// - void readFrom( istream& _is ){}; - - /// - string className() { return "eoSimpleEval";}; - - //@} - -}; - -#endif diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h new file mode 100644 index 000000000..ad82e4608 --- /dev/null +++ b/eo/src/eoStochTournament.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochTournament.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoStochTournament_h +#define eoStochTournament_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoStochTournament: a selection method that selects ONE individual by + binary stochastic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoStochTournament: public eoSelectOne +{ + public: + + /// + eoStochTournament(float _Trate = 1.0 ):eoSelectOne(), Trate(_Trate) { + // consistency check + if (Trate < 0.5) { + cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + Trate = 0.55; + } + } + + /** DANGER: if you want to be able to minimize as well as maximizem + DON'T cast the fitness to a float, use the EOT comparator! */ + virtual const EOT& operator()(const eoPop& pop) { + unsigned i1 = rng.random(pop.size()), + i2 = rng.random(pop.size()); + + bool ok = ( rng.flip(Trate) ); + if (pop[i1] < pop[ i2 ] ) { + if (ok) return pop[ i2 ]; + else return pop[ i1 ]; + } + else { + if (ok) return pop[ i1 ]; + else return pop[ i2 ]; + } + } + +private: + float Trate; +}; + +//----------------------------------------------------------------------------- + +#endif eoDetTournament_h diff --git a/eo/src/eoUniformSelect.h b/eo/src/eoUniformSelect.h new file mode 100644 index 000000000..8e71e0da0 --- /dev/null +++ b/eo/src/eoUniformSelect.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUniformSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoUniformSelect_h +#define eoUniformSelect_h +// WARNING: 2 classes in this one - eoUniformSelect and eoCopySelect + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoUniformSelect: a selection method that selects ONE individual randomly + -MS- 22/10/99 */ +//----------------------------------------------------------------------------- + +template class eoUniformSelect: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoUniformSelect():eoSelectOne() {} + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& pop) { + return pop[rng.random(pop.size())] ; + } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "eoUniformSelect"; }; + + private: +}; + +#endif eoUniformSelect_h diff --git a/eo/src/eoUniformXOver.h b/eo/src/eoUniformXOver.h new file mode 100644 index 000000000..cf4271c1f --- /dev/null +++ b/eo/src/eoUniformXOver.h @@ -0,0 +1,90 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUniformXOver.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOUNIFORMXOVER_h +#define _EOUNIFORMXOVER_h + + +// for swap +#if defined( __BORLANDC__ ) +#include +#else +#include +#endif + +// EO includes +#include +#include + +//----------------------------------------------------------------------------- +/** + * EOUniformCrossover: operator for binary chromosomes + * implementation of uniform crossover for EO + * swaps ranges of bits between the parents + */ +//----------------------------------------------------------------------------- + +template +class eoUniformXOver: public eoBinOp< EOT > +{ + public: + + /// + eoUniformXOver( float _rate = 0.5 ): + eoBinOp< EOT > ( ), rate( _rate ) { + if (rate < 0 || rate > 1) + runtime_error("UxOver --> invalid rate"); + } + + + /// + void operator() ( EOT& chrom1, EOT& chrom2 ) const { + unsigned end = min(chrom1.length(),chrom2.length()) - 1; + // select bits to change + eoUniform rnd(0, 1); + + // aply changes + for (unsigned bit = 0; bit < end; bit++) + if (rnd() < rate) + swap(chrom1[ bit], chrom2[ bit]); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoUniformXOver";}; + //@} + +private: + float rate; /// rate of uniform crossover +}; + +//----------------------------------------------------------------------------- + + +#endif diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h index ddb6c41cb..ca78bc209 100644 --- a/eo/src/eoXOver2.h +++ b/eo/src/eoXOver2.h @@ -1,106 +1,106 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoXOver2.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOXOVER2_h -#define _EOXOVER2_h - - -// for swap -#if defined( __BORLANDC__ ) -#include -#else -#include -#endif - -// EO includes -#include -#include - -/** 2-point crossover: takes the genes in the central section of two EOs -and interchanges it -*/ -template -class eoXOver2: public eoBinOp { -public: - /// - eoXOver2() - : eoBinOp< EOT >(){}; - - /// - virtual ~eoXOver2() {}; - - /// - virtual void operator()( EOT& _eo1, - EOT& _eo2 ) const { - unsigned len1 = _eo1.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - eoUniform uniform( 0, len ); - unsigned pos1 = uniform(), pos2 = uniform() ; - - applyAt( _eo1, _eo2, pos1, pos2 ); - - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoXOver2";}; - //@} - -private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO - virtual void applyAt( EOT& _eo, EOT& _eo2, - unsigned _i, unsigned _j = 0) const { - - if ( _j < _i ) - swap( _i, _j ); - - unsigned len1 = _eo.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - - if ( (_j > len) || (_i> len ) ) - throw runtime_error( "xOver2: applying xOver past boundaries"); - - for ( unsigned i = _i; i < _j; i++ ) { - Type tmp = _eo.gene( i ); - _eo.gene( i ) = _eo2.gene( i ); - _eo2.gene( i ) = tmp ; - } - - } - -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoXOver2.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOXOVER2_h +#define _EOXOVER2_h + + +// for swap +#if defined( __BORLANDC__ ) +#include +#else +#include +#endif + +// EO includes +#include +#include + +/** 2-point crossover: takes the genes in the central section of two EOs +and interchanges it +*/ +template +class eoXOver2: public eoBinOp { +public: + /// + eoXOver2() + : eoBinOp< EOT >(){}; + + /// + virtual ~eoXOver2() {}; + + /// + virtual void operator()( EOT& _eo1, + EOT& _eo2 ) const { + unsigned len1 = _eo1.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + eoUniform uniform( 0, len ); + unsigned pos1 = uniform(), pos2 = uniform() ; + + applyAt( _eo1, _eo2, pos1, pos2 ); + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoXOver2";}; + //@} + +private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO + virtual void applyAt( EOT& _eo, EOT& _eo2, + unsigned _i, unsigned _j = 0) const { + + if ( _j < _i ) + swap( _i, _j ); + + unsigned len1 = _eo.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + + if ( (_j > len) || (_i> len ) ) + throw runtime_error( "xOver2: applying xOver past boundaries"); + + for ( unsigned i = _i; i < _j; i++ ) { + Type tmp = _eo.gene( i ); + _eo.gene( i ) = _eo2.gene( i ); + _eo2.gene( i ) = tmp ; + } + + } + +}; + +#endif From 29ea368191dcffa928dd55b3cd9f3d58101ae9f8 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 15 Dec 1999 13:57:09 +0000 Subject: [PATCH 0072/2134] I have turned into comments the Pop constructor that used Type as the type of the gene, given that an EO can have NO genes --- eo/src/eoPop.h | 153 ++++++++++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 71 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index e6cf0aef9..363ee0059 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -49,76 +49,87 @@ to the population. template class eoPop: public vector, public eoObject, public eoPersistent { -/// Type is the type of each gene in the chromosome -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes - */ - eoPop() :vector() {}; - - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; - - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ + /* + Victor Rivas (vrivas@ujaen.es): 15-Dec-1999 + An EO can have NO genes. + /// Type is the type of each gene in the chromosome + #ifdef _MSC_VER + typedef EOT::Type Type; + #else + typedef typename EOT::Type Type; + #endif + */ + +public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop():vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + /* + Victor Rivas (vrivas@ujaen.es): 15-Dec-1999 + This constructor must be substitued by one using factories. + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + */ + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + /* + Victor Rivas (vrivas@ujaen.es): 15-Dec-1999 + This constructor must be substitued by one using factories. + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + */ + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ virtual void readFrom(istream& _is) { while( _is ) { // reads line by line, and creates an object per // line char line[MAXLINELENGTH]; _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT( s ); - push_back( thisEOT ); - } + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); + push_back( thisEOT ); + } } } @@ -127,18 +138,18 @@ class eoPop: public vector, public eoObject, public eoPersistent { * @param _os A ostream. In this case, prints the population to standard output. The EOT class must hav standard output with cout, but since it should be an eoObject anyways, it's no big deal. - */ + */ virtual void printOn(ostream& _os) const { copy( begin(), end(), ostream_iterator( _os, "\n") ); }; - + /** Inherited from eoObject. Returns the class name. @see eoObject */ virtual string className() const {return "eoPop";}; - //@} - - protected: - + //@} + +protected: + }; #endif From df6c6008600ca5ca627f3374e5b117ebb128ebc8 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 15 Dec 1999 16:42:13 +0000 Subject: [PATCH 0073/2134] The constants N,M and K are not declared twice when using RNG in different file of the same program --- eo/src/eoRNG.h | 901 +++++++++++++++++++++++++------------------------ 1 file changed, 452 insertions(+), 449 deletions(-) diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index e5998f365..d55690962 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -1,449 +1,452 @@ -/* -* Random number generator adapted from (see comments below) -* -* The random number generator is modified into a class -* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller -* transformation to generate normal deviates. -* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ - -// This is the ``Mersenne Twister'' random number generator MT19937, which -// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) -// starting from any odd seed in 0..(2^32 - 1). This version is a recode -// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by -// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in -// July-August 1997). -// -// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha -// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to -// generate 300 million random numbers; after recoding: 24.0 sec. for the same -// (i.e., 46.5% of original time), so speed is now about 12.5 million random -// number generations per second on this machine. -// -// According to the URL -// (and paraphrasing a bit in places), the Mersenne Twister is ``designed -// with consideration of the flaws of various existing generators,'' has -// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally -// equidistributed, and ``has passed many stringent tests, including the -// die-hard test of G. Marsaglia and the load test of P. Hellekalek and -// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 -// to 5012 bytes of static data, depending on data type sizes, and the code -// is quite short as well). It generates random numbers in batches of 624 -// at a time, so the caching and pipelining of modern systems is exploited. -// It is also divide- and mod-free. -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Library General Public License as published by -// the Free Software Foundation (either version 2 of the License or, at your -// option, any later version). This library is distributed in the hope that -// it will be useful, but WITHOUT ANY WARRANTY, without even the implied -// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU Library General Public License for more details. You should have -// received a copy of the GNU Library General Public License along with this -// library; if not, write to the Free Software Foundation, Inc., 59 Temple -// Place, Suite 330, Boston, MA 02111-1307, USA. -// -// The code as Shawn received it included the following notice: -// -// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When -// you use this, send an e-mail to with -// an appropriate reference to your work. -// -// It would be nice to CC: when you write. -// - -// -// uint32 must be an unsigned integer type capable of holding at least 32 -// bits; exactly 32 should be fastest, but 64 is better on an Alpha with -// GCC at -O3 optimization so try your options and see what's best for you -// - -/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ - - -#ifndef EO_RANDOM_NUMBER_GENERATOR -#define EO_RANDOM_NUMBER_GENERATOR - -#include - -#include -#include - -// TODO: check for various compilers if this is exactly 32 bits -// Unfortunately MSVC's preprocessor does not comprehends sizeof() -// so neat preprocessing tricks will not work - -typedef unsigned long uint32; // Compiler and platform dependent! - -//----------------------------------------------------------------------------- -// eoRng -//----------------------------------------------------------------------------- -/** -eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 -for generating random numbers. The various member functions implement useful functions -for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). - -Note for people porting EO to other platforms: please make sure that the typedef -uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not -shorter. If it is longer, file compatibility between EO on different platforms -may be broken. -*/ -class eoRng : public eoObject, public eoPersistent -{ -public : - /** - ctor takes a random seed; if you want another seed, use reseed - @see reseed - */ - eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false) - { - state = new uint32[N+1]; - initialize(s); - } - - ~eoRng(void) - { - delete [] state; - } - - /** - Re-initializes the Random Number Generator. - */ - void reseed(uint32 s) - { - initialize(s); - } - - /** - uniform(m = 1.0) returns a random double in the range [0, m) - */ - double uniform(double m = 1.0) - { // random number between [0, m] - return m * double(rand()) / double(rand_max()); - } - - /** - random() returns a random integer in the range [0, m) - */ - uint32 random(uint32 m) - { - return uint32(uniform() * double(m)); - } - - /** - flip() tosses a biased coin such that flip(x/100.0) will - returns true x% of the time - */ - bool flip(float bias) - { - return uniform() < bias; - } - - /** - normal() zero mean gaussian deviate with standard deviation of 1 - */ - double normal(void); // gaussian mutation, stdev 1 - - /** - normal(stdev) zero mean gaussian deviate with user defined standard deviation - */ - double normal(double stdev) - { - return stdev * normal(); - } - - /** - normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation - */ - double normal(double mean, double stdev) - { - return mean + normal(stdev); - } - - /** - rand() returns a random number in the range [0, rand_max) - */ - uint32 rand(); - - /** - rand_max() the maximum returned by rand() - */ - uint32 rand_max(void) const { return (uint32) 0xffffffff; } - - /** - roulette_wheel(vec, total = 0) does a roulette wheel selection - on the input vector vec. If the total is not supplied, it is - calculated. It returns an integer denoting the selected argument. - */ - template - int roulette_wheel(const std::vector& vec, T total = 0) - { - if (total == 0) - { // count - for (int i = 0; i < vec.size(); ++i) - total += vec[i]; - } - - float change = uniform() * total; - - int i = 0; - - while (change > 0) - { - change -= vec[i++]; - } - - return --i; - } - - /// - void printOn(ostream& _os) const - { - for (int i = 0; i < N; ++i) - { - _os << state[i] << ' '; - } - _os << int(next - state) << ' '; - _os << left << ' ' << cached << ' ' << cacheValue; - } - - /// - void readFrom(istream& _is) - { - for (int i = 0; i < N; ++i) - { - _is >> state[i]; - } - - int n; - _is >> n; - next = state + n; - - _is >> left; - _is >> cached; - _is >> cacheValue; - } - - -private : - uint32 restart(void); - void initialize(uint32 seed); - - uint32* state; // the array for the state - uint32* next; - int left; - - bool cached; - float cacheValue; - - static const int N; - static const int M; - static const uint32 K; // a magic constant - -}; - -// Initialization of statics -const int eoRng::N = 624; -const int eoRng::M = 397; -const uint32 eoRng::K = (0x9908B0DFU); // a magic constant - -/** - The one and only global eoRng object -*/ -static eoRng rng; - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -// Implementation of some eoRng members.... Don't mind the mess, it does work. - - -#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u -#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u -#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u -#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v - -inline void eoRng::initialize(uint32 seed) - { - // - // We initialize state[0..(N-1)] via the generator - // - // x_new = (69069 * x_old) mod 2^32 - // - // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's - // _The Art of Computer Programming_, Volume 2, 3rd ed. - // - // Notes (SJC): I do not know what the initial state requirements - // of the Mersenne Twister are, but it seems this seeding generator - // could be better. It achieves the maximum period for its modulus - // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if - // x_initial can be even, you have sequences like 0, 0, 0, ...; - // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, - // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. - // - // Even if x_initial is odd, if x_initial is 1 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 0, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , - // ... - // - // and if x_initial is 3 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 1, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , - // ... - // - // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is - // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It - // also does well in the dimension 2..5 spectral tests, but it could be - // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). - // - // Note that the random number user does not see the values generated - // here directly since restart() will always munge them first, so maybe - // none of all of this matters. In fact, the seed values made here could - // even be extra-special desirable if the Mersenne Twister theory says - // so-- that's why the only change I made is to restrict to odd seeds. - // - - left = -1; - - register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; - register int j; - - for(left=0, *s++=x, j=N; --j; - *s++ = (x*=69069U) & 0xFFFFFFFFU); - } - - -inline uint32 eoRng::restart(void) -{ - register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; - register int j; - - left=N-1, next=state+1; - - for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - for(pM=state, j=M; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - s1 ^= (s1 >> 11); - s1 ^= (s1 << 7) & 0x9D2C5680U; - s1 ^= (s1 << 15) & 0xEFC60000U; - return(s1 ^ (s1 >> 18)); -} - - -inline uint32 eoRng::rand(void) - { - uint32 y; - - if(--left < 0) - return(restart()); - - y = *next++; - y ^= (y >> 11); - y ^= (y << 7) & 0x9D2C5680U; - y ^= (y << 15) & 0xEFC60000U; - return(y ^ (y >> 18)); - } - -inline double eoRng::normal(void) -{ - if (cached) - { - cached = false; - return cacheValue; - } - - float rSquare, factor, var1, var2; - - do - { - var1 = 2.0 * uniform() - 1.0; - var2 = 2.0 * uniform() - 1.0; - - rSquare = var1 * var1 + var2 * var2; - } - while (rSquare >= 1.0 || rSquare == 0.0); - - factor = sqrt(-2.0 * log(rSquare) / rSquare); - - cacheValue = var1 * factor; - cached = true; - - return (var2 * factor); -} - -#endif +/* +* Random number generator adapted from (see comments below) +* +* The random number generator is modified into a class +* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +* transformation to generate normal deviates. +* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ + +// This is the ``Mersenne Twister'' random number generator MT19937, which +// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) +// starting from any odd seed in 0..(2^32 - 1). This version is a recode +// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by +// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in +// July-August 1997). +// +// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +// generate 300 million random numbers; after recoding: 24.0 sec. for the same +// (i.e., 46.5% of original time), so speed is now about 12.5 million random +// number generations per second on this machine. +// +// According to the URL +// (and paraphrasing a bit in places), the Mersenne Twister is ``designed +// with consideration of the flaws of various existing generators,'' has +// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally +// equidistributed, and ``has passed many stringent tests, including the +// die-hard test of G. Marsaglia and the load test of P. Hellekalek and +// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 +// to 5012 bytes of static data, depending on data type sizes, and the code +// is quite short as well). It generates random numbers in batches of 624 +// at a time, so the caching and pipelining of modern systems is exploited. +// It is also divide- and mod-free. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Library General Public License as published by +// the Free Software Foundation (either version 2 of the License or, at your +// option, any later version). This library is distributed in the hope that +// it will be useful, but WITHOUT ANY WARRANTY, without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU Library General Public License for more details. You should have +// received a copy of the GNU Library General Public License along with this +// library; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307, USA. +// +// The code as Shawn received it included the following notice: +// +// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When +// you use this, send an e-mail to with +// an appropriate reference to your work. +// +// It would be nice to CC: when you write. +// + +// +// uint32 must be an unsigned integer type capable of holding at least 32 +// bits; exactly 32 should be fastest, but 64 is better on an Alpha with +// GCC at -O3 optimization so try your options and see what's best for you +// + +/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ + + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + +#include + +#include +#include + +// TODO: check for various compilers if this is exactly 32 bits +// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// so neat preprocessing tricks will not work + +typedef unsigned long uint32; // Compiler and platform dependent! + +//----------------------------------------------------------------------------- +// eoRng +//----------------------------------------------------------------------------- +/** +eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +for generating random numbers. The various member functions implement useful functions +for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). + +Note for people porting EO to other platforms: please make sure that the typedef +uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not +shorter. If it is longer, file compatibility between EO on different platforms +may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + /** + ctor takes a random seed; if you want another seed, use reseed + @see reseed + */ + + eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K((0x9908B0DFU) { + state = new uint32[N+1]; + initialize(s); + } + + ~eoRng(void) + { + delete [] state; + } + + /** + Re-initializes the Random Number Generator. + */ + void reseed(uint32 s) + { + initialize(s); + } + + /** + uniform(m = 1.0) returns a random double in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(rand_max()); + } + + /** + random() returns a random integer in the range [0, m) + */ + uint32 random(uint32 m) + { + return uint32(uniform() * double(m)); + } + + /** + flip() tosses a biased coin such that flip(x/100.0) will + returns true x% of the time + */ + bool flip(float bias) + { + return uniform() < bias; + } + + /** + normal() zero mean gaussian deviate with standard deviation of 1 + */ + double normal(void); // gaussian mutation, stdev 1 + + /** + normal(stdev) zero mean gaussian deviate with user defined standard deviation + */ + double normal(double stdev) + { + return stdev * normal(); + } + + /** + normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation + */ + double normal(double mean, double stdev) + { + return mean + normal(stdev); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32 rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32 rand_max(void) const { return (uint32) 0xffffffff; } + + /** + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, T total = 0) + { + if (total == 0) + { // count + for (int i = 0; i < vec.size(); ++i) + total += vec[i]; + } + + float change = uniform() * total; + + int i = 0; + + while (change > 0) + { + change -= vec[i++]; + } + + return --i; + } + + /// + void printOn(ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /// + void readFrom(istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + +private : + uint32 restart(void); + void initialize(uint32 seed); + + uint32* state; // the array for the state + uint32* next; + int left; + + bool cached; + float cacheValue; + + const int N; + const int M; + const uint32 K; // a magic constant + + /** + Private copy ctor and assignment operator to make sure that + nobody accidentally copies the random number generator. + If you want similar RNG's, make two RNG's and initialize + them with the same seed. + */ + eoRng (const eoRng&); // no implementation + eoRng& operator=(const eoRng&); // dito +}; + +/** + The one and only global eoRng object +*/ +static eoRng rng; + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + +inline void eoRng::initialize(uint32 seed) + { + // + // We initialize state[0..(N-1)] via the generator + // + // x_new = (69069 * x_old) mod 2^32 + // + // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's + // _The Art of Computer Programming_, Volume 2, 3rd ed. + // + // Notes (SJC): I do not know what the initial state requirements + // of the Mersenne Twister are, but it seems this seeding generator + // could be better. It achieves the maximum period for its modulus + // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if + // x_initial can be even, you have sequences like 0, 0, 0, ...; + // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, + // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. + // + // Even if x_initial is odd, if x_initial is 1 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 0, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + // ... + // + // and if x_initial is 3 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 1, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + // ... + // + // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is + // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It + // also does well in the dimension 2..5 spectral tests, but it could be + // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + // + // Note that the random number user does not see the values generated + // here directly since restart() will always munge them first, so maybe + // none of all of this matters. In fact, the seed values made here could + // even be extra-special desirable if the Mersenne Twister theory says + // so-- that's why the only change I made is to restrict to odd seeds. + // + + left = -1; + + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU); + } + + +inline uint32 eoRng::restart(void) +{ + register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + +inline uint32 eoRng::rand(void) + { + uint32 y; + + if(--left < 0) + return(restart()); + + y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); + } + +inline double eoRng::normal(void) +{ + if (cached) + { + cached = false; + return cacheValue; + } + + float rSquare, factor, var1, var2; + + do + { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + + rSquare = var1 * var1 + var2 * var2; + } + while (rSquare >= 1.0 || rSquare == 0.0); + + factor = sqrt(-2.0 * log(rSquare) / rSquare); + + cacheValue = var1 * factor; + cached = true; + + return (var2 * factor); +} + +#endif From de33c67f0e95db37cd6af3069186f6f3c8a38e27 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 15 Dec 1999 16:47:41 +0000 Subject: [PATCH 0074/2134] A little mistake has been corrected --- eo/src/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index d55690962..a128d4391 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -113,7 +113,7 @@ public : @see reseed */ - eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K((0x9908B0DFU) { + eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K((0x9908B0DFU)) { state = new uint32[N+1]; initialize(s); } From d3642e4fde60773c5640a525e89f1f71bd1fdf28 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 17 Dec 1999 09:19:13 +0000 Subject: [PATCH 0075/2134] Changes --- eo/Makefile.am | 9 ++- eo/configure.in | 6 +- eo/src/eoBin.h | 154 +++++++++++++++++++------------------ eo/src/eoGeneration.h | 6 +- eo/test/Makefile.am | 15 +++- eo/test/Makefile.in | 31 +++++--- eo/test/t-eoRandom.cpp | 82 +++++++++++++------- eo/test/t-eobin.cpp | 38 +++++++++- eo/test/t-eobreeder.cpp | 155 +++++++++++++++++++++----------------- eo/test/t-eoinclusion.cpp | 15 +--- eo/test/t-selectOne.cpp | 87 +++++++++++++++++++++ eo/win/Makefile.am | 6 ++ 12 files changed, 397 insertions(+), 207 deletions(-) create mode 100644 eo/test/t-selectOne.cpp create mode 100644 eo/win/Makefile.am diff --git a/eo/Makefile.am b/eo/Makefile.am index ba1a0dcc5..7765a8a31 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,9 +4,14 @@ ## ############################################################################### -SUBDIRS = src test +SUBDIRS = src test win +#Directory for documents DOCDIR = ~/public_html/eodocs +#Directory for indices -- not useful for the user +IDXDIR = ~/index + +EXTRA_DIST=LICENSE docs: doc++ -d $(DOCDIR) -B foot.html -f src/*.h src/*.cpp - /home/jmerelo/bin/index -e html -i /home/jmerelo/index/neweo.idx /home/jmerelo/public_html/eodocs/ -v 3 \ No newline at end of file + /home/jmerelo/bin/index -e html -i $(IDXDIR)/neweo.idx $(DOCDIR)/ -v 3 \ No newline at end of file diff --git a/eo/configure.in b/eo/configure.in index 715a42c9a..46910ca5e 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,11 +1,13 @@ AC_INIT(src/eo) -AM_INIT_AUTOMAKE(eo, 0.0.5) +AM_INIT_AUTOMAKE(eo, 0.0.8) AC_PROG_CXX +CXXFLAGS=-g + AM_PROG_LIBTOOL AM_MAINTAINER_MODE -AC_OUTPUT(Makefile src/Makefile test/Makefile) +AC_OUTPUT(Makefile src/Makefile test/Makefile win/Makefile) diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index b56054ed7..0fb9a82ba 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -1,78 +1,76 @@ -//----------------------------------------------------------------------------- -// eoBin.h -//----------------------------------------------------------------------------- - -#ifndef eoBin_h -#define eoBin_h - -//----------------------------------------------------------------------------- - -#include // ostream, istream -#include // bind2nd -#include // string -#include // EO - -/***************************************************************************** - * eoBin: implementation of binary chromosome. * - * based on STL's bit_vector (vector). * - *****************************************************************************/ - -template class eoBin: public eoVector -{ - public: - - /** - * (Default) Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size = 0, bool value = false): - eoVector(size, value) {} - - /** - * Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size, const eoRnd& rnd): eoVector(size) - { - generate(begin(), end(), rnd); - } - - /** Constructor from istream. - @param is The istream to read from.*/ - eoBin(istream& _is):eoVector(_is){}; - - /// My class name. - string className() const - { - return "eoBin"; - } - - /** - * To print me on a stream. - * @param os The ostream. - */ - void printOn(ostream& os) const - { - copy(begin(), end(), ostream_iterator(os)); - } - - /** - * To read me from a stream. - * @param is The istream. - */ - void readFrom(istream& is) - { - string bits; - is >> bits; - if (is) - { - resize(bits.size()); - transform(bits.begin(), bits.end(), begin(), - bind2nd(equal_to(), '1')); - } - } -}; - -//----------------------------------------------------------------------------- - -#endif eoBin_h +//----------------------------------------------------------------------------- +// eoBin.h +//----------------------------------------------------------------------------- + +#ifndef eoBin_h +#define eoBin_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // string +#include // EO + +/** eoBin: implementation of binary chromosome. + * based on STL's bit_vector (vector). +*/ +template class eoBin: public eoVector +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size = 0, bool value = false): + eoVector(size, value) {} + + /** + * Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size, const eoRnd& rnd): eoVector(size) + { + generate(begin(), end(), rnd); + } + + /** Constructor from istream. + @param is The istream to read from.*/ + eoBin(istream& _is):eoVector(_is){}; + + /// My class name. + string className() const + { + return "eoBin"; + } + + /** + * To print me on a stream. + * @param os The ostream. + */ + void printOn(ostream& os) const + { + copy(begin(), end(), ostream_iterator(os)); + } + + /** + * To read me from a stream. + * @param is The istream. + */ + void readFrom(istream& is) + { + string bits; + is >> bits; + if (is) + { + resize(bits.size()); + transform(bits.begin(), bits.end(), begin(), + bind2nd(equal_to(), '1')); + } + } +}; + +//----------------------------------------------------------------------------- + +#endif eoBin_h diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index 81c2f50b4..5db81e726 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -31,10 +31,12 @@ #include #include // eoSelect, eoTranform, eoMerge -//----------------------------------------------------------------------------- -// eoGeneration //----------------------------------------------------------------------------- +/** eoGeneration + * Single step of a evolutionary algorithm. Applies selection, then genetic + * operators, replaces using a replacement policy, and finally evaluates the + * new ones */ template class eoGeneration: public eoAlgo { public: diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index b83574807..d922e2fa6 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -5,6 +5,7 @@ ############################################################################### DEPS = $(top_builddir)/src/libeo.a +EXTRA_DIST = LICENSE ############################################################################### @@ -13,7 +14,17 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ + t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ + t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps\ + t-eoAtomOps t-selectOne + +############################################################################### + +t_selectOne_SOURCES = t-selectOne.cpp +t_selectOne_DEPENDENCIES = $(DEPS) +t_selectOne_LDFLAGS = -lm +t_selectOne_LDADD = $(LDADDS) ############################################################################### @@ -73,7 +84,7 @@ t_eoEasyEA_LDADD = $(LDADDS) ############################################################################### -t_eobreeder_SOURCES = t-eobreeder.cpp +t_eobreeder_SOURCES = t-eobreeder.cpp binary_value.h t_eobreeder_DEPENDENCIES = $(DEPS) t_eobreeder_LDFLAGS = -lm t_eobreeder_LDADD = $(LDADDS) diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 67ed6e7d8..a10890d4a 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 = : @@ -79,6 +78,7 @@ RANLIB = @RANLIB@ VERSION = @VERSION@ DEPS = $(top_builddir)/src/libeo.a +EXTRA_DIST = LICENSE ############################################################################### @@ -87,7 +87,15 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps t-selectOne + + +############################################################################### + +t_selectOne_SOURCES = t-selectOne.cpp +t_selectOne_DEPENDENCIES = $(DEPS) +t_selectOne_LDFLAGS = -lm +t_selectOne_LDADD = $(LDADDS) ############################################################################### @@ -147,7 +155,7 @@ t_eoEasyEA_LDADD = $(LDADDS) ############################################################################### -t_eobreeder_SOURCES = t-eobreeder.cpp +t_eobreeder_SOURCES = t-eobreeder.cpp binary_value.h t_eobreeder_DEPENDENCIES = $(DEPS) t_eobreeder_LDFLAGS = -lm t_eobreeder_LDADD = $(LDADDS) @@ -241,6 +249,7 @@ t_parser_OBJECTS = t-parser.o t_eoESFull_OBJECTS = t-eoESFull.o t_eoESOps_OBJECTS = t-eoESOps.o t_eoAtomOps_OBJECTS = t-eoAtomOps.o +t_selectOne_OBJECTS = t-selectOne.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -258,8 +267,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best -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) -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) +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) +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) all: all-redirect .SUFFIXES: @@ -390,6 +399,10 @@ t-eoESOps: $(t_eoESOps_OBJECTS) $(t_eoESOps_DEPENDENCIES) t-eoAtomOps: $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_DEPENDENCIES) @rm -f t-eoAtomOps $(CXXLINK) $(t_eoAtomOps_LDFLAGS) $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_LDADD) $(LIBS) + +t-selectOne: $(t_selectOne_OBJECTS) $(t_selectOne_DEPENDENCIES) + @rm -f t-selectOne + $(CXXLINK) $(t_selectOne_LDFLAGS) $(t_selectOne_OBJECTS) $(t_selectOne_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: @@ -436,7 +449,7 @@ distdir: $(DISTFILES) @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 \ @@ -465,7 +478,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: diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 764b0dacb..c0be81b10 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -1,29 +1,53 @@ -//----------------------------------------------------------------------------- -// t-eouniform -//----------------------------------------------------------------------------- - -#include // cout -#include // ostrstream, istrstream -#include // eoBin -#include -#include - -//----------------------------------------------------------------------------- - -main() { - eoNormal n1(-2.5,3.5); - eoNormal n2(0.003, 0.0005 ); - eoNormal n3( 10000000U, 10000U); - eoNegExp e1(3.5); - eoNegExp e2(0.003 ); - eoNegExp e3( 10000U); - cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; - for ( unsigned i = 0; i < 100; i ++) { - cout << n1() << "\t" << n2() << "\t" << n3() << "\t" << - e1() << "\t" << e2() << "\t" << e3() << endl; - } - - return 0; // to avoid VC++ complaints -} - -//----------------------------------------------------------------------------- +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/*----------------------------------------------------------------------------- + * t-eoRandom + * Testing program for the eoRNG class + * (c) GeNeura Team, 1999 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +//----------------------------------------------------------------------------- + + +#include // cout +#include // ostrstream, istrstream +#include // eoBin +#include +#include + +//----------------------------------------------------------------------------- + +main() { + eoNormal n1(-2.5,3.5); + eoNormal n2(0.003, 0.0005 ); + eoNormal n3( 10000000U, 10000U); + eoNegExp e1(3.5); + eoNegExp e2(0.003 ); + eoNegExp e3( 10000U); + cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; + for ( unsigned i = 0; i < 100; i ++) { + cout << n1() << "\t" << n2() << "\t" << n3() << "\t" << + e1() << "\t" << e2() << "\t" << e3() << endl; + } + + return 0; // to avoid VC++ complaints +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index deac01e5b..9ad0eed30 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -1,5 +1,27 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- // t-eobin.cpp +// This program test the the binary cromosomes and several genetic operators +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ //----------------------------------------------------------------------------- #include // cout @@ -102,7 +124,7 @@ main() for (float r = 0.1; r < 1.0; r += 0.1) { - eoBinUxOver uxover(r); + eoUniformXOver uxover(r); fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); uxover(chrom, chrom2); @@ -110,6 +132,20 @@ main() << chrom << " " << chrom2 << endl; } + // Check multiOps + eoMultiMonOp mOp( &next ); + mOp.adOp( &bitflip ); + cout << "before multiMonOp............ " << chrom << endl; + mOp( chrom ); + cout << "after multiMonOp .............. " << chrom << endl; + + eoBinGxOver gxover(2, 4); + eoMultiBinOp mbOp( &gxover ); + mOp.adOp( &bitflip ); + cout << "before multiBinOp............ " << chrom << " " << chrom2 << endl; + mbOp( chrom, chrom2 ); + cout << "after multiBinOp .............. " << chrom << " " << chrom2 < // eoBin, eoPop, eoBreeder -#include -#include -#include -#include - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - unsigned i; - - eoUniform uniform(false, true); - eoBinRandom random; - eoPop pop; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - cout << "population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; - - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoProportionalOpSel propSel; - eoBreeder breeder( propSel ); - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - breeder(pop); - - // reevaluation of fitness - for_each(pop.begin(), pop.end(), binary_value); - - cout << "new population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; - - return 0; -} - -//----------------------------------------------------------------------------- +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eobreeder.cpp +// This program test the breeder object +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include // eoBin, eoPop, eoBreeder +#include +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + breeder(pop); + + // reevaluation of fitness + for_each(pop.begin(), pop.end(), binary_value); + + cout << "new population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp index 415b7d209..c0d3494c7 100644 --- a/eo/test/t-eoinclusion.cpp +++ b/eo/test/t-eoinclusion.cpp @@ -2,22 +2,15 @@ // t-eoinclusion.cpp //----------------------------------------------------------------------------- -#include // eoBin, eoPop, eoInclusion +#include +#include +#include //----------------------------------------------------------------------------- typedef eoBin Chrom; -//----------------------------------------------------------------------------- - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} +#include "binary_value.h" //----------------------------------------------------------------------------- diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp new file mode 100644 index 000000000..a6848a719 --- /dev/null +++ b/eo/test/t-selectOne.cpp @@ -0,0 +1,87 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-selectOne.cpp +// This program test the breeder object +// (c) GeNeura Team, 1998 +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include // eoBin, eoPop, eoBreeder +#include +#include + +#include +#include +#include + + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + // Create the population + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + // print population + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + // Declare 1-selectors + eoUniformSelect uSelect; + + Chrom aChrom; + aChrom = uSelect( pop ); + cout << "Uniform Select " << aChrom << " " << aChrom.fitness() << endl; + + eoStochTournament sSelect(0.7); + aChrom = sSelect( pop ); + cout << "Stochastic Tournament " << aChrom << " " << aChrom.fitness() << endl; + + eoDetTournament dSelect(3); + aChrom = dSelect( pop ); + cout << "Deterministic Tournament " << aChrom << " " << aChrom.fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am new file mode 100644 index 000000000..81189d33b --- /dev/null +++ b/eo/win/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST=EO.dsw random.dsp t_eoinsertion.dsp t_ops.dsp\ + atomops.dsp t_eoaged.dsp t_eornd.dsp t_opsel.dsp\ + t_eobin.dsp t_eostring.dsp t_opselmason.dsp\ + eo.dsp t_eobitfact.dsp t_eovector.dsp t_pop.dsp\ + t_eobreeder.dsp t_es.dsp t_popops.dsp\ + eolib.dsp t_eoid.dsp t_lottery.dsp\ From 5a735c3915f8eb8a8843a93d41fe64a2908a5ee3 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 17 Dec 1999 12:04:06 +0000 Subject: [PATCH 0076/2134] Moving function InitRamdom to eoParserUtils.h --- eo/src/Makefile.am | 12 +- eo/src/eoParser.h | 1667 +++++++++++++++++++------------------- eo/src/eoParserUtils.cpp | 32 + eo/src/eoParserUtils.h | 24 + 4 files changed, 883 insertions(+), 852 deletions(-) create mode 100644 eo/src/eoParserUtils.cpp create mode 100644 eo/src/eoParserUtils.h diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 23f08b5ce..3b4a1c90e 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -5,20 +5,22 @@ ############################################################################### lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp +libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoParserUtils.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = EO.h eo eo1d.h eo2d.h eo2dVector.h eoAged.h eoAlgo.h\ eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h \ eoAtomRandom.h eoBin.h eoBitOp.h eoBitOpFactory.h eoBreeder.h\ - eoData.h eoDetTournament.h eoDup.h eoESChrom.h eoESFullChrom.h eoESFullMut.h eoEasyEA.h\ + eoData.h eoDetTournament.h eoDup.h eoESChrom.h eoESFullChrom.h \ + eoESFullMut.h eoEasyEA.h\ eoEvalFunc.h eoEvalFuncPtr.h eoFitTerm.h eoFitness.h\ eoGenTerm.h eoGeneration.h eoID.h eoInclusion.h eoInsertion.h\ - eoKill.h eoLottery.h eoMerge.h eoMultiBinOp.h eoMultiMonOp.h eoMutation.h eoNegExp.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 eoProportionalOpSel.h eoRNG.h eoRnd.h eoString.h\ eoStochTournament.h eoTerm.h eoTranspose.h eoUniform.h \ - eoUniformSelect.h eoUniformXOver.h eoVector.h eoXOver2.h - + eoUniformSelect.h eoUniformXOver.h eoVector.h eoXOver2.h \ + eoParserUtils.h diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index 7e110f4e8..ac6034bda 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -1,847 +1,820 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -/* eoParser.h - some classes to parser either the command line or a parameter file - - (c) Marc Schoenauer and Geneura team, 1999 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _PARSER_H -#define _PARSER_H - -#include // for strcasecmp ... maybe there's a c++ way of doing it? -#ifdef _MSC_VER -#define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) -#endif - -// STL includes -#include -#include -#include -#include -#include -#include - -//----------------------------------------------------------------------------- -// Class UExceptions - probably useless ??? -//----------------------------------------------------------------------------- -/** - * This class manages exceptions. It´s barely an extension of the standard except -ion, - * but it can be initialized with an STL string. Called UException (utils-except -ion)+ - * to avoid conflicts with other classes. - */ -class UException: public exception { - public: - /// - UException( const string& _msg ): msg( _msg ) { }; - - /// - virtual const char* what() const { return msg.c_str(); }; - - private: - string msg; -}; - - -//----------------------------------------------------------------------------- -// Class Param -//----------------------------------------------------------------------------- - -/** - * A param repesents an argument that can be passed to a program in the command line - */ -class Param { -public: - - /** - * Type of params - */ - enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; - - /** - * Construct an Param. - * @param _shortName Short name of the argument - * @param _longName Long name of the argument - * @param _default The default value - * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) - * @param _description Description of the parameter. What is useful for. - * @param _required If it is a necessary parameter or not - */ - Param (string _shortName="-h", string _longName="--help", - string _default = "", valueType _valType= STRING, - string _description="Shows this help", - bool _required=false ) - : repShortName(_shortName), repLongName(_longName), - repDescription(_description ), repEnv(""), repDefault(_default), - repValue(_default), repValType( _valType), - repRequired( _required), repChanged(false) { - - const char *c = repLongName.c_str(); - for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); - parse( param ); - params.push_back( param ); - - istrstream is(param.value().c_str()); - vector retValue; - string tmpStr; - - is >> tmpStr; - while(is){ - retValue.push_back(tmpStr); - is >> tmpStr; - } - return retValue; - }; - - /** - * Gets the int value of a param given the full description of the parameter - * @param see above - * @exception BadType if the param's value isn't a correct int - */ - - int getInt (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - int retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the unsigned lon value of a param given ... - * @param see above - * @exception BadType if the param's value isn't a correct unsigned long - */ - - int getUnsignedLong (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - unsigned long retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the float value of a param given the description of the parameter - * @param see above - * @exception BadType if the param's value isn't a correct int - */ - - float getFloat (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - float retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - - string parse_string (istream & _is) { - string paramValue; - _is >> paramValue; - //if the first character of the string or array is not a " => just one word or array-element. - if( paramValue[0] != '\"' ) - return paramValue; - - if( paramValue[1] == '\"' ) // the empty string - return "" ; - - //else => read until the next " (the end of the string). - const char *c = paramValue.c_str(); - string tmpStr = c+1;// skip the " - if (tmpStr[tmpStr.length()-1] == '\"') { // one word only - tmpStr[tmpStr.length()-1] = '\0'; - return tmpStr; - } - - bool stop = false; - while (_is && !stop) { - _is >> paramValue; - // test last character of paramValue for " - if (paramValue[paramValue.length()-1] == '\"') { - paramValue[paramValue.length()-1] = '\0'; - stop = true; - } - tmpStr = tmpStr + " " + paramValue ; - } - return tmpStr; - }; - - - void parse (Param & param) { - int i; - string tmpStr, ReadStr, FirstWord; - - // FIRST: look if the associated environment variables have any value, to use them. - if( getenv( param.environment().c_str() ) ) { - //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; - if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || - ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) - ) { // found the keyword - - Param::valueType tmp = param.valType(); - switch ( tmp ) { - case Param::TITLE: - cerr << "Error, we should not be there" << endl; - exit(1); - break; - case Param::BOOL : - param.value("true" ); - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - is >> tmpStr; - param.value(tmpStr); - break; - - case Param::STRING: - tmpStr = parse_string(is); - param.value(tmpStr); - break; - - case Param::ARRAY: - ReadStr = parse_string(is); - if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array - param.value(ReadStr); - break; - } - // read next word - and keep it in case of <> mismatch - FirstWord = parse_string(is); - // test for empty array - if (FirstWord == ">") { - param.value(""); - break; - } - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_string(is); - while ( is && (ReadStr != ">") ) { - tmpStr = tmpStr + " " + ReadStr; - ReadStr = parse_string(is); - } - - if (!is) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string - } - else - param.value(tmpStr); - break; - } - } - } - } - - - // LAST (highest priority) parse the command line arguments - for (i=1 ; i" --> a single string in the array - param.value(ReadStr); - }else{ - // read next word - and keep it in case of <> mismatch - FirstWord = parse_argv[i++]; - - // test for empty array - if (FirstWord == ">") { - param.value(""); - }else{ - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_argv[i++]; - while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string - }else{ - param.value(tmpStr); - } - } - } - } - } - break; - } - - //MS after trying all possibilities, and if the value has not changed - // though the parameter was required, protest! - if (param.required() && !param.changed()) - throw Parser::MissingReqParam(param.shortName()); - - }; - - /** - * Sets a new value for a param given its short name or its long name. - * @param _name One of the names of the param. - * @param _value Value to be assigned. - * @exception UnknownArg if the param doesn't exist - * @exception MissingVal if the param hasn't got a value - */ - Param::valueType setParamValue (const string& _name, const char* _value){ - vector::iterator pos; - - for (pos=params.begin() ; pos!=params.end() ; pos++) - if (pos->shortName()==_name || pos->longName()==_name) - break; - - // if found ... - if (pos!=params.end()) { - switch ( pos->valType() ) { - case Param::TITLE: - cerr << "Error, we should not be there" << endl; - exit(1); - break; - case Param::BOOL : - pos->value("true"); - break; - case Param::ARRAY : - case Param::INT: - case Param::UL: - case Param::FLOAT: - case Param::STRING: - if (_value != NULL){ - pos->value(_value); - }else{ - throw Parser::MissingVal(_name); - return Param::BOOL; - } - break; - } // switch - - return pos->valType(); - - }else{ - throw Parser::UnknownArg(_name); - return Param::BOOL; - } - }; - - /// the output method - generate the .status file (unless other name is given) - friend ostream & operator<< ( ostream & os, Parser & _parser ) - { - vector::iterator p; - //print every param with its value - for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { - switch ( p->valType() ) { - case Param::BOOL : - if(p->value() == "true") - os << p->longName(); - else - os << "#" << p->longName() ; // so the name of the bool is commented out - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - os << p->longName()<<" "<value(); - break; - - case Param::ARRAY : - os << p->longName() << " < " << p->value().c_str() << " >" ; - break; - case Param::STRING: - os << p->longName()<<" \""<value().c_str()<<"\" "; - break; - case Param::TITLE: - os << endl; // Title is in the description below - break; - } // switch - os << "\t #" << p->shortName() << " : " << p->description(); - if (p->valType() != Param::TITLE) - os << " [" << p->defValue() << "]" ; - os << endl; - } - return os; - }; - - /** - * Prints out the list of parameters in the output file (if specified) - */ - void outputParam(string _OutputFile="") - { - if (_OutputFile == "") { - _OutputFile = parse_argv[0]; - _OutputFile += ".status"; - } - - ofstream os(_OutputFile.c_str()); - os << "Parameters used by \"" << programName << "\" (" - << programDescription << ")" << endl << endl; - os << *this; - }; - - /** - * Prints an automatic help in the standard output using the information - * provided by parameters - */ - void printHelp() { - vector::iterator p; -// unsigned i; - - // print program name and description - cout << this->programName <<": "<valType() != Param::TITLE ) { -// if( p->valType() != Param::BOOL ){ -// cout << ( (!p->required())?"[":""); -// cout <shortName()<<" value"<required())?"]":"")<<" "; -// }else{ -// cout << "["<shortName()<<"] "; -// } -// } // for p - cout << "Where:"<valType() != Param::TITLE ) { - cout << p->shortName()<<","<longName()<<":\t"<description()<valType() ) { - case Param::INT: cout <<"Integer"; break; - case Param::UL: cout <<"Unsigned Long Integer"; break; - case Param::FLOAT: cout <<"Float"; break; - case Param::STRING: cout <<"String"; break; - case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; - case Param::BOOL: cout << "Flag"; break; - case Param::TITLE: break; - } // switch - if(p->valType() == Param::BOOL) - cout << ") True if present" << endl; - else - cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<description() << endl; - } - } // for p - cout << endl; - }; - - /** - * This class managges unknown argument exceptions. - */ - class UnknownArg : public UException { - public: - - /** - * Constructor - * @param _arg string to be shown when the exception occurs - */ - UnknownArg( const string& _arg): UException( "Invalid argument: "+_arg ) { }; - }; - - /** - * This class managges bad param types. - */ - class BadType : public UException { - public: - - /** - * Constructor - * @param _param The param - * @param _value The value of the param - */ - BadType(const string& _param, const string& _value, const string& _correctType) - : UException("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; - }; - - /** - * This class managges exceptions produced when there isn't a value for a parameter. - */ - class MissingVal : public UException { - public: - - /** - * Constructor - * @param _param The param - */ - MissingVal(const string& _param) : UException("Missing value for parameter " + _param) {}; - }; - - /** - * This class managges exceptions produced when the user forgot a required parameter. - */ - class MissingReqParam : public UException { - public: - - /** - * Constructor - * @param _shortName The param's short name - */ - MissingReqParam(const string& _shortName) : UException("Missing required parameter " + _shortName) {}; - }; - - /** - * This class managges exceptions du to < without a > in array value - */ - class BadArrayParam : public UException { - public: - - /** - * Constructor - * @param _param The param - * @param _first_word The first word read after the "<" - */ - BadArrayParam(const string& _param, const string &_first_word) : - UException("Array parameter " + _param + ": No matching > (" + _first_word - + "... )") {}; - }; - -private: - vector params; - string programName; - string programDescription; - int parse_argc; - char **parse_argv; - string InputFileName; - -}; - -/// Reproducible random seed -// Maybe there is a better place for this subroutine (a separate .cpp?) -#include - -//---------------------------------- -void InitRandom( Parser & parser) { -//---------------------------------- - unsigned long _seed; - try { - _seed = parser.getUnsignedLong("-S", "--seed", "0", "Seed for Random number generator" ); - } - catch (UException & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - - if (_seed == 0) { // use clock to get a "random" seed - _seed = (unsigned long)( time( 0 ) ); - ostrstream s; - 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 - } - rng.reseed(_seed); - - return; -} - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +/* eoParser.h + some classes to parser either the command line or a parameter file + + (c) Marc Schoenauer and Geneura team, 1999 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _PARSER_H +#define _PARSER_H + +#include // for strcasecmp ... maybe there's a c++ way of doing it? +#ifdef _MSC_VER +#define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) +#endif + +// STL includes +#include +#include +#include +#include +#include +#include + +//----------------------------------------------------------------------------- +// Class UExceptions - probably useless ??? +//----------------------------------------------------------------------------- +/** + * This class manages exceptions. It´s barely an extension of the standard except + ion, + * but it can be initialized with an STL string. Called UException (utils-except + ion)+ + * to avoid conflicts with other classes. + */ +class UException: public exception { +public: + /// + UException( const string& _msg ): msg( _msg ) { }; + + /// + virtual const char* what() const { return msg.c_str(); }; + +private: + string msg; +}; + + +//----------------------------------------------------------------------------- +// Class Param +//----------------------------------------------------------------------------- + +/** + * A param repesents an argument that can be passed to a program in the command line + */ +class Param { +public: + + /** + * Type of params + */ + enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; + + /** + * Construct an Param. + * @param _shortName Short name of the argument + * @param _longName Long name of the argument + * @param _default The default value + * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) + * @param _description Description of the parameter. What is useful for. + * @param _required If it is a necessary parameter or not + */ + Param (string _shortName="-h", string _longName="--help", + string _default = "", valueType _valType= STRING, + string _description="Shows this help", + bool _required=false ) + : repShortName(_shortName), repLongName(_longName), + repDescription(_description ), repEnv(""), repDefault(_default), + repValue(_default), repValType( _valType), + repRequired( _required), repChanged(false) { + + const char *c = repLongName.c_str(); + for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); + parse( param ); + params.push_back( param ); + + istrstream is(param.value().c_str()); + vector retValue; + string tmpStr; + + is >> tmpStr; + while(is){ + retValue.push_back(tmpStr); + is >> tmpStr; + } + return retValue; + }; + + /** + * Gets the int value of a param given the full description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + int getInt (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + int retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the unsigned lon value of a param given ... + * @param see above + * @exception BadType if the param's value isn't a correct unsigned long + */ + + int getUnsignedLong (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + unsigned long retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the float value of a param given the description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + float getFloat (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + float retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + + string parse_string (istream & _is) { + string paramValue; + _is >> paramValue; + //if the first character of the string or array is not a " => just one word or array-element. + if( paramValue[0] != '\"' ) + return paramValue; + + if( paramValue[1] == '\"' ) // the empty string + return "" ; + + //else => read until the next " (the end of the string). + const char *c = paramValue.c_str(); + string tmpStr = c+1;// skip the " + if (tmpStr[tmpStr.length()-1] == '\"') { // one word only + tmpStr[tmpStr.length()-1] = '\0'; + return tmpStr; + } + + bool stop = false; + while (_is && !stop) { + _is >> paramValue; + // test last character of paramValue for " + if (paramValue[paramValue.length()-1] == '\"') { + paramValue[paramValue.length()-1] = '\0'; + stop = true; + } + tmpStr = tmpStr + " " + paramValue ; + } + return tmpStr; + }; + + + void parse (Param & param) { + int i; + string tmpStr, ReadStr, FirstWord; + + // FIRST: look if the associated environment variables have any value, to use them. + if( getenv( param.environment().c_str() ) ) { + //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; + if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || + ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) + ) { // found the keyword + + Param::valueType tmp = param.valType(); + switch ( tmp ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + param.value("true" ); + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + is >> tmpStr; + param.value(tmpStr); + break; + + case Param::STRING: + tmpStr = parse_string(is); + param.value(tmpStr); + break; + + case Param::ARRAY: + ReadStr = parse_string(is); + if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array + param.value(ReadStr); + break; + } + // read next word - and keep it in case of <> mismatch + FirstWord = parse_string(is); + // test for empty array + if (FirstWord == ">") { + param.value(""); + break; + } + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_string(is); + while ( is && (ReadStr != ">") ) { + tmpStr = tmpStr + " " + ReadStr; + ReadStr = parse_string(is); + } + + if (!is) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + } + else + param.value(tmpStr); + break; + } + } + } + } + + + // LAST (highest priority) parse the command line arguments + for (i=1 ; i" --> a single string in the array + param.value(ReadStr); + }else{ + // read next word - and keep it in case of <> mismatch + FirstWord = parse_argv[i++]; + + // test for empty array + if (FirstWord == ">") { + param.value(""); + }else{ + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_argv[i++]; + while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + }else{ + param.value(tmpStr); + } + } + } + } + } + break; + } + + //MS after trying all possibilities, and if the value has not changed + // though the parameter was required, protest! + if (param.required() && !param.changed()) + throw Parser::MissingReqParam(param.shortName()); + + }; + + /** + * Sets a new value for a param given its short name or its long name. + * @param _name One of the names of the param. + * @param _value Value to be assigned. + * @exception UnknownArg if the param doesn't exist + * @exception MissingVal if the param hasn't got a value + */ + Param::valueType setParamValue (const string& _name, const char* _value){ + vector::iterator pos; + + for (pos=params.begin() ; pos!=params.end() ; pos++) + if (pos->shortName()==_name || pos->longName()==_name) + break; + + // if found ... + if (pos!=params.end()) { + switch ( pos->valType() ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + pos->value("true"); + break; + case Param::ARRAY : + case Param::INT: + case Param::UL: + case Param::FLOAT: + case Param::STRING: + if (_value != NULL){ + pos->value(_value); + }else{ + throw Parser::MissingVal(_name); + return Param::BOOL; + } + break; + } // switch + + return pos->valType(); + + }else{ + throw Parser::UnknownArg(_name); + return Param::BOOL; + } + }; + + /// the output method - generate the .status file (unless other name is given) + friend ostream & operator<< ( ostream & os, Parser & _parser ) + { + vector::iterator p; + //print every param with its value + for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { + switch ( p->valType() ) { + case Param::BOOL : + if(p->value() == "true") + os << p->longName(); + else + os << "#" << p->longName() ; // so the name of the bool is commented out + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + os << p->longName()<<" "<value(); + break; + + case Param::ARRAY : + os << p->longName() << " < " << p->value().c_str() << " >" ; + break; + case Param::STRING: + os << p->longName()<<" \""<value().c_str()<<"\" "; + break; + case Param::TITLE: + os << endl; // Title is in the description below + break; + } // switch + os << "\t #" << p->shortName() << " : " << p->description(); + if (p->valType() != Param::TITLE) + os << " [" << p->defValue() << "]" ; + os << endl; + } + return os; + }; + + /** + * Prints out the list of parameters in the output file (if specified) + */ + void outputParam(string _OutputFile="") + { + if (_OutputFile == "") { + _OutputFile = parse_argv[0]; + _OutputFile += ".status"; + } + + ofstream os(_OutputFile.c_str()); + os << "Parameters used by \"" << programName << "\" (" + << programDescription << ")" << endl << endl; + os << *this; + }; + + /** + * Prints an automatic help in the standard output using the information + * provided by parameters + */ + void printHelp() { + vector::iterator p; + // unsigned i; + + // print program name and description + cout << this->programName <<": "<valType() != Param::TITLE ) { + // if( p->valType() != Param::BOOL ){ + // cout << ( (!p->required())?"[":""); + // cout <shortName()<<" value"<required())?"]":"")<<" "; + // }else{ + // cout << "["<shortName()<<"] "; + // } + // } // for p + cout << "Where:"<valType() != Param::TITLE ) { + cout << p->shortName()<<","<longName()<<":\t"<description()<valType() ) { + case Param::INT: cout <<"Integer"; break; + case Param::UL: cout <<"Unsigned Long Integer"; break; + case Param::FLOAT: cout <<"Float"; break; + case Param::STRING: cout <<"String"; break; + case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; + case Param::BOOL: cout << "Flag"; break; + case Param::TITLE: break; + } // switch + if(p->valType() == Param::BOOL) + cout << ") True if present" << endl; + else + cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<description() << endl; + } + } // for p + cout << endl; + }; + + /** + * This class managges unknown argument exceptions. + */ + class UnknownArg : public UException { + public: + + /** + * Constructor + * @param _arg string to be shown when the exception occurs + */ + UnknownArg( const string& _arg): UException( "Invalid argument: "+_arg ) { }; + }; + + /** + * This class managges bad param types. + */ + class BadType : public UException { + public: + + /** + * Constructor + * @param _param The param + * @param _value The value of the param + */ + BadType(const string& _param, const string& _value, const string& _correctType) + : UException("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; + }; + + /** + * This class managges exceptions produced when there isn't a value for a parameter. + */ + class MissingVal : public UException { + public: + + /** + * Constructor + * @param _param The param + */ + MissingVal(const string& _param) : UException("Missing value for parameter " + _param) {}; + }; + + /** + * This class managges exceptions produced when the user forgot a required parameter. + */ + class MissingReqParam : public UException { + public: + + /** + * Constructor + * @param _shortName The param's short name + */ + MissingReqParam(const string& _shortName) : UException("Missing required parameter " + _shortName) {}; + }; + + /** + * This class managges exceptions du to < without a > in array value + */ + class BadArrayParam : public UException { + public: + + /** + * Constructor + * @param _param The param + * @param _first_word The first word read after the "<" + */ + BadArrayParam(const string& _param, const string &_first_word) : + UException("Array parameter " + _param + ": No matching > (" + _first_word + + "... )") {}; + }; + +private: + vector params; + string programName; + string programDescription; + int parse_argc; + char **parse_argv; + string InputFileName; + +}; + + + + +#endif diff --git a/eo/src/eoParserUtils.cpp b/eo/src/eoParserUtils.cpp new file mode 100644 index 000000000..f12b6b962 --- /dev/null +++ b/eo/src/eoParserUtils.cpp @@ -0,0 +1,32 @@ +// See eoParserUtils.h + +#include +#include +/// Reproducible random seed + +//---------------------------------- +void InitRandom( Parser & parser) { +//---------------------------------- + unsigned long _seed; + try { + _seed = parser.getUnsignedLong("-S", "--seed", "0", + "Seed for Random number generator" ); + } + catch (UException & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + + if (_seed == 0) { // use clock to get a "random" seed + _seed = (unsigned long)( time( 0 ) ); + ostrstream s; + 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 + } + rng.reseed(_seed); + + return; +} + diff --git a/eo/src/eoParserUtils.h b/eo/src/eoParserUtils.h new file mode 100644 index 000000000..4bd8dc456 --- /dev/null +++ b/eo/src/eoParserUtils.h @@ -0,0 +1,24 @@ +/*------------------------------------------------------- +File..........: eoParserUtils.h +Author........: Geneura Team, Marc Shoenauer + (this file: Victor Rivas, vrivas@ujaen.es) +Date..........: 17-Dec-1999 +Description...: Some useful things that use eoParser. +Modifications.: +------------------- 1 ------------------- + Author.......: + Date.........: + Description..: +*/ + +#ifndef EO_PARSER_UTILS +#define EO_PARSER_UTILS + +#include +#include +/// Reproducible random seed + +//---------------------------------- +void InitRandom( Parser & parser); +//---------------------------------- +#endif From 050df933c8014f7411ca642cb6dd919d6ed69d06 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 21 Dec 1999 09:58:45 +0000 Subject: [PATCH 0077/2134] Minor changes in eoParser.h --- eo/src/eoParser.h | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index ac6034bda..581d78d93 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -634,7 +634,7 @@ public: for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { switch ( p->valType() ) { case Param::BOOL : - if(p->value() == "true") + if( p->value() == (string) "true") os << p->longName(); else os << "#" << p->longName() ; // so the name of the bool is commented out @@ -710,7 +710,9 @@ public: for ( p=params.begin(); p!=params.end(); p++ ) { if( p->valType() != Param::TITLE ) { - cout << p->shortName()<<","<longName()<<":\t"<description()<shortName() + <<", --"<longName()<<":\t" + <description()<valType() ) { @@ -803,7 +805,31 @@ public: UException("Array parameter " + _param + ": No matching > (" + _first_word + "... )") {}; }; - + + void createParamFile( ostream& _os ) { + vector::iterator p; + for ( p=params.begin(); p!=params.end(); p++ ) { + switch( p->valType() ) { + case Param::TITLE: + _os << endl << "# -- "; + break; + case Param::BOOL: + _os << ((p->value()=="true" )?"":"#") + << p->longName(); + break; + case Param::STRING: + _os << p->longName()<<"\t\""<value()<<"\""; + break; + case Param::ARRAY: + _os << p->longName()<<"\t< "<value()<<" >"; + break; + default: + _os << p->longName()<<"\t"<value(); + break; + } // switch + _os << "\t #" << p->description() << endl; + } + } private: vector params; string programName; From a92af188c8712344f41559216c8c08023f5dcb6b Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 21 Dec 1999 11:41:19 +0000 Subject: [PATCH 0078/2134] Updating the selectors: they inherited from eoSelect and noew the inherite from eoBinPopOp --- eo/src/eoRandomSelect.h | 15 ++++++++------- eo/src/eoTournament.h | 8 ++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 651174e8a..4265cc9d6 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -40,20 +40,21 @@ * eoRandomSelect: an selection operator, which selects randomly a percentage of the initial population. */ -template class eoRandomSelect: public eoSelect +template class eoRandomSelect: public eoBinPopOp { public: /// - eoRandomSelect(const float& _percent = 0.4): eoSelect(), rate(_percent) {}; + eoRandomSelect(const float& _percent = 0.4): + eoBinPopOp(), repRate(_percent) {}; /// virtual ~eoRandomSelect() {}; /// Takes a percentage of the population randomly, and transfers it to siblings - virtual void operator() ( const eoPop& _parents, eoPop& _siblings ) const { + virtual void operator() ( eoPop& _parents, eoPop& _siblings ) { // generates random numbers eoUniform uniform(0, _parents.size()-1); - unsigned num_chroms = (unsigned)(rate * _parents.size()); + unsigned num_chroms = (unsigned)(repRate * _parents.size()); // selection of chromosomes do { @@ -69,7 +70,7 @@ template class eoRandomSelect: public eoSelect * @param _s A istream. */ virtual void readFrom(istream& _s) { - _s >> rate; + _s >> repRate; } /** Print itself: inherited from eoObject implementation. Declared virtual so that @@ -77,7 +78,7 @@ template class eoRandomSelect: public eoSelect base classes, so you don´t have to worry about, for instance, fitness. @param _s the ostream in which things are written*/ virtual void printOn( ostream& _s ) const{ - _s << rate; + _s << repRate; } /** Inherited from eoObject @@ -89,7 +90,7 @@ template class eoRandomSelect: public eoSelect private: - float rate; + float repRate; }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoTournament.h b/eo/src/eoTournament.h index c71e16ad9..dad956540 100644 --- a/eo/src/eoTournament.h +++ b/eo/src/eoTournament.h @@ -38,12 +38,12 @@ @author JJ Merelo, 1998 */ template -class eoTournament:public eoSelect{ +class eoTournament:public eoBinPopOp{ public: /// Proportion of guys that are going to be eliminated - eoTournament( float _perc, unsigned _tSize): eoSelect(), - perc( _perc), repTournamentSize(_tSize){}; + eoTournament( float _perc, unsigned _tSize): + eoBinPopOp(), perc( _perc), repTournamentSize(_tSize){}; /// Virtual dtor ~eoTournament(){}; @@ -55,7 +55,7 @@ public: * Selects from the initial pop using tournament selection, and copies it * to the other population. */ - virtual void operator() ( const eoPop& _vEO, eoPop& _aVEO) const { + virtual void operator() ( eoPop& _vEO, eoPop& _aVEO) { unsigned thisSize = _vEO.size(); From bf3e77d97b0969fe779e1f9184f21b85eeda051f Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 21 Dec 1999 12:12:29 +0000 Subject: [PATCH 0079/2134] eoOpSelector has a method called getOp that HAD to return a non-constant reference to an operator; in fact it returned a CONST reference. Now, I've changed it --- eo/src/eoOpSelector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index d4c9940b9..8d6286259 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -55,7 +55,7 @@ public: modified or whatever @param _id a previously assigned ID @throw runtime_exception if the ID does not exist*/ - virtual const eoOp& getOp( ID _id ) = 0; + virtual eoOp& getOp( ID _id ) = 0; /** Remove an operator from the operator set @param _id a previously assigned ID From 7d3e4c83f28176b7369acbbe5e16d0cff9243567 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 21 Dec 1999 13:39:42 +0000 Subject: [PATCH 0080/2134] Minor changes in eoRNG.h --- eo/src/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index a128d4391..6356ef935 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -197,7 +197,7 @@ public : { if (total == 0) { // count - for (int i = 0; i < vec.size(); ++i) + for (unsigned i = 0; i < vec.size(); ++i) total += vec[i]; } From 8eac30156619989786efcece181cb799e20c3c66 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 4 Jan 2000 10:43:06 +0000 Subject: [PATCH 0081/2134] Changing the way parameters are shown to the user when the -h or --help flags are used --- eo/src/eoParser.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index 581d78d93..7a55151eb 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -710,10 +710,16 @@ public: for ( p=params.begin(); p!=params.end(); p++ ) { if( p->valType() != Param::TITLE ) { + // Victor: 04-Jan-2000 + // Modified because the - and -- prefixes are not needed. + /* cout << "-" << p->shortName() <<", --"<longName()<<":\t" <description()<shortName() + <<", " << p->longName()<<":\t" + <description()<valType() ) { case Param::INT: cout <<"Integer"; break; From 29dc5ac0342f90295d0e25d3953fe8d1005a2a68 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 4 Jan 2000 13:04:00 +0000 Subject: [PATCH 0082/2134] A little problem existed when the Parser tried to read a String because a \0 was inserted sometimes (no others) making imposible to add a new string to the one read and then turning the full string into a char* (understable? :-) --- eo/src/eoParser.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index 7a55151eb..d35016358 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -430,7 +430,8 @@ public: const char *c = paramValue.c_str(); string tmpStr = c+1;// skip the " if (tmpStr[tmpStr.length()-1] == '\"') { // one word only - tmpStr[tmpStr.length()-1] = '\0'; + //tmpStr[tmpStr.length()-1] = '\0'; + tmpStr.erase( &tmpStr[tmpStr.length()-1] ); return tmpStr; } @@ -439,7 +440,8 @@ public: _is >> paramValue; // test last character of paramValue for " if (paramValue[paramValue.length()-1] == '\"') { - paramValue[paramValue.length()-1] = '\0'; + paramValue.erase( ¶mValue[paramValue.length()-1] ); + //paramValue[paramValue.length()-1] = '\0'; stop = true; } tmpStr = tmpStr + " " + paramValue ; From c0e85685f80ef72fa7c51ac759ff2f52c49e1eac Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 11 Jan 2000 12:13:18 +0000 Subject: [PATCH 0083/2134] bug fix in eoTournament --- eo/src/eoTournament.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/eo/src/eoTournament.h b/eo/src/eoTournament.h index dad956540..5a754b7ff 100644 --- a/eo/src/eoTournament.h +++ b/eo/src/eoTournament.h @@ -61,17 +61,23 @@ public: // Build vector for ( unsigned j = 0; j < thisSize*perc; j ++ ) { - // Randomly select a tournamentSize set, and choose the best - eoPop veoTournament; - eoUniform u( 0, thisSize); - for ( unsigned k = 0; k < repTournamentSize; k++ ) { - unsigned chosen = u(); - EOT newEO = _vEO[chosen]; - veoTournament.push_back( newEO ); - } - sort( veoTournament.begin(), veoTournament.end() ); - // The first is chosen for the new population - _aVEO.push_back( veoTournament.front() ); + // Randomly select a tournamentSize set, and choose the best + eoPop veoTournament; + eoUniform u( 0, thisSize); + for ( unsigned k = 0; k < repTournamentSize; k++ ) { + unsigned chosen = u(); + EOT newEO = _vEO[chosen]; + veoTournament.push_back( newEO ); + } + + eoPop::const_iterator best = max_element(veoTournament.begin(), + veoTournament.end()); + if (best == veoTournament.end()) { + throw runtime_error("error in void eoTournament::operator(eoPop&, eoPop&)"); + } + + // The first is chosen for the new population + _aVEO.push_back( best ); } }; From 6fece409a7837b71b097b236219d6591c7acb902 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 11 Jan 2000 13:25:32 +0000 Subject: [PATCH 0084/2134] Another little bug fixed --- eo/src/eoTournament.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoTournament.h b/eo/src/eoTournament.h index 5a754b7ff..45db15dcd 100644 --- a/eo/src/eoTournament.h +++ b/eo/src/eoTournament.h @@ -76,8 +76,8 @@ public: throw runtime_error("error in void eoTournament::operator(eoPop&, eoPop&)"); } - // The first is chosen for the new population - _aVEO.push_back( best ); + // The best individual is chosen for the new population + _aVEO.push_back( *best ); } }; From 729fa74b42b62902ba2bb1409ba03e96035bb2fb Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 18 Jan 2000 13:43:39 +0000 Subject: [PATCH 0085/2134] I have change the do...while(terminator) into while(terminator){...}, because may be the termination condition is reached just atthe beginning (for instance 0 generations) --- eo/src/eoEasyEA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 49a905ebf..13f9e5367 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -57,7 +57,7 @@ template class eoEasyEA: public eoAlgo /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { - do { + while ( terminator( pop ) ){ try { step(pop); @@ -68,7 +68,7 @@ template class eoEasyEA: public eoAlgo s.append( " in eoEasyEA "); throw runtime_error( s ); } - } while ( terminator( pop ) ); + } } /// Class name. From 96f618f88fd53aaee94b831ec9f8d657b3900ee2 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 24 Jan 2000 21:13:21 +0000 Subject: [PATCH 0086/2134] some reviews --- eo/src/EO.h | 272 +++++++++--------- eo/src/UException.h | 41 --- eo/src/eo1d.h | 15 +- eo/src/eo2dVector.h | 667 ++++++++++++++++++++++---------------------- eo/src/eoBin.h | 23 +- eo/src/eoParser.h | 44 +-- 6 files changed, 508 insertions(+), 554 deletions(-) delete mode 100644 eo/src/UException.h diff --git a/eo/src/EO.h b/eo/src/EO.h index 9e71a4dea..81668b897 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -1,137 +1,135 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// EO.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EO_H -#define EO_H - -//----------------------------------------------------------------------------- - -#include // runtime_error -#include -#include - -//----------------------------------------------------------------------------- -/** EO is a base class for evolvable objects, that is, the subjects of evolution. - EOs have only got a fitness, which at the same time needs to be only an object with the - operation less than (<) defined. Fitness says how good is the object; evolution or change - of these objects is left to the genetic operators. A fitness less than another means a - worse fitness, in whatever the context; thus, fitness is always maximized; although - it can be minimized with a proper definition of the < operator.\\ - The fitness object must have, besides an void ctor, a copy ctor. -*/ -template class EO: public eoObject, public eoPersistent -{ -public: - typedef F Fitness; - - /** Default constructor. - Fitness must have a ctor which takes 0 as a value; we can not use void ctors here - since default types like float have no void initializer. VC++ allows it, but gcc does not - */ - EO(): repFitness(0), invalidFitness(true) {} - - /** Ctor from stream. - Fitness must have defined the lecture from an istream. - */ - EO( istream& _is ) { - _is >> repFitness; - invalidFitness = false; - }; - - /// Copy ctor - EO( const EO& _eo ): repFitness( _eo.repFitness ), invalidFitness( _eo.invalidFitness ) {}; - - /// Virtual dtor - virtual ~EO() {}; - - /// Return fitness value. - Fitness fitness() const - { - if (invalid()) - //throw runtime_error("invalid fitness"); - cout << "invalid fitness" << endl; - return repFitness; - } - - // Set fitness as invalid. - void invalidate() { invalidFitness = true; } - - /** Set fitness. At the same time, validates it. - * @param _fitness New fitness value. - */ - void fitness(const Fitness& _fitness) - { - repFitness = _fitness; - invalidFitness = false; - } - - /** Return true If fitness value is invalid, false otherwise. - * @return true If fitness is invalid. - */ - bool invalid() const { return invalidFitness; } - - /** Returns true if - @return true if the fitness is higher - */ - bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness();} - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - * @return the class name as a string - */ - virtual string className() const { return "EO"; }; - - /** - * Read object.\\ - * Calls base class, just in case that one had something to do. The read and print - * methods should be compatible and have the same format. In principle, format is - * "plain": they just print a number - * @param _is a istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) { - _is >> repFitness; - invalidFitness = false; - } - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << repFitness << endl; - } - - //@} - -private: - Fitness repFitness; // value of fitness for this chromosome - bool invalidFitness; // true if the value of fitness is invalid -}; - -//----------------------------------------------------------------------------- - -#endif EO_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EO.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EO_H +#define EO_H + +//----------------------------------------------------------------------------- + +#include // runtime_error +#include // +#include // + +//----------------------------------------------------------------------------- +/** EO is a base class for evolvable objects, that is, the subjects of + evolution. EOs have only got a fitness, which at the same time needs to be + only an object with the operation less than (<) defined. Fitness says how + good is the object; evolution or change of these objects is left to the + genetic operators. A fitness less than another means a worse fitness, in + whatever the context; thus, fitness is always maximized; although it can + be minimized with a proper definition of the < operator. The fitness + object must have, besides an void ctor, a copy ctor. +*/ +template class EO: public eoObject, public eoPersistent +{ +public: + typedef F Fitness; + + /** Default constructor. + Fitness must have a ctor which takes 0 as a value; we can not use void + ctors here since default types like float have no void initializer. + VC++ allows it, but gcc does not + */ + EO(): repFitness(0), invalidFitness(true) {} + + /** Ctor from stream. + Fitness must have defined the lecture from an istream. + */ + EO( istream& _is ) { readFrom(_is); } + + /// Virtual dtor + virtual ~EO() {}; + + /// Return fitness value. + Fitness fitness() const { + if (invalid()) + throw runtime_error("invalid fitness"); + return repFitness; + } + + // Set fitness as invalid. + void invalidate() { invalidFitness = true; } + + /** Set fitness. At the same time, validates it. + * @param _fitness New fitness value. + */ + void fitness(const Fitness& _fitness) + { + repFitness = _fitness; + invalidFitness = false; + } + + /** Return true If fitness value is invalid, false otherwise. + * @return true If fitness is invalid. + */ + bool invalid() const { return invalidFitness; } + + /** Returns true if + @return true if the fitness is higher + */ + bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness(); } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "EO"; } + + /** + * Read object.\\ + * Calls base class, just in case that one had something to do. + * The read and print methods should be compatible and have the same format. + * In principle, format is "plain": they just print a number + * @param _is a istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + _is >> repFitness; + if (is) + invalidFitness = false; + else + throw runtime_error("EO(istream&): can't read valid eo from istream"); + } + + /** + * Write object. Called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << repFitness << endl; + } + + //@} + +private: + Fitness repFitness; // value of fitness for this chromosome + bool invalidFitness; // true if the value of fitness is invalid +}; + +//----------------------------------------------------------------------------- + +#endif EO_H + diff --git a/eo/src/UException.h b/eo/src/UException.h deleted file mode 100644 index 41e8213f5..000000000 --- a/eo/src/UException.h +++ /dev/null @@ -1,41 +0,0 @@ -//----------------------------------------------------------------------------- -// UException.h -//----------------------------------------------------------------------------- - -#ifndef _UEXCEPTION_H -#define _UEXCEPTION_H - -#include -#if defined (__BCPLUSPLUS__) -#include -#else -#include -#endif - -using namespace std; - -//----------------------------------------------------------------------------- -// Class UException -//----------------------------------------------------------------------------- - -//@{ -/** - * This class manages exceptions. It´s barely an extension of the standard exception, - * but it can be initialized with an STL string. Called UException (utils-exception)+ - * to avoid conflicts with other classes. - */ -class UException: public exception { - public: - /// - UException( const string& _msg ): msg( _msg ) { }; - - /// - virtual const char* what() const { return msg.c_str(); }; - - private: - string msg; -}; - - -//@} -#endif diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h index de33bf055..e9c4d66f0 100644 --- a/eo/src/eo1d.h +++ b/eo/src/eo1d.h @@ -34,14 +34,13 @@ using namespace std; /** @name eo1d class -* Randomly accesible evolvable object with one dimension, with -variable length. -* Use this if you want to evolve "linear" things, like bitstrings, or -floating-point arrays. If you don't, subclass directly from EO -* @see EO -* @author GeNeura -* @version 0.2 -*/ + * Randomly accesible evolvable object with one dimension, with variable + * length. Use this if you want to evolve "linear" things, like bitstrings, + * or floating-point arrays. If you don't, subclass directly from EO + * @see EO + * @author GeNeura + * @version 0.2 + */ //@{ diff --git a/eo/src/eo2dVector.h b/eo/src/eo2dVector.h index 13e007a9c..febbca362 100644 --- a/eo/src/eo2dVector.h +++ b/eo/src/eo2dVector.h @@ -1,333 +1,334 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/* ------------------------------------------------------------------------------ -File............: eo2dVector.h -Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) -Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) -Description.....: Implementation of a 2-dimensional chromosome usign STL - vectors. - - ================ Modif. 1 ================ - Author........: - Date..........: - Description...: - -QUEDA: Operador de asignación, lectura desde istream, escritura a ostream ------------------------------------------------------------------------------ -*/ -//----------------------------------------------------------------------------- -// eo2dVector.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eo2dVector_H -#define _eo2dVector_H - -// STL libraries -#include // For vector -#include -#include -#include - -#include -#include - -/** Adaptor that turns an STL vector of vectror into an EO - with the same gene type as the type with which - the vector of vector has been instantiated. -*/ -template -class eo2dVector: public eo2d, public vector< vector > { -public: - typedef T Type ; - - /** @name Canonical part of the objects: several ctors, copy ctor, \ - * dtor and assignment operator. - */ - //@{ - - /** Ctor. - @param _rows Number of rows. - @param _cols Number of columns. - @param _val Common initial value - */ - eo2dVector( const unsigned _rows = 0, - const unsigned _cols = 0, - T _val = T() ) - : eo2d(), vector< vector >( _rows, vector( _cols, _val ) ){}; - - /** Ctor using a random number generator. - @param _rows Number of rows. - @param _cols Number of columns. - @param _rnd A random "T-type" generator, which returns a random value each time it´s called. - */ - eo2dVector( const unsigned _rows, - const unsigned _cols, - eoRnd& _rnd ); - - /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, -which is supposed to be dynamic and dependent on environment. - @param _is the input stream; should have all values in a single line, separated by whitespace - */ - //eo2dVector( istream& _is); - - - /// copy ctor - eo2dVector( const eo2dVector & _eo ) - : eo2d( _eo ), vector< vector >( _eo ){ }; - - /// Assignment operator - /* - const eo2dVector& operator =( const eo2dVector & _eo ) { - if ( this != &_eo ){ - eo2d::operator=( _eo ); - vector< >::operator=( _eo ); - } - return *this; - } - */ - /// dtor - virtual ~eo2dVector() {}; - - //@} - /** Reads and returns a copy of the gene in position _r,_c.\ - This implies that T must have a copy ctor . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# - @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() - */ - virtual T getGene( const unsigned _r, - const unsigned _c ) const { - if ( _r >= numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::getGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _c >= numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::getGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - return (*this)[_r][_c]; - }; - /** Overwrites the gene placed in position _r,_c with a - * new value. This means that the assignment operator - * for T must be defined . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# - @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() - */ - virtual void setGene( const unsigned _r, - const unsigned _c, - const T& _value ) { - if ( _r >= numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::setGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _c >= numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::setGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - (*this)[_r][_c]=_value; - }; - - - - /** Inserts a row, moving the rest to the bottom. - * If _r = numOfRows(), it insert it at the end. - * Obviously, changes number of rows. - @param _r Position where the new row will be inserted. - @param _val Vector containing the new values to be inserted. - @exception invalid_argument If _val has not numOfCols() components. - @exception out_of_range If _r is greater than numOfRows() - */ - virtual void insertRow( const unsigned _r, - const vector& _val ) { - // Test errors. - if ( _r > numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertRow: row out of range. " - << "It should be <=" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _val.size() != numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertRow: " - << "Incorrect number of values to be added. " - << "It should be ==" << numOfCols() << '\0' << endl; - throw invalid_argument( msg.str() ); - } - - // Insert the row. - vector< vector >::iterator ite = begin()+_r; - insert( ite, _val ); - }; - - /** Eliminates the row at position _r; all the other genes will - be shifted up. - @param _r Number of he row to be deleted. - @exception out_of_range if _r >=numOfRows() - */ - virtual void deleteRow( const unsigned _r ) { - // Test error. - if ( _r >= numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::deleteRow: " - << "Row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; - throw out_of_range( msg.str() ); - } - // Delete row. - vector< vector >::iterator ite = this->begin()+_r; - this->erase( ite ); - }; - - /** Inserts a column, moving the rest to the right. - * If _c = numOfCols(), it insert it at the end. - * Obviously, changes number of cols. - @param _r Position where the new column will be inserted. - @param _val Vector containing the new values to be inserted. - @exception invalid_argument if _val has not numOfRows() components. - */ - virtual void insertCol( const unsigned _c, - const vector& _val ) { - // Test errors. - if ( _c > numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertCol: " - << "Column out of range. " - << "It should be >=" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - if ( _val.size() != numOfRows() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::insertCol: " - << "Incorrect number of values to be added. " - << "It should be ==" << numOfRows() << '\0' << endl; - throw invalid_argument( msg.str() ); - } - - // Insert column. - for( unsigned r=0; r >::iterator it1 = begin()+r; - vector::iterator it2 = (*it1).begin()+_c; - (*it1).insert( it2, _val[r] ); - }; - } - - /** Eliminates the column at position _c; all the other columns will - be shifted left. - @param _c Number of he column to be deleted. - @exception out_of_range if _c >=numOfCols() - */ - virtual void deleteCol( const unsigned _c ) { - // Test error. - if ( _c >= numOfCols() ) { - ostrstream msg; - msg << "ERROR in eo2dVector::deleteCol: " - << "Column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; - throw out_of_range( msg.str() ); - } - // Delete columns. - for( unsigned r=0; r >::iterator it1 = begin()+r; - vector::iterator it2 = (*it1).begin()+_c; - (*it1).erase( it2 ); - } - }; - - /// Returns the number of rows in the eo2d - virtual unsigned numOfRows() const { - return size(); - }; - - /// Returns the number of columns in the eo2d - virtual unsigned numOfCols() const { - return begin()->size(); - }; - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eo2dVector";}; - //@} - -}; - - -//____________________________ Some method implementation ____________________ - -// Ctors_______________________________________________________________________ -//_____________________________________________________________________________ -template -eo2dVector::eo2dVector( const unsigned _rows, - const unsigned _cols, - eoRnd& _rnd ) - : eo2d(), vector< vector >( _rows, vector( _cols, T() ) ){ - for ( vector< vector >::iterator i = begin(); i != end(); ++i ) { - for( vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { - *j = _rnd(); - } - } -}; - -//_____________________________________________________________________________ -/*template -eoVector::eoVector( istream& _is) - : eo1d(), vector( ){ - while (_is ) { - T tmp; - _is >> tmp; - push_back( tmp ); - } - -}; -*/ - -//_____________________________________________________________________________ -template -ostream& operator<<( ostream& _os, const eo2dVector& _eo) { - for( unsigned i=0; i<_eo.numOfRows(); ++i ) { - for( unsigned j=0; j<_eo.numOfCols(); ++j ) { - _os << _eo.getGene( i,j ) << " "; - } - _os << endl; - } - return _os; -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* +----------------------------------------------------------------------------- +File............: eo2dVector.h +Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) +Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) +Description.....: Implementation of a 2-dimensional chromosome usign STL + vectors. + + ================ Modif. 1 ================ + Author........: + Date..........: + Description...: + +QUEDA: Operador de asignación, lectura desde istream, escritura a ostream +----------------------------------------------------------------------------- +*/ +//----------------------------------------------------------------------------- +// eo2dVector.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eo2dVector_H +#define _eo2dVector_H + +// STL libraries +#include // For vector +#include +#include +#include + +#include +#include + +/** Adaptor that turns an STL vector of vectror into an EO + with the same gene type as the type with which + the vector of vector has been instantiated. +*/ +template +class eo2dVector: public eo2d, public vector< vector > { +public: + typedef T Type ; + + /** @name Canonical part of the objects: several ctors, copy ctor, \ + * dtor and assignment operator. + */ + //@{ + + /** Ctor. + @param _rows Number of rows. + @param _cols Number of columns. + @param _val Common initial value + */ + eo2dVector( const unsigned _rows = 0, + const unsigned _cols = 0, + T _val = T() ) + : eo2d(), vector< vector >( _rows, vector( _cols, _val ) ){}; + + /** Ctor using a random number generator. + @param _rows Number of rows. + @param _cols Number of columns. + @param _rnd A random "T-type" generator, which returns a random value each time it´s called. + */ + eo2dVector( const unsigned _rows, + const unsigned _cols, + eoRnd& _rnd ); + + /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, + which is supposed to be dynamic and dependent on environment. + @param _is the input stream; should have all values in a single line, separated by whitespace + */ + //eo2dVector( istream& _is); + + + /// copy ctor + eo2dVector( const eo2dVector & _eo ) + : eo2d( _eo ), vector< vector >( _eo ){ }; + + /// Assignment operator + /* + const eo2dVector& operator =( const eo2dVector & _eo ) { + if ( this != &_eo ){ + eo2d::operator=( _eo ); + vector< >::operator=( _eo ); + } + return *this; + } + */ + /// dtor + virtual ~eo2dVector() {}; + + //@} + /** Reads and returns a copy of the gene in position _r,_c.\ + This implies that T must have a copy ctor . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @return what's inside the gene, with the correct type + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual T getGene( const unsigned _r, + const unsigned _c ) const { + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::getGene: row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::getGene: column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + return (*this)[_r][_c]; + }; + /** Overwrites the gene placed in position _r,_c with a + * new value. This means that the assignment operator + * for T must be defined . + @param _r Index for rows. Must be an unsigned less than #numOfRows()# + @param _c Index for columns. Must be an unsigned less than #numOfCols()# + @return what's inside the gene, with the correct type + @exception out_of_range if _r >=numOfRows() + @exception out_of_range if _c >=numOfCols() + */ + virtual void setGene( const unsigned _r, + const unsigned _c, + const T& _value ) { + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::setGene: row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::setGene: column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + (*this)[_r][_c]=_value; + }; + + + + /** Inserts a row, moving the rest to the bottom. + * If _r = numOfRows(), it insert it at the end. + * Obviously, changes number of rows. + @param _r Position where the new row will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_argument If _val has not numOfCols() components. + @exception out_of_range If _r is greater than numOfRows() + */ + virtual void insertRow( const unsigned _r, + const vector& _val ) { + // Test errors. + if ( _r > numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertRow: row out of range. " + << "It should be <=" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _val.size() != numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertRow: " + << "Incorrect number of values to be added. " + << "It should be ==" << numOfCols() << '\0' << endl; + throw invalid_argument( msg.str() ); + } + + // Insert the row. + vector< vector >::iterator ite = begin()+_r; + insert( ite, _val ); + }; + + /** Eliminates the row at position _r; all the other genes will + be shifted up. + @param _r Number of he row to be deleted. + @exception out_of_range if _r >=numOfRows() + */ + virtual void deleteRow( const unsigned _r ) { + // Test error. + if ( _r >= numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::deleteRow: " + << "Row out of range. " + << "It should be <" << numOfRows() << '\0' << endl; + throw out_of_range( msg.str() ); + } + // Delete row. + vector< vector >::iterator ite = this->begin()+_r; + this->erase( ite ); + }; + + /** Inserts a column, moving the rest to the right. + * If _c = numOfCols(), it insert it at the end. + * Obviously, changes number of cols. + @param _r Position where the new column will be inserted. + @param _val Vector containing the new values to be inserted. + @exception invalid_argument if _val has not numOfRows() components. + */ + virtual void insertCol( const unsigned _c, + const vector& _val ) { + // Test errors. + if ( _c > numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertCol: " + << "Column out of range. " + << "It should be >=" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + if ( _val.size() != numOfRows() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::insertCol: " + << "Incorrect number of values to be added. " + << "It should be ==" << numOfRows() << '\0' << endl; + throw invalid_argument( msg.str() ); + } + + // Insert column. + for( unsigned r=0; r >::iterator it1 = begin()+r; + vector::iterator it2 = (*it1).begin()+_c; + (*it1).insert( it2, _val[r] ); + }; + } + + /** Eliminates the column at position _c; all the other columns will + be shifted left. + @param _c Number of he column to be deleted. + @exception out_of_range if _c >=numOfCols() + */ + virtual void deleteCol( const unsigned _c ) { + // Test error. + if ( _c >= numOfCols() ) { + ostrstream msg; + msg << "ERROR in eo2dVector::deleteCol: " + << "Column out of range. " + << "It should be <" << numOfCols() << '\0' << endl; + throw out_of_range( msg.str() ); + } + // Delete columns. + for( unsigned r=0; r >::iterator it1 = begin()+r; + vector::iterator it2 = (*it1).begin()+_c; + (*it1).erase( it2 ); + } + }; + + /// Returns the number of rows in the eo2d + virtual unsigned numOfRows() const { + return size(); + }; + + /// Returns the number of columns in the eo2d + virtual unsigned numOfCols() const { + return begin()->size(); + }; + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eo2dVector";}; + //@} + +}; + + +//____________________________ Some method implementation ____________________ + +// Ctors_______________________________________________________________________ +//_____________________________________________________________________________ +template +eo2dVector::eo2dVector( const unsigned _rows, + const unsigned _cols, + eoRnd& _rnd ) + : eo2d(), vector< vector >( _rows, vector( _cols, T() ) ){ + for ( vector< vector >::iterator i = begin(); i != end(); ++i ) { + for( vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { + *j = _rnd(); + } + } +}; + +//_____________________________________________________________________________ +/*template +eoVector::eoVector( istream& _is) + : eo1d(), vector( ){ + while (_is ) { + T tmp; + _is >> tmp; + push_back( tmp ); + } + +}; +*/ + +//_____________________________________________________________________________ +template +ostream& operator<<( ostream& _os, const eo2dVector& _eo) { + for( unsigned i=0; i<_eo.numOfRows(); ++i ) { + for( unsigned j=0; j<_eo.numOfCols(); ++j ) { + _os << _eo.getGene( i,j ) << " "; + } + _os << endl; + } + return _os; +}; + +#endif + diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 0fb9a82ba..1d7ec4193 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -1,6 +1,23 @@ -//----------------------------------------------------------------------------- -// eoBin.h -//----------------------------------------------------------------------------- +/* + eoBin.h + (c) GeNeura Team 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ #ifndef eoBin_h #define eoBin_h diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index d35016358..897fb4ca3 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -40,28 +40,8 @@ #include #include -//----------------------------------------------------------------------------- -// Class UExceptions - probably useless ??? -//----------------------------------------------------------------------------- -/** - * This class manages exceptions. It´s barely an extension of the standard except - ion, - * but it can be initialized with an STL string. Called UException (utils-except - ion)+ - * to avoid conflicts with other classes. - */ -class UException: public exception { -public: - /// - UException( const string& _msg ): msg( _msg ) { }; - - /// - virtual const char* what() const { return msg.c_str(); }; - -private: - string msg; -}; - +// include for exceptions +include // logic_error //----------------------------------------------------------------------------- // Class Param @@ -747,20 +727,20 @@ public: /** * This class managges unknown argument exceptions. */ - class UnknownArg : public UException { + class UnknownArg : public logic_error { public: /** * Constructor * @param _arg string to be shown when the exception occurs */ - UnknownArg( const string& _arg): UException( "Invalid argument: "+_arg ) { }; + UnknownArg( const string& _arg): logic_error( "Invalid argument: "+_arg ) { }; }; /** * This class managges bad param types. */ - class BadType : public UException { + class BadType : public logic_error { public: /** @@ -769,39 +749,39 @@ public: * @param _value The value of the param */ BadType(const string& _param, const string& _value, const string& _correctType) - : UException("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; + : logic_error("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; }; /** * This class managges exceptions produced when there isn't a value for a parameter. */ - class MissingVal : public UException { + class MissingVal : public logic_error { public: /** * Constructor * @param _param The param */ - MissingVal(const string& _param) : UException("Missing value for parameter " + _param) {}; + MissingVal(const string& _param) : logic_error("Missing value for parameter " + _param) {}; }; /** * This class managges exceptions produced when the user forgot a required parameter. */ - class MissingReqParam : public UException { + class MissingReqParam : public logic_error { public: /** * Constructor * @param _shortName The param's short name */ - MissingReqParam(const string& _shortName) : UException("Missing required parameter " + _shortName) {}; + MissingReqParam(const string& _shortName) : logic_error("Missing required parameter " + _shortName) {}; }; /** * This class managges exceptions du to < without a > in array value */ - class BadArrayParam : public UException { + class BadArrayParam : public logic_error { public: /** @@ -810,7 +790,7 @@ public: * @param _first_word The first word read after the "<" */ BadArrayParam(const string& _param, const string &_first_word) : - UException("Array parameter " + _param + ": No matching > (" + _first_word + logic_error("Array parameter " + _param + ": No matching > (" + _first_word + "... )") {}; }; From 947ea09fa1df1818aab8f06d32e9e66d166cbb1e Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 24 Jan 2000 21:16:54 +0000 Subject: [PATCH 0087/2134] some reviews --- eo/src/eoParser.h | 2 +- eo/src/eoParserUtils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index 897fb4ca3..3e5601a99 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -41,7 +41,7 @@ #include // include for exceptions -include // logic_error +#include // logic_error //----------------------------------------------------------------------------- // Class Param diff --git a/eo/src/eoParserUtils.cpp b/eo/src/eoParserUtils.cpp index f12b6b962..b4db0b8d1 100644 --- a/eo/src/eoParserUtils.cpp +++ b/eo/src/eoParserUtils.cpp @@ -12,7 +12,7 @@ void InitRandom( Parser & parser) { _seed = parser.getUnsignedLong("-S", "--seed", "0", "Seed for Random number generator" ); } - catch (UException & e) + catch (logic_error & e) { cout << e.what() << endl; parser.printHelp(); From 83365de0d1dfa7b0473742cb7bfd79e82571bf9e Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 25 Jan 2000 08:20:22 +0000 Subject: [PATCH 0088/2134] A very silly error has been fixed --- eo/src/EO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 81668b897..7b1b503f2 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -108,7 +108,7 @@ public: */ virtual void readFrom(istream& _is) { _is >> repFitness; - if (is) + if (_is) invalidFitness = false; else throw runtime_error("EO(istream&): can't read valid eo from istream"); From 472898871ced7f9c36f47afd6376e7a3fe394497 Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 26 Jan 2000 17:48:24 +0000 Subject: [PATCH 0089/2134] *** empty log message *** --- eo/src/eoProportionalOpSel.h | 4 ++-- eo/test/t-parser.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index d34fa47d6..3f8cbc997 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -59,8 +59,8 @@ public: /** Gets a non-const reference to an operator, so that it can be changed, modified or whatever @param _id a previously assigned ID - @throw runtime_error if the ID does not exist*/ - virtual const eoOp& getOp( ID _id ) { + @throw runtime_error if the ID does not exist*/ + virtual eoOp& getOp( ID _id ) { MMF::iterator i=begin(); ID j = 1; while ( (i++!=end()) && (j++ != _id) ); diff --git a/eo/test/t-parser.cpp b/eo/test/t-parser.cpp index 268f391c9..222039e3e 100644 --- a/eo/test/t-parser.cpp +++ b/eo/test/t-parser.cpp @@ -17,7 +17,7 @@ void GetOutputParam(Parser & parser, try { parser.AddTitle("Separate parameter: the output file name"); _string = parser.getString("-O", "--OutputFile", "", "The output file name" ); - } catch (UException & e) { + } catch (logic_error & e) { cout << e.what() << endl; parser.printHelp(); exit(1); @@ -34,7 +34,7 @@ void sub(Parser & parser) { try { parser.AddTitle("Private parameters of subroutine sub"); i = parser.getInt("-j", "--sint", "5", "private integer of subroutine" ); - } catch (UException & e) { + } catch (logic_error & e) { cout << e.what() << endl; parser.printHelp(); exit(1); @@ -62,7 +62,7 @@ void getParams( Parser & parser, _array = parser.getArray("-a", "--array", "a b", "an array enclosed within < >" ); _boolean = parser.getBool("-b","--bool", "a bool value" ); } - catch (UException & e) + catch (logic_error & e) { cout << e.what() << endl; parser.printHelp(); From 7db1492943fdfdcd0f85332d4268ff2c42aaa554 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Mon, 7 Feb 2000 17:16:16 +0000 Subject: [PATCH 0090/2134] Added new files to the brew, mainly distance and new-op-interface related --- eo/configure.in | 4 +- eo/src/Makefile.am | 25 +-- eo/src/eo1d.h | 35 ++-- eo/src/eo1dWDistance.h | 136 ++++++++++++++ eo/src/eoAltBreeder.h | 302 ++++++++++++++++++++++++++++++ eo/src/eoAtomRandom.h | 127 ++++++------- eo/src/eoData.h | 32 +++- eo/src/eoDistance.h | 63 +++++++ eo/src/eoEasyEA.h | 4 +- eo/src/eoEvalFuncPtr.h | 109 ++++++----- eo/src/eoEvalFuncPtrCnt.h | 62 +++++++ eo/src/eoGOpSelector.h | 139 ++++++++++++++ eo/src/eoGeneralOp.h | 200 ++++++++++++++++++++ eo/src/eoGeneration.h | 4 +- eo/src/eoLottery.h | 64 +++---- eo/src/eoNegExp.h | 12 +- eo/src/eoObject.h | 135 +++++++------- eo/src/eoOp.h | 17 +- eo/src/eoOpSelector.h | 175 +++++++++--------- eo/src/eoPop.h | 153 +++++++-------- eo/src/eoPopOps.h | 13 +- eo/src/eoProportionalGOpSel.h | 51 +++++ eo/src/eoRNG.h | 4 +- eo/src/eoRnd.h | 228 +++++++++++------------ eo/src/eoString.h | 8 + eo/src/eoUniform.h | 142 +++++++------- eo/src/eoVector.h | 339 +++++++++++++++++----------------- eo/test/Makefile.am | 31 +++- eo/test/Makefile.in | 65 ++++++- eo/test/binary_value.h | 34 ++-- eo/test/real_value.h | 43 ++--- eo/test/t-eoAtomOps.cpp | 99 ++++++---- eo/test/t-eoGOpSel.cpp | 107 +++++++++++ eo/test/t-eoGeneralOps.cpp | 71 +++++++ eo/test/t-eoRandom.cpp | 31 ++-- eo/test/t-eoVector.cpp | 57 ++++++ eo/test/t-eoaltbreeder.cpp | 98 ++++++++++ eo/test/t-eobin.cpp | 31 ++-- eo/test/t-eogeneration.cpp | 227 +++++++++++++++-------- eo/win/Makefile.am | 1 + 40 files changed, 2488 insertions(+), 990 deletions(-) create mode 100644 eo/src/eo1dWDistance.h create mode 100644 eo/src/eoAltBreeder.h create mode 100644 eo/src/eoDistance.h create mode 100644 eo/src/eoEvalFuncPtrCnt.h create mode 100644 eo/src/eoGOpSelector.h create mode 100644 eo/src/eoGeneralOp.h create mode 100644 eo/src/eoProportionalGOpSel.h create mode 100644 eo/test/t-eoGOpSel.cpp create mode 100644 eo/test/t-eoGeneralOps.cpp create mode 100644 eo/test/t-eoVector.cpp create mode 100644 eo/test/t-eoaltbreeder.cpp diff --git a/eo/configure.in b/eo/configure.in index 46910ca5e..f089acf0c 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,6 +1,7 @@ AC_INIT(src/eo) -AM_INIT_AUTOMAKE(eo, 0.0.8) +dnl Change the version number here +AM_INIT_AUTOMAKE(eo) AC_PROG_CXX @@ -10,4 +11,5 @@ 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) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 3b4a1c90e..9dc0eb505 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -5,22 +5,25 @@ ############################################################################### lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoParserUtils.cpp +libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = EO.h eo eo1d.h eo2d.h eo2dVector.h eoAged.h eoAlgo.h\ +libeoinc_HEADERS = EO.h eo eo1d.h eo1dWDistance.h eo2d.h \ + eo2dVector.h eoAged.h eoAlgo.h\ + eoAltBreeder.h eoAltProportionalOpSel.h\ eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h \ eoAtomRandom.h eoBin.h eoBitOp.h eoBitOpFactory.h eoBreeder.h\ - eoData.h eoDetTournament.h eoDup.h eoESChrom.h eoESFullChrom.h \ - eoESFullMut.h eoEasyEA.h\ - eoEvalFunc.h eoEvalFuncPtr.h eoFitTerm.h eoFitness.h\ - eoGenTerm.h eoGeneration.h eoID.h eoInclusion.h eoInsertion.h\ - eoKill.h eoLottery.h eoMerge.h eoMultiBinOp.h eoMultiMonOp.h \ - eoMutation.h eoNegExp.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 eoProportionalOpSel.h eoRNG.h eoRnd.h eoString.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 \ - eoParserUtils.h + eoUniformSelect.h eoUniformXOver.h eoVector.h eoXOver2.h + diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h index e9c4d66f0..31ed415fe 100644 --- a/eo/src/eo1d.h +++ b/eo/src/eo1d.h @@ -1,9 +1,11 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eo1d.h -// (c) GeNeura Team, 1998 -/* + ----------------------------------------------------------------------------- + eo1d.h + Serial EO. + + (c) GeNeura Team, 1998 + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -43,7 +45,6 @@ using namespace std; */ //@{ - /** eo1d: Base class for "chromosomes" with a single dimension #T# is the type it will be instantiated with; this type must have, at least, a copy ctor, assignment operators, @@ -91,7 +92,7 @@ public: This implies that T must have a copy ctor . @param _i index of the gene, which is the minimal unit. Must be an unsigned less than #length()# - @return what's inside the gene, with the correct type + @return what's inside the gene, with the correct type @exception out_of_range if _i > size() */ virtual T getGene( unsigned _i ) const = 0; @@ -99,8 +100,8 @@ public: /** Overwrites the gene placed in position _i with a * new value. This means that the assignment operator * for T must be defined . - @param _i index - @return what's inside the gene, with the correct type + @param _i index + @return what's inside the gene, with the correct type @exception out_of_range if _i > size() */ virtual void setGene( unsigned _i, const T& _value ) = 0; @@ -121,16 +122,16 @@ public: /// Returns the number of genes in the eo1d virtual unsigned length() const = 0; - - /// @name Methods from eoObject + + /// @name Methods from eoObject //@{ /** - * Read object. Theoretically, the length is known in advance. All objects + * Read object. Theoretically, the length is known in advance. All objects * Should call base class * @param _s A istream. * @throw runtime_exception If a valid object can't be read. */ - virtual void readFrom(istream& _s) { + virtual void readFrom(istream& _s) { for ( unsigned i = 0; i < length(); i ++ ) { T tmp; @@ -142,7 +143,7 @@ public: } /** Print itself: inherited from eoObject implementation. - Instance from base classes are processed in + Instance from base classes are processed in base classes, so you don´t have to worry about, for instance, fitness. @param _s the ostream in which things are written*/ virtual void printOn( ostream& _s ) const{ @@ -155,8 +156,8 @@ public: @see eoObject */ string className() const {return "eo1d";}; - - //@} + + //@} }; @@ -171,7 +172,7 @@ public: @param _ID An ID string, preferably unique */ template< class T, class fitnessT> -eo1d::eo1d( unsigned _size, eoRnd& _rndGen, +eo1d::eo1d( unsigned _size, eoRnd& _rndGen, const string& _ID ) :EO ( _ID ) { for ( unsigned i = 0; i < _size; i ++ ) { diff --git a/eo/src/eo1dWDistance.h b/eo/src/eo1dWDistance.h new file mode 100644 index 000000000..0cd940497 --- /dev/null +++ b/eo/src/eo1dWDistance.h @@ -0,0 +1,136 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eo1dWDistance.h + Serial EO with distances. Acts as a wrapper for normal eo1ds + + (c) GeNeura Team, 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EO1DWDISTANCE_H +#define _EO1DWDISTANCE_H + +#include // for ostream + +// EO Includes +#include +#include + +using namespace std; + +/** eo1dWDistance: wraps around eo1ds and adds the possibility of computing distances +around them. +*/ +template +class eo1dWDistance: + public eo1d< T,fitnessT >, + public eoDistance > { +public: + + /** Can be used as default ctor; should be called from derived + classes. Fitness should be at birth + */ + eo1dWDistance( eo1d& _eo) + :eo1d (), eoDistance< eo1d >(), innereo1d( _eo ) {}; + + /// Needed virtual dtor + virtual ~eo1dWDistance(){}; + + /** Reads and returns a copy of the gene in position _i + This implies that T must have a copy ctor . + @param _i index of the gene, which is the minimal unit. Must be + an unsigned less than #length()# + @return what's inside the gene, with the correct type + @exception out_of_range if _i > size() + */ + virtual T getGene( unsigned _i ) const { + return innereo1d.getGene( _i ); + }; + + /** Overwrites the gene placed in position _i with a + * new value. This means that the assignment operator + * for T must be defined . + @param _i index + @return what's inside the gene, with the correct type + @exception out_of_range if _i > size() + */ + virtual void setGene( unsigned _i, const T& _value ) { + innereo1d.setGene( _i, _value); + }; + + /** Inserts a gene, moving the rest to the right. If + * _i = length(), it should insert it at the end. + * Obviously, changes length + @param _i index + @param _val new value + */ + virtual void insertGene( unsigned _i, T _val ) { + innereo1d.insertGene( _i, _val); + } + + /** Eliminates the gene at position _i; all the other genes will + be shifted left + @param _i index of the gene that is going to be modified. + */ + virtual void deleteGene( unsigned _i ) { + innereo1d.deleteGene( _i ); + } + + /// Returns the number of genes in the eo1d + virtual unsigned length() const { + return innereo1d.length(); + } + + /// Returns the distance from this EO to the other + virtual double distance( const eo1d& _eo ) const { + double tmp = 0; + // Which one is shorter + unsigned len = (innereo1d.length() < _eo.length()) ? _eo.length():innereo1d.length(); + + // Compute over the whole length. If it does not exists, it counts as 0 + for ( unsigned i = 0; i < len; i ++ ) { + T val1, val2; + val1 = ( i > innereo1d.length())?0:innereo1d.getGene(i); + val2 = ( i > _eo.length() )?0:_eo.getGene(i); + double diff = val1 - val2; + tmp += diff*diff; + } + return tmp; + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eo1dWDistance";}; + + //@} + +private: + ///Private ctor. Do not use + eo1dWDistance() {}; + + + eo1d& innereo1d; +}; + +//@} + + +#endif diff --git a/eo/src/eoAltBreeder.h b/eo/src/eoAltBreeder.h new file mode 100644 index 000000000..737fbdd9b --- /dev/null +++ b/eo/src/eoAltBreeder.h @@ -0,0 +1,302 @@ +//----------------------------------------------------------------------------- +// eoBreeder.h +//----------------------------------------------------------------------------- + +#ifndef eoBreeder_h +#define eoBreeder_h + +//----------------------------------------------------------------------------- + +#include // vector +#include +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector +#include +#include "eoRng.h" + +using namespace std; + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +template +class eoGeneralOp: public eoOp +{ +public: + + eoGeneralOp() + :eoOp( Nary ) {}; + virtual ~eoGeneralOp () {}; + + virtual void operator()( vector _in, OutIt _out) const = 0; + virtual int nInputs(void) const = 0; + virtual int nOutputs(void) const = 0; // no support for 2 -> 2 xover + + virtual string className() const {return "eoGeneralOp";}; +}; + +template +class eoWrappedMonOp : public eoGeneralOp +{ +public : + eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp(), op(_op) {} + virtual ~eoWrappedMonOp() {} + + void operator()( vector _in, OutIt _out) const + { + *_out = *_in[0]; + op(*_out ); + } + + int nInputs(void) const { return 1; } + int nOutputs(void) const { return 1; } + + virtual string className() const {return "eoWrappedOp";}; + + +private : + const eoMonOp& op; +}; + +template +class eoWrappedBinOp : public eoGeneralOp +{ +public : + eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(), op(_op) {} + virtual ~eoWrappedBinOp() {} + + void operator()( vector _in, OutIt _out) const + { + *_out = *_in[0]; + *(_out + 1) = *_in[1]; + op(*_out, *(_out + 1)); + } + + int nInputs(void) const { return 2; } + int nOutputs(void) const { return 2; } // Yup, due to the bad design, can't choose between outputting 1 or 2 + + virtual string className() const {return "eoWrappedOp";}; + + +private : + const eoBinOp& op; +}; + +template +class eoCombinedOp : public eoGeneralOp +{ +public : + + eoCombinedOp() : eoGeneralOp(), arity(0) {} + virtual ~eoCombinedOp() {} + + int nInputs(void) const { return arity; } + int nOutputs(void) const { return 1; } + + void addOp(eoGeneralOp* _op) + { + ops.push_back(_op); + arity = arity < _op->nInputs()? _op->nInputs() : arity; + } + + + void clear(void) + { + ops.resize(0); + } + + + void operator()( vector _in, OutIt _out) const + { + for (int i = 0; i < ops.size(); ++i) + { + (*ops[i])(_in, _out); + _in[0] = &*_out; + } + } + +private : + vector* > ops; + int arity; +}; + +template +class eoAltOpSelector: public eoOpSelector, public vector*> +{ +public: + + virtual ID addOp( eoOp& _op, float _arg ) + { + eoGeneralOp* op = dynamic_cast*>(&_op); + + + if (op == 0) + { + switch(_op.readArity()) + { + case unary : + oplist.push_back(auto_ptr >(new eoWrappedMonOp(static_cast&>(_op)))); + + op = oplist.back().get(); + break; + case binary : + oplist.push_back(auto_ptr >(new eoWrappedBinOp(static_cast&>(_op)))); + op = oplist.back().get(); + break; + } + } + + iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer + + if (result == end()) + { + push_back(op); + rates.push_back(_arg); + return size(); + } + // else + + *result = op; + ID id = result - begin(); + rates[id] = _arg; + return id; + } + + virtual const eoOp& getOp( ID _id ) + { + return *operator[](_id); + } + + virtual void deleteOp( ID _id ) + { + operator[](_id) = 0; // TODO, check oplist and clear it there too. + rates[_id] = 0.0; + } + + virtual eoOp* Op() + { + return &selectOp(); + } + + + virtual eoGeneralOp& selectOp() = 0; + + + virtual string className() const { return "eoAltOpSelector"; }; + + void printOn(ostream& _os) const {} + + +protected : + + vector rates; + list > > oplist; +}; + +template +class eoProportionalOpSelector : public eoAltOpSelector +{ + public : + eoProportionalOpSelector() : eoAltOpSelector() {} + + + virtual eoGeneralOp& selectOp() + { + int what = rng.roulette_wheel(rates); + + return *operator[](what); + } +}; + +template +class eoSequentialOpSelector : public eoAltOpSelector +{ + public : + + eoSequentialOpSelector() : eoAltOpSelector() {} + + virtual eoGeneralOp& selectOp() + { + for (int i = 0; i < size(); ++i) + { + if (operator[](i) == 0) + continue; + + if (rng.flip(rates[i])) + combined.addOp(operator[](i)); + } + + return combined; + } + + private : + + eoCombinedOp combined; +}; + +template +class eoRandomIndy // living in a void right now +{ + public : + + eoRandomIndy() {} + + vector operator()(int _n, eoPop::iterator _begin, eoPop::iterator _end) + { + vector result(_n); + + for (int i = 0; i < result.size(); ++i) + { + result[i] = &*(_begin + rng.random(_end - _begin)); + } + + return result; + } +}; + +template class eoAltBreeder: public eoTransform +{ + public: + typedef eoPop::reverse_iterator outIt; + /// Default constructor. + eoAltBreeder( eoAltOpSelector& _opSel): opSel( _opSel ) {} + + /// Destructor. + virtual ~eoAltBreeder() {} + + /** + * Enlarges the population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + int size = pop.size(); + + for (unsigned i = 0; i < size; i++) + { + eoGeneralOp& op = opSel.selectOp(); + + pop.resize(pop.size() + op.nOutputs()); + vector indies = indySelector(op.nInputs(), pop.begin(), pop.begin() + size); + + op(indies, pop.rbegin()); + + } + } + + /// The class name. + string classname() const { return "eoAltBreeder"; } + + private: + eoAltOpSelector& opSel; + eoRandomIndy indySelector; +}; + + + +#endif eoBreeder_h diff --git a/eo/src/eoAtomRandom.h b/eo/src/eoAtomRandom.h index e7faaab33..07d2eb98d 100644 --- a/eo/src/eoAtomRandom.h +++ b/eo/src/eoAtomRandom.h @@ -1,63 +1,64 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomRandom.h -// Increments or decrements by one a single element -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMCREEP_H -#define _EOATOMCREEP_H - -#include - -/** Modifies using a random number generator, that is entered in the ctor. - The RNG must return positive or negative numbers, whatever. -*/ -template -class eoAtomRandom: public eoAtomMutator { -public: - - /// - eoAtomRandom( eoRandom& _rng): rng( _rng ) {}; - - /// - virtual ~eoAtomRandom() {}; - - /// - virtual void operator()( T& _val ) const { - _val += rng(); - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoAtomRandom";}; - //@} - -private: - eoRandom rng; - -}; - - -#endif +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoAtomRandom.h + Increments or decrements by one a single element + (c) GeNeura Team, 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOATOMRANDOM_H +#define _EOATOMRANDOM_H + +#include + +/** Modifies using a random number generator, that is entered in the ctor. + The RNG must return positive or negative numbers, whatever. +*/ +template +class eoAtomRandom: public eoAtomMutator { +public: + + /// + eoAtomRandom( eoRnd& _rng): rng( _rng ) {}; + + /// + virtual ~eoAtomRandom() {}; + + /// Adds the value generated by the RNG to the former value + virtual void operator()( T& _val ) const { + _val += rng(); + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoAtomRandom";}; + //@} + +private: + eoRnd& rng; + +}; + + +#endif diff --git a/eo/src/eoData.h b/eo/src/eoData.h index a90445d04..f760ea369 100644 --- a/eo/src/eoData.h +++ b/eo/src/eoData.h @@ -1,6 +1,28 @@ -//----------------------------------------------------------------------------- -// eoData.h -//----------------------------------------------------------------------------- +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoData.h + Some numeric limits and types and things like that; with #ifdefs to keep + compatibility + + (c) GeNeura Team & Maarten Keijzer, 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ #ifndef EODATA_H #define EODATA_H @@ -22,8 +44,10 @@ using namespace std; #define MAXINT numeric_limits::max() #else #include - #include + #include +#ifndef _WIN32 // should be the define for UN*X flavours: _POSIX?? #include +#endif #ifndef MAXFLOAT #define MAXFLOAT (float)1e127 #define MAXDOUBLE (double)1.79769313486231570e+308 diff --git a/eo/src/eoDistance.h b/eo/src/eoDistance.h new file mode 100644 index 000000000..13ca197e0 --- /dev/null +++ b/eo/src/eoDistance.h @@ -0,0 +1,63 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoObject.h + This is the base class for most objects in EO. It basically defines an interf + face for giving names to classes. + + (c) GeNeura Team, 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ +//----------------------------------------------------------------------------- + +#ifndef EODISTANCE_H +#define EODISTANCE_H + +//----------------------------------------------------------------------------- + +using namespace std; + +//----------------------------------------------------------------------------- +// eoDistance +//----------------------------------------------------------------------------- +/** Defines an interface for measuring distances between evolving objects */ +template +class eoDistance { + public: + + /// Default Constructor. + eoDistance() {} + + /// Copy constructor. + eoDistance( const eoDistance& ) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoDistance() {} + + + /** Return the distance from the object with this interface to other + object of the same type. + */ + virtual double distance( const EOT& ) const = 0; + + /// Returns classname + virtual string className() const { return "eoDistance"; } + +}; + +#endif EOOBJECT_H diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 13f9e5367..49a905ebf 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -57,7 +57,7 @@ template class eoEasyEA: public eoAlgo /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { - while ( terminator( pop ) ){ + do { try { step(pop); @@ -68,7 +68,7 @@ template class eoEasyEA: public eoAlgo s.append( " in eoEasyEA "); throw runtime_error( s ); } - } + } while ( terminator( pop ) ); } /// Class name. diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index 882f4b6da..1c40eecf2 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -1,50 +1,59 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOEVALFUNCPTR_H -#define EOEVALFUNCPTR_H - -#include - -/** EOEvalFuncPtr: This class - * takes an existing function pointer and converts it into a evaluation - * function class. That way, old style C or C++ functions can be adapted to EO - * function classes. - */ -template< class EOT > -struct eoEvalFuncPtr: public eoEvalFunc { - - eoEvalFuncPtr( void (* _eval)( EOT& ) ) - : eoEvalFunc(), evalFunc( _eval ) {}; - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const { - (*evalFunc)( _eo ); - }; - - private: - void (* evalFunc )( EOT& ); -}; - -#endif +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoEvalFuncPtr.h + Converts a classical C fitness evaluation function into a fitness + evaluation object + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTR_H +#define EOEVALFUNCPTR_H + +#include + +/** EOEvalFuncPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + */ +template< class EOT > +struct eoEvalFuncPtr: public eoEvalFunc { + + /** Applies the function to the chromosome and sets the fitness of the + Chrom. Thus, the evaluation function need not be worried about that. + @param _eval pointer to the evaluation function, takes a EOT as an + argument and returns the fitness + @return the evaluated fitness for that object. + */ + eoEvalFuncPtr( EOFitT (* _eval)( const EOT& ) ) + : eoEvalFunc(), evalFunc( _eval ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) const { + _eo.fitness((*evalFunc)( _eo )); + }; + + private: + EOFitT (* evalFunc )( EOT& ); +}; + +#endif diff --git a/eo/src/eoEvalFuncPtrCnt.h b/eo/src/eoEvalFuncPtrCnt.h new file mode 100644 index 000000000..ffa998590 --- /dev/null +++ b/eo/src/eoEvalFuncPtrCnt.h @@ -0,0 +1,62 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoEvalFuncPtrCnt.h + Same as eoEvalFuncPtr, but counts the number of evaluations + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTRCNT_H +#define EOEVALFUNCPTRCNT_H + +#include + +/** EOEvalFuncCntPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + */ +template< class EOT > +struct eoEvalFuncPtrCnt: public eoEvalFuncPtr { + + /** Applies the function to the chromosome and sets the fitness of the + Chrom. Thus, the evaluation function need not be worried about that. + @param _eval pointer to the evaluation function, takes a EOT as an + argument and returns the fitness + @return the evaluated fitness for that object. + */ + eoEvalFuncPtrCnt( EOFitT (* _eval)( const EOT& ) ) + : eoEvalFuncPtr( _eval ), numOfEvaluations( 0 ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) const { + eoEvalFuncPtr::operator()( _eo ); + numOfEvaluations++; + }; + + /// + unsigned getNumOfEvaluations() const { return numOfEvaluations; }; + +private: + mutable unsigned numOfEvaluations; +}; + +#endif diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h new file mode 100644 index 000000000..f33b6bb1a --- /dev/null +++ b/eo/src/eoGOpSelector.h @@ -0,0 +1,139 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoGOpSelector.h + Base class for generalized (n-inputs, n-outputs) operator selectors. + Includes code and variables that contain operators and rates + + (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoGOpSelector_h +#define eoGOpSelector_h + +//----------------------------------------------------------------------------- + +#include // vector +#include +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector +#include +#include "eoRNG.h" + +using namespace std; + +/** Base class for alternative selectors, which use the generalized operator + interface */ + +template +class eoGOpSelector: public eoOpSelector, public vector*> +{ +public: + + /// Dtor + virtual ~eoGOpSelector() { + for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); + i != ownOpList.begin(); i ++ ) { + delete *i; + } + } + + /// Add any kind of operator to the operator mix, with an argument + virtual ID addOp( eoOp& _op, float _arg ) { + eoGeneralOp* op = dynamic_cast*>(&_op); + + // if it's not a general op, it's a "old" op; create a wrapped op from it + // and keep it on a list to delete them afterwards + // will use auto_ptr when they're readily available + if (op == 0) { + switch(_op.readArity()) + { + case unary : + op= new eoWrappedMonOp(static_cast&>(_op)); + break; + case binary : + op = new eoWrappedBinOp(static_cast&>(_op)); + break; + } + ownOpList.push_back( op ); + } + + iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer + + if (result == end()) + { + push_back(op); + rates.push_back(_arg); + return size(); + } + // else + + *result = op; + ID id = result - begin(); + rates[id] = _arg; + return id; + } + + /** Retrieve the operator using its integer handle + @param _id The id number. Should be a valid id, or an exception + will be thrown + @return a reference of the operator corresponding to that id. + */ + virtual const eoOp& getOp( ID _id ) + { + return *operator[](_id); + } + + /// + virtual void deleteOp( ID _id ) + { + operator[](_id) = 0; // TODO, check oplist and clear it there too. + rates[_id] = 0.0; + } + + /// + virtual eoOp* Op() + { + return &selectOp(); + } + + /// + virtual eoGeneralOp& selectOp() = 0; + + /// + virtual string className() const { return "eoGOpSelector"; }; + + /// + void printOn(ostream& _os) const { + _os << className() << endl; + for ( unsigned i=0; i!= rates.size(); i++ ) { + _os << *(operator[](i)) << "\t" << rates[i] << endl; + } + } + + +protected : + vector rates; + list< eoGeneralOp* > ownOpList; +}; + +#endif eoGOpSelector_h diff --git a/eo/src/eoGeneralOp.h b/eo/src/eoGeneralOp.h new file mode 100644 index 000000000..e24b6541e --- /dev/null +++ b/eo/src/eoGeneralOp.h @@ -0,0 +1,200 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoGeneralOp.h + General genetic operator, which can be used to wrap any unary or binary + operator + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoGeneralOp_h +#define eoGeneralOp_h + +//----------------------------------------------------------------------------- + +#include // vector +#include +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector +#include +#include "eoRNG.h" + +using namespace std; + +/** + * eGeneralOp: General genetic operator; for objects used to transform sets + of EOs +*/ +template +class eoGeneralOp: public eoOp +{ +public: + + /// Ctor that honors its superclass + eoGeneralOp(): eoOp( Nary ) {}; + + /// Virtual dtor + virtual ~eoGeneralOp () {}; + + /** Method that really does the stuff. Applies the genetic operator + to a vector of inputs, and puts results in the output vector */ + virtual void operator()( eoPop::iterator _in, + insert_iterator< eoPop > _out) const = 0; + + /// Number of inputs + virtual unsigned nInputs(void) const { return repNInputs;}; + + /// Number of output arguments, or arguments that are pushed onto the output vector + virtual unsigned nOutputs(void) const { return repNOutputs; }; + + virtual string className() const {return "eoGeneralOp";}; + +protected: + /// Default ctor; protected so that only derived classes can use it + eoGeneralOp( unsigned _nInputs = 0, unsigned _nOutputs = 0 ) + : repNInputs( _nInputs), repNOutputs( _nOutputs) {}; + + /// change number of inputs + void setNInputs( unsigned _nInputs) { repNInputs = _nInputs;}; + + /// change number of outputs + void setNOutputs( unsigned _nOutputs) { repNOutputs = _nOutputs;}; + +private: + unsigned repNInputs; + unsigned repNOutputs; +}; + + +/// Wraps monary operators +template +class eoWrappedMonOp : public eoGeneralOp +{ +public : + /// + eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp( 1, 1), op(_op) {}; + + /// + virtual ~eoWrappedMonOp() {} + + /// Instantiates the abstract method + void operator()( eoPop::iterator _in, + insert_iterator< eoPop< EOT> > _out ) const { + EOT result = *_in; + op( result ); + *_out = result; + } + + /// + virtual string className() const {return "eoWrappedMonOp";}; + + +private : + const eoMonOp& op; +}; + + +/// Wraps binary operators +template +class eoWrappedBinOp : public eoGeneralOp +{ +public : + /// + eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(2, 2), op(_op) {} + + /// + virtual ~eoWrappedBinOp() {} + + /// Instantiates the abstract method. EOT should have copy ctor. + void operator()(eoPop::iterator _in, + insert_iterator< eoPop< EOT> > _out ) const { + EOT out1 = *_in; + _in++; + EOT out2 = *_in; + op(out1, out2); + *_out++ = out1; + *_out = out2; + } + + /// + virtual string className() const {return "eoWrappedBinOp";}; + +private : + const eoBinOp& op; +}; + +/// Combines several ops +template +class eoCombinedOp : public eoGeneralOp +{ +public : + + /// + eoCombinedOp() : eoGeneralOp() {} + + /// + virtual ~eoCombinedOp() {} + + /// Adds a new operator to the combined Op + void addOp(eoGeneralOp* _op) { + ops.push_back(_op); + unsigned nInputs = nInputs() < _op->nInputs()? _op->nInputs() : nInputs; + setNInputs( nInputs ); + unsigned nOutputs = nOutputs() < _op->nOutputs()? _op->nOutputs() : nOutputs; + setNOutputs( nInputs ); + } + + + /// Erases all operators added so far + void clear(void) { + ops.resize(0); + } + + + /// Applies all ops in the combined op + void operator()( eoPop::iterator _in, + insert_iterator< eoPop< EOT> > _out ) const { + // used for provisional input and output. Results are put in provOut, + // and copied back to provIn. + eoPop provIn, provOut; + insert_iterator< eoPop< EOT> > out = provOut.begin(); + ops[0]( _in, out ); + for ( unsigned i = 1; i < ops.size; i ++ ) { + copy( provOut.begin(), provOut.end(), provIn.begin() ); + insert_iterator< eoPop< EOT> > in = provIn.begin(); + out = provOut.begin(); + ops[i]( in, out ); + } + + // Copy back to output + copy( provOut.begin(), provOut.end(), _out ); + + + } + +private : + vector* > ops; +}; + +#endif eoGeneral_h diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index 5db81e726..9da4ae67a 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -71,9 +71,9 @@ template class eoGeneration: public eoAlgo string className() const { return "eoGeneration"; } private: - eoBinPopOp& select; + eoBinPopOp& select; eoMonPopOp& transform; - eoBinPopOp& replace; + eoBinPopOp& replace; eoEvalFunc& evaluator; }; diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 60e8bc7a4..252b16459 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoLottery.h // Implements the lottery procedure for selection -// (c) GeNeura Team, 1998 +// (c) GeNeura Team, 1998 - Marc Schoenauer, 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -33,53 +33,49 @@ #include // eoPop eoSelect MINFLOAT //----------------------------------------------------------------------------- -/// eoLottery: a selection method. -/// requires Chrom::Fitness to be float castable +/** eoLottery: a selection method. Puts into the output a group of individuals + selected using lottery; individuals with higher probability will have more + chances of being selected. + Requires EOT::Fitness to be float castable +*/ //----------------------------------------------------------------------------- -template class eoLottery: public eoBinPopOp +template class eoLottery: public eoBinPopOp { public: /// (Default) Constructor. eoLottery(const float& _rate = 1.0): rate(_rate) {} - /// - void operator()( eoPop& pop, eoPop& breeders) + /** actually selects individuals from pop and pushes them back them into breeders + * until breeders has the right size: rate*pop.size() + * BUT what happens if breeders is already too big? + * Too big for what? + */ + void operator()( eoPop& pop, eoPop& breeders) { // scores of chromosomes vector score(pop.size()); - // calculates accumulated scores for chromosomes - for (unsigned i = 0; i < pop.size(); i++) + // calculates total scores for chromosomes + float total = 0; + for (unsigned i = 0; i < pop.size(); i++) { score[i] = static_cast(pop[i].fitness()); + total += score[i]; + } + + // number of offspring needed + int target = (int)rint(rate * pop.size()); + + // test of consistency + if (breeders.size() >= target) { + throw("Problem in eoLottery: already too many offspring"); + } - float sum = accumulate(score.begin(), score.end(), MINFLOAT); - transform(score.begin(), score.end(), score.begin(), - bind2nd(divides(), sum)); - partial_sum(score.begin(), score.end(), score.begin()); - - // generates random numbers - vector random(rint(rate * pop.size())); - generate(random.begin(), random.end(), eoUniform(0,1)); - sort(random.begin(), random.end(), less()); - // selection of chromosomes - unsigned score_index = 0; // position in score vector - unsigned random_index = 0; // position in random vector - while (breeders.size() < random.size()) - { - if(random[random_index] < score[score_index]) - { - breeders.push_back(pop[score_index]); - random_index++; - } - else - if (score_index < pop.size()) - score_index++; - else - fill_n(back_insert_iterator >(breeders), - random.size() - breeders.size(), pop.back()); - } + while (breeders.size() < target) { + unsigned indloc = rng.roulette_wheel(score, total); + breeders.push_back(pop[indloc]); + } } private: diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h index beb63479f..63c9203ed 100644 --- a/eo/src/eoNegExp.h +++ b/eo/src/eoNegExp.h @@ -1,9 +1,9 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eoNegExp.h -// (c) GeNeura Team, 1998 -/* +----------------------------------------------------------------------------- + eoNegExp.h + (c) GeNeura Team, 1998 + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -43,7 +43,7 @@ class eoNegExp: public eoRnd public: /** * Default constructor. - * @param _mean Dsitribution mean + * @param _mean Distribution mean */ eoNegExp(T _mean): eoRnd(), mean(_mean) {}; diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 8bf2e1372..e1b2d617c 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -1,66 +1,69 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoObject.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOOBJECT_H -#define EOOBJECT_H - -//----------------------------------------------------------------------------- - -#include // For limits definition -#include // istream, ostream -#include // string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoObject -//----------------------------------------------------------------------------- -/** -This is the base class for the whole hierarchy; an eoObject defines -basically an interface for the whole hierarchy: each object should -know its name (#className#). Previously, this object defined a print and read -interface, but it´s been moved to eoPrintable and eoPersistent. - */ -class eoObject -{ - public: - - /// Default Constructor. - eoObject() {} - - /// Copy constructor. - eoObject( const eoObject& ) {} - - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoObject() {} - - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return "eoObject"; } - -}; - -#endif EOOBJECT_H +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoObject.h + This is the base class for most objects in EO. It basically defines an interf + face for giving names to classes. + + (c) GeNeura Team, 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ +//----------------------------------------------------------------------------- + +#ifndef EOOBJECT_H +#define EOOBJECT_H + +//----------------------------------------------------------------------------- + +#include // For limits definition +#include // istream, ostream +#include // string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoObject +//----------------------------------------------------------------------------- +/** +This is the base class for the whole hierarchy; an eoObject defines +basically an interface for the whole hierarchy: each object should +know its name (#className#). Previously, this object defined a print and read +interface, but it´s been moved to eoPrintable and eoPersistent. + */ +class eoObject +{ + public: + + /// Default Constructor. + eoObject() {} + + /// Copy constructor. + eoObject( const eoObject& ) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoObject() {} + + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return "eoObject"; } + +}; + +#endif EOOBJECT_H diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index e046824a6..609cf8c34 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -77,16 +77,15 @@ public: * @param _os A ostream. */ virtual void printOn(ostream& _os) const { - _os << className(); -// _os << arity; + _os << className(); + // _os << arity; }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} private: /// arity is the number of operands it takes diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 8d6286259..3000c9b6f 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -1,85 +1,90 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOpSelector.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOOPSELECTOR_H -#define EOOPSELECTOR_H - -//----------------------------------------------------------------------------- - -#include // runtime_error - -#include -#include -#include - -//----------------------------------------------------------------------------- -/** An operator selector is an object that contains a set of EO operators, and -and selects one based on whatever criteria. It will be used in the breeder objects.\\ -This class is basically a generic interface for operator selection -*/ -template -class eoOpSelector: public eoObject, public eoPrintable -{ -public: - typedef unsigned ID; - - /** add an operator to the operator set - @param _op a genetic operator, that will be applied in some way - @param _arg the operator rate, usually, or any other argument to the operator - @return an ID that will be used to identify the operator - */ - virtual ID addOp( eoOp& _op, float _arg ) = 0; - - /** Gets a non-const reference to an operator, so that it can be changed, - modified or whatever - @param _id a previously assigned ID - @throw runtime_exception if the ID does not exist*/ - virtual eoOp& getOp( ID _id ) = 0; - - /** Remove an operator from the operator set - @param _id a previously assigned ID - @throw runtime_exception if the ID does not exist - */ - virtual void deleteOp( ID _id ) = 0; - - /// Returns a genetic operator according to the established criteria - virtual eoOp* Op() = 0; - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - @return the class name as a string - */ - virtual string className() const { return "eoOpSelector"; }; - - /** - * Read object and print objects are left for subclasses to define. - */ - //@} -}; - -//----------------------------------------------------------------------------- - -#endif EO_H +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoOpSelector.h + Base class for operator selectors, which return 1 operator according + to some criterium + + (c) GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +//----------------------------------------------------------------------------- + +#ifndef EOOPSELECTOR_H +#define EOOPSELECTOR_H + +//----------------------------------------------------------------------------- + +#include // runtime_error + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** An operator selector is an object that contains a set of EO operators, +and selects one based on whatever criteria. It will be used in the breeder objects.\\ +This class is basically a generic interface for operator selection +*/ +template +class eoOpSelector: public eoObject, public eoPrintable +{ +public: + /// type of IDs assigned to each operators, used to handle them + typedef unsigned ID; + + /** add an operator to the operator set + @param _op a genetic operator, that will be applied in some way + @param _arg the operator rate, usually, or any other argument to the operator + @return an ID that will be used to identify the operator + */ + virtual ID addOp( eoOp& _op, float _arg ) = 0; + + /** Gets a non-const reference to an operator, so that it can be changed, + modified or whatever + @param _id a previously assigned ID + @throw runtime_exception if the ID does not exist*/ + virtual const eoOp& getOp( ID _id ) = 0; + + /** Remove an operator from the operator set + @param _id a previously assigned ID + @throw runtime_exception if the ID does not exist + */ + virtual void deleteOp( ID _id ) = 0; + + /// Returns a genetic operator according to the established criteria + virtual eoOp* Op() = 0; + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoOpSelector"; }; + + /** + * Read object and print objects are left for subclasses to define. + */ + //@} +}; + +//----------------------------------------------------------------------------- + +#endif EO_H diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 363ee0059..e6cf0aef9 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -49,87 +49,76 @@ to the population. template class eoPop: public vector, public eoObject, public eoPersistent { - /* - Victor Rivas (vrivas@ujaen.es): 15-Dec-1999 - An EO can have NO genes. - /// Type is the type of each gene in the chromosome - #ifdef _MSC_VER - typedef EOT::Type Type; - #else - typedef typename EOT::Type Type; - #endif - */ - -public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes - */ - eoPop():vector() {}; - - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - /* - Victor Rivas (vrivas@ujaen.es): 15-Dec-1999 - This constructor must be substitued by one using factories. - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - */ - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - /* - Victor Rivas (vrivas@ujaen.es): 15-Dec-1999 - This constructor must be substitued by one using factories. - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - */ - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; - - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ +/// Type is the type of each gene in the chromosome +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop() :vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ virtual void readFrom(istream& _is) { while( _is ) { // reads line by line, and creates an object per // line char line[MAXLINELENGTH]; _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT( s ); - push_back( thisEOT ); - } + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); + push_back( thisEOT ); + } } } @@ -138,18 +127,18 @@ public: * @param _os A ostream. In this case, prints the population to standard output. The EOT class must hav standard output with cout, but since it should be an eoObject anyways, it's no big deal. - */ + */ virtual void printOn(ostream& _os) const { copy( begin(), end(), ostream_iterator( _os, "\n") ); }; - + /** Inherited from eoObject. Returns the class name. @see eoObject */ virtual string className() const {return "eoPop";}; - //@} - -protected: - + //@} + + protected: + }; #endif diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 6f2eb3b87..7324f6ee7 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -1,9 +1,9 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eoPopOps.h -// (c) GeNeura Team, 1998 -/* + ----------------------------------------------------------------------------- + eoPopOps.h + (c) GeNeura Team, 1998 + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -108,7 +108,8 @@ class eoBinPopOp: public eoObject{ //----------------------------------------------------------------------------- -/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ +/** eoSelectone selects only one element from a whole population. Usually used to + select mates*/ template class eoSelectOne: public eoObject{ diff --git a/eo/src/eoProportionalGOpSel.h b/eo/src/eoProportionalGOpSel.h new file mode 100644 index 000000000..bc7d1c083 --- /dev/null +++ b/eo/src/eoProportionalGOpSel.h @@ -0,0 +1,51 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoProportionalGOpSel.h + Proportional operator selector, selects operators proportionally to its rate + + (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoProportionalGOpSel_h +#define eoProportionalGOpSel_h + +//----------------------------------------------------------------------------- + +#include // eoOpSelector + +template +class eoProportionalGOpSel : public eoGOpSelector +{ +public : + eoProportionalGOpSel() : eoGOpSelector() {} + + /** Returns the operator proportionally selected */ + virtual eoGeneralOp& selectOp() + { + unsigned what = rng.roulette_wheel(rates); + return *operator[](what); + } + + /// + virtual string className() const { return "eoGOpSelector"; }; + +}; + +#endif eoProportionalGOpSel_h diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index 6356ef935..ab107e690 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -113,7 +113,7 @@ public : @see reseed */ - eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K((0x9908B0DFU)) { + eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { state = new uint32[N+1]; initialize(s); } @@ -197,7 +197,7 @@ public : { if (total == 0) { // count - for (unsigned i = 0; i < vec.size(); ++i) + for (int i = 0; i < vec.size(); ++i) total += vec[i]; } diff --git a/eo/src/eoRnd.h b/eo/src/eoRnd.h index 76e40324e..93b61c2ff 100644 --- a/eo/src/eoRnd.h +++ b/eo/src/eoRnd.h @@ -1,114 +1,114 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoRnd.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EORND_H -#define _EORND_H - -//----------------------------------------------------------------------------- - -#include - -//----------------------------------------------------------------------------- -// Class eoRnd -//----------------------------------------------------------------------------- - -#include // srand -#include // time -#include // runtime_error - -//----------------------------------------------------------------------------- - -#include - -//----------------------------------------------------------------------------- -/** - * Base class for a family of random number generators. Generates numbers - * according to the parameters given in the constructor. Uses the machine's - * own random number generators. Which is not too good, after all. - */ -template -class eoRnd: public eoObject, public eoPersistent -{ -public: - - /// default constructor - eoRnd(unsigned _seed = 0) { - if ( !started ) { - srand(_seed?_seed:time(0)); - started = true; - } - } - - /// Copy cotor - eoRnd(const eoRnd& _r ) {srand(time(0));}; - - /** Main function: random generators act as functors, that return random numbers. - It´s non-const because it might modify a seed - @return return a random number - */ - virtual T operator()() = 0; - - /** Return the class id. - @return the class name as a string - */ - virtual string className() const { return "eoRandom"; }; - - /** - * Read object. - * @param is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is); - - /** - * print object. Prints just the ID, since the seed is not accesible. - * @param is A ostream. - */ - void printOn(ostream& _os) const { _os << endl; }; - -private: - /// true if the RNG has been started already. If it starts every time, means trouble. - static bool started; -}; - -template bool eoRnd::started = false; - - -//-------------------------------------------------------------------------- - -/** - * Read object. - * @param is A istream. - * @throw runtime_exception If a valid object can't be read. - */ -template -void eoRnd::readFrom(istream& _is) { - if (!_is) - throw runtime_error("Problems reading from stream in eoRnd"); - long seed; - _is >> seed; - srand(seed); -} - -#endif +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoRnd.h + (c) GeNeura Team, 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EORND_H +#define _EORND_H + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +// Class eoRnd +//----------------------------------------------------------------------------- + +#include // srand +#include // time +#include // runtime_error + +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +/** + * Base class for a family of random number generators. Generates numbers + * according to the parameters given in the constructor. Uses the machine's + * own random number generators. Which is not too good, after all. + */ +template +class eoRnd: public eoObject, public eoPersistent +{ +public: + + /// default constructor + eoRnd(unsigned _seed = 0) { + if ( !started ) { + srand(_seed?_seed:time(0)); + started = true; + } + } + + /// Copy cotor + eoRnd(const eoRnd& _r ) {srand(time(0));}; + + /** Main function: random generators act as functors, that return random numbers. + It´s non-const because it might modify a seed + @return return a random number + */ + virtual T operator()() = 0; + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoRandom"; }; + + /** + * Read object. + * @param is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is); + + /** + * print object. Prints just the ID, since the seed is not accesible. + * @param is A ostream. + */ + void printOn(ostream& _os) const { _os << endl; }; + +private: + /// true if the RNG has been started already. If it starts every time, means trouble. + static bool started; +}; + +template bool eoRnd::started = false; + + +//-------------------------------------------------------------------------- + +/** + * Read object. + * @param is A istream. + * @throw runtime_exception If a valid object can't be read. + */ +template +void eoRnd::readFrom(istream& _is) { + if (!_is) + throw runtime_error("Problems reading from stream in eoRnd"); + long seed; + _is >> seed; + srand(seed); +} + +#endif diff --git a/eo/src/eoString.h b/eo/src/eoString.h index 548d4c354..ff515c70d 100644 --- a/eo/src/eoString.h +++ b/eo/src/eoString.h @@ -60,6 +60,14 @@ public: *this += _rnd(); } }; + + /** Ctor from a stream + @param _s input stream + */ + eoString( istream & _s ) + : eo1d(){ + _s >> *this; + }; /// copy ctor eoString( const eoString& _eoStr ) diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index b825d9ab1..c824673f8 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -1,71 +1,71 @@ -// eoUniform.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// EOUniform.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOUNIFORM_H -#define _EOUNIFORM_H - -//----------------------------------------------------------------------------- - -#include -#include - -//----------------------------------------------------------------------------- -// Class eoUniform -//----------------------------------------------------------------------------- - -/// Generates uniform random number over the interval [min, max) -template -class eoUniform: public eoRnd -{ - public: - /** - * Default constructor. - * @param _min The minimum value in the interval. - * @param _max The maximum value in the interval. - */ - eoUniform(T _min = 0, T _max = 1) - : eoRnd(), min(_min), diff(_max - _min) {} - - /** - * copy constructor. - * @param _rnd the other rnd - */ - eoUniform( const eoUniform& _rnd) - : eoRnd( _rnd), min(_rnd.minim), diff(_rnd.diff) {} - - /** Returns an uniform random number over the interval [min, max) - Uses global rng object */ - virtual T operator()() { - return min + T( rng.uniform( diff ) ); - } - - private: - T min; - double diff; -}; - -//----------------------------------------------------------------------------- - -#endif +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoUniform.h + Uniform random number generator; + (c) GeNeura Team, 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ +//----------------------------------------------------------------------------- + +#ifndef _EOUNIFORM_H +#define _EOUNIFORM_H + +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- +// Class eoUniform +//----------------------------------------------------------------------------- + +/// Generates uniform random number over the interval [min, max) +template +class eoUniform: public eoRnd +{ + public: + /** + * Default constructor. + * @param _min The minimum value in the interval. + * @param _max The maximum value in the interval. + */ + eoUniform(T _min = 0, T _max = 1) + : eoRnd(), min(_min), diff(_max - _min) {} + + /** + * copy constructor. + * @param _rnd the other rnd + */ + eoUniform( const eoUniform& _rnd) + : eoRnd( _rnd), min(_rnd.minim), diff(_rnd.diff) {} + + /** Returns an uniform random number over the interval [min, max) + Uses global rng object */ + virtual T operator()() { + return min + T( rng.uniform( diff ) ); + } + + private: + T min; + double diff; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 4a0a7e6f7..d9a24dc8a 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -1,169 +1,170 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoVector.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eoVector_H -#define _eoVector_H - -// STL libraries -#include // For vector -#include -#include - -#include -#include - -/** Adaptor that turns an STL vector into an EO - with the same gene type as the type with which - the vector has been instantiated -*/ -template -class eoVector: public eo1d, public vector { -public: - typedef T Type ; - - /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator - //@{ - - /** Ctor. - @param _size Lineal length of the object - @param _val Common initial value - */ - eoVector( unsigned _size = 0, T _val = 0) - : eo1d(), vector( _size, _val ){ }; - - /** Ctor using a random number generator - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called - */ - eoVector( unsigned _size, eoRnd& _rnd ); - - /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, -which is supposed to be dynamic and dependent on environment. - @param _is the input stream; should have all values in a single line, separated by whitespace - */ - eoVector( istream& _is); - - - /// copy ctor - eoVector( const eoVector & _eo ) - : eo1d( _eo ), vector( _eo ){ }; - - /// Assignment operator - const eoVector& operator =( const eoVector & _eo ) { - if ( this != &_eo ){ - eo1d::operator=( _eo ); - vector::operator=( _eo ); - } - return *this; - } - - /// dtor - virtual ~eoVector() {}; - - //@} - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual T getGene( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading gene"); - return (*this)[_i]; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void setGene( unsigned _i, const T& _value ) { - if ( _i >= size() ) - throw out_of_range( "out_of_range when writing a gene"); - (*this)[_i] = _value; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void insertGene( unsigned _i, T _val ) { - if (_i <= size() ) { - vector::iterator i = begin()+_i; - insert( i, _val ); - } else { - throw out_of_range( "out_of_range when inserting a gene"); - } - }; - - /** Eliminates the gene at position _i - @exception out_of_range if _i is larger than EO´s size - */ - virtual void deleteGene( unsigned _i ) { - if (_i < this->size() ) { - vector::iterator i = this->begin()+_i; - this->erase( i ); - } else { - throw out_of_range( "out_of_range when deleting a gene"); - }; - }; - - /// methods that implement the EO protocol - virtual unsigned length() const { return this->size(); }; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoVector";}; - //@} - -}; - - -//____________________________ Some method implementation _______________________ - -// Ctors______________________________________________________________________________ -//____________________________________________________________________________________ -template -eoVector::eoVector( unsigned _size, eoRnd& _rnd ) - : eo1d(), vector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - *i = _rnd(); - } -}; - -//____________________________________________________________________________________ -template -eoVector::eoVector( istream& _is) - : eo1d(), vector( ){ - while (_is ) { - T tmp; - _is >> tmp; - push_back( tmp ); - } - -}; - -#endif +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoVector.h + Turns an STL vector into an EO + (c) GeNeura Team, 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +//----------------------------------------------------------------------------- + +#ifndef _eoVector_H +#define _eoVector_H + +// STL libraries +#include // For vector +#include +#include + +#include +#include + +/** Adaptor that turns an STL vector into an EO + with the same gene type as the type with which + the vector has been instantiated +*/ +template +class eoVector: public eo1d, public vector { +public: + typedef T Type ; + + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + + /** Ctor. + @param _size Lineal length of the object + @param _val Common initial value + */ + eoVector( unsigned _size = 0, T _val = 0) + : eo1d(), vector( _size, _val ){ }; + + /** Ctor using a random number generator + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called + */ + eoVector( unsigned _size, eoRnd& _rnd ); + + /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, +which is supposed to be dynamic and dependent on environment. + @param _is the input stream; should have all values in a single line, separated by whitespace + */ + eoVector( istream& _is); + + + /// copy ctor + eoVector( const eoVector & _eo ) + : eo1d( _eo ), vector( _eo ){ }; + + /// Assignment operator + const eoVector& operator =( const eoVector & _eo ) { + if ( this != &_eo ){ + eo1d::operator=( _eo ); + vector::operator=( _eo ); + } + return *this; + } + + /// dtor + virtual ~eoVector() {}; + + //@} + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual T getGene( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void setGene( unsigned _i, const T& _value ) { + if ( _i >= size() ) + throw out_of_range( "out_of_range when writing a gene"); + (*this)[_i] = _value; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void insertGene( unsigned _i, T _val ) { + if (_i <= size() ) { + vector::iterator i = begin()+_i; + insert( i, _val ); + } else { + throw out_of_range( "out_of_range when inserting a gene"); + } + }; + + /** Eliminates the gene at position _i + @exception out_of_range if _i is larger than EO´s size + */ + virtual void deleteGene( unsigned _i ) { + if (_i < this->size() ) { + vector::iterator i = this->begin()+_i; + this->erase( i ); + } else { + throw out_of_range( "out_of_range when deleting a gene"); + }; + }; + + /// methods that implement the EO protocol + virtual unsigned length() const { return this->size(); }; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoVector";}; + //@} + +}; + + +//____________________________ Some method implementation _______________________ + +// Ctors______________________________________________________________________________ +//____________________________________________________________________________________ +template +eoVector::eoVector( unsigned _size, eoRnd& _rnd ) + : eo1d(), vector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + *i = _rnd(); + } +}; + +//____________________________________________________________________________________ +template +eoVector::eoVector( istream& _is) + : eo1d(), vector( ){ + while (_is ) { + T tmp; + _is >> tmp; + push_back( tmp ); + } + +}; + +#endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index d922e2fa6..4f27af5ae 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -17,7 +17,36 @@ LDADDS = $(top_builddir)/src/libeo.a noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps\ - t-eoAtomOps t-selectOne + t-eoAtomOps t-selectOne t-eoaltbreeder t-eoGeneralOps t-eoGOpSel \ + t-eoVector + +############################################################################### + +t_eoVector_SOURCES = t-eoVector.cpp +t_eoVector_DEPENDENCIES = $(DEPS) +t_eoVector_LDFLAGS = -lm +t_eoVector_LDADD = $(LDADDS) + +############################################################################### + +t_eoGOpSel_SOURCES = t-eoGOpSel.cpp +t_eoGOpSel_DEPENDENCIES = $(DEPS) +t_eoGOpSel_LDFLAGS = -lm +t_eoGOpSel_LDADD = $(LDADDS) + +############################################################################### + +t_eoGeneralOps_SOURCES = t-eoGeneralOps.cpp +t_eoGeneralOps_DEPENDENCIES = $(DEPS) +t_eoGeneralOps_LDFLAGS = -lm +t_eoGeneralOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoaltbreeder_SOURCES = t-eoaltbreeder.cpp +t_eoaltbreeder_DEPENDENCIES = $(DEPS) +t_eoaltbreeder_LDFLAGS = -lm +t_eoaltbreeder_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index a10890d4a..577d6fedb 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4a from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -49,9 +49,10 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -72,9 +73,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 @@ -87,9 +88,37 @@ LDADDS = $(top_builddir)/src/libeo.a ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps t-selectOne +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps t-selectOne t-eoaltbreeder t-eoGeneralOps t-eoGOpSel t-eoVector +############################################################################### + +t_eoVector_SOURCES = t-eoVector.cpp +t_eoVector_DEPENDENCIES = $(DEPS) +t_eoVector_LDFLAGS = -lm +t_eoVector_LDADD = $(LDADDS) + +############################################################################### + +t_eoGOpSel_SOURCES = t-eoGOpSel.cpp +t_eoGOpSel_DEPENDENCIES = $(DEPS) +t_eoGOpSel_LDFLAGS = -lm +t_eoGOpSel_LDADD = $(LDADDS) + +############################################################################### + +t_eoGeneralOps_SOURCES = t-eoGeneralOps.cpp +t_eoGeneralOps_DEPENDENCIES = $(DEPS) +t_eoGeneralOps_LDFLAGS = -lm +t_eoGeneralOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoaltbreeder_SOURCES = t-eoaltbreeder.cpp +t_eoaltbreeder_DEPENDENCIES = $(DEPS) +t_eoaltbreeder_LDFLAGS = -lm +t_eoaltbreeder_LDADD = $(LDADDS) + ############################################################################### t_selectOne_SOURCES = t-selectOne.cpp @@ -250,6 +279,10 @@ t_eoESFull_OBJECTS = t-eoESFull.o t_eoESOps_OBJECTS = t-eoESOps.o t_eoAtomOps_OBJECTS = t-eoAtomOps.o t_selectOne_OBJECTS = t-selectOne.o +t_eoaltbreeder_OBJECTS = t-eoaltbreeder.o +t_eoGeneralOps_OBJECTS = t-eoGeneralOps.o +t_eoGOpSel_OBJECTS = t-eoGOpSel.o +t_eoVector_OBJECTS = t-eoVector.o CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -267,8 +300,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best -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) -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) +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) all: all-redirect .SUFFIXES: @@ -403,6 +436,22 @@ t-eoAtomOps: $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_DEPENDENCIES) t-selectOne: $(t_selectOne_OBJECTS) $(t_selectOne_DEPENDENCIES) @rm -f t-selectOne $(CXXLINK) $(t_selectOne_LDFLAGS) $(t_selectOne_OBJECTS) $(t_selectOne_LDADD) $(LIBS) + +t-eoaltbreeder: $(t_eoaltbreeder_OBJECTS) $(t_eoaltbreeder_DEPENDENCIES) + @rm -f t-eoaltbreeder + $(CXXLINK) $(t_eoaltbreeder_LDFLAGS) $(t_eoaltbreeder_OBJECTS) $(t_eoaltbreeder_LDADD) $(LIBS) + +t-eoGeneralOps: $(t_eoGeneralOps_OBJECTS) $(t_eoGeneralOps_DEPENDENCIES) + @rm -f t-eoGeneralOps + $(CXXLINK) $(t_eoGeneralOps_LDFLAGS) $(t_eoGeneralOps_OBJECTS) $(t_eoGeneralOps_LDADD) $(LIBS) + +t-eoGOpSel: $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_DEPENDENCIES) + @rm -f t-eoGOpSel + $(CXXLINK) $(t_eoGOpSel_LDFLAGS) $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_LDADD) $(LIBS) + +t-eoVector: $(t_eoVector_OBJECTS) $(t_eoVector_DEPENDENCIES) + @rm -f t-eoVector + $(CXXLINK) $(t_eoVector_LDFLAGS) $(t_eoVector_OBJECTS) $(t_eoVector_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: @@ -449,7 +498,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -478,7 +527,7 @@ uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install installdirs: diff --git a/eo/test/binary_value.h b/eo/test/binary_value.h index f3e05e771..a450a1176 100644 --- a/eo/test/binary_value.h +++ b/eo/test/binary_value.h @@ -1,18 +1,18 @@ -#include - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -/** Just a simple function that takes binary value of a chromosome and sets - the fitnes. - @param _chrom A binary chromosome -*/ -void binary_value(Chrom& _chrom) -{ - float sum = 0; - for (unsigned i = 0; i < _chrom.size(); i++) - if (_chrom[i]) +#include + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +float binary_value(const Chrom& _chrom) +{ + float sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + if (_chrom[i]) sum += pow(2, _chrom.size() - i - 1); - _chrom.fitness(sum); -} + return sum; +} diff --git a/eo/test/real_value.h b/eo/test/real_value.h index 1822f2902..68415519e 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -1,23 +1,20 @@ -#include - -//----------------------------------------------------------------------------- - -typedef vector Vec; - -/** Just a simple function that takes an eoVector and sets the fitnes - to -sphere (we'll see later how to minimize rather than maximize!) - @param _ind A floatingpoint vector -*/ -float the_real_value(Vec& _ind) -{ - double sum = 0; /* compute in double format, even if return a float */ - for (unsigned i = 0; i < _ind.size(); i++) - sum += _ind[i] * _ind[i]; - return -sum; -} - -typedef eoESFullChrom Ind; - -void real_value(Ind & _ind) { - _ind.fitness( the_real_value(_ind) ); -} +#include + +//----------------------------------------------------------------------------- + +typedef vector Vec; + +/** Just a simple function that takes an eoVector and sets the fitnes + to -sphere (we'll see later how to minimize rather than maximize!) + @param _ind A floatingpoint vector +*/ +float real_value(const eoESFullChrom& _ind) +{ + double sum = 0; /* compute in double format, even if return a float */ + for (unsigned i = 0; i < _ind.size(); i++) + sum += _ind[i] * _ind[i]; + return -sum; +} + + + diff --git a/eo/test/t-eoAtomOps.cpp b/eo/test/t-eoAtomOps.cpp index 03bb367d1..715fffc5e 100644 --- a/eo/test/t-eoAtomOps.cpp +++ b/eo/test/t-eoAtomOps.cpp @@ -1,33 +1,66 @@ -// Program to test several EO-ES features - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include - -using namespace std; - -// Operators we are going to test -#include -#include -#include -#include - -// Several EOs -#include - -main(int argc, char *argv[]) { - eoString aString("123456"); - eoAtomCreep creeper; - eoAtomMutation< eoString > mutator( creeper, 0.5 ); - - cout << "Before aString " << aString; - mutator( aString); - cout << " after mutator " << aString; - - return 0; // to avoid VC++ complaints -} - +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoAtomOps.cpp + Program that tests the atomic operator classes + + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +//-----------------------------------------------------------------------------// + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace std; + +// Operators we are going to test +#include +#include +#include +#include + +// Several EOs +#include + +// RNGs +#include + +main(int argc, char *argv[]) { + eoString aString("123456"); + eoAtomCreep creeper; + eoAtomMutation< eoString > mutator( creeper, 0.5 ); + + eoNegExp charNE( 2 ); + eoAtomRandom randomer( charNE ); + eoAtomMutation< eoString > mutator2 ( randomer, 0.5 ); + + cout << "Before aString " << aString << endl; + mutator( aString); + cout << " after mutator " << aString << endl; + mutator2( aString); + cout << " after mutator2 " << aString << endl;; + return 0; // to avoid VC++ complaints +} + diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp new file mode 100644 index 000000000..3f7e41110 --- /dev/null +++ b/eo/test/t-eoGOpSel.cpp @@ -0,0 +1,107 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoGOpSel.cpp + Testing proportional operator selectors + + (c) Maarten Keijzer and GeNeura Team, 2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +//-----------------------------------------------------------------------------// + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include "eoBin.h" // eoBin, eoPop, eoBreeder +#include +#include +#include +//#include + + +// Fitness evaluation +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + chrom.fitness(binary_value(chrom)); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + eoBinBitFlip bitflip; + eoBinCrossover xover; + + //Create the proportional operator selector and add the + // two operators creatd above to it. + + eoProportionalGOpSel propSel; + propSel.addOp(bitflip, 0.5); + propSel.addOp(xover, 0.5); + for ( i = 0; i < POP_SIZE; i ++ ) { + eoGeneralOp& foo = propSel.selectOp(); + cout << foo.nInputs() << " " + << foo.nOutputs() << endl; + } + + // eoAltBreeder breeder( propSel ); + + + +// breeder(pop); + +// eoSequentialOpSelector::outIt > seqSel; + +// eoAltBreeder breeder2( seqSel ); +// seqSel.addOp(bitflip, 0.25); +// seqSel.addOp(xover, 0.75); + +// breeder2(pop); + +// // reevaluation of fitness +// for_each(pop.begin(), pop.end(), binary_value); + +// cout << "new population:" << endl; +// for (i = 0; i < pop.size(); ++i) +// cout << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoGeneralOps.cpp b/eo/test/t-eoGeneralOps.cpp new file mode 100644 index 000000000..a14612125 --- /dev/null +++ b/eo/test/t-eoGeneralOps.cpp @@ -0,0 +1,71 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoGeneralOps.cpp + Program that tests the General operator interface, and the wrappers + for monary and unary operators. + + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +//-----------------------------------------------------------------------------// + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace std; + +// Operators we are going to test +#include +#include +#include +#include + +// Several EOs +#include + +// generalOp we are testing +#include + +main(int argc, char *argv[]) { + eoString aString("123456"); + eoAtomCreep creeper; + eoAtomMutation< eoString > mutator( creeper, 0.5 ); + + eoWrappedMonOp< eoString > wCreeper( mutator ); + cout << "Before aString " << aString; + mutator( aString); + cout << " after mutator " << aString; + + // Test now the alternative interface + eoPop< eoString > vIn, vOut; + insert_iterator > > ins( vOut, vOut.begin() ); + vIn.push_back( aString ); + wCreeper( vIn.begin(), ins ); + + cout << endl << "Before " << vIn[0] << endl << " after " << vOut[0] << endl;; + + return 0; // to avoid VC++ complaints +} + diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index c0be81b10..fefcc6c65 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -1,31 +1,30 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/*----------------------------------------------------------------------------- - * t-eoRandom - * Testing program for the eoRNG class - * (c) GeNeura Team, 1999 + t-eoRandom.cpp + Test program for random generator - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ //----------------------------------------------------------------------------- - #include // cout #include // ostrstream, istrstream #include // eoBin diff --git a/eo/test/t-eoVector.cpp b/eo/test/t-eoVector.cpp new file mode 100644 index 000000000..d0a19f797 --- /dev/null +++ b/eo/test/t-eoVector.cpp @@ -0,0 +1,57 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoVectpr.cpp + This program tests vector-like chromosomes + (c) GeNeura Team, 1999, 2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream + +#include +#include // eoVector +#include + +//----------------------------------------------------------------------------- + +typedef eoVector Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned SIZE = 4; + unsigned i, j; + eoUniform uniform(-1,1); + + Chrom chrom1(SIZE,uniform), chrom2( SIZE, uniform); + + cout << "chrom1: " << chrom1 << endl << + "chrom2: " << chrom2 << endl; + + eo1dWDistance< float, float > chromDist( chrom1 ); + cout << "Distance from chrom1 to chrom2 " << chromDist.distance( chrom2 ) << endl; + + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoaltbreeder.cpp b/eo/test/t-eoaltbreeder.cpp new file mode 100644 index 000000000..1c090cfd3 --- /dev/null +++ b/eo/test/t-eoaltbreeder.cpp @@ -0,0 +1,98 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoaltbreeder.cpp + Extensive esting of the eoAltBreeder class + + (c) Maarten Keijzer and GeNeura Team, 2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +//-----------------------------------------------------------------------------// + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include "eoBin.h" // eoBin, eoPop, eoBreeder +#include +#include +#include +#include + + +// Fitness evaluation +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + eoBinBitFlip bitflip; + eoBinCrossover xover; + + eoProportionalOpSelector::outIt > propSel; + + eoAltBreeder breeder( propSel ); + + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + breeder(pop); + + eoSequentialOpSelector::outIt > seqSel; + + eoAltBreeder breeder2( seqSel ); + seqSel.addOp(bitflip, 0.25); + seqSel.addOp(xover, 0.75); + + breeder2(pop); + + // reevaluation of fitness + for_each(pop.begin(), pop.end(), binary_value); + + cout << "new population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 9ad0eed30..55043ff06 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -1,24 +1,23 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// t-eobin.cpp -// This program test the the binary cromosomes and several genetic operators -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + t-eobin.cpp + This program tests the the binary cromosomes and several genetic operators + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ diff --git a/eo/test/t-eogeneration.cpp b/eo/test/t-eogeneration.cpp index 1bf8db25b..ab5843720 100644 --- a/eo/test/t-eogeneration.cpp +++ b/eo/test/t-eogeneration.cpp @@ -1,82 +1,145 @@ -//----------------------------------------------------------------------------- -// t-eogeneration.cpp -//----------------------------------------------------------------------------- - -// to avoid long name warnings -#pragma warning(disable:4786) - -#include - -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 16; - unsigned i; - - eoUniform uniform(false, true); - eoBinRandom random; - eoPop pop; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - cout << "population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - - - // selection - eoLottery lottery; - - // breeder - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoProportionalOpSel propSel; - eoBreeder breeder( propSel ); - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - // replacement - eoInclusion inclusion; - - // Evaluation - eoEvalFuncPtr eval( binary_value ); - - // GA generation - eoGeneration generation(lottery, breeder, inclusion, eval); - - // evolution - unsigned g = 0; - do { - try - { - generation(pop); - } - catch (exception& e) - { - cout << "exception: " << e.what() << endl;; - exit(EXIT_FAILURE); - } - - cout << "pop[" << ++g << "]" << endl; - for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - - } while (pop[0].fitness() < pow(2.0, CHROM_SIZE) - 1); - - return 0; -} - -//----------------------------------------------------------------------------- +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eogeneration.cpp + Testing the eoGeneration classes, and classes related to it + + (c) GeNeura Team, 1999, 2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +//-----------------------------------------------------------------------------// + + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + + eoUniform uniform(false, true); + eoBinRandom random; + eoPop pop; + // Evaluation + eoEvalFuncPtr eval( binary_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + + // selection + eoLottery lottery; + + // breeder + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + // replacement + eoInclusion inclusion; + + + + // GA generation + eoGeneration generation(lottery, breeder, inclusion, eval); + + // evolution + unsigned g = 0; + do { + try + { + generation(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop[" << ++g << "]" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + } while (pop[0].fitness() < pow(2.0, CHROM_SIZE) - 1); + + // Try again, with a "counted" evaluation function + // GA generation + // Evaluation + eoEvalFuncPtrCnt eval2( binary_value ); + eoPop pop2; + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + eval2(chrom); + pop2.push_back(chrom); + } + eoGeneration generation2(lottery, breeder, inclusion, eval2); + + // evolution + do { + try + { + generation2(pop2); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop[" << ++g << "]" << endl; + for (i = 0; i < pop2.size(); ++i) + cout << "\t" << pop2[i] << " " << pop[i].fitness() << endl; + + } while (pop2[0].fitness() < pow(2.0, CHROM_SIZE) - 1); + + cout << "Number of evaluations " << eval2.getNumOfEvaluations() << endl; + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am index 81189d33b..c68285de4 100644 --- a/eo/win/Makefile.am +++ b/eo/win/Makefile.am @@ -1,3 +1,4 @@ +#Some dsps are missing here EXTRA_DIST=EO.dsw random.dsp t_eoinsertion.dsp t_ops.dsp\ atomops.dsp t_eoaged.dsp t_eornd.dsp t_opsel.dsp\ t_eobin.dsp t_eostring.dsp t_opselmason.dsp\ From 801ba49682c675f46b91d7dc402fddacdf56922b Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 9 Feb 2000 19:50:02 +0000 Subject: [PATCH 0091/2134] some test --- eo/src/eoAltBreeder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoAltBreeder.h b/eo/src/eoAltBreeder.h index 737fbdd9b..1a8241bd6 100644 --- a/eo/src/eoAltBreeder.h +++ b/eo/src/eoAltBreeder.h @@ -15,7 +15,7 @@ #include // eoTransform #include // eoOpSelector #include -#include "eoRng.h" +#include using namespace std; From 4f40da85e4d422ebcc503296c660981a891c556a Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 11 Feb 2000 12:05:07 +0000 Subject: [PATCH 0092/2134] A: has been fixed :-)) --- eo/src/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index ab107e690..8957755ca 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -197,7 +197,7 @@ public : { if (total == 0) { // count - for (int i = 0; i < vec.size(); ++i) + for (unsigned i = 0; i < vec.size(); ++i) total += vec[i]; } From 871fcc8184ea36547a47f76a29e8b449a630f156 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 15 Feb 2000 15:08:00 +0000 Subject: [PATCH 0093/2134] just a test --- eo/AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/AUTHORS b/eo/AUTHORS index 75e662456..55593b7b0 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -2,3 +2,4 @@ Pedro Angel Castillo Valdivieso Juan Julian Merelo Guervos Victor Manuel Rivas Santos Gustavo Romero Lopez + From cbc26ed5b26519192c0708d985db22c2bc5fac79 Mon Sep 17 00:00:00 2001 From: marc Date: Wed, 16 Feb 2000 04:40:20 +0000 Subject: [PATCH 0094/2134] Changed all "float" to "double" But more than that, this is a test of CVS for me Marc --- eo/src/eoLottery.h | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 252b16459..40c569622 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -30,36 +30,33 @@ #include // #include // accumulate -#include // eoPop eoSelect MINFLOAT +#include "eoPopOps.h" +#include "eoRNG.h" //----------------------------------------------------------------------------- -/** eoLottery: a selection method. Puts into the output a group of individuals - selected using lottery; individuals with higher probability will have more - chances of being selected. - Requires EOT::Fitness to be float castable -*/ +/// eoLottery: a selection method. +/// requires EOT::Fitness to be float castable //----------------------------------------------------------------------------- template class eoLottery: public eoBinPopOp { public: /// (Default) Constructor. - eoLottery(const float& _rate = 1.0): rate(_rate) {} + eoLottery(const double & _rate = 1.0): rate(_rate) {} - /** actually selects individuals from pop and pushes them back them into breeders - * until breeders has the right size: rate*pop.size() - * BUT what happens if breeders is already too big? - * Too big for what? - */ + /** actually selects individuals from pop and put them into breeders + * until breeders has the right size: rate*pop.size() + * BUT what happens if breeders is already too big? + */ void operator()( eoPop& pop, eoPop& breeders) { // scores of chromosomes - vector score(pop.size()); + vector score(pop.size()); // calculates total scores for chromosomes - float total = 0; + double total = 0; for (unsigned i = 0; i < pop.size(); i++) { - score[i] = static_cast(pop[i].fitness()); + score[i] = static_cast(pop[i].fitness()); total += score[i]; } @@ -77,9 +74,22 @@ template class eoLottery: public eoBinPopOp breeders.push_back(pop[indloc]); } } + + /// accessor to private rate + double Rate() {return rate;} + + /** @name Methods from eoObject */ + //@{ + /** readFrom and printOn inherited from eoMerge */ + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoLottery";}; + //@} private: - float rate; // selection rate + double rate; // selection rate }; //----------------------------------------------------------------------------- From 4ac185022674c439d7171f7bb8d71aa5825327ad Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 16 Feb 2000 15:03:45 +0000 Subject: [PATCH 0095/2134] *** empty log message *** --- eo/src/eoException.h | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 eo/src/eoException.h diff --git a/eo/src/eoException.h b/eo/src/eoException.h new file mode 100644 index 000000000..e135757e2 --- /dev/null +++ b/eo/src/eoException.h @@ -0,0 +1,69 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoException.h + Exceptions that are possibly thrown at initialization and such should be + defined here + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoException_h +#define eoException_h + +#include + +#include "eoObject.h" + +struct eoException +{ + eoException() {} + eoException(const eoObject& caller) : who_caught_it(caller.className()) {} + + std::string who(void) const { return who_caught_it; } + virtual std::string what(void) const{ return "";} + +private : + std::string who_caught_it; +}; + +struct eoFitnessException : public eoException +{ + eoFitnessException() : eoException() {} + eoFitnessException(const eoObject& caller) : eoException(caller) {} +}; + +struct eoNegativeFitnessException : public eoFitnessException +{ + eoNegativeFitnessException() : eoFitnessException() {} + eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {} + + std::string what(void) const { return "negative fitness encountered"; } +}; + +struct eoMinimizingFitnessException : public eoFitnessException +{ + eoMinimizingFitnessException() : eoFitnessException() {} + eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {} + + std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; } +}; + +#endif \ No newline at end of file From 9fba2bfbb9a15dbe86a89b3637ea95d13b9e2ee7 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 16 Feb 2000 15:05:19 +0000 Subject: [PATCH 0096/2134] Mak: Added the eoQuadratic Op and more ... (and I hate VI) --- eo/src/compatibility.h | 68 ++++++ eo/src/eoBitOp.h | 8 +- eo/src/eoBreeder.h | 216 +++++++++--------- eo/src/eoDetTournament.h | 148 ++++++------- eo/src/eoEvalFuncPtr.h | 118 +++++----- eo/src/eoGOpSelector.h | 310 ++++++++++++++------------ eo/src/eoLottery.h | 194 ++++++++-------- eo/src/eoMultiBinOp.h | 198 ++++++++--------- eo/src/eoObject.h | 137 ++++++------ eo/src/eoOp.h | 438 ++++++++++++++++++++----------------- eo/src/eoStochTournament.h | 146 ++++++------- eo/src/eoUniformXOver.h | 178 +++++++-------- eo/src/eoXOver2.h | 212 +++++++++--------- 13 files changed, 1247 insertions(+), 1124 deletions(-) create mode 100644 eo/src/compatibility.h diff --git a/eo/src/compatibility.h b/eo/src/compatibility.h new file mode 100644 index 000000000..a93aa2e50 --- /dev/null +++ b/eo/src/compatibility.h @@ -0,0 +1,68 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + compatibility.h + File to store some compiler specific stuff in. Currently handles, or + least tries to handle the min() max() problems when using MSVC + + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef COMPAT_H +#define COMPAT_H + +#ifdef _MSC_VER +/* +Maarten: added this code here because Mirkosoft has the +nasty habit of #define min and max in stdlib.h (and windows.h) +I'm trying to undo this horrible macro magic (microsoft yet macrohard) +here. Sure hope it works +*/ + +#include + +#ifdef min +#undef min +#undef max // as they come in pairs +#endif + +// add min and max to std... +namespace std +{ + template T min(const T& a, const T& b) + { + if(a < b) + return a; + // else + return b; + } + + template T max(const T& a, const T& b) + { + if(a > b) + return a; + // else + return b; + } +} + +#endif // _MSC_VER + +#endif \ No newline at end of file diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index cfe3d68d7..ca1ee7344 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -184,7 +184,7 @@ template class eoBinPrev: public eoMonOp /** eoBinCrossover --> classic crossover */ -template class eoBinCrossover: public eoBinOp +template class eoBinCrossover: public eoQuadraticOp { public: /// The class name. @@ -205,7 +205,7 @@ template class eoBinCrossover: public eoBinOp /** eoBinNxOver --> n-point crossover */ -template class eoBinNxOver: public eoBinOp +template class eoBinNxOver: public eoQuadraticOp { public: /// (Defualt) Constructor. @@ -263,7 +263,7 @@ template class eoBinNxOver: public eoBinOp /** eoBinGxOver --> gene crossover */ -template class eoBinGxOver: public eoBinOp +template class eoBinGxOver: public eoQuadraticOp { public: /// Constructor. @@ -318,7 +318,7 @@ template class eoBinGxOver: public eoBinOp }; - + //----------------------------------------------------------------------------- //@} #endif eoBitOp_h diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index 66eb0aedb..e94e815e9 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -1,103 +1,113 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoBreeder.h -// Takes two populations and mixes them -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoBreeder_h -#define eoBreeder_h - -//----------------------------------------------------------------------------- - -#include // vector -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector - -using namespace std; - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -template class eoBreeder: public eoMonPopOp -{ - public: - /// Default constructor. - eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} - - /// Destructor. - virtual ~eoBreeder() {} - - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - for (unsigned i = 0; i < pop.size(); i++) { - eoOp* op = opSel.Op(); - switch (op->readArity()) { - case unary: - { - eoMonOp* monop = static_cast* >(op); - (*monop)( pop[i] ); - break; - } - case binary: - { - eoBinOp* binop = static_cast* >(op); - eoUniform u(0, pop.size() ); - (*binop)(pop[i], pop[ u() ] ); - break; - } - case Nary: - { - eoNaryOp* Nop = static_cast* >(op); - eoUniform u(0, pop.size() ); - eoPop inVec, outVec; - inVec.push_back( pop[i] ); - unsigned numberOfOperands = u(); - for ( unsigned i = 0; i < numberOfOperands; i ++ ) { - inVec.push_back( pop[ u() ] ); - } - (*Nop)( inVec, outVec ); - break; - } - } - } - }; - - /// The class name. - string classname() const { return "eoBreeder"; } - - private: - eoOpSelector& opSel; - -}; - -//----------------------------------------------------------------------------- - -#endif eoBreeder_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBreeder.h +// Takes two populations and mixes them +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoBreeder_h +#define eoBreeder_h + +//----------------------------------------------------------------------------- + +#include // vector +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector + +#include "eoRandomIndiSelector.h" +#include "eoBackInserter.h" + +using namespace std; + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +template class eoBreeder: public eoMonPopOp +{ + public: + /// Default constructor. + eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} + + /// Destructor. + virtual ~eoBreeder() {} + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + size_t orgsize = pop.size(); + + for (unsigned i = 0; i < pop.size(); i++) { + eoOp* op = opSel.Op(); + switch (op->getType()) { + case eoOp::unary: + { + eoMonOp* monop = static_cast* >(op); + (*monop)( pop[i] ); + break; + } + case eoOp::binary: + { + eoBinOp* binop = static_cast* >(op); + eoUniform u(0, pop.size() ); + (*binop)(pop[i], pop[ u() ] ); + break; + } + case eoOp::quadratic: + { + eoQuadraticOp* Qop = static_cast* >(op); + + eoUniform u(0, pop.size() ); + (*Qop)(pop[i], pop[ u() ] ); + break; + } + case eoOp::general : + { + eoGeneralOp* Gop = static_cast* >(op); + + eoRandomIndiSelector selector; + eoBackInserter inserter; + + (*Gop)(selector(pop, orgsize, i), inserter(pop)); + break; + } + } + } + }; + + /// The class name. + string classname() const { return "eoBreeder"; } + + private: + eoOpSelector& opSel; + +}; + +//----------------------------------------------------------------------------- + +#endif eoBreeder_h diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h index a01fc0807..e5b1fce12 100644 --- a/eo/src/eoDetTournament.h +++ b/eo/src/eoDetTournament.h @@ -1,78 +1,70 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoDetTournament.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoDetTournament_h -#define eoDetTournament_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT -#include - -//----------------------------------------------------------------------------- -/** eoDetTournament: a selection method that selects ONE individual by - deterministic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - -template class eoDetTournament: public eoSelectOne -{ - public: - /// (Default) Constructor. - eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { - // consistency check - if (Tsize < 2) { - cout << "Warning, Tournament size shoudl be >= 2\nAdjusted\n"; - Tsize = 2; - } - } - - /** DANGER: if you want to be able to minimize as well as maximizem - DON'T cast the fitness to a float, use the EOT comparator! */ - virtual const EOT& operator()(const eoPop& pop) { - unsigned best = rng.random(pop.size()); // random individual - - for (unsigned i = 0; i // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include "selectors.h" + +//----------------------------------------------------------------------------- +/** eoDetTournament: a selection method that selects ONE individual by + deterministic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoDetTournament: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { + // consistency check + if (Tsize < 2) { + cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; + Tsize = 2; + } + } + + virtual const EOT& operator()(const eoPop& pop) + { + return deterministic_tournament(pop, Tsize)(); + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoDetTournament";}; + + private: + unsigned Tsize; +}; + +//----------------------------------------------------------------------------- + +#endif eoDetTournament_h diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index 1c40eecf2..d6d387d64 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -1,59 +1,59 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoEvalFuncPtr.h - Converts a classical C fitness evaluation function into a fitness - evaluation object - - (c) GeNeura Team, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOEVALFUNCPTR_H -#define EOEVALFUNCPTR_H - -#include - -/** EOEvalFuncPtr: This class - * takes an existing function pointer and converts it into a evaluation - * function class. That way, old style C or C++ functions can be adapted to EO - * function classes. - */ -template< class EOT > -struct eoEvalFuncPtr: public eoEvalFunc { - - /** Applies the function to the chromosome and sets the fitness of the - Chrom. Thus, the evaluation function need not be worried about that. - @param _eval pointer to the evaluation function, takes a EOT as an - argument and returns the fitness - @return the evaluated fitness for that object. - */ - eoEvalFuncPtr( EOFitT (* _eval)( const EOT& ) ) - : eoEvalFunc(), evalFunc( _eval ) {}; - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const { - _eo.fitness((*evalFunc)( _eo )); - }; - - private: - EOFitT (* evalFunc )( EOT& ); -}; - -#endif +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoEvalFuncPtr.h + Converts a classical C fitness evaluation function into a fitness + evaluation object + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTR_H +#define EOEVALFUNCPTR_H + +#include + +/** EOEvalFuncPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + */ +template< class EOT > +struct eoEvalFuncPtr: public eoEvalFunc { + + /** Applies the function to the chromosome and sets the fitness of the + Chrom. Thus, the evaluation function need not be worried about that. + @param _eval pointer to the evaluation function, takes a EOT as an + argument and returns the fitness + @return the evaluated fitness for that object. + */ + eoEvalFuncPtr( EOFitT (* _eval)( const EOT& ) ) + : eoEvalFunc(), evalFunc( _eval ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) const { + _eo.fitness((*evalFunc)( _eo )); + }; + + private: + EOFitT (* evalFunc )( const EOT& ); +}; + +#endif diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index f33b6bb1a..75e5e0cab 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -1,139 +1,171 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoGOpSelector.h - Base class for generalized (n-inputs, n-outputs) operator selectors. - Includes code and variables that contain operators and rates - - (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoGOpSelector_h -#define eoGOpSelector_h - -//----------------------------------------------------------------------------- - -#include // vector -#include -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector -#include -#include "eoRNG.h" - -using namespace std; - -/** Base class for alternative selectors, which use the generalized operator - interface */ - -template -class eoGOpSelector: public eoOpSelector, public vector*> -{ -public: - - /// Dtor - virtual ~eoGOpSelector() { - for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); - i != ownOpList.begin(); i ++ ) { - delete *i; - } - } - - /// Add any kind of operator to the operator mix, with an argument - virtual ID addOp( eoOp& _op, float _arg ) { - eoGeneralOp* op = dynamic_cast*>(&_op); - - // if it's not a general op, it's a "old" op; create a wrapped op from it - // and keep it on a list to delete them afterwards - // will use auto_ptr when they're readily available - if (op == 0) { - switch(_op.readArity()) - { - case unary : - op= new eoWrappedMonOp(static_cast&>(_op)); - break; - case binary : - op = new eoWrappedBinOp(static_cast&>(_op)); - break; - } - ownOpList.push_back( op ); - } - - iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer - - if (result == end()) - { - push_back(op); - rates.push_back(_arg); - return size(); - } - // else - - *result = op; - ID id = result - begin(); - rates[id] = _arg; - return id; - } - - /** Retrieve the operator using its integer handle - @param _id The id number. Should be a valid id, or an exception - will be thrown - @return a reference of the operator corresponding to that id. - */ - virtual const eoOp& getOp( ID _id ) - { - return *operator[](_id); - } - - /// - virtual void deleteOp( ID _id ) - { - operator[](_id) = 0; // TODO, check oplist and clear it there too. - rates[_id] = 0.0; - } - - /// - virtual eoOp* Op() - { - return &selectOp(); - } - - /// - virtual eoGeneralOp& selectOp() = 0; - - /// - virtual string className() const { return "eoGOpSelector"; }; - - /// - void printOn(ostream& _os) const { - _os << className() << endl; - for ( unsigned i=0; i!= rates.size(); i++ ) { - _os << *(operator[](i)) << "\t" << rates[i] << endl; - } - } - - -protected : - vector rates; - list< eoGeneralOp* > ownOpList; -}; - -#endif eoGOpSelector_h +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoGOpSelector.h + Base class for generalized (n-inputs, n-outputs) operator selectors. + Includes code and variables that contain operators and rates. + Also included eoProportionalGOpSelector and eoSequentialGOpSelector, that offer + a few concrete implementations. + + (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoGOpSelector_h +#define eoGOpSelector_h + +//----------------------------------------------------------------------------- + +#include +#include "eoOpSelector.h" +#include "eoWrappedOps.h" // for eoCombinedOp +#include "eoRNG.h" + +using namespace std; + +/** Base class for alternative selectors, which use the generalized operator + interface. eoGOpBreeders expects this class */ +template +class eoGOpSelector: public eoOpSelector, public vector*> +{ +public: + + /// Dtor + virtual ~eoGOpSelector() { + for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); + i != ownOpList.end(); i++ ) { + delete *i; + } + } + + /// Add any kind of operator to the operator mix, with an argument + virtual ID addOp( eoOp& _op, float _arg ); + // implementation can be found below + + /** Retrieve the operator using its integer handle + @param _id The id number. Should be a valid id, or an exception + will be thrown + @return a reference of the operator corresponding to that id. + */ + virtual const eoOp& getOp( ID _id ) + { + return *operator[](_id); + } + + /// + virtual void deleteOp( ID _id ); + // implemented below + + /// + virtual eoOp* Op() + { + return &selectOp(); + } + + /// + virtual eoGeneralOp& selectOp() = 0; + + /// + virtual string className() const { return "eoGOpSelector"; }; + + /// + void printOn(ostream& _os) const { + _os << className() << endl; + for ( unsigned i=0; i!= rates.size(); i++ ) { + _os << *(operator[](i)) << "\t" << rates[i] << endl; + } + } + + + const vector& getRates(void) const { return rates; } + +private : + vector rates; + list< eoGeneralOp* > ownOpList; +}; + +/* Implementation of longish functions defined above */ + +template +inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, float _arg ) +{ + + eoGeneralOp* op; + + if (_op.getType() == eoOp::general) + { + op = static_cast*>(&_op); + } + else + { + // if it's not a general op, it's a "old" op; create a wrapped op from it + // and keep it on a list to delete them afterwards + // will use auto_ptr when they're readily available + + switch(_op.getType()) + { + case eoOp::unary : + op= new eoWrappedMonOp(static_cast&>(_op)); + break; + case eoOp::binary : + op = new eoWrappedBinOp(static_cast&>(_op)); + case eoOp::quadratic : + op = new eoWrappedQuadraticOp(static_cast&>(_op)); + break; + } + ownOpList.push_back( op ); + } + + // Now 'op' is a general operator, either because '_op' was one or + // because we wrapped it in an appropriate wrapper in the code above. + + iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer + + if (result == end()) + { + push_back(op); + rates.push_back(_arg); + return size(); + } + // else + + *result = op; + ID id = result - begin(); + rates[id] = _arg; + return id; +} + +template +inline void eoGOpSelector::deleteOp( ID _id ) +{ + eoGeneralOp* op = operator[](_id); + + operator[](_id) = 0; + rates[_id] = 0.0; + + // check oplist and clear it there too. + + list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); + + if(it != ownOpList.end()) + { + ownOpList.erase(it); + } +} + +#endif eoGOpSelector_h diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 40c569622..333ee7923 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -1,97 +1,97 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoLottery.h -// Implements the lottery procedure for selection -// (c) GeNeura Team, 1998 - Marc Schoenauer, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoLottery_h -#define eoLottery_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include "eoPopOps.h" -#include "eoRNG.h" - -//----------------------------------------------------------------------------- -/// eoLottery: a selection method. -/// requires EOT::Fitness to be float castable -//----------------------------------------------------------------------------- - -template class eoLottery: public eoBinPopOp -{ - public: - /// (Default) Constructor. - eoLottery(const double & _rate = 1.0): rate(_rate) {} - - /** actually selects individuals from pop and put them into breeders - * until breeders has the right size: rate*pop.size() - * BUT what happens if breeders is already too big? - */ - void operator()( eoPop& pop, eoPop& breeders) - { - // scores of chromosomes - vector score(pop.size()); - - // calculates total scores for chromosomes - double total = 0; - for (unsigned i = 0; i < pop.size(); i++) { - score[i] = static_cast(pop[i].fitness()); - total += score[i]; - } - - // number of offspring needed - int target = (int)rint(rate * pop.size()); - - // test of consistency - if (breeders.size() >= target) { - throw("Problem in eoLottery: already too many offspring"); - } - - // selection of chromosomes - while (breeders.size() < target) { - unsigned indloc = rng.roulette_wheel(score, total); - breeders.push_back(pop[indloc]); - } - } - - /// accessor to private rate - double Rate() {return rate;} - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn inherited from eoMerge */ - - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoLottery";}; - //@} - - private: - double rate; // selection rate -}; - -//----------------------------------------------------------------------------- - -#endif eoLottery_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoLottery.h +// Implements the lottery procedure for selection +// (c) GeNeura Team, 1998 - Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoLottery_h +#define eoLottery_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include "selectors.h" +#include // eoPop eoSelect MINFLOAT + +//----------------------------------------------------------------------------- +/** eoLottery: a selection method. Puts into the output a group of individuals + selected using lottery; individuals with higher probability will have more + chances of being selected. + Requires EOT::Fitness to be float castable +*/ +//----------------------------------------------------------------------------- + +template class eoLottery: public eoBinPopOp +{ + public: + /// (Default) Constructor. + eoLottery(const float& _rate = 1.0): eoBinPopOp(), rate(_rate) + { + if (minimizing_fitness()) + { + eoMinimizingFitnessException up(*this); + throw up; // :-) + } + } + + /** actually selects individuals from pop and pushes them back them into breeders + * until breeders has the right size: rate*pop.size() + * BUT what happens if breeders is already too big? + * Too big for what? + */ + void operator()( eoPop& pop, eoPop& breeders) + { + int target = (int)(rate * pop.size()); + + // test of consistency + if (breeders.size() >= target) { + throw("Problem in eoLottery: already too many offspring"); + } + + double total; + + try + { + total = sum_fitness(pop); + } + catch (eoNegativeFitnessException&) + { // say where it occured... + throw eoNegativeFitnessException(*this); + } + + // selection of chromosomes + while (breeders.size() < target) + { + breeders.push_back(roulette_wheel(pop, total)); + } + } + + double Rate(void) const { return rate; } + + private: + double rate; // selection rate +}; + +//----------------------------------------------------------------------------- + +#endif eoLottery_h diff --git a/eo/src/eoMultiBinOp.h b/eo/src/eoMultiBinOp.h index ddb30c5df..231655b3b 100644 --- a/eo/src/eoMultiBinOp.h +++ b/eo/src/eoMultiBinOp.h @@ -1,99 +1,99 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMultiBinOp.h -// Class that combines several binary or unary operators -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOMULTIBINOP_h -#define _EOMULTIBINOP_h - -#include - -#include - -/** MultiMonOp combines several monary operators. By itself, it does nothing to the -EO it´s handled*/ -template -class eoMultiBinOp: public eoBinOp { -public: - /// Ctor from an already existing op - eoMultiBinOp( const eoBinOp* _op ) - : eoBinOp< EOT >( ), vOp(){ - vOp.push_back( _op ); - }; - - /// - eoMultiBinOp( ) - : eoBinOp< EOT >( ), vOp(){}; - - /// Ads a new operator - void adOp( const eoOp* _op ){ - vOp.push_back( _op ); - }; - - /// needed virtual dtor - virtual ~eoMultiBinOp() {}; - - /// - /// Applies all operators to the EO - virtual void operator()( EOT& _eo1, EOT& _eo2 ) const { - if ( vOp.begin() != vOp.end() ) { // which would mean it's empty - for ( vector< const eoOp* >::const_iterator i = vOp.begin(); - i != vOp.end(); i++ ) { - // Admits only unary or binary operator - switch ((*i)->readArity()) { - case unary: - { - const eoMonOp* monop = static_cast* >(*i); - (*monop)( _eo1 ); - (*monop)( _eo2 ); - break; - } - case binary: - { - const eoBinOp* binop = static_cast* >(*i); - (*binop)( _eo1, _eo2 ); - break; - } - } - } - } - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMultiBinOp";}; - //@} - -private: - - /// uses pointers to base class since operators can be unary or binary - vector< const eoOp* > vOp; -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMultiBinOp.h +// Class that combines several binary or unary operators +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOMULTIBINOP_h +#define _EOMULTIBINOP_h + +#include + +#include + +/** MultiMonOp combines several monary operators. By itself, it does nothing to the +EO it´s handled*/ +template +class eoMultiBinOp: public eoBinOp { +public: + /// Ctor from an already existing op + eoMultiBinOp( const eoBinOp* _op ) + : eoBinOp< EOT >( ), vOp(){ + vOp.push_back( _op ); + }; + + /// + eoMultiBinOp( ) + : eoBinOp< EOT >( ), vOp(){}; + + /// Ads a new operator + void adOp( const eoOp* _op ){ + vOp.push_back( _op ); + }; + + /// needed virtual dtor + virtual ~eoMultiBinOp() {}; + + /// + /// Applies all operators to the EO + virtual void operator()( EOT& _eo1, EOT& _eo2 ) const { + if ( vOp.begin() != vOp.end() ) { // which would mean it's empty + for ( vector< const eoOp* >::const_iterator i = vOp.begin(); + i != vOp.end(); i++ ) { + // Admits only unary or binary operator + switch ((*i)->readArity()) { + case unary: + { + const eoMonOp* monop = static_cast* >(*i); + (*monop)( _eo1 ); + (*monop)( _eo2 ); + break; + } + case binary: + { + const eoBinOp* binop = static_cast* >(*i); + (*binop)( _eo1, _eo2 ); + break; + } + } + } + } + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMultiBinOp";}; + //@} + +private: + + /// uses pointers to base class since operators can be unary or binary + vector< const eoOp* > vOp; +}; + +#endif diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index e1b2d617c..0e2e9e682 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -1,69 +1,68 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoObject.h - This is the base class for most objects in EO. It basically defines an interf - face for giving names to classes. - - (c) GeNeura Team, 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ -//----------------------------------------------------------------------------- - -#ifndef EOOBJECT_H -#define EOOBJECT_H - -//----------------------------------------------------------------------------- - -#include // For limits definition -#include // istream, ostream -#include // string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoObject -//----------------------------------------------------------------------------- -/** -This is the base class for the whole hierarchy; an eoObject defines -basically an interface for the whole hierarchy: each object should -know its name (#className#). Previously, this object defined a print and read -interface, but it´s been moved to eoPrintable and eoPersistent. - */ -class eoObject -{ - public: - - /// Default Constructor. - eoObject() {} - - /// Copy constructor. - eoObject( const eoObject& ) {} - - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoObject() {} - - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return "eoObject"; } - -}; - -#endif EOOBJECT_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoObject.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOOBJECT_H +#define EOOBJECT_H + +//----------------------------------------------------------------------------- + +#include // For limits definition +#include // istream, ostream +#include // string + +#include "compatibility.h" + +using namespace std; + +//----------------------------------------------------------------------------- +// eoObject +//----------------------------------------------------------------------------- +/** +This is the base class for the whole hierarchy; an eoObject defines +basically an interface for the whole hierarchy: each object should +know its name (#className#). Previously, this object defined a print and read +interface, but it´s been moved to eoPrintable and eoPersistent. + */ +class eoObject +{ + public: + + /// Default Constructor. + eoObject() {} + + /// Copy constructor. + eoObject( const eoObject& ) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoObject() {} + + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return "eoObject"; } + +}; + +#endif EOOBJECT_H diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 609cf8c34..178ae4e17 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,203 +1,235 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody -should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ -//@{ - -/// -enum Arity { unary = 0, binary = 1, Nary = 2}; - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - - /// Ctor - eoOp( Arity _arity = unary ) - :arity( _arity ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :arity( _eop.arity ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// Arity: number of operands - Arity readArity() const {return arity;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); - // _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - -private: - /// arity is the number of operands it takes - Arity arity; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - :eoOp( unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} - - -}; - -#include -/** eoNaryOp is the N-ary operator: genetic operator that takes - several EOs. It could be called an {\em orgy} operator. It's a general operator - that takes any number of inputs and spits out any number of outputs -*/ -template -class eoNaryOp: public eoOp { -public: - - /// Ctor - eoNaryOp( ) - :eoOp( Nary ) {}; - - /// Copy Ctor - eoNaryOp( const eoNaryOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoNaryOp() {}; - - /** applies randomly operator, to the object. - */ - virtual void operator()( const eoPop & _in, eoPop _out ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject. - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoNaryOp";}; - //@} - -}; -//@} - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) +as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, +those are the ones actually used here.\\ + +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. +@author GeNeura Team +@version 0.1 +@see eoOpFactory +*/ + + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + +//@{ + enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; +/// + + /// Ctor + eoOp(OpType _type) + :opType( _type ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :opType( _eop.opType ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// getType: number of operands it takes and individuals it produces + OpType getType() const {return opType;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className(); + // _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + +private: + /// OpType is the type of the operator: how many operands it takes and how many it produces + OpType opType; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. Modifies only the first operand. + */ + virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** Quadratic genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoQuadraticOp: public eoOp { +public: + + /// Ctor + eoQuadraticOp() + :eoOp( eoOp::quadratic ) {}; + + /// Copy Ctor + eoQuadraticOp( const eoQuadraticOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoQuadraticOp() {}; + + /** applies operator, to the object. Modifies both operands. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + : eoOp( eoOp::unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} +}; + +// some forward declarations +template +class eoIndiSelector; + +template +class eoInserter; + +/** + * eGeneralOp: General genetic operator; for objects used to transform sets + of EOs. Nary ("orgy") operators should be derived from this class +*/ +template +class eoGeneralOp: public eoOp +{ +public: + + /// Ctor that honors its superclass + eoGeneralOp(): eoOp( eoOp::general ) {}; + + /// Virtual dtor + virtual ~eoGeneralOp () {}; + + /** Method that really does the stuff. Applies the genetic operator + to a individuals dispensed by an eoIndividualSelector, + and puts the results in the eoIndividualInserter. + Any number of inputs can be requested and any number of outputs + can be produced. + */ + virtual void operator()( eoIndiSelector& _in, + eoInserter& _out) const = 0; + + virtual string className() const {return "eoGeneralOp";}; +}; + + +#endif diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h index ad82e4608..afc05d748 100644 --- a/eo/src/eoStochTournament.h +++ b/eo/src/eoStochTournament.h @@ -1,78 +1,68 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoStochTournament.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoStochTournament_h -#define eoStochTournament_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT -#include - -//----------------------------------------------------------------------------- -/** eoStochTournament: a selection method that selects ONE individual by - binary stochastic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - -template class eoStochTournament: public eoSelectOne -{ - public: - - /// - eoStochTournament(float _Trate = 1.0 ):eoSelectOne(), Trate(_Trate) { - // consistency check - if (Trate < 0.5) { - cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; - Trate = 0.55; - } - } - - /** DANGER: if you want to be able to minimize as well as maximizem - DON'T cast the fitness to a float, use the EOT comparator! */ - virtual const EOT& operator()(const eoPop& pop) { - unsigned i1 = rng.random(pop.size()), - i2 = rng.random(pop.size()); - - bool ok = ( rng.flip(Trate) ); - if (pop[i1] < pop[ i2 ] ) { - if (ok) return pop[ i2 ]; - else return pop[ i1 ]; - } - else { - if (ok) return pop[ i1 ]; - else return pop[ i2 ]; - } - } - -private: - float Trate; -}; - -//----------------------------------------------------------------------------- - -#endif eoDetTournament_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochTournament.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoStochTournament_h +#define eoStochTournament_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoStochTournament: a selection method that selects ONE individual by + binary stochastic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoStochTournament: public eoSelectOne +{ + public: + + /// + eoStochTournament(float _Trate = 1.0 ):eoSelectOne(), Trate(_Trate) { + // consistency check + if (Trate < 0.5) { + cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + Trate = 0.55; + } + } + + /** DANGER: if you want to be able to minimize as well as maximizem + DON'T cast the fitness to a float, use the EOT comparator! */ + virtual const EOT& operator()(const eoPop& pop) + { + return stochastic_tournament(pop, Trate)(); + } + +private: + float Trate; +}; + +//----------------------------------------------------------------------------- + +#endif eoDetTournament_h diff --git a/eo/src/eoUniformXOver.h b/eo/src/eoUniformXOver.h index cf4271c1f..a2dfa5e25 100644 --- a/eo/src/eoUniformXOver.h +++ b/eo/src/eoUniformXOver.h @@ -1,90 +1,90 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoUniformXOver.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOUNIFORMXOVER_h -#define _EOUNIFORMXOVER_h - - -// for swap -#if defined( __BORLANDC__ ) -#include -#else -#include -#endif - -// EO includes -#include -#include - -//----------------------------------------------------------------------------- -/** - * EOUniformCrossover: operator for binary chromosomes - * implementation of uniform crossover for EO - * swaps ranges of bits between the parents - */ -//----------------------------------------------------------------------------- - -template -class eoUniformXOver: public eoBinOp< EOT > -{ - public: - - /// - eoUniformXOver( float _rate = 0.5 ): - eoBinOp< EOT > ( ), rate( _rate ) { +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUniformXOver.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOUNIFORMXOVER_h +#define _EOUNIFORMXOVER_h + + +// for swap +#if defined( __BORLANDC__ ) +#include +#else +#include +#endif + +// EO includes +#include +#include + +//----------------------------------------------------------------------------- +/** + * EOUniformCrossover: operator for binary chromosomes + * implementation of uniform crossover for EO + * swaps ranges of bits between the parents + */ +//----------------------------------------------------------------------------- + +template +class eoUniformXOver: public eoQuadraticOp< EOT > +{ + public: + + /// + eoUniformXOver( float _rate = 0.5 ): + eoQuadraticOp< EOT > ( ), rate( _rate ) { if (rate < 0 || rate > 1) - runtime_error("UxOver --> invalid rate"); - } - - - /// - void operator() ( EOT& chrom1, EOT& chrom2 ) const { - unsigned end = min(chrom1.length(),chrom2.length()) - 1; - // select bits to change - eoUniform rnd(0, 1); - - // aply changes - for (unsigned bit = 0; bit < end; bit++) - if (rnd() < rate) - swap(chrom1[ bit], chrom2[ bit]); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoUniformXOver";}; - //@} - -private: - float rate; /// rate of uniform crossover -}; - -//----------------------------------------------------------------------------- - - -#endif + runtime_error("UxOver --> invalid rate"); + } + + + /// + void operator() ( EOT& chrom1, EOT& chrom2 ) const { + unsigned end = min(chrom1.length(),chrom2.length()) - 1; + // select bits to change + eoUniform rnd(0, 1); + + // aply changes + for (unsigned bit = 0; bit < end; bit++) + if (rnd() < rate) + swap(chrom1[ bit], chrom2[ bit]); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoUniformXOver";}; + //@} + +private: + float rate; /// rate of uniform crossover +}; + +//----------------------------------------------------------------------------- + + +#endif diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h index ca78bc209..ec67c3991 100644 --- a/eo/src/eoXOver2.h +++ b/eo/src/eoXOver2.h @@ -1,106 +1,106 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoXOver2.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOXOVER2_h -#define _EOXOVER2_h - - -// for swap -#if defined( __BORLANDC__ ) -#include -#else -#include -#endif - -// EO includes -#include -#include - -/** 2-point crossover: takes the genes in the central section of two EOs -and interchanges it -*/ -template -class eoXOver2: public eoBinOp { -public: - /// - eoXOver2() - : eoBinOp< EOT >(){}; - - /// - virtual ~eoXOver2() {}; - - /// - virtual void operator()( EOT& _eo1, - EOT& _eo2 ) const { - unsigned len1 = _eo1.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - eoUniform uniform( 0, len ); - unsigned pos1 = uniform(), pos2 = uniform() ; - - applyAt( _eo1, _eo2, pos1, pos2 ); - - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoXOver2";}; - //@} - -private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO - virtual void applyAt( EOT& _eo, EOT& _eo2, - unsigned _i, unsigned _j = 0) const { - - if ( _j < _i ) - swap( _i, _j ); - - unsigned len1 = _eo.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - - if ( (_j > len) || (_i> len ) ) - throw runtime_error( "xOver2: applying xOver past boundaries"); - - for ( unsigned i = _i; i < _j; i++ ) { - Type tmp = _eo.gene( i ); - _eo.gene( i ) = _eo2.gene( i ); - _eo2.gene( i ) = tmp ; - } - - } - -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoXOver2.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOXOVER2_h +#define _EOXOVER2_h + + +// for swap +#if defined( __BORLANDC__ ) +#include +#else +#include +#endif + +// EO includes +#include +#include + +/** 2-point crossover: takes the genes in the central section of two EOs +and interchanges it +*/ +template +class eoXOver2: public eoQuadraticOp { +public: + /// + eoXOver2() + : eoQuadraticOp< EOT >(){}; + + /// + virtual ~eoXOver2() {}; + + /// + virtual void operator()( EOT& _eo1, + EOT& _eo2 ) const { + unsigned len1 = _eo1.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + eoUniform uniform( 0, len ); + unsigned pos1 = uniform(), pos2 = uniform() ; + + applyAt( _eo1, _eo2, pos1, pos2 ); + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoXOver2";}; + //@} + +private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO + virtual void applyAt( EOT& _eo, EOT& _eo2, + unsigned _i, unsigned _j = 0) const { + + if ( _j < _i ) + swap( _i, _j ); + + unsigned len1 = _eo.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + + if ( (_j > len) || (_i> len ) ) + throw runtime_error( "xOver2: applying xOver past boundaries"); + + for ( unsigned i = _i; i < _j; i++ ) { + Type tmp = _eo.gene( i ); + _eo.gene( i ) = _eo2.gene( i ); + _eo2.gene( i ) = tmp ; + } + + } + +}; + +#endif From 4ebd212d143d4d48d92b77199bcbcff9f05c8045 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 16 Feb 2000 15:11:18 +0000 Subject: [PATCH 0097/2134] *** empty log message *** --- eo/src/eoBackInserter.h | 54 ++ eo/src/eoDetTournamentIndiSelector.h | 57 ++ eo/src/eoIndiSelector.h | 134 ++++ eo/src/eoInserter.h | 93 +++ eo/src/eoProportionalGOpSelector.h | 54 ++ eo/src/eoRNG.h | 904 +++++++++++++-------------- eo/src/eoRandomIndiSelector.h | 51 ++ eo/src/eoSequentialGOpSelector.h | 61 ++ eo/src/eoSteadyStateEA.h | 85 +++ eo/src/eoSteadyStateGeneration.h | 88 +++ eo/src/eoSteadyStateInserter.h | 51 ++ eo/src/eoStochTournamentInserter.h | 73 +++ eo/src/eoWrappedOps.h | 221 +++++++ eo/src/rnd_generators.h | 85 +++ eo/src/selectors.h | 313 ++++++++++ 15 files changed, 1872 insertions(+), 452 deletions(-) create mode 100644 eo/src/eoBackInserter.h create mode 100644 eo/src/eoDetTournamentIndiSelector.h create mode 100644 eo/src/eoIndiSelector.h create mode 100644 eo/src/eoInserter.h create mode 100644 eo/src/eoProportionalGOpSelector.h create mode 100644 eo/src/eoRandomIndiSelector.h create mode 100644 eo/src/eoSequentialGOpSelector.h create mode 100644 eo/src/eoSteadyStateEA.h create mode 100644 eo/src/eoSteadyStateGeneration.h create mode 100644 eo/src/eoSteadyStateInserter.h create mode 100644 eo/src/eoStochTournamentInserter.h create mode 100644 eo/src/eoWrappedOps.h create mode 100644 eo/src/rnd_generators.h create mode 100644 eo/src/selectors.h diff --git a/eo/src/eoBackInserter.h b/eo/src/eoBackInserter.h new file mode 100644 index 000000000..c7d1de614 --- /dev/null +++ b/eo/src/eoBackInserter.h @@ -0,0 +1,54 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoInserter.h + Abstract population insertion operator, which is used by the eoGeneralOps + to insert the results in the (intermediate) population. This file also + contains the definitions of a derived classes that implements a back inserter, + probably the only efficient inserter for populations of type vector. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoBackInserter_h +#define eoBackInserter_h + +#include "eoInserter.h" + +/** + * eoBackInserter: Interface class that enables an operator to insert + new individuals at the back of the new population. +*/ +template +class eoBackInserter : public eoPopInserter +{ + public : + + eoBackInserter(void) : eoPopInserter() {} + + void insert(const EOT& _eot) + { + pop().push_back(_eot); + } + + string className(void) const { return "eoBackInserter"; } + +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoDetTournamentIndiSelector.h b/eo/src/eoDetTournamentIndiSelector.h new file mode 100644 index 000000000..45ca21324 --- /dev/null +++ b/eo/src/eoDetTournamentIndiSelector.h @@ -0,0 +1,57 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDetTournamentIndiSelector.h + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoDetTournamentIndiSelector_h +#define eoDetTournamentIndiSelector_h + +#include "eoIndiSelector.h" +#include "selectors.h" + + +/** + * eoDetTournamentIndiSelector: selects children through a deterministic_tournament +*/ +template +class eoDetTournamentIndiSelector : public eoPopIndiSelector +{ + public : + + eoDetTournamentIndiSelector(int _tournamentSize) + : eoPopIndiSelector(), + tournamentSize(_tournamentSize) + {} + + virtual ~eoDetTournamentIndiSelector(void) {} + + const EOT& do_select(void) + { + return *deterministic_tournament(begin(), end(), tournamentSize); + } + + private : + + int tournamentSize; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h new file mode 100644 index 000000000..c534404c0 --- /dev/null +++ b/eo/src/eoIndiSelector.h @@ -0,0 +1,134 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoIndiSelector.h + Abstract selection operator, which is used by the eoGeneralOps + to obtain individuals from a source population. It also gives a + direct descended eoPopIndiSelector that can be used to + initialize objects with an eoPop. For most uses use eoPopIndividualSelector + rather than eoIndividualSelector to derive from. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoIndiSelector_h +#define eoIndiSelector_h + +/** + * eoIndividualSelector: This class defines the interface +*/ +template +class eoIndiSelector +{ +public : + + eoIndiSelector() {} + + virtual ~eoIndiSelector(void) {} + + virtual size_t size(void) const = 0; + virtual const EOT& operator[](size_t) const = 0; + + virtual const EOT& select(void) = 0; + + virtual vector select(size_t _how_many) + { // default implementation just calls select a couple of times + // this can be overridden in favour of a more efficient implementation + vector result(_how_many); + + for (int i = 0; i < _how_many; ++i) + { + result[i] = &select(); + } + + return result; + } +}; + +/** + * eoPopIndiSelector: Intermediate class for dispensing populations + various useful things can be done with this class: + you can specify how many of the population can ever be dispensed to the + operators, but you can also specify a preference to the first guy being + dispensed. This is useful if you want to perform the operator on a specific + individual. +*/ +template +class eoPopIndiSelector : public eoIndiSelector +{ + public : + eoPopIndiSelector(void) : pop(0), firstChoice(-1), last(0), eoIndiSelector() {} + + virtual ~eoPopIndiSelector(void) {} + + struct eoUnitializedException{}; + + /** Initialization function + */ + eoPopIndiSelector& operator()(const eoPop& _pop, int _end = -1, int _myGuy = -1) + { + pop = &_pop; + last = _end; + + if (last < 0 || last > pop->size()) + { + last = pop->size(); + } + + firstChoice = _myGuy; + return *this; + } + + size_t size(void) const { valid(); return last; } + const EOT& operator[](size_t _i) const { valid(); return pop->operator[](_i); } + + eoPop::const_iterator begin(void) const { valid(); return pop->begin(); } + eoPop::const_iterator end(void) const { valid(); return pop->end(); } + + + /// select does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes + const EOT& select(void) + { + valid(); + if (firstChoice < 0 || firstChoice >= size()) + { + return do_select(); // let the child figure out what to do + } + + const EOT& result = pop->operator[](firstChoice); + firstChoice = -1; + return result; + } + + virtual const EOT& do_select(void) = 0; + + private : + + void valid(void) const + { + if (pop == 0) + throw eoUnitializedException(); + } + + const eoPop* pop; // need a pointer as this the pop argument can be re-instated + int last; + int firstChoice; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h new file mode 100644 index 000000000..a799beb8b --- /dev/null +++ b/eo/src/eoInserter.h @@ -0,0 +1,93 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoInserter.h + Abstract population insertion operator, which is used by the eoGeneralOps + to insert the results in the (intermediate) population. It also contains + a direct descended eoPopInserter that defines a convenient inbetween class + for working with eoPop. The user will most likely derive from eoPopInserter + rather than eoInserter. + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoInserter_h +#define eoInserter_h + +#include "eoObject.h" + +/** + * eoInserter: Interface class that enables an operator to insert + new individuals into the (intermediate) population. +*/ +template +class eoInserter : public eoObject +{ + public : + virtual ~eoInserter() {} + + struct eoInserterException{}; + + virtual void insert(const EOT&) = 0; // can throw an eoInserterException +}; + +/** + * eoPopInserter: In-between class that defines an initialization + * of the eoIndividualInserter. +*/ +template +class eoPopInserter : public eoInserter +{ + public : + + eoPopInserter(void) : thePop(0), eoInserter() {} + + /// Binds the population to this class. This is an initialization routine used by breeders + eoInserter& operator()(eoPop& _pop) + { + thePop = &_pop; + return *this; + } + + protected : + + eoPop& pop(void) const { valid(); return *thePop; } + + private : + + void valid(void) const + { + if (thePop == 0) + throw eoInserterException(); + } + + // Need a pointer as the inserter should be able to bind to different populations. + // This is caused by the 'one template parameter only' convention in EO. + + eoPop* thePop; + + // If eoGOpBreeder could be templatized over the inserter and the selector, + // the pop could be a ref as this class could be created every time it is applied + // and subsequently would get the population through the constructor + +}; + + + +#endif diff --git a/eo/src/eoProportionalGOpSelector.h b/eo/src/eoProportionalGOpSelector.h new file mode 100644 index 000000000..6a1b2d971 --- /dev/null +++ b/eo/src/eoProportionalGOpSelector.h @@ -0,0 +1,54 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoProportionalGOpSelector.h + Proportional Generalized Operator Selector. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoProportionalGOpSelector_h +#define eoProportionalGOpSelector_h + +//----------------------------------------------------------------------------- + +#include "eoGOpSelector.h" + +/** eoProportionalGOpSel: do proportional selection, returns one of the + operators +*/ +template +class eoProportionalGOpSel : public eoGOpSelector +{ +public : + eoProportionalGOpSel() : eoGOpSelector() {} + + /** Returns the operator proportionally selected */ + virtual eoGeneralOp& selectOp() + { + unsigned what = rng.roulette_wheel(getRates()); + return *operator[](what); + } + + /// + virtual string className() const { return "eoGOpSelector"; }; +}; + +#endif + diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index 8957755ca..59417fc6f 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -1,452 +1,452 @@ -/* -* Random number generator adapted from (see comments below) -* -* The random number generator is modified into a class -* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller -* transformation to generate normal deviates. -* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ - -// This is the ``Mersenne Twister'' random number generator MT19937, which -// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) -// starting from any odd seed in 0..(2^32 - 1). This version is a recode -// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by -// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in -// July-August 1997). -// -// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha -// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to -// generate 300 million random numbers; after recoding: 24.0 sec. for the same -// (i.e., 46.5% of original time), so speed is now about 12.5 million random -// number generations per second on this machine. -// -// According to the URL -// (and paraphrasing a bit in places), the Mersenne Twister is ``designed -// with consideration of the flaws of various existing generators,'' has -// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally -// equidistributed, and ``has passed many stringent tests, including the -// die-hard test of G. Marsaglia and the load test of P. Hellekalek and -// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 -// to 5012 bytes of static data, depending on data type sizes, and the code -// is quite short as well). It generates random numbers in batches of 624 -// at a time, so the caching and pipelining of modern systems is exploited. -// It is also divide- and mod-free. -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Library General Public License as published by -// the Free Software Foundation (either version 2 of the License or, at your -// option, any later version). This library is distributed in the hope that -// it will be useful, but WITHOUT ANY WARRANTY, without even the implied -// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU Library General Public License for more details. You should have -// received a copy of the GNU Library General Public License along with this -// library; if not, write to the Free Software Foundation, Inc., 59 Temple -// Place, Suite 330, Boston, MA 02111-1307, USA. -// -// The code as Shawn received it included the following notice: -// -// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When -// you use this, send an e-mail to with -// an appropriate reference to your work. -// -// It would be nice to CC: when you write. -// - -// -// uint32 must be an unsigned integer type capable of holding at least 32 -// bits; exactly 32 should be fastest, but 64 is better on an Alpha with -// GCC at -O3 optimization so try your options and see what's best for you -// - -/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ - - -#ifndef EO_RANDOM_NUMBER_GENERATOR -#define EO_RANDOM_NUMBER_GENERATOR - -#include - -#include -#include - -// TODO: check for various compilers if this is exactly 32 bits -// Unfortunately MSVC's preprocessor does not comprehends sizeof() -// so neat preprocessing tricks will not work - -typedef unsigned long uint32; // Compiler and platform dependent! - -//----------------------------------------------------------------------------- -// eoRng -//----------------------------------------------------------------------------- -/** -eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 -for generating random numbers. The various member functions implement useful functions -for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). - -Note for people porting EO to other platforms: please make sure that the typedef -uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not -shorter. If it is longer, file compatibility between EO on different platforms -may be broken. -*/ -class eoRng : public eoObject, public eoPersistent -{ -public : - /** - ctor takes a random seed; if you want another seed, use reseed - @see reseed - */ - - eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { - state = new uint32[N+1]; - initialize(s); - } - - ~eoRng(void) - { - delete [] state; - } - - /** - Re-initializes the Random Number Generator. - */ - void reseed(uint32 s) - { - initialize(s); - } - - /** - uniform(m = 1.0) returns a random double in the range [0, m) - */ - double uniform(double m = 1.0) - { // random number between [0, m] - return m * double(rand()) / double(rand_max()); - } - - /** - random() returns a random integer in the range [0, m) - */ - uint32 random(uint32 m) - { - return uint32(uniform() * double(m)); - } - - /** - flip() tosses a biased coin such that flip(x/100.0) will - returns true x% of the time - */ - bool flip(float bias) - { - return uniform() < bias; - } - - /** - normal() zero mean gaussian deviate with standard deviation of 1 - */ - double normal(void); // gaussian mutation, stdev 1 - - /** - normal(stdev) zero mean gaussian deviate with user defined standard deviation - */ - double normal(double stdev) - { - return stdev * normal(); - } - - /** - normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation - */ - double normal(double mean, double stdev) - { - return mean + normal(stdev); - } - - /** - rand() returns a random number in the range [0, rand_max) - */ - uint32 rand(); - - /** - rand_max() the maximum returned by rand() - */ - uint32 rand_max(void) const { return (uint32) 0xffffffff; } - - /** - roulette_wheel(vec, total = 0) does a roulette wheel selection - on the input vector vec. If the total is not supplied, it is - calculated. It returns an integer denoting the selected argument. - */ - template - int roulette_wheel(const std::vector& vec, T total = 0) - { - if (total == 0) - { // count - for (unsigned i = 0; i < vec.size(); ++i) - total += vec[i]; - } - - float change = uniform() * total; - - int i = 0; - - while (change > 0) - { - change -= vec[i++]; - } - - return --i; - } - - /// - void printOn(ostream& _os) const - { - for (int i = 0; i < N; ++i) - { - _os << state[i] << ' '; - } - _os << int(next - state) << ' '; - _os << left << ' ' << cached << ' ' << cacheValue; - } - - /// - void readFrom(istream& _is) - { - for (int i = 0; i < N; ++i) - { - _is >> state[i]; - } - - int n; - _is >> n; - next = state + n; - - _is >> left; - _is >> cached; - _is >> cacheValue; - } - - -private : - uint32 restart(void); - void initialize(uint32 seed); - - uint32* state; // the array for the state - uint32* next; - int left; - - bool cached; - float cacheValue; - - const int N; - const int M; - const uint32 K; // a magic constant - - /** - Private copy ctor and assignment operator to make sure that - nobody accidentally copies the random number generator. - If you want similar RNG's, make two RNG's and initialize - them with the same seed. - */ - eoRng (const eoRng&); // no implementation - eoRng& operator=(const eoRng&); // dito -}; - -/** - The one and only global eoRng object -*/ -static eoRng rng; - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -// Implementation of some eoRng members.... Don't mind the mess, it does work. - - -#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u -#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u -#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u -#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v - -inline void eoRng::initialize(uint32 seed) - { - // - // We initialize state[0..(N-1)] via the generator - // - // x_new = (69069 * x_old) mod 2^32 - // - // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's - // _The Art of Computer Programming_, Volume 2, 3rd ed. - // - // Notes (SJC): I do not know what the initial state requirements - // of the Mersenne Twister are, but it seems this seeding generator - // could be better. It achieves the maximum period for its modulus - // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if - // x_initial can be even, you have sequences like 0, 0, 0, ...; - // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, - // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. - // - // Even if x_initial is odd, if x_initial is 1 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 0, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , - // ... - // - // and if x_initial is 3 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 1, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , - // ... - // - // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is - // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It - // also does well in the dimension 2..5 spectral tests, but it could be - // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). - // - // Note that the random number user does not see the values generated - // here directly since restart() will always munge them first, so maybe - // none of all of this matters. In fact, the seed values made here could - // even be extra-special desirable if the Mersenne Twister theory says - // so-- that's why the only change I made is to restrict to odd seeds. - // - - left = -1; - - register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; - register int j; - - for(left=0, *s++=x, j=N; --j; - *s++ = (x*=69069U) & 0xFFFFFFFFU); - } - - -inline uint32 eoRng::restart(void) -{ - register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; - register int j; - - left=N-1, next=state+1; - - for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - for(pM=state, j=M; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - s1 ^= (s1 >> 11); - s1 ^= (s1 << 7) & 0x9D2C5680U; - s1 ^= (s1 << 15) & 0xEFC60000U; - return(s1 ^ (s1 >> 18)); -} - - -inline uint32 eoRng::rand(void) - { - uint32 y; - - if(--left < 0) - return(restart()); - - y = *next++; - y ^= (y >> 11); - y ^= (y << 7) & 0x9D2C5680U; - y ^= (y << 15) & 0xEFC60000U; - return(y ^ (y >> 18)); - } - -inline double eoRng::normal(void) -{ - if (cached) - { - cached = false; - return cacheValue; - } - - float rSquare, factor, var1, var2; - - do - { - var1 = 2.0 * uniform() - 1.0; - var2 = 2.0 * uniform() - 1.0; - - rSquare = var1 * var1 + var2 * var2; - } - while (rSquare >= 1.0 || rSquare == 0.0); - - factor = sqrt(-2.0 * log(rSquare) / rSquare); - - cacheValue = var1 * factor; - cached = true; - - return (var2 * factor); -} - -#endif +/* +* Random number generator adapted from (see comments below) +* +* The random number generator is modified into a class +* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +* transformation to generate normal deviates. +* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ + +// This is the ``Mersenne Twister'' random number generator MT19937, which +// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) +// starting from any odd seed in 0..(2^32 - 1). This version is a recode +// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by +// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in +// July-August 1997). +// +// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +// generate 300 million random numbers; after recoding: 24.0 sec. for the same +// (i.e., 46.5% of original time), so speed is now about 12.5 million random +// number generations per second on this machine. +// +// According to the URL +// (and paraphrasing a bit in places), the Mersenne Twister is ``designed +// with consideration of the flaws of various existing generators,'' has +// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally +// equidistributed, and ``has passed many stringent tests, including the +// die-hard test of G. Marsaglia and the load test of P. Hellekalek and +// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 +// to 5012 bytes of static data, depending on data type sizes, and the code +// is quite short as well). It generates random numbers in batches of 624 +// at a time, so the caching and pipelining of modern systems is exploited. +// It is also divide- and mod-free. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Library General Public License as published by +// the Free Software Foundation (either version 2 of the License or, at your +// option, any later version). This library is distributed in the hope that +// it will be useful, but WITHOUT ANY WARRANTY, without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU Library General Public License for more details. You should have +// received a copy of the GNU Library General Public License along with this +// library; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307, USA. +// +// The code as Shawn received it included the following notice: +// +// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When +// you use this, send an e-mail to with +// an appropriate reference to your work. +// +// It would be nice to CC: when you write. +// + +// +// uint32 must be an unsigned integer type capable of holding at least 32 +// bits; exactly 32 should be fastest, but 64 is better on an Alpha with +// GCC at -O3 optimization so try your options and see what's best for you +// + +/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ + + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + +#include + +#include +#include + +// TODO: check for various compilers if this is exactly 32 bits +// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// so neat preprocessing tricks will not work + +typedef unsigned long uint32; // Compiler and platform dependent! + +//----------------------------------------------------------------------------- +// eoRng +//----------------------------------------------------------------------------- +/** +eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +for generating random numbers. The various member functions implement useful functions +for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). + +Note for people porting EO to other platforms: please make sure that the typedef +uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not +shorter. If it is longer, file compatibility between EO on different platforms +may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + /** + ctor takes a random seed; if you want another seed, use reseed + @see reseed + */ + + eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { + state = new uint32[N+1]; + initialize(s); + } + + ~eoRng(void) + { + delete [] state; + } + + /** + Re-initializes the Random Number Generator. + */ + void reseed(uint32 s) + { + initialize(s); + } + + /** + uniform(m = 1.0) returns a random double in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(rand_max()); + } + + /** + random() returns a random integer in the range [0, m) + */ + uint32 random(uint32 m) + { + return uint32(uniform() * double(m)); + } + + /** + flip() tosses a biased coin such that flip(x/100.0) will + returns true x% of the time + */ + bool flip(float bias) + { + return uniform() < bias; + } + + /** + normal() zero mean gaussian deviate with standard deviation of 1 + */ + double normal(void); // gaussian mutation, stdev 1 + + /** + normal(stdev) zero mean gaussian deviate with user defined standard deviation + */ + double normal(double stdev) + { + return stdev * normal(); + } + + /** + normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation + */ + double normal(double mean, double stdev) + { + return mean + normal(stdev); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32 rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32 rand_max(void) const { return (uint32) 0xffffffff; } + + /** + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, T total = 0) + { + if (total == 0) + { // count + for (int i = 0; i < vec.size(); ++i) + total += vec[i]; + } + + float change = uniform() * total; + + int i = 0; + + while (change > 0) + { + change -= vec[i++]; + } + + return --i; + } + + /// + void printOn(ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /// + void readFrom(istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + +private : + uint32 restart(void); + void initialize(uint32 seed); + + uint32* state; // the array for the state + uint32* next; + int left; + + bool cached; + float cacheValue; + + const int N; + const int M; + const uint32 K; // a magic constant + + /** + Private copy ctor and assignment operator to make sure that + nobody accidentally copies the random number generator. + If you want similar RNG's, make two RNG's and initialize + them with the same seed. + */ + eoRng (const eoRng&); // no implementation + eoRng& operator=(const eoRng&); // dito +}; + +/** + The one and only global eoRng object +*/ +static eoRng rng; + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + +inline void eoRng::initialize(uint32 seed) + { + // + // We initialize state[0..(N-1)] via the generator + // + // x_new = (69069 * x_old) mod 2^32 + // + // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's + // _The Art of Computer Programming_, Volume 2, 3rd ed. + // + // Notes (SJC): I do not know what the initial state requirements + // of the Mersenne Twister are, but it seems this seeding generator + // could be better. It achieves the maximum period for its modulus + // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if + // x_initial can be even, you have sequences like 0, 0, 0, ...; + // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, + // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. + // + // Even if x_initial is odd, if x_initial is 1 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 0, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + // ... + // + // and if x_initial is 3 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 1, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + // ... + // + // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is + // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It + // also does well in the dimension 2..5 spectral tests, but it could be + // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + // + // Note that the random number user does not see the values generated + // here directly since restart() will always munge them first, so maybe + // none of all of this matters. In fact, the seed values made here could + // even be extra-special desirable if the Mersenne Twister theory says + // so-- that's why the only change I made is to restrict to odd seeds. + // + + left = -1; + + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU); + } + + +inline uint32 eoRng::restart(void) +{ + register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + +inline uint32 eoRng::rand(void) + { + uint32 y; + + if(--left < 0) + return(restart()); + + y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); + } + +inline double eoRng::normal(void) +{ + if (cached) + { + cached = false; + return cacheValue; + } + + float rSquare, factor, var1, var2; + + do + { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + + rSquare = var1 * var1 + var2 * var2; + } + while (rSquare >= 1.0 || rSquare == 0.0); + + factor = sqrt(-2.0 * log(rSquare) / rSquare); + + cacheValue = var1 * factor; + cached = true; + + return (var2 * factor); +} + +#endif diff --git a/eo/src/eoRandomIndiSelector.h b/eo/src/eoRandomIndiSelector.h new file mode 100644 index 000000000..2be2ba4cc --- /dev/null +++ b/eo/src/eoRandomIndiSelector.h @@ -0,0 +1,51 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoRandomIndiSelector.h + Selects individuals at random. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoRandomIndiSelector_h +#define eoRandomIndiSelector_h + +#include "eoIndiSelector.h" + +/** + * eoRandomSelector: just selects a random child +*/ +template +class eoRandomIndiSelector : public eoPopIndiSelector +{ + public : + + eoRandomIndiSelector(void) : eoPopIndiSelector() {} + virtual ~eoRandomIndiSelector(void) {} + + /// very complex function that returns just an individual + const EOT& do_select(void) + { + return operator[](rng.random(size())); + } + +}; + +#endif + diff --git a/eo/src/eoSequentialGOpSelector.h b/eo/src/eoSequentialGOpSelector.h new file mode 100644 index 000000000..5d8990412 --- /dev/null +++ b/eo/src/eoSequentialGOpSelector.h @@ -0,0 +1,61 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSequentialGOpSelector.h + Sequential Generalized Operator Selector. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoSequentialGOpSelector_h +#define eoSequentialGOpSelector_h + +//----------------------------------------------------------------------------- + +#include "eoGOpSelector.h" +/** eoSequentialGOpSel: do proportional selection, but return a sequence of + operations to be applied one after the other. +*/ +template +class eoSequentialGOpSel : public eoGOpSelector +{ + public : + + virtual eoGeneralOp& selectOp() + { + combined.clear(); + + for (int i = 0; i < size(); ++i) + { + if (operator[](i) == 0) + continue; + + if (rng.flip(getRates()[i])) + combined.addOp(operator[](i)); + } + + return combined; + } + + private : + + eoCombinedOp combined; +}; + +#endif diff --git a/eo/src/eoSteadyStateEA.h b/eo/src/eoSteadyStateEA.h new file mode 100644 index 000000000..fffe659c5 --- /dev/null +++ b/eo/src/eoSteadyStateEA.h @@ -0,0 +1,85 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSteadyStateEA.h +// (c) GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSteadyStateEA_h +#define _eoSteadyStateEA_h + +//----------------------------------------------------------------------------- + +#include "eoSteadyStateGeneration.h" // eoPop +#include + +/** EOSteadyStateEA: + An easy-to-use evolutionary algorithm, just supply + a general operator selector, a selector for choosing the ones + to reproduce and an eoSteadyStateInserter that takes care of evaluating + and inserter the guy/girl in the steady state population. +*/ +template class eoSteadyStateEA: public eoAlgo +{ + public: + /// Constructor. + eoSteadyStateEA( + eoGOpSelector& _opSelector, + eoPopIndiSelector& _selector, + eoSteadyStateInserter& _inserter, + eoTerm& _terminator, + unsigned _steps = 0 ) + : step(_opSelector, _selector, _inserter), + terminator( _terminator) + {}; + + /// Constructor from an already created generation + eoSteadyStateEA(eoSteadyStateGeneration& _gen, + eoTerm& _terminator): + step(_gen), + terminator( _terminator){}; + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + do { + try + { + step(pop); + } + catch (exception& e) + { + string s = e.what(); + s.append( " in eoSteadyStateEA "); + throw runtime_error( s ); + } + } while ( terminator( pop ) ); + } + + /// Class name. + string className() const { return "eoSteadyStateEA"; } + + private: + eoSteadyStateGeneration step; + eoTerm& terminator; +}; + +//----------------------------------------------------------------------------- + +#endif eoEasyEA_h diff --git a/eo/src/eoSteadyStateGeneration.h b/eo/src/eoSteadyStateGeneration.h new file mode 100644 index 000000000..1c1aeebcc --- /dev/null +++ b/eo/src/eoSteadyStateGeneration.h @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSteadyStateGeneration.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoSteadyStateGeneration_h +#define eoSteadyStateGeneration_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include +#include // eoSelect, eoTranform, eoMerge + +#include "eoGOpSelector.h" +#include "eoIndiSelector.h" +#include "eoSteadyStateInserter.h" + +//----------------------------------------------------------------------------- + +/** eoSteadyStateGeneration + * Single step of a steady state evolutionary algorithm. + * Proceeds by updating one individual at a time, by first selecting parents, + * creating one or more children and subsequently overwrite (a) bad individual(s) +*/ +template class eoSteadyStateGeneration: public eoAlgo +{ + public: + /// Constructor. + eoSteadyStateGeneration( + eoGOpSelector& _opSelector, + eoPopIndiSelector& _selector, + eoSteadyStateInserter& _inserter, + unsigned _steps = 0) : + opSelector(_opSelector), + selector(_selector), + inserter(_inserter) , + steps(_steps) {}; + + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) + { + unsigned nSteps = steps; + if (nSteps == 0) + { + nSteps = pop.size(); // make a 'generation equivalent' + } + + for (unsigned i = 0; i < nSteps; ++i) + { + opSelector.selectOp()(selector(pop), inserter(pop)); + } + + } + + /// Class name. + string className() const { return "eoSteadyStateGeneration"; } + + private: + eoGOpSelector& opSelector; + eoPopIndiSelector& selector; + eoSteadyStateInserter& inserter; + unsigned steps; +}; + +//----------------------------------------------------------------------------- + +#endif eoGeneration_h diff --git a/eo/src/eoSteadyStateInserter.h b/eo/src/eoSteadyStateInserter.h new file mode 100644 index 000000000..26f299f70 --- /dev/null +++ b/eo/src/eoSteadyStateInserter.h @@ -0,0 +1,51 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSteadyStateInserter.h + Still abstract population insertion operator that is initialized with + and eoEvalFunc object to be able to evaluate individuals before inserting + them. + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoSteadyStateInserter_h +#define eoSteadyStateInserter_h + + +#include "eoEvalFunc.h" + +/** + * eoSteadyStateInserter: Interface class that enables an operator to update + * a population with a new individual... it contains an eoEvalFunc object to + * make sure that every individual is evaluated before it is inserted +*/ +template +class eoSteadyStateInserter : public eoPopInserter +{ + public : + eoSteadyStateInserter(eoEvalFunc& _eval) : eval(_eval) , eoPopInserter() {} + + protected : + + eoEvalFunc& eval; +}; + + +#endif \ No newline at end of file diff --git a/eo/src/eoStochTournamentInserter.h b/eo/src/eoStochTournamentInserter.h new file mode 100644 index 000000000..f91b546f7 --- /dev/null +++ b/eo/src/eoStochTournamentInserter.h @@ -0,0 +1,73 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoStochTournamentInserter.h + Concrete steady state inserter. It is initialized with a population and + inserts individuals in the population based on an inverse stochastic + tournament + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoStochTournamentInserter_h +#define eoStochTournamentInserter_h + + +#include "eoSteadyStateInserter.h" +#include "selectors.h" + +/** + * eoDetTournamentInserter: Uses an inverse stochastic tournament to figure + * out who gets overridden by the new individual. It resets the fitness of the + * individual. +*/ +template +class eoStochTournamentInserter : public eoSteadyStateInserter +{ + public : + + eoStochTournamentInserter(eoEvalFunc& _eval, double _t_rate) : t_rate(_t_rate), eoSteadyStateInserter(_eval) + { + if (t_rate < 0.5) + { // warning, error? + t_rate = 0.55; + } + + if (t_rate >= 1.0) + { + t_rate = 0.99; // 1.0 would mean deterministic tournament + } + } + + void insert(const EOT& _eot) + { + EOT& eo = inverse_stochastic_tournament(pop(), t_rate); + eo = _eot; // overwrite loser of tournament + + eo.invalidate(); + eval(eo); // Evaluate after insert + } + + string className(void) const { return "eoStochTournamentInserter"; } + + private : + double t_rate; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h new file mode 100644 index 000000000..cc332a0b2 --- /dev/null +++ b/eo/src/eoWrappedOps.h @@ -0,0 +1,221 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoWrappedOps.h + Derived from the General genetic operator, which can be used to wrap any unary or binary + operator. File also contains the eoCombinedOp, needed by the eoSequentialGOpSelector + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoWrappedOps_h +#define eoWrappedOps_h + +//----------------------------------------------------------------------------- + +#include // eoOp, eoMonOp, eoBinOp +#include "eoRNG.h" + +using namespace std; + +/// Wraps monary operators +template +class eoWrappedMonOp : public eoGeneralOp +{ +public : + /// + eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp(), op(_op) {}; + + /// + virtual ~eoWrappedMonOp() {} + + /// Instantiates the abstract method + void operator()( eoIndiSelector& _in, + eoInserter& _out) const { + EOT result = _in.select(); + op( result ); + _out.insert(result); + } + + /// + virtual string className() const {return "eoWrappedMonOp";}; + + +private : + const eoMonOp& op; +}; + + +/// Wraps binary operators +template +class eoWrappedBinOp : public eoGeneralOp +{ +public : + /// + eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(), op(_op) {} + + /// + virtual ~eoWrappedBinOp() {} + + /// Instantiates the abstract method. EOT should have copy ctor. + void operator()(eoIndiSelector& _in, + eoInserter& _out) const { + EOT out1 = _in.select(); + const EOT& out2 = _in.select(); + op(out1, out2); + _out.insert(out1); + } + + /// + virtual string className() const {return "eoWrappedBinOp";}; + +private : + const eoBinOp& op; +}; + +/// Wraps Quadratic operators +template +class eoWrappedQuadraticOp : public eoGeneralOp +{ +public : + /// + eoWrappedQuadraticOp(const eoQuadraticOp& _op) : eoGeneralOp(), op(_op) {} + + /// + virtual ~eoWrappedQuadraticOp() {} + + /// Instantiates the abstract method. EOT should have copy ctor. + void operator()(eoIndiSelector& _in, + eoInserter& _out) const { + EOT out1 = _in.select(); + EOT out2 = _in.select(); + op(out1, out2); + _out.insert(out1); + _out.insert(out2); + } + + /// + virtual string className() const {return "eoWrappedQuadraticOp";}; + +private : + const eoQuadraticOp& op; +}; + +/// Combines several ops +template +class eoCombinedOp : public eoGeneralOp +{ +public : + + /// + eoCombinedOp() : eoGeneralOp() {} + + /// + virtual ~eoCombinedOp() {} + + /// Adds a new operator to the combined Op + void addOp(eoGeneralOp* _op) + { + ops.push_back(_op); + } + + + /// Erases all operators added so far + void clear(void) { + ops.resize(0); + } + + /// Helper class to make sure that stuff that is inserted will be used again with the next operator + template + class eoIndiSelectorInserter : public eoIndiSelector, public eoInserter + { + public : + eoIndiSelectorInserter(eoIndiSelector& _in) + : eoIndiSelector(), eoInserter(), in(_in) + {} + + size_t size() const { return in.size(); } + const EOT& operator[](size_t _n) const { return in[_n]; } + + const EOT& select(void) + { + if (results.empty()) + { + return in.select(); + } + // else we use the previously inserted individual, + // an iterator to it is stored in 'results', but the memory + // is kept by 'intermediate'. + + list::iterator it = *results.begin(); + results.pop_front(); + return *it; + } + + void insert(const EOT& _eot) + { + intermediate.push_front(_eot); + results.push_front(intermediate.begin()); + } + + void fill(eoInserter& _out) + { + typedef list::iterator>::iterator Iterator; + + for (Iterator it = results.begin(); it != results.end(); ++it) + { + _out.insert(**it); + } + + results.clear(); + intermediate.clear(); // reclaim memory + } + + private : + + eoIndiSelector& in; + + // using lists as we need to push and pop a lot + // 'results' are iterators to the contents of 'intermediate' + // to prevent copying to and from intermediate... + list::iterator> results; + list intermediate; + }; + + /// Applies all ops in the combined op + void operator()( eoIndiSelector& _in, + eoInserter& _out ) const { + + eoIndiSelectorInserter in_out(_in); + + for (size_t i = 0; i < ops.size(); ++i) + { + (*ops[i])(in_out, in_out); + } + + in_out.fill(_out); + } + +private : + vector* > ops; +}; + +#endif eoGeneral_h diff --git a/eo/src/rnd_generators.h b/eo/src/rnd_generators.h new file mode 100644 index 000000000..c7beace72 --- /dev/null +++ b/eo/src/rnd_generators.h @@ -0,0 +1,85 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + rnd_generators.h + Some utility functors for generating random generators: + uniform_generator : generates uniform floats or doubles + random_generator : generates unsigneds, ints etc. + normal_generator : normally distributed floats or doubles + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoRND_GENERATORS_H +#define eoRND_GENERATORS_H + +#include "eoRNG.h" + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +#endif \ No newline at end of file diff --git a/eo/src/selectors.h b/eo/src/selectors.h new file mode 100644 index 000000000..4b0dad6d8 --- /dev/null +++ b/eo/src/selectors.h @@ -0,0 +1,313 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + selectors.h + A bunch of useful selector functions. They generally have three forms: + + template + It select(It begin, It end, params, eoRng& gen = rng); + + template + const EOT& select(const eoPop& pop, params, eoRng& gen = rng); + + template + EOT& select(eoPop& pop, params, eoRng& gen = rng); + + where select is one of: roulette_wheel, deterministic_tournament + and stochastic_tournament (at the moment). + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef SELECT__H +#define SELECT__H + +#include "eoRNG.h" +#include "eoException.h" + +template +bool minimizing_fitness() +{ + EOT eo1; // Assuming people don't do anything fancy in the default constructor! + EOT eo2; + + /* Dear user, when the two line below do not compile you are most + likely not working with scalar fitness values. In that case we're sorry + but you cannot use lottery or roulette_wheel selection... + */ + eo1.fitness(0.0); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this + eo2.fitness(1.0); + + return eo2 < eo1; // check whether we have a minimizing fitness +}; + +inline double scale_fitness(const std::pair& _minmax, double _value) +{ + if (_minmax.first == _minmax.second) + { + return 0.0; // no differences in fitness, population converged! + } + // else + + return (_value - _minmax.first) / (_minmax.second - _minmax.first); +} + +template +double sum_fitness(It begin, It end) +{ + double sum = 0.0; + + for (; begin != end; ++begin) + { + double v = static_cast(begin->fitness()); + if (v < 0.0) + throw eoNegativeFitnessException(); + sum += v; + } + + return sum; +} + +template +double sum_fitness(const eoPop& _pop) +{ + return sum_fitness(_pop.begin(), _pop.end()); +} + +template +double sum_fitness(const eoPop& _pop, std::pair& _minmax) +{ + eoPop::const_iterator it = _pop.begin(); + + _minmax.first = it->fitness(); + _minmax.second = it++->fitness(); + + for(; it != _pop.end(); ++it) + { + double v = static_cast(it->fitness()); + + _minmax.first = std::min(_minmax.first, v); + _minmax.second = std::max(_minmax.second, v); + + rawTotal += v; + } + + if (minimizing_fitness()) + { + std::swap(_minmax.first, _minmax.second); + } + + scaledTotal = 0.0; + + // unfortunately a second loop is neccessary to scale the fitness + for (it = _pop.begin(); it != _pop.end(); ++it) + { + double v = scale_fitness(static_cast(it->fitness())); + + scaledTotal += v; + } +} + +template +It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + It i = _begin; + + while (roulette > 0.0) + { + roulette -= static_cast(*(i++)); + } + + return --i; +} + +template +const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + eoPop::const_iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + eoPop::iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It best = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (*best < *competitor) + { + best = competitor; + } + } + + return best; +} + +template +const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It worst = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (competitor == worst) + { + --i; + continue; // try again + } + + if (*competitor < *worst) + { + worst = competitor; + } + } + + return worst; +} + +template +const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_better = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_better) return i2; + // else + + return i1; + } + else + { + if (return_better) return i1; + // else + } + // else + + return i2; +} + +template +const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_worse = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_worse) return i1; + // else + + return i2; + } + else + { + if (return_worse) return i2; + // else + } + // else + + return i1; +} + +template +const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + + +#endif \ No newline at end of file From 25f9229b98b82f96cb26c3e25771af16fce2f265 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 16 Feb 2000 15:17:43 +0000 Subject: [PATCH 0098/2134] *** empty log message *** --- eo/src/eoDetTournamentInserter.h | 69 ++++++++++++++++++++++++++++++++ eo/src/eoGOpBreeder.h | 58 +++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 eo/src/eoDetTournamentInserter.h create mode 100644 eo/src/eoGOpBreeder.h diff --git a/eo/src/eoDetTournamentInserter.h b/eo/src/eoDetTournamentInserter.h new file mode 100644 index 000000000..21e77ae3a --- /dev/null +++ b/eo/src/eoDetTournamentInserter.h @@ -0,0 +1,69 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDetTournamentInserter.h + Concrete steady state inserter. It is initialized with a population and + inserts individuals in the population based on an inverse deterministic + tournament + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoDetTournamentInserter_h +#define eoDetTournamentInserter_h + + +#include "eoSteadyStateInserter.h" +#include "selectors.h" + +/** + * eoDetTournamentInserter: Uses an inverse deterministic tournament to figure + * out who gets overridden by the new individual. It resets the fitness of the + * individual. +*/ +template +class eoDetTournamentInserter : public eoSteadyStateInserter +{ + public : + + eoDetTournamentInserter(eoEvalFunc& _eval, unsigned _t_size) : t_size(_t_size), eoSteadyStateInserter(_eval) + { + if (t_size < 2) + { // warning, error? + t_size = 2; + } + } + + void insert(const EOT& _eot) + { + EOT& eo = inverse_deterministic_tournament(pop(), t_size); + eo = _eot; // overwrite loser of tournament + + eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves + eval(eo); // Evaluate after insert + } + + string className(void) const { return "eoDetTournamentInserter"; } + + private : + + unsigned t_size; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h new file mode 100644 index 000000000..f690b5919 --- /dev/null +++ b/eo/src/eoGOpBreeder.h @@ -0,0 +1,58 @@ +//----------------------------------------------------------------------------- +// eoBreeder.h +//----------------------------------------------------------------------------- + +#ifndef eoGopBreeder_h +#define eoGopBreeder_h + +//----------------------------------------------------------------------------- + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +#include "eoPopOps.h" +#include "eoGOpSelector.h" +#include "eoIndiSelector.h" +#include "eoBackInserter.h" + +template +class eoGOpBreeder: public eoMonPopOp +{ + public: + /// Default constructor. + eoGOpBreeder( eoGOpSelector& _opSel, + eoPopIndiSelector& _selector) + : opSel( _opSel ), selector(_selector) + {} + + /// Destructor. + virtual ~eoGOpBreeder() {} + + /** + * Enlarges the population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + int size = _pop.size(); + + for (unsigned i = 0; i < size; i++) + { // and the one liner + opSel.selectOp()(selector(_pop,size, i), inserter(_pop)); + } + } + + /// The class name. + string classname() const { return "eoGOpBreeder"; } + + private: + eoGOpSelector& opSel; + eoPopIndiSelector& selector; + + // the inserter can be local as there's no point in changing it from the outside + eoBackInserter inserter; +}; + +#endif eoBreeder_h From 5b5b71b148632253445cba6ebd280b497204c423 Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 19 Feb 2000 12:37:28 +0000 Subject: [PATCH 0099/2134] Changing (ONCE MORE) eoEasyEA.h to allow 0 generation processes. --- eo/src/eoEasyEA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 49a905ebf..2b5fa4f42 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -57,7 +57,7 @@ template class eoEasyEA: public eoAlgo /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { - do { + while ( terminator( pop ) ) { try { step(pop); @@ -68,7 +68,7 @@ template class eoEasyEA: public eoAlgo s.append( " in eoEasyEA "); throw runtime_error( s ); } - } while ( terminator( pop ) ); + } // while } /// Class name. From 66465c5a0927ee1a14dc45a342212e1e6fb04c02 Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 19 Feb 2000 12:50:48 +0000 Subject: [PATCH 0100/2134] A: has been fixed , ONCE MORE :-( --- eo/src/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index 59417fc6f..d82fdfa10 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -197,7 +197,7 @@ public : { if (total == 0) { // count - for (int i = 0; i < vec.size(); ++i) + for (unsigned i = 0; i < vec.size(); ++i) total += vec[i]; } From 88c32ee09b56ce0dd5b75ed1520b394df0c334da Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 19 Feb 2000 13:14:36 +0000 Subject: [PATCH 0101/2134] Someone was using eoAltProportionalSelect.h only he/she knows whycd src --- eo/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 9dc0eb505..95e80d9e7 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -10,7 +10,7 @@ libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = EO.h eo eo1d.h eo1dWDistance.h eo2d.h \ eo2dVector.h eoAged.h eoAlgo.h\ - eoAltBreeder.h eoAltProportionalOpSel.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 \ From c48c1f2c1249fadb777f8043cda9ac18c84ad96c Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 16:27:38 +0000 Subject: [PATCH 0102/2134] Added gp, example file in t-eoSymreg.cpp --- eo/gp/eoParseTree.h | 238 ++++++++++++ eo/gp/node_pool.h | 228 +++++++++++ eo/gp/parse_tree.h | 915 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1381 insertions(+) create mode 100644 eo/gp/eoParseTree.h create mode 100644 eo/gp/node_pool.h create mode 100644 eo/gp/parse_tree.h diff --git a/eo/gp/eoParseTree.h b/eo/gp/eoParseTree.h new file mode 100644 index 000000000..a83b45feb --- /dev/null +++ b/eo/gp/eoParseTree.h @@ -0,0 +1,238 @@ +#ifndef EO_PARSE_TREE_H +#define EO_PARSE_TREE_H + +#include + +#include "EO.h" +#include "eoOp.h" +#include "eoInserter.h" +#include "eoIndiSelector.h" +#include "parse_tree.h" +#include "eoRnd.h" + +using namespace gp_parse_tree; +using namespace std; + +template +class eoParseTree : public EO, public parse_tree +{ +public : + + typedef typename parse_tree::subtree Type; + + eoParseTree(void) : EO(), parse_tree() {} + eoParseTree(unsigned _size, eoRnd& _rnd) + : EO(), parse_tree(_rnd()) + { + pruneTree(_size); + } + + void pruneTree(unsigned _size) + { + if (_size < 1) + return; + + if (size() > _size) + { + Type* sub = &operator[](size() - 2); // prune tree + + while (sub->size() > _size) + { + sub = &sub->operator[](0); + } + + back() = *sub; + } + } + + eoParseTree(std::istream& is) : EO(), parse_tree() + { + readFrom(is); + } + + string className(void) const { return "eoParseTree"; } + + void printOn(std::ostream& os) const + { + os << fitness() << ' '; + + std::copy(ebegin(), eend(), ostream_iterator(os)); + } + + void readFrom(std::istream& is) + { + FType fit; + + is >> fit; + + fitness(fit); + + std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); + } +}; + +template +std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) +{ + eot.printOn(os); + return os; +} + +template +std::istream& operator>>(std::istream& is, eoParseTree& eot) +{ + eot.readFrom(is); + return is; +} + + + +template +class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > +{ + public : + + typedef eoParseTree EoType; + + eoGpDepthInitializer( + unsigned _max_depth, + const vector& _initializor, + bool _grow = true) + : + eoRnd(), + max_depth(_max_depth), + initializor(_initializor), + grow(_grow) + {} + + virtual string className() const { return "eoDepthInitializer"; }; + + EoType::Type operator()(void) + { + list sequence; + + generate(sequence, max_depth); + + parse_tree tree(sequence.begin(), sequence.end()); + + return tree.root(); + } + + void generate(list& sequence, int the_max, int last_terminal = -1) + { + if (last_terminal == -1) + { // check where the last terminal in the sequence resides + vector::iterator it; + for (it = initializor.begin(); it != initializor.end(); ++it) + { + if (it->arity() > 1) + break; + } + + last_terminal = it - initializor.begin(); + } + + if (the_max == 1) + { // generate terminals only + vector::iterator it = initializor.begin() + rng.random(last_terminal); + sequence.push_front(*it); + return; + } + + vector::iterator what_it; + + if (grow) + { + what_it = initializor.begin() + rng.random(initializor.size()); + } + else // full + { + what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); + } + + sequence.push_front(*what_it); + + for (int i = 0; i < what_it->arity(); ++i) + generate(sequence, the_max - 1, last_terminal); + } + + +private : + + unsigned max_depth; + std::vector initializor; + bool grow; +}; + +template +class eoSubtreeXOver: public eoGeneralOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + + eoSubtreeXOver( unsigned _max_length) + : eoGeneralOp(), max_length(_max_length) {}; + + virtual string className() const { return "eoSubtreeXOver"; }; + + /// Dtor + virtual ~eoSubtreeXOver () {}; + + void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + { + EoType eo1 = _source.select(); + const EoType& eo2 = _source.select(); + + int i = rng.random(eo1.size()); + int j = rng.random(eo2.size()); + + eo1[i] = eo2[j]; // insert subtree + + eo1.pruneTree(max_length); + + eo1.invalidate(); + _sink.insert(eo1); + } + + unsigned max_length; +}; + +template +class eoBranchMutation: public eoGeneralOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + eoBranchMutation(eoRnd& _init, unsigned _max_length) + : eoGeneralOp(), max_length(_max_length), initializer(_init) + {}; + + virtual string className() const { return "eoBranchMutation"; }; + + /// Dtor + virtual ~eoBranchMutation() {}; + + void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + { + EoType eo1 = _source.select(); + int i = rng.random(eo1.size()); + + EoType eo2(eo1[i].size(), initializer); // create random other to cross with + + eo1[i] = eo2.back(); // insert subtree + + eo1.pruneTree(max_length); + + eo1.invalidate(); + _sink.insert(eo1); + } + +private : + + unsigned max_length; + eoRnd& initializer; +}; + + +#endif \ No newline at end of file diff --git a/eo/gp/node_pool.h b/eo/gp/node_pool.h new file mode 100644 index 000000000..d2f70fe9a --- /dev/null +++ b/eo/gp/node_pool.h @@ -0,0 +1,228 @@ + +#ifndef node_pool_h +#define node_pool_h + +class MemPool +{ +public : + + MemPool(unsigned int sz) : esize(sznext; + delete p; + } + } + + void* allocate() + { + if (head == 0) grow(); + Link* p = head; + head = p->next; + return static_cast(p); + } + + void deallocate(void* b) + { + Link* p = static_cast(b); + p->next = head; + head = p; + } + +private : + + void grow() + { + Chunk* n = new Chunk; + n->next = chunks; + chunks = n; + + const int nelem = Chunk::size/esize; + char* start = n->mem; + char* last = &start[(nelem-1)*esize]; + for (char* p = start; p < last; p += esize) + { + reinterpret_cast(p)->next = + reinterpret_cast(p + esize); + } + + reinterpret_cast(last)->next = 0; + head = reinterpret_cast(start); + } + + struct Link + { + Link* next; + }; + + struct Chunk + { + enum {size = 8 * 1024 - 16}; + Chunk* next; + char mem[size]; + }; + + Chunk* chunks; + const unsigned int esize; + Link* head; +}; + +template +class Node_alloc +{ +public : + Node_alloc() {}; + + T* allocate(void) + { + T* t = static_cast(mem.allocate()); + t = new (t) T; + //t->T(); // call constructor; + return t; + } + + void deallocate(T* t) + { + t->~T(); // call destructor + mem.deallocate(static_cast(t)); + } + +private : + static MemPool mem; +}; + +template +class Standard_alloc +{ +public : + Standard_alloc() {} + + T* allocate(size_t arity = 1) + { + if (arity == 0) + return 0; + + return new T [arity]; + } + + void deallocate(T* t, size_t arity = 1) + { + if (arity == 0) + return ; + + delete [] t; + } + +}; + +template +class Standard_Node_alloc +{ +public : + Standard_Node_alloc() {} + + T* allocate(void) + { + return new T;// [arity]; + } + + void deallocate(T* t) + { + delete t; + } + +}; + +template +class Tree_alloc +{ +public : + Tree_alloc() {} + + T* allocate(size_t arity) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T; + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T; + new (&t[1]) T; + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T; + new (&t[1]) T; + new (&t[2]) T; + break; + } + default : + { + return new T[arity]; + } + } + + return t; + } + + void deallocate(T* t, size_t arity) + { + switch(arity) + { + case 0: return; + case 3 : + { + t[2].~T(); t[1].~T(); t[0].~T(); + mem3.deallocate(static_cast(t)); + return; + } + case 2 : + { + t[1].~T(); t[0].~T(); + mem2.deallocate(static_cast(t)); + return; + } + case 1 : + { + t[0].~T(); + mem1.deallocate(static_cast(t)); + return; + } + default : + { + delete [] t; + return; + } + } + } + + +private : + static MemPool mem1; + static MemPool mem2; + static MemPool mem3; +}; + +// static (non thread_safe) memory pools +template MemPool Node_alloc::mem = sizeof(T); +template MemPool Tree_alloc::mem1 = sizeof(T); +template MemPool Tree_alloc::mem2 = sizeof(T) * 2; +template MemPool Tree_alloc::mem3 = sizeof(T) * 3; + +#endif \ No newline at end of file diff --git a/eo/gp/parse_tree.h b/eo/gp/parse_tree.h new file mode 100644 index 000000000..3d501b03b --- /dev/null +++ b/eo/gp/parse_tree.h @@ -0,0 +1,915 @@ +#ifndef PARSE_TREE_HH +#define PARSE_TREE_HH + +/** + + * Parse_tree and subtree classes + * (c) Maarten Keijzer 1999 + + * These classes may be used for educational and + * other non-commercial purposes only. Even if I + * wanted to, I am not at liberty to place this file + * under the GNU Lesser Public Library License, as this + * would limit my and my institution's freedom to use + * this file in closed-source software. + + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for non-commercial purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + + + Usage information. + + class Node (your node in the tree) must have the following implemented: + + ****** Arity ****** + + int arity(void) const + + Note: the default constructor of a Node should provide a + Node with arity 0! + + ****** Evaluation ****** + + A parse_tree is evaluated through one of it's apply() members: + + 1) parse_tree::apply(void) + + is the simplest evaluation, it will call + + RetVal Node::operator()(subtree::const_iterator) + + 2) parse_tree::apply(It values) + + will call: + + RetVal Node::operator()(subtree<... , It values) + + where It is whatever type you desire (most of the time + this will be a vector containing the values of your + variables); + + 3) parse_tree::apply(It values, It2 moreValues) + + will call: + + RetVal Node::operator()(subtree<... , It values, It2 moreValues) + + although I do not see the immediate use of this, however... + + 4) parse_tree::apply(It values, It2 args, It3 adfs) + + that calls: + + RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) + + can be useful for implementing adfs. + + + In general it is a good idea to leave the specifics of the + arguments open so that different ways of evaluation remain + possible. Implement the simplest eval as: + + template + RetVal operator()(It begin) const + + ****** Internal Structure ****** + + A parse_tree has two template arguments: the Node and the ReturnValue + produced by evaluating the node. The structure of the tree is defined + through a subtree class that has the same two template arguments. + + The nodes are stored in a tree like : + + node4 + / \ + node3 node2 + / \ + node1 node0 + + where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) + + The nodes are subtrees, containing the structure of the tree, together + with its size and depth. They contain a Node, the user defined template + argument. To access these nodes from a subtree, use operator-> or operator*. + + The numbers behind the nodes define a reverse-polish or postfix + traversel through the tree. The parse_tree defines iterators + on the tree such that + + tree.begin() points at the subtree at node0 and + tree.back() returns the subtree at node4, the complete tree + + Likewise operator[] is defined on the tree, such that: + + tree[0] will return the subtree at node0, while + tree[2] will return the subtree at node2 + + Assigments of subtrees is protected so that the code: + + tree[2] = tree[0]; + + will not crash and result in a tree structured as: + + node4 + / \ + node3 node0 + + Note that the rank numbers no longer specify their place in the tree: + + tree[0] still points at node0, but + tree[1] now points to node3 and + tree[2] points at the root node4 + + Embedded iterators are implemented to iterate over nodes rather + than subtrees. So an easy way to copy your tree to a vector is: + + vector vec(tree.size()); + copy(tree.ebegin(), tree.eend(), vec.begin()); + + You can also copy it to an ostream_iterator with this + technique, given that your Node implements an appropriate + operator<<. Reinitializing a tree with the vector is also + simple: + + tree.clear(); + copy(vec.begin(), vec.end(), back_inserter(tree)); + + Note that the back_inserter must be used as there is no + resize member in the parse_tree. back_inserter will use + the push_back member from the parse_tree + +*/ + +#include +#include // for swap + +#ifdef _MSC_VER +#pragma warning(disable : 4786) // disable this nagging warning about the limitations of the mirkosoft debugger +#endif + +namespace gp_parse_tree +{ + +#include "node_pool.h" + + +template +inline void do_the_swap(T& a, T& b) +{ + T tmp = a; + a = b; + b = tmp; +} + +template class parse_tree +{ + public : + +class subtree +{ + +// a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) +#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) + Node_alloc node_allocator; + Tree_alloc tree_allocator; +#else + Standard_Node_alloc node_allocator; + Standard_alloc tree_allocator; +#endif + +public : + + typedef subtree* iterator; + typedef const subtree* const_iterator; + //typedef std::vector::const_reverse_iterator const_reverse_iterator; + + /* Constructors, assignments */ + + subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + {} + subtree(const subtree& s) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { copy(s); } + subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { copy(t); } + + template + subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { // initialize in prefix way for efficiency reasons + init(b, --e); + } + + virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } + + subtree& operator=(const subtree& s) + { + if (s.get_root() == get_root()) + { // from the same tree, maybe a child. Don't take any chances + subtree anotherS = s; + return copy(anotherS); + } + + return copy(s); + } + + subtree& operator=(const T& t) { return copy(t); } + + /* Access to the nodes */ + + T& operator*(void) { return *content; } + const T& operator*(void) const { return *content; } + T* operator->(void) { return content; } + const T* operator->(void) const { return content; } + + /* Equality, inequality check, Node needs to implement operator== */ + + bool operator==(const subtree& other) const + { + if (! (*content == *other.content)) + return false; + + for (int i = 0; i < arity(); i++) + { + if (!(args[i] == other.args[i])) + return false; + } + + return true; + } + + bool operator !=(const subtree& other) const + { + return !operator==(other); + } + + /* Arity */ + int arity(void) const { return content->arity(); } + + /* Evaluation with an increasing amount of user defined arguments */ + template + RetVal apply(RetVal v) const { return (*content)(v, begin()); } + + template + RetVal apply(RetVal v, It values) const { return (*content)(v, begin(), values); } + + template + RetVal apply(RetVal v, It values, It2 moreValues) const + { return (*content)(v, begin(), values, moreValues); } + + template + RetVal apply(RetVal v, It values, It2 moreValues, It3 evenMoreValues) const + { return (*content)(v, begin(), values, moreValues, evenMoreValues); } + + + /* Iterators */ + + iterator begin(void) { return args; } + const_iterator begin(void) const { return args; } + + iterator end(void) { return args + arity(); } + const_iterator end(void) const { return args + arity(); } + + subtree& operator[](int i) { return *(begin() + i); } + const subtree& operator[](int i) const { return *(begin() + i); } + + /* Some statistics */ + + size_t size(void) const { return _size; } + + size_t cumulative_size(void) const { return _cumulative_size; } + size_t depth(void) const { return _depth; } + + const subtree& select_cumulative(size_t which) const + { return imp_select_cumulative(which); } + + subtree& select_cumulative(size_t which) + { return const_cast(imp_select_cumulative(which)); } + + subtree& get_node(size_t which) + { return const_cast(imp_get_node(which));} + const subtree& get_node(size_t which) const + { return imp_get_node(which); } + + subtree* get_parent(void) { return parent; } + const subtree* get_parent(void) const { return parent; } + + void clear(void) + { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } + + void swap(subtree& y) + { + do_the_swap(content, y.content); + do_the_swap(args, y.args); + do_the_swap(parent, y.parent); + + do_the_swap(_cumulative_size, y._cumulative_size); + do_the_swap(_depth, y._depth); + do_the_swap(_size, y._size); + updateAfterInsert(); + } + + friend void swap(subtree& x, subtree& y) + { + x.swap(y); + } + +protected : + + virtual void updateAfterInsert(void) + { + _depth = 0; + _size = 1; + _cumulative_size = 0; + + for (iterator it = begin(); it != end(); ++it) + { + _size += it->size(); + _cumulative_size += it->_cumulative_size; + _depth = it->_depth > _depth? it->_depth: _depth; + } + _cumulative_size += _size; + _depth++; + + if (parent) + parent->updateAfterInsert(); + } + +private : + + const subtree& imp_select_cumulative(size_t which) const + { + if (which >= (_cumulative_size - size())) + return *this; + // else + + for (int i = arity() - 1; i >= 0; --i) + { + if (which < args[i]._cumulative_size) + return args[i].imp_select_cumulative(which); + which -= args[i]._cumulative_size; + } + + return *this; // error! + } + + const subtree& imp_get_node(size_t which) const + { + if (which == size() - 1) + return *this; + + for (int i = arity() - 1; i >= 0; --i) + { + unsigned c_size = args[i].size(); + if (which < c_size) + return args[i].imp_get_node(which); + which -= c_size; + } + + return *this; // error! + } + + const subtree* get_root(void) const + { + if (parent == 0) + return this; + // else + + return parent->get_root(); + } + + subtree& copy(const subtree& s) + { + int oldArity = arity(); + + disown(); + + int ar = s.arity(); + + if (ar != oldArity) + { + tree_allocator.deallocate(args, oldArity); + + args = tree_allocator.allocate(ar); + + //if (ar > 0) + // args = new subtree [ar]; + //else + // args = 0; + } + + switch(ar) + { + case 3 : args[2].copy(s.args[2]); // no break! + case 2 : args[1].copy(s.args[1]); + case 1 : args[0].copy(s.args[0]); break; + case 0 : break; + default : + { + for (int i = 0; i < ar; ++i) + { + args[i].copy(s.args[i]); + } + } + } + + *content = *s.content; + + adopt(); + updateAfterInsert(); + return *this; + } + + subtree& copy(const T& t) + { + int oldArity = arity(); + + if (content != &t) + *content = t; + else + oldArity = -1; + + int ar = arity(); + + if (ar != oldArity) + { + if (oldArity != -1) + tree_allocator.deallocate(args, oldArity); + + args = tree_allocator.allocate(ar); + + //if (ar > 0) + // args = new subtree [ar]; + //else + // args = 0; + } + + adopt(); + updateAfterInsert(); + return *this; + } + + void disown(void) + { + switch(arity()) + { + case 3 : args[2].parent = 0; // no break! + case 2 : args[1].parent = 0; + case 1 : args[0].parent = 0; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = 0; + } + } + } + + } + + void adopt(void) + { + switch(arity()) + { + case 3 : args[2].parent = this; // no break! + case 2 : args[1].parent = this; + case 1 : args[0].parent = this; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = this; + } + } + } + } + + template + void init(It b, It& last) + { + *this = *last; + +#ifndef NDEBUG + if (last == b && arity() > 0) + { + throw "subtree::init()"; + } +#endif + + for (int i = 0; i < arity(); ++i) + { + args[i].parent = 0; + args[i].init(b, --last); + args[i].parent = this; + } + + updateAfterInsert(); + } + + T* content; + subtree* args; + subtree* parent; + + size_t _cumulative_size; + size_t _depth; + size_t _size; +}; + +// Continuing with parse_tree + + typedef T value_type; + + /* Constructors and Assignments */ + + parse_tree(void) : _root(), pushed() {} + parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } + parse_tree(const subtree& sub) : _root(sub), pushed() { } + + template + parse_tree(It b, It e) : _root(b, e), pushed() {} + + virtual ~parse_tree(void) {} + + parse_tree& operator=(const parse_tree& org) { return copy(org); } + parse_tree& operator=(const subtree& sub) + { return copy(sub); } + + + /* Equality and inequality */ + + bool operator==(const parse_tree& other) const + { return _root == other._root; } + + bool operator !=(const parse_tree& other) const + { return !operator==(other); } + + /* Simple tree statistics */ + + size_t size(void) const { return _root.size(); } + size_t depth(void) const { return _root.depth(); } + void clear(void) { _root.clear(); pushed.resize(0); } + + /* Evaluation (application), with an increasing number of user defined arguments */ + + template + RetVal apply(RetVal v) const + { return _root.apply(v); } + + template + RetVal apply(RetVal v, It varValues) const + { return _root.apply(v, varValues); } + + template + RetVal apply(RetVal v, It varValues, It2 moreValues) const + { return _root.apply(v, varValues, moreValues); } + + template + RetVal apply(RetVal v, It varValues, It2 moreValues, It3 evenMoreValues) const + { return _root.apply(v, varValues, moreValues, evenMoreValues); } + + /* Customized Swap */ + void swap(parse_tree& other) + { + do_the_swap(pushed, other.pushed); + _root.swap(other._root); + } + + /* Definitions of the iterators */ + + class base_iterator + { + public : + + base_iterator() {} + base_iterator(subtree* n) { node = n; } + + base_iterator& operator=(const base_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_iterator& org) const + { return node == org.node; } + bool operator!=(const base_iterator& org) const + { return !operator==(org); } + + base_iterator operator+(size_t n) const + { + base_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + base_iterator& operator++(void) + { + subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + subtree::iterator it; + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + { + node = &(--it)->get_node(0); + } + + return *this; + } + + base_iterator operator++(int) + { + base_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + subtree* node; + }; + + class iterator : public base_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef subtree* pointer; + typedef subtree& reference; + + iterator() : base_iterator() {} + iterator(subtree* n): base_iterator(n) {} + iterator& operator=(const iterator& org) + { base_iterator::operator=(org); return *this; } + + subtree& operator*(void) { return *node; } + subtree* operator->(void) { return node; } + }; + + class embedded_iterator : public base_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef T* pointer; + typedef T& reference; + + embedded_iterator() : base_iterator() {} + embedded_iterator(subtree* n): base_iterator(n) {} + embedded_iterator& operator=(const embedded_iterator& org) + { base_iterator::operator=(org); return *this; } + + T& operator*(void) { return **node; } + T* operator->(void) { return &**node; } + }; + + class base_const_iterator + { + public : + base_const_iterator() {} + base_const_iterator(const subtree* n) { node = n; } + + base_const_iterator& operator=(const base_const_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_const_iterator& org) const + { return node == org.node; } + bool operator!=(const base_const_iterator& org) const + { return !operator==(org); } + + base_const_iterator& operator++(void) + { + const subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + subtree::const_iterator it; + + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + node = &(--it)->get_node(0); + return *this; + } + + base_const_iterator operator++(int) + { + base_const_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + + const subtree* node; + }; + + class const_iterator : public base_const_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef const subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const subtree* pointer; + typedef const subtree& reference; + + const_iterator() : base_const_iterator() {} + const_iterator(const subtree* n): base_const_iterator(n) {} + const_iterator& operator=(const const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + const subtree& operator*(void) { return *node; } + const subtree* operator->(void) { return node; } + }; + + class embedded_const_iterator : public base_const_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef const T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const T* pointer; + typedef const T& reference; + + embedded_const_iterator() : base_const_iterator() {} + embedded_const_iterator(const subtree* n): base_const_iterator(n) {} + embedded_const_iterator& operator=(const embedded_const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + embedded_const_iterator operator+(size_t n) const + { + embedded_const_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + const T& operator*(void) const { return **node; } + const T* operator->(void) const { return node->operator->(); } + }; + + /* Iterator access */ + + iterator begin(void) { return iterator(&operator[](0)); } + const_iterator begin(void) const { return const_iterator(&operator[](0)); } + iterator end(void) { return iterator(0); } + const_iterator end(void) const { return const_iterator(0);} + + embedded_iterator ebegin(void) { return embedded_iterator(&operator[](0)); } + embedded_const_iterator ebegin(void) const { return embedded_const_iterator(&operator[](0)); } + embedded_iterator eend(void) { return embedded_iterator(0); } + embedded_const_iterator eend(void) const { return embedded_const_iterator(0);} + + bool empty(void) const { return size() == 0; } + bool valid(void) const { return pushed.empty(); } + + /* push_back */ + + void push_back(const parse_tree& tree) + { + if (!empty()) + pushed.push_back(_root); + + _root = tree.back(); + } + + void push_back(const T& t) + { + if (!empty()) + pushed.push_back(_root); + + _root = t; + + for (subtree::iterator it = _root.begin(); it != _root.end(); it++) + { + *it = pushed.back(); + pushed.pop_back(); + } + + } + + /* Access to subtrees */ + + subtree& back(void) { return _root; } + const subtree& back(void) const { return _root; } + subtree& root(void) { return _root; } + const subtree& root(void) const { return _root; } + + subtree& front(void) { return _root[0]; } + const subtree& front(void) const { return _root[0]; } + + subtree& operator[](size_t i) + { return const_cast(_root.get_node(i)); } + const subtree& operator[](size_t i) const + { return _root.get_node(i); } + + subtree& get_cumulative(size_t i) + { return const_cast(_root.get_cumulative(i)); } + const subtree& get_cumulative(size_t i) const + { return get_cumulative(i); } + + private : + + parse_tree& copy(const parse_tree& org) + { + _root = org._root; + pushed = org.pushed; + + return *this; + } + + parse_tree& copy(const subtree& sub) + { _root = sub; pushed.resize(0); return *this; } + + subtree _root; + std::vector pushed; +}; // end class parse_tree + + +} // end namespace gp_parse_tree + +namespace std +{ // for use with stlport on MSVC + +template inline +std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) +{ + return 0; +} + +template inline +std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) +{ + return 0; +} + +// Put customized swaps also in std... + +template inline +void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) +{ + a.swap(b); +} + +template inline +void iter_swap(vector >::iterator a, vector > b) +{ + a->swap(*b); +} + + +} // namespace std + + +#endif \ No newline at end of file From 2443677f13edf1c59f5bafc82ded943a2dd0353e Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 16:30:42 +0000 Subject: [PATCH 0103/2134] Moved the static eoRNG rng to an extern eoRNG This external object is now defined in eoPersistent.cpp This should change... --- eo/src/compatibility.h | 8 + eo/src/eoDetTournament.h | 2 +- eo/src/eoGOpSelector.h | 14 +- eo/src/eoInserter.h | 3 +- eo/src/eoOp.h | 2 +- eo/src/eoPersistent.cpp | 4 + eo/src/eoPop.h | 304 ++++++++++++++++++----------------- eo/src/eoProportionalOpSel.h | 5 +- eo/src/eoRNG.h | 4 +- eo/src/eoSteadyStateEA.h | 7 +- eo/src/eoUniformSelect.h | 128 +++++++-------- eo/src/eoWrappedOps.h | 3 +- 12 files changed, 257 insertions(+), 227 deletions(-) diff --git a/eo/src/compatibility.h b/eo/src/compatibility.h index a93aa2e50..7a4f53640 100644 --- a/eo/src/compatibility.h +++ b/eo/src/compatibility.h @@ -28,6 +28,14 @@ #ifndef COMPAT_H #define COMPAT_H +#include +#include + +#ifdef _1__GNUC__ +// Specifics for GNUC +#define NO_GOOD_ISTREAM_ITERATORS +#endif + #ifdef _MSC_VER /* Maarten: added this code here because Mirkosoft has the diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h index e5b1fce12..b4a5bec98 100644 --- a/eo/src/eoDetTournament.h +++ b/eo/src/eoDetTournament.h @@ -43,7 +43,7 @@ template class eoDetTournament: public eoSelectOne { public: /// (Default) Constructor. - eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { + eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { // consistency check if (Tsize < 2) { cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 75e5e0cab..2370d72fd 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -45,6 +45,8 @@ class eoGOpSelector: public eoOpSelector, public vector*> { public: + typedef eoOpSelector::ID ID; + /// Dtor virtual ~eoGOpSelector() { for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); @@ -84,12 +86,12 @@ public: virtual string className() const { return "eoGOpSelector"; }; /// - void printOn(ostream& _os) const { - _os << className() << endl; - for ( unsigned i=0; i!= rates.size(); i++ ) { - _os << *(operator[](i)) << "\t" << rates[i] << endl; - } - } + void printOn(ostream& _os) const {} + // _os << className().c_str() << endl; + // for ( unsigned i=0; i!= rates.size(); i++ ) { + // _os << *(operator[](i)) << "\t" << rates[i] << endl; + // } + //} const vector& getRates(void) const { return rates; } diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h index a799beb8b..eb9eb3c64 100644 --- a/eo/src/eoInserter.h +++ b/eo/src/eoInserter.h @@ -30,8 +30,7 @@ #ifndef eoInserter_h #define eoInserter_h -#include "eoObject.h" - +#include "eoPop.h" /** * eoInserter: Interface class that enables an operator to insert new individuals into the (intermediate) population. diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 178ae4e17..dc81878c2 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -79,7 +79,7 @@ public: * @param _os A ostream. */ virtual void printOn(ostream& _os) const { - _os << className(); + _os << className().c_str(); // _os << arity; }; diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 756353f5f..2790534ea 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -8,3 +8,7 @@ istream & operator >> ( istream& _is, eoPersistent& _o ) { _o.readFrom(_is); return _is; }; + +#include "eoRNG.h" + +eoRng rng; diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index e6cf0aef9..ebd864909 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -1,144 +1,160 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoPop.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOPOP_H -#define _EOPOP_H - -#include -#include - -// EO includes -#include -#include - -/** Subpopulation: it is used to move parts of population - from one algorithm to another and one population to another. It is safer -to declare it as a separate object. I have no idea if a population can be -some other thing that a vector, but if somebody thinks of it, this concrete -implementation will be moved to "generic" and an abstract Population -interface will be provided. -It can be instantiated with anything, provided that it accepts a "size" and a -random generator in the ctor. This happens to all the eo1d chromosomes declared -so far. EOT must also have a copy ctor, since temporaries are created and copied -to the population. -@author Geneura Team -@version 0.0 -*/ - -template -class eoPop: public vector, public eoObject, public eoPersistent { - -/// Type is the type of each gene in the chromosome -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes - */ - eoPop() :vector() {}; - - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; - - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ - virtual void readFrom(istream& _is) { - while( _is ) { // reads line by line, and creates an object per - // line - char line[MAXLINELENGTH]; - _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT( s ); - push_back( thisEOT ); - } - } - } - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. In this case, prints the population to - standard output. The EOT class must hav standard output with cout, - but since it should be an eoObject anyways, it's no big deal. - */ - virtual void printOn(ostream& _os) const { - copy( begin(), end(), ostream_iterator( _os, "\n") ); - }; - - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoPop";}; - //@} - - protected: - -}; -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPop.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPOP_H +#define _EOPOP_H + +#include +#include + +// EO includes +#include +#include +#include + +/** Subpopulation: it is used to move parts of population + from one algorithm to another and one population to another. It is safer +to declare it as a separate object. I have no idea if a population can be +some other thing that a vector, but if somebody thinks of it, this concrete +implementation will be moved to "generic" and an abstract Population +interface will be provided. +It can be instantiated with anything, provided that it accepts a "size" and a +random generator in the ctor. This happens to all the eo1d chromosomes declared +so far. EOT must also have a copy ctor, since temporaries are created and copied +to the population. +@author Geneura Team +@version 0.0 +*/ + +template +class eoPop: public vector, public eoObject, public eoPersistent { + +/// Type is the type of each gene in the chromosome +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop() :vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd, eoEvalFunc& _eval) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + _eval(back()); + } + }; + + + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ + virtual void readFrom(istream& _is) { + while( _is ) { // reads line by line, and creates an object per + // line + char line[MAXLINELENGTH]; + _is.getline( line, MAXLINELENGTH-1 ); + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); + push_back( thisEOT ); + } + } + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. In this case, prints the population to + standard output. The EOT class must hav standard output with cout, + but since it should be an eoObject anyways, it's no big deal. + */ + virtual void printOn(ostream& _os) const { + copy( begin(), end(), ostream_iterator( _os, "\n") ); + }; + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoPop";}; + //@} + + protected: + +}; +#endif diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index 3f8cbc997..1ea9fbc68 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -59,7 +59,8 @@ public: /** Gets a non-const reference to an operator, so that it can be changed, modified or whatever @param _id a previously assigned ID - @throw runtime_error if the ID does not exist*/ + @throw runtime_error if the ID does not exist*/ + virtual eoOp& getOp( ID _id ) { MMF::iterator i=begin(); ID j = 1; @@ -135,7 +136,7 @@ public: base classes, so you don´t have to worry about, for instance, fitness. @param _s the ostream in which things are written*/ virtual void printOn( ostream& _s ) const{ - _s << className() << endl; + _s << className().c_str() << endl; for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { _s << i->first << "\t" << *(i->second )<< endl; } diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index d82fdfa10..b560e7c1b 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -197,7 +197,7 @@ public : { if (total == 0) { // count - for (unsigned i = 0; i < vec.size(); ++i) + for (int i = 0; i < vec.size(); ++i) total += vec[i]; } @@ -270,7 +270,7 @@ private : /** The one and only global eoRng object */ -static eoRng rng; +extern eoRng rng; /** The class uniform_generator can be used in the STL generate function diff --git a/eo/src/eoSteadyStateEA.h b/eo/src/eoSteadyStateEA.h index fffe659c5..6a0b5abfa 100644 --- a/eo/src/eoSteadyStateEA.h +++ b/eo/src/eoSteadyStateEA.h @@ -44,7 +44,7 @@ template class eoSteadyStateEA: public eoAlgo eoGOpSelector& _opSelector, eoPopIndiSelector& _selector, eoSteadyStateInserter& _inserter, - eoTerm& _terminator, + eoTerm& _terminator, unsigned _steps = 0 ) : step(_opSelector, _selector, _inserter), terminator( _terminator) @@ -57,19 +57,20 @@ template class eoSteadyStateEA: public eoAlgo terminator( _terminator){}; /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { + virtual void operator()(eoPop& pop) { do { try { step(pop); } - catch (exception& e) + catch (exception& e) { string s = e.what(); s.append( " in eoSteadyStateEA "); throw runtime_error( s ); } } while ( terminator( pop ) ); + } /// Class name. diff --git a/eo/src/eoUniformSelect.h b/eo/src/eoUniformSelect.h index 8e71e0da0..74775aab1 100644 --- a/eo/src/eoUniformSelect.h +++ b/eo/src/eoUniformSelect.h @@ -1,64 +1,64 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoUniformSelect.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoUniformSelect_h -#define eoUniformSelect_h -// WARNING: 2 classes in this one - eoUniformSelect and eoCopySelect - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT -#include - -//----------------------------------------------------------------------------- -/** eoUniformSelect: a selection method that selects ONE individual randomly - -MS- 22/10/99 */ -//----------------------------------------------------------------------------- - -template class eoUniformSelect: public eoSelectOne -{ - public: - /// (Default) Constructor. - eoUniformSelect():eoSelectOne() {} - - /// not a big deal!!! - virtual const EOT& operator()(const eoPop& pop) { - return pop[rng.random(pop.size())] ; - } - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - * @return the class name as a string - */ - virtual string className() const { return "eoUniformSelect"; }; - - private: -}; - -#endif eoUniformSelect_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUniformSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoUniformSelect_h +#define eoUniformSelect_h +// WARNING: 2 classes in this one - eoUniformSelect and eoCopySelect + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoUniformSelect: a selection method that selects ONE individual randomly + -MS- 22/10/99 */ +//----------------------------------------------------------------------------- + +template class eoUniformSelect: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoUniformSelect():eoSelectOne() {} + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& pop) { + return pop[rng.random(pop.size())] ; + } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "eoUniformSelect"; }; + + private: +}; + +#endif eoUniformSelect_h diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h index cc332a0b2..2e226182f 100644 --- a/eo/src/eoWrappedOps.h +++ b/eo/src/eoWrappedOps.h @@ -144,7 +144,6 @@ public : } /// Helper class to make sure that stuff that is inserted will be used again with the next operator - template class eoIndiSelectorInserter : public eoIndiSelector, public eoInserter { public : @@ -204,7 +203,7 @@ public : void operator()( eoIndiSelector& _in, eoInserter& _out ) const { - eoIndiSelectorInserter in_out(_in); + eoIndiSelectorInserter in_out(_in); for (size_t i = 0; i < ops.size(); ++i) { From 589df91b4e182f15caa24214ab6fef6ae3a7e4c8 Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 16:31:01 +0000 Subject: [PATCH 0104/2134] Example file --- eo/test/t-eoSymreg.cpp | 276 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 eo/test/t-eoSymreg.cpp diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp new file mode 100644 index 000000000..2dbe570e0 --- /dev/null +++ b/eo/test/t-eoSymreg.cpp @@ -0,0 +1,276 @@ +#pragma warning(disable:4786) + +#include "eoParseTree.h" +#include "eoEvalFunc.h" + +using namespace gp_parse_tree; +using namespace std; + +//----------------------------------------------------------------------------- + +class SymregNode +{ +public : + + enum Operator {X = 'x', Plus = '+', Min = '-', Mult = '*', PDiv = '/'}; + + SymregNode(void) { init(); } + SymregNode(Operator _op) { op = _op; } + virtual ~SymregNode(void) {} + + // arity function + int arity(void) const { return op == X? 0 : 2; } + + // evaluation function, single case, using first argument to give value of variable + template + double operator()(double var, Children args) const + { + switch (op) + { + case Plus : return args[0].apply(var) + args[1].apply(var); + case Min : return args[0].apply(var) - args[1].apply(var); + case Mult : return args[0].apply(var) * args[1].apply(var); + case PDiv : + { + double arg1 = args[1].apply(var); + if (arg1 == 0.0) + return 1.0; // protection a la Koza, realistic implementations should maybe throw an exception + + return args[0].apply(var) / arg1; + } + + case X : return var; + } + + return var; // to avoid compiler error + } + + /// 'Pretty' print to ostream function + template + string operator()(string dummy, Children args) + { + static const string lb = "("; + static const string rb = ")"; + char opStr[4] = " "; + opStr[1] = op; + + if (arity() == 0) + { + return string("x"); + } + // else + string result = lb + args[0].apply(dummy); + result += opStr; + result += args[1].apply(dummy) + rb; + return result; + } + + Operator getOp(void) const { return op; } + +protected : + + void init(void) { op = X; } + +private : + + Operator op; // the type of node +}; + +/// initializor +static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNode::Min, SymregNode::Mult, SymregNode::PDiv}; // needed for intialization + +//----------------------------------------------------------- +// saving, loading + +std::ostream& operator<<(std::ostream& os, const SymregNode& eot) +{ + os << static_cast(eot.getOp()); + return os; +} + +std::istream& operator>>(std::istream& is, SymregNode& eot) +{ + char type; + type = (char) is.get(); + eot = SymregNode(static_cast(type)); + return is; +} + + +//----------------------------------------------------------------------------- +/** Implementation of a function evaluation object. */ + +float targetFunction(float x) +{ + return x * x * x * x - x * x * x + x * x * x - x * x + x - 1; +} + +// parameters controlling the sampling of points +const float xbegin = -10.0f; +const float xend = 10.0f; +const float xstep = 1.3f; + +template struct RMS: public eoEvalFunc< eoParseTree > +{ +public : + + typedef eoParseTree EoType; + + typedef eoParseTree argument_type; + typedef double fitness_type; + + RMS(void) : eoEvalFunc() + { + int n = int( (xend - xbegin) / xstep); + + inputs.resize(n); + target.resize(n); + + int i = 0; + + for (double x = xbegin; x < xend && i < n; ++i) + { + target[i] = targetFunction(x); + inputs[i] = x; + } + } + + ~RMS() {} + + void operator()( EoType & _eo ) const + { + vector outputs; + outputs.resize(inputs.size()); + + double fitness = 0.0; + + for (int i = 0; i < inputs.size(); ++i) + { + outputs[i] = _eo.apply(inputs[i]); + fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); + } + + fitness /= (double) target.size(); + fitness = sqrt(fitness); + + if (fitness > 1e+20) + fitness = 1e+20; + + _eo.fitness(fitness); + } + +private : + vector inputs; + vector target; +}; + +#include "eoTerm.h" + +template +class eoGenerationTerm : public eoTerm +{ + public : + eoGenerationTerm(size_t _ngen) : eoTerm(), ngen(_ngen) {} + + bool operator()(const eoPop&) + { + cout << '.'; // pacifier + cout.flush(); + + return --ngen > 0; + } + private : + unsigned ngen; +}; + +template +void print_best(eoPop& pop) +{ + cout << endl; + FitnessType best = pop[0].fitness(); + int index = 0; + + for (int i = 1; i < pop.size(); ++i) + { + if (best < pop[i].fitness()) + { + best = pop[i].fitness(); + index = i; + } + } + + cout << "\t"; + + string str = pop[index].apply(string()); + + cout << str.c_str(); + cout << endl << "Error = " << pop[index].fitness() << endl; +} + + +#include +#include "eoGOpBreeder.h" +#include "eoSequentialGOpSelector.h" +#include "eoProportionalGOpSelector.h" +#include "eoDetTournamentIndiSelector.h" +#include "eoDetTournamentInserter.h" +#include "eoSteadyStateEA.h" +#include "eoScalarFitness.h" + +void main() +{ + typedef eoScalarFitness > FitnessType; + typedef SymregNode GpNode; + + typedef eoParseTree EoType; + typedef eoPop Pop; + + const int MaxSize = 75; + const int nGenerations = 50; + + // Initializor sequence, contains the allowable nodes + vector init(init_sequence, init_sequence + 5); + + // Depth Initializor, defaults to grow method. + eoGpDepthInitializer initializer(10, init); + + // Root Mean Squared Error Measure + RMS eval; + + Pop pop(500, MaxSize, initializer, eval); + + eoSubtreeXOver xover(MaxSize); + eoBranchMutation mutation(initializer, MaxSize); + + eoSequentialGOpSel seqSel; + + seqSel.addOp(mutation, 0.25); + seqSel.addOp(xover, 0.75); + + eoDetTournamentIndiSelector selector(5); + + eoDetTournamentInserter inserter(eval, 5); + + // Terminators + eoGenerationTerm term(nGenerations); + + // GP generation + eoSteadyStateEA gp(seqSel, selector, inserter, term); + + cout << "Initialization done" << endl; + + print_best(pop); + + try + { + gp(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + print_best(pop); +} + From c3fd4eb3ee1d9322d70247afbddc84c984b5554b Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 16:32:12 +0000 Subject: [PATCH 0105/2134] eoScalarFitness, 'envelope class' for making minimizing/maximizing fitness --- eo/src/eoScalarFitness.h | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 eo/src/eoScalarFitness.h diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h new file mode 100644 index 000000000..277888bde --- /dev/null +++ b/eo/src/eoScalarFitness.h @@ -0,0 +1,82 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoScalarFitness.h + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + + +#ifndef eoScalarFitness_h +#define eoScalarFitness_h + +/** + * eoScalarFitness >: + * Wraps a scalar fitness values such as a double or int, with the option of + * maximizing (using less) or miniziming (using greater) + * this quantity in EO. + * + * It overrides operator<() to use the Compare template argument + * + * Suitable constructors and assignments and casts are defined to work + * with this quantity as if it were a ScalarType. +*/ + +template > +class eoScalarFitness +{ + public : + + eoScalarFitness() : value() {} + eoScalarFitness(const eoScalarFitness& other) : value(other.value) {} + eoScalarFitness(const ScalarType& v) : value(v) {} + + eoScalarFitness& operator=(const eoScalarFitness& other) + { value = other.value; return *this; } + eoScalarFitness& operator=(const ScalarType& v) + { value = v; return *this; } + + operator ScalarType(void) const { return value; } + + // Comparison, using less by default + bool operator<(const eoScalarFitness& other) const + { return Compare()(this->value, other.value); } + + private : + ScalarType value; +}; + +template +std::ostream& operator<<(std::ostream& os, const eoScalarFitness& +f) +{ + os << (F) f; + return os; +} + +template +std::istream& operator>>(istream& is, eoScalarFitness& f) +{ + F value; + is >> value; + f = value; + return is; +} + +#endif From 131b6a85fbff2757be7b3ad8f2af82ddbda35108 Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 16:54:09 +0000 Subject: [PATCH 0106/2134] Hi, just a simple test, I'm sorry to do it with the real repository, but my machine here is not Unix --- eo/AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/AUTHORS b/eo/AUTHORS index 55593b7b0..716ec1eda 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -3,3 +3,4 @@ Juan Julian Merelo Guervos Victor Manuel Rivas Santos Gustavo Romero Lopez + From 6569496f6e92d63fe92aa8df80c7ba18909d57b7 Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 17:37:18 +0000 Subject: [PATCH 0107/2134] Removed double line feeds --- eo/test/t-eoSymreg.cpp | 553 +++++++++++++++++++++-------------------- 1 file changed, 277 insertions(+), 276 deletions(-) diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 2dbe570e0..63bfae680 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -1,276 +1,277 @@ -#pragma warning(disable:4786) - -#include "eoParseTree.h" -#include "eoEvalFunc.h" - -using namespace gp_parse_tree; -using namespace std; - -//----------------------------------------------------------------------------- - -class SymregNode -{ -public : - - enum Operator {X = 'x', Plus = '+', Min = '-', Mult = '*', PDiv = '/'}; - - SymregNode(void) { init(); } - SymregNode(Operator _op) { op = _op; } - virtual ~SymregNode(void) {} - - // arity function - int arity(void) const { return op == X? 0 : 2; } - - // evaluation function, single case, using first argument to give value of variable - template - double operator()(double var, Children args) const - { - switch (op) - { - case Plus : return args[0].apply(var) + args[1].apply(var); - case Min : return args[0].apply(var) - args[1].apply(var); - case Mult : return args[0].apply(var) * args[1].apply(var); - case PDiv : - { - double arg1 = args[1].apply(var); - if (arg1 == 0.0) - return 1.0; // protection a la Koza, realistic implementations should maybe throw an exception - - return args[0].apply(var) / arg1; - } - - case X : return var; - } - - return var; // to avoid compiler error - } - - /// 'Pretty' print to ostream function - template - string operator()(string dummy, Children args) - { - static const string lb = "("; - static const string rb = ")"; - char opStr[4] = " "; - opStr[1] = op; - - if (arity() == 0) - { - return string("x"); - } - // else - string result = lb + args[0].apply(dummy); - result += opStr; - result += args[1].apply(dummy) + rb; - return result; - } - - Operator getOp(void) const { return op; } - -protected : - - void init(void) { op = X; } - -private : - - Operator op; // the type of node -}; - -/// initializor -static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNode::Min, SymregNode::Mult, SymregNode::PDiv}; // needed for intialization - -//----------------------------------------------------------- -// saving, loading - -std::ostream& operator<<(std::ostream& os, const SymregNode& eot) -{ - os << static_cast(eot.getOp()); - return os; -} - -std::istream& operator>>(std::istream& is, SymregNode& eot) -{ - char type; - type = (char) is.get(); - eot = SymregNode(static_cast(type)); - return is; -} - - -//----------------------------------------------------------------------------- -/** Implementation of a function evaluation object. */ - -float targetFunction(float x) -{ - return x * x * x * x - x * x * x + x * x * x - x * x + x - 1; -} - -// parameters controlling the sampling of points -const float xbegin = -10.0f; -const float xend = 10.0f; -const float xstep = 1.3f; - -template struct RMS: public eoEvalFunc< eoParseTree > -{ -public : - - typedef eoParseTree EoType; - - typedef eoParseTree argument_type; - typedef double fitness_type; - - RMS(void) : eoEvalFunc() - { - int n = int( (xend - xbegin) / xstep); - - inputs.resize(n); - target.resize(n); - - int i = 0; - - for (double x = xbegin; x < xend && i < n; ++i) - { - target[i] = targetFunction(x); - inputs[i] = x; - } - } - - ~RMS() {} - - void operator()( EoType & _eo ) const - { - vector outputs; - outputs.resize(inputs.size()); - - double fitness = 0.0; - - for (int i = 0; i < inputs.size(); ++i) - { - outputs[i] = _eo.apply(inputs[i]); - fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); - } - - fitness /= (double) target.size(); - fitness = sqrt(fitness); - - if (fitness > 1e+20) - fitness = 1e+20; - - _eo.fitness(fitness); - } - -private : - vector inputs; - vector target; -}; - -#include "eoTerm.h" - -template -class eoGenerationTerm : public eoTerm -{ - public : - eoGenerationTerm(size_t _ngen) : eoTerm(), ngen(_ngen) {} - - bool operator()(const eoPop&) - { - cout << '.'; // pacifier - cout.flush(); - - return --ngen > 0; - } - private : - unsigned ngen; -}; - -template -void print_best(eoPop& pop) -{ - cout << endl; - FitnessType best = pop[0].fitness(); - int index = 0; - - for (int i = 1; i < pop.size(); ++i) - { - if (best < pop[i].fitness()) - { - best = pop[i].fitness(); - index = i; - } - } - - cout << "\t"; - - string str = pop[index].apply(string()); - - cout << str.c_str(); - cout << endl << "Error = " << pop[index].fitness() << endl; -} - - -#include -#include "eoGOpBreeder.h" -#include "eoSequentialGOpSelector.h" -#include "eoProportionalGOpSelector.h" -#include "eoDetTournamentIndiSelector.h" -#include "eoDetTournamentInserter.h" -#include "eoSteadyStateEA.h" -#include "eoScalarFitness.h" - -void main() -{ - typedef eoScalarFitness > FitnessType; - typedef SymregNode GpNode; - - typedef eoParseTree EoType; - typedef eoPop Pop; - - const int MaxSize = 75; - const int nGenerations = 50; - - // Initializor sequence, contains the allowable nodes - vector init(init_sequence, init_sequence + 5); - - // Depth Initializor, defaults to grow method. - eoGpDepthInitializer initializer(10, init); - - // Root Mean Squared Error Measure - RMS eval; - - Pop pop(500, MaxSize, initializer, eval); - - eoSubtreeXOver xover(MaxSize); - eoBranchMutation mutation(initializer, MaxSize); - - eoSequentialGOpSel seqSel; - - seqSel.addOp(mutation, 0.25); - seqSel.addOp(xover, 0.75); - - eoDetTournamentIndiSelector selector(5); - - eoDetTournamentInserter inserter(eval, 5); - - // Terminators - eoGenerationTerm term(nGenerations); - - // GP generation - eoSteadyStateEA gp(seqSel, selector, inserter, term); - - cout << "Initialization done" << endl; - - print_best(pop); - - try - { - gp(pop); - } - catch (exception& e) - { - cout << "exception: " << e.what() << endl;; - exit(EXIT_FAILURE); - } - - print_best(pop); -} - +#pragma warning(disable:4786) + +#include "eoParseTree.h" +#include "eoEvalFunc.h" + +using namespace gp_parse_tree; +using namespace std; + +//----------------------------------------------------------------------------- + +class SymregNode +{ +public : + + enum Operator {X = 'x', Plus = '+', Min = '-', Mult = '*', PDiv = '/'}; + + SymregNode(void) { init(); } + SymregNode(Operator _op) { op = _op; } + virtual ~SymregNode(void) {} + + // arity function + int arity(void) const { return op == X? 0 : 2; } + + // evaluation function, single case, using first argument to give value of variable + template + double operator()(double var, Children args) const + { + switch (op) + { + case Plus : return args[0].apply(var) + args[1].apply(var); + case Min : return args[0].apply(var) - args[1].apply(var); + case Mult : return args[0].apply(var) * args[1].apply(var); + case PDiv : + { + double arg1 = args[1].apply(var); + if (arg1 == 0.0) + return 1.0; // protection a la Koza, realistic implementations should maybe throw an exception + + return args[0].apply(var) / arg1; + } + + case X : return var; + } + + return var; // to avoid compiler error + } + + /// 'Pretty' print to ostream function + template + string operator()(string dummy, Children args) + { + static const string lb = "("; + static const string rb = ")"; + char opStr[4] = " "; + opStr[1] = op; + + if (arity() == 0) + { + return string("x"); + } + // else + string result = lb + args[0].apply(dummy); + result += opStr; + result += args[1].apply(dummy) + rb; + return result; + } + + Operator getOp(void) const { return op; } + +protected : + + void init(void) { op = X; } + +private : + + Operator op; // the type of node +}; + +/// initializor +static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNode::Min, SymregNode::Mult, SymregNode::PDiv}; // needed for intialization + +//----------------------------------------------------------- +// saving, loading + +std::ostream& operator<<(std::ostream& os, const SymregNode& eot) +{ + os << static_cast(eot.getOp()); + return os; +} + +std::istream& operator>>(std::istream& is, SymregNode& eot) +{ + char type; + type = (char) is.get(); + eot = SymregNode(static_cast(type)); + return is; +} + + +//----------------------------------------------------------------------------- +/** Implementation of a function evaluation object. */ + +float targetFunction(float x) +{ + return x * x * x * x - x * x * x + x * x * x - x * x + x - 1; +} + +// parameters controlling the sampling of points +const float xbegin = -10.0f; +const float xend = 10.0f; +const float xstep = 1.3f; + +template struct RMS: public eoEvalFunc< eoParseTree > +{ +public : + + typedef eoParseTree EoType; + + typedef eoParseTree argument_type; + typedef double fitness_type; + + RMS(void) : eoEvalFunc() + { + int n = int( (xend - xbegin) / xstep); + + inputs.resize(n); + target.resize(n); + + int i = 0; + + for (double x = xbegin; x < xend && i < n; ++i) + { + target[i] = targetFunction(x); + inputs[i] = x; + } + } + + ~RMS() {} + + void operator()( EoType & _eo ) const + { + vector outputs; + outputs.resize(inputs.size()); + + double fitness = 0.0; + + for (int i = 0; i < inputs.size(); ++i) + { + outputs[i] = _eo.apply(inputs[i]); + fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); + } + + fitness /= (double) target.size(); + fitness = sqrt(fitness); + + if (fitness > 1e+20) + fitness = 1e+20; + + _eo.fitness(fitness); + } + +private : + vector inputs; + vector target; +}; + +#include "eoTerm.h" + +template +class eoGenerationTerm : public eoTerm +{ + public : + eoGenerationTerm(size_t _ngen) : eoTerm(), ngen(_ngen) {} + + bool operator()(const eoPop&) + { + cout << '.'; // pacifier + cout.flush(); + + return --ngen > 0; + } + private : + unsigned ngen; +}; + +template +void print_best(eoPop& pop) +{ + cout << endl; + FitnessType best = pop[0].fitness(); + int index = 0; + + for (int i = 1; i < pop.size(); ++i) + { + if (best < pop[i].fitness()) + { + best = pop[i].fitness(); + index = i; + } + } + + cout << "\t"; + + string str = pop[index].apply(string()); + + cout << str.c_str(); + cout << endl << "Error = " << pop[index].fitness() << endl; +} + + +#include +#include "eoGOpBreeder.h" +#include "eoSequentialGOpSelector.h" +#include "eoProportionalGOpSelector.h" +#include "eoDetTournamentIndiSelector.h" +#include "eoDetTournamentInserter.h" +#include "eoSteadyStateEA.h" +#include "eoScalarFitness.h" + +void main() +{ + typedef eoScalarFitness > FitnessType; + typedef SymregNode GpNode; + + typedef eoParseTree EoType; + typedef eoPop Pop; + + const int MaxSize = 75; + const int nGenerations = 50; + + // Initializor sequence, contains the allowable nodes + vector init(init_sequence, init_sequence + 5); + + // Depth Initializor, defaults to grow method. + eoGpDepthInitializer initializer(10, init); + + // Root Mean Squared Error Measure + RMS eval; + + Pop pop(500, MaxSize, initializer, eval); + + eoSubtreeXOver xover(MaxSize); + eoBranchMutation mutation(initializer, MaxSize); + + eoSequentialGOpSel seqSel; + + seqSel.addOp(mutation, 0.25); + seqSel.addOp(xover, 0.75); + + eoDetTournamentIndiSelector selector(5); + + eoDetTournamentInserter inserter(eval, 5); + + // Terminators + eoGenerationTerm term(nGenerations); + + // GP generation + eoSteadyStateEA gp(seqSel, selector, inserter, term); + + cout << "Initialization done" << endl; + + print_best(pop); + + try + { + gp(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + print_best(pop); +} + + From 0d439f9f56aab9c704defb416de524354b750e1a Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 19 Feb 2000 18:21:47 +0000 Subject: [PATCH 0108/2134] Changed double linefeeds, will undo this if it doesn't work --- eo/gp/eoParseTree.h | 476 +++---- eo/gp/node_pool.h | 456 +++---- eo/gp/parse_tree.h | 1830 +++++++++++++------------- eo/src/compatibility.h | 152 +-- eo/src/eoAged.h | 217 +-- eo/src/eoAtomCreep.h | 131 +- eo/src/eoAtomMutation.h | 191 +-- eo/src/eoAtomMutator.h | 123 +- eo/src/eoBackInserter.h | 108 +- eo/src/eoBitOp.h | 649 ++++----- eo/src/eoBitOpFactory.h | 239 ++-- eo/src/eoBreeder.h | 227 ++-- eo/src/eoData.h | 115 +- eo/src/eoDetTournament.h | 141 +- eo/src/eoDetTournamentIndiSelector.h | 114 +- eo/src/eoDetTournamentInserter.h | 138 +- eo/src/eoDup.h | 127 +- eo/src/eoESChrom.h | 251 ++-- eo/src/eoESFullChrom.h | 537 ++++---- eo/src/eoEasyEA.h | 165 +-- eo/src/eoEvalFuncPtr.h | 119 +- eo/src/eoException.h | 138 +- eo/src/eoFitTerm.h | 129 +- eo/src/eoFitness.h | 109 +- eo/src/eoGOpBreeder.h | 117 +- eo/src/eoGOpSelector.h | 347 ++--- eo/src/eoGenTerm.h | 165 +-- eo/src/eoID.h | 219 +-- eo/src/eoIndiSelector.h | 268 ++-- eo/src/eoInserter.h | 185 +-- eo/src/eoKill.h | 123 +- eo/src/eoLottery.h | 195 +-- eo/src/eoMultiBinOp.h | 199 +-- eo/src/eoMultiMonOp.h | 160 +-- eo/src/eoMutation.h | 181 +-- eo/src/eoNegExp.h | 133 +- eo/src/eoNonUniform.h | 173 +-- eo/src/eoNormal.h | 177 +-- eo/src/eoObject.h | 137 +- eo/src/eoOp.h | 471 +++---- eo/src/eoPersistent.cpp | 29 +- eo/src/eoPersistent.h | 144 +- eo/src/eoPop.h | 321 ++--- eo/src/eoPrintable.h | 125 +- eo/src/eoProblem.h | 85 +- eo/src/eoProportionalGOpSelector.h | 109 +- eo/src/eoProportionalOpSel.h | 313 ++--- eo/src/eoRNG.h | 905 ++++++------- eo/src/eoRandomIndiSelector.h | 103 +- eo/src/eoSequentialGOpSelector.h | 123 +- eo/src/eoSteadyStateEA.h | 173 +-- eo/src/eoSteadyStateGeneration.h | 177 +-- eo/src/eoSteadyStateInserter.h | 102 +- eo/src/eoStochTournament.h | 137 +- eo/src/eoStochTournamentInserter.h | 146 +- eo/src/eoString.h | 281 ++-- eo/src/eoTranspose.h | 183 +-- eo/src/eoUniformSelect.h | 129 +- eo/src/eoWrappedOps.h | 441 +++---- eo/src/eoXOver2.h | 213 +-- eo/src/rnd_generators.h | 170 +-- eo/src/selectors.h | 626 ++++----- 62 files changed, 7612 insertions(+), 7555 deletions(-) diff --git a/eo/gp/eoParseTree.h b/eo/gp/eoParseTree.h index a83b45feb..5aa4bcf48 100644 --- a/eo/gp/eoParseTree.h +++ b/eo/gp/eoParseTree.h @@ -1,238 +1,238 @@ -#ifndef EO_PARSE_TREE_H -#define EO_PARSE_TREE_H - -#include - -#include "EO.h" -#include "eoOp.h" -#include "eoInserter.h" -#include "eoIndiSelector.h" -#include "parse_tree.h" -#include "eoRnd.h" - -using namespace gp_parse_tree; -using namespace std; - -template -class eoParseTree : public EO, public parse_tree -{ -public : - - typedef typename parse_tree::subtree Type; - - eoParseTree(void) : EO(), parse_tree() {} - eoParseTree(unsigned _size, eoRnd& _rnd) - : EO(), parse_tree(_rnd()) - { - pruneTree(_size); - } - - void pruneTree(unsigned _size) - { - if (_size < 1) - return; - - if (size() > _size) - { - Type* sub = &operator[](size() - 2); // prune tree - - while (sub->size() > _size) - { - sub = &sub->operator[](0); - } - - back() = *sub; - } - } - - eoParseTree(std::istream& is) : EO(), parse_tree() - { - readFrom(is); - } - - string className(void) const { return "eoParseTree"; } - - void printOn(std::ostream& os) const - { - os << fitness() << ' '; - - std::copy(ebegin(), eend(), ostream_iterator(os)); - } - - void readFrom(std::istream& is) - { - FType fit; - - is >> fit; - - fitness(fit); - - std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); - } -}; - -template -std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) -{ - eot.printOn(os); - return os; -} - -template -std::istream& operator>>(std::istream& is, eoParseTree& eot) -{ - eot.readFrom(is); - return is; -} - - - -template -class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > -{ - public : - - typedef eoParseTree EoType; - - eoGpDepthInitializer( - unsigned _max_depth, - const vector& _initializor, - bool _grow = true) - : - eoRnd(), - max_depth(_max_depth), - initializor(_initializor), - grow(_grow) - {} - - virtual string className() const { return "eoDepthInitializer"; }; - - EoType::Type operator()(void) - { - list sequence; - - generate(sequence, max_depth); - - parse_tree tree(sequence.begin(), sequence.end()); - - return tree.root(); - } - - void generate(list& sequence, int the_max, int last_terminal = -1) - { - if (last_terminal == -1) - { // check where the last terminal in the sequence resides - vector::iterator it; - for (it = initializor.begin(); it != initializor.end(); ++it) - { - if (it->arity() > 1) - break; - } - - last_terminal = it - initializor.begin(); - } - - if (the_max == 1) - { // generate terminals only - vector::iterator it = initializor.begin() + rng.random(last_terminal); - sequence.push_front(*it); - return; - } - - vector::iterator what_it; - - if (grow) - { - what_it = initializor.begin() + rng.random(initializor.size()); - } - else // full - { - what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); - } - - sequence.push_front(*what_it); - - for (int i = 0; i < what_it->arity(); ++i) - generate(sequence, the_max - 1, last_terminal); - } - - -private : - - unsigned max_depth; - std::vector initializor; - bool grow; -}; - -template -class eoSubtreeXOver: public eoGeneralOp< eoParseTree > { -public: - - typedef eoParseTree EoType; - - eoSubtreeXOver( unsigned _max_length) - : eoGeneralOp(), max_length(_max_length) {}; - - virtual string className() const { return "eoSubtreeXOver"; }; - - /// Dtor - virtual ~eoSubtreeXOver () {}; - - void operator()(eoIndiSelector& _source, eoInserter& _sink ) const - { - EoType eo1 = _source.select(); - const EoType& eo2 = _source.select(); - - int i = rng.random(eo1.size()); - int j = rng.random(eo2.size()); - - eo1[i] = eo2[j]; // insert subtree - - eo1.pruneTree(max_length); - - eo1.invalidate(); - _sink.insert(eo1); - } - - unsigned max_length; -}; - -template -class eoBranchMutation: public eoGeneralOp< eoParseTree > -{ -public: - - typedef eoParseTree EoType; - - eoBranchMutation(eoRnd& _init, unsigned _max_length) - : eoGeneralOp(), max_length(_max_length), initializer(_init) - {}; - - virtual string className() const { return "eoBranchMutation"; }; - - /// Dtor - virtual ~eoBranchMutation() {}; - - void operator()(eoIndiSelector& _source, eoInserter& _sink ) const - { - EoType eo1 = _source.select(); - int i = rng.random(eo1.size()); - - EoType eo2(eo1[i].size(), initializer); // create random other to cross with - - eo1[i] = eo2.back(); // insert subtree - - eo1.pruneTree(max_length); - - eo1.invalidate(); - _sink.insert(eo1); - } - -private : - - unsigned max_length; - eoRnd& initializer; -}; - - -#endif \ No newline at end of file +#ifndef EO_PARSE_TREE_H +#define EO_PARSE_TREE_H + +#include + +#include "EO.h" +#include "eoOp.h" +#include "eoInserter.h" +#include "eoIndiSelector.h" +#include "parse_tree.h" +#include "eoRnd.h" + +using namespace gp_parse_tree; +using namespace std; + +template +class eoParseTree : public EO, public parse_tree +{ +public : + + typedef typename parse_tree::subtree Type; + + eoParseTree(void) : EO(), parse_tree() {} + eoParseTree(unsigned _size, eoRnd& _rnd) + : EO(), parse_tree(_rnd()) + { + pruneTree(_size); + } + + void pruneTree(unsigned _size) + { + if (_size < 1) + return; + + if (size() > _size) + { + Type* sub = &operator[](size() - 2); // prune tree + + while (sub->size() > _size) + { + sub = &sub->operator[](0); + } + + back() = *sub; + } + } + + eoParseTree(std::istream& is) : EO(), parse_tree() + { + readFrom(is); + } + + string className(void) const { return "eoParseTree"; } + + void printOn(std::ostream& os) const + { + os << fitness() << ' '; + + std::copy(ebegin(), eend(), ostream_iterator(os)); + } + + void readFrom(std::istream& is) + { + FType fit; + + is >> fit; + + fitness(fit); + + std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); + } +}; + +template +std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) +{ + eot.printOn(os); + return os; +} + +template +std::istream& operator>>(std::istream& is, eoParseTree& eot) +{ + eot.readFrom(is); + return is; +} + + + +template +class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > +{ + public : + + typedef eoParseTree EoType; + + eoGpDepthInitializer( + unsigned _max_depth, + const vector& _initializor, + bool _grow = true) + : + eoRnd(), + max_depth(_max_depth), + initializor(_initializor), + grow(_grow) + {} + + virtual string className() const { return "eoDepthInitializer"; }; + + EoType::Type operator()(void) + { + list sequence; + + generate(sequence, max_depth); + + parse_tree tree(sequence.begin(), sequence.end()); + + return tree.root(); + } + + void generate(list& sequence, int the_max, int last_terminal = -1) + { + if (last_terminal == -1) + { // check where the last terminal in the sequence resides + vector::iterator it; + for (it = initializor.begin(); it != initializor.end(); ++it) + { + if (it->arity() > 1) + break; + } + + last_terminal = it - initializor.begin(); + } + + if (the_max == 1) + { // generate terminals only + vector::iterator it = initializor.begin() + rng.random(last_terminal); + sequence.push_front(*it); + return; + } + + vector::iterator what_it; + + if (grow) + { + what_it = initializor.begin() + rng.random(initializor.size()); + } + else // full + { + what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); + } + + sequence.push_front(*what_it); + + for (int i = 0; i < what_it->arity(); ++i) + generate(sequence, the_max - 1, last_terminal); + } + + +private : + + unsigned max_depth; + std::vector initializor; + bool grow; +}; + +template +class eoSubtreeXOver: public eoGeneralOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + + eoSubtreeXOver( unsigned _max_length) + : eoGeneralOp(), max_length(_max_length) {}; + + virtual string className() const { return "eoSubtreeXOver"; }; + + /// Dtor + virtual ~eoSubtreeXOver () {}; + + void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + { + EoType eo1 = _source.select(); + const EoType& eo2 = _source.select(); + + int i = rng.random(eo1.size()); + int j = rng.random(eo2.size()); + + eo1[i] = eo2[j]; // insert subtree + + eo1.pruneTree(max_length); + + eo1.invalidate(); + _sink.insert(eo1); + } + + unsigned max_length; +}; + +template +class eoBranchMutation: public eoGeneralOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + eoBranchMutation(eoRnd& _init, unsigned _max_length) + : eoGeneralOp(), max_length(_max_length), initializer(_init) + {}; + + virtual string className() const { return "eoBranchMutation"; }; + + /// Dtor + virtual ~eoBranchMutation() {}; + + void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + { + EoType eo1 = _source.select(); + int i = rng.random(eo1.size()); + + EoType eo2(eo1[i].size(), initializer); // create random other to cross with + + eo1[i] = eo2.back(); // insert subtree + + eo1.pruneTree(max_length); + + eo1.invalidate(); + _sink.insert(eo1); + } + +private : + + unsigned max_length; + eoRnd& initializer; +}; + + +#endif diff --git a/eo/gp/node_pool.h b/eo/gp/node_pool.h index d2f70fe9a..35cc4ab26 100644 --- a/eo/gp/node_pool.h +++ b/eo/gp/node_pool.h @@ -1,228 +1,228 @@ - -#ifndef node_pool_h -#define node_pool_h - -class MemPool -{ -public : - - MemPool(unsigned int sz) : esize(sznext; - delete p; - } - } - - void* allocate() - { - if (head == 0) grow(); - Link* p = head; - head = p->next; - return static_cast(p); - } - - void deallocate(void* b) - { - Link* p = static_cast(b); - p->next = head; - head = p; - } - -private : - - void grow() - { - Chunk* n = new Chunk; - n->next = chunks; - chunks = n; - - const int nelem = Chunk::size/esize; - char* start = n->mem; - char* last = &start[(nelem-1)*esize]; - for (char* p = start; p < last; p += esize) - { - reinterpret_cast(p)->next = - reinterpret_cast(p + esize); - } - - reinterpret_cast(last)->next = 0; - head = reinterpret_cast(start); - } - - struct Link - { - Link* next; - }; - - struct Chunk - { - enum {size = 8 * 1024 - 16}; - Chunk* next; - char mem[size]; - }; - - Chunk* chunks; - const unsigned int esize; - Link* head; -}; - -template -class Node_alloc -{ -public : - Node_alloc() {}; - - T* allocate(void) - { - T* t = static_cast(mem.allocate()); - t = new (t) T; - //t->T(); // call constructor; - return t; - } - - void deallocate(T* t) - { - t->~T(); // call destructor - mem.deallocate(static_cast(t)); - } - -private : - static MemPool mem; -}; - -template -class Standard_alloc -{ -public : - Standard_alloc() {} - - T* allocate(size_t arity = 1) - { - if (arity == 0) - return 0; - - return new T [arity]; - } - - void deallocate(T* t, size_t arity = 1) - { - if (arity == 0) - return ; - - delete [] t; - } - -}; - -template -class Standard_Node_alloc -{ -public : - Standard_Node_alloc() {} - - T* allocate(void) - { - return new T;// [arity]; - } - - void deallocate(T* t) - { - delete t; - } - -}; - -template -class Tree_alloc -{ -public : - Tree_alloc() {} - - T* allocate(size_t arity) - { - T* t; - - switch(arity) - { - - case 0 : return 0; - case 1 : - { - t = static_cast(mem1.allocate()); - new (t) T; - break; - } - case 2 : - { - t = static_cast(mem2.allocate()); - new (t) T; - new (&t[1]) T; - break; - } - case 3 : - { - t = static_cast(mem3.allocate()); - new (t) T; - new (&t[1]) T; - new (&t[2]) T; - break; - } - default : - { - return new T[arity]; - } - } - - return t; - } - - void deallocate(T* t, size_t arity) - { - switch(arity) - { - case 0: return; - case 3 : - { - t[2].~T(); t[1].~T(); t[0].~T(); - mem3.deallocate(static_cast(t)); - return; - } - case 2 : - { - t[1].~T(); t[0].~T(); - mem2.deallocate(static_cast(t)); - return; - } - case 1 : - { - t[0].~T(); - mem1.deallocate(static_cast(t)); - return; - } - default : - { - delete [] t; - return; - } - } - } - - -private : - static MemPool mem1; - static MemPool mem2; - static MemPool mem3; -}; - -// static (non thread_safe) memory pools -template MemPool Node_alloc::mem = sizeof(T); -template MemPool Tree_alloc::mem1 = sizeof(T); -template MemPool Tree_alloc::mem2 = sizeof(T) * 2; -template MemPool Tree_alloc::mem3 = sizeof(T) * 3; - -#endif \ No newline at end of file + +#ifndef node_pool_h +#define node_pool_h + +class MemPool +{ +public : + + MemPool(unsigned int sz) : esize(sznext; + delete p; + } + } + + void* allocate() + { + if (head == 0) grow(); + Link* p = head; + head = p->next; + return static_cast(p); + } + + void deallocate(void* b) + { + Link* p = static_cast(b); + p->next = head; + head = p; + } + +private : + + void grow() + { + Chunk* n = new Chunk; + n->next = chunks; + chunks = n; + + const int nelem = Chunk::size/esize; + char* start = n->mem; + char* last = &start[(nelem-1)*esize]; + for (char* p = start; p < last; p += esize) + { + reinterpret_cast(p)->next = + reinterpret_cast(p + esize); + } + + reinterpret_cast(last)->next = 0; + head = reinterpret_cast(start); + } + + struct Link + { + Link* next; + }; + + struct Chunk + { + enum {size = 8 * 1024 - 16}; + Chunk* next; + char mem[size]; + }; + + Chunk* chunks; + const unsigned int esize; + Link* head; +}; + +template +class Node_alloc +{ +public : + Node_alloc() {}; + + T* allocate(void) + { + T* t = static_cast(mem.allocate()); + t = new (t) T; + //t->T(); // call constructor; + return t; + } + + void deallocate(T* t) + { + t->~T(); // call destructor + mem.deallocate(static_cast(t)); + } + +private : + static MemPool mem; +}; + +template +class Standard_alloc +{ +public : + Standard_alloc() {} + + T* allocate(size_t arity = 1) + { + if (arity == 0) + return 0; + + return new T [arity]; + } + + void deallocate(T* t, size_t arity = 1) + { + if (arity == 0) + return ; + + delete [] t; + } + +}; + +template +class Standard_Node_alloc +{ +public : + Standard_Node_alloc() {} + + T* allocate(void) + { + return new T;// [arity]; + } + + void deallocate(T* t) + { + delete t; + } + +}; + +template +class Tree_alloc +{ +public : + Tree_alloc() {} + + T* allocate(size_t arity) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T; + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T; + new (&t[1]) T; + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T; + new (&t[1]) T; + new (&t[2]) T; + break; + } + default : + { + return new T[arity]; + } + } + + return t; + } + + void deallocate(T* t, size_t arity) + { + switch(arity) + { + case 0: return; + case 3 : + { + t[2].~T(); t[1].~T(); t[0].~T(); + mem3.deallocate(static_cast(t)); + return; + } + case 2 : + { + t[1].~T(); t[0].~T(); + mem2.deallocate(static_cast(t)); + return; + } + case 1 : + { + t[0].~T(); + mem1.deallocate(static_cast(t)); + return; + } + default : + { + delete [] t; + return; + } + } + } + + +private : + static MemPool mem1; + static MemPool mem2; + static MemPool mem3; +}; + +// static (non thread_safe) memory pools +template MemPool Node_alloc::mem = sizeof(T); +template MemPool Tree_alloc::mem1 = sizeof(T); +template MemPool Tree_alloc::mem2 = sizeof(T) * 2; +template MemPool Tree_alloc::mem3 = sizeof(T) * 3; + +#endif diff --git a/eo/gp/parse_tree.h b/eo/gp/parse_tree.h index 3d501b03b..cb3b2ec26 100644 --- a/eo/gp/parse_tree.h +++ b/eo/gp/parse_tree.h @@ -1,915 +1,915 @@ -#ifndef PARSE_TREE_HH -#define PARSE_TREE_HH - -/** - - * Parse_tree and subtree classes - * (c) Maarten Keijzer 1999 - - * These classes may be used for educational and - * other non-commercial purposes only. Even if I - * wanted to, I am not at liberty to place this file - * under the GNU Lesser Public Library License, as this - * would limit my and my institution's freedom to use - * this file in closed-source software. - - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for non-commercial purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - - - Usage information. - - class Node (your node in the tree) must have the following implemented: - - ****** Arity ****** - - int arity(void) const - - Note: the default constructor of a Node should provide a - Node with arity 0! - - ****** Evaluation ****** - - A parse_tree is evaluated through one of it's apply() members: - - 1) parse_tree::apply(void) - - is the simplest evaluation, it will call - - RetVal Node::operator()(subtree::const_iterator) - - 2) parse_tree::apply(It values) - - will call: - - RetVal Node::operator()(subtree<... , It values) - - where It is whatever type you desire (most of the time - this will be a vector containing the values of your - variables); - - 3) parse_tree::apply(It values, It2 moreValues) - - will call: - - RetVal Node::operator()(subtree<... , It values, It2 moreValues) - - although I do not see the immediate use of this, however... - - 4) parse_tree::apply(It values, It2 args, It3 adfs) - - that calls: - - RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) - - can be useful for implementing adfs. - - - In general it is a good idea to leave the specifics of the - arguments open so that different ways of evaluation remain - possible. Implement the simplest eval as: - - template - RetVal operator()(It begin) const - - ****** Internal Structure ****** - - A parse_tree has two template arguments: the Node and the ReturnValue - produced by evaluating the node. The structure of the tree is defined - through a subtree class that has the same two template arguments. - - The nodes are stored in a tree like : - - node4 - / \ - node3 node2 - / \ - node1 node0 - - where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) - - The nodes are subtrees, containing the structure of the tree, together - with its size and depth. They contain a Node, the user defined template - argument. To access these nodes from a subtree, use operator-> or operator*. - - The numbers behind the nodes define a reverse-polish or postfix - traversel through the tree. The parse_tree defines iterators - on the tree such that - - tree.begin() points at the subtree at node0 and - tree.back() returns the subtree at node4, the complete tree - - Likewise operator[] is defined on the tree, such that: - - tree[0] will return the subtree at node0, while - tree[2] will return the subtree at node2 - - Assigments of subtrees is protected so that the code: - - tree[2] = tree[0]; - - will not crash and result in a tree structured as: - - node4 - / \ - node3 node0 - - Note that the rank numbers no longer specify their place in the tree: - - tree[0] still points at node0, but - tree[1] now points to node3 and - tree[2] points at the root node4 - - Embedded iterators are implemented to iterate over nodes rather - than subtrees. So an easy way to copy your tree to a vector is: - - vector vec(tree.size()); - copy(tree.ebegin(), tree.eend(), vec.begin()); - - You can also copy it to an ostream_iterator with this - technique, given that your Node implements an appropriate - operator<<. Reinitializing a tree with the vector is also - simple: - - tree.clear(); - copy(vec.begin(), vec.end(), back_inserter(tree)); - - Note that the back_inserter must be used as there is no - resize member in the parse_tree. back_inserter will use - the push_back member from the parse_tree - -*/ - -#include -#include // for swap - -#ifdef _MSC_VER -#pragma warning(disable : 4786) // disable this nagging warning about the limitations of the mirkosoft debugger -#endif - -namespace gp_parse_tree -{ - -#include "node_pool.h" - - -template -inline void do_the_swap(T& a, T& b) -{ - T tmp = a; - a = b; - b = tmp; -} - -template class parse_tree -{ - public : - -class subtree -{ - -// a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) -#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) - Node_alloc node_allocator; - Tree_alloc tree_allocator; -#else - Standard_Node_alloc node_allocator; - Standard_alloc tree_allocator; -#endif - -public : - - typedef subtree* iterator; - typedef const subtree* const_iterator; - //typedef std::vector::const_reverse_iterator const_reverse_iterator; - - /* Constructors, assignments */ - - subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - {} - subtree(const subtree& s) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { copy(s); } - subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { copy(t); } - - template - subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { // initialize in prefix way for efficiency reasons - init(b, --e); - } - - virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } - - subtree& operator=(const subtree& s) - { - if (s.get_root() == get_root()) - { // from the same tree, maybe a child. Don't take any chances - subtree anotherS = s; - return copy(anotherS); - } - - return copy(s); - } - - subtree& operator=(const T& t) { return copy(t); } - - /* Access to the nodes */ - - T& operator*(void) { return *content; } - const T& operator*(void) const { return *content; } - T* operator->(void) { return content; } - const T* operator->(void) const { return content; } - - /* Equality, inequality check, Node needs to implement operator== */ - - bool operator==(const subtree& other) const - { - if (! (*content == *other.content)) - return false; - - for (int i = 0; i < arity(); i++) - { - if (!(args[i] == other.args[i])) - return false; - } - - return true; - } - - bool operator !=(const subtree& other) const - { - return !operator==(other); - } - - /* Arity */ - int arity(void) const { return content->arity(); } - - /* Evaluation with an increasing amount of user defined arguments */ - template - RetVal apply(RetVal v) const { return (*content)(v, begin()); } - - template - RetVal apply(RetVal v, It values) const { return (*content)(v, begin(), values); } - - template - RetVal apply(RetVal v, It values, It2 moreValues) const - { return (*content)(v, begin(), values, moreValues); } - - template - RetVal apply(RetVal v, It values, It2 moreValues, It3 evenMoreValues) const - { return (*content)(v, begin(), values, moreValues, evenMoreValues); } - - - /* Iterators */ - - iterator begin(void) { return args; } - const_iterator begin(void) const { return args; } - - iterator end(void) { return args + arity(); } - const_iterator end(void) const { return args + arity(); } - - subtree& operator[](int i) { return *(begin() + i); } - const subtree& operator[](int i) const { return *(begin() + i); } - - /* Some statistics */ - - size_t size(void) const { return _size; } - - size_t cumulative_size(void) const { return _cumulative_size; } - size_t depth(void) const { return _depth; } - - const subtree& select_cumulative(size_t which) const - { return imp_select_cumulative(which); } - - subtree& select_cumulative(size_t which) - { return const_cast(imp_select_cumulative(which)); } - - subtree& get_node(size_t which) - { return const_cast(imp_get_node(which));} - const subtree& get_node(size_t which) const - { return imp_get_node(which); } - - subtree* get_parent(void) { return parent; } - const subtree* get_parent(void) const { return parent; } - - void clear(void) - { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } - - void swap(subtree& y) - { - do_the_swap(content, y.content); - do_the_swap(args, y.args); - do_the_swap(parent, y.parent); - - do_the_swap(_cumulative_size, y._cumulative_size); - do_the_swap(_depth, y._depth); - do_the_swap(_size, y._size); - updateAfterInsert(); - } - - friend void swap(subtree& x, subtree& y) - { - x.swap(y); - } - -protected : - - virtual void updateAfterInsert(void) - { - _depth = 0; - _size = 1; - _cumulative_size = 0; - - for (iterator it = begin(); it != end(); ++it) - { - _size += it->size(); - _cumulative_size += it->_cumulative_size; - _depth = it->_depth > _depth? it->_depth: _depth; - } - _cumulative_size += _size; - _depth++; - - if (parent) - parent->updateAfterInsert(); - } - -private : - - const subtree& imp_select_cumulative(size_t which) const - { - if (which >= (_cumulative_size - size())) - return *this; - // else - - for (int i = arity() - 1; i >= 0; --i) - { - if (which < args[i]._cumulative_size) - return args[i].imp_select_cumulative(which); - which -= args[i]._cumulative_size; - } - - return *this; // error! - } - - const subtree& imp_get_node(size_t which) const - { - if (which == size() - 1) - return *this; - - for (int i = arity() - 1; i >= 0; --i) - { - unsigned c_size = args[i].size(); - if (which < c_size) - return args[i].imp_get_node(which); - which -= c_size; - } - - return *this; // error! - } - - const subtree* get_root(void) const - { - if (parent == 0) - return this; - // else - - return parent->get_root(); - } - - subtree& copy(const subtree& s) - { - int oldArity = arity(); - - disown(); - - int ar = s.arity(); - - if (ar != oldArity) - { - tree_allocator.deallocate(args, oldArity); - - args = tree_allocator.allocate(ar); - - //if (ar > 0) - // args = new subtree [ar]; - //else - // args = 0; - } - - switch(ar) - { - case 3 : args[2].copy(s.args[2]); // no break! - case 2 : args[1].copy(s.args[1]); - case 1 : args[0].copy(s.args[0]); break; - case 0 : break; - default : - { - for (int i = 0; i < ar; ++i) - { - args[i].copy(s.args[i]); - } - } - } - - *content = *s.content; - - adopt(); - updateAfterInsert(); - return *this; - } - - subtree& copy(const T& t) - { - int oldArity = arity(); - - if (content != &t) - *content = t; - else - oldArity = -1; - - int ar = arity(); - - if (ar != oldArity) - { - if (oldArity != -1) - tree_allocator.deallocate(args, oldArity); - - args = tree_allocator.allocate(ar); - - //if (ar > 0) - // args = new subtree [ar]; - //else - // args = 0; - } - - adopt(); - updateAfterInsert(); - return *this; - } - - void disown(void) - { - switch(arity()) - { - case 3 : args[2].parent = 0; // no break! - case 2 : args[1].parent = 0; - case 1 : args[0].parent = 0; break; - case 0 : break; - default : - { - for (iterator it = begin(); it != end(); ++it) - { - it->parent = 0; - } - } - } - - } - - void adopt(void) - { - switch(arity()) - { - case 3 : args[2].parent = this; // no break! - case 2 : args[1].parent = this; - case 1 : args[0].parent = this; break; - case 0 : break; - default : - { - for (iterator it = begin(); it != end(); ++it) - { - it->parent = this; - } - } - } - } - - template - void init(It b, It& last) - { - *this = *last; - -#ifndef NDEBUG - if (last == b && arity() > 0) - { - throw "subtree::init()"; - } -#endif - - for (int i = 0; i < arity(); ++i) - { - args[i].parent = 0; - args[i].init(b, --last); - args[i].parent = this; - } - - updateAfterInsert(); - } - - T* content; - subtree* args; - subtree* parent; - - size_t _cumulative_size; - size_t _depth; - size_t _size; -}; - -// Continuing with parse_tree - - typedef T value_type; - - /* Constructors and Assignments */ - - parse_tree(void) : _root(), pushed() {} - parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } - parse_tree(const subtree& sub) : _root(sub), pushed() { } - - template - parse_tree(It b, It e) : _root(b, e), pushed() {} - - virtual ~parse_tree(void) {} - - parse_tree& operator=(const parse_tree& org) { return copy(org); } - parse_tree& operator=(const subtree& sub) - { return copy(sub); } - - - /* Equality and inequality */ - - bool operator==(const parse_tree& other) const - { return _root == other._root; } - - bool operator !=(const parse_tree& other) const - { return !operator==(other); } - - /* Simple tree statistics */ - - size_t size(void) const { return _root.size(); } - size_t depth(void) const { return _root.depth(); } - void clear(void) { _root.clear(); pushed.resize(0); } - - /* Evaluation (application), with an increasing number of user defined arguments */ - - template - RetVal apply(RetVal v) const - { return _root.apply(v); } - - template - RetVal apply(RetVal v, It varValues) const - { return _root.apply(v, varValues); } - - template - RetVal apply(RetVal v, It varValues, It2 moreValues) const - { return _root.apply(v, varValues, moreValues); } - - template - RetVal apply(RetVal v, It varValues, It2 moreValues, It3 evenMoreValues) const - { return _root.apply(v, varValues, moreValues, evenMoreValues); } - - /* Customized Swap */ - void swap(parse_tree& other) - { - do_the_swap(pushed, other.pushed); - _root.swap(other._root); - } - - /* Definitions of the iterators */ - - class base_iterator - { - public : - - base_iterator() {} - base_iterator(subtree* n) { node = n; } - - base_iterator& operator=(const base_iterator& org) - { node = org.node; return *this; } - - bool operator==(const base_iterator& org) const - { return node == org.node; } - bool operator!=(const base_iterator& org) const - { return !operator==(org); } - - base_iterator operator+(size_t n) const - { - base_iterator tmp = *this; - - for(;n != 0; --n) - { - ++tmp; - } - - return tmp; - } - - base_iterator& operator++(void) - { - subtree* parent = node->get_parent(); - - if (parent == 0) - { - node = 0; - return *this; - } - // else - subtree::iterator it; - for (it = parent->begin(); it != parent->end(); ++it) - { - if (node == &(*it)) - break; - } - - if (it == parent->begin()) - node = parent; - else - { - node = &(--it)->get_node(0); - } - - return *this; - } - - base_iterator operator++(int) - { - base_iterator tmp = *this; - operator++(); - return tmp; - } - - protected : - subtree* node; - }; - - class iterator : public base_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef subtree value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef subtree* pointer; - typedef subtree& reference; - - iterator() : base_iterator() {} - iterator(subtree* n): base_iterator(n) {} - iterator& operator=(const iterator& org) - { base_iterator::operator=(org); return *this; } - - subtree& operator*(void) { return *node; } - subtree* operator->(void) { return node; } - }; - - class embedded_iterator : public base_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef T value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef T* pointer; - typedef T& reference; - - embedded_iterator() : base_iterator() {} - embedded_iterator(subtree* n): base_iterator(n) {} - embedded_iterator& operator=(const embedded_iterator& org) - { base_iterator::operator=(org); return *this; } - - T& operator*(void) { return **node; } - T* operator->(void) { return &**node; } - }; - - class base_const_iterator - { - public : - base_const_iterator() {} - base_const_iterator(const subtree* n) { node = n; } - - base_const_iterator& operator=(const base_const_iterator& org) - { node = org.node; return *this; } - - bool operator==(const base_const_iterator& org) const - { return node == org.node; } - bool operator!=(const base_const_iterator& org) const - { return !operator==(org); } - - base_const_iterator& operator++(void) - { - const subtree* parent = node->get_parent(); - - if (parent == 0) - { - node = 0; - return *this; - } - // else - subtree::const_iterator it; - - for (it = parent->begin(); it != parent->end(); ++it) - { - if (node == &(*it)) - break; - } - - if (it == parent->begin()) - node = parent; - else - node = &(--it)->get_node(0); - return *this; - } - - base_const_iterator operator++(int) - { - base_const_iterator tmp = *this; - operator++(); - return tmp; - } - - protected : - - const subtree* node; - }; - - class const_iterator : public base_const_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef const subtree value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef const subtree* pointer; - typedef const subtree& reference; - - const_iterator() : base_const_iterator() {} - const_iterator(const subtree* n): base_const_iterator(n) {} - const_iterator& operator=(const const_iterator& org) - { base_const_iterator::operator=(org); return *this; } - - const subtree& operator*(void) { return *node; } - const subtree* operator->(void) { return node; } - }; - - class embedded_const_iterator : public base_const_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef const T value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef const T* pointer; - typedef const T& reference; - - embedded_const_iterator() : base_const_iterator() {} - embedded_const_iterator(const subtree* n): base_const_iterator(n) {} - embedded_const_iterator& operator=(const embedded_const_iterator& org) - { base_const_iterator::operator=(org); return *this; } - - embedded_const_iterator operator+(size_t n) const - { - embedded_const_iterator tmp = *this; - - for(;n != 0; --n) - { - ++tmp; - } - - return tmp; - } - - const T& operator*(void) const { return **node; } - const T* operator->(void) const { return node->operator->(); } - }; - - /* Iterator access */ - - iterator begin(void) { return iterator(&operator[](0)); } - const_iterator begin(void) const { return const_iterator(&operator[](0)); } - iterator end(void) { return iterator(0); } - const_iterator end(void) const { return const_iterator(0);} - - embedded_iterator ebegin(void) { return embedded_iterator(&operator[](0)); } - embedded_const_iterator ebegin(void) const { return embedded_const_iterator(&operator[](0)); } - embedded_iterator eend(void) { return embedded_iterator(0); } - embedded_const_iterator eend(void) const { return embedded_const_iterator(0);} - - bool empty(void) const { return size() == 0; } - bool valid(void) const { return pushed.empty(); } - - /* push_back */ - - void push_back(const parse_tree& tree) - { - if (!empty()) - pushed.push_back(_root); - - _root = tree.back(); - } - - void push_back(const T& t) - { - if (!empty()) - pushed.push_back(_root); - - _root = t; - - for (subtree::iterator it = _root.begin(); it != _root.end(); it++) - { - *it = pushed.back(); - pushed.pop_back(); - } - - } - - /* Access to subtrees */ - - subtree& back(void) { return _root; } - const subtree& back(void) const { return _root; } - subtree& root(void) { return _root; } - const subtree& root(void) const { return _root; } - - subtree& front(void) { return _root[0]; } - const subtree& front(void) const { return _root[0]; } - - subtree& operator[](size_t i) - { return const_cast(_root.get_node(i)); } - const subtree& operator[](size_t i) const - { return _root.get_node(i); } - - subtree& get_cumulative(size_t i) - { return const_cast(_root.get_cumulative(i)); } - const subtree& get_cumulative(size_t i) const - { return get_cumulative(i); } - - private : - - parse_tree& copy(const parse_tree& org) - { - _root = org._root; - pushed = org.pushed; - - return *this; - } - - parse_tree& copy(const subtree& sub) - { _root = sub; pushed.resize(0); return *this; } - - subtree _root; - std::vector pushed; -}; // end class parse_tree - - -} // end namespace gp_parse_tree - -namespace std -{ // for use with stlport on MSVC - -template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) -{ - return std::forward_iterator_tag(); -} - -template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) -{ - return 0; -} - -template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) -{ - return std::forward_iterator_tag(); -} - -template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) -{ - return 0; -} - -// Put customized swaps also in std... - -template inline -void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) -{ - a.swap(b); -} - -template inline -void iter_swap(vector >::iterator a, vector > b) -{ - a->swap(*b); -} - - -} // namespace std - - -#endif \ No newline at end of file +#ifndef PARSE_TREE_HH +#define PARSE_TREE_HH + +/** + + * Parse_tree and subtree classes + * (c) Maarten Keijzer 1999 + + * These classes may be used for educational and + * other non-commercial purposes only. Even if I + * wanted to, I am not at liberty to place this file + * under the GNU Lesser Public Library License, as this + * would limit my and my institution's freedom to use + * this file in closed-source software. + + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for non-commercial purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + + + Usage information. + + class Node (your node in the tree) must have the following implemented: + + ****** Arity ****** + + int arity(void) const + + Note: the default constructor of a Node should provide a + Node with arity 0! + + ****** Evaluation ****** + + A parse_tree is evaluated through one of it's apply() members: + + 1) parse_tree::apply(void) + + is the simplest evaluation, it will call + + RetVal Node::operator()(subtree::const_iterator) + + 2) parse_tree::apply(It values) + + will call: + + RetVal Node::operator()(subtree<... , It values) + + where It is whatever type you desire (most of the time + this will be a vector containing the values of your + variables); + + 3) parse_tree::apply(It values, It2 moreValues) + + will call: + + RetVal Node::operator()(subtree<... , It values, It2 moreValues) + + although I do not see the immediate use of this, however... + + 4) parse_tree::apply(It values, It2 args, It3 adfs) + + that calls: + + RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) + + can be useful for implementing adfs. + + + In general it is a good idea to leave the specifics of the + arguments open so that different ways of evaluation remain + possible. Implement the simplest eval as: + + template + RetVal operator()(It begin) const + + ****** Internal Structure ****** + + A parse_tree has two template arguments: the Node and the ReturnValue + produced by evaluating the node. The structure of the tree is defined + through a subtree class that has the same two template arguments. + + The nodes are stored in a tree like : + + node4 + / \ + node3 node2 + / \ + node1 node0 + + where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) + + The nodes are subtrees, containing the structure of the tree, together + with its size and depth. They contain a Node, the user defined template + argument. To access these nodes from a subtree, use operator-> or operator*. + + The numbers behind the nodes define a reverse-polish or postfix + traversel through the tree. The parse_tree defines iterators + on the tree such that + + tree.begin() points at the subtree at node0 and + tree.back() returns the subtree at node4, the complete tree + + Likewise operator[] is defined on the tree, such that: + + tree[0] will return the subtree at node0, while + tree[2] will return the subtree at node2 + + Assigments of subtrees is protected so that the code: + + tree[2] = tree[0]; + + will not crash and result in a tree structured as: + + node4 + / \ + node3 node0 + + Note that the rank numbers no longer specify their place in the tree: + + tree[0] still points at node0, but + tree[1] now points to node3 and + tree[2] points at the root node4 + + Embedded iterators are implemented to iterate over nodes rather + than subtrees. So an easy way to copy your tree to a vector is: + + vector vec(tree.size()); + copy(tree.ebegin(), tree.eend(), vec.begin()); + + You can also copy it to an ostream_iterator with this + technique, given that your Node implements an appropriate + operator<<. Reinitializing a tree with the vector is also + simple: + + tree.clear(); + copy(vec.begin(), vec.end(), back_inserter(tree)); + + Note that the back_inserter must be used as there is no + resize member in the parse_tree. back_inserter will use + the push_back member from the parse_tree + +*/ + +#include +#include // for swap + +#ifdef _MSC_VER +#pragma warning(disable : 4786) // disable this nagging warning about the limitations of the mirkosoft debugger +#endif + +namespace gp_parse_tree +{ + +#include "node_pool.h" + + +template +inline void do_the_swap(T& a, T& b) +{ + T tmp = a; + a = b; + b = tmp; +} + +template class parse_tree +{ + public : + +class subtree +{ + +// a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) +#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) + Node_alloc node_allocator; + Tree_alloc tree_allocator; +#else + Standard_Node_alloc node_allocator; + Standard_alloc tree_allocator; +#endif + +public : + + typedef subtree* iterator; + typedef const subtree* const_iterator; + //typedef std::vector::const_reverse_iterator const_reverse_iterator; + + /* Constructors, assignments */ + + subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + {} + subtree(const subtree& s) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { copy(s); } + subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { copy(t); } + + template + subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { // initialize in prefix way for efficiency reasons + init(b, --e); + } + + virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } + + subtree& operator=(const subtree& s) + { + if (s.get_root() == get_root()) + { // from the same tree, maybe a child. Don't take any chances + subtree anotherS = s; + return copy(anotherS); + } + + return copy(s); + } + + subtree& operator=(const T& t) { return copy(t); } + + /* Access to the nodes */ + + T& operator*(void) { return *content; } + const T& operator*(void) const { return *content; } + T* operator->(void) { return content; } + const T* operator->(void) const { return content; } + + /* Equality, inequality check, Node needs to implement operator== */ + + bool operator==(const subtree& other) const + { + if (! (*content == *other.content)) + return false; + + for (int i = 0; i < arity(); i++) + { + if (!(args[i] == other.args[i])) + return false; + } + + return true; + } + + bool operator !=(const subtree& other) const + { + return !operator==(other); + } + + /* Arity */ + int arity(void) const { return content->arity(); } + + /* Evaluation with an increasing amount of user defined arguments */ + template + RetVal apply(RetVal v) const { return (*content)(v, begin()); } + + template + RetVal apply(RetVal v, It values) const { return (*content)(v, begin(), values); } + + template + RetVal apply(RetVal v, It values, It2 moreValues) const + { return (*content)(v, begin(), values, moreValues); } + + template + RetVal apply(RetVal v, It values, It2 moreValues, It3 evenMoreValues) const + { return (*content)(v, begin(), values, moreValues, evenMoreValues); } + + + /* Iterators */ + + iterator begin(void) { return args; } + const_iterator begin(void) const { return args; } + + iterator end(void) { return args + arity(); } + const_iterator end(void) const { return args + arity(); } + + subtree& operator[](int i) { return *(begin() + i); } + const subtree& operator[](int i) const { return *(begin() + i); } + + /* Some statistics */ + + size_t size(void) const { return _size; } + + size_t cumulative_size(void) const { return _cumulative_size; } + size_t depth(void) const { return _depth; } + + const subtree& select_cumulative(size_t which) const + { return imp_select_cumulative(which); } + + subtree& select_cumulative(size_t which) + { return const_cast(imp_select_cumulative(which)); } + + subtree& get_node(size_t which) + { return const_cast(imp_get_node(which));} + const subtree& get_node(size_t which) const + { return imp_get_node(which); } + + subtree* get_parent(void) { return parent; } + const subtree* get_parent(void) const { return parent; } + + void clear(void) + { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } + + void swap(subtree& y) + { + do_the_swap(content, y.content); + do_the_swap(args, y.args); + do_the_swap(parent, y.parent); + + do_the_swap(_cumulative_size, y._cumulative_size); + do_the_swap(_depth, y._depth); + do_the_swap(_size, y._size); + updateAfterInsert(); + } + + friend void swap(subtree& x, subtree& y) + { + x.swap(y); + } + +protected : + + virtual void updateAfterInsert(void) + { + _depth = 0; + _size = 1; + _cumulative_size = 0; + + for (iterator it = begin(); it != end(); ++it) + { + _size += it->size(); + _cumulative_size += it->_cumulative_size; + _depth = it->_depth > _depth? it->_depth: _depth; + } + _cumulative_size += _size; + _depth++; + + if (parent) + parent->updateAfterInsert(); + } + +private : + + const subtree& imp_select_cumulative(size_t which) const + { + if (which >= (_cumulative_size - size())) + return *this; + // else + + for (int i = arity() - 1; i >= 0; --i) + { + if (which < args[i]._cumulative_size) + return args[i].imp_select_cumulative(which); + which -= args[i]._cumulative_size; + } + + return *this; // error! + } + + const subtree& imp_get_node(size_t which) const + { + if (which == size() - 1) + return *this; + + for (int i = arity() - 1; i >= 0; --i) + { + unsigned c_size = args[i].size(); + if (which < c_size) + return args[i].imp_get_node(which); + which -= c_size; + } + + return *this; // error! + } + + const subtree* get_root(void) const + { + if (parent == 0) + return this; + // else + + return parent->get_root(); + } + + subtree& copy(const subtree& s) + { + int oldArity = arity(); + + disown(); + + int ar = s.arity(); + + if (ar != oldArity) + { + tree_allocator.deallocate(args, oldArity); + + args = tree_allocator.allocate(ar); + + //if (ar > 0) + // args = new subtree [ar]; + //else + // args = 0; + } + + switch(ar) + { + case 3 : args[2].copy(s.args[2]); // no break! + case 2 : args[1].copy(s.args[1]); + case 1 : args[0].copy(s.args[0]); break; + case 0 : break; + default : + { + for (int i = 0; i < ar; ++i) + { + args[i].copy(s.args[i]); + } + } + } + + *content = *s.content; + + adopt(); + updateAfterInsert(); + return *this; + } + + subtree& copy(const T& t) + { + int oldArity = arity(); + + if (content != &t) + *content = t; + else + oldArity = -1; + + int ar = arity(); + + if (ar != oldArity) + { + if (oldArity != -1) + tree_allocator.deallocate(args, oldArity); + + args = tree_allocator.allocate(ar); + + //if (ar > 0) + // args = new subtree [ar]; + //else + // args = 0; + } + + adopt(); + updateAfterInsert(); + return *this; + } + + void disown(void) + { + switch(arity()) + { + case 3 : args[2].parent = 0; // no break! + case 2 : args[1].parent = 0; + case 1 : args[0].parent = 0; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = 0; + } + } + } + + } + + void adopt(void) + { + switch(arity()) + { + case 3 : args[2].parent = this; // no break! + case 2 : args[1].parent = this; + case 1 : args[0].parent = this; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = this; + } + } + } + } + + template + void init(It b, It& last) + { + *this = *last; + +#ifndef NDEBUG + if (last == b && arity() > 0) + { + throw "subtree::init()"; + } +#endif + + for (int i = 0; i < arity(); ++i) + { + args[i].parent = 0; + args[i].init(b, --last); + args[i].parent = this; + } + + updateAfterInsert(); + } + + T* content; + subtree* args; + subtree* parent; + + size_t _cumulative_size; + size_t _depth; + size_t _size; +}; + +// Continuing with parse_tree + + typedef T value_type; + + /* Constructors and Assignments */ + + parse_tree(void) : _root(), pushed() {} + parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } + parse_tree(const subtree& sub) : _root(sub), pushed() { } + + template + parse_tree(It b, It e) : _root(b, e), pushed() {} + + virtual ~parse_tree(void) {} + + parse_tree& operator=(const parse_tree& org) { return copy(org); } + parse_tree& operator=(const subtree& sub) + { return copy(sub); } + + + /* Equality and inequality */ + + bool operator==(const parse_tree& other) const + { return _root == other._root; } + + bool operator !=(const parse_tree& other) const + { return !operator==(other); } + + /* Simple tree statistics */ + + size_t size(void) const { return _root.size(); } + size_t depth(void) const { return _root.depth(); } + void clear(void) { _root.clear(); pushed.resize(0); } + + /* Evaluation (application), with an increasing number of user defined arguments */ + + template + RetVal apply(RetVal v) const + { return _root.apply(v); } + + template + RetVal apply(RetVal v, It varValues) const + { return _root.apply(v, varValues); } + + template + RetVal apply(RetVal v, It varValues, It2 moreValues) const + { return _root.apply(v, varValues, moreValues); } + + template + RetVal apply(RetVal v, It varValues, It2 moreValues, It3 evenMoreValues) const + { return _root.apply(v, varValues, moreValues, evenMoreValues); } + + /* Customized Swap */ + void swap(parse_tree& other) + { + do_the_swap(pushed, other.pushed); + _root.swap(other._root); + } + + /* Definitions of the iterators */ + + class base_iterator + { + public : + + base_iterator() {} + base_iterator(subtree* n) { node = n; } + + base_iterator& operator=(const base_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_iterator& org) const + { return node == org.node; } + bool operator!=(const base_iterator& org) const + { return !operator==(org); } + + base_iterator operator+(size_t n) const + { + base_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + base_iterator& operator++(void) + { + subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + subtree::iterator it; + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + { + node = &(--it)->get_node(0); + } + + return *this; + } + + base_iterator operator++(int) + { + base_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + subtree* node; + }; + + class iterator : public base_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef subtree* pointer; + typedef subtree& reference; + + iterator() : base_iterator() {} + iterator(subtree* n): base_iterator(n) {} + iterator& operator=(const iterator& org) + { base_iterator::operator=(org); return *this; } + + subtree& operator*(void) { return *node; } + subtree* operator->(void) { return node; } + }; + + class embedded_iterator : public base_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef T* pointer; + typedef T& reference; + + embedded_iterator() : base_iterator() {} + embedded_iterator(subtree* n): base_iterator(n) {} + embedded_iterator& operator=(const embedded_iterator& org) + { base_iterator::operator=(org); return *this; } + + T& operator*(void) { return **node; } + T* operator->(void) { return &**node; } + }; + + class base_const_iterator + { + public : + base_const_iterator() {} + base_const_iterator(const subtree* n) { node = n; } + + base_const_iterator& operator=(const base_const_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_const_iterator& org) const + { return node == org.node; } + bool operator!=(const base_const_iterator& org) const + { return !operator==(org); } + + base_const_iterator& operator++(void) + { + const subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + subtree::const_iterator it; + + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + node = &(--it)->get_node(0); + return *this; + } + + base_const_iterator operator++(int) + { + base_const_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + + const subtree* node; + }; + + class const_iterator : public base_const_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef const subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const subtree* pointer; + typedef const subtree& reference; + + const_iterator() : base_const_iterator() {} + const_iterator(const subtree* n): base_const_iterator(n) {} + const_iterator& operator=(const const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + const subtree& operator*(void) { return *node; } + const subtree* operator->(void) { return node; } + }; + + class embedded_const_iterator : public base_const_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef const T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const T* pointer; + typedef const T& reference; + + embedded_const_iterator() : base_const_iterator() {} + embedded_const_iterator(const subtree* n): base_const_iterator(n) {} + embedded_const_iterator& operator=(const embedded_const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + embedded_const_iterator operator+(size_t n) const + { + embedded_const_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + const T& operator*(void) const { return **node; } + const T* operator->(void) const { return node->operator->(); } + }; + + /* Iterator access */ + + iterator begin(void) { return iterator(&operator[](0)); } + const_iterator begin(void) const { return const_iterator(&operator[](0)); } + iterator end(void) { return iterator(0); } + const_iterator end(void) const { return const_iterator(0);} + + embedded_iterator ebegin(void) { return embedded_iterator(&operator[](0)); } + embedded_const_iterator ebegin(void) const { return embedded_const_iterator(&operator[](0)); } + embedded_iterator eend(void) { return embedded_iterator(0); } + embedded_const_iterator eend(void) const { return embedded_const_iterator(0);} + + bool empty(void) const { return size() == 0; } + bool valid(void) const { return pushed.empty(); } + + /* push_back */ + + void push_back(const parse_tree& tree) + { + if (!empty()) + pushed.push_back(_root); + + _root = tree.back(); + } + + void push_back(const T& t) + { + if (!empty()) + pushed.push_back(_root); + + _root = t; + + for (subtree::iterator it = _root.begin(); it != _root.end(); it++) + { + *it = pushed.back(); + pushed.pop_back(); + } + + } + + /* Access to subtrees */ + + subtree& back(void) { return _root; } + const subtree& back(void) const { return _root; } + subtree& root(void) { return _root; } + const subtree& root(void) const { return _root; } + + subtree& front(void) { return _root[0]; } + const subtree& front(void) const { return _root[0]; } + + subtree& operator[](size_t i) + { return const_cast(_root.get_node(i)); } + const subtree& operator[](size_t i) const + { return _root.get_node(i); } + + subtree& get_cumulative(size_t i) + { return const_cast(_root.get_cumulative(i)); } + const subtree& get_cumulative(size_t i) const + { return get_cumulative(i); } + + private : + + parse_tree& copy(const parse_tree& org) + { + _root = org._root; + pushed = org.pushed; + + return *this; + } + + parse_tree& copy(const subtree& sub) + { _root = sub; pushed.resize(0); return *this; } + + subtree _root; + std::vector pushed; +}; // end class parse_tree + + +} // end namespace gp_parse_tree + +namespace std +{ // for use with stlport on MSVC + +template inline +std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) +{ + return 0; +} + +template inline +std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) +{ + return 0; +} + +// Put customized swaps also in std... + +template inline +void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) +{ + a.swap(b); +} + +template inline +void iter_swap(vector >::iterator a, vector > b) +{ + a->swap(*b); +} + + +} // namespace std + + +#endif diff --git a/eo/src/compatibility.h b/eo/src/compatibility.h index 7a4f53640..1297fc9ec 100644 --- a/eo/src/compatibility.h +++ b/eo/src/compatibility.h @@ -1,76 +1,76 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - compatibility.h - File to store some compiler specific stuff in. Currently handles, or - least tries to handle the min() max() problems when using MSVC - - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef COMPAT_H -#define COMPAT_H - -#include -#include - -#ifdef _1__GNUC__ -// Specifics for GNUC -#define NO_GOOD_ISTREAM_ITERATORS -#endif - -#ifdef _MSC_VER -/* -Maarten: added this code here because Mirkosoft has the -nasty habit of #define min and max in stdlib.h (and windows.h) -I'm trying to undo this horrible macro magic (microsoft yet macrohard) -here. Sure hope it works -*/ - -#include - -#ifdef min -#undef min -#undef max // as they come in pairs -#endif - -// add min and max to std... -namespace std -{ - template T min(const T& a, const T& b) - { - if(a < b) - return a; - // else - return b; - } - - template T max(const T& a, const T& b) - { - if(a > b) - return a; - // else - return b; - } -} - -#endif // _MSC_VER - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + compatibility.h + File to store some compiler specific stuff in. Currently handles, or + least tries to handle the min() max() problems when using MSVC + + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef COMPAT_H +#define COMPAT_H + +#include +#include + +#ifdef _1__GNUC__ +// Specifics for GNUC +#define NO_GOOD_ISTREAM_ITERATORS +#endif + +#ifdef _MSC_VER +/* +Maarten: added this code here because Mirkosoft has the +nasty habit of #define min and max in stdlib.h (and windows.h) +I'm trying to undo this horrible macro magic (microsoft yet macrohard) +here. Sure hope it works +*/ + +#include + +#ifdef min +#undef min +#undef max // as they come in pairs +#endif + +// add min and max to std... +namespace std +{ + template T min(const T& a, const T& b) + { + if(a < b) + return a; + // else + return b; + } + + template T max(const T& a, const T& b) + { + if(a > b) + return a; + // else + return b; + } +} + +#endif // _MSC_VER + +#endif diff --git a/eo/src/eoAged.h b/eo/src/eoAged.h index 2e37c1a1f..3211791df 100644 --- a/eo/src/eoAged.h +++ b/eo/src/eoAged.h @@ -1,108 +1,109 @@ -// eoAged.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAge.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOAGED_H -#define EOAGED_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoAge -//----------------------------------------------------------------------------- - -/** eoAge is a template class that adds an age to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor -and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, -printOn, readFrom. -@see eoObject -*/ -template -class eoAged: public Object -{ - public: - /// Main ctor from an already built Object. - eoAged( const Object& _o): Object( _o ), age(0) {}; - - /// Copy constructor. - eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; - - /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoAged() {}; - - - ///returns the age of the object - unsigned long Age() const {return age;} - - /// Increments age - const eoAged& operator ++ () { age++; return *this;} - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ -//@{ - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return string("eoAged")+Object::className(); }; - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) { - Object::readFrom( _is ); - _is >> age; - } - - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const{ - Object::printOn( _os ); - _os << age; - } -//@} - - private: - - /** Default Constructor. \\ - It´s private so that it is not used anywhere; the right way of using this object - is to create an Object and passing it to an aged by means of the copy ctor; that way - it´s turned into an Aged object*/ - eoAged(): Object(), age(0) {}; - - unsigned long age; -}; - -#endif EOAGE_H +// eoAged.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAge.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOAGED_H +#define EOAGED_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoAge +//----------------------------------------------------------------------------- + +/** eoAge is a template class that adds an age to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +printOn, readFrom. +@see eoObject +*/ +template +class eoAged: public Object +{ + public: + /// Main ctor from an already built Object. + eoAged( const Object& _o): Object( _o ), age(0) {}; + + /// Copy constructor. + eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoAged() {}; + + + ///returns the age of the object + unsigned long Age() const {return age;} + + /// Increments age + const eoAged& operator ++ () { age++; return *this;} + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ +//@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("eoAged")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + Object::readFrom( _is ); + _is >> age; + } + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const{ + Object::printOn( _os ); + _os << age; + } +//@} + + private: + + /** Default Constructor. \\ + It´s private so that it is not used anywhere; the right way of using this object + is to create an Object and passing it to an aged by means of the copy ctor; that way + it´s turned into an Aged object*/ + eoAged(): Object(), age(0) {}; + + unsigned long age; +}; + +#endif EOAGE_H + diff --git a/eo/src/eoAtomCreep.h b/eo/src/eoAtomCreep.h index 2fc7d676c..b31c56baa 100644 --- a/eo/src/eoAtomCreep.h +++ b/eo/src/eoAtomCreep.h @@ -1,65 +1,66 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomCreep.h -// Increments or decrements by one a single element -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMCREEP_H -#define _EOATOMCREEP_H - -#include -#include - -/** With uniform probability, decrements or increments by one the value. - The value type must admit post increment and decrement. -*/ -template -class eoAtomCreep: public eoAtomMutator { -public: - - /// - eoAtomCreep() {}; - - /// - virtual ~eoAtomCreep() {}; - - /// - virtual void operator()( T& _val ) const { - if ( rng.flip( 0.5 ) ) { - _val++; - } else { - _val--; - } - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoAtomCreep";}; - //@} - -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomCreep.h +// Increments or decrements by one a single element +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMCREEP_H +#define _EOATOMCREEP_H + +#include +#include + +/** With uniform probability, decrements or increments by one the value. + The value type must admit post increment and decrement. +*/ +template +class eoAtomCreep: public eoAtomMutator { +public: + + /// + eoAtomCreep() {}; + + /// + virtual ~eoAtomCreep() {}; + + /// + virtual void operator()( T& _val ) const { + if ( rng.flip( 0.5 ) ) { + _val++; + } else { + _val--; + } + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoAtomCreep";}; + //@} + +}; + + +#endif + diff --git a/eo/src/eoAtomMutation.h b/eo/src/eoAtomMutation.h index c4ff91afb..977f6b50a 100644 --- a/eo/src/eoAtomMutation.h +++ b/eo/src/eoAtomMutation.h @@ -1,95 +1,96 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomMutation.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMMUTATION_H -#define _EOATOMMUTATION_H - -// STL includes -#include - -// EO includes -#include -#include -#include -#include - -/** Atomic mutation of an EO. Acts on containers, and applies a mutation - operator to each element of the container with some probability. EOT must - be a container of any tipe -*/ -template -class eoAtomMutation: public eoMonOp { -public: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// - eoAtomMutation(const eoAtomMutator& _atomMut, const double _rate=0.0) - : eoMonOp< EOT >(), rate(_rate), atomMutator( _atomMut ) {}; - - /// - virtual ~eoAtomMutation() {}; - - /// - virtual void operator()( EOT& _eo ) const { - typename EOT::iterator i; - for ( i = _eo.begin(); i != _eo.end(); i ++ ) - if ( rng.flip( rate ) ) { - atomMutator( *i ); - } - } - - /** To print me on a stream. - @param os The ostream. - */ - void printOn(ostream& os) const { - os << rate ; - } - - /** To read me from a stream. - @param is The istream */ - void readFrom(istream& is) { - is >> rate ; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMutation";}; - //@} - -private: - - double rate; - const eoAtomMutator& atomMutator; -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomMutation.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMMUTATION_H +#define _EOATOMMUTATION_H + +// STL includes +#include + +// EO includes +#include +#include +#include +#include + +/** Atomic mutation of an EO. Acts on containers, and applies a mutation + operator to each element of the container with some probability. EOT must + be a container of any tipe +*/ +template +class eoAtomMutation: public eoMonOp { +public: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// + eoAtomMutation(const eoAtomMutator& _atomMut, const double _rate=0.0) + : eoMonOp< EOT >(), rate(_rate), atomMutator( _atomMut ) {}; + + /// + virtual ~eoAtomMutation() {}; + + /// + virtual void operator()( EOT& _eo ) const { + typename EOT::iterator i; + for ( i = _eo.begin(); i != _eo.end(); i ++ ) + if ( rng.flip( rate ) ) { + atomMutator( *i ); + } + } + + /** To print me on a stream. + @param os The ostream. + */ + void printOn(ostream& os) const { + os << rate ; + } + + /** To read me from a stream. + @param is The istream */ + void readFrom(istream& is) { + is >> rate ; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMutation";}; + //@} + +private: + + double rate; + const eoAtomMutator& atomMutator; +}; + + +#endif + diff --git a/eo/src/eoAtomMutator.h b/eo/src/eoAtomMutator.h index 97510c583..7303f16db 100644 --- a/eo/src/eoAtomMutator.h +++ b/eo/src/eoAtomMutator.h @@ -1,61 +1,62 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomMutator.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMMUTATOR_H -#define _EOATOMMUTATOR_H - -/** Abstract base class for functors that modify a single element in an EO - that is composed of several atomic components. An atom would, for instance, flip - a bit, or change a real number, or things like that. -*/ -template -class eoAtomMutator: public eoPrintable { -public: - - /// - eoAtomMutator() {}; - - /// - virtual ~eoAtomMutator() {}; - - /// - virtual void operator()( T& _val ) const = 0; - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - /// - virtual string className() const {return "eoAtomMutator";}; - - /// - void printOn(ostream& _os) const { _os << className() << endl; }; - - //@} - -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomMutator.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMMUTATOR_H +#define _EOATOMMUTATOR_H + +/** Abstract base class for functors that modify a single element in an EO + that is composed of several atomic components. An atom would, for instance, flip + a bit, or change a real number, or things like that. +*/ +template +class eoAtomMutator: public eoPrintable { +public: + + /// + eoAtomMutator() {}; + + /// + virtual ~eoAtomMutator() {}; + + /// + virtual void operator()( T& _val ) const = 0; + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + /// + virtual string className() const {return "eoAtomMutator";}; + + /// + void printOn(ostream& _os) const { _os << className() << endl; }; + + //@} + +}; + + +#endif + diff --git a/eo/src/eoBackInserter.h b/eo/src/eoBackInserter.h index c7d1de614..5e9faef70 100644 --- a/eo/src/eoBackInserter.h +++ b/eo/src/eoBackInserter.h @@ -1,54 +1,54 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoInserter.h - Abstract population insertion operator, which is used by the eoGeneralOps - to insert the results in the (intermediate) population. This file also - contains the definitions of a derived classes that implements a back inserter, - probably the only efficient inserter for populations of type vector. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoBackInserter_h -#define eoBackInserter_h - -#include "eoInserter.h" - -/** - * eoBackInserter: Interface class that enables an operator to insert - new individuals at the back of the new population. -*/ -template -class eoBackInserter : public eoPopInserter -{ - public : - - eoBackInserter(void) : eoPopInserter() {} - - void insert(const EOT& _eot) - { - pop().push_back(_eot); - } - - string className(void) const { return "eoBackInserter"; } - -}; - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoInserter.h + Abstract population insertion operator, which is used by the eoGeneralOps + to insert the results in the (intermediate) population. This file also + contains the definitions of a derived classes that implements a back inserter, + probably the only efficient inserter for populations of type vector. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoBackInserter_h +#define eoBackInserter_h + +#include "eoInserter.h" + +/** + * eoBackInserter: Interface class that enables an operator to insert + new individuals at the back of the new population. +*/ +template +class eoBackInserter : public eoPopInserter +{ + public : + + eoBackInserter(void) : eoPopInserter() {} + + void insert(const EOT& _eot) + { + pop().push_back(_eot); + } + + string className(void) const { return "eoBackInserter"; } + +}; + +#endif diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index ca1ee7344..78337fbbe 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -1,324 +1,325 @@ -//----------------------------------------------------------------------------- -// eoBitOp.h -//----------------------------------------------------------------------------- - -#ifndef eoBitOp_h -#define eoBitOp_h - -//----------------------------------------------------------------------------- - -#include // swap_ranges -#include // eoUniform -#include // eoBin -#include // eoMonOp - - -/** @name BitWise Genetic operators - -Even as these operators might seem general, they are particular versions of genetic -operators useful only for binary operators. As any set of genetic operators, it must -have a factory that knows how to build them from a description -@author GeNeura Team -@version 0.1 -@see eoBin -@see eoBitOpFactory -*/ - -//@{ - -/** eoBinRandom --> mofify a chromosome in a random way */ - -template class eoBinRandom: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinRandom"; } - - /** - * Randomizes a cromosome. - * @param chrom The cromosome to be randomize. - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0.0, 1.0); - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; - } -}; - - -/** eoBinBitFlip --> chages a bit */ - -template class eoBinBitFlip: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinBitFlip"; } - - /** - * Change one bit. - * @param chrom The cromosome which one bit is going to be changed. - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size()); - unsigned i = uniform(); - chrom[i] = (chrom[i]) ? false : true; - } -}; - - -/** eoBinMutation --> classical mutation */ - -template class eoBinMutation: public eoMonOp -{ - public: - /** - * (Default) Constructor. - * @param _rate Rate of mutation. - */ - eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} - - /// The class name. - string className() const { return "eoBinMutation"; } - - /** - * Mutate a chromosome. - * @param chrom The chromosome to be mutated. - */ - void operator()(Chrom& chrom) const - { - for (unsigned i = 0; i < chrom.size(); i++) - if (uniform() < rate) - chrom[i] = !chrom[i]; - } - - private: - double rate; - mutable eoUniform uniform; -}; - - -/** eoBinInversion: inverts the bits of the chromosome between an interval */ - -template class eoBinInversion: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinInversion"; } - - /** - * Inverts a range of bits in a binary chromosome. - * @param chrom The chromosome whos bits are going to be inverted (a range). - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size() + 1); - - unsigned u1 = uniform(), u2; - do u2 = uniform(); while (u1 == u2); - unsigned r1 = min(u1, u2), r2 = max(u1, u2); - - reverse(chrom.begin() + r1, chrom.begin() + r2); - } -}; - - -/** eoBinNext --> next binary value */ - -template class eoBinNext: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinNext"; } - - /** - * Change the bit string x to be x+1. - * @param chrom The chromosome to be added one. - */ - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - continue; - } - else - { - chrom[i] = 1; - break; - } - } -}; - - -/** eoBinPrev --> previos binary value */ - -template class eoBinPrev: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinPrev"; } - - /** - * Change the bit string x to be x-1. - * @param chrom The chromosome to be substracted one. - */ - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - break; - } - else - { - chrom[i] = 1; - continue; - } - } -}; - - -/** eoBinCrossover --> classic crossover */ - -template class eoBinCrossover: public eoQuadraticOp -{ - public: - /// The class name. - string className() const { return "eoBinCrossover"; } - - /** - * 2-point crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - eoUniform uniform(1, min(chrom1.size(), chrom2.size())); - swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); - } -}; - - -/** eoBinNxOver --> n-point crossover */ - -template class eoBinNxOver: public eoQuadraticOp -{ - public: - /// (Defualt) Constructor. - eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) - { - if (num_points < 1) - runtime_error("NxOver --> invalid number of points"); - } - - /// The class name. - string className() const { return "eoBinNxOver"; } - - /** - * n-point crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_size = min(chrom1.size(), chrom2.size()); - unsigned max_points = min(max_size - 1, num_points); - - vector points(max_size, false); - eoUniform uniform(1, max_size); - - // select ranges of bits to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - max_points--; - } - } while (max_points); - - - // swap bits between chromosomes - bool change = false; - for (unsigned bit = 1; bit < points.size(); bit++) - { - if (points[bit]) - change = !change; - - if (change) - swap(chrom1[bit], chrom2[bit]); - } - } - - private: - unsigned num_points; -}; - - -/** eoBinGxOver --> gene crossover */ - -template class eoBinGxOver: public eoQuadraticOp -{ - public: - /// Constructor. - eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): - gene_size(_gene_size), num_points(_num_points) - { - if (gene_size < 1) - runtime_error("GxOver --> invalid gene size"); - if (num_points < 1) - runtime_error("GxOver --> invalid number of points"); - } - - /// The class name - string className() const { return "eoBinGxOver"; } - - /** - * Gene crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; - unsigned cut_genes = min(max_genes, num_points); - - vector points(max_genes, false); - eoUniform uniform(0, max_genes); - - // selects genes to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - cut_genes--; - } - } while (cut_genes); - - // swaps genes - for (unsigned i = 0; i < points.size(); i++) - if (points[i]) - swap_ranges(chrom1.begin() + i * gene_size, - chrom1.begin() + i * gene_size + gene_size, - chrom2.begin() + i * gene_size); - } - - private: - unsigned gene_size; - unsigned num_points; -}; - - - -//----------------------------------------------------------------------------- -//@} -#endif eoBitOp_h +//----------------------------------------------------------------------------- +// eoBitOp.h +//----------------------------------------------------------------------------- + +#ifndef eoBitOp_h +#define eoBitOp_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include // eoUniform +#include // eoBin +#include // eoMonOp + + +/** @name BitWise Genetic operators + +Even as these operators might seem general, they are particular versions of genetic +operators useful only for binary operators. As any set of genetic operators, it must +have a factory that knows how to build them from a description +@author GeNeura Team +@version 0.1 +@see eoBin +@see eoBitOpFactory +*/ + +//@{ + +/** eoBinRandom --> mofify a chromosome in a random way */ + +template class eoBinRandom: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinRandom"; } + + /** + * Randomizes a cromosome. + * @param chrom The cromosome to be randomize. + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; + } +}; + + +/** eoBinBitFlip --> chages a bit */ + +template class eoBinBitFlip: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinBitFlip"; } + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size()); + unsigned i = uniform(); + chrom[i] = (chrom[i]) ? false : true; + } +}; + + +/** eoBinMutation --> classical mutation */ + +template class eoBinMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _rate Rate of mutation. + */ + eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} + + /// The class name. + string className() const { return "eoBinMutation"; } + + /** + * Mutate a chromosome. + * @param chrom The chromosome to be mutated. + */ + void operator()(Chrom& chrom) const + { + for (unsigned i = 0; i < chrom.size(); i++) + if (uniform() < rate) + chrom[i] = !chrom[i]; + } + + private: + double rate; + mutable eoUniform uniform; +}; + + +/** eoBinInversion: inverts the bits of the chromosome between an interval */ + +template class eoBinInversion: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinInversion"; } + + /** + * Inverts a range of bits in a binary chromosome. + * @param chrom The chromosome whos bits are going to be inverted (a range). + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size() + 1); + + unsigned u1 = uniform(), u2; + do u2 = uniform(); while (u1 == u2); + unsigned r1 = min(u1, u2), r2 = max(u1, u2); + + reverse(chrom.begin() + r1, chrom.begin() + r2); + } +}; + + +/** eoBinNext --> next binary value */ + +template class eoBinNext: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinNext"; } + + /** + * Change the bit string x to be x+1. + * @param chrom The chromosome to be added one. + */ + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } + } +}; + + +/** eoBinPrev --> previos binary value */ + +template class eoBinPrev: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinPrev"; } + + /** + * Change the bit string x to be x-1. + * @param chrom The chromosome to be substracted one. + */ + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } + } +}; + + +/** eoBinCrossover --> classic crossover */ + +template class eoBinCrossover: public eoQuadraticOp +{ + public: + /// The class name. + string className() const { return "eoBinCrossover"; } + + /** + * 2-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + eoUniform uniform(1, min(chrom1.size(), chrom2.size())); + swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); + } +}; + + +/** eoBinNxOver --> n-point crossover */ + +template class eoBinNxOver: public eoQuadraticOp +{ + public: + /// (Defualt) Constructor. + eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) + { + if (num_points < 1) + runtime_error("NxOver --> invalid number of points"); + } + + /// The class name. + string className() const { return "eoBinNxOver"; } + + /** + * n-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_size = min(chrom1.size(), chrom2.size()); + unsigned max_points = min(max_size - 1, num_points); + + vector points(max_size, false); + eoUniform uniform(1, max_size); + + // select ranges of bits to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + max_points--; + } + } while (max_points); + + + // swap bits between chromosomes + bool change = false; + for (unsigned bit = 1; bit < points.size(); bit++) + { + if (points[bit]) + change = !change; + + if (change) + swap(chrom1[bit], chrom2[bit]); + } + } + + private: + unsigned num_points; +}; + + +/** eoBinGxOver --> gene crossover */ + +template class eoBinGxOver: public eoQuadraticOp +{ + public: + /// Constructor. + eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + gene_size(_gene_size), num_points(_num_points) + { + if (gene_size < 1) + runtime_error("GxOver --> invalid gene size"); + if (num_points < 1) + runtime_error("GxOver --> invalid number of points"); + } + + /// The class name + string className() const { return "eoBinGxOver"; } + + /** + * Gene crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = min(max_genes, num_points); + + vector points(max_genes, false); + eoUniform uniform(0, max_genes); + + // selects genes to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } + } while (cut_genes); + + // swaps genes + for (unsigned i = 0; i < points.size(); i++) + if (points[i]) + swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); + } + + private: + unsigned gene_size; + unsigned num_points; +}; + + + +//----------------------------------------------------------------------------- +//@} +#endif eoBitOp_h + diff --git a/eo/src/eoBitOpFactory.h b/eo/src/eoBitOpFactory.h index b44a55067..8d70c7e4e 100644 --- a/eo/src/eoBitOpFactory.h +++ b/eo/src/eoBitOpFactory.h @@ -1,119 +1,120 @@ -// eoBitOpFactory.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOpFactory.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOBITOPFACTORY_H -#define _EOBITOPFACTORY_H - -#include -#include - -//----------------------------------------------------------------------------- - -/** EO Factory. An instance of the factory class to create operators that act -on bitstring chromosomes. Only those chromosomes can instantiate the operators -that are created here -@see eoSelect*/ -template< class EOT> -class eoBitOpFactory: public eoOpFactory { - -public: - - /// @name ctors and dtors - //{@ - /// constructor - eoBitOpFactory( ) {}; - - /// destructor - virtual ~eoBitOpFactory() {}; - //@} - - /** Another factory method: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - If there are problems, an exception is raised; it should be caught at the - upper level, because it might be something for that level\\ - At the same time, it catches exceptions thrown at a lower level, which will - indicate that whatever is in the stream is for this method to process - @param _is an stream from where a single line will be read - @throw runtime_exception if the object type is not known - */ - virtual eoOp* make(istream& _is) { - eoOp * opPtr = NULL; - try { - opPtr = eoOpFactory::make( _is ); - } catch ( const string& objectTypeStr ) { - if ( objectTypeStr == "eoBinRandom") { - opPtr = new eoBinRandom(); - } - if ( objectTypeStr == "eoBinBitFlip" ) { - opPtr = new eoBinBitFlip( ); - } - if ( objectTypeStr == "eoBinMutation" ) { - float rate; - _is >> rate; - opPtr = new eoBinMutation( rate ); - } - if ( objectTypeStr == "eoBinInversion" ) { - opPtr = new eoBinInversion( ); - } - if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBinNext( ); - } - if ( objectTypeStr == "eoBinPrev" ) { - opPtr = new eoBinPrev( ); - } - if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBinNext( ); - } - if ( objectTypeStr == "eoBinCrossover" ) { - opPtr = new eoBinCrossover( ); - } - if ( objectTypeStr == "eoBinNxOver" ) { - unsigned nPoints; - _is >> nPoints; - opPtr = new eoBinNxOver( nPoints ); - } - if ( objectTypeStr == "eoBinGxOver" ) { - unsigned geneSize, nPoints; - _is >> geneSize >> nPoints; - opPtr = new eoBinGxOver( geneSize, nPoints ); - } - if ( objectTypeStr == "eoBinUxOver" ) { - float rate; - _is >> rate; - opPtr = new eoBinUxOver( rate ); - } - if ( !opPtr ) { // to be caught by the upper level - throw objectTypeStr; - } - } - return opPtr; - }; - - -}; - - -#endif _EOBITOPFACTORY_H +// eoBitOpFactory.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpFactory.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOBITOPFACTORY_H +#define _EOBITOPFACTORY_H + +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. An instance of the factory class to create operators that act +on bitstring chromosomes. Only those chromosomes can instantiate the operators +that are created here +@see eoSelect*/ +template< class EOT> +class eoBitOpFactory: public eoOpFactory { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoBitOpFactory( ) {}; + + /// destructor + virtual ~eoBitOpFactory() {}; + //@} + + /** Another factory method: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + If there are problems, an exception is raised; it should be caught at the + upper level, because it might be something for that level\\ + At the same time, it catches exceptions thrown at a lower level, which will + indicate that whatever is in the stream is for this method to process + @param _is an stream from where a single line will be read + @throw runtime_exception if the object type is not known + */ + virtual eoOp* make(istream& _is) { + eoOp * opPtr = NULL; + try { + opPtr = eoOpFactory::make( _is ); + } catch ( const string& objectTypeStr ) { + if ( objectTypeStr == "eoBinRandom") { + opPtr = new eoBinRandom(); + } + if ( objectTypeStr == "eoBinBitFlip" ) { + opPtr = new eoBinBitFlip( ); + } + if ( objectTypeStr == "eoBinMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBinMutation( rate ); + } + if ( objectTypeStr == "eoBinInversion" ) { + opPtr = new eoBinInversion( ); + } + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBinNext( ); + } + if ( objectTypeStr == "eoBinPrev" ) { + opPtr = new eoBinPrev( ); + } + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBinNext( ); + } + if ( objectTypeStr == "eoBinCrossover" ) { + opPtr = new eoBinCrossover( ); + } + if ( objectTypeStr == "eoBinNxOver" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoBinNxOver( nPoints ); + } + if ( objectTypeStr == "eoBinGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBinGxOver( geneSize, nPoints ); + } + if ( objectTypeStr == "eoBinUxOver" ) { + float rate; + _is >> rate; + opPtr = new eoBinUxOver( rate ); + } + if ( !opPtr ) { // to be caught by the upper level + throw objectTypeStr; + } + } + return opPtr; + }; + + +}; + + +#endif _EOBITOPFACTORY_H + diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index e94e815e9..24fa83e53 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -1,113 +1,114 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoBreeder.h -// Takes two populations and mixes them -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoBreeder_h -#define eoBreeder_h - -//----------------------------------------------------------------------------- - -#include // vector -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector - -#include "eoRandomIndiSelector.h" -#include "eoBackInserter.h" - -using namespace std; - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -template class eoBreeder: public eoMonPopOp -{ - public: - /// Default constructor. - eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} - - /// Destructor. - virtual ~eoBreeder() {} - - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - size_t orgsize = pop.size(); - - for (unsigned i = 0; i < pop.size(); i++) { - eoOp* op = opSel.Op(); - switch (op->getType()) { - case eoOp::unary: - { - eoMonOp* monop = static_cast* >(op); - (*monop)( pop[i] ); - break; - } - case eoOp::binary: - { - eoBinOp* binop = static_cast* >(op); - eoUniform u(0, pop.size() ); - (*binop)(pop[i], pop[ u() ] ); - break; - } - case eoOp::quadratic: - { - eoQuadraticOp* Qop = static_cast* >(op); - - eoUniform u(0, pop.size() ); - (*Qop)(pop[i], pop[ u() ] ); - break; - } - case eoOp::general : - { - eoGeneralOp* Gop = static_cast* >(op); - - eoRandomIndiSelector selector; - eoBackInserter inserter; - - (*Gop)(selector(pop, orgsize, i), inserter(pop)); - break; - } - } - } - }; - - /// The class name. - string classname() const { return "eoBreeder"; } - - private: - eoOpSelector& opSel; - -}; - -//----------------------------------------------------------------------------- - -#endif eoBreeder_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBreeder.h +// Takes two populations and mixes them +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoBreeder_h +#define eoBreeder_h + +//----------------------------------------------------------------------------- + +#include // vector +#include // eoUniform +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoTransform +#include // eoOpSelector + +#include "eoRandomIndiSelector.h" +#include "eoBackInserter.h" + +using namespace std; + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +template class eoBreeder: public eoMonPopOp +{ + public: + /// Default constructor. + eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} + + /// Destructor. + virtual ~eoBreeder() {} + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + size_t orgsize = pop.size(); + + for (unsigned i = 0; i < pop.size(); i++) { + eoOp* op = opSel.Op(); + switch (op->getType()) { + case eoOp::unary: + { + eoMonOp* monop = static_cast* >(op); + (*monop)( pop[i] ); + break; + } + case eoOp::binary: + { + eoBinOp* binop = static_cast* >(op); + eoUniform u(0, pop.size() ); + (*binop)(pop[i], pop[ u() ] ); + break; + } + case eoOp::quadratic: + { + eoQuadraticOp* Qop = static_cast* >(op); + + eoUniform u(0, pop.size() ); + (*Qop)(pop[i], pop[ u() ] ); + break; + } + case eoOp::general : + { + eoGeneralOp* Gop = static_cast* >(op); + + eoRandomIndiSelector selector; + eoBackInserter inserter; + + (*Gop)(selector(pop, orgsize, i), inserter(pop)); + break; + } + } + } + }; + + /// The class name. + string classname() const { return "eoBreeder"; } + + private: + eoOpSelector& opSel; + +}; + +//----------------------------------------------------------------------------- + +#endif eoBreeder_h + diff --git a/eo/src/eoData.h b/eo/src/eoData.h index f760ea369..1ba358605 100644 --- a/eo/src/eoData.h +++ b/eo/src/eoData.h @@ -1,65 +1,64 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoData.h +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoData.h Some numeric limits and types and things like that; with #ifdefs to keep compatibility - (c) GeNeura Team & Maarten Keijzer, 1998, 1999, 2000 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef EODATA_H -#define EODATA_H - -//----------------------------------------------------------------------------- - -#include // vector -#include // set -#include // string - -using namespace std; - - -#ifdef _MSC_VER - #include // MAXDOUBLE - #define MAXFLOAT numeric_limits::max() - #define MINFLOAT numeric_limits::min() - #define MAXDOUBLE numeric_limits::max() - #define MAXINT numeric_limits::max() -#else - #include + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef EODATA_H +#define EODATA_H + +//----------------------------------------------------------------------------- + +#include // vector +#include // set +#include // string + +using namespace std; + + +#ifdef _MSC_VER + #include // MAXDOUBLE + #define MAXFLOAT numeric_limits::max() + #define MINFLOAT numeric_limits::min() + #define MAXDOUBLE numeric_limits::max() + #define MAXINT numeric_limits::max() +#else + #include #include #ifndef _WIN32 // should be the define for UN*X flavours: _POSIX?? - #include + #include #endif - #ifndef MAXFLOAT - #define MAXFLOAT (float)1e127 - #define MAXDOUBLE (double)1.79769313486231570e+308 - #define MAXINT 2147483647 - #endif -#endif - -#ifndef _MSC_VER -#include -#define _isnan isnan -#endif - -//----------------------------------------------------------------------------- - -#endif EODATA_H + #ifndef MAXFLOAT + #define MAXFLOAT (float)1e127 + #define MAXDOUBLE (double)1.79769313486231570e+308 + #define MAXINT 2147483647 + #endif +#endif + +#ifndef _MSC_VER +#include +#define _isnan isnan +#endif + +//----------------------------------------------------------------------------- + +#endif EODATA_H + diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h index b4a5bec98..577f0c3bb 100644 --- a/eo/src/eoDetTournament.h +++ b/eo/src/eoDetTournament.h @@ -1,70 +1,71 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoDetTournament.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoDetTournament_h -#define eoDetTournament_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT -#include "selectors.h" - -//----------------------------------------------------------------------------- -/** eoDetTournament: a selection method that selects ONE individual by - deterministic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - -template class eoDetTournament: public eoSelectOne -{ - public: - /// (Default) Constructor. - eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { - // consistency check - if (Tsize < 2) { - cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; - Tsize = 2; - } - } - - virtual const EOT& operator()(const eoPop& pop) - { - return deterministic_tournament(pop, Tsize)(); - } - - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoDetTournament";}; - - private: - unsigned Tsize; -}; - -//----------------------------------------------------------------------------- - -#endif eoDetTournament_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDetTournament.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoDetTournament_h +#define eoDetTournament_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include "selectors.h" + +//----------------------------------------------------------------------------- +/** eoDetTournament: a selection method that selects ONE individual by + deterministic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoDetTournament: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { + // consistency check + if (Tsize < 2) { + cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; + Tsize = 2; + } + } + + virtual const EOT& operator()(const eoPop& pop) + { + return deterministic_tournament(pop, Tsize)(); + } + + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoDetTournament";}; + + private: + unsigned Tsize; +}; + +//----------------------------------------------------------------------------- + +#endif eoDetTournament_h + diff --git a/eo/src/eoDetTournamentIndiSelector.h b/eo/src/eoDetTournamentIndiSelector.h index 45ca21324..d5c35df47 100644 --- a/eo/src/eoDetTournamentIndiSelector.h +++ b/eo/src/eoDetTournamentIndiSelector.h @@ -1,57 +1,57 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoDetTournamentIndiSelector.h - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoDetTournamentIndiSelector_h -#define eoDetTournamentIndiSelector_h - -#include "eoIndiSelector.h" -#include "selectors.h" - - -/** - * eoDetTournamentIndiSelector: selects children through a deterministic_tournament -*/ -template -class eoDetTournamentIndiSelector : public eoPopIndiSelector -{ - public : - - eoDetTournamentIndiSelector(int _tournamentSize) - : eoPopIndiSelector(), - tournamentSize(_tournamentSize) - {} - - virtual ~eoDetTournamentIndiSelector(void) {} - - const EOT& do_select(void) - { - return *deterministic_tournament(begin(), end(), tournamentSize); - } - - private : - - int tournamentSize; -}; - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDetTournamentIndiSelector.h + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoDetTournamentIndiSelector_h +#define eoDetTournamentIndiSelector_h + +#include "eoIndiSelector.h" +#include "selectors.h" + + +/** + * eoDetTournamentIndiSelector: selects children through a deterministic_tournament +*/ +template +class eoDetTournamentIndiSelector : public eoPopIndiSelector +{ + public : + + eoDetTournamentIndiSelector(int _tournamentSize) + : eoPopIndiSelector(), + tournamentSize(_tournamentSize) + {} + + virtual ~eoDetTournamentIndiSelector(void) {} + + const EOT& do_select(void) + { + return *deterministic_tournament(begin(), end(), tournamentSize); + } + + private : + + int tournamentSize; +}; + +#endif diff --git a/eo/src/eoDetTournamentInserter.h b/eo/src/eoDetTournamentInserter.h index 21e77ae3a..bdc1dd0a7 100644 --- a/eo/src/eoDetTournamentInserter.h +++ b/eo/src/eoDetTournamentInserter.h @@ -1,69 +1,69 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoDetTournamentInserter.h - Concrete steady state inserter. It is initialized with a population and - inserts individuals in the population based on an inverse deterministic - tournament - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoDetTournamentInserter_h -#define eoDetTournamentInserter_h - - -#include "eoSteadyStateInserter.h" -#include "selectors.h" - -/** - * eoDetTournamentInserter: Uses an inverse deterministic tournament to figure - * out who gets overridden by the new individual. It resets the fitness of the - * individual. -*/ -template -class eoDetTournamentInserter : public eoSteadyStateInserter -{ - public : - - eoDetTournamentInserter(eoEvalFunc& _eval, unsigned _t_size) : t_size(_t_size), eoSteadyStateInserter(_eval) - { - if (t_size < 2) - { // warning, error? - t_size = 2; - } - } - - void insert(const EOT& _eot) - { - EOT& eo = inverse_deterministic_tournament(pop(), t_size); - eo = _eot; // overwrite loser of tournament - - eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves - eval(eo); // Evaluate after insert - } - - string className(void) const { return "eoDetTournamentInserter"; } - - private : - - unsigned t_size; -}; - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDetTournamentInserter.h + Concrete steady state inserter. It is initialized with a population and + inserts individuals in the population based on an inverse deterministic + tournament + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoDetTournamentInserter_h +#define eoDetTournamentInserter_h + + +#include "eoSteadyStateInserter.h" +#include "selectors.h" + +/** + * eoDetTournamentInserter: Uses an inverse deterministic tournament to figure + * out who gets overridden by the new individual. It resets the fitness of the + * individual. +*/ +template +class eoDetTournamentInserter : public eoSteadyStateInserter +{ + public : + + eoDetTournamentInserter(eoEvalFunc& _eval, unsigned _t_size) : t_size(_t_size), eoSteadyStateInserter(_eval) + { + if (t_size < 2) + { // warning, error? + t_size = 2; + } + } + + void insert(const EOT& _eot) + { + EOT& eo = inverse_deterministic_tournament(pop(), t_size); + eo = _eot; // overwrite loser of tournament + + eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves + eval(eo); // Evaluate after insert + } + + string className(void) const { return "eoDetTournamentInserter"; } + + private : + + unsigned t_size; +}; + +#endif diff --git a/eo/src/eoDup.h b/eo/src/eoDup.h index 7a13bd75d..727db3c39 100644 --- a/eo/src/eoDup.h +++ b/eo/src/eoDup.h @@ -1,63 +1,64 @@ -// eoDup.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoKill.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EODUP_h -#define _EODUP_h - -#include - -#include - -/// Dup or duplicate: duplicates a gene in a chromosome -template -class eoDup: public eoMonOp { -public: - /// - eoDup( ) - : eoMonOp< EOT >( ){}; - - /// needed virtual dtor - virtual ~eoDup() {}; - - /// - virtual void operator()( EOT& _eo ) const { - eoUniform uniform( 0, _eo.length() ); - unsigned pos = uniform(); - _eo.insertGene( pos, _eo.gene(pos) ); - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoDup";}; - //@} -}; - -#endif +// eoDup.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoKill.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EODUP_h +#define _EODUP_h + +#include + +#include + +/// Dup or duplicate: duplicates a gene in a chromosome +template +class eoDup: public eoMonOp { +public: + /// + eoDup( ) + : eoMonOp< EOT >( ){}; + + /// needed virtual dtor + virtual ~eoDup() {}; + + /// + virtual void operator()( EOT& _eo ) const { + eoUniform uniform( 0, _eo.length() ); + unsigned pos = uniform(); + _eo.insertGene( pos, _eo.gene(pos) ); + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoDup";}; + //@} +}; + +#endif + diff --git a/eo/src/eoESChrom.h b/eo/src/eoESChrom.h index d8d87564d..495a9ba6c 100644 --- a/eo/src/eoESChrom.h +++ b/eo/src/eoESChrom.h @@ -1,125 +1,126 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESChrom.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eoESCHROM_H -#define _eoESCHROM_H - -// STL libraries -#include // For vector<> -#include -#include -#include // for ostream - -// EO includes -#include - -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation -*/ -//@{ - -/** Each gene in an Evolution Strategies is composed of a value plus an standard -deviation, sigma, used for mutation*/ -struct eoESGene { - double val, sigma; - eoESGene( double _val = 0, double _sigma = 0 ): val( _val ), sigma( _sigma ) {}; -}; - -/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 -bool operator < ( eoESGene _e1, eoESGene _e2 ) { - return _e1.val < _e2.val; -} - -/// Tricky operator to avoid errors in some VC++ systems -bool operator == ( eoESGene _e1, eoESGene _e2 ) { - return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; -} - -/// -ostream & operator << ( ostream& _s, const eoESGene& _e ) { - _s << _e.val << ", " << _e.sigma << " | "; - return _s; -} - -/// Dummy >> -istream & operator >> ( istream& _s, const eoESGene& _e ) { - _s >> _e.val; - _s >> _e.sigma; - return _s; -} - - -/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and -Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene -@see eoESGene -*/ -template -class eoESChrom: public eoVector { -public: - /// Basic ctor - eoESChrom( ):eoVector() {}; - - /** Ctor using a couple of random number generators - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called. - @param _rndS another one, for the sigma - */ - eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) - : eoVector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - i->val = _rnd(); - i->sigma = _rndS(); - } - }; - - /// Copy ctor - eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; - - /// Assignment operator - const eoESChrom& operator =( const eoESChrom & _eoes ) { - if ( this != &_eoes ){ - eoVector::operator=( _eoes ); - } - return *this; - } - - /// - ~eoESChrom() {}; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoESChrom";}; - //@} - -}; - -//@} -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESChrom.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoESCHROM_H +#define _eoESCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include + +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation +*/ +//@{ + +/** Each gene in an Evolution Strategies is composed of a value plus an standard +deviation, sigma, used for mutation*/ +struct eoESGene { + double val, sigma; + eoESGene( double _val = 0, double _sigma = 0 ): val( _val ), sigma( _sigma ) {}; +}; + +/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 +bool operator < ( eoESGene _e1, eoESGene _e2 ) { + return _e1.val < _e2.val; +} + +/// Tricky operator to avoid errors in some VC++ systems +bool operator == ( eoESGene _e1, eoESGene _e2 ) { + return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; +} + +/// +ostream & operator << ( ostream& _s, const eoESGene& _e ) { + _s << _e.val << ", " << _e.sigma << " | "; + return _s; +} + +/// Dummy >> +istream & operator >> ( istream& _s, const eoESGene& _e ) { + _s >> _e.val; + _s >> _e.sigma; + return _s; +} + + +/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and +Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene +@see eoESGene +*/ +template +class eoESChrom: public eoVector { +public: + /// Basic ctor + eoESChrom( ):eoVector() {}; + + /** Ctor using a couple of random number generators + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called. + @param _rndS another one, for the sigma + */ + eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) + : eoVector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + i->val = _rnd(); + i->sigma = _rndS(); + } + }; + + /// Copy ctor + eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; + + /// Assignment operator + const eoESChrom& operator =( const eoESChrom & _eoes ) { + if ( this != &_eoes ){ + eoVector::operator=( _eoes ); + } + return *this; + } + + /// + ~eoESChrom() {}; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoESChrom";}; + //@} + +}; + +//@} +#endif + diff --git a/eo/src/eoESFullChrom.h b/eo/src/eoESFullChrom.h index 5b206c734..29c566564 100644 --- a/eo/src/eoESFullChrom.h +++ b/eo/src/eoESFullChrom.h @@ -1,270 +1,271 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESInd.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef _EOESFULLCHROM_H -#define _EOESFULLCHROM_H - -// STL libraries -#include // For vector<> -#include -#include -#include // for ostream - -// EO includes -#include -#include -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation and a vector of correlations -*/ -//@{ - - -/**@name individuals for evolution strategies -MS- 22/10/99 -Each individual in an evolution strategy is composed of - a vector of floating point values - a vector of std deviations - a vector of rotation angles (for correlated mutations) - -THese individuals CANNOT BE IMPLEMENTED as vectors of anything - at least in the case of correlated mutations -*/ -//@{ - -template -class eoESFullChrom : public eoVector { - public: -/// constructor - eoESFullChrom( unsigned _num_genes = 1, - unsigned _num_sigma = 1, unsigned _num_correl = 0, - bool _verbose = false, - double _ObjMin = 0, double _ObjMax = 1, - double _StdDevInit = 0.3 ): - eoVector(_num_genes), - // ObjVar( _num_genes ), now an eoVector - StdDev( _num_sigma ), - CorCff( _num_correl ), - verbose( _verbose ), - ObjMin( _ObjMin ), - ObjMax(_ObjMax ), - StdDevInit( _StdDevInit ) {} - - /// copy constructor - eoESFullChrom( const eoESFullChrom& _eo ): - eoVector ( _eo ), // ObjVar ( _eo.ObjVar ), - StdDev ( _eo.StdDev ), CorCff( _eo.CorCff ), verbose( _eo.verbose ), - ObjMin( _eo.ObjMin ), ObjMax(_eo.ObjMax ), StdDevInit( _eo.StdDevInit ) {} - - - /* another constructor, for compatibility reasons */ - eoESFullChrom(istream& _s) {cout << "Not Yet implemented\n";exit(1);}; - - /* And now the useful constructor: from a parser (should be in the - factory, if such a thing exists one day for eoESFullChrom - */ - eoESFullChrom(Parser & parser) : StdDev(0), CorCff(0) { - parser.AddTitle("Description of ES individuals"); - int num_genes, num_sigma; - bool correlated_mutations; - try { - num_genes = parser.getInt("-Io", "--NbObjVar", "2", - "Number of Object Variables" ); - num_sigma = parser.getInt("-Is", "--NbSigma", "1", - "Number of Standard Deviations" ); - correlated_mutations = parser.getBool("-Ic", "--Correlated", - "Correlated mutation?" ); - ObjMin = parser.getFloat("-Im", "--min", "0", - "Minimum value for object variables" ); - ObjMax = parser.getFloat("-IM", "--max", "1", - "Maximum value for object variables" ); - StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", - "Initial value for std. dev. (scaled by range)" ); - verbose = parser.getBool("-Iv", "--verbose", - "Verbose listing of ES individuals (mutation parameters"); - } - catch (exception & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - - // consistency tests - if (! num_sigma) { // no std dev??? EXCEPTION - throw invalid_argument( "No standard deviation: choose another representation please" ); - } - if (num_sigma > num_genes) { - cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; - num_sigma = num_genes; - // modify the Param value - so .status is OK +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESInd.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOESFULLCHROM_H +#define _EOESFULLCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include +#include +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation and a vector of correlations +*/ +//@{ + + +/**@name individuals for evolution strategies -MS- 22/10/99 +Each individual in an evolution strategy is composed of + a vector of floating point values + a vector of std deviations + a vector of rotation angles (for correlated mutations) + +THese individuals CANNOT BE IMPLEMENTED as vectors of anything + at least in the case of correlated mutations +*/ +//@{ + +template +class eoESFullChrom : public eoVector { + public: +/// constructor + eoESFullChrom( unsigned _num_genes = 1, + unsigned _num_sigma = 1, unsigned _num_correl = 0, + bool _verbose = false, + double _ObjMin = 0, double _ObjMax = 1, + double _StdDevInit = 0.3 ): + eoVector(_num_genes), + // ObjVar( _num_genes ), now an eoVector + StdDev( _num_sigma ), + CorCff( _num_correl ), + verbose( _verbose ), + ObjMin( _ObjMin ), + ObjMax(_ObjMax ), + StdDevInit( _StdDevInit ) {} + + /// copy constructor + eoESFullChrom( const eoESFullChrom& _eo ): + eoVector ( _eo ), // ObjVar ( _eo.ObjVar ), + StdDev ( _eo.StdDev ), CorCff( _eo.CorCff ), verbose( _eo.verbose ), + ObjMin( _eo.ObjMin ), ObjMax(_eo.ObjMax ), StdDevInit( _eo.StdDevInit ) {} + + + /* another constructor, for compatibility reasons */ + eoESFullChrom(istream& _s) {cout << "Not Yet implemented\n";exit(1);}; + + /* And now the useful constructor: from a parser (should be in the + factory, if such a thing exists one day for eoESFullChrom + */ + eoESFullChrom(Parser & parser) : StdDev(0), CorCff(0) { + parser.AddTitle("Description of ES individuals"); + int num_genes, num_sigma; + bool correlated_mutations; + try { + num_genes = parser.getInt("-Io", "--NbObjVar", "2", + "Number of Object Variables" ); + num_sigma = parser.getInt("-Is", "--NbSigma", "1", + "Number of Standard Deviations" ); + correlated_mutations = parser.getBool("-Ic", "--Correlated", + "Correlated mutation?" ); + ObjMin = parser.getFloat("-Im", "--min", "0", + "Minimum value for object variables" ); + ObjMax = parser.getFloat("-IM", "--max", "1", + "Maximum value for object variables" ); + StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", + "Initial value for std. dev. (scaled by range)" ); + verbose = parser.getBool("-Iv", "--verbose", + "Verbose listing of ES individuals (mutation parameters"); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + + // consistency tests + if (! num_sigma) { // no std dev??? EXCEPTION + throw invalid_argument( "No standard deviation: choose another representation please" ); + } + if (num_sigma > num_genes) { + cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; + num_sigma = num_genes; + // modify the Param value - so .status is OK ostrstream sloc; sloc << num_genes; - parser.setParamValue("--NbSigma", sloc.str()); - } - // adjust the sizes!!! - resize(num_genes); - if (num_sigma) - StdDev.resize(num_sigma); - if (correlated_mutations) { - if (num_sigma < num_genes) { - cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; - cout << "Though possible, this is a strange setting" << endl; - } - // nb of rotation angles: N*(N-1)/2 (in general!) - CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); - } - }; - - - /// Operator = - const eoESFullChrom& operator = ( const eoESFullChrom& _eo ) { - if ( this != &_eo ) { - // Change EO part - eoVector::operator = (_eo); - - // Change this part - // ObjVar = _eo.ObjVar; - StdDev = _eo.StdDev; - CorCff = _eo.CorCff; - verbose = _eo.verbose; - ObjMin = _eo.ObjMin; - ObjMax = _eo.ObjMax; - StdDevInit = _eo.StdDevInit; - } - return *this; - } - - /// destructor - virtual ~eoESFullChrom() {} - - /// - double getStdDev( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading StdDev"); - return StdDev[ _i ]; - } - - /// - void setStdDev( unsigned _i, double _val ) { - if ( _i < length() ) { - StdDev[_i] = _val; - } else - throw out_of_range( "out_of_range when writing StdDev"); - } - - /// - double getCorCff( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading CorCff"); - return CorCff[ _i ]; - } - - /// - void setCorCff( unsigned _i, double _val ) { - if ( _i < length() ) { - CorCff[_i] = _val; - } else - throw out_of_range( "out_of_range when writing CorCff"); - } - - /// - void insertGene( unsigned _i, double _val ) { - throw FixedLengthChromosome(); - }; - - /// - void deleteGene( unsigned _i ) { - throw FixedLengthChromosome(); - }; - - /// - unsigned length() const { return size();}/* formerly ObjVar.size() */ - unsigned StdDevLength() const { return StdDev.size();} - unsigned CorCffLength() const { return CorCff.size();} - - - /** Print itself: inherited from eoObject implementation. - Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - copy( begin(), end(), ostream_iterator( _s, " ") ); - // The formatting instructinos shoudl be left to the caller - // _s << "\n"; - if (verbose) { - _s << "\n\tStd Dev. " ; - copy( StdDev.begin(), StdDev.end(), ostream_iterator( _s, " ") ); - if (CorCff.size()) { - _s << "\n\t"; - copy( CorCff.begin(), CorCff.end(), ostream_iterator( _s, " ") ); - } - } - }; - - /** This exception should be thrown when trying to insert or delete a gene - in a fixed length chromosome - */ - class FixedLengthChromosome : public exception { - - public: - /** - * Constructor - */ - FixedLengthChromosome() - : exception() { }; - - ~FixedLengthChromosome() {}; - }; - - // accessors - double getObjMin() const {return ObjMin;} - double getObjMax() const {return ObjMax;} - double getStdDevInit () const {return StdDevInit;} - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoESFullChrom";}; - -private: - // vector ObjVar; /* object variable vector */ -// or shoudl the class be subclass of EOVector ??? - - vector StdDev; /* standard deviation vector */ - vector CorCff; /* correlation coefficient vector */ - - bool verbose; /* Print std deviations or not */ - - /** the range is used for mutation AND random initialization, - * while the StdDevInit is used only for random initialization - * this in a little inconsistent! - */ - double ObjMin, ObjMax; /* Range for Object variables */ - double StdDevInit; /* Initial value of Standard Deviations */ - -}; - -#endif - + parser.setParamValue("--NbSigma", sloc.str()); + } + // adjust the sizes!!! + resize(num_genes); + if (num_sigma) + StdDev.resize(num_sigma); + if (correlated_mutations) { + if (num_sigma < num_genes) { + cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; + cout << "Though possible, this is a strange setting" << endl; + } + // nb of rotation angles: N*(N-1)/2 (in general!) + CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); + } + }; + + + /// Operator = + const eoESFullChrom& operator = ( const eoESFullChrom& _eo ) { + if ( this != &_eo ) { + // Change EO part + eoVector::operator = (_eo); + + // Change this part + // ObjVar = _eo.ObjVar; + StdDev = _eo.StdDev; + CorCff = _eo.CorCff; + verbose = _eo.verbose; + ObjMin = _eo.ObjMin; + ObjMax = _eo.ObjMax; + StdDevInit = _eo.StdDevInit; + } + return *this; + } + + /// destructor + virtual ~eoESFullChrom() {} + + /// + double getStdDev( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading StdDev"); + return StdDev[ _i ]; + } + + /// + void setStdDev( unsigned _i, double _val ) { + if ( _i < length() ) { + StdDev[_i] = _val; + } else + throw out_of_range( "out_of_range when writing StdDev"); + } + + /// + double getCorCff( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading CorCff"); + return CorCff[ _i ]; + } + + /// + void setCorCff( unsigned _i, double _val ) { + if ( _i < length() ) { + CorCff[_i] = _val; + } else + throw out_of_range( "out_of_range when writing CorCff"); + } + + /// + void insertGene( unsigned _i, double _val ) { + throw FixedLengthChromosome(); + }; + + /// + void deleteGene( unsigned _i ) { + throw FixedLengthChromosome(); + }; + + /// + unsigned length() const { return size();}/* formerly ObjVar.size() */ + unsigned StdDevLength() const { return StdDev.size();} + unsigned CorCffLength() const { return CorCff.size();} + + + /** Print itself: inherited from eoObject implementation. + Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + copy( begin(), end(), ostream_iterator( _s, " ") ); + // The formatting instructinos shoudl be left to the caller + // _s << "\n"; + if (verbose) { + _s << "\n\tStd Dev. " ; + copy( StdDev.begin(), StdDev.end(), ostream_iterator( _s, " ") ); + if (CorCff.size()) { + _s << "\n\t"; + copy( CorCff.begin(), CorCff.end(), ostream_iterator( _s, " ") ); + } + } + }; + + /** This exception should be thrown when trying to insert or delete a gene + in a fixed length chromosome + */ + class FixedLengthChromosome : public exception { + + public: + /** + * Constructor + */ + FixedLengthChromosome() + : exception() { }; + + ~FixedLengthChromosome() {}; + }; + + // accessors + double getObjMin() const {return ObjMin;} + double getObjMax() const {return ObjMax;} + double getStdDevInit () const {return StdDevInit;} + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESFullChrom";}; + +private: + // vector ObjVar; /* object variable vector */ +// or shoudl the class be subclass of EOVector ??? + + vector StdDev; /* standard deviation vector */ + vector CorCff; /* correlation coefficient vector */ + + bool verbose; /* Print std deviations or not */ + + /** the range is used for mutation AND random initialization, + * while the StdDevInit is used only for random initialization + * this in a little inconsistent! + */ + double ObjMin, ObjMax; /* Range for Object variables */ + double StdDevInit; /* Initial value of Standard Deviations */ + +}; + +#endif + + diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 2b5fa4f42..ecd95c8e2 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -1,84 +1,85 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEasyEA.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoEasyEA_h -#define _eoEasyEA_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include - -/** EOEasyEA: - An easy-to-use evolutionary algorithm; you can use any chromosome, - and any selection transformation, merging and evaluation - algorithms; you can even change in runtime parameters of those - sub-algorithms -*/ - -template class eoEasyEA: public eoAlgo -{ - public: - /// Constructor. - eoEasyEA(eoBinPopOp& _select, - eoMonPopOp& _transform, - eoBinPopOp& _replace, - eoEvalFunc& _evaluator, - eoTerm& _terminator) - :step(_select, _transform, _replace, _evaluator), - terminator( _terminator){}; - - /// Constructor from an already created generation - eoEasyEA(eoGeneration& _gen, - eoTerm& _terminator): - step(_gen), - terminator( _terminator){}; - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEasyEA.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEasyEA_h +#define _eoEasyEA_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include + +/** EOEasyEA: + An easy-to-use evolutionary algorithm; you can use any chromosome, + and any selection transformation, merging and evaluation + algorithms; you can even change in runtime parameters of those + sub-algorithms +*/ + +template class eoEasyEA: public eoAlgo +{ + public: + /// Constructor. + eoEasyEA(eoBinPopOp& _select, + eoMonPopOp& _transform, + eoBinPopOp& _replace, + eoEvalFunc& _evaluator, + eoTerm& _terminator) + :step(_select, _transform, _replace, _evaluator), + terminator( _terminator){}; + + /// Constructor from an already created generation + eoEasyEA(eoGeneration& _gen, + eoTerm& _terminator): + step(_gen), + terminator( _terminator){}; + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { while ( terminator( pop ) ) { - try - { - step(pop); - } - catch (exception& e) - { - string s = e.what(); - s.append( " in eoEasyEA "); - throw runtime_error( s ); - } + try + { + step(pop); + } + catch (exception& e) + { + string s = e.what(); + s.append( " in eoEasyEA "); + throw runtime_error( s ); + } } // while - } - - /// Class name. - string className() const { return "eoEasyEA"; } - - private: - eoGeneration step; - eoTerm& terminator; -}; - -//----------------------------------------------------------------------------- - -#endif eoEasyEA_h + } + + /// Class name. + string className() const { return "eoEasyEA"; } + + private: + eoGeneration step; + eoTerm& terminator; +}; + +//----------------------------------------------------------------------------- + +#endif eoEasyEA_h + diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index d6d387d64..04cd6de83 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -1,59 +1,60 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoEvalFuncPtr.h - Converts a classical C fitness evaluation function into a fitness - evaluation object - - (c) GeNeura Team, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOEVALFUNCPTR_H -#define EOEVALFUNCPTR_H - -#include - -/** EOEvalFuncPtr: This class - * takes an existing function pointer and converts it into a evaluation - * function class. That way, old style C or C++ functions can be adapted to EO - * function classes. - */ -template< class EOT > -struct eoEvalFuncPtr: public eoEvalFunc { - - /** Applies the function to the chromosome and sets the fitness of the - Chrom. Thus, the evaluation function need not be worried about that. - @param _eval pointer to the evaluation function, takes a EOT as an - argument and returns the fitness - @return the evaluated fitness for that object. - */ - eoEvalFuncPtr( EOFitT (* _eval)( const EOT& ) ) - : eoEvalFunc(), evalFunc( _eval ) {}; - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const { - _eo.fitness((*evalFunc)( _eo )); - }; - - private: - EOFitT (* evalFunc )( const EOT& ); -}; - -#endif +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoEvalFuncPtr.h + Converts a classical C fitness evaluation function into a fitness + evaluation object + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTR_H +#define EOEVALFUNCPTR_H + +#include + +/** EOEvalFuncPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + */ +template< class EOT > +struct eoEvalFuncPtr: public eoEvalFunc { + + /** Applies the function to the chromosome and sets the fitness of the + Chrom. Thus, the evaluation function need not be worried about that. + @param _eval pointer to the evaluation function, takes a EOT as an + argument and returns the fitness + @return the evaluated fitness for that object. + */ + eoEvalFuncPtr( EOFitT (* _eval)( const EOT& ) ) + : eoEvalFunc(), evalFunc( _eval ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) const { + _eo.fitness((*evalFunc)( _eo )); + }; + + private: + EOFitT (* evalFunc )( const EOT& ); +}; + +#endif + diff --git a/eo/src/eoException.h b/eo/src/eoException.h index e135757e2..2e3ae02a2 100644 --- a/eo/src/eoException.h +++ b/eo/src/eoException.h @@ -1,69 +1,69 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoException.h - Exceptions that are possibly thrown at initialization and such should be - defined here - - (c) GeNeura Team, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoException_h -#define eoException_h - -#include - -#include "eoObject.h" - -struct eoException -{ - eoException() {} - eoException(const eoObject& caller) : who_caught_it(caller.className()) {} - - std::string who(void) const { return who_caught_it; } - virtual std::string what(void) const{ return "";} - -private : - std::string who_caught_it; -}; - -struct eoFitnessException : public eoException -{ - eoFitnessException() : eoException() {} - eoFitnessException(const eoObject& caller) : eoException(caller) {} -}; - -struct eoNegativeFitnessException : public eoFitnessException -{ - eoNegativeFitnessException() : eoFitnessException() {} - eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {} - - std::string what(void) const { return "negative fitness encountered"; } -}; - -struct eoMinimizingFitnessException : public eoFitnessException -{ - eoMinimizingFitnessException() : eoFitnessException() {} - eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {} - - std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; } -}; - -#endif \ No newline at end of file +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoException.h + Exceptions that are possibly thrown at initialization and such should be + defined here. + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoException_h +#define eoException_h + +#include + +#include "eoObject.h" + +struct eoException +{ + eoException() {} + eoException(const eoObject& caller) : who_caught_it(caller.className()) {} + + std::string who(void) const { return who_caught_it; } + virtual std::string what(void) const{ return "";} + +private : + std::string who_caught_it; +}; + +struct eoFitnessException : public eoException +{ + eoFitnessException() : eoException() {} + eoFitnessException(const eoObject& caller) : eoException(caller) {} +}; + +struct eoNegativeFitnessException : public eoFitnessException +{ + eoNegativeFitnessException() : eoFitnessException() {} + eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {} + + std::string what(void) const { return "negative fitness encountered"; } +}; + +struct eoMinimizingFitnessException : public eoFitnessException +{ + eoMinimizingFitnessException() : eoFitnessException() {} + eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {} + + std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; } +}; + +#endif diff --git a/eo/src/eoFitTerm.h b/eo/src/eoFitTerm.h index 4181015fc..76f696d8b 100644 --- a/eo/src/eoFitTerm.h +++ b/eo/src/eoFitTerm.h @@ -1,64 +1,65 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenTerm.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOFITTERM_H -#define _EOFITTERM_H - -#include - - -/** Fitness termination: terminates after a the difference between the -fitness of the best individual and a maximum fitness to achieve is less -than certain number called epsilon., i.e., |maximum-fitness| -class eoFitTerm: public eoTerm { -public: - - /// Ctors/dtors - eoFitTerm( const float _maximum, const float _epsilon ) - : eoTerm (), maximum( _maximum ), epsilon(_epsilon){}; - - /// Copy ctor - eoFitTerm( const eoFitTerm& _t ) - : eoTerm ( _t ), maximum( _t.maximum ), - epsilon(_t.epsilon){}; - - /// - virtual ~eoFitTerm() {}; - - /** Returns false when a certain number of generations is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - float bestFitness=_vEO[0].fitness(); - float dif=bestFitness-maximum; - dif=(dif<0)?-dif:dif; - return (dif>epsilon ) || (bestFitness > maximum); - } - -private: - float maximum, epsilon; -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOFITTERM_H +#define _EOFITTERM_H + +#include + + +/** Fitness termination: terminates after a the difference between the +fitness of the best individual and a maximum fitness to achieve is less +than certain number called epsilon., i.e., |maximum-fitness| +class eoFitTerm: public eoTerm { +public: + + /// Ctors/dtors + eoFitTerm( const float _maximum, const float _epsilon ) + : eoTerm (), maximum( _maximum ), epsilon(_epsilon){}; + + /// Copy ctor + eoFitTerm( const eoFitTerm& _t ) + : eoTerm ( _t ), maximum( _t.maximum ), + epsilon(_t.epsilon){}; + + /// + virtual ~eoFitTerm() {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + float bestFitness=_vEO[0].fitness(); + float dif=bestFitness-maximum; + dif=(dif<0)?-dif:dif; + return (dif>epsilon ) || (bestFitness > maximum); + } + +private: + float maximum, epsilon; +}; + +#endif + diff --git a/eo/src/eoFitness.h b/eo/src/eoFitness.h index 8505c34fd..ea514ae6f 100644 --- a/eo/src/eoFitness.h +++ b/eo/src/eoFitness.h @@ -1,54 +1,55 @@ -// eoFitness.h -//----------------------------------------------------------------------------- -// eoFitness.cpp -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOFITNESS_H -#define EOFITNESS_H - -//----------------------------------------------------------------------------- - -class eoFitness: public eoPersistent -{ - public: - virtual operator float() const = 0; - - virtual bool operator<(const eoFitness& other) const = 0; - - virtual bool operator>(const eoFitness& other) const - { - return !(*this < other || *this == other); - } - - virtual bool operator==(const eoFitness& other) const - { - return !(other < *this || *this < other); - } - - virtual bool operator!=(const eoFitness& other) const - { - return other < *this || *this < other; - } -}; - -//----------------------------------------------------------------------------- - -#endif EOFITNESS_H +// eoFitness.h +//----------------------------------------------------------------------------- +// eoFitness.cpp +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOFITNESS_H +#define EOFITNESS_H + +//----------------------------------------------------------------------------- + +class eoFitness: public eoPersistent +{ + public: + virtual operator float() const = 0; + + virtual bool operator<(const eoFitness& other) const = 0; + + virtual bool operator>(const eoFitness& other) const + { + return !(*this < other || *this == other); + } + + virtual bool operator==(const eoFitness& other) const + { + return !(other < *this || *this < other); + } + + virtual bool operator!=(const eoFitness& other) const + { + return other < *this || *this < other; + } +}; + +//----------------------------------------------------------------------------- + +#endif EOFITNESS_H + diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index f690b5919..ecdfd8658 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -1,58 +1,59 @@ -//----------------------------------------------------------------------------- -// eoBreeder.h -//----------------------------------------------------------------------------- - -#ifndef eoGopBreeder_h -#define eoGopBreeder_h - -//----------------------------------------------------------------------------- - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -#include "eoPopOps.h" -#include "eoGOpSelector.h" -#include "eoIndiSelector.h" -#include "eoBackInserter.h" - -template -class eoGOpBreeder: public eoMonPopOp -{ - public: - /// Default constructor. - eoGOpBreeder( eoGOpSelector& _opSel, - eoPopIndiSelector& _selector) - : opSel( _opSel ), selector(_selector) - {} - - /// Destructor. - virtual ~eoGOpBreeder() {} - - /** - * Enlarges the population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& _pop) - { - int size = _pop.size(); - - for (unsigned i = 0; i < size; i++) - { // and the one liner - opSel.selectOp()(selector(_pop,size, i), inserter(_pop)); - } - } - - /// The class name. - string classname() const { return "eoGOpBreeder"; } - - private: - eoGOpSelector& opSel; - eoPopIndiSelector& selector; - - // the inserter can be local as there's no point in changing it from the outside - eoBackInserter inserter; -}; - -#endif eoBreeder_h +//----------------------------------------------------------------------------- +// eoBreeder.h +//----------------------------------------------------------------------------- + +#ifndef eoGopBreeder_h +#define eoGopBreeder_h + +//----------------------------------------------------------------------------- + +/***************************************************************************** + * eoBreeder: transforms a population using genetic operators. * + * For every operator there is a rated to be applyed. * + *****************************************************************************/ + +#include "eoPopOps.h" +#include "eoGOpSelector.h" +#include "eoIndiSelector.h" +#include "eoBackInserter.h" + +template +class eoGOpBreeder: public eoMonPopOp +{ + public: + /// Default constructor. + eoGOpBreeder( eoGOpSelector& _opSel, + eoPopIndiSelector& _selector) + : opSel( _opSel ), selector(_selector) + {} + + /// Destructor. + virtual ~eoGOpBreeder() {} + + /** + * Enlarges the population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + int size = _pop.size(); + + for (unsigned i = 0; i < size; i++) + { // and the one liner + opSel.selectOp()(selector(_pop,size, i), inserter(_pop)); + } + } + + /// The class name. + string classname() const { return "eoGOpBreeder"; } + + private: + eoGOpSelector& opSel; + eoPopIndiSelector& selector; + + // the inserter can be local as there's no point in changing it from the outside + eoBackInserter inserter; +}; + +#endif eoBreeder_h + diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 2370d72fd..030380ac5 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -1,173 +1,174 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoGOpSelector.h - Base class for generalized (n-inputs, n-outputs) operator selectors. - Includes code and variables that contain operators and rates. - Also included eoProportionalGOpSelector and eoSequentialGOpSelector, that offer - a few concrete implementations. - - (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoGOpSelector_h -#define eoGOpSelector_h - -//----------------------------------------------------------------------------- - -#include -#include "eoOpSelector.h" -#include "eoWrappedOps.h" // for eoCombinedOp -#include "eoRNG.h" - -using namespace std; - -/** Base class for alternative selectors, which use the generalized operator - interface. eoGOpBreeders expects this class */ -template -class eoGOpSelector: public eoOpSelector, public vector*> -{ -public: - - typedef eoOpSelector::ID ID; - - /// Dtor - virtual ~eoGOpSelector() { - for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); - i != ownOpList.end(); i++ ) { - delete *i; - } - } - - /// Add any kind of operator to the operator mix, with an argument - virtual ID addOp( eoOp& _op, float _arg ); - // implementation can be found below - - /** Retrieve the operator using its integer handle - @param _id The id number. Should be a valid id, or an exception - will be thrown - @return a reference of the operator corresponding to that id. - */ - virtual const eoOp& getOp( ID _id ) - { - return *operator[](_id); - } - - /// - virtual void deleteOp( ID _id ); - // implemented below - - /// - virtual eoOp* Op() - { - return &selectOp(); - } - - /// - virtual eoGeneralOp& selectOp() = 0; - - /// - virtual string className() const { return "eoGOpSelector"; }; - - /// - void printOn(ostream& _os) const {} - // _os << className().c_str() << endl; - // for ( unsigned i=0; i!= rates.size(); i++ ) { - // _os << *(operator[](i)) << "\t" << rates[i] << endl; - // } - //} - - - const vector& getRates(void) const { return rates; } - -private : - vector rates; - list< eoGeneralOp* > ownOpList; -}; - -/* Implementation of longish functions defined above */ - -template -inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, float _arg ) -{ - - eoGeneralOp* op; - - if (_op.getType() == eoOp::general) - { - op = static_cast*>(&_op); - } - else - { - // if it's not a general op, it's a "old" op; create a wrapped op from it - // and keep it on a list to delete them afterwards - // will use auto_ptr when they're readily available - - switch(_op.getType()) - { - case eoOp::unary : - op= new eoWrappedMonOp(static_cast&>(_op)); - break; - case eoOp::binary : - op = new eoWrappedBinOp(static_cast&>(_op)); - case eoOp::quadratic : - op = new eoWrappedQuadraticOp(static_cast&>(_op)); - break; - } - ownOpList.push_back( op ); - } - - // Now 'op' is a general operator, either because '_op' was one or - // because we wrapped it in an appropriate wrapper in the code above. - - iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer - - if (result == end()) - { - push_back(op); - rates.push_back(_arg); - return size(); - } - // else - - *result = op; - ID id = result - begin(); - rates[id] = _arg; - return id; -} - -template -inline void eoGOpSelector::deleteOp( ID _id ) -{ - eoGeneralOp* op = operator[](_id); - - operator[](_id) = 0; - rates[_id] = 0.0; - - // check oplist and clear it there too. - - list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); - - if(it != ownOpList.end()) - { - ownOpList.erase(it); - } -} - -#endif eoGOpSelector_h +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoGOpSelector.h + Base class for generalized (n-inputs, n-outputs) operator selectors. + Includes code and variables that contain operators and rates. + Also included eoProportionalGOpSelector and eoSequentialGOpSelector, that offer + a few concrete implementations. + + (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoGOpSelector_h +#define eoGOpSelector_h + +//----------------------------------------------------------------------------- + +#include +#include "eoOpSelector.h" +#include "eoWrappedOps.h" // for eoCombinedOp +#include "eoRNG.h" + +using namespace std; + +/** Base class for alternative selectors, which use the generalized operator + interface. eoGOpBreeders expects this class */ +template +class eoGOpSelector: public eoOpSelector, public vector*> +{ +public: + + typedef eoOpSelector::ID ID; + + /// Dtor + virtual ~eoGOpSelector() { + for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); + i != ownOpList.end(); i++ ) { + delete *i; + } + } + + /// Add any kind of operator to the operator mix, with an argument + virtual ID addOp( eoOp& _op, float _arg ); + // implementation can be found below + + /** Retrieve the operator using its integer handle + @param _id The id number. Should be a valid id, or an exception + will be thrown + @return a reference of the operator corresponding to that id. + */ + virtual const eoOp& getOp( ID _id ) + { + return *operator[](_id); + } + + /// + virtual void deleteOp( ID _id ); + // implemented below + + /// + virtual eoOp* Op() + { + return &selectOp(); + } + + /// + virtual eoGeneralOp& selectOp() = 0; + + /// + virtual string className() const { return "eoGOpSelector"; }; + + /// + void printOn(ostream& _os) const {} + // _os << className().c_str() << endl; + // for ( unsigned i=0; i!= rates.size(); i++ ) { + // _os << *(operator[](i)) << "\t" << rates[i] << endl; + // } + //} + + + const vector& getRates(void) const { return rates; } + +private : + vector rates; + list< eoGeneralOp* > ownOpList; +}; + +/* Implementation of longish functions defined above */ + +template +inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, float _arg ) +{ + + eoGeneralOp* op; + + if (_op.getType() == eoOp::general) + { + op = static_cast*>(&_op); + } + else + { + // if it's not a general op, it's a "old" op; create a wrapped op from it + // and keep it on a list to delete them afterwards + // will use auto_ptr when they're readily available + + switch(_op.getType()) + { + case eoOp::unary : + op= new eoWrappedMonOp(static_cast&>(_op)); + break; + case eoOp::binary : + op = new eoWrappedBinOp(static_cast&>(_op)); + case eoOp::quadratic : + op = new eoWrappedQuadraticOp(static_cast&>(_op)); + break; + } + ownOpList.push_back( op ); + } + + // Now 'op' is a general operator, either because '_op' was one or + // because we wrapped it in an appropriate wrapper in the code above. + + iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer + + if (result == end()) + { + push_back(op); + rates.push_back(_arg); + return size(); + } + // else + + *result = op; + ID id = result - begin(); + rates[id] = _arg; + return id; +} + +template +inline void eoGOpSelector::deleteOp( ID _id ) +{ + eoGeneralOp* op = operator[](_id); + + operator[](_id) = 0; + rates[_id] = 0.0; + + // check oplist and clear it there too. + + list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); + + if(it != ownOpList.end()) + { + ownOpList.erase(it); + } +} + +#endif eoGOpSelector_h + diff --git a/eo/src/eoGenTerm.h b/eo/src/eoGenTerm.h index 3e6b0aa54..b6fc60f53 100644 --- a/eo/src/eoGenTerm.h +++ b/eo/src/eoGenTerm.h @@ -1,82 +1,83 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenTerm.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOGENTERM_H -#define _EOGENTERM_H - -#include - -/** Generational termination: terminates after a number of generations -*/ -template< class EOT> -class eoGenTerm: public eoTerm { -public: - - /// Ctors/dtors - eoGenTerm( unsigned _totalGens) - : eoTerm (), repTotalGenerations( _totalGens ), - thisGeneration(0){}; - - /// Copy Ctor - eoGenTerm( const eoGenTerm& _t) - : eoTerm ( _t ), repTotalGenerations( _t.repTotalGenerations ), - thisGeneration(0){}; - - /// Assignment Operator - const eoGenTerm& operator = ( const eoGenTerm& _t) { - if ( &_t != this ) { - repTotalGenerations = _t.repTotalGenerations; - thisGeneration = 0; - } - return *this; - } - - /// Dtor - virtual ~eoGenTerm() {}; - - /** Returns false when a certain number of generations is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - thisGeneration++; - // cout << " [" << thisGeneration << "] "; - return (thisGeneration < repTotalGenerations) ; // for the postincrement - } - - /** Sets the number of generations to reach - and sets the current generation to 0 (the begin)*/ - virtual void totalGenerations( unsigned _tg ) { - repTotalGenerations = _tg; - // thisGeneration = 0; - }; - - /** Returns the number of generations to reach*/ - virtual unsigned totalGenerations( ) { - return repTotalGenerations; - }; - -private: - unsigned repTotalGenerations, thisGeneration; -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenTerm.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOGENTERM_H +#define _EOGENTERM_H + +#include + +/** Generational termination: terminates after a number of generations +*/ +template< class EOT> +class eoGenTerm: public eoTerm { +public: + + /// Ctors/dtors + eoGenTerm( unsigned _totalGens) + : eoTerm (), repTotalGenerations( _totalGens ), + thisGeneration(0){}; + + /// Copy Ctor + eoGenTerm( const eoGenTerm& _t) + : eoTerm ( _t ), repTotalGenerations( _t.repTotalGenerations ), + thisGeneration(0){}; + + /// Assignment Operator + const eoGenTerm& operator = ( const eoGenTerm& _t) { + if ( &_t != this ) { + repTotalGenerations = _t.repTotalGenerations; + thisGeneration = 0; + } + return *this; + } + + /// Dtor + virtual ~eoGenTerm() {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + // cout << " [" << thisGeneration << "] "; + return (thisGeneration < repTotalGenerations) ; // for the postincrement + } + + /** Sets the number of generations to reach + and sets the current generation to 0 (the begin)*/ + virtual void totalGenerations( unsigned _tg ) { + repTotalGenerations = _tg; + // thisGeneration = 0; + }; + + /** Returns the number of generations to reach*/ + virtual unsigned totalGenerations( ) { + return repTotalGenerations; + }; + +private: + unsigned repTotalGenerations, thisGeneration; +}; + +#endif + diff --git a/eo/src/eoID.h b/eo/src/eoID.h index ed8ceecd3..f7d65ec7f 100644 --- a/eo/src/eoID.h +++ b/eo/src/eoID.h @@ -1,109 +1,110 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoID.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOID_H -#define EOID_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // for string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoID -//----------------------------------------------------------------------------- - -/** eoID is a template class that adds an ID to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor -and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, -printOn, readFrom, that is why we don´t subclass eoObject to avoid multiple inheritance.\\ -IDs can be used to count objects of a a kind, or track them, or whatever. -@see eoObject -*/ -template -class eoID: public Object -{ - public: - /// Main ctor from an already built Object. - eoID( const Object& _o): Object( _o ), thisID(globalID++) {}; - - /// Copy constructor. - eoID( const eoID& _id): Object( _id ), thisID(globalID++ ) {}; - - /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoID() {}; - - - ///returns the age of the object - unsigned long ID() const {return thisID;} - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return string("[eoID]")+Object::className(); }; - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) { - Object::readFrom( _is ); - _is >> thisID; - } - - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const{ - Object::printOn( _os ); - _os << thisID; - } -//@} - - private: - - /** Default Constructor. \\ - It´s private so that it is not used anywhere; the right way of using this object - is to create an Object and passing it to an aged by means of the copy ctor; that way - it´s turned into an Aged object*/ - eoID(): Object(), thisID( globalID++ ) {}; - - unsigned long thisID; - static unsigned long globalID; -}; - -template< class Object> -unsigned long eoID< Object >::globalID = 0; - -#endif EOID_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoID.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOID_H +#define EOID_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // for string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoID +//----------------------------------------------------------------------------- + +/** eoID is a template class that adds an ID to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +printOn, readFrom, that is why we don´t subclass eoObject to avoid multiple inheritance.\\ +IDs can be used to count objects of a a kind, or track them, or whatever. +@see eoObject +*/ +template +class eoID: public Object +{ + public: + /// Main ctor from an already built Object. + eoID( const Object& _o): Object( _o ), thisID(globalID++) {}; + + /// Copy constructor. + eoID( const eoID& _id): Object( _id ), thisID(globalID++ ) {}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoID() {}; + + + ///returns the age of the object + unsigned long ID() const {return thisID;} + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("[eoID]")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + Object::readFrom( _is ); + _is >> thisID; + } + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const{ + Object::printOn( _os ); + _os << thisID; + } +//@} + + private: + + /** Default Constructor. \\ + It´s private so that it is not used anywhere; the right way of using this object + is to create an Object and passing it to an aged by means of the copy ctor; that way + it´s turned into an Aged object*/ + eoID(): Object(), thisID( globalID++ ) {}; + + unsigned long thisID; + static unsigned long globalID; +}; + +template< class Object> +unsigned long eoID< Object >::globalID = 0; + +#endif EOID_H + diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index c534404c0..69803d2b7 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -1,134 +1,134 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoIndiSelector.h - Abstract selection operator, which is used by the eoGeneralOps - to obtain individuals from a source population. It also gives a - direct descended eoPopIndiSelector that can be used to - initialize objects with an eoPop. For most uses use eoPopIndividualSelector - rather than eoIndividualSelector to derive from. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoIndiSelector_h -#define eoIndiSelector_h - -/** - * eoIndividualSelector: This class defines the interface -*/ -template -class eoIndiSelector -{ -public : - - eoIndiSelector() {} - - virtual ~eoIndiSelector(void) {} - - virtual size_t size(void) const = 0; - virtual const EOT& operator[](size_t) const = 0; - - virtual const EOT& select(void) = 0; - - virtual vector select(size_t _how_many) - { // default implementation just calls select a couple of times - // this can be overridden in favour of a more efficient implementation - vector result(_how_many); - - for (int i = 0; i < _how_many; ++i) - { - result[i] = &select(); - } - - return result; - } -}; - -/** - * eoPopIndiSelector: Intermediate class for dispensing populations - various useful things can be done with this class: - you can specify how many of the population can ever be dispensed to the - operators, but you can also specify a preference to the first guy being - dispensed. This is useful if you want to perform the operator on a specific - individual. -*/ -template -class eoPopIndiSelector : public eoIndiSelector -{ - public : - eoPopIndiSelector(void) : pop(0), firstChoice(-1), last(0), eoIndiSelector() {} - - virtual ~eoPopIndiSelector(void) {} - - struct eoUnitializedException{}; - - /** Initialization function - */ - eoPopIndiSelector& operator()(const eoPop& _pop, int _end = -1, int _myGuy = -1) - { - pop = &_pop; - last = _end; - - if (last < 0 || last > pop->size()) - { - last = pop->size(); - } - - firstChoice = _myGuy; - return *this; - } - - size_t size(void) const { valid(); return last; } - const EOT& operator[](size_t _i) const { valid(); return pop->operator[](_i); } - - eoPop::const_iterator begin(void) const { valid(); return pop->begin(); } - eoPop::const_iterator end(void) const { valid(); return pop->end(); } - - - /// select does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes - const EOT& select(void) - { - valid(); - if (firstChoice < 0 || firstChoice >= size()) - { - return do_select(); // let the child figure out what to do - } - - const EOT& result = pop->operator[](firstChoice); - firstChoice = -1; - return result; - } - - virtual const EOT& do_select(void) = 0; - - private : - - void valid(void) const - { - if (pop == 0) - throw eoUnitializedException(); - } - - const eoPop* pop; // need a pointer as this the pop argument can be re-instated - int last; - int firstChoice; -}; - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoIndiSelector.h + Abstract selection operator, which is used by the eoGeneralOps + to obtain individuals from a source population. It also gives a + direct descended eoPopIndiSelector that can be used to + initialize objects with an eoPop. For most uses use eoPopIndividualSelector + rather than eoIndividualSelector to derive from. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoIndiSelector_h +#define eoIndiSelector_h + +/** + * eoIndividualSelector: This class defines the interface +*/ +template +class eoIndiSelector +{ +public : + + eoIndiSelector() {} + + virtual ~eoIndiSelector(void) {} + + virtual size_t size(void) const = 0; + virtual const EOT& operator[](size_t) const = 0; + + virtual const EOT& select(void) = 0; + + virtual vector select(size_t _how_many) + { // default implementation just calls select a couple of times + // this can be overridden in favour of a more efficient implementation + vector result(_how_many); + + for (int i = 0; i < _how_many; ++i) + { + result[i] = &select(); + } + + return result; + } +}; + +/** + * eoPopIndiSelector: Intermediate class for dispensing populations + various useful things can be done with this class: + you can specify how many of the population can ever be dispensed to the + operators, but you can also specify a preference to the first guy being + dispensed. This is useful if you want to perform the operator on a specific + individual. +*/ +template +class eoPopIndiSelector : public eoIndiSelector +{ + public : + eoPopIndiSelector(void) : pop(0), firstChoice(-1), last(0), eoIndiSelector() {} + + virtual ~eoPopIndiSelector(void) {} + + struct eoUnitializedException{}; + + /** Initialization function + */ + eoPopIndiSelector& operator()(const eoPop& _pop, int _end = -1, int _myGuy = -1) + { + pop = &_pop; + last = _end; + + if (last < 0 || last > pop->size()) + { + last = pop->size(); + } + + firstChoice = _myGuy; + return *this; + } + + size_t size(void) const { valid(); return last; } + const EOT& operator[](size_t _i) const { valid(); return pop->operator[](_i); } + + eoPop::const_iterator begin(void) const { valid(); return pop->begin(); } + eoPop::const_iterator end(void) const { valid(); return pop->end(); } + + + /// select does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes + const EOT& select(void) + { + valid(); + if (firstChoice < 0 || firstChoice >= size()) + { + return do_select(); // let the child figure out what to do + } + + const EOT& result = pop->operator[](firstChoice); + firstChoice = -1; + return result; + } + + virtual const EOT& do_select(void) = 0; + + private : + + void valid(void) const + { + if (pop == 0) + throw eoUnitializedException(); + } + + const eoPop* pop; // need a pointer as this the pop argument can be re-instated + int last; + int firstChoice; +}; + +#endif diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h index eb9eb3c64..44ec68851 100644 --- a/eo/src/eoInserter.h +++ b/eo/src/eoInserter.h @@ -1,92 +1,93 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoInserter.h - Abstract population insertion operator, which is used by the eoGeneralOps - to insert the results in the (intermediate) population. It also contains - a direct descended eoPopInserter that defines a convenient inbetween class - for working with eoPop. The user will most likely derive from eoPopInserter - rather than eoInserter. - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoInserter_h -#define eoInserter_h - -#include "eoPop.h" -/** - * eoInserter: Interface class that enables an operator to insert - new individuals into the (intermediate) population. -*/ -template -class eoInserter : public eoObject -{ - public : - virtual ~eoInserter() {} - - struct eoInserterException{}; - - virtual void insert(const EOT&) = 0; // can throw an eoInserterException -}; - -/** - * eoPopInserter: In-between class that defines an initialization - * of the eoIndividualInserter. -*/ -template -class eoPopInserter : public eoInserter -{ - public : - - eoPopInserter(void) : thePop(0), eoInserter() {} - - /// Binds the population to this class. This is an initialization routine used by breeders - eoInserter& operator()(eoPop& _pop) - { - thePop = &_pop; - return *this; - } - - protected : - - eoPop& pop(void) const { valid(); return *thePop; } - - private : - - void valid(void) const - { - if (thePop == 0) - throw eoInserterException(); - } - - // Need a pointer as the inserter should be able to bind to different populations. - // This is caused by the 'one template parameter only' convention in EO. - - eoPop* thePop; - - // If eoGOpBreeder could be templatized over the inserter and the selector, - // the pop could be a ref as this class could be created every time it is applied - // and subsequently would get the population through the constructor - -}; - - - -#endif +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoInserter.h + Abstract population insertion operator, which is used by the eoGeneralOps + to insert the results in the (intermediate) population. It also contains + a direct descended eoPopInserter that defines a convenient inbetween class + for working with eoPop. The user will most likely derive from eoPopInserter + rather than eoInserter. + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoInserter_h +#define eoInserter_h + +#include "eoPop.h" +/** + * eoInserter: Interface class that enables an operator to insert + new individuals into the (intermediate) population. +*/ +template +class eoInserter : public eoObject +{ + public : + virtual ~eoInserter() {} + + struct eoInserterException{}; + + virtual void insert(const EOT&) = 0; // can throw an eoInserterException +}; + +/** + * eoPopInserter: In-between class that defines an initialization + * of the eoIndividualInserter. +*/ +template +class eoPopInserter : public eoInserter +{ + public : + + eoPopInserter(void) : thePop(0), eoInserter() {} + + /// Binds the population to this class. This is an initialization routine used by breeders + eoInserter& operator()(eoPop& _pop) + { + thePop = &_pop; + return *this; + } + + protected : + + eoPop& pop(void) const { valid(); return *thePop; } + + private : + + void valid(void) const + { + if (thePop == 0) + throw eoInserterException(); + } + + // Need a pointer as the inserter should be able to bind to different populations. + // This is caused by the 'one template parameter only' convention in EO. + + eoPop* thePop; + + // If eoGOpBreeder could be templatized over the inserter and the selector, + // the pop could be a ref as this class could be created every time it is applied + // and subsequently would get the population through the constructor + +}; + + + +#endif + diff --git a/eo/src/eoKill.h b/eo/src/eoKill.h index 826274f06..d6ad11c79 100644 --- a/eo/src/eoKill.h +++ b/eo/src/eoKill.h @@ -1,61 +1,62 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoKill.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOKILL_h -#define _EOKILL_h - -#include - -#include - -/// Kill eliminates a gen in a chromosome -template -class eoKill: public eoMonOp { -public: - /// - eoKill( ) - : eoMonOp< EOT >(){}; - - /// needed virtual dtor - virtual ~eoKill() {}; - - /// - virtual void operator()( EOT& _eo ) const { - eoUniform uniform( 0, _eo.length() ); - unsigned pos = uniform( ); - _eo.deleteGene( pos ); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoKill";}; - //@} -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoKill.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOKILL_h +#define _EOKILL_h + +#include + +#include + +/// Kill eliminates a gen in a chromosome +template +class eoKill: public eoMonOp { +public: + /// + eoKill( ) + : eoMonOp< EOT >(){}; + + /// needed virtual dtor + virtual ~eoKill() {}; + + /// + virtual void operator()( EOT& _eo ) const { + eoUniform uniform( 0, _eo.length() ); + unsigned pos = uniform( ); + _eo.deleteGene( pos ); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoKill";}; + //@} +}; + +#endif + diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 333ee7923..9cf584bff 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -1,97 +1,98 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoLottery.h -// Implements the lottery procedure for selection -// (c) GeNeura Team, 1998 - Marc Schoenauer, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoLottery_h -#define eoLottery_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include "selectors.h" -#include // eoPop eoSelect MINFLOAT - -//----------------------------------------------------------------------------- -/** eoLottery: a selection method. Puts into the output a group of individuals - selected using lottery; individuals with higher probability will have more - chances of being selected. - Requires EOT::Fitness to be float castable -*/ -//----------------------------------------------------------------------------- - -template class eoLottery: public eoBinPopOp -{ - public: - /// (Default) Constructor. - eoLottery(const float& _rate = 1.0): eoBinPopOp(), rate(_rate) - { - if (minimizing_fitness()) - { - eoMinimizingFitnessException up(*this); - throw up; // :-) - } - } - - /** actually selects individuals from pop and pushes them back them into breeders - * until breeders has the right size: rate*pop.size() - * BUT what happens if breeders is already too big? - * Too big for what? - */ - void operator()( eoPop& pop, eoPop& breeders) - { - int target = (int)(rate * pop.size()); - - // test of consistency - if (breeders.size() >= target) { - throw("Problem in eoLottery: already too many offspring"); - } - - double total; - - try - { - total = sum_fitness(pop); - } - catch (eoNegativeFitnessException&) - { // say where it occured... - throw eoNegativeFitnessException(*this); - } - - // selection of chromosomes - while (breeders.size() < target) - { - breeders.push_back(roulette_wheel(pop, total)); - } - } - - double Rate(void) const { return rate; } - - private: - double rate; // selection rate -}; - -//----------------------------------------------------------------------------- - -#endif eoLottery_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoLottery.h +// Implements the lottery procedure for selection +// (c) GeNeura Team, 1998 - Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoLottery_h +#define eoLottery_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include "selectors.h" +#include // eoPop eoSelect MINFLOAT + +//----------------------------------------------------------------------------- +/** eoLottery: a selection method. Puts into the output a group of individuals + selected using lottery; individuals with higher probability will have more + chances of being selected. + Requires EOT::Fitness to be float castable +*/ +//----------------------------------------------------------------------------- + +template class eoLottery: public eoBinPopOp +{ + public: + /// (Default) Constructor. + eoLottery(const float& _rate = 1.0): eoBinPopOp(), rate(_rate) + { + if (minimizing_fitness()) + { + eoMinimizingFitnessException up(*this); + throw up; // :-) + } + } + + /** actually selects individuals from pop and pushes them back them into breeders + * until breeders has the right size: rate*pop.size() + * BUT what happens if breeders is already too big? + * Too big for what? + */ + void operator()( eoPop& pop, eoPop& breeders) + { + int target = (int)(rate * pop.size()); + + // test of consistency + if (breeders.size() >= target) { + throw("Problem in eoLottery: already too many offspring"); + } + + double total; + + try + { + total = sum_fitness(pop); + } + catch (eoNegativeFitnessException&) + { // say where it occured... + throw eoNegativeFitnessException(*this); + } + + // selection of chromosomes + while (breeders.size() < target) + { + breeders.push_back(roulette_wheel(pop, total)); + } + } + + double Rate(void) const { return rate; } + + private: + double rate; // selection rate +}; + +//----------------------------------------------------------------------------- + +#endif eoLottery_h + diff --git a/eo/src/eoMultiBinOp.h b/eo/src/eoMultiBinOp.h index 231655b3b..06237d84f 100644 --- a/eo/src/eoMultiBinOp.h +++ b/eo/src/eoMultiBinOp.h @@ -1,99 +1,100 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMultiBinOp.h -// Class that combines several binary or unary operators -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOMULTIBINOP_h -#define _EOMULTIBINOP_h - -#include - -#include - -/** MultiMonOp combines several monary operators. By itself, it does nothing to the -EO it´s handled*/ -template -class eoMultiBinOp: public eoBinOp { -public: - /// Ctor from an already existing op - eoMultiBinOp( const eoBinOp* _op ) - : eoBinOp< EOT >( ), vOp(){ - vOp.push_back( _op ); - }; - - /// - eoMultiBinOp( ) - : eoBinOp< EOT >( ), vOp(){}; - - /// Ads a new operator - void adOp( const eoOp* _op ){ - vOp.push_back( _op ); - }; - - /// needed virtual dtor - virtual ~eoMultiBinOp() {}; - - /// - /// Applies all operators to the EO - virtual void operator()( EOT& _eo1, EOT& _eo2 ) const { - if ( vOp.begin() != vOp.end() ) { // which would mean it's empty - for ( vector< const eoOp* >::const_iterator i = vOp.begin(); - i != vOp.end(); i++ ) { - // Admits only unary or binary operator - switch ((*i)->readArity()) { - case unary: - { - const eoMonOp* monop = static_cast* >(*i); - (*monop)( _eo1 ); - (*monop)( _eo2 ); - break; - } - case binary: - { - const eoBinOp* binop = static_cast* >(*i); - (*binop)( _eo1, _eo2 ); - break; - } - } - } - } - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMultiBinOp";}; - //@} - -private: - - /// uses pointers to base class since operators can be unary or binary - vector< const eoOp* > vOp; -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMultiBinOp.h +// Class that combines several binary or unary operators +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOMULTIBINOP_h +#define _EOMULTIBINOP_h + +#include + +#include + +/** MultiMonOp combines several monary operators. By itself, it does nothing to the +EO it´s handled*/ +template +class eoMultiBinOp: public eoBinOp { +public: + /// Ctor from an already existing op + eoMultiBinOp( const eoBinOp* _op ) + : eoBinOp< EOT >( ), vOp(){ + vOp.push_back( _op ); + }; + + /// + eoMultiBinOp( ) + : eoBinOp< EOT >( ), vOp(){}; + + /// Ads a new operator + void adOp( const eoOp* _op ){ + vOp.push_back( _op ); + }; + + /// needed virtual dtor + virtual ~eoMultiBinOp() {}; + + /// + /// Applies all operators to the EO + virtual void operator()( EOT& _eo1, EOT& _eo2 ) const { + if ( vOp.begin() != vOp.end() ) { // which would mean it's empty + for ( vector< const eoOp* >::const_iterator i = vOp.begin(); + i != vOp.end(); i++ ) { + // Admits only unary or binary operator + switch ((*i)->readArity()) { + case unary: + { + const eoMonOp* monop = static_cast* >(*i); + (*monop)( _eo1 ); + (*monop)( _eo2 ); + break; + } + case binary: + { + const eoBinOp* binop = static_cast* >(*i); + (*binop)( _eo1, _eo2 ); + break; + } + } + } + } + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMultiBinOp";}; + //@} + +private: + + /// uses pointers to base class since operators can be unary or binary + vector< const eoOp* > vOp; +}; + +#endif + diff --git a/eo/src/eoMultiMonOp.h b/eo/src/eoMultiMonOp.h index c06a27947..09167206c 100644 --- a/eo/src/eoMultiMonOp.h +++ b/eo/src/eoMultiMonOp.h @@ -1,80 +1,80 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMultiMonOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOMULTIMONOP_h -#define _EOMULTIMONOP_h - -#include - -#include - -/** MultiMonOp combines several monary operators. By itself, it does nothing to the -EO it´s handled*/ -template -class eoMultiMonOp: public eoMonOp { -public: - /// Ctor from an already existing op - eoMultiMonOp( const eoMonOp* _op ) - : eoMonOp< EOT >( ), vOp(){ - vOp.push_back( _op ); - }; - - /// - eoMultiMonOp( ) - : eoMonOp< EOT >( ), vOp(){}; - - /// Ctor from an already existing op - void adOp( const eoMonOp* _op ){ - vOp.push_back( _op ); - }; - - /// needed virtual dtor - virtual ~eoMultiMonOp() {}; - - /// - /// Applies all operators to the EO - virtual void operator()( EOT& _eo ) const { - if ( vOp.begin() != vOp.end() ) { - for ( vector* >::const_iterator i = vOp.begin(); - i != vOp.end(); i++ ) { - (*i)->operator () ( _eo ); - } - } - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMonOp";}; - //@} -private: - vector< const eoMonOp* > vOp; -}; - -#endif \ No newline at end of file +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMultiMonOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOMULTIMONOP_h +#define _EOMULTIMONOP_h + +#include + +#include + +/** MultiMonOp combines several monary operators. By itself, it does nothing to the +EO it´s handled*/ +template +class eoMultiMonOp: public eoMonOp { +public: + /// Ctor from an already existing op + eoMultiMonOp( const eoMonOp* _op ) + : eoMonOp< EOT >( ), vOp(){ + vOp.push_back( _op ); + }; + + /// + eoMultiMonOp( ) + : eoMonOp< EOT >( ), vOp(){}; + + /// Ctor from an already existing op + void adOp( const eoMonOp* _op ){ + vOp.push_back( _op ); + }; + + /// needed virtual dtor + virtual ~eoMultiMonOp() {}; + + /// + /// Applies all operators to the EO + virtual void operator()( EOT& _eo ) const { + if ( vOp.begin() != vOp.end() ) { + for ( vector* >::const_iterator i = vOp.begin(); + i != vOp.end(); i++ ) { + (*i)->operator () ( _eo ); + } + } + } + + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMonOp";}; + //@} +private: + vector< const eoMonOp* > vOp; +}; + +#endif diff --git a/eo/src/eoMutation.h b/eo/src/eoMutation.h index fbc3641c0..2c4672f64 100644 --- a/eo/src/eoMutation.h +++ b/eo/src/eoMutation.h @@ -1,90 +1,91 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMutation.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOMUTATION_H -#define _EOMUTATION_H - -#include -// EO includes -#include -#include - -/** Generic Mutation of an EO. - This is a virtual class, just to establish the interface for the ctor. - Mutation is usually type-specific -*/ - -template -class eoMutation: public eoMonOp { -public: - - /// - eoMutation(const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate) {}; - - /// - virtual ~eoMutation() {}; - - /// - virtual void operator()( EOT& _eo ) const { - typename EOT::iterator i; - for ( i = _eo.begin(); i != _eo.end(); i ++ ) - applyAt( _eo, *i ); - } - - /// To print me on a stream. - /// @param os The ostream. - void printOn(ostream& os) const { - os << rate ; - } - - /// To read me from a stream. - /// @param is The istream. - void readFrom(istream& is) { - is >> rate ; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMutation";}; - //@} - -protected: - double rate; - -private: -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO. It is empty, so each descent class must define it. - virtual void applyAt( EOT& _eo, unsigned _i ) const = 0 ; -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMutation.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOMUTATION_H +#define _EOMUTATION_H + +#include +// EO includes +#include +#include + +/** Generic Mutation of an EO. + This is a virtual class, just to establish the interface for the ctor. + Mutation is usually type-specific +*/ + +template +class eoMutation: public eoMonOp { +public: + + /// + eoMutation(const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate) {}; + + /// + virtual ~eoMutation() {}; + + /// + virtual void operator()( EOT& _eo ) const { + typename EOT::iterator i; + for ( i = _eo.begin(); i != _eo.end(); i ++ ) + applyAt( _eo, *i ); + } + + /// To print me on a stream. + /// @param os The ostream. + void printOn(ostream& os) const { + os << rate ; + } + + /// To read me from a stream. + /// @param is The istream. + void readFrom(istream& is) { + is >> rate ; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoMutation";}; + //@} + +protected: + double rate; + +private: +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO. It is empty, so each descent class must define it. + virtual void applyAt( EOT& _eo, unsigned _i ) const = 0 ; +}; + + +#endif + diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h index 63c9203ed..7829a3c56 100644 --- a/eo/src/eoNegExp.h +++ b/eo/src/eoNegExp.h @@ -1,66 +1,67 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoNegExp.h - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EONEGEXP_H -#define _EONEGEXP_H - -//----------------------------------------------------------------------------- - -#include - -#include // for base class -#include // for base class - -//----------------------------------------------------------------------------- -// Class eoNegExp -//----------------------------------------------------------------------------- - -/// Generates random numbers using a negative exponential distribution -template -class eoNegExp: public eoRnd -{ - public: - /** - * Default constructor. - * @param _mean Distribution mean - */ - eoNegExp(T _mean): eoRnd(), mean(_mean) {}; - - /** - * Copy constructor. - * @param _rnd the copyee - */ - eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; - - /// Returns an uniform dandom number over the interval [min, max). - virtual T operator()() { - return T( -mean*log((double)rng.rand() / rng.rand_max())); } - - private: - T mean; -}; - -//----------------------------------------------------------------------------- - -#endif +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoNegExp.h + (c) GeNeura Team, 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EONEGEXP_H +#define _EONEGEXP_H + +//----------------------------------------------------------------------------- + +#include + +#include // for base class +#include // for base class + +//----------------------------------------------------------------------------- +// Class eoNegExp +//----------------------------------------------------------------------------- + +/// Generates random numbers using a negative exponential distribution +template +class eoNegExp: public eoRnd +{ + public: + /** + * Default constructor. + * @param _mean Distribution mean + */ + eoNegExp(T _mean): eoRnd(), mean(_mean) {}; + + /** + * Copy constructor. + * @param _rnd the copyee + */ + eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; + + /// Returns an uniform dandom number over the interval [min, max). + virtual T operator()() { + return T( -mean*log((double)rng.rand() / rng.rand_max())); } + + private: + T mean; +}; + +//----------------------------------------------------------------------------- + +#endif + diff --git a/eo/src/eoNonUniform.h b/eo/src/eoNonUniform.h index c894806fb..b5065d21d 100644 --- a/eo/src/eoNonUniform.h +++ b/eo/src/eoNonUniform.h @@ -1,86 +1,87 @@ -//----------------------------------------------------------------------------- -// eoNonUniform.h -//----------------------------------------------------------------------------- - -#ifndef EONONUNIFORM_H -#define EONONUNIFORM_H - -//----------------------------------------------------------------------------- - -#include // pow - -//----------------------------------------------------------------------------- -// eoNonUniform -//----------------------------------------------------------------------------- - -class eoNonUniform -{ -public: - eoNonUniform(const unsigned _num_step): - step_value(0), num_step_value(_num_step) {} - - void reset() { step_value = 0; } - - const unsigned& step() const { return step_value; } - const unsigned& num_step() const { return num_step_value; } - - operator int() const { return step_value < num_step_value; } - - void operator++() { ++step_value; } - void operator++(int) { ++step_value; } - -private: - unsigned step_value, num_step_value; -}; - -//----------------------------------------------------------------------------- -// eoLinear -//----------------------------------------------------------------------------- - -class eoLinear -{ -public: - eoLinear(const double _first, - const double _last, - const eoNonUniform& _non_uniform): - first(_first), - diff((_last - _first) / (_non_uniform.num_step() - 1)), - non_uniform(_non_uniform) {} - - double operator()() const - { - return first + diff * non_uniform.step(); - } - -private: - double first, diff; - const eoNonUniform& non_uniform; -}; - -//----------------------------------------------------------------------------- -// eoNegExp2 -//----------------------------------------------------------------------------- - -class eoNegExp2 -{ - public: - eoNegExp2(const double _r, - const double _b, - const eoNonUniform& _non_uniform): - r(_r), b(_b), - non_uniform(_non_uniform) {} - - double operator()() const - { - return 1.0 - pow(r, pow(1.0 - (double)non_uniform.step() / - non_uniform.num_step(), b)); - } - - private: - double r, b; - const eoNonUniform& non_uniform; -}; - -//----------------------------------------------------------------------------- - -#endif NON_UNIFORM_HH +//----------------------------------------------------------------------------- +// eoNonUniform.h +//----------------------------------------------------------------------------- + +#ifndef EONONUNIFORM_H +#define EONONUNIFORM_H + +//----------------------------------------------------------------------------- + +#include // pow + +//----------------------------------------------------------------------------- +// eoNonUniform +//----------------------------------------------------------------------------- + +class eoNonUniform +{ +public: + eoNonUniform(const unsigned _num_step): + step_value(0), num_step_value(_num_step) {} + + void reset() { step_value = 0; } + + const unsigned& step() const { return step_value; } + const unsigned& num_step() const { return num_step_value; } + + operator int() const { return step_value < num_step_value; } + + void operator++() { ++step_value; } + void operator++(int) { ++step_value; } + +private: + unsigned step_value, num_step_value; +}; + +//----------------------------------------------------------------------------- +// eoLinear +//----------------------------------------------------------------------------- + +class eoLinear +{ +public: + eoLinear(const double _first, + const double _last, + const eoNonUniform& _non_uniform): + first(_first), + diff((_last - _first) / (_non_uniform.num_step() - 1)), + non_uniform(_non_uniform) {} + + double operator()() const + { + return first + diff * non_uniform.step(); + } + +private: + double first, diff; + const eoNonUniform& non_uniform; +}; + +//----------------------------------------------------------------------------- +// eoNegExp2 +//----------------------------------------------------------------------------- + +class eoNegExp2 +{ + public: + eoNegExp2(const double _r, + const double _b, + const eoNonUniform& _non_uniform): + r(_r), b(_b), + non_uniform(_non_uniform) {} + + double operator()() const + { + return 1.0 - pow(r, pow(1.0 - (double)non_uniform.step() / + non_uniform.num_step(), b)); + } + + private: + double r, b; + const eoNonUniform& non_uniform; +}; + +//----------------------------------------------------------------------------- + +#endif NON_UNIFORM_HH + diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h index e7302c76d..63904efc9 100644 --- a/eo/src/eoNormal.h +++ b/eo/src/eoNormal.h @@ -1,88 +1,89 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoNormal.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EONORMAL_H -#define _EONORMAL_H - -//----------------------------------------------------------------------------- - -#include -#include // for base class -#include // for random number generator - -//----------------------------------------------------------------------------- -// Class eoNormal -//----------------------------------------------------------------------------- - -/// Generates random number using a normal distribution -template -class eoNormal: public eoRnd -{ - public: - /** - * Default constructor. - * @param _mean Dsitribution mean - * @param _sd Standard Deviation - */ - eoNormal(T _mean, T _sd) - : eoRnd(), mean(_mean), sd(_sd), phase(false) {} - - /** - * Copy constructor. - * @param _rnd the other one - */ - eoNormal( const eoNormal& _rnd ) - : eoRnd( _rnd), mean(_rnd.mean), sd(_rnd.sd), phase(false) {} - - /** Returns an uniform random number over the interval [min, max). - @return an uniform random number over the interval [min, max). - */ - virtual T operator()() { - if (phase) { // Already have one stored up. - phase = false; - return T ( (sqRatio * q * sd) + mean ); - } - - double p, v; - do { - p = ((double)rng.rand() / rng.rand_max())*2-1; - q = ((double)rng.rand() / rng.rand_max())*2-1; - v = p*p + q*q; - } while(v > 1.0 || v <0.25); - - sqRatio = sqrt(-2*log((double)rand() / rng.rand_max()) / v); - phase = true; - return T( (sqRatio * p * sd) + mean ); - }; - - private: - T mean; - T sd; - bool phase; - double sqRatio, q; -}; - -//----------------------------------------------------------------------------- - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNormal.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EONORMAL_H +#define _EONORMAL_H + +//----------------------------------------------------------------------------- + +#include +#include // for base class +#include // for random number generator + +//----------------------------------------------------------------------------- +// Class eoNormal +//----------------------------------------------------------------------------- + +/// Generates random number using a normal distribution +template +class eoNormal: public eoRnd +{ + public: + /** + * Default constructor. + * @param _mean Dsitribution mean + * @param _sd Standard Deviation + */ + eoNormal(T _mean, T _sd) + : eoRnd(), mean(_mean), sd(_sd), phase(false) {} + + /** + * Copy constructor. + * @param _rnd the other one + */ + eoNormal( const eoNormal& _rnd ) + : eoRnd( _rnd), mean(_rnd.mean), sd(_rnd.sd), phase(false) {} + + /** Returns an uniform random number over the interval [min, max). + @return an uniform random number over the interval [min, max). + */ + virtual T operator()() { + if (phase) { // Already have one stored up. + phase = false; + return T ( (sqRatio * q * sd) + mean ); + } + + double p, v; + do { + p = ((double)rng.rand() / rng.rand_max())*2-1; + q = ((double)rng.rand() / rng.rand_max())*2-1; + v = p*p + q*q; + } while(v > 1.0 || v <0.25); + + sqRatio = sqrt(-2*log((double)rand() / rng.rand_max()) / v); + phase = true; + return T( (sqRatio * p * sd) + mean ); + }; + + private: + T mean; + T sd; + bool phase; + double sqRatio, q; +}; + +//----------------------------------------------------------------------------- + +#endif + diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 0e2e9e682..82724ac2c 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -1,68 +1,69 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoObject.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOOBJECT_H -#define EOOBJECT_H - -//----------------------------------------------------------------------------- - -#include // For limits definition -#include // istream, ostream -#include // string - -#include "compatibility.h" - -using namespace std; - -//----------------------------------------------------------------------------- -// eoObject -//----------------------------------------------------------------------------- -/** -This is the base class for the whole hierarchy; an eoObject defines -basically an interface for the whole hierarchy: each object should -know its name (#className#). Previously, this object defined a print and read -interface, but it´s been moved to eoPrintable and eoPersistent. - */ -class eoObject -{ - public: - - /// Default Constructor. - eoObject() {} - - /// Copy constructor. - eoObject( const eoObject& ) {} - - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoObject() {} - - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return "eoObject"; } - -}; - -#endif EOOBJECT_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoObject.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOOBJECT_H +#define EOOBJECT_H + +//----------------------------------------------------------------------------- + +#include // For limits definition +#include // istream, ostream +#include // string + +#include "compatibility.h" + +using namespace std; + +//----------------------------------------------------------------------------- +// eoObject +//----------------------------------------------------------------------------- +/** +This is the base class for the whole hierarchy; an eoObject defines +basically an interface for the whole hierarchy: each object should +know its name (#className#). Previously, this object defined a print and read +interface, but it´s been moved to eoPrintable and eoPersistent. + */ +class eoObject +{ + public: + + /// Default Constructor. + eoObject() {} + + /// Copy constructor. + eoObject( const eoObject& ) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoObject() {} + + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return "eoObject"; } + +}; + +#endif EOOBJECT_H + diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index dc81878c2..232606c4a 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,235 +1,236 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) -as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, -those are the ones actually used here.\\ - -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ - - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - -//@{ - enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; -/// - - /// Ctor - eoOp(OpType _type) - :opType( _type ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :opType( _eop.opType ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// getType: number of operands it takes and individuals it produces - OpType getType() const {return opType;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className().c_str(); - // _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - -private: - /// OpType is the type of the operator: how many operands it takes and how many it produces - OpType opType; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies only the first operand. - */ - virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** Quadratic genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoQuadraticOp: public eoOp { -public: - - /// Ctor - eoQuadraticOp() - :eoOp( eoOp::quadratic ) {}; - - /// Copy Ctor - eoQuadraticOp( const eoQuadraticOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoQuadraticOp() {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - : eoOp( eoOp::unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} -}; - -// some forward declarations -template -class eoIndiSelector; - -template -class eoInserter; - -/** - * eGeneralOp: General genetic operator; for objects used to transform sets - of EOs. Nary ("orgy") operators should be derived from this class -*/ -template -class eoGeneralOp: public eoOp -{ -public: - - /// Ctor that honors its superclass - eoGeneralOp(): eoOp( eoOp::general ) {}; - - /// Virtual dtor - virtual ~eoGeneralOp () {}; - - /** Method that really does the stuff. Applies the genetic operator - to a individuals dispensed by an eoIndividualSelector, - and puts the results in the eoIndividualInserter. - Any number of inputs can be requested and any number of outputs - can be produced. - */ - virtual void operator()( eoIndiSelector& _in, - eoInserter& _out) const = 0; - - virtual string className() const {return "eoGeneralOp";}; -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) +as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, +those are the ones actually used here.\\ + +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. +@author GeNeura Team +@version 0.1 +@see eoOpFactory +*/ + + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + +//@{ + enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; +/// + + /// Ctor + eoOp(OpType _type) + :opType( _type ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :opType( _eop.opType ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// getType: number of operands it takes and individuals it produces + OpType getType() const {return opType;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className().c_str(); + // _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + +private: + /// OpType is the type of the operator: how many operands it takes and how many it produces + OpType opType; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. Modifies only the first operand. + */ + virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** Quadratic genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoQuadraticOp: public eoOp { +public: + + /// Ctor + eoQuadraticOp() + :eoOp( eoOp::quadratic ) {}; + + /// Copy Ctor + eoQuadraticOp( const eoQuadraticOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoQuadraticOp() {}; + + /** applies operator, to the object. Modifies both operands. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + : eoOp( eoOp::unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} +}; + +// some forward declarations +template +class eoIndiSelector; + +template +class eoInserter; + +/** + * eGeneralOp: General genetic operator; for objects used to transform sets + of EOs. Nary ("orgy") operators should be derived from this class +*/ +template +class eoGeneralOp: public eoOp +{ +public: + + /// Ctor that honors its superclass + eoGeneralOp(): eoOp( eoOp::general ) {}; + + /// Virtual dtor + virtual ~eoGeneralOp () {}; + + /** Method that really does the stuff. Applies the genetic operator + to a individuals dispensed by an eoIndividualSelector, + and puts the results in the eoIndividualInserter. + Any number of inputs can be requested and any number of outputs + can be produced. + */ + virtual void operator()( eoIndiSelector& _in, + eoInserter& _out) const = 0; + + virtual string className() const {return "eoGeneralOp";}; +}; + + +#endif + diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 2790534ea..9bb767915 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -1,14 +1,15 @@ -#include - -//Implementation of these objects - -//----------------------------------------------------------------------------- - -istream & operator >> ( istream& _is, eoPersistent& _o ) { - _o.readFrom(_is); - return _is; -}; - -#include "eoRNG.h" - -eoRng rng; +#include + +//Implementation of these objects + +//----------------------------------------------------------------------------- + +istream & operator >> ( istream& _is, eoPersistent& _o ) { + _o.readFrom(_is); + return _is; +}; + +#include "eoRNG.h" + +eoRng rng; + diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index 2902e732d..f02b4f5d6 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -1,70 +1,74 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoPersistent.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPERSISTENT_H -#define EOPERSISTENT_H - -/// @name variables Some definitions of variables used throughout the program -//@{ -/// max length to store stuff read -const unsigned MAXLINELENGTH=1024; -//@} - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string - -//----------------------------------------------------------------------------- -#include - -using namespace std; - -//----------------------------------------------------------------------------- -// eoPersistent -//----------------------------------------------------------------------------- -/** -An persistent object that knows how to write (through functions inherited from -#eoPrintable#) and read itself - */ -class eoPersistent: public eoPrintable -{ - public: - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoPersistent() {} - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) = 0; - -}; - -//----------------------------------------------------------------------------- -///Standard input for all objects in the EO hierarchy -istream & operator >> ( istream& _is, eoPersistent& _o ); - -#endif EOOBJECT_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoPersistent.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPERSISTENT_H +#define EOPERSISTENT_H + +/// @name variables Some definitions of variables used throughout the program +//@{ +/// max length to store stuff read +const unsigned MAXLINELENGTH=1024; +//@} + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +//----------------------------------------------------------------------------- +#include + +using namespace std; + +//----------------------------------------------------------------------------- +// eoPersistent +//----------------------------------------------------------------------------- +/** +An persistent object that knows how to write (through functions inherited from +#eoPrintable#) and read itself + */ +class eoPersistent: public eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPersistent() {} + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) = 0; + +}; + +//----------------------------------------------------------------------------- +///Standard input for all objects in the EO hierarchy +istream & operator >> ( istream& _is, eoPersistent& _o ); + +#endif EOOBJECT_H + diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index ebd864909..d988b3eb6 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -1,160 +1,161 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoPop.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOPOP_H -#define _EOPOP_H - -#include -#include - -// EO includes -#include -#include -#include - -/** Subpopulation: it is used to move parts of population - from one algorithm to another and one population to another. It is safer -to declare it as a separate object. I have no idea if a population can be -some other thing that a vector, but if somebody thinks of it, this concrete -implementation will be moved to "generic" and an abstract Population -interface will be provided. -It can be instantiated with anything, provided that it accepts a "size" and a -random generator in the ctor. This happens to all the eo1d chromosomes declared -so far. EOT must also have a copy ctor, since temporaries are created and copied -to the population. -@author Geneura Team -@version 0.0 -*/ - -template -class eoPop: public vector, public eoObject, public eoPersistent { - -/// Type is the type of each gene in the chromosome -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes - */ - eoPop() :vector() {}; - - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd, eoEvalFunc& _eval) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - _eval(back()); - } - }; - - - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; - - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ - virtual void readFrom(istream& _is) { - while( _is ) { // reads line by line, and creates an object per - // line - char line[MAXLINELENGTH]; - _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT( s ); - push_back( thisEOT ); - } - } - } - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. In this case, prints the population to - standard output. The EOT class must hav standard output with cout, - but since it should be an eoObject anyways, it's no big deal. - */ - virtual void printOn(ostream& _os) const { - copy( begin(), end(), ostream_iterator( _os, "\n") ); - }; - - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoPop";}; - //@} - - protected: - -}; -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPop.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPOP_H +#define _EOPOP_H + +#include +#include + +// EO includes +#include +#include +#include + +/** Subpopulation: it is used to move parts of population + from one algorithm to another and one population to another. It is safer +to declare it as a separate object. I have no idea if a population can be +some other thing that a vector, but if somebody thinks of it, this concrete +implementation will be moved to "generic" and an abstract Population +interface will be provided. +It can be instantiated with anything, provided that it accepts a "size" and a +random generator in the ctor. This happens to all the eo1d chromosomes declared +so far. EOT must also have a copy ctor, since temporaries are created and copied +to the population. +@author Geneura Team +@version 0.0 +*/ + +template +class eoPop: public vector, public eoObject, public eoPersistent { + +/// Type is the type of each gene in the chromosome +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + public: + /** Protected ctor. This is intended to avoid creation of void populations, except + from sibling classes + */ + eoPop() :vector() {}; + + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for variable-size chromosomes, with variable content + @param _popSize total population size + @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + unsigned size = 1 + _sizeRnd(); + EOT tmpEOT( size, _geneRnd); + push_back( tmpEOT ); + } + }; + + /** Ctor for fixed-size chromosomes, with variable content + @param _popSize total population size + @param _eoSize chromosome size. EOT should accept a fixed-size ctor + @param _geneRdn random number generator for each of the genes + */ + eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd, eoEvalFunc& _eval) + :vector() { + for ( unsigned i = 0; i < _popSize; i ++ ){ + EOT tmpEOT( _eoSize, _geneRnd); + push_back( tmpEOT ); + _eval(back()); + } + }; + + + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /// + ~eoPop() {}; + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ + virtual void readFrom(istream& _is) { + while( _is ) { // reads line by line, and creates an object per + // line + char line[MAXLINELENGTH]; + _is.getline( line, MAXLINELENGTH-1 ); + if (strlen( line ) ) { + istrstream s( line ); + EOT thisEOT( s ); + push_back( thisEOT ); + } + } + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. In this case, prints the population to + standard output. The EOT class must hav standard output with cout, + but since it should be an eoObject anyways, it's no big deal. + */ + virtual void printOn(ostream& _os) const { + copy( begin(), end(), ostream_iterator( _os, "\n") ); + }; + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual string className() const {return "eoPop";}; + //@} + + protected: + +}; +#endif + diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index 9757d36c3..bf7c4ccb8 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -1,62 +1,63 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoPrintable.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPRINTABLE_H -#define EOPRINTABLE_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoPrintable -//----------------------------------------------------------------------------- -/** -Base class for objects that can print themselves -(#printOn#). Besides, this file defines the standard output for all the objects; -if the objects define printOn there's no need to define #operator <<#.\\ -This functionality was separated from eoObject, since it makes no sense to print -some objects (for instance, a #eoFactory# or a random number generator. - */ -class eoPrintable -{ - public: - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoPrintable() {} - - /** - * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const = 0; -}; - -//----------------------------------------------------------------------------- -///Standard output for all objects in the EO hierarchy -ostream & operator << ( ostream& _os, const eoPrintable& _o ); - -#endif EOPRINTABLE_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPrintable.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPRINTABLE_H +#define EOPRINTABLE_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoPrintable +//----------------------------------------------------------------------------- +/** +Base class for objects that can print themselves +(#printOn#). Besides, this file defines the standard output for all the objects; +if the objects define printOn there's no need to define #operator <<#.\\ +This functionality was separated from eoObject, since it makes no sense to print +some objects (for instance, a #eoFactory# or a random number generator. + */ +class eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPrintable() {} + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const = 0; +}; + +//----------------------------------------------------------------------------- +///Standard output for all objects in the EO hierarchy +ostream & operator << ( ostream& _os, const eoPrintable& _o ); + +#endif EOPRINTABLE_H + diff --git a/eo/src/eoProblem.h b/eo/src/eoProblem.h index 892a14e48..5c219123e 100644 --- a/eo/src/eoProblem.h +++ b/eo/src/eoProblem.h @@ -1,40 +1,45 @@ -//----------------------------------------------------------------------------- -// eoProblem.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPROBLEM_H -#define EOPROBLEM_H - -//----------------------------------------------------------------------------- - -template class Problem -{ - public: - typedef T Chrom; - typedef typename T::Gene Gene; - typedef typename T::Fitness Fitness; - - virtual Fitness operator()(const Chrom& chrom) = 0; -}; - -//----------------------------------------------------------------------------- - -#endif EOPROBLEM_H +//----------------------------------------------------------------------------- + +// eoProblem.h + +// (c) GeNeura Team 1998 + +/* + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPROBLEM_H +#define EOPROBLEM_H + +//----------------------------------------------------------------------------- + +template class Problem +{ + public: + typedef T Chrom; + typedef typename T::Gene Gene; + typedef typename T::Fitness Fitness; + + virtual Fitness operator()(const Chrom& chrom) = 0; +}; + +//----------------------------------------------------------------------------- + +#endif EOPROBLEM_H + diff --git a/eo/src/eoProportionalGOpSelector.h b/eo/src/eoProportionalGOpSelector.h index 6a1b2d971..580b7bf1a 100644 --- a/eo/src/eoProportionalGOpSelector.h +++ b/eo/src/eoProportionalGOpSelector.h @@ -1,54 +1,55 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoProportionalGOpSelector.h - Proportional Generalized Operator Selector. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoProportionalGOpSelector_h -#define eoProportionalGOpSelector_h - -//----------------------------------------------------------------------------- - -#include "eoGOpSelector.h" - -/** eoProportionalGOpSel: do proportional selection, returns one of the - operators -*/ -template -class eoProportionalGOpSel : public eoGOpSelector -{ -public : - eoProportionalGOpSel() : eoGOpSelector() {} - - /** Returns the operator proportionally selected */ - virtual eoGeneralOp& selectOp() - { - unsigned what = rng.roulette_wheel(getRates()); - return *operator[](what); - } - - /// - virtual string className() const { return "eoGOpSelector"; }; -}; - -#endif - +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoProportionalGOpSelector.h + Proportional Generalized Operator Selector. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoProportionalGOpSelector_h +#define eoProportionalGOpSelector_h + +//----------------------------------------------------------------------------- + +#include "eoGOpSelector.h" + +/** eoProportionalGOpSel: do proportional selection, returns one of the + operators +*/ +template +class eoProportionalGOpSel : public eoGOpSelector +{ +public : + eoProportionalGOpSel() : eoGOpSelector() {} + + /** Returns the operator proportionally selected */ + virtual eoGeneralOp& selectOp() + { + unsigned what = rng.roulette_wheel(getRates()); + return *operator[](what); + } + + /// + virtual string className() const { return "eoGOpSelector"; }; +}; + +#endif + + diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index 1ea9fbc68..0a48a6209 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -1,154 +1,159 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoProportionalOpSel.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPROPORTIONALOPSEL_H -#define EOPROPORTIONALOPSEL_H - -//----------------------------------------------------------------------------- - -#include // runtime_error -#include // greater -#include - -// Includes from EO -#include -#include -#include - -//----------------------------------------------------------------------------- -/** This class selects operators according to probability. All operator percentages -should add up to one; if not, an exception will be raised.\\ -Operators are represented as pairs (proportion,operator) -*/ -template -class eoProportionalOpSel: public eoOpSelector, - public multimap*,greater > -{ -public: - - typedef multimap*,greater > MMF; - - /// default ctor - eoProportionalOpSel() - : eoOpSelector(), MMF(), opID(1) {}; - - /// virtual dtor - virtual ~eoProportionalOpSel() {}; - - /** Gets a non-const reference to an operator, so that it can be changed, - modified or whatever - @param _id a previously assigned ID - @throw runtime_error if the ID does not exist*/ - - virtual eoOp& getOp( ID _id ) { - MMF::iterator i=begin(); - ID j = 1; - while ( (i++!=end()) && (j++ != _id) ); - if ( i == end() ) - throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); - return *(i->second); - //return i->second; - } - - /** add an operator to the operator set - @param _op a genetic operator, that will be applied in some way - @param _arg an argument to the operator, usually operator rate - @return an ID that will be used to identify the operator - */ - virtual ID addOp( eoOp& _op, float _arg ) { - insert( MMF::value_type( _arg,& _op ) ); - return opID++; - } - - /** Remove an operator from the operator set - @param _id a previously assigned ID - @throw runtime_error if the ID does not exist - */ - virtual void deleteOp( ID _id ) { - unsigned j; - MMF::iterator i; - for ( i=begin(), j=1; i!=end(); i++,j++ ) { - if( j == _id ) - erase( i ); - return; - } - if ( i == end() ) - throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); - }; - - /// Returns a genetic operator according to the established criteria - virtual eoOp* Op() { - // Check that all add up to one - float acc = 0; - MMF::iterator i; - unsigned j; - for ( i=begin(), j=1; i!=end(); i++,j++ ) { - acc +=i->first; - } - if ( acc != 1.0 ) - throw runtime_error( "Operator rates added up different from 1.0" ); - - // If here, operators ordered by rate and no problem - eoUniform u(0,1.0); - float aRnd = u(); - i=begin(); - acc = 0; - do { - acc += i->first; - } while ( (acc <= aRnd ) && (i++!=end() ) ); - if ( i == end() ) - throw runtime_error( "Operator not found in eoProportionalOpSelector" ); - return i->second; - //return i->second; - } - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - @return the class name as a string - */ - virtual string className() const { return "eoProportionalOpSel"; }; - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - it can be reimplemented anywhere. Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - _s << className().c_str() << endl; - for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { - _s << i->first << "\t" << *(i->second )<< endl; - } - } - - - //@} - - private: - ID opID; - }; - - //----------------------------------------------------------------------------- - -#endif EO_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoProportionalOpSel.h + +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPROPORTIONALOPSEL_H +#define EOPROPORTIONALOPSEL_H + +//----------------------------------------------------------------------------- + +#include // runtime_error +#include // greater +#include + +// Includes from EO +#include +#include +#include + +//----------------------------------------------------------------------------- +/** This class selects operators according to probability. All operator percentages +should add up to one; if not, an exception will be raised.\\ +Operators are represented as pairs (proportion,operator) +*/ +template +class eoProportionalOpSel: public eoOpSelector, + public multimap*,greater > +{ +public: + + typedef multimap*,greater > MMF; + + /// default ctor + eoProportionalOpSel() + : eoOpSelector(), MMF(), opID(1) {}; + + /// virtual dtor + virtual ~eoProportionalOpSel() {}; + + /** Gets a non-const reference to an operator, so that it can be changed, + modified or whatever + @param _id a previously assigned ID + @throw runtime_error if the ID does not exist*/ + + virtual eoOp& getOp( ID _id ) { + MMF::iterator i=begin(); + ID j = 1; + while ( (i++!=end()) && (j++ != _id) ); + if ( i == end() ) + throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); + return *(i->second); + //return i->second; + } + + /** add an operator to the operator set + @param _op a genetic operator, that will be applied in some way + @param _arg an argument to the operator, usually operator rate + @return an ID that will be used to identify the operator + */ + virtual ID addOp( eoOp& _op, float _arg ) { + insert( MMF::value_type( _arg,& _op ) ); + return opID++; + } + + /** Remove an operator from the operator set + @param _id a previously assigned ID + @throw runtime_error if the ID does not exist + */ + virtual void deleteOp( ID _id ) { + unsigned j; + MMF::iterator i; + for ( i=begin(), j=1; i!=end(); i++,j++ ) { + if( j == _id ) + erase( i ); + return; + } + if ( i == end() ) + throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); + }; + + /// Returns a genetic operator according to the established criteria + virtual eoOp* Op() { + // Check that all add up to one + float acc = 0; + MMF::iterator i; + unsigned j; + for ( i=begin(), j=1; i!=end(); i++,j++ ) { + acc +=i->first; + } + if ( acc != 1.0 ) + throw runtime_error( "Operator rates added up different from 1.0" ); + + // If here, operators ordered by rate and no problem + eoUniform u(0,1.0); + float aRnd = u(); + i=begin(); + acc = 0; + do { + acc += i->first; + } while ( (acc <= aRnd ) && (i++!=end() ) ); + if ( i == end() ) + throw runtime_error( "Operator not found in eoProportionalOpSelector" ); + return i->second; + //return i->second; + } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + @return the class name as a string + */ + virtual string className() const { return "eoProportionalOpSel"; }; + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + it can be reimplemented anywhere. Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + _s << className().c_str() << endl; + for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { + _s << i->first << "\t" << *(i->second )<< endl; + } + } + + + //@} + + private: + ID opID; + }; + + //----------------------------------------------------------------------------- + +#endif EO_H + diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index b560e7c1b..18bf2566c 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -1,452 +1,453 @@ -/* -* Random number generator adapted from (see comments below) -* -* The random number generator is modified into a class -* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller -* transformation to generate normal deviates. -* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ - -// This is the ``Mersenne Twister'' random number generator MT19937, which -// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) -// starting from any odd seed in 0..(2^32 - 1). This version is a recode -// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by -// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in -// July-August 1997). -// -// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha -// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to -// generate 300 million random numbers; after recoding: 24.0 sec. for the same -// (i.e., 46.5% of original time), so speed is now about 12.5 million random -// number generations per second on this machine. -// -// According to the URL -// (and paraphrasing a bit in places), the Mersenne Twister is ``designed -// with consideration of the flaws of various existing generators,'' has -// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally -// equidistributed, and ``has passed many stringent tests, including the -// die-hard test of G. Marsaglia and the load test of P. Hellekalek and -// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 -// to 5012 bytes of static data, depending on data type sizes, and the code -// is quite short as well). It generates random numbers in batches of 624 -// at a time, so the caching and pipelining of modern systems is exploited. -// It is also divide- and mod-free. -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Library General Public License as published by -// the Free Software Foundation (either version 2 of the License or, at your -// option, any later version). This library is distributed in the hope that -// it will be useful, but WITHOUT ANY WARRANTY, without even the implied -// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU Library General Public License for more details. You should have -// received a copy of the GNU Library General Public License along with this -// library; if not, write to the Free Software Foundation, Inc., 59 Temple -// Place, Suite 330, Boston, MA 02111-1307, USA. -// -// The code as Shawn received it included the following notice: -// -// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When -// you use this, send an e-mail to with -// an appropriate reference to your work. -// -// It would be nice to CC: when you write. -// - -// -// uint32 must be an unsigned integer type capable of holding at least 32 -// bits; exactly 32 should be fastest, but 64 is better on an Alpha with -// GCC at -O3 optimization so try your options and see what's best for you -// - -/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ - - -#ifndef EO_RANDOM_NUMBER_GENERATOR -#define EO_RANDOM_NUMBER_GENERATOR - -#include - -#include -#include - -// TODO: check for various compilers if this is exactly 32 bits -// Unfortunately MSVC's preprocessor does not comprehends sizeof() -// so neat preprocessing tricks will not work - -typedef unsigned long uint32; // Compiler and platform dependent! - -//----------------------------------------------------------------------------- -// eoRng -//----------------------------------------------------------------------------- -/** -eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 -for generating random numbers. The various member functions implement useful functions -for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). - -Note for people porting EO to other platforms: please make sure that the typedef -uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not -shorter. If it is longer, file compatibility between EO on different platforms -may be broken. -*/ -class eoRng : public eoObject, public eoPersistent -{ -public : - /** - ctor takes a random seed; if you want another seed, use reseed - @see reseed - */ - - eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { - state = new uint32[N+1]; - initialize(s); - } - - ~eoRng(void) - { - delete [] state; - } - - /** - Re-initializes the Random Number Generator. - */ - void reseed(uint32 s) - { - initialize(s); - } - - /** - uniform(m = 1.0) returns a random double in the range [0, m) - */ - double uniform(double m = 1.0) - { // random number between [0, m] - return m * double(rand()) / double(rand_max()); - } - - /** - random() returns a random integer in the range [0, m) - */ - uint32 random(uint32 m) - { - return uint32(uniform() * double(m)); - } - - /** - flip() tosses a biased coin such that flip(x/100.0) will - returns true x% of the time - */ - bool flip(float bias) - { - return uniform() < bias; - } - - /** - normal() zero mean gaussian deviate with standard deviation of 1 - */ - double normal(void); // gaussian mutation, stdev 1 - - /** - normal(stdev) zero mean gaussian deviate with user defined standard deviation - */ - double normal(double stdev) - { - return stdev * normal(); - } - - /** - normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation - */ - double normal(double mean, double stdev) - { - return mean + normal(stdev); - } - - /** - rand() returns a random number in the range [0, rand_max) - */ - uint32 rand(); - - /** - rand_max() the maximum returned by rand() - */ - uint32 rand_max(void) const { return (uint32) 0xffffffff; } - - /** - roulette_wheel(vec, total = 0) does a roulette wheel selection - on the input vector vec. If the total is not supplied, it is - calculated. It returns an integer denoting the selected argument. - */ - template - int roulette_wheel(const std::vector& vec, T total = 0) - { - if (total == 0) - { // count - for (int i = 0; i < vec.size(); ++i) - total += vec[i]; - } - - float change = uniform() * total; - - int i = 0; - - while (change > 0) - { - change -= vec[i++]; - } - - return --i; - } - - /// - void printOn(ostream& _os) const - { - for (int i = 0; i < N; ++i) - { - _os << state[i] << ' '; - } - _os << int(next - state) << ' '; - _os << left << ' ' << cached << ' ' << cacheValue; - } - - /// - void readFrom(istream& _is) - { - for (int i = 0; i < N; ++i) - { - _is >> state[i]; - } - - int n; - _is >> n; - next = state + n; - - _is >> left; - _is >> cached; - _is >> cacheValue; - } - - -private : - uint32 restart(void); - void initialize(uint32 seed); - - uint32* state; // the array for the state - uint32* next; - int left; - - bool cached; - float cacheValue; - - const int N; - const int M; - const uint32 K; // a magic constant - - /** - Private copy ctor and assignment operator to make sure that - nobody accidentally copies the random number generator. - If you want similar RNG's, make two RNG's and initialize - them with the same seed. - */ - eoRng (const eoRng&); // no implementation - eoRng& operator=(const eoRng&); // dito -}; - -/** - The one and only global eoRng object -*/ -extern eoRng rng; - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -// Implementation of some eoRng members.... Don't mind the mess, it does work. - - -#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u -#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u -#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u -#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v - -inline void eoRng::initialize(uint32 seed) - { - // - // We initialize state[0..(N-1)] via the generator - // - // x_new = (69069 * x_old) mod 2^32 - // - // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's - // _The Art of Computer Programming_, Volume 2, 3rd ed. - // - // Notes (SJC): I do not know what the initial state requirements - // of the Mersenne Twister are, but it seems this seeding generator - // could be better. It achieves the maximum period for its modulus - // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if - // x_initial can be even, you have sequences like 0, 0, 0, ...; - // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, - // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. - // - // Even if x_initial is odd, if x_initial is 1 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 0, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , - // ... - // - // and if x_initial is 3 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 1, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , - // ... - // - // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is - // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It - // also does well in the dimension 2..5 spectral tests, but it could be - // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). - // - // Note that the random number user does not see the values generated - // here directly since restart() will always munge them first, so maybe - // none of all of this matters. In fact, the seed values made here could - // even be extra-special desirable if the Mersenne Twister theory says - // so-- that's why the only change I made is to restrict to odd seeds. - // - - left = -1; - - register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; - register int j; - - for(left=0, *s++=x, j=N; --j; - *s++ = (x*=69069U) & 0xFFFFFFFFU); - } - - -inline uint32 eoRng::restart(void) -{ - register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; - register int j; - - left=N-1, next=state+1; - - for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - for(pM=state, j=M; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - s1 ^= (s1 >> 11); - s1 ^= (s1 << 7) & 0x9D2C5680U; - s1 ^= (s1 << 15) & 0xEFC60000U; - return(s1 ^ (s1 >> 18)); -} - - -inline uint32 eoRng::rand(void) - { - uint32 y; - - if(--left < 0) - return(restart()); - - y = *next++; - y ^= (y >> 11); - y ^= (y << 7) & 0x9D2C5680U; - y ^= (y << 15) & 0xEFC60000U; - return(y ^ (y >> 18)); - } - -inline double eoRng::normal(void) -{ - if (cached) - { - cached = false; - return cacheValue; - } - - float rSquare, factor, var1, var2; - - do - { - var1 = 2.0 * uniform() - 1.0; - var2 = 2.0 * uniform() - 1.0; - - rSquare = var1 * var1 + var2 * var2; - } - while (rSquare >= 1.0 || rSquare == 0.0); - - factor = sqrt(-2.0 * log(rSquare) / rSquare); - - cacheValue = var1 * factor; - cached = true; - - return (var2 * factor); -} - -#endif +/* +* Random number generator adapted from (see comments below) +* +* The random number generator is modified into a class +* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +* transformation to generate normal deviates. +* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ + +// This is the ``Mersenne Twister'' random number generator MT19937, which +// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) +// starting from any odd seed in 0..(2^32 - 1). This version is a recode +// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by +// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in +// July-August 1997). +// +// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +// generate 300 million random numbers; after recoding: 24.0 sec. for the same +// (i.e., 46.5% of original time), so speed is now about 12.5 million random +// number generations per second on this machine. +// +// According to the URL +// (and paraphrasing a bit in places), the Mersenne Twister is ``designed +// with consideration of the flaws of various existing generators,'' has +// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally +// equidistributed, and ``has passed many stringent tests, including the +// die-hard test of G. Marsaglia and the load test of P. Hellekalek and +// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 +// to 5012 bytes of static data, depending on data type sizes, and the code +// is quite short as well). It generates random numbers in batches of 624 +// at a time, so the caching and pipelining of modern systems is exploited. +// It is also divide- and mod-free. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Library General Public License as published by +// the Free Software Foundation (either version 2 of the License or, at your +// option, any later version). This library is distributed in the hope that +// it will be useful, but WITHOUT ANY WARRANTY, without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU Library General Public License for more details. You should have +// received a copy of the GNU Library General Public License along with this +// library; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307, USA. +// +// The code as Shawn received it included the following notice: +// +// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When +// you use this, send an e-mail to with +// an appropriate reference to your work. +// +// It would be nice to CC: when you write. +// + +// +// uint32 must be an unsigned integer type capable of holding at least 32 +// bits; exactly 32 should be fastest, but 64 is better on an Alpha with +// GCC at -O3 optimization so try your options and see what's best for you +// + +/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ + + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + +#include + +#include +#include + +// TODO: check for various compilers if this is exactly 32 bits +// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// so neat preprocessing tricks will not work + +typedef unsigned long uint32; // Compiler and platform dependent! + +//----------------------------------------------------------------------------- +// eoRng +//----------------------------------------------------------------------------- +/** +eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +for generating random numbers. The various member functions implement useful functions +for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). + +Note for people porting EO to other platforms: please make sure that the typedef +uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not +shorter. If it is longer, file compatibility between EO on different platforms +may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + /** + ctor takes a random seed; if you want another seed, use reseed + @see reseed + */ + + eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { + state = new uint32[N+1]; + initialize(s); + } + + ~eoRng(void) + { + delete [] state; + } + + /** + Re-initializes the Random Number Generator. + */ + void reseed(uint32 s) + { + initialize(s); + } + + /** + uniform(m = 1.0) returns a random double in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(rand_max()); + } + + /** + random() returns a random integer in the range [0, m) + */ + uint32 random(uint32 m) + { + return uint32(uniform() * double(m)); + } + + /** + flip() tosses a biased coin such that flip(x/100.0) will + returns true x% of the time + */ + bool flip(float bias) + { + return uniform() < bias; + } + + /** + normal() zero mean gaussian deviate with standard deviation of 1 + */ + double normal(void); // gaussian mutation, stdev 1 + + /** + normal(stdev) zero mean gaussian deviate with user defined standard deviation + */ + double normal(double stdev) + { + return stdev * normal(); + } + + /** + normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation + */ + double normal(double mean, double stdev) + { + return mean + normal(stdev); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32 rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32 rand_max(void) const { return (uint32) 0xffffffff; } + + /** + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, T total = 0) + { + if (total == 0) + { // count + for (int i = 0; i < vec.size(); ++i) + total += vec[i]; + } + + float change = uniform() * total; + + int i = 0; + + while (change > 0) + { + change -= vec[i++]; + } + + return --i; + } + + /// + void printOn(ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /// + void readFrom(istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + +private : + uint32 restart(void); + void initialize(uint32 seed); + + uint32* state; // the array for the state + uint32* next; + int left; + + bool cached; + float cacheValue; + + const int N; + const int M; + const uint32 K; // a magic constant + + /** + Private copy ctor and assignment operator to make sure that + nobody accidentally copies the random number generator. + If you want similar RNG's, make two RNG's and initialize + them with the same seed. + */ + eoRng (const eoRng&); // no implementation + eoRng& operator=(const eoRng&); // dito +}; + +/** + The one and only global eoRng object +*/ +extern eoRng rng; + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + +inline void eoRng::initialize(uint32 seed) + { + // + // We initialize state[0..(N-1)] via the generator + // + // x_new = (69069 * x_old) mod 2^32 + // + // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's + // _The Art of Computer Programming_, Volume 2, 3rd ed. + // + // Notes (SJC): I do not know what the initial state requirements + // of the Mersenne Twister are, but it seems this seeding generator + // could be better. It achieves the maximum period for its modulus + // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if + // x_initial can be even, you have sequences like 0, 0, 0, ...; + // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, + // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. + // + // Even if x_initial is odd, if x_initial is 1 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 0, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + // ... + // + // and if x_initial is 3 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 1, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + // ... + // + // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is + // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It + // also does well in the dimension 2..5 spectral tests, but it could be + // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + // + // Note that the random number user does not see the values generated + // here directly since restart() will always munge them first, so maybe + // none of all of this matters. In fact, the seed values made here could + // even be extra-special desirable if the Mersenne Twister theory says + // so-- that's why the only change I made is to restrict to odd seeds. + // + + left = -1; + + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU); + } + + +inline uint32 eoRng::restart(void) +{ + register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + +inline uint32 eoRng::rand(void) + { + uint32 y; + + if(--left < 0) + return(restart()); + + y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); + } + +inline double eoRng::normal(void) +{ + if (cached) + { + cached = false; + return cacheValue; + } + + float rSquare, factor, var1, var2; + + do + { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + + rSquare = var1 * var1 + var2 * var2; + } + while (rSquare >= 1.0 || rSquare == 0.0); + + factor = sqrt(-2.0 * log(rSquare) / rSquare); + + cacheValue = var1 * factor; + cached = true; + + return (var2 * factor); +} + +#endif + diff --git a/eo/src/eoRandomIndiSelector.h b/eo/src/eoRandomIndiSelector.h index 2be2ba4cc..6eceec850 100644 --- a/eo/src/eoRandomIndiSelector.h +++ b/eo/src/eoRandomIndiSelector.h @@ -1,51 +1,52 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoRandomIndiSelector.h - Selects individuals at random. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoRandomIndiSelector_h -#define eoRandomIndiSelector_h - -#include "eoIndiSelector.h" - -/** - * eoRandomSelector: just selects a random child -*/ -template -class eoRandomIndiSelector : public eoPopIndiSelector -{ - public : - - eoRandomIndiSelector(void) : eoPopIndiSelector() {} - virtual ~eoRandomIndiSelector(void) {} - - /// very complex function that returns just an individual - const EOT& do_select(void) - { - return operator[](rng.random(size())); - } - -}; - -#endif - +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoRandomIndiSelector.h + Selects individuals at random. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoRandomIndiSelector_h +#define eoRandomIndiSelector_h + +#include "eoIndiSelector.h" + +/** + * eoRandomSelector: just selects a random child +*/ +template +class eoRandomIndiSelector : public eoPopIndiSelector +{ + public : + + eoRandomIndiSelector(void) : eoPopIndiSelector() {} + virtual ~eoRandomIndiSelector(void) {} + + /// very complex function that returns just an individual + const EOT& do_select(void) + { + return operator[](rng.random(size())); + } + +}; + +#endif + + diff --git a/eo/src/eoSequentialGOpSelector.h b/eo/src/eoSequentialGOpSelector.h index 5d8990412..e702c4b8b 100644 --- a/eo/src/eoSequentialGOpSelector.h +++ b/eo/src/eoSequentialGOpSelector.h @@ -1,61 +1,62 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoSequentialGOpSelector.h - Sequential Generalized Operator Selector. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoSequentialGOpSelector_h -#define eoSequentialGOpSelector_h - -//----------------------------------------------------------------------------- - -#include "eoGOpSelector.h" -/** eoSequentialGOpSel: do proportional selection, but return a sequence of - operations to be applied one after the other. -*/ -template -class eoSequentialGOpSel : public eoGOpSelector -{ - public : - - virtual eoGeneralOp& selectOp() - { - combined.clear(); - - for (int i = 0; i < size(); ++i) - { - if (operator[](i) == 0) - continue; - - if (rng.flip(getRates()[i])) - combined.addOp(operator[](i)); - } - - return combined; - } - - private : - - eoCombinedOp combined; -}; - -#endif +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSequentialGOpSelector.h + Sequential Generalized Operator Selector. + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoSequentialGOpSelector_h +#define eoSequentialGOpSelector_h + +//----------------------------------------------------------------------------- + +#include "eoGOpSelector.h" +/** eoSequentialGOpSel: do proportional selection, but return a sequence of + operations to be applied one after the other. +*/ +template +class eoSequentialGOpSel : public eoGOpSelector +{ + public : + + virtual eoGeneralOp& selectOp() + { + combined.clear(); + + for (int i = 0; i < size(); ++i) + { + if (operator[](i) == 0) + continue; + + if (rng.flip(getRates()[i])) + combined.addOp(operator[](i)); + } + + return combined; + } + + private : + + eoCombinedOp combined; +}; + +#endif + diff --git a/eo/src/eoSteadyStateEA.h b/eo/src/eoSteadyStateEA.h index 6a0b5abfa..824c67a73 100644 --- a/eo/src/eoSteadyStateEA.h +++ b/eo/src/eoSteadyStateEA.h @@ -1,86 +1,87 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSteadyStateEA.h -// (c) GeNeura Team, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoSteadyStateEA_h -#define _eoSteadyStateEA_h - -//----------------------------------------------------------------------------- - -#include "eoSteadyStateGeneration.h" // eoPop -#include - -/** EOSteadyStateEA: - An easy-to-use evolutionary algorithm, just supply - a general operator selector, a selector for choosing the ones - to reproduce and an eoSteadyStateInserter that takes care of evaluating - and inserter the guy/girl in the steady state population. -*/ -template class eoSteadyStateEA: public eoAlgo -{ - public: - /// Constructor. - eoSteadyStateEA( - eoGOpSelector& _opSelector, - eoPopIndiSelector& _selector, - eoSteadyStateInserter& _inserter, - eoTerm& _terminator, - unsigned _steps = 0 ) - : step(_opSelector, _selector, _inserter), - terminator( _terminator) - {}; - - /// Constructor from an already created generation - eoSteadyStateEA(eoSteadyStateGeneration& _gen, - eoTerm& _terminator): - step(_gen), - terminator( _terminator){}; - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - do { - try - { - step(pop); - } - catch (exception& e) - { - string s = e.what(); - s.append( " in eoSteadyStateEA "); - throw runtime_error( s ); - } - } while ( terminator( pop ) ); - - } - - /// Class name. - string className() const { return "eoSteadyStateEA"; } - - private: - eoSteadyStateGeneration step; - eoTerm& terminator; -}; - -//----------------------------------------------------------------------------- - -#endif eoEasyEA_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSteadyStateEA.h +// (c) GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSteadyStateEA_h +#define _eoSteadyStateEA_h + +//----------------------------------------------------------------------------- + +#include "eoSteadyStateGeneration.h" // eoPop +#include + +/** EOSteadyStateEA: + An easy-to-use evolutionary algorithm, just supply + a general operator selector, a selector for choosing the ones + to reproduce and an eoSteadyStateInserter that takes care of evaluating + and inserter the guy/girl in the steady state population. +*/ +template class eoSteadyStateEA: public eoAlgo +{ + public: + /// Constructor. + eoSteadyStateEA( + eoGOpSelector& _opSelector, + eoPopIndiSelector& _selector, + eoSteadyStateInserter& _inserter, + eoTerm& _terminator, + unsigned _steps = 0 ) + : step(_opSelector, _selector, _inserter), + terminator( _terminator) + {}; + + /// Constructor from an already created generation + eoSteadyStateEA(eoSteadyStateGeneration& _gen, + eoTerm& _terminator): + step(_gen), + terminator( _terminator){}; + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) { + do { + try + { + step(pop); + } + catch (exception& e) + { + string s = e.what(); + s.append( " in eoSteadyStateEA "); + throw runtime_error( s ); + } + } while ( terminator( pop ) ); + + } + + /// Class name. + string className() const { return "eoSteadyStateEA"; } + + private: + eoSteadyStateGeneration step; + eoTerm& terminator; +}; + +//----------------------------------------------------------------------------- + +#endif eoEasyEA_h + diff --git a/eo/src/eoSteadyStateGeneration.h b/eo/src/eoSteadyStateGeneration.h index 1c1aeebcc..c055b1076 100644 --- a/eo/src/eoSteadyStateGeneration.h +++ b/eo/src/eoSteadyStateGeneration.h @@ -1,88 +1,89 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSteadyStateGeneration.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoSteadyStateGeneration_h -#define eoSteadyStateGeneration_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include -#include // eoSelect, eoTranform, eoMerge - -#include "eoGOpSelector.h" -#include "eoIndiSelector.h" -#include "eoSteadyStateInserter.h" - -//----------------------------------------------------------------------------- - -/** eoSteadyStateGeneration - * Single step of a steady state evolutionary algorithm. - * Proceeds by updating one individual at a time, by first selecting parents, - * creating one or more children and subsequently overwrite (a) bad individual(s) -*/ -template class eoSteadyStateGeneration: public eoAlgo -{ - public: - /// Constructor. - eoSteadyStateGeneration( - eoGOpSelector& _opSelector, - eoPopIndiSelector& _selector, - eoSteadyStateInserter& _inserter, - unsigned _steps = 0) : - opSelector(_opSelector), - selector(_selector), - inserter(_inserter) , - steps(_steps) {}; - - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) - { - unsigned nSteps = steps; - if (nSteps == 0) - { - nSteps = pop.size(); // make a 'generation equivalent' - } - - for (unsigned i = 0; i < nSteps; ++i) - { - opSelector.selectOp()(selector(pop), inserter(pop)); - } - - } - - /// Class name. - string className() const { return "eoSteadyStateGeneration"; } - - private: - eoGOpSelector& opSelector; - eoPopIndiSelector& selector; - eoSteadyStateInserter& inserter; - unsigned steps; -}; - -//----------------------------------------------------------------------------- - -#endif eoGeneration_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSteadyStateGeneration.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoSteadyStateGeneration_h +#define eoSteadyStateGeneration_h + +//----------------------------------------------------------------------------- + +#include // eoPop +#include +#include // eoSelect, eoTranform, eoMerge + +#include "eoGOpSelector.h" +#include "eoIndiSelector.h" +#include "eoSteadyStateInserter.h" + +//----------------------------------------------------------------------------- + +/** eoSteadyStateGeneration + * Single step of a steady state evolutionary algorithm. + * Proceeds by updating one individual at a time, by first selecting parents, + * creating one or more children and subsequently overwrite (a) bad individual(s) +*/ +template class eoSteadyStateGeneration: public eoAlgo +{ + public: + /// Constructor. + eoSteadyStateGeneration( + eoGOpSelector& _opSelector, + eoPopIndiSelector& _selector, + eoSteadyStateInserter& _inserter, + unsigned _steps = 0) : + opSelector(_opSelector), + selector(_selector), + inserter(_inserter) , + steps(_steps) {}; + + + /// Apply one generation of evolution to the population. + virtual void operator()(eoPop& pop) + { + unsigned nSteps = steps; + if (nSteps == 0) + { + nSteps = pop.size(); // make a 'generation equivalent' + } + + for (unsigned i = 0; i < nSteps; ++i) + { + opSelector.selectOp()(selector(pop), inserter(pop)); + } + + } + + /// Class name. + string className() const { return "eoSteadyStateGeneration"; } + + private: + eoGOpSelector& opSelector; + eoPopIndiSelector& selector; + eoSteadyStateInserter& inserter; + unsigned steps; +}; + +//----------------------------------------------------------------------------- + +#endif eoGeneration_h + diff --git a/eo/src/eoSteadyStateInserter.h b/eo/src/eoSteadyStateInserter.h index 26f299f70..d22642943 100644 --- a/eo/src/eoSteadyStateInserter.h +++ b/eo/src/eoSteadyStateInserter.h @@ -1,51 +1,51 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoSteadyStateInserter.h - Still abstract population insertion operator that is initialized with - and eoEvalFunc object to be able to evaluate individuals before inserting - them. - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoSteadyStateInserter_h -#define eoSteadyStateInserter_h - - -#include "eoEvalFunc.h" - -/** - * eoSteadyStateInserter: Interface class that enables an operator to update - * a population with a new individual... it contains an eoEvalFunc object to - * make sure that every individual is evaluated before it is inserted -*/ -template -class eoSteadyStateInserter : public eoPopInserter -{ - public : - eoSteadyStateInserter(eoEvalFunc& _eval) : eval(_eval) , eoPopInserter() {} - - protected : - - eoEvalFunc& eval; -}; - - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSteadyStateInserter.h + Still abstract population insertion operator that is initialized with + and eoEvalFunc object to be able to evaluate individuals before inserting + them. + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoSteadyStateInserter_h +#define eoSteadyStateInserter_h + + +#include "eoEvalFunc.h" + +/** + * eoSteadyStateInserter: Interface class that enables an operator to update + * a population with a new individual... it contains an eoEvalFunc object to + * make sure that every individual is evaluated before it is inserted +*/ +template +class eoSteadyStateInserter : public eoPopInserter +{ + public : + eoSteadyStateInserter(eoEvalFunc& _eval) : eval(_eval) , eoPopInserter() {} + + protected : + + eoEvalFunc& eval; +}; + + +#endif diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h index afc05d748..8a677262d 100644 --- a/eo/src/eoStochTournament.h +++ b/eo/src/eoStochTournament.h @@ -1,68 +1,69 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoStochTournament.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoStochTournament_h -#define eoStochTournament_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT -#include - -//----------------------------------------------------------------------------- -/** eoStochTournament: a selection method that selects ONE individual by - binary stochastic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - -template class eoStochTournament: public eoSelectOne -{ - public: - - /// - eoStochTournament(float _Trate = 1.0 ):eoSelectOne(), Trate(_Trate) { - // consistency check - if (Trate < 0.5) { - cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; - Trate = 0.55; - } - } - - /** DANGER: if you want to be able to minimize as well as maximizem - DON'T cast the fitness to a float, use the EOT comparator! */ - virtual const EOT& operator()(const eoPop& pop) - { - return stochastic_tournament(pop, Trate)(); - } - -private: - float Trate; -}; - -//----------------------------------------------------------------------------- - -#endif eoDetTournament_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochTournament.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoStochTournament_h +#define eoStochTournament_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoStochTournament: a selection method that selects ONE individual by + binary stochastic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoStochTournament: public eoSelectOne +{ + public: + + /// + eoStochTournament(float _Trate = 1.0 ):eoSelectOne(), Trate(_Trate) { + // consistency check + if (Trate < 0.5) { + cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + Trate = 0.55; + } + } + + /** DANGER: if you want to be able to minimize as well as maximizem + DON'T cast the fitness to a float, use the EOT comparator! */ + virtual const EOT& operator()(const eoPop& pop) + { + return stochastic_tournament(pop, Trate)(); + } + +private: + float Trate; +}; + +//----------------------------------------------------------------------------- + +#endif eoDetTournament_h + diff --git a/eo/src/eoStochTournamentInserter.h b/eo/src/eoStochTournamentInserter.h index f91b546f7..56bb8e709 100644 --- a/eo/src/eoStochTournamentInserter.h +++ b/eo/src/eoStochTournamentInserter.h @@ -1,73 +1,73 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoStochTournamentInserter.h - Concrete steady state inserter. It is initialized with a population and - inserts individuals in the population based on an inverse stochastic - tournament - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoStochTournamentInserter_h -#define eoStochTournamentInserter_h - - -#include "eoSteadyStateInserter.h" -#include "selectors.h" - -/** - * eoDetTournamentInserter: Uses an inverse stochastic tournament to figure - * out who gets overridden by the new individual. It resets the fitness of the - * individual. -*/ -template -class eoStochTournamentInserter : public eoSteadyStateInserter -{ - public : - - eoStochTournamentInserter(eoEvalFunc& _eval, double _t_rate) : t_rate(_t_rate), eoSteadyStateInserter(_eval) - { - if (t_rate < 0.5) - { // warning, error? - t_rate = 0.55; - } - - if (t_rate >= 1.0) - { - t_rate = 0.99; // 1.0 would mean deterministic tournament - } - } - - void insert(const EOT& _eot) - { - EOT& eo = inverse_stochastic_tournament(pop(), t_rate); - eo = _eot; // overwrite loser of tournament - - eo.invalidate(); - eval(eo); // Evaluate after insert - } - - string className(void) const { return "eoStochTournamentInserter"; } - - private : - double t_rate; -}; - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoStochTournamentInserter.h + Concrete steady state inserter. It is initialized with a population and + inserts individuals in the population based on an inverse stochastic + tournament + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoStochTournamentInserter_h +#define eoStochTournamentInserter_h + + +#include "eoSteadyStateInserter.h" +#include "selectors.h" + +/** + * eoDetTournamentInserter: Uses an inverse stochastic tournament to figure + * out who gets overridden by the new individual. It resets the fitness of the + * individual. +*/ +template +class eoStochTournamentInserter : public eoSteadyStateInserter +{ + public : + + eoStochTournamentInserter(eoEvalFunc& _eval, double _t_rate) : t_rate(_t_rate), eoSteadyStateInserter(_eval) + { + if (t_rate < 0.5) + { // warning, error? + t_rate = 0.55; + } + + if (t_rate >= 1.0) + { + t_rate = 0.99; // 1.0 would mean deterministic tournament + } + } + + void insert(const EOT& _eot) + { + EOT& eo = inverse_stochastic_tournament(pop(), t_rate); + eo = _eot; // overwrite loser of tournament + + eo.invalidate(); + eval(eo); // Evaluate after insert + } + + string className(void) const { return "eoStochTournamentInserter"; } + + private : + double t_rate; +}; + +#endif diff --git a/eo/src/eoString.h b/eo/src/eoString.h index ff515c70d..d1ba55b44 100644 --- a/eo/src/eoString.h +++ b/eo/src/eoString.h @@ -1,147 +1,148 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoString.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoString_H -#define _eoString_H - -// STL libraries -#include -#include - -using namespace std; - -// EO headers -#include - -//----------------------------------------------------------------------------- -// eoString -//----------------------------------------------------------------------------- - -/** Adaptor that turns an STL string into an EO */ -template -class eoString: public eo1d, public string { -public: - - /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator - //@{ - /// ctor - eoString( const string& _str ="" ) - : eo1d(), string( _str ) {}; - - - /** Ctor using a random number generator - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called - */ - eoString( unsigned _size, eoRnd& _rnd ) - : eo1d(), string(){ - for ( unsigned i = 0; i < _size; i ++ ) { - *this += _rnd(); - } - }; +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoString.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoString_H +#define _eoString_H + +// STL libraries +#include +#include + +using namespace std; + +// EO headers +#include + +//----------------------------------------------------------------------------- +// eoString +//----------------------------------------------------------------------------- + +/** Adaptor that turns an STL string into an EO */ +template +class eoString: public eo1d, public string { +public: + + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + /// ctor + eoString( const string& _str ="" ) + : eo1d(), string( _str ) {}; + + + /** Ctor using a random number generator + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called + */ + eoString( unsigned _size, eoRnd& _rnd ) + : eo1d(), string(){ + for ( unsigned i = 0; i < _size; i ++ ) { + *this += _rnd(); + } + }; /** Ctor from a stream @param _s input stream - */ + */ eoString( istream & _s ) : eo1d(){ _s >> *this; }; - - /// copy ctor - eoString( const eoString& _eoStr ) - :eo1d( static_cast & > ( _eoStr ) ), - string( _eoStr ){}; - - /// Assignment operator - const eoString& operator =( const eoString& _eoStr ) { - if ( this != & _eoStr ) { - eo1d::operator = ( _eoStr ); - string::operator = ( _eoStr ); - } - return *this; - } - - /// dtor - virtual ~eoString() {}; -//@} - - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual char getGene( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading gene"); - return (*this)[_i]; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void setGene( unsigned _i, const char& _value ) { - if ( _i >= size() ) - throw out_of_range( "out_of_range when writing a gene"); - (*this)[_i] = _value; - }; - - /** Inserts a value after _i, displacing anything to the right - @exception out_of_range if _i is larger than EO´s size - */ - virtual void insertGene( unsigned _i, char _val ) { - if (_i <= this->size() ) { - string::iterator i = this->begin()+_i; - this->insert( i, _val ); - } else - throw out_of_range( "out_of_range when inserting gene"); - }; - - /** Eliminates the gene at position _i - @exception out_of_range if _i is larger than EO´s size - */ - virtual void deleteGene( unsigned _i ) { - if (_i < this->size() ) { - string::iterator i = this->begin()+_i; - this->erase( i ); - } else - throw out_of_range( "out_of_range when deleting gene"); - }; - - /// methods that implement the EO protocol - virtual unsigned length() const { return this->size(); }; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoString";}; - //@} - - -}; - -#endif + + /// copy ctor + eoString( const eoString& _eoStr ) + :eo1d( static_cast & > ( _eoStr ) ), + string( _eoStr ){}; + + /// Assignment operator + const eoString& operator =( const eoString& _eoStr ) { + if ( this != & _eoStr ) { + eo1d::operator = ( _eoStr ); + string::operator = ( _eoStr ); + } + return *this; + } + + /// dtor + virtual ~eoString() {}; +//@} + + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual char getGene( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void setGene( unsigned _i, const char& _value ) { + if ( _i >= size() ) + throw out_of_range( "out_of_range when writing a gene"); + (*this)[_i] = _value; + }; + + /** Inserts a value after _i, displacing anything to the right + @exception out_of_range if _i is larger than EO´s size + */ + virtual void insertGene( unsigned _i, char _val ) { + if (_i <= this->size() ) { + string::iterator i = this->begin()+_i; + this->insert( i, _val ); + } else + throw out_of_range( "out_of_range when inserting gene"); + }; + + /** Eliminates the gene at position _i + @exception out_of_range if _i is larger than EO´s size + */ + virtual void deleteGene( unsigned _i ) { + if (_i < this->size() ) { + string::iterator i = this->begin()+_i; + this->erase( i ); + } else + throw out_of_range( "out_of_range when deleting gene"); + }; + + /// methods that implement the EO protocol + virtual unsigned length() const { return this->size(); }; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoString";}; + //@} + + +}; + +#endif + diff --git a/eo/src/eoTranspose.h b/eo/src/eoTranspose.h index a46b8328b..79146743a 100644 --- a/eo/src/eoTranspose.h +++ b/eo/src/eoTranspose.h @@ -1,91 +1,92 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoTranspose.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOTRANSPOSE_h -#define _EOTRANSPOSE_h - -#include - -#include - -/** Transposition operator: interchanges the position of two genes -of an EO. These positions must be defined by an only index, that is, -EOT must subclass eo1d -*/ -template -class eoTranspose: public eoMonOp { -public: - /// - eoTranspose() - : eoMonOp< EOT >( ){}; - - /// needed virtual dtor - virtual ~eoTranspose() {}; - - /// - virtual void operator()( EOT& _eo ) const { - eoUniform uniform(0, _eo.length() ); - unsigned pos1 = uniform(), - pos2 = uniform(); - applyAt( _eo, pos1, pos2 ); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoTranspose";}; - //@} - -private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /** applies operator to one gene in the EO - @param _eo victim of transposition - @param i, j positions of the genes that are going to be changed - @throw runtime_exception if the positions to write are incorrect - */ - virtual void applyAt( EOT& _eo, unsigned _i, unsigned _j) const { - try { - Type tmp = _eo.gene( _i ); - _eo.gene( _i ) = _eo.gene( _j ); - _eo.gene( _j ) = tmp; - } catch ( exception& _e ) { - string msg = _e.what(); - msg += "Caught exception at eoTranspose"; - throw runtime_error( msg.c_str() ); - } - } - -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTranspose.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOTRANSPOSE_h +#define _EOTRANSPOSE_h + +#include + +#include + +/** Transposition operator: interchanges the position of two genes +of an EO. These positions must be defined by an only index, that is, +EOT must subclass eo1d +*/ +template +class eoTranspose: public eoMonOp { +public: + /// + eoTranspose() + : eoMonOp< EOT >( ){}; + + /// needed virtual dtor + virtual ~eoTranspose() {}; + + /// + virtual void operator()( EOT& _eo ) const { + eoUniform uniform(0, _eo.length() ); + unsigned pos1 = uniform(), + pos2 = uniform(); + applyAt( _eo, pos1, pos2 ); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoTranspose";}; + //@} + +private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /** applies operator to one gene in the EO + @param _eo victim of transposition + @param i, j positions of the genes that are going to be changed + @throw runtime_exception if the positions to write are incorrect + */ + virtual void applyAt( EOT& _eo, unsigned _i, unsigned _j) const { + try { + Type tmp = _eo.gene( _i ); + _eo.gene( _i ) = _eo.gene( _j ); + _eo.gene( _j ) = tmp; + } catch ( exception& _e ) { + string msg = _e.what(); + msg += "Caught exception at eoTranspose"; + throw runtime_error( msg.c_str() ); + } + } + +}; + +#endif + diff --git a/eo/src/eoUniformSelect.h b/eo/src/eoUniformSelect.h index 74775aab1..ab65a7f32 100644 --- a/eo/src/eoUniformSelect.h +++ b/eo/src/eoUniformSelect.h @@ -1,64 +1,65 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoUniformSelect.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoUniformSelect_h -#define eoUniformSelect_h -// WARNING: 2 classes in this one - eoUniformSelect and eoCopySelect - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT -#include - -//----------------------------------------------------------------------------- -/** eoUniformSelect: a selection method that selects ONE individual randomly - -MS- 22/10/99 */ -//----------------------------------------------------------------------------- - -template class eoUniformSelect: public eoSelectOne -{ - public: - /// (Default) Constructor. - eoUniformSelect():eoSelectOne() {} - - /// not a big deal!!! - virtual const EOT& operator()(const eoPop& pop) { - return pop[rng.random(pop.size())] ; - } - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - * @return the class name as a string - */ - virtual string className() const { return "eoUniformSelect"; }; - - private: -}; - -#endif eoUniformSelect_h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUniformSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoUniformSelect_h +#define eoUniformSelect_h +// WARNING: 2 classes in this one - eoUniformSelect and eoCopySelect + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate +#include // eoPop eoSelect MINFLOAT +#include + +//----------------------------------------------------------------------------- +/** eoUniformSelect: a selection method that selects ONE individual randomly + -MS- 22/10/99 */ +//----------------------------------------------------------------------------- + +template class eoUniformSelect: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoUniformSelect():eoSelectOne() {} + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& pop) { + return pop[rng.random(pop.size())] ; + } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a string + */ + virtual string className() const { return "eoUniformSelect"; }; + + private: +}; + +#endif eoUniformSelect_h + diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h index 2e226182f..10e4fb36e 100644 --- a/eo/src/eoWrappedOps.h +++ b/eo/src/eoWrappedOps.h @@ -1,220 +1,221 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoWrappedOps.h - Derived from the General genetic operator, which can be used to wrap any unary or binary - operator. File also contains the eoCombinedOp, needed by the eoSequentialGOpSelector - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -//----------------------------------------------------------------------------- - -#ifndef eoWrappedOps_h -#define eoWrappedOps_h - -//----------------------------------------------------------------------------- - -#include // eoOp, eoMonOp, eoBinOp -#include "eoRNG.h" - -using namespace std; - -/// Wraps monary operators -template -class eoWrappedMonOp : public eoGeneralOp -{ -public : - /// - eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp(), op(_op) {}; - - /// - virtual ~eoWrappedMonOp() {} - - /// Instantiates the abstract method - void operator()( eoIndiSelector& _in, - eoInserter& _out) const { - EOT result = _in.select(); - op( result ); - _out.insert(result); - } - - /// - virtual string className() const {return "eoWrappedMonOp";}; - - -private : - const eoMonOp& op; -}; - - -/// Wraps binary operators -template -class eoWrappedBinOp : public eoGeneralOp -{ -public : - /// - eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(), op(_op) {} - - /// - virtual ~eoWrappedBinOp() {} - - /// Instantiates the abstract method. EOT should have copy ctor. - void operator()(eoIndiSelector& _in, - eoInserter& _out) const { - EOT out1 = _in.select(); - const EOT& out2 = _in.select(); - op(out1, out2); - _out.insert(out1); - } - - /// - virtual string className() const {return "eoWrappedBinOp";}; - -private : - const eoBinOp& op; -}; - -/// Wraps Quadratic operators -template -class eoWrappedQuadraticOp : public eoGeneralOp -{ -public : - /// - eoWrappedQuadraticOp(const eoQuadraticOp& _op) : eoGeneralOp(), op(_op) {} - - /// - virtual ~eoWrappedQuadraticOp() {} - - /// Instantiates the abstract method. EOT should have copy ctor. - void operator()(eoIndiSelector& _in, - eoInserter& _out) const { - EOT out1 = _in.select(); - EOT out2 = _in.select(); - op(out1, out2); - _out.insert(out1); - _out.insert(out2); - } - - /// - virtual string className() const {return "eoWrappedQuadraticOp";}; - -private : - const eoQuadraticOp& op; -}; - -/// Combines several ops -template -class eoCombinedOp : public eoGeneralOp -{ -public : - - /// - eoCombinedOp() : eoGeneralOp() {} - - /// - virtual ~eoCombinedOp() {} - - /// Adds a new operator to the combined Op - void addOp(eoGeneralOp* _op) - { - ops.push_back(_op); - } - - - /// Erases all operators added so far - void clear(void) { - ops.resize(0); - } - - /// Helper class to make sure that stuff that is inserted will be used again with the next operator - class eoIndiSelectorInserter : public eoIndiSelector, public eoInserter - { - public : - eoIndiSelectorInserter(eoIndiSelector& _in) - : eoIndiSelector(), eoInserter(), in(_in) - {} - - size_t size() const { return in.size(); } - const EOT& operator[](size_t _n) const { return in[_n]; } - - const EOT& select(void) - { - if (results.empty()) - { - return in.select(); - } - // else we use the previously inserted individual, - // an iterator to it is stored in 'results', but the memory - // is kept by 'intermediate'. - - list::iterator it = *results.begin(); - results.pop_front(); - return *it; - } - - void insert(const EOT& _eot) - { - intermediate.push_front(_eot); - results.push_front(intermediate.begin()); - } - - void fill(eoInserter& _out) - { - typedef list::iterator>::iterator Iterator; - - for (Iterator it = results.begin(); it != results.end(); ++it) - { - _out.insert(**it); - } - - results.clear(); - intermediate.clear(); // reclaim memory - } - - private : - - eoIndiSelector& in; - - // using lists as we need to push and pop a lot - // 'results' are iterators to the contents of 'intermediate' - // to prevent copying to and from intermediate... - list::iterator> results; - list intermediate; - }; - - /// Applies all ops in the combined op - void operator()( eoIndiSelector& _in, - eoInserter& _out ) const { - - eoIndiSelectorInserter in_out(_in); - - for (size_t i = 0; i < ops.size(); ++i) - { - (*ops[i])(in_out, in_out); - } - - in_out.fill(_out); - } - -private : - vector* > ops; -}; - -#endif eoGeneral_h +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoWrappedOps.h + Derived from the General genetic operator, which can be used to wrap any unary or binary + operator. File also contains the eoCombinedOp, needed by the eoSequentialGOpSelector + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoWrappedOps_h +#define eoWrappedOps_h + +//----------------------------------------------------------------------------- + +#include // eoOp, eoMonOp, eoBinOp +#include "eoRNG.h" + +using namespace std; + +/// Wraps monary operators +template +class eoWrappedMonOp : public eoGeneralOp +{ +public : + /// + eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp(), op(_op) {}; + + /// + virtual ~eoWrappedMonOp() {} + + /// Instantiates the abstract method + void operator()( eoIndiSelector& _in, + eoInserter& _out) const { + EOT result = _in.select(); + op( result ); + _out.insert(result); + } + + /// + virtual string className() const {return "eoWrappedMonOp";}; + + +private : + const eoMonOp& op; +}; + + +/// Wraps binary operators +template +class eoWrappedBinOp : public eoGeneralOp +{ +public : + /// + eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(), op(_op) {} + + /// + virtual ~eoWrappedBinOp() {} + + /// Instantiates the abstract method. EOT should have copy ctor. + void operator()(eoIndiSelector& _in, + eoInserter& _out) const { + EOT out1 = _in.select(); + const EOT& out2 = _in.select(); + op(out1, out2); + _out.insert(out1); + } + + /// + virtual string className() const {return "eoWrappedBinOp";}; + +private : + const eoBinOp& op; +}; + +/// Wraps Quadratic operators +template +class eoWrappedQuadraticOp : public eoGeneralOp +{ +public : + /// + eoWrappedQuadraticOp(const eoQuadraticOp& _op) : eoGeneralOp(), op(_op) {} + + /// + virtual ~eoWrappedQuadraticOp() {} + + /// Instantiates the abstract method. EOT should have copy ctor. + void operator()(eoIndiSelector& _in, + eoInserter& _out) const { + EOT out1 = _in.select(); + EOT out2 = _in.select(); + op(out1, out2); + _out.insert(out1); + _out.insert(out2); + } + + /// + virtual string className() const {return "eoWrappedQuadraticOp";}; + +private : + const eoQuadraticOp& op; +}; + +/// Combines several ops +template +class eoCombinedOp : public eoGeneralOp +{ +public : + + /// + eoCombinedOp() : eoGeneralOp() {} + + /// + virtual ~eoCombinedOp() {} + + /// Adds a new operator to the combined Op + void addOp(eoGeneralOp* _op) + { + ops.push_back(_op); + } + + + /// Erases all operators added so far + void clear(void) { + ops.resize(0); + } + + /// Helper class to make sure that stuff that is inserted will be used again with the next operator + class eoIndiSelectorInserter : public eoIndiSelector, public eoInserter + { + public : + eoIndiSelectorInserter(eoIndiSelector& _in) + : eoIndiSelector(), eoInserter(), in(_in) + {} + + size_t size() const { return in.size(); } + const EOT& operator[](size_t _n) const { return in[_n]; } + + const EOT& select(void) + { + if (results.empty()) + { + return in.select(); + } + // else we use the previously inserted individual, + // an iterator to it is stored in 'results', but the memory + // is kept by 'intermediate'. + + list::iterator it = *results.begin(); + results.pop_front(); + return *it; + } + + void insert(const EOT& _eot) + { + intermediate.push_front(_eot); + results.push_front(intermediate.begin()); + } + + void fill(eoInserter& _out) + { + typedef list::iterator>::iterator Iterator; + + for (Iterator it = results.begin(); it != results.end(); ++it) + { + _out.insert(**it); + } + + results.clear(); + intermediate.clear(); // reclaim memory + } + + private : + + eoIndiSelector& in; + + // using lists as we need to push and pop a lot + // 'results' are iterators to the contents of 'intermediate' + // to prevent copying to and from intermediate... + list::iterator> results; + list intermediate; + }; + + /// Applies all ops in the combined op + void operator()( eoIndiSelector& _in, + eoInserter& _out ) const { + + eoIndiSelectorInserter in_out(_in); + + for (size_t i = 0; i < ops.size(); ++i) + { + (*ops[i])(in_out, in_out); + } + + in_out.fill(_out); + } + +private : + vector* > ops; +}; + +#endif eoGeneral_h + diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h index ec67c3991..867de1c05 100644 --- a/eo/src/eoXOver2.h +++ b/eo/src/eoXOver2.h @@ -1,106 +1,107 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoXOver2.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOXOVER2_h -#define _EOXOVER2_h - - -// for swap -#if defined( __BORLANDC__ ) -#include -#else -#include -#endif - -// EO includes -#include -#include - -/** 2-point crossover: takes the genes in the central section of two EOs -and interchanges it -*/ -template -class eoXOver2: public eoQuadraticOp { -public: - /// - eoXOver2() - : eoQuadraticOp< EOT >(){}; - - /// - virtual ~eoXOver2() {}; - - /// - virtual void operator()( EOT& _eo1, - EOT& _eo2 ) const { - unsigned len1 = _eo1.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - eoUniform uniform( 0, len ); - unsigned pos1 = uniform(), pos2 = uniform() ; - - applyAt( _eo1, _eo2, pos1, pos2 ); - - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoXOver2";}; - //@} - -private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO - virtual void applyAt( EOT& _eo, EOT& _eo2, - unsigned _i, unsigned _j = 0) const { - - if ( _j < _i ) - swap( _i, _j ); - - unsigned len1 = _eo.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - - if ( (_j > len) || (_i> len ) ) - throw runtime_error( "xOver2: applying xOver past boundaries"); - - for ( unsigned i = _i; i < _j; i++ ) { - Type tmp = _eo.gene( i ); - _eo.gene( i ) = _eo2.gene( i ); - _eo2.gene( i ) = tmp ; - } - - } - -}; - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoXOver2.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOXOVER2_h +#define _EOXOVER2_h + + +// for swap +#if defined( __BORLANDC__ ) +#include +#else +#include +#endif + +// EO includes +#include +#include + +/** 2-point crossover: takes the genes in the central section of two EOs +and interchanges it +*/ +template +class eoXOver2: public eoQuadraticOp { +public: + /// + eoXOver2() + : eoQuadraticOp< EOT >(){}; + + /// + virtual ~eoXOver2() {}; + + /// + virtual void operator()( EOT& _eo1, + EOT& _eo2 ) const { + unsigned len1 = _eo1.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + eoUniform uniform( 0, len ); + unsigned pos1 = uniform(), pos2 = uniform() ; + + applyAt( _eo1, _eo2, pos1, pos2 ); + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoOp + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoXOver2";}; + //@} + +private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO + virtual void applyAt( EOT& _eo, EOT& _eo2, + unsigned _i, unsigned _j = 0) const { + + if ( _j < _i ) + swap( _i, _j ); + + unsigned len1 = _eo.length(), len2 = _eo2.length(), + len= (len1 > len2)?len2:len1; + + if ( (_j > len) || (_i> len ) ) + throw runtime_error( "xOver2: applying xOver past boundaries"); + + for ( unsigned i = _i; i < _j; i++ ) { + Type tmp = _eo.gene( i ); + _eo.gene( i ) = _eo2.gene( i ); + _eo2.gene( i ) = tmp ; + } + + } + +}; + +#endif + diff --git a/eo/src/rnd_generators.h b/eo/src/rnd_generators.h index c7beace72..5074af013 100644 --- a/eo/src/rnd_generators.h +++ b/eo/src/rnd_generators.h @@ -1,85 +1,85 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - rnd_generators.h - Some utility functors for generating random generators: - uniform_generator : generates uniform floats or doubles - random_generator : generates unsigneds, ints etc. - normal_generator : normally distributed floats or doubles - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -//----------------------------------------------------------------------------- - -#ifndef eoRND_GENERATORS_H -#define eoRND_GENERATORS_H - -#include "eoRNG.h" - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + rnd_generators.h + Some utility functors for generating random generators: + uniform_generator : generates uniform floats or doubles + random_generator : generates unsigneds, ints etc. + normal_generator : normally distributed floats or doubles + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoRND_GENERATORS_H +#define eoRND_GENERATORS_H + +#include "eoRNG.h" + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +#endif diff --git a/eo/src/selectors.h b/eo/src/selectors.h index 4b0dad6d8..db111a50e 100644 --- a/eo/src/selectors.h +++ b/eo/src/selectors.h @@ -1,313 +1,313 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - selectors.h - A bunch of useful selector functions. They generally have three forms: - - template - It select(It begin, It end, params, eoRng& gen = rng); - - template - const EOT& select(const eoPop& pop, params, eoRng& gen = rng); - - template - EOT& select(eoPop& pop, params, eoRng& gen = rng); - - where select is one of: roulette_wheel, deterministic_tournament - and stochastic_tournament (at the moment). - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef SELECT__H -#define SELECT__H - -#include "eoRNG.h" -#include "eoException.h" - -template -bool minimizing_fitness() -{ - EOT eo1; // Assuming people don't do anything fancy in the default constructor! - EOT eo2; - - /* Dear user, when the two line below do not compile you are most - likely not working with scalar fitness values. In that case we're sorry - but you cannot use lottery or roulette_wheel selection... - */ - eo1.fitness(0.0); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this - eo2.fitness(1.0); - - return eo2 < eo1; // check whether we have a minimizing fitness -}; - -inline double scale_fitness(const std::pair& _minmax, double _value) -{ - if (_minmax.first == _minmax.second) - { - return 0.0; // no differences in fitness, population converged! - } - // else - - return (_value - _minmax.first) / (_minmax.second - _minmax.first); -} - -template -double sum_fitness(It begin, It end) -{ - double sum = 0.0; - - for (; begin != end; ++begin) - { - double v = static_cast(begin->fitness()); - if (v < 0.0) - throw eoNegativeFitnessException(); - sum += v; - } - - return sum; -} - -template -double sum_fitness(const eoPop& _pop) -{ - return sum_fitness(_pop.begin(), _pop.end()); -} - -template -double sum_fitness(const eoPop& _pop, std::pair& _minmax) -{ - eoPop::const_iterator it = _pop.begin(); - - _minmax.first = it->fitness(); - _minmax.second = it++->fitness(); - - for(; it != _pop.end(); ++it) - { - double v = static_cast(it->fitness()); - - _minmax.first = std::min(_minmax.first, v); - _minmax.second = std::max(_minmax.second, v); - - rawTotal += v; - } - - if (minimizing_fitness()) - { - std::swap(_minmax.first, _minmax.second); - } - - scaledTotal = 0.0; - - // unfortunately a second loop is neccessary to scale the fitness - for (it = _pop.begin(); it != _pop.end(); ++it) - { - double v = scale_fitness(static_cast(it->fitness())); - - scaledTotal += v; - } -} - -template -It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - It i = _begin; - - while (roulette > 0.0) - { - roulette -= static_cast(*(i++)); - } - - return --i; -} - -template -const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - eoPop::const_iterator i = _pop.begin(); - - while (roulette > 0.0) - { - roulette -= static_cast((i++)->fitness()); - } - - return *--i; -} - -template -EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - eoPop::iterator i = _pop.begin(); - - while (roulette > 0.0) - { - roulette -= static_cast((i++)->fitness()); - } - - return *--i; -} - -template -It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) -{ - It best = _begin + _gen.random(_end - _begin); - - for (unsigned i = 0; i < _t_size - 1; ++i) - { - It competitor = _begin + _gen.random(_end - _begin); - - if (*best < *competitor) - { - best = competitor; - } - } - - return best; -} - -template -const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) -{ - It worst = _begin + _gen.random(_end - _begin); - - for (unsigned i = 0; i < _t_size - 1; ++i) - { - It competitor = _begin + _gen.random(_end - _begin); - - if (competitor == worst) - { - --i; - continue; // try again - } - - if (*competitor < *worst) - { - worst = competitor; - } - } - - return worst; -} - -template -const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) -{ - It i1 = _begin + _gen.random(_end - _begin); - It i2 = _begin + _gen.random(_end - _begin); - - bool return_better = _gen.flip(_t_rate); - - if (*i1 < *i2) - { - if (return_better) return i2; - // else - - return i1; - } - else - { - if (return_better) return i1; - // else - } - // else - - return i2; -} - -template -const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) -{ - It i1 = _begin + _gen.random(_end - _begin); - It i2 = _begin + _gen.random(_end - _begin); - - bool return_worse = _gen.flip(_t_rate); - - if (*i1 < *i2) - { - if (return_worse) return i1; - // else - - return i2; - } - else - { - if (return_worse) return i2; - // else - } - // else - - return i1; -} - -template -const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - - -#endif \ No newline at end of file +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + selectors.h + A bunch of useful selector functions. They generally have three forms: + + template + It select(It begin, It end, params, eoRng& gen = rng); + + template + const EOT& select(const eoPop& pop, params, eoRng& gen = rng); + + template + EOT& select(eoPop& pop, params, eoRng& gen = rng); + + where select is one of: roulette_wheel, deterministic_tournament + and stochastic_tournament (at the moment). + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef SELECT__H +#define SELECT__H + +#include "eoRNG.h" +#include "eoException.h" + +template +bool minimizing_fitness() +{ + EOT eo1; // Assuming people don't do anything fancy in the default constructor! + EOT eo2; + + /* Dear user, when the two line below do not compile you are most + likely not working with scalar fitness values. In that case we're sorry + but you cannot use lottery or roulette_wheel selection... + */ + eo1.fitness(0.0); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this + eo2.fitness(1.0); + + return eo2 < eo1; // check whether we have a minimizing fitness +}; + +inline double scale_fitness(const std::pair& _minmax, double _value) +{ + if (_minmax.first == _minmax.second) + { + return 0.0; // no differences in fitness, population converged! + } + // else + + return (_value - _minmax.first) / (_minmax.second - _minmax.first); +} + +template +double sum_fitness(It begin, It end) +{ + double sum = 0.0; + + for (; begin != end; ++begin) + { + double v = static_cast(begin->fitness()); + if (v < 0.0) + throw eoNegativeFitnessException(); + sum += v; + } + + return sum; +} + +template +double sum_fitness(const eoPop& _pop) +{ + return sum_fitness(_pop.begin(), _pop.end()); +} + +template +double sum_fitness(const eoPop& _pop, std::pair& _minmax) +{ + eoPop::const_iterator it = _pop.begin(); + + _minmax.first = it->fitness(); + _minmax.second = it++->fitness(); + + for(; it != _pop.end(); ++it) + { + double v = static_cast(it->fitness()); + + _minmax.first = std::min(_minmax.first, v); + _minmax.second = std::max(_minmax.second, v); + + rawTotal += v; + } + + if (minimizing_fitness()) + { + std::swap(_minmax.first, _minmax.second); + } + + scaledTotal = 0.0; + + // unfortunately a second loop is neccessary to scale the fitness + for (it = _pop.begin(); it != _pop.end(); ++it) + { + double v = scale_fitness(static_cast(it->fitness())); + + scaledTotal += v; + } +} + +template +It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + It i = _begin; + + while (roulette > 0.0) + { + roulette -= static_cast(*(i++)); + } + + return --i; +} + +template +const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + eoPop::const_iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + eoPop::iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It best = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (*best < *competitor) + { + best = competitor; + } + } + + return best; +} + +template +const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It worst = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (competitor == worst) + { + --i; + continue; // try again + } + + if (*competitor < *worst) + { + worst = competitor; + } + } + + return worst; +} + +template +const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_better = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_better) return i2; + // else + + return i1; + } + else + { + if (return_better) return i1; + // else + } + // else + + return i2; +} + +template +const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_worse = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_worse) return i1; + // else + + return i2; + } + else + { + if (return_worse) return i2; + // else + } + // else + + return i1; +} + +template +const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + + +#endif From 4777d091288959add913f3da14c6167b44ce0637 Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 21 Feb 2000 18:03:31 +0000 Subject: [PATCH 0109/2134] making the second parameter of the oprator() for binaria operators to be NON const --- eo/src/eoOp.h | 471 +++++++++++++++++++++++++------------------------- 1 file changed, 235 insertions(+), 236 deletions(-) diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 232606c4a..49d525854 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,236 +1,235 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) -as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, -those are the ones actually used here.\\ - -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ - - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - -//@{ - enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; -/// - - /// Ctor - eoOp(OpType _type) - :opType( _type ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :opType( _eop.opType ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// getType: number of operands it takes and individuals it produces - OpType getType() const {return opType;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className().c_str(); - // _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - -private: - /// OpType is the type of the operator: how many operands it takes and how many it produces - OpType opType; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies only the first operand. - */ - virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** Quadratic genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoQuadraticOp: public eoOp { -public: - - /// Ctor - eoQuadraticOp() - :eoOp( eoOp::quadratic ) {}; - - /// Copy Ctor - eoQuadraticOp( const eoQuadraticOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoQuadraticOp() {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - : eoOp( eoOp::unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} -}; - -// some forward declarations -template -class eoIndiSelector; - -template -class eoInserter; - -/** - * eGeneralOp: General genetic operator; for objects used to transform sets - of EOs. Nary ("orgy") operators should be derived from this class -*/ -template -class eoGeneralOp: public eoOp -{ -public: - - /// Ctor that honors its superclass - eoGeneralOp(): eoOp( eoOp::general ) {}; - - /// Virtual dtor - virtual ~eoGeneralOp () {}; - - /** Method that really does the stuff. Applies the genetic operator - to a individuals dispensed by an eoIndividualSelector, - and puts the results in the eoIndividualInserter. - Any number of inputs can be requested and any number of outputs - can be produced. - */ - virtual void operator()( eoIndiSelector& _in, - eoInserter& _out) const = 0; - - virtual string className() const {return "eoGeneralOp";}; -}; - - -#endif - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include + +/** @name Genetic operators + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) +as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, +those are the ones actually used here.\\ + +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. +@author GeNeura Team +@version 0.1 +@see eoOpFactory +*/ + + +/** Abstract data types for EO operators. + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + * can have its own operators + */ +template +class eoOp: public eoObject, public eoPrintable { +public: + +//@{ + enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; +/// + + /// Ctor + eoOp(OpType _type) + :opType( _type ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :opType( _eop.opType ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// getType: number of operands it takes and individuals it produces + OpType getType() const {return opType;}; + + /** @name Methods from eoObject */ + //@{ + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const { + _os << className(); + // _os << arity; + }; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoOp";}; + //@} + +private: + /// OpType is the type of the operator: how many operands it takes and how many it produces + OpType opType; + +}; + +/** Binary genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoBinOp: public eoOp { +public: + + /// Ctor + eoBinOp() + :eoOp( binary ) {}; + + /// Copy Ctor + eoBinOp( const eoBinOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoBinOp () {}; + + /** applies operator, to the object. Modifies only the first operand. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** Quadratic genetic operator: subclasses eoOp, and defines +basically the operator() with two operands +*/ +template +class eoQuadraticOp: public eoOp { +public: + + /// Ctor + eoQuadraticOp() + :eoOp( eoOp::quadratic ) {}; + + /// Copy Ctor + eoQuadraticOp( const eoQuadraticOp& _ebop ) + : eoOp( _ebop ){}; + + /// Dtor + ~eoQuadraticOp() {}; + + /** applies operator, to the object. Modifies both operands. + */ + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; + //@} + +}; + +/** eoMonOp is the monary operator: genetic operator that takes + only one EO +*/ +template +class eoMonOp: public eoOp { +public: + + /// Ctor + eoMonOp( ) + : eoOp( eoOp::unary ) {}; + + /// Copy Ctor + eoMonOp( const eoMonOp& _emop ) + : eoOp( _emop ){}; + + /// Dtor + ~eoMonOp() {}; + + /** applies randomly operator, to the object. If arity is more than 1, + * keeps a copy of the operand in a cache. + */ + virtual void operator()( EOType& _eo1) const = 0; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} +}; + +// some forward declarations +template +class eoIndiSelector; + +template +class eoInserter; + +/** + * eGeneralOp: General genetic operator; for objects used to transform sets + of EOs. Nary ("orgy") operators should be derived from this class +*/ +template +class eoGeneralOp: public eoOp +{ +public: + + /// Ctor that honors its superclass + eoGeneralOp(): eoOp( eoOp::general ) {}; + + /// Virtual dtor + virtual ~eoGeneralOp () {}; + + /** Method that really does the stuff. Applies the genetic operator + to a individuals dispensed by an eoIndividualSelector, + and puts the results in the eoIndividualInserter. + Any number of inputs can be requested and any number of outputs + can be produced. + */ + virtual void operator()( eoIndiSelector& _in, + eoInserter& _out) const = 0; + + virtual string className() const {return "eoGeneralOp";}; +}; + + +#endif From 93fcc4c04817cf5d43d890b0be8d0abf5f470172 Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 21 Feb 2000 18:21:14 +0000 Subject: [PATCH 0110/2134] A: has been fixed, ONCE MORE :-( --- eo/src/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h index 18bf2566c..215012359 100644 --- a/eo/src/eoRNG.h +++ b/eo/src/eoRNG.h @@ -197,7 +197,7 @@ public : { if (total == 0) { // count - for (int i = 0; i < vec.size(); ++i) + for (unsigned i = 0; i < vec.size(); ++i) total += vec[i]; } From b109ef46b2ea7465a6b6fc79926335e8f4353597 Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 21 Feb 2000 18:21:58 +0000 Subject: [PATCH 0111/2134] *** empty log message *** --- eo/src/eoGeneration.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/eo/src/eoGeneration.h b/eo/src/eoGeneration.h index 9da4ae67a..01d2bbf25 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/eoGeneration.h @@ -26,7 +26,7 @@ #define eoGeneration_h //----------------------------------------------------------------------------- - +#include #include // eoPop #include #include // eoSelect, eoTranform, eoMerge @@ -56,15 +56,19 @@ template class eoGeneration: public eoAlgo /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { - eoPop breeders; - select(pop, breeders); - transform(breeders); - eoPop::iterator i; - // Can't use foreach here since foreach takes the - // parameter by reference - for ( i = breeders.begin(); i != breeders.end(); i++) - evaluator(*i); - replace(breeders, pop); + eoPop breeders; + try { + select(pop, breeders); + transform(breeders); + eoPop::iterator i; + // Can't use foreach here since foreach takes the + // parameter by reference + for ( i = breeders.begin(); i != breeders.end(); i++) + evaluator(*i); + replace(breeders, pop); + } catch ( exception& e ) { + throw runtime_error( e.what() ); + } } /// Class name. From 9a4946c75c500804b9191135cee0a253028d2341 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 29 Feb 2000 05:14:40 +0000 Subject: [PATCH 0112/2134] Warning: this comment refers to the previous commit of eoException: The command "cvs commit" does not seem to allow to enter comments ??? wherease the command "cvs ci" is OK. Here we go: - added the virtual destructors of all classes, to suppress g++ annoying warnings when using -Wall option --- eo/src/eoException.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoException.h b/eo/src/eoException.h index 2e3ae02a2..962035943 100644 --- a/eo/src/eoException.h +++ b/eo/src/eoException.h @@ -32,7 +32,7 @@ #include "eoObject.h" -struct eoException +struct eoException { eoException() {} eoException(const eoObject& caller) : who_caught_it(caller.className()) {} From 9c75e1c408c054aedc4e5293d2e3fb844a48f62a Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 29 Feb 2000 05:22:32 +0000 Subject: [PATCH 0113/2134] Modified the order of base type and private data initializations so the g++ does not complain when using the -Wall compile option --- eo/src/eoIndiSelector.h | 2 +- eo/src/eoInserter.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index 69803d2b7..5638f84a8 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -73,7 +73,7 @@ template class eoPopIndiSelector : public eoIndiSelector { public : - eoPopIndiSelector(void) : pop(0), firstChoice(-1), last(0), eoIndiSelector() {} + eoPopIndiSelector(void) : eoIndiSelector(), pop(0), last(0), firstChoice(-1) {} virtual ~eoPopIndiSelector(void) {} diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h index 44ec68851..b651f5717 100644 --- a/eo/src/eoInserter.h +++ b/eo/src/eoInserter.h @@ -55,7 +55,7 @@ class eoPopInserter : public eoInserter { public : - eoPopInserter(void) : thePop(0), eoInserter() {} + eoPopInserter(void) : eoInserter(), thePop(0) {} /// Binds the population to this class. This is an initialization routine used by breeders eoInserter& operator()(eoPop& _pop) From 4b38c62c95b29c2d539213ad6740147ef0080e9b Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 2 Mar 2000 05:48:23 +0000 Subject: [PATCH 0114/2134] Something went wrong with past commit's. So, again - added the virtual destructors of all classes, to suppress g++ annoying warnings when using -Wall option --- eo/src/eoException.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eo/src/eoException.h b/eo/src/eoException.h index 962035943..31c095993 100644 --- a/eo/src/eoException.h +++ b/eo/src/eoException.h @@ -32,11 +32,11 @@ #include "eoObject.h" -struct eoException +struct eoException { eoException() {} eoException(const eoObject& caller) : who_caught_it(caller.className()) {} - + virtual ~eoException(){} // otherwise compiler complains std::string who(void) const { return who_caught_it; } virtual std::string what(void) const{ return "";} @@ -48,6 +48,7 @@ struct eoFitnessException : public eoException { eoFitnessException() : eoException() {} eoFitnessException(const eoObject& caller) : eoException(caller) {} + virtual ~eoFitnessException(){} // otherwise compiler complains }; struct eoNegativeFitnessException : public eoFitnessException @@ -55,6 +56,7 @@ struct eoNegativeFitnessException : public eoFitnessException eoNegativeFitnessException() : eoFitnessException() {} eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {} + virtual ~eoNegativeFitnessException(){} // otherwise compiler complains std::string what(void) const { return "negative fitness encountered"; } }; @@ -62,6 +64,7 @@ struct eoMinimizingFitnessException : public eoFitnessException { eoMinimizingFitnessException() : eoFitnessException() {} eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {} + virtual ~eoMinimizingFitnessException(){} // otherwise compiler complains std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; } }; From f1fd1f8e33c0df501840bd46f48ec77c8e4409fc Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 2 Mar 2000 05:54:01 +0000 Subject: [PATCH 0115/2134] Removed extra () in method virtual const EOT& operator()(const eoPop& pop) Changed the include of eoPop.h from <> to "" --- eo/src/eoDetTournament.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h index 577f0c3bb..687b30916 100644 --- a/eo/src/eoDetTournament.h +++ b/eo/src/eoDetTournament.h @@ -30,7 +30,7 @@ #include // #include // accumulate -#include // eoPop eoSelect MINFLOAT +#include "eoPopOps.h" // eoPop eoSelect MINFLOAT #include "selectors.h" //----------------------------------------------------------------------------- @@ -53,7 +53,7 @@ template class eoDetTournament: public eoSelectOne virtual const EOT& operator()(const eoPop& pop) { - return deterministic_tournament(pop, Tsize)(); + return deterministic_tournament(pop, Tsize); } /** Inherited from eoObject From ca4e470092918f03cf16b4065c66ba9d68b96dd1 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 6 Mar 2000 15:55:44 +0000 Subject: [PATCH 0116/2134] Upgraded parse_tree a bit... --- eo/gp/eoParseTree.h | 10 ++- eo/gp/node_pool.h | 75 +++++++++++++++++- eo/gp/parse_tree.h | 189 +++++++++++++++++++++++++++++++------------- 3 files changed, 213 insertions(+), 61 deletions(-) diff --git a/eo/gp/eoParseTree.h b/eo/gp/eoParseTree.h index 5aa4bcf48..7bac61254 100644 --- a/eo/gp/eoParseTree.h +++ b/eo/gp/eoParseTree.h @@ -26,8 +26,11 @@ public : { pruneTree(_size); } + eoParseTree(eoRnd& _rnd) + : EO(), parse_tree(_rnd()) + {} - void pruneTree(unsigned _size) + virtual void pruneTree(unsigned _size) { if (_size < 1) return; @@ -86,7 +89,6 @@ std::istream& operator>>(std::istream& is, eoParseTree& eot) } - template class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > { @@ -125,7 +127,7 @@ class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > vector::iterator it; for (it = initializor.begin(); it != initializor.end(); ++it) { - if (it->arity() > 1) + if (it->arity() > 0) break; } @@ -150,6 +152,8 @@ class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); } + what_it->randomize(); + sequence.push_front(*what_it); for (int i = 0; i < what_it->arity(); ++i) diff --git a/eo/gp/node_pool.h b/eo/gp/node_pool.h index 35cc4ab26..f541d5f0c 100644 --- a/eo/gp/node_pool.h +++ b/eo/gp/node_pool.h @@ -75,13 +75,18 @@ template class Node_alloc { public : - Node_alloc() {}; - + T* allocate(void) { T* t = static_cast(mem.allocate()); t = new (t) T; - //t->T(); // call constructor; + return t; + } + + T* construct(const T& org) + { + T* t = static_cast(mem.allocate()); + t = new (t) T(org); return t; } @@ -95,6 +100,7 @@ private : static MemPool mem; }; + template class Standard_alloc { @@ -108,6 +114,19 @@ public : return new T [arity]; } + + T* construct(size_t arity, T* org) + { + if (arity == 0) + return 0; + + T* t new T [arity]; + + for (int i = 0; i < arity; ++i) + { + t = T(org[i]); + } + } void deallocate(T* t, size_t arity = 1) { @@ -130,6 +149,11 @@ public : return new T;// [arity]; } + T* construct(const T& org) + { + return new T(org); + } + void deallocate(T* t) { delete t; @@ -181,6 +205,50 @@ public : return t; } + T* construct(size_t arity, T* org) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T(*org); + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T(*org); + new (&t[1]) T(org[1]); + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T(*org); + new (&t[1]) T(org[1]); + new (&t[1]) T(org[2]); + break; + } + default : + { + t = new T[arity]; // does call default ctor + for (int i = 0; i < arity; ++i) + { + t[i] = T(org[i]); // constructs now + } + } + } + + return t; + } + + + void deallocate(T* t, size_t arity) { switch(arity) @@ -221,6 +289,7 @@ private : // static (non thread_safe) memory pools template MemPool Node_alloc::mem = sizeof(T); + template MemPool Tree_alloc::mem1 = sizeof(T); template MemPool Tree_alloc::mem2 = sizeof(T) * 2; template MemPool Tree_alloc::mem3 = sizeof(T) * 3; diff --git a/eo/gp/parse_tree.h b/eo/gp/parse_tree.h index cb3b2ec26..e6c507231 100644 --- a/eo/gp/parse_tree.h +++ b/eo/gp/parse_tree.h @@ -4,7 +4,7 @@ /** * Parse_tree and subtree classes - * (c) Maarten Keijzer 1999 + * (c) Maarten Keijzer 1999, 2000 * These classes may be used for educational and * other non-commercial purposes only. Even if I @@ -39,31 +39,39 @@ A parse_tree is evaluated through one of it's apply() members: - 1) parse_tree::apply(void) + 1) parse_tree::apply(RetVal) is the simplest evaluation, it will call - RetVal Node::operator()(subtree::const_iterator) + RetVal Node::operator()(RetVal, subtree::const_iterator) - 2) parse_tree::apply(It values) + (Unfortunately the first RetVal argument is mandatory (although you + might not need it. This is because MSVC does not support member template + functions properly. If it cannot deduce the template arguments (as is + the case in templatizing over return value) you are not allowed to + specify them. calling tree.apply() would result in a syntax + error. That is why you have to call tree.apply(double()) instead.) + + + 2) parse_tree::apply(RetVal v, It values) will call: - RetVal Node::operator()(subtree<... , It values) + RetVal Node::operator()(RetVal, subtree<... , It values) where It is whatever type you desire (most of the time this will be a vector containing the values of your variables); - 3) parse_tree::apply(It values, It2 moreValues) + 3) parse_tree::apply(RetVal, It values, It2 moreValues) will call: - RetVal Node::operator()(subtree<... , It values, It2 moreValues) + RetVal Node::operator()(RetVal, subtree<... , It values, It2 moreValues) although I do not see the immediate use of this, however... - 4) parse_tree::apply(It values, It2 args, It3 adfs) + 4) parse_tree::apply(RetVal, It values, It2 args, It3 adfs) that calls: @@ -77,7 +85,7 @@ possible. Implement the simplest eval as: template - RetVal operator()(It begin) const + RetVal operator()(RetVal dummy, It begin) const ****** Internal Structure ****** @@ -141,6 +149,10 @@ tree.clear(); copy(vec.begin(), vec.end(), back_inserter(tree)); + or from an istream: + + copy(istream_iterator(my_stream), istream_iterator(), back_inserter(tree)); + Note that the back_inserter must be used as there is no resize member in the parse_tree. back_inserter will use the push_back member from the parse_tree @@ -172,11 +184,16 @@ template class parse_tree { public : + class subtree { -// a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) -#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) +/* + a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) + TODO: use the std::allocator interface +*/ + +#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) // not multithreaded Node_alloc node_allocator; Tree_alloc tree_allocator; #else @@ -188,20 +205,28 @@ public : typedef subtree* iterator; typedef const subtree* const_iterator; - //typedef std::vector::const_reverse_iterator const_reverse_iterator; /* Constructors, assignments */ subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) {} - subtree(const subtree& s) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { copy(s); } + subtree(const subtree& s) + : content(node_allocator.allocate()), + args(0), + parent(0), + _cumulative_size(1), + _depth(1), + _size(1) + { + copy(s); + } + subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) { copy(t); } template subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { // initialize in prefix way for efficiency reasons + { // initialize in prefix order for efficiency reasons init(b, --e); } @@ -215,10 +240,12 @@ public : return copy(anotherS); } - return copy(s); + copy(s); + updateAfterInsert(); + return *this; } - subtree& operator=(const T& t) { return copy(t); } + subtree& operator=(const T& t) { copy(t); updateAfterInsert(); return *this; } /* Access to the nodes */ @@ -253,20 +280,58 @@ public : /* Evaluation with an increasing amount of user defined arguments */ template - RetVal apply(RetVal v) const { return (*content)(v, begin()); } + void apply(RetVal& v) const { (*content)(v, begin()); } template - RetVal apply(RetVal v, It values) const { return (*content)(v, begin(), values); } + void apply(RetVal& v, It values) const + { + (*content)(v, begin(), values); + } - template - RetVal apply(RetVal v, It values, It2 moreValues) const - { return (*content)(v, begin(), values, moreValues); } + template + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + { + (content->*f)(v, begin(), misc); + } + + +/* template + void apply(RetVal& v, It values, It2 moreValues) const + { (*content)(v, begin(), values, moreValues); } template - RetVal apply(RetVal v, It values, It2 moreValues, It3 evenMoreValues) const - { return (*content)(v, begin(), values, moreValues, evenMoreValues); } + void apply(RetVal& v, It values, It2 moreValues, It3 evenMoreValues) const + { (*content)(v, begin(), values, moreValues, evenMoreValues); } +*/ + template + void find_nodes(vector& result, Pred& p) + { + if (p(*content)) + { + result.push_back(this); + } + for (int i = 0; i < arity(); ++i) + { + args[i].find_nodes(result, p); + } + } + + template + void find_nodes(vector& result, Pred& p) const + { + if (p(*content)) + { + result.push_back(this); + } + + for (int i = 0; i < arity(); ++i) + { + args[i].find_nodes(result, p); + } + } + /* Iterators */ iterator begin(void) { return args; } @@ -336,6 +401,8 @@ protected : _cumulative_size += _size; _depth++; + content->updateAfterInsert(); + if (parent) parent->updateAfterInsert(); } @@ -382,46 +449,40 @@ private : return parent->get_root(); } - subtree& copy(const subtree& s) { - int oldArity = arity(); - - disown(); + int old_arity = arity(); - int ar = s.arity(); + int new_arity = s.arity(); - if (ar != oldArity) + if (new_arity != old_arity) { - tree_allocator.deallocate(args, oldArity); + tree_allocator.deallocate(args, old_arity); - args = tree_allocator.allocate(ar); - - //if (ar > 0) - // args = new subtree [ar]; - //else - // args = 0; + args = tree_allocator.allocate(new_arity); } - switch(ar) + switch(new_arity) { - case 3 : args[2].copy(s.args[2]); // no break! - case 2 : args[1].copy(s.args[1]); - case 1 : args[0].copy(s.args[0]); break; + case 3 : args[2].copy(s.args[2]); args[2].parent = this; // no break! + case 2 : args[1].copy(s.args[1]); args[1].parent = this; + case 1 : args[0].copy(s.args[0]); args[0].parent = this; case 0 : break; default : { - for (int i = 0; i < ar; ++i) + for (int i = 0; i < new_arity; ++i) { args[i].copy(s.args[i]); + args[i].parent = this; } } } *content = *s.content; - - adopt(); - updateAfterInsert(); + _size = s._size; + _depth = s._depth; + _cumulative_size = s._cumulative_size; + return *this; } @@ -559,20 +620,38 @@ private : /* Evaluation (application), with an increasing number of user defined arguments */ template - RetVal apply(RetVal v) const - { return _root.apply(v); } + void apply(RetVal& v) const + { _root.apply(v); } template - RetVal apply(RetVal v, It varValues) const - { return _root.apply(v, varValues); } + void apply(RetVal& v, It varValues) const + { _root.apply(v, varValues); } - template - RetVal apply(RetVal v, It varValues, It2 moreValues) const - { return _root.apply(v, varValues, moreValues); } + template + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + { + _root.apply_mem_func(v, misc, f); + } + + //template + // void apply(RetVal& v, It varValues, It2 moreValues) const + // { _root.apply(v, varValues, moreValues); } - template - RetVal apply(RetVal v, It varValues, It2 moreValues, It3 evenMoreValues) const - { return _root.apply(v, varValues, moreValues, evenMoreValues); } + //template + // void apply(RetVal& v, It varValues, It2 moreValues, It3 evenMoreValues) const + // { _root.apply(v, varValues, moreValues, evenMoreValues); } + + template + void find_nodes(vector& result, Pred& p) + { + _root.find_nodes(result, p); + } + + template + void find_nodes(vector& result, Pred& p) const + { + _root.find_nodes(p); + } /* Customized Swap */ void swap(parse_tree& other) From 64693768805169ab16e6fa179820bb116b541346 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 6 Mar 2000 16:05:47 +0000 Subject: [PATCH 0117/2134] Fixed bug in eoGOpSelector (missing break!) eoOp.h: binOp's second arg is const once more all dsp and dsw files were touched by msvc, but did add some stuff (which will be added to eo later) Hope this all works --- eo/src/eoGOpSelector.h | 1 + eo/src/eoOp.h | 705 ++++++++++++++++++++----------- eo/src/eoOpSelector.h | 4 + eo/src/eoPersistent.cpp | 2 + eo/src/eoPop.h | 15 - eo/src/eoSequentialGOpSelector.h | 4 +- eo/test/t-eoSymreg.cpp | 4 +- eo/win/EO.dsw | 568 +++++++++++++------------ eo/win/eo.dsp | 200 ++++----- eo/win/t_eoaged.dsp | 202 ++++----- eo/win/t_eobin.dsp | 202 ++++----- eo/win/t_eobitfact.dsp | 202 ++++----- eo/win/t_eobreeder.dsp | 202 ++++----- eo/win/t_eoid.dsp | 202 ++++----- eo/win/t_eoinclusion.dsp | 202 ++++----- eo/win/t_eoinsertion.dsp | 200 ++++----- eo/win/t_eornd.dsp | 226 +++++----- eo/win/t_eostring.dsp | 202 ++++----- eo/win/t_eovector.dsp | 234 +++++----- eo/win/t_es.dsp | 202 ++++----- eo/win/t_lottery.dsp | 202 ++++----- eo/win/t_opfactory.dsp | 202 ++++----- eo/win/t_ops.dsp | 202 ++++----- eo/win/t_opsel.dsp | 202 ++++----- eo/win/t_opselmason.dsp | 202 ++++----- eo/win/t_pop.dsp | 210 ++++----- eo/win/t_popops.dsp | 202 ++++----- 27 files changed, 2730 insertions(+), 2471 deletions(-) diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 030380ac5..91ecca3b3 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -126,6 +126,7 @@ inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, float _a break; case eoOp::binary : op = new eoWrappedBinOp(static_cast&>(_op)); + break; case eoOp::quadratic : op = new eoWrappedQuadraticOp(static_cast&>(_op)); break; diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 49d525854..9338b12a0 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,235 +1,470 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoOp_H -#define _eoOp_H - -#include -#include - -/** @name Genetic operators - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) -as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, -those are the ones actually used here.\\ - -#eoOp#s are only printable objects, so if you want to build them from a file, it has to -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own -factory, which know how to build them from a description in a file. -@author GeNeura Team -@version 0.1 -@see eoOpFactory -*/ - - -/** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - * can have its own operators - */ -template -class eoOp: public eoObject, public eoPrintable { -public: - -//@{ - enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; -/// - - /// Ctor - eoOp(OpType _type) - :opType( _type ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :opType( _eop.opType ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// getType: number of operands it takes and individuals it produces - OpType getType() const {return opType;}; - - /** @name Methods from eoObject */ - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); - // _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoOp";}; - //@} - -private: - /// OpType is the type of the operator: how many operands it takes and how many it produces - OpType opType; - -}; - -/** Binary genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoBinOp: public eoOp { -public: - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies only the first operand. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** Quadratic genetic operator: subclasses eoOp, and defines -basically the operator() with two operands -*/ -template -class eoQuadraticOp: public eoOp { -public: - - /// Ctor - eoQuadraticOp() - :eoOp( eoOp::quadratic ) {}; - - /// Copy Ctor - eoQuadraticOp( const eoQuadraticOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoQuadraticOp() {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - //@} - -}; - -/** eoMonOp is the monary operator: genetic operator that takes - only one EO -*/ -template -class eoMonOp: public eoOp { -public: - - /// Ctor - eoMonOp( ) - : eoOp( eoOp::unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} -}; - -// some forward declarations -template -class eoIndiSelector; - -template -class eoInserter; - -/** - * eGeneralOp: General genetic operator; for objects used to transform sets - of EOs. Nary ("orgy") operators should be derived from this class -*/ -template -class eoGeneralOp: public eoOp -{ -public: - - /// Ctor that honors its superclass - eoGeneralOp(): eoOp( eoOp::general ) {}; - - /// Virtual dtor - virtual ~eoGeneralOp () {}; - - /** Method that really does the stuff. Applies the genetic operator - to a individuals dispensed by an eoIndividualSelector, - and puts the results in the eoIndividualInserter. - Any number of inputs can be requested and any number of outputs - can be produced. - */ - virtual void operator()( eoIndiSelector& _in, - eoInserter& _out) const = 0; - - virtual string className() const {return "eoGeneralOp";}; -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoOp.h + +// (c) GeNeura Team, 1998 + +/* + + This library is free software; you can redistribute it and/or + + modify it under the terms of the GNU Lesser General Public + + License as published by the Free Software Foundation; either + + version 2 of the License, or (at your option) any later version. + + + + This library is distributed in the hope that it will be useful, + + but WITHOUT ANY WARRANTY; without even the implied warranty of + + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + + Lesser General Public License for more details. + + + + You should have received a copy of the GNU Lesser General Public + + License along with this library; if not, write to the Free Software + + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + + */ + +//----------------------------------------------------------------------------- + + + +#ifndef _eoOp_H + +#define _eoOp_H + + + +#include + +#include + + + +/** @name Genetic operators + + + +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with + +eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) + +as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, + +those are the ones actually used here.\\ + + + +#eoOp#s are only printable objects, so if you want to build them from a file, it has to + +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own + +factory, which know how to build them from a description in a file. + +@author GeNeura Team + +@version 0.1 + +@see eoOpFactory + +*/ + + + + + +/** Abstract data types for EO operators. + + * Genetic operators act on chromosomes, changing them. The type to instantiate them should + + * be an eoObject, but in any case, they are type-specific; each kind of evolvable object + + * can have its own operators + + */ + +template + +class eoOp: public eoObject, public eoPrintable { + +public: + + + +//@{ + + enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; + +/// + + + + /// Ctor + + eoOp(OpType _type) + + :opType( _type ) {}; + + + + /// Copy Ctor + + eoOp( const eoOp& _eop ) + + :opType( _eop.opType ) {}; + + + + /// Needed virtual destructor + + virtual ~eoOp(){}; + + + + /// getType: number of operands it takes and individuals it produces + + OpType getType() const {return opType;}; + + + + /** @name Methods from eoObject */ + + //@{ + + + + /** + + * Write object. It's called printOn since it prints the object _on_ a stream. + + * @param _os A ostream. + + */ + + virtual void printOn(ostream& _os) const { + + _os << className(); + + // _os << arity; + + }; + + + + /** Inherited from eoObject + + @see eoObject + + */ + + virtual string className() const {return "eoOp";}; + + //@} + + + +private: + + /// OpType is the type of the operator: how many operands it takes and how many it produces + + OpType opType; + + + +}; + + + +/** Binary genetic operator: subclasses eoOp, and defines + +basically the operator() with two operands + +*/ + +template + +class eoBinOp: public eoOp { + +public: + + + + /// Ctor + + eoBinOp() + + :eoOp( binary ) {}; + + + + /// Copy Ctor + + eoBinOp( const eoBinOp& _ebop ) + + : eoOp( _ebop ){}; + + + + /// Dtor + + ~eoBinOp () {}; + + + + /** applies operator, to the object. Modifies only the first operand. + + */ + + virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; + + + + /** @name Methods from eoObject + + readFrom and printOn are directly inherited from eoObject + + */ + + //@{ + + /** Inherited from eoObject + + @see eoObject + + */ + + virtual string className() const {return "eoBinOp";}; + + //@} + + + +}; + + + +/** Quadratic genetic operator: subclasses eoOp, and defines + +basically the operator() with two operands + +*/ + +template + +class eoQuadraticOp: public eoOp { + +public: + + + + /// Ctor + + eoQuadraticOp() + + :eoOp( eoOp::quadratic ) {}; + + + + /// Copy Ctor + + eoQuadraticOp( const eoQuadraticOp& _ebop ) + + : eoOp( _ebop ){}; + + + + /// Dtor + + ~eoQuadraticOp() {}; + + + + /** applies operator, to the object. Modifies both operands. + + */ + + virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; + + + + /** @name Methods from eoObject + + readFrom and printOn are directly inherited from eoObject + + */ + + //@{ + + /** Inherited from eoObject + + @see eoObject + + */ + + virtual string className() const {return "eoBinOp";}; + + //@} + + + +}; + + + +/** eoMonOp is the monary operator: genetic operator that takes + + only one EO + +*/ + +template + +class eoMonOp: public eoOp { + +public: + + + + /// Ctor + + eoMonOp( ) + + : eoOp( eoOp::unary ) {}; + + + + /// Copy Ctor + + eoMonOp( const eoMonOp& _emop ) + + : eoOp( _emop ){}; + + + + /// Dtor + + ~eoMonOp() {}; + + + + /** applies randomly operator, to the object. If arity is more than 1, + + * keeps a copy of the operand in a cache. + + */ + + virtual void operator()( EOType& _eo1) const = 0; + + + + /** @name Methods from eoObject + + readFrom and printOn are directly inherited from eoObject + + */ + + //@{ + + /** Inherited from eoObject + + @see eoObject + + */ + + virtual string className() const {return "eoMonOp";}; + + //@} + +}; + + + +// some forward declarations + +template + +class eoIndiSelector; + + + +template + +class eoInserter; + + + +/** + + * eGeneralOp: General genetic operator; for objects used to transform sets + + of EOs. Nary ("orgy") operators should be derived from this class + +*/ + +template + +class eoGeneralOp: public eoOp + +{ + +public: + + + + /// Ctor that honors its superclass + + eoGeneralOp(): eoOp( eoOp::general ) {}; + + + + /// Virtual dtor + + virtual ~eoGeneralOp () {}; + + + + /** Method that really does the stuff. Applies the genetic operator + + to a individuals dispensed by an eoIndividualSelector, + + and puts the results in the eoIndividualInserter. + + Any number of inputs can be requested and any number of outputs + + can be produced. + + */ + + virtual void operator()( eoIndiSelector& _in, + + eoInserter& _out) const = 0; + + + + virtual string className() const {return "eoGeneralOp";}; + +}; + + + + + +#endif + diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 3000c9b6f..8088c8a34 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -46,6 +46,10 @@ template class eoOpSelector: public eoObject, public eoPrintable { public: + + // Need virtual destructor for derived classes + virtual ~eoOpSelector() {} + /// type of IDs assigned to each operators, used to handle them typedef unsigned ID; diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 9bb767915..0bdf9f48b 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -9,6 +9,8 @@ istream & operator >> ( istream& _is, eoPersistent& _o ) { return _is; }; +// temporary location for the one and only eoRng object + #include "eoRNG.h" eoRng rng; diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index d988b3eb6..10ebdcb3c 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -31,7 +31,6 @@ // EO includes #include #include -#include /** Subpopulation: it is used to move parts of population from one algorithm to another and one population to another. It is safer @@ -91,20 +90,6 @@ class eoPop: public vector, public eoObject, public eoPersistent { } }; - /** Ctor for fixed-size chromosomes, with variable content - @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd, eoEvalFunc& _eval) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - _eval(back()); - } - }; - /** Ctor from an istream; reads the population from a stream, each element should be in different lines diff --git a/eo/src/eoSequentialGOpSelector.h b/eo/src/eoSequentialGOpSelector.h index e702c4b8b..95716153a 100644 --- a/eo/src/eoSequentialGOpSelector.h +++ b/eo/src/eoSequentialGOpSelector.h @@ -36,7 +36,9 @@ template class eoSequentialGOpSel : public eoGOpSelector { public : - + + virtual ~eoSequentialGOpSel(void) {} + virtual eoGeneralOp& selectOp() { combined.clear(); diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 63bfae680..5c9956239 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -18,7 +18,7 @@ public : SymregNode(Operator _op) { op = _op; } virtual ~SymregNode(void) {} - // arity function + // arity function, need this function! int arity(void) const { return op == X? 0 : 2; } // evaluation function, single case, using first argument to give value of variable @@ -204,7 +204,7 @@ void print_best(eoPop& pop) string str = pop[index].apply(string()); cout << str.c_str(); - cout << endl << "Error = " << pop[index].fitness() << endl; + cout << endl << "RMS Error = " << pop[index].fitness() << endl; } diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw index 4cac45ee6..cefc0d840 100644 --- a/eo/win/EO.dsw +++ b/eo/win/EO.dsw @@ -1,269 +1,299 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoaged"=.\t_eoaged.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobitfact"=.\t_eobitfact.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobreeder"=.\t_eobreeder.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoinclusion"=.\t_eoinclusion.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eornd"=.\t_eornd.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eostring"=.\t_eostring.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_es"=.\t_es.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eval"=.\t_eval.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_factory"=.\t_factory.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_lottery"=.\t_lottery.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_opfactory"=.\t_opfactory.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_ops"=.\t_ops.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_opsel"=.\t_opsel.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_opselmason"=.\t_opselmason.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_pop"=.\t_pop.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_popops"=.\t_popops.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoRegression"=.\t_eoRegression.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoSymreg"=.\t_eoSymreg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoaged"=.\t_eoaged.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eobitfact"=.\t_eobitfact.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eobreeder"=.\t_eobreeder.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoinclusion"=.\t_eoinclusion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eornd"=.\t_eornd.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eostring"=.\t_eostring.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_es"=.\t_es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eval"=.\eo___Win32_Debug\t_eval.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_factory"=.\eo___Win32_Debug\t_factory.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_lottery"=.\t_lottery.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_opfactory"=.\t_opfactory.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_ops"=.\t_ops.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_opsel"=.\t_opsel.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_opselmason"=.\t_opselmason.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_pop"=.\t_pop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_popops"=.\t_popops.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index c735f606b..e5a502437 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,100 +1,100 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "eo___Win32_Debug" -# PROP Intermediate_Dir "eo___Win32_Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "eo___Win32_Debug" +# PROP Intermediate_Dir "eo___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoaged.dsp b/eo/win/t_eoaged.dsp index 8e24a5bb6..1bf6272a2 100644 --- a/eo/win/t_eoaged.dsp +++ b/eo/win/t_eoaged.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eoaged" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoaged - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoaged.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoaged.mak" CFG="t_eoaged - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoaged - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoaged - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoaged - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoaged - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoaged - Win32 Release" -# Name "t_eoaged - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eoaged.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoaged" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoaged - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoaged.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoaged.mak" CFG="t_eoaged - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoaged - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoaged - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoaged - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoaged - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoaged - Win32 Release" +# Name "t_eoaged - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eoaged.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index cd86ffbaf..ae457160b 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobin - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobin - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobin___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eobin___Win32_Debug" -# PROP Intermediate_Dir "t_eobin___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eobin - Win32 Release" -# Name "t_eobin - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobin.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobin___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eobin___Win32_Debug" +# PROP Intermediate_Dir "t_eobin___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eobin - Win32 Release" +# Name "t_eobin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobin.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobitfact.dsp b/eo/win/t_eobitfact.dsp index 2e0e10f3f..8a49fd180 100644 --- a/eo/win/t_eobitfact.dsp +++ b/eo/win/t_eobitfact.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eobitfact" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobitfact - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobitfact.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobitfact.mak" CFG="t_eobitfact - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobitfact - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobitfact - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobitfact - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eobitfact - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobitfact___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eobitfact___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eobitfact___Win32_Debug" -# PROP Intermediate_Dir "t_eobitfact___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eobitfact - Win32 Release" -# Name "t_eobitfact - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eobitfact.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eobitfact" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobitfact - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobitfact.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobitfact.mak" CFG="t_eobitfact - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobitfact - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobitfact - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobitfact - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eobitfact - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobitfact___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eobitfact___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eobitfact___Win32_Debug" +# PROP Intermediate_Dir "t_eobitfact___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eobitfact - Win32 Release" +# Name "t_eobitfact - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eobitfact.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobreeder.dsp b/eo/win/t_eobreeder.dsp index 6a6c39781..e94565550 100644 --- a/eo/win/t_eobreeder.dsp +++ b/eo/win/t_eobreeder.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eobreeder" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobreeder - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobreeder.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobreeder.mak" CFG="t_eobreeder - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobreeder - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobreeder - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobreeder - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eobreeder - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobreeder___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eobreeder___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eobreeder___Win32_Debug" -# PROP Intermediate_Dir "t_eobreeder___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eobreeder - Win32 Release" -# Name "t_eobreeder - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobreeder.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eobreeder" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobreeder - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobreeder.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobreeder.mak" CFG="t_eobreeder - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobreeder - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobreeder - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobreeder - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eobreeder - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobreeder___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eobreeder___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eobreeder___Win32_Debug" +# PROP Intermediate_Dir "t_eobreeder___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eobreeder - Win32 Release" +# Name "t_eobreeder - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobreeder.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoid.dsp b/eo/win/t_eoid.dsp index fe618927b..523ba2ebc 100644 --- a/eo/win/t_eoid.dsp +++ b/eo/win/t_eoid.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eoid" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoid - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoid.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoid.mak" CFG="t_eoid - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoid - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoid - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoid - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoid - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoid___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoid___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoid___Win32_Debug" -# PROP Intermediate_Dir "t_eoid___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoid - Win32 Release" -# Name "t_eoid - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eoid.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoid" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoid - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoid.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoid.mak" CFG="t_eoid - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoid - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoid - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoid - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoid - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoid___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoid___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoid___Win32_Debug" +# PROP Intermediate_Dir "t_eoid___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoid - Win32 Release" +# Name "t_eoid - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eoid.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoinclusion.dsp b/eo/win/t_eoinclusion.dsp index a8f352530..8232c575f 100644 --- a/eo/win/t_eoinclusion.dsp +++ b/eo/win/t_eoinclusion.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eoinclusion" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoinclusion - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoinclusion.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoinclusion.mak" CFG="t_eoinclusion - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoinclusion - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoinclusion - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoinclusion - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoinclusion - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoinclusion___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoinclusion___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoinclusion___Win32_Debug" -# PROP Intermediate_Dir "t_eoinclusion___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoinclusion - Win32 Release" -# Name "t_eoinclusion - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoinclusion.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoinclusion" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoinclusion - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoinclusion.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoinclusion.mak" CFG="t_eoinclusion - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoinclusion - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoinclusion - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoinclusion - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoinclusion - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoinclusion___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoinclusion___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoinclusion___Win32_Debug" +# PROP Intermediate_Dir "t_eoinclusion___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoinclusion - Win32 Release" +# Name "t_eoinclusion - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoinclusion.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoinsertion.dsp b/eo/win/t_eoinsertion.dsp index 1f2e7d870..45c41df15 100644 --- a/eo/win/t_eoinsertion.dsp +++ b/eo/win/t_eoinsertion.dsp @@ -1,100 +1,100 @@ -# Microsoft Developer Studio Project File - Name="t_eoinsertion" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoinsertion - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoinsertion.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoinsertion.mak" CFG="t_eoinsertion - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoinsertion - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoinsertion - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoinsertion - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoinsertion - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoinsertion___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoinsertion___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoinsertion___Win32_Debug" -# PROP Intermediate_Dir "t_eoinsertion___Win32_Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoinsertion - Win32 Release" -# Name "t_eoinsertion - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoinsertion.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoinsertion" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoinsertion - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoinsertion.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoinsertion.mak" CFG="t_eoinsertion - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoinsertion - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoinsertion - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoinsertion - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoinsertion - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoinsertion___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoinsertion___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoinsertion___Win32_Debug" +# PROP Intermediate_Dir "t_eoinsertion___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoinsertion - Win32 Release" +# Name "t_eoinsertion - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoinsertion.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eornd.dsp b/eo/win/t_eornd.dsp index 60d3f8afc..1a4c3e8c3 100644 --- a/eo/win/t_eornd.dsp +++ b/eo/win/t_eornd.dsp @@ -1,113 +1,113 @@ -# Microsoft Developer Studio Project File - Name="t_eornd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eornd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eornd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eornd.mak" CFG="t_eornd - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eornd - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eornd - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eornd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eornd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eornd - Win32 Release" -# Name "t_eornd - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eornd.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoNegExp.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoNormal.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoRnd.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoUniform.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eornd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eornd - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eornd.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eornd.mak" CFG="t_eornd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eornd - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eornd - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eornd - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eornd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eornd - Win32 Release" +# Name "t_eornd - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eornd.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoNegExp.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoNormal.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoRnd.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoUniform.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_eostring.dsp b/eo/win/t_eostring.dsp index 336a3a6f6..939cc8677 100644 --- a/eo/win/t_eostring.dsp +++ b/eo/win/t_eostring.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_eostring" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eostring - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eostring.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eostring.mak" CFG="t_eostring - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eostring - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eostring - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eostring - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eostring - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eostring___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eostring___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eostring___Win32_Debug" -# PROP Intermediate_Dir "t_eostring___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eostring - Win32 Release" -# Name "t_eostring - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eostring.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eostring" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eostring - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eostring.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eostring.mak" CFG="t_eostring - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eostring - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eostring - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eostring - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eostring - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eostring___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eostring___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eostring___Win32_Debug" +# PROP Intermediate_Dir "t_eostring___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eostring - Win32 Release" +# Name "t_eostring - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eostring.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp index 75e2602f6..180e264c8 100644 --- a/eo/win/t_eovector.dsp +++ b/eo/win/t_eovector.dsp @@ -1,117 +1,117 @@ -# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovector - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovector - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovector___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eovector___Win32_Debug" -# PROP Intermediate_Dir "t_eovector___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eovector - Win32 Release" -# Name "t_eovector - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eovector.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\EO.h -# End Source File -# Begin Source File - -SOURCE=..\src\eo1d.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoNormal.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoRnd.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoVector.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovector - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovector - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovector___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eovector___Win32_Debug" +# PROP Intermediate_Dir "t_eovector___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eovector - Win32 Release" +# Name "t_eovector - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_eovector.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\EO.h +# End Source File +# Begin Source File + +SOURCE=..\src\eo1d.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoNormal.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoRnd.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoVector.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_es.dsp b/eo/win/t_es.dsp index 9e6f495c2..189bd5ff6 100644 --- a/eo/win/t_es.dsp +++ b/eo/win/t_es.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_es.mak" CFG="t_es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_es - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_es - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_es___Win32_Debug" -# PROP BASE Intermediate_Dir "t_es___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_es___Win32_Debug" -# PROP Intermediate_Dir "t_es___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_es - Win32 Release" -# Name "t_es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_es.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_es.mak" CFG="t_es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_es - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_es - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_es___Win32_Debug" +# PROP BASE Intermediate_Dir "t_es___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_es___Win32_Debug" +# PROP Intermediate_Dir "t_es___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_es - Win32 Release" +# Name "t_es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_es.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_lottery.dsp b/eo/win/t_lottery.dsp index 32f407dc4..f2ce3731e 100644 --- a/eo/win/t_lottery.dsp +++ b/eo/win/t_lottery.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_lottery" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_lottery - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_lottery.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_lottery.mak" CFG="t_lottery - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_lottery - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_lottery - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_lottery - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_lottery - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_lottery___Win32_Debug" -# PROP BASE Intermediate_Dir "t_lottery___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_lottery___Win32_Debug" -# PROP Intermediate_Dir "t_lottery___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_lottery - Win32 Release" -# Name "t_lottery - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eolottery.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_lottery" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_lottery - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_lottery.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_lottery.mak" CFG="t_lottery - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_lottery - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_lottery - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_lottery - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_lottery - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_lottery___Win32_Debug" +# PROP BASE Intermediate_Dir "t_lottery___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_lottery___Win32_Debug" +# PROP Intermediate_Dir "t_lottery___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_lottery - Win32 Release" +# Name "t_lottery - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eolottery.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_opfactory.dsp b/eo/win/t_opfactory.dsp index 21e392abc..d74ee2907 100644 --- a/eo/win/t_opfactory.dsp +++ b/eo/win/t_opfactory.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_opfactory" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_opfactory - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_opfactory.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_opfactory.mak" CFG="t_opfactory - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_opfactory - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_opfactory - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_opfactory - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_opfactory - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_opfactory___Win32_Debug" -# PROP BASE Intermediate_Dir "t_opfactory___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_opfactory___Win32_Debug" -# PROP Intermediate_Dir "t_opfactory___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_opfactory - Win32 Release" -# Name "t_opfactory - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opfactory.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_opfactory" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opfactory - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opfactory.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opfactory.mak" CFG="t_opfactory - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opfactory - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opfactory - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opfactory - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_opfactory - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opfactory___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opfactory___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opfactory___Win32_Debug" +# PROP Intermediate_Dir "t_opfactory___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_opfactory - Win32 Release" +# Name "t_opfactory - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opfactory.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_ops.dsp b/eo/win/t_ops.dsp index aa034a050..76924a972 100644 --- a/eo/win/t_ops.dsp +++ b/eo/win/t_ops.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_ops" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_ops - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_ops.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_ops.mak" CFG="t_ops - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_ops - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_ops - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_ops - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_ops - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_ops___Win32_Debug" -# PROP BASE Intermediate_Dir "t_ops___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_ops___Win32_Debug" -# PROP Intermediate_Dir "t_ops___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_ops - Win32 Release" -# Name "t_ops - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_ops.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_ops" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_ops - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_ops.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_ops.mak" CFG="t_ops - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_ops - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_ops - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_ops - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_ops - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_ops___Win32_Debug" +# PROP BASE Intermediate_Dir "t_ops___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_ops___Win32_Debug" +# PROP Intermediate_Dir "t_ops___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_ops - Win32 Release" +# Name "t_ops - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_ops.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_opsel.dsp b/eo/win/t_opsel.dsp index 9b46323f2..9e1190278 100644 --- a/eo/win/t_opsel.dsp +++ b/eo/win/t_opsel.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_opsel" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_opsel - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_opsel.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_opsel.mak" CFG="t_opsel - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_opsel - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_opsel - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_opsel - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_opsel - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_opsel___Win32_Debug" -# PROP BASE Intermediate_Dir "t_opsel___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_opsel___Win32_Debug" -# PROP Intermediate_Dir "t_opsel___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_opsel - Win32 Release" -# Name "t_opsel - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opsel.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_opsel" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opsel - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opsel.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opsel.mak" CFG="t_opsel - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opsel - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opsel - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opsel - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_opsel - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opsel___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opsel___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opsel___Win32_Debug" +# PROP Intermediate_Dir "t_opsel___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_opsel - Win32 Release" +# Name "t_opsel - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opsel.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_opselmason.dsp b/eo/win/t_opselmason.dsp index 155f3acb0..104975ca7 100644 --- a/eo/win/t_opselmason.dsp +++ b/eo/win/t_opselmason.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_opselmason" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_opselmason - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_opselmason.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_opselmason.mak" CFG="t_opselmason - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_opselmason - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_opselmason - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_opselmason - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_opselmason - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_opselmason___Win32_Debug" -# PROP BASE Intermediate_Dir "t_opselmason___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_opselmason___Win32_Debug" -# PROP Intermediate_Dir "t_opselmason___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_opselmason - Win32 Release" -# Name "t_opselmason - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opselmason.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_opselmason" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opselmason - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opselmason.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opselmason.mak" CFG="t_opselmason - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opselmason - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opselmason - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opselmason - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_opselmason - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opselmason___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opselmason___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opselmason___Win32_Debug" +# PROP Intermediate_Dir "t_opselmason___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_opselmason - Win32 Release" +# Name "t_opselmason - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opselmason.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_pop.dsp b/eo/win/t_pop.dsp index 3f7d6b3fd..aa943fdff 100644 --- a/eo/win/t_pop.dsp +++ b/eo/win/t_pop.dsp @@ -1,105 +1,105 @@ -# Microsoft Developer Studio Project File - Name="t_pop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_pop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_pop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_pop.mak" CFG="t_pop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_pop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_pop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_pop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_pop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_pop___Win32_Debug" -# PROP BASE Intermediate_Dir "t_pop___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_pop___Win32_Debug" -# PROP Intermediate_Dir "t_pop___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_pop - Win32 Release" -# Name "t_pop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opselmason.cpp -# End Source File -# Begin Source File - -SOURCE=..\test\t_pop.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_pop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_pop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_pop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_pop.mak" CFG="t_pop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_pop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_pop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_pop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_pop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_pop___Win32_Debug" +# PROP BASE Intermediate_Dir "t_pop___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_pop___Win32_Debug" +# PROP Intermediate_Dir "t_pop___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_pop - Win32 Release" +# Name "t_pop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opselmason.cpp +# End Source File +# Begin Source File + +SOURCE=..\test\t_pop.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_popops.dsp b/eo/win/t_popops.dsp index b08d64cfc..a3c586c98 100644 --- a/eo/win/t_popops.dsp +++ b/eo/win/t_popops.dsp @@ -1,101 +1,101 @@ -# Microsoft Developer Studio Project File - Name="t_popops" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_popops - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_popops.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_popops.mak" CFG="t_popops - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_popops - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_popops - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_popops - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_popops - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_popops___Win32_Debug" -# PROP BASE Intermediate_Dir "t_popops___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_popops___Win32_Debug" -# PROP Intermediate_Dir "t_popops___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_popops - Win32 Release" -# Name "t_popops - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_popops.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_popops" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_popops - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_popops.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_popops.mak" CFG="t_popops - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_popops - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_popops - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_popops - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_popops - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_popops___Win32_Debug" +# PROP BASE Intermediate_Dir "t_popops___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_popops___Win32_Debug" +# PROP Intermediate_Dir "t_popops___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_popops - Win32 Release" +# Name "t_popops - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_popops.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 0b449f9817a1361c4709234640341a6dcfd9f4b7 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 6 Mar 2000 16:09:46 +0000 Subject: [PATCH 0118/2134] Removed the istream ctor --- eo/src/EO.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 7b1b503f2..ec9d3dcce 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -53,11 +53,6 @@ public: */ EO(): repFitness(0), invalidFitness(true) {} - /** Ctor from stream. - Fitness must have defined the lecture from an istream. - */ - EO( istream& _is ) { readFrom(_is); } - /// Virtual dtor virtual ~EO() {}; From 60857fcf3bf5691b16c04a69e4e84d1a37b1a60f Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 6 Mar 2000 16:21:54 +0000 Subject: [PATCH 0119/2134] Removed the call to the istream ctor, replaced it with readFrom --- eo/src/eoPop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 10ebdcb3c..e0b4513b2 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -117,7 +117,8 @@ class eoPop: public vector, public eoObject, public eoPersistent { _is.getline( line, MAXLINELENGTH-1 ); if (strlen( line ) ) { istrstream s( line ); - EOT thisEOT( s ); + EOT thisEOT; + thisEOT.readFrom( s ); push_back( thisEOT ); } } From f430468921edbcf49e5779e6d5af14c0dd294c8f Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 6 Mar 2000 16:28:37 +0000 Subject: [PATCH 0120/2134] Removed the call to the istream ctor, replaced it with readFrom --- eo/src/eo1d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h index 31ed415fe..f2bfea202 100644 --- a/eo/src/eo1d.h +++ b/eo/src/eo1d.h @@ -73,7 +73,7 @@ public: have to implement this. @param _is the input stream */ - eo1d( istream& _is): EO( _is ){}; + eo1d( istream& _is): EO(){ readFrom(is); } /// Copy ctor eo1d( const eo1d& _eo ) From b4e61489c787d0730cd2efff2a1a6f188c85afc5 Mon Sep 17 00:00:00 2001 From: marc Date: Mon, 13 Mar 2000 10:10:00 +0000 Subject: [PATCH 0121/2134] Removed extra {} in operator() --- eo/src/eoStochTournament.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h index 8a677262d..4ef6e0f7d 100644 --- a/eo/src/eoStochTournament.h +++ b/eo/src/eoStochTournament.h @@ -56,7 +56,7 @@ template class eoStochTournament: public eoSelectOne DON'T cast the fitness to a float, use the EOT comparator! */ virtual const EOT& operator()(const eoPop& pop) { - return stochastic_tournament(pop, Trate)(); + return stochastic_tournament(pop, Trate); } private: From 83ca890c10b427736d801e67e934332a8dbd659b Mon Sep 17 00:00:00 2001 From: marc Date: Mon, 13 Mar 2000 10:14:20 +0000 Subject: [PATCH 0122/2134] Changed some int into unsigned to avoid Gnu warnings --- eo/src/eoIndiSelector.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index 5638f84a8..a404f0d00 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -52,7 +52,7 @@ public : // this can be overridden in favour of a more efficient implementation vector result(_how_many); - for (int i = 0; i < _how_many; ++i) + for (unsigned i = 0; i < _how_many; ++i) { result[i] = &select(); } @@ -86,7 +86,7 @@ class eoPopIndiSelector : public eoIndiSelector pop = &_pop; last = _end; - if (last < 0 || last > pop->size()) + if (last < 0 || last > (int) pop->size()) { last = pop->size(); } @@ -106,7 +106,7 @@ class eoPopIndiSelector : public eoIndiSelector const EOT& select(void) { valid(); - if (firstChoice < 0 || firstChoice >= size()) + if (firstChoice < 0 || firstChoice >= (int) size()) { return do_select(); // let the child figure out what to do } From b111bf01aa7e0ddd6c496c243d82b53def8aee68 Mon Sep 17 00:00:00 2001 From: marc Date: Mon, 13 Mar 2000 10:17:12 +0000 Subject: [PATCH 0123/2134] Put eoTerm into the eo hierarchy - it was in the air! Added the className method --- eo/src/eoTerm.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eo/src/eoTerm.h b/eo/src/eoTerm.h index 0910a19b9..ca73901a6 100644 --- a/eo/src/eoTerm.h +++ b/eo/src/eoTerm.h @@ -32,7 +32,7 @@ * false for termination */ template< class EOT> -class eoTerm { +class eoTerm : public eoObject { public: /// Ctors/dtors @@ -41,10 +41,13 @@ public: /** Returns false if the training has to stop, true if it continues \\ It is non-const since it might change the internal state - of the object, for instance, updating a counter + of the object, for instance, updating local data. */ virtual bool operator() ( const eoPop< EOT >& _pop ) = 0 ; + /// Class name. + virtual string className() const { return "eoTerm"; } + }; #endif From 4a6202ff132e5792268f085ad7791db1db11dbd1 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 20 Mar 2000 16:13:32 +0000 Subject: [PATCH 0124/2134] Removed some obsolete files, changed min and max in compatibility, commented the parser out of eoESFullMut and added some default initialization (please check this Marc). Why eoParser has changed is beyond me, but I am too late to uncommit. I will update a real parser very soon now. --- eo/src/compatibility.h | 9 +- eo/src/eoAltBreeder.h | 302 --------------------------------------- eo/src/eoESFullChrom.h | 2 +- eo/src/eoESFullMut.h | 12 +- eo/src/eoMultiBinOp.h | 100 ------------- eo/src/eoMultiMonOp.h | 80 ----------- eo/src/eoParser.h | 4 + eo/src/eoParserUtils.cpp | 3 + eo/src/eoScalarFitness.h | 7 +- 9 files changed, 24 insertions(+), 495 deletions(-) delete mode 100644 eo/src/eoAltBreeder.h delete mode 100644 eo/src/eoMultiBinOp.h delete mode 100644 eo/src/eoMultiMonOp.h diff --git a/eo/src/compatibility.h b/eo/src/compatibility.h index 1297fc9ec..75479c149 100644 --- a/eo/src/compatibility.h +++ b/eo/src/compatibility.h @@ -31,11 +31,6 @@ #include #include -#ifdef _1__GNUC__ -// Specifics for GNUC -#define NO_GOOD_ISTREAM_ITERATORS -#endif - #ifdef _MSC_VER /* Maarten: added this code here because Mirkosoft has the @@ -54,7 +49,7 @@ here. Sure hope it works // add min and max to std... namespace std { - template T min(const T& a, const T& b) + template const T& min(const T& a, const T& b) { if(a < b) return a; @@ -62,7 +57,7 @@ namespace std return b; } - template T max(const T& a, const T& b) + template const T& max(const T& a, const T& b) { if(a > b) return a; diff --git a/eo/src/eoAltBreeder.h b/eo/src/eoAltBreeder.h deleted file mode 100644 index 1a8241bd6..000000000 --- a/eo/src/eoAltBreeder.h +++ /dev/null @@ -1,302 +0,0 @@ -//----------------------------------------------------------------------------- -// eoBreeder.h -//----------------------------------------------------------------------------- - -#ifndef eoBreeder_h -#define eoBreeder_h - -//----------------------------------------------------------------------------- - -#include // vector -#include -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector -#include -#include - -using namespace std; - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -template -class eoGeneralOp: public eoOp -{ -public: - - eoGeneralOp() - :eoOp( Nary ) {}; - virtual ~eoGeneralOp () {}; - - virtual void operator()( vector _in, OutIt _out) const = 0; - virtual int nInputs(void) const = 0; - virtual int nOutputs(void) const = 0; // no support for 2 -> 2 xover - - virtual string className() const {return "eoGeneralOp";}; -}; - -template -class eoWrappedMonOp : public eoGeneralOp -{ -public : - eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp(), op(_op) {} - virtual ~eoWrappedMonOp() {} - - void operator()( vector _in, OutIt _out) const - { - *_out = *_in[0]; - op(*_out ); - } - - int nInputs(void) const { return 1; } - int nOutputs(void) const { return 1; } - - virtual string className() const {return "eoWrappedOp";}; - - -private : - const eoMonOp& op; -}; - -template -class eoWrappedBinOp : public eoGeneralOp -{ -public : - eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(), op(_op) {} - virtual ~eoWrappedBinOp() {} - - void operator()( vector _in, OutIt _out) const - { - *_out = *_in[0]; - *(_out + 1) = *_in[1]; - op(*_out, *(_out + 1)); - } - - int nInputs(void) const { return 2; } - int nOutputs(void) const { return 2; } // Yup, due to the bad design, can't choose between outputting 1 or 2 - - virtual string className() const {return "eoWrappedOp";}; - - -private : - const eoBinOp& op; -}; - -template -class eoCombinedOp : public eoGeneralOp -{ -public : - - eoCombinedOp() : eoGeneralOp(), arity(0) {} - virtual ~eoCombinedOp() {} - - int nInputs(void) const { return arity; } - int nOutputs(void) const { return 1; } - - void addOp(eoGeneralOp* _op) - { - ops.push_back(_op); - arity = arity < _op->nInputs()? _op->nInputs() : arity; - } - - - void clear(void) - { - ops.resize(0); - } - - - void operator()( vector _in, OutIt _out) const - { - for (int i = 0; i < ops.size(); ++i) - { - (*ops[i])(_in, _out); - _in[0] = &*_out; - } - } - -private : - vector* > ops; - int arity; -}; - -template -class eoAltOpSelector: public eoOpSelector, public vector*> -{ -public: - - virtual ID addOp( eoOp& _op, float _arg ) - { - eoGeneralOp* op = dynamic_cast*>(&_op); - - - if (op == 0) - { - switch(_op.readArity()) - { - case unary : - oplist.push_back(auto_ptr >(new eoWrappedMonOp(static_cast&>(_op)))); - - op = oplist.back().get(); - break; - case binary : - oplist.push_back(auto_ptr >(new eoWrappedBinOp(static_cast&>(_op)))); - op = oplist.back().get(); - break; - } - } - - iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer - - if (result == end()) - { - push_back(op); - rates.push_back(_arg); - return size(); - } - // else - - *result = op; - ID id = result - begin(); - rates[id] = _arg; - return id; - } - - virtual const eoOp& getOp( ID _id ) - { - return *operator[](_id); - } - - virtual void deleteOp( ID _id ) - { - operator[](_id) = 0; // TODO, check oplist and clear it there too. - rates[_id] = 0.0; - } - - virtual eoOp* Op() - { - return &selectOp(); - } - - - virtual eoGeneralOp& selectOp() = 0; - - - virtual string className() const { return "eoAltOpSelector"; }; - - void printOn(ostream& _os) const {} - - -protected : - - vector rates; - list > > oplist; -}; - -template -class eoProportionalOpSelector : public eoAltOpSelector -{ - public : - eoProportionalOpSelector() : eoAltOpSelector() {} - - - virtual eoGeneralOp& selectOp() - { - int what = rng.roulette_wheel(rates); - - return *operator[](what); - } -}; - -template -class eoSequentialOpSelector : public eoAltOpSelector -{ - public : - - eoSequentialOpSelector() : eoAltOpSelector() {} - - virtual eoGeneralOp& selectOp() - { - for (int i = 0; i < size(); ++i) - { - if (operator[](i) == 0) - continue; - - if (rng.flip(rates[i])) - combined.addOp(operator[](i)); - } - - return combined; - } - - private : - - eoCombinedOp combined; -}; - -template -class eoRandomIndy // living in a void right now -{ - public : - - eoRandomIndy() {} - - vector operator()(int _n, eoPop::iterator _begin, eoPop::iterator _end) - { - vector result(_n); - - for (int i = 0; i < result.size(); ++i) - { - result[i] = &*(_begin + rng.random(_end - _begin)); - } - - return result; - } -}; - -template class eoAltBreeder: public eoTransform -{ - public: - typedef eoPop::reverse_iterator outIt; - /// Default constructor. - eoAltBreeder( eoAltOpSelector& _opSel): opSel( _opSel ) {} - - /// Destructor. - virtual ~eoAltBreeder() {} - - /** - * Enlarges the population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - int size = pop.size(); - - for (unsigned i = 0; i < size; i++) - { - eoGeneralOp& op = opSel.selectOp(); - - pop.resize(pop.size() + op.nOutputs()); - vector indies = indySelector(op.nInputs(), pop.begin(), pop.begin() + size); - - op(indies, pop.rbegin()); - - } - } - - /// The class name. - string classname() const { return "eoAltBreeder"; } - - private: - eoAltOpSelector& opSel; - eoRandomIndy indySelector; -}; - - - -#endif eoBreeder_h diff --git a/eo/src/eoESFullChrom.h b/eo/src/eoESFullChrom.h index 29c566564..85bd4f228 100644 --- a/eo/src/eoESFullChrom.h +++ b/eo/src/eoESFullChrom.h @@ -79,7 +79,7 @@ class eoESFullChrom : public eoVector { /* another constructor, for compatibility reasons */ - eoESFullChrom(istream& _s) {cout << "Not Yet implemented\n";exit(1);}; + eoESFullChrom(istream& _s) { cout << "Not Yet implemented\n";exit(1);}; /* And now the useful constructor: from a parser (should be in the factory, if such a thing exists one day for eoESFullChrom diff --git a/eo/src/eoESFullMut.h b/eo/src/eoESFullMut.h index d30232af8..37b6c4724 100644 --- a/eo/src/eoESFullMut.h +++ b/eo/src/eoESFullMut.h @@ -36,6 +36,10 @@ #include #include +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ // should not be a parameter ... @@ -44,7 +48,13 @@ const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ template class eoESMutate: public eoMonOp< eoESFullChrom > { public: - /// + eoESMutate(double n) + { + TauLcl = 1/sqrt(2*sqrt(n)); + TauGlb= 1 / sqrt(2 * n); + TauBeta = 0.0873; + }/// + eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), TauBeta(_TauBeta) {}; diff --git a/eo/src/eoMultiBinOp.h b/eo/src/eoMultiBinOp.h deleted file mode 100644 index 06237d84f..000000000 --- a/eo/src/eoMultiBinOp.h +++ /dev/null @@ -1,100 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMultiBinOp.h -// Class that combines several binary or unary operators -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOMULTIBINOP_h -#define _EOMULTIBINOP_h - -#include - -#include - -/** MultiMonOp combines several monary operators. By itself, it does nothing to the -EO it´s handled*/ -template -class eoMultiBinOp: public eoBinOp { -public: - /// Ctor from an already existing op - eoMultiBinOp( const eoBinOp* _op ) - : eoBinOp< EOT >( ), vOp(){ - vOp.push_back( _op ); - }; - - /// - eoMultiBinOp( ) - : eoBinOp< EOT >( ), vOp(){}; - - /// Ads a new operator - void adOp( const eoOp* _op ){ - vOp.push_back( _op ); - }; - - /// needed virtual dtor - virtual ~eoMultiBinOp() {}; - - /// - /// Applies all operators to the EO - virtual void operator()( EOT& _eo1, EOT& _eo2 ) const { - if ( vOp.begin() != vOp.end() ) { // which would mean it's empty - for ( vector< const eoOp* >::const_iterator i = vOp.begin(); - i != vOp.end(); i++ ) { - // Admits only unary or binary operator - switch ((*i)->readArity()) { - case unary: - { - const eoMonOp* monop = static_cast* >(*i); - (*monop)( _eo1 ); - (*monop)( _eo2 ); - break; - } - case binary: - { - const eoBinOp* binop = static_cast* >(*i); - (*binop)( _eo1, _eo2 ); - break; - } - } - } - } - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMultiBinOp";}; - //@} - -private: - - /// uses pointers to base class since operators can be unary or binary - vector< const eoOp* > vOp; -}; - -#endif - diff --git a/eo/src/eoMultiMonOp.h b/eo/src/eoMultiMonOp.h deleted file mode 100644 index 09167206c..000000000 --- a/eo/src/eoMultiMonOp.h +++ /dev/null @@ -1,80 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMultiMonOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOMULTIMONOP_h -#define _EOMULTIMONOP_h - -#include - -#include - -/** MultiMonOp combines several monary operators. By itself, it does nothing to the -EO it´s handled*/ -template -class eoMultiMonOp: public eoMonOp { -public: - /// Ctor from an already existing op - eoMultiMonOp( const eoMonOp* _op ) - : eoMonOp< EOT >( ), vOp(){ - vOp.push_back( _op ); - }; - - /// - eoMultiMonOp( ) - : eoMonOp< EOT >( ), vOp(){}; - - /// Ctor from an already existing op - void adOp( const eoMonOp* _op ){ - vOp.push_back( _op ); - }; - - /// needed virtual dtor - virtual ~eoMultiMonOp() {}; - - /// - /// Applies all operators to the EO - virtual void operator()( EOT& _eo ) const { - if ( vOp.begin() != vOp.end() ) { - for ( vector* >::const_iterator i = vOp.begin(); - i != vOp.end(); i++ ) { - (*i)->operator () ( _eo ); - } - } - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMonOp";}; - //@} -private: - vector< const eoMonOp* > vOp; -}; - -#endif diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h index 3e5601a99..013699132 100644 --- a/eo/src/eoParser.h +++ b/eo/src/eoParser.h @@ -28,6 +28,10 @@ #define _PARSER_H #include // for strcasecmp ... maybe there's a c++ way of doing it? + // Yep there is, but needs either a simple functor for the equal function + // or a hand-rolled string template class (this isn't that horrible as + // it sounds, it just means a new string_traits class with two changed + // function definitions. (Maarten) #ifdef _MSC_VER #define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) #endif diff --git a/eo/src/eoParserUtils.cpp b/eo/src/eoParserUtils.cpp index b4db0b8d1..084af77c6 100644 --- a/eo/src/eoParserUtils.cpp +++ b/eo/src/eoParserUtils.cpp @@ -4,6 +4,8 @@ #include /// Reproducible random seed +// For the Mersenne-Twister used in EO, the entire rng needs to be saved + //---------------------------------- void InitRandom( Parser & parser) { //---------------------------------- @@ -25,6 +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. rng.reseed(_seed); return; diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 277888bde..63409191c 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -39,7 +39,7 @@ */ template > -class eoScalarFitness +class eoScalarFitness { public : @@ -56,15 +56,14 @@ class eoScalarFitness // Comparison, using less by default bool operator<(const eoScalarFitness& other) const - { return Compare()(this->value, other.value); } + { return Compare()(value, other.value); } private : ScalarType value; }; template -std::ostream& operator<<(std::ostream& os, const eoScalarFitness& -f) +std::ostream& operator<<(std::ostream& os, const eoScalarFitness& f) { os << (F) f; return os; From d55c0a5456a9ef5b0682dd3474ade16948f5e5a9 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 20 Mar 2000 17:32:42 +0000 Subject: [PATCH 0125/2134] Just changed a typo in the documentation --- eo/src/eoAtomMutation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoAtomMutation.h b/eo/src/eoAtomMutation.h index 977f6b50a..7d86d521b 100644 --- a/eo/src/eoAtomMutation.h +++ b/eo/src/eoAtomMutation.h @@ -35,7 +35,7 @@ /** Atomic mutation of an EO. Acts on containers, and applies a mutation operator to each element of the container with some probability. EOT must - be a container of any tipe + be a container of any type */ template class eoAtomMutation: public eoMonOp { From f7547d6f8b2fd21e8ea5eafb1663d1c6f03ea618 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 20 Mar 2000 17:35:24 +0000 Subject: [PATCH 0126/2134] eoSelfEval was empty --- eo/src/eoSelfEval.h | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 eo/src/eoSelfEval.h diff --git a/eo/src/eoSelfEval.h b/eo/src/eoSelfEval.h deleted file mode 100644 index de4e78167..000000000 --- a/eo/src/eoSelfEval.h +++ /dev/null @@ -1,23 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// EO.h -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- From 32541d5fe7ad3688d68be89eb97b0e2ea77bfe17 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 13:57:57 +0000 Subject: [PATCH 0127/2134] moved to utils --- eo/src/compatibility.h | 71 ------------------------------------------ 1 file changed, 71 deletions(-) delete mode 100644 eo/src/compatibility.h diff --git a/eo/src/compatibility.h b/eo/src/compatibility.h deleted file mode 100644 index 75479c149..000000000 --- a/eo/src/compatibility.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - compatibility.h - File to store some compiler specific stuff in. Currently handles, or - least tries to handle the min() max() problems when using MSVC - - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef COMPAT_H -#define COMPAT_H - -#include -#include - -#ifdef _MSC_VER -/* -Maarten: added this code here because Mirkosoft has the -nasty habit of #define min and max in stdlib.h (and windows.h) -I'm trying to undo this horrible macro magic (microsoft yet macrohard) -here. Sure hope it works -*/ - -#include - -#ifdef min -#undef min -#undef max // as they come in pairs -#endif - -// add min and max to std... -namespace std -{ - template const T& min(const T& a, const T& b) - { - if(a < b) - return a; - // else - return b; - } - - template const T& max(const T& a, const T& b) - { - if(a > b) - return a; - // else - return b; - } -} - -#endif // _MSC_VER - -#endif From 2e35c416ce7e0ba5c515eb6b71c18878fd3a65bc Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 13:58:29 +0000 Subject: [PATCH 0128/2134] Removed obsolete references --- eo/src/eo | 2 -- 1 file changed, 2 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 4ec7688f3..5ee961e6c 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -47,8 +47,6 @@ #include #include -#include -#include #include #include From 81751e279f600de6528679ff24930d10e7998a4c Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:04:03 +0000 Subject: [PATCH 0129/2134] Added utilities directory, this contains state, parser etc. --- eo/src/utils/compatibility.h | 71 ++++++ eo/src/utils/eoData.h | 64 +++++ eo/src/utils/eoParam.h | 192 +++++++++++++++ eo/src/utils/eoParser.cpp | 232 ++++++++++++++++++ eo/src/utils/eoParser.h | 136 +++++++++++ eo/src/utils/eoRNG.cpp | 5 + eo/src/utils/eoRNG.h | 452 +++++++++++++++++++++++++++++++++++ eo/src/utils/eoState.cpp | 147 ++++++++++++ eo/src/utils/eoState.h | 84 +++++++ 9 files changed, 1383 insertions(+) create mode 100644 eo/src/utils/compatibility.h create mode 100644 eo/src/utils/eoData.h create mode 100644 eo/src/utils/eoParam.h create mode 100644 eo/src/utils/eoParser.cpp create mode 100644 eo/src/utils/eoParser.h create mode 100644 eo/src/utils/eoRNG.cpp create mode 100644 eo/src/utils/eoRNG.h create mode 100644 eo/src/utils/eoState.cpp create mode 100644 eo/src/utils/eoState.h diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h new file mode 100644 index 000000000..75479c149 --- /dev/null +++ b/eo/src/utils/compatibility.h @@ -0,0 +1,71 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + compatibility.h + File to store some compiler specific stuff in. Currently handles, or + least tries to handle the min() max() problems when using MSVC + + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef COMPAT_H +#define COMPAT_H + +#include +#include + +#ifdef _MSC_VER +/* +Maarten: added this code here because Mirkosoft has the +nasty habit of #define min and max in stdlib.h (and windows.h) +I'm trying to undo this horrible macro magic (microsoft yet macrohard) +here. Sure hope it works +*/ + +#include + +#ifdef min +#undef min +#undef max // as they come in pairs +#endif + +// add min and max to std... +namespace std +{ + template const T& min(const T& a, const T& b) + { + if(a < b) + return a; + // else + return b; + } + + template const T& max(const T& a, const T& b) + { + if(a > b) + return a; + // else + return b; + } +} + +#endif // _MSC_VER + +#endif diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h new file mode 100644 index 000000000..1ba358605 --- /dev/null +++ b/eo/src/utils/eoData.h @@ -0,0 +1,64 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoData.h + Some numeric limits and types and things like that; with #ifdefs to keep + compatibility + (c) GeNeura Team & Maarten Keijzer, 1998, 1999, 2000 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef EODATA_H +#define EODATA_H + +//----------------------------------------------------------------------------- + +#include // vector +#include // set +#include // string + +using namespace std; + + +#ifdef _MSC_VER + #include // MAXDOUBLE + #define MAXFLOAT numeric_limits::max() + #define MINFLOAT numeric_limits::min() + #define MAXDOUBLE numeric_limits::max() + #define MAXINT numeric_limits::max() +#else + #include + #include +#ifndef _WIN32 // should be the define for UN*X flavours: _POSIX?? + #include +#endif + #ifndef MAXFLOAT + #define MAXFLOAT (float)1e127 + #define MAXDOUBLE (double)1.79769313486231570e+308 + #define MAXINT 2147483647 + #endif +#endif + +#ifndef _MSC_VER +#include +#define _isnan isnan +#endif + +//----------------------------------------------------------------------------- + +#endif EODATA_H + diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h new file mode 100644 index 000000000..1fe4dd273 --- /dev/null +++ b/eo/src/utils/eoParam.h @@ -0,0 +1,192 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParam.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoParam_h +#define eoParam_h + +//----------------------------------------------------------------------------- +#include +#include + +/** + eoParam: Base class for monitoring and parsing parameters +*/ +class eoParam +{ +public: + + /** Empty constructor - called from outside any parser + */ + eoParam () + : repLongName(""), repDescription(""), repDefault(""), + repShortHand(0), repRequired(false){} + + /** + * Construct a Param. + * @param _longName Long name of the argument + * @param _default The default value + * @param _description Description of the parameter. What is useful for. + * @param _shortName Short name of the argument (Optional) + * @param _required If it is a necessary parameter or not + */ + eoParam (std::string _longName, std::string _default, + std::string _description, char _shortName = 0, bool _required = false) + : repShortHand(_shortName), repLongName(_longName), + repDescription(_description ), repDefault(_default), + repRequired( _required) {} + + /** + * Virtual destructor is needed. + */ + virtual ~eoParam () {}; + + /** + * Pure virtual function to get the value out. + */ + virtual std::string getValue ( void ) const = 0; + + /** + * Pure virtual function to set the value + */ + virtual void setValue(std::string _value) = 0 ; + + /** + * Returns the short name. + */ + char shortName ( void ) const { return repShortHand; }; + + /** + * Returns the long name. + */ + const std::string& longName ( void ) const { return repLongName; }; + + /** + * Returns the description of the argument + */ + const std::string& description ( void ) const { return repDescription; }; + + /** + * Returns the default value of the argument + */ + const std::string& defValue ( void ) const { return repDefault; }; + + /** + * Sets the default value of the argument, + */ + void defValue ( std::string str ) { repDefault = str; }; + + /** + * Returns the value of the param as a string + */ + /** + * Returns if required or not. + */ + bool required ( void ) const { return repRequired; }; + +private: + std::string repLongName; + std::string repDefault; + std::string repDescription; + char repShortHand; + bool repRequired; +}; + +/** + eoValueParam: templatized derivation of eoParam. Can be used to contain + any scalar value type. It makes use of std::strstream to get and set values. This + should be changed to std::stringstream when that class is available in g++. +*/ + +template +class eoValueParam : public eoParam +{ +public : + eoValueParam(void) : eoParam() {} + + /** + * Construct a Param. + * @param _defaultValue The default value + * @param _longName Long name of the argument + * @param _description Description of the parameter. What is useful for. + * @param _shortName Short name of the argument (Optional) + * @param _required If it is a necessary parameter or not + */ + eoValueParam (ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + bool _required = false) + : repValue(_defaultValue), eoParam(_longName, "", _description, _shortHand, _required) + { + eoParam::defValue(getValue()); + } + + ValueType& value() { return repValue; } + ValueType value() const { return repValue; } + + std::string getValue(void) const + { + std::ostrstream os; + os << repValue; + os << std::ends; + return os.str(); + } + + void setValue(std::string _value) + { + std::istrstream is(_value.c_str()); + is >> repValue; + } + +private : + ValueType repValue; +}; + +/*template +class eoContainerParam : public eoParam +{ +public : + eoContainerParam (ContainerType& value, string _shortName, string _longName, + string _default, + string _description, + bool _required, + bool _change ) + : value(_value), eoParam(_shortName, _longName, _description, _default, _required, _change) + {} + + + // void setValue(const string & _value) + // { + // std::istringstream is(_value); + // copy(istream_iterator(is), istream_iterator(), back_inserter(value)); + // } + +private : + ContainerType& value; +};*/ + + +#endif diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp new file mode 100644 index 000000000..b6402de8b --- /dev/null +++ b/eo/src/utils/eoParser.cpp @@ -0,0 +1,232 @@ +#include +#include +#include + +#include "eoParser.h" + +using namespace std; + +std::ostream& printSectionHeader(std::ostream& os, std::string section) +{ + os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; + return os; +} + +eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : + programName( _argv[0]), + programDescription( _programDescription), + parameterFile("", _lFileParamName, "Load using a configuration file", _shortHand), + needHelp(false, "help", "Prints this message", 'h') +{ + strstream stream; + + for (int i = 1; i < _argc; ++i) + { + stream << _argv[i] << '\n'; + } + + readFrom(stream); + + processParam(parameterFile); + processParam(needHelp); + + if (parameterFile.getValue() != parameterFile.defValue()) + { + ifstream is (parameterFile.getValue().c_str()); + + readFrom(is); + } +} + +void eoParser::processParam(eoParam& param, std::string section) +{ + doRegisterParam(param); // plainly register it + params.insert(make_pair(section, ¶m)); +} + +void eoParser::doRegisterParam(eoParam& param) const +{ + if (param.required() && !isItThere(param)) + { + throw runtime_error("required parameter missing"); + } + + pair value = getValue(param); + + if (value.first) + { + if (value.second == "") // it is there, but no value is given, default to "1" + value.second = "1"; // for bool + + param.setValue(value.second); + } +} + +pair eoParser::getValue(eoParam& _param) const +{ + pair result(false, ""); + + if (_param.shortName() != 0) + { + map::const_iterator it = shortNameMap.find(_param.shortName()); + if (it != shortNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + } + + map::const_iterator it = longNameMap.find(_param.longName()); + + if (it != longNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + // else (TODO: check environment, just long names) + + return result; +} + +void eoParser::updateParameters() const +{ + typedef MultiMapType::const_iterator It; + + for (It p = params.begin(); p != params.end(); ++p) + { + doRegisterParam(*p->second); + } +} + +void eoParser::readFrom(istream& is) +{ + string str; + + while (is >> str) + { + if (str[0] == '#') + { // skip the rest of the line + string tempStr; + getline(is, tempStr); + } + if (str[0] == '-') + { + if (str.size() < 2) + { + eoWarning("Missing parameter"); + needHelp.value() = true; + return; + } + + if (str[1] == '-') // two consecutive dashes + { + string::iterator equalLocation = find(str.begin() + 2, str.end(), '='); + string value; + + if (equalLocation == str.end()) + { // TODO: it should be the next string + value = ""; + } + else + { + value = string(equalLocation + 1, str.end()); + } + + string name(str.begin() + 2, equalLocation); + longNameMap[name] = value; + + } + else // it should be a char + { + string value(str.begin() + 2, str.end()); + shortNameMap[str[1]] = value; + } + } + } + + updateParameters(); +} + +void eoParser::printOn(ostream& os) const +{ + typedef MultiMapType::const_iterator It; + + It p = params.begin(); + + std::string section = p->first; + + printSectionHeader(os, section); + + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + eoParam* param = p->second; + + string str = "--" + param->longName() + "=" + param->getValue(); + + os << left << setw(40) << str; + os << " # " << '-' << param->shortName() << " : " << param->description(); + + if (param->required()) + { + os << " REQUIRED "; + } + + os << '\n'; + } +} + +void eoParser::printHelp(ostream& os) +{ + // print program name and description + os << this->programName <<": "<< programDescription << "\n\n"; + + // print the usage when calling the program from the command line + os << "Usage: "<< programName<<" [Options]\n"; + // only short usage! + os << "Options of the form \"-ShortName value\" or \"--LongName value\"" << endl; + + os << "Where:"<first; + + printSectionHeader(os, section); + + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + if (p->second->shortName()) + os << "-" << p->second->shortName() << ", "; + + os << "--" <second->longName() <<":\t" + << p->second->description() ; + + os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); + os <<". By default: "<second->defValue() << '\n'; + } // for p + + os << '\n'; + +} diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h new file mode 100644 index 000000000..17dddcaea --- /dev/null +++ b/eo/src/utils/eoParser.h @@ -0,0 +1,136 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParser.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoParser_h +#define eoParser_h + +#include +#include +#include + +#include "eoParam.h" +#include "eoObject.h" +#include "eoPersistent.h" + +/** + eoParameterLoader is an abstract class that can be used as a base for your own + parameter loading and saving. The command line parser eoParser is derived from + this class. +*/ +class eoParameterLoader +{ +public : + + /** Need a virtual destructor */ + virtual ~eoParameterLoader() {} + + /** + * processParam is used to register a parameter and set its value if it is known + * + * @param param the parameter to process + * @param section the section where this parameter belongs + */ + virtual void processParam(eoParam& param, std::string section = "") = 0; +}; + +void eoWarning(std::string str) +{ + cout << str << '\n'; +} + +/** + eoParser: command line parser and configuration file reader + This class is persistent, so it can be stored and reloaded to restore + parameter settings. +*/ +class eoParser : public eoParameterLoader, public eoObject, public eoPersistent +{ + +public: + + /** + * Constructor + * a complete constructor that reads the command line an optionally reads + * a configuration file. + * + * myEo --param-file=param.rc will then load using the parameter file param.rc + * + * @param _argc, _ argv command line arguments + * @param _programDescription Description of the work the program does + * @param _lFileParamName Name of the parameter specifying the configuration file (--param-file) + * @param _shortHand Single charachter shorthand for specifying the configuration file + */ + eoParser ( int _argc, char **_argv , string _programDescription = "", + string _lFileParamName = "param-file", char _shortHand = 'p'); + + /** + Processes the parameter and puts it in the appropriate section for readability + */ + void processParam(eoParam& param, std::string section = ""); + + void readFrom(istream& is); + + void printOn(ostream& os) const; + + /// className for readibility + std::string className(void) const { return "Parser"; } + + /// true if the user made an error or asked for help + bool userNeedsHelp(void) const { return needHelp.value(); } + + /** + * Prints an automatic help in the specified output using the information + * provided by parameters + */ + void printHelp(ostream& os); + + string ProgramName() { return programName; } + +private: + + void doRegisterParam(eoParam& param) const; + + bool isItThere(eoParam& _param) const { return getValue(_param).first; } + + std::pair getValue(eoParam& _param) const; + + void updateParameters() const; + + typedef std::multimap MultiMapType; + + MultiMapType params; + + string programName; + string programDescription; + + map shortNameMap; + map longNameMap; + + eoValueParam parameterFile; + eoValueParam needHelp; +}; + +#endif \ No newline at end of file diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp new file mode 100644 index 000000000..a3950638f --- /dev/null +++ b/eo/src/utils/eoRNG.cpp @@ -0,0 +1,5 @@ +#include +#include "eoRNG.h" + +eoRng rng((uint32) time(0)); + diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h new file mode 100644 index 000000000..76f63166e --- /dev/null +++ b/eo/src/utils/eoRNG.h @@ -0,0 +1,452 @@ +/* +* Random number generator adapted from (see comments below) +* +* The random number generator is modified into a class +* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +* transformation to generate normal deviates. +* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ + +// This is the ``Mersenne Twister'' random number generator MT19937, which +// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) +// starting from any odd seed in 0..(2^32 - 1). This version is a recode +// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by +// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in +// July-August 1997). +// +// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +// generate 300 million random numbers; after recoding: 24.0 sec. for the same +// (i.e., 46.5% of original time), so speed is now about 12.5 million random +// number generations per second on this machine. +// +// According to the URL +// (and paraphrasing a bit in places), the Mersenne Twister is ``designed +// with consideration of the flaws of various existing generators,'' has +// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally +// equidistributed, and ``has passed many stringent tests, including the +// die-hard test of G. Marsaglia and the load test of P. Hellekalek and +// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 +// to 5012 bytes of static data, depending on data type sizes, and the code +// is quite short as well). It generates random numbers in batches of 624 +// at a time, so the caching and pipelining of modern systems is exploited. +// It is also divide- and mod-free. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Library General Public License as published by +// the Free Software Foundation (either version 2 of the License or, at your +// option, any later version). This library is distributed in the hope that +// it will be useful, but WITHOUT ANY WARRANTY, without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU Library General Public License for more details. You should have +// received a copy of the GNU Library General Public License along with this +// library; if not, write to the Free Software Foundation, Inc., 59 Temple +// Place, Suite 330, Boston, MA 02111-1307, USA. +// +// The code as Shawn received it included the following notice: +// +// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When +// you use this, send an e-mail to with +// an appropriate reference to your work. +// +// It would be nice to CC: when you write. +// + +// +// uint32 must be an unsigned integer type capable of holding at least 32 +// bits; exactly 32 should be fastest, but 64 is better on an Alpha with +// GCC at -O3 optimization so try your options and see what's best for you +// + +/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ + + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + + +#include +#include + +// TODO: check for various compilers if this is exactly 32 bits +// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// so neat preprocessing tricks will not work + +typedef unsigned long uint32; // Compiler and platform dependent! + +//----------------------------------------------------------------------------- +// eoRng +//----------------------------------------------------------------------------- +/** +eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +for generating random numbers. The various member functions implement useful functions +for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). + +Note for people porting EO to other platforms: please make sure that the typedef +uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not +shorter. If it is longer, file compatibility between EO on different platforms +may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + /** + ctor takes a random seed; if you want another seed, use reseed + @see reseed + */ + + eoRng(uint32 s) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { + state = new uint32[N+1]; + initialize(s); + } + + ~eoRng(void) + { + delete [] state; + } + + /** + Re-initializes the Random Number Generator. + */ + void reseed(uint32 s) + { + initialize(s); + } + + /** + uniform(m = 1.0) returns a random double in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(rand_max()); + } + + /** + random() returns a random integer in the range [0, m) + */ + uint32 random(uint32 m) + { + return uint32(uniform() * double(m)); + } + + /** + flip() tosses a biased coin such that flip(x/100.0) will + returns true x% of the time + */ + bool flip(float bias) + { + return uniform() < bias; + } + + /** + normal() zero mean gaussian deviate with standard deviation of 1 + */ + double normal(void); // gaussian mutation, stdev 1 + + /** + normal(stdev) zero mean gaussian deviate with user defined standard deviation + */ + double normal(double stdev) + { + return stdev * normal(); + } + + /** + normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation + */ + double normal(double mean, double stdev) + { + return mean + normal(stdev); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32 rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32 rand_max(void) const { return (uint32) 0xffffffff; } + + /** + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, T total = 0) + { + if (total == 0) + { // count + for (unsigned i = 0; i < vec.size(); ++i) + total += vec[i]; + } + + float change = uniform() * total; + + int i = 0; + + while (change > 0) + { + change -= vec[i++]; + } + + return --i; + } + + /// + void printOn(ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /// + void readFrom(istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + +private : + uint32 restart(void); + void initialize(uint32 seed); + + uint32* state; // the array for the state + uint32* next; + int left; + + bool cached; + float cacheValue; + + const int N; + const int M; + const uint32 K; // a magic constant + + /** + Private copy ctor and assignment operator to make sure that + nobody accidentally copies the random number generator. + If you want similar RNG's, make two RNG's and initialize + them with the same seed. + */ + eoRng (const eoRng&); // no implementation + eoRng& operator=(const eoRng&); // dito +}; + +/** + The one and only global eoRng object +*/ +extern eoRng rng; + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + +inline void eoRng::initialize(uint32 seed) + { + // + // We initialize state[0..(N-1)] via the generator + // + // x_new = (69069 * x_old) mod 2^32 + // + // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's + // _The Art of Computer Programming_, Volume 2, 3rd ed. + // + // Notes (SJC): I do not know what the initial state requirements + // of the Mersenne Twister are, but it seems this seeding generator + // could be better. It achieves the maximum period for its modulus + // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if + // x_initial can be even, you have sequences like 0, 0, 0, ...; + // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, + // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. + // + // Even if x_initial is odd, if x_initial is 1 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 0, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + // ... + // + // and if x_initial is 3 mod 4 then + // + // the lowest bit of x is always 1, + // the next-to-lowest bit of x is always 1, + // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + // ... + // + // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is + // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It + // also does well in the dimension 2..5 spectral tests, but it could be + // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + // + // Note that the random number user does not see the values generated + // here directly since restart() will always munge them first, so maybe + // none of all of this matters. In fact, the seed values made here could + // even be extra-special desirable if the Mersenne Twister theory says + // so-- that's why the only change I made is to restrict to odd seeds. + // + + left = -1; + + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU); + } + + +inline uint32 eoRng::restart(void) +{ + register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + +inline uint32 eoRng::rand(void) + { + uint32 y; + + if(--left < 0) + return(restart()); + + y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); + } + +inline double eoRng::normal(void) +{ + if (cached) + { + cached = false; + return cacheValue; + } + + float rSquare, factor, var1, var2; + + do + { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + + rSquare = var1 * var1 + var2 * var2; + } + while (rSquare >= 1.0 || rSquare == 0.0); + + factor = sqrt(-2.0 * log(rSquare) / rSquare); + + cacheValue = var1 * factor; + cached = true; + + return (var2 * factor); +} + +#endif + diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp new file mode 100644 index 000000000..edd4d9ca1 --- /dev/null +++ b/eo/src/utils/eoState.cpp @@ -0,0 +1,147 @@ + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +#include "eoState.h" +#include "eoObject.h" +#include "eoPersistent.h" + +using namespace std; + +void removeComment(string& str, string comment) +{ + string::size_type pos = str.find(comment); + + if (pos != string::npos) + { + str.erase(pos, str.size()); + } +} + +bool is_section(const string& str, string& name) +{ + string::size_type pos = str.find("\\section{"); + + if (pos == string::npos) + return false; + //else + + string::size_type end = str.find("}"); + + if (end == string::npos) + return false; + // else + + name = str.substr(pos + 9, end-9); + + return true; +} + +void eoState::registerObject(eoPersistent& registrant) +{ + string name = createObjectName(dynamic_cast(®istrant)); + + objectMap[name] = ®istrant; +} + +void eoState::load(const string& _filename) +{ + ifstream is (_filename.c_str()); + + if (is.fail()) + { + string str = "Could not open file " + _filename; + throw runtime_error(str); + } + + string str; + string name; + + getline(is, str); + + while(is) + { // parse section header + if (is_section(str, name)) + { + string fullString; + ObjectMap::iterator it = objectMap.find(name); + + if (it == objectMap.end()) + { // ignore + while (getline(is, str)) + { + if (is_section(str, name)) + break; + } + } + else + { + + eoPersistent* object = it->second; + + // now we have the object, get lines, remove comments etc. + + string fullstring; + + while (getline(is, str)) + { + if (is_section(str, name)) + break; + + removeComment(str, getCommentString()); + fullstring += str + "\n"; + } + + istrstream the_stream(fullstring.c_str(), fullstring.size()); + + object->readFrom(the_stream); + } + } + } + +} + +void eoState::save(const string& filename) +{ + ofstream os(filename.c_str()); + + for (ObjectMap::iterator it = objectMap.begin(); it != objectMap.end(); ++it) + { + os << "\\section{" << it->first << "}\n"; + it->second->printOn(os); + os << '\n'; + } +} + +string eoState::createObjectName(eoObject* obj) +{ + if (obj == 0) + { + ostrstream os; + os << objectMap.size(); + return os.str(); + } + // else + + string name = obj->className(); + ObjectMap::const_iterator it = objectMap.find(name); + + unsigned count = 1; + while (it != objectMap.end()) + { + ostrstream os; + os << obj->className().c_str() << count++ << ends; + + name = os.str(); + + it = objectMap.find(name); + } + + return name; +} + diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h new file mode 100644 index 000000000..9f656a6c2 --- /dev/null +++ b/eo/src/utils/eoState.h @@ -0,0 +1,84 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoState.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoState_h +#define eoState_h + +#include +#include +#include + +class eoObject; +class eoPersistent; + +/** +* eoState can be used to register derivants of eoPersistent. It will +* then in turn implement the persistence framework through members load +* and save, that will call readFrom and printOn for the registrated objects. +*/ +class eoState +{ +public : + + /** + * Object registration function, note that it does not take ownership! + */ + void registerObject(eoPersistent& registrant); + + /** + * Loading error thrown when nothing seems to work. + */ + struct loading_error : public std::runtime_error + { + loading_error(std::string huh = "Error while loading") : std::runtime_error(huh) {} + }; + + std::string getCommentString(void) const { return "#"; } + + /** + * Reads the file specified + * + * @param _filename the name of the file to load from + */ + void load(const std::string& _filename); + + /** + * Saves the state in file specified + * + * @param _filename the name of the file to save into + */ + void save(const std::string& _filename); + +private : + std::string createObjectName(eoObject* obj); + + // first is Persistent, second is the raw data associated with it. + typedef std::map ObjectMap; + + ObjectMap objectMap; +}; + +#endif //eoState_h From 648c4ab6ec2fbdaae42e92a96dbc43246c20c7a9 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:12:08 +0000 Subject: [PATCH 0130/2134] no message --- eo/src/gp/eoParseTree.h | 242 +++++++++ eo/src/gp/node_pool.h | 297 ++++++++++ eo/src/gp/parse_tree.h | 992 ++++++++++++++++++++++++++++++++++ eo/src/utils/rnd_generators.h | 85 +++ 4 files changed, 1616 insertions(+) create mode 100644 eo/src/gp/eoParseTree.h create mode 100644 eo/src/gp/node_pool.h create mode 100644 eo/src/gp/parse_tree.h create mode 100644 eo/src/utils/rnd_generators.h diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h new file mode 100644 index 000000000..7bac61254 --- /dev/null +++ b/eo/src/gp/eoParseTree.h @@ -0,0 +1,242 @@ +#ifndef EO_PARSE_TREE_H +#define EO_PARSE_TREE_H + +#include + +#include "EO.h" +#include "eoOp.h" +#include "eoInserter.h" +#include "eoIndiSelector.h" +#include "parse_tree.h" +#include "eoRnd.h" + +using namespace gp_parse_tree; +using namespace std; + +template +class eoParseTree : public EO, public parse_tree +{ +public : + + typedef typename parse_tree::subtree Type; + + eoParseTree(void) : EO(), parse_tree() {} + eoParseTree(unsigned _size, eoRnd& _rnd) + : EO(), parse_tree(_rnd()) + { + pruneTree(_size); + } + eoParseTree(eoRnd& _rnd) + : EO(), parse_tree(_rnd()) + {} + + virtual void pruneTree(unsigned _size) + { + if (_size < 1) + return; + + if (size() > _size) + { + Type* sub = &operator[](size() - 2); // prune tree + + while (sub->size() > _size) + { + sub = &sub->operator[](0); + } + + back() = *sub; + } + } + + eoParseTree(std::istream& is) : EO(), parse_tree() + { + readFrom(is); + } + + string className(void) const { return "eoParseTree"; } + + void printOn(std::ostream& os) const + { + os << fitness() << ' '; + + std::copy(ebegin(), eend(), ostream_iterator(os)); + } + + void readFrom(std::istream& is) + { + FType fit; + + is >> fit; + + fitness(fit); + + std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); + } +}; + +template +std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) +{ + eot.printOn(os); + return os; +} + +template +std::istream& operator>>(std::istream& is, eoParseTree& eot) +{ + eot.readFrom(is); + return is; +} + + +template +class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > +{ + public : + + typedef eoParseTree EoType; + + eoGpDepthInitializer( + unsigned _max_depth, + const vector& _initializor, + bool _grow = true) + : + eoRnd(), + max_depth(_max_depth), + initializor(_initializor), + grow(_grow) + {} + + virtual string className() const { return "eoDepthInitializer"; }; + + EoType::Type operator()(void) + { + list sequence; + + generate(sequence, max_depth); + + parse_tree tree(sequence.begin(), sequence.end()); + + return tree.root(); + } + + void generate(list& sequence, int the_max, int last_terminal = -1) + { + if (last_terminal == -1) + { // check where the last terminal in the sequence resides + vector::iterator it; + for (it = initializor.begin(); it != initializor.end(); ++it) + { + if (it->arity() > 0) + break; + } + + last_terminal = it - initializor.begin(); + } + + if (the_max == 1) + { // generate terminals only + vector::iterator it = initializor.begin() + rng.random(last_terminal); + sequence.push_front(*it); + return; + } + + vector::iterator what_it; + + if (grow) + { + what_it = initializor.begin() + rng.random(initializor.size()); + } + else // full + { + what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); + } + + what_it->randomize(); + + sequence.push_front(*what_it); + + for (int i = 0; i < what_it->arity(); ++i) + generate(sequence, the_max - 1, last_terminal); + } + + +private : + + unsigned max_depth; + std::vector initializor; + bool grow; +}; + +template +class eoSubtreeXOver: public eoGeneralOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + + eoSubtreeXOver( unsigned _max_length) + : eoGeneralOp(), max_length(_max_length) {}; + + virtual string className() const { return "eoSubtreeXOver"; }; + + /// Dtor + virtual ~eoSubtreeXOver () {}; + + void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + { + EoType eo1 = _source.select(); + const EoType& eo2 = _source.select(); + + int i = rng.random(eo1.size()); + int j = rng.random(eo2.size()); + + eo1[i] = eo2[j]; // insert subtree + + eo1.pruneTree(max_length); + + eo1.invalidate(); + _sink.insert(eo1); + } + + unsigned max_length; +}; + +template +class eoBranchMutation: public eoGeneralOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + eoBranchMutation(eoRnd& _init, unsigned _max_length) + : eoGeneralOp(), max_length(_max_length), initializer(_init) + {}; + + virtual string className() const { return "eoBranchMutation"; }; + + /// Dtor + virtual ~eoBranchMutation() {}; + + void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + { + EoType eo1 = _source.select(); + int i = rng.random(eo1.size()); + + EoType eo2(eo1[i].size(), initializer); // create random other to cross with + + eo1[i] = eo2.back(); // insert subtree + + eo1.pruneTree(max_length); + + eo1.invalidate(); + _sink.insert(eo1); + } + +private : + + unsigned max_length; + eoRnd& initializer; +}; + + +#endif diff --git a/eo/src/gp/node_pool.h b/eo/src/gp/node_pool.h new file mode 100644 index 000000000..f541d5f0c --- /dev/null +++ b/eo/src/gp/node_pool.h @@ -0,0 +1,297 @@ + +#ifndef node_pool_h +#define node_pool_h + +class MemPool +{ +public : + + MemPool(unsigned int sz) : esize(sznext; + delete p; + } + } + + void* allocate() + { + if (head == 0) grow(); + Link* p = head; + head = p->next; + return static_cast(p); + } + + void deallocate(void* b) + { + Link* p = static_cast(b); + p->next = head; + head = p; + } + +private : + + void grow() + { + Chunk* n = new Chunk; + n->next = chunks; + chunks = n; + + const int nelem = Chunk::size/esize; + char* start = n->mem; + char* last = &start[(nelem-1)*esize]; + for (char* p = start; p < last; p += esize) + { + reinterpret_cast(p)->next = + reinterpret_cast(p + esize); + } + + reinterpret_cast(last)->next = 0; + head = reinterpret_cast(start); + } + + struct Link + { + Link* next; + }; + + struct Chunk + { + enum {size = 8 * 1024 - 16}; + Chunk* next; + char mem[size]; + }; + + Chunk* chunks; + const unsigned int esize; + Link* head; +}; + +template +class Node_alloc +{ +public : + + T* allocate(void) + { + T* t = static_cast(mem.allocate()); + t = new (t) T; + return t; + } + + T* construct(const T& org) + { + T* t = static_cast(mem.allocate()); + t = new (t) T(org); + return t; + } + + void deallocate(T* t) + { + t->~T(); // call destructor + mem.deallocate(static_cast(t)); + } + +private : + static MemPool mem; +}; + + +template +class Standard_alloc +{ +public : + Standard_alloc() {} + + T* allocate(size_t arity = 1) + { + if (arity == 0) + return 0; + + return new T [arity]; + } + + T* construct(size_t arity, T* org) + { + if (arity == 0) + return 0; + + T* t new T [arity]; + + for (int i = 0; i < arity; ++i) + { + t = T(org[i]); + } + } + + void deallocate(T* t, size_t arity = 1) + { + if (arity == 0) + return ; + + delete [] t; + } + +}; + +template +class Standard_Node_alloc +{ +public : + Standard_Node_alloc() {} + + T* allocate(void) + { + return new T;// [arity]; + } + + T* construct(const T& org) + { + return new T(org); + } + + void deallocate(T* t) + { + delete t; + } + +}; + +template +class Tree_alloc +{ +public : + Tree_alloc() {} + + T* allocate(size_t arity) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T; + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T; + new (&t[1]) T; + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T; + new (&t[1]) T; + new (&t[2]) T; + break; + } + default : + { + return new T[arity]; + } + } + + return t; + } + + T* construct(size_t arity, T* org) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T(*org); + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T(*org); + new (&t[1]) T(org[1]); + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T(*org); + new (&t[1]) T(org[1]); + new (&t[1]) T(org[2]); + break; + } + default : + { + t = new T[arity]; // does call default ctor + for (int i = 0; i < arity; ++i) + { + t[i] = T(org[i]); // constructs now + } + } + } + + return t; + } + + + + void deallocate(T* t, size_t arity) + { + switch(arity) + { + case 0: return; + case 3 : + { + t[2].~T(); t[1].~T(); t[0].~T(); + mem3.deallocate(static_cast(t)); + return; + } + case 2 : + { + t[1].~T(); t[0].~T(); + mem2.deallocate(static_cast(t)); + return; + } + case 1 : + { + t[0].~T(); + mem1.deallocate(static_cast(t)); + return; + } + default : + { + delete [] t; + return; + } + } + } + + +private : + static MemPool mem1; + static MemPool mem2; + static MemPool mem3; +}; + +// static (non thread_safe) memory pools +template MemPool Node_alloc::mem = sizeof(T); + +template MemPool Tree_alloc::mem1 = sizeof(T); +template MemPool Tree_alloc::mem2 = sizeof(T) * 2; +template MemPool Tree_alloc::mem3 = sizeof(T) * 3; + +#endif diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h new file mode 100644 index 000000000..ea971bbf3 --- /dev/null +++ b/eo/src/gp/parse_tree.h @@ -0,0 +1,992 @@ +#ifndef PARSE_TREE_HH +#define PARSE_TREE_HH + +/** + + * Parse_tree and subtree classes + * (c) Maarten Keijzer 1999, 2000 + + * These classes may be used for educational and + * other non-commercial purposes only. Even if I + * wanted to, I am not at liberty to place this file + * under the GNU Lesser Public Library License, as this + * would limit my and my institution's freedom to use + * this file in closed-source software. + + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for non-commercial purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + + + Usage information. + + class Node (your node in the tree) must have the following implemented: + + ****** Arity ****** + + int arity(void) const + + Note: the default constructor of a Node should provide a + Node with arity 0! + + ****** Evaluation ****** + + A parse_tree is evaluated through one of it's apply() members: + + 1) parse_tree::apply(RetVal) + + is the simplest evaluation, it will call + + RetVal Node::operator()(RetVal, subtree::const_iterator) + + (Unfortunately the first RetVal argument is mandatory (although you + might not need it. This is because MSVC does not support member template + functions properly. If it cannot deduce the template arguments (as is + the case in templatizing over return value) you are not allowed to + specify them. calling tree.apply() would result in a syntax + error. That is why you have to call tree.apply(double()) instead.) + + + 2) parse_tree::apply(RetVal v, It values) + + will call: + + RetVal Node::operator()(RetVal, subtree<... , It values) + + where It is whatever type you desire (most of the time + this will be a vector containing the values of your + variables); + + 3) parse_tree::apply(RetVal, It values, It2 moreValues) + + will call: + + RetVal Node::operator()(RetVal, subtree<... , It values, It2 moreValues) + + although I do not see the immediate use of this, however... + + 4) parse_tree::apply(RetVal, It values, It2 args, It3 adfs) + + that calls: + + RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) + + can be useful for implementing adfs. + + + In general it is a good idea to leave the specifics of the + arguments open so that different ways of evaluation remain + possible. Implement the simplest eval as: + + template + RetVal operator()(RetVal dummy, It begin) const + + ****** Internal Structure ****** + + A parse_tree has two template arguments: the Node and the ReturnValue + produced by evaluating the node. The structure of the tree is defined + through a subtree class that has the same two template arguments. + + The nodes are stored in a tree like : + + node4 + / \ + node3 node2 + / \ + node1 node0 + + where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) + + The nodes are subtrees, containing the structure of the tree, together + with its size and depth. They contain a Node, the user defined template + argument. To access these nodes from a subtree, use operator-> or operator*. + + The numbers behind the nodes define a reverse-polish or postfix + traversel through the tree. The parse_tree defines iterators + on the tree such that + + tree.begin() points at the subtree at node0 and + tree.back() returns the subtree at node4, the complete tree + + Likewise operator[] is defined on the tree, such that: + + tree[0] will return the subtree at node0, while + tree[2] will return the subtree at node2 + + Assigments of subtrees is protected so that the code: + + tree[2] = tree[0]; + + will not crash and result in a tree structured as: + + node4 + / \ + node3 node0 + + Note that the rank numbers no longer specify their place in the tree: + + tree[0] still points at node0, but + tree[1] now points to node3 and + tree[2] points at the root node4 + + Embedded iterators are implemented to iterate over nodes rather + than subtrees. So an easy way to copy your tree to a vector is: + + vector vec(tree.size()); + copy(tree.ebegin(), tree.eend(), vec.begin()); + + You can also copy it to an ostream_iterator with this + technique, given that your Node implements an appropriate + operator<<. Reinitializing a tree with the vector is also + simple: + + tree.clear(); + copy(vec.begin(), vec.end(), back_inserter(tree)); + + or from an istream: + + copy(istream_iterator(my_stream), istream_iterator(), back_inserter(tree)); + + Note that the back_inserter must be used as there is no + resize member in the parse_tree. back_inserter will use + the push_back member from the parse_tree + +*/ + +#include +#include // for swap + +#ifdef _MSC_VER +#pragma warning(disable : 4786) // disable this nagging warning about the limitations of the mirkosoft debugger +#endif + +namespace gp_parse_tree +{ + +#include "node_pool.h" + + +template +inline void do_the_swap(T& a, T& b) +{ + T tmp = a; + a = b; + b = tmp; +} + +template class parse_tree +{ + public : + + +class subtree +{ + +/* + a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) + TODO: use the std::allocator interface +*/ + +#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) // not multithreaded + Node_alloc node_allocator; + Tree_alloc tree_allocator; +#else + Standard_Node_alloc node_allocator; + Standard_alloc tree_allocator; +#endif + +public : + + typedef subtree* iterator; + typedef const subtree* const_iterator; + + /* Constructors, assignments */ + + subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + {} + subtree(const subtree& s) + : content(node_allocator.allocate()), + args(0), + parent(0), + _cumulative_size(1), + _depth(1), + _size(1) + { + copy(s); + } + + subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { copy(t); } + + template + subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { // initialize in prefix order for efficiency reasons + init(b, --e); + } + + virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } + + subtree& operator=(const subtree& s) + { + if (s.get_root() == get_root()) + { // from the same tree, maybe a child. Don't take any chances + subtree anotherS = s; + return copy(anotherS); + } + + copy(s); + updateAfterInsert(); + return *this; + } + + subtree& operator=(const T& t) { copy(t); updateAfterInsert(); return *this; } + + /* Access to the nodes */ + + T& operator*(void) { return *content; } + const T& operator*(void) const { return *content; } + T* operator->(void) { return content; } + const T* operator->(void) const { return content; } + + /* Equality, inequality check, Node needs to implement operator== */ + + bool operator==(const subtree& other) const + { + if (! (*content == *other.content)) + return false; + + for (int i = 0; i < arity(); i++) + { + if (!(args[i] == other.args[i])) + return false; + } + + return true; + } + + bool operator !=(const subtree& other) const + { + return !operator==(other); + } + + /* Arity */ + int arity(void) const { return content->arity(); } + + /* Evaluation with an increasing amount of user defined arguments */ + template + void apply(RetVal& v) const { (*content)(v, begin()); } + + template + void apply(RetVal& v, It values) const + { + (*content)(v, begin(), values); + } + + template + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + { + (content->*f)(v, begin(), misc); + } + + +/* template + void apply(RetVal& v, It values, It2 moreValues) const + { (*content)(v, begin(), values, moreValues); } + + template + void apply(RetVal& v, It values, It2 moreValues, It3 evenMoreValues) const + { (*content)(v, begin(), values, moreValues, evenMoreValues); } +*/ + + template + void find_nodes(vector& result, Pred& p) + { + if (p(*content)) + { + result.push_back(this); + } + + for (int i = 0; i < arity(); ++i) + { + args[i].find_nodes(result, p); + } + } + + template + void find_nodes(vector& result, Pred& p) const + { + if (p(*content)) + { + result.push_back(this); + } + + for (int i = 0; i < arity(); ++i) + { + args[i].find_nodes(result, p); + } + } + + /* Iterators */ + + iterator begin(void) { return args; } + const_iterator begin(void) const { return args; } + + iterator end(void) { return args + arity(); } + const_iterator end(void) const { return args + arity(); } + + subtree& operator[](int i) { return *(begin() + i); } + const subtree& operator[](int i) const { return *(begin() + i); } + + /* Some statistics */ + + size_t size(void) const { return _size; } + + size_t cumulative_size(void) const { return _cumulative_size; } + size_t depth(void) const { return _depth; } + + const subtree& select_cumulative(size_t which) const + { return imp_select_cumulative(which); } + + subtree& select_cumulative(size_t which) + { return const_cast(imp_select_cumulative(which)); } + + subtree& get_node(size_t which) + { return const_cast(imp_get_node(which));} + const subtree& get_node(size_t which) const + { return imp_get_node(which); } + + subtree* get_parent(void) { return parent; } + const subtree* get_parent(void) const { return parent; } + + void clear(void) + { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } + + void swap(subtree& y) + { + do_the_swap(content, y.content); + do_the_swap(args, y.args); + do_the_swap(parent, y.parent); + + do_the_swap(_cumulative_size, y._cumulative_size); + do_the_swap(_depth, y._depth); + do_the_swap(_size, y._size); + updateAfterInsert(); + } + + friend void swap(subtree& x, subtree& y) + { + x.swap(y); + } + +protected : + + virtual void updateAfterInsert(void) + { + _depth = 0; + _size = 1; + _cumulative_size = 0; + + for (iterator it = begin(); it != end(); ++it) + { + _size += it->size(); + _cumulative_size += it->_cumulative_size; + _depth = it->_depth > _depth? it->_depth: _depth; + } + _cumulative_size += _size; + _depth++; + + if (parent) + parent->updateAfterInsert(); + } + +private : + + const subtree& imp_select_cumulative(size_t which) const + { + if (which >= (_cumulative_size - size())) + return *this; + // else + + for (int i = arity() - 1; i >= 0; --i) + { + if (which < args[i]._cumulative_size) + return args[i].imp_select_cumulative(which); + which -= args[i]._cumulative_size; + } + + return *this; // error! + } + + const subtree& imp_get_node(size_t which) const + { + if (which == size() - 1) + return *this; + + for (int i = arity() - 1; i >= 0; --i) + { + unsigned c_size = args[i].size(); + if (which < c_size) + return args[i].imp_get_node(which); + which -= c_size; + } + + return *this; // error! + } + + const subtree* get_root(void) const + { + if (parent == 0) + return this; + // else + + return parent->get_root(); + } + subtree& copy(const subtree& s) + { + int old_arity = arity(); + + int new_arity = s.arity(); + + if (new_arity != old_arity) + { + tree_allocator.deallocate(args, old_arity); + + args = tree_allocator.allocate(new_arity); + } + + switch(new_arity) + { + case 3 : args[2].copy(s.args[2]); args[2].parent = this; // no break! + case 2 : args[1].copy(s.args[1]); args[1].parent = this; + case 1 : args[0].copy(s.args[0]); args[0].parent = this; + case 0 : break; + default : + { + for (int i = 0; i < new_arity; ++i) + { + args[i].copy(s.args[i]); + args[i].parent = this; + } + } + } + + *content = *s.content; + _size = s._size; + _depth = s._depth; + _cumulative_size = s._cumulative_size; + + return *this; + } + + subtree& copy(const T& t) + { + int oldArity = arity(); + + if (content != &t) + *content = t; + else + oldArity = -1; + + int ar = arity(); + + if (ar != oldArity) + { + if (oldArity != -1) + tree_allocator.deallocate(args, oldArity); + + args = tree_allocator.allocate(ar); + + //if (ar > 0) + // args = new subtree [ar]; + //else + // args = 0; + } + + adopt(); + updateAfterInsert(); + return *this; + } + + void disown(void) + { + switch(arity()) + { + case 3 : args[2].parent = 0; // no break! + case 2 : args[1].parent = 0; + case 1 : args[0].parent = 0; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = 0; + } + } + } + + } + + void adopt(void) + { + switch(arity()) + { + case 3 : args[2].parent = this; // no break! + case 2 : args[1].parent = this; + case 1 : args[0].parent = this; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = this; + } + } + } + } + + template + void init(It b, It& last) + { + *this = *last; + +#ifndef NDEBUG + if (last == b && arity() > 0) + { + throw "subtree::init()"; + } +#endif + + for (int i = 0; i < arity(); ++i) + { + args[i].parent = 0; + args[i].init(b, --last); + args[i].parent = this; + } + + updateAfterInsert(); + } + + T* content; + subtree* args; + subtree* parent; + + size_t _cumulative_size; + size_t _depth; + size_t _size; +}; + +// Continuing with parse_tree + + typedef T value_type; + + /* Constructors and Assignments */ + + parse_tree(void) : _root(), pushed() {} + parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } + parse_tree(const subtree& sub) : _root(sub), pushed() { } + + template + parse_tree(It b, It e) : _root(b, e), pushed() {} + + virtual ~parse_tree(void) {} + + parse_tree& operator=(const parse_tree& org) { return copy(org); } + parse_tree& operator=(const subtree& sub) + { return copy(sub); } + + + /* Equality and inequality */ + + bool operator==(const parse_tree& other) const + { return _root == other._root; } + + bool operator !=(const parse_tree& other) const + { return !operator==(other); } + + /* Simple tree statistics */ + + size_t size(void) const { return _root.size(); } + size_t depth(void) const { return _root.depth(); } + void clear(void) { _root.clear(); pushed.resize(0); } + + /* Evaluation (application), with an increasing number of user defined arguments */ + + template + void apply(RetVal& v) const + { _root.apply(v); } + + template + void apply(RetVal& v, It varValues) const + { _root.apply(v, varValues); } + + template + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + { + _root.apply_mem_func(v, misc, f); + } + + //template + // void apply(RetVal& v, It varValues, It2 moreValues) const + // { _root.apply(v, varValues, moreValues); } + + //template + // void apply(RetVal& v, It varValues, It2 moreValues, It3 evenMoreValues) const + // { _root.apply(v, varValues, moreValues, evenMoreValues); } + + template + void find_nodes(vector& result, Pred& p) + { + _root.find_nodes(result, p); + } + + template + void find_nodes(vector& result, Pred& p) const + { + _root.find_nodes(p); + } + + /* Customized Swap */ + void swap(parse_tree& other) + { + do_the_swap(pushed, other.pushed); + _root.swap(other._root); + } + + /* Definitions of the iterators */ + + class base_iterator + { + public : + + base_iterator() {} + base_iterator(subtree* n) { node = n; } + + base_iterator& operator=(const base_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_iterator& org) const + { return node == org.node; } + bool operator!=(const base_iterator& org) const + { return !operator==(org); } + + base_iterator operator+(size_t n) const + { + base_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + base_iterator& operator++(void) + { + subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + subtree::iterator it; + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + { + node = &(--it)->get_node(0); + } + + return *this; + } + + base_iterator operator++(int) + { + base_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + subtree* node; + }; + + class iterator : public base_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef subtree* pointer; + typedef subtree& reference; + + iterator() : base_iterator() {} + iterator(subtree* n): base_iterator(n) {} + iterator& operator=(const iterator& org) + { base_iterator::operator=(org); return *this; } + + subtree& operator*(void) { return *node; } + subtree* operator->(void) { return node; } + }; + + class embedded_iterator : public base_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef T* pointer; + typedef T& reference; + + embedded_iterator() : base_iterator() {} + embedded_iterator(subtree* n): base_iterator(n) {} + embedded_iterator& operator=(const embedded_iterator& org) + { base_iterator::operator=(org); return *this; } + + T& operator*(void) { return **node; } + T* operator->(void) { return &**node; } + }; + + class base_const_iterator + { + public : + base_const_iterator() {} + base_const_iterator(const subtree* n) { node = n; } + + base_const_iterator& operator=(const base_const_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_const_iterator& org) const + { return node == org.node; } + bool operator!=(const base_const_iterator& org) const + { return !operator==(org); } + + base_const_iterator& operator++(void) + { + const subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + subtree::const_iterator it; + + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + node = &(--it)->get_node(0); + return *this; + } + + base_const_iterator operator++(int) + { + base_const_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + + const subtree* node; + }; + + class const_iterator : public base_const_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef const subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const subtree* pointer; + typedef const subtree& reference; + + const_iterator() : base_const_iterator() {} + const_iterator(const subtree* n): base_const_iterator(n) {} + const_iterator& operator=(const const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + const subtree& operator*(void) { return *node; } + const subtree* operator->(void) { return node; } + }; + + class embedded_const_iterator : public base_const_iterator + { + public : + typedef std::forward_iterator_tag iterator_category; + typedef const T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const T* pointer; + typedef const T& reference; + + embedded_const_iterator() : base_const_iterator() {} + embedded_const_iterator(const subtree* n): base_const_iterator(n) {} + embedded_const_iterator& operator=(const embedded_const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + embedded_const_iterator operator+(size_t n) const + { + embedded_const_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + const T& operator*(void) const { return **node; } + const T* operator->(void) const { return node->operator->(); } + }; + + /* Iterator access */ + + iterator begin(void) { return iterator(&operator[](0)); } + const_iterator begin(void) const { return const_iterator(&operator[](0)); } + iterator end(void) { return iterator(0); } + const_iterator end(void) const { return const_iterator(0);} + + embedded_iterator ebegin(void) { return embedded_iterator(&operator[](0)); } + embedded_const_iterator ebegin(void) const { return embedded_const_iterator(&operator[](0)); } + embedded_iterator eend(void) { return embedded_iterator(0); } + embedded_const_iterator eend(void) const { return embedded_const_iterator(0);} + + bool empty(void) const { return size() == 0; } + bool valid(void) const { return pushed.empty(); } + + /* push_back */ + + void push_back(const parse_tree& tree) + { + if (!empty()) + pushed.push_back(_root); + + _root = tree.back(); + } + + void push_back(const T& t) + { + if (!empty()) + pushed.push_back(_root); + + _root = t; + + for (subtree::iterator it = _root.begin(); it != _root.end(); it++) + { + *it = pushed.back(); + pushed.pop_back(); + } + + } + + /* Access to subtrees */ + + subtree& back(void) { return _root; } + const subtree& back(void) const { return _root; } + subtree& root(void) { return _root; } + const subtree& root(void) const { return _root; } + + subtree& front(void) { return _root[0]; } + const subtree& front(void) const { return _root[0]; } + + subtree& operator[](size_t i) + { return const_cast(_root.get_node(i)); } + const subtree& operator[](size_t i) const + { return _root.get_node(i); } + + subtree& get_cumulative(size_t i) + { return const_cast(_root.get_cumulative(i)); } + const subtree& get_cumulative(size_t i) const + { return get_cumulative(i); } + + private : + + parse_tree& copy(const parse_tree& org) + { + _root = org._root; + pushed = org.pushed; + + return *this; + } + + parse_tree& copy(const subtree& sub) + { _root = sub; pushed.resize(0); return *this; } + + subtree _root; + std::vector pushed; +}; // end class parse_tree + + +} // end namespace gp_parse_tree + +namespace std +{ // for use with stlport on MSVC + +template inline +std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) +{ + return 0; +} + +template inline +std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) +{ + return 0; +} + +// Put customized swaps also in std... + +template inline +void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) +{ + a.swap(b); +} + +template inline +void iter_swap(vector >::iterator a, vector > b) +{ + a->swap(*b); +} + + +} // namespace std + + +#endif diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h new file mode 100644 index 000000000..5074af013 --- /dev/null +++ b/eo/src/utils/rnd_generators.h @@ -0,0 +1,85 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + rnd_generators.h + Some utility functors for generating random generators: + uniform_generator : generates uniform floats or doubles + random_generator : generates unsigneds, ints etc. + normal_generator : normally distributed floats or doubles + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoRND_GENERATORS_H +#define eoRND_GENERATORS_H + +#include "eoRNG.h" + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles between [0, _max). _max + defaults to 1.0 +*/ +template class uniform_generator +{ + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + + virtual T operator()(void) { return (T) uniform.uniform(maxim); } + private : + T maxim; + eoRng& uniform; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints between [0, _max). +*/ +template class random_generator +{ + public : + random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + + virtual T operator()(void) { return (T) random.random(max); } + + private : + T maxim; + eoRng& random; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + virtual T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +#endif From ddb4bfb00b295547b4e1a487ff8bfc77f77a3b91 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:18:39 +0000 Subject: [PATCH 0131/2134] Moved the es files to an es directory --- eo/src/es/eoESChrom.h | 126 ++++++++++++++++++ eo/src/es/eoESFullChrom.h | 271 ++++++++++++++++++++++++++++++++++++++ eo/src/es/eoESFullMut.h | 253 +++++++++++++++++++++++++++++++++++ 3 files changed, 650 insertions(+) create mode 100644 eo/src/es/eoESChrom.h create mode 100644 eo/src/es/eoESFullChrom.h create mode 100644 eo/src/es/eoESFullMut.h diff --git a/eo/src/es/eoESChrom.h b/eo/src/es/eoESChrom.h new file mode 100644 index 000000000..495a9ba6c --- /dev/null +++ b/eo/src/es/eoESChrom.h @@ -0,0 +1,126 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESChrom.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoESCHROM_H +#define _eoESCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include + +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation +*/ +//@{ + +/** Each gene in an Evolution Strategies is composed of a value plus an standard +deviation, sigma, used for mutation*/ +struct eoESGene { + double val, sigma; + eoESGene( double _val = 0, double _sigma = 0 ): val( _val ), sigma( _sigma ) {}; +}; + +/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 +bool operator < ( eoESGene _e1, eoESGene _e2 ) { + return _e1.val < _e2.val; +} + +/// Tricky operator to avoid errors in some VC++ systems +bool operator == ( eoESGene _e1, eoESGene _e2 ) { + return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; +} + +/// +ostream & operator << ( ostream& _s, const eoESGene& _e ) { + _s << _e.val << ", " << _e.sigma << " | "; + return _s; +} + +/// Dummy >> +istream & operator >> ( istream& _s, const eoESGene& _e ) { + _s >> _e.val; + _s >> _e.sigma; + return _s; +} + + +/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and +Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene +@see eoESGene +*/ +template +class eoESChrom: public eoVector { +public: + /// Basic ctor + eoESChrom( ):eoVector() {}; + + /** Ctor using a couple of random number generators + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called. + @param _rndS another one, for the sigma + */ + eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) + : eoVector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + i->val = _rnd(); + i->sigma = _rndS(); + } + }; + + /// Copy ctor + eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; + + /// Assignment operator + const eoESChrom& operator =( const eoESChrom & _eoes ) { + if ( this != &_eoes ){ + eoVector::operator=( _eoes ); + } + return *this; + } + + /// + ~eoESChrom() {}; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoESChrom";}; + //@} + +}; + +//@} +#endif + diff --git a/eo/src/es/eoESFullChrom.h b/eo/src/es/eoESFullChrom.h new file mode 100644 index 000000000..85bd4f228 --- /dev/null +++ b/eo/src/es/eoESFullChrom.h @@ -0,0 +1,271 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESInd.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOESFULLCHROM_H +#define _EOESFULLCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include +#include +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation and a vector of correlations +*/ +//@{ + + +/**@name individuals for evolution strategies -MS- 22/10/99 +Each individual in an evolution strategy is composed of + a vector of floating point values + a vector of std deviations + a vector of rotation angles (for correlated mutations) + +THese individuals CANNOT BE IMPLEMENTED as vectors of anything + at least in the case of correlated mutations +*/ +//@{ + +template +class eoESFullChrom : public eoVector { + public: +/// constructor + eoESFullChrom( unsigned _num_genes = 1, + unsigned _num_sigma = 1, unsigned _num_correl = 0, + bool _verbose = false, + double _ObjMin = 0, double _ObjMax = 1, + double _StdDevInit = 0.3 ): + eoVector(_num_genes), + // ObjVar( _num_genes ), now an eoVector + StdDev( _num_sigma ), + CorCff( _num_correl ), + verbose( _verbose ), + ObjMin( _ObjMin ), + ObjMax(_ObjMax ), + StdDevInit( _StdDevInit ) {} + + /// copy constructor + eoESFullChrom( const eoESFullChrom& _eo ): + eoVector ( _eo ), // ObjVar ( _eo.ObjVar ), + StdDev ( _eo.StdDev ), CorCff( _eo.CorCff ), verbose( _eo.verbose ), + ObjMin( _eo.ObjMin ), ObjMax(_eo.ObjMax ), StdDevInit( _eo.StdDevInit ) {} + + + /* another constructor, for compatibility reasons */ + eoESFullChrom(istream& _s) { cout << "Not Yet implemented\n";exit(1);}; + + /* And now the useful constructor: from a parser (should be in the + factory, if such a thing exists one day for eoESFullChrom + */ + eoESFullChrom(Parser & parser) : StdDev(0), CorCff(0) { + parser.AddTitle("Description of ES individuals"); + int num_genes, num_sigma; + bool correlated_mutations; + try { + num_genes = parser.getInt("-Io", "--NbObjVar", "2", + "Number of Object Variables" ); + num_sigma = parser.getInt("-Is", "--NbSigma", "1", + "Number of Standard Deviations" ); + correlated_mutations = parser.getBool("-Ic", "--Correlated", + "Correlated mutation?" ); + ObjMin = parser.getFloat("-Im", "--min", "0", + "Minimum value for object variables" ); + ObjMax = parser.getFloat("-IM", "--max", "1", + "Maximum value for object variables" ); + StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", + "Initial value for std. dev. (scaled by range)" ); + verbose = parser.getBool("-Iv", "--verbose", + "Verbose listing of ES individuals (mutation parameters"); + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + + // consistency tests + if (! num_sigma) { // no std dev??? EXCEPTION + throw invalid_argument( "No standard deviation: choose another representation please" ); + } + if (num_sigma > num_genes) { + cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; + num_sigma = num_genes; + // modify the Param value - so .status is OK + ostrstream sloc; + sloc << num_genes; + parser.setParamValue("--NbSigma", sloc.str()); + } + // adjust the sizes!!! + resize(num_genes); + if (num_sigma) + StdDev.resize(num_sigma); + if (correlated_mutations) { + if (num_sigma < num_genes) { + cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; + cout << "Though possible, this is a strange setting" << endl; + } + // nb of rotation angles: N*(N-1)/2 (in general!) + CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); + } + }; + + + /// Operator = + const eoESFullChrom& operator = ( const eoESFullChrom& _eo ) { + if ( this != &_eo ) { + // Change EO part + eoVector::operator = (_eo); + + // Change this part + // ObjVar = _eo.ObjVar; + StdDev = _eo.StdDev; + CorCff = _eo.CorCff; + verbose = _eo.verbose; + ObjMin = _eo.ObjMin; + ObjMax = _eo.ObjMax; + StdDevInit = _eo.StdDevInit; + } + return *this; + } + + /// destructor + virtual ~eoESFullChrom() {} + + /// + double getStdDev( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading StdDev"); + return StdDev[ _i ]; + } + + /// + void setStdDev( unsigned _i, double _val ) { + if ( _i < length() ) { + StdDev[_i] = _val; + } else + throw out_of_range( "out_of_range when writing StdDev"); + } + + /// + double getCorCff( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading CorCff"); + return CorCff[ _i ]; + } + + /// + void setCorCff( unsigned _i, double _val ) { + if ( _i < length() ) { + CorCff[_i] = _val; + } else + throw out_of_range( "out_of_range when writing CorCff"); + } + + /// + void insertGene( unsigned _i, double _val ) { + throw FixedLengthChromosome(); + }; + + /// + void deleteGene( unsigned _i ) { + throw FixedLengthChromosome(); + }; + + /// + unsigned length() const { return size();}/* formerly ObjVar.size() */ + unsigned StdDevLength() const { return StdDev.size();} + unsigned CorCffLength() const { return CorCff.size();} + + + /** Print itself: inherited from eoObject implementation. + Instance from base classes are processed in + base classes, so you don´t have to worry about, for instance, fitness. + @param _s the ostream in which things are written*/ + virtual void printOn( ostream& _s ) const{ + copy( begin(), end(), ostream_iterator( _s, " ") ); + // The formatting instructinos shoudl be left to the caller + // _s << "\n"; + if (verbose) { + _s << "\n\tStd Dev. " ; + copy( StdDev.begin(), StdDev.end(), ostream_iterator( _s, " ") ); + if (CorCff.size()) { + _s << "\n\t"; + copy( CorCff.begin(), CorCff.end(), ostream_iterator( _s, " ") ); + } + } + }; + + /** This exception should be thrown when trying to insert or delete a gene + in a fixed length chromosome + */ + class FixedLengthChromosome : public exception { + + public: + /** + * Constructor + */ + FixedLengthChromosome() + : exception() { }; + + ~FixedLengthChromosome() {}; + }; + + // accessors + double getObjMin() const {return ObjMin;} + double getObjMax() const {return ObjMax;} + double getStdDevInit () const {return StdDevInit;} + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESFullChrom";}; + +private: + // vector ObjVar; /* object variable vector */ +// or shoudl the class be subclass of EOVector ??? + + vector StdDev; /* standard deviation vector */ + vector CorCff; /* correlation coefficient vector */ + + bool verbose; /* Print std deviations or not */ + + /** the range is used for mutation AND random initialization, + * while the StdDevInit is used only for random initialization + * this in a little inconsistent! + */ + double ObjMin, ObjMax; /* Range for Object variables */ + double StdDevInit; /* Initial value of Standard Deviations */ + +}; + +#endif + + diff --git a/eo/src/es/eoESFullMut.h b/eo/src/es/eoESFullMut.h new file mode 100644 index 000000000..37b6c4724 --- /dev/null +++ b/eo/src/es/eoESFullMut.h @@ -0,0 +1,253 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESMute.h : ES mutation +// (c) GeNeura Team, 1998 for the EO part +// Th. Baeck 1994 and EEAAX 1999 for the ES part +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOESMUT_H +#define _EOESMUT_H + +#include +#include +#include // for exp + +#include +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ +// should not be a parameter ... + +/** ES-style mutation in the large: Obviously, valid only for eoESInd +*/ +template +class eoESMutate: public eoMonOp< eoESFullChrom > { +public: + eoESMutate(double n) + { + TauLcl = 1/sqrt(2*sqrt(n)); + TauGlb= 1 / sqrt(2 * n); + TauBeta = 0.0873; + }/// + + eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) + : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), + TauBeta(_TauBeta) {}; + + /* The parser constructor + */ + eoESMutate(Parser & parser, unsigned _stdDevLength, unsigned _size, bool _correlated ): + eoMonOp< eoESFullChrom >( ) { + parser.AddTitle("Parameters of ES mutation (before renormalization)"); + try { // we know that there is at least 1 std dev. + if (_stdDevLength == 1) { + TauLcl = parser.getInt("-Ml", "--TauLcl", "1", + "TauLcl, Mutation rate for the only Std Dev." ); + // different normalization in that case -- Thomas Baeck + TauLcl /= sqrt((double) _size); + } + else { /* more than 1 std dev */ + TauLcl = parser.getFloat("-Ml", "--TauLcl", "1", + "Local mutation rate for Std Dev." ); + TauGlb = parser.getFloat("-Mg", "--TauGlb", "1", + "Global mutation rate for Std Dev." ); + // renormalization + TauLcl /= sqrt( 2.0 * sqrt( (double)_size ) ); + TauGlb /= sqrt( 2.0 * ( (double) _size ) ); + + if ( _correlated ) { // Correlated Mutations + TauBeta = parser.getFloat("-Mb", "--TauBeta", "0.0873", + "Mutation rate for corr. coeff." ); + // rotation angles: no normalization + } + } + } + catch (exception & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + }; + + /// needed virtual dtor + virtual ~eoESMutate() {}; + + // virtual separation depending wether correlated mutations are present + virtual void operator() ( eoESFullChrom & _eo ) const { + if (_eo.CorCffLength()) + CorrelatedMutation(_eo); + else + StandardMutation(_eo); + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESMutate";}; + +private: + /// mutations - standard et correlated + // ========= + /* + * Standard mutation of object variables and standard + * deviations in ESs. + * If there are fewer different standard deviations available + * than the dimension of the objective function requires, the + * last standard deviation is responsible for ALL remaining + * object variables. + * Schwefel 1977: Numerische Optimierung von Computer-Modellen + * mittels der Evolutionsstrategie, pp. 165 ff. + */ + + virtual void StandardMutation( eoESFullChrom & _eo ) const { + unsigned i,k; + double Glb, StdLoc; + + if (_eo.StdDevLength() == 1) { /* single StdDev -> No global factor */ + StdLoc = _eo.getStdDev(0); + StdLoc *= exp(TauLcl*rng.normal()); + if (StdLoc < ES_SIGEPS) + StdLoc = ES_SIGEPS; + _eo.setStdDev(0, StdLoc); + _eo.setGene( 0, _eo.getGene(0) + StdLoc*rng.normal()); + i = 1; + } + else { /* more than one std dev. */ + Glb = exp(TauGlb*rng.normal()); + for (i = 0; i < _eo.length() && i < _eo.StdDevLength(); i++) { + StdLoc = _eo.getStdDev(i); + StdLoc *= Glb * exp(TauLcl*rng.normal()); + if (StdLoc < ES_SIGEPS) + StdLoc = ES_SIGEPS; + _eo.setStdDev(i, StdLoc); + _eo.setGene( i, _eo.getGene(i) + StdLoc*rng.normal()); + } + } + // last object variables: same STdDev than the preceding one + for (k = i; k < _eo.length(); k++) { + _eo.setGene( k, _eo.getGene(k) + StdLoc*rng.normal() ); + } + } + + /* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + + // Code from Thomas Baeck + + virtual void CorrelatedMutation( eoESFullChrom & _eo ) const { + + + int i, k, n1, n2, nq; + + double d1, d2, S, C, Glb; + double tmp; + /* + * First: mutate standard deviations (as above). + */ + + Glb = exp(TauGlb*rng.normal()); + for (i = 0; i < _eo.StdDevLength(); i++) { + tmp = _eo.getStdDev(i); + _eo.setStdDev( i, tmp*Glb*exp(TauLcl*rng.normal()) ); + } + + /* + * Mutate rotation angles. + */ + + for (i = 0; i < _eo.CorCffLength(); i++) { + tmp = _eo.getCorCff(i); + tmp += TauBeta*rng.normal(); + // danger of VERY long loops --MS-- + // while (CorCff[i] > M_PI) + // CorCff[i] -= 2.0 * M_PI; + // while (CorCff[i] < - M_PI) + // CorCff[i] += 2.0 * M_PI; + if ( fabs(tmp) > M_PI ) { + tmp -= M_PI * (int) (tmp/M_PI) ; + } + _eo.setCorCff(i, tmp); + } + + /* + * Perform correlated mutations. + */ + vector VarStp(_eo.size()); + for (i = 0; i < _eo.size() && i < _eo.StdDevLength(); i++) + VarStp[i] = _eo.getStdDev(i)*rng.normal(); + for (k = i; k < _eo.size(); k++) + VarStp[k] = _eo.getStdDev(i-1)*rng.normal(); + nq = _eo.CorCffLength() - 1; + for (k = _eo.size()-_eo.StdDevLength(); k < _eo.size()-1; k++) { + n1 = _eo.size() - k - 1; + n2 = _eo.size() - 1; + for (i = 0; i < k; i++) { + d1 = VarStp[n1]; + d2 = VarStp[n2]; + S = sin( _eo.getCorCff(nq) ); + C = cos( _eo.getCorCff(nq) ); + VarStp[n2] = d1 * S + d2 * C; + VarStp[n1] = d1 * C - d2 * S; + n2--; + nq--; + } + } + for (i = 0; i < _eo.size(); i++) + _eo[i] += VarStp[i]; + + } + // the data + //========= + double TauLcl; /* Local factor for mutation of std deviations */ + double TauGlb; /* Global factor for mutation of std deviations */ + double TauBeta; /* Factor for mutation of correlation parameters */ +}; + +/* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ +// Not yet implemented! + +#endif + From 5ecddc312c50bb9f5d08ddc5d1c7d0980e15d923 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:21:02 +0000 Subject: [PATCH 0132/2134] moved old files here --- eo/src/obsolete/eoParser.h | 838 ++++++++++++++++++++++++++++++ eo/src/obsolete/eoParserUtils.cpp | 35 ++ eo/src/obsolete/eoParserUtils.h | 24 + eo/src/obsolete/eoProblem.h | 45 ++ 4 files changed, 942 insertions(+) create mode 100644 eo/src/obsolete/eoParser.h create mode 100644 eo/src/obsolete/eoParserUtils.cpp create mode 100644 eo/src/obsolete/eoParserUtils.h create mode 100644 eo/src/obsolete/eoProblem.h diff --git a/eo/src/obsolete/eoParser.h b/eo/src/obsolete/eoParser.h new file mode 100644 index 000000000..013699132 --- /dev/null +++ b/eo/src/obsolete/eoParser.h @@ -0,0 +1,838 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +/* eoParser.h + some classes to parser either the command line or a parameter file + + (c) Marc Schoenauer and Geneura team, 1999 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _PARSER_H +#define _PARSER_H + +#include // for strcasecmp ... maybe there's a c++ way of doing it? + // Yep there is, but needs either a simple functor for the equal function + // or a hand-rolled string template class (this isn't that horrible as + // it sounds, it just means a new string_traits class with two changed + // function definitions. (Maarten) +#ifdef _MSC_VER +#define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) +#endif + +// STL includes +#include +#include +#include +#include +#include +#include + +// include for exceptions +#include // logic_error + +//----------------------------------------------------------------------------- +// Class Param +//----------------------------------------------------------------------------- + +/** + * A param repesents an argument that can be passed to a program in the command line + */ +class Param { +public: + + /** + * Type of params + */ + enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; + + /** + * Construct an Param. + * @param _shortName Short name of the argument + * @param _longName Long name of the argument + * @param _default The default value + * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) + * @param _description Description of the parameter. What is useful for. + * @param _required If it is a necessary parameter or not + */ + Param (string _shortName="-h", string _longName="--help", + string _default = "", valueType _valType= STRING, + string _description="Shows this help", + bool _required=false ) + : repShortName(_shortName), repLongName(_longName), + repDescription(_description ), repEnv(""), repDefault(_default), + repValue(_default), repValType( _valType), + repRequired( _required), repChanged(false) { + + const char *c = repLongName.c_str(); + for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); + parse( param ); + params.push_back( param ); + + istrstream is(param.value().c_str()); + vector retValue; + string tmpStr; + + is >> tmpStr; + while(is){ + retValue.push_back(tmpStr); + is >> tmpStr; + } + return retValue; + }; + + /** + * Gets the int value of a param given the full description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + int getInt (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + int retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the unsigned lon value of a param given ... + * @param see above + * @exception BadType if the param's value isn't a correct unsigned long + */ + + int getUnsignedLong (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + unsigned long retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + /** + * Gets the float value of a param given the description of the parameter + * @param see above + * @exception BadType if the param's value isn't a correct int + */ + + float getFloat (const string& _shortName, const string& _longName, + const string& _default = "", + const string& _description="", bool _required=false) { + Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); + parse( param ); + params.push_back( param ); + + // now gets the value + istrstream is( param.value().c_str()); + float retValue; + is >> retValue; + + if (!is) { + throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); + return 0; + } else { + return retValue; + } + }; + + + string parse_string (istream & _is) { + string paramValue; + _is >> paramValue; + //if the first character of the string or array is not a " => just one word or array-element. + if( paramValue[0] != '\"' ) + return paramValue; + + if( paramValue[1] == '\"' ) // the empty string + return "" ; + + //else => read until the next " (the end of the string). + const char *c = paramValue.c_str(); + string tmpStr = c+1;// skip the " + if (tmpStr[tmpStr.length()-1] == '\"') { // one word only + //tmpStr[tmpStr.length()-1] = '\0'; + tmpStr.erase( &tmpStr[tmpStr.length()-1] ); + return tmpStr; + } + + bool stop = false; + while (_is && !stop) { + _is >> paramValue; + // test last character of paramValue for " + if (paramValue[paramValue.length()-1] == '\"') { + paramValue.erase( ¶mValue[paramValue.length()-1] ); + //paramValue[paramValue.length()-1] = '\0'; + stop = true; + } + tmpStr = tmpStr + " " + paramValue ; + } + return tmpStr; + }; + + + void parse (Param & param) { + int i; + string tmpStr, ReadStr, FirstWord; + + // FIRST: look if the associated environment variables have any value, to use them. + if( getenv( param.environment().c_str() ) ) { + //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; + if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || + ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) + ) { // found the keyword + + Param::valueType tmp = param.valType(); + switch ( tmp ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + param.value("true" ); + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + is >> tmpStr; + param.value(tmpStr); + break; + + case Param::STRING: + tmpStr = parse_string(is); + param.value(tmpStr); + break; + + case Param::ARRAY: + ReadStr = parse_string(is); + if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array + param.value(ReadStr); + break; + } + // read next word - and keep it in case of <> mismatch + FirstWord = parse_string(is); + // test for empty array + if (FirstWord == ">") { + param.value(""); + break; + } + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_string(is); + while ( is && (ReadStr != ">") ) { + tmpStr = tmpStr + " " + ReadStr; + ReadStr = parse_string(is); + } + + if (!is) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + } + else + param.value(tmpStr); + break; + } + } + } + } + + + // LAST (highest priority) parse the command line arguments + for (i=1 ; i" --> a single string in the array + param.value(ReadStr); + }else{ + // read next word - and keep it in case of <> mismatch + FirstWord = parse_argv[i++]; + + // test for empty array + if (FirstWord == ">") { + param.value(""); + }else{ + // else, read all words until ">" + tmpStr = FirstWord; + ReadStr = parse_argv[i++]; + while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" + throw Parser::BadArrayParam( param.longName(), FirstWord ); + param.value(FirstWord); // assume unique string + }else{ + param.value(tmpStr); + } + } + } + } + } + break; + } + + //MS after trying all possibilities, and if the value has not changed + // though the parameter was required, protest! + if (param.required() && !param.changed()) + throw Parser::MissingReqParam(param.shortName()); + + }; + + /** + * Sets a new value for a param given its short name or its long name. + * @param _name One of the names of the param. + * @param _value Value to be assigned. + * @exception UnknownArg if the param doesn't exist + * @exception MissingVal if the param hasn't got a value + */ + Param::valueType setParamValue (const string& _name, const char* _value){ + vector::iterator pos; + + for (pos=params.begin() ; pos!=params.end() ; pos++) + if (pos->shortName()==_name || pos->longName()==_name) + break; + + // if found ... + if (pos!=params.end()) { + switch ( pos->valType() ) { + case Param::TITLE: + cerr << "Error, we should not be there" << endl; + exit(1); + break; + case Param::BOOL : + pos->value("true"); + break; + case Param::ARRAY : + case Param::INT: + case Param::UL: + case Param::FLOAT: + case Param::STRING: + if (_value != NULL){ + pos->value(_value); + }else{ + throw Parser::MissingVal(_name); + return Param::BOOL; + } + break; + } // switch + + return pos->valType(); + + }else{ + throw Parser::UnknownArg(_name); + return Param::BOOL; + } + }; + + /// the output method - generate the .status file (unless other name is given) + friend ostream & operator<< ( ostream & os, Parser & _parser ) + { + vector::iterator p; + //print every param with its value + for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { + switch ( p->valType() ) { + case Param::BOOL : + if( p->value() == (string) "true") + os << p->longName(); + else + os << "#" << p->longName() ; // so the name of the bool is commented out + break; + + case Param::INT: + case Param::UL: + case Param::FLOAT: + os << p->longName()<<" "<value(); + break; + + case Param::ARRAY : + os << p->longName() << " < " << p->value().c_str() << " >" ; + break; + case Param::STRING: + os << p->longName()<<" \""<value().c_str()<<"\" "; + break; + case Param::TITLE: + os << endl; // Title is in the description below + break; + } // switch + os << "\t #" << p->shortName() << " : " << p->description(); + if (p->valType() != Param::TITLE) + os << " [" << p->defValue() << "]" ; + os << endl; + } + return os; + }; + + /** + * Prints out the list of parameters in the output file (if specified) + */ + void outputParam(string _OutputFile="") + { + if (_OutputFile == "") { + _OutputFile = parse_argv[0]; + _OutputFile += ".status"; + } + + ofstream os(_OutputFile.c_str()); + os << "Parameters used by \"" << programName << "\" (" + << programDescription << ")" << endl << endl; + os << *this; + }; + + /** + * Prints an automatic help in the standard output using the information + * provided by parameters + */ + void printHelp() { + vector::iterator p; + // unsigned i; + + // print program name and description + cout << this->programName <<": "<valType() != Param::TITLE ) { + // if( p->valType() != Param::BOOL ){ + // cout << ( (!p->required())?"[":""); + // cout <shortName()<<" value"<required())?"]":"")<<" "; + // }else{ + // cout << "["<shortName()<<"] "; + // } + // } // for p + cout << "Where:"<valType() != Param::TITLE ) { + // Victor: 04-Jan-2000 + // Modified because the - and -- prefixes are not needed. + /* + cout << "-" << p->shortName() + <<", --"<longName()<<":\t" + <description()<shortName() + <<", " << p->longName()<<":\t" + <description()<valType() ) { + case Param::INT: cout <<"Integer"; break; + case Param::UL: cout <<"Unsigned Long Integer"; break; + case Param::FLOAT: cout <<"Float"; break; + case Param::STRING: cout <<"String"; break; + case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; + case Param::BOOL: cout << "Flag"; break; + case Param::TITLE: break; + } // switch + if(p->valType() == Param::BOOL) + cout << ") True if present" << endl; + else + cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<description() << endl; + } + } // for p + cout << endl; + }; + + /** + * This class managges unknown argument exceptions. + */ + class UnknownArg : public logic_error { + public: + + /** + * Constructor + * @param _arg string to be shown when the exception occurs + */ + UnknownArg( const string& _arg): logic_error( "Invalid argument: "+_arg ) { }; + }; + + /** + * This class managges bad param types. + */ + class BadType : public logic_error { + public: + + /** + * Constructor + * @param _param The param + * @param _value The value of the param + */ + BadType(const string& _param, const string& _value, const string& _correctType) + : logic_error("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; + }; + + /** + * This class managges exceptions produced when there isn't a value for a parameter. + */ + class MissingVal : public logic_error { + public: + + /** + * Constructor + * @param _param The param + */ + MissingVal(const string& _param) : logic_error("Missing value for parameter " + _param) {}; + }; + + /** + * This class managges exceptions produced when the user forgot a required parameter. + */ + class MissingReqParam : public logic_error { + public: + + /** + * Constructor + * @param _shortName The param's short name + */ + MissingReqParam(const string& _shortName) : logic_error("Missing required parameter " + _shortName) {}; + }; + + /** + * This class managges exceptions du to < without a > in array value + */ + class BadArrayParam : public logic_error { + public: + + /** + * Constructor + * @param _param The param + * @param _first_word The first word read after the "<" + */ + BadArrayParam(const string& _param, const string &_first_word) : + logic_error("Array parameter " + _param + ": No matching > (" + _first_word + + "... )") {}; + }; + + void createParamFile( ostream& _os ) { + vector::iterator p; + for ( p=params.begin(); p!=params.end(); p++ ) { + switch( p->valType() ) { + case Param::TITLE: + _os << endl << "# -- "; + break; + case Param::BOOL: + _os << ((p->value()=="true" )?"":"#") + << p->longName(); + break; + case Param::STRING: + _os << p->longName()<<"\t\""<value()<<"\""; + break; + case Param::ARRAY: + _os << p->longName()<<"\t< "<value()<<" >"; + break; + default: + _os << p->longName()<<"\t"<value(); + break; + } // switch + _os << "\t #" << p->description() << endl; + } + } +private: + vector params; + string programName; + string programDescription; + int parse_argc; + char **parse_argv; + string InputFileName; + +}; + + + + +#endif diff --git a/eo/src/obsolete/eoParserUtils.cpp b/eo/src/obsolete/eoParserUtils.cpp new file mode 100644 index 000000000..084af77c6 --- /dev/null +++ b/eo/src/obsolete/eoParserUtils.cpp @@ -0,0 +1,35 @@ +// See eoParserUtils.h + +#include +#include +/// Reproducible random seed + +// For the Mersenne-Twister used in EO, the entire rng needs to be saved + +//---------------------------------- +void InitRandom( Parser & parser) { +//---------------------------------- + unsigned long _seed; + try { + _seed = parser.getUnsignedLong("-S", "--seed", "0", + "Seed for Random number generator" ); + } + catch (logic_error & e) + { + cout << e.what() << endl; + parser.printHelp(); + exit(1); + } + + if (_seed == 0) { // use clock to get a "random" seed + _seed = (unsigned long)( time( 0 ) ); + ostrstream s; + 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. + rng.reseed(_seed); + + return; +} + diff --git a/eo/src/obsolete/eoParserUtils.h b/eo/src/obsolete/eoParserUtils.h new file mode 100644 index 000000000..4bd8dc456 --- /dev/null +++ b/eo/src/obsolete/eoParserUtils.h @@ -0,0 +1,24 @@ +/*------------------------------------------------------- +File..........: eoParserUtils.h +Author........: Geneura Team, Marc Shoenauer + (this file: Victor Rivas, vrivas@ujaen.es) +Date..........: 17-Dec-1999 +Description...: Some useful things that use eoParser. +Modifications.: +------------------- 1 ------------------- + Author.......: + Date.........: + Description..: +*/ + +#ifndef EO_PARSER_UTILS +#define EO_PARSER_UTILS + +#include +#include +/// Reproducible random seed + +//---------------------------------- +void InitRandom( Parser & parser); +//---------------------------------- +#endif diff --git a/eo/src/obsolete/eoProblem.h b/eo/src/obsolete/eoProblem.h new file mode 100644 index 000000000..5c219123e --- /dev/null +++ b/eo/src/obsolete/eoProblem.h @@ -0,0 +1,45 @@ +//----------------------------------------------------------------------------- + +// eoProblem.h + +// (c) GeNeura Team 1998 + +/* + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPROBLEM_H +#define EOPROBLEM_H + +//----------------------------------------------------------------------------- + +template class Problem +{ + public: + typedef T Chrom; + typedef typename T::Gene Gene; + typedef typename T::Fitness Fitness; + + virtual Fitness operator()(const Chrom& chrom) = 0; +}; + +//----------------------------------------------------------------------------- + +#endif EOPROBLEM_H + From 2799347236f408e88d0547b766fc6f1cf39533ef Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:23:20 +0000 Subject: [PATCH 0133/2134] moving... --- eo/src/ga/eoBin.h | 93 +++++++ eo/src/ga/eoBitOp.h | 325 +++++++++++++++++++++++++ eo/src/ga/eoBitOpFactory.h | 120 +++++++++ eo/src/other/eoExternalEO.h | 67 +++++ eo/src/other/eoExternalOpFunctions.cpp | 41 ++++ eo/src/other/eoString.h | 148 +++++++++++ eo/src/other/eoStringMutation.h | 78 ++++++ 7 files changed, 872 insertions(+) create mode 100644 eo/src/ga/eoBin.h create mode 100644 eo/src/ga/eoBitOp.h create mode 100644 eo/src/ga/eoBitOpFactory.h create mode 100644 eo/src/other/eoExternalEO.h create mode 100644 eo/src/other/eoExternalOpFunctions.cpp create mode 100644 eo/src/other/eoString.h create mode 100644 eo/src/other/eoStringMutation.h diff --git a/eo/src/ga/eoBin.h b/eo/src/ga/eoBin.h new file mode 100644 index 000000000..1d7ec4193 --- /dev/null +++ b/eo/src/ga/eoBin.h @@ -0,0 +1,93 @@ +/* + eoBin.h + (c) GeNeura Team 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoBin_h +#define eoBin_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // string +#include // EO + +/** eoBin: implementation of binary chromosome. + * based on STL's bit_vector (vector). +*/ +template class eoBin: public eoVector +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size = 0, bool value = false): + eoVector(size, value) {} + + /** + * Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size, const eoRnd& rnd): eoVector(size) + { + generate(begin(), end(), rnd); + } + + /** Constructor from istream. + @param is The istream to read from.*/ + eoBin(istream& _is):eoVector(_is){}; + + /// My class name. + string className() const + { + return "eoBin"; + } + + /** + * To print me on a stream. + * @param os The ostream. + */ + void printOn(ostream& os) const + { + copy(begin(), end(), ostream_iterator(os)); + } + + /** + * To read me from a stream. + * @param is The istream. + */ + void readFrom(istream& is) + { + string bits; + is >> bits; + if (is) + { + resize(bits.size()); + transform(bits.begin(), bits.end(), begin(), + bind2nd(equal_to(), '1')); + } + } +}; + +//----------------------------------------------------------------------------- + +#endif eoBin_h diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h new file mode 100644 index 000000000..78337fbbe --- /dev/null +++ b/eo/src/ga/eoBitOp.h @@ -0,0 +1,325 @@ +//----------------------------------------------------------------------------- +// eoBitOp.h +//----------------------------------------------------------------------------- + +#ifndef eoBitOp_h +#define eoBitOp_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include // eoUniform +#include // eoBin +#include // eoMonOp + + +/** @name BitWise Genetic operators + +Even as these operators might seem general, they are particular versions of genetic +operators useful only for binary operators. As any set of genetic operators, it must +have a factory that knows how to build them from a description +@author GeNeura Team +@version 0.1 +@see eoBin +@see eoBitOpFactory +*/ + +//@{ + +/** eoBinRandom --> mofify a chromosome in a random way */ + +template class eoBinRandom: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinRandom"; } + + /** + * Randomizes a cromosome. + * @param chrom The cromosome to be randomize. + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0.0, 1.0); + for (unsigned i = 0; i < chrom.size(); i++) + chrom[i] = (uniform() < 0.5) ? false : true; + } +}; + + +/** eoBinBitFlip --> chages a bit */ + +template class eoBinBitFlip: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinBitFlip"; } + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size()); + unsigned i = uniform(); + chrom[i] = (chrom[i]) ? false : true; + } +}; + + +/** eoBinMutation --> classical mutation */ + +template class eoBinMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _rate Rate of mutation. + */ + eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} + + /// The class name. + string className() const { return "eoBinMutation"; } + + /** + * Mutate a chromosome. + * @param chrom The chromosome to be mutated. + */ + void operator()(Chrom& chrom) const + { + for (unsigned i = 0; i < chrom.size(); i++) + if (uniform() < rate) + chrom[i] = !chrom[i]; + } + + private: + double rate; + mutable eoUniform uniform; +}; + + +/** eoBinInversion: inverts the bits of the chromosome between an interval */ + +template class eoBinInversion: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinInversion"; } + + /** + * Inverts a range of bits in a binary chromosome. + * @param chrom The chromosome whos bits are going to be inverted (a range). + */ + void operator()(Chrom& chrom) const + { + eoUniform uniform(0, chrom.size() + 1); + + unsigned u1 = uniform(), u2; + do u2 = uniform(); while (u1 == u2); + unsigned r1 = min(u1, u2), r2 = max(u1, u2); + + reverse(chrom.begin() + r1, chrom.begin() + r2); + } +}; + + +/** eoBinNext --> next binary value */ + +template class eoBinNext: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinNext"; } + + /** + * Change the bit string x to be x+1. + * @param chrom The chromosome to be added one. + */ + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } + } +}; + + +/** eoBinPrev --> previos binary value */ + +template class eoBinPrev: public eoMonOp +{ + public: + /// The class name. + string className() const { return "eoBinPrev"; } + + /** + * Change the bit string x to be x-1. + * @param chrom The chromosome to be substracted one. + */ + void operator()(Chrom& chrom) const + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } + } +}; + + +/** eoBinCrossover --> classic crossover */ + +template class eoBinCrossover: public eoQuadraticOp +{ + public: + /// The class name. + string className() const { return "eoBinCrossover"; } + + /** + * 2-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + eoUniform uniform(1, min(chrom1.size(), chrom2.size())); + swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); + } +}; + + +/** eoBinNxOver --> n-point crossover */ + +template class eoBinNxOver: public eoQuadraticOp +{ + public: + /// (Defualt) Constructor. + eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) + { + if (num_points < 1) + runtime_error("NxOver --> invalid number of points"); + } + + /// The class name. + string className() const { return "eoBinNxOver"; } + + /** + * n-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_size = min(chrom1.size(), chrom2.size()); + unsigned max_points = min(max_size - 1, num_points); + + vector points(max_size, false); + eoUniform uniform(1, max_size); + + // select ranges of bits to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + max_points--; + } + } while (max_points); + + + // swap bits between chromosomes + bool change = false; + for (unsigned bit = 1; bit < points.size(); bit++) + { + if (points[bit]) + change = !change; + + if (change) + swap(chrom1[bit], chrom2[bit]); + } + } + + private: + unsigned num_points; +}; + + +/** eoBinGxOver --> gene crossover */ + +template class eoBinGxOver: public eoQuadraticOp +{ + public: + /// Constructor. + eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + gene_size(_gene_size), num_points(_num_points) + { + if (gene_size < 1) + runtime_error("GxOver --> invalid gene size"); + if (num_points < 1) + runtime_error("GxOver --> invalid number of points"); + } + + /// The class name + string className() const { return "eoBinGxOver"; } + + /** + * Gene crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + void operator()(Chrom& chrom1, Chrom& chrom2) const + { + unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = min(max_genes, num_points); + + vector points(max_genes, false); + eoUniform uniform(0, max_genes); + + // selects genes to swap + do { + unsigned bit = uniform(); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } + } while (cut_genes); + + // swaps genes + for (unsigned i = 0; i < points.size(); i++) + if (points[i]) + swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); + } + + private: + unsigned gene_size; + unsigned num_points; +}; + + + +//----------------------------------------------------------------------------- +//@} +#endif eoBitOp_h + diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h new file mode 100644 index 000000000..8d70c7e4e --- /dev/null +++ b/eo/src/ga/eoBitOpFactory.h @@ -0,0 +1,120 @@ +// eoBitOpFactory.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpFactory.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOBITOPFACTORY_H +#define _EOBITOPFACTORY_H + +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. An instance of the factory class to create operators that act +on bitstring chromosomes. Only those chromosomes can instantiate the operators +that are created here +@see eoSelect*/ +template< class EOT> +class eoBitOpFactory: public eoOpFactory { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoBitOpFactory( ) {}; + + /// destructor + virtual ~eoBitOpFactory() {}; + //@} + + /** Another factory method: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + If there are problems, an exception is raised; it should be caught at the + upper level, because it might be something for that level\\ + At the same time, it catches exceptions thrown at a lower level, which will + indicate that whatever is in the stream is for this method to process + @param _is an stream from where a single line will be read + @throw runtime_exception if the object type is not known + */ + virtual eoOp* make(istream& _is) { + eoOp * opPtr = NULL; + try { + opPtr = eoOpFactory::make( _is ); + } catch ( const string& objectTypeStr ) { + if ( objectTypeStr == "eoBinRandom") { + opPtr = new eoBinRandom(); + } + if ( objectTypeStr == "eoBinBitFlip" ) { + opPtr = new eoBinBitFlip( ); + } + if ( objectTypeStr == "eoBinMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBinMutation( rate ); + } + if ( objectTypeStr == "eoBinInversion" ) { + opPtr = new eoBinInversion( ); + } + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBinNext( ); + } + if ( objectTypeStr == "eoBinPrev" ) { + opPtr = new eoBinPrev( ); + } + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBinNext( ); + } + if ( objectTypeStr == "eoBinCrossover" ) { + opPtr = new eoBinCrossover( ); + } + if ( objectTypeStr == "eoBinNxOver" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoBinNxOver( nPoints ); + } + if ( objectTypeStr == "eoBinGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBinGxOver( geneSize, nPoints ); + } + if ( objectTypeStr == "eoBinUxOver" ) { + float rate; + _is >> rate; + opPtr = new eoBinUxOver( rate ); + } + if ( !opPtr ) { // to be caught by the upper level + throw objectTypeStr; + } + } + return opPtr; + }; + + +}; + + +#endif _EOBITOPFACTORY_H + diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h new file mode 100644 index 000000000..8ca43e714 --- /dev/null +++ b/eo/src/other/eoExternalEO.h @@ -0,0 +1,67 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoExternalEO.h + * Definition of an object that allows an external struct + * to be inserted in EO + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoExternalEO_h +#define eoExternalEO_h + +#include "EO.h" + +/** + * Definition of an object that allows an external struct + * to be inserted in EO +*/ +template +class eoExternalEO : public EO, virtual public External +{ + public : + + typedef External Type; + + eoExternalEO(void) : EO(), Base() {} + eoExternalEO(istream& is) : EO(), Base() { readFrom(is); } + + /** + * Read object.\\ + * @param _is a istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) + { + EO::readFrom(is); + throw runtime_excpetion("Reading not defined yet"); + } + + /** + * Write object. Called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const + { + EO::printOn(is); + throw runtime_excpetion("Writing not defined yet"); + } + +}; + diff --git a/eo/src/other/eoExternalOpFunctions.cpp b/eo/src/other/eoExternalOpFunctions.cpp new file mode 100644 index 000000000..34efcf41e --- /dev/null +++ b/eo/src/other/eoExternalOpFunctions.cpp @@ -0,0 +1,41 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoExternalOpFunc.h + Defines eoExternalInitOpFunc, eoExternalMonOpFunc, eoExternalBinOpFunc, eoExternalQuadOpFunc + that are used to wrap a function pointer to externally defined initialization + and 'genetic' operators + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoExternalOpFunc_h +#define eoExternalOpFunc_h + +#include "eoExternalEO.h" +#include "eoOps.h" +#include "eoRnd.h" + +template +class eoExternalInitFunc +{ + +public : + +}; \ No newline at end of file diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h new file mode 100644 index 000000000..d1ba55b44 --- /dev/null +++ b/eo/src/other/eoString.h @@ -0,0 +1,148 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoString.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoString_H +#define _eoString_H + +// STL libraries +#include +#include + +using namespace std; + +// EO headers +#include + +//----------------------------------------------------------------------------- +// eoString +//----------------------------------------------------------------------------- + +/** Adaptor that turns an STL string into an EO */ +template +class eoString: public eo1d, public string { +public: + + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + /// ctor + eoString( const string& _str ="" ) + : eo1d(), string( _str ) {}; + + + /** Ctor using a random number generator + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called + */ + eoString( unsigned _size, eoRnd& _rnd ) + : eo1d(), string(){ + for ( unsigned i = 0; i < _size; i ++ ) { + *this += _rnd(); + } + }; + + /** Ctor from a stream + @param _s input stream + */ + eoString( istream & _s ) + : eo1d(){ + _s >> *this; + }; + + /// copy ctor + eoString( const eoString& _eoStr ) + :eo1d( static_cast & > ( _eoStr ) ), + string( _eoStr ){}; + + /// Assignment operator + const eoString& operator =( const eoString& _eoStr ) { + if ( this != & _eoStr ) { + eo1d::operator = ( _eoStr ); + string::operator = ( _eoStr ); + } + return *this; + } + + /// dtor + virtual ~eoString() {}; +//@} + + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual char getGene( unsigned _i ) const { + if ( _i >= length() ) + throw out_of_range( "out_of_range when reading gene"); + return (*this)[_i]; + }; + + /** methods that implement the eo1d protocol + @exception out_of_range if _i is larger than EO´s size + */ + virtual void setGene( unsigned _i, const char& _value ) { + if ( _i >= size() ) + throw out_of_range( "out_of_range when writing a gene"); + (*this)[_i] = _value; + }; + + /** Inserts a value after _i, displacing anything to the right + @exception out_of_range if _i is larger than EO´s size + */ + virtual void insertGene( unsigned _i, char _val ) { + if (_i <= this->size() ) { + string::iterator i = this->begin()+_i; + this->insert( i, _val ); + } else + throw out_of_range( "out_of_range when inserting gene"); + }; + + /** Eliminates the gene at position _i + @exception out_of_range if _i is larger than EO´s size + */ + virtual void deleteGene( unsigned _i ) { + if (_i < this->size() ) { + string::iterator i = this->begin()+_i; + this->erase( i ); + } else + throw out_of_range( "out_of_range when deleting gene"); + }; + + /// methods that implement the EO protocol + virtual unsigned length() const { return this->size(); }; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoString";}; + //@} + + +}; + +#endif + diff --git a/eo/src/other/eoStringMutation.h b/eo/src/other/eoStringMutation.h new file mode 100644 index 000000000..5cebc8ebc --- /dev/null +++ b/eo/src/other/eoStringMutation.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStringMutation.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOSTRINGMUTATION_H +#define _EOSRTINGMUTATION_H + +#include +// EO includes +#include +#include +#include + +/** Mutation of an eoString. + The eoString's genes are changed by adding or substracting 1 to +*/ + +template +class eoStringMutation: public eoMutation { + public: + + /// + eoStringMutation(const double _rate=0.0) : eoMutation< EOT >(_rate) {}; + + /// + virtual ~eoStringMutation() {}; + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoStringMutation";}; + //@} + + + private: + +#ifdef _MSC_VER + typedef EOT::Type Type; +#else + typedef typename EOT::Type Type; +#endif + + /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. + virtual void applyAt( EOT& _eo, unsigned _i ) const { + eoUniform uniform( 0, 1 ); + if( rate < uniform() ) { + _eo.gene(_i) += ( uniform()>=0.5 )? (1) : (-1) ; + } + } + +}; + +//----------------------------------------------------------------------------- + +#endif From 2620c402bc51338b92767935624ffe2cbe586260 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:30:57 +0000 Subject: [PATCH 0134/2134] no message --- eo/src/eoPersistent.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 0bdf9f48b..50654fd7e 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -8,10 +8,3 @@ istream & operator >> ( istream& _is, eoPersistent& _o ) { _o.readFrom(_is); return _is; }; - -// temporary location for the one and only eoRng object - -#include "eoRNG.h" - -eoRng rng; - From 2e6d406d8e4d89f55df68b52feef7e68615df972 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:32:37 +0000 Subject: [PATCH 0135/2134] (re)moving... --- eo/src/eoAged.h | 109 ----- eo/src/eoBin.h | 93 ----- eo/src/eoBitOp.h | 325 --------------- eo/src/eoBitOpFactory.h | 120 ------ eo/src/eoData.h | 64 --- eo/src/eoDrawable.h | 64 --- eo/src/eoESChrom.h | 126 ------ eo/src/eoESFullChrom.h | 271 ------------ eo/src/eoESFullMut.h | 253 ------------ eo/src/eoException.h | 72 ---- eo/src/eoParser.h | 838 -------------------------------------- eo/src/eoParserUtils.cpp | 35 -- eo/src/eoParserUtils.h | 24 -- eo/src/eoProblem.h | 45 -- eo/src/eoRNG.h | 453 --------------------- eo/src/eoString.h | 148 ------- eo/src/eoStringMutation.h | 78 ---- eo/src/rnd_generators.h | 85 ---- eo/src/selectors.h | 313 -------------- 19 files changed, 3516 deletions(-) delete mode 100644 eo/src/eoAged.h delete mode 100644 eo/src/eoBin.h delete mode 100644 eo/src/eoBitOp.h delete mode 100644 eo/src/eoBitOpFactory.h delete mode 100644 eo/src/eoData.h delete mode 100644 eo/src/eoDrawable.h delete mode 100644 eo/src/eoESChrom.h delete mode 100644 eo/src/eoESFullChrom.h delete mode 100644 eo/src/eoESFullMut.h delete mode 100644 eo/src/eoException.h delete mode 100644 eo/src/eoParser.h delete mode 100644 eo/src/eoParserUtils.cpp delete mode 100644 eo/src/eoParserUtils.h delete mode 100644 eo/src/eoProblem.h delete mode 100644 eo/src/eoRNG.h delete mode 100644 eo/src/eoString.h delete mode 100644 eo/src/eoStringMutation.h delete mode 100644 eo/src/rnd_generators.h delete mode 100644 eo/src/selectors.h diff --git a/eo/src/eoAged.h b/eo/src/eoAged.h deleted file mode 100644 index 3211791df..000000000 --- a/eo/src/eoAged.h +++ /dev/null @@ -1,109 +0,0 @@ -// eoAged.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAge.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOAGED_H -#define EOAGED_H - -//----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoAge -//----------------------------------------------------------------------------- - -/** eoAge is a template class that adds an age to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor -and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, -printOn, readFrom. -@see eoObject -*/ -template -class eoAged: public Object -{ - public: - /// Main ctor from an already built Object. - eoAged( const Object& _o): Object( _o ), age(0) {}; - - /// Copy constructor. - eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; - - /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoAged() {}; - - - ///returns the age of the object - unsigned long Age() const {return age;} - - /// Increments age - const eoAged& operator ++ () { age++; return *this;} - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ -//@{ - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual string className() const { return string("eoAged")+Object::className(); }; - - /** - * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) { - Object::readFrom( _is ); - _is >> age; - } - - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const{ - Object::printOn( _os ); - _os << age; - } -//@} - - private: - - /** Default Constructor. \\ - It´s private so that it is not used anywhere; the right way of using this object - is to create an Object and passing it to an aged by means of the copy ctor; that way - it´s turned into an Aged object*/ - eoAged(): Object(), age(0) {}; - - unsigned long age; -}; - -#endif EOAGE_H - diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h deleted file mode 100644 index 1d7ec4193..000000000 --- a/eo/src/eoBin.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - eoBin.h - (c) GeNeura Team 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoBin_h -#define eoBin_h - -//----------------------------------------------------------------------------- - -#include // ostream, istream -#include // bind2nd -#include // string -#include // EO - -/** eoBin: implementation of binary chromosome. - * based on STL's bit_vector (vector). -*/ -template class eoBin: public eoVector -{ - public: - - /** - * (Default) Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size = 0, bool value = false): - eoVector(size, value) {} - - /** - * Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size, const eoRnd& rnd): eoVector(size) - { - generate(begin(), end(), rnd); - } - - /** Constructor from istream. - @param is The istream to read from.*/ - eoBin(istream& _is):eoVector(_is){}; - - /// My class name. - string className() const - { - return "eoBin"; - } - - /** - * To print me on a stream. - * @param os The ostream. - */ - void printOn(ostream& os) const - { - copy(begin(), end(), ostream_iterator(os)); - } - - /** - * To read me from a stream. - * @param is The istream. - */ - void readFrom(istream& is) - { - string bits; - is >> bits; - if (is) - { - resize(bits.size()); - transform(bits.begin(), bits.end(), begin(), - bind2nd(equal_to(), '1')); - } - } -}; - -//----------------------------------------------------------------------------- - -#endif eoBin_h diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h deleted file mode 100644 index 78337fbbe..000000000 --- a/eo/src/eoBitOp.h +++ /dev/null @@ -1,325 +0,0 @@ -//----------------------------------------------------------------------------- -// eoBitOp.h -//----------------------------------------------------------------------------- - -#ifndef eoBitOp_h -#define eoBitOp_h - -//----------------------------------------------------------------------------- - -#include // swap_ranges -#include // eoUniform -#include // eoBin -#include // eoMonOp - - -/** @name BitWise Genetic operators - -Even as these operators might seem general, they are particular versions of genetic -operators useful only for binary operators. As any set of genetic operators, it must -have a factory that knows how to build them from a description -@author GeNeura Team -@version 0.1 -@see eoBin -@see eoBitOpFactory -*/ - -//@{ - -/** eoBinRandom --> mofify a chromosome in a random way */ - -template class eoBinRandom: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinRandom"; } - - /** - * Randomizes a cromosome. - * @param chrom The cromosome to be randomize. - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0.0, 1.0); - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; - } -}; - - -/** eoBinBitFlip --> chages a bit */ - -template class eoBinBitFlip: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinBitFlip"; } - - /** - * Change one bit. - * @param chrom The cromosome which one bit is going to be changed. - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size()); - unsigned i = uniform(); - chrom[i] = (chrom[i]) ? false : true; - } -}; - - -/** eoBinMutation --> classical mutation */ - -template class eoBinMutation: public eoMonOp -{ - public: - /** - * (Default) Constructor. - * @param _rate Rate of mutation. - */ - eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} - - /// The class name. - string className() const { return "eoBinMutation"; } - - /** - * Mutate a chromosome. - * @param chrom The chromosome to be mutated. - */ - void operator()(Chrom& chrom) const - { - for (unsigned i = 0; i < chrom.size(); i++) - if (uniform() < rate) - chrom[i] = !chrom[i]; - } - - private: - double rate; - mutable eoUniform uniform; -}; - - -/** eoBinInversion: inverts the bits of the chromosome between an interval */ - -template class eoBinInversion: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinInversion"; } - - /** - * Inverts a range of bits in a binary chromosome. - * @param chrom The chromosome whos bits are going to be inverted (a range). - */ - void operator()(Chrom& chrom) const - { - eoUniform uniform(0, chrom.size() + 1); - - unsigned u1 = uniform(), u2; - do u2 = uniform(); while (u1 == u2); - unsigned r1 = min(u1, u2), r2 = max(u1, u2); - - reverse(chrom.begin() + r1, chrom.begin() + r2); - } -}; - - -/** eoBinNext --> next binary value */ - -template class eoBinNext: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinNext"; } - - /** - * Change the bit string x to be x+1. - * @param chrom The chromosome to be added one. - */ - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - continue; - } - else - { - chrom[i] = 1; - break; - } - } -}; - - -/** eoBinPrev --> previos binary value */ - -template class eoBinPrev: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinPrev"; } - - /** - * Change the bit string x to be x-1. - * @param chrom The chromosome to be substracted one. - */ - void operator()(Chrom& chrom) const - { - for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - break; - } - else - { - chrom[i] = 1; - continue; - } - } -}; - - -/** eoBinCrossover --> classic crossover */ - -template class eoBinCrossover: public eoQuadraticOp -{ - public: - /// The class name. - string className() const { return "eoBinCrossover"; } - - /** - * 2-point crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - eoUniform uniform(1, min(chrom1.size(), chrom2.size())); - swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); - } -}; - - -/** eoBinNxOver --> n-point crossover */ - -template class eoBinNxOver: public eoQuadraticOp -{ - public: - /// (Defualt) Constructor. - eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) - { - if (num_points < 1) - runtime_error("NxOver --> invalid number of points"); - } - - /// The class name. - string className() const { return "eoBinNxOver"; } - - /** - * n-point crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_size = min(chrom1.size(), chrom2.size()); - unsigned max_points = min(max_size - 1, num_points); - - vector points(max_size, false); - eoUniform uniform(1, max_size); - - // select ranges of bits to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - max_points--; - } - } while (max_points); - - - // swap bits between chromosomes - bool change = false; - for (unsigned bit = 1; bit < points.size(); bit++) - { - if (points[bit]) - change = !change; - - if (change) - swap(chrom1[bit], chrom2[bit]); - } - } - - private: - unsigned num_points; -}; - - -/** eoBinGxOver --> gene crossover */ - -template class eoBinGxOver: public eoQuadraticOp -{ - public: - /// Constructor. - eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): - gene_size(_gene_size), num_points(_num_points) - { - if (gene_size < 1) - runtime_error("GxOver --> invalid gene size"); - if (num_points < 1) - runtime_error("GxOver --> invalid number of points"); - } - - /// The class name - string className() const { return "eoBinGxOver"; } - - /** - * Gene crossover for binary chromosomes. - * @param chrom1 The first chromosome. - * @param chrom2 The first chromosome. - */ - void operator()(Chrom& chrom1, Chrom& chrom2) const - { - unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; - unsigned cut_genes = min(max_genes, num_points); - - vector points(max_genes, false); - eoUniform uniform(0, max_genes); - - // selects genes to swap - do { - unsigned bit = uniform(); - if (points[bit]) - continue; - else - { - points[bit] = true; - cut_genes--; - } - } while (cut_genes); - - // swaps genes - for (unsigned i = 0; i < points.size(); i++) - if (points[i]) - swap_ranges(chrom1.begin() + i * gene_size, - chrom1.begin() + i * gene_size + gene_size, - chrom2.begin() + i * gene_size); - } - - private: - unsigned gene_size; - unsigned num_points; -}; - - - -//----------------------------------------------------------------------------- -//@} -#endif eoBitOp_h - diff --git a/eo/src/eoBitOpFactory.h b/eo/src/eoBitOpFactory.h deleted file mode 100644 index 8d70c7e4e..000000000 --- a/eo/src/eoBitOpFactory.h +++ /dev/null @@ -1,120 +0,0 @@ -// eoBitOpFactory.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOpFactory.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOBITOPFACTORY_H -#define _EOBITOPFACTORY_H - -#include -#include - -//----------------------------------------------------------------------------- - -/** EO Factory. An instance of the factory class to create operators that act -on bitstring chromosomes. Only those chromosomes can instantiate the operators -that are created here -@see eoSelect*/ -template< class EOT> -class eoBitOpFactory: public eoOpFactory { - -public: - - /// @name ctors and dtors - //{@ - /// constructor - eoBitOpFactory( ) {}; - - /// destructor - virtual ~eoBitOpFactory() {}; - //@} - - /** Another factory method: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - If there are problems, an exception is raised; it should be caught at the - upper level, because it might be something for that level\\ - At the same time, it catches exceptions thrown at a lower level, which will - indicate that whatever is in the stream is for this method to process - @param _is an stream from where a single line will be read - @throw runtime_exception if the object type is not known - */ - virtual eoOp* make(istream& _is) { - eoOp * opPtr = NULL; - try { - opPtr = eoOpFactory::make( _is ); - } catch ( const string& objectTypeStr ) { - if ( objectTypeStr == "eoBinRandom") { - opPtr = new eoBinRandom(); - } - if ( objectTypeStr == "eoBinBitFlip" ) { - opPtr = new eoBinBitFlip( ); - } - if ( objectTypeStr == "eoBinMutation" ) { - float rate; - _is >> rate; - opPtr = new eoBinMutation( rate ); - } - if ( objectTypeStr == "eoBinInversion" ) { - opPtr = new eoBinInversion( ); - } - if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBinNext( ); - } - if ( objectTypeStr == "eoBinPrev" ) { - opPtr = new eoBinPrev( ); - } - if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBinNext( ); - } - if ( objectTypeStr == "eoBinCrossover" ) { - opPtr = new eoBinCrossover( ); - } - if ( objectTypeStr == "eoBinNxOver" ) { - unsigned nPoints; - _is >> nPoints; - opPtr = new eoBinNxOver( nPoints ); - } - if ( objectTypeStr == "eoBinGxOver" ) { - unsigned geneSize, nPoints; - _is >> geneSize >> nPoints; - opPtr = new eoBinGxOver( geneSize, nPoints ); - } - if ( objectTypeStr == "eoBinUxOver" ) { - float rate; - _is >> rate; - opPtr = new eoBinUxOver( rate ); - } - if ( !opPtr ) { // to be caught by the upper level - throw objectTypeStr; - } - } - return opPtr; - }; - - -}; - - -#endif _EOBITOPFACTORY_H - diff --git a/eo/src/eoData.h b/eo/src/eoData.h deleted file mode 100644 index 1ba358605..000000000 --- a/eo/src/eoData.h +++ /dev/null @@ -1,64 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoData.h - Some numeric limits and types and things like that; with #ifdefs to keep - compatibility - (c) GeNeura Team & Maarten Keijzer, 1998, 1999, 2000 - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef EODATA_H -#define EODATA_H - -//----------------------------------------------------------------------------- - -#include // vector -#include // set -#include // string - -using namespace std; - - -#ifdef _MSC_VER - #include // MAXDOUBLE - #define MAXFLOAT numeric_limits::max() - #define MINFLOAT numeric_limits::min() - #define MAXDOUBLE numeric_limits::max() - #define MAXINT numeric_limits::max() -#else - #include - #include -#ifndef _WIN32 // should be the define for UN*X flavours: _POSIX?? - #include -#endif - #ifndef MAXFLOAT - #define MAXFLOAT (float)1e127 - #define MAXDOUBLE (double)1.79769313486231570e+308 - #define MAXINT 2147483647 - #endif -#endif - -#ifndef _MSC_VER -#include -#define _isnan isnan -#endif - -//----------------------------------------------------------------------------- - -#endif EODATA_H - diff --git a/eo/src/eoDrawable.h b/eo/src/eoDrawable.h deleted file mode 100644 index 221bf2c1e..000000000 --- a/eo/src/eoDrawable.h +++ /dev/null @@ -1,64 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoDrawable.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EODRAWABLE_H -#define EODRAWABLE_H - -//----------------------------------------------------------------------------- - -using namespace std; - -//----------------------------------------------------------------------------- -// eoDrawable -//----------------------------------------------------------------------------- - -/** eoDrawable is a template class that adds a drawing interface to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor -and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, -eoDrawables can be drawn on any two-dimensional surface; it can be added to any -object with above characteristics. -@see eoObject -*/ -template -class eoDrawable -{ - public: - /// Main ctor from an already built Object. - eoDrawable( const Object& _o): Object( _o ){}; - - /// Copy constructor. - eoDrawable( const eoDrawable& _d): Object( _d ){}; - - /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoDrawable() {}; - - - /**Draws the object. It must be redefined in any subclass, it´s impossible - to have a general drawing method - @param _x, _y coorinates */ - virtual void draw( unsigned _x, unsigned _y) = 0; - -}; - -#endif EODRAWABLE_H diff --git a/eo/src/eoESChrom.h b/eo/src/eoESChrom.h deleted file mode 100644 index 495a9ba6c..000000000 --- a/eo/src/eoESChrom.h +++ /dev/null @@ -1,126 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESChrom.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eoESCHROM_H -#define _eoESCHROM_H - -// STL libraries -#include // For vector<> -#include -#include -#include // for ostream - -// EO includes -#include - -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation -*/ -//@{ - -/** Each gene in an Evolution Strategies is composed of a value plus an standard -deviation, sigma, used for mutation*/ -struct eoESGene { - double val, sigma; - eoESGene( double _val = 0, double _sigma = 0 ): val( _val ), sigma( _sigma ) {}; -}; - -/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 -bool operator < ( eoESGene _e1, eoESGene _e2 ) { - return _e1.val < _e2.val; -} - -/// Tricky operator to avoid errors in some VC++ systems -bool operator == ( eoESGene _e1, eoESGene _e2 ) { - return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; -} - -/// -ostream & operator << ( ostream& _s, const eoESGene& _e ) { - _s << _e.val << ", " << _e.sigma << " | "; - return _s; -} - -/// Dummy >> -istream & operator >> ( istream& _s, const eoESGene& _e ) { - _s >> _e.val; - _s >> _e.sigma; - return _s; -} - - -/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and -Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene -@see eoESGene -*/ -template -class eoESChrom: public eoVector { -public: - /// Basic ctor - eoESChrom( ):eoVector() {}; - - /** Ctor using a couple of random number generators - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called. - @param _rndS another one, for the sigma - */ - eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) - : eoVector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - i->val = _rnd(); - i->sigma = _rndS(); - } - }; - - /// Copy ctor - eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; - - /// Assignment operator - const eoESChrom& operator =( const eoESChrom & _eoes ) { - if ( this != &_eoes ){ - eoVector::operator=( _eoes ); - } - return *this; - } - - /// - ~eoESChrom() {}; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoESChrom";}; - //@} - -}; - -//@} -#endif - diff --git a/eo/src/eoESFullChrom.h b/eo/src/eoESFullChrom.h deleted file mode 100644 index 85bd4f228..000000000 --- a/eo/src/eoESFullChrom.h +++ /dev/null @@ -1,271 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESInd.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef _EOESFULLCHROM_H -#define _EOESFULLCHROM_H - -// STL libraries -#include // For vector<> -#include -#include -#include // for ostream - -// EO includes -#include -#include -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation and a vector of correlations -*/ -//@{ - - -/**@name individuals for evolution strategies -MS- 22/10/99 -Each individual in an evolution strategy is composed of - a vector of floating point values - a vector of std deviations - a vector of rotation angles (for correlated mutations) - -THese individuals CANNOT BE IMPLEMENTED as vectors of anything - at least in the case of correlated mutations -*/ -//@{ - -template -class eoESFullChrom : public eoVector { - public: -/// constructor - eoESFullChrom( unsigned _num_genes = 1, - unsigned _num_sigma = 1, unsigned _num_correl = 0, - bool _verbose = false, - double _ObjMin = 0, double _ObjMax = 1, - double _StdDevInit = 0.3 ): - eoVector(_num_genes), - // ObjVar( _num_genes ), now an eoVector - StdDev( _num_sigma ), - CorCff( _num_correl ), - verbose( _verbose ), - ObjMin( _ObjMin ), - ObjMax(_ObjMax ), - StdDevInit( _StdDevInit ) {} - - /// copy constructor - eoESFullChrom( const eoESFullChrom& _eo ): - eoVector ( _eo ), // ObjVar ( _eo.ObjVar ), - StdDev ( _eo.StdDev ), CorCff( _eo.CorCff ), verbose( _eo.verbose ), - ObjMin( _eo.ObjMin ), ObjMax(_eo.ObjMax ), StdDevInit( _eo.StdDevInit ) {} - - - /* another constructor, for compatibility reasons */ - eoESFullChrom(istream& _s) { cout << "Not Yet implemented\n";exit(1);}; - - /* And now the useful constructor: from a parser (should be in the - factory, if such a thing exists one day for eoESFullChrom - */ - eoESFullChrom(Parser & parser) : StdDev(0), CorCff(0) { - parser.AddTitle("Description of ES individuals"); - int num_genes, num_sigma; - bool correlated_mutations; - try { - num_genes = parser.getInt("-Io", "--NbObjVar", "2", - "Number of Object Variables" ); - num_sigma = parser.getInt("-Is", "--NbSigma", "1", - "Number of Standard Deviations" ); - correlated_mutations = parser.getBool("-Ic", "--Correlated", - "Correlated mutation?" ); - ObjMin = parser.getFloat("-Im", "--min", "0", - "Minimum value for object variables" ); - ObjMax = parser.getFloat("-IM", "--max", "1", - "Maximum value for object variables" ); - StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", - "Initial value for std. dev. (scaled by range)" ); - verbose = parser.getBool("-Iv", "--verbose", - "Verbose listing of ES individuals (mutation parameters"); - } - catch (exception & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - - // consistency tests - if (! num_sigma) { // no std dev??? EXCEPTION - throw invalid_argument( "No standard deviation: choose another representation please" ); - } - if (num_sigma > num_genes) { - cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; - num_sigma = num_genes; - // modify the Param value - so .status is OK - ostrstream sloc; - sloc << num_genes; - parser.setParamValue("--NbSigma", sloc.str()); - } - // adjust the sizes!!! - resize(num_genes); - if (num_sigma) - StdDev.resize(num_sigma); - if (correlated_mutations) { - if (num_sigma < num_genes) { - cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; - cout << "Though possible, this is a strange setting" << endl; - } - // nb of rotation angles: N*(N-1)/2 (in general!) - CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); - } - }; - - - /// Operator = - const eoESFullChrom& operator = ( const eoESFullChrom& _eo ) { - if ( this != &_eo ) { - // Change EO part - eoVector::operator = (_eo); - - // Change this part - // ObjVar = _eo.ObjVar; - StdDev = _eo.StdDev; - CorCff = _eo.CorCff; - verbose = _eo.verbose; - ObjMin = _eo.ObjMin; - ObjMax = _eo.ObjMax; - StdDevInit = _eo.StdDevInit; - } - return *this; - } - - /// destructor - virtual ~eoESFullChrom() {} - - /// - double getStdDev( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading StdDev"); - return StdDev[ _i ]; - } - - /// - void setStdDev( unsigned _i, double _val ) { - if ( _i < length() ) { - StdDev[_i] = _val; - } else - throw out_of_range( "out_of_range when writing StdDev"); - } - - /// - double getCorCff( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading CorCff"); - return CorCff[ _i ]; - } - - /// - void setCorCff( unsigned _i, double _val ) { - if ( _i < length() ) { - CorCff[_i] = _val; - } else - throw out_of_range( "out_of_range when writing CorCff"); - } - - /// - void insertGene( unsigned _i, double _val ) { - throw FixedLengthChromosome(); - }; - - /// - void deleteGene( unsigned _i ) { - throw FixedLengthChromosome(); - }; - - /// - unsigned length() const { return size();}/* formerly ObjVar.size() */ - unsigned StdDevLength() const { return StdDev.size();} - unsigned CorCffLength() const { return CorCff.size();} - - - /** Print itself: inherited from eoObject implementation. - Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - copy( begin(), end(), ostream_iterator( _s, " ") ); - // The formatting instructinos shoudl be left to the caller - // _s << "\n"; - if (verbose) { - _s << "\n\tStd Dev. " ; - copy( StdDev.begin(), StdDev.end(), ostream_iterator( _s, " ") ); - if (CorCff.size()) { - _s << "\n\t"; - copy( CorCff.begin(), CorCff.end(), ostream_iterator( _s, " ") ); - } - } - }; - - /** This exception should be thrown when trying to insert or delete a gene - in a fixed length chromosome - */ - class FixedLengthChromosome : public exception { - - public: - /** - * Constructor - */ - FixedLengthChromosome() - : exception() { }; - - ~FixedLengthChromosome() {}; - }; - - // accessors - double getObjMin() const {return ObjMin;} - double getObjMax() const {return ObjMax;} - double getStdDevInit () const {return StdDevInit;} - - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoESFullChrom";}; - -private: - // vector ObjVar; /* object variable vector */ -// or shoudl the class be subclass of EOVector ??? - - vector StdDev; /* standard deviation vector */ - vector CorCff; /* correlation coefficient vector */ - - bool verbose; /* Print std deviations or not */ - - /** the range is used for mutation AND random initialization, - * while the StdDevInit is used only for random initialization - * this in a little inconsistent! - */ - double ObjMin, ObjMax; /* Range for Object variables */ - double StdDevInit; /* Initial value of Standard Deviations */ - -}; - -#endif - - diff --git a/eo/src/eoESFullMut.h b/eo/src/eoESFullMut.h deleted file mode 100644 index 37b6c4724..000000000 --- a/eo/src/eoESFullMut.h +++ /dev/null @@ -1,253 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESMute.h : ES mutation -// (c) GeNeura Team, 1998 for the EO part -// Th. Baeck 1994 and EEAAX 1999 for the ES part -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - marc.schoenauer@polytechnique.fr - http://eeaax.cmap.polytchnique.fr/ - */ -//----------------------------------------------------------------------------- - - -#ifndef _EOESMUT_H -#define _EOESMUT_H - -#include -#include -#include // for exp - -#include -#include - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795 -#endif - -const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ -// should not be a parameter ... - -/** ES-style mutation in the large: Obviously, valid only for eoESInd -*/ -template -class eoESMutate: public eoMonOp< eoESFullChrom > { -public: - eoESMutate(double n) - { - TauLcl = 1/sqrt(2*sqrt(n)); - TauGlb= 1 / sqrt(2 * n); - TauBeta = 0.0873; - }/// - - eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) - : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), - TauBeta(_TauBeta) {}; - - /* The parser constructor - */ - eoESMutate(Parser & parser, unsigned _stdDevLength, unsigned _size, bool _correlated ): - eoMonOp< eoESFullChrom >( ) { - parser.AddTitle("Parameters of ES mutation (before renormalization)"); - try { // we know that there is at least 1 std dev. - if (_stdDevLength == 1) { - TauLcl = parser.getInt("-Ml", "--TauLcl", "1", - "TauLcl, Mutation rate for the only Std Dev." ); - // different normalization in that case -- Thomas Baeck - TauLcl /= sqrt((double) _size); - } - else { /* more than 1 std dev */ - TauLcl = parser.getFloat("-Ml", "--TauLcl", "1", - "Local mutation rate for Std Dev." ); - TauGlb = parser.getFloat("-Mg", "--TauGlb", "1", - "Global mutation rate for Std Dev." ); - // renormalization - TauLcl /= sqrt( 2.0 * sqrt( (double)_size ) ); - TauGlb /= sqrt( 2.0 * ( (double) _size ) ); - - if ( _correlated ) { // Correlated Mutations - TauBeta = parser.getFloat("-Mb", "--TauBeta", "0.0873", - "Mutation rate for corr. coeff." ); - // rotation angles: no normalization - } - } - } - catch (exception & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - }; - - /// needed virtual dtor - virtual ~eoESMutate() {}; - - // virtual separation depending wether correlated mutations are present - virtual void operator() ( eoESFullChrom & _eo ) const { - if (_eo.CorCffLength()) - CorrelatedMutation(_eo); - else - StandardMutation(_eo); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoESMutate";}; - -private: - /// mutations - standard et correlated - // ========= - /* - * Standard mutation of object variables and standard - * deviations in ESs. - * If there are fewer different standard deviations available - * than the dimension of the objective function requires, the - * last standard deviation is responsible for ALL remaining - * object variables. - * Schwefel 1977: Numerische Optimierung von Computer-Modellen - * mittels der Evolutionsstrategie, pp. 165 ff. - */ - - virtual void StandardMutation( eoESFullChrom & _eo ) const { - unsigned i,k; - double Glb, StdLoc; - - if (_eo.StdDevLength() == 1) { /* single StdDev -> No global factor */ - StdLoc = _eo.getStdDev(0); - StdLoc *= exp(TauLcl*rng.normal()); - if (StdLoc < ES_SIGEPS) - StdLoc = ES_SIGEPS; - _eo.setStdDev(0, StdLoc); - _eo.setGene( 0, _eo.getGene(0) + StdLoc*rng.normal()); - i = 1; - } - else { /* more than one std dev. */ - Glb = exp(TauGlb*rng.normal()); - for (i = 0; i < _eo.length() && i < _eo.StdDevLength(); i++) { - StdLoc = _eo.getStdDev(i); - StdLoc *= Glb * exp(TauLcl*rng.normal()); - if (StdLoc < ES_SIGEPS) - StdLoc = ES_SIGEPS; - _eo.setStdDev(i, StdLoc); - _eo.setGene( i, _eo.getGene(i) + StdLoc*rng.normal()); - } - } - // last object variables: same STdDev than the preceding one - for (k = i; k < _eo.length(); k++) { - _eo.setGene( k, _eo.getGene(k) + StdLoc*rng.normal() ); - } - } - - /* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ - - // Code from Thomas Baeck - - virtual void CorrelatedMutation( eoESFullChrom & _eo ) const { - - - int i, k, n1, n2, nq; - - double d1, d2, S, C, Glb; - double tmp; - /* - * First: mutate standard deviations (as above). - */ - - Glb = exp(TauGlb*rng.normal()); - for (i = 0; i < _eo.StdDevLength(); i++) { - tmp = _eo.getStdDev(i); - _eo.setStdDev( i, tmp*Glb*exp(TauLcl*rng.normal()) ); - } - - /* - * Mutate rotation angles. - */ - - for (i = 0; i < _eo.CorCffLength(); i++) { - tmp = _eo.getCorCff(i); - tmp += TauBeta*rng.normal(); - // danger of VERY long loops --MS-- - // while (CorCff[i] > M_PI) - // CorCff[i] -= 2.0 * M_PI; - // while (CorCff[i] < - M_PI) - // CorCff[i] += 2.0 * M_PI; - if ( fabs(tmp) > M_PI ) { - tmp -= M_PI * (int) (tmp/M_PI) ; - } - _eo.setCorCff(i, tmp); - } - - /* - * Perform correlated mutations. - */ - vector VarStp(_eo.size()); - for (i = 0; i < _eo.size() && i < _eo.StdDevLength(); i++) - VarStp[i] = _eo.getStdDev(i)*rng.normal(); - for (k = i; k < _eo.size(); k++) - VarStp[k] = _eo.getStdDev(i-1)*rng.normal(); - nq = _eo.CorCffLength() - 1; - for (k = _eo.size()-_eo.StdDevLength(); k < _eo.size()-1; k++) { - n1 = _eo.size() - k - 1; - n2 = _eo.size() - 1; - for (i = 0; i < k; i++) { - d1 = VarStp[n1]; - d2 = VarStp[n2]; - S = sin( _eo.getCorCff(nq) ); - C = cos( _eo.getCorCff(nq) ); - VarStp[n2] = d1 * S + d2 * C; - VarStp[n1] = d1 * C - d2 * S; - n2--; - nq--; - } - } - for (i = 0; i < _eo.size(); i++) - _eo[i] += VarStp[i]; - - } - // the data - //========= - double TauLcl; /* Local factor for mutation of std deviations */ - double TauGlb; /* Global factor for mutation of std deviations */ - double TauBeta; /* Factor for mutation of correlation parameters */ -}; - -/* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ -// Not yet implemented! - -#endif - diff --git a/eo/src/eoException.h b/eo/src/eoException.h deleted file mode 100644 index 31c095993..000000000 --- a/eo/src/eoException.h +++ /dev/null @@ -1,72 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoException.h - Exceptions that are possibly thrown at initialization and such should be - defined here. - - (c) GeNeura Team, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoException_h -#define eoException_h - -#include - -#include "eoObject.h" - -struct eoException -{ - eoException() {} - eoException(const eoObject& caller) : who_caught_it(caller.className()) {} - virtual ~eoException(){} // otherwise compiler complains - std::string who(void) const { return who_caught_it; } - virtual std::string what(void) const{ return "";} - -private : - std::string who_caught_it; -}; - -struct eoFitnessException : public eoException -{ - eoFitnessException() : eoException() {} - eoFitnessException(const eoObject& caller) : eoException(caller) {} - virtual ~eoFitnessException(){} // otherwise compiler complains -}; - -struct eoNegativeFitnessException : public eoFitnessException -{ - eoNegativeFitnessException() : eoFitnessException() {} - eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {} - - virtual ~eoNegativeFitnessException(){} // otherwise compiler complains - std::string what(void) const { return "negative fitness encountered"; } -}; - -struct eoMinimizingFitnessException : public eoFitnessException -{ - eoMinimizingFitnessException() : eoFitnessException() {} - eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {} - virtual ~eoMinimizingFitnessException(){} // otherwise compiler complains - - std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; } -}; - -#endif diff --git a/eo/src/eoParser.h b/eo/src/eoParser.h deleted file mode 100644 index 013699132..000000000 --- a/eo/src/eoParser.h +++ /dev/null @@ -1,838 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -/* eoParser.h - some classes to parser either the command line or a parameter file - - (c) Marc Schoenauer and Geneura team, 1999 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _PARSER_H -#define _PARSER_H - -#include // for strcasecmp ... maybe there's a c++ way of doing it? - // Yep there is, but needs either a simple functor for the equal function - // or a hand-rolled string template class (this isn't that horrible as - // it sounds, it just means a new string_traits class with two changed - // function definitions. (Maarten) -#ifdef _MSC_VER -#define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) -#endif - -// STL includes -#include -#include -#include -#include -#include -#include - -// include for exceptions -#include // logic_error - -//----------------------------------------------------------------------------- -// Class Param -//----------------------------------------------------------------------------- - -/** - * A param repesents an argument that can be passed to a program in the command line - */ -class Param { -public: - - /** - * Type of params - */ - enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; - - /** - * Construct an Param. - * @param _shortName Short name of the argument - * @param _longName Long name of the argument - * @param _default The default value - * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) - * @param _description Description of the parameter. What is useful for. - * @param _required If it is a necessary parameter or not - */ - Param (string _shortName="-h", string _longName="--help", - string _default = "", valueType _valType= STRING, - string _description="Shows this help", - bool _required=false ) - : repShortName(_shortName), repLongName(_longName), - repDescription(_description ), repEnv(""), repDefault(_default), - repValue(_default), repValType( _valType), - repRequired( _required), repChanged(false) { - - const char *c = repLongName.c_str(); - for(unsigned i=0; i getArray (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); - parse( param ); - params.push_back( param ); - - istrstream is(param.value().c_str()); - vector retValue; - string tmpStr; - - is >> tmpStr; - while(is){ - retValue.push_back(tmpStr); - is >> tmpStr; - } - return retValue; - }; - - /** - * Gets the int value of a param given the full description of the parameter - * @param see above - * @exception BadType if the param's value isn't a correct int - */ - - int getInt (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - int retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the unsigned lon value of a param given ... - * @param see above - * @exception BadType if the param's value isn't a correct unsigned long - */ - - int getUnsignedLong (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - unsigned long retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the float value of a param given the description of the parameter - * @param see above - * @exception BadType if the param's value isn't a correct int - */ - - float getFloat (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - float retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - - string parse_string (istream & _is) { - string paramValue; - _is >> paramValue; - //if the first character of the string or array is not a " => just one word or array-element. - if( paramValue[0] != '\"' ) - return paramValue; - - if( paramValue[1] == '\"' ) // the empty string - return "" ; - - //else => read until the next " (the end of the string). - const char *c = paramValue.c_str(); - string tmpStr = c+1;// skip the " - if (tmpStr[tmpStr.length()-1] == '\"') { // one word only - //tmpStr[tmpStr.length()-1] = '\0'; - tmpStr.erase( &tmpStr[tmpStr.length()-1] ); - return tmpStr; - } - - bool stop = false; - while (_is && !stop) { - _is >> paramValue; - // test last character of paramValue for " - if (paramValue[paramValue.length()-1] == '\"') { - paramValue.erase( ¶mValue[paramValue.length()-1] ); - //paramValue[paramValue.length()-1] = '\0'; - stop = true; - } - tmpStr = tmpStr + " " + paramValue ; - } - return tmpStr; - }; - - - void parse (Param & param) { - int i; - string tmpStr, ReadStr, FirstWord; - - // FIRST: look if the associated environment variables have any value, to use them. - if( getenv( param.environment().c_str() ) ) { - //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; - if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || - ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) - ) { // found the keyword - - Param::valueType tmp = param.valType(); - switch ( tmp ) { - case Param::TITLE: - cerr << "Error, we should not be there" << endl; - exit(1); - break; - case Param::BOOL : - param.value("true" ); - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - is >> tmpStr; - param.value(tmpStr); - break; - - case Param::STRING: - tmpStr = parse_string(is); - param.value(tmpStr); - break; - - case Param::ARRAY: - ReadStr = parse_string(is); - if ( ReadStr != "<" ) { // no "<" ">" --> a single string in the array - param.value(ReadStr); - break; - } - // read next word - and keep it in case of <> mismatch - FirstWord = parse_string(is); - // test for empty array - if (FirstWord == ">") { - param.value(""); - break; - } - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_string(is); - while ( is && (ReadStr != ">") ) { - tmpStr = tmpStr + " " + ReadStr; - ReadStr = parse_string(is); - } - - if (!is) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string - } - else - param.value(tmpStr); - break; - } - } - } - } - - - // LAST (highest priority) parse the command line arguments - for (i=1 ; i" --> a single string in the array - param.value(ReadStr); - }else{ - // read next word - and keep it in case of <> mismatch - FirstWord = parse_argv[i++]; - - // test for empty array - if (FirstWord == ">") { - param.value(""); - }else{ - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_argv[i++]; - while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string - }else{ - param.value(tmpStr); - } - } - } - } - } - break; - } - - //MS after trying all possibilities, and if the value has not changed - // though the parameter was required, protest! - if (param.required() && !param.changed()) - throw Parser::MissingReqParam(param.shortName()); - - }; - - /** - * Sets a new value for a param given its short name or its long name. - * @param _name One of the names of the param. - * @param _value Value to be assigned. - * @exception UnknownArg if the param doesn't exist - * @exception MissingVal if the param hasn't got a value - */ - Param::valueType setParamValue (const string& _name, const char* _value){ - vector::iterator pos; - - for (pos=params.begin() ; pos!=params.end() ; pos++) - if (pos->shortName()==_name || pos->longName()==_name) - break; - - // if found ... - if (pos!=params.end()) { - switch ( pos->valType() ) { - case Param::TITLE: - cerr << "Error, we should not be there" << endl; - exit(1); - break; - case Param::BOOL : - pos->value("true"); - break; - case Param::ARRAY : - case Param::INT: - case Param::UL: - case Param::FLOAT: - case Param::STRING: - if (_value != NULL){ - pos->value(_value); - }else{ - throw Parser::MissingVal(_name); - return Param::BOOL; - } - break; - } // switch - - return pos->valType(); - - }else{ - throw Parser::UnknownArg(_name); - return Param::BOOL; - } - }; - - /// the output method - generate the .status file (unless other name is given) - friend ostream & operator<< ( ostream & os, Parser & _parser ) - { - vector::iterator p; - //print every param with its value - for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { - switch ( p->valType() ) { - case Param::BOOL : - if( p->value() == (string) "true") - os << p->longName(); - else - os << "#" << p->longName() ; // so the name of the bool is commented out - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - os << p->longName()<<" "<value(); - break; - - case Param::ARRAY : - os << p->longName() << " < " << p->value().c_str() << " >" ; - break; - case Param::STRING: - os << p->longName()<<" \""<value().c_str()<<"\" "; - break; - case Param::TITLE: - os << endl; // Title is in the description below - break; - } // switch - os << "\t #" << p->shortName() << " : " << p->description(); - if (p->valType() != Param::TITLE) - os << " [" << p->defValue() << "]" ; - os << endl; - } - return os; - }; - - /** - * Prints out the list of parameters in the output file (if specified) - */ - void outputParam(string _OutputFile="") - { - if (_OutputFile == "") { - _OutputFile = parse_argv[0]; - _OutputFile += ".status"; - } - - ofstream os(_OutputFile.c_str()); - os << "Parameters used by \"" << programName << "\" (" - << programDescription << ")" << endl << endl; - os << *this; - }; - - /** - * Prints an automatic help in the standard output using the information - * provided by parameters - */ - void printHelp() { - vector::iterator p; - // unsigned i; - - // print program name and description - cout << this->programName <<": "<valType() != Param::TITLE ) { - // if( p->valType() != Param::BOOL ){ - // cout << ( (!p->required())?"[":""); - // cout <shortName()<<" value"<required())?"]":"")<<" "; - // }else{ - // cout << "["<shortName()<<"] "; - // } - // } // for p - cout << "Where:"<valType() != Param::TITLE ) { - // Victor: 04-Jan-2000 - // Modified because the - and -- prefixes are not needed. - /* - cout << "-" << p->shortName() - <<", --"<longName()<<":\t" - <description()<shortName() - <<", " << p->longName()<<":\t" - <description()<valType() ) { - case Param::INT: cout <<"Integer"; break; - case Param::UL: cout <<"Unsigned Long Integer"; break; - case Param::FLOAT: cout <<"Float"; break; - case Param::STRING: cout <<"String"; break; - case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; - case Param::BOOL: cout << "Flag"; break; - case Param::TITLE: break; - } // switch - if(p->valType() == Param::BOOL) - cout << ") True if present" << endl; - else - cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<description() << endl; - } - } // for p - cout << endl; - }; - - /** - * This class managges unknown argument exceptions. - */ - class UnknownArg : public logic_error { - public: - - /** - * Constructor - * @param _arg string to be shown when the exception occurs - */ - UnknownArg( const string& _arg): logic_error( "Invalid argument: "+_arg ) { }; - }; - - /** - * This class managges bad param types. - */ - class BadType : public logic_error { - public: - - /** - * Constructor - * @param _param The param - * @param _value The value of the param - */ - BadType(const string& _param, const string& _value, const string& _correctType) - : logic_error("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; - }; - - /** - * This class managges exceptions produced when there isn't a value for a parameter. - */ - class MissingVal : public logic_error { - public: - - /** - * Constructor - * @param _param The param - */ - MissingVal(const string& _param) : logic_error("Missing value for parameter " + _param) {}; - }; - - /** - * This class managges exceptions produced when the user forgot a required parameter. - */ - class MissingReqParam : public logic_error { - public: - - /** - * Constructor - * @param _shortName The param's short name - */ - MissingReqParam(const string& _shortName) : logic_error("Missing required parameter " + _shortName) {}; - }; - - /** - * This class managges exceptions du to < without a > in array value - */ - class BadArrayParam : public logic_error { - public: - - /** - * Constructor - * @param _param The param - * @param _first_word The first word read after the "<" - */ - BadArrayParam(const string& _param, const string &_first_word) : - logic_error("Array parameter " + _param + ": No matching > (" + _first_word - + "... )") {}; - }; - - void createParamFile( ostream& _os ) { - vector::iterator p; - for ( p=params.begin(); p!=params.end(); p++ ) { - switch( p->valType() ) { - case Param::TITLE: - _os << endl << "# -- "; - break; - case Param::BOOL: - _os << ((p->value()=="true" )?"":"#") - << p->longName(); - break; - case Param::STRING: - _os << p->longName()<<"\t\""<value()<<"\""; - break; - case Param::ARRAY: - _os << p->longName()<<"\t< "<value()<<" >"; - break; - default: - _os << p->longName()<<"\t"<value(); - break; - } // switch - _os << "\t #" << p->description() << endl; - } - } -private: - vector params; - string programName; - string programDescription; - int parse_argc; - char **parse_argv; - string InputFileName; - -}; - - - - -#endif diff --git a/eo/src/eoParserUtils.cpp b/eo/src/eoParserUtils.cpp deleted file mode 100644 index 084af77c6..000000000 --- a/eo/src/eoParserUtils.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// See eoParserUtils.h - -#include -#include -/// Reproducible random seed - -// For the Mersenne-Twister used in EO, the entire rng needs to be saved - -//---------------------------------- -void InitRandom( Parser & parser) { -//---------------------------------- - unsigned long _seed; - try { - _seed = parser.getUnsignedLong("-S", "--seed", "0", - "Seed for Random number generator" ); - } - catch (logic_error & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - - if (_seed == 0) { // use clock to get a "random" seed - _seed = (unsigned long)( time( 0 ) ); - ostrstream s; - 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. - rng.reseed(_seed); - - return; -} - diff --git a/eo/src/eoParserUtils.h b/eo/src/eoParserUtils.h deleted file mode 100644 index 4bd8dc456..000000000 --- a/eo/src/eoParserUtils.h +++ /dev/null @@ -1,24 +0,0 @@ -/*------------------------------------------------------- -File..........: eoParserUtils.h -Author........: Geneura Team, Marc Shoenauer - (this file: Victor Rivas, vrivas@ujaen.es) -Date..........: 17-Dec-1999 -Description...: Some useful things that use eoParser. -Modifications.: -------------------- 1 ------------------- - Author.......: - Date.........: - Description..: -*/ - -#ifndef EO_PARSER_UTILS -#define EO_PARSER_UTILS - -#include -#include -/// Reproducible random seed - -//---------------------------------- -void InitRandom( Parser & parser); -//---------------------------------- -#endif diff --git a/eo/src/eoProblem.h b/eo/src/eoProblem.h deleted file mode 100644 index 5c219123e..000000000 --- a/eo/src/eoProblem.h +++ /dev/null @@ -1,45 +0,0 @@ -//----------------------------------------------------------------------------- - -// eoProblem.h - -// (c) GeNeura Team 1998 - -/* - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPROBLEM_H -#define EOPROBLEM_H - -//----------------------------------------------------------------------------- - -template class Problem -{ - public: - typedef T Chrom; - typedef typename T::Gene Gene; - typedef typename T::Fitness Fitness; - - virtual Fitness operator()(const Chrom& chrom) = 0; -}; - -//----------------------------------------------------------------------------- - -#endif EOPROBLEM_H - diff --git a/eo/src/eoRNG.h b/eo/src/eoRNG.h deleted file mode 100644 index 215012359..000000000 --- a/eo/src/eoRNG.h +++ /dev/null @@ -1,453 +0,0 @@ -/* -* Random number generator adapted from (see comments below) -* -* The random number generator is modified into a class -* by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller -* transformation to generate normal deviates. -* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -/* ************ DOCUMENTATION IN ORIGINAL FILE *********************/ - -// This is the ``Mersenne Twister'' random number generator MT19937, which -// generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) -// starting from any odd seed in 0..(2^32 - 1). This version is a recode -// by Shawn Cokus (Cokus@math.washington.edu) on March 8, 1998 of a version by -// Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in -// July-August 1997). -// -// Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha -// running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to -// generate 300 million random numbers; after recoding: 24.0 sec. for the same -// (i.e., 46.5% of original time), so speed is now about 12.5 million random -// number generations per second on this machine. -// -// According to the URL -// (and paraphrasing a bit in places), the Mersenne Twister is ``designed -// with consideration of the flaws of various existing generators,'' has -// a period of 2^19937 - 1, gives a sequence that is 623-dimensionally -// equidistributed, and ``has passed many stringent tests, including the -// die-hard test of G. Marsaglia and the load test of P. Hellekalek and -// S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 -// to 5012 bytes of static data, depending on data type sizes, and the code -// is quite short as well). It generates random numbers in batches of 624 -// at a time, so the caching and pipelining of modern systems is exploited. -// It is also divide- and mod-free. -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Library General Public License as published by -// the Free Software Foundation (either version 2 of the License or, at your -// option, any later version). This library is distributed in the hope that -// it will be useful, but WITHOUT ANY WARRANTY, without even the implied -// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU Library General Public License for more details. You should have -// received a copy of the GNU Library General Public License along with this -// library; if not, write to the Free Software Foundation, Inc., 59 Temple -// Place, Suite 330, Boston, MA 02111-1307, USA. -// -// The code as Shawn received it included the following notice: -// -// Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When -// you use this, send an e-mail to with -// an appropriate reference to your work. -// -// It would be nice to CC: when you write. -// - -// -// uint32 must be an unsigned integer type capable of holding at least 32 -// bits; exactly 32 should be fastest, but 64 is better on an Alpha with -// GCC at -O3 optimization so try your options and see what's best for you -// - -/* ************ END DOCUMENTATION IN ORIGINAL FILE *********************/ - - -#ifndef EO_RANDOM_NUMBER_GENERATOR -#define EO_RANDOM_NUMBER_GENERATOR - -#include - -#include -#include - -// TODO: check for various compilers if this is exactly 32 bits -// Unfortunately MSVC's preprocessor does not comprehends sizeof() -// so neat preprocessing tricks will not work - -typedef unsigned long uint32; // Compiler and platform dependent! - -//----------------------------------------------------------------------------- -// eoRng -//----------------------------------------------------------------------------- -/** -eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 -for generating random numbers. The various member functions implement useful functions -for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). - -Note for people porting EO to other platforms: please make sure that the typedef -uint32 in the file eoRng.h is exactly 32 bits long. It may be longer, but not -shorter. If it is longer, file compatibility between EO on different platforms -may be broken. -*/ -class eoRng : public eoObject, public eoPersistent -{ -public : - /** - ctor takes a random seed; if you want another seed, use reseed - @see reseed - */ - - eoRng(uint32 s = (uint32) time(0) ) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { - state = new uint32[N+1]; - initialize(s); - } - - ~eoRng(void) - { - delete [] state; - } - - /** - Re-initializes the Random Number Generator. - */ - void reseed(uint32 s) - { - initialize(s); - } - - /** - uniform(m = 1.0) returns a random double in the range [0, m) - */ - double uniform(double m = 1.0) - { // random number between [0, m] - return m * double(rand()) / double(rand_max()); - } - - /** - random() returns a random integer in the range [0, m) - */ - uint32 random(uint32 m) - { - return uint32(uniform() * double(m)); - } - - /** - flip() tosses a biased coin such that flip(x/100.0) will - returns true x% of the time - */ - bool flip(float bias) - { - return uniform() < bias; - } - - /** - normal() zero mean gaussian deviate with standard deviation of 1 - */ - double normal(void); // gaussian mutation, stdev 1 - - /** - normal(stdev) zero mean gaussian deviate with user defined standard deviation - */ - double normal(double stdev) - { - return stdev * normal(); - } - - /** - normal(mean, stdev) user defined mean gaussian deviate with user defined standard deviation - */ - double normal(double mean, double stdev) - { - return mean + normal(stdev); - } - - /** - rand() returns a random number in the range [0, rand_max) - */ - uint32 rand(); - - /** - rand_max() the maximum returned by rand() - */ - uint32 rand_max(void) const { return (uint32) 0xffffffff; } - - /** - roulette_wheel(vec, total = 0) does a roulette wheel selection - on the input vector vec. If the total is not supplied, it is - calculated. It returns an integer denoting the selected argument. - */ - template - int roulette_wheel(const std::vector& vec, T total = 0) - { - if (total == 0) - { // count - for (unsigned i = 0; i < vec.size(); ++i) - total += vec[i]; - } - - float change = uniform() * total; - - int i = 0; - - while (change > 0) - { - change -= vec[i++]; - } - - return --i; - } - - /// - void printOn(ostream& _os) const - { - for (int i = 0; i < N; ++i) - { - _os << state[i] << ' '; - } - _os << int(next - state) << ' '; - _os << left << ' ' << cached << ' ' << cacheValue; - } - - /// - void readFrom(istream& _is) - { - for (int i = 0; i < N; ++i) - { - _is >> state[i]; - } - - int n; - _is >> n; - next = state + n; - - _is >> left; - _is >> cached; - _is >> cacheValue; - } - - -private : - uint32 restart(void); - void initialize(uint32 seed); - - uint32* state; // the array for the state - uint32* next; - int left; - - bool cached; - float cacheValue; - - const int N; - const int M; - const uint32 K; // a magic constant - - /** - Private copy ctor and assignment operator to make sure that - nobody accidentally copies the random number generator. - If you want similar RNG's, make two RNG's and initialize - them with the same seed. - */ - eoRng (const eoRng&); // no implementation - eoRng& operator=(const eoRng&); // dito -}; - -/** - The one and only global eoRng object -*/ -extern eoRng rng; - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -// Implementation of some eoRng members.... Don't mind the mess, it does work. - - -#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u -#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u -#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u -#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v - -inline void eoRng::initialize(uint32 seed) - { - // - // We initialize state[0..(N-1)] via the generator - // - // x_new = (69069 * x_old) mod 2^32 - // - // from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's - // _The Art of Computer Programming_, Volume 2, 3rd ed. - // - // Notes (SJC): I do not know what the initial state requirements - // of the Mersenne Twister are, but it seems this seeding generator - // could be better. It achieves the maximum period for its modulus - // (2^30) iff x_initial is odd (p. 20-21, Sec. 3.2.1.2, Knuth); if - // x_initial can be even, you have sequences like 0, 0, 0, ...; - // 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; 2^29, 2^29 + 2^31, - // 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd below. - // - // Even if x_initial is odd, if x_initial is 1 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 0, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , - // ... - // - // and if x_initial is 3 mod 4 then - // - // the lowest bit of x is always 1, - // the next-to-lowest bit of x is always 1, - // the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , - // the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , - // the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , - // ... - // - // The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is - // 16, which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It - // also does well in the dimension 2..5 spectral tests, but it could be - // better in dimension 6 (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). - // - // Note that the random number user does not see the values generated - // here directly since restart() will always munge them first, so maybe - // none of all of this matters. In fact, the seed values made here could - // even be extra-special desirable if the Mersenne Twister theory says - // so-- that's why the only change I made is to restrict to odd seeds. - // - - left = -1; - - register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; - register int j; - - for(left=0, *s++=x, j=N; --j; - *s++ = (x*=69069U) & 0xFFFFFFFFU); - } - - -inline uint32 eoRng::restart(void) -{ - register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; - register int j; - - left=N-1, next=state+1; - - for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - for(pM=state, j=M; --j; s0=s1, s1=*p2++) - *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - - s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - s1 ^= (s1 >> 11); - s1 ^= (s1 << 7) & 0x9D2C5680U; - s1 ^= (s1 << 15) & 0xEFC60000U; - return(s1 ^ (s1 >> 18)); -} - - -inline uint32 eoRng::rand(void) - { - uint32 y; - - if(--left < 0) - return(restart()); - - y = *next++; - y ^= (y >> 11); - y ^= (y << 7) & 0x9D2C5680U; - y ^= (y << 15) & 0xEFC60000U; - return(y ^ (y >> 18)); - } - -inline double eoRng::normal(void) -{ - if (cached) - { - cached = false; - return cacheValue; - } - - float rSquare, factor, var1, var2; - - do - { - var1 = 2.0 * uniform() - 1.0; - var2 = 2.0 * uniform() - 1.0; - - rSquare = var1 * var1 + var2 * var2; - } - while (rSquare >= 1.0 || rSquare == 0.0); - - factor = sqrt(-2.0 * log(rSquare) / rSquare); - - cacheValue = var1 * factor; - cached = true; - - return (var2 * factor); -} - -#endif - diff --git a/eo/src/eoString.h b/eo/src/eoString.h deleted file mode 100644 index d1ba55b44..000000000 --- a/eo/src/eoString.h +++ /dev/null @@ -1,148 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoString.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoString_H -#define _eoString_H - -// STL libraries -#include -#include - -using namespace std; - -// EO headers -#include - -//----------------------------------------------------------------------------- -// eoString -//----------------------------------------------------------------------------- - -/** Adaptor that turns an STL string into an EO */ -template -class eoString: public eo1d, public string { -public: - - /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator - //@{ - /// ctor - eoString( const string& _str ="" ) - : eo1d(), string( _str ) {}; - - - /** Ctor using a random number generator - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called - */ - eoString( unsigned _size, eoRnd& _rnd ) - : eo1d(), string(){ - for ( unsigned i = 0; i < _size; i ++ ) { - *this += _rnd(); - } - }; - - /** Ctor from a stream - @param _s input stream - */ - eoString( istream & _s ) - : eo1d(){ - _s >> *this; - }; - - /// copy ctor - eoString( const eoString& _eoStr ) - :eo1d( static_cast & > ( _eoStr ) ), - string( _eoStr ){}; - - /// Assignment operator - const eoString& operator =( const eoString& _eoStr ) { - if ( this != & _eoStr ) { - eo1d::operator = ( _eoStr ); - string::operator = ( _eoStr ); - } - return *this; - } - - /// dtor - virtual ~eoString() {}; -//@} - - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual char getGene( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading gene"); - return (*this)[_i]; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void setGene( unsigned _i, const char& _value ) { - if ( _i >= size() ) - throw out_of_range( "out_of_range when writing a gene"); - (*this)[_i] = _value; - }; - - /** Inserts a value after _i, displacing anything to the right - @exception out_of_range if _i is larger than EO´s size - */ - virtual void insertGene( unsigned _i, char _val ) { - if (_i <= this->size() ) { - string::iterator i = this->begin()+_i; - this->insert( i, _val ); - } else - throw out_of_range( "out_of_range when inserting gene"); - }; - - /** Eliminates the gene at position _i - @exception out_of_range if _i is larger than EO´s size - */ - virtual void deleteGene( unsigned _i ) { - if (_i < this->size() ) { - string::iterator i = this->begin()+_i; - this->erase( i ); - } else - throw out_of_range( "out_of_range when deleting gene"); - }; - - /// methods that implement the EO protocol - virtual unsigned length() const { return this->size(); }; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoString";}; - //@} - - -}; - -#endif - diff --git a/eo/src/eoStringMutation.h b/eo/src/eoStringMutation.h deleted file mode 100644 index 5cebc8ebc..000000000 --- a/eo/src/eoStringMutation.h +++ /dev/null @@ -1,78 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoStringMutation.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOSTRINGMUTATION_H -#define _EOSRTINGMUTATION_H - -#include -// EO includes -#include -#include -#include - -/** Mutation of an eoString. - The eoString's genes are changed by adding or substracting 1 to -*/ - -template -class eoStringMutation: public eoMutation { - public: - - /// - eoStringMutation(const double _rate=0.0) : eoMutation< EOT >(_rate) {}; - - /// - virtual ~eoStringMutation() {}; - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoStringMutation";}; - //@} - - - private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. - virtual void applyAt( EOT& _eo, unsigned _i ) const { - eoUniform uniform( 0, 1 ); - if( rate < uniform() ) { - _eo.gene(_i) += ( uniform()>=0.5 )? (1) : (-1) ; - } - } - -}; - -//----------------------------------------------------------------------------- - -#endif diff --git a/eo/src/rnd_generators.h b/eo/src/rnd_generators.h deleted file mode 100644 index 5074af013..000000000 --- a/eo/src/rnd_generators.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - rnd_generators.h - Some utility functors for generating random generators: - uniform_generator : generates uniform floats or doubles - random_generator : generates unsigneds, ints etc. - normal_generator : normally distributed floats or doubles - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -//----------------------------------------------------------------------------- - -#ifndef eoRND_GENERATORS_H -#define eoRND_GENERATORS_H - -#include "eoRNG.h" - -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - -#endif diff --git a/eo/src/selectors.h b/eo/src/selectors.h deleted file mode 100644 index db111a50e..000000000 --- a/eo/src/selectors.h +++ /dev/null @@ -1,313 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - selectors.h - A bunch of useful selector functions. They generally have three forms: - - template - It select(It begin, It end, params, eoRng& gen = rng); - - template - const EOT& select(const eoPop& pop, params, eoRng& gen = rng); - - template - EOT& select(eoPop& pop, params, eoRng& gen = rng); - - where select is one of: roulette_wheel, deterministic_tournament - and stochastic_tournament (at the moment). - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef SELECT__H -#define SELECT__H - -#include "eoRNG.h" -#include "eoException.h" - -template -bool minimizing_fitness() -{ - EOT eo1; // Assuming people don't do anything fancy in the default constructor! - EOT eo2; - - /* Dear user, when the two line below do not compile you are most - likely not working with scalar fitness values. In that case we're sorry - but you cannot use lottery or roulette_wheel selection... - */ - eo1.fitness(0.0); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this - eo2.fitness(1.0); - - return eo2 < eo1; // check whether we have a minimizing fitness -}; - -inline double scale_fitness(const std::pair& _minmax, double _value) -{ - if (_minmax.first == _minmax.second) - { - return 0.0; // no differences in fitness, population converged! - } - // else - - return (_value - _minmax.first) / (_minmax.second - _minmax.first); -} - -template -double sum_fitness(It begin, It end) -{ - double sum = 0.0; - - for (; begin != end; ++begin) - { - double v = static_cast(begin->fitness()); - if (v < 0.0) - throw eoNegativeFitnessException(); - sum += v; - } - - return sum; -} - -template -double sum_fitness(const eoPop& _pop) -{ - return sum_fitness(_pop.begin(), _pop.end()); -} - -template -double sum_fitness(const eoPop& _pop, std::pair& _minmax) -{ - eoPop::const_iterator it = _pop.begin(); - - _minmax.first = it->fitness(); - _minmax.second = it++->fitness(); - - for(; it != _pop.end(); ++it) - { - double v = static_cast(it->fitness()); - - _minmax.first = std::min(_minmax.first, v); - _minmax.second = std::max(_minmax.second, v); - - rawTotal += v; - } - - if (minimizing_fitness()) - { - std::swap(_minmax.first, _minmax.second); - } - - scaledTotal = 0.0; - - // unfortunately a second loop is neccessary to scale the fitness - for (it = _pop.begin(); it != _pop.end(); ++it) - { - double v = scale_fitness(static_cast(it->fitness())); - - scaledTotal += v; - } -} - -template -It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - It i = _begin; - - while (roulette > 0.0) - { - roulette -= static_cast(*(i++)); - } - - return --i; -} - -template -const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - eoPop::const_iterator i = _pop.begin(); - - while (roulette > 0.0) - { - roulette -= static_cast((i++)->fitness()); - } - - return *--i; -} - -template -EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - eoPop::iterator i = _pop.begin(); - - while (roulette > 0.0) - { - roulette -= static_cast((i++)->fitness()); - } - - return *--i; -} - -template -It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) -{ - It best = _begin + _gen.random(_end - _begin); - - for (unsigned i = 0; i < _t_size - 1; ++i) - { - It competitor = _begin + _gen.random(_end - _begin); - - if (*best < *competitor) - { - best = competitor; - } - } - - return best; -} - -template -const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) -{ - It worst = _begin + _gen.random(_end - _begin); - - for (unsigned i = 0; i < _t_size - 1; ++i) - { - It competitor = _begin + _gen.random(_end - _begin); - - if (competitor == worst) - { - --i; - continue; // try again - } - - if (*competitor < *worst) - { - worst = competitor; - } - } - - return worst; -} - -template -const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) -{ - It i1 = _begin + _gen.random(_end - _begin); - It i2 = _begin + _gen.random(_end - _begin); - - bool return_better = _gen.flip(_t_rate); - - if (*i1 < *i2) - { - if (return_better) return i2; - // else - - return i1; - } - else - { - if (return_better) return i1; - // else - } - // else - - return i2; -} - -template -const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) -{ - It i1 = _begin + _gen.random(_end - _begin); - It i2 = _begin + _gen.random(_end - _begin); - - bool return_worse = _gen.flip(_t_rate); - - if (*i1 < *i2) - { - if (return_worse) return i1; - // else - - return i2; - } - else - { - if (return_worse) return i2; - // else - } - // else - - return i1; -} - -template -const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - - -#endif From c4f6d9272f8cfa0f8bc1bc4e49ce89db57a39482 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:38:10 +0000 Subject: [PATCH 0136/2134] Configuration file for doxygen --- eo/doc/eo.cfg | 563 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 563 insertions(+) create mode 100644 eo/doc/eo.cfg diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg new file mode 100644 index 000000000..989b069e9 --- /dev/null +++ b/eo/doc/eo.cfg @@ -0,0 +1,563 @@ +# Doxyfile 1.1.1 + +# This file describes the settings to be used by doxygen for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of word surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = EO + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 0.9.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Dutch, French, Italian, Czech, Swedish, German and Japanese + +OUTPUT_LANGUAGE = English + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# If the EXTRACT_ALL tag is set to YES all classes and functions will be +# included in the documentation, even if no documentation was available. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members inside documented classes or files. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all +# undocumented classes. + +HIDE_UNDOC_CLASSES = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. + +STRIP_FROM_PATH = + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a class diagram (in Html and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. + +CLASS_DIAGRAMS = YES + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen +# will only generate file names in lower case letters. If set to +# YES upper case letters are also allowed. This is useful if you have +# classes or files whose names only differ in case and if your file system +# supports case sensitive file names. + +CASE_SENSE_NAMES = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the Javadoc-style will +# behave just like the Qt-style comments. + +JAVADOC_AUTOBRIEF = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# reimplements. + +INHERIT_DOCS = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../src + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +FILE_PATTERNS = *.cpp *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = eo + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# For now this is experimental and is disabled by default. The RTF output +# is optimised for Word 97 and may not look too pretty with other readers +# or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using a WORD or other. +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. + +MACRO_EXPANSION = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED tag. + +EXPAND_ONLY_PREDEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tagfiles. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to +# YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other +# documented files. + +INCLUDE_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO + +# The CGI_NAME tag should be the name of the CGI script that +# starts the search engine (doxysearch) with the correct parameters. +# A script with this name will be generated by doxygen. + +CGI_NAME = search.cgi + +# The CGI_URL tag should be the absolute URL to the directory where the +# cgi binaries are located. See the documentation of your http daemon for +# details. + +CGI_URL = + +# The DOC_URL tag should be the absolute URL to the directory where the +# documentation is located. If left blank the absolute path to the +# documentation, with file:// prepended to it, will be used. + +DOC_URL = + +# The DOC_ABSPATH tag should be the absolute path to the directory where the +# documentation is located. If left blank the directory on the local machine +# will be used. + +DOC_ABSPATH = + +# The BIN_ABSPATH tag must point to the directory where the doxysearch binary +# is installed. + +BIN_ABSPATH = /usr/local/bin/ + +# The EXT_DOC_PATHS tag can be used to specify one or more paths to +# documentation generated for other projects. This allows doxysearch to search +# the documentation for these projects as well. + +EXT_DOC_PATHS = From a5a4d65ab869242e97faae526c9765a5679114af Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 14:48:49 +0000 Subject: [PATCH 0137/2134] (re)moving... --- eo/contrib/eoAged.h | 109 ++++++++++++++++++++++++++++++++++++++++ eo/contrib/eoDrawable.h | 64 +++++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 eo/contrib/eoAged.h create mode 100644 eo/contrib/eoDrawable.h diff --git a/eo/contrib/eoAged.h b/eo/contrib/eoAged.h new file mode 100644 index 000000000..3211791df --- /dev/null +++ b/eo/contrib/eoAged.h @@ -0,0 +1,109 @@ +// eoAged.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAge.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOAGED_H +#define EOAGED_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoAge +//----------------------------------------------------------------------------- + +/** eoAge is a template class that adds an age to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +printOn, readFrom. +@see eoObject +*/ +template +class eoAged: public Object +{ + public: + /// Main ctor from an already built Object. + eoAged( const Object& _o): Object( _o ), age(0) {}; + + /// Copy constructor. + eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoAged() {}; + + + ///returns the age of the object + unsigned long Age() const {return age;} + + /// Increments age + const eoAged& operator ++ () { age++; return *this;} + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ +//@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual string className() const { return string("eoAged")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + Object::readFrom( _is ); + _is >> age; + } + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const{ + Object::printOn( _os ); + _os << age; + } +//@} + + private: + + /** Default Constructor. \\ + It´s private so that it is not used anywhere; the right way of using this object + is to create an Object and passing it to an aged by means of the copy ctor; that way + it´s turned into an Aged object*/ + eoAged(): Object(), age(0) {}; + + unsigned long age; +}; + +#endif EOAGE_H + diff --git a/eo/contrib/eoDrawable.h b/eo/contrib/eoDrawable.h new file mode 100644 index 000000000..221bf2c1e --- /dev/null +++ b/eo/contrib/eoDrawable.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDrawable.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EODRAWABLE_H +#define EODRAWABLE_H + +//----------------------------------------------------------------------------- + +using namespace std; + +//----------------------------------------------------------------------------- +// eoDrawable +//----------------------------------------------------------------------------- + +/** eoDrawable is a template class that adds a drawing interface to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +eoDrawables can be drawn on any two-dimensional surface; it can be added to any +object with above characteristics. +@see eoObject +*/ +template +class eoDrawable +{ + public: + /// Main ctor from an already built Object. + eoDrawable( const Object& _o): Object( _o ){}; + + /// Copy constructor. + eoDrawable( const eoDrawable& _d): Object( _d ){}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoDrawable() {}; + + + /**Draws the object. It must be redefined in any subclass, it´s impossible + to have a general drawing method + @param _x, _y coorinates */ + virtual void draw( unsigned _x, unsigned _y) = 0; + +}; + +#endif EODRAWABLE_H From 0b35985e6d182ab18dcdee02b66581a4b593167d Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 15:00:38 +0000 Subject: [PATCH 0138/2134] (re)moving... --- eo/gp/eoParseTree.h | 242 ----------- eo/gp/node_pool.h | 297 ------------- eo/gp/parse_tree.h | 994 -------------------------------------------- 3 files changed, 1533 deletions(-) delete mode 100644 eo/gp/eoParseTree.h delete mode 100644 eo/gp/node_pool.h delete mode 100644 eo/gp/parse_tree.h diff --git a/eo/gp/eoParseTree.h b/eo/gp/eoParseTree.h deleted file mode 100644 index 7bac61254..000000000 --- a/eo/gp/eoParseTree.h +++ /dev/null @@ -1,242 +0,0 @@ -#ifndef EO_PARSE_TREE_H -#define EO_PARSE_TREE_H - -#include - -#include "EO.h" -#include "eoOp.h" -#include "eoInserter.h" -#include "eoIndiSelector.h" -#include "parse_tree.h" -#include "eoRnd.h" - -using namespace gp_parse_tree; -using namespace std; - -template -class eoParseTree : public EO, public parse_tree -{ -public : - - typedef typename parse_tree::subtree Type; - - eoParseTree(void) : EO(), parse_tree() {} - eoParseTree(unsigned _size, eoRnd& _rnd) - : EO(), parse_tree(_rnd()) - { - pruneTree(_size); - } - eoParseTree(eoRnd& _rnd) - : EO(), parse_tree(_rnd()) - {} - - virtual void pruneTree(unsigned _size) - { - if (_size < 1) - return; - - if (size() > _size) - { - Type* sub = &operator[](size() - 2); // prune tree - - while (sub->size() > _size) - { - sub = &sub->operator[](0); - } - - back() = *sub; - } - } - - eoParseTree(std::istream& is) : EO(), parse_tree() - { - readFrom(is); - } - - string className(void) const { return "eoParseTree"; } - - void printOn(std::ostream& os) const - { - os << fitness() << ' '; - - std::copy(ebegin(), eend(), ostream_iterator(os)); - } - - void readFrom(std::istream& is) - { - FType fit; - - is >> fit; - - fitness(fit); - - std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); - } -}; - -template -std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) -{ - eot.printOn(os); - return os; -} - -template -std::istream& operator>>(std::istream& is, eoParseTree& eot) -{ - eot.readFrom(is); - return is; -} - - -template -class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > -{ - public : - - typedef eoParseTree EoType; - - eoGpDepthInitializer( - unsigned _max_depth, - const vector& _initializor, - bool _grow = true) - : - eoRnd(), - max_depth(_max_depth), - initializor(_initializor), - grow(_grow) - {} - - virtual string className() const { return "eoDepthInitializer"; }; - - EoType::Type operator()(void) - { - list sequence; - - generate(sequence, max_depth); - - parse_tree tree(sequence.begin(), sequence.end()); - - return tree.root(); - } - - void generate(list& sequence, int the_max, int last_terminal = -1) - { - if (last_terminal == -1) - { // check where the last terminal in the sequence resides - vector::iterator it; - for (it = initializor.begin(); it != initializor.end(); ++it) - { - if (it->arity() > 0) - break; - } - - last_terminal = it - initializor.begin(); - } - - if (the_max == 1) - { // generate terminals only - vector::iterator it = initializor.begin() + rng.random(last_terminal); - sequence.push_front(*it); - return; - } - - vector::iterator what_it; - - if (grow) - { - what_it = initializor.begin() + rng.random(initializor.size()); - } - else // full - { - what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); - } - - what_it->randomize(); - - sequence.push_front(*what_it); - - for (int i = 0; i < what_it->arity(); ++i) - generate(sequence, the_max - 1, last_terminal); - } - - -private : - - unsigned max_depth; - std::vector initializor; - bool grow; -}; - -template -class eoSubtreeXOver: public eoGeneralOp< eoParseTree > { -public: - - typedef eoParseTree EoType; - - eoSubtreeXOver( unsigned _max_length) - : eoGeneralOp(), max_length(_max_length) {}; - - virtual string className() const { return "eoSubtreeXOver"; }; - - /// Dtor - virtual ~eoSubtreeXOver () {}; - - void operator()(eoIndiSelector& _source, eoInserter& _sink ) const - { - EoType eo1 = _source.select(); - const EoType& eo2 = _source.select(); - - int i = rng.random(eo1.size()); - int j = rng.random(eo2.size()); - - eo1[i] = eo2[j]; // insert subtree - - eo1.pruneTree(max_length); - - eo1.invalidate(); - _sink.insert(eo1); - } - - unsigned max_length; -}; - -template -class eoBranchMutation: public eoGeneralOp< eoParseTree > -{ -public: - - typedef eoParseTree EoType; - - eoBranchMutation(eoRnd& _init, unsigned _max_length) - : eoGeneralOp(), max_length(_max_length), initializer(_init) - {}; - - virtual string className() const { return "eoBranchMutation"; }; - - /// Dtor - virtual ~eoBranchMutation() {}; - - void operator()(eoIndiSelector& _source, eoInserter& _sink ) const - { - EoType eo1 = _source.select(); - int i = rng.random(eo1.size()); - - EoType eo2(eo1[i].size(), initializer); // create random other to cross with - - eo1[i] = eo2.back(); // insert subtree - - eo1.pruneTree(max_length); - - eo1.invalidate(); - _sink.insert(eo1); - } - -private : - - unsigned max_length; - eoRnd& initializer; -}; - - -#endif diff --git a/eo/gp/node_pool.h b/eo/gp/node_pool.h deleted file mode 100644 index f541d5f0c..000000000 --- a/eo/gp/node_pool.h +++ /dev/null @@ -1,297 +0,0 @@ - -#ifndef node_pool_h -#define node_pool_h - -class MemPool -{ -public : - - MemPool(unsigned int sz) : esize(sznext; - delete p; - } - } - - void* allocate() - { - if (head == 0) grow(); - Link* p = head; - head = p->next; - return static_cast(p); - } - - void deallocate(void* b) - { - Link* p = static_cast(b); - p->next = head; - head = p; - } - -private : - - void grow() - { - Chunk* n = new Chunk; - n->next = chunks; - chunks = n; - - const int nelem = Chunk::size/esize; - char* start = n->mem; - char* last = &start[(nelem-1)*esize]; - for (char* p = start; p < last; p += esize) - { - reinterpret_cast(p)->next = - reinterpret_cast(p + esize); - } - - reinterpret_cast(last)->next = 0; - head = reinterpret_cast(start); - } - - struct Link - { - Link* next; - }; - - struct Chunk - { - enum {size = 8 * 1024 - 16}; - Chunk* next; - char mem[size]; - }; - - Chunk* chunks; - const unsigned int esize; - Link* head; -}; - -template -class Node_alloc -{ -public : - - T* allocate(void) - { - T* t = static_cast(mem.allocate()); - t = new (t) T; - return t; - } - - T* construct(const T& org) - { - T* t = static_cast(mem.allocate()); - t = new (t) T(org); - return t; - } - - void deallocate(T* t) - { - t->~T(); // call destructor - mem.deallocate(static_cast(t)); - } - -private : - static MemPool mem; -}; - - -template -class Standard_alloc -{ -public : - Standard_alloc() {} - - T* allocate(size_t arity = 1) - { - if (arity == 0) - return 0; - - return new T [arity]; - } - - T* construct(size_t arity, T* org) - { - if (arity == 0) - return 0; - - T* t new T [arity]; - - for (int i = 0; i < arity; ++i) - { - t = T(org[i]); - } - } - - void deallocate(T* t, size_t arity = 1) - { - if (arity == 0) - return ; - - delete [] t; - } - -}; - -template -class Standard_Node_alloc -{ -public : - Standard_Node_alloc() {} - - T* allocate(void) - { - return new T;// [arity]; - } - - T* construct(const T& org) - { - return new T(org); - } - - void deallocate(T* t) - { - delete t; - } - -}; - -template -class Tree_alloc -{ -public : - Tree_alloc() {} - - T* allocate(size_t arity) - { - T* t; - - switch(arity) - { - - case 0 : return 0; - case 1 : - { - t = static_cast(mem1.allocate()); - new (t) T; - break; - } - case 2 : - { - t = static_cast(mem2.allocate()); - new (t) T; - new (&t[1]) T; - break; - } - case 3 : - { - t = static_cast(mem3.allocate()); - new (t) T; - new (&t[1]) T; - new (&t[2]) T; - break; - } - default : - { - return new T[arity]; - } - } - - return t; - } - - T* construct(size_t arity, T* org) - { - T* t; - - switch(arity) - { - - case 0 : return 0; - case 1 : - { - t = static_cast(mem1.allocate()); - new (t) T(*org); - break; - } - case 2 : - { - t = static_cast(mem2.allocate()); - new (t) T(*org); - new (&t[1]) T(org[1]); - break; - } - case 3 : - { - t = static_cast(mem3.allocate()); - new (t) T(*org); - new (&t[1]) T(org[1]); - new (&t[1]) T(org[2]); - break; - } - default : - { - t = new T[arity]; // does call default ctor - for (int i = 0; i < arity; ++i) - { - t[i] = T(org[i]); // constructs now - } - } - } - - return t; - } - - - - void deallocate(T* t, size_t arity) - { - switch(arity) - { - case 0: return; - case 3 : - { - t[2].~T(); t[1].~T(); t[0].~T(); - mem3.deallocate(static_cast(t)); - return; - } - case 2 : - { - t[1].~T(); t[0].~T(); - mem2.deallocate(static_cast(t)); - return; - } - case 1 : - { - t[0].~T(); - mem1.deallocate(static_cast(t)); - return; - } - default : - { - delete [] t; - return; - } - } - } - - -private : - static MemPool mem1; - static MemPool mem2; - static MemPool mem3; -}; - -// static (non thread_safe) memory pools -template MemPool Node_alloc::mem = sizeof(T); - -template MemPool Tree_alloc::mem1 = sizeof(T); -template MemPool Tree_alloc::mem2 = sizeof(T) * 2; -template MemPool Tree_alloc::mem3 = sizeof(T) * 3; - -#endif diff --git a/eo/gp/parse_tree.h b/eo/gp/parse_tree.h deleted file mode 100644 index e6c507231..000000000 --- a/eo/gp/parse_tree.h +++ /dev/null @@ -1,994 +0,0 @@ -#ifndef PARSE_TREE_HH -#define PARSE_TREE_HH - -/** - - * Parse_tree and subtree classes - * (c) Maarten Keijzer 1999, 2000 - - * These classes may be used for educational and - * other non-commercial purposes only. Even if I - * wanted to, I am not at liberty to place this file - * under the GNU Lesser Public Library License, as this - * would limit my and my institution's freedom to use - * this file in closed-source software. - - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for non-commercial purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - - - Usage information. - - class Node (your node in the tree) must have the following implemented: - - ****** Arity ****** - - int arity(void) const - - Note: the default constructor of a Node should provide a - Node with arity 0! - - ****** Evaluation ****** - - A parse_tree is evaluated through one of it's apply() members: - - 1) parse_tree::apply(RetVal) - - is the simplest evaluation, it will call - - RetVal Node::operator()(RetVal, subtree::const_iterator) - - (Unfortunately the first RetVal argument is mandatory (although you - might not need it. This is because MSVC does not support member template - functions properly. If it cannot deduce the template arguments (as is - the case in templatizing over return value) you are not allowed to - specify them. calling tree.apply() would result in a syntax - error. That is why you have to call tree.apply(double()) instead.) - - - 2) parse_tree::apply(RetVal v, It values) - - will call: - - RetVal Node::operator()(RetVal, subtree<... , It values) - - where It is whatever type you desire (most of the time - this will be a vector containing the values of your - variables); - - 3) parse_tree::apply(RetVal, It values, It2 moreValues) - - will call: - - RetVal Node::operator()(RetVal, subtree<... , It values, It2 moreValues) - - although I do not see the immediate use of this, however... - - 4) parse_tree::apply(RetVal, It values, It2 args, It3 adfs) - - that calls: - - RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) - - can be useful for implementing adfs. - - - In general it is a good idea to leave the specifics of the - arguments open so that different ways of evaluation remain - possible. Implement the simplest eval as: - - template - RetVal operator()(RetVal dummy, It begin) const - - ****** Internal Structure ****** - - A parse_tree has two template arguments: the Node and the ReturnValue - produced by evaluating the node. The structure of the tree is defined - through a subtree class that has the same two template arguments. - - The nodes are stored in a tree like : - - node4 - / \ - node3 node2 - / \ - node1 node0 - - where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) - - The nodes are subtrees, containing the structure of the tree, together - with its size and depth. They contain a Node, the user defined template - argument. To access these nodes from a subtree, use operator-> or operator*. - - The numbers behind the nodes define a reverse-polish or postfix - traversel through the tree. The parse_tree defines iterators - on the tree such that - - tree.begin() points at the subtree at node0 and - tree.back() returns the subtree at node4, the complete tree - - Likewise operator[] is defined on the tree, such that: - - tree[0] will return the subtree at node0, while - tree[2] will return the subtree at node2 - - Assigments of subtrees is protected so that the code: - - tree[2] = tree[0]; - - will not crash and result in a tree structured as: - - node4 - / \ - node3 node0 - - Note that the rank numbers no longer specify their place in the tree: - - tree[0] still points at node0, but - tree[1] now points to node3 and - tree[2] points at the root node4 - - Embedded iterators are implemented to iterate over nodes rather - than subtrees. So an easy way to copy your tree to a vector is: - - vector vec(tree.size()); - copy(tree.ebegin(), tree.eend(), vec.begin()); - - You can also copy it to an ostream_iterator with this - technique, given that your Node implements an appropriate - operator<<. Reinitializing a tree with the vector is also - simple: - - tree.clear(); - copy(vec.begin(), vec.end(), back_inserter(tree)); - - or from an istream: - - copy(istream_iterator(my_stream), istream_iterator(), back_inserter(tree)); - - Note that the back_inserter must be used as there is no - resize member in the parse_tree. back_inserter will use - the push_back member from the parse_tree - -*/ - -#include -#include // for swap - -#ifdef _MSC_VER -#pragma warning(disable : 4786) // disable this nagging warning about the limitations of the mirkosoft debugger -#endif - -namespace gp_parse_tree -{ - -#include "node_pool.h" - - -template -inline void do_the_swap(T& a, T& b) -{ - T tmp = a; - a = b; - b = tmp; -} - -template class parse_tree -{ - public : - - -class subtree -{ - -/* - a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) - TODO: use the std::allocator interface -*/ - -#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) // not multithreaded - Node_alloc node_allocator; - Tree_alloc tree_allocator; -#else - Standard_Node_alloc node_allocator; - Standard_alloc tree_allocator; -#endif - -public : - - typedef subtree* iterator; - typedef const subtree* const_iterator; - - /* Constructors, assignments */ - - subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - {} - subtree(const subtree& s) - : content(node_allocator.allocate()), - args(0), - parent(0), - _cumulative_size(1), - _depth(1), - _size(1) - { - copy(s); - } - - subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { copy(t); } - - template - subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { // initialize in prefix order for efficiency reasons - init(b, --e); - } - - virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } - - subtree& operator=(const subtree& s) - { - if (s.get_root() == get_root()) - { // from the same tree, maybe a child. Don't take any chances - subtree anotherS = s; - return copy(anotherS); - } - - copy(s); - updateAfterInsert(); - return *this; - } - - subtree& operator=(const T& t) { copy(t); updateAfterInsert(); return *this; } - - /* Access to the nodes */ - - T& operator*(void) { return *content; } - const T& operator*(void) const { return *content; } - T* operator->(void) { return content; } - const T* operator->(void) const { return content; } - - /* Equality, inequality check, Node needs to implement operator== */ - - bool operator==(const subtree& other) const - { - if (! (*content == *other.content)) - return false; - - for (int i = 0; i < arity(); i++) - { - if (!(args[i] == other.args[i])) - return false; - } - - return true; - } - - bool operator !=(const subtree& other) const - { - return !operator==(other); - } - - /* Arity */ - int arity(void) const { return content->arity(); } - - /* Evaluation with an increasing amount of user defined arguments */ - template - void apply(RetVal& v) const { (*content)(v, begin()); } - - template - void apply(RetVal& v, It values) const - { - (*content)(v, begin(), values); - } - - template - void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) - { - (content->*f)(v, begin(), misc); - } - - -/* template - void apply(RetVal& v, It values, It2 moreValues) const - { (*content)(v, begin(), values, moreValues); } - - template - void apply(RetVal& v, It values, It2 moreValues, It3 evenMoreValues) const - { (*content)(v, begin(), values, moreValues, evenMoreValues); } -*/ - - template - void find_nodes(vector& result, Pred& p) - { - if (p(*content)) - { - result.push_back(this); - } - - for (int i = 0; i < arity(); ++i) - { - args[i].find_nodes(result, p); - } - } - - template - void find_nodes(vector& result, Pred& p) const - { - if (p(*content)) - { - result.push_back(this); - } - - for (int i = 0; i < arity(); ++i) - { - args[i].find_nodes(result, p); - } - } - - /* Iterators */ - - iterator begin(void) { return args; } - const_iterator begin(void) const { return args; } - - iterator end(void) { return args + arity(); } - const_iterator end(void) const { return args + arity(); } - - subtree& operator[](int i) { return *(begin() + i); } - const subtree& operator[](int i) const { return *(begin() + i); } - - /* Some statistics */ - - size_t size(void) const { return _size; } - - size_t cumulative_size(void) const { return _cumulative_size; } - size_t depth(void) const { return _depth; } - - const subtree& select_cumulative(size_t which) const - { return imp_select_cumulative(which); } - - subtree& select_cumulative(size_t which) - { return const_cast(imp_select_cumulative(which)); } - - subtree& get_node(size_t which) - { return const_cast(imp_get_node(which));} - const subtree& get_node(size_t which) const - { return imp_get_node(which); } - - subtree* get_parent(void) { return parent; } - const subtree* get_parent(void) const { return parent; } - - void clear(void) - { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } - - void swap(subtree& y) - { - do_the_swap(content, y.content); - do_the_swap(args, y.args); - do_the_swap(parent, y.parent); - - do_the_swap(_cumulative_size, y._cumulative_size); - do_the_swap(_depth, y._depth); - do_the_swap(_size, y._size); - updateAfterInsert(); - } - - friend void swap(subtree& x, subtree& y) - { - x.swap(y); - } - -protected : - - virtual void updateAfterInsert(void) - { - _depth = 0; - _size = 1; - _cumulative_size = 0; - - for (iterator it = begin(); it != end(); ++it) - { - _size += it->size(); - _cumulative_size += it->_cumulative_size; - _depth = it->_depth > _depth? it->_depth: _depth; - } - _cumulative_size += _size; - _depth++; - - content->updateAfterInsert(); - - if (parent) - parent->updateAfterInsert(); - } - -private : - - const subtree& imp_select_cumulative(size_t which) const - { - if (which >= (_cumulative_size - size())) - return *this; - // else - - for (int i = arity() - 1; i >= 0; --i) - { - if (which < args[i]._cumulative_size) - return args[i].imp_select_cumulative(which); - which -= args[i]._cumulative_size; - } - - return *this; // error! - } - - const subtree& imp_get_node(size_t which) const - { - if (which == size() - 1) - return *this; - - for (int i = arity() - 1; i >= 0; --i) - { - unsigned c_size = args[i].size(); - if (which < c_size) - return args[i].imp_get_node(which); - which -= c_size; - } - - return *this; // error! - } - - const subtree* get_root(void) const - { - if (parent == 0) - return this; - // else - - return parent->get_root(); - } - subtree& copy(const subtree& s) - { - int old_arity = arity(); - - int new_arity = s.arity(); - - if (new_arity != old_arity) - { - tree_allocator.deallocate(args, old_arity); - - args = tree_allocator.allocate(new_arity); - } - - switch(new_arity) - { - case 3 : args[2].copy(s.args[2]); args[2].parent = this; // no break! - case 2 : args[1].copy(s.args[1]); args[1].parent = this; - case 1 : args[0].copy(s.args[0]); args[0].parent = this; - case 0 : break; - default : - { - for (int i = 0; i < new_arity; ++i) - { - args[i].copy(s.args[i]); - args[i].parent = this; - } - } - } - - *content = *s.content; - _size = s._size; - _depth = s._depth; - _cumulative_size = s._cumulative_size; - - return *this; - } - - subtree& copy(const T& t) - { - int oldArity = arity(); - - if (content != &t) - *content = t; - else - oldArity = -1; - - int ar = arity(); - - if (ar != oldArity) - { - if (oldArity != -1) - tree_allocator.deallocate(args, oldArity); - - args = tree_allocator.allocate(ar); - - //if (ar > 0) - // args = new subtree [ar]; - //else - // args = 0; - } - - adopt(); - updateAfterInsert(); - return *this; - } - - void disown(void) - { - switch(arity()) - { - case 3 : args[2].parent = 0; // no break! - case 2 : args[1].parent = 0; - case 1 : args[0].parent = 0; break; - case 0 : break; - default : - { - for (iterator it = begin(); it != end(); ++it) - { - it->parent = 0; - } - } - } - - } - - void adopt(void) - { - switch(arity()) - { - case 3 : args[2].parent = this; // no break! - case 2 : args[1].parent = this; - case 1 : args[0].parent = this; break; - case 0 : break; - default : - { - for (iterator it = begin(); it != end(); ++it) - { - it->parent = this; - } - } - } - } - - template - void init(It b, It& last) - { - *this = *last; - -#ifndef NDEBUG - if (last == b && arity() > 0) - { - throw "subtree::init()"; - } -#endif - - for (int i = 0; i < arity(); ++i) - { - args[i].parent = 0; - args[i].init(b, --last); - args[i].parent = this; - } - - updateAfterInsert(); - } - - T* content; - subtree* args; - subtree* parent; - - size_t _cumulative_size; - size_t _depth; - size_t _size; -}; - -// Continuing with parse_tree - - typedef T value_type; - - /* Constructors and Assignments */ - - parse_tree(void) : _root(), pushed() {} - parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } - parse_tree(const subtree& sub) : _root(sub), pushed() { } - - template - parse_tree(It b, It e) : _root(b, e), pushed() {} - - virtual ~parse_tree(void) {} - - parse_tree& operator=(const parse_tree& org) { return copy(org); } - parse_tree& operator=(const subtree& sub) - { return copy(sub); } - - - /* Equality and inequality */ - - bool operator==(const parse_tree& other) const - { return _root == other._root; } - - bool operator !=(const parse_tree& other) const - { return !operator==(other); } - - /* Simple tree statistics */ - - size_t size(void) const { return _root.size(); } - size_t depth(void) const { return _root.depth(); } - void clear(void) { _root.clear(); pushed.resize(0); } - - /* Evaluation (application), with an increasing number of user defined arguments */ - - template - void apply(RetVal& v) const - { _root.apply(v); } - - template - void apply(RetVal& v, It varValues) const - { _root.apply(v, varValues); } - - template - void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) - { - _root.apply_mem_func(v, misc, f); - } - - //template - // void apply(RetVal& v, It varValues, It2 moreValues) const - // { _root.apply(v, varValues, moreValues); } - - //template - // void apply(RetVal& v, It varValues, It2 moreValues, It3 evenMoreValues) const - // { _root.apply(v, varValues, moreValues, evenMoreValues); } - - template - void find_nodes(vector& result, Pred& p) - { - _root.find_nodes(result, p); - } - - template - void find_nodes(vector& result, Pred& p) const - { - _root.find_nodes(p); - } - - /* Customized Swap */ - void swap(parse_tree& other) - { - do_the_swap(pushed, other.pushed); - _root.swap(other._root); - } - - /* Definitions of the iterators */ - - class base_iterator - { - public : - - base_iterator() {} - base_iterator(subtree* n) { node = n; } - - base_iterator& operator=(const base_iterator& org) - { node = org.node; return *this; } - - bool operator==(const base_iterator& org) const - { return node == org.node; } - bool operator!=(const base_iterator& org) const - { return !operator==(org); } - - base_iterator operator+(size_t n) const - { - base_iterator tmp = *this; - - for(;n != 0; --n) - { - ++tmp; - } - - return tmp; - } - - base_iterator& operator++(void) - { - subtree* parent = node->get_parent(); - - if (parent == 0) - { - node = 0; - return *this; - } - // else - subtree::iterator it; - for (it = parent->begin(); it != parent->end(); ++it) - { - if (node == &(*it)) - break; - } - - if (it == parent->begin()) - node = parent; - else - { - node = &(--it)->get_node(0); - } - - return *this; - } - - base_iterator operator++(int) - { - base_iterator tmp = *this; - operator++(); - return tmp; - } - - protected : - subtree* node; - }; - - class iterator : public base_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef subtree value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef subtree* pointer; - typedef subtree& reference; - - iterator() : base_iterator() {} - iterator(subtree* n): base_iterator(n) {} - iterator& operator=(const iterator& org) - { base_iterator::operator=(org); return *this; } - - subtree& operator*(void) { return *node; } - subtree* operator->(void) { return node; } - }; - - class embedded_iterator : public base_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef T value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef T* pointer; - typedef T& reference; - - embedded_iterator() : base_iterator() {} - embedded_iterator(subtree* n): base_iterator(n) {} - embedded_iterator& operator=(const embedded_iterator& org) - { base_iterator::operator=(org); return *this; } - - T& operator*(void) { return **node; } - T* operator->(void) { return &**node; } - }; - - class base_const_iterator - { - public : - base_const_iterator() {} - base_const_iterator(const subtree* n) { node = n; } - - base_const_iterator& operator=(const base_const_iterator& org) - { node = org.node; return *this; } - - bool operator==(const base_const_iterator& org) const - { return node == org.node; } - bool operator!=(const base_const_iterator& org) const - { return !operator==(org); } - - base_const_iterator& operator++(void) - { - const subtree* parent = node->get_parent(); - - if (parent == 0) - { - node = 0; - return *this; - } - // else - subtree::const_iterator it; - - for (it = parent->begin(); it != parent->end(); ++it) - { - if (node == &(*it)) - break; - } - - if (it == parent->begin()) - node = parent; - else - node = &(--it)->get_node(0); - return *this; - } - - base_const_iterator operator++(int) - { - base_const_iterator tmp = *this; - operator++(); - return tmp; - } - - protected : - - const subtree* node; - }; - - class const_iterator : public base_const_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef const subtree value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef const subtree* pointer; - typedef const subtree& reference; - - const_iterator() : base_const_iterator() {} - const_iterator(const subtree* n): base_const_iterator(n) {} - const_iterator& operator=(const const_iterator& org) - { base_const_iterator::operator=(org); return *this; } - - const subtree& operator*(void) { return *node; } - const subtree* operator->(void) { return node; } - }; - - class embedded_const_iterator : public base_const_iterator - { - public : - typedef std::forward_iterator_tag iterator_category; - typedef const T value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef const T* pointer; - typedef const T& reference; - - embedded_const_iterator() : base_const_iterator() {} - embedded_const_iterator(const subtree* n): base_const_iterator(n) {} - embedded_const_iterator& operator=(const embedded_const_iterator& org) - { base_const_iterator::operator=(org); return *this; } - - embedded_const_iterator operator+(size_t n) const - { - embedded_const_iterator tmp = *this; - - for(;n != 0; --n) - { - ++tmp; - } - - return tmp; - } - - const T& operator*(void) const { return **node; } - const T* operator->(void) const { return node->operator->(); } - }; - - /* Iterator access */ - - iterator begin(void) { return iterator(&operator[](0)); } - const_iterator begin(void) const { return const_iterator(&operator[](0)); } - iterator end(void) { return iterator(0); } - const_iterator end(void) const { return const_iterator(0);} - - embedded_iterator ebegin(void) { return embedded_iterator(&operator[](0)); } - embedded_const_iterator ebegin(void) const { return embedded_const_iterator(&operator[](0)); } - embedded_iterator eend(void) { return embedded_iterator(0); } - embedded_const_iterator eend(void) const { return embedded_const_iterator(0);} - - bool empty(void) const { return size() == 0; } - bool valid(void) const { return pushed.empty(); } - - /* push_back */ - - void push_back(const parse_tree& tree) - { - if (!empty()) - pushed.push_back(_root); - - _root = tree.back(); - } - - void push_back(const T& t) - { - if (!empty()) - pushed.push_back(_root); - - _root = t; - - for (subtree::iterator it = _root.begin(); it != _root.end(); it++) - { - *it = pushed.back(); - pushed.pop_back(); - } - - } - - /* Access to subtrees */ - - subtree& back(void) { return _root; } - const subtree& back(void) const { return _root; } - subtree& root(void) { return _root; } - const subtree& root(void) const { return _root; } - - subtree& front(void) { return _root[0]; } - const subtree& front(void) const { return _root[0]; } - - subtree& operator[](size_t i) - { return const_cast(_root.get_node(i)); } - const subtree& operator[](size_t i) const - { return _root.get_node(i); } - - subtree& get_cumulative(size_t i) - { return const_cast(_root.get_cumulative(i)); } - const subtree& get_cumulative(size_t i) const - { return get_cumulative(i); } - - private : - - parse_tree& copy(const parse_tree& org) - { - _root = org._root; - pushed = org.pushed; - - return *this; - } - - parse_tree& copy(const subtree& sub) - { _root = sub; pushed.resize(0); return *this; } - - subtree _root; - std::vector pushed; -}; // end class parse_tree - - -} // end namespace gp_parse_tree - -namespace std -{ // for use with stlport on MSVC - -template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) -{ - return std::forward_iterator_tag(); -} - -template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) -{ - return 0; -} - -template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) -{ - return std::forward_iterator_tag(); -} - -template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) -{ - return 0; -} - -// Put customized swaps also in std... - -template inline -void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) -{ - a.swap(b); -} - -template inline -void iter_swap(vector >::iterator a, vector > b) -{ - a->swap(*b); -} - - -} // namespace std - - -#endif From 0b0c3f2fc0fb0f4a09ebebfb936269522a150d5b Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 15:14:16 +0000 Subject: [PATCH 0139/2134] Changed a few params in the configuration file --- eo/doc/eo.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 989b069e9..b5e7023cf 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -27,7 +27,7 @@ PROJECT_NUMBER = 0.9.0 # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = doc +OUTPUT_DIRECTORY = # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this @@ -123,7 +123,7 @@ CLASS_DIAGRAMS = YES # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. @@ -208,7 +208,7 @@ FILE_PATTERNS = *.cpp *.h # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. -RECURSIVE = NO +RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a From 7303d62c1a0f1b348315d177da5ab9a826b14964 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 15:38:16 +0000 Subject: [PATCH 0140/2134] Obsolete, now present in eoOp.h --- eo/src/eoGeneralOp.h | 200 ------------------------------------------- 1 file changed, 200 deletions(-) delete mode 100644 eo/src/eoGeneralOp.h diff --git a/eo/src/eoGeneralOp.h b/eo/src/eoGeneralOp.h deleted file mode 100644 index e24b6541e..000000000 --- a/eo/src/eoGeneralOp.h +++ /dev/null @@ -1,200 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoGeneralOp.h - General genetic operator, which can be used to wrap any unary or binary - operator - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -//----------------------------------------------------------------------------- - -#ifndef eoGeneralOp_h -#define eoGeneralOp_h - -//----------------------------------------------------------------------------- - -#include // vector -#include -#include // eoUniform -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoTransform -#include // eoOpSelector -#include -#include "eoRNG.h" - -using namespace std; - -/** - * eGeneralOp: General genetic operator; for objects used to transform sets - of EOs -*/ -template -class eoGeneralOp: public eoOp -{ -public: - - /// Ctor that honors its superclass - eoGeneralOp(): eoOp( Nary ) {}; - - /// Virtual dtor - virtual ~eoGeneralOp () {}; - - /** Method that really does the stuff. Applies the genetic operator - to a vector of inputs, and puts results in the output vector */ - virtual void operator()( eoPop::iterator _in, - insert_iterator< eoPop > _out) const = 0; - - /// Number of inputs - virtual unsigned nInputs(void) const { return repNInputs;}; - - /// Number of output arguments, or arguments that are pushed onto the output vector - virtual unsigned nOutputs(void) const { return repNOutputs; }; - - virtual string className() const {return "eoGeneralOp";}; - -protected: - /// Default ctor; protected so that only derived classes can use it - eoGeneralOp( unsigned _nInputs = 0, unsigned _nOutputs = 0 ) - : repNInputs( _nInputs), repNOutputs( _nOutputs) {}; - - /// change number of inputs - void setNInputs( unsigned _nInputs) { repNInputs = _nInputs;}; - - /// change number of outputs - void setNOutputs( unsigned _nOutputs) { repNOutputs = _nOutputs;}; - -private: - unsigned repNInputs; - unsigned repNOutputs; -}; - - -/// Wraps monary operators -template -class eoWrappedMonOp : public eoGeneralOp -{ -public : - /// - eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp( 1, 1), op(_op) {}; - - /// - virtual ~eoWrappedMonOp() {} - - /// Instantiates the abstract method - void operator()( eoPop::iterator _in, - insert_iterator< eoPop< EOT> > _out ) const { - EOT result = *_in; - op( result ); - *_out = result; - } - - /// - virtual string className() const {return "eoWrappedMonOp";}; - - -private : - const eoMonOp& op; -}; - - -/// Wraps binary operators -template -class eoWrappedBinOp : public eoGeneralOp -{ -public : - /// - eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(2, 2), op(_op) {} - - /// - virtual ~eoWrappedBinOp() {} - - /// Instantiates the abstract method. EOT should have copy ctor. - void operator()(eoPop::iterator _in, - insert_iterator< eoPop< EOT> > _out ) const { - EOT out1 = *_in; - _in++; - EOT out2 = *_in; - op(out1, out2); - *_out++ = out1; - *_out = out2; - } - - /// - virtual string className() const {return "eoWrappedBinOp";}; - -private : - const eoBinOp& op; -}; - -/// Combines several ops -template -class eoCombinedOp : public eoGeneralOp -{ -public : - - /// - eoCombinedOp() : eoGeneralOp() {} - - /// - virtual ~eoCombinedOp() {} - - /// Adds a new operator to the combined Op - void addOp(eoGeneralOp* _op) { - ops.push_back(_op); - unsigned nInputs = nInputs() < _op->nInputs()? _op->nInputs() : nInputs; - setNInputs( nInputs ); - unsigned nOutputs = nOutputs() < _op->nOutputs()? _op->nOutputs() : nOutputs; - setNOutputs( nInputs ); - } - - - /// Erases all operators added so far - void clear(void) { - ops.resize(0); - } - - - /// Applies all ops in the combined op - void operator()( eoPop::iterator _in, - insert_iterator< eoPop< EOT> > _out ) const { - // used for provisional input and output. Results are put in provOut, - // and copied back to provIn. - eoPop provIn, provOut; - insert_iterator< eoPop< EOT> > out = provOut.begin(); - ops[0]( _in, out ); - for ( unsigned i = 1; i < ops.size; i ++ ) { - copy( provOut.begin(), provOut.end(), provIn.begin() ); - insert_iterator< eoPop< EOT> > in = provIn.begin(); - out = provOut.begin(); - ops[i]( in, out ); - } - - // Copy back to output - copy( provOut.begin(), provOut.end(), _out ); - - - } - -private : - vector* > ops; -}; - -#endif eoGeneral_h From 7fe8f333e783d59b9efef14a3bd7a0e6e834d6ad Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 15:39:32 +0000 Subject: [PATCH 0141/2134] Changed readFrom, which is no longer line based --- eo/src/eoPop.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index e0b4513b2..8e469e304 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -110,25 +110,19 @@ class eoPop: public vector, public eoObject, public eoPersistent { * @param _is A istream. */ - virtual void readFrom(istream& _is) { - while( _is ) { // reads line by line, and creates an object per - // line - char line[MAXLINELENGTH]; - _is.getline( line, MAXLINELENGTH-1 ); - if (strlen( line ) ) { - istrstream s( line ); - EOT thisEOT; - thisEOT.readFrom( s ); + virtual void readFrom(istream& _is) + { + while( _is ) + { + EOT thisEOT; + thisEOT.readFrom( _is ); push_back( thisEOT ); - } } } /** * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. In this case, prints the population to - standard output. The EOT class must hav standard output with cout, - but since it should be an eoObject anyways, it's no big deal. + * @param _os A ostream. */ virtual void printOn(ostream& _os) const { copy( begin(), end(), ostream_iterator( _os, "\n") ); From 340edc2420a222662c9f9bda7c5608483135c579 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 16:47:27 +0000 Subject: [PATCH 0142/2134] test the state and the parser --- eo/test/t-testStateAndParser.cpp | 113 +++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 eo/test/t-testStateAndParser.cpp diff --git a/eo/test/t-testStateAndParser.cpp b/eo/test/t-testStateAndParser.cpp new file mode 100644 index 000000000..87f0a8c91 --- /dev/null +++ b/eo/test/t-testStateAndParser.cpp @@ -0,0 +1,113 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#pragma warning(disable:4786) + +#include // runtime_error + +//----------------------------------------------------------------------------- +// tt.cpp: +// +//----------------------------------------------------------------------------- + + +// general +#include // Random number generators +#include +#include +#include + +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ // ok, we have a command line parser and a state + + typedef eoBin Chrom; + + eoParser parser(argc, argv); + + // Define Parameters + eoValueParam chrom_size(2, "chrom-size", "Chromosome size"); + eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); + eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); + eoValueParam seed(time(0), "seed", "Random number seed"); + eoValueParam load_name("", "Load","Load",'L'); + eoValueParam save_name("", "Save","Save",'S'); + + // Register them + parser.processParam(chrom_size, "Representation"); + parser.processParam(rate, "Genetic Operators"); + parser.processParam(factor, "Genetic Operators"); + parser.processParam(load_name, "Persistence"); + parser.processParam(save_name, "Persistence"); + parser.processParam(seed, "Rng seeding"); + + eoState state; + state.registerObject(parser); + + if (load_name.value() != "") + { // load the parser. This is only neccessary when the user wants to + // be able to change the parameters in the state file by hand. + state.load(load_name.value()); // load the parser + } + + // Create the algorithm here + + // Register the algorithm + state.registerObject(rng); + //state.registerObject(pop); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + return 0; + } + + // Either load or initialize + if (load_name.value() != "") + { + state.load(load_name.value()); // load the rest + } + else + { + // else + + // initialize rng and population + + rng.reseed(seed.value()); + } + + // run the algorithm + + // Save when needed + if (save_name.value() != "") + { + string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); + } + + for (int i = 0; i < 100; ++i) + rng.rand(); + + cout << "a random number is " << rng.random(1024) << endl;; + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + return 1; +} \ No newline at end of file From 6c79787c43447002f807259ed58f33cf95e31f1b Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 16:49:35 +0000 Subject: [PATCH 0143/2134] Changed some includes for the new dir structure --- eo/src/eo | 10 +- eo/src/eoDetTournament.h | 2 +- eo/src/eoLottery.h | 2 +- eo/src/eoNegExp.h | 2 +- eo/src/eoNormal.h | 2 +- eo/src/eoObject.h | 16 +- eo/src/eoStochTournament.h | 2 +- eo/src/eoUniform.h | 2 +- eo/src/eoUniformSelect.h | 2 +- eo/src/ga/eoBitOp.h | 2 +- eo/src/other/eoExternalOpFunctions.cpp | 2 +- eo/src/utils/compatibility.h | 1 + eo/src/utils/eoParser.cpp | 9 + eo/src/utils/eoParser.h | 5 - eo/src/utils/eoRNG.h | 1 + eo/src/utils/selectors.h | 314 +++++++++++++++++++++++++ 16 files changed, 348 insertions(+), 26 deletions(-) create mode 100644 eo/src/utils/selectors.h diff --git a/eo/src/eo b/eo/src/eo index 5ee961e6c..0e37aa9db 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -25,7 +25,7 @@ //----------------------------------------------------------------------------- -#include +#include #include #include #include @@ -33,13 +33,11 @@ #include #include -#include #include #include -#include -#include -#include +#include +#include #include #include @@ -58,7 +56,7 @@ #include #include #include -#include +#include // Evaluation functions #include diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h index 687b30916..5af8bb8e4 100644 --- a/eo/src/eoDetTournament.h +++ b/eo/src/eoDetTournament.h @@ -31,7 +31,7 @@ #include // #include // accumulate #include "eoPopOps.h" // eoPop eoSelect MINFLOAT -#include "selectors.h" +#include "utils/selectors.h" //----------------------------------------------------------------------------- /** eoDetTournament: a selection method that selects ONE individual by diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index 9cf584bff..de8d978de 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -30,7 +30,7 @@ #include // #include // accumulate -#include "selectors.h" +#include "utils/selectors.h" #include // eoPop eoSelect MINFLOAT //----------------------------------------------------------------------------- diff --git a/eo/src/eoNegExp.h b/eo/src/eoNegExp.h index 7829a3c56..3d6be5e28 100644 --- a/eo/src/eoNegExp.h +++ b/eo/src/eoNegExp.h @@ -30,7 +30,7 @@ #include #include // for base class -#include // for base class +#include // for base class //----------------------------------------------------------------------------- // Class eoNegExp diff --git a/eo/src/eoNormal.h b/eo/src/eoNormal.h index 63904efc9..09a75d7f5 100644 --- a/eo/src/eoNormal.h +++ b/eo/src/eoNormal.h @@ -29,7 +29,7 @@ #include #include // for base class -#include // for random number generator +#include // for random number generator //----------------------------------------------------------------------------- // Class eoNormal diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 82724ac2c..c46c88551 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -27,11 +27,11 @@ //----------------------------------------------------------------------------- -#include // For limits definition +#include // For limits definition #include // istream, ostream #include // string -#include "compatibility.h" +#include "utils/compatibility.h" using namespace std; @@ -57,11 +57,15 @@ class eoObject /// Virtual dtor. They are needed in virtual class hierarchies. virtual ~eoObject() {} - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. + /** Return the class id. This should be redefined in each class. + Only "leaf" classes can be non-virtual. + + Maarten: removed the default implementation as this proved to + be too error-prone: I found several classes that had a typo in + className (like classname), which would print eoObject instead of + their own... */ - virtual string className() const { return "eoObject"; } + virtual string className() const = 0; }; diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h index 4ef6e0f7d..215ca3a58 100644 --- a/eo/src/eoStochTournament.h +++ b/eo/src/eoStochTournament.h @@ -31,7 +31,7 @@ #include // #include // accumulate #include // eoPop eoSelect MINFLOAT -#include +#include //----------------------------------------------------------------------------- /** eoStochTournament: a selection method that selects ONE individual by diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index c824673f8..90df59fef 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -29,7 +29,7 @@ //----------------------------------------------------------------------------- #include -#include +#include //----------------------------------------------------------------------------- // Class eoUniform diff --git a/eo/src/eoUniformSelect.h b/eo/src/eoUniformSelect.h index ab65a7f32..0c4707ee7 100644 --- a/eo/src/eoUniformSelect.h +++ b/eo/src/eoUniformSelect.h @@ -32,7 +32,7 @@ #include // #include // accumulate #include // eoPop eoSelect MINFLOAT -#include +#include //----------------------------------------------------------------------------- /** eoUniformSelect: a selection method that selects ONE individual randomly diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 78337fbbe..754313e8c 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -9,7 +9,7 @@ #include // swap_ranges #include // eoUniform -#include // eoBin +#include // eoBin #include // eoMonOp diff --git a/eo/src/other/eoExternalOpFunctions.cpp b/eo/src/other/eoExternalOpFunctions.cpp index 34efcf41e..88f246544 100644 --- a/eo/src/other/eoExternalOpFunctions.cpp +++ b/eo/src/other/eoExternalOpFunctions.cpp @@ -33,7 +33,7 @@ #include "eoRnd.h" template -class eoExternalInitFunc +class eoExternalInitFunc { public : diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 75479c149..353183f7d 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -38,6 +38,7 @@ nasty habit of #define min and max in stdlib.h (and windows.h) I'm trying to undo this horrible macro magic (microsoft yet macrohard) here. Sure hope it works */ +#pragma warning(disable:4786) #include diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index b6402de8b..2ef30b77e 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -1,3 +1,7 @@ +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + #include #include #include @@ -6,6 +10,11 @@ using namespace std; +void eoWarning(std::string str) +{ + cout << str << '\n'; +} + std::ostream& printSectionHeader(std::ostream& os, std::string section) { os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 17dddcaea..bc3c09a2f 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -56,11 +56,6 @@ public : virtual void processParam(eoParam& param, std::string section = "") = 0; }; -void eoWarning(std::string str) -{ - cout << str << '\n'; -} - /** eoParser: command line parser and configuration file reader This class is persistent, so it can be stored and reloaded to restore diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 76f63166e..5f2abb78a 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -240,6 +240,7 @@ public : _is >> cacheValue; } + std::string className(void) const { return "Mersenne-Twister"; } private : uint32 restart(void); diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h new file mode 100644 index 000000000..2b5290f57 --- /dev/null +++ b/eo/src/utils/selectors.h @@ -0,0 +1,314 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + selectors.h + A bunch of useful selector functions. They generally have three forms: + + template + It select(It begin, It end, params, eoRng& gen = rng); + + template + const EOT& select(const eoPop& pop, params, eoRng& gen = rng); + + template + EOT& select(eoPop& pop, params, eoRng& gen = rng); + + where select is one of: roulette_wheel, deterministic_tournament + and stochastic_tournament (at the moment). + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef SELECT__H +#define SELECT__H + +#include + +#include "eoRNG.h" + +template +bool minimizing_fitness() +{ + EOT eo1; // Assuming people don't do anything fancy in the default constructor! + EOT eo2; + + /* Dear user, when the two line below do not compile you are most + likely not working with scalar fitness values. In that case we're sorry + but you cannot use lottery or roulette_wheel selection... + */ + eo1.fitness(0.0); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this + eo2.fitness(1.0); + + return eo2 < eo1; // check whether we have a minimizing fitness +}; + +inline double scale_fitness(const std::pair& _minmax, double _value) +{ + if (_minmax.first == _minmax.second) + { + return 0.0; // no differences in fitness, population converged! + } + // else + + return (_value - _minmax.first) / (_minmax.second - _minmax.first); +} + +template +double sum_fitness(It begin, It end) +{ + double sum = 0.0; + + for (; begin != end; ++begin) + { + double v = static_cast(begin->fitness()); + if (v < 0.0) + throw std::logical_error("Negative Fitness Encountered"); + sum += v; + } + + return sum; +} + +template +double sum_fitness(const eoPop& _pop) +{ + return sum_fitness(_pop.begin(), _pop.end()); +} + +template +double sum_fitness(const eoPop& _pop, std::pair& _minmax) +{ + eoPop::const_iterator it = _pop.begin(); + + _minmax.first = it->fitness(); + _minmax.second = it++->fitness(); + + for(; it != _pop.end(); ++it) + { + double v = static_cast(it->fitness()); + + _minmax.first = std::min(_minmax.first, v); + _minmax.second = std::max(_minmax.second, v); + + rawTotal += v; + } + + if (minimizing_fitness()) + { + std::swap(_minmax.first, _minmax.second); + } + + scaledTotal = 0.0; + + // unfortunately a second loop is neccessary to scale the fitness + for (it = _pop.begin(); it != _pop.end(); ++it) + { + double v = scale_fitness(static_cast(it->fitness())); + + scaledTotal += v; + } +} + +template +It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + It i = _begin; + + while (roulette > 0.0) + { + roulette -= static_cast(*(i++)); + } + + return --i; +} + +template +const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + eoPop::const_iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + eoPop::iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It best = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (*best < *competitor) + { + best = competitor; + } + } + + return best; +} + +template +const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It worst = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (competitor == worst) + { + --i; + continue; // try again + } + + if (*competitor < *worst) + { + worst = competitor; + } + } + + return worst; +} + +template +const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_better = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_better) return i2; + // else + + return i1; + } + else + { + if (return_better) return i1; + // else + } + // else + + return i2; +} + +template +const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_worse = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_worse) return i1; + // else + + return i2; + } + else + { + if (return_worse) return i2; + // else + } + // else + + return i1; +} + +template +const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + + +#endif From b6c506643aec0f23046a377e0b993aaeb227bb53 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 17:09:36 +0000 Subject: [PATCH 0144/2134] Changed some includes for the new dir structure --- eo/test/t-eo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp index 86b0f723a..382362532 100644 --- a/eo/test/t-eo.cpp +++ b/eo/test/t-eo.cpp @@ -10,12 +10,14 @@ typedef EO Chrom; //----------------------------------------------------------------------------- -main() +int main() { Chrom chrom1, chrom2; cout << "chrom1 = " << chrom1 << endl << "chrom2 = " << chrom2 << endl; + + return 1; } //----------------------------------------------------------------------------- From 737779f235dc8cdb32b5ffef94f8b55ecd87465b Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 17:10:07 +0000 Subject: [PATCH 0145/2134] no message --- eo/test/t-eoaltbreeder.cpp | 98 -------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 eo/test/t-eoaltbreeder.cpp diff --git a/eo/test/t-eoaltbreeder.cpp b/eo/test/t-eoaltbreeder.cpp deleted file mode 100644 index 1c090cfd3..000000000 --- a/eo/test/t-eoaltbreeder.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - t-eoaltbreeder.cpp - Extensive esting of the eoAltBreeder class - - (c) Maarten Keijzer and GeNeura Team, 2000 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - -*/ - -//-----------------------------------------------------------------------------// - -// to avoid long name warnings -#pragma warning(disable:4786) - -#include "eoBin.h" // eoBin, eoPop, eoBreeder -#include -#include -#include -#include - - -// Fitness evaluation -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - unsigned i; - - eoUniform uniform(false, true); - eoBinRandom random; - eoPop pop; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - cout << "population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; - - eoBinBitFlip bitflip; - eoBinCrossover xover; - - eoProportionalOpSelector::outIt > propSel; - - eoAltBreeder breeder( propSel ); - - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - breeder(pop); - - eoSequentialOpSelector::outIt > seqSel; - - eoAltBreeder breeder2( seqSel ); - seqSel.addOp(bitflip, 0.25); - seqSel.addOp(xover, 0.75); - - breeder2(pop); - - // reevaluation of fitness - for_each(pop.begin(), pop.end(), binary_value); - - cout << "new population:" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; - - return 0; -} - -//----------------------------------------------------------------------------- From f290f94301726aa3aab45c3b99aa051030cf8114 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 22 Mar 2000 18:55:12 +0000 Subject: [PATCH 0146/2134] Adapted it for the poor stdc++ support of g++ --- eo/src/utils/eoParser.cpp | 8 +++++--- eo/src/utils/eoState.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 2ef30b77e..9a669c6c3 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -2,6 +2,7 @@ #pragma warning(disable:4786) #endif +#include #include #include #include @@ -57,7 +58,7 @@ void eoParser::doRegisterParam(eoParam& param) const { if (param.required() && !isItThere(param)) { - throw runtime_error("required parameter missing"); + throw std::runtime_error("required parameter missing"); } pair value = getValue(param); @@ -182,8 +183,9 @@ void eoParser::printOn(ostream& os) const eoParam* param = p->second; string str = "--" + param->longName() + "=" + param->getValue(); - - os << left << setw(40) << str; + + //os.setf(ios_base::left, ios_base::adjustfield); + os << setw(40) << str; os << " # " << '-' << param->shortName() << " : " << param->description(); if (param->required()) diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index edd4d9ca1..3d60ed448 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -52,18 +52,18 @@ void eoState::registerObject(eoPersistent& registrant) void eoState::load(const string& _filename) { ifstream is (_filename.c_str()); - - if (is.fail()) - { - string str = "Could not open file " + _filename; - throw runtime_error(str); - } string str; string name; getline(is, str); + if (is.fail()) + { + string str = "Could not open file " + _filename; + throw runtime_error(str); + } + while(is) { // parse section header if (is_section(str, name)) From a2457cf12615b21cee60d8c468aeb94d9c52d82c Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 23 Mar 2000 14:41:12 +0000 Subject: [PATCH 0147/2134] few minor mods --- eo/src/utils/compatibility.h | 4 ++++ eo/src/utils/eoParser.cpp | 26 ++++++++++++++++++++---- eo/src/utils/eoParser.h | 39 ++++++++++++++++++++++++++++++++++-- eo/src/utils/eoState.cpp | 25 ++++++++++++++++++----- eo/src/utils/eoState.h | 3 +++ 5 files changed, 86 insertions(+), 11 deletions(-) diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 353183f7d..73d2cc0b1 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -31,6 +31,10 @@ #include #include +#ifdef __GNUC__ +typedef ios ios_base; // not currently defined in GCC +#endif + #ifdef _MSC_VER /* Maarten: added this code here because Mirkosoft has the diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 9a669c6c3..3058bfbaf 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -7,7 +7,9 @@ #include #include -#include "eoParser.h" +#include + +#include using namespace std; @@ -18,10 +20,22 @@ void eoWarning(std::string str) std::ostream& printSectionHeader(std::ostream& os, std::string section) { + if (section == "") + section = "General"; + os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; return os; } +eoParameterLoader::~eoParameterLoader() +{ + for (int i = 0; i < ownedParams.size(); ++i) + { + delete ownedParams[i]; + } +} + + eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : programName( _argv[0]), programDescription( _programDescription), @@ -184,9 +198,13 @@ void eoParser::printOn(ostream& os) const string str = "--" + param->longName() + "=" + param->getValue(); - //os.setf(ios_base::left, ios_base::adjustfield); + os.setf(ios_base::left, ios_base::adjustfield); os << setw(40) << str; - os << " # " << '-' << param->shortName() << " : " << param->description(); + + os << setw(0) << " # "; + if (param->shortName()) + os << '-' << param->shortName() << " : "; + os << param->description(); if (param->required()) { @@ -205,7 +223,7 @@ void eoParser::printHelp(ostream& os) // print the usage when calling the program from the command line os << "Usage: "<< programName<<" [Options]\n"; // only short usage! - os << "Options of the form \"-ShortName value\" or \"--LongName value\"" << endl; + os << "Options of the form \"-f[Value]\" or \"--Name[=value]\"" << endl; os << "Where:"< + eoValueParam& createParam + (ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + std::string _section = "", + bool _required = false) + { + eoValueParam* p = new eoValueParam(_defaultValue, _longName, _description, _shortHand, _required); + + ownedParams.push_back(p); + + processParam(*p, _section); + + return *p; + } + +private : + + std::vector ownedParams; + }; /** @@ -73,7 +106,8 @@ public: * * myEo --param-file=param.rc will then load using the parameter file param.rc * - * @param _argc, _ argv command line arguments + * @param _argc command line arguments count + * @param _argv command line parameters * @param _programDescription Description of the work the program does * @param _lFileParamName Name of the parameter specifying the configuration file (--param-file) * @param _shortHand Single charachter shorthand for specifying the configuration file @@ -128,4 +162,5 @@ private: eoValueParam needHelp; }; + #endif \ No newline at end of file diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index 3d60ed448..e1e2dd4c8 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -46,7 +46,16 @@ void eoState::registerObject(eoPersistent& registrant) { string name = createObjectName(dynamic_cast(®istrant)); - objectMap[name] = ®istrant; + pair res = objectMap.insert(make_pair(name, ®istrant)); + + if (res.second == true) + { + creationOrder.push_back(res.first); + } + else + { + throw logic_error("Interval error: object already present in the state"); + } } void eoState::load(const string& _filename) @@ -107,13 +116,19 @@ void eoState::load(const string& _filename) } void eoState::save(const string& filename) -{ +{ // saves in order of insertion ofstream os(filename.c_str()); - for (ObjectMap::iterator it = objectMap.begin(); it != objectMap.end(); ++it) + if (os.fail()) { - os << "\\section{" << it->first << "}\n"; - it->second->printOn(os); + string msg = "Could not open file: " + filename + " for writing!"; + throw runtime_error(msg); + } + + for (vector::iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) + { + os << "\\section{" << (*it)->first << "}\n"; + (*it)->second->printOn(os); os << '\n'; } } diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index 9f656a6c2..e505f55f6 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -30,6 +30,7 @@ #include #include #include +#include class eoObject; class eoPersistent; @@ -79,6 +80,8 @@ private : typedef std::map ObjectMap; ObjectMap objectMap; + + std::vector creationOrder; }; #endif //eoState_h From 5467df160c0d84900e87dc72a1cb5d9e77ed0413 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 30 Mar 2000 09:43:21 +0000 Subject: [PATCH 0148/2134] changed erronuous classname() to className() --- eo/src/eoBreeder.h | 2 +- eo/src/eoGOpBreeder.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index 24fa83e53..d33c04752 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -101,7 +101,7 @@ template class eoBreeder: public eoMonPopOp }; /// The class name. - string classname() const { return "eoBreeder"; } + string className() const { return "eoBreeder"; } private: eoOpSelector& opSel; diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index ecdfd8658..b4a2bdbb2 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -45,7 +45,7 @@ class eoGOpBreeder: public eoMonPopOp } /// The class name. - string classname() const { return "eoGOpBreeder"; } + string className() const { return "eoGOpBreeder"; } private: eoGOpSelector& opSel; From 1fe3a72e10223b1dff3861f30528caa6cfcea02f Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 30 Mar 2000 14:20:25 +0000 Subject: [PATCH 0149/2134] 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 f089acf0c..01614d93f 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 95e80d9e7..6bdcbd95c 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 de8d978de..d9816d5b5 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 754313e8c..b1bab4b5d 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 084af77c6..dea8ed096 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 4bd8dc456..6ee91d505 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 8ca43e714..294b26bd7 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 2b5290f57..bb99bb2d2 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 4f27af5ae..580c19222 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 577d6fedb..95304ceb0 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 8ee3bc19a..4579935ef 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; } From 5fe751080749f42d251ef64e777a709bad20d502 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 30 Mar 2000 17:11:20 +0000 Subject: [PATCH 0150/2134] fixing makefiles --- eo/configure.in | 2 +- eo/src/EO.h | 4 +- eo/src/eoObject.h | 2 +- eo/src/eoOp.h | 323 ++++--------------------- eo/src/eoPersistent.h | 2 +- eo/src/es/Makefile.am | 8 + eo/src/ga/Makefile.am | 8 + eo/src/gp/Makefile.am | 8 + eo/src/obsolete/Makefile.am | 13 + eo/src/obsolete/eoParserUtils.h | 4 +- eo/src/other/Makefile.am | 13 + eo/src/other/eoExternalEO.h | 46 ++-- eo/src/other/eoExternalOpFunctions.cpp | 10 +- eo/src/utils/Makefile.am | 13 + eo/src/utils/eoRNG.h | 4 +- 15 files changed, 153 insertions(+), 307 deletions(-) create mode 100644 eo/src/es/Makefile.am create mode 100644 eo/src/ga/Makefile.am create mode 100644 eo/src/gp/Makefile.am create mode 100644 eo/src/obsolete/Makefile.am create mode 100644 eo/src/other/Makefile.am create mode 100644 eo/src/utils/Makefile.am diff --git a/eo/configure.in b/eo/configure.in index 01614d93f..49ca3bc1f 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE(eo) AC_PROG_CXX -CXXFLAGS = -Wall -g +#CXXFLAGS = -Wall -g AM_PROG_LIBTOOL diff --git a/eo/src/EO.h b/eo/src/EO.h index ec9d3dcce..91992f1ea 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -28,8 +28,8 @@ //----------------------------------------------------------------------------- #include // runtime_error -#include // -#include // +#include "eoObject.h" // +#include "eoPersistent.h" // //----------------------------------------------------------------------------- /** EO is a base class for evolvable objects, that is, the subjects of diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index c46c88551..3ceb25906 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -27,7 +27,7 @@ //----------------------------------------------------------------------------- -#include // For limits definition +#include "utils/eoData.h" // For limits definition #include // istream, ostream #include // string diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 9338b12a0..e27051e15 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -1,397 +1,207 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - - //----------------------------------------------------------------------------- - // eoOp.h - // (c) GeNeura Team, 1998 - /* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - //----------------------------------------------------------------------------- - - #ifndef _eoOp_H - #define _eoOp_H - - #include - #include - - /** @name Genetic operators - - -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with - -eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) - -as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, - -those are the ones actually used here.\\ - - - -#eoOp#s are only printable objects, so if you want to build them from a file, it has to - -be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own - -factory, which know how to build them from a description in a file. +What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, those are the ones actually used here. \\#eoOp#s are only printable objects, so if you want to build them from a file, it has to be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own factory, which know how to build them from a description in a file. @author GeNeura Team - @version 0.1 - @see eoOpFactory - */ - - - /** Abstract data types for EO operators. - - * Genetic operators act on chromosomes, changing them. The type to instantiate them should - - * be an eoObject, but in any case, they are type-specific; each kind of evolvable object - - * can have its own operators - + * Genetic operators act on chromosomes, changing them. The type to + * instantiate them should be an eoObject, but in any case, they are + * type-specific; each kind of evolvable object can have its own operators */ template class eoOp: public eoObject, public eoPrintable { - public: - - - -//@{ - + //@{ enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; - -/// - - + /// /// Ctor - eoOp(OpType _type) - :opType( _type ) {}; - - /// Copy Ctor - eoOp( const eoOp& _eop ) - :opType( _eop.opType ) {}; - - /// Needed virtual destructor - virtual ~eoOp(){}; - - /// getType: number of operands it takes and individuals it produces - OpType getType() const {return opType;}; - - - /** @name Methods from eoObject */ - - //@{ - + /** @name Methods from eoObject */ - + //@{ + /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); - // _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ virtual string className() const {return "eoOp";}; - //@} - - private: /// OpType is the type of the operator: how many operands it takes and how many it produces OpType opType; - - - }; -/** Binary genetic operator: subclasses eoOp, and defines - -basically the operator() with two operands - -*/ +/** Binary genetic operator: subclasses eoOp, and defines basically the + * operator() with two operands + */ template class eoBinOp: public eoOp { - public: - - - /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies only the first operand. - */ - virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoBinOp";}; - readFrom and printOn are directly inherited from eoObject - - */ - - //@{ - - /** Inherited from eoObject - - @see eoObject - - */ - - virtual string className() const {return "eoBinOp";}; - - //@} - - - + //@} }; -/** Quadratic genetic operator: subclasses eoOp, and defines - -basically the operator() with two operands - +/** Quadratic genetic operator: subclasses eoOp, and defines basically the + operator() with two operands */ template class eoQuadraticOp: public eoOp { - public: - - - /// Ctor - eoQuadraticOp() - - :eoOp( eoOp::quadratic ) {}; - - + :eoOp( eoOp::quadratic ) {}; /// Copy Ctor - eoQuadraticOp( const eoQuadraticOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoQuadraticOp() {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - - readFrom and printOn are directly inherited from eoObject - - */ - - //@{ - - /** Inherited from eoObject - - @see eoObject - - */ - - virtual string className() const {return "eoBinOp";}; - - //@} - - - + readFrom and printOn are directly inherited from eoObject + */ + + //@{ + /** Inherited from eoObject + @see eoObject + + */ + virtual string className() const {return "eoBinOp";}; + + //@} }; -/** eoMonOp is the monary operator: genetic operator that takes - - only one EO - -*/ +/** eoMonOp is the monary operator: genetic operator that takes only one EO */ template class eoMonOp: public eoOp { - public: - - - /// Ctor - eoMonOp( ) - - : eoOp( eoOp::unary ) {}; - - + : eoOp( eoOp::unary ) {}; /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject + readFrom and printOn are directly inherited from eoObject + */ - readFrom and printOn are directly inherited from eoObject - - */ - - //@{ - - /** Inherited from eoObject - - @see eoObject - - */ - - virtual string className() const {return "eoMonOp";}; - - //@} - + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoMonOp";}; + //@} }; @@ -403,68 +213,39 @@ template class eoIndiSelector; - template class eoInserter; - /** - * eGeneralOp: General genetic operator; for objects used to transform sets - - of EOs. Nary ("orgy") operators should be derived from this class - -*/ + * of EOs. Nary ("orgy") operators should be derived from this class + */ template class eoGeneralOp: public eoOp - { - public: - - - /// Ctor that honors its superclass - - eoGeneralOp(): eoOp( eoOp::general ) {}; - - + eoGeneralOp(): eoOp( eoOp::general ) {} /// Virtual dtor - - virtual ~eoGeneralOp () {}; - - + virtual ~eoGeneralOp () {} /** Method that really does the stuff. Applies the genetic operator - to a individuals dispensed by an eoIndividualSelector, - - and puts the results in the eoIndividualInserter. - - Any number of inputs can be requested and any number of outputs - - can be produced. - + and puts the results in the eoIndividualInserter. + Any number of inputs can be requested and any number of outputs + can be produced. */ virtual void operator()( eoIndiSelector& _in, - eoInserter& _out) const = 0; - - - virtual string className() const {return "eoGeneralOp";}; - + virtual string className() const {return "eoGeneralOp";} }; - - - - #endif diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index f02b4f5d6..e10edb93b 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -40,7 +40,7 @@ const unsigned MAXLINELENGTH=1024; #include // para string //----------------------------------------------------------------------------- -#include +#include "eoPrintable.h" using namespace std; diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am new file mode 100644 index 000000000..baa2c3b39 --- /dev/null +++ b/eo/src/es/Makefile.am @@ -0,0 +1,8 @@ +############################################################################### +## +## Makefile.am for eo/src/es +## +############################################################################### + +libeoincdir = $(includedir)/eo/es +libeoinc_HEADERS = eoESFullChrom.h eoESChrom.h eoESFullMut.h diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am new file mode 100644 index 000000000..558e06443 --- /dev/null +++ b/eo/src/ga/Makefile.am @@ -0,0 +1,8 @@ +############################################################################### +## +## Makefile.am for eo/src/ga +## +############################################################################### + +libeoincdir = $(includedir)/eo/ga +libeoinc_HEADERS = eoBin.h eoBitOp.h eoBitOpFactory.h diff --git a/eo/src/gp/Makefile.am b/eo/src/gp/Makefile.am new file mode 100644 index 000000000..bdbf6a661 --- /dev/null +++ b/eo/src/gp/Makefile.am @@ -0,0 +1,8 @@ +############################################################################### +## +## Makefile.am for eo/src/gp +## +############################################################################### + +libeoincdir = $(includedir)/eo/gp +libeoinc_HEADERS = eoParseTree.h node_pool.h parse_tree.h diff --git a/eo/src/obsolete/Makefile.am b/eo/src/obsolete/Makefile.am new file mode 100644 index 000000000..56fae4df6 --- /dev/null +++ b/eo/src/obsolete/Makefile.am @@ -0,0 +1,13 @@ +############################################################################### +## +## Makefile.am for eo/src/obsolete +## +############################################################################### + +INCLUDES = -I$(top_builddir)/src + +lib_LIBRARIES = libeoobsolete.a +libeoobsolete_a_SOURCES = eoParserUtils.cpp + +libeoobsoleteincdir = $(includedir)/eo/obsolete +libeoobsoleteinc_HEADERS = eoProblem.h eoParser.h eoParserUtils.h diff --git a/eo/src/obsolete/eoParserUtils.h b/eo/src/obsolete/eoParserUtils.h index 6ee91d505..742c4b58c 100644 --- a/eo/src/obsolete/eoParserUtils.h +++ b/eo/src/obsolete/eoParserUtils.h @@ -14,8 +14,8 @@ Modifications.: #ifndef EO_PARSER_UTILS #define EO_PARSER_UTILS -#include -#include +#include "../utils/eoRNG.h" +#include "eoParser.h" /// Reproducible random seed //---------------------------------- diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am new file mode 100644 index 000000000..e65ba2e2b --- /dev/null +++ b/eo/src/other/Makefile.am @@ -0,0 +1,13 @@ +############################################################################### +## +## Makefile.am for eo/src/other +## +############################################################################### + +INCLUDES = -I$(top_builddir)/src + +lib_LIBRARIES = libeoother.a +libeoother_a_SOURCES = eoExternalOpFunctions.cpp + +libeootherincdir = $(includedir)/eo/other +libeootherinc_HEADERS = eoExternalEO.h eoString.h eoStringMutation.h diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 294b26bd7..7efe7786d 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -35,33 +35,33 @@ template class eoExternalEO : public EO, virtual public External { - public : +public : - typedef External Type; + typedef External Type; - eoExternalEO(void) : EO(), Base() {} - eoExternalEO(istream& is) : EO(), Base() { readFrom(is); } + eoExternalEO(void) : EO(), Base() {} + eoExternalEO(istream& is) : EO(), Base() { readFrom(is); } - /** - * Read object.\\ - * @param _is a istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is) - { - EO::readFrom(is); - throw runtime_excpetion("Reading not defined yet"); - } + /** + * Read object.\\ + * @param _is a istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) + { + EO::readFrom(is); + throw runtime_exception("Reading not defined yet"); + } - /** - * Write object. Called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const - { - EO::printOn(is); - throw runtime_excpetion("Writing not defined yet"); - } + /** + * Write object. Called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const + { + EO::printOn(is); + throw runtime_excpetion("Writing not defined yet"); + } }; diff --git a/eo/src/other/eoExternalOpFunctions.cpp b/eo/src/other/eoExternalOpFunctions.cpp index 88f246544..80d59c61b 100644 --- a/eo/src/other/eoExternalOpFunctions.cpp +++ b/eo/src/other/eoExternalOpFunctions.cpp @@ -28,9 +28,9 @@ #ifndef eoExternalOpFunc_h #define eoExternalOpFunc_h -#include "eoExternalEO.h" -#include "eoOps.h" -#include "eoRnd.h" +#include +#include +#include template class eoExternalInitFunc @@ -38,4 +38,6 @@ class eoExternalInitFunc public : -}; \ No newline at end of file +}; + +#endif diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am new file mode 100644 index 000000000..294ad82c6 --- /dev/null +++ b/eo/src/utils/Makefile.am @@ -0,0 +1,13 @@ +############################################################################### +## +## Makefile.am for eo/src/utils +## +############################################################################### + +INCLUDES = -I$(top_builddir)/src + +lib_LIBRARIES = libeoutils.a +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/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 5f2abb78a..063e4dbcb 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -82,8 +82,8 @@ #define EO_RANDOM_NUMBER_GENERATOR -#include -#include +#include "../eoPersistent.h" +#include "../eoObject.h" // TODO: check for various compilers if this is exactly 32 bits // Unfortunately MSVC's preprocessor does not comprehends sizeof() From 28219fcc1216dab2cc2e75f855ce7a82a055ebf1 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 30 Mar 2000 18:02:03 +0000 Subject: [PATCH 0151/2134] 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; From c7eccdbe13ca7d0f41e0184be2780d05f5b93e28 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 30 Mar 2000 18:15:14 +0000 Subject: [PATCH 0152/2134] adding const... leaving as is --- eo/src/eoInclusion.h | 2 +- eo/src/eoPopOps.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index c776aaafd..c4e17a179 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -55,7 +55,7 @@ template class eoInclusion: public eoMerge /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoMerge";}; + virtual string className() const {return "eoInclusion";}; //@} }; diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index d92f00db6..b719ec238 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -92,8 +92,7 @@ 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 () (const eoPop& _parents, - eoPop& _siblings ) = 0; + virtual void operator () (eoPop& _parents, eoPop& _siblings ) = 0; /** @name Methods from eoObject */ //@{ From 6d5d34ba1f12dc69a33d69c730e354eab0b973ea Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 31 Mar 2000 10:00:22 +0000 Subject: [PATCH 0153/2134] Added a className member --- eo/src/eoGenTerm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/eoGenTerm.h b/eo/src/eoGenTerm.h index b6fc60f53..a3a0ef19a 100644 --- a/eo/src/eoGenTerm.h +++ b/eo/src/eoGenTerm.h @@ -74,7 +74,9 @@ public: virtual unsigned totalGenerations( ) { return repTotalGenerations; }; - + + std::string className(void) const { return "eoGenTerm"; } + private: unsigned repTotalGenerations, thisGeneration; }; From 9bcf9d95f89f3389a5b4dfb8674e38463c143a8d Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 31 Mar 2000 10:02:18 +0000 Subject: [PATCH 0154/2134] Finalized Checkpointing, see t-eoCheckpointing for a test --- eo/src/utils/checkpointing | 6 ++ eo/src/utils/eoCheckPoint.h | 75 ++++++++++++++++++++ eo/src/utils/eoFileMonitor.cpp | 58 ++++++++++++++++ eo/src/utils/eoFileMonitor.h | 47 +++++++++++++ eo/src/utils/eoMonitor.h | 53 ++++++++++++++ eo/src/utils/eoParam.h | 58 ++++++++++++++-- eo/src/utils/eoParser.cpp | 2 +- eo/src/utils/eoStat.h | 122 +++++++++++++++++++++++++++++++++ eo/src/utils/eoState.cpp | 4 +- eo/src/utils/eoState.h | 2 +- eo/src/utils/eoUpdater.cpp | 36 ++++++++++ eo/src/utils/eoUpdater.h | 106 ++++++++++++++++++++++++++++ 12 files changed, 558 insertions(+), 11 deletions(-) create mode 100644 eo/src/utils/checkpointing create mode 100644 eo/src/utils/eoCheckPoint.h create mode 100644 eo/src/utils/eoFileMonitor.cpp create mode 100644 eo/src/utils/eoFileMonitor.h create mode 100644 eo/src/utils/eoMonitor.h create mode 100644 eo/src/utils/eoStat.h create mode 100644 eo/src/utils/eoUpdater.cpp create mode 100644 eo/src/utils/eoUpdater.h diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing new file mode 100644 index 000000000..f13ac85a7 --- /dev/null +++ b/eo/src/utils/checkpointing @@ -0,0 +1,6 @@ + +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h new file mode 100644 index 000000000..537b60cda --- /dev/null +++ b/eo/src/utils/eoCheckPoint.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCheckPoint.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCheckPoint_h +#define _eoCheckPoint_h + +#include + +template class eoStatBase; +class eoMonitor; +class eoUpdater; + +template +class eoCheckPoint : public eoTerm +{ +public : + + eoCheckPoint(eoTerm& _term) : term(_term) {} + + bool operator()(const eoPop& _pop); + + void add(eoStatBase& _stat) { stats.push_back(&_stat); } + void add(eoMonitor& _mon) { monitors.push_back(&_mon); } + void add(eoUpdater& _upd) { updaters.push_back(&_upd); } + + std::string className(void) const { return "eoCheckPoint"; } + +private : + + eoTerm& term; + std::vector*> stats; + std::vector monitors; + std::vector updaters; +}; + +template +bool eoCheckPoint::operator()(const eoPop& _pop) +{ + unsigned i; + for (i = 0; i < stats.size(); ++i) + (*stats[i])(_pop); + + for (i = 0; i < updaters.size(); ++i) + (*updaters[i])(); + + for (i = 0; i < monitors.size(); ++i) + (*monitors[i])(); + + return term(_pop); +} + +#endif \ No newline at end of file diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp new file mode 100644 index 000000000..f0c0047c1 --- /dev/null +++ b/eo/src/utils/eoFileMonitor.cpp @@ -0,0 +1,58 @@ +#include +#include +#include + +#include +#include +#include + +using namespace std; + +void eoFileMonitor::operator()(void) +{ + if (firsttime) + { + firsttime = false; + + // create file + ofstream os(filename.c_str()); + + if (!os) + { + string str = "eoFileMonitor: Could not open " + filename; + throw runtime_error(str); + } + + iterator it = begin(); + + os << (*it)->longName(); + + ++it; + + for (; it != end(); ++it) + { + os << ',' << (*it)->longName(); + } + } + // ok, now the real saving. append to file + + ofstream os(filename.c_str(), ios_base::app); + + if (!os) + { + string str = "eoFileMonitor: Could not append to " + filename; + throw runtime_error(str); + } + + iterator it = begin(); + + os << '\n' << (*it)->getValue(); + + for(++it; it != end(); ++it) + { + os << ',' << (*it)->getValue(); + } + + // and we're there +} + diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h new file mode 100644 index 000000000..6263a8ec4 --- /dev/null +++ b/eo/src/utils/eoFileMonitor.h @@ -0,0 +1,47 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFileMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFileMonitor_h +#define _eoFileMonitor_h + +#include + +#include +#include + +class eoFileMonitor : public eoMonitor +{ +public : + eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim), firsttime(true) {} + void operator()(void); + +private : + std::string filename; + std::string delim; + bool firsttime; +}; + +#endif \ No newline at end of file diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h new file mode 100644 index 000000000..3348403c4 --- /dev/null +++ b/eo/src/utils/eoMonitor.h @@ -0,0 +1,53 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParam.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoMonitor_h +#define _eoMonitor_h + + +#include + +class eoParam; + +/** + The abstract monitor class is a vector of parameter pointers. Use + either push_back a pointer or add a reference to a parameter. + Derived classes will then implement the operator()(void) which + will stream or pipe the current values of the parameters to wherever you + want it streamed or piped to. +*/ +class eoMonitor : public std::vector +{ +public : + + virtual ~eoMonitor() {} + + virtual void operator()(void) = 0; + + void add(const eoParam& _param) { push_back(&_param); } +}; + +#endif \ No newline at end of file diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 1fe4dd273..fed8a5259 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -30,6 +30,7 @@ //----------------------------------------------------------------------------- #include #include +#include /** eoParam: Base class for monitoring and parsing parameters @@ -41,7 +42,7 @@ public: /** Empty constructor - called from outside any parser */ eoParam () - : repLongName(""), repDescription(""), repDefault(""), + : repLongName(""), repDefault(""), repDescription(""), repShortHand(0), repRequired(false){} /** @@ -54,9 +55,9 @@ public: */ eoParam (std::string _longName, std::string _default, std::string _description, char _shortName = 0, bool _required = false) - : repShortHand(_shortName), repLongName(_longName), - repDescription(_description ), repDefault(_default), - repRequired( _required) {} + : repLongName(_longName), repDefault(_default), + repDescription(_description ), + repShortHand(_shortName), repRequired( _required) {} /** * Virtual destructor is needed. @@ -64,7 +65,7 @@ public: virtual ~eoParam () {}; /** - * Pure virtual function to get the value out. + * Pure virtual function to get the value out. */ virtual std::string getValue ( void ) const = 0; @@ -118,6 +119,9 @@ private: eoValueParam: templatized derivation of eoParam. Can be used to contain any scalar value type. It makes use of std::strstream to get and set values. This should be changed to std::stringstream when that class is available in g++. + + Note also that there is a template specialization for pair and + for vector. These stream their contents delimited with whitespace. */ template @@ -136,10 +140,10 @@ public : */ eoValueParam (ValueType _defaultValue, std::string _longName, - std::string _description, + std::string _description = "No description", char _shortHand = 0, bool _required = false) - : repValue(_defaultValue), eoParam(_longName, "", _description, _shortHand, _required) + : eoParam(_longName, "", _description, _shortHand, _required), repValue(_defaultValue) { eoParam::defValue(getValue()); } @@ -165,6 +169,46 @@ private : ValueType repValue; }; +/// Because MSVC does not support partial specialization, the pair is a double, not a T +template <> +std::string eoValueParam >::getValue(void) const +{ + std::ostrstream os; + os << repValue.first << ' ' << repValue.second << std::ends; + return os.str(); +} + +/// Because MSVC does not support partial specialization, the pair is a double, not a T +template <> +void eoValueParam >::setValue(std::string _value) +{ + std::istrstream is(_value.c_str()); + is >> repValue.first; + is >> repValue.second; +} + +/// Because MSVC does not support partial specialization, the vector is a double, not a T +template <> +std::string eoValueParam >::getValue(void) const +{ + std::ostrstream os; + os << repValue.size() << ' '; + std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); + os << std::ends; + return os.str(); +} + +/// Because MSVC does not support partial specialization, the vector is a double, not a T +template <> +void eoValueParam >::setValue(std::string _value) +{ + std::istrstream is(_value.c_str()); + unsigned sz; + is >> sz; + repValue.resize(sz); + std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); +} + /*template class eoContainerParam : public eoParam { diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 3058bfbaf..6fd16b2e6 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -29,7 +29,7 @@ std::ostream& printSectionHeader(std::ostream& os, std::string section) eoParameterLoader::~eoParameterLoader() { - for (int i = 0; i < ownedParams.size(); ++i) + for (unsigned i = 0; i < ownedParams.size(); ++i) { delete ownedParams[i]; } diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h new file mode 100644 index 000000000..0ae641130 --- /dev/null +++ b/eo/src/utils/eoStat.h @@ -0,0 +1,122 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoStat_h +#define _eoStat_h + +#include +#include + +template +class eoStatBase +{ +public : + virtual ~eoStatBase(){} + + virtual void operator()(const eoPop& _pop) = 0; +}; + +template +class eoStat : public eoValueParam, public eoStatBase +{ +public : + eoStat(T _value, std::string _description) : eoValueParam(_value, _description) {} + + virtual void operator()(const eoPop& _pop) = 0; +}; + +#include + +/** + Average fitness of a population, fitness needs to be scalar. +*/ +template +class eoAverageStat : public eoStat +{ +public : + eoAverageStat(std::string _description = "AverageFitness") : eoStat(0.0, _description) {} + + static double sumFitness(double _sum, const EOT& eot) + { + _sum += _eot.fitness(); + return _sum; + } + + eoAverageStat(double _value, std::string _desc) : eoStat(_value, _desc) {} + + virtual void operator()(const eoPop& _pop) + { + double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness); + + value() = v / pop.size(); + } +}; + +template +class eoSecondMomentStats : public eoStat > +{ +public : + typedef std::pair SquarePair; + eoSecondMomentStats(std::string _description = "Average & Stdev") : eoStat(std::make_pair(0.0,0.0), _description) {} + + static SquarePair sumOfSquares(SquarePair _sq, const EOT& _eo) + { + double fitness = _eo.fitness(); + + _sq.first += fitness; + _sq.second += fitness * fitness; + return _sq; + } + + virtual void operator()(const eoPop& _pop) + { + SquarePair result = std::accumulate(_pop.begin(), _pop.end(), std::make_pair(0.0, 0.0), eoSecondMomentStats::sumOfSquares); + + double n = _pop.size(); + value().first = result.first / n; // average + value().second = sqrt( (result.second - value().first) / (n - 1.0)); // stdev + } +}; + +/* +template +class eoStdevStat : public eoStat +{ +public : + typedef typename eoSecondMomentStats::SquarePair SquarePair; + + eoStdevStat(std::string _description = "Stdev") : eoStat(0.0, _description) {} + + virtual void operator()(const eoPop& _pop) + { + SquarePair result = std::accumulate(pop.begin(), pop.end(), std::make_pair(0.0, 0.0), eoSecondMomentStats::sumOfSquares); + + double n = pop.size(); + value() = sqrt( (result.second - (result.first / n)) / (n - 1.0)); // stdev + } +}; +*/ +#endif diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index e1e2dd4c8..5a14e743f 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -115,7 +115,7 @@ void eoState::load(const string& _filename) } -void eoState::save(const string& filename) +void eoState::save(const string& filename) const { // saves in order of insertion ofstream os(filename.c_str()); @@ -125,7 +125,7 @@ void eoState::save(const string& filename) throw runtime_error(msg); } - for (vector::iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) + for (vector::const_iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) { os << "\\section{" << (*it)->first << "}\n"; (*it)->second->printOn(os); diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index e505f55f6..fd50cc9b8 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -71,7 +71,7 @@ public : * * @param _filename the name of the file to save into */ - void save(const std::string& _filename); + void save(const std::string& _filename) const; private : std::string createObjectName(eoObject* obj); diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp new file mode 100644 index 000000000..9bcdc1f87 --- /dev/null +++ b/eo/src/utils/eoUpdater.cpp @@ -0,0 +1,36 @@ +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + + +#include + +#include +#include + +using namespace std; + +void eoTimedStateSaver::operator()(void) +{ + time_t now = time(0); + + if (now >= last_time + interval) + { + last_time = now; + + ostrstream os; + os << prefix << (now - first_time) << '.' << extension << ends; + state.save(os.str()); + } +} + +void eoCountedStateSaver::operator()(void) +{ + if (++counter % interval == 0) + { + ostrstream os; + os << prefix << counter << '.' << extension << ends; + state.save(os.str()); + } +}; + diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h new file mode 100644 index 000000000..f877bf113 --- /dev/null +++ b/eo/src/utils/eoUpdater.h @@ -0,0 +1,106 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUpdater.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoUpdater_h +#define _eoUpdater_h + +/** + eoUpdater is a generic procudere for updating whatever you want. + It is about as abstract as you can get. +*/ +class eoUpdater +{ +public : + /// virtual classes have virtual dtors + virtual ~eoUpdater(void) {} + + /** + does the work, what it is is quite undefined + */ + virtual void operator()(void) = 0; +}; + +/** +*/ +template +class eoIncrementor : public eoUpdater +{public : + eoIncrementor(T& _counter, T _stepsize = 1) : counter(_counter), stepsize(_stepsize) {} + + virtual void operator()() + { + counter += stepsize; + } + +private: + T& counter; + T stepsize; +}; + +#include + +/** +*/ +class eoTimedStateSaver : public eoUpdater +{ +public : + eoTimedStateSaver(time_t _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav") : state(_state), + interval(_interval), last_time(time(0)), first_time(time(0)), + prefix(_prefix), extension(_extension) {} + + void operator()(void); + +private : + const eoState& state; + + const time_t interval; + time_t last_time; + const time_t first_time; + const std::string prefix; + const std::string extension; +}; + +/** +*/ +class eoCountedStateSaver : public eoUpdater +{ +public : + eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav") + : state(_state), interval(_interval), counter(0), + prefix(_prefix), extension(_extension) {} + + void operator()(void); + +private : + const eoState& state; + const unsigned interval; + unsigned counter; + + const std::string prefix; + const std::string extension; +}; + +#endif \ No newline at end of file From 9823af7c093c63d70464e9d0ad41049e7910df74 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 31 Mar 2000 10:04:39 +0000 Subject: [PATCH 0155/2134] Finalized Checkpointing, renamed t-testSta.... to t-eoStateAndParser added a checkpoint tester, but did not yet update the Makefiles as I don't have automake on my machine --- eo/test/t-eoCheckpointing.cpp | 173 ++++++++++++++ eo/test/t-eoESFull.cpp | 220 +++++++++--------- ...teAndParser.cpp => t-eoStateAndParser.cpp} | 24 +- 3 files changed, 303 insertions(+), 114 deletions(-) create mode 100644 eo/test/t-eoCheckpointing.cpp rename eo/test/{t-testStateAndParser.cpp => t-eoStateAndParser.cpp} (82%) diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp new file mode 100644 index 000000000..ee4ac0a97 --- /dev/null +++ b/eo/test/t-eoCheckpointing.cpp @@ -0,0 +1,173 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include // runtime_error + +//----------------------------------------------------------------------------- +// tt.cpp: +// +//----------------------------------------------------------------------------- + + +// general +#include // Random number generators +#include +#include +#include + +//----------------------------------------------------------------------------- + +// include package checkpointing +#include +#include + +struct Dummy : public EO +{ + typedef double Type; +}; + + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s = 2) { resize(s); } +}; + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ // ok, we have a command line parser and a state + + typedef eoBin Chrom; + + eoParser parser(argc, argv); + + // Define Parameters + eoValueParam& chrom_size = parser.createParam(unsigned(2), "chrom-size", "Chromosome size"); + eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); + eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); + eoValueParam seed(time(0), "seed", "Random number seed"); + eoValueParam load_name("", "Load","Load",'L'); + eoValueParam save_name("", "Save","Save",'S'); + + // Register them + parser.processParam(rate, "Genetic Operators"); + parser.processParam(factor, "Genetic Operators"); + parser.processParam(load_name, "Persistence"); + parser.processParam(save_name, "Persistence"); + parser.processParam(seed, "Rng seeding"); + + eoState state; + state.registerObject(parser); + + if (load_name.value() != "") + { // load the parser. This is only neccessary when the user wants to + // be able to change the parameters in the state file by hand. + state.load(load_name.value()); // load the parser + } + + // Create the algorithm here + typedef Dummy EoType; + + eoDummyPop pop; + + eoGenTerm genTerm(5); // 5 generations + + eoCheckPoint checkpoint(genTerm); + + eoValueParam generationCounter(0, "Generation"); + eoIncrementor increment(generationCounter.value()); + + checkpoint.add(increment); + + eoFileMonitor monitor("monitor.csv"); + checkpoint.add(monitor); + + monitor.add(generationCounter); + + eoSecondMomentStats stats; + + checkpoint.add(stats); + monitor.add(stats); + + eoCountedStateSaver stateSaver1(3, state, "generation"); // save every third generation + eoTimedStateSaver stateSaver2(2, state, "time"); // save every 2 seconds + + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + + // Register the algorithm + state.registerObject(rng); + state.registerObject(pop); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + return 0; + } + + // Either load or initialize + if (load_name.value() != "") + { + state.load(load_name.value()); // load the rest + } + else + { + // else + + // initialize rng and population + + rng.reseed(seed.value()); + + pop.resize(2); + + pop[0].fitness(1); + pop[1].fitness(2); + } + + while(checkpoint(pop)) + { + pop[0].fitness(pop[0].fitness() + 1); + + time_t now = time(0); + + while (time(0) == now) {} // wait a second to test timed saver + + cout << "gen " << generationCounter.value() << endl; + } + + // run the algorithm + + // Save when needed + if (save_name.value() != "") + { + string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); + } + + for (int i = 0; i < 100; ++i) + rng.rand(); + + cout << "a random number is " << rng.random(1024) << endl;; + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + return 1; +} \ No newline at end of file diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 71e573762..71df2f2e3 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -1,107 +1,113 @@ -// Program to test several EO-ES features - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include - -using namespace std; - -// general -#include // though contained in all others! -// evolution specific -#include -//#include -//#include -// representation specific - -#include // though contained in following -//#include -//#include -//#include -// this fitness -#include "real_value.h" // the sphere fitness - -// Now the main -/////////////// -typedef eoESFullChrom Ind; - -main(int argc, char *argv[]) { -// unsigned mu, lambda; -// bool comma; - - // Create the command-line parser - Parser parser( argc, argv, "Basic EA for vector with adaptive mutations"); - - //reproducible random seed - thanks, Maarten - InitRandom(parser); - - // a first Ind, reading its parameters from the parser - // will be used later to inialize the whole population - Ind FirstEO(parser); - - // Evaluation - // here we should call some parser-based constructor, - // as many evaluation function need parameters - // and also have some preliminary stuffs to do - eoEvalFuncPtr eval( real_value ); - - /* - // Evolution and population parameters - eoScheme the_scheme(parser); - - // recombination and mutation operators, reading their parameters from the parser - eoESReco MyReco(parser, FirstEO); - eoESMutate MyMut(parser, FirstEO); - - // termination conditions read by the parser - eoTermVector the_terms(parser); - - // Initialization of the population - // shoudl be called using the parser, in case you want to read from file(s) - eoESRandomize randomize; // an eoESInd randomnizer - eoPop pop(the_scheme.PopSize(), FirstEO, randomize); - // eval(pop); // shoudl we call it from inside the constructor??? - - // ALL parmeters have been read: write them out - // Writing the parameters on arv[0].status - // but of course this can be modified - see the example parser.cpp - parser.outputParam(); - // except the help parameter??? - if( parser.getBool("-h" , "--help" , "Shows this help")) { - parser.printHelp(); - exit(1); - } - - unsigned i, iind; - - - cout << "Initial population: \n" << endl; - for (i = 0; i < pop.size(); ++i) { - eval(pop[i]); - cout << pop[i].fitness() << "\t" << pop[i] << endl; - } - - // the Operators - eoSequentialOpHolder seqholder; - // seqholder.addOp(MyReco, 1.0); - seqholder.addOp(MyMut, 1.0); - - // One generation - eoEvolStep evol_scheme(the_scheme, seqholder, eval); - - // the algorithm: - eoFullEA ea(evol_scheme, the_terms); - - ea(pop); - - cout << "Final population: \n" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i].fitness() << "\t" << pop[i] << endl; - */ - return 0; -} - +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace std; + +#include + +// evolution specific +#include + +// representation specific +#include // though contained in following +//#include +//#include +//#include +// this fitness +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoESFullChrom Ind; + +main(int argc, char *argv[]) { +// unsigned mu, lambda; +// bool comma; + + // Create the command-line parser + Parser parser( argc, argv, "Basic EA for vector with adaptive mutations"); + + // Define Parameters and load them + eoValueParam& seed = parser.createParam(time(0), "seed", "Random number seed"); + eoValueParam& load_name = parser.createParam("", "Load","Load a state file",'L'); + eoValueParam& save_name = parser.createParam("", "Save","Saves a state file",'S'); + + eoState state; + state.registerObject(parser); + + if (load_name.value() != "") + { // load the parser. This is only neccessary when the user wants to + // be able to change the parameters in the state file by hand. + state.load(load_name.value()); // load the parser + } + + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + + + /* + // Evolution and population parameters + eoScheme the_scheme(parser); + + // recombination and mutation operators, reading their parameters from the parser + eoESReco MyReco(parser, FirstEO); + eoESMutate MyMut(parser, FirstEO); + + // termination conditions read by the parser + eoTermVector the_terms(parser); + + // Initialization of the population + // shoudl be called using the parser, in case you want to read from file(s) + eoESRandomize randomize; // an eoESInd randomnizer + eoPop pop(the_scheme.PopSize(), FirstEO, randomize); + // eval(pop); // shoudl we call it from inside the constructor??? + + // ALL parmeters have been read: write them out + // Writing the parameters on arv[0].status + // but of course this can be modified - see the example parser.cpp + parser.outputParam(); + // except the help parameter??? + if( parser.getBool("-h" , "--help" , "Shows this help")) { + parser.printHelp(); + exit(1); + } + + unsigned i, iind; + + + cout << "Initial population: \n" << endl; + for (i = 0; i < pop.size(); ++i) { + eval(pop[i]); + cout << pop[i].fitness() << "\t" << pop[i] << endl; + } + + // the Operators + eoSequentialOpHolder seqholder; + // seqholder.addOp(MyReco, 1.0); + seqholder.addOp(MyMut, 1.0); + + // One generation + eoEvolStep evol_scheme(the_scheme, seqholder, eval); + + // the algorithm: + eoFullEA ea(evol_scheme, the_terms); + + ea(pop); + + cout << "Final population: \n" << endl; + for (i = 0; i < pop.size(); ++i) + cout << pop[i].fitness() << "\t" << pop[i] << endl; + */ + return 0; +} + + diff --git a/eo/test/t-testStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp similarity index 82% rename from eo/test/t-testStateAndParser.cpp rename to eo/test/t-eoStateAndParser.cpp index 87f0a8c91..e058db3a8 100644 --- a/eo/test/t-testStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -1,7 +1,9 @@ //----------------------------------------------------------------------------- // to avoid long name warnings +#ifdef _MSC_VER #pragma warning(disable:4786) +#endif #include // runtime_error @@ -19,6 +21,15 @@ //----------------------------------------------------------------------------- +// include package checkpointing +#include +#include + +struct Dummy : public EO +{ + typedef double Type; +}; + //----------------------------------------------------------------------------- @@ -30,7 +41,7 @@ int the_main(int argc, char **argv) eoParser parser(argc, argv); // Define Parameters - eoValueParam chrom_size(2, "chrom-size", "Chromosome size"); + eoValueParam& chrom_size = parser.createParam(unsigned(2), "chrom-size", "Chromosome size"); eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); eoValueParam seed(time(0), "seed", "Random number seed"); @@ -38,12 +49,11 @@ int the_main(int argc, char **argv) eoValueParam save_name("", "Save","Save",'S'); // Register them - parser.processParam(chrom_size, "Representation"); - parser.processParam(rate, "Genetic Operators"); - parser.processParam(factor, "Genetic Operators"); - parser.processParam(load_name, "Persistence"); - parser.processParam(save_name, "Persistence"); - parser.processParam(seed, "Rng seeding"); + parser.processParam(rate, "Genetic Operators"); + parser.processParam(factor, "Genetic Operators"); + parser.processParam(load_name, "Persistence"); + parser.processParam(save_name, "Persistence"); + parser.processParam(seed, "Rng seeding"); eoState state; state.registerObject(parser); From 1fb9e6ceb7110833508088e9d8e16b76294358bf Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 31 Mar 2000 10:14:15 +0000 Subject: [PATCH 0156/2134] Added checkpointing to the makefile, but have to test it later on a Linux box --- eo/src/utils/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 2a474e018..1be8edc02 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 eoUpdater.cpp eoFileMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h +libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h From f07b16a5750612cf0f538966d5479c942a67579a Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 31 Mar 2000 14:33:13 +0000 Subject: [PATCH 0157/2134] more fix in makefiles --- eo/src/Makefile.am | 9 +-------- eo/test/Makefile.am | 6 +++--- eo/test/Makefile.in | 6 +++--- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 59bfd6c16..ae2e74974 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,13 +8,6 @@ SUBDIRS = es ga gp obsolete utils # other lib_LIBRARIES = libeo.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 \ - 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 +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 \ No newline at end of file diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 580c19222..e11388113 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,13 +4,13 @@ ## ############################################################################### -DEPS = $(top_builddir)/src/libeo.a +DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a EXTRA_DIST = LICENSE ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/ga -I$(top_builddir)/src/utils -LDADDS = $(top_builddir)/src/libeo.a +INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/es -I$(top_builddir)/src/ga -I$(top_builddir)/src/gp -I$(top_builddir)/src/obsolete -I$(top_builddir)/src/utils +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 95304ceb0..554fe6ea0 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -77,13 +77,13 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ -DEPS = $(top_builddir)/src/libeo.a +DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a EXTRA_DIST = LICENSE ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/ga -I$(top_builddir)/src/utils -LDADDS = $(top_builddir)/src/libeo.a +INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/es -I$(top_builddir)/src/ga -I$(top_builddir)/src/gp -I$(top_builddir)/src/obsolete -I$(top_builddir)/src/utils +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### From e6e9dbeaf43ceb9005495f1b26a6762d01d789aa Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 31 Mar 2000 14:34:50 +0000 Subject: [PATCH 0158/2134] Makefile.in don't need to be in cvs --- eo/test/Makefile.in | 665 -------------------------------------------- 1 file changed, 665 deletions(-) delete mode 100644 eo/test/Makefile.in diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in deleted file mode 100644 index 554fe6ea0..000000000 --- a/eo/test/Makefile.in +++ /dev/null @@ -1,665 +0,0 @@ -# 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 -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -############################################################################### -############################################################################### - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -AS = @AS@ -CC = @CC@ -CXX = @CXX@ -DLLTOOL = @DLLTOOL@ -LD = @LD@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -OBJDUMP = @OBJDUMP@ -PACKAGE = @PACKAGE@ -RANLIB = @RANLIB@ -VERSION = @VERSION@ - -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a -EXTRA_DIST = LICENSE - -############################################################################### - -INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/es -I$(top_builddir)/src/ga -I$(top_builddir)/src/gp -I$(top_builddir)/src/obsolete -I$(top_builddir)/src/utils -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a - -############################################################################### - -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps t-eoAtomOps t-selectOne t-eoaltbreeder t-eoGeneralOps t-eoGOpSel t-eoVector - - -############################################################################### - -t_eoVector_SOURCES = t-eoVector.cpp -t_eoVector_DEPENDENCIES = $(DEPS) -t_eoVector_LDFLAGS = -lm -t_eoVector_LDADD = $(LDADDS) - -############################################################################### - -t_eoGOpSel_SOURCES = t-eoGOpSel.cpp -t_eoGOpSel_DEPENDENCIES = $(DEPS) -t_eoGOpSel_LDFLAGS = -lm -t_eoGOpSel_LDADD = $(LDADDS) - -############################################################################### - -t_eoGeneralOps_SOURCES = t-eoGeneralOps.cpp -t_eoGeneralOps_DEPENDENCIES = $(DEPS) -t_eoGeneralOps_LDFLAGS = -lm -t_eoGeneralOps_LDADD = $(LDADDS) - -############################################################################### - -t_eoaltbreeder_SOURCES = t-eoaltbreeder.cpp -t_eoaltbreeder_DEPENDENCIES = $(DEPS) -t_eoaltbreeder_LDFLAGS = -lm -t_eoaltbreeder_LDADD = $(LDADDS) - -############################################################################### - -t_selectOne_SOURCES = t-selectOne.cpp -t_selectOne_DEPENDENCIES = $(DEPS) -t_selectOne_LDFLAGS = -lm -t_selectOne_LDADD = $(LDADDS) - -############################################################################### - -t_eoAtomOps_SOURCES = t-eoAtomOps.cpp -t_eoAtomOps_DEPENDENCIES = $(DEPS) -t_eoAtomOps_LDFLAGS = -lm -t_eoAtomOps_LDADD = $(LDADDS) - -############################################################################### - -t_eoESOps_SOURCES = t-eoESOps.cpp -t_eoESOps_DEPENDENCIES = $(DEPS) -t_eoESOps_LDFLAGS = -lm -t_eoESOps_LDADD = $(LDADDS) - -############################################################################### - -t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -t_eoESFull_DEPENDENCIES = $(DEPS) -t_eoESFull_LDFLAGS = -lm -t_eoESFull_LDADD = $(LDADDS) - -############################################################################### - -t_eoNonUniform_SOURCES = t-eoNonUniform.cpp -t_eoNonUniform_DEPENDENCIES = $(DEPS) -t_eoNonUniform_LDFLAGS = -lm -t_eoNonUniform_LDADD = $(LDADDS) - -############################################################################### - -t_eoUniform_SOURCES = t-eoUniform.cpp -t_eoUniform_DEPENDENCIES = $(DEPS) -t_eoUniform_LDFLAGS = -lm -t_eoUniform_LDADD = $(LDADDS) - -############################################################################### - -t_eoRandom_SOURCES = t-eoRandom.cpp -t_eoRandom_DEPENDENCIES = $(DEPS) -t_eoRandom_LDFLAGS = -lm -t_eoRandom_LDADD = $(LDADDS) - -############################################################################### - -t_eogeneration_SOURCES = t-eogeneration.cpp -t_eogeneration_DEPENDENCIES = $(DEPS) -t_eogeneration_LDFLAGS = -lm -t_eogeneration_LDADD = $(LDADDS) - -############################################################################### - -t_eoEasyEA_SOURCES = t-eoEasyEA.cpp binary_value.h -t_eoEasyEA_DEPENDENCIES = $(DEPS) -t_eoEasyEA_LDFLAGS = -lm -t_eoEasyEA_LDADD = $(LDADDS) - -############################################################################### - -t_eobreeder_SOURCES = t-eobreeder.cpp binary_value.h -t_eobreeder_DEPENDENCIES = $(DEPS) -t_eobreeder_LDFLAGS = -lm -t_eobreeder_LDADD = $(LDADDS) - -############################################################################### - -t_eoinclusion_SOURCES = t-eoinclusion.cpp -t_eoinclusion_DEPENDENCIES = $(DEPS) -t_eoinclusion_LDFLAGS = -lm -t_eoinclusion_LDADD = $(LDADDS) - -############################################################################### - -t_eoinsertion_SOURCES = t-eoinsertion.cpp -t_eoinsertion_DEPENDENCIES = $(DEPS) -t_eoinsertion_LDFLAGS = -lm -t_eoinsertion_LDADD = $(LDADDS) - -############################################################################### - -t_eo_SOURCES = t-eo.cpp -t_eo_DEPENDENCIES = $(DEPS) -t_eo_LDADD = $(LDADDS) - -############################################################################### - -t_eofitness_SOURCES = t-eofitness.cpp -t_eofitness_DEPENDENCIES = $(DEPS) -t_eofitness_LDADD = $(LDADDS) - -############################################################################### - -t_eoproblem_SOURCES = t-eoproblem.cpp -t_eoproblem_LDFLAGS = -lm - -############################################################################### - -t_eobin_SOURCES = t-eobin.cpp -t_eobin_DEPENDENCIES = $(DEPS) -t_eobin_LDADD = $(LDADDS) - -############################################################################### - -t_eolottery_SOURCES = t-eolottery.cpp -t_eolottery_DEPENDENCIES = $(DEPS) -t_eolottery_LDFLAGS = -lm -t_eolottery_LDADD = $(LDADDS) - -############################################################################### - -t_eo2dVector_SOURCES = t-eo2dVector.cc -t_eo2dVector_DEPENDENCIES = $(DEPS) -t_eo2dVector_LDFLAGS = -lm -t_eo2dVector_LDADD = $(LDADDS) - -############################################################################### - -t_parser_SOURCES = t-parser.cpp -t_parser_DEPENDENCIES = $(DEPS) -t_parser_LDFLAGS = -lm -t_parser_LDADD = $(LDADDS) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) - - -DEFS = @DEFS@ -I. -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -t_eobreeder_OBJECTS = t-eobreeder.o -t_eoinclusion_OBJECTS = t-eoinclusion.o -t_eoinsertion_OBJECTS = t-eoinsertion.o -t_eo_OBJECTS = t-eo.o -t_eo_LDFLAGS = -t_eofitness_OBJECTS = t-eofitness.o -t_eofitness_LDFLAGS = -t_eoproblem_OBJECTS = t-eoproblem.o -t_eoproblem_LDADD = $(LDADD) -t_eoproblem_DEPENDENCIES = -t_eobin_OBJECTS = t-eobin.o -t_eobin_LDFLAGS = -t_eolottery_OBJECTS = t-eolottery.o -t_eo2dVector_OBJECTS = t-eo2dVector.o -t_eogeneration_OBJECTS = t-eogeneration.o -t_eoEasyEA_OBJECTS = t-eoEasyEA.o -t_eoNonUniform_OBJECTS = t-eoNonUniform.o -t_eoUniform_OBJECTS = t-eoUniform.o -t_eoRandom_OBJECTS = t-eoRandom.o -t_parser_OBJECTS = t-parser.o -t_eoESFull_OBJECTS = t-eoESFull.o -t_eoESOps_OBJECTS = t-eoESOps.o -t_eoAtomOps_OBJECTS = t-eoAtomOps.o -t_selectOne_OBJECTS = t-selectOne.o -t_eoaltbreeder_OBJECTS = t-eoaltbreeder.o -t_eoGeneralOps_OBJECTS = t-eoGeneralOps.o -t_eoGOpSel_OBJECTS = t-eoGOpSel.o -t_eoVector_OBJECTS = t-eoVector.o -CXXFLAGS = @CXXFLAGS@ -CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = Makefile.am Makefile.in - - -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) - -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 test/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -mostlyclean-noinstPROGRAMS: - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -distclean-noinstPROGRAMS: - -maintainer-clean-noinstPROGRAMS: - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -.s.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -.S.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -maintainer-clean-libtool: - -t-eobreeder: $(t_eobreeder_OBJECTS) $(t_eobreeder_DEPENDENCIES) - @rm -f t-eobreeder - $(CXXLINK) $(t_eobreeder_LDFLAGS) $(t_eobreeder_OBJECTS) $(t_eobreeder_LDADD) $(LIBS) - -t-eoinclusion: $(t_eoinclusion_OBJECTS) $(t_eoinclusion_DEPENDENCIES) - @rm -f t-eoinclusion - $(CXXLINK) $(t_eoinclusion_LDFLAGS) $(t_eoinclusion_OBJECTS) $(t_eoinclusion_LDADD) $(LIBS) - -t-eoinsertion: $(t_eoinsertion_OBJECTS) $(t_eoinsertion_DEPENDENCIES) - @rm -f t-eoinsertion - $(CXXLINK) $(t_eoinsertion_LDFLAGS) $(t_eoinsertion_OBJECTS) $(t_eoinsertion_LDADD) $(LIBS) - -t-eo: $(t_eo_OBJECTS) $(t_eo_DEPENDENCIES) - @rm -f t-eo - $(CXXLINK) $(t_eo_LDFLAGS) $(t_eo_OBJECTS) $(t_eo_LDADD) $(LIBS) - -t-eofitness: $(t_eofitness_OBJECTS) $(t_eofitness_DEPENDENCIES) - @rm -f t-eofitness - $(CXXLINK) $(t_eofitness_LDFLAGS) $(t_eofitness_OBJECTS) $(t_eofitness_LDADD) $(LIBS) - -t-eoproblem: $(t_eoproblem_OBJECTS) $(t_eoproblem_DEPENDENCIES) - @rm -f t-eoproblem - $(CXXLINK) $(t_eoproblem_LDFLAGS) $(t_eoproblem_OBJECTS) $(t_eoproblem_LDADD) $(LIBS) - -t-eobin: $(t_eobin_OBJECTS) $(t_eobin_DEPENDENCIES) - @rm -f t-eobin - $(CXXLINK) $(t_eobin_LDFLAGS) $(t_eobin_OBJECTS) $(t_eobin_LDADD) $(LIBS) - -t-eolottery: $(t_eolottery_OBJECTS) $(t_eolottery_DEPENDENCIES) - @rm -f t-eolottery - $(CXXLINK) $(t_eolottery_LDFLAGS) $(t_eolottery_OBJECTS) $(t_eolottery_LDADD) $(LIBS) - -t-eo2dVector: $(t_eo2dVector_OBJECTS) $(t_eo2dVector_DEPENDENCIES) - @rm -f t-eo2dVector - $(CXXLINK) $(t_eo2dVector_LDFLAGS) $(t_eo2dVector_OBJECTS) $(t_eo2dVector_LDADD) $(LIBS) - -t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) - @rm -f t-eogeneration - $(CXXLINK) $(t_eogeneration_LDFLAGS) $(t_eogeneration_OBJECTS) $(t_eogeneration_LDADD) $(LIBS) - -t-eoEasyEA: $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_DEPENDENCIES) - @rm -f t-eoEasyEA - $(CXXLINK) $(t_eoEasyEA_LDFLAGS) $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_LDADD) $(LIBS) - -t-eoNonUniform: $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_DEPENDENCIES) - @rm -f t-eoNonUniform - $(CXXLINK) $(t_eoNonUniform_LDFLAGS) $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_LDADD) $(LIBS) - -t-eoUniform: $(t_eoUniform_OBJECTS) $(t_eoUniform_DEPENDENCIES) - @rm -f t-eoUniform - $(CXXLINK) $(t_eoUniform_LDFLAGS) $(t_eoUniform_OBJECTS) $(t_eoUniform_LDADD) $(LIBS) - -t-eoRandom: $(t_eoRandom_OBJECTS) $(t_eoRandom_DEPENDENCIES) - @rm -f t-eoRandom - $(CXXLINK) $(t_eoRandom_LDFLAGS) $(t_eoRandom_OBJECTS) $(t_eoRandom_LDADD) $(LIBS) - -t-parser: $(t_parser_OBJECTS) $(t_parser_DEPENDENCIES) - @rm -f t-parser - $(CXXLINK) $(t_parser_LDFLAGS) $(t_parser_OBJECTS) $(t_parser_LDADD) $(LIBS) - -t-eoESFull: $(t_eoESFull_OBJECTS) $(t_eoESFull_DEPENDENCIES) - @rm -f t-eoESFull - $(CXXLINK) $(t_eoESFull_LDFLAGS) $(t_eoESFull_OBJECTS) $(t_eoESFull_LDADD) $(LIBS) - -t-eoESOps: $(t_eoESOps_OBJECTS) $(t_eoESOps_DEPENDENCIES) - @rm -f t-eoESOps - $(CXXLINK) $(t_eoESOps_LDFLAGS) $(t_eoESOps_OBJECTS) $(t_eoESOps_LDADD) $(LIBS) - -t-eoAtomOps: $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_DEPENDENCIES) - @rm -f t-eoAtomOps - $(CXXLINK) $(t_eoAtomOps_LDFLAGS) $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_LDADD) $(LIBS) - -t-selectOne: $(t_selectOne_OBJECTS) $(t_selectOne_DEPENDENCIES) - @rm -f t-selectOne - $(CXXLINK) $(t_selectOne_LDFLAGS) $(t_selectOne_OBJECTS) $(t_selectOne_LDADD) $(LIBS) - -t-eoaltbreeder: $(t_eoaltbreeder_OBJECTS) $(t_eoaltbreeder_DEPENDENCIES) - @rm -f t-eoaltbreeder - $(CXXLINK) $(t_eoaltbreeder_LDFLAGS) $(t_eoaltbreeder_OBJECTS) $(t_eoaltbreeder_LDADD) $(LIBS) - -t-eoGeneralOps: $(t_eoGeneralOps_OBJECTS) $(t_eoGeneralOps_DEPENDENCIES) - @rm -f t-eoGeneralOps - $(CXXLINK) $(t_eoGeneralOps_LDFLAGS) $(t_eoGeneralOps_OBJECTS) $(t_eoGeneralOps_LDADD) $(LIBS) - -t-eoGOpSel: $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_DEPENDENCIES) - @rm -f t-eoGOpSel - $(CXXLINK) $(t_eoGOpSel_LDFLAGS) $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_LDADD) $(LIBS) - -t-eoVector: $(t_eoVector_OBJECTS) $(t_eoVector_DEPENDENCIES) - @rm -f t-eoVector - $(CXXLINK) $(t_eoVector_LDFLAGS) $(t_eoVector_OBJECTS) $(t_eoVector_LDADD) $(LIBS) -.cc.o: - $(CXXCOMPILE) -c $< -.cc.lo: - $(LTCXXCOMPILE) -c $< -.cpp.o: - $(CXXCOMPILE) -c $< -.cpp.lo: - $(LTCXXCOMPILE) -c $< - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -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 $$/$$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: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile $(PROGRAMS) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ - mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ - clean-depend clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-noinstPROGRAMS distclean-compile \ - 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-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." - -maintainer-clean: maintainer-clean-am - -.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ -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 \ -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 - - -############################################################################### - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: From b5606ad11aa0c1559a8c098a36c49533a68a174e Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 31 Mar 2000 16:23:16 +0000 Subject: [PATCH 0159/2134] Maarten was right --- eo/src/eoAtomCreep.h | 2 +- eo/src/eoAtomMutation.h | 2 +- eo/src/eoGOpSelector.h | 2 +- eo/src/eoWrappedOps.h | 2 +- eo/src/es/eoESFullChrom.h | 4 ++-- eo/src/es/eoESFullMut.h | 6 +++--- eo/test/Makefile.am | 11 +++++++++-- eo/test/real_value.h | 2 +- eo/test/t-eoAtomOps.cpp | 2 +- eo/test/t-eoESFull.cpp | 2 +- eo/test/t-eoESOps.cpp | 6 +++--- eo/test/t-eoGOpSel.cpp | 4 ++-- eo/test/t-eoGeneralOps.cpp | 2 +- eo/test/t-eobreeder.cpp | 4 ++-- eo/test/t-eoinclusion.cpp | 2 +- eo/test/t-parser.cpp | 6 +++--- eo/test/t-selectOne.cpp | 4 ++-- 17 files changed, 35 insertions(+), 28 deletions(-) diff --git a/eo/src/eoAtomCreep.h b/eo/src/eoAtomCreep.h index b31c56baa..05fda7642 100644 --- a/eo/src/eoAtomCreep.h +++ b/eo/src/eoAtomCreep.h @@ -25,7 +25,7 @@ #ifndef _EOATOMCREEP_H #define _EOATOMCREEP_H -#include +#include #include /** With uniform probability, decrements or increments by one the value. diff --git a/eo/src/eoAtomMutation.h b/eo/src/eoAtomMutation.h index 7d86d521b..3ecec82f7 100644 --- a/eo/src/eoAtomMutation.h +++ b/eo/src/eoAtomMutation.h @@ -30,7 +30,7 @@ // EO includes #include #include -#include +#include #include /** Atomic mutation of an EO. Acts on containers, and applies a mutation diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 91ecca3b3..c2ec4fa43 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -34,7 +34,7 @@ #include #include "eoOpSelector.h" #include "eoWrappedOps.h" // for eoCombinedOp -#include "eoRNG.h" +#include using namespace std; diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h index 10e4fb36e..83b99bdbd 100644 --- a/eo/src/eoWrappedOps.h +++ b/eo/src/eoWrappedOps.h @@ -32,7 +32,7 @@ //----------------------------------------------------------------------------- #include // eoOp, eoMonOp, eoBinOp -#include "eoRNG.h" +#include using namespace std; diff --git a/eo/src/es/eoESFullChrom.h b/eo/src/es/eoESFullChrom.h index 85bd4f228..04090c466 100644 --- a/eo/src/es/eoESFullChrom.h +++ b/eo/src/es/eoESFullChrom.h @@ -34,7 +34,7 @@ // EO includes #include -#include +#include /**@name Chromosomes for evolution strategies Each chromosome in an evolution strategies is composed of a vector of floating point values plus a vector of sigmas, that are added to them during mutation and a vector of correlations @@ -84,7 +84,7 @@ class eoESFullChrom : public eoVector { /* And now the useful constructor: from a parser (should be in the factory, if such a thing exists one day for eoESFullChrom */ - eoESFullChrom(Parser & parser) : StdDev(0), CorCff(0) { + eoESFullChrom(eoParser & parser) : StdDev(0), CorCff(0) { parser.AddTitle("Description of ES individuals"); int num_genes, num_sigma; bool correlated_mutations; diff --git a/eo/src/es/eoESFullMut.h b/eo/src/es/eoESFullMut.h index 37b6c4724..d4cc7ce72 100644 --- a/eo/src/es/eoESFullMut.h +++ b/eo/src/es/eoESFullMut.h @@ -29,11 +29,11 @@ #ifndef _EOESMUT_H #define _EOESMUT_H -#include -#include +#include +#include #include // for exp -#include +#include #include #ifndef M_PI diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index e11388113..075e54424 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,7 +9,7 @@ EXTRA_DIST = LICENSE ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/es -I$(top_builddir)/src/ga -I$(top_builddir)/src/gp -I$(top_builddir)/src/obsolete -I$(top_builddir)/src/utils +INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### @@ -18,7 +18,7 @@ noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps\ t-eoAtomOps t-selectOne t-eoaltbreeder t-eoGeneralOps t-eoGOpSel \ - t-eoVector + t-eoVector t-eoCheckpointing ############################################################################### @@ -177,3 +177,10 @@ t_parser_LDFLAGS = -lm t_parser_LDADD = $(LDADDS) ############################################################################### + +t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp +t_eoCheckpointing_DEPENDENCIES = $(DEPS) +t_eoCheckpointing_LDFLAGS = -lm +t_eoCheckpointing_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/test/real_value.h b/eo/test/real_value.h index 68415519e..324ecae8d 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -1,4 +1,4 @@ -#include +#include //----------------------------------------------------------------------------- diff --git a/eo/test/t-eoAtomOps.cpp b/eo/test/t-eoAtomOps.cpp index 715fffc5e..020c30173 100644 --- a/eo/test/t-eoAtomOps.cpp +++ b/eo/test/t-eoAtomOps.cpp @@ -42,7 +42,7 @@ using namespace std; #include // Several EOs -#include +#include // RNGs #include diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 71df2f2e3..eae0e9811 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -32,7 +32,7 @@ main(int argc, char *argv[]) { // bool comma; // Create the command-line parser - Parser parser( argc, argv, "Basic EA for vector with adaptive mutations"); + eoParser parser( argc, argv, "Basic EA for vector with adaptive mutations"); // Define Parameters and load them eoValueParam& seed = parser.createParam(time(0), "seed", "Random number seed"); diff --git a/eo/test/t-eoESOps.cpp b/eo/test/t-eoESOps.cpp index 253a830e5..dc25ca99f 100644 --- a/eo/test/t-eoESOps.cpp +++ b/eo/test/t-eoESOps.cpp @@ -11,16 +11,16 @@ using namespace std; // general -#include // though contained in all others! +#include // though contained in all others! // evolution specific #include //#include //#include // representation specific -#include // though contained in following +#include // though contained in following //#include -#include +#include //#include // this fitness #include "real_value.h" // the sphere fitness diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index 3f7e41110..278303d51 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -28,9 +28,9 @@ // to avoid long name warnings #pragma warning(disable:4786) -#include "eoBin.h" // eoBin, eoPop, eoBreeder +#include // eoBin, eoPop, eoBreeder #include -#include +#include #include //#include diff --git a/eo/test/t-eoGeneralOps.cpp b/eo/test/t-eoGeneralOps.cpp index a14612125..821a82b18 100644 --- a/eo/test/t-eoGeneralOps.cpp +++ b/eo/test/t-eoGeneralOps.cpp @@ -43,7 +43,7 @@ using namespace std; #include // Several EOs -#include +#include // generalOp we are testing #include diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index d08b308d3..8b7fa2d73 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -27,9 +27,9 @@ // to avoid long name warnings #pragma warning(disable:4786) -#include // eoBin, eoPop, eoBreeder +#include // eoBin, eoPop, eoBreeder #include -#include +#include #include #include diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp index c0d3494c7..e2d49ae83 100644 --- a/eo/test/t-eoinclusion.cpp +++ b/eo/test/t-eoinclusion.cpp @@ -2,7 +2,7 @@ // t-eoinclusion.cpp //----------------------------------------------------------------------------- -#include +#include #include #include diff --git a/eo/test/t-parser.cpp b/eo/test/t-parser.cpp index 222039e3e..492d58a46 100644 --- a/eo/test/t-parser.cpp +++ b/eo/test/t-parser.cpp @@ -7,11 +7,11 @@ (c) geneura team, 1999 -----------------------------------------------------------------------------*/ -#include -#include +#include +#include #include -void GetOutputParam(Parser & parser, +void GetOutputParam(eoParser & parser, string & _string) { try { diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp index a6848a719..8304c5033 100644 --- a/eo/test/t-selectOne.cpp +++ b/eo/test/t-selectOne.cpp @@ -27,9 +27,9 @@ // to avoid long name warnings #pragma warning(disable:4786) -#include // eoBin, eoPop, eoBreeder +#include // eoBin, eoPop, eoBreeder #include -#include +#include #include #include From 902d88fef66423c6dd0b75263129d593668f2293 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 3 Apr 2000 09:32:43 +0000 Subject: [PATCH 0160/2134] adding & modifying .cvsignore's --- eo/src/es/.cvsignore | 6 ++++++ eo/src/ga/.cvsignore | 6 ++++++ eo/src/gp/.cvsignore | 6 ++++++ eo/src/obsolete/.cvsignore | 6 ++++++ eo/src/other/.cvsignore | 6 ++++++ eo/src/utils/.cvsignore | 6 ++++++ eo/test/.cvsignore | 6 ++++++ eo/win/.cvsignore | 6 ++++++ 8 files changed, 48 insertions(+) create mode 100644 eo/src/es/.cvsignore create mode 100644 eo/src/ga/.cvsignore create mode 100644 eo/src/gp/.cvsignore create mode 100644 eo/src/obsolete/.cvsignore create mode 100644 eo/src/other/.cvsignore create mode 100644 eo/src/utils/.cvsignore create mode 100644 eo/win/.cvsignore diff --git a/eo/src/es/.cvsignore b/eo/src/es/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/es/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/src/ga/.cvsignore b/eo/src/ga/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/ga/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/src/gp/.cvsignore b/eo/src/gp/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/gp/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/src/obsolete/.cvsignore b/eo/src/obsolete/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/obsolete/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/src/other/.cvsignore b/eo/src/other/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/other/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/src/utils/.cvsignore b/eo/src/utils/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/src/utils/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index e298e5c79..b63544335 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -1,6 +1,7 @@ *.o .deps Makefile +Makefile.in t-eo t-eobin t-eobreeder @@ -13,3 +14,8 @@ t-eogeneration t-eoNonUniform t-eo2dVector t-eoEasyEA +t-eoUniform +t-eoRandom +t-eoCheckpointing +t-eoVector +t-eoAtomOps diff --git a/eo/win/.cvsignore b/eo/win/.cvsignore new file mode 100644 index 000000000..69fb0bd82 --- /dev/null +++ b/eo/win/.cvsignore @@ -0,0 +1,6 @@ +*.lo +*.la +.deps +.libs +Makefile +Makefile.in From bf3370461005dc8badc22b8d728815b9a7fb8737 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 3 Apr 2000 09:51:29 +0000 Subject: [PATCH 0161/2134] too many EMPTY constructors --- eo/src/eoObject.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 3ceb25906..32790c8c9 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -27,11 +27,11 @@ //----------------------------------------------------------------------------- -#include "utils/eoData.h" // For limits definition +#include // For limits definition #include // istream, ostream #include // string -#include "utils/compatibility.h" +#include using namespace std; @@ -47,13 +47,6 @@ interface, but it class eoObject { public: - - /// Default Constructor. - eoObject() {} - - /// Copy constructor. - eoObject( const eoObject& ) {} - /// Virtual dtor. They are needed in virtual class hierarchies. virtual ~eoObject() {} From 06dab1f9146f638867b4373a0e41b4246546292a Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 3 Apr 2000 15:27:56 +0000 Subject: [PATCH 0162/2134] forgeting multiOps --- eo/test/.cvsignore | 1 + eo/test/t-eobin.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index b63544335..43edd83f6 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -19,3 +19,4 @@ t-eoRandom t-eoCheckpointing t-eoVector t-eoAtomOps +t-selectOne diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 55043ff06..494498995 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -131,6 +131,7 @@ main() << chrom << " " << chrom2 << endl; } + /* // Check multiOps eoMultiMonOp mOp( &next ); mOp.adOp( &bitflip ); @@ -144,6 +145,7 @@ main() cout << "before multiBinOp............ " << chrom << " " << chrom2 << endl; mbOp( chrom, chrom2 ); cout << "after multiBinOp .............. " << chrom << " " << chrom2 < Date: Mon, 3 Apr 2000 15:52:31 +0000 Subject: [PATCH 0163/2134] changing autonconfiguration to compile more examples and to create documentation --- eo/configure.in | 4 ++-- eo/test/t-eobin.cpp | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 49ca3bc1f..5cef794f1 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -5,11 +5,11 @@ AM_INIT_AUTOMAKE(eo) AC_PROG_CXX -#CXXFLAGS = -Wall -g +CXXFLAGS="-Wall -g" AM_PROG_LIBTOOL AM_MAINTAINER_MODE dnl add Makefiles that must be modified by the configuration here -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) +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 doc/Makefile) diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 494498995..48e6238e5 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -132,19 +132,19 @@ main() } /* - // Check multiOps - eoMultiMonOp mOp( &next ); - mOp.adOp( &bitflip ); - cout << "before multiMonOp............ " << chrom << endl; - mOp( chrom ); - cout << "after multiMonOp .............. " << chrom << endl; + // Check multiOps + eoMultiMonOp mOp( &next ); + mOp.adOp( &bitflip ); + cout << "before multiMonOp............ " << chrom << endl; + mOp( chrom ); + cout << "after multiMonOp .............. " << chrom << endl; - eoBinGxOver gxover(2, 4); - eoMultiBinOp mbOp( &gxover ); - mOp.adOp( &bitflip ); - cout << "before multiBinOp............ " << chrom << " " << chrom2 << endl; - mbOp( chrom, chrom2 ); - cout << "after multiBinOp .............. " << chrom << " " << chrom2 < gxover(2, 4); + eoMultiBinOp mbOp( &gxover ); + mOp.adOp( &bitflip ); + cout << "before multiBinOp............ " << chrom << " " << chrom2 << endl; + mbOp( chrom, chrom2 ); + cout << "after multiBinOp .............. " << chrom << " " << chrom2 < Date: Tue, 4 Apr 2000 11:00:18 +0000 Subject: [PATCH 0164/2134] initial .cvsignore --- eo/doc/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 eo/doc/.cvsignore diff --git a/eo/doc/.cvsignore b/eo/doc/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/eo/doc/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in From e35a59cdd610f01134533f7dd09383bc2366471e Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 4 Apr 2000 15:22:04 +0000 Subject: [PATCH 0165/2134] changing include style from ... to <...> --- eo/src/EO.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 91992f1ea..85a59c034 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -28,8 +28,8 @@ //----------------------------------------------------------------------------- #include // runtime_error -#include "eoObject.h" // -#include "eoPersistent.h" // +#include // eoObject +#include // eoPersistent //----------------------------------------------------------------------------- /** EO is a base class for evolvable objects, that is, the subjects of From 87cdfa00c4c6e50658954d166ac53db5a746a3d3 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 7 Apr 2000 09:04:50 +0000 Subject: [PATCH 0166/2134] no message --- eo/test/t-eobin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 48e6238e5..93cc9da0c 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -121,7 +121,7 @@ main() << chrom << " " << chrom2 << endl; } - for (float r = 0.1; r < 1.0; r += 0.1) + for (double r = 0.1; r < 1.0; r += 0.1) { eoUniformXOver uxover(r); fill(chrom.begin(), chrom.end(), false); @@ -132,6 +132,9 @@ main() } /* + + Commented this out, waiting for a definite decision what to do with the mOp's + // Check multiOps eoMultiMonOp mOp( &next ); mOp.adOp( &bitflip ); From 64a5d2de5838095403f635a1a5cfd086444b94b7 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 7 Apr 2000 14:23:59 +0000 Subject: [PATCH 0167/2134] updated Makefiles and removed a few unneeded files. note: ES files are pending --- eo/src/Makefile.am | 2 +- eo/src/eoProportionalGOpSel.h | 2 +- eo/src/eoProportionalGOpSelector.h | 55 ------------ eo/test/Makefile.am | 44 ++++------ eo/test/t-eoGOpSel.cpp | 23 ----- eo/test/t-eoGeneralOps.cpp | 71 --------------- eo/test/t-parser.cpp | 133 ----------------------------- 7 files changed, 17 insertions(+), 313 deletions(-) delete mode 100644 eo/src/eoProportionalGOpSelector.h delete mode 100644 eo/test/t-eoGeneralOps.cpp delete mode 100644 eo/test/t-parser.cpp diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index ae2e74974..dad358759 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -10,4 +10,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp 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 \ No newline at end of file +libeoinc_HEADERS = EO.h eoDup.h eoKill.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/eoProportionalGOpSel.h b/eo/src/eoProportionalGOpSel.h index bc7d1c083..68eb8ce61 100644 --- a/eo/src/eoProportionalGOpSel.h +++ b/eo/src/eoProportionalGOpSel.h @@ -39,7 +39,7 @@ public : /** Returns the operator proportionally selected */ virtual eoGeneralOp& selectOp() { - unsigned what = rng.roulette_wheel(rates); + unsigned what = rng.roulette_wheel(getRates()); return *operator[](what); } diff --git a/eo/src/eoProportionalGOpSelector.h b/eo/src/eoProportionalGOpSelector.h deleted file mode 100644 index 580b7bf1a..000000000 --- a/eo/src/eoProportionalGOpSelector.h +++ /dev/null @@ -1,55 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoProportionalGOpSelector.h - Proportional Generalized Operator Selector. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoProportionalGOpSelector_h -#define eoProportionalGOpSelector_h - -//----------------------------------------------------------------------------- - -#include "eoGOpSelector.h" - -/** eoProportionalGOpSel: do proportional selection, returns one of the - operators -*/ -template -class eoProportionalGOpSel : public eoGOpSelector -{ -public : - eoProportionalGOpSel() : eoGOpSelector() {} - - /** Returns the operator proportionally selected */ - virtual eoGeneralOp& selectOp() - { - unsigned what = rng.roulette_wheel(getRates()); - return *operator[](what); - } - - /// - virtual string className() const { return "eoGOpSelector"; }; -}; - -#endif - - diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 075e54424..33124b50b 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -16,8 +16,8 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete. noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ - t-eoNonUniform t-eoUniform t-eoRandom t-parser t-eoESFull t-eoESOps\ - t-eoAtomOps t-selectOne t-eoaltbreeder t-eoGeneralOps t-eoGOpSel \ + t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser \ + t-eoAtomOps t-selectOne t-eoGOpSel \ t-eoVector t-eoCheckpointing ############################################################################### @@ -36,20 +36,6 @@ t_eoGOpSel_LDADD = $(LDADDS) ############################################################################### -t_eoGeneralOps_SOURCES = t-eoGeneralOps.cpp -t_eoGeneralOps_DEPENDENCIES = $(DEPS) -t_eoGeneralOps_LDFLAGS = -lm -t_eoGeneralOps_LDADD = $(LDADDS) - -############################################################################### - -t_eoaltbreeder_SOURCES = t-eoaltbreeder.cpp -t_eoaltbreeder_DEPENDENCIES = $(DEPS) -t_eoaltbreeder_LDFLAGS = -lm -t_eoaltbreeder_LDADD = $(LDADDS) - -############################################################################### - t_selectOne_SOURCES = t-selectOne.cpp t_selectOne_DEPENDENCIES = $(DEPS) t_selectOne_LDFLAGS = -lm @@ -63,18 +49,18 @@ t_eoAtomOps_LDFLAGS = -lm t_eoAtomOps_LDADD = $(LDADDS) ############################################################################### - -t_eoESOps_SOURCES = t-eoESOps.cpp -t_eoESOps_DEPENDENCIES = $(DEPS) -t_eoESOps_LDFLAGS = -lm -t_eoESOps_LDADD = $(LDADDS) +#disabled +#t_eoESOps_SOURCES = t-eoESOps.cpp +#t_eoESOps_DEPENDENCIES = $(DEPS) +#t_eoESOps_LDFLAGS = -lm +#t_eoESOps_LDADD = $(LDADDS) ############################################################################### -t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -t_eoESFull_DEPENDENCIES = $(DEPS) -t_eoESFull_LDFLAGS = -lm -t_eoESFull_LDADD = $(LDADDS) +#t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +#t_eoESFull_DEPENDENCIES = $(DEPS) +#t_eoESFull_LDFLAGS = -lm +#t_eoESFull_LDADD = $(LDADDS) ############################################################################### @@ -171,10 +157,10 @@ t_eo2dVector_LDADD = $(LDADDS) ############################################################################### -t_parser_SOURCES = t-parser.cpp -t_parser_DEPENDENCIES = $(DEPS) -t_parser_LDFLAGS = -lm -t_parser_LDADD = $(LDADDS) +t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp +t_eoStateAndParser_DEPENDENCIES = $(DEPS) +t_eoStateAndParser_LDFLAGS = -lm +t_eoStateAndParser_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index 278303d51..efcae7e85 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -76,31 +76,8 @@ main() propSel.addOp(xover, 0.5); for ( i = 0; i < POP_SIZE; i ++ ) { eoGeneralOp& foo = propSel.selectOp(); - cout << foo.nInputs() << " " - << foo.nOutputs() << endl; } - // eoAltBreeder breeder( propSel ); - - - -// breeder(pop); - -// eoSequentialOpSelector::outIt > seqSel; - -// eoAltBreeder breeder2( seqSel ); -// seqSel.addOp(bitflip, 0.25); -// seqSel.addOp(xover, 0.75); - -// breeder2(pop); - -// // reevaluation of fitness -// for_each(pop.begin(), pop.end(), binary_value); - -// cout << "new population:" << endl; -// for (i = 0; i < pop.size(); ++i) -// cout << pop[i] << " " << pop[i].fitness() << endl; - return 0; } diff --git a/eo/test/t-eoGeneralOps.cpp b/eo/test/t-eoGeneralOps.cpp deleted file mode 100644 index 821a82b18..000000000 --- a/eo/test/t-eoGeneralOps.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - t-eoGeneralOps.cpp - Program that tests the General operator interface, and the wrappers - for monary and unary operators. - - (c) GeNeura Team, 1999 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - -*/ - -//-----------------------------------------------------------------------------// - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include - -using namespace std; - -// Operators we are going to test -#include -#include -#include -#include - -// Several EOs -#include - -// generalOp we are testing -#include - -main(int argc, char *argv[]) { - eoString aString("123456"); - eoAtomCreep creeper; - eoAtomMutation< eoString > mutator( creeper, 0.5 ); - - eoWrappedMonOp< eoString > wCreeper( mutator ); - cout << "Before aString " << aString; - mutator( aString); - cout << " after mutator " << aString; - - // Test now the alternative interface - eoPop< eoString > vIn, vOut; - insert_iterator > > ins( vOut, vOut.begin() ); - vIn.push_back( aString ); - wCreeper( vIn.begin(), ins ); - - cout << endl << "Before " << vIn[0] << endl << " after " << vOut[0] << endl;; - - return 0; // to avoid VC++ complaints -} - diff --git a/eo/test/t-parser.cpp b/eo/test/t-parser.cpp deleted file mode 100644 index 492d58a46..000000000 --- a/eo/test/t-parser.cpp +++ /dev/null @@ -1,133 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -/* parser.cpp - example of use of Parser.h - - (c) geneura team, 1999 ------------------------------------------------------------------------------*/ - -#include -#include -#include - -void GetOutputParam(eoParser & parser, - string & _string) { - - try { - parser.AddTitle("Separate parameter: the output file name"); - _string = parser.getString("-O", "--OutputFile", "", "The output file name" ); - } catch (logic_error & e) { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } catch (exception & e) { - cout << e.what() << endl; - exit(1); - } -} - -void sub(Parser & parser) { - int i; - cout << "Function sub:" << endl; - - try { - parser.AddTitle("Private parameters of subroutine sub"); - i = parser.getInt("-j", "--sint", "5", "private integer of subroutine" ); - } catch (logic_error & e) { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } catch (exception & e) { - cout << e.what() << endl; - exit(1); - } - - cout << "Read " << i << endl; -} - - -/// Uses the parser and returns param values -void getParams( Parser & parser, - unsigned & _integer, - float & _floating, - string & _string, - vector & _array, - bool & _boolean) { - - try { - _integer = parser.getInt("-i", "--int", "2", "interger number" ); - _floating = parser.getFloat("-f", "--float", "0.2", "floating point number" ); - _string = parser.getString("-s", "--string", "string", "a string" ); - _array = parser.getArray("-a", "--array", "a b", "an array enclosed within < >" ); - _boolean = parser.getBool("-b","--bool", "a bool value" ); - } - catch (logic_error & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - catch (exception & e) - { - cout << e.what() << endl; - exit(1); - } - -} - -int main( int argc, char* argv[]) { - - unsigned in; - float f; - string s; - vector a; - bool b; - - // Create the command-line parser - Parser parser( argc, argv, "Parser example"); - InitRandom(parser); - parser.AddTitle("General parameters"); - getParams(parser, in, f, s, a, b); - - cout << "\n integer: " << in << endl - << " float: "<< f << endl - << " string: /"<< s << "/" << endl - << " boolean: "<< b << endl - << " array: < "; - vector::const_iterator i; - for (i=a.begin() ; i" << endl << endl ; - - // call to the subroutine that also needs some parameters - sub(parser); - - // writing all parameters - // - // if programmer wishes, the name of the output file can be set as a parameter itself - // otherwise it will be argv[0].status - string OutputFileName; - GetOutputParam(parser, OutputFileName); - - parser.outputParam(OutputFileName); - if( parser.getBool("-h" , "--help" , "Shows this help")) { - parser.printHelp(); - exit(1); - } - - // but progrmamer should be careful to write the parser parameters - // after the last bit that uses it has finished - - - // Now the main body of the program - - for (int i=0; i<20; i++) { - cout << rng.normal() << endl; - } - cout << "C'est fini" << endl; - - return 0; -} - From ed4537545107701d2f21aff5e80179ac0e6d088c Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:41:29 +0000 Subject: [PATCH 0168/2134] Changed the general operator interface to be consistent with the rest of EO, updated some documentation. --- eo/src/eoBackInserter.h | 6 +- eo/src/eoDetTournamentIndiSelector.h | 5 +- eo/src/eoDetTournamentInserter.h | 7 ++- eo/src/eoFitness.h | 4 +- eo/src/eoGOpBreeder.h | 2 +- eo/src/eoGOpSelector.h | 11 +++- eo/src/eoIndiSelector.h | 35 +++++++---- eo/src/eoInserter.h | 9 ++- eo/src/eoOp.h | 5 ++ eo/src/eoRandomIndiSelector.h | 1 + eo/src/eoScalarFitness.h | 2 +- eo/src/eoSteadyStateInserter.h | 3 +- eo/src/eoStochTournamentInserter.h | 10 ++-- eo/src/eoTerm.h | 87 +++++++++++++++++++++++++--- eo/src/eoUniform.h | 23 ++++++++ eo/src/eoWrappedOps.h | 26 ++++----- eo/test/t-eoGOpSel.cpp | 52 +++++++++++++++-- 17 files changed, 233 insertions(+), 55 deletions(-) diff --git a/eo/src/eoBackInserter.h b/eo/src/eoBackInserter.h index 5e9faef70..79727870f 100644 --- a/eo/src/eoBackInserter.h +++ b/eo/src/eoBackInserter.h @@ -29,9 +29,10 @@ #ifndef eoBackInserter_h #define eoBackInserter_h -#include "eoInserter.h" +#include /** +\ingroup inserters * eoBackInserter: Interface class that enables an operator to insert new individuals at the back of the new population. */ @@ -42,9 +43,10 @@ class eoBackInserter : public eoPopInserter eoBackInserter(void) : eoPopInserter() {} - void insert(const EOT& _eot) + eoInserter& operator()(const EOT& _eot) { pop().push_back(_eot); + return *this; } string className(void) const { return "eoBackInserter"; } diff --git a/eo/src/eoDetTournamentIndiSelector.h b/eo/src/eoDetTournamentIndiSelector.h index d5c35df47..75d36c219 100644 --- a/eo/src/eoDetTournamentIndiSelector.h +++ b/eo/src/eoDetTournamentIndiSelector.h @@ -26,11 +26,12 @@ #define eoDetTournamentIndiSelector_h #include "eoIndiSelector.h" -#include "selectors.h" +#include "utils/selectors.h" /** - * eoDetTournamentIndiSelector: selects children through a deterministic_tournament +\ingroup selectors + * eoDetTournamentIndiSelector: selects children through a deterministic_tournament */ template class eoDetTournamentIndiSelector : public eoPopIndiSelector diff --git a/eo/src/eoDetTournamentInserter.h b/eo/src/eoDetTournamentInserter.h index bdc1dd0a7..c47777948 100644 --- a/eo/src/eoDetTournamentInserter.h +++ b/eo/src/eoDetTournamentInserter.h @@ -29,8 +29,8 @@ #define eoDetTournamentInserter_h -#include "eoSteadyStateInserter.h" -#include "selectors.h" +#include +#include /** * eoDetTournamentInserter: Uses an inverse deterministic tournament to figure @@ -50,13 +50,14 @@ class eoDetTournamentInserter : public eoSteadyStateInserter } } - void insert(const EOT& _eot) + eoInserter& operator()(const EOT& _eot) { EOT& eo = inverse_deterministic_tournament(pop(), t_size); eo = _eot; // overwrite loser of tournament eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves eval(eo); // Evaluate after insert + return *this; } string className(void) const { return "eoDetTournamentInserter"; } diff --git a/eo/src/eoFitness.h b/eo/src/eoFitness.h index ea514ae6f..c1e03fc33 100644 --- a/eo/src/eoFitness.h +++ b/eo/src/eoFitness.h @@ -25,7 +25,9 @@ #define EOFITNESS_H //----------------------------------------------------------------------------- - +/** +\deprecated This class will dissapear in time, use eoScalarFitness instead +*/ class eoFitness: public eoPersistent { public: diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index b4a2bdbb2..078428da2 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -40,7 +40,7 @@ class eoGOpBreeder: public eoMonPopOp for (unsigned i = 0; i < size; i++) { // and the one liner - opSel.selectOp()(selector(_pop,size, i), inserter(_pop)); + opSel.selectOp()(selector.bind(_pop,size, i), inserter.bind(_pop)); } } diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index c2ec4fa43..2bab833f2 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -55,8 +55,13 @@ public: } } - /// Add any kind of operator to the operator mix, with an argument - virtual ID addOp( eoOp& _op, float _arg ); + /* + Add any kind of operator to the operator mix, + @param _op operator, one of eoMonOp, eoBinOp, eoQuadraticOp or eoGeneralOp + @param _rate the rate at which it should be applied, it should be a probability + + */ + virtual ID addOp( eoOp& _op, float _rate ); // implementation can be found below /** Retrieve the operator using its integer handle @@ -79,7 +84,7 @@ public: return &selectOp(); } - /// + /// Select an operator from the operators present here virtual eoGeneralOp& selectOp() = 0; /// diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index a404f0d00..b2617e7c2 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -42,19 +42,29 @@ public : virtual ~eoIndiSelector(void) {} + /** + return the number of individuals that can be selected by an nary operator (through operator[] below) + */ virtual size_t size(void) const = 0; - virtual const EOT& operator[](size_t) const = 0; - virtual const EOT& select(void) = 0; + /** + return the specified individual, the size_t argument should be between 0 and eoIndiSelector::size() + */ + virtual const EOT& operator[](size_t i) const = 0; + + /** + Select an individual, maybe from an underlying population (see eoPopIndiSelector) + */ + virtual const EOT& operator()(void) = 0; + /// default implementation just calls operator() a couple of times + /// this can be overridden in favour of a more efficient implementation virtual vector select(size_t _how_many) - { // default implementation just calls select a couple of times - // this can be overridden in favour of a more efficient implementation - vector result(_how_many); + { vector result(_how_many); for (unsigned i = 0; i < _how_many; ++i) { - result[i] = &select(); + result[i] = &operator()(); } return result; @@ -79,9 +89,10 @@ class eoPopIndiSelector : public eoIndiSelector struct eoUnitializedException{}; - /** Initialization function + /** Initialization function, binds the population to the selector, can also + be used to specify an optional end and the first individual to return in operator() */ - eoPopIndiSelector& operator()(const eoPop& _pop, int _end = -1, int _myGuy = -1) + eoPopIndiSelector& bind(const eoPop& _pop, int _end = -1, int _myGuy = -1) { pop = &_pop; last = _end; @@ -102,8 +113,8 @@ class eoPopIndiSelector : public eoIndiSelector eoPop::const_iterator end(void) const { valid(); return pop->end(); } - /// select does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes - const EOT& select(void) + /// operator() does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes + const EOT& operator()(void) { valid(); if (firstChoice < 0 || firstChoice >= (int) size()) @@ -116,6 +127,10 @@ class eoPopIndiSelector : public eoIndiSelector return result; } + /** + do_select, abstract member re-implemented by derived classes + This function will get called by operator() when it ran out of choices + */ virtual const EOT& do_select(void) = 0; private : diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h index b651f5717..d2758bea2 100644 --- a/eo/src/eoInserter.h +++ b/eo/src/eoInserter.h @@ -36,14 +36,17 @@ new individuals into the (intermediate) population. */ template -class eoInserter : public eoObject +class eoInserter { public : virtual ~eoInserter() {} struct eoInserterException{}; - virtual void insert(const EOT&) = 0; // can throw an eoInserterException + /** + insert argument somewhere (quite likely a population) + */ + virtual eoInserter& operator()(const EOT&) = 0; // can throw an eoInserterException }; /** @@ -58,7 +61,7 @@ class eoPopInserter : public eoInserter eoPopInserter(void) : eoInserter(), thePop(0) {} /// Binds the population to this class. This is an initialization routine used by breeders - eoInserter& operator()(eoPop& _pop) + eoInserter& bind(eoPop& _pop) { thePop = &_pop; return *this; diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index e27051e15..6d4b147c3 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -27,6 +27,11 @@ #include #include +/** +\defgroup operators +Genetic Operators are used for various purposes +*/ + /** @name Genetic operators What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, those are the ones actually used here. \\#eoOp#s are only printable objects, so if you want to build them from a file, it has to be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own factory, which know how to build them from a description in a file. diff --git a/eo/src/eoRandomIndiSelector.h b/eo/src/eoRandomIndiSelector.h index 6eceec850..8d9a0ccda 100644 --- a/eo/src/eoRandomIndiSelector.h +++ b/eo/src/eoRandomIndiSelector.h @@ -29,6 +29,7 @@ #include "eoIndiSelector.h" /** +\ingroup selectors * eoRandomSelector: just selects a random child */ template diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 63409191c..46daad951 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -54,7 +54,7 @@ class eoScalarFitness operator ScalarType(void) const { return value; } - // Comparison, using less by default + /// Comparison, using less by default bool operator<(const eoScalarFitness& other) const { return Compare()(value, other.value); } diff --git a/eo/src/eoSteadyStateInserter.h b/eo/src/eoSteadyStateInserter.h index d22642943..1732c345c 100644 --- a/eo/src/eoSteadyStateInserter.h +++ b/eo/src/eoSteadyStateInserter.h @@ -29,7 +29,8 @@ #define eoSteadyStateInserter_h -#include "eoEvalFunc.h" +#include +#include /** * eoSteadyStateInserter: Interface class that enables an operator to update diff --git a/eo/src/eoStochTournamentInserter.h b/eo/src/eoStochTournamentInserter.h index 56bb8e709..dbd161b96 100644 --- a/eo/src/eoStochTournamentInserter.h +++ b/eo/src/eoStochTournamentInserter.h @@ -29,11 +29,12 @@ #define eoStochTournamentInserter_h -#include "eoSteadyStateInserter.h" -#include "selectors.h" +#include +#include /** - * eoDetTournamentInserter: Uses an inverse stochastic tournament to figure +\ingroup inserters + * eoStochTournamentInserter: Uses an inverse stochastic tournament to figure * out who gets overridden by the new individual. It resets the fitness of the * individual. */ @@ -55,13 +56,14 @@ class eoStochTournamentInserter : public eoSteadyStateInserter } } - void insert(const EOT& _eot) + eoInserter& operator()(const EOT& _eot) { EOT& eo = inverse_stochastic_tournament(pop(), t_rate); eo = _eot; // overwrite loser of tournament eo.invalidate(); eval(eo); // Evaluate after insert + return *this; } string className(void) const { return "eoStochTournamentInserter"; } diff --git a/eo/src/eoTerm.h b/eo/src/eoTerm.h index ca73901a6..e21b84ef3 100644 --- a/eo/src/eoTerm.h +++ b/eo/src/eoTerm.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoTerm.h -// (c) GeNeura Team, 1999 +// (c) GeNeura Team, 1999, 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -25,11 +25,17 @@ #ifndef _EOTERM_H #define _EOTERM_H -#include +//#include + +// forward definition for fast(er) compilation +template class eoPop; + /** Termination condition for the genetic algorithm * Takes the population as input, returns true for continue, - * false for termination + * false for termination (although this begs the question why this + * terminator is not called a continuator) + * */ template< class EOT> class eoTerm : public eoObject { @@ -44,10 +50,77 @@ public: of the object, for instance, updating local data. */ virtual bool operator() ( const eoPop< EOT >& _pop ) = 0 ; - - /// Class name. - virtual string className() const { return "eoTerm"; } - }; + +/** 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 + diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index 90df59fef..2c1f308da 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -66,6 +66,29 @@ class eoUniform: public eoRnd double diff; }; +template<> +class eoUniform: public eoRnd +{ + public: + /** + * Default constructor. + * @param _min The minimum value in the interval. + * @param _max The maximum value in the interval. + */ + eoUniform(bool _min = false, bool _max = true) + : eoRnd() {} + + /** Returns an uniform random number over the interval [min, max) + Uses global rng object */ + virtual bool operator()() { + return rng.flip(0.5); + } + + private: + T min; + double diff; +}; + //----------------------------------------------------------------------------- #endif diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h index 83b99bdbd..881db6e71 100644 --- a/eo/src/eoWrappedOps.h +++ b/eo/src/eoWrappedOps.h @@ -50,9 +50,9 @@ public : /// Instantiates the abstract method void operator()( eoIndiSelector& _in, eoInserter& _out) const { - EOT result = _in.select(); + EOT result = _in(); op( result ); - _out.insert(result); + _out(result); } /// @@ -78,10 +78,10 @@ public : /// Instantiates the abstract method. EOT should have copy ctor. void operator()(eoIndiSelector& _in, eoInserter& _out) const { - EOT out1 = _in.select(); - const EOT& out2 = _in.select(); + EOT out1 = _in(); + const EOT& out2 = _in(); op(out1, out2); - _out.insert(out1); + _out(out1); } /// @@ -105,11 +105,10 @@ public : /// Instantiates the abstract method. EOT should have copy ctor. void operator()(eoIndiSelector& _in, eoInserter& _out) const { - EOT out1 = _in.select(); - EOT out2 = _in.select(); + EOT out1 = _in(); + EOT out2 = _in(); op(out1, out2); - _out.insert(out1); - _out.insert(out2); + _out(out1)(out2); } /// @@ -154,11 +153,11 @@ public : size_t size() const { return in.size(); } const EOT& operator[](size_t _n) const { return in[_n]; } - const EOT& select(void) + const EOT& operator()(void) { if (results.empty()) { - return in.select(); + return in(); } // else we use the previously inserted individual, // an iterator to it is stored in 'results', but the memory @@ -169,10 +168,11 @@ public : return *it; } - void insert(const EOT& _eot) + eoInserter& operator()(const EOT& _eot) { intermediate.push_front(_eot); results.push_front(intermediate.begin()); + return *this; } void fill(eoInserter& _out) @@ -181,7 +181,7 @@ public : for (Iterator it = results.begin(); it != results.end(); ++it) { - _out.insert(**it); + _out(**it); } results.clear(); diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index efcae7e85..fbc7e8353 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -32,8 +32,17 @@ #include #include #include -//#include +#include +#include +#include +#include +#include + +#include + +#include +#include // Fitness evaluation #include "binary_value.h" @@ -46,6 +55,8 @@ typedef eoBin Chrom; main() { + rng.reseed(42); // reproducible random seed + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; unsigned i; @@ -68,16 +79,49 @@ main() eoBinBitFlip bitflip; eoBinCrossover xover; + eoEvalFuncPtr eval(binary_value); + //Create the proportional operator selector and add the // two operators creatd above to it. eoProportionalGOpSel propSel; + eoSequentialGOpSel seqSel; + propSel.addOp(bitflip, 0.5); propSel.addOp(xover, 0.5); - for ( i = 0; i < POP_SIZE; i ++ ) { - eoGeneralOp& foo = propSel.selectOp(); - } + // seqSel selects operator in sequence, creating a combined operator + // add a bitflip, an xover and another bitflip + seqSel.addOp(bitflip, 0.25); + seqSel.addOp(xover, 0.5); + seqSel.addOp(bitflip, 0.25); + + + eoRandomIndiSelector selector1; + eoDetTournamentIndiSelector selector2(2); + + eoBackInserter inserter1; + eoDetTournamentInserter inserter2(eval, 2); + eoStochTournamentInserter inserter3(eval, 0.9f); + + eoGOpBreeder breeder1(propSel, selector1); + eoGOpBreeder breeder2(seqSel, selector1); + eoGOpBreeder breeder3(propSel, selector2); + eoGOpBreeder breeder4(seqSel, selector2); + + // test the breeders + + breeder1(pop); + breeder2(pop); + breeder3(pop); + breeder4(pop); + + eoState state; + + state.registerObject(pop); + + state.save(std::cout); + return 0; } From fee9a330b11926d09fdc18acc377e000dc27ffb7 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:43:40 +0000 Subject: [PATCH 0169/2134] Added t-eoGOpSel. --- eo/test/Makefile.am | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 33124b50b..6c57d3d7e 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -18,7 +18,7 @@ noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser \ t-eoAtomOps t-selectOne t-eoGOpSel \ - t-eoVector t-eoCheckpointing + t-eoVector t-eoCheckpointing t-eoGOpSel ############################################################################### @@ -170,3 +170,10 @@ t_eoCheckpointing_LDFLAGS = -lm t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### + +t_eoGOpSel_SOURCES = t_eoGOpSel.cpp +t_eoGOpSel_DEPENDENCIES = $(DEPS) +t_eoGOpSel_LDFLAGS = -lm +t_eoGOpSel_LDADD = $(LDADDS) + +############################################################################### From 6e925bedea58bd03e63eb871a22ba56a6dc53924 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:44:53 +0000 Subject: [PATCH 0170/2134] Updated documentation to give proper include file in doxygen and define a module bitstring --- eo/src/ga/eoBin.h | 10 +++++++++- eo/src/ga/eoBitOp.h | 43 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/eo/src/ga/eoBin.h b/eo/src/ga/eoBin.h index 1d7ec4193..6ff794416 100644 --- a/eo/src/ga/eoBin.h +++ b/eo/src/ga/eoBin.h @@ -29,8 +29,16 @@ #include // string #include // EO +/** +\defgroup bitstring + + Various functions for a bitstring representation +*/ + /** eoBin: implementation of binary chromosome. - * based on STL's bit_vector (vector). +\class eoBin eoBin.h ga/eoBin.h +\ingroup bitstring + * based on STL's bit_vector (vector). */ template class eoBin: public eoVector { diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index b1bab4b5d..ef3137f25 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -15,6 +15,9 @@ /** @name BitWise Genetic operators +\class eoBinRandom eoBitOp.h ga/eoBitOp.h +\ingroup bitstring + Even as these operators might seem general, they are particular versions of genetic operators useful only for binary operators. As any set of genetic operators, it must have a factory that knows how to build them from a description @@ -47,7 +50,10 @@ template class eoBinRandom: public eoMonOp }; -/** eoBinBitFlip --> chages a bit */ +/** eoBinBitFlip --> changes a bit +\class eoBinBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinBitFlip: public eoMonOp { @@ -68,7 +74,10 @@ template class eoBinBitFlip: public eoMonOp }; -/** eoBinMutation --> classical mutation */ +/** eoBinMutation --> classical mutation +\class eoBinMutation eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinMutation: public eoMonOp { @@ -99,7 +108,10 @@ template class eoBinMutation: public eoMonOp }; -/** eoBinInversion: inverts the bits of the chromosome between an interval */ +/** eoBinInversion: inverts the bits of the chromosome between an interval +\class eoBinInversion eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinInversion: public eoMonOp { @@ -124,7 +136,10 @@ template class eoBinInversion: public eoMonOp }; -/** eoBinNext --> next binary value */ +/** eoBinNext --> next binary value +\class eoBinNext eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinNext: public eoMonOp { @@ -153,7 +168,10 @@ template class eoBinNext: public eoMonOp }; -/** eoBinPrev --> previos binary value */ +/** eoBinPrev --> previous binary value +\class eoBinPrev eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinPrev: public eoMonOp { @@ -182,7 +200,10 @@ template class eoBinPrev: public eoMonOp }; -/** eoBinCrossover --> classic 2-point crossover */ +/** eoBinCrossover --> classic 2-point crossover +\class eoBinCrossover eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinCrossover: public eoQuadraticOp { @@ -203,7 +224,10 @@ template class eoBinCrossover: public eoQuadraticOp }; -/** eoBinNxOver --> n-point crossover */ +/** eoBinNxOver --> n-point crossover +\class eoBinNxOver eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinNxOver: public eoQuadraticOp { @@ -261,7 +285,10 @@ template class eoBinNxOver: public eoQuadraticOp }; -/** eoBinGxOver --> gene crossover */ +/** eoBinGxOver --> gene crossover +\class eoBinGxOver eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ template class eoBinGxOver: public eoQuadraticOp { From f357a908bfd8de6308317eac4a814ac1af9fb10b Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:46:20 +0000 Subject: [PATCH 0171/2134] Updated documentation to give proper include file in doxygen and define a module selectors Also added a load(stream) and save(stream) to eoState --- eo/src/utils/eoFileMonitor.cpp | 4 ++-- eo/src/utils/eoMonitor.h | 3 ++- eo/src/utils/eoRNG.h | 5 +++-- eo/src/utils/eoStat.h | 5 +++-- eo/src/utils/eoState.cpp | 20 ++++++++++++++++++-- eo/src/utils/eoState.h | 14 ++++++++++++++ eo/src/utils/selectors.h | 4 ++++ 7 files changed, 46 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index f0c0047c1..43dbeb607 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -8,7 +8,7 @@ using namespace std; -void eoFileMonitor::operator()(void) +eoMonitor& eoFileMonitor::operator()(void) { if (firsttime) { @@ -53,6 +53,6 @@ void eoFileMonitor::operator()(void) os << ',' << (*it)->getValue(); } - // and we're there + return *this; } diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index 3348403c4..d79d8245e 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -45,7 +45,8 @@ public : virtual ~eoMonitor() {} - virtual void operator()(void) = 0; + /** Just do it! */ + virtual eoMonitor& operator()(void) = 0; void add(const eoParam& _param) { push_back(&_param); } }; diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 063e4dbcb..1dcd0a616 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -86,7 +86,7 @@ #include "../eoObject.h" // TODO: check for various compilers if this is exactly 32 bits -// Unfortunately MSVC's preprocessor does not comprehends sizeof() +// Unfortunately MSVC's preprocessor does not comprehend sizeof() // so neat preprocessing tricks will not work typedef unsigned long uint32; // Compiler and platform dependent! @@ -95,7 +95,8 @@ typedef unsigned long uint32; // Compiler and platform dependent! // eoRng //----------------------------------------------------------------------------- /** -eoRng is a persitent class that uses the ``Mersenne Twister'' random number generator MT19937 +\class eoRng eoRNG.h utils/eoRNG.h +eoRng is a persistent class that uses the ``Mersenne Twister'' random number generator MT19937 for generating random numbers. The various member functions implement useful functions for evolutionary algorithms. Included are: rand(), random(), flip() and normal(). diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 0ae641130..92a8c7940 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -36,6 +36,9 @@ class eoStatBase public : virtual ~eoStatBase(){} + /** + calculate some statistic on the population + */ virtual void operator()(const eoPop& _pop) = 0; }; @@ -44,8 +47,6 @@ class eoStat : public eoValueParam, public eoStatBase { public : eoStat(T _value, std::string _description) : eoValueParam(_value, _description) {} - - virtual void operator()(const eoPop& _pop) = 0; }; #include diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index 5a14e743f..d69c23d34 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -61,7 +61,18 @@ void eoState::registerObject(eoPersistent& registrant) void eoState::load(const string& _filename) { ifstream is (_filename.c_str()); + + if (!is) + { + string str = "Could not open file " + _filename; + throw runtime_error(str); + } + load(is); +} + +void eoState::load(std::istream& is) +{ string str; string name; @@ -69,7 +80,7 @@ void eoState::load(const string& _filename) if (is.fail()) { - string str = "Could not open file " + _filename; + string str = "Error while reading stream"; throw runtime_error(str); } @@ -119,12 +130,17 @@ void eoState::save(const string& filename) const { // saves in order of insertion ofstream os(filename.c_str()); - if (os.fail()) + if (!os) { string msg = "Could not open file: " + filename + " for writing!"; throw runtime_error(msg); } + save(os); +} + +void eoState::save(std::ostream& os) const +{ // saves in order of insertion for (vector::const_iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) { os << "\\section{" << (*it)->first << "}\n"; diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index fd50cc9b8..05316784c 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -66,12 +66,26 @@ public : */ void load(const std::string& _filename); + /** + * Reads the file specified + * + * @param is the stream to load from + */ + void load(std::istream& is); + /** * Saves the state in file specified * * @param _filename the name of the file to save into */ void save(const std::string& _filename) const; + + /** + * Saves the state in file specified + * + * @param os the stream to save into + */ + void save(std::ostream& os) const; private : std::string createObjectName(eoObject* obj); diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index bb99bb2d2..2d9a3db73 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -42,6 +42,10 @@ #include "eoRNG.h" +/** +\defgroup selectors +*/ + template bool minimizing_fitness() { From 481bfba8bf4cfe8de52fd30be98bd912ef895b27 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:48:38 +0000 Subject: [PATCH 0172/2134] Oops, forgot to make operator() return an eoMonitor --- eo/src/utils/eoFileMonitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 6263a8ec4..759f8d621 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -36,7 +36,7 @@ class eoFileMonitor : public eoMonitor { public : eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim), firsttime(true) {} - void operator()(void); + eoMinitor& operator()(void); private : std::string filename; @@ -44,4 +44,4 @@ private : bool firsttime; }; -#endif \ No newline at end of file +#endif From bd0cc50be9081f227c253b0038abd5f73e7dbf07 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:50:44 +0000 Subject: [PATCH 0173/2134] Oops, forgot to make operator() return an eoMonitor --- eo/src/utils/eoFileMonitor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 759f8d621..d6e414890 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -36,7 +36,7 @@ class eoFileMonitor : public eoMonitor { public : eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim), firsttime(true) {} - eoMinitor& operator()(void); + eoMonitor& operator()(void); private : std::string filename; From 4654d42e30c5b167ed8578e52ce9c7245f00c4b0 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:54:25 +0000 Subject: [PATCH 0174/2134] Oops, it's a pain to get the makefiles up to date when you are working on two machines.... --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 6c57d3d7e..ed43605d6 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -171,7 +171,7 @@ t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### -t_eoGOpSel_SOURCES = t_eoGOpSel.cpp +t_eoGOpSel_SOURCES = t-eoGOpSel.cpp t_eoGOpSel_DEPENDENCIES = $(DEPS) t_eoGOpSel_LDFLAGS = -lm t_eoGOpSel_LDADD = $(LDADDS) From 7973019d0b673238382d4adbcfe937353384fb64 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 09:59:06 +0000 Subject: [PATCH 0175/2134] Specialized it for bool, so that we don't get these MSVC warnings. --- eo/src/eoUniform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index 2c1f308da..c7c0aece4 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -85,7 +85,7 @@ class eoUniform: public eoRnd } private: - T min; + bool min; double diff; }; From 697d38b37292c3368639e21b1b93911bbb7e61bb Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 10:00:55 +0000 Subject: [PATCH 0176/2134] Updated eoBreeder to use the even newer general operator interface --- eo/src/eoBreeder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index d33c04752..eedc14e9e 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -93,7 +93,7 @@ template class eoBreeder: public eoMonPopOp eoRandomIndiSelector selector; eoBackInserter inserter; - (*Gop)(selector(pop, orgsize, i), inserter(pop)); + (*Gop)(selector.init(pop, orgsize, i), inserter.bind(pop)); break; } } From 6d61aa2811d54016722c90af245eff27ccdc6217 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 10:05:55 +0000 Subject: [PATCH 0177/2134] Updated eoBreeder to use the even newer general operator interface --- eo/src/eoBreeder.h | 6 +++--- eo/src/eoOpSelector.h | 2 +- eo/src/eoRandomIndiSelector.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index eedc14e9e..f7d08351b 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -35,8 +35,8 @@ #include // eoTransform #include // eoOpSelector -#include "eoRandomIndiSelector.h" -#include "eoBackInserter.h" +#include +#include using namespace std; @@ -93,7 +93,7 @@ template class eoBreeder: public eoMonPopOp eoRandomIndiSelector selector; eoBackInserter inserter; - (*Gop)(selector.init(pop, orgsize, i), inserter.bind(pop)); + (*Gop)(selector.bind(pop, orgsize, i), inserter.bind(pop)); break; } } diff --git a/eo/src/eoOpSelector.h b/eo/src/eoOpSelector.h index 8088c8a34..82be47326 100644 --- a/eo/src/eoOpSelector.h +++ b/eo/src/eoOpSelector.h @@ -64,7 +64,7 @@ public: modified or whatever @param _id a previously assigned ID @throw runtime_exception if the ID does not exist*/ - virtual const eoOp& getOp( ID _id ) = 0; + virtual eoOp& getOp( ID _id ) = 0; /** Remove an operator from the operator set @param _id a previously assigned ID diff --git a/eo/src/eoRandomIndiSelector.h b/eo/src/eoRandomIndiSelector.h index 8d9a0ccda..990c6c4ad 100644 --- a/eo/src/eoRandomIndiSelector.h +++ b/eo/src/eoRandomIndiSelector.h @@ -26,7 +26,7 @@ #ifndef eoRandomIndiSelector_h #define eoRandomIndiSelector_h -#include "eoIndiSelector.h" +#include /** \ingroup selectors From f6c08c994885c34c063e498c97b849b2db7b5f0a Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 10:09:32 +0000 Subject: [PATCH 0178/2134] eoFitTerm did not implement className --- eo/src/eoFitTerm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/eoFitTerm.h b/eo/src/eoFitTerm.h index 76f696d8b..050f2dd13 100644 --- a/eo/src/eoFitTerm.h +++ b/eo/src/eoFitTerm.h @@ -48,7 +48,7 @@ public: /// virtual ~eoFitTerm() {}; - /** Returns false when a certain number of generations is + /** Returns false when a fitness criterium is * reached */ virtual bool operator() ( const eoPop& _vEO ) { float bestFitness=_vEO[0].fitness(); @@ -57,6 +57,8 @@ public: return (dif>epsilon ) || (bestFitness > maximum); } + std::string className(void) const { return eoFitTerm; } + private: float maximum, epsilon; }; From dd42eec50a06744f9f54a09976794efa0f0f3a05 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 10:10:39 +0000 Subject: [PATCH 0179/2134] eoFitTerm did not implement className --- eo/src/eoFitTerm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoFitTerm.h b/eo/src/eoFitTerm.h index 050f2dd13..503756cda 100644 --- a/eo/src/eoFitTerm.h +++ b/eo/src/eoFitTerm.h @@ -57,7 +57,7 @@ public: return (dif>epsilon ) || (bestFitness > maximum); } - std::string className(void) const { return eoFitTerm; } + std::string className(void) const { return "eoFitTerm"; } private: float maximum, epsilon; From 064ebabac52822ef802a9632922e130ec2c2f90a Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 10:13:27 +0000 Subject: [PATCH 0180/2134] Changed int target to size_t target (produced warning) --- eo/src/eoLottery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index d9816d5b5..a79b83da6 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -63,7 +63,7 @@ template class eoLottery: public eoBinPopOp */ void operator()( eoPop& pop, eoPop& breeders) { - int target = static_cast(rate_ * pop.size()); + size_t target = static_cast(rate_ * pop.size()); /* Gustavo: uncomment this if it must be here // test of consistency From 1992d60fa3e351c8cb401893833ac045699d8c45 Mon Sep 17 00:00:00 2001 From: mac Date: Sun, 9 Apr 2000 10:16:28 +0000 Subject: [PATCH 0181/2134] getOp() should return a non-const reference --- eo/src/eoGOpSelector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 2bab833f2..27e5ad604 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -69,7 +69,7 @@ public: will be thrown @return a reference of the operator corresponding to that id. */ - virtual const eoOp& getOp( ID _id ) + virtual eoOp& getOp( ID _id ) { return *operator[](_id); } From e5825c4d756779604c5efc73e694aceaeefe4368 Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 11 Apr 2000 12:18:30 +0000 Subject: [PATCH 0182/2134] some fix --- eo/src/utils/eoParser.h | 3 +-- eo/test/Makefile.am | 9 +-------- eo/test/t-eoGOpSel.cpp | 2 ++ eo/test/t-eoVector.cpp | 2 +- eo/test/t-eoinclusion.cpp | 1 - 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index fc6202a7f..de24e8eec 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -29,7 +29,6 @@ #include #include -#include #include "eoParam.h" #include "eoObject.h" @@ -163,4 +162,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index ed43605d6..33124b50b 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -18,7 +18,7 @@ noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser \ t-eoAtomOps t-selectOne t-eoGOpSel \ - t-eoVector t-eoCheckpointing t-eoGOpSel + t-eoVector t-eoCheckpointing ############################################################################### @@ -170,10 +170,3 @@ t_eoCheckpointing_LDFLAGS = -lm t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### - -t_eoGOpSel_SOURCES = t-eoGOpSel.cpp -t_eoGOpSel_DEPENDENCIES = $(DEPS) -t_eoGOpSel_LDFLAGS = -lm -t_eoGOpSel_LDADD = $(LDADDS) - -############################################################################### diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index fbc7e8353..613303f98 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -28,6 +28,8 @@ // to avoid long name warnings #pragma warning(disable:4786) +#include + #include // eoBin, eoPop, eoBreeder #include #include diff --git a/eo/test/t-eoVector.cpp b/eo/test/t-eoVector.cpp index d0a19f797..d807a977a 100644 --- a/eo/test/t-eoVector.cpp +++ b/eo/test/t-eoVector.cpp @@ -39,7 +39,7 @@ typedef eoVector Chrom; main() { const unsigned SIZE = 4; - unsigned i, j; + eoUniform uniform(-1,1); Chrom chrom1(SIZE,uniform), chrom2( SIZE, uniform); diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp index e2d49ae83..aa4eab0b5 100644 --- a/eo/test/t-eoinclusion.cpp +++ b/eo/test/t-eoinclusion.cpp @@ -17,7 +17,6 @@ typedef eoBin Chrom; main() { const unsigned CHROM_SIZE = 4; - unsigned i; eoUniform uniform(false, true); eoBinRandom random; From 7ac73895896e9506f6cb323806aabdd880b6d7d6 Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 12 Apr 2000 09:51:50 +0000 Subject: [PATCH 0183/2134] adding test to test/.cvsignore --- eo/test/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index 43edd83f6..daf59e6b7 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -20,3 +20,5 @@ t-eoCheckpointing t-eoVector t-eoAtomOps t-selectOne +t-eoStateAndParser +t-eoGOpSel From 2af4074c2c7dd266f85e384502e7f11db5956ce7 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 20 Apr 2000 10:48:07 +0000 Subject: [PATCH 0184/2134] 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 e21b84ef3..198cb939b 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 From 007046c134cc67322302c89a526090437d4d94de Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 20 Apr 2000 11:06:02 +0000 Subject: [PATCH 0185/2134] Added a bias function next to bind(). This function will bias the selection to select certain specific guys... --- eo/src/eoBreeder.h | 2 +- eo/src/eoGOpBreeder.h | 2 +- eo/src/eoIndiSelector.h | 31 +++++++++++++++++++++++++------ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index f7d08351b..5da02fd54 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -93,7 +93,7 @@ template class eoBreeder: public eoMonPopOp eoRandomIndiSelector selector; eoBackInserter inserter; - (*Gop)(selector.bind(pop, orgsize, i), inserter.bind(pop)); + (*Gop)(selector.bind(pop, orgsize).bias(i), inserter.bind(pop)); break; } } diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index 078428da2..8e26f77ec 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -40,7 +40,7 @@ class eoGOpBreeder: public eoMonPopOp for (unsigned i = 0; i < size; i++) { // and the one liner - opSel.selectOp()(selector.bind(_pop,size, i), inserter.bind(_pop)); + opSel.selectOp()(selector.bind(_pop,size).bias(i), inserter.bind(_pop)); } } diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index b2617e7c2..26ffe476e 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -83,16 +83,16 @@ template class eoPopIndiSelector : public eoIndiSelector { public : - eoPopIndiSelector(void) : eoIndiSelector(), pop(0), last(0), firstChoice(-1) {} + eoPopIndiSelector(void) : eoIndiSelector(), pop(0), last(0), firstChoice(-1), secondChoice(-1) {} virtual ~eoPopIndiSelector(void) {} struct eoUnitializedException{}; /** Initialization function, binds the population to the selector, can also - be used to specify an optional end and the first individual to return in operator() + be used to specify an optional end */ - eoPopIndiSelector& bind(const eoPop& _pop, int _end = -1, int _myGuy = -1) + eoPopIndiSelector& bind(const eoPop& _pop, int _end = -1) { pop = &_pop; last = _end; @@ -102,10 +102,20 @@ class eoPopIndiSelector : public eoIndiSelector last = pop->size(); } - firstChoice = _myGuy; return *this; } + /** Bias function to bias the selection function to select specific individuals + first before applying a selection algorithm defined in derived classes + */ + eoPopIndiSelector& bias(int _first, int _second = -1) + { + firstChoice = _first; + secondChoice = _second; + return *this; + } + + size_t size(void) const { valid(); return last; } const EOT& operator[](size_t _i) const { valid(); return pop->operator[](_i); } @@ -119,9 +129,17 @@ class eoPopIndiSelector : public eoIndiSelector valid(); if (firstChoice < 0 || firstChoice >= (int) size()) { - return do_select(); // let the child figure out what to do + // see if we have a second choice + if (secondChoice < 0 || secondChoice >= (int) size()) + { + return do_select(); // let the child figure out what to do + } + + const EOT& result = pop->operator[](secondChoice); + secondChoice = -1; + return result; } - + const EOT& result = pop->operator[](firstChoice); firstChoice = -1; return result; @@ -144,6 +162,7 @@ class eoPopIndiSelector : public eoIndiSelector const eoPop* pop; // need a pointer as this the pop argument can be re-instated int last; int firstChoice; + int secondChoice; }; #endif From 230e1a03d1e35eda5bd0f025e1415583b4d765ea Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 20 Apr 2000 11:11:58 +0000 Subject: [PATCH 0186/2134] removed reference to rint() (what does this function do anyway? it is not ANSI and defined nowhere in eo!) --- eo/src/eoInclusion.h | 2 +- eo/src/eoInsertion.h | 2 +- eo/src/eoMerge.h | 2 +- eo/src/eoScheme.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/eoInclusion.h b/eo/src/eoInclusion.h index c4e17a179..cc84cdaf2 100644 --- a/eo/src/eoInclusion.h +++ b/eo/src/eoInclusion.h @@ -38,7 +38,7 @@ template class eoInclusion: public eoMerge */ void operator()(eoPop& breeders, eoPop& pop) { - unsigned target = min(static_cast(rint(pop.size() * rate())), + unsigned target = min(static_cast(pop.size() * rate()), pop.size() + breeders.size()); copy(breeders.begin(), breeders.end(), diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 4f1b8a207..6f9616a8e 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -59,7 +59,7 @@ template class eoInsertion: public eoMerge */ void operator()( eoPop& _breeders, eoPop& _pop) { - unsigned target = static_cast(rint(_pop.size() * rate())); + unsigned target = static_cast((_pop.size() * rate())); _pop.swap(_breeders); diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 77b89d514..82cf0768e 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -54,7 +54,7 @@ template class eoMerge: public eoBinPopOp */ void operator()( eoPop& _breeders, eoPop& _pop) { - unsigned target = static_cast(rint(_pop.size() * rate())); + unsigned target = static_cast(_pop.size() * rate()); _pop.swap(_breeders); diff --git a/eo/src/eoScheme.h b/eo/src/eoScheme.h index be074e28d..5920fdb64 100644 --- a/eo/src/eoScheme.h +++ b/eo/src/eoScheme.h @@ -229,7 +229,7 @@ class eoScheme: public eoAlgo{ // everyting is read: now the consistency checks and other preliminary steps nb_offspring = (nb_offspring ? nb_offspring : - (int) rint (rate_offspring * popsize) ); + (int) (rate_offspring * popsize) ); if (!nb_offspring) nb_offspring = 1; /* al least one offspring */ From 05c4bec808fef3450eb2acce26b4d45356c716c0 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 07:13:43 +0000 Subject: [PATCH 0187/2134] Updated makefile and added t-eoExternalEO --- eo/test/Makefile.am | 11 +- eo/test/t-eoCheckpointing.cpp | 31 ++-- eo/test/t-eoExternalEO.cpp | 127 ++++++++++++++++ eo/test/t-eofitness.cpp | 262 +++++++++++++++++++++++----------- eo/test/t-eoproblem.cpp | 4 +- 5 files changed, 337 insertions(+), 98 deletions(-) create mode 100644 eo/test/t-eoExternalEO.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 33124b50b..604922de7 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -18,7 +18,7 @@ noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser \ t-eoAtomOps t-selectOne t-eoGOpSel \ - t-eoVector t-eoCheckpointing + t-eoVector t-eoCheckpointing t-eoExternalEO ############################################################################### @@ -170,3 +170,12 @@ t_eoCheckpointing_LDFLAGS = -lm t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### + +t_eoExternalEO_SOURCES = t-eoCheckpointing.cpp +t_eoExternalEO_DEPENDENCIES = $(DEPS) +t_eoExternalEO_LDFLAGS = -lm +t_eoExternalEO_LDADD = $(LDADDS) + +############################################################################### + + diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index ee4ac0a97..742c357aa 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -75,28 +75,46 @@ int the_main(int argc, char **argv) eoDummyPop pop; - eoGenTerm genTerm(5); // 5 generations + eoGenTerm genTerm(5); // run for 5 generations - eoCheckPoint checkpoint(genTerm); + eoCheckPoint checkpoint(genTerm); + // The algorithm will now quit after five generations + // Create a counter parameter eoValueParam generationCounter(0, "Generation"); + + // Create an incrementor (wich is an eoUpdater). Note that the + // Parameter's value is passed by reference, so every time the incrementer increments, + // the data in generationCounter will change. eoIncrementor increment(generationCounter.value()); + // Add it to the checkpoint, this will result in the counter being incremented every generation checkpoint.add(increment); + // The file monitor will print parameters to a comma seperated file eoFileMonitor monitor("monitor.csv"); + + // the checkpoint mechanism can handle multiple monitors checkpoint.add(monitor); + // the monitor can monitor parameters such as the generationCounter monitor.add(generationCounter); + // Second moment stats: average and stdev eoSecondMomentStats stats; + // Add it to the checkpoint to get it called at the appropriate time checkpoint.add(stats); + + // Add it to the monitor to get it written to the file monitor.add(stats); - eoCountedStateSaver stateSaver1(3, state, "generation"); // save every third generation - eoTimedStateSaver stateSaver2(2, state, "time"); // save every 2 seconds + // save state every third generation + eoCountedStateSaver stateSaver1(3, state, "generation"); + // save state every 2 seconds + eoTimedStateSaver stateSaver2(2, state, "time"); + // And add the two savers to the checkpoint checkpoint.add(stateSaver1); checkpoint.add(stateSaver2); @@ -150,11 +168,6 @@ int the_main(int argc, char **argv) state.save(file_name); } - for (int i = 0; i < 100; ++i) - rng.rand(); - - cout << "a random number is " << rng.random(1024) << endl;; - return 1; } diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp new file mode 100644 index 000000000..d750280ef --- /dev/null +++ b/eo/test/t-eoExternalEO.cpp @@ -0,0 +1,127 @@ +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include // runtime_error + +#include +#include +#include + +using namespace std; + +struct UserDefStruct +{ + int a; + float b; + double c; + enum Enum { just, another, test } d; +}; + +ostream& operator<<(ostream& os, const UserDefStruct& str) +{ + return os << str.a << ' ' << str.b << ' ' << str.c << ' ' << static_cast(str.d) << ' '; +} + +istream& operator>>(istream& is, UserDefStruct& str) +{ + is >> str.a; + is >> str.b; + is >> str.c; + int i; + is >> i; + str.d = static_cast(i); + + return is; +} + + +UserDefStruct RandomStruct() +{ + cout << "RandomStruct\n"; + + UserDefStruct result; + + result.a = rng.random(5); + result.b = rng.uniform(); + result.c = rng.uniform(); + result.d = UserDefStruct::another; + + return result; +} + +// reading and writing + + +void UserDefMutate(UserDefStruct& a) +{ + cout << "UserDefMutate\n"; + a = RandomStruct(); // just for testing + + if (rng.flip(0.1f)) + a.d = UserDefStruct::test; + else + a.d = UserDefStruct::another; +} + +void UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) +{ + cout << "UserDefBinCrossover\n"; + + if (rng.flip(0.5)) + a.a = b.a; + if (rng.flip(0.5)) + a.b = b.b; + if (rng.flip(0.5)) + a.c = b.c; + if (rng.flip(0.5)) + a.d = b.d; +} + +void UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) +{ + cout << "UserDefQuadCrossover\n"; + if (rng.flip(0.5)) + swap(a.a, b.a); + if (rng.flip(0.5)) + swap(a.b, b.b); + if (rng.flip(0.5)) + swap(a.c, b.c); + if (rng.flip(0.5)) + swap(a.d, b.d); +} + +float UserDefEvalFunc(const UserDefStruct& a) +{ + cout << "UserDefEvalFunc\n"; + return a.b; +} + +int main() +{ + typedef UserDefStruct External; + typedef float FitnessType; + typedef eoExternalEO EoType; + + eoExternalInit init(RandomStruct); + eoExternalMonOp mutate(UserDefMutate); + eoExternalBinOp cross1(UserDefBinCrossover); + eoExternalQuadraticOp cross2(UserDefQuadCrossover); + + eoExternalEvalFunc eval(UserDefEvalFunc); + + EoType eo1 = init(); + EoType eo2 = init(); + + cout << "before mutation " << eo1 << '\n'; + mutate(eo1); + cout << "after mutation " << eo1 << '\n'; + cross1(eo1, eo2); + cout << "after crossover " << eo1 << '\n'; + + cross2(eo1,eo2); + + return 1; +}; \ No newline at end of file diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index f31616203..9973444a3 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -1,87 +1,175 @@ -//----------------------------------------------------------------------------- -// t-eofitness.cpp -// (c) GeNeura Team 1998 -//----------------------------------------------------------------------------- - -#include // time -#include // srand, rand -#include // cout -#include // eoFitness - -//----------------------------------------------------------------------------- - -class eoFloat: public eoFitness -{ -public: - eoFloat(const float x) { fitness = x; } - eoFloat(const int x) { fitness = static_cast(x); } - - bool operator<(const eoFitness& other) const - { - const eoFloat& x = (const eoFloat&) other; - return fitness < x.fitness; - } - - operator float() const - { - return fitness; - } - - void printOn(ostream& os) const - { - os << fitness; - } - - void readFrom(istream& is) - { - is >> fitness; - } - -private: - float fitness; -}; - -//----------------------------------------------------------------------------- - -main() -{ - srand(time(0)); - - eoFloat a = static_cast(rand()) / RAND_MAX, - b = static_cast(rand()) / RAND_MAX; - - cout.precision(2); - - unsigned repeat = 2; - while (repeat--) - { - cout << "------------------------------------------------------" << endl; - cout << "testing < "; - if (a < b) - cout << a << " < " << b << " is true" << endl; - else - cout << a << " < " << b << " is false" < "; - if (a > b) - cout << a << " > " << b << " is true" << endl; - else - cout << a << " > " << b << " is false" < // time + +#include // srand, rand + +#include // cout + +#include // eoFitness + + + +//----------------------------------------------------------------------------- + + + +class eoFloat: public eoFitness + +{ + +public: + + eoFloat(const float x) { fitness = x; } + + eoFloat(const int x) { fitness = static_cast(x); } + + + + bool operator<(const eoFitness& other) const + + { + + const eoFloat& x = (const eoFloat&) other; + + return fitness < x.fitness; + + } + + + + operator float() const + + { + + return fitness; + + } + + + + void printOn(ostream& os) const + + { + + os << fitness; + + } + + + + void readFrom(istream& is) + + { + + is >> fitness; + + } + + + +private: + + float fitness; + +}; + + + +//----------------------------------------------------------------------------- + + + +int main() + +{ + + srand(time(0)); + + + + eoFloat a = static_cast(rand()) / RAND_MAX, + + b = static_cast(rand()) / RAND_MAX; + + + + cout.precision(2); + + + + unsigned repeat = 2; + + while (repeat--) + + { + + cout << "------------------------------------------------------" << endl; + + cout << "testing < "; + + if (a < b) + + cout << a << " < " << b << " is true" << endl; + + else + + cout << a << " < " << b << " is false" < "; + + if (a > b) + + cout << a << " > " << b << " is true" << endl; + + else + + cout << a << " > " << b << " is false" < + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "esfull"=.\esfull.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_StateAndParser"=.\t_StateAndParser.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoCheckpointing"=.\t_eoCheckpointing.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoGOpSel"=.\t_eoGOpSel.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eobreeder"=.\t_eobreeder.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eofitness"=.\t_eofitness.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoinclusion"=.\t_eoinclusion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_eoproblem"=.\t_eoproblem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + +Project: "t_externalEO"=.\t_externalEO.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/esfull.dsp b/eo/win/esfull.dsp index f1b5bac36..f52a4855d 100644 --- a/eo/win/esfull.dsp +++ b/eo/win/esfull.dsp @@ -1,101 +1,124 @@ -# Microsoft Developer Studio Project File - Name="esfull" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=esfull - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "esfull.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "esfull.mak" CFG="esfull - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "esfull - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "esfull - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "esfull - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "esfull - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "esfull___Win32_Debug" -# PROP BASE Intermediate_Dir "esfull___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "esfull___Win32_Debug" -# PROP Intermediate_Dir "esfull___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "esfull - Win32 Release" -# Name "esfull - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESFull.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="esfull" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=esfull - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "esfull.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "esfull.mak" CFG="esfull - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "esfull - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "esfull - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "esfull - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "esfull - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "esfull___Win32_Debug" +# PROP BASE Intermediate_Dir "esfull___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "esfull - Win32 Release" +# Name "esfull - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESFull.cpp" + +!IF "$(CFG)" == "esfull - Win32 Release" + +!ELSEIF "$(CFG)" == "esfull - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\es\eoESFullChrom.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoESFullMut.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoESInit.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_StateAndParser.dsp b/eo/win/t_StateAndParser.dsp new file mode 100644 index 000000000..846db2369 --- /dev/null +++ b/eo/win/t_StateAndParser.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_StateAndParser" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_StateAndParser - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_StateAndParser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_StateAndParser.mak" CFG="t_StateAndParser - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_StateAndParser - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_StateAndParser - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_StateAndParser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_StateAndParser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_StateAndParser___Win32_Debug" +# PROP BASE Intermediate_Dir "t_StateAndParser___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_StateAndParser - Win32 Release" +# Name "t_StateAndParser - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoStateAndParser.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoCheckpointing.dsp b/eo/win/t_eoCheckpointing.dsp new file mode 100644 index 000000000..b9b821aaa --- /dev/null +++ b/eo/win/t_eoCheckpointing.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoCheckpointing" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoCheckpointing - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoCheckpointing.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoCheckpointing.mak" CFG="t_eoCheckpointing - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoCheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoCheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoCheckpointing - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoCheckpointing - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoCheckpointing___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoCheckpointing___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoCheckpointing - Win32 Release" +# Name "t_eoCheckpointing - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoCheckpointing.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoGOpSel.dsp b/eo/win/t_eoGOpSel.dsp new file mode 100644 index 000000000..885512618 --- /dev/null +++ b/eo/win/t_eoGOpSel.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoGOpSel" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoGOpSel - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoGOpSel.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoGOpSel.mak" CFG="t_eoGOpSel - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoGOpSel - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoGOpSel - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoGOpSel - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoGOpSel - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoGOpSel___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoGOpSel___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoGOpSel - Win32 Release" +# Name "t_eoGOpSel - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGOpSel.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoGeneralOps.dsp b/eo/win/t_eoGeneralOps.dsp new file mode 100644 index 000000000..5c9f00beb --- /dev/null +++ b/eo/win/t_eoGeneralOps.dsp @@ -0,0 +1,96 @@ +# Microsoft Developer Studio Project File - Name="t_eoGeneralOps" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoGeneralOps - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoGeneralOps.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoGeneralOps.mak" CFG="t_eoGeneralOps - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoGeneralOps - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoGeneralOps - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoGeneralOps - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoGeneralOps - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoGeneralOps___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoGeneralOps___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoGeneralOps___Win32_Debug" +# PROP Intermediate_Dir "t_eoGeneralOps___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoGeneralOps - Win32 Release" +# Name "t_eoGeneralOps - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index ae457160b..ba1079bdf 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -41,7 +41,8 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "NDEBUG" # ADD RSC /l 0xc0a /d "NDEBUG" BSC32=bscmake.exe @@ -60,12 +61,13 @@ LINK32=link.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eobin___Win32_Debug" -# PROP Intermediate_Dir "t_eobin___Win32_Debug" +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /d "_DEBUG" BSC32=bscmake.exe diff --git a/eo/win/t_eobreeder.dsp b/eo/win/t_eobreeder.dsp index e94565550..c8151253e 100644 --- a/eo/win/t_eobreeder.dsp +++ b/eo/win/t_eobreeder.dsp @@ -41,7 +41,8 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "NDEBUG" # ADD RSC /l 0xc0a /d "NDEBUG" BSC32=bscmake.exe @@ -60,12 +61,13 @@ LINK32=link.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eobreeder___Win32_Debug" -# PROP Intermediate_Dir "t_eobreeder___Win32_Debug" +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c +# SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /d "_DEBUG" BSC32=bscmake.exe @@ -73,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp new file mode 100644 index 000000000..7c85d5a4c --- /dev/null +++ b/eo/win/t_eofitness.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitness___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eofitness - Win32 Release" +# Name "t_eofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eofitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoinclusion.dsp b/eo/win/t_eoinclusion.dsp index 8232c575f..9efeac797 100644 --- a/eo/win/t_eoinclusion.dsp +++ b/eo/win/t_eoinclusion.dsp @@ -41,7 +41,8 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "NDEBUG" # ADD RSC /l 0xc0a /d "NDEBUG" BSC32=bscmake.exe @@ -60,12 +61,13 @@ LINK32=link.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoinclusion___Win32_Debug" -# PROP Intermediate_Dir "t_eoinclusion___Win32_Debug" +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c +# SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /d "_DEBUG" BSC32=bscmake.exe @@ -73,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF diff --git a/eo/win/t_eoinsertion.dsp b/eo/win/t_eoinsertion.dsp index 45c41df15..681a958d5 100644 --- a/eo/win/t_eoinsertion.dsp +++ b/eo/win/t_eoinsertion.dsp @@ -60,8 +60,9 @@ LINK32=link.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoinsertion___Win32_Debug" -# PROP Intermediate_Dir "t_eoinsertion___Win32_Debug" +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c diff --git a/eo/win/t_eoproblem.dsp b/eo/win/t_eoproblem.dsp new file mode 100644 index 000000000..b0623139d --- /dev/null +++ b/eo/win/t_eoproblem.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="t_eoproblem" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoproblem - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoproblem.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoproblem.mak" CFG="t_eoproblem - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoproblem - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoproblem - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoproblem - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoproblem - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoproblem___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoproblem___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoproblem - Win32 Release" +# Name "t_eoproblem - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoproblem.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_es.dsp b/eo/win/t_es.dsp index 189bd5ff6..7727e4a13 100644 --- a/eo/win/t_es.dsp +++ b/eo/win/t_es.dsp @@ -86,6 +86,10 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE="..\test\t-eoESFull.cpp" +# End Source File +# Begin Source File + SOURCE=..\test\t_es.cpp # End Source File # End Group diff --git a/eo/win/t_externalEO.dsp b/eo/win/t_externalEO.dsp new file mode 100644 index 000000000..a963505de --- /dev/null +++ b/eo/win/t_externalEO.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="t_externalEO" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_externalEO - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_externalEO.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_externalEO.mak" CFG="t_externalEO - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_externalEO - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_externalEO - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_externalEO - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "t_externalEO___Win32_Release" +# PROP BASE Intermediate_Dir "t_externalEO___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "t_externalEO___Win32_Release" +# PROP Intermediate_Dir "t_externalEO___Win32_Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_externalEO - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_externalEO___Win32_Debug" +# PROP BASE Intermediate_Dir "t_externalEO___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_externalEO___Win32_Debug" +# PROP Intermediate_Dir "t_externalEO___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_externalEO - Win32 Release" +# Name "t_externalEO - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoExternalEO.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 9ad8767c418340987ebc343fd9b7278bf988f108 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 07:17:23 +0000 Subject: [PATCH 0189/2134] Changed default printOn to have a trailing space instead of endl --- eo/src/EO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 85a59c034..626c662c9 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -114,7 +114,7 @@ public: * @param _os A ostream. */ virtual void printOn(ostream& _os) const { - _os << repFitness << endl; + _os << repFitness << ' '; // trailing space to make reading in that much easier } //@} From 86ae1ddbaacab65e673e1e883abb1268e2cbe45b Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 07:18:25 +0000 Subject: [PATCH 0190/2134] eoExternalEO, support for using plain functions and structs in EO --- eo/src/other/eoExternalEO.h | 47 +++++-- eo/src/other/eoExternalOpFunctions.h | 177 +++++++++++++++++++++++++++ eo/src/other/external_eo | 2 + 3 files changed, 213 insertions(+), 13 deletions(-) create mode 100644 eo/src/other/eoExternalOpFunctions.h create mode 100644 eo/src/other/external_eo diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index ab9b4816d..51ad7795b 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -2,8 +2,8 @@ ----------------------------------------------------------------------------- eoExternalEO.h - * Definition of an object that allows an external struct - * to be inserted in EO + Definition of an object that allows an external struct to be inserted in EO + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 This library is free software; you can redistribute it and/or @@ -30,27 +30,33 @@ /** * Definition of an object that allows an external struct - * to be inserted in EO + * to be inserted in EO. This struct or class can be of any + * form, the only thing this class does is attach a fitness + * value to it and makes it the appropriate type (derives it from EO). */ + template -class eoExternalEO : public EO, virtual public External +class eoExternalEO : public EO, virtual public External { public : typedef External Type; - eoExternalEO(void) : EO(), Base() {} - eoExternalEO(istream& is) : EO(), Base() { readFrom(is); } + eoExternalEO(void) : EO(), External() {} /** - * Read object.\\ - * @param _is a istream. - * @throw runtime_exception If a valid object can't be read. + Init externalEo with the struct itself and set fitness to zero + */ + eoExternalEO(const External& ext) : EO(), External(ext) {} + eoExternalEO(istream& is) : EO(), Base() { readFrom(is); } + + /** + * Read object, the external struct needs to have an operator>> defined */ virtual void readFrom(istream& _is) { - EO::readFrom(is); - throw runtime_exception("Reading not defined yet"); + EO::readFrom(_is); + _is >> static_cast(*this); } /** @@ -59,10 +65,25 @@ public : */ virtual void printOn(ostream& _os) const { - EO::printOn(is); - throw runtime_excpetion("Writing not defined yet"); + EO::printOn(_os); + _os << static_cast(*this); } }; +/// To remove ambiguities between EO and External, streaming operators are defined yet again +template +std::ostream& operator<<(std::ostream& os, const eoExternalEO& eo) +{ + eo.printOn(os); + return os; +} + +template +std::istream& operator>>(std::istream& is, eoExternalEO& eo) +{ + eo.readFrom(is); + return is; +} + #endif diff --git a/eo/src/other/eoExternalOpFunctions.h b/eo/src/other/eoExternalOpFunctions.h new file mode 100644 index 000000000..b27dd93b1 --- /dev/null +++ b/eo/src/other/eoExternalOpFunctions.h @@ -0,0 +1,177 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoExternalOpFunc.h + Defines eoExternalInitOpFunc, eoExternalMonOpFunc, eoExternalBinOpFunc, eoExternalQuadOpFunc + that are used to wrap a function pointer to externally defined initialization + and 'genetic' operators + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoExternalOpFunc_h +#define eoExternalOpFunc_h + +#include +#include +#include +#include + +/** + Initialization of external struct, ctor expects a function of the following + signature: + + External func(); + + Where External is the user defined struct or class +*/ +template +class eoExternalInit : public eoRnd > +{ + +public : + + typedef eoExternalEO ExternalEO; + + eoExternalInit(External (*_init)(void)) : init(_init) {} + + + ExternalEO operator()(void) { return (*init)(); } + +private : + + External (*init)(void); +}; + +/** + Evaluation of external struct, ctor expects a function of the following + signature: + + Fit func(External&); + + Where External is the user defined struct or class and Fit the fitness type +*/ +template +class eoExternalEvalFunc : public eoEvalFunc > +{ + public : + + typedef eoExternalEO ExternalEO; + + eoExternalEvalFunc(F (*_eval)(const External&)) : eval(_eval) {} + + void operator()(ExternalEO& eo) const + { + eo.fitness( (*eval)(eo) ); + } + + private : + + F (*eval)(const External&); +}; + +/** + Mutation of external struct, ctor expects a function of the following + signature: + + void func(External&); + + Where External is the user defined struct or class +*/ + +template +class eoExternalMonOp : public eoMonOp > +{ + public : + + typedef eoExternalEO ExternalEO; + + eoExternalMonOp(void (*_mutate)(External&)) : mutate(_mutate) {} + + void operator()(ExternalEO& eo) const + { + (*mutate)(eo); + eo.invalidate(); + } + + private : + + void (*mutate)(External&); +}; + +/** + Crossover of external struct, ctor expects a function of the following + signature: + + void func(External&, const External&); + + Where External is the user defined struct or class +*/ +template +class eoExternalBinOp : public eoBinOp > +{ + public : + + typedef eoExternalEO ExternalEO; + + eoExternalBinOp(void (*_binop)(External&, const External&)) : binop(_binop) {} + + void operator()(ExternalEO& eo1, const ExternalEO& eo2) const + { + (*binop)(eo1, eo2); + eo1.invalidate(); + } + + private : + + void (*binop)(External&, const External&); +}; + +/** + Crossover of external struct, ctor expects a function of the following + signature: + + void func(External&, External&); + + Where External is the user defined struct or class +*/ +template +class eoExternalQuadraticOp : public eoQuadraticOp > +{ + public : + + typedef eoExternalEO ExternalEO; + + eoExternalQuadraticOp(void (*_quadop)(External&, External&)) : quadop(_quadop) {} + + void operator()(ExternalEO& eo1, ExternalEO& eo2) const + { + (*quadop)(eo1, eo2); + eo1.invalidate(); + eo2.invalidate(); + } + + private : + + void (*quadop)(External&, External&); +}; + + + +#endif diff --git a/eo/src/other/external_eo b/eo/src/other/external_eo new file mode 100644 index 000000000..aeaaaab6b --- /dev/null +++ b/eo/src/other/external_eo @@ -0,0 +1,2 @@ +#include +#include From 69d9ee7a0f013a6458db7a6fcd89d91b412cc768 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 07:23:24 +0000 Subject: [PATCH 0191/2134] Oops, corrected error in adding t-eoExternalEO --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 604922de7..5205b8765 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -171,7 +171,7 @@ t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### -t_eoExternalEO_SOURCES = t-eoCheckpointing.cpp +t_eoExternalEO_SOURCES = t-eoExternalEO.cpp t_eoExternalEO_DEPENDENCIES = $(DEPS) t_eoExternalEO_LDFLAGS = -lm t_eoExternalEO_LDADD = $(LDADDS) From 9aaafc2cdb418d512c386f6ec3f5662dfcfa8c82 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 07:26:13 +0000 Subject: [PATCH 0192/2134] Oops, corrected error in ctor(istream) --- eo/src/other/eoExternalEO.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 51ad7795b..5094a7ecf 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -48,7 +48,7 @@ public : Init externalEo with the struct itself and set fitness to zero */ eoExternalEO(const External& ext) : EO(), External(ext) {} - eoExternalEO(istream& is) : EO(), Base() { readFrom(is); } + eoExternalEO(istream& is) : EO(), External(ext) { readFrom(is); } /** * Read object, the external struct needs to have an operator>> defined @@ -79,6 +79,7 @@ std::ostream& operator<<(std::ostream& os, const eoExternalEO& eo) return os; } +/// To remove ambiguities between EO and External, streaming operators are defined yet again template std::istream& operator>>(std::istream& is, eoExternalEO& eo) { From 0363af1289e67e7f1aeaf5a3f6d052e5624fa999 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 25 May 2000 11:03:00 +0000 Subject: [PATCH 0193/2134] warning hunting --- eo/src/eoDetTournamentInserter.h | 51 +++++++------- eo/src/eoGOpBreeder.h | 12 ++-- eo/src/eoGOpSelector.h | 106 ++++++++++++++--------------- eo/src/eoSequentialGOpSelector.h | 46 ++++++------- eo/src/eoSteadyStateInserter.h | 13 ++-- eo/src/eoStochTournamentInserter.h | 49 ++++++------- eo/test/t-eoCheckpointing.cpp | 3 +- eo/test/t-eoEasyEA.cpp | 3 +- eo/test/t-eoExternalEO.cpp | 4 +- eo/test/t-eoGOpSel.cpp | 2 + eo/test/t-eoStateAndParser.cpp | 3 +- eo/test/t-eobreeder.cpp | 2 + eo/test/t-selectOne.cpp | 2 + 13 files changed, 152 insertions(+), 144 deletions(-) diff --git a/eo/src/eoDetTournamentInserter.h b/eo/src/eoDetTournamentInserter.h index c47777948..845a7b381 100644 --- a/eo/src/eoDetTournamentInserter.h +++ b/eo/src/eoDetTournamentInserter.h @@ -40,31 +40,32 @@ template class eoDetTournamentInserter : public eoSteadyStateInserter { - public : - - eoDetTournamentInserter(eoEvalFunc& _eval, unsigned _t_size) : t_size(_t_size), eoSteadyStateInserter(_eval) - { - if (t_size < 2) - { // warning, error? - t_size = 2; - } - } - - eoInserter& operator()(const EOT& _eot) - { - EOT& eo = inverse_deterministic_tournament(pop(), t_size); - eo = _eot; // overwrite loser of tournament - - eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves - eval(eo); // Evaluate after insert - return *this; - } - - string className(void) const { return "eoDetTournamentInserter"; } - - private : - - unsigned t_size; +public : + + eoDetTournamentInserter(eoEvalFunc& _eval, unsigned _t_size): + eoSteadyStateInserter(_eval), + t_size(_t_size) + { + if (t_size < 2) + { // warning, error? + t_size = 2; + } + } + + eoInserter& operator()(const EOT& _eot) + { + EOT& eo = inverse_deterministic_tournament(pop(), t_size); + eo = _eot; // overwrite loser of tournament + + eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves + eval(eo); // Evaluate after insert + return *this; + } + + string className(void) const { return "eoDetTournamentInserter"; } + +private : + unsigned t_size; }; #endif diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index 8e26f77ec..e48037404 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -35,14 +35,14 @@ class eoGOpBreeder: public eoMonPopOp * @param pop The population to be transformed. */ void operator()(eoPop& _pop) - { - int size = _pop.size(); - + { + unsigned size = _pop.size(); + for (unsigned i = 0; i < size; i++) - { // and the one liner - opSel.selectOp()(selector.bind(_pop,size).bias(i), inserter.bind(_pop)); - } + { // and the one liner + opSel.selectOp()(selector.bind(_pop,size).bias(i), inserter.bind(_pop)); } + } /// The class name. string className() const { return "eoGOpBreeder"; } diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 27e5ad604..002c90f54 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -56,9 +56,9 @@ public: } /* - Add any kind of operator to the operator mix, - @param _op operator, one of eoMonOp, eoBinOp, eoQuadraticOp or eoGeneralOp - @param _rate the rate at which it should be applied, it should be a probability + Add any kind of operator to the operator mix, + @param _op operator, one of eoMonOp, eoBinOp, eoQuadraticOp or eoGeneralOp + @param _rate the rate at which it should be applied, it should be a probability */ virtual ID addOp( eoOp& _op, float _rate ); @@ -66,12 +66,12 @@ public: /** Retrieve the operator using its integer handle @param _id The id number. Should be a valid id, or an exception - will be thrown + will be thrown @return a reference of the operator corresponding to that id. */ virtual eoOp& getOp( ID _id ) { - return *operator[](_id); + return *operator[](_id); } /// @@ -81,7 +81,7 @@ public: /// virtual eoOp* Op() { - return &selectOp(); + return &selectOp(); } /// Select an operator from the operators present here @@ -109,70 +109,70 @@ private : /* Implementation of longish functions defined above */ template -inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, float _arg ) +inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, + float _arg ) { - - eoGeneralOp* op; - - if (_op.getType() == eoOp::general) + eoGeneralOp* op; + + if (_op.getType() == eoOp::general) { - op = static_cast*>(&_op); + op = static_cast*>(&_op); } - else + else { - // if it's not a general op, it's a "old" op; create a wrapped op from it - // and keep it on a list to delete them afterwards - // will use auto_ptr when they're readily available + // if it's not a general op, it's a "old" op; create a wrapped op from it + // and keep it on a list to delete them afterwards + // will use auto_ptr when they're readily available + + switch(_op.getType()) + { + case eoOp::unary : + op= new eoWrappedMonOp(static_cast&>(_op)); + break; + case eoOp::binary : + op = new eoWrappedBinOp(static_cast&>(_op)); + break; + case eoOp::quadratic : + op = new eoWrappedQuadraticOp(static_cast&>(_op)); + break; + } + ownOpList.push_back( op ); + } + + // Now 'op' is a general operator, either because '_op' was one or + // because we wrapped it in an appropriate wrapper in the code above. - switch(_op.getType()) - { - case eoOp::unary : - op= new eoWrappedMonOp(static_cast&>(_op)); - break; - case eoOp::binary : - op = new eoWrappedBinOp(static_cast&>(_op)); - break; - case eoOp::quadratic : - op = new eoWrappedQuadraticOp(static_cast&>(_op)); - break; - } - ownOpList.push_back( op ); - } - - // Now 'op' is a general operator, either because '_op' was one or - // because we wrapped it in an appropriate wrapper in the code above. - - iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer + iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer - if (result == end()) - { - push_back(op); - rates.push_back(_arg); - return size(); - } - // else + if (result == end()) + { + push_back(op); + rates.push_back(_arg); + return size(); + } + // else - *result = op; - ID id = result - begin(); - rates[id] = _arg; - return id; + *result = op; + ID id = result - begin(); + rates[id] = _arg; + return id; } template inline void eoGOpSelector::deleteOp( ID _id ) { - eoGeneralOp* op = operator[](_id); + eoGeneralOp* op = operator[](_id); - operator[](_id) = 0; - rates[_id] = 0.0; + operator[](_id) = 0; + rates[_id] = 0.0; - // check oplist and clear it there too. + // check oplist and clear it there too. - list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); + list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); - if(it != ownOpList.end()) + if(it != ownOpList.end()) { - ownOpList.erase(it); + ownOpList.erase(it); } } diff --git a/eo/src/eoSequentialGOpSelector.h b/eo/src/eoSequentialGOpSelector.h index 95716153a..e77bdec7a 100644 --- a/eo/src/eoSequentialGOpSelector.h +++ b/eo/src/eoSequentialGOpSelector.h @@ -35,29 +35,29 @@ template class eoSequentialGOpSel : public eoGOpSelector { - public : - - virtual ~eoSequentialGOpSel(void) {} - - virtual eoGeneralOp& selectOp() - { - combined.clear(); - - for (int i = 0; i < size(); ++i) - { - if (operator[](i) == 0) - continue; - - if (rng.flip(getRates()[i])) - combined.addOp(operator[](i)); - } - - return combined; - } - - private : - - eoCombinedOp combined; +public : + + virtual ~eoSequentialGOpSel(void) {} + + virtual eoGeneralOp& selectOp() + { + combined.clear(); + + for (unsigned i = 0; i < size(); ++i) + { + if (operator[](i) == 0) + continue; + + if (rng.flip(getRates()[i])) + combined.addOp(operator[](i)); + } + + return combined; + } + +private : + + eoCombinedOp combined; }; #endif diff --git a/eo/src/eoSteadyStateInserter.h b/eo/src/eoSteadyStateInserter.h index 1732c345c..83ae0d57b 100644 --- a/eo/src/eoSteadyStateInserter.h +++ b/eo/src/eoSteadyStateInserter.h @@ -40,12 +40,13 @@ template class eoSteadyStateInserter : public eoPopInserter { - public : - eoSteadyStateInserter(eoEvalFunc& _eval) : eval(_eval) , eoPopInserter() {} - - protected : - - eoEvalFunc& eval; +public : + eoSteadyStateInserter(eoEvalFunc& _eval): + eoPopInserter(), + eval(_eval) {} + +protected : + eoEvalFunc& eval; }; diff --git a/eo/src/eoStochTournamentInserter.h b/eo/src/eoStochTournamentInserter.h index dbd161b96..a68556056 100644 --- a/eo/src/eoStochTournamentInserter.h +++ b/eo/src/eoStochTournamentInserter.h @@ -41,35 +41,36 @@ template class eoStochTournamentInserter : public eoSteadyStateInserter { - public : +public : + + eoStochTournamentInserter(eoEvalFunc& _eval, double _t_rate): + eoSteadyStateInserter(_eval), t_rate(_t_rate) + { + if (t_rate < 0.5) + { // warning, error? + t_rate = 0.55; + } - eoStochTournamentInserter(eoEvalFunc& _eval, double _t_rate) : t_rate(_t_rate), eoSteadyStateInserter(_eval) - { - if (t_rate < 0.5) - { // warning, error? - t_rate = 0.55; - } - - if (t_rate >= 1.0) - { - t_rate = 0.99; // 1.0 would mean deterministic tournament - } - } + if (t_rate >= 1.0) + { + t_rate = 0.99; // 1.0 would mean deterministic tournament + } + } - eoInserter& operator()(const EOT& _eot) - { - EOT& eo = inverse_stochastic_tournament(pop(), t_rate); - eo = _eot; // overwrite loser of tournament + eoInserter& operator()(const EOT& _eot) + { + EOT& eo = inverse_stochastic_tournament(pop(), t_rate); + eo = _eot; // overwrite loser of tournament - eo.invalidate(); - eval(eo); // Evaluate after insert - return *this; - } + eo.invalidate(); + eval(eo); // Evaluate after insert + return *this; + } - string className(void) const { return "eoStochTournamentInserter"; } + string className(void) const { return "eoStochTournamentInserter"; } - private : - double t_rate; +private : + double t_rate; }; #endif diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 742c357aa..612890475 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -47,7 +47,6 @@ int the_main(int argc, char **argv) eoParser parser(argc, argv); // Define Parameters - eoValueParam& chrom_size = parser.createParam(unsigned(2), "chrom-size", "Chromosome size"); eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); eoValueParam seed(time(0), "seed", "Random number seed"); @@ -183,4 +182,4 @@ int main(int argc, char **argv) } return 1; -} \ No newline at end of file +} diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index bf81e63dd..7b0856b98 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -2,9 +2,10 @@ // t-eoEasyEA.cpp //----------------------------------------------------------------------------- +#ifndef __GNUG__ // to avoid long name warnings #pragma warning(disable:4786) - +#endif // __GNUG__ #include diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index d750280ef..debcb1c49 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -110,7 +110,7 @@ int main() eoExternalBinOp cross1(UserDefBinCrossover); eoExternalQuadraticOp cross2(UserDefQuadCrossover); - eoExternalEvalFunc eval(UserDefEvalFunc); + // eoExternalEvalFunc eval(UserDefEvalFunc); EoType eo1 = init(); EoType eo2 = init(); @@ -124,4 +124,4 @@ int main() cross2(eo1,eo2); return 1; -}; \ No newline at end of file +}; diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index 613303f98..bd4c82f1d 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -25,8 +25,10 @@ //-----------------------------------------------------------------------------// +#ifndef __GNUG__ // to avoid long name warnings #pragma warning(disable:4786) +#endif // __GNUG__ #include diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index e058db3a8..fad70b243 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -41,7 +41,6 @@ int the_main(int argc, char **argv) eoParser parser(argc, argv); // Define Parameters - eoValueParam& chrom_size = parser.createParam(unsigned(2), "chrom-size", "Chromosome size"); eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); eoValueParam seed(time(0), "seed", "Random number seed"); @@ -120,4 +119,4 @@ int main(int argc, char **argv) } return 1; -} \ No newline at end of file +} diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index 8b7fa2d73..58a2b1b43 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -24,8 +24,10 @@ */ //----------------------------------------------------------------------------- +#ifndef __GNUG__ // to avoid long name warnings #pragma warning(disable:4786) +#endif // __GNUG__ #include // eoBin, eoPop, eoBreeder #include diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp index 8304c5033..1125201c6 100644 --- a/eo/test/t-selectOne.cpp +++ b/eo/test/t-selectOne.cpp @@ -24,8 +24,10 @@ */ //----------------------------------------------------------------------------- +#ifndef __GNUG__ // to avoid long name warnings #pragma warning(disable:4786) +#endif // __GNUG__ #include // eoBin, eoPop, eoBreeder #include From 207698fcc878832647ad168cb9d829985a3175e0 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 12:21:06 +0000 Subject: [PATCH 0194/2134] Added dummy case general: --- eo/src/eoGOpSelector.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 002c90f54..06dafc96f 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -135,6 +135,7 @@ inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, case eoOp::quadratic : op = new eoWrappedQuadraticOp(static_cast&>(_op)); break; + case eoOp::general : break; // cannot happen, but gcc issued a warning } ownOpList.push_back( op ); } From 6893a8565d621c9e50a19a60e296d3d2aa5b0615 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 25 May 2000 13:04:57 +0000 Subject: [PATCH 0195/2134] Removed this ugly defaulting to 1 behaviour and solved it using template specialization --- eo/src/utils/eoParam.h | 15 +++++++++++++++ eo/src/utils/eoParser.cpp | 3 --- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index fed8a5259..4dba2c3ba 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -169,6 +169,21 @@ private : ValueType repValue; }; +/// Specialized setValue for bool +template <> +void eoValueParam::setValue(std::string _value) +{ + if (_value.empty()) + { + repValue = true; + return; + } + + std::istrstream is(_value.c_str()); + is >> repValue; +} + + /// Because MSVC does not support partial specialization, the pair is a double, not a T template <> std::string eoValueParam >::getValue(void) const diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 6fd16b2e6..cb60c6939 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -79,9 +79,6 @@ void eoParser::doRegisterParam(eoParam& param) const if (value.first) { - if (value.second == "") // it is there, but no value is given, default to "1" - value.second = "1"; // for bool - param.setValue(value.second); } } From f39f1599244479063cb1483193a82e9868568b32 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 26 May 2000 17:18:06 +0000 Subject: [PATCH 0196/2134] ignore t-eoExternalEO --- eo/test/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index daf59e6b7..6068d364b 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -22,3 +22,4 @@ t-eoAtomOps t-selectOne t-eoStateAndParser t-eoGOpSel +t-eoExternalEO From c1b0a6c5034eb4cc194f114a8f8ef4c1269fcb9d Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 10 Jun 2000 13:22:53 +0000 Subject: [PATCH 0197/2134] Removed dependence on eoUniform, changed it to use rng.random or rng.uniform directly --- eo/src/eoAtomMutation.h | 1 - eo/src/eoBreeder.h | 8 +- eo/src/eoDup.h | 8 +- eo/src/eoKill.h | 8 +- eo/src/eoMutation.h | 1 - eo/src/eoProportionalOpSel.h | 5 +- eo/src/eoRandomSelect.h | 104 +++++++++----- eo/src/eoRank.h | 128 +++++++++++------ eo/src/eoRnd.h | 59 +------- eo/src/eoTournament.h | 131 +++++++++++------ eo/src/eoTranspose.h | 5 +- eo/src/eoUniformXOver.h | 266 +++++++++++++++++++++++------------ eo/src/eoXOver2.h | 6 +- eo/src/ga/eoBitOp.h | 27 ++-- 14 files changed, 445 insertions(+), 312 deletions(-) diff --git a/eo/src/eoAtomMutation.h b/eo/src/eoAtomMutation.h index 3ecec82f7..59266e3fb 100644 --- a/eo/src/eoAtomMutation.h +++ b/eo/src/eoAtomMutation.h @@ -29,7 +29,6 @@ // EO includes #include -#include #include #include diff --git a/eo/src/eoBreeder.h b/eo/src/eoBreeder.h index 5da02fd54..bab14f52c 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/eoBreeder.h @@ -29,7 +29,7 @@ //----------------------------------------------------------------------------- #include // vector -#include // eoUniform +#include #include // eoOp, eoMonOp, eoBinOp #include // eoPop #include // eoTransform @@ -74,16 +74,14 @@ template class eoBreeder: public eoMonPopOp case eoOp::binary: { eoBinOp* binop = static_cast* >(op); - eoUniform u(0, pop.size() ); - (*binop)(pop[i], pop[ u() ] ); + (*binop)(pop[i], pop[ rng.random(pop.size()) ] ); break; } case eoOp::quadratic: { eoQuadraticOp* Qop = static_cast* >(op); - eoUniform u(0, pop.size() ); - (*Qop)(pop[i], pop[ u() ] ); + (*Qop)(pop[i], pop[ rng.random(pop.size()) ] ); break; } case eoOp::general : diff --git a/eo/src/eoDup.h b/eo/src/eoDup.h index 727db3c39..a3ec97665 100644 --- a/eo/src/eoDup.h +++ b/eo/src/eoDup.h @@ -26,7 +26,7 @@ #ifndef _EODUP_h #define _EODUP_h -#include +#include #include @@ -42,9 +42,9 @@ public: virtual ~eoDup() {}; /// - virtual void operator()( EOT& _eo ) const { - eoUniform uniform( 0, _eo.length() ); - unsigned pos = uniform(); + virtual void operator()( EOT& _eo ) const + { + unsigned pos = rng.random(_eo.length()); _eo.insertGene( pos, _eo.gene(pos) ); } diff --git a/eo/src/eoKill.h b/eo/src/eoKill.h index d6ad11c79..e32eed285 100644 --- a/eo/src/eoKill.h +++ b/eo/src/eoKill.h @@ -25,7 +25,7 @@ #ifndef _EOKILL_h #define _EOKILL_h -#include +#include #include @@ -41,9 +41,9 @@ public: virtual ~eoKill() {}; /// - virtual void operator()( EOT& _eo ) const { - eoUniform uniform( 0, _eo.length() ); - unsigned pos = uniform( ); + virtual void operator()( EOT& _eo ) const + { + unsigned pos = rng.random(_eo.length()); _eo.deleteGene( pos ); } diff --git a/eo/src/eoMutation.h b/eo/src/eoMutation.h index 2c4672f64..ecca1826d 100644 --- a/eo/src/eoMutation.h +++ b/eo/src/eoMutation.h @@ -27,7 +27,6 @@ #include // EO includes #include -#include /** Generic Mutation of an EO. This is a virtual class, just to establish the interface for the ctor. diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/eoProportionalOpSel.h index 0a48a6209..00ea5fb92 100644 --- a/eo/src/eoProportionalOpSel.h +++ b/eo/src/eoProportionalOpSel.h @@ -36,7 +36,7 @@ #include // Includes from EO -#include +#include #include #include @@ -114,8 +114,7 @@ public: throw runtime_error( "Operator rates added up different from 1.0" ); // If here, operators ordered by rate and no problem - eoUniform u(0,1.0); - float aRnd = u(); + float aRnd = rng.uniform(); i=begin(); acc = 0; do { diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 4265cc9d6..53b7a03e4 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -1,7 +1,10 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + //----------------------------------------------------------------------------- -// eoRandomSelect.h +// eoRandomSelect.h + // (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or @@ -28,16 +31,18 @@ //----------------------------------------------------------------------------- #include -#include // for accumulate +#include // for accumulate + #include #include -#include +#include //----------------------------------------------------------------------------- /** - * eoRandomSelect: an selection operator, which selects randomly a percentage + * eoRandomSelect: an selection operator, which selects randomly a percentage + of the initial population. */ template class eoRandomSelect: public eoBinPopOp @@ -53,41 +58,68 @@ template class eoRandomSelect: public eoBinPopOp /// Takes a percentage of the population randomly, and transfers it to siblings virtual void operator() ( eoPop& _parents, eoPop& _siblings ) { // generates random numbers - eoUniform uniform(0, _parents.size()-1); unsigned num_chroms = (unsigned)(repRate * _parents.size()); // selection of chromosomes do { - _siblings.push_back(_parents[uniform()]); + _siblings.push_back(_parents[rng.random(_parents.size())]); } while (_siblings.size() < num_chroms); - } - - /// @name Methods from eoObject - //@{ - /** - * Read object. Reads the percentage - * Should call base class, just in case. - * @param _s A istream. - */ - virtual void readFrom(istream& _s) { - _s >> repRate; - } - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - it can be reimplemented anywhere. Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - _s << repRate; - } - - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoRandomSelect";}; - - //@} - + } + + + + /// @name Methods from eoObject + + //@{ + + /** + + * Read object. Reads the percentage + + * Should call base class, just in case. + + * @param _s A istream. + + */ + + virtual void readFrom(istream& _s) { + + _s >> repRate; + + } + + + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + + it can be reimplemented anywhere. Instance from base classes are processed in + + base classes, so you don´t have to worry about, for instance, fitness. + + @param _s the ostream in which things are written*/ + + virtual void printOn( ostream& _s ) const{ + + _s << repRate; + + } + + + + /** Inherited from eoObject + + @see eoObject + + */ + + string className() const {return "eoRandomSelect";}; + + + + //@} + + + private: float repRate; diff --git a/eo/src/eoRank.h b/eo/src/eoRank.h index adc3ff83b..1412bc8a9 100644 --- a/eo/src/eoRank.h +++ b/eo/src/eoRank.h @@ -1,8 +1,13 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoRank.h -// (c) GeNeura Team 1999 +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoRank.h + +// (c) GeNeura Team 1999 + /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,13 +25,19 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -//----------------------------------------------------------------------------- - -#ifndef _eoRank_H +//----------------------------------------------------------------------------- + + + +#ifndef _eoRank_H + #define _eoRank_H - -#include -#include + + +#include + +#include + /** * Takes those on the selection list and creates a list of new individuals @@ -41,13 +52,15 @@ class eoRank: public eoSelect{ public: /// Ctor - eoRank( unsigned _newPopSize, eoOpSelector& _opSelector) + eoRank( unsigned _newPopSize, eoOpSelector& _opSelector) + :eoSelect(), opSelector( _opSelector ), repNewPopSize( _newPopSize ) {}; /** Copy ctor * Needs a copy ctor for the EO operators */ eoRank( const eoRank& _rankBreeder) - :eoSelect( _rankBreeder), + :eoSelect( _rankBreeder), + opSelector( _rankBreeder.opSelector ), repNewPopSize( _rankBreeder.repNewPopSize ) {}; /// Dtor @@ -56,7 +69,8 @@ class eoRank: public eoSelect{ /** Takes the genetic pool, and returns next generation, destroying the * genetic pool container * Non-const because it might order the operator vector*/ - virtual void operator() ( const eoPop< EOT >& _ptVeo, + virtual void operator() ( const eoPop< EOT >& _ptVeo, + eoPop< EOT >& _siblings ) const { unsigned inLen = _ptVeo.size(); // size of subPop @@ -64,24 +78,29 @@ class eoRank: public eoSelect{ throw runtime_error( "zero population in eoRank"); for ( unsigned i = 0; i < repNewPopSize; i ++ ) { - // Create a copy of a random input EO with copy ctor. The members of the - // population will be selected by rank, with a certain probability of - // being selected several times if the new population is bigger than the + // Create a copy of a random input EO with copy ctor. The members of the + + // population will be selected by rank, with a certain probability of + + // being selected several times if the new population is bigger than the + // old EOT newEO = _ptVeo[ i%inLen ]; - // Choose operator - eoUniform u( 0, inLen ); - const eoOp& thisOp = opSelector.Op(); + // Choose operator + + const eoOp& thisOp = opSelector.Op(); if ( thisOp.readArity() == unary ) { const eoMonOp& mopPt = dynamic_cast< const eoMonOp& > ( thisOp ); mopPt( newEO ); } else { - const eoBinOp& bopPt = dynamic_cast< const eoBinOp& > ( thisOp ); - EOT mate = _ptVeo[ u() ]; + const eoBinOp& bopPt = dynamic_cast< const eoBinOp& > ( thisOp ); + + EOT mate = _ptVeo[ rng.random(inLen) ]; bopPt( newEO, mate ); } - + + _siblings.push_back( newEO ); } }; @@ -91,27 +110,48 @@ class eoRank: public eoSelect{ void select( unsigned _select ) { repNewPopSize = _select; } - - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - @return the class name as a string - */ - virtual string className() const { return "eoRank"; }; - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - it can be reimplemented anywhere. Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - _s << opSelector; - _s << repNewPopSize; - }; - - - //@} + + + + + /// Methods inherited from eoObject + + //@{ + + + + /** Return the class id. + + @return the class name as a string + + */ + + virtual string className() const { return "eoRank"; }; + + + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + + it can be reimplemented anywhere. Instance from base classes are processed in + + base classes, so you don´t have to worry about, for instance, fitness. + + @param _s the ostream in which things are written*/ + + virtual void printOn( ostream& _s ) const{ + + _s << opSelector; + + _s << repNewPopSize; + + }; + + + + + + //@} + private: eoOpSelector & opSelector; diff --git a/eo/src/eoRnd.h b/eo/src/eoRnd.h index 93b61c2ff..71a7095f1 100644 --- a/eo/src/eoRnd.h +++ b/eo/src/eoRnd.h @@ -43,72 +43,19 @@ //----------------------------------------------------------------------------- /** - * Base class for a family of random number generators. Generates numbers - * according to the parameters given in the constructor. Uses the machine's - * own random number generators. Which is not too good, after all. + * Base class for a family of random 'number' generators. These 'numbers' + * can be anything, including full-fledged chromosomes. */ template -class eoRnd: public eoObject, public eoPersistent +class eoRnd { public: - /// default constructor - eoRnd(unsigned _seed = 0) { - if ( !started ) { - srand(_seed?_seed:time(0)); - started = true; - } - } - - /// Copy cotor - eoRnd(const eoRnd& _r ) {srand(time(0));}; - /** Main function: random generators act as functors, that return random numbers. - It´s non-const because it might modify a seed @return return a random number */ virtual T operator()() = 0; - /** Return the class id. - @return the class name as a string - */ - virtual string className() const { return "eoRandom"; }; - - /** - * Read object. - * @param is A istream. - * @throw runtime_exception If a valid object can't be read. - */ - virtual void readFrom(istream& _is); - - /** - * print object. Prints just the ID, since the seed is not accesible. - * @param is A ostream. - */ - void printOn(ostream& _os) const { _os << endl; }; - -private: - /// true if the RNG has been started already. If it starts every time, means trouble. - static bool started; }; -template bool eoRnd::started = false; - - -//-------------------------------------------------------------------------- - -/** - * Read object. - * @param is A istream. - * @throw runtime_exception If a valid object can't be read. - */ -template -void eoRnd::readFrom(istream& _is) { - if (!_is) - throw runtime_error("Problems reading from stream in eoRnd"); - long seed; - _is >> seed; - srand(seed); -} - #endif diff --git a/eo/src/eoTournament.h b/eo/src/eoTournament.h index 45db15dcd..6cc013902 100644 --- a/eo/src/eoTournament.h +++ b/eo/src/eoTournament.h @@ -1,8 +1,13 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoTournament.h -// (c) GeNeura Team, 1998 +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoTournament.h + +// (c) GeNeura Team, 1998 + /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,20 +25,28 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -//----------------------------------------------------------------------------- - +//----------------------------------------------------------------------------- + + + #ifndef _EOGSTOURN_H #define _EOGSTOURN_H - -//----------------------------------------------------------------------------- -#include // for ceil + +//----------------------------------------------------------------------------- + + +#include #include - -//----------------------------------------------------------------------------- -/** Selects those who are going to reproduce using Tournament selection: - a subset of the population of size tournamentSize is chosen, + +//----------------------------------------------------------------------------- + + +/** Selects those who are going to reproduce using Tournament selection: + + a subset of the population of size tournamentSize is chosen, + and the best is selected for the new population . @author JJ Merelo, 1998 */ @@ -52,7 +65,8 @@ public: void tournamentSize( unsigned _size ) { repTournamentSize = _size; }; /** - * Selects from the initial pop using tournament selection, and copies it + * Selects from the initial pop using tournament selection, and copies it + * to the other population. */ virtual void operator() ( eoPop& _vEO, eoPop& _aVEO) { @@ -62,10 +76,10 @@ public: // Build vector for ( unsigned j = 0; j < thisSize*perc; j ++ ) { // Randomly select a tournamentSize set, and choose the best - eoPop veoTournament; - eoUniform u( 0, thisSize); + eoPop veoTournament; + for ( unsigned k = 0; k < repTournamentSize; k++ ) { - unsigned chosen = u(); + unsigned chosen = rng.random(thisSize); EOT newEO = _vEO[chosen]; veoTournament.push_back( newEO ); } @@ -80,34 +94,61 @@ public: _aVEO.push_back( *best ); } }; - - /// @name Methods from eoObject - //@{ - /** - * Read object. Reads the percentage - * Should call base class, just in case. - * @param _s A istream. - */ - virtual void readFrom(istream& _s) { - _s >> perc >> repTournamentSize; - } - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - it can be reimplemented anywhere. Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - _s << perc << endl << repTournamentSize << endl; - } - - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoTournament";}; - - //@} + + + /// @name Methods from eoObject + + //@{ + + /** + + * Read object. Reads the percentage + + * Should call base class, just in case. + + * @param _s A istream. + + */ + + virtual void readFrom(istream& _s) { + + _s >> perc >> repTournamentSize; + + } + + + + /** Print itself: inherited from eoObject implementation. Declared virtual so that + + it can be reimplemented anywhere. Instance from base classes are processed in + + base classes, so you don´t have to worry about, for instance, fitness. + + @param _s the ostream in which things are written*/ + + virtual void printOn( ostream& _s ) const{ + + _s << perc << endl << repTournamentSize << endl; + + } + + + + /** Inherited from eoObject + + @see eoObject + + */ + + string className() const {return "eoTournament";}; + + + + //@} + + + private: - private: float perc; unsigned repTournamentSize; diff --git a/eo/src/eoTranspose.h b/eo/src/eoTranspose.h index 79146743a..111da025a 100644 --- a/eo/src/eoTranspose.h +++ b/eo/src/eoTranspose.h @@ -25,7 +25,7 @@ #ifndef _EOTRANSPOSE_h #define _EOTRANSPOSE_h -#include +#include #include @@ -45,9 +45,8 @@ public: /// virtual void operator()( EOT& _eo ) const { - eoUniform uniform(0, _eo.length() ); unsigned pos1 = uniform(), - pos2 = uniform(); + pos2 = rng.random(_eo.length()); applyAt( _eo, pos1, pos2 ); } diff --git a/eo/src/eoUniformXOver.h b/eo/src/eoUniformXOver.h index a2dfa5e25..961efa8bf 100644 --- a/eo/src/eoUniformXOver.h +++ b/eo/src/eoUniformXOver.h @@ -1,90 +1,176 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoUniformXOver.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOUNIFORMXOVER_h -#define _EOUNIFORMXOVER_h - - -// for swap -#if defined( __BORLANDC__ ) -#include -#else -#include -#endif - -// EO includes -#include -#include - -//----------------------------------------------------------------------------- -/** - * EOUniformCrossover: operator for binary chromosomes - * implementation of uniform crossover for EO - * swaps ranges of bits between the parents - */ -//----------------------------------------------------------------------------- - -template -class eoUniformXOver: public eoQuadraticOp< EOT > -{ - public: - - /// - eoUniformXOver( float _rate = 0.5 ): - eoQuadraticOp< EOT > ( ), rate( _rate ) { - if (rate < 0 || rate > 1) - runtime_error("UxOver --> invalid rate"); - } - - - /// - void operator() ( EOT& chrom1, EOT& chrom2 ) const { - unsigned end = min(chrom1.length(),chrom2.length()) - 1; - // select bits to change - eoUniform rnd(0, 1); - - // aply changes - for (unsigned bit = 0; bit < end; bit++) - if (rnd() < rate) - swap(chrom1[ bit], chrom2[ bit]); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoUniformXOver";}; - //@} - -private: - float rate; /// rate of uniform crossover -}; - -//----------------------------------------------------------------------------- - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoUniformXOver.h + +// (c) GeNeura Team, 1998 + +/* + + This library is free software; you can redistribute it and/or + + modify it under the terms of the GNU Lesser General Public + + License as published by the Free Software Foundation; either + + version 2 of the License, or (at your option) any later version. + + + + This library is distributed in the hope that it will be useful, + + but WITHOUT ANY WARRANTY; without even the implied warranty of + + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + + Lesser General Public License for more details. + + + + You should have received a copy of the GNU Lesser General Public + + License along with this library; if not, write to the Free Software + + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + + */ + +//----------------------------------------------------------------------------- + + + +#ifndef _EOUNIFORMXOVER_h + +#define _EOUNIFORMXOVER_h + + + + + +// for swap + +#if defined( __BORLANDC__ ) + +#include + +#else + +#include + +#endif + + + +// EO includes + +#include + +#include + + + +//----------------------------------------------------------------------------- + +/** + + * EOUniformCrossover: operator for binary chromosomes + + * implementation of uniform crossover for EO + + * swaps ranges of bits between the parents + + */ + +//----------------------------------------------------------------------------- + + + +template + +class eoUniformXOver: public eoQuadraticOp< EOT > + +{ + + public: + + + + /// + + eoUniformXOver( float _rate = 0.5 ): + + eoQuadraticOp< EOT > ( ), rate( _rate ) { + + if (rate < 0 || rate > 1) + + runtime_error("UxOver --> invalid rate"); + + } + + + + + + /// + + void operator() ( EOT& chrom1, EOT& chrom2 ) const { + + unsigned end = min(chrom1.length(),chrom2.length()) - 1; + + // select bits to change + + // aply changes + + for (unsigned bit = 0; bit < end; bit++) + + if (rng.flip(rate)) + + swap(chrom1[ bit], chrom2[ bit]); + + } + + + + /** @name Methods from eoObject + + readFrom and printOn are directly inherited from eoOp + + */ + + //@{ + + /** Inherited from eoObject + + @see eoObject + + */ + + string className() const {return "eoUniformXOver";}; + + //@} + + + +private: + + float rate; /// rate of uniform crossover + +}; + + + +//----------------------------------------------------------------------------- + + + + + +#endif + diff --git a/eo/src/eoXOver2.h b/eo/src/eoXOver2.h index 867de1c05..ddb1682e3 100644 --- a/eo/src/eoXOver2.h +++ b/eo/src/eoXOver2.h @@ -35,7 +35,7 @@ // EO includes #include -#include +#include /** 2-point crossover: takes the genes in the central section of two EOs and interchanges it @@ -55,8 +55,8 @@ public: EOT& _eo2 ) const { unsigned len1 = _eo1.length(), len2 = _eo2.length(), len= (len1 > len2)?len2:len1; - eoUniform uniform( 0, len ); - unsigned pos1 = uniform(), pos2 = uniform() ; + + unsigned pos1 = rng.random(len), pos2 = rng.random(len) ; applyAt( _eo1, _eo2, pos1, pos2 ); diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index ef3137f25..3e4c1ae7c 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -8,7 +8,7 @@ //----------------------------------------------------------------------------- #include // swap_ranges -#include // eoUniform +#include #include // eoBin #include // eoMonOp @@ -43,9 +43,8 @@ template class eoBinRandom: public eoMonOp */ void operator()(Chrom& chrom) const { - eoUniform uniform(0.0, 1.0); for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = (uniform() < 0.5) ? false : true; + chrom[i] = rng.flip(0.5) ? false : true; } }; @@ -67,8 +66,7 @@ template class eoBinBitFlip: public eoMonOp */ void operator()(Chrom& chrom) const { - eoUniform uniform(0, chrom.size()); - unsigned i = uniform(); + unsigned i = rng.random(chrom.size()); chrom[i] = (chrom[i]) ? false : true; } }; @@ -86,7 +84,7 @@ template class eoBinMutation: public eoMonOp * (Default) Constructor. * @param _rate Rate of mutation. */ - eoBinMutation(const double& _rate = 0.01): rate(_rate), uniform(0.0, 1.0) {} + eoBinMutation(const double& _rate = 0.01): rate(_rate) {} /// The class name. string className() const { return "eoBinMutation"; } @@ -98,13 +96,12 @@ template class eoBinMutation: public eoMonOp void operator()(Chrom& chrom) const { for (unsigned i = 0; i < chrom.size(); i++) - if (uniform() < rate) + if (rng.flip(rate)) chrom[i] = !chrom[i]; } private: double rate; - mutable eoUniform uniform; }; @@ -125,10 +122,9 @@ template class eoBinInversion: public eoMonOp */ void operator()(Chrom& chrom) const { - eoUniform uniform(0, chrom.size() + 1); - unsigned u1 = uniform(), u2; - do u2 = uniform(); while (u1 == u2); + unsigned u1 = rng.random(chrom.size() + 1) , u2; + do u2 = rng.random(chrom.size() + 1); while (u1 == u2); unsigned r1 = min(u1, u2), r2 = max(u1, u2); reverse(chrom.begin() + r1, chrom.begin() + r2); @@ -218,8 +214,7 @@ template class eoBinCrossover: public eoQuadraticOp */ void operator()(Chrom& chrom1, Chrom& chrom2) const { - eoUniform uniform(1, min(chrom1.size(), chrom2.size())); - swap_ranges(chrom1.begin(), chrom1.begin() + uniform(), chrom2.begin()); + swap_ranges(chrom1.begin(), chrom1.begin() + rng.random(min(chrom1.size(), chrom2.size())), chrom2.begin()); } }; @@ -253,11 +248,10 @@ template class eoBinNxOver: public eoQuadraticOp unsigned max_points = min(max_size - 1, num_points); vector points(max_size, false); - eoUniform uniform(1, max_size); // select ranges of bits to swap do { - unsigned bit = uniform(); + unsigned bit = rng.random(max_size) + 1; if (points[bit]) continue; else @@ -317,11 +311,10 @@ template class eoBinGxOver: public eoQuadraticOp unsigned cut_genes = min(max_genes, num_points); vector points(max_genes, false); - eoUniform uniform(0, max_genes); // selects genes to swap do { - unsigned bit = uniform(); + unsigned bit = rng.random(max_genes); if (points[bit]) continue; else From 382557878aeccfca47221714b7ea94678c7d04a4 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 12 Jun 2000 20:07:25 +0000 Subject: [PATCH 0198/2134] eoInit is a base class for making EO's, eoPop now has a constructor for eoInit's --- eo/src/eoInit.h | 43 +++++++++++++++++++++++++++++++++++++++++++ eo/src/eoPop.h | 14 ++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 eo/src/eoInit.h diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h new file mode 100644 index 000000000..48568a13b --- /dev/null +++ b/eo/src/eoInit.h @@ -0,0 +1,43 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInit.h +// (c) Maarten Keijzer 2000, GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInit_H +#define _eoInit_H + +/** + Base class for Initialization of chromosomes, used in a population + contructor + + @see eoPop +*/ +template +class eoInit +{ +public : + virtual EOT operator()(void) = 0; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 8e469e304..e5abfc83e 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -30,6 +30,7 @@ // EO includes #include +#include #include /** Subpopulation: it is used to move parts of population @@ -90,6 +91,19 @@ class eoPop: public vector, public eoObject, public eoPersistent { } }; + /** Ctor for user-defined chromosomes, + @param _popSize total population size + @param _chromRnd Initialization routine, produces EO's + */ + eoPop( unsigned _popSize, eoInit & _chromRnd ) + :vector() + { + for ( unsigned i = 0; i < _popSize; i++ ) + { + push_back( _chromRnd() ); + } + }; + /** Ctor from an istream; reads the population from a stream, each element should be in different lines From c6589b59518855a6e6843be9b235b894dd98171b Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 12 Jun 2000 20:08:01 +0000 Subject: [PATCH 0199/2134] Added a range member function to evaluate an iterator range --- eo/src/eoEvalFunc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 6ff28f2ca..0f90532b5 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -45,6 +45,15 @@ template struct eoEvalFunc { /// Effectively applies the evaluation function to an EO virtual void operator() ( EOT & _eo ) const = 0; + + template + void range(It begin, It end) const + { + for (;begin != end; ++begin) + { + operator()(*begin); + } + } }; #endif From 4c4ce70c0468f6fb0c490d2e15f2ff9b5fa62f9b Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 12 Jun 2000 20:09:59 +0000 Subject: [PATCH 0200/2134] New ES routines --- eo/src/es/eoEsBase.h | 59 +++++++ eo/src/es/eoEsChromInit.h | 134 +++++++++++++++ eo/src/es/eoEsFull.h | 92 +++++++++++ eo/src/es/eoEsMutate.h | 282 ++++++++++++++++++++++++++++++++ eo/src/es/eoEsMutationInit.h | 105 ++++++++++++ eo/src/es/eoEsObjectiveBounds.h | 81 +++++++++ eo/src/es/eoEsSimple.h | 81 +++++++++ eo/src/es/eoEsStdev.h | 81 +++++++++ eo/src/es/evolution_strategies | 15 ++ eo/test/Makefile.am | 9 +- eo/test/real_value.h | 13 +- eo/test/t-eoESFull.cpp | 181 +++++++++++--------- eo/win/.cvsignore | 1 + eo/win/eo.dsp | 4 + eo/win/eo_win.dsw | 3 + eo/win/esfull.dsp | 37 +++-- eo/win/t_externalEO.dsp | 24 ++- 17 files changed, 1102 insertions(+), 100 deletions(-) create mode 100644 eo/src/es/eoEsBase.h create mode 100644 eo/src/es/eoEsChromInit.h create mode 100644 eo/src/es/eoEsFull.h create mode 100644 eo/src/es/eoEsMutate.h create mode 100644 eo/src/es/eoEsMutationInit.h create mode 100644 eo/src/es/eoEsObjectiveBounds.h create mode 100644 eo/src/es/eoEsSimple.h create mode 100644 eo/src/es/eoEsStdev.h create mode 100644 eo/src/es/evolution_strategies diff --git a/eo/src/es/eoEsBase.h b/eo/src/es/eoEsBase.h new file mode 100644 index 000000000..5bca18a2d --- /dev/null +++ b/eo/src/es/eoEsBase.h @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsBase.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsBase_h +#define _eoEsBase_h + +/** +\ingroup EvolutionStrategies + + Base class for evolution strategies, just derives from EO and vector and + redirects the operator< to EO (fitness based comparison) +*/ + +template +class eoEsBase : public EO, public std::vector +{ + public : + + typedef double Type; + + /// to avoid conflicts between EO::operator< and vector::operator< + bool operator<(const eoEsBase& _eo) const + { + return EO::operator<(_eo); + } + +}; + +/// to avoid conflicts between EO::operator< and vector::operator< +template +bool operator<(const eoEsBase& _eo1, const eoEsBase& _eo2) +{ + return _eo1.operator<(_eo2); +} + +#endif \ No newline at end of file diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h new file mode 100644 index 000000000..872fc8ed5 --- /dev/null +++ b/eo/src/es/eoEsChromInit.h @@ -0,0 +1,134 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsChromInit.h +// (c) Maarten Keijzer 2000, GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsChromInit_H +#define _eoEsChromInit_H + +#include +#include +#include +#include +#include + +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +/** +\ingroup EvolutionStrategies + + Random Es-chromosome initializer (therefore derived from eoRnd) + + This class can initialize three types of Es's: + + eoEsSimple + eoEsStdev + eoEsFull + + @see eoEsSimple eoEsStdev eoEsFull eoInit +*/ + +template +class eoEsChromInit : public eoInit +{ +public : + typedef typename EOT::Fitness FitT; + + eoEsChromInit(eoEsObjectiveBounds& _bounds) : bounds(_bounds) + {} + + EOT operator()() + { + return create(EOT()); + } + +private : + + eoEsSimple& create(eoEsSimple& result) + { + result.resize(bounds.chromSize()); + + for (unsigned i = 0; i < result.size(); ++i) + { + result[i] = bounds.minimum(i) + rng.uniform(bounds.maximum(i) - bounds.minimum(i)); + } + + return result; + } + + eoEsStdev create(eoEsStdev& result) + { + unsigned chromSize = bounds.chromSize(); + result.resize(chromSize); + result.stdevs.resize(chromSize); + + for (unsigned i = 0; i < chromSize; ++i) + { + double length = bounds.maximum(i) - bounds.minimum(i); + result[i] = bounds.minimum(i) + rng.uniform(length); + + // Just a guess at the stdevs (anyone a better idea?) + result.stdevs[i] = rng.uniform(length); + } + + return result; + } + + eoEsFull create(eoEsFull& result) + { + unsigned chromSize = bounds.chromSize(); + result.resize(chromSize); + result.stdevs.resize(chromSize); + + unsigned i; + + for (i = 0; i < chromSize; ++i) + { + double length = bounds.maximum(i) - bounds.minimum(i); + result[i] = bounds.minimum(i) + rng.uniform(length); + + // Just a guess at the stdevs (anyone a better idea?) + result.stdevs[i] = rng.uniform(length); + } + + // nb of rotation angles: N*(N-1)/2 (in general!) + result.correlations.resize(chromSize*(chromSize - 1) / 2); + + for (i = 0; i < result.correlations.size(); ++i) + { + // And another random guess for random initialization + result.correlations[i] = rng.uniform(2 * M_PI) - M_PI; + } + + return result; + } + + eoEsObjectiveBounds& bounds; +}; + +#endif \ No newline at end of file diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h new file mode 100644 index 000000000..7f154ad2b --- /dev/null +++ b/eo/src/es/eoEsFull.h @@ -0,0 +1,92 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsFull.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsFull_h +#define _eoEsFull_h + +#include + +/** +\ingroup EvolutionStrategies + + The most complex evolutionary strategy representation. Co-evolving mutation +rates and correlated mutations. +*/ + +template +class eoEsFull : public eoEsBase +{ + public : + + eoEsFull(void) : eoEsBase() {} + + std::string className(void) const { return "eoEsFull"; } + + void printOn(std::ostream& os) const + { + os << size() << ' '; + + std::copy(begin(), end(), std::ostream_iterator(os)); + + os << ' '; + std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os)); + + os << ' '; + + std::copy(correlations.begin(), correlations.end(), std::ostream_iterator(os)); + + os << ' '; + } + + void readFrom(istream& is) + { + unsigned sz; + is >> sz; + + resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + is >> operator[](i); + + stdevs.resize(sz); + + for (i = 0; i < sz; ++i) + is >> stdevs[i]; + + correlations.resize(sz*(sz - 1) / 2); + + for (i = 0; i < correlations.size(); ++i) + is >> correlations[i]; + } + + vector stdevs; + vector correlations; +}; + + + +#endif \ No newline at end of file diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h new file mode 100644 index 000000000..0a6138428 --- /dev/null +++ b/eo/src/es/eoEsMutate.h @@ -0,0 +1,282 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESMute.h : ES mutation +// (c) Maarten Keijzer 2000 & GeNeura Team, 1998 for the EO part +// Th. Baeck 1994 and EEAAX 1999 for the ES part +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOESMUTATE_H +#define _EOESMUTATE_H + +#include +#include +#include // for exp + +#include +#include +#include +#include +#include + +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +/** + +\ingroup EvolutionStrategies + + ES-style mutation in the large: Obviously, valid only for eoES* + + It is currently valid for three types of ES chromosomes: + + eoEsSimple: only 1 std deviation + eoEsStdev: as many standard deviations as object variables + eoEsFull: The whole guacemole: correlations, stdevs and object variables + + Each of these three variant has it's own operator() in eoEsMutate and intialization + is also split into three cases (that share some commonalities) +*/ + +template +class eoEsMutate: public eoMonOp< EOT > { +public: + + typedef EOT::Fitness FitT; + + /** Initialization + parameters: + + @param _init proxy class for initializating the three parameters eoEsMutate needs + @param _bounds the bounds for the objective variables + */ + eoEsMutate(eoEsMutationInit& _init, eoEsObjectiveBounds& _bounds) : bounds(_bounds) + { + init(EOT(), _init); // initialize on actual type used + } + + /// needed virtual dtor + virtual ~eoEsMutate() {}; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESMutate";}; + + /** + Mutate eoEsSimple + */ + virtual void operator()( eoEsSimple& _eo) const + { + _eo.stdev *= exp(TauLcl * rng.normal()); + + if (_eo.stdev < stdev_eps) + _eo.stdev = stdev_eps; + + // now apply to all + + for (unsigned i = 0; i < _eo.size(); ++i) + { + _eo[i] += _eo.stdev * rng.normal(); + } + + keepInBounds(_eo); + } + + /// mutations - standard and correlated + // ========= + /* + * Standard mutation of object variables and standard + * deviations in ESs. + * If there are fewer different standard deviations available + * than the dimension of the objective function requires, the + * last standard deviation is responsible for ALL remaining + * object variables. + * Schwefel 1977: Numerische Optimierung von Computer-Modellen + * mittels der Evolutionsstrategie, pp. 165 ff. + */ + + virtual void operator()( eoEsStdev& _eo ) const + { + double global = exp(TauGlb * rng.normal()); + for (unsigned i = 0; i < _eo.size(); i++) + { + double stdev = _eo.stdevs[i]; + stdev *= global * exp(TauLcl * rng.normal()); + + if (stdev < stdev_eps) + stdev = stdev_eps; + + _eo.stdevs[i] = stdev; + _eo[i] += stdev * rng.normal(); + } + + keepInBounds(_eo); + } + + /* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + + // Code from Thomas Baeck + + virtual void operator()( eoEsFull & _eo ) const + { + + /* + * First: mutate standard deviations (as above). + */ + + double global = exp(TauGlb * rng.normal()); + for (unsigned i = 0; i < _eo.size(); i++) + { + double stdev = _eo.stdevs[i]; + stdev *= global * exp(TauLcl * rng.normal()); + + if (stdev < stdev_eps) + stdev = stdev_eps; + + _eo.stdevs[i] = stdev; + } + + + /* + * Mutate rotation angles. + */ + + for (i = 0; i < _eo.correlations.size(); i++) + { + _eo.correlations[i] += TauBeta * rng.normal(); + if ( fabs(_eo.correlations[i]) > M_PI ) + { + _eo.correlations[i] -= M_PI * (int) (_eo.correlations[i]/M_PI) ; + } + } + + /* + * Perform correlated mutations. + */ + unsigned k, n1, n2; + double d1,d2, S, C; + + vector VarStp(_eo.size()); + for (i = 0; i < _eo.size(); i++) + VarStp[i] = _eo.stdevs[i] * rng.normal(); + + unsigned nq = _eo.correlations.size() - 1; + + for (k = 0; k < _eo.size()-1; k++) + { + n1 = _eo.size() - k - 1; + n2 = _eo.size() - 1; + + for (i = 0; i < k; i++) + { + d1 = VarStp[n1]; + d2 = VarStp[n2]; + S = sin( _eo.correlations[nq] ); + C = cos( _eo.correlations[nq] ); + VarStp[n2] = d1 * S + d2 * C; + VarStp[n1] = d1 * C - d2 * S; + n2--; + nq--; + } + } + + for (i = 0; i < _eo.size(); i++) + _eo[i] += VarStp[i]; + + keepInBounds(_eo); + } + + void keepInBounds(eoEsBase& _eo) const + { + for (unsigned i = 0; i < _eo.size(); ++i) + { + if (_eo[i] < bounds.minimum(i)) + _eo[i] = bounds.minimum(i); + else if (_eo[i] > bounds.maximum(i)) + _eo[i] = bounds.maximum(i); + } + } + + private : + + void init(eoEsSimple&, eoEsMutationInit& _init) + { + unsigned size = bounds.chromSize(); + TauLcl = _init.TauLcl(); + TauLcl /= sqrt((double) size); + } + + void init(eoEsStdev&, eoEsMutationInit& _init) + { + unsigned size = bounds.chromSize(); + + TauLcl = _init.TauLcl(); + TauGlb = _init.TauGlb(); + + // renormalization + TauLcl /= sqrt( 2.0 * sqrt( (double)size ) ); + TauGlb /= sqrt( 2.0 * ( (double) size ) ); + } + + void init(eoEsFull&, eoEsMutationInit& _init) + { + init(eoEsStdev(), _init); + TauBeta = _init.TauBeta(); + } + + // the data + //========= + double TauLcl; /* Local factor for mutation of std deviations */ + double TauGlb; /* Global factor for mutation of std deviations */ + double TauBeta; /* Factor for mutation of correlation parameters */ + + eoEsObjectiveBounds& bounds; + + static const double stdev_eps; +}; + +template +const double eoEsMutate::stdev_eps = 1.0e-40; + +/* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + +#endif + diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h new file mode 100644 index 000000000..b2f60b3d0 --- /dev/null +++ b/eo/src/es/eoEsMutationInit.h @@ -0,0 +1,105 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsMutationInit.h +// (c) GeNeura Team, 1998 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsInit_h +#define _eoEsInit_h + +#include + +/** +\ingroup EvolutionStrategies + + eoESMutationInit. Proxy class that is used for initializing the mutation + operator. It provides an interface between eoEsMutate and the abstract + parameterLoader. It also provides the names for the parameters in this + class as virtual protected member functions. + + If you have more than a single ES in a project that need different + names in the configuration files, you might consider overriding this class + to change the names. + + @see eoEsMutate +*/ +class eoEsMutationInit +{ + public : + + eoEsMutationInit(eoParameterLoader& _parser) : parser(_parser), TauLclParam(0), TauGlbParam(0), TauBetaParam(0) {} + + double TauLcl(void) + { + if (TauLclParam == 0) + { + TauLclParam = &parser.createParam(1.0, TauLclName(), "Local Tau", TauLclShort(), section()); + } + + return TauLclParam->value(); + } + + double TauGlb(void) + { + if (TauGlbParam == 0) + { + TauGlbParam = &parser.createParam(1.0, TauGlbName(), "Global Tau", TauGlbShort(), section()); + } + + return TauGlbParam->value(); + } + + double TauBeta(void) + { + if (TauBetaParam == 0) + { + TauBetaParam = &parser.createParam(0.0873, TauBetaName(), "Beta", TauBetaShort(), section()); + } + + return TauBetaParam->value(); + } + + protected : + + virtual std::string section(void) + { return "Parameters of ES mutation (before renormalization)"; } + + virtual std::string TauLclName(void) const { return "TauLcL"; } + virtual char TauLclShort(void) const { return 'l'; } + + virtual std::string TauGlbName(void) const { return "TauGlb"; } + virtual char TauGlbShort(void) const { return 'g'; } + + virtual std::string TauBetaName(void) const { return "Beta"; } + virtual char TauBetaShort(void) const { return 'b'; } + + private : + + eoParameterLoader& parser; + + eoValueParam* TauLclParam; + eoValueParam* TauGlbParam; + eoValueParam* TauBetaParam; +}; + +#endif \ No newline at end of file diff --git a/eo/src/es/eoEsObjectiveBounds.h b/eo/src/es/eoEsObjectiveBounds.h new file mode 100644 index 000000000..7f152ea48 --- /dev/null +++ b/eo/src/es/eoEsObjectiveBounds.h @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsObjectiveBounds.h +// (c) Maarten Keijzer 2000, GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsObjectiveBounds_h +#define _eoEsObjectiveBounds_h + +/** +\defgroup EvolutionStrategies + + Various classes for the initialization and mutation of real valued vectors. + + Supports simple mutations and various more adaptable mutations, including + correlated mutations. + +*/ + + +/** +\class eoEsObjectiveBounds eoEsObjectiveBounds.h es/eoEsObjectiveBounds.h +\ingroup EvolutionStrategies + + Defines the minima and maxima of the object variables. Needed by eoEsChromInit + and eoEsMutate + + @see eoEsChromInit eoEsMutate +*/ +class eoEsObjectiveBounds +{ + public : + + /** + Objective bounds for a global minimum and maximum + */ + eoEsObjectiveBounds(int _nGenes, double _min, double _max) : repMinimum(_nGenes), repMaximum(_nGenes) + { + std::fill(repMinimum.begin(), repMinimum.end(), _min); + std::fill(repMaximum.begin(), repMaximum.end(), _max); + } + + /** + Objective bounds for a per gene minimum and maximum + */ + eoEsObjectiveBounds(const std::vector& _min, const std::vector& _max) + : repMinimum(_min), repMaximum(_max) {} + + typedef double doubleype; + + double minimum(size_t i) { return repMinimum[i]; } + double maximum(size_t i) { return repMaximum[i]; } + + unsigned chromSize(void) const { return repMinimum.size(); } + + private : + std::vector repMinimum; + std::vector repMaximum; +}; + +#endif \ No newline at end of file diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h new file mode 100644 index 000000000..b93d0e58b --- /dev/null +++ b/eo/src/es/eoEsSimple.h @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsSimple.h +// (c) GeNeura Team, 2000 - EEAAX 1999, Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsSimple_h +#define _eoEsSimple_h + +#include +#include + +#include + +/** +\ingroup EvolutionStrategies + + One of the more simple evolution strategies, sporting just a single +stdeviation for the entire chromosome. For more advanced versions +see also eoEsStdev eoEsFull + + @see eoEsStdev eoEsFull + +*/ + +template +class eoEsSimple : public eoEsBase +{ +public : + + eoEsSimple(void) : eoEsBase() {} + + std::string className(void) const { return "eoEsSimple"; } + + void printOn(ostream& os) const + { + os << size() << ' '; + + std::copy(begin(), end(), ostream_iterator(os)); + + os << ' ' << stdev << ' '; + } + + void readFrom(istream& is) + { + unsigned sz; + is >> sz; + + resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + is >> operator[](i); + + is >> stdev; + } + + double stdev; +}; + +#endif diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h new file mode 100644 index 000000000..1699e02c2 --- /dev/null +++ b/eo/src/es/eoEsStdev.h @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsStdev.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsStdev_h +#define _eoEsStdev_h + +#include + +/** +\ingroup EvolutionStrategies + +Evolutionary strategie style representation, supporting co-evolving standard +deviations. +*/ + +template +class eoEsStdev : public eoEsBase +{ + public : + + eoEsStdev(void) : eoEsBase() {} + + std::string className(void) const { return "eoEsStdev"; } + + void printOn(std::ostream& os) const + { + os << size() << ' '; + + std::copy(begin(), end(), std::ostream_iterator(os)); + + os << ' '; + std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os)); + + os << ' '; + } + + void readFrom(istream& is) + { + unsigned sz; + is >> sz; + + resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + is >> operator[](i); + + stdevs.resize(sz); + + for (i = 0; i < sz; ++i) + is >> stdevs[i]; + } + + + vector stdevs; +}; + +#endif \ No newline at end of file diff --git a/eo/src/es/evolution_strategies b/eo/src/es/evolution_strategies new file mode 100644 index 000000000..d1c729ba9 --- /dev/null +++ b/eo/src/es/evolution_strategies @@ -0,0 +1,15 @@ +#ifndef _eoEs_h +#define _eoEs_h + +#include +#include +#include +#include + +#include +#include + +#include + + +#endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 5205b8765..9d12043f1 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -18,7 +18,7 @@ noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser \ t-eoAtomOps t-selectOne t-eoGOpSel \ - t-eoVector t-eoCheckpointing t-eoExternalEO + t-eoVector t-eoCheckpointing t-eoExternalEO t-eoESFull ############################################################################### @@ -178,4 +178,11 @@ t_eoExternalEO_LDADD = $(LDADDS) ############################################################################### +t_eoESFull_SOURCES = t-eoESFull.cpp +t_eoESFull_DEPENDENCIES = $(DEPS) +t_eoESFull_LDFLAGS = -lm +t_eoESFull_LDADD = $(LDADDS) + +############################################################################### + diff --git a/eo/test/real_value.h b/eo/test/real_value.h index 324ecae8d..ed983bc2a 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -1,19 +1,18 @@ -#include - +#include //----------------------------------------------------------------------------- -typedef vector Vec; -/** Just a simple function that takes an eoVector and sets the fitnes - to -sphere (we'll see later how to minimize rather than maximize!) +/** Just a simple function that takes an eoEsBase and sets the fitnes + to sphere @param _ind A floatingpoint vector */ -float real_value(const eoESFullChrom& _ind) + +double real_value(const eoEsBase& _ind) { double sum = 0; /* compute in double format, even if return a float */ for (unsigned i = 0; i < _ind.size(); i++) sum += _ind[i] * _ind[i]; - return -sum; + return sum; } diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index eae0e9811..46372ea06 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -4,110 +4,145 @@ #pragma warning(disable:4786) #endif +#include #include #include #include +#include using namespace std; #include +#include -// evolution specific +#include +#include + +// population +#include + +// evaluation specific #include // representation specific -#include // though contained in following -//#include -//#include -//#include -// this fitness +#include + #include "real_value.h" // the sphere fitness // Now the main /////////////// -typedef eoESFullChrom Ind; - -main(int argc, char *argv[]) { -// unsigned mu, lambda; -// bool comma; +typedef double FitT; +template +void runAlgorithm(EOT, eoParser& _parser, eoEsObjectiveBounds& _bounds); + +main(int argc, char *argv[]) +{ // Create the command-line parser eoParser parser( argc, argv, "Basic EA for vector with adaptive mutations"); // Define Parameters and load them - eoValueParam& seed = parser.createParam(time(0), "seed", "Random number seed"); - eoValueParam& load_name = parser.createParam("", "Load","Load a state file",'L'); - eoValueParam& save_name = parser.createParam("", "Save","Saves a state file",'S'); - + eoValueParam& seed = parser.createParam(static_cast(time(0)), "seed", "Random number seed"); + eoValueParam& load_name = parser.createParam(string(), "Load","Load a state file",'L'); + eoValueParam& save_name = parser.createParam(string(), "Save","Saves a state file",'S'); + eoValueParam& stdevs = parser.createParam(true, "Stdev", "Use adaptive mutation rates", 's'); + eoValueParam& corr = parser.createParam(true, "Correl", "Use correlated mutations", 'c'); + eoValueParam& chromSize = parser.createParam(unsigned(1), "ChromSize", "Number of chromosomes", 'n'); + eoValueParam& minimum = parser.createParam(-1.e5, "Min", "Minimum for Objective Variables", 'l'); + eoValueParam& maximum = parser.createParam(1.e5, "Max", "Maximum for Objective Variables", 'h'); + eoState state; - state.registerObject(parser); - - if (load_name.value() != "") + state.registerObject(parser); + rng.reseed(seed.value()); + + if (!load_name.value().empty()) { // load the parser. This is only neccessary when the user wants to // be able to change the parameters in the state file by hand. state.load(load_name.value()); // load the parser } - - // Evaluation - eoEvalFuncPtr eval( real_value ); + state.registerObject(rng); - - - /* - // Evolution and population parameters - eoScheme the_scheme(parser); - - // recombination and mutation operators, reading their parameters from the parser - eoESReco MyReco(parser, FirstEO); - eoESMutate MyMut(parser, FirstEO); - - // termination conditions read by the parser - eoTermVector the_terms(parser); - - // Initialization of the population - // shoudl be called using the parser, in case you want to read from file(s) - eoESRandomize randomize; // an eoESInd randomnizer - eoPop pop(the_scheme.PopSize(), FirstEO, randomize); - // eval(pop); // shoudl we call it from inside the constructor??? - - // ALL parmeters have been read: write them out - // Writing the parameters on arv[0].status - // but of course this can be modified - see the example parser.cpp - parser.outputParam(); - // except the help parameter??? - if( parser.getBool("-h" , "--help" , "Shows this help")) { - parser.printHelp(); - exit(1); - } - - unsigned i, iind; - - - cout << "Initial population: \n" << endl; - for (i = 0; i < pop.size(); ++i) { - eval(pop[i]); - cout << pop[i].fitness() << "\t" << pop[i] << endl; + eoEsObjectiveBounds bounds(chromSize.value(), minimum.value(), maximum.value()); + + // Run the appropriate algorithm + if (stdevs.value() == false && corr.value == false) + { + runAlgorithm(eoEsSimple() ,parser, bounds); + } + else if (corr.value() == true) + { + runAlgorithm(eoEsFull(),parser, bounds); + } + else + { + runAlgorithm(eoEsStdev(), parser, bounds); } - // the Operators - eoSequentialOpHolder seqholder; - // seqholder.addOp(MyReco, 1.0); - seqholder.addOp(MyMut, 1.0); + // and save + if (!save_name.value().empty()) + { + string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); + } - // One generation - eoEvolStep evol_scheme(the_scheme, seqholder, eval); - - // the algorithm: - eoFullEA ea(evol_scheme, the_terms); - - ea(pop); - - cout << "Final population: \n" << endl; - for (i = 0; i < pop.size(); ++i) - cout << pop[i].fitness() << "\t" << pop[i] << endl; - */ return 0; } +template +void runAlgorithm(EOT, eoParser& _parser, eoEsObjectiveBounds& _bounds) +{ + // evaluation + eoEvalFuncPtr > eval( real_value ); + // population parameters, unfortunately these can not be altered in the state file + eoValueParam mu = _parser.createParam(unsigned(50), "mu","Size of the population"); + eoValueParamlambda = _parser.createParam(unsigned(250), "lambda", "No. of children to produce"); + + if (mu.value() > lambda.value()) + { + throw logic_error("Mu must be smaller than lambda in a comma strategy"); + } + + // Initialization + eoEsChromInit init(_bounds); + eoPop pop(mu.value(), init); + + // evaluate initial population + eval.range(pop.begin(), pop.end()); + + // Ok, time to set up the algorithm + // Proxy for the mutation parameters + eoEsMutationInit mutateInit(_parser); + + eoEsMutate mutate(mutateInit, _bounds); + + // monitoring, statistics etc. + eoAverageStat average; + eoFileMonitor monitor("test.csv"); + + monitor.add(average); + + // Okok, I'm lazy, here's the algorithm defined inline + + for (unsigned i = 0; i < 20; ++i) + { + pop.resize(pop.size() + lambda.value()); + + for (unsigned j = mu.value(); j < pop.size(); ++j) + { + pop[j] = pop[rng.random(mu.value())]; + mutate(pop[j]); + eval(pop[j]); + } + + // comma strategy + std::sort(pop.begin() + mu.value(), pop.end()); + copy(pop.begin() + mu.value(), pop.begin() + 2 * mu.value(), pop.begin()); + pop.resize(mu.value()); + + average(pop); + monitor(); + } +} diff --git a/eo/win/.cvsignore b/eo/win/.cvsignore index 69fb0bd82..880de1a77 100644 --- a/eo/win/.cvsignore +++ b/eo/win/.cvsignore @@ -4,3 +4,4 @@ .libs Makefile Makefile.in +eo.dsw diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 3db96ed83..00c492e00 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -159,6 +159,10 @@ SOURCE=..\src\utils\eoRNG.h # End Source File # Begin Source File +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + SOURCE=..\src\utils\eoState.h # End Source File # Begin Source File diff --git a/eo/win/eo_win.dsw b/eo/win/eo_win.dsw index 4fdaee76b..9fe1b8c6b 100644 --- a/eo/win/eo_win.dsw +++ b/eo/win/eo_win.dsw @@ -173,6 +173,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency }}} ############################################################################### diff --git a/eo/win/esfull.dsp b/eo/win/esfull.dsp index f52a4855d..ffa566ab9 100644 --- a/eo/win/esfull.dsp +++ b/eo/win/esfull.dsp @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF @@ -89,15 +89,6 @@ LINK32=link.exe # Begin Source File SOURCE="..\test\t-eoESFull.cpp" - -!IF "$(CFG)" == "esfull - Win32 Release" - -!ELSEIF "$(CFG)" == "esfull - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # End Group # Begin Group "Header Files" @@ -105,15 +96,35 @@ SOURCE="..\test\t-eoESFull.cpp" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File -SOURCE=..\src\es\eoESFullChrom.h +SOURCE=..\src\es\eoEsBase.h # End Source File # Begin Source File -SOURCE=..\src\es\eoESFullMut.h +SOURCE=..\src\es\eoEsChromInit.h # End Source File # Begin Source File -SOURCE=..\src\es\eoESInit.h +SOURCE=..\src\es\eoEsFull.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutate.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutationInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsObjectiveBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsSimple.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStdev.h # End Source File # End Group # Begin Group "Resource Files" diff --git a/eo/win/t_externalEO.dsp b/eo/win/t_externalEO.dsp index a963505de..32c6cb728 100644 --- a/eo/win/t_externalEO.dsp +++ b/eo/win/t_externalEO.dsp @@ -48,8 +48,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "t_externalEO - Win32 Debug" @@ -63,16 +63,16 @@ LINK32=link.exe # PROP Output_Dir "t_externalEO___Win32_Debug" # PROP Intermediate_Dir "t_externalEO___Win32_Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF @@ -91,6 +91,18 @@ SOURCE="..\test\t-eoExternalEO.cpp" # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoEvalFuncPtr.h +# End Source File +# Begin Source File + +SOURCE=..\src\other\eoExternalEO.h +# End Source File +# Begin Source File + +SOURCE=..\src\other\eoExternalOpFunctions.h +# End Source File # End Group # Begin Group "Resource Files" From e55e3813dc442a1978170da3e9b9a39b0f0756e9 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 12 Jun 2000 20:23:20 +0000 Subject: [PATCH 0201/2134] Oh, right found some errors --- eo/src/es/eoEsChromInit.h | 3 ++- eo/src/es/eoEsMutate.h | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 872fc8ed5..e9485d2b0 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -64,7 +64,8 @@ public : EOT operator()() { - return create(EOT()); + EOT eo; + return create(eo); } private : diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 0a6138428..ce76bfe1a 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -65,7 +65,7 @@ template class eoEsMutate: public eoMonOp< EOT > { public: - typedef EOT::Fitness FitT; + typedef typename EOT::Fitness FitT; /** Initialization parameters: @@ -156,7 +156,8 @@ public: */ double global = exp(TauGlb * rng.normal()); - for (unsigned i = 0; i < _eo.size(); i++) + unsigned i; + for (i = 0; i < _eo.size(); i++) { double stdev = _eo.stdevs[i]; stdev *= global * exp(TauLcl * rng.normal()); @@ -230,14 +231,14 @@ public: private : - void init(eoEsSimple&, eoEsMutationInit& _init) + void init(eoEsSimple, eoEsMutationInit& _init) { unsigned size = bounds.chromSize(); TauLcl = _init.TauLcl(); TauLcl /= sqrt((double) size); } - void init(eoEsStdev&, eoEsMutationInit& _init) + void init(eoEsStdev, eoEsMutationInit& _init) { unsigned size = bounds.chromSize(); @@ -249,7 +250,7 @@ public: TauGlb /= sqrt( 2.0 * ( (double) size ) ); } - void init(eoEsFull&, eoEsMutationInit& _init) + void init(eoEsFull, eoEsMutationInit& _init) { init(eoEsStdev(), _init); TauBeta = _init.TauBeta(); From 71b0dc17716a39350ee6bb3777dea7ebce3293f7 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 12 Jun 2000 20:24:27 +0000 Subject: [PATCH 0202/2134] Oh, right found some errors using gcc --- eo/src/utils/eoFileMonitor.h | 3 +++ eo/src/utils/eoStat.h | 4 ++-- eo/test/t-eoESFull.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index d6e414890..45d889a60 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -32,6 +32,9 @@ #include #include +/** + Prints statistics to file +*/ class eoFileMonitor : public eoMonitor { public : diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 92a8c7940..78b1778c6 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -60,7 +60,7 @@ class eoAverageStat : public eoStat public : eoAverageStat(std::string _description = "AverageFitness") : eoStat(0.0, _description) {} - static double sumFitness(double _sum, const EOT& eot) + static double sumFitness(double _sum, const EOT& _eot) { _sum += _eot.fitness(); return _sum; @@ -72,7 +72,7 @@ public : { double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness); - value() = v / pop.size(); + value() = v / _pop.size(); } }; diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 46372ea06..75be5006b 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -66,7 +66,7 @@ main(int argc, char *argv[]) eoEsObjectiveBounds bounds(chromSize.value(), minimum.value(), maximum.value()); // Run the appropriate algorithm - if (stdevs.value() == false && corr.value == false) + if (stdevs.value() == false && corr.value() == false) { runAlgorithm(eoEsSimple() ,parser, bounds); } From 152d42d41ec56013d7e07cc5c18d5f7eff0f96bd Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 09:43:34 +0000 Subject: [PATCH 0203/2134] Removed eoEsBase and created an eoFixedLength --- eo/src/{es/eoEsBase.h => eoFixedLength.h} | 20 ++++++++++---------- eo/src/es/eoEsFull.h | 6 +++--- eo/src/es/eoEsMutate.h | 2 +- eo/src/es/eoEsSimple.h | 6 +++--- eo/src/es/eoEsStdev.h | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) rename eo/src/{es/eoEsBase.h => eoFixedLength.h} (74%) diff --git a/eo/src/es/eoEsBase.h b/eo/src/eoFixedLength.h similarity index 74% rename from eo/src/es/eoEsBase.h rename to eo/src/eoFixedLength.h index 5bca18a2d..d2affe708 100644 --- a/eo/src/es/eoEsBase.h +++ b/eo/src/eoFixedLength.h @@ -24,25 +24,25 @@ */ //----------------------------------------------------------------------------- -#ifndef _eoEsBase_h -#define _eoEsBase_h +#ifndef _eoFixedLength_h +#define _eoFixedLength_h /** \ingroup EvolutionStrategies - Base class for evolution strategies, just derives from EO and vector and - redirects the operator< to EO (fitness based comparison) + Base class for fixed length chromosomes, just derives from EO and vector and + redirects the smaller than operator to EO (fitness based comparison) */ -template -class eoEsBase : public EO, public std::vector +template +class eoFixedLength : public EO, public std::vector { public : typedef double Type; /// to avoid conflicts between EO::operator< and vector::operator< - bool operator<(const eoEsBase& _eo) const + bool operator<(const eoFixedLength& _eo) const { return EO::operator<(_eo); } @@ -50,10 +50,10 @@ class eoEsBase : public EO, public std::vector }; /// to avoid conflicts between EO::operator< and vector::operator< -template -bool operator<(const eoEsBase& _eo1, const eoEsBase& _eo2) +template +bool operator<(const eoFixedLength& _eo1, const eoFixedLength& _eo2) { return _eo1.operator<(_eo2); } -#endif \ No newline at end of file +#endif diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 7f154ad2b..67ba32904 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -27,7 +27,7 @@ #ifndef _eoEsFull_h #define _eoEsFull_h -#include +#include /** \ingroup EvolutionStrategies @@ -37,11 +37,11 @@ rates and correlated mutations. */ template -class eoEsFull : public eoEsBase +class eoEsFull : public eoFixedLength { public : - eoEsFull(void) : eoEsBase() {} + eoEsFull(void) : eoFixedLength() {} std::string className(void) const { return "eoEsFull"; } diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index ce76bfe1a..8f46d1406 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -218,7 +218,7 @@ public: keepInBounds(_eo); } - void keepInBounds(eoEsBase& _eo) const + void keepInBounds(eoFixedLength& _eo) const { for (unsigned i = 0; i < _eo.size(); ++i) { diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h index b93d0e58b..8516dcf0a 100644 --- a/eo/src/es/eoEsSimple.h +++ b/eo/src/es/eoEsSimple.h @@ -30,7 +30,7 @@ #include #include -#include +#include /** \ingroup EvolutionStrategies @@ -44,11 +44,11 @@ see also eoEsStdev eoEsFull */ template -class eoEsSimple : public eoEsBase +class eoEsSimple : public eoFixedLength { public : - eoEsSimple(void) : eoEsBase() {} + eoEsSimple(void) : eoFixedLength() {} std::string className(void) const { return "eoEsSimple"; } diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index 1699e02c2..9c998ffd0 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -27,7 +27,7 @@ #ifndef _eoEsStdev_h #define _eoEsStdev_h -#include +#include /** \ingroup EvolutionStrategies @@ -37,11 +37,11 @@ deviations. */ template -class eoEsStdev : public eoEsBase +class eoEsStdev : public eoFixedLength { public : - eoEsStdev(void) : eoEsBase() {} + eoEsStdev(void) : eoFixedLength() {} std::string className(void) const { return "eoEsStdev"; } From df56ae514560e1fbb9bec997e48d9481d7aa4467 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 09:48:24 +0000 Subject: [PATCH 0204/2134] Fixed typedef Type error --- eo/src/eoFixedLength.h | 4 ++- eo/src/eoVariableLength.h | 61 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 eo/src/eoVariableLength.h diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index d2affe708..853059ca5 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -27,6 +27,8 @@ #ifndef _eoFixedLength_h #define _eoFixedLength_h +#include + /** \ingroup EvolutionStrategies @@ -39,7 +41,7 @@ class eoFixedLength : public EO, public std::vector { public : - typedef double Type; + typedef typename GeneType Type; /// to avoid conflicts between EO::operator< and vector::operator< bool operator<(const eoFixedLength& _eo) const diff --git a/eo/src/eoVariableLength.h b/eo/src/eoVariableLength.h new file mode 100644 index 000000000..43b25f40f --- /dev/null +++ b/eo/src/eoVariableLength.h @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsBase.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoVariableLength_h +#define _eoVariableLength_h + +#include + +/** +\ingroup EvolutionStrategies + + Base class for variable length chromosomes, just derives from EO and list and + redirects the smaller than operator to EO (fitness based comparison) +*/ + +template +class eoVariableLength : public EO, public std::list +{ + public : + + typedef typename GeneType Type; + + /// to avoid conflicts between EO::operator< and vector::operator< + bool operator<(const eoVariableLength& _eo) const + { + return EO::operator<(_eo); + } + +}; + +/// to avoid conflicts between EO::operator< and vector::operator< +template +bool operator<(const eoVariableLength& _eo1, const eoVariableLength& _eo2) +{ + return _eo1.operator<(_eo2); +} + +#endif From 0219de5b614abc449f6c6c3e1438291697bf4eda Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 10:25:53 +0000 Subject: [PATCH 0205/2134] updated documentation --- eo/src/eoFixedLength.h | 1 - eo/src/eoObject.h | 11 ++++++++++- eo/src/eoVariableLength.h | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index 853059ca5..1a00d3760 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -30,7 +30,6 @@ #include /** -\ingroup EvolutionStrategies Base class for fixed length chromosomes, just derives from EO and vector and redirects the smaller than operator to EO (fitness based comparison) diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 32790c8c9..b3630de76 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -43,6 +43,14 @@ This is the base class for the whole hierarchy; an eoObject defines basically an interface for the whole hierarchy: each object should know its name (#className#). Previously, this object defined a print and read interface, but it´s been moved to eoPrintable and eoPersistent. + +It is recommended that you only derive from eoObject in concrete classes. +Some parts of EO do not implement this yet, but that will change in the future. +eoObject, together with eoPersistent and eoPrintable provide a simple persistence +framework that is only needed when the classes have state that changes at runtime. + + @see eoPersistent eoPrintable + */ class eoObject { @@ -56,7 +64,8 @@ class eoObject Maarten: removed the default implementation as this proved to be too error-prone: I found several classes that had a typo in className (like classname), which would print eoObject instead of - their own... + their own. Having it pure will force the implementor to provide a + name. */ virtual string className() const = 0; diff --git a/eo/src/eoVariableLength.h b/eo/src/eoVariableLength.h index 43b25f40f..33f05e51f 100644 --- a/eo/src/eoVariableLength.h +++ b/eo/src/eoVariableLength.h @@ -30,8 +30,6 @@ #include /** -\ingroup EvolutionStrategies - Base class for variable length chromosomes, just derives from EO and list and redirects the smaller than operator to EO (fitness based comparison) */ From b5222c8aa5ea233b55b63643ee9ce84b1e583745 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 10:27:10 +0000 Subject: [PATCH 0206/2134] Changed base class eoEsBase to eoFixedLength --- eo/test/real_value.h | 4 ++-- eo/test/t-eoESFull.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/test/real_value.h b/eo/test/real_value.h index ed983bc2a..c6b30b6c1 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -1,4 +1,4 @@ -#include +#include //----------------------------------------------------------------------------- @@ -7,7 +7,7 @@ @param _ind A floatingpoint vector */ -double real_value(const eoEsBase& _ind) +double real_value(const eoFixedLength& _ind) { double sum = 0; /* compute in double format, even if return a float */ for (unsigned i = 0; i < _ind.size(); i++) diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 75be5006b..868102133 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -94,7 +94,7 @@ template void runAlgorithm(EOT, eoParser& _parser, eoEsObjectiveBounds& _bounds) { // evaluation - eoEvalFuncPtr > eval( real_value ); + eoEvalFuncPtr > eval( real_value ); // population parameters, unfortunately these can not be altered in the state file eoValueParam mu = _parser.createParam(unsigned(50), "mu","Size of the population"); From 00780d785a3013774d9c8d97d5c9a92d871db52e Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 14:30:47 +0000 Subject: [PATCH 0207/2134] Added an ownership function to eoState --- eo/test/t-eoESFull.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 868102133..08e17b7cd 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -34,7 +34,7 @@ using namespace std; typedef double FitT; template -void runAlgorithm(EOT, eoParser& _parser, eoEsObjectiveBounds& _bounds); +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds); main(int argc, char *argv[]) { @@ -68,15 +68,15 @@ main(int argc, char *argv[]) // Run the appropriate algorithm if (stdevs.value() == false && corr.value() == false) { - runAlgorithm(eoEsSimple() ,parser, bounds); + runAlgorithm(eoEsSimple() ,parser, state, bounds); } else if (corr.value() == true) { - runAlgorithm(eoEsFull(),parser, bounds); + runAlgorithm(eoEsFull(),parser, state, bounds); } else { - runAlgorithm(eoEsStdev(), parser, bounds); + runAlgorithm(eoEsStdev(), parser, state, bounds); } // and save @@ -91,7 +91,7 @@ main(int argc, char *argv[]) } template -void runAlgorithm(EOT, eoParser& _parser, eoEsObjectiveBounds& _bounds) +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds) { // evaluation eoEvalFuncPtr > eval( real_value ); @@ -107,7 +107,9 @@ void runAlgorithm(EOT, eoParser& _parser, eoEsObjectiveBounds& _bounds) // Initialization eoEsChromInit init(_bounds); - eoPop pop(mu.value(), init); + eoPop& pop = _state.takeOwnership(eoPop(mu.value(), init)); + + _state.registerObject(pop); // evaluate initial population eval.range(pop.begin(), pop.end()); From 49ee190e108a1258d39eceff741696b357e17b95 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 14:31:22 +0000 Subject: [PATCH 0208/2134] Some 'improvements' added --- eo/src/eoFixedLength.h | 27 ++++++++++++++++++++++++++- eo/src/es/eoEsFull.h | 21 +++++++-------------- eo/src/es/eoEsSimple.h | 17 +++++------------ eo/src/es/eoEsStdev.h | 21 +++++++-------------- 4 files changed, 45 insertions(+), 41 deletions(-) diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index 1a00d3760..0754a6c30 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -40,7 +40,7 @@ class eoFixedLength : public EO, public std::vector { public : - typedef typename GeneType Type; + typedef GeneType Type; /// to avoid conflicts between EO::operator< and vector::operator< bool operator<(const eoFixedLength& _eo) const @@ -48,6 +48,31 @@ class eoFixedLength : public EO, public std::vector return EO::operator<(_eo); } + /// printing... + void printOn(ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' '; + + std::copy(begin(), end(), ostream_iterator(os)); + } + + /// reading... + void readFrom(istream& is) + { + EO::readFrom(is); + + unsigned sz; + is >> sz; + + resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + is >> operator[](i); + } }; /// to avoid conflicts between EO::operator< and vector::operator< diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 67ba32904..9328f19b5 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -40,6 +40,7 @@ template class eoEsFull : public eoFixedLength { public : + typedef double Type; eoEsFull(void) : eoFixedLength() {} @@ -47,10 +48,8 @@ class eoEsFull : public eoFixedLength void printOn(std::ostream& os) const { - os << size() << ' '; + eoFixedLength::printOn(os); - std::copy(begin(), end(), std::ostream_iterator(os)); - os << ' '; std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os)); @@ -63,21 +62,15 @@ class eoEsFull : public eoFixedLength void readFrom(istream& is) { - unsigned sz; - is >> sz; + eoFixedLength::readFrom(is); + + stdevs.resize(size()); - resize(sz); unsigned i; - - for (i = 0; i < sz; ++i) - is >> operator[](i); - - stdevs.resize(sz); - - for (i = 0; i < sz; ++i) + for (i = 0; i < size(); ++i) is >> stdevs[i]; - correlations.resize(sz*(sz - 1) / 2); + correlations.resize(size()*(size() - 1) / 2); for (i = 0; i < correlations.size(); ++i) is >> correlations[i]; diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h index 8516dcf0a..2f337fb00 100644 --- a/eo/src/es/eoEsSimple.h +++ b/eo/src/es/eoEsSimple.h @@ -48,29 +48,22 @@ class eoEsSimple : public eoFixedLength { public : + typedef double Type; + eoEsSimple(void) : eoFixedLength() {} std::string className(void) const { return "eoEsSimple"; } - void printOn(ostream& os) const + void printOn(std::ostream& os) const { - os << size() << ' '; + eoFixedLength::printOn(os); - std::copy(begin(), end(), ostream_iterator(os)); - os << ' ' << stdev << ' '; } void readFrom(istream& is) { - unsigned sz; - is >> sz; - - resize(sz); - unsigned i; - - for (i = 0; i < sz; ++i) - is >> operator[](i); + eoFixedLength::readFrom(is); is >> stdev; } diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index 9c998ffd0..4d38c5022 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -40,16 +40,16 @@ template class eoEsStdev : public eoFixedLength { public : - + + typedef double Type; + eoEsStdev(void) : eoFixedLength() {} std::string className(void) const { return "eoEsStdev"; } void printOn(std::ostream& os) const { - os << size() << ' '; - - std::copy(begin(), end(), std::ostream_iterator(os)); + eoFixedLength::printOn(os); os << ' '; std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os)); @@ -59,18 +59,11 @@ class eoEsStdev : public eoFixedLength void readFrom(istream& is) { - unsigned sz; - is >> sz; + eoFixedLength::readFrom(is); + stdevs.resize(size()); - resize(sz); unsigned i; - - for (i = 0; i < sz; ++i) - is >> operator[](i); - - stdevs.resize(sz); - - for (i = 0; i < sz; ++i) + for (i = 0; i < size(); ++i) is >> stdevs[i]; } From 570397e89e48aee3d95e3027908a40279052b302 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 13 Jun 2000 14:31:53 +0000 Subject: [PATCH 0209/2134] Added ownership functionality and made the thing non-copyable --- eo/src/utils/eoState.cpp | 10 ++++++++++ eo/src/utils/eoState.h | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index d69c23d34..baf57c7d8 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -13,6 +13,8 @@ using namespace std; + + void removeComment(string& str, string comment) { string::size_type pos = str.find(comment); @@ -41,6 +43,14 @@ bool is_section(const string& str, string& name) return true; } + +eoState::~eoState(void) +{ + for (unsigned i = 0; i < ownedObjects.size(); ++i) + { + delete ownedObjects[i]; + } +} void eoState::registerObject(eoPersistent& registrant) { diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index 05316784c..b37a590e6 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -44,10 +44,27 @@ class eoState { public : + eoState(void) {} + + ~eoState(void); + /** * Object registration function, note that it does not take ownership! */ void registerObject(eoPersistent& registrant); + + /** + * Copies the object (MUST be derived from eoPersistent) + * and returns a reference to the owned object. + * Note: it does not register the object, this must be done afterwards! + */ + template + T& takeOwnership(const T& persistent) + { + // If the compiler budges here, T is not a subclass of eoPersistent + ownedObjects.push_back(new T(persistent)); + return static_cast(*ownedObjects.back()); + } /** * Loading error thrown when nothing seems to work. @@ -96,6 +113,13 @@ private : ObjectMap objectMap; std::vector creationOrder; + + std::vector ownedObjects; + + // private copy and assignment as eoState is supposed to be unique + eoState(const eoState&); + eoState& operator=(const eoState&); + }; #endif //eoState_h From 0533618306fefd376745ee13de97891c168d4578 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 14 Jun 2000 07:27:51 +0000 Subject: [PATCH 0210/2134] Removed double reference to t-eoESFull --- eo/test/Makefile.am | 7 ------- 1 file changed, 7 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 9d12043f1..4bb21359d 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -178,11 +178,4 @@ t_eoExternalEO_LDADD = $(LDADDS) ############################################################################### -t_eoESFull_SOURCES = t-eoESFull.cpp -t_eoESFull_DEPENDENCIES = $(DEPS) -t_eoESFull_LDFLAGS = -lm -t_eoESFull_LDADD = $(LDADDS) - -############################################################################### - From ff057c799abcfd2d55643f41f0b81f9884c1f52b Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 14 Jun 2000 07:30:21 +0000 Subject: [PATCH 0211/2134] Removed double reference to t-eoESFull --- eo/test/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 4bb21359d..4ba436920 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -57,10 +57,10 @@ t_eoAtomOps_LDADD = $(LDADDS) ############################################################################### -#t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -#t_eoESFull_DEPENDENCIES = $(DEPS) -#t_eoESFull_LDFLAGS = -lm -#t_eoESFull_LDADD = $(LDADDS) +t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +t_eoESFull_DEPENDENCIES = $(DEPS) +t_eoESFull_LDFLAGS = -lm +t_eoESFull_LDADD = $(LDADDS) ############################################################################### From 318697af40f4a49021b5400b625a54ef77c75990 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 14 Jun 2000 10:33:53 +0000 Subject: [PATCH 0212/2134] Yet again some documentation change --- eo/src/eo1d.h | 17 ++++++++++++++++- eo/src/eoFixedLength.h | 2 +- eo/src/eoVariableLength.h | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/eo/src/eo1d.h b/eo/src/eo1d.h index f2bfea202..7642692ff 100644 --- a/eo/src/eo1d.h +++ b/eo/src/eo1d.h @@ -45,9 +45,24 @@ using namespace std; */ //@{ -/** eo1d: Base class for "chromosomes" with a single dimension +/** +@deprecated {eo1d} eo1d +\deprecated +*/ + +/** + + eo1d: Base class for "chromosomes" with a single dimension #T# is the type it will be instantiated with; this type must have, at least, a copy ctor, assignment operators, + + \deprecated + As eo1d provides a so-called 'fat' interface, it might be wiser to + use eoFixedLength or eoVariableLength instead, that derive from + vector and list respectively and (important) redirect the less than + comparison operator to EO rather than the STL variants. + + @see eoFixedLength eoVariableLength */ template class eo1d: public EO< fitnessT > { diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index 0754a6c30..da570e7d3 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoEsBase.h +// eoFixedLength.h // (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or diff --git a/eo/src/eoVariableLength.h b/eo/src/eoVariableLength.h index 33f05e51f..9bf952a09 100644 --- a/eo/src/eoVariableLength.h +++ b/eo/src/eoVariableLength.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoEsBase.h +// eoVariableLength.h // (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or From 3bc1cb49d83516c4d351d520f5268b1bf827c25b Mon Sep 17 00:00:00 2001 From: gustavo Date: Wed, 14 Jun 2000 16:29:00 +0000 Subject: [PATCH 0213/2134] erasing warnings --- eo/configure.in | 4 ++-- eo/src/eoUniform.h | 2 +- eo/test/t-eoEasyEA.cpp | 1 - eo/test/t-eoGOpSel.cpp | 1 - eo/test/t-eobreeder.cpp | 1 - eo/test/t-eogeneration.cpp | 1 - eo/test/t-eoinclusion.cpp | 1 - eo/test/t-eoinsertion.cpp | 1 - eo/test/t-eolottery.cpp | 1 - eo/test/t-selectOne.cpp | 1 - 10 files changed, 3 insertions(+), 11 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 5cef794f1..1b2b8f5dc 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,7 +1,7 @@ AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo) +AM_INIT_AUTOMAKE(eo, 0.0.0) AC_PROG_CXX @@ -12,4 +12,4 @@ AM_PROG_LIBTOOL AM_MAINTAINER_MODE dnl add Makefiles that must be modified by the configuration here -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 doc/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 doc/Makefile apps/nn/Makefile) diff --git a/eo/src/eoUniform.h b/eo/src/eoUniform.h index c7c0aece4..f807b6d52 100644 --- a/eo/src/eoUniform.h +++ b/eo/src/eoUniform.h @@ -53,7 +53,7 @@ class eoUniform: public eoRnd * @param _rnd the other rnd */ eoUniform( const eoUniform& _rnd) - : eoRnd( _rnd), min(_rnd.minim), diff(_rnd.diff) {} + : eoRnd( _rnd), min(_rnd.min), diff(_rnd.diff) {} /** Returns an uniform random number over the interval [min, max) Uses global rng object */ diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index 7b0856b98..17ee52e16 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -22,7 +22,6 @@ main() const unsigned POP_SIZE = 8, CHROM_SIZE = 16; unsigned i; - eoUniform uniform(false, true); eoBinRandom random; eoPop pop; diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index bd4c82f1d..7b6043f07 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -64,7 +64,6 @@ main() const unsigned POP_SIZE = 8, CHROM_SIZE = 4; unsigned i; - eoUniform uniform(false, true); eoBinRandom random; eoPop pop; diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index 58a2b1b43..dc2bd3269 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -48,7 +48,6 @@ main() const unsigned POP_SIZE = 8, CHROM_SIZE = 4; unsigned i; - eoUniform uniform(false, true); eoBinRandom random; eoPop pop; diff --git a/eo/test/t-eogeneration.cpp b/eo/test/t-eogeneration.cpp index ab5843720..90c39dd10 100644 --- a/eo/test/t-eogeneration.cpp +++ b/eo/test/t-eogeneration.cpp @@ -47,7 +47,6 @@ main() const unsigned POP_SIZE = 8, CHROM_SIZE = 16; unsigned i; - eoUniform uniform(false, true); eoBinRandom random; eoPop pop; // Evaluation diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp index aa4eab0b5..17d4cbdbe 100644 --- a/eo/test/t-eoinclusion.cpp +++ b/eo/test/t-eoinclusion.cpp @@ -18,7 +18,6 @@ main() { const unsigned CHROM_SIZE = 4; - eoUniform uniform(false, true); eoBinRandom random; for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) diff --git a/eo/test/t-eoinsertion.cpp b/eo/test/t-eoinsertion.cpp index cb590c262..dbd53e323 100644 --- a/eo/test/t-eoinsertion.cpp +++ b/eo/test/t-eoinsertion.cpp @@ -26,7 +26,6 @@ main() const unsigned CHROM_SIZE = 4; unsigned i; - eoUniform uniform(false, true); eoBinRandom random; for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) diff --git a/eo/test/t-eolottery.cpp b/eo/test/t-eolottery.cpp index f4dfdb3b9..6fd97d2f8 100644 --- a/eo/test/t-eolottery.cpp +++ b/eo/test/t-eolottery.cpp @@ -23,7 +23,6 @@ main() { const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - eoUniform uniform(false, true); eoPop pop, pop2; eoBinRandom random; unsigned i; diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp index 1125201c6..ff601796d 100644 --- a/eo/test/t-selectOne.cpp +++ b/eo/test/t-selectOne.cpp @@ -51,7 +51,6 @@ main() const unsigned POP_SIZE = 8, CHROM_SIZE = 4; unsigned i; - eoUniform uniform(false, true); eoBinRandom random; eoPop pop; From 34758a584dfa8d8383ef23a95a7ef231bff5199d Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 15 Jun 2000 14:29:25 +0000 Subject: [PATCH 0214/2134] *** empty log message *** --- eo/test/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index 6068d364b..bd410c0a0 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -23,3 +23,4 @@ t-selectOne t-eoStateAndParser t-eoGOpSel t-eoExternalEO +t-eoESFull From cc7148d622d71278dda3b4240bb284990ab5fadc Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 16 Jun 2000 09:38:43 +0000 Subject: [PATCH 0215/2134] erasing LICENSE from test directory --- eo/test/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 4ba436920..022798ca0 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -5,7 +5,6 @@ ############################################################################### DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a -EXTRA_DIST = LICENSE ############################################################################### From ff52d48ccd9cc4ff8d9bffabf7bc11612a32bd67 Mon Sep 17 00:00:00 2001 From: gustavo Date: Fri, 16 Jun 2000 10:20:23 +0000 Subject: [PATCH 0216/2134] changing version number --- eo/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/configure.in b/eo/configure.in index 1b2b8f5dc..4b2ca94b5 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,7 +1,7 @@ AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.0.0) +AM_INIT_AUTOMAKE(eo, 0.9.0) AC_PROG_CXX From b03bd951e0c65d3b2434edc205a658f24ea58747 Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 22 Jun 2000 03:23:15 +0000 Subject: [PATCH 0217/2134] The initial individuals were evaluated directly using binary_value This resulted in the fitness NOT being set, and some abort or segmentation fault later Only eoEvalFunc shouydl be used to evaluate individuals!!! --- eo/test/t-eoEasyEA.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index 17ee52e16..160d03040 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -22,14 +22,19 @@ main() const unsigned POP_SIZE = 8, CHROM_SIZE = 16; unsigned i; +// a chromosome randomizer eoBinRandom random; +// the populations: eoPop pop; - + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); random(chrom); - binary_value(chrom); + eval(chrom); pop.push_back(chrom); } @@ -52,9 +57,6 @@ main() // replacement eoInclusion inclusion; - // Evaluation - eoEvalFuncPtr eval( binary_value ); - // Terminators eoFitTerm term( pow(2.0, CHROM_SIZE), 1 ); From 01e44cf82876872de37e56750fab1580230fa1bd Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 18 Jul 2000 11:30:39 +0000 Subject: [PATCH 0218/2134] fix examples using binary_value --- eo/test/binary_value.h | 41 ++++--- eo/test/t-eo.cpp | 2 +- eo/test/t-eobreeder.cpp | 6 +- eo/test/t-eogeneration.cpp | 1 + eo/test/t-eoinclusion.cpp | 5 +- eo/test/t-eoinsertion.cpp | 215 +++++++++++++++++++------------------ eo/test/t-selectOne.cpp | 2 +- 7 files changed, 143 insertions(+), 129 deletions(-) diff --git a/eo/test/binary_value.h b/eo/test/binary_value.h index a450a1176..e3a0c756e 100644 --- a/eo/test/binary_value.h +++ b/eo/test/binary_value.h @@ -1,18 +1,27 @@ -#include - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -/** Just a simple function that takes binary value of a chromosome and sets - the fitnes. - @param _chrom A binary chromosome -*/ -float binary_value(const Chrom& _chrom) -{ - float sum = 0; - for (unsigned i = 0; i < _chrom.size(); i++) - if (_chrom[i]) +#include + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ + +float binary_value(const Chrom& _chrom) +{ + float sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + if (_chrom[i]) sum += pow(2, _chrom.size() - i - 1); return sum; -} +} + +struct BinaryValue +{ + template void operator()(Chrom& _chrom) + { + _chrom.fitness(binary_value(_chrom)); + } +}; diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp index 382362532..f5cd88fa9 100644 --- a/eo/test/t-eo.cpp +++ b/eo/test/t-eo.cpp @@ -17,7 +17,7 @@ int main() cout << "chrom1 = " << chrom1 << endl << "chrom2 = " << chrom2 << endl; - return 1; + return 0; } //----------------------------------------------------------------------------- diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index dc2bd3269..9672acc9d 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -50,12 +50,14 @@ main() eoBinRandom random; eoPop pop; + + BinaryValue eval; for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); random(chrom); - binary_value(chrom); + eval(chrom); pop.push_back(chrom); } @@ -73,7 +75,7 @@ main() breeder(pop); // reevaluation of fitness - for_each(pop.begin(), pop.end(), binary_value); + for_each(pop.begin(), pop.end(), eval); cout << "new population:" << endl; for (i = 0; i < pop.size(); ++i) diff --git a/eo/test/t-eogeneration.cpp b/eo/test/t-eogeneration.cpp index 90c39dd10..71f7377c4 100644 --- a/eo/test/t-eogeneration.cpp +++ b/eo/test/t-eogeneration.cpp @@ -49,6 +49,7 @@ main() eoBinRandom random; eoPop pop; + // Evaluation eoEvalFuncPtr eval( binary_value ); diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp index 17d4cbdbe..c2e7d5186 100644 --- a/eo/test/t-eoinclusion.cpp +++ b/eo/test/t-eoinclusion.cpp @@ -19,6 +19,7 @@ main() const unsigned CHROM_SIZE = 4; eoBinRandom random; + BinaryValue eval; for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) { @@ -28,7 +29,7 @@ main() { Chrom chrom(CHROM_SIZE); random(chrom); - binary_value(chrom); + eval(chrom); pop.push_back(chrom); } @@ -40,7 +41,7 @@ main() { Chrom chrom(CHROM_SIZE); random(chrom); - binary_value(chrom); + eval(chrom); pop2.push_back(chrom); } diff --git a/eo/test/t-eoinsertion.cpp b/eo/test/t-eoinsertion.cpp index dbd53e323..993c228ff 100644 --- a/eo/test/t-eoinsertion.cpp +++ b/eo/test/t-eoinsertion.cpp @@ -1,107 +1,108 @@ -//----------------------------------------------------------------------------- -// t-eoinsertion.cpp -//----------------------------------------------------------------------------- - -#include // eoBin, eoPop, eoInsertion - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned CHROM_SIZE = 4; - unsigned i; - - eoBinRandom random; - - for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) - { - eoPop pop; - - for (i = 0; i < POP_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) - { - eoPop pop2, pop3, pop4, pop5, popx; - - for (i = 0; i < POP2_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop2.push_back(chrom); - } - - cout << "--------------------------------------------------" << endl - << "breeders \tpop" << endl - << "--------------------------------------------------" << endl; - for (i = 0; i < max(pop.size(), pop2.size()); i++) - { - if (pop.size() > i) - cout << pop[i] << " " << pop[i].fitness() << " \t"; - else - cout << "\t\t"; - if (pop2.size() > i) - cout << pop2[i] << " " << pop2[i].fitness(); - cout << endl; - } - - eoInsertion insertion(0.75); - popx = pop; - pop3 = pop2; - insertion(popx, pop3); - - eoInsertion insertion2; - popx = pop; - pop4 = pop2; - insertion2(popx, pop4); - - eoInsertion insertion3(1.5); - popx = pop; - pop5 = pop2; - insertion3(popx, pop5); - - cout << endl - << "0.75 \t\t1.0 \t\t1.5" << endl - << "---- \t\t--- \t\t---" << endl; - for (i = 0; i < pop5.size(); i++) - { - if (pop3.size() > i) - cout << pop3[i] << " " << pop3[i].fitness() << " \t"; - else - cout << " \t\t"; - if (pop4.size() > i) - cout << pop4[i] << " " << pop4[i].fitness() << " \t"; - else - cout << " \t\t"; - if (pop5.size() > i) - cout << pop5[i] << " " << pop5[i].fitness(); - cout << endl; - } - } - } - - return 0; -} - -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// t-eoinsertion.cpp +//----------------------------------------------------------------------------- + +#include // eoBin, eoPop, eoInsertion + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +//----------------------------------------------------------------------------- + +void binary_value(Chrom& chrom) +{ + float sum = 0; + for (unsigned i = 0; i < chrom.size(); i++) + if (chrom[i]) + sum += pow(2, chrom.size() - i - 1); + chrom.fitness(sum); +} + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned CHROM_SIZE = 4; + unsigned i; + + eoBinRandom random; + + for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) + { + eoPop pop; + + for (i = 0; i < POP_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop.push_back(chrom); + } + + for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) + { + eoPop pop2, pop3, pop4, pop5, popx; + + for (i = 0; i < POP2_SIZE; i++) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + binary_value(chrom); + pop2.push_back(chrom); + } + + cout << "--------------------------------------------------" << endl + << "breeders \tpop" << endl + << "--------------------------------------------------" << endl; + for (i = 0; i < max(pop.size(), pop2.size()); i++) + { + if (pop.size() > i) + cout << pop[i] << " " << pop[i].fitness() << " \t"; + else + cout << "\t\t"; + if (pop2.size() > i) + cout << pop2[i] << " " << pop2[i].fitness(); + cout << endl; + } + + eoInsertion insertion(0.75); + popx = pop; + pop3 = pop2; + insertion(popx, pop3); + + eoInsertion insertion2; + popx = pop; + pop4 = pop2; + insertion2(popx, pop4); + + eoInsertion insertion3(1.5); + popx = pop; + pop5 = pop2; + insertion3(popx, pop5); + + cout << endl + << "0.75 \t\t1.0 \t\t1.5" << endl + << "---- \t\t--- \t\t---" << endl; + for (i = 0; i < pop5.size(); i++) + { + if (pop3.size() > i) + cout << pop3[i] << " " << pop3[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop4.size() > i) + cout << pop4[i] << " " << pop4[i].fitness() << " \t"; + else + cout << " \t\t"; + if (pop5.size() > i) + cout << pop5[i] << " " << pop5[i].fitness(); + cout << endl; + } + } + } + + return 0; +} + +//----------------------------------------------------------------------------- + diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp index ff601796d..56da601c4 100644 --- a/eo/test/t-selectOne.cpp +++ b/eo/test/t-selectOne.cpp @@ -58,7 +58,7 @@ main() for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); random(chrom); - binary_value(chrom); + BinaryValue()(chrom); pop.push_back(chrom); } From aa0b74ac9da2c210b613287f593f0a5a4121cb5c Mon Sep 17 00:00:00 2001 From: gustavo Date: Tue, 18 Jul 2000 11:33:56 +0000 Subject: [PATCH 0219/2134] ignore files created by examples --- eo/test/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index bd410c0a0..067966e35 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -1,4 +1,6 @@ *.o +*.csv +*.sav .deps Makefile Makefile.in From ee5bdda9321fd89a781edc82db6e6f3c3d47e761 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 28 Jul 2000 06:10:34 +0000 Subject: [PATCH 0220/2134] testing if this configure is protable --- eo/configure | 1681 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1681 insertions(+) create mode 100755 eo/configure diff --git a/eo/configure b/eo/configure new file mode 100755 index 000000000..b9996522d --- /dev/null +++ b/eo/configure @@ -0,0 +1,1681 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.12 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-shared build shared libraries [default=yes] + --enable-shared=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" +ac_help="$ac_help + --enable-static build static libraries [default=yes] + --enable-static=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" +ac_help="$ac_help + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" +ac_help="$ac_help + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.12" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=src/eo + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:566: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:619: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:676: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=eo + +VERSION=0.9.0 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <> confdefs.h <&6 +echo "configure:722: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:735: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:748: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:761: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:774: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:793: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:824: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:864: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:869: checking whether we are using GNU C++" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes +else + ac_cv_prog_gxx=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + +if test $ac_cv_prog_gxx = yes; then + GXX=yes + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:893: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes +else + ac_cv_prog_cxx_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + elif test $ac_cv_prog_cxx_g = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-O2" + fi +else + GXX= + test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" +fi + + +CXXFLAGS="-Wall -g" + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_shared=yes +fi + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_static=yes +fi + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:976: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:999: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1028: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1057: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1139: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1144: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1168: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + + +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +echo "configure:1208: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /* | A-Za-z:\\*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:1226: checking for GNU ld" >&5 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1229: checking for non-GNU ld" >&5 +fi +if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$ac_cv_path_LD" +if test -n "$LD"; then + echo "$ac_t""$LD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1265: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:1281: checking for BSD-compatible nm" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$NM" in +/* | A-Za-z:\\*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; +*) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + else + ac_cv_path_NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm + ;; +esac +fi + +NM="$ac_cv_path_NM" +echo "$ac_t""$NM" 1>&6 + + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1318: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Check for any special flags to pass to ltconfig. +libtool_flags= +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$silent" = yes && libtool_flags="$libtool_flags --silent" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$host" in +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 1354 "configure"' > conftest.$ac_ext + if { (eval echo configure:1355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + CFLAGS="$CFLAGS -belf" + ;; +esac + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + + +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:1386: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 + if test $USE_MAINTAINER_MODE = yes; then + MAINT= + else + MAINT='#M#' + fi + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.12" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "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 doc/Makefile apps/nn/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CXX@%$CXX%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@RANLIB@%$RANLIB%g +s%@CC@%$CC%g +s%@LD@%$LD%g +s%@NM@%$NM%g +s%@LN_S@%$LN_S%g +s%@LIBTOOL@%$LIBTOOL%g +s%@MAINT@%$MAINT%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + From 70ddb00b4cf2153e3aece52b1f28ed524dfe885f Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 28 Jul 2000 10:26:44 +0000 Subject: [PATCH 0221/2134] removed --- eo/configure | 1681 -------------------------------------------------- 1 file changed, 1681 deletions(-) delete mode 100755 eo/configure diff --git a/eo/configure b/eo/configure deleted file mode 100755 index b9996522d..000000000 --- a/eo/configure +++ /dev/null @@ -1,1681 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --enable-shared build shared libraries [default=yes] - --enable-shared=PKGS only build shared libraries if the current package - appears as an element in the PKGS list" -ac_help="$ac_help - --enable-static build static libraries [default=yes] - --enable-static=PKGS only build shared libraries if the current package - appears as an element in the PKGS list" -ac_help="$ac_help - --with-gnu-ld assume the C compiler uses GNU ld [default=no]" -ac_help="$ac_help - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=src/eo - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:566: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:619: checking whether build environment is sane" >&5 -# Just in case -sleep 1 -echo timestamp > conftestfile -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "$*" != "X $srcdir/configure conftestfile" \ - && test "$*" != "X conftestfile $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { echo "configure: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" 1>&2; exit 1; } - fi - - test "$2" = conftestfile - ) -then - # Ok. - : -else - { echo "configure: error: newly created file is older than distributed files! -Check your system clock" 1>&2; exit 1; } -fi -rm -f conftest* -echo "$ac_t""yes" 1>&6 -if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:676: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -PACKAGE=eo - -VERSION=0.9.0 - -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } -fi -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:722: checking for working aclocal" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (aclocal --version) < /dev/null > /dev/null 2>&1; then - ACLOCAL=aclocal - echo "$ac_t""found" 1>&6 -else - ACLOCAL="$missing_dir/missing aclocal" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:735: checking for working autoconf" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (autoconf --version) < /dev/null > /dev/null 2>&1; then - AUTOCONF=autoconf - echo "$ac_t""found" 1>&6 -else - AUTOCONF="$missing_dir/missing autoconf" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:748: checking for working automake" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (automake --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake - echo "$ac_t""found" 1>&6 -else - AUTOMAKE="$missing_dir/missing automake" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:761: checking for working autoheader" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (autoheader --version) < /dev/null > /dev/null 2>&1; then - AUTOHEADER=autoheader - echo "$ac_t""found" 1>&6 -else - AUTOHEADER="$missing_dir/missing autoheader" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:774: checking for working makeinfo" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (makeinfo --version) < /dev/null > /dev/null 2>&1; then - MAKEINFO=makeinfo - echo "$ac_t""found" 1>&6 -else - MAKEINFO="$missing_dir/missing makeinfo" - echo "$ac_t""missing" 1>&6 -fi - - - -for ac_prog in $CCC c++ g++ gcc CC cxx cc++ -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:793: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CXX" && break -done -test -n "$CXX" || CXX="gcc" - - -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:824: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 -if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:864: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:869: checking whether we are using GNU C++" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gxx" 1>&6 - -if test $ac_cv_prog_gxx = yes; then - GXX=yes - ac_test_CXXFLAGS="${CXXFLAGS+set}" - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS= - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:893: checking whether ${CXX-g++} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_cxx_g=yes -else - ac_cv_prog_cxx_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 - if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" - elif test $ac_cv_prog_cxx_g = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-O2" - fi -else - GXX= - test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" -fi - - -CXXFLAGS="-Wall -g" - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_shared=yes -fi - -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_static=yes -fi - - -# Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:976: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`$ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:999: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1028: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1057: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1139: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1144: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1168: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - - -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1208: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - /* | A-Za-z:\\*) - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1226: checking for GNU ld" >&5 -else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1229: checking for non-GNU ld" >&5 -fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$ac_cv_path_LD" -if test -n "$LD"; then - echo "$ac_t""$LD" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1265: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 - - -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1281: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$NM" in -/* | A-Za-z:\\*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. - ;; -*) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - else - ac_cv_path_NM="$ac_dir/nm" - fi - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm - ;; -esac -fi - -NM="$ac_cv_path_NM" -echo "$ac_t""$NM" 1>&6 - - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1318: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Check for any special flags to pass to ltconfig. -libtool_flags= -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$silent" = yes && libtool_flags="$libtool_flags --silent" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$host" in -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 1354 "configure"' > conftest.$ac_ext - if { (eval echo configure:1355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - CFLAGS="$CFLAGS -belf" - ;; -esac - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ -|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } - - -echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1386: checking whether to enable maintainer-specific portions of Makefiles" >&5 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 - if test $USE_MAINTAINER_MODE = yes; then - MAINT= - else - MAINT='#M#' - fi - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "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 doc/Makefile apps/nn/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@PACKAGE@%$PACKAGE%g -s%@VERSION@%$VERSION%g -s%@ACLOCAL@%$ACLOCAL%g -s%@AUTOCONF@%$AUTOCONF%g -s%@AUTOMAKE@%$AUTOMAKE%g -s%@AUTOHEADER@%$AUTOHEADER%g -s%@MAKEINFO@%$MAKEINFO%g -s%@SET_MAKE@%$SET_MAKE%g -s%@CXX@%$CXX%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@RANLIB@%$RANLIB%g -s%@CC@%$CC%g -s%@LD@%$LD%g -s%@NM@%$NM%g -s%@LN_S@%$LN_S%g -s%@LIBTOOL@%$LIBTOOL%g -s%@MAINT@%$MAINT%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - From cb952a2b7db52891e12d5a482f26e3e0d3ba7ed0 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 3 Aug 2000 15:44:01 +0000 Subject: [PATCH 0222/2134] Added missing files, and LICENSE --- eo/README.html | 115 +++++++++++++ eo/TODO.html | 28 ++++ eo/foot.html | 24 +++ eo/src/eoScalarFitness.h | 1 - eo/test/LICENSE | 340 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 507 insertions(+), 1 deletion(-) create mode 100644 eo/README.html create mode 100644 eo/TODO.html create mode 100644 eo/foot.html create mode 100644 eo/test/LICENSE diff --git a/eo/README.html b/eo/README.html new file mode 100644 index 000000000..00e147c65 --- /dev/null +++ b/eo/README.html @@ -0,0 +1,115 @@ + + + + + + EO evolutionary computation framework + + + + + +
+

EO Evolutionary Computation Framework and Library

+ +EO (Evolvable|Evolutionary objects) is a C++ toolbox for evolutionary computation which defines interfaces for +many classes of algorithms used in evolutionary computation, and, at the +same time, provides some examples that use those interfaces. The client/user +can include those objects in his or her programs, or create their own. If new objects are created, the GeNeura team commit themselves to test them, and make them available +to the Evolutionary Computation community. In this way, no changes have +to be made to the library design or to a program that implements an EC algorithm: just new classes added. Our intention would be that, in the future, somebody implementing an EC algorithm would say "I am using EO, plus a class that hs been made publicly available", improving repeatability of EC results and easing its availability. +
EO uses STL, and ANSI C++. So far, it has been tested and works +with gcc 2.8.1 and egcs 1.0.2 in Linux, Irix, Win95/NT (with Cygwin) and +Solaris Machines, and with Visual C++ 5.0 in WinNT machines. Makefiles for Unix and project +files and makefiles for NT are provided. + + +

Installing EO and compiling examples in UNIX

+To start and use it, first you can untar or unzip it (depending on the distribution you got), by doing, +
bash$ zcat eo-0.6.tgz | tar xvf -
+or +
bash$ unzip eo-0.6.zip

+

+Once everything is decompressed to the eo-0.6 directory (or whatever), cd to it and type +
bash$ configure
+or +
bash$ configure --prefix=/my/fav/directory
+if you intend to use it from another directory. If you do so, you´ll have then to copy manually all the .h and .a files to it. Right now, EO is mostly templates-based, so it has mainly got header files, plus a small and independent utility library.

+

After that, type +
bash$ make +
This makes the object and library files needed, makes the examples +in the apps/examples directory, and builds the genetic mastermind + application in the apps/master directory. If anything goes wrong at this stage, e-mail us. It should work properly with the compilers mentioned so far. +

+

Then, to unzip the documentation +
bash$ make docunzip +
which unzips the HTML documentation into the doc directory.

+

If there is any problem, write to any of the addresses below, or +just do +
bash$ make bug-report +
and tell us your problem, indicating EO release, the C++ compiler you +are using, and the platform. +

+ +

Installing EO and compiling examples in Win95/NT

+ +Unzip the library to your favorite directory by double-clicking on the eo-0.6 icon, and then load apps/examples/examples.dsw or + apps/examples/master.dsw workspaces; then define the main + directory you installed it to as default include directory (in + tools->directories or somesuch) and press F7 for compiling. Alternatively, if you favor makefiles, change into the apps/examples directory and run
+C:\my\dir\eo-0.6\apps\examples> nmake /f examples.mak
+which will create debug executables for all the examples.

+ +

In the CygWin environment, everything should work in the same way as in UNIX, but for a couple of things. To run configure, type
+bash$ sh ./configure, or, much better, create a \bin directory and copy sh.exe to it; that way, shell scripts will work properly.

+ +

Availability

+The latest versions of EO are always available from http://geneura.ugr.es/~jmerelo/eo +and ftp://geneura.ugr.es/pub/eo. + + +

Working with EO

+For a quick dive into the eo library, check the SGA +
Then go ahead to the EasyGA, +which is a more flexible implementation of a Genetic Algorithm. +
Then, why not, see how EO implements Simulated Annealing in EOSimAnnAlg. If you have unzipped the documentation, there should be also local copies of these files. + + +

Tell us something!

+If you have any problem, have created a new class, or just want to +tell us something, write to eo@kal-el.ugr.es. +The eo mailing list is hosted by OneList, + + +[Click to subscribe to eodev@onelist.com]. + + +
+ +

Legal Stuff

+EO is free and free distribution; however, if you include parts of EO in +a commercial product, you have to request authorization from us. +
The usual things apply too. If it does not work, if your wife or dogs +abandons you, or your room humector stops working, it's not our fault. +
  + +
+
+ Search EO documentation + + + + +
+
+ + diff --git a/eo/TODO.html b/eo/TODO.html new file mode 100644 index 000000000..74f802dd0 --- /dev/null +++ b/eo/TODO.html @@ -0,0 +1,28 @@ + + + + TODO list for EO + + + +

TODO list for EO

+
    +
  • Provide a way to easily manipulate the algorithm in runtime, be it + from grafically or text; expand command-line capabities? +
  • Provide a graphical interface for Windows, in VC++ or BBuilder. +
  • Creare more examples of the objects of which there is only one instance: + algorithms, evaluators. Try to adapt most well-know algorithms to EO +
  • Integrate the gTK interface seamlessly in the library. +
  • Complete documentation. +
  • Try to implemente as algorithms the best known paradigms: Evolution Strategies, Evolutionary programming. +
+ + +
+
Juan Julian Merelo Guervos
+ + +Last modified: Wed May 13 11:12:34 CEST 1998 + + + diff --git a/eo/foot.html b/eo/foot.html new file mode 100644 index 000000000..f6efa307d --- /dev/null +++ b/eo/foot.html @@ -0,0 +1,24 @@ + + + + + BinOp + + + +
+ + +
The EO framework has been created by  +GeNeura team
+and can be downloaded from ftp://geneura.ugr.es/pub/eo
+
+ Search EO documentation + + + + +
+ + + diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 46daad951..58e4a33cd 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -37,7 +37,6 @@ * Suitable constructors and assignments and casts are defined to work * with this quantity as if it were a ScalarType. */ - template > class eoScalarFitness { diff --git a/eo/test/LICENSE b/eo/test/LICENSE new file mode 100644 index 000000000..60549be51 --- /dev/null +++ b/eo/test/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. From 8036c7fd7dfe68e9e54f5a03807854f05af62f56 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 3 Aug 2000 16:37:51 +0000 Subject: [PATCH 0223/2134] Changed some problems with Makefile.am --- eo/Makefile.am | 2 +- eo/configure.in | 2 +- eo/test/Makefile.in | 659 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 661 insertions(+), 2 deletions(-) create mode 100644 eo/test/Makefile.in diff --git a/eo/Makefile.am b/eo/Makefile.am index 7765a8a31..e50528c3d 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win +SUBDIRS = src test win contrib #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user diff --git a/eo/configure.in b/eo/configure.in index 4b2ca94b5..59e46f578 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -12,4 +12,4 @@ AM_PROG_LIBTOOL AM_MAINTAINER_MODE dnl add Makefiles that must be modified by the configuration here -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 doc/Makefile apps/nn/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 doc/Makefile) diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in new file mode 100644 index 000000000..09f0d9479 --- /dev/null +++ b/eo/test/Makefile.in @@ -0,0 +1,659 @@ +# 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 +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +############################################################################### +############################################################################### + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +AS = @AS@ +CC = @CC@ +CXX = @CXX@ +DLLTOOL = @DLLTOOL@ +LD = @LD@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NM = @NM@ +OBJDUMP = @OBJDUMP@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ + +DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a + +############################################################################### + +INCLUDES = -I$(top_builddir)/src +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a + +############################################################################### + +noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser t-eoAtomOps t-selectOne t-eoGOpSel t-eoVector t-eoCheckpointing t-eoExternalEO t-eoESFull + + +############################################################################### + +t_eoVector_SOURCES = t-eoVector.cpp +t_eoVector_DEPENDENCIES = $(DEPS) +t_eoVector_LDFLAGS = -lm +t_eoVector_LDADD = $(LDADDS) + +############################################################################### + +t_eoGOpSel_SOURCES = t-eoGOpSel.cpp +t_eoGOpSel_DEPENDENCIES = $(DEPS) +t_eoGOpSel_LDFLAGS = -lm +t_eoGOpSel_LDADD = $(LDADDS) + +############################################################################### + +t_selectOne_SOURCES = t-selectOne.cpp +t_selectOne_DEPENDENCIES = $(DEPS) +t_selectOne_LDFLAGS = -lm +t_selectOne_LDADD = $(LDADDS) + +############################################################################### + +t_eoAtomOps_SOURCES = t-eoAtomOps.cpp +t_eoAtomOps_DEPENDENCIES = $(DEPS) +t_eoAtomOps_LDFLAGS = -lm +t_eoAtomOps_LDADD = $(LDADDS) + +############################################################################### +#disabled +#t_eoESOps_SOURCES = t-eoESOps.cpp +#t_eoESOps_DEPENDENCIES = $(DEPS) +#t_eoESOps_LDFLAGS = -lm +#t_eoESOps_LDADD = $(LDADDS) + +############################################################################### + +t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +t_eoESFull_DEPENDENCIES = $(DEPS) +t_eoESFull_LDFLAGS = -lm +t_eoESFull_LDADD = $(LDADDS) + +############################################################################### + +t_eoNonUniform_SOURCES = t-eoNonUniform.cpp +t_eoNonUniform_DEPENDENCIES = $(DEPS) +t_eoNonUniform_LDFLAGS = -lm +t_eoNonUniform_LDADD = $(LDADDS) + +############################################################################### + +t_eoUniform_SOURCES = t-eoUniform.cpp +t_eoUniform_DEPENDENCIES = $(DEPS) +t_eoUniform_LDFLAGS = -lm +t_eoUniform_LDADD = $(LDADDS) + +############################################################################### + +t_eoRandom_SOURCES = t-eoRandom.cpp +t_eoRandom_DEPENDENCIES = $(DEPS) +t_eoRandom_LDFLAGS = -lm +t_eoRandom_LDADD = $(LDADDS) + +############################################################################### + +t_eogeneration_SOURCES = t-eogeneration.cpp +t_eogeneration_DEPENDENCIES = $(DEPS) +t_eogeneration_LDFLAGS = -lm +t_eogeneration_LDADD = $(LDADDS) + +############################################################################### + +t_eoEasyEA_SOURCES = t-eoEasyEA.cpp binary_value.h +t_eoEasyEA_DEPENDENCIES = $(DEPS) +t_eoEasyEA_LDFLAGS = -lm +t_eoEasyEA_LDADD = $(LDADDS) + +############################################################################### + +t_eobreeder_SOURCES = t-eobreeder.cpp binary_value.h +t_eobreeder_DEPENDENCIES = $(DEPS) +t_eobreeder_LDFLAGS = -lm +t_eobreeder_LDADD = $(LDADDS) + +############################################################################### + +t_eoinclusion_SOURCES = t-eoinclusion.cpp +t_eoinclusion_DEPENDENCIES = $(DEPS) +t_eoinclusion_LDFLAGS = -lm +t_eoinclusion_LDADD = $(LDADDS) + +############################################################################### + +t_eoinsertion_SOURCES = t-eoinsertion.cpp +t_eoinsertion_DEPENDENCIES = $(DEPS) +t_eoinsertion_LDFLAGS = -lm +t_eoinsertion_LDADD = $(LDADDS) + +############################################################################### + +t_eo_SOURCES = t-eo.cpp +t_eo_DEPENDENCIES = $(DEPS) +t_eo_LDADD = $(LDADDS) + +############################################################################### + +t_eofitness_SOURCES = t-eofitness.cpp +t_eofitness_DEPENDENCIES = $(DEPS) +t_eofitness_LDADD = $(LDADDS) + +############################################################################### + +t_eoproblem_SOURCES = t-eoproblem.cpp +t_eoproblem_LDFLAGS = -lm + +############################################################################### + +t_eobin_SOURCES = t-eobin.cpp +t_eobin_DEPENDENCIES = $(DEPS) +t_eobin_LDADD = $(LDADDS) + +############################################################################### + +t_eolottery_SOURCES = t-eolottery.cpp +t_eolottery_DEPENDENCIES = $(DEPS) +t_eolottery_LDFLAGS = -lm +t_eolottery_LDADD = $(LDADDS) + +############################################################################### + +t_eo2dVector_SOURCES = t-eo2dVector.cc +t_eo2dVector_DEPENDENCIES = $(DEPS) +t_eo2dVector_LDFLAGS = -lm +t_eo2dVector_LDADD = $(LDADDS) + +############################################################################### + +t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp +t_eoStateAndParser_DEPENDENCIES = $(DEPS) +t_eoStateAndParser_LDFLAGS = -lm +t_eoStateAndParser_LDADD = $(LDADDS) + +############################################################################### + +t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp +t_eoCheckpointing_DEPENDENCIES = $(DEPS) +t_eoCheckpointing_LDFLAGS = -lm +t_eoCheckpointing_LDADD = $(LDADDS) + +############################################################################### + +t_eoExternalEO_SOURCES = t-eoExternalEO.cpp +t_eoExternalEO_DEPENDENCIES = $(DEPS) +t_eoExternalEO_LDFLAGS = -lm +t_eoExternalEO_LDADD = $(LDADDS) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +t_eobreeder_OBJECTS = t-eobreeder.o +t_eoinclusion_OBJECTS = t-eoinclusion.o +t_eoinsertion_OBJECTS = t-eoinsertion.o +t_eo_OBJECTS = t-eo.o +t_eo_LDFLAGS = +t_eofitness_OBJECTS = t-eofitness.o +t_eofitness_LDFLAGS = +t_eoproblem_OBJECTS = t-eoproblem.o +t_eoproblem_LDADD = $(LDADD) +t_eoproblem_DEPENDENCIES = +t_eobin_OBJECTS = t-eobin.o +t_eobin_LDFLAGS = +t_eolottery_OBJECTS = t-eolottery.o +t_eo2dVector_OBJECTS = t-eo2dVector.o +t_eogeneration_OBJECTS = t-eogeneration.o +t_eoEasyEA_OBJECTS = t-eoEasyEA.o +t_eoNonUniform_OBJECTS = t-eoNonUniform.o +t_eoUniform_OBJECTS = t-eoUniform.o +t_eoRandom_OBJECTS = t-eoRandom.o +t_eoStateAndParser_OBJECTS = t-eoStateAndParser.o +t_eoAtomOps_OBJECTS = t-eoAtomOps.o +t_selectOne_OBJECTS = t-selectOne.o +t_eoGOpSel_OBJECTS = t-eoGOpSel.o +t_eoVector_OBJECTS = t-eoVector.o +t_eoCheckpointing_OBJECTS = t-eoCheckpointing.o +t_eoExternalEO_OBJECTS = t-eoExternalEO.o +t_eoESFull_OBJECTS = t-eoESFull.o +CXXFLAGS = @CXXFLAGS@ +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +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-eoCheckpointing.P .deps/t-eoESFull.P .deps/t-eoEasyEA.P \ +.deps/t-eoExternalEO.P .deps/t-eoGOpSel.P .deps/t-eoNonUniform.P \ +.deps/t-eoRandom.P .deps/t-eoStateAndParser.P .deps/t-eoUniform.P \ +.deps/t-eoVector.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-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_eoStateAndParser_SOURCES) $(t_eoAtomOps_SOURCES) $(t_selectOne_SOURCES) $(t_eoGOpSel_SOURCES) $(t_eoVector_SOURCES) $(t_eoCheckpointing_SOURCES) $(t_eoExternalEO_SOURCES) $(t_eoESFull_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_eoStateAndParser_OBJECTS) $(t_eoAtomOps_OBJECTS) $(t_selectOne_OBJECTS) $(t_eoGOpSel_OBJECTS) $(t_eoVector_OBJECTS) $(t_eoCheckpointing_OBJECTS) $(t_eoExternalEO_OBJECTS) $(t_eoESFull_OBJECTS) + +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 test/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstPROGRAMS: + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +distclean-noinstPROGRAMS: + +maintainer-clean-noinstPROGRAMS: + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +.s.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +.S.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + +maintainer-clean-libtool: + +t-eobreeder: $(t_eobreeder_OBJECTS) $(t_eobreeder_DEPENDENCIES) + @rm -f t-eobreeder + $(CXXLINK) $(t_eobreeder_LDFLAGS) $(t_eobreeder_OBJECTS) $(t_eobreeder_LDADD) $(LIBS) + +t-eoinclusion: $(t_eoinclusion_OBJECTS) $(t_eoinclusion_DEPENDENCIES) + @rm -f t-eoinclusion + $(CXXLINK) $(t_eoinclusion_LDFLAGS) $(t_eoinclusion_OBJECTS) $(t_eoinclusion_LDADD) $(LIBS) + +t-eoinsertion: $(t_eoinsertion_OBJECTS) $(t_eoinsertion_DEPENDENCIES) + @rm -f t-eoinsertion + $(CXXLINK) $(t_eoinsertion_LDFLAGS) $(t_eoinsertion_OBJECTS) $(t_eoinsertion_LDADD) $(LIBS) + +t-eo: $(t_eo_OBJECTS) $(t_eo_DEPENDENCIES) + @rm -f t-eo + $(CXXLINK) $(t_eo_LDFLAGS) $(t_eo_OBJECTS) $(t_eo_LDADD) $(LIBS) + +t-eofitness: $(t_eofitness_OBJECTS) $(t_eofitness_DEPENDENCIES) + @rm -f t-eofitness + $(CXXLINK) $(t_eofitness_LDFLAGS) $(t_eofitness_OBJECTS) $(t_eofitness_LDADD) $(LIBS) + +t-eoproblem: $(t_eoproblem_OBJECTS) $(t_eoproblem_DEPENDENCIES) + @rm -f t-eoproblem + $(CXXLINK) $(t_eoproblem_LDFLAGS) $(t_eoproblem_OBJECTS) $(t_eoproblem_LDADD) $(LIBS) + +t-eobin: $(t_eobin_OBJECTS) $(t_eobin_DEPENDENCIES) + @rm -f t-eobin + $(CXXLINK) $(t_eobin_LDFLAGS) $(t_eobin_OBJECTS) $(t_eobin_LDADD) $(LIBS) + +t-eolottery: $(t_eolottery_OBJECTS) $(t_eolottery_DEPENDENCIES) + @rm -f t-eolottery + $(CXXLINK) $(t_eolottery_LDFLAGS) $(t_eolottery_OBJECTS) $(t_eolottery_LDADD) $(LIBS) + +t-eo2dVector: $(t_eo2dVector_OBJECTS) $(t_eo2dVector_DEPENDENCIES) + @rm -f t-eo2dVector + $(CXXLINK) $(t_eo2dVector_LDFLAGS) $(t_eo2dVector_OBJECTS) $(t_eo2dVector_LDADD) $(LIBS) + +t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) + @rm -f t-eogeneration + $(CXXLINK) $(t_eogeneration_LDFLAGS) $(t_eogeneration_OBJECTS) $(t_eogeneration_LDADD) $(LIBS) + +t-eoEasyEA: $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_DEPENDENCIES) + @rm -f t-eoEasyEA + $(CXXLINK) $(t_eoEasyEA_LDFLAGS) $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_LDADD) $(LIBS) + +t-eoNonUniform: $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_DEPENDENCIES) + @rm -f t-eoNonUniform + $(CXXLINK) $(t_eoNonUniform_LDFLAGS) $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_LDADD) $(LIBS) + +t-eoUniform: $(t_eoUniform_OBJECTS) $(t_eoUniform_DEPENDENCIES) + @rm -f t-eoUniform + $(CXXLINK) $(t_eoUniform_LDFLAGS) $(t_eoUniform_OBJECTS) $(t_eoUniform_LDADD) $(LIBS) + +t-eoRandom: $(t_eoRandom_OBJECTS) $(t_eoRandom_DEPENDENCIES) + @rm -f t-eoRandom + $(CXXLINK) $(t_eoRandom_LDFLAGS) $(t_eoRandom_OBJECTS) $(t_eoRandom_LDADD) $(LIBS) + +t-eoStateAndParser: $(t_eoStateAndParser_OBJECTS) $(t_eoStateAndParser_DEPENDENCIES) + @rm -f t-eoStateAndParser + $(CXXLINK) $(t_eoStateAndParser_LDFLAGS) $(t_eoStateAndParser_OBJECTS) $(t_eoStateAndParser_LDADD) $(LIBS) + +t-eoAtomOps: $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_DEPENDENCIES) + @rm -f t-eoAtomOps + $(CXXLINK) $(t_eoAtomOps_LDFLAGS) $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_LDADD) $(LIBS) + +t-selectOne: $(t_selectOne_OBJECTS) $(t_selectOne_DEPENDENCIES) + @rm -f t-selectOne + $(CXXLINK) $(t_selectOne_LDFLAGS) $(t_selectOne_OBJECTS) $(t_selectOne_LDADD) $(LIBS) + +t-eoGOpSel: $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_DEPENDENCIES) + @rm -f t-eoGOpSel + $(CXXLINK) $(t_eoGOpSel_LDFLAGS) $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_LDADD) $(LIBS) + +t-eoVector: $(t_eoVector_OBJECTS) $(t_eoVector_DEPENDENCIES) + @rm -f t-eoVector + $(CXXLINK) $(t_eoVector_LDFLAGS) $(t_eoVector_OBJECTS) $(t_eoVector_LDADD) $(LIBS) + +t-eoCheckpointing: $(t_eoCheckpointing_OBJECTS) $(t_eoCheckpointing_DEPENDENCIES) + @rm -f t-eoCheckpointing + $(CXXLINK) $(t_eoCheckpointing_LDFLAGS) $(t_eoCheckpointing_OBJECTS) $(t_eoCheckpointing_LDADD) $(LIBS) + +t-eoExternalEO: $(t_eoExternalEO_OBJECTS) $(t_eoExternalEO_DEPENDENCIES) + @rm -f t-eoExternalEO + $(CXXLINK) $(t_eoExternalEO_LDFLAGS) $(t_eoExternalEO_OBJECTS) $(t_eoExternalEO_LDADD) $(LIBS) + +t-eoESFull: $(t_eoESFull_OBJECTS) $(t_eoESFull_DEPENDENCIES) + @rm -f t-eoESFull + $(CXXLINK) $(t_eoESFull_LDFLAGS) $(t_eoESFull_OBJECTS) $(t_eoESFull_LDADD) $(LIBS) +.cc.o: + $(CXXCOMPILE) -c $< +.cc.lo: + $(LTCXXCOMPILE) -c $< +.cpp.o: + $(CXXCOMPILE) -c $< +.cpp.lo: + $(LTCXXCOMPILE) -c $< + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +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 $$/$$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: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstPROGRAMS distclean-compile \ + 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-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." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ +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 \ +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 + + +############################################################################### + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: From bef10d6f9ad8ef3b8bf769ff62dbcf1782447605 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 3 Aug 2000 17:11:02 +0000 Subject: [PATCH 0224/2134] Added a different libtool configure so it runs on more machines --- eo/ltmain.sh | 2608 -------------------------------------------------- 1 file changed, 2608 deletions(-) diff --git a/eo/ltmain.sh b/eo/ltmain.sh index cb8174715..e69de29bb 100644 --- a/eo/ltmain.sh +++ b/eo/ltmain.sh @@ -1,2608 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -# -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -# The name of this program. -progname=`$echo "$0" | sed 's%^.*/%%'` -modename="$progname" - -# Constants. -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.2b - -default_mode= -help="Try \`$progname --help' for more information." -magic="%%%MAGIC variable%%%" -mkdir="mkdir" -mv="mv -f" -rm="rm -f" - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -# We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi - -if test "$LTCONFIG_VERSION" != "$VERSION"; then - echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$modename: not configured to build any kind of library" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= - -# Parse our command line options once, thoroughly. -while test $# -gt 0 -do - arg="$1" - shift - - case "$arg" in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - execute_dlfiles) - eval "$prev=\"\$$prev \$arg\"" - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case "$arg" in - --help) - show_help=yes - ;; - - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION" - exit 0 - ;; - - --config) - sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 - exit 0 - ;; - - --debug) - echo "$progname: enabling shell trace mode" - set -x - ;; - - --dry-run | -n) - run=: - ;; - - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --quiet | --silent) - show=: - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 -fi - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case "$nonopt" in - *cc | *++ | gcc* | *-gcc*) - mode=link - for arg - do - case "$arg" in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case "$mode" in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - lastarg= - srcfile="$nonopt" - suppress_output= - - for arg - do - # Accept any command-line options. - case "$arg" in - -o) - $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - -static) - build_old_libs=yes - continue - ;; - esac - - # Accept the current argument as the source file. - lastarg="$srcfile" - srcfile="$arg" - - # Aesthetically quote the previous argument. - - # Backslashify any backslashes, double quotes, and dollar signs. - # These are the only characters that are still specially - # interpreted inside of double-quoted scrings. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly in scan - # sets, so we specify it separately. - case "$lastarg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - lastarg="\"$lastarg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - done - - # Get the name of the library object. - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - - # Recognize several different file suffixes. - xform='[cCFSfms]' - case "$libobj" in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case "$libobj" in - *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;; - *) - $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2 - exit 1 - ;; - esac - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - $run $rm $obj $libobj - trap "$run $rm $obj $libobj; exit 1" 1 2 15 - else - $run $rm $libobj - trap "$run $rm $libobj; exit 1" 1 2 15 - fi - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - # All platforms use -DPIC, to notify preprocessed assembler code. - $show "$base_compile$pic_flag -DPIC $srcfile" - if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then : - else - test -n "$obj" && $run $rm $obj - exit 1 - fi - - # If we have no pic_flag, then copy the object into place and finish. - if test -z "$pic_flag"; then - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj - exit $? - fi - - # Just move the object, then go on to compile the next one - $show "$mv $obj $libobj" - $run $mv $obj $libobj || exit $? - - # Allow error messages only from the first compilation. - suppress_output=' >/dev/null 2>&1' - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - # Suppress compiler output if we already did a PIC compilation. - $show "$base_compile $srcfile$suppress_output" - if $run eval "$base_compile \$srcfile$suppress_output"; then : - else - $run $rm $obj $libobj - exit 1 - fi - fi - - # Create an invalid libtool object if no PIC, so that we do not - # accidentally link it into a program. - if test "$build_libtool_libs" != yes; then - $show "echo timestamp > $libobj" - $run eval "echo timestamp > \$libobj" || exit $? - fi - - exit 0 - ;; - - # libtool link mode - link) - modename="$modename: link" - CC="$nonopt" - allow_undefined=yes - compile_command="$CC" - finalize_command="$CC" - - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - dlfiles= - dlprefiles= - export_dynamic=no - generated= - hardcode_libdirs= - libobjs= - link_against_libtool_libs= - ltlibs= - objs= - prev= - prevarg= - release= - rpath= - perm_rpath= - temp_rpath= - vinfo= - - # We need to know -static, to get the right output filenames. - for arg - do - case "$arg" in - -all-static | -static) - if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 - fi - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test $# -gt 0; do - arg="$1" - shift - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case "$prev" in - dlfiles|dlprefiles) - case "$arg" in - *.la | *.lo) ;; # We handle these cases below. - *) - dlprefiles="$dlprefiles $arg" - test "$prev" = dlfiles && dlfiles="$dlfiles $arg" - prev= - ;; - esac - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath) - rpath="$rpath $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi - - prevarg="$arg" - - case "$arg" in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - if test "$export_dynamic" != yes; then - export_dynamic=yes - if test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - else - arg= - fi - - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - fi - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` - case "$dir" in - /* | [A-Za-z]:[/\\]*) - # Add the corresponding hardcode_libdir_flag, if it is not identical. - ;; - *) - $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2 - exit 1 - ;; - esac - deplibs="$deplibs $arg" - ;; - - -l*) deplibs="$deplibs $arg" ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -o) prev=output ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -static) - # If we have no pic_flag, then this is the same as -all-static. - if test -z "$pic_flag" && test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - - *.o | *.a) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A library object. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test "$build_libtool_libs" = yes; then - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/.o/'` - prev= - fi - libobjs="$libobjs $arg" - ;; - - *.la) - # A libtool-controlled library. - - dlname= - libdir= - library_names= - old_library= - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 - exit 1 - fi - - # If there is no directory component, then add one. - case "$arg" in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 - exit 1 - fi - - # Find the relevant object directory and library name. - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$arg"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - - if test -z "$libdir"; then - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $dir/$old_library"l - old_convenience="$old_convenience $dir/$old_library" - compile_command="$compile_command $dir/$old_library" - finalize_command="$finalize_command $dir/$old_library" - continue - fi - - # This library was specified with -dlopen. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test -z "$dlname"; then - # If there is no dlname, we need to preload. - prev=dlprefiles - else - # We should not create a dependency on this library, but we - # may need any libraries it requires. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - prev= - continue - fi - fi - - # The library was specified with -dlpreopen. - if test "$prev" = dlprefiles; then - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - dlprefiles="$dlprefiles $dir/$old_library" - else - dlprefiles="$dlprefiles $dir/$linklib" - fi - prev= - fi - - if test "$build_libtool_libs" = yes && test -n "$library_names"; then - link_against_libtool_libs="$link_against_libtool_libs $arg" - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - - # This is the magic to use -rpath. - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - # Put the magic libdir with the hardcode flag. - hardcode_libdirs="$libdir" - libdir="@HARDCODE_LIBDIRS@" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - libdir= - fi - fi - - if test -n "$libdir"; then - eval flag=\"$hardcode_libdir_flag_spec\" - - compile_command="$compile_command $flag" - finalize_command="$finalize_command $flag" - fi - elif test -n "$runpath_var"; then - # Do the same for the permanent run path. - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - - - lib_linked=yes - case "$hardcode_action" in - immediate | unsupported) - if test "$hardcode_direct" = no; then - compile_command="$compile_command $dir/$linklib" - elif test "$hardcode_minus_L" = no; then - compile_command="$compile_command -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = no; then - compile_shlibpath="$compile_shlibpath$dir:" - compile_command="$compile_command -l$name" - else - lib_linked=no - fi - ;; - - relink) - # We need an absolute path. - case "$dir" in - /* | [A-Za-z]:[/\\]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit 1 - fi - dir="$absdir" - ;; - esac - - if test "$hardcode_direct" = yes; then - compile_command="$compile_command $dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - compile_command="$compile_command -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - compile_shlibpath="$compile_shlibpath$dir:" - compile_command="$compile_command -l$name" - else - lib_linked=no - fi - ;; - - *) - lib_linked=no - ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit 1 - fi - - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - finalize_command="$finalize_command $libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - finalize_command="$finalize_command -L$libdir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - finalize_shlibpath="$finalize_shlibpath$libdir:" - finalize_command="$finalize_command -l$name" - else - # We cannot seem to hardcode it, guess we'll fake it. - finalize_command="$finalize_command -L$libdir -l$name" - fi - else - # Transform directly to old archives if we don't build new libraries. - if test -n "$pic_flag" && test -z "$old_library"; then - $echo "$modename: cannot find static library for \`$arg'" 1>&2 - exit 1 - fi - - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" - else - compile_command="$compile_command -L$dir -l$name" - finalize_command="$finalize_command -L$dir -l$name" - fi - fi - - # Add in any libraries that this one depends upon. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - esac - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - oldlibs= - case "$output" in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - */* | *\\*) - $echo "$modename: output file \`$output' must have no directory components" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *.a) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles"; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - ;; - - *.la) - # Make sure we only generate libraries of the form `libNAME.la'. - case "$output" in - lib*) ;; - *) - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval libname=\"$libname_spec\" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - if test -n "$objs"; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 - exit 1 - fi - - # How the heck are we supposed to write a wrapper for a shared library? - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 - exit 1 - fi - - if test -n "$dlfiles$dlprefiles"; then - $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test $# -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - # Now set the variables for building old libraries. - oldlibs="$objdir/$libname.a" - if test -z "$rpath"; then - # Building a libtool convenience library. - oldlibs="$objdir/$libname.al $oldlibs" - build_libtool_libs=convenience - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - current="$2" - revision="$3" - age="$4" - - # Check that each of the things are valid numbers. - case "$current" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$revision" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$age" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - if test $age -gt $current; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case "$version_type" in - none) ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test $loop != 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - versuffix= - verstring="0.0" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - # Add libc to deplibs on all systems. - dependency_libs="$deplibs" - deplibs="$deplibs -lc" - fi - - # Create the output directory, or remove our outputs if we need to. - if test -d $objdir; then - $show "${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" - $run ${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* - else - $show "$mkdir $objdir" - $run $mkdir $objdir - status=$? - if test $status -ne 0 && test ! -d $objdir; then - exit $status - fi - fi - - if test "$build_libtool_libs" = yes; then - # Get the real and link names of the library. - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - lib="$objdir/$realname" - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are PIC. - test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` - - # Transform .lo files to .o files. - test "$build_old_libs" = yes && oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` - - if test -n "$whole_archive_flag_spec"; then - if test -n "$convenience"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - else - for xlib in $convenience; do - # Extract the objects. - xdir="$xlib"x - generated="$generated $xdir" - xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x ../$xlib)" - $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $? - - libobjs="$libobjs `echo $xdir/*`" - done - fi - - # Do each of the archive commands. - eval cmds=\"$archive_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $objdir && $LN_S $realname $linkname)" - $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -export-dynamic was specified, set the dlname. - if test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - *.lo | *.o) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles"; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case "$output" in - *.lo) - if test -n "$objs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Create the old-style object. - reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` - - output="$obj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - test -z "$libobj" && exit 0 - - if test "$build_libtool_libs" != yes; then - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - $show "echo timestamp > $libobj" - $run eval "echo timestamp > $libobj" || exit $? - exit 0 - fi - - if test -n "$pic_flag"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs" - output="$libobj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - else - # Just create a symlink. - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj || exit $? - fi - - exit 0 - ;; - - *) - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test -n "$rpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - # Put the magic libdir with the hardcode flag. - hardcode_libdirs="$libdir" - libdir="@HARDCODE_LIBDIRS@" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - libdir= - fi - fi - - if test -n "$libdir"; then - eval flag=\"$hardcode_libdir_flag_spec\" - - compile_command="$compile_command $flag" - finalize_command="$finalize_command $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - fi - - # Substitute the hardcoded libdirs into the compile commands. - if test -n "$hardcode_libdir_separator"; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - fi - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - fi - - if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${output}S.c" - else - dlsyms= - fi - - if test -n "$dlsyms"; then - # Add our own program objects to the preloaded list. - dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - - # Discover the nlist of each of the dlfiles. - nlist="$objdir/${output}.nm" - - if test -d $objdir; then - $show "$rm $nlist ${nlist}T" - $run $rm "$nlist" "${nlist}T" - else - $show "$mkdir $objdir" - $run $mkdir $objdir - status=$? - if test $status -ne 0 && test ! -d $objdir; then - exit $status - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - # Parse the name list into a source file. - $show "creating $objdir/$dlsyms" - if test -z "$run"; then - # Make sure we at least have an empty file. - test -f "$nlist" || : > "$nlist" - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - wcout=`wc "$nlist" 2>/dev/null` - count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` - (test "$count" -ge 0) 2>/dev/null || count=-1 - else - $rm "$nlist"T - count=-1 - fi - - case "$dlsyms" in - "") ;; - *.c) - $echo > "$objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define dld_preloaded_symbol_count some_other_symbol -#define dld_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test -f "$nlist"; then - sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms" - else - echo '/* NONE */' >> "$objdir/$dlsyms" - fi - - $echo >> "$objdir/$dlsyms" "\ - -#undef dld_preloaded_symbol_count -#undef dld_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define __ptr_t void * -#else -# define __ptr_t char * -#endif - -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ -int dld_preloaded_symbol_count = $count; - -/* The mapping between symbol names and symbols. */ -struct { - char *name; - __ptr_t address; -} -dld_preloaded_symbols[] = -{\ -" - - if test -f "$nlist"; then - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms" - fi - - $echo >> "$objdir/$dlsyms" "\ - {0, (__ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif\ -" - ;; - - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 - ;; - esac - fi - - # Now compile the dynamic symbol file. - $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")" - $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $? - - # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` - elif test "$export_dynamic" != yes; then - test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2 - else - # We keep going just in case the user didn't refer to - # dld_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - - # We have no uninstalled library dependencies, so finalize right now. - $show "$compile_command" - $run eval "$compile_command" - exit $? - fi - - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'` - finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` - - # Create the binary in the object directory, then wrap it. - if test ! -d $objdir; then - $show "$mkdir $objdir" - $run $mkdir $objdir - status=$? - if test $status -ne 0 && test ! -d $objdir; then - exit $status - fi - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case "$dir" in - /* | [A-Za-z]:[/\\]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - # Delete the old output file. - $run $rm $output - - if test -n "$compile_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command" - finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" - fi - - if test "$hardcode_action" = relink; then - # AGH! Flame the AIX and HP-UX people for me, will ya? - $echo "$modename: warning: using a buggy system linker" 1>&2 - $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 - fi - - $show "$compile_command" - $run eval "$compile_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the finalize command for shipping. - finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"` - - # Quote $echo for shipping. - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - $rm $output - trap "$rm $output; exit 1" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$output -# Generated by $PROGRAM - GNU $PACKAGE $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of \``pwd`'. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - link_against_libtool_libs='$link_against_libtool_libs' - finalize_command=\"$finalize_command\" -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" - - progdir=\"\$thisdir/$objdir\" - program='$output' - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\` - - export $shlibpath_var -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} - - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" - chmod +x $output - fi - exit 0 - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs" - addlibs="$convenience" - build_libtool_libs=no - else - addlibs="$old_convenience" - fi - - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. - xdir="$xlib"x - generated="$generated $xdir" - xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x ../$xlib)" - $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $? - - oldobjs="$oldobjs `echo $xdir/*`" - done - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" - else - eval cmds=\"$old_archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case "$output" in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.a" - $show "creating $output" - - # Only create the output if not a dry run. - if test -z "$run"; then - $echo > $output "\ -# $output - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION - -# The name that we can dlopen(3). -dlname='$dlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Directory that this library needs to be installed in: -libdir='$install_libdir'\ -" - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $objdir && $LN_S ../$output $output)" - $run eval "(cd $objdir && $LN_S ../$output $output)" || exit $? - ;; - esac - exit 0 - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL"; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg="$nonopt" - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest="$arg" - continue - fi - - case "$arg" in - -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; - -s) - stripme=" -s" - continue - ;; - -*) ;; - - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest="$arg" - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit 1 - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test $# -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - fi - case "$destdir" in - /* | [A-Za-z]:[/\\]*) ;; - *) - for file in $files; do - case "$file" in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case "$file" in - *.a) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - library_names= - old_library= - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$realname $destdir/$realname" - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? - test "X$dlname" = "X$realname" && dlname= - - if test $# -gt 0; then - # Delete the old symlinks. - rmcmd="$rm" - for linkname - do - rmcmd="$rmcmd $destdir/$linkname" - done - $show "$rmcmd" - $run $rmcmd - - # ... and create new ones. - for linkname - do - test "X$dlname" = "X$linkname" && dlname= - $show "(cd $destdir && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $LN_S $realname $linkname)" - done - fi - - if test -n "$dlname"; then - # Install the dynamically-loadable library. - $show "$install_prog $dir/$dlname $destdir/$dlname" - $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - $show "$install_prog $file $destdir/$name" - $run eval "$install_prog $file $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case "$destfile" in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/.o/'` - ;; - *.o) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/.o/'` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit 0 - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - link_against_libtool_libs= - finalize_command= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Check the variables that should have been set. - if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 - fi - - finalize=yes - for lib in $link_against_libtool_libs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case "$lib" in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - if test "$hardcode_action" = relink; then - if test "$finalize" = yes; then - $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 - $show "$finalize_command" - if $run eval "$finalize_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - continue - fi - file="$objdir/$file"T - else - $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $SHELL $0 --finish$current_libdirs - exit 1 - fi - - exit 0 - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - echo " $libdir" - done - echo - echo "To link against installed libraries in a given directory, LIBDIR," - echo "you must use the \`-LLIBDIR' flag during linking." - echo - echo " You will also need to do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - echo "See any operating system documentation about shared libraries for" - echo "more information, such as the ld(1) and ld.so(8) manual pages." - echo "----------------------------------------------------------------------" - exit 0 - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit 1 - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - dir= - case "$file" in - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case "$file" in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - - # Restore saved enviroment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 - else - # Display what would be done. - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - $echo "$cmd$args" - exit 0 - fi - ;; - - # libtool uninstall mode - uninstall) - modename="$modename: uninstall" - rm="$nonopt" - files= - - for arg - do - case "$arg" in - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - rmfiles="$file" - - case "$name" in - *.la) - # Possibly a libtool archive, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $dir/$n" - test "X$n" = "X$dlname" && dlname= - done - test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" - - $show "$rm $rmfiles" - $run $rm $rmfiles - - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - # FIXME: should reinstall the best remaining shared library. - fi - ;; - - *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/.o/'` - rmfiles="$rmfiles $dir/$oldobj" - fi - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - - *) - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - esac - done - exit 0 - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 - ;; - esac - - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 -fi # test -z "$show_help" - -# We need to display help for each of the modes. -case "$mode" in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --version print version information - -MODE must be one of the following: - - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only -library objects (\`.lo' files) may be specified, and \`-rpath' is required. - -If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar' -and \`ranlib'. - -If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is -created, otherwise an executable program is created." - ;; - -uninstall) - $echo -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; -esac - -echo -$echo "Try \`$modename --help' for more information about other modes." - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: From a7e0b39cfd58f4142fdc6e028d05d464f1d42132 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 3 Aug 2000 17:11:54 +0000 Subject: [PATCH 0225/2134] New fresh ltconfig, works on my RedHat distr and also on geneura --- eo/ltconfig | 2177 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 1868 insertions(+), 309 deletions(-) diff --git a/eo/ltconfig b/eo/ltconfig index 527af3fb1..c14d83c16 100755 --- a/eo/ltconfig +++ b/eo/ltconfig @@ -1,8 +1,8 @@ #! /bin/sh # ltconfig - Create a system-specific libtool. -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -31,6 +31,9 @@ echo=echo if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : @@ -39,19 +42,54 @@ else exec "$SHELL" "$0" --no-reexec ${1+"$@"} fi +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null`} + case X$UNAME in + *-DOS) PATH_SEPARATOR=';' ;; + *) PATH_SEPARATOR=':' ;; + esac +fi + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then +if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string="`eval $cmd`") 2>/dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || + test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do - if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$dir/echo" break fi @@ -60,20 +98,54 @@ if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' - elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running ltconfig again with it. + ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" + export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} else # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then - # Oops. We lost completely, so just stick with echo. - echo=echo + echo='printf "%s\n"' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + # Cool, printf works + : + elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && + test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && + test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi fi fi fi @@ -87,15 +159,20 @@ sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + # The name of this program. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool -VERSION=1.2b -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' +VERSION=1.3.5 +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." @@ -104,8 +181,12 @@ help="Try \`$progname --help' for more information." default_ofile=libtool can_build_shared=yes enable_shared=yes -# All known linkers require a `.a' archive for static linking. +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). enable_static=yes +enable_fast_install=yes +enable_dlopen=unknown +enable_win32_dll=no ltmain= silent= srcdir= @@ -117,15 +198,26 @@ ofile="$default_ofile" verify_host=yes with_gcc=no with_gnu_ld=no +need_locks=yes +ac_ext=c +objext=o +libext=a +exeext= +cache_file= old_AR="$AR" old_CC="$CC" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" +old_LDFLAGS="$LDFLAGS" old_LD="$LD" old_LN_S="$LN_S" +old_LIBS="$LIBS" old_NM="$NM" old_RANLIB="$RANLIB" +old_DLLTOOL="$DLLTOOL" +old_OBJDUMP="$OBJDUMP" +old_AS="$AS" # Parse the command line options. args= @@ -146,13 +238,16 @@ do case "$option" in --help) cat <&2 echo "$help" 1>&2 @@ -262,8 +369,13 @@ exec 5>>./config.log # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi + +if test -n "$cache_file" && test -r "$cache_file"; then + echo "loading cache $cache_file within ltconfig" + . $cache_file +fi if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -278,8 +390,8 @@ else fi if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to ltmain.sh. - srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` + # Assume the source directory is the same one as the path to LTMAIN. + srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi @@ -350,7 +462,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -365,15 +477,18 @@ old_postuninstall_cmds= # Set a sane default for `AR'. test -z "$AR" && AR=ar +# Set a sane default for `OBJDUMP'. +test -z "$OBJDUMP" && OBJDUMP=objdump + # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then result=no echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. - if test -f $dir/ranlib; then + if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then RANLIB="ranlib" result="ranlib" break @@ -385,20 +500,24 @@ if test "${RANLIB+set}" != "set"; then fi if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$AS" && AS=as + # Check to see if we are using GCC. if test "$with_gcc" != yes || test -z "$CC"; then # If CC is not set, then try to find GCC or a usable CC. if test -z "$CC"; then echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do - IFS="$save_ifs" test -z "$dir" && dir=. - if test -f $dir/gcc; then + if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then CC="gcc" break fi @@ -415,11 +534,11 @@ if test "$with_gcc" != yes || test -z "$CC"; then # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". if test -z "$CC"; then echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" cc_rejected=no for dir in $PATH; do test -z "$dir" && dir=. - if test -f $dir/cc; then + if test -f $dir/cc || test -f $dir/cc$ac_exeext; then if test "$dir/cc" = "/usr/ucb/cc"; then cc_rejected=yes continue @@ -459,7 +578,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:462: checking whether we are using GNU C" >&5 + echo "$progname:581: checking whether we are using GNU C" >&5 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c @@ -478,6 +597,60 @@ fi set dummy $CC compiler="$2" +echo $ac_n "checking for object suffix... $ac_c" 1>&6 +$rm conftest* +echo 'int i = 1;' > conftest.c +echo "$progname:603: checking for object suffix" >& 5 +if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 +fi +$rm conftest* +echo "$ac_t$objext" 1>&6 + +echo $ac_n "checking for executable suffix... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_exeext="no" + $rm conftest* + echo 'main () { return 0; }' > conftest.c + echo "$progname:629: checking for executable suffix" >& 5 + if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c | *.err | *.$objext ) ;; + *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; + esac + done + else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* +fi +if test "X$ac_cv_exeext" = Xno; then + exeext="" +else + exeext="$ac_cv_exeext" +fi +echo "$ac_t$ac_cv_exeext" 1>&6 + echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= @@ -488,13 +661,21 @@ no_builtin_flag= if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' - no_builtin_flag=' -fno-builtin' case "$host_os" in - aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - os2*) + aix*) + # Below there is a dirty hack to force normal static linking with -ldl + # The problem is because libdl dynamically linked with both libc and + # libC (AIX C++ library), which obviously doesn't included in libraries + # list by gcc. This cause undefined symbols with -static flags. + # This hack allows C programs to be linked with "-static -ldl", but + # we not sure about C++ programs. + link_static_flag="$link_static_flag ${wl}-lC" + ;; + cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) @@ -503,6 +684,11 @@ if test "$with_gcc" = yes; then # like `-m68040'. pic_flag='-m68020 -resident32 -malways-restore-a4' ;; + sysv4*MP*) + if test -d /usr/nec; then + pic_flag=-Kconform_pic + fi + ;; *) pic_flag='-fPIC' ;; @@ -528,11 +714,11 @@ else # PIC (with -KPIC) is the default. ;; - os2*) + cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; - osf3* | osf4*) + osf3* | osf4* | osf5*) # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' @@ -544,7 +730,7 @@ else special_shlib_compile_flags='-belf' ;; - solaris2*) + solaris*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' @@ -556,7 +742,7 @@ else wl='-Qoption ld ' ;; - sysv4.2uw2*) + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' @@ -566,7 +752,12 @@ else pic_flag='-pic' link_static_flag='-Bstatic' ;; - + sysv4*MP*) + if test -d /usr/nec ;then + pic_flag='-Kconform_pic' + link_static_flag='-Bstatic' + fi + ;; *) can_build_shared=no ;; @@ -582,22 +773,30 @@ if test -n "$pic_flag"; then echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:585: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 + if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 - - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else + + case "$host_os" in + hpux9* | hpux10* | hpux11*) + # On HP-UX, both CC and GCC only warn that PIC is supported... then they + # create non-PIC objects. So, if there were any warnings, we assume that + # PIC is not supported. + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + can_build_shared=no + pic_flag= + else + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + fi + ;; + *) echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" - fi + ;; + esac else # Append any errors to the config.log. cat conftest.err 1>&5 @@ -611,6 +810,136 @@ else echo "$ac_t"none 1>&6 fi +# Check to see if options -o and -c are simultaneously supported by compiler +echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 +$rm -r conftest 2>/dev/null +mkdir conftest +cd conftest +$rm conftest* +echo "int some_variable = 0;" > conftest.c +mkdir out +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers +# that will create temporary files in the current directory regardless of +# the output directory. Thus, making CWD read-only will cause this test +# to fail, enabling locking or at least warning the user not to do parallel +# builds. +chmod -w . +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -o out/conftest2.o" +echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 +if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then + echo "$ac_t"no 1>&6 + compiler_c_o=no + else + echo "$ac_t"yes 1>&6 + compiler_c_o=yes + fi +else + # Append any errors to the config.log. + cat out/conftest.err 1>&5 + compiler_c_o=no + echo "$ac_t"no 1>&6 +fi +CFLAGS="$save_CFLAGS" +chmod u+w . +$rm conftest* out/* +rmdir out +cd .. +rmdir conftest +$rm -r conftest 2>/dev/null + +if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 +if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_o_lo=no + else + echo "$ac_t"yes 1>&6 + compiler_o_lo=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_o_lo=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + compiler_o_lo=no +fi + +# Check to see if we can do hard links to lock some files if needed +hard_links="nottested" +if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$ac_t$hard_links" 1>&6 + $rm conftest* + if test "$hard_links" = no; then + echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 + need_locks=warn + fi +else + need_locks=no +fi + +if test "$with_gcc" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" + echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_rtti_exceptions=no + else + echo "$ac_t"yes 1>&6 + compiler_rtti_exceptions=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_rtti_exceptions=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi + +fi + # Check for any special shared library compilation flags. if test -n "$special_shlib_compile_flags"; then echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 @@ -626,8 +955,8 @@ $rm conftest* echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:629: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 +if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then echo "$ac_t$link_static_flag" 1>&6 else echo "$ac_t"none 1>&6 @@ -639,9 +968,9 @@ $rm conftest* if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftestdata - if ln -s X conftestdata 2>/dev/null; then - $rm conftestdata + $rm conftest.dat + if ln -s X conftest.dat 2>/dev/null; then + $rm conftest.dat LN_S="ln -s" else LN_S=ln @@ -659,11 +988,17 @@ if test -z "$LD"; then if test "$with_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:662: checking for ld used by GCC" >&5 + echo "$progname:991: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. - /* | [A-Za-z]:[/\\]*) + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done test -z "$LD" && LD="$ac_prog" ;; "") @@ -677,17 +1012,17 @@ if test -z "$LD"; then esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:680: checking for GNU ld" >&5 + echo "$progname:1015: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:683: checking for non-GNU ld" >&5 + echo "$progname:1018: checking for non-GNU ld" >&5 fi if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog"; then + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. @@ -729,38 +1064,176 @@ echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c allow_undefined_flag= no_undefined_flag= +need_lib_prefix=unknown +need_version=unknown +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments archive_cmds= +archive_expsym_cmds= old_archive_from_new_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= +thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= +always_export_symbols=no +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' +# include_expsyms should be a list of space-separated symbols to be *always* +# included in the symbol list +include_expsyms= +# exclude_expsyms can be an egrep regular expression of symbols to exclude +# it will be wrapped by ` (' and `)$', so one must not match beginning or +# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', +# as well as any symbol that contains `d'. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out +# platforms (ab)use it in PIC code, but their linkers get confused if +# the symbol is explicitly referenced. Since portable code cannot +# rely on this symbol name, it's probably fine to never include it in +# preloaded symbol tables. + +case "$host_os" in +cygwin* | mingw*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$with_gcc" != yes; then + with_gnu_ld=no + fi + ;; + +esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' # See if GNU ld supports shared libraries. case "$host_os" in - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes + aix3* | aix4*) + # On AIX, the GNU linker is very broken + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF ;; - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' - hardcode_direct=yes + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=yes + + # Extract the symbol export list from an `--export-all' def file, + # then regenerate the def file from the symbol export list, so that + # the compiled dll only exports the symbol export list. + # Be careful not to strip the DATA tag left by newer dlltools. + export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ + $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' + + # If DATA tags from a recent dlltool are present, honour them! + archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \$# in + 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done~ + test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ + $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' + + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' + # can we support soname and/or expsyms with a.out? -oliva + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' + wlarc= + hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -771,14 +1244,28 @@ if test "$with_gnu_ld" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + case $host_os in + cygwin* | mingw*) + # dlltool doesn't understand --whole-archive et. al. + whole_archive_flag_spec= + ;; + *) + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + ;; + esac fi else # PORTME fill in a description of your system's linker (not GNU ld) case "$host_os" in aix3*) allow_undefined_flag=unsupported - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' + always_export_symbols=yes + archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes @@ -790,16 +1277,67 @@ else ;; aix4*) - allow_undefined_flag=unsupported - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' - hardcode_direct=yes - hardcode_minus_L=yes - ;; + hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' + hardcode_libdir_separator=':' + if test "$with_gcc" = yes; then + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + shared_flag='-shared' + else + shared_flag='${wl}-bM:SRE' + hardcode_direct=yes + fi + allow_undefined_flag=' ${wl}-berok' + archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' + archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' + case "$host_os" in aix4.[01]|aix4.[01].*) + # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on + always_export_symbols=yes ;; + esac + ;; amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + cygwin* | mingw*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs' + fix_srcfile_path='`cygpath -w $srcfile`' + ;; + + freebsd1*) + ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor @@ -807,65 +1345,64 @@ else # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes - hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) - archive_cmds='$LD -Bshareable -o $lib$libobjs' + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; - # FreeBSD 3, at last, uses gcc -shared to do shared libraries. - freebsd3*) - archive_cmds='$CC -shared -o $lib$libobjs' + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes - hardcode_minus_L=no hardcode_shlibpath_var=no ;; - hpux9*) - archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' + hpux9* | hpux10* | hpux11*) + case "$host_os" in + hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; + esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: hardcode_direct=yes - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10* | hpux11*) - archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_direct=yes - hardcode_minus_L=yes + hardcode_minus_L=yes # Not in the search PATH, but as the default + # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$with_gcc" = yes; then - archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs' + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else - archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' + archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: ;; netbsd*) - # Tested with NetBSD 1.2 ld - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF + fi + hardcode_libdir_flag_spec='${wl}-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; openbsd*) - archive_cmds='$LD -Bshareable -o $lib$libobjs' + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -875,80 +1412,169 @@ else hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; - osf3* | osf4*) - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' + osf3*) + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; - sco3.2v5*) - archive_cmds='$LD -G -o $lib$libobjs' + osf4* | osf5*) # As osf3* with the addition of the -msym flag + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + rhapsody*) + archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flags_spec='-L$libdir' hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes ;; - solaris2*) + solaris*) no_undefined_flag=' -z text' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no - - # Solaris 2 before 2.5 hardcodes -L paths. case "$host_os" in - solaris2.[0-4]*) - hardcode_minus_L=yes - ;; + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac ;; sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; + sysv4) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' + else + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + uts4*) - archive_cmds='$LD -G -h $soname -o $lib$libobjs' + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no + hardcode_shlibpath_var=no + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + unixware7*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no ;; *) ld_shlibs=no - can_build_shared=no ;; esac fi echo "$ac_t$ld_shlibs" 1>&6 +test "$ld_shlibs" = no && can_build_shared=no if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in - /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path. + [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -p" + break else - NM="$ac_dir/nm" + NM=${NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags fi - break fi done IFS="$ac_save_ifs" @@ -965,40 +1591,54 @@ echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. -symcode='[BCDEGRSTU]' +symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \1' +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Define system-specific variables. case "$host_os" in aix*) - symcode='[BCDTU]' + symcode='[BCDT]' + ;; +cygwin* | mingw*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; irix*) - # Cannot use undefined symbols on IRIX because inlined functions mess us up. symcode='[BCDEGRST]' ;; -solaris2*) - symcode='[BDTU]' +solaris*) + symcode='[BDT]' + ;; +sysv4) + symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTUW]' + symcode='[ABCDGISTW]' fi -# Write the raw and C identifiers. -global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do -# Check to see that the pipe works correctly. -pipe_works=no -$rm conftest* -cat > conftest.c < conftest.c <&5 -if { (eval echo $progname:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:1017: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + echo "$progname:1653: checking if global_symbol_pipe works" >&5 + if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + # Now try to grab the symbols. + nlist=conftest.nm + if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - wcout=`wc "$nlist" 2>/dev/null` - count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` - (test "$count" -ge 0) 2>/dev/null || count=-1 - else - rm -f "$nlist"T - count=-1 - fi + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF - # Now generate the symbol file. - sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c + # Now generate the symbol file. + eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' - cat <> conftest.c + cat <> conftest.c #if defined (__STDC__) && __STDC__ -# define __ptr_t void * +# define lt_ptr_t void * #else -# define __ptr_t char * +# define lt_ptr_t char * +# define const #endif -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ -int dld_preloaded_symbol_count = $count; - /* The mapping between symbol names and symbols. */ -struct { - char *name; - __ptr_t address; +const struct { + const char *name; + lt_ptr_t address; } -dld_preloaded_symbols[] = +lt_preloaded_symbols[] = { EOF - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (__ptr_t) 0} + sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c + cat <<\EOF >> conftest.c + {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF - # Now try linking the two files. - mv conftest.o conftestm.o - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS='conftestm.o' - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" + # Now try linking the two files. + mv conftest.$objext conftstm.$objext + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$objext" + CFLAGS="$CFLAGS$no_builtin_flag" + if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + LIBS="$save_LIBS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi else - echo "cannot find nm_test_func in $nlist" >&5 + echo "cannot find nm_test_var in $nlist" >&5 fi else - echo "cannot find nm_test_var in $nlist" >&5 + echo "cannot run $global_symbol_pipe" >&5 fi else - echo "cannot run $global_symbol_pipe" >&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 fi -else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 -fi -$rm conftest* + $rm conftest* conftst* -# Do not use the global_symbol_pipe unless it works. -echo "$ac_t$pipe_works" 1>&6 -test "$pipe_works" = yes || global_symbol_pipe= + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + global_symbol_pipe= + fi +done +if test "$pipe_works" = yes; then + echo "${ac_t}ok" 1>&6 +else + echo "${ac_t}failed" 1>&6 +fi + +if test -z "$global_symbol_pipe"; then + global_symbol_to_cdecl= +fi # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 @@ -1105,10 +1752,12 @@ if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && \ - test "$hardcode_minus_L" != no && \ - test "$hardcode_shlibpath_var" != no; then - + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$hardcode_shlibpath_var" != no && + test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -1140,12 +1789,27 @@ postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= +shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" - +sys_lib_dlsearch_path_spec="/lib /usr/lib" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +file_magic_cmd= +file_magic_test_file= +deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 case "$host_os" in -aix3* | aix4*) +aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH @@ -1154,22 +1818,109 @@ aix3* | aix4*) soname_spec='${libname}${release}.so$major' ;; +aix4*) + version_type=linux + # AIX has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + # We preserve .a as extension for shared libraries though AIX4.2 + # and later linker supports .so + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' + shlibpath_var=LIBPATH + deplibs_check_method=pass_all + ;; + amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; -freebsd2* | freebsd3*) - version_type=sunos - library_names_spec='${libname}${release}.so$versuffix $libname.so' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' +beos*) + library_names_spec='${libname}.so' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + deplibs_check_method=pass_all + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + export_dynamic_flag_spec=-rdynamic + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw*) + version_type=windows + need_version=no + need_lib_prefix=no + if test "$with_gcc" = yes; then + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' + else + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' + fi + dynamic_linker='Win32 ld.exe' + deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + file_magic_cmd='${OBJDUMP} -f' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case "$version_type" in + freebsd-elf*) + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + deplibs_check_method=unknown + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case "$host_os" in + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + ;; + esac ;; gnu*) version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}.so' + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' + soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -1178,18 +1929,52 @@ hpux9* | hpux10* | hpux11*) # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos + need_lib_prefix=no + need_version=no shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' + case "$host_os" in + hpux10.20*) + # TODO: Does this work for hpux-11 too? + deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/usr/lib/libc.sl + ;; + esac ;; irix5* | irix6*) - version_type=osf - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix $libname.so' - shlibpath_var=LD_LIBRARY_PATH + version_type=irix + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}.so.$major' + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' + case "$host_os" in + irix5*) + libsuff= shlibsuff= + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in # libtool.m4 will add one of these switches to LD + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /lib${libsuff}/libc.so*` + deplibs_check_method='pass_all' ;; # No shared lib support for Linux oldld, aout, or coff. @@ -1200,10 +1985,14 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) # This must be Linux ELF. linux-gnu*) version_type=linux + need_lib_prefix=no + need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + deplibs_check_method=pass_all if test -f /lib/ld.so.1; then dynamic_linker='GNU ld.so' @@ -1216,25 +2005,60 @@ linux-gnu*) fi ;; -netbsd* | openbsd*) +netbsd*) version_type=sunos - library_names_spec='${libname}${release}.so$versuffix' + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' + soname_spec='${libname}${release}.so$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + ;; + +openbsd*) + version_type=sunos + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + need_version=no + fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' + need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; -osf3* | osf4*) +osf3* | osf4* | osf5*) version_type=osf + need_version=no soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix $libname.so' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method='file_magic COFF format alpha shared library' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + deplibs_check_method='pass_all' + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rhapsody*) + version_type=sunos + library_names_spec='${libname}.so' + soname_spec='${libname}.so' + shlibpath_var=DYLD_LIBRARY_PATH + deplibs_check_method=pass_all ;; sco3.2v5*) @@ -1244,27 +2068,56 @@ sco3.2v5*) shlibpath_var=LD_LIBRARY_PATH ;; -solaris2*) +solaris*) version_type=linux + need_lib_prefix=no + need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' + deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" + file_magic_cmd=/usr/bin/file + file_magic_test_file=/lib/libc.so ;; sunos4*) version_type=sunos - library_names_spec='${libname}${release}.so$versuffix' + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes ;; -sysv4.2uw2*) +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH + case "$host_vendor" in + sequent) + file_magic_cmd='/bin/file' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + ncr) + deplibs_check_method='pass_all' + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac ;; uts4*) @@ -1274,29 +2127,86 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' + soname_spec='$libname.so.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + *) dynamic_linker=no ;; esac -echo "$ac_t$dynamic_linker" +echo "$ac_t$dynamic_linker" 1>&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in +# configure.in, otherwise build static only libraries. +case "$host_os" in +cygwin* | mingw* | os2*) + if test x$can_build_shared = xyes; then + test x$enable_win32_dll = xno && can_build_shared=no + echo "checking if package supports dlls... $can_build_shared" 1>&6 + fi +;; +esac + +if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac +fi + echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in -aix*) +aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then - archive_cmds="$archive_cmds;\$RANLIB \$lib" + archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; + +aix4*) + test "$enable_shared" = yes && enable_static=no + ;; esac echo "$ac_t$enable_shared" 1>&6 @@ -1306,6 +2216,15 @@ test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + echo $ac_n "checking for objdir... $ac_c" 1>&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null @@ -1318,46 +2237,512 @@ fi rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else +if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then + lt_cv_dlopen=no lt_cv_dlopen_libs= +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "$progname:2248: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +echo "$progname:2288: checking for dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +echo "$progname:2335: checking for dld_link in -ldld" >&5 +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +echo "$progname:2375: checking for shl_load" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +shl_load(); +#endif + +; return 0; } +EOF +if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +echo "$progname:2423: checking for shl_load in -ldld" >&5 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + +fi + + +fi + +fi + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + fi + + case "$lt_cv_dlopen" in + dlopen) +for ac_hdr in dlfcn.h; do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "$progname:2488: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int fnord = 0; +EOF +ac_try="$ac_compile >/dev/null 2>conftest.out" +{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +done + + if test "x$ac_cv_header_dlfcn_h" = xyes; then + CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + fi + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +echo "$progname:2526: checking whether a program can dlopen itself" >&5 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self=cross + else + cat > conftest.c < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LTDL_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LTDL_GLOBAL DL_GLOBAL +# else +# define LTDL_GLOBAL 0 +# endif +#endif + +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LTDL_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LTDL_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LTDL_LAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LTDL_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LTDL_LAZY_OR_NOW DL_NOW +# else +# define LTDL_LAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +fnord() { int i=42;} +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + +EOF +if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + lt_cv_dlopen_self=yes +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 + + if test "$lt_cv_dlopen_self" = yes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self_static=cross + else + cat > conftest.c < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LTDL_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LTDL_GLOBAL DL_GLOBAL +# else +# define LTDL_GLOBAL 0 +# endif +#endif + +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LTDL_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LTDL_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LTDL_LAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LTDL_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LTDL_LAZY_OR_NOW DL_NOW +# else +# define LTDL_LAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +fnord() { int i=42;} +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + +EOF +if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + lt_cv_dlopen_self_static=yes +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self_static=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 +fi + ;; + esac + + case "$lt_cv_dlopen_self" in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case "$lt_cv_dlopen_self_static" in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + # Copy echo and quote the copy, instead of the original, because it is # used later. ltecho="$echo" +if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ltecho="$CONFIG_SHELL \$0 --fallback-echo" +fi +LTSHELL="$SHELL" -# Now quote all the things that may contain metacharacters. -for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ - old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ - link_static_flag no_builtin_flag export_dynamic_flag_spec \ - whole_archive_flag_spec libname_spec library_names_spec soname_spec RANLIB \ - old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ - allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe \ - hardcode_libdir_flag_spec hardcode_libdir_separator; do +LTCONFIG_VERSION="$VERSION" - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ - postinstall_cmds | postuninstall_cmds | finish_cmds) - # Double-quote double-evaled strings. - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" - ;; - *) - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" +# Only quote variables if we're using ltmain.sh. +case "$ltmain" in +*.sh) + # Now quote all the things that may contain metacharacters. + for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ + old_LD old_LDFLAGS old_LIBS \ + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ + AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ + reload_flag reload_cmds wl \ + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ + library_names_spec soname_spec \ + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ + file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ + hardcode_libdir_flag_spec hardcode_libdir_separator \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do + + case "$var" in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case "$ltecho" in + *'\$0 --fallback-echo"') + ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac -done -trap "$rm \"$ofile\"; exit 1" 1 2 15 -echo "creating $ofile" -$rm "$ofile" -cat < "$ofile" + trap "$rm \"$ofile\"; exit 1" 1 2 15 + echo "creating $ofile" + $rm "$ofile" + cat < "$ofile" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1383,23 +2768,50 @@ Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ### BEGIN LIBTOOL CONFIG +EOF + cfgfile="$ofile" + ;; + +*) + # Double-quote the variables that need it (for aesthetics). + for var in old_CC old_CFLAGS old_CPPFLAGS \ + old_LD old_LDFLAGS old_LIBS \ + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do + eval "$var=\\\"\$var\\\"" + done + + # Just create a config file. + cfgfile="$ofile.cfg" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + echo "creating $cfgfile" + $rm "$cfgfile" + cat < "$cfgfile" +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +EOF + ;; +esac + +cat <> "$cfgfile" # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # -# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ -# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ +# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ # $0$ltconfig_args # # Compiler and other test output produced by $progname, useful for # debugging $progname, is in ./config.log if it exists. # The version of $progname that generated this script. -LTCONFIG_VERSION="$VERSION" +LTCONFIG_VERSION=$LTCONFIG_VERSION # Shell to use when invoking shell scripts. -SHELL="$SHELL" +SHELL=$LTSHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared @@ -1407,94 +2819,152 @@ build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + # The host system. -host_alias="$host_alias" -host="$host" +host_alias=$host_alias +host=$host # An echo program that does not interpret backslashes. -echo="$ltecho" +echo=$ltecho # The archiver. -AR="$AR" +AR=$AR # The default C compiler. -CC="$CC" +CC=$CC # The linker used to build libraries. -LD="$LD" +LD=$LD # Whether we need hard or soft links. -LN_S="$LN_S" +LN_S=$LN_S # A BSD-compatible nm program. -NM="$NM" +NM=$NM + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" # The name of the directory that contains temporary libtool files. -objdir="$objdir" +objdir=$objdir # How to create reloadable object files. -reload_flag="$reload_flag" -reload_cmds="$reload_cmds" +reload_flag=$reload_flag +reload_cmds=$reload_cmds # How to pass a linker flag through the compiler. -wl="$wl" +wl=$wl + +# Object file suffix (normally "o"). +objext="$objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Executable file suffix (normally ""). +exeext="$exeext" # Additional compiler flags for building library objects. -pic_flag="$pic_flag" +pic_flag=$pic_flag + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$compiler_c_o + +# Can we write directly to a .lo ? +compiler_o_lo=$compiler_o_lo + +# Must we lock files when doing compilation ? +need_locks=$need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. -link_static_flag="$link_static_flag" +link_static_flag=$link_static_flag # Compiler flag to turn off builtin functions. -no_builtin_flag="$no_builtin_flag" +no_builtin_flag=$no_builtin_flag # Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="$export_dynamic_flag_spec" +export_dynamic_flag_spec=$export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="$whole_archive_flag_spec" +whole_archive_flag_spec=$whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. -libname_spec="$libname_spec" +libname_spec=$libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. -library_names_spec="$library_names_spec" +library_names_spec=$library_names_spec # The coded name of the library, if different from the real name. -soname_spec="$soname_spec" +soname_spec=$soname_spec # Commands used to build and install an old-style archive. -RANLIB="$RANLIB" -old_archive_cmds="$old_archive_cmds" -old_postinstall_cmds="$old_postinstall_cmds" -old_postuninstall_cmds="$old_postuninstall_cmds" +RANLIB=$RANLIB +old_archive_cmds=$old_archive_cmds +old_postinstall_cmds=$old_postinstall_cmds +old_postuninstall_cmds=$old_postuninstall_cmds # Create an old-style archive from a shared archive. -old_archive_from_new_cmds="$old_archive_from_new_cmds" +old_archive_from_new_cmds=$old_archive_from_new_cmds # Commands used to build and install a shared archive. -archive_cmds="$archive_cmds" -postinstall_cmds="$postinstall_cmds" -postuninstall_cmds="$postuninstall_cmds" +archive_cmds=$archive_cmds +archive_expsym_cmds=$archive_expsym_cmds +postinstall_cmds=$postinstall_cmds +postuninstall_cmds=$postuninstall_cmds + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="$allow_undefined_flag" +allow_undefined_flag=$allow_undefined_flag # Flag that forces no undefined symbols. -no_undefined_flag="$no_undefined_flag" +no_undefined_flag=$no_undefined_flag # Commands used to finish a libtool library installation in a directory. -finish_cmds="$finish_cmds" +finish_cmds=$finish_cmds # Same as above, but a single script fragment to be evaled but not shown. -finish_eval="$finish_eval" +finish_eval=$finish_eval # Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="$global_symbol_pipe" +global_symbol_pipe=$global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$global_symbol_to_cdecl # This is the shared library runtime path variable. runpath_var=$runpath_var @@ -1502,15 +2972,18 @@ runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" +hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="$hardcode_libdir_separator" +hardcode_libdir_separator=$hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. @@ -1523,30 +2996,116 @@ hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$include_expsyms + EOF -case "$host_os" in -aix3*) - cat <<\EOF >> "$ofile" +case "$ltmain" in +*.sh) + echo '### END LIBTOOL CONFIG' >> "$ofile" + echo >> "$ofile" + case "$host_os" in + aix3*) + cat <<\EOF >> "$ofile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "${COLLECT_NAMES+set}" != set; then +if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF + ;; + esac + + # Append the ltmain.sh script. + sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + + chmod +x "$ofile" + ;; + +*) + # Compile the libtool program. + echo "FIXME: would compile $ltmain" ;; esac -echo '### END LIBTOOL CONFIG' >> "$ofile" -echo >> "$ofile" +test -n "$cache_file" || exit 0 -# Append the ltmain.sh script. -cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) +# AC_CACHE_SAVE +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache -chmod +x "$ofile" exit 0 # Local Variables: From a758eb1bd2e5325ee4e9c6ced3773e6b52e17fa2 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 3 Aug 2000 17:15:42 +0000 Subject: [PATCH 0226/2134] Changes mostly to Makefile.ams here and there, to be able to do a clean distribution --- eo/Makefile.am | 2 +- eo/configure.in | 2 +- eo/doc/Makefile.am | 2 ++ eo/foot.html | 24 ------------------------ eo/src/Makefile.am | 4 ++-- 5 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 eo/foot.html diff --git a/eo/Makefile.am b/eo/Makefile.am index e50528c3d..3b8a03006 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win contrib +SUBDIRS = src test win contrib doc #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user diff --git a/eo/configure.in b/eo/configure.in index 59e46f578..59e79ba89 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -12,4 +12,4 @@ AM_PROG_LIBTOOL AM_MAINTAINER_MODE dnl add Makefiles that must be modified by the configuration here -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 doc/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 doc/Makefile contrib/Makefile) diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index d2936d58b..0f22bbdf5 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -5,3 +5,5 @@ ############################################################################### ############################################################################### + +EXTRA_DIST = eo.cfg foot.html \ No newline at end of file diff --git a/eo/foot.html b/eo/foot.html deleted file mode 100644 index f6efa307d..000000000 --- a/eo/foot.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - BinOp - - - -
- - -
The EO framework has been created by  -GeNeura team
-and can be downloaded from ftp://geneura.ugr.es/pub/eo
-
- Search EO documentation - - - - -
- - - diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index dad358759..e1291ab8d 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,10 +4,10 @@ ## ############################################################################### -SUBDIRS = es ga gp obsolete utils # other +SUBDIRS = es ga gp obsolete utils other lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = EO.h eoDup.h eoKill.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 +libeoinc_HEADERS = eo EO.h eoDup.h eoKill.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 eoUpdater.h From afd636cdbfa762c6fb4f855f18fd920f1894152d Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 3 Aug 2000 17:22:46 +0000 Subject: [PATCH 0227/2134] More changes to Makefile.am --- eo/src/Makefile.am | 2 +- eo/src/utils/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index e1291ab8d..14129385d 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -10,4 +10,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoKill.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 eoUpdater.h +libeoinc_HEADERS = eo EO.h eoDup.h eoKill.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 eoInit.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/utils/Makefile.am b/eo/src/utils/Makefile.am index 1be8edc02..2869f201d 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,4 +10,4 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h +libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h From 1bee1e1f81eb7a359a10476ae03daed768e643e3 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 3 Aug 2000 17:30:57 +0000 Subject: [PATCH 0228/2134] More changes to Makefile.am --- eo/src/es/Makefile.am | 2 +- eo/src/utils/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index baa2c3b39..f7cf8d983 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -5,4 +5,4 @@ ############################################################################### libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoESFullChrom.h eoESChrom.h eoESFullMut.h +libeoinc_HEADERS = eoESFullChrom.h eoESChrom.h eoESFullMut.h evolution_strategies diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 2869f201d..455e723ba 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,4 +10,4 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h +libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h checkpointing eoCheckPoint.h From d2fedcb5b99b3d958c1a7164a7fd44834dc669bf Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 3 Aug 2000 17:33:03 +0000 Subject: [PATCH 0229/2134] More changes to Makefile.am --- eo/src/es/Makefile.am | 2 +- eo/src/other/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index f7cf8d983..b72b66d15 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -5,4 +5,4 @@ ############################################################################### libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoESFullChrom.h eoESChrom.h eoESFullMut.h evolution_strategies +libeoinc_HEADERS = eoESFullChrom.h eoESChrom.h eoESFullMut.h evolution_strategies eoEsObjectiveBounds.h eoEsSimple.h eoEsStdev.h eoEsFull.h eoEsChromInit.h eoEsMutationInit.h eoEsMutate.h \ No newline at end of file diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am index e65ba2e2b..6d1815db9 100644 --- a/eo/src/other/Makefile.am +++ b/eo/src/other/Makefile.am @@ -10,4 +10,4 @@ lib_LIBRARIES = libeoother.a libeoother_a_SOURCES = eoExternalOpFunctions.cpp libeootherincdir = $(includedir)/eo/other -libeootherinc_HEADERS = eoExternalEO.h eoString.h eoStringMutation.h +libeootherinc_HEADERS = eoExternalEO.h eoString.h eoStringMutation.h external_eo eoExternalOpFunctions.h From 8dea30897d7732ddc95b2fa59f34bb73f21c62b4 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 3 Aug 2000 19:54:42 +0000 Subject: [PATCH 0230/2134] Removed contrib dir reference --- eo/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 3b8a03006..e1c123c03 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,14 +4,12 @@ ## ############################################################################### -SUBDIRS = src test win contrib doc +SUBDIRS = src test win doc #Directory for documents -DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user IDXDIR = ~/index EXTRA_DIST=LICENSE docs: - doc++ -d $(DOCDIR) -B foot.html -f src/*.h src/*.cpp - /home/jmerelo/bin/index -e html -i $(IDXDIR)/neweo.idx $(DOCDIR)/ -v 3 \ No newline at end of file + doxygen doc/eo.cfg From 7f04d616e6e218b93340994e60fd1364209e0d8f Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 3 Aug 2000 20:00:39 +0000 Subject: [PATCH 0231/2134] Temporarily added Makefile.am to prevent errors --- eo/contrib/Makefile.am | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 eo/contrib/Makefile.am diff --git a/eo/contrib/Makefile.am b/eo/contrib/Makefile.am new file mode 100644 index 000000000..6938de8e2 --- /dev/null +++ b/eo/contrib/Makefile.am @@ -0,0 +1,13 @@ +############################################################################### +## +## Makefile.am for eo/src +## +############################################################################### + +SUBDIRS = + +lib_LIBRARIES = +libeo_a_SOURCES = + +libeoincdir = $(includedir)/eo +libeoinc_HEADERS=eoAged.h eoDraw.h From 6d8e3a65043d7cf56a699c5a64d63c5ea4659ef1 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:18:34 +0000 Subject: [PATCH 0232/2134] Extreme cleanup, see src/obsolete for details --- eo/Makefile.am | 7 +- eo/doc/eo.cfg | 4 +- eo/src/EO.h | 1 + eo/src/Makefile.am | 7 +- eo/src/apply.h | 41 +++ eo/src/eo | 83 ++++-- eo/src/eoAlgo.h | 22 +- eo/src/eoBreed.h | 69 +++++ eo/src/eoCombinedContinue.h | 59 ++++ ...eoExternalOpFunctions.cpp => eoContinue.h} | 38 ++- eo/src/eoCopyElite.h | 110 ++++++++ eo/src/eoCounter.h | 219 +++++++++++++++ eo/src/eoDetTournament.h | 12 +- eo/src/eoDetTournamentInserter.h | 1 - eo/src/eoEasyEA.h | 150 +++++++--- eo/src/eoEvalFunc.h | 24 +- eo/src/eoEvalFuncPtr.h | 12 +- eo/src/eoEvolutionStrategy.h | 87 ++++++ eo/src/eoFitContinue.h | 58 ++++ eo/src/eoFixedLength.h | 14 +- eo/src/eoFunctor.h | 144 ++++++++++ eo/src/eoFunctorStore.cpp | 11 + eo/src/eoFunctorStore.h | 60 ++++ eo/src/eoGOpBreeder.h | 14 +- eo/src/eoGOpSelector.h | 2 +- eo/src/eoGenContinue.h | 78 ++++++ eo/src/eoIndiSelector.h | 68 ++--- eo/src/eoInit.h | 84 +++++- eo/src/eoInplaceTransform.h | 193 +++++++++++++ eo/src/eoInserter.h | 15 +- eo/src/eoMerge.h | 135 +++++---- eo/src/eoObject.h | 10 +- eo/src/eoOp.h | 170 +++--------- eo/src/eoPop.h | 192 ++++++++++--- eo/src/eoProportional.h | 73 +++++ eo/src/eoReduce.h | 58 ++++ eo/src/eoReplacement.h | 111 ++++++++ eo/src/eoSGA.h | 101 +++++++ eo/src/eoScalarFitness.h | 27 +- eo/src/eoSelect.h | 43 +++ eo/src/eoSelectOne.h | 49 ++++ eo/src/eoSelectPerc.h | 72 +++++ .../{eoUniformSelect.h => eoSelectRandom.h} | 35 +-- ...tialGOpSelector.h => eoSequentialGOpSel.h} | 31 +-- eo/src/eoSteadyStateEA.h | 29 +- eo/src/eoSteadyStateInserter.h | 6 +- ...eGeneration.h => eoSteadyStateTransform.h} | 35 ++- eo/src/eoStochTournament.h | 7 +- eo/src/eoStochTournamentInserter.h | 1 - eo/src/eoTransform.h | 41 +++ eo/src/eoVariableLength.h | 38 ++- eo/src/eoWrappedOps.h | 197 ++++++------- eo/src/es/Makefile.am | 5 +- eo/src/es/eoESFullMut.h | 253 ----------------- eo/src/es/eoEsChromInit.h | 9 +- eo/src/es/eoEsMutate.h | 14 +- eo/src/ga/eoBin.h | 27 +- eo/src/ga/eoBitOp.h | 95 +++---- eo/src/ga/eoBitOpFactory.h | 6 +- eo/src/gp/eoParseTree.h | 20 +- eo/src/gp/node_pool.h | 28 ++ eo/src/gp/parse_tree.h | 30 +- eo/src/{ => obsolete}/eo1d.h | 0 eo/src/{ => obsolete}/eo1dWDistance.h | 0 eo/src/{ => obsolete}/eo2d.h | 0 eo/src/{ => obsolete}/eo2dVector.h | 0 eo/src/{ => obsolete}/eoAtomBitFlip.h | 115 ++++---- eo/src/{ => obsolete}/eoAtomCreep.h | 0 eo/src/{ => obsolete}/eoAtomMutation.h | 0 eo/src/{ => obsolete}/eoAtomMutator.h | 34 +-- eo/src/{ => obsolete}/eoAtomRandom.h | 6 +- eo/src/obsolete/eoBin.h | 89 ++++++ eo/src/{ => obsolete}/eoBreeder.h | 14 +- .../eoDetTournamentIndiSelector.h | 0 eo/src/{ => obsolete}/eoDistance.h | 0 eo/src/{ => obsolete}/eoDup.h | 18 +- eo/src/obsolete/eoES.h | 164 +++++++++++ eo/src/{es => obsolete}/eoESChrom.h | 46 ++- eo/src/{es => obsolete}/eoESFullChrom.h | 18 +- eo/src/obsolete/eoESFullMut.h | 261 ++++++++++++++++++ eo/src/{ => obsolete}/eoEvalFuncPtrCnt.h | 0 eo/src/{ => obsolete}/eoFitTerm.h | 40 ++- eo/src/{ => obsolete}/eoFitness.h | 0 eo/src/{ => obsolete}/eoGenTerm.h | 27 +- eo/src/{ => obsolete}/eoGeneration.h | 5 +- eo/src/{ => obsolete}/eoID.h | 0 eo/src/{ => obsolete}/eoInclusion.h | 0 eo/src/{ => obsolete}/eoInsertion.h | 4 +- eo/src/{ => obsolete}/eoKill.h | 0 eo/src/{ => obsolete}/eoLottery.h | 5 +- eo/src/{ => obsolete}/eoMutation.h | 0 eo/src/{ => obsolete}/eoNegExp.h | 0 eo/src/{ => obsolete}/eoNonUniform.h | 0 eo/src/{ => obsolete}/eoNormal.h | 0 eo/src/{ => obsolete}/eoPopOps.h | 0 eo/src/{ => obsolete}/eoRandomBreed.h | 0 eo/src/{ => obsolete}/eoRandomIndiSelector.h | 0 eo/src/{ => obsolete}/eoRandomSelect.h | 0 eo/src/{ => obsolete}/eoRank.h | 36 +-- eo/src/{ => obsolete}/eoRnd.h | 0 eo/src/{ => obsolete}/eoScheme.h | 0 eo/src/{other => obsolete}/eoStringMutation.h | 5 +- eo/src/{ => obsolete}/eoTerm.h | 0 eo/src/{ => obsolete}/eoTournament.h | 0 eo/src/{ => obsolete}/eoTranspose.h | 97 +++---- eo/src/{ => obsolete}/eoUniform.h | 0 eo/src/{ => obsolete}/eoUniformXOver.h | 0 eo/src/{ => obsolete}/eoVector.h | 0 eo/src/{ => obsolete}/eoXOver2.h | 0 eo/src/other/eoExternalEO.h | 2 - eo/src/other/eoExternalOpFunctions.h | 91 +++--- eo/src/other/eoString.h | 92 +----- eo/src/utils/Makefile.am | 6 +- eo/src/utils/checkpointing | 1 + eo/src/utils/eoCheckPoint.h | 14 +- eo/src/utils/eoFileMonitor.cpp | 8 +- eo/src/utils/eoMonitor.h | 14 +- eo/src/utils/eoParam.h | 6 +- eo/src/utils/eoRNG.cpp | 2 + eo/src/utils/eoRNG.h | 59 +--- eo/src/utils/eoStat.h | 5 +- eo/src/utils/eoStdoutMonitor.cpp | 37 +++ eo/src/utils/eoStdoutMonitor.h | 49 ++++ eo/src/utils/eoUpdater.h | 18 +- eo/src/utils/rnd_generators.h | 48 +++- eo/test/Makefile.am | 122 +------- eo/test/real_value.h | 4 +- eo/test/t-eoBaseFunctions.cpp | 26 ++ eo/test/t-eoCheckpointing.cpp | 5 +- eo/test/t-eoESFull.cpp | 64 ++--- eo/test/t-eoExternalEO.cpp | 16 +- eo/test/t-eoFunctor.cpp | 53 ++++ eo/test/t-eoStateAndParser.cpp | 1 - eo/test/t-eobin.cpp | 87 ++++-- eo/test/t-eobreeder.cpp | 2 +- eo/test/t-eofitness.cpp | 156 +++-------- eo/win/eo.dsp | 4 + eo/win/eo_win.dsw | 15 + eo/win/esfull.dsp | 12 +- eo/win/t_eoFunctor.dsp | 104 +++++++ eo/win/t_eobin.dsp | 2 +- 141 files changed, 3933 insertions(+), 1811 deletions(-) create mode 100644 eo/src/apply.h create mode 100644 eo/src/eoBreed.h create mode 100644 eo/src/eoCombinedContinue.h rename eo/src/{other/eoExternalOpFunctions.cpp => eoContinue.h} (56%) create mode 100644 eo/src/eoCopyElite.h create mode 100644 eo/src/eoCounter.h create mode 100644 eo/src/eoEvolutionStrategy.h create mode 100644 eo/src/eoFitContinue.h create mode 100644 eo/src/eoFunctor.h create mode 100644 eo/src/eoFunctorStore.cpp create mode 100644 eo/src/eoFunctorStore.h create mode 100644 eo/src/eoGenContinue.h create mode 100644 eo/src/eoInplaceTransform.h create mode 100644 eo/src/eoProportional.h create mode 100644 eo/src/eoReduce.h create mode 100644 eo/src/eoReplacement.h create mode 100644 eo/src/eoSGA.h create mode 100644 eo/src/eoSelect.h create mode 100644 eo/src/eoSelectOne.h create mode 100644 eo/src/eoSelectPerc.h rename eo/src/{eoUniformSelect.h => eoSelectRandom.h} (64%) rename eo/src/{eoSequentialGOpSelector.h => eoSequentialGOpSel.h} (74%) rename eo/src/{eoSteadyStateGeneration.h => eoSteadyStateTransform.h} (77%) create mode 100644 eo/src/eoTransform.h delete mode 100644 eo/src/es/eoESFullMut.h rename eo/src/{ => obsolete}/eo1d.h (100%) rename eo/src/{ => obsolete}/eo1dWDistance.h (100%) rename eo/src/{ => obsolete}/eo2d.h (100%) rename eo/src/{ => obsolete}/eo2dVector.h (100%) rename eo/src/{ => obsolete}/eoAtomBitFlip.h (96%) rename eo/src/{ => obsolete}/eoAtomCreep.h (100%) rename eo/src/{ => obsolete}/eoAtomMutation.h (100%) rename eo/src/{ => obsolete}/eoAtomMutator.h (73%) rename eo/src/{ => obsolete}/eoAtomRandom.h (95%) create mode 100644 eo/src/obsolete/eoBin.h rename eo/src/{ => obsolete}/eoBreeder.h (92%) rename eo/src/{ => obsolete}/eoDetTournamentIndiSelector.h (100%) rename eo/src/{ => obsolete}/eoDistance.h (100%) rename eo/src/{ => obsolete}/eoDup.h (80%) create mode 100644 eo/src/obsolete/eoES.h rename eo/src/{es => obsolete}/eoESChrom.h (77%) rename eo/src/{es => obsolete}/eoESFullChrom.h (94%) create mode 100644 eo/src/obsolete/eoESFullMut.h rename eo/src/{ => obsolete}/eoEvalFuncPtrCnt.h (100%) rename eo/src/{ => obsolete}/eoFitTerm.h (59%) rename eo/src/{ => obsolete}/eoFitness.h (100%) rename eo/src/{ => obsolete}/eoGenTerm.h (76%) rename eo/src/{ => obsolete}/eoGeneration.h (96%) rename eo/src/{ => obsolete}/eoID.h (100%) rename eo/src/{ => obsolete}/eoInclusion.h (100%) rename eo/src/{ => obsolete}/eoInsertion.h (94%) rename eo/src/{ => obsolete}/eoKill.h (100%) rename eo/src/{ => obsolete}/eoLottery.h (94%) rename eo/src/{ => obsolete}/eoMutation.h (100%) rename eo/src/{ => obsolete}/eoNegExp.h (100%) rename eo/src/{ => obsolete}/eoNonUniform.h (100%) rename eo/src/{ => obsolete}/eoNormal.h (100%) rename eo/src/{ => obsolete}/eoPopOps.h (100%) rename eo/src/{ => obsolete}/eoRandomBreed.h (100%) rename eo/src/{ => obsolete}/eoRandomIndiSelector.h (100%) rename eo/src/{ => obsolete}/eoRandomSelect.h (100%) rename eo/src/{ => obsolete}/eoRank.h (83%) rename eo/src/{ => obsolete}/eoRnd.h (100%) rename eo/src/{ => obsolete}/eoScheme.h (100%) rename eo/src/{other => obsolete}/eoStringMutation.h (94%) rename eo/src/{ => obsolete}/eoTerm.h (100%) rename eo/src/{ => obsolete}/eoTournament.h (100%) rename eo/src/{ => obsolete}/eoTranspose.h (51%) rename eo/src/{ => obsolete}/eoUniform.h (100%) rename eo/src/{ => obsolete}/eoUniformXOver.h (100%) rename eo/src/{ => obsolete}/eoVector.h (100%) rename eo/src/{ => obsolete}/eoXOver2.h (100%) create mode 100644 eo/src/utils/eoStdoutMonitor.cpp create mode 100644 eo/src/utils/eoStdoutMonitor.h create mode 100644 eo/test/t-eoBaseFunctions.cpp create mode 100644 eo/test/t-eoFunctor.cpp create mode 100644 eo/win/t_eoFunctor.dsp diff --git a/eo/Makefile.am b/eo/Makefile.am index e1c123c03..af9864ab2 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -6,10 +6,9 @@ SUBDIRS = src test win doc #Directory for documents +DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user IDXDIR = ~/index -EXTRA_DIST=LICENSE - -docs: - doxygen doc/eo.cfg +EXTRA_DIST=LICENSE + diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index b5e7023cf..19e35db3f 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -179,7 +179,7 @@ INLINE_INFO = YES # alphabetically by member name. If set to NO the members will appear in # declaration order. -SORT_MEMBER_DOCS = YES +SORT_MEMBER_DOCS = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. @@ -214,7 +214,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = ../src/obsolete ../src/gp # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude diff --git a/eo/src/EO.h b/eo/src/EO.h index 626c662c9..05e394915 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -84,6 +84,7 @@ public: @return true if the fitness is higher */ bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness(); } + bool operator>(const EO& _eo2) const { return !(fitness() <= _eo2.fitness()); } /// Methods inherited from eoObject //@{ diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 14129385d..ffa36a768 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,10 +4,11 @@ ## ############################################################################### -SUBDIRS = es ga gp obsolete utils other +SUBDIRS = es ga utils other lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp +libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h eoDup.h eoKill.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 eoInit.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 +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCopyElite.h eoCounter.h eoDetTournament.h eoDetTournamentInserter.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportional.h eoProportionalGOpSel.h eoProportionalOpSel.h eoReduce.h eoReplacement.h eoSGA.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectOne.h eoSelectPerc.h eoSelectRandom.h eoSequentialGOpSel.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournament.h eoStochTournamentInserter.h eoTransform.h eoVariableLength.h eoWrappedOps.h + diff --git a/eo/src/apply.h b/eo/src/apply.h new file mode 100644 index 000000000..c0ad8a076 --- /dev/null +++ b/eo/src/apply.h @@ -0,0 +1,41 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoApply.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _apply_h +#define _apply_h + +#include +#include + +template +void apply(eoUnaryFunctor& _proc, std::vector& _pop) +{ + for (unsigned i = 0; i < _pop.size(); ++i) + { + _proc(_pop[i]); + } +} + +#endif \ No newline at end of file diff --git a/eo/src/eo b/eo/src/eo index 0e37aa9db..e269e9688 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -20,6 +20,11 @@ */ //----------------------------------------------------------------------------- +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + #ifndef _eo_ #define _eo_ @@ -29,68 +34,88 @@ #include #include #include -#include +#include #include -#include +#include +#include +#include -#include -#include +// eo's +#include +#include + +//#include + +//#include +//#include #include #include -#include -#include -#include -#include +#include +//#include +//#include +//#include #include -#include -#include -#include -#include -#include -#include +//#include +//#include +//#include +//#include +//#include +//#include #include -#include -#include #include // Evaluation functions #include #include -// Terminators -#include -#include -#include +// Continuators +#include +#include +#include +#include // Selection and reproduction stuff -#include +#include +#include #include +#include #include -#include -#include -#include -#include -#include #include +#include +#include + +//#include +//#include +//#include +//#include +//#include + +//#include // Algorithms #include +#include +#include +#include + +// Utils +#include // aliens -#include +//#include //----------------------------------------------------------------------------- // to be continued ... //----------------------------------------------------------------------------- /* -#include -#include +//#include +//#include */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoAlgo.h b/eo/src/eoAlgo.h index 87dcaad2c..ac9307a50 100644 --- a/eo/src/eoAlgo.h +++ b/eo/src/eoAlgo.h @@ -26,30 +26,18 @@ #define _EOALGO_H #include // for population +#include -/** This is a generic class for population-transforming algorithms. There +/** + This is a generic class for population-transforming algorithms. There is only one operator defined, which takes a population and does stuff to it. It needn't be a complete algorithm, can be also a step of an algorithm. This class just gives a common interface to linear population-transforming algorithms. - @author GeNeura Team - @version 0.0 */ template< class EOT > -class eoAlgo { -public: +class eoAlgo : public eoUnaryFunctor&> +{}; - /// Dtor - virtual ~eoAlgo() {}; - - /** Run the algorithm on a population. This operation is not constant, - because somebody would want to change stuff in the algorithm each - time it's applied. - * @param _pop is the population that the algorithm is acting on - */ - virtual void operator() ( eoPop& _pop ) = 0; - -}; - #endif diff --git a/eo/src/eoBreed.h b/eo/src/eoBreed.h new file mode 100644 index 000000000..e57f5d893 --- /dev/null +++ b/eo/src/eoBreed.h @@ -0,0 +1,69 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoBreed.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoBreed_h +#define _eoBreed_h + + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + +/** +eoBreed: breeding is thought of a combination of selecting and transforming +a population. For efficiency reasons you might want to build your own +eoBreed derived class rather than relying on a seperate select and transform +function. + + @see eoSelect, eoTransform, eoSelectTransform +*/ +template +class eoBreed : public eoBinaryFunctor&, eoPop&> +{}; + +/** +eoSelectTransform: special breeder that is just an application of an embedded select, +followed by an embedded transform +*/ +template +class eoSelectTransform : public eoBreed +{ + public: + eoSelectTransform(eoSelect& _select, eoTransform& _transform) : + select(_select), transform(_transform) + {} + + void operator()(const eoPop& _parents, eoPop& _offspring) + { + select(_parents, _offspring); + transform(_offspring); + } + + private : + eoSelect& select; + eoTransform& transform; +}; + +#endif diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h new file mode 100644 index 000000000..157ca3fa9 --- /dev/null +++ b/eo/src/eoCombinedContinue.h @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCombinedContinue.h +// (c) Maarten Keijzer, GeNeura Team, 1999, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCombinedContinue_h +#define _eoCombinedContinue_h + +#include + +/** +Fitness continuation: + + Continues until one of the embedded continuators says halt! +*/ +template< class EOT> +class eoCombinedContinue: public eoContinue { +public: + + /// Define Fitness + typedef typename EOT::Fitness FitnessType; + + /// Ctor + eoCombinedContinue( eoContinue& _arg1, eoContinue& _arg2) + : eoContinue (), arg1(_arg1), arg2(_arg2) {}; + + /** Returns false when one of the embedded continuators say so (logical and) + */ + virtual bool operator() ( const eoPop& _pop ) + { + return arg1(_pop) && arg2(_pop); + } + +private: + eoContinue& arg1; + eoContinue& arg2; +}; + +#endif + diff --git a/eo/src/other/eoExternalOpFunctions.cpp b/eo/src/eoContinue.h similarity index 56% rename from eo/src/other/eoExternalOpFunctions.cpp rename to eo/src/eoContinue.h index 80d59c61b..0576d5d91 100644 --- a/eo/src/other/eoExternalOpFunctions.cpp +++ b/eo/src/eoContinue.h @@ -1,13 +1,9 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ----------------------------------------------------------------------------- - eoExternalOpFunc.h - Defines eoExternalInitOpFunc, eoExternalMonOpFunc, eoExternalBinOpFunc, eoExternalQuadOpFunc - that are used to wrap a function pointer to externally defined initialization - and 'genetic' operators - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - +//----------------------------------------------------------------------------- +// eoContinue.h +// (c) Maarten Keijzer, Geneura Team, 1999, 2000 +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -24,20 +20,20 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ +//----------------------------------------------------------------------------- -#ifndef eoExternalOpFunc_h -#define eoExternalOpFunc_h +#ifndef _eoContinue_h +#define _eoContinue_h -#include -#include -#include +#include +#include -template -class eoExternalInitFunc -{ - -public : - -}; +/** Termination condition for the genetic algorithm + * Takes the population as input, returns true for continue, + * false for termination + */ +template< class EOT> +class eoContinue : public eoUnaryFunctor&> {}; #endif + diff --git a/eo/src/eoCopyElite.h b/eo/src/eoCopyElite.h new file mode 100644 index 000000000..cb27500b5 --- /dev/null +++ b/eo/src/eoCopyElite.h @@ -0,0 +1,110 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCopyElite.h +// Base class for elitist-merging classes +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoCopyElite_h +#define eoCopyElite_h + +//----------------------------------------------------------------------------- + +// EO includes +#include // eoPop +#include // eoCopyElite + +/** + * eoCopyElite: Base class for elitist replacement algorithms. + * Merges the old population (first argument), with the new generation + * + * Its signature is exactly + * that of the selection base eoSelect, but its purpose is to merge the + * two populations into one (the second argument). + * Note that the algorithms assume that the second argument denotes the + * next generation. +*/ + +template class eoCopyElite: public eoBinaryFunctor&, eoPop&> +{}; + +/** +Straightforward elitism class, specify the number of individuals to copy +into new geneneration +*/ +template class eoElitism : public eoCopyElite +{ + public : + eoElitism(unsigned _howmany) : howmany(_howmany) {} + + void operator()(const eoPop& _pop, eoPop& offspring) + { + if (howmany == 0) + return; + + if (howmany > _pop.size()) + throw logical_error("Elite larger than population"); + + vector result; + _pop.nth_element(howmany, result); + + for (int i = 0; i < result.size(); ++i) + { + offspring.push_back(*result[i]); + } + } + + private : + unsigned howmany; +}; + +/** +No elite +*/ +template class eoNoElitism : public eoElitism +{ + public : + eoNoElitism() : eoElitism(0) {} +} + +/** +Very elitist class, copies entire population into next gen +*/ +template class eoPlus : public eoCopyElite +{ + public : + void operator()(const eoPop& _pop, eoPop& offspring) + { + offspring.reserve(offspring.size() + _pop.size()); + + for (int i = 0; i < _pop.size(); ++i) + { + offspring.push_back(*result[i]); + } + } + + private : + unsigned howmany; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/eo/src/eoCounter.h b/eo/src/eoCounter.h new file mode 100644 index 000000000..ea82d3240 --- /dev/null +++ b/eo/src/eoCounter.h @@ -0,0 +1,219 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCounter.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCounter_h +#define _eoCounter_h + +#include +#include +#include + +/** + Generic counter class that counts the number of times + a procedure is used. Add a procedure through its ctor and + use this class instead of it. + + It is derived from eoValueParam so you can add it to a monitor. +*/ +template +class eoProcedureCounter : public Procedure, public eoValueParam +{ + public: + + eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter") + : proc(_proc), eoValueParam(0, _name) {} + + /** Calls the embedded function and increments the counter + + Note for MSVC users, if this code does not compile, you are quite + likely trying to count a function that has a non-void return type. + Don't look at us, look at the MSVC builders. Code like "return void;" + is perfectly legal according to the ANSI standard, but the guys at + Microsoft didn't get to implementing it yet. + + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. + Given that in EO most functors return void, it was chosen to support void. + + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + capable of compiling return void; type of code. We'll try to change the signature then. + + You happy GNU (and other compiler) users will not have a problem with this.. + */ + typename Procedure::result_type operator()(void) + { + value()++; +#ifdef _MSC_VER + proc(); +#else + return proc(); +#endif + } + + private : + + Procedure& proc; +}; + +/** + Generic counter class that counts the number of times + a unary function is used. Add a unary function through its ctor and + use this class instead of it. + + It is derived from eoValueParam so you can add it to a monitor. + + Example: suppose you have an eoEvalFunc called myeval, to count the + number of evaluations, just define: + + eoUnaryFunctorCounter evalCounter(myeval); + + and use evalCounter now instead of myeval. +*/ + +template +class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam +{ + public: + eoUnaryFunctorCounter(UnaryFunctor& _func, std::string _name = "uf_counter") + : func(_func), eoValueParam(0, _name) {} + + /** Calls the embedded function and increments the counter + + Note for MSVC users, if this code does not compile, you are quite + likely trying to count a function that has a non-void return type. + Don't look at us, look at the MSVC builders. Code like "return void;" + is perfectly legal according to the ANSI standard, but the guys at + Microsoft didn't get to implementing it yet. + + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. + Given that in EO most functors return void, it was chosen to support void. + + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + capable of compiling return void; type of code. We'll try to change the signature then. + + You happy GNU (and other compiler) users will not have a problem with this. + */ + typename UnaryFunctor::result_type operator() + (typename UnaryFunctor::first_argument_type _arg1) + { + value()++; +#ifdef _MSC_VER + func(_arg1); +#else + return func(_arg1); +#endif + } + + private : + + UnaryFunctor& func; +}; + +/** + Generic counter class that counts the number of times + a binary function is used. Add a binary function through its ctor and + use this class instead of it. + + It is derived from eoValueParam so you can add it to a monitor. + +*/ +template +class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam +{ + public: + eoBinaryFunctorCounter(BinaryFunctor& _func, std::string _name = "proc_counter") + : func(_func), eoValueParam(0, _name) {} + + /** Calls the embedded function and increments the counter + + Note for MSVC users, if this code does not compile, you are quite + likely trying to count a function that has a non-void return type. + Don't look at us, look at the MSVC builders. Code like "return void;" + is perfectly legal according to the ANSI standard, but the guys at + Microsoft didn't get to implementing it yet. + + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. + Given that in EO most functors return void, it was chosen to support void. + + + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + capable of compiling return void; type of code. We'll try to change the signature then. + + You happy GNU (and other compiler) users will not have a problem with this. + */ + typename BinaryFunctor::result_type operator() + (typename BinaryFunctor::first_argument_type _arg1, + typename BinaryFunctor::second_argument_type _arg2) + { + value()++; +#ifdef _MSC_VER + func(_arg1, _arg2); +#else + return func(_arg1, _arg2); +#endif + } + + private : + + BinaryFunctor& func; +}; + +/** make_counter: overloaded function to make a counter out of a function + + how it works... + + by using the xxx_function_tag structure defined in eoFunctionBase, you + can easily create a counter from a general class (say eoEval), by + simply stating: + + eoEval& myCounted = make_counter(functor_category(myEval), myEval, store) + + @see eoFunctorBase, functor_category, eoFunctorStore + +*/ +template +eoProcedureCounter& make_counter(eoFunctorBase::procedure_tag, Procedure& _proc, eoFunctorStore& store, std::string _name = "proc_counter") +{ + eoProcedureCounter* result = new eoProcedureCounter(_proc, _name); + store.add(result); + return *result; +} + +template +eoUnaryFunctorCounter& make_counter(eoFunctorBase::unary_function_tag, UnaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter") +{ + eoUnaryFunctorCounter* result = new eoUnaryFunctorCounter(_proc, _name); + store.add(result); + return *result; +} + +template +eoBinaryFunctorCounter& make_counter(eoFunctorBase::binary_function_tag, BinaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter") +{ + eoBinaryFunctorCounter* result = new eoBinaryFunctorCounter(_proc, _name); + store.add(result); + return *result; +} + +#endif \ No newline at end of file diff --git a/eo/src/eoDetTournament.h b/eo/src/eoDetTournament.h index 5af8bb8e4..e4697b7cc 100644 --- a/eo/src/eoDetTournament.h +++ b/eo/src/eoDetTournament.h @@ -30,8 +30,10 @@ #include // #include // accumulate -#include "eoPopOps.h" // eoPop eoSelect MINFLOAT -#include "utils/selectors.h" + +#include +#include +#include //----------------------------------------------------------------------------- /** eoDetTournament: a selection method that selects ONE individual by @@ -51,15 +53,11 @@ template class eoDetTournament: public eoSelectOne } } + /// Perform deterministic tournament virtual const EOT& operator()(const eoPop& pop) { return deterministic_tournament(pop, Tsize); } - - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoDetTournament";}; private: unsigned Tsize; diff --git a/eo/src/eoDetTournamentInserter.h b/eo/src/eoDetTournamentInserter.h index 845a7b381..95bd0b34a 100644 --- a/eo/src/eoDetTournamentInserter.h +++ b/eo/src/eoDetTournamentInserter.h @@ -57,7 +57,6 @@ public : EOT& eo = inverse_deterministic_tournament(pop(), t_size); eo = _eot; // overwrite loser of tournament - eo.invalidate(); // This line should probably be removed when all genetic operators do this themselves eval(eo); // Evaluate after insert return *this; } diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index ecd95c8e2..070452c0c 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -27,59 +27,139 @@ //----------------------------------------------------------------------------- -#include // eoPop -#include +#include +#include +#include +#include +#include +#include +#include +#include -/** EOEasyEA: +/** eoEasyEA: An easy-to-use evolutionary algorithm; you can use any chromosome, and any selection transformation, merging and evaluation algorithms; you can even change in runtime parameters of those sub-algorithms */ -template class eoEasyEA: public eoAlgo +template class eoEasyEA: public eoAlgo { public: - /// Constructor. - eoEasyEA(eoBinPopOp& _select, - eoMonPopOp& _transform, - eoBinPopOp& _replace, - eoEvalFunc& _evaluator, - eoTerm& _terminator) - :step(_select, _transform, _replace, _evaluator), - terminator( _terminator){}; - /// Constructor from an already created generation - eoEasyEA(eoGeneration& _gen, - eoTerm& _terminator): - step(_gen), - terminator( _terminator){}; - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - while ( terminator( pop ) ) { + /// Ctor taking a breed and merge. + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoBreed& _breed, + eoReplacement& _replace + ) : continuator(_continuator), + eval(_eval), + selectTransform(0), + breed(_breed), + mergeReduce(0), + replace(_replace) + {} + + /// Ctor eoBreed, eoMerge and eoReduce. + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoBreed& _breed, + eoMerge& _merge, + eoReduce& _reduce + ) : continuator(_continuator), + eval(_eval), + selectTransform(0), + breed(_breed), + mergeReduce(new eoMergeReduce(_merge, _reduce)), + replace(mergeReduce) + {} + + /// Ctor eoSelect, eoTransform, and eoReplacement + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoSelect& _select, + eoTransform& _transform, + eoReplacement& _replace + ) : continuator(_continuator), + eval(_eval), + selectTransform(new eoSelectTransform(_select, _transform)), + breed(selectTransform), + mergeReduce(0), + replace(_replace) + {} + + /// Ctor eoSelect, eoTransform, eoMerge and eoReduce. + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoSelect& _select, + eoTransform& _transform, + eoMerge& _merge, + eoReduce& _reduce + ) : continuator(_continuator), + eval(_eval), + selectTransform(new eoSelectTransform(_select, _transform)), + breed(*selectTransform), + mergeReduce(new eoMergeReduce(_merge, _reduce)), + replace(*mergeReduce) + {} + + + + + ~eoEasyEA() { delete selectTransform; delete mergeReduce; } + + /// Apply a few generation of evolution to the population. + virtual void operator()(eoPop& _pop) + { + eoPop offspring; + + while ( continuator( _pop ) ) + { try - { - step(pop); - } + { + breed(_pop, offspring); + + apply(eval, offspring); + + replace(_pop, offspring); + + if (offspring.size() < _pop.size()) + throw runtime_error("Population shrinking!"); + else if (offspring.size() > _pop.size()) + throw runtime_error("Population growing!"); + + _pop.swap(offspring); + + } catch (exception& e) - { - string s = e.what(); - s.append( " in eoEasyEA "); - throw runtime_error( s ); - } + { + string s = e.what(); + s.append( " in eoSelectTransformReduce "); + throw runtime_error( s ); + } } // while } - /// Class name. - string className() const { return "eoEasyEA"; } - private: - eoGeneration step; - eoTerm& terminator; + + /// dissallow copying cuz of pointer stuff + eoEasyEA(const eoEasyEA&); + /// dissallow copying cuz of pointer stuff + const eoEasyEA& operator=(const eoEasyEA&); + + eoContinue& continuator; + eoEvalFunc& eval; + eoSelectTransform* selectTransform; + eoBreed& breed; + eoMergeReduce* mergeReduce; + eoReplacement& replace; }; //----------------------------------------------------------------------------- -#endif eoEasyEA_h +#endif eoSelectTransformReduce_h diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 0f90532b5..0b1744266 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -25,6 +25,8 @@ #ifndef eoEvalFunc_H #define eoEvalFunc_H +#include + /** Evaluate: takes one EO and sets its "fitness" property * returning this fitness also. That is why EOT is passed by * non-const reference: it must be altered within evaluate.\\ @@ -35,25 +37,11 @@ on it. If you subclass this abstract class, and use it to evaluate an EO, the requirements on this EO will depend on the evaluator. */ -template struct eoEvalFunc { -#ifdef _MSC_VER - typedef EOT::Fitness EOFitT; -#else +template class eoEvalFunc : public eoUnaryFunctor +{ + public : typedef typename EOT::Fitness EOFitT; -#endif - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const = 0; - - template - void range(It begin, It end) const - { - for (;begin != end; ++begin) - { - operator()(*begin); - } - } }; -#endif +#endif \ No newline at end of file diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index 04cd6de83..8c28a721d 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -35,7 +35,7 @@ * function class. That way, old style C or C++ functions can be adapted to EO * function classes. */ -template< class EOT > +template< class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT& > struct eoEvalFuncPtr: public eoEvalFunc { /** Applies the function to the chromosome and sets the fitness of the @@ -44,16 +44,18 @@ struct eoEvalFuncPtr: public eoEvalFunc { argument and returns the fitness @return the evaluated fitness for that object. */ - eoEvalFuncPtr( EOFitT (* _eval)( const EOT& ) ) + eoEvalFuncPtr( FitT (* _eval)( FunctionArg ) ) : eoEvalFunc(), evalFunc( _eval ) {}; /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const { - _eo.fitness((*evalFunc)( _eo )); + virtual void operator() ( EOT & _eo ) + { + if (_eo.invalid()) + _eo.fitness((*evalFunc)( _eo )); }; private: - EOFitT (* evalFunc )( const EOT& ); + FitT (* evalFunc )( FunctionArg ); }; #endif diff --git a/eo/src/eoEvolutionStrategy.h b/eo/src/eoEvolutionStrategy.h new file mode 100644 index 000000000..08309deae --- /dev/null +++ b/eo/src/eoEvolutionStrategy.h @@ -0,0 +1,87 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvolutionStrategy.h +// (c) Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEvolutionStrategy_h +#define _eoEvolutionStrategy_h + +//----------------------------------------------------------------------------- + +#include +#include +/** eoEvolutionStrategy: +*/ + +template +class eoEvolutionStrategy: public eoAlgo +{ + public: + struct plus_strategy{}; + struct comma_strategy{}; + + eoEvolutionStrategy( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + comma_strategy) + : selectPerc(randomSelect, _lambdaRate), + transform(_opSel), + easyEA(_continuator, _eval, selectPerc, transform, noElitism, truncate) + {} + + eoEvolutionStrategy( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + plus_strategy) + : selectPerc(randomSelect, _lambdaRate), + transform(_opSel), + easyEA(_continuator, _eval, selectPerc, transform, plus, truncate) + {} + + + /// Apply a few generation of evolution to the population. + virtual void operator()(eoPop& _pop) + { + easyEA(_pop); + } + + private: + + eoPlus plus; + eoNoElitism noElitism; + eoTruncate truncate; + eoSelectRandom randomSelect; + eoSelectPerc selectPerc; + eoInplaceTransform2 transform; + + /// easyEA is contained rather than a base because of member initialization order! + eoEasyEA easyEA; +}; + +//----------------------------------------------------------------------------- + +#endif eoSelectTransformReduce_h + diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h new file mode 100644 index 000000000..42d7ae5e1 --- /dev/null +++ b/eo/src/eoFitContinue.h @@ -0,0 +1,58 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFitContinue.h +// (c) Maarten Keijzer, GeNeura Team, 1999, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFitContinue_h +#define _eoFitContinue_h + +#include + +/** +Fitness continuation: + + Continues until the maximum fitness level is reached. +*/ +template< class EOT> +class eoFitContinue: public eoContinue { +public: + + /// Define Fitness + typedef typename EOT::Fitness FitnessType; + + /// Ctor + eoFitContinue( const FitnessType _maximum) + : eoContinue (), maximum( _maximum ) {}; + + /** Returns false when a fitness criterium is + * reached. Assumes pop is not sorted! */ + virtual bool operator() ( const eoPop& _pop ) + { + return (_pop.nth_element_fitness(0) < maximum); + } + +private: + FitnessType maximum; +}; + +#endif + diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index da570e7d3..17073952a 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -28,7 +28,7 @@ #define _eoFixedLength_h #include - +#include /** Base class for fixed length chromosomes, just derives from EO and vector and @@ -40,7 +40,11 @@ class eoFixedLength : public EO, public std::vector { public : - typedef GeneType Type; + typedef GeneType AtomType; + typedef std::vector ContainerType; + + eoFixedLength(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) + {} /// to avoid conflicts between EO::operator< and vector::operator< bool operator<(const eoFixedLength& _eo) const @@ -71,7 +75,11 @@ class eoFixedLength : public EO, public std::vector unsigned i; for (i = 0; i < sz; ++i) - is >> operator[](i); + { + AtomType atom; + is >> atom; + operator[](i) = atom; + } } }; diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h new file mode 100644 index 000000000..41125f2f1 --- /dev/null +++ b/eo/src/eoFunctor.h @@ -0,0 +1,144 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFunctor.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFunctor_h +#define _eoFunctor_h + +/// Base class for functors to get a nice hierarchy diagram +class eoFunctorBase +{ +public : + virtual ~eoFunctorBase() {} + + /// tag to identify a procedure in compile time function selection @see functor_category + struct procedure_tag {}; + /// tag to identify a unary function in compile time function selection @see functor_category + struct unary_function_tag {}; + /// tag to identify a binary function in compile time function selection @see functor_category + struct binary_function_tag {}; +}; + +/** + Basic Procedure. Derive from this class when defining + any procedure. It defines a result_type that can be used + to determine the return type + Argument and result types can be any type including void for + result_type +**/ +template +class eoProcedure : public eoFunctorBase +{ +public : + + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoProcedure() {} + + typedef R result_type; + + /// The pure virtual function that needs to be implemented by the subclass + virtual R operator()() = 0; +}; + +/** + Overloaded function that can help in the compile time detection + of the type of functor we are dealing with + + @see eoCounter, make_counter +*/ +template +eoFunctorBase::procedure_tag functor_category(const eoProcedure&) +{ + return eoFunctorBase::procedure_tag(); +} + +/** + Basic Unary Functor. Derive from this class when defining + any unary function. First template argument is result_type, second + is first_argument_type. + Argument and result types can be any type including void for + result_type +**/ +template +class eoUnaryFunctor : public eoFunctorBase +{ +public : + + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoUnaryFunctor() {} + + typedef R result_type; + typedef A1 first_argument_type; + + /// The pure virtual function that needs to be implemented by the subclass + virtual R operator()(A1) = 0; +}; + +/** + Overloaded function that can help in the compile time detection + of the type of functor we are dealing with + @see eoCounter, make_counter +*/ +template +eoFunctorBase::unary_function_tag functor_category(const eoUnaryFunctor&) +{ + return eoFunctorBase::unary_function_tag(); +} + + +/** + Basic Binary Functor. Derive from this class when defining + any binary function. First template argument is result_type, second + is first_argument_type, third is second_argument_type. + Argument and result types can be any type including void for + result_type +**/ +template +class eoBinaryFunctor : public eoFunctorBase +{ +public : + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoBinaryFunctor() {} + + typedef R result_type; + typedef A1 first_argument_type; + typedef A2 second_argument_type; + + /// The pure virtual function that needs to be implemented by the subclass + virtual R operator()(A1, A2) = 0; +}; + +/** + Overloaded function that can help in the compile time detection + of the type of functor we are dealing with + @see eoCounter, make_counter +*/ +template +eoFunctorBase::binary_function_tag functor_category(const eoBinaryFunctor&) +{ + return eoFunctorBase::binary_function_tag(); +} + + +#endif \ No newline at end of file diff --git a/eo/src/eoFunctorStore.cpp b/eo/src/eoFunctorStore.cpp new file mode 100644 index 000000000..4c118236c --- /dev/null +++ b/eo/src/eoFunctorStore.cpp @@ -0,0 +1,11 @@ +#include +#include + +/// clears the memory +eoFunctorStore::~eoFunctorStore() +{ + for (int i = 0; i < vec.size(); ++i) + { + delete vec[i]; + } +} diff --git a/eo/src/eoFunctorStore.h b/eo/src/eoFunctorStore.h new file mode 100644 index 000000000..5f591e99f --- /dev/null +++ b/eo/src/eoFunctorStore.h @@ -0,0 +1,60 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFunctorStore.h +// (c) Maarten Keijzer 2000, GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFunctorStore_h +#define _eoFunctorStore_h + +#include + +class eoFunctorBase; + +/** +eoFunctorStore is a class that stores functors that are allocated on the +heap. This class can be used in factories to store allocated memory for +dynamically created functors. +*/ +class eoFunctorStore +{ + public : + + eoFunctorStore() {} + + ~eoFunctorStore(); + + /// Add an eoFunctorBase to the store + void add(eoFunctorBase* r) { vec.push_back(r); } + + private : + + /// no copying allowed + eoFunctorStore(const eoFunctorStore&); + + /// no copying allowed + eoFunctorStore operator=(const eoFunctorStore&); + std::vector vec; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index e48037404..913d4a5ff 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -12,13 +12,14 @@ * For every operator there is a rated to be applyed. * *****************************************************************************/ -#include "eoPopOps.h" -#include "eoGOpSelector.h" -#include "eoIndiSelector.h" -#include "eoBackInserter.h" +#include +#include +#include +#include +#include template -class eoGOpBreeder: public eoMonPopOp +class eoGOpBreeder: public eoUnaryFunctor&> { public: /// Default constructor. @@ -27,9 +28,6 @@ class eoGOpBreeder: public eoMonPopOp : opSel( _opSel ), selector(_selector) {} - /// Destructor. - virtual ~eoGOpBreeder() {} - /** * Enlarges the population. * @param pop The population to be transformed. diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index 06dafc96f..c47cadd20 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -124,7 +124,7 @@ inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, // and keep it on a list to delete them afterwards // will use auto_ptr when they're readily available - switch(_op.getType()) + switch(_op.getType()) { case eoOp::unary : op= new eoWrappedMonOp(static_cast&>(_op)); diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h new file mode 100644 index 000000000..a546702d0 --- /dev/null +++ b/eo/src/eoGenContinue.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenContinue.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenContinue_h +#define _eoGenContinue_h + +#include + +/** + Generational continuator: continues until a number of generations is reached +*/ +template< class EOT> +class eoGenContinue: public eoContinue +{ +public: + + /// Ctor for setting a + eoGenContinue( unsigned _totalGens) + : repTotalGenerations( _totalGens ), + thisGenerationPlaceHolder(0), + thisGeneration(thisGenerationPlaceHolder){}; + + /// Ctor for enabling the save/load the no. of generations counted + eoGenContinue( unsigned _totalGens, unsigned& _currentGen) + : repTotalGenerations( _totalGens ), + thisGenerationPlaceHolder(0), + thisGeneration(_currentGen){}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + // cout << " [" << thisGeneration << "] "; + return (thisGeneration < repTotalGenerations) ; // for the postincrement + } + + /** Sets the number of generations to reach + and sets the current generation to 0 (the begin)*/ + virtual void totalGenerations( unsigned _tg ) { + repTotalGenerations = _tg; + thisGeneration = 0; + }; + + /** Returns the number of generations to reach*/ + virtual unsigned totalGenerations( ) + { + return repTotalGenerations; + }; + +private: + unsigned repTotalGenerations; + unsigned thisGenerationPlaceHolder; + unsigned& thisGeneration; +}; + +#endif + diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index 26ffe476e..0d96514d0 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -30,11 +30,18 @@ #ifndef eoIndiSelector_h #define eoIndiSelector_h +#include + /** - * eoIndividualSelector: This class defines the interface + * eoIndividualSelector: This class defines the interface. This + * interface is used by the eoGeneralOp to get new individuals + * from a pop, a subpop or a remote pop + * for convenience when implementing an nary operator a size() and operator[] + * need to be implemented. */ + template -class eoIndiSelector +class eoIndiSelector : public eoProcedure { public : @@ -51,48 +58,37 @@ public : return the specified individual, the size_t argument should be between 0 and eoIndiSelector::size() */ virtual const EOT& operator[](size_t i) const = 0; - - /** - Select an individual, maybe from an underlying population (see eoPopIndiSelector) - */ - virtual const EOT& operator()(void) = 0; - - /// default implementation just calls operator() a couple of times - /// this can be overridden in favour of a more efficient implementation - virtual vector select(size_t _how_many) - { vector result(_how_many); - - for (unsigned i = 0; i < _how_many; ++i) - { - result[i] = &operator()(); - } - - return result; - } }; + +#include + /** - * eoPopIndiSelector: Intermediate class for dispensing populations + * eoSelectOneAdaptor: Adaptor class for dispensing individuals. + + It produces the eoIndiSelector interface and an eoSelectOne implementation + This class can then be used for general operators + various useful things can be done with this class: you can specify how many of the population can ever be dispensed to the operators, but you can also specify a preference to the first guy being dispensed. This is useful if you want to perform the operator on a specific individual. + + @see eoSelectOne, eoIndiSelector */ template -class eoPopIndiSelector : public eoIndiSelector +class eoSelectOneIndiSelector : public eoIndiSelector { public : - eoPopIndiSelector(void) : eoIndiSelector(), pop(0), last(0), firstChoice(-1), secondChoice(-1) {} - - virtual ~eoPopIndiSelector(void) {} - + eoSelectOneIndiSelector(eoSelectOne& _select) : pop(0), last(0), firstChoice(-1), secondChoice(-1), select(_select) {} + struct eoUnitializedException{}; /** Initialization function, binds the population to the selector, can also be used to specify an optional end */ - eoPopIndiSelector& bind(const eoPop& _pop, int _end = -1) + eoSelectOneIndiSelector& bind(const eoPop& _pop, int _end = -1) { pop = &_pop; last = _end; @@ -101,6 +97,8 @@ class eoPopIndiSelector : public eoIndiSelector { last = pop->size(); } + + select.setup(*pop); return *this; } @@ -108,7 +106,7 @@ class eoPopIndiSelector : public eoIndiSelector /** Bias function to bias the selection function to select specific individuals first before applying a selection algorithm defined in derived classes */ - eoPopIndiSelector& bias(int _first, int _second = -1) + eoSelectOneIndiSelector& bias(int _first, int _second = -1) { firstChoice = _first; secondChoice = _second; @@ -122,17 +120,16 @@ class eoPopIndiSelector : public eoIndiSelector eoPop::const_iterator begin(void) const { valid(); return pop->begin(); } eoPop::const_iterator end(void) const { valid(); return pop->end(); } - /// operator() does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes const EOT& operator()(void) { valid(); - if (firstChoice < 0 || firstChoice >= (int) size()) + if (firstChoice < 0 || firstChoice >= last) { // see if we have a second choice - if (secondChoice < 0 || secondChoice >= (int) size()) + if (secondChoice < 0 || secondChoice >= last) { - return do_select(); // let the child figure out what to do + return select(*pop); // let the embedded selector figure out what to do } const EOT& result = pop->operator[](secondChoice); @@ -145,12 +142,6 @@ class eoPopIndiSelector : public eoIndiSelector return result; } - /** - do_select, abstract member re-implemented by derived classes - This function will get called by operator() when it ran out of choices - */ - virtual const EOT& do_select(void) = 0; - private : void valid(void) const @@ -163,6 +154,7 @@ class eoPopIndiSelector : public eoIndiSelector int last; int firstChoice; int secondChoice; + eoSelectOne& select; }; #endif diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 48568a13b..b6372299d 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -27,17 +27,91 @@ #ifndef _eoInit_H #define _eoInit_H +#include + /** - Base class for Initialization of chromosomes, used in a population - contructor + Base (name) class for Initialization of chromosomes, used in a population + contructor. It is derived from eoMonOp, so it can be used + inside the algorithm as well. @see eoPop */ + template -class eoInit +class eoInit : public eoUnaryFunctor +{}; + +/** + Initializor for fixed length representations with a single type +*/ +template +class eoInitFixedLength: public eoInit { -public : - virtual EOT operator()(void) = 0; + public: + eoInitFixedLength(unsigned _howmany, Gen _generator = Gen()) + : howmany(_howmany), generator(_generator) {} + + void operator()(EOT& chrom) + { + chrom.resize(howmany); + generate(chrom.begin(), chrom.end(), generator); + chrom.invalidate(); + } + + private : + unsigned howmany; + Gen generator; +}; + +/** + Initializor for variable length representations with a single type +*/ +template +class eoInitVariableLength: public eoInit +{ + public: + eoInitVariableLength(unsigned _minSize, unsigned _maxSize, Gen _generator = Gen()) + : offset(_minSize), extent(_maxSize - _minSize), generator(_generator) + { + if (_minSize >= _maxSize) + throw logical_error("eoInitVariableLength: minSize larger or equal to maxSize"); + } + + void operator()(EOT& chrom) + { + unsigned howmany = offset + rng.random(extent); + chrom.resize(howmany); + generate(chrom.begin(), chrom.end(), generator); + chrom.invalidate(); + } + + private : + unsigned offset; + unsigned extent; + Gen generator; +}; + + +/** + eoInitAdaptor changes the place in the hierarchy + from eoInit to eoMonOp. This is mainly a type conversion, + nothing else + . + @see eoInit, eoMonOp +*/ +template +class eoInitAdaptor : public eoMonOp +{ + public : + eoInitAdaptor(eoInit& _init) : init(_init) {} + + void operator()(EOT& _eot) + { + init(_eot); + } + private : + + eoInit& init; }; #endif \ No newline at end of file diff --git a/eo/src/eoInplaceTransform.h b/eo/src/eoInplaceTransform.h new file mode 100644 index 000000000..f1462408c --- /dev/null +++ b/eo/src/eoInplaceTransform.h @@ -0,0 +1,193 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInplaceTransform.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoInplaceTransform_h +#define eoInplaceTransform_h + +//----------------------------------------------------------------------------- + +#include // vector +#include +#include // eoOp, eoMonOp, eoBinOp +#include // eoPop +#include // eoOpSelector +#include +#include +#include + +/***************************************************************************** + * eoInplaceTransform1: transforms a population using genetic operators. * + * It does it in an SGA like manner + *****************************************************************************/ +template class eoInplaceTransform1 : public eoTransform +{ + public: + + /// Default constructor. + eoInplaceTransform1( eoOpSelector& _opSel): opSel( _opSel ), select(defaultSelect) {} + eoInplaceTransform1( eoOpSelector& _opSel, eoSelectOne& _select) + : opSel(_opSel), select(_select) {} + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + // copy the guys in a newpop + // because otherwise eoSelectRandom might select freshly created individuals + eoPop newpop; + newpop.reserve(pop.size()); + + // Set up general op helper classes + eoSelectOneIndiSelector inplace(select); + eoBackInserter inserter; + + // set up selection routine + select.setup(pop); + + for (unsigned i = 0; i < pop.size(); i++) + { + eoOp* op = opSel.Op(); + + switch (op->getType()) + { + case eoOp::unary: + { + eoMonOp* monop = static_cast* >(op); + newpop.push_back(pop[i]); + (*monop)( newpop.back() ); + break; + } + case eoOp::binary: + { + eoBinOp* binop = static_cast* >(op); + newpop.push_back(pop[i]); + (*binop)(newpop[i], select(pop)); + break; + } + case eoOp::quadratic: + { + + eoQuadraticOp* Qop = static_cast* >(op); + + newpop.push_back(pop[i]); + Chrom& indy1 = newpop.back(); + + if (++i == pop.size()) + newpop.push_back(select(pop)); + else + newpop.push_back(pop[i]); + + (*Qop)(indy1, newpop.back() ); + break; + } + case eoOp::general : + { + eoGeneralOp* Gop = static_cast* >(op); + + inplace.bind(pop); + inplace.bias(i,i + 1); + + inserter.bind(newpop); + unsigned orgsize = newpop.size(); + (*Gop)(inplace, inserter); + unsigned diff = newpop.size() - orgsize; + i = i + (diff-1); + break; + } + } + pop.swap(newpop); // overwrite existing pop + } + }; + + private: + eoOpSelector& opSel; + eoSelectRandom defaultSelect; + eoSelectOne& select; + +}; + +#include + +/***************************************************************************** + * eoInplaceTransform2: transforms a population using general genetic operators. * + * It does it in an SGA like manner + *****************************************************************************/ +template class eoInplaceTransform2 : public eoTransform +{ + public: + + /// Default constructor. + eoInplaceTransform2( eoGOpSelector& _opSel): opSel( _opSel ), select(defaultSelect) {} + eoInplaceTransform2( eoGOpSelector& _opSel, eoSelectOne& _select) + : opSel(_opSel), select(_select) {} + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& pop) + { + // copy the guys in a newpop + // because otherwise eoSelectRandom might select freshly created individuals + eoPop newpop; + newpop.reserve(pop.size()); + + // Set up general op helper classes + eoSelectOneIndiSelector inplace(select); + eoBackInserter inserter; + + // set up selection routine + select.setup(pop); + + for (unsigned i = 0; i < pop.size(); i++) + { + eoGeneralOp& Gop = opSel.selectOp(); + + inplace.bind(pop); + inplace.bias(i,i + 1); + + inserter.bind(newpop); + unsigned orgsize = newpop.size(); + Gop(inplace, inserter); + + // see how many have been inserted and add that to i (minus one ofcourse) + unsigned diff = newpop.size() - orgsize; + i = i + (diff-1); + } + + pop.swap(newpop); // overwrite existing pop + } + + private: + eoGOpSelector& opSel; + eoSelectRandom defaultSelect; + eoSelectOne& select; + +}; + + +//----------------------------------------------------------------------------- + +#endif eoBreeder_h + diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h index d2758bea2..e49057cf6 100644 --- a/eo/src/eoInserter.h +++ b/eo/src/eoInserter.h @@ -30,23 +30,20 @@ #ifndef eoInserter_h #define eoInserter_h -#include "eoPop.h" -/** +#include +#include + + /** * eoInserter: Interface class that enables an operator to insert - new individuals into the (intermediate) population. + new individuals into the (intermediate) population for example. */ template -class eoInserter +class eoInserter : public eoUnaryFunctor&, const EOT&> { public : virtual ~eoInserter() {} struct eoInserterException{}; - - /** - insert argument somewhere (quite likely a population) - */ - virtual eoInserter& operator()(const EOT&) = 0; // can throw an eoInserterException }; /** diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 82cf0768e..2a0c30b83 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoMerge.h -// Base class for population-merging classes +// Base class for elitist-merging classes // (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or @@ -28,88 +28,85 @@ //----------------------------------------------------------------------------- -#include +#include // EO includes #include // eoPop -#include // eoMerge +#include // eoMerge /** - * eoMerge: Base class for replacement algorithms - */ + * eoMerge: Base class for elitist replacement algorithms. + * Merges the old population (first argument), with the new generation + * + * Its signature is exactly + * that of the selection base eoSelect, but its purpose is to merge the + * two populations into one (the second argument). + * Note that the algorithms assume that the second argument denotes the + * next generation. +*/ -template class eoMerge: public eoBinPopOp +template class eoMerge: public eoBinaryFunctor&, eoPop&> +{}; + +/** +Straightforward elitism class, specify the number of individuals to copy +into new geneneration +*/ +template class eoElitism : public eoMerge { - public: - /// (Default) Constructor. - eoMerge(const float& _rate = 1.0): eoBinPopOp(), repRate( _rate ) {} + public : + eoElitism(unsigned _howmany) : howmany(_howmany) {} - /// Ctor from istream - eoMerge( istream& _is): eoBinPopOp() { readFrom( _is ); }; - - /** - * Creates a new population based on breeders and original populations. - * @param breeders The population of breeders. Should be sorted to work correctly - * @param pop The original population. - */ - void operator()( eoPop& _breeders, eoPop& _pop) - { - unsigned target = static_cast(_pop.size() * rate()); - - _pop.swap(_breeders); - - if (target < _pop.size()) - { - partial_sort(_pop.begin(), _pop.begin() + target, _pop.end(), - greater()); - _pop.erase(_pop.begin() + target, _pop.end()); - } - else - { - target = min(target - _pop.size(), _breeders.size()); - partial_sort(_breeders.begin(), _breeders.begin() + target, - _breeders.end(), greater()); - copy(_breeders.begin(), _breeders.begin() + target, - back_insert_iterator >(_pop)); - } - }; + void operator()(const eoPop& _pop, eoPop& offspring) + { + if (howmany == 0) + return; - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ - virtual void readFrom(istream& _is) { - _is >> repRate; - } - - /** - * Write object. Prints relevant parameters to standard output - * @param _os A ostream. In this case, prints the population to - standard output. The EOT class must hav standard output with cout, - but since it should be an eoObject anyways, it's no big deal. - */ - virtual void printOn(ostream& _os) const { - _os << repRate; - }; + if (howmany > _pop.size()) + throw std::logic_error("Elite larger than population"); - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual string className() const {return "eoMerge";}; - //@} + vector result; + _pop.nth_element(howmany, result); - protected: - float rate() { return repRate;}; + for (int i = 0; i < result.size(); ++i) + { + offspring.push_back(*result[i]); + } + } - private: - float repRate; + private : + unsigned howmany; +}; +/** +No elite +*/ +template class eoNoElitism : public eoElitism +{ + public : + eoNoElitism() : eoElitism(0) {} +}; + +/** +Very elitist class, copies entire population into next gen +*/ +template class eoPlus : public eoMerge +{ + public : + void operator()(const eoPop& _pop, eoPop& offspring) + { + offspring.reserve(offspring.size() + _pop.size()); + + for (int i = 0; i < _pop.size(); ++i) + { + offspring.push_back(_pop[i]); + } + } + + private : + unsigned howmany; }; //----------------------------------------------------------------------------- -#endif eoInsertion_h +#endif diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index b3630de76..544e82517 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -39,9 +39,11 @@ using namespace std; // eoObject //----------------------------------------------------------------------------- /** -This is the base class for the whole hierarchy; an eoObject defines -basically an interface for the whole hierarchy: each object should -know its name (#className#). Previously, this object defined a print and read +eoObject used to be the base class for the whole hierarchy, but this has +changed. eoObject is used to define a name (#className#) +that is used when loading or saving the state. + +Previously, this object also defined a print and read interface, but it´s been moved to eoPrintable and eoPersistent. It is recommended that you only derive from eoObject in concrete classes. @@ -49,7 +51,7 @@ Some parts of EO do not implement this yet, but that will change in the future. eoObject, together with eoPersistent and eoPrintable provide a simple persistence framework that is only needed when the classes have state that changes at runtime. - @see eoPersistent eoPrintable + @see eoPersistent eoPrintable, eoState */ class eoObject diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 6d4b147c3..d9f0bffff 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -26,6 +26,7 @@ #include #include +#include /** \defgroup operators @@ -47,13 +48,13 @@ What is a genetic algorithm without genetic operators? There is a genetic operat * instantiate them should be an eoObject, but in any case, they are * type-specific; each kind of evolvable object can have its own operators */ - template -class eoOp: public eoObject, public eoPrintable { +class eoOp +{ public: //@{ - enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; + enum OpType { init = 0, unary = 1, binary = 2, quadratic = 3, general = 4}; /// /// Ctor @@ -70,147 +71,48 @@ public: /// getType: number of operands it takes and individuals it produces OpType getType() const {return opType;}; - /** @name Methods from eoObject */ - - //@{ - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. - */ - virtual void printOn(ostream& _os) const { - _os << className(); - // _os << arity; - }; - - /** Inherited from eoObject - @see eoObject - */ - - virtual string className() const {return "eoOp";}; - //@} - private: /// OpType is the type of the operator: how many operands it takes and how many it produces - OpType opType; }; - - -/** Binary genetic operator: subclasses eoOp, and defines basically the - * operator() with two operands - */ - -template - -class eoBinOp: public eoOp { +/** eoMonOp is the monary operator: genetic operator that takes only one EO */ +template +class eoMonOp: public eoOp, public eoUnaryFunctor +{ public: /// Ctor - eoBinOp() - :eoOp( binary ) {}; - - /// Copy Ctor - eoBinOp( const eoBinOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoBinOp () {}; - - /** applies operator, to the object. Modifies only the first operand. - */ - virtual void operator()( EOType& _eo1, const EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoBinOp";}; - - //@} + eoMonOp() + : eoOp( eoOp::unary ) {}; }; +/** Binary genetic operator: subclasses eoOp, and defines basically the + * operator() with two operands, only the first one can be modified + */ +template +class eoBinOp: public eoOp, public eoBinaryFunctor +{ +public: + /// Ctor + eoBinOp() + :eoOp( eoOp::binary ) {}; +}; /** Quadratic genetic operator: subclasses eoOp, and defines basically the - operator() with two operands + operator() with two operands, both can be modified. */ template - -class eoQuadraticOp: public eoOp { +class eoQuadraticOp: public eoOp, public eoBinaryFunctor { public: /// Ctor eoQuadraticOp() :eoOp( eoOp::quadratic ) {}; - - /// Copy Ctor - eoQuadraticOp( const eoQuadraticOp& _ebop ) - : eoOp( _ebop ){}; - - /// Dtor - ~eoQuadraticOp() {}; - - /** applies operator, to the object. Modifies both operands. - */ - virtual void operator()( EOType& _eo1, EOType& _eo2 ) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - - //@{ - /** Inherited from eoObject - @see eoObject - - */ - virtual string className() const {return "eoBinOp";}; - - //@} }; - -/** eoMonOp is the monary operator: genetic operator that takes only one EO */ - -template - -class eoMonOp: public eoOp { -public: - /// Ctor - eoMonOp( ) - : eoOp( eoOp::unary ) {}; - - /// Copy Ctor - eoMonOp( const eoMonOp& _emop ) - : eoOp( _emop ){}; - - /// Dtor - ~eoMonOp() {}; - - /** applies randomly operator, to the object. If arity is more than 1, - * keeps a copy of the operand in a cache. - */ - virtual void operator()( EOType& _eo1) const = 0; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoMonOp";}; - //@} -}; - - - // some forward declarations template @@ -226,30 +128,22 @@ class eoInserter; /** * eGeneralOp: General genetic operator; for objects used to transform sets * of EOs. Nary ("orgy") operators should be derived from this class - */ -template - -class eoGeneralOp: public eoOp -{ -public: - /// Ctor that honors its superclass - eoGeneralOp(): eoOp( eoOp::general ) {} - - /// Virtual dtor - virtual ~eoGeneralOp () {} - - /** Method that really does the stuff. Applies the genetic operator + Derived from eoBinaryFunctor + Applies the genetic operator to a individuals dispensed by an eoIndividualSelector, and puts the results in the eoIndividualInserter. Any number of inputs can be requested and any number of outputs can be produced. - */ + */ - virtual void operator()( eoIndiSelector& _in, - eoInserter& _out) const = 0; +template - virtual string className() const {return "eoGeneralOp";} +class eoGeneralOp: public eoOp, public eoBinaryFunctor&, eoInserter&> +{ +public: + /// Ctor that honors its superclass + eoGeneralOp(): eoOp( eoOp::general ) {} }; #endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index e5abfc83e..72a214a71 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -29,9 +29,9 @@ #include // EO includes -#include -#include +#include // for eoInit #include +#include /** Subpopulation: it is used to move parts of population from one algorithm to another and one population to another. It is safer @@ -39,68 +39,42 @@ to declare it as a separate object. I have no idea if a population can be some other thing that a vector, but if somebody thinks of it, this concrete implementation will be moved to "generic" and an abstract Population interface will be provided. + It can be instantiated with anything, provided that it accepts a "size" and a random generator in the ctor. This happens to all the eo1d chromosomes declared so far. EOT must also have a copy ctor, since temporaries are created and copied to the population. + +It can also be instantiated with a "size" and an eoInit derived object. +This object must supply a full chromosome (or something the ctor of the EO +will accept). + @author Geneura Team @version 0.0 */ template -class eoPop: public vector, public eoObject, public eoPersistent { - -/// Type is the type of each gene in the chromosome -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif +class eoPop: public vector, public eoObject, public eoPersistent +{ public: - /** Protected ctor. This is intended to avoid creation of void populations, except - from sibling classes + typedef typename EOT::Fitness Fitness; + /** Default ctor. Creates empty pop */ - eoPop() :vector() {}; + eoPop() : vector(), eoObject(), eoPersistent() {}; - - /** Ctor for fixed-size chromosomes, with variable content + /** Ctor for the initialization of chromosomes + @param _popSize total population size - @param _eoSize chromosome size. EOT should accept a fixed-size ctor - @param _geneRdn random number generator for each of the genes + @param _chromRnd Initialization routine, produces EO's, needs to be an eoInit */ - eoPop( unsigned _popSize, unsigned _eoSize, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - EOT tmpEOT( _eoSize, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for variable-size chromosomes, with variable content - @param _popSize total population size - @param _sizeRnd RNG for the chromosome size. This will be added 1, just in case. - @param _geneRdn random number generator for each of the genes - */ - eoPop( unsigned _popSize, eoRnd & _sizeRnd, eoRnd & _geneRnd ) - :vector() { - for ( unsigned i = 0; i < _popSize; i ++ ){ - unsigned size = 1 + _sizeRnd(); - EOT tmpEOT( size, _geneRnd); - push_back( tmpEOT ); - } - }; - - /** Ctor for user-defined chromosomes, - @param _popSize total population size - @param _chromRnd Initialization routine, produces EO's - */ - eoPop( unsigned _popSize, eoInit & _chromRnd ) + eoPop( unsigned _popSize, eoInit& _chromInit ) :vector() { + resize(_popSize); for ( unsigned i = 0; i < _popSize; i++ ) { - push_back( _chromRnd() ); + _chromInit(operator[](i)); } }; @@ -133,6 +107,60 @@ class eoPop: public vector, public eoObject, public eoPersistent { push_back( thisEOT ); } } + + /** + sort the population. Use this member to sort in order + of descending Fitness, so the first individual is the best! + */ + void sort(void) + { + std::sort(begin(), end(), greater >()); + } + + /** + slightly faster algorithm than sort to find all individuals that are better + than the nth individual + */ + eoPop::iterator nth_element(int nth) + { + iterator it = begin() + nth; + std::nth_element(begin(), it, end(), greater >()); + return it; + } + + struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; + + Fitness nth_element_fitness(int which) const + { + vector fitness(size()); + std::transform(begin(), end(), fitness.begin(), GetFitness()); + + vector::iterator it = fitness.begin(); + std::nth_element(fitness.begin(), it, fitness.end(), greater()); + return *it; + } + + struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; + struct Cmp { + bool operator()(const EO* a, const EO* b) const + { return b->operator<(*a); } + }; + /// const nth_element function, returns pointers to sorted individuals + void nth_element(int which, vector& result) const + { + + result.resize(size()); + std::transform(begin(), end(), result.begin(), Ref()); + + vector::iterator it = result.begin() + which; + + std::nth_element(result.begin(), it, result.end(), Cmp()); + } + + void swap(eoPop& other) + { + std::swap(static_cast& >(*this), static_cast& >(other)); + } /** * Write object. It's called printOn since it prints the object _on_ a stream. @@ -151,5 +179,79 @@ class eoPop: public vector, public eoObject, public eoPersistent { protected: }; + +/** + Keeps and calculates information about a population such + as the sum of fitnesses and whether the population is sorted. + It can be used to cache information about a population between + calls of functors, see for instance how this makes eoProportional + just this tat more efficient + + @see eoSelectOne, eoSelect, eoProportional + +template +class eoPopStats +{ +public : + typedef typename EOT::Fitness FitnessType; + + /// Initialize by stating nothing is known + eoPopStats() : + sum_fitness_calculated(false), + pop_sorted_calculated(false) + {} + + /// Call this function after the pop might have/is changed + void reset() + { + sum_fitness_calculated = false; + pop_sorted_calculated = false; + } + + /// Calculate sum_fitness or return cached value + FitnessType get_sum_fitness(const eoPop& _pop) + { + if (sum_fitness_calculated) + return sum_fitness; + + sum_fitness = 0.0; + + for (int i = 0; i < _pop.size(); ++i) + { + sum_fitness += _pop[i].fitness(); + } + + sum_fitness_calculated = true; + return sum_fitness; + } + + /// Check if the pop is sorted or return cached_value + bool is_pop_sorted(const eoPop& _pop) + { + if (pop_sorted_calculated) + return pop_sorted; + + int i; + for (i = 1; i < _pop.size(); ++i) + { + if (!(_pop[i-1] < _pop[i])) + { // not in sort order + break; + } + } + + pop_sorted = (i == _pop.size()); + pop_sorted_calculated = true; + return pop_sorted; + } + + bool sum_fitness_calculated; + FitnessType sum_fitness; + + bool pop_sorted_calculated; + bool pop_sorted; +}; +*/ + #endif diff --git a/eo/src/eoProportional.h b/eo/src/eoProportional.h new file mode 100644 index 000000000..f47cbba82 --- /dev/null +++ b/eo/src/eoProportional.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoProportional.h +// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoProportional_h +#define eoProportional_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** eoProportional: select an individual proportional to her stored fitness +value + +*/ +//----------------------------------------------------------------------------- + +template class eoProportional: public eoSelectOne +{ +public: + + /// Sanity check + eoProportional(void) : total(-1.0) + { + if (minimizing_fitness()) + { + throw logic_error("eoProportional: minimizing fitness"); + } + } + + void setup(const eoPop& _pop) + { + total = sum_fitness(_pop); + } + + /** do the selection, call roulette_wheel. + */ + const EOT& operator()(const eoPop& _pop) + { + return roulette_wheel(_pop, total) ; + } + +private : + typename EOT::Fitness total; +}; + +#endif + diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h new file mode 100644 index 000000000..e1fb6eb15 --- /dev/null +++ b/eo/src/eoReduce.h @@ -0,0 +1,58 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoReduce.h +// Base class for population-merging classes +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoReduce_h +#define eoReduce_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoReduce + +/** + * eoReduce: .reduce the new generation to the specified size +*/ + +template class eoReduce: public eoBinaryFunctor&, unsigned> +{}; + +template class eoTruncate : public eoReduce +{ + void operator()(eoPop& _newgen, unsigned _newsize) + { + if (_newgen.size() == _newsize) + return; + + _newgen.nth_element(_newsize); + _newgen.resize(_newsize); + } +}; + +//----------------------------------------------------------------------------- + +#endif //eoInsertion_h diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h new file mode 100644 index 000000000..43b8347df --- /dev/null +++ b/eo/src/eoReplacement.h @@ -0,0 +1,111 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoReplacement.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoReplacement_h +#define _eoReplacement_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoReplacement: High level strategy for creating a new generation +from parents and offspring. This is a combination of eoMerge and eoReduce, +so there is an implementation called eoMergeReduce that can be found below + + @see eoMerge, eoReduce, eoMergeReduce +*/ +template +class eoReplacement : public eoBinaryFunctor&, eoPop&> +{}; + +/** +no replacement +*/ +template +class eoNoReplacement : public eoReplacement +{ + public : + /// do nothing + void operator()(const eoPop&, eoPop&) + {} +}; + +/** +eoMergeReduce: special replacement strategy that is just an application of an embedded merge, +followed by an embedded reduce +*/ +template +class eoMergeReduce : public eoReplacement +{ + public: + eoMergeReduce(eoMerge& _merge, eoReduce& _reduce) : + merge(_merge), reduce(_reduce) + {} + + void operator()(const eoPop& _parents, eoPop& _offspring) + { + merge(_parents, _offspring); + reduce(_offspring, _parents.size()); + } + + private : + eoMerge& merge; + eoReduce& reduce; +}; + +/** +ES type of replacement strategy: first add parents to population, then truncate +*/ +template +class eoPlusReplacement : public eoMergeReduce +{ + public : + eoPlusReplacement() : eoMergeReduce(plus, truncate) {} + + private : + eoPlus plus; + eoTruncate truncate; +}; + +/** +ES type of replacement strategy: ignore parents, truncate offspring +*/ +template +class eoCommaReplacement : public eoMergeReduce +{ + public : + eoCommaReplacement() : eoMergeReduce(no_elite, truncate) {} + + private : + eoNoElitism no_elite; + eoTruncate truncate; +}; + + +#endif diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h new file mode 100644 index 000000000..79a402d14 --- /dev/null +++ b/eo/src/eoSGA.h @@ -0,0 +1,101 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSGA.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSGA_h +#define _eoSGA_h + +#include +#include +#include +#include +#include +#include +#include + +template +class eoSGA : public eoAlgo +{ +public : + eoSGA( + eoContinue& _cont, + eoMonOp& _mutate, float _mrate, + eoQuadraticOp& _cross, float _crate, + eoSelectOne& _select, + eoEvalFunc& _eval) + : cont(_cont), + mutate(_mutate), + mutationRate(_mrate), + cross(_cross), + crossoverRate(_crate), + select(_select), + eval(_eval) {} + + void operator()(eoPop& _pop) + { + eoPop offspring; + + do + { + select(_pop, offspring); + + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverRate) ) + { + // this crossover generates 2 offspring from two parents + cross(offspring[2*i], offspring[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationRate) ) + { + mutate(offspring[i]); + } + + eval(offspring[i]); + } + + _pop.swap(offspring); + + } while (cont(_pop)); + } + +private : + + eoContinue& cont; + eoMonOp& mutate; + float mutationRate; + eoQuadraticOp& cross; + float crossoverRate; + eoSelectPerc select; + eoEvalFunc& eval; +}; + +#endif diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 58e4a33cd..e10369c7f 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -26,18 +26,23 @@ #ifndef eoScalarFitness_h #define eoScalarFitness_h +#include +#include + /** * eoScalarFitness >: * Wraps a scalar fitness values such as a double or int, with the option of - * maximizing (using less) or miniziming (using greater) - * this quantity in EO. + * maximizing (using less) or minimizing (using greater) + * + * + * * * It overrides operator<() to use the Compare template argument * * Suitable constructors and assignments and casts are defined to work * with this quantity as if it were a ScalarType. */ -template > +template class eoScalarFitness { public : @@ -57,10 +62,24 @@ class eoScalarFitness bool operator<(const eoScalarFitness& other) const { return Compare()(value, other.value); } + // implementation of the other operators + bool operator>( const eoScalarFitness& y ) const { return y < *this; } + // implementation of the other operators + bool operator<=( const eoScalarFitness& y ) const { return !(*this > y); } + // implementation of the other operators + bool operator>=(const eoScalarFitness& y ) const { return !(*this < y); } + + private : ScalarType value; }; +/** +Typedefs for fitness comparison, +*/ +typedef eoScalarFitness > eoMaximizingFitness; +typedef eoScalarFitness > eoMinimizingFitness; + template std::ostream& operator<<(std::ostream& os, const eoScalarFitness& f) { @@ -69,7 +88,7 @@ std::ostream& operator<<(std::ostream& os, const eoScalarFitness& f) } template -std::istream& operator>>(istream& is, eoScalarFitness& f) +std::istream& operator>>(std::istream& is, eoScalarFitness& f) { F value; is >> value; diff --git a/eo/src/eoSelect.h b/eo/src/eoSelect.h new file mode 100644 index 000000000..2ba9adb56 --- /dev/null +++ b/eo/src/eoSelect.h @@ -0,0 +1,43 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelect.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelect_h +#define _eoSelect_h + + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** +eoSelect selects a number of individuals from the first argument and +puts it in the second. To emphasize that it should not try to enlarge +the population, the second argument is an eoPopRange, a simple struct +that holds a begin and end iterator to the population +*/ +template +class eoSelect : public eoBinaryFunctor&, eoPop&> +{}; + +#endif diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h new file mode 100644 index 000000000..07d3a65ff --- /dev/null +++ b/eo/src/eoSelectOne.h @@ -0,0 +1,49 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectOne.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectOne_h +#define _eoSelectOne_h + + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectOne selects only one element from a whole population. + Most selection techniques are simply repeated applications + of eoSelectOne. + + @see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional +*/ +template +class eoSelectOne : public eoUnaryFunctor&> +{ + public : + + /// virtual function to setup some population stats (for instance eoProportional can benefit greatly from this) + virtual void setup(const eoPop&) {} +}; + +#endif diff --git a/eo/src/eoSelectPerc.h b/eo/src/eoSelectPerc.h new file mode 100644 index 000000000..f74adb370 --- /dev/null +++ b/eo/src/eoSelectPerc.h @@ -0,0 +1,72 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectPerc.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectPerc_h +#define _eoSelectPerc_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectPerc selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectPerc needs an eoSelectOne in its ctor + + It will select floor(rate*pop.size()) individuals and pushes them to + the back of the destination population. +*/ +template +class eoSelectPerc : public eoSelect +{ + public: + /// init + eoSelectPerc(eoSelectOne& _select, float _rate = 1.0) + : select(_select), rate(_rate) {} + + /** + The implementation selects a percentage + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + size_t target = static_cast(floor(rate * _source.size())); + + _dest.resize(target); + + select.setup(_source); + + for (int i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + + private : + eoSelectOne& select; + float rate; +}; + +#endif diff --git a/eo/src/eoUniformSelect.h b/eo/src/eoSelectRandom.h similarity index 64% rename from eo/src/eoUniformSelect.h rename to eo/src/eoSelectRandom.h index 0c4707ee7..84ea72f81 100644 --- a/eo/src/eoUniformSelect.h +++ b/eo/src/eoSelectRandom.h @@ -1,8 +1,8 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoUniformSelect.h -// (c) GeNeura Team, 1998 - EEAAX 1999 +// eoSelectRandom.h +// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,46 +20,33 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr + mak@dhi.dk */ //----------------------------------------------------------------------------- -#ifndef eoUniformSelect_h -#define eoUniformSelect_h -// WARNING: 2 classes in this one - eoUniformSelect and eoCopySelect +#ifndef eoSelectRandom_h +#define eoSelectRandom_h //----------------------------------------------------------------------------- -#include // -#include // accumulate -#include // eoPop eoSelect MINFLOAT #include +#include //----------------------------------------------------------------------------- -/** eoUniformSelect: a selection method that selects ONE individual randomly +/** eoSelectRandom: a selection method that selects ONE individual randomly -MS- 22/10/99 */ //----------------------------------------------------------------------------- -template class eoUniformSelect: public eoSelectOne +template class eoSelectRandom: public eoSelectOne { public: - /// (Default) Constructor. - eoUniformSelect():eoSelectOne() {} /// not a big deal!!! - virtual const EOT& operator()(const eoPop& pop) { + virtual const EOT& operator()(const eoPop& pop) + { return pop[rng.random(pop.size())] ; } - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - * @return the class name as a string - */ - virtual string className() const { return "eoUniformSelect"; }; - - private: }; -#endif eoUniformSelect_h +#endif eoSelectRandom_h diff --git a/eo/src/eoSequentialGOpSelector.h b/eo/src/eoSequentialGOpSel.h similarity index 74% rename from eo/src/eoSequentialGOpSelector.h rename to eo/src/eoSequentialGOpSel.h index e77bdec7a..11c3c4692 100644 --- a/eo/src/eoSequentialGOpSelector.h +++ b/eo/src/eoSequentialGOpSel.h @@ -1,7 +1,7 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoSequentialGOpSelector.h + eoSequentialGOpSel.h Sequential Generalized Operator Selector. (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 @@ -23,35 +23,28 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -#ifndef eoSequentialGOpSelector_h -#define eoSequentialGOpSelector_h +#ifndef eoSequentialGOpSel_h +#define eoSequentialGOpSel_h //----------------------------------------------------------------------------- -#include "eoGOpSelector.h" -/** eoSequentialGOpSel: do proportional selection, but return a sequence of - operations to be applied one after the other. +#include +/** eoSequentialGOpSel: return a sequence of + operations to be applied one after the other. The order of the + operators is significant. If for instance you first add a + quadratic operator and then a mutation operator, + + @see eoGeneralOp, eoCombinedOp */ template class eoSequentialGOpSel : public eoGOpSelector { public : - virtual ~eoSequentialGOpSel(void) {} + eoSequentialGOpSel(void) : combined(*this, getRates()) {} virtual eoGeneralOp& selectOp() - { - combined.clear(); - - for (unsigned i = 0; i < size(); ++i) - { - if (operator[](i) == 0) - continue; - - if (rng.flip(getRates()[i])) - combined.addOp(operator[](i)); - } - + { return combined; } diff --git a/eo/src/eoSteadyStateEA.h b/eo/src/eoSteadyStateEA.h index 824c67a73..7be4870ff 100644 --- a/eo/src/eoSteadyStateEA.h +++ b/eo/src/eoSteadyStateEA.h @@ -27,8 +27,8 @@ //----------------------------------------------------------------------------- -#include "eoSteadyStateGeneration.h" // eoPop -#include +#include +#include /** EOSteadyStateEA: An easy-to-use evolutionary algorithm, just supply @@ -42,19 +42,19 @@ template class eoSteadyStateEA: public eoAlgo /// Constructor. eoSteadyStateEA( eoGOpSelector& _opSelector, - eoPopIndiSelector& _selector, + eoSelectOne& _selector, eoSteadyStateInserter& _inserter, - eoTerm& _terminator, + eoContinue& _continuator, unsigned _steps = 0 ) - : step(_opSelector, _selector, _inserter), - terminator( _terminator) + : step(_opSelector, _selector, _inserter, _steps), + continuator( _continuator) {}; /// Constructor from an already created generation - eoSteadyStateEA(eoSteadyStateGeneration& _gen, - eoTerm& _terminator): + eoSteadyStateEA(eoSteadyStateTransform& _gen, + eoContinue& _continuator): step(_gen), - terminator( _terminator){}; + continuator( _continuator){}; /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { @@ -69,16 +69,13 @@ template class eoSteadyStateEA: public eoAlgo s.append( " in eoSteadyStateEA "); throw runtime_error( s ); } - } while ( terminator( pop ) ); + } while ( continuator( pop ) ); } - - /// Class name. - string className() const { return "eoSteadyStateEA"; } - + private: - eoSteadyStateGeneration step; - eoTerm& terminator; + eoSteadyStateTransform step; + eoContinue& continuator; }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoSteadyStateInserter.h b/eo/src/eoSteadyStateInserter.h index 83ae0d57b..57fd187e4 100644 --- a/eo/src/eoSteadyStateInserter.h +++ b/eo/src/eoSteadyStateInserter.h @@ -34,19 +34,19 @@ /** * eoSteadyStateInserter: Interface class that enables an operator to update - * a population with a new individual... it contains an eoEvalFunc object to + * a population with a new individual... it contains an eoEvalFunc derived object to * make sure that every individual is evaluated before it is inserted */ template class eoSteadyStateInserter : public eoPopInserter { public : - eoSteadyStateInserter(eoEvalFunc& _eval): + eoSteadyStateInserter(eoEvalFunc& _eval): eoPopInserter(), eval(_eval) {} protected : - eoEvalFunc& eval; + eoEvalFunc& eval; }; diff --git a/eo/src/eoSteadyStateGeneration.h b/eo/src/eoSteadyStateTransform.h similarity index 77% rename from eo/src/eoSteadyStateGeneration.h rename to eo/src/eoSteadyStateTransform.h index c055b1076..82d9b4715 100644 --- a/eo/src/eoSteadyStateGeneration.h +++ b/eo/src/eoSteadyStateTransform.h @@ -1,8 +1,8 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoSteadyStateGeneration.h -// (c) GeNeura Team, 1998 +// eoSteadyStateTransform.h +// (c) Maarten Keijzer 2000, GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -22,33 +22,32 @@ */ //----------------------------------------------------------------------------- -#ifndef eoSteadyStateGeneration_h -#define eoSteadyStateGeneration_h +#ifndef eoSteadyStateTransform_h +#define eoSteadyStateTransform_h //----------------------------------------------------------------------------- #include // eoPop #include -#include // eoSelect, eoTranform, eoMerge -#include "eoGOpSelector.h" -#include "eoIndiSelector.h" -#include "eoSteadyStateInserter.h" +#include +#include +#include //----------------------------------------------------------------------------- -/** eoSteadyStateGeneration +/** eoSteadyStateTransform * Single step of a steady state evolutionary algorithm. * Proceeds by updating one individual at a time, by first selecting parents, * creating one or more children and subsequently overwrite (a) bad individual(s) */ -template class eoSteadyStateGeneration: public eoAlgo +template class eoSteadyStateTransform: public eoTransform { public: /// Constructor. - eoSteadyStateGeneration( + eoSteadyStateTransform( eoGOpSelector& _opSelector, - eoPopIndiSelector& _selector, + eoSelectOne& _selector, eoSteadyStateInserter& _inserter, unsigned _steps = 0) : opSelector(_opSelector), @@ -66,19 +65,19 @@ template class eoSteadyStateGeneration: public eoAlgo nSteps = pop.size(); // make a 'generation equivalent' } - for (unsigned i = 0; i < nSteps; ++i) + for (unsigned i = 0; i < steps; ++i) { - opSelector.selectOp()(selector(pop), inserter(pop)); + selector.bind(pop); + inserter.bind(pop); + + opSelector.selectOp()(selector, inserter); } } - /// Class name. - string className() const { return "eoSteadyStateGeneration"; } - private: eoGOpSelector& opSelector; - eoPopIndiSelector& selector; + eoSelectOneIndiSelector& selector; eoSteadyStateInserter& inserter; unsigned steps; }; diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h index 215ca3a58..29ec31c00 100644 --- a/eo/src/eoStochTournament.h +++ b/eo/src/eoStochTournament.h @@ -30,7 +30,6 @@ #include // #include // accumulate -#include // eoPop eoSelect MINFLOAT #include //----------------------------------------------------------------------------- @@ -44,7 +43,8 @@ template class eoStochTournament: public eoSelectOne public: /// - eoStochTournament(float _Trate = 1.0 ):eoSelectOne(), Trate(_Trate) { + eoStochTournament(float _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) + { // consistency check if (Trate < 0.5) { cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; @@ -52,8 +52,7 @@ template class eoStochTournament: public eoSelectOne } } - /** DANGER: if you want to be able to minimize as well as maximizem - DON'T cast the fitness to a float, use the EOT comparator! */ + /** Perform the stochastic tournament */ virtual const EOT& operator()(const eoPop& pop) { return stochastic_tournament(pop, Trate); diff --git a/eo/src/eoStochTournamentInserter.h b/eo/src/eoStochTournamentInserter.h index a68556056..002f3d9c1 100644 --- a/eo/src/eoStochTournamentInserter.h +++ b/eo/src/eoStochTournamentInserter.h @@ -63,7 +63,6 @@ public : eo = _eot; // overwrite loser of tournament eo.invalidate(); - eval(eo); // Evaluate after insert return *this; } diff --git a/eo/src/eoTransform.h b/eo/src/eoTransform.h new file mode 100644 index 000000000..f10440249 --- /dev/null +++ b/eo/src/eoTransform.h @@ -0,0 +1,41 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTransform.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTransform_h +#define _eoTransform_h + + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** +eoTransform transforms a population by applying genetic operators on +it. +*/ +template +class eoTransform : public eoUnaryFunctor&> +{}; + +#endif diff --git a/eo/src/eoVariableLength.h b/eo/src/eoVariableLength.h index 9bf952a09..6cd823f32 100644 --- a/eo/src/eoVariableLength.h +++ b/eo/src/eoVariableLength.h @@ -30,8 +30,9 @@ #include /** - Base class for variable length chromosomes, just derives from EO and list and - redirects the smaller than operator to EO (fitness based comparison) + Base class for variable length chromosomes. Derives from EO and list, + redirects the smaller than operator to EO (fitness based comparison), + and implements the virtual functions printOn() and readFrom() */ template @@ -39,8 +40,39 @@ class eoVariableLength : public EO, public std::list { public : - typedef typename GeneType Type; + typedef GeneType AtomType; + typedef std::list ContainerType; + /// printing... + void printOn(ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' '; + + std::copy(begin(), end(), ostream_iterator(os)); + } + + /// reading... + void readFrom(istream& is) + { + EO::readFrom(is); + + unsigned sz; + is >> sz; + + resize(0); + unsigned i; + unsigned gene; + + for (i = 0; i < sz; ++i) + { + is >> gene; + push_back(gene); + } + } + /// to avoid conflicts between EO::operator< and vector::operator< bool operator<(const eoVariableLength& _eo) const { diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h index 881db6e71..7ef717f63 100644 --- a/eo/src/eoWrappedOps.h +++ b/eo/src/eoWrappedOps.h @@ -42,25 +42,22 @@ class eoWrappedMonOp : public eoGeneralOp { public : /// - eoWrappedMonOp(const eoMonOp& _op) : eoGeneralOp(), op(_op) {}; + eoWrappedMonOp(eoMonOp& _op) : eoGeneralOp(), op(_op) {}; /// virtual ~eoWrappedMonOp() {} /// Instantiates the abstract method void operator()( eoIndiSelector& _in, - eoInserter& _out) const { + eoInserter& _out) + { EOT result = _in(); op( result ); _out(result); } - /// - virtual string className() const {return "eoWrappedMonOp";}; - - private : - const eoMonOp& op; + eoMonOp& op; }; @@ -70,25 +67,23 @@ class eoWrappedBinOp : public eoGeneralOp { public : /// - eoWrappedBinOp(const eoBinOp& _op) : eoGeneralOp(), op(_op) {} + eoWrappedBinOp(eoBinOp& _op) : eoGeneralOp(), op(_op) {} /// virtual ~eoWrappedBinOp() {} /// Instantiates the abstract method. EOT should have copy ctor. void operator()(eoIndiSelector& _in, - eoInserter& _out) const { + eoInserter& _out) + { EOT out1 = _in(); const EOT& out2 = _in(); op(out1, out2); _out(out1); } - - /// - virtual string className() const {return "eoWrappedBinOp";}; private : - const eoBinOp& op; + eoBinOp& op; }; /// Wraps Quadratic operators @@ -97,125 +92,105 @@ class eoWrappedQuadraticOp : public eoGeneralOp { public : /// - eoWrappedQuadraticOp(const eoQuadraticOp& _op) : eoGeneralOp(), op(_op) {} + eoWrappedQuadraticOp(eoQuadraticOp& _op) : eoGeneralOp(), op(_op) {} /// virtual ~eoWrappedQuadraticOp() {} /// Instantiates the abstract method. EOT should have copy ctor. void operator()(eoIndiSelector& _in, - eoInserter& _out) const { + eoInserter& _out) + { EOT out1 = _in(); EOT out2 = _in(); op(out1, out2); _out(out1)(out2); } - /// - virtual string className() const {return "eoWrappedQuadraticOp";}; - private : - const eoQuadraticOp& op; + eoQuadraticOp& op; }; -/// Combines several ops -template +#include + +template class eoCombinedOp : public eoGeneralOp { -public : - - /// - eoCombinedOp() : eoGeneralOp() {} + public : + eoCombinedOp(const std::vector*>& _ops, const std::vector& rates) + : ops(_ops), rates(_rates) {} - /// - virtual ~eoCombinedOp() {} - - /// Adds a new operator to the combined Op - void addOp(eoGeneralOp* _op) - { - ops.push_back(_op); - } - - - /// Erases all operators added so far - void clear(void) { - ops.resize(0); - } - - /// Helper class to make sure that stuff that is inserted will be used again with the next operator - class eoIndiSelectorInserter : public eoIndiSelector, public eoInserter - { - public : - eoIndiSelectorInserter(eoIndiSelector& _in) - : eoIndiSelector(), eoInserter(), in(_in) - {} - - size_t size() const { return in.size(); } - const EOT& operator[](size_t _n) const { return in[_n]; } - - const EOT& operator()(void) - { - if (results.empty()) - { - return in(); - } - // else we use the previously inserted individual, - // an iterator to it is stored in 'results', but the memory - // is kept by 'intermediate'. - - list::iterator it = *results.begin(); - results.pop_front(); - return *it; - } - - eoInserter& operator()(const EOT& _eot) - { - intermediate.push_front(_eot); - results.push_front(intermediate.begin()); - return *this; - } - - void fill(eoInserter& _out) - { - typedef list::iterator>::iterator Iterator; - - for (Iterator it = results.begin(); it != results.end(); ++it) - { - _out(**it); - } - - results.clear(); - intermediate.clear(); // reclaim memory - } - - private : - - eoIndiSelector& in; - - // using lists as we need to push and pop a lot - // 'results' are iterators to the contents of 'intermediate' - // to prevent copying to and from intermediate... - list::iterator> results; - list intermediate; - }; - - /// Applies all ops in the combined op - void operator()( eoIndiSelector& _in, - eoInserter& _out ) const { - - eoIndiSelectorInserter in_out(_in); - - for (size_t i = 0; i < ops.size(); ++i) + class eoDelayedSelector : public eoIndiSelector { - (*ops[i])(in_out, in_out); - } + public : + eoDelayedSelector(eoIndiSelector& _select, const eoPop& _pop) : select(_select), pop(_pop), it(pop.begin()) {} + + unsigned size() const { return select.size();} + const EOT& operator[](size_t i) const { return select[i]; } - in_out.fill(_out); + /// will first dispense all previously selected individuals before returning new ones + const EOT& operator()(void) + { + if (it == pop.end()) + { + return select(); + } + // else + return *it++; + } + + eoPop::const_iterator get_it(void) const { return it; } + private : + eoIndiSelector& select; + const eoPop& pop; + eoPop::const_iterator it; + }; + + /** Applies all ops in the combined op + It works in the following way + */ + void operator()( eoIndiSelector& _in, + eoInserter& _out ) + { + eoPop intermediate; + eoPop next; + unsigned i; + + for (i = 0; i < ops.size(); ++i) + { + eoDelayedSelector delay(_in, intermediate); + inserter.bind(next); + + unsigned counter = 0; + + // apply operators until we have as many outputs as inputs + do + { + if (flip(rates[i])) // should this flip be here? + (*ops[i])(delayedSelector, inserter); + + counter++; + if (counter > 1000) + { + throw logical_error("eoCombinedOp: no termination after 1000 tries, did you forget to insert individuals in your eoGeneralOp?"); + } + } + while (next.size() < intermediate.size()); + + intermediate.swap(next); + next.resize(0); + } + + // after last swap, results can be found in intermediate + for (i = 0; i < intermediate.size(); ++i) + _out(intermediate[i]); } - -private : - vector* > ops; + + private : + const std::vector*>& ops; + const std::vector rates; + eoBackInserter inserter; }; -#endif eoGeneral_h +#endif diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index b72b66d15..6b89d98a6 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -5,4 +5,7 @@ ############################################################################### libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoESFullChrom.h eoESChrom.h eoESFullMut.h evolution_strategies eoEsObjectiveBounds.h eoEsSimple.h eoEsStdev.h eoEsFull.h eoEsChromInit.h eoEsMutationInit.h eoEsMutate.h \ No newline at end of file +libeoinc_HEADERS = evolution_strategies eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsObjectiveBounds.h eoEsSimple.h eoEsStdev.h + + + diff --git a/eo/src/es/eoESFullMut.h b/eo/src/es/eoESFullMut.h deleted file mode 100644 index d4cc7ce72..000000000 --- a/eo/src/es/eoESFullMut.h +++ /dev/null @@ -1,253 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESMute.h : ES mutation -// (c) GeNeura Team, 1998 for the EO part -// Th. Baeck 1994 and EEAAX 1999 for the ES part -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - marc.schoenauer@polytechnique.fr - http://eeaax.cmap.polytchnique.fr/ - */ -//----------------------------------------------------------------------------- - - -#ifndef _EOESMUT_H -#define _EOESMUT_H - -#include -#include -#include // for exp - -#include -#include - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795 -#endif - -const double ES_SIGEPS = 1.0e-40; /* ES lower bound for sigma values */ -// should not be a parameter ... - -/** ES-style mutation in the large: Obviously, valid only for eoESInd -*/ -template -class eoESMutate: public eoMonOp< eoESFullChrom > { -public: - eoESMutate(double n) - { - TauLcl = 1/sqrt(2*sqrt(n)); - TauGlb= 1 / sqrt(2 * n); - TauBeta = 0.0873; - }/// - - eoESMutate( double _TauLcl, double _TauGlb, double _TauBeta ) - : eoMonOp< eoESFullChrom >( ), TauLcl(_TauLcl), TauGlb(_TauGlb), - TauBeta(_TauBeta) {}; - - /* The parser constructor - */ - eoESMutate(Parser & parser, unsigned _stdDevLength, unsigned _size, bool _correlated ): - eoMonOp< eoESFullChrom >( ) { - parser.AddTitle("Parameters of ES mutation (before renormalization)"); - try { // we know that there is at least 1 std dev. - if (_stdDevLength == 1) { - TauLcl = parser.getInt("-Ml", "--TauLcl", "1", - "TauLcl, Mutation rate for the only Std Dev." ); - // different normalization in that case -- Thomas Baeck - TauLcl /= sqrt((double) _size); - } - else { /* more than 1 std dev */ - TauLcl = parser.getFloat("-Ml", "--TauLcl", "1", - "Local mutation rate for Std Dev." ); - TauGlb = parser.getFloat("-Mg", "--TauGlb", "1", - "Global mutation rate for Std Dev." ); - // renormalization - TauLcl /= sqrt( 2.0 * sqrt( (double)_size ) ); - TauGlb /= sqrt( 2.0 * ( (double) _size ) ); - - if ( _correlated ) { // Correlated Mutations - TauBeta = parser.getFloat("-Mb", "--TauBeta", "0.0873", - "Mutation rate for corr. coeff." ); - // rotation angles: no normalization - } - } - } - catch (exception & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - }; - - /// needed virtual dtor - virtual ~eoESMutate() {}; - - // virtual separation depending wether correlated mutations are present - virtual void operator() ( eoESFullChrom & _eo ) const { - if (_eo.CorCffLength()) - CorrelatedMutation(_eo); - else - StandardMutation(_eo); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual string className() const {return "eoESMutate";}; - -private: - /// mutations - standard et correlated - // ========= - /* - * Standard mutation of object variables and standard - * deviations in ESs. - * If there are fewer different standard deviations available - * than the dimension of the objective function requires, the - * last standard deviation is responsible for ALL remaining - * object variables. - * Schwefel 1977: Numerische Optimierung von Computer-Modellen - * mittels der Evolutionsstrategie, pp. 165 ff. - */ - - virtual void StandardMutation( eoESFullChrom & _eo ) const { - unsigned i,k; - double Glb, StdLoc; - - if (_eo.StdDevLength() == 1) { /* single StdDev -> No global factor */ - StdLoc = _eo.getStdDev(0); - StdLoc *= exp(TauLcl*rng.normal()); - if (StdLoc < ES_SIGEPS) - StdLoc = ES_SIGEPS; - _eo.setStdDev(0, StdLoc); - _eo.setGene( 0, _eo.getGene(0) + StdLoc*rng.normal()); - i = 1; - } - else { /* more than one std dev. */ - Glb = exp(TauGlb*rng.normal()); - for (i = 0; i < _eo.length() && i < _eo.StdDevLength(); i++) { - StdLoc = _eo.getStdDev(i); - StdLoc *= Glb * exp(TauLcl*rng.normal()); - if (StdLoc < ES_SIGEPS) - StdLoc = ES_SIGEPS; - _eo.setStdDev(i, StdLoc); - _eo.setGene( i, _eo.getGene(i) + StdLoc*rng.normal()); - } - } - // last object variables: same STdDev than the preceding one - for (k = i; k < _eo.length(); k++) { - _eo.setGene( k, _eo.getGene(k) + StdLoc*rng.normal() ); - } - } - - /* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ - - // Code from Thomas Baeck - - virtual void CorrelatedMutation( eoESFullChrom & _eo ) const { - - - int i, k, n1, n2, nq; - - double d1, d2, S, C, Glb; - double tmp; - /* - * First: mutate standard deviations (as above). - */ - - Glb = exp(TauGlb*rng.normal()); - for (i = 0; i < _eo.StdDevLength(); i++) { - tmp = _eo.getStdDev(i); - _eo.setStdDev( i, tmp*Glb*exp(TauLcl*rng.normal()) ); - } - - /* - * Mutate rotation angles. - */ - - for (i = 0; i < _eo.CorCffLength(); i++) { - tmp = _eo.getCorCff(i); - tmp += TauBeta*rng.normal(); - // danger of VERY long loops --MS-- - // while (CorCff[i] > M_PI) - // CorCff[i] -= 2.0 * M_PI; - // while (CorCff[i] < - M_PI) - // CorCff[i] += 2.0 * M_PI; - if ( fabs(tmp) > M_PI ) { - tmp -= M_PI * (int) (tmp/M_PI) ; - } - _eo.setCorCff(i, tmp); - } - - /* - * Perform correlated mutations. - */ - vector VarStp(_eo.size()); - for (i = 0; i < _eo.size() && i < _eo.StdDevLength(); i++) - VarStp[i] = _eo.getStdDev(i)*rng.normal(); - for (k = i; k < _eo.size(); k++) - VarStp[k] = _eo.getStdDev(i-1)*rng.normal(); - nq = _eo.CorCffLength() - 1; - for (k = _eo.size()-_eo.StdDevLength(); k < _eo.size()-1; k++) { - n1 = _eo.size() - k - 1; - n2 = _eo.size() - 1; - for (i = 0; i < k; i++) { - d1 = VarStp[n1]; - d2 = VarStp[n2]; - S = sin( _eo.getCorCff(nq) ); - C = cos( _eo.getCorCff(nq) ); - VarStp[n2] = d1 * S + d2 * C; - VarStp[n1] = d1 * C - d2 * S; - n2--; - nq--; - } - } - for (i = 0; i < _eo.size(); i++) - _eo[i] += VarStp[i]; - - } - // the data - //========= - double TauLcl; /* Local factor for mutation of std deviations */ - double TauGlb; /* Global factor for mutation of std deviations */ - double TauBeta; /* Factor for mutation of correlation parameters */ -}; - -/* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ -// Not yet implemented! - -#endif - diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index e9485d2b0..d5f058a0e 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -33,7 +33,7 @@ #include #include -#include +#include #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 @@ -42,7 +42,7 @@ /** \ingroup EvolutionStrategies - Random Es-chromosome initializer (therefore derived from eoRnd) + Random Es-chromosome initializer (therefore derived from eoInit) This class can initialize three types of Es's: @@ -62,10 +62,9 @@ public : eoEsChromInit(eoEsObjectiveBounds& _bounds) : bounds(_bounds) {} - EOT operator()() + void operator()(EOT& _eo) { - EOT eo; - return create(eo); + create(_eo); } private : diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 8f46d1406..54c406fe5 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -30,7 +30,7 @@ #define _EOESMUTATE_H #include -#include +#include #include // for exp #include @@ -89,7 +89,7 @@ public: /** Mutate eoEsSimple */ - virtual void operator()( eoEsSimple& _eo) const + virtual void operator()( eoEsSimple& _eo) { _eo.stdev *= exp(TauLcl * rng.normal()); @@ -104,6 +104,8 @@ public: } keepInBounds(_eo); + + _eo.invalidate(); } /// mutations - standard and correlated @@ -119,7 +121,7 @@ public: * mittels der Evolutionsstrategie, pp. 165 ff. */ - virtual void operator()( eoEsStdev& _eo ) const + virtual void operator()( eoEsStdev& _eo ) { double global = exp(TauGlb * rng.normal()); for (unsigned i = 0; i < _eo.size(); i++) @@ -135,6 +137,8 @@ public: } keepInBounds(_eo); + + _eo.invalidate(); } /* @@ -148,7 +152,7 @@ public: // Code from Thomas Baeck - virtual void operator()( eoEsFull & _eo ) const + virtual void operator()( eoEsFull & _eo ) { /* @@ -216,6 +220,8 @@ public: _eo[i] += VarStp[i]; keepInBounds(_eo); + + _eo.invalidate(); } void keepInBounds(eoFixedLength& _eo) const diff --git a/eo/src/ga/eoBin.h b/eo/src/ga/eoBin.h index 6ff794416..51fac67ec 100644 --- a/eo/src/ga/eoBin.h +++ b/eo/src/ga/eoBin.h @@ -27,7 +27,8 @@ #include // ostream, istream #include // bind2nd #include // string -#include // EO + +#include /** \defgroup bitstring @@ -38,9 +39,9 @@ /** eoBin: implementation of binary chromosome. \class eoBin eoBin.h ga/eoBin.h \ingroup bitstring - * based on STL's bit_vector (vector). + * based on STL's vector specialization. */ -template class eoBin: public eoVector +template class eoBin: public eoFixedLength { public: @@ -49,21 +50,8 @@ template class eoBin: public eoVector * @param size Size of the binary string. */ eoBin(unsigned size = 0, bool value = false): - eoVector(size, value) {} - - /** - * Constructor. - * @param size Size of the binary string. - */ - eoBin(unsigned size, const eoRnd& rnd): eoVector(size) - { - generate(begin(), end(), rnd); - } - - /** Constructor from istream. - @param is The istream to read from.*/ - eoBin(istream& _is):eoVector(_is){}; - + eoFixedLength(size, value) {} + /// My class name. string className() const { @@ -76,6 +64,7 @@ template class eoBin: public eoVector */ void printOn(ostream& os) const { + os << size() << ' '; copy(begin(), end(), ostream_iterator(os)); } @@ -98,4 +87,4 @@ template class eoBin: public eoVector //----------------------------------------------------------------------------- -#endif eoBin_h +#endif //eoBin_h diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 3e4c1ae7c..7179b52d2 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -9,45 +9,8 @@ #include // swap_ranges #include -#include // eoBin -#include // eoMonOp - - -/** @name BitWise Genetic operators - -\class eoBinRandom eoBitOp.h ga/eoBitOp.h -\ingroup bitstring - -Even as these operators might seem general, they are particular versions of genetic -operators useful only for binary operators. As any set of genetic operators, it must -have a factory that knows how to build them from a description -@author GeNeura Team -@version 0.1 -@see eoBin -@see eoBitOpFactory -*/ - -//@{ - -/** eoBinRandom --> mofify a chromosome in a random way */ - -template class eoBinRandom: public eoMonOp -{ - public: - /// The class name. - string className() const { return "eoBinRandom"; } - - /** - * Randomizes a cromosome. - * @param chrom The cromosome to be randomize. - */ - void operator()(Chrom& chrom) const - { - for (unsigned i = 0; i < chrom.size(); i++) - chrom[i] = rng.flip(0.5) ? false : true; - } -}; - +#include // eoMonOp +#include /** eoBinBitFlip --> changes a bit \class eoBinBitFlip eoBitOp.h ga/eoBitOp.h @@ -64,8 +27,9 @@ template class eoBinBitFlip: public eoMonOp * Change one bit. * @param chrom The cromosome which one bit is going to be changed. */ - void operator()(Chrom& chrom) const + void operator()(Chrom& chrom) { + chrom.invalidate(); unsigned i = rng.random(chrom.size()); chrom[i] = (chrom[i]) ? false : true; } @@ -93,11 +57,18 @@ template class eoBinMutation: public eoMonOp * Mutate a chromosome. * @param chrom The chromosome to be mutated. */ - void operator()(Chrom& chrom) const + void operator()(Chrom& chrom) { + bool changed_something = false; for (unsigned i = 0; i < chrom.size(); i++) - if (rng.flip(rate)) - chrom[i] = !chrom[i]; + if (rng.flip(rate)) + { + chrom[i] = !chrom[i]; + changed_something = true; + } + + if (changed_something) + chrom.invalidate(); } private: @@ -120,7 +91,7 @@ template class eoBinInversion: public eoMonOp * Inverts a range of bits in a binary chromosome. * @param chrom The chromosome whos bits are going to be inverted (a range). */ - void operator()(Chrom& chrom) const + void operator()(Chrom& chrom) { unsigned u1 = rng.random(chrom.size() + 1) , u2; @@ -128,6 +99,7 @@ template class eoBinInversion: public eoMonOp unsigned r1 = min(u1, u2), r2 = max(u1, u2); reverse(chrom.begin() + r1, chrom.begin() + r2); + chrom.invalidate(); } }; @@ -147,7 +119,7 @@ template class eoBinNext: public eoMonOp * Change the bit string x to be x+1. * @param chrom The chromosome to be added one. */ - void operator()(Chrom& chrom) const + void operator()(Chrom& chrom) { for (int i = chrom.size() - 1; i >= 0; i--) if (chrom[i]) @@ -160,6 +132,8 @@ template class eoBinNext: public eoMonOp chrom[i] = 1; break; } + + chrom.invalidate(); } }; @@ -179,7 +153,7 @@ template class eoBinPrev: public eoMonOp * Change the bit string x to be x-1. * @param chrom The chromosome to be substracted one. */ - void operator()(Chrom& chrom) const + void operator()(Chrom& chrom) { for (int i = chrom.size() - 1; i >= 0; i--) if (chrom[i]) @@ -192,6 +166,8 @@ template class eoBinPrev: public eoMonOp chrom[i] = 1; continue; } + + chrom.invalidate(); } }; @@ -212,10 +188,19 @@ template class eoBinCrossover: public eoQuadraticOp * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ - void operator()(Chrom& chrom1, Chrom& chrom2) const + void operator()(Chrom& chrom1, Chrom& chrom2) { - swap_ranges(chrom1.begin(), chrom1.begin() + rng.random(min(chrom1.size(), chrom2.size())), chrom2.begin()); - } + unsigned site = rng.random(min(chrom1.size(), chrom2.size())); + + if (std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) + { + + swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); + + chrom1.invalidate(); + chrom2.invalidate(); + } + } }; @@ -242,7 +227,7 @@ template class eoBinNxOver: public eoQuadraticOp * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ - void operator()(Chrom& chrom1, Chrom& chrom2) const + void operator()(Chrom& chrom1, Chrom& chrom2) { unsigned max_size = min(chrom1.size(), chrom2.size()); unsigned max_points = min(max_size - 1, num_points); @@ -272,6 +257,9 @@ template class eoBinNxOver: public eoQuadraticOp if (change) swap(chrom1[bit], chrom2[bit]); } + + chrom1.invalidate(); + chrom2.invalidate(); } private: @@ -305,7 +293,7 @@ template class eoBinGxOver: public eoQuadraticOp * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ - void operator()(Chrom& chrom1, Chrom& chrom2) const + void operator()(Chrom& chrom1, Chrom& chrom2) { unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; unsigned cut_genes = min(max_genes, num_points); @@ -330,7 +318,10 @@ template class eoBinGxOver: public eoQuadraticOp swap_ranges(chrom1.begin() + i * gene_size, chrom1.begin() + i * gene_size + gene_size, chrom2.begin() + i * gene_size); - } + + chrom1.invalidate(); + chrom2.invalidate(); + } private: unsigned gene_size; diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h index 8d70c7e4e..46b35ff03 100644 --- a/eo/src/ga/eoBitOpFactory.h +++ b/eo/src/ga/eoBitOpFactory.h @@ -36,7 +36,8 @@ on bitstring chromosomes. Only those chromosomes can instantiate the operators that are created here @see eoSelect*/ template< class EOT> -class eoBitOpFactory: public eoOpFactory { +class eoBitOpFactory: public eoOpFactory +{ public: @@ -59,7 +60,8 @@ public: @param _is an stream from where a single line will be read @throw runtime_exception if the object type is not known */ - virtual eoOp* make(istream& _is) { + virtual eoOp* make(istream& _is) + { eoOp * opPtr = NULL; try { opPtr = eoOpFactory::make( _is ); diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 7bac61254..7be7c2021 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -3,12 +3,12 @@ #include -#include "EO.h" -#include "eoOp.h" -#include "eoInserter.h" -#include "eoIndiSelector.h" -#include "parse_tree.h" -#include "eoRnd.h" +#include +#include +#include +#include +#include +#include using namespace gp_parse_tree; using namespace std; @@ -90,7 +90,7 @@ std::istream& operator>>(std::istream& is, eoParseTree& eot) template -class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > +class eoGpDepthInitializer : public eoInit< eoParseTree > { public : @@ -109,15 +109,13 @@ class eoGpDepthInitializer : public eoRnd< eoParseTree::Type > virtual string className() const { return "eoDepthInitializer"; }; - EoType::Type operator()(void) + void operator()(EoType& _tree) { list sequence; generate(sequence, max_depth); - parse_tree tree(sequence.begin(), sequence.end()); - - return tree.root(); + _tree = parse_tree(sequence.begin(), sequence.end()); } void generate(list& sequence, int the_max, int last_terminal = -1) diff --git a/eo/src/gp/node_pool.h b/eo/src/gp/node_pool.h index f541d5f0c..ef5c4b42d 100644 --- a/eo/src/gp/node_pool.h +++ b/eo/src/gp/node_pool.h @@ -1,3 +1,31 @@ +/** + + * Pool allocator for the subtree and parse tree classes (homebrew and not compliant to ANSI allocator requirements) + * (c) copyright Maarten Keijzer 1999, 2000 + + * Permission to copy, use, modify, sell and distribute this software is granted provided + * this copyright notice appears in all copies. This software is provided "as is" without + * express or implied warranty, and with no claim as to its suitability for + * any purpose. + + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + + + * Special disclaimer and political statement: + + * In contrast with the rest of the EO package where you might have found this code, this software + * does NOT fall under the GNU Lesser Public License or the GNU Public License, nor is anyone allowed + * by the copyright holder (that's me) to put it under either license. + * Doing this would limit my and your freedom to use this software in any way + * you or I see fit, including but not limited to closed-source software. I personally do not adher to + * virus-like qualities of the GPL and therefore take the liberty to open this code as wide as I can. + * Furthermore, as this work was carried out in an academic environment and thus paid by the public + * I do not see the need for the same public (which includes commercial companies) + * to be limited in any way to use this software. + +*/ #ifndef node_pool_h #define node_pool_h diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index ea971bbf3..1ac2cf66d 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -4,24 +4,26 @@ /** * Parse_tree and subtree classes - * (c) Maarten Keijzer 1999, 2000 + * (c) copyright Maarten Keijzer 1999, 2000 - * These classes may be used for educational and - * other non-commercial purposes only. Even if I - * wanted to, I am not at liberty to place this file - * under the GNU Lesser Public Library License, as this - * would limit my and my institution's freedom to use - * this file in closed-source software. + * Permission to copy, use, modify, sell and distribute this software is granted provided + * this copyright notice appears in all copies. This software is provided "as is" without + * express or implied warranty, and with no claim as to its suitability for + * any purpose. - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for non-commercial purpose is hereby granted - * without fee, provided the above notices are retained on all copies. * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was + * provided the above notices as well as this one are retained, and a notice that the code was * modified is included with the above copyright notice. - * + + + * Special disclaimer and political statement: + + * In contrast with the rest of the EO package where you might have found this code, this software + * does NOT fall under the GNU Lesser Public License or the GNU Public License, nor is anyone allowed + * by the copyright holder (that's me) to put it under either license. + * Doing this would limit my and your freedom to use this software in any way + * you or I see fit, including but not limited to closed-source software. + Usage information. diff --git a/eo/src/eo1d.h b/eo/src/obsolete/eo1d.h similarity index 100% rename from eo/src/eo1d.h rename to eo/src/obsolete/eo1d.h diff --git a/eo/src/eo1dWDistance.h b/eo/src/obsolete/eo1dWDistance.h similarity index 100% rename from eo/src/eo1dWDistance.h rename to eo/src/obsolete/eo1dWDistance.h diff --git a/eo/src/eo2d.h b/eo/src/obsolete/eo2d.h similarity index 100% rename from eo/src/eo2d.h rename to eo/src/obsolete/eo2d.h diff --git a/eo/src/eo2dVector.h b/eo/src/obsolete/eo2dVector.h similarity index 100% rename from eo/src/eo2dVector.h rename to eo/src/obsolete/eo2dVector.h diff --git a/eo/src/eoAtomBitFlip.h b/eo/src/obsolete/eoAtomBitFlip.h similarity index 96% rename from eo/src/eoAtomBitFlip.h rename to eo/src/obsolete/eoAtomBitFlip.h index f9d769d05..99bf4acb8 100644 --- a/eo/src/eoAtomBitFlip.h +++ b/eo/src/obsolete/eoAtomBitFlip.h @@ -1,57 +1,58 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomBitFlip.h -// Increments or decrements by one a single element -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMBITFLIP_H -#define _EOATOMBITFLIP_H - -/** Flips a single bit -*/ -template -class eoAtomBitFlip: public eoAtomMutator { -public: - - /// - eoAtomBitFlip() {}; - - /// - virtual ~eoAtomBitFlip() {}; - - /// - virtual void operator()( T& _val ) const { - _val = !val; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoAtomBitFlip";}; - //@} - -}; - - -#endif +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAtomBitFlip.h +// Increments or decrements by one a single element +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- +#ifndef _EOATOMBITFLIP_H +#define _EOATOMBITFLIP_H + +/** Flips a single bit +*/ +template +class eoAtomBitFlip: public eoAtomMutator { +public: + + /// + eoAtomBitFlip() {}; + + /// + virtual ~eoAtomBitFlip() {}; + + /// + virtual void operator()( T& _val ) const { + _val = !val; + } + + /** @name Methods from eoObject + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoAtomBitFlip";}; + //@} + +}; + + +#endif + diff --git a/eo/src/eoAtomCreep.h b/eo/src/obsolete/eoAtomCreep.h similarity index 100% rename from eo/src/eoAtomCreep.h rename to eo/src/obsolete/eoAtomCreep.h diff --git a/eo/src/eoAtomMutation.h b/eo/src/obsolete/eoAtomMutation.h similarity index 100% rename from eo/src/eoAtomMutation.h rename to eo/src/obsolete/eoAtomMutation.h diff --git a/eo/src/eoAtomMutator.h b/eo/src/obsolete/eoAtomMutator.h similarity index 73% rename from eo/src/eoAtomMutator.h rename to eo/src/obsolete/eoAtomMutator.h index 7303f16db..ff4eedf4c 100644 --- a/eo/src/eoAtomMutator.h +++ b/eo/src/obsolete/eoAtomMutator.h @@ -24,38 +24,16 @@ #ifndef _EOATOMMUTATOR_H #define _EOATOMMUTATOR_H +#include + /** Abstract base class for functors that modify a single element in an EO that is composed of several atomic components. An atom would, for instance, flip - a bit, or change a real number, or things like that. + a bit, or change a real number, or things like that. The header is completely + empty and thus just provides a name rather than functionality. */ + template -class eoAtomMutator: public eoPrintable { -public: - - /// - eoAtomMutator() {}; - - /// - virtual ~eoAtomMutator() {}; - - /// - virtual void operator()( T& _val ) const = 0; - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - /// - virtual string className() const {return "eoAtomMutator";}; - - /// - void printOn(ostream& _os) const { _os << className() << endl; }; - - //@} - -}; +class eoAtomMutator: public eoUnaryFunctor {}; #endif diff --git a/eo/src/eoAtomRandom.h b/eo/src/obsolete/eoAtomRandom.h similarity index 95% rename from eo/src/eoAtomRandom.h rename to eo/src/obsolete/eoAtomRandom.h index 07d2eb98d..18ca49a8c 100644 --- a/eo/src/eoAtomRandom.h +++ b/eo/src/obsolete/eoAtomRandom.h @@ -36,14 +36,14 @@ class eoAtomRandom: public eoAtomMutator { public: /// - eoAtomRandom( eoRnd& _rng): rng( _rng ) {}; + eoAtomRandom( eoRnd& _rng): rnd( _rng ) {}; /// virtual ~eoAtomRandom() {}; /// Adds the value generated by the RNG to the former value virtual void operator()( T& _val ) const { - _val += rng(); + _val += rnd(); } /** @name Methods from eoObject @@ -56,7 +56,7 @@ public: //@} private: - eoRnd& rng; + eoRnd& rnd; }; diff --git a/eo/src/obsolete/eoBin.h b/eo/src/obsolete/eoBin.h new file mode 100644 index 000000000..544c3bb3b --- /dev/null +++ b/eo/src/obsolete/eoBin.h @@ -0,0 +1,89 @@ +/* + eoBin.h + (c) GeNeura Team 1998 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef eoBin_h +#define eoBin_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // string + +#include + +/** +\defgroup bitstring + + Various functions for a bitstring representation +*/ + +/** eoBin: implementation of binary chromosome. +\class eoBin eoBin.h ga/eoBin.h +\ingroup bitstring + * based on STL's bit_vector (vector). +*/ +template class eoBin: public eoFixedLength +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the binary string. + */ + eoBin(unsigned size = 0, bool value = false): + eoVector(size, value) {} + + /// My class name. + string className() const + { + return "eoBin"; + } + + /** + * To print me on a stream. + * @param os The ostream. + */ + void printOn(ostream& os) const + { + copy(begin(), end(), ostream_iterator(os)); + } + + /** + * To read me from a stream. + * @param is The istream. + */ + void readFrom(istream& is) + { + string bits; + is >> bits; + if (is) + { + resize(bits.size()); + transform(bits.begin(), bits.end(), begin(), + bind2nd(equal_to(), '1')); + } + } +}; + +//----------------------------------------------------------------------------- + +#endif eoBin_h diff --git a/eo/src/eoBreeder.h b/eo/src/obsolete/eoBreeder.h similarity index 92% rename from eo/src/eoBreeder.h rename to eo/src/obsolete/eoBreeder.h index bab14f52c..1cacd7e6a 100644 --- a/eo/src/eoBreeder.h +++ b/eo/src/obsolete/eoBreeder.h @@ -32,9 +32,10 @@ #include #include // eoOp, eoMonOp, eoBinOp #include // eoPop -#include // eoTransform #include // eoOpSelector +#include + #include #include @@ -45,7 +46,8 @@ using namespace std; * For every operator there is a rated to be applyed. * *****************************************************************************/ -template class eoBreeder: public eoMonPopOp +template class eoBreeder: public eoTransform +//eoUnaryFunctor&> { public: /// Default constructor. @@ -62,9 +64,11 @@ template class eoBreeder: public eoMonPopOp { size_t orgsize = pop.size(); - for (unsigned i = 0; i < pop.size(); i++) { - eoOp* op = opSel.Op(); - switch (op->getType()) { + for (unsigned i = 0; i < pop.size(); i++) + { + eoOp* op = opSel.Op(); + switch (op->getType()) + { case eoOp::unary: { eoMonOp* monop = static_cast* >(op); diff --git a/eo/src/eoDetTournamentIndiSelector.h b/eo/src/obsolete/eoDetTournamentIndiSelector.h similarity index 100% rename from eo/src/eoDetTournamentIndiSelector.h rename to eo/src/obsolete/eoDetTournamentIndiSelector.h diff --git a/eo/src/eoDistance.h b/eo/src/obsolete/eoDistance.h similarity index 100% rename from eo/src/eoDistance.h rename to eo/src/obsolete/eoDistance.h diff --git a/eo/src/eoDup.h b/eo/src/obsolete/eoDup.h similarity index 80% rename from eo/src/eoDup.h rename to eo/src/obsolete/eoDup.h index a3ec97665..b41cb7a50 100644 --- a/eo/src/eoDup.h +++ b/eo/src/obsolete/eoDup.h @@ -31,8 +31,8 @@ #include /// Dup or duplicate: duplicates a gene in a chromosome -template -class eoDup: public eoMonOp { +template +class eoDup: public eoMonOp > { public: /// eoDup( ) @@ -42,11 +42,17 @@ public: virtual ~eoDup() {}; /// - virtual void operator()( EOT& _eo ) const + virtual void operator()(eoVariableLength& _eo ) const { - unsigned pos = rng.random(_eo.length()); - _eo.insertGene( pos, _eo.gene(pos) ); - } + unsigned pos = rng.random(_eo.size()); + eoVariableLength::iterator it = begin(); + + while (pos--) {++it;} + + _eo.insert(it, 1, *it); + + _eo.invalidate(); + } /** @name Methods from eoObject diff --git a/eo/src/obsolete/eoES.h b/eo/src/obsolete/eoES.h new file mode 100644 index 000000000..fdc258c3b --- /dev/null +++ b/eo/src/obsolete/eoES.h @@ -0,0 +1,164 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESChrom.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoESCHROM_H +#define _eoESCHROM_H + +// STL libraries +#include // For vector<> +#include +#include +#include // for ostream + +// EO includes +#include + +/**@name Chromosomes for evolution strategies +Each chromosome in an evolution strategies is composed of a vector of floating point +values plus a vector of sigmas, that are added to them during mutation +*/ +//@{ + +/** +\class eoESValue + +*/ +template +struct eoESValue +{ + T value; + + /** + The gene has a mutate member because this particular gaussian mutation + is paradigmatic for an evolution strategy. + */ + void mutate(double sigma, T minimum = T(), T maximum = T()) + { + value += rng.normal(0.0, sigma); + + if (minimum > value) + value = minimum; + if (value > maximum) + value = maximum; + } +}; + +/** +\class eoESGene eoESGene.h es/eoESGene.h +Each gene in an Evolution Strategies is composed of a value plus an standard +deviation, sigma, used for mutation*/ +template +struct eoESGene : public eoESValue +{ + double sigma; + + eoESGene( double _val = 0, double _sigma = 1.0 ): eoESValue( _val ), sigma( _sigma ) {}; + + /** + The gene has a mutate member because the sigma member implies + that the updating routine should use a normal distribution + */ + void mutate(T minimum, T maximum) + { + mutate(sigma, minimum, maximum); + } +}; + +/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 +bool operator < ( eoESGene _e1, eoESGene _e2 ) { + return _e1.val < _e2.val; +} + +/// Tricky operator to avoid errors in some VC++ systems +bool operator == ( eoESGene _e1, eoESGene _e2 ) { + return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; +} + +/// +ostream & operator << ( ostream& _s, const eoESGene& _e ) { + _s << _e.val << ", " << _e.sigma << " | "; + return _s; +} + +/// Dummy >> +istream & operator >> ( istream& _s, const eoESGene& _e ) { + _s >> _e.val; + _s >> _e.sigma; + return _s; +} + + +/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and +Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene +@see eoESGene +*/ +template +class eoESChrom: public eoVector { +public: + /// Basic ctor + eoESChrom( ):eoVector() {}; + + /** Ctor using a couple of random number generators + @param _size Lineal length of the object + @param _rnd a random number generator, which returns a random value each time it´s called. + @param _rndS another one, for the sigma + */ + eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) + : eoVector( _size ){ + for ( iterator i = begin(); i != end(); i ++ ) { + i->val = _rnd(); + i->sigma = _rndS(); + } + }; + + /// Copy ctor + eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; + + /// Assignment operator + const eoESChrom& operator =( const eoESChrom & _eoes ) { + if ( this != &_eoes ){ + eoVector::operator=( _eoes ); + } + return *this; + } + + /// + ~eoESChrom() {}; + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + string className() const {return "eoESChrom";}; + //@} + +}; + +//@} +#endif + diff --git a/eo/src/es/eoESChrom.h b/eo/src/obsolete/eoESChrom.h similarity index 77% rename from eo/src/es/eoESChrom.h rename to eo/src/obsolete/eoESChrom.h index 495a9ba6c..dc51db0de 100644 --- a/eo/src/es/eoESChrom.h +++ b/eo/src/obsolete/eoESChrom.h @@ -41,11 +41,49 @@ values plus a vector of sigmas, that are added to them during mutation */ //@{ -/** Each gene in an Evolution Strategies is composed of a value plus an standard +/** +\class eoESValue + +*/ +template +struct eoESValue +{ + T value; + + /** + The gene has a mutate member because this particular gaussian mutation + is paradigmatic for an evolution strategy. + */ + void mutate(double sigma, T minimum, T maximum) + { + value += rng.normal(0.0, sigma); + + if (minimum > value) + value = minimum; + if (value > maximum) + value = maximum; + } +}; + +/** +\class eoESGene eoESGene.h es/eoESGene.h +Each gene in an Evolution Strategies is composed of a value plus an standard deviation, sigma, used for mutation*/ -struct eoESGene { - double val, sigma; - eoESGene( double _val = 0, double _sigma = 0 ): val( _val ), sigma( _sigma ) {}; +template +struct eoESGene : public eoESValue +{ + double sigma; + + eoESGene( double _val = 0, double _sigma = 1.0 ): eoESValue( _val ), sigma( _sigma ) {}; + + /** + The gene has a mutate member because the sigma member implies + that the updating routine should use a normal distribution + */ + void mutate(T minimum, T maximum) + { + mutate(sigma, minimum, maximum); + } }; /// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 diff --git a/eo/src/es/eoESFullChrom.h b/eo/src/obsolete/eoESFullChrom.h similarity index 94% rename from eo/src/es/eoESFullChrom.h rename to eo/src/obsolete/eoESFullChrom.h index 04090c466..e8e674573 100644 --- a/eo/src/es/eoESFullChrom.h +++ b/eo/src/obsolete/eoESFullChrom.h @@ -48,7 +48,7 @@ Each individual in an evolution strategy is composed of a vector of std deviations a vector of rotation angles (for correlated mutations) -THese individuals CANNOT BE IMPLEMENTED as vectors of anything +These individuals CANNOT BE IMPLEMENTED as vectors of anything at least in the case of correlated mutations */ //@{ @@ -69,18 +69,11 @@ class eoESFullChrom : public eoVector { verbose( _verbose ), ObjMin( _ObjMin ), ObjMax(_ObjMax ), - StdDevInit( _StdDevInit ) {} + StdDevInit( _StdDevInit ) + { // check consistency + } - /// copy constructor - eoESFullChrom( const eoESFullChrom& _eo ): - eoVector ( _eo ), // ObjVar ( _eo.ObjVar ), - StdDev ( _eo.StdDev ), CorCff( _eo.CorCff ), verbose( _eo.verbose ), - ObjMin( _eo.ObjMin ), ObjMax(_eo.ObjMax ), StdDevInit( _eo.StdDevInit ) {} - - /* another constructor, for compatibility reasons */ - eoESFullChrom(istream& _s) { cout << "Not Yet implemented\n";exit(1);}; - /* And now the useful constructor: from a parser (should be in the factory, if such a thing exists one day for eoESFullChrom */ @@ -266,6 +259,9 @@ private: }; + + + #endif diff --git a/eo/src/obsolete/eoESFullMut.h b/eo/src/obsolete/eoESFullMut.h new file mode 100644 index 000000000..5d2d2fa78 --- /dev/null +++ b/eo/src/obsolete/eoESFullMut.h @@ -0,0 +1,261 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoESMute.h : ES mutation +// (c) Maarten Keijzer 2000 & GeNeura Team, 1998 for the EO part +// Th. Baeck 1994 and EEAAX 1999 for the ES part +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOESMUT_H +#define _EOESMUT_H + +#include +#include +#include // for exp + +#include +#include +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +/** ES-style mutation in the large: Obviously, valid only for eoES* + + It is currently valid for three types of ES chromosomes: + + eoEsSimple: only 1 std deviation + eoEsStdev: as many standard deviations as object variables + eoEsFull: The whole guacemole: correlations, stdevs and object variables + + Each of these three variant has it's own operator() in eoEsMutate +*/ + +template +class eoESMutate: public eoMonOp< EOT > { +public: + + typedef EOT::Fitness FitT; + + /** Initialization + parameters: + + @param _init proxy class for initializating the three parameters eoEsMutate needs + @param _bounds the bounds for the objective variables + */ + eoESMutate(eoESMutationInit& _init, eoESObjectiveBounds& _bounds) : bounds(_bounds) + { + unsigned size = bounds.chromSize(); + + if (eoEsInfo::single_stdev) + { + TauLcl = _init.TauLcl(); + TauLcl /= sqrt((double) size); + } + else + { + TauLcl = _init.TauLcl(); + TauGlb = _init.TauGlb(); + + // renormalization + TauLcl /= sqrt( 2.0 * sqrt( (double)size ) ); + TauGlb /= sqrt( 2.0 * ( (double) size ) ); + + if (eoEsInfo::has_correlation) + { // Correlated Mutations + TauBeta = _init.TauBeta(); + } + } + } + + /// needed virtual dtor + virtual ~eoESMutate() {}; + + /** Inherited from eoObject + @see eoObject + */ + virtual string className() const {return "eoESMutate";}; + + /** + Mutate eoEsSimple + */ + virtual void operator()( eoEsSimple& _eo) const + { + _eo.stdev *= exp(TauLcl * rng.normal()); + + if (_eo.stdev < eoEsInfo::stdev_eps) + _eo.stdev = eoEsInfo::stdev_eps; + + // now apply to all + + for (unsigned i = 0; i < _eo.size(); ++i) + { + _eo[i] += _eo.stdev * rng.normal(); + } + + keepInBounds(_eo); + } + + /// mutations - standard and correlated + // ========= + /* + * Standard mutation of object variables and standard + * deviations in ESs. + * If there are fewer different standard deviations available + * than the dimension of the objective function requires, the + * last standard deviation is responsible for ALL remaining + * object variables. + * Schwefel 1977: Numerische Optimierung von Computer-Modellen + * mittels der Evolutionsstrategie, pp. 165 ff. + */ + + virtual void operator()( eoESStdev& _eo ) const + { + double global = exp(TauGlb * rng.normal()); + for (unsigned i = 0; i < _eo.size(); i++) + { + double stdev = _eo.stdevs[i]; + stdev *= global * exp(TauLcl * rng.normal()); + + if (stdev < eoEsInfo::stdev_eps) + stdev = eoEsInfo::stdev_eps; + + _eo.stdevs[i] = stdev; + _eo[i] += stdev * rng.normal(); + } + + keepInBounds(_eo); + } + + /* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + + // Code from Thomas Baeck + + virtual void operator()( eoEsFull & _eo ) const + { + + /* + * First: mutate standard deviations (as above). + */ + + double global = exp(TauGlb * rng.normal()); + for (unsigned i = 0; i < _eo.size(); i++) + { + double stdev = _eo.stdevs[i]; + stdev *= global * exp(TauLcl * rng.normal()); + + if (stdev < eoEsInfo::stdev_eps) + stdev = eoEsInfo::stdev_eps; + + _eo.stdevs[i] = stdev; + } + + + /* + * Mutate rotation angles. + */ + + for (i = 0; i < _eo.correlations.size(); i++) + { + _eo.correlations[i] += TauBeta * rng.normal(); + if ( fabs(_eo.correlations[i]) > M_PI ) + { + _eo.correlations[i] -= M_PI * (int) (_eo.correlations[i]/M_PI) ; + } + } + + /* + * Perform correlated mutations. + */ + unsigned i,k; + + vector VarStp(_eo.size()); + for (i = 0; i < _eo.size(); i++) + VarStp[i] = _eo.stdevs[i] * rng.normal(); + + unsigned nq = _eo.correlations.size() - 1; + + for (k = 0; k < _eo.size()-1; k++) + { + n1 = _eo.size() - k - 1; + n2 = _eo.size() - 1; + + for (i = 0; i < k; i++) + { + d1 = VarStp[n1]; + d2 = VarStp[n2]; + S = sin( _eo.correlations[nq] ); + C = cos( _eo.correlations[nq] ); + VarStp[n2] = d1 * S + d2 * C; + VarStp[n1] = d1 * C - d2 * S; + n2--; + nq--; + } + } + + for (i = 0; i < _eo.size(); i++) + _eo[i] += VarStp[i]; + + keepInBounds(_eo); + } + + void keepInBounds(EOT& _eo) const + { + for (unsigned i = 0; i < _eo.size(); ++i) + { + if (_eo[i] < bounds.minimum(i)) + _eo[i] = bounds.minimum(i); + else if (_eo[i] > bounds.maximum(i)) + _eo[i] = bounds.maximum(i); + } + } + + private : + // the data + //========= + double TauLcl; /* Local factor for mutation of std deviations */ + double TauGlb; /* Global factor for mutation of std deviations */ + double TauBeta; /* Factor for mutation of correlation parameters */ + + eoESObjectiveBounds& bounds; +}; + +/* + * Correlated mutations in ESs, according to the following + * sources: + * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 + * p. 43, 1980 + * G. Rudolph: Globale Optimierung mit parallelen Evolutions- + * strategien, Diploma Thesis, University of Dortmund, 1990 + */ + +#endif + diff --git a/eo/src/eoEvalFuncPtrCnt.h b/eo/src/obsolete/eoEvalFuncPtrCnt.h similarity index 100% rename from eo/src/eoEvalFuncPtrCnt.h rename to eo/src/obsolete/eoEvalFuncPtrCnt.h diff --git a/eo/src/eoFitTerm.h b/eo/src/obsolete/eoFitTerm.h similarity index 59% rename from eo/src/eoFitTerm.h rename to eo/src/obsolete/eoFitTerm.h index 503756cda..4dded6092 100644 --- a/eo/src/eoFitTerm.h +++ b/eo/src/obsolete/eoFitTerm.h @@ -25,42 +25,34 @@ #ifndef _EOFITTERM_H #define _EOFITTERM_H -#include +#include -/** Fitness termination: terminates after a the difference between the -fitness of the best individual and a maximum fitness to achieve is less -than certain number called epsilon., i.e., |maximum-fitness| -class eoFitTerm: public eoTerm { +class eoFitContinue: public eoContinue { public: - /// Ctors/dtors - eoFitTerm( const float _maximum, const float _epsilon ) - : eoTerm (), maximum( _maximum ), epsilon(_epsilon){}; + /// Define Fitness + typedef typename EOT::Fitness FitnessType; - /// Copy ctor - eoFitTerm( const eoFitTerm& _t ) - : eoTerm ( _t ), maximum( _t.maximum ), - epsilon(_t.epsilon){}; - - /// - virtual ~eoFitTerm() {}; + /// Ctor + eoFitContinue( const FitnessType _maximum) + : eoContinuator (), maximum( _maximum ) {}; /** Returns false when a fitness criterium is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - float bestFitness=_vEO[0].fitness(); - float dif=bestFitness-maximum; - dif=(dif<0)?-dif:dif; - return (dif>epsilon ) || (bestFitness > maximum); + * reached, assumes sorted population */ + virtual bool operator() ( const eoPop& _vEO ) + { + return (bestFitness < maximum); } - std::string className(void) const { return "eoFitTerm"; } - private: - float maximum, epsilon; + FitnessType maximum; }; #endif diff --git a/eo/src/eoFitness.h b/eo/src/obsolete/eoFitness.h similarity index 100% rename from eo/src/eoFitness.h rename to eo/src/obsolete/eoFitness.h diff --git a/eo/src/eoGenTerm.h b/eo/src/obsolete/eoGenTerm.h similarity index 76% rename from eo/src/eoGenTerm.h rename to eo/src/obsolete/eoGenTerm.h index a3a0ef19a..6a52cdb8e 100644 --- a/eo/src/eoGenTerm.h +++ b/eo/src/obsolete/eoGenTerm.h @@ -25,36 +25,19 @@ #ifndef _EOGENTERM_H #define _EOGENTERM_H -#include +#include -/** Generational termination: terminates after a number of generations +/** Generational continuator: continues until a number of generations is reached */ template< class EOT> -class eoGenTerm: public eoTerm { +class eoGenContinue: public eoContinue { public: /// Ctors/dtors - eoGenTerm( unsigned _totalGens) - : eoTerm (), repTotalGenerations( _totalGens ), + eoGenContinue( unsigned _totalGens) + : repTotalGenerations( _totalGens ), thisGeneration(0){}; - /// Copy Ctor - eoGenTerm( const eoGenTerm& _t) - : eoTerm ( _t ), repTotalGenerations( _t.repTotalGenerations ), - thisGeneration(0){}; - - /// Assignment Operator - const eoGenTerm& operator = ( const eoGenTerm& _t) { - if ( &_t != this ) { - repTotalGenerations = _t.repTotalGenerations; - thisGeneration = 0; - } - return *this; - } - - /// Dtor - virtual ~eoGenTerm() {}; - /** Returns false when a certain number of generations is * reached */ virtual bool operator() ( const eoPop& _vEO ) { diff --git a/eo/src/eoGeneration.h b/eo/src/obsolete/eoGeneration.h similarity index 96% rename from eo/src/eoGeneration.h rename to eo/src/obsolete/eoGeneration.h index 01d2bbf25..93cdfd3be 100644 --- a/eo/src/eoGeneration.h +++ b/eo/src/obsolete/eoGeneration.h @@ -26,7 +26,6 @@ #define eoGeneration_h //----------------------------------------------------------------------------- -#include #include // eoPop #include #include // eoSelect, eoTranform, eoMerge @@ -41,8 +40,8 @@ template class eoGeneration: public eoAlgo { public: /// Constructor. - eoGeneration(eoBinPopOp& _select, - eoMonPopOp& _transform, + eoGeneration(eoSelect& _select, + eoBreeder& _breeder, eoBinPopOp& _replace, eoEvalFunc& _evaluator): select(_select), transform(_transform), diff --git a/eo/src/eoID.h b/eo/src/obsolete/eoID.h similarity index 100% rename from eo/src/eoID.h rename to eo/src/obsolete/eoID.h diff --git a/eo/src/eoInclusion.h b/eo/src/obsolete/eoInclusion.h similarity index 100% rename from eo/src/eoInclusion.h rename to eo/src/obsolete/eoInclusion.h diff --git a/eo/src/eoInsertion.h b/eo/src/obsolete/eoInsertion.h similarity index 94% rename from eo/src/eoInsertion.h rename to eo/src/obsolete/eoInsertion.h index 6f9616a8e..39c65b1ae 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/obsolete/eoInsertion.h @@ -40,7 +40,7 @@ * from the original population. *****************************************************************************/ -template class eoInsertion: public eoMerge +template class eoInsertion: public eoBinaryFunctor&, const eoPop&> { public: /// (Default) Constructor. @@ -57,7 +57,7 @@ template class eoInsertion: public eoMerge * @param breeders The population of breeders. Should be sorted to work correctly * @param pop The original population. */ - void operator()( eoPop& _breeders, eoPop& _pop) + void operator()( eoPop& _breeders, const eoPop& _pop) { unsigned target = static_cast((_pop.size() * rate())); diff --git a/eo/src/eoKill.h b/eo/src/obsolete/eoKill.h similarity index 100% rename from eo/src/eoKill.h rename to eo/src/obsolete/eoKill.h diff --git a/eo/src/eoLottery.h b/eo/src/obsolete/eoLottery.h similarity index 94% rename from eo/src/eoLottery.h rename to eo/src/obsolete/eoLottery.h index a79b83da6..a96c54e46 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/obsolete/eoLottery.h @@ -30,6 +30,7 @@ #include // logic_error #include // sum_fitness +#include // #include // // #include // accumulate @@ -44,7 +45,7 @@ */ //----------------------------------------------------------------------------- -template class eoLottery: public eoBinPopOp +template class eoLottery: public eoBinaryFunctor&, eoPop& > { public: /// (Default) Constructor. @@ -61,7 +62,7 @@ template class eoLottery: public eoBinPopOp * BUT what happens if breeders is already too big? * Too big for what? */ - void operator()( eoPop& pop, eoPop& breeders) + void operator()(const eoPop& pop, eoPop& breeders) { size_t target = static_cast(rate_ * pop.size()); diff --git a/eo/src/eoMutation.h b/eo/src/obsolete/eoMutation.h similarity index 100% rename from eo/src/eoMutation.h rename to eo/src/obsolete/eoMutation.h diff --git a/eo/src/eoNegExp.h b/eo/src/obsolete/eoNegExp.h similarity index 100% rename from eo/src/eoNegExp.h rename to eo/src/obsolete/eoNegExp.h diff --git a/eo/src/eoNonUniform.h b/eo/src/obsolete/eoNonUniform.h similarity index 100% rename from eo/src/eoNonUniform.h rename to eo/src/obsolete/eoNonUniform.h diff --git a/eo/src/eoNormal.h b/eo/src/obsolete/eoNormal.h similarity index 100% rename from eo/src/eoNormal.h rename to eo/src/obsolete/eoNormal.h diff --git a/eo/src/eoPopOps.h b/eo/src/obsolete/eoPopOps.h similarity index 100% rename from eo/src/eoPopOps.h rename to eo/src/obsolete/eoPopOps.h diff --git a/eo/src/eoRandomBreed.h b/eo/src/obsolete/eoRandomBreed.h similarity index 100% rename from eo/src/eoRandomBreed.h rename to eo/src/obsolete/eoRandomBreed.h diff --git a/eo/src/eoRandomIndiSelector.h b/eo/src/obsolete/eoRandomIndiSelector.h similarity index 100% rename from eo/src/eoRandomIndiSelector.h rename to eo/src/obsolete/eoRandomIndiSelector.h diff --git a/eo/src/eoRandomSelect.h b/eo/src/obsolete/eoRandomSelect.h similarity index 100% rename from eo/src/eoRandomSelect.h rename to eo/src/obsolete/eoRandomSelect.h diff --git a/eo/src/eoRank.h b/eo/src/obsolete/eoRank.h similarity index 83% rename from eo/src/eoRank.h rename to eo/src/obsolete/eoRank.h index 1412bc8a9..67d6707f3 100644 --- a/eo/src/eoRank.h +++ b/eo/src/obsolete/eoRank.h @@ -48,21 +48,14 @@ */ template -class eoRank: public eoSelect{ +class eoRank: public eoSelect, public eoObject, public eoPrintable +{ public: /// Ctor eoRank( unsigned _newPopSize, eoOpSelector& _opSelector) - :eoSelect(), opSelector( _opSelector ), repNewPopSize( _newPopSize ) {}; - - /** Copy ctor - * Needs a copy ctor for the EO operators */ - eoRank( const eoRank& _rankBreeder) - :eoSelect( _rankBreeder), - - opSelector( _rankBreeder.opSelector ), repNewPopSize( _rankBreeder.repNewPopSize ) {}; - + /// Dtor virtual ~eoRank() {}; @@ -79,12 +72,10 @@ class eoRank: public eoSelect{ for ( unsigned i = 0; i < repNewPopSize; i ++ ) { // Create a copy of a random input EO with copy ctor. The members of the - // population will be selected by rank, with a certain probability of - // being selected several times if the new population is bigger than the - // old + EOT newEO = _ptVeo[ i%inLen ]; // Choose operator @@ -128,22 +119,9 @@ class eoRank: public eoSelect{ virtual string className() const { return "eoRank"; }; - - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - - it can be reimplemented anywhere. Instance from base classes are processed in - - base classes, so you don´t have to worry about, for instance, fitness. - - @param _s the ostream in which things are written*/ - - virtual void printOn( ostream& _s ) const{ - - _s << opSelector; - - _s << repNewPopSize; - + virtual void printOn( ostream& _s ) const + { + _s << repNewPopSize; }; diff --git a/eo/src/eoRnd.h b/eo/src/obsolete/eoRnd.h similarity index 100% rename from eo/src/eoRnd.h rename to eo/src/obsolete/eoRnd.h diff --git a/eo/src/eoScheme.h b/eo/src/obsolete/eoScheme.h similarity index 100% rename from eo/src/eoScheme.h rename to eo/src/obsolete/eoScheme.h diff --git a/eo/src/other/eoStringMutation.h b/eo/src/obsolete/eoStringMutation.h similarity index 94% rename from eo/src/other/eoStringMutation.h rename to eo/src/obsolete/eoStringMutation.h index 5cebc8ebc..ee8590dea 100644 --- a/eo/src/other/eoStringMutation.h +++ b/eo/src/obsolete/eoStringMutation.h @@ -28,7 +28,7 @@ #include // EO includes #include -#include +#include #include /** Mutation of an eoString. @@ -65,9 +65,8 @@ class eoStringMutation: public eoMutation { /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. virtual void applyAt( EOT& _eo, unsigned _i ) const { - eoUniform uniform( 0, 1 ); if( rate < uniform() ) { - _eo.gene(_i) += ( uniform()>=0.5 )? (1) : (-1) ; + _eo.gene(_i) += ( rng.flip(0.5))? (1) : (-1) ; } } diff --git a/eo/src/eoTerm.h b/eo/src/obsolete/eoTerm.h similarity index 100% rename from eo/src/eoTerm.h rename to eo/src/obsolete/eoTerm.h diff --git a/eo/src/eoTournament.h b/eo/src/obsolete/eoTournament.h similarity index 100% rename from eo/src/eoTournament.h rename to eo/src/obsolete/eoTournament.h diff --git a/eo/src/eoTranspose.h b/eo/src/obsolete/eoTranspose.h similarity index 51% rename from eo/src/eoTranspose.h rename to eo/src/obsolete/eoTranspose.h index 111da025a..7d2a8d74c 100644 --- a/eo/src/eoTranspose.h +++ b/eo/src/obsolete/eoTranspose.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoTranspose.h -// (c) GeNeura Team, 1998 +// (c) GeNeura Team, 1998 Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -25,66 +25,69 @@ #ifndef _EOTRANSPOSE_h #define _EOTRANSPOSE_h +#include +#include + #include - #include - -/** Transposition operator: interchanges the position of two genes -of an EO. These positions must be defined by an only index, that is, -EOT must subclass eo1d +#include +#include +/** +Transposition operator: interchanges the position of two genes +of an EO. */ template -class eoTranspose: public eoMonOp { +class eoTranspose: public eoMonOp +{ public: - /// - eoTranspose() - : eoMonOp< EOT >( ){}; - /// needed virtual dtor - virtual ~eoTranspose() {}; + // Specialization for a vector + void operator()(eoFixedLength& _eo ) + { + unsigned pos1 = rng.random(_eo.size()), + pos2 = rng.random(_eo.size()); - /// - virtual void operator()( EOT& _eo ) const { - unsigned pos1 = uniform(), - pos2 = rng.random(_eo.length()); - applyAt( _eo, pos1, pos2 ); + if (pos1 != pos2) + swap(_eo[pos1], _eo[pos2]); + + if (_eo[pos1] != _eo[pos2]) + _eo.invalidate(); + } + + // Specialization for a list + void operator()(eoVariableLength& _eo ) + { + unsigned pos1 = rng.random(_eo.size()), + pos2 = rng.random(_eo.size()); + + if (pos1 == pos2) + return; + + if (pos1 > pos2) + swap(pos1,pos2); + + pos2 -= pos1; + + typename EOT::iterator it1 = _eo.begin(); + + while (pos1--) {it1++;} + + typename EOT::iterator it2 = it1; + + while (pos2--) {it2++;} + + swap(*it1, *it2); + + if (*it1 != *it2) + _eo.invalidate(); } - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ /** Inherited from eoObject @see eoObject */ virtual string className() const {return "eoTranspose";}; //@} - -private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /** applies operator to one gene in the EO - @param _eo victim of transposition - @param i, j positions of the genes that are going to be changed - @throw runtime_exception if the positions to write are incorrect - */ - virtual void applyAt( EOT& _eo, unsigned _i, unsigned _j) const { - try { - Type tmp = _eo.gene( _i ); - _eo.gene( _i ) = _eo.gene( _j ); - _eo.gene( _j ) = tmp; - } catch ( exception& _e ) { - string msg = _e.what(); - msg += "Caught exception at eoTranspose"; - throw runtime_error( msg.c_str() ); - } - } - + }; #endif diff --git a/eo/src/eoUniform.h b/eo/src/obsolete/eoUniform.h similarity index 100% rename from eo/src/eoUniform.h rename to eo/src/obsolete/eoUniform.h diff --git a/eo/src/eoUniformXOver.h b/eo/src/obsolete/eoUniformXOver.h similarity index 100% rename from eo/src/eoUniformXOver.h rename to eo/src/obsolete/eoUniformXOver.h diff --git a/eo/src/eoVector.h b/eo/src/obsolete/eoVector.h similarity index 100% rename from eo/src/eoVector.h rename to eo/src/obsolete/eoVector.h diff --git a/eo/src/eoXOver2.h b/eo/src/obsolete/eoXOver2.h similarity index 100% rename from eo/src/eoXOver2.h rename to eo/src/obsolete/eoXOver2.h diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 5094a7ecf..37e1036af 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -40,8 +40,6 @@ class eoExternalEO : public EO, virtual public External { public : - typedef External Type; - eoExternalEO(void) : EO(), External() {} /** diff --git a/eo/src/other/eoExternalOpFunctions.h b/eo/src/other/eoExternalOpFunctions.h index b27dd93b1..73620b412 100644 --- a/eo/src/other/eoExternalOpFunctions.h +++ b/eo/src/other/eoExternalOpFunctions.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include /** @@ -41,18 +41,20 @@ Where External is the user defined struct or class */ -template -class eoExternalInit : public eoRnd > +template > +class eoExternalInit : public eoInit { public : - - typedef eoExternalEO ExternalEO; eoExternalInit(External (*_init)(void)) : init(_init) {} - ExternalEO operator()(void) { return (*init)(); } + void operator()(ExternalEO& _eo) + { + _eo = (*init)(); + _eo.invalidate(); + } private : @@ -67,18 +69,17 @@ private : Where External is the user defined struct or class and Fit the fitness type */ -template -class eoExternalEvalFunc : public eoEvalFunc > +template > +class eoExternalEvalFunc : public eoEvalFunc { public : - typedef eoExternalEO ExternalEO; - eoExternalEvalFunc(F (*_eval)(const External&)) : eval(_eval) {} - void operator()(ExternalEO& eo) const + void operator()(ExternalEO& eo) { - eo.fitness( (*eval)(eo) ); + if (eo.invalid()) + eo.fitness( (*eval)(eo) ); } private : @@ -90,88 +91,86 @@ class eoExternalEvalFunc : public eoEvalFunc > Mutation of external struct, ctor expects a function of the following signature: - void func(External&); + bool func(External&); - Where External is the user defined struct or class + + Where External is the user defined struct or class. + The function should return true when it changed something, false otherwise */ -template -class eoExternalMonOp : public eoMonOp > +template > +class eoExternalMonOp : public eoMonOp { public : - typedef eoExternalEO ExternalEO; + eoExternalMonOp(bool (*_mutate)(External&)) : mutate(_mutate) {} - eoExternalMonOp(void (*_mutate)(External&)) : mutate(_mutate) {} - - void operator()(ExternalEO& eo) const + void operator()(ExternalEO& eo) { - (*mutate)(eo); - eo.invalidate(); + if ((*mutate)(eo)) + eo.invalidate(); } private : - void (*mutate)(External&); + bool (*mutate)(External&); }; /** Crossover of external struct, ctor expects a function of the following signature: - void func(External&, const External&); + bool func(External&, const External&); Where External is the user defined struct or class + The function should return true when it changed something, false otherwise */ -template -class eoExternalBinOp : public eoBinOp > +template > +class eoExternalBinOp : public eoBinOp { public : - typedef eoExternalEO ExternalEO; + eoExternalBinOp(bool (*_binop)(External&, const External&)) : binop(_binop) {} - eoExternalBinOp(void (*_binop)(External&, const External&)) : binop(_binop) {} - - void operator()(ExternalEO& eo1, const ExternalEO& eo2) const + void operator()(ExternalEO& eo1, const ExternalEO& eo2) { - (*binop)(eo1, eo2); - eo1.invalidate(); + if ((*binop)(eo1, eo2)) + eo1.invalidate(); } private : - void (*binop)(External&, const External&); + bool (*binop)(External&, const External&); }; /** Crossover of external struct, ctor expects a function of the following signature: - void func(External&, External&); + bool func(External&, External&); Where External is the user defined struct or class + The function should return true when it changed something, false otherwise */ -template -class eoExternalQuadraticOp : public eoQuadraticOp > +template > +class eoExternalQuadraticOp : public eoQuadraticOp { public : - typedef eoExternalEO ExternalEO; + eoExternalQuadraticOp(bool (*_quadop)(External&, External&)) : quadop(_quadop) {} - eoExternalQuadraticOp(void (*_quadop)(External&, External&)) : quadop(_quadop) {} - - void operator()(ExternalEO& eo1, ExternalEO& eo2) const + void operator()(ExternalEO& eo1, ExternalEO& eo2) { - (*quadop)(eo1, eo2); - eo1.invalidate(); - eo2.invalidate(); + if ((*quadop)(eo1, eo2)) + { + eo1.invalidate(); + eo2.invalidate(); + } } private : - void (*quadop)(External&, External&); + bool (*quadop)(External&, External&); }; - - #endif diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index d1ba55b44..88e6d4636 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -31,105 +31,23 @@ using namespace std; -// EO headers -#include - //----------------------------------------------------------------------------- // eoString //----------------------------------------------------------------------------- /** Adaptor that turns an STL string into an EO */ template -class eoString: public eo1d, public string { +class eoString: public EO, public string +{ public: + typedef char Type; + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator //@{ /// ctor eoString( const string& _str ="" ) - : eo1d(), string( _str ) {}; - - - /** Ctor using a random number generator - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called - */ - eoString( unsigned _size, eoRnd& _rnd ) - : eo1d(), string(){ - for ( unsigned i = 0; i < _size; i ++ ) { - *this += _rnd(); - } - }; - - /** Ctor from a stream - @param _s input stream - */ - eoString( istream & _s ) - : eo1d(){ - _s >> *this; - }; - - /// copy ctor - eoString( const eoString& _eoStr ) - :eo1d( static_cast & > ( _eoStr ) ), - string( _eoStr ){}; - - /// Assignment operator - const eoString& operator =( const eoString& _eoStr ) { - if ( this != & _eoStr ) { - eo1d::operator = ( _eoStr ); - string::operator = ( _eoStr ); - } - return *this; - } - - /// dtor - virtual ~eoString() {}; -//@} - - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual char getGene( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading gene"); - return (*this)[_i]; - }; - - /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size - */ - virtual void setGene( unsigned _i, const char& _value ) { - if ( _i >= size() ) - throw out_of_range( "out_of_range when writing a gene"); - (*this)[_i] = _value; - }; - - /** Inserts a value after _i, displacing anything to the right - @exception out_of_range if _i is larger than EO´s size - */ - virtual void insertGene( unsigned _i, char _val ) { - if (_i <= this->size() ) { - string::iterator i = this->begin()+_i; - this->insert( i, _val ); - } else - throw out_of_range( "out_of_range when inserting gene"); - }; - - /** Eliminates the gene at position _i - @exception out_of_range if _i is larger than EO´s size - */ - virtual void deleteGene( unsigned _i ) { - if (_i < this->size() ) { - string::iterator i = this->begin()+_i; - this->erase( i ); - } else - throw out_of_range( "out_of_range when deleting gene"); - }; - - /// methods that implement the EO protocol - virtual unsigned length() const { return this->size(); }; + : string( _str ) {}; /** @name Methods from eoObject readFrom and printOn are directly inherited from eo1d diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 455e723ba..77beb7501 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -7,7 +7,9 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libeoutils.a -libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp +libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h checkpointing eoCheckPoint.h +libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h checkpointing eoCheckPoint.h eoStdoutMonitor.h + + diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index f13ac85a7..dba79bcef 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -2,5 +2,6 @@ #include #include #include +#include #include #include \ No newline at end of file diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 537b60cda..c7abcef7b 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -27,30 +27,30 @@ #ifndef _eoCheckPoint_h #define _eoCheckPoint_h -#include +#include template class eoStatBase; class eoMonitor; class eoUpdater; template -class eoCheckPoint : public eoTerm +class eoCheckPoint : public eoContinue { public : - eoCheckPoint(eoTerm& _term) : term(_term) {} + eoCheckPoint(eoContinue& _cont) : cont(_cont) {} bool operator()(const eoPop& _pop); void add(eoStatBase& _stat) { stats.push_back(&_stat); } - void add(eoMonitor& _mon) { monitors.push_back(&_mon); } - void add(eoUpdater& _upd) { updaters.push_back(&_upd); } + void add(eoMonitor& _mon) { monitors.push_back(&_mon); } + void add(eoUpdater& _upd) { updaters.push_back(&_upd); } std::string className(void) const { return "eoCheckPoint"; } private : - eoTerm& term; + eoContinue& cont; std::vector*> stats; std::vector monitors; std::vector updaters; @@ -69,7 +69,7 @@ bool eoCheckPoint::operator()(const eoPop& _pop) for (i = 0; i < monitors.size(); ++i) (*monitors[i])(); - return term(_pop); + return cont(_pop); } #endif \ No newline at end of file diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index 43dbeb607..241f715ff 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -23,13 +23,13 @@ eoMonitor& eoFileMonitor::operator()(void) throw runtime_error(str); } - iterator it = begin(); + iterator it = vec.begin(); os << (*it)->longName(); ++it; - for (; it != end(); ++it) + for (; it != vec.end(); ++it) { os << ',' << (*it)->longName(); } @@ -44,11 +44,11 @@ eoMonitor& eoFileMonitor::operator()(void) throw runtime_error(str); } - iterator it = begin(); + iterator it = vec.begin(); os << '\n' << (*it)->getValue(); - for(++it; it != end(); ++it) + for(++it; it != vec.end(); ++it) { os << ',' << (*it)->getValue(); } diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index d79d8245e..e4e44e3fa 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -20,7 +20,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk + mak@dhi.dk */ //----------------------------------------------------------------------------- @@ -30,6 +30,8 @@ #include +#include + class eoParam; /** @@ -39,16 +41,16 @@ class eoParam; will stream or pipe the current values of the parameters to wherever you want it streamed or piped to. */ -class eoMonitor : public std::vector +class eoMonitor : public eoProcedure { public : - virtual ~eoMonitor() {} + void add(const eoParam& _param) { vec.push_back(&_param); } - /** Just do it! */ - virtual eoMonitor& operator()(void) = 0; - void add(const eoParam& _param) { push_back(&_param); } +protected : + typedef std::vector::iterator iterator; + std::vector vec; }; #endif \ No newline at end of file diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 4dba2c3ba..dfd6b3fa4 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -187,8 +187,10 @@ void eoValueParam::setValue(std::string _value) /// Because MSVC does not support partial specialization, the pair is a double, not a T template <> std::string eoValueParam >::getValue(void) const -{ - std::ostrstream os; +{ + // use own buffer as MSVC's buffer leaks! + char buff[1024]; + std::ostrstream os(buff, 1024); os << repValue.first << ' ' << repValue.second << std::ends; return os.str(); } diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index a3950638f..fadc1aa23 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -1,5 +1,7 @@ #include #include "eoRNG.h" +/// The global object, should probably be initialized with an xor +/// between time and process_id. eoRng rng((uint32) time(0)); diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 1dcd0a616..235847465 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -176,7 +176,15 @@ public : { return mean + normal(stdev); } - + + /** + Generates random numbers using a negative exponential distribution + */ + double negexp(double mean) + { + return ( -mean*log((double)rand() / rand_max())); + } + /** rand() returns a random number in the range [0, rand_max) */ @@ -273,55 +281,6 @@ private : */ extern eoRng rng; -/** - The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 -*/ -template class uniform_generator -{ - public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - - virtual T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; - eoRng& uniform; -}; - -/** - The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). -*/ -template class random_generator -{ - public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - - virtual T operator()(void) { return (T) random.random(max); } - - private : - T maxim; - eoRng& random; -}; - -/** - The class normal_generator can be used in the STL generate function - to easily generate gaussian distributed floats and doubles. The user - can supply a standard deviation which defaults to 1. -*/ -template class normal_generator -{ - public : - normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - - virtual T operator()(void) { return (T) normal.normal(stdev); } - - private : - T stdev; - eoRng& normal; -}; - // Implementation of some eoRng members.... Don't mind the mess, it does work. diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 78b1778c6..a7d3c72f1 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -27,11 +27,12 @@ #ifndef _eoStat_h #define _eoStat_h +#include #include #include template -class eoStatBase +class eoStatBase : public eoUnaryFunctor&> { public : virtual ~eoStatBase(){} @@ -98,7 +99,7 @@ public : double n = _pop.size(); value().first = result.first / n; // average - value().second = sqrt( (result.second - value().first) / (n - 1.0)); // stdev + value().second = sqrt( (result.second - n * value().first * value().first) / (n - 1.0)); // stdev } }; diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp new file mode 100644 index 000000000..23ec63bbe --- /dev/null +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -0,0 +1,37 @@ +#include +#include +#include + +#include +#include +#include + +using namespace std; + +eoMonitor& eoStdoutMonitor::operator()(void) +{ + if (firsttime) + { + cout << "First Generation" << endl; + + firsttime = false; + + } + // ok, now the real saving. write out + + if (!cout) + { + string str = "eoStdoutMonitor: Could not write to cout"; + throw runtime_error(str); + } + + for(iterator it = vec.begin(); it != vec.end(); ++it) + { + cout << (*it)->longName() << ": " << (*it)->getValue() << '\n'; + } + + cout << "\n****** End of Generation ******\n\n"; + + return *this; +} + diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h new file mode 100644 index 000000000..b9667e6f4 --- /dev/null +++ b/eo/src/utils/eoStdoutMonitor.h @@ -0,0 +1,49 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFileMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoStdoutMonitor_h +#define _eoStdoutMonitor_h + +#include + +#include +#include + +/** + Prints statistics to stdout +*/ +class eoStdoutMonitor : public eoMonitor +{ +public : + eoStdoutMonitor(std::string _delim = "\t") : delim(_delim), firsttime(true) {} + eoMonitor& operator()(void); + +private : + std::string delim; + bool firsttime; +}; + +#endif diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index f877bf113..db096749c 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -27,21 +27,15 @@ #ifndef _eoUpdater_h #define _eoUpdater_h +#include +#include + /** eoUpdater is a generic procudere for updating whatever you want. - It is about as abstract as you can get. + Yet again an empty name */ -class eoUpdater -{ -public : - /// virtual classes have virtual dtors - virtual ~eoUpdater(void) {} - - /** - does the work, what it is is quite undefined - */ - virtual void operator()(void) = 0; -}; +class eoUpdater : public eoProcedure +{}; /** */ diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 5074af013..a8c6ceb1c 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -43,12 +43,27 @@ template class uniform_generator public : uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} - virtual T operator()(void) { return (T) uniform.uniform(maxim); } + T operator()(void) { return (T) uniform.uniform(maxim); } private : T maxim; eoRng& uniform; }; +/** + The class boolean_generator can be used in the STL generate function + to easily generate random booleans with a specified bias +*/ +class boolean_generator +{ + public : + boolean_generator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + + bool operator()(void) { return gen.flip(0.5); } + private : + float bias; + eoRng& gen; +}; + /** The class random_generator can be used in the STL generate function to easily generate random ints between [0, _max). @@ -56,15 +71,23 @@ template class uniform_generator template class random_generator { public : - random_generator(int _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + random_generator(T _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - virtual T operator()(void) { return (T) random.random(max); } + T operator()(void) { return (T) random.random(max); } private : T maxim; eoRng& random; }; +/// Specialization for bool +template <> +bool random_generator::operator()(void) +{ + return random.flip(0.5); +} + + /** The class normal_generator can be used in the STL generate function to easily generate gaussian distributed floats and doubles. The user @@ -75,11 +98,28 @@ template class normal_generator public : normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} - virtual T operator()(void) { return (T) normal.normal(stdev); } + T operator()(void) { return (T) normal.normal(stdev); } private : T stdev; eoRng& normal; }; +/** + The class negexp_generator can be used in the STL generate function + to easily generate negative exponential distributed floats and doubles. The user + can supply a mean. +*/ +template class negexp_generator +{ + public : + negexp_generator(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + + T operator()(void) { return (T) negexp.negexp(mean); } + + private : + T mean; + eoRng& negexp; +}; + #endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 022798ca0..1b40b10c9 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,46 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete. ############################################################################### -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness \ - t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA\ - t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser \ - t-eoAtomOps t-selectOne t-eoGOpSel \ - t-eoVector t-eoCheckpointing t-eoExternalEO t-eoESFull - -############################################################################### - -t_eoVector_SOURCES = t-eoVector.cpp -t_eoVector_DEPENDENCIES = $(DEPS) -t_eoVector_LDFLAGS = -lm -t_eoVector_LDADD = $(LDADDS) - -############################################################################### - -t_eoGOpSel_SOURCES = t-eoGOpSel.cpp -t_eoGOpSel_DEPENDENCIES = $(DEPS) -t_eoGOpSel_LDFLAGS = -lm -t_eoGOpSel_LDADD = $(LDADDS) - -############################################################################### - -t_selectOne_SOURCES = t-selectOne.cpp -t_selectOne_DEPENDENCIES = $(DEPS) -t_selectOne_LDFLAGS = -lm -t_selectOne_LDADD = $(LDADDS) - -############################################################################### - -t_eoAtomOps_SOURCES = t-eoAtomOps.cpp -t_eoAtomOps_DEPENDENCIES = $(DEPS) -t_eoAtomOps_LDFLAGS = -lm -t_eoAtomOps_LDADD = $(LDADDS) - -############################################################################### -#disabled -#t_eoESOps_SOURCES = t-eoESOps.cpp -#t_eoESOps_DEPENDENCIES = $(DEPS) -#t_eoESOps_LDFLAGS = -lm -#t_eoESOps_LDADD = $(LDADDS) +noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull ############################################################################### @@ -63,99 +24,18 @@ t_eoESFull_LDADD = $(LDADDS) ############################################################################### -t_eoNonUniform_SOURCES = t-eoNonUniform.cpp -t_eoNonUniform_DEPENDENCIES = $(DEPS) -t_eoNonUniform_LDFLAGS = -lm -t_eoNonUniform_LDADD = $(LDADDS) - -############################################################################### - -t_eoUniform_SOURCES = t-eoUniform.cpp -t_eoUniform_DEPENDENCIES = $(DEPS) -t_eoUniform_LDFLAGS = -lm -t_eoUniform_LDADD = $(LDADDS) - -############################################################################### - -t_eoRandom_SOURCES = t-eoRandom.cpp -t_eoRandom_DEPENDENCIES = $(DEPS) -t_eoRandom_LDFLAGS = -lm -t_eoRandom_LDADD = $(LDADDS) - -############################################################################### - -t_eogeneration_SOURCES = t-eogeneration.cpp -t_eogeneration_DEPENDENCIES = $(DEPS) -t_eogeneration_LDFLAGS = -lm -t_eogeneration_LDADD = $(LDADDS) - -############################################################################### - -t_eoEasyEA_SOURCES = t-eoEasyEA.cpp binary_value.h -t_eoEasyEA_DEPENDENCIES = $(DEPS) -t_eoEasyEA_LDFLAGS = -lm -t_eoEasyEA_LDADD = $(LDADDS) - -############################################################################### - -t_eobreeder_SOURCES = t-eobreeder.cpp binary_value.h -t_eobreeder_DEPENDENCIES = $(DEPS) -t_eobreeder_LDFLAGS = -lm -t_eobreeder_LDADD = $(LDADDS) - -############################################################################### - -t_eoinclusion_SOURCES = t-eoinclusion.cpp -t_eoinclusion_DEPENDENCIES = $(DEPS) -t_eoinclusion_LDFLAGS = -lm -t_eoinclusion_LDADD = $(LDADDS) - -############################################################################### - -t_eoinsertion_SOURCES = t-eoinsertion.cpp -t_eoinsertion_DEPENDENCIES = $(DEPS) -t_eoinsertion_LDFLAGS = -lm -t_eoinsertion_LDADD = $(LDADDS) - -############################################################################### - -t_eo_SOURCES = t-eo.cpp -t_eo_DEPENDENCIES = $(DEPS) -t_eo_LDADD = $(LDADDS) - -############################################################################### - t_eofitness_SOURCES = t-eofitness.cpp t_eofitness_DEPENDENCIES = $(DEPS) t_eofitness_LDADD = $(LDADDS) ############################################################################### -t_eoproblem_SOURCES = t-eoproblem.cpp -t_eoproblem_LDFLAGS = -lm - -############################################################################### - t_eobin_SOURCES = t-eobin.cpp t_eobin_DEPENDENCIES = $(DEPS) t_eobin_LDADD = $(LDADDS) ############################################################################### -t_eolottery_SOURCES = t-eolottery.cpp -t_eolottery_DEPENDENCIES = $(DEPS) -t_eolottery_LDFLAGS = -lm -t_eolottery_LDADD = $(LDADDS) - -############################################################################### - -t_eo2dVector_SOURCES = t-eo2dVector.cc -t_eo2dVector_DEPENDENCIES = $(DEPS) -t_eo2dVector_LDFLAGS = -lm -t_eo2dVector_LDADD = $(LDADDS) - -############################################################################### - t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp t_eoStateAndParser_DEPENDENCIES = $(DEPS) t_eoStateAndParser_LDFLAGS = -lm diff --git a/eo/test/real_value.h b/eo/test/real_value.h index c6b30b6c1..b176edfdb 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -1,4 +1,4 @@ -#include +#include //----------------------------------------------------------------------------- @@ -7,7 +7,7 @@ @param _ind A floatingpoint vector */ -double real_value(const eoFixedLength& _ind) +double real_value(const std::vector& _ind) { double sum = 0; /* compute in double format, even if return a float */ for (unsigned i = 0; i < _ind.size(); i++) diff --git a/eo/test/t-eoBaseFunctions.cpp b/eo/test/t-eoBaseFunctions.cpp new file mode 100644 index 000000000..052c1f4f4 --- /dev/null +++ b/eo/test/t-eoBaseFunctions.cpp @@ -0,0 +1,26 @@ + +#include + +#include + +using namespace std; + +struct eo1 : public eoProcedure +{ + void operator()(void) {} +}; + +struct eo2 : public eoProcedure +{ + int operator()(void) { return 1; } +}; + +int main() +{ + eo1 _1; _1(); + eo2 _2; + int i = _2(); + + cout << i << '\n'; + return i; +} \ No newline at end of file diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 612890475..282bbb0b5 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -18,12 +18,11 @@ #include #include #include - +#include //----------------------------------------------------------------------------- // include package checkpointing #include -#include struct Dummy : public EO { @@ -74,7 +73,7 @@ int the_main(int argc, char **argv) eoDummyPop pop; - eoGenTerm genTerm(5); // run for 5 generations + eoGenContinue genTerm(5); // run for 5 generations eoCheckPoint checkpoint(genTerm); // The algorithm will now quit after five generations diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 08e17b7cd..2333bb27a 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -9,20 +9,11 @@ #include #include #include +#include using namespace std; -#include -#include - -#include -#include - -// population -#include - -// evaluation specific -#include +#include // representation specific #include @@ -31,7 +22,7 @@ using namespace std; // Now the main /////////////// -typedef double FitT; +typedef eoMinimizingFitness FitT; template void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds); @@ -45,9 +36,9 @@ main(int argc, char *argv[]) eoValueParam& seed = parser.createParam(static_cast(time(0)), "seed", "Random number seed"); eoValueParam& load_name = parser.createParam(string(), "Load","Load a state file",'L'); eoValueParam& save_name = parser.createParam(string(), "Save","Saves a state file",'S'); - eoValueParam& stdevs = parser.createParam(true, "Stdev", "Use adaptive mutation rates", 's'); - eoValueParam& corr = parser.createParam(true, "Correl", "Use correlated mutations", 'c'); - eoValueParam& chromSize = parser.createParam(unsigned(1), "ChromSize", "Number of chromosomes", 'n'); + eoValueParam& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's'); + eoValueParam& corr = parser.createParam(false, "Correl", "Use correlated mutations", 'c'); + eoValueParam& chromSize = parser.createParam(unsigned(50), "ChromSize", "Number of chromosomes", 'n'); eoValueParam& minimum = parser.createParam(-1.e5, "Min", "Minimum for Objective Variables", 'l'); eoValueParam& maximum = parser.createParam(1.e5, "Max", "Maximum for Objective Variables", 'h'); @@ -57,7 +48,9 @@ main(int argc, char *argv[]) if (!load_name.value().empty()) { // load the parser. This is only neccessary when the user wants to - // be able to change the parameters in the state file by hand. + // be able to change the parameters in the state file by hand + // Note that only parameters inserted in the parser at this point + // will be loaded!. state.load(load_name.value()); // load the parser } @@ -94,15 +87,15 @@ template void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds) { // evaluation - eoEvalFuncPtr > eval( real_value ); + eoEvalFuncPtr&> eval( real_value ); // population parameters, unfortunately these can not be altered in the state file eoValueParam mu = _parser.createParam(unsigned(50), "mu","Size of the population"); - eoValueParamlambda = _parser.createParam(unsigned(250), "lambda", "No. of children to produce"); + eoValueParamlambda_rate = _parser.createParam(float(7.0), "lambda_rate", "Factor of children to produce"); - if (mu.value() > lambda.value()) + if (lambda_rate.value() < 1.0f) { - throw logic_error("Mu must be smaller than lambda in a comma strategy"); + throw logic_error("lambda_rate must be larger than 1 in a comma strategy"); } // Initialization @@ -112,7 +105,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _state.registerObject(pop); // evaluate initial population - eval.range(pop.begin(), pop.end()); + apply(eval, pop); // Ok, time to set up the algorithm // Proxy for the mutation parameters @@ -122,29 +115,20 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& // monitoring, statistics etc. eoAverageStat average; - eoFileMonitor monitor("test.csv"); + eoStdoutMonitor monitor; monitor.add(average); - // Okok, I'm lazy, here's the algorithm defined inline + eoGenContinue cnt(2000); + eoCheckPoint checkpoint(cnt); + checkpoint.add(monitor); + checkpoint.add(average); - for (unsigned i = 0; i < 20; ++i) - { - pop.resize(pop.size() + lambda.value()); - for (unsigned j = mu.value(); j < pop.size(); ++j) - { - pop[j] = pop[rng.random(mu.value())]; - mutate(pop[j]); - eval(pop[j]); - } + eoProportionalGOpSel opSel; + opSel.addOp(mutate, 1.0); - // comma strategy - std::sort(pop.begin() + mu.value(), pop.end()); - copy(pop.begin() + mu.value(), pop.begin() + 2 * mu.value(), pop.begin()); - pop.resize(mu.value()); - - average(pop); - monitor(); - } + eoEvolutionStrategy es(checkpoint, eval, opSel, lambda_rate.value(), eoEvolutionStrategy::comma_strategy()); + + es(pop); } diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index debcb1c49..c880ba215 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -55,7 +55,7 @@ UserDefStruct RandomStruct() // reading and writing -void UserDefMutate(UserDefStruct& a) +bool UserDefMutate(UserDefStruct& a) { cout << "UserDefMutate\n"; a = RandomStruct(); // just for testing @@ -64,9 +64,10 @@ void UserDefMutate(UserDefStruct& a) a.d = UserDefStruct::test; else a.d = UserDefStruct::another; + return true; } -void UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) +bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) { cout << "UserDefBinCrossover\n"; @@ -78,9 +79,10 @@ void UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) a.c = b.c; if (rng.flip(0.5)) a.d = b.d; + return true; } -void UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) +bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) { cout << "UserDefQuadCrossover\n"; if (rng.flip(0.5)) @@ -91,6 +93,8 @@ void UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) swap(a.c, b.c); if (rng.flip(0.5)) swap(a.d, b.d); + + return true; } float UserDefEvalFunc(const UserDefStruct& a) @@ -112,8 +116,10 @@ int main() // eoExternalEvalFunc eval(UserDefEvalFunc); - EoType eo1 = init(); - EoType eo2 = init(); + EoType eo1; + init(eo1); + EoType eo2; + init(eo2); cout << "before mutation " << eo1 << '\n'; mutate(eo1); diff --git a/eo/test/t-eoFunctor.cpp b/eo/test/t-eoFunctor.cpp new file mode 100644 index 000000000..ab46f8e3c --- /dev/null +++ b/eo/test/t-eoFunctor.cpp @@ -0,0 +1,53 @@ + +#include +#include + +void f(eoInit& func) +{ + int i; + func(i); +} + +class Tester : public eoInit +{ +public : + void operator()(int& i) + { + i=1; + } +}; + +#include +#include +#include +#include + +using namespace std; + +int main(void) +{ + Tester test; + + eoFunctorStore store; + + /// make a counter and store it in 'store' + eoInit& cntr = make_counter(functor_category(test), test, store); + + eoUnaryFunctorCounter > cntr2(test); + + f(cntr); + f(cntr2); + f(cntr2); + f(test); + + typedef eoVariableLength EoType; + EoType eo; + + eo.push_back(1); + eo.push_back(2); + + eoTranspose transpose; + transpose(eo); + + return 1; +} \ No newline at end of file diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index fad70b243..f1548dfce 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -23,7 +23,6 @@ // include package checkpointing #include -#include struct Dummy : public EO { diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 93cc9da0c..0d91e002c 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -27,13 +27,15 @@ #include // ostrstream, istrstream #include // eoBin +#include "binary_value.h" + //----------------------------------------------------------------------------- typedef eoBin Chrom; //----------------------------------------------------------------------------- -main() +void main_function() { const unsigned SIZE = 8; unsigned i, j; @@ -52,19 +54,22 @@ main() cout << "chrom: " << chrom << endl << "chrom2: " << chrom2 << endl; - ostrstream os; + char buff[1024]; + ostrstream os(buff, 1024); os << chrom; istrstream is(os.str()); is >> chrom2; - cout << "chrom: " << chrom << endl - << "chrom2: " << chrom2 << endl; + cout << "\nTesting reading, writing\n"; + cout << "chrom: " << chrom << "\nchrom2: " << chrom2 << '\n'; fill(chrom.begin(), chrom.end(), false); cout << "--------------------------------------------------" << endl << "eoMonOp's aplied to .......... " << chrom << endl; - eoBinRandom random; + eoInitFixedLength + random(chrom.size(), boolean_generator()); + random(chrom); cout << "after eoBinRandom ............ " << chrom << endl; @@ -120,16 +125,41 @@ main() cout << "eoBinGxOver(" << i << ", " << j << ") ..... " << chrom << " " << chrom2 << endl; } - - for (double r = 0.1; r < 1.0; r += 0.1) - { - eoUniformXOver uxover(r); - fill(chrom.begin(), chrom.end(), false); - fill(chrom2.begin(), chrom2.end(), true); - uxover(chrom, chrom2); - cout << "eoBinUxOver(" << r << ") ...... " - << chrom << " " << chrom2 << endl; - } + + // test SGA algorithm + eoGenContinue continuator1(50); + eoFitContinue continuator2(65535.f); + + eoCombinedContinue continuator(continuator1, continuator2); + + eoCheckPoint checkpoint(continuator); + + eoStdoutMonitor monitor; + + checkpoint.add(monitor); + + eoSecondMomentStats stats; + + monitor.add(stats); + checkpoint.add(stats); + + eoProportional select; + eoEvalFuncPtr eval(binary_value); + + eoSGA sga(checkpoint, bitflip, 0.1f, xover, 0.8f, select, eval); + + eoInitFixedLength + init(16, boolean_generator()); + eoPop pop(100, init); + + apply(eval, pop); + //for_each(pop.begin(), pop.end(), eval); + + sga(pop); + + pop.sort(); + + cout << "\nBest: " << pop[0].fitness() << '\n'; /* @@ -149,8 +179,31 @@ main() mbOp( chrom, chrom2 ); cout << "after multiBinOp .............. " << chrom << " " << chrom2 < +#endif + +int main() +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} \ No newline at end of file diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index 9672acc9d..80560a4d3 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -75,7 +75,7 @@ main() breeder(pop); // reevaluation of fitness - for_each(pop.begin(), pop.end(), eval); + for_each(pop.begin(), pop.end(), BinaryValue()); cout << "new population:" << endl; for (i = 0; i < pop.size(); ++i) diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index 9973444a3..041a69077 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -1,175 +1,91 @@ //----------------------------------------------------------------------------- - // t-eofitness.cpp - // (c) GeNeura Team 1998 - //----------------------------------------------------------------------------- - - #include // time - #include // srand, rand - #include // cout -#include // eoFitness - +#include +using namespace std; //----------------------------------------------------------------------------- - - -class eoFloat: public eoFitness - +template +int test_fitness(Fitness a, Fitness b) { +// srand(time(0)); -public: - - eoFloat(const float x) { fitness = x; } - - eoFloat(const int x) { fitness = static_cast(x); } - - - - bool operator<(const eoFitness& other) const - - { - - const eoFloat& x = (const eoFloat&) other; - - return fitness < x.fitness; - - } - - - - operator float() const - - { - - return fitness; - - } - - - - void printOn(ostream& os) const - - { - - os << fitness; - - } - - - - void readFrom(istream& is) - - { - - is >> fitness; - - } - - - -private: - - float fitness; - -}; - - - -//----------------------------------------------------------------------------- - - - -int main() - -{ - - srand(time(0)); - - - - eoFloat a = static_cast(rand()) / RAND_MAX, - - b = static_cast(rand()) / RAND_MAX; - - +// Fitness a = aval; //static_cast(rand()) / RAND_MAX; +// Fitness b = bval; //static_cast(rand()) / RAND_MAX; cout.precision(2); - - unsigned repeat = 2; - while (repeat--) - { - cout << "------------------------------------------------------" << endl; - cout << "testing < "; - if (a < b) - cout << a << " < " << b << " is true" << endl; - else - cout << a << " < " << b << " is false" < "; - if (a > b) - cout << a << " > " << b << " is true" << endl; - else - cout << a << " > " << b << " is false" < ############################################################################### +Project: "t_eoFunctor"=.\t_eoFunctor.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + Project: "t_eoGOpSel"=.\t_eoGOpSel.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/esfull.dsp b/eo/win/esfull.dsp index ffa566ab9..791ddeb06 100644 --- a/eo/win/esfull.dsp +++ b/eo/win/esfull.dsp @@ -96,10 +96,6 @@ SOURCE="..\test\t-eoESFull.cpp" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File -SOURCE=..\src\es\eoEsBase.h -# End Source File -# Begin Source File - SOURCE=..\src\es\eoEsChromInit.h # End Source File # Begin Source File @@ -126,6 +122,14 @@ SOURCE=..\src\es\eoEsSimple.h SOURCE=..\src\es\eoEsStdev.h # End Source File +# Begin Source File + +SOURCE=..\src\eoFixedLength.h +# End Source File +# Begin Source File + +SOURCE=..\test\real_value.h +# End Source File # End Group # Begin Group "Resource Files" diff --git a/eo/win/t_eoFunctor.dsp b/eo/win/t_eoFunctor.dsp new file mode 100644 index 000000000..35bd33611 --- /dev/null +++ b/eo/win/t_eoFunctor.dsp @@ -0,0 +1,104 @@ +# Microsoft Developer Studio Project File - Name="t_eoFunctor" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoFunctor - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoFunctor.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoFunctor.mak" CFG="t_eoFunctor - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoFunctor - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoFunctor - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoFunctor - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "t_eoFunctor___Win32_Release" +# PROP BASE Intermediate_Dir "t_eoFunctor___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "t_eoFunctor___Win32_Release" +# PROP Intermediate_Dir "t_eoFunctor___Win32_Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoFunctor - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoFunctor___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoFunctor___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoFunctor___Win32_Debug" +# PROP Intermediate_Dir "t_eoFunctor___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoFunctor - Win32 Release" +# Name "t_eoFunctor - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE="..\test\t-eoFunctor.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index ba1079bdf..40d036423 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF From 511d874b683a3d63f76268b8bcd0705fb49ea214 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:23:19 +0000 Subject: [PATCH 0233/2134] no --- eo/contrib/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/contrib/Makefile.am b/eo/contrib/Makefile.am index 6938de8e2..d9268a84d 100644 --- a/eo/contrib/Makefile.am +++ b/eo/contrib/Makefile.am @@ -6,8 +6,8 @@ SUBDIRS = -lib_LIBRARIES = -libeo_a_SOURCES = +#lib_LIBRARIES = +#libeo_a_SOURCES = libeoincdir = $(includedir)/eo libeoinc_HEADERS=eoAged.h eoDraw.h From 410bc184881b247dffcfbc2460fad6ae57539d82 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:25:45 +0000 Subject: [PATCH 0234/2134] Still part of extreme cleanup --- eo/src/other/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am index 6d1815db9..54b4ab8b9 100644 --- a/eo/src/other/Makefile.am +++ b/eo/src/other/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libeoother.a -libeoother_a_SOURCES = eoExternalOpFunctions.cpp +#libeoother_a_SOURCES = libeootherincdir = $(includedir)/eo/other libeootherinc_HEADERS = eoExternalEO.h eoString.h eoStringMutation.h external_eo eoExternalOpFunctions.h From 664c1f12d917416a78395cf40f2181b651e84e96 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:26:50 +0000 Subject: [PATCH 0235/2134] Still part of extreme cleanup --- eo/src/other/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am index 54b4ab8b9..2d7949ce8 100644 --- a/eo/src/other/Makefile.am +++ b/eo/src/other/Makefile.am @@ -6,7 +6,7 @@ INCLUDES = -I$(top_builddir)/src -lib_LIBRARIES = libeoother.a +#lib_LIBRARIES = libeoother.a #libeoother_a_SOURCES = libeootherincdir = $(includedir)/eo/other From 73461e2d761955cd29730d87c55bbde90f81aa04 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:30:25 +0000 Subject: [PATCH 0236/2134] Still part of extreme cleanup --- eo/src/other/Makefile.am | 2 +- eo/test/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am index 2d7949ce8..674f52d98 100644 --- a/eo/src/other/Makefile.am +++ b/eo/src/other/Makefile.am @@ -10,4 +10,4 @@ INCLUDES = -I$(top_builddir)/src #libeoother_a_SOURCES = libeootherincdir = $(includedir)/eo/other -libeootherinc_HEADERS = eoExternalEO.h eoString.h eoStringMutation.h external_eo eoExternalOpFunctions.h +libeootherinc_HEADERS = eoExternalEO.h eoString.h external_eo eoExternalOpFunctions.h diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 1b40b10c9..95468ca1f 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,7 +9,7 @@ DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a ############################################################################### INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### From 13df8199376ee0c38ee86c748044252c9d32c57b Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:31:19 +0000 Subject: [PATCH 0237/2134] Still part of extreme cleanup --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 95468ca1f..fe7fd9838 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a +DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### From fc326c72ab1e01a89dac151dfe6740f75aba413a Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 14:33:37 +0000 Subject: [PATCH 0238/2134] Forgot to remove enum value init --- eo/src/eoOp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index d9f0bffff..33d207c92 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -54,7 +54,7 @@ class eoOp { public: //@{ - enum OpType { init = 0, unary = 1, binary = 2, quadratic = 3, general = 4}; + enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; /// /// Ctor From 8b63d5e58d591f53a1cf4f963b29dc88643ca5a2 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:32:44 +0000 Subject: [PATCH 0239/2134] changed int to size_t --- eo/src/eoSelectPerc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoSelectPerc.h b/eo/src/eoSelectPerc.h index f74adb370..96fc7c6b6 100644 --- a/eo/src/eoSelectPerc.h +++ b/eo/src/eoSelectPerc.h @@ -60,7 +60,7 @@ class eoSelectPerc : public eoSelect select.setup(_source); - for (int i = 0; i < _dest.size(); ++i) + for (size_t i = 0; i < _dest.size(); ++i) _dest[i] = select(_source); } From 173756916a50874ad03f565ede456591f75bd2c1 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:34:05 +0000 Subject: [PATCH 0240/2134] main should return int --- eo/test/t-eoESFull.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 2333bb27a..be2d8473f 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -27,7 +27,7 @@ typedef eoMinimizingFitness FitT; template void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds); -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { // Create the command-line parser eoParser parser( argc, argv, "Basic EA for vector with adaptive mutations"); From 107c4568a07e628e2122c083c2e81ebaff73b8da Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:35:15 +0000 Subject: [PATCH 0241/2134] changed int compare to size_t --- eo/src/eoMerge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 2a0c30b83..b41f7e860 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -68,7 +68,7 @@ template class eoElitism : public eoMerge vector result; _pop.nth_element(howmany, result); - for (int i = 0; i < result.size(); ++i) + for (size_t i = 0; i < result.size(); ++i) { offspring.push_back(*result[i]); } From d3b83c70b004018fb6a8ddeab8b6ce3c38aceccd Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:36:55 +0000 Subject: [PATCH 0242/2134] changed int compare to size_t --- eo/src/eoMerge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index b41f7e860..d2c8f8139 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -97,7 +97,7 @@ template class eoPlus : public eoMerge { offspring.reserve(offspring.size() + _pop.size()); - for (int i = 0; i < _pop.size(); ++i) + for (size_t i = 0; i < _pop.size(); ++i) { offspring.push_back(_pop[i]); } From a4009dee15c84cc3f5108f8148a51bbf2a4e8642 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:41:04 +0000 Subject: [PATCH 0243/2134] Added binary_value.h --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index fe7fd9838..81eadf583 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -30,7 +30,7 @@ t_eofitness_LDADD = $(LDADDS) ############################################################################### -t_eobin_SOURCES = t-eobin.cpp +t_eobin_SOURCES = t-eobin.cpp binary_value.h t_eobin_DEPENDENCIES = $(DEPS) t_eobin_LDADD = $(LDADDS) From adcb2c38b83b3c57603e05afc51f61fd39789413 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:42:37 +0000 Subject: [PATCH 0244/2134] *** empty log message *** --- eo/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/Makefile.am b/eo/Makefile.am index af9864ab2..fdb6d65c6 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -11,4 +11,6 @@ DOCDIR = ~/public_html/eodocs IDXDIR = ~/index EXTRA_DIST=LICENSE + + From 33803be4cddd897f930728cc41ee7c8cb2c017ab Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 10 Aug 2000 16:43:39 +0000 Subject: [PATCH 0245/2134] changed int to size_t --- eo/src/eoFunctorStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoFunctorStore.cpp b/eo/src/eoFunctorStore.cpp index 4c118236c..dfb66529f 100644 --- a/eo/src/eoFunctorStore.cpp +++ b/eo/src/eoFunctorStore.cpp @@ -4,7 +4,7 @@ /// clears the memory eoFunctorStore::~eoFunctorStore() { - for (int i = 0; i < vec.size(); ++i) + for (size_t i = 0; i < vec.size(); ++i) { delete vec[i]; } From 4f1bcfa292d8664d647d7dff3befc42526fff118 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 14 Aug 2000 11:18:34 +0000 Subject: [PATCH 0246/2134] Removed a few dsp files and changed saving/loading eoPops a bit. --- eo/src/eoFixedLength.h | 2 +- eo/src/eoPop.h | 45 +++--- eo/src/eoScalarFitness.h | 9 +- eo/src/es/eoEsFull.h | 4 +- eo/src/es/eoEsStdev.h | 2 +- eo/test/t-eoESFull.cpp | 27 ++-- eo/test/t-eobin.cpp | 2 +- eo/win/EO.dsw | 299 -------------------------------------- eo/win/Makefile.am | 12 +- eo/win/atomops.dsp | 101 ------------- eo/win/eo_win.dsw | 75 ---------- eo/win/eolib.dsp | 92 ------------ eo/win/random.dsp | 101 ------------- eo/win/t_eoGOpSel.dsp | 102 ------------- eo/win/t_eoGeneralOps.dsp | 96 ------------ eo/win/t_eoaged.dsp | 101 ------------- eo/win/t_eobitfact.dsp | 101 ------------- eo/win/t_eobreeder.dsp | 103 ------------- eo/win/t_eoid.dsp | 101 ------------- eo/win/t_eoinclusion.dsp | 103 ------------- eo/win/t_eoinsertion.dsp | 101 ------------- eo/win/t_eoproblem.dsp | 100 ------------- eo/win/t_eornd.dsp | 113 -------------- eo/win/t_eostring.dsp | 101 ------------- eo/win/t_eovector.dsp | 117 --------------- eo/win/t_es.dsp | 105 ------------- eo/win/t_lottery.dsp | 101 ------------- eo/win/t_opfactory.dsp | 101 ------------- eo/win/t_ops.dsp | 101 ------------- eo/win/t_opsel.dsp | 101 ------------- eo/win/t_opselmason.dsp | 101 ------------- eo/win/t_pop.dsp | 105 ------------- eo/win/t_popops.dsp | 101 ------------- 33 files changed, 59 insertions(+), 2767 deletions(-) delete mode 100644 eo/win/EO.dsw delete mode 100644 eo/win/atomops.dsp delete mode 100644 eo/win/eolib.dsp delete mode 100644 eo/win/random.dsp delete mode 100644 eo/win/t_eoGOpSel.dsp delete mode 100644 eo/win/t_eoGeneralOps.dsp delete mode 100644 eo/win/t_eoaged.dsp delete mode 100644 eo/win/t_eobitfact.dsp delete mode 100644 eo/win/t_eobreeder.dsp delete mode 100644 eo/win/t_eoid.dsp delete mode 100644 eo/win/t_eoinclusion.dsp delete mode 100644 eo/win/t_eoinsertion.dsp delete mode 100644 eo/win/t_eoproblem.dsp delete mode 100644 eo/win/t_eornd.dsp delete mode 100644 eo/win/t_eostring.dsp delete mode 100644 eo/win/t_eovector.dsp delete mode 100644 eo/win/t_es.dsp delete mode 100644 eo/win/t_lottery.dsp delete mode 100644 eo/win/t_opfactory.dsp delete mode 100644 eo/win/t_ops.dsp delete mode 100644 eo/win/t_opsel.dsp delete mode 100644 eo/win/t_opselmason.dsp delete mode 100644 eo/win/t_pop.dsp delete mode 100644 eo/win/t_popops.dsp diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index 17073952a..b57e0733b 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -60,7 +60,7 @@ class eoFixedLength : public EO, public std::vector os << size() << ' '; - std::copy(begin(), end(), ostream_iterator(os)); + std::copy(begin(), end(), ostream_iterator(os, " ")); } /// reading... diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 72a214a71..0645038ad 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -90,24 +90,6 @@ class eoPop: public vector, public eoObject, public eoPersistent /// ~eoPop() {}; - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ - virtual void readFrom(istream& _is) - { - while( _is ) - { - EOT thisEOT; - thisEOT.readFrom( _is ); - push_back( thisEOT ); - } - } - /** sort the population. Use this member to sort in order of descending Fitness, so the first individual is the best! @@ -166,10 +148,33 @@ class eoPop: public vector, public eoObject, public eoPersistent * Write object. It's called printOn since it prints the object _on_ a stream. * @param _os A ostream. */ - virtual void printOn(ostream& _os) const { - copy( begin(), end(), ostream_iterator( _os, "\n") ); + virtual void printOn(ostream& _os) const + { + _os << size() << '\n'; + copy( begin(), end(), ostream_iterator( _os, "\n") ); }; + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + + */ + virtual void readFrom(istream& _is) + { + size_t sz; + _is >> sz; + + resize(sz); + + for (size_t i = 0; i < sz; ++i) + { + operator[](i).readFrom( _is ); + } + } + /** Inherited from eoObject. Returns the class name. @see eoObject */ diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index e10369c7f..ef35722bb 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -75,10 +75,13 @@ class eoScalarFitness }; /** -Typedefs for fitness comparison, +Typedefs for fitness comparison, Maximizing Fitness compares with less, +and minimizing fitness compares with greater. This because we want ordinary +fitness values (doubles) to be equivalent with Maximizing Fitness, and +comparing with less is the default behaviour. */ -typedef eoScalarFitness > eoMaximizingFitness; -typedef eoScalarFitness > eoMinimizingFitness; +typedef eoScalarFitness > eoMaximizingFitness; +typedef eoScalarFitness > eoMinimizingFitness; template std::ostream& operator<<(std::ostream& os, const eoScalarFitness& f) diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 9328f19b5..09c905593 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -51,11 +51,11 @@ class eoEsFull : public eoFixedLength eoFixedLength::printOn(os); os << ' '; - std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os)); + std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); os << ' '; - std::copy(correlations.begin(), correlations.end(), std::ostream_iterator(os)); + std::copy(correlations.begin(), correlations.end(), std::ostream_iterator(os, " ")); os << ' '; } diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index 4d38c5022..a565af818 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -52,7 +52,7 @@ class eoEsStdev : public eoFixedLength eoFixedLength::printOn(os); os << ' '; - std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os)); + std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); os << ' '; } diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index be2d8473f..ca28941f7 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -25,7 +25,7 @@ using namespace std; typedef eoMinimizingFitness FitT; template -void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds); +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds, eoValueParam _load_name); int main(int argc, char *argv[]) { @@ -61,15 +61,15 @@ int main(int argc, char *argv[]) // Run the appropriate algorithm if (stdevs.value() == false && corr.value() == false) { - runAlgorithm(eoEsSimple() ,parser, state, bounds); + runAlgorithm(eoEsSimple() ,parser, state, bounds, load_name); } else if (corr.value() == true) { - runAlgorithm(eoEsFull(),parser, state, bounds); + runAlgorithm(eoEsFull(),parser, state, bounds, load_name); } else { - runAlgorithm(eoEsStdev(), parser, state, bounds); + runAlgorithm(eoEsStdev(), parser, state, bounds, load_name); } // and save @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) } template -void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds) +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds, eoValueParam _load_name) { // evaluation eoEvalFuncPtr&> eval( real_value ); @@ -100,13 +100,22 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& // Initialization eoEsChromInit init(_bounds); + + // State takes ownership of pop because it needs to save it in caller eoPop& pop = _state.takeOwnership(eoPop(mu.value(), init)); _state.registerObject(pop); - // evaluate initial population - apply(eval, pop); - + if (!_load_name.value().empty()) + { // The real loading happens here when all objects are registered + _state.load(_load_name.value()); // load all and everything + } + else + { + // evaluate initial population + apply(eval, pop); + } + // Ok, time to set up the algorithm // Proxy for the mutation parameters eoEsMutationInit mutateInit(_parser); @@ -119,7 +128,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& monitor.add(average); - eoGenContinue cnt(2000); + eoGenContinue cnt(20); eoCheckPoint checkpoint(cnt); checkpoint.add(monitor); checkpoint.add(average); diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 0d91e002c..3baf56b8f 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -153,7 +153,6 @@ void main_function() eoPop pop(100, init); apply(eval, pop); - //for_each(pop.begin(), pop.end(), eval); sga(pop); @@ -182,6 +181,7 @@ void main_function() } //----------------------------------------------------------------------------- +// For MSVC memory lead detection #ifdef _MSC_VER #include #endif diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw deleted file mode 100644 index cefc0d840..000000000 --- a/eo/win/EO.dsw +++ /dev/null @@ -1,299 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoRegression"=.\t_eoRegression.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoSymreg"=.\t_eoSymreg.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoaged"=.\t_eoaged.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobitfact"=.\t_eobitfact.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobreeder"=.\t_eobreeder.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoid"=.\t_eoid.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoinclusion"=.\t_eoinclusion.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eornd"=.\t_eornd.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eostring"=.\t_eostring.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_es"=.\t_es.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eval"=.\eo___Win32_Debug\t_eval.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_factory"=.\eo___Win32_Debug\t_factory.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_lottery"=.\t_lottery.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_opfactory"=.\t_opfactory.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_ops"=.\t_ops.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_opsel"=.\t_opsel.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_opselmason"=.\t_opselmason.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_pop"=.\t_pop.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_popops"=.\t_popops.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am index c68285de4..1f204e106 100644 --- a/eo/win/Makefile.am +++ b/eo/win/Makefile.am @@ -1,7 +1,5 @@ -#Some dsps are missing here -EXTRA_DIST=EO.dsw random.dsp t_eoinsertion.dsp t_ops.dsp\ - atomops.dsp t_eoaged.dsp t_eornd.dsp t_opsel.dsp\ - t_eobin.dsp t_eostring.dsp t_opselmason.dsp\ - eo.dsp t_eobitfact.dsp t_eovector.dsp t_pop.dsp\ - t_eobreeder.dsp t_es.dsp t_popops.dsp\ - eolib.dsp t_eoid.dsp t_lottery.dsp\ + +EXTRA_DIST=eo_win.dsw eo.dsp esfull.dsp t_eobin.dsp t_eoCheckpointing.dsp t_eofitness.dsp \ + t_eoFunctor.dsp t_externalEO.dsp t_StateAndParser.dsp + + diff --git a/eo/win/atomops.dsp b/eo/win/atomops.dsp deleted file mode 100644 index 7ca9d3b0b..000000000 --- a/eo/win/atomops.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="atomops" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=atomops - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "atomops.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "atomops.mak" CFG="atomops - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "atomops - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "atomops - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "atomops - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "atomops - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "atomops___Win32_Debug" -# PROP BASE Intermediate_Dir "atomops___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "atomops___Win32_Debug" -# PROP Intermediate_Dir "atomops___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "atomops - Win32 Release" -# Name "atomops - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoAtomOps.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/eo_win.dsw b/eo/win/eo_win.dsw index c9e395c22..ae9c722aa 100644 --- a/eo/win/eo_win.dsw +++ b/eo/win/eo_win.dsw @@ -75,21 +75,6 @@ Package=<4> ############################################################################### -Project: "t_eoGOpSel"=.\t_eoGOpSel.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> Package=<5> @@ -105,21 +90,6 @@ Package=<4> ############################################################################### -Project: "t_eobreeder"=.\t_eobreeder.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - Project: "t_eofitness"=.\t_eofitness.dsp - Package Owner=<4> Package=<5> @@ -135,51 +105,6 @@ Package=<4> ############################################################################### -Project: "t_eoinclusion"=.\t_eoinclusion.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoproblem"=.\t_eoproblem.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - Project: "t_externalEO"=.\t_externalEO.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/eolib.dsp b/eo/win/eolib.dsp deleted file mode 100644 index 1d3f26db1..000000000 --- a/eo/win/eolib.dsp +++ /dev/null @@ -1,92 +0,0 @@ -# Microsoft Developer Studio Project File - Name="eolib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eolib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eolib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eolib.mak" CFG="eolib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eolib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eolib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eolib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "eolib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "eolib - Win32 Release" -# Name "eolib - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# End Target -# End Project diff --git a/eo/win/random.dsp b/eo/win/random.dsp deleted file mode 100644 index 63fe9bb02..000000000 --- a/eo/win/random.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="random" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=random - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "random.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "random.mak" CFG="random - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "random - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "random - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "random - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "random - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "random___Win32_Debug" -# PROP BASE Intermediate_Dir "random___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "random___Win32_Debug" -# PROP Intermediate_Dir "random___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "random - Win32 Release" -# Name "random - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoRandom.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoGOpSel.dsp b/eo/win/t_eoGOpSel.dsp deleted file mode 100644 index 885512618..000000000 --- a/eo/win/t_eoGOpSel.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoGOpSel" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoGOpSel - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoGOpSel.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoGOpSel.mak" CFG="t_eoGOpSel - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoGOpSel - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoGOpSel - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoGOpSel - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoGOpSel - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoGOpSel___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoGOpSel___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoGOpSel - Win32 Release" -# Name "t_eoGOpSel - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGOpSel.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoGeneralOps.dsp b/eo/win/t_eoGeneralOps.dsp deleted file mode 100644 index 5c9f00beb..000000000 --- a/eo/win/t_eoGeneralOps.dsp +++ /dev/null @@ -1,96 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoGeneralOps" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoGeneralOps - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoGeneralOps.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoGeneralOps.mak" CFG="t_eoGeneralOps - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoGeneralOps - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoGeneralOps - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoGeneralOps - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoGeneralOps - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoGeneralOps___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoGeneralOps___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoGeneralOps___Win32_Debug" -# PROP Intermediate_Dir "t_eoGeneralOps___Win32_Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoGeneralOps - Win32 Release" -# Name "t_eoGeneralOps - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoaged.dsp b/eo/win/t_eoaged.dsp deleted file mode 100644 index 1bf6272a2..000000000 --- a/eo/win/t_eoaged.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoaged" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoaged - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoaged.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoaged.mak" CFG="t_eoaged - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoaged - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoaged - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoaged - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoaged - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoaged - Win32 Release" -# Name "t_eoaged - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eoaged.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eobitfact.dsp b/eo/win/t_eobitfact.dsp deleted file mode 100644 index 8a49fd180..000000000 --- a/eo/win/t_eobitfact.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eobitfact" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobitfact - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobitfact.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobitfact.mak" CFG="t_eobitfact - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobitfact - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobitfact - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobitfact - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eobitfact - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobitfact___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eobitfact___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eobitfact___Win32_Debug" -# PROP Intermediate_Dir "t_eobitfact___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eobitfact - Win32 Release" -# Name "t_eobitfact - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eobitfact.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eobreeder.dsp b/eo/win/t_eobreeder.dsp deleted file mode 100644 index c8151253e..000000000 --- a/eo/win/t_eobreeder.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eobreeder" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobreeder - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobreeder.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobreeder.mak" CFG="t_eobreeder - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobreeder - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobreeder - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobreeder - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eobreeder - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobreeder___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eobreeder___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eobreeder - Win32 Release" -# Name "t_eobreeder - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobreeder.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoid.dsp b/eo/win/t_eoid.dsp deleted file mode 100644 index 523ba2ebc..000000000 --- a/eo/win/t_eoid.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoid" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoid - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoid.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoid.mak" CFG="t_eoid - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoid - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoid - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoid - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoid - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoid___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoid___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoid___Win32_Debug" -# PROP Intermediate_Dir "t_eoid___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoid - Win32 Release" -# Name "t_eoid - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eoid.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoinclusion.dsp b/eo/win/t_eoinclusion.dsp deleted file mode 100644 index 9efeac797..000000000 --- a/eo/win/t_eoinclusion.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoinclusion" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoinclusion - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoinclusion.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoinclusion.mak" CFG="t_eoinclusion - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoinclusion - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoinclusion - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoinclusion - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoinclusion - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoinclusion___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoinclusion___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoinclusion - Win32 Release" -# Name "t_eoinclusion - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoinclusion.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoinsertion.dsp b/eo/win/t_eoinsertion.dsp deleted file mode 100644 index 681a958d5..000000000 --- a/eo/win/t_eoinsertion.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoinsertion" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoinsertion - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoinsertion.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoinsertion.mak" CFG="t_eoinsertion - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoinsertion - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoinsertion - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoinsertion - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoinsertion - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoinsertion___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoinsertion___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoinsertion - Win32 Release" -# Name "t_eoinsertion - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoinsertion.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoproblem.dsp b/eo/win/t_eoproblem.dsp deleted file mode 100644 index b0623139d..000000000 --- a/eo/win/t_eoproblem.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoproblem" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoproblem - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoproblem.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoproblem.mak" CFG="t_eoproblem - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoproblem - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoproblem - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoproblem - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoproblem - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoproblem___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoproblem___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoproblem - Win32 Release" -# Name "t_eoproblem - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoproblem.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eornd.dsp b/eo/win/t_eornd.dsp deleted file mode 100644 index 1a4c3e8c3..000000000 --- a/eo/win/t_eornd.dsp +++ /dev/null @@ -1,113 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eornd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eornd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eornd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eornd.mak" CFG="t_eornd - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eornd - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eornd - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eornd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eornd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eornd - Win32 Release" -# Name "t_eornd - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eornd.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoNegExp.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoNormal.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoRnd.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoUniform.h -# End Source File -# End Group -# End Target -# End Project diff --git a/eo/win/t_eostring.dsp b/eo/win/t_eostring.dsp deleted file mode 100644 index 939cc8677..000000000 --- a/eo/win/t_eostring.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eostring" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eostring - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eostring.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eostring.mak" CFG="t_eostring - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eostring - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eostring - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eostring - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eostring - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eostring___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eostring___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eostring___Win32_Debug" -# PROP Intermediate_Dir "t_eostring___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eostring - Win32 Release" -# Name "t_eostring - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eostring.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp deleted file mode 100644 index 180e264c8..000000000 --- a/eo/win/t_eovector.dsp +++ /dev/null @@ -1,117 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovector - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovector - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovector___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eovector___Win32_Debug" -# PROP Intermediate_Dir "t_eovector___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eovector - Win32 Release" -# Name "t_eovector - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_eovector.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\EO.h -# End Source File -# Begin Source File - -SOURCE=..\src\eo1d.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoNormal.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoRnd.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoVector.h -# End Source File -# End Group -# End Target -# End Project diff --git a/eo/win/t_es.dsp b/eo/win/t_es.dsp deleted file mode 100644 index 7727e4a13..000000000 --- a/eo/win/t_es.dsp +++ /dev/null @@ -1,105 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_es.mak" CFG="t_es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_es - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_es - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_es___Win32_Debug" -# PROP BASE Intermediate_Dir "t_es___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_es___Win32_Debug" -# PROP Intermediate_Dir "t_es___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_es - Win32 Release" -# Name "t_es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESFull.cpp" -# End Source File -# Begin Source File - -SOURCE=..\test\t_es.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_lottery.dsp b/eo/win/t_lottery.dsp deleted file mode 100644 index f2ce3731e..000000000 --- a/eo/win/t_lottery.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_lottery" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_lottery - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_lottery.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_lottery.mak" CFG="t_lottery - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_lottery - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_lottery - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_lottery - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_lottery - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_lottery___Win32_Debug" -# PROP BASE Intermediate_Dir "t_lottery___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_lottery___Win32_Debug" -# PROP Intermediate_Dir "t_lottery___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_lottery - Win32 Release" -# Name "t_lottery - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eolottery.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_opfactory.dsp b/eo/win/t_opfactory.dsp deleted file mode 100644 index d74ee2907..000000000 --- a/eo/win/t_opfactory.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_opfactory" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_opfactory - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_opfactory.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_opfactory.mak" CFG="t_opfactory - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_opfactory - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_opfactory - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_opfactory - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_opfactory - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_opfactory___Win32_Debug" -# PROP BASE Intermediate_Dir "t_opfactory___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_opfactory___Win32_Debug" -# PROP Intermediate_Dir "t_opfactory___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_opfactory - Win32 Release" -# Name "t_opfactory - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opfactory.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_ops.dsp b/eo/win/t_ops.dsp deleted file mode 100644 index 76924a972..000000000 --- a/eo/win/t_ops.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_ops" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_ops - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_ops.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_ops.mak" CFG="t_ops - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_ops - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_ops - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_ops - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_ops - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_ops___Win32_Debug" -# PROP BASE Intermediate_Dir "t_ops___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_ops___Win32_Debug" -# PROP Intermediate_Dir "t_ops___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_ops - Win32 Release" -# Name "t_ops - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_ops.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_opsel.dsp b/eo/win/t_opsel.dsp deleted file mode 100644 index 9e1190278..000000000 --- a/eo/win/t_opsel.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_opsel" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_opsel - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_opsel.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_opsel.mak" CFG="t_opsel - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_opsel - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_opsel - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_opsel - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_opsel - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_opsel___Win32_Debug" -# PROP BASE Intermediate_Dir "t_opsel___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_opsel___Win32_Debug" -# PROP Intermediate_Dir "t_opsel___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_opsel - Win32 Release" -# Name "t_opsel - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opsel.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_opselmason.dsp b/eo/win/t_opselmason.dsp deleted file mode 100644 index 104975ca7..000000000 --- a/eo/win/t_opselmason.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_opselmason" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_opselmason - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_opselmason.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_opselmason.mak" CFG="t_opselmason - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_opselmason - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_opselmason - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_opselmason - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_opselmason - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_opselmason___Win32_Debug" -# PROP BASE Intermediate_Dir "t_opselmason___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_opselmason___Win32_Debug" -# PROP Intermediate_Dir "t_opselmason___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_opselmason - Win32 Release" -# Name "t_opselmason - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opselmason.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_pop.dsp b/eo/win/t_pop.dsp deleted file mode 100644 index aa943fdff..000000000 --- a/eo/win/t_pop.dsp +++ /dev/null @@ -1,105 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_pop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_pop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_pop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_pop.mak" CFG="t_pop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_pop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_pop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_pop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_pop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_pop___Win32_Debug" -# PROP BASE Intermediate_Dir "t_pop___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_pop___Win32_Debug" -# PROP Intermediate_Dir "t_pop___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_pop - Win32 Release" -# Name "t_pop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_opselmason.cpp -# End Source File -# Begin Source File - -SOURCE=..\test\t_pop.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_popops.dsp b/eo/win/t_popops.dsp deleted file mode 100644 index a3c586c98..000000000 --- a/eo/win/t_popops.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_popops" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_popops - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_popops.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_popops.mak" CFG="t_popops - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_popops - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_popops - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_popops - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_popops - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_popops___Win32_Debug" -# PROP BASE Intermediate_Dir "t_popops___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_popops___Win32_Debug" -# PROP Intermediate_Dir "t_popops___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_popops - Win32 Release" -# Name "t_popops - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\test\t_popops.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project From 04bc4ecde8960debfd16034ddf88e4b4ce4b5e88 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 15 Aug 2000 21:15:36 +0000 Subject: [PATCH 0247/2134] initial checkin --- CVSROOT/checkoutlist | 13 +++++++++++++ CVSROOT/commitinfo | 15 +++++++++++++++ CVSROOT/config | 11 +++++++++++ CVSROOT/cvswrappers | 23 +++++++++++++++++++++++ CVSROOT/editinfo | 21 +++++++++++++++++++++ CVSROOT/loginfo | 26 ++++++++++++++++++++++++++ CVSROOT/modules | 26 ++++++++++++++++++++++++++ CVSROOT/notify | 12 ++++++++++++ CVSROOT/rcsinfo | 13 +++++++++++++ CVSROOT/taginfo | 20 ++++++++++++++++++++ CVSROOT/verifymsg | 21 +++++++++++++++++++++ 11 files changed, 201 insertions(+) create mode 100644 CVSROOT/checkoutlist create mode 100644 CVSROOT/commitinfo create mode 100644 CVSROOT/config create mode 100644 CVSROOT/cvswrappers create mode 100644 CVSROOT/editinfo create mode 100644 CVSROOT/loginfo create mode 100644 CVSROOT/modules create mode 100644 CVSROOT/notify create mode 100644 CVSROOT/rcsinfo create mode 100644 CVSROOT/taginfo create mode 100644 CVSROOT/verifymsg diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist new file mode 100644 index 000000000..b04b3501f --- /dev/null +++ b/CVSROOT/checkoutlist @@ -0,0 +1,13 @@ +# The "checkoutlist" file is used to support additional version controlled +# administrative files in $CVSROOT/CVSROOT, such as template files. +# +# The first entry on a line is a filename which will be checked out from +# the corresponding RCS file in the $CVSROOT/CVSROOT directory. +# The remainder of the line is an error message to use if the file cannot +# be checked out. +# +# File format: +# +# [] +# +# comment lines begin with '#' diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo new file mode 100644 index 000000000..b19e7b7a6 --- /dev/null +++ b/CVSROOT/commitinfo @@ -0,0 +1,15 @@ +# The "commitinfo" file is used to control pre-commit checks. +# The filter on the right is invoked with the repository and a list +# of files to check. A non-zero exit of the filter program will +# cause the commit to be aborted. +# +# The first entry on a line is a regular expression which is tested +# against the directory that the change is being committed to, relative +# to the $CVSROOT. For the first match that is found, then the remainder +# of the line is the name of the filter to run. +# +# If the repository name does not match any of the regular expressions in this +# file, the "DEFAULT" line is used, if it is specified. +# +# If the name "ALL" appears as a regular expression it is always used +# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/config b/CVSROOT/config new file mode 100644 index 000000000..8069cad5d --- /dev/null +++ b/CVSROOT/config @@ -0,0 +1,11 @@ +# Set this to "no" if pserver shouldn't check system users/passwords +#SystemAuth=no + +# Set `PreservePermissions' to `yes' to save file status information +# in the repository. +#PreservePermissions=no + +# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top +# level of the new working directory when using the `cvs checkout' +# command. +#TopLevelAdmin=no diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers new file mode 100644 index 000000000..0accaf1b1 --- /dev/null +++ b/CVSROOT/cvswrappers @@ -0,0 +1,23 @@ +# This file affects handling of files based on their names. +# +# The -t/-f options allow one to treat directories of files +# as a single file, or to transform a file in other ways on +# its way in and out of CVS. +# +# The -m option specifies whether CVS attempts to merge files. +# +# The -k option specifies keyword expansion (e.g. -kb for binary). +# +# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) +# +# wildcard [option value][option value]... +# +# where option is one of +# -f from cvs filter value: path to filter +# -t to cvs filter value: path to filter +# -m update methodology value: MERGE or COPY +# -k expansion mode value: b, o, kkv, &c +# +# and value is a single-quote delimited value. +# For example: +#*.gif -k 'b' diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo new file mode 100644 index 000000000..d78886c15 --- /dev/null +++ b/CVSROOT/editinfo @@ -0,0 +1,21 @@ +# The "editinfo" file is used to allow verification of logging +# information. It works best when a template (as specified in the +# rcsinfo file) is provided for the logging procedure. Given a +# template with locations for, a bug-id number, a list of people who +# reviewed the code before it can be checked in, and an external +# process to catalog the differences that were code reviewed, the +# following test can be applied to the code: +# +# Making sure that the entered bug-id number is correct. +# Validating that the code that was reviewed is indeed the code being +# checked in (using the bug-id number or a seperate review +# number to identify this particular code set.). +# +# If any of the above test failed, then the commit would be aborted. +# +# Actions such as mailing a copy of the report to each reviewer are +# better handled by an entry in the loginfo file. +# +# One thing that should be noted is the the ALL keyword is not +# supported. There can be only one entry that matches a given +# repository. diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo new file mode 100644 index 000000000..5a59f0a54 --- /dev/null +++ b/CVSROOT/loginfo @@ -0,0 +1,26 @@ +# The "loginfo" file controls where "cvs commit" log information +# is sent. The first entry on a line is a regular expression which must match +# the directory that the change is being made to, relative to the +# $CVSROOT. If a match is found, then the remainder of the line is a filter +# program that should expect log information on its standard input. +# +# If the repository name does not match any of the regular expressions in this +# file, the "DEFAULT" line is used, if it is specified. +# +# If the name ALL appears as a regular expression it is always used +# in addition to the first matching regex or DEFAULT. +# +# You may specify a format string as part of the +# filter. The string is composed of a `%' followed +# by a single format character, or followed by a set of format +# characters surrounded by `{' and `}' as separators. The format +# characters are: +# +# s = file name +# V = old version number (pre-checkin) +# v = new version number (post-checkin) +# +# For example: +#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog +# or +#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog diff --git a/CVSROOT/modules b/CVSROOT/modules new file mode 100644 index 000000000..cb9e9efc9 --- /dev/null +++ b/CVSROOT/modules @@ -0,0 +1,26 @@ +# Three different line formats are valid: +# key -a aliases... +# key [options] directory +# key [options] directory files... +# +# Where "options" are composed of: +# -i prog Run "prog" on "cvs commit" from top-level of module. +# -o prog Run "prog" on "cvs checkout" of module. +# -e prog Run "prog" on "cvs export" of module. +# -t prog Run "prog" on "cvs rtag" of module. +# -u prog Run "prog" on "cvs update" of module. +# -d dir Place module in directory "dir" instead of module name. +# -l Top-level directory only -- do not recurse. +# +# NOTE: If you change any of the "Run" options above, you'll have to +# release and re-checkout any working directories of these modules. +# +# And "directory" is a path to a directory relative to $CVSROOT. +# +# The "-a" option specifies an alias. An alias is interpreted as if +# everything on the right of the "-a" had been typed on the command line. +# +# You can encode a module within a module by using the special '&' +# character to interpose another module into the current module. This +# can be useful for creating a module that consists of many directories +# spread out over the entire source repository. diff --git a/CVSROOT/notify b/CVSROOT/notify new file mode 100644 index 000000000..34f0bc288 --- /dev/null +++ b/CVSROOT/notify @@ -0,0 +1,12 @@ +# The "notify" file controls where notifications from watches set by +# "cvs watch add" or "cvs edit" are sent. The first entry on a line is +# a regular expression which is tested against the directory that the +# change is being made to, relative to the $CVSROOT. If it matches, +# then the remainder of the line is a filter program that should contain +# one occurrence of %s for the user to notify, and information on its +# standard input. +# +# "ALL" or "DEFAULT" can be used in place of the regular expression. +# +# For example: +#ALL mail %s -s "CVS notification" diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo new file mode 100644 index 000000000..49e59f4d0 --- /dev/null +++ b/CVSROOT/rcsinfo @@ -0,0 +1,13 @@ +# The "rcsinfo" file is used to control templates with which the editor +# is invoked on commit and import. +# +# The first entry on a line is a regular expression which is tested +# against the directory that the change is being made to, relative to the +# $CVSROOT. For the first match that is found, then the remainder of the +# line is the name of the file that contains the template. +# +# If the repository name does not match any of the regular expressions in this +# file, the "DEFAULT" line is used, if it is specified. +# +# If the name "ALL" appears as a regular expression it is always used +# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo new file mode 100644 index 000000000..274a46dd5 --- /dev/null +++ b/CVSROOT/taginfo @@ -0,0 +1,20 @@ +# The "taginfo" file is used to control pre-tag checks. +# The filter on the right is invoked with the following arguments: +# +# $1 -- tagname +# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d +# $3 -- repository +# $4-> file revision [file revision ...] +# +# A non-zero exit of the filter program will cause the tag to be aborted. +# +# The first entry on a line is a regular expression which is tested +# against the directory that the change is being committed to, relative +# to the $CVSROOT. For the first match that is found, then the remainder +# of the line is the name of the filter to run. +# +# If the repository name does not match any of the regular expressions in this +# file, the "DEFAULT" line is used, if it is specified. +# +# If the name "ALL" appears as a regular expression it is always used +# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg new file mode 100644 index 000000000..86f747ce2 --- /dev/null +++ b/CVSROOT/verifymsg @@ -0,0 +1,21 @@ +# The "verifymsg" file is used to allow verification of logging +# information. It works best when a template (as specified in the +# rcsinfo file) is provided for the logging procedure. Given a +# template with locations for, a bug-id number, a list of people who +# reviewed the code before it can be checked in, and an external +# process to catalog the differences that were code reviewed, the +# following test can be applied to the code: +# +# Making sure that the entered bug-id number is correct. +# Validating that the code that was reviewed is indeed the code being +# checked in (using the bug-id number or a seperate review +# number to identify this particular code set.). +# +# If any of the above test failed, then the commit would be aborted. +# +# Actions such as mailing a copy of the report to each reviewer are +# better handled by an entry in the loginfo file. +# +# One thing that should be noted is the the ALL keyword is not +# supported. There can be only one entry that matches a given +# repository. From 8ae796ab282011c459f5698f8dec56c7a1fad326 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 18 Aug 2000 08:44:22 +0000 Subject: [PATCH 0248/2134] Added symbolic regression, which tests combined ops as well --- eo/src/Makefile.am | 2 +- eo/src/eoGOpBreeder.h | 4 +- eo/src/eoPop.h | 73 -------------------- eo/src/eoSequentialGOpSel.h | 6 +- eo/src/eoSteadyStateTransform.h | 4 +- eo/src/eoWrappedOps.h | 22 +++--- eo/src/gp/eoParseTree.h | 51 +++++++------- eo/src/gp/node_pool.h | 2 +- eo/src/gp/parse_tree.h | 36 ++++------ eo/src/utils/eoStat.h | 16 ++++- eo/test/Makefile.am | 11 ++- eo/test/t-eoSymreg.cpp | 118 +++++++++++++++++--------------- eo/win/Makefile.am | 2 +- eo/win/eo_win.dsw | 15 ++++ 14 files changed, 162 insertions(+), 200 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index ffa36a768..9ccbaf169 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = es ga utils other +SUBDIRS = es ga gp utils other lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index 913d4a5ff..12d811c2a 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -24,7 +24,7 @@ class eoGOpBreeder: public eoUnaryFunctor&> public: /// Default constructor. eoGOpBreeder( eoGOpSelector& _opSel, - eoPopIndiSelector& _selector) + eoSelectOneIndiSelector& _selector) : opSel( _opSel ), selector(_selector) {} @@ -47,7 +47,7 @@ class eoGOpBreeder: public eoUnaryFunctor&> private: eoGOpSelector& opSel; - eoPopIndiSelector& selector; + eoSelectOneIndiSelector& selector; // the inserter can be local as there's no point in changing it from the outside eoBackInserter inserter; diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 0645038ad..7028c80ff 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -185,78 +185,5 @@ class eoPop: public vector, public eoObject, public eoPersistent }; -/** - Keeps and calculates information about a population such - as the sum of fitnesses and whether the population is sorted. - It can be used to cache information about a population between - calls of functors, see for instance how this makes eoProportional - just this tat more efficient - - @see eoSelectOne, eoSelect, eoProportional - -template -class eoPopStats -{ -public : - typedef typename EOT::Fitness FitnessType; - - /// Initialize by stating nothing is known - eoPopStats() : - sum_fitness_calculated(false), - pop_sorted_calculated(false) - {} - - /// Call this function after the pop might have/is changed - void reset() - { - sum_fitness_calculated = false; - pop_sorted_calculated = false; - } - - /// Calculate sum_fitness or return cached value - FitnessType get_sum_fitness(const eoPop& _pop) - { - if (sum_fitness_calculated) - return sum_fitness; - - sum_fitness = 0.0; - - for (int i = 0; i < _pop.size(); ++i) - { - sum_fitness += _pop[i].fitness(); - } - - sum_fitness_calculated = true; - return sum_fitness; - } - - /// Check if the pop is sorted or return cached_value - bool is_pop_sorted(const eoPop& _pop) - { - if (pop_sorted_calculated) - return pop_sorted; - - int i; - for (i = 1; i < _pop.size(); ++i) - { - if (!(_pop[i-1] < _pop[i])) - { // not in sort order - break; - } - } - - pop_sorted = (i == _pop.size()); - pop_sorted_calculated = true; - return pop_sorted; - } - - bool sum_fitness_calculated; - FitnessType sum_fitness; - - bool pop_sorted_calculated; - bool pop_sorted; -}; -*/ - #endif diff --git a/eo/src/eoSequentialGOpSel.h b/eo/src/eoSequentialGOpSel.h index 11c3c4692..63acac43b 100644 --- a/eo/src/eoSequentialGOpSel.h +++ b/eo/src/eoSequentialGOpSel.h @@ -40,12 +40,10 @@ template class eoSequentialGOpSel : public eoGOpSelector { public : - - eoSequentialGOpSel(void) : combined(*this, getRates()) {} - + virtual eoGeneralOp& selectOp() { - return combined; + return combined.bind(*this, getRates()); } private : diff --git a/eo/src/eoSteadyStateTransform.h b/eo/src/eoSteadyStateTransform.h index 82d9b4715..890920a77 100644 --- a/eo/src/eoSteadyStateTransform.h +++ b/eo/src/eoSteadyStateTransform.h @@ -65,7 +65,7 @@ template class eoSteadyStateTransform: public eoTransform nSteps = pop.size(); // make a 'generation equivalent' } - for (unsigned i = 0; i < steps; ++i) + for (unsigned i = 0; i < nSteps; ++i) { selector.bind(pop); inserter.bind(pop); @@ -77,7 +77,7 @@ template class eoSteadyStateTransform: public eoTransform private: eoGOpSelector& opSelector; - eoSelectOneIndiSelector& selector; + eoSelectOneIndiSelector selector; eoSteadyStateInserter& inserter; unsigned steps; }; diff --git a/eo/src/eoWrappedOps.h b/eo/src/eoWrappedOps.h index 7ef717f63..cd7432ef1 100644 --- a/eo/src/eoWrappedOps.h +++ b/eo/src/eoWrappedOps.h @@ -117,8 +117,12 @@ template class eoCombinedOp : public eoGeneralOp { public : - eoCombinedOp(const std::vector*>& _ops, const std::vector& rates) - : ops(_ops), rates(_rates) {} + eoCombinedOp& bind(const std::vector*>& _ops, const std::vector& _rates) + { + ops = &_ops; + rates = &_rates; + return *this; + } class eoDelayedSelector : public eoIndiSelector { @@ -147,7 +151,7 @@ class eoCombinedOp : public eoGeneralOp }; /** Applies all ops in the combined op - It works in the following way + It first applies the */ void operator()( eoIndiSelector& _in, eoInserter& _out ) @@ -156,7 +160,7 @@ class eoCombinedOp : public eoGeneralOp eoPop next; unsigned i; - for (i = 0; i < ops.size(); ++i) + for (i = 0; i < ops->size(); ++i) { eoDelayedSelector delay(_in, intermediate); inserter.bind(next); @@ -166,13 +170,13 @@ class eoCombinedOp : public eoGeneralOp // apply operators until we have as many outputs as inputs do { - if (flip(rates[i])) // should this flip be here? - (*ops[i])(delayedSelector, inserter); + if (rng.flip(rates->operator[](i))) // should this flip be here? + (*ops->operator[](i))(delay, inserter); counter++; if (counter > 1000) { - throw logical_error("eoCombinedOp: no termination after 1000 tries, did you forget to insert individuals in your eoGeneralOp?"); + throw logic_error("eoCombinedOp: no termination after 1000 tries, did you forget to insert individuals in your eoGeneralOp?"); } } while (next.size() < intermediate.size()); @@ -187,8 +191,8 @@ class eoCombinedOp : public eoGeneralOp } private : - const std::vector*>& ops; - const std::vector rates; + const std::vector*>* ops; + const std::vector* rates; eoBackInserter inserter; }; diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 7be7c2021..0b3eccf86 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -17,19 +17,12 @@ template class eoParseTree : public EO, public parse_tree { public : + + typedef parse_tree::subtree Subtree; + + eoParseTree(void) {} + eoParseTree(const parse_tree& tree) : parse_tree(tree) {} - typedef typename parse_tree::subtree Type; - - eoParseTree(void) : EO(), parse_tree() {} - eoParseTree(unsigned _size, eoRnd& _rnd) - : EO(), parse_tree(_rnd()) - { - pruneTree(_size); - } - eoParseTree(eoRnd& _rnd) - : EO(), parse_tree(_rnd()) - {} - virtual void pruneTree(unsigned _size) { if (_size < 1) @@ -37,7 +30,7 @@ public : if (size() > _size) { - Type* sub = &operator[](size() - 2); // prune tree + Subtree* sub = &operator[](size() - 2); // prune tree while (sub->size() > _size) { @@ -101,7 +94,7 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > const vector& _initializor, bool _grow = true) : - eoRnd(), + eoInit(), max_depth(_max_depth), initializor(_initializor), grow(_grow) @@ -115,7 +108,8 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > generate(sequence, max_depth); - _tree = parse_tree(sequence.begin(), sequence.end()); + parse_tree tmp(sequence.begin(), sequence.end()); + _tree.swap(tmp); } void generate(list& sequence, int the_max, int last_terminal = -1) @@ -180,10 +174,10 @@ public: /// Dtor virtual ~eoSubtreeXOver () {}; - void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + void operator()(eoIndiSelector& _select, eoInserter& _insert ) { - EoType eo1 = _source.select(); - const EoType& eo2 = _source.select(); + EoType eo1 = _select(); + const EoType& eo2 = _select(); int i = rng.random(eo1.size()); int j = rng.random(eo2.size()); @@ -193,7 +187,7 @@ public: eo1.pruneTree(max_length); eo1.invalidate(); - _sink.insert(eo1); + _insert(eo1); } unsigned max_length; @@ -206,7 +200,7 @@ public: typedef eoParseTree EoType; - eoBranchMutation(eoRnd& _init, unsigned _max_length) + eoBranchMutation(eoInit& _init, unsigned _max_length) : eoGeneralOp(), max_length(_max_length), initializer(_init) {}; @@ -215,25 +209,28 @@ public: /// Dtor virtual ~eoBranchMutation() {}; - void operator()(eoIndiSelector& _source, eoInserter& _sink ) const + void operator()(eoIndiSelector& _select, eoInserter& _insert ) { - EoType eo1 = _source.select(); + EoType eo1 = _select(); int i = rng.random(eo1.size()); - EoType eo2(eo1[i].size(), initializer); // create random other to cross with + EoType eo2; + initializer(eo2); - eo1[i] = eo2.back(); // insert subtree + int j = rng.random(eo2.size()); + + eo1[i] = eo2[j]; // insert subtree eo1.pruneTree(max_length); - + eo1.invalidate(); - _sink.insert(eo1); + _insert(eo1); } private : unsigned max_length; - eoRnd& initializer; + eoInit& initializer; }; diff --git a/eo/src/gp/node_pool.h b/eo/src/gp/node_pool.h index ef5c4b42d..94484b5b9 100644 --- a/eo/src/gp/node_pool.h +++ b/eo/src/gp/node_pool.h @@ -148,7 +148,7 @@ public : if (arity == 0) return 0; - T* t new T [arity]; + T* t = new T [arity]; for (int i = 0; i < arity; ++i) { diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index 1ac2cf66d..90be70bf4 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -16,15 +16,6 @@ * modified is included with the above copyright notice. - * Special disclaimer and political statement: - - * In contrast with the rest of the EO package where you might have found this code, this software - * does NOT fall under the GNU Lesser Public License or the GNU Public License, nor is anyone allowed - * by the copyright holder (that's me) to put it under either license. - * Doing this would limit my and your freedom to use this software in any way - * you or I see fit, including but not limited to closed-source software. - - Usage information. @@ -173,7 +164,7 @@ namespace gp_parse_tree #include "node_pool.h" - +/// This ones defined because gcc does not always implement namespaces template inline void do_the_swap(T& a, T& b) { @@ -371,21 +362,20 @@ public : void swap(subtree& y) { - do_the_swap(content, y.content); - do_the_swap(args, y.args); - do_the_swap(parent, y.parent); + do_the_swap(content, y.content); + do_the_swap(args, y.args); + + adopt(); + y.adopt(); - do_the_swap(_cumulative_size, y._cumulative_size); - do_the_swap(_depth, y._depth); - do_the_swap(_size, y._size); + do_the_swap(parent, y.parent); + + do_the_swap(_cumulative_size, y._cumulative_size); + do_the_swap(_depth, y._depth); + do_the_swap(_size, y._size); updateAfterInsert(); } - friend void swap(subtree& x, subtree& y) - { - x.swap(y); - } - protected : virtual void updateAfterInsert(void) @@ -973,7 +963,7 @@ ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) return 0; } -// Put customized swaps also in std... +/* Put customized swaps also in std... template inline void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) @@ -985,7 +975,7 @@ template inline void iter_swap(vector >::iterator a, vector > b) { a->swap(*b); -} +}*/ } // namespace std diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index a7d3c72f1..142f400c5 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -59,7 +59,7 @@ template class eoAverageStat : public eoStat { public : - eoAverageStat(std::string _description = "AverageFitness") : eoStat(0.0, _description) {} + eoAverageStat(std::string _description = "Average Fitness") : eoStat(0.0, _description) {} static double sumFitness(double _sum, const EOT& _eot) { @@ -103,6 +103,20 @@ public : } }; +template +class eoBestFitnessStat : public eoStat +{ +public : + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best Fitness") : eoStat(Fitness(), _description) {} + + virtual void operator()(const eoPop& _pop) + { + value() = _pop.nth_element_fitness(0); + } +}; + /* template class eoStdevStat : public eoStat diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 81eadf583..9aea1d16c 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### -noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull +noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg ############################################################################### @@ -57,4 +57,13 @@ t_eoExternalEO_LDADD = $(LDADDS) ############################################################################### +############################################################################### + +t_eoSymreg_SOURCES = t-eoSymreg.cpp +t_eoSymreg_DEPENDENCIES = $(DEPS) +t_eoSymreg_LDFLAGS = -lm +t_eoSymreg_LDADD = $(LDADDS) + +############################################################################### + diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 5c9956239..f76467307 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -1,7 +1,7 @@ #pragma warning(disable:4786) -#include "eoParseTree.h" -#include "eoEvalFunc.h" +#include +#include using namespace gp_parse_tree; using namespace std; @@ -20,34 +20,43 @@ public : // arity function, need this function! int arity(void) const { return op == X? 0 : 2; } - + + void randomize(void) {} + // evaluation function, single case, using first argument to give value of variable template - double operator()(double var, Children args) const + void operator()(double& result, Children args, double var) const { + double r1, r2; + + if (arity() == 2) + { + args[0].apply(r1, var); + args[1].apply(r2, var); + } + switch (op) { - case Plus : return args[0].apply(var) + args[1].apply(var); - case Min : return args[0].apply(var) - args[1].apply(var); - case Mult : return args[0].apply(var) * args[1].apply(var); + case Plus : result = r1 + r2; break; + case Min : result = r1 - r2; break; + case Mult : result = r1 * r2; break; case PDiv : { - double arg1 = args[1].apply(var); - if (arg1 == 0.0) - return 1.0; // protection a la Koza, realistic implementations should maybe throw an exception - - return args[0].apply(var) / arg1; + if (r2 == 0.0) + result = 1.0; // protection a la Koza, realistic implementations should maybe throw an exception + else + result = r1 / r2; + break; } - case X : return var; + case X : result = var; break; } - return var; // to avoid compiler error } /// 'Pretty' print to ostream function template - string operator()(string dummy, Children args) + void operator()(string& result, Children args) const { static const string lb = "("; static const string rb = ")"; @@ -56,13 +65,16 @@ public : if (arity() == 0) { - return string("x"); + result = "x"; + return; } // else - string result = lb + args[0].apply(dummy); + string r1; + args[0].apply(r1); + result = lb + r1; result += opStr; - result += args[1].apply(dummy) + rb; - return result; + args[1].apply(r1); + result += r1 + rb; } Operator getOp(void) const { return op; } @@ -100,15 +112,15 @@ std::istream& operator>>(std::istream& is, SymregNode& eot) //----------------------------------------------------------------------------- /** Implementation of a function evaluation object. */ -float targetFunction(float x) +double targetFunction(double x) { - return x * x * x * x - x * x * x + x * x * x - x * x + x - 1; + return x * x * x * x - x * x * x + x * x * x - x * x + x - 10; } // parameters controlling the sampling of points -const float xbegin = -10.0f; -const float xend = 10.0f; -const float xstep = 1.3f; +const double xbegin = -10.0f; +const double xend = 10.0f; +const double xstep = 1.3f; template struct RMS: public eoEvalFunc< eoParseTree > { @@ -128,7 +140,7 @@ public : int i = 0; - for (double x = xbegin; x < xend && i < n; ++i) + for (double x = xbegin; x < xend && i < n; ++i, x+=xstep) { target[i] = targetFunction(x); inputs[i] = x; @@ -137,7 +149,7 @@ public : ~RMS() {} - void operator()( EoType & _eo ) const + void operator()( EoType & _eo ) { vector outputs; outputs.resize(inputs.size()); @@ -146,7 +158,7 @@ public : for (int i = 0; i < inputs.size(); ++i) { - outputs[i] = _eo.apply(inputs[i]); + _eo.apply(outputs[i], inputs[i]); fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); } @@ -164,25 +176,6 @@ private : vector target; }; -#include "eoTerm.h" - -template -class eoGenerationTerm : public eoTerm -{ - public : - eoGenerationTerm(size_t _ngen) : eoTerm(), ngen(_ngen) {} - - bool operator()(const eoPop&) - { - cout << '.'; // pacifier - cout.flush(); - - return --ngen > 0; - } - private : - unsigned ngen; -}; - template void print_best(eoPop& pop) { @@ -201,7 +194,8 @@ void print_best(eoPop& pop) cout << "\t"; - string str = pop[index].apply(string()); + string str; + pop[index].apply(str); cout << str.c_str(); cout << endl << "RMS Error = " << pop[index].fitness() << endl; @@ -210,16 +204,15 @@ void print_best(eoPop& pop) #include #include "eoGOpBreeder.h" -#include "eoSequentialGOpSelector.h" -#include "eoProportionalGOpSelector.h" -#include "eoDetTournamentIndiSelector.h" +#include "eoSequentialGOpSel.h" +#include "eoProportionalGOpSel.h" #include "eoDetTournamentInserter.h" #include "eoSteadyStateEA.h" #include "eoScalarFitness.h" void main() { - typedef eoScalarFitness > FitnessType; + typedef eoMinimizingFitness FitnessType; typedef SymregNode GpNode; typedef eoParseTree EoType; @@ -237,7 +230,9 @@ void main() // Root Mean Squared Error Measure RMS eval; - Pop pop(500, MaxSize, initializer, eval); + Pop pop(500, initializer); + + apply(eval, pop); eoSubtreeXOver xover(MaxSize); eoBranchMutation mutation(initializer, MaxSize); @@ -247,15 +242,28 @@ void main() seqSel.addOp(mutation, 0.25); seqSel.addOp(xover, 0.75); - eoDetTournamentIndiSelector selector(5); + eoDetTournament selector(5); eoDetTournamentInserter inserter(eval, 5); // Terminators - eoGenerationTerm term(nGenerations); + eoGenContinue term(nGenerations); + + eoCheckPoint checkPoint(term); + + eoAverageStat avg; + eoBestFitnessStat best; + eoStdoutMonitor monitor; + + checkPoint.add(monitor); + checkPoint.add(avg); + checkPoint.add(best); + + monitor.add(avg); + monitor.add(best); // GP generation - eoSteadyStateEA gp(seqSel, selector, inserter, term); + eoSteadyStateEA gp(seqSel, selector, inserter, checkPoint); cout << "Initialization done" << endl; diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am index 1f204e106..eab6c1f0d 100644 --- a/eo/win/Makefile.am +++ b/eo/win/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST=eo_win.dsw eo.dsp esfull.dsp t_eobin.dsp t_eoCheckpointing.dsp t_eofitness.dsp \ - t_eoFunctor.dsp t_externalEO.dsp t_StateAndParser.dsp + t_eoFunctor.dsp t_externalEO.dsp t_StateAndParser.dsp t_eoSymreg.dsp diff --git a/eo/win/eo_win.dsw b/eo/win/eo_win.dsw index ae9c722aa..5b03cc95e 100644 --- a/eo/win/eo_win.dsw +++ b/eo/win/eo_win.dsw @@ -75,6 +75,21 @@ Package=<4> ############################################################################### +Project: "t_eoSymreg"=.\t_eoSymreg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency +}}} + +############################################################################### + Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> Package=<5> From 8034b9f344ea48e945fa130e625d7954e2dfdb80 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 18 Aug 2000 08:56:14 +0000 Subject: [PATCH 0249/2134] some signed/unsigned comparisons removed --- eo/test/t-eoSymreg.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index f76467307..2d50fab2b 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -156,7 +156,7 @@ public : double fitness = 0.0; - for (int i = 0; i < inputs.size(); ++i) + for (unsigned i = 0; i < inputs.size(); ++i) { _eo.apply(outputs[i], inputs[i]); fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); @@ -183,7 +183,7 @@ void print_best(eoPop& pop) FitnessType best = pop[0].fitness(); int index = 0; - for (int i = 1; i < pop.size(); ++i) + for (unsigned i = 1; i < pop.size(); ++i) { if (best < pop[i].fitness()) { @@ -210,7 +210,7 @@ void print_best(eoPop& pop) #include "eoSteadyStateEA.h" #include "eoScalarFitness.h" -void main() +int main() { typedef eoMinimizingFitness FitnessType; typedef SymregNode GpNode; @@ -280,6 +280,8 @@ void main() } print_best(pop); + + return 1; } From be0c1996f773860df58f21c0e3111be6ba0f74ac Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 18 Aug 2000 08:57:26 +0000 Subject: [PATCH 0250/2134] Oh, right, dangling pragma --- eo/test/t-eoSymreg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 2d50fab2b..d2750e173 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -1,4 +1,6 @@ +#ifdef _MSC_VER #pragma warning(disable:4786) +#endif #include #include From a7131a7f719419b1305567ee9cbd1c693a363214 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 18 Aug 2000 08:59:20 +0000 Subject: [PATCH 0251/2134] commited --- eo/win/t_eoSymreg.dsp | 100 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 eo/win/t_eoSymreg.dsp diff --git a/eo/win/t_eoSymreg.dsp b/eo/win/t_eoSymreg.dsp new file mode 100644 index 000000000..d2be43ad6 --- /dev/null +++ b/eo/win/t_eoSymreg.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="t_eoSymreg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoSymreg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoSymreg.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoSymreg.mak" CFG="t_eoSymreg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoSymreg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoSymreg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoSymreg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "t_eoSymreg___Win32_Release" +# PROP BASE Intermediate_Dir "t_eoSymreg___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "t_eoSymreg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoSymreg___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoSymreg___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "t_eoSymreg - Win32 Release" +# Name "t_eoSymreg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSymreg.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From ff108477c35aa4b83b3be14687c0ba512214b47b Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 23 Aug 2000 12:03:01 +0000 Subject: [PATCH 0252/2134] eoCounter? eoEasyEA -- made it copyable again eoEvalFunc -- added specialized eoEvalFuncCounter eoEvolutionStrategy -- nothing much eoGenContinue -- nothing eoPop -- fixed nth_element_fitness eoBitOp -- fixed error in xover eoFileMonitor -- now appends always eoParam -- worked around memory leak in MSC's strstream eoParser -- changed -pconfig_file to @config_file eoParser -- added messages instead of exception when required param is missing eoStat -- added eoDistanceStat t-eoFunctor -- don't know --- eo/src/eo | 2 + eo/src/eoEasyEA.h | 47 ++++++++++++++---------- eo/src/eoEvalFunc.h | 26 +++++++++++++ eo/src/eoEvolutionStrategy.h | 14 +++++++ eo/src/eoGenContinue.h | 14 +++---- eo/src/eoPop.h | 5 ++- eo/src/ga/eoBitOp.h | 3 +- eo/src/utils/eoFileMonitor.cpp | 67 +++++++++++++++++++--------------- eo/src/utils/eoFileMonitor.h | 10 +++-- eo/src/utils/eoParam.h | 3 +- eo/src/utils/eoParser.cpp | 40 ++++++++++++++------ eo/src/utils/eoParser.h | 5 ++- eo/src/utils/eoStat.h | 63 ++++++++++++++++++++++++++++++-- eo/test/t-eoFunctor.cpp | 4 -- eo/win/eo.dsp | 2 +- eo/win/t_eoFunctor.dsp | 14 +++---- 16 files changed, 229 insertions(+), 90 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index e269e9688..5b38edac9 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -109,6 +109,8 @@ // aliens //#include +#include +#include //----------------------------------------------------------------------------- // to be continued ... diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 070452c0c..d23bac1bf 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -55,9 +55,9 @@ template class eoEasyEA: public eoAlgo eoReplacement& _replace ) : continuator(_continuator), eval(_eval), - selectTransform(0), + selectTransform(dummySelect, dummyTransform), breed(_breed), - mergeReduce(0), + mergeReduce(dummyMerge, dummyReduce), replace(_replace) {} @@ -70,9 +70,9 @@ template class eoEasyEA: public eoAlgo eoReduce& _reduce ) : continuator(_continuator), eval(_eval), - selectTransform(0), + selectTransform(dummySelect, dummyTransform), breed(_breed), - mergeReduce(new eoMergeReduce(_merge, _reduce)), + mergeReduce(_merge, _reduce), replace(mergeReduce) {} @@ -85,9 +85,9 @@ template class eoEasyEA: public eoAlgo eoReplacement& _replace ) : continuator(_continuator), eval(_eval), - selectTransform(new eoSelectTransform(_select, _transform)), + selectTransform(_select, _transform), breed(selectTransform), - mergeReduce(0), + mergeReduce(dummyMerge, dummyReduce), replace(_replace) {} @@ -101,17 +101,15 @@ template class eoEasyEA: public eoAlgo eoReduce& _reduce ) : continuator(_continuator), eval(_eval), - selectTransform(new eoSelectTransform(_select, _transform)), - breed(*selectTransform), - mergeReduce(new eoMergeReduce(_merge, _reduce)), - replace(*mergeReduce) + selectTransform(_select, _transform), + breed(selectTransform), + mergeReduce(_merge, _reduce), + replace(mergeReduce) {} - - ~eoEasyEA() { delete selectTransform; delete mergeReduce; } - + /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { @@ -146,16 +144,27 @@ template class eoEasyEA: public eoAlgo private: - /// dissallow copying cuz of pointer stuff - eoEasyEA(const eoEasyEA&); - /// dissallow copying cuz of pointer stuff - const eoEasyEA& operator=(const eoEasyEA&); + // If selectTransform needs not be used, dummySelect and dummyTransform are used + // to instantiate it. + class eoDummySelect : public eoSelect + { public : void operator()(const eoPop&, eoPop&) {} } dummySelect; + + class eoDummyTransform : public eoTransform + { public : void operator()(eoPop&) {} } dummyTransform; + eoContinue& continuator; eoEvalFunc& eval; - eoSelectTransform* selectTransform; + + eoSelectTransform selectTransform; eoBreed& breed; - eoMergeReduce* mergeReduce; + + // If mergeReduce needs not be used, dummyMerge and dummyReduce are used + // to instantiate it. + eoNoElitism dummyMerge; + eoTruncate dummyReduce; + + eoMergeReduce mergeReduce; eoReplacement& replace; }; diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 0b1744266..41dae963b 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -44,4 +44,30 @@ template class eoEvalFunc : public eoUnaryFunctor typedef typename EOT::Fitness EOFitT; }; +/** +Counts the number of evaluations actually performed, thus checks first +if it has to evaluate.. etc. +*/ + +#include +template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam +{ + public : + eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "eval_counter") + : func(_func), eoValueParam(0, _name) {} + + void operator()(EOT& _eo) + { + if (_eo.invalid()) + { + value()++; + func(_eo); + } + } + + private : + eoEvalFunc& func; +}; + + #endif \ No newline at end of file diff --git a/eo/src/eoEvolutionStrategy.h b/eo/src/eoEvolutionStrategy.h index 08309deae..ab6261162 100644 --- a/eo/src/eoEvolutionStrategy.h +++ b/eo/src/eoEvolutionStrategy.h @@ -81,6 +81,20 @@ class eoEvolutionStrategy: public eoAlgo eoEasyEA easyEA; }; +template +eoEvolutionStrategy make_es(eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + bool _comma) + +{ + if (_comma) + return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::comma_strategy()); + //else + return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::plus_strategy()); +} + //----------------------------------------------------------------------------- #endif eoSelectTransformReduce_h diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index a546702d0..a0fcc77fe 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -36,13 +36,13 @@ class eoGenContinue: public eoContinue public: /// Ctor for setting a - eoGenContinue( unsigned _totalGens) + eoGenContinue( unsigned long _totalGens) : repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), thisGeneration(thisGenerationPlaceHolder){}; /// Ctor for enabling the save/load the no. of generations counted - eoGenContinue( unsigned _totalGens, unsigned& _currentGen) + eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) : repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), thisGeneration(_currentGen){}; @@ -57,21 +57,21 @@ public: /** Sets the number of generations to reach and sets the current generation to 0 (the begin)*/ - virtual void totalGenerations( unsigned _tg ) { + virtual void totalGenerations( unsigned long _tg ) { repTotalGenerations = _tg; thisGeneration = 0; }; /** Returns the number of generations to reach*/ - virtual unsigned totalGenerations( ) + virtual unsigned long totalGenerations( ) { return repTotalGenerations; }; private: - unsigned repTotalGenerations; - unsigned thisGenerationPlaceHolder; - unsigned& thisGeneration; + unsigned long repTotalGenerations; + unsigned long thisGenerationPlaceHolder; + unsigned long& thisGeneration; }; #endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 7028c80ff..8505783c3 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -113,11 +113,12 @@ class eoPop: public vector, public eoObject, public eoPersistent struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; Fitness nth_element_fitness(int which) const - { + { // probably not the fastest way to do this, but what the heck + vector fitness(size()); std::transform(begin(), end(), fitness.begin(), GetFitness()); - vector::iterator it = fitness.begin(); + vector::iterator it = fitness.begin() + which; std::nth_element(fitness.begin(), it, fitness.end(), greater()); return *it; } diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 7179b52d2..5051199a4 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -192,7 +192,7 @@ template class eoBinCrossover: public eoQuadraticOp { unsigned site = rng.random(min(chrom1.size(), chrom2.size())); - if (std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) + if (!std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) { swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); @@ -267,6 +267,7 @@ template class eoBinNxOver: public eoQuadraticOp }; + /** eoBinGxOver --> gene crossover \class eoBinGxOver eoBitOp.h ga/eoBitOp.h \ingroup bitstring diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index 241f715ff..6c64ede87 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -8,34 +8,37 @@ using namespace std; +void eoFileMonitor::printHeader(std::ostream& os) +{ + iterator it = vec.begin(); + + os << (*it)->longName(); + + ++it; + + for (; it != vec.end(); ++it) + { + os << ',' << (*it)->longName(); + } + os << '\n'; +} + +void eoFileMonitor::printHeader() +{ + // create file + ofstream os(filename.c_str()); + + if (!os) + { + string str = "eoFileMonitor: Could not open " + filename; + throw runtime_error(str); + } + + printHeader(os); +} + eoMonitor& eoFileMonitor::operator()(void) { - if (firsttime) - { - firsttime = false; - - // create file - ofstream os(filename.c_str()); - - if (!os) - { - string str = "eoFileMonitor: Could not open " + filename; - throw runtime_error(str); - } - - iterator it = vec.begin(); - - os << (*it)->longName(); - - ++it; - - for (; it != vec.end(); ++it) - { - os << ',' << (*it)->longName(); - } - } - // ok, now the real saving. append to file - ofstream os(filename.c_str(), ios_base::app); if (!os) @@ -44,15 +47,21 @@ eoMonitor& eoFileMonitor::operator()(void) throw runtime_error(str); } - iterator it = vec.begin(); - - os << '\n' << (*it)->getValue(); + return operator()(os); +} +eoMonitor& eoFileMonitor::operator()(std::ostream& os) +{ + iterator it = vec.begin(); + + os << (*it)->getValue(); + for(++it; it != vec.end(); ++it) { os << ',' << (*it)->getValue(); } + os << '\n'; return *this; } diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 45d889a60..99b4e7faa 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -38,13 +38,17 @@ class eoFileMonitor : public eoMonitor { public : - eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim), firsttime(true) {} + eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim) {} eoMonitor& operator()(void); + eoMonitor& operator()(std::ostream& os); + + void printHeader(void); + virtual void printHeader(std::ostream& os); + private : - std::string filename; std::string delim; - bool firsttime; + std::string filename; }; #endif diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index dfd6b3fa4..e83eb8f81 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -153,7 +153,8 @@ public : std::string getValue(void) const { - std::ostrstream os; + char buf[1024]; + std::ostrstream os(buf, 1023); os << repValue; os << std::ends; return os.str(); diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index cb60c6939..07fa0eb5f 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -39,7 +39,6 @@ eoParameterLoader::~eoParameterLoader() eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : programName( _argv[0]), programDescription( _programDescription), - parameterFile("", _lFileParamName, "Load using a configuration file", _shortHand), needHelp(false, "help", "Prints this message", 'h') { strstream stream; @@ -51,15 +50,7 @@ eoParser::eoParser ( int _argc, char **_argv , string _programDescription, strin readFrom(stream); - processParam(parameterFile); processParam(needHelp); - - if (parameterFile.getValue() != parameterFile.defValue()) - { - ifstream is (parameterFile.getValue().c_str()); - - readFrom(is); - } } void eoParser::processParam(eoParam& param, std::string section) @@ -72,7 +63,8 @@ void eoParser::doRegisterParam(eoParam& param) const { if (param.required() && !isItThere(param)) { - throw std::runtime_error("required parameter missing"); + string msg = "required parameter: " + param.longName() + " missing"; + messages.push_back(msg); } pair value = getValue(param); @@ -165,6 +157,24 @@ void eoParser::readFrom(istream& is) shortNameMap[str[1]] = value; } } + if (str[0] == '@') + { // read response file + string filename(str.begin() + 1, str.end()); + + ifstream ifs (filename.c_str()); + + ifs.peek(); // check if it exists + + if (!ifs) + { + string msg = "Could not open response file: " + filename; + throw runtime_error(msg); + } + + // read and overwrite + readFrom(ifs); + break; // stop reading command line + } } updateParameters(); @@ -213,7 +223,14 @@ void eoParser::printOn(ostream& os) const } void eoParser::printHelp(ostream& os) -{ +{ + if (needHelp.value() == false && !messages.empty()) + { + std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); + messages.clear(); + return; + } + // print program name and description os << this->programName <<": "<< programDescription << "\n\n"; @@ -253,6 +270,7 @@ void eoParser::printHelp(ostream& os) os <<". By default: "<second->defValue() << '\n'; } // for p + os << "\n@param_file \t defines a file where the parameters are stored\n"; os << '\n'; } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index de24e8eec..d65278c5c 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -127,7 +127,7 @@ public: std::string className(void) const { return "Parser"; } /// true if the user made an error or asked for help - bool userNeedsHelp(void) const { return needHelp.value(); } + bool userNeedsHelp(void) const { return needHelp.value() || !messages.empty(); } /** * Prints an automatic help in the specified output using the information @@ -157,8 +157,9 @@ private: map shortNameMap; map longNameMap; - eoValueParam parameterFile; eoValueParam needHelp; + + mutable std::vector messages; }; diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 142f400c5..845fad8a1 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -104,19 +104,76 @@ public : }; template -class eoBestFitnessStat : public eoStat +class eoNthElementFitnessStat : public eoStat { public : typedef typename EOT::Fitness Fitness; - eoBestFitnessStat(std::string _description = "Best Fitness") : eoStat(Fitness(), _description) {} + eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : which(_which), eoStat(Fitness(), _description) {} virtual void operator()(const eoPop& _pop) { - value() = _pop.nth_element_fitness(0); + if (which > _pop.size()) + throw logic_error("fitness requested of element outside of pop"); + + value() = _pop.nth_element_fitness(which); + } + +private : + unsigned which; +}; + + +template +class eoBestFitnessStat : public eoNthElementFitnessStat +{ +public : + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best Fitness") : eoNthElementFitnessStat(0, _description) {} +}; + +template +class eoDistanceStat : public eoStat +{ +public : + eoDistanceStat(std::string _name = "distance") : eoStat(0.0, _name) {} + + template + double distance(T a, T b) + { + T res = a-b; + return res < 0? -res : res; + } + + double distance(bool a, bool b) + { + return (a==b)? 0 : 1; + } + + void operator()(const eoPop& _pop) + { + double& v = value(); + v = 0.0; + + for (unsigned i = 0; i < _pop.size(); ++i) + { + for (unsigned j = 0; j < _pop.size(); ++j) + { + for (unsigned k = 0; k < _pop[i].size(); ++k) + { + v += distance(_pop[i][k], _pop[j][k]); + } + } + } + + double sz = _pop.size(); + v /= sz * sz * _pop[0].size(); } }; + + /* template class eoStdevStat : public eoStat diff --git a/eo/test/t-eoFunctor.cpp b/eo/test/t-eoFunctor.cpp index ab46f8e3c..27ccf995d 100644 --- a/eo/test/t-eoFunctor.cpp +++ b/eo/test/t-eoFunctor.cpp @@ -18,7 +18,6 @@ public : }; #include -#include #include #include @@ -46,8 +45,5 @@ int main(void) eo.push_back(1); eo.push_back(2); - eoTranspose transpose; - transpose(eo); - return 1; } \ No newline at end of file diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 9e292dc3b..abdd05109 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "NDEBUG" # ADD RSC /l 0xc0a /d "NDEBUG" diff --git a/eo/win/t_eoFunctor.dsp b/eo/win/t_eoFunctor.dsp index 35bd33611..77f1fe82d 100644 --- a/eo/win/t_eoFunctor.dsp +++ b/eo/win/t_eoFunctor.dsp @@ -41,15 +41,15 @@ RSC=rc.exe # PROP Intermediate_Dir "t_eoFunctor___Win32_Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "t_eoFunctor - Win32 Debug" @@ -63,16 +63,16 @@ LINK32=link.exe # PROP Output_Dir "t_eoFunctor___Win32_Debug" # PROP Intermediate_Dir "t_eoFunctor___Win32_Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF From e18a48d4a141db4ca26bffc165fa8a062176f47a Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 23 Aug 2000 12:50:34 +0000 Subject: [PATCH 0253/2134] eoParseTree-- changed typedef --- eo/src/gp/eoParseTree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 0b3eccf86..b3a3d4ee1 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -18,7 +18,7 @@ class eoParseTree : public EO, public parse_tree { public : - typedef parse_tree::subtree Subtree; + typedef eoParseTree::subtree Subtree; eoParseTree(void) {} eoParseTree(const parse_tree& tree) : parse_tree(tree) {} From 40783947488490ae410b6b778cc43d34076ab8ea Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 23 Aug 2000 12:52:48 +0000 Subject: [PATCH 0254/2134] Yet another change in eoParseTree --- eo/src/gp/eoParseTree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index b3a3d4ee1..0b3eccf86 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -18,7 +18,7 @@ class eoParseTree : public EO, public parse_tree { public : - typedef eoParseTree::subtree Subtree; + typedef parse_tree::subtree Subtree; eoParseTree(void) {} eoParseTree(const parse_tree& tree) : parse_tree(tree) {} From ca46a3651b08b8dc7b0ae010ed45d7445a8e8321 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 23 Aug 2000 13:07:51 +0000 Subject: [PATCH 0255/2134] ok, fixed this problem with typedefs in gcc-0.92 (strange....) --- eo/src/gp/eoParseTree.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 0b3eccf86..061f030a4 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -28,16 +28,9 @@ public : if (_size < 1) return; - if (size() > _size) + while (size() > _size) { - Subtree* sub = &operator[](size() - 2); // prune tree - - while (sub->size() > _size) - { - sub = &sub->operator[](0); - } - - back() = *sub; + back() = operator[](size()-2); } } From fc172ef858b3b064747c2e8cff97211967524fb5 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 23 Aug 2000 14:56:04 +0000 Subject: [PATCH 0256/2134] Added -O2 as compiler flag --- eo/src/Makefile.am | 1 + eo/src/utils/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 9ccbaf169..050a9dc8f 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -5,6 +5,7 @@ ############################################################################### SUBDIRS = es ga gp utils other +CPPFLAGS = -O2 lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 77beb7501..6be31c710 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -5,7 +5,7 @@ ############################################################################### INCLUDES = -I$(top_builddir)/src - +CPPFLAGS = -O2 lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp From fd8a2529a50b3f167347e559891fea7e327b5b15 Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 9 Sep 2000 13:43:31 +0000 Subject: [PATCH 0257/2134] eo: added some missing entries Pop: error in nth_element_fitness sga: error in eval eoParseTree: oddities with gcc checkpointing: added eoParser and eoState eoParser: support for wrongly entered parameter names rnd_generators: flip(0.5) -> flip(bias) in binary_generator selectors.h: ??? --- eo/src/eo | 11 ++++--- eo/src/eoInit.h | 2 +- eo/src/eoPop.h | 2 +- eo/src/eoSGA.h | 2 +- eo/src/utils/checkpointing | 2 ++ eo/src/utils/eoParser.cpp | 55 ++++++++++++++++++++++++++++++++++- eo/src/utils/eoParser.h | 13 +++++---- eo/src/utils/rnd_generators.h | 2 +- eo/src/utils/selectors.h | 2 +- eo/test/t-eoSymreg.cpp | 11 +------ 10 files changed, 77 insertions(+), 25 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 5b38edac9..7a8ae6f3c 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -1,6 +1,6 @@ //----------------------------------------------------------------------------- // eo -// (c) GeNeura Team 1998 +// (c) GeNeura Team 1998 - 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,10 @@ */ //----------------------------------------------------------------------------- -#ifndef __GNUG__ +#ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif // __GNUG__ +#endif #ifndef _eo_ #define _eo_ @@ -104,13 +104,16 @@ #include #include +// Inserters +#include +#include + // Utils #include // aliens //#include #include -#include //----------------------------------------------------------------------------- // to be continued ... diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index b6372299d..c1f0548db 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -74,7 +74,7 @@ class eoInitVariableLength: public eoInit : offset(_minSize), extent(_maxSize - _minSize), generator(_generator) { if (_minSize >= _maxSize) - throw logical_error("eoInitVariableLength: minSize larger or equal to maxSize"); + throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); } void operator()(EOT& chrom) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 8505783c3..7d254cb48 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -114,7 +114,7 @@ class eoPop: public vector, public eoObject, public eoPersistent Fitness nth_element_fitness(int which) const { // probably not the fastest way to do this, but what the heck - + vector fitness(size()); std::transform(begin(), end(), fitness.begin(), GetFitness()); diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 79a402d14..1dcfe6101 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -79,10 +79,10 @@ public : mutate(offspring[i]); } - eval(offspring[i]); } _pop.swap(offspring); + apply(eval, _pop); } while (cont(_pop)); } diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index dba79bcef..39178ec34 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -1,4 +1,6 @@ +#include +#include #include #include #include diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 07fa0eb5f..2487cd678 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -63,7 +63,7 @@ void eoParser::doRegisterParam(eoParam& param) const { if (param.required() && !isItThere(param)) { - string msg = "required parameter: " + param.longName() + " missing"; + string msg = "Required parameter: " + param.longName() + " missing"; messages.push_back(msg); } @@ -274,3 +274,56 @@ void eoParser::printHelp(ostream& os) os << '\n'; } + +bool eoParser::userNeedsHelp(void) +{ + /* + check whether there are long or short names entered + without a corresponding parameter + */ + + for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) + { + string entry = lIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->longName()) + { + break; + } + } + + if (it == params.end()) + { + string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) + { + char entry = sIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->shortName()) + { + break; + } + } + + if (it == params.end()) + { + string entryString(1, entry); + string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + return needHelp.value() || !messages.empty(); +} diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index d65278c5c..8af3a11bc 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -127,8 +127,7 @@ public: std::string className(void) const { return "Parser"; } /// true if the user made an error or asked for help - bool userNeedsHelp(void) const { return needHelp.value() || !messages.empty(); } - + bool userNeedsHelp(void); /** * Prints an automatic help in the specified output using the information * provided by parameters @@ -148,14 +147,18 @@ private: void updateParameters() const; typedef std::multimap MultiMapType; - + + // used to store all parameters that are processed MultiMapType params; string programName; string programDescription; - map shortNameMap; - map longNameMap; + typedef map ShortNameMapType; + ShortNameMapType shortNameMap; + + typedef map LongNameMapType; + LongNameMapType longNameMap; eoValueParam needHelp; diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index a8c6ceb1c..17152113c 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -58,7 +58,7 @@ class boolean_generator public : boolean_generator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} - bool operator()(void) { return gen.flip(0.5); } + bool operator()(void) { return gen.flip(bias); } private : float bias; eoRng& gen; diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 2d9a3db73..349bf7cc7 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -209,7 +209,7 @@ It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& { It worst = _begin + _gen.random(_end - _begin); - for (unsigned i = 0; i < _t_size - 1; ++i) + for (unsigned i = 1; i < _t_size; ++i) { It competitor = _begin + _gen.random(_end - _begin); diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index d2750e173..3f5d62a10 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -3,7 +3,7 @@ #endif #include -#include +#include using namespace gp_parse_tree; using namespace std; @@ -203,15 +203,6 @@ void print_best(eoPop& pop) cout << endl << "RMS Error = " << pop[index].fitness() << endl; } - -#include -#include "eoGOpBreeder.h" -#include "eoSequentialGOpSel.h" -#include "eoProportionalGOpSel.h" -#include "eoDetTournamentInserter.h" -#include "eoSteadyStateEA.h" -#include "eoScalarFitness.h" - int main() { typedef eoMinimizingFitness FitnessType; From f7c157c1549dc18536e9906d6c00d6f701cdb652 Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 9 Sep 2000 13:52:16 +0000 Subject: [PATCH 0258/2134] Changed construction order as gcc was warning --- eo/src/eoCounter.h | 6 +++--- eo/src/eoEvalFunc.h | 2 +- eo/src/utils/eoFileMonitor.h | 2 +- eo/src/utils/eoStat.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/src/eoCounter.h b/eo/src/eoCounter.h index ea82d3240..e9b161c39 100644 --- a/eo/src/eoCounter.h +++ b/eo/src/eoCounter.h @@ -43,7 +43,7 @@ class eoProcedureCounter : public Procedure, public eoValueParam public: eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter") - : proc(_proc), eoValueParam(0, _name) {} + : eoValueParam(0, _name), proc(_proc) {} /** Calls the embedded function and increments the counter @@ -96,7 +96,7 @@ class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam(0, _name) {} + : eoValueParam(0, _name), func(_func) {} /** Calls the embedded function and increments the counter @@ -143,7 +143,7 @@ class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam(0, _name) {} + : eoValueParam(0, _name), func(_func) {} /** Calls the embedded function and increments the counter diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 41dae963b..0dde11e1b 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -54,7 +54,7 @@ template class eoEvalFuncCounter : public eoEvalFunc, public eoV { public : eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "eval_counter") - : func(_func), eoValueParam(0, _name) {} + : eoValueParam(0, _name), func(_func) {} void operator()(EOT& _eo) { diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 99b4e7faa..3bc4239e4 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -47,8 +47,8 @@ public : virtual void printHeader(std::ostream& os); private : - std::string delim; std::string filename; + std::string delim; }; #endif diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 845fad8a1..a78a5eea0 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -109,7 +109,7 @@ class eoNthElementFitnessStat : public eoStat public : typedef typename EOT::Fitness Fitness; - eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : which(_which), eoStat(Fitness(), _description) {} + eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : eoStat(Fitness(), _description), which(_which) {} virtual void operator()(const eoPop& _pop) { From f1ec21e7244c2c8473452a68e8a3798621dfe3a1 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 20 Sep 2000 13:32:28 +0000 Subject: [PATCH 0259/2134] Error in random_generator removed. --- eo/src/utils/rnd_generators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 17152113c..c8c095707 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -73,7 +73,7 @@ template class random_generator public : random_generator(T _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} - T operator()(void) { return (T) random.random(max); } + T operator()(void) { return (T) random.random(maxim); } private : T maxim; From 686e7f32730e1f8f3a4b2c2a10fb68072df52612 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 29 Sep 2000 10:39:19 +0000 Subject: [PATCH 0260/2134] Updated version no. to 0.9.1 --- eo/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/configure.in b/eo/configure.in index 59e79ba89..6f2ecb466 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,7 +1,7 @@ AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.0) +AM_INIT_AUTOMAKE(eo, 0.9.1) AC_PROG_CXX From 543d5a5918ed4afeca03e0e50e03c6d16ebeeb85 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 6 Oct 2000 07:32:26 +0000 Subject: [PATCH 0261/2134] Changed ostream_iterator to use AtomType rather than double. Stupid me! --- eo/src/eoFixedLength.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index b57e0733b..a7355e5b3 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -60,7 +60,7 @@ class eoFixedLength : public EO, public std::vector os << size() << ' '; - std::copy(begin(), end(), ostream_iterator(os, " ")); + std::copy(begin(), end(), ostream_iterator(os, " ")); } /// reading... From d42f16481d9c9fa74318001d41b3021e4b9f6779 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 6 Oct 2000 07:50:10 +0000 Subject: [PATCH 0262/2134] Updated authors and started a README --- eo/AUTHORS | 3 ++- eo/README | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/eo/AUTHORS b/eo/AUTHORS index 716ec1eda..1687ecd93 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -2,5 +2,6 @@ Pedro Angel Castillo Valdivieso Juan Julian Merelo Guervos Victor Manuel Rivas Santos Gustavo Romero Lopez - +Maarten Keijzer +Marc Schoenauer diff --git a/eo/README b/eo/README index e69de29bb..e9df88db3 100644 --- a/eo/README +++ b/eo/README @@ -0,0 +1,12 @@ + +Welcome to EO, + +if you extracted a fresh snapshot from the cvs-repository, remember to do: + +$> ./autogen.sh --enable-maintainer-mode + +instead of + +$> ./configure + +before making the libraries. \ No newline at end of file From 1d0794c46a0fe12684577d7d5f3a07a9da697974 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 6 Oct 2000 10:41:38 +0000 Subject: [PATCH 0263/2134] Added an eoSortedStatBase for more efficient statistic calculations updated a few makefiles to include the html and latex docs with the distribution. --- eo/doc/Makefile.am | 10 +++++++++- eo/src/eoPop.h | 24 +++++++++++++++++++----- eo/src/utils/eoCheckPoint.h | 15 +++++++++++++++ eo/src/utils/eoStat.h | 37 ++++++++++++++++++++++++------------- 4 files changed, 67 insertions(+), 19 deletions(-) diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index 0f22bbdf5..922a7810d 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -6,4 +6,12 @@ ############################################################################### -EXTRA_DIST = eo.cfg foot.html \ No newline at end of file +EXTRA_DIST = eo.cfg foot.html html/* latex/* + +all : + +doc : eo.cfg + doxygen eo.cfg + +clean : + rm -rf html latex man diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 7d254cb48..bd8c54fa2 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -27,6 +27,7 @@ #include #include +#include // EO includes #include // for eoInit @@ -90,6 +91,15 @@ class eoPop: public vector, public eoObject, public eoPersistent /// ~eoPop() {}; + + /// helper struct for getting a pointer + struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; + /// helper struct for comparing on pointers + struct Cmp { + bool operator()(const EO* a, const EO* b) const + { return b->operator<(*a); } + }; + /** sort the population. Use this member to sort in order of descending Fitness, so the first individual is the best! @@ -99,6 +109,15 @@ class eoPop: public vector, public eoObject, public eoPersistent std::sort(begin(), end(), greater >()); } + void sort(vector& result) const + { + result.resize(size()); + + std::transform(begin(), end(), result.begin(), Ref()); + + std::sort(result.begin(), result.end(), Cmp()); + } + /** slightly faster algorithm than sort to find all individuals that are better than the nth individual @@ -123,11 +142,6 @@ class eoPop: public vector, public eoObject, public eoPersistent return *it; } - struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; - struct Cmp { - bool operator()(const EO* a, const EO* b) const - { return b->operator<(*a); } - }; /// const nth_element function, returns pointers to sorted individuals void nth_element(int which, vector& result) const { diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index c7abcef7b..831a19419 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -30,6 +30,7 @@ #include template class eoStatBase; +template class eoSortedStatBase; class eoMonitor; class eoUpdater; @@ -42,6 +43,7 @@ public : bool operator()(const eoPop& _pop); + void add(eoSortedStatBase& _stat) { sorted.push_back(&_stat); } void add(eoStatBase& _stat) { stats.push_back(&_stat); } void add(eoMonitor& _mon) { monitors.push_back(&_mon); } void add(eoUpdater& _upd) { updaters.push_back(&_upd); } @@ -51,6 +53,7 @@ public : private : eoContinue& cont; + std::vector*> sorted; std::vector*> stats; std::vector monitors; std::vector updaters; @@ -60,6 +63,18 @@ template bool eoCheckPoint::operator()(const eoPop& _pop) { unsigned i; + + if (!sorted.empty()) + { + vector sorted_pop; + _pop.sort(sorted_pop); + + for (i = 0; i < sorted.size(); ++i) + { + (*sorted[i])(sorted_pop); + } + } + for (i = 0; i < stats.size(); ++i) (*stats[i])(_pop); diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index a78a5eea0..0ae15e761 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -31,17 +31,13 @@ #include #include +/** + Base class for all statistics that need to be calculated + over the (unsorted) population +*/ template class eoStatBase : public eoUnaryFunctor&> -{ -public : - virtual ~eoStatBase(){} - - /** - calculate some statistic on the population - */ - virtual void operator()(const eoPop& _pop) = 0; -}; +{}; template class eoStat : public eoValueParam, public eoStatBase @@ -50,6 +46,21 @@ public : eoStat(T _value, std::string _description) : eoValueParam(_value, _description) {} }; +/** + Base class for statistics calculated over a sorted snapshot of the population +*/ +template +class eoSortedStatBase : public eoUnaryFunctor&> +{ +}; + +template +class eoSortedStat : public eoSortedStatBase, public eoValueParam +{ +public : + eoSortedStat(ParamType _value, std::string _desc) : eoValueParam(_value, _desc) {} +}; + #include /** @@ -104,19 +115,19 @@ public : }; template -class eoNthElementFitnessStat : public eoStat +class eoNthElementFitnessStat : public eoSortedStat { public : typedef typename EOT::Fitness Fitness; - eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : eoStat(Fitness(), _description), which(_which) {} + eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : eoSortedStat(Fitness(), _description), which(_which) {} - virtual void operator()(const eoPop& _pop) + virtual void operator()(const vector& _pop) { if (which > _pop.size()) throw logic_error("fitness requested of element outside of pop"); - value() = _pop.nth_element_fitness(which); + value() = _pop[which]->fitness(); } private : From f7c98d5b31e8f017cb26cc9086e9465ac98811b3 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 9 Oct 2000 16:13:20 +0000 Subject: [PATCH 0264/2134] Changed functor base names and added to version --- eo/README | 11 +++++++++- eo/configure.in | 2 +- eo/src/apply.h | 5 ++++- eo/src/eoAlgo.h | 2 +- eo/src/eoBreed.h | 2 +- eo/src/eoContinue.h | 2 +- eo/src/eoEvalFunc.h | 2 +- eo/src/eoFunctor.h | 39 +++++++++++++++++------------------ eo/src/eoGOpBreeder.h | 7 ++++++- eo/src/eoIndiSelector.h | 2 +- eo/src/eoInit.h | 2 +- eo/src/eoInserter.h | 2 +- eo/src/eoMerge.h | 2 +- eo/src/eoOp.h | 10 ++++----- eo/src/eoReduce.h | 2 +- eo/src/eoReplacement.h | 2 +- eo/src/eoSelect.h | 2 +- eo/src/eoSelectOne.h | 2 +- eo/src/eoTransform.h | 2 +- eo/src/utils/eoMonitor.h | 2 +- eo/src/utils/eoStat.h | 4 ++-- eo/src/utils/eoUpdater.h | 2 +- eo/test/t-eoBaseFunctions.cpp | 4 ++-- 23 files changed, 64 insertions(+), 48 deletions(-) diff --git a/eo/README b/eo/README index e9df88db3..96a7b4f4b 100644 --- a/eo/README +++ b/eo/README @@ -9,4 +9,13 @@ instead of $> ./configure -before making the libraries. \ No newline at end of file +before making the libraries. + +Documentation can be found in: + eo/doc/html + +And \latex sources for a reference manual in: + eo/doc/latex + +There are currently no examples except the programs in the test directory. +Only the files mentioned in Makefile.am will actually compile. diff --git a/eo/configure.in b/eo/configure.in index 6f2ecb466..9ad61a7d7 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,7 +1,7 @@ AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.1) +AM_INIT_AUTOMAKE(eo, 0.9.11) AC_PROG_CXX diff --git a/eo/src/apply.h b/eo/src/apply.h index c0ad8a076..234bf7715 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -29,8 +29,11 @@ #include #include +/** + Applies a unary function to a vector of things. +*/ template -void apply(eoUnaryFunctor& _proc, std::vector& _pop) +void apply(eoUF& _proc, std::vector& _pop) { for (unsigned i = 0; i < _pop.size(); ++i) { diff --git a/eo/src/eoAlgo.h b/eo/src/eoAlgo.h index ac9307a50..74ad29636 100644 --- a/eo/src/eoAlgo.h +++ b/eo/src/eoAlgo.h @@ -36,7 +36,7 @@ population-transforming algorithms. */ template< class EOT > -class eoAlgo : public eoUnaryFunctor&> +class eoAlgo : public eoUF&, void> {}; diff --git a/eo/src/eoBreed.h b/eo/src/eoBreed.h index e57f5d893..534983449 100644 --- a/eo/src/eoBreed.h +++ b/eo/src/eoBreed.h @@ -40,7 +40,7 @@ function. @see eoSelect, eoTransform, eoSelectTransform */ template -class eoBreed : public eoBinaryFunctor&, eoPop&> +class eoBreed : public eoBF&, eoPop&, void> {}; /** diff --git a/eo/src/eoContinue.h b/eo/src/eoContinue.h index 0576d5d91..2d7998c4b 100644 --- a/eo/src/eoContinue.h +++ b/eo/src/eoContinue.h @@ -33,7 +33,7 @@ * false for termination */ template< class EOT> -class eoContinue : public eoUnaryFunctor&> {}; +class eoContinue : public eoUF&, bool> {}; #endif diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 0dde11e1b..8ef1a0201 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -38,7 +38,7 @@ EO, the requirements on this EO will depend on the evaluator. */ -template class eoEvalFunc : public eoUnaryFunctor +template class eoEvalFunc : public eoUF { public : typedef typename EOT::Fitness EOFitT; diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 41125f2f1..3c8edb45a 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -26,6 +26,8 @@ #ifndef _eoFunctor_h #define _eoFunctor_h +#include + /// Base class for functors to get a nice hierarchy diagram class eoFunctorBase { @@ -41,19 +43,19 @@ public : }; /** - Basic Procedure. Derive from this class when defining + Basic Function. Derive from this class when defining any procedure. It defines a result_type that can be used to determine the return type Argument and result types can be any type including void for result_type **/ template -class eoProcedure : public eoFunctorBase +class eoF : public eoFunctorBase { public : /// virtual dtor here so there is no need to define it in derived classes - virtual ~eoProcedure() {} + virtual ~eoF() {} typedef R result_type; @@ -68,28 +70,25 @@ public : @see eoCounter, make_counter */ template -eoFunctorBase::procedure_tag functor_category(const eoProcedure&) +eoFunctorBase::procedure_tag functor_category(const eoF&) { return eoFunctorBase::procedure_tag(); } /** Basic Unary Functor. Derive from this class when defining - any unary function. First template argument is result_type, second - is first_argument_type. + any unary function. First template argument is the first_argument_type, + second result_type. Argument and result types can be any type including void for result_type **/ -template -class eoUnaryFunctor : public eoFunctorBase +template +class eoUF : public eoFunctorBase, public std::unary_function { public : /// virtual dtor here so there is no need to define it in derived classes - virtual ~eoUnaryFunctor() {} - - typedef R result_type; - typedef A1 first_argument_type; + virtual ~eoUF() {} /// The pure virtual function that needs to be implemented by the subclass virtual R operator()(A1) = 0; @@ -101,7 +100,7 @@ public : @see eoCounter, make_counter */ template -eoFunctorBase::unary_function_tag functor_category(const eoUnaryFunctor&) +eoFunctorBase::unary_function_tag functor_category(const eoUF&) { return eoFunctorBase::unary_function_tag(); } @@ -114,16 +113,16 @@ eoFunctorBase::unary_function_tag functor_category(const eoUnaryFunctor&) Argument and result types can be any type including void for result_type **/ -template -class eoBinaryFunctor : public eoFunctorBase +template +class eoBF : public eoFunctorBase, public std::binary_function { public : /// virtual dtor here so there is no need to define it in derived classes - virtual ~eoBinaryFunctor() {} + virtual ~eoBF() {} - typedef R result_type; - typedef A1 first_argument_type; - typedef A2 second_argument_type; + //typedef R result_type; + //typedef A1 first_argument_type; + //typedef A2 second_argument_type; /// The pure virtual function that needs to be implemented by the subclass virtual R operator()(A1, A2) = 0; @@ -135,7 +134,7 @@ public : @see eoCounter, make_counter */ template -eoFunctorBase::binary_function_tag functor_category(const eoBinaryFunctor&) +eoFunctorBase::binary_function_tag functor_category(const eoBF&) { return eoFunctorBase::binary_function_tag(); } diff --git a/eo/src/eoGOpBreeder.h b/eo/src/eoGOpBreeder.h index 12d811c2a..13c8a717a 100644 --- a/eo/src/eoGOpBreeder.h +++ b/eo/src/eoGOpBreeder.h @@ -18,8 +18,13 @@ #include #include +/** + Base class for breeders using generalized operators, I'm not sure if we + will maintain the generalized operators in their current form, so + it might change. +*/ template -class eoGOpBreeder: public eoUnaryFunctor&> +class eoGOpBreeder: public eoUF&, void> { public: /// Default constructor. diff --git a/eo/src/eoIndiSelector.h b/eo/src/eoIndiSelector.h index 0d96514d0..ea4fc34c0 100644 --- a/eo/src/eoIndiSelector.h +++ b/eo/src/eoIndiSelector.h @@ -41,7 +41,7 @@ */ template -class eoIndiSelector : public eoProcedure +class eoIndiSelector : public eoF { public : diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index c1f0548db..bf64dc103 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -38,7 +38,7 @@ */ template -class eoInit : public eoUnaryFunctor +class eoInit : public eoUF {}; /** diff --git a/eo/src/eoInserter.h b/eo/src/eoInserter.h index e49057cf6..f498cd610 100644 --- a/eo/src/eoInserter.h +++ b/eo/src/eoInserter.h @@ -38,7 +38,7 @@ new individuals into the (intermediate) population for example. */ template -class eoInserter : public eoUnaryFunctor&, const EOT&> +class eoInserter : public eoUF&> { public : virtual ~eoInserter() {} diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index d2c8f8139..4261d2495 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -45,7 +45,7 @@ * next generation. */ -template class eoMerge: public eoBinaryFunctor&, eoPop&> +template class eoMerge: public eoBF&, eoPop&, void> {}; /** diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 33d207c92..4dd9672cb 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -79,7 +79,7 @@ private: /** eoMonOp is the monary operator: genetic operator that takes only one EO */ template -class eoMonOp: public eoOp, public eoUnaryFunctor +class eoMonOp: public eoOp, public eoUF { public: /// Ctor @@ -92,7 +92,7 @@ public: * operator() with two operands, only the first one can be modified */ template -class eoBinOp: public eoOp, public eoBinaryFunctor +class eoBinOp: public eoOp, public eoBF { public: /// Ctor @@ -105,7 +105,7 @@ public: */ template -class eoQuadraticOp: public eoOp, public eoBinaryFunctor { +class eoQuadraticOp: public eoOp, public eoBF { public: /// Ctor eoQuadraticOp() @@ -129,7 +129,7 @@ class eoInserter; * eGeneralOp: General genetic operator; for objects used to transform sets * of EOs. Nary ("orgy") operators should be derived from this class - Derived from eoBinaryFunctor + Derived from eoB(inary)F(unction) Applies the genetic operator to a individuals dispensed by an eoIndividualSelector, and puts the results in the eoIndividualInserter. @@ -139,7 +139,7 @@ class eoInserter; template -class eoGeneralOp: public eoOp, public eoBinaryFunctor&, eoInserter&> +class eoGeneralOp: public eoOp, public eoBF&, eoInserter&, void> { public: /// Ctor that honors its superclass diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index e1fb6eb15..150963ef1 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -38,7 +38,7 @@ * eoReduce: .reduce the new generation to the specified size */ -template class eoReduce: public eoBinaryFunctor&, unsigned> +template class eoReduce: public eoBF&, unsigned, void> {}; template class eoTruncate : public eoReduce diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index 43b8347df..3a57db639 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -41,7 +41,7 @@ so there is an implementation called eoMergeReduce that can be found below @see eoMerge, eoReduce, eoMergeReduce */ template -class eoReplacement : public eoBinaryFunctor&, eoPop&> +class eoReplacement : public eoBF&, eoPop&, void> {}; /** diff --git a/eo/src/eoSelect.h b/eo/src/eoSelect.h index 2ba9adb56..90bfd7dc9 100644 --- a/eo/src/eoSelect.h +++ b/eo/src/eoSelect.h @@ -37,7 +37,7 @@ the population, the second argument is an eoPopRange, a simple struct that holds a begin and end iterator to the population */ template -class eoSelect : public eoBinaryFunctor&, eoPop&> +class eoSelect : public eoBF&, eoPop&, void> {}; #endif diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index 07d3a65ff..b6965580a 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -38,7 +38,7 @@ @see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional */ template -class eoSelectOne : public eoUnaryFunctor&> +class eoSelectOne : public eoUF&, const EOT&> { public : diff --git a/eo/src/eoTransform.h b/eo/src/eoTransform.h index f10440249..40bc81383 100644 --- a/eo/src/eoTransform.h +++ b/eo/src/eoTransform.h @@ -35,7 +35,7 @@ eoTransform transforms a population by applying genetic operators on it. */ template -class eoTransform : public eoUnaryFunctor&> +class eoTransform : public eoUF&, void> {}; #endif diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index e4e44e3fa..1b3f7aca6 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -41,7 +41,7 @@ class eoParam; will stream or pipe the current values of the parameters to wherever you want it streamed or piped to. */ -class eoMonitor : public eoProcedure +class eoMonitor : public eoF { public : diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 0ae15e761..037ca4092 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -36,7 +36,7 @@ over the (unsorted) population */ template -class eoStatBase : public eoUnaryFunctor&> +class eoStatBase : public eoUF&, void> {}; template @@ -50,7 +50,7 @@ public : Base class for statistics calculated over a sorted snapshot of the population */ template -class eoSortedStatBase : public eoUnaryFunctor&> +class eoSortedStatBase : public eoUF&, void> { }; diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index db096749c..c75141c45 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -34,7 +34,7 @@ eoUpdater is a generic procudere for updating whatever you want. Yet again an empty name */ -class eoUpdater : public eoProcedure +class eoUpdater : public eoF {}; /** diff --git a/eo/test/t-eoBaseFunctions.cpp b/eo/test/t-eoBaseFunctions.cpp index 052c1f4f4..636b0a381 100644 --- a/eo/test/t-eoBaseFunctions.cpp +++ b/eo/test/t-eoBaseFunctions.cpp @@ -5,12 +5,12 @@ using namespace std; -struct eo1 : public eoProcedure +struct eo1 : public eoF { void operator()(void) {} }; -struct eo2 : public eoProcedure +struct eo2 : public eoF { int operator()(void) { return 1; } }; From b0b0a3f9dad61acf5ec7f3d6bbd5e01e8182a294 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 23 Oct 2000 10:58:54 +0000 Subject: [PATCH 0265/2134] It is using delim now --- eo/src/utils/eoFileMonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index 6c64ede87..e8f57a6f8 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -18,7 +18,7 @@ void eoFileMonitor::printHeader(std::ostream& os) for (; it != vec.end(); ++it) { - os << ',' << (*it)->longName(); + os << delim.c_str() << (*it)->longName(); } os << '\n'; } @@ -58,7 +58,7 @@ eoMonitor& eoFileMonitor::operator()(std::ostream& os) for(++it; it != vec.end(); ++it) { - os << ',' << (*it)->getValue(); + os << delim.c_str() << (*it)->getValue(); } os << '\n'; From 9cc1cfd1b492d84c25b63f9546d2e63da30d6c57 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Oct 2000 03:57:10 +0000 Subject: [PATCH 0266/2134] Added the calls to base class I/O routines in printOn and readFrom --- eo/src/ga/eoBin.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/eo/src/ga/eoBin.h b/eo/src/ga/eoBin.h index 51fac67ec..8616ec0b3 100644 --- a/eo/src/ga/eoBin.h +++ b/eo/src/ga/eoBin.h @@ -1,6 +1,6 @@ /* eoBin.h - (c) GeNeura Team 1998 + (c) GeNeura Team 1998, Marc Schoenauer 2000 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,6 +17,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +*/ + +/* MS, Nov. 23, 2000 + Added the calls to base class I/O routines that print the fitness + Left printing/reading of the size of the bitstring, + for backward compatibility, and as it is a general practice in EO */ #ifndef eoBin_h @@ -64,7 +71,9 @@ template class eoBin: public eoFixedLength */ void printOn(ostream& os) const { - os << size() << ' '; + EO::printOn(os); + os << ' '; + os << size() << ' '; copy(begin(), end(), ostream_iterator(os)); } @@ -74,6 +83,9 @@ template class eoBin: public eoFixedLength */ void readFrom(istream& is) { + EO::readFrom(is); + unsigned s; + is >> s; string bits; is >> bits; if (is) From 5e33a2e50b1d1d37f01c87626a45165b3b0769c7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Oct 2000 03:58:02 +0000 Subject: [PATCH 0267/2134] dded Uniform Crossover (!) and "deterministic" bit-filp mutation --- eo/src/ga/eoBitOp.h | 141 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 137 insertions(+), 4 deletions(-) diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 5051199a4..e0df842db 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -1,3 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBitOp.h +// (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- +// MS 17/10/2000 +// Added the uniform crossover - which, for some reasons, had dissapeared! +// Added the eoDetBitFlip, which flips exactly num_bit bits +// Aslo added the above standard header + +// I also want to start the discussion about the "gene" crossover. +// I think the word "gene" is not appropriate: if real numbers are coded in +// binary format, then a "gene" is a bit, and that's it +// if you want to exchange real number per se, then use real coding +// +// Because all crossover operators here except that Gene crossover +// ARE generic, i.e. appky to any vertor of something. + +// Note that for mutations, if instead of +// chrom[i] = (chrom[i]) ? false : true; +// we were calling something like +// specific_mutate(chrom[i]) +// all mutation would also be generic ... except those eoBinNext and eoBinPrev + +// If anybody reads this and want to change that (I'm also testing to see +// if someone ever reads the headers :-), drop me a mail +// Marc (Marc.Schoenauer@polytechnique.fr) //----------------------------------------------------------------------------- // eoBitOp.h //----------------------------------------------------------------------------- @@ -12,7 +59,8 @@ #include // eoMonOp #include -/** eoBinBitFlip --> changes a bit + +/** eoBinBitFlip --> changes 1 bit \class eoBinBitFlip eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -35,6 +83,42 @@ template class eoBinBitFlip: public eoMonOp } }; +/** eoDetBitFlip --> changes exactly k bits +\class eoDetBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoDetBitFlip: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _num_bit The number of bits to change + * default is one - equivalent to eoBinBitFlip then + */ + eoDetBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} + + /// The class name. + string className() const { return "eoDetBitFlip"; } + + /** + * Change num_bit bits. + * @param chrom The cromosome which one bit is going to be changed. + */ + void operator()(Chrom& chrom) + { + chrom.invalidate(); + // does not check for duplicate: if someone volunteers .... + for (unsigned k=0; k classical mutation \class eoBinMutation eoBitOp.h ga/eoBitOp.h @@ -172,7 +256,7 @@ template class eoBinPrev: public eoMonOp }; -/** eoBinCrossover --> classic 2-point crossover +/** eoBinCrossover --> classic 1-point crossover \class eoBinCrossover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -184,7 +268,7 @@ template class eoBinCrossover: public eoQuadraticOp string className() const { return "eoBinCrossover"; } /** - * 2-point crossover for binary chromosomes. + * 1-point crossover for binary chromosomes. * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ @@ -204,6 +288,55 @@ template class eoBinCrossover: public eoQuadraticOp }; +/** eoBinUxOver --> classic Uniform crossover +\class eoBinNxOver eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoBinUxOver: public eoQuadraticOp +{ + public: + /// (Default) Constructor. + eoBinUxOver(const float& _preference = 0.5): preference(_preference) + { + if ( (_preference <= 0.0) || (_preference >= 1.0) ) + runtime_error("UxOver --> invalid preference"); + } + /// The class name. + string className() const { return "eoBinUxOver"; } + + /** + * Uniform crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + * @runtime_error if sizes don't match + */ + void operator()(Chrom& chrom1, Chrom& chrom2) + { + if ( chrom1.size() != chrom2.size()) + runtime_error("UxOver --> chromosomes sizes don't match" ); + bool changed = false; + for (unsigned int i=0; i n-point crossover \class eoBinNxOver eoBitOp.h ga/eoBitOp.h \ingroup bitstring @@ -212,7 +345,7 @@ template class eoBinCrossover: public eoQuadraticOp template class eoBinNxOver: public eoQuadraticOp { public: - /// (Defualt) Constructor. + /// (Default) Constructor. eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) { if (num_points < 1) From 2a0a3e074d826dd5dfcb19aaaa404de2ebbe597c Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 27 Oct 2000 04:07:21 +0000 Subject: [PATCH 0268/2134] Added the member function append( unsigned _popSize, eoInit& _chromInit ) who appends _popSize members to the population using an eoInit --- eo/src/eoPop.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index bd8c54fa2..d09d940bd 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -67,7 +67,7 @@ class eoPop: public vector, public eoObject, public eoPersistent /** Ctor for the initialization of chromosomes @param _popSize total population size - @param _chromRnd Initialization routine, produces EO's, needs to be an eoInit + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit */ eoPop( unsigned _popSize, eoInit& _chromInit ) :vector() @@ -79,7 +79,21 @@ class eoPop: public vector, public eoObject, public eoPersistent } }; - + /** SAME Initialization task than init. ctor, but is NOT a constructor + + @param _popSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + */ + void append( unsigned _popSize, eoInit& _chromInit ) + { + resize(size()+_popSize); // adjust the size + for ( unsigned i = 0; i < _popSize; i++ ) + { + _chromInit(operator[](i)); + } + }; + + /** Ctor from an istream; reads the population from a stream, each element should be in different lines @param _is the stream From 5e31ae1338ef8eb3a855b598c4b4b0aa32ed00ce Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 27 Oct 2000 04:38:29 +0000 Subject: [PATCH 0269/2134] added a second ctor with more didactic ordering of parameters (for tutorial) --- eo/src/eoSGA.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 1dcfe6101..110430b45 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -35,6 +35,14 @@ #include #include +/** The Simple Genetic Algorithm, following Holland and Goldberg + * Needs a selector (class eoSelectOne) a crossover (eoQuadratic, + * i.e. a 2->2 operator) and a mutation with their respective rates, + * of course an evaluation function (eoEvalFunc) and a continuator + * (eoContinue) which gives the stopping criterion. Performs full + * generational replacement. + */ + template class eoSGA : public eoAlgo { @@ -53,6 +61,22 @@ public : select(_select), eval(_eval) {} + // added this second ctor as I didn't like the ordering of the parameters + // in the one above. Any objection :-) MS + eoSGA( + eoSelectOne& _select, + eoQuadraticOp& _cross, float _crate, + eoMonOp& _mutate, float _mrate, + eoEvalFunc& _eval, + eoContinue& _cont) + : cont(_cont), + mutate(_mutate), + mutationRate(_mrate), + cross(_cross), + crossoverRate(_crate), + select(_select), + eval(_eval) {} + void operator()(eoPop& _pop) { eoPop offspring; From 8684e1fac1ff6434421c8215348ec4416f9504ab Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 27 Oct 2000 09:12:31 +0000 Subject: [PATCH 0270/2134] updated version info, added flush to stdoutmonitor and sprinkled a few typenames in eoPop.h and eoGOpSelector.h (egcs 2.96 started complaining). --- eo/configure.in | 2 +- eo/src/eoGOpSelector.h | 2 +- eo/src/eoPop.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 9ad61a7d7..c8be4aba6 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,7 +1,7 @@ AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.11) +AM_INIT_AUTOMAKE(eo, 0.9.2) AC_PROG_CXX diff --git a/eo/src/eoGOpSelector.h b/eo/src/eoGOpSelector.h index c47cadd20..ae207b9c6 100644 --- a/eo/src/eoGOpSelector.h +++ b/eo/src/eoGOpSelector.h @@ -143,7 +143,7 @@ inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, // Now 'op' is a general operator, either because '_op' was one or // because we wrapped it in an appropriate wrapper in the code above. - iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer + typename eoGOpSelector::iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer if (result == end()) { diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index d09d940bd..44bea7b82 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -138,7 +138,7 @@ class eoPop: public vector, public eoObject, public eoPersistent */ eoPop::iterator nth_element(int nth) { - iterator it = begin() + nth; + typename eoPop::iterator it = begin() + nth; std::nth_element(begin(), it, end(), greater >()); return it; } From 08abf46576d1f99921f46726bda3e236619753fb Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 27 Oct 2000 09:13:06 +0000 Subject: [PATCH 0271/2134] Another attempt in adding the flush --- eo/src/utils/eoStdoutMonitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index 23ec63bbe..be4de57a5 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -30,7 +30,7 @@ eoMonitor& eoStdoutMonitor::operator()(void) cout << (*it)->longName() << ": " << (*it)->getValue() << '\n'; } - cout << "\n****** End of Generation ******\n\n"; + cout << "\n****** End of Generation ******\n" << endl; // endl: flush return *this; } From e3e4a0b719beab9e77f30c9497e7ea7a14298450 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 30 Oct 2000 14:51:57 +0000 Subject: [PATCH 0272/2134] Fine tuning of printOn: if fitness is invalid, now prints it --- eo/src/EO.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 05e394915..fd807d0cd 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -115,7 +115,10 @@ public: * @param _os A ostream. */ virtual void printOn(ostream& _os) const { - _os << repFitness << ' '; // trailing space to make reading in that much easier + if (invalid()) + _os << "INVALID "; + else + _os << repFitness << ' '; // trailing space to make reading in that much easier } //@} From 01e4aa9cdc1b4d8f9045e1bef1b1a2678f930b58 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 30 Oct 2000 14:54:29 +0000 Subject: [PATCH 0273/2134] Added some safety test in roulette_wheel procedures: if total is zero, used to return iterator -1 - now returns uniform choice --- eo/src/utils/selectors.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 349bf7cc7..9d860873e 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -132,7 +132,11 @@ double sum_fitness(const eoPop& _pop, std::pair& _minmax) template It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) { + float roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _min + _gen.random(_end - _min); // uniform choice It i = _begin; @@ -149,6 +153,9 @@ const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rn { float roulette = _gen.uniform(total); + if (roulette == 0.0) // covers the case where total==0.0 + return _pop[_gen.random(_pop.size())]; // uniform choice + eoPop::const_iterator i = _pop.begin(); while (roulette > 0.0) @@ -164,6 +171,9 @@ EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) { float roulette = _gen.uniform(total); + if (roulette == 0.0) // covers the case where total==0.0 + return _pop[_gen.random(_pop.size())]; // uniform choice + eoPop::iterator i = _pop.begin(); while (roulette > 0.0) From 6fdb214b71a76ef72c2b8db4f82e50fd92e3c6fd Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 3 Nov 2000 20:03:26 +0000 Subject: [PATCH 0274/2134] fixing autoconfiguration --- eo/Makefile.am | 13 ++++++++++--- eo/configure.in | 41 ++++++++++++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index fdb6d65c6..a65d4c9c8 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,13 +4,20 @@ ## ############################################################################### -SUBDIRS = src test win doc +SUBDIRS = src test win doc app #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user IDXDIR = ~/index -EXTRA_DIST=LICENSE +EXTRA_DIST=LICENSE +############################################################################### - +all: + for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done + +clean: + for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done + +############################################################################### \ No newline at end of file diff --git a/eo/configure.in b/eo/configure.in index c8be4aba6..0c492c554 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,15 +1,38 @@ +dnl Process this file with autoconf to produce a configure script. AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.2) - -AC_PROG_CXX - -CXXFLAGS="-Wall -g" - -AM_PROG_LIBTOOL +AM_INIT_AUTOMAKE(eo, 0.9.11) +dnl Checks for maintainer mode AM_MAINTAINER_MODE -dnl add Makefiles that must be modified by the configuration here -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 doc/Makefile contrib/Makefile) +dnl Checks for programs. +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_RANLIB + +dnl Checks for libraries. +dnl Replace `main' with a function in -leo: +AC_CHECK_LIB(eo, main) +dnl Replace `main' with a function in -leoutils: +AC_CHECK_LIB(eoutils, main) +dnl Replace `main' with a function in -lm: +AC_CHECK_LIB(m, main) + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(limits.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T + +dnl Checks for library functions. +AC_CHECK_FUNCS(select) + +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile) + From 4a8c1b3947ef03a1bb3b1c95fc4925f493d31275 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 3 Nov 2000 21:23:09 +0000 Subject: [PATCH 0275/2134] initial version --- eo/contrib/.cvsignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 eo/contrib/.cvsignore diff --git a/eo/contrib/.cvsignore b/eo/contrib/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/eo/contrib/.cvsignore @@ -0,0 +1 @@ +Makefile From 06429540352eadaec1c9e06a2cfcd7668a82ed3f Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 5 Nov 2000 04:50:10 +0000 Subject: [PATCH 0276/2134] Added a default value (0.5) to method flip --- eo/src/utils/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 235847465..849de0037 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -151,7 +151,7 @@ public : flip() tosses a biased coin such that flip(x/100.0) will returns true x% of the time */ - bool flip(float bias) + bool flip(float bias=0.5) { return uniform() < bias; } From 6fc47590cd54837d40686954fef139a8203a2205 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 5 Nov 2000 05:33:43 +0000 Subject: [PATCH 0277/2134] Added constructors with 2 params _min and _max in generators so you can now generate things in [_min, _max) instead of [0,_max) only Modified the private data from maxim to {minim, range} accordingly. --- eo/src/utils/rnd_generators.h | 46 ++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index c8c095707..588c66237 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -35,17 +35,29 @@ /** The class uniform_generator can be used in the STL generate function - to easily generate random floats and doubles between [0, _max). _max - defaults to 1.0 + to easily generate random floats and doubles + either in [0, _max) if only 1 value (_max) is given + (or none, as _max defaults to 1.0) + or in [_min,_max) if 2 values are given (_min, _max) */ template class uniform_generator { + // added new ctor with 2 params, and modified the data to minim and range + // (was maxim only). MS 3/11/2000 public : - uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : maxim(_max), uniform(_rng) {} + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : + minim(T(0.0)), range(_max), uniform(_rng) {} + uniform_generator(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), uniform(_rng) + { + if (_min>_max) + throw logic_error("Min is greater than Max in uniform_generator"); + } - T operator()(void) { return (T) uniform.uniform(maxim); } - private : - T maxim; + T operator()(void) { return (T) minim+uniform.uniform(range); } +private : + T minim; + T range; eoRng& uniform; }; @@ -66,17 +78,29 @@ class boolean_generator /** The class random_generator can be used in the STL generate function - to easily generate random ints between [0, _max). + to easily generate random ints + either between [0, _max) if only one value (_max) is given to the ctor + or in [_min,_max) if 2 values are given (_min, _max) */ template class random_generator { public : - random_generator(T _max, eoRng& _rng = rng) : maxim(_max), random(_rng) {} + // added new ctor with 2 params, and modified the data to minim and range + // (was maxim only). MS 3/11/2000 + random_generator(T _max, eoRng& _rng = rng) : + minim(T(0.0)), range(_max), random(_rng) {} + random_generator(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), random(_rng) + { + if (_min>_max) + throw logic_error("Min is greater than Max in random_generator"); + } - T operator()(void) { return (T) random.random(maxim); } + T operator()(void) { return (T) (minim + random.random(range)); } - private : - T maxim; +private : + T minim; + T range; eoRng& random; }; From 865a0d4672267cd070db491275bd1e04464ec371 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Mon, 6 Nov 2000 11:31:10 +0000 Subject: [PATCH 0278/2134] adding doc target to all --- eo/doc/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index 922a7810d..f77794690 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -8,10 +8,10 @@ EXTRA_DIST = eo.cfg foot.html html/* latex/* -all : +all: doc -doc : eo.cfg +doc: eo.cfg doxygen eo.cfg -clean : +clean: rm -rf html latex man From 9f8ffd7696bece1b760cf12f67b2d87fc981db29 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Mon, 6 Nov 2000 11:34:38 +0000 Subject: [PATCH 0279/2134] adding target doc --- eo/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/Makefile.am b/eo/Makefile.am index a65d4c9c8..6d28ae143 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -20,4 +20,7 @@ all: clean: for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done +doc: + pushd doc; $(MAKE) doc; popd + ############################################################################### \ No newline at end of file From 5bb5003a074eccfc0a68c9a7e66c4e96b656ba51 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Mon, 6 Nov 2000 12:37:58 +0000 Subject: [PATCH 0280/2134] adding t-eoSymreg --- eo/test/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore index 067966e35..3e646c1f4 100644 --- a/eo/test/.cvsignore +++ b/eo/test/.cvsignore @@ -26,3 +26,4 @@ t-eoStateAndParser t-eoGOpSel t-eoExternalEO t-eoESFull +t-eoSymreg From 594a8e146f11f99cdfbfac8cea7972d4ade6ffce Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Mon, 6 Nov 2000 12:38:54 +0000 Subject: [PATCH 0281/2134] adding subdirectories --- eo/doc/.cvsignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/doc/.cvsignore b/eo/doc/.cvsignore index 282522db0..8723dbe6f 100644 --- a/eo/doc/.cvsignore +++ b/eo/doc/.cvsignore @@ -1,2 +1,5 @@ Makefile Makefile.in +html +latex +man From e1d391d1ab112413603ae4d81ab3c655d1c4d597 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Tue, 7 Nov 2000 13:02:48 +0000 Subject: [PATCH 0282/2134] adding targets --- eo/Makefile.am | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 6d28ae143..4b7941a28 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -14,13 +14,22 @@ EXTRA_DIST=LICENSE ############################################################################### +lib: + pushd src; $(MAKE) all; popd + +test: + pushd test; $(MAKE) all; popd + +doc: + pushd doc; $(MAKE) doc; popd + +app: + pushd app; $(MAKE) all; popd + all: for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done clean: for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done -doc: - pushd doc; $(MAKE) doc; popd - ############################################################################### \ No newline at end of file From 31ed49002bf30759df4b52db2a48806331355323 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Tue, 7 Nov 2000 19:13:22 +0000 Subject: [PATCH 0283/2134] removing a warning --- eo/src/eoEvalFunc.h | 2 +- eo/src/eoFunctor.h | 2 +- eo/src/eoInit.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 8ef1a0201..67738da57 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -70,4 +70,4 @@ template class eoEvalFuncCounter : public eoEvalFunc, public eoV }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 3c8edb45a..e4fd3056e 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -140,4 +140,4 @@ eoFunctorBase::binary_function_tag functor_category(const eoBF&) } -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index bf64dc103..4db408a3e 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -114,4 +114,4 @@ class eoInitAdaptor : public eoMonOp eoInit& init; }; -#endif \ No newline at end of file +#endif From 558bded5c085ed246c41133fa451b4912e48d6a0 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Tue, 7 Nov 2000 19:16:42 +0000 Subject: [PATCH 0284/2134] adding old targets --- eo/test/Makefile.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 9aea1d16c..f2a7885b7 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### -noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg +noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo ############################################################################### @@ -57,8 +57,6 @@ t_eoExternalEO_LDADD = $(LDADDS) ############################################################################### -############################################################################### - t_eoSymreg_SOURCES = t-eoSymreg.cpp t_eoSymreg_DEPENDENCIES = $(DEPS) t_eoSymreg_LDFLAGS = -lm @@ -66,4 +64,9 @@ t_eoSymreg_LDADD = $(LDADDS) ############################################################################### +t_eo_SOURCES = t-eo.cpp +t_eo_DEPENDENCIES = $(DEPS) +t_eo_LDFLAGS = -lm +t_eo_LDADD = $(LDADDS) +############################################################################### From 9692852c9500a246186b6dd2b8d841961ad8f26e Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 8 Nov 2000 12:38:13 +0000 Subject: [PATCH 0285/2134] bug fix --- eo/src/eoPop.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 44bea7b82..22bd93b5c 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -110,7 +110,7 @@ class eoPop: public vector, public eoObject, public eoPersistent struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; /// helper struct for comparing on pointers struct Cmp { - bool operator()(const EO* a, const EO* b) const + bool operator()(const EOT* a, const EOT* b) const { return b->operator<(*a); } }; @@ -120,7 +120,7 @@ class eoPop: public vector, public eoObject, public eoPersistent */ void sort(void) { - std::sort(begin(), end(), greater >()); + std::sort(begin(), end(), greater()); } void sort(vector& result) const @@ -139,7 +139,7 @@ class eoPop: public vector, public eoObject, public eoPersistent eoPop::iterator nth_element(int nth) { typename eoPop::iterator it = begin() + nth; - std::nth_element(begin(), it, end(), greater >()); + std::nth_element(begin(), it, end(), greater()); return it; } From 2d5dbf6cfb88dae7d93bf4ab20e5ab478af13a23 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 8 Nov 2000 12:55:26 +0000 Subject: [PATCH 0286/2134] fix no newline at end of file warning --- eo/src/apply.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 234bf7715..f376a91e7 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -41,4 +41,4 @@ void apply(eoUF& _proc, std::vector& _pop) } } -#endif \ No newline at end of file +#endif From f48fbcf51a17e76138a0eda1944b70251fe724ae Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 8 Nov 2000 12:56:14 +0000 Subject: [PATCH 0287/2134] adding a include for apply.h --- eo/src/eoSGA.h | 84 +++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 110430b45..fecd9557b 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -34,6 +34,7 @@ #include #include #include +#include /** The Simple Genetic Algorithm, following Holland and Goldberg * Needs a selector (class eoSelectOne) a crossover (eoQuadratic, @@ -47,13 +48,13 @@ template class eoSGA : public eoAlgo { public : - eoSGA( + eoSGA( eoContinue& _cont, eoMonOp& _mutate, float _mrate, eoQuadraticOp& _cross, float _crate, eoSelectOne& _select, eoEvalFunc& _eval) - : cont(_cont), + : cont(_cont), mutate(_mutate), mutationRate(_mrate), cross(_cross), @@ -63,13 +64,13 @@ public : // added this second ctor as I didn't like the ordering of the parameters // in the one above. Any objection :-) MS - eoSGA( + eoSGA( eoSelectOne& _select, eoQuadraticOp& _cross, float _crate, eoMonOp& _mutate, float _mrate, eoEvalFunc& _eval, eoContinue& _cont) - : cont(_cont), + : cont(_cont), mutate(_mutate), mutationRate(_mrate), cross(_cross), @@ -77,49 +78,48 @@ public : select(_select), eval(_eval) {} - void operator()(eoPop& _pop) - { - eoPop offspring; + void operator()(eoPop& _pop) + { + eoPop offspring; - do - { - select(_pop, offspring); + do + { + select(_pop, offspring); - unsigned i; + unsigned i; - for (i=0; i<_pop.size()/2; i++) - { - if ( rng.flip(crossoverRate) ) - { - // this crossover generates 2 offspring from two parents - cross(offspring[2*i], offspring[2*i+1]); - } - } - - for (i=0; i < _pop.size(); i++) - { - if (rng.flip(mutationRate) ) - { - mutate(offspring[i]); - } - - } - - _pop.swap(offspring); - apply(eval, _pop); - - } while (cont(_pop)); - } - + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverRate) ) + { + // this crossover generates 2 offspring from two parents + cross(offspring[2*i], offspring[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationRate) ) + { + mutate(offspring[i]); + } + } + + _pop.swap(offspring); + apply(eval, _pop); + + } while (cont(_pop)); + } + private : - eoContinue& cont; - eoMonOp& mutate; - float mutationRate; - eoQuadraticOp& cross; - float crossoverRate; - eoSelectPerc select; - eoEvalFunc& eval; + eoContinue& cont; + eoMonOp& mutate; + float mutationRate; + eoQuadraticOp& cross; + float crossoverRate; + eoSelectPerc select; + eoEvalFunc& eval; }; #endif From 38838f753a0cfab0e8f583e04a0bafb01d9ac231 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 8 Nov 2000 13:26:03 +0000 Subject: [PATCH 0288/2134] fix no newline at end of file warning --- eo/src/utils/eoCheckPoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 831a19419..810735ee5 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -87,4 +87,4 @@ bool eoCheckPoint::operator()(const eoPop& _pop) return cont(_pop); } -#endif \ No newline at end of file +#endif From 13169492160880f15d2cd007aba3d9e5a2f98955 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 8 Nov 2000 13:37:41 +0000 Subject: [PATCH 0289/2134] choose a constructor --- eo/src/eoSGA.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index fecd9557b..cb55fe4f8 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -48,19 +48,6 @@ template class eoSGA : public eoAlgo { public : - eoSGA( - eoContinue& _cont, - eoMonOp& _mutate, float _mrate, - eoQuadraticOp& _cross, float _crate, - eoSelectOne& _select, - eoEvalFunc& _eval) - : cont(_cont), - mutate(_mutate), - mutationRate(_mrate), - cross(_cross), - crossoverRate(_crate), - select(_select), - eval(_eval) {} // added this second ctor as I didn't like the ordering of the parameters // in the one above. Any objection :-) MS From 5af354e45557f93dd662d6c1389205cac6f5162e Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 8 Nov 2000 15:15:26 +0000 Subject: [PATCH 0290/2134] fix no newline at end of file warning --- eo/src/utils/eoUpdater.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index c75141c45..af3b02d9b 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -97,4 +97,4 @@ private : const std::string extension; }; -#endif \ No newline at end of file +#endif From a1cd1fd3bf155431f135c079c7213af210e65657 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 10 Nov 2000 09:55:10 +0000 Subject: [PATCH 0291/2134] fix warning: no newline at end of file --- eo/src/eoCounter.h | 2 +- eo/src/eoFunctorStore.h | 2 +- eo/src/es/eoEsChromInit.h | 2 +- eo/src/es/eoEsFull.h | 2 +- eo/src/es/eoEsMutationInit.h | 2 +- eo/src/es/eoEsObjectiveBounds.h | 2 +- eo/src/es/eoEsStdev.h | 2 +- eo/src/utils/checkpointing | 3 +-- eo/src/utils/eoMonitor.h | 2 +- eo/test/t-eobin.cpp | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/eo/src/eoCounter.h b/eo/src/eoCounter.h index e9b161c39..af55f20f7 100644 --- a/eo/src/eoCounter.h +++ b/eo/src/eoCounter.h @@ -216,4 +216,4 @@ eoBinaryFunctorCounter& make_counter(eoFunctorBase::binary_functi return *result; } -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoFunctorStore.h b/eo/src/eoFunctorStore.h index 5f591e99f..21980906f 100644 --- a/eo/src/eoFunctorStore.h +++ b/eo/src/eoFunctorStore.h @@ -57,4 +57,4 @@ class eoFunctorStore std::vector vec; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index d5f058a0e..41fa33ba4 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -131,4 +131,4 @@ private : eoEsObjectiveBounds& bounds; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 09c905593..3036cc8b7 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -82,4 +82,4 @@ class eoEsFull : public eoFixedLength -#endif \ No newline at end of file +#endif diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index b2f60b3d0..58f683e58 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -102,4 +102,4 @@ class eoEsMutationInit eoValueParam* TauBetaParam; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/es/eoEsObjectiveBounds.h b/eo/src/es/eoEsObjectiveBounds.h index 7f152ea48..f6e2fdda0 100644 --- a/eo/src/es/eoEsObjectiveBounds.h +++ b/eo/src/es/eoEsObjectiveBounds.h @@ -78,4 +78,4 @@ class eoEsObjectiveBounds std::vector repMaximum; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index a565af818..f46b939e3 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -71,4 +71,4 @@ class eoEsStdev : public eoFixedLength vector stdevs; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 39178ec34..465c29fbf 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -1,4 +1,3 @@ - #include #include #include @@ -6,4 +5,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index 1b3f7aca6..68235da32 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -53,4 +53,4 @@ protected : std::vector vec; }; -#endif \ No newline at end of file +#endif diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 3baf56b8f..b4341dd67 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -206,4 +206,4 @@ int main() } return 1; -} \ No newline at end of file +} From 34be1fd17438f3a900f05126429299943de1c390 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Mon, 13 Nov 2000 12:09:53 +0000 Subject: [PATCH 0292/2134] adding evaluation in some places --- eo/test/t-eobin.cpp | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index b4341dd67..e4a9802e3 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -41,13 +41,14 @@ void main_function() unsigned i, j; Chrom chrom(SIZE), chrom2; + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); cout << "chrom: " << chrom << endl; - chrom[0] = chrom[SIZE - 1] = true; + chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); cout << "chrom: " << chrom << endl; - chrom[0] = chrom[SIZE - 1] = false; + chrom[0] = chrom[SIZE - 1] = false; chrom.fitness(binary_value(chrom)); cout << "chrom: " << chrom << endl; - chrom[0] = chrom[SIZE - 1] = true; + chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); cout << "chrom.className() = " << chrom.className() << endl; @@ -58,7 +59,7 @@ void main_function() ostrstream os(buff, 1024); os << chrom; istrstream is(os.str()); - is >> chrom2; + is >> chrom2; chrom.fitness(binary_value(chrom2)); cout << "\nTesting reading, writing\n"; cout << "chrom: " << chrom << "\nchrom2: " << chrom2 << '\n'; @@ -70,31 +71,31 @@ void main_function() eoInitFixedLength random(chrom.size(), boolean_generator()); - random(chrom); + random(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinRandom ............ " << chrom << endl; eoBinBitFlip bitflip; - bitflip(chrom); + bitflip(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBitFlip .............. " << chrom << endl; eoBinMutation mutation(0.5); - mutation(chrom); + mutation(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinMutation(0.5) ..... " << chrom << endl; eoBinInversion inversion; - inversion(chrom); + inversion(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinInversion ......... " << chrom << endl; eoBinNext next; - next(chrom); + next(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinNext .............. " << chrom << endl; eoBinPrev prev; - prev(chrom); + prev(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinPrev .............. " << chrom << endl; - fill(chrom.begin(), chrom.end(), false); - fill(chrom2.begin(), chrom2.end(), true); + fill(chrom.begin(), chrom.end(), false); chrom.fitness(binary_value(chrom)); + fill(chrom2.begin(), chrom2.end(), true); chrom2.fitness(binary_value(chrom2)); cout << "--------------------------------------------------" << endl << "eoBinOp's aplied to ... " << chrom << " " << chrom2 << endl; @@ -102,7 +103,8 @@ void main_function() eoBinCrossover xover; fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); - xover(chrom, chrom2); + xover(chrom, chrom2); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); cout << "eoBinCrossover ........ " << chrom << " " << chrom2 << endl; for (i = 1; i < SIZE; i++) @@ -111,6 +113,7 @@ void main_function() fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); nxover(chrom, chrom2); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); cout << "eoBinNxOver(" << i << ") ........ " << chrom << " " << chrom2 << endl; } @@ -122,6 +125,7 @@ void main_function() fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); gxover(chrom, chrom2); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); cout << "eoBinGxOver(" << i << ", " << j << ") ..... " << chrom << " " << chrom2 << endl; } @@ -146,10 +150,9 @@ void main_function() eoProportional select; eoEvalFuncPtr eval(binary_value); - eoSGA sga(checkpoint, bitflip, 0.1f, xover, 0.8f, select, eval); - - eoInitFixedLength - init(16, boolean_generator()); + eoSGA sga(select, xover, 0.8f, bitflip, 0.1f, eval, checkpoint); + + eoInitFixedLength init(16, boolean_generator()); eoPop pop(100, init); apply(eval, pop); From 5682f296cd478b81783be8f58393ff21a5293d38 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Mon, 13 Nov 2000 12:12:14 +0000 Subject: [PATCH 0293/2134] fixing template type --- eo/test/binary_value.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eo/test/binary_value.h b/eo/test/binary_value.h index e3a0c756e..e36ad50c7 100644 --- a/eo/test/binary_value.h +++ b/eo/test/binary_value.h @@ -2,14 +2,12 @@ //----------------------------------------------------------------------------- -typedef eoBin Chrom; - /** Just a simple function that takes binary value of a chromosome and sets the fitnes. @param _chrom A binary chromosome */ -float binary_value(const Chrom& _chrom) +template float binary_value(const Chrom& _chrom) { float sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) From 683bc2e44febd0a798f472fd9af7f20a33987faf Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 17 Nov 2000 17:06:53 +0000 Subject: [PATCH 0294/2134] dded the className method for eoMon, eoBin and eoQuad classes --- eo/src/eoOp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 4dd9672cb..93cf4d930 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -85,6 +85,7 @@ public: /// Ctor eoMonOp() : eoOp( eoOp::unary ) {}; + virtual string className() const {return "eoMonOp";}; }; @@ -98,6 +99,7 @@ public: /// Ctor eoBinOp() :eoOp( eoOp::binary ) {}; + virtual string className() const {return "eoBinOp";}; }; /** Quadratic genetic operator: subclasses eoOp, and defines basically the @@ -110,6 +112,7 @@ public: /// Ctor eoQuadraticOp() :eoOp( eoOp::quadratic ) {}; + virtual string className() const {return "eoQuadOp";}; }; From 265be972ef282138a2290100809b3b40c72960df Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 17 Nov 2000 17:50:08 +0000 Subject: [PATCH 0295/2134] Made eoBestFitnessStat an eoStat, NOT an eoSortedStat Cde VS: Committing in . --- eo/src/utils/eoStat.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 037ca4092..4c60ec9bc 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -134,13 +134,31 @@ private : unsigned which; }; +/* Actually, you don't need to sort the population to get the best fitness + MS - 17/11/00 +template +class eoBestFitnessStat : public eoStat +{ +public : + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best Fitness") : + eoStat(Fitness(), _description) {} + + virtual void operator()(const eoPop& _pop) + { + value() = _pop.nth_element_fitness(0); + } + +}; +*/ template class eoBestFitnessStat : public eoNthElementFitnessStat { public : typedef typename EOT::Fitness Fitness; - + eoBestFitnessStat(std::string _description = "Best Fitness") : eoNthElementFitnessStat(0, _description) {} }; From 8527bd83785d0bf9e76a996a5650c778c272f84f Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 23 Nov 2000 19:14:09 +0000 Subject: [PATCH 0296/2134] new application gprop --- eo/app/Makefile.am | 17 +++ eo/app/gprop/Makefile.am | 25 ++++ eo/app/gprop/gprop.cc | 146 ++++++++++++++++++++ eo/app/gprop/gprop.h | 183 ++++++++++++++++++++++++ eo/app/gprop/l2.h | 140 +++++++++++++++++++ eo/app/gprop/mlp.h | 290 +++++++++++++++++++++++++++++++++++++++ eo/app/gprop/mse.h | 140 +++++++++++++++++++ eo/app/gprop/qp.h | 251 +++++++++++++++++++++++++++++++++ eo/app/gprop/vecop.h | 213 ++++++++++++++++++++++++++++ 9 files changed, 1405 insertions(+) create mode 100644 eo/app/Makefile.am create mode 100644 eo/app/gprop/Makefile.am create mode 100644 eo/app/gprop/gprop.cc create mode 100644 eo/app/gprop/gprop.h create mode 100644 eo/app/gprop/l2.h create mode 100644 eo/app/gprop/mlp.h create mode 100644 eo/app/gprop/mse.h create mode 100644 eo/app/gprop/qp.h create mode 100644 eo/app/gprop/vecop.h diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am new file mode 100644 index 000000000..64ca3c701 --- /dev/null +++ b/eo/app/Makefile.am @@ -0,0 +1,17 @@ +############################################################################### +## +## Makefile.am for app +## +############################################################################### + +SUBDIRS = gprop + +############################################################################### + +all: + for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done + +clean: + for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done + +############################################################################### diff --git a/eo/app/gprop/Makefile.am b/eo/app/gprop/Makefile.am new file mode 100644 index 000000000..bc4a7b855 --- /dev/null +++ b/eo/app/gprop/Makefile.am @@ -0,0 +1,25 @@ +############################################################################### +# +# Makefile.am for app/gprop +# +############################################################################### + +DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a + +############################################################################### + +INCLUDES = -I$(top_builddir)/src +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a + +############################################################################### + +bin_PROGRAMS = gprop + +############################################################################### + +gprop_SOURCES = gprop.cc +gprop_DEPENDENCIES = $(DEPS) +gprop_LDFLAGS = -lm +gprop_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc new file mode 100644 index 000000000..7890b18ae --- /dev/null +++ b/eo/app/gprop/gprop.cc @@ -0,0 +1,146 @@ +//----------------------------------------------------------------------------- +// gprop +//----------------------------------------------------------------------------- + +#include // EXIT_SUCCESS EXIT_FAILURE +#include // exception +#include // cerr cout +#include // ifstream +#include // string +#include // eoParser +#include // eoPop +#include // eoGenContinue +#include // eoProportional +#include // eoSGA +#include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator + +//----------------------------------------------------------------------------- +// global variables +//----------------------------------------------------------------------------- + + + +//----------------------------------------------------------------------------- +// parameters +//----------------------------------------------------------------------------- + +eoValueParam pop_size(10, "pop_size", "default population size", 'p'); +eoValueParam generations(10, "generations", "default generation number", 'g'); +eoValueParam mut_rate(0.1, "mut_rate", "default mutation rate", 'm'); +eoValueParam xover_rate(0.1, "xover_rate", "default crossover rate", 'x'); +eoValueParam file("", "file", "common part of patterns filenames *.trn *.val and *.tst", 'f'); + +//----------------------------------------------------------------------------- +// auxiliar functions +//----------------------------------------------------------------------------- + +void arg(int argc, char** argv); +void load_file(mlp::set& s, const string& s); +void ga(); + +//----------------------------------------------------------------------------- +// main +//----------------------------------------------------------------------------- + +int main(int argc, char** argv) +{ + try + { + arg(argc, argv); + ga(); + } + catch (exception& e) + { + cerr << argv[0] << ": " << e.what() << endl; + exit(EXIT_FAILURE); + } + + return 0; +} + +//----------------------------------------------------------------------------- +// implementation +//----------------------------------------------------------------------------- + +void arg(int argc, char** argv) +{ + eoParser parser(argc, argv); + + parser.processParam(pop_size, "genetic operators"); + parser.processParam(generations, "genetic operators"); + parser.processParam(mut_rate, "genetic operators"); + parser.processParam(xover_rate, "genetic operators"); + parser.processParam(file, "files"); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(EXIT_SUCCESS); + } + + load_file(trn_set, "trn"); + load_file(val_set, "val"); + load_file(tst_set, "tst"); + + phenotype::trn_max = trn_set.size(); + phenotype::val_max = val_set.size(); + phenotype::tst_max = tst_set.size(); +} + +//----------------------------------------------------------------------------- + +void load_file(mlp::set& set, const string& ext) +{ + string filename = file.value(); filename += "." + ext; + + ifstream ifs(filename.c_str()); + if (!ifs) + { + cerr << "can't open file \"" << filename << "\"" << endl; + exit(EXIT_FAILURE); + } + + ifs >> set; + + cout << "set.size() = " << set.size() << endl; + + if (set.size() == 0) + { + cerr << filename << " data file is empty!"; + exit(EXIT_FAILURE); + } +} + +//----------------------------------------------------------------------------- + +void ga() +{ + eoGenContinue continuator(generations.value()); + + eoProportional select; + eoChromMutation mutation(generations); + eoChromXover xover; + eoEvalFuncPtr evaluator(eoChromEvaluator); + + eoSGA sga(select, + xover, xover_rate.value(), + mutation, mut_rate.value(), + evaluator, + continuator); + + eoInitChrom init; + eoPop pop(pop_size.value(), init); + apply(evaluator, pop); + + cout << pop << endl; + + sga(pop); + + cout << pop << endl; +} + +//----------------------------------------------------------------------------- + +// Local Variables: +// mode:C++ +// End: diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h new file mode 100644 index 000000000..392a51bb8 --- /dev/null +++ b/eo/app/gprop/gprop.h @@ -0,0 +1,183 @@ +//----------------------------------------------------------------------------- +// gprop.h +//----------------------------------------------------------------------------- + +#ifndef gprop_h +#define gprop_h + +//----------------------------------------------------------------------------- + +#include // istream ostream +#include // string +#include // EO +#include // eoMonOp eoQuadraticOp +#include // eoEvalFunc +#include // eoInit +#include // normal_generator +#include "mlp.h" // mlp::net mlp::set +#include "qp.h" // qp::set +#include "mse.h" // mse::error + +//----------------------------------------------------------------------------- +// phenotype +//----------------------------------------------------------------------------- + +struct phenotype +{ + unsigned trn_ok, val_ok, tst_ok; + double mse_error; + + static unsigned trn_max, val_max, tst_max; + + phenotype(const double& _mse_error = 0): mse_error(_mse_error) {} + + operator double(void) const { return mse_error; } + + friend bool operator<(const phenotype& a, const phenotype& b) + { + return a.mse_error < b.mse_error; + } + + friend ostream& operator<<(ostream& os, const phenotype& p) + { + return os << p.trn_ok << "/" << p.trn_max << " " + << p.val_ok << "/" << p.val_max << " " + << p.tst_ok << "/" << p.tst_max << " " + << p.mse_error; + } + + friend istream& operator>>(istream& is, phenotype& p) + { + return is; + } +}; + +unsigned phenotype::trn_max = 0, phenotype::val_max = 0, phenotype::tst_max = 0; + +//----------------------------------------------------------------------------- +// genotype +//----------------------------------------------------------------------------- + +typedef mlp::net genotype; + +//----------------------------------------------------------------------------- +// Chrom +//----------------------------------------------------------------------------- + +class Chrom: public EO, public genotype +{ +public: + Chrom(): genotype(25, 2) {} + + string className() const { return "Chrom"; } + + void printOn (ostream& os) const + { + // os << static_cast(*this) << " " << fitness(); + os << fitness(); + } + + void readFrom (istream& is) + { + invalidate(); + } +}; + +//----------------------------------------------------------------------------- +// eoChromInit +//----------------------------------------------------------------------------- + +class eoInitChrom: public eoInit +{ +public: + void operator()(Chrom& chrom) + { + chrom.reset(); + chrom.invalidate(); + } +}; + +//----------------------------------------------------------------------------- +// global variables +//----------------------------------------------------------------------------- + +mlp::set trn_set, val_set, tst_set; + +//----------------------------------------------------------------------------- +// eoChromMutation +//----------------------------------------------------------------------------- + +class eoChromMutation: public eoMonOp +{ +public: + eoChromMutation(eoValueParam& _generation): + generation(_generation) {} + + void operator()(Chrom& chrom) + { + mse::net tmp(chrom); + tmp.train(trn_set, 10, 0, 0.001); + } + +private: + eoValueParam& generation; +}; + +//----------------------------------------------------------------------------- +// eoChromXover +//----------------------------------------------------------------------------- + +class eoChromXover: public eoQuadraticOp +{ +public: + void operator()(Chrom& chrom1, Chrom& chrom2) + { + } +}; + +//----------------------------------------------------------------------------- +// eoChromEvaluator +//----------------------------------------------------------------------------- + +unsigned correct(const mlp::net& net, const qp::set& set) +{ + unsigned sum = 0; + + for (qp::set::const_iterator s = set.begin(); s != set.end(); ++s) + { + unsigned partial = 0; + + for (unsigned i = 0; i < s->output.size(); ++i) + if (s->output[i] < 0.5 && net(s->input)[i] < 0.5 || + s->output[i] > 0.5 && net(s->input)[i] > 0.5) + ++partial; + + if (partial == s->output.size()) + ++sum; + } + + return sum; +} + + + +phenotype eoChromEvaluator(const Chrom& chrom) +{ + // extern mlp::set trn_set, val_set, tst_set; + + phenotype p; + p.trn_ok = correct(chrom, trn_set); + p.val_ok = correct(chrom, val_set); + p.tst_ok = correct(chrom, tst_set); + p.mse_error = mse::error(chrom, val_set); + + return p; +}; + +//----------------------------------------------------------------------------- + +#endif // gprop_h + +// Local Variables: +// mode:C++ +// End: diff --git a/eo/app/gprop/l2.h b/eo/app/gprop/l2.h new file mode 100644 index 000000000..011c66109 --- /dev/null +++ b/eo/app/gprop/l2.h @@ -0,0 +1,140 @@ +//----------------------------------------------------------------------------- +// l2.h +//----------------------------------------------------------------------------- + +#ifndef l2_h +#define l2_h + +//----------------------------------------------------------------------------- + +#include // log +#include // neuron layer net set + +//----------------------------------------------------------------------------- + +namespace l2 +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + using qp::real; + using qp::vector; + using qp::max_real; + using qp::min_real; + using qp::set; + using qp::neuron; + using qp::layer; + + //--------------------------------------------------------------------------- + // error + //--------------------------------------------------------------------------- + + real error(const mlp::net& net, const set& ts) + { + real error_ = 0.0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + vector out = net(s->input); + + for (unsigned i = 0; i < out.size(); ++i) + { + real target = s->output[i]; + real value = out[i]; + error_ -= target * log(value + min_real) + + (1.0 - target) * log(1.0 - value + min_real); + } + } + + return error_; + } + + //------------------------------------------------------------------------- + // l2 + //------------------------------------------------------------------------- + + class net: public qp::net + { + public: + net(mlp::net& n): qp::net(n) {} + + real error(const set& ts) + { + real error_ = 0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + forward(s->input); + error_ -= backward(s->input, s->output); + } + + return error_; + } + + private: + real backward(const vector& input, const vector& output) + { + reverse_iterator current_layer = rbegin(); + reverse_iterator backward_layer = current_layer + 1; + real error_ = 0; + + // output layer + for (unsigned j = 0; j < current_layer->size(); ++j) + { + neuron& n = (*current_layer)[j]; + real out = output[j]; + n.ndelta += n.delta = (out - n.out) / + (n.out * (1.0 - n.out) + min_real) * n.out * (1.0 - n.out); + + if (size() == 1) // monolayer + n.dxo += n.delta * input; + else // multilayer + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + + error_ += out * log(n.out + min_real) + + (1.0 - out) * log(1.0 - n.out + min_real); + } + + // hidden layers + while (++current_layer != rend()) + { + reverse_iterator forward_layer = current_layer - 1; + reverse_iterator backward_layer = current_layer + 1; + + for (unsigned j = 0; j < current_layer->size(); ++j) + { + neuron& n = (*current_layer)[j]; + real sum = 0; + for (unsigned k = 0; k < forward_layer->size(); ++k) + { + neuron& nf = (*forward_layer)[k]; + sum += nf.delta * (nf.n->weight[j] + nf.dweight1[j]); + } + n.delta = n.out * (1.0 - n.out) * sum; + n.ndelta += n.delta; + + if (backward_layer == rend()) // first hidden layer + n.dxo += n.delta * input; + else // rest of hidden layers + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + } + } + + return error_; + } + }; + + //--------------------------------------------------------------------------- + +} // namespace l2 + +//----------------------------------------------------------------------------- + +#endif // l2_h + +// Local Variables: +// mode:C++ +// End: diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h new file mode 100644 index 000000000..68e81a58e --- /dev/null +++ b/eo/app/gprop/mlp.h @@ -0,0 +1,290 @@ +//----------------------------------------------------------------------------- +// mlp.h +//----------------------------------------------------------------------------- + +#ifndef mlp_h +#define mlp_h + +//----------------------------------------------------------------------------- + +#include // MAXFLOAT MINFLOAT +#include // exp +#include // invalid_argument +#include // istream ostream +#include // generate +#include // vector +#include // eoRng +#include // normal_geneurator +#include // * + +//----------------------------------------------------------------------------- + +namespace mlp +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + typedef double real; + typedef std::vector vector; + + const real max_real = MAXFLOAT; + const real min_real = MINFLOAT; + + + //--------------------------------------------------------------------------- + // sigmoid + //--------------------------------------------------------------------------- + + real sigmoid(const real& x) + { + return 1.0 / (1.0 + exp(-x)); + } + + + //--------------------------------------------------------------------------- + // neuron + //--------------------------------------------------------------------------- + + struct neuron + { + real bias; + vector weight; + + neuron(const unsigned& num_inputs = 0): weight(num_inputs) {} + + void reset() + { + normal_generator rnd(1.0); + bias = rnd(); + generate(weight.begin(), weight.end(), rnd); + } + + real operator()(const vector& input) const + { + return sigmoid(bias + weight * input); + } + + unsigned length() { return weight.size() + 1; } + + void normalize() + { + real n = sqrt(bias * bias + weight * weight); + bias /= n; + weight /= n; + } + + void desaturate() + { + bias = -5.0 + 10.0 / (1.0 + exp(bias / -5.0)); + + for (vector::iterator w = weight.begin(); w != weight.end(); ++w) + *w = -5.0 + 10.0 / (1.0 + exp(*w / -5.0)); + } + }; + + ostream& operator<<(ostream& os, const neuron& n) + { + return os << n.bias << " " << n.weight; + } + + + //--------------------------------------------------------------------------- + // layer + //--------------------------------------------------------------------------- + + class layer: public std::vector + { + public: + layer(const unsigned& num_inputs = 0, const unsigned& num_neurons = 0): + std::vector(num_neurons, neuron(num_inputs)) {} + + void reset() + { + normal_generator rnd(1.0); + for(iterator n = begin(); n != end(); ++n) + n->reset(); + } + + vector operator()(const vector& input) const + { + vector output(size()); + + for(unsigned i = 0; i < output.size(); ++i) + output[i] = (*this)[i](input); + + return output; + } + + unsigned length() { return front().length() * size(); } + + void normalize() + { + for(iterator n = begin(); n != end(); ++n) + n->normalize(); + } + + void desaturate() + { + for(iterator n = begin(); n != end(); ++n) + n->desaturate(); + } + }; + + + //--------------------------------------------------------------------------- + // net + //--------------------------------------------------------------------------- + + class net: public std::vector + { + public: + net(const unsigned& num_inputs = 0, + const unsigned& num_outputs = 0, + const std::vector& hidden = std::vector()) + { + switch(hidden.size()) + { + case 0: + push_back(layer(num_inputs, num_outputs)); + break; + default: + push_back(layer(num_inputs, hidden.front())); + for (unsigned i = 0; i < hidden.size() - 1; ++i) + push_back(layer(hidden[i], hidden[i + 1])); + push_back(layer(hidden.back(), num_outputs)); + break; + } + } + + void reset() + { + normal_generator rnd(1.0); + for(iterator l = begin(); l != end(); ++l) + l->reset(); + } + + vector operator()(const vector& input) const + { + vector tmp = input; + + for(const_iterator l = begin(); l != end(); ++l) + tmp = (*l)(tmp); + + return tmp; + } + + unsigned winner(const vector& input) const + { + vector tmp = (*this)(input); + return (max_element(tmp.begin(), tmp.end()) - tmp.begin()); + } + + unsigned length() + { + unsigned sum = 0; + + for(iterator l = begin(); l != end(); ++l) + sum += l->length(); + + return sum; + } + + void normalize() + { + for(iterator l = begin(); l != end(); ++l) + l->normalize(); + } + + void desaturate() + { + for(iterator l = begin(); l != end(); ++l) + l->desaturate(); + } + }; + + + //--------------------------------------------------------------------------- + // sample + //--------------------------------------------------------------------------- + + struct sample + { + vector input, output; + + sample(unsigned input_size = 0, unsigned output_size = 0): + input(input_size), output(output_size) {} + }; + + istream& operator>>(istream& is, sample& s) + { + return is >> s.input >> s.output; + } + + ostream& operator<<(ostream& os, const sample& s) + { + return os << s.input << " " << s.output; + } + + + //--------------------------------------------------------------------------- + // set + //--------------------------------------------------------------------------- + + class set: public std::vector + { + public: + set(unsigned input_size = 0, unsigned output_size = 0, + unsigned num_samples = 0): + std::vector(num_samples, sample(input_size, output_size)) {} + + set(istream& is) + { + is >> (*this); + } + }; + + ostream& operator<<(ostream& os, const set& s) + { + os << "<" << endl; + for (unsigned i = 0; i < s.size(); ++i) + os << s[i] << endl; + return os << ">"; + } + + //--------------------------------------------------------------------------- + // euclidean_distance + //--------------------------------------------------------------------------- + + real euclidean_distance(const net& n1, const net& n2) + { + real sum = 0; + + for(net::const_reverse_iterator l1 = n1.rbegin(), l2 = n2.rbegin(); + l1 != n1.rend() && l2 != n2.rend(); ++l1, ++l2) + for(layer::const_iterator n1 = l1->begin(), n2 = l2->begin(); + n1 != l1->end() && n2 != l2->end(); ++n1, ++n2) + { + real b = n1->bias - n2->bias; + vector w = n1->weight - n2->weight; + sum += b * b + w * w; + } + /* + #include + std::ofstream file("dist.stat", ios::app); + file << sqrt(sum) << endl; + */ + return sqrt(sum); + } + + //--------------------------------------------------------------------------- + +} // namespace mlp + +//----------------------------------------------------------------------------- + +#endif // mlp_h + +// Local Variables: +// mode:C++ +// End: diff --git a/eo/app/gprop/mse.h b/eo/app/gprop/mse.h new file mode 100644 index 000000000..841a88e3e --- /dev/null +++ b/eo/app/gprop/mse.h @@ -0,0 +1,140 @@ +//----------------------------------------------------------------------------- +// mse.h +//----------------------------------------------------------------------------- + +#ifndef mse_h +#define mse_h + +//----------------------------------------------------------------------------- + +#include // neuron layer net set + +//----------------------------------------------------------------------------- + +namespace mse +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + using qp::real; + using qp::vector; + using qp::max_real; + using qp::min_real; + using qp::set; + using qp::neuron; + using qp::layer; + + //--------------------------------------------------------------------------- + // error + //--------------------------------------------------------------------------- + + real error(const mlp::net& net, const set& ts) + { + real error_ = 0.0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + vector out = net(s->input); + + for (unsigned i = 0; i < out.size(); ++i) + { + real diff = s->output[i] - out[i]; + error_ += diff * diff; + } + } + + return error_ / ts.size(); + } + //------------------------------------------------------------------------- + // mse + //------------------------------------------------------------------------- + + class net: public qp::net + { + public: + net(mlp::net& n): qp::net(n) {} + + real error(const set& ts) + { + real error_ = 0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + forward(s->input); + error_ += backward(s->input, s->output); + } + error_ /= ts.size(); + + return error_; + } + + private: + real backward(const vector& input, const vector& output) + { + reverse_iterator current_layer = rbegin(); + reverse_iterator backward_layer = current_layer + 1; + real error_ = 0; + + // output layer + for (unsigned j = 0; j < current_layer->size(); ++j) + { + neuron& n = (*current_layer)[j]; + + real diff = output[j] - n.out; + n.ndelta += n.delta = diff * n.out * (1.0 - n.out); + + if (size() == 1) // monolayer + n.dxo += n.delta * input; + else // multilayer + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + + error_ += diff * diff; + } + + // hidden layers + while (++current_layer != rend()) + { + reverse_iterator forward_layer = current_layer - 1; + reverse_iterator backward_layer = current_layer + 1; + + for (unsigned j = 0; j < current_layer->size(); ++j) + { + + neuron& n = (*current_layer)[j]; + real sum = 0; + + for (unsigned k = 0; k < forward_layer->size(); ++k) + { + neuron& nf = (*forward_layer)[k]; + sum += nf.delta * (nf.n->weight[j] + nf.dweight1[j]); + } + + n.delta = n.out * (1.0 - n.out) * sum; + n.ndelta += n.delta; + + + if (backward_layer == rend()) // first hidden layer + n.dxo += n.delta * input; + else // rest of hidden layers + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + } + } + + return error_; + } + }; + + //--------------------------------------------------------------------------- + +} // namespace mse + +//----------------------------------------------------------------------------- + +#endif // mse_h + +// Local Variables: +// mode:C++ +// End: diff --git a/eo/app/gprop/qp.h b/eo/app/gprop/qp.h new file mode 100644 index 000000000..e91425623 --- /dev/null +++ b/eo/app/gprop/qp.h @@ -0,0 +1,251 @@ +//----------------------------------------------------------------------------- +// qp.h +//----------------------------------------------------------------------------- + +#ifndef qp_h +#define qp_h + +//----------------------------------------------------------------------------- + +#include // istream ostream +#include // fill +#include // vector +#include // uniform_generator +#include // neuron layer net + +//----------------------------------------------------------------------------- + +namespace qp +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + using mlp::real; + using mlp::vector; + + using mlp::max_real; + using mlp::min_real; + + using mlp::set; + + //--------------------------------------------------------------------------- + // useful constants + //--------------------------------------------------------------------------- + + const real eta_default = 0.5; + const real eta_floor = 0.0001; + const real alpha_default = 0.9; + const real lambda_default = 0.5; + const real lambda0 = 0.1; + const real backtrack_step = 0.5; + const real me_floor = 0.0001; + const real mw_floor = 0.0001; + + + //--------------------------------------------------------------------------- + // neuron + //--------------------------------------------------------------------------- + + struct neuron + { + mlp::neuron* n; + real out, delta, ndelta, dbias1, dbias2; + vector dweight1, dweight2, dxo; + + neuron(mlp::neuron& _n): + n(&_n), out(0), delta(0), ndelta(0), dbias1(0), dbias2(0), + dweight1(n->weight.size(), 0), + dweight2(n->weight.size(), 0), + dxo(n->weight.size(), 0) {} + + void reset() + { + // underlaying neuron + n->reset(); + + // addons + out = delta = ndelta = dbias1 = dbias2 = 0; + fill(dweight1.begin(), dweight1.end(), 0); + fill(dweight2.begin(), dweight2.end(), 0); + fill(dxo.begin(), dxo.end(), 0); + } + + real operator()(const vector& input) + { + return out = mlp::sigmoid(n->bias + dbias1 + + (n->weight + dweight1) * input); + } + }; + + ostream& operator<<(ostream& os, const neuron& n) + { + return os << *n.n << " " << n.out << " " << n.delta << " " + << n.ndelta << " " << n.dbias1 << " " << n.dbias2 << " " + << n.dweight1 << " " << n.dweight2 << " " << n.dxo; + } + + + //--------------------------------------------------------------------------- + // layer + //--------------------------------------------------------------------------- + + class layer: public std::vector + { + public: + layer(mlp::layer& l)//: std::vector(l.begin(), l.end()) {} + { + for (mlp::layer::iterator n = l.begin(); n != l.end(); ++n) + push_back(neuron(*n)); + } + + void reset() + { + for(iterator n = begin(); n != end(); ++n) + n->reset(); + } + + vector operator()(const vector& input) + { + vector output(size()); + + for(unsigned i = 0; i < output.size(); ++i) + output[i] = (*this)[i](input); + + return output; + } + }; + + + //--------------------------------------------------------------------------- + // net + //--------------------------------------------------------------------------- + + class net: public std::vector + { + public: + net(mlp::net& n) //: std::vector(n.begin(), n.end()) { reset(); } + { + for (mlp::net::iterator l = n.begin(); l != n.end(); ++l) + push_back(*l); + } + + virtual ~net() {} + + void reset() + { + for(iterator l = begin(); l != end(); ++l) + l->reset(); + } + + real train(const set& ts, + unsigned epochs, + real target_error, + real tolerance, + real eta = eta_default, + real momentum = alpha_default, + real lambda = lambda_default) + { + real error_ = max_real; + + while (epochs-- && error_ > target_error) + { + real last_error = error_; + + init_delta(); + + error_ = error(ts); + + if (error_ < last_error + tolerance) + { + coeff_adapt(eta, momentum, lambda); + weight_update(ts.size(), true, eta, momentum); + } + else + { + eta *= backtrack_step; + eta = max(eta, eta_floor); + momentum = eta * lambda; + weight_update(ts.size(), false, eta, momentum); + error_ = last_error; + } + } + + return error_; + } + + virtual real error(const set& ts) = 0; + + // protected: + void forward(vector input) + { + for (iterator l = begin(); l != end(); ++l) + { + vector tmp = (*l)(input); + input.swap(tmp); + } + } + + // private: + void init_delta() + { + for (iterator l = begin(); l != end(); ++l) + for (layer::iterator n = l->begin(); n != l->end(); ++n) + fill(n->dxo.begin(), n->dxo.end(), n->ndelta = 0.0); + } + + void coeff_adapt(real& eta, real& momentum, real& lambda) + { + real me = 0, mw = 0, ew = 0; + + for (iterator l = begin(); l != end(); ++l) + for (layer::iterator n = l->begin(); n != l->end(); ++n) + { + me += n->dxo * n->dxo; + mw += n->dweight1 * n->dweight1; + ew += n->dxo * n->dweight1; + } + + me = max(static_cast(sqrt(me)), me_floor); + mw = max(static_cast(sqrt(mw)), mw_floor); + eta *= (1.0 + 0.5 * ew / ( me * mw)); + eta = max(eta, eta_floor); + lambda = lambda0 * me / mw; + momentum = eta * lambda; +#ifdef DEBUG + cout << me << " \t" << mw << " \t" << ew << " \t" + << eta << " \t" << momentum << " \t" << lambda << endl; +#endif // DEBUG + } + + void weight_update(unsigned size, bool fire, real eta, real momentum) + { + for (iterator l = begin(); l != end(); ++l) + for (layer::iterator n = l->begin(); n != l->end(); ++n) + { + n->ndelta /= size; + n->dxo /= size; + if (fire) + { + n->n->weight += n->dweight1; + n->dweight2 = n->dweight1; + n->n->bias += n->dbias1; + n->dbias2 = n->dbias1; + } + n->dweight1 = eta * n->dxo + momentum * n->dweight2; + n->dbias1 = eta * n->ndelta + momentum * n->dbias2; + } + } + }; + + //--------------------------------------------------------------------------- + +} // namespace qp + +//----------------------------------------------------------------------------- + +#endif // qp_h + +// Local Variables: +// mode:C++ +// End: diff --git a/eo/app/gprop/vecop.h b/eo/app/gprop/vecop.h new file mode 100644 index 000000000..6e45a5d55 --- /dev/null +++ b/eo/app/gprop/vecop.h @@ -0,0 +1,213 @@ +//----------------------------------------------------------------------------- +// vecop.h +//----------------------------------------------------------------------------- + +#ifndef VECOP_H +#define VECOP_H + +//----------------------------------------------------------------------------- + +#include // ostream istream +#include // vector +#include // plus minus multiplies divides +#include // inner_product + +//----------------------------------------------------------------------------- +// vector + vector +//----------------------------------------------------------------------------- + +template vector operator+(const vector& v1, const vector& v2) +{ + vector tmp = v1; + transform(tmp.begin(), tmp.end(), v2.begin(), tmp.begin(), plus()); + return tmp; +} + +template vector operator-(const vector& v1, const vector& v2) +{ + vector tmp = v1; + transform(tmp.begin(), tmp.end(), v2.begin(), tmp.begin(), minus()); + return tmp; +} + +template T operator*(const vector& v1, const vector& v2) +{ + return inner_product(v1.begin(), v1.end(), v2.begin(), static_cast(0)); +} + +template T operator/(const vector& v1, const vector& v2) +{ + return inner_product(v1.begin(), v1.end(), v2.begin(), static_cast(0), + plus(), divides()); +} + +//----------------------------------------------------------------------------- +// vector += vector +//----------------------------------------------------------------------------- + +template vector& operator+=(vector& v1, const vector& v2) +{ + transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), plus()); + return v1; +} + +template vector& operator-=(vector& v1, const vector& v2) +{ + transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), minus()); + return v1; +} + +//----------------------------------------------------------------------------- +// vector + number +//----------------------------------------------------------------------------- + +template vector operator+(const vector& a, const B& b) +{ + vector tmp = a; + transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(plus(), b)); + return tmp; +} + +template vector operator-(const vector& a, const B& b) +{ + vector tmp = a; + transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(minus(), b)); + return tmp; +} + +template vector operator*(const vector& a, const B& b) +{ + vector tmp = a; + transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(multiplies(), b)); + return tmp; +} + +template vector operator/(const vector& a, const B& b) +{ + vector tmp = a; + transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(divides(), b)); + return tmp; +} + +//----------------------------------------------------------------------------- +// number + vector +//----------------------------------------------------------------------------- + +template vector operator+(const B& b, const vector& a) +{ + vector tmp = a; + transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(plus(), b)); + return tmp; +} + +template vector operator-(const B& b, const vector& a) +{ + vector tmp(a.size(), b); + transform(tmp.begin(), tmp.end(), a.begin(), tmp.begin(), minus()); + return tmp; +} + +template vector operator*(const B& b, const vector& a) +{ + vector tmp = a; + transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(multiplies(), b)); + return tmp; +} + +template vector operator/(const B& b, const vector& a) +{ + vector tmp(a.size(), b); + transform(tmp.begin(), tmp.end(), a.begin(), tmp.begin(), divides()); + return tmp; +} + +//----------------------------------------------------------------------------- +// vector += number +//----------------------------------------------------------------------------- + +template vector& operator+=(vector& a, const B& b) +{ + transform(a.begin(), a.end(), a.begin(), bind2nd(plus(), b)); + return a; +} + +template vector& operator-=(vector& a, const B& b) +{ + transform(a.begin(), a.end(), a.begin(), bind2nd(minus(), b)); + return a; +} + +template vector& operator*=(vector& a, const B& b) +{ + transform(a.begin(), a.end(), a.begin(), bind2nd(multiplies(), b)); + return a; +} + +template vector& operator/=(vector& a, const B& b) +{ + transform(a.begin(), a.end(), a.begin(), bind2nd(divides(), b)); + return a; +} + +//----------------------------------------------------------------------------- +// I/O +//----------------------------------------------------------------------------- + +template ostream& operator<<(ostream& os, const vector& v) +{ + os << '<'; + if (v.size()) + { + copy(v.begin(), v.end() - 1, ostream_iterator(os, " ")); + os << v.back(); + } + return os << '>'; +} + +template istream& operator>>(istream& is, vector& v) +{ + v.clear(); + + char c; + is >> c; + if (!is || c != '<') + is.setstate(ios::failbit); + else + { + T t; + do { + is >> c; + if (is && c!= '>') + { + is.putback(c); + is >> t; + if (is) + v.push_back(t); + } + } while (is && c != '>'); + } + + return is; +} + +//----------------------------------------------------------------------------- +// euclidean_distance +//----------------------------------------------------------------------------- + +template T euclidean_distance(const vector& v1, + const vector& v2) +{ + T sum = 0, tmp; + + for (unsigned i = 0; i < v1.size(); ++i) + { + tmp = v1[i] - v2[i]; + sum += tmp * tmp; + } + + return sqrt(sum); +} + +//----------------------------------------------------------------------------- + +#endif VECOP_H From 8a5ee316e1755741654d7b91cfbf0b02e1787e54 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 23 Nov 2000 19:15:31 +0000 Subject: [PATCH 0297/2134] adding Makefile.in --- eo/contrib/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/contrib/.cvsignore b/eo/contrib/.cvsignore index f3c7a7c5d..3dda72986 100644 --- a/eo/contrib/.cvsignore +++ b/eo/contrib/.cvsignore @@ -1 +1,2 @@ +Makefile.in Makefile From 0da6982d68f523fcaf0e99b521fb8e29e88d3e97 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 23 Nov 2000 19:17:24 +0000 Subject: [PATCH 0298/2134] initial version --- eo/app/gprop/.cvsignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 eo/app/gprop/.cvsignore diff --git a/eo/app/gprop/.cvsignore b/eo/app/gprop/.cvsignore new file mode 100644 index 000000000..58f6bc33c --- /dev/null +++ b/eo/app/gprop/.cvsignore @@ -0,0 +1 @@ +gprop From 70b7f7954564215737dac41729f71637779593f9 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 23 Nov 2000 19:44:47 +0000 Subject: [PATCH 0299/2134] initial release --- eo/app/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 eo/app/.cvsignore diff --git a/eo/app/.cvsignore b/eo/app/.cvsignore new file mode 100644 index 000000000..3dda72986 --- /dev/null +++ b/eo/app/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile From 7b27d430ed03ef6aadfe864043a2d9494562c27c Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 23 Nov 2000 19:45:13 +0000 Subject: [PATCH 0300/2134] adding some files --- eo/app/gprop/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/app/gprop/.cvsignore b/eo/app/gprop/.cvsignore index 58f6bc33c..d3962adb5 100644 --- a/eo/app/gprop/.cvsignore +++ b/eo/app/gprop/.cvsignore @@ -1 +1,3 @@ +Makefile.in +Makefile gprop From 9a40169867694f0cc3a20242196a35cd7012bd26 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 23 Nov 2000 19:45:49 +0000 Subject: [PATCH 0301/2134] reordering Makefile creation --- eo/configure.in | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 0c492c554..5121d9e1c 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,5 +34,20 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile) - +AC_OUTPUT +( + Makefile + app/Makefile + app/gprop/Makefile + contrib/Makefile + doc/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 +) \ No newline at end of file From 5ac5a72db20363b3995cd3c6c694ea88d7e764af Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 24 Nov 2000 09:51:31 +0000 Subject: [PATCH 0302/2134] adding new parameters --- eo/app/gprop/gprop.cc | 8 +++++++- eo/app/gprop/gprop.h | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc index 7890b18ae..d2b11a3ac 100644 --- a/eo/app/gprop/gprop.cc +++ b/eo/app/gprop/gprop.cc @@ -18,7 +18,7 @@ // global variables //----------------------------------------------------------------------------- - +unsigned in, out, hidden; //----------------------------------------------------------------------------- // parameters @@ -29,6 +29,7 @@ eoValueParam generations(10, "generations", "default generation number eoValueParam mut_rate(0.1, "mut_rate", "default mutation rate", 'm'); eoValueParam xover_rate(0.1, "xover_rate", "default crossover rate", 'x'); eoValueParam file("", "file", "common part of patterns filenames *.trn *.val and *.tst", 'f'); +eoValueParam hiddenp(8, "hidden", "default number of neurons in hidden layer", 'h'); //----------------------------------------------------------------------------- // auxiliar functions @@ -71,6 +72,7 @@ void arg(int argc, char** argv) parser.processParam(mut_rate, "genetic operators"); parser.processParam(xover_rate, "genetic operators"); parser.processParam(file, "files"); + parser.processParam(hiddenp, "genetic operators"); if (parser.userNeedsHelp()) { @@ -85,6 +87,10 @@ void arg(int argc, char** argv) phenotype::trn_max = trn_set.size(); phenotype::val_max = val_set.size(); phenotype::tst_max = tst_set.size(); + + in = trn_set.front().input.size(); + out = trn_set.front().output.size(); + hidden = hiddenp.value(); } //----------------------------------------------------------------------------- diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 392a51bb8..8b5f3c827 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -64,10 +64,15 @@ typedef mlp::net genotype; // Chrom //----------------------------------------------------------------------------- +extern unsigned in, out, hidden; + class Chrom: public EO, public genotype { public: - Chrom(): genotype(25, 2) {} + Chrom(): genotype(in, out, vector(1, hidden)) + { + cout << "in = " << in << " out = " << out << " hidden = " << hidden << endl; + } string className() const { return "Chrom"; } From 2b03bd6dae27cbd1e23c9b6ded75df0cada0cd09 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 24 Nov 2000 11:52:49 +0000 Subject: [PATCH 0303/2134] fix Fitness default construction value --- eo/src/EO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index fd807d0cd..34e216fea 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -51,7 +51,7 @@ public: ctors here since default types like float have no void initializer. VC++ allows it, but gcc does not */ - EO(): repFitness(0), invalidFitness(true) {} + EO(): repFitness(Fitness()), invalidFitness(true) {} /// Virtual dtor virtual ~EO() {}; From 6a7102f5b620e025f0cb7399c24db5d6b94ac5da Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 24 Nov 2000 12:33:44 +0000 Subject: [PATCH 0304/2134] changing genetic operators --- eo/app/gprop/gprop.cc | 39 +++++++++++++++++++++++---------------- eo/app/gprop/gprop.h | 32 ++++++++++++++++---------------- eo/src/eoProportional.h | 40 +++++++++++++++++++--------------------- 3 files changed, 58 insertions(+), 53 deletions(-) diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc index d2b11a3ac..4b4c3bd79 100644 --- a/eo/app/gprop/gprop.cc +++ b/eo/app/gprop/gprop.cc @@ -11,6 +11,7 @@ #include // eoPop #include // eoGenContinue #include // eoProportional +#include #include // eoSGA #include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator @@ -24,12 +25,12 @@ unsigned in, out, hidden; // parameters //----------------------------------------------------------------------------- -eoValueParam pop_size(10, "pop_size", "default population size", 'p'); -eoValueParam generations(10, "generations", "default generation number", 'g'); -eoValueParam mut_rate(0.1, "mut_rate", "default mutation rate", 'm'); +eoValueParam pop_size(10, "pop_size", "population size", 'p'); +eoValueParam generations(10, "generations", "number of generation", 'g'); +eoValueParam mut_rate(0.1, "mut_rate", "mutation rate", 'm'); eoValueParam xover_rate(0.1, "xover_rate", "default crossover rate", 'x'); -eoValueParam file("", "file", "common part of patterns filenames *.trn *.val and *.tst", 'f'); -eoValueParam hiddenp(8, "hidden", "default number of neurons in hidden layer", 'h'); +eoValueParam file("", "file", "common start of patterns filenames *.trn *.val and *.tst", 'f'); +eoValueParam hiddenp(0, "hidden", "number of neurons in hidden layer", 'd'); //----------------------------------------------------------------------------- // auxiliar functions @@ -108,8 +109,6 @@ void load_file(mlp::set& set, const string& ext) ifs >> set; - cout << "set.size() = " << set.size() << endl; - if (set.size() == 0) { cerr << filename << " data file is empty!"; @@ -122,22 +121,30 @@ void load_file(mlp::set& set, const string& ext) void ga() { eoGenContinue continuator(generations.value()); - - eoProportional select; + + // create population + eoInitChrom init; + eoPop pop(pop_size.value(), init); + + // evaluate population + eoEvalFuncPtr evaluator(eoChromEvaluator); + apply(evaluator, pop); + + // selector + // eoProportional select(pop); + eoStochTournament select; + + // genetic operators eoChromMutation mutation(generations); eoChromXover xover; - eoEvalFuncPtr evaluator(eoChromEvaluator); - + + // genetic algorithm eoSGA sga(select, xover, xover_rate.value(), mutation, mut_rate.value(), evaluator, continuator); - - eoInitChrom init; - eoPop pop(pop_size.value(), init); - apply(evaluator, pop); - + cout << pop << endl; sga(pop); diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 8b5f3c827..41aa50dbd 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -8,6 +8,7 @@ //----------------------------------------------------------------------------- #include // istream ostream +#include // setprecision #include // string #include // EO #include // eoMonOp eoQuadraticOp @@ -29,15 +30,14 @@ struct phenotype static unsigned trn_max, val_max, tst_max; - phenotype(const double& _mse_error = 0): mse_error(_mse_error) {} - - operator double(void) const { return mse_error; } - + operator double(void) const { return val_ok; } + friend bool operator<(const phenotype& a, const phenotype& b) { - return a.mse_error < b.mse_error; + return a.val_ok < b.val_ok || + (!(a.val_ok < b.val_ok) && a.mse_error < b.mse_error); } - + friend ostream& operator<<(ostream& os, const phenotype& p) { return os << p.trn_ok << "/" << p.trn_max << " " @@ -69,17 +69,15 @@ extern unsigned in, out, hidden; class Chrom: public EO, public genotype { public: - Chrom(): genotype(in, out, vector(1, hidden)) - { - cout << "in = " << in << " out = " << out << " hidden = " << hidden << endl; - } + Chrom(): genotype(in, out, vector(1, hidden)) {} string className() const { return "Chrom"; } void printOn (ostream& os) const { - // os << static_cast(*this) << " " << fitness(); - os << fitness(); + os << setprecision(3) << static_cast(*this) << " \t" + << fitness(); + // os << fitness(); } void readFrom (istream& is) @@ -137,6 +135,12 @@ class eoChromXover: public eoQuadraticOp public: void operator()(Chrom& chrom1, Chrom& chrom2) { + chrom1.normalize(); + chrom2.desaturate(); + + mse::net tmp1(chrom1), tmp2(chrom2); + tmp1.train(trn_set, 100, 0, 0.001); + tmp2.train(trn_set, 100, 0, 0.001); } }; @@ -164,12 +168,8 @@ unsigned correct(const mlp::net& net, const qp::set& set) return sum; } - - phenotype eoChromEvaluator(const Chrom& chrom) { - // extern mlp::set trn_set, val_set, tst_set; - phenotype p; p.trn_ok = correct(chrom, trn_set); p.val_ok = correct(chrom, val_set); diff --git a/eo/src/eoProportional.h b/eo/src/eoProportional.h index f47cbba82..6840f697c 100644 --- a/eo/src/eoProportional.h +++ b/eo/src/eoProportional.h @@ -35,7 +35,7 @@ //----------------------------------------------------------------------------- /** eoProportional: select an individual proportional to her stored fitness -value + value */ //----------------------------------------------------------------------------- @@ -43,30 +43,28 @@ value template class eoProportional: public eoSelectOne { public: - - /// Sanity check - eoProportional(void) : total(-1.0) - { - if (minimizing_fitness()) - { - throw logic_error("eoProportional: minimizing fitness"); - } - } + /// Sanity check + eoProportional(const eoPop& pop = eoPop()): + total((pop.size() == 0) ? -1.0 : sum_fitness(pop)) + { + if (minimizing_fitness()) + throw logic_error("eoProportional: minimizing fitness"); + } - void setup(const eoPop& _pop) - { - total = sum_fitness(_pop); - } + void setup(const eoPop& _pop) + { + total = sum_fitness(_pop); + } - /** do the selection, call roulette_wheel. - */ - const EOT& operator()(const eoPop& _pop) - { - return roulette_wheel(_pop, total) ; - } + /** do the selection, call roulette_wheel. + */ + const EOT& operator()(const eoPop& _pop) + { + return roulette_wheel(_pop, total) ; + } private : - typename EOT::Fitness total; + typename EOT::Fitness total; }; #endif From 3ec57ed93fe418662434ca81f48f833ebf6d2b9f Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 24 Nov 2000 17:26:22 +0000 Subject: [PATCH 0305/2134] Changed Maarten's 2-continuator construct into a vector of pointer, as in all other Combined constructs in EO. Kept the construtor with 2 eoCOntinue for backward compatibility. Added of course the add method! --- eo/src/eoCombinedContinue.h | 51 ++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index 157ca3fa9..aff47ce57 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -28,31 +28,52 @@ #include /** -Fitness continuation: - + Combined continuators - logical AND: Continues until one of the embedded continuators says halt! + +20/11/00 MS: Changed the 2-continuator construct to a vector > + to be consistent with other Combined constructs + and allow to easily handle more than 2 continuators */ + template< class EOT> class eoCombinedContinue: public eoContinue { public: - /// Define Fitness - typedef typename EOT::Fitness FitnessType; + /// Define Fitness + typedef typename EOT::Fitness FitnessType; - /// Ctor - eoCombinedContinue( eoContinue& _arg1, eoContinue& _arg2) - : eoContinue (), arg1(_arg1), arg2(_arg2) {}; + /// Ctor + eoCombinedContinue( eoContinue& _cont) + : eoContinue () + { + continuators.push_back(&_cont); + } - /** Returns false when one of the embedded continuators say so (logical and) - */ - virtual bool operator() ( const eoPop& _pop ) - { - return arg1(_pop) && arg2(_pop); - } + /// Ctor - for historical reasons ... should disspear some day + eoCombinedContinue( eoContinue& _cont1, eoContinue& _cont2) + : eoContinue () + { + continuators.push_back(&_cont1); + continuators.push_back(&_cont2); + } + + void add(eoContinue & _cont) + { + continuators.push_back(&_cont); + } + + /** Returns false when one of the embedded continuators say so (logical and) + */ + virtual bool operator() ( const eoPop& _pop ) + { + for (unsigned i = 0; i < continuators.size(); ++i) + if ( !(*continuators[i])(_pop) ) return false; + return true; + } private: - eoContinue& arg1; - eoContinue& arg2; + std::vector*> continuators; }; #endif From 0fd1336bfe949c1df223eff1436833b5418dd4f3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 24 Nov 2000 17:30:37 +0000 Subject: [PATCH 0306/2134] Turned the eoBestFitness into an eoStat (it was an eoSortedStat). Alos added a few comments so that Doxygen documents all classes there. --- eo/src/utils/eoStat.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 4c60ec9bc..108f951f5 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -33,12 +33,17 @@ /** Base class for all statistics that need to be calculated - over the (unsorted) population + over the (unsorted) population (I guess it is not really necessary? MS) */ template class eoStatBase : public eoUF&, void> {}; +/** + The actual class that will be used as base for all statistics + that need to be calculated over the (unsorted) population + It is an eoStatBase AND an eoValueParam so it can be used in Monitors. +*/ template class eoStat : public eoValueParam, public eoStatBase { @@ -54,6 +59,11 @@ class eoSortedStatBase : public eoUF&, void> { }; +/** + The actual class that will be used as base for all statistics + that need to be calculated over the sorted population + It's an eoSortedStatBase AND an eoValueParam so it can be used in Monitors. +*/ template class eoSortedStat : public eoSortedStatBase, public eoValueParam { @@ -88,6 +98,9 @@ public : } }; +/** + Average fitness + Std. dev. of a population, fitness needs to be scalar. +*/ template class eoSecondMomentStats : public eoStat > { @@ -114,6 +127,9 @@ public : } }; +/** + The n_th element fitness in the population (see eoBestFitnessStat) +*/ template class eoNthElementFitnessStat : public eoSortedStat { @@ -153,13 +169,17 @@ public : }; */ + +/** + Best fitness in the population (this is NOT an eoSortedStat but an eoStat) +*/ template class eoBestFitnessStat : public eoNthElementFitnessStat { public : typedef typename EOT::Fitness Fitness; - eoBestFitnessStat(std::string _description = "Best Fitness") : eoNthElementFitnessStat(0, _description) {} + eoBestFitnessStat(std::string _description = "Best ") : eoNthElementFitnessStat(0, _description) {} }; template From 08e6be4b66a4e712aba0c29c4b1d74d75f7a2ba9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 24 Nov 2000 17:36:03 +0000 Subject: [PATCH 0307/2134] Added a verbose mode (the default behavior) which is as before. But when in non-verbose mode, prints only one line per generation. --- eo/src/utils/eoStdoutMonitor.cpp | 45 ++++++++++++++++++++------------ eo/src/utils/eoStdoutMonitor.h | 8 +++--- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index be4de57a5..8fc6dc606 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -10,28 +10,41 @@ using namespace std; eoMonitor& eoStdoutMonitor::operator()(void) { - if (firsttime) - { - cout << "First Generation" << endl; - - firsttime = false; - - } - // ok, now the real saving. write out - if (!cout) { string str = "eoStdoutMonitor: Could not write to cout"; throw runtime_error(str); } - - for(iterator it = vec.begin(); it != vec.end(); ++it) + if (firsttime) { - cout << (*it)->longName() << ": " << (*it)->getValue() << '\n'; + if (verbose) + cout << "First Generation" << endl; + else + { + for(iterator it = vec.begin(); it != vec.end(); ++it) + { + cout << (*it)->longName() << delim; + } + cout << endl; + } + firsttime = false; } - - cout << "\n****** End of Generation ******\n" << endl; // endl: flush - + // ok, now the real saving. write out + if (verbose) + { + for(iterator it = vec.begin(); it != vec.end(); ++it) + { + cout << (*it)->longName() << ": " << (*it)->getValue() << '\n'; + } + cout << "\n****** End of Generation ******\n" << endl; + } + else // a one-liner + { + for(iterator it = vec.begin(); it != vec.end(); ++it) + { + cout << (*it)->getValue() << delim; + } + cout << endl; + } return *this; } - diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index b9667e6f4..63332ded5 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -38,12 +38,14 @@ class eoStdoutMonitor : public eoMonitor { public : - eoStdoutMonitor(std::string _delim = "\t") : delim(_delim), firsttime(true) {} + eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t") : + verbose(_verbose), delim(_delim), firsttime(true) {} eoMonitor& operator()(void); private : - std::string delim; - bool firsttime; + bool verbose; + std::string delim; + bool firsttime; }; #endif From 8f9f25522300f72318a15e12081925d4a4430ee1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 24 Nov 2000 17:41:39 +0000 Subject: [PATCH 0308/2134] An eoContinue class that allows a minimum number of generations, then stops whenever a number of generations happens without fitness improvement. --- eo/src/eoSteadyFitContinue.h | 108 +++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100755 eo/src/eoSteadyFitContinue.h diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h new file mode 100755 index 000000000..05a688292 --- /dev/null +++ b/eo/src/eoSteadyFitContinue.h @@ -0,0 +1,108 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSteadyFitContinue.h +// (c) GeNeura Team, 1999, Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSteadyFitContinue_h +#define _eoSteadyFitContinue_h + +#include + +/** + A continuator: does a minimum number of generations, then + stops whenever a given number of generations takes place without improvement +*/ +template< class EOT> +class eoSteadyFitContinue: public eoContinue +{ +public: + typedef typename EOT::Fitness Fitness; + + /// Ctor for setting a + eoSteadyFitContinue( unsigned long _minGens, unsigned long _steadyGens) + : repMinGenerations( _minGens ), repSteadyGenerations( _steadyGens), + steadyState(false), thisGenerationPlaceHolder(0), + thisGeneration(thisGenerationPlaceHolder){}; + + /// Ctor for enabling the save/load the no. of generations counted + eoSteadyFitContinue( unsigned long _minGens, unsigned long _steadyGen, + unsigned long& _currentGen) + : repMinGenerations( _minGens ), repSteadyGenerations( _steadyGen), + steadyState(_currentGen>_minGens), thisGenerationPlaceHolder(0), + thisGeneration(_currentGen){}; + + /** Returns false when a certain number of generations is + * reached withtout improvement */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + // cout << " [" << thisGeneration << "] "; + Fitness bestCurrentFitness = _vEO.nth_element_fitness(0); + + if (steadyState) { // already after MinGenenerations + if (bestCurrentFitness > bestSoFar) { + bestSoFar = bestCurrentFitness; + lastImprovement = thisGeneration; + } else { + if (thisGeneration - lastImprovement > repSteadyGenerations) { + cout << "STOP in eoSteadyFitContnue: Done " << repSteadyGenerations + << " generations without improvement\n"; + return false; + } + } + } else { // not yet in steady state + if (thisGeneration > repMinGenerations) { // go to steady state + steadyState = true; + bestSoFar = bestCurrentFitness; + lastImprovement = thisGeneration; + cout << "eoSteadyFitContnue: Done the minimum number of generations\n"; + } + } + return true; + } + + /** Sets the parameters (minimum nb of gen. + steady nb of gen.) + and sets the current generation to 0 (the begin)*/ + virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) { + repMinGenerations = _mg; + repSteadyGenerations = _sg; + thisGeneration = 0; + steadyState = false; + }; + + /** accessors*/ + virtual unsigned long minGenerations( ) + { return repMinGenerations; }; + virtual unsigned long steadyGenerations( ) + { return repSteadyGenerations; }; + +private: + unsigned long repMinGenerations; + unsigned long repSteadyGenerations; + bool steadyState; + unsigned long thisGenerationPlaceHolder; + unsigned long& thisGeneration; + unsigned int lastImprovement; + Fitness bestSoFar; +}; + +#endif + From 2b8c04928384f235736c34cf0beea93cab621885 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 24 Nov 2000 17:43:02 +0000 Subject: [PATCH 0309/2134] bug fix --- eo/app/gprop/gprop.cc | 4 ++++ eo/app/gprop/gprop.h | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc index 4b4c3bd79..e3a9835aa 100644 --- a/eo/app/gprop/gprop.cc +++ b/eo/app/gprop/gprop.cc @@ -92,6 +92,10 @@ void arg(int argc, char** argv) in = trn_set.front().input.size(); out = trn_set.front().output.size(); hidden = hiddenp.value(); + + cout << trn_set << endl; + + cout << in << " " << out << " " << hidden << endl; } //----------------------------------------------------------------------------- diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 41aa50dbd..f36a1c4bb 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -30,12 +30,11 @@ struct phenotype static unsigned trn_max, val_max, tst_max; - operator double(void) const { return val_ok; } + // operator double(void) const { return val_ok; } friend bool operator<(const phenotype& a, const phenotype& b) { - return a.val_ok < b.val_ok || - (!(a.val_ok < b.val_ok) && a.mse_error < b.mse_error); + return a.val_ok < b.val_ok; // || (!(a.val_ok < b.val_ok) && a.mse_error < b.mse_error); } friend ostream& operator<<(ostream& os, const phenotype& p) @@ -48,7 +47,7 @@ struct phenotype friend istream& operator>>(istream& is, phenotype& p) { - return is; + return is; // complete me } }; @@ -69,7 +68,7 @@ extern unsigned in, out, hidden; class Chrom: public EO, public genotype { public: - Chrom(): genotype(in, out, vector(1, hidden)) {} + Chrom(): genotype(in, out, vector(hidden < 1 ? 0 : 1, hidden)) {} string className() const { return "Chrom"; } @@ -82,7 +81,7 @@ public: void readFrom (istream& is) { - invalidate(); + invalidate(); // complete me } }; From d0e566fdf4da9cef637c17067d308cd733b96ee6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 24 Nov 2000 17:44:21 +0000 Subject: [PATCH 0310/2134] Very simple classes for vectors of (unbounded) real numbers. A few straightforward operators only (BLX-0, uniform mutation). Mostly for tutorial reasons - though it might improve in usefull classes later --- eo/src/es/eoReal.h | 58 +++++++++ eo/src/es/eoRealOp.h | 272 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 330 insertions(+) create mode 100644 eo/src/es/eoReal.h create mode 100644 eo/src/es/eoRealOp.h diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h new file mode 100644 index 000000000..1ca1247f4 --- /dev/null +++ b/eo/src/es/eoReal.h @@ -0,0 +1,58 @@ +/* + eoReal.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + todos@geneura.ugr.es, http://geneura.ugr.es + mkeijzer@dhi.dk +*/ + +#ifndef eoReal_h +#define eoReal_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // string + +#include + +/** eoReal: implementation of simple real-valued chromosome. + * based on eoFixedLength class +*/ +template class eoReal: public eoFixedLength +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the vector + */ + eoReal(unsigned size = 0, double value = 0.0): + eoFixedLength(size, value) {} + + /// My class name. + string className() const + { + return "eoReal"; + } + +}; + +//----------------------------------------------------------------------------- + +#endif //eoReal_h diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h new file mode 100644 index 000000000..a7b66173d --- /dev/null +++ b/eo/src/es/eoRealOp.h @@ -0,0 +1,272 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealOp.h +// (c) EEAAX 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRealOp_h +#define eoRealOp_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include + +//----------------------------------------------------------------------------- + +/** eoUniformMutation --> changes all values of the vector + by uniform choice with range epsilon + with probability p_change per variable +\class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoUniformMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _epsilon the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): + epsilon(_epsilon), p_change(_p_change) {} + + /// The class name. + string className() const { return "eoUniformMutation"; } + + /** + * Do it! + * @param chrom The cromosome undergoing the mutation + */ + void operator()(Chrom& chrom) + { + chrom.invalidate(); + for (unsigned lieu=0; lieu changes exactly k values of the vector + by uniform choice with range epsilon +\class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoDetUniformMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _epsilon the range for uniform nutation + * @param number of coordinate to modify + */ + eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): + epsilon(_epsilon), no(_no) {} + + /// The class name. + string className() const { return "eoDetUniformMutation"; } + + /** + * Do it! + * @param chrom The cromosome undergoing the mutation + */ + void operator()(Chrom& chrom) + { + chrom.invalidate(); + for (unsigned i=0; i uniform choice in segment + == arithmetical with same value along all coordinates +\class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoSegmentCrossover: public eoQuadraticOp +{ + public: + /** + * (Default) Constructor. + * @param _alpha the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + */ + eoSegmentCrossover(const double& _alpha = 0.0) : + alpha(_alpha), range(1+2*alpha) {} + + /// The class name. + string className() const { return "eoSegmentCrossover"; } + + /** + * segment crossover - modifies both parents + * @param chrom1 The first parent + * @param chrom2 The first parent + */ + void operator()(Chrom& chrom1, Chrom& chrom2) + { + unsigned i; + double r1, r2, fact; + fact = rng.uniform(range); // in [0,range) + for (i=0; i uniform choice in hypercube + == arithmetical with different values for each coordinate +\class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoArithmeticCrossover: public eoQuadraticOp +{ + public: + /** + * (Default) Constructor. + * @param _alpha the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + */ + eoArithmeticCrossover(const double& _alpha = 0.0): + alpha(_alpha), range(1+2*alpha) {} + + /// The class name. + string className() const { return "eoArithmeticCrossover"; } + + /** + * arithmetical crossover - modifies both parents + * @param chrom1 The first parent + * @param chrom2 The first parent + */ + void operator()(Chrom& chrom1, Chrom& chrom2) + { + unsigned i; + double r1, r2, fact; + for (i=0; i Uniform crossover, also termed intermediate crossover +\class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoRealUxOver: public eoQuadraticOp +{ + public: + /** + * (Default) Constructor. + * @param _preference bias in the choice (usually, no bias == 0.5) + */ + eoRealUxOver(const float& _preference = 0.5): preference(_preference) + { + if ( (_preference <= 0.0) || (_preference >= 1.0) ) + runtime_error("UxOver --> invalid preference"); + } + + /// The class name. + string className() const { return "eoRealUxOver"; } + + /** + * Uniform crossover for real vectors + * @param chrom1 The first parent + * @param chrom2 The second parent + * @runtime_error if sizes don't match + */ + void operator()(Chrom& chrom1, Chrom& chrom2) + { + if ( chrom1.size() != chrom2.size()) + runtime_error("UxOver --> chromosomes sizes don't match" ); + bool changed = false; + for (unsigned int i=0; i Date: Fri, 24 Nov 2000 17:45:07 +0000 Subject: [PATCH 0311/2134] Added eoSteadyGenContinue.h, es/eoReal.h and es/eoRealOp.h --- eo/src/eo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/src/eo b/eo/src/eo index 7a8ae6f3c..465d1a6af 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -51,6 +51,7 @@ //#include #include #include +#include #include //#include @@ -68,6 +69,7 @@ #include #include +#include // Evaluation functions #include @@ -77,6 +79,7 @@ #include #include #include +#include #include // Selection and reproduction stuff From bee8388a1eafd9a36226bbdd823bf5a49149d557 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 06:46:37 +0000 Subject: [PATCH 0312/2134] Modified the contructor: the default value for the delimiter is now " " and I added a boolean argument to indicate whether or not we want to overwrite an existing file with same name (default is overwrite). Added the getFileName accessor. --- eo/src/utils/eoFileMonitor.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 3bc4239e4..2ee42e8b0 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -23,6 +23,10 @@ mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- +/** Modified the default behavior, so that it erases existing files. +Can be modified in the ctor. +MS 25/11/00 +*/ #ifndef _eoFileMonitor_h #define _eoFileMonitor_h @@ -38,17 +42,32 @@ class eoFileMonitor : public eoMonitor { public : - eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim) {} + eoFileMonitor(std::string _filename, std::string _delim = " ", + bool _keep = false) : + filename(_filename), delim(_delim), keep(keep) + { + if (! _keep) + { + ofstream os(filename.c_str()); + if (!os) + { + string str = "eoFileMonitor: Could not open " + filename; + throw runtime_error(str); + } + } + } eoMonitor& operator()(void); eoMonitor& operator()(std::ostream& os); void printHeader(void); virtual void printHeader(std::ostream& os); - + virtual string getFileName() // for eoGnuPlot + { return filename;} private : std::string filename; std::string delim; + bool keep; // should we append or create a new file }; #endif From 622cbea0d53d13990e1274f458d9af59c6edb666 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 06:58:06 +0000 Subject: [PATCH 0313/2134] This is the first attempt to use gnuplot through a fork to plot statistics. At the moment it is only tested for Linux! Use with care --- eo/src/utils/eoGnuplot1DMonitor.h | 317 ++++++++++++++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 eo/src/utils/eoGnuplot1DMonitor.h diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h new file mode 100644 index 000000000..3128bfdd0 --- /dev/null +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -0,0 +1,317 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGnuplot1DMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGnuplot1DMonitor_H +#define _eoGnuplot1DMonitor_H + +#include + +#include +#include + +/** +@author Marc Schoenauer 2000 +@version 0.0 + +This class plots through gnuplot the eoStat given as argument + +*/ +//----------------------------------------------------------------------------- + +#include +#include "pipecom.h" + +/** eoGnuplot1DMonitor plots stats through gnuplot + */ +class eoGnuplot1DMonitor: public eoFileMonitor +{ + public: + // Ctor + eoGnuplot1DMonitor(std::string _filename) : + eoFileMonitor(_filename, " "), firstTime(true) + { + // opens pipe with Gnuplot + initGnuPlot(_filename); + } + + // Dtor + virtual ~eoGnuplot1DMonitor() { + // close - the gnuplot windows if pipe was correctly opened + if( gpCom ) { + PipeComSend( gpCom, "quit\n" ); // Ferme gnuplot + PipeComClose( gpCom ); + gpCom =NULL; + } + } + + virtual eoMonitor& operator() (void) ; + + /// Class name. + virtual string className() const { return "eoGnuplot1DMonitor"; } + +private: + void initGnuPlot(std::string _filename); + void FirstPlot(); + // the private data + bool firstTime; // the stats might be unknown in Ctor + PCom *gpCom; // Communication with gnuplot OK +}; + +// the following should be placed in a separate eoGnuplot1DMonitor.cpp + +//////////////////////////////////////////////////////////// +eoMonitor& eoGnuplot1DMonitor::operator() (void) + ///////////////////////////////////////////////////////// +{ + // update file using the eoFileMonitor + eoFileMonitor::operator()(); + + // sends plot order to gnuplot + // assumes successive plots will have same nb of columns!!! + if (firstTime) + { + FirstPlot(); + firstTime = false; + } + else + { + if( gpCom ) { + PipeComSend( gpCom, "replot\n" ); + } + } + return *this; +} + +//////////////////////////////////////////////////////////// +void eoGnuplot1DMonitor::initGnuPlot(std::string _filename) + ///////////////////////////////////////////////////////// +{ + char *args[6]; + args[0] = strdup( "gnuplot" ); + args[1] = strdup( "-geometry" ); + args[2] = strdup( "300x200-0+0" ); + args[3] = strdup( "-title" ); + args[4] = strdup( _filename.c_str() ); + args[5] = 0; + gpCom = PipeComOpenArgv( "gnuplot", args ); + if( ! gpCom ) + throw runtime_error("Impossible to spawn gnuplot\n"); + else { + PipeComSend( gpCom, "set grid\n" ); + PipeComSend( gpCom, "set data style lines\n" ); + } +} + + +//////////////////////////////////////////////////////////// +void eoGnuplot1DMonitor::FirstPlot() + //////////////////////////////////////////////////////// +{ + if (vec.size() < 2) + { + throw runtime_error("Must have some stats to plot!\n"); + } + char buff[1024]; + ostrstream os(buff, 1024); + os << "plot"; + for (unsigned i=1; ilongName() << "'" ; + if (i +#include +#include +#include + +#include "pipecom.h" + + +int Check( PCom *com ) +{ + if( ! com ) { + fprintf( stderr, "PipeCom: Null pointer.\n" ); + fflush( stderr ); + return 0; + } + if( kill( com->pid, 0 ) != 0 ) { + fprintf( stderr, "PipeCom: process doesn't exists.\n" ); + fflush( stderr ); + return 0; + } + return 1; +} + + +PCom * PipeComOpen( char *prog ) +{ + char *args[2]; + args[0] = prog; + args[1] = NULL; + return PipeComOpenArgv( prog, args ); +} + + +PCom * PipeComOpenArgv( char *prog, char *argv[] ) +{ + int toFils[2]; + int toPere[2]; + int sonPid; + PCom * ret = NULL; + + if( pipe( toFils ) < 0 ) { + perror( "PipeComOpen: Creating pipes" ); + return ret; + } + if( pipe( toPere ) < 0 ) { + perror( "PipeComOpen: Creating pipes" ); + return ret; + } + + switch( (sonPid = vfork()) ) { + case -1: + perror("PipeComOpen: fork failed" ); + return ret; + break; + + case 0: + /* --- Here's the son --- */ + /* --- replace old stdin --- */ + if( dup2( toFils[0], fileno(stdin) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + /* --- AVOIR: kill my father --- */ + } + if( dup2( toPere[1], fileno(stdout) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + } + if( execvp( prog, argv ) < 0 ) { + perror( prog ); + perror( "PipeComOpen: can't exec" ); + exit(1); + } + break; + default: + ret = (PCom *) malloc( sizeof(PCom) ); + if( ! ret ) + return NULL; + + ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); + ret->fRead = (FILE *)fdopen( toPere[0], "r" ); + ret->pid = sonPid; + } + return ret; +} + + +int PipeComSend( PCom *to, char *line ) +{ + int nb = 0; + if( ! Check(to ) ) + return nb; + nb = fprintf( to->fWrit, line ); + fflush( to->fWrit ); + return nb; +} + + +int PipeComSendn( PCom *to, char *data, int n ) +{ + int nb = 0; + if( ! Check(to) ) + return nb; + + nb = fwrite( data, 1, n, to->fWrit ); + fflush( to->fWrit ); + return nb; +} + + +int PipeComReceive( PCom *from, char *data, int max ) +{ + if( ! Check(from) ) + return 0; + if( ! data ) { + fprintf( stderr, "PipeComReceive: Invalid data pointer\n" ); + fflush( stderr ); + return 0; + } + if( fgets( data, max, from->fRead ) ) + return strlen(data); + return 0; +} + + + +int PipeComClose( PCom *to ) +{ + if( ! Check(to) ) + return 0; + fclose( to->fRead ); + fclose( to->fWrit ); + free( to ); + return 1; +} + + + +int PipeComWaitFor( PCom *from, char *what ) +{ + char buffer[256]; + do { + if( ! PipeComReceive( from, buffer, 256 ) ) + return 0; + } while( strcmp( buffer, what ) ); + return 1; +} + + +#endif _eoGnuplot1DMonitor_H From afdcdf5d07af53bf05bb7f61ca325deaee60aba6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 08:20:01 +0000 Subject: [PATCH 0314/2134] Added a few comments so Doxygen documents all classes --- eo/src/utils/eoUpdater.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index af3b02d9b..39319f9f5 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -38,6 +38,7 @@ class eoUpdater : public eoF {}; /** + an eoUpdater that simply increments a counter */ template class eoIncrementor : public eoUpdater @@ -57,6 +58,7 @@ private: #include /** + an eoUpdater that saves a state every given time interval */ class eoTimedStateSaver : public eoUpdater { @@ -78,6 +80,7 @@ private : }; /** + an eoUpdater that saves a state every given generations */ class eoCountedStateSaver : public eoUpdater { @@ -97,4 +100,5 @@ private : const std::string extension; }; + #endif From 65a985631c73caf31e4fdfa48fc410fd56d0fa9c Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Tue, 28 Nov 2000 13:36:29 +0000 Subject: [PATCH 0315/2134] now works --- eo/app/gprop/gprop.cc | 6 +----- eo/app/gprop/gprop.h | 7 ++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc index e3a9835aa..1ba882805 100644 --- a/eo/app/gprop/gprop.cc +++ b/eo/app/gprop/gprop.cc @@ -11,7 +11,7 @@ #include // eoPop #include // eoGenContinue #include // eoProportional -#include +#include // eoStochTournament #include // eoSGA #include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator @@ -92,10 +92,6 @@ void arg(int argc, char** argv) in = trn_set.front().input.size(); out = trn_set.front().output.size(); hidden = hiddenp.value(); - - cout << trn_set << endl; - - cout << in << " " << out << " " << hidden << endl; } //----------------------------------------------------------------------------- diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index f36a1c4bb..7a9134965 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -30,11 +30,9 @@ struct phenotype static unsigned trn_max, val_max, tst_max; - // operator double(void) const { return val_ok; } - friend bool operator<(const phenotype& a, const phenotype& b) { - return a.val_ok < b.val_ok; // || (!(a.val_ok < b.val_ok) && a.mse_error < b.mse_error); + return a.val_ok < b.val_ok || !(b.val_ok < a.val_ok) && b.mse_error < a.mse_error; } friend ostream& operator<<(ostream& os, const phenotype& p) @@ -119,6 +117,7 @@ public: { mse::net tmp(chrom); tmp.train(trn_set, 10, 0, 0.001); + chrom.invalidate(); } private: @@ -140,6 +139,8 @@ public: mse::net tmp1(chrom1), tmp2(chrom2); tmp1.train(trn_set, 100, 0, 0.001); tmp2.train(trn_set, 100, 0, 0.001); + chrom1.invalidate(); + chrom2.invalidate(); } }; From 5aa258fbcb0f455a363f68a5325015ca99aef5aa Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 15:31:38 +0000 Subject: [PATCH 0316/2134] Minor change of the default label --- eo/src/eoEvalFunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 67738da57..233599b41 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -53,7 +53,7 @@ if it has to evaluate.. etc. template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam { public : - eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "eval_counter") + eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") : eoValueParam(0, _name), func(_func) {} void operator()(EOT& _eo) From e4b735b17f18e05baa7b3cb34f5380d4be1a1fb4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 15:35:09 +0000 Subject: [PATCH 0317/2134] Added a comment to stdout upon termination - so we know why we stop in case of multiple criteria --- eo/src/eoFitContinue.h | 11 +++++++++-- eo/src/eoGenContinue.h | 7 ++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index 42d7ae5e1..276e0b7ca 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -47,8 +47,15 @@ public: * reached. Assumes pop is not sorted! */ virtual bool operator() ( const eoPop& _pop ) { - return (_pop.nth_element_fitness(0) < maximum); - } + FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); + if (bestCurrentFitness >= maximum) + { + cout << "STOP in eoFitContinue: Best fitness has reached " << + bestCurrentFitness << "\n"; + return false; + } + return true; + } private: FitnessType maximum; diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index a0fcc77fe..6458f62f3 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -52,7 +52,12 @@ public: virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; // cout << " [" << thisGeneration << "] "; - return (thisGeneration < repTotalGenerations) ; // for the postincrement + if (thisGeneration >= repTotalGenerations) + { + cout << "STOP in eoGenContinue: Reached maximum number of generations\n"; + return false; + } + return true; } /** Sets the number of generations to reach From f5174e3a4255efe146f8ff3597dc5e6b21e7b13e Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 15:40:39 +0000 Subject: [PATCH 0318/2134] Added fstream in the include files - I had an error message at some point! --- eo/src/utils/eoFileMonitor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 2ee42e8b0..d4a217908 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -32,6 +32,7 @@ MS 25/11/00 #define _eoFileMonitor_h #include +#include #include #include From 12c6bdf058db11c726fa57605fc93845cba8a617 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 17:17:19 +0000 Subject: [PATCH 0319/2134] Added the class eoSGATransform: I break the one file / one class rule a lot, but both are supposed to be used mainly in the tutorial, not in real life :-) --- eo/src/eoSGA.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index cb55fe4f8..5f3edc442 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -109,4 +109,65 @@ private : eoEvalFunc& eval; }; +/////////////////////////////////////////////////////////////////////////////// +// class eoSGATransform +/////////////////////////////////////////////////////////////////////////////// +#include // vector +#include +#include + +/***************************************************************************** + * eoSGATransform: transforms a population using genetic operators. + * It does it exactly as class eoSGA, i.e. only accepts + * quadratic crossover and unary mutation + * It is here mainly for tutorial reasons + *****************************************************************************/ +template class eoSGATransform : public eoTransform +{ + public: + + /// Default constructor. + eoSGATransform(eoQuadraticOp& _cross, float _crate, + eoMonOp& _mutate, float _mrate) + : cross(_cross), + crossoverRate(_crate), + mutate(_mutate), + mutationRate(_mrate) {} + + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverRate) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationRate) ) + { + mutate(_pop[i]); + } + + } + }; + + private: + eoQuadraticOp& cross; + float crossoverRate; + eoMonOp& mutate; + float mutationRate; +}; + + #endif From 52a9c830c860bd40332ecae52e88e62824d991fb Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 17:41:41 +0000 Subject: [PATCH 0320/2134] I added this very simple instance of operator proportional selector for the tutorial - it is consistent with all other xxxCombined constructs. However, I am not sure that Occam's razor will not make it widely used... --- eo/src/eoProportionalCombinedOp.h | 185 ++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 eo/src/eoProportionalCombinedOp.h diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h new file mode 100644 index 000000000..2c40393d6 --- /dev/null +++ b/eo/src/eoProportionalCombinedOp.h @@ -0,0 +1,185 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoCombinedOp.h +// (c) GeNeura Team, 1998, Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCombinedOp_H +#define _eoCombinedOp_H + +#include +#include +#include +#include +#include +/** +\defgroup PropCombined operators +Combination of same-type Genetic Operators - Proportional choice +*/ + +/** @name PropCombined Genetic operators + +This files contains the classes eoPropCombinedXXXOp (XXX in {Mon, Bin, Quad}) +that allow to use more than a single operator of a specific class +into an algorithm, chosing by a roulette wheel based on user-defined rates + +@author Marc Schoenauer +@version 0.1 +*/ + + + +/** eoMonOp is the monary operator: genetic operator that takes only one EO */ + +template +class eoPropCombinedMonOp: public eoMonOp +{ +public: + /// Ctor + eoPropCombinedMonOp(eoMonOp & _first, double _rate) + { + ops.push_back(&_first); + rates.push_back(_rate); + } + +virtual string className() const { return "eoPropCombinedMonOp"; } + +void add(eoMonOp & _op, double _rate, bool _verbose=false) + { + ops.push_back(&_op); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + } + + void operator()(EOT & _indi) + { + unsigned what = rng.roulette_wheel(rates); // choose one op + (*ops[what])(_indi); // apply it + } +private: +std::vector*> ops; +std::vector rates; +}; + + +/** COmbined Binary genetic operator: + * operator() has two operands, only the first one can be modified + */ +template +class eoPropCombinedBinOp: public eoBinOp +{ +public: + /// Ctor + eoPropCombinedBinOp(eoBinOp & _first, double _rate) + { + ops.push_back(&_first); + rates.push_back(_rate); + } + +virtual string className() const { return "eoPropCombinedBinOp"; } + +void add(eoBinOp & _op, double _rate, bool _verbose=false) + { + ops.push_back(&_op); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + } + + void operator()(EOT & _indi1, const EOT & _indi2) + { + unsigned what = rng.roulette_wheel(rates); // choose one op index + (*ops[what])(_indi1, _indi2); // apply it + } +private: +std::vector*> ops; +std::vector rates; +}; + + +/** Quadratic genetic operator: subclasses eoOp, and defines basically the + operator() with two operands, both can be modified. +*/ +/** COmbined Binary genetic operator: + * operator() has two operands, only the first one can be modified + */ +template +class eoPropCombinedQuadOp: public eoQuadraticOp +{ +public: + /// Ctor + eoPropCombinedQuadOp(eoQuadraticOp & _first, double _rate) + { + ops.push_back(&_first); + rates.push_back(_rate); + } + +virtual string className() const { return "eoPropCombinedQuadOp"; } + +void add(eoQuadraticOp & _op, double _rate, bool _verbose=false) + { + ops.push_back(&_op); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + } + + void operator()(EOT & _indi1, EOT & _indi2) + { + unsigned what = rng.roulette_wheel(rates); // choose one op index + (*ops[what])(_indi1, _indi2); // apply it + } +private: +std::vector*> ops; +std::vector rates; +}; + + +// for General Ops, it's another story - see eoGOpSelector +#endif + From a69a19877046fb64a1333f2e011109b3ac19d8d5 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 28 Nov 2000 17:42:53 +0000 Subject: [PATCH 0321/2134] Added eoProportionalCombinedOp.h --- eo/src/eo | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eo b/eo/src/eo index 465d1a6af..32f423224 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -89,6 +89,7 @@ #include #include +#include #include #include #include From 29b8f1153c0055f8bdc26eac171d0200e35f9ec2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 29 Nov 2000 17:20:16 +0000 Subject: [PATCH 0322/2134] An include file was missing!!! I've inserted it in teh file actually - but if we go on with gnuplot, it will need to be taken out again, and used in all other monitors we will write using gnuplot (e.g. eoGnuplotWithErrorbarsMonitor, eoGnuplotHistogramMonitor, ...). --- eo/src/utils/eoGnuplot1DMonitor.h | 58 +++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 3128bfdd0..e086c78ba 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -42,7 +42,59 @@ This class plots through gnuplot the eoStat given as argument //----------------------------------------------------------------------------- #include -#include "pipecom.h" +// #include "pipecom.h" +// +// this is pipecom.h + +/* ---------------------------------------------------------------------- + * Where........: CMAP - Polytechnique + * File.........: pipecom.h + * Author.......: Bertrand Lamy (EEAAX) + * Created......: Thu Mar 9 17:21:15 1995 + * Description..: Pipe communication with a process + * + * Ident........: $Id: eoGnuplot1DMonitor.h,v 1.2 2000-11-29 17:20:16 evomarc Exp $ + * ---------------------------------------------------------------------- + */ + +#ifndef PIPECOM_H +#define PIPECOM_H + + +#ifdef __cplusplus +extern "C" { +#endif + +#include + + +typedef struct PipeCommunication { + FILE *fWrit; + FILE *fRead; + int pid; +} PCom; + + + +PCom *PipeComOpen( char *prog ); +PCom *PipeComOpenArgv( char *prog, char *argv[] ); + +int PipeComSend( PCom *to, char *line ); +int PipeComSendn( PCom *to, char *data, int n ); + +int PipeComReceive( PCom *from, char *data, int max ); + +int PipeComClose( PCom *to ); + +int PipeComWaitFor( PCom *from, char *what ); + +#ifdef __cplusplus +} /* ferme extern "C" */ +#endif + +#endif /* PIPECOM_H */ + + /** eoGnuplot1DMonitor plots stats through gnuplot */ @@ -161,7 +213,7 @@ void eoGnuplot1DMonitor::FirstPlot() * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot1DMonitor.h,v 1.1 2000-11-28 06:58:06 evomarc Exp $ + * Ident........: $Id: eoGnuplot1DMonitor.h,v 1.2 2000-11-29 17:20:16 evomarc Exp $ * ---------------------------------------------------------------------- */ @@ -171,7 +223,7 @@ void eoGnuplot1DMonitor::FirstPlot() #include #include -#include "pipecom.h" +// #include "pipecom.h" int Check( PCom *com ) From ca843a88fca9cc44fbafaff23543939b77632bc6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 29 Nov 2000 18:06:09 +0000 Subject: [PATCH 0323/2134] Initial version of the tutorial. Warning: the Makefil is hand-made, and only works in Linux --- eo/tutorial/Makefile | 16 ++++++++++++++++ eo/tutorial/README | 13 +++++++++++++ eo/tutorial/index.html | 26 ++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 eo/tutorial/Makefile create mode 100644 eo/tutorial/README create mode 100644 eo/tutorial/index.html diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile new file mode 100644 index 000000000..fcdd0e0cb --- /dev/null +++ b/eo/tutorial/Makefile @@ -0,0 +1,16 @@ +SUBDIRS = Lesson1 Lesson2 Lesson3 + +lesson1 : + cd Lesson1; make + +lesson2 : + cd Lesson2; make + +lesson3 : + cd Lesson3; make + +all: + for i in $(SUBDIRS); do pushd $$i && $(MAKE); popd; done + +clean: + for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done diff --git a/eo/tutorial/README b/eo/tutorial/README new file mode 100644 index 000000000..8cf3e0c75 --- /dev/null +++ b/eo/tutorial/README @@ -0,0 +1,13 @@ +Eo Tutorial - corresponding to EO version 0.9.2 + +To start the tutorial, read index.html in your favorite browser. + +Many things are missing, including many solutions for the exercises, +the introduction to EC and most of the Bottom-Up pages. +More important, all examples of this tutorial have only been tested +on a Linux computer, and the Makefile will not work with MS-Windows +systems. Any help is welcome! + +Be patient ... +evoMarc + diff --git a/eo/tutorial/index.html b/eo/tutorial/index.html new file mode 100644 index 000000000..81b87972b --- /dev/null +++ b/eo/tutorial/index.html @@ -0,0 +1,26 @@ + + + + + + Tutorial EO + + + +
+
+

+EO Tutorial

+Welcome to EO - the Evolving Objects library. +

But you are not in the right place! +
You should better try to go to the html directory, for instance by +
clicking here. +

+


+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 28 CET 2000  + + From a27dc53ef04953190471f32aa48ca6fe74a64ea6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 29 Nov 2000 18:19:18 +0000 Subject: [PATCH 0324/2134] dded teh comment about the link to be made from html to ../../doc --- eo/tutorial/README | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eo/tutorial/README b/eo/tutorial/README index 8cf3e0c75..018d4c6bc 100644 --- a/eo/tutorial/README +++ b/eo/tutorial/README @@ -2,6 +2,12 @@ Eo Tutorial - corresponding to EO version 0.9.2 To start the tutorial, read index.html in your favorite browser. +WARNING: before that, you need to create a link from the html dir +to the main documentation directory of EO. Probably, you will need +to type something like +.../eo/tutorial % cd html +.../eo/tutorial/html % ln -s ../../doc . + Many things are missing, including many solutions for the exercises, the introduction to EC and most of the Bottom-Up pages. More important, all examples of this tutorial have only been tested From b8d4e7faefbaa307155830cbb770f6f9c26aa665 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 29 Nov 2000 18:19:57 +0000 Subject: [PATCH 0325/2134] Initial version of the tutorial. Warning: all Makefile's are hand-made, and will only work in Linux --- eo/tutorial/Lesson1/FirstBitGA.cpp | 164 ++ eo/tutorial/Lesson1/FirstRealGA.cpp | 165 ++ eo/tutorial/Lesson1/Makefile | 12 + eo/tutorial/Lesson1/exercise3.cpp | 165 ++ eo/tutorial/Lesson2/FirstBitEA.cpp | 193 +++ eo/tutorial/Lesson2/FirstRealEA.cpp | 188 +++ eo/tutorial/Lesson2/Makefile | 12 + eo/tutorial/Lesson2/binary_value.h | 17 + eo/tutorial/Lesson2/exercise3.cpp | 195 +++ eo/tutorial/Lesson2/real_value.h | 18 + eo/tutorial/Lesson3/Makefile | 12 + eo/tutorial/Lesson3/SecondBitEA.cpp | 375 +++++ eo/tutorial/Lesson3/binary_value.h | 17 + eo/tutorial/Lesson3/exercise1.cpp | 384 +++++ eo/tutorial/html/EA_tutorial.jpg | Bin 0 -> 53765 bytes eo/tutorial/html/FirstBitEA.html | 368 +++++ eo/tutorial/html/FirstBitGA.html | 350 +++++ eo/tutorial/html/FirstRealEA.html | 366 +++++ eo/tutorial/html/FirstRealGA.html | 349 +++++ eo/tutorial/html/FirstRealGA_old.html | 278 ++++ eo/tutorial/html/Firstmerge.html | 287 ++++ eo/tutorial/html/NoWay.html | 74 + eo/tutorial/html/SecondBitEA.html | 612 ++++++++ eo/tutorial/html/beige009.jpg | Bin 0 -> 6643 bytes eo/tutorial/html/binary_value.html | 57 + eo/tutorial/html/costume.jpg | Bin 0 -> 213921 bytes eo/tutorial/html/debut.html | 21 + eo/tutorial/html/eoBottomUp.html | 74 + eo/tutorial/html/eoEngine.html | 59 + eo/tutorial/html/eoEval.html | 34 + eo/tutorial/html/eoGeneration.html | 19 + eo/tutorial/html/eoInit.html | 36 + eo/tutorial/html/eoIo.html | 25 + eo/tutorial/html/eoLesson1.html | 413 +++++ eo/tutorial/html/eoLesson2.html | 301 ++++ eo/tutorial/html/eoLesson3.html | 531 +++++++ eo/tutorial/html/eoOperators.html | 56 + eo/tutorial/html/eoOutput.html | 19 + eo/tutorial/html/eoProgramming.html | 256 ++++ eo/tutorial/html/eoRepresentation.html | 19 + eo/tutorial/html/eoSGA.html | 157 ++ eo/tutorial/html/eoSelect.html | 19 + eo/tutorial/html/eoStop.html | 25 + eo/tutorial/html/eoTopDown.html | 88 ++ eo/tutorial/html/eoTutorial.html | 178 +++ eo/tutorial/html/index.html | 178 +++ eo/tutorial/html/lesson1.ps | 1952 ++++++++++++++++++++++++ eo/tutorial/html/real_value.html | 56 + 48 files changed, 9174 insertions(+) create mode 100644 eo/tutorial/Lesson1/FirstBitGA.cpp create mode 100644 eo/tutorial/Lesson1/FirstRealGA.cpp create mode 100644 eo/tutorial/Lesson1/Makefile create mode 100644 eo/tutorial/Lesson1/exercise3.cpp create mode 100644 eo/tutorial/Lesson2/FirstBitEA.cpp create mode 100644 eo/tutorial/Lesson2/FirstRealEA.cpp create mode 100644 eo/tutorial/Lesson2/Makefile create mode 100644 eo/tutorial/Lesson2/binary_value.h create mode 100644 eo/tutorial/Lesson2/exercise3.cpp create mode 100644 eo/tutorial/Lesson2/real_value.h create mode 100644 eo/tutorial/Lesson3/Makefile create mode 100644 eo/tutorial/Lesson3/SecondBitEA.cpp create mode 100644 eo/tutorial/Lesson3/binary_value.h create mode 100644 eo/tutorial/Lesson3/exercise1.cpp create mode 100644 eo/tutorial/html/EA_tutorial.jpg create mode 100644 eo/tutorial/html/FirstBitEA.html create mode 100644 eo/tutorial/html/FirstBitGA.html create mode 100644 eo/tutorial/html/FirstRealEA.html create mode 100644 eo/tutorial/html/FirstRealGA.html create mode 100644 eo/tutorial/html/FirstRealGA_old.html create mode 100644 eo/tutorial/html/Firstmerge.html create mode 100644 eo/tutorial/html/NoWay.html create mode 100644 eo/tutorial/html/SecondBitEA.html create mode 100644 eo/tutorial/html/beige009.jpg create mode 100644 eo/tutorial/html/binary_value.html create mode 100644 eo/tutorial/html/costume.jpg create mode 100644 eo/tutorial/html/debut.html create mode 100644 eo/tutorial/html/eoBottomUp.html create mode 100644 eo/tutorial/html/eoEngine.html create mode 100644 eo/tutorial/html/eoEval.html create mode 100644 eo/tutorial/html/eoGeneration.html create mode 100644 eo/tutorial/html/eoInit.html create mode 100644 eo/tutorial/html/eoIo.html create mode 100644 eo/tutorial/html/eoLesson1.html create mode 100644 eo/tutorial/html/eoLesson2.html create mode 100644 eo/tutorial/html/eoLesson3.html create mode 100644 eo/tutorial/html/eoOperators.html create mode 100644 eo/tutorial/html/eoOutput.html create mode 100644 eo/tutorial/html/eoProgramming.html create mode 100644 eo/tutorial/html/eoRepresentation.html create mode 100644 eo/tutorial/html/eoSGA.html create mode 100644 eo/tutorial/html/eoSelect.html create mode 100644 eo/tutorial/html/eoStop.html create mode 100644 eo/tutorial/html/eoTopDown.html create mode 100644 eo/tutorial/html/eoTutorial.html create mode 100644 eo/tutorial/html/index.html create mode 100644 eo/tutorial/html/lesson1.ps create mode 100644 eo/tutorial/html/real_value.html diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp new file mode 100644 index 000000000..db7dc22cd --- /dev/null +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -0,0 +1,164 @@ +//----------------------------------------------------------------------------- +// FirstBitGA.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Bitstring Genetic Algorithm +// +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +// the general include for eo + +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoBin Indi; // A bitstring with fitness double + +// EVAL +//----------------------------------------------------------------------------- +// a simple fitness function that computes the number of ones of a bitstring +// @param _indi A biststring individual + +double binary_value(const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size(); i++) + sum += _indi[i]; + return sum; +} +// GENERAL +//----------------------------------------------------------------------------- +void main_function(int argc, char **argv) +{ +// PARAMETRES + // all parameters are hard-coded! + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + const unsigned int MAX_GEN = 100; // Maximum number of generation before STOP + const float CROSS_RATE = 0.8; // Crossover rate + const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation + const float MUT_RATE = 1.0; // mutation rate + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( binary_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // declare the population + eoPop pop; + // fill it! + for (unsigned int igeno=0; igeno select(T_SIZE); // T_SIZE in [2,POP_SIZE] + +// REPLACE + // The simple GA evolution engine uses generational replacement + // so no replacement procedure is needed + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point mutation for bitstring + eoBinCrossover xover; +// MUTATION + // standard bit-flip mutation for bitstring + eoBinMutation mutation(P_MUT_PER_BIT); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination condition + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue continuator(MAX_GEN); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard Generational GA requires as parameters + // selection, evaluation, crossover and mutation, stopping criterion + + + eoSGA gga(select, xover, CROSS_RATE, mutation, MUT_RATE, + eval, continuator); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + // A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp new file mode 100644 index 000000000..ff1cadd3d --- /dev/null +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -0,0 +1,165 @@ +//----------------------------------------------------------------------------- +// FirstRealGA.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Real-coded Genetic Algorithm +// +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +// the general include for eo + +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals + typedef eoReal Indi; + +// EVAL +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +// @param _indi A real-valued individual + +double real_value(const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size(); i++) + sum += _indi[i]*_indi[i]; + return (-sum); // maximizing only +} +// GENERAL +//----------------------------------------------------------------------------- +void main_function(int argc, char **argv) +{ +// PARAMETRES + // all parameters are hard-coded! + const unsigned int SEED = 42; // seed for random number generator + const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes + const unsigned int POP_SIZE = 20; // Size of population + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const float CROSS_RATE = 0.8; // Crossover rate + const double EPSILON = 0.01; // range for real uniform mutation + const float MUT_RATE = 0.5; // mutation rate + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( real_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // declare the population + eoPop pop; + // fill it! + for (unsigned int igeno=0; igeno select(T_SIZE); // T_SIZE in [2,POP_SIZE] + +// REPLACE + // eoSGA uses generational replacement by default + // so no replacement procedure has to be given + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // offspring(i) is a linear combination of parent(i) + eoArithmeticCrossover xover; +// MUTATION + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + eoUniformMutation mutation(EPSILON); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination condition + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue continuator(MAX_GEN); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard Generational GA requires + // selection, evaluation, crossover and mutation, stopping criterion + + + eoSGA gga(select, xover, CROSS_RATE, mutation, MUT_RATE, + eval, continuator); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile new file mode 100644 index 000000000..396873dea --- /dev/null +++ b/eo/tutorial/Lesson1/Makefile @@ -0,0 +1,12 @@ +.cpp: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp + +firstGA = FirstRealGA FirstBitGA + +ALL = $(firstGA) exercise3 + +lesson1 : $(firstGA) + +clean : + @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson1/exercise3.cpp b/eo/tutorial/Lesson1/exercise3.cpp new file mode 100644 index 000000000..64ca5df01 --- /dev/null +++ b/eo/tutorial/Lesson1/exercise3.cpp @@ -0,0 +1,165 @@ +#include // runtime_error + +//----------------------------------------------------------------------------- +// FirstBitGA.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Bitstring Genetic Algorithm +// +//----------------------------------------------------------------------------- +// standard includes + +#include // cout +#include // ostrstream, istrstream + +// the general include for eo + +#include + +//----------------------------------------------------------------------------- +// define your individuals +typedef eoBin Indi; // A bitstring with fitness double + +//----------------------------------------------------------------------------- +/** a simple fitness function that computes the number of ones of a bitstring + @param _indi A biststring individual +*/ + +double binary_value(const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size(); i++) + sum += _indi[i]; + return sum; +} + +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ + const unsigned int SEED = 42; // seed for random number generator + const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const float CROSS_RATE = 0.8; // Crossover rate + const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation + const float MUT_RATE = 1.0; // mutation rate + + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( binary_value ); + + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // declare the population + eoPop pop; + // fill it! + for (unsigned int igeno=0; igeno select; + + // could also use stochastic binary tournament selection + // + // const double RATE = 0.75; + // eoStochTournament select(RATE); // RATE in ]0.5,1] + // The robust tournament selection + const unsigned int T_SIZE = 3; // size for tournament selection + eoDetTournament select(T_SIZE); // T_SIZE in [2,POP_SIZE] + + // and of course the random selection + // eoSelectRandom select; + + // The simple GA evolution engine uses generational replacement + // so no replacement procedure is needed + + ////////////////////////////////////// + // termination condition + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue continuator(MAX_GEN); + + + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// + // standard bit-flip mutation for bitstring + eoBinMutation mutation(P_MUT_PER_BIT); + // 1-point mutation for bitstring + eoBinCrossover xover; + + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard Generational GA requires as parameters + // selection, evaluation, crossover and mutation, stopping criterion + + + eoSGA gga(select, xover, CROSS_RATE, mutation, MUT_RATE, + eval, continuator); + + // Apply algo to pop - that's it! + gga(pop); + + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp new file mode 100644 index 000000000..0d82a78fa --- /dev/null +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -0,0 +1,193 @@ +//----------------------------------------------------------------------------- +// FirstBitEA.cpp +//----------------------------------------------------------------------------- +//* +// Still an instance of a VERY simple Bitstring Genetic Algorithm +// (see FirstBitGA.cpp) but now with Breeder - and Combined Ops +// +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +// the general include for eo +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoBin Indi; // A bitstring with fitness double + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the number of ones of a bitstring +// Now in a separate file, and declared as binary_value(const vector &) + +#include "binary_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const unsigned int MIN_GEN = 10; // Minimum number of generation before ... + const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent + + const double P_CROSS = 0.8; // Crossover probability + const double P_MUT = 1.0; // mutation probability + + const double P_MUT_PER_BIT = 0.01; // internal probability for bit-flip mutation + // some parameters for chosing among different operators + const double onePointRate = 0.5; // rate for 1-pt Xover + const double twoPointsRate = 0.5; // rate for 2-pt Xover + const double URate = 0.5; // rate for Uniform Xover + const double bitFlipRate = 0.5; // rate for bit-flip mutation + const double oneBitRate = 0.5; // rate for one-bit mutation + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > eval( binary_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // based on boolean_generator class (see utils/rnd_generator.h) + eoInitFixedLength + random(VEC_SIZE, boolean_generator()); + // Initialization of the population + eoPop pop(POP_SIZE, random); + + // and evaluate it in one loop + apply(eval, pop); // STL syntax + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournament selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoNoReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eoBinCrossover xover1; + // uniform crossover for bitstring + eoBinUxOver xoverU; + // 2-pots xover + eoBinNxOver xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBinMutation mutationBitFlip(P_MUT_PER_BIT); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, P_CROSS, mutation, P_MUT); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination conditions: use more than one + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue genCont(MAX_GEN); + // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement + eoSteadyFitContinue steadyCont(MIN_GEN, STEADY_GEN); + // stop when fitness reaches a target (here VEC_SIZE) + eoFitContinue fitCont(VEC_SIZE); + // do stop when one of the above says so + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(continuator, eval, select, transform, replace); + + // Apply algo to pop - that's it! + cout << "\n Here we go\n\n"; + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp new file mode 100644 index 000000000..1d6979776 --- /dev/null +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -0,0 +1,188 @@ +//----------------------------------------------------------------------------- +// FirstRealEA.cpp +//----------------------------------------------------------------------------- +//* +// Still an instance of a VERY simple Real-coded Genetic Algorithm +// (see FirstBitGA.cpp) but now with Breeder - and Combined Ops +// +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +// the general include for eo +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoReal Indi; + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +// Now in a separate file, and declared as binary_value(const vector &) + +#include "real_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes + const unsigned int POP_SIZE = 20; // Size of population + + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const unsigned int MIN_GEN = 10; // Minimum number of generation before ... + const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent + + const float P_CROSS = 0.8; // Crossover probability + const float P_MUT = 0.5; // mutation probability + + const double EPSILON = 0.01; // range for real uniform mutation + // some parameters for chosing among different operators + const double segmentRate = 0.5; // rate for 1-pt Xover + const double arithmeticRate = 0.5; // rate for 2-pt Xover + const double uniformMutRate = 0.5; // rate for bit-flip mutation + const double detMutRate = 0.5; // rate for one-bit mutation + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > eval( real_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // based on a uniform generator + eoInitFixedLength > + random(VEC_SIZE, uniform_generator(-1.0, 1.0)); + // Initialization of the population + eoPop pop(POP_SIZE, random); + + // and evaluate it in one loop + apply(eval, pop); // STL syntax + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournament selectOne(T_SIZE); + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoNoReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // uniform chooce on segment made by the parents + eoSegmentCrossover xoverS; + // uniform choice in hypercube built by the parents + eoArithmeticCrossover xoverA; + // Combine them with relative rates + eoPropCombinedQuadOp xover(xoverS, segmentRate); + xover.add(xoverA, arithmeticRate, true); + +// MUTATION + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + eoUniformMutation mutationU(EPSILON); + // k (=1) coordinates of parents are uniformly modified + eoDetUniformMutation mutationD(EPSILON); + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationU, uniformMutRate); + mutation.add(mutationD, detMutRate, true); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination conditions: use more than one + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue genCont(MAX_GEN); + // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement + eoSteadyFitContinue steadyCont(MIN_GEN, STEADY_GEN); + // stop when fitness reaches a target (here VEC_SIZE) + eoFitContinue fitCont(0); + // do stop when one of the above says so + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, P_CROSS, mutation, P_MUT); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(continuator, eval, select, transform, replace); + + // Apply algo to pop - that's it! + cout << "\n Here we go\n\n"; + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile new file mode 100644 index 000000000..75b3a2ec4 --- /dev/null +++ b/eo/tutorial/Lesson2/Makefile @@ -0,0 +1,12 @@ +.cpp: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp + +firstEA = FirstRealEA FirstBitEA + +ALL = $(firstEA) exercise1 exercise2 exercise3 + +lesson2 : $(firstEA) + +clean : + @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson2/binary_value.h b/eo/tutorial/Lesson2/binary_value.h new file mode 100644 index 000000000..a31c08644 --- /dev/null +++ b/eo/tutorial/Lesson2/binary_value.h @@ -0,0 +1,17 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} + diff --git a/eo/tutorial/Lesson2/exercise3.cpp b/eo/tutorial/Lesson2/exercise3.cpp new file mode 100644 index 000000000..c8e7ab6c7 --- /dev/null +++ b/eo/tutorial/Lesson2/exercise3.cpp @@ -0,0 +1,195 @@ +//----------------------------------------------------------------------------- +// FirstBitEA.cpp +//----------------------------------------------------------------------------- +//* +// Still an instance of a VERY simple Bitstring Genetic Algorithm +// (see FirstBitGA.cpp) but now with Breeder - and Combined Ops +// +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +// the general include for eo +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoBin Indi; // A bitstring with fitness double + +// EVAL +//----------------------------------------------------------------------------- +// a simple fitness function that computes the number of ones of a bitstring +// Now in a separate file, and declared as binary_value(const vector &) + +#include "binary_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const unsigned int MIN_GEN = 10; // Minimum number of generation before ... + const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent + + const double P_CROSS = 0.8; // Crossover probability + const double P_MUT = 1.0; // mutation probability + + const double P_MUT_PER_BIT = 0.01; // internal probability for bit-flip mutation + // some parameters for chosing among different operators + const double onePointRate = 0.5; // rate for 1-pt Xover + const double twoPointsRate = 0.5; // rate for 2-pt Xover + const double URate = 0.5; // rate for Uniform Xover + const double bitFlipRate = 0.5; // rate for bit-flip mutation + const double oneBitRate = 0.5; // rate for one-bit mutation + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > eval( binary_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // based on boolean_generator class (see utils/rnd_generator.h) + eoInitFixedLength + random(VEC_SIZE, boolean_generator()); + // Initialization of the population + eoPop pop(POP_SIZE, random); + + // and evaluate it in one loop + apply(eval, pop); // STL syntax + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournament selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + // solution solution solution solution solution solution solution + // modify the rate in the constructor + eoSelectPerc select(selectOne,2.0);// rate is second arg. + +// REPLACE + // solution solution solution solution solution solution solution + // eoCommaReplacement keeps the best among offspring + // eoPlusReplacement keeps the best among parents + offspring + // eoCommaReplacement replace; + eoPlusReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eoBinCrossover xover1; + // uniform crossover for bitstring + eoBinUxOver xoverU; + // 2-pots xover + eoBinNxOver xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBinMutation mutationBitFlip(P_MUT_PER_BIT); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, P_CROSS, mutation, P_MUT); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination conditions: use more than one + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue genCont(MAX_GEN); + // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement + eoSteadyFitContinue steadyCont(MIN_GEN, STEADY_GEN); + // stop when fitness reaches a target (here VEC_SIZE) + eoFitContinue fitCont(VEC_SIZE); + // do stop when one of the above says so + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(continuator, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson2/real_value.h b/eo/tutorial/Lesson2/real_value.h new file mode 100644 index 000000000..17d96ede0 --- /dev/null +++ b/eo/tutorial/Lesson2/real_value.h @@ -0,0 +1,18 @@ +#include +//----------------------------------------------------------------------------- +/** Just a simple function that takes an vector and sets the fitnes + to the sphere function. Please use doubles not float!!! + @param _ind A floatingpoint vector +*/ + +// INIT +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + sum += _ind[i] * _ind[i]; + return -sum; +} + + + diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile new file mode 100644 index 000000000..c4d3ec8e2 --- /dev/null +++ b/eo/tutorial/Lesson3/Makefile @@ -0,0 +1,12 @@ +.cpp: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp + +secondEA = SecondBitEA + +ALL = $(secondEA) exercise1 exercise2 exercise3 + +lesson3 : $(secondEA) + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp new file mode 100644 index 000000000..457346a27 --- /dev/null +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -0,0 +1,375 @@ +//----------------------------------------------------------------------------- +// SecondGA.cpp +//----------------------------------------------------------------------------- +//* +// Same code than FirstBitEA as far as Evolutionary Computation is concerned +// but now you learn to enter the parameters in a more flexible way +// and to twidle the output to your preferences! +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream +#include + +// the general include for eo +#include + +// EVAL +#include "binary_value.h" + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your genotype and fitness types +typedef eoBin Indi; + +// PARAMETRES +//----------------------------------------------------------------------------- +// instead of having all values of useful parameters as constants, read them: +// either on the command line (--option=value or -o=value) +// or in a parameter file (same syntax, order independent, +// # = usual comment character +// or in the environment (TODO) + +// note that the parameters are passed by reference so they can be updated +void read_param(int argc, char *argv[], + uint32 & _seed, + unsigned int & _vecSize, + unsigned int & _popSize, + unsigned int & _tSize, + double & _pCross, + double & _pMut, + string & _load_name, + unsigned int & _maxGen, + unsigned int & _minGen, + unsigned int & _steadyGen, + double & _onePointRate, + double & _twoPointsRate, + double & _uRate, + double & _pMutPerBit, + double & _bitFlipRate, + double & _oneBitRate + ) +{ + // define a parser from the command-line arguments + eoParser parser(argc, argv); + + // For each parameter, define Parameters directly in the parser, + // and assign the value to the variable + eoValueParam& seedParam = parser.createParam(time(0), "seed", "Random number seed", 'S'); + _seed = seedParam.value(); + + eoValueParam& vecSizeParam = parser.createParam(8, "vecSize", "Genotype size",'V', "Representation"); + _vecSize = vecSizeParam.value(); + + eoValueParam& popSizeParam = parser.createParam(10, "popSize", "Population size",'P', "Evolution"); + _popSize = popSizeParam.value(); + + eoValueParam& tSizeParam = parser.createParam(10, "tSize", "Tournament size",'T', "Evolution"); + _tSize = tSizeParam.value(); + + eoValueParam& load_nameParam = parser.createParam("", "Load","A save file to restart from",'L', "Persistence"); + _load_name = load_nameParam.value(); + + eoValueParam& maxGenParam = parser.createParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); + _maxGen = maxGenParam.value(); + + eoValueParam& minGenParam = parser.createParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); + _minGen = minGenParam.value(); + + eoValueParam& steadyGenParam = parser.createParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + _steadyGen = steadyGenParam.value(); + + eoValueParam& pCrossParam = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); + _pCross = pCrossParam.value(); + + eoValueParam& pMutParam = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); + _pMut = pMutParam.value(); + + eoValueParam& onePointRateParam = parser.createParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); + _onePointRate = onePointRateParam.value(); + + eoValueParam& twoPointsRateParam = parser.createParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); + _twoPointsRate = twoPointsRateParam.value(); + + eoValueParam& uRateParam = parser.createParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); + _uRate = uRateParam.value(); + + eoValueParam& pMutPerBitParam = parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); + _pMutPerBit = pMutPerBitParam.value(); + + eoValueParam& bitFlipRateParam = parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); + _bitFlipRate = bitFlipRateParam.value(); + + eoValueParam& oneBitRateParam = parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); + _oneBitRate = oneBitRateParam.value(); + + // the name of the "status" file where all actual parameter values will be saved + string str_status = parser.ProgramName() + ".status"; + eoValueParam& status_nameParam = parser.createParam(str_status.c_str(), "status","Status file",'S', "Persistence"); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + if (status_nameParam.value() != "") + { + ofstream os(status_nameParam.value().c_str()); + os << parser; // and you can use that file as parameter file + } +} + +// GENERAL +// now the main_function: nothing changed, except input/output +void main_function(int argc, char **argv) +{ +// PARAMETRES + uint32 seed; + // decription of genotype + unsigned int vecSize; + // parameters for evolution engine + unsigned int popSize; + unsigned int tSize; + // operators probabilities at the algorithm level + double pCross; + double pMut; + // init and stop + string load_name; + unsigned int maxGen; + unsigned int minGen; + unsigned int steadyGen; + // rates for crossovers + double onePointRate; + double twoPointsRate; + double URate; + // rates and private parameters for mutations; + double pMutPerBit; + double bitFlipRate; + double oneBitRate; + + // Now read the parameters of the program + read_param(argc, argv, seed, vecSize, popSize, tSize, + pCross, pMut, load_name, maxGen, minGen, steadyGen, + onePointRate, twoPointsRate, URate, + pMutPerBit, bitFlipRate, oneBitRate ); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object ... + eoEvalFuncPtr& > plainEval( binary_value ); + // ... to an object that counts the nb of actual evaluations + eoEvalFuncCounter eval(plainEval); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // Either load or initialize + // create an empty pop + eoPop pop; + // create a state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact conitnuation of the saved run + // eventually with different parameters + inState.registerObject(rng); + inState.registerObject(pop); + + if (load_name != "") + { + inState.load(load_name); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + } + else + { + rng.reseed(seed); + // a Indi random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoInitFixedLength + random(vecSize, boolean_generator()); + + // Init pop from the randomizer: need to use the append function + pop.append(popSize, random); + // and evaluate pop (STL syntax) + apply(eval, pop); + } // end of initializatio of the population + +// OUTPUT + // sort pop for pretty printout + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl << pop << endl; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournament selectOne(tSize); // tSize in [2,POPSIZE] + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoNoReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eoBinCrossover xover1; + // uniform crossover for bitstring + eoBinUxOver xoverU; + // 2-pots xover + eoBinNxOver xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBinMutation mutationBitFlip(pMutPerBit); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, pCross, mutation, pMut); + +// STOP + ////////////////////////////////////// + // termination condition see FirstBitEA.cpp + ///////////////////////////////////// + eoGenContinue genCont(maxGen); + eoSteadyFitContinue steadyCont(minGen, steadyGen); + eoFitContinue fitCont(vecSize); + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + +// CHECKPOINT + // but now you want to make many different things every generation + // (e.g. statistics, plots, ...). + // the class eoCheckPoint is dedicated to just that: + + // Declare a checkpoint (from a continuator: an eoCheckPoint + // IS AN eoContinue and will be called in the loop of all algorithms) + eoCheckPoint checkpoint(continuator); + + // Create a counter parameter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkpoint.add(increment); + + // now some statistics on the population: + // Best fitness in population + eoBestFitnessStat bestStat; + // Second moment stats: average and stdev + eoSecondMomentStats SecondStat; + + // Add them to the checkpoint to get them called at the appropriate time + checkpoint.add(bestStat); + checkpoint.add(SecondStat); + + // The Stdout monitor will print parameters to the screen ... + eoStdoutMonitor monitor(false); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(generationCounter); + monitor.add(eval); // because now eval is an eoEvalFuncCounter! + monitor.add(bestStat); + monitor.add(SecondStat); + + // A file monitor: will print parameters to ... a File, yes, you got it! + eoFileMonitor fileMonitor("stats.xg", " "); + + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(fileMonitor); + + // the fileMonitor can monitor parameters, too, but you must tell it! + fileMonitor.add(generationCounter); + fileMonitor.add(bestStat); + fileMonitor.add(SecondStat); + + // Last type of item the eoCheckpoint can handle: state savers: + eoState outState; + // Register the algorithm into the state (so it has something to save!!) + outState.registerObject(rng); + outState.registerObject(pop); + + // and feed the state to state savers + // save state every 100th generation + eoCountedStateSaver stateSaver1(100, outState, "generation"); + // save state every 1 seconds + eoTimedStateSaver stateSaver2(1, outState, "time"); + + // Don't forget to add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + // and that's it for the (control and) output + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(checkpoint, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/Lesson3/binary_value.h b/eo/tutorial/Lesson3/binary_value.h new file mode 100644 index 000000000..a31c08644 --- /dev/null +++ b/eo/tutorial/Lesson3/binary_value.h @@ -0,0 +1,17 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} + diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise1.cpp new file mode 100644 index 000000000..984395302 --- /dev/null +++ b/eo/tutorial/Lesson3/exercise1.cpp @@ -0,0 +1,384 @@ +//----------------------------------------------------------------------------- +// SecondBitGA.cpp +//----------------------------------------------------------------------------- +//* +// Same code than FirstBitEA as far as Evolutionary Computation is concerned +// but now you learn to enter the parameters in a more flexible way +// and to twidle the output to your preferences! +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream +#include + +// the general include for eo +#include +#include + +// EVAL +#include "binary_value.h" + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your genotype and fitness types +typedef eoBin Indi; + +// PARAMETRES +//----------------------------------------------------------------------------- +// instead of having all values of useful parameters as constants, read them: +// either on the command line (--option=value or -o=value) +// or in a parameter file (same syntax, order independent, +// # = usual comment character +// or in the environment (TODO) + +// note that the parameters are passed by reference so they can be updated +void read_param(int argc, char *argv[], + uint32 & _seed, + unsigned int & _vecSize, + unsigned int & _popSize, + unsigned int & _tSize, + double & _pCross, + double & _pMut, + string & _load_name, + unsigned int & _maxGen, + unsigned int & _minGen, + unsigned int & _steadyGen, + double & _onePointRate, + double & _twoPointsRate, + double & _uRate, + double & _pMutPerBit, + double & _bitFlipRate, + double & _oneBitRate + ) +{ + // define a parser from the command-line arguments + eoParser parser(argc, argv); + + // For each parameter, define Parameters directly in the parser, + // and assign the value to the variable + eoValueParam& seedParam = parser.createParam(time(0), "seed", "Random number seed", 'S'); + _seed = seedParam.value(); + + eoValueParam& vecSizeParam = parser.createParam(8, "vecSize", "Genotype size",'V', "Representation"); + _vecSize = vecSizeParam.value(); + + eoValueParam& popSizeParam = parser.createParam(10, "popSize", "Population size",'P', "Evolution"); + _popSize = popSizeParam.value(); + + eoValueParam& tSizeParam = parser.createParam(10, "tSize", "Tournament size",'T', "Evolution"); + _tSize = tSizeParam.value(); + + eoValueParam& load_nameParam = parser.createParam("", "Load","A save file to restart from",'L', "Persistence"); + _load_name = load_nameParam.value(); + + eoValueParam& maxGenParam = parser.createParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); + _maxGen = maxGenParam.value(); + + eoValueParam& minGenParam = parser.createParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); + _minGen = minGenParam.value(); + + eoValueParam& steadyGenParam = parser.createParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + _steadyGen = steadyGenParam.value(); + + eoValueParam& pCrossParam = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); + _pCross = pCrossParam.value(); + + eoValueParam& pMutParam = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); + _pMut = pMutParam.value(); + + eoValueParam& onePointRateParam = parser.createParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); + _onePointRate = onePointRateParam.value(); + + eoValueParam& twoPointsRateParam = parser.createParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); + _twoPointsRate = twoPointsRateParam.value(); + + eoValueParam& uRateParam = parser.createParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); + _uRate = uRateParam.value(); + + eoValueParam& pMutPerBitParam = parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); + _pMutPerBit = pMutPerBitParam.value(); + + eoValueParam& bitFlipRateParam = parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); + _bitFlipRate = bitFlipRateParam.value(); + + eoValueParam& oneBitRateParam = parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); + _oneBitRate = oneBitRateParam.value(); + + // the name of the "status" file where all actual parameter values will be saved + string str_status = parser.ProgramName() + ".status"; + eoValueParam& status_nameParam = parser.createParam(str_status.c_str(), "status","Status file",'S', "Persistence"); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + if (status_nameParam.value() != "") + { + ofstream os(status_nameParam.value().c_str()); + os << parser; // and you can use that file as parameter file + } +} + +// GENERAL +// now the main_function: nothing changed, except input/output +void main_function(int argc, char **argv) +{ +// PARAMETRES + uint32 seed; + // decription of genotype + unsigned int vecSize; + // parameters for evolution engine + unsigned int popSize; + unsigned int tSize; + // operators probabilities at the algorithm level + double pCross; + double pMut; + // init and stop + string load_name; + unsigned int maxGen; + unsigned int minGen; + unsigned int steadyGen; + // rates for crossovers + double onePointRate; + double twoPointsRate; + double URate; + // rates and private parameters for mutations; + double pMutPerBit; + double bitFlipRate; + double oneBitRate; + + // Now read the parameters of the program + read_param(argc, argv, seed, vecSize, popSize, tSize, + pCross, pMut, load_name, maxGen, minGen, steadyGen, + onePointRate, twoPointsRate, URate, + pMutPerBit, bitFlipRate, oneBitRate ); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object ... + eoEvalFuncPtr& > plainEval( binary_value ); + // ... to an object that counts the nb of actual evaluations + eoEvalFuncCounter eval(plainEval); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // Either load or initialize + // create an empty pop + eoPop pop; + // create a state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact conitnuation of the saved run + // eventually with different parameters + inState.registerObject(rng); + inState.registerObject(pop); + + if (load_name != "") + { + inState.load(load_name); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + } + else + { + rng.reseed(seed); + // a Indi random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoInitFixedLength + random(vecSize, boolean_generator()); + + // Init pop from the randomizer: need to use the append function + pop.append(popSize, random); + // and evaluate pop (STL syntax) + apply(eval, pop); + } // end of initializatio of the population + +// OUTPUT + // sort pop for pretty printout + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl << pop << endl; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournament selectOne(tSize); // tSize in [2,POPSIZE] + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoNoReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eoBinCrossover xover1; + // uniform crossover for bitstring + eoBinUxOver xoverU; + // 2-pots xover + eoBinNxOver xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBinMutation mutationBitFlip(pMutPerBit); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, pCross, mutation, pMut); + +// STOP + ////////////////////////////////////// + // termination condition see FirstBitEA.cpp + ///////////////////////////////////// + eoGenContinue genCont(maxGen); + eoSteadyFitContinue steadyCont(minGen, steadyGen); + eoFitContinue fitCont(vecSize); + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + +// CHECKPOINT + // but now you want to make many different things every generation + // (e.g. statistics, plots, ...). + // the class eoCheckPoint is dedicated to just that: + + // Declare a checkpoint (from a continuator: an eoCheckPoint + // IS AN eoContinue and will be called in the loop of all algorithms) + eoCheckPoint checkpoint(continuator); + + // Create a counter parameter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkpoint.add(increment); + + // now some statistics on the population: + // Best fitness in population + eoBestFitnessStat bestStat; + eoAverageStat averageStat; + // Second moment stats: average and stdev + eoSecondMomentStats SecondStat; + + // Add them to the checkpoint to get them called at the appropriate time + checkpoint.add(bestStat); + checkpoint.add(averageStat); + checkpoint.add(SecondStat); + + // The Stdout monitor will print parameters to the screen ... + eoStdoutMonitor monitor(false); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(generationCounter); + monitor.add(eval); // because now eval is an eoEvalFuncCounter! + monitor.add(bestStat); + monitor.add(SecondStat); + + // A file monitor: will print parameters to ... a File, yes, you got it! + eoFileMonitor fileMonitor("stats.xg", " "); + eoGnuplot1DMonitor gnuMonitor("best_average.xg"); + + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(fileMonitor); + checkpoint.add(gnuMonitor); + + // the fileMonitor can monitor parameters, too, but you must tell it! + fileMonitor.add(generationCounter); + fileMonitor.add(bestStat); + fileMonitor.add(SecondStat); + // the fileMonitor can monitor parameters, too, but you must tell it! + gnuMonitor.add(eval); + gnuMonitor.add(bestStat); + gnuMonitor.add(averageStat); + + // Last type of item the eoCheckpoint can handle: state savers: + eoState outState; + // Register the algorithm into the state (so it has something to save!!) + outState.registerObject(rng); + outState.registerObject(pop); + + // and feed the state to state savers + // save state every 100th generation + eoCountedStateSaver stateSaver1(100, outState, "generation"); + // save state every 1 seconds + eoTimedStateSaver stateSaver2(1, outState, "time"); + + // Don't forget to add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + // and that's it for the (control and) output + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(checkpoint, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/html/EA_tutorial.jpg b/eo/tutorial/html/EA_tutorial.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4a63e1ec75f73531eda46eaede45206f7b5a1cfe GIT binary patch literal 53765 zcmeFZ2UL^Ywl*3B>4G#tT2QKjAiXCd(nLf=dK2j&gx(GKukzTM0lN;h=_=UgqW0^_69i_8ToB$8cJFgMj$H-BQrA_2R}F4 zT|RbZW*+f-d=CXhL_~nxlCly)GW^0KLVq-ZM?ykEPDajf;|7D!9p*bi|K%696+lId zH+(GvAMY;U8WkQs6&|(&00aQ=uH#1g$AJIu7v42|g6o7t#3ZC-xC+%b0oU;G@vjl! zU%yU3fUE6?yAB|rx=wvZP>zsB!<6W*6Rptun6Jd_kIUQWUJmbZ2)}U-AR)a)&v2WO zlZ%_@-hB~KF>wh=DfuS~ib~2VPc>g@Y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Wf@j4tU*=4O;_4k0YUBnvf>Z)RB_itfArO8MQqIj zAnq*wfP}@X(-J}=vs9H=)YL*SNaV*j&O?tq)q$e%7Mn=Pw6qDaB$K#^8ze?Z`-Rn- zOnCS;T)X%J-Bwrb|48YB|BRB0j|cv4n=AK2CKt(rSx<3PLYg2Q(#=jHZ%LKTi1AMj zUE_PPvdb@u4f?xDn8WCJZC%gB+RV&$Tjcm1uT9MULaW2{>7U0wfXy!(YTJH}eL&?< z$Gs + + + + + FirstBitEA.cpp + + + +Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+FirstBitEA.cpp

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// FirstBitEA.cpp
+//-----------------------------------------------------------------------------
+//*
+// Still an instance of a VERY simple Bitstring Genetic Algorithm
+// (see FirstBitGA.cpp) but now with  Breeder - and Combined Ops
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// define your individuals
+typedef eoBin<double> Indi; // A bitstring with fitness double
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the number of ones of a bitstring
+// Now in a separate file, and declared as binary_value(const vector<bool> &)
+#include "binary_value.h"
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +  const unsigned int SEED = 42; // seed for random number generator
+  const unsigned int T_SIZE = 3; // size for tournament selection
+  const unsigned int VEC_SIZE = 8; // Number of bits in genotypes
+  const unsigned int POP_SIZE = 20; // Size of population
+  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
+  const float CROSS_RATE = 0.8; // Crossover rate
+  const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation
+  const float MUT_RATE = 1.0; // mutation rate
+  // some parameters for chosing among different operators
+  const double onePointRate = 0.5;        // rate for 1-pt Xover
+  const double twoPointsRate = 0.5;        // rate for 2-pt Xover
+  const double URate = 0.5;                      // rate for Uniform Xover
+  const double bitFlipRate = 0.5;          // rate for bit-flip mutation
+  const double oneBitRate = 0.5;            // rate for one-bit mutation
+
+
+ + + + +
+ +  //////////////////////////
+  //  Random seed
+  //////////////////////////
+  //reproducible random seed: if you don't change SEED above,
+  // you'll aways get the same result, NOT a random run
+  rng.reseed(SEED);
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  // you need to give the full description of the function
+  eoEvalFuncPtr<Indi, double, const vector<bool>& > eval(  binary_value );
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // based on boolean_generator class (see utils/rnd_generator.h)
+  eoInitFixedLength<Indi, boolean_generator>
+      random(VEC_SIZE, boolean_generator());
+  // Initialization of the population
+  eoPop<Indi> pop(POP_SIZE, random);
+  // and evaluate it in one loop
+  apply<Indi>(eval, pop); // STL syntax
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournament<Indi> selectOne(T_SIZE);            // T_SIZE in [2,POP_SIZE]
+ +  // is now encapsulated in a eoSelectPerc (entage)
+  eoSelectPerc<Indi> select(selectOne);// by default rate==1
+
+
+ + + + +
+ +  // And we now have the full slection/replacement - though with
+  // no replacement (== generational replacement) at the moment :-)
+  eoNoReplacement<Indi> replace;
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // 1-point crossover for bitstring
+  eoBinCrossover<Indi> xover1;
+  // uniform crossover for bitstring
+  eoBinUxOver<Indi> xoverU;
+  // 2-pots xover
+  eoBinNxOver<Indi> xover2(2);
+  // Combine them with relative rates
+  eoPropCombinedQuadOp<Indi> xover(xover1, onePointRate);
+  xover.add(xoverU, URate);
+  xover.add(xover2, twoPointsRate, true);
+
+
+ + + + +
+ +  
+  // standard bit-flip mutation for bitstring
+  eoBinMutation<Indi>  mutationBitFlip(P_MUT_PER_BIT);
+  // mutate exactly 1 bit per individual
+  eoDetBitFlip<Indi> mutationOneBit;
+  // Combine them with relative rates
+  eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, bitFlipRate);
+  mutation.add(mutationOneBit, oneBitRate, true);
+  
+ +  // The operators are  encapsulated into an eoTRansform object
+  eoSGATransform<Indi> transform(xover, CROSS_RATE, mutation, MUT_RATE);
+
+
+ + + + +
+ + +
+ + + + +
+ +  //////////////////////////////////////
+  // termination conditions: use more than one
+  /////////////////////////////////////
+  // stop after MAX_GEN generations
+  eoGenContinue<Indi> genCont(MAX_GEN);
+  // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement
+  eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, STEADY_GEN);
+  // stop when fitness reaches a target (here VEC_SIZE)
+  eoFitContinue<Indi> fitCont(0);
+  // do stop when one of the above says so
+  eoCombinedContinue<Indi> continuator(genCont);
+  continuator.add(steadyCont);
+  continuator.add(fitCont);
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // Easy EA requires
+  // selection, transformation, eval, replacement, and stopping criterion
+  eoEasyEA<Indi> gga(continuator, eval, select, transform, replace);
+  // Apply algo to pop - that's it!
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+// A main that catches the exceptions
+int main(int argc, char **argv)
+{
+#ifdef _MSC_VER
+  //  rng.reseed(42);
+      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+      _CrtSetDbgFlag(flag);
+//    _CrtSetBreakAlloc(100);
+#endif
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Sun Nov 19 22:26:27 2000 + + + diff --git a/eo/tutorial/html/FirstBitGA.html b/eo/tutorial/html/FirstBitGA.html new file mode 100644 index 000000000..05e859e92 --- /dev/null +++ b/eo/tutorial/html/FirstBitGA.html @@ -0,0 +1,350 @@ + + + + + + FirstBitGA.html + + + +Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+FirstBitGA.html

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// FirstBitGA.cpp
+//-----------------------------------------------------------------------------
+//*
+// An instance of a VERY simple Bitstring Genetic Algorithm
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// define your individuals
+typedef eoBin<double> Indi;        // A bitstring with fitness double
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the number of ones of a bitstring
+//  @param _indi A biststring individual
+ +double binary_value(const Indi & _indi)
+{
+  double sum = 0;
+  for (unsigned i = 0; i < _indi.size(); i++)
+      sum += _indi[i];
+  return sum;
+}
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +  // all parameters are hard-coded!
+  const unsigned int SEED = 42;          // seed for random number generator
+  const unsigned int T_SIZE = 3;        // size for tournament selection
+  const unsigned int VEC_SIZE = 8;    // Number of bits in genotypes
+  const unsigned int POP_SIZE = 20;  // Size of population
+  const unsigned int MAX_GEN = 100;  // Maximum number of generation before STOP
+  const float CROSS_RATE = 0.8;          // Crossover rate
+  const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation
+  const float MUT_RATE = 1.0;              // mutation rate
+
+
+ + + + +
+ + +  //////////////////////////
+  //  Random seed
+  //////////////////////////
+  //reproducible random seed: if you don't change SEED above,
+  // you'll aways get the same result, NOT a random run
+  rng.reseed(SEED);
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  eoEvalFuncPtr<Indi> eval(  binary_value );
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // declare the population
+  eoPop<Indi> pop;
+  // fill it!
+  for (unsigned int igeno=0; igeno<POP_SIZE; igeno++)
+      {
+          Indi v;                    // void individual, to be filled
+          for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
+              {
+                  bool r = rng.flip(); // new value, random in {0,1}
+                  v.push_back(r);          // append that random value to v
+              }
+          eval(v);                                // evaluate it
+          pop.push_back(v);              // and put it in the population
+      }
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournament<Indi> select(T_SIZE);  // T_SIZE in [2,POP_SIZE]
+
+
+ + + + +
+ +  // The simple GA evolution engine uses generational replacement
+  // so no replacement procedure is needed
+
+
+ + + + +
+ + +
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // 1-point mutation for bitstring
+  eoBinCrossover<Indi> xover;
+
+
+ + + + +
+ +  
+  // standard bit-flip mutation for bitstring
+  eoBinMutation<Indi>  mutation(P_MUT_PER_BIT);
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // termination condition
+  /////////////////////////////////////
+  // stop after MAX_GEN generations
+  eoGenContinue<Indi> continuator(MAX_GEN);
+  
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // standard Generational GA requires as parameters
+  // selection, evaluation, crossover and mutation, stopping criterion
+
+  eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
+                                  eval, continuator);
+  // Apply algo to pop - that's it!
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+ // A main that catches the exceptions
+int main(int argc, char **argv)
+{
+#ifdef _MSC_VER
+  //  rng.reseed(42);
+      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+      _CrtSetDbgFlag(flag);
+//    _CrtSetBreakAlloc(100);
+#endif
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Sun Nov 19 08:31:26 2000 + + + diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html new file mode 100644 index 000000000..9b0372fd0 --- /dev/null +++ b/eo/tutorial/html/FirstRealEA.html @@ -0,0 +1,366 @@ + + + + + + FirstRealEA.cpp + + +Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+FirstRealEA.cpp

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// FirstRealEA.cpp
+//-----------------------------------------------------------------------------
+//*
+// Still an instance of a VERY simple Real-coded  Genetic Algorithm
+// (see FirstBitGA.cpp) but now with  Breeder - and Combined Ops
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// define your individuals
+typedef eoReal<double> Indi;
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the euclidian norm of a real vector
+// Now in a separate file, and declared as binary_value(const vector<bool> &)
+#include "real_value.h"
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +  const unsigned int SEED = 42; // seed for random number generator
+  const unsigned int T_SIZE = 3; // size for tournament selection
+  const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes
+  const unsigned int POP_SIZE = 20; // Size of population
+  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
+  const unsigned int MIN_GEN = 10;  // Minimum number of generation before ...
+  const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent
+  const float P_CROSS = 0.8; // Crossover probability
+  const float P_MUT = 0.5; // mutation probability
+  const double EPSILON = 0.01; // range for real uniform mutation
+  // some parameters for chosing among different operators
+  const double segmentRate = 0.5;        // rate for 1-pt Xover
+  const double arithmeticRate = 0.5;        // rate for 2-pt Xover
+  const double uniformMutRate = 0.5;          // rate for bit-flip mutation
+  const double detMutRate = 0.5;            // rate for one-bit mutation
+
+
+ + + + +
+ +  //////////////////////////
+  //  Random seed
+  //////////////////////////
+  //reproducible random seed: if you don't change SEED above,
+  // you'll aways get the same result, NOT a random run
+  rng.reseed(SEED);
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  // you need to give the full description of the function
+  eoEvalFuncPtr<Indi, double, const vector<double>& > eval(  real_value );
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // based on a uniform generator
+  eoInitFixedLength<Indi, uniform_generator<double> >
+          random(VEC_SIZE, uniform_generator<double>(-1.0, 1.0));
+    // Initialization of the population
+  eoPop<Indi> pop(POP_SIZE, random);
+
+  // and evaluate it in one loop
+  apply<Indi>(eval, pop); // STL syntax
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournament<Indi> selectOne(T_SIZE);
+ +  // is now encapsulated in a eoSelectPerc (entage)
+  eoSelectPerc<Indi> select(selectOne);// by default rate==1
+
+
+ + + + +
+ +  // And we now have the full slection/replacement - though with
+  // no replacement (== generational replacement) at the moment :-)
+  eoNoReplacement<Indi> replace;
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // uniform chooce on segment made by the parents
+  eoSegmentCrossover<Indi> xoverS;
+  // uniform choice in hypercube built by the parents
+  eoArithmeticCrossover<Indi> xoverA;
+  // Combine them with relative rates
+  eoPropCombinedQuadOp<Indi> xover(xoverS, segmentRate);
+  xover.add(xoverA, arithmeticRate, true);
+
+
+ + + + +
+ +  
+  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
+  eoUniformMutation<Indi>  mutationU(EPSILON);
+  // k (=1) coordinates of parents are uniformly modified
+  eoDetUniformMutation<Indi>  mutationD(EPSILON);
+  // Combine them with relative rates
+  eoPropCombinedMonOp<Indi> mutation(mutationU, uniformMutRate);
+  mutation.add(mutationD, detMutRate, true);
+  
+  // The operators are  encapsulated into an eoTRansform object
+  eoSGATransform<Indi> transform(xover, P_CROSS, mutation, P_MUT);
+
+
+ + + + +
+ + +
+ + + + +
+ +  //////////////////////////////////////
+  // termination conditions: use more than one
+  /////////////////////////////////////
+  // stop after MAX_GEN generations
+  eoGenContinue<Indi> genCont(MAX_GEN);
+  // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement
+  eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, STEADY_GEN);
+  // stop when fitness reaches a target (here VEC_SIZE)
+  eoFitContinue<Indi> fitCont(0);
+  // do stop when one of the above says so
+  eoCombinedContinue<Indi> continuator(genCont);
+  continuator.add(steadyCont);
+  continuator.add(fitCont);
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // Easy EA requires
+  // selection, transformation, eval, replacement, and stopping criterion
+  eoEasyEA<Indi> gga(continuator, eval, select, transform, replace);
+  // Apply algo to pop - that's it!
+  cout << "\n              Here we go\n\n";
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+// A main that catches the exceptions
+int main(int argc, char **argv)
+{
+#ifdef _MSC_VER
+  //  rng.reseed(42);
+      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+      _CrtSetDbgFlag(flag);
+//    _CrtSetBreakAlloc(100);
+#endif
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Wed Nov 29 07:38:36 2000 + + + diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html new file mode 100644 index 000000000..eaeecc284 --- /dev/null +++ b/eo/tutorial/html/FirstRealGA.html @@ -0,0 +1,349 @@ + + + + + + ../FirstRealGA.html + + + +Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+../FirstRealGA.html

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// FirstRealGA.cpp
+//-----------------------------------------------------------------------------
+//*
+// An instance of a VERY simple Real-coded Genetic Algorithm
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// define your individuals
+ typedef eoReal<double> Indi;
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the euclidian norm of a real vector
+//      @param _indi A real-valued individual
+ +double real_value(const Indi & _indi)
+{
+  double sum = 0;
+  for (unsigned i = 0; i < _indi.size(); i++)
+          sum += _indi[i]*_indi[i];
+  return (-sum);                      // maximizing only
+}
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +  // all parameters are hard-coded!
+  const unsigned int SEED = 42; // seed for random number generator
+  const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes
+  const unsigned int POP_SIZE = 20; // Size of population
+  const unsigned int T_SIZE = 3; // size for tournament selection
+  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
+  const float CROSS_RATE = 0.8; // Crossover rate
+  const double EPSILON = 0.01;  // range for real uniform mutation
+  const float MUT_RATE = 0.5;    // mutation rate
+
+
+ + + + +
+ + +  //////////////////////////
+  //  Random seed
+  //////////////////////////
+  //reproducible random seed: if you don't change SEED above,
+  // you'll aways get the same result, NOT a random run
+  rng.reseed(SEED);
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  eoEvalFuncPtr<Indi> eval(  real_value );
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // declare the population
+  eoPop<Indi> pop;
+  // fill it!
+  for (unsigned int igeno=0; igeno<POP_SIZE; igeno++)
+      {
+          Indi v;                  // void individual, to be filled
+          for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
+              {
+                  double r = 2*rng.uniform() - 1; // new value, random in [-1,1)
+                  v.push_back(r);            // append that random value to v
+              }
+          eval(v);                                  // evaluate it
+          pop.push_back(v);                // and put it in the population
+      }
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournament<Indi> select(T_SIZE);            // T_SIZE in [2,POP_SIZE]
+
+
+ + + + +
+ +  // eoSGA uses generational replacement by default
+  // so no replacement procedure has to be given
+
+
+ + + + +
+ + +
+ + + + +
+ +  //////////////////////////////////////
+  // termination condition
+  /////////////////////////////////////
+  // stop after MAX_GEN generations
+  eoGenContinue<Indi> continuator(MAX_GEN);
+  
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
+  eoUniformMutation<Indi>  mutation(EPSILON);
+
+
+ + + + +
+ +  // offspring(i) is a linear combination of parent(i)
+  eoArithmeticCrossover<Indi> xover;
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // standard Generational GA requires
+  // selection, evaluation, crossover and mutation, stopping criterion
+
+  eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
+                                    eval, continuator);
+  // Apply algo to pop - that's it!
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+// A main that catches the exceptions
+int main(int argc, char **argv)
+{
+#ifdef _MSC_VER
+  //  rng.reseed(42);
+      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+      _CrtSetDbgFlag(flag);
+//    _CrtSetBreakAlloc(100);
+#endif
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Sun Nov 19 08:31:29 2000 + + + diff --git a/eo/tutorial/html/FirstRealGA_old.html b/eo/tutorial/html/FirstRealGA_old.html new file mode 100644 index 000000000..0609d8c64 --- /dev/null +++ b/eo/tutorial/html/FirstRealGA_old.html @@ -0,0 +1,278 @@ + + + + + + First Real GA + + +Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+A First Real GA

+Click on the figure to see the corresponding code. Tutorial comments are +in variable length fonts, after the code. +
+

+ +

//----------------------------------------------------------------------------- +

#include +<stdexcept > // runtime_error +

//----------------------------------------------------------------------------- +
// FirstRealGA.cpp +
//----------------------------------------------------------------------------- +
//* +
// An instance of a +VERY simple Real-coded Genetic Algorithm +
// +
//----------------------------------------------------------------------------- +
// standard includes +

#include +<iostream>// cout +
#include +<strstream>// ostrstream, istrstream +

// the general include +for eo +

#include +<eo> +

// specific incluse, +as Real is not (yet) in the standard eo source dir +
#include +"eoeal.h" +
#include +"eoRealOp.h" +

//----------------------------------------------------------------------------- +
// define your individual: +

typedef +eoReal<double> Indi; +

You say here that you will be handling arrays +of doubles, whose fitness is a double +
Note that this makes Indi derive from STL +class vector<double> +
//----------------------------------------------------------------------------- +
/** a simple fitness +function that computes the euclidian norm of a real vector +
    @param +_indi A real-valued individual +
*/ +

double +real_value(const Indi & _indi) +
{ +
  +double sum = 0; +
  +for (unsigned i = 0; i < _indi.size(); i++) +
      +sum += _indi[i]*_indi[i]; +
  +return (-sum);   // maximizing +
} +

This simple function computes the sum of the squares of the variables +(remember Indi is here a vector of doubles) +
//----------------------------------------------------------------------------- +

void +main_function(int argc, char **argv) +
{ +
const +unsigned int SEED = 42;// seed for random number generator +
const +unsigned int VEC_SIZE = 8; // Number of object variables in genotypes +
const +unsigned int POP_SIZE = 20; // Size of population +
const +unsigned int T_SIZE = 3; // size for tournament selection +
const +unsigned int MAX_GEN = 500; // Maximum number of generation before STOP +
const +float CROSS_RATE = 0.8; // Crossover rate +
const +double EPSILON = 0.01; // range for real uniform mutation +
const +float MUT_RATE = 0.5; // mutation rate +
  +

////////////////////////// +
// Random seed +
////////////////////////// +
//reproducible random +seed: if you don't change SEED above, +
// you'll aways get +the same result, NOT a random run +
rng.reseed(SEED); +

///////////////////////////// +
// Fitness function +
//////////////////////////// +
// Evaluation: from +a plain C++ fn to an EvalFunc Object +
eoEvalFuncPtr<Indi> +eval( real_value ); +

This encapsulate the C++ function real_value into a functor +object +

//////////////////////////////// +
// Initilisation of +population +
//////////////////////////////// +

// declare the population +
eoPop<Indi> +pop; +

Declares a population +object, which is basically an STL +vector<Indi> +

// fill it! +
for +(unsigned int igeno=0; igeno<POP_SIZE; igeno++) +
  +{ +
    +Indi v; // generate a random individual +
    +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
      +{ +
        +double r = 2*rng.uniform() - 1; // new value, random in [-1,1) +
        +v.push_back(r); // +
      +} +
    +eval(v); // evaluate it +
    +pop.push_back(v); // and put it in the population +
  +} +

This initialization of the population is straightforward +
rng.uniform() generates a double uniformly +in [0,1), +
v.push_back simply appends its argument +at the end of STL vector v +
eval(v)evaluates individal v +the functor way, calling eval.operator()(v) +

// sort pop before printing +it! +
pop.sort(); +

// Print (sorted) intial +population (raw printout) +
cout +<< "Initial Population" << endl; +
cout +<< pop; +

If you looked at eoPop +inheritance diagram, you noticed that it derives from eoPrintable: +hence you can stream them using the << operator. Of course, Indis +are EO objects +, which also are eoPrintable, and the << operator for eoPop +uses the << operator for Indi. +

///////////////////////////////////// +
// +selection and replacement +
//////////////////////////////////// +
// The well-known roulette +selection +
// +The robust tournament selection +
eoDetTournament<Indi> +select(T_SIZE); // SIZE in [2,POP_SIZE] +

// +eoSGA uses generational replacement by default +
// so no replacement +procedure has to be given +

////////////////////////////////////// +
// termination condition +
///////////////////////////////////// +
// stop after MAX_GEN +generations +
eoGenContinue<Indi> +continuator(MAX_GEN); +

This class is called eoGenContinue +because the main loop of all eoAlgo +says ... while continuator(pop) +

////////////////////////////////////// +
// +The variation operators +
////////////////////////////////////// +

// +offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] +
eoUniformMutation<Indi>  +mutation(EPSILON); +
// +offspring(i) is a linear combination of parent(i) +
eoArithmeticCrossover<Indi> +xover; +

The variation operators are respectively +an eoMonOp +(unary operator) and an eoQuadOp +(binary operator that modifies both its arguments). +

///////////////////////////////////////// +
// the algorithm +
//////////////////////////////////////// +
// standard Generational +GA requires +
// selection, evaluation, +crossover and mutation, stopping criterion +
  +

eoSGA<Indi> +gga(select, xover, CROSS_RATE, mutation, MUT_RATE, +
eval, +continuator); +

// Apply algo to pop +- that's it! +
gga(pop); +

This simple algorithm of class eoSGA is a functor +object, and running the algorithm amounts to call the operator() +on the initial population! +

// Print (sorted) intial +population (raw printout) +
pop.sort(); +
cout +<< "FINAL Population\n" << pop << endl; +

that's it - just print the final population and you're done!!! +

} +

// +A main that catches the exceptions - do not modify! +
int +main(int argc, char **argv) +
{ +
#ifdef +_MSC_VER +
// +rng.reseed(42); +
int +flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
flag +|= _CRTDBG_LEAK_CHECK_DF; +
_CrtSetDbgFlag(flag); +
// +_CrtSetBreakAlloc(100); +
#endif +

try +
{ +
main_function(argc, +argv); +
} +
catch(exception& +e) +
{ +
cout +<< "Exception: " << e.what() << '\n'; +
} +

return +1; +
} +

+


Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last +modified: Wed Nov 6 17:22:43 CET 2000 + + diff --git a/eo/tutorial/html/Firstmerge.html b/eo/tutorial/html/Firstmerge.html new file mode 100644 index 000000000..1aca91949 --- /dev/null +++ b/eo/tutorial/html/Firstmerge.html @@ -0,0 +1,287 @@ + + + + + + Differences + + +Back to Lesson 1 - +Tutorial +main page - +Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+FirstBitGA and FirstRealGA: differences

+Below is a comparison of the codes for both algorithms (comments have been +removed). +
Warning: the pink +background here denotes the differences, not the section  of +the algorithm, which is only recalled by the color of the text! +
These differences are limited to +
    +
  • +the declaration of the type of the genotypes,
  • + +
  • +the fitness function (what did you expect +:-),
  • + +
  • +the initialization (and if you look carefully, +you'll find out that only a small part of the initialization is different, +as both genotypes are eoFixedLength objects) and of course
  • + +
  • +the choice of variation operators (including +the parameter for the mutation).
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#include +<stdexcept > +
#include <iostream> +
#include <strstream> +
#include <eo>
#include +<stdexcept > +
#include <iostream> +
#include <strstream> +
#include <eo>
typedef +eoReal<double> Indi;typedef +eoBin<double> Indi;
double +real_value(const Indi & _indi) +
{ +
  double +sum = 0; +
  for (unsigned +i = 0; i < _indi.size(); i++) +
      +sum += _indi[i]*_indi[i]; +
  return +(-sum);   // maximizing +
}
double +binary_value(const Indi & _indi) +
{ +
  double +sum = 0; +
  for (unsigned +i = 0; i < _indi.size(); i++) +
      +sum += _indi[i]; +
  return +(sum); +
}
void +main_function(int argc, char **argv) +
{ +
const unsigned +int SEED = 42; +
const unsigned +int VEC_SIZE = 8; +
const unsigned +int POP_SIZE = 20; +
const unsigned +int T_SIZE = 3; +
const unsigned +int MAX_GEN = 500; +
const float +CROSS_RATE = 0.8; +
const float +MUT_RATE = 0.5;
void +main_function(int argc, char **argv) +
{ +
const unsigned +int SEED = 42; +
const unsigned +int VEC_SIZE = 8; +
const unsigned +int POP_SIZE = 20; +
const unsigned +int T_SIZE = 3; +
const unsigned +int MAX_GEN = 500; +
const float +CROSS_RATE = 0.8; +
const float +MUT_RATE = 0.5;
const +double EPSILON = 0.01;const +double P_MUT_PER_BIT = 0.01;
eoEvalFuncPtr<Indi> +eval(real_value);eoEvalFuncPtr<Indi> +eval(binary_value);
eoPop<Indi> +pop; +
for (unsigned +int igeno=0; igeno<POP_SIZE; igeno++) +
  { +
    +Indi v; +
    +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
      +{
eoPop<Indi> +pop; +
for (unsigned +int igeno=0; igeno<POP_SIZE; igeno++) +
  { +
    +Indi v; +
    +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
      +{
        +double r = 2*rng.uniform() - 1;        +bool r = rng.flip(); 
        +v.push_back(r); // +
      +} +
    +eval(v); +
    +pop.push_back(v); +
  } +
pop.sort(); +
cout << +"Initial Population" << endl; +
cout << +pop; +
eoDetTournament<Indi> +select(T_SIZE); +
eoGenContinue<Indi> +continuator(MAX_GEN);
        +v.push_back(r); // +
      +} +
    +eval(v); +
    +pop.push_back(v); +
  } +
pop.sort(); +
cout << +"Initial Population" << endl; +
cout << +pop; +
eoDetTournament<Indi> +select(T_SIZE); +
eoGenContinue<Indi> +continuator(MAX_GEN);
eoUniformMutation<Indi>  +mutation(EPSILON); +
eoArithmeticCrossover<Indi> +xover;
eoBinMutation<Indi>  +mutation(P_MUT_PER_BIT); +
eoBinCrossover<Indi> +xover;
+
eoSGA<Indi> +gga(select, xover, CROSS_RATE, +
                +mutation, MUT_RATE, eval, continuator); +
gga(pop); +
pop.sort(); +
cout << +"FINAL Population\n" << pop << endl; +
} +
int main(int +argc, char **argv) +
{ +
... [technical +code removed] +
}
+
eoSGA<Indi> +gga(select, xover, CROSS_RATE, +
                +mutation, MUT_RATE, +
eval, continuator); +
gga(pop); +
pop.sort(); +
cout << +"FINAL Population\n" << pop << endl; +
} +
int main(int +argc, char **argv) +
{ +
[... technical +code removed ] +
}
+ +
Back to Lesson 1 - +Tutorial +main page - +Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Tue Nov 7 07:49:47 CET 2000 + + diff --git a/eo/tutorial/html/NoWay.html b/eo/tutorial/html/NoWay.html new file mode 100644 index 000000000..607269531 --- /dev/null +++ b/eo/tutorial/html/NoWay.html @@ -0,0 +1,74 @@ + + + + + + Tutorial: Solutions + + +Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints -EO +documentation +
+
+
+

+Tutorial:

+ +
Solutions of exercises
+ +

No, we won't +provide +any +hypertext link directly to the correct code, so you get a chance +to find out the solution by yourself without immediately going there  +:-))) +

What you should do: +

    +
  • +copy the code of an example onto another name (e.g. mytest.cpp)
  • + +
  • +edit and modify mytest.cpp +according to the corresponding instructions of the exercise
  • + +
  • +compile mytest.cpp by typing +make mytest at system prompt, +and you will hopefully get an executable file named mytest +(for Unix systems: if eventually someone tells me how to do that in Windows, +apart that you'll probably end up with an executable file named mytest.exe...).
  • +
+ +
+
What you may do later: +

All solutions to exercises are in the same +sub-dir of the Tutorial directory than the example files (i.e. +Lesson1 for Lesson1, yes!). Hence you may browse through the code, eventually +modifying it, and then simply type, in the corresponding directory, +
... % make exerciseN +
which will compile file exerciseN.cpp +into executable exerciseN +(for Unix systems: if eventually someone tells me how to do that in Windows, +you'll probably end up with an executable file named exerciseN.exe). +

+


+
What you may not do: +
Complain that it does not work under Windows :-)
+ +
Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 3 18:49:12 CET 2000 + + diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html new file mode 100644 index 000000000..e5fa3868e --- /dev/null +++ b/eo/tutorial/html/SecondBitEA.html @@ -0,0 +1,612 @@ + + + + + + SecondBitEA.cpp + + + +Back to Lesson 3 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+SecondBitEA.cpp

+Click on the figure to see the corresponding code. +
In the code, the colors are meaningfull +
The actual code is in boldface and the comment in normal face. +

For this particular program, as all new lines are concerned with program +parameter input and information output, the font +color for program-parameter-related sections will refer +to the section where the parameters are used whereas the background +color will remain blue. +

+
+ + + + +
//----------------------------------------------------------------------------- +
// SecondGA.cpp +
//----------------------------------------------------------------------------- +
//* +
// Same code than FirstBitEA as far as Evolutionary +Computation is concerned +
// but now you learn to enter the parameters +in a more flexible way +
// and to twidle the output to your preferences! +
//----------------------------------------------------------------------------- +
// standard includes +
#include <stdexcept>  // runtime_error  +
#include <iostream>   // +cout +
#include <strstream>  // ostrstream, +istrstream +
#include <fstream> +
// the general include for eo +
#include <eo> +
// specific includes +
#include "eoSGATransform.h" +
#include "eoPropCombinedOp.h"
+ + + + + +
#include "binary_value.h"
+ + + + + +
//----------------------------------------------------------------------------- +
// define your genotype and fitness types +
typedef eoBin<double> Indi;
+ + + + + +
//----------------------------------------------------------------------------- +
// instead of having all values of useful +parameters as constants, read them: +
// either on the command line (--option=value +or -o=value) +
//        +or in a parameter file (same syntax, order independent,  +
//                                                        +# = usual comment character  +
//        +or in the environment (TODO) +
// note that the parameters are passed by +reference so they can be updated +
void read_param(int argc, char *argv[],  +
uint32 & +_seed, +
unsigned int & _vecSize, +
unsigned int & _popSize, +
unsigned int & _tSize, +
double & _pCross, +
double & _pMut, +
string & _load_name, +
unsigned int & _maxGen, +
unsigned int & _minGen, +
unsigned int & _steadyGen, +
double & _onePointRate,  +
double & _twoPointsRate,  +
double & _uRate,  +
double & _pMutPerBit,  +
double & _bitFlipRate,  +
double & _oneBitRate +
) +
+
// define a +parser from the command-line arguments +
     eoParser parser(argc, +argv); +
     // For each +parameter, define Parameters directly in the parser,  +
     // and assign +the value to the variable +
    +eoValueParam<uint32>& seedParam = parser.createParam<uint32>(time(0), +"seed", "Random number seed", 'S'); +
     +_seed = seedParam.value(); +

     eoValueParam<unsigned +int>& vecSizeParam = parser.createParam<unsigned int>(8, "vecSize", +"Genotype size",'V', "Representation"); +
     _vecSize = vecSizeParam.value(); +

     eoValueParam<unsigned +int>& popSizeParam = parser.createParam<unsigned int>(10, "popSize", +"Population size",'P', "Evolution"); +
     _popSize = popSizeParam.value(); +
     eoValueParam<unsigned +int>& tSizeParam = parser.createParam<unsigned int>(10, "tSize", +"Tournament size",'T', "Evolution"); +
     _tSize = tSizeParam.value(); +
+
    eoValueParam<string>& +load_nameParam = parser.createParam<string>("", "Load","A save file +to restart from",'L', "Persistence"); +
     _load_name = +load_nameParam.value(); +

     eoValueParam<unsigned +int>& maxGenParam = parser.createParam<unsigned int>(100, "maxGen", +"Maximum number of generations",'G', "Stopping criterion"); +
     _maxGen = maxGenParam.value(); +
     eoValueParam<unsigned +int>& minGenParam = parser.createParam<unsigned int>(100, "minGen", +"Minimum number of generations",'g', "Stopping criterion"); +
     _minGen = minGenParam.value(); +
     eoValueParam<unsigned +int>& steadyGenParam = parser.createParam<unsigned int>(100, "steadyGen", +"Number of generations with no improvement",'s', "Stopping criterion"); +
     _steadyGen = +steadyGenParam.value(); +

     eoValueParam<double>& +pCrossParam = parser.createParam<double>(0.6, "pCross", "Probability +of Crossover", 'C', "Genetic Operators");  +
     _pCross = pCrossParam.value(); +
     eoValueParam<double>& +pMutParam = parser.createParam<double>(0.1, "pMut", "Probability of +Mutation", 'M', "Genetic Operators"); +
     _pMut = pMutParam.value(); +
     eoValueParam<double>& +onePointRateParam = parser.createParam<double>(1, "onePointRate", "Relative +rate for one point crossover", '1', "Genetic Operators"); +
     _onePointRate += onePointRateParam.value(); +
     eoValueParam<double>& +twoPointsRateParam = parser.createParam<double>(1, "twoPointRate", "Relative +rate for two point crossover", '2', "Genetic Operators"); +
     _twoPointsRate += twoPointsRateParam.value(); +
     eoValueParam<double>& +uRateParam = parser.createParam<double>(2, "uRate", "Relative rate for +uniform crossover", 'U', "Genetic Operators"); +
     _uRate =  +uRateParam.value(); +
     eoValueParam<double>& +pMutPerBitParam = parser.createParam<double>(0.01, "pMutPerBit", "Probability +of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); +
     _pMutPerBit = +pMutPerBitParam.value(); +
     eoValueParam<double>& +bitFlipRateParam = parser.createParam<double>(0.01, "bitFlipRate", "Relative +rate for bit-flip mutation", 'B', "Genetic Operators"); +
     _bitFlipRate +=  bitFlipRateParam.value(); +
     eoValueParam<double>& +oneBitRateParam = parser.createParam<double>(0.01, "oneBitRate", "Relative +rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); +
         +_oneBitRate = oneBitRateParam.value(); +

     // the name +of the "status" file where all actual parameter values will be saved +
     string str_status += parser.ProgramName() + ".status"; +
     eoValueParam<string>& +status_nameParam = parser.createParam<string>(str_status.c_str(), "status","Status +file",'S', "Persistence"); +
   // do the following AFTER +ALL PARAMETERS HAVE BEEN PROCESSED +
   // i.e. in case you need +parameters somewhere else, postpone these +
     if (parser.userNeedsHelp()) +
         +{ +
             +parser.printHelp(cout); +
             +exit(1); +
         +} +
     if (status_nameParam.value() +!= "") +
         +{ +
ofstream os(status_nameParam.value().c_str()); +
os << parser; // and you can +use that file as parameter file +
         +} +
}

+ + + + + +
// now the main_function: nothing changed, +except input/output +
void main_function(int argc, char **argv) +
{
+ + + + + +
   +uint32 seed; +
   // decription of genotype +
   unsigned int vecSize; +
   // parameters for evolution +engine +
   unsigned int popSize; +
   unsigned int tSize; +
   // operators probabilities +at the algorithm level +
   double pCross; +
   double pMut; +
   // init and stop +
   string load_name; +
   unsigned int maxGen; +
   unsigned int minGen; +
   unsigned int steadyGen; +
   // rates for crossovers +
   double onePointRate; +
   double twoPointsRate; +
   double URate; +
   // rates and private +parameters for mutations; +
   double pMutPerBit; +
   double bitFlipRate; +
   double oneBitRate; +
   // Now read the parameters +of the program +
     read_param(argc, +argv, seed, vecSize, popSize, tSize, +
           +pCross, pMut, load_name, maxGen, minGen, steadyGen, +
           +onePointRate, twoPointsRate, URate,  +
           +pMutPerBit, bitFlipRate, oneBitRate );
+ + + + + +
 ///////////////////////////// +
 // Fitness function +
 //////////////////////////// +
 // Evaluation: from a plain +C++ fn to an EvalFunc Object ... +
 eoEvalFuncPtr<Indi, double, const +vector<bool>& > plainEval( binary_value ); +
// ... to an object +that counts the nb of actual evaluations +
 eoEvalFuncCounter<Indi> eval(plainEval);
+ + + + + +
 //////////////////////////////// +
 // Initilisation of population +
 //////////////////////////////// +
 // Either load or initialize +
 // create an empty pop +
 eoPop<Indi> pop; +
 // create a state for reading +
 eoState inState; // a state +for loading - WITHOUT the parser +
// register the rng +and the pop in the state, so they can be loaded, +
 // and the present run will +be the exact conitnuation of the saved run +
 // eventually with different +parameters +
 inState.registerObject(rng); +
 inState.registerObject(pop); +

if (load_name +!= "") +
     { +
         +inState.load(load_name); //  load the pop and the rng +
        +// the fitness is read in the file:  +
        +// do only evaluate the pop if the fitness has changed +
     } +
 else +
     { +
         +rng.reseed(seed); +
        +// a Indi random initializer +
        +// based on boolean_generator class (see utils/rnd_generator.h) +
         +eoInitFixedLength<Indi, boolean_generator>  +
random(vecSize, boolean_generator()); +
        +// Init pop from the randomizer: need to use the append function +
         +pop.append(popSize, random);  +
        +// and evaluate pop (STL syntax)  +
         +apply<Indi>(eval, pop); +
     } // end +of initializatio of the population

+ + + + + +
 // sort pop for pretty printout +
 pop.sort(); +
 // Print (sorted) intial population +(raw printout) +
 cout << "Initial Population" +<< endl << pop << endl;
+ + + + + +
 ///////////////////////////////////// +
 // selection and replacement +
 ////////////////////////////////////
+ + + + + +
 // The robust tournament selection +
 eoDetTournament<Indi> selectOne(tSize);           +// tSize in [2,POPSIZE] +
 // is now encapsulated in a +eoSelectPerc (entage) +
 eoSelectPerc<Indi> select(selectOne);// +by default rate==1
+ + + + + +
 // And we now have the full +slection/replacement - though with  +
 // no replacement (== generational +replacement) at the moment :-) +
 eoNoReplacement<Indi> replace; 
+ + + + + +
 ////////////////////////////////////// +
 // The variation operators +
 //////////////////////////////////////
+ + + + + +
 // 1-point crossover for bitstring +
 eoBinCrossover<Indi> xover1; +
 // uniform crossover for bitstring +
 eoBinUxOver<Indi> xoverU; +
 // 2-pots xover +
 eoBinNxOver<Indi> xover2(2); +
 // Combine them with relative +rates +
 eoPropCombinedQuadOp<Indi> xover(xover1, +onePointRate); +
 xover.add(xoverU, URate); +
 xover.add(xover2, twoPointsRate, +true);
+ + + + + +
 // standard bit-flip mutation +for bitstring +
 eoBinMutation<Indi>  mutationBitFlip(pMutPerBit); +
 // mutate exactly 1 bit per +individual +
 eoDetBitFlip<Indi> mutationOneBit;  +
 // Combine them with relative +rates +
 eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, +bitFlipRate); +
 mutation.add(mutationOneBit, oneBitRate, +true); +
 // The operators are  encapsulated +into an eoTRansform object +
 eoSGATransform<Indi> transform(xover, +pCross, mutation, pMut);
+ + + + + +
 ////////////////////////////////////// +
 // termination condition see +FirstBitEA.cpp +
 ///////////////////////////////////// +
 eoGenContinue<Indi> genCont(maxGen); +
 eoSteadyFitContinue<Indi> steadyCont(minGen, +steadyGen); +
 eoFitContinue<Indi> fitCont(vecSize); +
 eoCombinedContinue<Indi> continuator(genCont); +
 continuator.add(steadyCont); +
 continuator.add(fitCont);
+ + + + + +
 // but now you want to make +many different things every generation  +
 // (e.g. statistics, plots, +...). +
 // the class eoCheckPoint is +dedicated to just that: +
 // Declare a checkpoint (from +a continuator: an eoCheckPoint  +
 // IS AN eoContinue and will +be called in the loop of all algorithms) +
 eoCheckPoint<Indi> checkpoint(continuator); +

    +// Create a counter parameter +
     eoValueParam<unsigned> +generationCounter(0, "Gen."); +

    +// Create an incrementor (sub-class of eoUpdater). Note that the  +
     // parameter's +value is passed by reference,  +
     // so every +time the incrementer is updated (every generation), +
     // the data +in generationCounter will change. +
     eoIncrementor<unsigned> +increment(generationCounter.value()); +
    +// Add it to the checkpoint,  +
     // so the +counter is updated (here, incremented) every generation +
     checkpoint.add(increment); +
    +// now some statistics on the population: +
     // Best fitness +in population +
     eoBestFitnessStat<Indi> +bestStat; +
     // Second +moment stats: average and stdev +
     eoSecondMomentStats<Indi> +SecondStat; +
    +// Add them to the checkpoint to get them called at the appropriate +time +
     checkpoint.add(bestStat); +
     checkpoint.add(SecondStat); +
     // The Stdout +monitor will print parameters to the screen ... +
     +eoStdoutMonitor monitor(false); +

     // when called +by the checkpoint (i.e. at every generation) +
     +checkpoint.add(monitor); +
     // the monitor +will output a series of parameters: add them  +
     +monitor.add(generationCounter); + +
     monitor.add(eval); +// +because now eval is an eoEvalFuncCounter! +
     monitor.add(bestStat); +
     monitor.add(SecondStat); +
     // A file +monitor: will print parameters to ... a File, yes, you got it! +
     eoFileMonitor +fileMonitor("stats.xg", " "); +

     // the checkpoint +mechanism can handle multiple monitors +
     checkpoint.add(fileMonitor); +
     // the fileMonitor +can monitor parameters, too, but you must tell it! +
     fileMonitor.add(generationCounter); +
     fileMonitor.add(bestStat); +
     fileMonitor.add(SecondStat); +
     // Last type +of item the eoCheckpoint can handle: state savers: +
     +eoState outState; +
     // Register +the algorithm into the state (so it has something to save!!) +
     +outState.registerObject(rng); +
     outState.registerObject(pop); +
     // and feed +the state to state savers +
    +// save state every 100th  generation +
     eoCountedStateSaver +stateSaver1(100, outState, "generation");  +
     // save state +every 1 seconds  +
     eoTimedStateSaver    +stateSaver2(1, outState, "time");  +
    +// Don't forget to add the two savers to the checkpoint +
     checkpoint.add(stateSaver1); +
     checkpoint.add(stateSaver2); +
     // and that's +it for the (control and) output

+ + + + + +
 ///////////////////////////////////////// +
 // the algorithm +
 //////////////////////////////////////// +
 // Easy EA requires  +
 // selection, transformation, +eval, replacement, and stopping criterion +
 eoEasyEA<Indi> gga(checkpoint, +eval, select, transform, replace); +
 // Apply algo to pop - that's +it! +
 gga(pop);
+ + + + + +
 // Print (sorted) final population +
 pop.sort(); +
 cout << "FINAL Population\n" +<< pop << endl;
+ + + + + +
} +
// A main that catches the exceptions +
int main(int argc, char **argv) +
{ +
#ifdef _MSC_VER +
     int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
       flag +|= _CRTDBG_LEAK_CHECK_DF; +
     _CrtSetDbgFlag(flag); +
//    _CrtSetBreakAlloc(100); +
#endif +
     try +
     { +
             +main_function(argc, argv); +
     } +
     catch(exception& +e) +
     { +
             +cout << "Exception: " << e.what() << '\n'; +
     } +
     return 1; +
}
+ +


Back to Lesson 3 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sun Nov +26 09:31:04 2000 + + diff --git a/eo/tutorial/html/beige009.jpg b/eo/tutorial/html/beige009.jpg new file mode 100644 index 0000000000000000000000000000000000000000..594c01d8e1b01adbdd88852e6c591f789cf21d6e GIT binary patch literal 6643 zcmbtYcU05KxBn(VAWA}2S$av}7gvf@=~YMoi3Z;;3+Re~BnC;468Hg2m7>x@7U>{H zu;C)oi}a>~KoAfTq)8D&mxw^}qWj8u@4R=;JLla$?wor+cV<5Gz2`e~XL#ehX+X@u z4r2#^z#z~`&`AK`u|az0@T4G8Af7~4($&-kPFrKnLfF7}5&IqifB=5%-|Y`<>pKJp z|ImE(-KQ@0!#d25{ae64BES4F(16y}t9-y~smy`P+9vwac0^Ioe-(&QD zcr^ag^JC1fd>a7BeCGe7K$gD4|0Bfv|6t$e7WkVP7y$ED0l1Yn>532F9nGH(#G3@- z0TE$gVW_YO6e=QqxR?|i z4ww3_;8K5g5&ypoz-tA>g@In67XnfNz~Uf?IEdE?vf%SO1o|O-s^0~|Prtw+K_Ox2 z;UoOy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- H-ur(A-Dy?` literal 0 HcmV?d00001 diff --git a/eo/tutorial/html/binary_value.html b/eo/tutorial/html/binary_value.html new file mode 100644 index 000000000..5fd4134c0 --- /dev/null +++ b/eo/tutorial/html/binary_value.html @@ -0,0 +1,57 @@ + + + + + + binary_value.h + + +Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+binary_value.h

+ + + + + +
#include <eo> +
//----------------------------------------------------------------------------- +
/** Just a simple function that takes binary +value of a chromosome and sets +
     the fitnes. +
     @param _chrom A +binary chromosome  +
*/
+ + + + + +
double binary_value(const vector<bool>& +_chrom) +
{ +
 double sum = 0; +
 for (unsigned i = 0; i < _chrom.size(); +i++) +
     sum += _chrom[i]; +
 return sum; +
}
+ +
Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Wed Nov +29 09:03:09 2000 + + diff --git a/eo/tutorial/html/costume.jpg b/eo/tutorial/html/costume.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b29768e45c471a19b4a5dd956ee418995d2f05ec GIT binary patch literal 213921 zcmb5VWl$X76D~Z96N0aR?cL8Qt`;$UEMZ~~U#I5s`75bzTJpFO9SFdDbn}1t0YDi4 z^Yb_-LJDB~fA;7N3-d7&5C$nGE14*kikJ~Oo1K>`HU)e5GqvL8e&f{Rhb7=C=3^YB zn52LbaQfDalM&`!8ihMFB07(fF%Dq;N%o=?obbB<-QTb~M7tJs55`Ph5d{Em!S3nU z^X;?`i(qA#AStaTy$TzNh}X+91(f1g$N(1K)wsm~?Hdr4#PUMajvn;axRfXS{WkAt=#EpKZ*uvIbboD{==` zv9{8TPgQ#>&-9nmp3|`3bEeh&T~$Y|=yWBYL<@6JBhoppwG7`#pq=@o6z!pyp<4mx zEq_h)m+9PO{F=SYEqlKbl|N%(v!@L~8*JI6hQ--Tz7zuwN9;6Vk6l)NJ=pDJ|G44I z2nVeR^UeEr*6#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N>Y83ZM7kA#9muOp9Yg{xA@zQ#+w~M!4mJ`& zG=RCcgZrm<)D#mSWLk|(aJO^apJmPUE~p=EV~s04Uxmxf^_8SzDLO+*ERS&|2>G%i&GS5lAQ0(qPnf=sm{-3%i z0NYOZOmlRIaz5$1pgoa*0Zs?7PVcE3d!Pi@Q-&1&X6v#($^wXU`UD{pV1q$cc<)Mf zeJAdP=wmD1I6_Jz$_~XA0~_THjx8T!_ECRV=ztBET%#9f-2;E#{eog7X%~DUnZYnYH-EZ7Lgy!GBD)}WD8I^pEJptToGCYo z`Bj<7Qy-`%wgI10eS%=ZND2G?idOw&?4_}T<<>|Db`7;bPbY8HLVmQxWp~&$**I;Z Mlj + + + TITRE + + + +Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+


+ + +
+

TITRE

+
+ + +

diff --git a/eo/tutorial/html/eoBottomUp.html b/eo/tutorial/html/eoBottomUp.html new file mode 100644 index 000000000..aa150ab50 --- /dev/null +++ b/eo/tutorial/html/eoBottomUp.html @@ -0,0 +1,74 @@ + + + + + + EO - The Bottom-Up approach + + +Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+


+
+

+EO - Bottom-Up approach

+ +


Congratualtions - You have chosen the bottom-up approach!  +From here you will be allowed to browse into the different components of +an Evolutionary Algorithm, and to see how to program your favorite using +the EO library. + +

+Table of Content

+ +
+

+ +

Yes, this is the table of content of this part +of the EO tutorial. If you don't already know what this symbolic + representation of an EA means, you should try here. Otherwise, click on the figure +to go directly to the corresponding section of the tutorial. +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+


+
Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Mon Oct 30 07:28:36 CET 2000 + + diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html new file mode 100644 index 000000000..d7de5460c --- /dev/null +++ b/eo/tutorial/html/eoEngine.html @@ -0,0 +1,59 @@ + + + + + + Genetic Engine + + + + +
+

+Evolution Engine

+ +


Contents +

    +
  • +Introduction
  • + +
  • +Selection
  • + +
  • +Replacement
  • + +
  • +Popular evolution engines
  • +
+ +


The term evolution engine denotes the different parts that simulate +the Darwinism in Evolutionary Algorithms. +

+

The fittest individuals are more likely to +reproduce and survive.

+ +

Darwinism takes place in two different phases of an EA, though in many +popular variants, only one phase is activated. +

Selection is the Darwinistic choice of parents +that will be allowed to reproduce. +
Replacement takes place after reproduction, +and is the Darwinistic choice of those individuals that will survive, +i.e. become the parents of the next generation. +

Selection +
  +

Replacement +
  +

Popular +evolution engines +
  +
  +

+


+
+Marc Schoenauer
+ +
Last +modified: Mon Oct 30 18:15:17 CET 2000 + + diff --git a/eo/tutorial/html/eoEval.html b/eo/tutorial/html/eoEval.html new file mode 100644 index 000000000..7d61f7e74 --- /dev/null +++ b/eo/tutorial/html/eoEval.html @@ -0,0 +1,34 @@ + + + + Evaluation + + + +Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+
+ +
+

Evaluation

+
+ + + +
+
+Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+
Marc Schoenauer
+ + +Last modified: Mon Nov 6 10:54:33 CET 2000 + + + diff --git a/eo/tutorial/html/eoGeneration.html b/eo/tutorial/html/eoGeneration.html new file mode 100644 index 000000000..1c59d3726 --- /dev/null +++ b/eo/tutorial/html/eoGeneration.html @@ -0,0 +1,19 @@ + + + + Generation + + + +

Generation

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 19:29:29 CET 2000 + + + diff --git a/eo/tutorial/html/eoInit.html b/eo/tutorial/html/eoInit.html new file mode 100644 index 000000000..10fa0f44a --- /dev/null +++ b/eo/tutorial/html/eoInit.html @@ -0,0 +1,36 @@ + + + + Initialization + + +Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+
+ + +
+

+Initialization

+ + + + + +
+
+Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO documentation +
+
+Marc Schoenauer
+ + +Last modified: Mon Nov 6 11:25:18 CET 2000 + + + diff --git a/eo/tutorial/html/eoIo.html b/eo/tutorial/html/eoIo.html new file mode 100644 index 000000000..4e37700f4 --- /dev/null +++ b/eo/tutorial/html/eoIo.html @@ -0,0 +1,25 @@ + + + + Input / Output + + + +

Input / Output

+ +

+ +

Stopping criteria

+ +

+ +

Displaying statistics

+ +
+
Marc Schoenauer
+ + +Last modified: Tue Oct 31 18:32:22 CET 2000 + + + diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html new file mode 100644 index 000000000..e7bf1589e --- /dev/null +++ b/eo/tutorial/html/eoLesson1.html @@ -0,0 +1,413 @@ + + + + + + Tutorial: Lesson 1 + + +Lesson 2 - +Tutorial +main page - +Top-Down page - Bottom-up +page - Programming hints -EO +documentation +
+
+
+

+Tutorial: Lesson 1

+This lesson will let you +
    +
  • +run your first Evolutionary Algorithm written within +EO Library, choosing between evolving bitstrings, +or evolving vectors of real numbers,
  • + +
  • +browse through the code of these algorithms, or
  • + +
  • +follow the guided tour.
  • +
+Later you will be asked to +
    +
  • +write your own fitness function,
  • + +
  • +use different kinds of selection procedures +in the framework of a generational GA evolution engine,
  • + +
  • +check that EO let you separate the representation +from the evolution engine.
  • +
+ +

+I want to run an Evolutionary Algorithm +now

+You can choose to run a standard bitstring Genetic +Algorithm (as defined in Goldberg's book) or a standard real-valued +genetic algorithm, as proposed in Micahlewicz's book. +

If you have not already done what was recommended in the Tutorial +main page , do it NOW. Then go +to the Lesson1 sub-dir of the tutorial dir, and simply type at the system +prompt +

(myname@myhost) EOdir/Tutorial/Lesson1 % FirstRealGA +
or +
(myname@myhost) EOdir/Tutorial/Lesson1 % FirstBitGA +

and something should happen. +

+What is happening?

+At the moment, the FirstBitGA maximizes the +number of ones in the bitstring (also calls the OneMaxfunction, +whose solution is, as you can guess, +11111111), +and the FirstRealGA is maximizing (the default +action for EO is to maximize) the inverse of the sum (i.e. minimizing the +sum) of the square of its variables (also called the sphere +function, whose solution is ... all zeroes). +

And what you see on the screen when running one of these two programs +is, in each case, the initial and final population of an Evolutionary run, +one individual per line, its fitness first, then the number of items (bits +or real numbers) of the genotype, and the genotype itself. The final population +hopefully contains the solution in the discrete case, and is close to it +in the continuous case. +

You need now to take a look at either programs +by browsing alone through the  sources for FirstBitGA +and FirstRealGA, or follow the guided tour +below, or go directly to the exercises. +

+Browsing the code:

+ +
    +
  • +General includes:Like +all C-like code, the file starts with include directives (Bit +- Real). Apart from standard includes, +the spedific file to include is eo: +this is a file that contains the list of the most important EO files.
  • + +
      +
  • +Representation: +you then have to delclare the type of individuals you will be handling. +All evolution-related objects you will need are templatized w.r.t. the +type of individuals.
  • + + + +
  • +Fitness function: +the code for the fitness function is included in the file. It must take +as argument a reference to an individual (at the moment).
  • + +
      +
    • +Bit This function simply computes +the number of ones of the bitstring (it's called the OneMax function). +The optimum is of course the all-ones bitstring.
    • + +
    • +Real This function simply computes +the inverse of the sum of the squares of all variables (also called the +sphere function). The optimum is of course the all-zeroes vector.
    • + +
       
    + +
  • +Parameters: +all parameters of the algorithm are declared here (Bit +- Real), and their values and +assigned. Of course, this means that you will need to recompile to change +these values - see Lesson 3 to get rid of that heavy requirement.
  • + +
      +
  • +Random seeding: +Random numbers play an important role in Evolutionary Algorithms. See in +EO +programming hints more details about how this is simulated in EO - +but as far as you are concerned now, remember that the global +Random Number Generator is called rng +and should be used everywhere you need a realization of a random variable +of known law. Moreover, this RNG requires a seed, +which is set here (Bit - Real): +everytime you run the algorithm with the same +seed, you will get the same +result. Hence, to test the robustness of your +algorithm, you should run it with different seeds. This is rather time +consuming in the present programs, so we suggest that you wait until Lesson +3 to do so.
  • + +
      +
  • +Fitness function encapsulation: EO +is based on the notion of functors +- hence you now need to encapsulate your fitness function into a functor +object. This is what is done here (Bit +- Real).
  • + +
      +
  • +Initialization: +to initialize the population, first declare an empty object of class eoPop<Indi>, +which is basically an STL vector<Indi>, +then fill it with Indi's. And remember that +v.push_back +simply appends its argument at the end of STL +vector v.
  • + + + +
  • +Output: take +a snapshot at the initial population (Bit +- Real). Sort it first, so the best +individuals are first, and display it. Note that an eoPop has a << +method, which means that a simple os +<< pop streams the pop +onto the ostream os. +This is true for all objects of of class eoPrintable +(most EO objects) through the method printOn +(which is then called by the << +operator).
  • + +
      +
  • +Evolution engine: +The selection/replacement mechanism (Bit +- Real) is a simple generational +GA here: a simple selector, and a generational replacement. The eoDetTournament +has been chosen as a robust selection, and the generational replacement +(all parents are replaced by the offspring) is hard-coded in the eoSGA +algorithm.
  • + +
      +
  • +Variation operators: +in the simple algorithm considered here, individuals undergo crossover +and mutation. +In EO, these operators are (functor) +objects of class eoQuadOp +(binary operator that modifies both its arguments) and eoMonOp +(unary operator).  These operators are applied in turn to all selected +parents, according to user-defined probabilities.  These probabilities +are defined with all other parameters, and will +be passed to the eoSGAalgorithm.
  • + +
      +
    • +Bit The crossover eoBinCrossover +is the standard 1-point crossover, and eoBinMutation +is the standard bit-flip mutation that randomly +flips all bits with a given probability P_MUT_PER_BIT.
    • + +
      Warning: the P_MUT_PER_BIT +probability is an internal parameter of the +eoBinMutation, +it is NOT the probability of mutation +at the individual level. EO corrects what can be viewed as an inconsistency +in Holland's original work, further used in Goldberg's book by separating +the probability of mutation for each individual (independent of the type +of mutation that will be applied) from the probability of flipping each +bit, which is specific of the bit-flip mutation.  Hence, to run the +same algorithm as Goldberg's SGA, the mutation probability (at individual +level) is 1, and the probability of flipping each bit is P_MUT_PER_BIT. +
    • +Real The crossover eoArithmeticCrossover +is the standard arithmetic crossover for real-valued +vectors, that chooses a point randomly on the segment between both parents +(also termed BLX-0). eoUniformMutation +is the uniform mutation for real-valued vectors +that choses a new value for each variable uniformly on an interval centered +on the parent value. The width of the interval is an internal +parameter of the object, here called EPSILON.
    • + +
       
    + +
  • +Stopping criterion: +Specify a maximum number of generations +to run (Bit - Real): +the simplest of all stopping criteria at the moment, using an object of +a sub-class of class eoContinue.
  • + +
      +
  • +The algorithm: the +simple algorithm that is used here, called  eoSGA +requires +as parameters a selector, +a crossover and +the associated crossover rate, +a mutation and +the associated mutation rate, +and a stopping criterion. +Take a look at the corresponding +constructor +of the class eoSGA: +it only initializes its private data +with the parameters. Now look at the operator() +method - the one that is called in the code for FirstBitGA +or FirstRealGA - and you'll find +out that is is as simple as it sounds.
  • + +
      +
  • +Output: After +running the algorithm, output the sorted final population (Bit +- Real) - and look at the best +individual: this is the result of the algorithm.
  • + +
      +
  • +Main body: for +technical reasons (intercepting the exceptions), we need a main like this +one (Bit - Real)., +and you should not touch it unless you know what you are doing. Simply +note that this main calls the function main_function, which we have been +discussing up to now!
  • +
+ +

+Exercise 1: maximize your +own function

+This is very easy - if your search space is that of bitstring or of unbounded +real numbers. +
    +
  • +Go to the tutorial directory, and copy the +program you want to modify onto mytest.cpp.
  • + +
  • +Edit mytest.cpp +with any text editor:
  • + +
  • +Modify the fitness function itself (binary_value +in FirstBitGA,real_value +in  FirstRealGA)
  • + +
  • +Compile the program by typing make +mytest at system prompt
  • + +
  • +Run the new program by entering the command +mytest +at system prompt.
  • +
+ +

+Exercise 2: check the differences between both programs

+Go and take a look at the code for these programs (Bit +- Real). Use the symbolic representation +of an Evolutionary Algorithm (you should understand that figure now, otherwise +go there and come back) to understand how each +part of the EA is coded. Try to spot the differences between both codes: +there are not so many! +
After you've tried that alone, take a look at the solution +:-) +
  +

+Exercise 3: change the selection procedure

+This is rather straightforward ... if you know what other types of selection +are available! +
At the moment, let's only consider only the following simple ones: +
    +
  • +You already know the tournament selection
  • + +
    Syntax:  eoDetTournament<Indi> +select(T_SIZE);   // T_SIZE in [2,POP_SIZE) +
  • +Try the well-known roulette wheel
  • + +
     Syntax:    eoProportional<Indi> +select; +
  • +Or the stochastic binary tournament
  • + +
    Syntax:  eoStochTournament<Indi> +select(RATE);     // RATE in ]0.5,1] +
  • +and of course the random selection should +give bad results!
  • + +
    Syntax:  eoSelectRandom<Indi> +select;
+Note that all these classes of eoObjects are derived from the abstract +class +eoSelectOne. +

Lessons: +

    +
  • +in EO, all actions are performed by functor +objects (this section is the last time in this tutorial that there +is a direct link to the EO Programming hints +page - though the link at top and bottom of all pages will remain there).
  • + +
  • +in EO, all object you will usually need to manipulate are templatized +w.r.t. the type of the individual you are handling.
  • + +
  • +The type of the individual is itself templatized +w.r.t. the type of fitness (double by default).
  • + +
  • +In EO (actually, in EC!) initialization and variation +operators are representation-dependent, while +the evolution engine is representation-independent +(well, like any rule, this one does have some exceptions).
  • + +
  • +Changing the fitness function, or the selection +procedure inside the generational GA evolution engine is straightforward.
  • + +
  • +remember, all solutions to exercises are in +the same sub-dir of dir Tutorial than the lesson itself (see here).
  • +
+ +
Lesson 2 - +Tutorial +main page - +Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 3 18:49:12 CET 2000 + + diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html new file mode 100644 index 000000000..4bf3e37ec --- /dev/null +++ b/eo/tutorial/html/eoLesson2.html @@ -0,0 +1,301 @@ + + + + + + Tutorial: Lesson 2 + + + +Lesson 1 - +Lesson +3 - +Main page - +Top-Down +- Bottom-up - Hints +- EO +documentation +
+
+
+

+Tutorial Lesson 2: more encapsulations

+In this lesson, the same Evolutionary Algorithm will be rewritten in a +much more general context. +
First, look at the changes that have been done +to the algorithms. Then benefit from the new features by +
    +
  • +minimizing (and not only maximize) the fitness
  • + +
  • +combining several +operators of the same type
  • + +
  • +combining several +stopping criteria
  • + +
  • +use alternate selection/replacement +engines, deviating from the pure generational GA
  • +
+ +


Again, two basic algorithms are provided, namely FirstBitEA +and FirstRealEA. +
To compile and run them, go to the Lesson2 +sub-directory of the tutorial dir and simply type make. +Both examples should get compiled, and you can then run them by calling +their name from the system prompt. +

Note the slim difference in names, from GA +to EA: the behavior of these  EAs is +almost identical to that of their GA counterpart, at least with the default +settings that are provided. But their potentialities for easy modifications +are much larger, both in terms of variation operators +and of evolution engine (i.e. selection/replacement +mechanism).  +


Changes +

Browse through the code, and discover them one after the other: +

    +
  • +The fitness function +now +lies in a separate file +(Bit +- Real). But, more important, its +argument is a vector<bool> or a vector<double>, +and not an unknown type. This will allow to use the same file for any EO +object that is a sub-class of the corresponding STL vector class.
  • + +

    Note: Also, +a non-templatized fitness can be compiled +separately (not done here) into an object +file once and forall (remember +that templates forbid that). +
      +

  • +The encapsulation +of +the fitness (Bit +- Real) looks more complicated: you +have to declare 3 template arguments: the type of EO object it will be +applied to, the return type and the type of argument the function actually +requires.
  • + +

    Note: In the +previous files (Bit - Real) +, the last 2 types were deduced from the first (2nd argument = fitness +type of EO object, third = first). +
      +

  • +Both the above modifications makes it very easy to +minimize +rather than maximize a fitness function (see Exercise +1).
  • + +
      +
  • +The initialization +of the population is now encapsulatedinto +a separate initializer (based +on a boolean generator or a double-number +generator -see random_generators.h) +that is then used in the constructor of the population to build the individuals. +You can also use different initializers and call them in turn through the +call to pop.append() function +(see Exercise 2).
  • + +

    Note: Don't +forget to evaluate the population: +the eoPop has no idea of the eval function, so it has to be done from outside!!! +
      +

  • +You can now use +different +crossover +and mutation +operatorsin the same algorithm +(Bit - Real), +choosing among them according to +relative +rates. The class eoPropCombinedxxxOp, +where +xxx is either Mon (for mutation, of class eoMonOp) +or Quad (for crossovers, of class eoQuadOp), +is derived from the corresponding eoxxxOp class. When applying the eoPropCombinedxxxOp, +one of the eoxxxOp it contains is chosen by a roulette +wheel, according to their respective rates, and is applied to the arguments.
  • + +

    Note: A third optional argument +in method add is a boolean +(defaulted to false). When true, the actual rates for all operators are +displayed on the screen as percentages: you don't have to input rates that +sum up to 1, all rates are scaled anyway. +

    Note: The operators have to be encapsulated +into an eoTransform object +(Bit - Real) +to be passed to the eoEasyEA algorihtm. +The eoSGATransform is a simple +eoTransform +that does exactly the same thing than eoSGA: +each pair from the selected parents undergoes the crossover +operator with given probablity, and all individuals (after crossover +eventually) undergo mutation with given probability. +The arguments to the eoSGATransform +are an eoQuadOp with its probability +and an eoMonOp with the associated +probability. +
      +

  • +You can use combinations +of +several stopping criteria by using an object of the class eoCombinedContinue +(Bit +- Real). Initialize it with an object +of class eoContinue, and +addas +many of other such objects as you wish. And as an eoCombinedContinue +is +aneoContinue, +simply pass it to the algorithm (Bit +- Real).
  • + +
      +
  • +The +full selection/replacement mechanism is +now in place through the eoEasyEA +algorithm.
  • + +
    This means that you can use different selectors. +which was already true in Lesson 1, but also different replacement +strategies (see Exercise 3) whereas generational +replacement was hard-coded in the algorithm eoSGA +used in Lesson1. +

    Beware that we have to encapsulate  (Bit +- Real) the eoDetTournament, +which is of class eoSelectOne (i.e. allows +to select one individual from a population, its operator() +returning a single individual) into an object of the eoSelectPerc +(perc stands for percentage) which allows to select a ... percentage of +a population (his operator()  +returns a population). This was done internally in the  constructor +of eoSGA  - see lesson1.

+ +
Exercice +1: minimizing +
Modify the algorithm so that it minimizes the +fitness. +
    +
  • +For the bitstring case, you only have to modify the +declaration +of the representation, using eoMinimizingFitness +instead of double. +But is that really all? Give it a try, look at the output, and do it right +the second time!!!
  • + +
  • +For the real-valued problem, you also need to modify +the file real_value.h so +that it returns the sum of squares instead of its inverse. And again there +is something else to modify...
  • +
+Exercice +2: initialization +
Use different initializers: for instance, on +the real-valued sphere function minimization, try to initialize half of +the population in [-2,-1] and the other half in [1,2], with and without +the segment and arithmetic crossovers (and for large values of VEC_SIZE, +the size of the vectors). Amazing, isn't it! Explain that result. +

Exercice +3:  replacement +
You can now twidle the number of offspring that +will be generated from the parents. But of course you need to adjust the +replacement to keep a constant population size. +

    +
  • +To modify the number +of offspring, use the second argument of the +encapsulator +(Bit - Real) +of the selector +of class eoSelectOne +into an eoSelectPerc object. For instance, try
  • + +
                    +eoSelectPerc<Indi> select(selectOne,2.0) +
    to generate twice as many offspring as there +are parents. +
  • +To keep a constant population +size, you can use either the eoCommaReplacement +class, or the eoPlusReplacement. +The former selects the best offspring to replace the parents, the latter +selects the best among parents+offspring. Of course you cannot use eoCommaReplacement +if you have less offspring than parents!
  • + +
    Now if you use eoSelectRandom +as selector with a rate of +lambda, you end up with exactly the (mu+lambda) +or +(mu,lambda) strategies from Evolution +Strategies. +
  • +Question: what do you +get if you have use a rate of 1/POP_SIZE for the selection, and an eoPlusReplacement +strategy? Yes, you get almost the replace_worst Steady-State GA, though +rather inefficient, as you sort the population at every generation, which +could be avoided - and will be in a later lesson).
  • + +
  • +Homework: Write the +eoCommaPlusReplacement +that would start by taking the best of the offspring, and if some are still +missing to keep the population size constant, take the best of the parents. +Write the eoConservativeReplacement +that starts by taking a percentage of the parents (the best ones) and then +adds the best from the offspring. In both cases, send +use the code as we haven't done that yet (and +hence there is no solution available at the moment - Nov. 29 :-)
  • +
+Remember: all solutions +are in the same sub-directory of the Tutorial dir than the examples (i.e. +here Lesson2), and are described here. +

+


+
Lessons learned: +
    +
  • +How to write a fitness function that only +needs a genotype, not a full individual. Moreover you can compile it separately.
  • + +
    How to initialize the population using +random generators +
  • +How to use other evolution engine than the +simple generational GA.
  • + +
  • +How to combine different objects of the same kind into a single object +that you can use like a simple basic object (operators +and stopping criteria here).
  • +
+ +
Lesson 1 - +Lesson +3 - +Main page - +Top-Down +- Bottom-up - Hints +- EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 3 18:49:12 CET 2000 + + diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html new file mode 100644 index 000000000..a7b08a2bc --- /dev/null +++ b/eo/tutorial/html/eoLesson3.html @@ -0,0 +1,531 @@ + + + + + + Tutorial: Lesson 3 + + +Lesson 2 - +Lesson +4 - +Main page - +Top-Down +- Bottom-up - Hints +- EO documentation +
+
+
+

+Tutorial Lesson 3: input/output

+In this lesson, you will still use the same Evolutionary Algorithm, BUT +in a much more user-friendly way. You +will discover how to +
    +
  • +input parameters on the command-line or from a text +file
  • + +
  • +save the population to disk, together with every part +of the algrithm you could think of - so you can decide to reload +everything later to continue the same run, eventually with different parameters.
  • + +
  • +generate statistics on the populations, and output +them to the screen, text or graphic, or to a file (or to any other +device you might want to use).
  • +
+First, but you should now have done it without being told, go into the +Lesson3 +sub-dir of the tutorial dir and type +make. +This will compile the SecondBitEA +program (and, some day, SecondRealEA). +

You can then either +

    +
  • +browse the corresponding code (only SecondBitEA +available right now, but you can figure out how SecondRealEA will look +like),
  • + +
  • +look at the summary of changes,
  • + +
  • +or find out directly explanations about the new features: the eoParser, +eoState +and eoCheckpoint classes.
  • +
+ +


+


+
Changes +
As already said, the behavior of the algorithm +will be exactly the same as the previous one as far as optimization is +concerned. Only the input (of algorithm parameters) and output (of program +results) will be very different. +
Hence, the sections corresponding to the fitness +function, the initialization, the +variation +operators, the evolution engine +and the algorithm itself are +almost identical (apart from variable name changes). +
    +
  • +Fitness function: +there is an additional line +after the encapsulation of our binary_function +into an eoEvalFunc +object, which again encapsulate the eoEvalFunc +into an eoEvalFuncCounter. +As its name says, thisobject will, in addition to computing the fitness, +count the actual +number of evaluations: the fitness of non-modified individuals is of course +not recomputed - and this is taken care of by this object. Moreover, it +can be later used for displays +in eoMonitor objects, as done in the checkpoint +section.
  • + +
  • +The initialization +section has been extended to account for the possibility to re-load +a previously saved population. This is achieved +through an eoState object, if the corresponding program +parameter is set.
  • + +
  • +The +variation +operators and the evolution engine  +sections are similar to the ones in Lesson2
  • + +
  • +The parameter section  +is completely different from the previous one. All variables corresponding +to program parameters +are now declared +in the main_function +(as before), but their values are set in a new +function, called read_param. +See the eoParser description for more details.
  • + +
  • +The stopping criterion +section, has in fact now become the checkpoint section, as it involves +much more than just stopping criteria. See all details in the eoCheckpoint +paragraph below.
  • +
+ +
eoParser: +parameter input +
The first two examples of Lessons 1 and 2 had +a very crude way to set parameter values: they were hard-coded, and you +had to recompile the whole program to change a single value. We shall now +see now to set parameter values in a flexible way (though we're still looking +for volunteers to create a Graphical User Interface :-) +
Two base classes are used for that purpose: +
    +
  • +The eoValueParam +class, templatized by the type of the variable +you want to handle (i.e. integer, double, +yourPrivateClass, ...). In this lesson, +we will not go into details: e.g. we will not tell you that the +eoValueParam +is actually a templatized sub-class of abstract class eoParam (oups, I +said it!), nor will we deal with parameters outside their use from an eoParser. +See the parameter section of the Bottom-up tutorial, or wait until lesson +4).
  • + +
  • +The eoParser +class, whose only purpose is the input of parameters.
  • +
+Modifying parameter values at run-time: +
Using an eoParser object, the parameter values +are read, by order of priority +
    +
  1. +from the command-line
  2. + +
  3. +from a text file
  4. + +
  5. +from the environement
  6. + +
  7. +from default values
  8. +
+The syntax of parameter reading is a keyword-based +syntax, now traditional in the Unix world: +
    +
  • +in EO, each parameter is designated by a (long) keyword, +and optionally by a short (1 character) keyword.
  • + +
      +
  • +the general syntax to modify parameter value at run-time is (either from +the command-line or in a text file)
  • + +
                        +--longKeyword=value     +or     -c=value    +if 'c' is the short keyword +
      +
  • +so, after compiling the executable for Lesson 3 (make +lesson3 at system prompt in Unix), you can try to type +in
  • + +
                         +SecondBitEA +
    and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). +But you can now type in +
                         +SecondBitEA --vecSize=100 +
    and see the output of the optimization of OneMax on 100-bit bitstings. +
      +
  • +Take a look at all available parameters by typing in
  • + +
                         +SecondBitEA --help +
    or by going into the code: all parameter inputs have been grouped in +the +read_param function. +
      +
  • +After running the algorithm, a new file has been created, named SecondBitEA.status: +it contains the list of all actual parameters used, and can directly be +used as parameter input file: change the file name (e.g. to SecondBitEA.param), +edit it, change whichever parameter you want, and type in
  • + +
                          + +SecondBitEA @SecondBitEA.param +
    and you will see all values that you defined into the file taken into +account. +
      +
  • +The priority remains to the command-line, +so you can still override the values in the parameter file by giving a +new value directly on the command-line.
  • +
+Programming parameter input: +
the code of SeconBitEA provides examples of parameters reading. Lets +take the example of the random number generator seed. +
    +
  • +You first need to declare it +in the main_function. As parameter +reading will be done in the read_param +function, you need to pass it the variable seed. Note that read_param receives +it by reference, as it is going +to modify its value!
  • + +
  • +In read_param, you need first to declare +an eoParser object (it needs the standard argc and argv in its constructor).
  • + +
    Then, declare a parameter +of type uint32 (32-bits integer), +and read it  directly from the parser, using method create_param. +The arguments are obvious: default value, long keyword, comment (that will +appear in the help message and in the output "status" file if any). +
  • +Finally, you need to assign the +value to the variable _seed (hence modifying the original seed variable).
  • +
+ +
+
eoState: +saving and loading +
You might have noticed in the  read_param +described above a new parameter +named load_name. +Now if you go to the init section of +the code, you will see an alternative way of initializing +the population: if load_name is an empty string, +then we do as in the preceding example and use an eoInitFixedLength object. +However, if a load_name name was entered, the population is read through +the inState.load(load_name) +instruction. Moreover, the comment says "Loading pop and +rng". +

This is made possible using the eoState +class. eoState +objects maintain references to eoObjects +that have both an input method (readFrom) +and an output method (printOn), +i.e. that derive from the base class eoPersistent. +You must first register +object into a state, and can then save them to a (text) file, and later +read them from that file using the load +method, as done here. +
Of course, you can call the save +method for an eoState +object anywhere in the code. But the checkpointing +mechanism offers you better ways to do that - and it's so easy .... +

+


eoCheckpoint: +every generation I'd like to ... +
The checkpointing mechanism is a very powerfull +construct to perform some systematic actions +every generation - like saving things +(using eoState objects described above), computing statistics +on the population, updating +dynamical parameters or displaying +information. +

eoCheckpoint +objects are eoContinue +objects that contain pointers to different +types of objects. When their operator() +method is called (i.e. every generation in the examples up to now), they +first call the operator() +methods of all object they contain, and then return their result as an +eoContinue +object (i.e. should we continue or stop). +
Programming: To +do something every generation, you simply need to add +an object whose operator() +does what you want to the eoState that you will use as continuator in the +algorithm. +
+


eoCheckpoint: +Stopping +
The eoContinue +part of an eoCheckpoint +is a single object, passed to the +constructor. If you want more that one stopping criterion, use an eoCombinedContinue +object as described in Lesson2. +
+
+
eoCheckpoint: Computing +statistics +
Statistics are computed using eoStat +objects, i.e. functor objects whose operator() +receives as argument a reference to a population as argument, and can hence +compute whatever is needed over that population. eoStat +objects are templatized +over the type of what they compute (e.g. double, +or pair<double>, +or ...). But looking at the inheritance +diagram of the eoStat +class, you find that eoStat +objects are also eoValueParam +objects. And this allows eoStat +to be used within eoMonitor +object, and hence displayed +to the user! +

Available statistics: Some widely +used statistics are already available (and of course you can build you +own!). +

    +
  • +eoBestFitnessStat returns +the fitness value of the best individual in the population (of type FitnessType, +whatever this is).
  • + +
  • +eoAverageStat and eoSecondMomentStat +respectiveley return the average (type double, assumes that FitnessType +is castable to a double) and a pair made of the average and the standard +deviation (type pair<double>) +of the fitnesses in the populations.
  • + +
  • +eoDiversityStat returns the +diversity in the population: asssuming that there is a distance function +defined among individuals, it returns the average inter-individuals distance. +See also Exercise 2.
  • +
+Programming: To compute some statistics +within your algorithm, simply declare +the corresponding eoStat objects, and add +them to the eoCheckpoint you +use in the algorithm. +

Note: actually, there are 2 disctinct +classes that compute and gove access to statistics: eoStat +and eoSortedStat. As its name +indicate, the latter is used whenever computing the statistics require +a sorted population: not only this avoids to sort the population many times, +but also it avoids changing the order of the population at all as eoSortedStat +work on a temporary vector of fitnesses . But as +far as their usage is concerned, its makes no difference. +
+


+
eoCheckpoint: Displaying +eoParameters +
The eoMonitor +objects are used to display a set of eoValueParam +objects. +

Available monitors: A few monitors +are available in th eEO distribution: +

    +
  • +eoStdoutMonitor displays its +parameters in text format on the screen. The +(optional) boolean value in the constructor modifies the output: when true +(the default), vebose output is used, with one line per parameter. When +false, parcimonious output displays one line for all parameters.
  • + +
  • +eoStdoutMonitor writes its +parameters in text format in a file. A file +name is required in the constructor, and an optional separator character +can be added (default is ','). Note that the file is overwritten by next +call to the same program.
  • + +
  • +eoGnuplot1DMonitor displays +its parameters in graphical format on the screen +by calling the gnuplot program, +and as of today, only works in the Unix version of EO (as always, volunteers +are welcome to port that to MS Windows). It takes an optional filename +as input, as communication of data with gnuplot +is done through a file. If no filename is provided, the file will be erased +at the end of the run, while it is otherwise kept (though it will be overwritten +by next call to the same program).
  • +
+ +


Programming: To display something +while the algorithm is running, you need to declare +an eoMonitor object, add +some objects (that must be eoValueParam +objects) to that monitor, and of course add +the monitor to the eoCheckpoint +you use in the algorithm. +
+


+
eoCheckpoint: Updating +things +
The last type of objects that  eoCheckpoint +can handle are eoUpdater +objects. You should simply encapsulate in an eoUpdater +anything you wish to do which does not fit into one of the above category. +Note that their operator() method +does not receive any argument. +

Available monitors: A few updaters +are available in the EO distribution: +

    +
  • +eoIncrementor A simple updater +which maintains a counter (an eoValueParam +that needs to be created beforehand, and passed in the constructor). It +is incremented everytime the operator() +method is called (every generation at the moment). You can of course also +give an increment in the constructor (1 by default).
  • + +
  • +eoCountedStateSaver +and eoTimedStateSaver can +be used to save some existing eoState +(see above) to a file regularly, either based on the +generation count (e.g. every 4 generations) or based on the clock (e.g. +every 5 seconds).
  • +
+Programming: +
A very simple example of using an eoUpdater +is given in the code for SecondBitEA: First declare +an eoValueParam object, then +use +it to construct an eoIncrementor +that you must add to the eoCheckpoint +in order to activate its update. You can then use the parameter for your +purpose, for instance as a first coordinate for a monitor. +
Note also how to use the statesavers: first declare +a state, then register +whatever you think necessary to that state, then pass +the state to some state-saver - and don't forget to add +the statesavers to the current eoCheckpoint. +
+
+
Exercice 1: +
    +
  • +The code of SecondBitEA +display things in the current window in text format. Replace the eoFileMonitor +by an eoGnuplot1DMonitor +and watch the graphical output (Unix +systems with gnuplot +installed only, sorry).
  • + +
  • +Note that you must also replace the eoSecondMomentStat +by an eoAverageStat, +otherwise the standard deviations won't make any sense here.
  • + +
  • +Please try to understand why the average is always +0 before taking alook at the solution (file exercise1.cpp).
  • + +
  • +Then run
  • + +
              +exercise1 --vecSize=1000 --maxGen=1000 +
    to get a chance to see something hapenning before +the program ends!
+ +
Exercice 2: +
Write the eoDiversityStat +stat computation and test it. Thanks to send us the code! +
+
+
Exercice 3: +
Write the code for an eoGnuplot1DwithErrorbarsMonitor +that would take into account the standard deviations and display them as +errorbars. +
Again, send us the code afterwards, thanks :-) +
+
+
Lessons learned: +
    +
  • +Value of program parameters can be set at run-time +using the eoParser +class.
  • + +
  • +Snapshots of the algorithms can easily +be saved (and restored) +thanks to the eoState +class.
  • + +
  • +The eoCheckpoint +mechanism let you do things every generation +without modifying existing algorithms, by simply writing the necessary +code and encapsulating it into an object that eoCheckpoint +is aware of, that are at the moment the following:
  • + +
  • +computing statistics, displaying +parameters +(e.g. statistics),  saving the +(eo)State +of the program.
  • +
+In next lesson you will find out that many adaptive +techniques (the state-of-the-art in Evolutionary Computation) can easily +be programmed through the eoUpdater +construct. +
+
Lesson 2 - +Lesson +4 - +Main page - +Top-Down +- Bottom-up - Hints +- EO documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Mon Nov 27 8:49:12 CET 2000 + + diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html new file mode 100644 index 000000000..5803ae132 --- /dev/null +++ b/eo/tutorial/html/eoOperators.html @@ -0,0 +1,56 @@ + + + + + + Variation Operators + + + +

+Variation Operators

+Variation operators modify individuals, or, equivalently, move them in +the search space. They are almost always stochastic, +i.e. they generate random variations. Variation operators are classified +depending on the number of arguments they use and/or modify. +

Variation operators involving two individuals are called +crossover operators. +They can either modify one of the parents according +to the material of the other parent, or modify both parents. In EO, the +former are called Binary operators and the latter Quadratic operators. +
  +

Variation operators involving one single individual are called mutation +operators. +

Note that in EO you can define and use variatio operators that generate +any number of offspring fromany number of parents. These are called general +operators, and require advanced knowledge of EO. +

Crossover +
Crossover operators involve two parents, and can modify one of them, +or both of them. +

Using crossover operators +

Mutation +
Mutation operators modify one single individual. The corresponding +EO class is called eoMonOp. +

+Using mutation operators

+The standard EO genotypes (bistrings and real vectors) have pre-defined +mutation operators. +
  +

+Writing a mutation operator

+  +

  +

General +Operators +
  +
  +
  +

+


+
+Marc Schoenauer
+ +
Last +modified: Mon Oct 30 18:24:39 CET 2000 + + diff --git a/eo/tutorial/html/eoOutput.html b/eo/tutorial/html/eoOutput.html new file mode 100644 index 000000000..2a9bc810a --- /dev/null +++ b/eo/tutorial/html/eoOutput.html @@ -0,0 +1,19 @@ + + + + Output + + + +

Output

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 19:29:19 CET 2000 + + + diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html new file mode 100644 index 000000000..7bae8b387 --- /dev/null +++ b/eo/tutorial/html/eoProgramming.html @@ -0,0 +1,256 @@ + + + + + + EO Programming guide + + +Tutorial main page - +Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+

+EO Programming guide

+Templates, +Functors, +STL +Library, random numbers, EO programming style! +
+
+
Templates +
Most EO code si written using templates. This allows to write generic +code, i.e. involving a class which doesn't have to be known when writing +the code -- but only when compiling it. In some sense this is similar to +naming variables in algebra: you can write a lot of equations involving +some variable $x$ without knowing even it if will be an integer or a float +(or a matrix or ...). The main basic type that is templatized in EO is +the fitness: an EO object is some object which has a fitness of some type +F that can be anything. The definition for that is (seeEO.h) +

template<F> class EO +

The idea is that, later in your code, you can declare for instance as +in FirstBitGA.cpp +

typedef eoBin<double> +Genotype; +

meaning that in that file, you will manipulate as Genotype +objects that are EO objects whosefitness +is a double. +

Whereas the advantages are obvious (writing generic reusable code instead +of having to rewrite the same pieces of code for different types), there +are some drawbacks: namely, it makes some of the compiler error messages +hard to understand; and it forbids the compilation of most parts of EO +into an object library file, as the actual types are not known in advance. +

+


+
Functors +

Though EO is a library, it contains almost no functions! +
EO only contains functors, that are objects which have a method called +operator(). +Such objects are used  as if they were a function, but the big differences +are that +

    +
  • +functors are functions with private data
  • + +
  • +you can have different funtors objects of the same class, i.e. you can +use the same functionality with different parameters
  • + +
  • +you can heave a hierarchy of functors objects, which means that you have +a hierarchy of functions with defaults behaviors and specialized sub-functions
  • + +
  • +...
  • +
+Functors are so intimately linked to EO that a base class (eoFunctorBase) +has been designed to hold all functors. This base class is itself divided +into three derived class. These classes tell you immediately what kind +of arguments the operator() method requires +and what kind of result it produces. See EO conventions, +and +the inheritance diagram of class +eoFunctorBase. +

Example +

A good example is given by the eoEvalFuncPtr +class +

class MyClass +
{ ... +
    void operator()(ArgType +arg) +
       { +
            +// do what you have to do +
       } +
}; // end of class declaration +

is used  later in the code in something  like +
  +

ArgType myArgument; +
MyClass myObject;    // myObject +is an object of class MyClass ... +
myObject(myArgument);  // calls method +operator() of object myObject with argument myArgument ... +
  +
  +
  +

+Why not plain C functions?

+Consider for instance variation operators. Of course, we could declare +them as function acting on some objects. +

Blabla +

+


+
A very brief +introduction to STL +

All EO heavily relies on STL, the Standard +Template Library. +
But you don't have to know more than a few words +of STL to use EO (like with "hello", "please" and "goodbye" you +can survive in a foreign country :-) and even to contribute to new EO features. +

You will only find here the basics of STL that you will need to understand +most of EO code - and to guess what the parts you don't understand are +actually doing. Don't worry, I don't +understand everything :-) +

STL provides the user with container +and algorithms. And you can apply (almost) +all algorithms on (almost) all containers. +

Containers +
Containers are high level data types used to hold simpler data - the +most widely used example of a container is the vector +construct. +
The use of STL containers relieve the user from memory management. +

    +
  • +vector The +most widely used container is a one-dimensional array of items.
  • + +
    Data manipulation: suppose v +is an STL vector<AtomType>. +Then +
    v[i] +is the ith element of v, as in standard C arrays +
    v.size() +is the number of elements of v +
    v.push_back(atom) +appends the atom +at end of v, +provided of course that atom +is of type AtomType +
    blabla +
  • +pair
  • + +
    This simple container allows you to hold two +data types together. It is very handy for temporary data handling. Assuming +p is a pair<AtomType1, +AtomType2>, +
    p.first() +and p.second()  +refer to the encapsulated data, of respective types AtomType1and +AtomType2. +
  • +Blabla
  • +
+There are many other types of containers that are not used in EO and that +we will not present here. +

STL Algorithms +
Algorithms are functions acting on containers - the most widely used +example of a STL algorithm is the sort +function. +
Blabla +

Drawbacks +
The main drawback I see in using STL is that it makes it almost +impossible +to use a debugger normally: whereas acess to data is made simple +to the progammer, data structures are actually so complex, and debuggers +so willing to display everything that you get lines of template instanciation +when asking your debugger what is inside some container! For instance I +could never visualize some +v[i] +with gbd, v +being an STL vector! +
But there nonehteless are so many advantages !!! +

+


+
Random +numbers +
Evolutionary Algorithms make intensive use of random numbers. Random +numbers are simulated in computers by using pseudo-random +number generators (RNGs for short), i.e. functions that return series of +numbers who look random (w.r.t. some statistical criteria). +

To make sure the random number generator is as good as possible, and +to ensure reproducibility of the results across diffrerent platforms, EO +has its own RNG, the ``Mersenne Twister'' +random number generator MT19937 (thanks to Takuji +Nishimura, see eoRNG.h +comments). +

Though you can define and use as many RNGs as you wish in EO, the library +also provides you with a global RNG termed rng: using only that single +RNG in all calls to random numbers allows one to be able to reproduce +a given run: +

    +
  • +as strange it seems for a random algorithm, it is mandatory for debugging +purposes
  • + +
  • +random numbers are computed starting from a seed - starting from the same +seed will lead to the same series of pseudo-random numbers, and hence to +the same results of the algorithms. All examples in this tutorial will +use the RNG seeding procedure, see e.g. in Lesson1.
  • + +
  • +to simulate "true" random runs, you can just seed the RNG with a machine-clock +realted number, e.g. calling time(0), as done for isntance in Lesson3 +(and after).
  • +
+As RNGs only produce (by definition) numbers that are uniformly distributed +integers between 0 and some maximal number, EO provides you with random +numbers follwing different probability distribution +(e.g. floating point following normal +distribution). +

EO also provides random_generators +that can be used in STL call to generate series of random numbers, as in +eoPop +initializers. +

+


+
EO conventions +and naming style +
A few naming conventions should help you to navigate more easily through +EO: +
    +
  • +The name of local varoiables shoudl start with a lower case letter
  • + +
  • +The name of the parameters to a function shoudl start with an underscore +(_)
  • + +
    The initialization parameters of constructors, for instance,  +shoudl be named from the names of the variables they are used to initialize. +
  • +The names of classes should start with eo + an Uppercase letter
  • + +
  • +Blabla
  • +
+ +
+
Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Mon Nov 6 07:01:57 CET 2000 + + diff --git a/eo/tutorial/html/eoRepresentation.html b/eo/tutorial/html/eoRepresentation.html new file mode 100644 index 000000000..f572f1b41 --- /dev/null +++ b/eo/tutorial/html/eoRepresentation.html @@ -0,0 +1,19 @@ + + + + Representation + + + +

Representation

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 19:28:01 CET 2000 + + + diff --git a/eo/tutorial/html/eoSGA.html b/eo/tutorial/html/eoSGA.html new file mode 100644 index 000000000..2d22f7946 --- /dev/null +++ b/eo/tutorial/html/eoSGA.html @@ -0,0 +1,157 @@ + + + + + + eoSGA.h + + +Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+eoSGA.h

+ + + + + +
//----------------------------------------------------------------------------- +
// eoSGA.h +
//----------------------------------------------------------------------------- +
#ifndef _eoSGA_h +
#define _eoSGA_h +
#include <eoOp.h> +
#include <eoContinue.h> +
#include <eoPop.h> +
#include <eoSelectOne.h> +
#include <eoSelectPerc.h> +
#include <eoEvalFunc.h> +
#include <eoAlgo.h> +
#include <apply.h> +
/** The Simple Genetic Algorithm, following +Holland and Goldberg  +
*  Needs a selector (class eoSelectOne) +a crossover (eoQuadratic,  +
*      i.e. a 2->2 +operator) and a mutation with their respective rates,  +
*      of course +an evaluation function (eoEvalFunc) and a continuator  +
*      (eoContinue) +which gives the stopping criterion. Performs full +
*      generational +replacement. +
*/  +
template <class EOT> +
class eoSGA : public eoAlgo<EOT> +
{ +
public : +
 // added this second ctor as +I didn't like the ordering of the parameters +
 // in the one above. Any objection +:-) MS +
eoSGA( +
       eoSelectOne<EOT>& +_select, +
       eoQuadraticOp<EOT>& +_cross, float _crate, +
       eoMonOp<EOT>& +_mutate, float _mrate, +
       eoEvalFunc<EOT>& +_eval, +
       eoContinue<EOT>& +_cont) +
     : cont(_cont),  +
       mutate(_mutate),  +
       mutationRate(_mrate), +
       cross(_cross), +
       crossoverRate(_crate), +
       select(_select), +
       eval(_eval) +{}
+ + + + + +
 void operator()(eoPop<EOT>& +_pop) +
 { +
    eoPop<EOT> offspring; +
    do { +
         +select(_pop, offspring); +
         +unsigned i; +
         +for (i=0; i<_pop.size()/2; i++)  +
             +{   // generates 2 offspring from two parents +
                 +if ( rng.flip(crossoverRate) )  +
                   +{  +
                       +cross(offspring[2*i], offspring[2*i+1]); +
                   +} +
             +} +
         +for (i=0; i < _pop.size(); i++)  +
             +{ +
                 +if (rng.flip(mutationRate) )  +
                     +{ +
                         +mutate(offspring[i]); +
                     +} +
             +} +
         +_pop.swap(offspring); +
         +apply<EOT>(eval, _pop); +
     } while (cont(_pop)); +
 } +
 
+ + + + + +
private : +
 eoContinue<EOT>& cont; +
 eoMonOp<EOT>& mutate; +
 float mutationRate; +
 eoQuadraticOp<EOT>& cross; +
 float crossoverRate; +
 eoSelectPerc<EOT> select; +
 eoEvalFunc<EOT>& eval;
+ + + + + +
}; +
#endif
+ +
Back to Lesson 1 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sun Nov +19 19:36:21 2000 + + diff --git a/eo/tutorial/html/eoSelect.html b/eo/tutorial/html/eoSelect.html new file mode 100644 index 000000000..a415b460c --- /dev/null +++ b/eo/tutorial/html/eoSelect.html @@ -0,0 +1,19 @@ + + + + Selection + + + +

Selection

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 17:51:55 CET 2000 + + + diff --git a/eo/tutorial/html/eoStop.html b/eo/tutorial/html/eoStop.html new file mode 100644 index 000000000..4e37700f4 --- /dev/null +++ b/eo/tutorial/html/eoStop.html @@ -0,0 +1,25 @@ + + + + Input / Output + + + +

Input / Output

+ +

+ +

Stopping criteria

+ +

+ +

Displaying statistics

+ +
+
Marc Schoenauer
+ + +Last modified: Tue Oct 31 18:32:22 CET 2000 + + + diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html new file mode 100644 index 000000000..1e8470f3c --- /dev/null +++ b/eo/tutorial/html/eoTopDown.html @@ -0,0 +1,88 @@ + + + + + + EO - The Top-Down approach + + +Tutorial main page +- +Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+

+EO - The Top-Down approach

+ +


Congratulations - You have chosen the top-down approach!  This +means that you want to start from something that already works, and gradually +learn about the more complex constructs. We have prepared a series of "lessons" +for you. +

    +
  • +Lesson 1 - a gentle introduction to the EO +way: your first steps into EO representations +using a simple generational GA. Please, spend +the necessary time on that one, since all basic constructs presented +there are used throughout EO.
  • + +
  • +Lesson 2 - encapsulate, +encapsulate, and try more sophisticated selection/replacement +mechanisms, as well as multiple  operators
  • + +
  • +Lesson 3 - The same algorithms, but with improved +input/outputs: user-friendly input (i.e. without +the need to recompile!) of algorithm parameters, +and checkpointing (display +of on-line statistics, save +and +restore +populations, +restart stopped runs, +...).
  • + +


    Current version (Nov. 29, 2000) stops here, but here are the plans +(sujected to many changes, of course!) +
      +

  • +Lesson 4 - More about checkpointing: write your first adaptive +mechanism, and find out how easy it is to update +and monitor dynamic +parameters
  • + +
  • +Lesson 5 - more general operators: e.g. binary, n-ary, or even specific +mate selection (your brain and my beauty)!
  • + +
  • +Lesson 6 - why not go parallel? From the simple asynchronous SSGA to the +more sophisticated island model (no totally distributed population yet).
  • + +
  • +Lesson 7 - ...
  • +
+Of course, in each lesson, you have links to the Bottom-Up page of the +corresponding component of an EA you are modifying. +
( ... Well, to tell you the truth, as of today, november 28, this is +not true :-) +
+
+
Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last modified: Fri Nov 28 +2000  + + diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html new file mode 100644 index 000000000..7f9d20942 --- /dev/null +++ b/eo/tutorial/html/eoTutorial.html @@ -0,0 +1,178 @@ + + + + + + Tutorial EO + + +Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+

+EO Tutorial

+Welcome to EO - the Evolving Objects library. What is this tutorial good +for? +
Well,  the short term idea here is to help you build +your own Evolutionary Algorithms using EO - while the long term +idea is that you will be able to contribute to EO, and ultimately write +our +EAs :-) +

+About this tutorial

+This tutorial can be used in 2 different ways: top-down and bottom-up. +
    +
  • +Top-down means you start from a very +simple, ready-to-run algorithm, and gradually modify it, making +it both more powerful and more complex.
  • + +
  • +Bottom-up means you start by examining the +components +of an EA one by one, down to the level of complexity you feel comfortable +with, and then build the whole algorithm using those components you need +(or the one you are mastering). Such approach might be viewed as going +through a simplified user guide, too.
  • +
+However, it is strongly recommended +that you take some time on the first lesson of the Top-down approach to +get familiar with the basic concepts that are used throughout EO. Anyway, +as of today, November 29, the Bottom-up page is not written yet :-) +

Related documents +

    +
  • +There are of course a few (very few) programming +hints that you should know.
  • + +
  • +THe EO documentation - automatically +generated from the comments in the code - is very helpful, to get an idea +of the inheritance diagrams of EO classes, and to quickly reach some specific +part of the code.
  • + +
    The top page of each class documentation is for instance the inheritance +diagram of the class, and you'll learn a lot by simply looking at it. +
  • +And, last but not least, we assume you know approximately that an Evolutionary +Algorithm looks like this, but otherwise you can try this very +brief introduction).
  • +
+ +


Colors and navigation: +

You will see this diagram in quite many places, as for instance at the +top of all examples - usually it will be clicable and will help you navigate +among the different parts of an EO program. See the brief +introduction to Evolutionary Computation for a detailed explanation. +

+

+ +

But in the text itself, colors are important, +as they will be used throughout this tutorial to clearly mark which part +of the algorithm we are discussing. So please keep in mind that, whereas +orange +is for emphasis, +

    +
  • +Yellowish is for representation, +i.e. the choice of the genotype
  • + +
  • +Magenta is for the stochastic +operators that are representation-dependent, +i.e. initialisation and variation operators +(crossover, mutation +and the like).
  • + +
  • +Green is for the implementation of Darwinism, +i.e. the way the individuals are selected +for reproduction and survive.
  • + +
  • +Red is for evaluation, i.e. the computation +of the fitness of all individuals
  • + +
  • +Blue is for interactions of the user and the +program, as for instance choice of stopping criterion, +on-line display of nice statistics or initial +choice +of all program parameters.
  • + +
  • +Brown is for everything that is NOT part of +any of the above, i.e. random number generator, or basic C++/STL syntax +.
  • + +
  • +Note that pink will be used to desctibe the +syntax of compile orders (i.e. at the oepratoring system level, see e.g. +below).
  • + +
  • +Last, but not least, all links into EO documentation +will use the Helvetica typeface, like this line you are now reading.
  • +
+ +
    +
  • +an interface that would allow you to build your Evolutionary Programs by +a few clics; such a thing does exist, is called EASEA, +and is complementary to this tutorial as it helps the user to build some +simple EO programs from simple description. But there are things that EASEA +cannot do, and you will have to do it yourself and will need to imcrease +your knowledge about EO for that.
  • +
+ +

+Before you start

+You should of course have downloaded and installed the whole EO +library (how did you get this file if not???). +
So we'll assume that you are now in the Tutorial directory, and that +your prompt looks something like +

(myname@myhost) EOdir/Tutorial % +

so you should now type in +

make lesson1 +

and see something like +

(myname@myhost) +EOdir/Tutorial % make lesson1 +
c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstBitGA.cpp +
c++ -Wall -g -o FirstBitGA FirstBitGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +
c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstRealGA.cpp +
c++ -Wall -g -o FirstRealGA FirstRealGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +

and two now executable files should have appeared in the subdirectory +Lesson1, namely FirstBitGA +and FirstRealGA (see First +lesson to know more about these two ready-to-run programs). If this +doesn't work, please go back to the main EO directory and run the installation +program. +

You should also test that you can access the EO documentation in the +menu line below: you might not need to go there immediately, but just in +case you make rapid progress ... This menu bar should be on all pages of +this tutorial, allowing you to navigate easily. +

Last, but not least: EO is improving only  from the good will of +contributors. This is also true for this tutorial: If you find anything +that you think could be improved, you are welcome to e-mail +me. +

+

Enjoy! +


Top-Down page +- Bottom-up page - Programming +hints - EO +documentation
+ +
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 28 2000  + + diff --git a/eo/tutorial/html/index.html b/eo/tutorial/html/index.html new file mode 100644 index 000000000..093aba7db --- /dev/null +++ b/eo/tutorial/html/index.html @@ -0,0 +1,178 @@ + + + + + + Tutorial EO + + +Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+

+EO Tutorial

+Welcome to EO - the Evolving Objects library. What is this tutorial good +for? +
Well,  the short term idea here is to help you build +your own Evolutionary Algorithms using EO - while the long term +idea is that you will be able to contribute to EO, and ultimately write +our +EAs :-) +

+About this tutorial

+This tutorial can be used in 2 different ways: top-down and bottom-up. +
    +
  • +Top-down means you start from a very +simple, ready-to-run algorithm, and gradually modify it, making +it both more powerful and more complex.
  • + +
  • +Bottom-up means you start by examining the +components +of an EA one by one, down to the level of complexity you feel comfortable +with, and then build the whole algorithm using those components you need +(or the one you are mastering). Such approach might be viewed as going +through a simplified user guide, too.
  • +
+However, it is strongly recommended +that you take some time on the first lesson of the Top-down approach to +get familiar with the basic concepts that are used throughout EO. Anyway, +as of today, November 29, the Bottom-up page is not written yet :-) +

Related documents +

    +
  • +There are of course a few (very few) programming +hints that you should know.
  • + +
  • +THe EO documentation - automatically +generated from the comments in the code - is very helpful, to get an idea +of the inheritance diagrams of EO classes, and to quickly reach some specific +part of the code.
  • + +
    The top page of each class documentation is for instance the inheritance +diagram of the class, and you'll learn a lot by simply looking at it. +
  • +And, last but not least, we assume you know approximately that an Evolutionary +Algorithm looks like this, but otherwise you can try this very +brief introduction).
  • +
+ +


Colors and navigation: +

You will see this diagram in quite many places, as for instance at the +top of all examples - usually it will be clicable and will help you navigate +among the different parts of an EO program. See the brief +introduction to Evolutionary Computation for a detailed explanation. +

+

+ +

But in the text itself, colors are important, +as they will be used throughout this tutorial to clearly mark which part +of the algorithm we are discussing. So please keep in mind that, whereas +orange +is for emphasis, +

    +
  • +Yellowish is for representation, +i.e. the choice of the genotype
  • + +
  • +Magenta is for the stochastic +operators that are representation-dependent, +i.e. initialisation and variation operators +(crossover, mutation +and the like).
  • + +
  • +Green is for the implementation of Darwinism, +i.e. the way the individuals are selected +for reproduction and survive.
  • + +
  • +Red is for evaluation, i.e. the computation +of the fitness of all individuals
  • + +
  • +Blue is for interactions of the user and the +program, as for instance choice of stopping criterion, +on-line display of nice statistics or initial +choice +of all program parameters.
  • + +
  • +Brown is for everything that is NOT part of +any of the above, i.e. random number generator, or basic C++/STL syntax +.
  • + +
  • +Note that pink will be used to desctibe the +syntax of compile orders (i.e. at the oepratoring system level, see e.g. +below).
  • + +
  • +Last, but not least, all links into EO documentation +will use the Helvetica typeface, like this line you are now reading.
  • +
+ +
    +
  • +an interface that would allow you to build your Evolutionary Programs by +a few clics; such a thing does exist, is called EASEA, +and is complementary to this tutorial as it helps the user to build some +simple EO programs from simple description. But there are things that EASEA +cannot do, and you will have to do it yourself and will need to imcrease +your knowledge about EO for that.
  • +
+ +

+Before you start

+You should of course have downloaded and installed the whole EO +library (how did you get this file if not???). +
So we'll assume that you are now in the Tutorial directory, and that +your prompt looks something like +

(myname@myhost) EOdir/Tutorial % +

so you should now type in +

make lesson1 +

and see something like +

(myname@myhost) +EOdir/Tutorial % make lesson1 +
c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstBitGA.cpp +
c++ -Wall -g -o FirstBitGA FirstBitGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +
c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstRealGA.cpp +
c++ -Wall -g -o FirstRealGA FirstRealGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +

and two now executable files should have appeared in the subdirectory +Lesson1, namely FirstBitGA +and FirstRealGA (see First +lesson to know more about these two ready-to-run programs). If this +doesn't work, please go back to the main EO directory and run the installation +program. +

You should also test that you can access the EO documentation in the +menu line below: you might not need to go there immediately, but just in +case you make rapid progress ... This menu bar should be on all pages of +this tutorial, allowing you to navigate easily. +

Last, but not least: EO is improving only  from the good will of +contributors. This is also true for this tutorial: If you find anything +that you think could be improved, you are welcome to e-mail +me. +

+

Enjoy! +


Top-Down page +- Bottom-up page - Programming +hints - EO +documentation
+ +
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 28 2000  + + diff --git a/eo/tutorial/html/lesson1.ps b/eo/tutorial/html/lesson1.ps new file mode 100644 index 000000000..d71bcc539 --- /dev/null +++ b/eo/tutorial/html/lesson1.ps @@ -0,0 +1,1952 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 54 72 535 761 +%%Creator: Mozilla (NetScape) HTML->PS +%%DocumentData: Clean7Bit +%%Orientation: Portrait +%%Pages: 5 +%%PageOrder: Ascend +%%Title: Tutorial: Lesson 1 +%%EndComments +%%BeginProlog +[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright + /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one + /two /three /four /five /six /seven /eight /nine /colon /semicolon + /less /equal /greater /question /at /A /B /C /D /E + /F /G /H /I /J /K /L /M /N /O + /P /Q /R /S /T /U /V /W /X /Y + /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c + /d /e /f /g /h /i /j /k /l /m + /n /o /p /q /r /s /t /u /v /w + /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright + /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior + /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf + /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla + /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde + /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex + /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring + /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis + /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave + /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def +/c { matrix currentmatrix currentpoint translate + 3 1 roll scale newpath 0 0 1 0 360 arc setmatrix } bind def +/F0 + /Times-Roman findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f0 { /F0 findfont exch scalefont setfont } bind def +/F1 + /Times-Bold findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f1 { /F1 findfont exch scalefont setfont } bind def +/F2 + /Times-Italic findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f2 { /F2 findfont exch scalefont setfont } bind def +/F3 + /Times-BoldItalic findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f3 { /F3 findfont exch scalefont setfont } bind def +/F4 + /Courier findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f4 { /F4 findfont exch scalefont setfont } bind def +/F5 + /Courier-Bold findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f5 { /F5 findfont exch scalefont setfont } bind def +/F6 + /Courier-Oblique findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f6 { /F6 findfont exch scalefont setfont } bind def +/F7 + /Courier-BoldOblique findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding isolatin1encoding def + currentdict end +definefont pop +/f7 { /F7 findfont exch scalefont setfont } bind def +/rhc { + { + currentfile read { + dup 97 ge + { 87 sub true exit } + { dup 48 ge { 48 sub true exit } { pop } ifelse } + ifelse + } { + false + exit + } ifelse + } loop +} bind def + +/cvgray { % xtra_char npix cvgray - (string npix long) + dup string + 0 + { + rhc { cvr 4.784 mul } { exit } ifelse + rhc { cvr 9.392 mul } { exit } ifelse + rhc { cvr 1.824 mul } { exit } ifelse + add add cvi 3 copy put pop + 1 add + dup 3 index ge { exit } if + } loop + pop + 3 -1 roll 0 ne { rhc { pop } if } if + exch pop +} bind def + +/smartimage12rgb { % w h b [matrix] smartimage12rgb - + /colorimage where { + pop + { currentfile rowdata readhexstring pop } + false 3 + colorimage + } { + exch pop 8 exch + 3 index 12 mul 8 mod 0 ne { 1 } { 0 } ifelse + 4 index + 6 2 roll + { 2 copy cvgray } + image + pop pop + } ifelse +} def +/cshow { dup stringwidth pop 2 div neg 0 rmoveto show } bind def +/rshow { dup stringwidth pop neg 0 rmoveto show } bind def +/BeginEPSF { + /b4_Inc_state save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage {} def + 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel 1 ne + { false setstrokeadjust false setoverprint } if + } if +} bind def +/EndEPSF { + count op_count sub {pop} repeat + countdictstack dict_count sub {end} repeat + b4_Inc_state restore +} bind def +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +/pagelevel save def +54 0 translate +%%EndPageSetup +newpath 0 72 moveto 481 0 rlineto 0 689 rlineto -481 0 rlineto closepath clip newpath +0 748.4 moveto +12 f0 +(Lesson 2) show +42.9 748.4 moveto +12 f0 +( - ) show +52.8 748.4 moveto +12 f0 +(Tutorial main page) show +144.1 748.4 moveto +12 f0 +( - ) show +154 748.4 moveto +12 f0 +(Top-Down page) show +232.3 748.4 moveto +12 f0 +( - ) show +242.2 748.4 moveto +12 f0 +(Bottom-up page) show +319.8 748.4 moveto +12 f0 +( - ) show +329.7 748.4 moveto +12 f0 +(Programming hints) show +422 748.4 moveto +12 f0 +( -) show +428.9 748.4 moveto +14 f0 +(EO) show +0 732.9 moveto +14 f0 +(documentation) show +83.2 732.9 moveto +12 f0 +( ) show +0 723.4 moveto +481 0 rlineto 0 -1.4 rlineto -481 0 rlineto closepath fill +146.5 680.9 moveto +24 f1 +(Tutorial: Lesson 1) show +0 651.7 moveto +12 f0 +(This lesson will let you ) show +18.1 629.2 moveto +3.3 3.3 c fill +28 625.1 moveto +12 f0 +(run) show +43.9 625.1 moveto +12 f0 +( your first Evolutionary Algorithm written within EO Library, choosing between evolving) show +28 611.8 moveto +12 f0 +(bitstrings) show +72.6 611.8 moveto +12 f0 +(, or evolving ) show +136.5 611.8 moveto +12 f0 +(vectors of real numbers) show +249.4 611.8 moveto +12 f0 +(,) show +252.3 611.8 moveto +12 f0 +( ) show +18.1 602.6 moveto +3.3 3.3 c fill +28 598.5 moveto +12 f0 +(browse) show +62.6 598.5 moveto +12 f0 +( through the code of these algorithms, or) show +257.2 598.5 moveto +12 f0 +( ) show +18.1 589.3 moveto +3.3 3.3 c fill +28 585.2 moveto +12 f0 +(follow the ) show +79.9 585.2 moveto +12 f0 +(guided tour) show +134.9 585.2 moveto +12 f0 +(.) show +137.8 585.2 moveto +12 f0 +( ) show +0 558.6 moveto +12 f0 +(Later you will be asked to ) show +18.1 536.1 moveto +3.3 3.3 c fill +28 532 moveto +12 f0 +(write your own ) show +104.3 532 moveto +12 f0 +(fitness function) show +178.6 532 moveto +12 f0 +(,) show +181.5 532 moveto +12 f0 +( ) show +18.1 522.8 moveto +3.3 3.3 c fill +28 518.7 moveto +12 f0 +(use different kinds of ) show +133.3 518.7 moveto +12 f0 +(selection procedures) show +231.6 518.7 moveto +12 f0 +( in the framework of a generational GA ) show +424.2 518.7 moveto +12 f0 +(evolution) show +28 505.4 moveto +12 f0 +(engine) show +59.9 505.4 moveto +12 f0 +(,) show +62.8 505.4 moveto +12 f0 +( ) show +18.1 496.2 moveto +3.3 3.3 c fill +28 492.1 moveto +12 f0 +(check that EO let you separate the ) show +194.9 492.1 moveto +12 f0 +(representation) show +262.8 492.1 moveto +12 f0 +( from the ) show +309.7 492.1 moveto +12 f0 +(evolution engine) show +390 492.1 moveto +12 f0 +(.) show +392.9 492.1 moveto +12 f0 +( ) show +0 463.2 moveto +14 f1 +(I want to run an Evolutionary Algorithm ) show +248.5 463.2 moveto +14 f1 +(now) show +0 436.2 moveto +12 f0 +(You can choose to run a standard ) show +162.9 436.2 moveto +12 f0 +(bitstring Genetic Algorithm) show +296.2 436.2 moveto +12 f0 +( \(as defined in Goldberg's book\) or a) show +0 422.9 moveto +12 f0 +(standard ) show +43.6 422.9 moveto +12 f0 +(real-valued genetic algorithm) show +184.8 422.9 moveto +12 f0 +(, as proposed in Micahlewicz's book. ) show +0 395.8 moveto +12 f0 +(If you have not already done what was recommended in the ) show +289.5 395.8 moveto +12 f0 +(Tutorial main page) show +380.8 395.8 moveto +12 f0 +( , do it ) show +414.4 395.8 moveto +12 f1 +(NOW) show +444.3 395.8 moveto +12 f0 +(. Then) show +0 382.5 moveto +12 f0 +(go to the Lesson1 sub-dir of the tutorial dir, and simply type at the system prompt ) show +0 355.9 moveto +10 f4 +(\(myname@myhost\) EOdir/Tutorial/Lesson1 % ) show +246 355.9 moveto +10 f4 +(FirstRealGA) show +312 355.9 moveto +12 f0 +( ) show +0 342.6 moveto +12 f0 +(or ) show +0 329.3 moveto +10 f4 +(\(myname@myhost\) EOdir/Tutorial/Lesson1 % ) show +246 329.3 moveto +10 f4 +(FirstBitGA) show +306 329.3 moveto +12 f0 +( ) show +0 302.7 moveto +12 f0 +(and something should happen. ) show +0 273.8 moveto +14 f1 +(What is happening?) show +0 246.8 moveto +12 f0 +(At the moment, the ) show +95.6 246.8 moveto +12 f0 +(FirstBitGA) show +149.6 246.8 moveto +12 f0 +( maximizes the number of ones in the bitstring \(also calls the) show +0 233.5 moveto +12 f0 +(OneMaxfunction) show +81.9 233.5 moveto +12 f0 +(, whose solution is, as you can guess, ) show +263.5 233.5 moveto +12 f0 +(11111111) show +311.4 233.5 moveto +12 f0 +(\), and the ) show +359.3 233.5 moveto +12 f0 +(FirstRealGA) show +420.6 233.5 moveto +12 f0 +( is) show +0 220.2 moveto +12 f0 +(maximizing \(the default action for EO is to maximize\) the inverse of the sum \(i.e. minimizing the) show +0 206.9 moveto +12 f0 +(sum\) of the square of its variables \(also called the ) show +241.2 206.9 moveto +12 f0 +(sphere function) show +315.5 206.9 moveto +12 f0 +(, whose solution is ... ) show +419.8 206.9 moveto +12 f0 +(all zeroes) show +465.4 206.9 moveto +12 f0 +(\). ) show +0 180.3 moveto +12 f0 +(And what you see on the screen when running one of these two programs is, in each case, the initial) show +0 167 moveto +12 f0 +(and final population of an Evolutionary run, one individual per line, its fitness first, then the number) show +0 153.7 moveto +12 f0 +(of items \(bits or real numbers\) of the genotype, and the genotype itself. The final population) show +0 140.4 moveto +12 f0 +(hopefully contains the solution in the discrete case, and is close to it in the continuous case. ) show +0 113.8 moveto +12 f0 +(You need now to take a look at either programs by browsing alone through the sources for) show +0 100.5 moveto +12 f0 +(FirstBitGA) show +54 100.5 moveto +12 f0 +( and ) show +77.3 100.5 moveto +12 f0 +(FirstRealGA) show +138.6 100.5 moveto +12 f0 +(, or follow the guided tour below, or go directly to the ) show +400.5 100.5 moveto +12 f0 +(exercises) show +444.4 100.5 moveto +12 f0 +(. ) show +pagelevel restore +showpage +%%Page: 2 2 +%%BeginPageSetup +/pagelevel save def +54 0 translate +%%EndPageSetup +newpath 0 72 moveto 481 0 rlineto 0 689 rlineto -481 0 rlineto closepath clip newpath +0 747.9 moveto +14 f1 +(Browsing the code:) show +18.1 724.5 moveto +3.3 3.3 c fill +28 720.4 moveto +12 f1 +(General includes:) show +118.3 720.4 moveto +12 f0 +(Like all C-like code, the file starts with include directives \() show +401.2 720.4 moveto +12 f0 +(Bit) show +415.8 720.4 moveto +12 f0 +( - ) show +425.7 720.4 moveto +12 f0 +(Real) show +447.6 720.4 moveto +12 f0 +(\).) show +28 706.6 moveto +12 f0 +(Apart from standard includes, the spedific file to include is ) show +313.6 706.6 moveto +12 f1 +(eo) show +324.9 706.6 moveto +12 f0 +(: this is a file that contains the) show +28 693.3 moveto +12 f0 +(list of the most important EO files.) show +195 693.3 moveto +12 f0 +( ) show +28 680 moveto +12 f0 +( ) show +18.1 670.3 moveto +3.3 3.3 c fill +28 666.2 moveto +12 f1 +(Representation) show +105.9 666.2 moveto +12 f0 +(: you then have to delclare the type of individuals you will be handling. All) show +28 652.9 moveto +12 f0 +(evolution-related objects you will need are templatized w.r.t. the type of individuals.) show +433.6 652.9 moveto +12 f0 +( ) show +46.1 643.2 moveto +3.3 3.3 c stroke +56 639.1 moveto +12 f0 +(Bit) show +70.6 639.1 moveto +12 f0 +( You say here that you will be handling ) show +262.9 639.1 moveto +12 f1 +(Bitstring genotypes) show +361.8 639.1 moveto +12 f0 +(, whose fitness is a) show +56 625.8 moveto +12 f0 +(double. This makes Indi derive from the ) show +251.9 625.8 moveto +12 f0 +(STL class) show +299.5 625.8 moveto +12 f0 +( ) show +302.4 625.8 moveto +12 f0 +(vector) show +367.2 625.8 moveto +12 f0 +( ) show +46.1 616.1 moveto +3.3 3.3 c stroke +56 612 moveto +12 f0 +(Real) show +77.9 612 moveto +12 f0 +( You say here that you will be handling ) show +270.2 612 moveto +12 f1 +(Real-valued genotypes) show +385.1 612 moveto +12 f0 +(, whose fitness is a) show +56 598.7 moveto +12 f0 +(double. This makes Indi derive from the ) show +251.9 598.7 moveto +12 f0 +(STL class) show +299.5 598.7 moveto +12 f0 +( ) show +302.4 598.7 moveto +12 f0 +(vector) show +378.5 598.7 moveto +12 f0 +( ) show +56 585.4 moveto +12 f0 +( ) show +18.1 575.7 moveto +3.3 3.3 c fill +28 571.6 moveto +12 f1 +(Fitness function:) show +113.6 571.6 moveto +12 f0 +( the code for the fitness function is included in the file. It must take as) show +28 558.3 moveto +12 f0 +(argument a reference to an individual \(at the moment\).) show +290.2 558.3 moveto +12 f0 +( ) show +46.1 549.1 moveto +3.3 3.3 c stroke +56 545 moveto +12 f0 +(Bit) show +70.6 545 moveto +12 f0 +( This function simply computes the number of ones of the bitstring \(it's called the) show +56 531.7 moveto +12 f0 +(OneMax function\). The optimum is of course the all-ones bitstring.) show +378.9 531.7 moveto +12 f0 +( ) show +46.1 522.5 moveto +3.3 3.3 c stroke +56 518.4 moveto +12 f0 +(Real) show +77.9 518.4 moveto +12 f0 +( This function simply computes the inverse of the sum of the squares of all) show +56 505.1 moveto +12 f0 +(variables \(also called the sphere function\). The optimum is of course the all-zeroes) show +56 491.8 moveto +12 f0 +(vector.) show +88.9 491.8 moveto +12 f0 +( ) show +56 478.5 moveto +12 f0 +( ) show +18.1 468.8 moveto +3.3 3.3 c fill +28 464.7 moveto +12 f1 +(Parameters) show +87.3 464.7 moveto +12 f0 +(: all parameters of the algorithm are declared here \() show +333.5 464.7 moveto +12 f0 +(Bit) show +348.1 464.7 moveto +12 f0 +( - ) show +358 464.7 moveto +12 f0 +(Real) show +379.9 464.7 moveto +12 f0 +(\), and their values) show +28 451.4 moveto +12 f0 +(and assigned. Of course, this means that you will need to recompile to change these values -) show +28 438.1 moveto +12 f0 +(see Lesson 3 to get rid of that heavy requirement.) show +265.2 438.1 moveto +12 f0 +( ) show +28 424.8 moveto +12 f0 +( ) show +18.1 415.1 moveto +3.3 3.3 c fill +28 411 moveto +12 f1 +(Random seeding:) show +117 411 moveto +12 f0 +( Random numbers play an important role in Evolutionary Algorithms. See) show +28 397.7 moveto +12 f0 +(in ) show +40.3 397.7 moveto +12 f0 +(EO programming hints) show +150.9 397.7 moveto +12 f0 +( more details about how this is simulated in EO - but as far as you) show +28 384.4 moveto +12 f0 +(are concerned now, remember that the ) show +214.9 384.4 moveto +12 f0 +(global Random Number Generator) show +381.8 384.4 moveto +12 f0 +( is called ) show +427.4 384.4 moveto +12 f5 +(rng) show +448.9 384.4 moveto +12 f0 +( and) show +28 370.8 moveto +12 f0 +(should be used everywhere you need a realization of a random variable of known law.) show +28 357.5 moveto +12 f0 +(Moreover, this RNG requires a ) show +179.9 357.5 moveto +12 f5 +(seed) show +208.6 357.5 moveto +12 f0 +(, which is set here \() show +301.9 357.5 moveto +12 f0 +(Bit) show +316.5 357.5 moveto +12 f0 +( - ) show +326.4 357.5 moveto +12 f0 +(Real) show +348.3 357.5 moveto +12 f0 +(\): everytime you run the) show +28 343.9 moveto +12 f0 +(algorithm with the ) show +119.6 343.9 moveto +12 f0 +(same seed) show +168.5 343.9 moveto +12 f0 +(, you will get the ) show +252.4 343.9 moveto +12 f0 +(same result) show +306.7 343.9 moveto +12 f0 +(. Hence, to test the robustness of) show +28 330.6 moveto +12 f0 +(your algorithm, you should run it with different seeds. This is rather time consuming in the) show +28 317.3 moveto +12 f0 +(present programs, so we suggest that you wait until Lesson 3 to do so.) show +364.3 317.3 moveto +12 f0 +( ) show +28 304 moveto +12 f0 +( ) show +18.1 294.3 moveto +3.3 3.3 c fill +28 290.2 moveto +12 f1 +(Fitness function encapsulation: ) show +190.3 290.2 moveto +12 f0 +(EO is based on the notion of ) show +329.9 290.2 moveto +12 f0 +(functors) show +369.2 290.2 moveto +12 f0 +( - hence you now need) show +28 276.9 moveto +12 f0 +(to encapsulate your fitness function into a functor object. This is what is done here \() show +431.2 276.9 moveto +12 f0 +(Bit) show +445.8 276.9 moveto +12 f0 +( -) show +28 263.6 moveto +12 f0 +(Real) show +49.9 263.6 moveto +12 f0 +(\).) show +56.8 263.6 moveto +12 f0 +( ) show +28 250.3 moveto +12 f0 +( ) show +18.1 240.6 moveto +3.3 3.3 c fill +28 236.5 moveto +12 f1 +(Initialization) show +94 236.5 moveto +12 f0 +(: to initialize the population, first declare an empty object of class ) show +411.6 236.5 moveto +10 f5 +(eoPop) show +477.6 236.5 moveto +12 f0 +(,) show +28 223.2 moveto +12 f0 +(which is basically an ) show +131.3 223.2 moveto +12 f0 +(STL) show +152.6 223.2 moveto +12 f0 +( ) show +155.5 223.2 moveto +10 f5 +(vector) show +227.5 223.2 moveto +12 f0 +(, then fill it with Indi's.) show +339.1 223.2 moveto +12 f0 +( And remember that) show +28 209.9 moveto +10 f5 +(v.push_back) show +94 209.9 moveto +12 f0 +( simply appends its argument at the end of ) show +300.3 209.9 moveto +12 f0 +(STL) show +321.6 209.9 moveto +12 f0 +( vector ) show +357.5 209.9 moveto +10 f5 +(v.) show +369.5 209.9 moveto +12 f0 +( ) show +46.1 198.9 moveto +3.3 3.3 c stroke +56 194.8 moveto +12 f0 +(Bit) show +70.6 194.8 moveto +12 f0 +( ) show +73.5 194.8 moveto +10 f5 +(rng.flip\(\)) show +133.5 194.8 moveto +12 f0 +( return a ) show +176.4 194.8 moveto +14 f0 +(random boolean) show +266.9 194.8 moveto +12 f0 +( ) show +46.1 183.4 moveto +3.3 3.3 c stroke +56 179.3 moveto +12 f0 +(Real) show +77.9 179.3 moveto +12 f0 +( ) show +80.8 179.3 moveto +10 f5 +(rng.uniform\(\)) show +158.8 179.3 moveto +12 f0 +( returns a ) show +206.4 179.3 moveto +14 f0 +(real value uniformly drawn in [0,1].) show +407.4 179.3 moveto +12 f0 +( ) show +56 165.6 moveto +12 f0 +( ) show +18.1 155.9 moveto +3.3 3.3 c fill +28 151.8 moveto +12 f1 +(Output) show +65.3 151.8 moveto +12 f0 +(: take a snapshot at the initial population \() show +266.6 151.8 moveto +12 f0 +(Bit) show +281.2 151.8 moveto +12 f0 +( - ) show +291.1 151.8 moveto +12 f0 +(Real) show +313 151.8 moveto +12 f0 +(\). Sort it first, so the best) show +28 138.5 moveto +12 f0 +(individuals are first, and display it. Note that an eoPop has a ) show +319.9 138.5 moveto +10 f5 +(<<) show +331.9 138.5 moveto +12 f0 +( method, which means that a) show +28 125.2 moveto +12 f0 +(simple ) show +63 125.2 moveto +10 f5 +(os << pop ) show +123 125.2 moveto +12 f0 +(streams the ) show +180.3 125.2 moveto +10 f5 +(pop) show +198.3 125.2 moveto +12 f0 +( onto the ostream ) show +284.2 125.2 moveto +10 f5 +(os) show +296.2 125.2 moveto +12 f0 +(. This is true for ) show +376.1 125.2 moveto +12 f0 +(all objects of of class) show +28 109.6 moveto +14 f1 +(eoPrintable) show +97.2 109.6 moveto +12 f0 +( \(most EO objects\) through the method ) show +287.5 109.6 moveto +10 f5 +(printOn) show +329.5 109.6 moveto +12 f0 +( \(which is then called by the ) show +467.8 109.6 moveto +10 f5 +(<<) show +28 95.9 moveto +12 f0 +(operator\).) show +74.9 95.9 moveto +12 f0 +( ) show +28 82.6 moveto +12 f0 +( ) show +pagelevel restore +showpage +%%Page: 3 3 +%%BeginPageSetup +/pagelevel save def +54 0 translate +%%EndPageSetup +newpath 0 72 moveto 481 0 rlineto 0 689 rlineto -481 0 rlineto closepath clip newpath +18.1 753.8 moveto +3.3 3.3 c fill +28 749.7 moveto +12 f1 +(Evolution engine:) show +118.3 749.7 moveto +12 f0 +( The selection/replacement mechanism \() show +312.2 749.7 moveto +12 f0 +(Bit) show +326.8 749.7 moveto +12 f0 +( - ) show +336.7 749.7 moveto +12 f0 +(Real) show +358.6 749.7 moveto +12 f0 +(\) is a simple generational) show +28 734.1 moveto +12 f0 +(GA here: a simple selector, and a generational replacement. The ) show +339.2 734.1 moveto +14 f1 +(eoDetTournament) show +448.8 734.1 moveto +12 f0 +( has) show +28 720.4 moveto +12 f0 +(been chosen as a robust selection, and the generational replacement \(all parents are replaced) show +28 707.1 moveto +12 f0 +(by the offspring\) is hard-coded in the eoSGA ) show +247.9 707.1 moveto +12 f0 +(algorithm) show +294.5 707.1 moveto +12 f0 +(.) show +297.4 707.1 moveto +12 f0 +( ) show +28 693.8 moveto +12 f0 +( ) show +18.1 684.1 moveto +3.3 3.3 c fill +28 680 moveto +12 f1 +(Variation operators) show +129.6 680 moveto +12 f0 +(:) show +132.9 680 moveto +12 f0 +( in the simple algorithm considered here, individuals undergo ) show +430.8 680 moveto +12 f0 +(crossover) show +28 664.4 moveto +12 f0 +(and ) show +48.3 664.4 moveto +12 f0 +(mutation) show +90.9 664.4 moveto +12 f0 +(. In EO, these operators are \() show +228.8 664.4 moveto +12 f0 +(functor) show +263.4 664.4 moveto +12 f0 +(\) objects of class) show +343.7 664.4 moveto +12 f0 +( ) show +346.6 664.4 moveto +14 f1 +(eoQuadOp) show +411.9 664.4 moveto +12 f0 +( \(binary) show +28 648.4 moveto +12 f0 +(operator that modifies both its arguments\) and ) show +252.9 648.4 moveto +14 f1 +(eoMonOp) show +312.7 648.4 moveto +12 f0 +( \(unary operator\). These operators) show +28 634.7 moveto +12 f0 +(are applied in turn to all selected parents, according to user-defined probabilities. These) show +28 621.4 moveto +12 f0 +(probabilities are defined with all other ) show +214.6 621.4 moveto +12 f0 +(parameters) show +267.2 621.4 moveto +12 f0 +(, and will be passed to the ) show +394.5 621.4 moveto +12 f5 +(eoSGA) show +430.6 621.4 moveto +12 f0 +(algorithm) show +477.2 621.4 moveto +12 f0 +(.) show +46.1 609.6 moveto +3.3 3.3 c stroke +56 605.5 moveto +12 f0 +(Bit) show +70.6 605.5 moveto +12 f0 +( The crossover ) show +144.2 605.5 moveto +14 f1 +(eoBinCrossover) show +239 605.5 moveto +12 f0 +( is the standard ) show +314.3 605.5 moveto +12 f0 +(1-point crossover) show +397.9 605.5 moveto +12 f0 +(, and) show +56 589.5 moveto +14 f1 +(eoBinMutation) show +146.2 589.5 moveto +12 f0 +( is the standard ) show +221.5 589.5 moveto +12 f0 +(bit-flip mutation) show +300.5 589.5 moveto +12 f0 +( that randomly flips all bits with a) show +56 575.8 moveto +12 f0 +(given probability ) show +141.3 575.8 moveto +10 f5 +(P_MUT_PER_BIT.) show +225.3 575.8 moveto +12 f0 +( ) show +56 562 moveto +12 f1 +(Warning) show +102 562 moveto +12 f0 +(: the ) show +125.9 562 moveto +10 f5 +(P_MUT_PER_BIT) show +203.9 562 moveto +12 f0 +( probability is an ) show +287.8 562 moveto +12 f0 +(internal parameter) show +375.4 562 moveto +12 f0 +( of the) show +56 548.2 moveto +12 f5 +(eoBinMutation) show +149.5 548.2 moveto +12 f0 +(, it is ) show +176.1 548.2 moveto +12 f1 +(NOT) show +202.1 548.2 moveto +12 f0 +( the probability of mutation at the individual level. EO) show +56 534.6 moveto +12 f0 +(corrects what can be viewed as an inconsistency in Holland's original work, further) show +56 521.3 moveto +12 f0 +(used in Goldberg's book by separating the probability of mutation for each individual) show +56 508 moveto +12 f0 +(\(independent of the type of mutation that will be applied\) from the probability of) show +56 494.7 moveto +12 f0 +(flipping each bit, which is specific of the bit-flip mutation. Hence, to run the same) show +56 481.4 moveto +12 f0 +(algorithm as Goldberg's SGA, the mutation probability \(at individual level\) is 1, and the) show +56 468.1 moveto +12 f0 +(probability of flipping each bit is ) show +217.3 468.1 moveto +10 f5 +(P_MUT_PER_BIT.) show +301.3 468.1 moveto +12 f0 +( ) show +46.1 456.6 moveto +3.3 3.3 c stroke +56 452.5 moveto +12 f0 +(Real) show +77.9 452.5 moveto +12 f0 +( The crossover ) show +151.5 452.5 moveto +14 f1 +(eoArithmeticCrossover) show +290.6 452.5 moveto +12 f0 +( is the standard ) show +365.9 452.5 moveto +12 f0 +(arithmetic crossover) show +463.5 452.5 moveto +12 f0 +( for) show +56 438.8 moveto +12 f0 +(real-valued vectors, that chooses a point randomly on the segment between both parents) show +56 423.2 moveto +12 f0 +(\(also termed ) show +118.6 423.2 moveto +12 f0 +(BLX-0) show +152.5 423.2 moveto +12 f0 +(\). ) show +162.4 423.2 moveto +14 f1 +(eoUniformMutation) show +282.9 423.2 moveto +12 f0 +( is the ) show +314.5 423.2 moveto +12 f0 +(uniform mutation) show +398.8 423.2 moveto +12 f0 +( for real-valued) show +56 409.5 moveto +12 f0 +(vectors that choses a new value for each variable uniformly on an interval centered on) show +56 396.2 moveto +12 f0 +(the parent value. The width of the interval is an ) show +286.2 396.2 moveto +12 f0 +(internal parameter) show +373.8 396.2 moveto +12 f0 +( of the object, here) show +56 382.9 moveto +12 f0 +(called ) show +87.6 382.9 moveto +10 f5 +(EPSILON) show +129.7 382.9 moveto +12 f0 +(.) show +132.6 382.9 moveto +12 f0 +( ) show +56 369.6 moveto +12 f0 +( ) show +18.1 359.9 moveto +3.3 3.3 c fill +28 355.8 moveto +12 f1 +(Stopping criterion:) show +125.6 355.8 moveto +12 f0 +( Specify a ) show +176.5 355.8 moveto +12 f0 +(maximum number of generations) show +336.1 355.8 moveto +12 f0 +( to run \() show +374.4 355.8 moveto +12 f0 +(Bit) show +389 355.8 moveto +12 f0 +( - ) show +398.9 355.8 moveto +12 f0 +(Real) show +420.8 355.8 moveto +12 f0 +(\): the) show +28 342.5 moveto +12 f0 +(simplest of all stopping criteria at the moment, using an object of a sub-class of class) show +28 326.9 moveto +14 f1 +(eoContinue) show +96.4 326.9 moveto +12 f0 +(.) show +99.3 326.9 moveto +12 f0 +( ) show +28 313.2 moveto +12 f0 +( ) show +18.1 303.5 moveto +3.3 3.3 c fill +28 299.4 moveto +12 f1 +(The algorithm: ) show +108.6 299.4 moveto +12 f0 +(the simple algorithm that is used here, called ) show +329.2 299.4 moveto +12 f5 +(eoSGA ) show +372.3 299.4 moveto +12 f0 +(requires as parameters) show +28 285.8 moveto +12 f0 +(a ) show +36.3 285.8 moveto +12 f0 +(selector) show +73.6 285.8 moveto +12 f0 +(, a ) show +87.9 285.8 moveto +12 f0 +(crossover) show +133.9 285.8 moveto +12 f0 +( and the associated ) show +227.2 285.8 moveto +12 f0 +(crossover rate) show +294.1 285.8 moveto +12 f0 +(, a ) show +308.4 285.8 moveto +12 f0 +(mutation) show +351 285.8 moveto +12 f0 +( and the associated) show +28 272.5 moveto +12 f0 +(mutation rate,) show +94.6 272.5 moveto +12 f0 +( and a ) show +126.2 272.5 moveto +12 f0 +(stopping criterion) show +211.1 272.5 moveto +12 f0 +(. Take a look at the corresponding ) show +377.7 272.5 moveto +12 f0 +(constructor) show +431.7 272.5 moveto +12 f0 +( of the) show +28 259.2 moveto +12 f0 +(class ) show +54.3 259.2 moveto +12 f5 +(eoSGA) show +90.4 259.2 moveto +12 f0 +(: it only initializes its ) show +194.7 259.2 moveto +12 f0 +(private data) show +251 259.2 moveto +12 f0 +( with the parameters. Now look at the) show +28 245.6 moveto +12 f0 +(operator\(\)) show +75.9 245.6 moveto +12 f0 +( method - the one that is called in the code for ) show +299.1 245.6 moveto +12 f0 +(FirstBitGA) show +353.1 245.6 moveto +12 f0 +( or ) show +369 245.6 moveto +12 f0 +(FirstRealGA) show +430.3 245.6 moveto +12 f0 +( - and) show +28 232.3 moveto +12 f0 +(you'll find out that is is as simple as it sounds.) show +250.3 232.3 moveto +12 f0 +( ) show +28 219 moveto +12 f0 +( ) show +18.1 209.3 moveto +3.3 3.3 c fill +28 205.2 moveto +12 f1 +(Output) show +65.3 205.2 moveto +12 f0 +(: After running the algorithm, output the sorted final population \() show +377.6 205.2 moveto +12 f0 +(Bit) show +392.2 205.2 moveto +12 f0 +( - ) show +402.1 205.2 moveto +12 f0 +(Real) show +424 205.2 moveto +12 f0 +(\) - and look) show +28 191.9 moveto +12 f0 +(at the best individual: this is the result of the algorithm.) show +293.6 191.9 moveto +12 f0 +( ) show +28 178.6 moveto +12 f0 +( ) show +18.1 168.9 moveto +3.3 3.3 c fill +28 164.8 moveto +12 f1 +(Main body:) show +87.6 164.8 moveto +12 f0 +( for technical reasons \(intercepting the exceptions\), we need a main like this one) show +28 151.5 moveto +12 f0 +(\() show +31.9 151.5 moveto +12 f0 +(Bit) show +46.5 151.5 moveto +12 f0 +( - ) show +56.4 151.5 moveto +12 f0 +(Real) show +78.3 151.5 moveto +12 f0 +(\)., and you should not touch it unless you know what you are doing. Simply note) show +28 138.2 moveto +12 f0 +(that this main calls the function main_function, which we have been discussing up to now!) show +463.6 138.2 moveto +12 f0 +( ) show +0 109.3 moveto +14 f1 +(Exercise 1: maximize your own function) show +0 82.3 moveto +12 f0 +(This is very easy - if your search space is that of bitstring or of unbounded real numbers. ) show +pagelevel restore +showpage +%%Page: 4 4 +%%BeginPageSetup +/pagelevel save def +54 0 translate +%%EndPageSetup +newpath 0 72 moveto 481 0 rlineto 0 689 rlineto -481 0 rlineto closepath clip newpath +18.1 748.8 moveto +3.3 3.3 c fill +28 744.7 moveto +12 f0 +(Go to the tutorial directory, and ) show +182.9 744.7 moveto +12 f0 +(copy) show +206.2 744.7 moveto +12 f0 +( the program you want to modify onto ) show +392.3 744.7 moveto +10 f5 +(mytest.cpp.) show +458.3 744.7 moveto +12 f0 +( ) show +18.1 735.5 moveto +3.3 3.3 c fill +28 731.4 moveto +12 f0 +(Edit) show +48 731.4 moveto +12 f0 +( ) show +51.1 731.4 moveto +10 f5 +(mytest.cpp) show +111.1 731.4 moveto +12 f0 +( with any text editor:) show +211 731.4 moveto +12 f0 +( ) show +18.1 722.2 moveto +3.3 3.3 c fill +28 718.1 moveto +12 f0 +(Modify) show +63.9 718.1 moveto +12 f0 +( the fitness function itself \() show +192.8 718.1 moveto +12 f0 +(binary_value) show +255.4 718.1 moveto +12 f0 +( in ) show +270.7 718.1 moveto +10 f5 +(FirstBitGA) show +330.7 718.1 moveto +12 f0 +(,) show +333.6 718.1 moveto +12 f0 +(real_value) show +383.5 718.1 moveto +12 f0 +( in ) show +401.8 718.1 moveto +10 f5 +(FirstRealGA) show +467.8 718.1 moveto +12 f0 +(\)) show +471.7 718.1 moveto +12 f0 +( ) show +18.1 708.9 moveto +3.3 3.3 c fill +28 704.8 moveto +12 f0 +(Compile) show +69.3 704.8 moveto +12 f0 +( the program by typing ) show +182.4 704.8 moveto +10 f5 +(make mytest) show +248.4 704.8 moveto +12 f0 +( at system prompt) show +334 704.8 moveto +12 f0 +( ) show +18.1 695.6 moveto +3.3 3.3 c fill +28 691.5 moveto +12 f0 +(Run) show +48 691.5 moveto +12 f0 +( the new program by entering the command ) show +260.8 691.5 moveto +10 f5 +(mytest) show +296.8 691.5 moveto +12 f0 +( at system prompt.) show +385.4 691.5 moveto +12 f0 +( ) show +0 662.6 moveto +14 f1 +(Exercise 2: check the differences between both programs) show +0 635.6 moveto +12 f0 +(Go and take a look at the code for these programs ) show +241.6 635.6 moveto +12 f0 +(\() show +245.5 635.6 moveto +12 f0 +(Bit) show +260.1 635.6 moveto +12 f0 +( - ) show +270 635.6 moveto +12 f0 +(Real) show +291.9 635.6 moveto +12 f0 +(\)) show +295.8 635.6 moveto +12 f0 +(. Use the symbolic representation of) show +0 622.3 moveto +12 f0 +(an Evolutionary Algorithm \(you should understand that figure now, otherwise go ) show +392.6 622.3 moveto +12 f0 +(there) show +416.5 622.3 moveto +12 f0 +( and come) show +0 609 moveto +12 f0 +(back\) to understand how each part of the EA is coded. Try to spot the differences between both) show +0 595.7 moveto +12 f0 +(codes: there are not so many! ) show +0 582.4 moveto +12 f0 +(After you've tried that alone, take a look at the ) show +227.6 582.4 moveto +12 f0 +(solution) show +266.2 582.4 moveto +12 f0 +( :-\) ) show +0 569.1 moveto +12 f0 +( ) show +0 540.2 moveto +14 f1 +(Exercise 3: change the selection procedure) show +0 513.2 moveto +12 f0 +(This is rather straightforward ... if you know what other types of selection are available! ) show +0 499.9 moveto +12 f0 +(At the moment, let's only consider only the following simple ones: ) show +18.1 477.4 moveto +3.3 3.3 c fill +28 473.3 moveto +12 f0 +(You already know the ) show +137.3 473.3 moveto +12 f0 +(tournament selection) show +237.6 473.3 moveto +12 f0 +( ) show +28 460 moveto +12 f0 +(Syntax: ) show +70.6 460 moveto +10 f5 +(eoDetTournament select\(T_SIZE\); ) show +310.6 460 moveto +10 f4 +(// T_SIZE in [2,POP_SIZE\)) show +460.6 460 moveto +12 f0 +( ) show +18.1 450.8 moveto +3.3 3.3 c fill +28 446.7 moveto +12 f0 +(Try the well-known ) show +126.3 446.7 moveto +12 f0 +(roulette wheel) show +194.6 446.7 moveto +12 f0 +( ) show +28 433.4 moveto +12 f0 +( ) show +30.9 433.4 moveto +12 f0 +(Syntax: ) show +70.5 433.4 moveto +12 f0 +( ) show +79.4 433.4 moveto +10 f5 +(eoProportional select;) show +247.4 433.4 moveto +12 f0 +( ) show +18.1 424.2 moveto +3.3 3.3 c fill +28 420.1 moveto +12 f0 +(Or the ) show +61.3 420.1 moveto +12 f0 +(stochastic binary tournament) show +199.9 420.1 moveto +12 f0 +( ) show +28 406.8 moveto +12 f0 +(Syntax: ) show +70.6 406.8 moveto +10 f5 +(eoStochTournament select\(RATE\); ) show +298.6 406.8 moveto +10 f4 +( // RATE in ]0.5,1]) show +430.6 406.8 moveto +12 f0 +( ) show +18.1 397.6 moveto +3.3 3.3 c fill +28 393.5 moveto +12 f0 +(and of course the ) show +113.3 393.5 moveto +12 f0 +(random) show +149.9 393.5 moveto +12 f0 +( selection should give bad results!) show +312.8 393.5 moveto +12 f0 +( ) show +28 380.2 moveto +12 f0 +(Syntax: ) show +70.6 380.2 moveto +10 f5 +(eoSelectRandom select;) show +0 354.1 moveto +12 f0 +(Note that all these classes of eoObjects are derived from the abstract class ) show +357.5 354.1 moveto +14 f1 +(eoSelectOne.) show +434 354.1 moveto +12 f0 +( ) show +0 321 moveto +18 f1 +(Lessons:) show +66 321 moveto +12 f0 +( ) show +18.1 297.2 moveto +3.3 3.3 c fill +28 293.1 moveto +12 f0 +(in EO, all actions are performed by ) show +199.9 293.1 moveto +12 f0 +(functor objects) show +271.5 293.1 moveto +12 f0 +( \(this section is the last time in this tutorial) show +28 279.8 moveto +12 f0 +(that there is a direct link to the ) show +177.3 279.8 moveto +12 f0 +(EO Programming hints) show +288.6 279.8 moveto +12 f0 +( page - though the link at top and) show +28 266.5 moveto +12 f0 +(bottom of all pages will remain there\).) show +212.3 266.5 moveto +12 f0 +( ) show +18.1 256.8 moveto +3.3 3.3 c fill +28 252.7 moveto +12 f0 +(in EO, all object you will usually need to manipulate are ) show +301.9 252.7 moveto +12 f0 +(templatized) show +357.8 252.7 moveto +12 f1 +( w.r.t. the type of the) show +28 238.9 moveto +12 f1 +(individual) show +80 238.9 moveto +12 f0 +( you are handling.) show +166.6 238.9 moveto +12 f0 +( ) show +18.1 229.2 moveto +3.3 3.3 c fill +28 225.1 moveto +12 f0 +(The type of the individual is itself ) show +193.6 225.1 moveto +12 f0 +(templatized) show +249.5 225.1 moveto +12 f1 +( w.r.t. the type of fitness) show +372.1 225.1 moveto +12 f0 +( \(double by default\).) show +470 225.1 moveto +12 f0 +( ) show +18.1 215.9 moveto +3.3 3.3 c fill +28 211.8 moveto +12 f0 +(In EO \(actually, in EC!\) ) show +146.6 211.8 moveto +12 f0 +(initialization and variation) show +273.2 211.8 moveto +12 f0 +( operators are ) show +341.5 211.8 moveto +12 f0 +(representation) show +409.4 211.8 moveto +12 f0 +(-dependent,) show +28 198.5 moveto +12 f0 +(while the ) show +75.3 198.5 moveto +12 f0 +(evolution engine) show +155.6 198.5 moveto +12 f0 +( is ) show +169.6 198.5 moveto +12 f0 +(representation) show +237.5 198.5 moveto +12 f0 +(-independent \(well, like any rule, this one does) show +28 185.2 moveto +12 f0 +(have some exceptions\).) show +140.3 185.2 moveto +12 f0 +( ) show +18.1 176 moveto +3.3 3.3 c fill +28 171.9 moveto +12 f0 +(Changing the ) show +95.3 171.9 moveto +12 f0 +(fitness function) show +169.6 171.9 moveto +12 f0 +(, or the ) show +206.2 171.9 moveto +12 f0 +(selection procedure) show +299.8 171.9 moveto +12 f0 +( inside the generational GA evolution) show +28 158.6 moveto +12 f0 +(engine is straightforward.) show +150.9 158.6 moveto +12 f0 +( ) show +18.1 149.4 moveto +3.3 3.3 c fill +28 145.3 moveto +12 f0 +(remember, all ) show +97.6 145.3 moveto +12 f0 +(solutions) show +140.9 145.3 moveto +12 f0 +( to exercises are in the same sub-dir of dir Tutorial than the lesson) show +28 132 moveto +12 f0 +(itself \(see ) show +77.3 132 moveto +12 f0 +(here) show +97.9 132 moveto +12 f0 +(\).) show +104.8 132 moveto +12 f0 +( ) show +0 109.6 moveto +481 0 rlineto 0 -1.4 rlineto -481 0 rlineto closepath fill +0 90.3 moveto +12 f0 +(Lesson 2) show +42.9 90.3 moveto +12 f0 +( - ) show +52.8 90.3 moveto +12 f0 +(Tutorial main page) show +144.1 90.3 moveto +12 f0 +( - ) show +154 90.3 moveto +12 f0 +(Top-Down page) show +232.3 90.3 moveto +12 f0 +( - ) show +242.2 90.3 moveto +12 f0 +(Bottom-up page) show +319.8 90.3 moveto +12 f0 +( - ) show +329.7 90.3 moveto +12 f0 +(Programming hints) show +422 90.3 moveto +12 f0 +( - ) show +431.9 90.3 moveto +14 f0 +(EO) show +pagelevel restore +showpage +%%Page: 5 5 +%%BeginPageSetup +/pagelevel save def +54 0 translate +%%EndPageSetup +newpath 0 72 moveto 481 0 rlineto 0 689 rlineto -481 0 rlineto closepath clip newpath +0 748.4 moveto +14 f0 +(documentation) show +83.2 748.4 moveto +12 f0 +( ) show +0 738.9 moveto +481 0 rlineto 0 -1.4 rlineto -481 0 rlineto closepath fill +0.2 721.6 moveto +12 f2 +(Marc Schoenauer) show +0 695 moveto +12 f0 +(Last modified: Fri Nov 3 18:49:12 CET 2000) show +218.3 695 moveto +12 f0 +( ) show +pagelevel restore +showpage +%%EOF diff --git a/eo/tutorial/html/real_value.html b/eo/tutorial/html/real_value.html new file mode 100644 index 000000000..c45ffd054 --- /dev/null +++ b/eo/tutorial/html/real_value.html @@ -0,0 +1,56 @@ + + + + + + real_value.h + + +Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - +EO documentation +
+
+
+ + + + +
#include <vector> +
//----------------------------------------------------------------------------- +
/** Just a simple function that takes an +vector<double> and sets the fitnes  +
     to the sphere function. +Please use doubles not float!!! +
     @param _ind A floatingpoint +vector  +
*/
+ + + + + +
double real_value(const std::vector<double>& +_ind) +
{ +
 double sum = 0; +
 for (unsigned i = 0; i < _ind.size(); +i++) +
         +sum += _ind[i] * _ind[i]; +
 return -sum; +
}
+ +
Back to Lesson 2 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Wed Nov +29 08:58:50 2000 + + From 15c3588ac756ed02340c4b9b25cb8e1f9976f869 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Wed, 29 Nov 2000 18:36:13 +0000 Subject: [PATCH 0326/2134] sorry, old version was right --- eo/configure.in | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 5121d9e1c..0c492c554 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,20 +34,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT -( - Makefile - app/Makefile - app/gprop/Makefile - contrib/Makefile - doc/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 -) \ No newline at end of file +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile) + From 5b26c61445b2332d0a04d0e27cf6a0a7db8d2576 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 30 Nov 2000 04:44:32 +0000 Subject: [PATCH 0327/2134] Added the tutorial SUBDIR It works fine ... for make clean But of course it would require some Makefile.am in each subdir of tutorial and I am not sure I know what to put there... --- eo/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 4b7941a28..66603e9d1 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win doc app +SUBDIRS = src test win doc tutorial app #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user @@ -23,6 +23,9 @@ test: doc: pushd doc; $(MAKE) doc; popd +tutorial: + pushd tutorial; $(MAKE) all; popd + app: pushd app; $(MAKE) all; popd From 5c9bec34d671ca9167e6e7db00708493742ac125 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 30 Nov 2000 06:04:09 +0000 Subject: [PATCH 0328/2134] Removed eoCopyElite.h, redundant with eoMerge.h --- eo/src/Makefile.am | 2 +- eo/src/eoCopyElite.h | 110 --------------------------------------- eo/src/utils/Makefile.am | 2 +- 3 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 eo/src/eoCopyElite.h diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 050a9dc8f..306370783 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,5 +11,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCopyElite.h eoCounter.h eoDetTournament.h eoDetTournamentInserter.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportional.h eoProportionalGOpSel.h eoProportionalOpSel.h eoReduce.h eoReplacement.h eoSGA.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectOne.h eoSelectPerc.h eoSelectRandom.h eoSequentialGOpSel.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournament.h eoStochTournamentInserter.h eoTransform.h eoVariableLength.h eoWrappedOps.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetTournament.h eoDetTournamentInserter.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportional.h eoProportionalGOpSel.h eoProportionalOpSel.h eoReduce.h eoReplacement.h eoSGA.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectOne.h eoSelectPerc.h eoSelectRandom.h eoSequentialGOpSel.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournament.h eoStochTournamentInserter.h eoTransform.h eoVariableLength.h eoWrappedOps.h diff --git a/eo/src/eoCopyElite.h b/eo/src/eoCopyElite.h deleted file mode 100644 index cb27500b5..000000000 --- a/eo/src/eoCopyElite.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoCopyElite.h -// Base class for elitist-merging classes -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoCopyElite_h -#define eoCopyElite_h - -//----------------------------------------------------------------------------- - -// EO includes -#include // eoPop -#include // eoCopyElite - -/** - * eoCopyElite: Base class for elitist replacement algorithms. - * Merges the old population (first argument), with the new generation - * - * Its signature is exactly - * that of the selection base eoSelect, but its purpose is to merge the - * two populations into one (the second argument). - * Note that the algorithms assume that the second argument denotes the - * next generation. -*/ - -template class eoCopyElite: public eoBinaryFunctor&, eoPop&> -{}; - -/** -Straightforward elitism class, specify the number of individuals to copy -into new geneneration -*/ -template class eoElitism : public eoCopyElite -{ - public : - eoElitism(unsigned _howmany) : howmany(_howmany) {} - - void operator()(const eoPop& _pop, eoPop& offspring) - { - if (howmany == 0) - return; - - if (howmany > _pop.size()) - throw logical_error("Elite larger than population"); - - vector result; - _pop.nth_element(howmany, result); - - for (int i = 0; i < result.size(); ++i) - { - offspring.push_back(*result[i]); - } - } - - private : - unsigned howmany; -}; - -/** -No elite -*/ -template class eoNoElitism : public eoElitism -{ - public : - eoNoElitism() : eoElitism(0) {} -} - -/** -Very elitist class, copies entire population into next gen -*/ -template class eoPlus : public eoCopyElite -{ - public : - void operator()(const eoPop& _pop, eoPop& offspring) - { - offspring.reserve(offspring.size() + _pop.size()); - - for (int i = 0; i < _pop.size(); ++i) - { - offspring.push_back(*result[i]); - } - } - - private : - unsigned howmany; -}; - -//----------------------------------------------------------------------------- - -#endif diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 6be31c710..8c3d7000b 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,6 +10,6 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h checkpointing eoCheckPoint.h eoStdoutMonitor.h +libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h checkpointing eoCheckPoint.h eoStdoutMonitor.h eoGnuplot1DMonitor.h From 2169a65f80ce059ca22393690f2bc908951c2699 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 30 Nov 2000 06:11:49 +0000 Subject: [PATCH 0329/2134] Moved eoCopyElite.h to obsolete dir - was redundant with eoMerge.h --- eo/src/obsolete/eoCopyElite.h | 110 ++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 eo/src/obsolete/eoCopyElite.h diff --git a/eo/src/obsolete/eoCopyElite.h b/eo/src/obsolete/eoCopyElite.h new file mode 100644 index 000000000..cb27500b5 --- /dev/null +++ b/eo/src/obsolete/eoCopyElite.h @@ -0,0 +1,110 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCopyElite.h +// Base class for elitist-merging classes +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoCopyElite_h +#define eoCopyElite_h + +//----------------------------------------------------------------------------- + +// EO includes +#include // eoPop +#include // eoCopyElite + +/** + * eoCopyElite: Base class for elitist replacement algorithms. + * Merges the old population (first argument), with the new generation + * + * Its signature is exactly + * that of the selection base eoSelect, but its purpose is to merge the + * two populations into one (the second argument). + * Note that the algorithms assume that the second argument denotes the + * next generation. +*/ + +template class eoCopyElite: public eoBinaryFunctor&, eoPop&> +{}; + +/** +Straightforward elitism class, specify the number of individuals to copy +into new geneneration +*/ +template class eoElitism : public eoCopyElite +{ + public : + eoElitism(unsigned _howmany) : howmany(_howmany) {} + + void operator()(const eoPop& _pop, eoPop& offspring) + { + if (howmany == 0) + return; + + if (howmany > _pop.size()) + throw logical_error("Elite larger than population"); + + vector result; + _pop.nth_element(howmany, result); + + for (int i = 0; i < result.size(); ++i) + { + offspring.push_back(*result[i]); + } + } + + private : + unsigned howmany; +}; + +/** +No elite +*/ +template class eoNoElitism : public eoElitism +{ + public : + eoNoElitism() : eoElitism(0) {} +} + +/** +Very elitist class, copies entire population into next gen +*/ +template class eoPlus : public eoCopyElite +{ + public : + void operator()(const eoPop& _pop, eoPop& offspring) + { + offspring.reserve(offspring.size() + _pop.size()); + + for (int i = 0; i < _pop.size(); ++i) + { + offspring.push_back(*result[i]); + } + } + + private : + unsigned howmany; +}; + +//----------------------------------------------------------------------------- + +#endif From 109fc551ab40f9aff9eb62c4462efdbbe2e30e7a Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 30 Nov 2000 06:20:20 +0000 Subject: [PATCH 0330/2134] Reversed the priority between command-line and parameter file --- eo/src/utils/eoParser.cpp | 44 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 2487cd678..4888e6755 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -41,6 +41,32 @@ eoParser::eoParser ( int _argc, char **_argv , string _programDescription, strin programDescription( _programDescription), needHelp(false, "help", "Prints this message", 'h') { + // need to process the param file first + // if we want command-line to have highest priority + + for (int i = 1; i < _argc; ++i) + { + if (_argv[i][0] == '@') + { // read response file + char *pts = _argv[i]+1; // yes a char*, sorry :-) + + ifstream ifs (pts); + + ifs.peek(); // check if it exists + + if (!ifs) + { + string msg = (string)("Could not open response file: ") + pts; + throw runtime_error(msg); + } + + // read - will be overwritten by command-line + readFrom(ifs); + break; // stop reading command line args for '@' + } + } + + // now read arguments on command-line strstream stream; for (int i = 1; i < _argc; ++i) @@ -157,24 +183,6 @@ void eoParser::readFrom(istream& is) shortNameMap[str[1]] = value; } } - if (str[0] == '@') - { // read response file - string filename(str.begin() + 1, str.end()); - - ifstream ifs (filename.c_str()); - - ifs.peek(); // check if it exists - - if (!ifs) - { - string msg = "Could not open response file: " + filename; - throw runtime_error(msg); - } - - // read and overwrite - readFrom(ifs); - break; // stop reading command line - } } updateParameters(); From 9af974070af197674ed97de32628ebdddd810e3c Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 30 Nov 2000 06:38:15 +0000 Subject: [PATCH 0331/2134] Corrected a small bug (!): the -C=value was not processed correctly as somebody forgot one character when counting up to ... 3 :-))) --- eo/src/utils/eoParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 4888e6755..fb5c88b81 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -179,7 +179,7 @@ void eoParser::readFrom(istream& is) } else // it should be a char { - string value(str.begin() + 2, str.end()); + string value(str.begin() + 3, str.end()); shortNameMap[str[1]] = value; } } From a9468f38c993caa4ca842be83797e9993b4849dc Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Thu, 30 Nov 2000 17:11:53 +0000 Subject: [PATCH 0332/2134] small fix for uniform --- eo/src/utils/rnd_generators.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 588c66237..eabb0262e 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -54,7 +54,8 @@ template class uniform_generator throw logic_error("Min is greater than Max in uniform_generator"); } - T operator()(void) { return (T) minim+uniform.uniform(range); } + T operator()(void) { return minim+static_cast(uniform.uniform(range)); } + private : T minim; T range; From 142c7d779c39943ae426ec61806eec9f0ffae5f8 Mon Sep 17 00:00:00 2001 From: gustavoromero Date: Fri, 1 Dec 2000 15:46:07 +0000 Subject: [PATCH 0333/2134] adding a lot of includes --- eo/app/gprop/gprop.cc | 46 +++++++++++++++++++++++++------------ eo/configure.in | 2 +- eo/src/eoSelectPerc.h | 30 ++++++++++++------------ eo/src/eoStochTournament.h | 7 +++--- eo/src/utils/eoCheckPoint.h | 1 + 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc index 1ba882805..d5fda9d6b 100644 --- a/eo/app/gprop/gprop.cc +++ b/eo/app/gprop/gprop.cc @@ -2,18 +2,21 @@ // gprop //----------------------------------------------------------------------------- -#include // EXIT_SUCCESS EXIT_FAILURE -#include // exception -#include // cerr cout -#include // ifstream -#include // string -#include // eoParser -#include // eoPop -#include // eoGenContinue -#include // eoProportional -#include // eoStochTournament -#include // eoSGA -#include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator +#include // EXIT_SUCCESS EXIT_FAILURE +#include // exception +#include // cerr cout +#include // ifstream +#include // string +#include // eoParser +#include // eoPop +#include // eoGenContinue +#include // eoStochTournament +#include // eoSGA +#include // eoGenContinue +#include // eoCheckPoint +#include // eoSecondMomentStats +#include // eoStdoutMonitor +#include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator //----------------------------------------------------------------------------- // global variables @@ -120,8 +123,6 @@ void load_file(mlp::set& set, const string& ext) void ga() { - eoGenContinue continuator(generations.value()); - // create population eoInitChrom init; eoPop pop(pop_size.value(), init); @@ -137,13 +138,28 @@ void ga() // genetic operators eoChromMutation mutation(generations); eoChromXover xover; + + // stop condition + eoGenContinue continuator(generations.value()); + + // checkpoint + eoCheckPoint checkpoint(continuator); + + // monitor + eoStdoutMonitor monitor; + checkpoint.add(monitor); + + // statistics + eoSecondMomentStats stats; + checkpoint.add(stats); + monitor.add(stats); // genetic algorithm eoSGA sga(select, xover, xover_rate.value(), mutation, mut_rate.value(), evaluator, - continuator); + checkpoint); cout << pop << endl; diff --git a/eo/configure.in b/eo/configure.in index 0c492c554..c87744d8b 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,5 +34,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile) +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile) diff --git a/eo/src/eoSelectPerc.h b/eo/src/eoSelectPerc.h index 96fc7c6b6..c0991d72b 100644 --- a/eo/src/eoSelectPerc.h +++ b/eo/src/eoSelectPerc.h @@ -52,21 +52,21 @@ class eoSelectPerc : public eoSelect @param _source the source population @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) */ - virtual void operator()(const eoPop& _source, eoPop& _dest) - { - size_t target = static_cast(floor(rate * _source.size())); - - _dest.resize(target); - - select.setup(_source); - - for (size_t i = 0; i < _dest.size(); ++i) - _dest[i] = select(_source); - } - - private : - eoSelectOne& select; - float rate; + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + size_t target = static_cast(floor(rate * _source.size())); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + float rate; }; #endif diff --git a/eo/src/eoStochTournament.h b/eo/src/eoStochTournament.h index 29ec31c00..78a5f1fd1 100644 --- a/eo/src/eoStochTournament.h +++ b/eo/src/eoStochTournament.h @@ -28,9 +28,10 @@ //----------------------------------------------------------------------------- -#include // -#include // accumulate -#include +#include +#include // accumulate +#include // eoSelectOne +#include // stochastic_tournament //----------------------------------------------------------------------------- /** eoStochTournament: a selection method that selects ONE individual by diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 810735ee5..d2864aeb6 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -28,6 +28,7 @@ #define _eoCheckPoint_h #include +#include template class eoStatBase; template class eoSortedStatBase; From c1dd2dd1272de29b513be59617177d64870e60df Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 1 Dec 2000 17:56:52 +0000 Subject: [PATCH 0334/2134] Used spell-checker!!! --- eo/tutorial/html/eoLesson1.html | 8 +++--- eo/tutorial/html/eoLesson2.html | 14 +++++----- eo/tutorial/html/eoLesson3.html | 40 ++++++++++++++--------------- eo/tutorial/html/eoProgramming.html | 22 ++++++++-------- eo/tutorial/html/eoTopDown.html | 4 +-- eo/tutorial/html/eoTutorial.html | 12 ++++----- 6 files changed, 50 insertions(+), 50 deletions(-) diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index e7bf1589e..20b2941b5 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -86,13 +86,13 @@ below, or go directly to the exercises. General includes:Like all C-like code, the file starts with include directives (Bit - Real). Apart from standard includes, -the spedific file to include is eo: +the specific file to include is eo: this is a file that contains the list of the most important EO files.
 
  • Representation: -you then have to delclare the type of individuals you will be handling. +you then have to declare the type of individuals you will be handling. All evolution-related objects you will need are templatized w.r.t. the type of individuals.
  • @@ -147,7 +147,7 @@ Random Number Generator
    is called seed, which is set here (Bit - Real): -everytime you run the algorithm with the same +every time you run the algorithm with the same seed, you will get the same result. Hence, to test the robustness of your algorithm, you should run it with different seeds. This is rather time @@ -245,7 +245,7 @@ is the standard arithmetic crossover for real-value vectors, that chooses a point randomly on the segment between both parents (also termed BLX-0). eoUniformMutation is the uniform mutation for real-valued vectors -that choses a new value for each variable uniformly on an interval centered +that chooses a new value for each variable uniformly on an interval centered on the parent value. The width of the interval is an internal parameter of the object, here called EPSILON. diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 4bf3e37ec..fe224e5d0 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -70,7 +70,7 @@ object that is a sub-class of the corresponding STL vector class.

    Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object -file once and forall (remember +file once and for all (remember that templates forbid that).
     

  • @@ -134,12 +134,12 @@ sum up to 1, all rates are scaled anyway.

    Note: The operators have to be encapsulated into an eoTransform object (Bit - Real) -to be passed to the eoEasyEA algorihtm. +to be passed to the eoEasyEA algorithm. The eoSGATransform is a simple eoTransform that does exactly the same thing than eoSGA: each pair from the selected parents undergoes the crossover -operator with given probablity, and all individuals (after crossover +operator with given probability, and all individuals (after crossover eventually) undergo mutation with given probability. The arguments to the eoSGATransform are an eoQuadOp with its probability @@ -182,7 +182,7 @@ a population (his operator()  returns a population). This was done internally in the  constructor of eoSGA  - see lesson1. -


    Exercice +
    Exercise 1: minimizing
    Modify the algorithm so that it minimizes the fitness. @@ -201,16 +201,16 @@ the file real_value.h so that it returns the sum of squares instead of its inverse. And again there is something else to modify...
  • -Exercice +Exercise 2: initialization
    Use different initializers: for instance, on the real-valued sphere function minimization, try to initialize half of the population in [-2,-1] and the other half in [1,2], with and without the segment and arithmetic crossovers (and for large values of VEC_SIZE, the size of the vectors). Amazing, isn't it! Explain that result. -

    Exercice +

    Exercise 3:  replacement -
    You can now twidle the number of offspring that +
    You can now twiddle the number of offspring that will be generated from the parents. But of course you need to adjust the replacement to keep a constant population size.

      diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index a7b08a2bc..04b41467b 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -28,7 +28,7 @@ file
    • save the population to disk, together with every part -of the algrithm you could think of - so you can decide to reload +of the algorithm you could think of - so you can decide to reload everything later to continue the same run, eventually with different parameters.
    • @@ -79,7 +79,7 @@ after the encapsulation of our binary_functioneoEvalFunc object, which again encapsulate the eoEvalFunc into an eoEvalFuncCounter. -As its name says, thisobject will, in addition to computing the fitness, +As its name says, this object will, in addition to computing the fitness, count the actual number of evaluations: the fitness of non-modified individuals is of course not recomputed - and this is taken care of by this object. Moreover, it @@ -129,11 +129,11 @@ for volunteers to create a Graphical User Interface :-)
    • The eoValueParam class, templatized by the type of the variable -you want to handle (i.e. integer, double, +you want to handle (i.e. iinteger, double, yourPrivateClass, ...). In this lesson, we will not go into details: e.g. we will not tell you that the eoValueParam -is actually a templatized sub-class of abstract class eoParam (oups, I +is actually a templatized sub-class of abstract class eoParam (oops, I said it!), nor will we deal with parameters outside their use from an eoParser. See the parameter section of the Bottom-up tutorial, or wait until lesson 4).
    • @@ -153,7 +153,7 @@ are read, by order of priority from a text file
    • -from the environement
    • +from the environment
    • from default values
    • @@ -186,7 +186,7 @@ in But you can now type in
                           SecondBitEA --vecSize=100 -
      and see the output of the optimization of OneMax on 100-bit bitstings. +
      and see the output of the optimization of OneMax on 100-bit bitstrings.
       
    • Take a look at all available parameters by typing in
    • @@ -271,7 +271,7 @@ mechanism offers you better ways to do that - and it's so easy ....


      eoCheckpoint: every generation I'd like to ... -
      The checkpointing mechanism is a very powerfull +
      The checkpointing mechanism is a very powerful construct to perform some systematic actions every generation - like saving things (using eoState objects described above), computing statistics @@ -330,14 +330,14 @@ whatever this is).
    • eoAverageStat and eoSecondMomentStat -respectiveley return the average (type double, assumes that FitnessType +respectively return the average (type double, assumes that FitnessType is castable to a double) and a pair made of the average and the standard deviation (type pair<double>) of the fitnesses in the populations.
    • eoDiversityStat returns the -diversity in the population: asssuming that there is a distance function +diversity in the population: assuming that there is a distance function defined among individuals, it returns the average inter-individuals distance. See also Exercise 2.
    @@ -346,8 +346,8 @@ within your algorithm, simply declareadd them to the eoCheckpoint you use in the algorithm. -

    Note: actually, there are 2 disctinct -classes that compute and gove access to statistics: eoStat +

    Note: actually, there are 2 distinct +classes that compute and give access to statistics: eoStat and eoSortedStat. As its name indicate, the latter is used whenever computing the statistics require a sorted population: not only this avoids to sort the population many times, @@ -368,8 +368,8 @@ are available in th eEO distribution: eoStdoutMonitor displays its parameters in text format on the screen. The (optional) boolean value in the constructor modifies the output: when true -(the default), vebose output is used, with one line per parameter. When -false, parcimonious output displays one line for all parameters. +(the default), verbose output is used, with one line per parameter. When +false, parsimonious output displays one line for all parameters.

  • eoStdoutMonitor writes its @@ -414,7 +414,7 @@ are available in the EO distribution: eoIncrementor A simple updater which maintains a counter (an eoValueParam that needs to be created beforehand, and passed in the constructor). It -is incremented everytime the operator() +is incremented every time the operator() method is called (every generation at the moment). You can of course also give an increment in the constructor (1 by default).
  • @@ -442,7 +442,7 @@ the state to some state-saver - and don't forget to eoCheckpoint
    .

    -
    Exercice 1: +
    Exercise 1:
    -
    Exercice 2: +
    Exercise 2:
    Write the eoDiversityStat stat computation and test it. Thanks to send us the code!

    -
    Exercice 3: +
    Exercise 3:
    Write the code for an eoGnuplot1DwithErrorbarsMonitor that would take into account the standard deviations and display them as -errorbars. +error-bars.

    Again, send us the code afterwards, thanks :-)

    diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 7bae8b387..d3fa1f796 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -57,7 +57,7 @@ are that functors are functions with private data
  • -you can have different funtors objects of the same class, i.e. you can +you can have different functors objects of the same class, i.e. you can use the same functionality with different parameters
  • @@ -165,15 +165,15 @@ function.

    Drawbacks
    The main drawback I see in using STL is that it makes it almost impossible -to use a debugger normally: whereas acess to data is made simple -to the progammer, data structures are actually so complex, and debuggers -so willing to display everything that you get lines of template instanciation +to use a debugger
    normally: whereas access to data is made simple +to the programmer, data structures are actually so complex, and debuggers +so willing to display everything that you get lines of template instantiation when asking your debugger what is inside some container! For instance I could never visualize some v[i] with gbd, v being an STL vector! -
    But there nonehteless are so many advantages !!! +
    But there nonetheless are so many advantages !!!



    Random @@ -183,7 +183,7 @@ numbers are simulated in computers by using pseudo-random< number generators (RNGs for short), i.e. functions that return series of numbers who look random (w.r.t. some statistical criteria).

    To make sure the random number generator is as good as possible, and -to ensure reproducibility of the results across diffrerent platforms, EO +to ensure reproducibility of the results across different platforms, EO has its own RNG, the ``Mersenne Twister'' random number generator MT19937 (thanks to Takuji Nishimura, see eoRNG.h @@ -205,12 +205,12 @@ use the RNG seeding procedure, see e.g. in Less

  • to simulate "true" random runs, you can just seed the RNG with a machine-clock -realted number, e.g. calling time(0), as done for isntance in Lesson3 +related number, e.g. calling time(0), as done for instance in Lesson3 (and after).
  • As RNGs only produce (by definition) numbers that are uniformly distributed integers between 0 and some maximal number, EO provides you with random -numbers follwing different probability distribution +numbers following different probability distribution (e.g. floating point following normal distribution).

    EO also provides random_generators @@ -225,14 +225,14 @@ and naming style EO:

    • -The name of local varoiables shoudl start with a lower case letter
    • +The name of local variables should start with a lower case letter
    • -The name of the parameters to a function shoudl start with an underscore +The name of the parameters to a function should start with an underscore (_)

    • The initialization parameters of constructors, for instance,  -shoudl be named from the names of the variables they are used to initialize. +should be named from the names of the variables they are used to initialize.
    • The names of classes should start with eo + an Uppercase letter
    • diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 1e8470f3c..cfa8e5d3c 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -48,7 +48,7 @@ populations, ...).


      Current version (Nov. 29, 2000) stops here, but here are the plans -(sujected to many changes, of course!) +(subjected to many changes, of course!)
       

    • Lesson 4 - More about checkpointing: write your first adaptive @@ -69,7 +69,7 @@ Lesson 7 - ...
    Of course, in each lesson, you have links to the Bottom-Up page of the corresponding component of an EA you are modifying. -
    ( ... Well, to tell you the truth, as of today, november 28, this is +
    ( ... Well, to tell you the truth, as of today, November 28, this is not true :-)

    diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 7f9d20942..31c4cbb2b 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -25,7 +25,7 @@ EAs :-) This tutorial can be used in 2 different ways: top-down and bottom-up.
    @@ -67,7 +67,9 @@ argument is a vector<bool> or a Note: Also, +
      +

      +

    Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object file once and for all (remember @@ -84,6 +86,8 @@ requires.
     

      +
      +
     

    Note: In the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness @@ -107,7 +111,9 @@ You can also use different initializers and call them in turn through the call to pop.append() function (see Exercise 2). -


    Note: Don't +
      +

      +

    Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!!
      From ba78a70aa44230abc2c481047109867fe4c7b6e8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 17 Dec 2000 07:49:55 +0000 Subject: [PATCH 0361/2134] Updated teh INSTALL and README files that were really minimal!!! --- eo/INSTALL | 25 +++++++++++++ eo/README | 103 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 118 insertions(+), 10 deletions(-) diff --git a/eo/INSTALL b/eo/INSTALL index b42a17ac4..17ce3b8d0 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -1,3 +1,28 @@ + EO INSTALL FILE +======================================================================= + check latest news at http://eodev.sourceforge.net/ +======================================================================= + +This file contains the standard installation instructions for packages +built using GNU package management facilities. + +You should not need to read this file unless something goes wrong when +doing the basic install which goes: + +- go to the EO directory - that was created when you unzipped the + archive file. + +- run + ./autogen.sh + +- run + make + +and that's it. You should probably go to the tutorial and start +learning about EO features and programming. + +======================================================================= + Basic Installation ================== diff --git a/eo/README b/eo/README index 96a7b4f4b..9336aa12d 100644 --- a/eo/README +++ b/eo/README @@ -1,21 +1,104 @@ + EO README FILE +======================================================================= + check latest news at http://eodev.sourceforge.net/ +======================================================================= -Welcome to EO, +Welcome to EO, the Evolving Objects library. +The latest news about EO can be found on the sourceforge repository at + +http://eodev.sourceforge.net/ + +In case of any problem, please e-mail us at + + + +================================================================== + BUILDING EO +================================================================== +The basic installatio procedure goes the following: + +- go to the EO directory - that was created when you unzipped the + archive file. + +- run + ./autogen.sh + +- run + make + +and that's it. You should probably go to the tutorial and start +learning about EO features and programming. + +In case of problems, you can read the INSTALL file - but remember this +is a standard installation file from GNU and that it contains nothing +specific about EO. + +=================================================================== + DIRECTORY STRUCTURE +=================================================================== +After unpacking the archive file, you should end up with the following +structure: + +.../ the MAIN EO dir, created when unpacking + | + +-- src SOURCE dir. Contains most EO .h files + | | + | +- utils general utilities (e.g. RNG-related source files) + | | + | +- ga bistring-genotypes source files + | | + | +- es real-valued-genotypes source files + | | + | | + | +- gp Genetic Programming source files + | | + | | + | +- obsolete files from old versions - for upward compatibility + | + | + | + +-- tutorial TUTORIAL dir (indeed :-) + | | + | +- html all html files - start by browsing index.html + | | + | +- LessonX for X=1, 2, 3, ... : example of increasing complexity + | + | + | + +-- doc DOCUMENTATION dir (generated by Doxygen) + | | + | +- html HTML files - start at index.html (see also tutorial) + | | + | +- latex latex files - use to generate Poatscript doc. + | | + | +- man Unix man format documentation + | + | + +-- test TEST files - for debugging purposes only + | + | + +-- app APPLICATIONS - one dir per separate application + | | + | +- gprop GA/backpropagation for neural nets + | | + | +- mastermind the wellknown MasterMind game + | + | + +-- win WINDOWS dir: project files for MS/VC5+ + + + +=================================================================== + NOTES +=================================================================== if you extracted a fresh snapshot from the cvs-repository, remember to do: $> ./autogen.sh --enable-maintainer-mode instead of -$> ./configure +$> ./autogen.sh before making the libraries. -Documentation can be found in: - eo/doc/html - -And \latex sources for a reference manual in: - eo/doc/latex - -There are currently no examples except the programs in the test directory. -Only the files mentioned in Makefile.am will actually compile. From 9c3453e876e4bad22ad19db7f21e2732abe8deae Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 05:31:54 +0000 Subject: [PATCH 0362/2134] A small detail ... --- eo/tutorial/html/FirstBitEA.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index 27a4616a6..db1f28cfb 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -166,7 +166,7 @@ The actual code is in boldface and the comment in normal face.      random(VEC_SIZE, boolean_generator());
     // Initialization of the population
     eoPop<Indi> pop(POP_SIZE, random);
    -  // and evaluate it in one loop
    +  // and evaluate it in one line
     apply<Indi>(eval, pop); // STL syntax
    From 2a93bba7e65e8bbeab93c8c885a93d7e7388d5a1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 10:17:39 +0000 Subject: [PATCH 0363/2134] Changed the "to-down / bottom-up" to "algorithm-based / component-based" Also added all replacement procedures in eoEngine.html and the general operator interface in eoOperators.html --- eo/tutorial/html/FirstBitEA.html | 4 +- eo/tutorial/html/FirstBitGA.html | 4 +- eo/tutorial/html/FirstRealEA.html | 4 +- eo/tutorial/html/FirstRealGA.html | 4 +- eo/tutorial/html/FirstRealGA_old.html | 4 +- eo/tutorial/html/Firstmerge.html | 4 +- eo/tutorial/html/NoWay.html | 8 +- eo/tutorial/html/SecondBitEA.html | 4 +- eo/tutorial/html/binary_value.html | 4 +- eo/tutorial/html/debut.html | 4 +- eo/tutorial/html/eoBottomUp.html | 14 +- eo/tutorial/html/eoEngine.html | 372 ++++++++++++++--- eo/tutorial/html/eoEval.html | 8 +- eo/tutorial/html/eoInit.html | 8 +- eo/tutorial/html/eoLesson1.html | 16 +- eo/tutorial/html/eoLesson2.html | 22 +- eo/tutorial/html/eoLesson3.html | 10 +- eo/tutorial/html/eoOperators.html | 577 ++++++++++++++++++++------ eo/tutorial/html/eoProgramming.html | 8 +- eo/tutorial/html/eoSGA.html | 4 +- eo/tutorial/html/eoTopDown.html | 34 +- eo/tutorial/html/eoTutorial.html | 38 +- eo/tutorial/html/index.html | 16 +- eo/tutorial/html/real_value.html | 4 +- 24 files changed, 881 insertions(+), 294 deletions(-) diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index db1f28cfb..9474a5fa4 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -8,7 +8,7 @@ Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -355,7 +355,7 @@ The actual code is in boldface and the comment in normal face.


    Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/FirstBitGA.html b/eo/tutorial/html/FirstBitGA.html index 07df19241..ef40176a3 100644 --- a/eo/tutorial/html/FirstBitGA.html +++ b/eo/tutorial/html/FirstBitGA.html @@ -8,7 +8,7 @@ Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -337,7 +337,7 @@ The actual code is in boldface and the comment in normal face.
    Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index 03505b290..fb524dea4 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -7,7 +7,7 @@ Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -353,7 +353,7 @@ The actual code is in boldface and the comment in normal face.
    Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html index 7bd1b168f..40224cf9e 100644 --- a/eo/tutorial/html/FirstRealGA.html +++ b/eo/tutorial/html/FirstRealGA.html @@ -8,7 +8,7 @@ Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -336,7 +336,7 @@ The actual code is in boldface and the comment in normal face.
    Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/FirstRealGA_old.html b/eo/tutorial/html/FirstRealGA_old.html index 3eacbd007..a634f5299 100644 --- a/eo/tutorial/html/FirstRealGA_old.html +++ b/eo/tutorial/html/FirstRealGA_old.html @@ -7,7 +7,7 @@ Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -265,7 +265,7 @@ e)

    }


    Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/Firstmerge.html b/eo/tutorial/html/Firstmerge.html index f7709b7a8..6345d865e 100644 --- a/eo/tutorial/html/Firstmerge.html +++ b/eo/tutorial/html/Firstmerge.html @@ -9,7 +9,7 @@ Back to Lesson 1 - Tutorial main page - -Top-Down page - Bottom-up +Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -273,7 +273,7 @@ code removed ]
    Back to Lesson 1 - Tutorial main page - -Top-Down page - Bottom-up +Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/NoWay.html b/eo/tutorial/html/NoWay.html index b5ff4ab3a..de53a993d 100644 --- a/eo/tutorial/html/NoWay.html +++ b/eo/tutorial/html/NoWay.html @@ -7,8 +7,8 @@ Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints -EO documentation
    @@ -59,8 +59,8 @@ you'll probably end up with an executable file named Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index 222cc9883..198cc917c 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -8,7 +8,7 @@ Back to Lesson 3 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -597,7 +597,7 @@ cout << "Exception: " << e.what() << '\n';

    Back to Lesson 3 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/binary_value.html b/eo/tutorial/html/binary_value.html index 89d4d965c..00fcfb511 100644 --- a/eo/tutorial/html/binary_value.html +++ b/eo/tutorial/html/binary_value.html @@ -7,7 +7,7 @@ Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -44,7 +44,7 @@ i++)

    Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/debut.html b/eo/tutorial/html/debut.html index 60f02d48f..2c6c8d305 100644 --- a/eo/tutorial/html/debut.html +++ b/eo/tutorial/html/debut.html @@ -6,8 +6,8 @@ Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints - EO documentation

    diff --git a/eo/tutorial/html/eoBottomUp.html b/eo/tutorial/html/eoBottomUp.html index ef490c9b6..ba1919ee8 100644 --- a/eo/tutorial/html/eoBottomUp.html +++ b/eo/tutorial/html/eoBottomUp.html @@ -3,20 +3,20 @@ - EO - The Bottom-Up approach + EO - The Component-Based approach Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based + - Component-Based - Programming hints - EO documentation

    -EO - Bottom-Up approach

    +EO - Component-Based approach -


    Congratualtions - You have chosen the bottom-up approach!  +


    Congratualtions - You have chosen the component-based approach!  From here you will be allowed to browse into the different components of an Evolutionary Algorithm, and to see how to program your favorite using the EO library. @@ -60,8 +60,8 @@ to go directly to the corresponding section of the tutorial.


    -
    Tutorial main page - Top-Down -page - Bottom-up page - Programming +
    Tutorial main page - Algorithm-Based + - Component-Based - Programming hints - EO documentation

    diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 019c2104a..6012fc814 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -2,11 +2,12 @@ + Genetic Engine -Top-Down page - Bottom-up -page - Programming hints - EO +Algorithm-Based - Component-Based +- Programming hints - EO documentation
    @@ -16,21 +17,42 @@ documentation


    Contents

    • -Introduction
    • +Introduction
    • -Selection
    • +Selection choice of parents that will be allowed +to reproduce
    • -Replacement
    • +Replacement choice of individuals that will +survive
    • -Popular evolution engines
    • +Popular evolution engines all historical evolution +engines are implemented in EO + +
    • +Helper classes:
    • + +
    • +tournaments, are intensively used within selection +and replacement procedures
    • + +
    • +rate-or-number is used to decide whether to return +a relative (to the current population size) or absolute number, when something +should return more than one individual.
    • + +
    • +Survive-and-die, a functor class with two populations +arguments: saves some from the first in the second, and kill some others +from the first. Used in replacements only.
    -


    Introduction -
    The term evolution engine denotes the different parts that simulate -the Darwinism in Evolutionary Algorithms. +


    +
    Introduction +

    The term evolution engine denotes +the different parts of an Evolutionary Algorithm that simulate the Darwinism:

    The fittest individuals are more likely to reproduce and survive.

    @@ -43,10 +65,17 @@ that will be allowed to reproduceReplacement takes place after reproduction, and is the Darwinistic choice of those individuals that will survive, i.e. become the parents of the next generation. -

    Selection +

    Both selection and replacement will be discussed in turn, before some +helper classes that are used within selection and replacement procedures +are presented. +

    +


    Selection
      -

    Replacement -
    The replacement phase takes place after the birth +
      +

    +


    +
    Replacement +

    The replacement phase takes place after the birth of all offspring through variation operators. The idea is to close the generation loop, i.e. to end up with a population of individuals that will be the initial population of next generation. That population will @@ -57,64 +86,46 @@ one generation to the next one - though nothing stops you from writing an algorithm with varying population size.

    Replacement: The interface -
    The abstract class for replacement procedures is the functor class +

    The abstract class for replacement procedures is the functor class eoReplacement, and the interface for its operator() is

    -

    void operator()(const eoPop<EOT>& -_parents, eoPop<EOT>& _offspring)

    +

    void operator()(eoPop<EOT>& _parents, +eoPop<EOT>& _offspring)

    which you could have guessed from the inheritance tree for class eoReplacement., as you see there that eoReplacement derives -from class eoBF<const eoPop<EOT>&, -eoPop<EOT>&, void>. +from class eoBF<eoPop<EOT>&, eoPop<EOT>&, +void>.
    This means that it takes 2 populations (called, for obvious anthropomorphic reasons, _parents and _offspring :-) -and puts the result into population offspring (as _parents is passed as -constant -population). -

    Note: After the replacement step, -all algorithms swap the parents and offspring populations - this is why -the result of the replacement is put into the _offspring population -- -the _parents being there untouched until the very last moment. +and is free to modify both, but the resulting population should be placed +in the first argument (usually called_parents) to close the loop and go +to next generation.

    Replacement: Instances

    • -The most straightforward replacement is ... no replacement, -or, more precisely, generational replacement: -all offspring replace all parents (used in Holland's and Goldberg's traditional -GAs). In EO, this is implemented in the eoNoReplacement -class, whose operator() does ... -exactly -nothing (remember that _parents and _offspring will be -swapped later on).
    • +eoGenerationalReplacement This +is the most straightforward replacement, called generational +replacement: all offspring replace all parents (used in Holland's +and Goldberg's traditional GAs).  It takes no argument, and supposes +that offspring and parents are of the same size (but does not check!).
       
    • -But the basic type of replacement in EO has two major steps, merging +eoMergeReduce This is one +the basic types of replacement in EO. It has two major steps, merging both populations of parents and offspring, and reducing -this big population to the right size. The functor class is called eoMergeReduce. -and it contains -two objects of respective types eoMerge -and eoReduce and you can probably guess -what each of them actually does :-)
    • +this big population to the right size. It contains +two objects of respective types eoMerge +and eoReduce +and you can probably guess what each of them actually does :-)
       

        -

      Available instances of eoMerge objects -are eoPlus, that simply adds -the parents to the offspring, or eoElitism, -that adds only some of the (best) parents to the offspring. A special case -of eoElistism is eoNoElitism, -an eoMerge that does nothing. -
        -

      Available instances of eoReduce are eoTruncate, -that deterministically keeps only the required number of individuals, taking -the best ones, and eoEPReduce -that usees the EP stocahstic tournamenent to reduce the population.

      Available instances of eoMergeReduce replacement -procedures are built on the above, and include +include

      • eoCommaReplacement, one of @@ -129,20 +140,50 @@ where the best from offspring+parents become the next generation. It is an eoMergeReduce(eoPlus, eoTruncate).
      • -eoEPReplacement, from Evolutionary +eoEPReplacement, used in the +Evolutionary Programming historical algorithm, doing a stochastic tournament among parents + offspring. It is an eoMergeReduce(eoPlus, -eoEPReduce).
      • +eoEPReduce) and its constructor requires as argument the +size of the tournament (unsigned int).
    • -Another type of eoReplacement is eoKillReplace in which some individuals -of the population are reaplced by some of the offspring.
    • +eoReduceMerge is another important +type of eoReplacement: the parents are first reduced, and then merged with +the offspring. Note that the parent population is reduced of the exact +number of offspring. + +
      Though not mandatory, it is implicitely assumed that few offspring +have been generated. Hence, all derived replacement procedures of class +eoReduceMerge +are termed eoSGAxxx, as they +are the ones to use in SteadyState Genetic Algorithm engine. This gives +the following instances of eoReduceMerge: +
        +
      • eoSSGAWorseReplacement +in which the worse parents are killed and replaced by all offsprings (no +additional argument needed);
      • + +
      • +eoSSGADetTournamentReplacement +in which parents to be killed are chosen by a (reverse) determinitic tournament. +Additional parameter (in the constructor) is the tournament size, an unsigned +int).
      • + +
      • +eoSSGAStochTournamentReplacement +in which parents to be killed are chosen by a (reverse) stochastic tournament. +Additional parameter (in the constructor) is the tournament rate, a double).
      -


      Replacement: Adding +

    • +eoSurviveAndDie is
    • +
    +Replacement: Adding (weak) elitism -
    You can add what is called weak elitism +

    You can add what is called weak elitism to any replacement by encapsulating it into an eoWeakElitismReplacement object. Weak elitism ensures that the overall best fitness in the population will never decrease: @@ -152,25 +193,228 @@ population, replacing the worse.

    Within EO, this is very easy to add:

    First, declare your replacement functor (here, generational, but it can be any replacement object): -
    eoNoReplacement<Indi> genReplace; +
    eoGenerationalReplacement<Indi> genReplace;
    Then wrap the weak elitism around it:
    eoWeakElitismReplacement<Indi> replace(genReplace);
    and use now replace as your replacement procedure within your algorithm.

    Note: of course, adding weak elitism to an elitist replacement makes no sense - but will not harm either :-) -

    Popular +

    Replacement: Test +file +

    The file t-eoReplacement +in the test directory implements all +above replacmenet procedures withni a very simple and easy-to-monitor Dummy +EO class. +

    +


    +
    Popular evolution engines -
    The most popular evolution engines are listed below, together with -the way to use them in EO. If you don't find your particuler algorithm, -please send it to us, and we might include it here! +

    This section will be completed soon - in the meantime just trust us +that all of these are already implemented in EO (except maybe some of the +last category :-) !!!!!! +

    The most popular evolution engines are listed below, together with the +way to use them in EO. If you don't find your particuler algorithm, please +send it to us, and we might include it here!

    • -Generational Genetic Algorihtm
    • +Generational Genetic Algorihtm + +
    • +Steady-State Genetic Algorithm
    • + +
    • +(MU+Lambda)-Evolution Strategy
    • + +
    • +(MU,LAMBDA)-Evolution Strategy
    • + +
    • +Evolutionary Programming
    • + +
    • +You name it :-)
    • +
    + +
    +
    Tournaments +

    Tournaments are an easy and quick way to select +individuals within a population based on simple comparisons. Though usually +based on fitness comparisons, they can use any comparison operator. +
    In EO, there are two variants of tournaments used to select one single +individual, namely Deterministic Tournament +and Stochastic Tournament, +that are used in selection and in replacement procedures, and a global +tournament-based selection of a whole bunch of individuals, the EP +Tournament. Though the single-selection tournaments can +be repeated to select more than one individual, and the batch tournament +selection can be used to select a single individual, both uses are probably +a waste of CPU time. +

      +
    • +Deterministic Tournament of +size T selects returns the best of T uniformly chosen individuals in the +population. It is implemented in the eoDetTournamentSelect +class, a sub-class of eoSelectOne, as well as in the eoDetTournamentTruncate +class that repeatidly removes from the population the "winner" of the inverse +tournament.  These objects use the C++ function determinitic_tournament +in  selectors.h.
    • + +
    • +Stochastic Tournament of rate +R first choses two individuals from the population, and selects the best +one with probability R and the worse one with probability (1-R). It is +implemented in the eoStochTournamentSelect +class, a sub-class of eoSelectOne, as well as in the eoStochTournamentTruncate +class that repeatidly removes from the population the "winner" of the inverse +tournament.  These objects use the C++ function determinitic_tournament +in  selectors.h.
    • + +
    • +EP Tournament of size T is +a global tournament: it works by assigning a score to all individuals in +the population the following way: starting with a score of 0, each individual +I is "opposed" T times to a uniformly chosen individual. Everytime I wins, +its score in incremented by 1 (and by 0.5 for every draw). The individuals +are then selected deterministically based on their scores from that procedure. +The EP Tournament is implemented +in the  eoEPReduce truncation +method used in some replacement procedures.


    -


    Top-Down page - Bottom-up -page - Programming hints -EO +
    +
    Merging +populations +

    In replacement procedures, one frequently needs to merge two populations +(computed form old parents and new-born offspring). Classes derived from +the abstract class eoMerge are written for that purpose. +

    eoMerge: interface +
    The abstract class for merging procedures is the functor class +eoMerge, +and the interface for its operator() +is +

    +

    void operator()(const eoPop<EOT>& +_parents, eoPop<EOT>& _offspring)

    + +

    which you could have guessed from the inheritance tree for class eoMerge, +as you see there that eoMerge derives from +
    class eoBF<const eoPop<EOT>&, eoPop<EOT>&, +void>. +
    This means that it takes 2 populations +and modifies the seond one by adding some individuals from the first one +(which is supposed to remain constant). +

    eoMerge: instances +
    Available instances of eoMerge objects +are eoPlus, that simply adds +the parents to the offspring, or eoElitism, +that adds only some of the (best) parents to the offspring. A special case +of eoElistism is eoNoElitism, +an eoMerge that does nothing. +

    +


    +
    Reducing +populations +

    The other useful component of replacement procedures, eoReduce, +kills +some individuals from a given population. +

    eoReduce: interface +
    The abstract class for reducing procedures is the functor class +eoReduce, +and the interface for its operator() +is +

    +

    void operator()(eoPop<EOT>& _parents, +unsigned int new_size)

    + +

    which you could have guessed from the inheritance tree for class eoReduce, +as you see there that eoReduce derives from +
    class eoBF<eoPop<EOT>&, unsigned +int, void>. +
    An eoReduce shoud take a +population and shrink it to the required size. +

    eoReduce: instances +
    Available instances of eoReduce are +

      +
    • +eoTruncate, deterministically +kills the worse individuals, keeping only the required number. It starts +by sorting teh populations, and hence does modify +its order.
    • + +
    • +eoLinearTruncate, deterministically +kills the worse individuals, keeping only the required number. It does +so by repeatedly removing the worsr individual. Hence does not +modify its order, but takes longer time than eoTruncate +in case of many offspring.
    • + +
    • +eoEPReduce, uses the EP +stochastic tournament to reduce the population. It requires an additinal +argument, the tournament size.
    • + +
    • +eoDetTournamentTruncate uses +inverse deterministic tournament to repeatidly kill one individual until +the propoer size is reached. As eoLinearTruncate, +it might take some time in the case of many offspring. It requires the +size of the tournament (unsigned int) +as parameter in the constructor (default is 2).
    • + +
    • +eoStochTournamentruncate  +uses inverse stochastic tournament to repeatidly kill individuals from +the population. It requires the rate of the tournament (double) +as parameter in the constructor (default is 0.75).
    • +
    + +


    +


    +
    Relative +or absolute number of individuals +

    Many classes in selection/replacement procedures will handle a number +of individuals that may either be fixed or be a fraction of some argument-population +size. +
    Of course, it is possible to write two different classes that will +only differ by the way they compute the number of individuals they have +to treat, as it is done for selectors with the two classes eoSelectPerc +and eoSelectNumber (it could also have been +possible to have some pure abstrat class and implement the computation +of the number of individuals to treat in some derived classes). +
    However, rather than multiply the number of class, EO has defined a +class that will handle the problem once and for all, the class eoHowMany. +It receives a double, and +a boolean indicating whether +that double is to be treated as a rate +or as an absolute (unisgned) interger. +

    eoHowMany: interface +
    The class interface for its operator() +is +

    +

    unsigned int operator()(unsigned int _pop_size)

    + +

    which you could have guessed from the inheritance tree for class eoHowMany, +as you see there that eoHowMany +derives from +
    class eoUF<unsigned int, unsigned int>. +

    Its constructor takes 2 argumenrts: +

    +

    eoHowMany(double _rate, bool _interpret_as_rate += true)

    +so by default the double is indeed interpreted as a rate. +

    It is used in eoSelectMany (which supersedes +eoSelectPerc +and eoSelectNumber, but they are left there +for tutorial reasons!) as well as in many truncation +methods. +

    +


    +
    Survive and +Die +

    +


    Algorithm-Based - Component-Based +- Programming hints -EO documentation

    diff --git a/eo/tutorial/html/eoEval.html b/eo/tutorial/html/eoEval.html index cf95bb89e..896eaffc8 100644 --- a/eo/tutorial/html/eoEval.html +++ b/eo/tutorial/html/eoEval.html @@ -6,8 +6,8 @@ Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints - EO documentation

    @@ -21,8 +21,8 @@ hints - EO documentation

    Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints - EO documentation
    Marc Schoenauer
    diff --git a/eo/tutorial/html/eoInit.html b/eo/tutorial/html/eoInit.html index 27cb1a40e..2a2d2d78b 100644 --- a/eo/tutorial/html/eoInit.html +++ b/eo/tutorial/html/eoInit.html @@ -5,8 +5,8 @@ Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints - EO documentation

    @@ -22,8 +22,8 @@ hints - EO documentation

    -Tutorial main page - Top-Down -page - Bottom-up page - Programming +Tutorial main page - Algorithm-Based +page - Component-Based - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index eb46324c8..f9116bdf0 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -2,15 +2,15 @@ - + Tutorial: Lesson 1 Lesson 2 - Tutorial main page - -Top-Down page - Bottom-up -page - Programming hints -EO +Algorithm-Based - Component-Based +- Programming hints -EO documentation

    @@ -220,10 +220,10 @@ objects of class
    parameters, and will be passed to the eoSGA algorithm.  -For more details on these classes, go to the top-down -corresponding pages, or to their respective documentation pages.
    -
    +For more details on these classes, go to the algorithm-based +corresponding pages, or to their respective documentation pages.
    +
      @@ -67,9 +67,7 @@ argument is a vector<bool> or a Note:
    Also, +


    Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object file once and for all (
    remember @@ -86,8 +84,6 @@ requires.
     

      -
      -
     

    Note: In the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness @@ -111,9 +107,7 @@ You can also use different initializers and call them in turn through the call to pop.append() function (see Exercise 2). -
      -

      -

    Note: Don't +


    Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!!
      @@ -134,7 +128,7 @@ or Quad (for crossovers, of class is derived from the corresponding eoxxxOp class. When applying the eoPropCombinedxxxOp, one of the eoxxxOp it contains is chosen by a roulette wheel, according to their respective rates, and is applied to the arguments. -For more details on these classes, go to the top-down +For more details on these classes, go to the algorithm-based corresponding pages, or to their respective documentation pages.

      @@ -340,8 +334,8 @@ and stopping criteria here). Lesson 3 - Main page - -Top-Down -- Bottom-up - Hints +Algorithm-Based +- Component-Based - Hints - EO documentation
      diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index 17c539b4e..f1a5aac5b 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -10,8 +10,8 @@ Lesson 4 - Main page - -Top-Down -- Bottom-up - Hints +Algorithm-Based +- Component-Based - Hints - EO documentation

      @@ -135,7 +135,7 @@ we will not go into details: e.g. we will not tell you that the eoValueParam is actually a templatized sub-class of abstract class eoParam (oops, I said it!), nor will we deal with parameters outside their use from an eoParser. -See the parameter section of the Bottom-up tutorial, or wait until lesson +See the parameter section of the Component-Based tutorial, or wait until lesson 4).
    • @@ -519,8 +519,8 @@ construct. Lesson 4 - Main page - -Top-Down -- Bottom-up - Hints +Algorithm-Based +- Component-Based - Hints - EO documentation

      diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index 5ec0e8efc..3626af515 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -2,64 +2,111 @@ - + Variation Operators -Top-Down page - Bottom-up -page - Programming hints - EO +General: Algorithm-Based +page - Component-Based - Programming +hints - EO documentation

      -
      TOC : Introduction +
      Local: Introduction - Crossover - Mutation -- Simple combinations - General -Operators - General combinations +- Combinations - General +Operators - Populators - General +combinations- Advanced operators

      Variation Operators

      - -


      Variation +Variation Operators
      Variation operators modify individuals, or, equivalently, move them -in the search space. They are almost always stochastic, -i.e. they are based on random numbers, or equivalently, perform random -modifications of their arguments. Variation operators are classified depending -on the number of arguments they use and/or modify. -

      Variation operators involving two individuals are called crossover -operators. They can either modify one of the parents according to the -material of the other parent, or modify both parents. In EO, the former -are called Binary operators and the latter Quadratic operators. -
      Variation operators involving one single individual are called mutation -operators. -
      In EO you can also define and use variation operators that generate -any number of offspring from any number of parents (sometimes termed orgy -operators). They are called general operators. -

      Though most the historical evolutionary algorithms used at most one -crossover and one mutation (see e.g. the Simple Genetic Algorithm in lesson1), -the trend now in evolutionary computation is to combine operators, choosing -at run-time and for each individual which operator to apply. This can be -done in the framework of simple operators, combining for instance several -mutations into a variation operator that chooses one of them according -to user-defined preferences: such combinations are called in EO proportional -combination of simple operators (see e.g. how to define and use such -combined operators in the SGA of lesson2). -

      Finally, there are many other ways to combine different variation operators -of different kind. Within EO, you can choose to apply many different types -of operator to the population, either in turn (this is called sequential -combination) or by randomly choosing among a set of operators at a given -time (this is proportional combination, generalizing the one defined for -simple operators). You can of course mix and interleave both approaches -at will, and this is described as general -combination of general operators. -

      EO implementation: all variation -operators in EO derive from the base (abstract) class eoOp -(as usual, click to see the inheritance diagram). blabla -
      +in the search space. In Evolutionary Algorithms, varitaion operators are +almost always stochastic, i.e. they +are based on random numbers, or equivalently, perform random modifications +of their arguments. Variation operators are classified depending on the +number of arguments they use and/or modify. +

        +
      • +Variation operators involving two individuals +are called crossover operators. They can either +modify one of the parents according to the material of the other parent, +or modify both parents. In EO, the former are called Binary operators and +the latter Quadratic operators.
      • + +
      • +Variation operators involving one single individual +are called mutation operators.
      • + +
      • +Straightforward extensions of these simple operators allow to combine them: +in +proportional combinations, one operator +is chosen among a given set of operators of same arity according to some +weights.
      • + +
      • +In EO you can also define and use variation operators that generate any +number of offspring from any number of parents (sometimes termed orgy +operators). They are called general operators.
      • + +
      • +However, the interface of such operators was designed for their use inside +general +combinations: you can use proportional combination, +in which one operator is chosen among a given set of operators of same +arity according to some weights, as for simple operators except that operators +of different arities can be mixed, but you can also use sequential +combinations, where different operators  are applied in +turn with given probability. But you can also embed any of such combinations +at any depth.
      • + +
      • +The price to pay for that is that you must use an instermediate class to +access the individuals, the eoPopulator class.
      • + +
      • +Thanks to that class, it also become easy to design advanced +operators, such as crossover operators where the mate is chosen according +to sexual preference rather than fitness-based +preferences.
      • +
      +EO classes for variation operators: + +
      -
      Simple +Simple operators: Crossover

      The characteristic of crossover operators is that they involve two parents. However, there are crossover operators that generate two parents, and some @@ -112,7 +159,6 @@ you are using for instance an SGA, this (de usage). See also the different ways that are described below, encapsulating the operators into combined operators objects. -
       

      Writing a crossover operator:
      There are only two things to modify in the template @@ -121,7 +167,7 @@ creating!)

      -



      Simple operators: Mutation
      Mutation operators modify one single individual. The corresponding @@ -177,7 +222,7 @@ creating!)
      • The constructor, where you pass to the object -any useful parameter
      • +any useful parameter (see the private data at end of class definition).
      • The operator() method, which performs the @@ -187,80 +232,287 @@ actual crossover.
      • Warning: don't forget to invalidate the fitness of the individual - if it has actually been modified. Otherwise, the lazy fitness evaluation procedure in -EO will not know it should compute the fitness again and will keep the +EO might not know it should compute the fitness again and will keep the old value.

      -
      Combining +Combining simple operators: proportional combinations

      The best thing to do is to go to the Lesson2 -of the tutorial, where everything is explained. +of the tutorial, where everything is explained. You will find out how you +can use +
      several mutations (respectiveley crossovers) as a single operator: +every time the operator is called, one of the available operators is chosen +by some roulette wheel selection using realtive weights.


      General Operators +

      General operators in EO are variation operators that are neither simple +mutations nor simple crossovers. They can involve any number of parents, +and create any number of offspring. Moreover, they can make use of different +ways to get the parents they will involve, e.g. they can use a different +selector for each of the parents they need to select. +

      The corresponding EO class is called eoGenOp. +and it is as usual templatized by the type of individual it can handle +(see documentation for eoGenOp +:-) +

      Interface: +
      The interface for eoGenOp +is based on that of another class, called eoPopulator. +An +eoPopulator +is a population, but also behaves like +an iterator over a population (hence +the name, Population-Iterator). +

      The basic +interface of an eoPopulator +(see also the documentation, +of course) is the following: Individuals are accessed through the operator*; +Basic iterator operations are available, like (pre)incrementation through +operator++, +position management through seekp +(returns the current position) and tellp +(go to a given position); Individuals can also be inserted +and erased at current position using +the corresponding methods; last but not least, as the individuals are returned +by reference, it is mandatory to ensure that they will not be moved around +later: the memory management  routine reserve is called whenever there +is a chance to add some individuals in the population. +

      This results in the following general interface for an eoGenOp: +It receives as argument an eoPopulator, +gets the individuals it needs using the operator*, +and must handle the positinning of the  using the operator++ +method. +

      void operator()(eoPopulator& +_pop) +
      { +
        EOT & eo1 = *_pop; // get +(select if necessary) the guy +
        ++_pop;        + +// advance +
        EOT & eo2 = *_pop; // get +(select if necessary) the guy +
        ++_pop;        + +// advance +
      ... +
        EOT & eoN = *_pop; // get +(select if necessary) the guy +
        ++_pop;        + +// advance +

      // do whatever the operator is supposed to +do +
      } +

      What happens next? Well, it all +depends on how many parents and how many offspring your general op needs: +

        +
      • +If the number of generated offspring is equal +to the number of parents, the operator simply needs to modify them (they +are passed by reference, no useless copy takes place).
      • + +
      • +If the operator produces more offspring than there +were parents, it needs to insert them into the list using the insert +method of the class eoPopulator as +in the following:
      • +
          -

        +

          +

        void operator()(eoPopulator& +_pop) +
        { +
          EOT & eo1 = *_pop; // get +(select if necessary) the guy +
          ++_pop;        + +// advance +
          // Now create second offspring - eo1 +is modified too! +
          EOT eo2 = create_individual(eo1); +
          // inserts eo2 in _pop after eo1 +
          _pop.insert(eo2); +
        ... +
        Of course the size of the resulting population will grow - and you +should have a replacement procedure that takes care of that. +

      • +The case where more parents are needed than offspring +will be created is a little more delicate: think about eoBinOp, +and try to imagine the reasons why no crossover of that class asre used +in the first lessons of the tutorial, within the SGA framework. There are +two possibilities:
      • + +
          +
        • +If you think "generational", the first idea is to get the parents from +outside the curent list, so the total number of (intermediate) offspring +is always equal to the initial population size. By chance, the eoPopulatorhas +a handle on the initial population that was used to start the process, +and you can access it from inside the GenOp method. For instance +

          void operator()(eoPopulator& +_pop) +
          { +
            EOT & eo1 = *_pop; // get +(select if necessary) the guy +
            ++_pop;       // advance +
            const EOT & eo2 = select(_pop.source()); +

          where select is any selector you like. Note the const: you are not allowed +to modify an element of the original population (but you could of course +have copied it!). Now to find out where that selector comes from, you'll +have to wait until next section. If you can't wait, go directly there.

        • + +
        • +If you don't care about the size of the offspring population, you can use +the delete method of the class eoPopulator. +For instance +
          void operator()(eoPopulator& +_pop) +
          { +
            EOT & eo1 = *_pop; // get +(select if necessary) the guy +
            ++_pop;       // advance +
            EOT & eo2 = *_pop; // get +(select if necessary) the guy +
            ++_pop;       // advance +
            // do whatever needs to be done, modifying +eo1 but not eo2 +
            _pop.delete();   // +removes (untouched) eo2 from the list
        +
      +Warning: if you use operators that +have different number of parents than offspring, you are deviating from +the simple generational approach. Be careful to have the proper replacement +procedure to take care of the population size: in most instances of algorithms +that come within EO, this is enforced (an exception is thrown if population +size varies from one genertaion to the other) but this might not be true +for all forthcoming EO algorithms. +

      Using general operators: +
      Directly applying general operators to given individuals is impossible +in EO, due to its interface. You need the help +of an individual dispenser of class eoPopulator. +But anyway general operators were thought to be used mainly in combination +of one another, as described below. +

      Writing a general +operator: +
      There are many things to modify in the template +class definitions provided. +

        +
      • +The constructor, where you pass to the object +any useful parameter (see private data at end of class definition).
      • + +
      • +The operator() method, which performs the +actual crossover. Remember you must use the argument eoPopulatorto +access the members of the [p[ulation in turn (method +operator*), +you may use the initial population (method source()), +as well as the insert or delete +methods.
      • + +
        Warning: as usual, don't forget +to invalidate the fitness of the individual +- if it has actually been modified. Otherwise, the lazy +fitness evaluation procedure in EO will not know it should compute +the fitness again and will keep the old value.
      + +
      The +populators: +
      The public interface class eoPopulator +has been described above. However, a protected method, termed select,  +is used inside the object to get new parents for the following operator, +and its implementation distinguishes two types of eoPopulator: +
        +
      • +The eoSeqPopulator gets new parents +from its source (the initial population). When the source is exhausted, +an exception if thrown. The idea of such pooulator is to start from a population +of already selected individuals.
      • + +
        The programmer should hence be very careful that the number of available +parents matches the requirements of the operators when using an eoSeqPopulator +object. +
      • +The eoSelectivePopulator , on the opposite, +always gets new parents using its private eoSelectOne +object (passed at construct time). Hence it can handle any number of parents +at will. The idea of such populator is to handle the whole breeding +process, i.e. selection and variation operators.
      • +
      +An immediate consequence is that if you are not sure of the numebr of  +parents you will need in some operators (e.g. because of some stochastic +proportional selection ebtween operators that don't need the same number +of parents, then you must use an eoSelectivePopulator +to apply the variation operators to the population. +

      General Combinations: -

      There are two main ways to use and combine general operators in EO: +
      There are two main ways to use and combine general operators in EO: the proportional combination, similar to what has been described for simple -operators above, and the sequential combination, which amounts to apply -all operators in turn to a bunch of individuals, each operator being applied -with a specific probability. -

      Proportional combinations behave -like a unique operator: when it is called upon a population of candidates, -an eoProportionalOpContainer enters -the following loop: -

      while there are individuals left in the candidate population +operators above, and the sequential +combination, which amounts to apply all operators in turn to a bunch of +individuals, each operator being applied with a specific probability. +

      Proportional combinations +
      When called upon a population (through an eoPopulator +object), an eoProportionalOpContainer +enters the following loop: +

      while there are individuals left in the list

      • choose one of the included operators according to their relative rates -by some roulette wheel random choice
      • +(by some roulette wheel random choice)
      • -find out the number of parents that it requires (haha, the tricky part -if e.g. sequentialOp are imbedded :-)
      • +applies the chosen operator. The parents are dispensed to the operator +from the list on demand.
      • -gets the required number of individual from the candidates,
      • +What happens next exactly depends on the type of operator, but basically, +some of the parents get modified, some might get removed from the list +and some new individual might get inserted on the list.
      • -applies the chosen operator to those parents, generating a list of offspring
      • - -
      • -removes the parents from the candidate population
      • - -
      • -append the offspring to the result population
      • +updates the list pointer (if needed) to the individual following the ones +that just have been modified/inserted/deleted.
      -Sequential combinations behave like -a unique operator: when it is called upon a population of candidates, an +Sequential combinations +
      When it is called upon a list of pending candidates, an eoSequentialOpContainer enters the following loop: -

      for all operators it contains, apply the operator to the candidate population, -that is +

      mark the current position +
      for all operators it contains,

      • -start with an empty offspring population
      • +go to marked position
      • -get the number of parents the operator at hand requires (haha, the tricky -part if the operator is an eoProportionalOpContainer!!!)
      • +until current end of population +is reached do + +
          +
        • +flip a coin according to the operator rate.
        • + +
            +
          • +If true, apply the operator to the parents. The current parents can be +modified, or some can be deleted from the list, or some offspring can be +inserted in the list.
          • -flip a coin according to the operator rate. It heads, apply the operator -to the parents to generate some offspring, and append the generated offspring -to the offspring population. If tails, directly append the parents to the -offspring population
          • +If false, move the pointer over the required number of parents (i.e. don't +modify thoses parents) +
        • -until no more parents (or an insufficient number of parents) are left in -the population. The remaining parents, if any, are copied in the offspring -population
        • +Next pending parent +
      • -make the offspring population the parentpopulation for next operator.
      • +Next operator
      Remark:The eoSGATransform presented in Lesson2 can be viewed as a particular type of eoSequentialOpContainer. @@ -268,29 +520,27 @@ It was not coded that way in order to provide a gradual introduction to all concepts.
      Exercise: write the code to perform an eoSGA using the eoOpContainer constructs. -

      Remark: there is actually a single list -of individuals that is maintained through a clever mecahnism of mark, rewind -and unmark, but that's a purely technical matter. If you are interested, -go and check the eoOpContainer and the eoSequentialOpContainer code. -
       

      Adding operators to a container: -
      The basic function to add an operator to an eoOpContainer is the method -add -from class eoOpContainer. -
      It is similar to all other add -methods in other Combined things in eo (as the simple eoProportionalCombinedXXXop +
      The way to add an operator to an eoOpContainer +is the method +add. It is similar +to all other add methods in +other Combined things in eo (as the simple eoProportionalCombinedXXXop described above, but also the eoCombinedContinue class or the eoCheckPoint class).
      The syntax is straightforward, and it works with any of the operator -classes defined above: +classes eoXXXOp, where XXX stands for +Mon, +Bin, Quad or +Gen:

      someOperatorType<Indi> myOperator; -
      eoXXXOpContainer<Indi> myOpContainer; +
      eoYYYOpContainer<Indi> myOpContainer;
      myOpContainer.add(myOperator, rate); // rate: double whose meaning depends on XXX -

      where XXX can be one of Proportional and Sequential. -
      However, the way rate -will be used is highly dependent on the type of OpContainer your are creating -there: +

      where YYY can be one of Proportional and Sequential. +
      Warning: the way rate +will be used is highly dependent on the type of eoOpContainer +your are creating there:

      • The rates for eoProportionalOpContainer @@ -300,21 +550,115 @@ values.
      • The "rates" for eoSequentialOpContainer actually -are probabilities, i.e. they will be used in a coin-flipping to determine -whether that particuler operator will be applied to the next candidates -at hand. They should be in [0,1] (no -error will happen if they are not, but the operator will be applied systematically -- this is equivalent of a rate equal to 1).
      • +are probabilities, i.e. they will be +used in a coin-flipping to determine whether that particuler operator will +be applied to the next candidates at hand. They should be in +[0,1] (no error will happen if they are not, but the operator +will be applied systematically - this is equivalent of a rate equal to +1). +
      +Containers, +Selectors and Populators +
      The way the eoOpContainer are applied +on a population using an eoPopulator +object. But, whereas the behavior of eoProportionalOpContainer +does not depend on the type of eoPopulator,(one +operator is chosen by roulette_wheel, and applied once before control is +given back to the caller), the main loop in method operator() +of +class eoSequentialOpContainer +iterates while (!_pop.exhausted()) +which is interpreted differently depending on the type +of eoPopulator: +
        +
      • +if the argument is an eoSelectivePopulator, +the default position of the eoPopulator, considered as a population iterator, +is at end of population. Individuals are added upon demand of an operator, +and in most cases all operators are applied once. This also depends, however, +on the arities of all operators:
      • + +
          +
        • +Consider an eoSequentialOpContainer +containing an eoQuadOp and an eoMonOp. The eoQuadOp first asks for two +parents and modifies them. The eoMonOp is then called starting from the +forst of thoses two modified individuals, and is hence applied twice, once +on each parent.
        • + +
        • +But consider now an eoSequentialOpContainer +containing an eoGenOp that takes one +parent and generates three offspring, followed by an eoQuadOp. +The eoGenOp will call the selector +to get the parent its need and will modify it and put 2 additional offspring +at end of the population. The eoQuadOp +will then be called on the first of the three outputs of the eoGenOp, +and hence will act upon the frist two of them. But at that point, the populator +iterator will point to the third of the individuals resulting from the +eoGenOp, +and the test _pop.exhausted() +will return false, so the eoQuadOp +will again be called. The second parent it needs will be given by a new +call to the embedded eoSelectOne of +the  and everything will go on smoothly, except that a total of 4 +offspring will have been generated by application of this particular eoSequentialOpContainer.
        -


        -


        TOC : Introduction +
      • +if the argument is an eoSeqPopulator, +the position of the iterator starts from the beginning of an existing population +(the source populations), and hence when an  an eoSequentialOpContainer +is called, it goes through the whole remaining of the population (the test +_pop.exhausted() +only returns true at end of the source population).
      • + +
      • +From the above it is easy to see that passing an eoSeqPopulator +to an eoProportionalOpContainer that +contains an eoSequentialOpContainer, +though not technically forbiddden, will most produce something  totally +unpredictable, and hence should probably not be used without great care.
      • +
      + +
      Advanced +general operators: +

      It is sometimes useful to be able to use a selector from inside an operator +(a typical example is when you want to implement sexual +preferences, i.e. choose a mate for a first parent according +to some characteritics of that first parent). +
      This is made possible in EO because the general operators have a handle +on the initial population through the method source() of the argument eoPopulator +they work on. Their operator() +method shoudl look like +

      void operator()(eoPopulator& +_pop) +
      { +
        EOT & eo1 = *_pop; // get +(select if necessary) the first guy +
        ++_pop;           + +// advance +
        EOT & eo2 = findBlonde(_pop.source());  + +// select mate +
      // do whatever the operator is supposed to +do +
      } +

      Where does that findBlonde +selector comes from? As usual, you have to attach it to the operator,  +in its constructor for instance, which should give something like: +

      sexualSelectorType<Indi>  findBlonde; +
      sexualOperatorType<Indi> yourBrainAndMyBeauty(findBlonde); +

      +


      Local: Introduction - Crossover - Mutation -- Simple combinations - General -Operators - General combinations -
      -
      Top-Down page - Bottom-up -page - Programming hints -EO +- Combinations - General +Operators - Populators - General +combinations- Advanced operators +
      General: Algorithm-Based +page - Component-Based - Programming +hints -EO documentation

      @@ -323,5 +667,6 @@ documentation

      Last modified: Fri Dec. 8 2000  +
        diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 9993f329e..976277626 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -7,8 +7,8 @@ Tutorial main page - -Top-Down -page - Bottom-up page - Programming +Algorithm-Based +page - Component-Based - Programming hints - EO documentation
      @@ -241,8 +241,8 @@ Blabla

    -
    Tutorial main page - Top-Down -page - Bottom-up page - Programming +
    Tutorial main page - Algorithm-Based +page - Component-Based - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/eoSGA.html b/eo/tutorial/html/eoSGA.html index c70570319..7d4547140 100644 --- a/eo/tutorial/html/eoSGA.html +++ b/eo/tutorial/html/eoSGA.html @@ -7,7 +7,7 @@ Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    @@ -144,7 +144,7 @@ apply<EOT>(eval, _pop);

    Back to Lesson 1 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
    diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 478e6bbe6..a4448d19d 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -3,25 +3,25 @@ - EO - The Top-Down approach + EO - The Algorithm-Based approach -Tutorial main page +Tutorial main +page - -Top-Down -page - Bottom-up page - Programming -hints - EO +Algorithm-Based - Component-Based +- Programming hints - EO documentation

    -EO - The Top-Down approach

    +EO - The Algorithm-Based approach -


    Congratulations - You have chosen the top-down approach!  This -means that you want to start from something that already works, and gradually -learn about the more complex constructs. We have prepared a series of "lessons" -for you. +


    Congratulations - You have chosen the algorithm-based approach!  +This means that you want to start from something that already works, and +gradually learn about the more complex constructs. We have prepared a series +of "lessons" for you.

    • Lesson 1 - a gentle introduction to the EO @@ -47,8 +47,10 @@ populations, restart stopped runs, ...).
    • -


      Current version (Nov. 29, 2000) stops here, but here are the plans -(subjected to many changes, of course!) +
        +

        +

      Current version (Nov. 29, 2000) stops here, but here are the plans (subjected +to many changes, of course!)
       

    • Lesson 4 - More about checkpointing: write your first adaptive @@ -67,14 +69,14 @@ more sophisticated island model (no totally distributed population yet).
    • Lesson 7 - ...
    -Of course, in each lesson, you have links to the Bottom-Up page of the +Of course, in each lesson, you have links to the Component-Based of the corresponding component of an EA you are modifying.
    ( ... Well, to tell you the truth, as of today, November 28, this is not true :-)

    -
    Tutorial main page - Top-Down -page - Bottom-up page - Programming +
    Tutorial main page - Algorithm-Based +- Component-Based - Programming hints - EO documentation
    @@ -82,7 +84,7 @@ documentation
    Marc Schoenauer
    -
    Last modified: Fri Nov 28 +
    Last modified: Tue Dec 19 2000  diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index fb39e7755..a53ed75db 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -2,44 +2,46 @@ + Tutorial EO -Top-Down page - Bottom-up -page - Programming hints - EO +Algorithm-Based - Component-Based +- Programming hints - EO documentation

    EO Tutorial

    -Welcome to EO - the Evolving Objects library. What is this tutorial good -for? -
    Well,  the short term idea here is to help you build +Welcome to EO - the Evolving Objects library. +

    The short term idea of this tutorial is to help you build your own Evolutionary Algorithms using EO - while the long term idea is that you will be able to contribute to EO, and ultimately write our EAs :-)

    About this tutorial

    -This tutorial can be used in 2 different ways: top-down and bottom-up. +This tutorial can be used in 2 different ways: algorithm-based and component-based.
    • -Top-down means you start from a very +Algorithm-Based means you start from a very simple, ready-to-run algorithm, and gradually modify it, making it both more powerful and more complex.
    • -Bottom-up means you start by examining the -components -of an EA one by one, down to the level of complexity you feel comfortable -with, and then build the whole algorithm using those components you need -(or the one you are mastering). Such approach might be viewed as going -through a simplified user guide, too.
    • +Component-Based means you start by examining +the +components of an EA one by one, down to +the level of complexity you feel comfortable with, and then build the whole +algorithm using those components you need (or the one you are mastering). +Such approach might be viewed as going through a simplified user guide, +too.
    However, it is strongly recommended -that you take some time on the first lesson of the Top-down approach to -get familiar with the basic concepts that are used throughout EO. Anyway, -as of today, November 29, the Bottom-up page is not written yet :-) +that you take some time on the first lesson of the Algorithm-Based approach +to get familiar with the basic concepts that are used throughout EO. Anyway, +as of today, December 19, the Component-Based is only very sparsely written +:-)

    Related documents

    • @@ -162,8 +164,8 @@ that you think could be improved, you are welcome to Enjoy! -
      Top-Down page -- Bottom-up page - Programming +
      Algorithm-Based +- Component-Based - Programming hints - EO documentation diff --git a/eo/tutorial/html/index.html b/eo/tutorial/html/index.html index 8d7709de0..0546d41c5 100644 --- a/eo/tutorial/html/index.html +++ b/eo/tutorial/html/index.html @@ -6,7 +6,7 @@ Tutorial EO -Top-Down page - Bottom-up +Algorithm-Based - Component-Based page - Programming hints - EO documentation
      @@ -22,15 +22,15 @@ idea is that you will be able to contribute to EO, and ultimately write EAs :-)

      About this tutorial

      -This tutorial can be used in 2 different ways: top-down and bottom-up. +This tutorial can be used in 2 different ways: algorithm-based and component-based.
      • -Top-down means you start from a very +Algorithm-Based means you start from a very simple, ready-to-run algorithm, and gradually modify it, making it both more powerful and more complex.
      • -Bottom-up means you start by examining the +Component-Based means you start by examining the components of an EA one by one, down to the level of complexity you feel comfortable with, and then build the whole algorithm using those components you need @@ -38,9 +38,9 @@ with, and then build the whole algorithm using those components you need through a simplified user guide, too.
      However, it is strongly recommended -that you take some time on the first lesson of the Top-down approach to +that you take some time on the first lesson of the Algorithm-Based approach to get familiar with the basic concepts that are used throughout EO. Anyway, -as of today, November 29, the Bottom-up page is not written yet :-) +as of today, November 29, the Component-Based is not written yet :-)

      Related documents

      • @@ -163,8 +163,8 @@ that you think could be improved, you are welcome to Enjoy! -
        Top-Down page -- Bottom-up page - Programming +
        Algorithm-Based +- Component-Based - Programming hints - EO documentation diff --git a/eo/tutorial/html/real_value.html b/eo/tutorial/html/real_value.html index 754aea603..dc3720f92 100644 --- a/eo/tutorial/html/real_value.html +++ b/eo/tutorial/html/real_value.html @@ -7,7 +7,7 @@ Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
        @@ -43,7 +43,7 @@ sum += _ind[i] * _ind[i];

        Back to Lesson 2 - Tutorial -main page - Top-Down page - Bottom-up +main page - Algorithm-Based - Component-Based page - Programming hints - EO documentation
        From 727f190a8850e030e4cbfc2532515108f7f42fb4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:02:19 +0000 Subject: [PATCH 0364/2134] Changed NoReplacement to GenerationalReplacement --- eo/tutorial/html/SecondBitEA.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index 198cc917c..e761dc8d8 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -9,7 +9,7 @@ Back to Lesson 3 - Tutorial main page - Algorithm-Based - Component-Based -page - Programming hints - EO + - Programming hints - EO documentation

        @@ -319,7 +319,8 @@ rng.reseed(seed);
        // based on boolean_generator class (see utils/rnd_generator.h)

                 eoInitFixedLength<Indi, boolean_generator>  -
        random(vecSize, boolean_generator()); +
                    +random(vecSize, boolean_generator());
                // Init pop from the randomizer: need to use the append function
                 @@ -368,9 +369,9 @@ by default rate==1  // And we now have the full slection/replacement - though with  -
         // no replacement (== generational -replacement) at the moment :-) -
         eoNoReplacement<Indi> replace;  +
         // the same generational +replacement at the moment :-) +
         eoGenerationalReplacement<Indi> replace;  @@ -598,7 +599,7 @@ cout << "Exception: " << e.what() << '\n';

        Back to Lesson 3 - Tutorial main page - Algorithm-Based - Component-Based -page - Programming hints - EO + - Programming hints - EO documentation
        From 6a0010474aa3bbadac6576ac6573d3f40eba40d1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:09:10 +0000 Subject: [PATCH 0365/2134] A new util class to handle the rate/integer argument to selectors/replacement --- eo/src/utils/eoHowMany.h | 78 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 eo/src/utils/eoHowMany.h diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h new file mode 100644 index 000000000..7776b6c2d --- /dev/null +++ b/eo/src/utils/eoHowMany.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMerge.h +// Base class for choosing a number of guys to apply something from a popsize +// (c) Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoHowMany_h +#define eoHowMany_h + +// to be used in selection / replacement procedures to indicate whether +// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) +// or as an absolute integer (number=rate regardless of popsize). +// the default value shoudl ALWAYS be true (eo_as_a_rate). +// +// this construct is mandatory because in some cases you might not know the +// population size that will enter the replacement for instance - so you +// cannot simply have a pre-computed (double) rate of 1/popSize if you want 1 guy + + +class eoHowMany +{ +public: + eoHowMany(double _rate, bool _interpret_as_rate = true): + rate(0), howmany(0) + { + if (_interpret_as_rate) + { + rate = _rate; + } + else + { + if (_rate<0) + throw std::logic_error("Negative number in eoHowMany!"); + howmany = (unsigned int)_rate; + if (howmany != _rate) + cout << "Warning: Number was rounded in eoHowMany"; + } + } + + unsigned int operator()(unsigned int _size) + { + if (howmany == 0) + { + if (rate == 0.0) + return 0; + else + return (unsigned int) (rate * _size); + } + return howmany; + } + +private : + double rate; + unsigned howmany; +}; + + + +#endif From 47031e82c93096396fae157338e56ae67fbd0b1d Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:18:08 +0000 Subject: [PATCH 0366/2134] Bottom-Up/Top-Down modifs --- eo/tutorial/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/README b/eo/tutorial/README index 8cf3e0c75..aecd143e2 100644 --- a/eo/tutorial/README +++ b/eo/tutorial/README @@ -1,9 +1,9 @@ -Eo Tutorial - corresponding to EO version 0.9.2 +Eo Tutorial - corresponding to EO version 0.9.1+ To start the tutorial, read index.html in your favorite browser. Many things are missing, including many solutions for the exercises, -the introduction to EC and most of the Bottom-Up pages. +the introduction to EC and most of the Component-based pages. More important, all examples of this tutorial have only been tested on a Linux computer, and the Makefile will not work with MS-Windows systems. Any help is welcome! From 25dd305ee6d488f853763c3af6bf798b9de11d1d Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:32:09 +0000 Subject: [PATCH 0367/2134] A few errors + local TOC at top of eoEngine --- eo/tutorial/html/eoEngine.html | 90 +++++++++++++++---------------- eo/tutorial/html/eoOperators.html | 57 +++++++++++--------- 2 files changed, 73 insertions(+), 74 deletions(-) diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 6012fc814..42e8b4306 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -2,55 +2,27 @@ - + Genetic Engine -Algorithm-Based - Component-Based -- Programming hints - EO -documentation +General: Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
        Local:
        Introduction  +- Selection - Replacement +- Popular evolution engines - Tournaments +- Merge - Reduce - HowMany +- SurviveAndDie

        Evolution Engine

        -


        Contents -

          -
        • -Introduction
        • - -
        • -Selection choice of parents that will be allowed -to reproduce
        • - -
        • -Replacement choice of individuals that will -survive
        • - -
        • -Popular evolution engines all historical evolution -engines are implemented in EO
        • - -
        • -Helper classes:
        • - -
        • -tournaments, are intensively used within selection -and replacement procedures
        • - -
        • -rate-or-number is used to decide whether to return -a relative (to the current population size) or absolute number, when something -should return more than one individual.
        • - -
        • -Survive-and-die, a functor class with two populations -arguments: saves some from the first in the second, and kill some others -from the first. Used in replacements only.
        • -
        -
        -
        Introduction +
        Evolution +Engines

        The term evolution engine denotes the different parts of an Evolutionary Algorithm that simulate the Darwinism:

        @@ -124,6 +96,20 @@ and you can probably guess what each of them actually does :-)

      •  

          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
         

        Available instances of eoMergeReduce replacement include

        -
        -Combining +
        Combining simple operators: proportional combinations

        The best thing to do is to go to the Lesson2 of the tutorial, where everything is explained. You will find out how you @@ -289,18 +287,18 @@ _pop)
        {
          EOT & eo1 = *_pop; // get (select if necessary) the guy -
          ++_pop;        +
          ++_pop;       // advance
          EOT & eo2 = *_pop; // get (select if necessary) the guy -
          ++_pop;        +
          ++_pop;       // advance
        ...
          EOT & eoN = *_pop; // get (select if necessary) the guy -
          ++_pop;        +
          ++_pop;       // advance

        // do whatever the operator is supposed to @@ -320,14 +318,12 @@ were parents, it needs to insert them into the list using the eoPopulator as in the following: -
          -

          -

        void operator()(eoPopulator& +


        void operator()(eoPopulator& _pop)
        {
          EOT & eo1 = *_pop; // get (select if necessary) the guy -
          ++_pop;        +
          ++_pop;       // advance
          // Now create second offspring - eo1 @@ -351,36 +347,45 @@ If you think "generational", the first idea is to get the parents from outside the curent list, so the total number of (intermediate) offspring is always equal to the initial population size. By chance, the eoPopulatorhas a handle on the initial population that was used to start the process, -and you can access it from inside the GenOp method. For instance +and you can access it from inside the GenOp method. For instance + +
          +

         

        void operator()(eoPopulator& _pop)
        {
          EOT & eo1 = *_pop; // get (select if necessary) the guy -
          ++_pop;       // advance +
          ++_pop;      + +// advance
          const EOT & eo2 = select(_pop.source());

        where select is any selector you like. Note the const: you are not allowed to modify an element of the original population (but you could of course have copied it!). Now to find out where that selector comes from, you'll -have to wait until next section. If you can't wait, go directly there. - +have to wait until next section. If you can't wait, go directly there.

      • If you don't care about the size of the offspring population, you can use the delete method of the class eoPopulator. -For instance +For instance
      • +
        void operator()(eoPopulator& _pop)
        {
          EOT & eo1 = *_pop; // get (select if necessary) the guy -
          ++_pop;       // advance +
          ++_pop;      + +// advance
          EOT & eo2 = *_pop; // get (select if necessary) the guy -
          ++_pop;       // advance +
          ++_pop;      + +// advance
          // do whatever needs to be done, modifying eo1 but not eo2
          _pop.delete();   // -removes (untouched) eo2 from the list
      +removes (untouched) eo2 from the list
    Warning: if you use operators that have different number of parents than offspring, you are deviating from @@ -636,10 +641,10 @@ _pop)
    {
      EOT & eo1 = *_pop; // get (select if necessary) the first guy -
      ++_pop;           +
      ++_pop;          // advance -
      EOT & eo2 = findBlonde(_pop.source());  +
      EOT & eo2 = findBlonde(_pop.source()); // select mate
    // do whatever the operator is supposed to @@ -656,8 +661,8 @@ in its constructor for instance, which should give something like: - Combinations - General Operators - Populators - General combinations- Advanced operators -
    General: Algorithm-Based -page - Component-Based - Programming +
    General: Algorithm-Based +- Component-Based - Programming hints -EO documentation
    From 6acdcb6d9b673cde3937d7217f793d4e44245cbf Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:41:19 +0000 Subject: [PATCH 0368/2134] THe big eoReplacement update: The interface for eoReplacement is now eoPop&, eoPop& (i.e. no const) and the result must be in the first argument in the end. Hence it is possible to do SSGA and all intermediate replacmeent procedures The classes derived from eoMergeReduce.h are now in a separate file The SSGA-like replcaement procedures are in eoReduceMerge.h A more general replacement can be found in eoSurviveAndDie.h (it could be made a littel more general - still open for upgrades). Also some accessors have been added to the eoPop (best and worse individuals) And include file eo has been updated --- eo/src/Makefile.am | 2 +- eo/src/eo | 25 +++++- eo/src/eoEasyEA.h | 13 ++- eo/src/eoMerge.h | 76 ++++++++++------ eo/src/eoMergeReduce.h | 98 ++++++++++++++++++++ eo/src/eoPop.h | 32 ++++++- eo/src/eoReduce.h | 175 +++++++++++++++++++++++++++++++++++- eo/src/eoReduceMerge.h | 119 +++++++++++++++++++++++++ eo/src/eoReplacement.h | 118 ++++++++++++------------ eo/src/eoSelectMany.h | 76 ++++++++++++++++ eo/src/eoSelectNumber.h | 72 +++++++++++++++ eo/src/eoSurviveAndDie.h | 188 +++++++++++++++++++++++++++++++++++++++ 12 files changed, 900 insertions(+), 94 deletions(-) create mode 100644 eo/src/eoMergeReduce.h create mode 100644 eo/src/eoReduceMerge.h create mode 100644 eo/src/eoSelectMany.h create mode 100644 eo/src/eoSelectNumber.h create mode 100644 eo/src/eoSurviveAndDie.h diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 306370783..0365acb7a 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = es ga gp utils other +SUBDIRS = es ga utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a diff --git a/eo/src/eo b/eo/src/eo index c4674416b..62c8de89f 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -30,8 +30,20 @@ // some defines to make things easier to get at first sight +// tunigni the amount of output using a boolean argument: +// true should always mean more output #define eo_verbose true #define eo_no_verbose false +// to be used in selection / replacement procedures to indicate whether +// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) +// or as an absolute integer (number=rate regardless of popsize). +// the default value shoudl ALWAYS be true (eo_as_a_rate). +// +// this construct is mandatory because in some cases you might not know the +// population size that will enter the replacement for instance - so you +// cannot simply have a pre-computed (double) rate of 1/popSize +#define eo_is_a_rate true +#define eo_is_an_integer false //----------------------------------------------------------------------------- #include @@ -86,13 +98,24 @@ #include #include -// Selection and reproduction stuff +// Selection #include #include #include #include #include +#include +#include +#include + +// Replacement +// #include +#include +#include +#include + +// Variation #include #include #include diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index d23bac1bf..dc066601b 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -119,24 +119,23 @@ template class eoEasyEA: public eoAlgo { try { + unsigned pSize = _pop.size(); breed(_pop, offspring); apply(eval, offspring); - - replace(_pop, offspring); - if (offspring.size() < _pop.size()) + replace(_pop, offspring); // after replace, the new pop. is in _pop + + if (pSize > _pop.size()) throw runtime_error("Population shrinking!"); - else if (offspring.size() > _pop.size()) + else if (pSize < _pop.size()) throw runtime_error("Population growing!"); - _pop.swap(offspring); - } catch (exception& e) { string s = e.what(); - s.append( " in eoSelectTransformReduce "); + s.append( " in eoEasyEA"); throw runtime_error( s ); } } // while diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 4261d2495..ae8b00bea 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -50,32 +50,55 @@ template class eoMerge: public eoBF&, eoPop class eoElitism : public eoMerge { - public : - eoElitism(unsigned _howmany) : howmany(_howmany) {} - - void operator()(const eoPop& _pop, eoPop& offspring) - { - if (howmany == 0) - return; - - if (howmany > _pop.size()) - throw std::logic_error("Elite larger than population"); - - vector result; - _pop.nth_element(howmany, result); - - for (size_t i = 0; i < result.size(); ++i) - { - offspring.push_back(*result[i]); - } - } - - private : - unsigned howmany; +public : + eoElitism(double _rate, bool _interpret_as_rate = true): + rate(0), howmany(0) + { + if (_interpret_as_rate) + { + if ( (_rate<0) || (_rate>1) ) + throw std::logic_error("eoElitism: rate shoud be in [0,1]"); + rate = _rate; + } + else + { + if (_rate<0) + throw std::logic_error("Negative number of offspring in eoElitism!"); + howmany = (unsigned int)_rate; + if (howmany != _rate) + cout << "Warning: Number of guys to merge in eoElitism was rounded"; + } + } + + void operator()(const eoPop& _pop, eoPop& _offspring) + { + if ((howmany == 0) && (rate == 0.0)) + return; + unsigned howmanyLocal; + if (howmany == 0) // rate is specified + howmanyLocal = (unsigned int) (rate * _pop.size()); + else + howmanyLocal = howmany; + + if (howmanyLocal > _pop.size()) + throw std::logic_error("Elite larger than population"); + + vector result; + _pop.nth_element(howmanyLocal, result); + + for (size_t i = 0; i < result.size(); ++i) + { + _offspring.push_back(*result[i]); + } + } + +private : + double rate; + unsigned howmany; }; /** @@ -93,18 +116,17 @@ Very elitist class, copies entire population into next gen template class eoPlus : public eoMerge { public : - void operator()(const eoPop& _pop, eoPop& offspring) + void operator()(const eoPop& _pop, eoPop& _offspring) { - offspring.reserve(offspring.size() + _pop.size()); + _offspring.reserve(_offspring.size() + _pop.size()); for (size_t i = 0; i < _pop.size(); ++i) { - offspring.push_back(_pop[i]); + _offspring.push_back(_pop[i]); } } private : - unsigned howmany; }; //----------------------------------------------------------------------------- diff --git a/eo/src/eoMergeReduce.h b/eo/src/eoMergeReduce.h new file mode 100644 index 000000000..6a7aebf0b --- /dev/null +++ b/eo/src/eoMergeReduce.h @@ -0,0 +1,98 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoMergeReduce.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoMergeReduce_h +#define _eoMergeReduce_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- +/** +Replacement strategies that combine en eoMerge and an eoReduce. + +@classes: eoMergeReduce, the base (pure abstract) class + eoPlusReplacement the ES plus strategy + eoCommaReplacement the ES comma strategy +*/ + +/** +eoMergeReduce: abstract replacement strategy that is just an application of +an embedded merge, followed by an embedded reduce +*/ +template +class eoMergeReduce : public eoReplacement +{ + public: + eoMergeReduce(eoMerge& _merge, eoReduce& _reduce) : + merge(_merge), reduce(_reduce) + {} + + void operator()(eoPop& _parents, eoPop& _offspring) + { + merge(_parents, _offspring); // parents untouched, result in offspring + reduce(_offspring, _parents.size()); + _parents.swap(_offspring); + } + + private : + eoMerge& merge; + eoReduce& reduce; +}; + +/** +ES type of replacement strategy: first add parents to population, then truncate +*/ +template +class eoPlusReplacement : public eoMergeReduce +{ + public : + eoPlusReplacement() : eoMergeReduce(plus, truncate) {} + + private : + eoPlus plus; + eoTruncate truncate; +}; + +/** +ES type of replacement strategy: ignore parents, truncate offspring +*/ +template +class eoCommaReplacement : public eoMergeReduce +{ + public : + eoCommaReplacement() : eoMergeReduce(no_elite, truncate) {} + + private : + eoNoElitism no_elite; + eoTruncate truncate; +}; + + +#endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 22bd93b5c..cfb6b9814 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -123,6 +123,7 @@ class eoPop: public vector, public eoObject, public eoPersistent std::sort(begin(), end(), greater()); } + // creates a vector pointing to the individuals in descending order void sort(vector& result) const { result.resize(size()); @@ -132,9 +133,37 @@ class eoPop: public vector, public eoObject, public eoPersistent std::sort(result.begin(), result.end(), Cmp()); } + // returns an iterator to the best individual DOES NOT MOVE ANYBODY + eoPop::iterator it_best_element() + { + typename eoPop::const_iterator it = max_element(begin(), end()); + return it; + } + + // returns an iterator to the best individual DOES NOT MOVE ANYBODY + const EOT & best_element() const + { + typename eoPop::const_iterator it = max_element(begin(), end()); + return (*it); + } + + // returns a const reference to the worse individual DOES NOT MOVE ANYBODY + const EOT & worse_element() const + { + typename eoPop::const_iterator it = min_element(begin(), end()); + return (*it); + } + +// returns an iterator to the worse individual DOES NOT MOVE ANYBODY + eoPop::iterator it_worse_element() + { + typename eoPop::iterator it = min_element(begin(), end()); + return it; + } + /** slightly faster algorithm than sort to find all individuals that are better - than the nth individual + than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. */ eoPop::iterator nth_element(int nth) { @@ -168,6 +197,7 @@ class eoPop: public vector, public eoObject, public eoPersistent std::nth_element(result.begin(), it, result.end(), Cmp()); } + // does STL swap with other pop void swap(eoPop& other) { std::swap(static_cast& >(*this), static_cast& >(other)); diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 150963ef1..138dc59f4 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -33,26 +33,199 @@ // EO includes #include // eoPop #include // eoReduce +#include /** * eoReduce: .reduce the new generation to the specified size + At the moment, limited to truncation - with 2 different methods, + one that sorts the whole population, and one that repeatidely kills + the worst. Ideally, we should be able to choose at run-time!!! */ -template class eoReduce: public eoBF&, unsigned, void> +template class eoReduce: public eoBF&, unsigned, void> {}; +/** truncation method using sort */ template class eoTruncate : public eoReduce { void operator()(eoPop& _newgen, unsigned _newsize) { if (_newgen.size() == _newsize) return; + if (_newgen.size() < _newsize) + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); _newgen.nth_element(_newsize); _newgen.resize(_newsize); } }; +/** +EP truncation method (some global stochastic tournament + sort) +Softer selective pressure than pure truncate +*/ +template class eoEPReduce : public eoReduce +{ +public: +typedef typename EOT::Fitness Fitness; + + eoEPReduce(unsigned _t_size): + t_size(_t_size) + { + if (t_size < 2) + { // warning, error? + t_size = 2; + } + } + + /// helper struct for comparing on pairs + typedef pair::iterator> EPpair; + struct Cmp { + bool operator()(const EPpair a, const EPpair b) const + { return b.first < a.first; } + }; + + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned int presentSize = _newgen.size(); + if (presentSize == _newsize) + return; + if (presentSize < _newsize) + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); + vector scores(presentSize); + for (unsigned i=0; i competitor.fitness()) + scores[i].first += 1; + else if (fit == competitor.fitness()) + scores[i].first += 0.5; + } + } + // now we have the scores + typename vector::iterator it = scores.begin() + _newsize; + std::nth_element(scores.begin(), it, scores.end(), Cmp()); + it = scores.begin() + _newsize; // just in case ??? + while (it < scores.end()) + _newgen.erase(it->second); + } +private: + unsigned t_size; +}; + +/** a truncate class that does not sort, but repeatidely kills the worse. +To be used in SSGA-like replacements (e.g. see eoSSGAWorseReplacement) +*/ +template +class eoLinearTruncate : public eoReduce +{ + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned oldSize = _newgen.size(); + if (oldSize == _newsize) + return; + if (oldSize < _newsize) + throw std::logic_error("eoLinearTruncate: Cannot truncate to a larger size!\n"); + for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); + _newgen.erase(it); + } + } +}; + +/** a truncate class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) +*/ +template +class eoDetTournamentTruncate : public eoReduce +{ +public: + eoDetTournamentTruncate(unsigned _t_size): + t_size(_t_size) + { + if (t_size < 2) + { + cout << "Warning, Size for eoDetTournamentTruncate adjusted to 2\n"; + t_size = 2; + } + } + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned oldSize = _newgen.size(); + if (_newsize == 0) + { + _newgen.resize(0); + return; + } + if (oldSize == _newsize) + return; + if (oldSize < _newsize) + throw std::logic_error("eoDetTournamentTruncate: Cannot truncate to a larger size!\n"); + + // Now OK to erase some losers + for (unsigned i=0; i(_newgen, t_size); + _newgen.erase(&eo); + } + } +private: + unsigned t_size; +}; + +/** a truncate class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) +*/ +template +class eoStochTournamentTruncate : public eoReduce +{ +public: + eoStochTournamentTruncate(double _t_rate): + t_rate(_t_rate) + { + if (t_rate <= 0.5) + { + cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51\n"; + t_rate = 0.51; + } + if (t_rate > 1) + { + cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 1\n"; + t_rate = 1; + } + } + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned oldSize = _newgen.size(); + if (_newsize == 0) + { + _newgen.resize(0); + return; + } + if (oldSize == _newsize) + return; + if (oldSize < _newsize) + throw std::logic_error("eoStochTournamentTruncate: Cannot truncate to a larger size!\n"); + // Now OK to erase some losers + for (unsigned i=0; i(_newgen, t_rate); + _newgen.erase(&eo); + } + } + +private: + double t_rate; +}; + //----------------------------------------------------------------------------- #endif //eoInsertion_h diff --git a/eo/src/eoReduceMerge.h b/eo/src/eoReduceMerge.h new file mode 100644 index 000000000..52088cd00 --- /dev/null +++ b/eo/src/eoReduceMerge.h @@ -0,0 +1,119 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoReduceMerge.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoReduceMerge_h +#define _eoReduceMerge_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** +eoReduceMerge: Replacement strategies that start by reducing the parents, + then merge with the offspring + +This is the way to do SSGA: the offspring gets inserted in the population +even if it is worse than anybody else. + +@classes: eoReduceMerge, eoSSGAWorseReplacement, + eoSSGADetTournamentReplacement, eoSSGAStochTournamentReplacement +*/ + +template +class eoReduceMerge : public eoReplacement +{ + public: + eoReduceMerge(eoReduce& _reduce, eoMerge& _merge) : + reduce(_reduce), merge(_merge) + {} + + void operator()(eoPop& _parents, eoPop& _offspring) + { + if (_parents.size() < _offspring.size()) + throw std::logic_error("eoReduceMerge: More offspring than parents!\n"); + reduce(_parents, _parents.size() - _offspring.size()); + merge(_offspring, _parents); + } + + private : + eoReduce& reduce; + eoMerge& merge; +}; + +/** +SSGA replace worst. Is an eoReduceMerge. +*/ +template +class eoSSGAWorseReplacement : public eoReduceMerge +{ + public : + eoSSGAWorseReplacement() : eoReduceMerge(truncate, plus) {} + + private : + eoLinearTruncate truncate; + eoPlus plus; +}; + +/** +SSGA deterministic tournament replacement. Is an eoReduceMerge. +*/ +template +class eoSSGADetTournamentReplacement : public eoReduceMerge +{ + public : + eoSSGADetTournamentReplacement(unsigned _t_size) : + eoReduceMerge(truncate, plus), truncate(_t_size) {} + + private : + eoDetTournamentTruncate truncate; + eoPlus plus; +}; + +/** SSGA stochastic tournament replacement. Is an eoReduceMerge. +It much cleaner to insert directly the offspring in the parent population, +but it is NOT equivalent in case of more than 1 offspring as already +replaced could be removed , which is not possible in the eoReduceMerge +So what the heck ! */ +template +class eoSSGAStochTournamentReplacement : public eoReduceMerge +{ + public : + eoSSGAStochTournamentReplacement(double _t_rate) : + eoReduceMerge(truncate, plus), truncate(_t_rate) {} + + private : + eoStochTournamentTruncate truncate; + eoPlus plus; +}; + +#endif diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index 3a57db639..d0b6452ce 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- eoReplacement.h - (c) Maarten Keijzer, GeNeura Team, 2000 + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,7 +18,9 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- @@ -31,81 +33,85 @@ #include #include #include +#include //----------------------------------------------------------------------------- /** eoReplacement: High level strategy for creating a new generation -from parents and offspring. This is a combination of eoMerge and eoReduce, -so there is an implementation called eoMergeReduce that can be found below +from parents and offspring. - @see eoMerge, eoReduce, eoMergeReduce +The eoMergeReduce, combination of eoMerge and eoReduce, can be found +in file eoMergeReduce.h + +Removed the const before first argument: though it makes too many classes +with the same interface, it allows to minimize the number of actual copies +by choosing the right destination +I also removed the enforced "swap" in the eoEasyAlgo and hence the generational +replacement gets a class of its own that only does the swap (instead of the +eoNoReplacement that did nothing, relying on the algo to swap popualtions). +MS 12/12/2000 + +NOTE: the resulting population should always be in the first argument +(replace parents by offspring)! The second argument can contain any rubbish + + @see eoMerge, eoReduce, eoMergeReduce, eoReduceMerge + +@classes eoReplacement, base (pure abstract) class + eoGenerationalReplacement, as it says ... + eoWeakElitistReplacement a wrapper to add elitism */ + +/** +eoReplacement: the base class for all replacementp functors + */ template -class eoReplacement : public eoBF&, eoPop&, void> +class eoReplacement : public eoBF&, eoPop&, void> {}; /** -no replacement +generational replacement == swap populations */ template -class eoNoReplacement : public eoReplacement +class eoGenerationalReplacement : public eoReplacement { public : - /// do nothing - void operator()(const eoPop&, eoPop&) - {} + /// swap + void operator()(eoPop& _parents, eoPop& _offspring) + { + _parents.swap(_offspring); + } }; -/** -eoMergeReduce: special replacement strategy that is just an application of an embedded merge, -followed by an embedded reduce +/** +eoWeakElitistReplacement: a wrapper for other replacement procedures. +Copies in the new pop the best individual from the old pop, +AFTER normal replacement, if the best of the new pop is worse than the best +of the old pop. Removes the worse individual from the new pop. +This could be changed by adding a selector there... */ template -class eoMergeReduce : public eoReplacement +class eoWeakElitistReplacement : public eoReplacement { - public: - eoMergeReduce(eoMerge& _merge, eoReduce& _reduce) : - merge(_merge), reduce(_reduce) - {} +public : + typedef typename EOT::Fitness Fitness; - void operator()(const eoPop& _parents, eoPop& _offspring) - { - merge(_parents, _offspring); - reduce(_offspring, _parents.size()); - } + // Ctor, takes an eoReplacement + eoWeakElitistReplacement(eoReplacement & _replace) : + replace(_replace) {} - private : - eoMerge& merge; - eoReduce& reduce; + /// do replacement + void operator()(eoPop& _pop, eoPop& _offspring) + { + const EOT & oldChamp = _pop.best_element(); + replace(_pop, _offspring); // "normal" replacement, parents are the new + if (_pop.best_element() < oldChamp) // need to do something + { + typename eoPop::iterator itPoorGuy = _pop.it_worse_element(); + (*itPoorGuy) = oldChamp; + } + } +private: + eoReplacement & replace; }; -/** -ES type of replacement strategy: first add parents to population, then truncate -*/ -template -class eoPlusReplacement : public eoMergeReduce -{ - public : - eoPlusReplacement() : eoMergeReduce(plus, truncate) {} - - private : - eoPlus plus; - eoTruncate truncate; -}; - -/** -ES type of replacement strategy: ignore parents, truncate offspring -*/ -template -class eoCommaReplacement : public eoMergeReduce -{ - public : - eoCommaReplacement() : eoMergeReduce(no_elite, truncate) {} - - private : - eoNoElitism no_elite; - eoTruncate truncate; -}; - - #endif diff --git a/eo/src/eoSelectMany.h b/eo/src/eoSelectMany.h new file mode 100644 index 000000000..f1b765f26 --- /dev/null +++ b/eo/src/eoSelectMany.h @@ -0,0 +1,76 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectMany.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectMany_h +#define _eoSelectMany_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectMany selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectMany needs an eoSelectOne in its ctor + + It will use an eoHowMnay to determine the number of guys to select, + and push them to the back of the destination population. +*/ +template +class eoSelectMany : public eoSelect +{ + public: + /// init + eoSelectMany(eoSelectOne& _select, + double _rate, bool _interpret_as_rate = true) + : select(_select), howMany(_rate, _interpret_as_rate) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned target = howMany(_source.size()); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + eoHowMany howMany; +}; + +#endif diff --git a/eo/src/eoSelectNumber.h b/eo/src/eoSelectNumber.h new file mode 100644 index 000000000..2b5d2a8cd --- /dev/null +++ b/eo/src/eoSelectNumber.h @@ -0,0 +1,72 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectNumber.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectNumber_h +#define _eoSelectNumber_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectNumber selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectNumber needs an eoSelectOne in its ctor + + It will select a fixed number of individuals and pushes them to + the back of the destination population. +*/ +template +class eoSelectNumber : public eoSelect +{ + public: + /// init + eoSelectNumber(eoSelectOne& _select, unsigned _nb_to_select = 1) + : select(_select), nb_to_select(_nb_to_select) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + size_t target = static_cast(nb_to_select); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + unsigned nb_to_select; +}; + +#endif diff --git a/eo/src/eoSurviveAndDie.h b/eo/src/eoSurviveAndDie.h new file mode 100644 index 000000000..eb582cb17 --- /dev/null +++ b/eo/src/eoSurviveAndDie.h @@ -0,0 +1,188 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSurviveAndDie.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSurviveAndDie_h +#define _eoSurviveAndDie_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoSurviveAndDie: takes a population (first argument), +kills the ones that are to die, +puts the ones that are to survive into the second argument +removes them from the first pop argument + +@classes: eoSurviveAndDie, eoDeterministicSurviveAndDie, + eoDeterministicSaDReplacement +*/ + +/** eoSurviveAndDie +A pure abstract class, to store the howmany's +*/ +template +class eoSurviveAndDie : public eoBF &, eoPop &, void> +{ +public: + eoSurviveAndDie(double _survive, double _die, bool _interpret_as_rate = true): + howmanySurvive(_survive, _interpret_as_rate), + howmanyDie(_die, _interpret_as_rate) + {} + +protected: + eoHowMany howmanySurvive; + eoHowMany howmanyDie; + +}; + +/** +an instance (theonly one as of today, Dec. 20, 2000) of an eoSurviveAndDie, +that does everything deterministically + +used in eoDeterministicSaDReplacement +*/ + +template +class eoDeterministicSurviveAndDie : public eoSurviveAndDie +{ +public: + eoDeterministicSurviveAndDie(double _survive, double _die, + bool _interpret_as_rate = true): + eoSurviveAndDie(_survive, _die, _interpret_as_rate) + {} + + void operator()(eoPop & _pop, eoPop & _luckyGuys) + { + unsigned pSize = _pop.size(); + unsigned nbSurvive = howmanySurvive(pSize); + // first, save the best into _luckyGuys + if (nbSurvive) + { + _pop.nth_element(nbSurvive); + // copy best + _luckyGuys.resize(nbSurvive); + copy(_pop.begin(), _pop.begin()+nbSurvive, _luckyGuys.begin()); + // erase them from pop + _pop.erase(_pop.begin(), _pop.begin()+nbSurvive); + } + unsigned nbRemaining = _pop.size(); + + // carefull, we can have a rate of 1 if we want to kill all remaining + unsigned nbDie = min(howmanyDie(pSize), pSize-nbSurvive); + if (nbDie > nbRemaining) + throw std::logic_error("eoDeterministicSurviveAndDie: Too many to kill!\n"); + + if (!nbDie) + { + return; + } + // else + // kill the worse nbDie + _pop.nth_element(nbRemaining-nbDie); + _pop.resize(nbRemaining-nbDie); + } + +}; + +/** +eoDeterministicSaDReplacement: replacement strategy that is just, in sequence + saves best and kill worse from parents ++ saves best and kill worse from offspring ++ merge remaining (neither save nor killed) parents and offspring ++ reduce that merged population += returns reduced pop + best parents + best offspring + +An obvious use is as strong elitist strategy, + i.e. preserving best parents, and reducing + (either offspring or parents+offspring) +*/ +template +class eoDeterministicSaDReplacement : public eoReplacement +{ +public: + /** Constructor with reduce */ + eoDeterministicSaDReplacement(eoReduce& _reduceGlobal, + double _surviveParents, double _dieParents=0, + double _surviveOffspring=0, double _dieOffspring=0, + bool _interpret_as_rate = true ) : + reduceGlobal(_reduceGlobal), + sAdParents(_surviveParents, _dieParents, _interpret_as_rate), + sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) + {} + + /** Constructor with default truncate used as reduce */ + eoDeterministicSaDReplacement( + double _surviveParents, double _dieParents=0, + double _surviveOffspring=0, double _dieOffspring=0, + bool _interpret_as_rate = true ) : + reduceGlobal(truncate), + sAdParents(_surviveParents, _dieParents, _interpret_as_rate), + sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) + {} + + void operator()(eoPop& _parents, eoPop& _offspring) + { + unsigned pSize = _parents.size(); // target number of individuals + + eoPop luckyParents; // to hold the absolute survivors + sAdParents(_parents, luckyParents); + + eoPop luckyOffspring; // to hold the absolute survivors + sAdOffspring(_offspring, luckyOffspring); + + unsigned survivorSize = luckyOffspring.size() + luckyParents.size(); + if (survivorSize > pSize) + throw std::logic_error("eoGeneralReplacement: More survivors than parents!\n"); + + plus(_parents, _offspring); // all that remain in _offspring + + reduceGlobal(_offspring, pSize - survivorSize); + plus(luckyParents, _offspring); + plus(luckyOffspring, _offspring); + + _parents.swap(_offspring); + + } + +private : + eoReduce& reduceGlobal; + eoDeterministicSurviveAndDie sAdParents; + eoDeterministicSurviveAndDie sAdOffspring; + // plus helper (could be replaced by operator+= ???) + eoPlus plus; + // the default reduce: deterministic truncation + eoTruncate truncate; +}; + + + +#endif From ca586fc799e816be9ff16747838166abc2c72ed0 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:42:41 +0000 Subject: [PATCH 0369/2134] Added t-eoRepalcement.cpp, that tests all new replacement procedures --- eo/test/Makefile.am | 9 +- eo/test/t-eoReplacement.cpp | 206 ++++++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 eo/test/t-eoReplacement.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index f2a7885b7..3efec4a15 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### -noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo +noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement ############################################################################### @@ -50,6 +50,13 @@ t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### +t_eoReplacement_SOURCES = t-eoReplacement.cpp +t_eoReplacement_DEPENDENCIES = $(DEPS) +t_eoReplacement_LDFLAGS = -lm +t_eoReplacement_LDADD = $(LDADDS) + +############################################################################### + t_eoExternalEO_SOURCES = t-eoExternalEO.cpp t_eoExternalEO_DEPENDENCIES = $(DEPS) t_eoExternalEO_LDFLAGS = -lm diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp new file mode 100644 index 000000000..2949bdae8 --- /dev/null +++ b/eo/test/t-eoReplacement.cpp @@ -0,0 +1,206 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include // runtime_error + +//----------------------------------------------------------------------------- +// tt.cpp: +// +//----------------------------------------------------------------------------- + + +// general +#include +//----------------------------------------------------------------------------- + +struct Dummy : public EO +{ + typedef double Type; + void printOn(ostream & _os) const + { + _os << " - "; + EO::printOn(_os); + } +}; + + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s=0) { resize(s); } +}; + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + eoValueParam& parentSizeParam = parser.createParam(10, "parentSize", "Parnet size",'P'); + unsigned int pSize = parentSizeParam.value(); + + eoValueParam& offsrpringSizeParam = parser.createParam(10, "offsrpringSize", "Offsrpring size",'O'); + unsigned int oSize = offsrpringSizeParam.value(); + + eoValueParam& tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); + unsigned int tSize = tournamentSizeParam.value(); + + eoValueParam& tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + double tRate = tournamentRateParam.value(); + + eoValueParam& sParentsElitismRateParam = parser.createParam(0.1, "sParentsElitismRateParam", "Strong elitism rate for parents",'E'); + double sParentsElitismRate = sParentsElitismRateParam.value(); + + eoValueParam& sParentsEugenismRateParam = parser.createParam(0, "sParentsEugenismRateParam", "Strong Eugenism rate",'e'); + double sParentsEugenismRate = sParentsEugenismRateParam.value(); + + eoValueParam& sOffspringElitismRateParam = parser.createParam(0, "sOffspringElitismRateParam", "Strong elitism rate for parents",'E'); + double sOffspringElitismRate = sOffspringElitismRateParam.value(); + + eoValueParam& sOffspringEugenismRateParam = parser.createParam(0, "sOffspringEugenismRateParam", "Strong Eugenism rate",'e'); + double sOffspringEugenismRate = sOffspringEugenismRateParam.value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + + unsigned i; + + cout << "Testing the replacements\nParents SIze = " << pSize + << " and offspring size = " << oSize << endl; + + rng.reseed(42); + + + eoDummyPop orgParents(pSize); + eoDummyPop orgOffspring(oSize); + + // initialize so we can recognize them later! + for (i=0; i genReplace; + eoPlusReplacement plusReplace; + eoCommaReplacement commaReplace; + eoWeakElitistReplacement weakElitistReplace(commaReplace); + // the SSGA replacements + eoSSGAWorseReplacement ssgaWorseReplace; + eoSSGADetTournamentReplacement ssgaDTReplace(tSize); + eoSSGAStochTournamentReplacement ssgaDSReplace(tRate); + + // here we go + // Generational + parents = orgParents; + offspring = orgOffspring; + + cout << "eoGenerationalReplacement\n"; + cout << "=========================\n"; + genReplace(parents, offspring); +cout << "Parents (originally odd)\n" << parents << "\n And offsprings (orogonally even\n" << offspring << endl; + + // Plus + parents = orgParents; + offspring = orgOffspring; + + cout << "eoPlusReplacement\n"; + cout << "=================\n"; + plusReplace(parents, offspring); +cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + + // Comma + parents = orgParents; + offspring = orgOffspring; + + if (parents.size() > offspring.size() ) + cout << "Skipping Comma Replacement, more parents than offspring\n"; + else + { + cout << "eoCommaReplacement\n"; + cout << "==================\n"; + commaReplace(parents, offspring); + cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + + // Comma with weak elitism + parents = orgParents; + offspring = orgOffspring; + + cout << "The same, with WEAK elitism\n"; + cout << "===========================\n"; + weakElitistReplace(parents, offspring); + cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + } + + // preparing SSGA replace worse + parents = orgParents; + offspring = orgOffspring; + + if (parents.size() < offspring.size() ) + cout << "Skipping all SSGA Replacements, more offspring than parents\n"; + else + { + cout << "SSGA replace worse\n"; + cout << "==================\n"; + ssgaWorseReplace(parents, offspring); + cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + + // SSGA deterministic tournament + parents = orgParents; + offspring = orgOffspring; + + cout << "SSGA deterministic tournament\n"; + cout << "=============================\n"; + ssgaDTReplace(parents, offspring); + cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + + // SSGA stochastic tournament + parents = orgParents; + offspring = orgOffspring; + + cout << "SSGA stochastic tournament\n"; + cout << "==========================\n"; + ssgaDTReplace(parents, offspring); + cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + } + + // the general replacement + eoDeterministicSaDReplacement sAdReplace(sParentsElitismRate, sParentsEugenismRate, sOffspringElitismRate, sOffspringEugenismRate);// 10% parents survive + + parents = orgParents; + offspring = orgOffspring; + + cout << "General - strong elitism\n"; + cout << "========================\n"; + sAdReplace(parents, offspring); + cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + return 1; +} From ed0e76350a80da4a0087f3b778e6abcb8a88f4ec Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 18:43:25 +0000 Subject: [PATCH 0370/2134] Update after the change in replacements --- eo/tutorial/Lesson2/FirstBitEA.cpp | 4 ++-- eo/tutorial/Lesson2/FirstRealEA.cpp | 13 ++++--------- eo/tutorial/Lesson2/exercise3.cpp | 4 ++-- eo/tutorial/Lesson3/SecondBitEA.cpp | 10 +++++----- eo/tutorial/Lesson3/exercise1.cpp | 8 +++++--- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index 440d47963..331afbecb 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -79,7 +79,7 @@ void main_function(int argc, char **argv) // Initialization of the population eoPop pop(POP_SIZE, random); - // and evaluate it in one line + // and evaluate it in one loop apply(eval, pop); // STL syntax // OUTPUT @@ -102,7 +102,7 @@ void main_function(int argc, char **argv) // REPLACE // And we now have the full slection/replacement - though with // no replacement (== generational replacement) at the moment :-) - eoNoReplacement replace; + eoGenerationalReplacement replace; // OPERATORS ////////////////////////////////////// diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 8711e3c68..43256c700 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -45,13 +45,11 @@ void main_function(int argc, char **argv) const float P_MUT = 0.5; // mutation probability const double EPSILON = 0.01; // range for real uniform mutation - const double SIGMA = 0.01; // std. dev. of normal mutation // some parameters for chosing among different operators const double segmentRate = 0.5; // rate for 1-pt Xover const double arithmeticRate = 0.5; // rate for 2-pt Xover const double uniformMutRate = 0.5; // rate for bit-flip mutation const double detMutRate = 0.5; // rate for one-bit mutation - const double normMutRate = 0.5; // rate for normal mutation // GENERAL ////////////////////////// @@ -79,7 +77,7 @@ void main_function(int argc, char **argv) // Initialization of the population eoPop pop(POP_SIZE, random); - // and evaluate it in one line + // and evaluate it in one loop apply(eval, pop); // STL syntax // OUTPUT @@ -102,7 +100,7 @@ void main_function(int argc, char **argv) // REPLACE // And we now have the full slection/replacement - though with // no replacement (== generational replacement) at the moment :-) - eoNoReplacement replace; + eoGenerationalReplacement replace; // OPERATORS ////////////////////////////////////// @@ -115,19 +113,16 @@ void main_function(int argc, char **argv) eoArithmeticCrossover xoverA; // Combine them with relative rates eoPropCombinedQuadOp xover(xoverS, segmentRate); - xover.add(xoverA, arithmeticRate, eo_verbose); + xover.add(xoverA, arithmeticRate, true); // MUTATION - // Gaussian mutation - std dev as argument - eoNormalMutation mutationN(SIGMA); // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] eoUniformMutation mutationU(EPSILON); // k (=1) coordinates of parents are uniformly modified eoDetUniformMutation mutationD(EPSILON); // Combine them with relative rates eoPropCombinedMonOp mutation(mutationU, uniformMutRate); - mutation.add(mutationD, detMutRate); - mutation.add(mutationN, normMutRate, eo_verbose); + mutation.add(mutationD, detMutRate, true); // STOP // CHECKPOINT diff --git a/eo/tutorial/Lesson2/exercise3.cpp b/eo/tutorial/Lesson2/exercise3.cpp index c8e7ab6c7..daff8e639 100644 --- a/eo/tutorial/Lesson2/exercise3.cpp +++ b/eo/tutorial/Lesson2/exercise3.cpp @@ -34,7 +34,7 @@ void main_function(int argc, char **argv) // PARAMETRES const unsigned int SEED = 42; // seed for random number generator const unsigned int T_SIZE = 3; // size for tournament selection - const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int VEC_SIZE = 20; // Number of bits in genotypes const unsigned int POP_SIZE = 20; // Size of population const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP @@ -98,7 +98,7 @@ void main_function(int argc, char **argv) eoDetTournament selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] // solution solution solution solution solution solution solution // modify the rate in the constructor - eoSelectPerc select(selectOne,2.0);// rate is second arg. + eoSelectMany select(selectOne,2, eo_is_an_integer);// rate is second arg. // REPLACE // solution solution solution solution solution solution solution diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index c60f29635..731db5426 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -218,8 +218,8 @@ void main_function(int argc, char **argv) // REPLACE // And we now have the full slection/replacement - though with - // no replacement (== generational replacement) at the moment :-) - eoNoReplacement replace; + // the same generational replacement at the moment :-) + eoGenerationalReplacement replace; // OPERATORS ////////////////////////////////////// @@ -235,7 +235,7 @@ void main_function(int argc, char **argv) // Combine them with relative rates eoPropCombinedQuadOp xover(xover1, onePointRate); xover.add(xoverU, URate); - xover.add(xover2, twoPointsRate, eo_verbose); + xover.add(xover2, twoPointsRate, true); // MUTATION // standard bit-flip mutation for bitstring @@ -244,7 +244,7 @@ void main_function(int argc, char **argv) eoDetBitFlip mutationOneBit; // Combine them with relative rates eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); - mutation.add(mutationOneBit, oneBitRate, eo_verbose); + mutation.add(mutationOneBit, oneBitRate, true); // The operators are encapsulated into an eoTRansform object eoSGATransform transform(xover, pCross, mutation, pMut); @@ -294,7 +294,7 @@ void main_function(int argc, char **argv) checkpoint.add(SecondStat); // The Stdout monitor will print parameters to the screen ... - eoStdoutMonitor monitor(eo_no_verbose); + eoStdoutMonitor monitor(false); // when called by the checkpoint (i.e. at every generation) checkpoint.add(monitor); diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise1.cpp index 984395302..35ed26c9d 100644 --- a/eo/tutorial/Lesson3/exercise1.cpp +++ b/eo/tutorial/Lesson3/exercise1.cpp @@ -203,10 +203,11 @@ void main_function(int argc, char **argv) // OUTPUT // sort pop for pretty printout - pop.sort(); + // pop.sort(); // Print (sorted) intial population (raw printout) - cout << "Initial Population" << endl << pop << endl; - + cout << "Initial Population" << endl << pop ; + cout << "and best is " << pop.best_element() << "\n\n"; + cout << "and worse is " << pop.worse_element() << "\n\n"; // ENGINE ///////////////////////////////////// // selection and replacement @@ -221,6 +222,7 @@ void main_function(int argc, char **argv) // And we now have the full slection/replacement - though with // no replacement (== generational replacement) at the moment :-) eoNoReplacement replace; + // eoWeakElitistReplacement replace(replace_main); // OPERATORS ////////////////////////////////////// From a3555b2e8a29b48a62fd1e87433ffa012fb03a44 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 19 Dec 2000 22:14:29 +0000 Subject: [PATCH 0371/2134] Updated INSTALL and README to EO-specific instructions! --- eo/INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/INSTALL b/eo/INSTALL index 17ce3b8d0..4e887f76b 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -1,6 +1,6 @@ EO INSTALL FILE ======================================================================= - check latest news at http://eodev.sourceforge.net/ + check latest news at http://eodev.sourceforge.net/ ======================================================================= This file contains the standard installation instructions for packages From d411685a5cb82a2f76919b23bbe79e3024d324d6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 21 Dec 2000 05:35:01 +0000 Subject: [PATCH 0372/2134] Removed the silly reference for all parameters (cut-and-paste error!). But the funny thing is that my compiler did not complain ... --- eo/test/t-eoReplacement.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index 2949bdae8..fc5ed296a 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -39,28 +39,28 @@ public : int the_main(int argc, char **argv) { eoParser parser(argc, argv); - eoValueParam& parentSizeParam = parser.createParam(10, "parentSize", "Parnet size",'P'); + eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); unsigned int pSize = parentSizeParam.value(); - eoValueParam& offsrpringSizeParam = parser.createParam(10, "offsrpringSize", "Offsrpring size",'O'); + eoValueParam offsrpringSizeParam = parser.createParam(10, "offsrpringSize", "Offsrpring size",'O'); unsigned int oSize = offsrpringSizeParam.value(); - eoValueParam& tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); + eoValueParam tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); unsigned int tSize = tournamentSizeParam.value(); - eoValueParam& tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); double tRate = tournamentRateParam.value(); - eoValueParam& sParentsElitismRateParam = parser.createParam(0.1, "sParentsElitismRateParam", "Strong elitism rate for parents",'E'); + eoValueParam sParentsElitismRateParam = parser.createParam(0.1, "sParentsElitismRateParam", "Strong elitism rate for parents",'E'); double sParentsElitismRate = sParentsElitismRateParam.value(); - eoValueParam& sParentsEugenismRateParam = parser.createParam(0, "sParentsEugenismRateParam", "Strong Eugenism rate",'e'); + eoValueParam sParentsEugenismRateParam = parser.createParam(0, "sParentsEugenismRateParam", "Strong Eugenism rate",'e'); double sParentsEugenismRate = sParentsEugenismRateParam.value(); - eoValueParam& sOffspringElitismRateParam = parser.createParam(0, "sOffspringElitismRateParam", "Strong elitism rate for parents",'E'); + eoValueParam sOffspringElitismRateParam = parser.createParam(0, "sOffspringElitismRateParam", "Strong elitism rate for parents",'E'); double sOffspringElitismRate = sOffspringElitismRateParam.value(); - eoValueParam& sOffspringEugenismRateParam = parser.createParam(0, "sOffspringEugenismRateParam", "Strong Eugenism rate",'e'); + eoValueParam sOffspringEugenismRateParam = parser.createParam(0, "sOffspringEugenismRateParam", "Strong Eugenism rate",'e'); double sOffspringEugenismRate = sOffspringEugenismRateParam.value(); if (parser.userNeedsHelp()) From af950bdc78a71f47c07ca184f294ddeca600d3b5 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 21 Dec 2000 06:49:41 +0000 Subject: [PATCH 0373/2134] Augmented the functors and STL parts - but I still would appreciate help on the STL part! --- eo/tutorial/html/eoProgramming.html | 329 ++++++++++++++++++++-------- 1 file changed, 235 insertions(+), 94 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 976277626..2951fde81 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -2,42 +2,43 @@ - + EO Programming guide -Tutorial main page - -Algorithm-Based -page - Component-Based - Programming -hints - EO +General: Tutorial +main page - +Algorithm-Based - Component-Based +- Programming hints - EO documentation
    -
    +
    Local: Templates +- +Functors - +STL Library - Random +numbers - EO programming style +
    +

    EO Programming guide

    -Templates, -Functors, -STL -Library, random numbers, EO programming style! -
    +

    Templates -
    Most EO code is written using templates. This allows to write generic +

    Most EO code is written using templates. This allows to write generic code, i.e. involving a class which doesn't have to be known when writing the code -- but only when compiling it. In some sense this is similar to naming variables in algebra: you can write a lot of equations involving some variable $x$ without knowing even it if will be an integer or a float (or a matrix or ...). The main basic type that is templatized in EO is the fitness: an EO object is some object which has a fitness of some type -F that can be anything. The definition for that is (seeEO.h) -

    template<F> class EO +F that can be anything. The definition for that is (see EO.h) +

    template<F> class EO

    The idea is that, later in your code, you can declare for instance as in FirstBitGA.cpp -

    typedef eoBin<double> -Genotype; -

    meaning that in that file, you will manipulate as Genotype -objects that are EO objects whosefitness +

    typedef eoBin<double> Genotype; +

    meaning that in that file, you will manipulate as Genotype +objects that are EO objects whose fitness is a double.

    Whereas the advantages are obvious (writing generic reusable code instead of having to rewrite the same pieces of code for different types), there @@ -47,10 +48,10 @@ into an object library file, as the actual types are not known in advance.



    Functors -

    Though EO is a library, it contains almost no functions! -
    EO only contains functors, that are objects which have a method called -operator(). -Such objects are used  as if they were a function, but the big differences +

    Though EO is a library, it contains almost no functions per se! +
    EO mainly contains functors, that are objects which have a method called +operator(). +Such objects are used  as if they were functions, but the big differences are that

    • @@ -58,51 +59,109 @@ functors are functions with private data
    • you can have different functors objects of the same class, i.e. you can -use the same functionality with different parameters
    • +use at the same time the same functionality with different parameters
    • -you can heave a hierarchy of functors objects, which means that you have +you can have a hierarchy of functors objects, which means that you have a hierarchy of functions with defaults behaviors and specialized sub-functions
    • ...
    -Functors are so intimately linked to EO that a base class (eoFunctorBase) +Functors are so intimately linked to EO that a base class (eoFunctorBase) has been designed to hold all functors. This base class is itself divided into three derived class. These classes tell you immediately what kind -of arguments the operator() method requires -and what kind of result it produces. See EO conventions, -and -the inheritance diagram of class -eoFunctorBase. -

    Example -

    A good example is given by the eoEvalFuncPtr -class -

    class MyClass -
    { ... -
        void operator()(ArgType -arg) -
           { +of arguments the operator() +method requires and what kind of result it produces. See EO +conventions, and the inheritance +diagram of class eoFunctorBase. +

    Functors: Example: +

    The following is a basic example of how to program and use a functor +object: First code the class: +

    class MyClass +
    { ... +
        void operator()(ArgType +arg) +
           {
                // do what you have to do -
           } -
    }; // end of class declaration -

    is used  later in the code in something  like +
           } +
    }; // end of class declaration +

    Then use it  later in the code : +

    ArgType myArgument; +
    MyClass myObject;    +// myObject is an object of class MyClass ... +
    myObject(myArgument);  // calls +operator() of myObject acting on myArgument ...
      -

    ArgType myArgument; -
    MyClass myObject;    // myObject -is an object of class MyClass ... -
    myObject(myArgument);  // calls method -operator() of object myObject with argument myArgument ... +

    Functors: The +three basic classes: +

    Direct sub-classes of the root class , three classes +are defined to differentiate functors by the number of argument required +by their operator(). +These classes are templatized by the types of its arguments, and by its +return type. Hence, +
    from the inheritance diagram of any functor class +in EO, you can immediately deduce the interface of their operator() +method.
      -
      -
      -

    -Why not plain C functions?

    -Consider for instance variation operators. Of course, we could declare -them as function acting on some objects. -

    Blabla -

    +

      +
    • +eoF +is for arity-zero functors, i.e.  their operator() +method does not require any argument. It has a single template parameter, +the return type of the operator() +method. For instance,  eoMonitor  +are eoF's +that return an eoMonitor &.
    • + +
    • +eoUF +is for unary functors, i.e.  their operator() +method requires one argument. It has two template parameters, the type +of the argument and the return type of the operator() +method. For instance,  eoMonOp's +are eoUF's +that take as argument an EOT & +and return void +.
    • + +
    • +eoBF +is for binary functors, i.e.  their operator() +method requires two arguments. It has three template parameters, the types +of the arguments and the return type of the operator() +method. For instance,  eoBinOp's +are eoBF's +that take as arguments a const EOT +& and an EOT +&, and return void +.
    • +
    +Now go back to the inheritance +diagram of class eoFunctorBase, +and guess the interface for all functors! +

    Note: for +obvious simplicity reasons, we very often omit the reference to the operator(), +e.g. when we say above: +

      +
    • +eoMonOp's +are eoUF's +that take as argument an EOT & +and return void
    • +
    +it actually means +
      +
    • +eoMonOp's +are eoUF's, +their operator() +method takes as argument an EOT & +and returns void.
    • +
    + +




    A very brief introduction to STL @@ -115,10 +174,12 @@ can survive in a foreign country :-) and even to contribute to new EO features. most of EO code - and to guess what the parts you don't understand are actually doing. Don't worry, I don't understand everything :-) -

    STL provides the user with container -and algorithms. And you can apply (almost) -all algorithms on (almost) all containers. -

    Containers +

    STL provides the user with containers, +iterators +and algorithms. And you can access +(almost) all containers content using (almost) all iterators, or apply +(almost) all algorithms on (almost) all containers. +

    STL: Containers
    Containers are high level data types used to hold simpler data - the most widely used example of a container is the vector construct. @@ -129,40 +190,89 @@ construct. most widely used container is a one-dimensional array of items.

    Data manipulation: suppose v -is an STL vector<AtomType>. +is an STL vector<AtomType>. Then -
    v[i] +
    v[i] is the ith element of v, as in standard C arrays -
    v.size() +
    v.size() is the number of elements of v -
    v.push_back(atom) -appends the atom -at end of v, -provided of course that atom -is of type AtomType -
    blabla +
    v.push_back(atom) +appends the atom +at end of v, +provided of course that atom +is of type AtomType, +the size is automatically increased... +
    blabla insert, erase, ... +

  • +list +STL provides different types of list. The one used in EO is the simple +linked list named ... list. +As far as the user is concerned, simple lists are very similar to vectors, +and the data manipulation listed above for vectors can be applied to list.
  • +
  • pair

  • This simple container allows you to hold two data types together. It is very handy for temporary data handling. Assuming -p is a pair<AtomType1, -AtomType2>, -
    p.first() -and p.second()  -refer to the encapsulated data, of respective types AtomType1and -AtomType2. +p is a
    pair<AtomType1, AtomType2>, +p.first() +and p.second()  +refer to the encapsulated data, of respective types AtomType1 +and +AtomType2
  • Blabla
  • There are many other types of containers that are not used in EO and that we will not present here. -

    STL Algorithms +

    STL: Iterators +
    Iterators are accessors to the containers contents that provide unified +access to different containers. They are very similar to pointers, i.e. +you can increment them, compare them with one another, etc +

    Some very useful iterators for vectors and lists are begin() +and end(), that refer to the first +and after-last items of a container. They allow loops to sweep all items +contained in a container as follows: +
    STLcontainer myContain; +
    STLcontainer::iterator it; +
    for (it=myContain.begin(); it!=myContain.end(); +it++) +
    { +
    // do what you have to do to +(*it) +the current item in the container +
    } +

    STL: Algorithms
    Algorithms are functions acting on containers - the most widely used -example of a STL algorithm is the sort -function. -
    Blabla -

    Drawbacks +example of a STL algorithm are the different sorting +algorithms. +

      +
    • +sort, nth_element, are sorting +algorithms used in EO
    • + +
    • +copy is used to copy a range +of data designated by iterators
    • + +
    • +apply is used to perform the +same operation to many items designated by a range of iterators
    • + +
    • +Blabla - help wanted thanks...
    • +
    +STL: Advantages +
    The main and huge advantage of +using STL is that it handles (almost all) memory mangement automatically. +You can use any STL container the same way you would use a scalar basic +C++ type. And it does it in a (supposededly) optimized way. Of course, +the user is also responsible for performances: for instance, the insert() +method will take more time for vectors than for linked lists, while on +the opposite, the operator[] accessor will be faster for vectors. But both +will work anyway. +

    STL: Drawbacks
    The main drawback I see in using STL is that it makes it almost impossible to use a debugger normally: whereas access to data is made simple @@ -170,15 +280,14 @@ to the programmer, data structures are actually so complex, and debuggers so willing to display everything that you get lines of template instantiation when asking your debugger what is inside some container! For instance I could never visualize some -v[i] -with gbd, v +v[i] +with gbd, v being an STL vector! -
    But there nonetheless are so many advantages !!!



    Random numbers -
    Evolutionary Algorithms make intensive use of random numbers. Random +

    Evolutionary Algorithms make intensive use of random numbers. Random numbers are simulated in computers by using pseudo-random number generators (RNGs for short), i.e. functions that return series of numbers who look random (w.r.t. some statistical criteria). @@ -211,9 +320,9 @@ related number, e.g. calling time(0), as done for instance in different probability distribution -(e.g. floating point following normal +(e.g. floating point following normal distribution). -

    EO also provides random_generators +

    EO also provides random_generators that can be used in STL call to generate series of random numbers, as in eoPop initializers. @@ -221,29 +330,61 @@ initializers.



    EO conventions and naming style -
    A few naming conventions should help you to navigate more easily through +

    A few naming conventions should help you to navigate more easily through EO:

    • -The name of local variables should start with a lower case letter
    • +The name of local variables should start with a lower case letter. Capital +letters should be used rather than underscore to separate words in names +(e.g. popSize rather than +pop_size).
    • -The name of the parameters to a function should start with an underscore -(_)
    • +The name of the arguments to a function should start with an underscore, +e.g. -
      The initialization parameters of constructors, for instance,  -should be named from the names of the variables they are used to initialize. +
                void +myfunction(unsigned _popSize){...}
    • -The names of classes should start with eo + an Uppercase letter
    • +The initialization parameters of constructors should be named from the +names of the variables they are used to initialize, e.g. +
        +

        +

      class eoMyClass +
      { +
      public: +
        eoMyClass(unsigned _popSize):popSize(_popSize){...} +
         ... +
      private: +
         unsigned popSize; +
      }; +

    • +The names of classes should start with eo + an Uppercase letter (as eoMyClass +above).
    • + +
    • +The name of the EO template should be EOT. This allows quick understanding +of the inheritance diagrams for functors. and immediate +perception of the arguments and return types of the functors oeprator() +method (as in eoMonOp +or  eoBinOp).
    • + +
       
    • Blabla
    +
    Local: Templates +- +Functors - +STL Library - Random +numbers - EO programming style +

    -
    Tutorial main page - Algorithm-Based -page - Component-Based - Programming -hints - EO +
    General:
    Tutorial +main page - Algorithm-Based - Component-Based +- Programming hints - EO documentation

    From 21cd652430ac4120e44c8a277e052db485bec659 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 22 Dec 2000 14:56:12 +0000 Subject: [PATCH 0374/2134] Back to the 3 lines to declare a parameter and read it within the parser: some compiler (egcs) don't like the createParam method in eoParser.h Also removed the reference in parameters declarations (a cut-and-paste error). --- eo/tutorial/Lesson3/SecondBitEA.cpp | 57 ++++++++++++++++++---------- eo/tutorial/Lesson3/exercise1.cpp | 59 +++++++++++++++++++---------- 2 files changed, 75 insertions(+), 41 deletions(-) diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 731db5426..3f4de0985 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -53,57 +53,74 @@ void read_param(eoParser & _parser, { // For each parameter, define Parameters directly in the parser, // and assign the value to the variable - eoValueParam& seedParam = _parser.createParam(time(0), "seed", "Random number seed", 'S'); + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); + _parser.processParam( seedParam ); _seed = seedParam.value(); - eoValueParam& vecSizeParam = _parser.createParam(8, "vecSize", "Genotype size",'V', "Representation"); + eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V', "Representation"); + _parser.processParam( vecSizeParam ); _vecSize = vecSizeParam.value(); - eoValueParam& popSizeParam = _parser.createParam(10, "popSize", "Population size",'P', "Evolution"); + eoValueParam popSizeParam(10, "popSize", "Population size",'P', "Evolution"); + _parser.processParam( popSizeParam ); _popSize = popSizeParam.value(); - eoValueParam& tSizeParam = _parser.createParam(10, "tSize", "Tournament size",'T', "Evolution"); + eoValueParam tSizeParam(10, "tSize", "Tournament size",'T', "Evolution"); + _parser.processParam( tSizeParam ); _tSize = tSizeParam.value(); - eoValueParam& load_nameParam = _parser.createParam("", "Load","A save file to restart from",'L', "Persistence"); - _load_name = load_nameParam.value(); + eoValueParam loadNameParam("", "Load","A save file to restart from",'L', "Persistence"); + _parser.processParam( loadNameParam ); + _load_name = loadNameParam.value(); - eoValueParam& maxGenParam = _parser.createParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); + eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); + _parser.processParam( maxGenParam ); _maxGen = maxGenParam.value(); - eoValueParam& minGenParam = _parser.createParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); + eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); + _parser.processParam( minGenParam ); _minGen = minGenParam.value(); - eoValueParam& steadyGenParam = _parser.createParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + _parser.processParam( steadyGenParam ); _steadyGen = steadyGenParam.value(); - eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); + eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); + _parser.processParam( pCrossParam ); _pCross = pCrossParam.value(); - eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); + eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); + _parser.processParam( pMutParam ); _pMut = pMutParam.value(); - eoValueParam& onePointRateParam = _parser.createParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); + eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); + _parser.processParam( onePointRateParam ); _onePointRate = onePointRateParam.value(); - eoValueParam& twoPointsRateParam = _parser.createParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); + eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); + _parser.processParam( twoPointsRateParam ); _twoPointsRate = twoPointsRateParam.value(); - eoValueParam& uRateParam = _parser.createParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); + eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); + _parser.processParam( uRateParam ); _uRate = uRateParam.value(); - eoValueParam& pMutPerBitParam = _parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); + eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); + _parser.processParam( pMutPerBitParam ); _pMutPerBit = pMutPerBitParam.value(); - eoValueParam& bitFlipRateParam = _parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); + eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); + _parser.processParam( bitFlipRateParam ); _bitFlipRate = bitFlipRateParam.value(); - eoValueParam& oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); + eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); + _parser.processParam( oneBitRateParam ); _oneBitRate = oneBitRateParam.value(); // the name of the "status" file where all actual parameter values will be saved string str_status = _parser.ProgramName() + ".status"; - eoValueParam& status_nameParam = _parser.createParam(str_status.c_str(), "status","Status file",'S', "Persistence"); + eoValueParam statusParam(str_status.c_str(), "status","Status file",'S', "Persistence"); + _parser.processParam( statusParam ); // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED // i.e. in case you need parameters somewhere else, postpone these @@ -112,9 +129,9 @@ void read_param(eoParser & _parser, _parser.printHelp(cout); exit(1); } - if (status_nameParam.value() != "") + if (statusParam.value() != "") { - ofstream os(status_nameParam.value().c_str()); + ofstream os(statusParam.value().c_str()); os << _parser; // and you can use that file as parameter file } } diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise1.cpp index 35ed26c9d..268fd56f4 100644 --- a/eo/tutorial/Lesson3/exercise1.cpp +++ b/eo/tutorial/Lesson3/exercise1.cpp @@ -57,57 +57,74 @@ void read_param(int argc, char *argv[], // For each parameter, define Parameters directly in the parser, // and assign the value to the variable - eoValueParam& seedParam = parser.createParam(time(0), "seed", "Random number seed", 'S'); + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); + parser.processParam( seedParam ); _seed = seedParam.value(); - eoValueParam& vecSizeParam = parser.createParam(8, "vecSize", "Genotype size",'V', "Representation"); + eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V', "Representation"); + parser.processParam( vecSizeParam ); _vecSize = vecSizeParam.value(); - eoValueParam& popSizeParam = parser.createParam(10, "popSize", "Population size",'P', "Evolution"); + eoValueParam popSizeParam(10, "popSize", "Population size",'P', "Evolution"); + parser.processParam( popSizeParam ); _popSize = popSizeParam.value(); - eoValueParam& tSizeParam = parser.createParam(10, "tSize", "Tournament size",'T', "Evolution"); + eoValueParam tSizeParam(10, "tSize", "Tournament size",'T', "Evolution"); + parser.processParam( tSizeParam ); _tSize = tSizeParam.value(); - eoValueParam& load_nameParam = parser.createParam("", "Load","A save file to restart from",'L', "Persistence"); - _load_name = load_nameParam.value(); + eoValueParam loadNameParam("", "Load","A save file to restart from",'L', "Persistence"); + parser.processParam( loadNameParam ); + _load_name = loadNameParam.value(); - eoValueParam& maxGenParam = parser.createParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); + eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); + parser.processParam( maxGenParam ); _maxGen = maxGenParam.value(); - eoValueParam& minGenParam = parser.createParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); + eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); + parser.processParam( minGenParam ); _minGen = minGenParam.value(); - eoValueParam& steadyGenParam = parser.createParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + parser.processParam( steadyGenParam ); _steadyGen = steadyGenParam.value(); - eoValueParam& pCrossParam = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); + eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); + parser.processParam( pCrossParam ); _pCross = pCrossParam.value(); - eoValueParam& pMutParam = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); + eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); + parser.processParam( pMutParam ); _pMut = pMutParam.value(); - eoValueParam& onePointRateParam = parser.createParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); + eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); + parser.processParam( onePointRateParam ); _onePointRate = onePointRateParam.value(); - eoValueParam& twoPointsRateParam = parser.createParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); + eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); + parser.processParam( twoPointsRateParam ); _twoPointsRate = twoPointsRateParam.value(); - eoValueParam& uRateParam = parser.createParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); + eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); + parser.processParam( uRateParam ); _uRate = uRateParam.value(); - eoValueParam& pMutPerBitParam = parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); + eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); + parser.processParam( pMutPerBitParam ); _pMutPerBit = pMutPerBitParam.value(); - eoValueParam& bitFlipRateParam = parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); + eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); + parser.processParam( bitFlipRateParam ); _bitFlipRate = bitFlipRateParam.value(); - eoValueParam& oneBitRateParam = parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); + eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); + parser.processParam( oneBitRateParam ); _oneBitRate = oneBitRateParam.value(); // the name of the "status" file where all actual parameter values will be saved string str_status = parser.ProgramName() + ".status"; - eoValueParam& status_nameParam = parser.createParam(str_status.c_str(), "status","Status file",'S', "Persistence"); + eoValueParam statusParam(str_status.c_str(), "status","Status file",'S', "Persistence"); + parser.processParam( statusParam ); // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED // i.e. in case you need parameters somewhere else, postpone these @@ -116,9 +133,9 @@ void read_param(int argc, char *argv[], parser.printHelp(cout); exit(1); } - if (status_nameParam.value() != "") + if (statusParam.value() != "") { - ofstream os(status_nameParam.value().c_str()); + ofstream os(statusParam.value().c_str()); os << parser; // and you can use that file as parameter file } } @@ -221,7 +238,7 @@ void main_function(int argc, char **argv) // REPLACE // And we now have the full slection/replacement - though with // no replacement (== generational replacement) at the moment :-) - eoNoReplacement replace; + eoGenerationalReplacement replace; // eoWeakElitistReplacement replace(replace_main); // OPERATORS From 7b1074f44e90f694bb40dcc474b3fd0fb5cef6bb Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 22 Dec 2000 14:59:10 +0000 Subject: [PATCH 0375/2134] Back to the 3 lines to declare a parameter and read it within the parser: some compiler (egcs) don't like the createParam method in eoParser.h --- eo/test/t-eoReplacement.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index fc5ed296a..2806b1b8e 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -39,28 +39,36 @@ public : int the_main(int argc, char **argv) { eoParser parser(argc, argv); - eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); + eoValueParam parentSizeParam(10, "parentSize", "Parent size",'P'); + parser.processParam( parentSizeParam ); unsigned int pSize = parentSizeParam.value(); - eoValueParam offsrpringSizeParam = parser.createParam(10, "offsrpringSize", "Offsrpring size",'O'); + eoValueParam offsrpringSizeParam(10, "offsrpringSize", "Offsrpring size",'O'); + parser.processParam( offsrpringSizeParam ); unsigned int oSize = offsrpringSizeParam.value(); - eoValueParam tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); + eoValueParam tournamentSizeParam(2, "tournamentSize", "Deterministic tournament size",'T'); + parser.processParam( tournamentSizeParam ); unsigned int tSize = tournamentSizeParam.value(); - eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + eoValueParam tournamentRateParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + parser.processParam( tournamentRateParam ); double tRate = tournamentRateParam.value(); - eoValueParam sParentsElitismRateParam = parser.createParam(0.1, "sParentsElitismRateParam", "Strong elitism rate for parents",'E'); + eoValueParam sParentsElitismRateParam(0.1, "sParentsElitismRateParam", "Strong elitism rate for parents",'E'); + parser.processParam( sParentsElitismRateParam ); double sParentsElitismRate = sParentsElitismRateParam.value(); - eoValueParam sParentsEugenismRateParam = parser.createParam(0, "sParentsEugenismRateParam", "Strong Eugenism rate",'e'); + eoValueParam sParentsEugenismRateParam(0, "sParentsEugenismRateParam", "Strong Eugenism rate",'e'); + parser.processParam( sParentsEugenismRateParam ); double sParentsEugenismRate = sParentsEugenismRateParam.value(); - eoValueParam sOffspringElitismRateParam = parser.createParam(0, "sOffspringElitismRateParam", "Strong elitism rate for parents",'E'); + eoValueParam sOffspringElitismRateParam(0, "sOffspringElitismRateParam", "Strong elitism rate for parents",'E'); + parser.processParam( sOffspringElitismRateParam ); double sOffspringElitismRate = sOffspringElitismRateParam.value(); - eoValueParam sOffspringEugenismRateParam = parser.createParam(0, "sOffspringEugenismRateParam", "Strong Eugenism rate",'e'); + eoValueParam sOffspringEugenismRateParam(0, "sOffspringEugenismRateParam", "Strong Eugenism rate",'e'); + parser.processParam( sOffspringEugenismRateParam ); double sOffspringEugenismRate = sOffspringEugenismRateParam.value(); if (parser.userNeedsHelp()) From f97ab01cd4c7c71670ae1779b1d50c8eb4921b61 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 22 Dec 2000 15:13:54 +0000 Subject: [PATCH 0376/2134] Had forgotten the section name of the parser.processParam call in the definition fo the parameter. --- eo/tutorial/Lesson3/SecondBitEA.cpp | 66 ++++++++++++++--------------- eo/tutorial/Lesson3/exercise1.cpp | 66 ++++++++++++++--------------- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 3f4de0985..6b9743bc0 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -51,76 +51,76 @@ void read_param(eoParser & _parser, double & _oneBitRate ) { - // For each parameter, define Parameters directly in the parser, + // For each parameter, define Parameter, read it through the parser, // and assign the value to the variable eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); _parser.processParam( seedParam ); _seed = seedParam.value(); - eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V', "Representation"); - _parser.processParam( vecSizeParam ); + eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V'); + _parser.processParam( vecSizeParam, "Representation" ); _vecSize = vecSizeParam.value(); - eoValueParam popSizeParam(10, "popSize", "Population size",'P', "Evolution"); - _parser.processParam( popSizeParam ); + eoValueParam popSizeParam(10, "popSize", "Population size",'P'); + _parser.processParam( popSizeParam, "Evolution engine" ); _popSize = popSizeParam.value(); - eoValueParam tSizeParam(10, "tSize", "Tournament size",'T', "Evolution"); - _parser.processParam( tSizeParam ); + eoValueParam tSizeParam(10, "tSize", "Tournament size",'T'); + _parser.processParam( tSizeParam, "Evolution Engine" ); _tSize = tSizeParam.value(); - eoValueParam loadNameParam("", "Load","A save file to restart from",'L', "Persistence"); - _parser.processParam( loadNameParam ); + eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); + _parser.processParam( loadNameParam, "Persistence" ); _load_name = loadNameParam.value(); - eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); - _parser.processParam( maxGenParam ); + eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G'); + _parser.processParam( maxGenParam, "Stopping criterion" ); _maxGen = maxGenParam.value(); - eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); - _parser.processParam( minGenParam ); + eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g'); + _parser.processParam( minGenParam, "Stopping criterion" ); _minGen = minGenParam.value(); - eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); - _parser.processParam( steadyGenParam ); + eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s'); + _parser.processParam( steadyGenParam, "Stopping criterion" ); _steadyGen = steadyGenParam.value(); - eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); - _parser.processParam( pCrossParam ); + eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C'); + _parser.processParam( pCrossParam, "Genetic Operators" ); _pCross = pCrossParam.value(); - eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); - _parser.processParam( pMutParam ); + eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M'); + _parser.processParam( pMutParam, "Genetic Operators" ); _pMut = pMutParam.value(); - eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); - _parser.processParam( onePointRateParam ); + eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1'); + _parser.processParam( onePointRateParam, "Genetic Operators" ); _onePointRate = onePointRateParam.value(); - eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); - _parser.processParam( twoPointsRateParam ); + eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2'); + _parser.processParam( twoPointsRateParam, "Genetic Operators" ); _twoPointsRate = twoPointsRateParam.value(); - eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); - _parser.processParam( uRateParam ); + eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U'); + _parser.processParam( uRateParam, "Genetic Operators" ); _uRate = uRateParam.value(); - eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); - _parser.processParam( pMutPerBitParam ); + eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); + _parser.processParam( pMutPerBitParam, "Genetic Operators" ); _pMutPerBit = pMutPerBitParam.value(); - eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); - _parser.processParam( bitFlipRateParam ); + eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B'); + _parser.processParam( bitFlipRateParam, "Genetic Operators" ); _bitFlipRate = bitFlipRateParam.value(); - eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); - _parser.processParam( oneBitRateParam ); + eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); + _parser.processParam( oneBitRateParam, "Genetic Operators" ); _oneBitRate = oneBitRateParam.value(); // the name of the "status" file where all actual parameter values will be saved string str_status = _parser.ProgramName() + ".status"; - eoValueParam statusParam(str_status.c_str(), "status","Status file",'S', "Persistence"); - _parser.processParam( statusParam ); + eoValueParam statusParam(str_status.c_str(), "status","Status file",'S'); + _parser.processParam( statusParam, "Persistence" ); // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED // i.e. in case you need parameters somewhere else, postpone these diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise1.cpp index 268fd56f4..67b941303 100644 --- a/eo/tutorial/Lesson3/exercise1.cpp +++ b/eo/tutorial/Lesson3/exercise1.cpp @@ -55,76 +55,76 @@ void read_param(int argc, char *argv[], // define a parser from the command-line arguments eoParser parser(argc, argv); - // For each parameter, define Parameters directly in the parser, + // For each parameter, define Parameter, read it through the parser, // and assign the value to the variable eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); parser.processParam( seedParam ); _seed = seedParam.value(); - eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V', "Representation"); - parser.processParam( vecSizeParam ); + eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V'); + parser.processParam( vecSizeParam, "Representation" ); _vecSize = vecSizeParam.value(); - eoValueParam popSizeParam(10, "popSize", "Population size",'P', "Evolution"); - parser.processParam( popSizeParam ); + eoValueParam popSizeParam(10, "popSize", "Population size",'P'); + parser.processParam( popSizeParam, "Evolution engine" ); _popSize = popSizeParam.value(); - eoValueParam tSizeParam(10, "tSize", "Tournament size",'T', "Evolution"); - parser.processParam( tSizeParam ); + eoValueParam tSizeParam(10, "tSize", "Tournament size",'T'); + parser.processParam( tSizeParam, "Evolution Engine" ); _tSize = tSizeParam.value(); - eoValueParam loadNameParam("", "Load","A save file to restart from",'L', "Persistence"); - parser.processParam( loadNameParam ); + eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); + parser.processParam( loadNameParam, "Persistence" ); _load_name = loadNameParam.value(); - eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G', "Stopping criterion"); - parser.processParam( maxGenParam ); + eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G'); + parser.processParam( maxGenParam, "Stopping criterion" ); _maxGen = maxGenParam.value(); - eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g', "Stopping criterion"); - parser.processParam( minGenParam ); + eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g'); + parser.processParam( minGenParam, "Stopping criterion" ); _minGen = minGenParam.value(); - eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); - parser.processParam( steadyGenParam ); + eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s'); + parser.processParam( steadyGenParam, "Stopping criterion" ); _steadyGen = steadyGenParam.value(); - eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators"); - parser.processParam( pCrossParam ); + eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C'); + parser.processParam( pCrossParam, "Genetic Operators" ); _pCross = pCrossParam.value(); - eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators"); - parser.processParam( pMutParam ); + eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M'); + parser.processParam( pMutParam, "Genetic Operators" ); _pMut = pMutParam.value(); - eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators"); - parser.processParam( onePointRateParam ); + eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1'); + parser.processParam( onePointRateParam, "Genetic Operators" ); _onePointRate = onePointRateParam.value(); - eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators"); - parser.processParam( twoPointsRateParam ); + eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2'); + parser.processParam( twoPointsRateParam, "Genetic Operators" ); _twoPointsRate = twoPointsRateParam.value(); - eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators"); - parser.processParam( uRateParam ); + eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U'); + parser.processParam( uRateParam, "Genetic Operators" ); _uRate = uRateParam.value(); - eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); - parser.processParam( pMutPerBitParam ); + eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); + parser.processParam( pMutPerBitParam, "Genetic Operators" ); _pMutPerBit = pMutPerBitParam.value(); - eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B', "Genetic Operators"); - parser.processParam( bitFlipRateParam ); + eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B'); + parser.processParam( bitFlipRateParam, "Genetic Operators" ); _bitFlipRate = bitFlipRateParam.value(); - eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); - parser.processParam( oneBitRateParam ); + eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); + parser.processParam( oneBitRateParam, "Genetic Operators" ); _oneBitRate = oneBitRateParam.value(); // the name of the "status" file where all actual parameter values will be saved string str_status = parser.ProgramName() + ".status"; - eoValueParam statusParam(str_status.c_str(), "status","Status file",'S', "Persistence"); - parser.processParam( statusParam ); + eoValueParam statusParam(str_status.c_str(), "status","Status file",'S'); + parser.processParam( statusParam, "Persistence" ); // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED // i.e. in case you need parameters somewhere else, postpone these From 5d0a03fa4ed79f66d6b6504d9a49b6f6c876f0ca Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 26 Dec 2000 07:42:09 +0000 Subject: [PATCH 0377/2134] Modified the include list after the big eoReplacement changes --- eo/src/eoEasyEA.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index dc066601b..dbc1debae 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -32,8 +32,7 @@ #include #include #include -#include -#include +#include #include /** eoEasyEA: From d7693131a600e49ec1bd4694d93f2ec201445353 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 26 Dec 2000 08:33:48 +0000 Subject: [PATCH 0378/2134] Moved eoSGATransform into a separate file and added the dynamic version (where arguments can be passed by value or by reference). Modified eo accordingly --- eo/src/eo | 27 +------ eo/src/eoSGA.h | 61 --------------- eo/src/eoSGATransform.h | 163 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 85 deletions(-) create mode 100644 eo/src/eoSGATransform.h diff --git a/eo/src/eo b/eo/src/eo index 62c8de89f..eb0d8f076 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -30,20 +30,8 @@ // some defines to make things easier to get at first sight -// tunigni the amount of output using a boolean argument: -// true should always mean more output #define eo_verbose true #define eo_no_verbose false -// to be used in selection / replacement procedures to indicate whether -// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) -// or as an absolute integer (number=rate regardless of popsize). -// the default value shoudl ALWAYS be true (eo_as_a_rate). -// -// this construct is mandatory because in some cases you might not know the -// population size that will enter the replacement for instance - so you -// cannot simply have a pre-computed (double) rate of 1/popSize -#define eo_is_a_rate true -#define eo_is_an_integer false //----------------------------------------------------------------------------- #include @@ -98,29 +86,20 @@ #include #include -// Selection +// Selection and reproduction stuff #include #include #include #include #include -#include -#include -#include - -// Replacement -// #include -#include -#include -#include - -// Variation #include #include #include #include +#include + //#include //#include //#include diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 5f3edc442..cb55fe4f8 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -109,65 +109,4 @@ private : eoEvalFunc& eval; }; -/////////////////////////////////////////////////////////////////////////////// -// class eoSGATransform -/////////////////////////////////////////////////////////////////////////////// -#include // vector -#include -#include - -/***************************************************************************** - * eoSGATransform: transforms a population using genetic operators. - * It does it exactly as class eoSGA, i.e. only accepts - * quadratic crossover and unary mutation - * It is here mainly for tutorial reasons - *****************************************************************************/ -template class eoSGATransform : public eoTransform -{ - public: - - /// Default constructor. - eoSGATransform(eoQuadraticOp& _cross, float _crate, - eoMonOp& _mutate, float _mrate) - : cross(_cross), - crossoverRate(_crate), - mutate(_mutate), - mutationRate(_mrate) {} - - - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& _pop) - { - unsigned i; - - for (i=0; i<_pop.size()/2; i++) - { - if ( rng.flip(crossoverRate) ) - { - // this crossover generates 2 offspring from two parents - cross(_pop[2*i], _pop[2*i+1]); - } - } - - for (i=0; i < _pop.size(); i++) - { - if (rng.flip(mutationRate) ) - { - mutate(_pop[i]); - } - - } - }; - - private: - eoQuadraticOp& cross; - float crossoverRate; - eoMonOp& mutate; - float mutationRate; -}; - - #endif diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h new file mode 100644 index 000000000..96a6e39e3 --- /dev/null +++ b/eo/src/eoSGATransform.h @@ -0,0 +1,163 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSGA.h +// (c) Marc.Schoenauer 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSGATransform_h +#define _eoSGATransform_h + +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// class eoSGATransform +/////////////////////////////////////////////////////////////////////////////// +#include // vector +#include +#include + +/***************************************************************************** + * eoSGATransform: transforms a population using genetic operators. + * It does it exactly as class eoSGA, i.e. only accepts + * quadratic crossover and unary mutation + * It is here mainly for tutorial reasons + *****************************************************************************/ +template class eoSGATransform : public eoTransform +{ + public: + + /// Default constructor. + eoSGATransform(eoQuadraticOp& _cross, double _cProba, + eoMonOp& _mutate, double _mProba) + : cross(_cross), + crossoverProba(_cProba), + mutate(_mutate), + mutationProba(_mProba) {} + + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverProba) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationProba) ) + { + mutate(_pop[i]); + } + + } + }; + + private: + eoQuadraticOp& cross; + double crossoverProba; + eoMonOp& mutate; + double mutationProba; +}; + +/***************************************************************************** + * eoSDynGATransform: transforms a population using genetic operators. + * It is the Dynamic version of the above eoSGATransform + * i.e. the operators probabilities can be passed as an eoValueParam, + * and hence can be modified from outside + * It is here mainly for tutorial reasons + *****************************************************************************/ +template class eoDynSGATransform : public eoTransform +{ + public: + + /// Default constructor - receives values + eoDynSGATransform(eoQuadraticOp& _cross, double _cProba, + eoMonOp& _mutate, double _mProba) + : cross(_cross), + crossoverProbaHolder(_cProba), crossoverProba(crossoverProbaHolder), + mutate(_mutate), + mutationProbaHolder(_mProba), mutationProba(mutationProbaHolder) {} + + /// This constructor receives references + // these will usually be some eoValueParam.value() + // the ...Holder will bever be used in this object + eoDynSGATransform(eoQuadraticOp& _cross, double& _cProbaRef, + eoMonOp& _mutate, double& _mProbaRef) + : cross(_cross), + crossoverProbaHolder(0), crossoverProba(_cProbaRef), + mutate(_mutate), + mutationProbaHolder(0), mutationProba(_mProbaRef) {} + + + /** + * Transforms a population. + * @param pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverProba) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationProba) ) + { + mutate(_pop[i]); + } + + } + }; + + private: + // difference with eoSGATransform: the operator probabilities + // they can be passed by reference or by value. + // hence we need here to use a reference, and to eventually store a value + eoQuadraticOp& cross; + double crossoverProbaHolder; // the value, used only if ctor gets a value + double& crossoverProba; // the reference, to be used in operator() + eoMonOp& mutate; + double mutationProbaHolder; // the value, used only if ctor gets a value + double& mutationProba; // the reference, to be used in operator() +}; + + +#endif From 0447391f7c7627675e78cdeb55a7d11b85ba1097 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 26 Dec 2000 10:28:27 +0000 Subject: [PATCH 0379/2134] Modified the help message for the short name (added the missing =) --- eo/src/utils/eoParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index fb5c88b81..b401db027 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -245,7 +245,7 @@ void eoParser::printHelp(ostream& os) // print the usage when calling the program from the command line os << "Usage: "<< programName<<" [Options]\n"; // only short usage! - os << "Options of the form \"-f[Value]\" or \"--Name[=value]\"" << endl; + os << "Options of the form \"-f[=Value]\" or \"--Name[=value]\"" << endl; os << "Where:"< Date: Wed, 27 Dec 2000 11:37:05 +0000 Subject: [PATCH 0380/2134] A few additions and corrections ... --- eo/tutorial/html/eoEngine.html | 91 +++++++++++++++------------------- 1 file changed, 41 insertions(+), 50 deletions(-) diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 42e8b4306..ecd9d5ec4 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -2,7 +2,7 @@ - + Genetic Engine @@ -94,44 +94,29 @@ two objects
    of respective types eoReduce and you can probably guess what each of them actually does :-) -
      -

      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

    Available instances of eoMergeReduce replacement -include +


    Available instances of eoMergeReduce +replacement include

    • eoCommaReplacement, one of -the two standard strategies in Evolution Strategies, -selects the best offspring. It is an eoMergeReduce(eoNoElitism, -eoTruncate).
    • +the two standard strategies in Evolution Strategies, +selects the best offspring. It is an +eoMergeReduce(eoNoElitism, eoTruncate).
    • eoPlusReplacement, the other -standard Evolution Startegies replacement, -where the best from offspring+parents become the next generation. It is -an eoMergeReduce(eoPlus, eoTruncate).
    • +standard Evolution Startegies replacement, +where the best from offspring+parents +become the next generation. It is an eoMergeReduce(eoPlus, +eoTruncate).
    • -eoEPReplacement, used in the -Evolutionary -Programming historical algorithm, doing a stochastic tournament +eoEPReplacement, used in the +Evolutionary +Programming historical algorithm, does an EP stochastic tournament among parents + offspring. It is an eoMergeReduce(eoPlus, -eoEPReduce) and its constructor requires as argument the -size of the tournament (unsigned int).
    • +eoEPReduce)
      and its constructor requires as argument T, +the size of the tournament (unsigned int).
  • @@ -189,7 +174,7 @@ an elitist replacement makes no sense - but will not harm either :-) file

    The file t-eoReplacement in the test directory implements all -above replacmenet procedures withni a very simple and easy-to-monitor Dummy +above replacmenet procedures within a very simple and easy-to-monitor Dummy EO class.


    @@ -237,34 +222,41 @@ selection can be used to select a single individual, both uses are probably a waste of CPU time.
    • -Deterministic Tournament of -size T selects returns the best of T uniformly chosen individuals in the -population. It is implemented in the eoDetTournamentSelect +Deterministic +Tournament of size T returns the best of T uniformly chosen +individuals in the population. Its size T should be an integer >= 2. It +is implemented in the eoDetTournamentSelect class, a sub-class of eoSelectOne, as well as in the eoDetTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament in  selectors.h.
    • -Stochastic Tournament of rate -R first choses two individuals from the population, and selects the best -one with probability R and the worse one with probability (1-R). It is -implemented in the eoStochTournamentSelect +Stochastic Tournament +of rate R first choses two individuals from the population, and selects +the best one with probability R (the worse one with probability 1-R). Real +parameter R should be in [0.5,1]. It is implemented in the eoStochTournamentSelect class, a sub-class of eoSelectOne, as well as in the eoStochTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament -in  selectors.h.
    • +in  selectors.h.
      +Note: A stochastic tournament with +rate 1.0 is strictly identical to a deterministic tournament of size 2.
    • -EP Tournament of size T is -a global tournament: it works by assigning a score to all individuals in -the population the following way: starting with a score of 0, each individual -I is "opposed" T times to a uniformly chosen individual. Everytime I wins, -its score in incremented by 1 (and by 0.5 for every draw). The individuals -are then selected deterministically based on their scores from that procedure. -The EP Tournament is implemented -in the  eoEPReduce truncation -method used in some replacement procedures.
    • +EP Tournament +of size T is a global tournament: it works by assigning a score to all +individuals in the population the following way: starting with a score +of 0, each individual I is "opposed" T times to a uniformly chosen individual. +Everytime I wins, its score in incremented by 1 (and by 0.5 for every draw). +The individuals are then selected deterministically based on their scores +from that procedure. The EP Tournament +is implemented in the  eoEPReduce +truncation method used in some replacement procedures. 
      +Note: whereas both the determinitic +and the stochastic tournament select one individual, the EP tournament +is designed for batch selection. Of course it could be used to select a +single individual, but at a rather high computational cost.


    @@ -387,8 +379,7 @@ derives from

    Its constructor takes 2 argumenrts:

    eoHowMany(double _rate, bool _interpret_as_rate -= -true)

    += true)
    so by default the double is indeed interpreted as a rate.

    It is used in eoSelectMany (which supersedes eoSelectPerc From 04e429fdb1061039f25c11d4c4212f465e99500a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Jan 2001 07:03:57 +0000 Subject: [PATCH 0381/2134] I had to change the whole way the parameters are read, because EGCS did not allow the nice constructs I had imagined (and compiled with g++) - I removed the createParam method in Parser class - that was creating the parameters on the heap. Not allowed to have a templatized method ??? - I removed the subroutine read_param in SecondBitEA, as you need to create permanent parameters (eoParser only holds references), and egcs did not allow to create them by reference, i.e. in the line eoValueParam & blablaParam(...); So now everything is done in the main_function, and 3 lines are needed to create and read every paramter (sigh ...) --- eo/tutorial/Lesson3/SecondBitEA.cpp | 151 ++++------- eo/tutorial/html/SecondBitEA.html | 398 +++++++++++++--------------- 2 files changed, 231 insertions(+), 318 deletions(-) diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 6b9743bc0..8a208e0de 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -23,6 +23,11 @@ // define your genotype and fitness types typedef eoBin Indi; +// PARAMETRES + +// the main_function: nothing changed(!), except variable initialization +void main_function(int argc, char **argv) +{ // PARAMETRES //----------------------------------------------------------------------------- // instead of having all values of useful parameters as constants, read them: @@ -31,147 +36,99 @@ typedef eoBin Indi; // # = usual comment character // or in the environment (TODO) -// note that the parameters are passed by reference so they can be updated -void read_param(eoParser & _parser, - uint32 & _seed, - unsigned int & _vecSize, - unsigned int & _popSize, - unsigned int & _tSize, - double & _pCross, - double & _pMut, - string & _load_name, - unsigned int & _maxGen, - unsigned int & _minGen, - unsigned int & _steadyGen, - double & _onePointRate, - double & _twoPointsRate, - double & _uRate, - double & _pMutPerBit, - double & _bitFlipRate, - double & _oneBitRate - ) -{ + // First define a parser from the command-line arguments + eoParser parser(argc, argv); + // For each parameter, define Parameter, read it through the parser, // and assign the value to the variable + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); - _parser.processParam( seedParam ); - _seed = seedParam.value(); + parser.processParam( seedParam ); + unsigned seed = seedParam.value(); + // description of genotype eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V'); - _parser.processParam( vecSizeParam, "Representation" ); - _vecSize = vecSizeParam.value(); + parser.processParam( vecSizeParam, "Representation" ); + unsigned vecSize = vecSizeParam.value(); + // parameters for evolution engine eoValueParam popSizeParam(10, "popSize", "Population size",'P'); - _parser.processParam( popSizeParam, "Evolution engine" ); - _popSize = popSizeParam.value(); + parser.processParam( popSizeParam, "Evolution engine" ); + unsigned popSize = popSizeParam.value(); eoValueParam tSizeParam(10, "tSize", "Tournament size",'T'); - _parser.processParam( tSizeParam, "Evolution Engine" ); - _tSize = tSizeParam.value(); + parser.processParam( tSizeParam, "Evolution Engine" ); + unsigned tSize = tSizeParam.value(); + // init and stop eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); - _parser.processParam( loadNameParam, "Persistence" ); - _load_name = loadNameParam.value(); + parser.processParam( loadNameParam, "Persistence" ); + string loadName = loadNameParam.value(); eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G'); - _parser.processParam( maxGenParam, "Stopping criterion" ); - _maxGen = maxGenParam.value(); + parser.processParam( maxGenParam, "Stopping criterion" ); + unsigned maxGen = maxGenParam.value(); eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g'); - _parser.processParam( minGenParam, "Stopping criterion" ); - _minGen = minGenParam.value(); + parser.processParam( minGenParam, "Stopping criterion" ); + unsigned minGen = minGenParam.value(); eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s'); - _parser.processParam( steadyGenParam, "Stopping criterion" ); - _steadyGen = steadyGenParam.value(); + parser.processParam( steadyGenParam, "Stopping criterion" ); + unsigned steadyGen = steadyGenParam.value(); + // operators probabilities at the algorithm level eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C'); - _parser.processParam( pCrossParam, "Genetic Operators" ); - _pCross = pCrossParam.value(); + parser.processParam( pCrossParam, "Genetic Operators" ); + double pCross = pCrossParam.value(); eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M'); - _parser.processParam( pMutParam, "Genetic Operators" ); - _pMut = pMutParam.value(); + parser.processParam( pMutParam, "Genetic Operators" ); + double pMut = pMutParam.value(); + // relative rates for crossovers eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1'); - _parser.processParam( onePointRateParam, "Genetic Operators" ); - _onePointRate = onePointRateParam.value(); + parser.processParam( onePointRateParam, "Genetic Operators" ); + double onePointRate = onePointRateParam.value(); eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2'); - _parser.processParam( twoPointsRateParam, "Genetic Operators" ); - _twoPointsRate = twoPointsRateParam.value(); + parser.processParam( twoPointsRateParam, "Genetic Operators" ); + double twoPointsRate = twoPointsRateParam.value(); eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U'); - _parser.processParam( uRateParam, "Genetic Operators" ); - _uRate = uRateParam.value(); + parser.processParam( uRateParam, "Genetic Operators" ); + double URate = uRateParam.value(); + // relative rates and private parameters for mutations; eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); - _parser.processParam( pMutPerBitParam, "Genetic Operators" ); - _pMutPerBit = pMutPerBitParam.value(); + parser.processParam( pMutPerBitParam, "Genetic Operators" ); + double pMutPerBit = pMutPerBitParam.value(); eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B'); - _parser.processParam( bitFlipRateParam, "Genetic Operators" ); - _bitFlipRate = bitFlipRateParam.value(); + parser.processParam( bitFlipRateParam, "Genetic Operators" ); + double bitFlipRate = bitFlipRateParam.value(); eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); - _parser.processParam( oneBitRateParam, "Genetic Operators" ); - _oneBitRate = oneBitRateParam.value(); + parser.processParam( oneBitRateParam, "Genetic Operators" ); + double oneBitRate = oneBitRateParam.value(); // the name of the "status" file where all actual parameter values will be saved - string str_status = _parser.ProgramName() + ".status"; + string str_status = parser.ProgramName() + ".status"; // default value eoValueParam statusParam(str_status.c_str(), "status","Status file",'S'); - _parser.processParam( statusParam, "Persistence" ); + parser.processParam( statusParam, "Persistence" ); // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED // i.e. in case you need parameters somewhere else, postpone these - if (_parser.userNeedsHelp()) + if (parser.userNeedsHelp()) { - _parser.printHelp(cout); + parser.printHelp(cout); exit(1); } if (statusParam.value() != "") { ofstream os(statusParam.value().c_str()); - os << _parser; // and you can use that file as parameter file + os << parser; // and you can use that file as parameter file } -} - -// GENERAL -// now the main_function: nothing changed, except input/output -void main_function(int argc, char **argv) -{ -// PARAMETRES - uint32 seed; - // decription of genotype - unsigned int vecSize; - // parameters for evolution engine - unsigned int popSize; - unsigned int tSize; - // operators probabilities at the algorithm level - double pCross; - double pMut; - // init and stop - string load_name; - unsigned int maxGen; - unsigned int minGen; - unsigned int steadyGen; - // rates for crossovers - double onePointRate; - double twoPointsRate; - double URate; - // rates and private parameters for mutations; - double pMutPerBit; - double bitFlipRate; - double oneBitRate; - - // define a parser from the command-line arguments - eoParser parser(argc, argv); - - // Now read the parameters of the program - read_param(parser, seed, vecSize, popSize, tSize, - pCross, pMut, load_name, maxGen, minGen, steadyGen, - onePointRate, twoPointsRate, URate, - pMutPerBit, bitFlipRate, oneBitRate ); // EVAL ///////////////////////////// @@ -197,9 +154,9 @@ void main_function(int argc, char **argv) inState.registerObject(rng); inState.registerObject(pop); - if (load_name != "") + if (loadName != "") { - inState.load(load_name); // load the pop and the rng + inState.load(loadName); // load the pop and the rng // the fitness is read in the file: // do only evaluate the pop if the fitness has changed } diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index e761dc8d8..d64f450b3 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -4,12 +4,14 @@ SecondBitEA.cpp - + Back to Lesson 3 - Tutorial main page - Algorithm-Based - Component-Based - - Programming hints - EO +- +Programming +hints - EO documentation


    @@ -46,14 +48,15 @@ cout istrstream

    #include <fstream>
    // the general include for eo -
    #include <eo> +
    #include <eo> - +
    // a simple fitness function that computes the number of ones of a bitstring
    -#include "binary_value.h"
    // a simple fitness function that computes +the number of ones of a bitstring +
    #include "binary_value.h"
    @@ -64,6 +67,15 @@ istrstream

    typedef eoBin<double> Indi; + + + + + +
    // the main_function: nothing changed(!), +except variable initialization +
    void main_function(int argc, char **argv) +
    {
    @@ -78,190 +90,130 @@ or in a parameter file (same syntax, order independent,  # = usual comment character 
    //        or in the environment (TODO) -
    // note that the parameters are passed by -reference so they can be updated -
    void read_param(eoParser & _parser,  -
    uint32 & -_seed, -
    unsigned int & _vecSize, -
    unsigned int & _popSize, -
    unsigned int & _tSize, -
    double & _pCross, -
    double & _pMut, -
    string & _load_name, -
    unsigned int & _maxGen, -
    unsigned int & _minGen, -
    unsigned int & _steadyGen, -
    double & _onePointRate,  -
    double & _twoPointsRate,  -
    double & _uRate,  -
    double & _pMutPerBit,  -
    double & _bitFlipRate,  -
    double & _oneBitRate -
    ) -
    -
         // For each -parameter, define Parameters directly in the parser,  -
         // and assign -the value to the variable -
        -eoValueParam<uint32>& seedParam = _parser.createParam<uint32>(time(0), +

    // First define a parser from the command-line +arguments +
    eoParser parser(argc, argv); +

    // For each parameter, define Parameter, read +it through the parser, +
    // and assign the value to the variable +
    +
    eoValueParam<uint32> seedParam(time(0), "seed", "Random number seed", 'S'); -
         -_seed = seedParam.value(); -

         eoValueParam<unsigned -int>& vecSizeParam = _parser.createParam<unsigned int>(8, "vecSize", -"Genotype size",'V', "Representation"); -
         _vecSize = vecSizeParam.value(); -

         eoValueParam<unsigned -int>& popSizeParam = _parser.createParam<unsigned int>(10, "popSize", -"Population size",'P', "Evolution"); -
         _popSize = popSizeParam.value(); -
         eoValueParam<unsigned -int>& tSizeParam = _parser.createParam<unsigned int>(10, "tSize", -"Tournament size",'T', "Evolution"); -
         _tSize = tSizeParam.value(); +
    parser.processParam( seedParam ); +
    unsigned seed += seedParam.value(); +

    // decription +of genotype +
    eoValueParam<unsigned int>& vecSizeParam(8, +"vecSize", "Genotype size",'V'); +
    parser.processParam( vecSizeParam, "Representation" +); +
    unsigned vecSize = vecSizeParam.value(); +

    // parameters for evolution engine +
    eoValueParam<unsigned int>& popSizeParam(10, +"popSize", "Population size",'P'); +
    parser.processParam( popSizeParam, "Evolution +engine" ); +
    unsigned popSize = popSizeParam.value(); +

    eoValueParam<unsigned int>& tSizeParam(10, +"tSize", "Tournament size",'T'); +
    parser.processParam( seedParam ); +
    unsigned tSize = tSizeParam.value();
    -
        eoValueParam<string>& -load_nameParam = _parser.createParam<string>("", "Load","A save file -to restart from",'L', "Persistence"); -
         _load_name = -load_nameParam.value(); -

         eoValueParam<unsigned -int>& maxGenParam = _parser.createParam<unsigned int>(100, "maxGen", -"Maximum number of generations",'G', "Stopping criterion"); -
         _maxGen = maxGenParam.value(); -
         eoValueParam<unsigned -int>& minGenParam = _parser.createParam<unsigned int>(100, "minGen", -"Minimum number of generations",'g', "Stopping criterion"); -
         _minGen = minGenParam.value(); -
         eoValueParam<unsigned -int>& steadyGenParam = _parser.createParam<unsigned int>(100, "steadyGen", -"Number of generations with no improvement",'s', "Stopping criterion"); -
         _steadyGen = -steadyGenParam.value(); -

         eoValueParam<double>& -pCrossParam = _parser.createParam<double>(0.6, "pCross", "Probability -of Crossover", 'C', "Genetic Operators");  -
         _pCross = pCrossParam.value(); -
         eoValueParam<double>& -pMutParam = _parser.createParam<double>(0.1, "pMut", "Probability of -Mutation", 'M', "Genetic Operators"); -
         _pMut = pMutParam.value(); -
         eoValueParam<double>& -onePointRateParam = _parser.createParam<double>(1, "onePointRate", "Relative -rate for one point crossover", '1', "Genetic Operators"); -
         _onePointRate -= onePointRateParam.value(); -
         eoValueParam<double>& -twoPointsRateParam = _parser.createParam<double>(1, "twoPointRate", "Relative -rate for two point crossover", '2', "Genetic Operators"); -
         _twoPointsRate -= twoPointsRateParam.value(); -
         eoValueParam<double>& -uRateParam = _parser.createParam<double>(2, "uRate", "Relative rate for -uniform crossover", 'U', "Genetic Operators"); -
         _uRate =  -uRateParam.value(); -
         eoValueParam<double>& -pMutPerBitParam = _parser.createParam<double>(0.01, "pMutPerBit", "Probability -of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators"); -
         _pMutPerBit = -pMutPerBitParam.value(); -
         eoValueParam<double>& -bitFlipRateParam = _parser.createParam<double>(0.01, "bitFlipRate", "Relative -rate for bit-flip mutation", 'B', "Genetic Operators"); -
         _bitFlipRate -=  bitFlipRateParam.value(); -
         eoValueParam<double>& -oneBitRateParam = _parser.createParam<double>(0.01, "oneBitRate", "Relative -rate for deterministic bit-flip mutation", 'D', "Genetic Operators"); -
             -_oneBitRate = oneBitRateParam.value(); -

         // the name -of the "status" file where all actual parameter values will be saved -
         string str_status -= _parser.ProgramName() + ".status"; -
         eoValueParam<string>& -status_nameParam = _parser.createParam<string>(str_status.c_str(), "status","Status -file",'S', "Persistence"); -
       // do the following AFTER -ALL PARAMETERS HAVE BEEN PROCESSED -
       // i.e. in case you need -parameters somewhere else, postpone these -
         if (_parser.userNeedsHelp()) -
             -{ -
                 -_parser.printHelp(cout); -
                 -exit(1); -
             -} -
         if (status_nameParam.value() -!= "") -
             -{ -
    ofstream os(status_nameParam.value().c_str()); -
    os << _parser; // and you can -use that file as parameter file -
             -} -
    } -

    -
    - - - - - -
    // now the main_function: nothing changed, -except input/output -
    void main_function(int argc, char **argv) -
    {
    - - - - +
    eoValueParam<string> loadNameParam("", +"Load","A save file to restart from",'L'); +
    parser.processParam( loadNameParam, "Persistence" +); +
    string loadName = loadNameParam.value(); +

    eoValueParam<unsigned int> maxGenParam(100, +"maxGen", "Maximum number of generations",'G'); +
    parser.processParam( maxGenParam, "Stopping +criterion" ); +
    unsigned maxGen = maxGenParam.value(); +

    eoValueParam<unsigned int> minGenParam(100, +"minGen", "Minimum number of generations",'g'); +
    parser.processParam( minGenParam, "Stopping +criterion" ); +
    unsigned minGen = minGenParam.value(); +

    eoValueParam<unsigned int> steadyGenParam(100, +"steadyGen", "Number of generations with no improvement",'s'); +
    parser.processParam( steadyGenParam, "Stopping +criterion" ); +
    unsigned steadyGen = steadyGenParam.value(); +

    // operators probabilities at the algorithm +level +
    eoValueParam<double> pCrossParam(0.6, +"pCross", "Probability of Crossover", 'C');  +
    parser.processParam( pCrossParam, "Genetic +Operators" ); +
    double pCross = pCrossParam.value(); +

    eoValueParam<double> pMutParam(0.1, +"pMut", "Probability of Mutation", 'M'); +
    parser.processParam( pMutParam, "Genetic +Operators" ); +
    double pMut = pMutParam.value(); +

    // relative rates for crossovers +
    eoValueParam<double> onePointRateParam(1, +"onePointRate", "Relative rate for one point crossover", '1'); +
    parser.processParam( onePointRateParam, +"Genetic Operators" ); +
    double onePointRate = onePointRateParam.value(); +

    eoValueParam<double> twoPointsRateParam(1, +"twoPointRate", "Relative rate for two point crossover", '2'); +
    parser.processParam( twoPointsRateParam, +"Genetic Operators" ); +
    double twoPointsRate = twoPointsRateParam.value(); +

    eoValueParam<double> uRateParam(2, "uRate", +"Relative rate for uniform crossover", 'U'); +
    parser.processParam( uRateParam, "Genetic +Operators" ); +
    double URate =  uRateParam.value(); +

    // relative rates and private parameters for +mutations; +
    eoValueParam<double> pMutPerBitParam(0.01, +"pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); +
    parser.processParam( pMutPerBitParam, +"Genetic Operators" ); +
    double pMutPerBit = pMutPerBitParam.value(); +

    eoValueParam<double> bitFlipRateParam(0.01, +"bitFlipRate", "Relative rate for bit-flip mutation", 'B'); +
    parser.processParam( bitFlipRateParam, +"Genetic Operators" ); +
    double bitFlipRate =  bitFlipRateParam.value(); +

    eoValueParam<double> oneBitRateParam(0.01, +"oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); +
    parser.processParam( oneBitRateParam, +"Genetic Operators" ); +
    double oneBitRate = oneBitRateParam.value(); +

    // the name of the "status" file where all +actual parameter values will be saved +
    string str_status = parser.ProgramName() ++ ".status"; // default value +
    eoValueParam<string> statusParam(str_status.c_str(), +"status","Status file",'S'); +
    parser.processParam( statusParam, "Persistence" +); +

    // do the following AFTER ALL PARAMETERS HAVE +BEEN PROCESSED +
    // i.e. in case you need parameters somewhere +else, postpone these +
    if (parser.userNeedsHelp()) +
       { +
          parser.printHelp(cout); +
          exit(1); +
       } +
    if (status_nameParam.value() != "") +
       { +
          ofstream +os(status_nameParam.value().c_str()); +
          os << +parser; // and you can use that file as parameter file +
       } +

    + + +
       -uint32 seed; -
       // decription of genotype -
       unsigned int vecSize; -
       // parameters for evolution -engine -
       unsigned int popSize; -
       unsigned int tSize; -
       // operators probabilities -at the algorithm level -
       double pCross; -
       double pMut;
       // init and stop -
       string load_name; -
       unsigned int maxGen; -
       unsigned int minGen; -
       unsigned int steadyGen; -
       // rates for crossovers -
       double onePointRate; -
       double twoPointsRate; -
       double URate; -
       // rates and private -parameters for mutations; -
       double pMutPerBit; -
       double bitFlipRate; -
       double oneBitRate; -
       // define a -parser from the command-line arguments -
         eoParser parser(argc, -argv); -
       // Now read the parameters -of the program -
         read_param(argc, -argv, seed, vecSize, popSize, tSize, -
               -pCross, pMut, load_name, maxGen, minGen, steadyGen, -
               -onePointRate, twoPointsRate, URate,  -
               -pMutPerBit, bitFlipRate, oneBitRate );
    @@ -304,29 +256,29 @@ parameters

         {
             inState.load(load_name); //  load the pop and the rng -
            -// the fitness is read in the file:  -
            -// do only evaluate the pop if the fitness has changed +
           // +the fitness is read in the file:  +
           // +do only evaluate the pop if the fitness has changed
         }
     else
         {
             rng.reseed(seed); -
            -// a Indi random initializer -
            -// based on boolean_generator class (see utils/rnd_generator.h) +
           // +a Indi random initializer +
           // +based on boolean_generator class (see utils/rnd_generator.h)
             eoInitFixedLength<Indi, boolean_generator> 
                random(vecSize, boolean_generator()); -
            -// Init pop from the randomizer: need to use the append function +
           // +Init pop from the randomizer: need to use the append function
             pop.append(popSize, random);  -
            -// and evaluate pop (STL syntax)  +
           // +and evaluate pop (STL syntax) 
             apply<Indi>(eval, pop);
         } // end @@ -356,7 +308,8 @@ of initializatio of the population +
     // the same generational replacement +at the moment :-) +
     eoGenerationalReplacement<Indi> +replace; 
     // The robust tournament selection -
     eoDetTournament<Indi> selectOne(tSize);           +
     eoDetTournament<Indi> selectOne(tSize);        + // tSize in [2,POPSIZE]
     // is now encapsulated in a eoSelectPerc (entage) @@ -369,9 +322,10 @@ by default rate==1
     // And we now have the full slection/replacement - though with  -
     // the same generational -replacement at the moment :-) -
     eoGenerationalReplacement<Indi> replace; 
    @@ -451,12 +405,12 @@ a continuator: an eoCheckPoint 

     // IS AN eoContinue and will be called in the loop of all algorithms)
     eoCheckPoint<Indi> checkpoint(continuator); -

        -// Create a counter parameter +

      // +Create a counter parameter
         eoValueParam<unsigned> generationCounter(0, "Gen."); -

        -// Create an incrementor (sub-class of eoUpdater). Note that the  +

       // +Create an incrementor (sub-class of eoUpdater). Note that the 
         // parameter's value is passed by reference, 
         // so every @@ -465,13 +419,13 @@ time the incrementer is updated (every generation), in generationCounter will change.

         eoIncrementor<unsigned> increment(generationCounter.value()); -
        -// Add it to the checkpoint,  +
      // +Add it to the checkpoint, 
         // so the counter is updated (here, incremented) every generation
         checkpoint.add(increment); -
        -// now some statistics on the population: +
      // +now some statistics on the population:
         // Best fitness in population
         eoBestFitnessStat<Indi> @@ -480,9 +434,8 @@ bestStat; moment stats: average and stdev
         eoSecondMomentStats<Indi> SecondStat; -
        -// Add them to the checkpoint to get them called at the appropriate -time +
       // +Add them to the checkpoint to get them called at the appropriate time
         checkpoint.add(bestStat);
         checkpoint.add(SecondStat);
         // The Stdout @@ -496,8 +449,7 @@ checkpoint.add(monitor);

         // the monitor will output a series of parameters: add them 
         -monitor.add(generationCounter); - +monitor.add(generationCounter);
         monitor.add(eval); // because now eval is an eoEvalFuncCounter! @@ -521,21 +473,23 @@ of item the eoCheckpoint can handle: state savers: eoState outState;
         // Register the algorithm into the state -
         outState.registerObject(parser); +
         +outState.registerObject(parser);
         outState.registerObject(pop);
         outState.registerObject(rng);
         // and feed the state to state savers -
        -// save state every 100th  generation +
    +// +save state every 100th  generation
         eoCountedStateSaver stateSaver1(100, outState, "generation"); 
         // save state every 1 seconds 
         eoTimedStateSaver    stateSaver2(1, outState, "time");  -
        -// Don't forget to add the two savers to the checkpoint +
      // +Don't forget to add the two savers to the checkpoint
         checkpoint.add(stateSaver1);
         checkpoint.add(stateSaver2);
         // and that's @@ -599,7 +553,9 @@ cout << "Exception: " << e.what() << '\n';


    Back to Lesson 3 - Tutorial main page - Algorithm-Based - Component-Based - - Programming hints - EO +- +Programming +hints - EO documentation
    From 5d8c30b2ae18c1925ad676644d267bf1dac29cbb Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Jan 2001 07:19:55 +0000 Subject: [PATCH 0382/2134] A few details in the comments --- eo/tutorial/Lesson3/SecondBitEA.cpp | 10 +++++----- eo/tutorial/html/SecondBitEA.html | 17 +++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 8a208e0de..ebdae5e68 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -23,8 +23,6 @@ // define your genotype and fitness types typedef eoBin Indi; -// PARAMETRES - // the main_function: nothing changed(!), except variable initialization void main_function(int argc, char **argv) { @@ -187,8 +185,10 @@ void main_function(int argc, char **argv) // SELECT // The robust tournament selection eoDetTournament selectOne(tSize); // tSize in [2,POPSIZE] - // is now encapsulated in a eoSelectPerc (entage) - eoSelectPerc select(selectOne);// by default rate==1 + // is now encapsulated in a eoSelectPerc (stands for Percentage) + eoSelectPerc select(selectOne); + // or eoSelectPerc select(selectOne, rate); + // but by default rate==1 // REPLACE // And we now have the full slection/replacement - though with @@ -314,7 +314,7 @@ void main_function(int argc, char **argv) //////////////////////////////////////// // Easy EA requires - // selection, transformation, eval, replacement, and stopping criterion + // stopping criterion, eval, selection, transformation, replacement eoEasyEA gga(checkpoint, eval, select, transform, replace); // Apply algo to pop - that's it! diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index d64f450b3..d57e1a4ec 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -309,12 +309,14 @@ of initializatio of the population  // The robust tournament selection
     eoDetTournament<Indi> selectOne(tSize);        - // tSize in [2,POPSIZE]
     // is now encapsulated in a eoSelectPerc (entage) -
     eoSelectPerc<Indi> select(selectOne);// -by default rate==1 +
     eoSelectPerc<Indi> select(selectOne); +
     // or eoSelectPerc<Indi> select(selectOne, +rate);  +
     // but by default rate==1 +
      @@ -479,9 +481,8 @@ outState.registerObject(parser);

         outState.registerObject(rng);
         // and feed the state to state savers -
    -// -save state every 100th  generation +
    // save +state every 100th  generation
         eoCountedStateSaver stateSaver1(100, outState, "generation"); 
         // save state @@ -503,8 +504,8 @@ it for the (control and) output
     // the algorithm
     ////////////////////////////////////////
     // Easy EA requires  -
     // selection, transformation, -eval, replacement, and stopping criterion +
     // stopping criterion, eval, selection, +transformation, replacement
     eoEasyEA<Indi> gga(checkpoint, eval, select, transform, replace);
     // Apply algo to pop - that's From 721e8d2cd54e6790cce23d85d7ede03a0647e530 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Jan 2001 07:23:35 +0000 Subject: [PATCH 0383/2134] Follow-up to the modif of SecondBitEA.cpp due to egcs... --- eo/tutorial/Lesson3/exercise1.cpp | 110 +++++++++--------------------- 1 file changed, 34 insertions(+), 76 deletions(-) diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise1.cpp index 67b941303..a01226ca9 100644 --- a/eo/tutorial/Lesson3/exercise1.cpp +++ b/eo/tutorial/Lesson3/exercise1.cpp @@ -24,6 +24,9 @@ // define your genotype and fitness types typedef eoBin Indi; +// the main_function: nothing changed(!), except variable initialization +void main_function(int argc, char **argv) +{ // PARAMETRES //----------------------------------------------------------------------------- // instead of having all values of useful parameters as constants, read them: @@ -32,97 +35,84 @@ typedef eoBin Indi; // # = usual comment character // or in the environment (TODO) -// note that the parameters are passed by reference so they can be updated -void read_param(int argc, char *argv[], - uint32 & _seed, - unsigned int & _vecSize, - unsigned int & _popSize, - unsigned int & _tSize, - double & _pCross, - double & _pMut, - string & _load_name, - unsigned int & _maxGen, - unsigned int & _minGen, - unsigned int & _steadyGen, - double & _onePointRate, - double & _twoPointsRate, - double & _uRate, - double & _pMutPerBit, - double & _bitFlipRate, - double & _oneBitRate - ) -{ - // define a parser from the command-line arguments + // First define a parser from the command-line arguments eoParser parser(argc, argv); // For each parameter, define Parameter, read it through the parser, // and assign the value to the variable + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); parser.processParam( seedParam ); - _seed = seedParam.value(); + unsigned seed = seedParam.value(); + // description of genotype eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V'); parser.processParam( vecSizeParam, "Representation" ); - _vecSize = vecSizeParam.value(); + unsigned vecSize = vecSizeParam.value(); + // parameters for evolution engine eoValueParam popSizeParam(10, "popSize", "Population size",'P'); parser.processParam( popSizeParam, "Evolution engine" ); - _popSize = popSizeParam.value(); + unsigned popSize = popSizeParam.value(); eoValueParam tSizeParam(10, "tSize", "Tournament size",'T'); parser.processParam( tSizeParam, "Evolution Engine" ); - _tSize = tSizeParam.value(); + unsigned tSize = tSizeParam.value(); + // init and stop eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); parser.processParam( loadNameParam, "Persistence" ); - _load_name = loadNameParam.value(); + string loadName = loadNameParam.value(); eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G'); parser.processParam( maxGenParam, "Stopping criterion" ); - _maxGen = maxGenParam.value(); + unsigned maxGen = maxGenParam.value(); eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g'); parser.processParam( minGenParam, "Stopping criterion" ); - _minGen = minGenParam.value(); + unsigned minGen = minGenParam.value(); eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s'); parser.processParam( steadyGenParam, "Stopping criterion" ); - _steadyGen = steadyGenParam.value(); + unsigned steadyGen = steadyGenParam.value(); + // operators probabilities at the algorithm level eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C'); parser.processParam( pCrossParam, "Genetic Operators" ); - _pCross = pCrossParam.value(); + double pCross = pCrossParam.value(); eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M'); parser.processParam( pMutParam, "Genetic Operators" ); - _pMut = pMutParam.value(); + double pMut = pMutParam.value(); + // relative rates for crossovers eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1'); parser.processParam( onePointRateParam, "Genetic Operators" ); - _onePointRate = onePointRateParam.value(); + double onePointRate = onePointRateParam.value(); eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2'); parser.processParam( twoPointsRateParam, "Genetic Operators" ); - _twoPointsRate = twoPointsRateParam.value(); + double twoPointsRate = twoPointsRateParam.value(); eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U'); parser.processParam( uRateParam, "Genetic Operators" ); - _uRate = uRateParam.value(); + double URate = uRateParam.value(); + // relative rates and private parameters for mutations; eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); parser.processParam( pMutPerBitParam, "Genetic Operators" ); - _pMutPerBit = pMutPerBitParam.value(); + double pMutPerBit = pMutPerBitParam.value(); eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B'); parser.processParam( bitFlipRateParam, "Genetic Operators" ); - _bitFlipRate = bitFlipRateParam.value(); + double bitFlipRate = bitFlipRateParam.value(); eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); parser.processParam( oneBitRateParam, "Genetic Operators" ); - _oneBitRate = oneBitRateParam.value(); + double oneBitRate = oneBitRateParam.value(); // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; + string str_status = parser.ProgramName() + ".status"; // default value eoValueParam statusParam(str_status.c_str(), "status","Status file",'S'); parser.processParam( statusParam, "Persistence" ); @@ -138,41 +128,6 @@ void read_param(int argc, char *argv[], ofstream os(statusParam.value().c_str()); os << parser; // and you can use that file as parameter file } -} - -// GENERAL -// now the main_function: nothing changed, except input/output -void main_function(int argc, char **argv) -{ -// PARAMETRES - uint32 seed; - // decription of genotype - unsigned int vecSize; - // parameters for evolution engine - unsigned int popSize; - unsigned int tSize; - // operators probabilities at the algorithm level - double pCross; - double pMut; - // init and stop - string load_name; - unsigned int maxGen; - unsigned int minGen; - unsigned int steadyGen; - // rates for crossovers - double onePointRate; - double twoPointsRate; - double URate; - // rates and private parameters for mutations; - double pMutPerBit; - double bitFlipRate; - double oneBitRate; - - // Now read the parameters of the program - read_param(argc, argv, seed, vecSize, popSize, tSize, - pCross, pMut, load_name, maxGen, minGen, steadyGen, - onePointRate, twoPointsRate, URate, - pMutPerBit, bitFlipRate, oneBitRate ); // EVAL ///////////////////////////// @@ -198,9 +153,9 @@ void main_function(int argc, char **argv) inState.registerObject(rng); inState.registerObject(pop); - if (load_name != "") + if (loadName != "") { - inState.load(load_name); // load the pop and the rng + inState.load(loadName); // load the pop and the rng // the fitness is read in the file: // do only evaluate the pop if the fitness has changed } @@ -237,8 +192,11 @@ void main_function(int argc, char **argv) // REPLACE // And we now have the full slection/replacement - though with - // no replacement (== generational replacement) at the moment :-) + // generational replacement at the moment :-) eoGenerationalReplacement replace; + // want to add (weak) elitism? easy! + // rename the eoGenerationalReplacement replace_main, + // then encapsulate it in the elitist replacement // eoWeakElitistReplacement replace(replace_main); // OPERATORS From 52ed2ef8b6d50b9071d193042c17cf62908cbe3c Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Jan 2001 07:35:56 +0000 Subject: [PATCH 0384/2134] Still the same !@#$$%% modif due to egcs problems ... --- eo/tutorial/html/SecondBitEA.html | 12 +++-- eo/tutorial/html/eoLesson3.html | 89 ++++++++++++++++--------------- 2 files changed, 53 insertions(+), 48 deletions(-) diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index d57e1a4ec..4061d9c03 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -92,14 +92,16 @@ or in a parameter file (same syntax, order independent,  or in the environment (TODO)

    // First define a parser from the command-line arguments -
    eoParser parser(argc, argv); +
    eoParser +parser(argc, argv);

    // For each parameter, define Parameter, read it through the parser,
    // and assign the value to the variable

    eoValueParam<uint32> seedParam(time(0), "seed", "Random number seed", 'S'); -
    parser.processParam( seedParam ); +
    parser.processParam( +seedParam );
    unsigned seed = seedParam.value();

    // decription @@ -308,15 +310,15 @@ of initializatio of the population +
     // but by default rate==1
     // The robust tournament selection -
     eoDetTournament<Indi> selectOne(tSize);        +
     eoDetTournament<Indi> selectOne(tSize);       + // tSize in [2,POPSIZE]
     // is now encapsulated in a eoSelectPerc (entage)
     eoSelectPerc<Indi> select(selectOne);
     // or eoSelectPerc<Indi> select(selectOne, rate);  -
     // but by default rate==1 -
     
    diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index f1a5aac5b..b69671cc5 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 3 @@ -12,7 +12,8 @@ Main page - Algorithm-Based - Component-Based - Hints -- EO documentation +- EO +documentation


    @@ -129,13 +130,15 @@ for volunteers to create a Graphical User Interface :-)
  • The eoValueParam class, templatized by the type of the variable -you want to handle (i.e. iinteger, double, -yourPrivateClass, ...). In this lesson, -we will not go into details: e.g. we will not tell you that the +you want to handle (i.e. iinteger, +double, yourPrivateClass, ...). In +this lesson, we will not go into details: e.g. we will not tell you that +the eoValueParam is actually a templatized sub-class of abstract class eoParam (oops, I said it!), nor will we deal with parameters outside their use from an eoParser. -See the parameter section of the Component-Based tutorial, or wait until lesson +See the parameter section of the Component-Based tutorial, or wait until +lesson 4).
  • @@ -170,7 +173,8 @@ and optionally by a short (1 character) keyword. -
                        +
                      + --longKeyword=value     or     -c=value    if 'c' is the short keyword @@ -180,18 +184,21 @@ so, after compiling the executable for Lesson 3 (ma lesson3 at system prompt in Unix), you can try to type in
  • -
                         +
                       + SecondBitEA
    and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). But you can now type in -
                         +
                       + SecondBitEA --vecSize=100
    and see the output of the optimization of OneMax on 100-bit bitstrings.
     
  • Take a look at all available parameters by typing in
  • -
                         +
                       + SecondBitEA --help
    or by going into the code: all parameter inputs have been grouped in the @@ -203,8 +210,7 @@ it contains the list of all actual parameters used, and can directly be used as parameter input file: change the file name (e.g. to SecondBitEA.param), edit it, change whichever parameter you want, and type in
  • -
                          - +
                         SecondBitEA @SecondBitEA.param
    and you will see all values that you defined into the file taken into account. @@ -216,34 +222,31 @@ new value directly on the command-line. Programming parameter input:
    the code of SeconBitEA provides examples of parameters reading. Lets -take the example of the random number generator seed. +take the example of the random number generator seed.  +Of course, you first need to declare +an eoParser object (it needs the standard argc and argv in its constructor).
    • -You first need to declare it -in the main_function. As parameter -reading will be done in the read_param -function, you need to pass it the variable seed. Note that read_param receives -it by reference, as it is going -to modify its value!
    • +You must first declare a parameter +of type uint32 (32-bits integer). +The arguments are: default value, long keyword, comment (that will appear +in the help message and in the output "status" file if any) and optional +character keyword.
    • -In read_param, you need first to declare -an eoParser object (it needs the standard argc and argv in its constructor).
    • +Then you must pass it to the parser +using the processParam method. The optional argument is a section name, +that will be used to make the output of the parser look clean and ordered. -
      Then, declare a parameter -of type uint32 (32-bits integer), -and read it  directly from the parser, using method create_param. -The arguments are obvious: default value, long keyword, comment (that will -appear in the help message and in the output "status" file if any).
    • Finally, you need to assign the -value to the variable _seed (hence modifying the original seed variable).
    • +value to the variable seed


    eoState: -saving and loading -
    You might have noticed in the  read_param +saving and loadingYou might have +noticed in the  read_param described above a new parameter named load_name. Now if you go to the init section of @@ -347,12 +350,12 @@ the corresponding eoStat objects, and addeoCheckpoint you use in the algorithm.

    Note: actually, there are 2 distinct -classes that compute and give access to statistics: eoStat -and eoSortedStat. As its name -indicate, the latter is used whenever computing the statistics require -a sorted population: not only this avoids to sort the population many times, -but also it avoids changing the order of the population at all as eoSortedStat -work on a temporary vector of fitnesses . But as +classes that compute and give access to statistics: eoStatand +eoSortedStat. +As its name indicate, the latter is used whenever computing the statistics +require a sorted population: not only this avoids to sort the population +many times, but also it avoids changing the order of the population at +all as eoSortedStat work on a temporary vector of fitnesses . But as far as their usage is concerned, its makes no difference.


    @@ -372,13 +375,12 @@ parameters in text format on the screen. The false, parsimonious output displays one line for all parameters.
  • -eoFileMonitor writes its -parameters in text format in a file. A file -name is required in the constructor, and an optional separator character -can be added (default is ' '). Note that the file is by default overwritten -by next call to the same program, unless you pass "true" as third (optional) -boolean parameter, which will result in appending to the file if it -ever exists.
  • +eoFileMonitor writes its parameters +in text format in a file. A file name is required +in the constructor, and an optional separator character can be added (default +is ' '). Note that the file is by default overwritten by next call to the +same program, unless you pass "true" as third (optional) boolean parameter, +which will result in appending to the file if it ever exists.
  • eoGnuplot1DMonitor displays @@ -521,7 +523,8 @@ construct. Main page - Algorithm-Based - Component-Based - Hints -- EO documentation +- EO +documentation

    From 4fd2be4bfff8160fc71057b2c39efc006ec49eb7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Jan 2001 07:54:12 +0000 Subject: [PATCH 0385/2134] A few deatils --- eo/tutorial/html/eoLesson1.html | 48 ++++++++++++++++++++------------- eo/tutorial/html/eoLesson2.html | 14 +++++++--- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index f9116bdf0..22a09acbe 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -33,19 +33,22 @@ follow the guided tour.
  • Later you will be asked to
    • -write your own fitness function,
    • +write your own fitness function,
    • -use different kinds of selection procedures -in the framework of a generational GA evolution engine,
    • - -
    • -check that EO let you separate the representation +check that EO let you separate the representation from the evolution engine.
    • + +
    • +use different kinds of selection +procedures in the framework of a generational GA evolution +engine,

    -I want to run an Evolutionary Algorithm + +
    I want to run +an Evolutionary Algorithm now

    You can choose to run a standard bitstring Genetic Algorithm (as defined in Goldberg's book) or a standard real-valued @@ -74,12 +77,16 @@ one individual per line, its fitness first, then the number of items (bits or real numbers) of the genotype, and the genotype itself. The final population hopefully contains the solution in the discrete case, and is close to it in the continuous case. -

    You need now to take a look at either programs -by browsing alone through the  sources for FirstBitGA -and FirstRealGA, or follow the guided tour -below, or go directly to the exercises. +
    +


    Browsing +the code: +

    Now you need to take a look at the program codes, either by browsing +alone through the  sources for FirstBitGA +and FirstRealGA, or by following the guided +tour below. You might prefer to go directly to the exercises.

    -Browsing the code:

    + +
    Guided tour:
    • @@ -299,8 +306,9 @@ discussing up to now!

    -Exercise 1: maximize your -own function

    + +
    Exercise +1: maximize your own function This is very easy - if your search space is that of bitstring or of unbounded real numbers.
      @@ -328,7 +336,9 @@ at system prompt.

    -Exercise 2: check the differences between both programs

    + +
    Exercise +2: check the differences between both programs Go and take a look at the code for these programs (Bit - Real). Use the symbolic representation of an Evolutionary Algorithm (you should understand that figure now, otherwise @@ -337,9 +347,10 @@ part of the EA is coded. Try to spot the differences between both codes: there are not so many!
    After you've tried that alone, take a look at the solution :-) -
     

    -Exercise 3: change the selection procedure

    + +
    Exercise +3: change the selection procedure This is rather straightforward ... if you know what other types of selection are available!
    At the moment, let's only consider only the following simple ones: @@ -368,7 +379,8 @@ select;
    Note that all these classes of eoObjects are derived from the abstract class eoSelectOne. -

    Lessons: +

    +


    Lessons learned:
    @@ -67,7 +67,9 @@ argument is a vector<bool> or a Note: Also, +
      +

      +

    Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object file once and for all (remember @@ -84,6 +86,8 @@ requires.
     

      +
      +
     

    Note: In the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness @@ -107,7 +111,9 @@ You can also use different initializers and call them in turn through the call to pop.append() function (see Exercise 2). -


    Note: Don't +
      +

      +

    Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!!
      From 3074101d1c18cb8a7fbbc2238bac92bf24154fa2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Jan 2001 13:27:11 +0000 Subject: [PATCH 0386/2134] Adding eoDetSelect, deterministic batch selection, that copies the individuals one after the other. Should shuffle them in between (TODO). --- eo/src/eoDetSelect.h | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 eo/src/eoDetSelect.h diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h new file mode 100644 index 000000000..130f7dba7 --- /dev/null +++ b/eo/src/eoDetSelect.h @@ -0,0 +1,85 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDetSelect.h + (c) Merc Schoenauer, Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDetSelect_h +#define _eoDetSelect_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoDetSelect selects many individuals determinisctically +*/ +template +class eoDetSelect : public eoSelect +{ + public: + /// init + eoDetSelect(double _rate = 1.0, bool _interpret_as_rate = true) + : howMany(_rate, _interpret_as_rate) {} + + /** + @param _source the source population + @param _dest the resulting population (size of this population is + given by the HowMany data + It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned int pSize = _source.size(); + size_t target = howMany(pSize); + + _dest.resize(target); + + unsigned remain = target % pSize; + unsigned entireCopy = target / pSize; + eoPop::iterator it = _dest.begin(); + + if (target >= pSize) + { + for (unsigned i=0; i Date: Tue, 2 Jan 2001 13:31:40 +0000 Subject: [PATCH 0387/2134] Adding t-eoSelect.cpp to test selection procedures. Modified Makefile.am accordingly --- eo/test/Makefile.am | 9 +++- eo/test/t-eoSelect.cpp | 107 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 eo/test/t-eoSelect.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 3efec4a15..d69a6082c 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### -noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement +noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect ############################################################################### @@ -57,6 +57,13 @@ t_eoReplacement_LDADD = $(LDADDS) ############################################################################### +t_eoSelect_SOURCES = t-eoSelect.cpp +t_eoSelect_DEPENDENCIES = $(DEPS) +t_eoSelect_LDFLAGS = -lm +t_eoSelect_LDADD = $(LDADDS) + +############################################################################### + t_eoExternalEO_SOURCES = t-eoExternalEO.cpp t_eoExternalEO_DEPENDENCIES = $(DEPS) t_eoExternalEO_LDFLAGS = -lm diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp new file mode 100644 index 000000000..b0bdcbbed --- /dev/null +++ b/eo/test/t-eoSelect.cpp @@ -0,0 +1,107 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include // runtime_error + +//----------------------------------------------------------------------------- +// tt.cpp: +// +//----------------------------------------------------------------------------- + + +// general +#include +#include +//----------------------------------------------------------------------------- + +struct Dummy : public EO +{ + typedef double Type; + void printOn(ostream & _os) const + { + _os << " - "; + EO::printOn(_os); + } +}; + + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s=0) { resize(s); } +}; + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); + unsigned int pSize = parentSizeParam.value(); + + eoValueParam offsrpringRateParam = parser.createParam(1.0, "offsrpringRate", "Offsrpring rate",'O'); + double oRate = offsrpringRateParam.value(); + + eoValueParam interpretAsRateParam = parser.createParam(true, "interpretAsRate", "interpret rate as Rate (False = as Number)",'b'); + bool interpretAsRate = interpretAsRateParam.value(); + +eoValueParam tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); + unsigned int tSize = tournamentSizeParam.value(); + + eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + double tRate = tournamentRateParam.value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + + unsigned i; + + cout << "Testing the Selections\nParents size = " << pSize + << ", offspring rate = " << oRate << + "interpreted as " << (interpretAsRate ? "Rate" : "Number") << endl; + + rng.reseed(42); + + + eoDummyPop parents(pSize); + eoDummyPop offspring(0); + + // initialize so we can recognize them later! + for (i=0; i detSelect(oRate, interpretAsRate); + + // here we go + // Deterministic + cout << "eoDetSelect\n"; + cout << "===========\n"; + detSelect(parents, offspring); +cout << "Selected offsprings (origonally all even\n" << offspring << endl; + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + return 1; +} From 2f130666258d8c0ff5323a5cd30b3f1b2dd77102 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 4 Jan 2001 05:00:40 +0000 Subject: [PATCH 0388/2134] Adding the selectin and replacement procedures --- eo/src/eo | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/eo/src/eo b/eo/src/eo index eb0d8f076..0545e6822 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -30,8 +30,20 @@ // some defines to make things easier to get at first sight +// tunigni the amount of output using a boolean argument: +// true should always mean more output #define eo_verbose true #define eo_no_verbose false +// to be used in selection / replacement procedures to indicate whether +// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) +// or as an absolute integer (number=rate regardless of popsize). +// the default value shoudl ALWAYS be true (eo_as_a_rate). +// +// this construct is mandatory because in some cases you might not know the +// population size that will enter the replacement for instance - so you +// cannot simply have a pre-computed (double) rate of 1/popSize +#define eo_is_a_rate true +#define eo_is_an_integer false //----------------------------------------------------------------------------- #include @@ -86,13 +98,24 @@ #include #include -// Selection and reproduction stuff +// Selection #include #include #include #include #include +#include +#include +#include + +// Replacement +// #include +#include +#include +#include + +// Variation #include #include #include From 4d77c9116f3a8a1bc5f56d34541e19363d8ab47f Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 4 Jan 2001 05:06:09 +0000 Subject: [PATCH 0389/2134] Sorry: removed eoSGATransform, that is in eoSGA.h ... --- eo/src/eo | 2 -- 1 file changed, 2 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 0545e6822..62c8de89f 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -121,8 +121,6 @@ #include #include -#include - //#include //#include //#include From b685eb8048702b214f3fb0d1194097eb7d27ae28 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 4 Jan 2001 15:21:18 +0000 Subject: [PATCH 0390/2134] removed redundant index.html in html dir --- eo/tutorial/Makefile | 5 +- eo/tutorial/html/index.html | 93 ++++++++++++++++++++++--------------- eo/tutorial/index.html | 26 ----------- 3 files changed, 60 insertions(+), 64 deletions(-) delete mode 100644 eo/tutorial/index.html diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index fcdd0e0cb..d43f74950 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = Lesson1 Lesson2 Lesson3 +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 lesson1 : cd Lesson1; make @@ -9,6 +9,9 @@ lesson2 : lesson3 : cd Lesson3; make +lesson4 : + cd Lesson4; make + all: for i in $(SUBDIRS); do pushd $$i && $(MAKE); popd; done diff --git a/eo/tutorial/html/index.html b/eo/tutorial/html/index.html index 0546d41c5..41d96c0c0 100644 --- a/eo/tutorial/html/index.html +++ b/eo/tutorial/html/index.html @@ -2,26 +2,28 @@ - + Tutorial EO -Algorithm-Based - Component-Based -page - Programming hints - EO +Algorithm-Based - Component-Based +- Programming hints - EO documentation


    EO Tutorial

    -Welcome to EO - the Evolving Objects library. What is this tutorial good -for? -
    Well,  the short term idea here is to help you build + +
    Welcome to EO - the Evolving Objects library.
    + +

    The short term idea of this tutorial is to help you build your own Evolutionary Algorithms using EO - while the long term idea is that you will be able to contribute to EO, and ultimately write our EAs :-)

    -About this tutorial

    + +
    About this tutorial This tutorial can be used in 2 different ways: algorithm-based and component-based.
    • @@ -30,18 +32,22 @@ simple, ready-to-run algorithm, and gradually modify it, making it both more powerful and more complex.
    • -Component-Based means you start by examining the -components -of an EA one by one, down to the level of complexity you feel comfortable -with, and then build the whole algorithm using those components you need -(or the one you are mastering). Such approach might be viewed as going -through a simplified user guide, too.
    • +Component-Based means you start by examining +the +components of an EA one by one, down to +the level of complexity you feel comfortable with, and then build the whole +algorithm using those components you need (or the one you are mastering). +Such approach might be viewed as going through a simplified user guide, +too.
    However, it is strongly recommended -that you take some time on the first lesson of the Algorithm-Based approach to -get familiar with the basic concepts that are used throughout EO. Anyway, -as of today, November 29, the Component-Based is not written yet :-) -

    Related documents +that you take some time on the first lesson of the Algorithm-Based approach +to get familiar with the basic concepts that are used throughout EO. Anyway, +as of today, December 19, the Component-Based is only very sparsely written +:-) +

    +


    Links and Related +documents
    • There are of course a few (very few) programming @@ -49,21 +55,22 @@ hints that you should know.
    • THe EO documentation - automatically -generated from the comments in the code - is very helpful, to get an idea -of the inheritance diagrams of EO classes, and to quickly reach some specific -part of the code.
    • +generated from the comments in the code - is very helpful to get an idea +of the inheritance diagrams of EO classes, +and to quickly reach some specific part of the code.
      The top page of each class documentation is for instance the inheritance diagram of the class, and you'll learn a lot by simply looking at it.
    • And, last but not least, we assume you know approximately that an Evolutionary Algorithm looks like this, but otherwise you can try this very -brief introduction).
    • +brief introduction (not written yet, Jan. 2001, sorry).
    -


    Colors and navigation: +


    +


    Colors and navigation:

    You will see this diagram in quite many places, as for instance at the -top of all examples - usually it will be clicable and will help you navigate +top of all examples - usually it will be clickable and will help you navigate among the different parts of an EO program. See the brief introduction to Evolutionary Computation for a detailed explanation.

    @@ -72,8 +79,8 @@ introduction to Evolutionary Computation for a detailed explanation.

    But in the text itself, colors are important, as they will be used throughout this tutorial to clearly mark which part of the algorithm we are discussing. So please keep in mind that, whereas -orange -is for emphasis, +orange +is for emphasis,

    • Yellowish is for representation, @@ -108,28 +115,40 @@ any of the above, i.e. random number generator, or basic C++/STL syntax .
    • -Note that pink will be used to desctibe the -syntax of compile orders (i.e. at the oepratoring system level, see e.g. +Note that pink will be used to describe the +syntax of compile orders (i.e. at the operating system level, see e.g. below).
    • -Last, but not least, all links into EO documentation -will use the Helvetica typeface, like this line you are now reading.
    • +Last, but not least, all +links into EO documentation will use the Helvetica typeface, like this +line you are now reading.
    +
    This tutorial is +not
    • -an interface that would allow you to build your Evolutionary Programs by -a few clics; such a thing does exist, is called EASEA, +A course on Evolutionary Computation. You can find such things on the Internet, +maybe you can start here.
    • + +
    • +An interface that would allow you to build your Evolutionary Programs by +a few clicks; such a thing does exist, is called EASEA, and is complementary to this tutorial as it helps the user to build some simple EO programs from simple description. But there are things that EASEA -cannot do, and you will have to do it yourself and will need to imcrease -your knowledge about EO for that.
    • +cannot do, and you will have to do it yourself and will need to increase +your knowledge about EO for that - hence this tutorial. + +
    • +A coffee machine - though you might want to spend some time here when you're +tired of everything else, to improve your knowledge of EO slowly and gradually +rather than when you have something urgent to code :-)
    - -

    -Before you start

    -You should of course have downloaded and installed the whole EO + +
    Before +you start +

    You should of course have downloaded and installed the whole EO library (how did you get this file if not???).
    So we'll assume that you are now in the Tutorial directory, and that your prompt looks something like diff --git a/eo/tutorial/index.html b/eo/tutorial/index.html deleted file mode 100644 index 81b87972b..000000000 --- a/eo/tutorial/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - Tutorial EO - - - -


    -
    -

    -EO Tutorial

    -Welcome to EO - the Evolving Objects library. -

    But you are not in the right place! -
    You should better try to go to the html directory, for instance by -clicking here. -

    -


    -
    -Marc Schoenauer
    - -
    Last -modified: Fri Nov 28 CET 2000  - - From c3fef2e4931ee7d3f39cb6d50b980aaa2469ad84 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 4 Jan 2001 15:23:14 +0000 Subject: [PATCH 0391/2134] I had removed the wrong file!!! --- eo/tutorial/html/index.html | 197 ------------------------------------ eo/tutorial/index.html | 26 +++++ 2 files changed, 26 insertions(+), 197 deletions(-) delete mode 100644 eo/tutorial/html/index.html create mode 100644 eo/tutorial/index.html diff --git a/eo/tutorial/html/index.html b/eo/tutorial/html/index.html deleted file mode 100644 index 41d96c0c0..000000000 --- a/eo/tutorial/html/index.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - Tutorial EO - - -Algorithm-Based - Component-Based -- Programming hints - EO -documentation -
    -
    -

    -EO Tutorial

    - -
    Welcome to EO - the Evolving Objects library.
    - -

    The short term idea of this tutorial is to help you build -your own Evolutionary Algorithms using EO - while the long term -idea is that you will be able to contribute to EO, and ultimately write -our -EAs :-) -

    - -
    About this tutorial

    -This tutorial can be used in 2 different ways: algorithm-based and component-based. -
      -
    • -Algorithm-Based means you start from a very -simple, ready-to-run algorithm, and gradually modify it, making -it both more powerful and more complex.
    • - -
    • -Component-Based means you start by examining -the -components of an EA one by one, down to -the level of complexity you feel comfortable with, and then build the whole -algorithm using those components you need (or the one you are mastering). -Such approach might be viewed as going through a simplified user guide, -too.
    • -
    -However, it is strongly recommended -that you take some time on the first lesson of the Algorithm-Based approach -to get familiar with the basic concepts that are used throughout EO. Anyway, -as of today, December 19, the Component-Based is only very sparsely written -:-) -

    -


    Links and Related -documents -
      -
    • -There are of course a few (very few) programming -hints that you should know.
    • - -
    • -THe EO documentation - automatically -generated from the comments in the code - is very helpful to get an idea -of the inheritance diagrams of EO classes, -and to quickly reach some specific part of the code.
    • - -
      The top page of each class documentation is for instance the inheritance -diagram of the class, and you'll learn a lot by simply looking at it. -
    • -And, last but not least, we assume you know approximately that an Evolutionary -Algorithm looks like this, but otherwise you can try this very -brief introduction (not written yet, Jan. 2001, sorry).
    • -
    - -


    -


    Colors and navigation: -

    You will see this diagram in quite many places, as for instance at the -top of all examples - usually it will be clickable and will help you navigate -among the different parts of an EO program. See the brief -introduction to Evolutionary Computation for a detailed explanation. -

    -

    - -

    But in the text itself, colors are important, -as they will be used throughout this tutorial to clearly mark which part -of the algorithm we are discussing. So please keep in mind that, whereas -orange -is for emphasis, -

      -
    • -Yellowish is for representation, -i.e. the choice of the genotype
    • - -
    • -Magenta is for the stochastic -operators that are representation-dependent, -i.e. initialisation and variation operators -(crossover, mutation -and the like).
    • - -
    • -Green is for the implementation of Darwinism, -i.e. the way the individuals are selected -for reproduction and survive.
    • - -
    • -Red is for evaluation, i.e. the computation -of the fitness of all individuals
    • - -
    • -Blue is for interactions of the user and the -program, as for instance choice of stopping criterion, -on-line display of nice statistics or initial -choice -of all program parameters.
    • - -
    • -Brown is for everything that is NOT part of -any of the above, i.e. random number generator, or basic C++/STL syntax -.
    • - -
    • -Note that pink will be used to describe the -syntax of compile orders (i.e. at the operating system level, see e.g. -below).
    • - -
    • -Last, but not least, all -links into EO documentation will use the Helvetica typeface, like this -line you are now reading.
    • -
    - -
    This tutorial is -not -
      -
    • -A course on Evolutionary Computation. You can find such things on the Internet, -maybe you can start here.
    • - -
    • -An interface that would allow you to build your Evolutionary Programs by -a few clicks; such a thing does exist, is called EASEA, -and is complementary to this tutorial as it helps the user to build some -simple EO programs from simple description. But there are things that EASEA -cannot do, and you will have to do it yourself and will need to increase -your knowledge about EO for that - hence this tutorial.
    • - -
    • -A coffee machine - though you might want to spend some time here when you're -tired of everything else, to improve your knowledge of EO slowly and gradually -rather than when you have something urgent to code :-)
    • -
    - -
    Before -you start -

    You should of course have downloaded and installed the whole EO -library (how did you get this file if not???). -
    So we'll assume that you are now in the Tutorial directory, and that -your prompt looks something like -

    (myname@myhost) EOdir/Tutorial % -

    so you should now type in -

    make lesson1 -

    and see something like -

    (myname@myhost) -EOdir/Tutorial % make lesson1 -
    c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" --I. -I../../src -Wall -g -c FirstBitGA.cpp -
    c++ -Wall -g -o FirstBitGA FirstBitGA.o -../../src/libeo.a ../../src/utils/libeoutils.a -
    c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" --I. -I../../src -Wall -g -c FirstRealGA.cpp -
    c++ -Wall -g -o FirstRealGA FirstRealGA.o -../../src/libeo.a ../../src/utils/libeoutils.a -

    and two now executable files should have appeared in the subdirectory -Lesson1, namely FirstBitGA -and FirstRealGA (see First -lesson to know more about these two ready-to-run programs). If this -doesn't work, please go back to the main EO directory and run the installation -program. -

    You should also test that you can access the EO documentation in the -menu line below: you might not need to go there immediately, but just in -case you make rapid progress ... This menu bar should be on all pages of -this tutorial, allowing you to navigate easily. -

    Last, but not least: EO is improving only  from the good will of -contributors. This is also true for this tutorial: If you find anything -that you think could be improved, you are welcome to e-mail -me. -

    -

    Enjoy! -


    Algorithm-Based -- Component-Based - Programming -hints - EO -documentation
    - -
    -
    -Marc Schoenauer
    - -
    Last -modified: Fri Nov 28 2000  - - diff --git a/eo/tutorial/index.html b/eo/tutorial/index.html new file mode 100644 index 000000000..81b87972b --- /dev/null +++ b/eo/tutorial/index.html @@ -0,0 +1,26 @@ + + + + + + Tutorial EO + + + +
    +
    +

    +EO Tutorial

    +Welcome to EO - the Evolving Objects library. +

    But you are not in the right place! +
    You should better try to go to the html directory, for instance by +clicking here. +

    +


    +
    +Marc Schoenauer
    + +
    Last +modified: Fri Nov 28 CET 2000  + + From b6e99450281f28fcaba596e9568643e52d8e1fc6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 05:41:26 +0000 Subject: [PATCH 0392/2134] Trying to ci eoTutorial.html (there is a sticky tag that keeps bothering me ...) --- eo/tutorial/html/eoTutorial.html | 58 +++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index a53ed75db..00734f654 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -10,17 +10,22 @@ - Programming hints - EO documentation
    -
    +
    Welcome to EO, the Evolving Objects library, +and to + 

    EO Tutorial

    -Welcome to EO - the Evolving Objects library. + +
    Version 0.92 - Jan. 5 2001
    +

    The short term idea of this tutorial is to help you build your own Evolutionary Algorithms using EO - while the long term idea is that you will be able to contribute to EO, and ultimately write our EAs :-)

    -About this tutorial

    + +
    About this tutorial This tutorial can be used in 2 different ways: algorithm-based and component-based.
    • @@ -42,7 +47,9 @@ that you take some time on the first lesson of the Algorithm-Based approach to get familiar with the basic concepts that are used throughout EO. Anyway, as of today, December 19, the Component-Based is only very sparsely written :-) -

      Related documents +

      +


      Links and Related +documents
      • There are of course a few (very few) programming @@ -50,19 +57,20 @@ hints that you should know.
      • THe EO documentation - automatically -generated from the comments in the code - is very helpful, to get an idea -of the inheritance diagrams of EO classes, and to quickly reach some specific -part of the code.
      • +generated from the comments in the code - is very helpful to get an idea +of the inheritance diagrams of EO classes, +and to quickly reach some specific part of the code.
        The top page of each class documentation is for instance the inheritance diagram of the class, and you'll learn a lot by simply looking at it.
      • And, last but not least, we assume you know approximately that an Evolutionary Algorithm looks like this, but otherwise you can try this very -brief introduction).
      • +brief introduction (not written yet, Jan. 2001, sorry).
      -


      Colors and navigation: +


      +


      Colors and navigation:

      You will see this diagram in quite many places, as for instance at the top of all examples - usually it will be clickable and will help you navigate among the different parts of an EO program. See the brief @@ -73,8 +81,8 @@ introduction to Evolutionary Computation for a detailed explanation.

      But in the text itself, colors are important, as they will be used throughout this tutorial to clearly mark which part of the algorithm we are discussing. So please keep in mind that, whereas -orange -is for emphasis, +orange +is for emphasis,

      • Yellowish is for representation, @@ -114,23 +122,35 @@ syntax of compile orders (i.e. at the operating system level, see e.g. below).
      • -Last, but not least, all links into EO documentation -will use the Helvetica typeface, like this line you are now reading.
      • +Last, but not least, all +links into EO documentation will use the Helvetica typeface, like this +line you are now reading.
      +
      This tutorial is +not
      • -an interface that would allow you to build your Evolutionary Programs by +A course on Evolutionary Computation. You can find such things on the Internet, +maybe you can start here.
      • + +
      • +An interface that would allow you to build your Evolutionary Programs by a few clicks; such a thing does exist, is called EASEA, and is complementary to this tutorial as it helps the user to build some simple EO programs from simple description. But there are things that EASEA cannot do, and you will have to do it yourself and will need to increase -your knowledge about EO for that.
      • +your knowledge about EO for that - hence this tutorial. + +
      • +A coffee machine - though you might want to spend some time here when you're +tired of everything else, to improve your knowledge of EO slowly and gradually +rather than when you have something urgent to code :-)
      - -

      -Before you start

      -You should of course have downloaded and installed the whole EO + +
      Before +you start +

      You should of course have downloaded and installed the whole EO library (how did you get this file if not???).
      So we'll assume that you are now in the Tutorial directory, and that your prompt looks something like From a998ad0a411709f62fb1fe76f1f2f1f9d7d29a58 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 05:42:08 +0000 Subject: [PATCH 0393/2134] Checking in the name changes in selection procedures. This impacts on many files, creating new entries in src (the old ones are moved to obsolete dir), modifying t-eoSymreg.cpp and t-eobin.cpp in test, as well as gprop.cc and mastermind.cc in app dir (not to mention almost all files in tutorial:-( --- eo/app/gprop/gprop.cc | 14 +- eo/app/mastermind/mastermind.cc | 14 +- eo/src/eo | 17 +- eo/src/eoDetTournamentSelect.h | 69 ++++++ eo/src/eoEvolutionStrategy.h | 2 +- eo/src/eoInplaceTransform.h | 4 +- eo/src/eoMergeReduce.h | 17 ++ eo/src/eoProportionalSelect.h | 71 +++++++ eo/src/eoRandomSelect.h | 52 +++++ eo/src/eoReduce.h | 55 +++-- eo/src/eoSGATransform.h | 21 +- eo/src/eoStochTournamentSelect.h | 69 ++++++ eo/src/{ => obsolete}/eoDetTournament.h | 0 eo/src/{ => obsolete}/eoProportional.h | 0 eo/src/{ => obsolete}/eoSelectRandom.h | 0 eo/src/{ => obsolete}/eoStochTournament.h | 0 eo/test/t-eoReplacement.cpp | 10 + eo/test/t-eoSymreg.cpp | 2 +- eo/test/t-eobin.cpp | 2 +- eo/tutorial/Lesson1/FirstBitGA.cpp | 2 +- eo/tutorial/Lesson1/FirstRealGA.cpp | 2 +- eo/tutorial/Lesson2/FirstBitEA.cpp | 2 +- eo/tutorial/Lesson2/FirstRealEA.cpp | 2 +- eo/tutorial/Lesson3/SecondBitEA.cpp | 4 +- eo/tutorial/html/FirstBitEA.html | 2 +- eo/tutorial/html/FirstBitGA.html | 2 +- eo/tutorial/html/FirstRealEA.html | 2 +- eo/tutorial/html/FirstRealGA.html | 2 +- eo/tutorial/html/NoWay.html | 37 ++-- eo/tutorial/html/SecondBitEA.html | 2 +- eo/tutorial/html/eoEngine.html | 242 ++++++++++++++++++---- eo/tutorial/html/eoLesson1.html | 13 +- eo/tutorial/html/eoLesson2.html | 37 ++-- eo/tutorial/html/eoLesson3.html | 131 ++++++------ eo/tutorial/html/eoTopDown.html | 48 +++-- eo/tutorial/html/index.html | 199 ++++++++++++++++++ 36 files changed, 922 insertions(+), 226 deletions(-) create mode 100755 eo/src/eoDetTournamentSelect.h create mode 100755 eo/src/eoProportionalSelect.h create mode 100644 eo/src/eoRandomSelect.h create mode 100755 eo/src/eoStochTournamentSelect.h rename eo/src/{ => obsolete}/eoDetTournament.h (100%) rename eo/src/{ => obsolete}/eoProportional.h (100%) rename eo/src/{ => obsolete}/eoSelectRandom.h (100%) rename eo/src/{ => obsolete}/eoStochTournament.h (100%) create mode 100644 eo/tutorial/html/index.html diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cc index 3b7d93ec7..dc17379a0 100644 --- a/eo/app/gprop/gprop.cc +++ b/eo/app/gprop/gprop.cc @@ -7,17 +7,7 @@ #include // cerr cout #include // ifstream #include // string -#include // eoParser -#include // eoPop -#include // eoEvalFunc -#include // eoStochTournament -#include // eoGenContinue -#include // eoFitContinue -#include // eoCombinedContinue -#include // eoCheckPoint -#include // eoBestFitnessStat -#include // eoStdoutMonitor -#include // eoSGA +#include // all usefull eo stuff #include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator //----------------------------------------------------------------------------- @@ -134,7 +124,7 @@ void ga() apply(evaluator, pop); // selector - eoStochTournament select; + eoStochTournamentSelect select; // genetic operators eoChromMutation mutation; diff --git a/eo/app/mastermind/mastermind.cc b/eo/app/mastermind/mastermind.cc index 6be66e84d..0db39120f 100644 --- a/eo/app/mastermind/mastermind.cc +++ b/eo/app/mastermind/mastermind.cc @@ -7,17 +7,7 @@ #include // cerr cout #include // ifstream #include // string -#include // eoParser -#include // eoPop -#include // eoEvalFunc -#include // eoProportional -#include // eoGenContinue -#include // eoFitContinue -#include // eoCombinedContinue -#include // eoCheckPoint -#include // eoBestFitnessStat -#include // eoStdoutMonitor -#include // eoSGA +#include // all usefull eo stuff #include "mastermind.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator //----------------------------------------------------------------------------- @@ -103,7 +93,7 @@ void ga() apply(evaluator, pop); // selector - eoProportional select(pop); + eoProportionalSelect select(pop); // genetic operators eoChromMutation mutation; diff --git a/eo/src/eo b/eo/src/eo index 62c8de89f..5f1a3f6b2 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -92,21 +92,24 @@ #include // Continuators -#include +// #include // already included in the following #include #include #include #include // Selection -#include -#include -#include -#include -#include +// the eoSelectOne +#include +#include +#include +#include +// the batch selection - from an eoSelectOne #include #include #include +// other batch selections +#include // Replacement @@ -129,6 +132,8 @@ //#include +#include + // Algorithms #include #include diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h new file mode 100755 index 000000000..dcc048763 --- /dev/null +++ b/eo/src/eoDetTournamentSelect.h @@ -0,0 +1,69 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDetTournament.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoDetTournament_h +#define eoDetTournament_h + +//----------------------------------------------------------------------------- + +#include // +#include // accumulate + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** eoDetTournamentSelect: a selection method that selects ONE individual by + deterministic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoDetTournamentSelect: public eoSelectOne +{ + public: + /// (Default) Constructor. + eoDetTournamentSelect(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { + // consistency check + if (Tsize < 2) { + cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; + Tsize = 2; + } + } + + /// Perform deterministic tournament + virtual const EOT& operator()(const eoPop& pop) + { + return deterministic_tournament(pop, Tsize); + } + + private: + unsigned Tsize; +}; + +//----------------------------------------------------------------------------- + +#endif eoDetTournamentSelect_h + diff --git a/eo/src/eoEvolutionStrategy.h b/eo/src/eoEvolutionStrategy.h index ab6261162..b863ae8a4 100644 --- a/eo/src/eoEvolutionStrategy.h +++ b/eo/src/eoEvolutionStrategy.h @@ -73,7 +73,7 @@ class eoEvolutionStrategy: public eoAlgo eoPlus plus; eoNoElitism noElitism; eoTruncate truncate; - eoSelectRandom randomSelect; + eoRandomSelect randomSelect; eoSelectPerc selectPerc; eoInplaceTransform2 transform; diff --git a/eo/src/eoInplaceTransform.h b/eo/src/eoInplaceTransform.h index f1462408c..17a358cc1 100644 --- a/eo/src/eoInplaceTransform.h +++ b/eo/src/eoInplaceTransform.h @@ -123,7 +123,7 @@ template class eoInplaceTransform1 : public eoTransform private: eoOpSelector& opSel; - eoSelectRandom defaultSelect; + eoRandomSelect defaultSelect; eoSelectOne& select; }; @@ -181,7 +181,7 @@ template class eoInplaceTransform2 : public eoTransform private: eoGOpSelector& opSel; - eoSelectRandom defaultSelect; + eoRandomSelect defaultSelect; eoSelectOne& select; }; diff --git a/eo/src/eoMergeReduce.h b/eo/src/eoMergeReduce.h index 6a7aebf0b..f0c6a1b5a 100644 --- a/eo/src/eoMergeReduce.h +++ b/eo/src/eoMergeReduce.h @@ -94,5 +94,22 @@ class eoCommaReplacement : public eoMergeReduce eoTruncate truncate; }; +/** +EP type of replacement strategy: first add parents to population, + then truncate using EP tournament +*/ +template +class eoEPReplacement : public eoMergeReduce +{ +public : + eoEPReplacement(int _tSize) : eoMergeReduce(plus, truncate), truncate(_tSize) + // {truncate.setSize(_tSize);} + {} +private : + eoPlus plus; + eoEPReduce truncate; +}; + + #endif diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h new file mode 100755 index 000000000..36a0da265 --- /dev/null +++ b/eo/src/eoProportionalSelect.h @@ -0,0 +1,71 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoProportionalSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoProportionalSelect_h +#define eoProportionalSelect_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** eoProportionalSelect: select an individual proportional to her stored fitness + value + +*/ +//----------------------------------------------------------------------------- + +template class eoProportionalSelect: public eoSelectOne +{ +public: + /// Sanity check + eoProportionalSelect(const eoPop& pop = eoPop()): + total((pop.size() == 0) ? -1.0 : sum_fitness(pop)) + { + if (minimizing_fitness()) + throw logic_error("eoProportionalSelect: minimizing fitness"); + } + + void setup(const eoPop& _pop) + { + total = sum_fitness(_pop); + } + + /** do the selection, call roulette_wheel. + */ + const EOT& operator()(const eoPop& _pop) + { + return roulette_wheel(_pop, total) ; + } + +private : + typename EOT::Fitness total; +}; + +#endif + diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h new file mode 100644 index 000000000..9d57e869b --- /dev/null +++ b/eo/src/eoRandomSelect.h @@ -0,0 +1,52 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRandomSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRandomSelect_h +#define eoRandomSelect_h + +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- +/** eoRandomSelect: a selection method that selects ONE individual randomly + -MS- 22/10/99 */ +//----------------------------------------------------------------------------- + +template class eoRandomSelect: public eoSelectOne +{ + public: + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& pop) + { + return pop[rng.random(pop.size())] ; + } +}; + +#endif eoRandomSelect_h + diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 138dc59f4..715a412c0 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -69,7 +69,7 @@ template class eoEPReduce : public eoReduce public: typedef typename EOT::Fitness Fitness; - eoEPReduce(unsigned _t_size): + eoEPReduce(unsigned _t_size ): t_size(_t_size) { if (t_size < 2) @@ -79,17 +79,24 @@ typedef typename EOT::Fitness Fitness; } /// helper struct for comparing on pairs + // compares the scores + // uses the fitness if scores are equals ???? typedef pair::iterator> EPpair; - struct Cmp { - bool operator()(const EPpair a, const EPpair b) const - { return b.first < a.first; } - }; - - - void operator()(eoPop& _newgen, unsigned _newsize) - { - unsigned int presentSize = _newgen.size(); - if (presentSize == _newsize) + struct Cmp { + bool operator()(const EPpair a, const EPpair b) const + { + if (b.first == a.first) + return (*b.second < *a.second); + return b.first < a.first; + } + }; + + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned int presentSize = _newgen.size(); + + if (presentSize == _newsize) return; if (presentSize < _newsize) throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); @@ -107,12 +114,30 @@ typedef typename EOT::Fitness Fitness; scores[i].first += 0.5; } } + // now we have the scores typename vector::iterator it = scores.begin() + _newsize; - std::nth_element(scores.begin(), it, scores.end(), Cmp()); - it = scores.begin() + _newsize; // just in case ??? - while (it < scores.end()) - _newgen.erase(it->second); + std::nth_element(scores.begin(), it, scores.end(), Cmp()); + // sort(scores.begin(), scores.end(), Cmp()); + unsigned j; +// cout << "Les scores apres tri\n"; +// for (j=0; j tmPop; + for (j=0; j<_newsize; j++) + { + tmPop.push_back(*scores[j].second); + } + _newgen.swap(tmPop); + // erase does not work, but I'm sure there is a way in STL to mark + // and later delete all inside a vector ?????? + // this would avoid all copies here + +// it = scores.begin() + _newsize; +// while (it < scores.end()) +// _newgen.erase(it->second); } private: unsigned t_size; diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 96a6e39e3..63bd462a7 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -91,7 +91,7 @@ template class eoSGATransform : public eoTransform }; /***************************************************************************** - * eoSDynGATransform: transforms a population using genetic operators. + * eoDynSGATransform: transforms a population using genetic operators. * It is the Dynamic version of the above eoSGATransform * i.e. the operators probabilities can be passed as an eoValueParam, * and hence can be modified from outside @@ -109,15 +109,15 @@ template class eoDynSGATransform : public eoTransform mutate(_mutate), mutationProbaHolder(_mProba), mutationProba(mutationProbaHolder) {} - /// This constructor receives references + /// This constructor receives pointers // these will usually be some eoValueParam.value() - // the ...Holder will bever be used in this object - eoDynSGATransform(eoQuadraticOp& _cross, double& _cProbaRef, - eoMonOp& _mutate, double& _mProbaRef) + // hence the ...Holder data will bever be used in this case + eoDynSGATransform(eoQuadraticOp& _cross, double* _cProbaRef, + eoMonOp& _mutate, double* _mProbaRef) : cross(_cross), - crossoverProbaHolder(0), crossoverProba(_cProbaRef), + crossoverProbaHolder(0), crossoverProba(*_cProbaRef), mutate(_mutate), - mutationProbaHolder(0), mutationProba(_mProbaRef) {} + mutationProbaHolder(0), mutationProba(*_mProbaRef) {} /** @@ -146,8 +146,11 @@ template class eoDynSGATransform : public eoTransform } }; - - private: + // accessors - mainly for EASEA + double & PCrossHandle() { return crossoverProba;} + double & PMutHandle() { return mutationProba;} + +private: // difference with eoSGATransform: the operator probabilities // they can be passed by reference or by value. // hence we need here to use a reference, and to eventually store a value diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h new file mode 100755 index 000000000..0b9989e36 --- /dev/null +++ b/eo/src/eoStochTournamentSelect.h @@ -0,0 +1,69 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochTournamentSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoStochTournamentSelect_h +#define eoStochTournamentSelect_h + +//----------------------------------------------------------------------------- + +#include +#include // accumulate +#include // eoSelectOne +#include // stochastic_tournament + +//----------------------------------------------------------------------------- +/** eoStochTournamentSelect: a selection method that selects ONE individual by + binary stochastic tournament + -MS- 24/10/99 */ +//----------------------------------------------------------------------------- + +template class eoStochTournamentSelect: public eoSelectOne +{ + public: + + /// + eoStochTournamentSelect(float _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) + { + // consistency check + if (Trate < 0.5) { + cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + Trate = 0.55; + } + } + + /** Perform the stochastic tournament */ + virtual const EOT& operator()(const eoPop& pop) + { + return stochastic_tournament(pop, Trate); + } + +private: + float Trate; +}; + +//----------------------------------------------------------------------------- + +#endif eoStochTournamentSelect_h + diff --git a/eo/src/eoDetTournament.h b/eo/src/obsolete/eoDetTournament.h similarity index 100% rename from eo/src/eoDetTournament.h rename to eo/src/obsolete/eoDetTournament.h diff --git a/eo/src/eoProportional.h b/eo/src/obsolete/eoProportional.h similarity index 100% rename from eo/src/eoProportional.h rename to eo/src/obsolete/eoProportional.h diff --git a/eo/src/eoSelectRandom.h b/eo/src/obsolete/eoSelectRandom.h similarity index 100% rename from eo/src/eoSelectRandom.h rename to eo/src/obsolete/eoSelectRandom.h diff --git a/eo/src/eoStochTournament.h b/eo/src/obsolete/eoStochTournament.h similarity index 100% rename from eo/src/eoStochTournament.h rename to eo/src/obsolete/eoStochTournament.h diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index 2806b1b8e..fef8b2474 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -103,6 +103,7 @@ cout << "Initial parents (odd)\n" << orgParents << "\n And initial offsprings (e // the replacement procedures under test eoGenerationalReplacement genReplace; eoPlusReplacement plusReplace; + eoEPReplacement epReplace(tSize); eoCommaReplacement commaReplace; eoWeakElitistReplacement weakElitistReplace(commaReplace); // the SSGA replacements @@ -129,6 +130,15 @@ cout << "Parents (originally odd)\n" << parents << "\n And offsprings (orogonall plusReplace(parents, offspring); cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + // EP (proche d'un PLUS + parents = orgParents; + offspring = orgOffspring; + + cout << "eoEPReplacement\n"; + cout << "===============\n"; + epReplace(parents, offspring); +cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + // Comma parents = orgParents; offspring = orgOffspring; diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 3f5d62a10..21a0d94db 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -235,7 +235,7 @@ int main() seqSel.addOp(mutation, 0.25); seqSel.addOp(xover, 0.75); - eoDetTournament selector(5); + eoDetTournamentSelect selector(5); eoDetTournamentInserter inserter(eval, 5); diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index e4a9802e3..55dee20b7 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -147,7 +147,7 @@ void main_function() monitor.add(stats); checkpoint.add(stats); - eoProportional select; + eoProportionalSelect select; eoEvalFuncPtr eval(binary_value); eoSGA sga(select, xover, 0.8f, bitflip, 0.1f, eval, checkpoint); diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index db7dc22cd..97b5a0f89 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -94,7 +94,7 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament select(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect select(T_SIZE); // T_SIZE in [2,POP_SIZE] // REPLACE // The simple GA evolution engine uses generational replacement diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index ff1cadd3d..f1b719a6c 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -94,7 +94,7 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament select(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect select(T_SIZE); // T_SIZE in [2,POP_SIZE] // REPLACE // eoSGA uses generational replacement by default diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index 331afbecb..0c34adae6 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -95,7 +95,7 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] // is now encapsulated in a eoSelectPerc (entage) eoSelectPerc select(selectOne);// by default rate==1 diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 43256c700..603b6a32c 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -93,7 +93,7 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(T_SIZE); + eoDetTournamentSelect selectOne(T_SIZE); // is now encapsulated in a eoSelectPerc (entage) eoSelectPerc select(selectOne);// by default rate==1 diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index ebdae5e68..5ec568828 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -184,11 +184,9 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(tSize); // tSize in [2,POPSIZE] + eoDetTournamentSelect selectOne(tSize); // tSize in [2,POPSIZE] // is now encapsulated in a eoSelectPerc (stands for Percentage) eoSelectPerc select(selectOne); - // or eoSelectPerc select(selectOne, rate); - // but by default rate==1 // REPLACE // And we now have the full slection/replacement - though with diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index 9474a5fa4..0663d8a2e 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -201,7 +201,7 @@ The actual code is in boldface and the comment in normal face.  // The robust tournament selection
      -  eoDetTournament<Indi> selectOne(T_SIZE);            // T_SIZE in [2,POP_SIZE]
      +  eoDetTournamentSelect<Indi> selectOne(T_SIZE);            // T_SIZE in [2,POP_SIZE]
       // is now encapsulated in a eoSelectPerc (entage)
       eoSelectPerc<Indi> select(selectOne);// by default rate==1
      diff --git a/eo/tutorial/html/FirstBitGA.html b/eo/tutorial/html/FirstBitGA.html index ef40176a3..e6e4368ea 100644 --- a/eo/tutorial/html/FirstBitGA.html +++ b/eo/tutorial/html/FirstBitGA.html @@ -209,7 +209,7 @@ The actual code is in boldface and the comment in normal face.  // The robust tournament selection
      -  eoDetTournament<Indi> select(T_SIZE);  // T_SIZE in [2,POP_SIZE]
      +  eoDetTournamentSelect<Indi> select(T_SIZE);  // T_SIZE in [2,POP_SIZE]
      diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index fb524dea4..793874729 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -202,7 +202,7 @@ The actual code is in boldface and the comment in normal face.  // The robust tournament selection
      -  eoDetTournament<Indi> selectOne(T_SIZE);
      +  eoDetTournamentSelect<Indi> selectOne(T_SIZE);
       // is now encapsulated in a eoSelectPerc (entage)
       eoSelectPerc<Indi> select(selectOne);// by default rate==1
      diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html index 40224cf9e..b375629fc 100644 --- a/eo/tutorial/html/FirstRealGA.html +++ b/eo/tutorial/html/FirstRealGA.html @@ -209,7 +209,7 @@ The actual code is in boldface and the comment in normal face.  // The robust tournament selection
      -  eoDetTournament<Indi> select(T_SIZE);            // T_SIZE in [2,POP_SIZE]
      +  eoDetTournamentSelect<Indi> select(T_SIZE);            // T_SIZE in [2,POP_SIZE]
      diff --git a/eo/tutorial/html/NoWay.html b/eo/tutorial/html/NoWay.html index de53a993d..0976a771f 100644 --- a/eo/tutorial/html/NoWay.html +++ b/eo/tutorial/html/NoWay.html @@ -2,15 +2,15 @@ - + Tutorial: Solutions Tutorial main page - -Algorithm-Based -page - Component-Based - Programming -hints -EO -documentation +Algorithm-Based +- Component-Based - Programming +hints -EO +documentation


      @@ -36,8 +36,9 @@ according to the corresponding instructions of the exercise
    • compile mytest.cpp by typing -make mytest at system prompt, -and you will hopefully get an executable file named mytest +make +mytest at system prompt, and you will hopefully get an +executable file named mytest (for Unix systems: if eventually someone tells me how to do that in Windows, apart that you'll probably end up with an executable file named mytest.exe...).
    @@ -46,23 +47,25 @@ apart that you'll probably end up with an executable file named What you may do later:

    All solutions to exercises are in the same sub-dir of the Tutorial directory than the example files (i.e. -Lesson1 for Lesson1, yes!). Hence you may browse through the code, eventually -modifying it, and then simply type, in the corresponding directory, -
    ... % make exerciseN -
    which will compile file exerciseN.cpp -into executable exerciseN +Lesson1 for Lesson1, yes!) and are named exerciseN.p.cpp +where N is the lesson number and p the exercise number. Hence you may browse +through the code, eventually modifying it, and then simply type, in the +corresponding directory, +
    ... % make exerciseN.p +
    which will compile file exerciseN.p.cpp +into executable exerciseN.p (for Unix systems: if eventually someone tells me how to do that in Windows, -you'll probably end up with an executable file named exerciseN.exe). +you'll probably end up with an executable file named exerciseN.p.exe).



    What you may not do:
    Complain that it does not work under Windows :-)

    Tutorial main page - -Algorithm-Based -page - Component-Based - Programming -hints - EO -documentation +Algorithm-Based +- Component-Based - Programming +hints - EO +documentation

    diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index 4061d9c03..c73bf43eb 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -310,7 +310,7 @@ of initializatio of the population - + - + diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index c73bf43eb..dc56d4917 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -63,6 +63,9 @@ the number of ones of a bitstring
     // The robust tournament selection -
     eoDetTournament<Indi> selectOne(tSize);       +
     eoDetTournamentSelect<Indi> selectOne(tSize);       // tSize in [2,POPSIZE]
     // is now encapsulated in a diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index ecd9d5ec4..cfb095f81 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -42,21 +42,163 @@ helper classes that are used within selection and replacement procedures are presented.


    Selection -
      -
      +

    The very beginning of the generation loop is the selection phase, where +some individuals from the population are chosen to become the parents, +to be later modified by the variation operators and become the offspring. +This is the first step of the artificial Darwinism, +where the fittest individuals are allowed to reproduce. +
    Conceptually, there are two distinct ways to choose the lucky ones: +one by one from the very same population (i.e. with replacement), which +means that at the extreme the same individual can be chosen every time; +or as a whole, in some sort of batch procedure. Of course, repeated selection +of one individual results in a batch selection! +

    There are hence two basic EO classes for selection: eoSelectOne +and eoSelect, with different interfaces. +
    +


    +
    eoSelectOne: The +interface +

    The abstract class for selection of a single individual from a population +is eoSelectOne, and the interface for its +operator() +is +

    +

    const EOT & operator()(const eoPop<EOT>& +_parents)

    + +

    which you could have guessed from the inheritance tree for class eoSelectOne., +as you see there that eoSelectOne derives +from class eoUF<const eoPop<EOT>&, +const EOT&>. +
    This means that it takes 1 population +(without the right to modify it - see the const +keyword in argument) and returns a const reference to an individual (again, +the const keyword ensures +that nothing will happen to the individual in the population - remember +it returns a reference). +
    +


    +
    eoSelectOne: Instances +
      +
    • +eoDetTournamentSelect uses +the (deterministic) tournament to choose one +individual. Its constructor has one parameter, the tournament size (integer +>= 2).
    • + +
    • +eoStochTournamentSelect uses +the binary stochastic tournament to choose +one individual. Its constructor has one parameter, the tournament rate +(real in [0.5,1]).
    • + +
    • eoProportionalSelect +is the original roulette wheel selection: +each parent is selected with a probability proportional to its fitness.
    • + +
    • +eoRandomSelect is the random +selection and should give bad results! At the moment, it selects one individual +uniformly, but it would be easy to use any probability distribution.
    • +
    + +
    +
    eoSelect: The +interface +

    The abstract class for batch selection of a  whole set of individuals +from a population is eoSelect, and the interface +for its +operator() is +

    +

    void operator()(const eoPop<EOT>& +_source, eoPop<EOT>& _dest)

    + +

    which you could have guessed from the inheritance tree for class eoSelect., +as you see there that eoSelect derives from +class +eoBF<const eoPop<EOT>&, eoPop<EOT>&, void>. +
    This means that it takes 2 populations, +and fills the second one with individuals from the first one without modifying +it (see the const keyword). +This raises two questions: +

      +
    • +How does it know how many individuals to select?
    • + +
    • +How to use repeated selection of one individual (see above the eoSelectOne +class)?
    • +
    + +
    +
    eoSelect: HowMany +

    There are two ways an  can derive the number of individuals it +has to select: either it is a fixed number, or it is some percentage of +the source population size (any positive real number). In both case, this +must be passed to the constructor. In most instances, however, the constructor +will accept a real number (double) and a boolean indicating whether this +real number should be used as an absolute integer or as a rate, thanks +to the eoHowMany class. +

    Note: an eoSelect +can select more individuals than there are in the original population. +It is the job of the replacement to ensure +that the population size does not grow along the generations.

    +


    eoSelectMany: Encapsulating +eoSelectOne +

    It is clear that repeated selection of a single individual is a way +to do batch selection. This is why it is possible to encapsulate an object +of class eoSelectOne into an object of class +eoSelect +using the class eoSelectMany. Class eoSelectMany +is derived from class eoSelect and takes in +its constructor an eoSelectOne (plus the number +of individuals it should select, according to the eoHowMany +paradigm). +

    Note: some procedures for selecting +a single individual require some pre-processing of the whole population +that takes place before any selection, and will be repeated identically +for every individual. The encapsulation of an  into an  allows +to call such technical processing only once through the use of method setup +of class . This method does nothing by default, but is mandatory +
    +


    +
    eoSelect: Other +instances +
      +
    • +eoDetSelect selects individuals +deterministically, +i.e. starting from the best ones down to the worse ones. If the total number +to select is less than the size of the source populations, the best individuals +are selected once. If more individuals are needed after reaching the bottom +of the population, then the selection starts again at top. It the total +number required is N times that of the source size, all individuals are +selected exactly N times.
    • +
    +No other instances of eoSelect that are not +encapsualtions of eoSelectOne procedures are +avaiable as of today (Jan. 4 2001). +


    Replacement -

    The replacement phase takes place after the birth -of all offspring through variation operators. The idea is to close -the generation loop, i.e. to end up with a population of individuals that -will be the initial population of next generation. That population will -be built upon the old parents and the new-born offspring. -In all algorithms that come up with EO, the population -size is supposed to be constant from -one generation to the next one - though nothing stops you from writing -an algorithm with varying population size. -

    Replacement: The +

    The replacement phase takes place after the birth +of all offspring through variation operators. This is the second +step of the artificial Darwinism, where the +fittest +individuals are allowed to survive. +
    It can also be viewed on the algorithmic side as closing the generation +loop, i.e. building the population that will be the initial population +of next generation. That population will be built +upon the old parents and the new-born offspring. In all algorithms +that come up with EO, the population size +is supposed to be constant from one generation +to the next one - though nothing stops you from writing an algorithm with +varying population size. +
    +


    +
    Replacement: The interface

    The abstract class for replacement procedures is the functor class eoReplacement, @@ -75,7 +217,9 @@ void>. and is free to modify both, but the resulting population should be placed in the first argument (usually called_parents) to close the loop and go to next generation. -

    Replacement: Instances +
    +


    +
    Replacement: Instances

    The other useful component of replacement procedures, eoReduce, kills some individuals from a given population. -

    eoReduce: interface +
    +


    +
    eoReduce: interface
    The abstract class for reducing procedures is the functor class eoReduce, and the interface for its operator() @@ -311,7 +470,9 @@ as you see there that eoReduce derives from int, void>
    .
    An eoReduce shoud take a population and shrink it to the required size. -

    eoReduce: instances +
    +


    +
    eoReduce: instances
    Available instances of eoReduce are
    • @@ -347,7 +508,6 @@ the population. It requires the rate of the tournament (
      eoHowMany: Choosing a number of individuals @@ -366,7 +526,9 @@ It receives a double, and a boolean indicating whether that double is to be treated as a rate or as an absolute (unisgned) interger. -

      eoHowMany: interface +
      +


      +
      eoHowMany: interface
      The class interface for its operator() is
      diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 22a09acbe..581b07f2d 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -358,27 +358,30 @@ are available!
    • You already know the tournament selection
    • -
      Syntax:  eoDetTournament<Indi> +
      Syntax:  eoDetTournamentSelect<Indi> select(T_SIZE);   // T_SIZE in [2,POP_SIZE)
    • Try the well-known roulette wheel
    • -
       Syntax:    eoProportional<Indi> +
       Syntax:    eoProportionalSelect<Indi> select;
    • Or the stochastic binary tournament
    • -
      Syntax:  eoStochTournament<Indi> -select(RATE);     // RATE in ]0.5,1] +
      Syntax:  eoStochTournamentSelect<Indi> +select(RATE);     +// RATE in ]0.5,1]
    • and of course the random selection should give bad results!
    • -
      Syntax:  eoSelectRandom<Indi> +
      Syntax:  eoRandomSelect<Indi> select;
    Note that all these classes of eoObjects are derived from the abstract class eoSelectOne. +To find out exactly how each procedure selects the individuals, read the +corresponding component-based page.


    Lessons learned:
      diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 6e0a4d341..5e7b50e96 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -69,6 +69,10 @@ object that is a sub-class of the corresponding STL vector class.
       

        +
        +
        +
        +
       

      Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object @@ -88,6 +92,8 @@ requires.

       
       
        +
        +
       

      Note: In the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness @@ -113,6 +119,10 @@ call to pop.append() function
       

        +
        +
        +
        +
       

      Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!! @@ -263,7 +273,7 @@ the population in [-2,-1] and the other half in [1,2], with and without the segment and arithmetic crossovers (and for large values of VEC_SIZE, the size of the vectors). Amazing, isn't it! Explain that result.

      Exercise -3:  replacement +3:  full selection/replacement
      You can now twiddle the number of offspring that will be generated from the parents. But of course you need to adjust the replacement to keep a constant population size. @@ -281,6 +291,14 @@ into an eoSelectPerc object. For instance, try eoSelectPerc<Indi> select(selectOne,2.0)

      to generate twice as many offspring as there are parents. +
      You can also use the other encapsulator that +takes as second argument an absolute number (e.g. if you want to generate +2 offspring whatever the population size): +
                      +eoSelectNumber<Indi> select(selectOne,2) +
      Or you can use the HowMany +paradigm and the eoSelectMany to +do either one depending on some command-line input (advanced).

    • To keep a constant population size, you can use either the eoCommaReplacement @@ -297,21 +315,14 @@ or Strategies.
    • Question: what do you -get if you have use a rate of 1/POP_SIZE for the selection, and an eoPlusReplacement +get if you select 1 offspring only, and an eoPlusReplacement strategy? Yes, you get almost the replace_worst Steady-State GA, though -rather inefficient, as you sort the population at every generation, which -could be avoided - and will be in a later lesson).
    • +rather inefficient, as you sort the population at every generation.
    • -Homework: Write the -eoCommaPlusReplacement -that would start by taking the best of the offspring, and if some are still -missing to keep the population size constant, take the best of the parents. -Write the eoConservativeReplacement -that starts by taking a percentage of the parents (the best ones) and then -adds the best from the offspring. In both cases, send -use the code as we haven't done that yet (and -hence there is no solution available at the moment - Nov. 29 :-)
    • +Hint: there are a few +Steady-State replacement strategies already there in EO. See the Replacement +page.
    Remember: all solutions are in the same sub-directory of the Tutorial dir than the examples (i.e. diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index b69671cc5..ef4c3f87c 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -12,8 +12,8 @@ Main page - Algorithm-Based - Component-Based - Hints -- EO -documentation +- EO +documentation

    @@ -102,14 +102,10 @@ operators and the evolution engine&nbs sections are similar to the ones in Lesson2
  • -The parameter section  -is completely different from the previous one. All variables corresponding -to program parameters -are now declared -in the main_function -(as before), but their values are set in a new -function, called read_param. -See the eoParser description for more details.
  • +The parameter +section  is completely different from the previous one. All variables +corresponding to program parameters +are now read at run-time using an object of class eoParser.
  • The stopping criterion @@ -145,7 +141,9 @@ See the parameter section of the Component-Based tutorial, or wait until The eoParser class, whose only purpose is the input of parameters.
  • -Modifying parameter values at run-time: + +
    eoParser: +Modifying parameter values at run-time:
    Using an eoParser object, the parameter values are read, by order of priority
      @@ -173,7 +171,7 @@ and optionally by a short (1 character) keyword. -
                        +
                     --longKeyword=value     or     -c=value    @@ -184,12 +182,12 @@ so, after compiling the executable for Lesson 3 (ma lesson3 at system prompt in Unix), you can try to type in -
                         +
                      SecondBitEA
      and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). But you can now type in -
                         +
                      SecondBitEA --vecSize=100
      and see the output of the optimization of OneMax on 100-bit bitstrings. @@ -197,7 +195,7 @@ But you can now type in
    1. Take a look at all available parameters by typing in
    2. -
                         +
                      SecondBitEA --help
      or by going into the code: all parameter inputs have been grouped in @@ -210,7 +208,7 @@ it contains the list of all actual parameters used, and can directly be used as parameter input file: change the file name (e.g. to SecondBitEA.param), edit it, change whichever parameter you want, and type in -
                           +
                        SecondBitEA @SecondBitEA.param
      and you will see all values that you defined into the file taken into account. @@ -220,9 +218,12 @@ The priority remains to the c so you can still override the values in the parameter file by giving a new value directly on the command-line. -Programming parameter input: -
      the code of SeconBitEA provides examples of parameters reading. Lets -take the example of the random number generator seed.  + +
      eoParser: +Programming parameter input: +
      The code of SeconBitEA provides examples of parameters reading. Lets +take the example of the
      random number +generator seed.  Of course, you first need to declare an eoParser object (it needs the standard argc and argv in its constructor).
        @@ -240,7 +241,11 @@ that will be used to make the output of the parser look clean and ordered.
      • Finally, you need to assign the -value to the variable seed
      • +value to the variable seed. +Note that the value() method +of eoParam returns a reference, so you can eventually modify its value +somewhere else later (though of course this is not any useful for variable +seed!).

      @@ -296,16 +301,16 @@ an object whose
      operator()
      -
      eoCheckpoint: -Stopping +
      eoCheckpoint: +Stopping
      The eoContinue part of an eoCheckpoint is a single object, passed to the constructor. If you want more that one stopping criterion, use an eoCombinedContinue object as described in Lesson2.
      -
      -
      eoCheckpoint: Computing +
      +
      eoCheckpoint: Computing statistics
      Statistics are computed using eoStat objects, i.e. functor objects whose operator() @@ -322,9 +327,10 @@ objects. And this allows eoStat< to be used within
      eoMonitor object, and hence displayed to the user! -

      Available statistics: Some widely -used statistics are already available (and of course you can build you -own!). +

      Statistics: Available +instances +
      Some widely used statistics are already available (and of course you +can build you own!).

      • eoBestFitnessStat returns @@ -344,28 +350,33 @@ diversity in the population: assuming that there is a distance function defined among individuals, it returns the average inter-individuals distance. See also Exercise 2.
      -Programming: To compute some statistics -within your algorithm, simply declare +Statistics: Adding +to the checkpoint +
      To compute more statistics when your algorithm is running, simply declare the corresponding eoStat objects, and add them to the eoCheckpoint you -use in the algorithm. +use in the algorithm. But it hardly makes any sense if you don't monitor +those statistics (i.e. either displaying them on the screen, or storing +them into a file): see next section!

      Note: actually, there are 2 distinct classes that compute and give access to statistics: eoStatand eoSortedStat. As its name indicate, the latter is used whenever computing the statistics require a sorted population: not only this avoids to sort the population many times, but also it avoids changing the order of the population at -all as eoSortedStat work on a temporary vector of fitnesses . But as +all as eoSortedStat objects +work on a temporary vector of fitnesses . But as far as their usage is concerned, its makes no difference.
      -


      -
      eoCheckpoint: Displaying +
      +
      eoCheckpoint: Monitoring eoParameters
      The eoMonitor -objects are used to display a set of eoValueParam +objects are used to display or store to a file a set of eoValueParam objects. -

      Available monitors: A few monitors -are available in the EO distribution: +

      Monitors: Available +instances +
      A few monitors are available in the EO distribution:

      • eoStdoutMonitor displays its @@ -394,15 +405,16 @@ at the end of the run, while it is otherwise kept (though it will be overwritten by next call to the same program).
      -


      Programming: To display something -while the algorithm is running, you need to declare +


      Monitors: Adding +to the checkpoint +
      To display something while the algorithm is running, you need to declare an eoMonitor object, add some objects (that must be eoValueParam objects) to that monitor, and of course add the monitor to the eoCheckpoint you use in the algorithm.
      -


      +

      eoCheckpoint: Updating things
      The last type of objects that  eoCheckpoint @@ -411,8 +423,8 @@ objects. You should simply encapsulate in an operator() method does not receive any argument. -

      Available monitors: A few updaters -are available in the EO distribution: +

      Updater: Available +instances: A few updaters are available in the EO distribution:

      • eoIncrementor A simple updater @@ -430,7 +442,8 @@ be used to save some existing Programming: +Updater: Adding to +the checkpoint
        A very simple example of using an eoUpdater is given in the code for SecondBitEA: First declare an eoValueParam object, then @@ -468,8 +481,8 @@ otherwise the standard deviations won't make any sense here.
      • Then run
      • -
                  -exercise1 --vecSize=1000 --maxGen=1000 +
                  +exercise1 --vecSize=1000 --maxGen=1000
        to get a chance to see something happening before the program ends!
      @@ -479,9 +492,9 @@ stat computation and test it. Thanks to send us the code!



      Exercise 3: -
      Write the code for an eoGnuplot1DwithErrorbarsMonitor -that would take into account the standard deviations and display them as -error-bars. +
      Write the code for an eoGnuplotSecondStatMonitor +that would display the eoSecondMomentStat +(i.e. take into account the standard deviations and display them as error-bars.
      Again, send us the code afterwards, thanks :-)

      @@ -489,32 +502,30 @@ error-bars.
      • Value of program parameters can be set at run-time -using the eoParser -class.
      • +using the eoParser class.
      • Snapshots of the algorithms can easily be saved (and restored) -thanks to the eoState -class.
      • +thanks to the eoState class.
      • -The eoCheckpoint -mechanism let you do things every generation +The eoCheckpoint mechanism +let you do things every generation without modifying existing algorithms, by simply writing the necessary -code and encapsulating it into an object that eoCheckpoint +code and encapsulating it into an object that eoCheckpoint is aware of, that are at the moment the following:
      • computing statistics, displaying parameters (e.g. statistics),  saving the -(eo)State +(eo)State of the program.
      In next lesson you will find out that many adaptive techniques (the state-of-the-art in Evolutionary Computation) can easily -be programmed through the eoUpdater +be programmed through the eoUpdater construct.

      Lesson 2 - @@ -523,14 +534,14 @@ construct. Main page - Algorithm-Based - Component-Based - Hints -- EO -documentation +- EO +documentation

      Marc Schoenauer

      Last -modified: Mon Nov 27 8:49:12 CET 2000 +modified: None of your business! - + diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index a4448d19d..9ae7e34a8 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -26,9 +26,9 @@ of "lessons" for you.
    3. Lesson 1 - a gentle introduction to the EO way: your first steps into EO representations -using a simple generational GA. Please, spend -the necessary time on that one, since all basic constructs presented -there are used throughout EO.
    4. +using a simple generational GA. Please, spend +the necessary time on that one, since all basic constructs +presented there are used throughout EO.
    5. Lesson 2 - encapsulate, @@ -47,32 +47,40 @@ populations, restart stopped runs, ...).
    6. -
        -

        -

      Current version (Nov. 29, 2000) stops here, but here are the plans (subjected -to many changes, of course!) +


      Current version (Jan. 5, 2001) stops here, but ... +

      From there on, you don't need to follow the lesson order any more: you +can go directly to any lesson and experiment. Of course, you will need +to bring together the different pieces to write exactly what you want - +but only because we had no idea of what you exactly want :-)
       

    7. -Lesson 4 - More about checkpointing: write your first adaptive -mechanism, and find out how easy it is to update -and monitor dynamic -parameters
    8. +Lesson 4 - More about checkpointing: +write your first adaptive mechanism, +and find out how easy it is to update +and monitor dynamic +parameters
    9. -Lesson 5 - more general operators: e.g. binary, n-ary, or even specific -mate selection (your brain and my beauty)!
    10. +Lesson 5 - More general operators: +e.g. binary, n-ary, or even specific mate selection (your brain and my +beauty)!
    11. -Lesson 6 - why not go parallel? From the simple asynchronous SSGA to the -more sophisticated island model (no totally distributed population yet).
    12. +Lesson 6 - Why not go parallel? From +the simple asynchronous SSGA to the more sophisticated island model (no +totally distributed population yet).
    13. -Lesson 7 - ...
    14. +Lesson 7 - Use your own representation. +You need only to write the base individual class, the initilization class +and the variation operators. EO provides many helps: The eoExternal +paradigm let you encapsulate into EO classes existing code. And the eoFixedLength +and eoVariableLength super classes +allow quick definition of new genotypes that handle identical Atoms. -Of course, in each lesson, you have links to the Component-Based of the -corresponding component of an EA you are modifying. -
      ( ... Well, to tell you the truth, as of today, November 28, this is -not true :-) +Of course, in each lesson, you have links to the corresponding Component-Based +page. ( ... Well, to tell you the truth, as of today, Jan. 5, 2001, this +is not exactly true :-)


      Tutorial main page - Algorithm-Based diff --git a/eo/tutorial/html/index.html b/eo/tutorial/html/index.html new file mode 100644 index 000000000..00734f654 --- /dev/null +++ b/eo/tutorial/html/index.html @@ -0,0 +1,199 @@ + + + + + + Tutorial EO + + +Algorithm-Based - Component-Based +- Programming hints - EO +documentation +
      +
      Welcome to EO, the Evolving Objects library, +and to +  +

      +EO Tutorial

      + +
      Version 0.92 - Jan. 5 2001
      + +

      The short term idea of this tutorial is to help you build +your own Evolutionary Algorithms using EO - while the long term +idea is that you will be able to contribute to EO, and ultimately write +our +EAs :-) +

      + +
      About this tutorial

      +This tutorial can be used in 2 different ways: algorithm-based and component-based. +
        +
      • +Algorithm-Based means you start from a very +simple, ready-to-run algorithm, and gradually modify it, making +it both more powerful and more complex.
      • + +
      • +Component-Based means you start by examining +the +components of an EA one by one, down to +the level of complexity you feel comfortable with, and then build the whole +algorithm using those components you need (or the one you are mastering). +Such approach might be viewed as going through a simplified user guide, +too.
      • +
      +However, it is strongly recommended +that you take some time on the first lesson of the Algorithm-Based approach +to get familiar with the basic concepts that are used throughout EO. Anyway, +as of today, December 19, the Component-Based is only very sparsely written +:-) +

      +


      Links and Related +documents +
        +
      • +There are of course a few (very few) programming +hints that you should know.
      • + +
      • +THe EO documentation - automatically +generated from the comments in the code - is very helpful to get an idea +of the inheritance diagrams of EO classes, +and to quickly reach some specific part of the code.
      • + +
        The top page of each class documentation is for instance the inheritance +diagram of the class, and you'll learn a lot by simply looking at it. +
      • +And, last but not least, we assume you know approximately that an Evolutionary +Algorithm looks like this, but otherwise you can try this very +brief introduction (not written yet, Jan. 2001, sorry).
      • +
      + +


      +


      Colors and navigation: +

      You will see this diagram in quite many places, as for instance at the +top of all examples - usually it will be clickable and will help you navigate +among the different parts of an EO program. See the brief +introduction to Evolutionary Computation for a detailed explanation. +

      +

      + +

      But in the text itself, colors are important, +as they will be used throughout this tutorial to clearly mark which part +of the algorithm we are discussing. So please keep in mind that, whereas +orange +is for emphasis, +

        +
      • +Yellowish is for representation, +i.e. the choice of the genotype
      • + +
      • +Magenta is for the stochastic +operators that are representation-dependent, +i.e. initialisation and variation operators +(crossover, mutation +and the like).
      • + +
      • +Green is for the implementation of Darwinism, +i.e. the way the individuals are selected +for reproduction and survive.
      • + +
      • +Red is for evaluation, i.e. the computation +of the fitness of all individuals
      • + +
      • +Blue is for interactions of the user and the +program, as for instance choice of stopping criterion, +on-line display of nice statistics or initial +choice +of all program parameters.
      • + +
      • +Brown is for everything that is NOT part of +any of the above, i.e. random number generator, or basic C++/STL syntax +.
      • + +
      • +Note that pink will be used to describe the +syntax of compile orders (i.e. at the operating system level, see e.g. +below).
      • + +
      • +Last, but not least, all +links into EO documentation will use the Helvetica typeface, like this +line you are now reading.
      • +
      + +
      This tutorial is +not +
        +
      • +A course on Evolutionary Computation. You can find such things on the Internet, +maybe you can start here.
      • + +
      • +An interface that would allow you to build your Evolutionary Programs by +a few clicks; such a thing does exist, is called EASEA, +and is complementary to this tutorial as it helps the user to build some +simple EO programs from simple description. But there are things that EASEA +cannot do, and you will have to do it yourself and will need to increase +your knowledge about EO for that - hence this tutorial.
      • + +
      • +A coffee machine - though you might want to spend some time here when you're +tired of everything else, to improve your knowledge of EO slowly and gradually +rather than when you have something urgent to code :-)
      • +
      + +
      Before +you start +

      You should of course have downloaded and installed the whole EO +library (how did you get this file if not???). +
      So we'll assume that you are now in the Tutorial directory, and that +your prompt looks something like +

      (myname@myhost) EOdir/Tutorial % +

      so you should now type in +

      make lesson1 +

      and see something like +

      (myname@myhost) +EOdir/Tutorial % make lesson1 +
      c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstBitGA.cpp +
      c++ -Wall -g -o FirstBitGA FirstBitGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +
      c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstRealGA.cpp +
      c++ -Wall -g -o FirstRealGA FirstRealGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +

      and two now executable files should have appeared in the subdirectory +Lesson1, namely FirstBitGA +and FirstRealGA (see First +lesson to know more about these two ready-to-run programs). If this +doesn't work, please go back to the main EO directory and run the installation +program. +

      You should also test that you can access the EO documentation in the +menu line below: you might not need to go there immediately, but just in +case you make rapid progress ... This menu bar should be on all pages of +this tutorial, allowing you to navigate easily. +

      Last, but not least: EO is improving only  from the good will of +contributors. This is also true for this tutorial: If you find anything +that you think could be improved, you are welcome to e-mail +me. +

      +

      Enjoy! +


      Algorithm-Based +- Component-Based - Programming +hints - EO +documentation
      + +
      +
      +Marc Schoenauer
      + +
      Last +modified: Fri Nov 28 2000  + + From 67ae5f5a6f6bfe44c63d91d3a9b546c9716962e4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 05:44:35 +0000 Subject: [PATCH 0394/2134] eoHowMany is now included in utils dir --- eo/src/eoDetSelect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index 130f7dba7..e13ea30dd 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -30,7 +30,7 @@ //----------------------------------------------------------------------------- #include -#include +#include #include //----------------------------------------------------------------------------- From b1fa5076e2e96560b488b76dec61b0368846d88a Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 05:48:16 +0000 Subject: [PATCH 0395/2134] Changed the names of the exercise files to exerciseN.p - N lesson nb, p exercise nb --- eo/tutorial/Lesson1/{exercise3.cpp => exercise1.3.cpp} | 8 ++++---- eo/tutorial/Lesson2/{exercise3.cpp => exercise2.3.cpp} | 9 ++++++--- eo/tutorial/Lesson3/{exercise1.cpp => exercise3.1.cpp} | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) rename eo/tutorial/Lesson1/{exercise3.cpp => exercise1.3.cpp} (95%) rename eo/tutorial/Lesson2/{exercise3.cpp => exercise2.3.cpp} (94%) rename eo/tutorial/Lesson3/{exercise1.cpp => exercise3.1.cpp} (99%) diff --git a/eo/tutorial/Lesson1/exercise3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp similarity index 95% rename from eo/tutorial/Lesson1/exercise3.cpp rename to eo/tutorial/Lesson1/exercise1.3.cpp index 64ca5df01..c0c248c80 100644 --- a/eo/tutorial/Lesson1/exercise3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -91,18 +91,18 @@ void main_function(int argc, char **argv) // comment out the eoDetTournament lines // The well-known roulette - // eoProportional select; + // eoProportionalSelect select; // could also use stochastic binary tournament selection // // const double RATE = 0.75; - // eoStochTournament select(RATE); // RATE in ]0.5,1] + // eoStochTournamentSelect select(RATE); // RATE in ]0.5,1] // The robust tournament selection const unsigned int T_SIZE = 3; // size for tournament selection - eoDetTournament select(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect select(T_SIZE); // T_SIZE in [2,POP_SIZE] // and of course the random selection - // eoSelectRandom select; + // eoRandomSelect select; // The simple GA evolution engine uses generational replacement // so no replacement procedure is needed diff --git a/eo/tutorial/Lesson2/exercise3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp similarity index 94% rename from eo/tutorial/Lesson2/exercise3.cpp rename to eo/tutorial/Lesson2/exercise2.3.cpp index daff8e639..489956985 100644 --- a/eo/tutorial/Lesson2/exercise3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -95,10 +95,13 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] // solution solution solution solution solution solution solution - // modify the rate in the constructor - eoSelectMany select(selectOne,2, eo_is_an_integer);// rate is second arg. + // modify the nb offspring / rate in the constructor. 2 ways: + // second arg treated as integer + eoSelectMany select(selectOne,2, eo_is_an_integer); + // second arg treated as a rate (default behavior) + // eoSelectMany select(selectOne,0.1); // REPLACE // solution solution solution solution solution solution solution diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp similarity index 99% rename from eo/tutorial/Lesson3/exercise1.cpp rename to eo/tutorial/Lesson3/exercise3.1.cpp index a01226ca9..66532bb96 100644 --- a/eo/tutorial/Lesson3/exercise1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -186,7 +186,7 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(tSize); // tSize in [2,POPSIZE] + eoDetTournamentSelect selectOne(tSize); // tSize in [2,POPSIZE] // is now encapsulated in a eoSelectPerc (entage) eoSelectPerc select(selectOne);// by default rate==1 From b2636604a286c4245f0dfdddbd8763863a6f7b31 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 06:23:54 +0000 Subject: [PATCH 0396/2134] Updated Makefile.am to account for the change of names in selectors --- eo/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 0365acb7a..9ca97b44e 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,5 +11,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetTournament.h eoDetTournamentInserter.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportional.h eoProportionalGOpSel.h eoProportionalOpSel.h eoReduce.h eoReplacement.h eoSGA.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectOne.h eoSelectPerc.h eoSelectRandom.h eoSequentialGOpSel.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournament.h eoStochTournamentInserter.h eoTransform.h eoVariableLength.h eoWrappedOps.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetTournamentSelect.h eoDetTournamentInserter.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalSelect.h eoProportionalGOpSel.h eoProportionalOpSel.h eoRandomSelect.h eoReduce.h eoReplacement.h eoSGA.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectOne.h eoSelectPerc.h eoSequentialGOpSel.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournamentSelect.h eoStochTournamentInserter.h eoTransform.h eoVariableLength.h eoWrappedOps.h From 8e4513d8804b296fec394c67b9fd85adf9e79929 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 06:24:53 +0000 Subject: [PATCH 0397/2134] Removed doc from the SUBDIRS as most people don't have doxygen installed. Now you need to type in "make doc" to generate the doc --- eo/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 66603e9d1..46c882561 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win doc tutorial app +SUBDIRS = src test win tutorial app #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user @@ -35,4 +35,4 @@ all: clean: for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done -############################################################################### \ No newline at end of file +############################################################################### From 1beb08c39d8debdcbc4e5df4ca2e9da56a64c73b Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 06:25:26 +0000 Subject: [PATCH 0398/2134] Added a message about generating the documentation if you have doxygen --- eo/autogen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/autogen.sh b/eo/autogen.sh index 31f1641b7..1abf328eb 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -51,3 +51,4 @@ done echo echo "Now type 'make' to compile $PROG." +echo "And if you have Doxygen installed, type 'make doc' to generate EO documentation." From 8c82c8aa566b45bd02980c5e097fdae3405abbf4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 06:55:16 +0000 Subject: [PATCH 0399/2134] Removed Lesson4 from Makefile - it is not there yet, and generates an error --- eo/tutorial/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index d43f74950..fcdd0e0cb 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 +SUBDIRS = Lesson1 Lesson2 Lesson3 lesson1 : cd Lesson1; make @@ -9,9 +9,6 @@ lesson2 : lesson3 : cd Lesson3; make -lesson4 : - cd Lesson4; make - all: for i in $(SUBDIRS); do pushd $$i && $(MAKE); popd; done From 222f533a9efc02eef2b1758d749710744b7f42e8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 07:10:25 +0000 Subject: [PATCH 0400/2134] Trying to make the installation lighter, but the doc and the src would not compile, with make doc or make src ... --- eo/Makefile.am | 7 ++++--- eo/autogen.sh | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 46c882561..28e429f58 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -14,14 +14,15 @@ EXTRA_DIST=LICENSE ############################################################################### -lib: +lib: src/libeo.a src/utils/libeoutils.a pushd src; $(MAKE) all; popd test: pushd test; $(MAKE) all; popd -doc: - pushd doc; $(MAKE) doc; popd +# so that make doc always compiles the doc ... +doc: doc/eo.cfg + pushd doc; $(MAKE) doc; touch doc/eo.cfg; popd tutorial: pushd tutorial; $(MAKE) all; popd diff --git a/eo/autogen.sh b/eo/autogen.sh index 1abf328eb..58ad1681c 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -51,4 +51,9 @@ done echo echo "Now type 'make' to compile $PROG." -echo "And if you have Doxygen installed, type 'make doc' to generate EO documentation." +echo "And if you have Doxygen installed, type 'make doc' to generate $PROG documentation." +echo +echo "WARNING: Compiling all test programs can take some time." +echo "But you don't have to: you can simply type 'make src'" +echo "and then go in your application dir (or in the tutorial dir)" +echo "and there type 'make'" From 39521b2b687fbffa608e1c9c4db9e82ccb1ddecc Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 07:20:45 +0000 Subject: [PATCH 0401/2134] Correcting my previous errors ... --- eo/Makefile.am | 4 ++-- eo/autogen.sh | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 28e429f58..bd90204d7 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -14,7 +14,7 @@ EXTRA_DIST=LICENSE ############################################################################### -lib: src/libeo.a src/utils/libeoutils.a +lib: pushd src; $(MAKE) all; popd test: @@ -22,7 +22,7 @@ test: # so that make doc always compiles the doc ... doc: doc/eo.cfg - pushd doc; $(MAKE) doc; touch doc/eo.cfg; popd + pushd doc; $(MAKE) doc; touch eo.cfg; popd tutorial: pushd tutorial; $(MAKE) all; popd diff --git a/eo/autogen.sh b/eo/autogen.sh index 58ad1681c..6c0e11529 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -49,11 +49,15 @@ done ./configure "$@" +# we want doc to be recompiled - and it keeps saying it's up to date!!! +touch doc/eo.cfg + echo echo "Now type 'make' to compile $PROG." echo "And if you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo echo "WARNING: Compiling all test programs can take some time." -echo "But you don't have to: you can simply type 'make src'" +echo "But you don't have to: you can simply type" +echo " 'make lib'" echo "and then go in your application dir (or in the tutorial dir)" echo "and there type 'make'" From 63628141759544e2d185b58d5282415f0a7ac9a4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 07:30:34 +0000 Subject: [PATCH 0402/2134] Updating installation ... --- eo/README | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/eo/README b/eo/README index 9336aa12d..f6e8d525d 100644 --- a/eo/README +++ b/eo/README @@ -11,7 +11,7 @@ http://eodev.sourceforge.net/ In case of any problem, please e-mail us at - +eodev@egroups.com ================================================================== BUILDING EO @@ -30,6 +30,18 @@ The basic installatio procedure goes the following: and that's it. You should probably go to the tutorial and start learning about EO features and programming. +WARNING: Compiling all test programs can take some time. + But you don't have to: + +- you can simply type + + make lib + +and then go in your application (or in the tutorial) dir and run make + + cd tutorial + make + In case of problems, you can read the INSTALL file - but remember this is a standard installation file from GNU and that it contains nothing specific about EO. @@ -50,10 +62,8 @@ structure: | | | +- es real-valued-genotypes source files | | - | | | +- gp Genetic Programming source files | | - | | | +- obsolete files from old versions - for upward compatibility | | From 82743acd3a49a17e3759441627fb32367f7431b0 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 08:17:11 +0000 Subject: [PATCH 0403/2134] Put the sourceforge name for the mailing list --- eo/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/README b/eo/README index f6e8d525d..4b52e96b0 100644 --- a/eo/README +++ b/eo/README @@ -11,7 +11,7 @@ http://eodev.sourceforge.net/ In case of any problem, please e-mail us at -eodev@egroups.com +eodev-main@lists.sourceforge.net ================================================================== BUILDING EO From f876356d37554853011774e4cd2e9cc4bc85fada Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 08:50:01 +0000 Subject: [PATCH 0404/2134] I'm not sure about whether the sourceforge list is equivalent to the onelist list, so I finally ut both in README! --- eo/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/README b/eo/README index 4b52e96b0..af19a1918 100644 --- a/eo/README +++ b/eo/README @@ -11,7 +11,7 @@ http://eodev.sourceforge.net/ In case of any problem, please e-mail us at -eodev-main@lists.sourceforge.net +eodev@egroups.com, eodev-main@lists.sourceforge.net ================================================================== BUILDING EO From c34e94b0d041f1deb86bfd00473f3a08e4b8a688 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Jan 2001 14:42:48 +0000 Subject: [PATCH 0405/2134] Removed a forgotten comment :-) --- eo/src/eoDetSelect.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index e13ea30dd..b92150f83 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- eoDetSelect.h - (c) Merc Schoenauer, Maarten Keijzer, GeNeura Team, 2000 + (c) Marc Schoenauer, Maarten Keijzer, GeNeura Team, 2000 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -65,7 +65,6 @@ class eoDetSelect : public eoSelect { for (unsigned i=0; i // the last ones if (remain) { - cout << "On copie les " << remain << " derniers\n"; copy(_source.begin(), _source.begin()+remain, it); } } From 4b83dbd0f48842527f99e500223d73da8d4c3504 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Jan 2001 09:52:15 +0000 Subject: [PATCH 0406/2134] Added the descrition of evolution engines in eoEngine and links to SGAI STL Web site in eoTutorial and eoProgramming --- eo/tutorial/html/eoEngine.html | 91 ++++++++++++++++++++++++----- eo/tutorial/html/eoProgramming.html | 25 ++++++-- eo/tutorial/html/eoTutorial.html | 11 +++- 3 files changed, 104 insertions(+), 23 deletions(-) diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index cfb095f81..b939046b8 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -232,17 +232,15 @@ that offspring and parents are of the same size (but does not check!).
    15. eoMergeReduce This is one the basic types of replacement in EO. It has two major steps, -merging both populations of parents and offspring, -and reducing this big population to the right -size. It contains +merging +both populations of parents and offspring, and reducing +this big population to the right size. It contains two objects of respective types eoMerge and eoReduce and you can probably guess what each of them actually does :-)
    16. -
        -

        -

      Available instances of eoMergeReduce replacement -include +


      Available instances of eoMergeReduce +replacement include



      Replacement: Adding @@ -340,74 +358,71 @@ the number of individuals in the initial population.
      • Generational Genetic Algorihtm: -popularized by Holland (75) and Goldberg (89), it uses 
        -
        Number of offspring:  -P
        -
        Selection: Proportional +popularized by Holland (75) and Goldberg (89), it uses
      • + +
        Number of offspring:  +P +
        Selection: Proportional (the historical roulette wheel) when maximizing a positive scalar fitness, ranking or -tournament (stochatic or deterministic) in all cases.
        -
        Replacement: -Generational.
        -
        Remark: You could +tournament (stochatic or deterministic) in all cases. +
        Replacement: Generational. +
        Remark: You could use also the Comma replacement, with exactly the same result as there are as many offspring as we need indiviudals in the next population. And using the eoSSGAWorseReplacement would also give the same result, but would be -very inefficient!
        -You can also add weak elitism to preserve the -best individual.
        - +very inefficient!
        +
        You can also add weak +elitism to preserve the best individual.
      • Steady-State Genetic Algorithm: -widely used in GA/GP community
        -
        Number of offspring:  -small (historically, 1)
        -
        Selection: tournament -(you can use ranking or proportional, but it will be rather inefficient).
        -
        Replacement: -An eoSSGAxxxReplacement. 
        -
        Remark: You can -also use the eoPlusReplacement, but you divert from the original SSGA
      • +widely used in GA/GP community +
        Number of offspring:  +small (historically, 1) +
        Selection: tournament +(you can use ranking or proportional, but it will be rather inefficient). +
        Replacement: An +eoSSGAxxxReplacement. +
        Remark: You can +also use the eoPlusReplacement, but you divert from the original SSGA
      • (MU+Lambda)-Evolution Strategy: -The elitist ES strategy (Rechenberg 71 and Schwefel 81)
        -
        Number of offspring:  -Any
        -
        Selection: eoDetSelect -(batch deterministic).
        -
        Replacement: -eoPlusReplacement
        -
        Remark: You could -also use eoEPReplacement, to smoothen the selective pressure during replacement, -thus getting close to EP evolution engine
      • +The elitist ES strategy (Rechenberg 71 and Schwefel 81) +
        Number of offspring:  +Any +
        Selection: eoDetSelect +(batch deterministic). +
        Replacement: eoPlusReplacement +
        Remark: You could +also use eoEPReplacement, to smoothen the selective pressure during replacement, +thus getting close to EP evolution engine
      • (MU,Lambda)-Evolution Strategy: -The non-elitist ES strategy
        -
        Number of offspring:  -> P
        -
        Selection: eoDetSelect -(batch deterministic).
        -
        Replacement: -eoCommaReplacement
        -
        Remark: You can -also add weak elitism to preserve the best individual -- though you'd probably use the plus strategy if you want (strong) elitism.
      • +The non-elitist ES strategy +
        Number of offspring:  +> P +
        Selection: eoDetSelect +(batch deterministic). +
        Replacement: eoCommaReplacement +
        Remark: You can +also add weak elitism to preserve the best individual +- though you'd probably use the plus strategy if you want (strong) elitism.
      • Evolutionary Programming: -The historical method of L. Fogel (65)
        -
        Number of offspring:  -P
        -
        Selection: eoDetSelect -(batch deterministic). Every individual reproduces exactly once.
        -
        Replacement: -eoEPReplacement, though one historical replacement was the determnistic -replacement - i.e. in EO the eoPlusReplacement).
        -
        Remark: Close -to an (P+P)-ES
      • +The historical method of L. Fogel (65) +
        Number of offspring:  +P +
        Selection: eoDetSelect +(batch deterministic). Every individual reproduces exactly once. +
        Replacement: eoEPReplacement, +though one historical replacement was the determnistic replacement - i.e. +in EO the eoPlusReplacement). +
        Remark: Close to +an (P+P)-ES
      • You name it :-): you can of course choose whatever combination you like - respecting a few @@ -613,6 +628,32 @@ methods.

        Survive and Die +
        This class is highly politically incorrect: it implements strong elitism +and eugenism :-) +
        It starts by killing the worse individuals from the source argument, +then appends the best ones to the destination argument and removes them +from the source argument. It is used in eoSurviveAndDieReplacement, +where the same dest is used successively for the parents and the offspring. +

        eoSurviveAndDie: interface +
        The class interface for its operator() +is +

        +

        void operator()(eoPop<EOT>& _source, +eoPop<EOT>& _dest)

        + +

        which you could have guessed from the inheritance tree for class eoSurviveAndDie, +as you see there that eoSurviveAndDie +derives from class eoBF<eoPop<EOT>&, +eoPop<EOT>&, void>. +

        Its constructor takes 3 argumenrts: +

        +

        eoHowMany(double _survive, double _die, +bool _interpret_as_rate = true)

        + +

        to indicate how many (or what proportion, according to _interpret_as_rate) +of the source should be copied to the dest population, and how many (or +what proportion, according to _interpret_as_rate)  +should be erased from the source.


        Local: Introduction  - Selection - Replacement @@ -630,6 +671,6 @@ documentation
        Marc Schoenauer
        Last -modified: Tue. Dec. 19 2000  +modified: Tue. Jan. 9 2001  From 4b2bb7f5641799966bb1ba92491ff2d83264f4f1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 11 Jan 2001 10:48:31 +0000 Subject: [PATCH 0410/2134] GOing to the generic operators: some additions (eoGeneric*) and some modifications in eoFixedLength and eoVariableLength. --- eo/src/eoFixedLength.h | 12 +- eo/src/eoGenericBinOp.h | 75 ++++++++ eo/src/eoGenericMonOp.h | 75 ++++++++ eo/src/eoGenericQuadOp.h | 83 ++++++++ eo/src/eoOp.h | 24 +++ eo/src/eoPop.h | 17 +- eo/src/eoVariableLength.h | 33 +++- eo/src/eoVariableLengthCrossover.h | 294 +++++++++++++++++++++++++++++ eo/src/eoVariableLengthMutation.h | 190 +++++++++++++++++++ 9 files changed, 788 insertions(+), 15 deletions(-) create mode 100644 eo/src/eoGenericBinOp.h create mode 100644 eo/src/eoGenericMonOp.h create mode 100644 eo/src/eoGenericQuadOp.h create mode 100644 eo/src/eoVariableLengthCrossover.h create mode 100644 eo/src/eoVariableLengthMutation.h diff --git a/eo/src/eoFixedLength.h b/eo/src/eoFixedLength.h index a7355e5b3..9b65dc6e0 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoFixedLength.h @@ -46,7 +46,17 @@ class eoFixedLength : public EO, public std::vector eoFixedLength(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) {} - /// to avoid conflicts between EO::operator< and vector::operator< + // we can't have a Ctor from a vector, it would create ambiguity + // with the copy Ctor + void value(std::vector _v) + { + if (_v.size() != size()) + throw runtime_error("Wrong size in vector assignation in eoFixedLength"); + copy(_v.begin(), _v.end(), begin()); + invalidate(); + } + + /// to avoid conflicts between EO::operator< and vector::operator< bool operator<(const eoFixedLength& _eo) const { return EO::operator<(_eo); diff --git a/eo/src/eoGenericBinOp.h b/eo/src/eoGenericBinOp.h new file mode 100644 index 000000000..dbf909f83 --- /dev/null +++ b/eo/src/eoGenericBinOp.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenericBinOp.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenericBinOp_h +#define _eoGenericBinOp_h + +#include + +/** Contains base classes for generic binary operators for eoFixedLength + and eoVariableLength (They also derive from the eoOp) as well as + the corresponding converters to actual Ops. +*/ + +/** eoGenericBinOp is the generic binary operator: +it takes two arguments, modifies the first one, and returns a boolean +indicating if the argument has actually been modified +*/ + +template +class eoGenericBinOp: public eoOp, public eoBF +{ +public: + /// Ctor + eoGenericBinOp() + : eoOp( eoOp::binary ) {}; + virtual string className() const {return "eoGenericBinOp";}; +}; + +/** Converter from eoGenericBinOp to eoBinOp + the only thinig to do is to transform the boolean into invalidation +*/ + +template +class eoGeneric2TrueBinOp: public eoBinOp +{ +public: + /// Ctor + eoGeneric2TrueBinOp(eoGenericBinOp & _binOp) + : binOp( _binOp ) {}; + virtual string className() const {return "eoGeneric2TrueBinOp";} + + virtual void operator()(EOT & _eo1, const EOT & _eo2) + { + if (binOp(_eo1, _eo2)) + _eo1.invalidate(); + } + + private: + eoGenericBinOp & binOp; +}; + +#endif diff --git a/eo/src/eoGenericMonOp.h b/eo/src/eoGenericMonOp.h new file mode 100644 index 000000000..d6d833c97 --- /dev/null +++ b/eo/src/eoGenericMonOp.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenericMonOp.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenericMonOp_h +#define _eoGenericMonOp_h + +#include + +/** Contains base classes for generic operators for eoFixedLength + and eoVariableLength (They also derive from the eoOp) as well as + the corresponding converters to actual Ops. +*/ + +/** eoGenericMonOp is the generic unary operator: +it takes one argument, and returns a boolean indicating if the argument +has been modified +*/ + +template +class eoGenericMonOp: public eoOp, public eoUF +{ +public: + /// Ctor + eoGenericMonOp() + : eoOp( eoOp::unary ) {}; + virtual string className() const {return "eoGenericMonOp";}; +}; + +/** COnverter from eoGenericMonOp to eoMonOp + the only thinig to do is to transform the boolean into invalidation +*/ + +template +class eoGeneric2TrueMonOp: public eoMonOp +{ +public: + /// Ctor + eoGeneric2TrueMonOp(eoGenericMonOp & _monOp) + : monOp( _monOp ) {}; + virtual string className() const {return "eoGeneric2trueMonOp";} + + virtual void operator()(EOT & _eo) + { + if (monOp(_eo)) + _eo.invalidate(); + } + + private: + eoGenericMonOp & monOp; +}; + +#endif diff --git a/eo/src/eoGenericQuadOp.h b/eo/src/eoGenericQuadOp.h new file mode 100644 index 000000000..0df6b966d --- /dev/null +++ b/eo/src/eoGenericQuadOp.h @@ -0,0 +1,83 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenericQuadOp.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenericQuadOp_h +#define _eoGenericQuadOp_h + +#include + +/** Contains base classes for generic quadratic operators for eoFixedLength + and eoVariableLength (They also derive from the eoOp) as well as + the corresponding converters to actual Ops. +*/ + +/** eoGenericQuadOp is the generic quadratic operator: +it takes two arguments, modifies the first one, and returns a boolean +indicating if the arguments have actually been modified + +WARNING: even if only 1 argument is modified, it should return true, + and both fitnesses will be invalidated. It is assumed that + quadratic operators do some exchange of genetic material, so + if one is modified, the other is, too! +*/ + +template +class eoGenericQuadOp: public eoOp, public eoBF +{ +public: + /// Ctor + eoGenericQuadOp() + : eoOp( eoOp::binary ) {}; + virtual string className() const {return "eoGenericQuadOp";}; +}; + +/** Converter from eoGenericQuadOp to eoQuadOp + the only thinig to do is to transform the boolean into invalidation +*/ + +template +class eoGeneric2TrueQuadOp: public eoQuadOp +{ +public: + /// Ctor + eoGeneric2TrueQuadOp(eoGenericQuadOp & _quadOp) + : quadOp( _quadOp ) {}; + virtual string className() const {return "eoGeneric2TrueQuadOp";} + + virtual void operator()(EOT & _eo1, EOT & _eo2) + { + if (quadOp(_eo1, _eo2)) + { + _eo1.invalidate(); + _eo2.invalidate(); + } + } + + private: + eoGenericQuadOp & quadOp; +}; + +#endif diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 93cf4d930..dbeb65b54 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -105,6 +105,7 @@ public: /** Quadratic genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. */ +#define eoQuadraticOp eoQuadOp template class eoQuadraticOp: public eoOp, public eoBF { @@ -115,6 +116,29 @@ public: virtual string className() const {return "eoQuadOp";}; }; +// Turning an eoBinOp into an eoQuadOp is generic: +template +class eoQuad2BinOp: public eoBinOp +{ +public: + // Ctor, from an eoQuadOp + eoQuad2BinOp(eoQuadOp & _quadOp) : quadOp(_quadOp) {} + + // Operator() simply calls embedded quadOp operator() with dummy second arg + void operator()(EOT & _eo1, const EOT & _eo2) + { + EOT eoTmp = _eo2; // a copy that can be modified + // if the embedded eoQuadOp is not symmetrical, + // the result might be biased - hence the flip ... + if (eo::rng.flip(0.5)) + quadOp(_eo1, eoTmp); // both are modified - that's all + else + quadOp(eoTmp, _eo1); // both are modified - that's all + } + +private: + eoQuadOp & quadOp; +}; // some forward declarations diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index cfb6b9814..31b76c803 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -79,15 +79,24 @@ class eoPop: public vector, public eoObject, public eoPersistent } }; - /** SAME Initialization task than init. ctor, but is NOT a constructor + /** appends random guys at end of pop. + Can be used to initialize it pop is empty @param _popSize total population size @param _chromInit Initialization routine, produces EO's, needs to be an eoInit */ - void append( unsigned _popSize, eoInit& _chromInit ) + void append( unsigned _newPopSize, eoInit& _chromInit ) { - resize(size()+_popSize); // adjust the size - for ( unsigned i = 0; i < _popSize; i++ ) + unsigned oldSize = size(); + if (_newPopSize < oldSize) + { + throw runtime_error("New size smaller than old size in pop.append"); + return; + } + if (_newPopSize == oldSize) + return; + resize(_newPopSize); // adjust the size + for ( unsigned i = oldSize; i < _popSize; i++ ) { _chromInit(operator[](i)); } diff --git a/eo/src/eoVariableLength.h b/eo/src/eoVariableLength.h index 6cd823f32..838892088 100644 --- a/eo/src/eoVariableLength.h +++ b/eo/src/eoVariableLength.h @@ -27,21 +27,34 @@ #ifndef _eoVariableLength_h #define _eoVariableLength_h -#include +#include /** - Base class for variable length chromosomes. Derives from EO and list, + Base class for variable length chromosomes. Derives from EO and vector, redirects the smaller than operator to EO (fitness based comparison), and implements the virtual functions printOn() and readFrom() */ template -class eoVariableLength : public EO, public std::list +class eoVariableLength : public EO, public std::vector { public : typedef GeneType AtomType; - typedef std::list ContainerType; + typedef std::vector ContainerType; + + // default ctor + eoVariableLength(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) + {} + + // we can't have a Ctor from a vector, it would create ambiguity + // with the copy Ctor + void value(std::vector _v) + { + resize(_v.size()); + copy(_v.begin(), _v.end(), begin()); + invalidate(); + } /// printing... void printOn(ostream& os) const @@ -51,7 +64,7 @@ class eoVariableLength : public EO, public std::list os << size() << ' '; - std::copy(begin(), end(), ostream_iterator(os)); + std::copy(begin(), end(), ostream_iterator(os, " ")); } /// reading... @@ -62,14 +75,14 @@ class eoVariableLength : public EO, public std::list unsigned sz; is >> sz; - resize(0); + resize(sz); unsigned i; - unsigned gene; for (i = 0; i < sz; ++i) { - is >> gene; - push_back(gene); + AtomType atom; + is >> atom; + operator[](i) = atom; } } @@ -81,7 +94,7 @@ class eoVariableLength : public EO, public std::list }; -/// to avoid conflicts between EO::operator< and vector::operator< +/// to avoid conflicts between EO::operator< and vector::operator< template bool operator<(const eoVariableLength& _eo1, const eoVariableLength& _eo2) { diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h new file mode 100644 index 000000000..20d073957 --- /dev/null +++ b/eo/src/eoVariableLengthCrossover.h @@ -0,0 +1,294 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVariableLengthCrossover.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoVariableLengthCrossover_h +#define _eoVariableLengthCrossover_h + +#include +#include +#include +#include + +/** + Base classes for generic crossovers on variable length chromosomes. + +Basically, they exchange genes - we need some matching information to apply +atom crossover +*/ + +//* A helper class for choosing which genes to exchange +template +class eoAtomExchange : public eoBF +{ +public: + // a function to initlialize - to be called before every crossover + virtual void randomize(unsigned int, unsigned int){} +}; + +//* Uniform crossover - well, not really for FixedLength +template +class eoUniformAtomExchange: public eoAtomExchange +{ +public: + eoUniformAtomExchange(double _rate=0.5):rate(_rate){} + + // randomize: fill the mask: the exchange will be simulated first + // to see if sizes are OK, so it must be repeatable + void randomize(unsigned _size1, unsigned _size2) + { + mask.resize(_size1 + _size2); + for (unsigned i=0; i<_size1+_size2; i++) + mask[i]=eo::rng.flip(rate); + } + + // the operator() simply returns the mask booleans in turn + bool operator()(unsigned _i, Atom & ) + { + return mask[_i]; + } +private: + double rate; + vector mask; +}; + + +/** Exchange Crossover using an AtomExchange + */ + +template +class eoVlAtomExchangeQuadOp : public eoGenericQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires bounds on number of genes + a rate + eoVlAtomExchangeQuadOp(unsigned _Min, unsigned _Max, + eoAtomExchange& _atomExchange): + Min(_Min), Max(_Max), atomExchange(_atomExchange) {} + + bool operator()(EOT & _eo1, EOT & _eo2) + { + EOT tmp1, tmp2; // empty individuals + unsigned index=0; + // main loop: until sizes are OK, do only simulated exchange + unsigned i, i1, i2; + do { + // "initialize the AtomExchange + atomExchange.randomize(_eo1.size(), _eo2.size()); + // simulate crossover + i1=i2=0; + for (i=0; i<_eo1.size(); i++) + { + if (atomExchange(i, _eo1[i])) + i1++; + else + i2++; + } + for (i=0; i<_eo2.size(); i++) + { + if (atomExchange(i, _eo2[i])) + i2++; + else + i1++; + } + index++; + } while ( ( (i1Max) || (i2>Max) ) + && (index<10000) ); + if (index >= 10000) + { + cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + return false; + } + // here we know we have the right sizes: do the actual exchange + for (i=0; i<_eo1.size(); i++) + { + if (atomExchange(i, _eo1[i])) + tmp1.push_back(_eo1[i]); + else + tmp2.push_back(_eo1[i]); + } + for (i=0; i<_eo2.size(); i++) + { + if (atomExchange(i, _eo2[i])) + tmp2.push_back(_eo2[i]); + else + tmp1.push_back(_eo2[i]); + } + // and put everything back in place + _eo1.swap(tmp1); + _eo2.swap(tmp2); + return true; // should we test that? Yes, but no time now + } +private: + unsigned Min, Max; + eoAtomExchange & atomExchange; +}; + + + + +/** Direct Uniform Exchange of genes (obsolete, already :-) + +A very primitive version, that does no verification at all!!! +NEEDS to be improved - but no time now :-((( +Especially, if both guys have maximal size, it will take a lot of time +to generate 2 offspring that both are not oversized!!! +Also, we should first check for identical atoms, and copy them to the +offspring, and only after that exchange the other ones (Radcliffe's RRR). + */ +template +class eoVlUniformQuadOp : public eoGenericQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires bounds on number of genes + a rate + eoVlUniformQuadOp(unsigned _Min, unsigned _Max, double _rate=0.5) : + Min(_Min), Max(_Max), rate(_rate) {} + + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + EOT tmp1, tmp2; + unsigned index=0; + do { + for (i=0; i<_eo1.size(); i++) + { + if (eo::rng.flip(rate)) + tmp1.push_back(_eo1[i]); + else + tmp2.push_back(_eo1[i]); + // here we should look for _eo1[i] inside _eo2 and erase it if found! + } + for (i=0; i<_eo2.size(); i++) + { + if (eo::rng.flip(rate)) + tmp1.push_back(_eo2[i]); + else + tmp2.push_back(_eo2[i]); + } + index++; + } while ( ( (tmp1.size()Max) || (tmp2.size()>Max) ) + && (index<10000) ); + if (index >= 10000) + { + cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + return false; + } + + _eo1.swap(tmp1); + _eo2.swap(tmp2); + return true; // should we test that? + } +private: + unsigned Min, Max; + double rate; +}; + + +/** Direct Uniform Exchange of genes for Variable Length, BINARY version + +A very primitive version, that does no verification at all!!! +NEEDS to be improved - but no time now :-((( +Especially, if both guys have maximal size, it will take some time +to generate even 1 offspring that is not oversized!!! +Also, we should first check for identical atoms, and copy them to the +offspring, and only after that exchange the other ones (Radcliffe's RRR). + */ +template +class eoVlUniformBinOp : public eoGenericBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires bounds on number of genes + a rate + eoVlUniformBinOp(unsigned _Min, unsigned _Max, double _rate=0.5) : + Min(_Min), Max(_Max), rate(_rate) {} + + bool operator()(EOT & _eo1, const EOT & _eo2) + { + unsigned i; + EOT tmp1; + bool tmpIsOne=true, tmpIsTwo=true; + unsigned index=0; + do { + for (i=0; i<_eo1.size(); i++) + { + if (eo::rng.flip(rate)) + { + tmp1.push_back(_eo1[i]); + tmpIsTwo = false; + } + else + tmpIsOne=false; + // we should look for _eo1[i] inside _eo2 and erase it there if found! + } + for (i=0; i<_eo2.size(); i++) + { + if (! eo::rng.flip(rate)) + { + tmp1.push_back(_eo2[i]); + tmpIsOne = false; + } + else + tmpIsTwo = false; + } + index++; + } while ( ( (tmp1.size()Max) ) + && (index<10000) ); + // this while condition is not optimal, as it may take some time + if (index >= 10000) + { + cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + return false; + } + + _eo1.swap(tmp1); + if (tmpIsTwo) + { + // _eo1.fitness(_eo2.fitness()); NO FITNESS EXISTS HERE! + return false; + } + if (tmpIsOne) // already has the right fitness + { // WRONG: NO FITNESS EXISTS HERE! + return false; + } + return true; // there were some modifications... + } + +private: + unsigned Min, Max; + double rate; +}; + + + +#endif diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h new file mode 100644 index 000000000..a23f0b882 --- /dev/null +++ b/eo/src/eoVariableLengthMutation.h @@ -0,0 +1,190 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVariableLengthMutation.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoVariableLengthMutation_h +#define _eoVariableLengthMutation_h + +#include +#include +#include + +/** + Base classes for generic mutations on variable length chromosomes. + +THey all require a generic mutation for their simple genes +*/ + +/** THis ones applies its atomic mutation to all the genes + */ +template +class eoVlAllMutation : public eoGenericMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires an Atom mutation + eoVlAllMutation(eoGenericMonOp & _atomMutation) : + atomMutation(_atomMutation) {} + + bool operator()(EOT & _eo) + { + bool modified=false; + for (unsigned i=0; i<_eo.size(); i++) + { + if (atomMutation(_eo[i])) + modified = true; + } + return modified; + } +private: + eoGenericMonOp & atomMutation; +}; + +/** This ones applies its atomic mutation to a fixed + number of genes (1 by default) + */ +template +class eoVlKMutation : public eoGenericMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires an Atom mutation + eoVlKMutation(eoGenericMonOp & _atomMutation, unsigned _nb=1) : + nb(_nb), atomMutation(_atomMutation) {} + + bool operator()(EOT & _eo) + { + bool modified=false; + for (unsigned k=0; k & atomMutation; +}; + +/** Addition of a gene + Is inserted at a random position - so can be applied to both + order-dependent and order-independent + */ +template +class eoVlAddMutation : public eoGenericMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor + + * @param nMax max number of atoms + * @param _atomInit an Atom initializer + */ + eoVlAddMutation(unsigned _nMax, eoInit & _atomInit) : + nMax(_nMax), atomInit(_atomInit) {} + + bool operator()(EOT & _eo) + { + if (_eo.size() >= nMax) + return false; // unmodifed + AtomType atom; + atomInit(atom); + unsigned pos = rng.random(_eo.size()+1); + _eo.insert(_eo.begin()+pos, atom); + return true; + } +private: + unsigned nMax; + eoInit & atomInit; +}; + +//* A helper class for choosing which site to delete +template +class eoGeneDelChooser : public eoUF +{}; + +//* Unifirm choice of gene to delete +template +class eoUniformGeneChooser: public eoGeneDelChooser +{ +public: + eoUniformGeneChooser(){} + unsigned operator()(EOT & _eo) + { + return eo::rng.random(_eo.size()); + } +}; + +/** Deletion of a gene + By default at a random position, but a "chooser" can be specified + can of course be applied to both order-dependent and order-independent + */ +template +class eoVlDelMutation : public eoGenericMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** ctor with an external gene chooser + + * @param nMin min number of atoms t oleave in the individual + * @param _geneChooser an eoGeneCHooser to choose which one to delete + */ + eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : + nMin(_nMin), uChooser(), chooser(_chooser) {} + + /** ctor with unifirm gebe chooser + + * @param nMin min number of atoms t oleave in the individual + */ + eoVlDelMutation(unsigned _nMin) : + nMin(_nMin), uChooser(), chooser(uChooser) {} + + bool operator()(EOT & _eo) + { + if (_eo.size() <= nMin) + return false; // unmodifed + unsigned pos = chooser(_eo); + _eo.erase(_eo.begin()+pos); + return true; + } +private: + unsigned nMin; + eoUniformGeneChooser uChooser; + eoGeneDelChooser & chooser; +}; + + + +#endif From e532234d1ce73cef0b477b437d3036906e14a16f Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 11 Jan 2001 11:02:37 +0000 Subject: [PATCH 0411/2134] New versions of bounds for real variables. Should supersede eoEsObjectiveBounds, whose name was misleading anyway as this can be used in any REal-ceded GA for isntance --- eo/src/es/eoRealBounds.h | 224 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 eo/src/es/eoRealBounds.h diff --git a/eo/src/es/eoRealBounds.h b/eo/src/es/eoRealBounds.h new file mode 100644 index 000000000..1ddf99831 --- /dev/null +++ b/eo/src/es/eoRealBounds.h @@ -0,0 +1,224 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealBounds.h +// (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoRealBounds_h +#define _eoRealBounds_h + +/** +\defgroup EvolutionStrategies + + Various classes for the initialization and mutation of real valued vectors. + + Supports simple mutations and various more adaptable mutations, including + correlated mutations. + +*/ + + +/** +\class eoRealBounds eoRealBounds.h es/eoRealBounds.h +\ingroup EvolutionStrategies + + Defines the minima and maxima for real variables + +*/ +class eoBaseRealBounds : public eoUF +{ }; + +class eoRealBounds : public eoBaseRealBounds +{ +public : + + /** + Simple bounds = minimum and maximum (allowed) + */ + eoRealBounds(double _min=0, double _max=1) : + repMinimum(_min), repMaximum(_max), repRange(_max-_min) + { + if (repRange<=0) + throw std::logic_error("Void range in eoRealBounds"); + } + + double Minimum() { return repMinimum; } + double Maximum() { return repMaximum; } + double Range() { return repRange; } + // for backward compatibility + double minimum() { return repMinimum; } + double maximum() { return repMaximum; } + double range() { return repRange; } + + double uniform(eoRng & _rng = eo::rng) + { + return repMinimum + _rng.uniform(repRange); + } + + // says if a given double is within the bounds + bool operator()(double _r) + { + if (_r < repMinimum) + return false; + if (_r > repMaximum) + return false; + return true; + } + +private : + double repMinimum; + double repMaximum; + double repRange; // to minimize operations ??? +}; + + +// now the vectorized version + +class eoRealVectorBounds +{ +public : + + /** + Simple bounds = minimum and maximum (allowed) + */ + // Ctor: same bonds for everybody, explicit + eoRealVectorBounds(unsigned _dim, double _min=0, double _max=1) : + vecMinimum(_dim, _min), vecMaximum(_dim, _max), vecRange(_dim, _max-_min) + { + if (_max-_min<=0) + throw std::logic_error("Void range in eoRealVectorBounds"); + } + + // Ctor: same bonds for everybody, given as a eoRealBounds + eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + vecMinimum(_dim, _bounds.Minimum()), + vecMaximum(_dim, _bounds.Maximum()), + vecRange(_dim, _bounds.Range()) + {} + + // Ctor: different bonds for different variables, vectors of double + eoRealVectorBounds(vector _min, vector _max) : + vecMinimum(_min), vecMaximum(_max), vecRange(_min.size()) + { + if (_max.size() != _min.size()) + throw std::logic_error("Dimensions don't match in eoRealVectorBounds"); + for (unsigned i=0; i<_min.size(); i++) + { + vecRange[i]=_max[i]-_min[i]; + if (vecRange[i]<=0) + throw std::logic_error("Void range in eoRealVectorBounds"); + } + } + + // Ctor, particular case of dim-2 + eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + vecMinimum(2), vecMaximum(2), vecRange(2) + { + vecMinimum[0] = _xbounds.Minimum(); + vecMaximum[0] = _xbounds.Maximum(); + vecRange[0] = _xbounds.Range(); + vecMinimum[1] = _ybounds.Minimum(); + vecMaximum[1] = _ybounds.Maximum(); + vecRange[1] = _ybounds.Range(); + } + + // not a ctor, but usefull to initialize, too + // is it safe to call it push_back? Maybe not, but it's meaningful! + void push_back(double _min=0, double _max=1) + { + vecMinimum.push_back(_min); + vecMaximum.push_back(_max); + if (_max-_min <= 0) + throw std::logic_error("Void range in eoRealVectorBounds::add"); + vecRange.push_back(_max-_min); + } + + void push_back(eoRealBounds & _bounds) + { + vecMinimum.push_back(_bounds.Minimum()); + vecMaximum.push_back(_bounds.Maximum()); + vecRange.push_back(_bounds.Range()); + } + + // accessors - following rule that says that method start are capitalized + double Minimum(unsigned _i) { return vecMinimum[_i]; } + double Maximum(unsigned _i) { return vecMaximum[_i]; } + double Range(unsigned _i) { return vecRange[_i]; } + + // accessors - for backward compatibility + double minimum(unsigned _i) { return vecMinimum[_i]; } + double maximum(unsigned _i) { return vecMaximum[_i]; } + double range(unsigned _i) { return vecRange[_i]; } + + // handy: get the size + unsigned int size() { return vecMinimum.size();} + + // returns a value uniformly chosen in bounds for a given variable + double uniform(unsigned _i, eoRng & _rng = eo::rng) + { + return vecMinimum[_i] + _rng.uniform(vecRange[_i]); + } + + // returns a vector of uniformly chosen variables in bounds + vector uniform(eoRng & _rng = eo::rng) + { + vector v(vecMinimum.size()); + for (unsigned i=0; i & _v, eoRng & _rng = eo::rng) + { + _v.resize(vecMinimum.size()); + for (unsigned i=0; i vecMaximum[_i]) + return false; + return true; + } + + // check the bounds for a vector: true only if ALL ar ein bounds + bool operator()(vector & _v) + { + for (unsigned i=0; i<_v.size(); i++) + if (! operator()(i, _v[i]) ) // out of bound + return false; + return true; + } +private : + vector vecMinimum; + vector vecMaximum; + vector vecRange; // to minimize operations ??? +}; + +#endif From f988b42fed4c7bf818bc96f045ba95ba7e4691af Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Jan 2001 21:31:42 +0000 Subject: [PATCH 0412/2134] Corrected some error in variable name after last changes in method append --- eo/src/eoPop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 31b76c803..79aa01e01 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -96,7 +96,7 @@ class eoPop: public vector, public eoObject, public eoPersistent if (_newPopSize == oldSize) return; resize(_newPopSize); // adjust the size - for ( unsigned i = oldSize; i < _popSize; i++ ) + for ( unsigned i = oldSize; i < _newPopSize; i++ ) { _chromInit(operator[](i)); } From a8bf667774b4224e45699418a6ad35b120e8d14e Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 16 Jan 2001 05:52:01 +0000 Subject: [PATCH 0413/2134] Added the eoRandomReduce class - hence I also added the shuffle method in eoPop (I had been postponing that for a long time!) which in turn required another class of random generator (whose operator() takes an unsigned as argument) --- eo/src/utils/rnd_generators.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index eabb0262e..7c43b90d8 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -112,6 +112,23 @@ bool random_generator::operator()(void) return random.flip(0.5); } +/** + Another class random_generator that can be used in the STL random_shuffle + function (see eoPop::shuffle): its operator() takes an unsigned argument m + and must return an unsigned uniformly distributed in [0,m} +*/ +template class UF_random_generator +{ + public : + UF_random_generator(eoRng& _rng = rng) : + random(_rng) {} + + T operator()(T _t) { return (T) (random.random(_t)); } + +private : + eoRng& random; +}; + /** The class normal_generator can be used in the STL generate function From 20b70de2a16de473882594ddf8095f35df153a7e Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 16 Jan 2001 07:18:45 +0000 Subject: [PATCH 0414/2134] Added the normal mutation - and the 1/5 mutation --- eo/src/es/eoNormalMutation.h | 165 +++++++++++++++++++++++++++++++++++ eo/src/es/eoRealOp.h | 127 ++++++++++----------------- 2 files changed, 209 insertions(+), 83 deletions(-) create mode 100644 eo/src/es/eoNormalMutation.h diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h new file mode 100644 index 000000000..cc3276e8a --- /dev/null +++ b/eo/src/es/eoNormalMutation.h @@ -0,0 +1,165 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNormalMutation.h +// (c) EEAAX 2001 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoNormalMutation_h +#define eoNormalMutation_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include +#include +#include + +//----------------------------------------------------------------------------- + +/** Simple normal mutation of a vector of real values. + * The stDev is fixed - but it is passed ans stored as a reference, + * to enable dynamic mutations (see eoOenFithMutation below). + */ + +template class eoNormalMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoNormalMutation(double & _sigma, const double& _p_change = 1.0): + sigma(_sigma), p_change(_p_change) {} + + /// The class name. + string className() const { return "eoNormalMutation"; } + + /** + * Do it! + * @param _eo The cromosome undergoing the mutation + */ + void operator()(EOT& _eo) + { + bool hasChanged=false; + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + { + if (rng.flip(p_change)) + { + _eo[lieu] += sigma*rng.normal(); + hasChanged = true; + } + } + if (hasChanged) + _eo.invalidate(); + } + +protected: + double & sigma; +private: + double p_change; +}; + +/** the dynamic version: just say it is updatable - + * and write the update() method! + * here the 1 fifth rule: count the proportion of successful mutations, and + * increase sigma if more than threshold (1/5 !) + */ + +template class eoOneFifthMutation : + public eoNormalMutation, public eoUpdatable +{ +public: + typedef typename EOT::Fitness Fitness; + + /** + * (Default) Constructor. + * + * @param eval the evaluation fuinction, needed to recompute the fitmess + * @param _sigmaInit the initial value for uniform nutation + * @param _windowSize the size of the window for statistics + * @param _threshold the threshold (the 1/5 - 0.2) + * @param _updateFactor multiplicative update factor for sigma + */ + eoOneFifthMutation(eoEvalFunc & _eval, double & _sigmaInit, + unsigned _windowSize = 10, + double _threshold=0.2, double _updateFactor=0.83): + eoNormalMutation(_sigmaInit), eval(_eval), + threshold(_threshold), updateFactor(_updateFactor), + nbMut(_windowSize, 0), nbSuccess(_windowSize, 0), genIndex(0) {} + + /** + * Do it! + * @param _eo The cromosome undergoing the mutation + * calls the standard mutation, then checks for success + */ + void operator()(EOT & _eo) + { + Fitness oldFitness = _eo.fitness(); // save old fitness + + eoNormalMutation::operator()(_eo); // normal mutation + nbMut++; // assumes normal mutation always modifies _eo + + eval(_eo); // compute fitness of offspring + + if (_eo.fitness() > oldFitness) + nbSuccess++; // update counter + } + + // this will be called every generation + void update() + { + unsigned totalMut = 0; + unsigned totalSuccess = 0; + // compute the average stats over the time window + for ( unsigned i=0; i threshold) + sigma /= updateFactor; // increase sigma + else + sigma *= updateFactor; // decrease sigma + + // go to next generation + genIndex = (genIndex+1) % nbMut.size() ; + nbMut[genIndex] = nbSuccess[genIndex] = 0; + } +private: + eoEvalFunc & eval; + double threshold; // 1/5 ! + double updateFactor ; // the multiplicative factor + vector nbMut; // total number of mutations per gen + vector nbSuccess; // number of successful mutations per gen + unsigned genIndex ; // current gen +}; + + +//----------------------------------------------------------------------------- +//@} +#endif eoRealOp_h + diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 5eabd4169..1cdef1cd3 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -41,7 +41,7 @@ \ingroup parameteric */ -template class eoUniformMutation: public eoMonOp +template class eoUniformMutation: public eoMonOp { public: /** @@ -57,21 +57,21 @@ template class eoUniformMutation: public eoMonOp /** * Do it! - * @param chrom The cromosome undergoing the mutation + * @param _eo The cromosome undergoing the mutation */ - void operator()(Chrom& chrom) + void operator()(EOT& _eo) { bool hasChanged=false; - for (unsigned lieu=0; lieu class eoDetUniformMutation: public eoMonOp +template class eoDetUniformMutation: public eoMonOp { public: /** @@ -101,16 +101,16 @@ template class eoDetUniformMutation: public eoMonOp /** * Do it! - * @param chrom The cromosome undergoing the mutation + * @param _eo The cromosome undergoing the mutation */ - void operator()(Chrom& chrom) + void operator()(EOT& _eo) { - chrom.invalidate(); + _eo.invalidate(); for (unsigned i=0; i class eoNormalMutation: public eoMonOp -{ - public: - /** - * (Default) Constructor. - * @param _epsilon the range for uniform nutation - * @param _p_change the probability to change a given coordinate - */ - eoNormalMutation(const double& _epsilon, const double& _p_change = 1.0): - epsilon(_epsilon), p_change(_p_change) {} - - /// The class name. - string className() const { return "eoNormalMutation"; } - - /** - * Do it! - * @param chrom The cromosome undergoing the mutation - */ - void operator()(Chrom& chrom) - { - bool hasChanged=false; - for (unsigned lieu=0; lieu uniform choice in segment @@ -167,7 +128,7 @@ private: \ingroup parameteric */ -template class eoSegmentCrossover: public eoQuadraticOp +template class eoSegmentCrossover: public eoQuadraticOp { public: /** @@ -184,23 +145,23 @@ template class eoSegmentCrossover: public eoQuadraticOp /** * segment crossover - modifies both parents - * @param chrom1 The first parent - * @param chrom2 The first parent + * @param _eo1 The first parent + * @param _eo2 The first parent */ - void operator()(Chrom& chrom1, Chrom& chrom2) + void operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, fact; fact = rng.uniform(range); // in [0,range) - for (i=0; i class eoArithmeticCrossover: public eoQuadraticOp +template class eoArithmeticCrossover: public eoQuadraticOp { public: /** @@ -231,20 +192,20 @@ template class eoArithmeticCrossover: public eoQuadraticOp /** * arithmetical crossover - modifies both parents - * @param chrom1 The first parent - * @param chrom2 The first parent + * @param _eo1 The first parent + * @param _eo2 The first parent */ - void operator()(Chrom& chrom1, Chrom& chrom2) + void operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, fact; - for (i=0; i class eoRealUxOver: public eoQuadraticOp +template class eoRealUxOver: public eoQuadraticOp { public: /** @@ -277,30 +238,30 @@ template class eoRealUxOver: public eoQuadraticOp /** * Uniform crossover for real vectors - * @param chrom1 The first parent - * @param chrom2 The second parent + * @param _eo1 The first parent + * @param _eo2 The second parent * @runtime_error if sizes don't match */ - void operator()(Chrom& chrom1, Chrom& chrom2) + void operator()(EOT& _eo1, EOT& _eo2) { - if ( chrom1.size() != chrom2.size()) + if ( _eo1.size() != _eo2.size()) runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; - for (unsigned int i=0; i Date: Tue, 16 Jan 2001 07:20:02 +0000 Subject: [PATCH 0415/2134] Added the normal and 1/5 mutations (file es/eoNormalMutation.h) --- eo/src/eo | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eo b/eo/src/eo index 5f1a3f6b2..38c610106 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -86,6 +86,7 @@ #include #include #include +#include // Evaluation functions #include From deace62e55da1111374a49cae431f5f9f834c489 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 16 Jan 2001 07:20:48 +0000 Subject: [PATCH 0416/2134] Added the normal mutation - and the 1/5 mutation in FirstRealEA in Lesson2 --- eo/tutorial/Lesson2/FirstRealEA.cpp | 19 +- eo/tutorial/html/FirstRealEA.html | 623 ++++++++++++++-------------- 2 files changed, 317 insertions(+), 325 deletions(-) diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 603b6a32c..7c5b45808 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -45,11 +45,13 @@ void main_function(int argc, char **argv) const float P_MUT = 0.5; // mutation probability const double EPSILON = 0.01; // range for real uniform mutation + double SIGMA = 0.3; // std dev. for normal mutation // some parameters for chosing among different operators - const double segmentRate = 0.5; // rate for 1-pt Xover - const double arithmeticRate = 0.5; // rate for 2-pt Xover - const double uniformMutRate = 0.5; // rate for bit-flip mutation - const double detMutRate = 0.5; // rate for one-bit mutation + const double segmentRate = 0.5; // relative weight for 1-pt Xover + const double arithmeticRate = 0.5; // relative weight for 2-pt Xover + const double uniformMutRate = 0.5; // relative weight for bit-flip mutation + const double detMutRate = 0.5; // relative weight for one-bit mutation + const double normalMutRate = 0.5; // relative weight for normal mutation // GENERAL ////////////////////////// @@ -111,7 +113,7 @@ void main_function(int argc, char **argv) eoSegmentCrossover xoverS; // uniform choice in hypercube built by the parents eoArithmeticCrossover xoverA; - // Combine them with relative rates + // Combine them with relative weights eoPropCombinedQuadOp xover(xoverS, segmentRate); xover.add(xoverA, arithmeticRate, true); @@ -120,9 +122,12 @@ void main_function(int argc, char **argv) eoUniformMutation mutationU(EPSILON); // k (=1) coordinates of parents are uniformly modified eoDetUniformMutation mutationD(EPSILON); - // Combine them with relative rates + // all coordinates of parents are normally modified (stDev SIGMA) + eoNormalMutation mutationN(SIGMA); + // Combine them with relative weights eoPropCombinedMonOp mutation(mutationU, uniformMutRate); - mutation.add(mutationD, detMutRate, true); + mutation.add(mutationD, detMutRate); + mutation.add(mutationN, normalMutRate, true); // STOP // CHECKPOINT diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index 793874729..63b960949 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -2,7 +2,7 @@ - + FirstRealEA.cpp @@ -15,343 +15,330 @@ documentation

        FirstRealEA.cpp

        -Click on the figure to see the corresponding code.
        -In the code, the colors are meaningfull
        -The actual code is in boldface and the comment in normal face. -
        - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - +Click on the figure to see the corresponding code. +
        In the code, the colors are meaningfull +
        The actual code is in boldface and the comment in normal face. +
        +
        - +
        -//-----------------------------------------------------------------------------
        -// FirstRealEA.cpp
        -//-----------------------------------------------------------------------------
        -//*
        -// Still an instance of a VERY simple Real-coded  Genetic Algorithm
        -// (see FirstBitGA.cpp) but now with  Breeder - and Combined Ops
        -//
        -//-----------------------------------------------------------------------------
        -// standard includes
        -#include <stdexcept>  // runtime_error
        -#include <iostream>    // cout
        -#include <strstream>  // ostrstream, istrstream
        -// the general include for eo
        -#include <eo>
        -
        -
        //----------------------------------------------------------------------------- +
        // FirstRealEA.cpp +
        //----------------------------------------------------------------------------- +
        //* +
        // Still an instance of a VERY simple Real-coded  +Genetic Algorithm  +
        // (see FirstBitGA.cpp) but now with  +Breeder - and Combined Ops +
        // +
        //----------------------------------------------------------------------------- +
        // standard includes +
        #include <stdexcept>  // runtime_error  +
        #include <iostream>    +// cout +
        #include <strstream>  // ostrstream, +istrstream +
        // the general include for eo +
        #include <eo>
        - + +
        + + + +
        //----------------------------------------------------------------------------- +
        // define your individuals +
        typedef eoReal<double> Indi; 
        + + + + + +
        //----------------------------------------------------------------------------- +
        // a simple fitness function that computes +the euclidian norm of a real vector +
        // Now in a separate file, and declared as +binary_value(const vector<bool> &) +
        #include "real_value.h"
        + + + + + +
        //----------------------------------------------------------------------------- +
        void main_function(int argc, char **argv) +
        {
        + + + + + +
         const unsigned int SEED = 42; // +seed for random number generator +
         const unsigned int T_SIZE = 3; // +size for tournament selection +
         const unsigned int VEC_SIZE = 8; +// Number of object variables in genotypes +
         const unsigned int POP_SIZE = 20; +// Size of population +
         const unsigned int MAX_GEN = 500; +// Maximum number of generation before STOP +
         const unsigned int MIN_GEN = 10;  +// Minimum number of generation before ... +
         const unsigned int STEADY_GEN = +50; // stop after STEADY_GEN gen. without improvelent +
         const float P_CROSS = 0.8; // +Crossover probability +
         const float P_MUT = 0.5; // +mutation probability +
         const double EPSILON = 0.01; // +range for real uniform mutation +
               double +SIGMA = 0.3;        // std dev. +for normal mutation +
         // some parameters for chosing +among different operators +
         const double segmentRate = 0.5;    +// relative weight for 1-pt Xover +
         const double arithmeticRate = 0.5; +// relative weight for 2-pt Xover +
         const double uniformMutRate = 0.5; +// relative weight for bit-flip mutation +
         const double detMutRate = 0.5;     +// relative weight for one-bit mutation +
         const double normalMutRate = 0.5;  +// relative weight for normal mutation
        + + + + + +
         ////////////////////////// +
         //  Random seed +
         ////////////////////////// +
         //reproducible random seed: +if you don't change SEED above,  +
         // you'll aways get the same +result, NOT a random run +
         rng.reseed(SEED);
        + + + + + +
         ///////////////////////////// +
         // Fitness function +
         //////////////////////////// +
         // Evaluation: from a plain +C++ fn to an EvalFunc Object +
         // you need to give the full +description of the function +
         eoEvalFuncPtr<Indi, double, const +vector<double>& > eval(  real_value );
        + + + + + +
         //////////////////////////////// +
         // Initilisation of population +
         //////////////////////////////// +
         // based on a uniform generator +
         eoInitFixedLength<Indi, uniform_generator<double> +> +
                 +random(VEC_SIZE, uniform_generator<double>(-1.0, 1.0)); +
           // Initialization of +the population +
         eoPop<Indi> pop(POP_SIZE, random); +

         // and evaluate it in one loop +
         apply<Indi>(eval, pop); // +STL syntax

        + + + + + +
         // sort pop before printing +it! +
         pop.sort(); +
         // Print (sorted) intial population +(raw printout) +
         cout << "Initial Population" +<< endl; +
         cout << pop;
        + + + + + +
         ///////////////////////////////////// +
         // selection and replacement +
         ////////////////////////////////////
        + + + + + +
         // The robust tournament selection +
         eoDetTournamentSelect<Indi> selectOne(T_SIZE); +
        // +is now encapsulated in a eoSelectPerc (entage) +
         eoSelectPerc<Indi> select(selectOne);// +by default rate==1
        + + + + + +
         // And we now have the full +slection/replacement - though with  +
         // no replacement (== generational +replacement) at the moment :-) +
         eoNoReplacement<Indi> replace; 
        + + + + + +
         ////////////////////////////////////// +
         // The variation operators +
         //////////////////////////////////////
        + + + + + +
         // uniform chooce on segment +made by the parents +
         eoSegmentCrossover<Indi> xoverS; +
         // uniform choice in hypercube +built by the parents +
         eoArithmeticCrossover<Indi> xoverA; +
         // Combine them with relative +weights +
         eoPropCombinedQuadOp<Indi> xover(xoverS, +segmentRate); +
         xover.add(xoverA, arithmeticRate, +true);
        + + +
         // offspring(i) uniformly chosen +in [parent(i)-epsilon, parent(i)+epsilon] +
         eoUniformMutation<Indi>  +mutationU(EPSILON);  +
         // k (=1) coordinates of parents +are uniformly modified +
         eoDetUniformMutation<Indi>  +mutationD(EPSILON);  +
         // all coordinates of parents are normally +modified (stDev SIGMA) +
         eoNormalMutation<Indi>  +mutationN(SIGMA);  +
         // Combine them with relative +weights +
         eoPropCombinedMonOp<Indi> mutation(mutationU, +uniformMutRate); +
         mutation.add(mutationD, detMutRate); +
         mutation.add(mutationN, normalMutRate, +true); +

         // The operators are  encapsulated +into an eoTRansform object +
         eoSGATransform<Indi> transform(xover, +P_CROSS, mutation, P_MUT);

        - -//-----------------------------------------------------------------------------
        -// define your individuals
        -typedef eoReal<double> Indi;
        -
        -
        - + +
        - +
        - -//-----------------------------------------------------------------------------
        -// a simple fitness function that computes the euclidian norm of a real vector
        -// Now in a separate file, and declared as binary_value(const vector<bool> &)
        -#include "real_value.h"
        -
        -
        - + +
        - +
        - -//-----------------------------------------------------------------------------
        -void main_function(int argc, char **argv)
        -{
        -
        -
         ////////////////////////////////////// +
         // termination conditions: use +more than one +
         ///////////////////////////////////// +
         // stop after MAX_GEN generations +
         eoGenContinue<Indi> genCont(MAX_GEN); +
         // do MIN_GEN gen., then stop +after STEADY_GEN gen. without improvement +
         eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, +STEADY_GEN); +
         // stop when fitness reaches +a target (here VEC_SIZE) +
         eoFitContinue<Indi> fitCont(0); +
         // do stop when one of the above +says so +
         eoCombinedContinue<Indi> continuator(genCont); +
         continuator.add(steadyCont); +
         continuator.add(fitCont);
        - + +
        - +
        - -  const unsigned int SEED = 42; // seed for random number generator
        -  const unsigned int T_SIZE = 3; // size for tournament selection
        -  const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes
        -  const unsigned int POP_SIZE = 20; // Size of population
        -  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
        -  const unsigned int MIN_GEN = 10;  // Minimum number of generation before ...
        -  const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent
        -  const float P_CROSS = 0.8; // Crossover probability
        -  const float P_MUT = 0.5; // mutation probability
        -  const double EPSILON = 0.01; // range for real uniform mutation
        -  // some parameters for chosing among different operators
        -  const double segmentRate = 0.5;        // rate for 1-pt Xover
        -  const double arithmeticRate = 0.5;        // rate for 2-pt Xover
        -  const double uniformMutRate = 0.5;          // rate for bit-flip mutation
        -  const double detMutRate = 0.5;            // rate for one-bit mutation
        -
        -
         ///////////////////////////////////////// +
         // the algorithm +
         //////////////////////////////////////// +
         // Easy EA requires  +
         // selection, transformation, +eval, replacement, and stopping criterion +
         eoEasyEA<Indi> gga(continuator, +eval, select, transform, replace); +
         // Apply algo to pop - that's +it! +
         cout << "\n              +Here we go\n\n"; +
         gga(pop); +
         
        - + +
        - +
        - -  //////////////////////////
        -  //  Random seed
        -  //////////////////////////
        -  //reproducible random seed: if you don't change SEED above,
        -  // you'll aways get the same result, NOT a random run
        -  rng.reseed(SEED);
        -
        -
         // Print (sorted) intial population +
         pop.sort(); +
         cout << "FINAL Population\n" +<< pop << endl;
        - + +
        - - -
        - -  /////////////////////////////
        -  // Fitness function
        -  ////////////////////////////
        -  // Evaluation: from a plain C++ fn to an EvalFunc Object
        -  // you need to give the full description of the function
        -  eoEvalFuncPtr<Indi, double, const vector<double>& > eval(  real_value );
        -
        -
        - - - - -
        - -  ////////////////////////////////
        -  // Initilisation of population
        -  ////////////////////////////////
        -  // based on a uniform generator
        -  eoInitFixedLength<Indi, uniform_generator<double> >
        -          random(VEC_SIZE, uniform_generator<double>(-1.0, 1.0));
        -    // Initialization of the population
        -  eoPop<Indi> pop(POP_SIZE, random);
        -
        -  // and evaluate it in one loop
        -  apply<Indi>(eval, pop); // STL syntax
        -
        -
        - - - - -
        - -  // sort pop before printing it!
        -  pop.sort();
        -  // Print (sorted) intial population (raw printout)
        -  cout << "Initial Population" << endl;
        -  cout << pop;
        -
        -
        - - - - -
        - -  /////////////////////////////////////
        -  // selection and replacement
        -  ////////////////////////////////////
        -
        -
        - - - - -
        - -  // The robust tournament selection
        -  eoDetTournamentSelect<Indi> selectOne(T_SIZE);
        - -  // is now encapsulated in a eoSelectPerc (entage)
        -  eoSelectPerc<Indi> select(selectOne);// by default rate==1
        -
        -
        - - - - -
        - -  // And we now have the full slection/replacement - though with
        -  // no replacement (== generational replacement) at the moment :-)
        -  eoNoReplacement<Indi> replace;
        -
        -
        - - - - -
        - -  //////////////////////////////////////
        -  // The variation operators
        -  //////////////////////////////////////
        -
        -
        - - - - -
        - -  // uniform chooce on segment made by the parents
        -  eoSegmentCrossover<Indi> xoverS;
        -  // uniform choice in hypercube built by the parents
        -  eoArithmeticCrossover<Indi> xoverA;
        -  // Combine them with relative rates
        -  eoPropCombinedQuadOp<Indi> xover(xoverS, segmentRate);
        -  xover.add(xoverA, arithmeticRate, true);
        -
        -
        - - - - -
        - -  
        -  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
        -  eoUniformMutation<Indi>  mutationU(EPSILON);
        -  // k (=1) coordinates of parents are uniformly modified
        -  eoDetUniformMutation<Indi>  mutationD(EPSILON);
        -  // Combine them with relative rates
        -  eoPropCombinedMonOp<Indi> mutation(mutationU, uniformMutRate);
        -  mutation.add(mutationD, detMutRate, true);
        -  
        -  // The operators are  encapsulated into an eoTRansform object
        -  eoSGATransform<Indi> transform(xover, P_CROSS, mutation, P_MUT);
        -
        -
        - - - - -
        - - -
        - - - - -
        - -  //////////////////////////////////////
        -  // termination conditions: use more than one
        -  /////////////////////////////////////
        -  // stop after MAX_GEN generations
        -  eoGenContinue<Indi> genCont(MAX_GEN);
        -  // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement
        -  eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, STEADY_GEN);
        -  // stop when fitness reaches a target (here VEC_SIZE)
        -  eoFitContinue<Indi> fitCont(0);
        -  // do stop when one of the above says so
        -  eoCombinedContinue<Indi> continuator(genCont);
        -  continuator.add(steadyCont);
        -  continuator.add(fitCont);
        -
        -
        - - - - -
        - -  /////////////////////////////////////////
        -  // the algorithm
        -  ////////////////////////////////////////
        -  // Easy EA requires
        -  // selection, transformation, eval, replacement, and stopping criterion
        -  eoEasyEA<Indi> gga(continuator, eval, select, transform, replace);
        -  // Apply algo to pop - that's it!
        -  cout << "\n              Here we go\n\n";
        -  gga(pop);
        -  
        -
        -
        - - - - -
        - -  // Print (sorted) intial population
        -  pop.sort();
        -  cout << "FINAL Population\n" << pop << endl;
        -
        -
        - - - +
        - -}
        -// A main that catches the exceptions
        -int main(int argc, char **argv)
        -{
        -#ifdef _MSC_VER
        -  //  rng.reseed(42);
        -      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
        -        flag |= _CRTDBG_LEAK_CHECK_DF;
        -      _CrtSetDbgFlag(flag);
        -//    _CrtSetBreakAlloc(100);
        -#endif
        -      try
        -      {
        -              main_function(argc, argv);
        -      }
        -      catch(exception& e)
        -      {
        -              cout << "Exception: " << e.what() << '\n';
        -      }
        -      return 1;
        -}
        -
        } +
        // A main that catches the exceptions +
        int main(int argc, char **argv) +
        { +
        #ifdef _MSC_VER +
         //  rng.reseed(42); +
             int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
               flag +|= _CRTDBG_LEAK_CHECK_DF; +
             _CrtSetDbgFlag(flag); +
        //    _CrtSetBreakAlloc(100); +
        #endif +
             try +
             { +
                     +main_function(argc, argv); +
             } +
             catch(exception& +e) +
             { +
                     +cout << "Exception: " << e.what() << '\n'; +
             } +
             return 1; +
        }
        +
        Back to Lesson 2 - Tutorial main page - Algorithm-Based - Component-Based page - Programming hints - EO @@ -359,8 +346,8 @@ documentation
        Marc Schoenauer
        -
        Last -modified: Wed Nov 29 07:38:36 2000 - + +
        Last modified: Wed Nov +29 07:38:36 2000 From c62521648b86d69c367784ac27fc8c9ce956365c Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 16 Jan 2001 09:49:46 +0000 Subject: [PATCH 0417/2134] Added the shuffle method --- eo/src/eoPop.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 79aa01e01..42f087aa4 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -132,6 +132,16 @@ class eoPop: public vector, public eoObject, public eoPersistent std::sort(begin(), end(), greater()); } + /** + shuffle the population. Use this member to put the population + in random order + */ + void shuffle(void) + { + UF_random_generator gen; + std::random_shuffle(begin(), end(), gen); + } + // creates a vector pointing to the individuals in descending order void sort(vector& result) const { From 585c5435699b951f35df6206941725077ae6c3b7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 17 Jan 2001 05:29:54 +0000 Subject: [PATCH 0418/2134] Modified the link to EO pages so that users can download the development version - as no example works with the current snapshot --- eo/tutorial/html/eoTutorial.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index bb185886b..ca859acf1 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -157,8 +157,8 @@ rather than when you have something urgent to code :-)

      • Before you start -

        You should of course have downloaded and installed the whole EO -library (how did you get this file if not???). +

        You should of course have downloaded and installed the developement version of the whole EO +library. Be careful that the tutorial examples will not work with earlier versions of EO, such as the ones that you can find on the official site.
        So we'll assume that you are now in the Tutorial directory, and that your prompt looks something like

        (myname@myhost) EOdir/Tutorial % From 42ac826f3c21037dbfbcf92a035c49207ac6dfe6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 25 Jan 2001 16:13:15 +0000 Subject: [PATCH 0419/2134] Added ranking selection (eoRankingSelect) and (linear) fitness scaling in proportional selection (a completely different file, eoFitnessScalingSelect.h) --- eo/src/eo | 2 + eo/src/eoFitnessScalingSelect.h | 107 ++++++++++++++++++++++++++++++++ eo/src/eoRankingSelect.h | 90 +++++++++++++++++++++++++++ 3 files changed, 199 insertions(+) create mode 100644 eo/src/eoFitnessScalingSelect.h create mode 100644 eo/src/eoRankingSelect.h diff --git a/eo/src/eo b/eo/src/eo index 38c610106..95b804082 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -104,6 +104,8 @@ #include #include #include +#include +#include #include // the batch selection - from an eoSelectOne #include diff --git a/eo/src/eoFitnessScalingSelect.h b/eo/src/eoFitnessScalingSelect.h new file mode 100644 index 000000000..6155dc561 --- /dev/null +++ b/eo/src/eoFitnessScalingSelect.h @@ -0,0 +1,107 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFitnessScalingSelect.h +// (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoFitnessScalingSelect_h +#define eoFitnessScalingSelect_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** eoFitnessScalingSelect: select an individual proportional to its rank + this is actually the linearRanking +*/ +//----------------------------------------------------------------------------- + +template class eoFitnessScalingSelect: public eoSelectOne +{ +public: + typedef typename EOT::Fitness Fitness; + /** Ctor: + * @param _p the selective pressure, should be in [1,2] (2 is the default) + * @param _pop an optional population + */ + eoFitnessScalingSelect(double _p = 2.0, const eoPop& _pop = eoPop()): + pressure(_p), scaledFitness(0) + { + if (minimizing_fitness()) + throw logic_error("eoFitnessScalingSelect: minimizing fitness"); + if (_pop.size() > 0) // a population in Ctor? initialize scaledFitness + { + setup(_pop); + } + } + + // COmputes the coefficients of the linear transform in such a way that + // Pselect(Best) == pressure/sizePop + // Pselect(average) == 1.0/sizePop + // we truncate negative values to 0 - + // we could also adjust the pressure so that worst get 0 scaled fitness + void setup(const eoPop& _pop) + { + unsigned pSize =_pop.size(); + scaledFitness.resize(pSize); + + // best and worse fitnesses + double bestFitness = static_cast (_pop.best_element().fitness()); + double worstFitness = static_cast (_pop.worse_element().fitness()); + + // average fitness + double sum=0.0; + for (unsigned i=0; i(_pop[i].fitness()); + double averageFitness = sum/pSize; + + // the coefficients for linear scaling + double denom = pSize*(bestFitness - averageFitness); + double alpha = (pressure-1)/denom; + double beta = (bestFitness - pressure*averageFitness)/denom; +// if (beta < 0) +// beta = max(beta, -alpha*worstFitness); + for (unsigned i=0; i& _pop) + { + unsigned selected = rng.roulette_wheel(scaledFitness); + return _pop[selected]; + } + +private : + double pressure; + vector scaledFitness; +}; + +#endif + diff --git a/eo/src/eoRankingSelect.h b/eo/src/eoRankingSelect.h new file mode 100644 index 000000000..ee213dff5 --- /dev/null +++ b/eo/src/eoRankingSelect.h @@ -0,0 +1,90 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRankingSelect.h +// (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRankingSelect_h +#define eoRankingSelect_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + +//----------------------------------------------------------------------------- +/** eoRankingSelect: select an individual proportional to its rank + this is actually the linearRanking +*/ +//----------------------------------------------------------------------------- + +template class eoRankingSelect: public eoSelectOne +{ +public: + /** Ctor: + * @param _p the selective pressure, should be in [1,2] (2 is the default) + * @param _pop an optional population + */ + eoRankingSelect(double _p = 2.0, const eoPop& _pop = eoPop()): + pressure(_p), rank(0), rankFitness(0) + { + if (_pop.size() > 0) + { + setup(_pop); + } + } + + // COmputes the coefficients of the linear transform uin such a way that + // Pselect(Best) == Pselect(sizePop) == pressure/sizePop + // Pselect(average) == 1.0/sizePop + // Pselect(Worst == Pselect(1 == (2-pressure)/sizePop + void setup(const eoPop& _pop) + { + _pop.sort(rank); + unsigned pSize =_pop.size(); + rankFitness.resize(pSize); + double alpha = (2*pressure-2)/(pSize*(pSize-1)); + double beta = (2-pressure)/pSize; + for (unsigned i=0; i& _pop) + { + unsigned selected = rng.roulette_wheel(rankFitness); + return *(rank[selected]); + } + +private : + double pressure; + vector rank; + vector rankFitness; +}; + +#endif + From da6685830866478789dd1252cb1b4b86fe0058bd Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 25 Jan 2001 16:14:25 +0000 Subject: [PATCH 0420/2134] Full t-eoSelect file, that allows to test all selectors feature: generation of files suitable for gnuplot to see how individual spread out --- eo/test/t-eoSelect.cpp | 112 ++++++++++++++++++++++++++++++++--------- 1 file changed, 89 insertions(+), 23 deletions(-) diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index b0bdcbbed..e136e6dc5 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -15,7 +15,7 @@ // general #include -#include +#include //----------------------------------------------------------------------------- struct Dummy : public EO @@ -28,6 +28,10 @@ struct Dummy : public EO } }; +bool operator==(const Dummy & _d1, const Dummy & _d2) +{ + return _d1.fitness() == _d2.fitness(); +} struct eoDummyPop : public eoPop { @@ -35,26 +39,84 @@ public : eoDummyPop(int s=0) { resize(s); } }; +// helper - DOES NOT WORK if different individuals have same fitness!!! +template +unsigned isInPop(EOT & _indi, eoPop & _pop) +{ + for (unsigned i=0; i<_pop.size(); i++) + if (_pop[i] == _indi) + return i; + return _pop.size(); +} + +unsigned int pSize; // global variable, bouh! + +template +void testSelectMany(eoSelect & _select, string _name) +{ + cout << "\n\n" << _name << endl; + cout << "===============\n"; + + eoDummyPop parents(pSize); + eoDummyPop offspring(0); + + // initialize parents + for (unsigned i=0; i nb(parents.size(), 0); + for (unsigned i=0; i(offspring[i], parents); + if (trouve == parents.size()) // pas trouve + throw runtime_error("Pas trouve ds parents"); + nb[trouve]++; + } + // dump to file so you can plot using gnuplot + string fName = _name + ".prop"; + ofstream os(fName.c_str()); + for (unsigned i=0; i " << ( (double)nb[i])/offspring.size() << endl; + os << i << " " << ( (double)nb[i])/offspring.size() << endl; + } + +} + +template +void testSelectOne(eoSelectOne & _select, double _rate, string _name) +{ + eoSelectMany percSelect(_select, _rate); + testSelectMany(percSelect, _name); +} + + //----------------------------------------------------------------------------- int the_main(int argc, char **argv) { eoParser parser(argc, argv); eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); - unsigned int pSize = parentSizeParam.value(); + pSize = parentSizeParam.value(); // global variable eoValueParam offsrpringRateParam = parser.createParam(1.0, "offsrpringRate", "Offsrpring rate",'O'); double oRate = offsrpringRateParam.value(); - eoValueParam interpretAsRateParam = parser.createParam(true, "interpretAsRate", "interpret rate as Rate (False = as Number)",'b'); - bool interpretAsRate = interpretAsRateParam.value(); - eoValueParam tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); unsigned int tSize = tournamentSizeParam.value(); eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); double tRate = tournamentRateParam.value(); + eoValueParam rankingPressureParam = parser.createParam(1.75, "rankingPressure", "Selective pressure for the ranking selection",'p'); + double rankingPressure = rankingPressureParam.value(); + if (parser.userNeedsHelp()) { parser.printHelp(cout); @@ -64,30 +126,34 @@ eoValueParam tournamentSizeParam = parser.createParam detSelect(oRate, interpretAsRate); + eoDetSelect detSelect(oRate); + testSelectMany(detSelect, "detSelect"); - // here we go - // Deterministic - cout << "eoDetSelect\n"; - cout << "===========\n"; - detSelect(parents, offspring); -cout << "Selected offsprings (origonally all even\n" << offspring << endl; + // Roulette + eoProportionalSelect propSelect; + testSelectOne(propSelect, oRate, "propSelect"); + + // Ranking + eoRankingSelect rankSelect(rankingPressure); + testSelectOne(rankSelect, oRate, "rankSelect"); + + // Det tournament + eoDetTournamentSelect detTourSelect(tSize); + testSelectOne(detTourSelect, oRate, "detTourSelect"); + + // Stoch tournament + eoStochTournamentSelect stochTourSelect(tRate); + testSelectOne(stochTourSelect, oRate, "stochTourSelect"); + + // Fitness scaling + eoFitnessScalingSelect fitScaleSelect(rankingPressure); + testSelectOne(fitScaleSelect, oRate, "fitScaleSelect"); return 1; } From ce031f10a3a371f3687009ebfc3dc779d0e66900 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Jan 2001 04:06:09 +0000 Subject: [PATCH 0421/2134] Added eoRandomReduce --- eo/src/eoReduce.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 715a412c0..a653f8ef2 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -60,6 +60,22 @@ template class eoTruncate : public eoReduce } }; +/** random truncation */ +template class eoRandomReduce : public eoReduce +{ + void operator()(eoPop& _newgen, unsigned _newsize) + { + if (_newgen.size() == _newsize) + return; + if (_newgen.size() < _newsize) + throw std::logic_error("eoRandomReduce: Cannot truncate to a larger size!\n"); + + // shuffle the population, then trucate + _newgen.shuffle(); + _newgen.resize(_newsize); + } +}; + /** EP truncation method (some global stochastic tournament + sort) Softer selective pressure than pure truncate From 576249509b15c32413dd80989054bebb860dad6e Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Jan 2001 17:09:33 +0000 Subject: [PATCH 0422/2134] Some includes were missing in eoPop and eoOp that I had not noticed before trying to compile test/t-eoSymreg.cpp --- eo/src/eoOp.h | 2 +- eo/src/eoPop.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index dbeb65b54..5f8e46ea8 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -27,7 +27,7 @@ #include #include #include - +#include /** \defgroup operators Genetic Operators are used for various purposes diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 42f087aa4..076921d32 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -33,6 +33,7 @@ #include // for eoInit #include #include +#include // for shuffle method /** Subpopulation: it is used to move parts of population from one algorithm to another and one population to another. It is safer From 70caa91b2259a6c73425a6689ad61bd430d9b50d Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Jan 2001 17:12:13 +0000 Subject: [PATCH 0423/2134] Typos in comments --- eo/src/eoSteadyFitContinue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index 05a688292..7b3e0ef12 100755 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -63,7 +63,7 @@ public: lastImprovement = thisGeneration; } else { if (thisGeneration - lastImprovement > repSteadyGenerations) { - cout << "STOP in eoSteadyFitContnue: Done " << repSteadyGenerations + cout << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations << " generations without improvement\n"; return false; } @@ -73,7 +73,7 @@ public: steadyState = true; bestSoFar = bestCurrentFitness; lastImprovement = thisGeneration; - cout << "eoSteadyFitContnue: Done the minimum number of generations\n"; + cout << "eoSteadyFitContinue: Done the minimum number of generations\n"; } } return true; From c917207b5d0f03ab669c2c097f45b9fb5309505a Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Jan 2001 18:26:30 +0000 Subject: [PATCH 0424/2134] Added the bounds to all eoRealOp operators (and to the eoNormalMutation). The eoESObjectiveBounds should soon dissapear!! --- eo/src/es/eoNormalMutation.h | 22 ++- eo/src/es/eoRealBounds.h | 359 +++++++++++++++++++++++++---------- eo/src/es/eoRealOp.h | 174 +++++++++++++++-- 3 files changed, 434 insertions(+), 121 deletions(-) diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index cc3276e8a..922ee6aa9 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -33,12 +33,16 @@ #include #include #include - +#include //----------------------------------------------------------------------------- /** Simple normal mutation of a vector of real values. * The stDev is fixed - but it is passed ans stored as a reference, * to enable dynamic mutations (see eoOenFithMutation below). + * + * As for the bounds, the values are here folded back into the bounds. + * The other possiblity would be to iterate until we fall inside the bounds - + * but this sometimes takes a long time!!! */ template class eoNormalMutation: public eoMonOp @@ -46,11 +50,23 @@ template class eoNormalMutation: public eoMonOp public: /** * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * * @param _sigma the range for uniform nutation * @param _p_change the probability to change a given coordinate */ eoNormalMutation(double & _sigma, const double& _p_change = 1.0): - sigma(_sigma), p_change(_p_change) {} + sigma(_sigma), bounds(eoDummyVectorNoBounds), p_change(_p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoNormalMutation(eoRealVectorBounds & _bounds, + double & _sigma, const double& _p_change = 1.0): + sigma(_sigma), bounds(_bounds), p_change(_p_change) {} /// The class name. string className() const { return "eoNormalMutation"; } @@ -67,6 +83,7 @@ template class eoNormalMutation: public eoMonOp if (rng.flip(p_change)) { _eo[lieu] += sigma*rng.normal(); + bounds.foldsInBounds(lieu, _eo[lieu]); hasChanged = true; } } @@ -77,6 +94,7 @@ template class eoNormalMutation: public eoMonOp protected: double & sigma; private: + eoRealVectorBounds & bounds; double p_change; }; diff --git a/eo/src/es/eoRealBounds.h b/eo/src/es/eoRealBounds.h index 1ddf99831..97b5f5515 100644 --- a/eo/src/es/eoRealBounds.h +++ b/eo/src/es/eoRealBounds.h @@ -30,11 +30,6 @@ /** \defgroup EvolutionStrategies - Various classes for the initialization and mutation of real valued vectors. - - Supports simple mutations and various more adaptable mutations, including - correlated mutations. - */ @@ -42,33 +37,113 @@ \class eoRealBounds eoRealBounds.h es/eoRealBounds.h \ingroup EvolutionStrategies - Defines the minima and maxima for real variables + Defines bound classes for real numbers. + +Scalar type: +------------ +Basic class is eoRealBounds, a pure virtual. + +The following pure virtual methods are to be used in mutations: +- void foldsInBounds(double &) that folds any value that falls out of + the bounds back into the bounds, by bouncing on the limit (if any) +- bool isInBounds(double &) that simply says whether or not the argument + is in the bounds + +So mutation can choose whetehr they want to iterate trying until +they fall in bounds, or only try once and "repair" by using +the foldsInBounds method + +There is also a uniform() method that generates a uniform value +(if possible, i.e. if bounded) in the interval. + +Derived class are + eoRealInterval, that holds a minimum and maximum value + eoRealNoBounds, that implements the "unbounded bounds" + +TODO: the eoRealMinBound and eoRealMaxBound that implement + the half-bounded intervals. + +Vector type: +------------ +Class eoRealVectorBounds implements the vectorized version: +it is basically a vector of eoRealBounds * and forwards all request +to the elements of the vector. */ -class eoBaseRealBounds : public eoUF -{ }; +class eoRealBounds +{ +public: + virtual bool isBounded(void) = 0; + virtual bool isMinBounded(void) = 0; + virtual bool isMaxBounded(void) = 0; + virtual void foldsInBounds(double &) = 0; + virtual bool isInBounds(double) = 0; -class eoRealBounds : public eoBaseRealBounds + // accessors + virtual double minimum() = 0; + virtual double maximum() = 0; + virtual double range() = 0; + + // random generators + virtual double uniform(eoRng & _rng = eo::rng) = 0; +}; + +class eoRealNoBounds : public eoRealBounds +{ +public: + virtual ~eoRealNoBounds(){} + + virtual bool isBounded(void) {return false;} + virtual bool isMinBounded(void) {return false;} + virtual bool isMaxBounded(void) {return false;} + virtual void foldsInBounds(double &) {return;} + virtual bool isInBounds(double) {return true;} + + // accessors + virtual double minimum() + { + throw logic_error("Trying to get minimum of unbounded eoRealBounds"); + } + virtual double maximum() + { + throw logic_error("Trying to get maximum of unbounded eoRealBounds"); + } + virtual double range() + { + throw logic_error("Trying to get range of unbounded eoRealBounds"); + } + + // random generators + virtual double uniform(eoRng & _rng = eo::rng) + { + throw logic_error("Trying to generate uniform values in unbounded eoRealBounds"); + } +}; + +/* fully bounded == interval */ +class eoRealInterval : public eoRealBounds { public : /** Simple bounds = minimum and maximum (allowed) */ - eoRealBounds(double _min=0, double _max=1) : + eoRealInterval(double _min=0, double _max=1) : repMinimum(_min), repMaximum(_max), repRange(_max-_min) { if (repRange<=0) throw std::logic_error("Void range in eoRealBounds"); } - - double Minimum() { return repMinimum; } - double Maximum() { return repMaximum; } - double Range() { return repRange; } - // for backward compatibility - double minimum() { return repMinimum; } - double maximum() { return repMaximum; } - double range() { return repRange; } + + // accessors + virtual double minimum() { return repMinimum; } + virtual double maximum() { return repMaximum; } + virtual double range() { return repRange; } + + // description + virtual bool isBounded(void) {return true;} + virtual bool isMinBounded(void) {return true;} + virtual bool isMaxBounded(void) {return true;} double uniform(eoRng & _rng = eo::rng) { @@ -76,7 +151,7 @@ public : } // says if a given double is within the bounds - bool operator()(double _r) + virtual bool isInBounds(double _r) { if (_r < repMinimum) return false; @@ -85,6 +160,35 @@ public : return true; } + // folds a value into bounds + void foldsInBounds(double & _r) + { + long iloc; + double dlargloc = 2 * range() ; + + if (fabs(_r) > 1.0E9) // iloc too large! + { + _r = uniform(); + return; + } + + if ( (_r > maximum()) ) + { + iloc = (long) ( (_r-minimum()) / dlargloc ) ; + _r -= dlargloc * iloc ; + if ( _r > maximum() ) + _r = 2*maximum() - _r ; + } + + if (_r < minimum()) + { + iloc = (long) ( (maximum()-_r) / dlargloc ) ; + _r += dlargloc * iloc ; + if (_r < minimum()) + _r = 2*minimum() - _r ; + } + } + private : double repMinimum; double repMaximum; @@ -94,16 +198,18 @@ private : // now the vectorized version -class eoRealVectorBounds -{ -public : - +class eoRealVectorBounds : public vector +{ +public: + // virtual desctructor (to avoid warining?) + virtual ~eoRealVectorBounds(){} + /** Simple bounds = minimum and maximum (allowed) */ // Ctor: same bonds for everybody, explicit eoRealVectorBounds(unsigned _dim, double _min=0, double _max=1) : - vecMinimum(_dim, _min), vecMaximum(_dim, _max), vecRange(_dim, _max-_min) + vector(_dim, new eoRealInterval(_min, _max)) { if (_max-_min<=0) throw std::logic_error("Void range in eoRealVectorBounds"); @@ -111,114 +217,165 @@ public : // Ctor: same bonds for everybody, given as a eoRealBounds eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : - vecMinimum(_dim, _bounds.Minimum()), - vecMaximum(_dim, _bounds.Maximum()), - vecRange(_dim, _bounds.Range()) + vector(_dim, &_bounds) {} // Ctor: different bonds for different variables, vectors of double - eoRealVectorBounds(vector _min, vector _max) : - vecMinimum(_min), vecMaximum(_max), vecRange(_min.size()) + eoRealVectorBounds(vector _min, vector _max) { if (_max.size() != _min.size()) throw std::logic_error("Dimensions don't match in eoRealVectorBounds"); for (unsigned i=0; i<_min.size(); i++) { - vecRange[i]=_max[i]-_min[i]; - if (vecRange[i]<=0) - throw std::logic_error("Void range in eoRealVectorBounds"); + push_back( new eoRealInterval(_min[i], _max[i])); } } // Ctor, particular case of dim-2 eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : - vecMinimum(2), vecMaximum(2), vecRange(2) + vector(0) { - vecMinimum[0] = _xbounds.Minimum(); - vecMaximum[0] = _xbounds.Maximum(); - vecRange[0] = _xbounds.Range(); - vecMinimum[1] = _ybounds.Minimum(); - vecMaximum[1] = _ybounds.Maximum(); - vecRange[1] = _ybounds.Range(); + push_back( &_xbounds); + push_back( &_ybounds); } - // not a ctor, but usefull to initialize, too - // is it safe to call it push_back? Maybe not, but it's meaningful! - void push_back(double _min=0, double _max=1) + virtual bool isBounded(unsigned _i) + { + return (*this)[_i]->isBounded(); + } + + // bounded iff all are bounded + virtual bool isBounded(void) { - vecMinimum.push_back(_min); - vecMaximum.push_back(_max); - if (_max-_min <= 0) - throw std::logic_error("Void range in eoRealVectorBounds::add"); - vecRange.push_back(_max-_min); + for (unsigned i=0; iisBounded()) + return false; + return true; } - void push_back(eoRealBounds & _bounds) + // these do not make any sense as vectors! + virtual bool isMinBounded(unsigned _i) + { return (*this)[_i]->isMinBounded();} ; + + virtual bool isMaxBounded(unsigned _i) + { return (*this)[_i]->isMaxBounded();} ; + + virtual void foldsInBounds(unsigned _i, double & _r) { - vecMinimum.push_back(_bounds.Minimum()); - vecMaximum.push_back(_bounds.Maximum()); - vecRange.push_back(_bounds.Range()); + (*this)[_i]->foldsInBounds(_r); } - // accessors - following rule that says that method start are capitalized - double Minimum(unsigned _i) { return vecMinimum[_i]; } - double Maximum(unsigned _i) { return vecMaximum[_i]; } - double Range(unsigned _i) { return vecRange[_i]; } - - // accessors - for backward compatibility - double minimum(unsigned _i) { return vecMinimum[_i]; } - double maximum(unsigned _i) { return vecMaximum[_i]; } - double range(unsigned _i) { return vecRange[_i]; } - - // handy: get the size - unsigned int size() { return vecMinimum.size();} - - // returns a value uniformly chosen in bounds for a given variable - double uniform(unsigned _i, eoRng & _rng = eo::rng) + virtual void foldsInBounds(vector & _v) { - return vecMinimum[_i] + _rng.uniform(vecRange[_i]); - } + for (unsigned i=0; i uniform(eoRng & _rng = eo::rng) + virtual bool isInBounds(unsigned _i, double _r) + { return (*this)[_i]->isInBounds(_r); } + + // isInBounds iff all are in bouds + virtual bool isInBounds(vector _v) { - vector v(vecMinimum.size()); - for (unsigned i=0; iminimum();} + virtual double maximum(unsigned _i) {return (*this)[_i]->maximum();} + virtual double range(unsigned _i) {return (*this)[_i]->range();} + + virtual double averageRange() + { + double r=0.0; + for (unsigned i=0; iuniform(); + return r; + } // fills a vector with uniformly chosen variables in bounds void uniform(vector & _v, eoRng & _rng = eo::rng) { - _v.resize(vecMinimum.size()); - for (unsigned i=0; i vecMaximum[_i]) - return false; - return true; - } - - // check the bounds for a vector: true only if ALL ar ein bounds - bool operator()(vector & _v) - { - for (unsigned i=0; i<_v.size(); i++) - if (! operator()(i, _v[i]) ) // out of bound - return false; - return true; - } -private : - vector vecMinimum; - vector vecMaximum; - vector vecRange; // to minimize operations ??? }; +// the dummy unbounded eoRealVectorBounds: + +class eoRealVectorNoBounds: public eoRealVectorBounds +{ +public: + // virtual desctructor (to avoid warining?) + virtual ~eoRealVectorNoBounds(){} + + /** + Simple bounds = minimum and maximum (allowed) + */ + // Ctor: nothing to do! + eoRealVectorNoBounds(unsigned _dim=0) : eoRealVectorBounds(_dim) {} + + + virtual bool isBounded(unsigned) {return false;} + virtual bool isBounded(void) {return false;} + virtual bool isMinBounded(unsigned) {return false;} + virtual bool isMaxBounded(unsigned) {return false;} + + virtual void foldsInBounds(unsigned, double &) {return;} + virtual void foldsInBounds(vector &) {return;} + + virtual bool isInBounds(unsigned, double) {return true;} + virtual bool isInBounds(vector) {return true;} + + // accessors + virtual double minimum(unsigned) + { + throw logic_error("Trying to get minimum of unbounded eoRealBounds"); + } + virtual double maximum(unsigned) + { + throw logic_error("Trying to get maximum of unbounded eoRealBounds"); + } + virtual double range(unsigned) + { + throw logic_error("Trying to get range of unbounded eoRealBounds"); + } + + virtual double averageRange() + { + throw logic_error("Trying to get average range of unbounded eoRealBounds"); + } + + // random generators + virtual double uniform(unsigned, eoRng & _rng = eo::rng) + { + throw logic_error("No uniform distribution on unbounded eoRealBounds"); + } + + // fills a vector with uniformly chosen variables in bounds + void uniform(vector &, eoRng & _rng = eo::rng) + { + throw logic_error("No uniform distribution on unbounded eoRealBounds"); + } + +}; + +// one object for all +eoRealNoBounds eoDummyRealNoBounds; +eoRealVectorNoBounds eoDummyVectorNoBounds; #endif diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 1cdef1cd3..586453a52 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -31,6 +31,7 @@ #include // swap_ranges #include #include +#include //----------------------------------------------------------------------------- @@ -46,11 +47,23 @@ template class eoUniformMutation: public eoMonOp public: /** * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): - epsilon(_epsilon), p_change(_p_change) {} + bounds(eoDummyVectorNoBounds), epsilon(_epsilon), p_change(_p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _epsilon the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const double& _p_change = 1.0): + bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} /// The class name. string className() const { return "eoUniformMutation"; } @@ -66,7 +79,14 @@ template class eoUniformMutation: public eoMonOp { if (rng.flip(p_change)) { - _eo[lieu] += 2*epsilon*rng.uniform()-epsilon; + // check the bounds + double emin = _eo[lieu]-epsilon; + double emax = _eo[lieu]+epsilon; + if (bounds.isMinBounded(lieu)) + emin = max(bounds.minimum(lieu), emin); + if (bounds.isMaxBounded(lieu)) + emax = min(bounds.maximum(lieu), emax); + _eo[lieu] = emin + (emax-emin)*rng.uniform(); hasChanged = true; } } @@ -75,6 +95,7 @@ template class eoUniformMutation: public eoMonOp } private: + eoRealVectorBounds & bounds; double epsilon; double p_change; }; @@ -94,7 +115,17 @@ template class eoDetUniformMutation: public eoMonOp * @param number of coordinate to modify */ eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): - epsilon(_epsilon), no(_no) {} + bounds(eoDummyVectorNoBounds), epsilon(_epsilon), no(_no) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _epsilon the range for uniform nutation + * @param number of coordinate to modify + */ + eoDetUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const unsigned& _no = 1): + bounds(_bounds), epsilon(_epsilon), no(_no) {} /// The class name. string className() const { return "eoDetUniformMutation"; } @@ -110,11 +141,20 @@ template class eoDetUniformMutation: public eoMonOp { unsigned lieu = rng.random(_eo.size()); // actually, we should test that we don't re-modify same variable! - _eo[lieu] += 2*epsilon*rng.uniform()-epsilon; + + // check the bounds + double emin = _eo[lieu]-epsilon; + double emax = _eo[lieu]+epsilon; + if (bounds.isMinBounded(lieu)) + emin = max(bounds.minimum(lieu), emin); + if (bounds.isMaxBounded(lieu)) + emax = min(bounds.maximum(lieu), emax); + _eo[lieu] = emin + (emax-emin)*rng.uniform(); } } private: + eoRealVectorBounds & bounds; double epsilon; unsigned no; }; @@ -133,12 +173,27 @@ template class eoSegmentCrossover: public eoQuadraticOp public: /** * (Default) Constructor. - * @param _alpha the amount of exploration OUTSIDE the parents + * The bounds are initialized with the global object that says: no bounds. + * + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application + * Must be positive */ eoSegmentCrossover(const double& _alpha = 0.0) : - alpha(_alpha), range(1+2*alpha) {} + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoSegmentCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0) : + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} /// The class name. string className() const { return "eoSegmentCrossover"; } @@ -152,7 +207,35 @@ template class eoSegmentCrossover: public eoQuadraticOp { unsigned i; double r1, r2, fact; - fact = rng.uniform(range); // in [0,range) + double alphaMin = -alpha; + double alphaMax = 1+alpha; + if (alpha == 0.0) // no check to perform + fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) + else // look for the bounds for fact + { + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise you'll get NAN's + double rmin = min(r1, r2); + double rmax = max(r1, r2); + double length = rmax - rmin; + if (bounds.isMinBounded(i)) + { + alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + } + if (bounds.isMaxBounded(i)) + { + alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + } + } + } + fact = alphaMin + (alphaMax-alphaMin)*rng.uniform(); + } + for (i=0; i<_eo1.size(); i++) { r1=_eo1[i]; @@ -165,6 +248,7 @@ template class eoSegmentCrossover: public eoQuadraticOp } protected: + eoRealVectorBounds & bounds; double alpha; double range; // == 1+2*alpha }; @@ -180,12 +264,35 @@ template class eoArithmeticCrossover: public eoQuadraticOp public: /** * (Default) Constructor. - * @param _alpha the amount of exploration OUTSIDE the parents + * The bounds are initialized with the global object that says: no bounds. + * + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application + * Must be positive */ eoArithmeticCrossover(const double& _alpha = 0.0): - alpha(_alpha), range(1+2*alpha) {} + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) + { + if (_alpha < 0) + throw runtime_error("BLX coefficient should be positive"); + } + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoArithmeticCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0): + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) + { + if (_alpha < 0) + throw runtime_error("BLX coefficient should be positive"); + } /// The class name. string className() const { return "eoArithmeticCrossover"; } @@ -199,19 +306,50 @@ template class eoArithmeticCrossover: public eoQuadraticOp { unsigned i; double r1, r2, fact; - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - fact = rng.uniform(range); // in [0,range) - _eo1[i] = fact * r1 + (1-fact) * r2; - _eo2[i] = (1-fact) * r1 + fact * r2; - } + if (alpha == 0.0) // no check to perform + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + } + else // check the bounds + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise you'll get NAN's + double rmin = min(r1, r2); + double rmax = max(r1, r2); + double length = rmax - rmin; + double alphaMin = -alpha; + double alphaMax = 1+alpha; + // first find the limits on the alpha's + if (bounds.isMinBounded(i)) + { + alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + } + if (bounds.isMaxBounded(i)) + { + alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + } + fact = alphaMin + rng.uniform(alphaMax-alphaMin); + _eo1[i] = fact * rmin + (1-fact) * rmax; + _eo2[i] = (1-fact) * rmin + fact * rmax; + } + } + _eo1.invalidate(); + _eo2.invalidate(); } protected: + eoRealVectorBounds & bounds; double alpha; - double range; // == 1+2*alpha + double range; // == 1+2*alphaMin }; From 8aad8f547cf832f048793c13b28cf3ae383046ca Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 27 Jan 2001 07:33:55 +0000 Subject: [PATCH 0425/2134] A few mistakes corrected - and some comments on the setup method --- eo/tutorial/html/eoEngine.html | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 35ae194c1..468d4191b 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -159,9 +159,12 @@ paradigm).

        Note: some procedures for selecting a single individual require some pre-processing of the whole population that takes place before any selection, and will be repeated identically -for every individual. The encapsulation of an  into an  allows -to call such technical processing only once through the use of method setup -of class . This method does nothing by default, but is mandatory +for every individual. The encapsulation of an eoSelectOne +into an eoSelectMany allows to call such technical +processing only once through a call to the setup method of class eoSelectOne. +This method does nothing by default, but is implemented for instance in +eoProportionalSelect (the roulette wheel-selection) to compute only once +the total of the fitnesses of all individuals in the population.



        eoSelect: Other @@ -241,6 +244,8 @@ and you can probably guess what each of them actually does :-)
         

          +
          +
         

        Available instances of eoMergeReduce replacement include

          @@ -310,7 +315,9 @@ size. Available instances of eoSurviveAndDieReplace are limited todayto the eoDeterministicSaDReplacement, the  that uses a deterministic MergeReduce. -


          Note: The basic use (and initial +
            +

            +

          Note: The basic use (and initial motivation) for eoSurviveAndDie takes 2 arguments, an eoMergeReduce and a number of surviving parents. It starts by copying the best parents to the new populations, then merges From 41ff11bd7fc8368d024fcdfb76f2f1493372a3a7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 27 Jan 2001 07:41:46 +0000 Subject: [PATCH 0426/2134] I have separated the include files into eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) To be continued by gp.h, and ... This has lead to some slight modifications in test file eobin and all tutorial examples files... --- eo/src/eo | 43 +++++------------------------ eo/src/eoGenericQuadOp.h | 2 +- eo/src/es/eoEsChromInit.h | 29 ++++++++++--------- eo/src/es/eoRealBounds.h | 8 ++++-- eo/test/t-eobin.cpp | 4 +-- eo/tutorial/Lesson1/FirstBitGA.cpp | 7 +++++ eo/tutorial/Lesson1/FirstRealGA.cpp | 2 ++ eo/tutorial/Lesson1/exercise1.3.cpp | 2 ++ eo/tutorial/Lesson2/FirstBitEA.cpp | 2 ++ eo/tutorial/Lesson2/FirstRealEA.cpp | 2 ++ eo/tutorial/Lesson2/exercise2.3.cpp | 2 ++ eo/tutorial/Lesson3/SecondBitEA.cpp | 2 ++ eo/tutorial/Lesson3/exercise3.1.cpp | 2 ++ 13 files changed, 51 insertions(+), 56 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 95b804082..b3c5149dc 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -61,46 +61,26 @@ #include #include -//#include - -//#include -//#include #include -#include -#include #include -//#include -//#include -//#include #include -//#include -//#include -//#include -//#include -//#include -//#include - #include -#include -#include -#include // Evaluation functions #include #include -// Continuators -// #include // already included in the following +// Continuators - all include eoContinue.h #include #include #include #include // Selection -// the eoSelectOne +// the eoSelectOne's #include #include #include @@ -111,7 +91,9 @@ #include #include #include -// other batch selections +// other batch selections +// DetSelect probably shoudl be turned into an eoSelectOne +// (using setup and an index) #include @@ -127,14 +109,7 @@ #include #include -//#include -//#include -//#include -//#include -//#include - -//#include - +// a simple transformer #include // Algorithms @@ -151,16 +126,12 @@ #include // aliens -//#include #include //----------------------------------------------------------------------------- // to be continued ... //----------------------------------------------------------------------------- -/* -//#include -//#include -*/ + //----------------------------------------------------------------------------- #endif _eo_ diff --git a/eo/src/eoGenericQuadOp.h b/eo/src/eoGenericQuadOp.h index 0df6b966d..95b3667de 100644 --- a/eo/src/eoGenericQuadOp.h +++ b/eo/src/eoGenericQuadOp.h @@ -50,7 +50,7 @@ class eoGenericQuadOp: public eoOp, public eoBF public: /// Ctor eoGenericQuadOp() - : eoOp( eoOp::binary ) {}; + : eoOp( eoOp::quadratic ) {}; virtual string className() const {return "eoGenericQuadOp";}; }; diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 41fa33ba4..43a61af0d 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -27,7 +27,7 @@ #ifndef _eoEsChromInit_H #define _eoEsChromInit_H -#include +#include #include #include #include @@ -59,7 +59,7 @@ class eoEsChromInit : public eoInit public : typedef typename EOT::Fitness FitT; - eoEsChromInit(eoEsObjectiveBounds& _bounds) : bounds(_bounds) + eoEsChromInit(eoRealVectorBounds& _bounds) : bounds(_bounds) {} void operator()(EOT& _eo) @@ -71,29 +71,28 @@ private : eoEsSimple& create(eoEsSimple& result) { - result.resize(bounds.chromSize()); + result.resize(bounds.size()); - for (unsigned i = 0; i < result.size(); ++i) - { - result[i] = bounds.minimum(i) + rng.uniform(bounds.maximum(i) - bounds.minimum(i)); - } + bounds.uniform(result); + + result.stdev = 0.3*bounds.averageRange(); // 0.3 should be read as a parameter return result; } eoEsStdev create(eoEsStdev& result) { - unsigned chromSize = bounds.chromSize(); + unsigned chromSize = bounds.size(); result.resize(chromSize); result.stdevs.resize(chromSize); + bounds.uniform(result); for (unsigned i = 0; i < chromSize; ++i) { - double length = bounds.maximum(i) - bounds.minimum(i); - result[i] = bounds.minimum(i) + rng.uniform(length); - - // Just a guess at the stdevs (anyone a better idea?) - result.stdevs[i] = rng.uniform(length); + // uniformly in [0.2,0.4) + // scaled by the range of the object variable) + // Just a guess (anyone a better idea?) + result.stdevs[i] = bounds.range(i) * (0.2 + 0.2*eo::rng.uniform()); } return result; @@ -101,7 +100,7 @@ private : eoEsFull create(eoEsFull& result) { - unsigned chromSize = bounds.chromSize(); + unsigned chromSize = bounds.size(); result.resize(chromSize); result.stdevs.resize(chromSize); @@ -128,7 +127,7 @@ private : return result; } - eoEsObjectiveBounds& bounds; + eoRealVectorBounds& bounds; }; #endif diff --git a/eo/src/es/eoRealBounds.h b/eo/src/es/eoRealBounds.h index 97b5f5515..19b4c1e90 100644 --- a/eo/src/es/eoRealBounds.h +++ b/eo/src/es/eoRealBounds.h @@ -204,11 +204,15 @@ public: // virtual desctructor (to avoid warining?) virtual ~eoRealVectorBounds(){} + // Default Ctor + eoRealVectorBounds() : + vector(0) {} + /** Simple bounds = minimum and maximum (allowed) */ // Ctor: same bonds for everybody, explicit - eoRealVectorBounds(unsigned _dim, double _min=0, double _max=1) : + eoRealVectorBounds(unsigned _dim, double _min, double _max) : vector(_dim, new eoRealInterval(_min, _max)) { if (_max-_min<=0) @@ -328,7 +332,7 @@ public: Simple bounds = minimum and maximum (allowed) */ // Ctor: nothing to do! - eoRealVectorNoBounds(unsigned _dim=0) : eoRealVectorBounds(_dim) {} + eoRealVectorNoBounds(unsigned _dim=0) {} virtual bool isBounded(unsigned) {return false;} diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 55dee20b7..feee305d3 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -25,8 +25,8 @@ #include // cout #include // ostrstream, istrstream -#include // eoBin - +#include // general EO +#include // bitstring representation & operators #include "binary_value.h" //----------------------------------------------------------------------------- diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index 97b5a0f89..1ea79a766 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -16,6 +16,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators // define your individuals typedef eoBin Indi; // A bitstring with fitness double @@ -87,6 +89,11 @@ void main_function(int argc, char **argv) // Print (sorted) intial population (raw printout) cout << "Initial Population" << endl; cout << pop; + // shuffle - this is a test + pop.shuffle(); + // Print (sorted) intial population (raw printout) + cout << "Shuffled Population" << endl; + cout << pop; // ENGINE ///////////////////////////////////// diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index f1b719a6c..5e1c69e4d 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -16,6 +16,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // real-representation & operators // define your individuals typedef eoReal Indi; diff --git a/eo/tutorial/Lesson1/exercise1.3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp index c0c248c80..f2e03652c 100644 --- a/eo/tutorial/Lesson1/exercise1.3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -17,6 +17,8 @@ #include //----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators // define your individuals typedef eoBin Indi; // A bitstring with fitness double diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index 0c34adae6..a5b3e0dee 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -16,6 +16,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators // define your individuals typedef eoBin Indi; // A bitstring with fitness double diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 7c5b45808..934fb0c35 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -16,6 +16,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // real-valued representation & operators // define your individuals typedef eoReal Indi; diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index 489956985..09b6bbc01 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -16,6 +16,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators // define your individuals typedef eoBin Indi; // A bitstring with fitness double diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 5ec568828..60412fb18 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -20,6 +20,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators // define your genotype and fitness types typedef eoBin Indi; diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 66532bb96..5264002e8 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -21,6 +21,8 @@ // REPRESENTATION //----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators // define your genotype and fitness types typedef eoBin Indi; From 72e959054419a439f0643f4be6a7dd7926e4afec Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 27 Jan 2001 07:43:58 +0000 Subject: [PATCH 0427/2134] I have separated the include files into eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) To be continued by gp.h, and ... This has lead to some slight modifications in test file eobin and all tutorial examples files... I've also added in utils eoDistance, generic functor to compute distances, including also the generic Euclidian distance --- eo/src/utils/eoDistance.h | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 eo/src/utils/eoDistance.h diff --git a/eo/src/utils/eoDistance.h b/eo/src/utils/eoDistance.h new file mode 100644 index 000000000..84b9d124c --- /dev/null +++ b/eo/src/utils/eoDistance.h @@ -0,0 +1,63 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDistance.h +// (c) GeNeura Team, 1998, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDistance_H +#define _eoDistance_H + +#include + +/** + This is a generic class for distance functors: + takes 2 things ane returns a double +*/ +template< class EOT > +class eoDistance : public eoBF +{}; + +/** + This is a generic class for Euclidain distance computation: + assumes the 2 things are vectors of something that is double-castable +*/ + +template< class T > +class eoQuadDistance : public eoDistance > +{ +public: + double operator()(const vector & _v1, const vector & _v2) + { + double sum=0.0; + for (unsigned i=0; i<_v1.size(); i++) + { + double r = static_cast (_v1[i]) - static_cast (_v2[i]); + sum += r*r; + } + return sum; + } +}; + + + + +#endif From c015b82506440fe9a8b431076625ee9f78830aab Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 27 Jan 2001 07:46:07 +0000 Subject: [PATCH 0428/2134] Added eoGenericRealOp.h that are the exact copy of the operators of eoReaOp.h, but in generic format. They are used at the omoment only in eoEsStdevXOver.h that calls a crossover on the object variables, then a crossover on teh stdev vectors! A piece of cake :-) --- eo/src/es/eoEsStdevXOver.h | 83 +++++++ eo/src/es/eoGenericRealOp.h | 423 ++++++++++++++++++++++++++++++++++++ 2 files changed, 506 insertions(+) create mode 100644 eo/src/es/eoEsStdevXOver.h create mode 100644 eo/src/es/eoGenericRealOp.h diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h new file mode 100644 index 000000000..fd3b37fcd --- /dev/null +++ b/eo/src/es/eoEsStdevXOver.h @@ -0,0 +1,83 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsStdevXOver.h +// (c) GeNeura Team, 2000 - Maarten Keijzer 2000 - Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsStdevXOver_h +#define _eoEsStdevXOver_h + +#include +#include + +/** +\ingroup EvolutionStrategies + +Crossover for Evolutionary strategie style representation, + supporting co-evolving standard deviations. + +Simply calls a crossover for the object variables, + and a crossover for teh StdDev +*/ + +template +class eoEsStdevXOver : public eoQuadraticOp +{ +public : + eoEsStdevXOver(eoGenericQuadOp > & _objectXOver, + eoGenericQuadOp > & _stdDevXOver) : + objectXOver(_objectXOver), stdDevXOver(_stdDevXOver) {} + + std::string className(void) const { return "eoEsStdevXOver"; } + + void operator()(EOT & _eo1, EOT & _eo2) + { + bool objectChanged = objectXOver(_eo1, _eo2); // as vector + bool stdDevChanged = stdDevXOver(_eo1.stdevs, _eo2.stdevs); + if ( objectChanged || stdDevChanged ) + { + _eo1.invalidate(); + _eo2.invalidate(); + } + } + +private: + eoGenericQuadOp > & objectXOver; + eoGenericQuadOp > & stdDevXOver; +}; + +/* A question: it seems it really makes no difference to have + as template the fitness (and use eoEsStdev where you need EOs) or + directly the EOT itself. But of course if the EOT you use does not have + a stdev public member the compiler will crash. + There is a difference, however, in the calling instruction, because in + on case you have to write eoEsStdevXOver whereas otherwise you + simply write eoEsStdevXOver (if Indi has been typedef'ed correctly). + So to keep everything (or almost :-) in the main program templatized + with the Indi i've kept here the EOT template. + +Are there arguments against that??? +MS - Marc.Schoenauer@polytechnique.fr +*/ + +#endif diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h new file mode 100644 index 000000000..88aa5a296 --- /dev/null +++ b/eo/src/es/eoGenericRealOp.h @@ -0,0 +1,423 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenericRealOp.h +// (c) EEAAX 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoGenericRealOp_h +#define eoGenericRealOp_h + +//----------------------------------------------------------------------------- +/** This file contains the generic operators that are the equivalent of those +in eoRealOp.h. +So they can be used when part of the genotype is a vector ... +In the long run, they should replace completely the operators from eoRealOp +when all constructs using eoOp will be able to use the corresponding +eoGenericOp - as it is already done in eoProportinoalCombinedOp +MS January 25. 2001 +*/ + +#include // swap_ranges +#include +#include +#include +#include + +//----------------------------------------------------------------------------- + +/** eoUniformMutation --> changes all values of the vector + by uniform choice with range epsilon + with probability p_change per variable +\class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoGenericUniformMutation: public eoGenericMonOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _epsilon the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoGenericUniformMutation(const double& _epsilon, + const double& _p_change = 1.0): + bounds(eoDummyVectorNoBounds), epsilon(_epsilon), p_change(_p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _epsilon the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoGenericUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const double& _p_change = 1.0): + bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} + + /// The class name. + string className() const { return "eoGenericUniformMutation"; } + + /** + * Do it! + * @param _eo The cromosome undergoing the mutation + */ + bool operator()(EOT& _eo) + { + bool hasChanged=false; + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + { + if (rng.flip(p_change)) + { + // check the bounds + double emin = _eo[lieu]-epsilon; + double emax = _eo[lieu]+epsilon; + if (bounds.isMinBounded(lieu)) + emin = max(bounds.minimum(lieu), emin); + if (bounds.isMaxBounded(lieu)) + emax = min(bounds.maximum(lieu), emax); + _eo[lieu] = emin + (emax-emin)*rng.uniform(); + hasChanged = true; + } + } + if (hasChanged) + return true; + return false; + } + +private: + eoRealVectorBounds & bounds; + double epsilon; + double p_change; +}; + +/** eoDetUniformMutation --> changes exactly k values of the vector + by uniform choice with range epsilon +\class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoGenericDetUniformMutation: + public eoGenericMonOp +{ + public: + /** + * (Default) Constructor. + * @param _epsilon the range for uniform nutation + * @param number of coordinate to modify + */ + eoGenericDetUniformMutation(const double& _epsilon, + const unsigned& _no = 1): + bounds(eoDummyVectorNoBounds), epsilon(_epsilon), no(_no) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _epsilon the range for uniform nutation + * @param number of coordinate to modify + */ + eoGenericDetUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const unsigned& _no = 1): + bounds(_bounds), epsilon(_epsilon), no(_no) {} + + /// The class name. + string className() const { return "eoGenericDetUniformMutation"; } + + /** + * Do it! + * @param _eo The cromosome undergoing the mutation + */ + bool operator()(EOT& _eo) + { + for (unsigned i=0; i uniform choice in segment + == arithmetical with same value along all coordinates +\class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoGenericSegmentCrossover: public eoGenericQuadOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoGenericSegmentCrossover(const double& _alpha = 0.0) : + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoGenericSegmentCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0) : + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} + + /// The class name. + string className() const { return "eoGenericSegmentCrossover"; } + + /** + * segment crossover - modifies both parents + * @param _eo1 The first parent + * @param _eo2 The first parent + */ + bool operator()(EOT& _eo1, EOT& _eo2) + { + unsigned i; + double r1, r2, fact; + double alphaMin = -alpha; + double alphaMax = 1+alpha; + if (alpha == 0.0) // no check to perform + fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) + else // look for the bounds for fact + { + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise you'll get NAN's + double rmin = min(r1, r2); + double rmax = max(r1, r2); + double length = rmax - rmin; + if (bounds.isMinBounded(i)) + { + alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + } + if (bounds.isMaxBounded(i)) + { + alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + } + } + } + fact = alphaMin + (alphaMax-alphaMin)*rng.uniform(); + } + + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + } + return true; // shoudl we test better than that??? + } + +protected: + eoRealVectorBounds & bounds; + double alpha; + double range; // == 1+2*alpha +}; + +/** eoArithmeticCrossover --> uniform choice in hypercube + == arithmetical with different values for each coordinate +\class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoGenericArithmeticCrossover: + public eoGenericQuadOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoGenericArithmeticCrossover(const double& _alpha = 0.0): + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) + { + if (_alpha < 0) + throw runtime_error("BLX coefficient should be positive"); + } + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoGenericArithmeticCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0): + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) + { + if (_alpha < 0) + throw runtime_error("BLX coefficient should be positive"); + } + + /// The class name. + string className() const { return "eoGenericArithmeticCrossover"; } + + /** + * arithmetical crossover - modifies both parents + * @param _eo1 The first parent + * @param _eo2 The first parent + */ + bool operator()(EOT& _eo1, EOT& _eo2) + { + unsigned i; + double r1, r2, fact; + if (alpha == 0.0) // no check to perform + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + } + else // check the bounds + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise you'll get NAN's + double rmin = min(r1, r2); + double rmax = max(r1, r2); + double length = rmax - rmin; + double alphaMin = -alpha; + double alphaMax = 1+alpha; + // first find the limits on the alpha's + if (bounds.isMinBounded(i)) + { + alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + } + if (bounds.isMaxBounded(i)) + { + alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + } + fact = alphaMin + rng.uniform(alphaMax-alphaMin); + _eo1[i] = fact * rmin + (1-fact) * rmax; + _eo2[i] = (1-fact) * rmin + fact * rmax; + } + } + return true; + } + +protected: + eoRealVectorBounds & bounds; + double alpha; + double range; // == 1+2*alphaMin +}; + + +/** eoRealUxOver --> Uniform crossover, also termed intermediate crossover +\class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric +*/ + +template class eoGenericRealUxOver: public eoGenericQuadOp +{ + public: + /** + * (Default) Constructor. + * @param _preference bias in the choice (usually, no bias == 0.5) + */ + eoGenericRealUxOver(double _preference = 0.5): preference(_preference) + { + if ( (_preference <= 0.0) || (_preference >= 1.0) ) + runtime_error("UxOver --> invalid preference"); + } + + /// The class name. + string className() const { return "eoRealUxOver"; } + + /** + * Uniform crossover for real vectors + * @param _eo1 The first parent + * @param _eo2 The second parent + * @runtime_error if sizes don't match + */ + bool operator()(EOT& _eo1, EOT& _eo2) + { + if ( _eo1.size() != _eo2.size()) + runtime_error("eoRealUxOver --> chromosomes sizes don't match" ); + bool changed = false; + for (unsigned int i=0; i<_eo1.size(); i++) + { + if (rng.flip(preference)) + if (_eo1[i] != _eo2[i]) + { + double tmp = _eo1[i]; + _eo1[i]=_eo2[i]; + _eo2[i] = tmp; + changed = true; + } + } + if (changed) + return true; + return false; + } + private: + double preference; +}; + + +//----------------------------------------------------------------------------- +//@} +#endif eoRealOp_h + From 9d9958d3bc673f9e0dc850dacd3fce9ec084a1cb Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 27 Jan 2001 08:20:39 +0000 Subject: [PATCH 0429/2134] Following the change in includes (added ga.h and es.h everywhere pfuhh) --- eo/tutorial/html/FirstBitEA.html | 615 ++++++++++++++---------------- eo/tutorial/html/FirstBitGA.html | 560 +++++++++++++-------------- eo/tutorial/html/FirstRealEA.html | 39 +- eo/tutorial/html/FirstRealGA.html | 492 +++++++++++------------- eo/tutorial/html/Firstmerge.html | 14 +- eo/tutorial/html/SecondBitEA.html | 4 +- eo/tutorial/html/eoLesson1.html | 11 +- eo/tutorial/html/eoLesson2.html | 26 +- 8 files changed, 836 insertions(+), 925 deletions(-) diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index 0663d8a2e..6b06faac6 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -2,9 +2,9 @@ - + FirstBitEA.cpp - + Back to Lesson 2 - Tutorial @@ -16,344 +16,319 @@ documentation

          FirstBitEA.cpp

          -Click on the figure to see the corresponding code.
          -In the code, the colors are meaningfull
          -The actual code is in boldface and the comment in normal face. -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - +Click on the figure to see the corresponding code. +
          In the code, the colors are meaningfull +
          The actual code is in boldface and the comment in normal face. +
          +
          - +
          -//-----------------------------------------------------------------------------
          -// FirstBitEA.cpp
          -//-----------------------------------------------------------------------------
          -//*
          -// Still an instance of a VERY simple Bitstring Genetic Algorithm
          -// (see FirstBitGA.cpp) but now with  Breeder - and Combined Ops
          -//
          -//-----------------------------------------------------------------------------
          -// standard includes
          -#include <stdexcept>  // runtime_error
          -#include <iostream>    // cout
          -#include <strstream>  // ostrstream, istrstream
          -// the general include for eo
          -#include <eo>
          -
          -
          //----------------------------------------------------------------------------- +
          // FirstBitEA.cpp +
          //----------------------------------------------------------------------------- +
          //* +
          // Still an instance of a VERY simple Bitstring +Genetic Algorithm  +
          // (see FirstBitGA.cpp) but now with  +Breeder - and Combined Ops +
          // +
          //----------------------------------------------------------------------------- +
          // standard includes +
          #include <stdexcept>  // runtime_error  +
          #include <iostream>    +// cout +
          #include <strstream>  // ostrstream, +istrstream +
          // the general include for eo +
          #include <eo>
          - + +
          + + + +
          //----------------------------------------------------------------------------- +
          // Include the corresponding file  +
          #include <ga.h>          +// bitstring representation & operators  +
          // define your individuals +
          typedef eoBin<double> Indi; // +A bitstring with fitness double
          + + + + + +
          //----------------------------------------------------------------------------- +
          // a simple fitness function that computes +the number of ones of a bitstring +
          // Now in a separate file, and declared as +binary_value(const vector<bool> &) +
          #include "binary_value.h"
          + + + + + +
          //----------------------------------------------------------------------------- +
          void main_function(int argc, char **argv) +
          {
          + + + + + +
           const unsigned int SEED = 42; // +seed for random number generator +
           const unsigned int T_SIZE = 3; // +size for tournament selection +
           const unsigned int VEC_SIZE = 8; +// Number of bits in genotypes +
           const unsigned int POP_SIZE = 20; +// Size of population +
           const unsigned int MAX_GEN = 500; +// Maximum number of generation before STOP +
           const float CROSS_RATE = 0.8; // +Crossover rate +
           const double P_MUT_PER_BIT = 0.01; +// probability of bit-flip mutation +
           const float MUT_RATE = 1.0; // +mutation rate +
           // some parameters for chosing +among different operators +
           const double onePointRate = 0.5;        +// rate for 1-pt Xover +
           const double twoPointsRate = 0.5;        +// rate for 2-pt Xover +
           const double URate = 0.5;                      +// rate for Uniform Xover +
           const double bitFlipRate = 0.5;          +// rate for bit-flip mutation +
           const double oneBitRate = 0.5;            +// rate for one-bit mutation
          + + + + + +
           ////////////////////////// +
           //  Random seed +
           ////////////////////////// +
           //reproducible random seed: +if you don't change SEED above,  +
           // you'll aways get the same +result, NOT a random run +
           rng.reseed(SEED);
          + + + + + +
           ///////////////////////////// +
           // Fitness function +
           //////////////////////////// +
           // Evaluation: from a plain +C++ fn to an EvalFunc Object +
           // you need to give the full +description of the function +
           eoEvalFuncPtr<Indi, double, const +vector<bool>& > eval(  binary_value );
          + + + + + +
           //////////////////////////////// +
           // Initilisation of population +
           //////////////////////////////// +
           // based on boolean_generator +class (see utils/rnd_generator.h) +
           eoInitFixedLength<Indi, boolean_generator>  +
               random(VEC_SIZE, +boolean_generator()); +
           // Initialization of the population +
           eoPop<Indi> pop(POP_SIZE, random); +
           // and evaluate it in one line +
           apply<Indi>(eval, pop); // +STL syntax
          + + + + + +
           // sort pop before printing +it! +
           pop.sort(); +
           // Print (sorted) intial population +(raw printout) +
           cout << "Initial Population" +<< endl; +
           cout << pop;
          + + + + + +
           ///////////////////////////////////// +
           // selection and replacement +
           ////////////////////////////////////
          + + + + + +
           // The robust tournament selection +
           eoDetTournamentSelect<Indi> selectOne(T_SIZE);            +// T_SIZE in [2,POP_SIZE] +
          // +is now encapsulated in a eoSelectPerc (entage) +
           eoSelectPerc<Indi> select(selectOne);// +by default rate==1
          + + + + + +
           // And we now have the full +slection/replacement - though with  +
           // no replacement (== generational +replacement) at the moment :-) +
           eoNoReplacement<Indi> replace; 
          + + + + + +
           ////////////////////////////////////// +
           // The variation operators +
           //////////////////////////////////////
          + + + + + +
           // 1-point crossover for bitstring +
           eoBinCrossover<Indi> xover1; +
           // uniform crossover for bitstring +
           eoBinUxOver<Indi> xoverU; +
           // 2-pots xover +
           eoBinNxOver<Indi> xover2(2); +
           // Combine them with relative +rates +
           eoPropCombinedQuadOp<Indi> xover(xover1, +onePointRate); +
           xover.add(xoverU, URate); +
           xover.add(xover2, twoPointsRate, +true);
          + + +
           // standard bit-flip mutation +for bitstring +
           eoBinMutation<Indi>  mutationBitFlip(P_MUT_PER_BIT); +
           // mutate exactly 1 bit per +individual +
           eoDetBitFlip<Indi> mutationOneBit;  +
           // Combine them with relative +rates +
           eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, +bitFlipRate); +
           mutation.add(mutationOneBit, oneBitRate, +true); +

          // The operators +are  encapsulated into an eoTRansform object +
           eoSGATransform<Indi> transform(xover, +CROSS_RATE, mutation, MUT_RATE);

          - -//-----------------------------------------------------------------------------
          -// define your individuals
          -typedef eoBin<double> Indi; // A bitstring with fitness double
          -
          -
          - + +
          - +
          - -//-----------------------------------------------------------------------------
          -// a simple fitness function that computes the number of ones of a bitstring
          -// Now in a separate file, and declared as binary_value(const vector<bool> &)
          -#include "binary_value.h"
          -
          -
          - + +
          - +
          - -//-----------------------------------------------------------------------------
          -void main_function(int argc, char **argv)
          -{
          -
          -
           ////////////////////////////////////// +
           // termination conditions: use +more than one +
           ///////////////////////////////////// +
           // stop after MAX_GEN generations +
           eoGenContinue<Indi> genCont(MAX_GEN); +
           // do MIN_GEN gen., then stop +after STEADY_GEN gen. without improvement +
           eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, +STEADY_GEN); +
           // stop when fitness reaches +a target (here VEC_SIZE) +
           eoFitContinue<Indi> fitCont(0); +
           // do stop when one of the above +says so +
           eoCombinedContinue<Indi> continuator(genCont); +
           continuator.add(steadyCont); +
           continuator.add(fitCont);
          - + +
          - +
          - -  const unsigned int SEED = 42; // seed for random number generator
          -  const unsigned int T_SIZE = 3; // size for tournament selection
          -  const unsigned int VEC_SIZE = 8; // Number of bits in genotypes
          -  const unsigned int POP_SIZE = 20; // Size of population
          -  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
          -  const float CROSS_RATE = 0.8; // Crossover rate
          -  const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation
          -  const float MUT_RATE = 1.0; // mutation rate
          -  // some parameters for chosing among different operators
          -  const double onePointRate = 0.5;        // rate for 1-pt Xover
          -  const double twoPointsRate = 0.5;        // rate for 2-pt Xover
          -  const double URate = 0.5;                      // rate for Uniform Xover
          -  const double bitFlipRate = 0.5;          // rate for bit-flip mutation
          -  const double oneBitRate = 0.5;            // rate for one-bit mutation
          -
          -
           ///////////////////////////////////////// +
           // the algorithm +
           //////////////////////////////////////// +
           // Easy EA requires  +
           // selection, transformation, +eval, replacement, and stopping criterion +
           eoEasyEA<Indi> gga(continuator, +eval, select, transform, replace); +
           // Apply algo to pop - that's +it! +
           gga(pop); +
           
          - + +
          - +
          - -  //////////////////////////
          -  //  Random seed
          -  //////////////////////////
          -  //reproducible random seed: if you don't change SEED above,
          -  // you'll aways get the same result, NOT a random run
          -  rng.reseed(SEED);
          -
          -
           // Print (sorted) intial population +
           pop.sort(); +
           cout << "FINAL Population\n" +<< pop << endl;
          - + +
          - - -
          - -  /////////////////////////////
          -  // Fitness function
          -  ////////////////////////////
          -  // Evaluation: from a plain C++ fn to an EvalFunc Object
          -  // you need to give the full description of the function
          -  eoEvalFuncPtr<Indi, double, const vector<bool>& > eval(  binary_value );
          -
          -
          - - - - -
          - -  ////////////////////////////////
          -  // Initilisation of population
          -  ////////////////////////////////
          -  // based on boolean_generator class (see utils/rnd_generator.h)
          -  eoInitFixedLength<Indi, boolean_generator>
          -      random(VEC_SIZE, boolean_generator());
          -  // Initialization of the population
          -  eoPop<Indi> pop(POP_SIZE, random);
          -  // and evaluate it in one line
          -  apply<Indi>(eval, pop); // STL syntax
          -
          -
          - - - - -
          - -  // sort pop before printing it!
          -  pop.sort();
          -  // Print (sorted) intial population (raw printout)
          -  cout << "Initial Population" << endl;
          -  cout << pop;
          -
          -
          - - - - -
          - -  /////////////////////////////////////
          -  // selection and replacement
          -  ////////////////////////////////////
          -
          -
          - - - - -
          - -  // The robust tournament selection
          -  eoDetTournamentSelect<Indi> selectOne(T_SIZE);            // T_SIZE in [2,POP_SIZE]
          - -  // is now encapsulated in a eoSelectPerc (entage)
          -  eoSelectPerc<Indi> select(selectOne);// by default rate==1
          -
          -
          - - - - -
          - -  // And we now have the full slection/replacement - though with
          -  // no replacement (== generational replacement) at the moment :-)
          -  eoNoReplacement<Indi> replace;
          -
          -
          - - - - -
          - -  //////////////////////////////////////
          -  // The variation operators
          -  //////////////////////////////////////
          -
          -
          - - - - -
          - -  // 1-point crossover for bitstring
          -  eoBinCrossover<Indi> xover1;
          -  // uniform crossover for bitstring
          -  eoBinUxOver<Indi> xoverU;
          -  // 2-pots xover
          -  eoBinNxOver<Indi> xover2(2);
          -  // Combine them with relative rates
          -  eoPropCombinedQuadOp<Indi> xover(xover1, onePointRate);
          -  xover.add(xoverU, URate);
          -  xover.add(xover2, twoPointsRate, true);
          -
          -
          - - - - -
          - -  
          -  // standard bit-flip mutation for bitstring
          -  eoBinMutation<Indi>  mutationBitFlip(P_MUT_PER_BIT);
          -  // mutate exactly 1 bit per individual
          -  eoDetBitFlip<Indi> mutationOneBit;
          -  // Combine them with relative rates
          -  eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, bitFlipRate);
          -  mutation.add(mutationOneBit, oneBitRate, true);
          -  
          - -  // The operators are  encapsulated into an eoTRansform object
          -  eoSGATransform<Indi> transform(xover, CROSS_RATE, mutation, MUT_RATE);
          -
          -
          - - - - -
          - - -
          - - - - -
          - -  //////////////////////////////////////
          -  // termination conditions: use more than one
          -  /////////////////////////////////////
          -  // stop after MAX_GEN generations
          -  eoGenContinue<Indi> genCont(MAX_GEN);
          -  // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement
          -  eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, STEADY_GEN);
          -  // stop when fitness reaches a target (here VEC_SIZE)
          -  eoFitContinue<Indi> fitCont(0);
          -  // do stop when one of the above says so
          -  eoCombinedContinue<Indi> continuator(genCont);
          -  continuator.add(steadyCont);
          -  continuator.add(fitCont);
          -
          -
          - - - - -
          - -  /////////////////////////////////////////
          -  // the algorithm
          -  ////////////////////////////////////////
          -  // Easy EA requires
          -  // selection, transformation, eval, replacement, and stopping criterion
          -  eoEasyEA<Indi> gga(continuator, eval, select, transform, replace);
          -  // Apply algo to pop - that's it!
          -  gga(pop);
          -  
          -
          -
          - - - - -
          - -  // Print (sorted) intial population
          -  pop.sort();
          -  cout << "FINAL Population\n" << pop << endl;
          -
          -
          - - - +
          - -}
          -// A main that catches the exceptions
          -int main(int argc, char **argv)
          -{
          -#ifdef _MSC_VER
          -  //  rng.reseed(42);
          -      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
          -        flag |= _CRTDBG_LEAK_CHECK_DF;
          -      _CrtSetDbgFlag(flag);
          -//    _CrtSetBreakAlloc(100);
          -#endif
          -      try
          -      {
          -              main_function(argc, argv);
          -      }
          -      catch(exception& e)
          -      {
          -              cout << "Exception: " << e.what() << '\n';
          -      }
          -      return 1;
          -}
          -
          } +
          // A main that catches the exceptions +
          int main(int argc, char **argv) +
          { +
          #ifdef _MSC_VER +
           //  rng.reseed(42); +
               int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
                 flag +|= _CRTDBG_LEAK_CHECK_DF; +
               _CrtSetDbgFlag(flag); +
          //    _CrtSetBreakAlloc(100); +
          #endif +
               try +
               { +
                       +main_function(argc, argv); +
               } +
               catch(exception& +e) +
               { +
                       +cout << "Exception: " << e.what() << '\n'; +
               } +
               return 1; +
          }
          +
          Back to Lesson 2 - Tutorial main page - Algorithm-Based - Component-Based page - Programming hints - EO @@ -361,8 +336,8 @@ documentation
          Marc Schoenauer
          -
          Last -modified: Sun Nov 19 22:26:27 2000 - + +
          Last modified: Sun Nov +19 22:26:27 2000 diff --git a/eo/tutorial/html/FirstBitGA.html b/eo/tutorial/html/FirstBitGA.html index e6e4368ea..a7e5f1794 100644 --- a/eo/tutorial/html/FirstBitGA.html +++ b/eo/tutorial/html/FirstBitGA.html @@ -2,9 +2,9 @@ - + FirstBitGA.html - + Back to Lesson 1 - Tutorial @@ -16,326 +16,290 @@ documentation

          FirstBitGA.html

          -Click on the figure to see the corresponding code.
          -In the code, the colors are meaningfull
          -The actual code is in boldface and the comment in normal face. -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - +Click on the figure to see the corresponding code. +
          In the code, the colors are meaningfull +
          The actual code is in boldface and the comment in normal face. +
          +
          - +
          -//-----------------------------------------------------------------------------
          -// FirstBitGA.cpp
          -//-----------------------------------------------------------------------------
          -//*
          -// An instance of a VERY simple Bitstring Genetic Algorithm
          -//
          -//-----------------------------------------------------------------------------
          -// standard includes
          -#include <stdexcept>  // runtime_error
          -#include <iostream>    // cout
          -#include <strstream>  // ostrstream, istrstream
          -// the general include for eo
          -#include <eo>
          -
          -
          //----------------------------------------------------------------------------- +
          // FirstBitGA.cpp +
          //----------------------------------------------------------------------------- +
          //* +
          // An instance of a VERY simple Bitstring +Genetic Algorithm +
          // +
          //----------------------------------------------------------------------------- +
          // standard includes +
          #include <stdexcept>  // runtime_error  +
          #include <iostream>    +// cout +
          #include <strstream>  // ostrstream, +istrstream +
          // the general include for eo +
          #include <eo>
          - + +
          - +
          - -//-----------------------------------------------------------------------------
          -// define your individuals
          -typedef eoBin<double> Indi;        // A bitstring with fitness double
          -
          -
          //----------------------------------------------------------------------------- +
          // Include the corresponding file +
          #include <ga.h>          +// bitstring representation & operators +
          // define your individuals +
          typedef eoBin<double> Indi;        +// A bitstring with fitness double
          + - +
          - -//-----------------------------------------------------------------------------
          -// a simple fitness function that computes the number of ones of a bitstring
          -//  @param _indi A biststring individual
          - -double binary_value(const Indi & _indi)
          -{
          -  double sum = 0;
          -  for (unsigned i = 0; i < _indi.size(); i++)
          -      sum += _indi[i];
          -  return sum;
          -}
          -
          -
          //----------------------------------------------------------------------------- +
          // a simple fitness function that computes +the number of ones of a bitstring +
          //  @param _indi A biststring individual +
          double binary_value(const +Indi & _indi) +
          { +
           double sum = 0; +
           for (unsigned i = 0; i < _indi.size(); +i++) +
               sum += _indi[i]; +
           return sum; +
          }
          - + +
          + + + +
          //----------------------------------------------------------------------------- +
          void main_function(int argc, char **argv) +
          {
          + + + + + +
           // all parameters are hard-coded! +
           const unsigned int SEED = 42;          +// seed for random number generator +
           const unsigned int T_SIZE = 3;        +// size for tournament selection +
           const unsigned int VEC_SIZE = 8;    +// Number of bits in genotypes +
           const unsigned int POP_SIZE = 20;  +// Size of population +
           const unsigned int MAX_GEN = 100;  +// Maximum number of generation before STOP +
           const float CROSS_RATE = 0.8;          +// Crossover rate +
           const double P_MUT_PER_BIT = 0.01; +// probability of bit-flip mutation +
           const float MUT_RATE = 1.0;              +// mutation rate
          + + + + + +
          ////////////////////////// +
           //  Random seed +
           ////////////////////////// +
           //reproducible random seed: +if you don't change SEED above,  +
           // you'll aways get the same +result, NOT a random run +
           rng.reseed(SEED);
          + + + + + +
           ///////////////////////////// +
           // Fitness function +
           //////////////////////////// +
           // Evaluation: from a plain +C++ fn to an EvalFunc Object +
           eoEvalFuncPtr<Indi> eval(  +binary_value );
          + + + + + +
           //////////////////////////////// +
           // Initilisation of population +
           //////////////////////////////// +
           // declare the population +
           eoPop<Indi> pop; +
           // fill it! +
           for (unsigned int igeno=0; igeno<POP_SIZE; +igeno++) +
               { +
                   +Indi v;                    +// void individual, to be filled +
                   +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
                       +{ +
                           +bool r = rng.flip(); // new value, random in {0,1} +
                           +v.push_back(r);          // +append that random value to v +
                       +} +
                   +eval(v);                                +// evaluate it +
                   +pop.push_back(v);              +// and put it in the population +
               }
          + + + + + +
           // sort pop before printing +it! +
           pop.sort(); +
           // Print (sorted) intial population +(raw printout) +
           cout << "Initial Population" +<< endl; +
           cout << pop;
          + + + + + +
           ///////////////////////////////////// +
           // selection and replacement +
           ////////////////////////////////////
          + + + + + +
           // The robust tournament selection +
           eoDetTournamentSelect<Indi> select(T_SIZE);  +// T_SIZE in [2,POP_SIZE]
          + + + + + +
           // The simple GA evolution engine +uses generational replacement +
           // so no replacement procedure +is needed
          + + + + + +
          + + + + + +
           ////////////////////////////////////// +
           // The variation operators +
           //////////////////////////////////////
          + + + + + +
           // 1-point mutation for bitstring +
           eoBinCrossover<Indi> xover;
          + + +
           // standard bit-flip mutation +for bitstring +
           eoBinMutation<Indi>  mutation(P_MUT_PER_BIT);
          - -//-----------------------------------------------------------------------------
          -void main_function(int argc, char **argv)
          -{
          -
          -
          - + +
          - +
          - -  // all parameters are hard-coded!
          -  const unsigned int SEED = 42;          // seed for random number generator
          -  const unsigned int T_SIZE = 3;        // size for tournament selection
          -  const unsigned int VEC_SIZE = 8;    // Number of bits in genotypes
          -  const unsigned int POP_SIZE = 20;  // Size of population
          -  const unsigned int MAX_GEN = 100;  // Maximum number of generation before STOP
          -  const float CROSS_RATE = 0.8;          // Crossover rate
          -  const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation
          -  const float MUT_RATE = 1.0;              // mutation rate
          -
          -
           ////////////////////////////////////// +
           // termination condition +
           ///////////////////////////////////// +
           // stop after MAX_GEN generations +
           eoGenContinue<Indi> continuator(MAX_GEN); +
           
          - + +
          - +
          - - -  //////////////////////////
          -  //  Random seed
          -  //////////////////////////
          -  //reproducible random seed: if you don't change SEED above,
          -  // you'll aways get the same result, NOT a random run
          -  rng.reseed(SEED);
          -
          -
           ///////////////////////////////////////// +
           // the algorithm +
           //////////////////////////////////////// +
           // standard Generational GA +requires as parameters +
           // selection, evaluation, crossover +and mutation, stopping criterion +

           eoSGA<Indi> gga(select, xover, +CROSS_RATE, mutation, MUT_RATE,  +
                                           +eval, continuator); +
           // Apply algo to pop - that's +it! +
           gga(pop); +
           

          - + +
          - +
          - -  /////////////////////////////
          -  // Fitness function
          -  ////////////////////////////
          -  // Evaluation: from a plain C++ fn to an EvalFunc Object
          -  eoEvalFuncPtr<Indi> eval(  binary_value );
          -
          -
           // Print (sorted) intial population +
           pop.sort(); +
           cout << "FINAL Population\n" +<< pop << endl;
          - + +
          - - -
          - -  ////////////////////////////////
          -  // Initilisation of population
          -  ////////////////////////////////
          -  // declare the population
          -  eoPop<Indi> pop;
          -  // fill it!
          -  for (unsigned int igeno=0; igeno<POP_SIZE; igeno++)
          -      {
          -          Indi v;                    // void individual, to be filled
          -          for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
          -              {
          -                  bool r = rng.flip(); // new value, random in {0,1}
          -                  v.push_back(r);          // append that random value to v
          -              }
          -          eval(v);                                // evaluate it
          -          pop.push_back(v);              // and put it in the population
          -      }
          -
          -
          - - - - -
          - -  // sort pop before printing it!
          -  pop.sort();
          -  // Print (sorted) intial population (raw printout)
          -  cout << "Initial Population" << endl;
          -  cout << pop;
          -
          -
          - - - - -
          - -  /////////////////////////////////////
          -  // selection and replacement
          -  ////////////////////////////////////
          -
          -
          - - - - -
          - -  // The robust tournament selection
          -  eoDetTournamentSelect<Indi> select(T_SIZE);  // T_SIZE in [2,POP_SIZE]
          -
          -
          - - - - -
          - -  // The simple GA evolution engine uses generational replacement
          -  // so no replacement procedure is needed
          -
          -
          - - - - -
          - - -
          - - - - -
          - -  //////////////////////////////////////
          -  // The variation operators
          -  //////////////////////////////////////
          -
          -
          - - - - -
          - -  // 1-point mutation for bitstring
          -  eoBinCrossover<Indi> xover;
          -
          -
          - - - - -
          - -  
          -  // standard bit-flip mutation for bitstring
          -  eoBinMutation<Indi>  mutation(P_MUT_PER_BIT);
          -
          -
          - - - - -
          - -  //////////////////////////////////////
          -  // termination condition
          -  /////////////////////////////////////
          -  // stop after MAX_GEN generations
          -  eoGenContinue<Indi> continuator(MAX_GEN);
          -  
          -
          -
          - - - - -
          - -  /////////////////////////////////////////
          -  // the algorithm
          -  ////////////////////////////////////////
          -  // standard Generational GA requires as parameters
          -  // selection, evaluation, crossover and mutation, stopping criterion
          -
          -  eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
          -                                  eval, continuator);
          -  // Apply algo to pop - that's it!
          -  gga(pop);
          -  
          -
          -
          - - - - -
          - -  // Print (sorted) intial population
          -  pop.sort();
          -  cout << "FINAL Population\n" << pop << endl;
          -
          -
          - - - +
          - -}
          - // A main that catches the exceptions
          -int main(int argc, char **argv)
          -{
          -#ifdef _MSC_VER
          -  //  rng.reseed(42);
          -      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
          -        flag |= _CRTDBG_LEAK_CHECK_DF;
          -      _CrtSetDbgFlag(flag);
          -//    _CrtSetBreakAlloc(100);
          -#endif
          -      try
          -      {
          -              main_function(argc, argv);
          -      }
          -      catch(exception& e)
          -      {
          -              cout << "Exception: " << e.what() << '\n';
          -      }
          -      return 1;
          -}
          -
          } +
          // A main that catches the exceptions +
          int main(int argc, char **argv) +
          { +
          #ifdef _MSC_VER +
           //  rng.reseed(42); +
               int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
                 flag +|= _CRTDBG_LEAK_CHECK_DF; +
               _CrtSetDbgFlag(flag); +
          //    _CrtSetBreakAlloc(100); +
          #endif +
               try +
               { +
                       +main_function(argc, argv); +
               } +
               catch(exception& +e) +
               { +
                       +cout << "Exception: " << e.what() << '\n'; +
               } +
               return 1; +
          }
          +
          Back to Lesson 1 - Tutorial main page - Algorithm-Based - Component-Based page - Programming hints - EO @@ -343,8 +307,8 @@ documentation
          Marc Schoenauer
          -
          Last -modified: Sun Nov 19 08:31:26 2000 - + +
          Last modified: Sun Nov +19 08:31:26 2000 diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index 63b960949..6b7575418 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -34,8 +34,9 @@ Breeder - and Combined Ops

          //-----------------------------------------------------------------------------
          // standard includes
          #include <stdexcept>  // runtime_error  -
          #include <iostream>    -// cout +
          #include <iostream>   +// +cout
          #include <strstream>  // ostrstream, istrstream
          // the general include for eo @@ -46,6 +47,9 @@ istrstream @@ -77,12 +81,16 @@ seed for random number generator
           const unsigned int T_SIZE = 3; // size for tournament selection
           const unsigned int VEC_SIZE = 8; -// Number of object variables in genotypes +// +Number of object variables in genotypes
           const unsigned int POP_SIZE = 20; -// Size of population +// +Size of population
           const unsigned int MAX_GEN = 500; -// Maximum number of generation before STOP -
           const unsigned int MIN_GEN = 10;  +// +Maximum number of generation before STOP +
           const unsigned int MIN_GEN = 10; + // Minimum number of generation before ...
           const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent @@ -97,13 +105,17 @@ SIGMA = 0.3;        // std dev. for normal mutation
           // some parameters for chosing among different operators -
           const double segmentRate = 0.5;    +
           const double segmentRate = 0.5;   + // relative weight for 1-pt Xover
           const double arithmeticRate = 0.5; -// relative weight for 2-pt Xover +
          // +relative weight for 2-pt Xover

           const double uniformMutRate = 0.5; -// relative weight for bit-flip mutation -
           const double detMutRate = 0.5;     +// +relative weight for bit-flip mutation +
           const double detMutRate = 0.5;    + // relative weight for one-bit mutation
           const double normalMutRate = 0.5;  // relative weight for normal mutation @@ -181,8 +193,8 @@ it! @@ -295,8 +307,7 @@ eval, select, transform, replace); it!
           cout << "\n              Here we go\n\n"; -
           gga(pop); -
            +
           gga(pop);
          //----------------------------------------------------------------------------- +
          // Include the corresponding file  +
          #include <es.h>          +// real-representation & operators 
          // define your individuals
          typedef eoReal<double> Indi; 
           // The robust tournament selection
           eoDetTournamentSelect<Indi> selectOne(T_SIZE); -
          // -is now encapsulated in a eoSelectPerc (entage) +
          // is now +encapsulated in a eoSelectPerc (entage)
           eoSelectPerc<Indi> select(selectOne);// by default rate==1
          diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html index b375629fc..b3687ec77 100644 --- a/eo/tutorial/html/FirstRealGA.html +++ b/eo/tutorial/html/FirstRealGA.html @@ -2,9 +2,9 @@ - + ../FirstRealGA.html - + Back to Lesson 1 - Tutorial @@ -16,325 +16,293 @@ documentation

          ../FirstRealGA.html

          -Click on the figure to see the corresponding code.
          -In the code, the colors are meaningfull
          -The actual code is in boldface and the comment in normal face. -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - +Click on the figure to see the corresponding code. +
          In the code, the colors are meaningfull +
          The actual code is in boldface and the comment in normal face. +
          +
          - +
          -//-----------------------------------------------------------------------------
          -// FirstRealGA.cpp
          -//-----------------------------------------------------------------------------
          -//*
          -// An instance of a VERY simple Real-coded Genetic Algorithm
          -//
          -//-----------------------------------------------------------------------------
          -// standard includes
          -#include <stdexcept>  // runtime_error
          -#include <iostream>    // cout
          -#include <strstream>  // ostrstream, istrstream
          -// the general include for eo
          -#include <eo>
          -
          -
          //----------------------------------------------------------------------------- +
          // FirstRealGA.cpp +
          //----------------------------------------------------------------------------- +
          //* +
          // An instance of a VERY simple Real-coded +Genetic Algorithm +
          // +
          //----------------------------------------------------------------------------- +
          // standard includes +
          #include <stdexcept>  // runtime_error  +
          #include <iostream>    +// cout +
          #include <strstream>  // ostrstream, +istrstream +
          // the general include for eo +
          #include <eo>
          - + +
          - +
          - -//-----------------------------------------------------------------------------
          -// define your individuals
          - typedef eoReal<double> Indi;
          -
          -
          //----------------------------------------------------------------------------- +
          // Include the corresponding file +
          #include <es.h>          +// real-representation & operators +
          // define your individuals +
          typedef eoReal<double> Indi;
          + - +
          - -//-----------------------------------------------------------------------------
          -// a simple fitness function that computes the euclidian norm of a real vector
          -//      @param _indi A real-valued individual
          - -double real_value(const Indi & _indi)
          -{
          -  double sum = 0;
          -  for (unsigned i = 0; i < _indi.size(); i++)
          -          sum += _indi[i]*_indi[i];
          -  return (-sum);                      // maximizing only
          -}
          -
          -
          //----------------------------------------------------------------------------- +
          // a simple fitness function that computes +the euclidian norm of a real vector +
          //      @param _indi +A real-valued individual  +
          double real_value(const +Indi & _indi) +
          { +
           double sum = 0; +
           for (unsigned i = 0; i < _indi.size(); +i++) +
                   +sum += _indi[i]*_indi[i]; +
           return (-sum);                      +// maximizing only +
          }
          - + +
          - +
          - -//-----------------------------------------------------------------------------
          -void main_function(int argc, char **argv)
          -{
          -
          -
          //----------------------------------------------------------------------------- +
          void main_function(int argc, char **argv) +
          {
          - + +
          - +
          - -  // all parameters are hard-coded!
          -  const unsigned int SEED = 42; // seed for random number generator
          -  const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes
          -  const unsigned int POP_SIZE = 20; // Size of population
          -  const unsigned int T_SIZE = 3; // size for tournament selection
          -  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
          -  const float CROSS_RATE = 0.8; // Crossover rate
          -  const double EPSILON = 0.01;  // range for real uniform mutation
          -  const float MUT_RATE = 0.5;    // mutation rate
          -
          -
           // all parameters are hard-coded! +
           const unsigned int SEED = 42; // +seed for random number generator +
           const unsigned int VEC_SIZE = 8; +// Number of object variables in genotypes +
           const unsigned int POP_SIZE = 20; +// Size of population +
           const unsigned int T_SIZE = 3; // +size for tournament selection +
           const unsigned int MAX_GEN = 500; +// Maximum number of generation before STOP +
           const float CROSS_RATE = 0.8; // +Crossover rate +
           const double EPSILON = 0.01;  +// range for real uniform mutation +
           const float MUT_RATE = 0.5;    +// mutation rate
          - + +
          - +
          - - -  //////////////////////////
          -  //  Random seed
          -  //////////////////////////
          -  //reproducible random seed: if you don't change SEED above,
          -  // you'll aways get the same result, NOT a random run
          -  rng.reseed(SEED);
          -
          -
          ////////////////////////// +
           //  Random seed +
           ////////////////////////// +
           //reproducible random seed: +if you don't change SEED above,  +
           // you'll aways get the same +result, NOT a random run +
           rng.reseed(SEED);
          - + +
          - +
          - -  /////////////////////////////
          -  // Fitness function
          -  ////////////////////////////
          -  // Evaluation: from a plain C++ fn to an EvalFunc Object
          -  eoEvalFuncPtr<Indi> eval(  real_value );
          -
          -
           ///////////////////////////// +
           // Fitness function +
           //////////////////////////// +
           // Evaluation: from a plain +C++ fn to an EvalFunc Object +
           eoEvalFuncPtr<Indi> eval(  +real_value );
          - + +
          - +
          - -  ////////////////////////////////
          -  // Initilisation of population
          -  ////////////////////////////////
          -  // declare the population
          -  eoPop<Indi> pop;
          -  // fill it!
          -  for (unsigned int igeno=0; igeno<POP_SIZE; igeno++)
          -      {
          -          Indi v;                  // void individual, to be filled
          -          for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
          -              {
          -                  double r = 2*rng.uniform() - 1; // new value, random in [-1,1)
          -                  v.push_back(r);            // append that random value to v
          -              }
          -          eval(v);                                  // evaluate it
          -          pop.push_back(v);                // and put it in the population
          -      }
          -
          -
           //////////////////////////////// +
           // Initilisation of population +
           //////////////////////////////// +
           // declare the population +
           eoPop<Indi> pop; +
           // fill it! +
           for (unsigned int igeno=0; igeno<POP_SIZE; +igeno++) +
               { +
                   +Indi v;                  +// void individual, to be filled +
                   +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
                       +{ +
                           +double r = 2*rng.uniform() - 1; // new value, random in [-1,1) +
                           +v.push_back(r);            +// append that random value to v +
                       +} +
                   +eval(v);                                  +// evaluate it +
                   +pop.push_back(v);                +// and put it in the population +
               }
          - + +
          - +
          - -  // sort pop before printing it!
          -  pop.sort();
          -  // Print (sorted) intial population (raw printout)
          -  cout << "Initial Population" << endl;
          -  cout << pop;
          -
          -
           // sort pop before printing +it! +
           pop.sort(); +
           // Print (sorted) intial population +(raw printout) +
           cout << "Initial Population" +<< endl; +
           cout << pop;
          - + +
          - +
          - -  /////////////////////////////////////
          -  // selection and replacement
          -  ////////////////////////////////////
          -
          -
           ///////////////////////////////////// +
           // selection and replacement +
           ////////////////////////////////////
          - + +
          - +
          - -  // The robust tournament selection
          -  eoDetTournamentSelect<Indi> select(T_SIZE);            // T_SIZE in [2,POP_SIZE]
          -
          -
           // The robust tournament selection +
           eoDetTournamentSelect<Indi> select(T_SIZE);            +// T_SIZE in [2,POP_SIZE]
          - + +
          - +
          - -  // eoSGA uses generational replacement by default
          -  // so no replacement procedure has to be given
          -
          -
           // eoSGA uses generational replacement +by default +
           // so no replacement procedure +has to be given
          - + +
          - +
          - - -
          - + +
          - +
          - -  //////////////////////////////////////
          -  // termination condition
          -  /////////////////////////////////////
          -  // stop after MAX_GEN generations
          -  eoGenContinue<Indi> continuator(MAX_GEN);
          -  
          -
          -
           ////////////////////////////////////// +
           // termination condition +
           ///////////////////////////////////// +
           // stop after MAX_GEN generations +
           eoGenContinue<Indi> continuator(MAX_GEN); +
           
          - + +
          - +
          - -  //////////////////////////////////////
          -  // The variation operators
          -  //////////////////////////////////////
          -
          -
           ////////////////////////////////////// +
           // The variation operators +
           //////////////////////////////////////
          - + +
          - +
          - -  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
          -  eoUniformMutation<Indi>  mutation(EPSILON);
          -
          -
           // offspring(i) uniformly chosen +in [parent(i)-epsilon, parent(i)+epsilon] +
           eoUniformMutation<Indi>  +mutation(EPSILON); 
          - + +
          - +
          - -  // offspring(i) is a linear combination of parent(i)
          -  eoArithmeticCrossover<Indi> xover;
          -
          -
           // offspring(i) is a linear +combination of parent(i) +
           eoArithmeticCrossover<Indi> xover;
          - + +
          - +
          - -  /////////////////////////////////////////
          -  // the algorithm
          -  ////////////////////////////////////////
          -  // standard Generational GA requires
          -  // selection, evaluation, crossover and mutation, stopping criterion
          -
          -  eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
          -                                    eval, continuator);
          -  // Apply algo to pop - that's it!
          -  gga(pop);
          -  
          -
          -
           ///////////////////////////////////////// +
           // the algorithm +
           //////////////////////////////////////// +
           // standard Generational GA +requires +
           // selection, evaluation, crossover +and mutation, stopping criterion +

           eoSGA<Indi> gga(select, xover, +CROSS_RATE, mutation, MUT_RATE,  +
                                             +eval, continuator); +
           // Apply algo to pop - that's +it! +
           gga(pop); +
           

          - + +
          - +
          - -  // Print (sorted) intial population
          -  pop.sort();
          -  cout << "FINAL Population\n" << pop << endl;
          -
          -
           // Print (sorted) intial population +
           pop.sort(); +
           cout << "FINAL Population\n" +<< pop << endl;
          - + +
          - +
          - -}
          -// A main that catches the exceptions
          -int main(int argc, char **argv)
          -{
          -#ifdef _MSC_VER
          -  //  rng.reseed(42);
          -      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
          -        flag |= _CRTDBG_LEAK_CHECK_DF;
          -      _CrtSetDbgFlag(flag);
          -//    _CrtSetBreakAlloc(100);
          -#endif
          -      try
          -      {
          -              main_function(argc, argv);
          -      }
          -      catch(exception& e)
          -      {
          -              cout << "Exception: " << e.what() << '\n';
          -      }
          -      return 1;
          -}
          -
          } +
          // A main that catches the exceptions +
          int main(int argc, char **argv) +
          { +
          #ifdef _MSC_VER +
           //  rng.reseed(42); +
               int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
                 flag +|= _CRTDBG_LEAK_CHECK_DF; +
               _CrtSetDbgFlag(flag); +
          //    _CrtSetBreakAlloc(100); +
          #endif +
               try +
               { +
                       +main_function(argc, argv); +
               } +
               catch(exception& +e) +
               { +
                       +cout << "Exception: " << e.what() << '\n'; +
               } +
               return 1; +
          }
          +
          Back to Lesson 1 - Tutorial main page - Algorithm-Based - Component-Based page - Programming hints - EO @@ -342,8 +310,8 @@ documentation
          Marc Schoenauer
          -
          Last -modified: Sun Nov 19 08:31:29 2000 - + +
          Last modified: Sun Nov +19 08:31:29 2000 diff --git a/eo/tutorial/html/Firstmerge.html b/eo/tutorial/html/Firstmerge.html index 6345d865e..d71236b3a 100644 --- a/eo/tutorial/html/Firstmerge.html +++ b/eo/tutorial/html/Firstmerge.html @@ -2,7 +2,7 @@ - + Differences @@ -57,11 +57,15 @@ the parameter for the mutation).
      • eoCommaReplacement, one of @@ -302,7 +300,7 @@ Additional parameter (in the constructor) is the tournament rate, a
        -
        Replacement: Adding +
        Replacement: Adding (weak) elitism

        You can add what is called weak elitism to any replacement by encapsulating it into an eoWeakElitismReplacement @@ -337,25 +335,88 @@ that all of these are already implemented in EO (except maybe some of the last category :-) !!!!!!

        The most popular evolution engines are listed below, together with the way to use them in EO. If you don't find your particuler algorithm, please -send it to us, and we might include it here! +send it to us, and we might include it here! In the following, P will denote +the number of individuals in the initial population.

        • -Generational Genetic Algorihtm
        • +Generational Genetic Algorihtm: +popularized by Holland (75) and Goldberg (89), it uses 
          +
          Number of offspring:  +P
          +
          Selection: Proportional +(the historical roulette wheel) when maximizing +a positive scalar fitness, ranking or +tournament (stochatic or deterministic) in all cases.
          +
          Replacement: +Generational.
          +
          Remark: You could +use also the Comma replacement, with exactly the same result as there are +as many offspring as we need indiviudals in the next population. And using +the eoSSGAWorseReplacement would also give the same result, but would be +very inefficient!
          +You can also add weak elitism to preserve the +best individual.
        • -Steady-State Genetic Algorithm
        • +Steady-State Genetic Algorithm: +widely used in GA/GP community
          +
          Number of offspring:  +small (historically, 1)
          +
          Selection: tournament +(you can use ranking or proportional, but it will be rather inefficient).
          +
          Replacement: +An eoSSGAxxxReplacement. 
          +
          Remark: You can +also use the eoPlusReplacement, but you divert from the original SSGA
        • -(MU+Lambda)-Evolution Strategy
        • +(MU+Lambda)-Evolution Strategy: +The elitist ES strategy (Rechenberg 71 and Schwefel 81)
          +
          Number of offspring:  +Any
          +
          Selection: eoDetSelect +(batch deterministic).
          +
          Replacement: +eoPlusReplacement
          +
          Remark: You could +also use eoEPReplacement, to smoothen the selective pressure during replacement, +thus getting close to EP evolution engine
        • -(MU,LAMBDA)-Evolution Strategy
        • +(MU,Lambda)-Evolution Strategy: +The non-elitist ES strategy
          +
          Number of offspring:  +> P
          +
          Selection: eoDetSelect +(batch deterministic).
          +
          Replacement: +eoCommaReplacement
          +
          Remark: You can +also add weak elitism to preserve the best individual +- though you'd probably use the plus strategy if you want (strong) elitism.
        • -Evolutionary Programming
        • +Evolutionary Programming: +The historical method of L. Fogel (65)
          +
          Number of offspring:  +P
          +
          Selection: eoDetSelect +(batch deterministic). Every individual reproduces exactly once.
          +
          Replacement: +eoEPReplacement, though one historical replacement was the determnistic +replacement - i.e. in EO the eoPlusReplacement).
          +
          Remark: Close +to an (P+P)-ES
        • -You name it :-)
        • +You name it :-): +you can of course choose whatever combination you like - respecting a few +constraints and common-sense remarks. For instance, eoProportionalSelect +should be used only when maximizing a positive fitness, eoCommaReplacement +requires more offspring than parents, and, over all, existing EO algorithms +wirk with fixed size population - and it is your responsability to use +a cmbinatino of selection/replacement that fulfills this requirement (or +to create your own eoAlgo that handles varying size populations).

        diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 2951fde81..2ad60f5c8 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -73,8 +73,13 @@ has been designed to hold all functors. This base class is itself divided into three derived class. These classes tell you immediately what kind of arguments the operator() method requires and what kind of result it produces. See EO -conventions, and the inheritance +conventions, +and the inheritance diagram of class eoFunctorBase. +
        For a more complete introduction to functors, with detailed discussion, +go to the STL +documentation - as STL also heavily relies on functors, and the eoFunctorBase +paradigm is borrowed from there.

        Functors: Example:

        The following is a basic example of how to program and use a functor object: First code the class: @@ -170,15 +175,21 @@ Template Library.
        But you don't have to know more than a few words of STL to use EO (like with "hello", "please" and "goodbye" you can survive in a foreign country :-) and even to contribute to new EO features. -

        You will only find here the basics of STL that you will need to understand -most of EO code - and to guess what the parts you don't understand are -actually doing. Don't worry, I don't -understand everything :-) +Moreover, while browsing through EO code, you will gradually learn how +to use STL, especially if you check at the SGI STL +Web site from time to time, where you can not only download STL, but +also browse in the Programmer's guide  for isntance from the Table +of Content. +

        Anyway, you will only find here, in EO tutorial, the basics of STL that +you will need to understand most of EO code - and to guess what the parts +you don't understand are actually doing. Don't worry, I +don't understand everything :-)

        STL provides the user with containers, iterators and algorithms. And you can access (almost) all containers content using (almost) all iterators, or apply -(almost) all algorithms on (almost) all containers. +(almost) all algorithms on (almost) all containers (of course the tricky +part is to instanciate the "almost" in the previous sentence :-)

        STL: Containers
        Containers are high level data types used to hold simpler data - the most widely used example of a container is the vector @@ -351,6 +362,8 @@ names of the variables they are used to initialize, e.g.


      •  

          +
          +
         

        class eoMyClass
        {
        public: diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 00734f654..bb185886b 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -11,8 +11,9 @@ documentation


        Welcome to EO, the Evolving Objects library, -and to -  +and to
        + +

        EO Tutorial

        @@ -63,6 +64,12 @@ and to quickly reach some specific part of the code.
        The top page of each class documentation is for instance the inheritance diagram of the class, and you'll learn a lot by simply looking at it. +
      • +For those who wish to get deeper in STL (Standard Template Library), you +might visit the well documented SGI +STL Web site. But don't forget you'll find the very basic minimum in +EO programming hints.
      • +
      • And, last but not least, we assume you know approximately that an Evolutionary Algorithm looks like this, but otherwise you can try this very From 61a85582d53e4a35ebe6a7978f24ad2416d286ea Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Jan 2001 10:07:27 +0000 Subject: [PATCH 0407/2134] Added the namespace eo for the global variable rng in eoRNG.cpp Also added "using eo::rng" in eoRNG.h so nothing has to be modified. We should gradually move to write eo::rng everywhere, and remove that using directive to be almost full-proofed against possible name collision. --- eo/src/utils/eoRNG.cpp | 3 +++ eo/src/utils/eoRNG.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index fadc1aa23..36f6a4893 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -3,5 +3,8 @@ /// The global object, should probably be initialized with an xor /// between time and process_id. +namespace eo +{ eoRng rng((uint32) time(0)); +} diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 849de0037..027da5d53 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -279,7 +279,13 @@ private : /** The one and only global eoRng object */ +namespace eo +{ extern eoRng rng; +} + +using eo::rng; + // Implementation of some eoRng members.... Don't mind the mess, it does work. From 5edbc0e98befa02aea0e2900e82fad4b3f98db69 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 9 Jan 2001 02:17:28 +0000 Subject: [PATCH 0408/2134] Added the namespace in description of RNGs (and corrected a few broken links) --- eo/tutorial/html/eoProgramming.html | 42 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 2ad60f5c8..41eb52402 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -176,14 +176,15 @@ Template Library. of STL to use EO (like with "hello", "please" and "goodbye" you can survive in a foreign country :-) and even to contribute to new EO features. Moreover, while browsing through EO code, you will gradually learn how -to use STL, especially if you check at the SGI STL -Web site from time to time, where you can not only download STL, but -also browse in the Programmer's guide  for isntance from the Table +to use STL, especially if you check at the SGI +STL Web site from time to time, where you can not only download STL, +but also browse in the Programmer's guide  for isntance from the Table of Content.

        Anyway, you will only find here, in EO tutorial, the basics of STL that you will need to understand most of EO code - and to guess what the parts you don't understand are actually doing. Don't worry, I -don't understand everything :-) +don't +understand everything :-)

        STL provides the user with containers, iterators and algorithms. And you can access @@ -306,15 +307,15 @@ numbers who look random (w.r.t. some statistical criteria). to ensure reproducibility of the results across different platforms, EO has its own RNG, the ``Mersenne Twister'' random number generator MT19937 (thanks to Takuji -Nishimura, see eoRNG.h +Nishimura, see eoRNG.h comments).

        Though you can define and use as many RNGs as you wish in EO, the library -also provides you with a global RNG termed rng: using only that single -RNG in all calls to random numbers allows one to be able to reproduce -a given run: +also provides you with a global RNG termed eo::rng. +Using that single RNG in all calls to random numbers allows one to be able +to reproduce a given run:

        • -as strange it seems for a random algorithm, it is mandatory for debugging +as strange as it seems for a random algorithm, it is mandatory for debugging purposes
        • @@ -328,16 +329,25 @@ to simulate "true" random runs, you can just seed the RNG with a machine-clock related number, e.g. calling time(0), as done for instance in Lesson3 (and after).
        -As RNGs only produce (by definition) numbers that are uniformly distributed -integers between 0 and some maximal number, EO provides you with random -numbers following different probability distribution +As RNGs produce, by definition, integers that are uniformly distributed +between 0 and some maximal number, EO provides you with random numbers +following different probability distribution (e.g. floating point following normal -distribution). -

        EO also provides random_generators +distribution). See the complete +list of RNG primitives. +

        EO also provides random_generators that can be used in STL call to generate series of random numbers, as in eoPop initializers. -

        +

        Note: the eo:: +prefix indicates that it is in a separate C++ namespace, to avoid collision +with possible variables that would also be named rng in some other library. +As early versions of EO (<= 9.1)  did not use a separate namespace +for rng, the compiler directive using eo::rng in eoRNG.h allows you to +use the name rng without the eo:: +prefix. However, the notation eo::rng +should be preferred and might become mandatory some day. +



        EO conventions and naming style @@ -364,6 +374,8 @@ names of the variables they are used to initialize, e.g.
      •  
         
          +
          +
         

        class eoMyClass
        {
        public: From 5f925a4c12290395294f19e300f57738980ec00e Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 9 Jan 2001 03:33:16 +0000 Subject: [PATCH 0409/2134] Added the eoSurviveAndDie comments. Should be complete!!! --- eo/tutorial/html/eoEngine.html | 159 +++++++++++++++++++++------------ 1 file changed, 100 insertions(+), 59 deletions(-) diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index b939046b8..35ae194c1 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -239,8 +239,10 @@ two objects of respective types eoReduce and you can probably guess what each of them actually does :-) -


        Available instances of eoMergeReduce -replacement include +
          +

          +

        Available instances of eoMergeReduce replacement +include

        • eoCommaReplacement, one of @@ -274,7 +276,7 @@ number of offspring.

        • Though not mandatory, it is implicitely assumed that few offspring have been generated. Hence, all derived replacement procedures of class eoReduceMerge -are termed eoSGAxxx, as they +are termed eoSSGAxxx, as they are the ones to use in SteadyState Genetic Algorithm engine. This gives the following instances of eoReduceMerge:
            @@ -287,17 +289,33 @@ additional argument needed); eoSSGADetTournamentReplacement in which parents to be killed are chosen by a (reverse) determinitic tournament. Additional parameter (in the constructor) is the tournament size, an unsigned -int). +int.
          • eoSSGAStochTournamentReplacement in which parents to be killed are chosen by a (reverse) stochastic tournament. -Additional parameter (in the constructor) is the tournament rate, a double).
          • +Additional parameter (in the constructor) is the tournament rate, a double.
        • -eoSurviveAndDie is
        • -
        +eoSurviveAndDie +replacement strategies are a generalization of both the above that allows +strong elitist and eugenism in both the parent population and the offspring +population. The eoSurviveAndDie +building block takes one population, kills the worse and moves the best +to some safe place.  The corresponding replacements apply an eoSurviveAndDie +to the parents, another one to the offspring, and finally merges the remaining +parents and offspring before reducing the resulting population to the right +size. Available instances of eoSurviveAndDieReplacement +are limited todayto the eoDeterministicSaDReplacement, +the  that uses a deterministic MergeReduce. + +


        Note: The basic use (and initial +motivation) for eoSurviveAndDie +takes 2 arguments, an eoMergeReduce and a number of surviving parents. +It starts by copying the best parents to the new populations, then merges +the remaining parents with the offspring before reducing to the number +of remaining seats in the new population.

    • eoGenerationalReplacement This @@ -86,22 +230,27 @@ that offspring and parents are of the same size (but does not check!).

    •  
    • -eoMergeReduce This is one -the basic types of replacement in EO. It has two major steps, merging -both populations of parents and offspring, and reducing -this big population to the right size. It contains +eoMergeReduce +This is one the basic types of replacement in EO. It has two major steps, +merging both populations of parents and offspring, +and reducing this big population to the right +size. It contains two objects of respective types eoMerge and eoReduce and you can probably guess what each of them actually does :-)
    • -


      Available instances of eoMergeReduce -replacement include +
        +

        +

      Available instances of eoMergeReduce replacement +include

      • eoCommaReplacement, one of the two standard strategies in Evolution Strategies, -selects the best offspring. It is an -eoMergeReduce(eoNoElitism, eoTruncate).
      • +selects +the best offspring. It is an +eoMergeReduce(eoNoElitism, +eoTruncate).
      • eoPlusReplacement, the other @@ -112,9 +261,8 @@ eoTruncate).
      • eoEPReplacement, used in the -Evolutionary -Programming historical algorithm, does an EP stochastic tournament -among parents + offspring. It is an eoMergeReduce(eoPlus, +Evolutionary Programming historical algorithm, does an EP stochastic +tournament among parents + offspring. It is an eoMergeReduce(eoPlus, eoEPReduce) and its constructor requires as argument T, the size of the tournament (unsigned int).
      @@ -152,7 +300,9 @@ Additional parameter (in the constructor) is the tournament rate, a eoSurviveAndDie is
    -Replacement: Adding + +
    +
    Replacement: Adding (weak) elitism

    You can add what is called weak elitism to any replacement by encapsulating it into an eoWeakElitismReplacement @@ -170,11 +320,13 @@ can be any replacement object):
    and use now replace as your replacement procedure within your algorithm.

    Note: of course, adding weak elitism to an elitist replacement makes no sense - but will not harm either :-) -

    Replacement: Test +
    +


    +
    Replacement: Test file

    The file t-eoReplacement in the test directory implements all -above replacmenet procedures within a very simple and easy-to-monitor Dummy +above replacement procedures within a very simple and easy-to-monitor Dummy EO class.


    @@ -239,10 +391,10 @@ parameter R should be in [0.5,1]. It is implemented in the eoStochTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament -in  selectors.h.
    -Note: A stochastic tournament with -rate 1.0 is strictly identical to a deterministic tournament of size 2. +in  selectors.h. +
    Note: A stochastic tournament with +rate 1.0 is strictly identical to a deterministic tournament of size 2.
  • EP Tournament of size T is a global tournament: it works by assigning a score to all @@ -252,12 +404,13 @@ Everytime I wins, its score in incremented by 1 (and by 0.5 for every draw). The individuals are then selected deterministically based on their scores from that procedure. The EP Tournament is implemented in the  eoEPReduce -truncation method used in some replacement procedures. 
    -Note: whereas both the determinitic +truncation method used in the eoEPReplacement +procedure.
  • + +
    Note: whereas both the determinitic and the stochastic tournament select one individual, the EP tournament is designed for batch selection. Of course it could be used to select a -single individual, but at a rather high computational cost. - +single individual, but at a rather high computational cost.



    @@ -266,7 +419,9 @@ populations

    In replacement procedures, one frequently needs to merge two populations (computed form old parents and new-born offspring). Classes derived from the abstract class eoMerge are written for that purpose. -

    eoMerge: interface +
    +


    +
    eoMerge: interface
    The abstract class for merging procedures is the functor class eoMerge, and the interface for its operator() @@ -282,7 +437,9 @@ void>
    .
    This means that it takes 2 populations and modifies the seond one by adding some individuals from the first one (which is supposed to remain constant). -

    eoMerge: instances +
    +


    +
    eoMerge: instances
    Available instances of eoMerge objects are eoPlus, that simply adds the parents to the offspring, or eoElitism, @@ -296,7 +453,9 @@ populations
    typedef -eoReal<double> Indi;#include +<es.h> +
    typedef eoReal<double> +Indi;
    typedef -eoBin<double> Indi;#include +<ga.h> +
    typedef eoBin<double> +Indi;
    @@ -311,7 +314,6 @@ of initializatio of the population
    //----------------------------------------------------------------------------- +
    // Include the corresponding file +
    #include <ga.h>          +// bitstring representation & operators
    // define your genotype and fitness types
    typedef eoBin<double> Indi;
     // The robust tournament selection
     eoDetTournamentSelect<Indi> selectOne(tSize);       - // tSize in [2,POPSIZE]
     // is now encapsulated in a eoSelectPerc (entage) diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 581b07f2d..9da1a4482 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -99,9 +99,14 @@ this is a file that contains the list of the most important EO files. 
  • Representation: -you then have to declare the type of individuals you will be handling. -All evolution-related objects you will need are templatized w.r.t. the -type of individuals.
  • +you need to declare the type of individuals you will be handling. First, +include some header files where these are defined: ga.h +for bitstring, es.h +for real-valued genotypes.
    +Then a
    typedef +directive will allow one to handle the abstract Indi +all around in the main code. Remember that all evolution-related objects +you will need are templatized w.r.t. the type of individuals.
    • diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 5e7b50e96..07f0f91e4 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -67,13 +67,7 @@ argument is a vector<bool> or a Note: Also, +


      Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object file once and for all (
      remember @@ -88,14 +82,8 @@ have to declare 3 template arguments: the type of EO object it will be applied to, the return type and the type of argument the function actually requires.

    • -
        -

        -
        -
        -
        -
        -

      Note: In the -previous files (Bit - Real) +


      Note: In +the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness type of EO object, third = first).
        @@ -117,13 +105,7 @@ You can also use different initializers and call them in turn through the call to pop.append() function (see Exercise 2).
      -
        -

        -
        -
        -
        -
        -

      Note: Don't +


      Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!!
        From 508a5b9215224542af569c95ad638ab16985cd5c Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 27 Jan 2001 08:38:31 +0000 Subject: [PATCH 0430/2134] Added some comments so eoRealVectorBounds is documented --- eo/src/es/eoRealBounds.h | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/eo/src/es/eoRealBounds.h b/eo/src/es/eoRealBounds.h index 19b4c1e90..021744872 100644 --- a/eo/src/es/eoRealBounds.h +++ b/eo/src/es/eoRealBounds.h @@ -57,7 +57,7 @@ There is also a uniform() method that generates a uniform value (if possible, i.e. if bounded) in the interval. Derived class are - eoRealInterval, that holds a minimum and maximum value +eoRealInterval, that holds a minimum and maximum value, eoRealNoBounds, that implements the "unbounded bounds" TODO: the eoRealMinBound and eoRealMaxBound that implement @@ -196,8 +196,11 @@ private : }; -// now the vectorized version - +/** +Class eoRealVectorBounds implements the vectorized version: +it is basically a vector of eoRealBounds * and forwards all request +to the elements of the vector. +*/ class eoRealVectorBounds : public vector { public: @@ -224,7 +227,8 @@ public: vector(_dim, &_bounds) {} - // Ctor: different bonds for different variables, vectors of double + /** Ctor: different bonds for different variables, vectors of double + */ eoRealVectorBounds(vector _min, vector _max) { if (_max.size() != _min.size()) @@ -235,7 +239,8 @@ public: } } - // Ctor, particular case of dim-2 + /** Ctor, particular case of dim-2 + */ eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : vector(0) { @@ -243,12 +248,15 @@ public: push_back( &_ybounds); } + /** test: is i_th component bounded + */ virtual bool isBounded(unsigned _i) { return (*this)[_i]->isBounded(); } - // bounded iff all are bounded + /** test: bounded iff all are bounded + */ virtual bool isBounded(void) { for (unsigned i=0; iisMaxBounded();} ; + /** Modifies a real value so that it stays in the bounds - i_th component + */ virtual void foldsInBounds(unsigned _i, double & _r) { (*this)[_i]->foldsInBounds(_r); } + /** Modifies a vector of real value so that it stays in the bounds + */ virtual void foldsInBounds(vector & _v) { for (unsigned i=0; iisInBounds(_r); } - // isInBounds iff all are in bouds + /** test: are ALL components within the bounds + */ virtual bool isInBounds(vector _v) { for (unsigned i=0; iuniform(); return r; } - // fills a vector with uniformly chosen variables in bounds + /** fills a vector with uniformly chosen variables in bounds + */ void uniform(vector & _v, eoRng & _rng = eo::rng) { _v.resize(size()); @@ -320,8 +337,8 @@ public: } }; -// the dummy unbounded eoRealVectorBounds: - +/** the dummy unbounded eoRealVectorBounds: usefull if you don't need bounds! + */ class eoRealVectorNoBounds: public eoRealVectorBounds { public: From 8d35fad13654a080d2ce71afc8fb3ee7128274cb Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Jan 2001 07:00:41 +0000 Subject: [PATCH 0431/2134] Added the includes ga.h and es.h Removed the old eoEsObjectiveBounds and evolutionar_strategies from es dir --- eo/src/Makefile.am | 5 +- eo/src/es.h | 65 +++++++++++++++++++++ eo/src/es/Makefile.am | 5 +- eo/src/ga.h | 46 +++++++++++++++ eo/src/obsolete/Makefile.am | 3 +- eo/src/obsolete/eoEsObjectiveBounds.h | 81 +++++++++++++++++++++++++++ eo/src/obsolete/evolution_strategies | 15 +++++ eo/src/utils/Makefile.am | 3 +- eo/test/t-eoESFull.cpp | 18 +++--- 9 files changed, 225 insertions(+), 16 deletions(-) create mode 100644 eo/src/es.h create mode 100644 eo/src/ga.h create mode 100644 eo/src/obsolete/eoEsObjectiveBounds.h create mode 100644 eo/src/obsolete/evolution_strategies diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 9ca97b44e..81b547aad 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,12 +4,11 @@ ## ############################################################################### -SUBDIRS = es ga utils other +SUBDIRS = es ga gp utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetTournamentSelect.h eoDetTournamentInserter.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalSelect.h eoProportionalGOpSel.h eoProportionalOpSel.h eoRandomSelect.h eoReduce.h eoReplacement.h eoSGA.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectOne.h eoSelectPerc.h eoSequentialGOpSel.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournamentSelect.h eoStochTournamentInserter.h eoTransform.h eoVariableLength.h eoWrappedOps.h - +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentInserter.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalGOpSel.h eoProportionalOpSel.h eoProportionalSelect.h eoQud2BinOp.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSequentialGOpSel.h eoSteadyFitContinue.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournamentInserter.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoWrappedOps.h es.h ga.h diff --git a/eo/src/es.h b/eo/src/es.h new file mode 100644 index 000000000..d96b9746b --- /dev/null +++ b/eo/src/es.h @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// es.h +// (c) GeNeura Team 1998 - Maarten Keijzer 2000 - Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifndef _es_h +#define _es_h + +// contains the include specific to real representations, i.e. in src/es dir +//----------------------------------------------------------------------------- + +// the genotypes - from plain vector to full correlated mutation +#include +#include +#include +#include + +// the initialization +#include + +// general operators +#include +#include + +// and their generic counterparts +#include + +// the ES-mutations +#include +#include + +// the crossover - to be continued +#include + +#endif _es_h + +// Local Variables: +// mode: C++ +// End: diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 6b89d98a6..8b275335f 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -5,7 +5,4 @@ ############################################################################### libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = evolution_strategies eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsObjectiveBounds.h eoEsSimple.h eoEsStdev.h - - - +libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealBounds.h eoRealOp.h diff --git a/eo/src/ga.h b/eo/src/ga.h new file mode 100644 index 000000000..4e2720795 --- /dev/null +++ b/eo/src/ga.h @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------- +// ga.h +// (c) GeNeura Team 1998 - 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifndef _ga_h +#define _ga_h + +// all bitstring-specific files +#include + +// the operators +#include + +// #include + +//----------------------------------------------------------------------------- + +#endif _ga_h + +// Local Variables: +// mode: C++ +// End: diff --git a/eo/src/obsolete/Makefile.am b/eo/src/obsolete/Makefile.am index 56fae4df6..1a94e144a 100644 --- a/eo/src/obsolete/Makefile.am +++ b/eo/src/obsolete/Makefile.am @@ -10,4 +10,5 @@ lib_LIBRARIES = libeoobsolete.a libeoobsolete_a_SOURCES = eoParserUtils.cpp libeoobsoleteincdir = $(includedir)/eo/obsolete -libeoobsoleteinc_HEADERS = eoProblem.h eoParser.h eoParserUtils.h +libeoobsoleteinc_HEADERS = eo1d.h eo1dWDistance.h eo2d.h eo2dVector.h eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h eoAtomRandom.h eoBin.h eoBreeder.h eoCopyElite.h eoDetTournament.h eoDetTournamentIndiSelector.h eoDistance.h eoDup.h eoES.h eoESChrom.h eoESFullChrom.h eoESFullMut.h eoEsObjectiveBounds.h eoEvalFuncPtrCnt.h eoFitTerm.h eoFitness.h eoGenTerm.h eoGeneration.h eoID.h eoInclusion.h eoInsertion.h eoKill.h eoLottery.h eoMutation.h eoNegExp.h eoNonUniform.h eoNormal.h eoParser.h eoParserUtils.h eoPopOps.h eoProblem.h eoProportional.h eoRandomBreed.h eoRandomIndiSelector.h eoRandomSelect.h eoRank.h eoRnd.h eoScheme.h eoSelectRandom.h eoStochTournament.h eoStringMutation.h eoTerm.h eoTournament.h eoTranspose.h eoUniform.h eoUniformXOver.h eoVector.h eoXOver2.h + diff --git a/eo/src/obsolete/eoEsObjectiveBounds.h b/eo/src/obsolete/eoEsObjectiveBounds.h new file mode 100644 index 000000000..f6e2fdda0 --- /dev/null +++ b/eo/src/obsolete/eoEsObjectiveBounds.h @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsObjectiveBounds.h +// (c) Maarten Keijzer 2000, GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsObjectiveBounds_h +#define _eoEsObjectiveBounds_h + +/** +\defgroup EvolutionStrategies + + Various classes for the initialization and mutation of real valued vectors. + + Supports simple mutations and various more adaptable mutations, including + correlated mutations. + +*/ + + +/** +\class eoEsObjectiveBounds eoEsObjectiveBounds.h es/eoEsObjectiveBounds.h +\ingroup EvolutionStrategies + + Defines the minima and maxima of the object variables. Needed by eoEsChromInit + and eoEsMutate + + @see eoEsChromInit eoEsMutate +*/ +class eoEsObjectiveBounds +{ + public : + + /** + Objective bounds for a global minimum and maximum + */ + eoEsObjectiveBounds(int _nGenes, double _min, double _max) : repMinimum(_nGenes), repMaximum(_nGenes) + { + std::fill(repMinimum.begin(), repMinimum.end(), _min); + std::fill(repMaximum.begin(), repMaximum.end(), _max); + } + + /** + Objective bounds for a per gene minimum and maximum + */ + eoEsObjectiveBounds(const std::vector& _min, const std::vector& _max) + : repMinimum(_min), repMaximum(_max) {} + + typedef double doubleype; + + double minimum(size_t i) { return repMinimum[i]; } + double maximum(size_t i) { return repMaximum[i]; } + + unsigned chromSize(void) const { return repMinimum.size(); } + + private : + std::vector repMinimum; + std::vector repMaximum; +}; + +#endif diff --git a/eo/src/obsolete/evolution_strategies b/eo/src/obsolete/evolution_strategies new file mode 100644 index 000000000..d1c729ba9 --- /dev/null +++ b/eo/src/obsolete/evolution_strategies @@ -0,0 +1,15 @@ +#ifndef _eoEs_h +#define _eoEs_h + +#include +#include +#include +#include + +#include +#include + +#include + + +#endif diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 8c3d7000b..17f4510b1 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,6 +10,7 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h eoStat.h eoMonitor.h eoFileMonitor.h eoUpdater.h checkpointing eoCheckPoint.h eoStdoutMonitor.h eoGnuplot1DMonitor.h +libeoinc_HEADERS = compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFileMonitor.h eoGnuplot1DMonitor.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h selectors.h + diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index ca28941f7..177b625bc 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -16,7 +16,7 @@ using namespace std; #include // representation specific -#include +#include #include "real_value.h" // the sphere fitness @@ -25,7 +25,7 @@ using namespace std; typedef eoMinimizingFitness FitT; template -void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds, eoValueParam _load_name); +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _bounds, eoValueParam _load_name); int main(int argc, char *argv[]) { @@ -39,8 +39,8 @@ int main(int argc, char *argv[]) eoValueParam& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's'); eoValueParam& corr = parser.createParam(false, "Correl", "Use correlated mutations", 'c'); eoValueParam& chromSize = parser.createParam(unsigned(50), "ChromSize", "Number of chromosomes", 'n'); - eoValueParam& minimum = parser.createParam(-1.e5, "Min", "Minimum for Objective Variables", 'l'); - eoValueParam& maximum = parser.createParam(1.e5, "Max", "Maximum for Objective Variables", 'h'); + eoValueParam& minimum = parser.createParam(-1.0, "Min", "Minimum for Objective Variables", 'l'); + eoValueParam& maximum = parser.createParam(1.0, "Max", "Maximum for Objective Variables", 'h'); eoState state; state.registerObject(parser); @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) state.registerObject(rng); - eoEsObjectiveBounds bounds(chromSize.value(), minimum.value(), maximum.value()); + eoRealVectorBounds bounds(chromSize.value(), minimum.value(), maximum.value()); // Run the appropriate algorithm if (stdevs.value() == false && corr.value() == false) @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) } template -void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& _bounds, eoValueParam _load_name) +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _bounds, eoValueParam _load_name) { // evaluation eoEvalFuncPtr&> eval( real_value ); @@ -128,7 +128,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& monitor.add(average); - eoGenContinue cnt(20); + eoGenContinue cnt(100); eoCheckPoint checkpoint(cnt); checkpoint.add(monitor); checkpoint.add(average); @@ -140,4 +140,8 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoEsObjectiveBounds& eoEvolutionStrategy es(checkpoint, eval, opSel, lambda_rate.value(), eoEvolutionStrategy::comma_strategy()); es(pop); + + pop.sort(); + cout << "Final population\n" << pop << endl; + } From 03bc482da05702af77f17dc14502fe56425cb27e Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Jan 2001 07:02:27 +0000 Subject: [PATCH 0432/2134] Actually removed eoEsObjectiveBounds.h and evolution_strategies --- eo/src/es/eoEsObjectiveBounds.h | 81 --------------------------------- eo/src/es/evolution_strategies | 15 ------ 2 files changed, 96 deletions(-) delete mode 100644 eo/src/es/eoEsObjectiveBounds.h delete mode 100644 eo/src/es/evolution_strategies diff --git a/eo/src/es/eoEsObjectiveBounds.h b/eo/src/es/eoEsObjectiveBounds.h deleted file mode 100644 index f6e2fdda0..000000000 --- a/eo/src/es/eoEsObjectiveBounds.h +++ /dev/null @@ -1,81 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEsObjectiveBounds.h -// (c) Maarten Keijzer 2000, GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoEsObjectiveBounds_h -#define _eoEsObjectiveBounds_h - -/** -\defgroup EvolutionStrategies - - Various classes for the initialization and mutation of real valued vectors. - - Supports simple mutations and various more adaptable mutations, including - correlated mutations. - -*/ - - -/** -\class eoEsObjectiveBounds eoEsObjectiveBounds.h es/eoEsObjectiveBounds.h -\ingroup EvolutionStrategies - - Defines the minima and maxima of the object variables. Needed by eoEsChromInit - and eoEsMutate - - @see eoEsChromInit eoEsMutate -*/ -class eoEsObjectiveBounds -{ - public : - - /** - Objective bounds for a global minimum and maximum - */ - eoEsObjectiveBounds(int _nGenes, double _min, double _max) : repMinimum(_nGenes), repMaximum(_nGenes) - { - std::fill(repMinimum.begin(), repMinimum.end(), _min); - std::fill(repMaximum.begin(), repMaximum.end(), _max); - } - - /** - Objective bounds for a per gene minimum and maximum - */ - eoEsObjectiveBounds(const std::vector& _min, const std::vector& _max) - : repMinimum(_min), repMaximum(_max) {} - - typedef double doubleype; - - double minimum(size_t i) { return repMinimum[i]; } - double maximum(size_t i) { return repMaximum[i]; } - - unsigned chromSize(void) const { return repMinimum.size(); } - - private : - std::vector repMinimum; - std::vector repMaximum; -}; - -#endif diff --git a/eo/src/es/evolution_strategies b/eo/src/es/evolution_strategies deleted file mode 100644 index d1c729ba9..000000000 --- a/eo/src/es/evolution_strategies +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _eoEs_h -#define _eoEs_h - -#include -#include -#include -#include - -#include -#include - -#include - - -#endif From 75dad8f8992df7cadb7b69f1bea8c2a9df205ba4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Jan 2001 07:27:12 +0000 Subject: [PATCH 0433/2134] Error in src/Makefile.am --- eo/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 81b547aad..1aff3ab60 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,4 +11,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentInserter.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalGOpSel.h eoProportionalOpSel.h eoProportionalSelect.h eoQud2BinOp.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSequentialGOpSel.h eoSteadyFitContinue.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournamentInserter.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoWrappedOps.h es.h ga.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentInserter.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalGOpSel.h eoProportionalOpSel.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSequentialGOpSel.h eoSteadyFitContinue.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournamentInserter.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoWrappedOps.h es.h ga.h From 0f985c627e5e8718e3f184baa0a2be5b9351c796 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Jan 2001 07:31:34 +0000 Subject: [PATCH 0434/2134] Modified to use eoRealBounds rather than eoEsObjectiveBounds --- eo/src/es/eoEsMutate.h | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 54c406fe5..7521eb040 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include @@ -73,7 +73,7 @@ public: @param _init proxy class for initializating the three parameters eoEsMutate needs @param _bounds the bounds for the objective variables */ - eoEsMutate(eoEsMutationInit& _init, eoEsObjectiveBounds& _bounds) : bounds(_bounds) + eoEsMutate(eoEsMutationInit& _init, eoRealVectorBounds& _bounds) : bounds(_bounds) { init(EOT(), _init); // initialize on actual type used } @@ -102,9 +102,8 @@ public: { _eo[i] += _eo.stdev * rng.normal(); } + bounds.foldsInBounds(_eo); - keepInBounds(_eo); - _eo.invalidate(); } @@ -136,8 +135,8 @@ public: _eo[i] += stdev * rng.normal(); } - keepInBounds(_eo); - + bounds.foldsInBounds(_eo); + _eo.invalidate(); } @@ -219,34 +218,23 @@ public: for (i = 0; i < _eo.size(); i++) _eo[i] += VarStp[i]; - keepInBounds(_eo); + bounds.foldsInBounds(_eo); _eo.invalidate(); } - void keepInBounds(eoFixedLength& _eo) const - { - for (unsigned i = 0; i < _eo.size(); ++i) - { - if (_eo[i] < bounds.minimum(i)) - _eo[i] = bounds.minimum(i); - else if (_eo[i] > bounds.maximum(i)) - _eo[i] = bounds.maximum(i); - } - } - private : void init(eoEsSimple, eoEsMutationInit& _init) { - unsigned size = bounds.chromSize(); + unsigned size = bounds.size(); TauLcl = _init.TauLcl(); TauLcl /= sqrt((double) size); } void init(eoEsStdev, eoEsMutationInit& _init) { - unsigned size = bounds.chromSize(); + unsigned size = bounds.size(); TauLcl = _init.TauLcl(); TauGlb = _init.TauGlb(); @@ -268,7 +256,7 @@ public: double TauGlb; /* Global factor for mutation of std deviations */ double TauBeta; /* Factor for mutation of correlation parameters */ - eoEsObjectiveBounds& bounds; + eoRealVectorBounds& bounds; static const double stdev_eps; }; From 2b46277eedef09dc032410f94751cf90e2b3843f Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 29 Jan 2001 10:25:44 +0000 Subject: [PATCH 0435/2134] Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. The former simply set values to the boundary values in case they are out The latter allows to short-cut all bound-checks when no need SOme day I will put this in utils, and have a eoRealBounds.cpp in the pre-compiled library --- eo/src/es/eoGenericRealOp.h | 6 +- eo/src/es/eoRealBounds.h | 295 ++++++++++++++++++++++++++++++++---- 2 files changed, 272 insertions(+), 29 deletions(-) diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h index 88aa5a296..c29fd1629 100644 --- a/eo/src/es/eoGenericRealOp.h +++ b/eo/src/es/eoGenericRealOp.h @@ -222,7 +222,7 @@ template class eoGenericSegmentCrossover: public eoGenericQuadOp double r1, r2, fact; double alphaMin = -alpha; double alphaMax = 1+alpha; - if (alpha == 0.0) // no check to perform + if ( (alpha == 0.0) || bounds.hasNoBoundAtAll() ) // no check to perform fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) else // look for the bounds for fact { @@ -319,7 +319,7 @@ template class eoGenericArithmeticCrossover: { unsigned i; double r1, r2, fact; - if (alpha == 0.0) // no check to perform + if ( (alpha == 0.0) || bounds.hasNoBoundAtAll() ) // no check to perform for (i=0; i<_eo1.size(); i++) { r1=_eo1[i]; @@ -328,7 +328,7 @@ template class eoGenericArithmeticCrossover: _eo1[i] = fact * r1 + (1-fact) * r2; _eo2[i] = (1-fact) * r1 + fact * r2; } - else // check the bounds + else // must check the bounds for (i=0; i<_eo1.size(); i++) { r1=_eo1[i]; diff --git a/eo/src/es/eoRealBounds.h b/eo/src/es/eoRealBounds.h index 021744872..be544a996 100644 --- a/eo/src/es/eoRealBounds.h +++ b/eo/src/es/eoRealBounds.h @@ -73,33 +73,71 @@ to the elements of the vector. class eoRealBounds { public: + virtual ~eoRealBounds(){} + + /** Self-Test: true if ***both*** a min and a max + */ virtual bool isBounded(void) = 0; + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) = 0; + + /** Self-Test: bounded from below??? + */ virtual bool isMinBounded(void) = 0; + + /** Self-Test: bounded from above??? + */ virtual bool isMaxBounded(void) = 0; - virtual void foldsInBounds(double &) = 0; + + /** Test on a value: is it in bounds? + */ virtual bool isInBounds(double) = 0; - // accessors + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double &) = 0; + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double &) = 0; + + /** get minimum value + * @exception if does not exist + */ virtual double minimum() = 0; + /** get maximum value + * @exception if does not exist + */ virtual double maximum() = 0; + /** get range + * @exception if unbounded + */ virtual double range() = 0; - // random generators + /** random generator of uniform numbers in bounds + * @exception if unbounded + */ virtual double uniform(eoRng & _rng = eo::rng) = 0; }; +/** A default class for unbounded variables + */ class eoRealNoBounds : public eoRealBounds { public: virtual ~eoRealNoBounds(){} virtual bool isBounded(void) {return false;} + virtual bool hasNoBoundAtAll(void) {return true;} virtual bool isMinBounded(void) {return false;} virtual bool isMaxBounded(void) {return false;} virtual void foldsInBounds(double &) {return;} + virtual void truncate(double &) {return;} virtual bool isInBounds(double) {return true;} - // accessors virtual double minimum() { throw logic_error("Trying to get minimum of unbounded eoRealBounds"); @@ -113,17 +151,19 @@ public: throw logic_error("Trying to get range of unbounded eoRealBounds"); } - // random generators virtual double uniform(eoRng & _rng = eo::rng) { throw logic_error("Trying to generate uniform values in unbounded eoRealBounds"); } }; -/* fully bounded == interval */ +////////////////////////////////////////////////////////////// +// fully bounded == interval +///////////////////////////////////////////////////////////// class eoRealInterval : public eoRealBounds { public : + virtual ~eoRealInterval(){} /** Simple bounds = minimum and maximum (allowed) @@ -142,10 +182,11 @@ public : // description virtual bool isBounded(void) {return true;} + virtual bool hasNoBoundAtAll(void) {return false;} virtual bool isMinBounded(void) {return true;} virtual bool isMaxBounded(void) {return true;} - double uniform(eoRng & _rng = eo::rng) + virtual double uniform(eoRng & _rng = eo::rng) { return repMinimum + _rng.uniform(repRange); } @@ -161,7 +202,7 @@ public : } // folds a value into bounds - void foldsInBounds(double & _r) + virtual void foldsInBounds(double & _r) { long iloc; double dlargloc = 2 * range() ; @@ -189,17 +230,171 @@ public : } } + // truncates to the bounds + virtual void truncate(double & _r) + { + if (_r < repMinimum) + _r = repMinimum; + else if (_r > repMaximum) + _r = repMaximum; + return; + } + private : double repMinimum; double repMaximum; double repRange; // to minimize operations ??? }; +////////////////////////////////////////////////////////////// +// bounded from below +///////////////////////////////////////////////////////////// +class eoRealBelowBound : public eoRealBounds +{ +public : + virtual ~eoRealBelowBound(){} + /** + Simple bounds = minimum + */ + eoRealBelowBound(double _min=0) : + repMinimum(_min) + {} + + // accessors + virtual double minimum() { return repMinimum; } + + virtual double maximum() + { + throw logic_error("Trying to get maximum of eoRealBelowBound"); + } + virtual double range() + { + throw logic_error("Trying to get range of eoRealBelowBound"); + } + + // random generators + virtual double uniform(eoRng & _rng = eo::rng) + { + throw logic_error("Trying to generate uniform values in eoRealBelowBound"); + } + + // description + virtual bool isBounded(void) {return false;} + virtual bool hasNoBoundAtAll(void) {return false;} + virtual bool isMinBounded(void) {return true;} + virtual bool isMaxBounded(void) {return false;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) + { + if (_r < repMinimum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) + { + // easy as a pie: symmetry w.r.t. minimum + if (_r < repMinimum) // nothing to do otherwise + _r = 2*repMinimum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) + { + if (_r < repMinimum) + _r = repMinimum; + return; + } +private : + double repMinimum; +}; + +////////////////////////////////////////////////////////////// +// bounded from above +///////////////////////////////////////////////////////////// +class eoRealAboveBound : public eoRealBounds +{ +public : + virtual ~eoRealAboveBound(){} + + /** + Simple bounds = minimum + */ + eoRealAboveBound(double _max=0) : + repMaximum(_max) + {} + + // accessors + virtual double maximum() { return repMaximum; } + + virtual double minimum() + { + throw logic_error("Trying to get minimum of eoRealAboveBound"); + } + virtual double range() + { + throw logic_error("Trying to get range of eoRealAboveBound"); + } + + // random generators + virtual double uniform(eoRng & _rng = eo::rng) + { + throw logic_error("Trying to generate uniform values in eoRealAboveBound"); + } + + // description + virtual bool isBounded(void) {return false;} + virtual bool hasNoBoundAtAll(void) {return false;} + virtual bool isMinBounded(void) {return false;} + virtual bool isMaxBounded(void) {return true;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) + { + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) + { + // easy as a pie: symmetry w.r.t. maximum + if (_r > repMaximum) // nothing to do otherwise + _r = 2*repMaximum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) + { + if (_r > repMaximum) + _r = repMaximum; + return; + } + +private : + double repMaximum; +}; + +///////////////////////////////////////////////////////////////////// +// Vectorized versions +///////////////////////////////////////////////////////////////////// /** Class eoRealVectorBounds implements the vectorized version: it is basically a vector of eoRealBounds * and forwards all request to the elements of the vector. +Probably it would have been cleaner if there had been an empty base class +from which eoRealVectorBounds AND eoRealVectorNoBounds would have derived. +This is because I started to write eoRealVectorNoBounds as a + vector whose compoenents would have been eoRealNoBounds + but then realize that you don't necessarily have the dimension + when construction this vector - hence I added the eoRealVectorNoBounds ... +Anyone with extra time in his agenda is welcome to change that :-) */ class eoRealVectorBounds : public vector { @@ -207,14 +402,13 @@ public: // virtual desctructor (to avoid warining?) virtual ~eoRealVectorBounds(){} - // Default Ctor + /** Default Ctor + */ eoRealVectorBounds() : vector(0) {} - /** - Simple bounds = minimum and maximum (allowed) + /** Simple bounds = minimum and maximum (allowed) */ - // Ctor: same bonds for everybody, explicit eoRealVectorBounds(unsigned _dim, double _min, double _max) : vector(_dim, new eoRealInterval(_min, _max)) { @@ -222,7 +416,8 @@ public: throw std::logic_error("Void range in eoRealVectorBounds"); } - // Ctor: same bonds for everybody, given as a eoRealBounds + /** Ctor: same bonds for everybody, given as an eoRealBounds + */ eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : vector(_dim, &_bounds) {} @@ -265,36 +460,69 @@ public: return true; } - // these do not make any sense as vectors! + /** Self-test: true iff i_th component has no bounds at all + */ + virtual bool hasNoBoundAtAll(unsigned _i) + { + return (*this)[_i]->hasNoBoundAtAll(); + } + + /** Self-test: true iff all components have no bound at all + */ + virtual bool hasNoBoundAtAll(void) + { + for (unsigned i=0; ihasNoBoundAtAll()) + return false; + return true; + } + virtual bool isMinBounded(unsigned _i) { return (*this)[_i]->isMinBounded();} ; virtual bool isMaxBounded(unsigned _i) { return (*this)[_i]->isMaxBounded();} ; - /** Modifies a real value so that it stays in the bounds - i_th component + /** Folds a real value back into the bounds - i_th component */ virtual void foldsInBounds(unsigned _i, double & _r) { (*this)[_i]->foldsInBounds(_r); } - /** Modifies a vector of real value so that it stays in the bounds + /** Folds all variables of a vector of real values into the bounds */ virtual void foldsInBounds(vector & _v) { for (unsigned i=0; ifoldsInBounds(_v[i]); } } - /** test: is i_th component within the bounds + /** Truncates a real value to the bounds - i_th component + */ + virtual void truncate(unsigned _i, double & _r) + { + (*this)[_i]->truncate(_r); + } + + /** truncates all variables of a vector of real values to the bounds + */ + virtual void truncate(vector & _v) + { + for (unsigned i=0; itruncate(_v[i]); + } + } + + /** test: is i_th component within the bounds? */ virtual bool isInBounds(unsigned _i, double _r) { return (*this)[_i]->isInBounds(_r); } - /** test: are ALL components within the bounds + /** test: are ALL components within the bounds? */ virtual bool isInBounds(vector _v) { @@ -304,11 +532,15 @@ public: return true; } - // accessors + /** Accessors: will raise an exception if these do not exist + */ virtual double minimum(unsigned _i) {return (*this)[_i]->minimum();} virtual double maximum(unsigned _i) {return (*this)[_i]->maximum();} virtual double range(unsigned _i) {return (*this)[_i]->range();} + /** Computes the average range + * An exception will be raised if one of the component is unbounded + */ virtual double averageRange() { double r=0.0; @@ -318,6 +550,7 @@ public: } /** Generates a random number in i_th range + * An exception will be raised if one of the component is unbounded */ virtual double uniform(unsigned _i, eoRng & _rng = eo::rng) { @@ -326,6 +559,7 @@ public: } /** fills a vector with uniformly chosen variables in bounds + * An exception will be raised if one of the component is unbounded */ void uniform(vector & _v, eoRng & _rng = eo::rng) { @@ -338,6 +572,8 @@ public: }; /** the dummy unbounded eoRealVectorBounds: usefull if you don't need bounds! + * everything is inlined. + * Warning: we do need this class, and not only a vector */ class eoRealVectorNoBounds: public eoRealVectorBounds { @@ -354,44 +590,51 @@ public: virtual bool isBounded(unsigned) {return false;} virtual bool isBounded(void) {return false;} + + virtual bool hasNoBoundAtAll(unsigned) {return true;} + virtual bool hasNoBoundAtAll(void) {return true;} + virtual bool isMinBounded(unsigned) {return false;} virtual bool isMaxBounded(unsigned) {return false;} virtual void foldsInBounds(unsigned, double &) {return;} virtual void foldsInBounds(vector &) {return;} + virtual void truncate(unsigned, double &) {return;} + virtual void truncate(vector &) {return;} + virtual bool isInBounds(unsigned, double) {return true;} virtual bool isInBounds(vector) {return true;} // accessors virtual double minimum(unsigned) { - throw logic_error("Trying to get minimum of unbounded eoRealBounds"); + throw logic_error("Trying to get minimum of eoRealVectorNoBounds"); } virtual double maximum(unsigned) { - throw logic_error("Trying to get maximum of unbounded eoRealBounds"); + throw logic_error("Trying to get maximum of eoRealVectorNoBounds"); } virtual double range(unsigned) { - throw logic_error("Trying to get range of unbounded eoRealBounds"); + throw logic_error("Trying to get range of eoRealVectorNoBounds"); } virtual double averageRange() { - throw logic_error("Trying to get average range of unbounded eoRealBounds"); + throw logic_error("Trying to get average range of eoRealVectorNoBounds"); } // random generators virtual double uniform(unsigned, eoRng & _rng = eo::rng) { - throw logic_error("No uniform distribution on unbounded eoRealBounds"); + throw logic_error("No uniform distribution on eoRealVectorNoBounds"); } // fills a vector with uniformly chosen variables in bounds void uniform(vector &, eoRng & _rng = eo::rng) { - throw logic_error("No uniform distribution on unbounded eoRealBounds"); + throw logic_error("No uniform distribution on eoRealVectorNoBounds"); } }; From 097d34be395c450cac88620df7eec3cb53f2aba3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Jan 2001 04:53:05 +0000 Subject: [PATCH 0436/2134] Comments added to remove undocumented classes from Doxygen documentation --- eo/src/eoOp.h | 15 ++++++++++----- eo/src/eoSGATransform.h | 4 ++-- eo/src/eoVariableLengthCrossover.h | 4 ++-- eo/src/es/eoGenericRealOp.h | 19 ++----------------- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 5f8e46ea8..e1902a5d5 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -102,11 +102,12 @@ public: virtual string className() const {return "eoBinOp";}; }; +// planning the change of name eoQuadraticOp --> eoQuadOp +#define eoQuadraticOp eoQuadOp + /** Quadratic genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. */ -#define eoQuadraticOp eoQuadOp - template class eoQuadraticOp: public eoOp, public eoBF { public: @@ -116,15 +117,19 @@ public: virtual string className() const {return "eoQuadOp";}; }; -// Turning an eoBinOp into an eoQuadOp is generic: +/** Turning an eoQuadOp into an eoBinOp: simply don't touch the second arg! + */ template class eoQuad2BinOp: public eoBinOp { public: - // Ctor, from an eoQuadOp + /** Ctor + * @param _quadOp the eoQuadOp to be transformed + */ eoQuad2BinOp(eoQuadOp & _quadOp) : quadOp(_quadOp) {} - // Operator() simply calls embedded quadOp operator() with dummy second arg + /** Operator() simply calls embedded quadOp operator() with dummy second arg + */ void operator()(EOT & _eo1, const EOT & _eo2) { EOT eoTmp = _eo2; // a copy that can be modified diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 63bd462a7..a3237b9b7 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -37,7 +37,7 @@ #include #include -/***************************************************************************** +/** *************************************************************************** * eoSGATransform: transforms a population using genetic operators. * It does it exactly as class eoSGA, i.e. only accepts * quadratic crossover and unary mutation @@ -90,7 +90,7 @@ template class eoSGATransform : public eoTransform double mutationProba; }; -/***************************************************************************** +/** *************************************************************************** * eoDynSGATransform: transforms a population using genetic operators. * It is the Dynamic version of the above eoSGATransform * i.e. the operators probabilities can be passed as an eoValueParam, diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 20d073957..9e6aa72f5 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -39,7 +39,7 @@ Basically, they exchange genes - we need some matching information to apply atom crossover */ -//* A helper class for choosing which genes to exchange +/** A helper class for choosing which genes to exchange */ template class eoAtomExchange : public eoBF { @@ -48,7 +48,7 @@ public: virtual void randomize(unsigned int, unsigned int){} }; -//* Uniform crossover - well, not really for FixedLength +/** Uniform crossover - well, not really for FixedLength */ template class eoUniformAtomExchange: public eoAtomExchange { diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h index c29fd1629..37596f520 100644 --- a/eo/src/es/eoGenericRealOp.h +++ b/eo/src/es/eoGenericRealOp.h @@ -47,10 +47,7 @@ MS January 25. 2001 /** eoUniformMutation --> changes all values of the vector by uniform choice with range epsilon with probability p_change per variable -\class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric */ - template class eoGenericUniformMutation: public eoGenericMonOp { public: @@ -113,8 +110,6 @@ private: /** eoDetUniformMutation --> changes exactly k values of the vector by uniform choice with range epsilon -\class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric */ template class eoGenericDetUniformMutation: @@ -173,14 +168,10 @@ private: }; -// two arithmetical crossovers /** eoSegmentCrossover --> uniform choice in segment - == arithmetical with same value along all coordinates -\class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + == arithmetical with same value along all coordinates */ - template class eoGenericSegmentCrossover: public eoGenericQuadOp { public: @@ -266,11 +257,8 @@ protected: }; /** eoArithmeticCrossover --> uniform choice in hypercube - == arithmetical with different values for each coordinate -\class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + == arithmetical with different values for each coordinate */ - template class eoGenericArithmeticCrossover: public eoGenericQuadOp { @@ -366,10 +354,7 @@ protected: /** eoRealUxOver --> Uniform crossover, also termed intermediate crossover -\class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric */ - template class eoGenericRealUxOver: public eoGenericQuadOp { public: From 56abe665823ab92b01bc497ec376e4a3343ee5ef Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 31 Jan 2001 18:38:39 +0000 Subject: [PATCH 0437/2134] Added the monitoring facilities for snapshots (i.e. generating and plotting a new file every generation) which is different from the continuous monitoring (same file/plot is angemented every generation). This lead to a number of modifications in many files in utils dir But now we can watch on-line - fitness spreadout - FDC plots - multi-objective Pareto fronts (though the multi-objective sruff isn't there yet!) --- eo/src/utils/eoDistance.h | 6 +- eo/src/utils/eoFDCStat.h | 136 ++++++++++++++ eo/src/utils/eoFileSnapshot.h | 174 ++++++++++++++++++ eo/src/utils/eoGnuplot.h | 276 ++++++++++++++++++++++++++++ eo/src/utils/eoGnuplot1DMonitor.h | 271 ++------------------------- eo/src/utils/eoGnuplot1DSnapshot.h | 107 +++++++++++ eo/src/utils/eoMonitor.h | 2 +- eo/src/utils/eoParam.h | 23 +++ eo/src/utils/eoScalarFitnessStat.h | 50 +++++ eo/tutorial/Lesson3/exercise3.1.cpp | 40 +++- 10 files changed, 817 insertions(+), 268 deletions(-) create mode 100644 eo/src/utils/eoFDCStat.h create mode 100644 eo/src/utils/eoFileSnapshot.h create mode 100644 eo/src/utils/eoGnuplot.h create mode 100644 eo/src/utils/eoGnuplot1DSnapshot.h create mode 100644 eo/src/utils/eoScalarFitnessStat.h diff --git a/eo/src/utils/eoDistance.h b/eo/src/utils/eoDistance.h index 84b9d124c..ddc3d2f3a 100644 --- a/eo/src/utils/eoDistance.h +++ b/eo/src/utils/eoDistance.h @@ -41,11 +41,11 @@ class eoDistance : public eoBF assumes the 2 things are vectors of something that is double-castable */ -template< class T > -class eoQuadDistance : public eoDistance > +template< class EOT > +class eoQuadDistance : public eoDistance { public: - double operator()(const vector & _v1, const vector & _v2) + double operator()(const EOT & _v1, const EOT & _v2) { double sum=0.0; for (unsigned i=0; i<_v1.size(); i++) diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h new file mode 100644 index 000000000..ed34cc0ff --- /dev/null +++ b/eo/src/utils/eoFDCStat.h @@ -0,0 +1,136 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFDCStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFDCStat_h +#define _eoFDCStat_h + +#include +#include +#include + +/** + The FDC computation - stores the values into eoValueParam +so they can be snapshot by some eoGnuplotSnapshot ... +*/ +template +class eoFDCStat : public eoStat +{ +public : + /** Ctor without the optimum + */ + eoFDCStat(eoDistance & _dist, std::string _description = "FDC") : + eoStat(0, _description), dist(_dist), boolOpt(false) {} + + /** Ctor with the optimum + */ + eoFDCStat(eoDistance & _dist, EOT & _theBest, + std::string _description = "FDC") : + eoStat(0, _description), dist(_dist), + theBest(_theBest), boolOpt(true) {} + + /** Compute the FDC - either from best in pop, or from absolute best + * if it was past in the constructor + */ + virtual void operator()(const eoPop& _pop) + { + if (!boolOpt) // take the local best + theBest = _pop.best_element(); + unsigned int pSize = _pop.size(); + distToBest.value().resize(pSize); + fitnesses.value().resize(pSize); + double sumFit = 0.0, sumDist = 0.0; + for (unsigned i=0; i > + */ + const eoValueParam > & theDist() + { return distToBest; } + const eoValueParam > & theFit() + { return fitnesses; } + + +private: + eoDistance & dist; + EOT theBest; + bool boolOpt; // whether the best is known or not + eoValueParam > distToBest; + eoValueParam > fitnesses; +}; + +/** Specific class for FDCStat monitoring: + * As I failed to have FDC stat as an eoStat, this is the trick + * to put the 2 eoParam > into a monitor + * This class does nothing else. + */ +template +class eoFDCFileSnapshot : public eoFileSnapshot // is an eoMonitor +{ +public: + /** Ctor: in addition to the parameters of the ctor of an eoFileSnapshot + we need here an eoFDCStat. The 2 vectors (distances to optimum + and fitnesses) are added to the monitor so they can be processed + later to a file - and eventually by gnuplot + */ + eoFDCFileSnapshot(eoFDCStat & _FDCstat, + std::string _dirname = "tmpFDC", unsigned _frequency = 1, + std::string _filename = "FDC", std::string _delim = " "): + eoFileSnapshot(_dirname, _frequency, _filename, _delim), + FDCstat(_FDCstat) + { + eoMonitor::add(FDCstat.theDist()); + eoMonitor::add(FDCstat.theFit()); + } + + /** just to be sure the add method is not called further + */ + virtual void add(const eoParam& _param) + { throw runtime_error("Trying to add stats to an eoFDCFileSnapshot"); } + +private: + eoFDCStat & FDCstat; +}; + +#endif + diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h new file mode 100644 index 000000000..8ab1bbbc2 --- /dev/null +++ b/eo/src/utils/eoFileSnapshot.h @@ -0,0 +1,174 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFileSnapshot.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFileSnapshot_h +#define _eoFileSnapshot_h + +#include +#include +#include +#include +#include + + +/** + Prints snapshots of fitnesses to a (new) file every N generations + +Assumes that the parameters that are passed to the monitor +(method add in eoMonitor.h) are eoValueParam > of same size. + +A dir is created and one file per snapshot is created there - +so you can later generate a movie! + +TODO: The counter is handled internally, but this should be changed +so that you can pass e.g. an evalcounter (minor) + +I failed to templatize everything so that it can handle eoParam > +for any type T, simply calling their getValue method ... +*/ + +class eoFileSnapshot : public eoMonitor +{ +public : + typedef vector vDouble; + typedef eoValueParam > vDoubleParam; + + eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, + std::string _filename = "gen", std::string _delim = " "): + dirname(_dirname), frequency(_frequency), + filename(_filename), delim(_delim), counter(0), boolChanged(true) + { + string s = "test -d " + dirname; + int res = system(s.c_str()); + // test for (unlikely) errors + if ( (res==-1) || (res==127) ) + throw runtime_error("Problem executing test of dir in eoFileSnapshot"); + // now make sure there is a dir without any genXXX file in it + if (res) // no dir present + { + s = string("mkdir ")+dirname; + } + else + { + s = string("/bin/rm ")+dirname+ "/" + filename + "*"; + } + system(s.c_str()); + // all done + } + + /** accessor: has something changed (for gnuplot subclass) + */ + virtual bool hasChanged() {return boolChanged;} + + /** accessor to the current filename: needed by the gnuplot subclass + */ + string getFileName() {return currentFileName;} + + /** sets the current filename depending on the counter + */ + void setCurrentFileName() + { + char buff[255]; + ostrstream oscount(buff, 254); + oscount << counter; + oscount << std::ends; + currentFileName = dirname + "/" + filename + oscount.str(); + } + + /** The operator(void): opens the ostream and calls the write method + */ + eoMonitor& operator()(void) + { + if (counter % frequency) + { + boolChanged = false; // subclass with gnuplot will do nothing + counter++; + return (*this); + } + counter++; + boolChanged = true; + setCurrentFileName(); + ofstream os(currentFileName.c_str()); + + if (!os) + { + string str = "eoFileSnapshot: Could not open " + currentFileName; + throw runtime_error(str); + } + + return operator()(os); + } + + /** The operator(): write on an ostream + */ + eoMonitor& operator()(std::ostream& _os) + { + const eoValueParam > * ptParam = + static_cast >* >(vec[0]); + + const vector v = ptParam->value(); + if (vec.size() == 1) // only one vector: -> add number in front + { + for (unsigned k=0; k > vv(vec.size()); + vv[0]=v; + cout << "taille des vecteurs " << v.size() << endl; + for (unsigned i=1; i >* >(vec[1]); + vv[i] = ptParam->value(); + if (vv[i].size() != v.size()) + throw runtime_error("Dimension error in eoSnapshotMonitor"); + } + for (unsigned k=0; k + +/** +@author Marc Schoenauer 2001 +@version 0.0 + +This class is the abstract class that will be used by further gnuplot calls +to plots what is already written by some eoMonitor into a file + +*/ +//----------------------------------------------------------------------------- + +#include +#include + + +/** eoGnuplot: base class that will be used to call gnuplot + */ +class eoGnuplot +{ + public: + // Ctor + eoGnuplot(std::string _title, std::string _extra = string("")) : + firstTime(true) + { + // opens pipe with Gnuplot + initGnuPlot(_title, _extra); + } + + // Dtor + virtual ~eoGnuplot() { + // close - the gnuplot windows if pipe was correctly opened + if( gpCom ) { + PipeComSend( gpCom, "quit\n" ); // Ferme gnuplot + PipeComClose( gpCom ); + gpCom =NULL; + } + } + + /// Class name. + virtual string className() const { return "eoGnuplot"; } + +protected: + void initGnuPlot(std::string _title, std::string _extra); + // the private data + bool firstTime; // the stats might be unknown in Ctor + PCom *gpCom; // Communication with gnuplot OK +private: +}; + +// the following should be placed in a separate eoGnuplot.cpp + + static unsigned numWindow=0; + +//////////////////////////////////////////////////////////// +void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) + ///////////////////////////////////////////////////////// +{ + char snum[255]; + ostrstream os(snum, 254); + os << "300x200-0+" << numWindow*220 << ends; + numWindow++; + char *args[6]; + args[0] = strdup( "gnuplot" ); + args[1] = strdup( "-geometry" ); + args[2] = strdup( os.str() ); + args[3] = strdup( "-title" ); + args[4] = strdup( _title.c_str() ); + args[5] = 0; + gpCom = PipeComOpenArgv( "gnuplot", args ); + if( ! gpCom ) + throw runtime_error("Impossible to spawn gnuplot\n"); + else { + PipeComSend( gpCom, "set grid\n" ); + char s[1024]; // because .c_str() is a const + strcpy(s, _extra.c_str()); + PipeComSend( gpCom, strdup(_extra.c_str()) ); + PipeComSend( gpCom, "\n" ); + } +} + + +// the following should be placed in a separate file pipecom.c +// together with the corresponding pipecom.h +// but first their MSC equivalent must be written and tested +// or some #idef instructions put with clear message at compile time +// that this is for Unix only ??? + +/* ---------------------------------------------------------------------- + * Where........: CMAP - Polytechnique + * File.........: pipecom.c + * Author.......: Bertrand Lamy (Equipe genetique) + * Created......: Mon Mar 13 13:50:11 1995 + * Description..: Communication par pipe bidirectionnel avec un autre process + * + * Ident........: $Id: eoGnuplot.h,v 1.1 2001-01-31 18:38:39 evomarc Exp $ + * ---------------------------------------------------------------------- + */ + + +#include +#include +#include +#include + +// #include "pipecom.h" + + +int Check( PCom *com ) +{ + if( ! com ) { + fprintf( stderr, "PipeCom: Null pointer.\n" ); + fflush( stderr ); + return 0; + } + if( kill( com->pid, 0 ) != 0 ) { + fprintf( stderr, "PipeCom: process doesn't exists.\n" ); + fflush( stderr ); + return 0; + } + return 1; +} + + +PCom * PipeComOpen( char *prog ) +{ + char *args[2]; + args[0] = prog; + args[1] = NULL; + return PipeComOpenArgv( prog, args ); +} + + +PCom * PipeComOpenArgv( char *prog, char *argv[] ) +{ + int toFils[2]; + int toPere[2]; + int sonPid; + PCom * ret = NULL; + + if( pipe( toFils ) < 0 ) { + perror( "PipeComOpen: Creating pipes" ); + return ret; + } + if( pipe( toPere ) < 0 ) { + perror( "PipeComOpen: Creating pipes" ); + return ret; + } + + switch( (sonPid = vfork()) ) { + case -1: + perror("PipeComOpen: fork failed" ); + return ret; + break; + + case 0: + /* --- Here's the son --- */ + /* --- replace old stdin --- */ + if( dup2( toFils[0], fileno(stdin) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + /* --- AVOIR: kill my father --- */ + } + if( dup2( toPere[1], fileno(stdout) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + } + if( execvp( prog, argv ) < 0 ) { + perror( prog ); + perror( "PipeComOpen: can't exec" ); + exit(1); + } + break; + default: + ret = (PCom *) malloc( sizeof(PCom) ); + if( ! ret ) + return NULL; + + ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); + ret->fRead = (FILE *)fdopen( toPere[0], "r" ); + ret->pid = sonPid; + } + return ret; +} + + +int PipeComSend( PCom *to, char *line ) +{ + int nb = 0; + if( ! Check(to ) ) + return nb; + nb = fprintf( to->fWrit, line ); + fflush( to->fWrit ); + return nb; +} + + +int PipeComSendn( PCom *to, char *data, int n ) +{ + int nb = 0; + if( ! Check(to) ) + return nb; + + nb = fwrite( data, 1, n, to->fWrit ); + fflush( to->fWrit ); + return nb; +} + + +int PipeComReceive( PCom *from, char *data, int max ) +{ + if( ! Check(from) ) + return 0; + if( ! data ) { + fprintf( stderr, "PipeComReceive: Invalid data pointer\n" ); + fflush( stderr ); + return 0; + } + if( fgets( data, max, from->fRead ) ) + return strlen(data); + return 0; +} + + + +int PipeComClose( PCom *to ) +{ + if( ! Check(to) ) + return 0; + fclose( to->fRead ); + fclose( to->fWrit ); + free( to ); + return 1; +} + + + +int PipeComWaitFor( PCom *from, char *what ) +{ + char buffer[256]; + do { + if( ! PipeComReceive( from, buffer, 256 ) ) + return 0; + } while( strcmp( buffer, what ) ); + return 1; +} + + +#endif _eoGnuplot_H diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index e086c78ba..dc38dbf83 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -30,6 +30,7 @@ #include #include +#include #include /** @@ -42,94 +43,33 @@ This class plots through gnuplot the eoStat given as argument //----------------------------------------------------------------------------- #include -// #include "pipecom.h" -// -// this is pipecom.h - -/* ---------------------------------------------------------------------- - * Where........: CMAP - Polytechnique - * File.........: pipecom.h - * Author.......: Bertrand Lamy (EEAAX) - * Created......: Thu Mar 9 17:21:15 1995 - * Description..: Pipe communication with a process - * - * Ident........: $Id: eoGnuplot1DMonitor.h,v 1.2 2000-11-29 17:20:16 evomarc Exp $ - * ---------------------------------------------------------------------- - */ - -#ifndef PIPECOM_H -#define PIPECOM_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - -typedef struct PipeCommunication { - FILE *fWrit; - FILE *fRead; - int pid; -} PCom; - - - -PCom *PipeComOpen( char *prog ); -PCom *PipeComOpenArgv( char *prog, char *argv[] ); - -int PipeComSend( PCom *to, char *line ); -int PipeComSendn( PCom *to, char *data, int n ); - -int PipeComReceive( PCom *from, char *data, int max ); - -int PipeComClose( PCom *to ); - -int PipeComWaitFor( PCom *from, char *what ); - -#ifdef __cplusplus -} /* ferme extern "C" */ -#endif - -#endif /* PIPECOM_H */ +#include /** eoGnuplot1DMonitor plots stats through gnuplot + * assumes that the same file is appened every so and so, + * and replots it everytime */ -class eoGnuplot1DMonitor: public eoFileMonitor +class eoGnuplot1DMonitor: public eoFileMonitor, public eoGnuplot { public: // Ctor - eoGnuplot1DMonitor(std::string _filename) : - eoFileMonitor(_filename, " "), firstTime(true) - { - // opens pipe with Gnuplot - initGnuPlot(_filename); - } + eoGnuplot1DMonitor(std::string _filename, bool _top=false) : + eoFileMonitor(_filename, " "), + eoGnuplot(_filename,(_top?"":"set key bottom")) + {} // Dtor - virtual ~eoGnuplot1DMonitor() { - // close - the gnuplot windows if pipe was correctly opened - if( gpCom ) { - PipeComSend( gpCom, "quit\n" ); // Ferme gnuplot - PipeComClose( gpCom ); - gpCom =NULL; - } - } + virtual ~eoGnuplot1DMonitor(){} virtual eoMonitor& operator() (void) ; + virtual void FirstPlot(); /// Class name. virtual string className() const { return "eoGnuplot1DMonitor"; } private: - void initGnuPlot(std::string _filename); - void FirstPlot(); - // the private data - bool firstTime; // the stats might be unknown in Ctor - PCom *gpCom; // Communication with gnuplot OK }; // the following should be placed in a separate eoGnuplot1DMonitor.cpp @@ -157,27 +97,6 @@ eoMonitor& eoGnuplot1DMonitor::operator() (void) return *this; } -//////////////////////////////////////////////////////////// -void eoGnuplot1DMonitor::initGnuPlot(std::string _filename) - ///////////////////////////////////////////////////////// -{ - char *args[6]; - args[0] = strdup( "gnuplot" ); - args[1] = strdup( "-geometry" ); - args[2] = strdup( "300x200-0+0" ); - args[3] = strdup( "-title" ); - args[4] = strdup( _filename.c_str() ); - args[5] = 0; - gpCom = PipeComOpenArgv( "gnuplot", args ); - if( ! gpCom ) - throw runtime_error("Impossible to spawn gnuplot\n"); - else { - PipeComSend( gpCom, "set grid\n" ); - PipeComSend( gpCom, "set data style lines\n" ); - } -} - - //////////////////////////////////////////////////////////// void eoGnuplot1DMonitor::FirstPlot() //////////////////////////////////////////////////////// @@ -191,7 +110,7 @@ void eoGnuplot1DMonitor::FirstPlot() os << "plot"; for (unsigned i=1; ilongName() << "'" ; + "' using 1:" << i+1 << " title '" << vec[i]->longName() << "' with lines" ; if (i -#include -#include -#include - -// #include "pipecom.h" - - -int Check( PCom *com ) -{ - if( ! com ) { - fprintf( stderr, "PipeCom: Null pointer.\n" ); - fflush( stderr ); - return 0; - } - if( kill( com->pid, 0 ) != 0 ) { - fprintf( stderr, "PipeCom: process doesn't exists.\n" ); - fflush( stderr ); - return 0; - } - return 1; -} - - -PCom * PipeComOpen( char *prog ) -{ - char *args[2]; - args[0] = prog; - args[1] = NULL; - return PipeComOpenArgv( prog, args ); -} - - -PCom * PipeComOpenArgv( char *prog, char *argv[] ) -{ - int toFils[2]; - int toPere[2]; - int sonPid; - PCom * ret = NULL; - - if( pipe( toFils ) < 0 ) { - perror( "PipeComOpen: Creating pipes" ); - return ret; - } - if( pipe( toPere ) < 0 ) { - perror( "PipeComOpen: Creating pipes" ); - return ret; - } - - switch( (sonPid = vfork()) ) { - case -1: - perror("PipeComOpen: fork failed" ); - return ret; - break; - - case 0: - /* --- Here's the son --- */ - /* --- replace old stdin --- */ - if( dup2( toFils[0], fileno(stdin) ) < 0 ) { - perror( "PipeComOpen(son): could not connect" ); - exit( -1 ); - /* --- AVOIR: kill my father --- */ - } - if( dup2( toPere[1], fileno(stdout) ) < 0 ) { - perror( "PipeComOpen(son): could not connect" ); - exit( -1 ); - } - if( execvp( prog, argv ) < 0 ) { - perror( prog ); - perror( "PipeComOpen: can't exec" ); - exit(1); - } - break; - default: - ret = (PCom *) malloc( sizeof(PCom) ); - if( ! ret ) - return NULL; - - ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); - ret->fRead = (FILE *)fdopen( toPere[0], "r" ); - ret->pid = sonPid; - } - return ret; -} - - -int PipeComSend( PCom *to, char *line ) -{ - int nb = 0; - if( ! Check(to ) ) - return nb; - nb = fprintf( to->fWrit, line ); - fflush( to->fWrit ); - return nb; -} - - -int PipeComSendn( PCom *to, char *data, int n ) -{ - int nb = 0; - if( ! Check(to) ) - return nb; - - nb = fwrite( data, 1, n, to->fWrit ); - fflush( to->fWrit ); - return nb; -} - - -int PipeComReceive( PCom *from, char *data, int max ) -{ - if( ! Check(from) ) - return 0; - if( ! data ) { - fprintf( stderr, "PipeComReceive: Invalid data pointer\n" ); - fflush( stderr ); - return 0; - } - if( fgets( data, max, from->fRead ) ) - return strlen(data); - return 0; -} - - - -int PipeComClose( PCom *to ) -{ - if( ! Check(to) ) - return 0; - fclose( to->fRead ); - fclose( to->fWrit ); - free( to ); - return 1; -} - - - -int PipeComWaitFor( PCom *from, char *what ) -{ - char buffer[256]; - do { - if( ! PipeComReceive( from, buffer, 256 ) ) - return 0; - } while( strcmp( buffer, what ) ); - return 1; -} - - #endif _eoGnuplot1DMonitor_H diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h new file mode 100644 index 000000000..d6ad08bd7 --- /dev/null +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -0,0 +1,107 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGnuplot1DSnapshot.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGnuplot1DSnapshot_H +#define _eoGnuplot1DSnapshot_H + +#include + +#include +#include +#include + +/** +@author Marc Schoenauer 2000 +@version 0.0 + +This class plots through gnuplot the eoStat given as argument + +*/ +//----------------------------------------------------------------------------- + +#include +#include + + + +/** eoGnuplot1DMonitor plots stats through gnuplot + * assumes that the same file is appened every so and so, + * and replots it everytime + */ +class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot +{ + public: + // Ctor + eoGnuplot1DSnapshot(std::string _dirname, unsigned _frequency = 1, + std::string _filename = "gen", std::string _delim = " ") : + eoFileSnapshot(_dirname, _frequency, _filename, _delim), + eoGnuplot(_filename,"set data style points") + {} + + // Ctor + eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot) : + eoFileSnapshot(_fSnapshot), + eoGnuplot(_fSnapshot.baseFileName(),"set data style points") + {} + + // Dtor + virtual ~eoGnuplot1DSnapshot(){} + + virtual eoMonitor& operator() (void) ; + + /// Class name. + virtual string className() const { return "eoGnuplot1DSnapshot"; } + +private: +}; + +// the following should be placed in a separate eoGnuplot1DMonitor.cpp + +//////////////////////////////////////////////////////////// +eoMonitor& eoGnuplot1DSnapshot::operator() (void) + ///////////////////////////////////////////////////////// +{ + // update file using the eoFileMonitor + eoFileSnapshot::operator()(); + + // sends plot order to gnuplot + // assumes successive plots will have same nb of columns!!! + + + char buff[1024]; + ostrstream os(buff, 1024); + os << "plot"; + + os << " '" << getFileName().c_str() << + "' notitle with points ps 5" ; + os << "\n"; + os << '\0'; + PipeComSend( gpCom, buff ); + + return (*this); +} + +#endif _eoGnuplot1DSnapshot_H diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index ffddf27c0..a71d154b6 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -46,7 +46,7 @@ class eoMonitor : public eoF public : virtual void lastCall() {} - void add(const eoParam& _param) { vec.push_back(&_param); } + virtual void add(const eoParam& _param) { vec.push_back(&_param); } protected : diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index e83eb8f81..fcfe3be7e 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -227,6 +227,29 @@ void eoValueParam >::setValue(std::string _value) std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } +/// Because MSVC does not support partial specialization, the vector is a eoMinimizingFitness, not a T +template <> +std::string eoValueParam >::getValue(void) const +{ + std::ostrstream os; + os << repValue.size() << ' '; + std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); + os << std::ends; + return os.str(); +} + +/// Because MSVC does not support partial specialization, the vector is a eoMinimizingFitness, not a T +// NOTE: g++ doesn support it either!!! +template <> +void eoValueParam >::setValue(std::string _value) +{ + std::istrstream is(_value.c_str()); + unsigned sz; + is >> sz; + repValue.resize(sz); + std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); +} + /*template class eoContainerParam : public eoParam { diff --git a/eo/src/utils/eoScalarFitnessStat.h b/eo/src/utils/eoScalarFitnessStat.h new file mode 100644 index 000000000..1511e6b90 --- /dev/null +++ b/eo/src/utils/eoScalarFitnessStat.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoScalarFitnessStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoScalarFitnessStat_h +#define _eoScalarFitnessStat_h + +#include + +/** + The fitnesses of a whole population, as a vector +*/ +template +class eoScalarFitnessStat : public eoSortedStat > +{ +public : + eoScalarFitnessStat(std::string _description = "FitnessES") : + eoSortedStat >(vector(0), _description) {} + + virtual void operator()(const vector& _popPters) + { + value().resize(_popPters.size()); + for (unsigned i=0; i<_popPters.size(); i++) + value()[i] = _popPters[i]->fitness(); + } +}; + +#endif diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 5264002e8..fa8500c8a 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -14,7 +14,10 @@ // the general include for eo #include +#include #include +#include +#include // EVAL #include "binary_value.h" @@ -24,7 +27,7 @@ // Include the corresponding file #include // bitstring representation & operators // define your genotype and fitness types -typedef eoBin Indi; +typedef eoBin Indi; // the main_function: nothing changed(!), except variable initialization void main_function(int argc, char **argv) @@ -235,10 +238,10 @@ void main_function(int argc, char **argv) ///////////////////////////////////// eoGenContinue genCont(maxGen); eoSteadyFitContinue steadyCont(minGen, steadyGen); - eoFitContinue fitCont(vecSize); + // eoFitContinue fitCont(vecSize); // remove if minimizing :-) eoCombinedContinue continuator(genCont); continuator.add(steadyCont); - continuator.add(fitCont); + // continuator.add(fitCont); // CHECKPOINT @@ -269,15 +272,20 @@ void main_function(int argc, char **argv) eoAverageStat averageStat; // Second moment stats: average and stdev eoSecondMomentStats SecondStat; + // the Fitness Distance Correlation + // need first an object to compute the distances + eoQuadDistance dist; // Hamming distance + eoFDCStat fdcStat(dist); // Add them to the checkpoint to get them called at the appropriate time checkpoint.add(bestStat); checkpoint.add(averageStat); checkpoint.add(SecondStat); + checkpoint.add(fdcStat); // The Stdout monitor will print parameters to the screen ... eoStdoutMonitor monitor(false); - + // when called by the checkpoint (i.e. at every generation) checkpoint.add(monitor); @@ -286,10 +294,12 @@ void main_function(int argc, char **argv) monitor.add(eval); // because now eval is an eoEvalFuncCounter! monitor.add(bestStat); monitor.add(SecondStat); + monitor.add(fdcStat); // A file monitor: will print parameters to ... a File, yes, you got it! eoFileMonitor fileMonitor("stats.xg", " "); - eoGnuplot1DMonitor gnuMonitor("best_average.xg"); + // and an eoGnuplot1DMonitor will 1-print to a file, and 2- plot on screen + eoGnuplot1DMonitor gnuMonitor("best_average.xg",minimizing_fitness()); // the checkpoint mechanism can handle multiple monitors checkpoint.add(fileMonitor); @@ -304,6 +314,26 @@ void main_function(int argc, char **argv) gnuMonitor.add(bestStat); gnuMonitor.add(averageStat); + // a specific plot monitor for FDC + // first into a file (it adds everything ti itself + eoFDCFileSnapshot fdcFileSnapshot(fdcStat); + // then to a Gnuplot monitor + eoGnuplot1DSnapshot fdcGnuplot(fdcFileSnapshot); + // and of coruse add them to the checkPoint + checkpoint.add(fdcFileSnapshot); + checkpoint.add(fdcGnuplot); + + // want to see how the fitness is spread? + eoScalarFitnessStat fitStat; + checkpoint.add(fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + // where to store the files + eoGnuplot1DSnapshot fitSnapshot("Fitnesses"); + // add any stat that is a vector to it + fitSnapshot.add(fitStat); + // and of course add it to the checkpoint + checkpoint.add(fitSnapshot); + // Last type of item the eoCheckpoint can handle: state savers: eoState outState; // Register the algorithm into the state (so it has something to save!!) From 1ace1cf8f901c64c86e57c5023dd028b2bfdfdb1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 1 Feb 2001 05:17:16 +0000 Subject: [PATCH 0438/2134] I had forgotten to add pipecom.h Moreover, I got fed up with error due to const/non const, so I modified PipeComSend to take a const argument. THe consequence is that it will not run under plain C any more. --- eo/src/utils/eoGnuplot.h | 21 +++++++++++++----- eo/src/utils/pipecom.h | 48 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 eo/src/utils/pipecom.h diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index b5919b547..d588348f6 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -67,6 +67,17 @@ class eoGnuplot /// Class name. virtual string className() const { return "eoGnuplot"; } + /** send a command to gnuplot directly + */ + void gnuplotCommand(std::string _command) + { + if( gpCom ) { + PipeComSend( gpCom, _command.c_str() ); + PipeComSend( gpCom, "\n" ); + } + } + + protected: void initGnuPlot(std::string _title, std::string _extra); // the private data @@ -99,9 +110,7 @@ void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) throw runtime_error("Impossible to spawn gnuplot\n"); else { PipeComSend( gpCom, "set grid\n" ); - char s[1024]; // because .c_str() is a const - strcpy(s, _extra.c_str()); - PipeComSend( gpCom, strdup(_extra.c_str()) ); + PipeComSend( gpCom, _extra.c_str() ); PipeComSend( gpCom, "\n" ); } } @@ -120,7 +129,7 @@ void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.1 2001-01-31 18:38:39 evomarc Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.2 2001-02-01 05:17:16 evomarc Exp $ * ---------------------------------------------------------------------- */ @@ -211,7 +220,7 @@ PCom * PipeComOpenArgv( char *prog, char *argv[] ) } -int PipeComSend( PCom *to, char *line ) +int PipeComSend( PCom *to, const char *line ) { int nb = 0; if( ! Check(to ) ) @@ -222,7 +231,7 @@ int PipeComSend( PCom *to, char *line ) } -int PipeComSendn( PCom *to, char *data, int n ) +int PipeComSendn( PCom *to, const char *data, int n ) { int nb = 0; if( ! Check(to) ) diff --git a/eo/src/utils/pipecom.h b/eo/src/utils/pipecom.h new file mode 100644 index 000000000..d90f151a6 --- /dev/null +++ b/eo/src/utils/pipecom.h @@ -0,0 +1,48 @@ +/* ---------------------------------------------------------------------- + * Where........: CMAP - Polytechnique + * File.........: pipecom.h + * Author.......: Bertrand Lamy (EEAAX) + * Created......: Thu Mar 9 17:21:15 1995 + * Description..: Pipe communication with a process + * + * Ident........: $Id: pipecom.h,v 1.2 2001-02-09 05:09:26 evomarc Exp $ + * ---------------------------------------------------------------------- + */ + +#ifndef PIPECOM_H +#define PIPECOM_H + +// this file cannot be used from C or C++ any more due to some const additions +// however, if you remove the const, it should work in C also +#ifdef __cplusplus +extern "C" { +#endif + +#include + + +typedef struct PipeCommunication { + FILE *fWrit; + FILE *fRead; + int pid; +} PCom; + + + +PCom *PipeComOpen( char *prog ); +PCom *PipeComOpenArgv( char *prog, char *argv[] ); + +int PipeComSend( PCom *to, const char *line ); +int PipeComSendn( PCom *to, const char *data, int n ); + +int PipeComReceive( PCom *from, char *data, int max ); + +int PipeComClose( PCom *to ); + +int PipeComWaitFor( PCom *from, char *what ); + +#ifdef __cplusplus +} /* ferme extern "C" */ +#endif + +#endif /* PIPECOM_H */ From f9fed9acc1f8eec2214cb07e6344e13b10f7eeb3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 1 Feb 2001 05:27:36 +0000 Subject: [PATCH 0439/2134] Forgotten a debug print --- eo/src/utils/eoFileSnapshot.h | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 8ab1bbbc2..2ba1a428c 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -139,7 +139,6 @@ public : { vector > vv(vec.size()); vv[0]=v; - cout << "taille des vecteurs " << v.size() << endl; for (unsigned i=1; i >* >(vec[1]); From 1c93adc43ac421074a9b28e8eb66db38b786afc2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 7 Feb 2001 05:04:24 +0000 Subject: [PATCH 0440/2134] Added selection methods eoBestSelect always return the best individual eoSequentialSelect a selectOne version of eoDetSelect (uses an index to return next offspring from sorted pop) --- eo/src/eoRandomSelect.h | 70 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 9d57e869b..fd609f3ea 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -28,13 +28,17 @@ #define eoRandomSelect_h //----------------------------------------------------------------------------- +/** This file contains straightforward selectors: + * eoRandomSelect returns an individual uniformly selected + * eoBestSelect always return the best individual + * eoSequentialSelect returns all individuals in turn + */ #include #include //----------------------------------------------------------------------------- -/** eoRandomSelect: a selection method that selects ONE individual randomly - -MS- 22/10/99 */ +/** eoRandomSelect: a selection method that selects ONE individual randomly */ //----------------------------------------------------------------------------- template class eoRandomSelect: public eoSelectOne @@ -42,11 +46,69 @@ template class eoRandomSelect: public eoSelectOne public: /// not a big deal!!! - virtual const EOT& operator()(const eoPop& pop) + virtual const EOT& operator()(const eoPop& _pop) { - return pop[rng.random(pop.size())] ; + return _pop[eo::rng.random(pop.size())] ; } }; +//----------------------------------------------------------------------------- +/** eoBestSelect: a selection method that always return the best + * (mainly for testing purposes) */ +//----------------------------------------------------------------------------- + +template class eoBestSelect: public eoSelectOne +{ + public: + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& _pop) + { + return _pop.best_element() ; + } +}; + +//----------------------------------------------------------------------------- +/** eoSequentialSelect: returns all individual in order + * looping back to the beginning when exhasuted + * can be from best to worse, or in random order + * + * It is the eoSelectOne equivalent of eoDetSelect - + * though eoDetSelect always returns individuals from best to worst + */ +//----------------------------------------------------------------------------- + +template class eoSequentialSelect: public eoSelectOne +{ + public: + /** Ctor: sets the current pter to MAXINT so init will take place first time + not very elegant, maybe ... + */ + eoSequentialSelect(bool _ordered = true): + ordered(_ordered), current(MAXINT) {} + + void init(const eoPop& _pop) + { + if (ordered) // probably we could have a marker to avoid re-sorting + _pop.sort(eoPters); + else + _pop.shuffle(eoPters); + current=0; + } + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + init(_pop); + unsigned eoN = current; + current++; + return *eoPters[eoN] ; + } +private: + bool ordered; + unsigned current; + vector eoPters; +}; + #endif eoRandomSelect_h From b89d06386d5305db955b91a63f830e8fd4d48b08 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 7 Feb 2001 05:11:37 +0000 Subject: [PATCH 0441/2134] Added the shuffle(vector) method --- eo/src/eoPop.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 076921d32..3634c21e7 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -133,6 +133,16 @@ class eoPop: public vector, public eoObject, public eoPersistent std::sort(begin(), end(), greater()); } + // creates a vector pointing to the individuals in descending order + void sort(vector& result) const + { + result.resize(size()); + + std::transform(begin(), end(), result.begin(), Ref()); + + std::sort(result.begin(), result.end(), Cmp()); + } + /** shuffle the population. Use this member to put the population in random order @@ -143,14 +153,15 @@ class eoPop: public vector, public eoObject, public eoPersistent std::random_shuffle(begin(), end(), gen); } - // creates a vector pointing to the individuals in descending order - void sort(vector& result) const + // creates a vector pointing to the individuals in random order + void shuffle(vector& result) const { result.resize(size()); std::transform(begin(), end(), result.begin(), Ref()); - std::sort(result.begin(), result.end(), Cmp()); + UF_random_generator gen; + std::random_shuffle(result.begin(), result.end(), gen); } // returns an iterator to the best individual DOES NOT MOVE ANYBODY From d3525298feb143dba22c0cdd0a70f90d46ed2aa2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 7 Feb 2001 05:13:33 +0000 Subject: [PATCH 0442/2134] Added the handling of generic operators in Combined Ops --- eo/src/eoProportionalCombinedOp.h | 118 +++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 26 deletions(-) diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 1cb8daa1d..5d52719b4 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -28,6 +28,9 @@ #include #include #include +#include +#include +#include #include /** \defgroup PropCombined operators @@ -45,37 +48,66 @@ into an algorithm, chosing by a roulette wheel based on user-defined rates */ +////////////////////////////////////////////////////// +//// combined MonOp +////////////////////////////////////////////////////// -/** eoMonOp is the monary operator: genetic operator that takes only one EO */ +/** eoMonOp is the monary operator: genetic operator that takes only one EO + + * now accepts generic operators +*/ template class eoPropCombinedMonOp: public eoMonOp { public: - /// Ctor + /// Ctor from a "true" operator eoPropCombinedMonOp(eoMonOp & _first, const double _rate) { ops.push_back(&_first); rates.push_back(_rate); } -virtual string className() const { return "eoPropCombinedMonOp"; } + /// Ctor from a generic operator + eoPropCombinedMonOp(eoGenericMonOp & _first, const double _rate) + { + eoGeneric2TrueMonOp *trueFirst = + new eoGeneric2TrueMonOp(_first); + ops.push_back(trueFirst); + rates.push_back(_rate); + } -virtual void add(eoMonOp & _op, const double _rate, bool _verbose=false) + virtual string className() const { return "eoPropCombinedMonOp"; } + + virtual void add(eoMonOp & _op, const double _rate, bool _verbose=false) { ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - { - double total = 0; - unsigned i; - for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; - } + printOn(cout); + } + + virtual void add(eoGenericMonOp & _op, const double _rate, bool _verbose=false) + { + eoGeneric2TrueMonOp *trueOp = new eoGeneric2TrueMonOp(_op); + ops.push_back(trueOp); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + printOn(cout); + } + + // outputs the operators and percentages + virtual void printOn(ostream & _os) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; } virtual void operator()(EOT & _indi) @@ -88,7 +120,9 @@ std::vector*> ops; std::vector rates; }; - +////////////////////////////////////////////////////// +//// combined BinOp +////////////////////////////////////////////////////// /** COmbined Binary genetic operator: * operator() has two operands, only the first one can be modified @@ -134,40 +168,72 @@ std::vector rates; }; +////////////////////////////////////////////////////// +//// combined QuadOp +////////////////////////////////////////////////////// + /** Quadratic genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. */ -/** COmbined Binary genetic operator: - * operator() has two operands, only the first one can be modified +/** COmbined quadratic genetic operator: + * operator() has two operands, both can be modified + + * generic operators are now allowed: there are imbedded into + * the corresponding "true" operator */ template class eoPropCombinedQuadOp: public eoQuadraticOp { public: - /// Ctor + /// Ctor from a true operator eoPropCombinedQuadOp(eoQuadraticOp & _first, const double _rate) { ops.push_back(&_first); rates.push_back(_rate); } + /// Ctor from a generic operator + eoPropCombinedQuadOp(eoGenericQuadOp & _first, const double _rate) + { + eoGeneric2TrueQuadOp *trueFirst = + new eoGeneric2TrueQuadOp(_first); + ops.push_back(trueFirst); + rates.push_back(_rate); + } + virtual string className() const { return "eoPropCombinedQuadOp"; } + // addition of a true operator virtual void add(eoQuadraticOp & _op, const double _rate, bool _verbose=false) { ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - { - double total = 0; - unsigned i; - for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; - } + printOn(cout); + } + + // addition of a generic operator +virtual void add(eoGenericQuadOp & _op, const double _rate, bool _verbose=false) + { + eoGeneric2TrueQuadOp *trueOp = new eoGeneric2TrueQuadOp(_op); + ops.push_back(trueOp); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + printOn(cout); + } + + // outputs the operators and percentages + virtual void printOn(ostream & _os) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; } virtual void operator()(EOT & _indi1, EOT & _indi2) From 1b681e4e0dc467260f4f8f56c537e6756210aca5 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 7 Feb 2001 05:15:18 +0000 Subject: [PATCH 0443/2134] Added the missing include of eoScalarFitness - mandatory due to explicit specialization for eoParamValue > --- eo/src/utils/eoParam.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index fcfe3be7e..954a86115 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -31,7 +31,7 @@ #include #include #include - +#include // for specializations /** eoParam: Base class for monitoring and parsing parameters */ @@ -170,7 +170,6 @@ private : ValueType repValue; }; -/// Specialized setValue for bool template <> void eoValueParam::setValue(std::string _value) { From 415b4196711991ddd3e73e331c8f5d0eda73191c Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:09:26 +0000 Subject: [PATCH 0444/2134] The BIG change of general operator interface I also changed - the eoQuadratic into eoQuad (as dicussed with Maarten) - the eoBin into eoBit, with more appropriate names for the "binary" operators (that can be unary!) as no one protested when I posted on eodev list --- eo/src/Makefile.am | 2 +- eo/src/eoEvolutionStrategy.h | 101 --- eo/src/eoGenOp.h | 160 +++++ eo/src/eoGeneralBreeder.h | 88 +++ eo/src/eoOp.h | 61 +- eo/src/eoOpContainer.h | 201 ++++++ eo/src/eoPopulator.h | 169 +++++ eo/src/eoProportionalCombinedOp.h | 12 +- eo/src/eoSGA.h | 6 +- eo/src/eoSGATransform.h | 10 +- eo/src/es/eoEsStdevXOver.h | 2 +- eo/src/es/eoGenericRealOp.h | 19 +- eo/src/es/eoRealOp.h | 6 +- eo/src/ga.h | 4 +- eo/src/ga/Makefile.am | 2 +- eo/src/ga/{eoBin.h => eoBit.h} | 22 +- eo/src/ga/eoBitOp.h | 110 ++-- eo/src/ga/eoBitOpFactory.h | 84 ++- eo/src/gp/eoParseTree.h | 42 +- eo/src/{ => obsolete}/eoBackInserter.h | 0 .../{ => obsolete}/eoDetTournamentInserter.h | 0 eo/src/{ => obsolete}/eoGOpBreeder.h | 0 eo/src/{ => obsolete}/eoGOpSelector.h | 0 eo/src/{ => obsolete}/eoIndiSelector.h | 0 eo/src/{ => obsolete}/eoInplaceTransform.h | 0 eo/src/{ => obsolete}/eoInserter.h | 0 eo/src/{ => obsolete}/eoOpFactory.h | 0 eo/src/{ => obsolete}/eoOpSelector.h | 0 eo/src/{ => obsolete}/eoProportionalGOpSel.h | 0 eo/src/{ => obsolete}/eoProportionalOpSel.h | 0 eo/src/{ => obsolete}/eoSequentialGOpSel.h | 0 eo/src/{ => obsolete}/eoSteadyStateEA.h | 0 eo/src/{ => obsolete}/eoSteadyStateInserter.h | 0 .../{ => obsolete}/eoSteadyStateTransform.h | 0 .../eoStochTournamentInserter.h | 0 eo/src/{ => obsolete}/eoWrappedOps.h | 0 eo/src/other/eoExternalOpFunctions.h | 4 +- eo/src/utils/eoParser.cpp | 1 - eo/test/t-eoGenOp.cpp | 359 ++++++++++ eo/tutorial/Lesson1/FirstBitGA.cpp | 11 +- eo/tutorial/Lesson1/FirstRealGA.cpp | 3 +- eo/tutorial/Lesson1/exercise1.3.cpp | 6 +- eo/tutorial/Lesson2/FirstBitEA.cpp | 13 +- eo/tutorial/Lesson2/FirstRealEA.cpp | 3 +- eo/tutorial/Lesson2/exercise2.3.cpp | 10 +- eo/tutorial/Lesson2/real_value.h | 6 +- eo/tutorial/Lesson3/SecondBitEA.cpp | 13 +- eo/tutorial/Lesson3/exercise3.1.cpp | 13 +- eo/tutorial/html/FirstBitEA.html | 616 +++++++++--------- eo/tutorial/html/FirstBitGA.html | 20 +- eo/tutorial/html/FirstRealEA.html | 42 +- eo/tutorial/html/FirstRealGA.html | 497 +++++++------- eo/tutorial/html/Firstmerge.html | 25 +- eo/tutorial/html/SecondBitEA.html | 14 +- eo/tutorial/html/eoCheckPoint.html | 124 ++++ eo/tutorial/html/eoEngine.html | 15 +- eo/tutorial/html/eoLesson1.html | 36 +- eo/tutorial/html/eoLesson2.html | 26 +- eo/tutorial/html/eoProgramming.html | 88 ++- eo/tutorial/html/eoTutorial.html | 4 +- 60 files changed, 2072 insertions(+), 978 deletions(-) delete mode 100644 eo/src/eoEvolutionStrategy.h create mode 100644 eo/src/eoGenOp.h create mode 100644 eo/src/eoGeneralBreeder.h create mode 100644 eo/src/eoOpContainer.h create mode 100644 eo/src/eoPopulator.h rename eo/src/ga/{eoBin.h => eoBit.h} (84%) rename eo/src/{ => obsolete}/eoBackInserter.h (100%) rename eo/src/{ => obsolete}/eoDetTournamentInserter.h (100%) rename eo/src/{ => obsolete}/eoGOpBreeder.h (100%) rename eo/src/{ => obsolete}/eoGOpSelector.h (100%) rename eo/src/{ => obsolete}/eoIndiSelector.h (100%) rename eo/src/{ => obsolete}/eoInplaceTransform.h (100%) rename eo/src/{ => obsolete}/eoInserter.h (100%) rename eo/src/{ => obsolete}/eoOpFactory.h (100%) rename eo/src/{ => obsolete}/eoOpSelector.h (100%) rename eo/src/{ => obsolete}/eoProportionalGOpSel.h (100%) rename eo/src/{ => obsolete}/eoProportionalOpSel.h (100%) rename eo/src/{ => obsolete}/eoSequentialGOpSel.h (100%) rename eo/src/{ => obsolete}/eoSteadyStateEA.h (100%) rename eo/src/{ => obsolete}/eoSteadyStateInserter.h (100%) rename eo/src/{ => obsolete}/eoSteadyStateTransform.h (100%) rename eo/src/{ => obsolete}/eoStochTournamentInserter.h (100%) rename eo/src/{ => obsolete}/eoWrappedOps.h (100%) create mode 100644 eo/test/t-eoGenOp.cpp create mode 100644 eo/tutorial/html/eoCheckPoint.html diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 1aff3ab60..0fc3b2887 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,4 +11,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBackInserter.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentInserter.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGOpBreeder.h eoGOpSelector.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoIndiSelector.h eoInit.h eoInplaceTransform.h eoInserter.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpFactory.h eoOpSelMason.h eoOpSelector.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalGOpSel.h eoProportionalOpSel.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSequentialGOpSel.h eoSteadyFitContinue.h eoSteadyStateEA.h eoSteadyStateInserter.h eoSteadyStateTransform.h eoStochTournamentInserter.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoWrappedOps.h es.h ga.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h es.h ga.h diff --git a/eo/src/eoEvolutionStrategy.h b/eo/src/eoEvolutionStrategy.h deleted file mode 100644 index b863ae8a4..000000000 --- a/eo/src/eoEvolutionStrategy.h +++ /dev/null @@ -1,101 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEvolutionStrategy.h -// (c) Maarten Keijzer 2000, GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoEvolutionStrategy_h -#define _eoEvolutionStrategy_h - -//----------------------------------------------------------------------------- - -#include -#include -/** eoEvolutionStrategy: -*/ - -template -class eoEvolutionStrategy: public eoAlgo -{ - public: - struct plus_strategy{}; - struct comma_strategy{}; - - eoEvolutionStrategy( - eoContinue& _continuator, - eoEvalFunc& _eval, - eoGOpSelector& _opSel, - float _lambdaRate, - comma_strategy) - : selectPerc(randomSelect, _lambdaRate), - transform(_opSel), - easyEA(_continuator, _eval, selectPerc, transform, noElitism, truncate) - {} - - eoEvolutionStrategy( - eoContinue& _continuator, - eoEvalFunc& _eval, - eoGOpSelector& _opSel, - float _lambdaRate, - plus_strategy) - : selectPerc(randomSelect, _lambdaRate), - transform(_opSel), - easyEA(_continuator, _eval, selectPerc, transform, plus, truncate) - {} - - - /// Apply a few generation of evolution to the population. - virtual void operator()(eoPop& _pop) - { - easyEA(_pop); - } - - private: - - eoPlus plus; - eoNoElitism noElitism; - eoTruncate truncate; - eoRandomSelect randomSelect; - eoSelectPerc selectPerc; - eoInplaceTransform2 transform; - - /// easyEA is contained rather than a base because of member initialization order! - eoEasyEA easyEA; -}; - -template -eoEvolutionStrategy make_es(eoContinue& _continuator, - eoEvalFunc& _eval, - eoGOpSelector& _opSel, - float _lambdaRate, - bool _comma) - -{ - if (_comma) - return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::comma_strategy()); - //else - return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::plus_strategy()); -} - -//----------------------------------------------------------------------------- - -#endif eoSelectTransformReduce_h - diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h new file mode 100644 index 000000000..badbde71c --- /dev/null +++ b/eo/src/eoGenOp.h @@ -0,0 +1,160 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenOp.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenOp_H +#define _eoGenOp_H + +#include +#include + + +/** @name General variation operators + +a class that allows to use i->j operators for any i and j +thanks to the friend class eoPopulator + +@author Maarten Keijzer +@version 0.0 +*/ + + +/** The base class for General Operators + */ +template +class eoGenOp : public eoOp, public eoUF &, void> +{ + public : + /// Ctor that honors its superclass + eoGenOp(): eoOp( eoOp::general ) {} + + virtual unsigned max_production(void) = 0; + virtual string className() = 0; + void operator()(eoPopulator& _pop) + { + _pop.reserve(max_production()); + apply(_pop); + } + + protected : + /** the function that will do the work + */ + virtual void apply(eoPopulator& _pop) = 0; +}; + + +/** Wrapper for eoMonOp */ +template +class eoMonGenOp : public eoGenOp +{ + public: + eoMonGenOp(eoMonOp& _op) : op(_op) {} + + unsigned max_production(void) { return 1; } + + void apply(eoPopulator& _it) + { + op(*_it); // look how simple + + } + string className() {return op.className();} + private : + eoMonOp& op; +}; + +/** Wrapper for binop: here we use erase method of eoPopulator + * but we could also have an embedded selector to select the second parent + */ +template +class eoBinGenOp : public eoGenOp +{ + public: + eoBinGenOp(eoBinOp& _op) : op(_op) {} + + unsigned max_production(void) { return 1; } + + /** do the work: get 2 individuals from the population, modifies + only one (it's a eoBinOp) and erases the non-midified one + */ + void apply(eoPopulator& _pop) + { + EOT& a = *_pop; + EOT& b = *++_pop; + op(a, b); + _pop.erase(); + } + string className() {return op.className();} + + private : + eoBinOp& op; +}; + +/** wrapper for eoBinOp with a selector */ +template +class eoSelBinGenOp : public eoGenOp +{ + public: + eoSelBinGenOp(eoBinOp& _op, eoSelectOne& _sel) : + op(_op), sel(_sel) {} + + unsigned max_production(void) { return 1; } + + void apply(eoPopulator& _pop) + { // _pop.source() gets the original population, an eoVecOp can make use of this as well + op(*_pop, sel(_pop.source())); + } + string className() {return op.className();} + + private : + eoBinOp& op; + eoSelectOne& sel; +}; + + +/** Wrapper for quadop: easy as pie + */ +template +class eoQuadGenOp : public eoGenOp +{ + public: + eoQuadGenOp(eoQuadOp& _op) : op(_op) {} + + unsigned max_production(void) { return 2; } + + void apply(eoPopulator& _pop) + { + EOT& a = *_pop; + EOT& b = *++_pop; + + op(a, b); + } + string className() {return op.className();} + + private : + eoQuadOp& op; +}; + + +#endif + diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h new file mode 100644 index 000000000..0c0e4c8fc --- /dev/null +++ b/eo/src/eoGeneralBreeder.h @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGeneralBreeder.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoGeneralBreeder_h +#define eoGeneralBreeder_h + +//----------------------------------------------------------------------------- + +/***************************************************************************** + * eoGeneralBreeder: transforms a population using the generalOp construct. + *****************************************************************************/ + +#include +#include + +/** + Base class for breeders using generalized operators. +*/ +template +class eoGeneralBreeder: public eoBreed +{ + public: + /** Ctor: + * + * @param _select a selectoOne, to be used for all selections + * @param _op a general operator (will generally be an eoOpContainer) + * @param _rate pour howMany, le nbre d'enfants a generer + * @param _interpret_as_rate explanation + */ + eoGeneralBreeder( eoSelectOne& _select, eoGenOp& _op, + double _rate=1.0, bool _interpret_as_rate = true) : + select( _select ), op(_op), howMany(_rate, _interpret_as_rate) {} + + /** The breeder: simply calls the genOp on a selective populator! + * + * @param _parents the initial population + * @param _offspring the resulting population (content -if any- is lost) + */ + void operator()(const eoPop& _parents, eoPop& _offspring) + { + unsigned target = howMany(_parents.size()); + + eoSelectivePopulator it(_parents, select); + + select.setup(_parents); + + while (it.size() < target) + { + op(it); + } + + swap(_offspring, it); + _offspring.resize(target); // you might have generated a few more + } + + /// The class name. + string className() const { return "eoGeneralBreeder"; } + + private: + eoSelectOne& select; + eoGenOp& op; + eoHowMany howMany; +}; + +#endif eoBreeder_h + diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index e1902a5d5..dfbaecab8 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -35,11 +35,22 @@ Genetic Operators are used for various purposes /** @name Genetic operators -What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with eoOp as father and eoMonOp (monary or unary operator) and eoBinOp and eoQuadraticOp (binary operators) as siblings). Nobody should subclass eoOp, you should subclass eoGeneralOp, eoBinOp, eoQuadraticOp or eoMonOp, those are the ones actually used here. \\#eoOp#s are only printable objects, so if you want to build them from a file, it has to be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own factory, which know how to build them from a description in a file. +What is a genetic algorithm without genetic operators? +There is a genetic operator hierarchy, with eoOp as father and +eoMonOp (monary or unary operator), eoBinOp and eoQuadOp (binary operators) +and eoGenOp (any number of inputs and outputs, see eoGenOp.h) +as subclasses. +Nobody should subclass eoOp, you should subclass eoGenOp, eoBinOp, eoQuadOp +or eoMonOp, those are the ones actually used here. -@author GeNeura Team -@version 0.1 -@see eoOpFactory +#eoOp#s are only printable objects, so if you want to build them +from a file, it has to be done in another class, namely factories. +Each hierarchy of #eoOp#s should have its own factory, which know +how to build them from a description in a file. + +@author GeNeura Team, Marten Keijzer and Marc Schoenauer +@version 0.9 +@see eoGenOp.h eoOpFactory */ @@ -102,17 +113,14 @@ public: virtual string className() const {return "eoBinOp";}; }; -// planning the change of name eoQuadraticOp --> eoQuadOp -#define eoQuadraticOp eoQuadOp - -/** Quadratic genetic operator: subclasses eoOp, and defines basically the +/** Quad genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. */ template -class eoQuadraticOp: public eoOp, public eoBF { +class eoQuadOp: public eoOp, public eoBF { public: /// Ctor - eoQuadraticOp() + eoQuadOp() :eoOp( eoOp::quadratic ) {}; virtual string className() const {return "eoQuadOp";}; }; @@ -145,38 +153,5 @@ private: eoQuadOp & quadOp; }; -// some forward declarations - -template - -class eoIndiSelector; - - -template - -class eoInserter; - - -/** - * eGeneralOp: General genetic operator; for objects used to transform sets - * of EOs. Nary ("orgy") operators should be derived from this class - - Derived from eoB(inary)F(unction) - Applies the genetic operator - to a individuals dispensed by an eoIndividualSelector, - and puts the results in the eoIndividualInserter. - Any number of inputs can be requested and any number of outputs - can be produced. - */ - -template - -class eoGeneralOp: public eoOp, public eoBF&, eoInserter&, void> -{ -public: - /// Ctor that honors its superclass - eoGeneralOp(): eoOp( eoOp::general ) {} -}; - #endif diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h new file mode 100644 index 000000000..fd64289b9 --- /dev/null +++ b/eo/src/eoOpContainer.h @@ -0,0 +1,201 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpContainer.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOpContainer_H +#define _eoOpContainer_H + +#include + +/** eoOpContainer is a base class for the sequential and proportional selectors + * It takes care of wrapping the other operators, + * and deleting stuff that it has allocated + * + * Warning: all operators are added together with a rate (double) + * However, the meaning of this rate will be different in + * the differnet instances of eoOpContainer: + * an ***absolute*** probability in the sequential version, and + * a ***relative*** weight in the proportional version + */ +template +class eoOpContainer : public eoGenOp +{ + public : + /** Ctor: nothing much to do */ + eoOpContainer() : max_to_produce(0) {} + + /** Dtor: delete all the GenOps created when wrapping simple ops + */ + virtual ~eoOpContainer(void) + { + for (unsigned i = 0; i < owned_genops.size(); ++i) + delete owned_genops[i]; + } + + /** for memory management (doesn't have to be very precise */ + virtual unsigned max_production(void) + { + return max_to_produce; + } + + /** wraps then add a simple eoMonOp */ + void add(eoMonOp& _op, double _rate) + { + owned_genops.push_back(new eoMonGenOp(_op)); + ops.push_back(owned_genops.back()); + rates.push_back(_rate); + + max_to_produce = max(max_to_produce,unsigned(1)); + } + + /** wraps then add a simple eoBinOp + * First case, no selector + */ + void add(eoBinOp& _op, double _rate) + { + owned_genops.push_back(new eoBinGenOp(_op)); + ops.push_back(owned_genops.back()); + rates.push_back(_rate); + + max_to_produce = max(max_to_produce,unsigned(1)); + } + + /** wraps then add a simple eoBinOp + * Second case: a sepecific selector + */ + void add(eoBinOp& _op, eoSelectOne & _sel, double _rate) + { + owned_genops.push_back(new eoSelBinGenOp(_op, _sel)); + ops.push_back(owned_genops.back()); + rates.push_back(_rate); + + max_to_produce = max(max_to_produce,unsigned(1)); + } + + /** wraps then add a simple eoQuadOp */ + void add(eoQuadOp& _op, double _rate) + { + owned_genops.push_back(new eoQuadGenOp(_op)); + ops.push_back(owned_genops.back()); + rates.push_back(_rate); + + max_to_produce = max(max_to_produce,unsigned(2)); +} + + /** can add any GenOp */ + void add(eoGenOp& _op, double _rate) + { + ops.push_back(&_op); + rates.push_back(_rate); + + max_to_produce = max(max_to_produce,_op.max_production()); + } + + virtual string className() = 0; + + protected : + + vector rates; + vector*> ops; + + private : + vector*> owned_genops; + unsigned max_to_produce; +}; + +/** Sequential selection: + * note the mark, rewind, unmark cycle + * here operators are repeatedly applied on the same individual(s) + * not all too elegant, but it sort of works... + */ +template +class eoSequentialOp : public eoOpContainer +{ + public : + typedef unsigned position_type; + + + void apply(eoPopulator& _pop) + { + position_type pos = _pop.tellp(); + + for (size_t i = 0; i < rates.size(); ++i) + { + _pop.seekp(pos); + + do + { + if (eo::rng.flip(rates[i])) + { + // try + // { + // apply it to all the guys in the todo list + (*ops[i])(_pop); + // } + // check for out of individuals and do nothing with that... + // catch(eoPopulator::OutOfIndividuals&) + // { + // cout << "Warning: not enough individuals to handle\n"; + // return ; + // } + } + + if (!_pop.exhausted()) + ++_pop; + } + while (!_pop.exhausted()); + } + } + virtual string className() {return "SequentialOp";} + + private : + + vector to_apply; + vector production; +}; + + +/** The proportinoal verions: easy! */ +template +class eoProportionalOp : public eoOpContainer +{ + public : + + void apply(eoPopulator& _pop) + { + unsigned i = eo::rng.roulette_wheel(rates); + + try + { + (*ops[i])(_pop); + } + catch(eoPopulator::OutOfIndividuals&) + {} + } + virtual string className() {return "ProportionalOp";} +}; + + +#endif + diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h new file mode 100644 index 000000000..eb4814608 --- /dev/null +++ b/eo/src/eoPopulator.h @@ -0,0 +1,169 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPopulator.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPopulator_H +#define _eoPopulator_H + +#include +#include + +template +class eoPopulator : public eoPop +{ +public : + + eoPopulator(const eoPop& _src) : current(begin()), src(_src) {} + + struct OutOfIndividuals {}; + + /** a populator behaves like an iterator. Hence the operator* + * it returns the current individual -- eventually getting + * a new one through the operator++ if at the end + */ + EOT& operator*(void) + { + if (current == end()) + operator++(); + + return *current; + } + + /** only prefix increment defined + * if needed, adds a new individual using the embedded selector + * and set the current pointer to the newly inserted individual + * otherwise simply increment the current pointer + */ + eoPopulator& operator++() + { + if (current == end()) + { // get new individual from derived class select() + push_back(select()); + current = end(); + --current; + return *this; + } + // else + ++current; + return *this; + } + + /** mandatory for operators that generate more offspring than parents + * if such a thing exists ? + */ + void insert(const EOT& _eo) + { /* not really efficient, but its nice to have */ + current = eoPop::insert(current, _eo); + } + + /** useful for operators that generate less offspring than parents + * though there is another way - using a selector *within* + * the operator to get the extra parents from outside + */ + void erase() + { + current = eoPop::erase(current); + } + + /** just to make memory mangement more efficient + */ + void reserve(int how_many) + { + size_t sz = current - begin(); + eoPop::reserve(size() + how_many); + current = begin() + sz; + } + + /** can be useful for operators with embedded selectors + * e.g. your barin and my beauty -type + */ + const eoPop& source(void) { return src; } + + typedef unsigned position_type; + + /** this is a direct access container: tell position */ + position_type tellp() { return current - begin(); } + /** this is a direct access container: go to position */ + void seekp(position_type pos) { current = begin() + pos; } + /** no more individuals */ + bool exhausted(void) { return current == end(); } + +protected : + /** the pure virtual selection method - will be instanciated in + * eoSeqPopulator and eoPropPopulator + */ + virtual const EOT& select() = 0; + eoPop::iterator current; + const eoPop& src; +}; + + +/** SeqPopulator: an eoPopulator that sequentially goes through the population +is supposed to be used after a batch select of a whole bunch or genitors + */ +template +class eoSeqPopulator : public eoPopulator +{ +public : + + eoSeqPopulator(const eoPop& _pop) : + eoPopulator(_pop), src_it(_pop.begin()) {} + + const EOT& select(void) + { + if (src_it == src.end()) + { + throw OutOfIndividuals(); + } + + const EOT& res = *src_it++; + return res; + } + +private : + vector::const_iterator src_it; +}; + + +/** SelectivePopulator an eoPoplator that uses an eoSelectOne to select guys. +Supposedly, it is passed the initial population. + */ +template +class eoSelectivePopulator : public eoPopulator +{ +public : + eoSelectivePopulator(const eoPop& _pop, eoSelectOne& _sel) + : eoPopulator(_pop), sel(_sel) {} + + const EOT& select() + { + return sel(src); + } + +private : + eoSelectOne& sel; +}; + +#endif + diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 5d52719b4..20b3eb7a9 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -172,21 +172,21 @@ std::vector rates; //// combined QuadOp ////////////////////////////////////////////////////// -/** Quadratic genetic operator: subclasses eoOp, and defines basically the +/** Quad genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. */ -/** COmbined quadratic genetic operator: +/** Combined quad genetic operator: * operator() has two operands, both can be modified * generic operators are now allowed: there are imbedded into * the corresponding "true" operator */ template -class eoPropCombinedQuadOp: public eoQuadraticOp +class eoPropCombinedQuadOp: public eoQuadOp { public: /// Ctor from a true operator - eoPropCombinedQuadOp(eoQuadraticOp & _first, const double _rate) + eoPropCombinedQuadOp(eoQuadOp & _first, const double _rate) { ops.push_back(&_first); rates.push_back(_rate); @@ -204,7 +204,7 @@ public: virtual string className() const { return "eoPropCombinedQuadOp"; } // addition of a true operator -virtual void add(eoQuadraticOp & _op, const double _rate, bool _verbose=false) +virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) { ops.push_back(&_op); rates.push_back(_rate); @@ -242,7 +242,7 @@ virtual void add(eoGenericQuadOp & _op, const double _rate, bool _verbose=f (*ops[what])(_indi1, _indi2); // apply it } private: -std::vector*> ops; +std::vector*> ops; std::vector rates; }; diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index cb55fe4f8..53054658e 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -37,7 +37,7 @@ #include /** The Simple Genetic Algorithm, following Holland and Goldberg - * Needs a selector (class eoSelectOne) a crossover (eoQuadratic, + * Needs a selector (class eoSelectOne) a crossover (eoQuad, * i.e. a 2->2 operator) and a mutation with their respective rates, * of course an evaluation function (eoEvalFunc) and a continuator * (eoContinue) which gives the stopping criterion. Performs full @@ -53,7 +53,7 @@ public : // in the one above. Any objection :-) MS eoSGA( eoSelectOne& _select, - eoQuadraticOp& _cross, float _crate, + eoQuadOp& _cross, float _crate, eoMonOp& _mutate, float _mrate, eoEvalFunc& _eval, eoContinue& _cont) @@ -103,7 +103,7 @@ private : eoContinue& cont; eoMonOp& mutate; float mutationRate; - eoQuadraticOp& cross; + eoQuadOp& cross; float crossoverRate; eoSelectPerc select; eoEvalFunc& eval; diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index a3237b9b7..98af3dd50 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -48,7 +48,7 @@ template class eoSGATransform : public eoTransform public: /// Default constructor. - eoSGATransform(eoQuadraticOp& _cross, double _cProba, + eoSGATransform(eoQuadOp& _cross, double _cProba, eoMonOp& _mutate, double _mProba) : cross(_cross), crossoverProba(_cProba), @@ -84,7 +84,7 @@ template class eoSGATransform : public eoTransform }; private: - eoQuadraticOp& cross; + eoQuadOp& cross; double crossoverProba; eoMonOp& mutate; double mutationProba; @@ -102,7 +102,7 @@ template class eoDynSGATransform : public eoTransform public: /// Default constructor - receives values - eoDynSGATransform(eoQuadraticOp& _cross, double _cProba, + eoDynSGATransform(eoQuadOp& _cross, double _cProba, eoMonOp& _mutate, double _mProba) : cross(_cross), crossoverProbaHolder(_cProba), crossoverProba(crossoverProbaHolder), @@ -112,7 +112,7 @@ template class eoDynSGATransform : public eoTransform /// This constructor receives pointers // these will usually be some eoValueParam.value() // hence the ...Holder data will bever be used in this case - eoDynSGATransform(eoQuadraticOp& _cross, double* _cProbaRef, + eoDynSGATransform(eoQuadOp& _cross, double* _cProbaRef, eoMonOp& _mutate, double* _mProbaRef) : cross(_cross), crossoverProbaHolder(0), crossoverProba(*_cProbaRef), @@ -154,7 +154,7 @@ private: // difference with eoSGATransform: the operator probabilities // they can be passed by reference or by value. // hence we need here to use a reference, and to eventually store a value - eoQuadraticOp& cross; + eoQuadOp& cross; double crossoverProbaHolder; // the value, used only if ctor gets a value double& crossoverProba; // the reference, to be used in operator() eoMonOp& mutate; diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h index fd3b37fcd..035cdf782 100644 --- a/eo/src/es/eoEsStdevXOver.h +++ b/eo/src/es/eoEsStdevXOver.h @@ -41,7 +41,7 @@ Simply calls a crossover for the object variables, */ template -class eoEsStdevXOver : public eoQuadraticOp +class eoEsStdevXOver : public eoQuadOp { public : eoEsStdevXOver(eoGenericQuadOp > & _objectXOver, diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h index 37596f520..c29fd1629 100644 --- a/eo/src/es/eoGenericRealOp.h +++ b/eo/src/es/eoGenericRealOp.h @@ -47,7 +47,10 @@ MS January 25. 2001 /** eoUniformMutation --> changes all values of the vector by uniform choice with range epsilon with probability p_change per variable +\class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric */ + template class eoGenericUniformMutation: public eoGenericMonOp { public: @@ -110,6 +113,8 @@ private: /** eoDetUniformMutation --> changes exactly k values of the vector by uniform choice with range epsilon +\class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric */ template class eoGenericDetUniformMutation: @@ -168,10 +173,14 @@ private: }; +// two arithmetical crossovers /** eoSegmentCrossover --> uniform choice in segment - == arithmetical with same value along all coordinates + == arithmetical with same value along all coordinates +\class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric */ + template class eoGenericSegmentCrossover: public eoGenericQuadOp { public: @@ -257,8 +266,11 @@ protected: }; /** eoArithmeticCrossover --> uniform choice in hypercube - == arithmetical with different values for each coordinate + == arithmetical with different values for each coordinate +\class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric */ + template class eoGenericArithmeticCrossover: public eoGenericQuadOp { @@ -354,7 +366,10 @@ protected: /** eoRealUxOver --> Uniform crossover, also termed intermediate crossover +\class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h +\ingroup parameteric */ + template class eoGenericRealUxOver: public eoGenericQuadOp { public: diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 586453a52..052386715 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -168,7 +168,7 @@ private: \ingroup parameteric */ -template class eoSegmentCrossover: public eoQuadraticOp +template class eoSegmentCrossover: public eoQuadOp { public: /** @@ -259,7 +259,7 @@ protected: \ingroup parameteric */ -template class eoArithmeticCrossover: public eoQuadraticOp +template class eoArithmeticCrossover: public eoQuadOp { public: /** @@ -358,7 +358,7 @@ protected: \ingroup parameteric */ -template class eoRealUxOver: public eoQuadraticOp +template class eoRealUxOver: public eoQuadOp { public: /** diff --git a/eo/src/ga.h b/eo/src/ga.h index 4e2720795..cbb71d724 100644 --- a/eo/src/ga.h +++ b/eo/src/ga.h @@ -30,12 +30,12 @@ #define _ga_h // all bitstring-specific files -#include +#include // the operators #include -// #include +// #include to be corrected - thanks someone! //----------------------------------------------------------------------------- diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 558e06443..12060fa5e 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -5,4 +5,4 @@ ############################################################################### libeoincdir = $(includedir)/eo/ga -libeoinc_HEADERS = eoBin.h eoBitOp.h eoBitOpFactory.h +libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h diff --git a/eo/src/ga/eoBin.h b/eo/src/ga/eoBit.h similarity index 84% rename from eo/src/ga/eoBin.h rename to eo/src/ga/eoBit.h index 40cd2e0c1..61be6e2f1 100644 --- a/eo/src/ga/eoBin.h +++ b/eo/src/ga/eoBit.h @@ -1,5 +1,5 @@ /* - eoBin.h + eoBit.h (c) GeNeura Team 1998, Marc Schoenauer 2000 This library is free software; you can redistribute it and/or @@ -24,10 +24,14 @@ Added the calls to base class I/O routines that print the fitness Left printing/reading of the size of the bitstring, for backward compatibility, and as it is a general practice in EO + + MS, Feb. 7, 2001 + replaced all ...Bin... names with ...Bit... names - for bitstring + as it was ambiguous with bin...ary things */ -#ifndef eoBin_h -#define eoBin_h +#ifndef eoBit_h +#define eoBit_h //----------------------------------------------------------------------------- @@ -43,12 +47,12 @@ Various functions for a bitstring representation */ -/** eoBin: implementation of binary chromosome. -\class eoBin eoBin.h ga/eoBin.h +/** eoBit: implementation of bitstring chromosome. +\class eoBit eoBit.h ga/eoBit.h \ingroup bitstring * based on STL's vector specialization. */ -template class eoBin: public eoFixedLength +template class eoBit: public eoFixedLength { public: @@ -56,13 +60,13 @@ template class eoBin: public eoFixedLength * (Default) Constructor. * @param size Size of the binary string. */ - eoBin(unsigned size = 0, bool value = false): + eoBit(unsigned size = 0, bool value = false): eoFixedLength(size, value) {} /// My class name. string className() const { - return "eoBin"; + return "eoBit"; } /** @@ -99,4 +103,4 @@ template class eoBin: public eoFixedLength //----------------------------------------------------------------------------- -#endif //eoBin_h +#endif //eoBit_h diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index e0df842db..c798d9914 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -40,7 +40,7 @@ // chrom[i] = (chrom[i]) ? false : true; // we were calling something like // specific_mutate(chrom[i]) -// all mutation would also be generic ... except those eoBinNext and eoBinPrev +// all mutation would also be generic ... except those eoBitNext and eoBitPrev // If anybody reads this and want to change that (I'm also testing to see // if someone ever reads the headers :-), drop me a mail @@ -57,19 +57,19 @@ #include // swap_ranges #include #include // eoMonOp -#include +#include -/** eoBinBitFlip --> changes 1 bit -\class eoBinBitFlip eoBitOp.h ga/eoBitOp.h +/** eoBitFlip --> changes 1 bit +\class eoBitBitFlip eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinBitFlip: public eoMonOp +template class eoOneBitFlip: public eoMonOp { public: /// The class name. - string className() const { return "eoBinBitFlip"; } + string className() const { return "eoOneBitFlip"; } /** * Change one bit. @@ -77,9 +77,9 @@ template class eoBinBitFlip: public eoMonOp */ void operator()(Chrom& chrom) { - chrom.invalidate(); - unsigned i = rng.random(chrom.size()); + unsigned i = eo::rng.random(chrom.size()); chrom[i] = (chrom[i]) ? false : true; + chrom.invalidate(); } }; @@ -94,7 +94,7 @@ template class eoDetBitFlip: public eoMonOp /** * (Default) Constructor. * @param _num_bit The number of bits to change - * default is one - equivalent to eoBinBitFlip then + * default is one - equivalent to eoOneBitFlip then */ eoDetBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} @@ -107,35 +107,35 @@ template class eoDetBitFlip: public eoMonOp */ void operator()(Chrom& chrom) { - chrom.invalidate(); // does not check for duplicate: if someone volunteers .... for (unsigned k=0; k classical mutation -\class eoBinMutation eoBitOp.h ga/eoBitOp.h +/** eoBitMutation --> classical mutation +\class eoBitMutation eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinMutation: public eoMonOp +template class eoBitMutation: public eoMonOp { public: /** * (Default) Constructor. * @param _rate Rate of mutation. */ - eoBinMutation(const double& _rate = 0.01): rate(_rate) {} + eoBitMutation(const double& _rate = 0.01): rate(_rate) {} /// The class name. - string className() const { return "eoBinMutation"; } + string className() const { return "eoBitMutation"; } /** * Mutate a chromosome. @@ -145,7 +145,7 @@ template class eoBinMutation: public eoMonOp { bool changed_something = false; for (unsigned i = 0; i < chrom.size(); i++) - if (rng.flip(rate)) + if (eo::rng.flip(rate)) { chrom[i] = !chrom[i]; changed_something = true; @@ -160,16 +160,16 @@ template class eoBinMutation: public eoMonOp }; -/** eoBinInversion: inverts the bits of the chromosome between an interval -\class eoBinInversion eoBitOp.h ga/eoBitOp.h +/** eoBitInversion: inverts the bits of the chromosome between an interval +\class eoBitInversion eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinInversion: public eoMonOp +template class eoBitInversion: public eoMonOp { public: /// The class name. - string className() const { return "eoBinInversion"; } + string className() const { return "eoBitInversion"; } /** * Inverts a range of bits in a binary chromosome. @@ -178,8 +178,8 @@ template class eoBinInversion: public eoMonOp void operator()(Chrom& chrom) { - unsigned u1 = rng.random(chrom.size() + 1) , u2; - do u2 = rng.random(chrom.size() + 1); while (u1 == u2); + unsigned u1 = eo::rng.random(chrom.size() + 1) , u2; + do u2 = eo::rng.random(chrom.size() + 1); while (u1 == u2); unsigned r1 = min(u1, u2), r2 = max(u1, u2); reverse(chrom.begin() + r1, chrom.begin() + r2); @@ -188,16 +188,16 @@ template class eoBinInversion: public eoMonOp }; -/** eoBinNext --> next binary value -\class eoBinNext eoBitOp.h ga/eoBitOp.h +/** eoBitNext --> next value when bitstring considered as binary value +\class eoBitNext eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinNext: public eoMonOp +template class eoBitNext: public eoMonOp { public: /// The class name. - string className() const { return "eoBinNext"; } + string className() const { return "eoBitNext"; } /** * Change the bit string x to be x+1. @@ -222,16 +222,16 @@ template class eoBinNext: public eoMonOp }; -/** eoBinPrev --> previous binary value -\class eoBinPrev eoBitOp.h ga/eoBitOp.h +/** eoBitPrev --> previous value when bitstring treated as binary value +\class eoBitPrev eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinPrev: public eoMonOp +template class eoBitPrev: public eoMonOp { public: /// The class name. - string className() const { return "eoBinPrev"; } + string className() const { return "eoBitPrev"; } /** * Change the bit string x to be x-1. @@ -256,16 +256,16 @@ template class eoBinPrev: public eoMonOp }; -/** eoBinCrossover --> classic 1-point crossover -\class eoBinCrossover eoBitOp.h ga/eoBitOp.h +/** eo1PtBitXover --> classic 1-point crossover +\class eo1PtBitCrossover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinCrossover: public eoQuadraticOp +template class eo1PtBitXover: public eoQuadOp { public: /// The class name. - string className() const { return "eoBinCrossover"; } + string className() const { return "eo1PtBitXover"; } /** * 1-point crossover for binary chromosomes. @@ -274,7 +274,7 @@ template class eoBinCrossover: public eoQuadraticOp */ void operator()(Chrom& chrom1, Chrom& chrom2) { - unsigned site = rng.random(min(chrom1.size(), chrom2.size())); + unsigned site = eo::rng.random(min(chrom1.size(), chrom2.size())); if (!std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) { @@ -288,22 +288,22 @@ template class eoBinCrossover: public eoQuadraticOp }; -/** eoBinUxOver --> classic Uniform crossover -\class eoBinNxOver eoBitOp.h ga/eoBitOp.h +/** eoUBitXover --> classic Uniform crossover +\class eoUBitXover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinUxOver: public eoQuadraticOp +template class eoUBitXover: public eoQuadOp { public: /// (Default) Constructor. - eoBinUxOver(const float& _preference = 0.5): preference(_preference) + eoUBitXover(const float& _preference = 0.5): preference(_preference) { if ( (_preference <= 0.0) || (_preference >= 1.0) ) runtime_error("UxOver --> invalid preference"); } /// The class name. - string className() const { return "eoBinUxOver"; } + string className() const { return "eoUBitXover"; } /** * Uniform crossover for binary chromosomes. @@ -318,7 +318,7 @@ template class eoBinUxOver: public eoQuadraticOp bool changed = false; for (unsigned int i=0; i class eoBinUxOver: public eoQuadraticOp }; -/** eoBinNxOver --> n-point crossover -\class eoBinNxOver eoBitOp.h ga/eoBitOp.h +/** eoNPtsBitXover --> n-point crossover +\class eoNPtsBitXover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinNxOver: public eoQuadraticOp +template class eoNPtsBitXover: public eoQuadOp { public: /// (Default) Constructor. - eoBinNxOver(const unsigned& _num_points = 2): num_points(_num_points) + eoNPtsBitXover(const unsigned& _num_points = 2): num_points(_num_points) { if (num_points < 1) runtime_error("NxOver --> invalid number of points"); } /// The class name. - string className() const { return "eoBinNxOver"; } + string className() const { return "eoNPtsBitXover"; } /** * n-point crossover for binary chromosomes. @@ -369,7 +369,7 @@ template class eoBinNxOver: public eoQuadraticOp // select ranges of bits to swap do { - unsigned bit = rng.random(max_size) + 1; + unsigned bit = eo::rng.random(max_size) + 1; if (points[bit]) continue; else @@ -401,16 +401,18 @@ template class eoBinNxOver: public eoQuadraticOp -/** eoBinGxOver --> gene crossover -\class eoBinGxOver eoBitOp.h ga/eoBitOp.h +/** eoBitGxOver --> Npts crossover when bistring considered + as a string of binary-encoded genes (exchanges genes) +Is anybody still using it apart from historians ??? :-) +\class eoBitGxOver eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ -template class eoBinGxOver: public eoQuadraticOp +template class eoBitGxOver: public eoQuadOp { public: /// Constructor. - eoBinGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + eoBitGxOver(const unsigned _gene_size, const unsigned _num_points = 2): gene_size(_gene_size), num_points(_num_points) { if (gene_size < 1) @@ -420,7 +422,7 @@ template class eoBinGxOver: public eoQuadraticOp } /// The class name - string className() const { return "eoBinGxOver"; } + string className() const { return "eoBitGxOver"; } /** * Gene crossover for binary chromosomes. @@ -436,7 +438,7 @@ template class eoBinGxOver: public eoQuadraticOp // selects genes to swap do { - unsigned bit = rng.random(max_genes); + unsigned bit = eo::rng.random(max_genes); if (points[bit]) continue; else diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h index 46b35ff03..5c0273c40 100644 --- a/eo/src/ga/eoBitOpFactory.h +++ b/eo/src/ga/eoBitOpFactory.h @@ -26,8 +26,8 @@ #ifndef _EOBITOPFACTORY_H #define _EOBITOPFACTORY_H -#include -#include +#include +#include //----------------------------------------------------------------------------- @@ -36,7 +36,7 @@ on bitstring chromosomes. Only those chromosomes can instantiate the operators that are created here @see eoSelect*/ template< class EOT> -class eoBitOpFactory: public eoOpFactory +class eoBitOpFactory: public eoFactory { public: @@ -64,49 +64,97 @@ public: { eoOp * opPtr = NULL; try { - opPtr = eoOpFactory::make( _is ); + opPtr = eoFactory::make( _is ); } catch ( const string& objectTypeStr ) { - if ( objectTypeStr == "eoBinRandom") { - opPtr = new eoBinRandom(); - } if ( objectTypeStr == "eoBinBitFlip" ) { - opPtr = new eoBinBitFlip( ); + opPtr = new eoOneBitFlip( ); } + // handles old operator names as well as new ones + if ( objectTypeStr == "eoOneBitFlip" ) { + opPtr = new eoOneBitFlip( ); + } + + // Standard BitFilp Mutation if ( objectTypeStr == "eoBinMutation" ) { float rate; _is >> rate; - opPtr = new eoBinMutation( rate ); + opPtr = new eoBitMutation( rate ); } + if ( objectTypeStr == "eoBitMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBitMutation( rate ); + } + + // Bit inversion if ( objectTypeStr == "eoBinInversion" ) { - opPtr = new eoBinInversion( ); + opPtr = new eoBitInversion( ); } + if ( objectTypeStr == "eoBitInversion" ) { + opPtr = new eoBitInversion( ); + } + + // Next binary value if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBinNext( ); + opPtr = new eoBitNext( ); } + if ( objectTypeStr == "eoBitNext" ) { + opPtr = new eoBitNext( ); + } + + // Previous binary value if ( objectTypeStr == "eoBinPrev" ) { - opPtr = new eoBinPrev( ); + opPtr = new eoBitPrev( ); } - if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBinNext( ); + if ( objectTypeStr == "eoBitPrev" ) { + opPtr = new eoBitPrev( ); } + + // 1 point Xover if ( objectTypeStr == "eoBinCrossover" ) { - opPtr = new eoBinCrossover( ); + opPtr = new eo1PtBitXover( ); } + if ( objectTypeStr == "eo1PtBitXover" ) { + opPtr = new eo1PtBitXover( ); + } + + // Npts Xover if ( objectTypeStr == "eoBinNxOver" ) { unsigned nPoints; _is >> nPoints; - opPtr = new eoBinNxOver( nPoints ); + opPtr = new eoNPtsBitXover( nPoints ); } + if ( objectTypeStr == "eoNPtsBitXover" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoNPtsBitXover( nPoints ); + } + + // Gene Xover (obsolete) if ( objectTypeStr == "eoBinGxOver" ) { unsigned geneSize, nPoints; _is >> geneSize >> nPoints; - opPtr = new eoBinGxOver( geneSize, nPoints ); + opPtr = new eoBitGxOver( geneSize, nPoints ); } + if ( objectTypeStr == "eoBitGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBitGxOver( geneSize, nPoints ); + } + + // Uniform Xover if ( objectTypeStr == "eoBinUxOver" ) { float rate; _is >> rate; - opPtr = new eoBinUxOver( rate ); + opPtr = new eoUBitXover( rate ); } + if ( objectTypeStr == "eoUBitXover" ) { + float rate; + _is >> rate; + opPtr = new eoUBitXover( rate ); + } + + // nothing read! if ( !opPtr ) { // to be caught by the upper level throw objectTypeStr; } diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 061f030a4..fb6e55c24 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -5,8 +5,6 @@ #include #include -#include -#include #include #include @@ -154,47 +152,47 @@ private : }; template -class eoSubtreeXOver: public eoGeneralOp< eoParseTree > { +class eoSubtreeXOver: public eoQuadOp< eoParseTree > { public: typedef eoParseTree EoType; eoSubtreeXOver( unsigned _max_length) - : eoGeneralOp(), max_length(_max_length) {}; + : eoQuadOp(), max_length(_max_length) {}; virtual string className() const { return "eoSubtreeXOver"; }; /// Dtor virtual ~eoSubtreeXOver () {}; - void operator()(eoIndiSelector& _select, eoInserter& _insert ) + void operator()(EoType & _eo1, EoType & _eo2 ) { - EoType eo1 = _select(); - const EoType& eo2 = _select(); + int i = rng.random(_eo1.size()); + int j = rng.random(_eo2.size()); - int i = rng.random(eo1.size()); - int j = rng.random(eo2.size()); - - eo1[i] = eo2[j]; // insert subtree + parse_tree::subtree tmp = _eo2[j]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j]=tmp; - eo1.pruneTree(max_length); + _eo1.pruneTree(max_length); + _eo2.pruneTree(max_length); - eo1.invalidate(); - _insert(eo1); + _eo1.invalidate(); + _eo2.invalidate(); } unsigned max_length; }; template -class eoBranchMutation: public eoGeneralOp< eoParseTree > +class eoBranchMutation: public eoMonOp< eoParseTree > { public: typedef eoParseTree EoType; eoBranchMutation(eoInit& _init, unsigned _max_length) - : eoGeneralOp(), max_length(_max_length), initializer(_init) + : eoMonOp(), max_length(_max_length), initializer(_init) {}; virtual string className() const { return "eoBranchMutation"; }; @@ -202,22 +200,20 @@ public: /// Dtor virtual ~eoBranchMutation() {}; - void operator()(eoIndiSelector& _select, eoInserter& _insert ) + void operator()(EoType& _eo1 ) { - EoType eo1 = _select(); - int i = rng.random(eo1.size()); + int i = rng.random(_eo1.size()); EoType eo2; initializer(eo2); int j = rng.random(eo2.size()); - eo1[i] = eo2[j]; // insert subtree + _eo1[i] = eo2[j]; // insert subtree - eo1.pruneTree(max_length); + _eo1.pruneTree(max_length); - eo1.invalidate(); - _insert(eo1); + _eo1.invalidate(); } private : diff --git a/eo/src/eoBackInserter.h b/eo/src/obsolete/eoBackInserter.h similarity index 100% rename from eo/src/eoBackInserter.h rename to eo/src/obsolete/eoBackInserter.h diff --git a/eo/src/eoDetTournamentInserter.h b/eo/src/obsolete/eoDetTournamentInserter.h similarity index 100% rename from eo/src/eoDetTournamentInserter.h rename to eo/src/obsolete/eoDetTournamentInserter.h diff --git a/eo/src/eoGOpBreeder.h b/eo/src/obsolete/eoGOpBreeder.h similarity index 100% rename from eo/src/eoGOpBreeder.h rename to eo/src/obsolete/eoGOpBreeder.h diff --git a/eo/src/eoGOpSelector.h b/eo/src/obsolete/eoGOpSelector.h similarity index 100% rename from eo/src/eoGOpSelector.h rename to eo/src/obsolete/eoGOpSelector.h diff --git a/eo/src/eoIndiSelector.h b/eo/src/obsolete/eoIndiSelector.h similarity index 100% rename from eo/src/eoIndiSelector.h rename to eo/src/obsolete/eoIndiSelector.h diff --git a/eo/src/eoInplaceTransform.h b/eo/src/obsolete/eoInplaceTransform.h similarity index 100% rename from eo/src/eoInplaceTransform.h rename to eo/src/obsolete/eoInplaceTransform.h diff --git a/eo/src/eoInserter.h b/eo/src/obsolete/eoInserter.h similarity index 100% rename from eo/src/eoInserter.h rename to eo/src/obsolete/eoInserter.h diff --git a/eo/src/eoOpFactory.h b/eo/src/obsolete/eoOpFactory.h similarity index 100% rename from eo/src/eoOpFactory.h rename to eo/src/obsolete/eoOpFactory.h diff --git a/eo/src/eoOpSelector.h b/eo/src/obsolete/eoOpSelector.h similarity index 100% rename from eo/src/eoOpSelector.h rename to eo/src/obsolete/eoOpSelector.h diff --git a/eo/src/eoProportionalGOpSel.h b/eo/src/obsolete/eoProportionalGOpSel.h similarity index 100% rename from eo/src/eoProportionalGOpSel.h rename to eo/src/obsolete/eoProportionalGOpSel.h diff --git a/eo/src/eoProportionalOpSel.h b/eo/src/obsolete/eoProportionalOpSel.h similarity index 100% rename from eo/src/eoProportionalOpSel.h rename to eo/src/obsolete/eoProportionalOpSel.h diff --git a/eo/src/eoSequentialGOpSel.h b/eo/src/obsolete/eoSequentialGOpSel.h similarity index 100% rename from eo/src/eoSequentialGOpSel.h rename to eo/src/obsolete/eoSequentialGOpSel.h diff --git a/eo/src/eoSteadyStateEA.h b/eo/src/obsolete/eoSteadyStateEA.h similarity index 100% rename from eo/src/eoSteadyStateEA.h rename to eo/src/obsolete/eoSteadyStateEA.h diff --git a/eo/src/eoSteadyStateInserter.h b/eo/src/obsolete/eoSteadyStateInserter.h similarity index 100% rename from eo/src/eoSteadyStateInserter.h rename to eo/src/obsolete/eoSteadyStateInserter.h diff --git a/eo/src/eoSteadyStateTransform.h b/eo/src/obsolete/eoSteadyStateTransform.h similarity index 100% rename from eo/src/eoSteadyStateTransform.h rename to eo/src/obsolete/eoSteadyStateTransform.h diff --git a/eo/src/eoStochTournamentInserter.h b/eo/src/obsolete/eoStochTournamentInserter.h similarity index 100% rename from eo/src/eoStochTournamentInserter.h rename to eo/src/obsolete/eoStochTournamentInserter.h diff --git a/eo/src/eoWrappedOps.h b/eo/src/obsolete/eoWrappedOps.h similarity index 100% rename from eo/src/eoWrappedOps.h rename to eo/src/obsolete/eoWrappedOps.h diff --git a/eo/src/other/eoExternalOpFunctions.h b/eo/src/other/eoExternalOpFunctions.h index 73620b412..906460fbb 100644 --- a/eo/src/other/eoExternalOpFunctions.h +++ b/eo/src/other/eoExternalOpFunctions.h @@ -153,11 +153,11 @@ class eoExternalBinOp : public eoBinOp The function should return true when it changed something, false otherwise */ template > -class eoExternalQuadraticOp : public eoQuadraticOp +class eoExternalQuadOp : public eoQuadOp { public : - eoExternalQuadraticOp(bool (*_quadop)(External&, External&)) : quadop(_quadop) {} + eoExternalQuadOp(bool (*_quadop)(External&, External&)) : quadop(_quadop) {} void operator()(ExternalEO& eo1, ExternalEO& eo2) { diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index b401db027..a069ff072 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -197,7 +197,6 @@ void eoParser::printOn(ostream& os) const std::string section = p->first; printSectionHeader(os, section); - //print every param with its value for (; p != params.end(); ++p) { diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp new file mode 100644 index 000000000..88b04f429 --- /dev/null +++ b/eo/test/t-eoGenOp.cpp @@ -0,0 +1,359 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenOp.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +/** test program for the general operator - millenium version! + * uses dummy individuals + */ +#include +#include +#include + +struct Dummy : public EO +{ + typedef double Type; + Dummy(std::string _s="") : s(_s) {} + + void printOn(ostream & _os) const + { + EO::printOn(_os); + _os << " - " << s ; + } + + string s; +}; + +typedef Dummy EOT; + +unsigned int pSize; // global to be used as marker in the fitness + +// DEFINITIONS of the eoOps +class monop : public eoMonOp +{ + public : + monop(char * _sig){sig=_sig;} + void operator()(EOT& _eo) + { + _eo.s = sig + "(" + _eo.s + ")"; + _eo.fitness(_eo.fitness()+pSize); + } + string className() {return sig;} + private: + string sig; +}; + +class binop: public eoBinOp +{ + public : + void operator()(EOT& _eo1, const EOT& _eo2) + { + _eo1.s = "bin(" + _eo1.s + "," + _eo2.s + ")"; + double f= (_eo1.fitness()+_eo2.fitness()) * pSize; + _eo1.fitness(_eo1.fitness()+f); + } + string className() {return "binop";} +}; + +class quadop: public eoQuadOp +{ + public : + string className() {return "quadop";} + void operator()(EOT& a, EOT& b) + { + EOT oi = a; + EOT oj = b; + + a.s = "quad1(" + oi.s + "," + oj.s + ")"; + b.s = "quad2(" + oj.s + "," + oi.s + ")"; + double f= (a.fitness()+b.fitness()+2*pSize) * pSize; + a.fitness(a.fitness()+f); + b.fitness(b.fitness()+f); + } +}; +// an eoQuadOp that does nothing +class quadClone: public eoQuadOp +{ + public : + string className() {return "quadclone";} + void operator()(EOT& , EOT& ) {} +}; + +// User defined General Operator... adapted from Marc's example + +class one2threeOp : public eoGenOp // :-) +{ + public: + unsigned max_production(void) { return 3; } + + void apply(eoPopulator& _plop) + { + EOT& eo = *_plop; // select the guy + ++_plop; // advance + + _plop.insert("v(" + eo.s + ", 1)"); + ++_plop; + _plop.insert("v(" + eo.s + ", 2)"); + eo.s = "v(" + eo.s + ", 0)"; // only now change the thing + // oh right, and invalidate fitnesses + } + virtual string className() {return "one2threeOp";} +}; + + +class two2oneOp : public eoGenOp // :-) +{ + public: + unsigned max_production(void) { return 1; } + + void apply(eoPopulator& _plop) + { + EOT& eo = *_plop; // select the guy + ++_plop; // advance + EOT& eo2 = *_plop; + eo.s = "221(" + eo.s + ", " + eo2.s + ")"; + _plop.erase(); + // oh right, and invalidate fitnesses + } + virtual string className() {return "two2oneOp";} +}; + + +// dummy intialization. Re-init if no pSize, resize first if pSize +void init(eoPop & _pop, unsigned _pSize) +{ + if (_pSize) + { + _pop.resize(_pSize); + } + else + { + throw runtime_error("init pop with 0 size"); + } + for (unsigned i=0; i<_pSize; i++) + { + char s[255]; + ostrstream os(s, 254); + os << i << ends; + _pop[i] = Dummy(s); + _pop[i].fitness(i); + } +} + +// ok, now for the real work +int the_main(int argc, char **argv) +{ + + eoParser parser(argc, argv); + eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); + pSize = parentSizeParam.value(); // global variable + + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); + parser.processParam( seedParam ); + eo::rng.reseed(seedParam.value()); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + + ////////////////////////////////// define operators + monop mon("mon1"); + monop clone("clone"); + binop bin; + quadop quad; + quadClone quadclone; + + // our own operator + one2threeOp o2t; + two2oneOp t2o; + + + // a selector + eoDetTournamentSelect select; + // and a recognizable selector for testing the inbedded selector mechanism + eoBestSelect selectBest; + + // proportional selection between quad and bin + // so we either do a quad or a bin + eoProportionalOp pOp; + pOp.add(quad, 0.1); + pOp.add(bin, 0.1); + + // sequential selection between pOp and mon + eoSequentialOp sOp; + sOp.add(pOp, 0.9); + sOp.add(mon, 0.1); + + // with one2three op + eoSequentialOp sOp2; + sOp2.add(o2t, 1); + sOp2.add(quad, 1); + + eoSequentialOp sOp3; + // sOp3.add(t2o, 1); + sOp3.add(bin, 1); + sOp3.add(quad, 1); + // try adding quads and bins to see what results you'll get + + // now a sequential selection that is a simple "addition" + eoSequentialOp sOpQuadPlusMon; + sOpQuadPlusMon.add(quad, 1); + sOpQuadPlusMon.add(mon, 1); + + // this corresponds + eoProportionalOp pOpSAGLike; + pOpSAGLike.add(sOpQuadPlusMon, 0.24); + pOpSAGLike.add(quad, 0.56); + pOpSAGLike.add(mon, 0.06); + pOpSAGLike.add(clone, 0.14); + + // init + eoPop pop; + + init(pop, pSize); +// sort pop so seqPopulator is identical to SelectPopulator(SequentialSelect) + pop.sort(); + cout << "Population initiale\n" << pop << endl; + + // To simulate SGA: first a prop between quadOp and quadClone + eoProportionalOp pSGAOp; + pSGAOp.add(bin, 0.8); + pSGAOp.add(quadclone, 0.2); + // sequential selection between pSGAOp and mon + eoSequentialOp virtualSGA; + virtualSGA.add(pSGAOp, 1.0); + virtualSGA.add(mon, 0.3); + + eoSeqPopulator popit(pop); // no selection, a copy of pop + + // until we filled a new population + try + { + while (popit.size() < pop.size()) + { + virtualSGA(popit); + } + } + catch(eoPopulator::OutOfIndividuals&) + { + cout << "Warning: not enough individuals to handle\n"; + } + + + swap(pop, popit); + + // ok, now print + cout << "Apres virtualSGA \n" << pop << endl; + init(pop, pSize); + + cout << "=========================================================\n"; + cout << "Now the eoSelectPopulator version !" << endl; + + eoSequentialSelect seqSelect; + // select.init(); should be sorted out: is it the setup method??? + eoSelectivePopulator it_step3(pop, seqSelect); + + while (it_step3.size() < 2*pop.size()) + { + virtualSGA(it_step3); + } + + swap(pop, it_step3); + + // ok, now print + cout << "Apres SGA-like eoSelectivePopulator\n" << pop << endl; + + cout << "=========================================================\n"; + cout << "Now the pure addition !" << endl; + + init(pop, pSize); + eoSelectivePopulator it_step4(pop, seqSelect); + while (it_step4.size() < 2*pop.size()) + { + sOpQuadPlusMon(it_step4); + } + + swap(pop, it_step4); + + // ok, now print + cout << "Apres Quad+Mon ds un eoSelectivePopulator\n" << pop << endl; + + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + return 1; +} + +/* +If you want to build an SGA, you will need a copying quad op: + +class quadclone : ... +{ + operator(EOT& a, EOT& b) + { + // do nothing + } + +} + +Then the SGA operator will look like: + +quadop quad; +guadclone clone; + +ProportionalGenOp pOp; +pOp.add(quad, 0.8); +pOp.add(clone, 0.2); // so 80% xover rate + +SequentialGenOp sOp; +sOp.add(pOp, 1,0); // always try a xover (clone 20%) +sOp.add(mut, 0.1); // low mutation rate + +will result in an algorithm with: + +p_xover = 0.8 +p_mut = 0.1; + +p_reproduction = 0.2 * 0.9 = 0.18 + +this does not add up to 1 because xover and mutation can be applied to a single indi + +So what do you think? + +*/ diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index 1ea79a766..c1a41870e 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -13,13 +13,12 @@ // the general include for eo #include +#include // REPRESENTATION //----------------------------------------------------------------------------- -// Include the corresponding file -#include // bitstring representation & operators // define your individuals -typedef eoBin Indi; // A bitstring with fitness double +typedef eoBit Indi; // A bitstring with fitness double // EVAL //----------------------------------------------------------------------------- @@ -112,11 +111,11 @@ void main_function(int argc, char **argv) // The variation operators ////////////////////////////////////// // CROSSOVER - // 1-point mutation for bitstring - eoBinCrossover xover; + // 1-point crossover for bitstring + eo1PtBitXover xover; // MUTATION // standard bit-flip mutation for bitstring - eoBinMutation mutation(P_MUT_PER_BIT); + eoBitMutation mutation(P_MUT_PER_BIT); // STOP // CHECKPOINT diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index 5e1c69e4d..3a4f991a4 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -13,11 +13,10 @@ // the general include for eo #include +#include // REPRESENTATION //----------------------------------------------------------------------------- -// Include the corresponding file -#include // real-representation & operators // define your individuals typedef eoReal Indi; diff --git a/eo/tutorial/Lesson1/exercise1.3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp index f2e03652c..3a2cb8d22 100644 --- a/eo/tutorial/Lesson1/exercise1.3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -20,7 +20,7 @@ // Include the corresponding file #include // bitstring representation & operators // define your individuals -typedef eoBin Indi; // A bitstring with fitness double +typedef eoBit Indi; // A bitstring with fitness double //----------------------------------------------------------------------------- /** a simple fitness function that computes the number of ones of a bitstring @@ -120,9 +120,9 @@ void main_function(int argc, char **argv) // The variation operators ////////////////////////////////////// // standard bit-flip mutation for bitstring - eoBinMutation mutation(P_MUT_PER_BIT); + eoBitMutation mutation(P_MUT_PER_BIT); // 1-point mutation for bitstring - eoBinCrossover xover; + eo1PtBitXover xover; ///////////////////////////////////////// // the algorithm diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index a5b3e0dee..d89e3e28a 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -13,13 +13,12 @@ // the general include for eo #include +#include // REPRESENTATION //----------------------------------------------------------------------------- -// Include the corresponding file -#include // bitstring representation & operators // define your individuals -typedef eoBin Indi; // A bitstring with fitness double +typedef eoBit Indi; // A bitstring with fitness double // EVALFUNC //----------------------------------------------------------------------------- @@ -112,11 +111,11 @@ void main_function(int argc, char **argv) ////////////////////////////////////// // CROSSOVER // 1-point crossover for bitstring - eoBinCrossover xover1; + eo1PtBitXover xover1; // uniform crossover for bitstring - eoBinUxOver xoverU; + eoUBitXover xoverU; // 2-pots xover - eoBinNxOver xover2(2); + eoNPtsBitXover xover2(2); // Combine them with relative rates eoPropCombinedQuadOp xover(xover1, onePointRate); xover.add(xoverU, URate); @@ -124,7 +123,7 @@ void main_function(int argc, char **argv) // MUTATION // standard bit-flip mutation for bitstring - eoBinMutation mutationBitFlip(P_MUT_PER_BIT); + eoBitMutation mutationBitFlip(P_MUT_PER_BIT); // mutate exactly 1 bit per individual eoDetBitFlip mutationOneBit; // Combine them with relative rates diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 934fb0c35..a6f5e8e22 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -13,11 +13,10 @@ // the general include for eo #include +#include // REPRESENTATION //----------------------------------------------------------------------------- -// Include the corresponding file -#include // real-valued representation & operators // define your individuals typedef eoReal Indi; diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index 09b6bbc01..f7832bf0d 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -19,7 +19,7 @@ // Include the corresponding file #include // bitstring representation & operators // define your individuals -typedef eoBin Indi; // A bitstring with fitness double +typedef eoBit Indi; // A bitstring with fitness double // EVAL //----------------------------------------------------------------------------- @@ -118,11 +118,11 @@ void main_function(int argc, char **argv) ////////////////////////////////////// // CROSSOVER // 1-point crossover for bitstring - eoBinCrossover xover1; + eo1PtBitXover xover1; // uniform crossover for bitstring - eoBinUxOver xoverU; + eoUBitXover xoverU; // 2-pots xover - eoBinNxOver xover2(2); + eoNPtsBitXover xover2(2); // Combine them with relative rates eoPropCombinedQuadOp xover(xover1, onePointRate); xover.add(xoverU, URate); @@ -130,7 +130,7 @@ void main_function(int argc, char **argv) // MUTATION // standard bit-flip mutation for bitstring - eoBinMutation mutationBitFlip(P_MUT_PER_BIT); + eoBitMutation mutationBitFlip(P_MUT_PER_BIT); // mutate exactly 1 bit per individual eoDetBitFlip mutationOneBit; // Combine them with relative rates diff --git a/eo/tutorial/Lesson2/real_value.h b/eo/tutorial/Lesson2/real_value.h index 17d96ede0..c7a57c109 100644 --- a/eo/tutorial/Lesson2/real_value.h +++ b/eo/tutorial/Lesson2/real_value.h @@ -10,7 +10,11 @@ double real_value(const std::vector& _ind) { double sum = 0; for (unsigned i = 0; i < _ind.size(); i++) - sum += _ind[i] * _ind[i]; + { + if ( (_ind[i]<0) || (_ind[i]>1) ) + cout << "Sorti des bornes: " << _ind[i] << " "; + sum += _ind[i] * _ind[i]; + } return -sum; } diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 60412fb18..b2eda1a56 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -14,16 +14,15 @@ // the general include for eo #include +#include // EVAL #include "binary_value.h" // REPRESENTATION //----------------------------------------------------------------------------- -// Include the corresponding file -#include // bitstring representation & operators // define your genotype and fitness types -typedef eoBin Indi; +typedef eoBit Indi; // the main_function: nothing changed(!), except variable initialization void main_function(int argc, char **argv) @@ -201,11 +200,11 @@ void main_function(int argc, char **argv) ////////////////////////////////////// // CROSSOVER // 1-point crossover for bitstring - eoBinCrossover xover1; + eo1PtBitXover xover1; // uniform crossover for bitstring - eoBinUxOver xoverU; + eoUBitXover xoverU; // 2-pots xover - eoBinNxOver xover2(2); + eoNPtsBitXover xover2(2); // Combine them with relative rates eoPropCombinedQuadOp xover(xover1, onePointRate); xover.add(xoverU, URate); @@ -213,7 +212,7 @@ void main_function(int argc, char **argv) // MUTATION // standard bit-flip mutation for bitstring - eoBinMutation mutationBitFlip(pMutPerBit); + eoBitMutation mutationBitFlip(pMutPerBit); // mutate exactly 1 bit per individual eoDetBitFlip mutationOneBit; // Combine them with relative rates diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index fa8500c8a..c8c3d2bd5 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -27,7 +27,7 @@ // Include the corresponding file #include // bitstring representation & operators // define your genotype and fitness types -typedef eoBin Indi; +typedef eoBit Indi; // the main_function: nothing changed(!), except variable initialization void main_function(int argc, char **argv) @@ -210,11 +210,11 @@ void main_function(int argc, char **argv) ////////////////////////////////////// // CROSSOVER // 1-point crossover for bitstring - eoBinCrossover xover1; + eo1PtBitXover xover1; // uniform crossover for bitstring - eoBinUxOver xoverU; + eoUBitXover xoverU; // 2-pots xover - eoBinNxOver xover2(2); + eoNPtsBitXover xover2(2); // Combine them with relative rates eoPropCombinedQuadOp xover(xover1, onePointRate); xover.add(xoverU, URate); @@ -222,7 +222,7 @@ void main_function(int argc, char **argv) // MUTATION // standard bit-flip mutation for bitstring - eoBinMutation mutationBitFlip(pMutPerBit); + eoBitMutation mutationBitFlip(pMutPerBit); // mutate exactly 1 bit per individual eoDetBitFlip mutationOneBit; // Combine them with relative rates @@ -314,6 +314,9 @@ void main_function(int argc, char **argv) gnuMonitor.add(bestStat); gnuMonitor.add(averageStat); + // send a scaling command to gnuplot + gnuMonitor.gnuplotCommand("set yrange [0:500]"); + // a specific plot monitor for FDC // first into a file (it adds everything ti itself eoFDCFileSnapshot fdcFileSnapshot(fdcStat); diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index 6b06faac6..4089c8ff8 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -2,9 +2,9 @@ - + FirstBitEA.cpp - + Back to Lesson 2 - Tutorial @@ -16,319 +16,345 @@ documentation

      FirstBitEA.cpp

      -Click on the figure to see the corresponding code. -
      In the code, the colors are meaningfull -
      The actual code is in boldface and the comment in normal face. -
      -
      +Click on the figure to see the corresponding code.
      +In the code, the colors are meaningfull
      +The actual code is in boldface and the comment in normal face. +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + - +
      //----------------------------------------------------------------------------- -
      // FirstBitEA.cpp -
      //----------------------------------------------------------------------------- -
      //* -
      // Still an instance of a VERY simple Bitstring -Genetic Algorithm  -
      // (see FirstBitGA.cpp) but now with  -Breeder - and Combined Ops -
      // -
      //----------------------------------------------------------------------------- -
      // standard includes -
      #include <stdexcept>  // runtime_error  -
      #include <iostream>    -// cout -
      #include <strstream>  // ostrstream, -istrstream -
      // the general include for eo -
      #include <eo>
      +//-----------------------------------------------------------------------------
      +// FirstBitEA.cpp
      +//-----------------------------------------------------------------------------
      +//*
      +// Still an instance of a VERY simple Bitstring Genetic Algorithm
      +// (see FirstBitGA.cpp) but now with  Breeder - and Combined Ops
      +//
      +//-----------------------------------------------------------------------------
      +// standard includes
      +#include <stdexcept>  // runtime_error
      +#include <iostream>    // cout
      +#include <strstream>  // ostrstream, istrstream
      +// the general include for eo
      +#include <eo>
      +
      +
      - - - - - -
      //----------------------------------------------------------------------------- -
      // Include the corresponding file  -
      #include <ga.h>          -// bitstring representation & operators  -
      // define your individuals -
      typedef eoBin<double> Indi; // -A bitstring with fitness double
      - - - - - -
      //----------------------------------------------------------------------------- -
      // a simple fitness function that computes -the number of ones of a bitstring -
      // Now in a separate file, and declared as -binary_value(const vector<bool> &) -
      #include "binary_value.h"
      - - - - - -
      //----------------------------------------------------------------------------- -
      void main_function(int argc, char **argv) -
      {
      - - - - - -
       const unsigned int SEED = 42; // -seed for random number generator -
       const unsigned int T_SIZE = 3; // -size for tournament selection -
       const unsigned int VEC_SIZE = 8; -// Number of bits in genotypes -
       const unsigned int POP_SIZE = 20; -// Size of population -
       const unsigned int MAX_GEN = 500; -// Maximum number of generation before STOP -
       const float CROSS_RATE = 0.8; // -Crossover rate -
       const double P_MUT_PER_BIT = 0.01; -// probability of bit-flip mutation -
       const float MUT_RATE = 1.0; // -mutation rate -
       // some parameters for chosing -among different operators -
       const double onePointRate = 0.5;        -// rate for 1-pt Xover -
       const double twoPointsRate = 0.5;        -// rate for 2-pt Xover -
       const double URate = 0.5;                      -// rate for Uniform Xover -
       const double bitFlipRate = 0.5;          -// rate for bit-flip mutation -
       const double oneBitRate = 0.5;            -// rate for one-bit mutation
      - - - - - -
       ////////////////////////// -
       //  Random seed -
       ////////////////////////// -
       //reproducible random seed: -if you don't change SEED above,  -
       // you'll aways get the same -result, NOT a random run -
       rng.reseed(SEED);
      - - - - - -
       ///////////////////////////// -
       // Fitness function -
       //////////////////////////// -
       // Evaluation: from a plain -C++ fn to an EvalFunc Object -
       // you need to give the full -description of the function -
       eoEvalFuncPtr<Indi, double, const -vector<bool>& > eval(  binary_value );
      - - - - - -
       //////////////////////////////// -
       // Initilisation of population -
       //////////////////////////////// -
       // based on boolean_generator -class (see utils/rnd_generator.h) -
       eoInitFixedLength<Indi, boolean_generator>  -
           random(VEC_SIZE, -boolean_generator()); -
       // Initialization of the population -
       eoPop<Indi> pop(POP_SIZE, random); -
       // and evaluate it in one line -
       apply<Indi>(eval, pop); // -STL syntax
      - - - - - -
       // sort pop before printing -it! -
       pop.sort(); -
       // Print (sorted) intial population -(raw printout) -
       cout << "Initial Population" -<< endl; -
       cout << pop;
      - - - - - -
       ///////////////////////////////////// -
       // selection and replacement -
       ////////////////////////////////////
      - - - - - -
       // The robust tournament selection -
       eoDetTournamentSelect<Indi> selectOne(T_SIZE);            -// T_SIZE in [2,POP_SIZE] -
      // -is now encapsulated in a eoSelectPerc (entage) -
       eoSelectPerc<Indi> select(selectOne);// -by default rate==1
      - - - - - -
       // And we now have the full -slection/replacement - though with  -
       // no replacement (== generational -replacement) at the moment :-) -
       eoNoReplacement<Indi> replace; 
      - - - - - -
       ////////////////////////////////////// -
       // The variation operators -
       //////////////////////////////////////
      - - - - - -
       // 1-point crossover for bitstring -
       eoBinCrossover<Indi> xover1; -
       // uniform crossover for bitstring -
       eoBinUxOver<Indi> xoverU; -
       // 2-pots xover -
       eoBinNxOver<Indi> xover2(2); -
       // Combine them with relative -rates -
       eoPropCombinedQuadOp<Indi> xover(xover1, -onePointRate); -
       xover.add(xoverU, URate); -
       xover.add(xover2, twoPointsRate, -true);
      - - +
      + +#include <ga.h>
      +//-----------------------------------------------------------------------------
      +// define your individuals
      +typedef eoBit<double> Indi; // A bitstring with fitness double
      +
      +
      -
       // standard bit-flip mutation -for bitstring -
       eoBinMutation<Indi>  mutationBitFlip(P_MUT_PER_BIT); -
       // mutate exactly 1 bit per -individual -
       eoDetBitFlip<Indi> mutationOneBit;  -
       // Combine them with relative -rates -
       eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, -bitFlipRate); -
       mutation.add(mutationOneBit, oneBitRate, -true); -

      // The operators -are  encapsulated into an eoTRansform object -
       eoSGATransform<Indi> transform(xover, -CROSS_RATE, mutation, MUT_RATE);

      - - +
      - +
      + +//-----------------------------------------------------------------------------
      +// a simple fitness function that computes the number of ones of a bitstring
      +// Now in a separate file, and declared as binary_value(const vector<bool> &)
      +#include "binary_value.h"
      +
      +
      - - +
      - +
       ////////////////////////////////////// -
       // termination conditions: use -more than one -
       ///////////////////////////////////// -
       // stop after MAX_GEN generations -
       eoGenContinue<Indi> genCont(MAX_GEN); -
       // do MIN_GEN gen., then stop -after STEADY_GEN gen. without improvement -
       eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, -STEADY_GEN); -
       // stop when fitness reaches -a target (here VEC_SIZE) -
       eoFitContinue<Indi> fitCont(0); -
       // do stop when one of the above -says so -
       eoCombinedContinue<Indi> continuator(genCont); -
       continuator.add(steadyCont); -
       continuator.add(fitCont);
      + +//-----------------------------------------------------------------------------
      +void main_function(int argc, char **argv)
      +{
      +
      +
      - - +
      - +
       ///////////////////////////////////////// -
       // the algorithm -
       //////////////////////////////////////// -
       // Easy EA requires  -
       // selection, transformation, -eval, replacement, and stopping criterion -
       eoEasyEA<Indi> gga(continuator, -eval, select, transform, replace); -
       // Apply algo to pop - that's -it! -
       gga(pop); -
       
      + +  const unsigned int SEED = 42; // seed for random number generator
      +  const unsigned int T_SIZE = 3; // size for tournament selection
      +  const unsigned int VEC_SIZE = 8; // Number of bits in genotypes
      +  const unsigned int POP_SIZE = 20; // Size of population
      +  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
      +  const float CROSS_RATE = 0.8; // Crossover rate
      +  const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation
      +  const float MUT_RATE = 1.0; // mutation rate
      +  // some parameters for chosing among different operators
      +  const double onePointRate = 0.5;        // rate for 1-pt Xover
      +  const double twoPointsRate = 0.5;        // rate for 2-pt Xover
      +  const double URate = 0.5;                      // rate for Uniform Xover
      +  const double bitFlipRate = 0.5;          // rate for bit-flip mutation
      +  const double oneBitRate = 0.5;            // rate for one-bit mutation
      +
      +
      - - +
      - +
       // Print (sorted) intial population -
       pop.sort(); -
       cout << "FINAL Population\n" -<< pop << endl;
      + +  //////////////////////////
      +  //  Random seed
      +  //////////////////////////
      +  //reproducible random seed: if you don't change SEED above,
      +  // you'll aways get the same result, NOT a random run
      +  rng.reseed(SEED);
      +
      +
      - - +
      - + + +
      } -
      // A main that catches the exceptions -
      int main(int argc, char **argv) -
      { -
      #ifdef _MSC_VER -
       //  rng.reseed(42); -
           int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); -
             flag -|= _CRTDBG_LEAK_CHECK_DF; -
           _CrtSetDbgFlag(flag); -
      //    _CrtSetBreakAlloc(100); -
      #endif -
           try -
           { -
                   -main_function(argc, argv); -
           } -
           catch(exception& -e) -
           { -
                   -cout << "Exception: " << e.what() << '\n'; -
           } -
           return 1; -
      }
      + +  /////////////////////////////
      +  // Fitness function
      +  ////////////////////////////
      +  // Evaluation: from a plain C++ fn to an EvalFunc Object
      +  // you need to give the full description of the function
      +  eoEvalFuncPtr<Indi, double, const vector<bool>& > eval(  binary_value );
      +
      +
      + + + + +
      + +  ////////////////////////////////
      +  // Initilisation of population
      +  ////////////////////////////////
      +  // based on boolean_generator class (see utils/rnd_generator.h)
      +  eoInitFixedLength<Indi, boolean_generator>
      +      random(VEC_SIZE, boolean_generator());
      +  // Initialization of the population
      +  eoPop<Indi> pop(POP_SIZE, random);
      +  // and evaluate it in one line
      +  apply<Indi>(eval, pop); // STL syntax
      +
      +
      + + + + +
      + +  // sort pop before printing it!
      +  pop.sort();
      +  // Print (sorted) intial population (raw printout)
      +  cout << "Initial Population" << endl;
      +  cout << pop;
      +
      +
      + + + + +
      + +  /////////////////////////////////////
      +  // selection and replacement
      +  ////////////////////////////////////
      +
      +
      + + + + +
      + +  // The robust tournament selection
      +  eoDetTournamentSelect<Indi> selectOne(T_SIZE);            // T_SIZE in [2,POP_SIZE]
      + +  // is now encapsulated in a eoSelectPerc (entage)
      +  eoSelectPerc<Indi> select(selectOne);// by default rate==1
      +
      +
      + + + + +
      + +  // And we now have the full slection/replacement - though with
      +  // no replacement (== generational replacement) at the moment :-)
      +  eoNoReplacement<Indi> replace;
      +
      +
      + + + + +
      + +  //////////////////////////////////////
      +  // The variation operators
      +  //////////////////////////////////////
      +
      +
      + + + + +
      + +  // 1-point crossover for bitstring
      +  eo1PtBitXover<Indi> xover1;
      +  // uniform crossover for bitstring
      +  eoUBitXover<Indi> xoverU;
      +  // 2-pots xover
      +  eoNPtsBitXover<Indi> xover2(2);
      +  // Combine them with relative rates
      +  eoPropCombinedQuadOp<Indi> xover(xover1, onePointRate);
      +  xover.add(xoverU, URate);
      +  xover.add(xover2, twoPointsRate, true);
      +
      +
      + + + + +
      + +  
      +  // standard bit-flip mutation for bitstring
      +  eoBitMutation<Indi>  mutationBitFlip(P_MUT_PER_BIT);
      +  // mutate exactly 1 bit per individual
      +  eoDetBitFlip<Indi> mutationOneBit;
      +  // Combine them with relative rates
      +  eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, bitFlipRate);
      +  mutation.add(mutationOneBit, oneBitRate, true);
      +  
      + +  // The operators are  encapsulated into an eoTRansform object
      +  eoSGATransform<Indi> transform(xover, CROSS_RATE, mutation, MUT_RATE);
      +
      +
      + + + + +
      + + +
      + + + + +
      + +  //////////////////////////////////////
      +  // termination conditions: use more than one
      +  /////////////////////////////////////
      +  // stop after MAX_GEN generations
      +  eoGenContinue<Indi> genCont(MAX_GEN);
      +  // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement
      +  eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, STEADY_GEN);
      +  // stop when fitness reaches a target (here VEC_SIZE)
      +  eoFitContinue<Indi> fitCont(0);
      +  // do stop when one of the above says so
      +  eoCombinedContinue<Indi> continuator(genCont);
      +  continuator.add(steadyCont);
      +  continuator.add(fitCont);
      +
      +
      + + + + +
      + +  /////////////////////////////////////////
      +  // the algorithm
      +  ////////////////////////////////////////
      +  // Easy EA requires
      +  // selection, transformation, eval, replacement, and stopping criterion
      +  eoEasyEA<Indi> gga(continuator, eval, select, transform, replace);
      +  // Apply algo to pop - that's it!
      +  gga(pop);
      +  
      +
      +
      + + + + +
      + +  // Print (sorted) intial population
      +  pop.sort();
      +  cout << "FINAL Population\n" << pop << endl;
      +
      +
      + + +
      + +}
      +// A main that catches the exceptions
      +int main(int argc, char **argv)
      +{
      +#ifdef _MSC_VER
      +  //  rng.reseed(42);
      +      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
      +        flag |= _CRTDBG_LEAK_CHECK_DF;
      +      _CrtSetDbgFlag(flag);
      +//    _CrtSetBreakAlloc(100);
      +#endif
      +      try
      +      {
      +              main_function(argc, argv);
      +      }
      +      catch(exception& e)
      +      {
      +              cout << "Exception: " << e.what() << '\n';
      +      }
      +      return 1;
      +}
      +
      -
      Back to Lesson 2 - Tutorial main page - Algorithm-Based - Component-Based page - Programming hints - EO @@ -336,8 +362,8 @@ documentation
      Marc Schoenauer
      - -
      Last modified: Sun Nov -19 22:26:27 2000 +
      Last +modified: Sun Nov 19 22:26:27 2000 + diff --git a/eo/tutorial/html/FirstBitGA.html b/eo/tutorial/html/FirstBitGA.html index a7e5f1794..c0bb7467a 100644 --- a/eo/tutorial/html/FirstBitGA.html +++ b/eo/tutorial/html/FirstBitGA.html @@ -2,7 +2,7 @@ - + FirstBitGA.html @@ -15,7 +15,7 @@ documentation

      -FirstBitGA.html

      +Code for FirstBitGA Click on the figure to see the corresponding code.
      In the code, the colors are meaningfull
      The actual code is in boldface and the comment in normal face. @@ -44,12 +44,10 @@ istrstream -
      //----------------------------------------------------------------------------- -
      // Include the corresponding file -
      #include <ga.h>          -// bitstring representation & operators +
      #include <ga.h>
      +//-----------------------------------------------------------------------------
      // define your individuals -
      typedef eoBin<double> Indi;        +
      typedef eoBit<double> Indi;        // A bitstring with fitness double
      @@ -216,8 +214,8 @@ is needed
    - +
     // 1-point mutation for bitstring -
     eoBinCrossover<Indi> xover;
     // 1-point crossover for bitstring +
     eo1PtBitXover<Indi> xover;
    @@ -226,10 +224,10 @@ is needed

     // standard bit-flip mutation for bitstring -
     eoBinMutation<Indi>  mutation(P_MUT_PER_BIT); +
     eoBitMutation<Indi>  mutation(P_MUT_PER_BIT); - + - + - + @@ -230,15 +226,15 @@ mutation(EPSILON);
    eoArithmeticCrossover<Indi> xover; -
     ////////////////////////////////////// diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index 6b7575418..49652e6b9 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -34,9 +34,8 @@ Breeder - and Combined Ops
    //-----------------------------------------------------------------------------
    // standard includes
    #include <stdexcept>  // runtime_error  -
    #include <iostream>   -// -cout +
    #include <iostream>    +// cout
    #include <strstream>  // ostrstream, istrstream
    // the general include for eo @@ -46,10 +45,8 @@ istrstream - @@ -81,16 +78,12 @@ seed for random number generator
     const unsigned int T_SIZE = 3; // size for tournament selection
     const unsigned int VEC_SIZE = 8; -// -Number of object variables in genotypes +// Number of object variables in genotypes
     const unsigned int POP_SIZE = 20; -// -Size of population +// Size of population
     const unsigned int MAX_GEN = 500; -// -Maximum number of generation before STOP -
     const unsigned int MIN_GEN = 10; - +// Maximum number of generation before STOP +
     const unsigned int MIN_GEN = 10;  // Minimum number of generation before ...
     const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent @@ -105,17 +98,13 @@ SIGMA = 0.3;        // std dev. for normal mutation
     // some parameters for chosing among different operators -
     const double segmentRate = 0.5;   - +
     const double segmentRate = 0.5;    // relative weight for 1-pt Xover
     const double arithmeticRate = 0.5; -// -relative weight for 2-pt Xover +
    // relative weight for 2-pt Xover

     const double uniformMutRate = 0.5; -// -relative weight for bit-flip mutation -
     const double detMutRate = 0.5;    - +// relative weight for bit-flip mutation +
     const double detMutRate = 0.5;     // relative weight for one-bit mutation
     const double normalMutRate = 0.5;  // relative weight for normal mutation @@ -193,8 +182,8 @@ it! @@ -307,7 +296,8 @@ eval, select, transform, replace); it!
     cout << "\n              Here we go\n\n"; -
     gga(pop); +
     gga(pop); +
     
    //----------------------------------------------------------------------------- -
    // Include the corresponding file  -
    #include <es.h>          -// real-representation & operators  +
    #include <es.h>
    +//-----------------------------------------------------------------------------
    // define your individuals
    typedef eoReal<double> Indi; 
     // The robust tournament selection
     eoDetTournamentSelect<Indi> selectOne(T_SIZE); -
    // is now -encapsulated in a eoSelectPerc (entage) +
    // +is now encapsulated in a eoSelectPerc (entage)
     eoSelectPerc<Indi> select(selectOne);// by default rate==1
    diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html index b3687ec77..f06c178a9 100644 --- a/eo/tutorial/html/FirstRealGA.html +++ b/eo/tutorial/html/FirstRealGA.html @@ -2,9 +2,9 @@ - - ../FirstRealGA.html - + + FirstRealGA.html + Back to Lesson 1 - Tutorial @@ -15,294 +15,327 @@ documentation

    -../FirstRealGA.html

    -Click on the figure to see the corresponding code. -
    In the code, the colors are meaningfull -
    The actual code is in boldface and the comment in normal face. -
    -
    +Code for FirstRealGA +Click on the figure to see the corresponding code.
    +In the code, the colors are meaningfull
    +The actual code is in boldface and the comment in normal face. +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + - +
    //----------------------------------------------------------------------------- -
    // FirstRealGA.cpp -
    //----------------------------------------------------------------------------- -
    //* -
    // An instance of a VERY simple Real-coded -Genetic Algorithm -
    // -
    //----------------------------------------------------------------------------- -
    // standard includes -
    #include <stdexcept>  // runtime_error  -
    #include <iostream>    -// cout -
    #include <strstream>  // ostrstream, -istrstream -
    // the general include for eo -
    #include <eo>
    +//-----------------------------------------------------------------------------
    +// FirstRealGA.cpp
    +//-----------------------------------------------------------------------------
    +//*
    +// An instance of a VERY simple Real-coded Genetic Algorithm
    +//
    +//-----------------------------------------------------------------------------
    +// standard includes
    +#include <stdexcept>  // runtime_error
    +#include <iostream>    // cout
    +#include <strstream>  // ostrstream, istrstream
    +// the general include for eo
    +#include <eo>
    +
    +
    - - +
    - +
    //----------------------------------------------------------------------------- -
    // Include the corresponding file -
    #include <es.h>          -// real-representation & operators -
    // define your individuals -
    typedef eoReal<double> Indi;
    + +#include <es.h>
    +//-----------------------------------------------------------------------------
    +// define your individuals
    + typedef eoReal<double> Indi;
    +
    +
    - - +
    //----------------------------------------------------------------------------- -
    // a simple fitness function that computes -the euclidian norm of a real vector -
    //      @param _indi -A real-valued individual  -
    double real_value(const -Indi & _indi) -
    { -
     double sum = 0; -
     for (unsigned i = 0; i < _indi.size(); -i++) -
             -sum += _indi[i]*_indi[i]; -
     return (-sum);                      -// maximizing only -
    }
    + +//-----------------------------------------------------------------------------
    +// a simple fitness function that computes the euclidian norm of a real vector
    +//      @param _indi A real-valued individual
    + +double real_value(const Indi & _indi)
    +{
    +  double sum = 0;
    +  for (unsigned i = 0; i < _indi.size(); i++)
    +          sum += _indi[i]*_indi[i];
    +  return (-sum);                      // maximizing only
    +}
    +
    +
    - - +
    - +
    //----------------------------------------------------------------------------- -
    void main_function(int argc, char **argv) -
    {
    + +//-----------------------------------------------------------------------------
    +void main_function(int argc, char **argv)
    +{
    +
    +
    - - +
    - +
     // all parameters are hard-coded! -
     const unsigned int SEED = 42; // -seed for random number generator -
     const unsigned int VEC_SIZE = 8; -// Number of object variables in genotypes -
     const unsigned int POP_SIZE = 20; -// Size of population -
     const unsigned int T_SIZE = 3; // -size for tournament selection -
     const unsigned int MAX_GEN = 500; -// Maximum number of generation before STOP -
     const float CROSS_RATE = 0.8; // -Crossover rate -
     const double EPSILON = 0.01;  -// range for real uniform mutation -
     const float MUT_RATE = 0.5;    -// mutation rate
    + +  // all parameters are hard-coded!
    +  const unsigned int SEED = 42; // seed for random number generator
    +  const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes
    +  const unsigned int POP_SIZE = 20; // Size of population
    +  const unsigned int T_SIZE = 3; // size for tournament selection
    +  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
    +  const float CROSS_RATE = 0.8; // Crossover rate
    +  const double EPSILON = 0.01;  // range for real uniform mutation
    +  const float MUT_RATE = 0.5;    // mutation rate
    +
    +
    - - +
    - +
    ////////////////////////// -
     //  Random seed -
     ////////////////////////// -
     //reproducible random seed: -if you don't change SEED above,  -
     // you'll aways get the same -result, NOT a random run -
     rng.reseed(SEED);
    + + +  //////////////////////////
    +  //  Random seed
    +  //////////////////////////
    +  //reproducible random seed: if you don't change SEED above,
    +  // you'll aways get the same result, NOT a random run
    +  rng.reseed(SEED);
    +
    +
    - - +
    - +
     ///////////////////////////// -
     // Fitness function -
     //////////////////////////// -
     // Evaluation: from a plain -C++ fn to an EvalFunc Object -
     eoEvalFuncPtr<Indi> eval(  -real_value );
    + +  /////////////////////////////
    +  // Fitness function
    +  ////////////////////////////
    +  // Evaluation: from a plain C++ fn to an EvalFunc Object
    +  eoEvalFuncPtr<Indi> eval(  real_value );
    +
    +
    - - +
    - +
     //////////////////////////////// -
     // Initilisation of population -
     //////////////////////////////// -
     // declare the population -
     eoPop<Indi> pop; -
     // fill it! -
     for (unsigned int igeno=0; igeno<POP_SIZE; -igeno++) -
         { -
             -Indi v;                  -// void individual, to be filled -
             -for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) -
                 -{ -
                     -double r = 2*rng.uniform() - 1; // new value, random in [-1,1) -
                     -v.push_back(r);            -// append that random value to v -
                 -} -
             -eval(v);                                  -// evaluate it -
             -pop.push_back(v);                -// and put it in the population -
         }
    + +  ////////////////////////////////
    +  // Initilisation of population
    +  ////////////////////////////////
    +  // declare the population
    +  eoPop<Indi> pop;
    +  // fill it!
    +  for (unsigned int igeno=0; igeno<POP_SIZE; igeno++)
    +      {
    +          Indi v;                  // void individual, to be filled
    +          for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
    +              {
    +                  double r = 2*rng.uniform() - 1; // new value, random in [-1,1)
    +                  v.push_back(r);            // append that random value to v
    +              }
    +          eval(v);                                  // evaluate it
    +          pop.push_back(v);                // and put it in the population
    +      }
    +
    +
    - - +
    - +
     // sort pop before printing -it! -
     pop.sort(); -
     // Print (sorted) intial population -(raw printout) -
     cout << "Initial Population" -<< endl; -
     cout << pop;
    + +  // sort pop before printing it!
    +  pop.sort();
    +  // Print (sorted) intial population (raw printout)
    +  cout << "Initial Population" << endl;
    +  cout << pop;
    +
    +
    - - +
    - +
     ///////////////////////////////////// -
     // selection and replacement -
     ////////////////////////////////////
    + +  /////////////////////////////////////
    +  // selection and replacement
    +  ////////////////////////////////////
    +
    +
    - - +
    - +
     // The robust tournament selection -
     eoDetTournamentSelect<Indi> select(T_SIZE);            -// T_SIZE in [2,POP_SIZE]
    + +  // The robust tournament selection
    +  eoDetTournamentSelect<Indi> select(T_SIZE);            // T_SIZE in [2,POP_SIZE]
    +
    +
    - - +
    - +
     // eoSGA uses generational replacement -by default -
     // so no replacement procedure -has to be given
    + +  // eoSGA uses generational replacement by default
    +  // so no replacement procedure has to be given
    +
    +
    - - +
    - +
    + + +
    - - +
    - +
     ////////////////////////////////////// -
     // termination condition -
     ///////////////////////////////////// -
     // stop after MAX_GEN generations -
     eoGenContinue<Indi> continuator(MAX_GEN); -
     
    + +  //////////////////////////////////////
    +  // termination condition
    +  /////////////////////////////////////
    +  // stop after MAX_GEN generations
    +  eoGenContinue<Indi> continuator(MAX_GEN);
    +  
    +
    +
    - - +
    - +
     ////////////////////////////////////// -
     // The variation operators -
     //////////////////////////////////////
    + +  //////////////////////////////////////
    +  // The variation operators
    +  //////////////////////////////////////
    +
    +
    - - +
    - +
     // offspring(i) uniformly chosen -in [parent(i)-epsilon, parent(i)+epsilon] -
     eoUniformMutation<Indi>  -mutation(EPSILON); 
    + +  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
    +  eoUniformMutation<Indi>  mutation(EPSILON);
    +
    +
    - - +
    - +
     // offspring(i) is a linear -combination of parent(i) -
     eoArithmeticCrossover<Indi> xover;
    + +  // offspring(i) is a linear combination of parent(i)
    +  eoArithmeticCrossover<Indi> xover;
    +
    +
    - - +
    - +
     ///////////////////////////////////////// -
     // the algorithm -
     //////////////////////////////////////// -
     // standard Generational GA -requires -
     // selection, evaluation, crossover -and mutation, stopping criterion -

     eoSGA<Indi> gga(select, xover, -CROSS_RATE, mutation, MUT_RATE,  -
                                       -eval, continuator); -
     // Apply algo to pop - that's -it! -
     gga(pop); -
     

    + +  /////////////////////////////////////////
    +  // the algorithm
    +  ////////////////////////////////////////
    +  // standard Generational GA requires
    +  // selection, evaluation, crossover and mutation, stopping criterion
    +
    +  eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
    +                                    eval, continuator);
    +  // Apply algo to pop - that's it!
    +  gga(pop);
    +  
    +
    +
    - - +
    - +
     // Print (sorted) intial population -
     pop.sort(); -
     cout << "FINAL Population\n" -<< pop << endl;
    + +  // Print (sorted) intial population
    +  pop.sort();
    +  cout << "FINAL Population\n" << pop << endl;
    +
    +
    - - +
    - +
    } -
    // A main that catches the exceptions -
    int main(int argc, char **argv) -
    { -
    #ifdef _MSC_VER -
     //  rng.reseed(42); -
         int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); -
           flag -|= _CRTDBG_LEAK_CHECK_DF; -
         _CrtSetDbgFlag(flag); -
    //    _CrtSetBreakAlloc(100); -
    #endif -
         try -
         { -
                 -main_function(argc, argv); -
         } -
         catch(exception& -e) -
         { -
                 -cout << "Exception: " << e.what() << '\n'; -
         } -
         return 1; -
    }
    + +}
    +// A main that catches the exceptions
    +int main(int argc, char **argv)
    +{
    +#ifdef _MSC_VER
    +  //  rng.reseed(42);
    +      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
    +        flag |= _CRTDBG_LEAK_CHECK_DF;
    +      _CrtSetDbgFlag(flag);
    +//    _CrtSetBreakAlloc(100);
    +#endif
    +      try
    +      {
    +              main_function(argc, argv);
    +      }
    +      catch(exception& e)
    +      {
    +              cout << "Exception: " << e.what() << '\n';
    +      }
    +      return 1;
    +}
    +
    -
    Back to Lesson 1 - Tutorial main page - Algorithm-Based - Component-Based page - Programming hints - EO @@ -310,8 +343,8 @@ documentation
    Marc Schoenauer
    - -
    Last modified: Sun Nov -19 08:31:29 2000 +
    Last +modified: Sun Nov 19 08:31:29 2000 + diff --git a/eo/tutorial/html/Firstmerge.html b/eo/tutorial/html/Firstmerge.html index d71236b3a..61da23f44 100644 --- a/eo/tutorial/html/Firstmerge.html +++ b/eo/tutorial/html/Firstmerge.html @@ -2,7 +2,7 @@ - + Differences @@ -57,15 +57,11 @@ the parameter for the mutation).
    #include -<es.h> -
    typedef eoReal<double> -Indi;
    #include <es.h>
    +typedef eoReal<double> Indi;
    #include -<ga.h> -
    typedef eoBin<double> -Indi;
    #include <ga.h>
    +typedef eoBit<double> Indi;
    eoBinMutation<Indi>  +eoBitMutation<Indi>  mutation(P_MUT_PER_BIT); -
    eoBinCrossover<Indi> +
    eo1PtBitXover<Indi> xover;
    -
    eoSGA<Indi> +eoSGA<Indi> gga(select, xover, CROSS_RATE,
                    mutation, MUT_RATE, eval, continuator); @@ -255,11 +251,10 @@ code removed]

    }
    -
    eoSGA<Indi> +eoSGA<Indi> gga(select, xover, CROSS_RATE,
                    -mutation, MUT_RATE, -
    eval, continuator); +mutation, MUT_RATE, eval, continuator);

    gga(pop);
    pop.sort();
    cout << diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index dc56d4917..914f8ec6b 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -63,11 +63,8 @@ the number of ones of a bitstring +
    typedef eoBit<double> Indi;
    //----------------------------------------------------------------------------- -
    // Include the corresponding file -
    #include <ga.h>          -// bitstring representation & operators
    // define your genotype and fitness types -
    typedef eoBin<double> Indi;
    @@ -314,6 +311,7 @@ of initializatio of the population
     // The robust tournament selection
     eoDetTournamentSelect<Indi> selectOne(tSize);       + // tSize in [2,POPSIZE]
     // is now encapsulated in a eoSelectPerc (entage) @@ -346,11 +344,11 @@ replace; 
    +of initialization of the population
     // 1-point crossover for bitstring -
     eoBinCrossover<Indi> xover1; +
     eo1PtBitXover<Indi> xover1;
     // uniform crossover for bitstring -
     eoBinUxOver<Indi> xoverU; +
     eoUBitXover<Indi> xoverU;
     // 2-pots xover -
     eoBinNxOver<Indi> xover2(2); +
     eoNPtsBitXover<Indi> xover2(2);
     // Combine them with relative rates
     eoPropCombinedQuadOp<Indi> xover(xover1, @@ -365,7 +363,7 @@ true);
     // standard bit-flip mutation for bitstring -
     eoBinMutation<Indi>  mutationBitFlip(pMutPerBit); +
     eoBitMutation<Indi>  mutationBitFlip(pMutPerBit);
     // mutate exactly 1 bit per individual
     eoDetBitFlip<Indi> mutationOneBit;  diff --git a/eo/tutorial/html/eoCheckPoint.html b/eo/tutorial/html/eoCheckPoint.html new file mode 100644 index 000000000..aaf8cb486 --- /dev/null +++ b/eo/tutorial/html/eoCheckPoint.html @@ -0,0 +1,124 @@ + + + + + + Variation Operators + + +General: Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
    +
    +
    Local: Introduction +- Continuators - Combined +continuators - Checkpoints - Statistics +- Monitors - Updaters +
    +
    +
    +

    +CheckPointing

    +What +is Checkpointing about? +
    Evolutionary Algorithms are ticked +

    EO classes described in this page: +

      +
    • +Base classes: eoCheckPoint, eoContinue, +eoStat, eoSortedStat, eoMonitor, eoUpdater
    • + +
    • +Derived classes: eoCombinedContinue,
    • + +
    • +Related classes: eoGnuPlot
    • +
    + +
      +

    +


    Continuators: +
      +

    Continuators are functors that compute stopping critera. They receive +a population and return a boolean value which is set to false only when +some stopping vriterion is met. All algorithms in EO have a loop that goes +while(continuator(pop) +{ ... } which means that the algorithm stops only when +the continuator returns false. +

    Interface: +
      +

    Using a continuator: +
    You can find an first example of using a continuator in the code for +FirstBitEA in Lesson2. +
    If you want to find out how it is used inside an algorithm, go and +see for instance in eoSGA, the simplest EA within EO. +

    Writing a +continuator: +
    There are only two things to modify in the template +class definitions provided (apart from the name of the class you are +creating!) +

      +
    • +The constructor, where you pass to the object +any useful parameter (see the private data at end of class definition).
    • + +
    • +The operator() method, which performs the +actual test on the population.
    • +
    +Don't forget to return false +when the stopping criterion is met! +

    +


    Combining +continuators: +

    +


    CheckPoints: +

    Interface: +

    Using a checkpoint: An eoCheckPoint +being an eoContinue, its usage is exactly the same. However, an eoCheckPoint +will actually do many more things than an eoContinue before returning its +boolean result as an eoContinue. +

    Writing a +checkpoint: +
    This is something you should never have to do. However, should you +fell you have to do it, please do - and send us both the reasons that lead +you to that (wqhat is it you couldn't do with existing eoCheckPoint), and +the resulting code, of course. +
    +


    Statistics: +

    Interface: +

    Using statistics: +

    Writing a statitic: +
    +


    Monitors: +

    Interface: +

    Using monitors: +

    Writing a monitor: +

    +


    Updater: +

    Interface: +

    Using updaters: +

    Writing an updater: +
      +

    +


    Local: Introduction +- Continuators - Combined +continuators - Checkpoints - Statistics +- Monitors - Updaters +
    +
    General: Algorithm-Based +- Component-Based - Programming +hints -EO +documentation +
    +
    +
    +Marc Schoenauer
    + +
    Last +modified: Fri Dec. 8 2000  +
      + + diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 468d4191b..35ae194c1 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -159,12 +159,9 @@ paradigm).

    Note: some procedures for selecting a single individual require some pre-processing of the whole population that takes place before any selection, and will be repeated identically -for every individual. The encapsulation of an eoSelectOne -into an eoSelectMany allows to call such technical -processing only once through a call to the setup method of class eoSelectOne. -This method does nothing by default, but is implemented for instance in -eoProportionalSelect (the roulette wheel-selection) to compute only once -the total of the fitnesses of all individuals in the population. +for every individual. The encapsulation of an  into an  allows +to call such technical processing only once through the use of method setup +of class . This method does nothing by default, but is mandatory



    eoSelect: Other @@ -244,8 +241,6 @@ and you can probably guess what each of them actually does :-)
     

      -
      -
     

    Available instances of eoMergeReduce replacement include

      @@ -315,9 +310,7 @@ size. Available instances of eoSurviveAndDieReplace are limited todayto the eoDeterministicSaDReplacement, the  that uses a deterministic MergeReduce. -
        -

        -

      Note: The basic use (and initial +


      Note: The basic use (and initial motivation) for eoSurviveAndDie takes 2 arguments, an eoMergeReduce and a number of surviving parents. It starts by copying the best parents to the new populations, then merges diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 9da1a4482..4e98cade5 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 1 @@ -94,30 +94,34 @@ tour below. You might prefer to go directly to the exercise all C-like code, the file starts with include directives (Bit - Real). Apart from standard includes, the specific file to include is
      eo: -this is a file that contains the list of the most important EO files. +this is a file that contains the list of the all important representation-independent +EO files.

       

    • Representation: -you need to declare the type of individuals you will be handling. First, -include some header files where these are defined: ga.h -for bitstring, es.h -for real-valued genotypes.
      -Then a
      typedef -directive will allow one to handle the abstract Indi -all around in the main code. Remember that all evolution-related objects -you will need are templatized w.r.t. the type of individuals.
    • +you then have to declare the type of individuals you will be handling. +All evolution-related objects you will need are templatized w.r.t. the +type of individuals.
      -Now go back to the inheritance +Now go back to the inheritance diagram of class eoFunctorBase, and guess the interface for all functors!

      Note: for @@ -151,7 +153,7 @@ obvious simplicity reasons, we very often omit the reference to the

      • -eoMonOp's +eoMonOp's are eoUF's that take as argument an EOT & and return void
      • @@ -159,7 +161,7 @@ and return void it actually means
        • -eoMonOp's +eoMonOp's are eoUF's, their operator() method takes as argument an EOT & @@ -228,8 +230,8 @@ and the data manipulation listed above for vectors can be applied to list.This simple container allows you to hold two data types together. It is very handy for temporary data handling. Assuming p is a pair<AtomType1, AtomType2>, -p.first() -and p.second()  +p.first +and p.second  refer to the encapsulated data, of respective types AtomType1 and AtomType2 @@ -307,7 +309,7 @@ numbers who look random (w.r.t. some statistical criteria). to ensure reproducibility of the results across different platforms, EO has its own RNG, the ``Mersenne Twister'' random number generator MT19937 (thanks to Takuji -Nishimura, see eoRNG.h +Nishimura, see eoRNG.h comments).

          Though you can define and use as many RNGs as you wish in EO, the library also provides you with a global RNG termed eo::rng. @@ -322,22 +324,22 @@ purposes

        • random numbers are computed starting from a seed - starting from the same seed will lead to the same series of pseudo-random numbers, and hence to the same results of the algorithms. All examples in this tutorial will -use the RNG seeding procedure, see e.g. in Lesson1. +use the RNG seeding procedure, see e.g. in Lesson1.
        • to simulate "true" random runs, you can just seed the RNG with a machine-clock -related number, e.g. calling time(0), as done for instance in Lesson3 +related number, e.g. calling time(0), as done for instance in Lesson3 (and after).
        As RNGs produce, by definition, integers that are uniformly distributed between 0 and some maximal number, EO provides you with random numbers following different probability distribution -(e.g. floating point following normal -distribution). See the complete +(e.g. floating point following normal +distribution). See the complete list of RNG primitives. -

        EO also provides random_generators +

        EO also provides random_generators that can be used in STL call to generate series of random numbers, as in -eoPop +eoPop initializers.

        Note: the eo:: prefix indicates that it is in a separate C++ namespace, to avoid collision @@ -370,13 +372,7 @@ myfunction(unsigned _popSizeclass eoMyClass +


        class eoMyClass
        {
        public:
          eoMyClass(unsigned _popSize):popSize(_popSize){...} @@ -392,8 +388,8 @@ above). The name of the EO template should be EOT. This allows quick understanding of the inheritance diagrams for functors. and immediate perception of the arguments and return types of the functors oeprator() -method (as in eoMonOp -or  eoBinOp). +method (as in eoMonOp +or  eoBinOp).
         

      • @@ -407,9 +403,11 @@ Blabla
      • numbers - EO programming style

        -
        General: Tutorial -main page - Algorithm-Based - Component-Based -- Programming hints - EO +
        General:
        Tutorial +main page - Algorithm-Based +- Component-Based +- Programming +hints - EO documentation

        diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index ca859acf1..bb185886b 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -157,8 +157,8 @@ rather than when you have something urgent to code :-)
        Before you start -

        You should of course have downloaded and installed the developement version of the whole EO -library. Be careful that the tutorial examples will not work with earlier versions of EO, such as the ones that you can find on the official site. +

        You should of course have downloaded and installed the whole EO +library (how did you get this file if not???).
        So we'll assume that you are now in the Tutorial directory, and that your prompt looks something like

        (myname@myhost) EOdir/Tutorial % From 3b2125e060bf036c720bdfd1141da8383f8cbaac Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:10:25 +0000 Subject: [PATCH 0445/2134] Left-out from the big change of general op interface! --- eo/src/obsolete/eoEvolutionStrategy.h | 101 ++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 eo/src/obsolete/eoEvolutionStrategy.h diff --git a/eo/src/obsolete/eoEvolutionStrategy.h b/eo/src/obsolete/eoEvolutionStrategy.h new file mode 100644 index 000000000..b863ae8a4 --- /dev/null +++ b/eo/src/obsolete/eoEvolutionStrategy.h @@ -0,0 +1,101 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvolutionStrategy.h +// (c) Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEvolutionStrategy_h +#define _eoEvolutionStrategy_h + +//----------------------------------------------------------------------------- + +#include +#include +/** eoEvolutionStrategy: +*/ + +template +class eoEvolutionStrategy: public eoAlgo +{ + public: + struct plus_strategy{}; + struct comma_strategy{}; + + eoEvolutionStrategy( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + comma_strategy) + : selectPerc(randomSelect, _lambdaRate), + transform(_opSel), + easyEA(_continuator, _eval, selectPerc, transform, noElitism, truncate) + {} + + eoEvolutionStrategy( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + plus_strategy) + : selectPerc(randomSelect, _lambdaRate), + transform(_opSel), + easyEA(_continuator, _eval, selectPerc, transform, plus, truncate) + {} + + + /// Apply a few generation of evolution to the population. + virtual void operator()(eoPop& _pop) + { + easyEA(_pop); + } + + private: + + eoPlus plus; + eoNoElitism noElitism; + eoTruncate truncate; + eoRandomSelect randomSelect; + eoSelectPerc selectPerc; + eoInplaceTransform2 transform; + + /// easyEA is contained rather than a base because of member initialization order! + eoEasyEA easyEA; +}; + +template +eoEvolutionStrategy make_es(eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + bool _comma) + +{ + if (_comma) + return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::comma_strategy()); + //else + return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::plus_strategy()); +} + +//----------------------------------------------------------------------------- + +#endif eoSelectTransformReduce_h + From 09b669ed466517e8480feec0b82062a4046ef878 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:21:04 +0000 Subject: [PATCH 0446/2134] Added the GnuPlotSnapshotMonitor, the eoScalarFitnessStat and eoFDCStat in checkpointing --- eo/src/utils/Makefile.am | 2 +- eo/src/utils/checkpointing | 4 ++++ eo/tutorial/Lesson3/exercise3.1.cpp | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 17f4510b1..c7843abef 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,7 +10,7 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFileMonitor.h eoGnuplot1DMonitor.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h selectors.h +libeoinc_HEADERS = compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h selectors.h diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 698f4c11f..d4bf89aec 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -7,3 +7,7 @@ #include #include #include +#include +#include +#include +#include diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index c8c3d2bd5..bc8003844 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -14,10 +14,6 @@ // the general include for eo #include -#include -#include -#include -#include // EVAL #include "binary_value.h" From d347fa9da27e02f51b8696d78e501e295c9e6a7d Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:25:25 +0000 Subject: [PATCH 0447/2134] Because it has not extension, I had forgotten to update the eo file itself! Now reflects the change of eoGenOp interface and the changes of names in ga --- eo/src/eo | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index b3c5149dc..4d5fe9b98 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -81,7 +81,7 @@ // Selection // the eoSelectOne's -#include +#include // also contains the eoSequentialSelect #include #include #include @@ -105,9 +105,6 @@ // Variation #include -#include -#include -#include // a simple transformer #include @@ -115,12 +112,7 @@ // Algorithms #include #include -#include -#include - -// Inserters -#include -#include +// #include removed for a while - until eoGenOp is done // Utils #include From 890218e270a4d31b0a59864cabed1e5a452e2c7c Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:28:33 +0000 Subject: [PATCH 0448/2134] Removed eoEvolutionStrategy because it was based on eoGeneralOp old interface --- eo/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 0fc3b2887..051db2f9f 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,4 +11,4 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoEvolutionStrategy.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h es.h ga.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h es.h ga.h From 97486fba28bf355084aa7afe8fa096e06e821e18 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:34:04 +0000 Subject: [PATCH 0449/2134] Modified the Makefile of Lesson? to allow make all to also make the exercises It need to be modified anyway into Makefile.am stuff --- eo/tutorial/Lesson1/Makefile | 8 +++++--- eo/tutorial/Lesson2/Makefile | 8 +++++--- eo/tutorial/Lesson3/Makefile | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile index 396873dea..e6b995e8b 100644 --- a/eo/tutorial/Lesson1/Makefile +++ b/eo/tutorial/Lesson1/Makefile @@ -1,12 +1,14 @@ -.cpp: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp firstGA = FirstRealGA FirstBitGA -ALL = $(firstGA) exercise3 +ALL = $(firstGA) exercise1.3 lesson1 : $(firstGA) +all : $(ALL) + clean : @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile index 75b3a2ec4..f25456af7 100644 --- a/eo/tutorial/Lesson2/Makefile +++ b/eo/tutorial/Lesson2/Makefile @@ -1,12 +1,14 @@ -.cpp: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp firstEA = FirstRealEA FirstBitEA -ALL = $(firstEA) exercise1 exercise2 exercise3 +ALL = $(firstEA) exercise2.3 lesson2 : $(firstEA) +all : $(ALL) + clean : @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile index c4d3ec8e2..16201978a 100644 --- a/eo/tutorial/Lesson3/Makefile +++ b/eo/tutorial/Lesson3/Makefile @@ -1,12 +1,14 @@ -.cpp: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; g++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp secondEA = SecondBitEA -ALL = $(secondEA) exercise1 exercise2 exercise3 +ALL = $(secondEA) exercise3.1 lesson3 : $(secondEA) +all : $(ALL) + clean : @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ From 018db6689a1604502555033ba92b0048f834932f Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:43:06 +0000 Subject: [PATCH 0450/2134] The big GeneraoOp interface change - in test dir --- eo/test/Makefile.am | 19 ++++++++++++++----- eo/test/t-eoExternalEO.cpp | 2 +- eo/test/t-eoStateAndParser.cpp | 4 ++-- eo/test/t-eoSymreg.cpp | 23 +++++++++++++---------- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index d69a6082c..3f00251f7 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,14 +13,16 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### -noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect +noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp +# removing temporarily t-eoESFull +# noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect ############################################################################### -t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -t_eoESFull_DEPENDENCIES = $(DEPS) -t_eoESFull_LDFLAGS = -lm -t_eoESFull_LDADD = $(LDADDS) +# t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +# t_eoESFull_DEPENDENCIES = $(DEPS) +# t_eoESFull_LDFLAGS = -lm +# t_eoESFull_LDADD = $(LDADDS) ############################################################################### @@ -84,3 +86,10 @@ t_eo_LDFLAGS = -lm t_eo_LDADD = $(LDADDS) ############################################################################### + +t_eoGenOp_SOURCES = t-eoGenOp.cpp +t_eoGenOp_DEPENDENCIES = $(DEPS) +t_eoGenOp_LDFLAGS = -lm +t_eoGenOp_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index c880ba215..f9bb69b42 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -112,7 +112,7 @@ int main() eoExternalInit init(RandomStruct); eoExternalMonOp mutate(UserDefMutate); eoExternalBinOp cross1(UserDefBinCrossover); - eoExternalQuadraticOp cross2(UserDefQuadCrossover); + eoExternalQuadOp cross2(UserDefQuadCrossover); // eoExternalEvalFunc eval(UserDefEvalFunc); diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index f1548dfce..420da2343 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -15,7 +15,7 @@ // general #include // Random number generators -#include +#include #include #include @@ -35,7 +35,7 @@ struct Dummy : public EO int the_main(int argc, char **argv) { // ok, we have a command line parser and a state - typedef eoBin Chrom; + typedef eoBit Chrom; eoParser parser(argc, argv); diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 21a0d94db..ca76e7726 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -211,8 +211,8 @@ int main() typedef eoParseTree EoType; typedef eoPop Pop; - const int MaxSize = 75; - const int nGenerations = 50; + const int MaxSize = 100; + const int nGenerations = 500; // Initializor sequence, contains the allowable nodes vector init(init_sequence, init_sequence + 5); @@ -223,21 +223,24 @@ int main() // Root Mean Squared Error Measure RMS eval; - Pop pop(500, initializer); + Pop pop(5000, initializer); apply(eval, pop); eoSubtreeXOver xover(MaxSize); eoBranchMutation mutation(initializer, MaxSize); - eoSequentialGOpSel seqSel; + // The operators are encapsulated into an eoTRansform object, + // that performs sequentially crossover and mutation + eoSGATransform transform(xover, 0.75, mutation, 0.25); - seqSel.addOp(mutation, 0.25); - seqSel.addOp(xover, 0.75); + // The robust tournament selection + eoDetTournamentSelect selectOne(2); // tSize in [2,POPSIZE] + // is now encapsulated in a eoSelectMany: 2 at a time -> SteadyState + eoSelectMany select(selectOne,2, eo_is_an_integer); - eoDetTournamentSelect selector(5); - - eoDetTournamentInserter inserter(eval, 5); + // and the Steady-State replacement + eoSSGAWorseReplacement replace; // Terminators eoGenContinue term(nGenerations); @@ -256,7 +259,7 @@ int main() monitor.add(best); // GP generation - eoSteadyStateEA gp(seqSel, selector, inserter, checkPoint); + eoEasyEA gp(checkPoint, eval, select, transform, replace); cout << "Initialization done" << endl; From a55603631594efd0ee7a1abbdef2a94df4abdc94 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:46:12 +0000 Subject: [PATCH 0451/2134] Change in Makefile - but again it should be replaced with clean Makefile.am --- eo/tutorial/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index fcdd0e0cb..5912def5e 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -1,5 +1,8 @@ SUBDIRS = Lesson1 Lesson2 Lesson3 +all: + for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done + lesson1 : cd Lesson1; make @@ -9,8 +12,5 @@ lesson2 : lesson3 : cd Lesson3; make -all: - for i in $(SUBDIRS); do pushd $$i && $(MAKE); popd; done - clean: for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done From 0c1036617e0dee870af3ba8c047ac14d59c9c400 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 05:52:44 +0000 Subject: [PATCH 0452/2134] Big change in eoGeneralOp interface: left out! --- eo/app/gprop/gprop.h | 2 +- eo/app/mastermind/mastermind.h | 2 +- eo/test/t-eoCheckpointing.cpp | 4 ++-- eo/test/t-eobin.cpp | 18 +++++++++--------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index ef1ab73a2..6f630207d 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -121,7 +121,7 @@ public: // eoChromXover //----------------------------------------------------------------------------- -class eoChromXover: public eoQuadraticOp +class eoChromXover: public eoQuadOp { public: void operator()(Chrom& chrom1, Chrom& chrom2) diff --git a/eo/app/mastermind/mastermind.h b/eo/app/mastermind/mastermind.h index 14107884a..c23d921d3 100644 --- a/eo/app/mastermind/mastermind.h +++ b/eo/app/mastermind/mastermind.h @@ -179,7 +179,7 @@ class eoChromMutation: public eoMonOp // eoChromXover //----------------------------------------------------------------------------- -class eoChromXover: public eoQuadraticOp +class eoChromXover: public eoQuadOp { public: void operator()(Chrom& chrom1, Chrom& chrom2) diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 282bbb0b5..6d12fcf26 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -15,7 +15,7 @@ // general #include // Random number generators -#include +#include #include #include #include @@ -41,7 +41,7 @@ public : int the_main(int argc, char **argv) { // ok, we have a command line parser and a state - typedef eoBin Chrom; + typedef eoBit Chrom; eoParser parser(argc, argv); diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index feee305d3..9e91c88c9 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -31,7 +31,7 @@ //----------------------------------------------------------------------------- -typedef eoBin Chrom; +typedef eoBit Chrom; //----------------------------------------------------------------------------- @@ -74,23 +74,23 @@ void main_function() random(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinRandom ............ " << chrom << endl; - eoBinBitFlip bitflip; + eoOneBitFlip bitflip; bitflip(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBitFlip .............. " << chrom << endl; - eoBinMutation mutation(0.5); + eoBitMutation mutation(0.5); mutation(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinMutation(0.5) ..... " << chrom << endl; - eoBinInversion inversion; + eoBitInversion inversion; inversion(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinInversion ......... " << chrom << endl; - eoBinNext next; + eoBitNext next; next(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinNext .............. " << chrom << endl; - eoBinPrev prev; + eoBitPrev prev; prev(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinPrev .............. " << chrom << endl; @@ -100,7 +100,7 @@ void main_function() << endl << "eoBinOp's aplied to ... " << chrom << " " << chrom2 << endl; - eoBinCrossover xover; + eo1PtBitXover xover; fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); xover(chrom, chrom2); @@ -109,7 +109,7 @@ void main_function() for (i = 1; i < SIZE; i++) { - eoBinNxOver nxover(i); + eoNPtsBitXover nxover(i); fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); nxover(chrom, chrom2); @@ -121,7 +121,7 @@ void main_function() for (i = 1; i < SIZE / 2; i++) for (j = 1; j < SIZE / 2; j++) { - eoBinGxOver gxover(i, j); + eoBitGxOver gxover(i, j); fill(chrom.begin(), chrom.end(), false); fill(chrom2.begin(), chrom2.end(), true); gxover(chrom, chrom2); From 5bf1d83f6a823740185748327831704b3787b540 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 08:21:35 +0000 Subject: [PATCH 0453/2134] Changed the first paragraph, added warning that it should be used on-line only --- eo/tutorial/html/eoTutorial.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index bb185886b..74c0c1293 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,13 +17,13 @@ and to

        EO Tutorial

        -
        Version 0.92 - Jan. 5 2001
        +
        Version 0.93 - Feb. 9 2001
        -

        The short term idea of this tutorial is to help you build -your own Evolutionary Algorithms using EO - while the long term -idea is that you will be able to contribute to EO, and ultimately write -our -EAs :-) +

        Welcome to EO tutorial/on-line documentation. +

        Please note that this tutorial is not supposed +to be printed and read off-line, as it takes full advantage +of hyper-text links between the different parts, and with the technical +documentation.


        About this tutorial

        From b893445d31658e5d1b7891b44ba6ab174561b9f4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 9 Feb 2001 08:32:47 +0000 Subject: [PATCH 0454/2134] Added a comment before eoPopulator class so it is documented! --- eo/src/eoPopulator.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index eb4814608..a16941f84 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -29,6 +29,12 @@ #include #include +/** eoPopulator is a helper class for general operators eoGenOp + It is an eoPop but also behaves like an eoPop::iterator + as far as operator* and operator++ are concerned + + See eoGenOp and eoOpContainer +*/ template class eoPopulator : public eoPop { From d58511132c25d2b32b8f510526dd049212255b87 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 9 Feb 2001 11:52:55 +0000 Subject: [PATCH 0455/2134] Removed the -O2 flag from the makefile in the test directory. Builds should go faster now. --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 3f00251f7..f8c3d7846 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -10,7 +10,7 @@ DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a - +CXXFLAGS = -g ############################################################################### noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp From 3c2df139bd2a31e02399b99e37961ef1bfff68f8 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 9 Feb 2001 16:52:06 +0000 Subject: [PATCH 0456/2134] Minor bugs for Win quashed; fixed Win project files --- eo/src/utils/checkpointing | 27 +- eo/src/utils/eoParser.cpp | 672 ++++++++++++++++++------------------- eo/win/eo.dsp | 360 ++++++++++---------- eo/win/eo.dsw | 31 +- eo/win/esfull.dsp | 282 ++++++++-------- 5 files changed, 677 insertions(+), 695 deletions(-) diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index d4bf89aec..c8fe220fc 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -1,13 +1,14 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include +#include +#endif +#include +#include +#include +#include diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index a069ff072..ffbcffc99 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -1,336 +1,336 @@ -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include -#include - -#include - -#include - -using namespace std; - -void eoWarning(std::string str) -{ - cout << str << '\n'; -} - -std::ostream& printSectionHeader(std::ostream& os, std::string section) -{ - if (section == "") - section = "General"; - - os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; - return os; -} - -eoParameterLoader::~eoParameterLoader() -{ - for (unsigned i = 0; i < ownedParams.size(); ++i) - { - delete ownedParams[i]; - } -} - - -eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : - programName( _argv[0]), - programDescription( _programDescription), - needHelp(false, "help", "Prints this message", 'h') -{ - // need to process the param file first - // if we want command-line to have highest priority - - for (int i = 1; i < _argc; ++i) - { - if (_argv[i][0] == '@') - { // read response file - char *pts = _argv[i]+1; // yes a char*, sorry :-) - - ifstream ifs (pts); - - ifs.peek(); // check if it exists - - if (!ifs) - { - string msg = (string)("Could not open response file: ") + pts; - throw runtime_error(msg); - } - - // read - will be overwritten by command-line - readFrom(ifs); - break; // stop reading command line args for '@' - } - } - - // now read arguments on command-line - strstream stream; - - for (int i = 1; i < _argc; ++i) - { - stream << _argv[i] << '\n'; - } - - readFrom(stream); - - processParam(needHelp); -} - -void eoParser::processParam(eoParam& param, std::string section) -{ - doRegisterParam(param); // plainly register it - params.insert(make_pair(section, ¶m)); -} - -void eoParser::doRegisterParam(eoParam& param) const -{ - if (param.required() && !isItThere(param)) - { - string msg = "Required parameter: " + param.longName() + " missing"; - messages.push_back(msg); - } - - pair value = getValue(param); - - if (value.first) - { - param.setValue(value.second); - } -} - -pair eoParser::getValue(eoParam& _param) const -{ - pair result(false, ""); - - if (_param.shortName() != 0) - { - map::const_iterator it = shortNameMap.find(_param.shortName()); - if (it != shortNameMap.end()) - { - result.second = it->second; - result.first = true; - return result; - } - } - - map::const_iterator it = longNameMap.find(_param.longName()); - - if (it != longNameMap.end()) - { - result.second = it->second; - result.first = true; - return result; - } - // else (TODO: check environment, just long names) - - return result; -} - -void eoParser::updateParameters() const -{ - typedef MultiMapType::const_iterator It; - - for (It p = params.begin(); p != params.end(); ++p) - { - doRegisterParam(*p->second); - } -} - -void eoParser::readFrom(istream& is) -{ - string str; - - while (is >> str) - { - if (str[0] == '#') - { // skip the rest of the line - string tempStr; - getline(is, tempStr); - } - if (str[0] == '-') - { - if (str.size() < 2) - { - eoWarning("Missing parameter"); - needHelp.value() = true; - return; - } - - if (str[1] == '-') // two consecutive dashes - { - string::iterator equalLocation = find(str.begin() + 2, str.end(), '='); - string value; - - if (equalLocation == str.end()) - { // TODO: it should be the next string - value = ""; - } - else - { - value = string(equalLocation + 1, str.end()); - } - - string name(str.begin() + 2, equalLocation); - longNameMap[name] = value; - - } - else // it should be a char - { - string value(str.begin() + 3, str.end()); - shortNameMap[str[1]] = value; - } - } - } - - updateParameters(); -} - -void eoParser::printOn(ostream& os) const -{ - typedef MultiMapType::const_iterator It; - - It p = params.begin(); - - std::string section = p->first; - - printSectionHeader(os, section); - //print every param with its value - for (; p != params.end(); ++p) - { - std::string newSection = p->first; - - if (newSection != section) - { - section = newSection; - printSectionHeader(os, section); - } - - eoParam* param = p->second; - - string str = "--" + param->longName() + "=" + param->getValue(); - - os.setf(ios_base::left, ios_base::adjustfield); - os << setw(40) << str; - - os << setw(0) << " # "; - if (param->shortName()) - os << '-' << param->shortName() << " : "; - os << param->description(); - - if (param->required()) - { - os << " REQUIRED "; - } - - os << '\n'; - } -} - -void eoParser::printHelp(ostream& os) -{ - if (needHelp.value() == false && !messages.empty()) - { - std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); - messages.clear(); - return; - } - - // print program name and description - os << this->programName <<": "<< programDescription << "\n\n"; - - // print the usage when calling the program from the command line - os << "Usage: "<< programName<<" [Options]\n"; - // only short usage! - os << "Options of the form \"-f[=Value]\" or \"--Name[=value]\"" << endl; - - os << "Where:"<first; - - printSectionHeader(os, section); - - //print every param with its value - for (; p != params.end(); ++p) - { - std::string newSection = p->first; - - if (newSection != section) - { - section = newSection; - printSectionHeader(os, section); - } - - if (p->second->shortName()) - os << "-" << p->second->shortName() << ", "; - - os << "--" <second->longName() <<":\t" - << p->second->description() ; - - os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); - os <<". By default: "<second->defValue() << '\n'; - } // for p - - os << "\n@param_file \t defines a file where the parameters are stored\n"; - os << '\n'; - -} - -bool eoParser::userNeedsHelp(void) -{ - /* - check whether there are long or short names entered - without a corresponding parameter - */ - - for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) - { - string entry = lIt->first; - - MultiMapType::const_iterator it; - - for (it = params.begin(); it != params.end(); ++it) - { - if (entry == it->second->longName()) - { - break; - } - } - - if (it == params.end()) - { - string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; - messages.push_back(msg); - } - } - - for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) - { - char entry = sIt->first; - - MultiMapType::const_iterator it; - - for (it = params.begin(); it != params.end(); ++it) - { - if (entry == it->second->shortName()) - { - break; - } - } - - if (it == params.end()) - { - string entryString(1, entry); - string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; - messages.push_back(msg); - } - } - - return needHelp.value() || !messages.empty(); -} +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include + +#include + +#include + +using namespace std; + +void eoWarning(std::string str) +{ + cout << str << '\n'; +} + +std::ostream& printSectionHeader(std::ostream& os, std::string section) +{ + if (section == "") + section = "General"; + + os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; + return os; +} + +eoParameterLoader::~eoParameterLoader() +{ + for (unsigned i = 0; i < ownedParams.size(); ++i) + { + delete ownedParams[i]; + } +} + + +eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : + programName( _argv[0]), + programDescription( _programDescription), + needHelp(false, "help", "Prints this message", 'h') +{ + // need to process the param file first + // if we want command-line to have highest priority + unsigned i; + for (i = 1; i < _argc; ++i) + { + if (_argv[i][0] == '@') + { // read response file + char *pts = _argv[i]+1; // yes a char*, sorry :-) + + ifstream ifs (pts); + + ifs.peek(); // check if it exists + + if (!ifs) + { + string msg = (string)("Could not open response file: ") + pts; + throw runtime_error(msg); + } + + // read - will be overwritten by command-line + readFrom(ifs); + break; // stop reading command line args for '@' + } + } + + // now read arguments on command-line + strstream stream; + + for (i = 1; i < _argc; ++i) + { + stream << _argv[i] << '\n'; + } + + readFrom(stream); + + processParam(needHelp); +} + +void eoParser::processParam(eoParam& param, std::string section) +{ + doRegisterParam(param); // plainly register it + params.insert(make_pair(section, ¶m)); +} + +void eoParser::doRegisterParam(eoParam& param) const +{ + if (param.required() && !isItThere(param)) + { + string msg = "Required parameter: " + param.longName() + " missing"; + messages.push_back(msg); + } + + pair value = getValue(param); + + if (value.first) + { + param.setValue(value.second); + } +} + +pair eoParser::getValue(eoParam& _param) const +{ + pair result(false, ""); + + if (_param.shortName() != 0) + { + map::const_iterator it = shortNameMap.find(_param.shortName()); + if (it != shortNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + } + + map::const_iterator it = longNameMap.find(_param.longName()); + + if (it != longNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + // else (TODO: check environment, just long names) + + return result; +} + +void eoParser::updateParameters() const +{ + typedef MultiMapType::const_iterator It; + + for (It p = params.begin(); p != params.end(); ++p) + { + doRegisterParam(*p->second); + } +} + +void eoParser::readFrom(istream& is) +{ + string str; + + while (is >> str) + { + if (str[0] == '#') + { // skip the rest of the line + string tempStr; + getline(is, tempStr); + } + if (str[0] == '-') + { + if (str.size() < 2) + { + eoWarning("Missing parameter"); + needHelp.value() = true; + return; + } + + if (str[1] == '-') // two consecutive dashes + { + string::iterator equalLocation = find(str.begin() + 2, str.end(), '='); + string value; + + if (equalLocation == str.end()) + { // TODO: it should be the next string + value = ""; + } + else + { + value = string(equalLocation + 1, str.end()); + } + + string name(str.begin() + 2, equalLocation); + longNameMap[name] = value; + + } + else // it should be a char + { + string value(str.begin() + 3, str.end()); + shortNameMap[str[1]] = value; + } + } + } + + updateParameters(); +} + +void eoParser::printOn(ostream& os) const +{ + typedef MultiMapType::const_iterator It; + + It p = params.begin(); + + std::string section = p->first; + + printSectionHeader(os, section); + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + eoParam* param = p->second; + + string str = "--" + param->longName() + "=" + param->getValue(); + + os.setf(ios_base::left, ios_base::adjustfield); + os << setw(40) << str; + + os << setw(0) << " # "; + if (param->shortName()) + os << '-' << param->shortName() << " : "; + os << param->description(); + + if (param->required()) + { + os << " REQUIRED "; + } + + os << '\n'; + } +} + +void eoParser::printHelp(ostream& os) +{ + if (needHelp.value() == false && !messages.empty()) + { + std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); + messages.clear(); + return; + } + + // print program name and description + os << this->programName <<": "<< programDescription << "\n\n"; + + // print the usage when calling the program from the command line + os << "Usage: "<< programName<<" [Options]\n"; + // only short usage! + os << "Options of the form \"-f[=Value]\" or \"--Name[=value]\"" << endl; + + os << "Where:"<first; + + printSectionHeader(os, section); + + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + if (p->second->shortName()) + os << "-" << p->second->shortName() << ", "; + + os << "--" <second->longName() <<":\t" + << p->second->description() ; + + os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); + os <<". By default: "<second->defValue() << '\n'; + } // for p + + os << "\n@param_file \t defines a file where the parameters are stored\n"; + os << '\n'; + +} + +bool eoParser::userNeedsHelp(void) +{ + /* + check whether there are long or short names entered + without a corresponding parameter + */ + + for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) + { + string entry = lIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->longName()) + { + break; + } + } + + if (it == params.end()) + { + string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) + { + char entry = sIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->shortName()) + { + break; + } + } + + if (it == params.end()) + { + string entryString(1, entry); + string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + return needHelp.value() || !messages.empty(); +} diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index abdd05109..4ab4d716a 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,178 +1,182 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoObject.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoObject.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 176e89324..2a046f5f2 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "atomops"=".\atomops.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "eo"=".\eo.dsp" - Package Owner=<4> +Project: "eo"=.\eo.dsp - Package Owner=<4> Package=<5> {{{ @@ -29,26 +17,11 @@ Package=<4> Begin Project Dependency Project_Dep_Name atomops End Project Dependency - Begin Project Dependency - Project_Dep_Name esfull - End Project Dependency }}} ############################################################################### -Project: "esfull"=".\esfull.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "random"=".\random.dsp" - Package Owner=<4> +Project: "esfull"=.\esfull.dsp - Package Owner=<4> Package=<5> {{{ diff --git a/eo/win/esfull.dsp b/eo/win/esfull.dsp index 791ddeb06..5089fadbe 100644 --- a/eo/win/esfull.dsp +++ b/eo/win/esfull.dsp @@ -1,139 +1,143 @@ -# Microsoft Developer Studio Project File - Name="esfull" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=esfull - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "esfull.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "esfull.mak" CFG="esfull - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "esfull - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "esfull - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "esfull - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "esfull - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "esfull___Win32_Debug" -# PROP BASE Intermediate_Dir "esfull___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "esfull - Win32 Release" -# Name "esfull - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESFull.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\es\eoEsChromInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsFull.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutate.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutationInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsObjectiveBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsSimple.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStdev.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoFixedLength.h -# End Source File -# Begin Source File - -SOURCE=..\test\real_value.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="esfull" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=esfull - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "esfull.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "esfull.mak" CFG="esfull - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "esfull - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "esfull - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "esfull - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "esfull - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "esfull___Win32_Debug" +# PROP BASE Intermediate_Dir "esfull___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "esfull - Win32 Release" +# Name "esfull - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESFull.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\es\eoEsChromInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsFull.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutate.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutationInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsObjectiveBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsSimple.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStdev.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoFixedLength.h +# End Source File +# Begin Source File + +SOURCE=..\test\real_value.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\eolib___Win32_Debug\eolib.lib +# End Source File +# End Target +# End Project From 2796319a13d52298b9bcc224857e48e302984198 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 10 Feb 2001 05:36:50 +0000 Subject: [PATCH 0457/2134] Added matermind in SUBDIRS --- eo/app/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 64ca3c701..3648af121 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -1,10 +1,10 @@ ############################################################################### ## -## Makefile.am for app +## Makefile.am for app dir in eo ## ############################################################################### -SUBDIRS = gprop +SUBDIRS = gprop mastermind ############################################################################### From ed6ae447e8bd17851563dcf70b8fe563b01de60f Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 11 Feb 2001 15:57:01 +0000 Subject: [PATCH 0458/2134] Commented out the check for libtool, as we don't use it currently --- eo/autogen.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/autogen.sh b/eo/autogen.sh index 6c0e11529..257ad1b66 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -11,12 +11,12 @@ PROG=eo DIE=1 } -(libtool --version) < /dev/null > /dev/null 2>&1 || -{ - echo - echo "You must have libtool installed to compile $PROG." - DIE=1 -} +#(libtool --version) < /dev/null > /dev/null 2>&1 || +#{ +# echo +# echo "You must have libtool installed to compile $PROG." +# DIE=1 +#} (automake --version) < /dev/null > /dev/null 2>&1 || { From 05ed67ccd154acf5edd1c6d15544e807640e5e18 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 11 Feb 2001 15:58:55 +0000 Subject: [PATCH 0459/2134] Test now is not build automatically, make test should be given explicitely, then a new script run_tests will be used to check if everything still works --- eo/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index bd90204d7..d90e06e74 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win tutorial app +SUBDIRS = src win tutorial app #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user @@ -17,8 +17,8 @@ EXTRA_DIST=LICENSE lib: pushd src; $(MAKE) all; popd -test: - pushd test; $(MAKE) all; popd +test: test/run_tests + pushd test; $(MAKE) all; ./run_tests; touch run_tests; popd # so that make doc always compiles the doc ... doc: doc/eo.cfg From 27432e53777f1f812ca9443e3b8705fa1b68d769 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 11 Feb 2001 16:01:47 +0000 Subject: [PATCH 0460/2134] run_tests, add your own tests here --- eo/test/run_tests | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 eo/test/run_tests diff --git a/eo/test/run_tests b/eo/test/run_tests new file mode 100755 index 000000000..a1503ef76 --- /dev/null +++ b/eo/test/run_tests @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "Starting Replacement Test" +./t-eoReplacement > replacement.log +echo "Finished" + From 4aed1813110464356b318a58bf048f0afb637325 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 11 Feb 2001 16:25:03 +0000 Subject: [PATCH 0461/2134] Removed small bug in reading outside a buffer in eoParser::readFrom This caused the parser to crash when a simple flag of the form program -f was given. --- eo/src/utils/eoParser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index ffbcffc99..008813379 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -142,9 +142,9 @@ void eoParser::updateParameters() const void eoParser::readFrom(istream& is) { string str; - while (is >> str) { + if (str[0] == '#') { // skip the rest of the line string tempStr; @@ -179,7 +179,9 @@ void eoParser::readFrom(istream& is) } else // it should be a char { - string value(str.begin() + 3, str.end()); + string value = "1"; + if (str.size() > 2) + value = string(str.begin() + 3, str.end()); shortNameMap[str[1]] = value; } } From 9f5069b23af50c585d93e9a885267af281bad863 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 11 Feb 2001 16:35:21 +0000 Subject: [PATCH 0462/2134] run_tests is expanded to run everything (but only once yet, will have to address this later). t-eoSymreg is build to run for just a few generations, otherwise testing it would be an excercise in patience. --- eo/test/run_tests | 35 ++++++++++++++++++++++++++++++++++- eo/test/t-eoSymreg.cpp | 4 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/eo/test/run_tests b/eo/test/run_tests index a1503ef76..5f3b5af17 100755 --- a/eo/test/run_tests +++ b/eo/test/run_tests @@ -1,6 +1,39 @@ #!/bin/sh +echo "Starting t-eo" +./t-eo > eo.log -echo "Starting Replacement Test" +echo "Starting t-eoReplacement" ./t-eoReplacement > replacement.log + +echo "Starting t-eoCheckpointing" +./t-eoCheckpointing > checkpointing.log + +echo "Testing -h" +./t-eoCheckpointing -h > ch2.log + +echo "Testing t-eoExternalEO" +./t-eoExternalEO > externalEO.log + +echo "Testing t-eoGenOp" +./t-eoGenOp > genOp.log + +echo "Testing t-eoSelect" +./t-eoSelect > select.log + +echo "Testing t-eoStateAndParser" +# TODO, many different parameter settings and checks +./t-eoStateAndParser > stateAndParser.log + +echo "Testing t-eoSymreg" +./t-eoSymreg > symreg.log + +echo "Testing t-eobin" +./t-eobin > bin.log + +echo "Testing t-eofitness" +./t-eofitness > fitness.log + echo "Finished" +#TODO test if an error occured +echo "Ok" diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index ca76e7726..56d5077f9 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -212,7 +212,7 @@ int main() typedef eoPop Pop; const int MaxSize = 100; - const int nGenerations = 500; + const int nGenerations = 10; // only a test, so few generations // Initializor sequence, contains the allowable nodes vector init(init_sequence, init_sequence + 5); @@ -223,7 +223,7 @@ int main() // Root Mean Squared Error Measure RMS eval; - Pop pop(5000, initializer); + Pop pop(50, initializer); apply(eval, pop); From dea8a51f7ed34f198ce7f30dee4b438c62dec0e0 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 12 Feb 2001 13:58:51 +0000 Subject: [PATCH 0463/2134] Ok, updated the Makefile.am again to use the make check Command I picked up in the automake documentation (RTFM, you know) Tagged a lot of header functions in the GnuPlot files with 'inline', so they can be used from more than one sourcefile. Ok, now the interesting news. Started a new library libga (not to be confused with Matthew's GaLib). Here I suggest we put a fairly complete and configurable genetic algorithm. Just to see how far we can stretch ourselves and also to have a GA-componenent that can be used in other applications without having to rebuild the entire thing. test/t-eoGA.cpp tests this library --- eo/Makefile.am | 7 ++- eo/src/ga/Makefile.am | 8 ++- eo/src/ga/ga.cpp | 91 ++++++++++++++++++++++++++++++ eo/src/ga/ga.h | 24 ++++++++ eo/src/utils/Makefile.am | 2 +- eo/src/utils/eoGnuplot.h | 46 +++++++-------- eo/src/utils/eoGnuplot1DMonitor.h | 24 ++++---- eo/src/utils/eoGnuplot1DSnapshot.h | 2 +- eo/src/utils/eoState.h | 28 ++++++--- eo/test/Makefile.am | 68 ++++++++++++---------- eo/test/run_tests | 5 +- eo/test/t-eoGA.cpp | 36 ++++++++++++ 12 files changed, 260 insertions(+), 81 deletions(-) create mode 100644 eo/src/ga/ga.cpp create mode 100644 eo/src/ga/ga.h create mode 100644 eo/test/t-eoGA.cpp diff --git a/eo/Makefile.am b/eo/Makefile.am index d90e06e74..0dea0e13a 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src win tutorial app +SUBDIRS = src test win tutorial app #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user @@ -17,8 +17,9 @@ EXTRA_DIST=LICENSE lib: pushd src; $(MAKE) all; popd -test: test/run_tests - pushd test; $(MAKE) all; ./run_tests; touch run_tests; popd +# The test directory should be run explicitely, to check if nothing is broken +test: test/run_tests test/Makefile + pushd test; touch run_tests; $(MAKE) all; ./run_tests; popd # so that make doc always compiles the doc ... doc: doc/eo.cfg diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 12060fa5e..38d1695c5 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -4,5 +4,11 @@ ## ############################################################################### +INCLUDES = -I$(top_builddir)/src +lib_LIBRARIES = libga.a +libga_a_SOURCES = ga.cpp +CPPFLAGS = -O2 -Wall + + libeoincdir = $(includedir)/eo/ga -libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h +libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h ga.h diff --git a/eo/src/ga/ga.cpp b/eo/src/ga/ga.cpp new file mode 100644 index 000000000..802834b29 --- /dev/null +++ b/eo/src/ga/ga.cpp @@ -0,0 +1,91 @@ +#include +#include + +eoValueParam xoverRate(0.6f, "xoverrate", "The crossover rate", 'x'); +eoValueParam mutRate(1.0f, "mutationrate", "The mutation rate", 'm'); +eoValueParam chromSize(unsigned(10), "chromosomeSize", "The length of the bitstrings", 'n'); +eoValueParam popSize(unsigned(20), "PopSize", "Population Size", 'P'); + +template +eoAlgo >& do_make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& _state) +{ + typedef eoBit EOT; + + _parser.processParam(xoverRate, "genetics"); + _parser.processParam(mutRate, "genetics"); + _parser.processParam(chromSize, "initialization"); + + eoBitMutation* mutOp = new eoBitMutation(1. / float(chromSize.value())); + _state.storeFunctor(mutOp); + + eo1PtBitXover* crossOp = new eo1PtBitXover; + _state.storeFunctor(crossOp); + + eoSelectOne* select = new eoDetTournamentSelect(2); + _state.storeFunctor(select); + + eoSGA >* sga = new eoSGA(*select, *crossOp, xoverRate.value(), *mutOp, mutRate.value(), _eval, _checkpoint); + _state.storeFunctor(sga); + return *sga; +} + +template +eoPop >& do_init_ga(eoParameterLoader& _parser, eoState& _state, FitT) +{ + typedef eoBit EOT; + + _parser.processParam(chromSize, "initialization"); + _parser.processParam(popSize, "initialization"); + + eoInitFixedLength init(chromSize.value(), boolean_generator()); + + + // Let the state handle the memory + eoPop& pop = _state.takeOwnership(eoPop()); + + _state.registerObject(pop); + + // initialize the population + + pop.append(popSize.value(), init); + + return pop; +} + +template +void do_run_ga(eoAlgo >& _ga, eoPop >& _pop) +{ + _ga(_pop); +} + +/// The following function merely call the templatized do_* functions above + +eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& _state) +{ + return do_make_ga(_parser, _eval, _checkpoint, _state); +} + +eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& _state) +{ + return do_make_ga(_parser, _eval, _checkpoint, _state); +} + +eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, double _d) +{ + return do_init_ga(_parser, _state, _d); +} + +eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d) +{ + return do_init_ga(_parser, _state, _d); +} + +void run_ga(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run_ga(_ga, _pop); +} + +void run_ga(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run_ga(_ga, _pop); +} diff --git a/eo/src/ga/ga.h b/eo/src/ga/ga.h new file mode 100644 index 000000000..7a829f54c --- /dev/null +++ b/eo/src/ga/ga.h @@ -0,0 +1,24 @@ +#ifndef ga_h +#define ga_h + +#include +#include +#include +#include +#include +#include + +#include +#include + + +eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& state); +eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& state); + +eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, double); +eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness); + +void run_ga(eoAlgo >& _ga, eoPop >& _pop); +void run_ga(eoAlgo >& _ga, eoPop >& _pop); + +#endif diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index c7843abef..109533aff 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -5,7 +5,7 @@ ############################################################################### INCLUDES = -I$(top_builddir)/src -CPPFLAGS = -O2 +CPPFLAGS = -O2 -Wall lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index d588348f6..fb5a5c3a3 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -78,7 +78,7 @@ class eoGnuplot } -protected: +protected: void initGnuPlot(std::string _title, std::string _extra); // the private data bool firstTime; // the stats might be unknown in Ctor @@ -86,12 +86,12 @@ protected: private: }; -// the following should be placed in a separate eoGnuplot.cpp +// the following should be placed in a separate eoGnuplot.cpp static unsigned numWindow=0; //////////////////////////////////////////////////////////// -void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) +inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) ///////////////////////////////////////////////////////// { char snum[255]; @@ -103,7 +103,7 @@ void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) args[1] = strdup( "-geometry" ); args[2] = strdup( os.str() ); args[3] = strdup( "-title" ); - args[4] = strdup( _title.c_str() ); + args[4] = strdup( _title.c_str() ); args[5] = 0; gpCom = PipeComOpenArgv( "gnuplot", args ); if( ! gpCom ) @@ -115,21 +115,21 @@ void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) } } - + // the following should be placed in a separate file pipecom.c // together with the corresponding pipecom.h -// but first their MSC equivalent must be written and tested +// but first their MSC equivalent must be written and tested // or some #idef instructions put with clear message at compile time // that this is for Unix only ??? /* ---------------------------------------------------------------------- - * Where........: CMAP - Polytechnique + * Where........: CMAP - Polytechnique * File.........: pipecom.c * Author.......: Bertrand Lamy (Equipe genetique) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process - * - * Ident........: $Id: eoGnuplot.h,v 1.2 2001-02-01 05:17:16 evomarc Exp $ + * + * Ident........: $Id: eoGnuplot.h,v 1.3 2001-02-12 13:58:51 maartenkeijzer Exp $ * ---------------------------------------------------------------------- */ @@ -142,7 +142,7 @@ void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) // #include "pipecom.h" -int Check( PCom *com ) +inline int Check( PCom *com ) { if( ! com ) { fprintf( stderr, "PipeCom: Null pointer.\n" ); @@ -158,16 +158,16 @@ int Check( PCom *com ) } -PCom * PipeComOpen( char *prog ) +inline PCom * PipeComOpen( char *prog ) { char *args[2]; args[0] = prog; args[1] = NULL; - return PipeComOpenArgv( prog, args ); + return PipeComOpenArgv( prog, args ); } -PCom * PipeComOpenArgv( char *prog, char *argv[] ) +inline PCom * PipeComOpenArgv( char *prog, char *argv[] ) { int toFils[2]; int toPere[2]; @@ -188,7 +188,7 @@ PCom * PipeComOpenArgv( char *prog, char *argv[] ) perror("PipeComOpen: fork failed" ); return ret; break; - + case 0: /* --- Here's the son --- */ /* --- replace old stdin --- */ @@ -197,7 +197,7 @@ PCom * PipeComOpenArgv( char *prog, char *argv[] ) exit( -1 ); /* --- AVOIR: kill my father --- */ } - if( dup2( toPere[1], fileno(stdout) ) < 0 ) { + if( dup2( toPere[1], fileno(stdout) ) < 0 ) { perror( "PipeComOpen(son): could not connect" ); exit( -1 ); } @@ -211,7 +211,7 @@ PCom * PipeComOpenArgv( char *prog, char *argv[] ) ret = (PCom *) malloc( sizeof(PCom) ); if( ! ret ) return NULL; - + ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); ret->fRead = (FILE *)fdopen( toPere[0], "r" ); ret->pid = sonPid; @@ -220,7 +220,7 @@ PCom * PipeComOpenArgv( char *prog, char *argv[] ) } -int PipeComSend( PCom *to, const char *line ) +inline int PipeComSend( PCom *to, const char *line ) { int nb = 0; if( ! Check(to ) ) @@ -231,10 +231,10 @@ int PipeComSend( PCom *to, const char *line ) } -int PipeComSendn( PCom *to, const char *data, int n ) +inline int PipeComSendn( PCom *to, const char *data, int n ) { int nb = 0; - if( ! Check(to) ) + if( ! Check(to) ) return nb; nb = fwrite( data, 1, n, to->fWrit ); @@ -243,9 +243,9 @@ int PipeComSendn( PCom *to, const char *data, int n ) } -int PipeComReceive( PCom *from, char *data, int max ) +inline int PipeComReceive( PCom *from, char *data, int max ) { - if( ! Check(from) ) + if( ! Check(from) ) return 0; if( ! data ) { fprintf( stderr, "PipeComReceive: Invalid data pointer\n" ); @@ -259,7 +259,7 @@ int PipeComReceive( PCom *from, char *data, int max ) -int PipeComClose( PCom *to ) +inline int PipeComClose( PCom *to ) { if( ! Check(to) ) return 0; @@ -271,7 +271,7 @@ int PipeComClose( PCom *to ) -int PipeComWaitFor( PCom *from, char *what ) +inline int PipeComWaitFor( PCom *from, char *what ) { char buffer[256]; do { diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index dc38dbf83..e75508750 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -48,34 +48,34 @@ This class plots through gnuplot the eoStat given as argument /** eoGnuplot1DMonitor plots stats through gnuplot - * assumes that the same file is appened every so and so, + * assumes that the same file is appened every so and so, * and replots it everytime */ class eoGnuplot1DMonitor: public eoFileMonitor, public eoGnuplot { public: // Ctor - eoGnuplot1DMonitor(std::string _filename, bool _top=false) : - eoFileMonitor(_filename, " "), + eoGnuplot1DMonitor(std::string _filename, bool _top=false) : + eoFileMonitor(_filename, " "), eoGnuplot(_filename,(_top?"":"set key bottom")) {} - + // Dtor virtual ~eoGnuplot1DMonitor(){} virtual eoMonitor& operator() (void) ; - virtual void FirstPlot(); + virtual void FirstPlot(); /// Class name. virtual string className() const { return "eoGnuplot1DMonitor"; } -private: +private: }; -// the following should be placed in a separate eoGnuplot1DMonitor.cpp - +// the following should be placed in a separate eoGnuplot1DMonitor.cpp +// then the inline specifier should dissappear //////////////////////////////////////////////////////////// -eoMonitor& eoGnuplot1DMonitor::operator() (void) +inline eoMonitor& eoGnuplot1DMonitor::operator() (void) ///////////////////////////////////////////////////////// { // update file using the eoFileMonitor @@ -98,10 +98,10 @@ eoMonitor& eoGnuplot1DMonitor::operator() (void) } //////////////////////////////////////////////////////////// -void eoGnuplot1DMonitor::FirstPlot() +inline void eoGnuplot1DMonitor::FirstPlot() //////////////////////////////////////////////////////// { - if (vec.size() < 2) + if (vec.size() < 2) { throw runtime_error("Must have some stats to plot!\n"); } @@ -118,5 +118,5 @@ void eoGnuplot1DMonitor::FirstPlot() os << '\0'; PipeComSend( gpCom, buff ); } - + #endif _eoGnuplot1DMonitor_H diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index d6ad08bd7..d8e575a5b 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -81,7 +81,7 @@ private: // the following should be placed in a separate eoGnuplot1DMonitor.cpp //////////////////////////////////////////////////////////// -eoMonitor& eoGnuplot1DSnapshot::operator() (void) +inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) ///////////////////////////////////////////////////////// { // update file using the eoFileMonitor diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index b37a590e6..d069338de 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoState.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -32,6 +32,8 @@ #include #include +#include + class eoObject; class eoPersistent; @@ -40,7 +42,7 @@ class eoPersistent; * then in turn implement the persistence framework through members load * and save, that will call readFrom and printOn for the registrated objects. */ -class eoState +class eoState { public : @@ -54,7 +56,7 @@ public : void registerObject(eoPersistent& registrant); /** - * Copies the object (MUST be derived from eoPersistent) + * Copies the object (MUST be derived from eoPersistent) * and returns a reference to the owned object. * Note: it does not register the object, this must be done afterwards! */ @@ -65,7 +67,13 @@ public : ownedObjects.push_back(new T(persistent)); return static_cast(*ownedObjects.back()); } - + + void storeFunctor(eoFunctorBase* _functor) + { + // add it to the functorStore, fo + functorStore.add(_functor); + } + /** * Loading error thrown when nothing seems to work. */ @@ -82,21 +90,21 @@ public : * @param _filename the name of the file to load from */ void load(const std::string& _filename); - + /** * Reads the file specified * * @param is the stream to load from */ void load(std::istream& is); - + /** * Saves the state in file specified * * @param _filename the name of the file to save into */ void save(const std::string& _filename) const; - + /** * Saves the state in file specified * @@ -109,13 +117,15 @@ private : // first is Persistent, second is the raw data associated with it. typedef std::map ObjectMap; - + ObjectMap objectMap; std::vector creationOrder; - std::vector ownedObjects; + // And a functor store to boot + eoFunctorStore functorStore; + // private copy and assignment as eoState is supposed to be unique eoState(const eoState&); eoState& operator=(const eoState&); diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index f8c3d7846..85cea0155 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,16 +13,17 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a CXXFLAGS = -g ############################################################################### -noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp +check_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA +TESTS=run_tests # removing temporarily t-eoESFull -# noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect +#noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA ############################################################################### -# t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -# t_eoESFull_DEPENDENCIES = $(DEPS) -# t_eoESFull_LDFLAGS = -lm -# t_eoESFull_LDADD = $(LDADDS) +#t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h +#t_eoESFull_DEPENDENCIES = $(DEPS) +#t_eoESFull_LDFLAGS = -lm +#t_eoESFull_LDADD = $(LDADDS) ############################################################################### @@ -39,57 +40,64 @@ t_eobin_LDADD = $(LDADDS) ############################################################################### t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp -t_eoStateAndParser_DEPENDENCIES = $(DEPS) -t_eoStateAndParser_LDFLAGS = -lm -t_eoStateAndParser_LDADD = $(LDADDS) +t_eoStateAndParser_DEPENDENCIES = $(DEPS) +t_eoStateAndParser_LDFLAGS = -lm +t_eoStateAndParser_LDADD = $(LDADDS) ############################################################################### t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp -t_eoCheckpointing_DEPENDENCIES = $(DEPS) -t_eoCheckpointing_LDFLAGS = -lm -t_eoCheckpointing_LDADD = $(LDADDS) +t_eoCheckpointing_DEPENDENCIES = $(DEPS) +t_eoCheckpointing_LDFLAGS = -lm +t_eoCheckpointing_LDADD = $(LDADDS) ############################################################################### t_eoReplacement_SOURCES = t-eoReplacement.cpp -t_eoReplacement_DEPENDENCIES = $(DEPS) -t_eoReplacement_LDFLAGS = -lm -t_eoReplacement_LDADD = $(LDADDS) +t_eoReplacement_DEPENDENCIES = $(DEPS) +t_eoReplacement_LDFLAGS = -lm +t_eoReplacement_LDADD = $(LDADDS) ############################################################################### t_eoSelect_SOURCES = t-eoSelect.cpp -t_eoSelect_DEPENDENCIES = $(DEPS) -t_eoSelect_LDFLAGS = -lm -t_eoSelect_LDADD = $(LDADDS) +t_eoSelect_DEPENDENCIES = $(DEPS) +t_eoSelect_LDFLAGS = -lm +t_eoSelect_LDADD = $(LDADDS) ############################################################################### t_eoExternalEO_SOURCES = t-eoExternalEO.cpp -t_eoExternalEO_DEPENDENCIES = $(DEPS) -t_eoExternalEO_LDFLAGS = -lm -t_eoExternalEO_LDADD = $(LDADDS) +t_eoExternalEO_DEPENDENCIES = $(DEPS) +t_eoExternalEO_LDFLAGS = -lm +t_eoExternalEO_LDADD = $(LDADDS) ############################################################################### t_eoSymreg_SOURCES = t-eoSymreg.cpp -t_eoSymreg_DEPENDENCIES = $(DEPS) -t_eoSymreg_LDFLAGS = -lm -t_eoSymreg_LDADD = $(LDADDS) +t_eoSymreg_DEPENDENCIES = $(DEPS) +t_eoSymreg_LDFLAGS = -lm +t_eoSymreg_LDADD = $(LDADDS) ############################################################################### t_eo_SOURCES = t-eo.cpp -t_eo_DEPENDENCIES = $(DEPS) -t_eo_LDFLAGS = -lm -t_eo_LDADD = $(LDADDS) +t_eo_DEPENDENCIES = $(DEPS) +t_eo_LDFLAGS = -lm +t_eo_LDADD = $(LDADDS) ############################################################################### t_eoGenOp_SOURCES = t-eoGenOp.cpp -t_eoGenOp_DEPENDENCIES = $(DEPS) -t_eoGenOp_LDFLAGS = -lm -t_eoGenOp_LDADD = $(LDADDS) +t_eoGenOp_DEPENDENCIES = $(DEPS) +t_eoGenOp_LDFLAGS = -lm +t_eoGenOp_LDADD = $(LDADDS) + +############################################################################### + +t_eoGA_SOURCES = t-eoGA.cpp binary_value.h +t_eoGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoGA_LDFLAGS = -lm +t_eoGA_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) ############################################################################### diff --git a/eo/test/run_tests b/eo/test/run_tests index 5f3b5af17..59e026844 100755 --- a/eo/test/run_tests +++ b/eo/test/run_tests @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh echo "Starting t-eo" ./t-eo > eo.log @@ -33,6 +33,9 @@ echo "Testing t-eobin" echo "Testing t-eofitness" ./t-eofitness > fitness.log +echo "Testing t-eoGA" +./t-eoGA > t-eoGA.log + echo "Finished" #TODO test if an error occured diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp new file mode 100644 index 000000000..fe1f75714 --- /dev/null +++ b/eo/test/t-eoGA.cpp @@ -0,0 +1,36 @@ +#include + +#include +#include "binary_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoBit EoType; + + eoParser parser(argc, argv); + + eoState state; // keeps all things allocated, including eoEasyEA and eoPop! + + eoEvalFuncPtr eval( binary_value ); + eoGenContinue term(20); + eoCheckPoint checkpoint(term); + + eoAlgo& ga = make_ga(parser, eval, checkpoint, state); + + eoPop& pop = init_ga(parser, state, double()); + + apply(eval, pop); + + run_ga(ga, pop); // run the ga + } + catch(exception& e) + { + cout << e.what() << endl; + } +} \ No newline at end of file From 680229507fb7dbe798cc9a6483bac1bdf82e2496 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 13 Feb 2001 10:35:47 +0000 Subject: [PATCH 0464/2134] Just an update --- eo/test/t-eoGA.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index fe1f75714..f501c7568 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -25,6 +25,12 @@ int main(int argc, char* argv[]) eoPop& pop = init_ga(parser, state, double()); + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + return 0; + } + apply(eval, pop); run_ga(ga, pop); // run the ga From 262869d0ae416a7fe67b072057cc3310d56b4346 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 13 Feb 2001 12:38:19 +0000 Subject: [PATCH 0465/2134] fixed a bug: the parser now correctly parses parameters of the form -Pvalue This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply ashamed to have created such an off-by-one error. Marc assumed this was wanted behaviour (so that it should read: -P=value) I must admit that this is a logical conclusion, though it was merely a side-effect of the error. To not force Marc to rewrite the tutorial and his way of working with EO, I decided to make a feature out of the bug, so that now the parser will parse: -Pvalue -P=value and of course the true and blue: -Parameter=value I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) --- eo/src/utils/eoParser.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 008813379..e6378e570 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -37,7 +37,7 @@ eoParameterLoader::~eoParameterLoader() eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : - programName( _argv[0]), + programName( _argv[0]), programDescription( _programDescription), needHelp(false, "help", "Prints this message", 'h') { @@ -144,7 +144,7 @@ void eoParser::readFrom(istream& is) string str; while (is >> str) { - + if (str[0] == '#') { // skip the rest of the line string tempStr; @@ -179,10 +179,22 @@ void eoParser::readFrom(istream& is) } else // it should be a char { - string value = "1"; - if (str.size() > 2) - value = string(str.begin() + 3, str.end()); - shortNameMap[str[1]] = value; + string value = "1"; // flags do not need a special + + if (str.size() >= 2) + { + if (str[2] == '=') + { + if (str.size() >= 3) + value = string(str.begin() + 3, str.end()); + } + else + { + value = string(str.begin() + 2, str.end()); + } + } + + shortNameMap[str[1]] = value; } } } @@ -271,7 +283,7 @@ void eoParser::printHelp(ostream& os) if (p->second->shortName()) os << "-" << p->second->shortName() << ", "; - + os << "--" <second->longName() <<":\t" << p->second->description() ; From 07bc61e6940f45755de8671a5aa2a061db3bf4b8 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 13 Feb 2001 14:43:54 +0000 Subject: [PATCH 0466/2134] Added a bit more documentation, more to follow (I hope) --- eo/src/eoFunctor.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index e4fd3056e..01d96db76 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -28,8 +28,21 @@ #include -/// Base class for functors to get a nice hierarchy diagram -class eoFunctorBase +/** Base class for functors to get a nice hierarchy diagram + + That's actually quite an understatement as it does quite a bit more than + just that. By having all functors derive from the same base class, we can + do some memory management that would otherwise be very hard. + + The memory management base class is called eoFunctorStore, and it supports + a member add() to add a pointer to a functor. When the functorStore is + destroyed, it will delete all those pointers. So beware: do not delete + the functorStore before you are done with anything that might have been allocated. + + @see eoFunctorStore + +*/ +class eoFunctorBase { public : virtual ~eoFunctorBase() {} @@ -42,7 +55,7 @@ public : struct binary_function_tag {}; }; -/** +/** Basic Function. Derive from this class when defining any procedure. It defines a result_type that can be used to determine the return type @@ -53,12 +66,12 @@ template class eoF : public eoFunctorBase { public : - + /// virtual dtor here so there is no need to define it in derived classes virtual ~eoF() {} typedef R result_type; - + /// The pure virtual function that needs to be implemented by the subclass virtual R operator()() = 0; }; From 0dd3e27e4e74a468edda4de5a17bd4fba1f77ed3 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 13 Feb 2001 22:35:07 +0000 Subject: [PATCH 0467/2134] Moved out of the 'obsolete' directory a couple of honest classes, which didn't harm anybody; activated also in Makefile.am the program that tested them --- eo/src/utils/eoParser.cpp | 700 ++++++++++++------------- eo/src/utils/eoParser.h | 6 +- eo/src/{obsolete => utils}/eoRnd.h | 4 +- eo/src/{obsolete => utils}/eoUniform.h | 14 +- eo/test/Makefile.am | 8 +- eo/test/t-eoRandom.cpp | 22 +- 6 files changed, 388 insertions(+), 366 deletions(-) rename eo/src/{obsolete => utils}/eoRnd.h (91%) rename eo/src/{obsolete => utils}/eoUniform.h (89%) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index e6378e570..0191d53f9 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -1,350 +1,350 @@ -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include -#include - -#include - -#include - -using namespace std; - -void eoWarning(std::string str) -{ - cout << str << '\n'; -} - -std::ostream& printSectionHeader(std::ostream& os, std::string section) -{ - if (section == "") - section = "General"; - - os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; - return os; -} - -eoParameterLoader::~eoParameterLoader() -{ - for (unsigned i = 0; i < ownedParams.size(); ++i) - { - delete ownedParams[i]; - } -} - - -eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : - programName( _argv[0]), - programDescription( _programDescription), - needHelp(false, "help", "Prints this message", 'h') -{ - // need to process the param file first - // if we want command-line to have highest priority - unsigned i; - for (i = 1; i < _argc; ++i) - { - if (_argv[i][0] == '@') - { // read response file - char *pts = _argv[i]+1; // yes a char*, sorry :-) - - ifstream ifs (pts); - - ifs.peek(); // check if it exists - - if (!ifs) - { - string msg = (string)("Could not open response file: ") + pts; - throw runtime_error(msg); - } - - // read - will be overwritten by command-line - readFrom(ifs); - break; // stop reading command line args for '@' - } - } - - // now read arguments on command-line - strstream stream; - - for (i = 1; i < _argc; ++i) - { - stream << _argv[i] << '\n'; - } - - readFrom(stream); - - processParam(needHelp); -} - -void eoParser::processParam(eoParam& param, std::string section) -{ - doRegisterParam(param); // plainly register it - params.insert(make_pair(section, ¶m)); -} - -void eoParser::doRegisterParam(eoParam& param) const -{ - if (param.required() && !isItThere(param)) - { - string msg = "Required parameter: " + param.longName() + " missing"; - messages.push_back(msg); - } - - pair value = getValue(param); - - if (value.first) - { - param.setValue(value.second); - } -} - -pair eoParser::getValue(eoParam& _param) const -{ - pair result(false, ""); - - if (_param.shortName() != 0) - { - map::const_iterator it = shortNameMap.find(_param.shortName()); - if (it != shortNameMap.end()) - { - result.second = it->second; - result.first = true; - return result; - } - } - - map::const_iterator it = longNameMap.find(_param.longName()); - - if (it != longNameMap.end()) - { - result.second = it->second; - result.first = true; - return result; - } - // else (TODO: check environment, just long names) - - return result; -} - -void eoParser::updateParameters() const -{ - typedef MultiMapType::const_iterator It; - - for (It p = params.begin(); p != params.end(); ++p) - { - doRegisterParam(*p->second); - } -} - -void eoParser::readFrom(istream& is) -{ - string str; - while (is >> str) - { - - if (str[0] == '#') - { // skip the rest of the line - string tempStr; - getline(is, tempStr); - } - if (str[0] == '-') - { - if (str.size() < 2) - { - eoWarning("Missing parameter"); - needHelp.value() = true; - return; - } - - if (str[1] == '-') // two consecutive dashes - { - string::iterator equalLocation = find(str.begin() + 2, str.end(), '='); - string value; - - if (equalLocation == str.end()) - { // TODO: it should be the next string - value = ""; - } - else - { - value = string(equalLocation + 1, str.end()); - } - - string name(str.begin() + 2, equalLocation); - longNameMap[name] = value; - - } - else // it should be a char - { - string value = "1"; // flags do not need a special - - if (str.size() >= 2) - { - if (str[2] == '=') - { - if (str.size() >= 3) - value = string(str.begin() + 3, str.end()); - } - else - { - value = string(str.begin() + 2, str.end()); - } - } - - shortNameMap[str[1]] = value; - } - } - } - - updateParameters(); -} - -void eoParser::printOn(ostream& os) const -{ - typedef MultiMapType::const_iterator It; - - It p = params.begin(); - - std::string section = p->first; - - printSectionHeader(os, section); - //print every param with its value - for (; p != params.end(); ++p) - { - std::string newSection = p->first; - - if (newSection != section) - { - section = newSection; - printSectionHeader(os, section); - } - - eoParam* param = p->second; - - string str = "--" + param->longName() + "=" + param->getValue(); - - os.setf(ios_base::left, ios_base::adjustfield); - os << setw(40) << str; - - os << setw(0) << " # "; - if (param->shortName()) - os << '-' << param->shortName() << " : "; - os << param->description(); - - if (param->required()) - { - os << " REQUIRED "; - } - - os << '\n'; - } -} - -void eoParser::printHelp(ostream& os) -{ - if (needHelp.value() == false && !messages.empty()) - { - std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); - messages.clear(); - return; - } - - // print program name and description - os << this->programName <<": "<< programDescription << "\n\n"; - - // print the usage when calling the program from the command line - os << "Usage: "<< programName<<" [Options]\n"; - // only short usage! - os << "Options of the form \"-f[=Value]\" or \"--Name[=value]\"" << endl; - - os << "Where:"<first; - - printSectionHeader(os, section); - - //print every param with its value - for (; p != params.end(); ++p) - { - std::string newSection = p->first; - - if (newSection != section) - { - section = newSection; - printSectionHeader(os, section); - } - - if (p->second->shortName()) - os << "-" << p->second->shortName() << ", "; - - os << "--" <second->longName() <<":\t" - << p->second->description() ; - - os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); - os <<". By default: "<second->defValue() << '\n'; - } // for p - - os << "\n@param_file \t defines a file where the parameters are stored\n"; - os << '\n'; - -} - -bool eoParser::userNeedsHelp(void) -{ - /* - check whether there are long or short names entered - without a corresponding parameter - */ - - for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) - { - string entry = lIt->first; - - MultiMapType::const_iterator it; - - for (it = params.begin(); it != params.end(); ++it) - { - if (entry == it->second->longName()) - { - break; - } - } - - if (it == params.end()) - { - string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; - messages.push_back(msg); - } - } - - for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) - { - char entry = sIt->first; - - MultiMapType::const_iterator it; - - for (it = params.begin(); it != params.end(); ++it) - { - if (entry == it->second->shortName()) - { - break; - } - } - - if (it == params.end()) - { - string entryString(1, entry); - string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; - messages.push_back(msg); - } - } - - return needHelp.value() || !messages.empty(); -} +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include + +#include + +#include + +using namespace std; + +void eoWarning(std::string str) +{ + cout << str << '\n'; +} + +std::ostream& printSectionHeader(std::ostream& os, std::string section) +{ + if (section == "") + section = "General"; + + os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; + return os; +} + +eoParameterLoader::~eoParameterLoader() +{ + for (unsigned i = 0; i < ownedParams.size(); ++i) + { + delete ownedParams[i]; + } +} + + +eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : + programName( _argv[0]), + programDescription( _programDescription), + needHelp(false, "help", "Prints this message", 'h') +{ + // need to process the param file first + // if we want command-line to have highest priority + unsigned i; + for (i = 1; i < _argc; ++i) + { + if (_argv[i][0] == '@') + { // read response file + char *pts = _argv[i]+1; // yes a char*, sorry :-) + + ifstream ifs (pts); + + ifs.peek(); // check if it exists + + if (!ifs) + { + string msg = (string)("Could not open response file: ") + pts; + throw runtime_error(msg); + } + + // read - will be overwritten by command-line + readFrom(ifs); + break; // stop reading command line args for '@' + } + } + + // now read arguments on command-line + strstream stream; + + for (i = 1; i < _argc; ++i) + { + stream << _argv[i] << '\n'; + } + + readFrom(stream); + + processParam(needHelp); +} + +void eoParser::processParam(eoParam& param, std::string section) +{ + doRegisterParam(param); // plainly register it + params.insert(make_pair(section, ¶m)); +} + +void eoParser::doRegisterParam(eoParam& param) const +{ + if (param.required() && !isItThere(param)) + { + string msg = "Required parameter: " + param.longName() + " missing"; + messages.push_back(msg); + } + + pair value = getValue(param); + + if (value.first) + { + param.setValue(value.second); + } +} + +pair eoParser::getValue(eoParam& _param) const +{ + pair result(false, ""); + + if (_param.shortName() != 0) + { + map::const_iterator it = shortNameMap.find(_param.shortName()); + if (it != shortNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + } + + map::const_iterator it = longNameMap.find(_param.longName()); + + if (it != longNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + // else (TODO: check environment, just long names) + + return result; +} + +void eoParser::updateParameters() const +{ + typedef MultiMapType::const_iterator It; + + for (It p = params.begin(); p != params.end(); ++p) + { + doRegisterParam(*p->second); + } +} + +void eoParser::readFrom(istream& is) +{ + string str; + while (is >> str) + { + + if (str[0] == '#') + { // skip the rest of the line + string tempStr; + getline(is, tempStr); + } + if (str[0] == '-') + { + if (str.size() < 2) + { + eoWarning("Missing parameter"); + needHelp.value() = true; + return; + } + + if (str[1] == '-') // two consecutive dashes + { + string::iterator equalLocation = find(str.begin() + 2, str.end(), '='); + string value; + + if (equalLocation == str.end()) + { // TODO: it should be the next string + value = ""; + } + else + { + value = string(equalLocation + 1, str.end()); + } + + string name(str.begin() + 2, equalLocation); + longNameMap[name] = value; + + } + else // it should be a char + { + string value = "1"; // flags do not need a special + + if (str.size() >= 2) + { + if (str[2] == '=') + { + if (str.size() >= 3) + value = string(str.begin() + 3, str.end()); + } + else + { + value = string(str.begin() + 2, str.end()); + } + } + + shortNameMap[str[1]] = value; + } + } + } + + updateParameters(); +} + +void eoParser::printOn(ostream& os) const +{ + typedef MultiMapType::const_iterator It; + + It p = params.begin(); + + std::string section = p->first; + + printSectionHeader(os, section); + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + eoParam* param = p->second; + + string str = "--" + param->longName() + "=" + param->getValue(); + + os.setf(ios_base::left, ios_base::adjustfield); + os << setw(40) << str; + + os << setw(0) << " # "; + if (param->shortName()) + os << '-' << param->shortName() << " : "; + os << param->description(); + + if (param->required()) + { + os << " REQUIRED "; + } + + os << '\n'; + } +} + +void eoParser::printHelp(ostream& os) +{ + if (needHelp.value() == false && !messages.empty()) + { + std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); + messages.clear(); + return; + } + + // print program name and description + os << this->programName <<": "<< programDescription << "\n\n"; + + // print the usage when calling the program from the command line + os << "Usage: "<< programName<<" [Options]\n"; + // only short usage! + os << "Options of the form \"-f[=Value]\" or \"--Name[=value]\"" << endl; + + os << "Where:"<first; + + printSectionHeader(os, section); + + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + if (p->second->shortName()) + os << "-" << p->second->shortName() << ", "; + + os << "--" <second->longName() <<":\t" + << p->second->description() ; + + os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); + os <<". By default: "<second->defValue() << '\n'; + } // for p + + os << "\n@param_file \t defines a file where the parameters are stored\n"; + os << '\n'; + +} + +bool eoParser::userNeedsHelp(void) +{ + /* + check whether there are long or short names entered + without a corresponding parameter + */ + + for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) + { + string entry = lIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->longName()) + { + break; + } + } + + if (it == params.end()) + { + string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) + { + char entry = sIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->shortName()) + { + break; + } + } + + if (it == params.end()) + { + string entryString(1, entry); + string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + return needHelp.value() || !messages.empty(); +} diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 8af3a11bc..2127eb6a6 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -23,7 +23,9 @@ mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- - +/** +CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoParser.h,v 1.7 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ +*/ #ifndef eoParser_h #define eoParser_h @@ -111,7 +113,7 @@ public: * @param _lFileParamName Name of the parameter specifying the configuration file (--param-file) * @param _shortHand Single charachter shorthand for specifying the configuration file */ - eoParser ( int _argc, char **_argv , string _programDescription = "", + eoParser ( unsigned _argc, char **_argv , string _programDescription = "", string _lFileParamName = "param-file", char _shortHand = 'p'); /** diff --git a/eo/src/obsolete/eoRnd.h b/eo/src/utils/eoRnd.h similarity index 91% rename from eo/src/obsolete/eoRnd.h rename to eo/src/utils/eoRnd.h index 71a7095f1..eca67ec7a 100644 --- a/eo/src/obsolete/eoRnd.h +++ b/eo/src/utils/eoRnd.h @@ -21,7 +21,9 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ //----------------------------------------------------------------------------- - +/** +CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/Attic/eoRnd.h,v 1.1 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ +*/ #ifndef _EORND_H #define _EORND_H diff --git a/eo/src/obsolete/eoUniform.h b/eo/src/utils/eoUniform.h similarity index 89% rename from eo/src/obsolete/eoUniform.h rename to eo/src/utils/eoUniform.h index f807b6d52..dbeb40468 100644 --- a/eo/src/obsolete/eoUniform.h +++ b/eo/src/utils/eoUniform.h @@ -21,6 +21,11 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ + +/** +CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/Attic/eoUniform.h,v 1.1 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ +*/ + //----------------------------------------------------------------------------- #ifndef _EOUNIFORM_H @@ -28,14 +33,19 @@ //----------------------------------------------------------------------------- -#include +#include #include //----------------------------------------------------------------------------- // Class eoUniform //----------------------------------------------------------------------------- -/// Generates uniform random number over the interval [min, max) +/** Generates uniform random number over the interval [min, max) +Uses the global variable rng + */ + +using eo::rng; + template class eoUniform: public eoRnd { diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 85cea0155..7e3c608f7 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,8 @@ LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a CXXFLAGS = -g ############################################################################### -check_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA +check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing \ + t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA TESTS=run_tests # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA @@ -24,6 +25,11 @@ TESTS=run_tests #t_eoESFull_DEPENDENCIES = $(DEPS) #t_eoESFull_LDFLAGS = -lm #t_eoESFull_LDADD = $(LDADDS) +############################################################################### + +t_eoRandom_SOURCES = t-eoRandom.cpp +t_eoRandom_DEPENDENCIES = $(DEPS) +t_eoRandom_LDADD = $(LDADDS) ############################################################################### diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index fefcc6c65..0d737f910 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -23,27 +23,29 @@ */ +/** +CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/t-eoRandom.cpp,v 1.5 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ +*/ //----------------------------------------------------------------------------- #include // cout #include // ostrstream, istrstream -#include // eoBin -#include -#include +#include // eoBin +//#include +//#include //----------------------------------------------------------------------------- main() { - eoNormal n1(-2.5,3.5); - eoNormal n2(0.003, 0.0005 ); - eoNormal n3( 10000000U, 10000U); - eoNegExp e1(3.5); + eoUniform u1(-2.5,3.5); + eoUniform u2(0.003, 0.0005 ); + eoUniform u3( 10000000U, 10000U); + /* eoNegExp e1(3.5); eoNegExp e2(0.003 ); eoNegExp e3( 10000U); - cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; + cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; */ for ( unsigned i = 0; i < 100; i ++) { - cout << n1() << "\t" << n2() << "\t" << n3() << "\t" << - e1() << "\t" << e2() << "\t" << e3() << endl; + cout << u1() << "\t" << u2() << "\t" << u3() << endl; } return 0; // to avoid VC++ complaints From b7d071d92d731ee65e5254b6d328f6d28dd6da28 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 13 Feb 2001 22:38:23 +0000 Subject: [PATCH 0468/2134] Just playing with the CVS variables --- eo/test/t-eoRandom.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 0d737f910..10bff84cd 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,8 +24,9 @@ */ /** -CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/t-eoRandom.cpp,v 1.5 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ +CVS Info: $Date: 2001-02-13 22:38:23 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/t-eoRandom.cpp,v 1.6 2001-02-13 22:38:23 jmerelo Exp $ $Author: jmerelo $ $Revision: 1.6 $ */ + //----------------------------------------------------------------------------- #include // cout From 17d55ae92bb25f9fc554dd8459fc04f52947ce02 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 13 Feb 2001 22:39:56 +0000 Subject: [PATCH 0469/2134] Just playing with the CVS variables --- eo/test/t-eoRandom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 10bff84cd..57116af83 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,7 +24,7 @@ */ /** -CVS Info: $Date: 2001-02-13 22:38:23 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/t-eoRandom.cpp,v 1.6 2001-02-13 22:38:23 jmerelo Exp $ $Author: jmerelo $ $Revision: 1.6 $ +CVS Info: $Date: 2001-02-13 22:39:56 $ $Author: jmerelo $ $Revision: 1.7 $ */ //----------------------------------------------------------------------------- From 3a9b5a0e7e0299b2e0ad6a7e3947122858fd1ebd Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Feb 2001 10:35:26 +0000 Subject: [PATCH 0470/2134] Well, what do you know, major commit. Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, without invalidating fitness. Added a set of invalidators to take over that job (see for instance eoSGA and eoSGATransform how this can transparantly used) Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) and of course changed all the operators to reflect the change (and found a few that didn't invalidate the fitness, thus really pointing out the advantage of the current approach) --- eo/app/gprop/Makefile.am | 3 +- eo/app/gprop/gprop.h | 10 +- eo/app/mastermind/mastermind.h | 17 ++- eo/src/Makefile.am | 4 +- eo/src/eoCounter.h | 6 +- eo/src/eoFunctorStore.h | 14 ++- eo/src/eoGenOp.h | 80 +++++++++++--- eo/src/eoInit.h | 5 +- eo/src/eoInvalidateOps.h | 118 +++++++++++++++++++++ eo/src/eoOp.h | 59 ++++++----- eo/src/eoOpContainer.h | 79 +++----------- eo/src/eoProportionalCombinedOp.h | 96 +++++------------ eo/src/eoSGA.h | 42 ++++---- eo/src/eoSGATransform.h | 10 +- eo/src/eoVariableLengthCrossover.h | 49 +++++---- eo/src/eoVariableLengthMutation.h | 58 +++++----- eo/src/es/eoEsMutate.h | 84 +++++++-------- eo/src/es/eoEsStdevXOver.h | 24 +++-- eo/src/es/eoGenericRealOp.h | 109 ++++++++++--------- eo/src/es/eoNormalMutation.h | 25 +++-- eo/src/es/eoRealOp.h | 89 ++++++++-------- eo/src/ga/eoBitOp.h | 135 +++++++++++------------- eo/src/gp/eoParseTree.h | 27 +++-- eo/src/{ => obsolete}/eoGenericBinOp.h | 0 eo/src/{ => obsolete}/eoGenericMonOp.h | 0 eo/src/{ => obsolete}/eoGenericQuadOp.h | 0 eo/src/other/eoExternalOpFunctions.h | 32 +++--- eo/src/utils/eoState.h | 26 ++--- eo/test/run_tests | 3 + eo/test/t-eoGenOp.cpp | 13 ++- 30 files changed, 652 insertions(+), 565 deletions(-) create mode 100644 eo/src/eoInvalidateOps.h rename eo/src/{ => obsolete}/eoGenericBinOp.h (100%) rename eo/src/{ => obsolete}/eoGenericMonOp.h (100%) rename eo/src/{ => obsolete}/eoGenericQuadOp.h (100%) diff --git a/eo/app/gprop/Makefile.am b/eo/app/gprop/Makefile.am index bc4a7b855..eb87ebb5d 100644 --- a/eo/app/gprop/Makefile.am +++ b/eo/app/gprop/Makefile.am @@ -10,11 +10,10 @@ DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a - +CXXFLAGS = -g ############################################################################### bin_PROGRAMS = gprop - ############################################################################### gprop_SOURCES = gprop.cc diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 6f630207d..a0c7c0ecf 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -109,11 +109,11 @@ mlp::set trn_set, val_set, tst_set; class eoChromMutation: public eoMonOp { public: - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { mse::net tmp(chrom); tmp.train(trn_set, 10, 0, 0.001); - chrom.invalidate(); + return true; } }; @@ -124,7 +124,7 @@ public: class eoChromXover: public eoQuadOp { public: - void operator()(Chrom& chrom1, Chrom& chrom2) + bool operator()(Chrom& chrom1, Chrom& chrom2) { chrom1.normalize(); chrom2.desaturate(); @@ -132,8 +132,8 @@ public: mse::net tmp1(chrom1), tmp2(chrom2); tmp1.train(trn_set, 100, 0, 0.001); tmp2.train(trn_set, 100, 0, 0.001); - chrom1.invalidate(); - chrom2.invalidate(); + + return true; } }; diff --git a/eo/app/mastermind/mastermind.h b/eo/app/mastermind/mastermind.h index c23d921d3..44b64b85a 100644 --- a/eo/app/mastermind/mastermind.h +++ b/eo/app/mastermind/mastermind.h @@ -116,7 +116,7 @@ void init_eoChromEvaluator(const unsigned& c, const unsigned& l, string s) uniform_generator color(0, num_colors); generate(solution.begin(), solution.end(), color); } - + solution.fitness(eoChromEvaluator(solution)); } @@ -143,14 +143,14 @@ public: class eoChromMutation: public eoMonOp { // many operators in one :( - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { uniform_generator what(0, 2); uniform_generator position(0, chrom.size()); switch(what()) { - case 0: + case 0: { // mutation uniform_generator color(0, num_colors); @@ -171,7 +171,7 @@ class eoChromMutation: public eoMonOp } } - chrom.invalidate(); + return true; } }; @@ -182,12 +182,11 @@ class eoChromMutation: public eoMonOp class eoChromXover: public eoQuadOp { public: - void operator()(Chrom& chrom1, Chrom& chrom2) + bool operator()(Chrom& chrom1, Chrom& chrom2) { uniform_generator position(0, chrom1.size()); swap_ranges(chrom1.begin(), chrom1.begin() + position(), chrom2.begin()); - chrom1.invalidate(); - chrom2.invalidate(); + return true; } }; @@ -195,6 +194,6 @@ public: #endif // mastermind_h -// Local Variables: -// mode:C++ +// Local Variables: +// mode:C++ // End: diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 051db2f9f..3982f4822 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,7 +8,7 @@ SUBDIRS = es ga gp utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp +libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoGenericBinOp.h eoGenericMonOp.h eoGenericQuadOp.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h es.h ga.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoInvalidateOps.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h es.h ga.h diff --git a/eo/src/eoCounter.h b/eo/src/eoCounter.h index af55f20f7..05e08b21a 100644 --- a/eo/src/eoCounter.h +++ b/eo/src/eoCounter.h @@ -196,7 +196,7 @@ template eoProcedureCounter& make_counter(eoFunctorBase::procedure_tag, Procedure& _proc, eoFunctorStore& store, std::string _name = "proc_counter") { eoProcedureCounter* result = new eoProcedureCounter(_proc, _name); - store.add(result); + store.storeFunctor(result); return *result; } @@ -204,7 +204,7 @@ template eoUnaryFunctorCounter& make_counter(eoFunctorBase::unary_function_tag, UnaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter") { eoUnaryFunctorCounter* result = new eoUnaryFunctorCounter(_proc, _name); - store.add(result); + store.storeFunctor(result); return *result; } @@ -212,7 +212,7 @@ template eoBinaryFunctorCounter& make_counter(eoFunctorBase::binary_function_tag, BinaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter") { eoBinaryFunctorCounter* result = new eoBinaryFunctorCounter(_proc, _name); - store.add(result); + store.storeFunctor(result); return *result; } diff --git a/eo/src/eoFunctorStore.h b/eo/src/eoFunctorStore.h index 21980906f..1655fb00c 100644 --- a/eo/src/eoFunctorStore.h +++ b/eo/src/eoFunctorStore.h @@ -34,9 +34,9 @@ class eoFunctorBase; /** eoFunctorStore is a class that stores functors that are allocated on the heap. This class can be used in factories to store allocated memory for -dynamically created functors. +dynamically created functors. */ -class eoFunctorStore +class eoFunctorStore { public : @@ -45,13 +45,19 @@ class eoFunctorStore ~eoFunctorStore(); /// Add an eoFunctorBase to the store - void add(eoFunctorBase* r) { vec.push_back(r); } + template + Functor& storeFunctor(Functor* r) + { + // If the compiler complains about the following line, check if you really are giving it a pointer to an eoFunctorBase derived object + vec.push_back(r); + return *r; + } private : /// no copying allowed eoFunctorStore(const eoFunctorStore&); - + /// no copying allowed eoFunctorStore operator=(const eoFunctorStore&); std::vector vec; diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index badbde71c..a8143a9e2 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -1,9 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoGenOp.h +// eoGenOp.h // (c) Maarten Keijzer and Marc Schoenauer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: mkeijzer@dhi.dk + Contact: mak@dhi.dk Marc.Schoenauer@polytechnique.fr */ //----------------------------------------------------------------------------- @@ -28,7 +28,7 @@ #include #include - +#include /** @name General variation operators @@ -41,15 +41,22 @@ thanks to the friend class eoPopulator /** The base class for General Operators +Subclass this operator is you want to define an operator that falls +outside of the eoMonOp, eoBinOp, eoQuadOp classification. The argument +the operator will receive is an eoPopulator, which is a wrapper around +the original population, is an instantiation of the next population and +has often a selection function embedded in it to select new individuals. + +Note that the actual work is performed in the apply function. */ template class eoGenOp : public eoOp, public eoUF &, void> { public : /// Ctor that honors its superclass - eoGenOp(): eoOp( eoOp::general ) {} + eoGenOp(): eoOp( eoOp::general ) {} - virtual unsigned max_production(void) = 0; + virtual unsigned max_production(void) = 0; virtual string className() = 0; void operator()(eoPopulator& _pop) { @@ -57,6 +64,7 @@ class eoGenOp : public eoOp, public eoUF &, void> apply(_pop); } + protected : /** the function that will do the work */ @@ -75,7 +83,8 @@ class eoMonGenOp : public eoGenOp void apply(eoPopulator& _it) { - op(*_it); // look how simple + if (op(*_it)) + (*_it).invalidate(); // look how simple } string className() {return op.className();} @@ -101,8 +110,9 @@ class eoBinGenOp : public eoGenOp { EOT& a = *_pop; EOT& b = *++_pop; - op(a, b); - _pop.erase(); + if (op(a, b)) + a.invalidate(); + _pop.erase(); // erase the b from the next population } string className() {return op.className();} @@ -115,17 +125,18 @@ template class eoSelBinGenOp : public eoGenOp { public: - eoSelBinGenOp(eoBinOp& _op, eoSelectOne& _sel) : + eoSelBinGenOp(eoBinOp& _op, eoSelectOne& _sel) : op(_op), sel(_sel) {} - + unsigned max_production(void) { return 1; } - + void apply(eoPopulator& _pop) { // _pop.source() gets the original population, an eoVecOp can make use of this as well - op(*_pop, sel(_pop.source())); + if (op(*_pop, sel(_pop.source()))) + (*_pop).invalidate(); } string className() {return op.className();} - + private : eoBinOp& op; eoSelectOne& sel; @@ -147,7 +158,11 @@ class eoQuadGenOp : public eoGenOp EOT& a = *_pop; EOT& b = *++_pop; - op(a, b); + if(op(a, b)) + { + a.invalidate(); + b.invalidate(); + } } string className() {return op.className();} @@ -155,6 +170,41 @@ class eoQuadGenOp : public eoGenOp eoQuadOp& op; }; + /** + Factory function for automagically creating references to an + eoGenOp object. Useful when you are too lazy to figure out + which wrapper belongs to which operator. The memory allocated + in the wrapper will be stored in a eoFunctorStore (eoState derives from this). + Therefore the memory will only be freed when the eoFunctorStore is deleted. + Make very sure that you are not using these wrappers after this happens. + + You can use this function 'wrap_op' in the following way. Suppose you've + created an eoQuadOp called my_quad, and you want to feed it to an eoTransform + derived class that expects an eoGenOp. If you have an eoState lying around + (which is generally a good idea) you can say: + + eoDerivedTransform trans(eoGenOp::wrap_op(my_quad, state), ...); + + And as long as your state is not destroyed (by going out of scope for example, + your 'trans' functor will be usefull. + + As a final note, you can also enter an eoGenOp as the argument. It will + not allocate memory then. This to make it even easier to use the wrap_op function. + For an example of how this is used, check the eoOpContainer class. + + @see eoOpContainer + */ + template + eoGenOp& wrap_op(eoOp& _op, eoFunctorStore& _store) + { + switch(_op.getType()) + { + case eoOp::unary : return _store.storeFunctor(new eoMonGenOp(static_cast&>(_op))); + case eoOp::binary : return _store.storeFunctor(new eoBinGenOp(static_cast&>(_op))); + case eoOp::quadratic : return _store.storeFunctor(new eoQuadGenOp(static_cast&>(_op))); + case eoOp::general : return static_cast&>(_op); + } + } #endif diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 4db408a3e..6af2ff2df 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -104,10 +104,11 @@ class eoInitAdaptor : public eoMonOp { public : eoInitAdaptor(eoInit& _init) : init(_init) {} - - void operator()(EOT& _eot) + + bool operator()(EOT& _eot) { init(_eot); + return true; } private : diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h new file mode 100644 index 000000000..711456e6b --- /dev/null +++ b/eo/src/eoInvalidateOps.h @@ -0,0 +1,118 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInvalidateOps.h +// (c) Maarten Keijzer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInvalidateOps_h +#define _eoInvalidateOps_h + +#include + +/** +One of the invalidator operators. Use this one as a 'hat' on an operator +that is defined to work on a generic datatype. This functor will then check +the return type of the operator and invalidate the fitness of the individual. + +This functor is used in algorithms that work with straight eoMonOp, eoBinOp +or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators +generally do invalidate the fitness of the objects they have changed. +*/ + +template +class eoInvalidateMonOp : public eoMonOp +{ + public: + eoInvalidateMonOp(eoMonOp& _op) : op(_op) {} + + bool operator()(EOT& _eo) + { + if (op(_eo)) + _eo.invalidate(); + + return false; // we did change the thing, but it is already invalidated + } + + private: + eoMonOp& op; +}; + +/** +One of the invalidator operators. Use this one as a 'hat' on an operator +that is defined to work on a generic datatype. This functor will then check +the return type of the operator and invalidate the fitness of the individual. + +This functor is used in algorithms that work with straight eoMonOp, eoBinOp +or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators +generally do invalidate the fitness of the objects they have changed. +*/ + +template +class eoInvalidateBinOp : public eoBinOp +{ + public: + eoInvalidateBinOp(eoBinOp& _op) : op(_op) {} + + bool operator()(EOT& _eo, const EOT& _eo2) + { + if (op(_eo, _eo2)) + _eo.invalidate(); + + return false; // we did change the thing, but it is already invalidated + } + + private: + eoBinOp& op; +}; + +/** +One of the invalidator operators. Use this one as a 'hat' on an operator +that is defined to work on a generic datatype. This functor will then check +the return type of the operator and invalidate the fitness of the individual. + +This functor is used in algorithms that work with straight eoMonOp, eoBinOp +or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators +generally do invalidate the fitness of the objects they have changed. +*/ + +template +class eoInvalidateQuadOp : public eoQuadOp +{ + public: + eoInvalidateQuadOp(eoQuadOp& _op) : op(_op) {} + + bool operator()(EOT& _eo1, EOT& _eo2) + { + if (op(_eo1, _eo2)) + { + _eo1.invalidate(); + _eo2.invalidate(); + } + return false; // we did change the thing, but it is already invalidated + } + + private: + eoQuadOp& op; +}; + +#endif diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index dfbaecab8..607962f3f 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -29,23 +29,23 @@ #include #include /** -\defgroup operators +\defgroup Operators Genetic Operators are used for various purposes */ /** @name Genetic operators -What is a genetic algorithm without genetic operators? -There is a genetic operator hierarchy, with eoOp as father and -eoMonOp (monary or unary operator), eoBinOp and eoQuadOp (binary operators) +What is a genetic algorithm without genetic operators? +There is a genetic operator hierarchy, with eoOp as father and +eoMonOp (monary or unary operator), eoBinOp and eoQuadOp (binary operators) and eoGenOp (any number of inputs and outputs, see eoGenOp.h) -as subclasses. -Nobody should subclass eoOp, you should subclass eoGenOp, eoBinOp, eoQuadOp -or eoMonOp, those are the ones actually used here. +as subclasses. +Nobody should subclass eoOp, you should subclass eoGenOp, eoBinOp, eoQuadOp +or eoMonOp, those are the ones actually used here. -#eoOp#s are only printable objects, so if you want to build them -from a file, it has to be done in another class, namely factories. -Each hierarchy of #eoOp#s should have its own factory, which know +#eoOp#s are only printable objects, so if you want to build them +from a file, it has to be done in another class, namely factories. +Each hierarchy of #eoOp#s should have its own factory, which know how to build them from a description in a file. @author GeNeura Team, Marten Keijzer and Marc Schoenauer @@ -55,10 +55,13 @@ how to build them from a description in a file. /** Abstract data types for EO operators. - * Genetic operators act on chromosomes, changing them. The type to - * instantiate them should be an eoObject, but in any case, they are - * type-specific; each kind of evolvable object can have its own operators - */ + Genetic operators act on chromosomes, changing them. + The type to use them on is problem specific. If your genotype + is a vector, there are operators that work specifically + on vector, but you might also find that generic operators + working on vector are what you need. + +*/ template class eoOp @@ -88,9 +91,13 @@ private: OpType opType; }; -/** eoMonOp is the monary operator: genetic operator that takes only one EO */ +/** +eoMonOp is the monary operator: genetic operator that takes only one EO. +When defining your own, make sure that you return a boolean value +indicating that you have changed the content. +*/ template -class eoMonOp: public eoOp, public eoUF +class eoMonOp: public eoOp, public eoUF { public: /// Ctor @@ -100,11 +107,13 @@ public: }; -/** Binary genetic operator: subclasses eoOp, and defines basically the +/** Binary genetic operator: subclasses eoOp, and defines basically the * operator() with two operands, only the first one can be modified +When defining your own, make sure that you return a boolean value +indicating that you have changed the content. */ template -class eoBinOp: public eoOp, public eoBF +class eoBinOp: public eoOp, public eoBF { public: /// Ctor @@ -113,11 +122,13 @@ public: virtual string className() const {return "eoBinOp";}; }; -/** Quad genetic operator: subclasses eoOp, and defines basically the +/** Quad genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. +When defining your own, make sure that you return a boolean value +indicating that you have changed the content. */ template -class eoQuadOp: public eoOp, public eoBF { +class eoQuadOp: public eoOp, public eoBF { public: /// Ctor eoQuadOp() @@ -138,15 +149,15 @@ public: /** Operator() simply calls embedded quadOp operator() with dummy second arg */ - void operator()(EOT & _eo1, const EOT & _eo2) + bool operator()(EOT & _eo1, const EOT & _eo2) { EOT eoTmp = _eo2; // a copy that can be modified - // if the embedded eoQuadOp is not symmetrical, + // if the embedded eoQuadOp is not symmetrical, // the result might be biased - hence the flip ... if (eo::rng.flip(0.5)) - quadOp(_eo1, eoTmp); // both are modified - that's all + return quadOp(_eo1, eoTmp); // both are modified - that's all else - quadOp(eoTmp, _eo1); // both are modified - that's all + return quadOp(eoTmp, _eo1); // both are modified - that's all } private: diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index fd64289b9..150534852 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -1,9 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoOpContainer.h +// eoOpContainer.h // (c) Maarten Keijzer and Marc Schoenauer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -29,13 +29,13 @@ #include /** eoOpContainer is a base class for the sequential and proportional selectors - * It takes care of wrapping the other operators, + * It takes care of wrapping the other operators, * and deleting stuff that it has allocated * * Warning: all operators are added together with a rate (double) - * However, the meaning of this rate will be different in - * the differnet instances of eoOpContainer: - * an ***absolute*** probability in the sequential version, and + * However, the meaning of this rate will be different in + * the differnet instances of eoOpContainer: + * an ***absolute*** probability in the sequential version, and * a ***relative*** weight in the proportional version */ template @@ -43,15 +43,11 @@ class eoOpContainer : public eoGenOp { public : /** Ctor: nothing much to do */ - eoOpContainer() : max_to_produce(0) {} + eoOpContainer() : max_to_produce(2) {} /** Dtor: delete all the GenOps created when wrapping simple ops */ - virtual ~eoOpContainer(void) - { - for (unsigned i = 0; i < owned_genops.size(); ++i) - delete owned_genops[i]; - } + virtual ~eoOpContainer(void) {} /** for memory management (doesn't have to be very precise */ virtual unsigned max_production(void) @@ -59,57 +55,16 @@ class eoOpContainer : public eoGenOp return max_to_produce; } - /** wraps then add a simple eoMonOp */ - void add(eoMonOp& _op, double _rate) + /** + Add an operator to the container, also give it a rate + + (sidenote, it's much less hairy since I added the wrap_op is used) + */ + void add(eoOp& _op, double _rate) { - owned_genops.push_back(new eoMonGenOp(_op)); - ops.push_back(owned_genops.back()); + ops.push_back(&wrap_op(_op, store)); rates.push_back(_rate); - - max_to_produce = max(max_to_produce,unsigned(1)); - } - - /** wraps then add a simple eoBinOp - * First case, no selector - */ - void add(eoBinOp& _op, double _rate) - { - owned_genops.push_back(new eoBinGenOp(_op)); - ops.push_back(owned_genops.back()); - rates.push_back(_rate); - - max_to_produce = max(max_to_produce,unsigned(1)); - } - - /** wraps then add a simple eoBinOp - * Second case: a sepecific selector - */ - void add(eoBinOp& _op, eoSelectOne & _sel, double _rate) - { - owned_genops.push_back(new eoSelBinGenOp(_op, _sel)); - ops.push_back(owned_genops.back()); - rates.push_back(_rate); - - max_to_produce = max(max_to_produce,unsigned(1)); - } - - /** wraps then add a simple eoQuadOp */ - void add(eoQuadOp& _op, double _rate) - { - owned_genops.push_back(new eoQuadGenOp(_op)); - ops.push_back(owned_genops.back()); - rates.push_back(_rate); - - max_to_produce = max(max_to_produce,unsigned(2)); -} - - /** can add any GenOp */ - void add(eoGenOp& _op, double _rate) - { - ops.push_back(&_op); - rates.push_back(_rate); - - max_to_produce = max(max_to_produce,_op.max_production()); + max_to_produce = max(max_to_produce,ops.back()->max_production()); } virtual string className() = 0; @@ -120,7 +75,7 @@ class eoOpContainer : public eoGenOp vector*> ops; private : - vector*> owned_genops; + eoFunctorStore store; unsigned max_to_produce; }; diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 20b3eb7a9..b36c1d2c1 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -28,19 +28,16 @@ #include #include #include -#include -#include -#include #include /** \defgroup PropCombined operators -Combination of same-type Genetic Operators - Proportional choice +Combination of same-type Genetic Operators - Proportional choice */ /** @name PropCombined Genetic operators -This files contains the classes eoPropCombinedXXXOp (XXX in {Mon, Bin, Quad}) -that allow to use more than a single operator of a specific class +This files contains the classes eoPropCombinedXXXOp (XXX in {Mon, Bin, Quad}) +that allow to use more than a single operator of a specific class into an algorithm, chosing by a roulette wheel based on user-defined rates @author Marc Schoenauer @@ -52,7 +49,7 @@ into an algorithm, chosing by a roulette wheel based on user-defined rates //// combined MonOp ////////////////////////////////////////////////////// -/** eoMonOp is the monary operator: genetic operator that takes only one EO +/** eoMonOp is the monary operator: genetic operator that takes only one EO * now accepts generic operators */ @@ -63,35 +60,16 @@ class eoPropCombinedMonOp: public eoMonOp public: /// Ctor from a "true" operator eoPropCombinedMonOp(eoMonOp & _first, const double _rate) - { - ops.push_back(&_first); - rates.push_back(_rate); - } - - /// Ctor from a generic operator - eoPropCombinedMonOp(eoGenericMonOp & _first, const double _rate) - { - eoGeneric2TrueMonOp *trueFirst = - new eoGeneric2TrueMonOp(_first); - ops.push_back(trueFirst); + { + ops.push_back(&_first); rates.push_back(_rate); } virtual string className() const { return "eoPropCombinedMonOp"; } virtual void add(eoMonOp & _op, const double _rate, bool _verbose=false) - { - ops.push_back(&_op); - rates.push_back(_rate); - // compute the relative rates in percent - to warn the user! - if (_verbose) - printOn(cout); - } - - virtual void add(eoGenericMonOp & _op, const double _rate, bool _verbose=false) - { - eoGeneric2TrueMonOp *trueOp = new eoGeneric2TrueMonOp(_op); - ops.push_back(trueOp); + { + ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) @@ -110,10 +88,10 @@ public: _os << ops[i]->className() << " with rate " << 100*rates[i]/total << " %\n"; } - virtual void operator()(EOT & _indi) + virtual bool operator()(EOT & _indi) { unsigned what = rng.roulette_wheel(rates); // choose one op - (*ops[what])(_indi); // apply it + return (*ops[what])(_indi); // apply it } protected: std::vector*> ops; @@ -124,7 +102,7 @@ std::vector rates; //// combined BinOp ////////////////////////////////////////////////////// -/** COmbined Binary genetic operator: +/** COmbined Binary genetic operator: * operator() has two operands, only the first one can be modified */ template @@ -133,16 +111,16 @@ class eoPropCombinedBinOp: public eoBinOp public: /// Ctor eoPropCombinedBinOp(eoBinOp & _first, const double _rate) - { - ops.push_back(&_first); + { + ops.push_back(&_first); rates.push_back(_rate); } virtual string className() const { return "eoPropCombinedBinOp"; } virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) - { - ops.push_back(&_op); + { + ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) @@ -160,7 +138,7 @@ virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) virtual void operator()(EOT & _indi1, const EOT & _indi2) { unsigned what = rng.roulette_wheel(rates); // choose one op index - (*ops[what])(_indi1, _indi2); // apply it + return (*ops[what])(_indi1, _indi2); // apply it } private: std::vector*> ops; @@ -172,13 +150,13 @@ std::vector rates; //// combined QuadOp ////////////////////////////////////////////////////// -/** Quad genetic operator: subclasses eoOp, and defines basically the +/** Quad genetic operator: subclasses eoOp, and defines basically the operator() with two operands, both can be modified. */ -/** Combined quad genetic operator: +/** Combined quad genetic operator: * operator() has two operands, both can be modified - * generic operators are now allowed: there are imbedded into + * generic operators are now allowed: there are imbedded into * the corresponding "true" operator */ template @@ -187,17 +165,8 @@ class eoPropCombinedQuadOp: public eoQuadOp public: /// Ctor from a true operator eoPropCombinedQuadOp(eoQuadOp & _first, const double _rate) - { - ops.push_back(&_first); - rates.push_back(_rate); - } - - /// Ctor from a generic operator - eoPropCombinedQuadOp(eoGenericQuadOp & _first, const double _rate) - { - eoGeneric2TrueQuadOp *trueFirst = - new eoGeneric2TrueQuadOp(_first); - ops.push_back(trueFirst); + { + ops.push_back(&_first); rates.push_back(_rate); } @@ -205,19 +174,8 @@ virtual string className() const { return "eoPropCombinedQuadOp"; } // addition of a true operator virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) - { - ops.push_back(&_op); - rates.push_back(_rate); - // compute the relative rates in percent - to warn the user! - if (_verbose) - printOn(cout); - } - - // addition of a generic operator -virtual void add(eoGenericQuadOp & _op, const double _rate, bool _verbose=false) - { - eoGeneric2TrueQuadOp *trueOp = new eoGeneric2TrueQuadOp(_op); - ops.push_back(trueOp); + { + ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) @@ -236,10 +194,10 @@ virtual void add(eoGenericQuadOp & _op, const double _rate, bool _verbose=f _os << ops[i]->className() << " with rate " << 100*rates[i]/total << " %\n"; } - virtual void operator()(EOT & _indi1, EOT & _indi2) + virtual bool operator()(EOT & _indi1, EOT & _indi2) { unsigned what = rng.roulette_wheel(rates); // choose one op index - (*ops[what])(_indi1, _indi2); // apply it + return (*ops[what])(_indi1, _indi2); // apply it } private: std::vector*> ops; @@ -247,6 +205,6 @@ std::vector rates; }; -// for General Ops, it's another story - see eoGOpSelector -#endif +// for General Ops, it's another story - +#endif diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 53054658e..3cd90fd06 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -27,7 +27,7 @@ #ifndef _eoSGA_h #define _eoSGA_h -#include +#include #include #include #include @@ -36,13 +36,13 @@ #include #include -/** The Simple Genetic Algorithm, following Holland and Goldberg - * Needs a selector (class eoSelectOne) a crossover (eoQuad, - * i.e. a 2->2 operator) and a mutation with their respective rates, - * of course an evaluation function (eoEvalFunc) and a continuator +/** The Simple Genetic Algorithm, following Holland and Goldberg + * Needs a selector (class eoSelectOne) a crossover (eoQuad, + * i.e. a 2->2 operator) and a mutation with their respective rates, + * of course an evaluation function (eoEvalFunc) and a continuator * (eoContinue) which gives the stopping criterion. Performs full * generational replacement. - */ + */ template class eoSGA : public eoAlgo @@ -57,8 +57,8 @@ public : eoMonOp& _mutate, float _mrate, eoEvalFunc& _eval, eoContinue& _cont) - : cont(_cont), - mutate(_mutate), + : cont(_cont), + mutate(_mutate), mutationRate(_mrate), cross(_cross), crossoverRate(_crate), @@ -68,42 +68,44 @@ public : void operator()(eoPop& _pop) { eoPop offspring; - + do { select(_pop, offspring); unsigned i; - - for (i=0; i<_pop.size()/2; i++) + + for (i=0; i<_pop.size()/2; i++) { - if ( rng.flip(crossoverRate) ) + if ( rng.flip(crossoverRate) ) { // this crossover generates 2 offspring from two parents cross(offspring[2*i], offspring[2*i+1]); } } - - for (i=0; i < _pop.size(); i++) + + for (i=0; i < _pop.size(); i++) { - if (rng.flip(mutationRate) ) + if (rng.flip(mutationRate) ) { mutate(offspring[i]); } } - + _pop.swap(offspring); apply(eval, _pop); - + } while (cont(_pop)); } - + private : eoContinue& cont; - eoMonOp& mutate; + /// eoInvalidateMonOp invalidates the embedded operator + eoInvalidateMonOp mutate; float mutationRate; - eoQuadOp& cross; + // eoInvalidateQuadOp invalidates the embedded operator + eoInvalidateQuadOp cross; float crossoverRate; eoSelectPerc select; eoEvalFunc& eval; diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 98af3dd50..e06aad6df 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoSGA.h // (c) Marc.Schoenauer 2000 - Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifndef _eoSGATransform_h #define _eoSGATransform_h -#include +#include #include /////////////////////////////////////////////////////////////////////////////// @@ -148,16 +148,16 @@ template class eoDynSGATransform : public eoTransform }; // accessors - mainly for EASEA double & PCrossHandle() { return crossoverProba;} - double & PMutHandle() { return mutationProba;} + double & PMutHandle() { return mutationProba;} private: // difference with eoSGATransform: the operator probabilities // they can be passed by reference or by value. // hence we need here to use a reference, and to eventually store a value - eoQuadOp& cross; + eoInvalidateQuadOp cross; double crossoverProbaHolder; // the value, used only if ctor gets a value double& crossoverProba; // the reference, to be used in operator() - eoMonOp& mutate; + eoInvalidateMonOp mutate; double mutationProbaHolder; // the value, used only if ctor gets a value double& mutationProba; // the reference, to be used in operator() }; diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 9e6aa72f5..72f7cba5a 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -29,13 +29,12 @@ #include #include -#include -#include +#include /** - Base classes for generic crossovers on variable length chromosomes. + Base classes for generic crossovers on variable length chromosomes. -Basically, they exchange genes - we need some matching information to apply +Basically, they exchange genes - we need some matching information to apply atom crossover */ @@ -79,17 +78,17 @@ private: */ template -class eoVlAtomExchangeQuadOp : public eoGenericQuadOp +class eoVlAtomExchangeQuadOp : public eoQuadOp { public : - + typedef typename EOT::AtomType AtomType; - + // default ctor: requires bounds on number of genes + a rate - eoVlAtomExchangeQuadOp(unsigned _Min, unsigned _Max, - eoAtomExchange& _atomExchange): + eoVlAtomExchangeQuadOp(unsigned _Min, unsigned _Max, + eoAtomExchange& _atomExchange): Min(_Min), Max(_Max), atomExchange(_atomExchange) {} - + bool operator()(EOT & _eo1, EOT & _eo2) { EOT tmp1, tmp2; // empty individuals @@ -116,8 +115,8 @@ public : i1++; } index++; - } while ( ( (i1Max) || (i2>Max) ) + } while ( ( (i1Max) || (i2>Max) ) && (index<10000) ); if (index >= 10000) { @@ -157,21 +156,21 @@ private: A very primitive version, that does no verification at all!!! NEEDS to be improved - but no time now :-((( Especially, if both guys have maximal size, it will take a lot of time -to generate 2 offspring that both are not oversized!!! +to generate 2 offspring that both are not oversized!!! Also, we should first check for identical atoms, and copy them to the offspring, and only after that exchange the other ones (Radcliffe's RRR). */ template -class eoVlUniformQuadOp : public eoGenericQuadOp +class eoVlUniformQuadOp : public eoQuadOp { public : - + typedef typename EOT::AtomType AtomType; - + // default ctor: requires bounds on number of genes + a rate - eoVlUniformQuadOp(unsigned _Min, unsigned _Max, double _rate=0.5) : + eoVlUniformQuadOp(unsigned _Min, unsigned _Max, double _rate=0.5) : Min(_Min), Max(_Max), rate(_rate) {} - + bool operator()(EOT & _eo1, EOT & _eo2) { unsigned i; @@ -194,7 +193,7 @@ public : tmp2.push_back(_eo2[i]); } index++; - } while ( ( (tmp1.size()Max) || (tmp2.size()>Max) ) && (index<10000) ); if (index >= 10000) @@ -218,21 +217,21 @@ private: A very primitive version, that does no verification at all!!! NEEDS to be improved - but no time now :-((( Especially, if both guys have maximal size, it will take some time -to generate even 1 offspring that is not oversized!!! +to generate even 1 offspring that is not oversized!!! Also, we should first check for identical atoms, and copy them to the offspring, and only after that exchange the other ones (Radcliffe's RRR). */ template -class eoVlUniformBinOp : public eoGenericBinOp +class eoVlUniformBinOp : public eoBinOp { public : typedef typename EOT::AtomType AtomType; - + // default ctor: requires bounds on number of genes + a rate - eoVlUniformBinOp(unsigned _Min, unsigned _Max, double _rate=0.5) : + eoVlUniformBinOp(unsigned _Min, unsigned _Max, double _rate=0.5) : Min(_Min), Max(_Max), rate(_rate) {} - + bool operator()(EOT & _eo1, const EOT & _eo2) { unsigned i; @@ -248,7 +247,7 @@ public : tmpIsTwo = false; } else - tmpIsOne=false; + tmpIsOne=false; // we should look for _eo1[i] inside _eo2 and erase it there if found! } for (i=0; i<_eo2.size(); i++) diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index a23f0b882..6bea7d118 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoVariableLengthMutation.h // (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -29,10 +29,10 @@ #include #include -#include +#include /** - Base classes for generic mutations on variable length chromosomes. + Base classes for generic mutations on variable length chromosomes. THey all require a generic mutation for their simple genes */ @@ -40,16 +40,16 @@ THey all require a generic mutation for their simple genes /** THis ones applies its atomic mutation to all the genes */ template -class eoVlAllMutation : public eoGenericMonOp +class eoVlAllMutation : public eoMonOp { public : - + typedef typename EOT::AtomType AtomType; - + // default ctor: requires an Atom mutation - eoVlAllMutation(eoGenericMonOp & _atomMutation) : + eoVlAllMutation(eoMonOp & _atomMutation) : atomMutation(_atomMutation) {} - + bool operator()(EOT & _eo) { bool modified=false; @@ -61,23 +61,23 @@ public : return modified; } private: - eoGenericMonOp & atomMutation; + eoMonOp & atomMutation; }; -/** This ones applies its atomic mutation to a fixed +/** This ones applies its atomic mutation to a fixed number of genes (1 by default) */ template -class eoVlKMutation : public eoGenericMonOp +class eoVlKMutation : public eoMonOp { public : - + typedef typename EOT::AtomType AtomType; - + // default ctor: requires an Atom mutation - eoVlKMutation(eoGenericMonOp & _atomMutation, unsigned _nb=1) : + eoVlKMutation(eoMonOp & _atomMutation, unsigned _nb=1) : nb(_nb), atomMutation(_atomMutation) {} - + bool operator()(EOT & _eo) { bool modified=false; @@ -91,7 +91,7 @@ public : } private: unsigned nb; - eoGenericMonOp & atomMutation; + eoMonOp & atomMutation; }; /** Addition of a gene @@ -99,20 +99,20 @@ private: order-dependent and order-independent */ template -class eoVlAddMutation : public eoGenericMonOp +class eoVlAddMutation : public eoMonOp { public : - + typedef typename EOT::AtomType AtomType; - - /** default ctor + + /** default ctor * @param nMax max number of atoms * @param _atomInit an Atom initializer */ - eoVlAddMutation(unsigned _nMax, eoInit & _atomInit) : + eoVlAddMutation(unsigned _nMax, eoInit & _atomInit) : nMax(_nMax), atomInit(_atomInit) {} - + bool operator()(EOT & _eo) { if (_eo.size() >= nMax) @@ -150,27 +150,27 @@ public: can of course be applied to both order-dependent and order-independent */ template -class eoVlDelMutation : public eoGenericMonOp +class eoVlDelMutation : public eoMonOp { public : - + typedef typename EOT::AtomType AtomType; - + /** ctor with an external gene chooser * @param nMin min number of atoms t oleave in the individual * @param _geneChooser an eoGeneCHooser to choose which one to delete */ - eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : + eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : nMin(_nMin), uChooser(), chooser(_chooser) {} - + /** ctor with unifirm gebe chooser * @param nMin min number of atoms t oleave in the individual */ - eoVlDelMutation(unsigned _nMin) : + eoVlDelMutation(unsigned _nMin) : nMin(_nMin), uChooser(), chooser(uChooser) {} - + bool operator()(EOT & _eo) { if (_eo.size() <= nMin) diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 7521eb040..9b453ecdf 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -80,22 +80,22 @@ public: /// needed virtual dtor virtual ~eoEsMutate() {}; - - /** Inherited from eoObject + + /** Inherited from eoObject @see eoObject */ virtual string className() const {return "eoESMutate";}; - + /** Mutate eoEsSimple */ - virtual void operator()( eoEsSimple& _eo) + virtual bool operator()( eoEsSimple& _eo) { - _eo.stdev *= exp(TauLcl * rng.normal()); + _eo.stdev *= exp(TauLcl * rng.normal()); if (_eo.stdev < stdev_eps) _eo.stdev = stdev_eps; - + // now apply to all for (unsigned i = 0; i < _eo.size(); ++i) @@ -104,40 +104,40 @@ public: } bounds.foldsInBounds(_eo); - _eo.invalidate(); + return true; } - + /// mutations - standard and correlated - // ========= + // ========= /* - * Standard mutation of object variables and standard - * deviations in ESs. - * If there are fewer different standard deviations available - * than the dimension of the objective function requires, the + * Standard mutation of object variables and standard + * deviations in ESs. + * If there are fewer different standard deviations available + * than the dimension of the objective function requires, the * last standard deviation is responsible for ALL remaining * object variables. * Schwefel 1977: Numerische Optimierung von Computer-Modellen * mittels der Evolutionsstrategie, pp. 165 ff. */ - virtual void operator()( eoEsStdev& _eo ) + virtual bool operator()( eoEsStdev& _eo ) { double global = exp(TauGlb * rng.normal()); - for (unsigned i = 0; i < _eo.size(); i++) + for (unsigned i = 0; i < _eo.size(); i++) { double stdev = _eo.stdevs[i]; - stdev *= global * exp(TauLcl * rng.normal()); + stdev *= global * exp(TauLcl * rng.normal()); if (stdev < stdev_eps) stdev = stdev_eps; - _eo.stdevs[i] = stdev; + _eo.stdevs[i] = stdev; _eo[i] += stdev * rng.normal(); } bounds.foldsInBounds(_eo); - _eo.invalidate(); + return true; } /* @@ -148,43 +148,43 @@ public: * G. Rudolph: Globale Optimierung mit parallelen Evolutions- * strategien, Diploma Thesis, University of Dortmund, 1990 */ - - // Code from Thomas Baeck - - virtual void operator()( eoEsFull & _eo ) + + // Code from Thomas Baeck + + virtual bool operator()( eoEsFull & _eo ) { /* * First: mutate standard deviations (as above). */ - + double global = exp(TauGlb * rng.normal()); unsigned i; - for (i = 0; i < _eo.size(); i++) + for (i = 0; i < _eo.size(); i++) { double stdev = _eo.stdevs[i]; - stdev *= global * exp(TauLcl * rng.normal()); + stdev *= global * exp(TauLcl * rng.normal()); if (stdev < stdev_eps) stdev = stdev_eps; - _eo.stdevs[i] = stdev; + _eo.stdevs[i] = stdev; } - + /* * Mutate rotation angles. */ - - for (i = 0; i < _eo.correlations.size(); i++) + + for (i = 0; i < _eo.correlations.size(); i++) { - _eo.correlations[i] += TauBeta * rng.normal(); - if ( fabs(_eo.correlations[i]) > M_PI ) + _eo.correlations[i] += TauBeta * rng.normal(); + if ( fabs(_eo.correlations[i]) > M_PI ) { _eo.correlations[i] -= M_PI * (int) (_eo.correlations[i]/M_PI) ; } } - + /* * Perform correlated mutations. */ @@ -192,17 +192,17 @@ public: double d1,d2, S, C; vector VarStp(_eo.size()); - for (i = 0; i < _eo.size(); i++) + for (i = 0; i < _eo.size(); i++) VarStp[i] = _eo.stdevs[i] * rng.normal(); unsigned nq = _eo.correlations.size() - 1; - for (k = 0; k < _eo.size()-1; k++) + for (k = 0; k < _eo.size()-1; k++) { n1 = _eo.size() - k - 1; n2 = _eo.size() - 1; - - for (i = 0; i < k; i++) + + for (i = 0; i < k; i++) { d1 = VarStp[n1]; d2 = VarStp[n2]; @@ -214,13 +214,13 @@ public: nq--; } } - - for (i = 0; i < _eo.size(); i++) + + for (i = 0; i < _eo.size(); i++) _eo[i] += VarStp[i]; bounds.foldsInBounds(_eo); - - _eo.invalidate(); + + return true; } private : @@ -243,14 +243,14 @@ public: TauLcl /= sqrt( 2.0 * sqrt( (double)size ) ); TauGlb /= sqrt( 2.0 * ( (double) size ) ); } - + void init(eoEsFull, eoEsMutationInit& _init) { init(eoEsStdev(), _init); TauBeta = _init.TauBeta(); } - // the data + // the data //========= double TauLcl; /* Local factor for mutation of std deviations */ double TauGlb; /* Global factor for mutation of std deviations */ diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h index 035cdf782..c13adf6ec 100644 --- a/eo/src/es/eoEsStdevXOver.h +++ b/eo/src/es/eoEsStdevXOver.h @@ -33,10 +33,10 @@ /** \ingroup EvolutionStrategies -Crossover for Evolutionary strategie style representation, - supporting co-evolving standard deviations. +Crossover for Evolutionary strategie style representation, + supporting co-evolving standard deviations. -Simply calls a crossover for the object variables, +Simply calls a crossover for the object variables, and a crossover for teh StdDev */ @@ -44,26 +44,30 @@ template class eoEsStdevXOver : public eoQuadOp { public : - eoEsStdevXOver(eoGenericQuadOp > & _objectXOver, - eoGenericQuadOp > & _stdDevXOver) : + eoEsStdevXOver(eoQuadOp > & _objectXOver, + eoQuadOp > & _stdDevXOver) : objectXOver(_objectXOver), stdDevXOver(_stdDevXOver) {} std::string className(void) const { return "eoEsStdevXOver"; } - void operator()(EOT & _eo1, EOT & _eo2) + bool operator()(EOT & _eo1, EOT & _eo2) { bool objectChanged = objectXOver(_eo1, _eo2); // as vector bool stdDevChanged = stdDevXOver(_eo1.stdevs, _eo2.stdevs); + + /// Marc, I didn't change it, but if only the stdev has changed, + /// doesn't that mean that the fitness is stil valid. Maarten if ( objectChanged || stdDevChanged ) { - _eo1.invalidate(); - _eo2.invalidate(); + return true; } + + return false; } private: - eoGenericQuadOp > & objectXOver; - eoGenericQuadOp > & stdDevXOver; + eoQuadOp > & objectXOver; + eoQuadOp > & stdDevXOver; }; /* A question: it seems it really makes no difference to have diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h index c29fd1629..d037df8d7 100644 --- a/eo/src/es/eoGenericRealOp.h +++ b/eo/src/es/eoGenericRealOp.h @@ -31,27 +31,26 @@ in eoRealOp.h. So they can be used when part of the genotype is a vector ... In the long run, they should replace completely the operators from eoRealOp -when all constructs using eoOp will be able to use the corresponding +when all constructs using eoOp will be able to use the corresponding eoGenericOp - as it is already done in eoProportinoalCombinedOp MS January 25. 2001 */ #include // swap_ranges #include -#include -#include +#include #include //----------------------------------------------------------------------------- -/** eoUniformMutation --> changes all values of the vector - by uniform choice with range epsilon +/** eoUniformMutation --> changes all values of the vector + by uniform choice with range epsilon with probability p_change per variable \class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ -template class eoGenericUniformMutation: public eoGenericMonOp +template class eoGenericUniformMutation: public eoMonOp { public: /** @@ -61,8 +60,8 @@ template class eoGenericUniformMutation: public eoGenericMonOp * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoGenericUniformMutation(const double& _epsilon, - const double& _p_change = 1.0): + eoGenericUniformMutation(const double& _epsilon, + const double& _p_change = 1.0): bounds(eoDummyVectorNoBounds), epsilon(_epsilon), p_change(_p_change) {} /** @@ -71,23 +70,23 @@ template class eoGenericUniformMutation: public eoGenericMonOp * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoGenericUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const double& _p_change = 1.0): + eoGenericUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const double& _p_change = 1.0): bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} /// The class name. string className() const { return "eoGenericUniformMutation"; } - + /** * Do it! * @param _eo The cromosome undergoing the mutation */ - bool operator()(EOT& _eo) + bool operator()(EOT& _eo) { bool hasChanged=false; - for (unsigned lieu=0; lieu<_eo.size(); lieu++) + for (unsigned lieu=0; lieu<_eo.size(); lieu++) { - if (rng.flip(p_change)) + if (rng.flip(p_change)) { // check the bounds double emin = _eo[lieu]-epsilon; @@ -104,21 +103,21 @@ template class eoGenericUniformMutation: public eoGenericMonOp return true; return false; } - + private: eoRealVectorBounds & bounds; double epsilon; double p_change; }; -/** eoDetUniformMutation --> changes exactly k values of the vector - by uniform choice with range epsilon +/** eoDetUniformMutation --> changes exactly k values of the vector + by uniform choice with range epsilon \class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ -template class eoGenericDetUniformMutation: - public eoGenericMonOp +template class eoGenericDetUniformMutation: + public eoMonOp { public: /** @@ -126,8 +125,8 @@ template class eoGenericDetUniformMutation: * @param _epsilon the range for uniform nutation * @param number of coordinate to modify */ - eoGenericDetUniformMutation(const double& _epsilon, - const unsigned& _no = 1): + eoGenericDetUniformMutation(const double& _epsilon, + const unsigned& _no = 1): bounds(eoDummyVectorNoBounds), epsilon(_epsilon), no(_no) {} /** @@ -136,18 +135,18 @@ template class eoGenericDetUniformMutation: * @param _epsilon the range for uniform nutation * @param number of coordinate to modify */ - eoGenericDetUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const unsigned& _no = 1): + eoGenericDetUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const unsigned& _no = 1): bounds(_bounds), epsilon(_epsilon), no(_no) {} /// The class name. string className() const { return "eoGenericDetUniformMutation"; } - + /** * Do it! * @param _eo The cromosome undergoing the mutation */ - bool operator()(EOT& _eo) + bool operator()(EOT& _eo) { for (unsigned i=0; i uniform choice in segment +/** eoSegmentCrossover --> uniform choice in segment == arithmetical with same value along all coordinates \class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ -template class eoGenericSegmentCrossover: public eoGenericQuadOp +template class eoGenericSegmentCrossover: public eoQuadOp { public: /** * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive */ - eoGenericSegmentCrossover(const double& _alpha = 0.0) : + eoGenericSegmentCrossover(const double& _alpha = 0.0) : bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) {} /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive */ - eoGenericSegmentCrossover(eoRealVectorBounds & _bounds, - const double& _alpha = 0.0) : + eoGenericSegmentCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0) : bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} /// The class name. @@ -216,12 +215,12 @@ template class eoGenericSegmentCrossover: public eoGenericQuadOp * @param _eo1 The first parent * @param _eo2 The first parent */ - bool operator()(EOT& _eo1, EOT& _eo2) + bool operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, fact; double alphaMin = -alpha; - double alphaMax = 1+alpha; + double alphaMax = 1+alpha; if ( (alpha == 0.0) || bounds.hasNoBoundAtAll() ) // no check to perform fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) else // look for the bounds for fact @@ -238,7 +237,7 @@ template class eoGenericSegmentCrossover: public eoGenericQuadOp { alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); - } + } if (bounds.isMaxBounded(i)) { alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); @@ -264,28 +263,28 @@ protected: double alpha; double range; // == 1+2*alpha }; - -/** eoArithmeticCrossover --> uniform choice in hypercube + +/** eoArithmeticCrossover --> uniform choice in hypercube == arithmetical with different values for each coordinate \class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ -template class eoGenericArithmeticCrossover: - public eoGenericQuadOp +template class eoGenericArithmeticCrossover: + public eoQuadOp { public: /** * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive */ - eoGenericArithmeticCrossover(const double& _alpha = 0.0): - bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) + eoGenericArithmeticCrossover(const double& _alpha = 0.0): + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) throw runtime_error("BLX coefficient should be positive"); @@ -294,14 +293,14 @@ template class eoGenericArithmeticCrossover: /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive */ - eoGenericArithmeticCrossover(eoRealVectorBounds & _bounds, - const double& _alpha = 0.0): - bounds(_bounds), alpha(_alpha), range(1+2*_alpha) + eoGenericArithmeticCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0): + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) throw runtime_error("BLX coefficient should be positive"); @@ -315,7 +314,7 @@ template class eoGenericArithmeticCrossover: * @param _eo1 The first parent * @param _eo2 The first parent */ - bool operator()(EOT& _eo1, EOT& _eo2) + bool operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, fact; @@ -344,7 +343,7 @@ template class eoGenericArithmeticCrossover: { alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); - } + } if (bounds.isMaxBounded(i)) { alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); @@ -363,14 +362,14 @@ protected: double alpha; double range; // == 1+2*alphaMin }; - + /** eoRealUxOver --> Uniform crossover, also termed intermediate crossover \class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ -template class eoGenericRealUxOver: public eoGenericQuadOp +template class eoGenericRealUxOver: public eoQuadOp { public: /** @@ -378,7 +377,7 @@ template class eoGenericRealUxOver: public eoGenericQuadOp * @param _preference bias in the choice (usually, no bias == 0.5) */ eoGenericRealUxOver(double _preference = 0.5): preference(_preference) - { + { if ( (_preference <= 0.0) || (_preference >= 1.0) ) runtime_error("UxOver --> invalid preference"); } @@ -392,10 +391,10 @@ template class eoGenericRealUxOver: public eoGenericQuadOp * @param _eo2 The second parent * @runtime_error if sizes don't match */ - bool operator()(EOT& _eo1, EOT& _eo2) + bool operator()(EOT& _eo1, EOT& _eo2) { - if ( _eo1.size() != _eo2.size()) - runtime_error("eoRealUxOver --> chromosomes sizes don't match" ); + if ( _eo1.size() != _eo2.size()) + runtime_error("eoRealUxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i<_eo1.size(); i++) { @@ -415,7 +414,7 @@ template class eoGenericRealUxOver: public eoGenericQuadOp private: double preference; }; - + //----------------------------------------------------------------------------- //@} diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 922ee6aa9..3398e7a05 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -41,7 +41,7 @@ * to enable dynamic mutations (see eoOenFithMutation below). * * As for the bounds, the values are here folded back into the bounds. - * The other possiblity would be to iterate until we fall inside the bounds - + * The other possiblity would be to iterate until we fall inside the bounds - * but this sometimes takes a long time!!! */ @@ -55,7 +55,7 @@ template class eoNormalMutation: public eoMonOp * @param _sigma the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoNormalMutation(double & _sigma, const double& _p_change = 1.0): + eoNormalMutation(double & _sigma, const double& _p_change = 1.0): sigma(_sigma), bounds(eoDummyVectorNoBounds), p_change(_p_change) {} /** @@ -64,33 +64,32 @@ template class eoNormalMutation: public eoMonOp * @param _sigma the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoNormalMutation(eoRealVectorBounds & _bounds, - double & _sigma, const double& _p_change = 1.0): + eoNormalMutation(eoRealVectorBounds & _bounds, + double & _sigma, const double& _p_change = 1.0): sigma(_sigma), bounds(_bounds), p_change(_p_change) {} /// The class name. string className() const { return "eoNormalMutation"; } - + /** * Do it! * @param _eo The cromosome undergoing the mutation */ - void operator()(EOT& _eo) + bool operator()(EOT& _eo) { bool hasChanged=false; - for (unsigned lieu=0; lieu<_eo.size(); lieu++) + for (unsigned lieu=0; lieu<_eo.size(); lieu++) { - if (rng.flip(p_change)) + if (rng.flip(p_change)) { _eo[lieu] += sigma*rng.normal(); bounds.foldsInBounds(lieu, _eo[lieu]); hasChanged = true; } } - if (hasChanged) - _eo.invalidate(); + return hasChanged; } - + protected: double & sigma; private: @@ -98,9 +97,9 @@ private: double p_change; }; -/** the dynamic version: just say it is updatable - +/** the dynamic version: just say it is updatable - * and write the update() method! - * here the 1 fifth rule: count the proportion of successful mutations, and + * here the 1 fifth rule: count the proportion of successful mutations, and * increase sigma if more than threshold (1/5 !) */ diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 052386715..b13619d6c 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -35,8 +35,8 @@ //----------------------------------------------------------------------------- -/** eoUniformMutation --> changes all values of the vector - by uniform choice with range epsilon +/** eoUniformMutation --> changes all values of the vector + by uniform choice with range epsilon with probability p_change per variable \class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric @@ -52,7 +52,7 @@ template class eoUniformMutation: public eoMonOp * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): + eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): bounds(eoDummyVectorNoBounds), epsilon(_epsilon), p_change(_p_change) {} /** @@ -61,23 +61,23 @@ template class eoUniformMutation: public eoMonOp * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const double& _p_change = 1.0): + eoUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const double& _p_change = 1.0): bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} /// The class name. string className() const { return "eoUniformMutation"; } - + /** * Do it! * @param _eo The cromosome undergoing the mutation */ - void operator()(EOT& _eo) + bool operator()(EOT& _eo) { bool hasChanged=false; - for (unsigned lieu=0; lieu<_eo.size(); lieu++) + for (unsigned lieu=0; lieu<_eo.size(); lieu++) { - if (rng.flip(p_change)) + if (rng.flip(p_change)) { // check the bounds double emin = _eo[lieu]-epsilon; @@ -90,18 +90,17 @@ template class eoUniformMutation: public eoMonOp hasChanged = true; } } - if (hasChanged) - _eo.invalidate(); + return hasChanged; } - + private: eoRealVectorBounds & bounds; double epsilon; double p_change; }; -/** eoDetUniformMutation --> changes exactly k values of the vector - by uniform choice with range epsilon +/** eoDetUniformMutation --> changes exactly k values of the vector + by uniform choice with range epsilon \class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ @@ -114,7 +113,7 @@ template class eoDetUniformMutation: public eoMonOp * @param _epsilon the range for uniform nutation * @param number of coordinate to modify */ - eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): + eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): bounds(eoDummyVectorNoBounds), epsilon(_epsilon), no(_no) {} /** @@ -134,12 +133,11 @@ template class eoDetUniformMutation: public eoMonOp * Do it! * @param _eo The cromosome undergoing the mutation */ - void operator()(EOT& _eo) + bool operator()(EOT& _eo) { - _eo.invalidate(); for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp if (bounds.isMaxBounded(lieu)) emax = min(bounds.maximum(lieu), emax); _eo[lieu] = emin + (emax-emin)*rng.uniform(); - } + } + + return true; } private: @@ -162,7 +162,7 @@ private: // two arithmetical crossovers -/** eoSegmentCrossover --> uniform choice in segment +/** eoSegmentCrossover --> uniform choice in segment == arithmetical with same value along all coordinates \class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric @@ -175,12 +175,12 @@ template class eoSegmentCrossover: public eoQuadOp * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive */ - eoSegmentCrossover(const double& _alpha = 0.0) : + eoSegmentCrossover(const double& _alpha = 0.0) : bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) {} /** @@ -203,12 +203,12 @@ template class eoSegmentCrossover: public eoQuadOp * @param _eo1 The first parent * @param _eo2 The first parent */ - void operator()(EOT& _eo1, EOT& _eo2) + bool operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, fact; double alphaMin = -alpha; - double alphaMax = 1+alpha; + double alphaMax = 1+alpha; if (alpha == 0.0) // no check to perform fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) else // look for the bounds for fact @@ -225,7 +225,7 @@ template class eoSegmentCrossover: public eoQuadOp { alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); - } + } if (bounds.isMaxBounded(i)) { alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); @@ -243,8 +243,7 @@ template class eoSegmentCrossover: public eoQuadOp _eo1[i] = fact * r1 + (1-fact) * r2; _eo2[i] = (1-fact) * r1 + fact * r2; } - _eo1.invalidate(); // shoudl test if fact was 0 or 1 :-))) - _eo2.invalidate(); + return true; // shoudl test if fact was 0 or 1 :-))) } protected: @@ -252,8 +251,8 @@ protected: double alpha; double range; // == 1+2*alpha }; - -/** eoArithmeticCrossover --> uniform choice in hypercube + +/** eoArithmeticCrossover --> uniform choice in hypercube == arithmetical with different values for each coordinate \class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric @@ -266,13 +265,13 @@ template class eoArithmeticCrossover: public eoQuadOp * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alphaMin the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive */ - eoArithmeticCrossover(const double& _alpha = 0.0): - bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) + eoArithmeticCrossover(const double& _alpha = 0.0): + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) throw runtime_error("BLX coefficient should be positive"); @@ -302,7 +301,7 @@ template class eoArithmeticCrossover: public eoQuadOp * @param _eo1 The first parent * @param _eo2 The first parent */ - void operator()(EOT& _eo1, EOT& _eo2) + bool operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, fact; @@ -331,7 +330,7 @@ template class eoArithmeticCrossover: public eoQuadOp { alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); - } + } if (bounds.isMaxBounded(i)) { alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); @@ -342,16 +341,16 @@ template class eoArithmeticCrossover: public eoQuadOp _eo2[i] = (1-fact) * rmin + fact * rmax; } } - _eo1.invalidate(); - _eo2.invalidate(); - } + + return true; + } protected: eoRealVectorBounds & bounds; double alpha; double range; // == 1+2*alphaMin }; - + /** eoRealUxOver --> Uniform crossover, also termed intermediate crossover \class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h @@ -380,10 +379,10 @@ template class eoRealUxOver: public eoQuadOp * @param _eo2 The second parent * @runtime_error if sizes don't match */ - void operator()(EOT& _eo1, EOT& _eo2) + bool operator()(EOT& _eo1, EOT& _eo2) { - if ( _eo1.size() != _eo2.size()) - runtime_error("UxOver --> chromosomes sizes don't match" ); + if ( _eo1.size() != _eo2.size()) + runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i<_eo1.size(); i++) { @@ -396,11 +395,7 @@ template class eoRealUxOver: public eoQuadOp changed = true; } } - if (changed) - { - _eo1.invalidate(); - _eo2.invalidate(); - } + return changed; } private: float preference; diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index c798d9914..816d5cbe1 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -60,7 +60,7 @@ #include -/** eoBitFlip --> changes 1 bit +/** eoBitFlip --> changes 1 bit \class eoBitBitFlip eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -70,20 +70,20 @@ template class eoOneBitFlip: public eoMonOp public: /// The class name. string className() const { return "eoOneBitFlip"; } - + /** * Change one bit. * @param chrom The cromosome which one bit is going to be changed. */ - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { unsigned i = eo::rng.random(chrom.size()); chrom[i] = (chrom[i]) ? false : true; - chrom.invalidate(); + return true; } }; -/** eoDetBitFlip --> changes exactly k bits +/** eoDetBitFlip --> changes exactly k bits \class eoDetBitFlip eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -100,12 +100,12 @@ template class eoDetBitFlip: public eoMonOp /// The class name. string className() const { return "eoDetBitFlip"; } - + /** * Change num_bit bits. * @param chrom The cromosome which one bit is going to be changed. */ - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { // does not check for duplicate: if someone volunteers .... for (unsigned k=0; k class eoDetBitFlip: public eoMonOp unsigned i = eo::rng.random(chrom.size()); chrom[i] = (chrom[i]) ? false : true; } - chrom.invalidate(); + return true; } private: unsigned num_bit; }; -/** eoBitMutation --> classical mutation +/** eoBitMutation --> classical mutation \class eoBitMutation eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -141,7 +141,7 @@ template class eoBitMutation: public eoMonOp * Mutate a chromosome. * @param chrom The chromosome to be mutated. */ - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { bool changed_something = false; for (unsigned i = 0; i < chrom.size(); i++) @@ -151,16 +151,15 @@ template class eoBitMutation: public eoMonOp changed_something = true; } - if (changed_something) - chrom.invalidate(); + return changed_something; } - + private: double rate; }; -/** eoBitInversion: inverts the bits of the chromosome between an interval +/** eoBitInversion: inverts the bits of the chromosome between an interval \class eoBitInversion eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -175,20 +174,20 @@ template class eoBitInversion: public eoMonOp * Inverts a range of bits in a binary chromosome. * @param chrom The chromosome whos bits are going to be inverted (a range). */ - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { - + unsigned u1 = eo::rng.random(chrom.size() + 1) , u2; do u2 = eo::rng.random(chrom.size() + 1); while (u1 == u2); unsigned r1 = min(u1, u2), r2 = max(u1, u2); - + reverse(chrom.begin() + r1, chrom.begin() + r2); - chrom.invalidate(); + return true; } }; -/** eoBitNext --> next value when bitstring considered as binary value +/** eoBitNext --> next value when bitstring considered as binary value \class eoBitNext eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -198,12 +197,12 @@ template class eoBitNext: public eoMonOp public: /// The class name. string className() const { return "eoBitNext"; } - + /** * Change the bit string x to be x+1. * @param chrom The chromosome to be added one. */ - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { for (int i = chrom.size() - 1; i >= 0; i--) if (chrom[i]) @@ -217,12 +216,12 @@ template class eoBitNext: public eoMonOp break; } - chrom.invalidate(); + return true; } }; -/** eoBitPrev --> previous value when bitstring treated as binary value +/** eoBitPrev --> previous value when bitstring treated as binary value \class eoBitPrev eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -232,12 +231,12 @@ template class eoBitPrev: public eoMonOp public: /// The class name. string className() const { return "eoBitPrev"; } - + /** * Change the bit string x to be x-1. * @param chrom The chromosome to be substracted one. */ - void operator()(Chrom& chrom) + bool operator()(Chrom& chrom) { for (int i = chrom.size() - 1; i >= 0; i--) if (chrom[i]) @@ -249,14 +248,14 @@ template class eoBitPrev: public eoMonOp { chrom[i] = 1; continue; - } + } - chrom.invalidate(); + return true; } }; - -/** eo1PtBitXover --> classic 1-point crossover + +/** eo1PtBitXover --> classic 1-point crossover \class eo1PtBitCrossover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -272,7 +271,7 @@ template class eo1PtBitXover: public eoQuadOp * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ - void operator()(Chrom& chrom1, Chrom& chrom2) + bool operator()(Chrom& chrom1, Chrom& chrom2) { unsigned site = eo::rng.random(min(chrom1.size(), chrom2.size())); @@ -280,15 +279,15 @@ template class eo1PtBitXover: public eoQuadOp { swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); - - chrom1.invalidate(); - chrom2.invalidate(); + + return true; } + return false; } }; - -/** eoUBitXover --> classic Uniform crossover + +/** eoUBitXover --> classic Uniform crossover \class eoUBitXover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -298,7 +297,7 @@ template class eoUBitXover: public eoQuadOp public: /// (Default) Constructor. eoUBitXover(const float& _preference = 0.5): preference(_preference) - { + { if ( (_preference <= 0.0) || (_preference >= 1.0) ) runtime_error("UxOver --> invalid preference"); } @@ -311,10 +310,10 @@ template class eoUBitXover: public eoQuadOp * @param chrom2 The first chromosome. * @runtime_error if sizes don't match */ - void operator()(Chrom& chrom1, Chrom& chrom2) + bool operator()(Chrom& chrom1, Chrom& chrom2) { - if ( chrom1.size() != chrom2.size()) - runtime_error("UxOver --> chromosomes sizes don't match" ); + if ( chrom1.size() != chrom2.size()) + runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i class eoUBitXover: public eoQuadOp changed = true; } } - if (changed) - { - chrom1.invalidate(); - chrom2.invalidate(); - } - } + return changed; + } private: float preference; }; - -/** eoNPtsBitXover --> n-point crossover + +/** eoNPtsBitXover --> n-point crossover \class eoNPtsBitXover eoBitOp.h ga/eoBitOp.h \ingroup bitstring */ @@ -347,29 +342,29 @@ template class eoNPtsBitXover: public eoQuadOp public: /// (Default) Constructor. eoNPtsBitXover(const unsigned& _num_points = 2): num_points(_num_points) - { + { if (num_points < 1) runtime_error("NxOver --> invalid number of points"); } - + /// The class name. string className() const { return "eoNPtsBitXover"; } - + /** * n-point crossover for binary chromosomes. * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ - void operator()(Chrom& chrom1, Chrom& chrom2) + bool operator()(Chrom& chrom1, Chrom& chrom2) { unsigned max_size = min(chrom1.size(), chrom2.size()); unsigned max_points = min(max_size - 1, num_points); - + vector points(max_size, false); - + // select ranges of bits to swap do { - unsigned bit = eo::rng.random(max_size) + 1; + unsigned bit = eo::rng.random(max_size) + 1; if (points[bit]) continue; else @@ -378,30 +373,29 @@ template class eoNPtsBitXover: public eoQuadOp max_points--; } } while (max_points); - - + + // swap bits between chromosomes bool change = false; for (unsigned bit = 1; bit < points.size(); bit++) { if (points[bit]) change = !change; - + if (change) swap(chrom1[bit], chrom2[bit]); } - chrom1.invalidate(); - chrom2.invalidate(); + return true; } - + private: unsigned num_points; }; -/** eoBitGxOver --> Npts crossover when bistring considered +/** eoBitGxOver --> Npts crossover when bistring considered as a string of binary-encoded genes (exchanges genes) Is anybody still using it apart from historians ??? :-) \class eoBitGxOver eoBitOp.h ga/eoBitOp.h @@ -412,28 +406,28 @@ template class eoBitGxOver: public eoQuadOp { public: /// Constructor. - eoBitGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + eoBitGxOver(const unsigned _gene_size, const unsigned _num_points = 2): gene_size(_gene_size), num_points(_num_points) - { + { if (gene_size < 1) runtime_error("GxOver --> invalid gene size"); if (num_points < 1) runtime_error("GxOver --> invalid number of points"); } - + /// The class name string className() const { return "eoBitGxOver"; } - + /** * Gene crossover for binary chromosomes. * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. */ - void operator()(Chrom& chrom1, Chrom& chrom2) + bool operator()(Chrom& chrom1, Chrom& chrom2) { unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; unsigned cut_genes = min(max_genes, num_points); - + vector points(max_genes, false); // selects genes to swap @@ -454,11 +448,10 @@ template class eoBitGxOver: public eoQuadOp swap_ranges(chrom1.begin() + i * gene_size, chrom1.begin() + i * gene_size + gene_size, chrom2.begin() + i * gene_size); - - chrom1.invalidate(); - chrom2.invalidate(); + + return true; } - + private: unsigned gene_size; unsigned num_points; diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index fb6e55c24..2a7f55712 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -148,7 +148,7 @@ private : unsigned max_depth; std::vector initializor; - bool grow; + bool grow; }; template @@ -165,7 +165,7 @@ public: /// Dtor virtual ~eoSubtreeXOver () {}; - void operator()(EoType & _eo1, EoType & _eo2 ) + bool operator()(EoType & _eo1, EoType & _eo2 ) { int i = rng.random(_eo1.size()); int j = rng.random(_eo2.size()); @@ -173,26 +173,25 @@ public: parse_tree::subtree tmp = _eo2[j]; _eo1[i] = _eo2[j]; // insert subtree _eo2[j]=tmp; - + _eo1.pruneTree(max_length); _eo2.pruneTree(max_length); - - _eo1.invalidate(); - _eo2.invalidate(); + + return true; } unsigned max_length; }; template -class eoBranchMutation: public eoMonOp< eoParseTree > +class eoBranchMutation: public eoMonOp< eoParseTree > { public: typedef eoParseTree EoType; eoBranchMutation(eoInit& _init, unsigned _max_length) - : eoMonOp(), max_length(_max_length), initializer(_init) + : eoMonOp(), max_length(_max_length), initializer(_init) {}; virtual string className() const { return "eoBranchMutation"; }; @@ -200,26 +199,26 @@ public: /// Dtor virtual ~eoBranchMutation() {}; - void operator()(EoType& _eo1 ) + bool operator()(EoType& _eo1 ) { int i = rng.random(_eo1.size()); - + EoType eo2; initializer(eo2); int j = rng.random(eo2.size()); _eo1[i] = eo2[j]; // insert subtree - + _eo1.pruneTree(max_length); - - _eo1.invalidate(); + + return true; } private : unsigned max_length; - eoInit& initializer; + eoInit& initializer; }; diff --git a/eo/src/eoGenericBinOp.h b/eo/src/obsolete/eoGenericBinOp.h similarity index 100% rename from eo/src/eoGenericBinOp.h rename to eo/src/obsolete/eoGenericBinOp.h diff --git a/eo/src/eoGenericMonOp.h b/eo/src/obsolete/eoGenericMonOp.h similarity index 100% rename from eo/src/eoGenericMonOp.h rename to eo/src/obsolete/eoGenericMonOp.h diff --git a/eo/src/eoGenericQuadOp.h b/eo/src/obsolete/eoGenericQuadOp.h similarity index 100% rename from eo/src/eoGenericQuadOp.h rename to eo/src/obsolete/eoGenericQuadOp.h diff --git a/eo/src/other/eoExternalOpFunctions.h b/eo/src/other/eoExternalOpFunctions.h index 906460fbb..62fd757cd 100644 --- a/eo/src/other/eoExternalOpFunctions.h +++ b/eo/src/other/eoExternalOpFunctions.h @@ -46,13 +46,13 @@ class eoExternalInit : public eoInit { public : - + eoExternalInit(External (*_init)(void)) : init(_init) {} - void operator()(ExternalEO& _eo) - { - _eo = (*init)(); + void operator()(ExternalEO& _eo) + { + _eo = (*init)(); _eo.invalidate(); } @@ -76,7 +76,7 @@ class eoExternalEvalFunc : public eoEvalFunc eoExternalEvalFunc(F (*_eval)(const External&)) : eval(_eval) {} - void operator()(ExternalEO& eo) + void operator()(ExternalEO& eo) { if (eo.invalid()) eo.fitness( (*eval)(eo) ); @@ -93,8 +93,8 @@ class eoExternalEvalFunc : public eoEvalFunc bool func(External&); - - Where External is the user defined struct or class. + + Where External is the user defined struct or class. The function should return true when it changed something, false otherwise */ @@ -105,10 +105,9 @@ class eoExternalMonOp : public eoMonOp eoExternalMonOp(bool (*_mutate)(External&)) : mutate(_mutate) {} - void operator()(ExternalEO& eo) + bool operator()(ExternalEO& eo) { - if ((*mutate)(eo)) - eo.invalidate(); + return (*mutate)(eo); } private : @@ -132,10 +131,9 @@ class eoExternalBinOp : public eoBinOp eoExternalBinOp(bool (*_binop)(External&, const External&)) : binop(_binop) {} - void operator()(ExternalEO& eo1, const ExternalEO& eo2) + bool operator()(ExternalEO& eo1, const ExternalEO& eo2) { - if ((*binop)(eo1, eo2)) - eo1.invalidate(); + return (*binop)(eo1, eo2); } private : @@ -159,13 +157,9 @@ class eoExternalQuadOp : public eoQuadOp eoExternalQuadOp(bool (*_quadop)(External&, External&)) : quadop(_quadop) {} - void operator()(ExternalEO& eo1, ExternalEO& eo2) + bool operator()(ExternalEO& eo1, ExternalEO& eo2) { - if ((*quadop)(eo1, eo2)) - { - eo1.invalidate(); - eo2.invalidate(); - } + return (*quadop)(eo1, eo2); } private : diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index d069338de..ffb195363 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -38,11 +38,20 @@ class eoObject; class eoPersistent; /** -* eoState can be used to register derivants of eoPersistent. It will -* then in turn implement the persistence framework through members load -* and save, that will call readFrom and printOn for the registrated objects. + eoState can be used to register derivants of eoPersistent. It will + then in turn implement the persistence framework through members load + and save, that will call readFrom and printOn for the registrated objects. + + It is derived from eoFunctorStore, so that it also serves as a place where + all those nifty eo functors can be stored. This is useful in the case you + want to use one of the make_* functions. These functions generally take as their + last argument an eoFunctorStore (or a state) which is used to hold all dynamically + generated data. Note however, that unlike with eoPersistent derived classes, eoFunctorBase + derived classes are not saved or loaded. To govern the creation of functors, + command-line parameters (which can be stored) are needed. + */ -class eoState +class eoState : public eoFunctorStore { public : @@ -68,12 +77,6 @@ public : return static_cast(*ownedObjects.back()); } - void storeFunctor(eoFunctorBase* _functor) - { - // add it to the functorStore, fo - functorStore.add(_functor); - } - /** * Loading error thrown when nothing seems to work. */ @@ -123,9 +126,6 @@ private : std::vector creationOrder; std::vector ownedObjects; - // And a functor store to boot - eoFunctorStore functorStore; - // private copy and assignment as eoState is supposed to be unique eoState(const eoState&); eoState& operator=(const eoState&); diff --git a/eo/test/run_tests b/eo/test/run_tests index 59e026844..7d269d1f3 100755 --- a/eo/test/run_tests +++ b/eo/test/run_tests @@ -36,6 +36,9 @@ echo "Testing t-eofitness" echo "Testing t-eoGA" ./t-eoGA > t-eoGA.log +echo "Testing t-eoGenOp" +./t-eoGenOp > t-eoGenOp.log + echo "Finished" #TODO test if an error occured diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index 88b04f429..40c79d19e 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -23,7 +23,7 @@ */ //----------------------------------------------------------------------------- -/** test program for the general operator - millenium version! +/** test program for the general operator - millenium version! * uses dummy individuals */ #include @@ -53,10 +53,11 @@ class monop : public eoMonOp { public : monop(char * _sig){sig=_sig;} - void operator()(EOT& _eo) + bool operator()(EOT& _eo) { _eo.s = sig + "(" + _eo.s + ")"; _eo.fitness(_eo.fitness()+pSize); + return false; } string className() {return sig;} private: @@ -66,11 +67,12 @@ class monop : public eoMonOp class binop: public eoBinOp { public : - void operator()(EOT& _eo1, const EOT& _eo2) + bool operator()(EOT& _eo1, const EOT& _eo2) { _eo1.s = "bin(" + _eo1.s + "," + _eo2.s + ")"; double f= (_eo1.fitness()+_eo2.fitness()) * pSize; _eo1.fitness(_eo1.fitness()+f); + return false; } string className() {return "binop";} }; @@ -79,7 +81,7 @@ class quadop: public eoQuadOp { public : string className() {return "quadop";} - void operator()(EOT& a, EOT& b) + bool operator()(EOT& a, EOT& b) { EOT oi = a; EOT oj = b; @@ -89,6 +91,7 @@ class quadop: public eoQuadOp double f= (a.fitness()+b.fitness()+2*pSize) * pSize; a.fitness(a.fitness()+f); b.fitness(b.fitness()+f); + return false; } }; // an eoQuadOp that does nothing @@ -96,7 +99,7 @@ class quadClone: public eoQuadOp { public : string className() {return "quadclone";} - void operator()(EOT& , EOT& ) {} + bool operator()(EOT& , EOT& ) {return false;} }; // User defined General Operator... adapted from Marc's example From 8ce0e6bb2a83e200e290f9d8ae34e45afede0a53 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Feb 2001 14:09:16 +0000 Subject: [PATCH 0471/2134] Changed the return value to return what it got in --- eo/src/eoInvalidateOps.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h index 711456e6b..f3a3b4cb7 100644 --- a/eo/src/eoInvalidateOps.h +++ b/eo/src/eoInvalidateOps.h @@ -48,9 +48,12 @@ class eoInvalidateMonOp : public eoMonOp bool operator()(EOT& _eo) { if (op(_eo)) + { _eo.invalidate(); + return true; + } - return false; // we did change the thing, but it is already invalidated + return false; } private: @@ -76,9 +79,12 @@ class eoInvalidateBinOp : public eoBinOp bool operator()(EOT& _eo, const EOT& _eo2) { if (op(_eo, _eo2)) + { _eo.invalidate(); + return true; + } - return false; // we did change the thing, but it is already invalidated + return false; } private: @@ -107,8 +113,9 @@ class eoInvalidateQuadOp : public eoQuadOp { _eo1.invalidate(); _eo2.invalidate(); + return true; } - return false; // we did change the thing, but it is already invalidated + return false; } private: From 98a9f24879043926bc1eda68398e03a852cadf4f Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Feb 2001 18:01:30 +0000 Subject: [PATCH 0472/2134] no need to keep these test functions here, will start new project in /test --- eo/win/eo_win.dsw | 149 ----------------------------------- eo/win/esfull.dsp | 143 --------------------------------- eo/win/t_StateAndParser.dsp | 102 ------------------------ eo/win/t_eoCheckpointing.dsp | 102 ------------------------ eo/win/t_eoFunctor.dsp | 104 ------------------------ eo/win/t_eoSymreg.dsp | 100 ----------------------- eo/win/t_eobin.dsp | 103 ------------------------ eo/win/t_eofitness.dsp | 102 ------------------------ eo/win/t_externalEO.dsp | 112 -------------------------- 9 files changed, 1017 deletions(-) delete mode 100644 eo/win/eo_win.dsw delete mode 100644 eo/win/esfull.dsp delete mode 100644 eo/win/t_StateAndParser.dsp delete mode 100644 eo/win/t_eoCheckpointing.dsp delete mode 100644 eo/win/t_eoFunctor.dsp delete mode 100644 eo/win/t_eoSymreg.dsp delete mode 100644 eo/win/t_eobin.dsp delete mode 100644 eo/win/t_eofitness.dsp delete mode 100644 eo/win/t_externalEO.dsp diff --git a/eo/win/eo_win.dsw b/eo/win/eo_win.dsw deleted file mode 100644 index 5b03cc95e..000000000 --- a/eo/win/eo_win.dsw +++ /dev/null @@ -1,149 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "esfull"=.\esfull.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_StateAndParser"=.\t_StateAndParser.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoCheckpointing"=.\t_eoCheckpointing.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoFunctor"=.\t_eoFunctor.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eoSymreg"=.\t_eoSymreg.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_eofitness"=.\t_eofitness.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Project: "t_externalEO"=.\t_externalEO.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name eo - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/eo/win/esfull.dsp b/eo/win/esfull.dsp deleted file mode 100644 index 5089fadbe..000000000 --- a/eo/win/esfull.dsp +++ /dev/null @@ -1,143 +0,0 @@ -# Microsoft Developer Studio Project File - Name="esfull" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=esfull - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "esfull.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "esfull.mak" CFG="esfull - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "esfull - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "esfull - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "esfull - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "esfull - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "esfull___Win32_Debug" -# PROP BASE Intermediate_Dir "esfull___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "esfull - Win32 Release" -# Name "esfull - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESFull.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\es\eoEsChromInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsFull.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutate.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutationInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsObjectiveBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsSimple.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStdev.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoFixedLength.h -# End Source File -# Begin Source File - -SOURCE=..\test\real_value.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\eolib___Win32_Debug\eolib.lib -# End Source File -# End Target -# End Project diff --git a/eo/win/t_StateAndParser.dsp b/eo/win/t_StateAndParser.dsp deleted file mode 100644 index 846db2369..000000000 --- a/eo/win/t_StateAndParser.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_StateAndParser" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_StateAndParser - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_StateAndParser.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_StateAndParser.mak" CFG="t_StateAndParser - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_StateAndParser - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_StateAndParser - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_StateAndParser - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_StateAndParser - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_StateAndParser___Win32_Debug" -# PROP BASE Intermediate_Dir "t_StateAndParser___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_StateAndParser - Win32 Release" -# Name "t_StateAndParser - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoStateAndParser.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoCheckpointing.dsp b/eo/win/t_eoCheckpointing.dsp deleted file mode 100644 index b9b821aaa..000000000 --- a/eo/win/t_eoCheckpointing.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoCheckpointing" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoCheckpointing - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoCheckpointing.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoCheckpointing.mak" CFG="t_eoCheckpointing - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoCheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoCheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoCheckpointing - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoCheckpointing - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoCheckpointing___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoCheckpointing___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoCheckpointing - Win32 Release" -# Name "t_eoCheckpointing - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoCheckpointing.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoFunctor.dsp b/eo/win/t_eoFunctor.dsp deleted file mode 100644 index 77f1fe82d..000000000 --- a/eo/win/t_eoFunctor.dsp +++ /dev/null @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoFunctor" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoFunctor - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoFunctor.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoFunctor.mak" CFG="t_eoFunctor - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoFunctor - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoFunctor - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoFunctor - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "t_eoFunctor___Win32_Release" -# PROP BASE Intermediate_Dir "t_eoFunctor___Win32_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "t_eoFunctor___Win32_Release" -# PROP Intermediate_Dir "t_eoFunctor___Win32_Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoFunctor - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoFunctor___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoFunctor___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_eoFunctor___Win32_Debug" -# PROP Intermediate_Dir "t_eoFunctor___Win32_Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoFunctor - Win32 Release" -# Name "t_eoFunctor - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE="..\test\t-eoFunctor.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eoSymreg.dsp b/eo/win/t_eoSymreg.dsp deleted file mode 100644 index d2be43ad6..000000000 --- a/eo/win/t_eoSymreg.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoSymreg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoSymreg - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoSymreg.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoSymreg.mak" CFG="t_eoSymreg - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoSymreg - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoSymreg - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoSymreg - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "t_eoSymreg___Win32_Release" -# PROP BASE Intermediate_Dir "t_eoSymreg___Win32_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eoSymreg - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoSymreg___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eoSymreg___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eoSymreg - Win32 Release" -# Name "t_eoSymreg - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSymreg.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp deleted file mode 100644 index 40d036423..000000000 --- a/eo/win/t_eobin.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobin - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobin - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "../test" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobin___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /I "../test" /I "../win" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eobin - Win32 Release" -# Name "t_eobin - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobin.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp deleted file mode 100644 index 7c85d5a4c..000000000 --- a/eo/win/t_eofitness.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eofitness___Win32_Debug" -# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_eofitness - Win32 Release" -# Name "t_eofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eofitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/eo/win/t_externalEO.dsp b/eo/win/t_externalEO.dsp deleted file mode 100644 index 32c6cb728..000000000 --- a/eo/win/t_externalEO.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_externalEO" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_externalEO - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_externalEO.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_externalEO.mak" CFG="t_externalEO - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_externalEO - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_externalEO - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_externalEO - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "t_externalEO___Win32_Release" -# PROP BASE Intermediate_Dir "t_externalEO___Win32_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "t_externalEO___Win32_Release" -# PROP Intermediate_Dir "t_externalEO___Win32_Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "t_externalEO - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_externalEO___Win32_Debug" -# PROP BASE Intermediate_Dir "t_externalEO___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "t_externalEO___Win32_Debug" -# PROP Intermediate_Dir "t_externalEO___Win32_Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "t_externalEO - Win32 Release" -# Name "t_externalEO - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoExternalEO.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoEvalFuncPtr.h -# End Source File -# Begin Source File - -SOURCE=..\src\other\eoExternalEO.h -# End Source File -# Begin Source File - -SOURCE=..\src\other\eoExternalOpFunctions.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project From 2ff2b66fddc425f390d50a862d80c0694896db6b Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Feb 2001 18:05:36 +0000 Subject: [PATCH 0473/2134] updated the dsp, dsw files for the library --- eo/win/eo.dsp | 368 +++++++++++++++++++++++++------------------------- eo/win/eo.dsw | 82 +++++------ 2 files changed, 221 insertions(+), 229 deletions(-) diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 4ab4d716a..8294c507a 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,182 +1,186 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoObject.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\ga.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoObject.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 2a046f5f2..96b630710 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -1,47 +1,35 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name random - End Project Dependency - Begin Project Dependency - Project_Dep_Name atomops - End Project Dependency -}}} - -############################################################################### - -Project: "esfull"=.\esfull.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name random + End Project Dependency + Begin Project Dependency + Project_Dep_Name atomops + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From bf0e84fc5608717b8351f58773f3f9e83a23209a Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 15 Feb 2001 04:47:18 +0000 Subject: [PATCH 0474/2134] A few minor corrections (and some comments) after Maarten big commit --- eo/src/eoGenOp.h | 2 ++ eo/src/eoInvalidateOps.h | 9 +++++++++ eo/src/eoProportionalCombinedOp.h | 2 +- eo/src/eoSGATransform.h | 4 ++-- eo/src/es/eoEsStdevXOver.h | 9 +-------- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index a8143a9e2..b24dad7d6 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -48,6 +48,8 @@ the original population, is an instantiation of the next population and has often a selection function embedded in it to select new individuals. Note that the actual work is performed in the apply function. +AND that the apply function is responsible for invalidating +the object if necessary */ template class eoGenOp : public eoOp, public eoUF &, void> diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h index f3a3b4cb7..4643c7270 100644 --- a/eo/src/eoInvalidateOps.h +++ b/eo/src/eoInvalidateOps.h @@ -37,6 +37,9 @@ the return type of the operator and invalidate the fitness of the individual. This functor is used in algorithms that work with straight eoMonOp, eoBinOp or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem */ template @@ -68,6 +71,9 @@ the return type of the operator and invalidate the fitness of the individual. This functor is used in algorithms that work with straight eoMonOp, eoBinOp or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem */ template @@ -99,6 +105,9 @@ the return type of the operator and invalidate the fitness of the individual. This functor is used in algorithms that work with straight eoMonOp, eoBinOp or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem */ template diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index b36c1d2c1..5fba7fe5c 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -205,6 +205,6 @@ std::vector rates; }; -// for General Ops, it's another story - +// for General Ops, it's another story - see eoOpCOntainer #endif diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index e06aad6df..47e2747a0 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -84,9 +84,9 @@ template class eoSGATransform : public eoTransform }; private: - eoQuadOp& cross; + eoInvalidateQuadOp cross; double crossoverProba; - eoMonOp& mutate; + eoInvalidateMonOp mutate; double mutationProba; }; diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h index c13adf6ec..be5071e7d 100644 --- a/eo/src/es/eoEsStdevXOver.h +++ b/eo/src/es/eoEsStdevXOver.h @@ -55,14 +55,7 @@ public : bool objectChanged = objectXOver(_eo1, _eo2); // as vector bool stdDevChanged = stdDevXOver(_eo1.stdevs, _eo2.stdevs); - /// Marc, I didn't change it, but if only the stdev has changed, - /// doesn't that mean that the fitness is stil valid. Maarten - if ( objectChanged || stdDevChanged ) - { - return true; - } - - return false; + return objectChanged; } private: From 9dbb516d8bfba182ebf20e865d66c486e7816b54 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 15 Feb 2001 05:35:31 +0000 Subject: [PATCH 0475/2134] Modified the comments so that all callses are documented by Doxygen (a comment starting with // before the class definition is not taken into account) Also updated the initial overall comment - and waouw, doxygen generates links there, too! Cool. --- eo/src/es/eoRealBounds.h | 47 ++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/eo/src/es/eoRealBounds.h b/eo/src/es/eoRealBounds.h index be544a996..55a00f368 100644 --- a/eo/src/es/eoRealBounds.h +++ b/eo/src/es/eoRealBounds.h @@ -46,22 +46,25 @@ Basic class is eoRealBounds, a pure virtual. The following pure virtual methods are to be used in mutations: - void foldsInBounds(double &) that folds any value that falls out of the bounds back into the bounds, by bouncing on the limit (if any) -- bool isInBounds(double &) that simply says whether or not the argument +- bool isInBounds(double) that simply says whether or not the argument is in the bounds +- void truncate(double &) that set the argument to the bound value it +it exceeds it -So mutation can choose whetehr they want to iterate trying until -they fall in bounds, or only try once and "repair" by using -the foldsInBounds method +So mutation can choose +- iterate trying until they fall in bounds, +- only try once and "repair" by using the foldsInBounds method +- only try once and repair using the truncate method (will create a + huge bias toward the bound if the soluiton is not far from the bounds) There is also a uniform() method that generates a uniform value (if possible, i.e. if bounded) in the interval. Derived class are -eoRealInterval, that holds a minimum and maximum value, - eoRealNoBounds, that implements the "unbounded bounds" - -TODO: the eoRealMinBound and eoRealMaxBound that implement - the half-bounded intervals. +eoRealInterval that holds a minimum and maximum value, +eoRealNoBounds the "unbounded bounds" (-infinity, +infinity) +eoRealBelowBound the half-bounded interval [min, +infinity) +eoRealAboveBound the half-bounded interval (-infinity, max] Vector type: ------------ @@ -69,6 +72,12 @@ Class eoRealVectorBounds implements the vectorized version: it is basically a vector of eoRealBounds * and forwards all request to the elements of the vector. +This file also contains te 2 global variables eoDummyRealNoBounds and +eoDummyVectorNoBounds that are used as defaults in ctors (i.e. when no +bounds are given, it is assumed unbounded values) + +TODO: have an eoRealBounds.cpp with the longuish parts of the code +(and the 2 global variables). */ class eoRealBounds { @@ -157,9 +166,9 @@ public: } }; -////////////////////////////////////////////////////////////// -// fully bounded == interval -///////////////////////////////////////////////////////////// +/** + * fully bounded eoRealBound == interval + */ class eoRealInterval : public eoRealBounds { public : @@ -246,9 +255,9 @@ private : double repRange; // to minimize operations ??? }; -////////////////////////////////////////////////////////////// -// bounded from below -///////////////////////////////////////////////////////////// +/** + * an eoRealBound bounded from below only + */ class eoRealBelowBound : public eoRealBounds { public : @@ -312,9 +321,9 @@ private : double repMinimum; }; -////////////////////////////////////////////////////////////// -// bounded from above -///////////////////////////////////////////////////////////// +/** +An eoRealBound bounded from above only +*/ class eoRealAboveBound : public eoRealBounds { public : @@ -381,7 +390,7 @@ private : }; ///////////////////////////////////////////////////////////////////// -// Vectorized versions +// The Vectorized versions ///////////////////////////////////////////////////////////////////// /** From 562b0b63e355a8bdd8a9b06f35a1679c89cde099 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 15 Feb 2001 05:36:28 +0000 Subject: [PATCH 0476/2134] Changed the default values for popsize, vecsize and maxgen so the user has a chance to see something even on Pentium 10GHz :-) --- eo/tutorial/Lesson3/exercise3.1.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index bc8003844..0a67413d4 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -47,12 +47,12 @@ void main_function(int argc, char **argv) unsigned seed = seedParam.value(); // description of genotype - eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V'); + eoValueParam vecSizeParam(100, "vecSize", "Genotype size",'V'); parser.processParam( vecSizeParam, "Representation" ); unsigned vecSize = vecSizeParam.value(); // parameters for evolution engine - eoValueParam popSizeParam(10, "popSize", "Population size",'P'); + eoValueParam popSizeParam(100, "popSize", "Population size",'P'); parser.processParam( popSizeParam, "Evolution engine" ); unsigned popSize = popSizeParam.value(); @@ -65,11 +65,11 @@ void main_function(int argc, char **argv) parser.processParam( loadNameParam, "Persistence" ); string loadName = loadNameParam.value(); - eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G'); + eoValueParam maxGenParam(500, "maxGen", "Maximum number of generations",'G'); parser.processParam( maxGenParam, "Stopping criterion" ); unsigned maxGen = maxGenParam.value(); - eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g'); + eoValueParam minGenParam(500, "minGen", "Minimum number of generations",'g'); parser.processParam( minGenParam, "Stopping criterion" ); unsigned minGen = minGenParam.value(); From 0540496021ec723d0ed639b0dd35f04811af5844 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 15 Feb 2001 08:31:38 +0000 Subject: [PATCH 0477/2134] reverted the max-to-produce initializer --- eo/src/eoOpContainer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 150534852..a2c9f8502 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -43,7 +43,7 @@ class eoOpContainer : public eoGenOp { public : /** Ctor: nothing much to do */ - eoOpContainer() : max_to_produce(2) {} + eoOpContainer() : max_to_produce(0) {} /** Dtor: delete all the GenOps created when wrapping simple ops */ From da8b467b12c34a729664b19e45f716cbfbb2b932 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Feb 2001 05:06:17 +0000 Subject: [PATCH 0478/2134] Only names modifications, to comply to EO strict rules :-) --- eo/src/eoDetTournamentSelect.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index dcc048763..667577fb8 100755 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -44,23 +44,27 @@ template class eoDetTournamentSelect: public eoSelectOne { public: - /// (Default) Constructor. - eoDetTournamentSelect(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { + /* (Default) Constructor - + @param _tSize tournament size + */ + eoDetTournamentSelect(unsigned _tSize = 2 ):eoSelectOne(), tSize(_tSize) { // consistency check - if (Tsize < 2) { + if (tSize < 2) { cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; - Tsize = 2; + tSize = 2; } } - /// Perform deterministic tournament - virtual const EOT& operator()(const eoPop& pop) + /* Perform deterministic tournament calling the appropriate fn + see selectors.h + */ + virtual const EOT& operator()(const eoPop& _pop) { - return deterministic_tournament(pop, Tsize); + return deterministic_tournament(_pop, tSize); } private: - unsigned Tsize; + unsigned tSize; }; //----------------------------------------------------------------------------- From 7e849e2082805e6e5ba743303ec627f1dabd5804 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Feb 2001 08:21:25 +0000 Subject: [PATCH 0479/2134] The perf2worth major check in 2 new important classes: eoPerf2Worth and eoSelectFromWorth Instances of eoPerf2Worth are eoRanking and eoLinearFitScaling. Coming soon (piece of cake now) are the niching strategies (sharing, clearing) --- eo/src/eoFitnessScalingSelect.h | 73 ++----------- eo/src/eoLinearFitScaling.h | 90 ++++++++++++++++ eo/src/eoPerf2Worth.h | 48 +++++++++ eo/src/eoRanking.h | 104 +++++++++++++++++++ eo/src/eoRankingSelect.h | 60 +++-------- eo/src/eoSelectFromWorth.h | 175 ++++++++++++++++++++++++++++++++ eo/src/utils/selectors.h | 2 +- eo/test/t-eoSelect.cpp | 34 +++++-- 8 files changed, 465 insertions(+), 121 deletions(-) create mode 100644 eo/src/eoLinearFitScaling.h create mode 100644 eo/src/eoPerf2Worth.h create mode 100644 eo/src/eoRanking.h create mode 100644 eo/src/eoSelectFromWorth.h diff --git a/eo/src/eoFitnessScalingSelect.h b/eo/src/eoFitnessScalingSelect.h index 6155dc561..0b3ec273a 100644 --- a/eo/src/eoFitnessScalingSelect.h +++ b/eo/src/eoFitnessScalingSelect.h @@ -29,78 +29,25 @@ //----------------------------------------------------------------------------- -#include -#include -#include +#include +#include -//----------------------------------------------------------------------------- -/** eoFitnessScalingSelect: select an individual proportional to its rank - this is actually the linearRanking +/** eoFitnessScalingSelect: select an individual proportional to the + * linearly scaled fitness that is computed by the private + * eoLinearFitScaling object */ -//----------------------------------------------------------------------------- - -template class eoFitnessScalingSelect: public eoSelectOne +template +class eoFitnessScalingSelect: public eoRouletteWorthSelect { public: - typedef typename EOT::Fitness Fitness; /** Ctor: * @param _p the selective pressure, should be in [1,2] (2 is the default) - * @param _pop an optional population */ - eoFitnessScalingSelect(double _p = 2.0, const eoPop& _pop = eoPop()): - pressure(_p), scaledFitness(0) - { - if (minimizing_fitness()) - throw logic_error("eoFitnessScalingSelect: minimizing fitness"); - if (_pop.size() > 0) // a population in Ctor? initialize scaledFitness - { - setup(_pop); - } - } - - // COmputes the coefficients of the linear transform in such a way that - // Pselect(Best) == pressure/sizePop - // Pselect(average) == 1.0/sizePop - // we truncate negative values to 0 - - // we could also adjust the pressure so that worst get 0 scaled fitness - void setup(const eoPop& _pop) - { - unsigned pSize =_pop.size(); - scaledFitness.resize(pSize); - - // best and worse fitnesses - double bestFitness = static_cast (_pop.best_element().fitness()); - double worstFitness = static_cast (_pop.worse_element().fitness()); - - // average fitness - double sum=0.0; - for (unsigned i=0; i(_pop[i].fitness()); - double averageFitness = sum/pSize; - - // the coefficients for linear scaling - double denom = pSize*(bestFitness - averageFitness); - double alpha = (pressure-1)/denom; - double beta = (bestFitness - pressure*averageFitness)/denom; -// if (beta < 0) -// beta = max(beta, -alpha*worstFitness); - for (unsigned i=0; i& _pop) - { - unsigned selected = rng.roulette_wheel(scaledFitness); - return _pop[selected]; - } + eoFitnessScalingSelect(double _p = 2.0): + eoRouletteWorthSelect(scaling), scaling(_p) {} private : - double pressure; - vector scaledFitness; + eoLinearFitScaling scaling; // derived from eoPerf2Worth }; #endif diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h new file mode 100644 index 000000000..fee411863 --- /dev/null +++ b/eo/src/eoLinearFitScaling.h @@ -0,0 +1,90 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoLinearFitScaling.h + (c) GeNeura Team, 1998, Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoLinearFitScaling_h +#define eoLinearFitScaling_h + +#include +#include + +/* An instance of eoPerf2Worth + * COmputes the linearly scaled fitnesses + * with given selective pressure + * Pselect(Best) == pressure/sizePop + * Pselect(average) == 1.0/sizePop + * truncate negative values to 0 - + * + * to be used within an eoSelectFromWorth object + */ +template +class eoLinearFitScaling : public eoPerf2Worth +{ +public: + /* Ctor: + @param _p selective pressure (in (1,2] + @param _e exponent (1 == linear) + */ + eoLinearFitScaling(double _p=2.0): + pressure(_p) {} + + /* COmputes the ranked fitness: fitnesses range in [m,M] + with m=2-pressure/popSize and M=pressure/popSize. + in between, the progression depends on exponent (linear if 1). + */ + virtual void operator()(const eoPop& _pop) + { + unsigned pSize =_pop.size(); + // value() refers to the vector of worthes (we're in an eoParamvalue) + value().resize(pSize); + + // best and worse fitnesses + double bestFitness = static_cast (_pop.best_element().fitness()); + // double worstFitness = static_cast (_pop.worse_element().fitness()); + + // average fitness + double sum=0.0; + for (unsigned i=0; i(_pop[i].fitness()); + double averageFitness = sum/pSize; + + // the coefficients for linear scaling + double denom = pSize*(bestFitness - averageFitness); + double alpha = (pressure-1)/denom; + double beta = (bestFitness - pressure*averageFitness)/denom; + + for (unsigned i=0; i + +/** Base class to transform raw fitnesses into fitness for selection + +It is an eoStat so +- it is updated inside a checkpoint (i.e. at start of every generation) +- it can be monitored or whatever else you wish through its value() + +@see eoSelectFromWorth +*/ +template +class eoPerf2Worth : public eoStat > +{ + public: + eoPerf2Worth():eoStat >(vector(0), + "Worthes") {} +}; + +#endif diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h new file mode 100644 index 000000000..4c8031c8d --- /dev/null +++ b/eo/src/eoRanking.h @@ -0,0 +1,104 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoRanking.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRanking_h +#define eoRanking_h + +#include + +/* An instance of eoPerfFromWorth + * COmputes the ranked fitness: fitnesses range in [m,M] + * with m=2-pressure/popSize and M=pressure/popSize. + * in between, the progression depends on exponent (linear if 1). + */ +template +class eoRanking : public eoPerf2Worth +{ +public: + /* Ctor: + @param _p selective pressure (in (1,2] + @param _e exponent (1 == linear) + */ + eoRanking(double _p=2.0, double _e=1.0): + pressure(_p), exponent(_e) {} + + /* helper function: finds index in _pop of _eo, an EOT * */ + int lookfor(const EOT *_eo, const eoPop& _pop) + { + eoPop::const_iterator it; + for (it=_pop.begin(); it<_pop.end(); it++) + { + if (_eo == &(*it)) + return it-_pop.begin(); + } + throw runtime_error("Not found in eoLinearRanking"); + } + + /* COmputes the ranked fitness: fitnesses range in [m,M] + with m=2-pressure/popSize and M=pressure/popSize. + in between, the progression depends on exponent (linear if 1). + */ + virtual void operator()(const eoPop& _pop) + { + vector rank; + _pop.sort(rank); + unsigned pSize =_pop.size(); + unsigned int pSizeMinusOne = pSize-1; + + // value() refers to the vector of worthes (we're in an eoParamvalue) + value().resize(pSize); + + double beta = (2-pressure)/pSize; + if (exponent == 1.0) // no need for exponetial then + { + double alpha = (2*pressure-2)/(pSize*pSizeMinusOne); + for (unsigned i=0; i -#include -#include +#include +#include -//----------------------------------------------------------------------------- -/** eoRankingSelect: select an individual proportional to its rank - this is actually the linearRanking +/** eoRankingSelect: select an individual by roulette wheel on its rank + * is an eoRouletteWorthSelect, i.e. a selector using a vector of worthes + * rather than the raw fitness (see eoSelectFromWorth.h) + * uses an internal eoRanking object which is an eoPerf2Worth */ -//----------------------------------------------------------------------------- -template class eoRankingSelect: public eoSelectOne +template +class eoRankingSelect: public eoRouletteWorthSelect { public: /** Ctor: * @param _p the selective pressure, should be in [1,2] (2 is the default) - * @param _pop an optional population + * @param _e exponent (1 == linear) */ - eoRankingSelect(double _p = 2.0, const eoPop& _pop = eoPop()): - pressure(_p), rank(0), rankFitness(0) - { - if (_pop.size() > 0) - { - setup(_pop); - } - } - - // COmputes the coefficients of the linear transform uin such a way that - // Pselect(Best) == Pselect(sizePop) == pressure/sizePop - // Pselect(average) == 1.0/sizePop - // Pselect(Worst == Pselect(1 == (2-pressure)/sizePop - void setup(const eoPop& _pop) - { - _pop.sort(rank); - unsigned pSize =_pop.size(); - rankFitness.resize(pSize); - double alpha = (2*pressure-2)/(pSize*(pSize-1)); - double beta = (2-pressure)/pSize; - for (unsigned i=0; i& _pop) - { - unsigned selected = rng.roulette_wheel(rankFitness); - return *(rank[selected]); - } + eoRankingSelect(double _p = 2.0, double _e=1.0): + eoRouletteWorthSelect(ranking), ranking(_p, _e) {} private : - double pressure; - vector rank; - vector rankFitness; + eoRanking ranking; // derived from eoPerf2Worth }; #endif diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h new file mode 100644 index 000000000..29520ceb1 --- /dev/null +++ b/eo/src/eoSelectFromWorth.h @@ -0,0 +1,175 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectFromWorth.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectFromWorth_h +#define _eoSelectFromWorth_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** selects one element from a population (is an eoSelectOne) +but the selectin is based on a vector of Worth that is different +from the fitnesses (e.g. EO fitness is what Koza terms "raw fitness", +Worth is what the selection is based upon). + +see class eoPerf2Worth: an eoStat that transforms fitnesses into Worthes + +Note: Worthes will not always be doubles - see some multi-objective +techniques where it is a pair of doubles ... + +It has to have a < operator it you want to call an existing +selector (see selector.h) - but of course you can write the whole +thing ... +*/ +template +class eoSelectFromWorth : public eoSelectOne +{ +public: + /* Default ctor from an eoPerf2Worth object + */ + eoSelectFromWorth(eoPerf2Worth & _perf2Worth) : + perf2Worth(_perf2Worth) {} + + /* setup the worthes */ + virtual void setup(const eoPop& _pop) + { + perf2Worth(_pop); + } + +protected: + eoPerf2Worth & perf2Worth; +}; + + +/** An instance of eoSelectPerf2Worth that does selection from the Worthes + * using a ... determinisitic tournament, yes! + */ +template +class eoDetTournamentWorthSelect : public eoSelectFromWorth +{ +public: + typedef vector::iterator worthIterator; + + /* Default ctor from an eoPerf2Worth object + tournament size + */ + eoDetTournamentWorthSelect(eoPerf2Worth &_perf2Worth, + unsigned _tSize) : + eoSelectFromWorth(_perf2Worth), tSize(_tSize) {} + + /* Perform deterministic tournament on worthes + by calling the appropriate fn + see selectors.h + */ + virtual const EOT& operator()(const eoPop& _pop) + { + worthIterator it = deterministic_tournament( + perf2Worth.value().begin(), + perf2Worth.value().end(), tSize); + return _pop[it-perf2Worth.value().begin()]; + } + +private: + unsigned tSize; +}; + +/** An instance of eoSelectPerf2Worth that does selection from the Worthes + * using a ... determinisitic tournament, yes! + */ +template +class eoStochTournamentWorthSelect : public eoSelectFromWorth +{ +public: + typedef vector::iterator worthIterator; + + /* Default ctor from an eoPerf2Worth object + tournament rate + */ + eoStochTournamentWorthSelect(eoPerf2Worth &_perf2Worth, + double _tRate) : + eoSelectFromWorth(_perf2Worth), tRate(_tRate) {} + + /* Perform stochastic tournament on worthes + by calling the appropriate fn in selectors.h + */ + virtual const EOT& operator()(const eoPop& _pop) + { + worthIterator it = deterministic_tournament( + perf2Worth.value().begin(), + perf2Worth.value().end(), tRate); + return _pop[it-perf2Worth.value().begin()]; + } + +private: + double tRate; +}; + +/** An instance of eoSelectPerf2Worth that does selection from the Worthes + * using a ... roulette wheel selection, yes! + */ +template +class eoRouletteWorthSelect : public eoSelectFromWorth +{ +public: + typedef vector::iterator worthIterator; + + /* Default ctor from an eoPerf2Worth object + */ + eoRouletteWorthSelect(eoPerf2Worth &_perf2Worth) : + eoSelectFromWorth(_perf2Worth) {} + + /* We have to override the default behavior to compute the total + * only once! + */ + virtual void setup(const eoPop& _pop) + { + perf2Worth(_pop); + total = 0.0; + for (worthIterator it = perf2Worth.value().begin(); + it& _pop) + { + worthIterator it = roulette_wheel( + perf2Worth.value().begin(), + perf2Worth.value().end(), + total); + return _pop[it-perf2Worth.value().begin()]; + } + +private: + double total; +}; + +#endif + diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 9d860873e..754d69541 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -136,7 +136,7 @@ It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) float roulette = _gen.uniform(total); if (roulette == 0.0) // covers the case where total==0.0 - return _min + _gen.random(_end - _min); // uniform choice + return _begin + _gen.random(_end - _begin); // uniform choice It i = _begin; diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index e136e6dc5..687da2cdf 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -16,6 +16,8 @@ // general #include #include +#include +#include //----------------------------------------------------------------------------- struct Dummy : public EO @@ -123,8 +125,6 @@ eoValueParam tournamentSizeParam = parser.createParam detSelect(oRate); +// testSelectMany(detSelect, "detSelect"); // Roulette - eoProportionalSelect propSelect; - testSelectOne(propSelect, oRate, "propSelect"); +// eoProportionalSelect propSelect; +// testSelectOne(propSelect, oRate, "propSelect"); // Ranking - eoRankingSelect rankSelect(rankingPressure); - testSelectOne(rankSelect, oRate, "rankSelect"); +// eoRankingSelect rankSelect(rankingPressure); +// testSelectOne(rankSelect, oRate, "rankSelect"); + + // New ranking using the perf2Worth construct + cout << "Avant appel a LinearRanking()" << endl; + eoRankingSelect newRankingSelect(rankingPressure); // pressure 2 by default + testSelectOne(newRankingSelect, oRate, "newRankSelect"); + + // New ranking using the perf2Worth construct + cout << "Avant appel a exponentialRanking()" << endl; + eoRankingSelect expRankingSelect(rankingPressure,2); + testSelectOne(expRankingSelect, oRate, "expRankingSelect"); // Det tournament eoDetTournamentSelect detTourSelect(tSize); @@ -152,8 +162,12 @@ eoValueParam tournamentSizeParam = parser.createParam(stochTourSelect, oRate, "stochTourSelect"); // Fitness scaling - eoFitnessScalingSelect fitScaleSelect(rankingPressure); - testSelectOne(fitScaleSelect, oRate, "fitScaleSelect"); +// eoFitnessScalingSelect fitScaleSelect(rankingPressure); +// testSelectOne(fitScaleSelect, oRate, "fitScaleSelect"); + + // NEW Fitness scaling + eoFitnessScalingSelect newFitScaleSelect(rankingPressure); + testSelectOne(newFitScaleSelect, oRate, "NewFitScaleSelect"); return 1; } From 70d98042777680a022502411eda7d78af3de3565 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Feb 2001 09:39:06 +0000 Subject: [PATCH 0480/2134] works for me --- eo/src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 3982f4822..5aad893d8 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,4 +11,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoInvalidateOps.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h es.h ga.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoInvalidateOps.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoPerf2Worth.h eoFitnessScalingSelect.h eoLinearFitScaling.h eoRanking.h es.h ga.h + From 83e883a1586fea464c93184d7c4752d5e4bdbaf0 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Feb 2001 18:00:18 +0000 Subject: [PATCH 0481/2134] Added oine star at start of comment to have Doxygen process it !!! --- eo/src/eoLinearFitScaling.h | 2 +- eo/src/eoRanking.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h index fee411863..b5c0d8aa1 100644 --- a/eo/src/eoLinearFitScaling.h +++ b/eo/src/eoLinearFitScaling.h @@ -30,7 +30,7 @@ #include #include -/* An instance of eoPerf2Worth +/** An instance of eoPerf2Worth * COmputes the linearly scaled fitnesses * with given selective pressure * Pselect(Best) == pressure/sizePop diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index 4c8031c8d..37fd5f643 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -29,7 +29,7 @@ #include -/* An instance of eoPerfFromWorth +/** An instance of eoPerfFromWorth * COmputes the ranked fitness: fitnesses range in [m,M] * with m=2-pressure/popSize and M=pressure/popSize. * in between, the progression depends on exponent (linear if 1). From 1662fd2a8baac63d8e5b0bcb90f8a77f35cfffdd Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Feb 2001 06:42:20 +0000 Subject: [PATCH 0482/2134] Modified crossover and mutation to account for the new interface (bool ...) Added the genop.tmpl, template for general op, 3 cases, growing pop, shrinking pop through erase, thrinking pop through extra selector --- eo/tutorial/Templates/crossover.tmpl | 17 +-- eo/tutorial/Templates/genop.tmpl | 171 +++++++++++++++++++++++++++ eo/tutorial/Templates/mutation.tmpl | 9 +- 3 files changed, 186 insertions(+), 11 deletions(-) create mode 100644 eo/tutorial/Templates/genop.tmpl diff --git a/eo/tutorial/Templates/crossover.tmpl b/eo/tutorial/Templates/crossover.tmpl index ed8344c95..db1d054f2 100644 --- a/eo/tutorial/Templates/crossover.tmpl +++ b/eo/tutorial/Templates/crossover.tmpl @@ -22,13 +22,14 @@ public: * @param Indi1 The first parent * @param Indi2 The first parent */ - void operator()(Indi& Indi1, Indi& Indi2) + bool operator()(Indi& Indi1, Indi& Indi2) { // do whatever needs to be done -// DON'T FORGET if an individual is modified, to invalidate its fitness!!! - Indi1.invalidate(); - Indi2.invalidate(); + // if at least one individual has been modified + return true; + // otherwise + // return false; } protected: @@ -56,11 +57,13 @@ public: * @param Indi1 The first parent * @param Indi2 The first parent - const */ - void operator()(Indi& Indi1, const Indi& Indi2) + bool operator()(Indi& Indi1, const Indi& Indi2) { // do whatever needs to be done - // DON'T FORGET if an individual is modified, to invalidate its fitness!!! - Indi1.invalidate(); + // if Indi1 has been modified + return true; + // otherwise + // return false; } protected: diff --git a/eo/tutorial/Templates/genop.tmpl b/eo/tutorial/Templates/genop.tmpl new file mode 100644 index 000000000..3f0bebc39 --- /dev/null +++ b/eo/tutorial/Templates/genop.tmpl @@ -0,0 +1,171 @@ +Template for simple operators +============================= + +=========================================================================== +eoGen : general operator that takes any number of parents and generates +====== any number of offspring + +First, a GenOp that creates more offspring than there are parents +----------------------------------------------------------------- + +template class eoMyDerivedGrowGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoMyDerivedGrowGenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMyDerivedGrowGenOp"; } + + /// The TOTAL number of offspring (including modified parents) + unsigned max_production(void) { return NbOffspring; } + + /** + * eoGrowGen operator - eventually modifies the parents + * BUT does generate more offspring + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // select the last parent + // don't advance after the last one: _plop always + // points to the last that has already been treated + + // apply operator to the parents (modifying them AND generating + // new individuals ofs1, ofs2, ..., ofsN + _plop.insert(ofs1); + ++_plop; // advance after each insertion + ... + _plop.insert(ofsN); + // don't advance after the last one: _plop always + // points to the last that has already been treated + + // oh right, and invalidate fitnesses of modified parents + parent1.invalidate(); + ... + parentN.invalidate(); + } + + +protected: + paramType anyParameter +}; + +=========================================================================== +Now, a GenOp that creates less offspring than there are parents +--------------------------------------------------------------- +First version, get parents from populator, and erase some of them +----------------------------------------------------------------- + +template class eoMyDerivedShrink1GenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoMyDerivedShrink1GenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMyDerivedShrink1GenOp"; } + + /// The TOTAL number of offspring (here = nb of remaining modified parents) + unsigned max_production(void) { return NbLeftParents; } + + /** + * eoShrinkGen operator - modifies some of the parents + * and kills the rest + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // select the last parent + // don't advance after the last one: _plop always + // points to the last that has already been treated + + // modify some of the parents (the first ones + // as erase removes backwards) + ... + + // then kill the ones that are now useless + _plop.erase(); // as many times as necessary + ... + // oh right, and invalidate fitnesses of remaining modified parents + parent1.invalidate(); + ... + parentK.invalidate(); + } + + +protected: + paramType anyParameter +}; + +=========================================================================== +Now, a GenOp that creates less offspring than there are parents +--------------------------------------------------------------- +Second version, get parents from an external selector (no erasing) +------------------------------------------------------------------ + +template class eoMyDerivedShrink2GenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoMyDerivedShrink2GenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMyDerivedShrink2GenOp"; } + + /// The TOTAL number of offspring (here = nb of parents modified in place) + unsigned max_production(void) { return NbLeftParents; } + + /** + * eoShrinkGen operator - modifies some parents in the populator + * using extra "parents" selected from an external selector + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // select the last parent you need + // don't advance after the last one: _plop always + // points to the last that has already been treated + + // get extra parents - use private selector + // _plop.source() is the eoPop used by _plop to get parents + // WARNING: you are not allowed to modify them (mandatory "const") + const EOT& parentN+1 = sel(_plop.source()); + ... + const EOT& parentM = sel(_plop.source()); + + // modify (in place) the "true" parents + // (i.e. parent1, ..., parentsN) + ... + + // invalidate fitnesses of modified parents + parent1.invalidate(); + ... + parentN.invalidate(); + } + + +protected: + paramType anyParameter +}; diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 3622e214d..30b1724a4 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -21,12 +21,13 @@ public: * eoMon crossover - modifies the parent * @param Indi The parent */ - void operator()(Indi& Indi) + bool operator()(Indi& Indi) { // do whatever needs to be done - -// DON'T FORGET if an individual is modified, to invalidate its fitness!!! - Indi.invalidate(); + // if Indi has been modified + return true; + // otherwise + // return false; } protected: From a403525af015525a30a95491f61d5e96b36adb95 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Feb 2001 06:47:31 +0000 Subject: [PATCH 0483/2134] Forgot the selector in the ctor --- eo/tutorial/Templates/genop.tmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/Templates/genop.tmpl b/eo/tutorial/Templates/genop.tmpl index 3f0bebc39..397f31257 100644 --- a/eo/tutorial/Templates/genop.tmpl +++ b/eo/tutorial/Templates/genop.tmpl @@ -124,8 +124,8 @@ public: /** * (Default) Constructor. */ - eoMyDerivedShrink2GenOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} + eoMyDerivedShrink2GenOp(eoSelectOne & _sel, paramType _anyParameter) : + sel(_sel), anyParameter(_anyParameter) {} /// The class name. Used to display statistics string className() const { return "eoMyDerivedShrink2GenOp"; } @@ -167,5 +167,6 @@ public: protected: + eoSelectoIne & sel; paramType anyParameter }; From e0ace0794fa94b08662a5d3452ede74f6be170e3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Feb 2001 08:22:53 +0000 Subject: [PATCH 0484/2134] Now takes into account the last (and last!) modification of the operator interace: no more invalidate, but a bool returned for simple operators, and a better description of the eoPopulator/eoOpContainer links. --- eo/tutorial/html/eoOperators.html | 464 ++++++++++++++++++------------ 1 file changed, 284 insertions(+), 180 deletions(-) diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index bcd070cbc..b7c61d1b5 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -2,7 +2,7 @@ - + Variation Operators @@ -24,10 +24,10 @@ combinations- Advanced operators Variation Operators Variation Operators -
        Variation operators modify individuals, or, equivalently, move them -in the search space. In Evolutionary Algorithms, varitaion operators are -almost always stochastic, i.e. they -are based on random numbers, or equivalently, perform random modifications +
        Variation operators modify the gnotype of individuals, or, equivalently, +move them in the search space. In Evolutionary Algorithms, varitaion operators +are almost always stochastic, i.e. +they are based on random numbers, or equivalently, perform random modifications of their arguments. Variation operators are classified depending on the number of arguments they use and/or modify.
          @@ -75,7 +75,15 @@ operators, such as crossover operators where the mate is chosen according to sexual preference rather than fitness-based preferences.
        -EO classes for variation operators: +Implementation +

        The basic idea of EO variation operators is that they operate on genotypes +only. Hence there should be generally no reference to anything related +to the fitness within a variation operator. However, whenever the genotype +of an individual has been modified, it will be necessary to recompute its +fitness before any selection process. This is why all +variation operator return a bool that indicates whether or not +the genotype argument has been modified or not. +

        EO classes for variation operators:

        • Base classes: all variation operators @@ -127,9 +135,9 @@ way to generate two new parents from that!). modifications, i.e. modifying the arguments rather than generating new (modified) individuals. This results in the following interfaces for the functor objects eoBinOp and eoQuadOp: -

          void operator()(EOT & , const EOT &)         +

          bool operator()(EOT & , const EOT &)         for eoBinOp (note the const) -
          void operator()(EOT & , EOT & +
          bool operator()(EOT & , EOT & )                       for eoQuadOp

          which you could have guessed from the inheritance diagrams up to the @@ -139,28 +147,42 @@ an eoQuad object.

          Using crossover operators:
          Directly applying crossover operators is straightforward from the interface above: -
          eoBinOpDerivedClass<Indi> myBinOp(parameters);     -//  use constructor to pass -
          eoQuadOpDerivedClass<Indi> myQuadOp(parameters);   -//  any useful argument -
          Indi eo1= ..., eo2= ...;   // -the candidates to crossover -
          myBinOp(eo1, eo2);         -// will modify eo1 only -
          myQuadOp(eo1, eo2);        -// will modify eo1 and eo2 -

          However, you will hardly have to do so, as operators are used within -other classes, and are applied systematically to whole sets of individuals -(e.g. that have already been selected, in standard generational evolutionary -algorithms). -
          Hence the way to use such operators will more likely ressemble, if -you are using for instance an SGA, this (definition, -usage). -See also the different ways that are described below, encapsulating the -operators into combined operators objects. +
          eoBinOpDerivedClass<Indi> myBinOp(parameters);   + +//  use constructor to pass +
          eoQuadOpDerivedClass<Indi> myQuadOp(parameters); + +//  any useful argument +
          Indi eo1= ..., eo2= ...;    + +// the candidates to crossover +
          if (myBinOp(eo1, eo2)) +
             { ...                    + +// eo1 has been modified, not eo2 +
             } +
          else ...                    + +// none has been modified +
          if (myQuadOp(eo1, eo2)) +
             { ...                    + +// both eo1 and eo2 have been modified +
             } +
          else ...                    + +// none has been modified +

          However, you will hardly have to actually apply operators to individuals, +as operators are used within other classes, and are applied systematically +to whole sets of individuals (e.g. that have already been selected, in +standard generation-based evolutionary algorithms). +
          Hence the way to use such operators will more likely ressemble this +if you are using for instance an SGA. See also the different ways that +are described below, encapsulating the operators into combined operators +objects.

          Writing a crossover operator: -
          There are only two things to modify in the template +
          There are three things to modify in the
          template class definitions provided (apart from the name of the class you are creating!)


          Combining @@ -240,9 +267,9 @@ simple operators: proportional combinations<

          The best thing to do is to go to the Lesson2 of the tutorial, where everything is explained. You will find out how you can use -
          several mutations (respectiveley crossovers) as a single operator: -every time the operator is called, one of the available operators is chosen -by some roulette wheel selection using realtive weights. +
          several mutations (respectiveley quadratic crossovers) as a single +operator: every time the operator is called, one of the available operators +is chosen by some roulette wheel selection using realtive weights.


          General Operators @@ -256,51 +283,46 @@ and it is as usual templatized by the type of individual it can handle (see documentation for eoGenOp :-)

          Interface: -
          The interface for eoGenOp +
          All the work a general operator is done within the apply() +method. WHy not in the usual operator() method? Because some memory management +are needed, that are performed in the base class itself - which then calls +the virtual apply() method. +The interface for a eoGenOp thus is +not deducible from its inheritance diagram, and actually is +

              void apply(eoPopulator<EOT>& +_plop) +

          As you can see,the interface for eoGenOp is based on that of another class, called eoPopulator. An eoPopulator is a population, but also behaves like an iterator over a population (hence -the name, Population-Iterator). -

          The basic -interface of an eoPopulator -(see also the documentation, -of course) is the following: Individuals are accessed through the operator*; -Basic iterator operations are available, like (pre)incrementation through -operator++, -position management through seekp -(returns the current position) and tellp -(go to a given position); Individuals can also be inserted -and erased at current position using -the corresponding methods; last but not least, as the individuals are returned -by reference, it is mandatory to ensure that they will not be moved around -later: the memory management  routine reserve is called whenever there -is a chance to add some individuals in the population. +the name, Population-Iterator).  +However, please note that you should probably never use an eoGenOp alone, +but rather through objects of type eoOpContainer.

          This results in the following general interface for an eoGenOp: It receives as argument an eoPopulator, gets the individuals it needs using the operator*, and must handle the positinning of the  using the operator++ method. -

          void operator()(eoPopulator& +

          bool apply()(eoPopulator& _pop)
          { -
            EOT & eo1 = *_pop; // get -(select if necessary) the guy -
            ++_pop;       +
             EOT& parent1 = *_pop; +// +select the first parent +
             ++_plop;        -// advance -
            EOT & eo2 = *_pop; // get -(select if necessary) the guy -
            ++_pop;       +// advance once for each selected parents +
             ... +
             EOT& parentN = *_pop; +// +select the last parent +
                    -// advance -
          ... -
            EOT & eoN = *_pop; // get -(select if necessary) the guy -
            ++_pop;       - -// advance +
          // don't advance after the last one: _plop always
          +
                      +// points to the last that has already been treated

          // do whatever the operator is supposed to do
          } @@ -318,29 +340,40 @@ were parents
          , it needs to insert them into the list using the eoPopulator as in the following:

        • -


          void operator()(eoPopulator& +
            +

            +
            +
            +

          void apply()(eoPopulator& _pop)
          { -
            EOT & eo1 = *_pop; // get -(select if necessary) the guy -
            ++_pop;       - -// advance -
            // Now create second offspring - eo1 -is modified too! -
            EOT eo2 = create_individual(eo1); -
            // inserts eo2 in _pop after eo1 -
            _pop.insert(eo2); -
          ... -
          Of course the size of the resulting population will grow - and you -should have a replacement procedure that takes care of that. +
            // get the necessary number +of parents (see above) +
            ... +
            // Now create any supplementary offspring +
            EOT ofs1 = create_individual(...); +
            ... +
            EOT ofsK = create_individual(...); +
            // inserts offspring in _pop after +parentN +
            _pop.insert(ofs1); +
            ... +

            // invalidate the parents that +have been modified +
            parent1.invalidate(); +
            ... +
            parentN.invalidate(); +
          }   // over +

          Of course the size of the resulting population will grow - and you should +have a replacement procedure that takes care of that. +
           

        • The case where more parents are needed than offspring will be created is a little more delicate: think about eoBinOp, -and try to imagine the reasons why no crossover of that class asre used -in the first lessons of the tutorial, within the SGA framework. There are -two possibilities:
        • +and try to imagine the reasons why no crossover of that class are used +in the first lessons of the tutorial, within the SGA framework. +
          There are two possibilities:
          • If you think "generational", the first idea is to get the parents from @@ -351,41 +384,47 @@ and you can access it from inside the GenOp method. For instance

          •  

              -

            void operator()(eoPopulator& +
              +
              +

            void apply()(eoPopulator& _pop)
            { -
              EOT & eo1 = *_pop; // get -(select if necessary) the guy -
              ++_pop;      - -// advance -
              const EOT & eo2 = select(_pop.source()); -

            where select is any selector you like. Note the const: you are not allowed -to modify an element of the original population (but you could of course -have copied it!). Now to find out where that selector comes from, you'll -have to wait until next section. If you can't wait, go directly there. +
              // get the necessary number +of parents (see above) +
              ... +
              // get extra parents - use +private selector +
              const EOT& parentN+1 = select(_pop.source()); +
              ... +
              const EOT& parentM = select(_pop.source()); +

            where select is any selector you like. Note the +const: you are not allowed to modify an element of the original +population (but you could of course have copied it!). As usual, the select +selector was pased to the operator at construct time.

          • If you don't care about the size of the offspring population, you can use the delete method of the class eoPopulator. For instance
          • -
            void operator()(eoPopulator& +
            void apply()(eoPopulator& _pop)
            { -
              EOT & eo1 = *_pop; // get -(select if necessary) the guy -
              ++_pop;      - -// advance -
              EOT & eo2 = *_pop; // get -(select if necessary) the guy -
              ++_pop;      - -// advance -
              // do whatever needs to be done, modifying -eo1 but not eo2 -
              _pop.delete();   // -removes (untouched) eo2 from the list
          +
            // get the necessary number +of parents (see above) +
            ... +
            // do whatever needs to be done to +any parent +

            // then kill the ones that are now +useless +
            _plop.erase();   +// as many times as necessary +
            ... +
            // invalidate fitnesses of remaining +modified parents +
            parent1.invalidate(); +
            ... +
            parentK.invalidate(); +
          }

      Warning: if you use operators that have different number of parents than offspring, you are deviating from @@ -398,36 +437,84 @@ for all forthcoming EO algorithms.
      Directly applying general operators to given individuals is impossible in EO, due to its interface. You need the help of an individual dispenser of class eoPopulator. -But anyway general operators were thought to be used mainly in combination -of one another, as described below. +But anyway general operators were thought to be used putely in eoOpContainer, +as described below.

      Writing a general operator: -
      There are many things to modify in the template +
      There are many things to modify in the
      template class definitions provided.

      • -The constructor, where you pass to the object -any useful parameter (see private data at end of class definition).
      • +First you have to choose which kind of general +operator you want, i.e. with more (or as many) offspring than parents, +or less offspring than parents.
      • -The operator() method, which performs the -actual crossover. Remember you must use the argument eoPopulatorto -access the members of the [p[ulation in turn (method +In the latter case (more parents than offspring), you can decide either +to get the extra parents from the populator (to delete them later), or +to select extra parents using a private selector.
      • + +
      • +Now you can modify the constructor, where +you pass to the object any useful parameter (see private data at end of +class definition). In case you need an external selector, you have to choose +it (or write it!) - it should be an eoSelectOne +object.
      • + +
      • +Finally, write the core of the operator in method apply(). +Remember you must use the argument eoPopulatorto +access the members of the population in turn (method operator*), you may use the initial population (method source()), as well as the insert or delete methods.
      • +
      -
      Warning: as usual, don't forget -to invalidate the fitness of the individual -- if it has actually been modified. Otherwise, the lazy + +the fitness again and will keep the old obsolete value.

    The populators: -
    The public interface class eoPopulator -has been described above. However, a protected method, termed select,  +
    As has been said above, an +eoPopulator +is a population, but also behaves like +an iterator over a population (hence +the name, Population-Iterator). +

    The basic +interface of an eoPopulator +(see also the documentation, +of course) is the following: +

      +
    • +Individuals are accessed through the operator*;
    • + +
    • +Basic iterator operations are available, like (pre)incrementation through +operator++, +position management through seekp +(returns the current position) and tellp +(go to a given position);
    • + +
    • +Individuals can also be inserted and +erased +at current position using the corresponding methods;
    • + +
    • +last but not least, as the individuals are returned by reference, it is +mandatory to ensure that they will not be moved around later: the memory +management  routine reserve +is called whenever there is a chance to add some individuals in the population +- i.e. in the eoGenOp base class operator() method.
    • +
    +Moreover, a protected method, termed select,  is used inside the object to get new parents for the following operator, and its implementation distinguishes two types of eoPopulator:
      @@ -447,19 +534,29 @@ object (passed at construct time). Hence it can handle any number of parents at will. The idea of such populator is to handle the whole breeding process, i.e. selection and variation operators.
    -An immediate consequence is that if you are not sure of the numebr of  +An immediate consequence is that if you are not sure of the number of  parents you will need in some operators (e.g. because of some stochastic proportional selection ebtween operators that don't need the same number of parents, then you must use an eoSelectivePopulator -to apply the variation operators to the population. +to apply the variation operators to the population, and thus get exactly +the number of offspring you want. +

    Example: An eoSelectivePopulator +is the main ingredient of the eoGeneralBreeder +operator() +method - a class that creates a population of offspring from the parents +applying an eoGenOp (usually an eoOpContainer) to all selected parents +in turn.


    General -Combinations: -
    There are two main ways to use and combine general operators in EO: -the proportional combination, similar to what has been described for simple -operators above, and the sequential -combination, which amounts to apply all operators in turn to a bunch of -individuals, each operator being applied with a specific probability. +Operator Containers:
    +
    General operators in EO are meant to be used withing eoOpContainer +objects, that allow to combine them in a hierarchical and flexible way. +There are two ways to do that: the proportional +combination, similar to what has been described for simple operators +above, +and the sequential combination, which +amounts to apply all operators in turn to a bunch of individuals, each +operator being applied with a specific probability.

    Proportional combinations
    When called upon a population (through an eoPopulator object), an eoProportionalOpContainer @@ -519,6 +616,25 @@ Next pending parent

  • Next operator
  • +Warning: the way rate +will be used is highly dependent on the type of eoOpContainer +your are creating there: +
      +
    • +The rates for eoProportionalOpContainer +will be used in a roulette wheel choice among all operators. They can take +any value, the only important thing is their relative +values.
    • + +
    • +The "rates" for eoSequentialOpContainer actually +are probabilities, i.e. they will be +used in a coin-flipping to determine whether that particuler operator will +be applied to the next candidates at hand. They should be in +[0,1] (no error will happen if they are not, but the operator +will be applied systematically - this is equivalent of a rate equal to +1).
    • +
    Remark:The eoSGATransform presented in Lesson2 can be viewed as a particular type of eoSequentialOpContainer. It was not coded that way in order to provide a gradual introduction to @@ -541,28 +657,16 @@ Gen
    :

    someOperatorType<Indi> myOperator;
    eoYYYOpContainer<Indi> myOpContainer;
    myOpContainer.add(myOperator, rate); // -rate: double whose meaning depends on XXX -

    where YYY can be one of Proportional and Sequential. -
    Warning: the way rate -will be used is highly dependent on the type of eoOpContainer -your are creating there: -

      -
    • -The rates for eoProportionalOpContainer -will be used in a roulette wheel choice among all operators. They can take -any value, the only important thing is their relative -values.
    • - -
    • -The "rates" for eoSequentialOpContainer actually -are probabilities, i.e. they will be -used in a coin-flipping to determine whether that particuler operator will -be applied to the next candidates at hand. They should be in -[0,1] (no error will happen if they are not, but the operator -will be applied systematically - this is equivalent of a rate equal to -1).
    • -
    -Containers, +rate: double whose meaning depends on YYY
    +

    where YYY can be one of Proportional and Sequential. Note that before +being added to the container, all simple operators are wrapped into the +corresponding eoGenOp (see e.g. how an eoMonOp +is wrapped into +an eoMonGenOp- or how any +operator is handled by calling the appropriate wrapper). In particular, +the wrapper ensures that individuals who have +been modified are invalidated. +

    Containers, Selectors and Populators
    The way the eoOpContainer are applied on a population using an eoPopulator @@ -633,20 +737,20 @@ general operators:
    preferences, i.e. choose a mate for a first parent according to some characteritics of that first parent).
    This is made possible in EO because the general operators have a handle -on the initial population through the method source() of the argument eoPopulator -they work on. Their operator() +on the initial population through the method source() +of the argument eoPopulator they work on. Their apply() method shoudl look like -

    void operator()(eoPopulator& +

    void apply()(eoPopulator& _pop)
    {
      EOT & eo1 = *_pop; // get (select if necessary) the first guy -
      ++_pop;          +
      ++_pop;       -// advance +
    // advance
      EOT & eo2 = findBlonde(_pop.source()); - -// select mate +
    // +select mate
    // do whatever the operator is supposed to do
    } @@ -671,7 +775,7 @@ documentation Marc Schoenauer
    Last -modified: Fri Dec. 8 2000  +modified: Sat. Feb. 17 2001 
      From 025eb736ee523bb51c27fb2c923c2aa24f7b0cf9 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sat, 17 Feb 2001 10:51:31 +0000 Subject: [PATCH 0485/2134] eoVector is back (eoFixedLength and eoVariableLength are gone) Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: eoNormalGenerator eoUniformGenerator eoBooleanGenerator eoNegExpGenerator Note the suffix that are added to aid in determining what these classes do --- eo/app/mastermind/mastermind.h | 4 +- eo/src/Makefile.am | 2 +- eo/src/eo | 3 +- eo/src/eoPerf2Worth.h | 4 +- eo/src/eoScalarFitness.h | 21 ++-- eo/src/eoVariableLength.h | 104 ----------------- eo/src/eoVariableLengthCrossover.h | 1 - eo/src/{eoFixedLength.h => eoVector.h} | 20 ++-- eo/src/es/eoEsFull.h | 18 +-- eo/src/es/eoEsSimple.h | 12 +- eo/src/es/eoEsStdev.h | 20 ++-- eo/src/es/eoReal.h | 20 ++-- eo/src/ga/eoBit.h | 12 +- eo/src/utils/Makefile.am | 2 +- eo/src/utils/eoRNG.cpp | 3 +- eo/src/utils/eoRnd.h | 63 ----------- eo/src/utils/eoRndGenerators.h | 149 +++++++++++++++++++++++++ eo/src/utils/eoUniform.h | 104 ----------------- eo/test/t-eoRandom.cpp | 10 +- 19 files changed, 222 insertions(+), 350 deletions(-) delete mode 100644 eo/src/eoVariableLength.h rename eo/src/{eoFixedLength.h => eoVector.h} (85%) delete mode 100644 eo/src/utils/eoRnd.h create mode 100644 eo/src/utils/eoRndGenerators.h delete mode 100644 eo/src/utils/eoUniform.h diff --git a/eo/app/mastermind/mastermind.h b/eo/app/mastermind/mastermind.h index 44b64b85a..82495a3d4 100644 --- a/eo/app/mastermind/mastermind.h +++ b/eo/app/mastermind/mastermind.h @@ -8,7 +8,7 @@ //----------------------------------------------------------------------------- #include // exit EXIT_FAILURE -#include // eoFixedLength +#include // eoVectorLength #include // eoMonOp eoQuadraticOp #include // eoInit #include // uniform_generator @@ -29,7 +29,7 @@ typedef vector genotype; // Chrom //----------------------------------------------------------------------------- -typedef eoFixedLength Chrom; +typedef eoVector Chrom; //----------------------------------------------------------------------------- // eoChromEvaluator diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 5aad893d8..3137bf258 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,5 +11,5 @@ lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoFixedLength.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoInvalidateOps.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLength.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoPerf2Worth.h eoFitnessScalingSelect.h eoLinearFitScaling.h eoRanking.h es.h ga.h +libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoVector.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoInvalidateOps.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoPerf2Worth.h eoFitnessScalingSelect.h eoLinearFitScaling.h eoRanking.h es.h ga.h diff --git a/eo/src/eo b/eo/src/eo index 4d5fe9b98..a80cf4ce6 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -58,8 +58,7 @@ #include // eo's -#include -#include +#include #include diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index ea9d8d179..d27bcd1c9 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -37,12 +37,12 @@ It is an eoStat so @see eoSelectFromWorth */ -template +template class eoPerf2Worth : public eoStat > { public: eoPerf2Worth():eoStat >(vector(0), - "Worthes") {} + "Worths") {} }; #endif diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index ef35722bb..8402e1e99 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -4,7 +4,7 @@ eoScalarFitness.h (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,19 +31,16 @@ /** * eoScalarFitness >: - * Wraps a scalar fitness values such as a double or int, with the option of + * Wraps a scalar fitness values such as a double or int, with the option of * maximizing (using less) or minimizing (using greater) - * - * - * - * + * It overrides operator<() to use the Compare template argument * - * Suitable constructors and assignments and casts are defined to work + * Suitable constructors and assignments and casts are defined to work * with this quantity as if it were a ScalarType. */ -template -class eoScalarFitness +template +class eoScalarFitness { public : @@ -59,7 +56,7 @@ class eoScalarFitness operator ScalarType(void) const { return value; } /// Comparison, using less by default - bool operator<(const eoScalarFitness& other) const + bool operator<(const eoScalarFitness& other) const { return Compare()(value, other.value); } // implementation of the other operators @@ -77,9 +74,9 @@ class eoScalarFitness /** Typedefs for fitness comparison, Maximizing Fitness compares with less, and minimizing fitness compares with greater. This because we want ordinary -fitness values (doubles) to be equivalent with Maximizing Fitness, and +fitness values (doubles) to be equivalent with Maximizing Fitness, and comparing with less is the default behaviour. -*/ +*/ typedef eoScalarFitness > eoMaximizingFitness; typedef eoScalarFitness > eoMinimizingFitness; diff --git a/eo/src/eoVariableLength.h b/eo/src/eoVariableLength.h deleted file mode 100644 index 838892088..000000000 --- a/eo/src/eoVariableLength.h +++ /dev/null @@ -1,104 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoVariableLength.h -// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoVariableLength_h -#define _eoVariableLength_h - -#include - -/** - Base class for variable length chromosomes. Derives from EO and vector, - redirects the smaller than operator to EO (fitness based comparison), - and implements the virtual functions printOn() and readFrom() -*/ - -template -class eoVariableLength : public EO, public std::vector -{ - public : - - typedef GeneType AtomType; - typedef std::vector ContainerType; - - // default ctor - eoVariableLength(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) - {} - - // we can't have a Ctor from a vector, it would create ambiguity - // with the copy Ctor - void value(std::vector _v) - { - resize(_v.size()); - copy(_v.begin(), _v.end(), begin()); - invalidate(); - } - - /// printing... - void printOn(ostream& os) const - { - EO::printOn(os); - os << ' '; - - os << size() << ' '; - - std::copy(begin(), end(), ostream_iterator(os, " ")); - } - - /// reading... - void readFrom(istream& is) - { - EO::readFrom(is); - - unsigned sz; - is >> sz; - - resize(sz); - unsigned i; - - for (i = 0; i < sz; ++i) - { - AtomType atom; - is >> atom; - operator[](i) = atom; - } - } - - /// to avoid conflicts between EO::operator< and vector::operator< - bool operator<(const eoVariableLength& _eo) const - { - return EO::operator<(_eo); - } - -}; - -/// to avoid conflicts between EO::operator< and vector::operator< -template -bool operator<(const eoVariableLength& _eo1, const eoVariableLength& _eo2) -{ - return _eo1.operator<(_eo2); -} - -#endif diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 72f7cba5a..7d8da085f 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -28,7 +28,6 @@ #define _eoVariableLengthCrossover_h #include -#include #include /** diff --git a/eo/src/eoFixedLength.h b/eo/src/eoVector.h similarity index 85% rename from eo/src/eoFixedLength.h rename to eo/src/eoVector.h index 9b65dc6e0..aacf8618d 100644 --- a/eo/src/eoFixedLength.h +++ b/eo/src/eoVector.h @@ -1,9 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoFixedLength.h +// eoVector.h // (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -24,8 +24,8 @@ */ //----------------------------------------------------------------------------- -#ifndef _eoFixedLength_h -#define _eoFixedLength_h +#ifndef _eoVector_h +#define _eoVector_h #include #include @@ -36,14 +36,14 @@ */ template -class eoFixedLength : public EO, public std::vector +class eoVector : public EO, public std::vector { public : - + typedef GeneType AtomType; typedef std::vector ContainerType; - eoFixedLength(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) + eoVector(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) {} // we can't have a Ctor from a vector, it would create ambiguity @@ -51,13 +51,13 @@ class eoFixedLength : public EO, public std::vector void value(std::vector _v) { if (_v.size() != size()) - throw runtime_error("Wrong size in vector assignation in eoFixedLength"); + throw runtime_error("Wrong size in vector assignation in eoVector"); copy(_v.begin(), _v.end(), begin()); invalidate(); } /// to avoid conflicts between EO::operator< and vector::operator< - bool operator<(const eoFixedLength& _eo) const + bool operator<(const eoVector& _eo) const { return EO::operator<(_eo); } @@ -95,7 +95,7 @@ class eoFixedLength : public EO, public std::vector /// to avoid conflicts between EO::operator< and vector::operator< template -bool operator<(const eoFixedLength& _eo1, const eoFixedLength& _eo2) +bool operator<(const eoVector& _eo1, const eoVector& _eo2) { return _eo1.operator<(_eo2); } diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 3036cc8b7..f4f2710af 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -27,7 +27,7 @@ #ifndef _eoEsFull_h #define _eoEsFull_h -#include +#include /** \ingroup EvolutionStrategies @@ -37,32 +37,32 @@ rates and correlated mutations. */ template -class eoEsFull : public eoFixedLength +class eoEsFull : public eoVector { public : typedef double Type; - - eoEsFull(void) : eoFixedLength() {} - + + eoEsFull(void) : eoVector() {} + std::string className(void) const { return "eoEsFull"; } void printOn(std::ostream& os) const { - eoFixedLength::printOn(os); + eoVector::printOn(os); os << ' '; std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); - + os << ' '; std::copy(correlations.begin(), correlations.end(), std::ostream_iterator(os, " ")); - + os << ' '; } void readFrom(istream& is) { - eoFixedLength::readFrom(is); + eoVector::readFrom(is); stdevs.resize(size()); diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h index 2f337fb00..c7ba1e6cd 100644 --- a/eo/src/es/eoEsSimple.h +++ b/eo/src/es/eoEsSimple.h @@ -30,13 +30,13 @@ #include #include -#include +#include /** \ingroup EvolutionStrategies One of the more simple evolution strategies, sporting just a single -stdeviation for the entire chromosome. For more advanced versions +stdeviation for the entire chromosome. For more advanced versions see also eoEsStdev eoEsFull @see eoEsStdev eoEsFull @@ -44,26 +44,26 @@ see also eoEsStdev eoEsFull */ template -class eoEsSimple : public eoFixedLength +class eoEsSimple : public eoVector { public : typedef double Type; - eoEsSimple(void) : eoFixedLength() {} + eoEsSimple(void) : eoVector() {} std::string className(void) const { return "eoEsSimple"; } void printOn(std::ostream& os) const { - eoFixedLength::printOn(os); + eoVector::printOn(os); os << ' ' << stdev << ' '; } void readFrom(istream& is) { - eoFixedLength::readFrom(is); + eoVector::readFrom(is); is >> stdev; } diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index f46b939e3..9c7b38315 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -27,39 +27,39 @@ #ifndef _eoEsStdev_h #define _eoEsStdev_h -#include +#include /** \ingroup EvolutionStrategies Evolutionary strategie style representation, supporting co-evolving standard -deviations. +deviations. */ template -class eoEsStdev : public eoFixedLength +class eoEsStdev : public eoVector { public : - + typedef double Type; - eoEsStdev(void) : eoFixedLength() {} + eoEsStdev(void) : eoVector() {} std::string className(void) const { return "eoEsStdev"; } - + void printOn(std::ostream& os) const { - eoFixedLength::printOn(os); - + eoVector::printOn(os); + os << ' '; std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); - + os << ' '; } void readFrom(istream& is) { - eoFixedLength::readFrom(is); + eoVector::readFrom(is); stdevs.resize(size()); unsigned i; diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index abf85fccf..9143f2784 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -29,12 +29,12 @@ #include // ostream, istream #include // string -#include +#include /** eoReal: implementation of simple real-valued chromosome. - * based on eoFixedLength class + * based on eoVector class */ -template class eoReal: public eoFixedLength +template class eoReal: public eoVector { public: @@ -42,15 +42,15 @@ template class eoReal: public eoFixedLength * (Default) Constructor. * @param size Size of the vector */ - eoReal(unsigned size = 0, double value = 0.0): - eoFixedLength(size, value) {} - + eoReal(unsigned size = 0, double value = 0.0): + eoVector(size, value) {} + /// My class name. - string className() const - { - return "eoReal"; + string className() const + { + return "eoReal"; } - + }; //----------------------------------------------------------------------------- diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 61be6e2f1..ed411b7da 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -39,7 +39,7 @@ #include // bind2nd #include // string -#include +#include /** \defgroup bitstring @@ -47,12 +47,12 @@ Various functions for a bitstring representation */ -/** eoBit: implementation of bitstring chromosome. +/** eoBit: implementation of bitstring chromosome. \class eoBit eoBit.h ga/eoBit.h \ingroup bitstring - * based on STL's vector specialization. + * based on STL's vector specialization. */ -template class eoBit: public eoFixedLength +template class eoBit: public eoVector { public: @@ -60,8 +60,8 @@ template class eoBit: public eoFixedLength * (Default) Constructor. * @param size Size of the binary string. */ - eoBit(unsigned size = 0, bool value = false): - eoFixedLength(size, value) {} + eoBit(unsigned size = 0, bool value = false): + eoVector(size, value) {} /// My class name. string className() const diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 109533aff..a75438f53 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,7 +10,7 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h selectors.h +libeoinc_HEADERS = compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h eoRndGenerators.h selectors.h diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index 36f6a4893..b1e592baf 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -1,10 +1,9 @@ #include #include "eoRNG.h" -/// The global object, should probably be initialized with an xor -/// between time and process_id. namespace eo { +/// The Global random number generator. eoRng rng((uint32) time(0)); } diff --git a/eo/src/utils/eoRnd.h b/eo/src/utils/eoRnd.h deleted file mode 100644 index eca67ec7a..000000000 --- a/eo/src/utils/eoRnd.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoRnd.h - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -/** -CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/Attic/eoRnd.h,v 1.1 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ -*/ -#ifndef _EORND_H -#define _EORND_H - -//----------------------------------------------------------------------------- - -#include - -//----------------------------------------------------------------------------- -// Class eoRnd -//----------------------------------------------------------------------------- - -#include // srand -#include // time -#include // runtime_error - -//----------------------------------------------------------------------------- - -#include - -//----------------------------------------------------------------------------- -/** - * Base class for a family of random 'number' generators. These 'numbers' - * can be anything, including full-fledged chromosomes. - */ -template -class eoRnd -{ -public: - - /** Main function: random generators act as functors, that return random numbers. - @return return a random number - */ - virtual T operator()() = 0; - -}; - -#endif diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h new file mode 100644 index 000000000..26d22111f --- /dev/null +++ b/eo/src/utils/eoRndGenerators.h @@ -0,0 +1,149 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoRndGenerators.h + + mimics the rnd_generator.h by putting the generators in the EO-hierarchy + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoRND_GENERATORS_H +#define eoRND_GENERATORS_H + +#include "eoRNG.h" +#include +#include + +/** + By popular demand re-introducing a base class for a family of + random number generators. Derived members of this class are useful + to initialize fixed/variable length genotypes that have an 'atomic' type + in an indepent way (thus without employing any knowledge abou the problem domain). + + The only change from previous EO's us the use of the suffix EO. This to + + See derived classes eoUniformGenerator, eoBooleanGenerator, eoNormalGenerator and eoNegExpGenerator +*/ +template +class eoRndGenerator : public eoF +{ + typedef T AtomType; +}; + +/** + The class eoUniform can be used in the STL generate function + to easily generate random floats and doubles. It can also + be used for ints and unsigneds by virtue of the static_cast + in the generator function. + + Also present is a specialization for boolean, that will + ignore the minima and maxima that are possibly set and will + return an unbiased flip of a coin. For a biased flip, use the eoBoolean + + either in [0, _max) if only 1 value (_max) is given + (or none, as _max defaults to 1.0) + or in [_min,_max) if 2 values are given (_min, _max) +*/ +template class eoUniformGenerator : public eoRndGenerator +{ + // added new ctor with 2 params, and modified the data to minim and range + // (was maxim only). MS 3/11/2000 + public : + eoUniformGenerator(T _max = T(1.0), eoRng& _rng = rng) : + minim(T(0.0)), range(_max), uniform(_rng) {} + eoUniformGenerator(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), uniform(_rng) + { + if (_min>_max) + throw logic_error("Min is greater than Max in uniform_generator"); + } + + /** + Generates the number, uses a static_cast to get the right behaviour + for ints and unsigneds + */ + T operator()(void) { return minim+static_cast(uniform.uniform(range)); } + +private : + T minim; + T range; + eoRng& uniform; +}; + + +/// Specialization for bool, does an unbiased coin flip +template <> +bool eoUniformGenerator::operator()(void) +{ + return uniform.flip(0.5); +} + +/** + The class eoBooleanGenerator can be used in the STL generate function + to easily generate random booleans with a specified bias +*/ +class eoBooleanGenerator : public eoRndGenerator +{ + public : + eoBooleanGenerator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + + bool operator()(void) { return gen.flip(bias); } + private : + float bias; + eoRng& gen; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class eoNormalGenerator : public eoRndGenerator +{ + public : + eoNormalGenerator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +/** + The class negexp_generator can be used in the STL generate function + to easily generate negative exponential distributed floats and doubles. The user + can supply a mean. +*/ +template class eoNegExpGenerator : public eoRndGenerator +{ + public : + eoNegExpGenerator(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + + T operator()(void) { return (T) negexp.negexp(mean); } + + private : + T mean; + eoRng& negexp; +}; + +#endif diff --git a/eo/src/utils/eoUniform.h b/eo/src/utils/eoUniform.h deleted file mode 100644 index dbeb40468..000000000 --- a/eo/src/utils/eoUniform.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoUniform.h - Uniform random number generator; - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -/** -CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/Attic/eoUniform.h,v 1.1 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ -*/ - -//----------------------------------------------------------------------------- - -#ifndef _EOUNIFORM_H -#define _EOUNIFORM_H - -//----------------------------------------------------------------------------- - -#include -#include - -//----------------------------------------------------------------------------- -// Class eoUniform -//----------------------------------------------------------------------------- - -/** Generates uniform random number over the interval [min, max) -Uses the global variable rng - */ - -using eo::rng; - -template -class eoUniform: public eoRnd -{ - public: - /** - * Default constructor. - * @param _min The minimum value in the interval. - * @param _max The maximum value in the interval. - */ - eoUniform(T _min = 0, T _max = 1) - : eoRnd(), min(_min), diff(_max - _min) {} - - /** - * copy constructor. - * @param _rnd the other rnd - */ - eoUniform( const eoUniform& _rnd) - : eoRnd( _rnd), min(_rnd.min), diff(_rnd.diff) {} - - /** Returns an uniform random number over the interval [min, max) - Uses global rng object */ - virtual T operator()() { - return min + T( rng.uniform( diff ) ); - } - - private: - T min; - double diff; -}; - -template<> -class eoUniform: public eoRnd -{ - public: - /** - * Default constructor. - * @param _min The minimum value in the interval. - * @param _max The maximum value in the interval. - */ - eoUniform(bool _min = false, bool _max = true) - : eoRnd() {} - - /** Returns an uniform random number over the interval [min, max) - Uses global rng object */ - virtual bool operator()() { - return rng.flip(0.5); - } - - private: - bool min; - double diff; -}; - -//----------------------------------------------------------------------------- - -#endif diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 57116af83..7250a0f61 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,23 +24,23 @@ */ /** -CVS Info: $Date: 2001-02-13 22:39:56 $ $Author: jmerelo $ $Revision: 1.7 $ +CVS Info: $Date: 2001-02-17 10:51:31 $ $Author: maartenkeijzer $ $Revision: 1.8 $ */ //----------------------------------------------------------------------------- #include // cout #include // ostrstream, istrstream -#include // eoBin +#include // eoBin //#include //#include //----------------------------------------------------------------------------- main() { - eoUniform u1(-2.5,3.5); - eoUniform u2(0.003, 0.0005 ); - eoUniform u3( 10000000U, 10000U); + eoUniformGenerator u1(-2.5,3.5); + eoUniformGenerator u2(0.003, 0.0005 ); + eoUniformGenerator u3( 10000000U, 10000U); /* eoNegExp e1(3.5); eoNegExp e2(0.003 ); eoNegExp e3( 10000U); From f36f6d12658ad0429385f260a5729d757e4c445c Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 18 Feb 2001 04:34:57 +0000 Subject: [PATCH 0486/2134] Added the eo::rng (instead of rng) as default parameter to all calls. Also t-eoRandom was abruptly aborting-> a min was greater than a max, and exceptions were not being caught. --- eo/src/utils/eoRndGenerators.h | 10 +++++----- eo/test/t-eoRandom.cpp | 25 +++++++++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index 26d22111f..57a58c691 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -68,9 +68,9 @@ template class eoUniformGenerator : public eoRndGenerator // added new ctor with 2 params, and modified the data to minim and range // (was maxim only). MS 3/11/2000 public : - eoUniformGenerator(T _max = T(1.0), eoRng& _rng = rng) : + eoUniformGenerator(T _max = T(1.0), eoRng& _rng = eo::rng) : minim(T(0.0)), range(_max), uniform(_rng) {} - eoUniformGenerator(T _min, T _max, eoRng& _rng = rng) : + eoUniformGenerator(T _min, T _max, eoRng& _rng = eo::rng) : minim(_min), range(_max-_min), uniform(_rng) { if (_min>_max) @@ -104,7 +104,7 @@ bool eoUniformGenerator::operator()(void) class eoBooleanGenerator : public eoRndGenerator { public : - eoBooleanGenerator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + eoBooleanGenerator(float _bias = 0.5, eoRng& _rng = eo::rng) : bias(_bias), gen(_rng) {} bool operator()(void) { return gen.flip(bias); } private : @@ -120,7 +120,7 @@ class eoBooleanGenerator : public eoRndGenerator template class eoNormalGenerator : public eoRndGenerator { public : - eoNormalGenerator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + eoNormalGenerator(T _stdev = T(1.0), eoRng& _rng = eo::rng) : stdev(_stdev), normal(_rng) {} T operator()(void) { return (T) normal.normal(stdev); } @@ -137,7 +137,7 @@ template class eoNormalGenerator : public eoRndGenerator template class eoNegExpGenerator : public eoRndGenerator { public : - eoNegExpGenerator(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + eoNegExpGenerator(T _mean = 1.0, eoRng& _rng = eo::rng) : mean(_mean), negexp(_rng) {} T operator()(void) { return (T) negexp.negexp(mean); } diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 7250a0f61..09f9b7a61 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,7 +24,7 @@ */ /** -CVS Info: $Date: 2001-02-17 10:51:31 $ $Author: maartenkeijzer $ $Revision: 1.8 $ +CVS Info: $Date: 2001-02-18 04:34:57 $ $Author: evomarc $ $Revision: 1.9 $ */ //----------------------------------------------------------------------------- @@ -38,17 +38,26 @@ CVS Info: $Date: 2001-02-17 10:51:31 $ $Author: maartenkeijzer $ $Revision: 1.8 //----------------------------------------------------------------------------- main() { + try{ eoUniformGenerator u1(-2.5,3.5); - eoUniformGenerator u2(0.003, 0.0005 ); - eoUniformGenerator u3( 10000000U, 10000U); - /* eoNegExp e1(3.5); - eoNegExp e2(0.003 ); - eoNegExp e3( 10000U); - cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; */ + eoUniformGenerator u2(0.0003, 0.0005 ); + eoUniformGenerator u3( 100000U, 10000000U); + + eoNegExpGenerator e1(3.5); + eoNegExpGenerator e2(0.003 ); + eoNegExpGenerator e3( 10000U); + /* cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; */ for ( unsigned i = 0; i < 100; i ++) { - cout << u1() << "\t" << u2() << "\t" << u3() << endl; + cout << "Uniform: " << u1() << "\t" << u2() << "\t" << u3() << endl; + cout << "NegExp: " << e1() << "\t" << e2() << "\t" << e3() << endl; } + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } return 0; // to avoid VC++ complaints } From e28211188aa04766d1e4739fb305b3039f89b22c Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 18 Feb 2001 06:41:30 +0000 Subject: [PATCH 0487/2134] Date and version number --- eo/tutorial/html/eoTutorial.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 74c0c1293..765ee84d8 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,7 +17,7 @@ and to

    EO Tutorial

    -
    Version 0.93 - Feb. 9 2001
    +
    Version 0.94 - Feb. 18 2001

    Welcome to EO tutorial/on-line documentation.

    Please note that this tutorial is not supposed From a79075f67308997ddcf1a3d1000743d311cddc4f Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 19 Feb 2001 12:23:13 +0000 Subject: [PATCH 0488/2134] Modified eoInit so that it would use the eoRndGenerator base class. To be able to use the primitive std::generate function, added a set of wrappers in eoSTLFunctor.h that have the copy semantics most STL functions expect (namely pass-by-value rather then pass-by-reference). Updated test/Makefile.am to also test t-eoRandom --- eo/src/eo | 1 + eo/src/eoInit.h | 28 +++++--- eo/src/eoSTLFunctor.h | 118 +++++++++++++++++++++++++++++++++ eo/src/eoVector.h | 8 ++- eo/src/ga/eoBit.h | 16 ++--- eo/src/ga/ga.cpp | 4 +- eo/src/utils/eoRndGenerators.h | 8 +-- eo/test/Makefile.am | 11 ++- eo/test/t-eoRandom.cpp | 47 ++++++------- eo/test/t-eoVector.cpp | 50 +++++++++----- eo/test/t-eobin.cpp | 28 ++++---- 11 files changed, 238 insertions(+), 81 deletions(-) create mode 100644 eo/src/eoSTLFunctor.h diff --git a/eo/src/eo b/eo/src/eo index a80cf4ce6..98bc61ab6 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -62,6 +62,7 @@ #include +#include #include #include diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 6af2ff2df..ac875b244 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoInit.h // (c) Maarten Keijzer 2000, GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,10 +27,14 @@ #ifndef _eoInit_H #define _eoInit_H +#include + #include +#include +#include /** - Base (name) class for Initialization of chromosomes, used in a population + Base (name) class for Initialization of chromosomes, used in a population contructor. It is derived from eoMonOp, so it can be used inside the algorithm as well. @@ -42,25 +46,29 @@ class eoInit : public eoUF {}; /** - Initializor for fixed length representations with a single type + Initializer for fixed length representations with a single type */ -template +template class eoInitFixedLength: public eoInit { public: - eoInitFixedLength(unsigned _howmany, Gen _generator = Gen()) + + typedef typename EOT::AtomType AtomType; + + eoInitFixedLength(unsigned _howmany, eoRndGenerator& _generator) : howmany(_howmany), generator(_generator) {} void operator()(EOT& chrom) { chrom.resize(howmany); - generate(chrom.begin(), chrom.end(), generator); + std::generate(chrom.begin(), chrom.end(), generator); chrom.invalidate(); } private : unsigned howmany; - Gen generator; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF generator; }; /** @@ -70,8 +78,8 @@ template class eoInitVariableLength: public eoInit { public: - eoInitVariableLength(unsigned _minSize, unsigned _maxSize, Gen _generator = Gen()) - : offset(_minSize), extent(_maxSize - _minSize), generator(_generator) + eoInitVariableLength(unsigned _minSize, unsigned _maxSize, Gen _generator = Gen()) + : offset(_minSize), extent(_maxSize - _minSize), generator(_generator) { if (_minSize >= _maxSize) throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); @@ -111,7 +119,7 @@ class eoInitAdaptor : public eoMonOp return true; } private : - + eoInit& init; }; diff --git a/eo/src/eoSTLFunctor.h b/eo/src/eoSTLFunctor.h new file mode 100644 index 000000000..682b4294b --- /dev/null +++ b/eo/src/eoSTLFunctor.h @@ -0,0 +1,118 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSTLFunctor.h +// (c) Maarten Keijzer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSTLFunctor_H +#define _eoSTLFunctor_H + +#include "eoFunctor.h" + +/** + Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the + copy semantics the STL functions usually require (i.e. they can be passed + by value, rather than the EO standard pass by reference). + + The family consists of eoSTLF, eoSTLUF, eoSTLBF that modify eoF, eoUF and eoBF + respectively +*/ +template +class eoSTLF +{ + public: + + typedef R result_type; + + eoSTLF(eoF& _f) : f(_f) {} + + R operator()(void) + { + return f(); + } + + private : + + eoF& f; +}; + +#ifdef _MSVC +/// specialization of void for MSVC users, unfortunately only works for eoF, +/// as MSVC does not support partial specialization either +template <> +void eoSTLF::operator()(void) +{ + f(); +} +#endif + +/** + Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the + copy semantics the STL functions usually require (i.e. they can be passed + by value, rather than the EO standard pass by reference). + + The family consists of eoSTLF, eoSTLUF, eoSTLBF that modify eoF, eoUF and eoBF + respectively +*/ +template +class eoSTLUF : public std::unary_function +{ + public: + eoSTLUF(eoUF& _f) : f(_f) {} + + R operator()(A1 a) + { + return f(a); + } + + private: + eoUF& f; +}; + +/** + Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the + copy semantics the STL functions usually require (i.e. they can be passed + by value, rather than the EO standard pass by reference). + + The family consists of eoSTLF, eoSTLUF, eoSTLBF that modify eoF, eoUF and eoBF + respectively +*/ +template +class eoSTLBF : public std::binary_function +{ + public: + eoSTLBF(eoUF& _f) : f(_f) {} + + R operator()(A1 a1, A2 a2) + { + return f(a1, a2); + } + + private: + + eoBF& f; +}; + +// TODO: put automated wrappers here... + +#endif \ No newline at end of file diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index aacf8618d..d4e89e5bf 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -43,12 +43,18 @@ class eoVector : public EO, public std::vector typedef GeneType AtomType; typedef std::vector ContainerType; + eoVector(unsigned size = 0, GeneType value = GeneType()) : EO(), std::vector(size, value) {} + /// copy ctor abstracting from the FitT + template + eoVector(const eoVector& _vec) : vector(_vec) + {} + // we can't have a Ctor from a vector, it would create ambiguity // with the copy Ctor - void value(std::vector _v) + void value(const std::vector& _v) { if (_v.size() != size()) throw runtime_error("Wrong size in vector assignation in eoVector"); diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index ed411b7da..668c91120 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -62,13 +62,13 @@ template class eoBit: public eoVector */ eoBit(unsigned size = 0, bool value = false): eoVector(size, value) {} - + /// My class name. - string className() const - { - return "eoBit"; + string className() const + { + return "eoBit"; } - + /** * To print me on a stream. * @param os The ostream. @@ -77,10 +77,10 @@ template class eoBit: public eoVector { EO::printOn(os); os << ' '; - os << size() << ' '; + os << size() << ' '; copy(begin(), end(), ostream_iterator(os)); } - + /** * To read me from a stream. * @param is The istream. @@ -95,7 +95,7 @@ template class eoBit: public eoVector if (is) { resize(bits.size()); - transform(bits.begin(), bits.end(), begin(), + transform(bits.begin(), bits.end(), begin(), bind2nd(equal_to(), '1')); } } diff --git a/eo/src/ga/ga.cpp b/eo/src/ga/ga.cpp index 802834b29..be17928b2 100644 --- a/eo/src/ga/ga.cpp +++ b/eo/src/ga/ga.cpp @@ -37,8 +37,8 @@ eoPop >& do_init_ga(eoParameterLoader& _parser, eoState& _state, Fi _parser.processParam(chromSize, "initialization"); _parser.processParam(popSize, "initialization"); - eoInitFixedLength init(chromSize.value(), boolean_generator()); - + eoBooleanGenerator gen; + eoInitFixedLength init(chromSize.value(), gen); // Let the state handle the memory eoPop& pop = _state.takeOwnership(eoPop()); diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index 57a58c691..089887ef2 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -26,8 +26,8 @@ //----------------------------------------------------------------------------- -#ifndef eoRND_GENERATORS_H -#define eoRND_GENERATORS_H +#ifndef eoRndGenerators_h +#define eoRndGenerators_h #include "eoRNG.h" #include @@ -37,9 +37,7 @@ By popular demand re-introducing a base class for a family of random number generators. Derived members of this class are useful to initialize fixed/variable length genotypes that have an 'atomic' type - in an indepent way (thus without employing any knowledge abou the problem domain). - - The only change from previous EO's us the use of the suffix EO. This to + in an indepent way (thus without employing any knowledge about the problem domain). See derived classes eoUniformGenerator, eoBooleanGenerator, eoNormalGenerator and eoNegExpGenerator */ diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 7e3c608f7..3128dc8e0 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -14,8 +14,8 @@ CXXFLAGS = -g ############################################################################### check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing \ - t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA -TESTS=run_tests + t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector +TESTS=run_tests t-eoVector t-eoRandom # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA @@ -101,6 +101,13 @@ t_eoGenOp_LDADD = $(LDADDS) ############################################################################### +t_eoVector_SOURCES = t-eoVector.cpp +t_eoVector_DEPENDENCIES = $(DEPS) +t_eoVector_LDFLAGS = -lm +t_eoVector_LDADD = $(LDADDS) + +############################################################################### + t_eoGA_SOURCES = t-eoGA.cpp binary_value.h t_eoGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoGA_LDFLAGS = -lm diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 09f9b7a61..3197dccfc 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -3,8 +3,8 @@ t-eoRandom.cpp Test program for random generator - (c) GeNeura Team, 1999 - + (c) GeNeura Team, 1999 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -18,19 +18,19 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - + */ /** -CVS Info: $Date: 2001-02-18 04:34:57 $ $Author: evomarc $ $Revision: 1.9 $ +CVS Info: $Date: 2001-02-19 12:23:13 $ $Author: maartenkeijzer $ $Revision: 1.10 $ */ //----------------------------------------------------------------------------- #include // cout -#include // ostrstream, istrstream +#include // ostrstream, istrstream #include // eoBin //#include //#include @@ -38,27 +38,28 @@ CVS Info: $Date: 2001-02-18 04:34:57 $ $Author: evomarc $ $Revision: 1.9 $ //----------------------------------------------------------------------------- main() { - try{ eoUniformGenerator u1(-2.5,3.5); - eoUniformGenerator u2(0.0003, 0.0005 ); - eoUniformGenerator u3( 100000U, 10000000U); + eoUniformGenerator u2(0.003, 0.05 ); + eoUniformGenerator u3( 10000U, 10000000U); - eoNegExpGenerator e1(3.5); - eoNegExpGenerator e2(0.003 ); - eoNegExpGenerator e3( 10000U); - /* cout << "n1\t\tn2\t\tn3\t\te1\t\te2\t\te3" << endl; */ - for ( unsigned i = 0; i < 100; i ++) { - cout << "Uniform: " << u1() << "\t" << u2() << "\t" << u3() << endl; - cout << "NegExp: " << e1() << "\t" << e2() << "\t" << e3() << endl; + try + { // throws an error + eoUniformGenerator utest( 10000000U, 10000U); } - } - - catch (exception& e) - { - cout << "exception: " << e.what() << endl;; - exit(EXIT_FAILURE); - } + catch (logic_error& e) + { + cout << e.what() << endl; + } + + ofstream os("t-eoRandom.out"); + + for ( unsigned i = 0; i < 100; i ++) + { + os << u1() << "\t" << u2() << "\t" << u3() << endl; + } + return 0; // to avoid VC++ complaints + } //----------------------------------------------------------------------------- diff --git a/eo/test/t-eoVector.cpp b/eo/test/t-eoVector.cpp index d807a977a..7d241ae6f 100644 --- a/eo/test/t-eoVector.cpp +++ b/eo/test/t-eoVector.cpp @@ -1,9 +1,11 @@ /* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - t-eoVectpr.cpp + t-eoVector.cpp This program tests vector-like chromosomes (c) GeNeura Team, 1999, 2000 - + + Modified by Maarten Keijzer 2001 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -17,22 +19,26 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - + */ //----------------------------------------------------------------------------- #include // cout #include // ostrstream, istrstream -#include +#include + +#include #include // eoVector -#include +#include +#include //----------------------------------------------------------------------------- -typedef eoVector Chrom; +typedef eoVector Chrom1; +typedef eoVector Chrom2; //----------------------------------------------------------------------------- @@ -40,17 +46,27 @@ main() { const unsigned SIZE = 4; - eoUniform uniform(-1,1); + // check if the appropriate ctor gets called + Chrom1 chrom(SIZE, 5); + + for (int i = 0; i < chrom.size(); ++i) + { + assert(chrom[i] == 5); + } + + eoUniformGenerator uniform(-1,1); + eoInitFixedLength init(SIZE, uniform); + + init(chrom); + + cout << chrom << endl; + + Chrom2 chrom2(chrom); + + cout << chrom2 << endl; + +// eoInitVariableLength initvar( - Chrom chrom1(SIZE,uniform), chrom2( SIZE, uniform); - - cout << "chrom1: " << chrom1 << endl << - "chrom2: " << chrom2 << endl; - - eo1dWDistance< float, float > chromDist( chrom1 ); - cout << "Distance from chrom1 to chrom2 " << chromDist.distance( chrom2 ) << endl; - - return 0; } diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 9e91c88c9..cdc29c09f 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -2,8 +2,8 @@ t-eobin.cpp This program tests the the binary cromosomes and several genetic operators - (c) GeNeura Team, 1999 - + (c) GeNeura Team, 1999 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -17,9 +17,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - + */ //----------------------------------------------------------------------------- @@ -27,6 +27,7 @@ #include // ostrstream, istrstream #include // general EO #include // bitstring representation & operators +#include #include "binary_value.h" //----------------------------------------------------------------------------- @@ -39,10 +40,11 @@ void main_function() { const unsigned SIZE = 8; unsigned i, j; + eoBooleanGenerator gen; Chrom chrom(SIZE), chrom2; chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); - + cout << "chrom: " << chrom << endl; chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); cout << "chrom: " << chrom << endl; @@ -51,7 +53,7 @@ void main_function() chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); cout << "chrom.className() = " << chrom.className() << endl; - + cout << "chrom: " << chrom << endl << "chrom2: " << chrom2 << endl; @@ -67,10 +69,10 @@ void main_function() fill(chrom.begin(), chrom.end(), false); cout << "--------------------------------------------------" << endl << "eoMonOp's aplied to .......... " << chrom << endl; - - eoInitFixedLength - random(chrom.size(), boolean_generator()); - + + eoInitFixedLength + random(chrom.size(), gen); + random(chrom); chrom.fitness(binary_value(chrom)); cout << "after eoBinRandom ............ " << chrom << endl; @@ -149,10 +151,10 @@ void main_function() eoProportionalSelect select; eoEvalFuncPtr eval(binary_value); - + eoSGA sga(select, xover, 0.8f, bitflip, 0.1f, eval, checkpoint); - - eoInitFixedLength init(16, boolean_generator()); + + eoInitFixedLength init(16, gen); eoPop pop(100, init); apply(eval, pop); From 72b6692f9baf39e3a77cce2d6674dce13643eb8e Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 27 Feb 2001 05:09:10 +0000 Subject: [PATCH 0489/2134] Modified all init sequences in Lesson2 and Lesson3 - and all corresponding files in html dir - after the return of eoRndGenerators and subsequent modifications of eoInit --- eo/tutorial/Lesson2/FirstBitEA.cpp | 6 +++--- eo/tutorial/Lesson2/FirstRealEA.cpp | 4 ++-- eo/tutorial/Lesson2/Makefile | 4 ++++ eo/tutorial/Lesson2/exercise2.3.cpp | 4 ++-- eo/tutorial/Lesson2/real_value.h | 2 -- eo/tutorial/Lesson3/SecondBitEA.cpp | 4 ++-- eo/tutorial/Lesson3/exercise3.1.cpp | 4 ++-- eo/tutorial/html/FirstBitEA.html | 6 +++--- eo/tutorial/html/SecondBitEA.html | 13 ++++++------- 9 files changed, 24 insertions(+), 23 deletions(-) diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index d89e3e28a..99445846d 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -74,9 +74,9 @@ void main_function(int argc, char **argv) // Initilisation of population //////////////////////////////// - // based on boolean_generator class (see utils/rnd_generator.h) - eoInitFixedLength - random(VEC_SIZE, boolean_generator()); + // based on boolean_generator class (see utils/eoRndGenerators.h) + eoUniformGenerator uGen; + eoInitFixedLength random(VEC_SIZE, uGen); // Initialization of the population eoPop pop(POP_SIZE, random); diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index a6f5e8e22..8d64dd3df 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -75,8 +75,8 @@ void main_function(int argc, char **argv) // Initilisation of population //////////////////////////////// // based on a uniform generator - eoInitFixedLength > - random(VEC_SIZE, uniform_generator(-1.0, 1.0)); + eoUniformGenerator uGen(-1.0, 1.0); + eoInitFixedLength random(VEC_SIZE, uGen); // Initialization of the population eoPop pop(POP_SIZE, random); diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile index f25456af7..57c02328d 100644 --- a/eo/tutorial/Lesson2/Makefile +++ b/eo/tutorial/Lesson2/Makefile @@ -12,3 +12,7 @@ all : $(ALL) clean : @/bin/rm $(ALL) *.o *~ + +FirstRealEA : real_value.h + +FirstBitEA : binary_value.h \ No newline at end of file diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index f7832bf0d..b666216c2 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -76,8 +76,8 @@ void main_function(int argc, char **argv) //////////////////////////////// // based on boolean_generator class (see utils/rnd_generator.h) - eoInitFixedLength - random(VEC_SIZE, boolean_generator()); + eoUniformGenerator uGen; + eoInitFixedLength random(VEC_SIZE, uGen); // Initialization of the population eoPop pop(POP_SIZE, random); diff --git a/eo/tutorial/Lesson2/real_value.h b/eo/tutorial/Lesson2/real_value.h index c7a57c109..cc32e633f 100644 --- a/eo/tutorial/Lesson2/real_value.h +++ b/eo/tutorial/Lesson2/real_value.h @@ -11,8 +11,6 @@ double real_value(const std::vector& _ind) double sum = 0; for (unsigned i = 0; i < _ind.size(); i++) { - if ( (_ind[i]<0) || (_ind[i]>1) ) - cout << "Sorti des bornes: " << _ind[i] << " "; sum += _ind[i] * _ind[i]; } return -sum; diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index b2eda1a56..c8efce2f9 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -164,8 +164,8 @@ void main_function(int argc, char **argv) rng.reseed(seed); // a Indi random initializer // based on boolean_generator class (see utils/rnd_generator.h) - eoInitFixedLength - random(vecSize, boolean_generator()); + eoUniformGenerator uGen; + eoInitFixedLength random(vecSize, uGen); // Init pop from the randomizer: need to use the append function pop.append(popSize, random); diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 0a67413d4..e80b43ede 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -165,8 +165,8 @@ void main_function(int argc, char **argv) rng.reseed(seed); // a Indi random initializer // based on boolean_generator class (see utils/rnd_generator.h) - eoInitFixedLength - random(vecSize, boolean_generator()); + eoUniformGenerator uGen; + eoInitFixedLength random(vecSize, uGen); // Init pop from the randomizer: need to use the append function pop.append(popSize, random); diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index 4089c8ff8..8b7e77fac 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -162,9 +162,9 @@ The actual code is in boldface and the comment in normal face.  ////////////////////////////////
     // Initilisation of population
     ////////////////////////////////
    -  // based on boolean_generator class (see utils/rnd_generator.h)
    -  eoInitFixedLength<Indi, boolean_generator>
    -      random(VEC_SIZE, boolean_generator());
    +  // based on eoUniformGenerator class (see utils/eoRndGenerators.h)
    +  eoUniformGenerator<bool> uGen;
    +  eoInitFixedLength<Indi> random(VEC_SIZE, uGen);
     // Initialization of the population
     eoPop<Indi> pop(POP_SIZE, random);
     // and evaluate it in one line
    diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index 914f8ec6b..7715369cb 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -270,11 +270,11 @@ rng.reseed(seed);

           // a Indi random initializer
           // -based on boolean_generator class (see utils/rnd_generator.h) -
             -eoInitFixedLength<Indi, boolean_generator>  -
                -random(vecSize, boolean_generator()); +based on eoUniformGenerator class (see utils/eoRndGenerators.h) +
           eoUniformGenerator<bool> +uGen; +
           eoInitFixedLength<Indi> +random(vecSize, uGen);
           // Init pop from the randomizer: need to use the append function
             @@ -284,7 +284,7 @@ and evaluate pop (STL syntax) 
             apply<Indi>(eval, pop);
         } // end -of initializatio of the population

    @@ -311,7 +311,6 @@ of initializatio of the population
     // The robust tournament selection
     eoDetTournamentSelect<Indi> selectOne(tSize);       - // tSize in [2,POPSIZE]
     // is now encapsulated in a eoSelectPerc (entage) From 59a42603af32c73a2c08ace555b0e4cd5a63b4fb Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 27 Feb 2001 05:24:24 +0000 Subject: [PATCH 0490/2134] Still modifying eoInit ... --- eo/tutorial/html/eoLesson2.html | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 5e7b50e96..346ebb3ab 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -67,13 +67,7 @@ argument is a vector<bool> or a Note:
    Also, +


    Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object file once and for all (
    remember @@ -88,14 +82,8 @@ have to declare 3 template arguments: the type of EO object it will be applied to, the return type and the type of argument the function actually requires. -
      -

      -
      -
      -
      -
      -

    Note: In the -previous files (Bit - Real) +


    Note: In +the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness type of EO object, third = first).
      @@ -111,19 +99,13 @@ rather than maximize a fitness function (see Exercise of the population is now
    encapsulatedinto a separate initializer (based on a boolean generator or a double-number -generator -see random_generators.h) +generator -see random_generators.h) that is then used in the constructor of the population to build the individuals. You can also use different initializers and call them in turn through the call to pop.append() function (see Exercise 2). -
      -

      -
      -
      -
      -
      -

    Note: Don't +


    Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!!
      From ef75dbc2ee8e5890368b91abe53ef6a336eab0c5 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 27 Feb 2001 11:43:06 +0000 Subject: [PATCH 0491/2134] Made dtor virtual --- eo/src/eoFunctorStore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoFunctorStore.h b/eo/src/eoFunctorStore.h index 1655fb00c..9baef09f0 100644 --- a/eo/src/eoFunctorStore.h +++ b/eo/src/eoFunctorStore.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFunctorStore.h // (c) Maarten Keijzer 2000, GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -42,7 +42,7 @@ class eoFunctorStore eoFunctorStore() {} - ~eoFunctorStore(); + virtual ~eoFunctorStore(); /// Add an eoFunctorBase to the store template From 7eecd318f9231075c34cafa15f5a35fe9ca70f1a Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 27 Feb 2001 11:44:28 +0000 Subject: [PATCH 0492/2134] swapped order of libeo and libeoutils, gcc 2.91 did not like it --- eo/test/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 3128dc8e0..5c1c29f11 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,12 +4,12 @@ ## ############################################################################### -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g ############################################################################### From 00c7a10cb0cc7330f4d089356d34555e4490396c Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 27 Feb 2001 11:45:31 +0000 Subject: [PATCH 0493/2134] put using eo::rng in top of file to help out gcc 2.91 --- eo/src/utils/eoRndGenerators.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index 089887ef2..76d9a9918 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -33,6 +33,8 @@ #include #include +using eo::rng; + /** By popular demand re-introducing a base class for a family of random number generators. Derived members of this class are useful @@ -66,9 +68,9 @@ template class eoUniformGenerator : public eoRndGenerator // added new ctor with 2 params, and modified the data to minim and range // (was maxim only). MS 3/11/2000 public : - eoUniformGenerator(T _max = T(1.0), eoRng& _rng = eo::rng) : + eoUniformGenerator(T _max = T(1.0), eoRng& _rng = rng) : minim(T(0.0)), range(_max), uniform(_rng) {} - eoUniformGenerator(T _min, T _max, eoRng& _rng = eo::rng) : + eoUniformGenerator(T _min, T _max, eoRng& _rng = rng) : minim(_min), range(_max-_min), uniform(_rng) { if (_min>_max) @@ -102,7 +104,7 @@ bool eoUniformGenerator::operator()(void) class eoBooleanGenerator : public eoRndGenerator { public : - eoBooleanGenerator(float _bias = 0.5, eoRng& _rng = eo::rng) : bias(_bias), gen(_rng) {} + eoBooleanGenerator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} bool operator()(void) { return gen.flip(bias); } private : @@ -118,7 +120,7 @@ class eoBooleanGenerator : public eoRndGenerator template class eoNormalGenerator : public eoRndGenerator { public : - eoNormalGenerator(T _stdev = T(1.0), eoRng& _rng = eo::rng) : stdev(_stdev), normal(_rng) {} + eoNormalGenerator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} T operator()(void) { return (T) normal.normal(stdev); } @@ -135,7 +137,7 @@ template class eoNormalGenerator : public eoRndGenerator template class eoNegExpGenerator : public eoRndGenerator { public : - eoNegExpGenerator(T _mean = 1.0, eoRng& _rng = eo::rng) : mean(_mean), negexp(_rng) {} + eoNegExpGenerator(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} T operator()(void) { return (T) negexp.negexp(mean); } From 4f1802c4e992f501e444af8b6c60096f4dd13cae Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 8 Mar 2001 13:38:41 +0000 Subject: [PATCH 0494/2134] radically simplified the Makefile.am, but this only works for headers (no idea what the problem is with sources) --- eo/src/Makefile.am | 4 ++-- eo/src/utils/Makefile.am | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 3137bf258..4efd76045 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,8 +8,8 @@ SUBDIRS = es ga gp utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp eoFunctorStore.cpp +libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = eo EO.h apply.h eoAlgo.h eoBreed.h eoCombinedContinue.h eoContinue.h eoCounter.h eoDetSelect.h eoDetTournamentSelect.h eoEasyEA.h eoEvalFunc.h eoEvalFuncPtr.h eoFactory.h eoFitContinue.h eoFitnessScalingSelect.h eoVector.h eoFunctor.h eoFunctorStore.h eoGenContinue.h eoInvalidateOps.h eoInit.h eoMerge.h eoMergeReduce.h eoObject.h eoOp.h eoOpSelMason.h eoPersistent.h eoPop.h eoPrintable.h eoProportionalCombinedOp.h eoProportionalSelect.h eoRandomSelect.h eoRankingSelect.h eoReduce.h eoReduceMerge.h eoReplacement.h eoSGA.h eoSGATransform.h eoScalarFitness.h eoSelect.h eoSelectFactory.h eoSelectMany.h eoSelectNumber.h eoSelectOne.h eoSelectPerc.h eoSteadyFitContinue.h eoStochTournamentSelect.h eoSurviveAndDie.h eoTransform.h eoVariableLengthCrossover.h eoVariableLengthMutation.h eoPerf2Worth.h eoFitnessScalingSelect.h eoLinearFitScaling.h eoRanking.h es.h ga.h +libeoinc_HEADERS = *.h eo diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index a75438f53..d38ddbe12 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -10,7 +10,8 @@ lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h eoRndGenerators.h selectors.h +libeoinc_HEADERS = checkpointing *.h +#compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h eoRndGenerators.h selectors.h From 4388faec2e7a8fa0489876c674c249a46b753870 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 9 Mar 2001 14:13:28 +0000 Subject: [PATCH 0495/2134] Various bugs found and resolved. --- eo/src/eo | 9 +++++++-- eo/src/eoBreed.h | 10 ++++++---- eo/src/eoGenOp.h | 15 +++++++++++---- eo/src/eoGeneralBreeder.h | 24 ++++++++++++++++-------- eo/src/eoPopulator.h | 22 +++++++--------------- eo/src/eoRandomSelect.h | 14 +++++++------- eo/src/other/eoExternalOpFunctions.h | 4 ++-- 7 files changed, 56 insertions(+), 42 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 98bc61ab6..54c4caf1e 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -66,6 +66,8 @@ #include #include +#include +#include #include @@ -91,11 +93,13 @@ #include #include #include -// other batch selections -// DetSelect probably shoudl be turned into an eoSelectOne +// other batch selections +// DetSelect probably shoudl be turned into an eoSelectOne // (using setup and an index) #include +// Breeders +#include // Replacement // #include @@ -118,6 +122,7 @@ #include // aliens +#include #include //----------------------------------------------------------------------------- diff --git a/eo/src/eoBreed.h b/eo/src/eoBreed.h index 534983449..8eca4b11d 100644 --- a/eo/src/eoBreed.h +++ b/eo/src/eoBreed.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoBreed.h + eoBreed.h (c) Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -29,9 +29,11 @@ //----------------------------------------------------------------------------- #include #include +#include +#include //----------------------------------------------------------------------------- -/** +/** eoBreed: breeding is thought of a combination of selecting and transforming a population. For efficiency reasons you might want to build your own eoBreed derived class rather than relying on a seperate select and transform @@ -44,7 +46,7 @@ class eoBreed : public eoBF&, eoPop&, void> {}; /** -eoSelectTransform: special breeder that is just an application of an embedded select, +eoSelectTransform: special breeder that is just an application of an embedded select, followed by an embedded transform */ template diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index b24dad7d6..3f46137cf 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -58,7 +58,11 @@ class eoGenOp : public eoOp, public eoUF &, void> /// Ctor that honors its superclass eoGenOp(): eoOp( eoOp::general ) {} + /** Max production is used to reserve space for all elements that are used by the operator, + not setting it properly can result in a crash + */ virtual unsigned max_production(void) = 0; + virtual string className() = 0; void operator()(eoPopulator& _pop) { @@ -103,18 +107,18 @@ class eoBinGenOp : public eoGenOp public: eoBinGenOp(eoBinOp& _op) : op(_op) {} - unsigned max_production(void) { return 1; } + unsigned max_production(void) { return 2; } //2 as it will request two individuals /** do the work: get 2 individuals from the population, modifies - only one (it's a eoBinOp) and erases the non-midified one + only one (it's a eoBinOp) */ void apply(eoPopulator& _pop) { EOT& a = *_pop; - EOT& b = *++_pop; + const EOT& b = _pop.select(); + if (op(a, b)) a.invalidate(); - _pop.erase(); // erase the b from the next population } string className() {return op.className();} @@ -206,6 +210,9 @@ class eoQuadGenOp : public eoGenOp case eoOp::quadratic : return _store.storeFunctor(new eoQuadGenOp(static_cast&>(_op))); case eoOp::general : return static_cast&>(_op); } + + assert(false); + return static_cast&>(_op); } #endif diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index 0c0e4c8fc..4c1eff80f 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -33,12 +33,16 @@ *****************************************************************************/ #include +#include #include +#include +#include +#include /** Base class for breeders using generalized operators. */ -template +template class eoGeneralBreeder: public eoBreed { public: @@ -49,10 +53,13 @@ class eoGeneralBreeder: public eoBreed * @param _rate pour howMany, le nbre d'enfants a generer * @param _interpret_as_rate explanation */ - eoGeneralBreeder( eoSelectOne& _select, eoGenOp& _op, - double _rate=1.0, bool _interpret_as_rate = true) : - select( _select ), op(_op), howMany(_rate, _interpret_as_rate) {} - + eoGeneralBreeder( + eoSelectOne& _select, + eoGenOp& _op, + double _rate=1.0, + bool _interpret_as_rate = true) : + select( _select ), op(_op), howMany(_rate, _interpret_as_rate) {} + /** The breeder: simply calls the genOp on a selective populator! * * @param _parents the initial population @@ -69,15 +76,16 @@ class eoGeneralBreeder: public eoBreed while (it.size() < target) { op(it); + ++it; } - + swap(_offspring, it); _offspring.resize(target); // you might have generated a few more } - + /// The class name. string className() const { return "eoGeneralBreeder"; } - + private: eoSelectOne& select; eoGenOp& op; diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index a16941f84..00ee03f58 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -45,7 +45,7 @@ public : struct OutOfIndividuals {}; /** a populator behaves like an iterator. Hence the operator* - * it returns the current individual -- eventually getting + * it returns the current individual -- eventually getting * a new one through the operator++ if at the end */ EOT& operator*(void) @@ -83,15 +83,6 @@ public : current = eoPop::insert(current, _eo); } - /** useful for operators that generate less offspring than parents - * though there is another way - using a selector *within* - * the operator to get the extra parents from outside - */ - void erase() - { - current = eoPop::erase(current); - } - /** just to make memory mangement more efficient */ void reserve(int how_many) @@ -115,11 +106,12 @@ public : /** no more individuals */ bool exhausted(void) { return current == end(); } + virtual const EOT& select() = 0; + protected : - /** the pure virtual selection method - will be instanciated in + /** the pure virtual selection method - will be instanciated in * eoSeqPopulator and eoPropPopulator */ - virtual const EOT& select() = 0; eoPop::iterator current; const eoPop& src; }; @@ -133,7 +125,7 @@ class eoSeqPopulator : public eoPopulator { public : - eoSeqPopulator(const eoPop& _pop) : + eoSeqPopulator(const eoPop& _pop) : eoPopulator(_pop), src_it(_pop.begin()) {} const EOT& select(void) @@ -149,7 +141,7 @@ public : private : vector::const_iterator src_it; -}; +}; /** SelectivePopulator an eoPoplator that uses an eoSelectOne to select guys. @@ -169,7 +161,7 @@ public : private : eoSelectOne& sel; -}; +}; #endif diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index fd609f3ea..417c0e294 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoRandomSelect.h // (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -41,23 +41,23 @@ /** eoRandomSelect: a selection method that selects ONE individual randomly */ //----------------------------------------------------------------------------- -template class eoRandomSelect: public eoSelectOne +template class eoRandomSelect: public eoSelectOne { public: - + /// not a big deal!!! - virtual const EOT& operator()(const eoPop& _pop) + virtual const EOT& operator()(const eoPop& _pop) { - return _pop[eo::rng.random(pop.size())] ; + return _pop[eo::rng.random(_pop.size())] ; } }; //----------------------------------------------------------------------------- -/** eoBestSelect: a selection method that always return the best +/** eoBestSelect: a selection method that always return the best * (mainly for testing purposes) */ //----------------------------------------------------------------------------- -template class eoBestSelect: public eoSelectOne +template class eoBestSelect: public eoSelectOne { public: diff --git a/eo/src/other/eoExternalOpFunctions.h b/eo/src/other/eoExternalOpFunctions.h index 62fd757cd..a96991e71 100644 --- a/eo/src/other/eoExternalOpFunctions.h +++ b/eo/src/other/eoExternalOpFunctions.h @@ -7,7 +7,7 @@ and 'genetic' operators (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -52,7 +52,7 @@ public : void operator()(ExternalEO& _eo) { - _eo = (*init)(); + _eo.External::operator=( (*init)() ); _eo.invalidate(); } From a27aa7112a316ef187e2249e9302534da6031a67 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 9 Mar 2001 14:14:53 +0000 Subject: [PATCH 0496/2134] Test for a ssga added. --- eo/test/Makefile.am | 15 ++++-- eo/test/t-eoGenOp.cpp | 4 +- eo/test/t-eoSSGA.cpp | 110 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 eo/test/t-eoSSGA.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 5c1c29f11..62c5fe62e 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,13 +9,13 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a -CXXFLAGS = -g +LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a +CXXFLAGS = -g -Wall -pg ############################################################################### -check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing \ +check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector -TESTS=run_tests t-eoVector t-eoRandom +TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA @@ -114,3 +114,10 @@ t_eoGA_LDFLAGS = -lm t_eoGA_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) ############################################################################### + +t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h +t_eoSSGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoSSGA_LDFLAGS = -lm +t_eoSSGA_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index 40c79d19e..6fe36c112 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -132,10 +132,8 @@ class two2oneOp : public eoGenOp // :-) void apply(eoPopulator& _plop) { EOT& eo = *_plop; // select the guy - ++_plop; // advance - EOT& eo2 = *_plop; + const EOT& eo2 = _plop.select(); eo.s = "221(" + eo.s + ", " + eo2.s + ")"; - _plop.erase(); // oh right, and invalidate fitnesses } virtual string className() {return "two2oneOp";} diff --git a/eo/test/t-eoSSGA.cpp b/eo/test/t-eoSSGA.cpp new file mode 100644 index 000000000..b42db6ef5 --- /dev/null +++ b/eo/test/t-eoSSGA.cpp @@ -0,0 +1,110 @@ +#include + + +template +class eoBreedOne : public eoBreed +{ +public : + eoBreedOne(eoSelectOne& _select, eoGenOp& _op) : select(_select), op(_op) {} + + void operator()(const eoPop& _src, eoPop& _dest) + { + eoSelectivePopulator pop(_src, select); + op(pop); + _dest = pop; + } + +private : + eoSelectOne& select; + eoGenOp& op; +}; + +typedef eoMinimizingFitness FitnessType; +typedef eoVector EoType; + +template +class eoMyEval : public eoEvalFunc +{ + public : + + void operator()(EOT& _eo) + { + _eo.fitness(*max_element(_eo.begin(), _eo.end())); + } +}; + +template +class Xover : public eoBinOp +{ + bool operator()(EOT& _eo, const EOT& _eo2) + { + unsigned point = rng.random(_eo.size()); + copy(_eo2.begin() + point, _eo2.end(), _eo.begin() + point); + return true; + } +}; + +template +class Mutate : public eoMonOp +{ + bool operator()(EOT& _eo) + { + unsigned point = rng.random(_eo.size()); + _eo[point] = rng.random(1024); + return true; + } +}; + + +int main() +{ + int pop_size = 10; + + eoGenContinue cnt(10); + eoCheckPoint cp(cnt); + + + Xover xover; + Mutate mutate; + + eoProportionalOp opsel; + + opsel.add(xover, 0.8); + opsel.add(mutate, 0.2); + +/* + eoDetTournamentSelect selector(3); + eoBreedOne breed(selector, opsel); + eoSSGAWorseReplacement replace; +*/ + + eoRandomSelect selector; + eoGeneralBreeder breed(selector, opsel); + eoPlusReplacement replace; + + + eoMyEval eval; + + eoEasyEA algo(cp, eval, breed, replace); + + eoUniformGenerator unif(0,1024); + eoInitFixedLength init(20, unif); + + eoPop pop(pop_size, init); + + apply(eval, pop); + + eoBestFitnessStat best("Best_Fitness"); + eoAverageStat avg("Avg_Fitness"); + eoStdoutMonitor mon; + + cp.add(best); + cp.add(avg); + cp.add(mon); + + mon.add(best); + mon.add(avg); + + algo(pop); + +} \ No newline at end of file From ead2ac2c6268afae446bfb17d7432498f5492875 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sat, 10 Mar 2001 14:02:23 +0000 Subject: [PATCH 0497/2134] Changed the populator to be a) more efficient and b) more useable It is no longer derived from eoPop, it now gets a destination population. This saves a lot of copying. The semantics has changed a little as well. It is now an _infinite_ iterator. operator++ will *not* dispense new individuals, but will merely stay at the end. To get a new indy, use operator*() as before. eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring eoGeneralBreeder is changed to reflect the changes in eoPopulator eoSequentialSelect now uses setup() rather than init() --- eo/src/eoEasyEA.h | 20 +++++---- eo/src/eoGeneralBreeder.h | 16 +++---- eo/src/eoPopulator.h | 89 ++++++++++++++++++++++++++------------- eo/src/eoRandomSelect.h | 20 +++++---- 4 files changed, 88 insertions(+), 57 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index dbc1debae..a152abfad 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -98,7 +98,7 @@ template class eoEasyEA: public eoAlgo eoTransform& _transform, eoMerge& _merge, eoReduce& _reduce - ) : continuator(_continuator), + ) : continuator(_continuator), eval(_eval), selectTransform(_select, _transform), breed(selectTransform), @@ -108,19 +108,21 @@ template class eoEasyEA: public eoAlgo - + /// Apply a few generation of evolution to the population. - virtual void operator()(eoPop& _pop) + virtual void operator()(eoPop& _pop) { eoPop offspring; - - while ( continuator( _pop ) ) + + do { try { - unsigned pSize = _pop.size(); + unsigned pSize = _pop.size(); + offspring.clear(); // new offspring + breed(_pop, offspring); - + apply(eval, offspring); replace(_pop, offspring); // after replace, the new pop. is in _pop @@ -137,9 +139,9 @@ template class eoEasyEA: public eoAlgo s.append( " in eoEasyEA"); throw runtime_error( s ); } - } // while + } while ( continuator( _pop ) ); } - + private: // If selectTransform needs not be used, dummySelect and dummyTransform are used diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index 4c1eff80f..563d23a82 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -69,17 +69,15 @@ class eoGeneralBreeder: public eoBreed { unsigned target = howMany(_parents.size()); - eoSelectivePopulator it(_parents, select); + _offspring.clear(); + eoSelectivePopulator it(_parents, _offspring, select); - select.setup(_parents); + while (_offspring.size() < target) + { + op(it); + ++it; + } - while (it.size() < target) - { - op(it); - ++it; - } - - swap(_offspring, it); _offspring.resize(target); // you might have generated a few more } diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index 00ee03f58..c2eed79e2 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -36,11 +36,15 @@ See eoGenOp and eoOpContainer */ template -class eoPopulator : public eoPop +class eoPopulator { public : - eoPopulator(const eoPop& _src) : current(begin()), src(_src) {} + eoPopulator(const eoPop& _src, eoPop& _dest) : dest(_dest), current(dest.end()), src(_src) + { + dest.reserve(src.size()); // we don't know this, but wth. + current = dest.end(); + } struct OutOfIndividuals {}; @@ -50,24 +54,20 @@ public : */ EOT& operator*(void) { - if (current == end()) - operator++(); + if (current == dest.end()) + get_next(); // get a new individual return *current; } /** only prefix increment defined - * if needed, adds a new individual using the embedded selector - * and set the current pointer to the newly inserted individual - * otherwise simply increment the current pointer + Does not add a new element when at the end, use operator* for that + If not on the end, increment the pointer to the next individual */ eoPopulator& operator++() { - if (current == end()) - { // get new individual from derived class select() - push_back(select()); - current = end(); - --current; + if (current == dest.end()) + { // keep the pointer there return *this; } // else @@ -80,40 +80,66 @@ public : */ void insert(const EOT& _eo) { /* not really efficient, but its nice to have */ - current = eoPop::insert(current, _eo); + current = dest.insert(current, _eo); } /** just to make memory mangement more efficient */ void reserve(int how_many) { - size_t sz = current - begin(); - eoPop::reserve(size() + how_many); - current = begin() + sz; + size_t sz = current - dest.begin(); + if (dest.capacity() < dest.size() + how_many) + { + dest.reserve(dest.size() + how_many); + } + + current = dest.begin() + sz; } /** can be useful for operators with embedded selectors - * e.g. your barin and my beauty -type + * e.g. your brain and my beauty -type */ const eoPop& source(void) { return src; } + /** Get the offspring population. + Can be useful when you want to do some online niching kind of thing + */ + eoPop& offspring(void) { return dest; } + typedef unsigned position_type; /** this is a direct access container: tell position */ - position_type tellp() { return current - begin(); } + position_type tellp() { return current - dest.begin(); } /** this is a direct access container: go to position */ - void seekp(position_type pos) { current = begin() + pos; } + void seekp(position_type pos) { current = dest.begin() + pos; } /** no more individuals */ - bool exhausted(void) { return current == end(); } + bool exhausted(void) { return current == dest.end(); } - virtual const EOT& select() = 0; - -protected : /** the pure virtual selection method - will be instanciated in * eoSeqPopulator and eoPropPopulator */ + virtual const EOT& select() = 0; + +protected : + eoPop& dest; eoPop::iterator current; const eoPop& src; + +private : + void get_next() + { + if (current == dest.end()) + { // get new individual from derived class select() + dest.push_back(select()); + current = dest.end(); + --current; + return; + } + // else + ++current; + return; + } + }; @@ -125,22 +151,22 @@ class eoSeqPopulator : public eoPopulator { public : - eoSeqPopulator(const eoPop& _pop) : - eoPopulator(_pop), src_it(_pop.begin()) {} + eoSeqPopulator(const eoPop& _pop, eoPop& _dest) : + eoPopulator(_pop, _dest), current(0) {} const EOT& select(void) { - if (src_it == src.end()) + if (current >= src.size()) { throw OutOfIndividuals(); } - const EOT& res = *src_it++; + const EOT& res = src[current++]; return res; } private : - vector::const_iterator src_it; + unsigned current; }; @@ -151,8 +177,11 @@ template class eoSelectivePopulator : public eoPopulator { public : - eoSelectivePopulator(const eoPop& _pop, eoSelectOne& _sel) - : eoPopulator(_pop), sel(_sel) {} + eoSelectivePopulator(const eoPop& _pop, eoPop& _dest, eoSelectOne& _sel) + : eoPopulator(_pop, _dest), sel(_sel) + { + sel.setup(_pop); + } const EOT& select() { diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 417c0e294..c73c6dd83 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -60,25 +60,25 @@ template class eoRandomSelect: public eoSelectOne template class eoBestSelect: public eoSelectOne { public: - + /// not a big deal!!! - virtual const EOT& operator()(const eoPop& _pop) + virtual const EOT& operator()(const eoPop& _pop) { return _pop.best_element() ; } }; //----------------------------------------------------------------------------- -/** eoSequentialSelect: returns all individual in order +/** eoSequentialSelect: returns all individual in order * looping back to the beginning when exhasuted * can be from best to worse, or in random order * - * It is the eoSelectOne equivalent of eoDetSelect - + * It is the eoSelectOne equivalent of eoDetSelect - * though eoDetSelect always returns individuals from best to worst */ //----------------------------------------------------------------------------- -template class eoSequentialSelect: public eoSelectOne +template class eoSequentialSelect: public eoSelectOne { public: /** Ctor: sets the current pter to MAXINT so init will take place first time @@ -87,19 +87,21 @@ template class eoSequentialSelect: public eoSelectOne eoSequentialSelect(bool _ordered = true): ordered(_ordered), current(MAXINT) {} - void init(const eoPop& _pop) + void setup(const eoPop& _pop) { + eoPters.resize(_pop.size()); if (ordered) // probably we could have a marker to avoid re-sorting - _pop.sort(eoPters); + _pop.sort(eoPters); else _pop.shuffle(eoPters); current=0; } - virtual const EOT& operator()(const eoPop& _pop) + virtual const EOT& operator()(const eoPop& _pop) { if (current >= _pop.size()) - init(_pop); + setup(_pop); + unsigned eoN = current; current++; return *eoPters[eoN] ; From 492899bfb2d278932e5ad5209aeb9f45a1bc9a3c Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 12 Mar 2001 14:27:31 +0000 Subject: [PATCH 0498/2134] invalidating supported now --- eo/src/eoSGA.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 3cd90fd06..959800684 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -78,18 +78,23 @@ public : for (i=0; i<_pop.size()/2; i++) { if ( rng.flip(crossoverRate) ) - { - // this crossover generates 2 offspring from two parents - cross(offspring[2*i], offspring[2*i+1]); - } + { + // this crossover generates 2 offspring from two parents + if (cross(offspring[2*i], offspring[2*i+1])) + { + offspring[2*i].invalidate(); + offspring[2*i+1].invalidate(); + } + } } for (i=0; i < _pop.size(); i++) { if (rng.flip(mutationRate) ) - { - mutate(offspring[i]); - } + { + if (mutate(offspring[i])) + offspring[i].invalidate(); + } } _pop.swap(offspring); From 4222e648297da77fb7b213c6f8a41d367aadcb83 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 12 Mar 2001 16:00:58 +0000 Subject: [PATCH 0499/2134] EO: added overloaded printing of fitness (for vectors and pairs) Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth --- eo/src/EO.h | 104 +++++++++++++++++++++++++++---------- eo/src/eo | 5 +- eo/src/eoPerf2Worth.h | 4 +- eo/src/eoSelectFromWorth.h | 77 +++++++++++++++++++++------ 4 files changed, 144 insertions(+), 46 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 34e216fea..8158cb404 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -31,56 +31,104 @@ #include // eoObject #include // eoPersistent +template +ostream& print_fitness(ostream& _os, const std::vector& vec) +{ + _os << vec.size() << ' '; + std::copy(vec.begin(), vec.end(), ostream_iterator(_os)); + return _os; +} + +template +ostream& print_fitness(ostream& _os, const std::pair& pair) +{ + return _os << pair.first << ' ' << pair.second; +} + +template +ostream& print_fitness(ostream& _os, const T& t) +{ // general, try operator<< + return _os << t; +} + +template +istream& read_fitness(istream& _is, vector& vec) +{ + unsigned sz; + _is >> sz; + vec.resize(sz); + for (unsigned i = 0; i < vec.size(); ++i) + { + _is >> vec[i]; + } + + return _is; +} + +template +istream& read_fitness(istream& _is, pair& pair) +{ + _is >> pair.first; + _is >> pair.second; + return _is; +} +template +istream& read_fitness(istream& _is, T& t) +{ + _is >> t; + return _is; +} + //----------------------------------------------------------------------------- -/** EO is a base class for evolvable objects, that is, the subjects of +/** EO is a base class for evolvable objects, that is, the subjects of evolution. EOs have only got a fitness, which at the same time needs to be - only an object with the operation less than (<) defined. Fitness says how - good is the object; evolution or change of these objects is left to the - genetic operators. A fitness less than another means a worse fitness, in - whatever the context; thus, fitness is always maximized; although it can - be minimized with a proper definition of the < operator. The fitness + only an object with the operation less than (<) defined. Fitness says how + good is the object; evolution or change of these objects is left to the + genetic operators. A fitness less than another means a worse fitness, in + whatever the context; thus, fitness is always maximized; although it can + be minimized with a proper definition of the < operator. The fitness object must have, besides an void ctor, a copy ctor. */ template class EO: public eoObject, public eoPersistent { public: typedef F Fitness; - + /** Default constructor. - Fitness must have a ctor which takes 0 as a value; we can not use void - ctors here since default types like float have no void initializer. + Fitness must have a ctor which takes 0 as a value; we can not use void + ctors here since default types like float have no void initializer. VC++ allows it, but gcc does not */ EO(): repFitness(Fitness()), invalidFitness(true) {} - + /// Virtual dtor virtual ~EO() {}; - + /// Return fitness value. Fitness fitness() const { if (invalid()) throw runtime_error("invalid fitness"); return repFitness; } - + // Set fitness as invalid. void invalidate() { invalidFitness = true; } - + /** Set fitness. At the same time, validates it. * @param _fitness New fitness value. */ void fitness(const Fitness& _fitness) - { + { repFitness = _fitness; invalidFitness = false; } - + /** Return true If fitness value is invalid, false otherwise. * @return true If fitness is invalid. */ bool invalid() const { return invalidFitness; } - - /** Returns true if + + /** Returns true if @return true if the fitness is higher */ bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness(); } @@ -88,28 +136,28 @@ public: /// Methods inherited from eoObject //@{ - - /** Return the class id. + + /** Return the class id. * @return the class name as a string */ virtual string className() const { return "EO"; } - + /** * Read object.\\ - * Calls base class, just in case that one had something to do. - * The read and print methods should be compatible and have the same format. + * Calls base class, just in case that one had something to do. + * The read and print methods should be compatible and have the same format. * In principle, format is "plain": they just print a number * @param _is a istream. * @throw runtime_exception If a valid object can't be read. */ - virtual void readFrom(istream& _is) { - _is >> repFitness; + virtual void readFrom(istream& _is) { + read_fitness(_is, repFitness); if (_is) invalidFitness = false; else throw runtime_error("EO(istream&): can't read valid eo from istream"); } - + /** * Write object. Called printOn since it prints the object _on_ a stream. * @param _os A ostream. @@ -118,11 +166,11 @@ public: if (invalid()) _os << "INVALID "; else - _os << repFitness << ' '; // trailing space to make reading in that much easier + print_fitness(_os, repFitness) << ' '; // trailing space to make reading in that much easier } - + //@} - + private: Fitness repFitness; // value of fitness for this chromosome bool invalidFitness; // true if the value of fitness is invalid diff --git a/eo/src/eo b/eo/src/eo index 54c4caf1e..bc8ed0684 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -81,7 +81,7 @@ #include #include -// Selection +// Selection // the eoSelectOne's #include // also contains the eoSequentialSelect #include @@ -113,6 +113,9 @@ // a simple transformer #include +// Perf2Worth +#include + // Algorithms #include #include diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index d27bcd1c9..3ad203581 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -41,8 +41,8 @@ template class eoPerf2Worth : public eoStat > { public: - eoPerf2Worth():eoStat >(vector(0), - "Worths") {} + eoPerf2Worth(std::string _description = "Worths"):eoStat >(vector(0), + _description) {} }; #endif diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index 29520ceb1..a115f8b47 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -57,13 +57,35 @@ public: perf2Worth(_perf2Worth) {} /* setup the worthes */ - virtual void setup(const eoPop& _pop) + virtual void setup(const eoPop& _pop) { perf2Worth(_pop); + +#ifndef NDEBUG + fitness.resize(_pop.size()); + for (unsigned i = 0; i < _pop.size(); ++i) + { + fitness[i] = _pop[i].fitness(); + } +#endif } protected: eoPerf2Worth & perf2Worth; + +#ifndef NDEBUG + vector fitness; // for debugging purposes, to check that the perf2worth and pop are in sync + + void check_sync(unsigned index, const EOT& _eo) + { + if (fitness[index] != _eo.fitness()) + { + throw runtime_error("eoSelectFromWorth: fitnesses are not in sync"); + } + } + +#endif + }; @@ -82,16 +104,24 @@ public: unsigned _tSize) : eoSelectFromWorth(_perf2Worth), tSize(_tSize) {} - /* Perform deterministic tournament on worthes - by calling the appropriate fn + /* Perform deterministic tournament on worthes + by calling the appropriate fn see selectors.h */ - virtual const EOT& operator()(const eoPop& _pop) + virtual const EOT& operator()(const eoPop& _pop) { worthIterator it = deterministic_tournament( perf2Worth.value().begin(), perf2Worth.value().end(), tSize); - return _pop[it-perf2Worth.value().begin()]; + + unsigned index = it - perf2Worth.value().begin(); + +#ifndef NDEBUG + // check whether the stuff is still in sync + check_sync(index, _pop[index]); +#endif + + return _pop[index]; } private: @@ -99,7 +129,7 @@ private: }; /** An instance of eoSelectPerf2Worth that does selection from the Worthes - * using a ... determinisitic tournament, yes! + * using a ... stochastic tournament, yes! */ template class eoStochTournamentWorthSelect : public eoSelectFromWorth @@ -113,15 +143,23 @@ public: double _tRate) : eoSelectFromWorth(_perf2Worth), tRate(_tRate) {} - /* Perform stochastic tournament on worthes + /* Perform stochastic tournament on worthes by calling the appropriate fn in selectors.h */ - virtual const EOT& operator()(const eoPop& _pop) + virtual const EOT& operator()(const eoPop& _pop) { - worthIterator it = deterministic_tournament( + worthIterator it = stochastic_tournament( perf2Worth.value().begin(), perf2Worth.value().end(), tRate); - return _pop[it-perf2Worth.value().begin()]; + + unsigned index = it - perf2Worth.value().begin(); + +#ifndef NDEBUG + // check whether the stuff is still in sync + check_sync(index, _pop[index]); +#endif + + return _pop[index]; } private: @@ -145,25 +183,34 @@ public: /* We have to override the default behavior to compute the total * only once! */ - virtual void setup(const eoPop& _pop) + virtual void setup(const eoPop& _pop) { - perf2Worth(_pop); + eoSelectFromWorth::setup(_pop); total = 0.0; for (worthIterator it = perf2Worth.value().begin(); it& _pop) + virtual const EOT& operator()(const eoPop& _pop) { worthIterator it = roulette_wheel( perf2Worth.value().begin(), perf2Worth.value().end(), total); + + unsigned index = it - perf2Worth.value().begin(); + +#ifndef NDEBUG + // check whether the stuff is still in sync + check_sync(index, _pop[index]); +#endif + + return _pop[index]; return _pop[it-perf2Worth.value().begin()]; } From 3c19641c70772e1e1ddd07b228eae8c0297cacf2 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 12 Mar 2001 16:03:08 +0000 Subject: [PATCH 0500/2134] Added pareto based stuff --- eo/test/Makefile.am | 11 +++- eo/test/t-eoGenOp.cpp | 41 ++++++++------ eo/test/t-eoPareto.cpp | 120 +++++++++++++++++++++++++++++++++++++++++ eo/test/t-eoSSGA.cpp | 25 +++++---- 4 files changed, 169 insertions(+), 28 deletions(-) create mode 100644 eo/test/t-eoPareto.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 62c5fe62e..9563bd843 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -10,10 +10,10 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a -CXXFLAGS = -g -Wall -pg +CXXFLAGS = -g -Wall ############################################################################### -check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ +check_PROGRAMS = t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA # removing temporarily t-eoESFull @@ -121,3 +121,10 @@ t_eoSSGA_LDFLAGS = -lm t_eoSSGA_LDADD = $(LDADDS) ############################################################################### + +t_eoPareto_SOURCES = t-eoPareto.cpp +t_eoPareto_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoPareto_LDFLAGS = -lm +t_eoPareto_LDADD = $(LDADDS) +############################################################################### + diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index 6fe36c112..b91ab576a 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -225,7 +225,7 @@ int the_main(int argc, char **argv) sOpQuadPlusMon.add(quad, 1); sOpQuadPlusMon.add(mon, 1); - // this corresponds + // this corresponds eoProportionalOp pOpSAGLike; pOpSAGLike.add(sOpQuadPlusMon, 0.24); pOpSAGLike.add(quad, 0.56); @@ -234,10 +234,11 @@ int the_main(int argc, char **argv) // init eoPop pop; + eoPop offspring; init(pop, pSize); // sort pop so seqPopulator is identical to SelectPopulator(SequentialSelect) - pop.sort(); + pop.sort(); cout << "Population initiale\n" << pop << endl; // To simulate SGA: first a prop between quadOp and quadClone @@ -249,23 +250,25 @@ int the_main(int argc, char **argv) virtualSGA.add(pSGAOp, 1.0); virtualSGA.add(mon, 0.3); - eoSeqPopulator popit(pop); // no selection, a copy of pop + eoSeqPopulator popit(pop, offspring); // no selection, a copy of pop // until we filled a new population try { - while (popit.size() < pop.size()) - { - virtualSGA(popit); - } + while (offspring.size() < pop.size()) + { + virtualSGA(popit); + ++popit; + } } catch(eoPopulator::OutOfIndividuals&) { cout << "Warning: not enough individuals to handle\n"; } - - - swap(pop, popit); + + + swap(pop, offspring); + offspring.clear(); // ok, now print cout << "Apres virtualSGA \n" << pop << endl; @@ -276,14 +279,16 @@ int the_main(int argc, char **argv) eoSequentialSelect seqSelect; // select.init(); should be sorted out: is it the setup method??? - eoSelectivePopulator it_step3(pop, seqSelect); + eoSelectivePopulator it_step3(pop, offspring, seqSelect); - while (it_step3.size() < 2*pop.size()) + while (offspring.size() < 2*pop.size()) { virtualSGA(it_step3); + ++it_step3; } - swap(pop, it_step3); + swap(pop, offspring); + offspring.clear(); // ok, now print cout << "Apres SGA-like eoSelectivePopulator\n" << pop << endl; @@ -292,14 +297,16 @@ int the_main(int argc, char **argv) cout << "Now the pure addition !" << endl; init(pop, pSize); - eoSelectivePopulator it_step4(pop, seqSelect); - while (it_step4.size() < 2*pop.size()) + eoSelectivePopulator it_step4(pop, offspring, seqSelect); + while (offspring.size() < 2*pop.size()) { sOpQuadPlusMon(it_step4); + ++it_step4; } - swap(pop, it_step4); - + swap(pop, offspring); + offspring.clear(); + // ok, now print cout << "Apres Quad+Mon ds un eoSelectivePopulator\n" << pop << endl; diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp new file mode 100644 index 000000000..6ed5c2938 --- /dev/null +++ b/eo/test/t-eoPareto.cpp @@ -0,0 +1,120 @@ + +#include + +using namespace std; +typedef vector fitness_type; + +struct eoDouble : public EO +{ + double value; + + void printOn(ostream& os) const { os << fitness()[0] << ' ' << fitness()[1] << ' ' << value; } + void readFrom(istream& is) { is >> value; } +}; + +class Mutate : public eoMonOp +{ + bool operator()(eoDouble& _eo) + { + _eo.value += rng.normal() * 0.1 * _eo.value; + return true; + } +}; + +class Eval : public eoEvalFunc +{ + void operator()(eoDouble& _eo) + { + double v = _eo.value; + fitness_type f(2); + f[0] = v * v; + f[1] = (v - 1.) * (v - 1.); + + _eo.fitness(f); + } +}; + +class Init : public eoInit +{ + void operator()(eoDouble& _eo) + { + _eo.value = rng.normal() * 10.; + _eo.invalidate(); + } +}; + +// Test pareto dominance and perf2worth + +void the_main() +{ + Init init; + Eval eval; + Mutate mutate; + + unsigned pop_size = 50; + eoPop pop(pop_size, init); + + vector maximizes(2, false); // minimize both objectives + + // The dominance map needs to know how to compare + eoDominanceMap dominance(maximizes); + + // Pareto ranking needs a dominance map + eoParetoRanking perf2worth(dominance); + + // Three selectors + eoDetTournamentWorthSelect select1(perf2worth, 3); + eoStochTournamentWorthSelect select2(perf2worth, 0.95); + eoRouletteWorthSelect select3(perf2worth); + + // One general operator + eoProportionalOp opsel; + opsel.add(mutate, 1.0); + + // Three breeders + eoGeneralBreeder breeder1(select1, opsel); + eoGeneralBreeder breeder2(select2, opsel); + eoGeneralBreeder breeder3(select3, opsel); + + // Comma replacement + eoCommaReplacement replace; + + unsigned long generation = 0; + eoGenContinue gen(10, generation); + eoCheckPoint cp(gen); + + // Three algos + eoEasyEA ea1(cp, eval, breeder1, replace); + eoEasyEA ea2(cp, eval, breeder2, replace); + eoEasyEA ea3(cp, eval, breeder3, replace); + + apply(eval, pop); + ea1(pop); + + apply(init, pop); + apply(eval, pop); + generation = 0; + + ea2(pop); + apply(init, pop); + apply(eval, pop); + generation = 0; + + ea3(pop); + +} + + +int main() +{ + try + { + the_main(); + } + catch (exception& e) + { + cout << "Exception thrown: " << e.what() << endl; + throw e; // make sure it does not pass the test + } +} + diff --git a/eo/test/t-eoSSGA.cpp b/eo/test/t-eoSSGA.cpp index b42db6ef5..0dbe5cf48 100644 --- a/eo/test/t-eoSSGA.cpp +++ b/eo/test/t-eoSSGA.cpp @@ -1,6 +1,8 @@ #include +// tests a Steady State GA +// Needed to define this breeder, maybe make it a breeder template class eoBreedOne : public eoBreed { @@ -9,9 +11,9 @@ public : void operator()(const eoPop& _src, eoPop& _dest) { - eoSelectivePopulator pop(_src, select); + _dest.clear(); + eoSelectivePopulator pop(_src, _dest, select); op(pop); - _dest = pop; } private : @@ -72,15 +74,17 @@ int main() opsel.add(xover, 0.8); opsel.add(mutate, 0.2); -/* + eoDetTournamentSelect selector(3); eoBreedOne breed(selector, opsel); - eoSSGAWorseReplacement replace; -*/ - eoRandomSelect selector; - eoGeneralBreeder breed(selector, opsel); - eoPlusReplacement replace; + // Replace a single one + eoSSGAWorseReplacement replace; + + +// eoRandomSelect selector; +// eoGeneralBreeder breed(selector, opsel); +// eoPlusReplacement replace; eoMyEval eval; @@ -92,6 +96,7 @@ int main() eoPop pop(pop_size, init); + // evaluate apply(eval, pop); eoBestFitnessStat best("Best_Fitness"); @@ -100,11 +105,13 @@ int main() cp.add(best); cp.add(avg); - cp.add(mon); + +// cp.add(mon); mon.add(best); mon.add(avg); + // and run algo(pop); } \ No newline at end of file From 6a6b8551b06f1585e5614be63b6f1a32f535f464 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 12 Mar 2001 16:04:18 +0000 Subject: [PATCH 0501/2134] Added first batch of pareto based stuff --- eo/src/eoDominanceMap.h | 276 +++++++++++++++++++++++++++++++++++++++ eo/src/eoParetoRanking.h | 58 ++++++++ 2 files changed, 334 insertions(+) create mode 100644 eo/src/eoDominanceMap.h create mode 100644 eo/src/eoParetoRanking.h diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h new file mode 100644 index 000000000..9402a5126 --- /dev/null +++ b/eo/src/eoDominanceMap.h @@ -0,0 +1,276 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDominanceMap.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoDominanceMap_h +#define eoDominanceMap_h + +#include +#include + +/** + eoDominanceMap, utility class to calculate and maintain a map (vector >) of pareto dominance statistics. + + It is set up such that + + if map[i][j] == true + then i dominates j + + The dominance map can be used to perform pareto ranking (eoParetoRanking) or non dominated sorting. + For the latter, the remove() member function might come in handy. + + \todo make it an eoStat? +*/ +template +class eoDominanceMap : public eoUF&, void>, public std::vector > +{ + public : + /** + Ctor that needs to know what objectives are supposed to be maximized and which are to be minimized. + optional argument, a tolerance. This designates within which tolerance objective values are considered to be equal + */ + eoDominanceMap(const std::vector& _maximizes, double _tol = 1e-6) : maximizes(_maximizes), tol(_tol) {} + + /** + Clears the map + */ + void clear() + { + std::vector >::clear(); + fitnesses.clear(); + } + + /** + Update or create the dominance map + */ + void operator()(const eoPop& _pop) + { + if (fitness.size() != _pop.size()) + { // fresh start + setup(_pop); + return; + } + // else just update the guys that have changed + + update(_pop); + } + + /// update the map with the population + void update(const eoPop& _pop) + { + for (unsigned i = 0; i < _pop.size(); ++i) + { + if (fitness[i] == _pop[i].fitness()) + { + continue; + } + // it's a new guy, update rows and columns + fitness[i] = _pop[i].fitness(); + + for (unsigned j = 0; j < _pop.size(); ++j) + { + if (i == j) + continue; + + switch (dominates(_pop[i].fitness(), _pop[j].fitness())) + { + case a_dominates_b : + { + operator[](i)[j] = true; + operator[](j)[i] = false; + break; + } + case b_dominates_a : + { + operator[](i)[j] = false; + operator[](j)[i] = true; + break; + } + default : + { + operator[](i)[j] = false; + operator[](j)[i] = true; + } + } + } + } + } + + /** + Removes the domination info for a given individual, thus nothing dominates it and it dominates nothing. + */ + void remove(unsigned i) + { + for (unsigned j = 0; j < size(); ++j) + { + operator[](i)[j] = false; // clear row + operator[](j)[i] = false; // clear col + } + } + + /** + Create domination matrix from scratch. Complexity O(N^2) + */ + void setup(const eoPop& _pop) + { + fitness.resize(_pop.size()); + resize(_pop.size()); + + for (unsigned i = 0; i < _pop.size(); ++i) + { + fitness[i] = _pop[i].fitness(); + operator[](i).resize(_pop.size(), false); + + for (unsigned j = 0; j < i; ++j) + { + switch(dominates(fitness[i], fitness[j])) + { + case a_dominates_b : + { + operator[](i)[j] = true; + operator[](j)[i] = false; + break; + } + case b_dominates_a : + { + operator[](i)[j] = false; + operator[](j)[i] = true; + break; + } + default : + { + operator[](i)[j] = false; + operator[](j)[i] = true; + } + } + } + } + } + + /** + For all elements, returns the no. of elements that dominate the element + Thus: lower is better (and 0 is the front). + It returns a vector cuz that + makes subsequent manipulation that much easier + */ + vector sum_dominators() const + { + vector result(size(), 0.0); + + for (unsigned i = 0; i < size(); ++i) + { + for (unsigned j = 0; j < size(); ++j) + { + if (operator[](i)[j]) + result[i]++; + } + } + + return result; + } + + /** + For all elements, returns the number of elements that the element dominates + Thus: higher is better + It returns a vector cuz that + makes subsequent manipulation that much easier + */ + vector sum_dominants() const + { + vector result(size(), 0.0); + + for (unsigned i = 0; i < size(); ++i) + { + for (unsigned j = 0; j < size(); ++j) + { + if (operator[](j)[i]) + result[i]++; + } + } + + return result; + } + + /** + make a distinction between no domination (a better than b on one objective and worse on another) + and equality: a == b + */ + enum dom_res {a_dominates_b, b_dominates_a, no_domination, a_equals_b}; + + /** + a dominates b if it is better in one objective and not worse in any of the others + */ + dom_res dominates(typename EoType::Fitness a, typename EoType::Fitness b) + { + dom_res result = a_equals_b; + + for (unsigned i = 0; i < a.size(); ++i) + { + double aval = a[i]; + double bval = b[i]; + + if (!maximizes[i]) + { + aval = -aval; + bval = -bval; + } + + // check if unequal, in the case they're 'equal' just go to the next + if (fabs(aval - bval) > tol) + { + if (aval > bval) + { + if (result == b_dominates_a) + { + return no_domination; // when on another objective b dominated a, they do not dominate each other + } + // else continue comparing + + result = a_dominates_b; + } + else // bval > aval + { + if (result == a_dominates_b) + { + return no_domination; // done + } + + result = b_dominates_a; + } + } + } + + return result; + } + + private : + + + vector maximizes; + double tol; + vector fitness; +}; + +#endif \ No newline at end of file diff --git a/eo/src/eoParetoRanking.h b/eo/src/eoParetoRanking.h new file mode 100644 index 000000000..c73f1ef15 --- /dev/null +++ b/eo/src/eoParetoRanking.h @@ -0,0 +1,58 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoParetoRanking.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoParetoRanking_h +#define eoParetoRanking_h + +#include +#include + +/** + Straightforward pareto ranking. Every individual gets a rank according to the number + of elements it dominates. Note that without niching, this technique will usually not + find the whole front of non-dominated solutions, but will quite likely converge + on a single spot on the front. +*/ +template +class eoParetoRanking : public eoPerf2Worth +{ + public : + + eoParetoRanking(eoDominanceMap& _dominanceMap) : + eoPerf2Worth(), dominanceMap(_dominanceMap) {} + + void operator()(const eoPop& _pop) + { + dominanceMap(_pop); + value() = dominanceMap.sum_dominants(); + } + + private : + + eoDominanceMap& dominanceMap; +}; + +#endif From b917e54486aa70bcd29597687944d392a964152e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 12 Mar 2001 16:07:55 +0000 Subject: [PATCH 0502/2134] Production of binop back to 1 --- eo/src/eoGenOp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 3f46137cf..4a0f3ac71 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -107,7 +107,7 @@ class eoBinGenOp : public eoGenOp public: eoBinGenOp(eoBinOp& _op) : op(_op) {} - unsigned max_production(void) { return 2; } //2 as it will request two individuals + unsigned max_production(void) { return 1; } /** do the work: get 2 individuals from the population, modifies only one (it's a eoBinOp) From b2a0349595136c8dc47408fc03b30a025b706c6a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 13 Mar 2001 05:25:51 +0000 Subject: [PATCH 0503/2134] Just modified an wrong comment (after a too quick cut-and-paste) --- eo/src/eoSelectFromWorth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index a115f8b47..622f4bb91 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -34,7 +34,7 @@ //----------------------------------------------------------------------------- /** selects one element from a population (is an eoSelectOne) -but the selectin is based on a vector of Worth that is different +but the selection is based on a vector of Worth that is different from the fitnesses (e.g. EO fitness is what Koza terms "raw fitness", Worth is what the selection is based upon). @@ -192,7 +192,7 @@ public: total += (*it); } - /* Perform deterministic tournament on worthes + /* Perform roulette wheel on worthes by calling the appropriate fn see selectors.h */ From 3449314a28b0c6d6940bc2910eee752f81da9424 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 13 Mar 2001 08:25:05 +0000 Subject: [PATCH 0504/2134] Swapped linking order of utility libs --- eo/tutorial/Lesson2/Makefile | 4 ++-- eo/tutorial/Lesson3/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile index 57c02328d..52e89ff78 100644 --- a/eo/tutorial/Lesson2/Makefile +++ b/eo/tutorial/Lesson2/Makefile @@ -1,4 +1,4 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp @@ -15,4 +15,4 @@ clean : FirstRealEA : real_value.h -FirstBitEA : binary_value.h \ No newline at end of file +FirstBitEA : binary_value.h diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile index 16201978a..bee917779 100644 --- a/eo/tutorial/Lesson3/Makefile +++ b/eo/tutorial/Lesson3/Makefile @@ -1,4 +1,4 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp From 68904d7650273cf4e39502bf597e8f834ee25f4d Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Mar 2001 10:12:37 +0000 Subject: [PATCH 0505/2134] Added Multi-objective fitness monitoring added support for vector > in eoParam and made eoFileSnapshot type-safe --- eo/src/utils/checkpointing | 1 + eo/src/utils/eoFileSnapshot.h | 29 +++++++++----- eo/src/utils/eoMOFitnessStat.h | 73 ++++++++++++++++++++++++++++++++++ eo/src/utils/eoMonitor.h | 11 +++-- eo/src/utils/eoParam.h | 43 ++++++++++++++++++-- 5 files changed, 142 insertions(+), 15 deletions(-) create mode 100644 eo/src/utils/eoMOFitnessStat.h diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index c8fe220fc..8af4df768 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -12,3 +12,4 @@ #include #include #include +#include diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 2ba1a428c..910b73feb 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -56,9 +56,9 @@ public : typedef vector vDouble; typedef eoValueParam > vDoubleParam; - eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, + eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, std::string _filename = "gen", std::string _delim = " "): - dirname(_dirname), frequency(_frequency), + dirname(_dirname), frequency(_frequency), filename(_filename), delim(_delim), counter(0), boolChanged(true) { string s = "test -d " + dirname; @@ -69,16 +69,16 @@ public : // now make sure there is a dir without any genXXX file in it if (res) // no dir present { - s = string("mkdir ")+dirname; + s = string("mkdir ")+dirname; } else { - s = string("/bin/rm ")+dirname+ "/" + filename + "*"; + s = string("/bin/rm ")+dirname+ "/" + filename + "*"; } system(s.c_str()); // all done } - + /** accessor: has something changed (for gnuplot subclass) */ virtual bool hasChanged() {return boolChanged;} @@ -94,7 +94,7 @@ public : char buff[255]; ostrstream oscount(buff, 254); oscount << counter; - oscount << std::ends; + oscount << std::ends; currentFileName = dirname + "/" + filename + oscount.str(); } @@ -112,13 +112,13 @@ public : boolChanged = true; setCurrentFileName(); ofstream os(currentFileName.c_str()); - + if (!os) { string str = "eoFileSnapshot: Could not open " + currentFileName; throw runtime_error(str); } - + return operator()(os); } @@ -126,7 +126,7 @@ public : */ eoMonitor& operator()(std::ostream& _os) { - const eoValueParam > * ptParam = + const eoValueParam > * ptParam = static_cast >* >(vec[0]); const vector v = ptParam->value(); @@ -160,6 +160,17 @@ public : { return dirname;} virtual const string baseFileName() // the title for eoGnuPlot { return filename;} + + /// add checks whether it is a vector of doubles + void add(const eoParam& _param) + { + if (!dynamic_cast >*>(&_param)) + { + throw logic_error("eoFileSnapshot: I can only monitor vectors of doubles, sorry"); + } + eoMonitor::add(_param); + } + private : std::string dirname; unsigned frequency; diff --git a/eo/src/utils/eoMOFitnessStat.h b/eo/src/utils/eoMOFitnessStat.h new file mode 100644 index 000000000..2c6b105ea --- /dev/null +++ b/eo/src/utils/eoMOFitnessStat.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFitnessStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFitnessStat_h +#define _eoFitnessStat_h + +#include + +/** + The fitnesses of a whole population, as a vector +*/ +template +class eoFitnessStat : public eoSortedStat > +{ +public : + eoFitnessStat(std::string _description = "AllFitnesses") : + eoSortedStat >(vector(0), _description) {} + + virtual void operator()(const vector& _popPters) + { + value().resize(_popPters.size()); + for (unsigned i=0; i<_popPters.size(); i++) + value()[i] = _popPters[i]->fitness(); + } +}; + + +/** For multi-objective fitness, we need to translate a stat > + into a vector, so each objective gets a seperate stat +*/ +template +class eoMOFitnessStat : public eoSortedStat > +{ +public : + /** Ctor: say what component you want + */ + eoMOFitnessStat(unsigned _objective, std::string _description = "MO-Fitness") : + eoSortedStat >(vector(0), _description), + objective(_objective) {} + + virtual void operator()(const vector& _popPters) + { + value().resize(_popPters.size()); + for (unsigned i=0; i<_popPters.size(); i++) + value()[i] = _popPters[i]->fitness()[objective]; + } +private: + unsigned int objective; // The objective we're storing +}; +#endif diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index a71d154b6..1af487288 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -36,8 +36,8 @@ class eoParam; /** The abstract monitor class is a vector of parameter pointers. Use - either push_back a pointer or add a reference to a parameter. - Derived classes will then implement the operator()(void) which + either push_back a pointer or add a reference to a parameter. + Derived classes will then implement the operator()(void) which will stream or pipe the current values of the parameters to wherever you want it streamed or piped to. */ @@ -46,7 +46,12 @@ class eoMonitor : public eoF public : virtual void lastCall() {} - virtual void add(const eoParam& _param) { vec.push_back(&_param); } + + /** + Adds a parameter to the monitor. It is virtual so you can do some type checking + in derived classes if you must. + */ + virtual void add(const eoParam& _param) { vec.push_back(&_param); } protected : diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 954a86115..26db85271 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -73,7 +73,7 @@ public: * Pure virtual function to set the value */ virtual void setValue(std::string _value) = 0 ; - + /** * Returns the short name. */ @@ -111,7 +111,7 @@ private: std::string repLongName; std::string repDefault; std::string repDescription; - char repShortHand; + char repShortHand; bool repRequired; }; @@ -187,7 +187,7 @@ void eoValueParam::setValue(std::string _value) /// Because MSVC does not support partial specialization, the pair is a double, not a T template <> std::string eoValueParam >::getValue(void) const -{ +{ // use own buffer as MSVC's buffer leaks! char buff[1024]; std::ostrstream os(buff, 1024); @@ -204,6 +204,43 @@ void eoValueParam >::setValue(std::string _value) is >> repValue.second; } +/// Because MSVC does not support partial specialization, the vector is a vector of doubles, not a T +template <> +std::string eoValueParam > >::getValue(void) const +{ + std::ostrstream os; + os << repValue.size() << ' '; + for (unsigned i = 0; i < repValue.size(); ++i) + { + os << repValue[i].size() << ' '; + std::copy(repValue[i].begin(), repValue[i].end(), std::ostream_iterator(os, " ")); + } + + os << std::ends; + return os.str(); +} + +/// Because MSVC does not support partial specialization, the vector is a vector of doubles, not a T +template <> +void eoValueParam > >::setValue(std::string _value) +{ + std::istrstream is(_value.c_str()); + unsigned sz; + is >> sz; + repValue.resize(sz); + + for (unsigned i = 0; i < repValue.size(); ++i) + { + unsigned sz2; + is >> sz2; + repValue[i].resize(sz2); + for (unsigned j = 0; j < sz2; ++j) + { + is >> repValue[i][j]; + } + } +} + /// Because MSVC does not support partial specialization, the vector is a double, not a T template <> std::string eoValueParam >::getValue(void) const From 3798b665d47ee37cdb8a3a810f8c852ef653e4bb Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Mar 2001 10:13:27 +0000 Subject: [PATCH 0506/2134] Added support for printing vector as a fitness --- eo/src/EO.h | 9 ++++++++- eo/src/eoDominanceMap.h | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 8158cb404..4dba3fb0b 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -27,10 +27,11 @@ //----------------------------------------------------------------------------- -#include // runtime_error +#include // runtime_error #include // eoObject #include // eoPersistent +/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file template ostream& print_fitness(ostream& _os, const std::vector& vec) { @@ -39,18 +40,21 @@ ostream& print_fitness(ostream& _os, const std::vector& vec) return _os; } +/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file template ostream& print_fitness(ostream& _os, const std::pair& pair) { return _os << pair.first << ' ' << pair.second; } +/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file template ostream& print_fitness(ostream& _os, const T& t) { // general, try operator<< return _os << t; } +/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file template istream& read_fitness(istream& _is, vector& vec) { @@ -65,6 +69,7 @@ istream& read_fitness(istream& _is, vector& vec) return _is; } +/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file template istream& read_fitness(istream& _is, pair& pair) { @@ -72,6 +77,8 @@ istream& read_fitness(istream& _is, pair& pair) _is >> pair.second; return _is; } + +/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file template istream& read_fitness(istream& _is, T& t) { diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index 9402a5126..b48abdc59 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -183,8 +183,8 @@ class eoDominanceMap : public eoUF&, void>, public std::vect { for (unsigned j = 0; j < size(); ++j) { - if (operator[](i)[j]) - result[i]++; + if (operator[](i)[j]) // i dominates j + result[j]++; } } @@ -205,7 +205,7 @@ class eoDominanceMap : public eoUF&, void>, public std::vect { for (unsigned j = 0; j < size(); ++j) { - if (operator[](j)[i]) + if (operator[](i)[j]) // i dominates j result[i]++; } } From fe89662e3c8d62794501d8aa703018c394413510 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Mar 2001 10:14:27 +0000 Subject: [PATCH 0507/2134] t-eoPareto now plots the evolving population and t-eoRandom check is slightly more strict --- eo/test/Makefile.am | 2 +- eo/test/t-eoPareto.cpp | 21 +++++++++++++++++++-- eo/test/t-eoRandom.cpp | 3 ++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 9563bd843..692bf4d0b 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -15,7 +15,7 @@ CXXFLAGS = -g -Wall check_PROGRAMS = t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector -TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA +TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 6ed5c2938..592ba5c43 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -1,6 +1,9 @@ #include +//#include +//#include + using namespace std; typedef vector fitness_type; @@ -43,7 +46,7 @@ class Init : public eoInit } }; -// Test pareto dominance and perf2worth +// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well void the_main() { @@ -51,6 +54,7 @@ void the_main() Eval eval; Mutate mutate; + unsigned num_gen = 10; unsigned pop_size = 50; eoPop pop(pop_size, init); @@ -80,9 +84,22 @@ void the_main() eoCommaReplacement replace; unsigned long generation = 0; - eoGenContinue gen(10, generation); + eoGenContinue gen(num_gen, generation); eoCheckPoint cp(gen); + eoMOFitnessStat fitness0(0, "FirstObjective"); + eoMOFitnessStat fitness1(1, "SecondObjective"); + + cp.add(fitness0); + cp.add(fitness1); + + eoGnuplot1DSnapshot snapshot("pareto"); + + cp.add(snapshot); + + snapshot.add(fitness0); + snapshot.add(fitness1); + // Three algos eoEasyEA ea1(cp, eval, breeder1, replace); eoEasyEA ea2(cp, eval, breeder2, replace); diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 3197dccfc..c21b9cdc1 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,7 +24,7 @@ */ /** -CVS Info: $Date: 2001-02-19 12:23:13 $ $Author: maartenkeijzer $ $Revision: 1.10 $ +CVS Info: $Date: 2001-03-14 10:14:27 $ $Author: maartenkeijzer $ $Revision: 1.11 $ */ //----------------------------------------------------------------------------- @@ -45,6 +45,7 @@ main() { try { // throws an error eoUniformGenerator utest( 10000000U, 10000U); + throw; // if this succeeds something is wrong, make sure that that is noticed } catch (logic_error& e) { From 843d442475ad3b15e29a08f9ad012e47ae9eb090 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Mar 2001 11:58:47 +0000 Subject: [PATCH 0508/2134] OOPS, that was a major bug, letting non-dominating individuals dominate one another. --- eo/src/eoDominanceMap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index b48abdc59..b677bc48a 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -111,7 +111,7 @@ class eoDominanceMap : public eoUF&, void>, public std::vect default : { operator[](i)[j] = false; - operator[](j)[i] = true; + operator[](j)[i] = false; } } } @@ -162,7 +162,7 @@ class eoDominanceMap : public eoUF&, void>, public std::vect default : { operator[](i)[j] = false; - operator[](j)[i] = true; + operator[](j)[i] = false; } } } From 9aa9e38090bf5ab4c34c0711a377866135c5441b Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Mar 2001 12:46:37 +0000 Subject: [PATCH 0509/2134] First go, does not do niching yet --- eo/src/eoNDSorting.h | 119 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 eo/src/eoNDSorting.h diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h new file mode 100644 index 000000000..45eea0086 --- /dev/null +++ b/eo/src/eoNDSorting.h @@ -0,0 +1,119 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoNDSorting.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoNDSorting_h +#define eoNDSorting_h + +#include +#include +#include + +/** + Non dominated sorting +*/ +template +class eoNDSorting : public eoPerf2Worth +{ + public : + + eoNDSorting(eoDominanceMap& _dominanceMap, double _nicheSize) : + eoPerf2Worth(), dominanceMap(_dominanceMap), nicheSize(_nicheSize) {} + + void operator()(const eoPop& _pop) + { + dominanceMap(_pop); + + vector excluded(_pop.size(), false); + + value().resize(_pop.size()); + + bool finished = false; + + int dominance_level = 0; + + while(!finished) + { + vector ranks = dominanceMap.sum_dominators(); + + vector current_front; + current_front.reserve(_pop.size()); + + finished = true; + + for (unsigned i = 0; i < _pop.size(); ++i) + { + if (excluded[i]) + { + continue; // next please + } + + if (ranks[i] < 1e-6) + {// it's part of the current front + excluded[i] = true; + current_front.push_back(i); + dominanceMap.remove(i); // remove from consideration + } + else + { + finished = false; // we need another go + } + } + + // Now we have the indices to the current front in current_front, do the niching + + // As I don't have my reference text with me some homespun savagery + + ranks = dominanceMap.sum_dominants(); // how many do you dominate + + double max_rank = *std::max_element(ranks.begin(), ranks.end()); + + for (unsigned i = 0; i < current_front.size(); ++i) + { + // punish the ones that dominate the most individuals (sounds strange huh?) + value()[current_front[i]] = dominance_level + ranks[i] / (max_rank + 1); + } + + + dominance_level++; // go to the next front + } + + // now all that's left to do is to transform lower rank into higher worth + double max_fitness = *std::max_element(value().begin(), value().end()); + + for (unsigned i = 0; i < value().size(); ++i) + { + value()[i] = max_fitness - value()[i]; + } + + } + + private : + + eoDominanceMap& dominanceMap; + double nicheSize; +}; + +#endif \ No newline at end of file From 67c357587381e947ccbf21824a897d4a04af7e5f Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 14 Mar 2001 12:47:14 +0000 Subject: [PATCH 0510/2134] Using nd-sorting now --- eo/test/t-eoPareto.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 592ba5c43..f646e5927 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -2,7 +2,7 @@ #include //#include -//#include +#include using namespace std; typedef vector fitness_type; @@ -10,9 +10,6 @@ typedef vector fitness_type; struct eoDouble : public EO { double value; - - void printOn(ostream& os) const { os << fitness()[0] << ' ' << fitness()[1] << ' ' << value; } - void readFrom(istream& is) { is >> value; } }; class Mutate : public eoMonOp @@ -30,8 +27,8 @@ class Eval : public eoEvalFunc { double v = _eo.value; fitness_type f(2); - f[0] = v * v; - f[1] = (v - 1.) * (v - 1.); + f[1] = v * v; + f[0] = (v - 1.) * (v - 1.); _eo.fitness(f); } @@ -64,7 +61,8 @@ void the_main() eoDominanceMap dominance(maximizes); // Pareto ranking needs a dominance map - eoParetoRanking perf2worth(dominance); + //eoParetoRanking perf2worth(dominance); + eoNDSorting perf2worth(dominance, 0.0); // Three selectors eoDetTournamentWorthSelect select1(perf2worth, 3); @@ -94,6 +92,7 @@ void the_main() cp.add(fitness1); eoGnuplot1DSnapshot snapshot("pareto"); + snapshot.pointSize =3; cp.add(snapshot); From d0fd97515e407df053cc5369790f9967843243dc Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 15 Mar 2001 14:11:24 +0000 Subject: [PATCH 0511/2134] added dist and distdir targets --- eo/tutorial/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index 5912def5e..ce7779180 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -12,5 +12,10 @@ lesson2 : lesson3 : cd Lesson3; make +#empty dist and distdir to let top-level 'make' do its job +dist : + +distdir : + clean: for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done From cf8f6b5c1634d044ff026fc85f4bf773242c5f3f Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Mar 2001 11:48:32 +0000 Subject: [PATCH 0512/2134] added --- eo/src/eoParetoFitness.h | 143 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 eo/src/eoParetoFitness.h diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h new file mode 100644 index 000000000..164593e65 --- /dev/null +++ b/eo/src/eoParetoFitness.h @@ -0,0 +1,143 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParetoFitness.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mak@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoParetoFitness_h +#define _eoParetoFitness_h + +#include + +/** + eoFitnessTraits: a traits class to specify the number of objectives and which one are maximizing + or not. See eoParetoFitness for its use. If you define your own, make sure you make the functions + static! +*/ +class eoParetoFitnessTraits +{ + public : + + static unsigned nObjectives() { return 2; } + static double tol() { return 1e-6; } + static bool maximizing(int which) { return true; } // by default: all are maximizing +}; + +/** + eoParetoFitness class: vector of doubles with overloaded comparison operators. Comparison is done + on pareto dominance. The template argument FitnessTraits defaults to eoParetoFitnessTraits, which + can be replaces at will by any other class that implements the static functions defined therein. + + Note that the comparison defines a partial order, so that + !(a < b) && !(b +class eoParetoFitness : public std::vector +{ +public : + + eoParetoFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} + + /// Partial order based on Pareto-dominance + bool operator<(const eoParetoFitness& _other) const + { + bool smaller = false; + double tol = FitnessTraits::tol(); + const vector& performance = *this; + const vector& otherperformance = _other; + + for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) + { + bool maxim = FitnessTraits::maximizing(i); + double aval = maxim? performance[i] : -performance[i]; + double bval = maxim? otherperformance[i] : otherperformance[i]; + + if (fabs(aval - bval) > tol) + { + if (aval > bval) + { + return false; // cannot dominate + } + // else aval < bval + smaller = true; // goto next objective + } + //else they're equal in this objective, goto next + } + + return smaller; + } + + bool operator>(const eoParetoFitness& _other) const + { + return _other < *this; + } + + bool operator<=(const eoParetoFitness& _other) const + { + return operator==(_other) || operator<(_other); + } + + bool operator>=(const eoParetoFitness& _other) const + { + return _other <= *this; + } + + bool operator==(const eoParetoFitness& _other) const + { // check if they're all within tolerance + for (unsigned i = 0; i < size(); ++i) + { + if (fabs(operator[](i) - _other[i]) > FitnessTraits::tol()) + { + return false; + } + } + return true; + } + + bool operator!=(const eoParetoFitness& _other) const + { return ! operator==(_other); } + +}; + +template +std::ostream& operator<<(std::ostream& os, const eoParetoFitness& fitness) +{ + for (unsigned i = 0; i < fitness.size(); ++i) + { + os << fitness[i] << ' '; + } + return os; +} + +template +std::istream& operator>>(std::istream& is, eoParetoFitness& fitness) +{ + fitness = eoParetoFitness(); + for (unsigned i = 0; i < fitness.size(); ++i) + { + is >> fitness[i]; + } + return is; +} + +#endif From d09c216b61b1ca8f980a10342dabc3680077e139 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Mar 2001 12:08:26 +0000 Subject: [PATCH 0513/2134] Ok, made an eoParetoFitness class, which meant that I could roll back a few changes in EO.h (phew). Also changed eoSelectFromWorth etc. --- eo/Makefile.am | 6 +- eo/autogen.sh | 10 +- eo/configure.in | 2 +- eo/src/EO.h | 62 +------------ eo/src/eoDominanceMap.h | 2 + eo/src/eoNDSorting.h | 142 +++++++++++++++++++++++++++-- eo/src/eoSelectFromWorth.h | 3 +- eo/src/utils/eoGnuplot1DSnapshot.h | 28 +++--- eo/test/Makefile.am | 9 +- eo/test/t-eoPareto.cpp | 58 +++++++++--- eo/win/Makefile.am | 3 +- 11 files changed, 215 insertions(+), 110 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 0dea0e13a..3c2b9a8ad 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win tutorial app +SUBDIRS = src test win app tutorial #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user @@ -17,10 +17,6 @@ EXTRA_DIST=LICENSE lib: pushd src; $(MAKE) all; popd -# The test directory should be run explicitely, to check if nothing is broken -test: test/run_tests test/Makefile - pushd test; touch run_tests; $(MAKE) all; ./run_tests; popd - # so that make doc always compiles the doc ... doc: doc/eo.cfg pushd doc; $(MAKE) doc; touch eo.cfg; popd diff --git a/eo/autogen.sh b/eo/autogen.sh index 257ad1b66..c65b09984 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -56,8 +56,8 @@ echo echo "Now type 'make' to compile $PROG." echo "And if you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo -echo "WARNING: Compiling all test programs can take some time." -echo "But you don't have to: you can simply type" -echo " 'make lib'" -echo "and then go in your application dir (or in the tutorial dir)" -echo "and there type 'make'" +#echo "WARNING: Compiling all test programs can take some time." +#echo "But you don't have to: you can simply type" +#echo " 'make lib'" +#echo "and then go in your application dir (or in the tutorial dir)" +#echo "and there type 'make'" diff --git a/eo/configure.in b/eo/configure.in index c87744d8b..8bb18d425 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.11) +AM_INIT_AUTOMAKE(eo, 0.9.2) dnl Checks for maintainer mode AM_MAINTAINER_MODE diff --git a/eo/src/EO.h b/eo/src/EO.h index 4dba3fb0b..a6d32d773 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // EO.h // (c) GeNeura Team 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,61 +31,6 @@ #include // eoObject #include // eoPersistent -/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file -template -ostream& print_fitness(ostream& _os, const std::vector& vec) -{ - _os << vec.size() << ' '; - std::copy(vec.begin(), vec.end(), ostream_iterator(_os)); - return _os; -} - -/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file -template -ostream& print_fitness(ostream& _os, const std::pair& pair) -{ - return _os << pair.first << ' ' << pair.second; -} - -/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file -template -ostream& print_fitness(ostream& _os, const T& t) -{ // general, try operator<< - return _os << t; -} - -/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file -template -istream& read_fitness(istream& _is, vector& vec) -{ - unsigned sz; - _is >> sz; - vec.resize(sz); - for (unsigned i = 0; i < vec.size(); ++i) - { - _is >> vec[i]; - } - - return _is; -} - -/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file -template -istream& read_fitness(istream& _is, pair& pair) -{ - _is >> pair.first; - _is >> pair.second; - return _is; -} - -/// Functions for reading and writing non-scalar fitnesses, should probably go to seperate file -template -istream& read_fitness(istream& _is, T& t) -{ - _is >> t; - return _is; -} - //----------------------------------------------------------------------------- /** EO is a base class for evolvable objects, that is, the subjects of evolution. EOs have only got a fitness, which at the same time needs to be @@ -158,7 +103,7 @@ public: * @throw runtime_exception If a valid object can't be read. */ virtual void readFrom(istream& _is) { - read_fitness(_is, repFitness); + _is >> repFitness; if (_is) invalidFitness = false; else @@ -173,7 +118,7 @@ public: if (invalid()) _os << "INVALID "; else - print_fitness(_os, repFitness) << ' '; // trailing space to make reading in that much easier + _os << repFitness << ' '; // trailing space to make reading in that much easier } //@} @@ -186,4 +131,3 @@ private: //----------------------------------------------------------------------------- #endif EO_H - diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index b677bc48a..aec4a4151 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -62,6 +62,8 @@ class eoDominanceMap : public eoUF&, void>, public std::vect fitnesses.clear(); } + bool maximize(unsigned objective) const { return maximizes[objective]; } + /** Update or create the dominance map */ diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 45eea0086..4b139060e 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -32,16 +32,25 @@ #include /** - Non dominated sorting + Non dominated sorting, it *is a* vector of doubles, the integer part is the rank (to which front it belongs), + the fractional part the niching penalty or distance penalty or whatever penalty you want to squeeze into + the bits. */ template class eoNDSorting : public eoPerf2Worth { public : - eoNDSorting(eoDominanceMap& _dominanceMap, double _nicheSize) : - eoPerf2Worth(), dominanceMap(_dominanceMap), nicheSize(_nicheSize) {} + eoNDSorting(eoDominanceMap& _dominanceMap) : + eoPerf2Worth(), dominanceMap(_dominanceMap) {} + /** Pure virtual function that calculates the 'distance' for each element to the current front + Implement to create your own nondominated sorting algorithm. The size of the returned vector + should be equal to the size of the current_front. + */ + virtual vector niche_penalty(const vector& current_front, const eoPop& _pop) = 0; + + /// Do the work void operator()(const eoPop& _pop) { dominanceMap(_pop); @@ -83,20 +92,20 @@ class eoNDSorting : public eoPerf2Worth } // Now we have the indices to the current front in current_front, do the niching + vector niche_count = niche_penalty(current_front, _pop); - // As I don't have my reference text with me some homespun savagery + if (niche_count.size() != current_front.size()) + { + throw logic_error("eoNDSorting: niche and front should have the same size"); + } - ranks = dominanceMap.sum_dominants(); // how many do you dominate - - double max_rank = *std::max_element(ranks.begin(), ranks.end()); + double max_niche = *max_element(niche_count.begin(), niche_count.end()); for (unsigned i = 0; i < current_front.size(); ++i) { - // punish the ones that dominate the most individuals (sounds strange huh?) - value()[current_front[i]] = dominance_level + ranks[i] / (max_rank + 1); + value()[current_front[i]] = dominance_level + niche_count[i] / (max_niche + 1); } - dominance_level++; // go to the next front } @@ -110,10 +119,123 @@ class eoNDSorting : public eoPerf2Worth } + const eoDominanceMap& map() const; + private : eoDominanceMap& dominanceMap; +}; + +/** + The original Non Dominated Sorting algorithm from Srinivas and Deb +*/ +template +class eoNDSorting_I : public eoNDSorting +{ +public : + eoNDSorting_I(eoDominanceMap& _map, double _nicheSize) : eoNDSorting(_map), nicheSize(_nicheSize) {} + + vector niche_penalty(const vector& current_front, const eoPop& _pop) + { + vector niche_count(current_front.size(), 0.); + + for (unsigned i = 0; i < current_front.size(); ++i) + { // calculate whether the other points lie within the nice + for (unsigned j = 0; j < current_front.size(); ++j) + { + if (i == j) + continue; + + double dist = 0.0; + + for (unsigned k = 0; k < _pop[current_front[j]].fitness().size(); ++k) + { + double d = _pop[current_front[i]].fitness()[k] - _pop[current_front[j]].fitness()[k]; + dist += d*d; + } + + if (dist < nicheSize) + { + niche_count[i] += 1.0 - pow(dist / nicheSize,2.); + } + } + } + + return niche_count; + } + + private : + double nicheSize; }; +/** + Adapted from Deb, Agrawal, Pratab and Meyarivan: A Fast Elitist Non-Dominant Sorting Genetic Algorithm for MultiObjective Optimization: NSGA-II + KanGAL Report No. 200001 + + Note that this class does not do the sorting per se, but the sorting of it worth_vector will give the right order + + The crowding distance is calculated as the sum of the distances to the nearest neighbours. As we need to return the + penalty value, we have to invert that and invert it again in the base class, but such is life, sigh +*/ +template +class eoNDSorting_II : public eoNDSorting +{ + public: + eoNDSorting_II(eoDominanceMap& _map) : eoNDSorting(_map) {} + + typedef std::pair double_index_pair; + + class compare_nodes + { + public : + bool operator()(const double_index_pair& a, const double_index_pair& b) const + { + return a.first < b.first; + } + }; + + vector niche_penalty(const vector& _cf, const eoPop& _pop) + { + vector niche_count(_cf.size(), 0.); + + unsigned nObjectives = _pop[_cf[0]].fitness().size(); + + for (unsigned o = 0; o < nObjectives; ++o) + { + + vector > performance(_cf.size()); + for (unsigned i =0; i < _cf.size(); ++i) + { + performance[i].first = _pop[_cf[i]].fitness()[o]; + performance[i].second = i; + } + + sort(performance.begin(), performance.end(), compare_nodes()); // a lambda operator would've been nice here + + vector nc(niche_count.size(), 0.0); + + for (unsigned i = 1; i < _cf.size()-1; ++i) + { // and yet another level of indirection + nc[performance[i].second] = performance[i+1].first - performance[i-1].first; + } + + double max_dist = *max_element(nc.begin(), nc.end()); + + // set boundary penalty at 0 (so it will get chosen over all the others + nc[performance[0].second] = 0; + nc[performance.back().second] = 0; + + for (unsigned i = 0; i < nc.size(); ++i) + { + niche_count[i] += (max_dist + 1) - nc[i]; + } + } + + return niche_count; + } + + +}; + #endif \ No newline at end of file diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index 622f4bb91..45751f3a3 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -74,8 +74,7 @@ protected: eoPerf2Worth & perf2Worth; #ifndef NDEBUG - vector fitness; // for debugging purposes, to check that the perf2worth and pop are in sync - + std::vector fitness; void check_sync(unsigned index, const EOT& _eo) { if (fitness[index] != _eo.fitness()) diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index d8e575a5b..efb9c3238 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -55,18 +55,20 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot { public: // Ctor - eoGnuplot1DSnapshot(std::string _dirname, unsigned _frequency = 1, - std::string _filename = "gen", std::string _delim = " ") : - eoFileSnapshot(_dirname, _frequency, _filename, _delim), - eoGnuplot(_filename,"set data style points") + eoGnuplot1DSnapshot(std::string _dirname, unsigned _frequency = 1, + std::string _filename = "gen", std::string _delim = " ") : + eoFileSnapshot(_dirname, _frequency, _filename, _delim), + eoGnuplot(_filename,"set data style points"), + pointSize(5) {} // Ctor - eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot) : - eoFileSnapshot(_fSnapshot), - eoGnuplot(_fSnapshot.baseFileName(),"set data style points") + eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot) : + eoFileSnapshot(_fSnapshot), + eoGnuplot(_fSnapshot.baseFileName(),"set data style points"), + pointSize(5) {} - + // Dtor virtual ~eoGnuplot1DSnapshot(){} @@ -75,10 +77,12 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot /// Class name. virtual string className() const { return "eoGnuplot1DSnapshot"; } -private: + unsigned pointSize; +private: + }; -// the following should be placed in a separate eoGnuplot1DMonitor.cpp +// the following should be placed in a separate eoGnuplot1DMonitor.cpp //////////////////////////////////////////////////////////// inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) @@ -96,12 +100,12 @@ inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) os << "plot"; os << " '" << getFileName().c_str() << - "' notitle with points ps 5" ; + "' notitle with points ps " << pointSize ; os << "\n"; os << '\0'; PipeComSend( gpCom, buff ); return (*this); } - + #endif _eoGnuplot1DSnapshot_H diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 692bf4d0b..557839924 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,9 +13,9 @@ LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall ############################################################################### -check_PROGRAMS = t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector -TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto +TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA @@ -128,3 +128,8 @@ t_eoPareto_LDFLAGS = -lm t_eoPareto_LDADD = $(LDADDS) ############################################################################### +t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp +t_eoParetoFitness_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoParetoFitness_LDFLAGS = -lm +t_eoParetoFitness_LDADD = $(LDADDS) +############################################################################### diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index f646e5927..08a367327 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -3,20 +3,42 @@ //#include #include +#include using namespace std; -typedef vector fitness_type; + +class MinimizingFitnessTraits : public eoParetoFitnessTraits +{ + public : + static bool maximizing(int) { return false; } +}; + +typedef eoParetoFitness fitness_type; + +const unsigned chromsize=3; +const double minval = -5; +const double maxval = 5; struct eoDouble : public EO { - double value; + double value[chromsize]; }; class Mutate : public eoMonOp { bool operator()(eoDouble& _eo) { - _eo.value += rng.normal() * 0.1 * _eo.value; + for (unsigned i = 0; i < chromsize; ++i) + { + if (rng.flip(1./10.)) + _eo.value[i] += rng.normal() * 0.05 * _eo.value[i]; + + if (_eo.value[i] < minval) + _eo.value[i] = minval; + else if (_eo.value[i] > maxval) + _eo.value[i] = maxval; + } + return true; } }; @@ -25,10 +47,18 @@ class Eval : public eoEvalFunc { void operator()(eoDouble& _eo) { - double v = _eo.value; - fitness_type f(2); - f[1] = v * v; - f[0] = (v - 1.) * (v - 1.); + vector x(_eo.value, _eo.value + chromsize); + fitness_type f; + + for (unsigned i = 0; i < chromsize; ++i) + { + if (i < chromsize-1) + { + f[0] += -10.0 * exp(-0.2 * sqrt(x[i]*x[i] + x[i+1]*x[i+1])); + } + + f[1] += pow(fabs(x[i]), 0.8) + 5 * pow(sin(x[i]),3.); + } _eo.fitness(f); } @@ -38,7 +68,10 @@ class Init : public eoInit { void operator()(eoDouble& _eo) { - _eo.value = rng.normal() * 10.; + _eo.value[0] = rng.uniform(); + + for (unsigned i = 1; i < chromsize; ++i) + _eo.value[i] = rng.uniform() * 10. - 5; _eo.invalidate(); } }; @@ -51,8 +84,8 @@ void the_main() Eval eval; Mutate mutate; - unsigned num_gen = 10; - unsigned pop_size = 50; + unsigned num_gen = 500; + unsigned pop_size = 100; eoPop pop(pop_size, init); vector maximizes(2, false); // minimize both objectives @@ -62,7 +95,8 @@ void the_main() // Pareto ranking needs a dominance map //eoParetoRanking perf2worth(dominance); - eoNDSorting perf2worth(dominance, 0.0); + //eoNDSorting_I perf2worth(dominance, 0.5); + eoNDSorting_II perf2worth(dominance); // Three selectors eoDetTournamentWorthSelect select1(perf2worth, 3); @@ -78,7 +112,7 @@ void the_main() eoGeneralBreeder breeder2(select2, opsel); eoGeneralBreeder breeder3(select3, opsel); - // Comma replacement + // replacement eoCommaReplacement replace; unsigned long generation = 0; diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am index eab6c1f0d..33d08e380 100644 --- a/eo/win/Makefile.am +++ b/eo/win/Makefile.am @@ -1,5 +1,4 @@ -EXTRA_DIST=eo_win.dsw eo.dsp esfull.dsp t_eobin.dsp t_eoCheckpointing.dsp t_eofitness.dsp \ - t_eoFunctor.dsp t_externalEO.dsp t_StateAndParser.dsp t_eoSymreg.dsp +EXTRA_DIST=eo.dsw eo.dsp From 2dd807ecbed7a05613594318fb6e316101518777 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Mar 2001 12:09:36 +0000 Subject: [PATCH 0514/2134] oops, ngens is now the nice 10 --- eo/test/t-eoPareto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 08a367327..db944cbea 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -84,7 +84,7 @@ void the_main() Eval eval; Mutate mutate; - unsigned num_gen = 500; + unsigned num_gen = 10; unsigned pop_size = 100; eoPop pop(pop_size, init); From 548b2ae5284abf14905b15bf831e5310f80f3781 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Mar 2001 13:11:32 +0000 Subject: [PATCH 0515/2134] Some bugfixing in MO optimization and added empty check: target in tutorial --- eo/src/eoDominanceMap.h | 143 ++++----------------------------------- eo/src/eoParetoFitness.h | 3 +- eo/test/t-eoPareto.cpp | 6 +- eo/tutorial/Makefile | 2 + 4 files changed, 21 insertions(+), 133 deletions(-) diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index aec4a4151..d19e57555 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -47,11 +47,6 @@ template class eoDominanceMap : public eoUF&, void>, public std::vector > { public : - /** - Ctor that needs to know what objectives are supposed to be maximized and which are to be minimized. - optional argument, a tolerance. This designates within which tolerance objective values are considered to be equal - */ - eoDominanceMap(const std::vector& _maximizes, double _tol = 1e-6) : maximizes(_maximizes), tol(_tol) {} /** Clears the map @@ -62,62 +57,13 @@ class eoDominanceMap : public eoUF&, void>, public std::vect fitnesses.clear(); } - bool maximize(unsigned objective) const { return maximizes[objective]; } - /** Update or create the dominance map */ void operator()(const eoPop& _pop) { - if (fitness.size() != _pop.size()) - { // fresh start - setup(_pop); - return; - } - // else just update the guys that have changed - - update(_pop); - } - - /// update the map with the population - void update(const eoPop& _pop) - { - for (unsigned i = 0; i < _pop.size(); ++i) - { - if (fitness[i] == _pop[i].fitness()) - { - continue; - } - // it's a new guy, update rows and columns - fitness[i] = _pop[i].fitness(); - - for (unsigned j = 0; j < _pop.size(); ++j) - { - if (i == j) - continue; - - switch (dominates(_pop[i].fitness(), _pop[j].fitness())) - { - case a_dominates_b : - { - operator[](i)[j] = true; - operator[](j)[i] = false; - break; - } - case b_dominates_a : - { - operator[](i)[j] = false; - operator[](j)[i] = true; - break; - } - default : - { - operator[](i)[j] = false; - operator[](j)[i] = false; - } - } - } - } + setup(_pop); + return; } /** @@ -147,25 +93,20 @@ class eoDominanceMap : public eoUF&, void>, public std::vect for (unsigned j = 0; j < i; ++j) { - switch(dominates(fitness[i], fitness[j])) + if (_pop[i].fitness() > _pop[j].fitness()) { - case a_dominates_b : - { - operator[](i)[j] = true; - operator[](j)[i] = false; - break; - } - case b_dominates_a : - { - operator[](i)[j] = false; - operator[](j)[i] = true; - break; - } - default : - { - operator[](i)[j] = false; - operator[](j)[i] = false; - } + operator[](i)[j] = true; + operator[](j)[i] = false; + } + else if (_pop[j].fitness() > _pop[i].fitness()) + { + operator[](i)[j] = false; + operator[](j)[i] = true; + } + else + { + operator[](i)[j] = false; + operator[](j)[i] = false; } } } @@ -215,63 +156,9 @@ class eoDominanceMap : public eoUF&, void>, public std::vect return result; } - /** - make a distinction between no domination (a better than b on one objective and worse on another) - and equality: a == b - */ - enum dom_res {a_dominates_b, b_dominates_a, no_domination, a_equals_b}; - - /** - a dominates b if it is better in one objective and not worse in any of the others - */ - dom_res dominates(typename EoType::Fitness a, typename EoType::Fitness b) - { - dom_res result = a_equals_b; - - for (unsigned i = 0; i < a.size(); ++i) - { - double aval = a[i]; - double bval = b[i]; - - if (!maximizes[i]) - { - aval = -aval; - bval = -bval; - } - - // check if unequal, in the case they're 'equal' just go to the next - if (fabs(aval - bval) > tol) - { - if (aval > bval) - { - if (result == b_dominates_a) - { - return no_domination; // when on another objective b dominated a, they do not dominate each other - } - // else continue comparing - - result = a_dominates_b; - } - else // bval > aval - { - if (result == a_dominates_b) - { - return no_domination; // done - } - - result = b_dominates_a; - } - } - } - - return result; - } - private : - vector maximizes; - double tol; vector fitness; }; diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 164593e65..4e4b210b0 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -62,6 +62,7 @@ public : bool operator<(const eoParetoFitness& _other) const { bool smaller = false; + double tol = FitnessTraits::tol(); const vector& performance = *this; const vector& otherperformance = _other; @@ -70,7 +71,7 @@ public : { bool maxim = FitnessTraits::maximizing(i); double aval = maxim? performance[i] : -performance[i]; - double bval = maxim? otherperformance[i] : otherperformance[i]; + double bval = maxim? otherperformance[i] : -otherperformance[i]; if (fabs(aval - bval) > tol) { diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index db944cbea..8aa8c05d3 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -7,6 +7,7 @@ using namespace std; +// Look: overloading the maximization without overhead (thing can be inlined) class MinimizingFitnessTraits : public eoParetoFitnessTraits { public : @@ -88,10 +89,7 @@ void the_main() unsigned pop_size = 100; eoPop pop(pop_size, init); - vector maximizes(2, false); // minimize both objectives - - // The dominance map needs to know how to compare - eoDominanceMap dominance(maximizes); + eoDominanceMap dominance; // Pareto ranking needs a dominance map //eoParetoRanking perf2worth(dominance); diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index ce7779180..bd3418cb9 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -17,5 +17,7 @@ dist : distdir : +check : + clean: for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done From 3c45141ba7d7d0042a4e8375e3637b41b8eaf7dc Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Mar 2001 14:09:55 +0000 Subject: [PATCH 0516/2134] Now look how perty t-eoPareto has become (though it doesn't do a proper mo modelling yet) --- eo/test/t-eoPareto.cpp | 97 ++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 37 deletions(-) diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 8aa8c05d3..15c5149e3 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -77,38 +77,75 @@ class Init : public eoInit } }; -// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well -void the_main() +template +eoPerf2Worth& make_perf2worth(eoParser& parser, eoState& state) +{ + eoDominanceMap& dominance = state.storeFunctor(new eoDominanceMap); + + unsigned what = parser.createParam(unsigned(0), "perf2worth", "worth mapping indicator : \n\t \ + 0: non_dominated sorting \n\t\ + 1: non_dominated sorting 2 \n\t\ + 2: simple ranking \n\t", 'w').value(); + + switch (what) + { + case 1 : return state.storeFunctor(new eoNDSorting_II(dominance)); + case 2 : return state.storeFunctor(new eoParetoRanking(dominance)); + } + //default + + if (what > 2) + { + cout << "Warning, need an integer < 3 for perf2worth" << endl; + // should actually set parser flag, but I don't care + } + + return state.storeFunctor(new eoNDSorting_I(dominance, 0.5)); +} + +template +eoSelectFromWorth& make_selector(eoParser& parser, eoState& state, eoPerf2Worth& perf2worth) +{ + unsigned tournamentsize = 2; + double stochtour = 0.95; + + switch (parser.createParam(unsigned(0), "selector", "Which selector (too lazy to explain: use the source)", 's').value()) + { + case 1 : return state.storeFunctor(new eoStochTournamentWorthSelect(perf2worth, stochtour)); + case 2 : return state.storeFunctor(new eoRouletteWorthSelect(perf2worth)); + } + // default + + return state.storeFunctor(new eoDetTournamentWorthSelect(perf2worth, tournamentsize)); +} + +// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well +void the_main(int argc, char* argv[]) { Init init; Eval eval; Mutate mutate; - unsigned num_gen = 10; - unsigned pop_size = 100; + eoParser parser(argc, argv); + eoState state; + + unsigned num_gen = parser.createParam(unsigned(10), "num_gen", "number of generations to run", 'g').value(); + unsigned pop_size = parser.createParam(unsigned(100), "pop_size", "population size", 'p').value(); eoPop pop(pop_size, init); - eoDominanceMap dominance; + // Look, a factory function + eoPerf2Worth& perf2worth = make_perf2worth(parser, state); - // Pareto ranking needs a dominance map - //eoParetoRanking perf2worth(dominance); - //eoNDSorting_I perf2worth(dominance, 0.5); - eoNDSorting_II perf2worth(dominance); - - // Three selectors - eoDetTournamentWorthSelect select1(perf2worth, 3); - eoStochTournamentWorthSelect select2(perf2worth, 0.95); - eoRouletteWorthSelect select3(perf2worth); + // Look: another factory function, now for selection + eoSelectFromWorth& select = make_selector(parser, state, perf2worth); // One general operator eoProportionalOp opsel; opsel.add(mutate, 1.0); - // Three breeders - eoGeneralBreeder breeder1(select1, opsel); - eoGeneralBreeder breeder2(select2, opsel); - eoGeneralBreeder breeder3(select3, opsel); + // the breeder + eoGeneralBreeder breeder(select, opsel); // replacement eoCommaReplacement replace; @@ -131,33 +168,19 @@ void the_main() snapshot.add(fitness0); snapshot.add(fitness1); - // Three algos - eoEasyEA ea1(cp, eval, breeder1, replace); - eoEasyEA ea2(cp, eval, breeder2, replace); - eoEasyEA ea3(cp, eval, breeder3, replace); + // the algo + eoEasyEA ea(cp, eval, breeder, replace); apply(eval, pop); - ea1(pop); - - apply(init, pop); - apply(eval, pop); - generation = 0; - - ea2(pop); - apply(init, pop); - apply(eval, pop); - generation = 0; - - ea3(pop); - + ea(pop); } -int main() +int main(int argc, char* argv[]) { try { - the_main(); + the_main(argc, argv); } catch (exception& e) { From 11cdd38f245c13ae6f2bc8a76b4d38f4fcaa2a25 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 16 Mar 2001 14:19:11 +0000 Subject: [PATCH 0517/2134] added help --- eo/test/t-eoPareto.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 15c5149e3..1057a12c6 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -171,6 +171,12 @@ void the_main(int argc, char* argv[]) // the algo eoEasyEA ea(cp, eval, breeder, replace); + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + return; + } + apply(eval, pop); ea(pop); } From 9bbac485f99064309cb31c21f963d12a47d966db Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 20 Mar 2001 14:34:07 +0000 Subject: [PATCH 0518/2134] Updated eoStat.h to also "do the right thing" when confronted with pareto style fitness --- eo/src/utils/eoMOFitnessStat.h | 4 + eo/src/utils/eoStat.h | 145 +++++++++++++++++++++++++++++---- 2 files changed, 134 insertions(+), 15 deletions(-) diff --git a/eo/src/utils/eoMOFitnessStat.h b/eo/src/utils/eoMOFitnessStat.h index 2c6b105ea..27b2d7041 100644 --- a/eo/src/utils/eoMOFitnessStat.h +++ b/eo/src/utils/eoMOFitnessStat.h @@ -64,10 +64,14 @@ public : virtual void operator()(const vector& _popPters) { value().resize(_popPters.size()); + for (unsigned i=0; i<_popPters.size(); i++) + { value()[i] = _popPters[i]->fitness()[objective]; + } } private: unsigned int objective; // The objective we're storing + }; #endif diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 7d06d8332..5877ab54c 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoStat.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,6 +30,8 @@ #include #include #include +#include // accumulate +#include /** Base class for all statistics that need to be calculated @@ -43,7 +45,7 @@ public: }; /** - The actual class that will be used as base for all statistics + The actual class that will be used as base for all statistics that need to be calculated over the (unsorted) population It is an eoStatBase AND an eoValueParam so it can be used in Monitors. */ @@ -65,7 +67,7 @@ public: }; /** - The actual class that will be used as base for all statistics + The actual class that will be used as base for all statistics that need to be calculated over the sorted population It's an eoSortedStatBase AND an eoValueParam so it can be used in Monitors. */ @@ -76,16 +78,16 @@ public : eoSortedStat(ParamType _value, std::string _desc) : eoValueParam(_value, _desc) {} }; -#include - /** - Average fitness of a population, fitness needs to be scalar. + Average fitness of a population, fitness can be a double, eoMinimizingFitness, eoMaximizingFitness or eoParetoFitness. + In the case of pareto optimization it will calculate the average of each objective. */ template -class eoAverageStat : public eoStat +class eoAverageStat : public eoStat { public : - eoAverageStat(std::string _description = "Average Fitness") : eoStat(0.0, _description) {} + typedef typename EOT::Fitness fitness_type; + eoAverageStat(std::string _description = "Average Fitness") : eoStat(fitness_type(), _description) {} static double sumFitness(double _sum, const EOT& _eot) { @@ -96,11 +98,36 @@ public : eoAverageStat(double _value, std::string _desc) : eoStat(_value, _desc) {} virtual void operator()(const eoPop& _pop) + { + doit(_pop, typename EOT::Fitness()); // specializations for scalar and vector + } +private : + + template + void doit(const eoPop& _pop, eoParetoFitness) + { + value().clear(); + value().resize(_pop[0].fitness().size(), 0.0); + + for (unsigned o = 0; o < value().size(); ++o) + { + for (unsigned i = 0; i < _pop.size(); ++i) + { + value()[o] += _pop[i].fitness()[o]; + } + + value()[o] /= _pop.size(); + } + } + + template + void doit(const eoPop& _pop, T) { double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness); value() = v / _pop.size(); } + }; /** @@ -125,7 +152,7 @@ public : virtual void operator()(const eoPop& _pop) { SquarePair result = std::accumulate(_pop.begin(), _pop.end(), std::make_pair(0.0, 0.0), eoSecondMomentStats::sumOfSquares); - + double n = _pop.size(); value().first = result.first / n; // average value().second = sqrt( (result.second - n * value().first * value().first) / (n - 1.0)); // stdev @@ -148,15 +175,58 @@ public : if (which > _pop.size()) throw logic_error("fitness requested of element outside of pop"); - value() = _pop[which]->fitness(); + doit(_pop, Fitness()); } private : + + struct CmpFitness + { + CmpFitness(unsigned _which, bool _maxim) : which(_which), maxim(_maxim) {} + + bool operator()(const EOT* a, const EOT* b) + { + if (maxim) + return a->fitness()[which] > b->fitness()[which]; + + return a->fitness()[which] < b->fitness()[which]; + } + + unsigned which; + bool maxim; + }; + + template + void doit(const eoPop& _pop, eoParetoFitness) + { + typedef typename EOT::Fitness::fitness_traits traits; + + value().resize(traits::nObjectives()); + + // copy of pointers, what the heck + vector tmp_pop = _pop; + + for (unsigned o = 0; o < value().size(); ++o) + { + vector::iterator nth = tmp_pop.begin() + which; + std::nth_element(tmp_pop.begin(), nth, tmp_pop.end(), CmpFitness(o, traits::maximizing(o))); + value()[o] = (*nth)->fitness()[o]; + } + } + + // for everything else + template + void doit(const vector& _pop, T) + { + value() = _pop[which]->fitness(); + } + + unsigned which; }; /* Actually, you shouldn't need to sort the population to get the best fitness - MS - 17/11/00 + MS - 17/11/00 template class eoBestFitnessStat : public eoStat @@ -164,7 +234,7 @@ class eoBestFitnessStat : public eoStat public : typedef typename EOT::Fitness Fitness; - eoBestFitnessStat(std::string _description = "Best Fitness") : + eoBestFitnessStat(std::string _description = "Best Fitness") : eoStat(Fitness(), _description) {} virtual void operator()(const eoPop& _pop) @@ -179,12 +249,57 @@ public : Best fitness in the population */ template -class eoBestFitnessStat : public eoNthElementFitnessStat +class eoBestFitnessStat : public eoStat { public : typedef typename EOT::Fitness Fitness; - - eoBestFitnessStat(std::string _description = "Best ") : eoNthElementFitnessStat(0, _description) {} + + eoBestFitnessStat(std::string _description = "Best ") : eoStat(typename EOT::Fitness(), _description) {} + + void operator()(const eoPop& _pop) + { + doit(_pop, typename EOT::Fitness()); + } + +private : + + struct CmpFitness + { + CmpFitness(unsigned _which, bool _maxim) : which(_which), maxim(_maxim) {} + + bool operator()(const EOT& a, const EOT& b) + { + if (maxim) + return a.fitness()[which] < b.fitness()[which]; + + return a.fitness()[which] > b.fitness()[which]; + } + + unsigned which; + bool maxim; + }; + + + template + void doit(const eoPop& _pop, eoParetoFitness) + { + typedef typename EOT::Fitness::fitness_traits traits; + value().resize(traits::nObjectives()); + + for (unsigned o = 0; o < traits::nObjectives(); ++o) + { + eoPop::const_iterator it = max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o))); + value()[o] = it->fitness()[o]; + } + } + + // default + template + void doit(const eoPop& _pop, T) + { // find the largest elements + value() = _pop.best_element().fitness(); + } + }; template From 665e20b0f8eaabb95e7fa9c64013829dfea73ce4 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 21 Mar 2001 10:55:22 +0000 Subject: [PATCH 0519/2134] Changed a few things in the eoPerf2Worth classes, EO.h and eoSelectOne.h are functionally unchanged --- eo/src/eo | 1 + eo/src/eoDominanceMap.h | 4 +- eo/src/eoLinearFitScaling.h | 6 +- eo/src/eoNDSorting.h | 130 +++++++++++++++--------- eo/src/eoParetoFitness.h | 37 ++++++- eo/src/eoParetoRanking.h | 18 +++- eo/src/eoPerf2Worth.h | 196 ++++++++++++++++++++++++++++++++++-- eo/src/eoPop.h | 2 +- eo/src/eoRanking.h | 10 +- eo/src/eoSelectOne.h | 13 +-- 10 files changed, 334 insertions(+), 83 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index bc8ed0684..d2df9d515 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -115,6 +115,7 @@ // Perf2Worth #include +#include // Algorithms #include diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index d19e57555..582501be6 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -93,12 +93,12 @@ class eoDominanceMap : public eoUF&, void>, public std::vect for (unsigned j = 0; j < i; ++j) { - if (_pop[i].fitness() > _pop[j].fitness()) + if (_pop[i].fitness().dominates(_pop[j].fitness())) { operator[](i)[j] = true; operator[](j)[i] = false; } - else if (_pop[j].fitness() > _pop[i].fitness()) + else if (_pop[j].fitness().dominates(_pop[i].fitness())) { operator[](i)[j] = false; operator[](j)[i] = true; diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h index b5c0d8aa1..424ebda7c 100644 --- a/eo/src/eoLinearFitScaling.h +++ b/eo/src/eoLinearFitScaling.h @@ -35,12 +35,12 @@ * with given selective pressure * Pselect(Best) == pressure/sizePop * Pselect(average) == 1.0/sizePop - * truncate negative values to 0 - + * truncate negative values to 0 - * * to be used within an eoSelectFromWorth object */ template -class eoLinearFitScaling : public eoPerf2Worth +class eoLinearFitScaling : public eoPerf2Worth // false: do not cache fitness { public: /* Ctor: @@ -50,7 +50,7 @@ public: eoLinearFitScaling(double _p=2.0): pressure(_p) {} - /* COmputes the ranked fitness: fitnesses range in [m,M] + /* COmputes the ranked fitness: fitnesses range in [m,M] with m=2-pressure/popSize and M=pressure/popSize. in between, the progression depends on exponent (linear if 1). */ diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 4b139060e..0193d8aad 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -29,7 +29,6 @@ #include #include -#include /** Non dominated sorting, it *is a* vector of doubles, the integer part is the rank (to which front it belongs), @@ -37,63 +36,88 @@ the bits. */ template -class eoNDSorting : public eoPerf2Worth +class eoNDSorting : public eoPerf2WorthCached { public : - eoNDSorting(eoDominanceMap& _dominanceMap) : - eoPerf2Worth(), dominanceMap(_dominanceMap) {} - /** Pure virtual function that calculates the 'distance' for each element to the current front Implement to create your own nondominated sorting algorithm. The size of the returned vector should be equal to the size of the current_front. */ virtual vector niche_penalty(const vector& current_front, const eoPop& _pop) = 0; - /// Do the work - void operator()(const eoPop& _pop) + /** implements fast nondominated sorting + */ + void calculate_worths(const eoPop& _pop) { - dominanceMap(_pop); - - vector excluded(_pop.size(), false); - value().resize(_pop.size()); - bool finished = false; + typedef typename EOT::Fitness::fitness_traits traits; - int dominance_level = 0; - - while(!finished) - { - vector ranks = dominanceMap.sum_dominators(); - - vector current_front; - current_front.reserve(_pop.size()); - - finished = true; + if (traits::nObjectives() == 1) + { // no need to do difficult sorting, for (unsigned i = 0; i < _pop.size(); ++i) { - if (excluded[i]) - { - continue; // next please - } + value()[i] = _pop[i].fitness()[0]; + } - if (ranks[i] < 1e-6) - {// it's part of the current front - excluded[i] = true; - current_front.push_back(i); - dominanceMap.remove(i); // remove from consideration - } - else + if (!traits::maximizing(0)) + { + for (unsigned i = 0; i < value().size(); ++i) { - finished = false; // we need another go + value()[i] = exp(-value()[i]); } } + return; + } + + vector > S(_pop.size()); // which individuals does guy i dominate + vector n(_pop.size(), 0); // how many individuals dominate guy i + + + for (unsigned i = 0; i < _pop.size(); ++i) + { + for (unsigned j = 0; j < _pop.size(); ++j) + { + if (_pop[i].fitness().dominates(_pop[j].fitness())) + { // i dominates j + S[i].push_back(j); // add j to i's domination list + + //n[j]++; // as i dominates j + } + else if (_pop[j].fitness().dominates(_pop[i].fitness())) + { // j dominates i, increment count for i, add i to the domination list of j + n[i]++; + + //S[j].push_back(i); + } + } + } + + vector current_front; + current_front.reserve(_pop.size()); + + // get the first front out + for (unsigned i = 0; i < _pop.size(); ++i) + { + if (n[i] == 0) + { + current_front.push_back(i); + } + } + + vector next_front; + next_front.reserve(_pop.size()); + + unsigned front_index = 0; // which front are we processing + while (!current_front.empty()) + { // Now we have the indices to the current front in current_front, do the niching vector niche_count = niche_penalty(current_front, _pop); + // Check whether the derived class was nice if (niche_count.size() != current_front.size()) { throw logic_error("eoNDSorting: niche and front should have the same size"); @@ -103,10 +127,28 @@ class eoNDSorting : public eoPerf2Worth for (unsigned i = 0; i < current_front.size(); ++i) { - value()[current_front[i]] = dominance_level + niche_count[i] / (max_niche + 1); + value()[current_front[i]] = front_index + niche_count[i] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next } - dominance_level++; // go to the next front + // Calculate which individuals are in the next front; + + for (unsigned i = 0; i < current_front.size(); ++i) + { + for (unsigned j = 0; j < S[current_front[i]].size(); ++j) + { + unsigned dominated_individual = S[current_front[i]][j]; + n[dominated_individual]--; // As we remove individual i -- being part of the current front -- it no longer dominates j + + if (n[dominated_individual] == 0) // it should be in the current front + { + next_front.push_back(dominated_individual); + } + } + } + + front_index++; // go to the next front + swap(current_front, next_front); // make the next front current + next_front.clear(); // clear it for the next iteration } // now all that's left to do is to transform lower rank into higher worth @@ -115,15 +157,10 @@ class eoNDSorting : public eoPerf2Worth for (unsigned i = 0; i < value().size(); ++i) { value()[i] = max_fitness - value()[i]; + assert(n[i] == 0); } } - - const eoDominanceMap& map() const; - - private : - - eoDominanceMap& dominanceMap; }; /** @@ -133,7 +170,7 @@ template class eoNDSorting_I : public eoNDSorting { public : - eoNDSorting_I(eoDominanceMap& _map, double _nicheSize) : eoNDSorting(_map), nicheSize(_nicheSize) {} + eoNDSorting_I(double _nicheSize) : eoNDSorting(), nicheSize(_nicheSize) {} vector niche_penalty(const vector& current_front, const eoPop& _pop) { @@ -182,7 +219,6 @@ template class eoNDSorting_II : public eoNDSorting { public: - eoNDSorting_II(eoDominanceMap& _map) : eoNDSorting(_map) {} typedef std::pair double_index_pair; @@ -222,9 +258,9 @@ class eoNDSorting_II : public eoNDSorting double max_dist = *max_element(nc.begin(), nc.end()); - // set boundary penalty at 0 (so it will get chosen over all the others - nc[performance[0].second] = 0; - nc[performance.back().second] = 0; + // set boundary at max_dist + 1 (so it will get chosen over all the others + nc[performance[0].second] = max_dist + 1; + nc[performance.back().second] = max_dist + 1; for (unsigned i = 0; i < nc.size(); ++i) { diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 4e4b210b0..37b20f7f4 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -56,12 +56,15 @@ class eoParetoFitness : public std::vector { public : + typedef FitnessTraits fitness_traits; + eoParetoFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} /// Partial order based on Pareto-dominance - bool operator<(const eoParetoFitness& _other) const + //bool operator<(const eoParetoFitness& _other) const + bool dominates(const eoParetoFitness& _other) const { - bool smaller = false; + bool dom = false; double tol = FitnessTraits::tol(); const vector& performance = *this; @@ -75,17 +78,41 @@ public : if (fabs(aval - bval) > tol) { - if (aval > bval) + if (aval < bval) { return false; // cannot dominate } // else aval < bval - smaller = true; // goto next objective + dom = true; // for the moment: goto next objective } //else they're equal in this objective, goto next } - return smaller; + return dom; + } + + /// compare *not* on dominance, but on the first, then the second, etc + bool operator<(const eoParetoFitness& _other) const + { + double tol = FitnessTraits::tol(); + const vector& performance = *this; + const vector& otherperformance = _other; + for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) + { + bool maxim = FitnessTraits::maximizing(i); + double aval = maxim? performance[i] : -performance[i]; + double bval = maxim? otherperformance[i] : -otherperformance[i]; + + if (fabs(aval-bval) > tol) + { + if (aval < bval) + return true; + + return false; + } + } + + return false; } bool operator>(const eoParetoFitness& _other) const diff --git a/eo/src/eoParetoRanking.h b/eo/src/eoParetoRanking.h index c73f1ef15..322c97ba1 100644 --- a/eo/src/eoParetoRanking.h +++ b/eo/src/eoParetoRanking.h @@ -37,17 +37,27 @@ on a single spot on the front. */ template -class eoParetoRanking : public eoPerf2Worth +class eoParetoRanking : public eoPerf2WorthCached { public : eoParetoRanking(eoDominanceMap& _dominanceMap) : - eoPerf2Worth(), dominanceMap(_dominanceMap) {} + eoPerf2WorthCached(), dominanceMap(_dominanceMap) {} - void operator()(const eoPop& _pop) + void calculate_worths(const eoPop& _pop) { dominanceMap(_pop); - value() = dominanceMap.sum_dominants(); + value() = dominanceMap.sum_dominators(); // get rank: 0 means part of current front + + // calculate maximum + double maxim = *max_element(value().begin(), value().end()); + + // higher is better, so invert the value + for (unsigned i = 0; i < value().size(); ++i) + { + value()[i] = maxim - value()[i]; + } + } private : diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index 3ad203581..21ea551a4 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoPerf2Worth.h + eoPerf2Worth.h (c) Maarten Keijzer, Marc Schoenauer, 2001 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,22 +27,198 @@ #ifndef eoPerf2Worth_h #define eoPerf2Worth_h -#include +#include +#include /** Base class to transform raw fitnesses into fitness for selection -It is an eoStat so -- it is updated inside a checkpoint (i.e. at start of every generation) -- it can be monitored or whatever else you wish through its value() - @see eoSelectFromWorth */ -template -class eoPerf2Worth : public eoStat > +template +class eoPerf2Worth : public eoUF&, void>, public eoValueParam > { public: - eoPerf2Worth(std::string _description = "Worths"):eoStat >(vector(0), + eoPerf2Worth(std::string _description = "Worths"):eoValueParam >(vector(0), _description) {} + + /** + Sort population according to worth, will keep the worths and fitness_cache in sync with the population. + */ + virtual void sort_pop(eoPop& _pop) + { // start with a vector of indices + vector indices(_pop.size()); + + for (unsigned i = 0; i < _pop.size();++i) + { // could use generate, but who cares + indices[i] = i; + } + + sort(indices.begin(), indices.end(), compare_worth(value())); + + eoPop tmp_pop; + tmp_pop.resize(_pop.size()); + vector tmp_worths(value().size()); + + for (unsigned i = 0; i < _pop.size(); ++i) + { + tmp_pop[i] = _pop[indices[i]]; + tmp_worths[i] = value()[indices[i]]; + } + + swap(_pop, tmp_pop); + swap(value(), tmp_worths); + } + + /** helper class used to sort indices into populations/worths + */ + class compare_worth + { + public : + compare_worth(const vector& _worths) : worths(_worths) {} + + bool operator()(unsigned a, unsigned b) const + { + return worths[b] < worths[a]; // sort in descending (!) order + } + + private : + + const vector& worths; + }; + + virtual void resize(eoPop& _pop, unsigned sz) + { + _pop.resize(sz); + value().resize(sz); + } + +}; + +/** +Perf2Worth with fitness cache +*/ +template +class eoPerf2WorthCached : public eoPerf2Worth +{ + public: + eoPerf2WorthCached(std::string _description = "Worths") : eoPerf2Worth(_description) {} + + + /** + Implementation of the operator(), updating a cache of fitnesses. Calls the virtual function + calculate_worths when one of the fitnesses has changed. It is not virtual, but derived classes + can remove the fitness caching trough the third template element + */ + void operator()(const eoPop& _pop) + { + if (fitness_cache.size() == _pop.size()) + { + bool in_sync = true; + for (unsigned i = 0; i < _pop.size(); ++i) + { + if (fitness_cache[i] != _pop[i].fitness()) + { + in_sync = false; + fitness_cache[i] = _pop[i].fitness(); + } + } + + if (in_sync) + { // worths are up to date + return; + } + } + else // just cache the fitness + { + fitness_cache.resize(_pop.size()); + for (unsigned i = 0; i < _pop.size(); ++i) + { + fitness_cache[i] = _pop[i].fitness(); + } + } + + // call derived implementation of perf2worth mapping + calculate_worths(_pop); + } + + /** The actual virtual function the derived classes should implement*/ + virtual void calculate_worths(const eoPop& _pop) = 0; + + /** + Sort population according to worth, will keep the worths and fitness_cache in sync with the population. + */ + virtual void sort_pop(eoPop& _pop) + { // start with a vector of indices + vector indices(_pop.size()); + + for (unsigned i = 0; i < _pop.size();++i) + { // could use generate, but who cares + indices[i] = i; + } + + sort(indices.begin(), indices.end(), eoPerf2Worth::compare_worth(value())); + + eoPop tmp_pop; + tmp_pop.resize(_pop.size()); + vector tmp_worths(value().size()); + vector tmp_cache(_pop.size()); + + for (unsigned i = 0; i < _pop.size(); ++i) + { + tmp_pop[i] = _pop[indices[i]]; + tmp_worths[i] = value()[indices[i]]; + + tmp_cache[i] = fitness_cache[indices[i]]; + } + + swap(_pop, tmp_pop); + swap(value(), tmp_worths); + swap(fitness_cache, tmp_cache); + } + + /** helper class used to sort indices into populations/worths + */ + class compare_worth + { + public : + compare_worth(const vector& _worths) : worths(_worths) {} + + bool operator()(unsigned a, unsigned b) const + { + return worths[b] < worths[a]; // sort in descending (!) order + } + + private : + + const vector& worths; + }; + + virtual void resize(eoPop& _pop, unsigned sz) + { + _pop.resize(sz); + value().resize(sz); + fitness_cache.resize(sz); + } + + private : + vector fitness_cache; +}; + +/** + A dummy perf2worth, just in case you need it +*/ +template +class eoNoPerf2Worth : public eoPerf2Worth +{ + public: + + // default behaviour, just copy fitnesses + void operator()(const eoPop& _pop) + { + value.resize(_pop.size()); + for (unsigned i = 0; i < _pop.size(); ++i) + value()[i]=_pop[i]; + } }; #endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 3634c21e7..8731258c5 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -42,7 +42,7 @@ some other thing that a vector, but if somebody thinks of it, this concrete implementation will be moved to "generic" and an abstract Population interface will be provided. -It can be instantiated with anything, provided that it accepts a "size" and a +It can be instantiated with anything, provided that it accepts a "size" and a random generator in the ctor. This happens to all the eo1d chromosomes declared so far. EOT must also have a copy ctor, since temporaries are created and copied to the population. diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index 37fd5f643..24edde2ed 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoRanking.h + eoRanking.h (c) Maarten Keijzer, Marc Schoenauer, 2001 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,12 +30,12 @@ #include /** An instance of eoPerfFromWorth - * COmputes the ranked fitness: fitnesses range in [m,M] + * COmputes the ranked fitness: fitnesses range in [m,M] * with m=2-pressure/popSize and M=pressure/popSize. * in between, the progression depends on exponent (linear if 1). */ template -class eoRanking : public eoPerf2Worth +class eoRanking : public eoPerf2Worth // false: do not cache fitness { public: /* Ctor: @@ -57,7 +57,7 @@ public: throw runtime_error("Not found in eoLinearRanking"); } - /* COmputes the ranked fitness: fitnesses range in [m,M] + /* COmputes the ranked fitness: fitnesses range in [m,M] with m=2-pressure/popSize and M=pressure/popSize. in between, the progression depends on exponent (linear if 1). */ diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index b6965580a..298570340 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -31,19 +31,20 @@ #include //----------------------------------------------------------------------------- -/** eoSelectOne selects only one element from a whole population. +/** eoSelectOne selects only one element from a whole population. Most selection techniques are simply repeated applications of eoSelectOne. - + @see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional */ -template +template class eoSelectOne : public eoUF&, const EOT&> { public : - - /// virtual function to setup some population stats (for instance eoProportional can benefit greatly from this) - virtual void setup(const eoPop&) {} + /// virtual function to setup some population stats (for instance eoProportional can benefit greatly from this) + virtual void setup(const eoPop& _pop) + {} }; + #endif From 3d82e6cddfd320b0c713ff4e88b2bd0f135b77bc Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 21 Mar 2001 11:08:27 +0000 Subject: [PATCH 0520/2134] Few changes in setting up the algorithms. It now gives an example of how to write factory functions --- eo/test/t-eoPareto.cpp | 61 +++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 1057a12c6..33e3de73d 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -31,8 +31,8 @@ class Mutate : public eoMonOp { for (unsigned i = 0; i < chromsize; ++i) { - if (rng.flip(1./10.)) - _eo.value[i] += rng.normal() * 0.05 * _eo.value[i]; + if (rng.flip(1./chromsize)) + _eo.value[i] += rng.normal() * 0.1 * _eo.value[i]; if (_eo.value[i] < minval) _eo.value[i] = minval; @@ -71,27 +71,61 @@ class Init : public eoInit { _eo.value[0] = rng.uniform(); + double range = maxval - minval; + for (unsigned i = 1; i < chromsize; ++i) - _eo.value[i] = rng.uniform() * 10. - 5; + _eo.value[i] = rng.uniform() * range + minval; _eo.invalidate(); } }; +// Trying out an elitist non-dominated sorted replacement scheme +template +class eoNDPlusReplacement : public eoReplacement +{ +public: + eoNDPlusReplacement(eoPerf2Worth& _perf2worth) : perf2worth(_perf2worth) {} + + struct WorthPair : public pair + { + bool operator<(const WorthPair& other) const { return other.first < first; } + }; + + void operator()(eoPop& _parents, eoPop& _offspring) + { + unsigned sz = _parents.size(); + _parents.reserve(_parents.size() + _offspring.size()); + copy(_offspring.begin(), _offspring.end(), back_inserter(_parents)); + + // calculate worths + perf2worth(_parents); + perf2worth.sort_pop(_parents); + perf2worth.resize(_parents, sz); + + _offspring.clear(); + } + +private : + eoPerf2Worth& perf2worth; +}; template eoPerf2Worth& make_perf2worth(eoParser& parser, eoState& state) { - eoDominanceMap& dominance = state.storeFunctor(new eoDominanceMap); - unsigned what = parser.createParam(unsigned(0), "perf2worth", "worth mapping indicator : \n\t \ + unsigned what = parser.createParam(unsigned(1), "perf2worth", "worth mapping indicator : \n\t \ 0: non_dominated sorting \n\t\ 1: non_dominated sorting 2 \n\t\ 2: simple ranking \n\t", 'w').value(); switch (what) { - case 1 : return state.storeFunctor(new eoNDSorting_II(dominance)); - case 2 : return state.storeFunctor(new eoParetoRanking(dominance)); + case 1 : return state.storeFunctor(new eoNDSorting_II()); + case 2 : + { + eoDominanceMap& dominance = state.storeFunctor(new eoDominanceMap); + return state.storeFunctor(new eoParetoRanking(dominance)); + } } //default @@ -101,19 +135,20 @@ eoPerf2Worth& make_perf2worth(eoParser& parser, eoState& state) // should actually set parser flag, but I don't care } - return state.storeFunctor(new eoNDSorting_I(dominance, 0.5)); + return state.storeFunctor(new eoNDSorting_I(0.5)); } template -eoSelectFromWorth& make_selector(eoParser& parser, eoState& state, eoPerf2Worth& perf2worth) +eoSelectOne& make_selector(eoParser& parser, eoState& state, eoPerf2Worth& perf2worth) { - unsigned tournamentsize = 2; - double stochtour = 0.95; + unsigned tournamentsize = parser.createParam(unsigned(2), "tournament_size", "Tournament Size", 't').value(); + double stochtour = parser.createParam(unsigned(0.95), "tournament_prob", "Probability in stochastic tournament").value(); switch (parser.createParam(unsigned(0), "selector", "Which selector (too lazy to explain: use the source)", 's').value()) { case 1 : return state.storeFunctor(new eoStochTournamentWorthSelect(perf2worth, stochtour)); case 2 : return state.storeFunctor(new eoRouletteWorthSelect(perf2worth)); + case 3 : return state.storeFunctor(new eoRandomSelect); } // default @@ -138,7 +173,7 @@ void the_main(int argc, char* argv[]) eoPerf2Worth& perf2worth = make_perf2worth(parser, state); // Look: another factory function, now for selection - eoSelectFromWorth& select = make_selector(parser, state, perf2worth); + eoSelectOne& select = make_selector(parser, state, perf2worth); // One general operator eoProportionalOp opsel; @@ -148,7 +183,7 @@ void the_main(int argc, char* argv[]) eoGeneralBreeder breeder(select, opsel); // replacement - eoCommaReplacement replace; + eoNDPlusReplacement replace(perf2worth); unsigned long generation = 0; eoGenContinue gen(num_gen, generation); From 6f6ce7d81a9546a7852cef57cfc281c7d10f7438 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 21 Mar 2001 11:09:29 +0000 Subject: [PATCH 0521/2134] test paretofitness class --- eo/test/t-eoParetoFitness.cpp | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 eo/test/t-eoParetoFitness.cpp diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp new file mode 100644 index 000000000..52c9c13e1 --- /dev/null +++ b/eo/test/t-eoParetoFitness.cpp @@ -0,0 +1,82 @@ +#include "eoParetoFitness.h" + +class MinimizingTraits : public eoParetoFitnessTraits +{ +public : + + static bool maximizing(int) { return false; } +}; + +int main() +{ + typedef eoParetoFitness<> MaxFitness; + typedef eoParetoFitness MinFitness; + + MaxFitness f0; + f0[0] = 0.0; + f0[1] = 1.0; + + MaxFitness f1; + f1[0] = 1.0; + f1[1] = 0.0; + + MaxFitness f2; + f2[0] = 0.0; + f2[1] = 0.5; + + // now f0 should dominate f2; + + if (!f0.dominates(f2)) + { + cout << f2 << " not dominated by " << f0; + throw; + } + + // f0 and f1 should not dominate each other + + if (f0.dominates(f1) || f1.dominates(f0)) + { + cout << f0 << " and " << f1 << " dominate"; + throw; + } + + if (! (f0 == f0)) + { + cout << "f0 == f0 failed" << endl; + throw; + } + + // test ctors and such + MaxFitness f3 = f0; + f3[0] += 1e-9; + + // test tolerance + assert(f3 == f0); + + MinFitness m0; + MinFitness m1; + MinFitness m2; + MinFitness m3; + + m0[0] = 0.0; + m0[1] = 1.0; + + m1[0] = 1.0; + m1[1] = 0.0; + + m2[0] = 0.0; + m2[1] = 0.5; + + m3[0] = 0.5; + m3[1] = 0.5; + + //m2 should dominate m0 + assert(m2.dominates(m0)); + + assert(!m1.dominates(m0)); + assert(!m0.dominates(m1)); + assert(!m0.dominates(m2)); // (m2 < m0)); + assert(m2.dominates(m3)); //m3 < m2); + assert(!m3.dominates(m2)); // (m2 < m3)); + assert(m2.dominates(m3)); //m2 > m3); +} \ No newline at end of file From 06dd2dc314f462b97224576cbcb7f09b90b632a9 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 21 Mar 2001 12:10:13 +0000 Subject: [PATCH 0522/2134] Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes --- eo/src/{obsolete => }/eoAtomMutation.h | 15 +++++++++------ eo/src/{obsolete => }/eoAtomMutator.h | 3 ++- eo/src/eoFunctor.h | 1 + eo/src/eoOp.h | 2 +- eo/src/eoSTLFunctor.h | 2 +- eo/src/eoVector.h | 11 ++++++++--- 6 files changed, 22 insertions(+), 12 deletions(-) rename eo/src/{obsolete => }/eoAtomMutation.h (84%) rename eo/src/{obsolete => }/eoAtomMutator.h (87%) diff --git a/eo/src/obsolete/eoAtomMutation.h b/eo/src/eoAtomMutation.h similarity index 84% rename from eo/src/obsolete/eoAtomMutation.h rename to eo/src/eoAtomMutation.h index 59266e3fb..dae8ff618 100644 --- a/eo/src/obsolete/eoAtomMutation.h +++ b/eo/src/eoAtomMutation.h @@ -19,7 +19,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ + + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Attic/eoAtomMutation.h,v 1.7 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ +*/ //----------------------------------------------------------------------------- #ifndef _EOATOMMUTATION_H #define _EOATOMMUTATION_H @@ -41,25 +43,26 @@ class eoAtomMutation: public eoMonOp { public: #ifdef _MSC_VER - typedef EOT::Type Type; + typedef EOT::AtomType Type; #else - typedef typename EOT::Type Type; + typedef typename EOT::AtomType Type; #endif /// - eoAtomMutation(const eoAtomMutator& _atomMut, const double _rate=0.0) + eoAtomMutation(eoAtomMutator& _atomMut, const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate), atomMutator( _atomMut ) {}; /// virtual ~eoAtomMutation() {}; /// - virtual void operator()( EOT& _eo ) const { + virtual bool operator()( EOT& _eo ) { typename EOT::iterator i; for ( i = _eo.begin(); i != _eo.end(); i ++ ) if ( rng.flip( rate ) ) { atomMutator( *i ); } + return true; } /** To print me on a stream. @@ -87,7 +90,7 @@ public: private: double rate; - const eoAtomMutator& atomMutator; + eoAtomMutator& atomMutator; }; diff --git a/eo/src/obsolete/eoAtomMutator.h b/eo/src/eoAtomMutator.h similarity index 87% rename from eo/src/obsolete/eoAtomMutator.h rename to eo/src/eoAtomMutator.h index ff4eedf4c..a143a55a3 100644 --- a/eo/src/obsolete/eoAtomMutator.h +++ b/eo/src/eoAtomMutator.h @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Attic/eoAtomMutator.h,v 1.4 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- #ifndef _EOATOMMUTATOR_H @@ -33,7 +34,7 @@ */ template -class eoAtomMutator: public eoUnaryFunctor {}; +class eoAtomMutator: public eoUF {}; #endif diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 01d96db76..ebce1279d 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -20,6 +20,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es mak@dhi.dk + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.5 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 607962f3f..e19867593 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.27 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -63,7 +64,6 @@ how to build them from a description in a file. */ template - class eoOp { public: diff --git a/eo/src/eoSTLFunctor.h b/eo/src/eoSTLFunctor.h index 682b4294b..74c206036 100644 --- a/eo/src/eoSTLFunctor.h +++ b/eo/src/eoSTLFunctor.h @@ -115,4 +115,4 @@ class eoSTLBF : public std::binary_function // TODO: put automated wrappers here... -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index d4e89e5bf..2be9e8e06 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -20,7 +20,10 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr - mak@dhi.dk + mak@dhi.dk + + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.9 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ + */ //----------------------------------------------------------------------------- @@ -32,9 +35,11 @@ /** Base class for fixed length chromosomes, just derives from EO and vector and - redirects the smaller than operator to EO (fitness based comparison) + redirects the smaller than operator to EO (fitness based comparison). GeneType + must have the following methods: void ctor (needed for the vector<>), copy ctor, + + */ - template class eoVector : public EO, public std::vector { From d8fe00183a02c15b76995bad88fea820c367e3dd Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 21 Mar 2001 13:09:47 +0000 Subject: [PATCH 0523/2134] Added a new atommutator to Variable Length, and corrected some headers which had problems --- eo/src/eoAtomMutation.h | 98 ------------------------------ eo/src/eoAtomMutator.h | 41 ------------- eo/src/eoVariableLengthCrossover.h | 1 + eo/src/eoVariableLengthMutation.h | 31 +++++++++- 4 files changed, 31 insertions(+), 140 deletions(-) delete mode 100644 eo/src/eoAtomMutation.h delete mode 100644 eo/src/eoAtomMutator.h diff --git a/eo/src/eoAtomMutation.h b/eo/src/eoAtomMutation.h deleted file mode 100644 index dae8ff618..000000000 --- a/eo/src/eoAtomMutation.h +++ /dev/null @@ -1,98 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomMutation.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - - CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Attic/eoAtomMutation.h,v 1.7 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ -*/ -//----------------------------------------------------------------------------- -#ifndef _EOATOMMUTATION_H -#define _EOATOMMUTATION_H - -// STL includes -#include - -// EO includes -#include -#include -#include - -/** Atomic mutation of an EO. Acts on containers, and applies a mutation - operator to each element of the container with some probability. EOT must - be a container of any type -*/ -template -class eoAtomMutation: public eoMonOp { -public: - -#ifdef _MSC_VER - typedef EOT::AtomType Type; -#else - typedef typename EOT::AtomType Type; -#endif - - /// - eoAtomMutation(eoAtomMutator& _atomMut, const double _rate=0.0) - : eoMonOp< EOT >(), rate(_rate), atomMutator( _atomMut ) {}; - - /// - virtual ~eoAtomMutation() {}; - - /// - virtual bool operator()( EOT& _eo ) { - typename EOT::iterator i; - for ( i = _eo.begin(); i != _eo.end(); i ++ ) - if ( rng.flip( rate ) ) { - atomMutator( *i ); - } - return true; - } - - /** To print me on a stream. - @param os The ostream. - */ - void printOn(ostream& os) const { - os << rate ; - } - - /** To read me from a stream. - @param is The istream */ - void readFrom(istream& is) { - is >> rate ; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - string className() const {return "eoMutation";}; - //@} - -private: - - double rate; - eoAtomMutator& atomMutator; -}; - - -#endif - diff --git a/eo/src/eoAtomMutator.h b/eo/src/eoAtomMutator.h deleted file mode 100644 index a143a55a3..000000000 --- a/eo/src/eoAtomMutator.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomMutator.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Attic/eoAtomMutator.h,v 1.4 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMMUTATOR_H -#define _EOATOMMUTATOR_H - -#include - -/** Abstract base class for functors that modify a single element in an EO - that is composed of several atomic components. An atom would, for instance, flip - a bit, or change a real number, or things like that. The header is completely - empty and thus just provides a name rather than functionality. -*/ - -template -class eoAtomMutator: public eoUF {}; - - -#endif - diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 7d8da085f..be7d4b888 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -21,6 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk + CVS Info: $Date: 2001-03-21 13:09:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.5 2001-03-21 13:09:47 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 6bea7d118..2a2d87d35 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -21,6 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk + CVS Info: $Date: 2001-03-21 13:09:47 $ $Version$ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -28,8 +29,8 @@ #define _eoVariableLengthMutation_h #include -#include #include +#include /** Base classes for generic mutations on variable length chromosomes. @@ -64,6 +65,34 @@ private: eoMonOp & atomMutation; }; +/** THis ones applies its atomic mutation depending on a probability + */ +template +class eoVlRateMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires an Atom mutation + eoVlRateMutation(eoMonOp & _atomMutation, double _rate=0.0) : + atomMutation(_atomMutation), rate( _rate ) {} + + bool operator()(EOT & _eo) + { + bool modified=false; + typename EOT::iterator i; + for ( i = _eo.begin(); i != _eo.end(); i ++ ) + if ( rng.flip( rate ) ) { + modified |= atomMutation( *i ); + } + return modified; + } +private: + double rate; + eoMonOp & atomMutation; +}; + /** This ones applies its atomic mutation to a fixed number of genes (1 by default) */ From 8ff63ff776a2ce01fbcb340322b456db715056e3 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 21 Mar 2001 13:35:10 +0000 Subject: [PATCH 0524/2134] Added a new xover to varlenxover --- eo/src/eoVariableLengthCrossover.h | 32 +++++++++++++++++++++++++++++- eo/src/utils/eoParser.h | 2 +- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index be7d4b888..304583a20 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-03-21 13:09:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.5 2001-03-21 13:09:47 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2001-03-21 13:35:09 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.6 2001-03-21 13:35:09 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -147,6 +147,36 @@ private: unsigned Min, Max; eoAtomExchange & atomExchange; }; +/** Exchange Crossover using an AtomExchange + */ + +template +class eoInnerExchangeQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires bounds on number of genes + a rate + eoInnerExchangeQuadOp( eoQuadOp& _op, float _rate = 0.5): + op(_op), rate( _rate ) {} + + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned size1 = _eo1.size(), size2 = _eo2.size(), minsize = ( size1 > size2)?size2:size1; + bool changed = false; + for ( unsigned i = 0; i < minsize; i ++ ) { + if ( rng.flip( rate ) ) { + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; + } + } + return changed; // should we test that? Yes, but no time now + } +private: + float rate; + eoQuadOp & op; +}; diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 2127eb6a6..7edf8e935 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2001-02-13 22:35:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoParser.h,v 1.7 2001-02-13 22:35:07 jmerelo Exp $ $Author: jmerelo $ $Log$ +CVS Info: $Date: 2001-03-21 13:35:10 $ $Version$ $Author: jmerelo $ */ #ifndef eoParser_h #define eoParser_h From 0f243e4d92d856d71f80df8d7a522460223bc91f Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 22 Mar 2001 09:00:30 +0000 Subject: [PATCH 0525/2134] temporarily added fitness_traits to keep people up to date with this proposal --- eo/test/fitness_traits.cpp | 429 +++++++++++++++++++++++++++++++++++++ 1 file changed, 429 insertions(+) create mode 100644 eo/test/fitness_traits.cpp diff --git a/eo/test/fitness_traits.cpp b/eo/test/fitness_traits.cpp new file mode 100644 index 000000000..4fad95c47 --- /dev/null +++ b/eo/test/fitness_traits.cpp @@ -0,0 +1,429 @@ +#include // for pair +#include +#include +#include +#include +#include // for exp + +using namespace std; + +/* fitness_traits.h */ + +// default traits: defaults to a double that needs to be maximized +template +struct fitness_traits +{ + // Needs mapping can be used to figure out whether you need to do fitness scaling (or not) + const static bool needs_mapping = false; + + // storage_type: what to store next to the genotype + typedef T storage_type; + + // performance_type: what the eoEvalFunc calculates + typedef T performance_type; + + // worth_type: what the scaling function does + typedef T worth_type; + + // access_performance: how to get from what is stored to a mutable performance + static performance_type& access_performance(storage_type& a) { return a; } + + // access_worth: how to get from what is stored to a mutable worth + static worth_type& access_worth(storage_type& a) { return a; } + + // get_performance: from storage_type to a performance figure + static performance_type get_performance(storage_type a) { return a; } + + // get_worth: from storage_type to a worth figure + static worth_type get_worth(storage_type a) { return a; } + + // get the fitness out of the individual + template + static worth_type get_fitness(const EOT& _eo) { return _eo.performance(); } + + // compare the two individuals + template + static bool is_better(const EOT& _eo1, const EOT& _eo2) + { + return _eo1.performance() > _eo2.performance(); + } +}; + +struct minimization {}; +struct maximization {}; + +struct fitness_traits : public fitness_traits +{ + // for minimization, invert the is_better + template + static bool is_better(const EOT& _eo1, const EOT& _eo2) + { + return _eo1.performance() < _eo2.performance(); + } +}; + +// for maximization, just take the default behaviour +struct fitness_traits : public fitness_traits {}; + +// forward declaration +//template class eoPop; +//template class EO; + +// unfortunately, partial template specialization is not approved by Microsoft (though ANSI says it's ok) +// Probably need some macro-magic to make this work (MicroSoft == MacroHard) +// A pair class: first == performance, second == worth, redefine all types, data and functions +template +struct fitness_traits< pair > +{ + typedef pair storage_type; + typedef Performance performance_type; + typedef Worth worth_type; + + const static bool needs_mapping = true; + + static performance_type& access_performance(storage_type& a) { return a.first; } + static worth_type& access_worth(storage_type& a) { return a.second; } + + static performance_type get_performance(const storage_type& a) { return a.first; } + static worth_type get_worth(const storage_type& a) { return a.second; } + + // This function calls _eo.worth() which in turn checks the fitness flag and calls get_worth above + // The compiler should be able to inline all these calls and come up with a very compact solution + template + static worth_type get_fitness(const EOT& _eo) { return _eo.worth(); } + + template + static bool is_better(const EOT& _eo1, const EOT& _eo2) + { + return _eo1.worth() > _eo2.worth(); + } +}; + +/* end fitness_traits.h */ + +/* EO.h */ + +template > +class EO +{ +public : + + typedef Traits fitness_traits; + typedef typename Traits::storage_type storage_type; + typedef typename Traits::performance_type performance_type; + typedef typename Traits::worth_type worth_type; + + EO() : valid_performance(false), valid_worth(false), rep_fitness() {} + + // for backwards compatibility + void fitness(performance_type perf) + { + performance(perf); + } + + void performance(performance_type perf) + { + valid_performance = true; + Traits::access_performance(rep_fitness) = perf; + } + + performance_type performance(void) const + { + if(!valid_performance) throw runtime_error("no performance"); + return Traits::get_performance(rep_fitness); + } + + void worth(worth_type worth) + { + valid_worth = true; + Traits::access_worth(rep_fitness) = worth; + } + + worth_type worth(void) const + { + if(!valid_worth) throw runtime_error("no worth"); + if(!Traits::needs_mapping) throw runtime_error("no mapping"); + return Traits::get_worth(rep_fitness); + } + + worth_type fitness(void) const + { + return Traits::get_fitness(*this); + } + + void invalidate(void) + { + valid_performance = false; + valid_worth = false; + } + + void invalidate_worth(void) + { + valid_worth = false; + } + + bool operator<(const EO& other) const + { + return !Traits::is_better(other, *this); + } + + bool operator>(const EO& other) const + { + return Traits::is_better(other, *this); + } + + private : + + bool valid_performance; + bool valid_worth; + storage_type rep_fitness; +}; + +/* end EO.h */ + +/* eoPerf2Worth.h */ + +// get the name known +template class eoPop; + +template +void exponential_scaling(eoPop& _pop) +{ + for (unsigned i = 0; i < _pop.size(); ++i) + { // change minimimization into maximization + _pop[i].worth(exp(-_pop[i].performance())); + } +} + +template +class eoPerf2Worth /* : public eoUF&, void> */ +{ +public : + virtual void operator()(eoPop& _pop) + { + return exponential_scaling(_pop); + } +}; + +/* end eoPerf2Worth.h */ + + +/* eoPop.h */ + +template +class eoPop : public vector +{ +public : + + typedef typename EOT::fitness_traits fitness_traits; + + eoPop(void) : p2w(0) {} + + void sort() + { + scale(); // get the worths up to date + + std::sort(begin(), end(), greater()); + } + + void scale() + { + if (p2w) + { + if (!fitness_traits::needs_mapping) + { + throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined"); + } + + (*p2w)(*this); + } + else if (fitness_traits::needs_mapping) + { + throw runtime_error("eoPop: no scaling function attached to the population, while one was certainly called for"); + } + } + + void setPerf2Worth(eoPerf2Worth& _p2w) + { + p2w = &_p2w; + } + + void setPerf2Worth(eoPerf2Worth* _p2w) + { + p2w = _p2w; + } + + eoPerf2Worth* getPerf2Worth() { return p2w; } + + void swap(eoPop& other) + { + vector::swap(other); + eoPerf2Worth* tmp = p2w; + p2w = other.p2w; + other.p2w = tmp; + } + +private : + + // a pointer as it can be emtpy + eoPerf2Worth* p2w; +}; + +// need this one to be able to swap the members as well... +template +void swap(eoPop& _p1, eoPop& _p2) +{ + _p1.swap(_p2); +} + +/* end eoPop.h */ + +/* main and test */ + +template +void algo(eoPop& _pop) +{ + eoPop offspring; // how to get the scaling info into this guy?? + offspring.setPerf2Worth(_pop.getPerf2Worth()); // like this! + + copy(_pop.begin(), _pop.end(), back_inserter(offspring)); + + offspring.sort(); // should call scale + + swap(_pop, offspring); +} + +void minimization_test() +{ + typedef EO eo_type; + + eo_type eo1; + eo_type eo2; + + eo1.performance(1.0); + eo2.performance(2.0); + + cout << "With minimizing fitness" << endl; + cout << eo1.fitness() << " < " << eo2.fitness() << " returns " << (eo1 < eo2) << endl; + cout << eo2.fitness() << " < " << eo1.fitness() << " returns " << (eo2 < eo1) << endl; +} + +void the_main() +{ + typedef EO simple_eo; + typedef EO > scaled_eo; + + simple_eo eo1; + simple_eo eo3; + +/* First test some simple comparisons */ + + eo1.fitness(10); // could also use performance() + eo3.fitness(5); + + cout << eo1.fitness() << endl; + cout << eo3.fitness() << endl; + + cout << "eo1 < eo3 = " << (eo1 < eo3) << endl; + + + scaled_eo eo2; + scaled_eo eo4; + eo2.performance(10); + eo4.performance(8); + +/* Now test if the worth gets accessed and if the flag protects it */ + + try + { + cout << eo2.fitness() << endl; + cout << "did not throw" << endl; + assert(false); // should throw + } + catch(exception& e) + { + cout << "Fitness threw exception, as it should" << endl; + cout << e.what() << endl; + } + +/* Set the worth and all is well (this is normally done by some perf2worth functor */ + + eo2.worth(3); + eo4.worth(5); + + cout << "with maximization " << endl; + cout << eo2.fitness() << endl; + cout << eo4.fitness() << endl; + cout << eo2.fitness() << " < " << eo4.fitness() << " returns " << (eo2 < eo4) << endl; + +/* Test the minimization of fitness */ + minimization_test(); + + +/* Populations */ + +// test pop without scaling, should have no overhead save for a single empty pointer in pop + eoPop pop0; + pop0.resize(1); + pop0[0].fitness(1); + + algo(pop0); + + cout << pop0[0].fitness() << endl; + + assert(pop0[0].fitness() == 1); + +/* test pop with scaling */ + + eoPerf2Worth perf2worth; + eoPop pop1; + + pop1.resize(1); + + pop1[0].fitness(1.0); // emulate evaluation + + // at this point getting the fitness should throw + try + { + cout << pop1[0].fitness() << endl; + cout << "did not throw" << endl; + assert(false); // should throw + } + catch(exception& e) + { + cout << "Fitness threw exception, as it should" << endl; + cout << e.what() << endl; + } + + // at this point trying to scale should throw + try + { + algo(pop1); // should complain that it cannot scale + assert(false); // so it would never get here + } + catch(exception& e) + { // but rather ends here + cout << e.what() << endl; + } + + // ok, now set the scaling + pop1.set_scalef(perf2worth); + + algo(pop1); + + cout << "the fitness has been transformed from " << pop1[0].performance() << " to exp(-1) = " << pop1[0].fitness() << endl; +} + +int main() +{ + try + { + the_main(); + } + catch(exception& e) + { + cout << e.what() << endl; + } +} + + From 94f0558d43ca9426cee7f443c64a6d0d8d1c7058 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 22 Mar 2001 10:51:16 +0000 Subject: [PATCH 0526/2134] Changed the single objective shortcut calculation --- eo/src/eoNDSorting.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 0193d8aad..b836f9caf 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -48,6 +48,11 @@ class eoNDSorting : public eoPerf2WorthCached /** implements fast nondominated sorting */ + class DummyEO : public EO + { + public: unsigned index; + }; + void calculate_worths(const eoPop& _pop) { value().resize(_pop.size()); @@ -57,17 +62,23 @@ class eoNDSorting : public eoPerf2WorthCached if (traits::nObjectives() == 1) { // no need to do difficult sorting, + eoPop tmp_pop; + tmp_pop.resize(_pop.size()); + + // copy pop to dummy population (only need the fitnesses) for (unsigned i = 0; i < _pop.size(); ++i) { - value()[i] = _pop[i].fitness()[0]; + tmp_pop[i].fitness(_pop[i].fitness()); + tmp_pop[i].index = i; } - if (!traits::maximizing(0)) + // sort it + tmp_pop.sort(); + + // + for (unsigned i = 0; i < _pop.size(); ++i) { - for (unsigned i = 0; i < value().size(); ++i) - { - value()[i] = exp(-value()[i]); - } + value()[tmp_pop[i].index] = _pop.size() - i; // set rank } return; @@ -159,7 +170,6 @@ class eoNDSorting : public eoPerf2WorthCached value()[i] = max_fitness - value()[i]; assert(n[i] == 0); } - } }; From efd02fa4b603e6baa0643affee906c119ddeb71c Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 22 Mar 2001 11:22:31 +0000 Subject: [PATCH 0527/2134] oops --- eo/test/fitness_traits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/fitness_traits.cpp b/eo/test/fitness_traits.cpp index 4fad95c47..38c451bc1 100644 --- a/eo/test/fitness_traits.cpp +++ b/eo/test/fitness_traits.cpp @@ -407,7 +407,7 @@ void the_main() } // ok, now set the scaling - pop1.set_scalef(perf2worth); + pop1.setPerf2Worth(perf2worth); algo(pop1); From d139d2df644496ce8d94de3bdb282f40bfcd68f1 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 22 Mar 2001 16:23:56 +0000 Subject: [PATCH 0528/2134] updated project number --- eo/doc/eo.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 19e35db3f..7dd8cc709 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -20,7 +20,7 @@ PROJECT_NAME = EO # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.9.0 +PROJECT_NUMBER = 0.9.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. From 65b1e9d2b6e0cf1078b4c399046c4d77d813b7a0 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 23 Mar 2001 08:53:48 +0000 Subject: [PATCH 0529/2134] added --- eo/doc/index.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eo/doc/index.h diff --git a/eo/doc/index.h b/eo/doc/index.h new file mode 100644 index 000000000..a138ee18e --- /dev/null +++ b/eo/doc/index.h @@ -0,0 +1,15 @@ + +/*! \mainpage Welcome to Evolving Objects + + \section intro Introduction + +This index page is under construction. Who wants to fill it in? + + \section install Installation + +Installing the package. + + \section design Overall Design + + + */ From b5bbc729579007734aaf38f82b3f514e1e3857b2 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 23 Mar 2001 08:54:31 +0000 Subject: [PATCH 0530/2134] let doxygen look into this dir --- eo/doc/eo.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 7dd8cc709..49b1efdc1 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -195,7 +195,7 @@ TAB_SIZE = 8 # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../src +INPUT = ../src . # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp From a1508b75a28e3d7c0c6175d6168665b853c6e929 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 23 Mar 2001 12:24:39 +0000 Subject: [PATCH 0531/2134] added test for printing population --- eo/test/t-eobin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index cdc29c09f..75c7d3258 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -156,13 +156,15 @@ void main_function() eoInitFixedLength init(16, gen); eoPop pop(100, init); - + apply(eval, pop); - + sga(pop); pop.sort(); + cout << "Population " << pop << endl; + cout << "\nBest: " << pop[0].fitness() << '\n'; /* From ebca71e228614aa2b9e2334ffdba91fd47eca041 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 26 Mar 2001 10:09:40 +0000 Subject: [PATCH 0532/2134] NDSorting: changed exact ranking values to make check for front easier eoRNG: changed nothing (did some debugging) --- eo/src/eoNDSorting.h | 12 ++++++++ eo/src/utils/eoRNG.h | 72 +++++++++++++++++++++++--------------------- 2 files changed, 49 insertions(+), 35 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index b836f9caf..56be9077d 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -119,6 +119,8 @@ class eoNDSorting : public eoPerf2WorthCached } } + unsigned first_front_size = current_front.size(); + vector next_front; next_front.reserve(_pop.size()); @@ -165,11 +167,21 @@ class eoNDSorting : public eoPerf2WorthCached // now all that's left to do is to transform lower rank into higher worth double max_fitness = *std::max_element(value().begin(), value().end()); + // but make sure it's an integer upper bound, so that all ranks inside the highest integer are the front + max_fitness = ceil(max_fitness); + + unsigned nfirst = 0; + for (unsigned i = 0; i < value().size(); ++i) { value()[i] = max_fitness - value()[i]; assert(n[i] == 0); + + if (value()[i] > (max_fitness-1)) // this would be the test for 'front_ness' + nfirst++; } + + assert(nfirst == first_front_size); } }; diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 027da5d53..d92549852 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -116,21 +116,21 @@ public : eoRng(uint32 s) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { state = new uint32[N+1]; initialize(s); - } - + } + ~eoRng(void) { delete [] state; } - + /** Re-initializes the Random Number Generator. */ - void reseed(uint32 s) - { - initialize(s); + void reseed(uint32 s) + { + initialize(s); } - + /** uniform(m = 1.0) returns a random double in the range [0, m) */ @@ -146,7 +146,7 @@ public : { return uint32(uniform() * double(m)); } - + /** flip() tosses a biased coin such that flip(x/100.0) will returns true x% of the time @@ -160,7 +160,7 @@ public : normal() zero mean gaussian deviate with standard deviation of 1 */ double normal(void); // gaussian mutation, stdev 1 - + /** normal(stdev) zero mean gaussian deviate with user defined standard deviation */ @@ -193,10 +193,10 @@ public : /** rand_max() the maximum returned by rand() */ - uint32 rand_max(void) const { return (uint32) 0xffffffff; } + uint32 rand_max(void) const { return (uint32) 0xffffffff; } /** - roulette_wheel(vec, total = 0) does a roulette wheel selection + roulette_wheel(vec, total = 0) does a roulette wheel selection on the input vector vec. If the total is not supplied, it is calculated. It returns an integer denoting the selected argument. */ @@ -210,14 +210,14 @@ public : } float change = uniform() * total; - + int i = 0; - + while (change > 0) { change -= vec[i++]; } - + return --i; } @@ -231,7 +231,7 @@ public : _os << int(next - state) << ' '; _os << left << ' ' << cached << ' ' << cacheValue; } - + /// void readFrom(istream& _is) { @@ -239,11 +239,11 @@ public : { _is >> state[i]; } - + int n; _is >> n; next = state + n; - + _is >> left; _is >> cached; _is >> cacheValue; @@ -254,18 +254,20 @@ public : private : uint32 restart(void); void initialize(uint32 seed); - - uint32* state; // the array for the state + + uint32* state; // the array for the state uint32* next; - int left; - + int left; + + // for normal distribution bool cached; float cacheValue; - + const int N; const int M; const uint32 K; // a magic constant + /** Private copy ctor and assignment operator to make sure that nobody accidentally copies the random number generator. @@ -344,10 +346,10 @@ inline void eoRng::initialize(uint32 seed) // left = -1; - + register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = state; register int j; - + for(left=0, *s++=x, j=N; --j; *s++ = (x*=69069U) & 0xFFFFFFFFU); } @@ -357,15 +359,15 @@ inline uint32 eoRng::restart(void) { register uint32 *p0=state, *p2=state+2, *pM=state+M, s0, s1; register int j; - + left=N-1, next=state+1; - + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - + for(pM=state, j=M; --j; s0=s1, s1=*p2++) *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); - + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); s1 ^= (s1 >> 11); s1 ^= (s1 << 7) & 0x9D2C5680U; @@ -373,14 +375,14 @@ inline uint32 eoRng::restart(void) return(s1 ^ (s1 >> 18)); } - inline uint32 eoRng::rand(void) { + uint32 y; - + if(--left < 0) return(restart()); - + y = *next++; y ^= (y >> 11); y ^= (y << 7) & 0x9D2C5680U; @@ -389,20 +391,20 @@ inline uint32 eoRng::rand(void) } inline double eoRng::normal(void) -{ +{ if (cached) { cached = false; return cacheValue; } - + float rSquare, factor, var1, var2; - + do { var1 = 2.0 * uniform() - 1.0; var2 = 2.0 * uniform() - 1.0; - + rSquare = var1 * var1 + var2 * var2; } while (rSquare >= 1.0 || rSquare == 0.0); From 1726a068612065ff8b742777bfc7835e35646a1d Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 27 Mar 2001 16:02:00 +0000 Subject: [PATCH 0533/2134] Adding Maarten's "snippet" to dump the whole pop to the screen: eoPopStat.h Modified utils/checkpointing accordingly. Tested in tutorial/Lesson3/exercise3.1 BTW, the eoFileSnapShot does not work any more - I've commented it out and will look at that later... --- eo/src/utils/checkpointing | 29 +++---- eo/src/utils/eoPopStat.h | 117 ++++++++++++++++++++++++++++ eo/tutorial/Lesson3/exercise3.1.cpp | 9 ++- 3 files changed, 139 insertions(+), 16 deletions(-) create mode 100644 eo/src/utils/eoPopStat.h diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 8af4df768..e570183ad 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -1,15 +1,16 @@ -#include -#include -#include -#include -#include -#include -#ifndef _MSC_VER -#include -#include -#endif -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include +#include +#endif +#include +#include +#include +#include #include +#include \ No newline at end of file diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h new file mode 100644 index 000000000..9c7dc0769 --- /dev/null +++ b/eo/src/utils/eoPopStat.h @@ -0,0 +1,117 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPopStat.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** WARNING: this file contains 2 classes: + +eoPopString and eoSortedPopString + +that transform the population into a string +that can be used to dump to the screen +*/ + +#ifndef _eoPopStat_h +#define _eoPopStat_h + +#include + + +/** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats. +This snippet is a workaround: +This class will "print" a whole population into a string - that you can later +send to any stream +This is the plain version - see eoPopString for the Sorted version + +Note: this Stat should probably be used only within eoStdOutMonitor, and not +inside an eoFileMonitor, as the eoState construct will work much better there. +*/ +template +class eoPopString : public eoStat +{ +public : + /** default Ctor, void string by default, as it appears + on the description line once at beginning of evolution. and + is meaningless there */ + eoPopString(string _desc ="") : eoStat("", _desc) {} + +/** Fills the value() of the eoParam with the dump of the population. +Adds a \n before so it does not get mixed up with the rest of the stats +that are written by the monitor it is probably used from. +*/ +void operator()(const eoPop& _pop) +{ + char buffer[1023]; // about one K of space per member + value() = "\n====== Pop dump =====\n"; + for (unsigned i = 0; i < _pop.size(); ++i) + { + std::ostrstream os(buffer, 1022); // leave space for emergency terminate + os << _pop[i] << endl << ends; + + // paranoid: + buffer[1022] = '\0'; + value() += buffer; + } +} +}; + +/** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats. +This snippet is a workaround: +This class will "print" a whole population into a string - that you can later +send to any stream +This is the Sorted version - see eoPopString for the plain version + +Note: this Stat should probably be used only within eoStdOutMonitor, and not +inside an eoFileMonitor, as the eoState construct will work much better there. +*/ +template +class eoSortedPopString : public eoSortedStat +{ +public : + /** default Ctor, void string by default, as it appears + on the description line once at beginning of evolution. and + is meaningless there */ + eoSortedPopString(string _desc ="") : eoSortedStat("", _desc) {} + +/** Fills the value() of the eoParam with the dump of the population. +Adds a \n before so it does not get mixed up with the rest of the stats +that are written by the monitor it is probably used from. +*/ +void operator()(const vector& _pop) +{ + char buffer[1023]; // about one K of space per member + value() = "\n====== Pop dump =====\n"; + for (unsigned i = 0; i < _pop.size(); ++i) + { + std::ostrstream os(buffer, 1022); // leave space for emergency terminate + os << *_pop[i] << endl << ends; + + // paranoid: + buffer[1022] = '\0'; + value() += buffer; + } +} +}; + +#endif diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index e80b43ede..3079ed126 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -292,6 +292,11 @@ void main_function(int argc, char **argv) monitor.add(SecondStat); monitor.add(fdcStat); + // test de eoPopStat + eoPopString popStat("Dump of whole population"); + checkpoint.add(popStat); + monitor.add(popStat); + // A file monitor: will print parameters to ... a File, yes, you got it! eoFileMonitor fileMonitor("stats.xg", " "); // and an eoGnuplot1DMonitor will 1-print to a file, and 2- plot on screen @@ -312,7 +317,7 @@ void main_function(int argc, char **argv) // send a scaling command to gnuplot gnuMonitor.gnuplotCommand("set yrange [0:500]"); - + /* // a specific plot monitor for FDC // first into a file (it adds everything ti itself eoFDCFileSnapshot fdcFileSnapshot(fdcStat); @@ -332,7 +337,7 @@ void main_function(int argc, char **argv) fitSnapshot.add(fitStat); // and of course add it to the checkpoint checkpoint.add(fitSnapshot); - + */ // Last type of item the eoCheckpoint can handle: state savers: eoState outState; // Register the algorithm into the state (so it has something to save!!) From 434010d221a21f24d1b19573f8d78719383ccb09 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 27 Mar 2001 16:27:15 +0000 Subject: [PATCH 0534/2134] Modified the names in eoPopStat! Hoever, the way it's done now, the string gets TRUNCATED - and I dont' know why --- eo/src/utils/eoPopStat.h | 8 ++++---- eo/tutorial/Lesson3/exercise3.1.cpp | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 9c7dc0769..23708e170 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -48,13 +48,13 @@ Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there. */ template -class eoPopString : public eoStat +class eoPopStat : public eoStat { public : /** default Ctor, void string by default, as it appears on the description line once at beginning of evolution. and is meaningless there */ - eoPopString(string _desc ="") : eoStat("", _desc) {} + eoPopStat(string _desc ="") : eoStat("", _desc) {} /** Fills the value() of the eoParam with the dump of the population. Adds a \n before so it does not get mixed up with the rest of the stats @@ -86,13 +86,13 @@ Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there. */ template -class eoSortedPopString : public eoSortedStat +class eoSortedPopStat : public eoSortedStat { public : /** default Ctor, void string by default, as it appears on the description line once at beginning of evolution. and is meaningless there */ - eoSortedPopString(string _desc ="") : eoSortedStat("", _desc) {} + eoSortedPopStat(string _desc ="") : eoSortedStat("", _desc) {} /** Fills the value() of the eoParam with the dump of the population. Adds a \n before so it does not get mixed up with the rest of the stats diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 3079ed126..c4c94030e 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -292,8 +292,9 @@ void main_function(int argc, char **argv) monitor.add(SecondStat); monitor.add(fdcStat); - // test de eoPopStat - eoPopString popStat("Dump of whole population"); + // test de eoPopStat and/or eoSortedPopStat + // eoSortedPopStat popStat("Dump of whole population"); + eoPopStat popStat("Dump of whole population"); checkpoint.add(popStat); monitor.add(popStat); From 195ad728388b3e2f88f415f377325c3f2f31df1b Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 28 Mar 2001 09:00:54 +0000 Subject: [PATCH 0535/2134] eoParam, added specialization for eoValueParam::getValue FDCStat and FileSnapshot: better error messageing Scalar fitness: is now a vector of doubles exercise3.1 added gnuplot again Don't know about eoCombinedContinue --- eo/src/eoCombinedContinue.h | 24 ++++++++++++------------ eo/src/utils/eoFDCStat.h | 26 +++++++++++++------------- eo/src/utils/eoFileSnapshot.h | 2 +- eo/src/utils/eoParam.h | 28 +++++++++++++++++++--------- eo/src/utils/eoScalarFitnessStat.h | 6 +++--- eo/tutorial/Lesson3/exercise3.1.cpp | 16 ++++++++-------- 6 files changed, 56 insertions(+), 46 deletions(-) diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index aff47ce57..2420288f0 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -31,8 +31,8 @@ Combined continuators - logical AND: Continues until one of the embedded continuators says halt! -20/11/00 MS: Changed the 2-continuator construct to a vector > - to be consistent with other Combined constructs +20/11/00 MS: Changed the 2-continuator construct to a vector > + to be consistent with other Combined constructs and allow to easily handle more than 2 continuators */ @@ -43,29 +43,29 @@ public: /// Define Fitness typedef typename EOT::Fitness FitnessType; - /// Ctor + /// Ctor, make sure that at least on continuator is present eoCombinedContinue( eoContinue& _cont) : eoContinue () - { - continuators.push_back(&_cont); + { + continuators.push_back(&_cont); } /// Ctor - for historical reasons ... should disspear some day eoCombinedContinue( eoContinue& _cont1, eoContinue& _cont2) : eoContinue () - { - continuators.push_back(&_cont1); - continuators.push_back(&_cont2); + { + continuators.push_back(&_cont1); + continuators.push_back(&_cont2); } - void add(eoContinue & _cont) - { - continuators.push_back(&_cont); + void add(eoContinue & _cont) + { + continuators.push_back(&_cont); } /** Returns false when one of the embedded continuators say so (logical and) */ - virtual bool operator() ( const eoPop& _pop ) + virtual bool operator() ( const eoPop& _pop ) { for (unsigned i = 0; i < continuators.size(); ++i) if ( !(*continuators[i])(_pop) ) return false; diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h index ed34cc0ff..eaee82f23 100644 --- a/eo/src/utils/eoFDCStat.h +++ b/eo/src/utils/eoFDCStat.h @@ -32,7 +32,7 @@ #include /** - The FDC computation - stores the values into eoValueParam + The FDC computation - stores the values into eoValueParam so they can be snapshot by some eoGnuplotSnapshot ... */ template @@ -46,9 +46,9 @@ public : /** Ctor with the optimum */ - eoFDCStat(eoDistance & _dist, EOT & _theBest, + eoFDCStat(eoDistance & _dist, EOT & _theBest, std::string _description = "FDC") : - eoStat(0, _description), dist(_dist), + eoStat(0, _description), dist(_dist), theBest(_theBest), boolOpt(true) {} /** Compute the FDC - either from best in pop, or from absolute best @@ -56,7 +56,7 @@ public : */ virtual void operator()(const eoPop& _pop) { - if (!boolOpt) // take the local best + if (!boolOpt) // take the local best theBest = _pop.best_element(); unsigned int pSize = _pop.size(); distToBest.value().resize(pSize); @@ -109,24 +109,24 @@ class eoFDCFileSnapshot : public eoFileSnapshot // is an eoMonitor { public: /** Ctor: in addition to the parameters of the ctor of an eoFileSnapshot - we need here an eoFDCStat. The 2 vectors (distances to optimum + we need here an eoFDCStat. The 2 vectors (distances to optimum and fitnesses) are added to the monitor so they can be processed later to a file - and eventually by gnuplot */ - eoFDCFileSnapshot(eoFDCStat & _FDCstat, - std::string _dirname = "tmpFDC", unsigned _frequency = 1, + eoFDCFileSnapshot(eoFDCStat & _FDCstat, + std::string _dirname = "tmpFDC", unsigned _frequency = 1, std::string _filename = "FDC", std::string _delim = " "): - eoFileSnapshot(_dirname, _frequency, _filename, _delim), - FDCstat(_FDCstat) + eoFileSnapshot(_dirname, _frequency, _filename, _delim), + FDCstat(_FDCstat) { - eoMonitor::add(FDCstat.theDist()); - eoMonitor::add(FDCstat.theFit()); + eoFileSnapshot::add(FDCstat.theDist()); + eoFileSnapshot::add(FDCstat.theFit()); } /** just to be sure the add method is not called further */ - virtual void add(const eoParam& _param) - { throw runtime_error("Trying to add stats to an eoFDCFileSnapshot"); } + virtual void add(const eoParam& _param) + { throw runtime_error("eoFDCFileSnapshot::add(). Trying to add stats to an eoFDCFileSnapshot"); } private: eoFDCStat & FDCstat; diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 910b73feb..b5eb55e6b 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -166,7 +166,7 @@ public : { if (!dynamic_cast >*>(&_param)) { - throw logic_error("eoFileSnapshot: I can only monitor vectors of doubles, sorry"); + throw logic_error(string("eoFileSnapshot: I can only monitor vectors of doubles, sorry. The offending parameter name = ") + _param.longName()); } eoMonitor::add(_param); } diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 26db85271..b611d84db 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -138,16 +138,16 @@ public : * @param _shortName Short name of the argument (Optional) * @param _required If it is a necessary parameter or not */ - eoValueParam (ValueType _defaultValue, - std::string _longName, - std::string _description = "No description", + eoValueParam (ValueType _defaultValue, + std::string _longName, + std::string _description = "No description", char _shortHand = 0, bool _required = false) : eoParam(_longName, "", _description, _shortHand, _required), repValue(_defaultValue) { eoParam::defValue(getValue()); } - + ValueType& value() { return repValue; } ValueType value() const { return repValue; } @@ -157,9 +157,9 @@ public : std::ostrstream os(buf, 1023); os << repValue; os << std::ends; - return os.str(); + return os.str(); } - + void setValue(std::string _value) { std::istrstream is(_value.c_str()); @@ -170,6 +170,16 @@ private : ValueType repValue; }; +/* + Specialization for string +*/ +template <> +std::string eoValueParam::getValue(void) const +{ + return repValue; +} + + template <> void eoValueParam::setValue(std::string _value) { @@ -290,9 +300,9 @@ void eoValueParam >::setValue(std::string _valu class eoContainerParam : public eoParam { public : - eoContainerParam (ContainerType& value, string _shortName, string _longName, - string _default, - string _description, + eoContainerParam (ContainerType& value, string _shortName, string _longName, + string _default, + string _description, bool _required, bool _change ) : value(_value), eoParam(_shortName, _longName, _description, _default, _required, _change) diff --git a/eo/src/utils/eoScalarFitnessStat.h b/eo/src/utils/eoScalarFitnessStat.h index 1511e6b90..acfcae5d8 100644 --- a/eo/src/utils/eoScalarFitnessStat.h +++ b/eo/src/utils/eoScalarFitnessStat.h @@ -33,11 +33,11 @@ The fitnesses of a whole population, as a vector */ template -class eoScalarFitnessStat : public eoSortedStat > +class eoScalarFitnessStat : public eoSortedStat > { public : - eoScalarFitnessStat(std::string _description = "FitnessES") : - eoSortedStat >(vector(0), _description) {} + eoScalarFitnessStat(std::string _description = "FitnessES") : + eoSortedStat >(vector(0), _description) {} virtual void operator()(const vector& _popPters) { diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index c4c94030e..a4d0609e2 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -64,7 +64,7 @@ void main_function(int argc, char **argv) eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); parser.processParam( loadNameParam, "Persistence" ); string loadName = loadNameParam.value(); - + eoValueParam maxGenParam(500, "maxGen", "Maximum number of generations",'G'); parser.processParam( maxGenParam, "Stopping criterion" ); unsigned maxGen = maxGenParam.value(); @@ -196,7 +196,7 @@ void main_function(int argc, char **argv) // generational replacement at the moment :-) eoGenerationalReplacement replace; // want to add (weak) elitism? easy! - // rename the eoGenerationalReplacement replace_main, + // rename the eoGenerationalReplacement replace_main, // then encapsulate it in the elitist replacement // eoWeakElitistReplacement replace(replace_main); @@ -285,7 +285,7 @@ void main_function(int argc, char **argv) // when called by the checkpoint (i.e. at every generation) checkpoint.add(monitor); - // the monitor will output a series of parameters: add them + // the monitor will output a series of parameters: add them monitor.add(generationCounter); monitor.add(eval); // because now eval is an eoEvalFuncCounter! monitor.add(bestStat); @@ -302,7 +302,7 @@ void main_function(int argc, char **argv) eoFileMonitor fileMonitor("stats.xg", " "); // and an eoGnuplot1DMonitor will 1-print to a file, and 2- plot on screen eoGnuplot1DMonitor gnuMonitor("best_average.xg",minimizing_fitness()); - + // the checkpoint mechanism can handle multiple monitors checkpoint.add(fileMonitor); checkpoint.add(gnuMonitor); @@ -318,10 +318,10 @@ void main_function(int argc, char **argv) // send a scaling command to gnuplot gnuMonitor.gnuplotCommand("set yrange [0:500]"); - /* + // a specific plot monitor for FDC // first into a file (it adds everything ti itself - eoFDCFileSnapshot fdcFileSnapshot(fdcStat); + eoFDCFileSnapshot fdcFileSnapshot(fdcStat); // then to a Gnuplot monitor eoGnuplot1DSnapshot fdcGnuplot(fdcFileSnapshot); // and of coruse add them to the checkPoint @@ -331,14 +331,14 @@ void main_function(int argc, char **argv) // want to see how the fitness is spread? eoScalarFitnessStat fitStat; checkpoint.add(fitStat); - // a gnuplot-based monitor for snapshots: needs a dir name + // a gnuplot-based monitor for snapshots: needs a dir name // where to store the files eoGnuplot1DSnapshot fitSnapshot("Fitnesses"); // add any stat that is a vector to it fitSnapshot.add(fitStat); // and of course add it to the checkpoint checkpoint.add(fitSnapshot); - */ + // Last type of item the eoCheckpoint can handle: state savers: eoState outState; // Register the algorithm into the state (so it has something to save!!) From d634d95838d0cd0777e4c73732eba32aa092bd19 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 3 Apr 2001 10:08:08 +0000 Subject: [PATCH 0536/2134] In eoVector, changed printOn and readFrom to virtual --- eo/src/eoDominanceMap.h | 2 +- eo/src/eoGenContinue.h | 58 +++++++++++++++--------------- eo/src/eoNDSorting.h | 2 +- eo/src/eoPop.h | 20 +++++------ eo/src/eoVector.h | 6 ++-- eo/src/utils/eoFileMonitor.h | 2 ++ eo/src/utils/eoMonitor.h | 4 ++- eo/src/utils/eoStdoutMonitor.h | 2 +- eo/tutorial/Lesson1/FirstBitGA.cpp | 6 ++-- eo/tutorial/Lesson1/Makefile | 4 +-- 10 files changed, 54 insertions(+), 52 deletions(-) diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index 582501be6..01b76e2d7 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -162,4 +162,4 @@ class eoDominanceMap : public eoUF&, void>, public std::vect vector fitness; }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index c1219450c..201d15ac0 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -35,48 +35,48 @@ class eoGenContinue: public eoContinue { public: - /// Ctor for setting a - eoGenContinue( unsigned long _totalGens) + /// Ctor for setting a + eoGenContinue( unsigned long _totalGens) : repTotalGenerations( _totalGens ), - thisGenerationPlaceHolder(0), - thisGeneration(thisGenerationPlaceHolder){}; - - /// Ctor for enabling the save/load the no. of generations counted - eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) + thisGenerationPlaceHolder(0), + thisGeneration(thisGenerationPlaceHolder){}; + + /// Ctor for enabling the save/load the no. of generations counted + eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) : repTotalGenerations( _totalGens ), - thisGenerationPlaceHolder(0), - thisGeneration(_currentGen){}; - - /** Returns false when a certain number of generations is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - thisGeneration++; - // cout << " [" << thisGeneration << "] "; + thisGenerationPlaceHolder(0), + thisGeneration(_currentGen){}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + // cout << " [" << thisGeneration << "] "; if (thisGeneration >= repTotalGenerations) { cout << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; return false; } return true; - } - - /** Sets the number of generations to reach + } + + /** Sets the number of generations to reach and sets the current generation to 0 (the begin)*/ - virtual void totalGenerations( unsigned long _tg ) { + virtual void totalGenerations( unsigned long _tg ) { repTotalGenerations = _tg; thisGeneration = 0; }; - - /** Returns the number of generations to reach*/ - virtual unsigned long totalGenerations( ) - { - return repTotalGenerations; - }; - + + /** Returns the number of generations to reach*/ + virtual unsigned long totalGenerations( ) + { + return repTotalGenerations; + }; + private: - unsigned long repTotalGenerations; - unsigned long thisGenerationPlaceHolder; - unsigned long& thisGeneration; + unsigned long repTotalGenerations; + unsigned long thisGenerationPlaceHolder; + unsigned long& thisGeneration; }; #endif diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 56be9077d..dea76083b 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -296,4 +296,4 @@ class eoNDSorting_II : public eoNDSorting }; -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 8731258c5..caebf929e 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -244,23 +244,21 @@ class eoPop: public vector, public eoObject, public eoPersistent copy( begin(), end(), ostream_iterator( _os, "\n") ); }; - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. - * @param _is A istream. - - */ + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + in this case, a strstream is used. + * @param _is A istream. + */ virtual void readFrom(istream& _is) { - size_t sz; + size_t sz; _is >> sz; resize(sz); - for (size_t i = 0; i < sz; ++i) - { + for (size_t i = 0; i < sz; ++i) { operator[](i).readFrom( _is ); } } diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 2be9e8e06..2895999ca 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -22,7 +22,7 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.9 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2001-04-03 10:08:06 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.10 2001-04-03 10:08:06 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -74,7 +74,7 @@ class eoVector : public EO, public std::vector } /// printing... - void printOn(ostream& os) const + virtual void printOn(ostream& os) const { EO::printOn(os); os << ' '; @@ -85,7 +85,7 @@ class eoVector : public EO, public std::vector } /// reading... - void readFrom(istream& is) + virtual void readFrom(istream& is) { EO::readFrom(is); diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index d4a217908..514f106cc 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -21,6 +21,8 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk +CVS Info: $Date: 2001-04-03 10:08:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.9 2001-04-03 10:08:07 jmerelo Exp $ $Author: jmerelo $ + */ //----------------------------------------------------------------------------- /** Modified the default behavior, so that it erases existing files. diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index 1af487288..d71a2a0ff 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoParam.h +// eoMonitor.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 /* This library is free software; you can redistribute it and/or @@ -21,6 +21,8 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk +CVS Info: $Date: 2001-04-03 10:08:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.9 2001-04-03 10:08:07 jmerelo Exp $ $Author: jmerelo $ + */ //----------------------------------------------------------------------------- diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 63332ded5..2cab5e81e 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoFileMonitor.h +// eoStdoutMonitor.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 /* This library is free software; you can redistribute it and/or diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index c1a41870e..4ff0ff0c9 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -40,9 +40,9 @@ void main_function(int argc, char **argv) // all parameters are hard-coded! const unsigned int SEED = 42; // seed for random number generator const unsigned int T_SIZE = 3; // size for tournament selection - const unsigned int VEC_SIZE = 8; // Number of bits in genotypes - const unsigned int POP_SIZE = 20; // Size of population - const unsigned int MAX_GEN = 100; // Maximum number of generation before STOP + const unsigned int VEC_SIZE = 16; // Number of bits in genotypes + const unsigned int POP_SIZE = 100; // Size of population + const unsigned int MAX_GEN = 400; // Maximum number of generation before STOP const float CROSS_RATE = 0.8; // Crossover rate const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation const float MUT_RATE = 1.0; // mutation rate diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile index e6b995e8b..23fb9a6c5 100644 --- a/eo/tutorial/Lesson1/Makefile +++ b/eo/tutorial/Lesson1/Makefile @@ -1,6 +1,6 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c -pg $*.cpp firstGA = FirstRealGA FirstBitGA From 7ec7a856e5b8ffc9b97189970da27c160dc97aa4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 3 Apr 2001 17:14:08 +0000 Subject: [PATCH 0537/2134] Modified the tempaltes to take into account - the last modifications of the eopopulator class - the include files (were totally missing in the old templates) - JJ's demand for one class - one file :-) --- eo/tutorial/Templates/binCrossover.tmpl | 45 ++++++++++++ .../lessOffspringExternalSelectorGenOp.tmpl | 69 +++++++++++++++++++ .../lessOffspringSameSelectorGenOp.tmpl | 64 +++++++++++++++++ eo/tutorial/Templates/moreOffspringGenOp.tmpl | 65 +++++++++++++++++ eo/tutorial/Templates/mutation.tmpl | 20 ++++-- eo/tutorial/Templates/quadCrossover.tmpl | 45 ++++++++++++ 6 files changed, 301 insertions(+), 7 deletions(-) create mode 100644 eo/tutorial/Templates/binCrossover.tmpl create mode 100644 eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl create mode 100644 eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl create mode 100644 eo/tutorial/Templates/moreOffspringGenOp.tmpl create mode 100644 eo/tutorial/Templates/quadCrossover.tmpl diff --git a/eo/tutorial/Templates/binCrossover.tmpl b/eo/tutorial/Templates/binCrossover.tmpl new file mode 100644 index 000000000..4bbd5f277 --- /dev/null +++ b/eo/tutorial/Templates/binCrossover.tmpl @@ -0,0 +1,45 @@ +/* +Template for simple binary crossover operators +============================================== + +Binary crossover operators modify the first parent only, +based on the second +*/ + +#ifndef eoMyDerivedBinOp_H +#define eoMyDerivedBinOp_H + +#include + +template +class eoMyDerivedBinOp: public eoBinOp +{ +public: + /** + * (Default) Constructor. + */ + eoMyDerivedBinOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMyDerivedBinOp"; } + + /** + * eoBin crossover - modifies first parent only + * @param Indi1 The first parent + * @param Indi2 The second parent - const + */ + bool operator()(Indi& Indi1, const Indi& Indi2) + { + // do whatever needs to be done + // if Indi1 has been modified + return true; + // otherwise + // return false; + } + +protected: + paramType anyParameter +}; + +#endif diff --git a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl new file mode 100644 index 000000000..0bd9bca2f --- /dev/null +++ b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl @@ -0,0 +1,69 @@ +/* +Template for general operators +=============================== +i.e. that takes any number of parents and generates any number of offspring + +a GenOp that creates less offspring than there are parents + +Second version, get parents using an external eoSelectOne +*/ + +#ifndef eoLessOffspringExternalSelectorGenOp_H +#define eoLessOffspringExternalSelectorGenOp_H + +#include + +template +class eoLessOffspringExternalSelectorGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoLessOffspringExternalSelectorGenOp(eoSelectOne & _sel, paramType _anyParameter) : + sel(_sel), anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoLessOffspringExternalSelectorGenOp"; } + + /// The TOTAL number of offspring (here = nb of parents modified in place) + unsigned max_production(void) { return NbLeftParents; } + + /** + * eoShrinkGen operator - modifies some parents in the populator + * using extra "parents" selected from an external selector + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // say you want N offspring + + // get extra parents - use private selector + // _plop.source() is the eoPop used by _plop to get parents + // WARNING: you are not allowed to modify them (mandatory "const") + const EOT& parentN+1 = sel(_plop.source()); + ... + const EOT& parentN+K = sel(_plop.source()); + + // modify (in place) the "true" parents + // (i.e. parent1, ..., parentsN) + ... + + // invalidate fitnesses of modified parents + parent1.invalidate(); + ... + parentN.invalidate(); + } + + +protected: + eoSelectOne & sel; + paramType anyParameter +}; + +#endif diff --git a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl new file mode 100644 index 000000000..79ca25743 --- /dev/null +++ b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl @@ -0,0 +1,64 @@ +/* +Template for general operators +=============================== +i.e. that takes any number of parents and generates any number of offspring + +a GenOp that creates less offspring than there are parents + +First version, get parents from populator using the ibbedded select() method +*/ + +#ifndef eoLessOffspringSameSelectorGenOp_H +#define eoLessOffspringSameSelectorGenOp_H + +#include + +template +class eoLessOffspringSameSelectorGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoLessOffspringSameSelectorGenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoLessOffspringSameSelectorGenOp"; } + + /// The TOTAL number of offspring (here = nb of remaining modified parents) + unsigned max_production(void) { return NbLeftParents; } + + /** + * eoLesOffspringSameSelectorGenOp operator - + * gets extra parents from the populator + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // say you want N offspring + + // Now select extra parents from the populator + EOT& parentN+1 = _plop.select(); + ... + EOT& parentN+K = _plop.select(); + + // modify the first N parents + ... + + // oh right, and invalidate their fitnesses + parent1.invalidate(); + ... + parentN.invalidate(); + } + +protected: + paramType anyParameter +}; + +#endif \ No newline at end of file diff --git a/eo/tutorial/Templates/moreOffspringGenOp.tmpl b/eo/tutorial/Templates/moreOffspringGenOp.tmpl new file mode 100644 index 000000000..24c19b0be --- /dev/null +++ b/eo/tutorial/Templates/moreOffspringGenOp.tmpl @@ -0,0 +1,65 @@ +/* +Template for general operators +=============================== +i.e. that takes any number of parents and generates any number of offspring + +Here, a GenOp that creates more (or same number of) offspring +than there are parents +*/ + +#ifndef eoMoreOffspringGenOp_H +#define eoMoreOffspringGenOp_H + +#include + +template +class eoMoreOffspringGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoMoreOffspringGenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMoreOffspringGenOp"; } + + /// The TOTAL number of offspring (including modified parents) + unsigned max_production(void) { return NbOffspring; } + + /** + * eoMoreOffspringGenOp operator - eventually modifies the parents + * BUT does generate more offspring + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // select the last parent + // don't advance after the last one: _plop always + // points to the last that has already been treated + + // apply operator to the parents (modifying them AND generating + // new individuals ofs1, ofs2, ..., ofsN + ++_plop; // advance before each insertion + _plop.insert(ofs1); + ... + ++_plop; // advance before each insertion + _plop.insert(ofsN); + + // oh right, and invalidate fitnesses of modified parents + parent1.invalidate(); + ... + parentN.invalidate(); + } + + +protected: + paramType anyParameter +}; + +#endif \ No newline at end of file diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 30b1724a4..824904e5c 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -1,11 +1,16 @@ -Template for simple operators -============================= +/* +Template for simple mutation operators +====================================== +*/ -=========================================================================== -eoMon : mutation operators -====== +#ifndef eoMyDerivedMonOp_H +#define eoMyDerivedMonOp_H -template class eoMyDerivedMonOp: public eoMonOp + +#include + +template +class eoMyDerivedMonOp: public eoMonOp { public: /** @@ -18,7 +23,7 @@ public: string className() const { return "eoMyDerivedMonOp"; } /** - * eoMon crossover - modifies the parent + * modifies the parent * @param Indi The parent */ bool operator()(Indi& Indi) @@ -34,3 +39,4 @@ protected: paramType anyParameter }; +#endif diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl new file mode 100644 index 000000000..a5e598bdd --- /dev/null +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -0,0 +1,45 @@ +/* +Template for simple quadratic crossover operators +================================================= + +Quadratic crossover operators modify the both parents +*/ + +#ifndef eoMyDerivedQuadOp_H +#define eoMyDerivedQuadOp_H + +#include + +template +class eoMyDerivedQuadOp: public eoQuadOp +{ +public: + /** + * (Default) Constructor. + */ + eoMyDerivedQuadOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMyDerivedQuadOp"; } + + /** + * eoQuad crossover - modifies both parents + * @param Indi1 The first parent + * @param Indi2 The second parent + */ + bool operator()(Indi& Indi1, Indi& Indi2) + { + // do whatever needs to be done + + // if at least one individual has been modified - no way to distinguish + return true; + // otherwise + // return false; + } + +protected: + paramType anyParameter +}; + +#endif From 4cb797544acca7c91057ca2a9fe46cef2a15af3a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 3 Apr 2001 17:14:53 +0000 Subject: [PATCH 0538/2134] eoOperators now is in sync with the last modif of eoPopulator by Maarten! --- eo/tutorial/html/eoOperators.html | 170 +++++++++++++++++------------- 1 file changed, 94 insertions(+), 76 deletions(-) diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index b7c61d1b5..b95b61797 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -147,29 +147,28 @@ an eoQuad object.

    Using crossover operators:
    Directly applying crossover operators is straightforward from the interface above: -
    eoBinOpDerivedClass<Indi> myBinOp(parameters);   +
    eoBinOpDerivedClass<Indi> myBinOp(parameters); //  use constructor to pass
    eoQuadOpDerivedClass<Indi> myQuadOp(parameters); - -//  any useful argument -
    Indi eo1= ..., eo2= ...;    - -// the candidates to crossover +
    //  +any useful argument
    +
    Indi eo1= ..., eo2= ...;   // +the candidates to crossover
    if (myBinOp(eo1, eo2)) -
       { ...                    +
       { ...                  // eo1 has been modified, not eo2
       } -
    else ...                    +
    else ...                  // none has been modified
    if (myQuadOp(eo1, eo2)) -
       { ...                    +
       { ...                  // both eo1 and eo2 have been modified
       } -
    else ...                    +
    else ...                  // none has been modified

    However, you will hardly have to actually apply operators to individuals, @@ -182,9 +181,10 @@ are described below, encapsulating the operators into combined operators objects.

    Writing a crossover operator: -
    There are three things to modify in the template -class definitions provided (apart from the name of the class you are -creating!) +
    There are three things to modify in the template class definitions +provided in the Templates directory for both binary +crossover and quadratic crossovers +(apart from the name of the class you are creating!)

    • The constructor, where you pass to the object @@ -225,11 +225,11 @@ above:
      Indi eo = ...;           // eo is candidate to mutation
      if (myMutation(eo)) -
         { ...       +
         { ...     // eo has been modified
         } -
      else           +
      else         // eo has not been modified

      However, you will hardly have to actually apply operators to individuals, @@ -243,8 +243,8 @@ objects.

      Writing a mutation operator:
      There are only two things to modify in the template -class definitions provided (apart from the name of the class you are -creating!) +class definitions provided in the Templates directory (apart from the +name of the class you are creating!)

      • The constructor, where you pass to the object @@ -311,14 +311,14 @@ _pop)
           EOT& parent1 = *_pop; // select the first parent -
           ++_plop;        +
           ++_plop;      // advance once for each selected parents
           ...
           EOT& parentN = *_pop; // select the last parent -
                  +
                // don't advance after the last one: _plop always
                    @@ -342,8 +342,6 @@ in the following:

      •  

          -
          -
         

        void apply()(eoPopulator& _pop)
        { @@ -354,8 +352,9 @@ of parents (see above)

          EOT ofs1 = create_individual(...);
          ...
          EOT ofsK = create_individual(...); -
          // inserts offspring in _pop after -parentN +
          // advance and inserts offspring in +_pop after parentN +
          ++_pop;
          _pop.insert(ofs1);
          ...

          // invalidate the parents that @@ -384,46 +383,56 @@ and you can access it from inside the GenOp method. For instance
         

          -
          -
         

        void apply()(eoPopulator& _pop)
        { -
          // get the necessary number -of parents (see above) +
          // get as many parents as you +will have offspring (see above)
          ...
          // get extra parents - use private selector
          const EOT& parentN+1 = select(_pop.source());
          ...
          const EOT& parentM = select(_pop.source()); -

        where select is any selector you like. Note the +
          // do whatever needs to be done +
          ... +
          // and of course invalidate fitnesses +of remaining modified parents +
          parent1.invalidate(); +
          ... +
          parentN.invalidate(); +
        } +
        where select is any selector you like. Note the const: you are not allowed to modify an element of the original population (but you could of course have copied it!). As usual, the select -selector was pased to the operator at construct time. +selector was passed to the operator at construct time. This typically allows +one to use a different selector for one parent and the others, as demonstrated +here. +
         

      • -If you don't care about the size of the offspring population, you can use -the delete method of the class eoPopulator. +If you don't care about the size of the offspring population (that is, +if that size os controlled elsewhere, e.g. in some external loop), you +can use the inbedded select method of the class eoPopulator. For instance

      • void apply()(eoPopulator& _pop)
        { -
          // get the necessary number -of parents (see above) +
          // get as many parents as you +will have offspring (see above)
          ... -
          // do whatever needs to be done to -any parent -

          // then kill the ones that are now -useless -
          _plop.erase();   -// as many times as necessary -
          ... -
          // invalidate fitnesses of remaining -modified parents +
          // get extra parents - use +populator selector +
          const EOT& parentN+1 = _pop.select(); +
          ... +
          const EOT& parentM = _pop.select(); +
          // do whatever needs to be done +
          ... +
          // and of course invalidate fitnesses +of remaining modified parents
          parent1.invalidate();
          ... -
          parentK.invalidate(); +
          parentN.invalidate();
        }

    Warning: if you use operators that @@ -441,18 +450,25 @@ But anyway general operators were thought to be used putely in below.

    Writing a general operator: -
    There are many things to modify in the template -class definitions provided. +
    There are many things to do to write a general operator - but the Templates +directory contains some sample tempaltes files to help you. It all depends +on whether you want more or less offspring than parents, and whetehr you +want the same selector for every parent or more specialized selectors.

    • -First you have to choose which kind of general -operator you want, i.e. with more (or as many) offspring than parents, -or less offspring than parents.
    • +It you want more (or as many) offspring than +parents, you should use the moreOffspringGenOp.tmpl +template - if you want to use the same selector for all parents, the one +embedded in the argument eoPopulator. +Otherwise, you'll have to write your own operator based on an external +selector, as described in lessOffspringExternalSelectorGenOp.tmpl.
    • -In the latter case (more parents than offspring), you can decide either -to get the extra parents from the populator (to delete them later), or -to select extra parents using a private selector.
    • +If you decide to have more parents than offspring, you can decide either +to get the extra parents using the eoPopulator  +own selector (see lessOffspringSameSelectorGenOp.tmpl, +or to use an external selector (passed at construct-time) as described +in lessOffspringExternalSelectorGenOp.tmpl.
    • Now you can modify the constructor, where @@ -463,12 +479,12 @@ object.
    • Finally, write the core of the operator in method apply(). -Remember you must use the argument eoPopulatorto +Remember you must use the argument eoPopulator +to access the members of the population in turn (method operator*), you may use the initial population (method source()), -as well as the insert or delete -methods.
    • +as well as the insert methods.
      Warning: in general operators, @@ -484,9 +500,8 @@ the fitness again and will keep the old obsolete value.
    populators:

    As has been said above, an eoPopulator -is a population, but also behaves like -an iterator over a population (hence -the name, Population-Iterator). +mainly behaves like an iterator over +a population (hence the name, Population-Iterator).

    The basic interface of an eoPopulator (see also the documentation, @@ -503,9 +518,8 @@ position management through seekp (go to a given position);

  • -Individuals can also be inserted and -erased -at current position using the corresponding methods;
  • +Individuals can also be inserted at +current position using the corresponding methods;
  • last but not least, as the individuals are returned by reference, it is @@ -514,8 +528,8 @@ management  routine reserve is called whenever there is a chance to add some individuals in the population - i.e. in the eoGenOp base class operator() method.
  • -Moreover, a protected method, termed select,  -is used inside the object to get new parents for the following operator, +Moreover, a public method termed select,  +is used inside the object to get new parents for the following operator*, and its implementation distinguishes two types of eoPopulator:
    • @@ -541,8 +555,7 @@ of parents, then you must use an Example: An eoSelectivePopulator -is the main ingredient of the eoGeneralBreeder -operator() +is the main ingredient of the eoGeneralBreederoperator() method - a class that creates a population of offspring from the parents applying an eoGenOp (usually an eoOpContainer) to all selected parents in turn. @@ -660,12 +673,12 @@ Gen: rate: double whose meaning depends on YYY

      where YYY can be one of Proportional and Sequential. Note that before being added to the container, all simple operators are wrapped into the -corresponding eoGenOp (see e.g. how an eoMonOp -is wrapped into -an eoMonGenOp- or how any -operator is handled by calling the appropriate wrapper). In particular, -the wrapper ensures that individuals who have -been modified are invalidated. +corresponding eoGenOp (see e.g. how an eoMonOpis +wrapped into an eoMonGenOp- or +how any operator +is handled by calling the appropriate wrapper). In particular, the +wrapper ensures that individuals who have been +modified are invalidated.

      Containers, Selectors and Populators
      The way the eoOpContainer are applied @@ -745,14 +758,19 @@ _pop)

      {
        EOT & eo1 = *_pop; // get (select if necessary) the first guy -
        ++_pop;       - -// advance -
        EOT & eo2 = findBlonde(_pop.source()); +
        EOT & maBlonde = findBlonde(_pop.source()); // select mate -
      // do whatever the operator is supposed to -do +
        // do whatever the operator is supposed +to do +
        ... +
        // if you want to put maBlonde into +the offspring, you must +
        ++_pop;     + +// advance +
        _pop.insert(maBlonde);    +// and insert it
      }

      Where does that findBlonde selector comes from? As usual, you have to attach it to the operator,  From ddc6650ce55437342495abe4640936ffaff4da2e Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 4 Apr 2001 03:47:33 +0000 Subject: [PATCH 0539/2134] Added the signal handling - see eoCtrlCContinue.h I've disabled it in case of MSC as I don't know if this works there ... Also added a couple of "virtual" in the ga dir --- eo/src/eo | 4 +- eo/src/eoCtrlCContinue.h | 92 ++++++++++++++ eo/src/ga/eoBit.h | 6 +- eo/src/ga/eoBitOp.h | 20 ++-- eo/test/t-eoGenOp.cpp | 74 ++++++++++-- eo/tutorial/Lesson3/exercise3.1.cpp | 6 +- eo/tutorial/Templates/crossover.tmpl | 71 ----------- eo/tutorial/Templates/genop.tmpl | 172 --------------------------- 8 files changed, 180 insertions(+), 265 deletions(-) create mode 100644 eo/src/eoCtrlCContinue.h delete mode 100644 eo/tutorial/Templates/crossover.tmpl delete mode 100644 eo/tutorial/Templates/genop.tmpl diff --git a/eo/src/eo b/eo/src/eo index d2df9d515..bf380700f 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -80,7 +80,9 @@ #include #include #include - +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif // Selection // the eoSelectOne's #include // also contains the eoSequentialSelect diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h new file mode 100644 index 000000000..3a2adfcbb --- /dev/null +++ b/eo/src/eoCtrlCContinue.h @@ -0,0 +1,92 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCtrlCContinue.h +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#ifndef eoCtrlCContinue_h +#define eoCtrlCContinue_h + +#include +#include + +// --- Global variables - but don't know what else to do - MS --- +static bool arret_demande = false; +static bool existCtrlCContinue = false; + +// +// The signal handler - installed in the eoCtrlCContinue Ctor +// +void signal_handler( int sig ) +// --------------------------- +{ + // --- On veut la paix, jusqu'a la fin --- + signal( SIGINT, SIG_IGN ); + signal( SIGQUIT, SIG_IGN ); + cerr << "Ctrl C entered ... closing down" << endl ; + arret_demande = true; +} + +// +// Permet de savoir si on a appuye sur Control-C +// (renvoie alors 1) +// +int AppliArretDemande() +// -------------------- +{ + return arret_demande; +} + + + +/** + Ctrl C handling: this eoContinue tells whether the user pressed Ctrl C +*/ +template< class EOT> +class eoCtrlCContinue: public eoContinue +{ +public: + + /// Ctor : installs the signal handler + eoCtrlCContinue() + { + // First checks that no other eoCtrlCContinue does exist + if (existCtrlCContinue) + throw runtime_error("A signal handler for Ctrl C is already defined!\n"); + signal( SIGINT, signal_handler ); + signal( SIGQUIT, signal_handler ); + existCtrlCContinue = true; + } + + /** Returns false when Ctrl C has been typed in + * reached */ + virtual bool operator() ( const eoPop& _vEO ) + { + if (arret_demande) + return false; + return true; + } + +}; + + +#endif diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 668c91120..558903b18 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -64,7 +64,7 @@ template class eoBit: public eoVector eoVector(size, value) {} /// My class name. - string className() const + virtual string className() const { return "eoBit"; } @@ -73,7 +73,7 @@ template class eoBit: public eoVector * To print me on a stream. * @param os The ostream. */ - void printOn(ostream& os) const + virtual void printOn(ostream& os) const { EO::printOn(os); os << ' '; @@ -85,7 +85,7 @@ template class eoBit: public eoVector * To read me from a stream. * @param is The istream. */ - void readFrom(istream& is) + virtual void readFrom(istream& is) { EO::readFrom(is); unsigned s; diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 816d5cbe1..61117a46d 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -69,7 +69,7 @@ template class eoOneBitFlip: public eoMonOp { public: /// The class name. - string className() const { return "eoOneBitFlip"; } + virtual string className() const { return "eoOneBitFlip"; } /** * Change one bit. @@ -99,7 +99,7 @@ template class eoDetBitFlip: public eoMonOp eoDetBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} /// The class name. - string className() const { return "eoDetBitFlip"; } + virtual string className() const { return "eoDetBitFlip"; } /** * Change num_bit bits. @@ -135,7 +135,7 @@ template class eoBitMutation: public eoMonOp eoBitMutation(const double& _rate = 0.01): rate(_rate) {} /// The class name. - string className() const { return "eoBitMutation"; } + virtual string className() const { return "eoBitMutation"; } /** * Mutate a chromosome. @@ -168,7 +168,7 @@ template class eoBitInversion: public eoMonOp { public: /// The class name. - string className() const { return "eoBitInversion"; } + virtual string className() const { return "eoBitInversion"; } /** * Inverts a range of bits in a binary chromosome. @@ -196,7 +196,7 @@ template class eoBitNext: public eoMonOp { public: /// The class name. - string className() const { return "eoBitNext"; } + virtual string className() const { return "eoBitNext"; } /** * Change the bit string x to be x+1. @@ -230,7 +230,7 @@ template class eoBitPrev: public eoMonOp { public: /// The class name. - string className() const { return "eoBitPrev"; } + virtual string className() const { return "eoBitPrev"; } /** * Change the bit string x to be x-1. @@ -264,7 +264,7 @@ template class eo1PtBitXover: public eoQuadOp { public: /// The class name. - string className() const { return "eo1PtBitXover"; } + virtual string className() const { return "eo1PtBitXover"; } /** * 1-point crossover for binary chromosomes. @@ -302,7 +302,7 @@ template class eoUBitXover: public eoQuadOp runtime_error("UxOver --> invalid preference"); } /// The class name. - string className() const { return "eoUBitXover"; } + virtual string className() const { return "eoUBitXover"; } /** * Uniform crossover for binary chromosomes. @@ -348,7 +348,7 @@ template class eoNPtsBitXover: public eoQuadOp } /// The class name. - string className() const { return "eoNPtsBitXover"; } + virtual string className() const { return "eoNPtsBitXover"; } /** * n-point crossover for binary chromosomes. @@ -416,7 +416,7 @@ template class eoBitGxOver: public eoQuadOp } /// The class name - string className() const { return "eoBitGxOver"; } + virtual string className() const { return "eoBitGxOver"; } /** * Gene crossover for binary chromosomes. diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index b91ab576a..d885b7cb2 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -112,8 +112,8 @@ class one2threeOp : public eoGenOp // :-) void apply(eoPopulator& _plop) { EOT& eo = *_plop; // select the guy - ++_plop; // advance + ++_plop; // advance _plop.insert("v(" + eo.s + ", 1)"); ++_plop; _plop.insert("v(" + eo.s + ", 2)"); @@ -126,7 +126,7 @@ class one2threeOp : public eoGenOp // :-) class two2oneOp : public eoGenOp // :-) { - public: + public: unsigned max_production(void) { return 1; } void apply(eoPopulator& _plop) @@ -139,6 +139,29 @@ class two2oneOp : public eoGenOp // :-) virtual string className() {return "two2oneOp";} }; +class three2threeOp : public eoGenOp // :-) +{ + public: + unsigned max_production(void) { return 3; } + + void apply(eoPopulator& _plop) + { + EOT& eo1 = *_plop; // select 1st guy + EOT& eo2 = *++_plop; // select 2nd guy + EOT& eo3 = *++_plop; // select 3rd guy + EOT a = eo1; + EOT b = eo2; + EOT c = eo3; + cout << "les selectionnes: a=" << a << " et b=" << b << " et c=" << c << endl; + eo1.s = "323-1(" + a.s + ", " + b.s + ", " + c.s + ")"; + eo2.s = "323-2(" + a.s + ", " + b.s + ", " + c.s + ")"; + eo3.s = "323-3(" + a.s + ", " + b.s + ", " + c.s + ")"; + // oh right, and invalidate fitnesses + cout << "les enfants: a=" << eo1 << " et b=" << eo2 << " et c=" << eo3 << endl; + } + virtual string className() {return "three2threeOp";} +}; + // dummy intialization. Re-init if no pSize, resize first if pSize void init(eoPop & _pop, unsigned _pSize) @@ -191,6 +214,7 @@ int the_main(int argc, char **argv) // our own operator one2threeOp o2t; two2oneOp t2o; + three2threeOp t2t; // a selector @@ -212,12 +236,16 @@ int the_main(int argc, char **argv) // with one2three op eoSequentialOp sOp2; sOp2.add(o2t, 1); - sOp2.add(quad, 1); + // sOp2.add(quad, 1); + // with three2three op eoSequentialOp sOp3; - // sOp3.add(t2o, 1); - sOp3.add(bin, 1); - sOp3.add(quad, 1); + sOp3.add(t2t, 1); + +// eoSequentialOp sOp3; +// sOp3.add(t2o, 1); +// sOp3.add(bin, 1); +// sOp3.add(quad, 1); // try adding quads and bins to see what results you'll get // now a sequential selection that is a simple "addition" @@ -243,7 +271,7 @@ int the_main(int argc, char **argv) // To simulate SGA: first a prop between quadOp and quadClone eoProportionalOp pSGAOp; - pSGAOp.add(bin, 0.8); + pSGAOp.add(quad, 0.8); pSGAOp.add(quadclone, 0.2); // sequential selection between pSGAOp and mon eoSequentialOp virtualSGA; @@ -258,6 +286,7 @@ int the_main(int argc, char **argv) while (offspring.size() < pop.size()) { virtualSGA(popit); + cout << "SeqPopulator boucle et incremente\n"; ++popit; } } @@ -284,6 +313,7 @@ int the_main(int argc, char **argv) while (offspring.size() < 2*pop.size()) { virtualSGA(it_step3); + cout << "SelectPopulator boucle et incremente\n"; ++it_step3; } @@ -310,6 +340,36 @@ int the_main(int argc, char **argv) // ok, now print cout << "Apres Quad+Mon ds un eoSelectivePopulator\n" << pop << endl; + // On teste 1->3 + init(pop, pSize); + eoSelectivePopulator it_step5(pop, offspring, seqSelect); + while (offspring.size() < 2*pop.size()) + { + sOp2(it_step5); + ++it_step5; + } + + swap(pop, offspring); + offspring.clear(); + + // ok, now print + cout << "Apres 1->3 seul ds un eoSelectivePopulator\n" << pop << endl; + + // On teste 3->3 + init(pop, pSize); + eoSelectivePopulator it_step6(pop, offspring, seqSelect); + while (offspring.size() < 2*pop.size()) + { + sOp3(it_step6); + ++it_step6; + } + + swap(pop, offspring); + offspring.clear(); + + // ok, now print + cout << "Apres 3->3 seul ds un eoSelectivePopulator\n" << pop << endl; + return 1; } diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index a4d0609e2..3bdab13d3 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -238,7 +238,11 @@ void main_function(int argc, char **argv) eoCombinedContinue continuator(genCont); continuator.add(steadyCont); // continuator.add(fitCont); - + // Ctrl C signal handling: don't know if that works in MSC ... +#ifndef _MSC_VER + eoCtrlCContinue ctrlC; + continuator.add(ctrlC); +#endif // CHECKPOINT // but now you want to make many different things every generation diff --git a/eo/tutorial/Templates/crossover.tmpl b/eo/tutorial/Templates/crossover.tmpl deleted file mode 100644 index db1d054f2..000000000 --- a/eo/tutorial/Templates/crossover.tmpl +++ /dev/null @@ -1,71 +0,0 @@ -Template for simple operators -============================= - -=========================================================================== -eoQuad : crossover operators that take 2 parents and modify both -====== - -template class eoMyDerivedQuadOp: public eoQuadOp -{ -public: - /** - * (Default) Constructor. - */ - eoMyDerivedQuadOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} - - /// The class name. Used to display statistics - string className() const { return "eoMyDerivedQuadOp"; } - - /** - * eoQuad crossover - modifies both parents - * @param Indi1 The first parent - * @param Indi2 The first parent - */ - bool operator()(Indi& Indi1, Indi& Indi2) - { - // do whatever needs to be done - - // if at least one individual has been modified - return true; - // otherwise - // return false; - } - -protected: - paramType anyParameter -}; - -=========================================================================== -eoBin : crossover operators that take 2 parents and modify the first one -===== - -template class eoMyDerivedBinOp: public eoBinOp -{ -public: - /** - * (Default) Constructor. - */ - eoMyDerivedBinOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} - - /// The class name. Used to display statistics - string className() const { return "eoMyDerivedBinOp"; } - - /** - * eoQuad crossover - modifies first parent only - * @param Indi1 The first parent - * @param Indi2 The first parent - const - */ - bool operator()(Indi& Indi1, const Indi& Indi2) - { - // do whatever needs to be done - // if Indi1 has been modified - return true; - // otherwise - // return false; - } - -protected: - paramType anyParameter -}; diff --git a/eo/tutorial/Templates/genop.tmpl b/eo/tutorial/Templates/genop.tmpl deleted file mode 100644 index 397f31257..000000000 --- a/eo/tutorial/Templates/genop.tmpl +++ /dev/null @@ -1,172 +0,0 @@ -Template for simple operators -============================= - -=========================================================================== -eoGen : general operator that takes any number of parents and generates -====== any number of offspring - -First, a GenOp that creates more offspring than there are parents ------------------------------------------------------------------ - -template class eoMyDerivedGrowGenOp: public eoGenOp -{ -public: - /** - * (Default) Constructor. - */ - eoMyDerivedGrowGenOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} - - /// The class name. Used to display statistics - string className() const { return "eoMyDerivedGrowGenOp"; } - - /// The TOTAL number of offspring (including modified parents) - unsigned max_production(void) { return NbOffspring; } - - /** - * eoGrowGen operator - eventually modifies the parents - * BUT does generate more offspring - * - * @param _pop a POPULATOR (not a simple population) - */ - void apply(eoPopulator& _plop) - { - EOT& parent1 = *_plop; // select the first parent - ++_plop; // advance once for each selected parents - ... - EOT& parentN = *_plop; // select the last parent - // don't advance after the last one: _plop always - // points to the last that has already been treated - - // apply operator to the parents (modifying them AND generating - // new individuals ofs1, ofs2, ..., ofsN - _plop.insert(ofs1); - ++_plop; // advance after each insertion - ... - _plop.insert(ofsN); - // don't advance after the last one: _plop always - // points to the last that has already been treated - - // oh right, and invalidate fitnesses of modified parents - parent1.invalidate(); - ... - parentN.invalidate(); - } - - -protected: - paramType anyParameter -}; - -=========================================================================== -Now, a GenOp that creates less offspring than there are parents ---------------------------------------------------------------- -First version, get parents from populator, and erase some of them ------------------------------------------------------------------ - -template class eoMyDerivedShrink1GenOp: public eoGenOp -{ -public: - /** - * (Default) Constructor. - */ - eoMyDerivedShrink1GenOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} - - /// The class name. Used to display statistics - string className() const { return "eoMyDerivedShrink1GenOp"; } - - /// The TOTAL number of offspring (here = nb of remaining modified parents) - unsigned max_production(void) { return NbLeftParents; } - - /** - * eoShrinkGen operator - modifies some of the parents - * and kills the rest - * - * @param _pop a POPULATOR (not a simple population) - */ - void apply(eoPopulator& _plop) - { - EOT& parent1 = *_plop; // select the first parent - ++_plop; // advance once for each selected parents - ... - EOT& parentN = *_plop; // select the last parent - // don't advance after the last one: _plop always - // points to the last that has already been treated - - // modify some of the parents (the first ones - // as erase removes backwards) - ... - - // then kill the ones that are now useless - _plop.erase(); // as many times as necessary - ... - // oh right, and invalidate fitnesses of remaining modified parents - parent1.invalidate(); - ... - parentK.invalidate(); - } - - -protected: - paramType anyParameter -}; - -=========================================================================== -Now, a GenOp that creates less offspring than there are parents ---------------------------------------------------------------- -Second version, get parents from an external selector (no erasing) ------------------------------------------------------------------- - -template class eoMyDerivedShrink2GenOp: public eoGenOp -{ -public: - /** - * (Default) Constructor. - */ - eoMyDerivedShrink2GenOp(eoSelectOne & _sel, paramType _anyParameter) : - sel(_sel), anyParameter(_anyParameter) {} - - /// The class name. Used to display statistics - string className() const { return "eoMyDerivedShrink2GenOp"; } - - /// The TOTAL number of offspring (here = nb of parents modified in place) - unsigned max_production(void) { return NbLeftParents; } - - /** - * eoShrinkGen operator - modifies some parents in the populator - * using extra "parents" selected from an external selector - * - * @param _pop a POPULATOR (not a simple population) - */ - void apply(eoPopulator& _plop) - { - EOT& parent1 = *_plop; // select the first parent - ++_plop; // advance once for each selected parents - ... - EOT& parentN = *_plop; // select the last parent you need - // don't advance after the last one: _plop always - // points to the last that has already been treated - - // get extra parents - use private selector - // _plop.source() is the eoPop used by _plop to get parents - // WARNING: you are not allowed to modify them (mandatory "const") - const EOT& parentN+1 = sel(_plop.source()); - ... - const EOT& parentM = sel(_plop.source()); - - // modify (in place) the "true" parents - // (i.e. parent1, ..., parentsN) - ... - - // invalidate fitnesses of modified parents - parent1.invalidate(); - ... - parentN.invalidate(); - } - - -protected: - eoSelectoIne & sel; - paramType anyParameter -}; From f0813c55cac3dfb1c33f100cf26a02011cc43273 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 5 Apr 2001 16:47:54 +0000 Subject: [PATCH 0540/2134] Added the continue.tmpl template - and modified the html pages accordingly (though eoCheckPoint.html is still a long way to complete). Added some comments in all template files - and replaced the protected by private (don't remember why these were protected!!!). --- eo/tutorial/Templates/binCrossover.tmpl | 11 ++++- eo/tutorial/Templates/continue.tmpl | 46 +++++++++++++++++++ .../lessOffspringExternalSelectorGenOp.tmpl | 11 ++++- .../lessOffspringSameSelectorGenOp.tmpl | 11 ++++- eo/tutorial/Templates/moreOffspringGenOp.tmpl | 11 ++++- eo/tutorial/Templates/mutation.tmpl | 11 ++++- eo/tutorial/Templates/quadCrossover.tmpl | 11 ++++- eo/tutorial/html/eoBottomUp.html | 2 +- eo/tutorial/html/eoCheckPoint.html | 44 ++++++++++++------ eo/tutorial/html/eoLesson2.html | 35 ++++++++++---- 10 files changed, 163 insertions(+), 30 deletions(-) create mode 100644 eo/tutorial/Templates/continue.tmpl diff --git a/eo/tutorial/Templates/binCrossover.tmpl b/eo/tutorial/Templates/binCrossover.tmpl index 4bbd5f277..b90729b29 100644 --- a/eo/tutorial/Templates/binCrossover.tmpl +++ b/eo/tutorial/Templates/binCrossover.tmpl @@ -1,3 +1,8 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + /* Template for simple binary crossover operators ============================================== @@ -11,6 +16,10 @@ based on the second #include +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ template class eoMyDerivedBinOp: public eoBinOp { @@ -38,7 +47,7 @@ public: // return false; } -protected: +private: paramType anyParameter }; diff --git a/eo/tutorial/Templates/continue.tmpl b/eo/tutorial/Templates/continue.tmpl new file mode 100644 index 000000000..746bfba6e --- /dev/null +++ b/eo/tutorial/Templates/continue.tmpl @@ -0,0 +1,46 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for continuator in EO, i.e. stopping conditions for EO algorithms +========================================================================== +*/ + +#ifndef _eoMyContinue_h +#define _eoMyContinue_h + +#include + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template< class EOT> +class eoMyContinue: public eoContinue { +public: + /// Ctor + eoMyContinue( paramType _anyParameter) : + anyParameter(_anyParameter) {} + + + /** Returns false when you want to stop + */ + virtual bool operator() ( const eoPop& _pop ) + { + bool stopCondition = ... ; // compute the stopping condition + if (stopCondition) // the algo will stop upon return FALSE + { + cout << "STOP in eoMyContinue: blablabla \n"; + return false; + } + return true; // == do not stop + } + +private: + paramType anyParameter +}; + +#endif + diff --git a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl index 0bd9bca2f..11ce2b534 100644 --- a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl +++ b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl @@ -1,3 +1,8 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + /* Template for general operators =============================== @@ -13,6 +18,10 @@ Second version, get parents using an external eoSelectOne #include +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ template class eoLessOffspringExternalSelectorGenOp: public eoGenOp { @@ -61,7 +70,7 @@ public: } -protected: +private: eoSelectOne & sel; paramType anyParameter }; diff --git a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl index 79ca25743..826ebf37b 100644 --- a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl +++ b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl @@ -1,3 +1,8 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + /* Template for general operators =============================== @@ -13,6 +18,10 @@ First version, get parents from populator using the ibbedded select() method #include +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ template class eoLessOffspringSameSelectorGenOp: public eoGenOp { @@ -57,7 +66,7 @@ public: parentN.invalidate(); } -protected: +private: paramType anyParameter }; diff --git a/eo/tutorial/Templates/moreOffspringGenOp.tmpl b/eo/tutorial/Templates/moreOffspringGenOp.tmpl index 24c19b0be..9753ded61 100644 --- a/eo/tutorial/Templates/moreOffspringGenOp.tmpl +++ b/eo/tutorial/Templates/moreOffspringGenOp.tmpl @@ -1,3 +1,8 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + /* Template for general operators =============================== @@ -12,6 +17,10 @@ than there are parents #include +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ template class eoMoreOffspringGenOp: public eoGenOp { @@ -58,7 +67,7 @@ public: } -protected: +private: paramType anyParameter }; diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 824904e5c..41e62e887 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -1,3 +1,8 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + /* Template for simple mutation operators ====================================== @@ -9,6 +14,10 @@ Template for simple mutation operators #include +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ template class eoMyDerivedMonOp: public eoMonOp { @@ -35,7 +44,7 @@ public: // return false; } -protected: +private: paramType anyParameter }; diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl index a5e598bdd..f66f1ea8c 100644 --- a/eo/tutorial/Templates/quadCrossover.tmpl +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -1,3 +1,8 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + /* Template for simple quadratic crossover operators ================================================= @@ -10,6 +15,10 @@ Quadratic crossover operators modify the both parents #include +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ template class eoMyDerivedQuadOp: public eoQuadOp { @@ -38,7 +47,7 @@ public: // return false; } -protected: +private: paramType anyParameter }; diff --git a/eo/tutorial/html/eoBottomUp.html b/eo/tutorial/html/eoBottomUp.html index ba1919ee8..9589a8d90 100644 --- a/eo/tutorial/html/eoBottomUp.html +++ b/eo/tutorial/html/eoBottomUp.html @@ -54,7 +54,7 @@ to go directly to the corresponding section of the tutorial. - + diff --git a/eo/tutorial/html/eoCheckPoint.html b/eo/tutorial/html/eoCheckPoint.html index aaf8cb486..9ac0ec7fb 100644 --- a/eo/tutorial/html/eoCheckPoint.html +++ b/eo/tutorial/html/eoCheckPoint.html @@ -27,7 +27,7 @@ is Checkpointing about?

      EO classes described in this page:

      • -Base classes: eoCheckPoint, eoContinue, +Base classes: eoCheckPoint, eoContinue, eoStat, eoSortedStat, eoMonitor, eoUpdater
      • @@ -40,23 +40,31 @@ eoStat, eoSortedStat, eoMonitor, eoUpdater

      •  


        Continuators: -
         

        Continuators are functors that compute stopping critera. They receive a population and return a boolean value which is set to false only when some stopping vriterion is met. All algorithms in EO have a loop that goes -while(continuator(pop) -{ ... } which means that the algorithm stops only when -the continuator returns false. -

        Interface: -
          +do{...}while(continuator(pop)which +means that the algorithm stops only when the continuator returns false. +

        Interface:  The abstract class +for computing stopping conditions is eoContinue, +and the interface for its operator() is +

                                    +bool operator()(const eoPop<EOT>& +) +

        which you could have guessed from the inheritance +diagram for class eoContinue, as +you see there that eoContinue derives +from class eoUF<const eoPop<EOT>&, +bool>.

        Using a continuator:
        You can find an first example of using a continuator in the code for -FirstBitEA in Lesson2. +FirstBitEA +ior more sophisticated continue conditions in  Lesson2.
        If you want to find out how it is used inside an algorithm, go and see for instance in eoSGA, the simplest EA within EO.

        Writing a continuator: -
        There are only two things to modify in the template +
        There are only two things to modify in the
        template class definitions provided (apart from the name of the class you are creating!)

          @@ -66,11 +74,21 @@ any useful parameter (see the private data at end of class definition).
        • The operator() method, which performs the -actual test on the population.
        • +computation of the actual test using the population plus any other parameter +passed at construct time. Don't forget to returnfalse +when the stopping criterion is met!
        -Don't forget to return false -when the stopping criterion is met! -

        +Existing continuators: +Of course you can find out all existing (non-virtual!) subclasses +of eoContinue by looking at its  inheritance +diagram. But you might find it more convenient to have them listed +here: +

          +
        • +
        • +
        + +



        Combining continuators:

        diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 346ebb3ab..746c8262b 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 2 @@ -67,7 +67,11 @@ argument is a vector<bool> or a Note: Also, +
          +

          +
          +
          +

        Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object file once and for all (remember @@ -82,8 +86,12 @@ have to declare 3 template arguments: the type of EO object it will be applied to, the return type and the type of argument the function actually requires. -


        Note: In -the previous files (Bit - Real) +
          +

          +
          +
          +

        Note: In the +previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness type of EO object, third = first).
          @@ -99,13 +107,17 @@ rather than maximize a fitness function (see Exercise of the population is now
        encapsulatedinto a separate initializer (based on a boolean generator or a double-number -generator -see random_generators.h) +generator -see random_generators.h) that is then used in the constructor of the population to build the individuals. You can also use different initializers and call them in turn through the call to pop.append() function (see Exercise 2). -


        Note: Don't +
          +

          +
          +
          +

        Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!!
          @@ -199,12 +211,15 @@ several stopping criteria by using an object of the class
        (Bit - Real). Initialize it with an object of class eoContinue, and -addas -many of other such objects as you wish. And as an eoCombinedContinue +add +as many of other such objects as you wish. And as an eoCombinedContinue is -aneoContinue, +an eoContinue, simply pass it to the algorithm (Bit -- Real). +- Real). To find out more, and +to get the list and syntax of existing eoContinue subclasses, check out +the corresponding component-based +page.
         

      • From e3745d0674f41a3884fde791c93e2d64184a4f2a Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Apr 2001 08:52:41 +0000 Subject: [PATCH 0541/2134] Commented some ====== that resulted in error when running autogen.sh --- eo/test/Makefile.am | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 557839924..d130aae15 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,15 +9,29 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### INCLUDES = -I$(top_builddir)/src +<<<<<<< Makefile.am +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +CXXFLAGS = -g +#======= LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall +>>>>>>> 1.44 ############################################################################### +<<<<<<< Makefile.am + +check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing \ + t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA +TESTS=run_tests +# removing temporarily t-eoESFull +#noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA +#======= check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA +>>>>>>> 1.44 ############################################################################### @@ -88,6 +102,26 @@ t_eoSymreg_LDADD = $(LDADDS) ############################################################################### t_eo_SOURCES = t-eo.cpp +<<<<<<< Makefile.am +t_eo_DEPENDENCIES = $(DEPS) +t_eo_LDFLAGS = -lm +t_eo_LDADD = $(LDADDS) + +############################################################################### + +t_eoGenOp_SOURCES = t-eoGenOp.cpp +t_eoGenOp_DEPENDENCIES = $(DEPS) +t_eoGenOp_LDFLAGS = -lm +t_eoGenOp_LDADD = $(LDADDS) + +############################################################################### + +t_eoGA_SOURCES = t-eoGA.cpp binary_value.h +t_eoGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoGA_LDFLAGS = -lm +t_eoGA_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) + +############################################################################### t_eo_DEPENDENCIES = $(DEPS) t_eo_LDFLAGS = -lm t_eo_LDADD = $(LDADDS) @@ -133,3 +167,4 @@ t_eoParetoFitness_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoParetoFitness_LDFLAGS = -lm t_eoParetoFitness_LDADD = $(LDADDS) ############################################################################### +>>>>>>> 1.44 From bfca8ca4336a3d625c9a0e91e23a4905f6450c7d Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Apr 2001 14:20:48 +0000 Subject: [PATCH 0542/2134] Sorry, last check in was a mistake --- eo/test/Makefile.am | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index d130aae15..557839924 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,29 +9,15 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### INCLUDES = -I$(top_builddir)/src -<<<<<<< Makefile.am -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a -CXXFLAGS = -g -#======= LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall ->>>>>>> 1.44 ############################################################################### -<<<<<<< Makefile.am - -check_PROGRAMS = t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing \ - t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA -TESTS=run_tests -# removing temporarily t-eoESFull -#noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA -#======= check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA ->>>>>>> 1.44 ############################################################################### @@ -102,26 +88,6 @@ t_eoSymreg_LDADD = $(LDADDS) ############################################################################### t_eo_SOURCES = t-eo.cpp -<<<<<<< Makefile.am -t_eo_DEPENDENCIES = $(DEPS) -t_eo_LDFLAGS = -lm -t_eo_LDADD = $(LDADDS) - -############################################################################### - -t_eoGenOp_SOURCES = t-eoGenOp.cpp -t_eoGenOp_DEPENDENCIES = $(DEPS) -t_eoGenOp_LDFLAGS = -lm -t_eoGenOp_LDADD = $(LDADDS) - -############################################################################### - -t_eoGA_SOURCES = t-eoGA.cpp binary_value.h -t_eoGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoGA_LDFLAGS = -lm -t_eoGA_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) - -############################################################################### t_eo_DEPENDENCIES = $(DEPS) t_eo_LDFLAGS = -lm t_eo_LDADD = $(LDADDS) @@ -167,4 +133,3 @@ t_eoParetoFitness_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoParetoFitness_LDFLAGS = -lm t_eoParetoFitness_LDADD = $(LDADDS) ############################################################################### ->>>>>>> 1.44 From 3d757e3243059e9a197c453f72d20bc9c8ada5d7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Apr 2001 15:28:24 +0000 Subject: [PATCH 0543/2134] Modified the eoCtrlCContinue - had to create the eoCtrlCContinue.cpp to make t-eoGA work (you should NOT have separate functions in .h files!) I also included everything related to Ctrl C handling in #ifndef _MSC_VER until someone tells me how to do it in MSVC --- eo/src/Makefile.am | 2 +- eo/src/eoCtrlCContinue.cpp | 45 ++++++++++++++++++++++++++++++++++++++ eo/src/eoCtrlCContinue.h | 38 ++++++++------------------------ eo/src/eoPop.h | 18 ++++++++++++++- 4 files changed, 72 insertions(+), 31 deletions(-) create mode 100644 eo/src/eoCtrlCContinue.cpp diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 4efd76045..bb878cc84 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,7 +8,7 @@ SUBDIRS = es ga gp utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp +libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = *.h eo diff --git a/eo/src/eoCtrlCContinue.cpp b/eo/src/eoCtrlCContinue.cpp new file mode 100644 index 000000000..ce25e65d7 --- /dev/null +++ b/eo/src/eoCtrlCContinue.cpp @@ -0,0 +1,45 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCtrlCContinue.cpp +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#include +#include + +// --- Global variables - but don't know what else to do - MS --- +static bool arret_demande = false; +static bool existCtrlCContinue = false; + +// +// The signal handler - installed in the eoCtrlCContinue Ctor +// +void signal_handler( int sig ) +// --------------------------- +{ + // --- On veut la paix, jusqu'a la fin --- + signal( SIGINT, SIG_IGN ); + signal( SIGQUIT, SIG_IGN ); + cerr << "Ctrl C entered ... closing down" << endl ; + arret_demande = true; +} + diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 3a2adfcbb..66708083a 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -23,39 +23,18 @@ mak@dhi.dk */ //----------------------------------------------------------------------------- +// the same thing can probably be done in MS environement, but I hoave no way +// to test it so at the moment it is commented out when in MSVC +#ifndef _MSC_VER + #ifndef eoCtrlCContinue_h #define eoCtrlCContinue_h -#include #include -// --- Global variables - but don't know what else to do - MS --- -static bool arret_demande = false; -static bool existCtrlCContinue = false; - -// -// The signal handler - installed in the eoCtrlCContinue Ctor -// -void signal_handler( int sig ) -// --------------------------- -{ - // --- On veut la paix, jusqu'a la fin --- - signal( SIGINT, SIG_IGN ); - signal( SIGQUIT, SIG_IGN ); - cerr << "Ctrl C entered ... closing down" << endl ; - arret_demande = true; -} - -// -// Permet de savoir si on a appuye sur Control-C -// (renvoie alors 1) -// -int AppliArretDemande() -// -------------------- -{ - return arret_demande; -} +extern bool arret_demande, existCtrlCContinue; +extern void signal_handler( int sig ); /** @@ -67,7 +46,7 @@ class eoCtrlCContinue: public eoContinue public: /// Ctor : installs the signal handler - eoCtrlCContinue() + eoCtrlCContinue() { // First checks that no other eoCtrlCContinue does exist if (existCtrlCContinue) @@ -85,8 +64,9 @@ public: return false; return true; } - }; #endif + +#endif // of MSVC comment-out diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index caebf929e..c5323644e 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -234,6 +234,22 @@ class eoPop: public vector, public eoObject, public eoPersistent std::swap(static_cast& >(*this), static_cast& >(other)); } + /** + * Prints sorted pop but does NOT modify it! + * + * @param _os A ostream. + */ + virtual void sortedPrintOn(ostream& _os) const + { + vector result; + sort(result); + _os << size() << '\n'; + for (unsigned i = 0; i < size(); ++i) + { + _os << *result[i] << endl; + } + } + /** * Write object. It's called printOn since it prints the object _on_ a stream. * @param _os A ostream. @@ -242,7 +258,7 @@ class eoPop: public vector, public eoObject, public eoPersistent { _os << size() << '\n'; copy( begin(), end(), ostream_iterator( _os, "\n") ); - }; + } /** @name Methods from eoObject */ //@{ From 27691b21fdc9d9d40f2c5522c3559d3efccb79d8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Apr 2001 16:03:18 +0000 Subject: [PATCH 0544/2134] eoCtrlCcontinue had a few remaining errors :-( --- eo/src/eoCtrlCContinue.cpp | 4 ++-- eo/src/eoCtrlCContinue.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/src/eoCtrlCContinue.cpp b/eo/src/eoCtrlCContinue.cpp index ce25e65d7..5b3e5d392 100644 --- a/eo/src/eoCtrlCContinue.cpp +++ b/eo/src/eoCtrlCContinue.cpp @@ -27,8 +27,8 @@ #include // --- Global variables - but don't know what else to do - MS --- -static bool arret_demande = false; -static bool existCtrlCContinue = false; +bool arret_demande = false; +bool existCtrlCContinue = false; // // The signal handler - installed in the eoCtrlCContinue Ctor diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 66708083a..92ab661cc 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -30,9 +30,10 @@ #ifndef eoCtrlCContinue_h #define eoCtrlCContinue_h +#include #include -extern bool arret_demande, existCtrlCContinue; +extern bool arret_demande, existCtrlCContinue; extern void signal_handler( int sig ); From eafaa2d65e1200a5be83a3d6edc2dc101a179b87 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 10 Apr 2001 15:08:09 +0000 Subject: [PATCH 0545/2134] Added the pure virtual isItThere method in base class eoParameterLoader Also made the corresponding isItThere method in eoParser public. This allows one to test if the user did actually input a given parameter and thus not to write it in the output if not - as we want the output of printOn to be "as identical as possible" to the actual user input --- eo/src/utils/eoParser.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 7edf8e935..f95956de4 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2001-03-21 13:35:10 $ $Version$ $Author: jmerelo $ +CVS Info: $Date: 2001-04-10 15:08:09 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -56,6 +56,11 @@ public : */ virtual void processParam(eoParam& param, std::string section = "") = 0; + /** + * checks if _param has been actually entered + */ + virtual bool isItThere(eoParam& _param) const = 0; + /** * Construct a Param and sets its value. The loader will own the memory thus created * @@ -138,12 +143,16 @@ public: string ProgramName() { return programName; } + /** + * checks if _param has been actually entered by the user + */ + virtual bool isItThere(eoParam& _param) const + { return getValue(_param).first; } + private: void doRegisterParam(eoParam& param) const; - bool isItThere(eoParam& _param) const { return getValue(_param).first; } - std::pair getValue(eoParam& _param) const; void updateParameters() const; From 28c6b9a2855dd492f848a0b509fa6db24db5ee81 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 11 Apr 2001 04:44:39 +0000 Subject: [PATCH 0546/2134] Modified printOn so that parameters that are not set explicitely by the user are commented out - but still appear. Uses the (now public and pure virtual in the base class eoParameterLoader) method isItThere. --- eo/src/utils/eoParser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 0191d53f9..451da162d 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -213,7 +213,7 @@ void eoParser::printOn(ostream& os) const printSectionHeader(os, section); //print every param with its value for (; p != params.end(); ++p) - { + { std::string newSection = p->first; if (newSection != section) @@ -224,6 +224,9 @@ void eoParser::printOn(ostream& os) const eoParam* param = p->second; + if (!isItThere(*param)) // comment out the ones not set by the user + os << "# "; + string str = "--" + param->longName() + "=" + param->getValue(); os.setf(ios_base::left, ios_base::adjustfield); From 64990a1ac4069d6e5b32ffba960fe54685a61853 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 11 Apr 2001 12:01:51 +0000 Subject: [PATCH 0547/2134] Changed all variables named howmany into combien (French for how many) because of a silly problem on Solaris (howmany seems to be some macro???) --- eo/src/eoInit.h | 11 +++++------ eo/src/eoMerge.h | 22 +++++++++++----------- eo/src/utils/eoHowMany.h | 12 ++++++------ 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index ac875b244..af0198eec 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -55,18 +55,18 @@ class eoInitFixedLength: public eoInit typedef typename EOT::AtomType AtomType; - eoInitFixedLength(unsigned _howmany, eoRndGenerator& _generator) - : howmany(_howmany), generator(_generator) {} + eoInitFixedLength(unsigned _combien, eoRndGenerator& _generator) + : combien(_combien), generator(_generator) {} void operator()(EOT& chrom) { - chrom.resize(howmany); + chrom.resize(combien); std::generate(chrom.begin(), chrom.end(), generator); chrom.invalidate(); } private : - unsigned howmany; + unsigned combien; /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics eoSTLF generator; }; @@ -87,8 +87,7 @@ class eoInitVariableLength: public eoInit void operator()(EOT& chrom) { - unsigned howmany = offset + rng.random(extent); - chrom.resize(howmany); + chrom.resize(offset + rng.random(extent)); generate(chrom.begin(), chrom.end(), generator); chrom.invalidate(); } diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index ae8b00bea..27e6e49bd 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -56,7 +56,7 @@ template class eoElitism : public eoMerge { public : eoElitism(double _rate, bool _interpret_as_rate = true): - rate(0), howmany(0) + rate(0), combien(0) { if (_interpret_as_rate) { @@ -68,27 +68,27 @@ public : { if (_rate<0) throw std::logic_error("Negative number of offspring in eoElitism!"); - howmany = (unsigned int)_rate; - if (howmany != _rate) + combien = (unsigned int)_rate; + if (combien != _rate) cout << "Warning: Number of guys to merge in eoElitism was rounded"; } } void operator()(const eoPop& _pop, eoPop& _offspring) { - if ((howmany == 0) && (rate == 0.0)) + if ((combien == 0) && (rate == 0.0)) return; - unsigned howmanyLocal; - if (howmany == 0) // rate is specified - howmanyLocal = (unsigned int) (rate * _pop.size()); + unsigned combienLocal; + if (combien == 0) // rate is specified + combienLocal = (unsigned int) (rate * _pop.size()); else - howmanyLocal = howmany; + combienLocal = combien; - if (howmanyLocal > _pop.size()) + if (combienLocal > _pop.size()) throw std::logic_error("Elite larger than population"); vector result; - _pop.nth_element(howmanyLocal, result); + _pop.nth_element(combienLocal, result); for (size_t i = 0; i < result.size(); ++i) { @@ -98,7 +98,7 @@ public : private : double rate; - unsigned howmany; + unsigned combien; }; /** diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 7776b6c2d..fcdce5967 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -40,7 +40,7 @@ class eoHowMany { public: eoHowMany(double _rate, bool _interpret_as_rate = true): - rate(0), howmany(0) + rate(0), combien(0) { if (_interpret_as_rate) { @@ -50,27 +50,27 @@ public: { if (_rate<0) throw std::logic_error("Negative number in eoHowMany!"); - howmany = (unsigned int)_rate; - if (howmany != _rate) + combien = (unsigned int)_rate; + if (combien != _rate) cout << "Warning: Number was rounded in eoHowMany"; } } unsigned int operator()(unsigned int _size) { - if (howmany == 0) + if (combien == 0) { if (rate == 0.0) return 0; else return (unsigned int) (rate * _size); } - return howmany; + return combien; } private : double rate; - unsigned howmany; + unsigned combien; }; From 78f6c6ef3c83da52cc88801fd4fb2ce1656bbb31 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 12 Apr 2001 05:28:23 +0000 Subject: [PATCH 0548/2134] Added a few "virtual" that were missing --- eo/src/eoEvalFunc.h | 2 +- eo/src/eoInit.h | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 233599b41..9451e66f1 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -56,7 +56,7 @@ template class eoEvalFuncCounter : public eoEvalFunc, public eoV eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") : eoValueParam(0, _name), func(_func) {} - void operator()(EOT& _eo) + virtual void operator()(EOT& _eo) { if (_eo.invalid()) { diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index af0198eec..1e8b0112e 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -43,7 +43,11 @@ template class eoInit : public eoUF -{}; +{ +public: + virtual void operator()(EOT& chrom) + { cout << "In the eoInit base class" << endl; } +}; /** Initializer for fixed length representations with a single type @@ -58,7 +62,7 @@ class eoInitFixedLength: public eoInit eoInitFixedLength(unsigned _combien, eoRndGenerator& _generator) : combien(_combien), generator(_generator) {} - void operator()(EOT& chrom) + virtual void operator()(EOT& chrom) { chrom.resize(combien); std::generate(chrom.begin(), chrom.end(), generator); @@ -85,7 +89,7 @@ class eoInitVariableLength: public eoInit throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); } - void operator()(EOT& chrom) + virtual void operator()(EOT& chrom) { chrom.resize(offset + rng.random(extent)); generate(chrom.begin(), chrom.end(), generator); From e3834441fdd1e02a7f42f6a80e6fc0b654825d87 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 12 Apr 2001 05:29:34 +0000 Subject: [PATCH 0549/2134] Added a new boolean argument to the ctor of eoBitMutation: you can now specify a rate-per-bit that will be normalized by the chromSize --- eo/src/ga/eoBitOp.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 61117a46d..951c1c506 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -132,7 +132,8 @@ template class eoBitMutation: public eoMonOp * (Default) Constructor. * @param _rate Rate of mutation. */ - eoBitMutation(const double& _rate = 0.01): rate(_rate) {} + eoBitMutation(const double& _rate = 0.01, bool _normalize=false): + rate(_rate), normalize(_normalize) {} /// The class name. virtual string className() const { return "eoBitMutation"; } @@ -143,9 +144,10 @@ template class eoBitMutation: public eoMonOp */ bool operator()(Chrom& chrom) { + double actualRate = (normalize ? rate/chrom.size() : rate); bool changed_something = false; for (unsigned i = 0; i < chrom.size(); i++) - if (eo::rng.flip(rate)) + if (eo::rng.flip(actualRate)) { chrom[i] = !chrom[i]; changed_something = true; @@ -156,6 +158,7 @@ template class eoBitMutation: public eoMonOp private: double rate; + bool normalize; // divide rate by chromSize }; From 369ef1708177ca18c49df8cc4dae4b555a91b054 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 12 Apr 2001 05:35:05 +0000 Subject: [PATCH 0550/2134] Modified the default behavior of eoCountedStateSaver to save the final population. So if you don't want any population save, don't use any eoCountedStateSaver. --- eo/src/utils/eoUpdater.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index 32b800db5..593c6aa41 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -95,7 +95,7 @@ public : eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav") : state(_state), interval(_interval), counter(0), - saveOnLastCall(false), + saveOnLastCall(true), prefix(_prefix), extension(_extension) {} virtual void lastCall(void); From 51c15ed0b8f16d6cdbc9bf821fde77e77abe2904 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 12 Apr 2001 16:46:55 +0000 Subject: [PATCH 0551/2134] Added eoCloneOps.h that contains ... cloning instances of eoXXXOp (all in 1 file, sorry JJ). Modified eo - also added a few comments there --- eo/src/eo | 9 ++++-- eo/src/eoCloneOps.h | 79 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 eo/src/eoCloneOps.h diff --git a/eo/src/eo b/eo/src/eo index bf380700f..9e637cbde 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -46,6 +46,7 @@ #define eo_is_an_integer false //----------------------------------------------------------------------------- +// gneral purpose #include #include #include @@ -65,10 +66,15 @@ #include #include +// the variation operators #include #include +#include #include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include +// population #include // Evaluation functions @@ -109,9 +115,6 @@ #include #include -// Variation -#include - // a simple transformer #include diff --git a/eo/src/eoCloneOps.h b/eo/src/eoCloneOps.h new file mode 100644 index 000000000..89a91db4f --- /dev/null +++ b/eo/src/eoCloneOps.h @@ -0,0 +1,79 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoCloneOps.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2001-04-12 16:46:55 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoCloneOps.h,v 1.1 2001-04-12 16:46:55 evomarc Exp $ $Author: evomarc $ + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCloneOps_H +#define _eoCloneOps_H + +#include + +/** + * The different null-variation operators (i.e. they do nothing) + * + * eoQuadCloneOp at least is useful to emulate the standard + * crossover(pCross) + mutation(pMut) + * within the eoGenOp framework + * eoMonCloneOp will probably be useful as the copy operator + * eoBinCloneOp will certainly never been used - but let's be complete :-) + */ + +/** +Mon clone: one argument +*/ +template +class eoMonCloneOp: public eoMonOp +{ +public: + /// Ctor + eoMonCloneOp() : eoMonOp() {} + virtual string className() const {return "eoMonCloneOp";} + virtual bool operator()(EOT&){return false;} +}; + + +/** Binary clone: two operands, only the first could be modified + */ +template +class eoBinCloneOp: public eoBinOp +{ +public: + /// Ctor + eoBinCloneOp() : eoBinOp() {} + virtual string className() const {return "eoBinCloneOp";} + virtual bool operator()(EOT&, const EOT&){return false;} +}; + +/** Quad clone: two operands, both could be modified - but are not! +*/ +template +class eoQuadCloneOp: public eoQuadOp +{ +public: + /// Ctor + eoQuadCloneOp():eoQuadOp() {} + virtual string className() const {return "eoQuadCloneOp";} +virtual bool operator()(EOT& , EOT& ) {return false;} +}; + +#endif + From e71aea497fa62098651452db706e8824971e295a Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 13 Apr 2001 08:57:40 +0000 Subject: [PATCH 0552/2134] Few cosmetic modifs: put the #define of some boolean in eoData.h added some include that were missing (unnoticed because of include) some checks in eoXXXTournamentSelect --- eo/src/eo | 19 +------------------ eo/src/eoDetTournamentSelect.h | 2 +- eo/src/eoEasyEA.h | 1 + eo/src/eoStochTournamentSelect.h | 6 +++++- eo/src/utils/checkpointing | 2 +- eo/src/utils/eoData.h | 16 ++++++++++++++++ 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 9e637cbde..3b7c78b69 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -28,25 +28,8 @@ #ifndef _eo_ #define _eo_ -// some defines to make things easier to get at first sight - -// tunigni the amount of output using a boolean argument: -// true should always mean more output -#define eo_verbose true -#define eo_no_verbose false -// to be used in selection / replacement procedures to indicate whether -// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) -// or as an absolute integer (number=rate regardless of popsize). -// the default value shoudl ALWAYS be true (eo_as_a_rate). -// -// this construct is mandatory because in some cases you might not know the -// population size that will enter the replacement for instance - so you -// cannot simply have a pre-computed (double) rate of 1/popSize -#define eo_is_a_rate true -#define eo_is_an_integer false //----------------------------------------------------------------------------- - -// gneral purpose +// general purpose #include #include #include diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index 667577fb8..df25ff45d 100755 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -50,7 +50,7 @@ template class eoDetTournamentSelect: public eoSelectOne eoDetTournamentSelect(unsigned _tSize = 2 ):eoSelectOne(), tSize(_tSize) { // consistency check if (tSize < 2) { - cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; + cout << "Warning, Tournament size should be >= 2\nAdjusted to 2\n"; tSize = 2; } } diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index a152abfad..d28f62af5 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -27,6 +27,7 @@ //----------------------------------------------------------------------------- +#include #include #include #include diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h index 0b9989e36..75a8b508a 100755 --- a/eo/src/eoStochTournamentSelect.h +++ b/eo/src/eoStochTournamentSelect.h @@ -46,11 +46,15 @@ template class eoStochTournamentSelect: public eoSelectOne /// eoStochTournamentSelect(float _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) { - // consistency check + // consistency checks if (Trate < 0.5) { cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; Trate = 0.55; } + if (Trate > 1) { + cerr << "Warning, Tournament rate should be < 1\nAdjusted to 1\n"; + Trate = 1; + } } /** Perform the stochastic tournament */ diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index e570183ad..dfa659349 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -13,4 +13,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index 1ba358605..b7327687b 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -59,6 +59,22 @@ using namespace std; #endif //----------------------------------------------------------------------------- +// some defines to make things easier to get at first sight + +// tuning the amount of output using a boolean argument: +// true should always mean more output +#define eo_verbose true +#define eo_no_verbose false +// to be used in selection / replacement procedures to indicate whether +// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) +// or as an absolute integer (number=rate regardless of popsize). +// the default value shoudl ALWAYS be true (eo_as_a_rate). +// +// this construct is mandatory because in some cases you might not know the +// population size that will enter the replacement for instance - so you +// cannot simply have a pre-computed (double) rate of 1/popSize +#define eo_is_a_rate true +#define eo_is_an_integer false #endif EODATA_H From 56c9464306a795a94e96d43f49c314361f0bffea Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 04:52:04 +0000 Subject: [PATCH 0553/2134] The new libga Apart from big changes in the src/ga dir, and the addition of the src/do dir it also generated a few changes here and there, e.g. some include file still missing. Also removed some warning from some test files. --- eo/src/do/Readme | 33 ++++ eo/src/do/make_algo_scalar.h | 186 +++++++++++++++++++++ eo/src/do/make_checkpoint.h | 269 ++++++++++++++++++++++++++++++ eo/src/do/make_continue.h | 157 +++++++++++++++++ eo/src/do/make_help.cpp | 54 ++++++ eo/src/do/make_pop.h | 97 +++++++++++ eo/src/do/make_run.h | 45 +++++ eo/src/eo | 2 + eo/src/eoEasyEA.h | 1 + eo/src/eoEvalFunc.h | 26 --- eo/src/eoReduce.h | 3 +- eo/src/eoVariableLengthMutation.h | 12 +- eo/src/ga/Makefile.am | 9 +- eo/src/ga/Readme | 21 +++ eo/src/ga/ga.cpp | 91 ---------- eo/src/ga/ga.h | 84 +++++++++- eo/src/ga/make_algo_scalar_ga.cpp | 59 +++++++ eo/src/ga/make_checkpoint_ga.cpp | 59 +++++++ eo/src/ga/make_continue_ga.cpp | 59 +++++++ eo/src/ga/make_genotype_ga.cpp | 53 ++++++ eo/src/ga/make_help.cpp | 54 ++++++ eo/src/ga/make_op_ga.cpp | 57 +++++++ eo/src/ga/make_pop_ga.cpp | 60 +++++++ eo/src/ga/make_run_ga.cpp | 61 +++++++ eo/src/utils/eoParam.h | 169 +++++++++++++++++++ eo/src/utils/eoParser.cpp | 26 +++ eo/src/utils/selectors.h | 2 +- eo/test/t-eoGA.cpp | 57 +++++-- eo/test/t-eoRandom.cpp | 4 +- eo/test/t-eoSelect.cpp | 17 +- eo/test/t-eoStateAndParser.cpp | 6 + eo/test/t-eoVector.cpp | 4 +- 32 files changed, 1679 insertions(+), 158 deletions(-) create mode 100644 eo/src/do/Readme create mode 100644 eo/src/do/make_algo_scalar.h create mode 100644 eo/src/do/make_checkpoint.h create mode 100644 eo/src/do/make_continue.h create mode 100644 eo/src/do/make_help.cpp create mode 100644 eo/src/do/make_pop.h create mode 100644 eo/src/do/make_run.h create mode 100644 eo/src/ga/Readme delete mode 100644 eo/src/ga/ga.cpp create mode 100644 eo/src/ga/make_algo_scalar_ga.cpp create mode 100644 eo/src/ga/make_checkpoint_ga.cpp create mode 100644 eo/src/ga/make_continue_ga.cpp create mode 100644 eo/src/ga/make_genotype_ga.cpp create mode 100644 eo/src/ga/make_help.cpp create mode 100644 eo/src/ga/make_op_ga.cpp create mode 100644 eo/src/ga/make_pop_ga.cpp create mode 100644 eo/src/ga/make_run_ga.cpp diff --git a/eo/src/do/Readme b/eo/src/do/Readme new file mode 100644 index 000000000..70b1d9c00 --- /dev/null +++ b/eo/src/do/Readme @@ -0,0 +1,33 @@ +This directory contains templatized code that is supposed to be +instanciated and compiled in an actual library for every type of EOType + +The user can then modify and recompile only the part he/she wishes to +change (as in any library!). + +See in EO src/ga dir the corresponding .cpp files, that simply instanciate +the functions here for eoBit AND eoBit +and in EO test dir the t-eoGA.cpp file that is a sample program that uses +the whole facility. + +All make_XXX.h file define some parser-based constructions of basic +Evolutionary Algorithms components, using state-based memory management +(see in src/utils dir, or read the tutorial). + +In this src/do dir, the following ***representation indedendent*** code +is defined + +make_algo_scalar.h The selection/replacement for scalar fitnesses +make_checkpoint.h The output facilities +make_continue.h The stpping criteria +make_help.cpp Help on demand (+ status file) +make_pop.h Init of the population (from an EOT initializer) +make_run.h Run the algorithm + +Note: +two additional make_XXX.h files need to be defined for each representation + +make_genotype.h Builds an initializer for the corresponding EOType +make_op.h Builds a general Operator to be used in the algo + +MS, April 23, 2001 + diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h new file mode 100644 index 000000000..34949dbc6 --- /dev/null +++ b/eo/src/do/make_algo_scalar.h @@ -0,0 +1,186 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_run_h +#define _make_run_h + +#include // for eo_is_a_rate +// everything tha's needed for the algorithms - SCALAR fitness + +// Selection +// the eoSelectOne's +#include // also contains the eoSequentialSelect +#include +#include +#include +#include +#include + +// Breeders +#include + +// Replacement +// #include +#include +#include +#include + +// Algorithm (only this one needed) +#include + + // also need the parser and param includes +#include +#include + + +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here +*/ + +template +eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _ccontinue, eoGenOp& _op) +{ + // the selection + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "engine"); + + eoParamParamType & ppSelect = selectionParam.value(); // pair > + + eoSelectOne* select ; + if (ppSelect.first == string("DetTour")) + { + unsigned size; + istrstream is(ppSelect.second[0].c_str()); // size of det tournament + is >> size; + select = new eoDetTournamentSelect(size); + } + else if (ppSelect.first == string("StochTour")) + { + double p; + istrstream is(ppSelect.second[0].c_str()); // proba of binary tournament + is >> p; + select = new eoStochTournamentSelect(p); + } + else if (ppSelect.first == string("Sequential")) // one after the other + { + if (ppSelect.second.size() == 0) // no argument -> default = ordered + select = new eoSequentialSelect; + else + { + bool b; + istrstream is(ppSelect.second[0].c_str()); + is >> b; + select = new eoStochTournamentSelect(b); + } + } + else if (ppSelect.first == string("Roulette")) // no argument (yet) + { + select = new eoProportionalSelect; + } + else + throw runtime_error("Invalid selection"); + + _state.storeFunctor(select); + + // the number of offspring + eoValueParam& offspringRateParam = _parser.createParam(eoRateParamType("100%"), "offspringRate", "Nb of offspring (percentage or absolute)", 'O', "engine"); + // an eoRateParamType is simply a pair + double offRate=offspringRateParam.value().first; + bool offInterpret_as_rate = offspringRateParam.value().second; + + // the replacement + eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T)", 'R', "engine"); + + eoParamParamType & ppReplace = replacementParam.value(); // pair > + + eoReplacement* replace ; + if (ppReplace.first == string("Comma")) // Comma == generational + { + replace = new eoCommaReplacement; + } + else if (ppReplace.first == string("Plus")) + { + replace = new eoPlusReplacement; + } + else if (ppReplace.first == string("EPTour")) + { + unsigned size; + istrstream is(ppReplace.second[0].c_str()); // size of EP tournament + is >> size; + replace = new eoEPReplacement(size); + } + else if (ppReplace.first == string("SSGAWorse")) + { + replace = new eoSSGAWorseReplacement; + } + else if (ppReplace.first == string("SSGADet")) + { + unsigned size; + istrstream is(ppReplace.second[0].c_str()); // size of Det. tournament + is >> size; + replace = new eoSSGADetTournamentReplacement(size); + } + else if (ppReplace.first == string("SSGAStoch")) + { + double p; + istrstream is(ppReplace.second[0].c_str()); // proba of binary tournament + is >> p; + replace = new eoSSGAStochTournamentReplacement(p); + } + else + throw runtime_error("Invalid replacement"); + + _state.storeFunctor(replace); + + // adding weak elitism + eoValueParam& weakElitismParam = _parser.createParam(false, "weakElitism", "Old best parent replaces new worst offspring *if necessary*", 'w', "engine"); + if (weakElitismParam.value()) + { + eoReplacement *replaceTmp = replace; + replace = new eoWeakElitistReplacement(*replaceTmp); + _state.storeFunctor(replace); + } + + // the general breeder + eoGeneralBreeder *breed = + new eoGeneralBreeder(*select, _op, offRate, offInterpret_as_rate); + _state.storeFunctor(breed); + // now the eoEasyEA + eoAlgo *algo = new eoEasyEA(_ccontinue, _eval, *breed, *replace); + _state.storeFunctor(algo); + // that's it! + return *algo; +} + +#endif diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h new file mode 100644 index 000000000..0efd02b37 --- /dev/null +++ b/eo/src/do/make_checkpoint.h @@ -0,0 +1,269 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_h +#define _make_checkpoint_h + +#include +#include // for minimizing_fitness() +#include +#include +#include + +/////////////////// The checkpoint and other I/O ////////////// + + +template +eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + // first, create a checkpoint from the eoContinue + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + _state.storeFunctor(checkpoint); + + /////////////////// + // Counters + ////////////////// + // is nb Eval to be used as counter? + eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); + + // Create anyway a generation-counter parameter + eoValueParam *generationCounter = new eoValueParam(0, "Gen."); + // Create an incrementor (sub-class of eoUpdater). + eoIncrementor* increment = new eoIncrementor(generationCounter->value()); + // Add it to the checkpoint, + checkpoint->add(*increment); + // and store it in the state + _state.storeFunctor(increment); + + ///////////////////////////////////////// + // now some statistics on the population: + ///////////////////////////////////////// + /** + * existing stats as of today, April 10. 2001 + * + * eoBestFitnessStat : best value in pop - type EOT::Fitness + * eoAverageStat : average value in pop - type EOT::Fitness + * eoSecondMomentStat: average + stdev - type pair + * eoSortedPopStat : whole population - type string (!!) + * eoScalarFitnessStat: the fitnesses - type vector + * eoDFCSTat : FDC wrt best in pop or absolute best - type double + * requires an eoDistance. See eoFDCStat.h + * also computes all elements for the FDC scatter plot + */ + + // Best fitness in population + //--------------------------- + eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); + eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output"); + eoValueParam& bestFileNameParam = _parser.createParam(string("best.xg"), "BestFileName", "Name of file for Best/avg/stdev", '\0', "Output"); + bool fileBestParam = _parser.isItThere(bestFileNameParam); + + eoBestFitnessStat *bestStat = NULL; + if ( printBestParam.value() || plotBestParam.value() || fileBestParam ) + // we need the bestStat for at least one of the 3 above + { + bestStat = new eoBestFitnessStat; + // store it + _state.storeFunctor(bestStat); + // add it to the checkpoint + checkpoint->add(*bestStat); + } + + // Average fitness alone + //---------------------- + eoAverageStat *averageStat = NULL; // do we need averageStat? + if ( plotBestParam.value() ) // we need it for gnuplot output + { + averageStat = new eoAverageStat; + // store it + _state.storeFunctor(averageStat); + // add it to the checkpoint + checkpoint->add(*averageStat); + } + + // Second moment stats: average and stdev + //--------------------------------------- + eoSecondMomentStats *secondStat = NULL; + if ( printBestParam.value() ) // we need it for sreen output + { + secondStat = new eoSecondMomentStats; + // store it + _state.storeFunctor(secondStat); + // add it to the checkpoint + checkpoint->add(*secondStat); + } + + + // Dump of the whole population + //----------------------------- + eoSortedPopStat *popStat = NULL; + eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); + if ( printPopParam.value() ) // we do want pop dump + { + popStat = new eoSortedPopStat("Dump of whole population"); + // store it + _state.storeFunctor(popStat); + // add it to the checkpoint + checkpoint->add(*popStat); + } + + + // the Fitness Distance Correlation + //--------------------------------- + eoValueParam& printFDCParam = _parser.createParam(true, "printFDC", "Print FDC coeff. every gen.", '\0', "Output"); + eoValueParam& plotFDCParam = _parser.createParam(false, "plotFDCStat", "Plot FDC scatter plot", '\0', "Output"); + + eoFDCStat *fdcStat = NULL; + if ( printFDCParam.value() || plotFDCParam.value() ) // we need FDCStat + { + // need first an object to compute the distances - here Hamming dist. + eoQuadDistance *dist = new eoQuadDistance; + _state.storeFunctor(dist); + fdcStat = new eoFDCStat(*dist); + // storeFunctor it + _state.storeFunctor(fdcStat); + // add it to the checkpoint + checkpoint->add(*fdcStat); + } + + /////////////// + // The monitors + /////////////// + // do we want an eoStdoutMonitor? + bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() + || printPopParam.value() ; + + // The Stdout monitor will print parameters to the screen ... + if ( needStdoutMonitor ) + { + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); + + // when called by the checkpoint (i.e. at every generation) + checkpoint->add(*monitor); + + // the monitor will output a series of parameters: add them + monitor->add(*generationCounter); + if (useEvalParam.value()) // we want nb of evaluations + monitor->add(_eval); + if (printBestParam.value()) + { + monitor->add(*bestStat); + monitor->add(*secondStat); + } + if (printFDCParam.value()) + monitor->add(*fdcStat); + if ( printPopParam.value()) + monitor->add(*popStat); + } + + if (fileBestParam) // A file monitor for best & secondMoment + { + eoFileMonitor *fileMonitor = new eoFileMonitor(bestFileNameParam.value()); + // save and give to checkpoint + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + // and feed with some statistics + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + fileMonitor->add(*bestStat); + fileMonitor->add(*secondStat); + } + + if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average + { + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor("_gnu_best.xg",minimizing_fitness()); + // save and give to checkpoint + _state.storeFunctor(gnuMonitor); + checkpoint->add(*gnuMonitor); + // and feed with some statistics + if (useEvalParam.value()) + gnuMonitor->add(_eval); + else + gnuMonitor->add(*generationCounter); + gnuMonitor->add(*bestStat); + gnuMonitor->add(*averageStat); + } + + if (plotFDCParam.value()) // a specific plot monitor for FDC + { + // first into a file (it adds everything ti itself + eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat); + _state.storeFunctor(fdcFileSnapshot); + // then to a Gnuplot monitor + eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); + _state.storeFunctor(fdcGnuplot); + + // and of course add them to the checkPoint + checkpoint->add(*fdcFileSnapshot); + checkpoint->add(*fdcGnuplot); + } + + eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output"); + if (plotHistogramParam.value()) // want to see how the fitness is spread? + { + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot("Fitnesses"); + _state.storeFunctor(fitSnapshot); + // add any stat that is a vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + } + + ////////////////////////////////// + // State savers + ////////////////////////////// + + // feed the state to state savers + // save state every N generation + eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); + + if (_parser.isItThere(saveFrequencyParam)) + { + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, "generation"); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } + + // save state every T seconds + eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); + if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) + { + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, "time"); + _state.storeFunctor(stateSaver2); + checkpoint->add(*stateSaver2); + } + + // and that's it for the (control and) output + return *checkpoint; +} + +#endif diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h new file mode 100644 index 000000000..cda5d9a21 --- /dev/null +++ b/eo/src/do/make_continue.h @@ -0,0 +1,157 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_continue_h +#define _make_continue_h + +/* +Contains the templatized version of parser-based choice of stopping criterion +It can then be instantiated, and compiled on its own for a given EOType +(see e.g. in dir ga, ga.cpp) +*/ + +// Continuators - all include eoContinue.h +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif + + // also need the parser and param includes +#include +#include + + +/////////////////// the stopping criterion //////////////// +template +eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) +{ + if (_combined) // already exists + _combined->add(*_cont); + else + _combined = new eoCombinedContinue(*_cont); + return _combined; +} + +template +eoContinue & do_make_continue(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + //////////// Stopping criterion /////////////////// + // the combined continue - to be filled + eoCombinedContinue *continuator = NULL; + + // for each possible criterion, check if wanted, otherwise do nothing + + // First the eoGenContinue - need a default value so you can run blind + // but we also need to be able to avoid it <--> 0 + eoValueParam& maxGenParam = _parser.createParam(unsigned(100), "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); + + if (maxGenParam.value()) // positive: -> define and store + { + eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); + _state.storeFunctor(genCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, genCont); + } + + // the steadyGen continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyGenContinue *steadyCont = new eoSteadyGenContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + + // Same thing with Eval - but here default value is 0 + eoValueParam& maxEvalParam = _parser.createParam(unsigned(0), "maxEval", "Maximum number of evaluations (0 = none)",'E',"Stopping criterion"); + + if (maxEvalParam.value()) // positive: -> define and store + { + eoEvalContinue *evalCont = new eoEvalContinue(_eval, maxEvalParam.value()); + _state.storeFunctor(evalCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, evalCont); + } + /* + // the steadyEval continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyGenContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + */ + // the target fitness + eoFitContinue *fitCont; + eoValueParam& targetFitnessParam = _parser.createParam(double(0.0), "targetFitness", "Stop when fitness reaches",'T', "Stopping criterion"); + if (_parser.isItThere(targetFitnessParam)) + { + fitCont = new eoFitContinue + (targetFitnessParam.value()); + // store + _state.storeFunctor(fitCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, fitCont); + } + +#ifndef _MSC_VER + // the CtrlC interception (Linux only I'm afraid) + eoCtrlCContinue *ctrlCCont; + eoValueParam& ctrlCParam = _parser.createParam(false, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); + if (_parser.isItThere(ctrlCParam)) + { + ctrlCCont = new eoCtrlCContinue; + // store + _state.storeFunctor(ctrlCCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, ctrlCCont); + } +#endif + + // now check that there is at least one! + if (!continuator) + throw runtime_error("You MUST provide a stopping criterion"); + // OK, it's there: store in the eoState + _state.storeFunctor(continuator); + + // and return + return *continuator; +} + +#endif diff --git a/eo/src/do/make_help.cpp b/eo/src/do/make_help.cpp new file mode 100644 index 000000000..31cb749f6 --- /dev/null +++ b/eo/src/do/make_help.cpp @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_help.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- +#include +#include + +/** Generation of the status file, and output of the help message if needed + * + * MUST be called after ALL parameters have been read in order to list them + * + * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, + * but compiled separately and stored in a library. + */ +void make_help(eoParser & _parser) +{ + // name of the "status" file where all actual parameter values will be saved + string str_status = _parser.ProgramName() + ".status"; // default value + eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (_parser.userNeedsHelp()) + { + _parser.printHelp(cout); + exit(1); + } + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << _parser; // and you can use that file as parameter file + } +} diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h new file mode 100644 index 000000000..2ab383094 --- /dev/null +++ b/eo/src/do/make_pop.h @@ -0,0 +1,97 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_pop_h +#define _make_pop_h + +#include +#include +#include +#include +#include + + +///////////////////////////////// INIT POP /////////////////////////////// +/** + * Templatized version of parser-based construct of the population + * + other initializations that are NOT representation-dependent. + * + * It must then be instantiated, and compiled on its own for a given EOType + * (see e.g. ga.h and ga.pp in dir ga) +*/ + + +template +eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _init) +{ + eoValueParam& seedParam = _parser.createParam(uint32(time(0)), "seed", "Random number seed", 'S'); + eoValueParam& popSize = _parser.createParam(unsigned(20), "PopSize", "Population Size", 'P', "initialization"); + + // Either load or initialize + // create an empty pop and let the state handle the memory + eoPop& pop = _state.takeOwnership(eoPop()); + + eoValueParam& loadNameParam = _parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ); + eoValueParam & recomputeFitnessParam = _parser.createParam(false, "recomputeFitness", "Recompute the fitness after re-loading the pop.?", 'r', "Persistence" ); + + if (loadNameParam.value() != "") // something to load + { + // create another state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact continuation of the saved run + // eventually with different parameters + inState.registerObject(pop); + inState.registerObject(rng); + inState.load(loadNameParam.value()); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + if (recomputeFitnessParam.value()) + { + for (unsigned i=0; i + +/* + * A trivial function - only here to allow instanciation with a give EOType + * and separate compilation - see in ga dir, make_run_ga + * +*/ + +template +void do_run(eoAlgo& _algo, eoPop& _pop) +{ + _algo(_pop); +} + +#endif diff --git a/eo/src/eo b/eo/src/eo index 3b7c78b69..0ac3bda36 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -67,7 +67,9 @@ // Continuators - all include eoContinue.h #include #include +#include #include +#include #include #ifndef _MSC_VER #include // CtrlC handling (using 2 global variables!) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index d28f62af5..c762b8ee0 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 9451e66f1..73a27bac7 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -44,30 +44,4 @@ template class eoEvalFunc : public eoUF typedef typename EOT::Fitness EOFitT; }; -/** -Counts the number of evaluations actually performed, thus checks first -if it has to evaluate.. etc. -*/ - -#include -template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam -{ - public : - eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") - : eoValueParam(0, _name), func(_func) {} - - virtual void operator()(EOT& _eo) - { - if (_eo.invalid()) - { - value()++; - func(_eo); - } - } - - private : - eoEvalFunc& func; -}; - - #endif diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index a653f8ef2..4c0ff77c3 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -89,7 +89,8 @@ typedef typename EOT::Fitness Fitness; t_size(_t_size) { if (t_size < 2) - { // warning, error? + { + cout << "Warning: EP tournament size should be >= 2. Adjusted" << endl; t_size = 2; } } diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 2a2d87d35..b9c089f48 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-03-21 13:09:47 $ $Version$ $Author: jmerelo $ + CVS Info: $Date: 2001-04-24 04:52:04 $ $Version$ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -187,19 +187,23 @@ public : /** ctor with an external gene chooser - * @param nMin min number of atoms t oleave in the individual + * @param nMin min number of atoms to leave in the individual * @param _geneChooser an eoGeneCHooser to choose which one to delete */ eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : nMin(_nMin), uChooser(), chooser(_chooser) {} - /** ctor with unifirm gebe chooser + /** ctor with uniform gene chooser - * @param nMin min number of atoms t oleave in the individual + * @param nMin min number of atoms to leave in the individual */ eoVlDelMutation(unsigned _nMin) : nMin(_nMin), uChooser(), chooser(uChooser) {} + /** Do the job (delete one gene) + + * @param _eo the EO to mutate + */ bool operator()(EOT & _eo) { if (_eo.size() <= nMin) diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 38d1695c5..7bf8a6c69 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -6,7 +6,14 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libga.a -libga_a_SOURCES = ga.cpp +libga_a_SOURCES = make_algo_scalar_ga.cpp \ + make_checkpoint_ga.cpp \ + make_continue_ga.cpp \ + make_genotype_ga.cpp \ + make_help.cpp \ + make_op_ga.cpp \ + make_pop_ga.cpp \ + make_run_ga.cpp CPPFLAGS = -O2 -Wall diff --git a/eo/src/ga/Readme b/eo/src/ga/Readme new file mode 100644 index 000000000..69d7d4660 --- /dev/null +++ b/eo/src/ga/Readme @@ -0,0 +1,21 @@ +This directory contains: + +- some standard EO source files, named eoXXXXX, that define objects +for the eoBit representation (bitstrings). + +- some make_XXX.cpp files that are instanciations for EO bitstrings +(eoBit AND eoBit) of the tempatized code +that is defined in the EO src/do dir. +This MK's trick allows to actually compile all these bits in a library +(eolibga.a) and to only recompile the bits you need for your own +(bitstring!) application. +@see src/do/make_XXX.h files, and test/t-eoGA.cpp for an example use. + +Note: +Also are *defined* here two representation dependent make_XXX.h files +(together with their instanciations in make_XXX.cpp), namely the ones +that constructs the EOType initializer (make_genotype.h) and the one +that buils up the operators (make_op.h). + +MS, April 23, 2001CVS + diff --git a/eo/src/ga/ga.cpp b/eo/src/ga/ga.cpp deleted file mode 100644 index be17928b2..000000000 --- a/eo/src/ga/ga.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include - -eoValueParam xoverRate(0.6f, "xoverrate", "The crossover rate", 'x'); -eoValueParam mutRate(1.0f, "mutationrate", "The mutation rate", 'm'); -eoValueParam chromSize(unsigned(10), "chromosomeSize", "The length of the bitstrings", 'n'); -eoValueParam popSize(unsigned(20), "PopSize", "Population Size", 'P'); - -template -eoAlgo >& do_make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& _state) -{ - typedef eoBit EOT; - - _parser.processParam(xoverRate, "genetics"); - _parser.processParam(mutRate, "genetics"); - _parser.processParam(chromSize, "initialization"); - - eoBitMutation* mutOp = new eoBitMutation(1. / float(chromSize.value())); - _state.storeFunctor(mutOp); - - eo1PtBitXover* crossOp = new eo1PtBitXover; - _state.storeFunctor(crossOp); - - eoSelectOne* select = new eoDetTournamentSelect(2); - _state.storeFunctor(select); - - eoSGA >* sga = new eoSGA(*select, *crossOp, xoverRate.value(), *mutOp, mutRate.value(), _eval, _checkpoint); - _state.storeFunctor(sga); - return *sga; -} - -template -eoPop >& do_init_ga(eoParameterLoader& _parser, eoState& _state, FitT) -{ - typedef eoBit EOT; - - _parser.processParam(chromSize, "initialization"); - _parser.processParam(popSize, "initialization"); - - eoBooleanGenerator gen; - eoInitFixedLength init(chromSize.value(), gen); - - // Let the state handle the memory - eoPop& pop = _state.takeOwnership(eoPop()); - - _state.registerObject(pop); - - // initialize the population - - pop.append(popSize.value(), init); - - return pop; -} - -template -void do_run_ga(eoAlgo >& _ga, eoPop >& _pop) -{ - _ga(_pop); -} - -/// The following function merely call the templatized do_* functions above - -eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& _state) -{ - return do_make_ga(_parser, _eval, _checkpoint, _state); -} - -eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& _state) -{ - return do_make_ga(_parser, _eval, _checkpoint, _state); -} - -eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, double _d) -{ - return do_init_ga(_parser, _state, _d); -} - -eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d) -{ - return do_init_ga(_parser, _state, _d); -} - -void run_ga(eoAlgo >& _ga, eoPop >& _pop) -{ - do_run_ga(_ga, _pop); -} - -void run_ga(eoAlgo >& _ga, eoPop >& _pop) -{ - do_run_ga(_ga, _pop); -} diff --git a/eo/src/ga/ga.h b/eo/src/ga/ga.h index 7a829f54c..244a3050f 100644 --- a/eo/src/ga/ga.h +++ b/eo/src/ga/ga.h @@ -1,24 +1,92 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// ga.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED*** declarations of all components + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * + * The corresponding ***INSTANCIATED*** definitions are contained in ga.cpp + * while the TEMPLATIZED code is define in the different makeXXX.h files + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + #ifndef ga_h #define ga_h #include #include #include -#include +#include #include +#include #include #include -#include + +//Representation dependent - rewrite everything anew for each representation +////////////////////////// + +// the genotypes +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); + eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); + +// the operators +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); + +//Representation INdependent +//////////////////////////// +// if you use your own representation, simply change the types of templates + +// init pop +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_ga(eoParser& _parser, eoState& _state, eoInit >&); + +// the continue's +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +// the checkpoint +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& state); -eoAlgo >& make_ga(eoParameterLoader& _parser, eoEvalFunc >& _eval, eoCheckPoint >& _checkpoint, eoState& state); +// the algo +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, double); -eoPop >& init_ga(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness); +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -void run_ga(eoAlgo >& _ga, eoPop >& _pop); -void run_ga(eoAlgo >& _ga, eoPop >& _pop); +// run +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +// end of parameter input (+ .status + help) +// that one is not templatized, but is here for the sake of completeness +void make_help(eoParser & _parser); #endif diff --git a/eo/src/ga/make_algo_scalar_ga.cpp b/eo/src/ga/make_algo_scalar_ga.cpp new file mode 100644 index 000000000..c3bbaba4c --- /dev/null +++ b/eo/src/ga/make_algo_scalar_ga.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_algo_scalar_ga.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Algo +/////// +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + diff --git a/eo/src/ga/make_checkpoint_ga.cpp b/eo/src/ga/make_checkpoint_ga.cpp new file mode 100644 index 000000000..e8e415729 --- /dev/null +++ b/eo/src/ga/make_checkpoint_ga.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_checkpoint_ga.h + * while the TEMPLATIZED code is define in make_checkpoint.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions + +// checkpoint +///////////// +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + + diff --git a/eo/src/ga/make_continue_ga.cpp b/eo/src/ga/make_continue_ga.cpp new file mode 100644 index 000000000..09a0aefee --- /dev/null +++ b/eo/src/ga/make_continue_ga.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_continue_ga.h + * while the TEMPLATIZED code is define in make_contninue.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// continue +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + + diff --git a/eo/src/ga/make_genotype_ga.cpp b/eo/src/ga/make_genotype_ga.cpp new file mode 100644 index 000000000..d6ed1b830 --- /dev/null +++ b/eo/src/ga/make_genotype_ga.cpp @@ -0,0 +1,53 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_genotype_ga.h + * while the TEMPLATIZED code is define in make_genotype.h in the ga dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// the templatized code +#include + +/// The following function merely call the templatized do_* functions above + +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d) +{ + return do_make_genotype(_parser, _state, _d); +} +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d) +{ + return do_make_genotype(_parser, _state, _d); +} diff --git a/eo/src/ga/make_help.cpp b/eo/src/ga/make_help.cpp new file mode 100644 index 000000000..31cb749f6 --- /dev/null +++ b/eo/src/ga/make_help.cpp @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_help.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- +#include +#include + +/** Generation of the status file, and output of the help message if needed + * + * MUST be called after ALL parameters have been read in order to list them + * + * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, + * but compiled separately and stored in a library. + */ +void make_help(eoParser & _parser) +{ + // name of the "status" file where all actual parameter values will be saved + string str_status = _parser.ProgramName() + ".status"; // default value + eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (_parser.userNeedsHelp()) + { + _parser.printHelp(cout); + exit(1); + } + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << _parser; // and you can use that file as parameter file + } +} diff --git a/eo/src/ga/make_op_ga.cpp b/eo/src/ga/make_op_ga.cpp new file mode 100644 index 000000000..7ee1eb1bf --- /dev/null +++ b/eo/src/ga/make_op_ga.cpp @@ -0,0 +1,57 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_op_ga.h + * while the TEMPLATIZED code is define in make_op.h in the ga dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// Templatized code +#include + +/// The following function merely call the templatized do_* functions above + +// oeprators +//////////// +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +{ + return do_make_op(_parser, _state, _init); +} + diff --git a/eo/src/ga/make_pop_ga.cpp b/eo/src/ga/make_pop_ga.cpp new file mode 100644 index 000000000..a67e37d38 --- /dev/null +++ b/eo/src/ga/make_pop_ga.cpp @@ -0,0 +1,60 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_pop_ga.h + * while the TEMPLATIZED code is define in make_pop.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Init POP +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + + diff --git a/eo/src/ga/make_run_ga.cpp b/eo/src/ga/make_run_ga.cpp new file mode 100644 index 000000000..e3d78ea2e --- /dev/null +++ b/eo/src/ga/make_run_ga.cpp @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_run_ga.h + * while the TEMPLATIZED code is define in make_run.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include +// the instanciating fitnesses +#include + +/// The following function merely call the templatized do_* functions above + +// run +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index b611d84db..a30690e3a 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -28,6 +28,7 @@ #define eoParam_h //----------------------------------------------------------------------------- +#include // for floor #include #include #include @@ -296,6 +297,97 @@ void eoValueParam >::setValue(std::string _valu std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } +/* ABANDONNED - See class eoRateType below + /////////////////////////////////////// + Specialization for "rate_or_absolute-number" + +typedef std::pair eoRateType; +template <> +std::string eoValueParam::getValue(void) const +{ + std::ostrstream os; + if (repValue.second) + os << 100*repValue.first << "% " << std::ends; + else + os << repValue.first << " " << std::ends; + return os.str(); +} + +template <> +void eoValueParam::setValue(std::string _value) +{ + double rate; + // check for % + bool interpret_as_rate = false; // == no % + size_t pos = _value.find('%'); + if (pos < _value.size()) // found a % + { + interpret_as_rate = true; + _value.resize(pos); // get rid of % + } + std::istrstream is(_value.c_str()); + is >> rate; + repValue.first = (interpret_as_rate ? rate/100 : floor(rate)); + repValue.second = interpret_as_rate; +} +*/ +/** + * A helper class for the parsing of parameters that can be either a rate + * or an absolute value (integer) + * See eoHowMany.h + */ +class eoRateParamType : public std::pair +{ +public: + eoRateParamType(std::pair _p) : std::pair(_p) {} + eoRateParamType(std::string _value) + { + readFrom(_value); + } + + ostream & printOn(ostream & _os) const + { + if (second) + _os << 100*first << "% " << std::ends; + else + _os << first << " " << std::ends; + return _os; + } + + istream & readFrom(istream & _is) + { + string value; + _is >> value; + readFrom(value); + return _is; + } + + void readFrom(std::string _value) + { + double rate; + // check for % + bool interpret_as_rate = false; // == no % + size_t pos = _value.find('%'); + if (pos < _value.size()) // found a % + { + interpret_as_rate = true; + _value.resize(pos); // get rid of % + } + std::istrstream is(_value.c_str()); + is >> rate; + first = (interpret_as_rate ? rate/100 : floor(rate)); + second = interpret_as_rate; + } + + +}; + +// at the moment, the following are defined in eoParser.cpp +ostream & operator<<(ostream & _os, const eoRateParamType & _rate); +istream & operator>>(istream & _is, eoRateParamType & _rate); + + + /*template class eoContainerParam : public eoParam { @@ -319,5 +411,82 @@ private : ContainerType& value; };*/ +/** + * Another helper class for parsing parameters like + * Keyword(arg1, arg2, ...) + * + * It is basically a pair > + * first string is keyword + * the vector contains all arguments (as strings) + * See make_algo.h + */ + +class eoParamParamType : public std::pair > +{ +public: + eoParamParamType(std::string _value) + { + readFrom(_value); + } + + ostream & printOn(ostream & _os) const + { + _os << first; + unsigned narg = second.size(); + if (!narg) + return _os; + + // Here, we do have args + _os << "("; + if (narg == 1) // 1 arg only + { + _os << second[0] << ")" ; + return _os; + } + // and here more than 1 arg + for (unsigned i=0; i> value; + readFrom(value); + return _is; + } + + void readFrom(std::string & _value) + { + second.resize(0); // just in case + size_t pos = _value.find('('); + if (pos >= _value.size()) // no arguments + { + first = _value; + return; + } + // so here we do have arguments + string t = _value.substr(pos+1);// the arguments + _value.resize(pos); + first = _value; // done for the keyword + + // now all arguments + string delim(" (),"); + while ( (pos=t.find_first_not_of(delim)) < t.size()) + { + size_t posEnd = t.find_first_of(delim, pos); + string u(t,pos); + u.resize(posEnd-pos); + second.push_back(u); + t = t.substr(posEnd); + } + } +}; + +// at the moment, the following are defined in eoParser.cpp +ostream & operator<<(ostream & _os, const eoParamParamType & _rate); +istream & operator>>(istream & _is, eoParamParamType & _rate); #endif diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 451da162d..6c64ac915 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -351,3 +351,29 @@ bool eoParser::userNeedsHelp(void) return needHelp.value() || !messages.empty(); } + +///////////////// I put these here at the moment +ostream & operator<<(ostream & _os, const eoRateParamType & _rate) +{ + _rate.printOn(_os); + return _os; +} + +istream & operator>>(istream & _is, eoRateParamType & _rate) +{ + _rate.readFrom(_is); + return _is; +} + +ostream & operator<<(ostream & _os, const eoParamParamType & _rate) +{ + _rate.printOn(_os); + return _os; +} + +istream & operator>>(istream & _is, eoParamParamType & _rate) +{ + _rate.readFrom(_is); + return _is; +} + diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 754d69541..fe2b39bd3 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -41,7 +41,7 @@ #include #include "eoRNG.h" - +#include /** \defgroup selectors */ diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index f501c7568..bba6d5cd8 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -11,32 +11,59 @@ int main(int argc, char* argv[]) try { - typedef eoBit EoType; + typedef eoBit EOT; - eoParser parser(argc, argv); + eoParser parser(argc, argv); // for user-parameter reading - eoState state; // keeps all things allocated, including eoEasyEA and eoPop! + eoState state; // keeps all things allocated - eoEvalFuncPtr eval( binary_value ); - eoGenContinue term(20); - eoCheckPoint checkpoint(term); + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// - eoAlgo& ga = make_ga(parser, eval, checkpoint, state); + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr mainEval( binary_value ); + eoEvalFuncCounter eval(mainEval); - eoPop& pop = init_ga(parser, state, double()); + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, double()); - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - return 0; - } + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); apply(eval, pop); - run_ga(ga, pop); // run the ga + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; } catch(exception& e) { cout << e.what() << endl; } -} \ No newline at end of file +} diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index c21b9cdc1..1091ddc3e 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,7 +24,7 @@ */ /** -CVS Info: $Date: 2001-03-14 10:14:27 $ $Author: maartenkeijzer $ $Revision: 1.11 $ +CVS Info: $Date: 2001-04-24 04:52:04 $ $Author: evomarc $ $Revision: 1.12 $ */ //----------------------------------------------------------------------------- @@ -37,7 +37,7 @@ CVS Info: $Date: 2001-03-14 10:14:27 $ $Author: maartenkeijzer $ $Revision: 1.1 //----------------------------------------------------------------------------- -main() { +int main() { eoUniformGenerator u1(-2.5,3.5); eoUniformGenerator u2(0.003, 0.05 ); eoUniformGenerator u3( 10000U, 10000000U); diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 687da2cdf..c2c458757 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -65,7 +65,8 @@ void testSelectMany(eoSelect & _select, string _name) // initialize parents for (unsigned i=0; i tournamentSizeParam = parser.createParam detSelect(oRate); -// testSelectMany(detSelect, "detSelect"); + // eoDetSelect detSelect(oRate); + // testSelectMany(detSelect, "detSelect"); // Roulette -// eoProportionalSelect propSelect; -// testSelectOne(propSelect, oRate, "propSelect"); + eoProportionalSelect propSelect; + testSelectOne(propSelect, oRate, "propSelect"); // Ranking -// eoRankingSelect rankSelect(rankingPressure); -// testSelectOne(rankSelect, oRate, "rankSelect"); + eoRankingSelect rankSelect(rankingPressure); + testSelectOne(rankSelect, oRate, "rankSelect"); // New ranking using the perf2Worth construct cout << "Avant appel a LinearRanking()" << endl; @@ -161,6 +162,8 @@ eoValueParam tournamentSizeParam = parser.createParam stochTourSelect(tRate); testSelectOne(stochTourSelect, oRate, "stochTourSelect"); + exit(1); + // Fitness scaling // eoFitnessScalingSelect fitScaleSelect(rankingPressure); // testSelectOne(fitScaleSelect, oRate, "fitScaleSelect"); diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index 420da2343..c29338ddc 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -43,6 +43,12 @@ int the_main(int argc, char **argv) eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); eoValueParam seed(time(0), "seed", "Random number seed"); + // test if user entered or if default value used + if (parser.isItThere(seed)) + cout << "YES\n"; + else + cout << "NO\n"; + eoValueParam load_name("", "Load","Load",'L'); eoValueParam save_name("", "Save","Save",'S'); diff --git a/eo/test/t-eoVector.cpp b/eo/test/t-eoVector.cpp index 7d241ae6f..759414c40 100644 --- a/eo/test/t-eoVector.cpp +++ b/eo/test/t-eoVector.cpp @@ -42,14 +42,14 @@ typedef eoVector Chrom2; //----------------------------------------------------------------------------- -main() +int main() { const unsigned SIZE = 4; // check if the appropriate ctor gets called Chrom1 chrom(SIZE, 5); - for (int i = 0; i < chrom.size(); ++i) + for (unsigned i = 0; i < chrom.size(); ++i) { assert(chrom[i] == 5); } From 9197e3e5c57c1e067971a62e0636eabf5c1c8252 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 04:56:12 +0000 Subject: [PATCH 0554/2134] eoEvalFuncCounter is now in a separate file --- eo/src/eoEvalFuncCounter.h | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 eo/src/eoEvalFuncCounter.h diff --git a/eo/src/eoEvalFuncCounter.h b/eo/src/eoEvalFuncCounter.h new file mode 100644 index 000000000..fb28de59f --- /dev/null +++ b/eo/src/eoEvalFuncCounter.h @@ -0,0 +1,56 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalFuncCounter.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoEvalFuncCounter_H +#define eoEvalFuncCounter_H + +#include +#include + +/** +Counts the number of evaluations actually performed, thus checks first +if it has to evaluate.. etc. +*/ +template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam +{ + public : + eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") + : eoValueParam(0, _name), func(_func) {} + + virtual void operator()(EOT& _eo) + { + if (_eo.invalid()) + { + value()++; + func(_eo); + } + } + + private : + eoEvalFunc& func; +}; + +#endif From 02db7f7e2435603ac420620d5f740168eb9a163d Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 05:03:54 +0000 Subject: [PATCH 0555/2134] Cleaning up --- eo/src/do/make_continue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index cda5d9a21..8bb8d7439 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -36,7 +36,7 @@ It can then be instantiated, and compiled on its own for a given EOType // Continuators - all include eoContinue.h #include #include -#include +#include #include #include #ifndef _MSC_VER @@ -85,7 +85,7 @@ eoContinue & do_make_continue(eoParameterLoader& _parser, eoState& _state, eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); if (_parser.isItThere(steadyGenParam)) { - eoSteadyGenContinue *steadyCont = new eoSteadyGenContinue + eoSteadyFitContinue *steadyCont = new eoSteadyFitContinue (minGenParam.value(), steadyGenParam.value()); // store _state.storeFunctor(steadyCont); From 204fe8052be0662198d6fec0c82e5456096c6677 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 05:05:09 +0000 Subject: [PATCH 0556/2134] Adding eoEvalContinue --- eo/src/eoEvalContinue.h | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 eo/src/eoEvalContinue.h diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h new file mode 100644 index 000000000..a2245247f --- /dev/null +++ b/eo/src/eoEvalContinue.h @@ -0,0 +1,67 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalContinue.h +// (c) GeNeura Team, 1999, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEvalContinue_h +#define _eoEvalContinue_h + +#include +#include + +/** + * Continues until a number of evaluations has been made +*/ +template< class EOT> +class eoEvalContinue: public eoContinue +{ +public: + /// Ctor + eoEvalContinue( eoEvalFuncCounter & _eval, unsigned long _totalEval) + : eval(_eval), repTotalEvaluations( _totalEval ) { + cout << "Ctor de eoEvalFuncCounter avec total = " << repTotalEvaluations << endl; +}; + + /** Returns false when a certain number of evaluations has been done + */ + virtual bool operator() ( const eoPop& _vEO ) { + if (eval.value() >= repTotalEvaluations) + { + cout << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]\n"; + return false; + } + return true; + } + + /** Returns the number of generations to reach*/ + virtual unsigned long totalEvaluations( ) + { + return repTotalEvaluations; + }; + +private: + eoEvalFuncCounter & eval; + unsigned long repTotalEvaluations; +}; + +#endif From f7bdc4a07439e04f0be7d87af4e6bea62bc5976b Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 05:08:08 +0000 Subject: [PATCH 0557/2134] Forgot the 2 representation dependent make_XXX.h --- eo/src/ga/make_genotype.h | 68 ++++++++++++ eo/src/ga/make_op.h | 211 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 279 insertions(+) create mode 100644 eo/src/ga/make_genotype.h create mode 100644 eo/src/ga/make_op.h diff --git a/eo/src/ga/make_genotype.h b/eo/src/ga/make_genotype.h new file mode 100644 index 000000000..ce8270e11 --- /dev/null +++ b/eo/src/ga/make_genotype.h @@ -0,0 +1,68 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/////////////////// the bitstring //////////////// +/* + * This fuciont does the initialization of what's needed for a particular + * genotype (here, bitstrings). + * It is templatized ***olny on the fitness*** so it can be used to evolve + * bitstrings with any fitness. + * It is instanciated in ga/ga.cpp - and incorporated in the ga/libga.a + * + * It returns an eoInit > tha can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. +*/ + +template +eoInit > & do_make_genotype(eoParameterLoader& _parser, eoState& _state, FitT) +{ + // for bitstring, only thing needed is the size + eoValueParam& chromSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"initialization"); + + // Then we can built a bitstring random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoBooleanGenerator * gen = new eoBooleanGenerator; + _state.storeFunctor(gen); + eoInitFixedLength >* init = new eoInitFixedLength >(chromSize.value(), *gen); + // satore in state + _state.storeFunctor(init); + return *init; +} + +#endif diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h new file mode 100644 index 000000000..05af2eb96 --- /dev/null +++ b/eo/src/ga/make_op.h @@ -0,0 +1,211 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized GA stuff +#include +#include + // also need the parser and param includes +#include +#include + + +/////////////////// bitstring operators /////////////// +// canonical (crossover + mutation) only at the moment // + +/* + * This function builds the operators that will be applied to the bitstrings + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); + + if (operatorParam.value() != string("SGA")) + throw runtime_error("Only SGA-like operator available roght now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& onePointRateParam = _parser.createParam(double(1.0), "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators" ); + // minimum check + if ( (onePointRateParam.value() < 0) ) + throw runtime_error("Invalid onePointRate"); + + eoValueParam& twoPointsRateParam = _parser.createParam(double(1.0), "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators" ); + // minimum check + if ( (twoPointsRateParam.value() < 0) ) + throw runtime_error("Invalid twoPointsRate"); + + eoValueParam& uRateParam = _parser.createParam(double(2.0), "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators" ); + // minimum check + if ( (uRateParam.value() < 0) ) + throw runtime_error("Invalid uRate"); + + // minimum check + bool bCross = true; + if (onePointRateParam.value()+twoPointsRateParam.value()+uRateParam.value()==0) + { + cerr << "Warning: no crossover" << endl; + bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + // 1-point crossover for bitstring + ptQuad = new eo1PtBitXover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, onePointRateParam.value()); + + // uniform crossover for bitstring + ptQuad = new eoUBitXover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, uRateParam.value()); + + // 2-points xover + ptQuad = new eoNPtsBitXover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, twoPointsRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + + // the mutations + ///////////////// + // the parameters + eoValueParam & pMutPerBitParam = _parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators" ); + // minimum check + if ( (pMutPerBitParam.value() < 0) || (pMutPerBitParam.value() > 0.5) ) + throw runtime_error("Invalid pMutPerBit"); + + eoValueParam & bitFlipRateParam = _parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 's', "Genetic Operators" ); + // minimum check + if ( (bitFlipRateParam.value() < 0) ) + throw runtime_error("Invalid bitFlipRate"); + + eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Genetic Operators" ); + // minimum check + if ( (oneBitRateParam.value() < 0) ) + throw runtime_error("Invalid oneBitRate"); + + // minimum check + bool bMut = true; + if (bitFlipRateParam.value()+oneBitRateParam.value()==0) + { + cerr << "Warning: no mutation" << endl; + bMut = false; + } + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + // standard bit-flip mutation for bitstring + ptMon = new eoBitMutation(pMutPerBitParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, bitFlipRateParam.value()); + + // mutate exactly 1 bit per individual + ptMon = new eoDetBitFlip; + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, oneBitRateParam.value()); + + _state.storeFunctor(ptCombinedMonOp); + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return *op; +} +#endif From ce5f9c052867eb3301aaddd08aaae61848fdd99e Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 05:13:10 +0000 Subject: [PATCH 0558/2134] CLeaning up --- eo/src/eo | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/eo b/eo/src/eo index 0ac3bda36..ca2c49c22 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -67,7 +67,6 @@ // Continuators - all include eoContinue.h #include #include -#include #include #include #include From 511dc266233409ee8d5a0c18cc4bd242cd45a0e8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 24 Apr 2001 09:42:01 +0000 Subject: [PATCH 0559/2134] Changed obscure comment into more detailed one --- eo/src/utils/eoGnuplot1DMonitor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index e75508750..ac5bfc80f 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -103,7 +103,7 @@ inline void eoGnuplot1DMonitor::FirstPlot() { if (vec.size() < 2) { - throw runtime_error("Must have some stats to plot!\n"); + throw runtime_error("eoGnuplot1DMonitor needs at least 2 stats (X and Y)!\n"); } char buff[1024]; ostrstream os(buff, 1024); From 4968d64b0541ac25fa9462e118cf3afea712e367 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 26 Apr 2001 15:24:53 +0000 Subject: [PATCH 0560/2134] Doing libes.a in src/es and adding t-eoReal.cpp in test I had to move eoRealBounds to utils dir because of global objects Some domino consequences here and there ... --- eo/src/es.h | 3 -- eo/src/es/Makefile.am | 11 +++++ eo/src/es/eoEsChromInit.h | 2 +- eo/src/es/eoEsMutate.h | 2 +- eo/src/es/eoEsStdevXOver.h | 2 +- eo/src/es/eoNormalMutation.h | 2 +- eo/src/es/eoRealOp.h | 2 +- eo/src/ga/make_algo_scalar_ga.cpp | 6 +-- eo/src/ga/make_continue_ga.cpp | 4 +- eo/src/ga/make_pop_ga.cpp | 4 +- eo/src/utils/Makefile.am | 2 +- eo/src/utils/eoGnuplot1DMonitor.h | 2 +- eo/src/utils/eoParam.h | 2 +- eo/src/utils/eoRealBounds.cpp | 7 +++ eo/src/{es => utils}/eoRealBounds.h | 9 ++-- eo/test/Makefile.am | 11 ++++- eo/test/t-eoReal.cpp | 70 +++++++++++++++++++++++++++++ eo/tutorial/Lesson1/FirstBitGA.cpp | 2 +- eo/tutorial/Lesson3/exercise3.1.cpp | 2 +- 19 files changed, 120 insertions(+), 25 deletions(-) create mode 100644 eo/src/utils/eoRealBounds.cpp rename eo/src/{es => utils}/eoRealBounds.h (98%) create mode 100644 eo/test/t-eoReal.cpp diff --git a/eo/src/es.h b/eo/src/es.h index d96b9746b..491f67490 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -48,9 +48,6 @@ #include #include -// and their generic counterparts -#include - // the ES-mutations #include #include diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 8b275335f..f1129f62a 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -4,5 +4,16 @@ ## ############################################################################### +INCLUDES = -I$(top_builddir)/src +lib_LIBRARIES = libes.a +libes_a_SOURCES = make_algo_scalar_real.cpp \ + make_checkpoint_real.cpp \ + make_continue_real.cpp \ + make_genotype_real.cpp \ + make_help.cpp \ + make_op_real.cpp \ + make_pop_real.cpp \ + make_run_real.cpp +CPPFLAGS = -Wall libeoincdir = $(includedir)/eo/es libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealBounds.h eoRealOp.h diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 43a61af0d..895cbe8bd 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -27,7 +27,7 @@ #ifndef _eoEsChromInit_H #define _eoEsChromInit_H -#include +#include #include #include #include diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 9b453ecdf..bee67f2a4 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h index be5071e7d..1e0aa388c 100644 --- a/eo/src/es/eoEsStdevXOver.h +++ b/eo/src/es/eoEsStdevXOver.h @@ -28,7 +28,7 @@ #define _eoEsStdevXOver_h #include -#include +#include /** \ingroup EvolutionStrategies diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 3398e7a05..2c4718c47 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include //----------------------------------------------------------------------------- /** Simple normal mutation of a vector of real values. diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index b13619d6c..ed7ae3043 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -31,7 +31,7 @@ #include // swap_ranges #include #include -#include +#include //----------------------------------------------------------------------------- diff --git a/eo/src/ga/make_algo_scalar_ga.cpp b/eo/src/ga/make_algo_scalar_ga.cpp index c3bbaba4c..a7ae453b1 100644 --- a/eo/src/ga/make_algo_scalar_ga.cpp +++ b/eo/src/ga/make_algo_scalar_ga.cpp @@ -24,15 +24,15 @@ */ //----------------------------------------------------------------------------- -/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators +/** This file contains all ***INSTANCIATED DEFINITIONS*** of pop. init. * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in make_algo_scalar_ga.h - * while the TEMPLATIZED code is define in make_algo_scalar.h in the do dir + * in src/ga/ga.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir * * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations diff --git a/eo/src/ga/make_continue_ga.cpp b/eo/src/ga/make_continue_ga.cpp index 09a0aefee..def01ab3b 100644 --- a/eo/src/ga/make_continue_ga.cpp +++ b/eo/src/ga/make_continue_ga.cpp @@ -31,8 +31,8 @@ * files that you just need to link with your own main and fitness code). * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in make_continue_ga.h - * while the TEMPLATIZED code is define in make_contninue.h in the do dir + * in ga.h + * while the TEMPLATIZED code is define in make_contninue.h in the src/do dir * * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations diff --git a/eo/src/ga/make_pop_ga.cpp b/eo/src/ga/make_pop_ga.cpp index a67e37d38..ae014f4fb 100644 --- a/eo/src/ga/make_pop_ga.cpp +++ b/eo/src/ga/make_pop_ga.cpp @@ -31,8 +31,8 @@ * files that you just need to link with your own main and fitness code). * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in make_pop_ga.h - * while the TEMPLATIZED code is define in make_pop.h in the do dir + * in ga.h + * while the TEMPLATIZED code is define in make_pop.h in the src/do dir * * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index d38ddbe12..2f1d0c4d1 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(top_builddir)/src CPPFLAGS = -O2 -Wall lib_LIBRARIES = libeoutils.a -libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp +libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp eoRealBounds.cpp libeoincdir = $(includedir)/eo/utils libeoinc_HEADERS = checkpointing *.h diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index ac5bfc80f..e75508750 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -103,7 +103,7 @@ inline void eoGnuplot1DMonitor::FirstPlot() { if (vec.size() < 2) { - throw runtime_error("eoGnuplot1DMonitor needs at least 2 stats (X and Y)!\n"); + throw runtime_error("Must have some stats to plot!\n"); } char buff[1024]; ostrstream os(buff, 1024); diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index a30690e3a..45e53c3ad 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -470,7 +470,7 @@ public: // so here we do have arguments string t = _value.substr(pos+1);// the arguments _value.resize(pos); - first = _value; // done for the keyword + first = _value; // done for the keyword (NOTE: may be empty string!) // now all arguments string delim(" (),"); diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp new file mode 100644 index 000000000..5349ed822 --- /dev/null +++ b/eo/src/utils/eoRealBounds.cpp @@ -0,0 +1,7 @@ +#include +#include "eoRealBounds.h" + +// the global dummy bounds +// (used for unbounded variables when bounds are required) +eoRealNoBounds eoDummyRealNoBounds; +eoRealVectorNoBounds eoDummyVectorNoBounds; diff --git a/eo/src/es/eoRealBounds.h b/eo/src/utils/eoRealBounds.h similarity index 98% rename from eo/src/es/eoRealBounds.h rename to eo/src/utils/eoRealBounds.h index 55a00f368..d0cd8df04 100644 --- a/eo/src/es/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -27,6 +27,9 @@ #ifndef _eoRealBounds_h #define _eoRealBounds_h +#include // exceptions! +#include + /** \defgroup EvolutionStrategies @@ -408,7 +411,7 @@ Anyone with extra time in his agenda is welcome to change that :-) class eoRealVectorBounds : public vector { public: - // virtual desctructor (to avoid warining?) + // virtual desctructor (to avoid warning?) virtual ~eoRealVectorBounds(){} /** Default Ctor @@ -649,6 +652,6 @@ public: }; // one object for all -eoRealNoBounds eoDummyRealNoBounds; -eoRealVectorNoBounds eoDummyVectorNoBounds; +extern eoRealNoBounds eoDummyRealNoBounds; +extern eoRealVectorNoBounds eoDummyVectorNoBounds; #endif diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 557839924..6197c15a0 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -14,10 +14,10 @@ CXXFLAGS = -g -Wall ############################################################################### check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ - t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector + t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull -#noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA +# noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal ############################################################################### @@ -115,6 +115,13 @@ t_eoGA_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) ############################################################################### +t_eoReal_SOURCES = t-eoReal.cpp real_value.h +t_eoReal_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a +t_eoReal_LDFLAGS = -lm +t_eoReal_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) + +############################################################################### + t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h t_eoSSGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoSSGA_LDFLAGS = -lm diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp new file mode 100644 index 000000000..efc67f4d2 --- /dev/null +++ b/eo/test/t-eoReal.cpp @@ -0,0 +1,70 @@ +#include + +#include +#include "real_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoReal EOT; + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, eoMinimizingFitness()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + apply(eval, pop); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index 4ff0ff0c9..23bce2cb5 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -15,7 +15,7 @@ #include #include -// REPRESENTATION +// REPRESENTATION //----------------------------------------------------------------------------- // define your individuals typedef eoBit Indi; // A bitstring with fitness double diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 3bdab13d3..9e401959c 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -315,7 +315,7 @@ void main_function(int argc, char **argv) fileMonitor.add(generationCounter); fileMonitor.add(bestStat); fileMonitor.add(SecondStat); - // the fileMonitor can monitor parameters, too, but you must tell it! + // the gnuMonitor can monitor parameters, too, but you must tell it! gnuMonitor.add(eval); gnuMonitor.add(bestStat); gnuMonitor.add(averageStat); From 538d91c601ab16403553e5749769979bb254491e Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 26 Apr 2001 15:27:48 +0000 Subject: [PATCH 0561/2134] Adding all make_*_real.* - similar to ga stuff for eoReal (not ES yet) --- eo/src/es/make_algo_scalar_real.cpp | 59 ++++++++ eo/src/es/make_checkpoint_real.cpp | 59 ++++++++ eo/src/es/make_continue_real.cpp | 59 ++++++++ eo/src/es/make_genotype.h | 87 +++++++++++ eo/src/es/make_genotype_real.cpp | 52 +++++++ eo/src/es/make_help.cpp | 54 +++++++ eo/src/es/make_op.h | 223 ++++++++++++++++++++++++++++ eo/src/es/make_op_real.cpp | 54 +++++++ eo/src/es/make_pop_real.cpp | 60 ++++++++ eo/src/es/make_run_real.cpp | 61 ++++++++ 10 files changed, 768 insertions(+) create mode 100644 eo/src/es/make_algo_scalar_real.cpp create mode 100644 eo/src/es/make_checkpoint_real.cpp create mode 100644 eo/src/es/make_continue_real.cpp create mode 100644 eo/src/es/make_genotype.h create mode 100644 eo/src/es/make_genotype_real.cpp create mode 100644 eo/src/es/make_help.cpp create mode 100644 eo/src/es/make_op.h create mode 100644 eo/src/es/make_op_real.cpp create mode 100644 eo/src/es/make_pop_real.cpp create mode 100644 eo/src/es/make_run_real.cpp diff --git a/eo/src/es/make_algo_scalar_real.cpp b/eo/src/es/make_algo_scalar_real.cpp new file mode 100644 index 000000000..d93afae3a --- /dev/null +++ b/eo/src/es/make_algo_scalar_real.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns + * of the library for evolution of ***eoReal*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Algo +/////// +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + diff --git a/eo/src/es/make_checkpoint_real.cpp b/eo/src/es/make_checkpoint_real.cpp new file mode 100644 index 000000000..60a4a5cc1 --- /dev/null +++ b/eo/src/es/make_checkpoint_real.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns + * of the library for evolution of ***eoReal*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions + +// checkpoint +///////////// +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + + diff --git a/eo/src/es/make_continue_real.cpp b/eo/src/es/make_continue_real.cpp new file mode 100644 index 000000000..e53f9ecec --- /dev/null +++ b/eo/src/es/make_continue_real.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns + * of the library for evolution of ***REAL vectors*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_continue.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions + +// continue +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + + diff --git a/eo/src/es/make_genotype.h b/eo/src/es/make_genotype.h new file mode 100644 index 000000000..31e645302 --- /dev/null +++ b/eo/src/es/make_genotype.h @@ -0,0 +1,87 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This function does the initialization of what's needed for a particular + * genotype (here, eoReal). + * It is templatized ***only on the fitness*** so it can be used to evolve + * eoReal with any fitness. + * It is instanciated in es/make_genotype_real.cpp - + * and incorporated in the es/libes.a + * + * It returns an eoInit > tha can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. +*/ + +template +eoInit > & do_make_genotype(eoParameterLoader& _parser, eoState& _state, FitT) +{ + // for eoReal, only thing needed is the size + eoValueParam& vecSize = _parser.createParam(unsigned(10), "VecSize", "The number of variables ", 'n',"initialization"); + + // to build an eoReal Initializer, we need bounds + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "InitBounds", "Bounds for uniform initialization", 'B', "initialization"); + + eoParamParamType & ppBounds = boundsParam.value(); // pair > + // transform into a vector + vector v; + vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + eoRealVectorBounds * ptBounds = NULL; + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize.value(), v[0], v[1]); + else // no time now + throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + + eoRealInitBounded * init = + new eoRealInitBounded(*ptBounds); + // satore in state + _state.storeFunctor(init); + return *init; +} + +#endif diff --git a/eo/src/es/make_genotype_real.cpp b/eo/src/es/make_genotype_real.cpp new file mode 100644 index 000000000..e19ef54b5 --- /dev/null +++ b/eo/src/es/make_genotype_real.cpp @@ -0,0 +1,52 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of eoReal Init fns + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_genotype_real.h in the src/es dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// the templatized code +#include + +/// The following function merely call the templatized do_* functions + +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d) +{ + return do_make_genotype(_parser, _state, _d); +} +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d) +{ + return do_make_genotype(_parser, _state, _d); +} diff --git a/eo/src/es/make_help.cpp b/eo/src/es/make_help.cpp new file mode 100644 index 000000000..31cb749f6 --- /dev/null +++ b/eo/src/es/make_help.cpp @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_help.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- +#include +#include + +/** Generation of the status file, and output of the help message if needed + * + * MUST be called after ALL parameters have been read in order to list them + * + * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, + * but compiled separately and stored in a library. + */ +void make_help(eoParser & _parser) +{ + // name of the "status" file where all actual parameter values will be saved + string str_status = _parser.ProgramName() + ".status"; // default value + eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (_parser.userNeedsHelp()) + { + _parser.printHelp(cout); + exit(1); + } + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << _parser; // and you can use that file as parameter file + } +} diff --git a/eo/src/es/make_op.h b/eo/src/es/make_op.h new file mode 100644 index 000000000..9c5ab1ef8 --- /dev/null +++ b/eo/src/es/make_op.h @@ -0,0 +1,223 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized GA stuff +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); + + if (operatorParam.value() != string("SGA")) + throw runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Genetic Operators" ); + // minimum check + if ( (segmentRateParam.value() < 0) ) + throw runtime_error("Invalid segmentRate"); + + eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Genetic Operators" ); + // minimum check + if ( (arithmeticRateParam.value() < 0) ) + throw runtime_error("Invalid arithmeticRate"); + + // minimum check + bool bCross = true; + if (segmentRateParam.value()+arithmeticRateParam.value()==0) + { + cerr << "Warning: no crossover" << endl; + bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + + if (bCross) + { + // segment crossover for bitstring + ptQuad = new eoSegmentCrossover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); + + // arithmetic crossover + ptQuad = new eoArithmeticCrossover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + } + + // the mutations + ///////////////// + // the parameters + eoValueParam & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Genetic Operators" ); + // minimum check + if ( (epsilonParam.value() < 0) ) + throw runtime_error("Invalid epsilon"); + + eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Genetic Operators" ); + // minimum check + if ( (uniformMutRateParam.value() < 0) ) + throw runtime_error("Invalid uniformMutRate"); + + eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Genetic Operators" ); + // minimum check + if ( (detMutRateParam.value() < 0) ) + throw runtime_error("Invalid detMutRate"); + + eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Genetic Operators" ); + // minimum check + if ( (normalMutRateParam.value() < 0) ) + throw runtime_error("Invalid normalMutRate"); + // and the sigma + eoValueParam & sigmaParam = _parser.createParam(1.0, "sigma", "Sigma (fixed) for Gaussian mutation", 'S', "Genetic Operators" ); + // minimum check + if ( (sigmaParam.value() < 0) ) + throw runtime_error("Invalid sigma"); + + // minimum check + bool bMut = true; + if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) + { + cerr << "Warning: no mutation" << endl; + bMut = false; + } + if (!bCross && !bMut) + throw runtime_error("No operator called in SGA operator definition!!!"); + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + if (bMut) + { + // uniform mutation on all components: +// offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + ptMon = new eoUniformMutation(epsilonParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); + + // mutate exactly 1 component (uniformly) per individual + ptMon = new eoDetUniformMutation(epsilonParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); + + // mutate all component using Gaussian mutation + ptMon = new eoNormalMutation(sigmaParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); + } + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return *op; +} +#endif diff --git a/eo/src/es/make_op_real.cpp b/eo/src/es/make_op_real.cpp new file mode 100644 index 000000000..7273de9c4 --- /dev/null +++ b/eo/src/es/make_op_real.cpp @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns + * of the library for ***eoReal*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in es.h in src/es dir + * while the TEMPLATIZED code is define in make_op.h in the es dir + * + */ + +// Templatized code +#include + +/// The following function merely call the templatized do_* functions above + +// oeprators +//////////// +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +{ + return do_make_op(_parser, _state, _init); +} diff --git a/eo/src/es/make_pop_real.cpp b/eo/src/es/make_pop_real.cpp new file mode 100644 index 000000000..17a8a7b31 --- /dev/null +++ b/eo/src/es/make_pop_real.cpp @@ -0,0 +1,60 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns + * of the library for evolution of ***eoReal*** indis inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_pop.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Init POP +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + + diff --git a/eo/src/es/make_run_real.cpp b/eo/src/es/make_run_real.cpp new file mode 100644 index 000000000..4a1e11ffc --- /dev/null +++ b/eo/src/es/make_run_real.cpp @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of run funs + * of the library for evolution of ***eoReal*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_run.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include +// the instanciating fitnesses +#include + +/// The following function merely call the templatized do_* functions above + +// run +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + From b7ad190260b4afac594b703446f90ada7dc9f9de Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 26 Apr 2001 15:31:48 +0000 Subject: [PATCH 0562/2134] An initializer of eoReal that uses bounds --- eo/src/es/eoRealInitBounded.h | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 eo/src/es/eoRealInitBounded.h diff --git a/eo/src/es/eoRealInitBounded.h b/eo/src/es/eoRealInitBounded.h new file mode 100644 index 000000000..bc9136b34 --- /dev/null +++ b/eo/src/es/eoRealInitBounded.h @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealInitBounded.h +// (c) EEAAX 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRealInitBounded_h +#define eoRealInitBounded_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +template +class eoRealInitBounded : public eoInit > +{ + public: + /** Ctor - from eoRealVectorBounds */ + eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) {} + + /** simply passes the argument to the uniform method of the bounds */ + virtual void operator()(eoReal& _eo) + { + bounds.uniform(_eo); // fills _eo with uniform values in bounds + } + + /** accessor to the bounds */ + const eoRealVectorBounds & theBounds() {return bounds;} + + private: + eoRealVectorBounds & bounds; +}; + +//----------------------------------------------------------------------------- +//@} +#endif eoRealOp_h + From 2d6bb7ae0c06375285e8f27c6e42ad4a6cfcac79 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 26 Apr 2001 15:35:30 +0000 Subject: [PATCH 0563/2134] Removing eoRealBounds from Makefile.am --- eo/src/es/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index f1129f62a..9d90f944f 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -16,4 +16,4 @@ libes_a_SOURCES = make_algo_scalar_real.cpp \ make_run_real.cpp CPPFLAGS = -Wall libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealBounds.h eoRealOp.h +libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h From 95bd02adbfa468f6c6b734d7b00ac4e6e6c2cc53 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 26 Apr 2001 15:47:37 +0000 Subject: [PATCH 0564/2134] The declaratio file for all make_* --- eo/src/es/es.h | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 eo/src/es/es.h diff --git a/eo/src/es/es.h b/eo/src/es/es.h new file mode 100644 index 000000000..cc1727e82 --- /dev/null +++ b/eo/src/es/es.h @@ -0,0 +1,97 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// es.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED*** declarations of all components + * of the library for ***REAL_VALUED*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * + * The corresponding ***INSTANCIATED*** definitions are contained in + * the different .cpp files in the src/es dir, + * while the TEMPLATIZED code is define in the different make_XXX.h files + * either in hte src/do dir for representation independant functions, + * or in the src/es dir for representation dependent stuff. + * Note that + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +#ifndef es_h +#define es_h + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +//Representation dependent - rewrite everything anew for each representation +////////////////////////// + +// the genotypes +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); + eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); + +// the operators +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); + +//Representation INdependent +//////////////////////////// +// you don't need to modify that part even if you use your own representation + +// init pop +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +// the continue's +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +// the checkpoint +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + + +// the algo +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); + +// run +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +// end of parameter input (+ .status + help) +// that one is not templatized, but is here for completeness +void make_help(eoParser & _parser); + +#endif From 7b8999b2059a11bde54de8880fa9e4c25ba9ea45 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 27 Apr 2001 04:03:16 +0000 Subject: [PATCH 0565/2134] Removed the -O2 from ga and es dirs - it takes waaaaaaaaaaaaay too much time at least with g++ 2.95.3 --- eo/src/es/Makefile.am | 1 + eo/src/ga/Makefile.am | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 9d90f944f..052e1ca6e 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -15,5 +15,6 @@ libes_a_SOURCES = make_algo_scalar_real.cpp \ make_pop_real.cpp \ make_run_real.cpp CPPFLAGS = -Wall +CXXFLAGS = -g libeoincdir = $(includedir)/eo/es libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 7bf8a6c69..783e68f31 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -14,8 +14,7 @@ libga_a_SOURCES = make_algo_scalar_ga.cpp \ make_op_ga.cpp \ make_pop_ga.cpp \ make_run_ga.cpp -CPPFLAGS = -O2 -Wall - - +CPPFLAGS = -Wall +CXXFLAGS = -g libeoincdir = $(includedir)/eo/ga libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h ga.h From a7042bffee246a271b133b12424008b86c4b7264 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 28 Apr 2001 05:47:18 +0000 Subject: [PATCH 0566/2134] Added bounds to the real operators in make_XXX (and hence in t-eoReal) --- eo/src/do/make_pop.h | 2 +- eo/src/es/Makefile.am | 14 +- eo/src/es/eoRealOp.h | 90 ++++++++--- eo/src/es/es.h | 69 +++++++-- eo/src/es/make_algo_scalar_real.cpp | 3 - eo/src/es/make_checkpoint_real.cpp | 3 - eo/src/es/make_continue_real.cpp | 3 - eo/src/es/make_genotype.h | 4 +- eo/src/es/make_op.h | 231 +++++++++++++++++----------- eo/src/es/make_pop_real.cpp | 3 - eo/src/es/make_run_real.cpp | 3 - eo/src/utils/eoRealBounds.h | 26 ++-- eo/test/real_value.h | 8 +- eo/test/t-eoESFull.cpp | 44 +++++- eo/test/t-eoReal.cpp | 2 +- eo/tutorial/html/eoTutorial.html | 2 +- 16 files changed, 328 insertions(+), 179 deletions(-) diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 2ab383094..0c2ecd75d 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -48,7 +48,7 @@ template eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _init) { eoValueParam& seedParam = _parser.createParam(uint32(time(0)), "seed", "Random number seed", 'S'); - eoValueParam& popSize = _parser.createParam(unsigned(20), "PopSize", "Population Size", 'P', "initialization"); + eoValueParam& popSize = _parser.createParam(unsigned(20), "popSize", "Population Size", 'P', "initialization"); // Either load or initialize // create an empty pop and let the state handle the memory diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 052e1ca6e..48c1b841b 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -6,14 +6,12 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libes.a -libes_a_SOURCES = make_algo_scalar_real.cpp \ - make_checkpoint_real.cpp \ - make_continue_real.cpp \ - make_genotype_real.cpp \ - make_help.cpp \ - make_op_real.cpp \ - make_pop_real.cpp \ - make_run_real.cpp +libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ + make_continue_real.cpp make_genotype_real.cpp make_help.cpp \ + make_op_real.cpp make_pop_real.cpp make_run_real.cpp \ + make_algo_scalar_es.cpp make_checkpoint_es.cpp \ + make_continue_es.cpp make_pop_es.cpp make_run_es.cpp + CPPFLAGS = -Wall CXXFLAGS = -g libeoincdir = $(includedir)/eo/es diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index ed7ae3043..f18ac31b0 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoRealOp.h -// (c) EEAAX 2000 - Maarten Keijzer 2000 +// (c) Maarten Keijzer 2000 - Marc Schoenauer 2001 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -52,17 +52,37 @@ template class eoUniformMutation: public eoMonOp * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): - bounds(eoDummyVectorNoBounds), epsilon(_epsilon), p_change(_p_change) {} + eoUniformMutation(const unsigned _size, const double& _epsilon, + const double& _p_change = 1.0): + bounds(eoDummyVectorNoBounds), epsilon(_size, _epsilon), + p_change(_size, _p_change) {} /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _epsilon the range for uniform nutation - * @param _p_change the probability to change a given coordinate + * @param _epsilon the range for uniform mutation - a double to be scaled + * @param _p_change the one probability to change all coordinates */ eoUniformMutation(eoRealVectorBounds & _bounds, const double& _epsilon, const double& _p_change = 1.0): + bounds(_bounds), epsilon(_bounds.size(), _epsilon), + p_change(_bounds.size(), _p_change) + { + // scale to the range - if any + for (unsigned i=0; i& _epsilon, + const vector& _p_change): bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} /// The class name. @@ -70,18 +90,22 @@ template class eoUniformMutation: public eoMonOp /** * Do it! - * @param _eo The cromosome undergoing the mutation + * @param _eo The indi undergoing the mutation */ bool operator()(EOT& _eo) { + // sanity check ? + if (_eo.size() != bounds.size()) + throw runtime_error("Invalid size of indi in eoUniformMutation"); + bool hasChanged=false; for (unsigned lieu=0; lieu<_eo.size(); lieu++) { - if (rng.flip(p_change)) + if (rng.flip(p_change[lieu])) { // check the bounds - double emin = _eo[lieu]-epsilon; - double emax = _eo[lieu]+epsilon; + double emin = _eo[lieu]-epsilon[lieu]; + double emax = _eo[lieu]+epsilon[lieu]; if (bounds.isMinBounded(lieu)) emin = max(bounds.minimum(lieu), emin); if (bounds.isMaxBounded(lieu)) @@ -95,8 +119,8 @@ template class eoUniformMutation: public eoMonOp private: eoRealVectorBounds & bounds; - double epsilon; - double p_change; + vector epsilon; + vector p_change; }; /** eoDetUniformMutation --> changes exactly k values of the vector @@ -113,36 +137,63 @@ template class eoDetUniformMutation: public eoMonOp * @param _epsilon the range for uniform nutation * @param number of coordinate to modify */ - eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): - bounds(eoDummyVectorNoBounds), epsilon(_epsilon), no(_no) {} + eoDetUniformMutation(const unsigned _size, const double& _epsilon, + const unsigned& _no = 1): + bounds(eoDummyVectorNoBounds), epsilon(_size, _epsilon), no(_no) {} /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _epsilon the range for uniform nutation + * @param _epsilon the range for uniform nutation (to be scaled if necessary) * @param number of coordinate to modify */ eoDetUniformMutation(eoRealVectorBounds & _bounds, const double& _epsilon, const unsigned& _no = 1): - bounds(_bounds), epsilon(_epsilon), no(_no) {} + bounds(_bounds), epsilon(_bounds.size(), _epsilon), no(_no) + { + // scale to the range - if any + for (unsigned i=0; i& _epsilon, + const unsigned& _no = 1): + bounds(_bounds), epsilon(_epsilon), no(_no) + { + // scale to the range - if any + for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp private: eoRealVectorBounds & bounds; - double epsilon; + vector epsilon; unsigned no; }; @@ -405,4 +456,3 @@ template class eoRealUxOver: public eoQuadOp //----------------------------------------------------------------------------- //@} #endif eoRealOp_h - diff --git a/eo/src/es/es.h b/eo/src/es/es.h index cc1727e82..fff53fbe0 100644 --- a/eo/src/es/es.h +++ b/eo/src/es/es.h @@ -25,7 +25,7 @@ //----------------------------------------------------------------------------- /** This file contains all ***INSTANCIATED*** declarations of all components - * of the library for ***REAL_VALUED*** evolution inside EO. + * of the library for ***ES-like gnptype*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * * The corresponding ***INSTANCIATED*** definitions are contained in @@ -33,7 +33,9 @@ * while the TEMPLATIZED code is define in the different make_XXX.h files * either in hte src/do dir for representation independant functions, * or in the src/es dir for representation dependent stuff. - * Note that + * + * See also real.h for the similar declarations of eoReal genotypes + * i.e. ***without*** mutation parameters attached to individuals * * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations @@ -51,44 +53,77 @@ #include #include -#include +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi //Representation dependent - rewrite everything anew for each representation ////////////////////////// +/* // the genotypes -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); - eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); + eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); // the operators -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +*/ //Representation INdependent //////////////////////////// // you don't need to modify that part even if you use your own representation // init pop -eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); -eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); // the continue's -eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); -eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); // the checkpoint -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); // the algo -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); // run -void run_ea(eoAlgo >& _ga, eoPop >& _pop); -void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); // end of parameter input (+ .status + help) // that one is not templatized, but is here for completeness diff --git a/eo/src/es/make_algo_scalar_real.cpp b/eo/src/es/make_algo_scalar_real.cpp index d93afae3a..7c48b7fd3 100644 --- a/eo/src/es/make_algo_scalar_real.cpp +++ b/eo/src/es/make_algo_scalar_real.cpp @@ -33,9 +33,6 @@ * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir - * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations */ // The templatized code diff --git a/eo/src/es/make_checkpoint_real.cpp b/eo/src/es/make_checkpoint_real.cpp index 60a4a5cc1..d278caf8a 100644 --- a/eo/src/es/make_checkpoint_real.cpp +++ b/eo/src/es/make_checkpoint_real.cpp @@ -33,9 +33,6 @@ * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir - * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations */ // The templatized code diff --git a/eo/src/es/make_continue_real.cpp b/eo/src/es/make_continue_real.cpp index e53f9ecec..52574024b 100644 --- a/eo/src/es/make_continue_real.cpp +++ b/eo/src/es/make_continue_real.cpp @@ -33,9 +33,6 @@ * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_continue.h in the src/do dir - * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations */ // The templatized code diff --git a/eo/src/es/make_genotype.h b/eo/src/es/make_genotype.h index 31e645302..49e8738ba 100644 --- a/eo/src/es/make_genotype.h +++ b/eo/src/es/make_genotype.h @@ -53,10 +53,10 @@ template eoInit > & do_make_genotype(eoParameterLoader& _parser, eoState& _state, FitT) { // for eoReal, only thing needed is the size - eoValueParam& vecSize = _parser.createParam(unsigned(10), "VecSize", "The number of variables ", 'n',"initialization"); + eoValueParam& vecSize = _parser.createParam(unsigned(10), "vecSize", "The number of variables ", 'n',"initialization"); // to build an eoReal Initializer, we need bounds - eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "InitBounds", "Bounds for uniform initialization", 'B', "initialization"); + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "initBounds", "Bounds for uniform initialization", 'B', "initialization"); eoParamParamType & ppBounds = boundsParam.value(); // pair > // transform into a vector diff --git a/eo/src/es/make_op.h b/eo/src/es/make_op.h index 9c5ab1ef8..18e77e49c 100644 --- a/eo/src/es/make_op.h +++ b/eo/src/es/make_op.h @@ -35,8 +35,9 @@ // combinations of simple eoOps (eoMonOp and eoQuadOp) #include -// the specialized GA stuff +// the specialized Real stuff #include +#include #include #include // also need the parser and param includes @@ -66,14 +67,56 @@ template eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) { - // this is a temporary version, while Maarten codes the full tree-structured - // general operator input + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables", 'B', "Genetic Operators"); + + // get initisalizer size == vector size + // eoRealInitBounded * realInit = (eoRealInitBounded*)(&_init); + // unsigned vecSize = realInit->theBounds().size(); + + // get vector size: safer??? + EOT eoTmp; + _init(eoTmp); + unsigned vecSize = eoTmp.size(); + + // the bounds pointer + eoRealVectorBounds * ptBounds; + if (_parser.isItThere(boundsParam)) // otherwise, no bounds + { + /////Warning: this code should probably be replaced by creating + ///// some eoValueParam with specific implementation + //// in eoParser.cpp. At the moemnt, it is there (cf also make_genotype + eoParamParamType & ppBounds = boundsParam.value(); // pair > + // transform into a vector + vector v; + vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + /////////// end of temporary code + } + else // no param for bounds was given + ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds + // as it does not have any dimension + + // this is a temporary version(!), + // while Maarten codes the full tree-structured general operator input // BTW we must leave that simple version available somehow, as it is the one // that 90% people use! - eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); - if (operatorParam.value() != string("SGA")) - throw runtime_error("Sorry, only SGA-like operator available right now\n"); + if (operatorParam.value() != string("SGA")) + throw runtime_error("Sorry, only SGA-like operator available right now\n"); // now we read Pcross and Pmut, // the relative weights for all crossovers -> proportional choice @@ -81,119 +124,119 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators" ); - // minimum check - if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) - throw runtime_error("Invalid pCross"); + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); - eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators" ); - // minimum check - if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) - throw runtime_error("Invalid pMut"); + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); // the crossovers ///////////////// // the parameters - eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Genetic Operators" ); - // minimum check - if ( (segmentRateParam.value() < 0) ) - throw runtime_error("Invalid segmentRate"); + eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Genetic Operators" ); + // minimum check + if ( (segmentRateParam.value() < 0) ) + throw runtime_error("Invalid segmentRate"); - eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Genetic Operators" ); - // minimum check - if ( (arithmeticRateParam.value() < 0) ) - throw runtime_error("Invalid arithmeticRate"); + eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Genetic Operators" ); + // minimum check + if ( (arithmeticRateParam.value() < 0) ) + throw runtime_error("Invalid arithmeticRate"); // minimum check - bool bCross = true; - if (segmentRateParam.value()+arithmeticRateParam.value()==0) - { - cerr << "Warning: no crossover" << endl; - bCross = false; - } + bool bCross = true; + if (segmentRateParam.value()+arithmeticRateParam.value()==0) + { + cerr << "Warning: no crossover" << endl; + bCross = false; + } - // Create the CombinedQuadOp - eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; - eoQuadOp *ptQuad = NULL; + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; - if (bCross) - { - // segment crossover for bitstring - ptQuad = new eoSegmentCrossover; - _state.storeFunctor(ptQuad); - ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); + if (bCross) + { + // segment crossover for bitstring - pass it the bounds + ptQuad = new eoSegmentCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); // arithmetic crossover - ptQuad = new eoArithmeticCrossover; - _state.storeFunctor(ptQuad); - ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); + ptQuad = new eoArithmeticCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); - // don't forget to store the CombinedQuadOp - _state.storeFunctor(ptCombinedQuadOp); - } + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + } - // the mutations - ///////////////// - // the parameters - eoValueParam & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Genetic Operators" ); - // minimum check - if ( (epsilonParam.value() < 0) ) - throw runtime_error("Invalid epsilon"); + // the mutations + ///////////////// + // the parameters + eoValueParam & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Genetic Operators" ); + // minimum check + if ( (epsilonParam.value() < 0) ) + throw runtime_error("Invalid epsilon"); - eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Genetic Operators" ); - // minimum check - if ( (uniformMutRateParam.value() < 0) ) - throw runtime_error("Invalid uniformMutRate"); + eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Genetic Operators" ); + // minimum check + if ( (uniformMutRateParam.value() < 0) ) + throw runtime_error("Invalid uniformMutRate"); - eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Genetic Operators" ); - // minimum check - if ( (detMutRateParam.value() < 0) ) - throw runtime_error("Invalid detMutRate"); + eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Genetic Operators" ); + // minimum check + if ( (detMutRateParam.value() < 0) ) + throw runtime_error("Invalid detMutRate"); - eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Genetic Operators" ); - // minimum check - if ( (normalMutRateParam.value() < 0) ) - throw runtime_error("Invalid normalMutRate"); - // and the sigma - eoValueParam & sigmaParam = _parser.createParam(1.0, "sigma", "Sigma (fixed) for Gaussian mutation", 'S', "Genetic Operators" ); - // minimum check - if ( (sigmaParam.value() < 0) ) - throw runtime_error("Invalid sigma"); + eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Genetic Operators" ); + // minimum check + if ( (normalMutRateParam.value() < 0) ) + throw runtime_error("Invalid normalMutRate"); + // and the sigma + eoValueParam & sigmaParam = _parser.createParam(1.0, "sigma", "Sigma (fixed) for Gaussian mutation", 'S', "Genetic Operators" ); + // minimum check + if ( (sigmaParam.value() < 0) ) + throw runtime_error("Invalid sigma"); // minimum check - bool bMut = true; - if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) - { - cerr << "Warning: no mutation" << endl; - bMut = false; - } - if (!bCross && !bMut) - throw runtime_error("No operator called in SGA operator definition!!!"); + bool bMut = true; + if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) + { + cerr << "Warning: no mutation" << endl; + bMut = false; + } + if (!bCross && !bMut) + throw runtime_error("No operator called in SGA operator definition!!!"); // Create the CombinedMonOp - eoPropCombinedMonOp *ptCombinedMonOp = NULL; - eoMonOp *ptMon = NULL; + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; - if (bMut) - { - // uniform mutation on all components: -// offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] - ptMon = new eoUniformMutation(epsilonParam.value()); - _state.storeFunctor(ptMon); - // create the CombinedMonOp - ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); + if (bMut) + { + // uniform mutation on all components: + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + ptMon = new eoUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); // mutate exactly 1 component (uniformly) per individual - ptMon = new eoDetUniformMutation(epsilonParam.value()); - _state.storeFunctor(ptMon); - ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); + ptMon = new eoDetUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); - // mutate all component using Gaussian mutation - ptMon = new eoNormalMutation(sigmaParam.value()); - _state.storeFunctor(ptMon); - ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); - _state.storeFunctor(ptCombinedMonOp); - } + // mutate all component using Gaussian mutation + ptMon = new eoNormalMutation(*ptBounds, sigmaParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); + } // now build the eoGenOp: // to simulate SGA (crossover with proba pCross + mutation with proba pMut diff --git a/eo/src/es/make_pop_real.cpp b/eo/src/es/make_pop_real.cpp index 17a8a7b31..effb6245d 100644 --- a/eo/src/es/make_pop_real.cpp +++ b/eo/src/es/make_pop_real.cpp @@ -33,9 +33,6 @@ * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_pop.h in the src/do dir - * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations */ // The templatized code diff --git a/eo/src/es/make_run_real.cpp b/eo/src/es/make_run_real.cpp index 4a1e11ffc..42f50bb29 100644 --- a/eo/src/es/make_run_real.cpp +++ b/eo/src/es/make_run_real.cpp @@ -33,9 +33,6 @@ * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_run.h in the src/do dir - * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations */ // The templatized code diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index d0cd8df04..52bf836d2 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -169,6 +169,9 @@ public: } }; +// one object for all - see eoRealBounds.cpp +extern eoRealNoBounds eoDummyRealNoBounds; + /** * fully bounded eoRealBound == interval */ @@ -414,10 +417,9 @@ public: // virtual desctructor (to avoid warning?) virtual ~eoRealVectorBounds(){} - /** Default Ctor + /** Default Ctor. I don't like it, as it leaves NULL pointers around */ - eoRealVectorBounds() : - vector(0) {} + eoRealVectorBounds(unsigned _dim=0) : vector(_dim) {} /** Simple bounds = minimum and maximum (allowed) */ @@ -590,14 +592,19 @@ public: class eoRealVectorNoBounds: public eoRealVectorBounds { public: - // virtual desctructor (to avoid warining?) + // virtual desctructor (to avoid warning?) virtual ~eoRealVectorNoBounds(){} /** - Simple bounds = minimum and maximum (allowed) - */ - // Ctor: nothing to do! - eoRealVectorNoBounds(unsigned _dim=0) {} + * Ctor: nothing to do, but beware of dimension: call base class ctor + */ + eoRealVectorNoBounds(unsigned _dim=0) : eoRealVectorBounds(_dim) + { + // avoid NULL pointers, even though they shoudl (at the moment) never be used! + if (_dim) + for (unsigned i=0; i<_dim; i++) + operator[](i)=&eoDummyRealNoBounds; + } virtual bool isBounded(unsigned) {return false;} @@ -651,7 +658,6 @@ public: }; -// one object for all -extern eoRealNoBounds eoDummyRealNoBounds; +// one object for all - see eoRealBounds.cpp extern eoRealVectorNoBounds eoDummyVectorNoBounds; #endif diff --git a/eo/test/real_value.h b/eo/test/real_value.h index b176edfdb..8f3a0df59 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -2,17 +2,17 @@ //----------------------------------------------------------------------------- -/** Just a simple function that takes an eoEsBase and sets the fitnes +/** Just a simple function that takes an eoEsBase and sets the fitnes to sphere - @param _ind A floatingpoint vector + @param _ind vector */ double real_value(const std::vector& _ind) { - double sum = 0; /* compute in double format, even if return a float */ + double sum = 0; for (unsigned i = 0; i < _ind.size(); i++) sum += _ind[i] * _ind[i]; - return sum; + return sqrt(sum); } diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 177b625bc..05d9c4219 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -27,7 +27,7 @@ typedef eoMinimizingFitness FitT; template void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _bounds, eoValueParam _load_name); -int main(int argc, char *argv[]) +int main_function(int argc, char *argv[]) { // Create the command-line parser eoParser parser( argc, argv, "Basic EA for vector with adaptive mutations"); @@ -83,6 +83,30 @@ int main(int argc, char *argv[]) return 0; } +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} + template void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _bounds, eoValueParam _load_name) { @@ -90,8 +114,8 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _ eoEvalFuncPtr&> eval( real_value ); // population parameters, unfortunately these can not be altered in the state file - eoValueParam mu = _parser.createParam(unsigned(50), "mu","Size of the population"); - eoValueParamlambda_rate = _parser.createParam(float(7.0), "lambda_rate", "Factor of children to produce"); + eoValueParam mu = _parser.createParam(unsigned(7), "mu","Size of the population"); + eoValueParamlambda_rate = _parser.createParam(double(7.0), "lambda_rate", "Factor of children to produce"); if (lambda_rate.value() < 1.0f) { @@ -133,11 +157,19 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _ checkpoint.add(monitor); checkpoint.add(average); + // only mutation (== with rate 1.0) + eoMonGenOp op(mutate); + + // the selection: sequential selection + eoSequentialSelect select; + // the general breeder (lambda is a rate -> true) + eoGeneralBreeder breed(select, op, lambda_rate.value(), true); - eoProportionalGOpSel opSel; - opSel.addOp(mutate, 1.0); + // the replacement - hard-coded Comma replacement + eoCommaReplacement replace; - eoEvolutionStrategy es(checkpoint, eval, opSel, lambda_rate.value(), eoEvolutionStrategy::comma_strategy()); + // now the eoEasyEA + eoEasyEA es(checkpoint, eval, breed, replace); es(pop); diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index efc67f4d2..36dc6cd94 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "real_value.h" #include diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 765ee84d8..21db2ee4f 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,7 +17,7 @@ and to

    EO Tutorial

    -
    Version 0.94 - Feb. 18 2001
    +
    Version 0.95 - Apr. 27 2001

    Welcome to EO tutorial/on-line documentation.

    Please note that this tutorial is not supposed From fc01c6862a59ba5d1d0ff8d16480953dd2e08b54 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 28 Apr 2001 05:53:37 +0000 Subject: [PATCH 0567/2134] Adding first bricks of ES algorithm - make_XXX_es.cpp --- eo/src/es/make_algo_scalar_es.cpp | 80 ++++++++++++++++++++++++++++++ eo/src/es/make_checkpoint_es.cpp | 78 +++++++++++++++++++++++++++++ eo/src/es/make_continue_es.cpp | 78 +++++++++++++++++++++++++++++ eo/src/es/make_pop_es.cpp | 81 ++++++++++++++++++++++++++++++ eo/src/es/make_run_es.cpp | 82 +++++++++++++++++++++++++++++++ 5 files changed, 399 insertions(+) create mode 100644 eo/src/es/make_algo_scalar_es.cpp create mode 100644 eo/src/es/make_checkpoint_es.cpp create mode 100644 eo/src/es/make_continue_es.cpp create mode 100644 eo/src/es/make_pop_es.cpp create mode 100644 eo/src/es/make_run_es.cpp diff --git a/eo/src/es/make_algo_scalar_es.cpp b/eo/src/es/make_algo_scalar_es.cpp new file mode 100644 index 000000000..b952770e0 --- /dev/null +++ b/eo/src/es/make_algo_scalar_es.cpp @@ -0,0 +1,80 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns + * of the library for evolution of ***eoEs genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions above + +// Algo +/////// +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +////////////// +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +/////////////// +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + diff --git a/eo/src/es/make_checkpoint_es.cpp b/eo/src/es/make_checkpoint_es.cpp new file mode 100644 index 000000000..489524d66 --- /dev/null +++ b/eo/src/es/make_checkpoint_es.cpp @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns + * of the library for evolution of ***ES genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions + +// checkpoint +///////////// +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +///////////// +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +///////////// +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + + diff --git a/eo/src/es/make_continue_es.cpp b/eo/src/es/make_continue_es.cpp new file mode 100644 index 000000000..7d53ce399 --- /dev/null +++ b/eo/src/es/make_continue_es.cpp @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns + * of the library for evolution of ***ES genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_continue.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions + +// continue +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + + diff --git a/eo/src/es/make_pop_es.cpp b/eo/src/es/make_pop_es.cpp new file mode 100644 index 000000000..ca826e08d --- /dev/null +++ b/eo/src/es/make_pop_es.cpp @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns + * of the library for evolution of ***ES genotypes*** indis inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_pop.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions above + +// Init POP +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + + diff --git a/eo/src/es/make_run_es.cpp b/eo/src/es/make_run_es.cpp new file mode 100644 index 000000000..6707fe459 --- /dev/null +++ b/eo/src/es/make_run_es.cpp @@ -0,0 +1,82 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of run funs + * of the library for evolution of ***ES genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_run.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi +// the instanciating fitnesses +#include + +/// The following function merely call the templatized do_* functions above + +// run +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + From 0c3f372f7bcc5810a9240f69ea7569c0ab5a4a7a Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 28 Apr 2001 06:06:21 +0000 Subject: [PATCH 0568/2134] Declarations for make_xxx_real.cpp files - for eoReal genotypes Was previously es.h - now es.h is specifically for ES genotypes --- eo/src/es/real.h | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 eo/src/es/real.h diff --git a/eo/src/es/real.h b/eo/src/es/real.h new file mode 100644 index 000000000..f5c8927da --- /dev/null +++ b/eo/src/es/real.h @@ -0,0 +1,99 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// real.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED*** declarations of all components + * of the library for ***vector*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * + * The corresponding ***INSTANCIATED*** definitions are contained in + * the different .cpp files in the src/es dir, + * while the TEMPLATIZED code is define in the different make_XXX.h files + * either in hte src/do dir for representation independant functions, + * or in the src/es dir for representation dependent stuff. + * + * See also es.h for the similar declarations of ES-like genotypes + * i.e. ***with*** mutation parameters attached to individuals + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +#ifndef real_h +#define real_h + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +//Representation dependent - rewrite everything anew for each representation +////////////////////////// + +// the genotypes +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); + eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); + +// the operators +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); + +//Representation INdependent +//////////////////////////// +// you don't need to modify that part even if you use your own representation + +// init pop +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +// the continue's +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +// the checkpoint +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + + +// the algo +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); + +eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); + +// run +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +// end of parameter input (+ .status + help) +// that one is not templatized, but is here for completeness +void make_help(eoParser & _parser); + +#endif From 4f05bfaaf133fe8e5d966ba7e1b701815e86c150 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 29 Apr 2001 05:03:05 +0000 Subject: [PATCH 0569/2134] Re-introduced the old ctors for the mutations (for backward compatibility with the tutorial :-( --- eo/src/es/eoRealOp.h | 106 +++++++++++++++++++++++++++---------------- eo/src/es/make_op.h | 2 +- 2 files changed, 67 insertions(+), 41 deletions(-) diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index f18ac31b0..99cda3af7 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -46,16 +46,16 @@ template class eoUniformMutation: public eoMonOp { public: /** - * (Default) Constructor. - * The bounds are initialized with the global object that says: no bounds. + * Constructor without bounds == unbounded variables :-) + * not very clean, but who's doing unbounded optimization anyway? + * and it's there mostly for backward compatibility * * @param _epsilon the range for uniform nutation * @param _p_change the probability to change a given coordinate */ - eoUniformMutation(const unsigned _size, const double& _epsilon, - const double& _p_change = 1.0): - bounds(eoDummyVectorNoBounds), epsilon(_size, _epsilon), - p_change(_size, _p_change) {} + eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): + homogeneous(true), bounds(eoDummyVectorNoBounds), epsilon(1, _epsilon), + p_change(1, _p_change) {} /** * Constructor with bounds @@ -65,7 +65,7 @@ template class eoUniformMutation: public eoMonOp */ eoUniformMutation(eoRealVectorBounds & _bounds, const double& _epsilon, const double& _p_change = 1.0): - bounds(_bounds), epsilon(_bounds.size(), _epsilon), + homogeneous(false), bounds(_bounds), epsilon(_bounds.size(), _epsilon), p_change(_bounds.size(), _p_change) { // scale to the range - if any @@ -83,7 +83,8 @@ template class eoUniformMutation: public eoMonOp eoUniformMutation(eoRealVectorBounds & _bounds, const vector& _epsilon, const vector& _p_change): - bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} + homogeneous(false), bounds(_bounds), epsilon(_epsilon), + p_change(_p_change) {} /// The class name. string className() const { return "eoUniformMutation"; } @@ -94,33 +95,45 @@ template class eoUniformMutation: public eoMonOp */ bool operator()(EOT& _eo) { - // sanity check ? - if (_eo.size() != bounds.size()) - throw runtime_error("Invalid size of indi in eoUniformMutation"); - bool hasChanged=false; - for (unsigned lieu=0; lieu<_eo.size(); lieu++) + if (homogeneous) // implies no bounds object + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + { + if (rng.flip(p_change[0])) + { + _eo[0] += 2*epsilon[0]*rng.uniform()-epsilon[0]; + hasChanged = true; + } + } + else { - if (rng.flip(p_change[lieu])) - { - // check the bounds - double emin = _eo[lieu]-epsilon[lieu]; - double emax = _eo[lieu]+epsilon[lieu]; - if (bounds.isMinBounded(lieu)) - emin = max(bounds.minimum(lieu), emin); - if (bounds.isMaxBounded(lieu)) - emax = min(bounds.maximum(lieu), emax); - _eo[lieu] = emin + (emax-emin)*rng.uniform(); - hasChanged = true; - } + // sanity check ? + if (_eo.size() != bounds.size()) + throw runtime_error("Invalid size of indi in eoUniformMutation"); + + bool hasChanged=false; + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + if (rng.flip(p_change[lieu])) + { + // check the bounds + double emin = _eo[lieu]-epsilon[lieu]; + double emax = _eo[lieu]+epsilon[lieu]; + if (bounds.isMinBounded(lieu)) + emin = max(bounds.minimum(lieu), emin); + if (bounds.isMaxBounded(lieu)) + emax = min(bounds.maximum(lieu), emax); + _eo[lieu] = emin + (emax-emin)*rng.uniform(); + hasChanged = true; + } } return hasChanged; } private: + bool homogeneous; // == no bounds passed in the ctor eoRealVectorBounds & bounds; - vector epsilon; - vector p_change; + vector epsilon; // the ranges for mutation + vector p_change; // the proba that each variable is modified }; /** eoDetUniformMutation --> changes exactly k values of the vector @@ -133,13 +146,15 @@ template class eoDetUniformMutation: public eoMonOp { public: /** - * (Default) Constructor. + * (Default) Constructor for homogeneous genotype + * it's there mostly for backward compatibility + * * @param _epsilon the range for uniform nutation * @param number of coordinate to modify */ - eoDetUniformMutation(const unsigned _size, const double& _epsilon, - const unsigned& _no = 1): - bounds(eoDummyVectorNoBounds), epsilon(_size, _epsilon), no(_no) {} + eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): + homogeneous(true), bounds(eoDummyVectorNoBounds), + epsilon(1, _epsilon), no(_no) {} /** * Constructor with bounds @@ -149,7 +164,8 @@ template class eoDetUniformMutation: public eoMonOp */ eoDetUniformMutation(eoRealVectorBounds & _bounds, const double& _epsilon, const unsigned& _no = 1): - bounds(_bounds), epsilon(_bounds.size(), _epsilon), no(_no) + homogeneous(false), bounds(_bounds), + epsilon(_bounds.size(), _epsilon), no(_no) { // scale to the range - if any for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp eoDetUniformMutation(eoRealVectorBounds & _bounds, const vector& _epsilon, const unsigned& _no = 1): - bounds(_bounds), epsilon(_epsilon), no(_no) + homogeneous(false), bounds(_bounds), epsilon(_epsilon), no(_no) { // scale to the range - if any for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp */ bool operator()(EOT& _eo) { - // sanity check ? - if (_eo.size() != bounds.size()) - throw runtime_error("Invalid size of indi in eoDetUniformMutation"); - for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp emax = min(bounds.maximum(lieu), emax); _eo[lieu] = emin + (emax-emin)*rng.uniform(); } - + } return true; } private: + bool homogeneous; // == no bounds passed in the ctor eoRealVectorBounds & bounds; - vector epsilon; + vector epsilon; // the ranges of mutation unsigned no; }; diff --git a/eo/src/es/make_op.h b/eo/src/es/make_op.h index 18e77e49c..fb2c4bf88 100644 --- a/eo/src/es/make_op.h +++ b/eo/src/es/make_op.h @@ -68,7 +68,7 @@ template eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) { // First, decide whether the objective variables are bounded - eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables", 'B', "Genetic Operators"); + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Genetic Operators"); // get initisalizer size == vector size // eoRealInitBounded * realInit = (eoRealInitBounded*)(&_init); From 3f6d869b9058b4538a3cd65ef7817818156a7bf1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 30 Apr 2001 09:26:37 +0000 Subject: [PATCH 0570/2134] Changed EA basic image: - caption changed from population-parents to parents-genitors - quality improved (now 177Ko instead of 53 :-( --- eo/tutorial/html/EA_tutorial.jpg | Bin 53765 -> 177758 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/eo/tutorial/html/EA_tutorial.jpg b/eo/tutorial/html/EA_tutorial.jpg index 4a63e1ec75f73531eda46eaede45206f7b5a1cfe..11c0695fcc7c2badccdfc5d121b7ee3eaf39d04a 100644 GIT binary patch literal 177758 zcmeFZ2~-p5x;7d`ML>+mC?M%p5gDT*B7>=|G|);zL_iRPh%_P~;)Dc=DP^A1Eh6mz zX+?~P7?sHZi6jBGq9QU0v}96IhNem-l%`VrpZomlziaPv&${RC|EzQGU3crMWe7EV z-#b3<^SoyUG974ZdAG^N6H3e^&qO zvl_FOk!I`7($JeVBPLNuq*-(S?cSvS`DfN_jX87YY0lTu)&VEfFCxvJrJ*rg=% zbLN1vPk`T(=IG5`{Qa6u^Yr~AHJ2SSSbOT%OY@g+zTINDy$f04xaV-1mbQ_x$r4k` zl~${)ZPq!hci!OQ>hXi8m-mlbwgv2K%GU#_@Pd6jpq>iV79y84F3yZ7!3MdH@B_P;)U^0K?9x3B-zz@SX7 zc=Pt%$omhY=*Lf=r4AOCo-;>dj^?+0&6=GI4h_9I zbH86RZ}BF7&B#Og%hsNnZ?O5-OSfCJmOE}o4EG%F(l%PLPG*UI+uGlD_Mh8W+CR0k z|FyCIV_$=$1sbz}@-*~F5Q!jGUCtx@f9DXa#DjikX18IJ+fI9{?1;|L=Z%yCyCz-vL#r09CKS_|dA?m7jAf%5@*SDK#}jU7 zauFUcOI+~bG%Vai&TL-9?wTP*x3H|e^U$5o?7X7g`Q+lCgFfBwt&+Z1#06!Vi|jjk z=f4#1bqUv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pm?!lA7?u{d>cO{&3TU zW^b#qf+V$`_sOlUckC0N5*hTAt0>MWGpt|d_{d6}c!1i&Kvf_w4`v;~EB%QlKHnDQ zr1aFe9qiA~k#`c#gr7HM-P{JZ!T7#{&|gNDP@oHwGL`fb)P#5WLpLk^$ICWo4Ybi? zO{ynkoCrRx5 z;})rceR{;?wTqEeOHv~p*pDw$c z1Vz%Cn(OJqn^hjT@7G%_hTaAUk2TtZ^^9XH?jcd#;pRs<^^{gQ?$vW!y2T zqma*`zACaM_32joM-pnSLa9+TWf@j4tU*=4O;_4k0YUBnvf>Z)RB_itfArO8MQqIj zAnq*wfP}@X(-J}=vs9H=)YL*SNaV*j&O?tq)q$e%7Mn=Pw6qDaB$K#^8ze?Z`-Rn- zOnCS;T)X%J-Bwrb|48YB|BRB0j|cv4n=AK2CKt(rSx<3PLYg2Q(#=jHZ%LKTi1AMj zUE_PPvdb@u4f?xDn8WCJZC%gB+RV&$Tjcm1uT9MULaW2{>7U0wfXy!(YTJH}eL&?< z$Gs Date: Mon, 30 Apr 2001 12:26:31 +0000 Subject: [PATCH 0571/2134] Some changes in names, before too many users have to modify their code :-) Changed ga.h in src/ga into make_ga.h (was ambiguous with src/ga.h) Chenged the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) --- eo/src/ga/Makefile.am | 2 +- eo/src/ga/{ga.h => make_ga.h} | 4 ++-- eo/src/ga/make_genotype_ga.cpp | 17 +++++++---------- .../{make_genotype.h => make_genotype_ga.h} | 19 ++++++++++++++----- 4 files changed, 24 insertions(+), 18 deletions(-) rename eo/src/ga/{ga.h => make_ga.h} (97%) rename eo/src/ga/{make_genotype.h => make_genotype_ga.h} (77%) diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 783e68f31..08bc0498b 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -17,4 +17,4 @@ libga_a_SOURCES = make_algo_scalar_ga.cpp \ CPPFLAGS = -Wall CXXFLAGS = -g libeoincdir = $(includedir)/eo/ga -libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h ga.h +libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h make_ga.h diff --git a/eo/src/ga/ga.h b/eo/src/ga/make_ga.h similarity index 97% rename from eo/src/ga/ga.h rename to eo/src/ga/make_ga.h index 244a3050f..861cbb77e 100644 --- a/eo/src/ga/ga.h +++ b/eo/src/ga/make_ga.h @@ -52,8 +52,8 @@ ////////////////////////// // the genotypes -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); - eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo); + eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo); // the operators eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); diff --git a/eo/src/ga/make_genotype_ga.cpp b/eo/src/ga/make_genotype_ga.cpp index d6ed1b830..6903e4266 100644 --- a/eo/src/ga/make_genotype_ga.cpp +++ b/eo/src/ga/make_genotype_ga.cpp @@ -31,23 +31,20 @@ * files that you just need to link with your own main and fitness code). * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in make_genotype_ga.h - * while the TEMPLATIZED code is define in make_genotype.h in the ga dir - * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations + * in ga.h in src/ga dir + * while the TEMPLATIZED code is define in make_genotype_ga.h */ // the templatized code -#include +#include /// The following function merely call the templatized do_* functions above -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d) +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo) { - return do_make_genotype(_parser, _state, _d); + return do_make_genotype(_parser, _state, _eo); } -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d) +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo) { - return do_make_genotype(_parser, _state, _d); + return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/ga/make_genotype.h b/eo/src/ga/make_genotype_ga.h similarity index 77% rename from eo/src/ga/make_genotype.h rename to eo/src/ga/make_genotype_ga.h index ce8270e11..a0d5d92b5 100644 --- a/eo/src/ga/make_genotype.h +++ b/eo/src/ga/make_genotype_ga.h @@ -38,8 +38,12 @@ /* * This fuciont does the initialization of what's needed for a particular * genotype (here, bitstrings). - * It is templatized ***olny on the fitness*** so it can be used to evolve + * It could be here tempatied only on the fitness, as it can be used to evolve * bitstrings with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) + * * It is instanciated in ga/ga.cpp - and incorporated in the ga/libga.a * * It returns an eoInit > tha can later be used to initialize @@ -47,10 +51,15 @@ * * It uses a parser (to get user parameters) and a state (to store the memory) * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** + */ -template -eoInit > & do_make_genotype(eoParameterLoader& _parser, eoState& _state, FitT) +template +eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) { // for bitstring, only thing needed is the size eoValueParam& chromSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"initialization"); @@ -59,8 +68,8 @@ eoInit > & do_make_genotype(eoParameterLoader& _parser, eoState& _st // based on boolean_generator class (see utils/rnd_generator.h) eoBooleanGenerator * gen = new eoBooleanGenerator; _state.storeFunctor(gen); - eoInitFixedLength >* init = new eoInitFixedLength >(chromSize.value(), *gen); - // satore in state + eoInitFixedLength* init = new eoInitFixedLength(chromSize.value(), *gen); + // store in state _state.storeFunctor(init); return *init; } From d90286d890b9d871e8f1edc89d3b452adde2a12d Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 30 Apr 2001 13:01:07 +0000 Subject: [PATCH 0572/2134] Some changes in names, before too many users have to modify their code :-) Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) Changed the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) Also moved make_help.cpp into utils dir (otherwise you'd had to maintain a copy into each representation dir!). --- eo/src/do/make_help.cpp | 54 ------------------- eo/src/es/Makefile.am | 2 +- eo/src/es/{es.h => make_es.h} | 0 eo/src/es/make_genotype_real.cpp | 30 +++++++---- .../{make_genotype.h => make_genotype_real.h} | 29 ++++++---- eo/src/es/make_help.cpp | 54 ------------------- eo/src/es/{real.h => make_real.h} | 7 +-- eo/src/ga/Makefile.am | 1 - eo/src/ga/make_ga.h | 3 +- eo/src/ga/make_genotype_ga.h | 3 +- eo/src/utils/Makefile.am | 2 +- eo/test/t-eoGA.cpp | 4 +- eo/test/t-eoReal.cpp | 4 +- 13 files changed, 53 insertions(+), 140 deletions(-) delete mode 100644 eo/src/do/make_help.cpp rename eo/src/es/{es.h => make_es.h} (100%) rename eo/src/es/{make_genotype.h => make_genotype_real.h} (75%) delete mode 100644 eo/src/es/make_help.cpp rename eo/src/es/{real.h => make_real.h} (95%) diff --git a/eo/src/do/make_help.cpp b/eo/src/do/make_help.cpp deleted file mode 100644 index 31cb749f6..000000000 --- a/eo/src/do/make_help.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// make_help.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- -#include -#include - -/** Generation of the status file, and output of the help message if needed - * - * MUST be called after ALL parameters have been read in order to list them - * - * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, - * but compiled separately and stored in a library. - */ -void make_help(eoParser & _parser) -{ - // name of the "status" file where all actual parameter values will be saved - string str_status = _parser.ProgramName() + ".status"; // default value - eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (_parser.userNeedsHelp()) - { - _parser.printHelp(cout); - exit(1); - } - if (statusParam.value() != "") - { - ofstream os(statusParam.value().c_str()); - os << _parser; // and you can use that file as parameter file - } -} diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 48c1b841b..3ff392071 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libes.a libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ - make_continue_real.cpp make_genotype_real.cpp make_help.cpp \ + make_continue_real.cpp make_genotype_real.cpp \ make_op_real.cpp make_pop_real.cpp make_run_real.cpp \ make_algo_scalar_es.cpp make_checkpoint_es.cpp \ make_continue_es.cpp make_pop_es.cpp make_run_es.cpp diff --git a/eo/src/es/es.h b/eo/src/es/make_es.h similarity index 100% rename from eo/src/es/es.h rename to eo/src/es/make_es.h diff --git a/eo/src/es/make_genotype_real.cpp b/eo/src/es/make_genotype_real.cpp index e19ef54b5..29775d247 100644 --- a/eo/src/es/make_genotype_real.cpp +++ b/eo/src/es/make_genotype_real.cpp @@ -30,23 +30,33 @@ * files that you just need to link with your own main and fitness code). * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in src/es/es.h - * while the TEMPLATIZED code is define in make_genotype_real.h in the src/es dir + * in src/es/make_real.h + * while the TEMPLATIZED code is define in make_genotype_real.h * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations - */ + * It is instanciated in src/es/make_genotype_real.cpp - + * and incorporated in the ga/libga.a + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ // the templatized code -#include +#include /// The following function merely call the templatized do_* functions -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d) +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) { - return do_make_genotype(_parser, _state, _d); + return do_make_genotype(_parser, _state, _eo); } -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d) +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) { - return do_make_genotype(_parser, _state, _d); + return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/es/make_genotype.h b/eo/src/es/make_genotype_real.h similarity index 75% rename from eo/src/es/make_genotype.h rename to eo/src/es/make_genotype_real.h index 49e8738ba..236f1e126 100644 --- a/eo/src/es/make_genotype.h +++ b/eo/src/es/make_genotype_real.h @@ -35,23 +35,34 @@ /* - * This function does the initialization of what's needed for a particular - * genotype (here, eoReal). - * It is templatized ***only on the fitness*** so it can be used to evolve - * eoReal with any fitness. - * It is instanciated in es/make_genotype_real.cpp - - * and incorporated in the es/libes.a + * This fuction does the initialization of what's needed for a particular + * genotype (here, vector == eoReal). + * It could be here tempatied only on the fitness, as it can be used to evolve + * bitstrings with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) * - * It returns an eoInit > tha can later be used to initialize + * It is instanciated in src/es/make_genotyupe_real.cpp + * and incorporated in the src/es/libes.a + * + * It returns an eoInit tha can later be used to initialize * the population (see make_pop.h). * * It uses a parser (to get user parameters) and a state (to store the memory) * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** */ -template -eoInit > & do_make_genotype(eoParameterLoader& _parser, eoState& _state, FitT) +template +eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) { + // the fitness type + typedef typename EOT::Fitness FitT; + // for eoReal, only thing needed is the size eoValueParam& vecSize = _parser.createParam(unsigned(10), "vecSize", "The number of variables ", 'n',"initialization"); diff --git a/eo/src/es/make_help.cpp b/eo/src/es/make_help.cpp deleted file mode 100644 index 31cb749f6..000000000 --- a/eo/src/es/make_help.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// make_help.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- -#include -#include - -/** Generation of the status file, and output of the help message if needed - * - * MUST be called after ALL parameters have been read in order to list them - * - * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, - * but compiled separately and stored in a library. - */ -void make_help(eoParser & _parser) -{ - // name of the "status" file where all actual parameter values will be saved - string str_status = _parser.ProgramName() + ".status"; // default value - eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (_parser.userNeedsHelp()) - { - _parser.printHelp(cout); - exit(1); - } - if (statusParam.value() != "") - { - ofstream os(statusParam.value().c_str()); - os << _parser; // and you can use that file as parameter file - } -} diff --git a/eo/src/es/real.h b/eo/src/es/make_real.h similarity index 95% rename from eo/src/es/real.h rename to eo/src/es/make_real.h index f5c8927da..3786b87c1 100644 --- a/eo/src/es/real.h +++ b/eo/src/es/make_real.h @@ -59,8 +59,8 @@ ////////////////////////// // the genotypes -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); - eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); +eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); + eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); // the operators eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); @@ -93,7 +93,8 @@ void run_ea(eoAlgo >& _ga, eoPop >& _pop); void run_ea(eoAlgo >& _ga, eoPop >& _pop); // end of parameter input (+ .status + help) -// that one is not templatized, but is here for completeness +// that one is not templatized +// Because of that, the source is in src/utils dir void make_help(eoParser & _parser); #endif diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 08bc0498b..b46bb017f 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -10,7 +10,6 @@ libga_a_SOURCES = make_algo_scalar_ga.cpp \ make_checkpoint_ga.cpp \ make_continue_ga.cpp \ make_genotype_ga.cpp \ - make_help.cpp \ make_op_ga.cpp \ make_pop_ga.cpp \ make_run_ga.cpp diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index 861cbb77e..ea7561f72 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -86,7 +86,8 @@ void run_ea(eoAlgo >& _ga, eoPop >& _pop); void run_ea(eoAlgo >& _ga, eoPop >& _pop); // end of parameter input (+ .status + help) -// that one is not templatized, but is here for the sake of completeness +// that one is not templatized +// Because of that, the source is in src/utils dir void make_help(eoParser & _parser); #endif diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index a0d5d92b5..9a0fc6a81 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -36,7 +36,7 @@ /////////////////// the bitstring //////////////// /* - * This fuciont does the initialization of what's needed for a particular + * This fuction does the initialization of what's needed for a particular * genotype (here, bitstrings). * It could be here tempatied only on the fitness, as it can be used to evolve * bitstrings with any fitness. @@ -55,7 +55,6 @@ * WARNING: that last argument will generally be the result of calling * the default ctor of EOT, resulting in most cases in an EOT * that is ***not properly initialized*** - */ template diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 2f1d0c4d1..1b2484a8c 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(top_builddir)/src CPPFLAGS = -O2 -Wall lib_LIBRARIES = libeoutils.a -libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp eoRealBounds.cpp +libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp eoRealBounds.cpp make_help.cpp libeoincdir = $(includedir)/eo/utils libeoinc_HEADERS = checkpointing *.h diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index bba6d5cd8..7d073d655 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "binary_value.h" #include @@ -25,7 +25,7 @@ int main(int argc, char* argv[]) eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer - eoInit& init = make_genotype(parser, state, double()); + eoInit& init = make_genotype(parser, state, EOT()); // Build the variation operator (any seq/prop construct) eoGenOp& op = make_op(parser, state, init); diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index 36dc6cd94..42d80a0c5 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "real_value.h" #include @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer - eoInit& init = make_genotype(parser, state, eoMinimizingFitness()); + eoInit& init = make_genotype(parser, state, EOT()); // Build the variation operator (any seq/prop construct) eoGenOp& op = make_op(parser, state, init); From 5bea22e87661d0ceedaaf1ea3e7c6e658f51a0e8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 30 Apr 2001 13:24:42 +0000 Subject: [PATCH 0573/2134] Some changes in names, before too many users have to modify their code :-) Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) Changed the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) Also moved make_help.cpp into utils dir (otherwise you'd had to maintain a copy into each representation dir!). --- eo/src/utils/make_help.cpp | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 eo/src/utils/make_help.cpp diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp new file mode 100644 index 000000000..ecddbd179 --- /dev/null +++ b/eo/src/utils/make_help.cpp @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_help.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- +#include +#include + +/** Generation of the status file, and output of the help message if needed + * + * MUST be called after ALL parameters have been read in order to list them + * + * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, + * but compiled separately and stored in a library. + * + * It is declared in all make_xxx.h files in representation-dependent dirs + * but it is NOT representation-dependent itself - that's why it's in utils + */ +void make_help(eoParser & _parser) +{ + // name of the "status" file where all actual parameter values will be saved + string str_status = _parser.ProgramName() + ".status"; // default value + eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); + + // dump status file BEFORE help, so the user gets a chance to use it: + // it's probably the case where she/he needs it most!!! + // Only help parameter will not be in status file - but who cares??? + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << _parser; // and you can use that file as parameter file + } + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (_parser.userNeedsHelp()) + { + _parser.printHelp(cout); + cout << "You can use an edited copy of file " << statusParam.value() + << " as parameter file" << endl; + exit(1); + } +} From 4a152dc172b21f894efa7a34c21617c0a86df450 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 1 May 2001 05:00:29 +0000 Subject: [PATCH 0574/2134] Removing make_help.cpp --- eo/src/ga/make_help.cpp | 54 ----------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 eo/src/ga/make_help.cpp diff --git a/eo/src/ga/make_help.cpp b/eo/src/ga/make_help.cpp deleted file mode 100644 index 31cb749f6..000000000 --- a/eo/src/ga/make_help.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// make_help.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- -#include -#include - -/** Generation of the status file, and output of the help message if needed - * - * MUST be called after ALL parameters have been read in order to list them - * - * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, - * but compiled separately and stored in a library. - */ -void make_help(eoParser & _parser) -{ - // name of the "status" file where all actual parameter values will be saved - string str_status = _parser.ProgramName() + ".status"; // default value - eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (_parser.userNeedsHelp()) - { - _parser.printHelp(cout); - exit(1); - } - if (statusParam.value() != "") - { - ofstream os(statusParam.value().c_str()); - os << _parser; // and you can use that file as parameter file - } -} From 10064ad967107092b1b8b7e0bae1553ad84c0377 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:42:32 +0000 Subject: [PATCH 0575/2134] Adding Evolution Strategies: src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover src/es/make_XXX_es.h for user-input test/t-eoEsAll.cpp to test However, an old bug appeared: className was not const in eoGenOp (and derived classes) so I had to change that throughtout the hierarchy --- eo/src/eoGenOp.h | 10 +-- eo/src/eoGeneralBreeder.h | 2 +- eo/src/eoOpContainer.h | 6 +- eo/src/es/Makefile.am | 3 +- eo/src/es/eoEsChromInit.h | 132 ++++++++++++++--------------- eo/src/es/eoEsFull.h | 2 +- eo/src/es/eoEsGlobalXover.h | 139 +++++++++++++++++++++++++++++++ eo/src/es/eoEsLocalXover.h | 124 +++++++++++++++++++++++++++ eo/src/es/eoEsMutate.h | 24 ++---- eo/src/es/eoEsMutationInit.h | 24 ++++-- eo/src/es/eoEsSimple.h | 2 +- eo/src/es/eoEsStdev.h | 2 +- eo/src/es/eoEsStdevXOver.h | 2 +- eo/src/es/eoGenericRealOp.h | 10 +-- eo/src/es/eoNormalMutation.h | 2 +- eo/src/es/eoReal.h | 2 +- eo/src/es/eoRealInitBounded.h | 23 +++-- eo/src/es/eoRealOp.h | 10 +-- eo/src/es/make_es.h | 27 ++++-- eo/src/es/make_genotype_real.cpp | 4 +- eo/src/es/make_genotype_real.h | 16 +++- eo/src/es/make_op_real.cpp | 6 +- eo/src/es/make_real.h | 9 +- eo/src/ga/make_op.h | 18 ++-- eo/test/Makefile.am | 14 ++-- eo/test/t-eoGA.cpp | 4 +- eo/test/t-eoGenOp.cpp | 14 ++-- eo/test/t-eoReal.cpp | 10 ++- 28 files changed, 466 insertions(+), 175 deletions(-) create mode 100644 eo/src/es/eoEsGlobalXover.h create mode 100644 eo/src/es/eoEsLocalXover.h diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 4a0f3ac71..66e0100d1 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -63,7 +63,7 @@ class eoGenOp : public eoOp, public eoUF &, void> */ virtual unsigned max_production(void) = 0; - virtual string className() = 0; + virtual string className() const = 0; void operator()(eoPopulator& _pop) { _pop.reserve(max_production()); @@ -93,7 +93,7 @@ class eoMonGenOp : public eoGenOp (*_it).invalidate(); // look how simple } - string className() {return op.className();} + virtual string className() const {return op.className();} private : eoMonOp& op; }; @@ -120,7 +120,7 @@ class eoBinGenOp : public eoGenOp if (op(a, b)) a.invalidate(); } - string className() {return op.className();} + virtual string className() const {return op.className();} private : eoBinOp& op; @@ -141,7 +141,7 @@ class eoSelBinGenOp : public eoGenOp if (op(*_pop, sel(_pop.source()))) (*_pop).invalidate(); } - string className() {return op.className();} + virtual string className() const {return op.className();} private : eoBinOp& op; @@ -170,7 +170,7 @@ class eoQuadGenOp : public eoGenOp b.invalidate(); } } - string className() {return op.className();} + virtual string className() const {return op.className();} private : eoQuadOp& op; diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index 563d23a82..dfb05f8f1 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -82,7 +82,7 @@ class eoGeneralBreeder: public eoBreed } /// The class name. - string className() const { return "eoGeneralBreeder"; } + virtual string className() const { return "eoGeneralBreeder"; } private: eoSelectOne& select; diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index a2c9f8502..29c62a562 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -67,7 +67,7 @@ class eoOpContainer : public eoGenOp max_to_produce = max(max_to_produce,ops.back()->max_production()); } - virtual string className() = 0; + virtual string className() const = 0; protected : @@ -122,7 +122,7 @@ class eoSequentialOp : public eoOpContainer while (!_pop.exhausted()); } } - virtual string className() {return "SequentialOp";} + virtual string className() const {return "SequentialOp";} private : @@ -148,7 +148,7 @@ class eoProportionalOp : public eoOpContainer catch(eoPopulator::OutOfIndividuals&) {} } - virtual string className() {return "ProportionalOp";} + virtual string className() const {return "ProportionalOp";} }; diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 3ff392071..8d94aae2d 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -10,7 +10,8 @@ libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ make_continue_real.cpp make_genotype_real.cpp \ make_op_real.cpp make_pop_real.cpp make_run_real.cpp \ make_algo_scalar_es.cpp make_checkpoint_es.cpp \ - make_continue_es.cpp make_pop_es.cpp make_run_es.cpp + make_continue_es.cpp make_genotype_es.cpp \ + make_op_es.cpp make_pop_es.cpp make_run_es.cpp CPPFLAGS = -Wall CXXFLAGS = -g diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 895cbe8bd..90720d3d3 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -27,13 +27,10 @@ #ifndef _eoEsChromInit_H #define _eoEsChromInit_H -#include +#include #include #include #include -#include - -#include #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 @@ -44,90 +41,85 @@ Random Es-chromosome initializer (therefore derived from eoInit) - This class can initialize three types of Es's: + This class can initialize four types of real-valued genotypes + thanks to tempate specialization of private method create - eoEsSimple - eoEsStdev - eoEsFull + eoReal just an eoVector + eoEsSimple + one self-adapting single sigma for all variables + eoEsStdev a whole vector of self-adapting sigmas + eoEsFull a full self-adapting correlation matrix - @see eoEsSimple eoEsStdev eoEsFull eoInit + @see eoReal eoEsSimple eoEsStdev eoEsFull eoInit */ template -class eoEsChromInit : public eoInit +class eoEsChromInit : public eoRealInitBounded { public : - typedef typename EOT::Fitness FitT; + typedef typename EOT::Fitness FitT; - eoEsChromInit(eoRealVectorBounds& _bounds) : bounds(_bounds) - {} + eoEsChromInit(eoRealVectorBounds& _bounds, double _sigma = 0.3) : + eoRealInitBounded(_bounds), sigma(_sigma) {} - void operator()(EOT& _eo) - { - create(_eo); - } + void operator()(EOT& _eo) + { + eoRealInitBounded::operator()(_eo); + create_self_adapt(_eo); + _eo.invalidate(); // was MISSING!!!! + } + + // accessor to sigma + double sigmaInit() {return sigma;} private : - eoEsSimple& create(eoEsSimple& result) - { - result.resize(bounds.size()); + // No adaptive mutation at all + void create_self_adapt(eoReal& result)// security check :-) + { + throw runtime_error("We should not be in create_self_adapt(eoReal)!"); + } - bounds.uniform(result); + // Adaptive mutation through a unique sigma + void create_self_adapt(eoEsSimple& result) + { + // sigma is scaled by the average range (if that means anything!) + result.stdev = sigma; + } - result.stdev = 0.3*bounds.averageRange(); // 0.3 should be read as a parameter + // Adaptive mutation through a vector of sigmas + void create_self_adapt(eoEsStdev& result) + { + unsigned theSize = eoRealInitBounded::size(); + result.stdevs.resize(theSize); + for (unsigned i = 0; i < theSize; ++i) + { + // should we scale sigmas to the corresponding object variable range? + result.stdevs[i] = sigma; + } + } - return result; - } + // Adaptive mutation through a whole correlation matrix + void create_self_adapt(eoEsFull& result) + { + unsigned theSize = eoRealInitBounded::size(); - eoEsStdev create(eoEsStdev& result) - { - unsigned chromSize = bounds.size(); - result.resize(chromSize); - result.stdevs.resize(chromSize); - - bounds.uniform(result); - for (unsigned i = 0; i < chromSize; ++i) - { - // uniformly in [0.2,0.4) - // scaled by the range of the object variable) - // Just a guess (anyone a better idea?) - result.stdevs[i] = bounds.range(i) * (0.2 + 0.2*eo::rng.uniform()); - } - - return result; - } - - eoEsFull create(eoEsFull& result) - { - unsigned chromSize = bounds.size(); - result.resize(chromSize); - result.stdevs.resize(chromSize); - - unsigned i; - - for (i = 0; i < chromSize; ++i) - { - double length = bounds.maximum(i) - bounds.minimum(i); - result[i] = bounds.minimum(i) + rng.uniform(length); + result.stdevs.resize(theSize); + for (unsigned i = 0; i < theSize; ++i) + { + // should we scale sigmas to the corresponding object variable range? + result.stdevs[i] = sigma; + } - // Just a guess at the stdevs (anyone a better idea?) - result.stdevs[i] = rng.uniform(length); - } - - // nb of rotation angles: N*(N-1)/2 (in general!) - result.correlations.resize(chromSize*(chromSize - 1) / 2); - - for (i = 0; i < result.correlations.size(); ++i) - { - // And another random guess for random initialization - result.correlations[i] = rng.uniform(2 * M_PI) - M_PI; - } + // nb of rotation angles: N*(N-1)/2 (in general!) + result.correlations.resize(theSize*(theSize - 1) / 2); + for (unsigned i = 0; i < result.correlations.size(); ++i) + { + // uniform in [-PI, PI) + result.correlations[i] = rng.uniform(2 * M_PI) - M_PI; + } + } - return result; - } - - eoRealVectorBounds& bounds; + double sigma; // initial value for sigmas }; #endif diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index f4f2710af..1f6eb7346 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -44,7 +44,7 @@ class eoEsFull : public eoVector eoEsFull(void) : eoVector() {} - std::string className(void) const { return "eoEsFull"; } + virtual std::string className(void) const { return "eoEsFull"; } void printOn(std::ostream& os) const { diff --git a/eo/src/es/eoEsGlobalXover.h b/eo/src/es/eoEsGlobalXover.h new file mode 100644 index 000000000..ce016b56f --- /dev/null +++ b/eo/src/es/eoEsGlobalXover.h @@ -0,0 +1,139 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsGlobalXover.h : ES global crossover +// (c) Marc Schoenauer 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoEsGlobalXover_H +#define _eoEsGlobalXover_H + +#include + +#include +#include +#include + +#include +// needs a selector - here random +#include + +/** Gloabl crossover operator for ES genotypes. + * Uses some Atom crossovers to handle both the object variables + * and the mutation strategy parameters + */ +template +class eoEsGlobalXover: public eoGenOp +{ +public: + typedef typename EOT::Fitness FitT; + + /** + * (Default) Constructor. + */ + eoEsGlobalXover(eoBinOp & _crossObj, eoBinOp & _crossMut) : + crossObj(_crossObj), crossMut(_crossMut) {} + + /// The class name. Used to display statistics + virtual string className() const { return "eoEsGlobalXover"; } + + /// The TOTAL number of offspring (here = nb of parents modified in place) + unsigned max_production(void) { return 1; } + + /** + * modifies one parents in the populator + * using 2 new parents for each component! + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent = *_plop; // select the first parent + + // first, the object variables + for (unsigned i=0; i used by _plop to get parents + const EOT& realParent1 = sel(_plop.source()); + const EOT& realParent2 = sel(_plop.source()); + parent[i] = realParent1[i]; + crossObj(parent[i], realParent2[i]); // apply eoBinOp + } + // then the self-adaptation parameters + cross_self_adapt(parent, _plop.source()); + // dont' forget to invalidate + parent.invalidate(); + } + +private: + + // the method to cross slef-adaptation parameters: need to specialize + + void cross_self_adapt(eoEsSimple & _parent, const eoPop >& _pop) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdev = realParent1.stdev; + crossMut(_parent.stdev, realParent2.stdev); // apply eoBinOp + } + + void cross_self_adapt(eoEsStdev & _parent, const eoPop >& _pop) + { + for (unsigned i=0; i<_parent.size(); i++) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdevs[i] = realParent1.stdevs[i]; + crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp + } + } + + void cross_self_adapt(eoEsFull & _parent, const eoPop >& _pop) + { + unsigned i; + // the StDev + for (i=0; i<_parent.size(); i++) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdevs[i] = realParent1.stdevs[i]; + crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp + } + // the roataion angles + for (i=0; i<_parent.correlations.size(); i++) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.correlations[i] = realParent1.correlations[i]; + crossMut(_parent.correlations[i], realParent2.correlations[i]); // apply eoBinOp + } + + } + + // the data + eoRandomSelect sel; + eoBinOp & crossObj; + eoBinOp & crossMut; +}; + +#endif diff --git a/eo/src/es/eoEsLocalXover.h b/eo/src/es/eoEsLocalXover.h new file mode 100644 index 000000000..bcf1c8559 --- /dev/null +++ b/eo/src/es/eoEsLocalXover.h @@ -0,0 +1,124 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsLocalXover.h : ES global crossover +// (c) Marc Schoenauer 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoEsLocalXover_H +#define _eoEsLocalXover_H + +#include + +#include +#include +#include + +#include +// needs a selector - here random +#include + +/** Local (i.e. std eoBinOp) crossover operator for ES genotypes. + * Uses some Atom crossovers to handle both the object variables + * and the mutation strategy parameters + * It is an eoGenOp and not an eoBinOp for consistency with the global version + */ +template +class eoEsLocalXover: public eoGenOp +{ +public: + typedef typename EOT::Fitness FitT; + + /** + * (Default) Constructor. + */ + eoEsLocalXover(eoBinOp & _crossObj, eoBinOp & _crossMut) : + crossObj(_crossObj), crossMut(_crossMut) {} + + /// The class name. Used to display statistics + virtual string className() const { return "eoEsLocalXover"; } + + /// The TOTAL number of offspring (here = nb of parents modified in place) + unsigned max_production(void) { return 1; } + + /** + * modifies one parents in the populator + * using a second parent + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent1 = *_plop; // select the first parent + const EOT& parent2 = sel(_plop.source()); // and the second, randomly + + // first, the object variables + for (unsigned i=0; i & _parent1, const eoEsSimple & _parent2) + { + crossMut(_parent1.stdev, _parent2.stdev); // apply eoBinOp + } + + void cross_self_adapt(eoEsStdev & _parent1, const eoEsStdev & _parent2) + { + for (unsigned i=0; i<_parent1.size(); i++) + { + crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + } + } + + void cross_self_adapt(eoEsFull & _parent1, const eoEsFull & _parent2) + { + unsigned i; + // the StDev + for (i=0; i<_parent1.size(); i++) + { + crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + } + // the roataion angles + for (i=0; i<_parent1.correlations.size(); i++) + { + crossMut(_parent1.correlations[i], _parent2.correlations[i]); // apply eoBinOp + } + + } + + // the data + eoRandomSelect sel; + eoBinOp & crossObj; + eoBinOp & crossMut; +}; + +#endif diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index bee67f2a4..d6568a908 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -122,11 +122,11 @@ public: virtual bool operator()( eoEsStdev& _eo ) { - double global = exp(TauGlb * rng.normal()); + double global = TauGlb * rng.normal(); for (unsigned i = 0; i < _eo.size(); i++) { double stdev = _eo.stdevs[i]; - stdev *= global * exp(TauLcl * rng.normal()); + stdev *= exp( global + TauLcl * rng.normal() ); if (stdev < stdev_eps) stdev = stdev_eps; @@ -135,7 +135,7 @@ public: _eo[i] += stdev * rng.normal(); } - bounds.foldsInBounds(_eo); + bounds.foldsInBounds(_eo); return true; } @@ -158,12 +158,12 @@ public: * First: mutate standard deviations (as above). */ - double global = exp(TauGlb * rng.normal()); + double global = TauGlb * rng.normal(); unsigned i; for (i = 0; i < _eo.size(); i++) { double stdev = _eo.stdevs[i]; - stdev *= global * exp(TauLcl * rng.normal()); + stdev *= exp( global + TauLcl*rng.normal() ); if (stdev < stdev_eps) stdev = stdev_eps; @@ -229,7 +229,8 @@ public: { unsigned size = bounds.size(); TauLcl = _init.TauLcl(); - TauLcl /= sqrt((double) size); + TauLcl /= sqrt(2*(double) size); + cout << "Init: tau local " << TauLcl << endl; } void init(eoEsStdev, eoEsMutationInit& _init) @@ -242,12 +243,14 @@ public: // renormalization TauLcl /= sqrt( 2.0 * sqrt( (double)size ) ); TauGlb /= sqrt( 2.0 * ( (double) size ) ); + cout << "Init: tau local " << TauLcl << " et global " << TauGlb << endl; } void init(eoEsFull, eoEsMutationInit& _init) { init(eoEsStdev(), _init); TauBeta = _init.TauBeta(); + cout << "Init: tau local " << TauLcl << " et global " << TauGlb << endl; } // the data @@ -264,14 +267,5 @@ public: template const double eoEsMutate::stdev_eps = 1.0e-40; -/* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ - #endif diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index 58f683e58..9baa340f3 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -47,13 +47,19 @@ class eoEsMutationInit { public : - eoEsMutationInit(eoParameterLoader& _parser) : parser(_parser), TauLclParam(0), TauGlbParam(0), TauBetaParam(0) {} + eoEsMutationInit(eoParameterLoader& _parser, + std::string _section="ES mutation parameters" ) : + parser(_parser), repSection(_section), + TauLclParam(0), TauGlbParam(0), TauBetaParam(0) {} + + // because we have virtual function - size + virtual ~eoEsMutationInit(){} double TauLcl(void) { if (TauLclParam == 0) { - TauLclParam = &parser.createParam(1.0, TauLclName(), "Local Tau", TauLclShort(), section()); + TauLclParam = &parser.createParam(1.0, TauLclName(), "Local Tau (before normalization)", TauLclShort(), section()); } return TauLclParam->value(); @@ -63,7 +69,7 @@ class eoEsMutationInit { if (TauGlbParam == 0) { - TauGlbParam = &parser.createParam(1.0, TauGlbName(), "Global Tau", TauGlbShort(), section()); + TauGlbParam = &parser.createParam(1.0, TauGlbName(), "Global Tau (before normalization)", TauGlbShort(), section()); } return TauGlbParam->value(); @@ -82,7 +88,7 @@ class eoEsMutationInit protected : virtual std::string section(void) - { return "Parameters of ES mutation (before renormalization)"; } + { return repSection; } virtual std::string TauLclName(void) const { return "TauLcL"; } virtual char TauLclShort(void) const { return 'l'; } @@ -95,11 +101,11 @@ class eoEsMutationInit private : - eoParameterLoader& parser; - - eoValueParam* TauLclParam; - eoValueParam* TauGlbParam; - eoValueParam* TauBetaParam; + eoParameterLoader& parser; + std::string repSection; + eoValueParam* TauLclParam; + eoValueParam* TauGlbParam; + eoValueParam* TauBetaParam; }; #endif diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h index c7ba1e6cd..9ec29040f 100644 --- a/eo/src/es/eoEsSimple.h +++ b/eo/src/es/eoEsSimple.h @@ -52,7 +52,7 @@ public : eoEsSimple(void) : eoVector() {} - std::string className(void) const { return "eoEsSimple"; } + virtual std::string className(void) const { return "eoEsSimple"; } void printOn(std::ostream& os) const { diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index 9c7b38315..fd43476d5 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -45,7 +45,7 @@ class eoEsStdev : public eoVector eoEsStdev(void) : eoVector() {} - std::string className(void) const { return "eoEsStdev"; } + virtual std::string className(void) const { return "eoEsStdev"; } void printOn(std::ostream& os) const { diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h index 1e0aa388c..aac1e9a61 100644 --- a/eo/src/es/eoEsStdevXOver.h +++ b/eo/src/es/eoEsStdevXOver.h @@ -48,7 +48,7 @@ public : eoQuadOp > & _stdDevXOver) : objectXOver(_objectXOver), stdDevXOver(_stdDevXOver) {} - std::string className(void) const { return "eoEsStdevXOver"; } + virtual std::string className(void) const { return "eoEsStdevXOver"; } bool operator()(EOT & _eo1, EOT & _eo2) { diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h index d037df8d7..ac3eadd65 100644 --- a/eo/src/es/eoGenericRealOp.h +++ b/eo/src/es/eoGenericRealOp.h @@ -75,7 +75,7 @@ template class eoGenericUniformMutation: public eoMonOp bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} /// The class name. - string className() const { return "eoGenericUniformMutation"; } + virtual string className() const { return "eoGenericUniformMutation"; } /** * Do it! @@ -140,7 +140,7 @@ template class eoGenericDetUniformMutation: bounds(_bounds), epsilon(_epsilon), no(_no) {} /// The class name. - string className() const { return "eoGenericDetUniformMutation"; } + virtual string className() const { return "eoGenericDetUniformMutation"; } /** * Do it! @@ -208,7 +208,7 @@ template class eoGenericSegmentCrossover: public eoQuadOp bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} /// The class name. - string className() const { return "eoGenericSegmentCrossover"; } + virtual string className() const { return "eoGenericSegmentCrossover"; } /** * segment crossover - modifies both parents @@ -307,7 +307,7 @@ template class eoGenericArithmeticCrossover: } /// The class name. - string className() const { return "eoGenericArithmeticCrossover"; } + virtual string className() const { return "eoGenericArithmeticCrossover"; } /** * arithmetical crossover - modifies both parents @@ -383,7 +383,7 @@ template class eoGenericRealUxOver: public eoQuadOp } /// The class name. - string className() const { return "eoRealUxOver"; } + virtual string className() const { return "eoRealUxOver"; } /** * Uniform crossover for real vectors diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 2c4718c47..4722a081a 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -69,7 +69,7 @@ template class eoNormalMutation: public eoMonOp sigma(_sigma), bounds(_bounds), p_change(_p_change) {} /// The class name. - string className() const { return "eoNormalMutation"; } + virtual string className() const { return "eoNormalMutation"; } /** * Do it! diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index 9143f2784..b239fecfc 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -46,7 +46,7 @@ template class eoReal: public eoVector eoVector(size, value) {} /// My class name. - string className() const + virtual string className() const { return "eoReal"; } diff --git a/eo/src/es/eoRealInitBounded.h b/eo/src/es/eoRealInitBounded.h index bc9136b34..f35a20b48 100644 --- a/eo/src/es/eoRealInitBounded.h +++ b/eo/src/es/eoRealInitBounded.h @@ -33,21 +33,30 @@ #include #include -template -class eoRealInitBounded : public eoInit > +/** Simple initialization for any EOT that derives from vector + * uniformly in some bounds + */ +template +class eoRealInitBounded : public eoInit { public: /** Ctor - from eoRealVectorBounds */ - eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) {} + eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) + { + if (!bounds.isBounded()) + throw runtime_error("Needs bounded bounds to initialize a vector"); + } /** simply passes the argument to the uniform method of the bounds */ - virtual void operator()(eoReal& _eo) + virtual void operator()(EOT & _eo) { - bounds.uniform(_eo); // fills _eo with uniform values in bounds + bounds.uniform(_eo); // resizes, and fills uniformly in bounds + _eo.invalidate(); // was MISSING!!!! } /** accessor to the bounds */ - const eoRealVectorBounds & theBounds() {return bounds;} + virtual eoRealVectorBounds & theBounds() {return bounds;} + virtual unsigned size(){return bounds.size();} private: eoRealVectorBounds & bounds; @@ -55,5 +64,5 @@ class eoRealInitBounded : public eoInit > //----------------------------------------------------------------------------- //@} -#endif eoRealOp_h +#endif diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 99cda3af7..182710926 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -87,7 +87,7 @@ template class eoUniformMutation: public eoMonOp p_change(_p_change) {} /// The class name. - string className() const { return "eoUniformMutation"; } + virtual string className() const { return "eoUniformMutation"; } /** * Do it! @@ -191,7 +191,7 @@ template class eoDetUniformMutation: public eoMonOp } /// The class name. - string className() const { return "eoDetUniformMutation"; } + virtual string className() const { return "eoDetUniformMutation"; } /** * Do it! @@ -273,7 +273,7 @@ template class eoSegmentCrossover: public eoQuadOp bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} /// The class name. - string className() const { return "eoSegmentCrossover"; } + virtual string className() const { return "eoSegmentCrossover"; } /** * segment crossover - modifies both parents @@ -371,7 +371,7 @@ template class eoArithmeticCrossover: public eoQuadOp } /// The class name. - string className() const { return "eoArithmeticCrossover"; } + virtual string className() const { return "eoArithmeticCrossover"; } /** * arithmetical crossover - modifies both parents @@ -448,7 +448,7 @@ template class eoRealUxOver: public eoQuadOp } /// The class name. - string className() const { return "eoRealUxOver"; } + virtual string className() const { return "eoRealUxOver"; } /** * Uniform crossover for real vectors diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index fff53fbe0..d4c45394b 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -57,18 +57,31 @@ #include // one sigmal per object variable #include // full correlation matrix per indi +// include all similar declaration for eoReal - i.e. real-valued genotyes +// without self-adaptation +#include + //Representation dependent - rewrite everything anew for each representation ////////////////////////// - -/* // the genotypes -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, double _d); - eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoMinimizingFitness _d); +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo); +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo); + +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo); +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo); + +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo); +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo); + + // the operators -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); -*/ +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); //Representation INdependent //////////////////////////// diff --git a/eo/src/es/make_genotype_real.cpp b/eo/src/es/make_genotype_real.cpp index 29775d247..b5ea03741 100644 --- a/eo/src/es/make_genotype_real.cpp +++ b/eo/src/es/make_genotype_real.cpp @@ -52,11 +52,11 @@ /// The following function merely call the templatized do_* functions -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) { return do_make_genotype(_parser, _state, _eo); } -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) { return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index 236f1e126..823b509bc 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -28,7 +28,7 @@ #define _make_genotype_h #include -#include +#include // also need the parser and param includes #include #include @@ -58,7 +58,7 @@ */ template -eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +eoEsChromInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) { // the fitness type typedef typename EOT::Fitness FitT; @@ -88,8 +88,16 @@ eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); // we need to give ownership of this pointer to somebody - eoRealInitBounded * init = - new eoRealInitBounded(*ptBounds); + // now some initial value for sigmas - even if useless? + // shoudl be used in Normal mutation + eoValueParam& sigmaParam = _parser.createParam(0.3, "sigmaInit", "Initial value for Sigma(s)", 's',"initialization"); + + // minimum check + if ( (sigmaParam.value() < 0) ) + throw runtime_error("Invalid sigma"); + + eoEsChromInit * init = + new eoEsChromInit(*ptBounds, sigmaParam.value()); // satore in state _state.storeFunctor(init); return *init; diff --git a/eo/src/es/make_op_real.cpp b/eo/src/es/make_op_real.cpp index 7273de9c4..b392193d7 100644 --- a/eo/src/es/make_op_real.cpp +++ b/eo/src/es/make_op_real.cpp @@ -37,18 +37,18 @@ */ // Templatized code -#include +#include /// The following function merely call the templatized do_* functions above // oeprators //////////// -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } diff --git a/eo/src/es/make_real.h b/eo/src/es/make_real.h index 3786b87c1..f858e8a5e 100644 --- a/eo/src/es/make_real.h +++ b/eo/src/es/make_real.h @@ -53,18 +53,19 @@ #include #include +#include #include //Representation dependent - rewrite everything anew for each representation ////////////////////////// // the genotypes -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); - eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); +eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); // the operators -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); //Representation INdependent //////////////////////////// diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 05af2eb96..4fc7968c5 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -72,7 +72,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); if (operatorParam.value() != string("SGA")) throw runtime_error("Only SGA-like operator available roght now\n"); @@ -83,12 +83,12 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators" ); + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); // minimum check if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) throw runtime_error("Invalid pCross"); - eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators" ); + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); // minimum check if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) throw runtime_error("Invalid pMut"); @@ -96,17 +96,17 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& onePointRateParam = _parser.createParam(double(1.0), "onePointRate", "Relative rate for one point crossover", '1', "Genetic Operators" ); + eoValueParam& onePointRateParam = _parser.createParam(double(1.0), "onePointRate", "Relative rate for one point crossover", '1', "Variation Operators" ); // minimum check if ( (onePointRateParam.value() < 0) ) throw runtime_error("Invalid onePointRate"); - eoValueParam& twoPointsRateParam = _parser.createParam(double(1.0), "twoPointRate", "Relative rate for two point crossover", '2', "Genetic Operators" ); + eoValueParam& twoPointsRateParam = _parser.createParam(double(1.0), "twoPointRate", "Relative rate for two point crossover", '2', "Variation Operators" ); // minimum check if ( (twoPointsRateParam.value() < 0) ) throw runtime_error("Invalid twoPointsRate"); - eoValueParam& uRateParam = _parser.createParam(double(2.0), "uRate", "Relative rate for uniform crossover", 'U', "Genetic Operators" ); + eoValueParam& uRateParam = _parser.createParam(double(2.0), "uRate", "Relative rate for uniform crossover", 'U', "Variation Operators" ); // minimum check if ( (uRateParam.value() < 0) ) throw runtime_error("Invalid uRate"); @@ -143,17 +143,17 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit & pMutPerBitParam = _parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Genetic Operators" ); + eoValueParam & pMutPerBitParam = _parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Variation Operators" ); // minimum check if ( (pMutPerBitParam.value() < 0) || (pMutPerBitParam.value() > 0.5) ) throw runtime_error("Invalid pMutPerBit"); - eoValueParam & bitFlipRateParam = _parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 's', "Genetic Operators" ); + eoValueParam & bitFlipRateParam = _parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 's', "Variation Operators" ); // minimum check if ( (bitFlipRateParam.value() < 0) ) throw runtime_error("Invalid bitFlipRate"); - eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Genetic Operators" ); + eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Variation Operators" ); // minimum check if ( (oneBitRateParam.value() < 0) ) throw runtime_error("Invalid oneBitRate"); diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 6197c15a0..66899e8e1 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -14,19 +14,13 @@ CXXFLAGS = -g -Wall ############################################################################### check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ - t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector + t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull # noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal ############################################################################### -#t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -#t_eoESFull_DEPENDENCIES = $(DEPS) -#t_eoESFull_LDFLAGS = -lm -#t_eoESFull_LDADD = $(LDADDS) -############################################################################### - t_eoRandom_SOURCES = t-eoRandom.cpp t_eoRandom_DEPENDENCIES = $(DEPS) t_eoRandom_LDADD = $(LDADDS) @@ -122,6 +116,12 @@ t_eoReal_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) ############################################################################### +t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h +t_eoESAll_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a +t_eoESAll_LDFLAGS = -lm +t_eoESAll_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) +############################################################################### + t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h t_eoSSGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoSSGA_LDFLAGS = -lm diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index 7d073d655..9fa1fd663 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -36,7 +36,6 @@ int main(int argc, char* argv[]) // initialize the population - and evaluate // yes, this is representation indepedent once you have an eoInit eoPop& pop = make_pop(parser, state, init); - apply(eval, pop); // stopping criteria eoContinue & term = make_continue(parser, state, eval); @@ -52,6 +51,9 @@ int main(int argc, char* argv[]) //// GO /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out cout << "Initial Population\n"; pop.sortedPrintOn(cout); cout << endl; diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index d885b7cb2..6591ada96 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -59,7 +59,7 @@ class monop : public eoMonOp _eo.fitness(_eo.fitness()+pSize); return false; } - string className() {return sig;} + string className() const {return sig;} private: string sig; }; @@ -74,13 +74,13 @@ class binop: public eoBinOp _eo1.fitness(_eo1.fitness()+f); return false; } - string className() {return "binop";} + string className() const {return "binop";} }; class quadop: public eoQuadOp { public : - string className() {return "quadop";} + string className() const {return "quadop";} bool operator()(EOT& a, EOT& b) { EOT oi = a; @@ -98,7 +98,7 @@ class quadop: public eoQuadOp class quadClone: public eoQuadOp { public : - string className() {return "quadclone";} + string className() const {return "quadclone";} bool operator()(EOT& , EOT& ) {return false;} }; @@ -120,7 +120,7 @@ class one2threeOp : public eoGenOp // :-) eo.s = "v(" + eo.s + ", 0)"; // only now change the thing // oh right, and invalidate fitnesses } - virtual string className() {return "one2threeOp";} + virtual string className() const {return "one2threeOp";} }; @@ -136,7 +136,7 @@ class two2oneOp : public eoGenOp // :-) eo.s = "221(" + eo.s + ", " + eo2.s + ")"; // oh right, and invalidate fitnesses } - virtual string className() {return "two2oneOp";} + virtual string className() const {return "two2oneOp";} }; class three2threeOp : public eoGenOp // :-) @@ -159,7 +159,7 @@ class three2threeOp : public eoGenOp // :-) // oh right, and invalidate fitnesses cout << "les enfants: a=" << eo1 << " et b=" << eo2 << " et c=" << eo3 << endl; } - virtual string className() {return "three2threeOp";} + virtual string className() const {return "three2threeOp";} }; diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index 42d80a0c5..09e7ced51 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer - eoInit& init = make_genotype(parser, state, EOT()); + eoRealInitBounded& init = make_genotype(parser, state, EOT()); // Build the variation operator (any seq/prop construct) eoGenOp& op = make_op(parser, state, init); @@ -37,14 +37,13 @@ int main(int argc, char* argv[]) // initialize the population - and evaluate // yes, this is representation indepedent once you have an eoInit eoPop& pop = make_pop(parser, state, init); - apply(eval, pop); // stopping criteria eoContinue & term = make_continue(parser, state, eval); // output eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); // algorithm (need the operator!) - eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + eoAlgo& ea = make_algo_scalar(parser, state, eval, checkpoint, op); ///// End of construction of the algorith ///////////////////////////////////////// @@ -53,11 +52,14 @@ int main(int argc, char* argv[]) //// GO /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out cout << "Initial Population\n"; pop.sortedPrintOn(cout); cout << endl; - run_ea(ga, pop); // run the ga + run_ea(ea, pop); // run the ea cout << "Final Population\n"; pop.sortedPrintOn(cout); From 17484feeef9a25163b267871511af36691a84216 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:47:56 +0000 Subject: [PATCH 0576/2134] Forgotten ES files + start of tutorial Lesson4 (about make_XXX) --- eo/src/es/make_op_es.h | 186 +++++++++++++++++++++++ eo/src/es/make_op_real.h | 257 ++++++++++++++++++++++++++++++++ eo/tutorial/html/eoLesson3.html | 8 +- eo/tutorial/html/eoLesson4.html | 237 +++++++++++++++++++++++++++++ eo/tutorial/html/eoTopDown.html | 23 ++- 5 files changed, 700 insertions(+), 11 deletions(-) create mode 100644 eo/src/es/make_op_es.h create mode 100644 eo/src/es/make_op_real.h create mode 100644 eo/tutorial/html/eoLesson4.html diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h new file mode 100644 index 000000000..74f4e6ccf --- /dev/null +++ b/eo/src/es/make_op_es.h @@ -0,0 +1,186 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) +{ + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Variation Operators"); + + // get vector size + unsigned vecSize = _init.size(); + + // the bounds pointer + eoRealVectorBounds * ptBounds; + if (_parser.isItThere(boundsParam)) // otherwise, no bounds + { + /////Warning: this code should probably be replaced by creating + ///// some eoValueParam with specific implementation + //// in eoParser.cpp. At the moment, it is there (cf also make_genotype + eoParamParamType & ppBounds = boundsParam.value(); // pair > + // transform into a vector + vector v; + vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + /////////// end of temporary code + } + else // no param for bounds was given + ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds + // as it does not have any dimension + + // now we read Pcross and Pmut, + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + + if (operatorParam.value() != string("SGA")) + throw runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(1.0, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(1.0, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // crossover + ///////////// + // ES crossover + eoValueParam& crossTypeParam = _parser.createParam(string("Global"), "crossType", "Type of ES recombination (gloabl or local)", 'C', "Variation Operators"); + + eoValueParam& crossObjParam = _parser.createParam(string("Discrete"), "crossObj", "Recombination of object variables (Discrete or Intermediate)", 'O', "Variation Operators"); + eoValueParam& crossStdevParam = _parser.createParam(string("Intermediate"), "crossStdev", "Recombination of mutation strategy parameters (Intermediate or Discrete)", 'S', "Variation Operators"); + + // The pointers: first the atom Xover + eoBinOp *ptObjAtomCross = NULL; + eoBinOp *ptStdevAtomCross = NULL; + // then the global one + eoGenOp *ptCross; + + // check for the atom Xovers + if (crossObjParam.value() == string("Discrete")) + ptObjAtomCross = new eoRealAtomExchange; + else if (crossObjParam.value() == string("Intermediate")) + ptObjAtomCross = new eoRealAtomExchange; + else throw runtime_error("Invalid Object variable crossover type"); + + if (crossStdevParam.value() == string("Discrete")) + ptStdevAtomCross = new eoRealAtomExchange; + else if (crossStdevParam.value() == string("Intermediate")) + ptStdevAtomCross = new eoRealAtomExchange; + else throw runtime_error("Invalid mutation strategy parameter crossover type"); + + // and build the indi Xover + if (crossTypeParam.value() == string("Global")) + ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); + else if (crossTypeParam.value() == string("Local")) + ptCross = new eoEsLocalXover(*ptObjAtomCross, *ptStdevAtomCross); + else throw runtime_error("Invalide Object variable crossover type"); + + // now that everything is OK, DON'T FORGET TO STORE MEMORY + _state.storeFunctor(ptObjAtomCross); + _state.storeFunctor(ptStdevAtomCross); + _state.storeFunctor(ptCross); + + // mutation + ///////////// + + // Ok, time to set up the self-adaptive mutation + // Proxy for the mutation parameters + eoEsMutationInit mutateInit(_parser, "Variation Operators"); + + eoEsMutate * ptMon = new eoEsMutate(mutateInit, *ptBounds); + _state.storeFunctor(ptMon); + + // encapsulate into an eoGenop + eoMonGenOp * op = new eoMonGenOp(*ptMon); + _state.storeFunctor(op); + + // that's it! + return *op; +} +#endif diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h new file mode 100644 index 000000000..315c839ff --- /dev/null +++ b/eo/src/es/make_op_real.h @@ -0,0 +1,257 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) +{ + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Variation Operators"); + + // get vector size + unsigned vecSize = _init.size(); + + // the bounds pointer + eoRealVectorBounds * ptBounds; + if (_parser.isItThere(boundsParam)) // otherwise, no bounds + { + /////Warning: this code should probably be replaced by creating + ///// some eoValueParam with specific implementation + //// in eoParser.cpp. At the moemnt, it is there (cf also make_genotype + eoParamParamType & ppBounds = boundsParam.value(); // pair > + // transform into a vector + vector v; + vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + /////////// end of temporary code + } + else // no param for bounds was given + ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds + // as it does not have any dimension + + // this is a temporary version(!), + // while Maarten codes the full tree-structured general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + + if (operatorParam.value() != string("SGA")) + throw runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Variation Operators" ); + // minimum check + if ( (segmentRateParam.value() < 0) ) + throw runtime_error("Invalid segmentRate"); + + eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Variation Operators" ); + // minimum check + if ( (arithmeticRateParam.value() < 0) ) + throw runtime_error("Invalid arithmeticRate"); + + // minimum check + bool bCross = true; + if (segmentRateParam.value()+arithmeticRateParam.value()==0) + { + cerr << "Warning: no crossover" << endl; + bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + + if (bCross) + { + // segment crossover for bitstring - pass it the bounds + ptQuad = new eoSegmentCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); + + // arithmetic crossover + ptQuad = new eoArithmeticCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + } + + // the mutations + ///////////////// + // the parameters + eoValueParam & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Variation Operators" ); + // minimum check + if ( (epsilonParam.value() < 0) ) + throw runtime_error("Invalid epsilon"); + + eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Variation Operators" ); + // minimum check + if ( (uniformMutRateParam.value() < 0) ) + throw runtime_error("Invalid uniformMutRate"); + + eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Variation Operators" ); + // minimum check + if ( (detMutRateParam.value() < 0) ) + throw runtime_error("Invalid detMutRate"); + + eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Variation Operators" ); + // minimum check + if ( (normalMutRateParam.value() < 0) ) + throw runtime_error("Invalid normalMutRate"); + + eoValueParam & sigmaParam = _parser.createParam(0.3, "sigma", "Sigma (fixed) for Gaussian mutation", 's', "Variation Operators" ); + + // minimum check + bool bMut = true; + if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) + { + cerr << "Warning: no mutation" << endl; + bMut = false; + } + if (!bCross && !bMut) + throw runtime_error("No operator called in SGA operator definition!!!"); + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + if (bMut) + { + // uniform mutation on all components: + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + ptMon = new eoUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); + + // mutate exactly 1 component (uniformly) per individual + ptMon = new eoDetUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); + + // mutate all component using Gaussian mutation + ptMon = new eoNormalMutation(*ptBounds, sigmaParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); + } + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return *op; +} +#endif diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index ef4c3f87c..46e2e89f4 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -142,7 +142,7 @@ See the parameter section of the Component-Based tutorial, or wait until class, whose only purpose is the input of parameters. -


    eoParser: +
    eoParser: Modifying parameter values at run-time:
    Using an eoParser object, the parameter values are read, by order of priority @@ -154,7 +154,7 @@ are read, by order of priority
    from a text file
  • -from the environment
  • +from the environment (forthcoming, if somebody insists)
  • from default values
  • @@ -174,8 +174,8 @@ the command-line or in a text file)
                   --longKeyword=value     -or     -c=value    -if 'c' is the short keyword +or     -cvalue    +if 'c' is the short keyword (though -c=value also works)
     
  • so, after compiling the executable for Lesson 3 (make diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html new file mode 100644 index 000000000..627cb24cb --- /dev/null +++ b/eo/tutorial/html/eoLesson4.html @@ -0,0 +1,237 @@ + + + + + + Tutorial: Lesson 3 + + +Lesson 3 - +Lesson +5 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
    +
    +
    +

    +Tutorial Lesson 4: fully operational EA

    +In this lesson, you will still use the same Evolutionary Algorithm. But +this time you will have full control of all components +from the command-line or a parameter file. +You can even use the algorithm decribed here without any other knowledge +of EO, just by writing your fitness function as a plain C++ function. This +is why this lesson starts with a user's guide, +most of it being representation-independent, with some parts that are specific +of respectively the binary and the real +algorithms. +
    However, the ultimate purpose of this tutorial is to be able to do +your own experiments - and these these will likely fall outside the scope +of these two programs. This is why you should also read the programmer's +guides, as the structure and memory managements are here radically different +that in the 3 previous lessons - though relying of course on the same objects. +
      +

    +


    +
    User's +guide +
    As already said, the behavior of the algorithms +will be exactly the same as the previous one as far as optimization is +concerned. Only now you will be able to tune every component of the algorithms +- except the type of genotype - using run-time parameters. +
    Also, as in previous lessons, most of the code +is representation-independent, i.e. is the same for both the binary genotypes +and the real-valued genotypes. This small user's guide reflects that, but +you can go directly to the binary or the real +parts if you wish. Parameters input The way to input parameters has already +be described in Lesson 3. To get +a list of parameters, type the command with option --help (or -h): with +both testBit and testReal this will result in +
      +
    • +Printing the list of keywords on the standard output
    • + +
    • +Creating (or overwriting) a file name testBit.status +or testReal.status that contains the list of all recognized parameters +and has the format of an input parameter file.
    • +
    +User's guide: +The status file +
    This file will always contain the list of the +parameters that have been actually used by the last run of the program, +however thay have been entered (try testBit +-G1 and take a look a the +status file). The parameters that are commented out (a # character comments +out the rest of the line) in the file were not specified by the user. +

    User's guide: +Representation-independent parameters +
    The parameters are organized in sections. +
    The first section only contains the random seed. +

    ###### General ###### +
    # --help=0 # -h : Prints +this message +
    Whether or not help was requested is handled +through a boolean parameter +
    # --seed=988700289 # -S +: Random number seed +
    The seed for the Random +Number Generator +

    ###### Output ###### +
    This section contains parameters related to output +(to screen, to files, graphical, ...). +
    # --useEval=1 # Use nb of +eval. as counter (vs nb of gen.) +
    Boolean parameter, whether or not you want the +nb of evluations to be displayed and used as counter in plots +
    # --printBestStat=1 # Print +Best/avg/stdev every gen. +
    Boolean parameter, toggles screen output of indicated +statistics +
    # --plotBestStat=0 # Plot +Best/avg Stat +
    Boolean parameter, toggles gnuplot output of +best and average plots (Linux only at the moment) +
    # --BestFileName=best.xg +# Name of file for Best/avg/stdev +
    String parameter, if present, the statistics +are stored in that file (no default) +
    # --printPop=0 # Print sorted +pop. every gen. +
    Boolean parameter, adds a dump of the whole population +to the screen every generation +
    # --printFDC=1 # Print FDC +coeff. every gen. +
    Boolean parameter, adds Fitness Distance Correlation +to output every generation +
    # --plotFDCStat=0 # Plot +FDC scatter plot +
    Boolean parameter, toggles the Fitness Distance +Correlation plot (Fitness vs distance to best) +
    # --plotHisto=0 # Plot histogram +of fitnesses +
    Boolean parameter: if on, gnuplot is used to +plot the sorted population (fitness vs rank). Gives a graphical idea of +the diversity. +

    ###### Persistence ###### +
    This section contains parameters handling job +restart +
    # --Load= # -L : A save +file to restart from +
    String parameter: if present, the initial population +(and the RNG status) is read from indicated file. That file must +come from a previous save (or must be in same format!), i.e. must contain +a popualtion, the RNG and all parameters. If no other parameter is modified, +using a previously saved population and RNG will give exactly the same +results than having run that previous run longer. And a way to be sure +to re-use the same parameters is to ... use that very save file as parameter +file, as it contains all actual parameters in the right format. +
    Note that if not enough individuals are read, +the remaining are randomly initialized. No default value. +
    # --recomputeFitness=0 # +-r : Recompute the fitness after re-loading the pop.? +
    Boolean parameter: in case some individuals are +read from a file, their fitness is read too. If this one is true, it is +nevertheless recomputed. +
    # --saveFrequency=0 # Save +every F generation (0 = only final state, absent = never) +
    Integer parameter: interval between two dump +to disk of the whole population (+RNG + parameters) to disk, in a file +named genNN.sav, where NN is the generation number. If this prameter +is present (even with 0 or negative value), the final population will always +be saved, whatever the reason for stopping. Hence the only way to avoid +all saves is to omit the parameter (there is no default value). +
    # --saveTimeInterval=0 # +Save every T seconds (0 or absent = never) +
    Integer parameter: time interval between two +population (+RNG + parameters) dumps to disks. Files are names timeNN.sav. +See pervious parameter description for ore details. No default value. +
    # --status=t-eoGA.status +# Status file +
    String parameter: name of the status file (that +contains all parameters in the input format). There is no way to avoid +creating that file except recompiling ... or giving the name /dev/null +(Unix). +

    ###### Stopping criterion +###### +
    This section allows to decide when the algorithm +will stop. +
    # --maxGen=100 # -G : Maximum +number of generations (0 = none) +
    Integer parameter: maximum number of generations. +Default is 0 which is equivalent to infinity. +
    # --steadyGen=100 # -s : +Number of generations with no improvement +
    Integer parameter: stops whenever that number +of generations is passed without any improvement of the best fitness in +the population, provided the following minimum number of generations has +been done. No default value. +
    # --minGen=0 # -g : Minimum +number of generations +
    Integer parameter: the above steadyGen parameter +starts its job only after that minimum nuber of generations is passed. +No default value. +
    # --maxEval=0 # -E : Maximum +number of evaluations (0 = none) +
    Integer parameter: maximum number of generations. +No default value. +
    # --targetFitness=0 # -T +: Stop when fitness reaches +
    Real-valued parameter: the algorithm stops whenever +the best fitness reaches that target. No default value. +
    # --CtrlC=0 # -C : Terminate +current generation upon Ctrl C +
    Boolean parameter: if true, Ctrl C only stops +after the current generation as completed (eventually dumping population +to a file if some saver is active). +

    ###### engine ###### +
    In this section, one chooses all components of +the Evolution Engine (selection, replacemenet and the like). +
    # --selection=DetTour(2) +# -S : Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered) +
    String parameter: Name of selection procedure. +Availabable are the roulette wheel +(name Roulette, +fitness scaling coming soon), deterministic +tournament (name DetTour +with size - integer > 2 - in parentheses right after the name, use double +quotes on the command line),  stochastic tournament (name StochTour +with probability - float in [0.5, 1] - in parentheses), sequential (name +Sequential, +all individuals in turn), either from best to worst (option ordered +in parentheses), or in random ordered (option unordered) +or finally repeated independent uniform choices  (name Random). +
    # --offspringRate=100% # +-O : Nb of offspring (percentage or absolute) +

    # --replacement=Comma # -R +: Replacement: Comma, Plus or EPTour(T) +
    String parameter: Name of replacement procedure. +Availabable are +
    # --weakElitism=0 # -w : +Old best parent replaces new worst offspring *if necessary* +
      +

    +


    +
    Programmer's +guide +
    Lesson +3 - +Lesson 5 - +Main +page - +Algorithm-Based - Component-Based +- Hints - EO +documentation +
    +
    +
    +Marc +Schoenauer
    + +
    Last +modified: None of your business! + + diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 9ae7e34a8..d69a71b77 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -47,24 +47,33 @@ populations, restart stopped runs, ...).
  • -


    Current version (Jan. 5, 2001) stops here, but ... +

  • +Lesson 4 - The same algorithms - again! - but now fully operational: +every component of the algorithm can be defined +on the command-line, except the type of genotype; +moreover, you now have a full library, i.e. everything except your fitness function is +already compiled. +
  • + +


    Current version (May. 5, 2001) stops here, but ...

    From there on, you don't need to follow the lesson order any more: you can go directly to any lesson and experiment. Of course, you will need to bring together the different pieces to write exactly what you want - but only because we had no idea of what you exactly want :-)
      +

  • -Lesson 4 - More about checkpointing: +Lesson 4 - More general operators: +e.g. binary, n-ary, or even specific mate selection (your brain and my +beauty)! Add your own to the basic algorithm using the template files.
  • + +
  • +Lesson 5 - More about checkpointing: write your first adaptive mechanism, and find out how easy it is to update and monitor dynamic parameters
  • -
  • -Lesson 5 - More general operators: -e.g. binary, n-ary, or even specific mate selection (your brain and my -beauty)!
  • -
  • Lesson 6 - Why not go parallel? From the simple asynchronous SSGA to the more sophisticated island model (no From 6493ef88896534ea626bba4a02c6de13a35f3fdc Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:50:01 +0000 Subject: [PATCH 0577/2134] Added the new eoEsXXXover.h in Malefile.am --- eo/src/es/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 8d94aae2d..edd59ace8 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -16,4 +16,4 @@ libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ CPPFLAGS = -Wall CXXFLAGS = -g libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h +libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsLocalXover.h From bb19ed633bf287990d28eb57723c1266fd599d92 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:53:14 +0000 Subject: [PATCH 0578/2134] Forgotten new file --- eo/src/es/make_genotype_es.cpp | 81 ++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 eo/src/es/make_genotype_es.cpp diff --git a/eo/src/es/make_genotype_es.cpp b/eo/src/es/make_genotype_es.cpp new file mode 100644 index 000000000..354a1ce9b --- /dev/null +++ b/eo/src/es/make_genotype_es.cpp @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of eoReal Init fns + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/make_real.h + * while the TEMPLATIZED code is define in make_genotype_real.h + * + * It is instanciated in src/es/make_genotype_real.cpp - + * and incorporated in the ga/libga.a + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ + +// the templatized code (same for real and es here) +#include + +/// The following function merely call the templatized do_* functions + +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} +eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + From 29b25024b78eee43c229e9c41da95151f0e8de63 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:54:17 +0000 Subject: [PATCH 0579/2134] Forgotten file ... --- eo/src/es/make_op_es.cpp | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 eo/src/es/make_op_es.cpp diff --git a/eo/src/es/make_op_es.cpp b/eo/src/es/make_op_es.cpp new file mode 100644 index 000000000..4d4fd948f --- /dev/null +++ b/eo/src/es/make_op_es.cpp @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns + * of the library for ***eoReal*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in es.h in src/es dir + * while the TEMPLATIZED code is define in make_op.h in the es dir + * + */ + +// Templatized code +#include + +/// The following function merely call the templatized do_* functions above + +// operators +//////////// +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + From 6af035d2fad40121a4f830584d580860db923aca Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:57:35 +0000 Subject: [PATCH 0580/2134] Adding files in es for ES Crossovers --- eo/src/es.h | 3 ++ eo/src/es/Makefile.am | 2 +- eo/src/es/eoRealAtomXover.h | 94 +++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 eo/src/es/eoRealAtomXover.h diff --git a/eo/src/es.h b/eo/src/es.h index 491f67490..e4b25a09b 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -47,6 +47,9 @@ // general operators #include #include +#include // for generic operators +#include // Global ES Xover +#include // Local ES Xover // the ES-mutations #include diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index edd59ace8..8342b8a9f 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -16,4 +16,4 @@ libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ CPPFLAGS = -Wall CXXFLAGS = -g libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsLocalXover.h +libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsLocalXover.h eoRealAtomXover.h diff --git a/eo/src/es/eoRealAtomXover.h b/eo/src/es/eoRealAtomXover.h new file mode 100644 index 000000000..82448d98b --- /dev/null +++ b/eo/src/es/eoRealAtomXover.h @@ -0,0 +1,94 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealAtomXover.h : helper classes for vector crossover +// (c) Marc Schoenauer 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + +/** Some basic atomic crossovers for doubles + * + * Are used in all ES specifici crossovers + * and will be in more general stuff, using the generic crossovers + */ + +#ifndef _eoRealAtomXover_H +#define _eoRealAtomXover_H + +#include + +#include + +/** + Discrete crossover == exchange of values +*/ +class eoRealAtomExchange: public eoBinOp +{ +public: + /** + * (Default) Constructor. + */ + eoRealAtomExchange() {} + + /// The class name. Used to display statistics + virtual string className() const { return "eoRealAtomExchange"; } + + /** + Exchanges or not the values + */ + bool operator()(double& r1, const double& r2) + { + if (eo::rng.flip()) + if (r1 != r2) // if r1 == r2 you must return false + { + r1 = r2; + return true; + } + return false; + } + +}; + +/** + Intermediate crossover == linear combination +*/ +class eoRealIntermediate: public eoBinOp +{ +public: + /** + * (Default) Constructor. + */ + eoRealIntermediate() {} + + /// The class name. Used to display statistics + virtual string className() const { return "eoRealIntermediate"; } + + /** + Linear combination of both parents + */ + bool operator()(double& r1, const double& r2) + { + double alpha = eo::rng.uniform(); + r1 = alpha * r2 + (1-alpha) * r1; + return true; + } + +}; + +#endif From 6085c82229586033b8b8916c69e81e9666f1c119 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 11:09:57 +0000 Subject: [PATCH 0581/2134] Adding test file for ES - note that it's completely different from old eoESFull.cp - and hence has an other name, t-eoESAll.cpp. Old eoESFull.cp is still there (and working) but is not in the test targets --- eo/test/t-eoESAll.cpp | 145 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 eo/test/t-eoESAll.cpp diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp new file mode 100644 index 000000000..f673eaf78 --- /dev/null +++ b/eo/test/t-eoESAll.cpp @@ -0,0 +1,145 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include +#include + +using namespace std; + +#include + +// representation specific +#include + +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoMinimizingFitness FitT; + +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state); + +int main_function(int argc, char *argv[]) +{ + // Create the command-line parser + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + + eoValueParam& simpleParam = parser.createParam(true, "Isotropic", "Isotropic self-adaptive mutation", 'i', "ES mutation"); + eoValueParam& stdevsParam = parser.createParam(false, "Stdev", "One self-adaptive stDev per variable", 's', "ES mutation"); + eoValueParam& corrParam = parser.createParam(false, "Correl", "Use correlated mutations", 'c', "ES mutation"); + + // Run the appropriate algorithm + if (simpleParam.value() == false) + { + cout << "Using eoReal" << endl; + runAlgorithm(eoReal(), parser, state); + } + else if (stdevsParam.value() == false) + { + cout << "Using eoEsSimple" << endl; + runAlgorithm(eoEsSimple(), parser, state); + } + else if (corrParam.value() == false) + { + cout << "Using eoEsStdev" << endl; + runAlgorithm(eoEsStdev(), parser, state); + } + else + { + cout << "Using eoEsFull" << endl; + runAlgorithm(eoEsFull(), parser, state); + } + + return 0; +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} + +/** The templatized main (sort of) + * quite similar to the main of other genotypes + * (e.g. t-eoReal and t-eoGA in test dir) + */ +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state) +{ + typedef typename EOT::Fitness FitT; + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(_parser, _state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(_parser, _state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(_parser, _state, init); + apply(eval, pop); + + // stopping criteria + eoContinue & term = make_continue(_parser, _state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(_parser, _state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(_parser, _state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(_parser); + + //// GO + /////// + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; +} From b03e4f51068854c8359406417e5b4434b7eca88d Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 11:12:55 +0000 Subject: [PATCH 0582/2134] Date change + info about Lesson4 in main tutorial page --- eo/tutorial/html/eoTutorial.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 21db2ee4f..3a3a0beed 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,7 +17,9 @@ and to

    EO Tutorial

    -
    Version 0.95 - Apr. 27 2001
    +
    Version 0.95 - May. 2 2001
    +New: Lesson4 - with user guide of fully operational program +

    Welcome to EO tutorial/on-line documentation.

    Please note that this tutorial is not supposed From b52ea27e2fd42ce93f813f0710ef4d349e8037c8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 11:13:40 +0000 Subject: [PATCH 0583/2134] Updated main pages of doc and tutorial. Doc now points to tutorial --- eo/doc/index.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/doc/index.h b/eo/doc/index.h index a138ee18e..d2b6480f8 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -5,11 +5,14 @@ This index page is under construction. Who wants to fill it in? + \section tutorial Tutorial + +However, you can already find some useful information in the tutorial + \section install Installation Installing the package. \section design Overall Design - */ From 4cce84280e28d0e7e2f11cd6a5a110de612f1667 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 3 May 2001 05:43:40 +0000 Subject: [PATCH 0584/2134] Hange of comments and names --- eo/src/do/make_algo_scalar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 34949dbc6..9e726354c 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -114,13 +114,13 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e _state.storeFunctor(select); // the number of offspring - eoValueParam& offspringRateParam = _parser.createParam(eoRateParamType("100%"), "offspringRate", "Nb of offspring (percentage or absolute)", 'O', "engine"); + eoValueParam& offspringRateParam = _parser.createParam(eoRateParamType("100%"), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "engine"); // an eoRateParamType is simply a pair double offRate=offspringRateParam.value().first; bool offInterpret_as_rate = offspringRateParam.value().second; // the replacement - eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T)", 'R', "engine"); + eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)", 'R', "engine"); eoParamParamType & ppReplace = replacementParam.value(); // pair > @@ -140,7 +140,7 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e is >> size; replace = new eoEPReplacement(size); } - else if (ppReplace.first == string("SSGAWorse")) + else if (ppReplace.first == string("SSGAWorst")) { replace = new eoSSGAWorseReplacement; } From 7294d6acd561040fb6d165e68669c2a9ab4f5c03 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 3 May 2001 05:44:29 +0000 Subject: [PATCH 0585/2134] Lesson4 advancing --- eo/tutorial/html/eoCheckPoint.html | 26 ++- eo/tutorial/html/eoLesson4.html | 319 ++++++++++++++++++----------- eo/tutorial/html/eoTutorial.html | 6 +- 3 files changed, 224 insertions(+), 127 deletions(-) diff --git a/eo/tutorial/html/eoCheckPoint.html b/eo/tutorial/html/eoCheckPoint.html index 9ac0ec7fb..49dd8d991 100644 --- a/eo/tutorial/html/eoCheckPoint.html +++ b/eo/tutorial/html/eoCheckPoint.html @@ -2,7 +2,7 @@ - + Variation Operators @@ -23,7 +23,12 @@ continuators - Checkpoints - CheckPointing What is Checkpointing about? -
    Evolutionary Algorithms are ticked +
    Evolutionary Algorithms are almost all timely ticked, the basic time +unit being what is called a generation. EO checkpointing mechanism allow +you to program things that you want to be done at the end of every generation. +This includes deciding to stop, outputing some statistics on the current +state of the algorithm,  updating some dynamical variables of your +algorithm, saving the population to disk, ...

    EO classes described in this page:

    • @@ -34,7 +39,8 @@ eoStat, eoSortedStat, eoMonitor, eoUpdater
    • Derived classes: eoCombinedContinue,
    • -Related classes: eoGnuPlot
    • +Related classes: eoGnuPlot1DMonitor, +eoGnuPlot1DSnapshotMonitor,

      @@ -48,7 +54,8 @@ means that the algorithm stops only when the continuator returns Interface:  The abstract class for computing stopping conditions is eoContinue, and the interface for its operator() is -

                                +

                               + bool operator()(const eoPop<EOT>& )

    which you could have guessed from the inheritance @@ -79,15 +86,16 @@ passed at construct time. Don't forget to returnfalseis met!

  • Existing continuators: -Of course you can find out all existing (non-virtual!) subclasses -of eoContinue by looking at its  inheritance +Of +course you can find out all existing (non-virtual!) subclasses of eoContinue +by looking at its  inheritance diagram. But you might find it more convenient to have them listed here:
    - +



    Combining continuators: @@ -101,8 +109,8 @@ boolean result as an eoContinue.

    Writing a checkpoint:
    This is something you should never have to do. However, should you -fell you have to do it, please do - and send us both the reasons that lead -you to that (wqhat is it you couldn't do with existing eoCheckPoint), and +feel you have to do it, please do - and send us both the reasons that lead +you to that (what is it you couldn't do with existing eoCheckPoint), and the resulting code, of course.


    Statistics: diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index 627cb24cb..b56f18cbe 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 3 @@ -24,32 +24,40 @@ this time you will have full control of all components< from the command-line or a parameter file. You can even use the algorithm decribed here without any other knowledge of EO, just by writing your fitness function as a plain C++ function. This -is why this lesson starts with a user's guide, +is why this lesson starts with a user's guide, most of it being representation-independent, with some parts that are specific of respectively the binary and the real algorithms.
    However, the ultimate purpose of this tutorial is to be able to do your own experiments - and these these will likely fall outside the scope -of these two programs. This is why you should also read the programmer's -guides, as the structure and memory managements are here radically different -that in the 3 previous lessons - though relying of course on the same objects. +of these two programs. This is why you should also read the programmer's +guides, as the structure and memory managements are here radically +different that in the 3 previous lessons - though relying of course on +the same objects.
     



    User's -guide -
    As already said, the behavior of the algorithms +guide
    +

    As already said, the behavior of the algorithms will be exactly the same as the previous one as far as optimization is concerned. Only now you will be able to tune every component of the algorithms -- except the type of genotype - using run-time parameters. +(except the type of genotype) using run-time parameters.
    Also, as in previous lessons, most of the code is representation-independent, i.e. is the same for both the binary genotypes and the real-valued genotypes. This small user's guide reflects that, but you can go directly to the binary or the real -parts if you wish. Parameters input The way to input parameters has already -be described in Lesson 3. To get -a list of parameters, type the command with option --help (or -h): with -both testBit and testReal this will result in +parts if you wish.
    +

    Warning: this +is a user guide, not a programming guide. In particular, the keywords +of the parameters are not +the names of +the underlying classes (though they should be similar in most cases). +

    User's guide: +Parameter input The way to input parameters +has already be described in Lesson +3. To get a list of parameters, type the command with option --help +(or -h): with both testBit and testReal this will result in

    • Printing the list of keywords on the standard output
    • @@ -59,70 +67,97 @@ both testBit and testReal this will result in
      or testReal.status that contains the list of all recognized parameters and has the format of an input parameter file.
    -User's guide: -The status file +User's guide:The +status file
    This file will always contain the list of the parameters that have been actually used by the last run of the program, however thay have been entered (try testBit -G1 and take a look a the status file). The parameters that are commented out (a # character comments -out the rest of the line) in the file were not specified by the user. -

    User's guide: -Representation-independent parameters -
    The parameters are organized in sections. -
    The first section only contains the random seed. -

    ###### General ###### +out the rest of the line) in the file are those that were not specified +by the user. +

    User's guide:Representation-independent +parameters +
    The parameters are organized in sections. In +what follows, the fixed font colored text is directly taken from the status +file and is commented between the lines. +
    +


    +
    Section ###### +General ######
    # --help=0 # -h : Prints this message -
    Whether or not help was requested is handled -through a boolean parameter -
    # --seed=988700289 # -S -: Random number seed -
    The seed for the Random -Number Generator -

    ###### Output ###### +
    Boolean parameter of +absolutely no interest: tells whether or not help was requested. +

    # --seed=988700289 # -S : +Random number seed +
    Unsigned long parameter: +the seed for the Random Number Generator +If the parameter is absent, then time(0) is used, which indicates the number +of seconds since Jan. 1 1980, is used ... and stored in the status file, +of course, so you can repeat the same run by simply assigning that value +again. There is no default value ("true" random +seed). +
    +


    +
    Section ###### +Output ######
    This section contains parameters related to output -(to screen, to files, graphical, ...). -
    # --useEval=1 # Use nb of +(to screen, to files, graphical, ...). +

    # --useEval=1 # Use nb of eval. as counter (vs nb of gen.) -
    Boolean parameter, whether or not you want the -nb of evluations to be displayed and used as counter in plots -
    # --printBestStat=1 # Print +
    Boolean parameter: +whether or not you want the nb of evluations to be displayed and used as +counter in statistics outputs and plots. Default +is true. +

    # --printBestStat=1 # Print Best/avg/stdev every gen. -
    Boolean parameter, toggles screen output of indicated -statistics -
    # --plotBestStat=0 # Plot +
    Boolean parameter: +toggles screen output of indicated statistics. Default +is true. +

    # --plotBestStat=0 # Plot Best/avg Stat -
    Boolean parameter, toggles gnuplot output of -best and average plots (Linux only at the moment) -
    # --BestFileName=best.xg +
    Boolean parameter: +toggles gnuplot output of best and average plots (Linux only at the moment). +Default is false. +

    # --BestFileName=best.xg # Name of file for Best/avg/stdev -
    String parameter, if present, the statistics -are stored in that file (no default) -
    # --printPop=0 # Print sorted +
    String parameter: +if present, the statistics are stored in that file (no +default) +

    # --printPop=0 # Print sorted pop. every gen. -
    Boolean parameter, adds a dump of the whole population -to the screen every generation -
    # --printFDC=1 # Print FDC +
    Boolean parameter: +adds a dump of the whole population to the screen every generation. Is +likely to generate huge +output! Default is false. +

    # --printFDC=1 # Print FDC coeff. every gen. -
    Boolean parameter, adds Fitness Distance Correlation -to output every generation -
    # --plotFDCStat=0 # Plot +
    Boolean parameter: +adds Fitness Distance Correlation to output every generation. Default +is false. +

    # --plotFDCStat=0 # Plot FDC scatter plot -
    Boolean parameter, toggles the Fitness Distance -Correlation plot (Fitness vs distance to best) -
    # --plotHisto=0 # Plot histogram +
    Boolean parameter: +toggles the Fitness Distance Correlation plot (Fitness vs distance to best). +Default is false. +

    # --plotHisto=0 # Plot histogram of fitnesses -
    Boolean parameter: if on, gnuplot is used to -plot the sorted population (fitness vs rank). Gives a graphical idea of -the diversity. -

    ###### Persistence ###### +
    Boolean parameter: +if on, gnuplot is used to plot the sorted population (fitness vs rank). +Gives a graphical idea of the diversity. Default +is false. +
    +


    +
    Section ###### +Persistence ######
    This section contains parameters handling job -restart -
    # --Load= # -L : A save -file to restart from -
    String parameter: if present, the initial population -(and the RNG status) is read from indicated file. That file must +dump and restart mechanism +

    # --Load= # -L : A save file +to restart from +
    String parameter: +if present, the initial population (and the RNG) is read from indicated +file. That file must come from a previous save (or must be in same format!), i.e. must contain a popualtion, the RNG and all parameters. If no other parameter is modified, using a previously saved population and RNG will give exactly the same @@ -130,89 +165,143 @@ results than having run that previous run longer. And a way to be sure to re-use the same parameters is to ... use that very save file as parameter file, as it contains all actual parameters in the right format.
    Note that if not enough individuals are read, -the remaining are randomly initialized. No default value. -
    # --recomputeFitness=0 # +the remaining are randomly initialized. No +default value. +

    # --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? -
    Boolean parameter: in case some individuals are -read from a file, their fitness is read too. If this one is true, it is -nevertheless recomputed. -
    # --saveFrequency=0 # Save +
    Boolean parameter: +in case some individuals are read from a file, their fitness is read too. +If this one is true, it is nevertheless recomputed. Default +is false i.e. use fitnes that's in the file. +

    # --saveFrequency=0 # Save every F generation (0 = only final state, absent = never) -
    Integer parameter: interval between two dump -to disk of the whole population (+RNG + parameters) to disk, in a file -named genNN.sav, where NN is the generation number. If this prameter -is present (even with 0 or negative value), the final population will always -be saved, whatever the reason for stopping. Hence the only way to avoid -all saves is to omit the parameter (there is no default value). -
    # --saveTimeInterval=0 # +
    Integer parameter: +interval between two dump to disk of the whole population (+RNG + parameters) +to disk, in a file named genNN.sav, where NN is the generation number. +If this prameter is present (even with 0 or negative value), the final +population will always be saved, whatever the reason for stopping. Hence +the only way to avoid all saves is to omit the parameter (there is no +default value). +

    # --saveTimeInterval=0 # Save every T seconds (0 or absent = never) -
    Integer parameter: time interval between two -population (+RNG + parameters) dumps to disks. Files are names timeNN.sav. -See pervious parameter description for ore details. No default value. -
    # --status=t-eoGA.status +
    Integer parameter: +time interval between two population (+RNG + parameters) dumps to disks. +Files are names timeNN.sav. See pervious parameter description for ore +details. No default value. +

    # --status=t-eoGA.status # Status file -
    String parameter: name of the status file (that -contains all parameters in the input format). There is no way to avoid -creating that file except recompiling ... or giving the name /dev/null -(Unix). -

    ###### Stopping criterion -###### +
    String parameter: +name of the status file (that contains all parameters in the input format). +There is no way to avoid creating that file except recompiling ... or giving +the name /dev/null (Unix). Default value is ProgramName.status +
    +


    +
    Section ###### +Stopping criterion ######
    This section allows to decide when the algorithm -will stop. -
    # --maxGen=100 # -G : Maximum +will stop. +

    # --maxGen=100 # -G : Maximum number of generations (0 = none)
    Integer parameter: maximum number of generations. -Default is 0 which is equivalent to infinity. -
    # --steadyGen=100 # -s : +A value of 0 disables that stopping criterion. Default +is 100. +

    # --steadyGen=100 # -s : Number of generations with no improvement -
    Integer parameter: stops whenever that number -of generations is passed without any improvement of the best fitness in -the population, provided the following minimum number of generations has -been done. No default value. -
    # --minGen=0 # -g : Minimum +
    Integer parameter: +stops whenever that number of generations is passed without any improvement +of the best fitness in the population, provided the following minimum number +of generations has been done. No default value. +

    # --minGen=0 # -g : Minimum number of generations
    Integer parameter: the above steadyGen parameter starts its job only after that minimum nuber of generations is passed. -No default value. -
    # --maxEval=0 # -E : Maximum +No default value. +

    # --maxEval=0 # -E : Maximum number of evaluations (0 = none)
    Integer parameter: maximum number of generations. -No default value. -
    # --targetFitness=0 # -T +No default value. +

    # --targetFitness=0 # -T : Stop when fitness reaches
    Real-valued parameter: the algorithm stops whenever -the best fitness reaches that target. No default value. -
    # --CtrlC=0 # -C : Terminate +the best fitness reaches that target. No default +value. +

    # --CtrlC=0 # -C : Terminate current generation upon Ctrl C
    Boolean parameter: if true, Ctrl C only stops after the current generation as completed (eventually dumping population -to a file if some saver is active). -

    ###### engine ###### +to a file if some saver is active). THis very useful feature is only available +in Unix at the moment. Default is false. +
    +


    +
    Section ###### +engine ######
    In this section, one chooses all components of -the Evolution Engine (selection, replacemenet and the like). -
    # --selection=DetTour(2) +the Evolution Engine (selection, replacemenet +and the like). +

    # --selection=DetTour(2) # -S : Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered) -
    String parameter: Name of selection procedure. -Availabable are the roulette wheel +
    String parameter: +Name of selection procedure. Availabable +are the roulette wheel (name Roulette, -fitness scaling coming soon), deterministic +fitness scaling coming soon); deterministic tournament (name DetTour with size - integer > 2 - in parentheses right after the name, use double -quotes on the command line),  stochastic tournament (name StochTour -with probability - float in [0.5, 1] - in parentheses), sequential (name +quotes on the command line);  stochastic +tournament (name StochTour +with probability - float in [0.5, 1] - in parentheses); sequential +(name Sequential, all individuals in turn), either from best to worst (option ordered -in parentheses), or in random ordered (option unordered) -or finally repeated independent uniform choices  (name Random). -
    # --offspringRate=100% # --O : Nb of offspring (percentage or absolute) +in parentheses), or in random ordered (option
    unordered); +and finally repeated independent uniform +choices  (name Random). +Default is DetTour(2). +

    # --nbOffspring=100% # -O +: Nb of offspring (percentage or absolute) +
    Integer or real-valued parameter: +this parameter indicates the amount of +offspring that will be generated from +the genitors every generation. However, this amount can be specified either +relative to the +population size, and it should then end with percent character (%), or +as an absolute +integer number (without the percent char). +
    Indeed, you can either want, say 7 times more +offspring than parents (a rather common situation in Evolution Strategies), +in which case you give value 700% to nbOffspring +parameter; or you might want a single offspring whatever the population +size, like in Steady-State evolution engines, in which case you simply +enter value 1. Default is 100%.

    # --replacement=Comma # -R -: Replacement: Comma, Plus or EPTour(T) -
    String parameter: Name of replacement procedure. -Availabable are -
    # --weakElitism=0 # -w : +: Replacement: Comma, Plus, EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t) +
    String parameter: +Name of replacement procedure. Availabable are the ES +plus and comma deterministic replacement +strategies (named respectively Plus +and  Comma); +EP stochastic tournament +(name EPTour +with tournament size in parentheses); and the steady-state +replacement procedures, at the moment +only based on fitnesses, replacement being either deterministic +(new born replace worst parent, name SSGAWorst),  +or based on a tournament  (name SSGADet +for deterministic tournament, size in parentheses, and SSGAStoch  +for stochastic tournament, probability in parentheses). Default +is Comma (which btw is also SGA generational +replacement whenever there are as many offspring +as parents). +

    # --weakElitism=0 # -w : Old best parent replaces new worst offspring *if necessary* -
      +
    Boolean parameter: +if true, weak elitism is added to the replacement procedure (i.e. if the +best fitness among the offspring is less than the best fitness, the best +parent replaces the worst offspring). Default +is false. +

    User's guide: +Bistring specific parameters +
     



    Programmer's diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 3a3a0beed..38e87a927 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,9 +17,9 @@ and to

    EO Tutorial

    -
    Version 0.95 - May. 2 2001
    -New: Lesson4 - with user guide of fully operational program -
    +
    Version 0.95 - May. 2 2001 +
    New: Lesson4 +- with user guide of fully operational program

    Welcome to EO tutorial/on-line documentation.

    Please note that this tutorial is not supposed From 1eee26598b7a43a62272a4cc92d263f5c4cdb5f6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 3 May 2001 13:06:34 +0000 Subject: [PATCH 0586/2134] Adding code to Lesson4 --- eo/tutorial/Lesson4/BitEA.cpp | 71 ++++++++++++++ eo/tutorial/Lesson4/ESEA.cpp | 145 +++++++++++++++++++++++++++++ eo/tutorial/Lesson4/Makefile | 19 ++++ eo/tutorial/Lesson4/RealEA.cpp | 72 ++++++++++++++ eo/tutorial/Lesson4/binary_value.h | 25 +++++ eo/tutorial/Lesson4/real_value.h | 19 ++++ 6 files changed, 351 insertions(+) create mode 100644 eo/tutorial/Lesson4/BitEA.cpp create mode 100644 eo/tutorial/Lesson4/ESEA.cpp create mode 100644 eo/tutorial/Lesson4/Makefile create mode 100644 eo/tutorial/Lesson4/RealEA.cpp create mode 100644 eo/tutorial/Lesson4/binary_value.h create mode 100644 eo/tutorial/Lesson4/real_value.h diff --git a/eo/tutorial/Lesson4/BitEA.cpp b/eo/tutorial/Lesson4/BitEA.cpp new file mode 100644 index 000000000..9fa1fd663 --- /dev/null +++ b/eo/tutorial/Lesson4/BitEA.cpp @@ -0,0 +1,71 @@ +#include + +#include +#include "binary_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoBit EOT; + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr mainEval( binary_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/eo/tutorial/Lesson4/ESEA.cpp b/eo/tutorial/Lesson4/ESEA.cpp new file mode 100644 index 000000000..f673eaf78 --- /dev/null +++ b/eo/tutorial/Lesson4/ESEA.cpp @@ -0,0 +1,145 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include +#include + +using namespace std; + +#include + +// representation specific +#include + +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoMinimizingFitness FitT; + +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state); + +int main_function(int argc, char *argv[]) +{ + // Create the command-line parser + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + + eoValueParam& simpleParam = parser.createParam(true, "Isotropic", "Isotropic self-adaptive mutation", 'i', "ES mutation"); + eoValueParam& stdevsParam = parser.createParam(false, "Stdev", "One self-adaptive stDev per variable", 's', "ES mutation"); + eoValueParam& corrParam = parser.createParam(false, "Correl", "Use correlated mutations", 'c', "ES mutation"); + + // Run the appropriate algorithm + if (simpleParam.value() == false) + { + cout << "Using eoReal" << endl; + runAlgorithm(eoReal(), parser, state); + } + else if (stdevsParam.value() == false) + { + cout << "Using eoEsSimple" << endl; + runAlgorithm(eoEsSimple(), parser, state); + } + else if (corrParam.value() == false) + { + cout << "Using eoEsStdev" << endl; + runAlgorithm(eoEsStdev(), parser, state); + } + else + { + cout << "Using eoEsFull" << endl; + runAlgorithm(eoEsFull(), parser, state); + } + + return 0; +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} + +/** The templatized main (sort of) + * quite similar to the main of other genotypes + * (e.g. t-eoReal and t-eoGA in test dir) + */ +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state) +{ + typedef typename EOT::Fitness FitT; + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(_parser, _state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(_parser, _state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(_parser, _state, init); + apply(eval, pop); + + // stopping criteria + eoContinue & term = make_continue(_parser, _state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(_parser, _state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(_parser, _state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(_parser); + + //// GO + /////// + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; +} diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile new file mode 100644 index 000000000..628c7222d --- /dev/null +++ b/eo/tutorial/Lesson4/Makefile @@ -0,0 +1,19 @@ +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp + + +ALL = BitEA RealEA + +lesson3 : $(ALL) + +all : $(ALL) + +BitEA : BitEA.o ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< ../../src/ga/libga.a ../../src/utils/libeoutils.a ../../src/libeo.a + +RealEA : RealEA.o ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a + +ESEA : ESEA.o ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson4/RealEA.cpp b/eo/tutorial/Lesson4/RealEA.cpp new file mode 100644 index 000000000..09e7ced51 --- /dev/null +++ b/eo/tutorial/Lesson4/RealEA.cpp @@ -0,0 +1,72 @@ +#include + +#include +#include "real_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoReal EOT; + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(parser, state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ea = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ea, pop); // run the ea + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/eo/tutorial/Lesson4/binary_value.h b/eo/tutorial/Lesson4/binary_value.h new file mode 100644 index 000000000..e36ad50c7 --- /dev/null +++ b/eo/tutorial/Lesson4/binary_value.h @@ -0,0 +1,25 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ + +template float binary_value(const Chrom& _chrom) +{ + float sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + if (_chrom[i]) + sum += pow(2, _chrom.size() - i - 1); + return sum; +} + +struct BinaryValue +{ + template void operator()(Chrom& _chrom) + { + _chrom.fitness(binary_value(_chrom)); + } +}; diff --git a/eo/tutorial/Lesson4/real_value.h b/eo/tutorial/Lesson4/real_value.h new file mode 100644 index 000000000..8f3a0df59 --- /dev/null +++ b/eo/tutorial/Lesson4/real_value.h @@ -0,0 +1,19 @@ +#include +//----------------------------------------------------------------------------- + + +/** Just a simple function that takes an eoEsBase and sets the fitnes + to sphere + @param _ind vector +*/ + +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + sum += _ind[i] * _ind[i]; + return sqrt(sum); +} + + + From f4d2630516f7bd973590a18ea9ce98c90e059bbd Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 3 May 2001 17:20:27 +0000 Subject: [PATCH 0587/2134] Corrected a problem in eoEsChromInit (it refused plain eoReal) + some other minor modications (e.g. a dir in make_checkpoint where ALL file will go). --- eo/src/do/make_algo_scalar.h | 18 +++++--- eo/src/do/make_checkpoint.h | 33 +++++++++------ eo/src/do/make_pop.h | 7 +++- eo/src/es/eoEsChromInit.h | 6 +-- eo/src/es/make_genotype_real.h | 6 +-- eo/src/ga/make_genotype_ga.h | 2 +- eo/src/utils/eoRNG.cpp | 15 ++++++- eo/src/utils/eoRNG.h | 2 + eo/tutorial/html/eoLesson4.html | 73 ++++++++++++++++++--------------- 9 files changed, 98 insertions(+), 64 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 9e726354c..8673a80e5 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -73,7 +73,7 @@ template eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _ccontinue, eoGenOp& _op) { // the selection - eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "engine"); + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); eoParamParamType & ppSelect = selectionParam.value(); // pair > @@ -109,18 +109,21 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e select = new eoProportionalSelect; } else - throw runtime_error("Invalid selection"); + { + string stmp = string("Invalid selection: ") + ppSelect.first; + throw runtime_error(stmp.c_str()); + } _state.storeFunctor(select); // the number of offspring - eoValueParam& offspringRateParam = _parser.createParam(eoRateParamType("100%"), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "engine"); + eoValueParam& offspringRateParam = _parser.createParam(eoRateParamType("100%"), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); // an eoRateParamType is simply a pair double offRate=offspringRateParam.value().first; bool offInterpret_as_rate = offspringRateParam.value().second; // the replacement - eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)", 'R', "engine"); + eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)", 'R', "Evolution Engine"); eoParamParamType & ppReplace = replacementParam.value(); // pair > @@ -159,12 +162,15 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e replace = new eoSSGAStochTournamentReplacement(p); } else - throw runtime_error("Invalid replacement"); + { + string stmp = string("Invalid replacement: ") + ppReplace.first; + throw runtime_error(stmp.c_str()); + } _state.storeFunctor(replace); // adding weak elitism - eoValueParam& weakElitismParam = _parser.createParam(false, "weakElitism", "Old best parent replaces new worst offspring *if necessary*", 'w', "engine"); + eoValueParam& weakElitismParam = _parser.createParam(false, "weakElitism", "Old best parent replaces new worst offspring *if necessary*", 'w', "Evolution Engine"); if (weakElitismParam.value()) { eoReplacement *replaceTmp = replace; diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 0efd02b37..a08447d29 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -77,12 +77,15 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat // Best fitness in population //--------------------------- eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); - eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output"); - eoValueParam& bestFileNameParam = _parser.createParam(string("best.xg"), "BestFileName", "Name of file for Best/avg/stdev", '\0', "Output"); - bool fileBestParam = _parser.isItThere(bestFileNameParam); + eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output - Graphical"); + + // dir for DISK output + eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); + eoBestFitnessStat *bestStat = NULL; - if ( printBestParam.value() || plotBestParam.value() || fileBestParam ) + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) // we need the bestStat for at least one of the 3 above { bestStat = new eoBestFitnessStat; @@ -134,7 +137,7 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat // the Fitness Distance Correlation //--------------------------------- eoValueParam& printFDCParam = _parser.createParam(true, "printFDC", "Print FDC coeff. every gen.", '\0', "Output"); - eoValueParam& plotFDCParam = _parser.createParam(false, "plotFDCStat", "Plot FDC scatter plot", '\0', "Output"); + eoValueParam& plotFDCParam = _parser.createParam(false, "plotFDCStat", "Plot FDC scatter plot", '\0', "Output - Graphical"); eoFDCStat *fdcStat = NULL; if ( printFDCParam.value() || plotFDCParam.value() ) // we need FDCStat @@ -180,9 +183,10 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat monitor->add(*popStat); } - if (fileBestParam) // A file monitor for best & secondMoment + if (fileBestParam.value()) // A file monitor for best & secondMoment { - eoFileMonitor *fileMonitor = new eoFileMonitor(bestFileNameParam.value()); + string stmp = dirNameParam.value() + "/best.xg"; + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); // save and give to checkpoint _state.storeFunctor(fileMonitor); checkpoint->add(*fileMonitor); @@ -195,7 +199,8 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average { - eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor("_gnu_best.xg",minimizing_fitness()); + string stmp = dirNameParam.value() + "_gnu_best.xg"; + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); // save and give to checkpoint _state.storeFunctor(gnuMonitor); checkpoint->add(*gnuMonitor); @@ -211,7 +216,7 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat if (plotFDCParam.value()) // a specific plot monitor for FDC { // first into a file (it adds everything ti itself - eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat); + eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat, dirNameParam.value()); _state.storeFunctor(fdcFileSnapshot); // then to a Gnuplot monitor eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); @@ -222,14 +227,14 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat checkpoint->add(*fdcGnuplot); } - eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output"); + eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); if (plotHistogramParam.value()) // want to see how the fitness is spread? { eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; _state.storeFunctor(fitStat); checkpoint->add(*fitStat); // a gnuplot-based monitor for snapshots: needs a dir name - eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot("Fitnesses"); + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); _state.storeFunctor(fitSnapshot); // add any stat that is a vector to it fitSnapshot->add(*fitStat); @@ -248,7 +253,8 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat if (_parser.isItThere(saveFrequencyParam)) { unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); - eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, "generation"); + string stmp = dirNameParam.value() + "/generations"; + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); _state.storeFunctor(stateSaver1); checkpoint->add(*stateSaver1); } @@ -257,7 +263,8 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) { - eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, "time"); + string stmp = dirNameParam.value() + "/time"; + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); checkpoint->add(*stateSaver2); } diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 0c2ecd75d..ed0d6fc6b 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -47,8 +47,11 @@ template eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _init) { - eoValueParam& seedParam = _parser.createParam(uint32(time(0)), "seed", "Random number seed", 'S'); - eoValueParam& popSize = _parser.createParam(unsigned(20), "popSize", "Population Size", 'P', "initialization"); + // random seed + eoValueParam& seedParam = _parser.createParam(uint32(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = random_seed(); + eoValueParam& popSize = _parser.createParam(unsigned(20), "popSize", "Population Size", 'P', "Evolution Engine"); // Either load or initialize // create an empty pop and let the state handle the memory diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 90720d3d3..399397405 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -74,10 +74,8 @@ public : private : // No adaptive mutation at all - void create_self_adapt(eoReal& result)// security check :-) - { - throw runtime_error("We should not be in create_self_adapt(eoReal)!"); - } + void create_self_adapt(eoReal& result)// nothing to do here ... + { } // Adaptive mutation through a unique sigma void create_self_adapt(eoEsSimple& result) diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index 823b509bc..490071059 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -64,10 +64,10 @@ eoEsChromInit & do_make_genotype(eoParameterLoader& _parser, eoState& _stat typedef typename EOT::Fitness FitT; // for eoReal, only thing needed is the size - eoValueParam& vecSize = _parser.createParam(unsigned(10), "vecSize", "The number of variables ", 'n',"initialization"); + eoValueParam& vecSize = _parser.createParam(unsigned(10), "vecSize", "The number of variables ", 'n',"Genotype Initialization"); // to build an eoReal Initializer, we need bounds - eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "initBounds", "Bounds for uniform initialization", 'B', "initialization"); + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "initBounds", "Bounds for uniform initialization", 'B', "Genotype Initialization"); eoParamParamType & ppBounds = boundsParam.value(); // pair > // transform into a vector @@ -90,7 +90,7 @@ eoEsChromInit & do_make_genotype(eoParameterLoader& _parser, eoState& _stat // now some initial value for sigmas - even if useless? // shoudl be used in Normal mutation - eoValueParam& sigmaParam = _parser.createParam(0.3, "sigmaInit", "Initial value for Sigma(s)", 's',"initialization"); + eoValueParam& sigmaParam = _parser.createParam(0.3, "sigmaInit", "Initial value for Sigma(s)", 's',"Genotype Initialization"); // minimum check if ( (sigmaParam.value() < 0) ) diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index 9a0fc6a81..93ea00c52 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -61,7 +61,7 @@ template eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) { // for bitstring, only thing needed is the size - eoValueParam& chromSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"initialization"); + eoValueParam& chromSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"Genotype Initialization"); // Then we can built a bitstring random initializer // based on boolean_generator class (see utils/rnd_generator.h) diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index b1e592baf..a7de0d17a 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -1,9 +1,22 @@ #include #include "eoRNG.h" +#include +/** this function retunrs a "truly random" seed for RNG + * Replaces the call to time(0) that seems to be non-portable??? + */ +uint32 random_seed() +{ + struct timeval tval; + struct timezone tzp; + + gettimeofday (&tval, &tzp); // milliseconds since midnight January 1, 1970. + return uint32(tval.tv_usec); +} + namespace eo { /// The Global random number generator. -eoRng rng((uint32) time(0)); +eoRng rng(random_seed()); } diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index d92549852..d8b9a6239 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -288,6 +288,8 @@ extern eoRng rng; using eo::rng; +/** the random_seed utility in eoRNG.cpp */ +extern uint32 random_seed(); // Implementation of some eoRng members.... Don't mind the mess, it does work. diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index b56f18cbe..61e796641 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 3 @@ -38,7 +38,7 @@ the same objects.



    User's -guide +guide

    As already said, the behavior of the algorithms will be exactly the same as the previous one as far as optimization is concerned. Only now you will be able to tune every component of the algorithms @@ -55,7 +55,7 @@ the names of the underlying classes (though they should be similar in most cases).

    User's guide: Parameter input The way to input parameters -has already be described in Lesson +has already be described in Lesson 3. To get a list of parameters, type the command with option --help (or -h): with both testBit and testReal this will result in

      @@ -88,7 +88,7 @@ General ######
      # --help=0 # -h : Prints this message
      Boolean parameter of -absolutely no interest: tells whether or not help was requested. +absolutely no interest: tells whether or not help was requested.

      # --seed=988700289 # -S : Random number seed
      Unsigned long parameter: @@ -103,44 +103,46 @@ seed).
      Section ###### Output ######
      This section contains parameters related to output -(to screen, to files, graphical, ...). +(to screen, to files, graphical, ...).

      # --useEval=1 # Use nb of eval. as counter (vs nb of gen.)
      Boolean parameter: whether or not you want the nb of evluations to be displayed and used as counter in statistics outputs and plots. Default -is true. +is true.

      # --printBestStat=1 # Print Best/avg/stdev every gen.
      Boolean parameter: toggles screen output of indicated statistics. Default -is true. +is true.

      # --plotBestStat=0 # Plot Best/avg Stat
      Boolean parameter: toggles gnuplot output of best and average plots (Linux only at the moment). -Default is false. +Default +is false.

      # --BestFileName=best.xg # Name of file for Best/avg/stdev
      String parameter: if present, the statistics are stored in that file (no -default) +default)

      # --printPop=0 # Print sorted pop. every gen.
      Boolean parameter: adds a dump of the whole population to the screen every generation. Is likely to generate huge -output! Default is false. +output! Default is false.

      # --printFDC=1 # Print FDC coeff. every gen.
      Boolean parameter: adds Fitness Distance Correlation to output every generation. Default -is false. +is false.

      # --plotFDCStat=0 # Plot FDC scatter plot
      Boolean parameter: toggles the Fitness Distance Correlation plot (Fitness vs distance to best). -Default is false. +Default +is false.

      # --plotHisto=0 # Plot histogram of fitnesses
      Boolean parameter: @@ -152,7 +154,7 @@ is false.
      Section ###### Persistence ######
      This section contains parameters handling job -dump and restart mechanism +dump and restart mechanism

      # --Load= # -L : A save file to restart from
      String parameter: @@ -166,13 +168,13 @@ to re-use the same parameters is to ... use that very save file as parameter file, as it contains all actual parameters in the right format.
      Note that if not enough individuals are read, the remaining are randomly initialized. No -default value. +default value.

      # --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.?
      Boolean parameter: in case some individuals are read from a file, their fitness is read too. If this one is true, it is nevertheless recomputed. Default -is false i.e. use fitnes that's in the file. +is false i.e. use fitnes that's in the file.

      # --saveFrequency=0 # Save every F generation (0 = only final state, absent = never)
      Integer parameter: @@ -181,13 +183,13 @@ to disk, in a file named genNN.sav, where NN is the generation number. If this prameter is present (even with 0 or negative value), the final population will always be saved, whatever the reason for stopping. Hence the only way to avoid all saves is to omit the parameter (there is no -default value). +default value).

      # --saveTimeInterval=0 # Save every T seconds (0 or absent = never)
      Integer parameter: time interval between two population (+RNG + parameters) dumps to disks. Files are names timeNN.sav. See pervious parameter description for ore -details. No default value. +details. No default value.

      # --status=t-eoGA.status # Status file
      String parameter: @@ -199,32 +201,34 @@ the name /dev/null (Unix). Default value is Program
      Section ###### Stopping criterion ######
      This section allows to decide when the algorithm -will stop. +will stop.

      # --maxGen=100 # -G : Maximum number of generations (0 = none)
      Integer parameter: maximum number of generations. A value of 0 disables that stopping criterion. Default -is 100. +is 100.

      # --steadyGen=100 # -s : Number of generations with no improvement
      Integer parameter: stops whenever that number of generations is passed without any improvement of the best fitness in the population, provided the following minimum number -of generations has been done. No default value. +of generations has been done. No default value.

      # --minGen=0 # -g : Minimum number of generations
      Integer parameter: the above steadyGen parameter starts its job only after that minimum nuber of generations is passed. -No default value. +No +default value.

      # --maxEval=0 # -E : Maximum number of evaluations (0 = none)
      Integer parameter: maximum number of generations. -No default value. +No +default value.

      # --targetFitness=0 # -T : Stop when fitness reaches
      Real-valued parameter: the algorithm stops whenever the best fitness reaches that target. No default -value. +value.

      # --CtrlC=0 # -C : Terminate current generation upon Ctrl C
      Boolean parameter: if true, Ctrl C only stops @@ -237,7 +241,7 @@ in Unix at the moment. Default is false. engine ######

      In this section, one chooses all components of the Evolution Engine (selection, replacemenet -and the like). +and the like).

      # --selection=DetTour(2) # -S : Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)
      String parameter: @@ -256,23 +260,23 @@ all individuals in turn), either from best to worst (option unordered); and finally repeated independent uniform choices  (name Random). -Default is DetTour(2). +Default is DetTour(2).

      # --nbOffspring=100% # -O : Nb of offspring (percentage or absolute)
      Integer or real-valued parameter: this parameter indicates the amount of offspring that will be generated from the genitors every generation. However, this amount can be specified either -relative to the -population size, and it should then end with percent character (%), or -as an absolute +relative +to the population size, and it should then end with percent character (%), +or as an absolute integer number (without the percent char).
      Indeed, you can either want, say 7 times more offspring than parents (a rather common situation in Evolution Strategies), in which case you give value 700% to nbOffspring parameter; or you might want a single offspring whatever the population size, like in Steady-State evolution engines, in which case you simply -enter value 1. Default is 100%. +enter value 1. Default is 100%.

      # --replacement=Comma # -R : Replacement: Comma, Plus, EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)
      String parameter: @@ -280,18 +284,19 @@ Name of replacement procedure. Availabable are the deterministic replacement strategies (named respectively Plus and  Comma); -EP stochastic tournament -(name EPTour +EP +stochastic tournament (name EPTour with tournament size in parentheses); and the steady-state -replacement procedures, at the moment -only based on fitnesses, replacement being either deterministic +replacement +procedures, at the moment only based on fitnesses, replacement being either +deterministic (new born replace worst parent, name SSGAWorst),  or based on a tournament  (name SSGADet for deterministic tournament, size in parentheses, and SSGAStoch  for stochastic tournament, probability in parentheses). Default is Comma (which btw is also SGA generational replacement whenever there are as many offspring -as parents). +as parents).

      # --weakElitism=0 # -w : Old best parent replaces new worst offspring *if necessary*
      Boolean parameter: From eb25bf0ab5dc35fbbe0270765d2b05b4d81531e1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 4 May 2001 16:13:37 +0000 Subject: [PATCH 0588/2134] Removing old trash! --- eo/tutorial/html/FirstRealGA_old.html | 278 -------------------------- 1 file changed, 278 deletions(-) delete mode 100644 eo/tutorial/html/FirstRealGA_old.html diff --git a/eo/tutorial/html/FirstRealGA_old.html b/eo/tutorial/html/FirstRealGA_old.html deleted file mode 100644 index a634f5299..000000000 --- a/eo/tutorial/html/FirstRealGA_old.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - First Real GA - - -Back to Lesson 1 - Tutorial -main page - Algorithm-Based - Component-Based -page - Programming hints - EO -documentation -
      -


      -
      -

      -A First Real GA

      -Click on the figure to see the corresponding code. Tutorial comments are -in variable length fonts, after the code. -
      -

      - -

      //----------------------------------------------------------------------------- -

      #include -<stdexcept > // runtime_error -

      //----------------------------------------------------------------------------- -
      // FirstRealGA.cpp -
      //----------------------------------------------------------------------------- -
      //* -
      // An instance of a -VERY simple Real-coded Genetic Algorithm -
      // -
      //----------------------------------------------------------------------------- -
      // standard includes -

      #include -<iostream>// cout -
      #include -<strstream>// ostrstream, istrstream -

      // the general include -for eo -

      #include -<eo> -

      // specific incluse, -as Real is not (yet) in the standard eo source dir -
      #include -"eoeal.h" -
      #include -"eoRealOp.h" -

      //----------------------------------------------------------------------------- -
      // define your individual: -

      typedef -eoReal<double> Indi; -

      You say here that you will be handling arrays -of doubles, whose fitness is a double -
      Note that this makes Indi derive from STL -class vector<double> -
      //----------------------------------------------------------------------------- -
      /** a simple fitness -function that computes the euclidian norm of a real vector -
          @param -_indi A real-valued individual -
      */ -

      double -real_value(const Indi & _indi) -
      { -
        -double sum = 0; -
        -for (unsigned i = 0; i < _indi.size(); i++) -
            -sum += _indi[i]*_indi[i]; -
        -return (-sum);   // maximizing -
      } -

      This simple function computes the sum of the squares of the variables -(remember Indi is here a vector of doubles) -
      //----------------------------------------------------------------------------- -

      void -main_function(int argc, char **argv) -
      { -
      const -unsigned int SEED = 42;// seed for random number generator -
      const -unsigned int VEC_SIZE = 8; // Number of object variables in genotypes -
      const -unsigned int POP_SIZE = 20; // Size of population -
      const -unsigned int T_SIZE = 3; // size for tournament selection -
      const -unsigned int MAX_GEN = 500; // Maximum number of generation before STOP -
      const -float CROSS_RATE = 0.8; // Crossover rate -
      const -double EPSILON = 0.01; // range for real uniform mutation -
      const -float MUT_RATE = 0.5; // mutation rate -
        -

      ////////////////////////// -
      // Random seed -
      ////////////////////////// -
      //reproducible random -seed: if you don't change SEED above, -
      // you'll aways get -the same result, NOT a random run -
      rng.reseed(SEED); -

      ///////////////////////////// -
      // Fitness function -
      //////////////////////////// -
      // Evaluation: from -a plain C++ fn to an EvalFunc Object -
      eoEvalFuncPtr<Indi> -eval( real_value ); -

      This encapsulate the C++ function real_value into a functor -object -

      //////////////////////////////// -
      // Initilisation of -population -
      //////////////////////////////// -

      // declare the population -
      eoPop<Indi> -pop; -

      Declares a population -object, which is basically an STL -vector<Indi> -

      // fill it! -
      for -(unsigned int igeno=0; igeno<POP_SIZE; igeno++) -
        -{ -
          -Indi v; // generate a random individual -
          -for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) -
            -{ -
              -double r = 2*rng.uniform() - 1; // new value, random in [-1,1) -
              -v.push_back(r); // -
            -} -
          -eval(v); // evaluate it -
          -pop.push_back(v); // and put it in the population -
        -} -

      This initialization of the population is straightforward -
      rng.uniform() generates a double uniformly -in [0,1), -
      v.push_back simply appends its argument -at the end of STL vector v -
      eval(v)evaluates individal v -the functor way, calling eval.operator()(v) -

      // sort pop before printing -it! -
      pop.sort(); -

      // Print (sorted) intial -population (raw printout) -
      cout -<< "Initial Population" << endl; -
      cout -<< pop; -

      If you looked at eoPop -inheritance diagram, you noticed that it derives from eoPrintable: -hence you can stream them using the << operator. Of course, Indis -are EO objects -, which also are eoPrintable, and the << operator for eoPop -uses the << operator for Indi. -

      ///////////////////////////////////// -
      // -selection and replacement -
      //////////////////////////////////// -
      // The well-known roulette -selection -
      // -The robust tournament selection -
      eoDetTournament<Indi> -select(T_SIZE); // SIZE in [2,POP_SIZE] -

      // -eoSGA uses generational replacement by default -
      // so no replacement -procedure has to be given -

      ////////////////////////////////////// -
      // termination condition -
      ///////////////////////////////////// -
      // stop after MAX_GEN -generations -
      eoGenContinue<Indi> -continuator(MAX_GEN); -

      This class is called eoGenContinue -because the main loop of all eoAlgo -says ... while continuator(pop) -

      ////////////////////////////////////// -
      // -The variation operators -
      ////////////////////////////////////// -

      // -offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] -
      eoUniformMutation<Indi>  -mutation(EPSILON); -
      // -offspring(i) is a linear combination of parent(i) -
      eoArithmeticCrossover<Indi> -xover; -

      The variation operators are respectively -an eoMonOp -(unary operator) and an eoQuadOp -(binary operator that modifies both its arguments). -

      ///////////////////////////////////////// -
      // the algorithm -
      //////////////////////////////////////// -
      // standard Generational -GA requires -
      // selection, evaluation, -crossover and mutation, stopping criterion -
        -

      eoSGA<Indi> -gga(select, xover, CROSS_RATE, mutation, MUT_RATE, -
      eval, -continuator); -

      // Apply algo to pop -- that's it! -
      gga(pop); -

      This simple algorithm of class eoSGA is a functor -object, and running the algorithm amounts to call the operator() -on the initial population! -

      // Print (sorted) intial -population (raw printout) -
      pop.sort(); -
      cout -<< "FINAL Population\n" << pop << endl; -

      that's it - just print the final population and you're done!!! -

      } -

      // -A main that catches the exceptions - do not modify! -
      int -main(int argc, char **argv) -
      { -
      #ifdef -_MSC_VER -
      // -rng.reseed(42); -
      int -flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); -
      flag -|= _CRTDBG_LEAK_CHECK_DF; -
      _CrtSetDbgFlag(flag); -
      // -_CrtSetBreakAlloc(100); -
      #endif -

      try -
      { -
      main_function(argc, -argv); -
      } -
      catch(exception& -e) -
      { -
      cout -<< "Exception: " << e.what() << '\n'; -
      } -

      return -1; -
      } -

      -


      Back to Lesson 1 - Tutorial -main page - Algorithm-Based - Component-Based -page - Programming hints - EO -documentation -
      -
      -Marc Schoenauer
      - -
      Last -modified: Wed Nov 6 17:22:43 CET 2000 - - From 5508869d00dfdba36bc8ec4fab7a6c255035eb59 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 4 May 2001 16:51:29 +0000 Subject: [PATCH 0589/2134] A full working version of ES is now available in tutorial/Lesson4, that makes full use of libes.a. The user guide is in Lesson4 of the tutorial - programmer's guide will come later. Plus many small changes here and there --- eo/src/do/make_checkpoint.h | 32 +- eo/src/do/make_pop.h | 3 +- eo/src/es/eoEsMutationInit.h | 4 +- eo/src/es/eoRealOp.h | 18 +- eo/src/es/make_op_es.h | 18 +- eo/src/es/make_op_real.h | 32 +- eo/src/utils/eoRNG.cpp | 15 +- eo/src/utils/eoRNG.h | 3 - eo/src/utils/make_help.cpp | 38 ++ eo/tutorial/Lesson1/FirstRealGA.cpp | 2 +- eo/tutorial/Lesson2/FirstRealEA.cpp | 12 +- eo/tutorial/Makefile | 5 +- eo/tutorial/html/FirstRealEA.html | 16 +- eo/tutorial/html/FirstRealGA.html | 2 +- eo/tutorial/html/Firstmerge.html | 2 +- eo/tutorial/html/eoLesson1.html | 4 +- eo/tutorial/html/eoLesson2.html | 6 +- eo/tutorial/html/eoLesson4.html | 696 ++++++++++++++++++++++------ eo/tutorial/html/eoTutorial.html | 6 +- 19 files changed, 689 insertions(+), 225 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index a08447d29..d9a607466 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -33,6 +33,9 @@ #include #include +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); /////////////////// The checkpoint and other I/O ////////////// @@ -58,6 +61,12 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat // and store it in the state _state.storeFunctor(increment); + // dir for DISK output + eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + // shoudl we empty it if exists + eoValueParam& eraseParam = _parser.createParam(false, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); + bool dirOK = false; // not tested yet + ///////////////////////////////////////// // now some statistics on the population: ///////////////////////////////////////// @@ -78,12 +87,8 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat //--------------------------- eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output - Graphical"); - - // dir for DISK output - eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); - eoBestFitnessStat *bestStat = NULL; if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) // we need the bestStat for at least one of the 3 above @@ -152,6 +157,9 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat checkpoint->add(*fdcStat); } + // do we wnat some histogram of fitnesses snpashots? + eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); + /////////////// // The monitors /////////////// @@ -183,6 +191,12 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat monitor->add(*popStat); } + // first handle the dir test - if we need at least one file + if ( ( fileBestParam.value() || plotBestParam.value() || + plotFDCParam.value() || plotHistogramParam.value() ) + && !dirOK ) // just in case we add something before + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + if (fileBestParam.value()) // A file monitor for best & secondMoment { string stmp = dirNameParam.value() + "/best.xg"; @@ -227,7 +241,7 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat checkpoint->add(*fdcGnuplot); } - eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); + // historgram? if (plotHistogramParam.value()) // want to see how the fitness is spread? { eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; @@ -252,6 +266,10 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat if (_parser.isItThere(saveFrequencyParam)) { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); string stmp = dirNameParam.value() + "/generations"; eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); @@ -263,6 +281,10 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + string stmp = dirNameParam.value() + "/time"; eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index ed0d6fc6b..d8ae0766f 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -27,6 +27,7 @@ #ifndef _make_pop_h #define _make_pop_h +#include // for time(0) for random seeding #include #include #include @@ -50,7 +51,7 @@ eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _ini // random seed eoValueParam& seedParam = _parser.createParam(uint32(0), "seed", "Random number seed", 'S'); if (seedParam.value() == 0) - seedParam.value() = random_seed(); + seedParam.value() = time(0); eoValueParam& popSize = _parser.createParam(unsigned(20), "popSize", "Population Size", 'P', "Evolution Engine"); // Either load or initialize diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index 9baa340f3..86f58c1e7 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -90,10 +90,10 @@ class eoEsMutationInit virtual std::string section(void) { return repSection; } - virtual std::string TauLclName(void) const { return "TauLcL"; } + virtual std::string TauLclName(void) const { return "TauLoc"; } virtual char TauLclShort(void) const { return 'l'; } - virtual std::string TauGlbName(void) const { return "TauGlb"; } + virtual std::string TauGlbName(void) const { return "TauGlob"; } virtual char TauGlbShort(void) const { return 'g'; } virtual std::string TauBetaName(void) const { return "Beta"; } diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 182710926..9e20201b8 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -329,13 +329,13 @@ protected: double range; // == 1+2*alpha }; -/** eoArithmeticCrossover --> uniform choice in hypercube +/** eoHypercubeCrossover --> uniform choice in hypercube == arithmetical with different values for each coordinate \class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric */ -template class eoArithmeticCrossover: public eoQuadOp +template class eoHypercubeCrossover: public eoQuadOp { public: /** @@ -347,7 +347,7 @@ template class eoArithmeticCrossover: public eoQuadOp * 0 == contractive application * Must be positive */ - eoArithmeticCrossover(const double& _alpha = 0.0): + eoHypercubeCrossover(const double& _alpha = 0.0): bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) @@ -362,7 +362,7 @@ template class eoArithmeticCrossover: public eoQuadOp * 0 == contractive application * Must be positive */ - eoArithmeticCrossover(eoRealVectorBounds & _bounds, + eoHypercubeCrossover(eoRealVectorBounds & _bounds, const double& _alpha = 0.0): bounds(_bounds), alpha(_alpha), range(1+2*_alpha) { @@ -371,10 +371,10 @@ template class eoArithmeticCrossover: public eoQuadOp } /// The class name. - virtual string className() const { return "eoArithmeticCrossover"; } + virtual string className() const { return "eoHypercubeCrossover"; } /** - * arithmetical crossover - modifies both parents + * hypercube crossover - modifies both parents * @param _eo1 The first parent * @param _eo2 The first parent */ @@ -434,21 +434,21 @@ protected: \ingroup parameteric */ -template class eoRealUxOver: public eoQuadOp +template class eoRealUXover: public eoQuadOp { public: /** * (Default) Constructor. * @param _preference bias in the choice (usually, no bias == 0.5) */ - eoRealUxOver(const float& _preference = 0.5): preference(_preference) + eoRealUXover(const float& _preference = 0.5): preference(_preference) { if ( (_preference <= 0.0) || (_preference >= 1.0) ) runtime_error("UxOver --> invalid preference"); } /// The class name. - virtual string className() const { return "eoRealUxOver"; } + virtual string className() const { return "eoRealUXover"; } /** * Uniform crossover for real vectors diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index 74f4e6ccf..fdda4cd35 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -130,10 +130,10 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni // crossover ///////////// // ES crossover - eoValueParam& crossTypeParam = _parser.createParam(string("Global"), "crossType", "Type of ES recombination (gloabl or local)", 'C', "Variation Operators"); + eoValueParam& crossTypeParam = _parser.createParam(string("global"), "crossType", "Type of ES recombination (global or standard)", 'C', "Variation Operators"); - eoValueParam& crossObjParam = _parser.createParam(string("Discrete"), "crossObj", "Recombination of object variables (Discrete or Intermediate)", 'O', "Variation Operators"); - eoValueParam& crossStdevParam = _parser.createParam(string("Intermediate"), "crossStdev", "Recombination of mutation strategy parameters (Intermediate or Discrete)", 'S', "Variation Operators"); + eoValueParam& crossObjParam = _parser.createParam(string("discrete"), "crossObj", "Recombination of object variables (discrete or intermediate)", 'O', "Variation Operators"); + eoValueParam& crossStdevParam = _parser.createParam(string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate or discrete)", 'S', "Variation Operators"); // The pointers: first the atom Xover eoBinOp *ptObjAtomCross = NULL; @@ -142,22 +142,22 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni eoGenOp *ptCross; // check for the atom Xovers - if (crossObjParam.value() == string("Discrete")) + if (crossObjParam.value() == string("discrete")) ptObjAtomCross = new eoRealAtomExchange; - else if (crossObjParam.value() == string("Intermediate")) + else if (crossObjParam.value() == string("intermediate")) ptObjAtomCross = new eoRealAtomExchange; else throw runtime_error("Invalid Object variable crossover type"); - if (crossStdevParam.value() == string("Discrete")) + if (crossStdevParam.value() == string("discrete")) ptStdevAtomCross = new eoRealAtomExchange; - else if (crossStdevParam.value() == string("Intermediate")) + else if (crossStdevParam.value() == string("intermediate")) ptStdevAtomCross = new eoRealAtomExchange; else throw runtime_error("Invalid mutation strategy parameter crossover type"); // and build the indi Xover - if (crossTypeParam.value() == string("Global")) + if (crossTypeParam.value() == string("global")) ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); - else if (crossTypeParam.value() == string("Local")) + else if (crossTypeParam.value() == string("standard")) ptCross = new eoEsLocalXover(*ptObjAtomCross, *ptStdevAtomCross); else throw runtime_error("Invalide Object variable crossover type"); diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 315c839ff..9de9c171b 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -131,19 +131,30 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni // the crossovers ///////////////// // the parameters + eoValueParam& alphaParam = _parser.createParam(double(0.0), "alpha", "Bound for factor of linear recombinations", 'a', "Variation Operators" ); + // minimum check + if ( (alphaParam.value() < 0) ) + throw runtime_error("Invalid BLX coefficient alpha"); + + eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Variation Operators" ); // minimum check if ( (segmentRateParam.value() < 0) ) throw runtime_error("Invalid segmentRate"); - eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Variation Operators" ); + eoValueParam& hypercubeRateParam = _parser.createParam(double(1.0), "hypercubeRate", "Relative rate for hypercube crossover", 'A', "Variation Operators" ); // minimum check - if ( (arithmeticRateParam.value() < 0) ) - throw runtime_error("Invalid arithmeticRate"); + if ( (hypercubeRateParam.value() < 0) ) + throw runtime_error("Invalid hypercubeRate"); + + eoValueParam& uxoverRateParam = _parser.createParam(double(1.0), "uxoverRate", "Relative rate for uniform crossover", 'A', "Variation Operators" ); + // minimum check + if ( (uxoverRateParam.value() < 0) ) + throw runtime_error("Invalid uxoverRate"); // minimum check bool bCross = true; - if (segmentRateParam.value()+arithmeticRateParam.value()==0) + if (segmentRateParam.value()+hypercubeRateParam.value()+uxoverRateParam.value()==0) { cerr << "Warning: no crossover" << endl; bCross = false; @@ -156,14 +167,19 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni if (bCross) { // segment crossover for bitstring - pass it the bounds - ptQuad = new eoSegmentCrossover(*ptBounds); + ptQuad = new eoSegmentCrossover(*ptBounds, alphaParam.value()); _state.storeFunctor(ptQuad); ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); - // arithmetic crossover - ptQuad = new eoArithmeticCrossover(*ptBounds); + // hypercube crossover + ptQuad = new eoHypercubeCrossover(*ptBounds, alphaParam.value()); _state.storeFunctor(ptQuad); - ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); + ptCombinedQuadOp->add(*ptQuad, hypercubeRateParam.value()); + + // uniform crossover + ptQuad = new eoRealUXover(); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, uxoverRateParam.value()); // don't forget to store the CombinedQuadOp _state.storeFunctor(ptCombinedQuadOp); diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index a7de0d17a..62f364b0d 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -1,22 +1,9 @@ #include #include "eoRNG.h" -#include -/** this function retunrs a "truly random" seed for RNG - * Replaces the call to time(0) that seems to be non-portable??? - */ -uint32 random_seed() -{ - struct timeval tval; - struct timezone tzp; - - gettimeofday (&tval, &tzp); // milliseconds since midnight January 1, 1970. - return uint32(tval.tv_usec); -} - namespace eo { /// The Global random number generator. -eoRng rng(random_seed()); +eoRng rng(time(0)); } diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index d8b9a6239..f9b3050c6 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -288,9 +288,6 @@ extern eoRng rng; using eo::rng; -/** the random_seed utility in eoRNG.cpp */ -extern uint32 random_seed(); - // Implementation of some eoRng members.... Don't mind the mess, it does work. diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index ecddbd179..493025d65 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -25,6 +25,7 @@ //----------------------------------------------------------------------------- #include #include +#include /** Generation of the status file, and output of the help message if needed * @@ -60,3 +61,40 @@ void make_help(eoParser & _parser) exit(1); } } + +/** test a dir. + * Creates it if does not exist + * If exists, throws an exception or erase everything there, + * depending on last parameter + * + * Always return true (for code easy writing on the other side :-) + */ +bool testDirRes(std::string _dirName, bool _erase) +{ + string s = "test -d " + _dirName; + int res = system(s.c_str()); + // test for (unlikely) errors + if ( (res==-1) || (res==127) ) + { + s = "Problem executing test of dir " + _dirName; + throw runtime_error(s); + } + // now make sure there is a dir without any file in it - or quit + if (res) // no dir present + { + s = string("mkdir ")+ _dirName; + system(s.c_str()); + return true; + } + // else + if (_erase) // OK to erase + { + s = string("/bin/rm ")+ _dirName + "/*"; + system(s.c_str()); + return true; + } + //else + s = "Dir " + _dirName + " is not empty"; + throw runtime_error(s); + return true; +} diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index 3a4f991a4..c753fbb4d 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -107,7 +107,7 @@ void main_function(int argc, char **argv) ////////////////////////////////////// // CROSSOVER // offspring(i) is a linear combination of parent(i) - eoArithmeticCrossover xover; + eoSegmentCrossover xover; // MUTATION // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] eoUniformMutation mutation(EPSILON); diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 8d64dd3df..7995896ba 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -48,10 +48,10 @@ void main_function(int argc, char **argv) const double EPSILON = 0.01; // range for real uniform mutation double SIGMA = 0.3; // std dev. for normal mutation // some parameters for chosing among different operators - const double segmentRate = 0.5; // relative weight for 1-pt Xover - const double arithmeticRate = 0.5; // relative weight for 2-pt Xover - const double uniformMutRate = 0.5; // relative weight for bit-flip mutation - const double detMutRate = 0.5; // relative weight for one-bit mutation + const double hypercubeRate = 0.5; // relative weight for hypercube Xover + const double segmentRate = 0.5; // relative weight for segment Xover + const double uniformMutRate = 0.5; // relative weight for uniform mutation + const double detMutRate = 0.5; // relative weight for det-uniform mutation const double normalMutRate = 0.5; // relative weight for normal mutation // GENERAL @@ -113,10 +113,10 @@ void main_function(int argc, char **argv) // uniform chooce on segment made by the parents eoSegmentCrossover xoverS; // uniform choice in hypercube built by the parents - eoArithmeticCrossover xoverA; + eoHypercubeCrossover xoverA; // Combine them with relative weights eoPropCombinedQuadOp xover(xoverS, segmentRate); - xover.add(xoverA, arithmeticRate, true); + xover.add(xoverA, hypercubeRate, true); // MUTATION // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index bd3418cb9..6c4153013 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = Lesson1 Lesson2 Lesson3 +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 all: for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done @@ -12,6 +12,9 @@ lesson2 : lesson3 : cd Lesson3; make +lesson4 : + cd Lesson4; make + #empty dist and distdir to let top-level 'make' do its job dist : diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index 49652e6b9..1ea2165ce 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -98,14 +98,14 @@ SIGMA = 0.3; 
             // std dev. for normal mutation
       // some parameters for chosing among different operators -
       const double segmentRate = 0.5;    -// relative weight for 1-pt Xover -
       const double arithmeticRate = 0.5; -// relative weight for 2-pt Xover +
       const double hypercubeRate = 0.5;    +// relative weight for hypercube Xover +
       const double segmentRate = 0.5; +// relative weight for segment Xover
       const double uniformMutRate = 0.5; -// relative weight for bit-flip mutation +// relative weight for uniform mutation
       const double detMutRate = 0.5;     -// relative weight for one-bit mutation +// relative weight for det-uniform mutation
       const double normalMutRate = 0.5;  // relative weight for normal mutation @@ -214,12 +214,12 @@ made by the parents
       eoSegmentCrossover<Indi> xoverS;
       // uniform choice in hypercube built by the parents -
       eoArithmeticCrossover<Indi> xoverA; +
       eoHypercubeCrossover<Indi> xoverA;
       // Combine them with relative weights
       eoPropCombinedQuadOp<Indi> xover(xoverS, segmentRate); -
       xover.add(xoverA, arithmeticRate, +
       xover.add(xoverA, hypercubeRate, true); diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html index f06c178a9..4f77b96a2 100644 --- a/eo/tutorial/html/FirstRealGA.html +++ b/eo/tutorial/html/FirstRealGA.html @@ -273,7 +273,7 @@ The actual code is in boldface and the comment in normal face.  // offspring(i) is a linear combination of parent(i)
      -  eoArithmeticCrossover<Indi> xover;
      +  eoSegmentCrossover<Indi> xover;
      diff --git a/eo/tutorial/html/Firstmerge.html b/eo/tutorial/html/Firstmerge.html index 61da23f44..2c45d6946 100644 --- a/eo/tutorial/html/Firstmerge.html +++ b/eo/tutorial/html/Firstmerge.html @@ -223,7 +223,7 @@ continuator(MAX_GEN);
      eoUniformMutation<Indi>  mutation(EPSILON); -
      eoArithmeticCrossover<Indi> +
      eoSegmentCrossover<Indi> xover; eoBitMutation<Indi>  diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 4e98cade5..9bc772770 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -259,8 +259,8 @@ bit, which is specific of the bit-flip mutation.  Hence, to run the same algorithm as Goldberg's SGA, the mutation probability (at individual level) is 1, and the probability of flipping each bit is P_MUT_PER_BIT.
    • -Real The crossover eoArithmeticCrossover -is the standard arithmetic crossover for real-valued +Real The crossover eoSegmentCrossover +is the standard segment crossover for real-valued vectors, that chooses a point randomly on the segment between both parents (also termed BLX-0). eoUniformMutation is the uniform mutation for real-valued vectors diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 746c8262b..9d8b75e63 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -172,8 +172,8 @@ on many problems.
      Two crossover operators are available: the eoSegmentCrossover chooses one point uniformly on the segment joining the parents, while the -eoArithmeticCrossover -performs a segment crossover on each coordinate independently, which amount +eoHypercubeCrossover +performs a linear combination on each coordinate independently, which amount to choosing the offspring uniformly in the hypercube whose diagonal is the segment joining the parents.
      As for mutation @@ -267,7 +267,7 @@ is something else to modify...

    • Use different initializers: for instance, on the real-valued sphere function minimization, try to initialize half of the population in [-2,-1] and the other half in [1,2], with and without -the segment and arithmetic crossovers (and for large values of VEC_SIZE, +the segment and hypercube crossovers (and for large values of VEC_SIZE, the size of the vectors). Amazing, isn't it! Explain that result.

      Exercise 3:  full selection/replacement diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index 61e796641..fd37d4bb6 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -76,13 +76,20 @@ however thay have been entered (try +
      On the status file, the parameters are organized +in sections. Note, however, that this format is not mandatory in the param +file, as only the keywords +are processed.

      User's guide:Representation-independent parameters -
      The parameters are organized in sections. In -what follows, the fixed font colored text is directly taken from the status -file and is commented between the lines. -
      -


      +
      In what follows, the fixed font colored text +is directly taken from the status file and is commented between the lines. +The presentation follows the status file format - only two sections are +representation-dependent (see the corresponding binary +or real sections). All other sections are presented +now: +

      +



      Section ###### General ######
      # --help=0 # -h : Prints @@ -98,151 +105,20 @@ of seconds since Jan. 1 1980, is used ... and stored in the status file, of course, so you can repeat the same run by simply assigning that value again. There is no default value ("true" random seed). -
      -
      -
      Section ###### -Output ###### -
      This section contains parameters related to output -(to screen, to files, graphical, ...). -

      # --useEval=1 # Use nb of -eval. as counter (vs nb of gen.) -
      Boolean parameter: -whether or not you want the nb of evluations to be displayed and used as -counter in statistics outputs and plots. Default -is true. -

      # --printBestStat=1 # Print -Best/avg/stdev every gen. -
      Boolean parameter: -toggles screen output of indicated statistics. Default -is true. -

      # --plotBestStat=0 # Plot -Best/avg Stat -
      Boolean parameter: -toggles gnuplot output of best and average plots (Linux only at the moment). -Default -is false. -

      # --BestFileName=best.xg -# Name of file for Best/avg/stdev -
      String parameter: -if present, the statistics are stored in that file (no -default) -

      # --printPop=0 # Print sorted -pop. every gen. -
      Boolean parameter: -adds a dump of the whole population to the screen every generation. Is -likely to generate huge -output! Default is false. -

      # --printFDC=1 # Print FDC -coeff. every gen. -
      Boolean parameter: -adds Fitness Distance Correlation to output every generation. Default -is false. -

      # --plotFDCStat=0 # Plot -FDC scatter plot -
      Boolean parameter: -toggles the Fitness Distance Correlation plot (Fitness vs distance to best). -Default -is false. -

      # --plotHisto=0 # Plot histogram -of fitnesses -
      Boolean parameter: -if on, gnuplot is used to plot the sorted population (fitness vs rank). -Gives a graphical idea of the diversity. Default -is false. -
      -


      -
      Section ###### -Persistence ###### -
      This section contains parameters handling job -dump and restart mechanism -

      # --Load= # -L : A save file -to restart from -
      String parameter: -if present, the initial population (and the RNG) is read from indicated -file. That file must -come from a previous save (or must be in same format!), i.e. must contain -a popualtion, the RNG and all parameters. If no other parameter is modified, -using a previously saved population and RNG will give exactly the same -results than having run that previous run longer. And a way to be sure -to re-use the same parameters is to ... use that very save file as parameter -file, as it contains all actual parameters in the right format. -
      Note that if not enough individuals are read, -the remaining are randomly initialized. No -default value. -

      # --recomputeFitness=0 # --r : Recompute the fitness after re-loading the pop.? -
      Boolean parameter: -in case some individuals are read from a file, their fitness is read too. -If this one is true, it is nevertheless recomputed. Default -is false i.e. use fitnes that's in the file. -

      # --saveFrequency=0 # Save -every F generation (0 = only final state, absent = never) -
      Integer parameter: -interval between two dump to disk of the whole population (+RNG + parameters) -to disk, in a file named genNN.sav, where NN is the generation number. -If this prameter is present (even with 0 or negative value), the final -population will always be saved, whatever the reason for stopping. Hence -the only way to avoid all saves is to omit the parameter (there is no -default value). -

      # --saveTimeInterval=0 # -Save every T seconds (0 or absent = never) -
      Integer parameter: -time interval between two population (+RNG + parameters) dumps to disks. -Files are names timeNN.sav. See pervious parameter description for ore -details. No default value. -

      # --status=t-eoGA.status -# Status file -
      String parameter: -name of the status file (that contains all parameters in the input format). -There is no way to avoid creating that file except recompiling ... or giving -the name /dev/null (Unix). Default value is ProgramName.status -
      -


      -
      Section ###### -Stopping criterion ###### -
      This section allows to decide when the algorithm -will stop. -

      # --maxGen=100 # -G : Maximum -number of generations (0 = none) -
      Integer parameter: maximum number of generations. -A value of 0 disables that stopping criterion. Default -is 100. -

      # --steadyGen=100 # -s : -Number of generations with no improvement -
      Integer parameter: -stops whenever that number of generations is passed without any improvement -of the best fitness in the population, provided the following minimum number -of generations has been done. No default value. -

      # --minGen=0 # -g : Minimum -number of generations -
      Integer parameter: the above steadyGen parameter -starts its job only after that minimum nuber of generations is passed. -No -default value. -

      # --maxEval=0 # -E : Maximum -number of evaluations (0 = none) -
      Integer parameter: maximum number of generations. -No -default value. -

      # --targetFitness=0 # -T -: Stop when fitness reaches -
      Real-valued parameter: the algorithm stops whenever -the best fitness reaches that target. No default -value. -

      # --CtrlC=0 # -C : Terminate -current generation upon Ctrl C -
      Boolean parameter: if true, Ctrl C only stops -after the current generation as completed (eventually dumping population -to a file if some saver is active). THis very useful feature is only available -in Unix at the moment. Default is false. -
      -


      -
      Section ###### +

      +


      +

      Section ###### engine ######
      In this section, one chooses all components of the Evolution Engine (selection, replacemenet and the like). -

      # --selection=DetTour(2) +

      # --popSize=20 # -P : Population +Size +
      Integer parameter: +the size of the population (constant along evolution). And yes, this is +a representation independent parameter, as the population is created either +from a file or using an eoInit object - and only that object is representation-dependent. +
      # --selection=DetTour(2) # -S : Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)
      String parameter: Name of selection procedure. Availabable @@ -304,10 +180,534 @@ if true, weak elitism is added to the replacement procedure (i.e. if the best fitness among the offspring is less than the best fitness, the best parent replaces the worst offspring). Default is false. -

      User's guide: -Bistring specific parameters +

      +


      +

      Section ###### +Output ###### +
      This first section on Output contains parameters +related to screen text output. +

      # --useEval=1 # Use nb of +eval. as counter (vs nb of gen.) +
      Boolean parameter: +whether or not you want the nb of evluations to be displayed and used as +counter in statistics outputs and plots. Default +is true. +

      # --printBestStat=1 # Print +Best/avg/stdev every gen. +
      Boolean parameter: +toggles screen output of indicated statistics. Default +is true. +

      # --printPop=0 # Print sorted +pop. every gen. +
      Boolean parameter: +adds a dump of the whole population to the screen every generation. Is +likely to generate huge +output! Default is false. +

      # --printFDC=1 # Print FDC +coeff. every gen. +
      Boolean parameter: +adds Fitness Distance Correlation to output every generation. Default +is false. +

      +


      +

      Section ###### +Output - Disk ###### +
      This second section on Output contains parameters +related to DISK output. +

      # --resDir=Res # Directory +to store DISK outputs +
      String parameter: All +DISK +output will be stored in a separate directory +-this is its name. If the directory does not exist, it is created. Note +that all graphical displays +will use that directory for their temporary files. Also all +job dump (see section Persistence +below) store their files there too. +

      # --eraseDir=0 # erase files +in dirName if any +
      Boolean parameter: +in order not to mix up files from different runs, it is mandatory to ensure +that the directory where all files will be stored is empty. However, if +this parameter is not set and the directory already exists, an exception +is thrown and the program stops. It it is set, all +files in the result directory are erased. +

      # --fileBestStat=0 # Output +Best/avg/stdev to a file +
      Boolean parameter: +if present, the best, average and standard deviation statistics are stored +in file resDir/best.xg. +Each line contains the generation number, eventualy the evaluation count +(depending on parameter useEval +then the statistics. Default is false.
       

      +


      +

      Section ###### +Output - Graphical ###### +
      This last section on Output contains parameters +related to graphical output (only available in Unix through gnuplot at +the moment). +

      # --plotBestStat=0 # Plot +Best/avg Stat +
      Boolean parameter: +toggles gnuplot output of best and average plots (Linux only at the moment). +Default +is false. +

      # --plotFDCStat=0 # Plot +FDC scatter plot +
      Boolean parameter: +toggles the Fitness Distance Correlation plot (Fitness vs distance to best). +Default +is false. +

      # --plotHisto=0 # Plot histogram +of fitnesses +
      Boolean parameter: +if on, gnuplot is used to plot the sorted population (fitness vs rank). +Gives a graphical idea of the diversity. Default +is false. +

      +


      +

      Section ###### +Persistence ###### +
      This section contains parameters handling job +dump and restart mechanism. +

      # --Load= # -L : A save file +to restart from +
      String parameter: +if present, the initial population (and the RNG) is read from indicated +file. That file must +come from a previous save (or must be in same format!), i.e. must contain +a popualtion, the RNG and all parameters. If no other parameter is modified, +using a previously saved population and RNG will give exactly the same +results than having run that previous run longer. And a way to be sure +to re-use the same parameters is to ... use that very save file as parameter +file, as it contains all actual parameters in the right format. +
      Note that if not enough individuals are read, +the remaining are randomly initialized. No +default value. +

      # --recomputeFitness=0 # +-r : Recompute the fitness after re-loading the pop.? +
      Boolean parameter: +in case some individuals are read from a file, their fitness is read too. +If this one is true, it is nevertheless recomputed. Default +is false i.e. use fitnes that's in the file. +

      # --saveFrequency=0 # Save +every F generation (0 = only final state, absent = never) +
      Integer parameter: +interval between two dump to disk of the whole population (+RNG + parameters), +in a file named genNN.sav in the dirRes +directory, where NN is the generation number. If this prameter is present +(even with 0 or negative value), the final population will always be saved, +whatever the reason for stopping. Hence the only way to avoid all saves +is to omit the parameter (there is no default +value). +

      # --saveTimeInterval=0 # +Save every T seconds (0 or absent = never) +
      Integer parameter: +time interval between two population (+RNG + parameters) dumps to disks. +Files are names timeNN.sav. See pervious parameter description for ore +details. No default value. +

      # --status=t-eoGA.status +# Status file +
      String parameter: +name of the status file (that contains all parameters in the input format). +There is no way to avoid creating that file except recompiling ... or giving +the name /dev/null (Unix). Default value is ProgramName.status +

      +


      +

      Section ###### +Stopping criterion ###### +
      This section allows to decide when the algorithm +will stop. +

      # --maxGen=100 # -G : Maximum +number of generations (0 = none) +
      Integer parameter: maximum number of generations. +A value of 0 disables that stopping criterion. Default +is 100. +

      # --steadyGen=100 # -s : +Number of generations with no improvement +
      Integer parameter: +stops whenever that number of generations is passed without any improvement +of the best fitness in the population, provided the following minimum number +of generations has been done. No default value. +

      # --minGen=0 # -g : Minimum +number of generations +
      Integer parameter: the above steadyGen parameter +starts its job only after that minimum nuber of generations is passed. +No +default value. +

      # --maxEval=0 # -E : Maximum +number of evaluations (0 = none) +
      Integer parameter: +maximum number of generations. +No default +value. +

      # --targetFitness=0 # -T +: Stop when fitness reaches +
      Real-valued parameter: +the algorithm stops whenever the best fitness reaches that target. No +default value. +

      # --CtrlC=0 # -C : Terminate +current generation upon Ctrl C +
      Boolean parameter: +if true, Ctrl C only stops after the current generation as completed (eventually +dumping population to a file if some saver is active). THis very useful +feature is only available in Unix at the moment. Default +is false. +
      +


      +

      User's guide: +Bistring specific parameters +
      The following describes the specific parameters that are available +in program BitEA to evolve genotypes that are bitstrings. +
      The two representation-dependent sections are concerned repectively +with genotype initilization and variation operators. +

      +


      +

      Section ######    +Genotype Initialization    ###### +
      This section should allow input if all necessary +parameters for genitype initialization +

      # --ChromSize=10 # -n : The +length of the bitstrings +
      Integer parameter: +The bitstring initilization only requires the length of the chromosome. +

      +


      +

      Section ######    +Variation Operators    ###### +
      This section allows to tune the way the variation +operators will be applied to the individuals (in the strict limit of SGA +model at the moment, see below). +

      # --operator=SGA # -o : Description +of the operator (SGA only now) +
      String parameter: +Describes the way the operators are applied. At the moment, only +SGA is available. SGA sequentially +applies a (quadratic) crossover operator with probability pCross +and a mutation operator with probability  pMut. +Both these operators can in turn be proportional +combinations of simple operators of the +same arity. +

      # --pCross=0.6 # -C : Probability +of Crossover +
      Floating-point parameter: +The probability that a given couple of selected genitors is applied the +crossover operator. In SGA operator model, each couple of selected genitors +is applied the crossover operator with that probability (and remains unchanged +with probability 1-pCross. +Whenever a couple undergoes crossover, a choice is made upon available +crossover operators proportionaly to their +relative rates (see below). Default +is 0.6. +

      # --pMut=0.1 # -M : Probability +of Mutation +
      Floating-point parameter: +The probability that a given individual (resulting from a crossover or +a non-crossover operation, see above) is applied the mutation operator. +Whenever an individual undergoes mutation, a choice is made upon available +mutation operators proportionaly to their +relative rates (see below). Default +is 0.1. +

      # --onePointRate=1 # -1 : +Relative rate for one point crossover +
      Floating-point parameter: +Rate of aplication of the 1-point crossover relatively +to 2-point and uniform below (see pCross +parameter). Default is 1. +

      # --twoPointRate=1 # -2 : +Relative rate for two point crossover +
      Floating-point parameter: +Rate of aplication of the 2-point crossover relatively +to 1-point above and uniform below (see pCross +parameter). Default is 1. +

      # --uRate=2 # -U : Relative +rate for uniform crossover +
      Floating-point parameter: +Rate of aplication of the 1-point crossover relatively +to 1- and 2-point above (see pCross +parameter). Default is 2. +

      # --pMutPerBit=0.01 # -b +: Probability of flipping 1 bit in bit-flip mutation +
      Floating-point parameter: +When bit-flip mutation +is applied, each bit is flipped independently with probability  pMutPerBit. +

      # --bitFlipRate=0.01 # -s +: Relative rate for bit-flip mutation +
      Floating-point parameter: +Rate of aplication of the bit-flip mutation relatively +to one-Bit mutation below (see pMut +above). Default is 0.01 +(if all relative rates are equal, the choice is uniform among available +operators). +

      # --oneBitRate=0.01 # -d +: Relative rate for deterministic bit-flip mutation +
      Floating-point parameter: +Rate of aplication of the one-bit mutation relatively +to bit-flip mutation below (see pMut +above). One-bit mutation flips one and only one bit, uniformly chosen in +the individual. Default is 0.01 +(if all relative rates are equal, the choice is uniform among available +operators). +
        +

      +


      +

      User's guide: +Real-valued specific parameters +
      The following describes the specific parameters that are available +in programs RealEA +and ESEA +to evolve genotypes that are vector<double>. +
      RealEA  +implements what can be called a "real-coded GA", where everything is identical +to the bitstring case above (except initialization and operators that are +specific to vector<double> of course) and ESEA +implements the full Evolution-Strategy self-adaptive mutation mechanism +- together with specific ES crossover operators. The initialization section +for both programs are identical, but the operator sections are totally +different. See next paragraph for a description of ES +specific parameters. +

      +


      +

      Section ######    +Genotype Initialization    ###### +
      This section should allow input if all necessary +parameters for genitype initialization +

      # --vecSize=10 # -n : The +number of variables +
      Integer parameter: +The initilization requires the length of the vector<double>. +

      # --initBounds=(0,1) # -B +: Bounds for uniform initialization +
      Special string parameter: +Bounds for uniform initialization of the real variables. At the moment +only the same bounds for all variables can be chosen, and the format is +(min,max) without any white space.  This argument is mandatory, and +default is (0,1). +

      # --sigmaInit=0.3 # -s : +Initial value for Sigma(s) +
      Floating-point parameter: +The initial value for all standard-deviation mutation strategy parameters. +Useless when no self-adaptive mutation mechanism is used. +

      +


      +

      Section ######    +Variation Operators    ###### +
      This section allows to tune the way the variation +operators will be applied to the individuals (in the strict limit of SGA +model at the moment, see below). +

      # --objectBounds=(0,1) # +-B : Bounds for variables (unbounded if absent) +
      Special string parameter: +Bounds for the variables to be met by all variation operators (see format +in initBounds +above). If this parameter is absent, unbounded +variables are assumed (but they still +need some initBounds +for initialization). For the arithmetic crossovers below, and when parameter +alpha is greater than 0, those bounds result in restricting the values +of possible combination factors. For the uniform mutation, the interval +of uniform choice of the variables is restricted by those bounds. Finally, +in the case of Gaussian mutation, the probability distribution is folded +back into the boundeds as many times as necesssary. No +default (i.e. unbounded variables). +

      # --operator=SGA # -o : Description +of the operator (SGA only now) +
      String parameter: +Describes the way the operators are applied. At the moment, only +SGA is available. SGA sequentially +applies a (quadratic) crossover operator with probability pCross +and a mutation operator with probability  pMut. +Both these operators can in turn be proportional +combinations of simple operators of the +same arity. +

      # --pCross=0.6 # -C : Probability +of Crossover +
      Floating-point parameter: +The probability that a given couple of selected genitors is applied the +crossover operator. In SGA operator model, each couple of selected genitors +is applied the crossover operator with that probability (and remains unchanged +with probability 1-pCross. +Whenever a couple undergoes crossover, a choice is made upon available +crossover operators proportionaly to their +relative rates (see below). Default +is 0.6. +

      # --pMut=0.1 # -M : Probability +of Mutation +
      Floating-point parameter: +The probability that a given individual (resulting from a crossover or +a non-crossover operation, see above) is applied the mutation operator. +Whenever an individual undergoes mutation, a choice is made upon available +mutation operators proportionaly to their +relative rates (see below). Default +is 0.1. +

      # --alpha=0 # -a : bound +for combination factor in real crossover +
      Floating-point parameter: +Bound for the choices of linear combination factors in both crossover belows +(similar to BLX-alpha notation). Default is +0 (i.e. combination factor are chosen in [0,1]). +

      # --segmentRate=1 # -s : +Relative rate for segment crossover +
      Floating-point parameter: +Rate of application of the segment crossover relatively +to hypercube and uniform crossovers (see pCross +parameter). Segment crossover generates offspring uniformly on the segment +joining both parents, i.e. constructs two linear combinations of the parents +with a random number uniformly drawn in [alpha,1+alpha]. +Default is 1. +

      # --hypercubeRate=1 # -A +: Relative rate for hypercube crossover +
      Floating-point parameter: +Rate of application of the hypercube crossover relatively +to segment and uniform crossovers (see pCross +parameter). Hypercube crossover generates offspring uniformly on the hypercube +whose diagonal is the segment joining both parents, i.e. by doing linear +combinations of each variable independently (a random number in [alpha,1+alpha] +is drawn anew for each variable). Default +is 1. +

      # --uxoverRate=1 # -A : Relative +rate for uniform crossover +
      Floating-point parameter: +Rate of application of the segment crossover relatively +to hypercube and segment crossovers (see pCross +parameter). Uniform crossover simply exchanges values of variables, i.e. +uniformly picks up two other summits of the hypercube defined by the parents. +Default is 1. +

      # --epsilon=0.01 # -e : Half-size +of interval for Uniform Mutation +
      Floating-point parameter: +The uniform and deterministic-uniform mutations will choose values of variable +X uniformly in [X-epsilon, +X+epsilon]. +Default is 0.01. +

      # --uniformMutRate=1 # -u +: Relative rate for uniform mutation +
      Floating-point parameter: +Rate of aplication of the uniform mutation relatively +to determinitic uniform and the normal mutations (see pMut +above). Uniform mutation modifies all variables by choosing new values +uniformly on an interval centered on the old value of width 2*epsilon +(see above). Default is1. +

      # --detMutRate=1 # -d : Relative +rate for deterministic uniform mutation +
      Floating-point parameter: +Rate of aplication of the determinisitc-uniform mutation relatively +to uniform and normal mutations (see pMut +above). Deterministic-uniform mutation modifies one single variable uniformly +based on epsilon epsilon. +Default is1. +

      # --normalMutRate=1 # -d +: Relative rate for Gaussian mutation +
      Floating-point parameter: +Rate of aplication of the normal mutation relatively +to two uniform mutations above (see pMut +above). Default is1. +

      # --sigma=0.3 # -s : Sigma +(fixed) for Gaussian mutation +
      Floating-point parameter: +The value of standard deviation for Gaussian mutation - fixed along evolution +(see the Evolution Strategy program below for self-adaptive mutations). +

      +


      +

      User's guide: +ES-real-valued specific parameters +
      The following describes the specific parameters for program ESEA, +that implements the full Evolution-Strategy self-adaptive mutation mechanism +- together with specific ES crossover operators. The initialization section +is the same as the one for plain vector<double> above, so only the opeartor +sections will be described here. A new section is now concerned with deciding +what kind of self-adaptive mutation strategy will be applied - it has been +separated from the other variation operators because it has consequences +on the choice of the genotype. +
      Warning: if you choose not to use +any self-adaptive mechanism (i.e. setting all parameters of this section +to false) you end up with ... an algorithm that is identical to RealEA +above (try it and take alook at the status file). +

      +


      +

      Section ######     +ES mutation    ###### +
      This section allows to decide which type of self-adaptive +mutation will be used. There are three available types: isotropic mutation, +using one standard deviation for each individual, that will be applied +to all variables; anisotropic mutation, where each individual carries as +many standard deviations as it has variables; and correlated mutation where +each individuals has its own full correlation matrix. +

      # --Isotropic=1 # -i : Isotropic +self-adaptive mutation +
      Boolean parameter: +If true, at least one self-adaptive parameter will be used for each individual. +Default is true. +

      # --Stdev=0 # -s : One self-adaptive +stDev per variable +
      Boolean parameter: +If true, at least one self-adaptive parameter per variable will be used +for each individual. Default is false. +

      # --Correl=0 # -c : Use correlated +mutations +
      Boolean parameter: +If true, full correalted self-adaptive mutation will be used for each individual. +Default is false. +

      Note: The +default values result in an isotropic self-adaptive mutation to be chosen. +

      +


      +

      Section ######    +Variation Operators    ###### +
      Only the parameters that are specific to ESEA +are presented here - the objectBounds, +operator, +pCross +and pMut +are exactly the same as for RealEA +above. +

      # --crossType=global # -C +: Type of ES recombination (global or standard) +
      String parameter:  +Es crossover can involve only two parents - and it is then identical to +the standard +hypercube crossover describe for the RealEA +parameters above. But new parents can also be chosen anew for each variable +before doing the crossover for that variable - and this is called global +recombination. +

      # --crossObj=discrete # -O +: Recombination of object variables (discrete or intermediate) +
      String parameter:  +There are two possible crossovers in plain ES. The discrete +crossover simpy exchanges variables among the parents. It is similar to +the plain uniform crossover for real variables. The  crossover performs +a linear combination of parents;variables - it si similar to the hypercube +crossover described for  with alpah parameter set to 0. This parameter +allso to choose the type of crossover that will be applied to the object +variables (i.e. the origianl variables +of the problem). Default is discrete. +

      # --crossStdev=intermediate +# -S : Recombination of mutation strategy parameters (intermediate or discrete) +
      String parameter:  +This parameter allows to choose the type of crossover (see above) that +will be applied to the mutation strategy +parameters that are part of the genotype. +Default is intermediate. +

      # --TauLoc=1 # -l : Local +Tau (before normalization) +
      Floating-point parameter: +The local factor for the mutation of the mutation strategy parameters (the +only one used when a single standard deviation is used). Default +is 1. +

      # --TauGlob=1 # -g : Global +Tau (before normalization) +
      Floating-point parameter: +The global factor for the mutation of the mutation strategy parameters +(only useful when more than one standard deviation are used). Default +is 1. +

      # --Beta=0.0873 # -b : Beta +
      Floating-point parameter: +The factor for the mutation of the rotation angles in the case of the full +correlated mutation. Default is 0.0873 +(following Schwefel). +



      Programmer's guide diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 38e87a927..c7363a8de 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,9 +17,9 @@ and to

      EO Tutorial

      -
      Version 0.95 - May. 2 2001 -
      New: Lesson4 -- with user guide of fully operational program
      +
      Version 0.95 - May. 4 2001 +
      New: Lesson4 +- with user guide of fully operational program for bitstrings and real-valued, including full support of ES self-adaptive mutation strategies

      Welcome to EO tutorial/on-line documentation.

      Please note that this tutorial is not supposed From 0aa6a235ef2f495eeb5c4c2768223789c38aeb1e Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 7 May 2001 07:13:36 +0000 Subject: [PATCH 0590/2134] Replaced stupid eoRateParam by eoValueParam Had to transform eoHowMany into an eoPersistent ... --- eo/src/do/make_algo_scalar.h | 10 ++-- eo/src/eoGeneralBreeder.h | 14 +++++- eo/src/eoSelectMany.h | 4 ++ eo/src/utils/eoHowMany.h | 76 ++++++++++++++++++++++++------ eo/src/utils/eoParam.h | 91 ------------------------------------ eo/src/utils/eoParser.cpp | 12 ----- eo/test/t-eoSelect.cpp | 10 ++-- 7 files changed, 88 insertions(+), 129 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 8673a80e5..43cac86f8 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -117,10 +117,7 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e _state.storeFunctor(select); // the number of offspring - eoValueParam& offspringRateParam = _parser.createParam(eoRateParamType("100%"), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); - // an eoRateParamType is simply a pair - double offRate=offspringRateParam.value().first; - bool offInterpret_as_rate = offspringRateParam.value().second; + eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); // the replacement eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)", 'R', "Evolution Engine"); @@ -180,8 +177,9 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e // the general breeder eoGeneralBreeder *breed = - new eoGeneralBreeder(*select, _op, offRate, offInterpret_as_rate); - _state.storeFunctor(breed); + new eoGeneralBreeder(*select, _op, offspringRateParam.value()); + _state.storeFunctor(breed); + // now the eoEasyEA eoAlgo *algo = new eoEasyEA(_ccontinue, _eval, *breed, *replace); _state.storeFunctor(algo); diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index dfb05f8f1..3f1ac663d 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -60,6 +60,18 @@ class eoGeneralBreeder: public eoBreed bool _interpret_as_rate = true) : select( _select ), op(_op), howMany(_rate, _interpret_as_rate) {} + /** Ctor: + * + * @param _select a selectoOne, to be used for all selections + * @param _op a general operator (will generally be an eoOpContainer) + * @param _howMany an eoHowMany explanation + */ + eoGeneralBreeder( + eoSelectOne& _select, + eoGenOp& _op, + eoHowMany _howMany ) : + select( _select ), op(_op), howMany(_howMany) {} + /** The breeder: simply calls the genOp on a selective populator! * * @param _parents the initial population @@ -75,7 +87,7 @@ class eoGeneralBreeder: public eoBreed while (_offspring.size() < target) { op(it); - ++it; + ++it; } _offspring.resize(target); // you might have generated a few more diff --git a/eo/src/eoSelectMany.h b/eo/src/eoSelectMany.h index f1b765f26..74bbeee0d 100644 --- a/eo/src/eoSelectMany.h +++ b/eo/src/eoSelectMany.h @@ -50,6 +50,10 @@ class eoSelectMany : public eoSelect double _rate, bool _interpret_as_rate = true) : select(_select), howMany(_rate, _interpret_as_rate) {} + // Ctor with eoHowMany + eoSelectMany(eoSelectOne& _select, eoHowMany _howMany) + : select(_select), howMany(_howMany) {} + /** The implementation repeatidly selects an individual diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index fcdce5967..e2c4bdf01 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -26,20 +26,22 @@ #ifndef eoHowMany_h #define eoHowMany_h -// to be used in selection / replacement procedures to indicate whether -// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) -// or as an absolute integer (number=rate regardless of popsize). -// the default value shoudl ALWAYS be true (eo_as_a_rate). -// -// this construct is mandatory because in some cases you might not know the -// population size that will enter the replacement for instance - so you -// cannot simply have a pre-computed (double) rate of 1/popSize if you want 1 guy +/** + * to be used in selection / replacement procedures to indicate whether + * the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) + * or as an absolute integer (number=rate regardless of popsize). + * the default value shoudl ALWAYS be true (eo_as_a_rate). + * + * this construct is mandatory because in some cases you might not know the + * population size that will enter the replacement for instance - so you + * cannot simply have a pre-computed (double) rate of 1/popSize if you want 1 guy + */ - -class eoHowMany +class eoHowMany : public eoPersistent { public: - eoHowMany(double _rate, bool _interpret_as_rate = true): + /** Original Ctor from direct rate + bool */ + eoHowMany(double _rate = 0.0, bool _interpret_as_rate = true): rate(0), combien(0) { if (_interpret_as_rate) @@ -56,17 +58,61 @@ public: } } + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoHowMany() {} + unsigned int operator()(unsigned int _size) { if (combien == 0) { - if (rate == 0.0) - return 0; - else - return (unsigned int) (rate * _size); + return (unsigned int) (rate * _size); } return combien; } + + virtual void printOn(ostream& _os) const + { + if (combien == 0) + _os << 100*rate << "% " << std::ends; + else + _os << combien << " " << std::ends; + return; + + } + + virtual void readFrom(istream& _is) + { + string value; + _is >> value; + readFrom(value); + return; + } + + void readFrom(std::string _value) + { + // check for % + bool interpret_as_rate = false; // == no % + size_t pos = _value.find('%'); + if (pos < _value.size()) // found a % + { + interpret_as_rate = true; + _value.resize(pos); // get rid of % + } + std::istrstream is(_value.c_str()); + is >> rate; + // now store + if (interpret_as_rate) + { + combien = 0; + rate /= 100.0; + } + else + combien = unsigned(rate); // and rate will not be used + + // minimal check + if ( (combien <= 0) && (rate <= 0.0) ) + throw runtime_error("Invalid parameters read in eoHowMany::readFrom"); + } private : double rate; diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 45e53c3ad..c4f87351e 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -297,97 +297,6 @@ void eoValueParam >::setValue(std::string _valu std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } -/* ABANDONNED - See class eoRateType below - /////////////////////////////////////// - Specialization for "rate_or_absolute-number" - -typedef std::pair eoRateType; -template <> -std::string eoValueParam::getValue(void) const -{ - std::ostrstream os; - if (repValue.second) - os << 100*repValue.first << "% " << std::ends; - else - os << repValue.first << " " << std::ends; - return os.str(); -} - -template <> -void eoValueParam::setValue(std::string _value) -{ - double rate; - // check for % - bool interpret_as_rate = false; // == no % - size_t pos = _value.find('%'); - if (pos < _value.size()) // found a % - { - interpret_as_rate = true; - _value.resize(pos); // get rid of % - } - std::istrstream is(_value.c_str()); - is >> rate; - repValue.first = (interpret_as_rate ? rate/100 : floor(rate)); - repValue.second = interpret_as_rate; -} -*/ -/** - * A helper class for the parsing of parameters that can be either a rate - * or an absolute value (integer) - * See eoHowMany.h - */ -class eoRateParamType : public std::pair -{ -public: - eoRateParamType(std::pair _p) : std::pair(_p) {} - eoRateParamType(std::string _value) - { - readFrom(_value); - } - - ostream & printOn(ostream & _os) const - { - if (second) - _os << 100*first << "% " << std::ends; - else - _os << first << " " << std::ends; - return _os; - } - - istream & readFrom(istream & _is) - { - string value; - _is >> value; - readFrom(value); - return _is; - } - - void readFrom(std::string _value) - { - double rate; - // check for % - bool interpret_as_rate = false; // == no % - size_t pos = _value.find('%'); - if (pos < _value.size()) // found a % - { - interpret_as_rate = true; - _value.resize(pos); // get rid of % - } - std::istrstream is(_value.c_str()); - is >> rate; - first = (interpret_as_rate ? rate/100 : floor(rate)); - second = interpret_as_rate; - } - - -}; - -// at the moment, the following are defined in eoParser.cpp -ostream & operator<<(ostream & _os, const eoRateParamType & _rate); -istream & operator>>(istream & _is, eoRateParamType & _rate); - - - /*template class eoContainerParam : public eoParam { diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 6c64ac915..3f19c75e7 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -353,18 +353,6 @@ bool eoParser::userNeedsHelp(void) } ///////////////// I put these here at the moment -ostream & operator<<(ostream & _os, const eoRateParamType & _rate) -{ - _rate.printOn(_os); - return _os; -} - -istream & operator>>(istream & _is, eoRateParamType & _rate) -{ - _rate.readFrom(_is); - return _is; -} - ostream & operator<<(ostream & _os, const eoParamParamType & _rate) { _rate.printOn(_os); diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index c2c458757..b5409e58a 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -93,9 +93,9 @@ void testSelectMany(eoSelect & _select, string _name) } template -void testSelectOne(eoSelectOne & _select, double _rate, string _name) +void testSelectOne(eoSelectOne & _select, eoHowMany & _hm, string _name) { - eoSelectMany percSelect(_select, _rate); + eoSelectMany percSelect(_select, _hm); testSelectMany(percSelect, _name); } @@ -108,8 +108,10 @@ int the_main(int argc, char **argv) eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); pSize = parentSizeParam.value(); // global variable - eoValueParam offsrpringRateParam = parser.createParam(1.0, "offsrpringRate", "Offsrpring rate",'O'); - double oRate = offsrpringRateParam.value(); +// eoValueParam offsrpringRateParam = parser.createParam(1.0, "offsrpringRate", "Offsrpring rate",'O'); +// double oRate = offsrpringRateParam.value(); + eoValueParam offsrpringRateParam = parser.createParam(eoHowMany(1.0), "offsrpringRate", "Offsrpring rate (% or absolute)",'O'); + eoHowMany oRate = offsrpringRateParam.value(); eoValueParam tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); unsigned int tSize = tournamentSizeParam.value(); From 42cb1981d59f32a477bf22841adf5dc6e9a812bf Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 8 May 2001 03:49:35 +0000 Subject: [PATCH 0591/2134] In eoParser::readFrom, added a test to avoid reading non-parser sections as these generally contain many -xxx that generate a reading error when xxx is not a keyword. This allows to use State-savec files directly as parameter files --- eo/src/utils/eoParser.cpp | 99 +++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 3f19c75e7..10a2bea4f 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -142,61 +142,68 @@ void eoParser::updateParameters() const void eoParser::readFrom(istream& is) { string str; + // we must avoid processing \section{xxx} if xxx is NOT "Parser" + bool processing = true; while (is >> str) - { + { + if (str.find(string("\\section{"))==0) // found section begin + processing = (str.find(string("Parser"))= 3) - value = string(str.begin() + 3, str.end()); - } - else - { - value = string(str.begin() + 2, str.end()); - } - } + if (str.size() >= 2) + { + if (str[2] == '=') + { + if (str.size() >= 3) + value = string(str.begin() + 3, str.end()); + } + else + { + value = string(str.begin() + 2, str.end()); + } + } - shortNameMap[str[1]] = value; - } - } + shortNameMap[str[1]] = value; + } + } + } } updateParameters(); From 09388c8ed57acb42f33ece6e69ba32df3d24432b Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 8 May 2001 04:41:51 +0000 Subject: [PATCH 0592/2134] Bing change in eoRealBounds: it is now deriving from eoPersistent. More important, the eoRealVectorBounds, vectorized version (a vector has also become an eoPersistent object and now derives from an eoRealBaseVectorBounds class. A useful consequence (and actual motivatino) was to be able to have soem eoValueParam with all possibilities for input (see doc for Lesson4 in the tutorial for the syntax). --- eo/src/es/eoRealInitBounded.h | 2 +- eo/src/es/eoRealOp.h | 2 +- eo/src/es/make_genotype_real.h | 26 +- eo/src/es/make_op_es.h | 36 +-- eo/src/es/make_op_real.h | 44 +--- eo/src/utils/eoRealBounds.cpp | 167 +++++++++++- eo/src/utils/eoRealBounds.h | 394 +++++++++------------------- eo/src/utils/eoRealVectorBounds.h | 413 ++++++++++++++++++++++++++++++ eo/test/t-eoStateAndParser.cpp | 13 + eo/tutorial/html/eoLesson4.html | 112 ++++---- 10 files changed, 788 insertions(+), 421 deletions(-) create mode 100644 eo/src/utils/eoRealVectorBounds.h diff --git a/eo/src/es/eoRealInitBounded.h b/eo/src/es/eoRealInitBounded.h index f35a20b48..8d8fb05b6 100644 --- a/eo/src/es/eoRealInitBounded.h +++ b/eo/src/es/eoRealInitBounded.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include /** Simple initialization for any EOT that derives from vector * uniformly in some bounds diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 9e20201b8..9125b28a7 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -31,7 +31,7 @@ #include // swap_ranges #include #include -#include +#include //----------------------------------------------------------------------------- diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index 490071059..bd1fae01a 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -29,6 +29,7 @@ #include #include +#include // also need the parser and param includes #include #include @@ -66,27 +67,8 @@ eoEsChromInit & do_make_genotype(eoParameterLoader& _parser, eoState& _stat // for eoReal, only thing needed is the size eoValueParam& vecSize = _parser.createParam(unsigned(10), "vecSize", "The number of variables ", 'n',"Genotype Initialization"); - // to build an eoReal Initializer, we need bounds - eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "initBounds", "Bounds for uniform initialization", 'B', "Genotype Initialization"); - - eoParamParamType & ppBounds = boundsParam.value(); // pair > - // transform into a vector - vector v; - vector::iterator it; - for (it=ppBounds.second.begin(); itc_str()); - double r; - is >> r; - v.push_back(r); - } - // now create the eoRealVectorBounds object - eoRealVectorBounds * ptBounds = NULL; - if (v.size() == 2) // a min and a max for all variables - ptBounds = new eoRealVectorBounds(vecSize.value(), v[0], v[1]); - else // no time now - throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); - // we need to give ownership of this pointer to somebody + // to build an eoReal Initializer, we need bounds: [-1,1] by default + eoValueParam& boundsParam = _parser.createParam(eoRealVectorBounds(vecSize.value(),-1,1), "initBounds", "Bounds for initialization (MUST be bounded)", 'B', "Genotype Initialization"); // now some initial value for sigmas - even if useless? // shoudl be used in Normal mutation @@ -97,7 +79,7 @@ eoEsChromInit & do_make_genotype(eoParameterLoader& _parser, eoState& _stat throw runtime_error("Invalid sigma"); eoEsChromInit * init = - new eoEsChromInit(*ptBounds, sigmaParam.value()); + new eoEsChromInit(boundsParam.value(), sigmaParam.value()); // satore in state _state.storeFunctor(init); return *init; diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index fdda4cd35..846ac9e3c 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -70,41 +70,11 @@ template eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) { - // First, decide whether the objective variables are bounded - eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Variation Operators"); - // get vector size unsigned vecSize = _init.size(); - // the bounds pointer - eoRealVectorBounds * ptBounds; - if (_parser.isItThere(boundsParam)) // otherwise, no bounds - { - /////Warning: this code should probably be replaced by creating - ///// some eoValueParam with specific implementation - //// in eoParser.cpp. At the moment, it is there (cf also make_genotype - eoParamParamType & ppBounds = boundsParam.value(); // pair > - // transform into a vector - vector v; - vector::iterator it; - for (it=ppBounds.second.begin(); itc_str()); - double r; - is >> r; - v.push_back(r); - } - // now create the eoRealVectorBounds object - if (v.size() == 2) // a min and a max for all variables - ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); - else // no time now - throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); - // we need to give ownership of this pointer to somebody - /////////// end of temporary code - } - else // no param for bounds was given - ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds - // as it does not have any dimension + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoRealVectorBounds(vecSize,eoDummyRealNoBounds), "objectBounds", "Bounds for variables", 'B', "Variation Operators"); // now we read Pcross and Pmut, eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); @@ -173,7 +143,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni // Proxy for the mutation parameters eoEsMutationInit mutateInit(_parser, "Variation Operators"); - eoEsMutate * ptMon = new eoEsMutate(mutateInit, *ptBounds); + eoEsMutate * ptMon = new eoEsMutate(mutateInit, boundsParam.value()); _state.storeFunctor(ptMon); // encapsulate into an eoGenop diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 9de9c171b..75aa85699 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -67,41 +67,11 @@ template eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) { - // First, decide whether the objective variables are bounded - eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Variation Operators"); - // get vector size unsigned vecSize = _init.size(); - // the bounds pointer - eoRealVectorBounds * ptBounds; - if (_parser.isItThere(boundsParam)) // otherwise, no bounds - { - /////Warning: this code should probably be replaced by creating - ///// some eoValueParam with specific implementation - //// in eoParser.cpp. At the moemnt, it is there (cf also make_genotype - eoParamParamType & ppBounds = boundsParam.value(); // pair > - // transform into a vector - vector v; - vector::iterator it; - for (it=ppBounds.second.begin(); itc_str()); - double r; - is >> r; - v.push_back(r); - } - // now create the eoRealVectorBounds object - if (v.size() == 2) // a min and a max for all variables - ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); - else // no time now - throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); - // we need to give ownership of this pointer to somebody - /////////// end of temporary code - } - else // no param for bounds was given - ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds - // as it does not have any dimension + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoRealVectorBounds(vecSize,eoDummyRealNoBounds), "objectBounds", "Bounds for variables", 'B', "Variation Operators"); // this is a temporary version(!), // while Maarten codes the full tree-structured general operator input @@ -167,12 +137,12 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni if (bCross) { // segment crossover for bitstring - pass it the bounds - ptQuad = new eoSegmentCrossover(*ptBounds, alphaParam.value()); + ptQuad = new eoSegmentCrossover(boundsParam.value(), alphaParam.value()); _state.storeFunctor(ptQuad); ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); // hypercube crossover - ptQuad = new eoHypercubeCrossover(*ptBounds, alphaParam.value()); + ptQuad = new eoHypercubeCrossover(boundsParam.value(), alphaParam.value()); _state.storeFunctor(ptQuad); ptCombinedQuadOp->add(*ptQuad, hypercubeRateParam.value()); @@ -228,18 +198,18 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni { // uniform mutation on all components: // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] - ptMon = new eoUniformMutation(*ptBounds, epsilonParam.value()); + ptMon = new eoUniformMutation(boundsParam.value(), epsilonParam.value()); _state.storeFunctor(ptMon); // create the CombinedMonOp ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); // mutate exactly 1 component (uniformly) per individual - ptMon = new eoDetUniformMutation(*ptBounds, epsilonParam.value()); + ptMon = new eoDetUniformMutation(boundsParam.value(), epsilonParam.value()); _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); // mutate all component using Gaussian mutation - ptMon = new eoNormalMutation(*ptBounds, sigmaParam.value()); + ptMon = new eoNormalMutation(boundsParam.value(), sigmaParam.value()); _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); _state.storeFunctor(ptCombinedMonOp); diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 5349ed822..53d788012 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -1,7 +1,172 @@ #include +#include #include "eoRealBounds.h" +#include "eoRealVectorBounds.h" // the global dummy bounds // (used for unbounded variables when bounds are required) eoRealNoBounds eoDummyRealNoBounds; -eoRealVectorNoBounds eoDummyVectorNoBounds; +eoRealVectorNoBounds eoDummyVectorNoBounds(0); + +///////////// helper read functions - could be somewhere else + +// removes leading delimiters - return false if nothing else left +bool remove_leading(std::string & _s, const string _delim) +{ + size_t posDebToken = _s.find_first_not_of(_delim); + if (posDebToken >= _s.size()) + return false; + _s = _s.substr(posDebToken); + return true; +} + +double read_double(std::string _s) +{ + istrstream is(_s.c_str()); + double r; + is >> r; + return r; +} + +int read_int(std::string _s) +{ + istrstream is(_s.c_str()); + int i; + is >> i; + return i; +} + +// need to rewrite copy ctor and assignement operator because of ownedBounds +eoRealVectorBounds::eoRealVectorBounds(const eoRealVectorBounds & _b): + eoRealBaseVectorBounds(_b) +{ + factor = _b.factor; + ownedBounds = _b.ownedBounds; + // duplicate all pointers! + if (ownedBounds.size()>0) + for (unsigned i=0; idup(); +} + + +// the readFrom method of eoRealVectorNoBounds: +// only calls the readFrom(string) - for param reading +void eoRealVectorBounds::readFrom(istream& _is) +{ + string value; + _is >> value; + readFrom(value); + return; +} + +void eoRealVectorBounds::readFrom(std::string _value) +{ + // keep track of old size - to adjust in the end + unsigned oldSize = size(); + // clean-up before filling in + if (ownedBounds.size()>0) + for (unsigned i = 0; i < ownedBounds.size(); ++i) + { + delete ownedBounds[i]; + } + ownedBounds.resize(0); + factor.resize(0); + resize(0); + + // now read + string delim(",; "); + while (_value.size()>0) + { + if (!remove_leading(_value, delim)) // only delimiters were left + break; + // look for opening char + size_t posDeb = _value.find_first_of("[("); + cout << posDeb << endl; + if (posDeb >= _value.size()) // nothing left to read (though probably a syntax error there) + { + break; + } + // ending char + string closeChar = (_value[posDeb] == '(' ? string(")") : string("]") ); + + size_t posFin = _value.find_first_of(string(closeChar)); + if (posFin >= _value.size()) + throw runtime_error("Syntax error when reading bounds"); + + // y a-t-il un nbre devant + unsigned count = 1; + if (posDeb > 0) // something before opening + { + string sCount = _value.substr(0, posDeb); + count = read_int(sCount); + if (count <= 0) + throw runtime_error("Syntax error when reading bounds"); + } + + // the bounds + string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + // and remove from original string + _value = _value.substr(posFin+1); + + remove_leading(sBounds, delim); + size_t posDelim = sBounds.find_first_of(delim); + if (posDelim >= sBounds.size()) + throw runtime_error("Syntax error when reading bounds"); + + bool minBounded=false, maxBounded=false; + double minBound=0, maxBound=0; + + // min bound + string sMinBounds = sBounds.substr(0,posDelim); + if (sMinBounds != string("-inf")) + { + minBounded = true; + minBound = read_double(sMinBounds); + } + + // max bound + size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); + + string sMaxBounds = sBounds.substr(posEndDelim); + if (sMaxBounds != string("+inf")) + { + maxBounded = true; + maxBound = read_double(sMaxBounds); + } + + // now create the eoRealBounds objects + eoRealBounds *ptBounds; + if (minBounded && maxBounded) + ptBounds = new eoRealInterval(minBound, maxBound); + else if (!minBounded && !maxBounded) // no bound at all + ptBounds = new eoRealNoBounds; + else if (!minBounded && maxBounded) + ptBounds = new eoRealAboveBound(maxBound); + else if (minBounded && !maxBounded) + ptBounds = new eoRealBelowBound(minBound); + // store it for memory management + ownedBounds.push_back(ptBounds); + // push the count + factor.push_back(count); + // and add count of it to the actual bounds + for (unsigned i=0; i 1 already!) + factor[factor.size()-1] += missing; + } +} diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 52bf836d2..73bd761cf 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -69,20 +69,10 @@ eoRealNoBounds the "unbounded bounds" (-infinity, +infinity) eoRealBelowBound the half-bounded interval [min, +infinity) eoRealAboveBound the half-bounded interval (-infinity, max] -Vector type: ------------- -Class eoRealVectorBounds implements the vectorized version: -it is basically a vector of eoRealBounds * and forwards all request -to the elements of the vector. - -This file also contains te 2 global variables eoDummyRealNoBounds and -eoDummyVectorNoBounds that are used as defaults in ctors (i.e. when no -bounds are given, it is assumed unbounded values) - -TODO: have an eoRealBounds.cpp with the longuish parts of the code -(and the 2 global variables). +THis file also contains the declaration of *the* global object that +is the unbounded bound */ -class eoRealBounds +class eoRealBounds : public eoPersistent { public: virtual ~eoRealBounds(){} @@ -133,6 +123,9 @@ public: * @exception if unbounded */ virtual double uniform(eoRng & _rng = eo::rng) = 0; + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() = 0; }; /** A default class for unbounded variables @@ -167,6 +160,34 @@ public: { throw logic_error("Trying to generate uniform values in unbounded eoRealBounds"); } + + // methods from eoPersistent + /** + * Read object. + * @param _is A istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(istream& _is) + { + throw runtime_error("Should not use eoRealBounds::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const + { + _os << "[-inf,+inf]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() + { + return new eoRealNoBounds(*this); + } + }; // one object for all - see eoRealBounds.cpp @@ -255,6 +276,33 @@ public : return; } + // methods from eoPersistent + /** + * Read object. + * @param _is A istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(istream& _is) + { + throw runtime_error("Should not use eoRealInterval::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const + { + _os << "[" << repMinimum << "," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() + { + return new eoRealInterval(*this); + } + private : double repMinimum; double repMaximum; @@ -323,6 +371,34 @@ public : _r = repMinimum; return; } + + // methods from eoPersistent + /** + * Read object. + * @param _is A istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(istream& _is) + { + throw runtime_error("Should not use eoRealBelowBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const + { + _os << "[" << repMinimum << ",+inf]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() + { + return new eoRealBelowBound(*this); + } + private : double repMinimum; }; @@ -391,273 +467,35 @@ public : return; } + // methods from eoPersistent + /** + * Read object. + * @param _is A istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(istream& _is) + { + throw runtime_error("Should not use eoRealAboveBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const + { + _os << "[-inf," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() + { + return new eoRealAboveBound(*this); + } + private : double repMaximum; }; -///////////////////////////////////////////////////////////////////// -// The Vectorized versions -///////////////////////////////////////////////////////////////////// - -/** -Class eoRealVectorBounds implements the vectorized version: -it is basically a vector of eoRealBounds * and forwards all request -to the elements of the vector. -Probably it would have been cleaner if there had been an empty base class -from which eoRealVectorBounds AND eoRealVectorNoBounds would have derived. -This is because I started to write eoRealVectorNoBounds as a - vector whose compoenents would have been eoRealNoBounds - but then realize that you don't necessarily have the dimension - when construction this vector - hence I added the eoRealVectorNoBounds ... -Anyone with extra time in his agenda is welcome to change that :-) -*/ -class eoRealVectorBounds : public vector -{ -public: - // virtual desctructor (to avoid warning?) - virtual ~eoRealVectorBounds(){} - - /** Default Ctor. I don't like it, as it leaves NULL pointers around - */ - eoRealVectorBounds(unsigned _dim=0) : vector(_dim) {} - - /** Simple bounds = minimum and maximum (allowed) - */ - eoRealVectorBounds(unsigned _dim, double _min, double _max) : - vector(_dim, new eoRealInterval(_min, _max)) - { - if (_max-_min<=0) - throw std::logic_error("Void range in eoRealVectorBounds"); - } - - /** Ctor: same bonds for everybody, given as an eoRealBounds - */ - eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : - vector(_dim, &_bounds) - {} - - /** Ctor: different bonds for different variables, vectors of double - */ - eoRealVectorBounds(vector _min, vector _max) - { - if (_max.size() != _min.size()) - throw std::logic_error("Dimensions don't match in eoRealVectorBounds"); - for (unsigned i=0; i<_min.size(); i++) - { - push_back( new eoRealInterval(_min[i], _max[i])); - } - } - - /** Ctor, particular case of dim-2 - */ - eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : - vector(0) - { - push_back( &_xbounds); - push_back( &_ybounds); - } - - /** test: is i_th component bounded - */ - virtual bool isBounded(unsigned _i) - { - return (*this)[_i]->isBounded(); - } - - /** test: bounded iff all are bounded - */ - virtual bool isBounded(void) - { - for (unsigned i=0; iisBounded()) - return false; - return true; - } - - /** Self-test: true iff i_th component has no bounds at all - */ - virtual bool hasNoBoundAtAll(unsigned _i) - { - return (*this)[_i]->hasNoBoundAtAll(); - } - - /** Self-test: true iff all components have no bound at all - */ - virtual bool hasNoBoundAtAll(void) - { - for (unsigned i=0; ihasNoBoundAtAll()) - return false; - return true; - } - - virtual bool isMinBounded(unsigned _i) - { return (*this)[_i]->isMinBounded();} ; - - virtual bool isMaxBounded(unsigned _i) - { return (*this)[_i]->isMaxBounded();} ; - - /** Folds a real value back into the bounds - i_th component - */ - virtual void foldsInBounds(unsigned _i, double & _r) - { - (*this)[_i]->foldsInBounds(_r); - } - - /** Folds all variables of a vector of real values into the bounds - */ - virtual void foldsInBounds(vector & _v) - { - for (unsigned i=0; ifoldsInBounds(_v[i]); - } - } - - /** Truncates a real value to the bounds - i_th component - */ - virtual void truncate(unsigned _i, double & _r) - { - (*this)[_i]->truncate(_r); - } - - /** truncates all variables of a vector of real values to the bounds - */ - virtual void truncate(vector & _v) - { - for (unsigned i=0; itruncate(_v[i]); - } - } - - /** test: is i_th component within the bounds? - */ - virtual bool isInBounds(unsigned _i, double _r) - { return (*this)[_i]->isInBounds(_r); } - - /** test: are ALL components within the bounds? - */ - virtual bool isInBounds(vector _v) - { - for (unsigned i=0; iminimum();} - virtual double maximum(unsigned _i) {return (*this)[_i]->maximum();} - virtual double range(unsigned _i) {return (*this)[_i]->range();} - - /** Computes the average range - * An exception will be raised if one of the component is unbounded - */ - virtual double averageRange() - { - double r=0.0; - for (unsigned i=0; iuniform(); - return r; - } - - /** fills a vector with uniformly chosen variables in bounds - * An exception will be raised if one of the component is unbounded - */ - void uniform(vector & _v, eoRng & _rng = eo::rng) - { - _v.resize(size()); - for (unsigned i=0; i - */ -class eoRealVectorNoBounds: public eoRealVectorBounds -{ -public: - // virtual desctructor (to avoid warning?) - virtual ~eoRealVectorNoBounds(){} - - /** - * Ctor: nothing to do, but beware of dimension: call base class ctor - */ - eoRealVectorNoBounds(unsigned _dim=0) : eoRealVectorBounds(_dim) - { - // avoid NULL pointers, even though they shoudl (at the moment) never be used! - if (_dim) - for (unsigned i=0; i<_dim; i++) - operator[](i)=&eoDummyRealNoBounds; - } - - - virtual bool isBounded(unsigned) {return false;} - virtual bool isBounded(void) {return false;} - - virtual bool hasNoBoundAtAll(unsigned) {return true;} - virtual bool hasNoBoundAtAll(void) {return true;} - - virtual bool isMinBounded(unsigned) {return false;} - virtual bool isMaxBounded(unsigned) {return false;} - - virtual void foldsInBounds(unsigned, double &) {return;} - virtual void foldsInBounds(vector &) {return;} - - virtual void truncate(unsigned, double &) {return;} - virtual void truncate(vector &) {return;} - - virtual bool isInBounds(unsigned, double) {return true;} - virtual bool isInBounds(vector) {return true;} - - // accessors - virtual double minimum(unsigned) - { - throw logic_error("Trying to get minimum of eoRealVectorNoBounds"); - } - virtual double maximum(unsigned) - { - throw logic_error("Trying to get maximum of eoRealVectorNoBounds"); - } - virtual double range(unsigned) - { - throw logic_error("Trying to get range of eoRealVectorNoBounds"); - } - - virtual double averageRange() - { - throw logic_error("Trying to get average range of eoRealVectorNoBounds"); - } - - // random generators - virtual double uniform(unsigned, eoRng & _rng = eo::rng) - { - throw logic_error("No uniform distribution on eoRealVectorNoBounds"); - } - - // fills a vector with uniformly chosen variables in bounds - void uniform(vector &, eoRng & _rng = eo::rng) - { - throw logic_error("No uniform distribution on eoRealVectorNoBounds"); - } - -}; - -// one object for all - see eoRealBounds.cpp -extern eoRealVectorNoBounds eoDummyVectorNoBounds; #endif diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h new file mode 100644 index 000000000..8f51d4be5 --- /dev/null +++ b/eo/src/utils/eoRealVectorBounds.h @@ -0,0 +1,413 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealVectorBounds.h +// (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoRealVectorBounds_h +#define _eoRealVectorBounds_h + +#include // exceptions! +#include +#include + +/** +\defgroup EvolutionStrategies + +*/ + + +/** +Vector type for bounds (see eoRealBounds.h for scalar types) +------------ +Class eoRealVectorBounds implements the vectorized version: +it is basically a vector of eoRealBounds * and forwards all request +to the elements of the vector. + +This file also contains the global variables and eoDummyVectorNoBounds +that are used as defaults in ctors (i.e. when no +bounds are given, it is assumed unbounded values) + +THe 2 main classes defined here are + +eoRealBaseVectorBounds, base class that handles all useful functions +eoRealVectorBounds which derives from the preceding *and* eoPersistent + and also has a mechanism for memory handling of the pointers + it has to allocate +*/ +class eoRealBaseVectorBounds : public vector +{ +public: + // virtual desctructor (to avoid warning?) + virtual ~eoRealBaseVectorBounds(){} + + /** Default Ctor. + */ + eoRealBaseVectorBounds() : vector(0) {} + + /** Ctor: same bounds for everybody, given as an eoRealBounds + */ + eoRealBaseVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + vector(_dim, &_bounds) + {} + + /** Ctor, particular case of dim-2 + */ + eoRealBaseVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + vector(0) + { + push_back( &_xbounds); + push_back( &_ybounds); + } + + /** test: is i_th component bounded + */ + virtual bool isBounded(unsigned _i) + { + return (*this)[_i]->isBounded(); + } + + /** test: bounded iff all are bounded + */ + virtual bool isBounded(void) + { + for (unsigned i=0; iisBounded()) + return false; + return true; + } + + /** Self-test: true iff i_th component has no bounds at all + */ + virtual bool hasNoBoundAtAll(unsigned _i) + { + return (*this)[_i]->hasNoBoundAtAll(); + } + + /** Self-test: true iff all components have no bound at all + */ + virtual bool hasNoBoundAtAll(void) + { + for (unsigned i=0; ihasNoBoundAtAll()) + return false; + return true; + } + + virtual bool isMinBounded(unsigned _i) + { return (*this)[_i]->isMinBounded();} ; + + virtual bool isMaxBounded(unsigned _i) + { return (*this)[_i]->isMaxBounded();} ; + + /** Folds a real value back into the bounds - i_th component + */ + virtual void foldsInBounds(unsigned _i, double & _r) + { + (*this)[_i]->foldsInBounds(_r); + } + + /** Folds all variables of a vector of real values into the bounds + */ + virtual void foldsInBounds(vector & _v) + { + for (unsigned i=0; ifoldsInBounds(_v[i]); + } + } + + /** Truncates a real value to the bounds - i_th component + */ + virtual void truncate(unsigned _i, double & _r) + { + (*this)[_i]->truncate(_r); + } + + /** truncates all variables of a vector of real values to the bounds + */ + virtual void truncate(vector & _v) + { + for (unsigned i=0; itruncate(_v[i]); + } + } + + /** test: is i_th component within the bounds? + */ + virtual bool isInBounds(unsigned _i, double _r) + { return (*this)[_i]->isInBounds(_r); } + + /** test: are ALL components within the bounds? + */ + virtual bool isInBounds(vector _v) + { + for (unsigned i=0; iminimum();} + virtual double maximum(unsigned _i) {return (*this)[_i]->maximum();} + virtual double range(unsigned _i) {return (*this)[_i]->range();} + + /** Computes the average range + * An exception will be raised if one of the component is unbounded + */ + virtual double averageRange() + { + double r=0.0; + for (unsigned i=0; iuniform(); + return r; + } + + /** fills a vector with uniformly chosen variables in bounds + * An exception will be raised if one of the component is unbounded + */ + void uniform(vector & _v, eoRng & _rng = eo::rng) + { + _v.resize(size()); + for (unsigned i=0; iprintOn(_os); + _os << ";"; + } + } +}; + +//////////////////////////////////////////////////////////////////// +/** Now a derived class, for parser reading + * It holds some of the bounds (and destroy them when dying) + */ +class eoRealVectorBounds : public eoRealBaseVectorBounds, public eoPersistent +{ +public: + /** Default Ctor will call base class default ctor + */ + eoRealVectorBounds():eoRealBaseVectorBounds() {} + + /** Ctor: same bounds for everybody, given as an eoRealBounds + */ + eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + eoRealBaseVectorBounds(_dim, _bounds), factor(1,_dim), ownedBounds(0) + {} + + /** Ctor, particular case of dim-2 + */ + eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + eoRealBaseVectorBounds(_xbounds, _ybounds), factor(1,2), ownedBounds(0) + {} + + /** Simple bounds = minimum and maximum (allowed) + */ + eoRealVectorBounds(unsigned _dim, double _min, double _max) : + eoRealBaseVectorBounds(), factor(1, _dim), ownedBounds(0) + { + if (_max-_min<=0) + throw std::logic_error("Void range in eoRealVectorBounds"); + eoRealBounds *ptBounds = new eoRealInterval(_min, _max); + // handle memory once + ownedBounds.push_back(ptBounds); + // same bound for everyone + for (unsigned int i=0; i<_dim; i++) + push_back(ptBounds); + } + + /** Ctor: different bounds for different variables, vectors of double + */ + eoRealVectorBounds(vector _min, vector _max) : + factor(_min.size(), 1), ownedBounds(0) + { + if (_max.size() != _min.size()) + throw std::logic_error("Dimensions don't match in eoRealVectorBounds"); + // the bounds + eoRealBounds *ptBounds; + for (unsigned i=0; i<_min.size(); i++) + { + ptBounds = new eoRealInterval(_min[i], _max[i]); + ownedBounds.push_back(ptBounds); + push_back(ptBounds); + } + } + + /** Dtor: destroy all ownedBounds - BUG ???*/ + virtual ~eoRealVectorBounds() + { +// cout << "Dtor, avec size = " << ownedBounds.size() << endl; +// for (unsigned i = 0; i < ownedBounds.size(); ++i) +// { +// delete ownedBounds[i]; +// } +} + + + // methods from eoPersistent + /** + * Read object from a stream + * only calls the readFrom(string) - for param reading + * @param _is A istream. + */ + virtual void readFrom(istream& _is) ; + + /** + * Read object from a string + * @param _is A istream. + */ + virtual void readFrom(string _s) ; + + /** overload printOut method to save space */ + virtual void printOn(ostream& _os) const + { + if (factor[0]>1) + _os << factor[0] ; + operator[](0)->printOn(_os); + + // other bounds + unsigned int index=factor[0]; + if (factor.size()>1) + for (unsigned i=1; i 1) + _os << factor[i]; + operator[](index)->printOn(_os); + index += factor[i]; + } + } + + /** Eventually increases the size by duplicating last bound */ + void adjust_size(unsigned _dim); + + /** need to rewrite copy ctor and assignement operator + * because of ownedBounds */ + eoRealVectorBounds(const eoRealVectorBounds &); + +private:// WARNING: there is no reason for both vector below + //to be synchronized in any manner + vector factor; // list of nb of "grouped" bounds + vector ownedBounds; +// keep this one private + eoRealVectorBounds& operator=(const eoRealVectorBounds&); + }; + +////////////////////////////////////////////////////////////// +/** the dummy unbounded eoRealVectorBounds: usefull if you don't need bounds! + * everything is inlined. + * Warning: we do need this class, and not only a vector + */ +class eoRealVectorNoBounds: public eoRealVectorBounds +{ +public: + // virtual desctructor (to avoid warning?) + virtual ~eoRealVectorNoBounds(){} + + /** + * Ctor: nothing to do, but beware of dimension: call base class ctor + */ + eoRealVectorNoBounds(unsigned _dim) : + eoRealVectorBounds( (_dim?_dim:1), eoDummyRealNoBounds) + {} + + + virtual bool isBounded(unsigned) {return false;} + virtual bool isBounded(void) {return false;} + + virtual bool hasNoBoundAtAll(unsigned) {return true;} + virtual bool hasNoBoundAtAll(void) {return true;} + + virtual bool isMinBounded(unsigned) {return false;} + virtual bool isMaxBounded(unsigned) {return false;} + + virtual void foldsInBounds(unsigned, double &) {return;} + virtual void foldsInBounds(vector &) {return;} + + virtual void truncate(unsigned, double &) {return;} + virtual void truncate(vector &) {return;} + + virtual bool isInBounds(unsigned, double) {return true;} + virtual bool isInBounds(vector) {return true;} + + // accessors + virtual double minimum(unsigned) + { + throw logic_error("Trying to get minimum of eoRealVectorNoBounds"); + } + virtual double maximum(unsigned) + { + throw logic_error("Trying to get maximum of eoRealVectorNoBounds"); + } + virtual double range(unsigned) + { + throw logic_error("Trying to get range of eoRealVectorNoBounds"); + } + + virtual double averageRange() + { + throw logic_error("Trying to get average range of eoRealVectorNoBounds"); + } + + // random generators + virtual double uniform(unsigned, eoRng & _rng = eo::rng) + { + throw logic_error("No uniform distribution on eoRealVectorNoBounds"); + } + + // fills a vector with uniformly chosen variables in bounds + void uniform(vector &, eoRng & _rng = eo::rng) + { + throw logic_error("No uniform distribution on eoRealVectorNoBounds"); + } + +}; + + + +// one object for all - see eoRealBounds.cpp +extern eoRealVectorNoBounds eoDummyVectorNoBounds; +#endif diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index c29338ddc..1f2ac1c2d 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -23,6 +23,8 @@ // include package checkpointing #include +// and provisions for Bounds reading +#include struct Dummy : public EO { @@ -40,6 +42,7 @@ int the_main(int argc, char **argv) eoParser parser(argc, argv); // Define Parameters + eoValueParam dimParam((unsigned int)(5), "dimension", "dimension"); eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); eoValueParam seed(time(0), "seed", "Random number seed"); @@ -51,17 +54,27 @@ int the_main(int argc, char **argv) eoValueParam load_name("", "Load","Load",'L'); eoValueParam save_name("", "Save","Save",'S'); + // Register them + parser.processParam(dimParam, "Genetic Operators"); parser.processParam(rate, "Genetic Operators"); parser.processParam(factor, "Genetic Operators"); parser.processParam(load_name, "Persistence"); parser.processParam(save_name, "Persistence"); parser.processParam(seed, "Rng seeding"); + // a bound param (need dim) + eoValueParam boundParam(eoRealVectorBounds(dimParam.value(),eoDummyRealNoBounds), "bounds","bounds",'b'); + + parser.processParam(boundParam, "Genetic Operators"); + + cout << "Bounds: " << boundParam.value() << endl; + eoState state; state.registerObject(parser); + if (load_name.value() != "") { // load the parser. This is only neccessary when the user wants to // be able to change the parameters in the state file by hand. diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index fd37d4bb6..e8b518ab7 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -2,8 +2,8 @@ - - Tutorial: Lesson 3 + + Tutorial: Lesson 4 Lesson 3 - @@ -478,18 +478,22 @@ parameters for genitype initialization number of variables
      Integer parameter: The initilization requires the length of the vector<double>. -

      # --initBounds=(0,1) # -B -: Bounds for uniform initialization -
      Special string parameter: -Bounds for uniform initialization of the real variables. At the moment -only the same bounds for all variables can be chosen, and the format is -(min,max) without any white space.  This argument is mandatory, and -default is (0,1). +

      # --initBounds=10[-1,1] # +-B : Bounds for uniform initialization +
      Bounds parameter: +Bounds for uniform initialization of the real variables. The syntax for +this parameter given in the objectBounds +parameter description below. This argument is mandatory, furthermore the +given bounds must be bounded. +The default is [-1,1] +for all variables. +
      Note that this parameter is independent of the objectBounds +parameter below.

      # --sigmaInit=0.3 # -s : Initial value for Sigma(s)
      Floating-point parameter: The initial value for all standard-deviation mutation strategy parameters. -Useless when no self-adaptive mutation mechanism is used. +Useless when no self-adaptive mutation mechanism is used.


      Section ######    @@ -497,21 +501,28 @@ Variation Operators    ######
      This section allows to tune the way the variation operators will be applied to the individuals (in the strict limit of SGA model at the moment, see below). -

      # --objectBounds=(0,1) # --B : Bounds for variables (unbounded if absent) -
      Special string parameter: -Bounds for the variables to be met by all variation operators (see format -in initBounds -above). If this parameter is absent, unbounded -variables are assumed (but they still -need some initBounds -for initialization). For the arithmetic crossovers below, and when parameter -alpha is greater than 0, those bounds result in restricting the values -of possible combination factors. For the uniform mutation, the interval -of uniform choice of the variables is restricted by those bounds. Finally, -in the case of Gaussian mutation, the probability distribution is folded -back into the boundeds as many times as necesssary. No -default (i.e. unbounded variables). +

      # --objectBounds=10[-inf,+inf] +# -B : Bounds for variables +
      Bounds parameter: +Bounds for object variables. The syntax for this parameter is a succession +of (optionally semi-colon separated) items of the form N[min,Max]where +the optional integer N +indicates how many variables have the given bounds. min +and Max +are either floating point numbers, or -inf +(resp. +inf) +to indicate unbounded direction. If not enough bounds are provided, the +remaining variables will have the same bounds as the last bounds given. +
      This argument is mandatory, and +default +is [-inf,+inf], i.e. unbounded variables. +

      Examples: +10[-1,1]is +equivalent to simply [-1,1] +or to the extended  [-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1]. +
      And [-1,1];2[0,1];[-inf,10]results +in the first variable staying in [-1,1], the second and the third in [0,1] +and all remaining variables below 10.

      # --operator=SGA # -o : Description of the operator (SGA only now)
      String parameter: @@ -547,7 +558,7 @@ for combination factor in real crossover

      Floating-point parameter: Bound for the choices of linear combination factors in both crossover belows (similar to BLX-alpha notation). Default is -0 (i.e. combination factor are chosen in [0,1]). +0
      (i.e. combination factor are chosen in [0,1]).

      # --segmentRate=1 # -s : Relative rate for segment crossover
      Floating-point parameter: @@ -556,7 +567,8 @@ to hypercube and uniform crossovers (see alpha,1+alpha]. -Default is 1. +Default +is 1.

      # --hypercubeRate=1 # -A : Relative rate for hypercube crossover
      Floating-point parameter: @@ -566,7 +578,7 @@ parameter). Hypercube crossover generates offspring uniformly on the hypercube whose diagonal is the segment joining both parents, i.e. by doing linear combinations of each variable independently (a random number in [alpha,1+alpha] is drawn anew for each variable). Default -is 1. +is 1
      .

      # --uxoverRate=1 # -A : Relative rate for uniform crossover
      Floating-point parameter: @@ -574,14 +586,16 @@ Rate of application of the segment crossover rel to hypercube and segment crossovers (see pCross parameter). Uniform crossover simply exchanges values of variables, i.e. uniformly picks up two other summits of the hypercube defined by the parents. -Default is 1. +
      Default +is 1.

      # --epsilon=0.01 # -e : Half-size of interval for Uniform Mutation
      Floating-point parameter: The uniform and deterministic-uniform mutations will choose values of variable X uniformly in [X-epsilon, X+epsilon]. -Default is 0.01. +
      Default +is 0.01.

      # --uniformMutRate=1 # -u : Relative rate for uniform mutation
      Floating-point parameter: @@ -589,7 +603,7 @@ Rate of aplication of the uniform mutation relat to determinitic uniform and the normal mutations (see pMut above). Uniform mutation modifies all variables by choosing new values uniformly on an interval centered on the old value of width 2*epsilon -(see above). Default is1. +(see above).
      Default is1.

      # --detMutRate=1 # -d : Relative rate for deterministic uniform mutation
      Floating-point parameter: @@ -597,13 +611,14 @@ Rate of aplication of the determinisitc-uniform mutation pMut
      above). Deterministic-uniform mutation modifies one single variable uniformly based on epsilon epsilon. -Default is1. +
      Default +is1.

      # --normalMutRate=1 # -d : Relative rate for Gaussian mutation
      Floating-point parameter: Rate of aplication of the normal mutation relatively to two uniform mutations above (see pMut -above). Default is1. +above). Default is1.

      # --sigma=0.3 # -s : Sigma (fixed) for Gaussian mutation
      Floating-point parameter: @@ -634,35 +649,35 @@ mutation will be used. There are three available types: isotropic mutation, using one standard deviation for each individual, that will be applied to all variables; anisotropic mutation, where each individual carries as many standard deviations as it has variables; and correlated mutation where -each individuals has its own full correlation matrix. +each individuals has its own full correlation matrix.

      # --Isotropic=1 # -i : Isotropic self-adaptive mutation
      Boolean parameter: If true, at least one self-adaptive parameter will be used for each individual. -Default is true. +Default +is true.

      # --Stdev=0 # -s : One self-adaptive stDev per variable
      Boolean parameter: If true, at least one self-adaptive parameter per variable will be used -for each individual. Default is false. +for each individual. Default is false.

      # --Correl=0 # -c : Use correlated mutations
      Boolean parameter: If true, full correalted self-adaptive mutation will be used for each individual. -Default is false. +Default +is false.

      Note: The -default values result in an isotropic self-adaptive mutation to be chosen. +default values result in an isotropic self-adaptive mutation to be chosen.


      Section ######    Variation Operators    ######
      Only the parameters that are specific to ESEA -are presented here - the objectBounds, -operator, -pCross +are presented here - the objectBounds,operator,pCross and pMut are exactly the same as for RealEA -above. +above.

      # --crossType=global # -C : Type of ES recombination (global or standard)
      String parameter:  @@ -671,7 +686,7 @@ the standardRealEA parameters above. But new parents can also be chosen anew for each variable before doing the crossover for that variable - and this is called global -recombination. +recombination.

      # --crossObj=discrete # -O : Recombination of object variables (discrete or intermediate)
      String parameter:  @@ -682,31 +697,32 @@ a linear combination of parents;variables - it si similar to the hypercube crossover described for  with alpah parameter set to 0. This parameter allso to choose the type of crossover that will be applied to the object variables (i.e. the origianl variables -of the problem). Default is discrete. +of the problem). Default is discrete.

      # --crossStdev=intermediate # -S : Recombination of mutation strategy parameters (intermediate or discrete)
      String parameter:  This parameter allows to choose the type of crossover (see above) that will be applied to the mutation strategy parameters that are part of the genotype. -Default is intermediate. +Default +is intermediate.

      # --TauLoc=1 # -l : Local Tau (before normalization)
      Floating-point parameter: The local factor for the mutation of the mutation strategy parameters (the only one used when a single standard deviation is used). Default -is 1. +is 1.

      # --TauGlob=1 # -g : Global Tau (before normalization)
      Floating-point parameter: The global factor for the mutation of the mutation strategy parameters (only useful when more than one standard deviation are used). Default -is 1. +is 1.

      # --Beta=0.0873 # -b : Beta
      Floating-point parameter: The factor for the mutation of the rotation angles in the case of the full correlated mutation. Default is 0.0873 -(following Schwefel). +(following Schwefel).



      Programmer's From b7915a4bbed0ab6b13e3d007f9ae97ba6dc7acec Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 8 May 2001 04:44:30 +0000 Subject: [PATCH 0593/2134] CHanged CXXFLAGS to nothing - so lib files remain of manageable size! --- eo/src/es/Makefile.am | 2 +- eo/src/ga/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 8342b8a9f..bef3f5880 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -14,6 +14,6 @@ libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ make_op_es.cpp make_pop_es.cpp make_run_es.cpp CPPFLAGS = -Wall -CXXFLAGS = -g +CXXFLAGS = libeoincdir = $(includedir)/eo/es libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsLocalXover.h eoRealAtomXover.h diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index b46bb017f..ebb625684 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -14,6 +14,6 @@ libga_a_SOURCES = make_algo_scalar_ga.cpp \ make_pop_ga.cpp \ make_run_ga.cpp CPPFLAGS = -Wall -CXXFLAGS = -g +CXXFLAGS = libeoincdir = $(includedir)/eo/ga libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h make_ga.h From 88f281b6061e9d350be9adddf8bb4a459c802c52 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 10 May 2001 12:16:00 +0000 Subject: [PATCH 0594/2134] Added 'Viral' operators with test. Implements the Mobile Genetic Elements Technique --- eo/src/MGE/VirusOp.h | 106 ++++++++++++++++++++++++++++++++++++ eo/src/MGE/eoInitVirus.h | 64 ++++++++++++++++++++++ eo/src/MGE/eoVirus.h | 112 ++++++++++++++++++++++++++++++++++++++ eo/src/ga/eoBitOp.h | 26 +-------- eo/test/Makefile.am | 20 ++++++- eo/test/t-MGE-control.cpp | 97 +++++++++++++++++++++++++++++++++ eo/test/t-MGE.cpp | 101 ++++++++++++++++++++++++++++++++++ 7 files changed, 500 insertions(+), 26 deletions(-) create mode 100644 eo/src/MGE/VirusOp.h create mode 100644 eo/src/MGE/eoInitVirus.h create mode 100644 eo/src/MGE/eoVirus.h create mode 100644 eo/test/t-MGE-control.cpp create mode 100644 eo/test/t-MGE.cpp diff --git a/eo/src/MGE/VirusOp.h b/eo/src/MGE/VirusOp.h new file mode 100644 index 000000000..73038aa7f --- /dev/null +++ b/eo/src/MGE/VirusOp.h @@ -0,0 +1,106 @@ +/* + ViruOp.h + (c) GeNeura Team 2001, Marc Schoenauer 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/MGE/Attic/VirusOp.h,v 1.1 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $ +*/ + +#ifndef VirusOp_h +#define VirusOp_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // string + +#include +#include + +/** eoBitFlip --> changes 1 bit +\class eoBitBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template +class VirusBitFlip: public eoMonOp > { + public: + /// The class name. + virtual string className() const { return "VirusBitFlip"; }; + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(eoVirus& _chrom) { + unsigned i = eo::rng.random(_chrom.size()); + _chrom.virusBitSet(i, _chrom.virusBit(i) ? false : true ); + return true; + } +}; + +template +class VirusMutation: public eoMonOp > { + public: + /// The class name. + virtual string className() const { return "VirusMutation"; }; + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(eoVirus& _chrom) { + // Search for virus bits + vector bitsSet; + for ( unsigned i = 0; i < _chrom.size(); i ++ ) { + if ( _chrom.virusBit(i) ) { + bitsSet.push_back( i ); + } + } + if ( !bitsSet.size() ) { + return false; + } + unsigned flipSite = eo::rng.random(bitsSet.size()); + unsigned flipValue = bitsSet[ flipSite ]; + _chrom[flipValue] = _chrom[flipValue] ? false : true; + return true; + } +}; + +template +class VirusTransmission: public eoBinOp > { + public: + /// The class name. + virtual string className() const { return "VirusTransmission"; }; + + /** + * Change one bit. + * @param _chrom The "receptor" chromosome + * @param _chrom2 The "donor" chromosome + */ + bool operator()(eoVirus& _chrom,const eoVirus& _chrom2) { + // Search for virus bits + for ( unsigned i = 0; i < _chrom.size(); i ++ ) { + _chrom.virusBitSet(i, _chrom2.virusBit(i) ); + } + return true; + } +}; + +#endif //VirusOp_h diff --git a/eo/src/MGE/eoInitVirus.h b/eo/src/MGE/eoInitVirus.h new file mode 100644 index 000000000..3659f476f --- /dev/null +++ b/eo/src/MGE/eoInitVirus.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInit.h +// (c) Maarten Keijzer 2000, GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInitVirus_H +#define _eoInitVirus_H + +#include + +#include +#include +#include +#include + +/** + Initializer for binary chromosome with MGE +*/ +template +class eoInitVirus: public eoInit< eoVirus > { +public: + + eoInitVirus(unsigned _combien, eoRndGenerator& _generator) + : combien(_combien), generator(_generator) {} + + virtual void operator()( eoVirus& chrom) + { + chrom.resize(combien); + chrom.virResize(combien); + std::generate(chrom.begin(), chrom.end(), generator); + for ( unsigned i = 0; i < combien; i ++ ) { + chrom.virusBitSet(i, generator() ); + } + chrom.invalidate(); + } + +private : + unsigned combien; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF generator; +}; + +#endif diff --git a/eo/src/MGE/eoVirus.h b/eo/src/MGE/eoVirus.h new file mode 100644 index 000000000..46e55c918 --- /dev/null +++ b/eo/src/MGE/eoVirus.h @@ -0,0 +1,112 @@ +/* + eoVirus.h + (c) GeNeura Team 2001, Marc Schoenauer 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/MGE/Attic/eoVirus.h,v 1.1 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $ +*/ + +#ifndef eoVirus_h +#define eoVirus_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // string + +#include + +/** +\defgroup bitstring + + Various functions for a bitstring representation +*/ + +/** eoBit: implementation of bitstring chromosome. +\class eoBit eoBit.h ga/eoBit.h +\ingroup bitstring + * based on STL's vector specialization. +*/ +template class eoVirus: public eoBit +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the binary string. + */ + eoVirus(unsigned _size = 0, bool _value = false, bool _virValue = false): + eoBit(_size, _value), virus( _size, _virValue) {} + + /// My class name. + virtual string className() const { + return "eoVirus"; + } + + /// Access to virus features + void virResize( unsigned _i ) { + virus.resize(_i ); + } + + /// Access to virus features + bool virusBit( unsigned _i ) const { + return virus[_i]; + } + + /// Change virus features + void virusBitSet( unsigned _i, bool _bit ) { + virus[_i ] = _bit; + } + + /** + * To print me on a stream. + * @param os The ostream. + */ + virtual void printOn(ostream& os) const { + EO::printOn(os); + os << ' '; + os << size() << ' '; + copy(begin(), end(), ostream_iterator(os)); + cout << endl; + copy(virus.begin(), virus.end(), ostream_iterator(os)); + } + + /** + * To read me from a stream. + * @param is The istream. + */ + virtual void readFrom(istream& is){ + eoBit::readFrom(is); + unsigned s; + is >> s; + string bits; + is >> bits; + if (is) { + virus.resize(bits.size()); + transform(bits.begin(), bits.end(), virus.begin(), + bind2nd(equal_to(), '1')); + } + } + private: + vector virus; +}; + +//----------------------------------------------------------------------------- + +#endif //eoBit_h diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 951c1c506..3e691280f 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -21,33 +21,9 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk + CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.13 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- -// MS 17/10/2000 -// Added the uniform crossover - which, for some reasons, had dissapeared! -// Added the eoDetBitFlip, which flips exactly num_bit bits -// Aslo added the above standard header - -// I also want to start the discussion about the "gene" crossover. -// I think the word "gene" is not appropriate: if real numbers are coded in -// binary format, then a "gene" is a bit, and that's it -// if you want to exchange real number per se, then use real coding -// -// Because all crossover operators here except that Gene crossover -// ARE generic, i.e. appky to any vertor of something. - -// Note that for mutations, if instead of -// chrom[i] = (chrom[i]) ? false : true; -// we were calling something like -// specific_mutate(chrom[i]) -// all mutation would also be generic ... except those eoBitNext and eoBitPrev - -// If anybody reads this and want to change that (I'm also testing to see -// if someone ever reads the headers :-), drop me a mail -// Marc (Marc.Schoenauer@polytechnique.fr) -//----------------------------------------------------------------------------- -// eoBitOp.h -//----------------------------------------------------------------------------- #ifndef eoBitOp_h #define eoBitOp_h diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 66899e8e1..ceac9a946 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,7 +13,7 @@ LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall ############################################################################### -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull @@ -39,6 +39,24 @@ t_eobin_LDADD = $(LDADDS) ############################################################################### +t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h +t_eoVirus_DEPENDENCIES = $(DEPS) +t_eoVirus_LDADD = $(LDADDS) + +############################################################################### + +t_MGE_SOURCES = t-MGE.cpp binary_value.h +t_MGE_DEPENDENCIES = $(DEPS) +t_MGE_LDADD = $(LDADDS) + +############################################################################### + +t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h +t_MGE_control_DEPENDENCIES = $(DEPS) +t_MGE_control_LDADD = $(LDADDS) + +############################################################################### + t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp t_eoStateAndParser_DEPENDENCIES = $(DEPS) t_eoStateAndParser_LDFLAGS = -lm diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp new file mode 100644 index 000000000..5e9fc58a6 --- /dev/null +++ b/eo/test/t-MGE-control.cpp @@ -0,0 +1,97 @@ +//----------------------------------------------------------------------------- +// t-eoMGE.cpp +//----------------------------------------------------------------------------- + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include +#include + +#include "binary_value.h" + +// Viri +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned POP_SIZE = 100, CHROM_SIZE = 16; + unsigned i; + eoBooleanGenerator gen; + + // the populations: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + + eoInitVirus random(CHROM_SIZE, gen); + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom; + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + + // selection + eoDetTournamentSelect lottery( 3) ; + + // breeder + eoOneBitFlip bf; + eoUBitXover xover; + eoProportionalOp propSel; + eoGeneralBreeder breeder( lottery, propSel ); + propSel.add(bf, 0.75); + propSel.add(xover, 0.25); + + // Replace a single one + eoPlusReplacement replace; + + // Terminators + eoGenContinue continuator1(50); + eoFitContinue continuator2(65535.f); + eoCombinedContinue continuator(continuator1, continuator2); + eoCheckPoint checkpoint(continuator); + eoStdoutMonitor monitor; + checkpoint.add(monitor); + eoSecondMomentStats stats; + monitor.add(stats); + checkpoint.add(stats); + + // GA generation + eoEasyEA ea(checkpoint, eval, breeder, replace ); + + // evolution + try + { + ea(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp new file mode 100644 index 000000000..21c1c57ff --- /dev/null +++ b/eo/test/t-MGE.cpp @@ -0,0 +1,101 @@ +//----------------------------------------------------------------------------- +// t-eoMGE.cpp +//----------------------------------------------------------------------------- + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include +#include + +#include "binary_value.h" + +// Viri +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned POP_SIZE = 100, CHROM_SIZE = 16; + unsigned i; + eoBooleanGenerator gen; + + // the populations: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + + eoInitVirus random(CHROM_SIZE, gen); + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom; + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + + // selection + eoDetTournamentSelect lottery( 3) ; + + // breeder + VirusMutation vm; + VirusTransmission vt; + VirusBitFlip vf; + eoUBitXover xover; + eoProportionalOp propSel; + eoGeneralBreeder breeder( lottery, propSel ); + propSel.add(vm, 0.25); + propSel.add(vf, 0.25); + propSel.add(vt, 0.25); + propSel.add(xover, 0.25); + + // Replace a single one + eoPlusReplacement replace; + + // Terminators + eoGenContinue continuator1(50); + eoFitContinue continuator2(65535.f); + eoCombinedContinue continuator(continuator1, continuator2); + eoCheckPoint checkpoint(continuator); + eoStdoutMonitor monitor; + checkpoint.add(monitor); + eoSecondMomentStats stats; + monitor.add(stats); + checkpoint.add(stats); + + // GA generation + eoEasyEA ea(checkpoint, eval, breeder, replace ); + + // evolution + try + { + ea(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + return 0; +} + +//----------------------------------------------------------------------------- From 34cb430bd7fa2185cedb4674d496b1b5b698aecd Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 11 May 2001 10:44:01 +0000 Subject: [PATCH 0595/2134] Added Royal Road, MGE now work with it, small modifications to eoPopStat --- eo/src/utils/eoPopStat.h | 11 ++++++-- eo/test/RoyalRoad.h | 60 ++++++++++++++++++++++++++++++++++++++++ eo/test/t-MGE.cpp | 30 ++++++++++---------- 3 files changed, 84 insertions(+), 17 deletions(-) create mode 100644 eo/test/RoyalRoad.h diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 23708e170..8907ded7d 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -53,8 +53,10 @@ class eoPopStat : public eoStat public : /** default Ctor, void string by default, as it appears on the description line once at beginning of evolution. and - is meaningless there */ - eoPopStat(string _desc ="") : eoStat("", _desc) {} + is meaningless there. _howMany defaults to 0, that is, the whole + population*/ + eoPopStat(unsigned _howMany = 0, string _desc ="") + : eoStat("", _desc), combien( _howMany) {} /** Fills the value() of the eoParam with the dump of the population. Adds a \n before so it does not get mixed up with the rest of the stats @@ -64,7 +66,8 @@ void operator()(const eoPop& _pop) { char buffer[1023]; // about one K of space per member value() = "\n====== Pop dump =====\n"; - for (unsigned i = 0; i < _pop.size(); ++i) + unsigned howMany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howMany; ++i) { std::ostrstream os(buffer, 1022); // leave space for emergency terminate os << _pop[i] << endl << ends; @@ -74,6 +77,8 @@ void operator()(const eoPop& _pop) value() += buffer; } } +private: + unsigned combien; }; /** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats. diff --git a/eo/test/RoyalRoad.h b/eo/test/RoyalRoad.h new file mode 100644 index 000000000..35b217b94 --- /dev/null +++ b/eo/test/RoyalRoad.h @@ -0,0 +1,60 @@ +/* + RoyalRoad.h + -- Implementation of the Royal Road function for any length and block size + (c) GeNeura Team 2001, Marc Schoenauer 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +CVS Info: $Date: 2001-05-11 10:44:01 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.1 2001-05-11 10:44:01 jmerelo Exp $ $Author: jmerelo $ +*/ + +#ifndef RoyalRoad_h +#define RoyalRoad_h + +template +class RoyalRoad: public eoEvalFunc { + + public: + + typedef typename EOT::Fitness FitT; + + /// Ctor: takes a length, and divides that length in equal parts + RoyalRoad( unsigned _div ): eoEvalFunc(), div( _div ) {}; + + // Applies the function + virtual void operator() ( EOT & _eo ) { + FitT fitness; + if (_eo.invalid()) { + for ( unsigned i = 0; i < _eo.size()/div; i ++ ) { + bool block = true; + for ( unsigned j = 0; j < div; j ++ ) { + block &= _eo[i*div+j]; + } + if (block) { + fitness += div; + } + _eo.fitness( fitness ); + } + } + }; + + private: + unsigned div; + +}; + +#endif diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 21c1c57ff..0ddfd72ba 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -10,7 +10,7 @@ #include #include -#include "binary_value.h" +#include "RoyalRoad.h" // Viri #include @@ -25,21 +25,21 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 100, CHROM_SIZE = 16; + const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; unsigned i; eoBooleanGenerator gen; // the populations: eoPop pop; - // Evaluation - eoEvalFuncPtr eval( binary_value ); + // Evaluation + RoyalRoad rr( 4 ); eoInitVirus random(CHROM_SIZE, gen); for (i = 0; i < POP_SIZE; ++i) { Chrom chrom; random(chrom); - eval(chrom); + rr(chrom); pop.push_back(chrom); } @@ -49,7 +49,7 @@ int main() // selection - eoDetTournamentSelect lottery( 3) ; + eoStochTournamentSelect lottery(0.9 ); // breeder VirusMutation vm; @@ -58,27 +58,29 @@ int main() eoUBitXover xover; eoProportionalOp propSel; eoGeneralBreeder breeder( lottery, propSel ); - propSel.add(vm, 0.25); - propSel.add(vf, 0.25); - propSel.add(vt, 0.25); - propSel.add(xover, 0.25); + propSel.add(vm, 0.4); + propSel.add(vf, 0.4); + propSel.add(vt, 0.1); + propSel.add(xover, 0.1); // Replace a single one - eoPlusReplacement replace; + eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(50); - eoFitContinue continuator2(65535.f); + eoGenContinue continuator1(500); + eoFitContinue continuator2(128); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; checkpoint.add(monitor); eoSecondMomentStats stats; + eoPopStat dumper( 10 ); monitor.add(stats); + checkpoint.add(dumper); checkpoint.add(stats); // GA generation - eoEasyEA ea(checkpoint, eval, breeder, replace ); + eoEasyEA ea(checkpoint, rr, breeder, replace ); // evolution try From e32c52d332a650a692192adf1b3029dfc87eaab5 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 17 May 2001 07:29:50 +0000 Subject: [PATCH 0596/2134] Added missing files and updated old MGE files --- eo/test/RoyalRoad.h | 4 +- eo/test/t-MGE-control.cpp | 31 +++++++++------- eo/test/t-MGE.cpp | 19 +++++----- eo/test/t-eoVirus.cpp | 77 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 25 deletions(-) create mode 100644 eo/test/t-eoVirus.cpp diff --git a/eo/test/RoyalRoad.h b/eo/test/RoyalRoad.h index 35b217b94..3781d1feb 100644 --- a/eo/test/RoyalRoad.h +++ b/eo/test/RoyalRoad.h @@ -19,7 +19,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-05-11 10:44:01 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.1 2001-05-11 10:44:01 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2001-05-17 07:29:50 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.2 2001-05-17 07:29:50 jmerelo Exp $ $Author: jmerelo $ */ #ifndef RoyalRoad_h @@ -37,7 +37,7 @@ class RoyalRoad: public eoEvalFunc { // Applies the function virtual void operator() ( EOT & _eo ) { - FitT fitness; + FitT fitness = 0; if (_eo.invalid()) { for ( unsigned i = 0; i < _eo.size()/div; i ++ ) { bool block = true; diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index 5e9fc58a6..61f3af612 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -10,7 +10,7 @@ #include #include -#include "binary_value.h" +#include "RoyalRoad.h" // Viri #include @@ -25,16 +25,17 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 100, CHROM_SIZE = 16; + const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; unsigned i; eoBooleanGenerator gen; // the populations: eoPop pop; - // Evaluation - eoEvalFuncPtr eval( binary_value ); - + // Evaluation + RoyalRoad rr( 4 ); + eoEvalFuncCounter eval( rr ); + eoInitVirus random(CHROM_SIZE, gen); for (i = 0; i < POP_SIZE; ++i) { Chrom chrom; @@ -46,31 +47,32 @@ int main() cout << "population:" << endl; for (i = 0; i < pop.size(); ++i) cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - // selection - eoDetTournamentSelect lottery( 3) ; + eoStochTournamentSelect lottery(0.9 ); // breeder - eoOneBitFlip bf; + eoOneBitFlip vm; eoUBitXover xover; eoProportionalOp propSel; eoGeneralBreeder breeder( lottery, propSel ); - propSel.add(bf, 0.75); - propSel.add(xover, 0.25); + propSel.add(vm, 0.8); + propSel.add(xover, 0.1); // Replace a single one - eoPlusReplacement replace; + eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(50); - eoFitContinue continuator2(65535.f); + eoGenContinue continuator1(500); + eoFitContinue continuator2(128); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; checkpoint.add(monitor); eoSecondMomentStats stats; + eoPopStat dumper( 10 ); monitor.add(stats); + checkpoint.add(dumper); checkpoint.add(stats); // GA generation @@ -90,7 +92,8 @@ int main() cout << "pop" << endl; for (i = 0; i < pop.size(); ++i) cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - + + cout << "\n --> Number of Evaluations = " << eval.getValue() << endl; return 0; } diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 0ddfd72ba..112ca3282 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -33,20 +33,20 @@ int main() eoPop pop; // Evaluation - RoyalRoad rr( 4 ); - + RoyalRoad rr( 4 ); + eoEvalFuncCounter eval( rr ); + eoInitVirus random(CHROM_SIZE, gen); for (i = 0; i < POP_SIZE; ++i) { Chrom chrom; random(chrom); - rr(chrom); + eval(chrom); pop.push_back(chrom); } cout << "population:" << endl; for (i = 0; i < pop.size(); ++i) cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - // selection eoStochTournamentSelect lottery(0.9 ); @@ -58,9 +58,9 @@ int main() eoUBitXover xover; eoProportionalOp propSel; eoGeneralBreeder breeder( lottery, propSel ); - propSel.add(vm, 0.4); - propSel.add(vf, 0.4); - propSel.add(vt, 0.1); + propSel.add(vm, 0.8); + propSel.add(vf, 0.05); + propSel.add(vt, 0.05); propSel.add(xover, 0.1); // Replace a single one @@ -80,7 +80,7 @@ int main() checkpoint.add(stats); // GA generation - eoEasyEA ea(checkpoint, rr, breeder, replace ); + eoEasyEA ea(checkpoint, eval, breeder, replace ); // evolution try @@ -96,7 +96,8 @@ int main() cout << "pop" << endl; for (i = 0; i < pop.size(); ++i) cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; - + + cout << "\n --> Number of Evaluations = " << eval.getValue() << endl; return 0; } diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp new file mode 100644 index 000000000..65b39bdca --- /dev/null +++ b/eo/test/t-eoVirus.cpp @@ -0,0 +1,77 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoVirus.cpp + This program tests the the binary cromosomes and several genetic operators + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // general EO +#include // bitstring representation & operators +#include +#include + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned SIZE = 8; + eoBooleanGenerator gen; + eo::rng.reseed( time( 0 ) ); + + Chrom chrom(SIZE), chrom2(SIZE); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); + cout << chrom << endl; + cout << chrom2 << endl; + + // Virus Mutation + VirusBitFlip vf; + unsigned i; + for ( i = 0; i < 10; i++ ) { + vf( chrom ); + cout << chrom << endl; + } + + // Chrom Mutation + cout << "Chrom mutation--------" << endl; + VirusMutation vm; + for ( i = 0; i < 10; i++ ) { + vm( chrom ); + cout << chrom << endl; + } + + // Chrom Transmision + cout << "Chrom transmission--------" << endl; + VirusTransmission vt; + vt( chrom2, chrom ); + cout << chrom2 << endl; + + return 0; + +} + From 17dc4f9d105bf0537736c9ce64c9fd50129d6056 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 17 May 2001 10:08:25 +0000 Subject: [PATCH 0597/2134] Changed MGE to the contrib dir. No need to change the prefix, I guess --- eo/{src => contrib}/MGE/VirusOp.h | 46 ++++++++++++++++++++++++--- eo/{src => contrib}/MGE/eoInitVirus.h | 24 +++++++++++++- eo/{src => contrib}/MGE/eoVirus.h | 2 +- eo/test/Makefile.am | 11 +++++-- eo/test/t-MGE-control.cpp | 6 ++-- eo/test/t-MGE.cpp | 6 ++-- 6 files changed, 81 insertions(+), 14 deletions(-) rename eo/{src => contrib}/MGE/VirusOp.h (73%) rename eo/{src => contrib}/MGE/eoInitVirus.h (76%) rename eo/{src => contrib}/MGE/eoVirus.h (94%) diff --git a/eo/src/MGE/VirusOp.h b/eo/contrib/MGE/VirusOp.h similarity index 73% rename from eo/src/MGE/VirusOp.h rename to eo/contrib/MGE/VirusOp.h index 73038aa7f..246fdad34 100644 --- a/eo/src/MGE/VirusOp.h +++ b/eo/contrib/MGE/VirusOp.h @@ -18,7 +18,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/MGE/Attic/VirusOp.h,v 1.1 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2001-05-17 10:08:25 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/VirusOp.h,v 1.1 2001-05-17 10:08:25 jmerelo Exp $ $Author: jmerelo $ */ #ifndef VirusOp_h @@ -33,9 +33,7 @@ CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs #include #include -/** eoBitFlip --> changes 1 bit -\class eoBitBitFlip eoBitOp.h ga/eoBitOp.h -\ingroup bitstring +/** VirusBitFlip --> changes 1 bit */ template @@ -83,6 +81,46 @@ class VirusMutation: public eoMonOp > { } }; +/// Works for 1-bit virus; shifts the one to the right or left +template +class VirusShiftMutation: public eoMonOp > { + public: + + /// Ctor + VirusShiftMutation( ) {}; + + /// The class name. + virtual string className() const { return "VirusShiftMutation"; }; + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(eoVirus& _chrom) { + // Search for virus bits + eoBooleanGenerator gen; + for ( unsigned i = 0; i < _chrom.size(); i ++ ) { + if ( _chrom.virusBit(i) ) { + if ( gen() ) { + if ( i + 1 < _chrom.size() ) { + _chrom.virusBitSet(i+1,true); + _chrom.virusBitSet(i, false); + } + } else { + if ( i - 1 > 0 ) { + _chrom.virusBitSet(i-1,true); + _chrom.virusBitSet(i, false); + } + } + } + } + return true; + } + + private: +}; + + template class VirusTransmission: public eoBinOp > { public: diff --git a/eo/src/MGE/eoInitVirus.h b/eo/contrib/MGE/eoInitVirus.h similarity index 76% rename from eo/src/MGE/eoInitVirus.h rename to eo/contrib/MGE/eoInitVirus.h index 3659f476f..082339c81 100644 --- a/eo/src/MGE/eoInitVirus.h +++ b/eo/contrib/MGE/eoInitVirus.h @@ -41,7 +41,7 @@ template class eoInitVirus: public eoInit< eoVirus > { public: - eoInitVirus(unsigned _combien, eoRndGenerator& _generator) + eoInitVirus(unsigned _combien, eoRndGenerator& _generator ) : combien(_combien), generator(_generator) {} virtual void operator()( eoVirus& chrom) @@ -61,4 +61,26 @@ private : eoSTLF generator; }; +/// Inits the virus with one bit to the left set to one +template +class eoInitVirus1bit: public eoInit< eoVirus > { +public: + + eoInitVirus1bit(unsigned _combien, eoRndGenerator& _generator ) + : combien(_combien), generator(_generator) {} + + virtual void operator()( eoVirus& chrom) + { + chrom.resize(combien); + chrom.virResize(combien); + std::generate(chrom.begin(), chrom.end(), generator); + chrom.virusBitSet(0, true ); + chrom.invalidate(); + } + +private : + unsigned combien; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF generator; +}; #endif diff --git a/eo/src/MGE/eoVirus.h b/eo/contrib/MGE/eoVirus.h similarity index 94% rename from eo/src/MGE/eoVirus.h rename to eo/contrib/MGE/eoVirus.h index 46e55c918..d49af26cf 100644 --- a/eo/src/MGE/eoVirus.h +++ b/eo/contrib/MGE/eoVirus.h @@ -18,7 +18,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/MGE/Attic/eoVirus.h,v 1.1 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2001-05-17 10:08:25 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/eoVirus.h,v 1.1 2001-05-17 10:08:25 jmerelo Exp $ $Author: jmerelo $ */ #ifndef eoVirus_h diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index ceac9a946..db51f6f08 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -8,12 +8,13 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/contrib LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall ############################################################################### -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus\ + t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness # removing temporarily t-eoESFull @@ -45,6 +46,12 @@ t_eoVirus_LDADD = $(LDADDS) ############################################################################### +t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h +t_MGE1bit_DEPENDENCIES = $(DEPS) +t_MGE1bit_LDADD = $(LDADDS) + +############################################################################### + t_MGE_SOURCES = t-MGE.cpp binary_value.h t_MGE_DEPENDENCIES = $(DEPS) t_MGE_LDADD = $(LDADDS) diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index 61f3af612..4f74adb90 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -33,7 +33,7 @@ int main() eoPop pop; // Evaluation - RoyalRoad rr( 4 ); + RoyalRoad rr( 8 ); eoEvalFuncCounter eval( rr ); eoInitVirus random(CHROM_SIZE, gen); @@ -56,8 +56,8 @@ int main() eoUBitXover xover; eoProportionalOp propSel; eoGeneralBreeder breeder( lottery, propSel ); - propSel.add(vm, 0.8); - propSel.add(xover, 0.1); + propSel.add(vm, 0.2); + propSel.add(xover, 0.8); // Replace a single one eoCommaReplacement replace; diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 112ca3282..0af943564 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -33,7 +33,7 @@ int main() eoPop pop; // Evaluation - RoyalRoad rr( 4 ); + RoyalRoad rr( 8 ); eoEvalFuncCounter eval( rr ); eoInitVirus random(CHROM_SIZE, gen); @@ -58,10 +58,10 @@ int main() eoUBitXover xover; eoProportionalOp propSel; eoGeneralBreeder breeder( lottery, propSel ); - propSel.add(vm, 0.8); + propSel.add(vm, 0.1); propSel.add(vf, 0.05); propSel.add(vt, 0.05); - propSel.add(xover, 0.1); + propSel.add(xover, 0.8); // Replace a single one eoCommaReplacement replace; From 0286faed1b400720ad1aad8ec6f6530927964c9a Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 18 May 2001 03:59:22 +0000 Subject: [PATCH 0598/2134] Removed remaining debugging comment --- eo/src/utils/eoRealBounds.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 53d788012..5734c6f54 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -81,7 +81,6 @@ void eoRealVectorBounds::readFrom(std::string _value) break; // look for opening char size_t posDeb = _value.find_first_of("[("); - cout << posDeb << endl; if (posDeb >= _value.size()) // nothing left to read (though probably a syntax error there) { break; From 422ddc6f5f2e9858615f35b075af82235220ed48 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Fri, 18 May 2001 07:33:12 +0000 Subject: [PATCH 0599/2134] Added the missing file --- eo/test/t-MGE1bit.cpp | 104 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 eo/test/t-MGE1bit.cpp diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp new file mode 100644 index 000000000..8376831ac --- /dev/null +++ b/eo/test/t-MGE1bit.cpp @@ -0,0 +1,104 @@ +//----------------------------------------------------------------------------- +// t-eoMGE.cpp +//----------------------------------------------------------------------------- + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include +#include + +#include "RoyalRoad.h" + +// Viri +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + unsigned i; + eoBooleanGenerator gen; + + // the populations: + eoPop pop; + + // Evaluation + RoyalRoad rr( 8 ); + eoEvalFuncCounter eval( rr ); + + eoInitVirus1bit random(CHROM_SIZE, gen); + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom; + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + cout << "population:" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + // selection + eoStochTournamentSelect lottery(0.9 ); + + // breeder + VirusShiftMutation vm; + VirusTransmission vt; + VirusBitFlip vf; + eoUBitXover xover; + eoProportionalOp propSel; + eoGeneralBreeder breeder( lottery, propSel ); + propSel.add(vm, 0.8); + propSel.add(vf, 0.05); + propSel.add(vt, 0.05); + propSel.add(xover, 0.1); + + // Replace a single one + eoCommaReplacement replace; + + // Terminators + eoGenContinue continuator1(500); + eoFitContinue continuator2(128); + eoCombinedContinue continuator(continuator1, continuator2); + eoCheckPoint checkpoint(continuator); + eoStdoutMonitor monitor; + checkpoint.add(monitor); + eoSecondMomentStats stats; + eoPopStat dumper( 10 ); + monitor.add(stats); + checkpoint.add(dumper); + checkpoint.add(stats); + + // GA generation + eoEasyEA ea(checkpoint, eval, breeder, replace ); + + // evolution + try + { + ea(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + cout << "pop" << endl; + for (i = 0; i < pop.size(); ++i) + cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + + cout << "\n --> Number of Evaluations = " << eval.getValue() << endl; + return 0; +} + +//----------------------------------------------------------------------------- From 8e5e9d14cf56086b2e5cd329c76bed2fa6303344 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 18 May 2001 17:46:33 +0000 Subject: [PATCH 0600/2134] Coreected a cut-and-paste bug :-( --- eo/src/do/make_algo_scalar.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 43cac86f8..0ea9d1732 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -94,15 +94,12 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e } else if (ppSelect.first == string("Sequential")) // one after the other { + bool b; if (ppSelect.second.size() == 0) // no argument -> default = ordered - select = new eoSequentialSelect; + b=true; else - { - bool b; - istrstream is(ppSelect.second[0].c_str()); - is >> b; - select = new eoStochTournamentSelect(b); - } + b = !(ppSelect.second[0] == string("unordered")); + select = new eoSequentialSelect(b); } else if (ppSelect.first == string("Roulette")) // no argument (yet) { From 9631c9eb118ebe607ecfaf59f166b6f52876c2e8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 19 May 2001 06:15:01 +0000 Subject: [PATCH 0601/2134] Changed name of eoEsLocalXover to eoEsStandardXover and made it an eoBinOp Removed obsolete eoEsStdevXOver.h (see eoEsStandardXover.h above) --- .../{eoEsLocalXover.h => eoEsStandardXover.h} | 32 +++----- eo/src/es/eoEsStdevXOver.h | 80 ------------------- 2 files changed, 11 insertions(+), 101 deletions(-) rename eo/src/es/{eoEsLocalXover.h => eoEsStandardXover.h} (75%) delete mode 100644 eo/src/es/eoEsStdevXOver.h diff --git a/eo/src/es/eoEsLocalXover.h b/eo/src/es/eoEsStandardXover.h similarity index 75% rename from eo/src/es/eoEsLocalXover.h rename to eo/src/es/eoEsStandardXover.h index bcf1c8559..df7c23741 100644 --- a/eo/src/es/eoEsLocalXover.h +++ b/eo/src/es/eoEsStandardXover.h @@ -36,13 +36,14 @@ // needs a selector - here random #include -/** Local (i.e. std eoBinOp) crossover operator for ES genotypes. +/** Standard (i.e. eoBinOp) crossover operator for ES genotypes. * Uses some Atom crossovers to handle both the object variables * and the mutation strategy parameters - * It is an eoGenOp and not an eoBinOp for consistency with the global version + * It is an eoBinOp and has to be wrapped into an eoGenOp before being used + * like the global version */ template -class eoEsLocalXover: public eoGenOp +class eoEsStandardXover: public eoBinOp { public: typedef typename EOT::Fitness FitT; @@ -50,36 +51,25 @@ public: /** * (Default) Constructor. */ - eoEsLocalXover(eoBinOp & _crossObj, eoBinOp & _crossMut) : + eoEsStandardXover(eoBinOp & _crossObj, eoBinOp & _crossMut) : crossObj(_crossObj), crossMut(_crossMut) {} /// The class name. Used to display statistics - virtual string className() const { return "eoEsLocalXover"; } - - /// The TOTAL number of offspring (here = nb of parents modified in place) - unsigned max_production(void) { return 1; } + virtual string className() const { return "eoEsStandardXover"; } /** * modifies one parents in the populator * using a second parent - * - * @param _pop a POPULATOR (not a simple population) */ - void apply(eoPopulator& _plop) - { - // First, select as many parents as you will have offspring - EOT& parent1 = *_plop; // select the first parent - const EOT& parent2 = sel(_plop.source()); // and the second, randomly - + bool operator()(EOT& _eo1, const EOT& _eo2) + { // first, the object variables - for (unsigned i=0; i -#include - -/** -\ingroup EvolutionStrategies - -Crossover for Evolutionary strategie style representation, - supporting co-evolving standard deviations. - -Simply calls a crossover for the object variables, - and a crossover for teh StdDev -*/ - -template -class eoEsStdevXOver : public eoQuadOp -{ -public : - eoEsStdevXOver(eoQuadOp > & _objectXOver, - eoQuadOp > & _stdDevXOver) : - objectXOver(_objectXOver), stdDevXOver(_stdDevXOver) {} - - virtual std::string className(void) const { return "eoEsStdevXOver"; } - - bool operator()(EOT & _eo1, EOT & _eo2) - { - bool objectChanged = objectXOver(_eo1, _eo2); // as vector - bool stdDevChanged = stdDevXOver(_eo1.stdevs, _eo2.stdevs); - - return objectChanged; - } - -private: - eoQuadOp > & objectXOver; - eoQuadOp > & stdDevXOver; -}; - -/* A question: it seems it really makes no difference to have - as template the fitness (and use eoEsStdev where you need EOs) or - directly the EOT itself. But of course if the EOT you use does not have - a stdev public member the compiler will crash. - There is a difference, however, in the calling instruction, because in - on case you have to write eoEsStdevXOver whereas otherwise you - simply write eoEsStdevXOver (if Indi has been typedef'ed correctly). - So to keep everything (or almost :-) in the main program templatized - with the Indi i've kept here the EOT template. - -Are there arguments against that??? -MS - Marc.Schoenauer@polytechnique.fr -*/ - -#endif From d9ddfeeaea3cdb410888f5c13ad1f90606e122c7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 04:10:55 +0000 Subject: [PATCH 0602/2134] Normalized real_value --- eo/test/real_value.h | 2 +- eo/test/t-eoESAll.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/real_value.h b/eo/test/real_value.h index 8f3a0df59..8bedd6b9d 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -12,7 +12,7 @@ double real_value(const std::vector& _ind) double sum = 0; for (unsigned i = 0; i < _ind.size(); i++) sum += _ind[i] * _ind[i]; - return sqrt(sum); + return sum/_ind.size(); } diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index f673eaf78..adf2aace4 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -2,7 +2,7 @@ #ifdef _MSC_VER #pragma warning(disable:4786) -#endif +#endif #include #include From 8b177dd6cd3d4d27631d3bcce2af0522590a4f3d Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 04:13:10 +0000 Subject: [PATCH 0603/2134] Added the crossover in make_op_es (parameters were read, but that's all! --- eo/src/es/Makefile.am | 2 +- eo/src/es/eoEsStandardXover.h | 24 ++++++++----- eo/src/es/eoRealAtomXover.h | 12 +++---- eo/src/es/eoRealOp.h | 65 +++++++++++++++++++++++------------ eo/src/es/make_op_es.h | 35 ++++++++++++------- eo/src/es/make_op_real.h | 9 +++-- 6 files changed, 91 insertions(+), 56 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index bef3f5880..9b3882662 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -16,4 +16,4 @@ libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ CPPFLAGS = -Wall CXXFLAGS = libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoEsStdevXOver.h eoGenericRealOp.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsLocalXover.h eoRealAtomXover.h +libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsStandardXover.h eoRealAtomXover.h diff --git a/eo/src/es/eoEsStandardXover.h b/eo/src/es/eoEsStandardXover.h index df7c23741..d360d9531 100644 --- a/eo/src/es/eoEsStandardXover.h +++ b/eo/src/es/eoEsStandardXover.h @@ -63,45 +63,51 @@ public: */ bool operator()(EOT& _eo1, const EOT& _eo2) { + bool bLoc=false; // first, the object variables for (unsigned i=0; i<_eo1.size(); i++) { - crossObj(_eo1[i], _eo2[i]); // apply eoBinOp + bLoc |= crossObj(_eo1[i], _eo2[i]); // apply eoBinOp } // then the self-adaptation parameters - cross_self_adapt(_eo1, _eo2); + bLoc |= cross_self_adapt(_eo1, _eo2); + return bLoc; } private: // the method to cross slef-adaptation parameters: need to specialize - void cross_self_adapt(eoEsSimple & _parent1, const eoEsSimple & _parent2) + bool cross_self_adapt(eoEsSimple & _parent1, const eoEsSimple & _parent2) { - crossMut(_parent1.stdev, _parent2.stdev); // apply eoBinOp + return crossMut(_parent1.stdev, _parent2.stdev); // apply eoBinOp } - void cross_self_adapt(eoEsStdev & _parent1, const eoEsStdev & _parent2) + bool cross_self_adapt(eoEsStdev & _parent1, const eoEsStdev & _parent2) { + bool bLoc=false; for (unsigned i=0; i<_parent1.size(); i++) { - crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp } + return bLoc; } - void cross_self_adapt(eoEsFull & _parent1, const eoEsFull & _parent2) + bool cross_self_adapt(eoEsFull & _parent1, const eoEsFull & _parent2) { + bool bLoc=false; unsigned i; // the StDev for (i=0; i<_parent1.size(); i++) { - crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp } // the roataion angles for (i=0; i<_parent1.correlations.size(); i++) { - crossMut(_parent1.correlations[i], _parent2.correlations[i]); // apply eoBinOp + bLoc |= crossMut(_parent1.correlations[i], _parent2.correlations[i]); // apply eoBinOp } + return bLoc; } diff --git a/eo/src/es/eoRealAtomXover.h b/eo/src/es/eoRealAtomXover.h index 82448d98b..91d7520eb 100644 --- a/eo/src/es/eoRealAtomXover.h +++ b/eo/src/es/eoRealAtomXover.h @@ -38,16 +38,16 @@ /** Discrete crossover == exchange of values */ -class eoRealAtomExchange: public eoBinOp +class eoDoubleExchange: public eoBinOp { public: /** * (Default) Constructor. */ - eoRealAtomExchange() {} + eoDoubleExchange() {} /// The class name. Used to display statistics - virtual string className() const { return "eoRealAtomExchange"; } + virtual string className() const { return "eoDoubleExchange"; } /** Exchanges or not the values @@ -68,16 +68,16 @@ public: /** Intermediate crossover == linear combination */ -class eoRealIntermediate: public eoBinOp +class eoDoubleIntermediate: public eoBinOp { public: /** * (Default) Constructor. */ - eoRealIntermediate() {} + eoDoubleIntermediate() {} /// The class name. Used to display statistics - virtual string className() const { return "eoRealIntermediate"; } + virtual string className() const { return "eoDoubleIntermediate"; } /** Linear combination of both parents diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 9125b28a7..1f7ee14dc 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -301,12 +301,12 @@ template class eoSegmentCrossover: public eoQuadOp if (bounds.isMinBounded(i)) { alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); - alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); } if (bounds.isMaxBounded(i)) { alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); - alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); } } } @@ -380,46 +380,67 @@ template class eoHypercubeCrossover: public eoQuadOp */ bool operator()(EOT& _eo1, EOT& _eo2) { + bool hasChanged = false; unsigned i; double r1, r2, fact; if (alpha == 0.0) // no check to perform for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) - _eo1[i] = fact * r1 + (1-fact) * r2; - _eo2[i] = (1-fact) * r1 + fact * r2; - } - else // check the bounds + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise do nothing + fact = rng.uniform(range); // in [0,1) + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + hasChanged = true; // forget (im)possible alpha=0 + } + } + else // check the bounds + // do not try to get a bound on the linear factor, but rather + // on the object variables themselves for (i=0; i<_eo1.size(); i++) { r1=_eo1[i]; r2=_eo2[i]; - if (r1 != r2) { // otherwise you'll get NAN's + if (r1 != r2) { // otherwise do nothing double rmin = min(r1, r2); double rmax = max(r1, r2); - double length = rmax - rmin; - double alphaMin = -alpha; - double alphaMax = 1+alpha; + + // compute min and max for object variables + double objMin = -alpha * rmax + (1+alpha) * rmin; + double objMax = -alpha * rmin + (1+alpha) * rmax; + // first find the limits on the alpha's if (bounds.isMinBounded(i)) { - alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); - alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + objMin = max(objMin, bounds.minimum(i)); } if (bounds.isMaxBounded(i)) { - alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); - alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + objMax = min(objMax, bounds.maximum(i)); } - fact = alphaMin + rng.uniform(alphaMax-alphaMin); - _eo1[i] = fact * rmin + (1-fact) * rmax; - _eo2[i] = (1-fact) * rmin + fact * rmax; + // then draw variables + double median = (objMin+objMax)/2.0; // uniform within bounds + // double median = (rmin+rmax)/2.0; // Bounce on bounds + double valMin = objMin + (median-objMin)*rng.uniform(); + double valMax = median + (objMax-median)*rng.uniform(); + // don't always put large value in _eo1 - or what? + if (rng.flip(0.5)) + { + _eo1[i] = valMin; + _eo2[i] = valMax; + } + else + { + _eo1[i] = valMax; + _eo2[i] = valMin; + } + // seomthing has changed + hasChanged = true; // forget (im)possible alpha=0 } } - return true; + return hasChanged; } protected: diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index 846ac9e3c..91274a24b 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -42,7 +42,7 @@ #include #include #include -#include +#include // also need the parser and param includes #include #include @@ -108,27 +108,32 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni // The pointers: first the atom Xover eoBinOp *ptObjAtomCross = NULL; eoBinOp *ptStdevAtomCross = NULL; - // then the global one + // then the EOT-level one (need to be an eoGenOp as global Xover is eoGenOp *ptCross; // check for the atom Xovers if (crossObjParam.value() == string("discrete")) - ptObjAtomCross = new eoRealAtomExchange; + ptObjAtomCross = new eoDoubleExchange; else if (crossObjParam.value() == string("intermediate")) - ptObjAtomCross = new eoRealAtomExchange; + ptObjAtomCross = new eoDoubleIntermediate; else throw runtime_error("Invalid Object variable crossover type"); if (crossStdevParam.value() == string("discrete")) - ptStdevAtomCross = new eoRealAtomExchange; + ptStdevAtomCross = new eoDoubleExchange; else if (crossStdevParam.value() == string("intermediate")) - ptStdevAtomCross = new eoRealAtomExchange; + ptStdevAtomCross = new eoDoubleIntermediate; else throw runtime_error("Invalid mutation strategy parameter crossover type"); // and build the indi Xover if (crossTypeParam.value() == string("global")) ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); else if (crossTypeParam.value() == string("standard")) - ptCross = new eoEsLocalXover(*ptObjAtomCross, *ptStdevAtomCross); + { // using a standard eoBinOp, but wrap it into an eoGenOp + eoBinOp & crossTmp = _state.storeFunctor( + new eoEsStandardXover(*ptObjAtomCross, *ptStdevAtomCross) + ); + ptCross = new eoBinGenOp(crossTmp); + } else throw runtime_error("Invalide Object variable crossover type"); // now that everything is OK, DON'T FORGET TO STORE MEMORY @@ -143,14 +148,18 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni // Proxy for the mutation parameters eoEsMutationInit mutateInit(_parser, "Variation Operators"); - eoEsMutate * ptMon = new eoEsMutate(mutateInit, boundsParam.value()); - _state.storeFunctor(ptMon); + eoEsMutate & mut = _state.storeFunctor( + new eoEsMutate(mutateInit, boundsParam.value())); - // encapsulate into an eoGenop - eoMonGenOp * op = new eoMonGenOp(*ptMon); - _state.storeFunctor(op); + // now the general op - a sequential application of crossover and mutatation + // no need to first have crossover combined with a clone as it is an + // eoBinOp and not an eoQuadOp as in SGA paradigm + + eoSequentialOp & op = _state.storeFunctor(new eoSequentialOp); + op.add(*ptCross, pCrossParam.value()); + op.add(mut, pMutParam.value()); // that's it! - return *op; + return op; } #endif diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 75aa85699..c88357172 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -232,12 +232,11 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator // now the sequential - eoSequentialOp *op = new eoSequentialOp; - _state.storeFunctor(op); - op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross - op->add(*ptCombinedMonOp, pMutParam.value()); + eoSequentialOp & op = _state.storeFunctor(new eoSequentialOp); + op.add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op.add(*ptCombinedMonOp, pMutParam.value()); // that's it! - return *op; + return op; } #endif From 91342e7080ecaea80ca8c00cf5ed483942f3bfd0 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 04:14:36 +0000 Subject: [PATCH 0604/2134] Modifs in es (crossover added in make_op_es). Added a dummy selector in eoReandomSelect that does work even with invalid EOs --- eo/src/eoRandomSelect.h | 26 ++++++++++++++++++++++++++ eo/src/es.h | 5 +---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index c73c6dd83..ada1ac53f 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -112,5 +112,31 @@ private: vector eoPters; }; +//----------------------------------------------------------------------------- +/** eoNoSelect: returns all individual in order WITHOUT USING FITNESS!!! + * looping back to the beginning when exhasuted + * + */ +//----------------------------------------------------------------------------- + +template class eoNoSelect: public eoSelectOne +{ + public: + /** Ctor + */ + eoNoSelect(): current(0) {} + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + current=0; + + current++; + return _pop[current-1] ; + } +private: + unsigned current; +}; + #endif eoRandomSelect_h diff --git a/eo/src/es.h b/eo/src/es.h index e4b25a09b..360f48e75 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -49,15 +49,12 @@ #include #include // for generic operators #include // Global ES Xover -#include // Local ES Xover +#include // 2-parents ES Xover // the ES-mutations #include #include -// the crossover - to be continued -#include - #endif _es_h // Local Variables: From af73dfbd45ad1391db2af061d8d1bf175da99d7f Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 04:15:36 +0000 Subject: [PATCH 0605/2134] Added libes in Makefile --- eo/tutorial/Lesson4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile index 628c7222d..9a02e0713 100644 --- a/eo/tutorial/Lesson4/Makefile +++ b/eo/tutorial/Lesson4/Makefile @@ -1,4 +1,4 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp From b72a85fa1bedd11ab8c575d030b2c059a7061911 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 04:16:26 +0000 Subject: [PATCH 0606/2134] ? --- eo/src/es/eoGenericRealOp.h | 422 ------------------------------------ 1 file changed, 422 deletions(-) delete mode 100644 eo/src/es/eoGenericRealOp.h diff --git a/eo/src/es/eoGenericRealOp.h b/eo/src/es/eoGenericRealOp.h deleted file mode 100644 index ac3eadd65..000000000 --- a/eo/src/es/eoGenericRealOp.h +++ /dev/null @@ -1,422 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenericRealOp.h -// (c) EEAAX 2000 - Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef eoGenericRealOp_h -#define eoGenericRealOp_h - -//----------------------------------------------------------------------------- -/** This file contains the generic operators that are the equivalent of those -in eoRealOp.h. -So they can be used when part of the genotype is a vector ... -In the long run, they should replace completely the operators from eoRealOp -when all constructs using eoOp will be able to use the corresponding -eoGenericOp - as it is already done in eoProportinoalCombinedOp -MS January 25. 2001 -*/ - -#include // swap_ranges -#include -#include -#include - -//----------------------------------------------------------------------------- - -/** eoUniformMutation --> changes all values of the vector - by uniform choice with range epsilon - with probability p_change per variable -\class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric -*/ - -template class eoGenericUniformMutation: public eoMonOp -{ - public: - /** - * (Default) Constructor. - * The bounds are initialized with the global object that says: no bounds. - * - * @param _epsilon the range for uniform nutation - * @param _p_change the probability to change a given coordinate - */ - eoGenericUniformMutation(const double& _epsilon, - const double& _p_change = 1.0): - bounds(eoDummyVectorNoBounds), epsilon(_epsilon), p_change(_p_change) {} - - /** - * Constructor with bounds - * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _epsilon the range for uniform nutation - * @param _p_change the probability to change a given coordinate - */ - eoGenericUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const double& _p_change = 1.0): - bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} - - /// The class name. - virtual string className() const { return "eoGenericUniformMutation"; } - - /** - * Do it! - * @param _eo The cromosome undergoing the mutation - */ - bool operator()(EOT& _eo) - { - bool hasChanged=false; - for (unsigned lieu=0; lieu<_eo.size(); lieu++) - { - if (rng.flip(p_change)) - { - // check the bounds - double emin = _eo[lieu]-epsilon; - double emax = _eo[lieu]+epsilon; - if (bounds.isMinBounded(lieu)) - emin = max(bounds.minimum(lieu), emin); - if (bounds.isMaxBounded(lieu)) - emax = min(bounds.maximum(lieu), emax); - _eo[lieu] = emin + (emax-emin)*rng.uniform(); - hasChanged = true; - } - } - if (hasChanged) - return true; - return false; - } - -private: - eoRealVectorBounds & bounds; - double epsilon; - double p_change; -}; - -/** eoDetUniformMutation --> changes exactly k values of the vector - by uniform choice with range epsilon -\class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric -*/ - -template class eoGenericDetUniformMutation: - public eoMonOp -{ - public: - /** - * (Default) Constructor. - * @param _epsilon the range for uniform nutation - * @param number of coordinate to modify - */ - eoGenericDetUniformMutation(const double& _epsilon, - const unsigned& _no = 1): - bounds(eoDummyVectorNoBounds), epsilon(_epsilon), no(_no) {} - - /** - * Constructor with bounds - * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _epsilon the range for uniform nutation - * @param number of coordinate to modify - */ - eoGenericDetUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const unsigned& _no = 1): - bounds(_bounds), epsilon(_epsilon), no(_no) {} - - /// The class name. - virtual string className() const { return "eoGenericDetUniformMutation"; } - - /** - * Do it! - * @param _eo The cromosome undergoing the mutation - */ - bool operator()(EOT& _eo) - { - for (unsigned i=0; i uniform choice in segment - == arithmetical with same value along all coordinates -\class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric -*/ - -template class eoGenericSegmentCrossover: public eoQuadOp -{ - public: - /** - * (Default) Constructor. - * The bounds are initialized with the global object that says: no bounds. - * - * @param _alphaMin the amount of exploration OUTSIDE the parents - * as in BLX-alpha notation (Eshelman and Schaffer) - * 0 == contractive application - * Must be positive - */ - eoGenericSegmentCrossover(const double& _alpha = 0.0) : - bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) {} - - /** - * Constructor with bounds - * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents - * as in BLX-alpha notation (Eshelman and Schaffer) - * 0 == contractive application - * Must be positive - */ - eoGenericSegmentCrossover(eoRealVectorBounds & _bounds, - const double& _alpha = 0.0) : - bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} - - /// The class name. - virtual string className() const { return "eoGenericSegmentCrossover"; } - - /** - * segment crossover - modifies both parents - * @param _eo1 The first parent - * @param _eo2 The first parent - */ - bool operator()(EOT& _eo1, EOT& _eo2) - { - unsigned i; - double r1, r2, fact; - double alphaMin = -alpha; - double alphaMax = 1+alpha; - if ( (alpha == 0.0) || bounds.hasNoBoundAtAll() ) // no check to perform - fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) - else // look for the bounds for fact - { - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - if (r1 != r2) { // otherwise you'll get NAN's - double rmin = min(r1, r2); - double rmax = max(r1, r2); - double length = rmax - rmin; - if (bounds.isMinBounded(i)) - { - alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); - alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); - } - if (bounds.isMaxBounded(i)) - { - alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); - alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); - } - } - } - fact = alphaMin + (alphaMax-alphaMin)*rng.uniform(); - } - - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - _eo1[i] = fact * r1 + (1-fact) * r2; - _eo2[i] = (1-fact) * r1 + fact * r2; - } - return true; // shoudl we test better than that??? - } - -protected: - eoRealVectorBounds & bounds; - double alpha; - double range; // == 1+2*alpha -}; - -/** eoArithmeticCrossover --> uniform choice in hypercube - == arithmetical with different values for each coordinate -\class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric -*/ - -template class eoGenericArithmeticCrossover: - public eoQuadOp -{ - public: - /** - * (Default) Constructor. - * The bounds are initialized with the global object that says: no bounds. - * - * @param _alphaMin the amount of exploration OUTSIDE the parents - * as in BLX-alpha notation (Eshelman and Schaffer) - * 0 == contractive application - * Must be positive - */ - eoGenericArithmeticCrossover(const double& _alpha = 0.0): - bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) - { - if (_alpha < 0) - throw runtime_error("BLX coefficient should be positive"); - } - - /** - * Constructor with bounds - * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents - * as in BLX-alpha notation (Eshelman and Schaffer) - * 0 == contractive application - * Must be positive - */ - eoGenericArithmeticCrossover(eoRealVectorBounds & _bounds, - const double& _alpha = 0.0): - bounds(_bounds), alpha(_alpha), range(1+2*_alpha) - { - if (_alpha < 0) - throw runtime_error("BLX coefficient should be positive"); - } - - /// The class name. - virtual string className() const { return "eoGenericArithmeticCrossover"; } - - /** - * arithmetical crossover - modifies both parents - * @param _eo1 The first parent - * @param _eo2 The first parent - */ - bool operator()(EOT& _eo1, EOT& _eo2) - { - unsigned i; - double r1, r2, fact; - if ( (alpha == 0.0) || bounds.hasNoBoundAtAll() ) // no check to perform - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) - _eo1[i] = fact * r1 + (1-fact) * r2; - _eo2[i] = (1-fact) * r1 + fact * r2; - } - else // must check the bounds - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - if (r1 != r2) { // otherwise you'll get NAN's - double rmin = min(r1, r2); - double rmax = max(r1, r2); - double length = rmax - rmin; - double alphaMin = -alpha; - double alphaMax = 1+alpha; - // first find the limits on the alpha's - if (bounds.isMinBounded(i)) - { - alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); - alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); - } - if (bounds.isMaxBounded(i)) - { - alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); - alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); - } - fact = alphaMin + rng.uniform(alphaMax-alphaMin); - _eo1[i] = fact * rmin + (1-fact) * rmax; - _eo2[i] = (1-fact) * rmin + fact * rmax; - } - } - return true; - } - -protected: - eoRealVectorBounds & bounds; - double alpha; - double range; // == 1+2*alphaMin -}; - - -/** eoRealUxOver --> Uniform crossover, also termed intermediate crossover -\class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric -*/ - -template class eoGenericRealUxOver: public eoQuadOp -{ - public: - /** - * (Default) Constructor. - * @param _preference bias in the choice (usually, no bias == 0.5) - */ - eoGenericRealUxOver(double _preference = 0.5): preference(_preference) - { - if ( (_preference <= 0.0) || (_preference >= 1.0) ) - runtime_error("UxOver --> invalid preference"); - } - - /// The class name. - virtual string className() const { return "eoRealUxOver"; } - - /** - * Uniform crossover for real vectors - * @param _eo1 The first parent - * @param _eo2 The second parent - * @runtime_error if sizes don't match - */ - bool operator()(EOT& _eo1, EOT& _eo2) - { - if ( _eo1.size() != _eo2.size()) - runtime_error("eoRealUxOver --> chromosomes sizes don't match" ); - bool changed = false; - for (unsigned int i=0; i<_eo1.size(); i++) - { - if (rng.flip(preference)) - if (_eo1[i] != _eo2[i]) - { - double tmp = _eo1[i]; - _eo1[i]=_eo2[i]; - _eo2[i] = tmp; - changed = true; - } - } - if (changed) - return true; - return false; - } - private: - double preference; -}; - - -//----------------------------------------------------------------------------- -//@} -#endif eoRealOp_h - From 73157edba6b08e057a67e27f6c94be0ef372a4b6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 06:13:56 +0000 Subject: [PATCH 0607/2134] Forgot to update ESEA with crossover --- eo/tutorial/Lesson4/ESEA.cpp | 2 +- eo/tutorial/Lesson4/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/Lesson4/ESEA.cpp b/eo/tutorial/Lesson4/ESEA.cpp index f673eaf78..adf2aace4 100644 --- a/eo/tutorial/Lesson4/ESEA.cpp +++ b/eo/tutorial/Lesson4/ESEA.cpp @@ -2,7 +2,7 @@ #ifdef _MSC_VER #pragma warning(disable:4786) -#endif +#endif #include #include diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile index 9a02e0713..3585354d8 100644 --- a/eo/tutorial/Lesson4/Makefile +++ b/eo/tutorial/Lesson4/Makefile @@ -3,7 +3,7 @@ .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp -ALL = BitEA RealEA +ALL = BitEA RealEA ESEA lesson3 : $(ALL) From 45f61a0e0b82fbd7209a9d185e5044445fd05eb3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 25 May 2001 16:27:59 +0000 Subject: [PATCH 0608/2134] Added a frequency parameter to eoPopStat (dump pop every N gen) --- eo/tutorial/Lesson3/exercise3.1.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 9e401959c..2030ac878 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -296,9 +296,10 @@ void main_function(int argc, char **argv) monitor.add(SecondStat); monitor.add(fdcStat); - // test de eoPopStat and/or eoSortedPopStat - // eoSortedPopStat popStat("Dump of whole population"); - eoPopStat popStat("Dump of whole population"); + // test de eoPopStat and/or eoSortedPopStat. + // Dumps the whole pop every 10 gen. + // eoSortedPopStat popStat(10, "Dump of whole population"); + eoPopStat popStat(10, "Dump of whole population"); checkpoint.add(popStat); monitor.add(popStat); From 49434ecc03cb33a93b6cf5ed573fbcd1737afb01 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 11 Jun 2001 12:37:21 +0000 Subject: [PATCH 0609/2134] Added a check for an empty initializor --- eo/src/gp/eoParseTree.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 2a7f55712..de438f6fd 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -83,22 +83,27 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > eoGpDepthInitializer( unsigned _max_depth, const vector& _initializor, - bool _grow = true) + bool _grow = true) : eoInit(), max_depth(_max_depth), initializor(_initializor), - grow(_grow) - {} + grow(_grow) + { + if(initializor.empty()) + { + throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); + } + } virtual string className() const { return "eoDepthInitializer"; }; void operator()(EoType& _tree) { list sequence; - + generate(sequence, max_depth); - + parse_tree tmp(sequence.begin(), sequence.end()); _tree.swap(tmp); } From fd61f8f475353259be22388939f44ee1c9372c14 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Thu, 21 Jun 2001 12:03:17 +0000 Subject: [PATCH 0610/2134] Updating Royal Road --- eo/test/RoyalRoad.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/RoyalRoad.h b/eo/test/RoyalRoad.h index 3781d1feb..b49e4741b 100644 --- a/eo/test/RoyalRoad.h +++ b/eo/test/RoyalRoad.h @@ -19,7 +19,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-05-17 07:29:50 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.2 2001-05-17 07:29:50 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2001-06-21 12:03:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.3 2001-06-21 12:03:17 jmerelo Exp $ $Author: jmerelo $ */ #ifndef RoyalRoad_h @@ -47,8 +47,8 @@ class RoyalRoad: public eoEvalFunc { if (block) { fitness += div; } - _eo.fitness( fitness ); } + _eo.fitness( fitness ); } }; From 164e36b184e48a8499b8b5a28ea6531ea1d657fb Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 13:55:14 +0000 Subject: [PATCH 0611/2134] Additional mutation operators for eoParseTree * Point Mutation * Expansion Mutation * Collapse Subtree Mutation * Hoist --- eo/src/gp/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/Makefile.am b/eo/src/gp/Makefile.am index bdbf6a661..d4b587539 100644 --- a/eo/src/gp/Makefile.am +++ b/eo/src/gp/Makefile.am @@ -5,4 +5,4 @@ ############################################################################### libeoincdir = $(includedir)/eo/gp -libeoinc_HEADERS = eoParseTree.h node_pool.h parse_tree.h +libeoinc_HEADERS = eoParseTree.h node_pool.h parse_tree.h eoGpMutate.h From 840717bea8c37e356d6805b8252399019ac80002 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:03:59 +0000 Subject: [PATCH 0612/2134] new Mutation operators for eoParseTree in src/gp/eoGpMutate.h a symbolic regression example program added to the app-dir configure.in and Makefile(s).am changed --- eo/app/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 3648af121..ecd7a6764 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = gprop mastermind +SUBDIRS = gprop mastermind gpsymreg ############################################################################### From 9efdfa59f8b2d592866fb2c8534c68a57de591bd Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:11:04 +0000 Subject: [PATCH 0613/2134] Symbolic Regression GP added app-dir --- eo/app/gpsymreg/Makefile.am | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 eo/app/gpsymreg/Makefile.am diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am new file mode 100644 index 000000000..338f1492e --- /dev/null +++ b/eo/app/gpsymreg/Makefile.am @@ -0,0 +1,25 @@ +############################################################################### +# +# Makefile.am for app/gpsymreg +# +############################################################################### + +DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a + +############################################################################### + +INCLUDES = -I$(top_builddir)/src +LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a + +############################################################################### + +bin_PROGRAMS = gpsymreg + +############################################################################### + +gpsymreg_SOURCES = main.cc +gpsymreg_DEPENDENCIES = $(DEPS) +gpsymreg_LDFLAGS = -lm +gpsymreg_LDADD = $(LDADDS) + +############################################################################### From 3486dfafd64f3f7207076a89eaa1f7612147b3f0 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:18:47 +0000 Subject: [PATCH 0614/2134] eoGpMutate.h added containing 4 new mutation operators for eoParseTree class --- eo/src/gp/eoGpMutate.h | 290 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 eo/src/gp/eoGpMutate.h diff --git a/eo/src/gp/eoGpMutate.h b/eo/src/gp/eoGpMutate.h new file mode 100644 index 000000000..362754803 --- /dev/null +++ b/eo/src/gp/eoGpMutate.h @@ -0,0 +1,290 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGpMutate.h : GP mutation +// (c) Jeroen Eggermont 2001 for mutation operators + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl + */ +//----------------------------------------------------------------------------- + +#ifndef eoGpMutate_h +#define eoGpMutate_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + + +#include +#include +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +// Additional Mutation operators from +// TITLE:"Genetic Programming~An Introduction" +// AUTHORS: Banzhaf, Nordin, Keller, Francone +// ISBN: 3-920993-58-6 +// ISBN: 1-55860-510-X +// +// For the eoParseTree class + +/** eoPointMutation --> replace a Node with a Node of the same arity +\class eoPointMutation eoGpMutate.h gp/eoGpMutate.h +*/ + +template +class eoPointMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _initializor The vector of Nodes given to the eoGpDepthInitializer + */ + eoPointMutation( vector& _initializor) + : eoMonOp(), initializor(_initializor) + {}; + + /// the class name + virtual string className() const { return "eoPointMutation"; }; + + /// Dtor + virtual ~eoPointMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + // select a random node i that is to be mutated + int i = rng.random(_eo1.size()); + // request the arity of the node that is to be replaced + int arity = _eo1[i].arity(); + + int j=0; + + do + { + j = rng.random(initializor.size()); + + }while ((initializor[j].arity() != arity) && (_eo1[i] != initializor[j])); + + _eo1[i] = initializor[j]; + + + + return true; + } + +private : + vector& initializor; + +}; + +/** eoExpansionMutation --> replace a terminal with a randomly created subtree +\class eoExpansionMutation eoGpMutate.h gp/eoGpMutate.h + */ + +template +class eoExpansionMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoExpansionMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// The class name + virtual string className() const { return "eoExpansionMutation"; }; + + /// Dtor + virtual ~eoExpansionMutation() {}; + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + // look for a terminal + while (_eo1[i].arity() != 0) + { + i= rng.random(_eo1.size()); + }; + + // create a new tree to + EoType eo2; + // make sure we get a tree with more than just a terminal + do + { + initializer(eo2); + }while(eo2.size() == 1); + + int j = rng.random(eo2.size()); + // make sure we select a subtree (and not a terminal) + while((eo2[j].arity() == 0)) + { + j = rng.random(eo2.size()); + }; + + + _eo1[i] = eo2[j]; // insert subtree + + _eo1.pruneTree(max_length); + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + +/** eoCollapseSubtree --> replace a subtree with a randomly chosen terminal +\class eoCollapseSubtreeMutation eoGpMutate.h gp/eoGpMutate.h + */ + +template +class eoCollapseSubtreeMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoCollapseSubtreeMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// The class name + virtual string className() const { return "eoCollapseSubtreeMutation"; }; + + /// Dtor + virtual ~eoCollapseSubtreeMutation() {}; + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + // look for a subtree + while ((_eo1[i].arity() == 0) && (_eo1.size() > 1)) + { + i= rng.random(_eo1.size()); + }; + + // create a new tree to + EoType eo2; + initializer(eo2); + + int j = rng.random(eo2.size()); + // make sure we select a subtree (and not a terminal) + while(eo2[j].arity() != 0) + { + j = rng.random(eo2.size()); + }; + + _eo1[i] = eo2[j]; // insert subtree + + // we don't have to prune because the subtree is always smaller + _eo1.pruneTree(max_length); + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + + + + + +/** eoHoist --> replace the individual with one of its subtree's +\class eoHoist eoGpMutate.h gp/eoGpMutate.h + */ + +template +class eoHoistMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + */ + eoHoistMutation() + : eoMonOp() + {}; + + /// The class name + virtual string className() const { return "eoHoistMutation"; }; + + /// Dtor + virtual ~eoHoistMutation() {}; + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + + + // select a hoist point + int i = rng.random(_eo1.size()); + // and create a new tree + EoType eo2(_eo1[i]); + + // we don't have to prune because the new tree is always smaller + //_eo1.pruneTree(max_length); + + _eo1 = eo2; + + return true; + } + +private : + +}; + + +#endif From 0c1ab037046bc0a9fe87de865b0de754696d8f6b Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:26:35 +0000 Subject: [PATCH 0615/2134] gp symbolic regression trees added --- eo/app/gpsymreg/fitness.h | 246 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 eo/app/gpsymreg/fitness.h diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h new file mode 100644 index 000000000..8f4b499dc --- /dev/null +++ b/eo/app/gpsymreg/fitness.h @@ -0,0 +1,246 @@ +/* + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifndef _FITNESS_FUNCTION_H +#define _FITNESS_FUNCTION_H + +#include +#include + +#include +#include "parameters.h" +#include "node.h" + +using namespace gp_parse_tree; +using namespace std; + + + +// the first fitness is the normal goal fitness +// the second fitness is the tree size (we prefer smaller trees) +// lets use names to define the different fitnesses +#define NORMAL 0 // Stepwise Adaptation of Weights Fitness +#define SMALLESTSIZE 1 // The size of the tree, we want to minimize this one -- statistics will tell us the smallest tree size + + +// Look: overloading the maximization without overhead (thing can be inlined) +class MinimizingFitnessTraits : public eoParetoFitnessTraits +{ + public : + static bool maximizing(int which) { return false;} // we want to minimize both fitnesses} + static unsigned nObjectives() { return 2;} // the number of fitnesses } +}; + +// Lets define our MultiObjective FitnessType +typedef eoParetoFitness FitnessType; + + +// John Koza's sextic polynomial (our example problem) + +double sextic_polynomial(double x) +{ + double result=0; + result = pow(x,6) - (2*pow(x,4)) + pow(x,2); + return result; +}; + +// we use the following functions for the basic math functions + +double _plus(double arg1, double arg2) +{ + return arg1 + arg2; +} + +double _minus(double arg1, double arg2) +{ + return arg1 - arg2; +} + +double _multiplies(double arg1, double arg2) +{ + return arg1 * arg2; +} + +double _divides(double arg1, double arg2) +{ + return arg1 / arg2; +} + +double _negate(double arg1) +{ + return -arg1; +} + + + +// now let's define our tree nodes + +template +void init(vector &initSequence) +{ + + // we have only one variable (X) + Operation varX( (unsigned int) 0, string("X") ); + + + // the main binary operators + Operation OpPLUS ( _plus, string("+")); + Operation OpMINUS( _minus,string("-")); + Operation OpMULTIPLIES(_multiplies,string("*")); + // We can use the normal divide function because there is a check for finite numbers in the node class + // so PDIV (protected divided) is enforced there so: (x/0 -> nan -> 0) + Operation OpDIVIDE( _divides, string("/") ); + // we can also use the standard 'pow' function from cmath or math because of the check for nan is + // in the node class so: (-3^3.1) -> nan -> 0) + Operation OpPOW( pow, string("^") ); + + + // Now the functions as binary functions + Operation PLUS( string("plus"), _plus); + Operation MINUS( string("minus"), _minus); + Operation MULTIPLIES( string("multiply"), _multiplies); + Operation DIVIDE( string("divide"), _divides); + Operation POW(string("pow"), pow); + + + // and some unary functions + Operation NEGATE( _negate,string("-")); + Operation SIN ( sin, string("sin")); + Operation COS ( cos, string("cos")); + // all functions are "protected" inside the Node class so can also use tan(x) + // resulting values of -inf, inf or NaN (not-a-number) are converted to 0 + Operation TAN ( tan, string("tan")); + Operation EXP ( exp, string("e^")); + Operation LOG ( log, string("ln")); + + + // Now we are ready to add the possible nodes to our initSequence (which is used by the eoDepthInitializer) + + // always add the leaves (nodes with arity 0) first (or the program will crash) + // so lets start with our variable + initSequence.push_back(varX); + + // followed by the constants 2, 4, 6 + for(unsigned int i=2; i <= 6; i+=2) + { + char text[255]; + sprintf(text, "%i", i); + Operation op(i*1.0, text); + initSequence.push_back( op ); + // and we add the variable again (so we have get lots of variables); + initSequence.push_back( varX ); + } + + // next we add the unary functions + /* + initSequence.push_back( NEGATE ); + initSequence.push_back( SIN ); + initSequence.push_back( COS ); + initSequence.push_back( TAN ); + initSequence.push_back( EXP ); + initSequence.push_back( LOG ); + + // and the binary functions + initSequence.push_back( PLUS); + initSequence.push_back( MINUS ); + initSequence.push_back( MULTIPLIES ); + initSequence.push_back( DIVIDE ); + initSequence.push_back( POW ); + */ + // and the binary operators + initSequence.push_back( OpPLUS); + initSequence.push_back( OpMINUS ); + /* + initSequence.push_back( OpMULTIPLIES ); + initSequence.push_back( OpDIVIDE ); + */ + initSequence.push_back( OpPOW ); + + +}; + + +template +class RegFitness: public eoEvalFunc< eoParseTree > +{ + public: + + typedef eoParseTree EoType; + + void operator()(EoType &_eo) + { + + vector< double > input(1); // the input variable(s) + double output; + double target; + FType fitness; + + + float x=0; + double fit=0; + for(x=-1; x <= 1; x+=0.1) + { + input[0] = x; + target = sextic_polynomial(x); + _eo.apply(output,input); + + fit += pow(target - output, 2); + } + // check if the fitness is valid + if (isinf(fit) == 0) + fitness[NORMAL] = fit; + else + fitness[NORMAL] = MAXFLOAT; + + fitness[SMALLESTSIZE] = _eo.size() / (1.0*parameter.MaxSize); + _eo.fitness(fitness); + + if (fitness[NORMAL] < best[NORMAL]) + { + best[NORMAL] = fitness[NORMAL]; + tree=""; + _eo.apply(tree); + } + + } + + + + RegFitness(eoValueParam &_generationCounter, vector< TreeNode > &initSequence, Parameters &_parameter) : eoEvalFunc(), generationCounter(_generationCounter), parameter(_parameter) + { + init(initSequence); + best[NORMAL] = 1000; + tree= "not found"; + }; + + ~RegFitness() + { + cerr << "Best Fitness= " << best[NORMAL] << endl; + cerr << tree << endl; + }; + + private: + eoValueParam &generationCounter; // so we know the current generation + Parameters ¶meter; // the parameters + FType best; // the best found fitness + string tree; +}; + +#endif + From f1b6eb5dd8c95b7f29ec36c1b6837c30a20e6df8 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:33:51 +0000 Subject: [PATCH 0616/2134] main.cc for symreg gp --- eo/app/gpsymreg/main.cc | 165 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 eo/app/gpsymreg/main.cc diff --git a/eo/app/gpsymreg/main.cc b/eo/app/gpsymreg/main.cc new file mode 100644 index 000000000..53ef6b36e --- /dev/null +++ b/eo/app/gpsymreg/main.cc @@ -0,0 +1,165 @@ +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +//----------------------------------------------------------------------------- + +#include "node.h" +#include "parameters.h" +#include "fitness.h" + + +// TYPE DECLARATIONS FOR GP + + +typedef eoParseTree EoType; +typedef eoPop Pop; + +//----------------------------------------------------------------------------- + +int main(int argc, char *argv[]) +{ + + // the vector containing the possible nodes + vector initSequence; + + // initialise parameters + Parameters parameter(argc, argv); + + // set the randomseed + rng.reseed(parameter.randomseed); + + // Create a generation counter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + + // create an instantiation of the fitness/evaluation function + // it initializes the initSequence vector + // the parameters are passed on as well + RegFitness eval(generationCounter, initSequence, parameter); + + // Depth Initializor, defaults to grow method. + eoGpDepthInitializer initializer(parameter.InitMaxDepth, initSequence); + + // create the initial population + Pop pop(parameter.population_size, initializer); + + // and evaluate the individuals + apply(eval, pop); + + generationCounter.value()++; // set the generationCounter to 1 + + + // define X-OVER + eoSubtreeXOver xover(parameter.MaxSize); + // define MUTATION + eoBranchMutation mutation(initializer, parameter.MaxSize); +// eoExpansionMutation mutation(initializer, parameter.MaxSize); +// eoCollapseSubtreeMutation mutation(initializer, parameter.MaxSize); +// eoPointMutation mutation(initSequence); +// eoHoistMutation mutation; + + // The operators are encapsulated into an eoTRansform object, + // that performs sequentially crossover and mutation + eoSGATransform transform(xover, parameter.xover_rate, mutation, parameter.mutation_rate); + + // The robust tournament selection + // in our case 5-tournament selection + eoDetTournamentSelect selectOne(parameter.tournamentsize); + // is now encapsulated in a eoSelectMany + eoSelectMany select(selectOne, parameter.offspring_size, eo_is_an_integer); + + // and the generational replacement + //eoGenerationalReplacement replace; + // or the SteadtState replacment + //eoSSGAWorseReplacement replace; + // or comma selection + eoCommaReplacement replace; + + // Terminators + eoGenContinue term(parameter.nGenerations); + + eoCheckPoint checkPoint(term); + + // STATISTICS + eoAverageStat avg; + eoBestFitnessStat best; + + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkPoint.add(increment); + checkPoint.add(avg); + checkPoint.add(best); + + eoGnuplot1DMonitor gnuplotmonitor("gnuplotBestStats"); + gnuplotmonitor.add(generationCounter); + gnuplotmonitor.add(best); + // we need to add a empty string variable if we want to seed the second fitness value + eoValueParam dummy1("", "Smallest Tree Size"); + gnuplotmonitor.add(dummy1); + + eoGnuplot1DMonitor gnuplotAvgmonitor("gnuplotAvgStats"); + gnuplotAvgmonitor.add(generationCounter); + gnuplotAvgmonitor.add(avg); + // we need to add a empty string variable if we want to seed the second fitness value + eoValueParam dummy2("", "Average Tree Size"); + gnuplotAvgmonitor.add(dummy2); + + checkPoint.add(gnuplotmonitor); + checkPoint.add(gnuplotAvgmonitor); + + // GP Generation + eoEasyEA gp(checkPoint, eval, select, transform, replace); + + cout << "Initialization done" << endl; + + + try + { + gp(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + + + return 1; +}; + + From 00c671f24c9de4b6fe453148fb7598b84c857f42 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:38:00 +0000 Subject: [PATCH 0617/2134] node.h containing Tree-node classes for symreg gp --- eo/app/gpsymreg/node.h | 247 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 eo/app/gpsymreg/node.h diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h new file mode 100644 index 000000000..a3d8335b8 --- /dev/null +++ b/eo/app/gpsymreg/node.h @@ -0,0 +1,247 @@ +/* + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifndef _NODE_H +#define _NODE_H + +#include +#include +#include // for finite(double) function + +using namespace gp_parse_tree; +using namespace std; + + +/* A new Operation and Node class for even more flexibility. + + Improvements over the t-eoSymreg code are: + + * No hardcoded functions or operators. The Operation and Node class below + allow you to specify your own unary and binary functions as well as + binary operators (like +,-,*,/). Moreover you can detemine if you want + to allow primitve subroutines with either one or two arguments. + + If a Node has a subroutine Operation it will take evaluate the first + (and possible second) child branch and use them as input variables for + the remaining second (or third) child branch. +*/ + + +typedef enum {Variable, UFunction, BFunction, BOperator, Const} Type; + + +struct Operation +{ + public: + + + typedef double (*BinaryFunction)(const double,const double); + typedef double (*UnaryFunction)(const double); + typedef unsigned int VariableID; + typedef string Label; + + + + union + { + UnaryFunction uFunction; + BinaryFunction bFunction; + VariableID id; + double constant; + }; + + + Label label; + Type type; + + // the default constructor results in a constant with value 0 + Operation() : constant(0), label("0"), type(Const){}; + // two possible constructors for Unary Functions + Operation(UnaryFunction _uf, Label _label): uFunction(_uf), label(_label), type(UFunction) {}; + Operation(Label _label, UnaryFunction _uf): uFunction(_uf), label(_label), type(UFunction) {}; + + // Watch out there are two constructors using pointers two binary functions: + // Binary Function (printed as label(subtree0,subtree1) (e.g. pow(x,y)) + // Binary Operator (printed as (subtree0 label subtree1) (e.g. x^y) + // The difference is purely cosmetic. + + // If you specify the label before the function pointer -> Binary Function + Operation(Label _label, BinaryFunction _bf): bFunction(_bf), label(_label), type(BFunction) {}; + // If you specify the function pointer before the label -> Binary Operator + Operation(BinaryFunction _bf, Label _label): bFunction(_bf), label(_label), type(BOperator) {}; + + // A constructor for variables + Operation(VariableID _id, Label _label): id(_id), label(_label), type(Variable) {}; + // A constructor for constants + Operation(double _constant, Label _label): constant(_constant), label(_label), type(Const) {}; + + + Operation(const Operation &_op) + { + switch(_op.type) + { + case Variable: id = _op.id; break; + case UFunction: uFunction = _op.uFunction; break; + case BFunction: bFunction = _op.bFunction; break; + case BOperator: bFunction = _op.bFunction; break; + case Const: constant = _op.constant; break; + } + type = _op.type; + label = _op.label; + }; + virtual ~Operation(){}; + +}; + + +class Node +{ + private: + Operation op; + + public: + + Node(void): op(Operation()){}; + Node(Operation &_op) : op(_op){}; + virtual ~Node(void) {} + + int arity(void) const + { + switch(op.type) + { + case Variable: return 0; + case UFunction: return 1; + case BFunction: return 2; + case BOperator: return 2; + case Const: return 0; + } + return 0; + } + + void randomize(void) {} + + template + void operator()(double& result, Children args, vector &var) const + { + double result0; + double result1; + + + switch(op.type) + { + case Variable: result = var[op.id%var.size()]; //%var.size() used in the case of Subroutines and as a security measure + break; + case UFunction: args[0].apply(result0, var); + result = op.uFunction(result0); + break; + case BFunction: + case BOperator: args[0].apply(result0, var); + args[1].apply(result1, var); + result = op.bFunction(result0,result1); + break; + case Const: result = op.constant; + break; + + } + + // if the result is infinite (positive or negative) or not_a_number (nan) then result becomes 0 + if (!finite(result)) + result=0; + } + + template + void Node::operator()(string& result, Children args) const + { + + string subtree0; + string subtree1; + string subtree2; + + switch(op.type) + { + + case Variable: + case Const: result += op.label; + break; + + case UFunction: result += op.label; + result += "("; + args[0].apply(subtree0); + result += subtree0; + result += ")"; + break; + case BFunction: result += op.label; + result += "("; + args[0].apply(subtree0); + result += subtree0; + result += ","; + args[1].apply(subtree1); + result += subtree1; + result += ")"; + break; + case BOperator: result += "("; + args[0].apply(subtree0); + result += subtree0; + result += op.label; + args[1].apply(subtree1); + result += subtree1; + result += ")"; + break; + default: result += "ERROR in Node::operator(string,...) \n"; break; + } + } + + Operation getOp(void) const {return op;} + +}; + + + + + + + + + + + +//----------------------------------------------------------- +// saving, loading LETS LEAVE IT OUT FOR NOW + + + +std::ostream& operator<<(std::ostream& os, const Node& eot) +{ + Operation op(eot.getOp()); + + os << (eot.getOp()).label; + return os; +} + + +// we can't load because we are using function pointers. Instead we prevent a compiler warning by calling the arity() function. +std::istream& operator>>(std::istream& is, Node& eot) +{ + eot.arity(); + return is; +} + + + +#endif From f41c5f2ff68bb1e0b57400f687afe4dfbf104b85 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 14:39:36 +0000 Subject: [PATCH 0618/2134] addition file for parameters for symreg gp --- eo/app/gpsymreg/parameters.h | 112 +++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 eo/app/gpsymreg/parameters.h diff --git a/eo/app/gpsymreg/parameters.h b/eo/app/gpsymreg/parameters.h new file mode 100644 index 000000000..4cd23ec09 --- /dev/null +++ b/eo/app/gpsymreg/parameters.h @@ -0,0 +1,112 @@ +/* + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifndef _PARAMETERS_FUNCTION_H +#define _PARAMETERS_FUNCTION_H + +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +struct Parameters{ + unsigned int nGenerations; // -G + unsigned population_size; // -P + unsigned offspring_size; // -O + unsigned int MaxSize; // -S + unsigned int InitMaxDepth; // -D + unsigned int randomseed; // -R + double xover_rate; // -x + double mutation_rate; // -y + unsigned int tournamentsize; // -t + + + Parameters(int argc, char **argv) + { + eoParser parser(argc,argv); + + // generations + eoValueParam paramGenerations(1, "generations", "Generations", 'G', false); + parser.processParam( paramGenerations ); + nGenerations = paramGenerations.value(); + cerr << "nGenerations= " << nGenerations << endl; + + // populationsize + eoValueParam paramPopulationSize(10, "populationsize", "PopulationSize", 'P', false); + parser.processParam( paramPopulationSize ); + population_size = paramPopulationSize.value(); + cerr << "population_size= " << population_size << endl; + + // offspringsize + eoValueParam paramOffspringSize(population_size, "offspringsize", "OffspringSize", 'O', false); + parser.processParam( paramOffspringSize ); + offspring_size = paramOffspringSize.value(); + cerr << "offspring_size= " << offspring_size << endl; + + // maxsize + eoValueParam paramMaxSize(15, "maxsize", "MaxSize", 'S', false); + parser.processParam( paramMaxSize ); + MaxSize = paramMaxSize.value(); + cerr << "MaxSize= " << MaxSize << endl; + + // initialmaxdepth + eoValueParam paramInitialMaxDepth(4, "initialmaxdepth", "InitialMaxDepth", 'D', false); + parser.processParam( paramInitialMaxDepth ); + InitMaxDepth = paramInitialMaxDepth.value(); + cerr << "InitMaxDepth= " << InitMaxDepth << endl; + + // randomseed + eoValueParam paramRandomSeed(1, "randomseed", "Random Seed", 'R', false); + parser.processParam( paramRandomSeed ); + randomseed = paramRandomSeed.value(); + cerr << "randomseed= " << randomseed << endl; + + + // crossover-rate + eoValueParam paramXover(0.75, "crossoverrate", "crossover rate", 'x', false); + parser.processParam(paramXover ); + xover_rate = paramXover.value(); + cerr << "xover_rate= " << xover_rate << endl; + + //mutation-rate + eoValueParam paramMutation(0.25, "mutationrate", "mutation rate", 'm', false); + parser.processParam(paramMutation ); + mutation_rate = paramMutation.value(); + cerr << "mutation_rate= " << mutation_rate << endl; + + //tournament size + eoValueParam paramTournamentSize(5, "tournamentsize", "tournament size", 't', false); + parser.processParam(paramTournamentSize ); + tournamentsize = paramTournamentSize.value(); + cerr << "Tournament Size= " << tournamentsize << endl; + + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + + }; + + ~Parameters(){}; +}; + +#endif From 9242c8454145d7783261c8834cb065bf5441eed9 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 28 Jun 2001 15:03:53 +0000 Subject: [PATCH 0619/2134] app/gpsymreg/Makefile added to configure.in --- eo/app/gpsymreg/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h index a3d8335b8..df10bd183 100644 --- a/eo/app/gpsymreg/node.h +++ b/eo/app/gpsymreg/node.h @@ -166,7 +166,7 @@ class Node } template - void Node::operator()(string& result, Children args) const + void operator()(string& result, Children args) const { string subtree0; From c7aba2f3c4a45d69d904eb5ba04856d32c06bb5e Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 29 Jun 2001 09:22:26 +0000 Subject: [PATCH 0620/2134] app/gpsymreg/Makefile added to configure.in --- eo/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/configure.in b/eo/configure.in index 8bb18d425..90de61241 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,5 +34,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile) +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) From 375568853aa7c9c6b01ab96261837132746ea7af Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 29 Jun 2001 12:15:15 +0000 Subject: [PATCH 0621/2134] checks for the existence of finite(x) and isinf(x) built into app/gpsymreg. Linux gcc compilers have the 'macros ??' but solaris gcc does not --- eo/app/gpsymreg/fitness.h | 3 +++ eo/app/gpsymreg/node.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h index 8f4b499dc..e432b8268 100644 --- a/eo/app/gpsymreg/fitness.h +++ b/eo/app/gpsymreg/fitness.h @@ -203,10 +203,13 @@ class RegFitness: public eoEvalFunc< eoParseTree > fit += pow(target - output, 2); } // check if the fitness is valid + // some versions of gcc (e.g. 2.95.2 on solaris) don't have isinf(x) defined + #ifdef isinf if (isinf(fit) == 0) fitness[NORMAL] = fit; else fitness[NORMAL] = MAXFLOAT; + #endif fitness[SMALLESTSIZE] = _eo.size() / (1.0*parameter.MaxSize); _eo.fitness(fitness); diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h index df10bd183..6905138cd 100644 --- a/eo/app/gpsymreg/node.h +++ b/eo/app/gpsymreg/node.h @@ -161,8 +161,11 @@ class Node } // if the result is infinite (positive or negative) or not_a_number (nan) then result becomes 0 + // however some versions of gcc (e.g. 2.95.2 on solaris) don't have the finite(x) defined + #ifdef finite if (!finite(result)) result=0; + #endif } template From f674fbeb1411b3f5a4adf30c650c9a667b462e3e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 29 Jun 2001 18:06:10 +0000 Subject: [PATCH 0622/2134] oops, thanks jeroen --- eo/src/gp/eoParseTree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index de438f6fd..c54922259 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -175,7 +175,7 @@ public: int i = rng.random(_eo1.size()); int j = rng.random(_eo2.size()); - parse_tree::subtree tmp = _eo2[j]; + parse_tree::subtree tmp = _eo1[j]; _eo1[i] = _eo2[j]; // insert subtree _eo2[j]=tmp; From 48a784d122e6a5405e85dcecce309d3eb5b9de33 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 30 Jun 2001 05:57:10 +0000 Subject: [PATCH 0623/2134] Corrected a wrong comment --- eo/src/eoGenOp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 66e0100d1..8facd01f1 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -98,7 +98,7 @@ class eoMonGenOp : public eoGenOp eoMonOp& op; }; -/** Wrapper for binop: here we use erase method of eoPopulator +/** Wrapper for binop: here we use select method of eoPopulator * but we could also have an embedded selector to select the second parent */ template From 967670e2c7fe6b249d61e5c48cf0de860876a6be Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 30 Jun 2001 05:59:26 +0000 Subject: [PATCH 0624/2134] Added random selection --- eo/src/do/make_algo_scalar.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 0ea9d1732..95ef3befa 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -105,6 +105,10 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e { select = new eoProportionalSelect; } + else if (ppSelect.first == string("Random")) // no argument + { + select = new eoRandomSelect; + } else { string stmp = string("Invalid selection: ") + ppSelect.first; From af726e9d9ec1d5428259028c409b746f995a204d Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 2 Jul 2001 08:28:40 +0000 Subject: [PATCH 0625/2134] eoSubtreeXOver fixed --- eo/src/gp/eoParseTree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index c54922259..b55d015bb 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -175,13 +175,13 @@ public: int i = rng.random(_eo1.size()); int j = rng.random(_eo2.size()); - parse_tree::subtree tmp = _eo1[j]; + parse_tree::subtree tmp = _eo1[i]; _eo1[i] = _eo2[j]; // insert subtree - _eo2[j]=tmp; + _eo2[j] = tmp; _eo1.pruneTree(max_length); _eo2.pruneTree(max_length); - + return true; } From 402e34c238445f4d9d5d2c15abfb95ae93daf9fb Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 2 Jul 2001 11:38:27 +0000 Subject: [PATCH 0626/2134] The constructor for the eoGpDepthInitializer has been extended with a sort of the initializor vector containing all possible nodes. This sort assures that the terminals are in the front of vector. Untill now this was assumed but not checked or enforced. --- eo/src/gp/eoParseTree.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index b55d015bb..7b07c85ed 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -72,6 +72,11 @@ std::istream& operator>>(std::istream& is, eoParseTree& eot) return is; } +template +bool lt_arity(const Node &node1, const Node &node2) +{ + return (node1.arity() < node2.arity()); +} template class eoGpDepthInitializer : public eoInit< eoParseTree > @@ -94,6 +99,9 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > { throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); } + // lets sort the initializor vector according to arity (so we can be sure the terminals are in front) + // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j + stable_sort(initializor.begin(), initializor.end(), lt_arity); } virtual string className() const { return "eoDepthInitializer"; }; @@ -150,7 +158,7 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > private : - + unsigned max_depth; std::vector initializor; bool grow; From a611939e684885a63d7b333c6ffaec0fd8148069 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 2 Jul 2001 13:31:04 +0000 Subject: [PATCH 0627/2134] Changed the directory structure for gp now: eoParseTree <-- the eoParseTree class eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) eoParseTreeOp <-- the operators (xover and mutation) base documentation written for: * eoParseTree * eoGpDepthInitializer * eoSubtreeXOver * eoBranchMutation * eoPointMutation * eoExpansionMutation * eoCollapseSubtreeMutation * eoHoistMutation I also created a group ParseTree which contains all classes related to eoParseTree eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp --- eo/app/gpsymreg/fitness.h | 10 +- eo/app/gpsymreg/main.cc | 5 +- eo/doc/eo.cfg | 2 +- eo/src/gp/Makefile.am | 2 +- eo/src/gp/eoParseTree.h | 236 ++++++-------------- eo/src/gp/eoParseTreeDepthInit.h | 145 ++++++++++++ eo/src/gp/{eoGpMutate.h => eoParseTreeOp.h} | 142 +++++++++--- 7 files changed, 342 insertions(+), 200 deletions(-) create mode 100644 eo/src/gp/eoParseTreeDepthInit.h rename eo/src/gp/{eoGpMutate.h => eoParseTreeOp.h} (66%) diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h index e432b8268..eca800f08 100644 --- a/eo/app/gpsymreg/fitness.h +++ b/eo/app/gpsymreg/fitness.h @@ -43,7 +43,7 @@ using namespace std; class MinimizingFitnessTraits : public eoParetoFitnessTraits { public : - static bool maximizing(int which) { return false;} // we want to minimize both fitnesses} + static bool maximizing(int which) { return false;} // we want to minimize both fitnesses static unsigned nObjectives() { return 2;} // the number of fitnesses } }; @@ -148,7 +148,7 @@ void init(vector &initSequence) } // next we add the unary functions - /* + initSequence.push_back( NEGATE ); initSequence.push_back( SIN ); initSequence.push_back( COS ); @@ -162,14 +162,14 @@ void init(vector &initSequence) initSequence.push_back( MULTIPLIES ); initSequence.push_back( DIVIDE ); initSequence.push_back( POW ); - */ + // and the binary operators initSequence.push_back( OpPLUS); initSequence.push_back( OpMINUS ); - /* + initSequence.push_back( OpMULTIPLIES ); initSequence.push_back( OpDIVIDE ); - */ + initSequence.push_back( OpPOW ); diff --git a/eo/app/gpsymreg/main.cc b/eo/app/gpsymreg/main.cc index 53ef6b36e..6471dd8a9 100644 --- a/eo/app/gpsymreg/main.cc +++ b/eo/app/gpsymreg/main.cc @@ -23,7 +23,6 @@ #include #include -#include #include using namespace gp_parse_tree; @@ -84,7 +83,9 @@ int main(int argc, char *argv[]) // define X-OVER - eoSubtreeXOver xover(parameter.MaxSize); + + eoSubtreeXOver xover(parameter.MaxSize); + // define MUTATION eoBranchMutation mutation(initializer, parameter.MaxSize); // eoExpansionMutation mutation(initializer, parameter.MaxSize); diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 49b1efdc1..621e754cc 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -214,7 +214,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = ../src/obsolete ../src/gp +EXCLUDE = ../src/obsolete # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude diff --git a/eo/src/gp/Makefile.am b/eo/src/gp/Makefile.am index d4b587539..1775610aa 100644 --- a/eo/src/gp/Makefile.am +++ b/eo/src/gp/Makefile.am @@ -5,4 +5,4 @@ ############################################################################### libeoincdir = $(includedir)/eo/gp -libeoinc_HEADERS = eoParseTree.h node_pool.h parse_tree.h eoGpMutate.h +libeoinc_HEADERS = eoParseTree.h node_pool.h parse_tree.h eoParseTreeDepthInit.h eoParseTreeOp.h diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 7b07c85ed..971814798 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -1,5 +1,31 @@ -#ifndef EO_PARSE_TREE_H -#define EO_PARSE_TREE_H +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParseTree.h : eoParseTree class (for Tree-based Genetic Programming) +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + + */ +//----------------------------------------------------------------------------- + +#ifndef eoParseTree_h +#define eoParseTree_h #include @@ -11,6 +37,18 @@ using namespace gp_parse_tree; using namespace std; +/** +\defgroup ParseTree + + Various functions for a tree-based Genetic Programming +*/ + +/** eoParseTree : implementation of parse-tree for genetic programming +\class eoParseTree eoParseTree.h gp/eoParseTree.h +\ingroup ParseTree +*/ + + template class eoParseTree : public EO, public parse_tree { @@ -18,9 +56,20 @@ public : typedef parse_tree::subtree Subtree; + /** + * Default Constructor + */ eoParseTree(void) {} + /** + * Copy Constructor + * @param tree The tree to copy + */ eoParseTree(const parse_tree& tree) : parse_tree(tree) {} + /** + * To prune me to a certain size + * @param _size My maximum size + */ virtual void pruneTree(unsigned _size) { if (_size < 1) @@ -32,20 +81,34 @@ public : } } + /** + * To read me from a stream + * @param is The istream + */ + eoParseTree(std::istream& is) : EO(), parse_tree() { readFrom(is); } + /// My class name string className(void) const { return "eoParseTree"; } + /** + * To print me on a stream + * @param os The ostream + */ void printOn(std::ostream& os) const { os << fitness() << ' '; std::copy(ebegin(), eend(), ostream_iterator(os)); } - + + /** + * To read me from a stream + * @param is The istream + */ void readFrom(std::istream& is) { FType fit; @@ -58,6 +121,7 @@ public : } }; +// friend function to print eoParseTree template std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) { @@ -65,6 +129,7 @@ std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) return os; } +// friend function to read eoParseTree template std::istream& operator>>(std::istream& is, eoParseTree& eot) { @@ -72,167 +137,8 @@ std::istream& operator>>(std::istream& is, eoParseTree& eot) return is; } -template -bool lt_arity(const Node &node1, const Node &node2) -{ - return (node1.arity() < node2.arity()); -} - -template -class eoGpDepthInitializer : public eoInit< eoParseTree > -{ - public : - - typedef eoParseTree EoType; - - eoGpDepthInitializer( - unsigned _max_depth, - const vector& _initializor, - bool _grow = true) - : - eoInit(), - max_depth(_max_depth), - initializor(_initializor), - grow(_grow) - { - if(initializor.empty()) - { - throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); - } - // lets sort the initializor vector according to arity (so we can be sure the terminals are in front) - // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j - stable_sort(initializor.begin(), initializor.end(), lt_arity); - } - - virtual string className() const { return "eoDepthInitializer"; }; - - void operator()(EoType& _tree) - { - list sequence; - - generate(sequence, max_depth); - - parse_tree tmp(sequence.begin(), sequence.end()); - _tree.swap(tmp); - } - - void generate(list& sequence, int the_max, int last_terminal = -1) - { - if (last_terminal == -1) - { // check where the last terminal in the sequence resides - vector::iterator it; - for (it = initializor.begin(); it != initializor.end(); ++it) - { - if (it->arity() > 0) - break; - } - - last_terminal = it - initializor.begin(); - } - - if (the_max == 1) - { // generate terminals only - vector::iterator it = initializor.begin() + rng.random(last_terminal); - sequence.push_front(*it); - return; - } - - vector::iterator what_it; - - if (grow) - { - what_it = initializor.begin() + rng.random(initializor.size()); - } - else // full - { - what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); - } - - what_it->randomize(); - - sequence.push_front(*what_it); - - for (int i = 0; i < what_it->arity(); ++i) - generate(sequence, the_max - 1, last_terminal); - } - - -private : - - unsigned max_depth; - std::vector initializor; - bool grow; -}; - -template -class eoSubtreeXOver: public eoQuadOp< eoParseTree > { -public: - - typedef eoParseTree EoType; - - eoSubtreeXOver( unsigned _max_length) - : eoQuadOp(), max_length(_max_length) {}; - - virtual string className() const { return "eoSubtreeXOver"; }; - - /// Dtor - virtual ~eoSubtreeXOver () {}; - - bool operator()(EoType & _eo1, EoType & _eo2 ) - { - int i = rng.random(_eo1.size()); - int j = rng.random(_eo2.size()); - - parse_tree::subtree tmp = _eo1[i]; - _eo1[i] = _eo2[j]; // insert subtree - _eo2[j] = tmp; - - _eo1.pruneTree(max_length); - _eo2.pruneTree(max_length); - - return true; - } - - unsigned max_length; -}; - -template -class eoBranchMutation: public eoMonOp< eoParseTree > -{ -public: - - typedef eoParseTree EoType; - - eoBranchMutation(eoInit& _init, unsigned _max_length) - : eoMonOp(), max_length(_max_length), initializer(_init) - {}; - - virtual string className() const { return "eoBranchMutation"; }; - - /// Dtor - virtual ~eoBranchMutation() {}; - - bool operator()(EoType& _eo1 ) - { - int i = rng.random(_eo1.size()); - - EoType eo2; - initializer(eo2); - - int j = rng.random(eo2.size()); - - _eo1[i] = eo2[j]; // insert subtree - - _eo1.pruneTree(max_length); - - return true; - } - -private : - - unsigned max_length; - eoInit& initializer; -}; - +// for backward compatibility +#include +#include #endif diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h new file mode 100644 index 000000000..ca9be86bf --- /dev/null +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -0,0 +1,145 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParseTreeDepthInit.h : initializor for eoParseTree class +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + + */ +//----------------------------------------------------------------------------- + +#ifndef eoParseTreeDepthInit_h +#define eoParseTreeDepthInit_h + +#include +#include +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +// we need this for sorting the initializor vector +template +bool lt_arity(const Node &node1, const Node &node2) +{ + return (node1.arity() < node2.arity()); +} + +/** eoGpDepthInitializer : the initializer class for eoParseTree +\class eoGpDepthInitializer eoParseTreeDepthInit.h gp/eoParseTreeDepthInit.h +\ingroup ParseTree +*/ + +template +class eoGpDepthInitializer : public eoInit< eoParseTree > +{ + public : + + typedef eoParseTree EoType; + + /** + * Constructor + * @parm _max_depth The maximum depth of a tree + * @param _initializor A vector containing the possible nodes + * @param _grow False results in a full tree, True result is a randomly grown tree + */ + eoGpDepthInitializer( + unsigned _max_depth, + const vector& _initializor, + bool _grow = true) + : + eoInit(), + max_depth(_max_depth), + initializor(_initializor), + grow(_grow) + { + if(initializor.empty()) + { + throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); + } + // lets sort the initializor vector according to arity (so we can be sure the terminals are in front) + // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j + stable_sort(initializor.begin(), initializor.end(), lt_arity); + } + /// My class name + virtual string className() const { return "eoDepthInitializer"; }; + + /**initialize a tree + * @param _tree : the tree to be initialized + */ + void operator()(EoType& _tree) + { + list sequence; + + generate(sequence, max_depth); + + parse_tree tmp(sequence.begin(), sequence.end()); + _tree.swap(tmp); + } + private : + void generate(list& sequence, int the_max, int last_terminal = -1) + { + if (last_terminal == -1) + { // check where the last terminal in the sequence resides + vector::iterator it; + for (it = initializor.begin(); it != initializor.end(); ++it) + { + if (it->arity() > 0) + break; + } + + last_terminal = it - initializor.begin(); + } + + if (the_max == 1) + { // generate terminals only + vector::iterator it = initializor.begin() + rng.random(last_terminal); + sequence.push_front(*it); + return; + } + + vector::iterator what_it; + + if (grow) + { + what_it = initializor.begin() + rng.random(initializor.size()); + } + else // full + { + what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); + } + + what_it->randomize(); + + sequence.push_front(*what_it); + + for (int i = 0; i < what_it->arity(); ++i) + generate(sequence, the_max - 1, last_terminal); + } + + + + + unsigned max_depth; + std::vector initializor; + bool grow; +}; + +#endif diff --git a/eo/src/gp/eoGpMutate.h b/eo/src/gp/eoParseTreeOp.h similarity index 66% rename from eo/src/gp/eoGpMutate.h rename to eo/src/gp/eoParseTreeOp.h index 362754803..1af31add9 100644 --- a/eo/src/gp/eoGpMutate.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -1,8 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoGpMutate.h : GP mutation -// (c) Jeroen Eggermont 2001 for mutation operators +// eoParseTreeOp.h : crossover and mutation operator for the eoParseTree class +// (c) Maarten Keijzer 2000 for eoSubtreeXOver, eoBranchMutation +// (c) Jeroen Eggermont 2001 for other mutation operators /* This library is free software; you can redistribute it and/or @@ -20,27 +21,114 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk jeggermo@liacs.nl */ //----------------------------------------------------------------------------- -#ifndef eoGpMutate_h -#define eoGpMutate_h - -//----------------------------------------------------------------------------- - -#include -#include -#include - +#ifndef eoParseTreeOp_h +#define eoParseTreeOp_h #include #include -#include -#include -using namespace gp_parse_tree; -using namespace std; +#include + +/** eoSubtreeXOver --> subtree xover +\class eoSubtreeXOver eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree +*/ +template +class eoSubtreeXOver: public eoQuadOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _max_length the maximum size of an individual + */ + eoSubtreeXOver( unsigned _max_length) + : eoQuadOp(), max_length(_max_length) {}; + + /// the ckassname + virtual string className() const { return "eoSubtreeXOver"; }; + + /// Dtor + virtual ~eoSubtreeXOver () {}; + + /** + * Perform crossover on two individuals + * param _eo1 The first parent individual + * param _eo2 The second parent individual + */ + bool operator()(EoType & _eo1, EoType & _eo2 ) + { + int i = rng.random(_eo1.size()); + int j = rng.random(_eo2.size()); + + parse_tree::subtree tmp = _eo1[i]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j] = tmp; + + _eo1.pruneTree(max_length); + _eo2.pruneTree(max_length); + + return true; + } + private: + unsigned max_length; +}; + +/** eoBranchMutation --> replace a subtree with a randomly created subtree +\class eoBranchMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree + */ +template +class eoBranchMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoBranchMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// the class name + virtual string className() const { return "eoBranchMutation"; }; + + /// Dtor + virtual ~eoBranchMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + + EoType eo2; + initializer(eo2); + + int j = rng.random(eo2.size()); + + _eo1[i] = eo2[j]; // insert subtree + + _eo1.pruneTree(max_length); + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; // Additional Mutation operators from // TITLE:"Genetic Programming~An Introduction" @@ -51,7 +139,8 @@ using namespace std; // For the eoParseTree class /** eoPointMutation --> replace a Node with a Node of the same arity -\class eoPointMutation eoGpMutate.h gp/eoGpMutate.h +\class eoPointMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree */ template @@ -59,7 +148,7 @@ class eoPointMutation: public eoMonOp< eoParseTree > { public: - typedef eoParseTree EoType; + typedef eoParseTree EoType; /** * Constructor @@ -107,7 +196,8 @@ private : }; /** eoExpansionMutation --> replace a terminal with a randomly created subtree -\class eoExpansionMutation eoGpMutate.h gp/eoGpMutate.h +\class eoExpansionMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree */ template @@ -174,7 +264,8 @@ private : }; /** eoCollapseSubtree --> replace a subtree with a randomly chosen terminal -\class eoCollapseSubtreeMutation eoGpMutate.h gp/eoGpMutate.h +\class eoCollapseSubtreeMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree */ template @@ -182,7 +273,7 @@ class eoCollapseSubtreeMutation: public eoMonOp< eoParseTree > { public: - typedef eoParseTree EoType; + typedef eoParseTree EoType; /** * Constructor * @param _init An instantiation of eoGpDepthInitializer @@ -236,11 +327,9 @@ private : }; - - - -/** eoHoist --> replace the individual with one of its subtree's -\class eoHoist eoGpMutate.h gp/eoGpMutate.h +/** eoHoistMutation --> replace the individual with one of its subtree's +\class eoHoistMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree */ template @@ -248,9 +337,10 @@ class eoHoistMutation: public eoMonOp< eoParseTree > { public: - typedef eoParseTree EoType; + typedef eoParseTree EoType; /** * Constructor + * @param none */ eoHoistMutation() : eoMonOp() From 88061395f12b6b387c849103f6bdccc4c953f332 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 3 Jul 2001 12:56:44 +0000 Subject: [PATCH 0628/2134] Added the eoPopEvalFunc class: gets the full parents + offspring populations in order to evaluate them. Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as before (it is then encapsulated into an eoPopLoopEval that does the good old loop on the offspring - or directly pass a full eoPopEvalFunc Small modification also in make_op_es -> keyword "none" is now recognized for one of the crossover of either object variables or stdev's --- eo/src/es/make_op_es.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index 91274a24b..40d72ddd5 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -102,8 +102,8 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni // ES crossover eoValueParam& crossTypeParam = _parser.createParam(string("global"), "crossType", "Type of ES recombination (global or standard)", 'C', "Variation Operators"); - eoValueParam& crossObjParam = _parser.createParam(string("discrete"), "crossObj", "Recombination of object variables (discrete or intermediate)", 'O', "Variation Operators"); - eoValueParam& crossStdevParam = _parser.createParam(string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate or discrete)", 'S', "Variation Operators"); + eoValueParam& crossObjParam = _parser.createParam(string("discrete"), "crossObj", "Recombination of object variables (discrete, intermediate or none)", 'O', "Variation Operators"); + eoValueParam& crossStdevParam = _parser.createParam(string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate, discrete or none)", 'S', "Variation Operators"); // The pointers: first the atom Xover eoBinOp *ptObjAtomCross = NULL; @@ -116,12 +116,16 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni ptObjAtomCross = new eoDoubleExchange; else if (crossObjParam.value() == string("intermediate")) ptObjAtomCross = new eoDoubleIntermediate; + else if (crossObjParam.value() == string("none")) + ptObjAtomCross = new eoBinCloneOp; else throw runtime_error("Invalid Object variable crossover type"); if (crossStdevParam.value() == string("discrete")) ptStdevAtomCross = new eoDoubleExchange; else if (crossStdevParam.value() == string("intermediate")) ptStdevAtomCross = new eoDoubleIntermediate; + else if (crossStdevParam.value() == string("none")) + ptStdevAtomCross = new eoBinCloneOp; else throw runtime_error("Invalid mutation strategy parameter crossover type"); // and build the indi Xover From 963683996d6143c4422661bfd0eed2d0187006a1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 4 Jul 2001 04:44:30 +0000 Subject: [PATCH 0629/2134] Adding eoPopEvalFunc, that handles evaluation globally: it receives two populations, parents and offspring, and does whatever necessary. The subclass eoPopLoopEval does the simple loop on the offspring. eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. --- eo/src/eo | 4 +- eo/src/eoEasyEA.h | 48 +++++++++++++++++--- eo/src/eoPopEvalFunc.h | 100 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+), 9 deletions(-) create mode 100644 eo/src/eoPopEvalFunc.h diff --git a/eo/src/eo b/eo/src/eo index ca2c49c22..cdab6e9d5 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -60,8 +60,8 @@ // population #include -// Evaluation functions -#include +// Evaluation functions (all include eoEvalFunc.h) +#include #include // Continuators - all include eoContinue.h diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index c762b8ee0..422d90dad 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -42,20 +42,47 @@ and any selection transformation, merging and evaluation algorithms; you can even change in runtime parameters of those sub-algorithms + +Change (MS, July 3. 2001): + Replaced the eoEvalFunc by an eoPopEvalFunc: this immediately + allows many useful constructs, such as co-evolution (e.g. game players), + parisian approach (the solution to the problem is the whole population) + or simple distribution of evaluations on a cluster. + In case an eoEvalFunc is passed, it is embedded on an eoPopLoopEval + This makes things a little uglier (required an additional "dummy" member + +Note: it looks ugly only because we wanted to authorize many different + constructors. Please only look at the operator() and there shall be light */ template class eoEasyEA: public eoAlgo { public: - /// Ctor taking a breed and merge. + /** Ctor taking a breed and merge */ eoEasyEA( eoContinue& _continuator, eoEvalFunc& _eval, eoBreed& _breed, eoReplacement& _replace ) : continuator(_continuator), - eval(_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace) + {} + + /** NEW Ctor taking a breed and merge and an eoPopEval */ + eoEasyEA( + eoContinue& _continuator, + eoPopEvalFunc& _eval, + eoBreed& _breed, + eoReplacement& _replace + ) : continuator(_continuator), + loopEval(dummyEval), + popEval(_eval), selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(dummyMerge, dummyReduce), @@ -70,7 +97,8 @@ template class eoEasyEA: public eoAlgo eoMerge& _merge, eoReduce& _reduce ) : continuator(_continuator), - eval(_eval), + loopEval(_eval), + popEval(loopEval), selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(_merge, _reduce), @@ -85,7 +113,8 @@ template class eoEasyEA: public eoAlgo eoTransform& _transform, eoReplacement& _replace ) : continuator(_continuator), - eval(_eval), + loopEval(_eval), + popEval(loopEval), selectTransform(_select, _transform), breed(selectTransform), mergeReduce(dummyMerge, dummyReduce), @@ -101,7 +130,8 @@ template class eoEasyEA: public eoAlgo eoMerge& _merge, eoReduce& _reduce ) : continuator(_continuator), - eval(_eval), + loopEval(_eval), + popEval(loopEval), selectTransform(_select, _transform), breed(selectTransform), mergeReduce(_merge, _reduce), @@ -125,7 +155,7 @@ template class eoEasyEA: public eoAlgo breed(_pop, offspring); - apply(eval, offspring); + popEval(_pop, offspring); // eval of parents + offspring if necessary replace(_pop, offspring); // after replace, the new pop. is in _pop @@ -154,9 +184,13 @@ template class eoEasyEA: public eoAlgo class eoDummyTransform : public eoTransform { public : void operator()(eoPop&) {} } dummyTransform; + class eoDummyEval : public eoEvalFunc + {public: void operator()(EOT &) {} } dummyEval; eoContinue& continuator; - eoEvalFunc& eval; + + eoPopLoopEval loopEval; + eoPopEvalFunc& popEval; eoSelectTransform selectTransform; eoBreed& breed; diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h new file mode 100644 index 000000000..e825b834d --- /dev/null +++ b/eo/src/eoPopEvalFunc.h @@ -0,0 +1,100 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoPopEvalFunc.h + Abstract class for global evaluation of the population + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoPopEvalFunc_H +#define eoPopEvalFunc_H + +#include + +/** eoPopEvalFunc: This abstract class is for GLOBAL evaluators + * of a population after variation. + * It takes 2 populations (typically the parents and the offspring) + * and is suppposed to evaluate them alltogether + * + * Basic use: apply an embedded eoEvalFunc to the offspring + * + * Time-varying fitness: apply the embedded eoEvalFunc to both + * offspring and parents + * + * Advanced uses: Co-evolution or "parisian" approach, or ... + * + * Basic parallelization (synchronous standard evolution engine): + * call the slaves and wait for the results + */ +template +class eoPopEvalFunc : public eoBF & , eoPop &, void> +{}; + +///////////////////////////////////////////////////////////// +// eoPopLoopEval +///////////////////////////////////////////////////////////// + +/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies + * a private eoEvalFunc to all offspring + */ +template +class eoPopLoopEval : public eoPopEvalFunc { +public: + /** Ctor: set value of embedded eoEvalFunc */ + eoPopLoopEval(eoEvalFunc & _eval) : eval(_eval) {} + + /** Do the job: simple loop over the offspring */ + void operator()(eoPop & _parents, eoPop & _offspring) + { + apply(eval, _offspring); + } + +private: + eoEvalFunc & eval; +}; + +///////////////////////////////////////////////////////////// +// eoTimeVaryingLoopEval +///////////////////////////////////////////////////////////// + +/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies + * a private eoEvalFunc to all offspring AND ALL PARENTS + * as the fitness is supposed here to vary + */ +template +class eoTimeVaryingLoopEval : public eoPopEvalFunc { +public: + /** Ctor: set value of embedded eoEvalFunc */ + eoTimeVaryingLoopEval(eoEvalFunc & _eval) : eval(_eval) {} + + /** Do the job: simple loop over the offspring */ + void operator()(eoPop & _parents, eoPop & _offspring) + { + apply(eval, _parents); + apply(eval, _offspring); + } + +private: + eoEvalFunc & eval; +}; + +#endif + From 7ac99966757e2c2f6dde92f224331ced63bea9c8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 4 Jul 2001 04:59:02 +0000 Subject: [PATCH 0630/2134] Oups! --- eo/src/eoEasyEA.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 422d90dad..b675ea787 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include From 6c969bfbce5764097698d1d8f5b9035f015682aa Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 11 Jul 2001 06:26:11 +0000 Subject: [PATCH 0631/2134] Suppressed the gene mutations, as they are now in eoFlOrMonOp.h --- eo/src/eoVariableLengthMutation.h | 96 +++---------------------------- 1 file changed, 7 insertions(+), 89 deletions(-) diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index b9c089f48..d9125d210 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-04-24 04:52:04 $ $Version$ $Author: evomarc $ + CVS Info: $Date: 2001-07-11 06:26:11 $ $Version$ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -34,94 +34,13 @@ /** Base classes for generic mutations on variable length chromosomes. + Contains addition and deletion of a gene -THey all require a generic mutation for their simple genes + The generic mutations that apply a gene-level mutation to some genes + dont't modify the length, and so are NOT specific to variable-length + Hence they are in file eoFlOr MonOp.h file (FixedLengthOrdered mutations) */ -/** THis ones applies its atomic mutation to all the genes - */ -template -class eoVlAllMutation : public eoMonOp -{ -public : - - typedef typename EOT::AtomType AtomType; - - // default ctor: requires an Atom mutation - eoVlAllMutation(eoMonOp & _atomMutation) : - atomMutation(_atomMutation) {} - - bool operator()(EOT & _eo) - { - bool modified=false; - for (unsigned i=0; i<_eo.size(); i++) - { - if (atomMutation(_eo[i])) - modified = true; - } - return modified; - } -private: - eoMonOp & atomMutation; -}; - -/** THis ones applies its atomic mutation depending on a probability - */ -template -class eoVlRateMutation : public eoMonOp -{ -public : - - typedef typename EOT::AtomType AtomType; - - // default ctor: requires an Atom mutation - eoVlRateMutation(eoMonOp & _atomMutation, double _rate=0.0) : - atomMutation(_atomMutation), rate( _rate ) {} - - bool operator()(EOT & _eo) - { - bool modified=false; - typename EOT::iterator i; - for ( i = _eo.begin(); i != _eo.end(); i ++ ) - if ( rng.flip( rate ) ) { - modified |= atomMutation( *i ); - } - return modified; - } -private: - double rate; - eoMonOp & atomMutation; -}; - -/** This ones applies its atomic mutation to a fixed - number of genes (1 by default) - */ -template -class eoVlKMutation : public eoMonOp -{ -public : - - typedef typename EOT::AtomType AtomType; - - // default ctor: requires an Atom mutation - eoVlKMutation(eoMonOp & _atomMutation, unsigned _nb=1) : - nb(_nb), atomMutation(_atomMutation) {} - - bool operator()(EOT & _eo) - { - bool modified=false; - for (unsigned k=0; k & atomMutation; -}; /** Addition of a gene Is inserted at a random position - so can be applied to both @@ -157,12 +76,12 @@ private: eoInit & atomInit; }; -//* A helper class for choosing which site to delete +/** A helper class for choosing which site to delete */ template class eoGeneDelChooser : public eoUF {}; -//* Unifirm choice of gene to delete +/** Uniform choice of gene to delete */ template class eoUniformGeneChooser: public eoGeneDelChooser { @@ -201,7 +120,6 @@ public : nMin(_nMin), uChooser(), chooser(uChooser) {} /** Do the job (delete one gene) - * @param _eo the EO to mutate */ bool operator()(EOT & _eo) From 21e42be6d3dd284b38a4872ca2033080e7e3122c Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 17 Jul 2001 08:58:52 +0000 Subject: [PATCH 0632/2134] small documentation change for eoParseTree.h. added a depth initializer for strongly typed genetic programming added subtree xover for strongly typed genetic programming added branch mutation for strongly typed genetic programming added point mutation for strongly typed genetic programming added hoist mutation for strongly typed genetic programming --- eo/src/gp/eoParseTree.h | 2 +- eo/src/gp/eoStParseTreeDepthInit.h | 191 +++++++++++++++++ eo/src/gp/eoStParseTreeOp.h | 315 +++++++++++++++++++++++++++++ 3 files changed, 507 insertions(+), 1 deletion(-) create mode 100644 eo/src/gp/eoStParseTreeDepthInit.h create mode 100644 eo/src/gp/eoStParseTreeOp.h diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 971814798..4aa82219e 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -40,7 +40,7 @@ using namespace std; /** \defgroup ParseTree - Various functions for a tree-based Genetic Programming + Various functions for tree-based Genetic Programming */ /** eoParseTree : implementation of parse-tree for genetic programming diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h new file mode 100644 index 000000000..f17ad00d3 --- /dev/null +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -0,0 +1,191 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStDepthInit.h : initializor strongly type GP +// (c) Jeroen Eggermont 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl + + */ +//----------------------------------------------------------------------------- + +#ifndef eoStParseTreeDepthInit_h +#define eoStParseTreeDepthInit_h + +#include +#include +#include +#include + + +using namespace gp_parse_tree; +using namespace std; + +#define TERMINAL 0 + +#define NONTERMINAL 4 +#define ALL 5 + + /** +\defgroup StParseTree + + Various functions for strongly typed tree-based Genetic Programming. + The StParseTree functions use the same eoParseTree class for the + individual but now each node class must have two additional functions. + \li int type(void) which returns the return type of the node + \li int type(int child) which returns the required type for child 0, 1 or 2 + + Tree pruning strongly typed trees is not possible at the moment. +*/ + +/** eoStDepthInit : the initializer class for strongly typed tree-based genetic programming +\class eoStDepthInit eoStDepthInit.h gp/eoStDepthInit.h +\ingroup StParseTree +*/ + +template +class eoStDepthInit : public eoInit< eoParseTree > +{ + public : + + typedef eoParseTree EoType; + + /** + * Constructor + * @parm _max_depth The maximum depth of a tree + * @param _initializor A vector containing the possible nodes + * @param _grow False results in a full tree, True result is a randomly grown tree + */ + eoStDepthInit( + unsigned _max_depth, + const vector& _node, + const int& _return_type, + bool _grow = true) + : + eoInit(), + max_depth(_max_depth), + return_type(_return_type), + grow(_grow) + { + if(_node.empty()) + { + throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); + } + + + unsigned int i=0; + int arity=0; + int type=0; + vector node_vector; + for(i=0; i < _node.size(); i++) + { + arity = _node[i].arity(); + type = _node[i].type(); + if(arity==0) + { + node_vector = node[type][TERMINAL]; + node_vector.push_back(_node[i]); + node[type][TERMINAL]= node_vector; + } + else + //if (arity != 0) // non-terminal + { + node_vector = node[type][NONTERMINAL]; + node_vector.push_back(_node[i]); + node[type][NONTERMINAL] = node_vector; + } + node_vector = node[type][ALL]; + node_vector.push_back(_node[i]); + node[type][ALL] = node_vector; + + } + + + } + /// My class name + virtual string className() const { return "eoStDepthInit"; }; + + /**initialize a tree + * @param _tree : the tree to be initialized + */ + void operator()(EoType& _tree) + { + list sequence; + bool good_tree = false; + do + { + sequence.clear(); + good_tree = generate(sequence, max_depth, return_type); + }while (!good_tree); + + parse_tree tmp(sequence.begin(), sequence.end()); + _tree.swap(tmp); + } + private : + bool generate(list& sequence, int the_max, int request_type) + { + + int selected=0; + bool ok = true; + + if (the_max == 1) + { // generate terminals only + if( node[request_type][TERMINAL].empty() ) // no possible terminal node of this type + return false; // we have an invalid tree + else + { + selected = rng.random((node[request_type][TERMINAL]).size()); + sequence.push_front(node[request_type][TERMINAL][selected]); + return true; + } + + } + + int arity=0; + if (grow) + { + selected = rng.random((node[request_type][ALL]).size()); + arity = node[request_type][ALL][selected].arity(); + sequence.push_front(node[request_type][ALL][selected]); + for (int i = 0; i < arity; ++i) + ok &= generate(sequence, the_max - 1, node[request_type][ALL][selected].type(i)); + } + else // full + { + selected = rng.random((node[request_type][NONTERMINAL]).size()); + arity = node[request_type][NONTERMINAL][selected].arity(); + sequence.push_front(node[request_type][NONTERMINAL][selected]); + for (int i = 0; i < arity; ++i) + ok &=generate(sequence, the_max - 1, node[request_type][NONTERMINAL][selected].type(i)); + } + + return ok; + + } + + + + + unsigned max_depth; + map < int, map < int, vector > > node; + + int return_type; + bool grow; +}; + +#endif diff --git a/eo/src/gp/eoStParseTreeOp.h b/eo/src/gp/eoStParseTreeOp.h new file mode 100644 index 000000000..c2e975217 --- /dev/null +++ b/eo/src/gp/eoStParseTreeOp.h @@ -0,0 +1,315 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStParseTreeOp.h : crossover and mutation operators for the strongly typed GP +// (c) Jeroen Eggermont 2001 for other mutation operators + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + jeggermo@liacs.nl + */ +//----------------------------------------------------------------------------- + +#ifndef eoStParseTreeOp_h +#define eoStParseTreeOp_h + +#include +#include +#include +#include + +#include + +// a help function +template +void get_possible_nodes(const EOT &_eo, vector &possible_nodes, const int type) +{ + int n=0; + possible_nodes.clear(); + // collect the possible crossover points in _eo (nodes with the same type) + for(n=0; n < _eo.size(); n++) + if (type == _eo[n]->type()) + possible_nodes.push_back(n); +} + + +/** eoStSubtreeXOver --> subtree xover for strongly typed tree-based genetic programming +\class eoStSubtreeXOver eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree +*/ +template +class eoStSubtreeXOver: public eoQuadOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _max_length the maximum size of an individual + */ + eoStSubtreeXOver( unsigned _max_length) + : eoQuadOp(), max_length(_max_length) {}; + + /// the ckassname + virtual string className() const { return "eoStSubtreeXOver"; }; + + /// Dtor + virtual ~eoStSubtreeXOver () {}; + + /** + * Perform crossover on two individuals + * param _eo1 The first parent individual + * param _eo2 The second parent individual + */ + bool operator()(EoType & _eo1, EoType & _eo2 ) + { + int i = 0; + vector nodes; + int n = 0; + int type = 0; + int j = 0; + set test; + do + { + do // select a random node in _eo1 as crossover point, and check if we didn't try it already + { + i = rng.random(_eo1.size()); + }while(test.count(i) > 0); + + test.insert(i); + + type = _eo1[i]->type(); + + get_possible_nodes(_eo2, nodes, type); + + }while(nodes.empty() && (test.size() < _eo1.size())); + + if (nodes.empty()) // we failed to select a crossover point but tried all points (test.size() == _eo1.size()). + return true; // should this be false ?? + + // we did find at least one possible crossover point in _eo2 + + n = rng.random(nodes.size()); + j = nodes[n]; + + parse_tree::subtree tmp = _eo1[i]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j] = tmp; + + // we can't prune anymore + /* + _eo1.pruneTree(max_length); + _eo2.pruneTree(max_length); + */ + + return true; + } + private: + unsigned max_length; +}; + +/** eoStBranchMutation --> replace a strongly typed subtree with a randomly created strongly typed subtree +\class eoStBranchMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree + */ +template +class eoStBranchMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoStBranchMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// the class name + virtual string className() const { return "eoStBranchMutation"; }; + + /// Dtor + virtual ~eoStBranchMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + vector nodes; + int type = _eo1[i]->type(); + int j=0; + int n=0; + + EoType eo2; + + do + { + initializer(eo2); + get_possible_nodes(eo2, nodes, type); + }while (nodes.empty()); + + n = rng.random(nodes.size()); + j = nodes[n]; + + _eo1[i] = eo2[j]; // insert subtree + + // no more pruning + /* + _eo1.pruneTree(max_length); + */ + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + + +/** eoStPointMutation --> replace a Node with a Node of the same arity and type +\class eoStPointMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree + */ +template +class eoStPointMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _initializor The vector of Nodes given to the eoGpDepthInitializer + */ + eoStPointMutation( vector& _node) + : eoMonOp() + { + unsigned int i=0; + int arity=0; + int type=0; + vector node_vector; + for(i=0; i < _node.size(); i++) + { + arity = _node[i].arity(); + type = _node[i].type(); + + node_vector = node[type][arity]; + node_vector.push_back(_node[i]); + node[type][arity]= node_vector; + + }; + }; + + /// the class name + virtual string className() const { return "eoStPointMutation"; }; + + /// Dtor + virtual ~eoStPointMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + // select a random node i that is to be mutated + int i = rng.random(_eo1.size()); + int arity = _eo1[i].arity(); + int type = _eo1[i]->type(); + int j = rng.random(node[type][arity].size()); + + + _eo1[i] = node[type][arity][j]; + return true; + } + +private : + + map < int, map < int, vector > > node; +}; + + + /** eoStHoistMutation --> replace the individual with one of its strongly typed subtree's +\class eoStHoistMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree + */ +template +class eoStHoistMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoStDepthInit + * @param _max_length the maximum size of an individual + */ + eoStHoistMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// the class name + virtual string className() const { return "eoStHoistMutation"; }; + + /// Dtor + virtual ~eoStHoistMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + + vector nodes; + // get the type of the current tree + int type = _eo1[ _eo1.size() - 1 ]->type(); + + + + do + { + initializer(eo2); + get_possible_nodes(eo2, nodes, type); + }while (nodes.empty()); + + // select a subtree-node to replace the current tree + int n = rng.random(nodes.size()); + int i = nodes[n]; + + EoType eo2(_eo1[i]); + + _eo1 = eo2; + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + + +#endif From af9155765609aaad5f8281694c67db94b3ac27f5 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 17 Jul 2001 13:06:28 +0000 Subject: [PATCH 0633/2134] check for the existence of isinf didn't work the way it should so it has been removed --- eo/app/gpsymreg/fitness.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h index eca800f08..35563599a 100644 --- a/eo/app/gpsymreg/fitness.h +++ b/eo/app/gpsymreg/fitness.h @@ -202,14 +202,11 @@ class RegFitness: public eoEvalFunc< eoParseTree > fit += pow(target - output, 2); } - // check if the fitness is valid // some versions of gcc (e.g. 2.95.2 on solaris) don't have isinf(x) defined - #ifdef isinf if (isinf(fit) == 0) fitness[NORMAL] = fit; else fitness[NORMAL] = MAXFLOAT; - #endif fitness[SMALLESTSIZE] = _eo.size() / (1.0*parameter.MaxSize); _eo.fitness(fitness); From bb658f550ce2470eba74d17c1c5d84340cba33ba Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:35:58 +0000 Subject: [PATCH 0634/2134] Changed the wrong #ifdef in make_algo_scalar (+ minor comments elsewhere) --- eo/src/do/Readme | 9 +- eo/src/do/make_algo_scalar.h | 8 +- eo/src/do/make_checkpoint.h | 43 +---- eo/src/do/make_checkpoint_FDC.h | 298 ++++++++++++++++++++++++++++++++ 4 files changed, 311 insertions(+), 47 deletions(-) create mode 100644 eo/src/do/make_checkpoint_FDC.h diff --git a/eo/src/do/Readme b/eo/src/do/Readme index 70b1d9c00..cd3e5acd5 100644 --- a/eo/src/do/Readme +++ b/eo/src/do/Readme @@ -1,5 +1,5 @@ This directory contains templatized code that is supposed to be -instanciated and compiled in an actual library for every type of EOType +instanciated and compiled in an actual library for every type of EOT The user can then modify and recompile only the part he/she wishes to change (as in any library!). @@ -19,15 +19,18 @@ is defined make_algo_scalar.h The selection/replacement for scalar fitnesses make_checkpoint.h The output facilities make_continue.h The stpping criteria -make_help.cpp Help on demand (+ status file) make_pop.h Init of the population (from an EOT initializer) make_run.h Run the algorithm +See also (NOW MOVED TO util DIR, as it was useful everywhere) +make_help.cpp Help on demand (+ status file) + Note: +----- two additional make_XXX.h files need to be defined for each representation make_genotype.h Builds an initializer for the corresponding EOType make_op.h Builds a general Operator to be used in the algo MS, April 23, 2001 - + July 23, 2001 diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 95ef3befa..9fcfe806d 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -24,8 +24,8 @@ */ //----------------------------------------------------------------------------- -#ifndef _make_run_h -#define _make_run_h +#ifndef _make_algo_scalar_h +#define _make_algo_scalar_h #include // for eo_is_a_rate // everything tha's needed for the algorithms - SCALAR fitness @@ -70,7 +70,7 @@ */ template -eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _ccontinue, eoGenOp& _op) +eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) { // the selection eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); @@ -182,7 +182,7 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e _state.storeFunctor(breed); // now the eoEasyEA - eoAlgo *algo = new eoEasyEA(_ccontinue, _eval, *breed, *replace); + eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, *replace); _state.storeFunctor(algo); // that's it! return *algo; diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index d9a607466..282997066 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -78,9 +78,6 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat * eoSecondMomentStat: average + stdev - type pair * eoSortedPopStat : whole population - type string (!!) * eoScalarFitnessStat: the fitnesses - type vector - * eoDFCSTat : FDC wrt best in pop or absolute best - type double - * requires an eoDistance. See eoFDCStat.h - * also computes all elements for the FDC scatter plot */ // Best fitness in population @@ -131,7 +128,7 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); if ( printPopParam.value() ) // we do want pop dump { - popStat = new eoSortedPopStat("Dump of whole population"); + popStat = new eoSortedPopStat; // store it _state.storeFunctor(popStat); // add it to the checkpoint @@ -139,24 +136,6 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat } - // the Fitness Distance Correlation - //--------------------------------- - eoValueParam& printFDCParam = _parser.createParam(true, "printFDC", "Print FDC coeff. every gen.", '\0', "Output"); - eoValueParam& plotFDCParam = _parser.createParam(false, "plotFDCStat", "Plot FDC scatter plot", '\0', "Output - Graphical"); - - eoFDCStat *fdcStat = NULL; - if ( printFDCParam.value() || plotFDCParam.value() ) // we need FDCStat - { - // need first an object to compute the distances - here Hamming dist. - eoQuadDistance *dist = new eoQuadDistance; - _state.storeFunctor(dist); - fdcStat = new eoFDCStat(*dist); - // storeFunctor it - _state.storeFunctor(fdcStat); - // add it to the checkpoint - checkpoint->add(*fdcStat); - } - // do we wnat some histogram of fitnesses snpashots? eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); @@ -164,7 +143,7 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat // The monitors /////////////// // do we want an eoStdoutMonitor? - bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() + bool needStdoutMonitor = printBestParam.value() || printPopParam.value() ; // The Stdout monitor will print parameters to the screen ... @@ -185,15 +164,13 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat monitor->add(*bestStat); monitor->add(*secondStat); } - if (printFDCParam.value()) - monitor->add(*fdcStat); if ( printPopParam.value()) monitor->add(*popStat); } // first handle the dir test - if we need at least one file if ( ( fileBestParam.value() || plotBestParam.value() || - plotFDCParam.value() || plotHistogramParam.value() ) + plotHistogramParam.value() ) && !dirOK ) // just in case we add something before dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE @@ -227,20 +204,6 @@ eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _stat gnuMonitor->add(*averageStat); } - if (plotFDCParam.value()) // a specific plot monitor for FDC - { - // first into a file (it adds everything ti itself - eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat, dirNameParam.value()); - _state.storeFunctor(fdcFileSnapshot); - // then to a Gnuplot monitor - eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); - _state.storeFunctor(fdcGnuplot); - - // and of course add them to the checkPoint - checkpoint->add(*fdcFileSnapshot); - checkpoint->add(*fdcGnuplot); - } - // historgram? if (plotHistogramParam.value()) // want to see how the fitness is spread? { diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h new file mode 100644 index 000000000..d9a607466 --- /dev/null +++ b/eo/src/do/make_checkpoint_FDC.h @@ -0,0 +1,298 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_h +#define _make_checkpoint_h + +#include +#include // for minimizing_fitness() +#include +#include +#include + +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); +/////////////////// The checkpoint and other I/O ////////////// + + +template +eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + // first, create a checkpoint from the eoContinue + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + _state.storeFunctor(checkpoint); + + /////////////////// + // Counters + ////////////////// + // is nb Eval to be used as counter? + eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); + + // Create anyway a generation-counter parameter + eoValueParam *generationCounter = new eoValueParam(0, "Gen."); + // Create an incrementor (sub-class of eoUpdater). + eoIncrementor* increment = new eoIncrementor(generationCounter->value()); + // Add it to the checkpoint, + checkpoint->add(*increment); + // and store it in the state + _state.storeFunctor(increment); + + // dir for DISK output + eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + // shoudl we empty it if exists + eoValueParam& eraseParam = _parser.createParam(false, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); + bool dirOK = false; // not tested yet + + ///////////////////////////////////////// + // now some statistics on the population: + ///////////////////////////////////////// + /** + * existing stats as of today, April 10. 2001 + * + * eoBestFitnessStat : best value in pop - type EOT::Fitness + * eoAverageStat : average value in pop - type EOT::Fitness + * eoSecondMomentStat: average + stdev - type pair + * eoSortedPopStat : whole population - type string (!!) + * eoScalarFitnessStat: the fitnesses - type vector + * eoDFCSTat : FDC wrt best in pop or absolute best - type double + * requires an eoDistance. See eoFDCStat.h + * also computes all elements for the FDC scatter plot + */ + + // Best fitness in population + //--------------------------- + eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); + eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output - Graphical"); + eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); + + eoBestFitnessStat *bestStat = NULL; + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) + // we need the bestStat for at least one of the 3 above + { + bestStat = new eoBestFitnessStat; + // store it + _state.storeFunctor(bestStat); + // add it to the checkpoint + checkpoint->add(*bestStat); + } + + // Average fitness alone + //---------------------- + eoAverageStat *averageStat = NULL; // do we need averageStat? + if ( plotBestParam.value() ) // we need it for gnuplot output + { + averageStat = new eoAverageStat; + // store it + _state.storeFunctor(averageStat); + // add it to the checkpoint + checkpoint->add(*averageStat); + } + + // Second moment stats: average and stdev + //--------------------------------------- + eoSecondMomentStats *secondStat = NULL; + if ( printBestParam.value() ) // we need it for sreen output + { + secondStat = new eoSecondMomentStats; + // store it + _state.storeFunctor(secondStat); + // add it to the checkpoint + checkpoint->add(*secondStat); + } + + + // Dump of the whole population + //----------------------------- + eoSortedPopStat *popStat = NULL; + eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); + if ( printPopParam.value() ) // we do want pop dump + { + popStat = new eoSortedPopStat("Dump of whole population"); + // store it + _state.storeFunctor(popStat); + // add it to the checkpoint + checkpoint->add(*popStat); + } + + + // the Fitness Distance Correlation + //--------------------------------- + eoValueParam& printFDCParam = _parser.createParam(true, "printFDC", "Print FDC coeff. every gen.", '\0', "Output"); + eoValueParam& plotFDCParam = _parser.createParam(false, "plotFDCStat", "Plot FDC scatter plot", '\0', "Output - Graphical"); + + eoFDCStat *fdcStat = NULL; + if ( printFDCParam.value() || plotFDCParam.value() ) // we need FDCStat + { + // need first an object to compute the distances - here Hamming dist. + eoQuadDistance *dist = new eoQuadDistance; + _state.storeFunctor(dist); + fdcStat = new eoFDCStat(*dist); + // storeFunctor it + _state.storeFunctor(fdcStat); + // add it to the checkpoint + checkpoint->add(*fdcStat); + } + + // do we wnat some histogram of fitnesses snpashots? + eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); + + /////////////// + // The monitors + /////////////// + // do we want an eoStdoutMonitor? + bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() + || printPopParam.value() ; + + // The Stdout monitor will print parameters to the screen ... + if ( needStdoutMonitor ) + { + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); + + // when called by the checkpoint (i.e. at every generation) + checkpoint->add(*monitor); + + // the monitor will output a series of parameters: add them + monitor->add(*generationCounter); + if (useEvalParam.value()) // we want nb of evaluations + monitor->add(_eval); + if (printBestParam.value()) + { + monitor->add(*bestStat); + monitor->add(*secondStat); + } + if (printFDCParam.value()) + monitor->add(*fdcStat); + if ( printPopParam.value()) + monitor->add(*popStat); + } + + // first handle the dir test - if we need at least one file + if ( ( fileBestParam.value() || plotBestParam.value() || + plotFDCParam.value() || plotHistogramParam.value() ) + && !dirOK ) // just in case we add something before + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + if (fileBestParam.value()) // A file monitor for best & secondMoment + { + string stmp = dirNameParam.value() + "/best.xg"; + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); + // save and give to checkpoint + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + // and feed with some statistics + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + fileMonitor->add(*bestStat); + fileMonitor->add(*secondStat); + } + + if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average + { + string stmp = dirNameParam.value() + "_gnu_best.xg"; + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); + // save and give to checkpoint + _state.storeFunctor(gnuMonitor); + checkpoint->add(*gnuMonitor); + // and feed with some statistics + if (useEvalParam.value()) + gnuMonitor->add(_eval); + else + gnuMonitor->add(*generationCounter); + gnuMonitor->add(*bestStat); + gnuMonitor->add(*averageStat); + } + + if (plotFDCParam.value()) // a specific plot monitor for FDC + { + // first into a file (it adds everything ti itself + eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat, dirNameParam.value()); + _state.storeFunctor(fdcFileSnapshot); + // then to a Gnuplot monitor + eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); + _state.storeFunctor(fdcGnuplot); + + // and of course add them to the checkPoint + checkpoint->add(*fdcFileSnapshot); + checkpoint->add(*fdcGnuplot); + } + + // historgram? + if (plotHistogramParam.value()) // want to see how the fitness is spread? + { + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); + _state.storeFunctor(fitSnapshot); + // add any stat that is a vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + } + + ////////////////////////////////// + // State savers + ////////////////////////////// + + // feed the state to state savers + // save state every N generation + eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); + + if (_parser.isItThere(saveFrequencyParam)) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); + string stmp = dirNameParam.value() + "/generations"; + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } + + // save state every T seconds + eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); + if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + string stmp = dirNameParam.value() + "/time"; + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); + _state.storeFunctor(stateSaver2); + checkpoint->add(*stateSaver2); + } + + // and that's it for the (control and) output + return *checkpoint; +} + +#endif From 0f9f1cc3ea03df50dfa33ba0a311b767d9a080ab Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:37:25 +0000 Subject: [PATCH 0635/2134] Comments update --- eo/src/ga/make_op.h | 2 +- eo/src/ga/make_pop_ga.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 4fc7968c5..40ae2492c 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -75,7 +75,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); if (operatorParam.value() != string("SGA")) - throw runtime_error("Only SGA-like operator available roght now\n"); + throw runtime_error("Only SGA-like operator available right now\n"); // now we read Pcross and Pmut, // the relative weights for all crossovers -> proportional choice diff --git a/eo/src/ga/make_pop_ga.cpp b/eo/src/ga/make_pop_ga.cpp index ae014f4fb..8bbd308d2 100644 --- a/eo/src/ga/make_pop_ga.cpp +++ b/eo/src/ga/make_pop_ga.cpp @@ -24,18 +24,16 @@ */ //----------------------------------------------------------------------------- -/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators +/** This file contains all ***INSTANCIATED DEFINITIONS*** of population init * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in ga.h + * in ga/make_ga.h * while the TEMPLATIZED code is define in make_pop.h in the src/do dir * - * Unlike most EO .h files, it does not (and should not) contain any code, - * just declarations */ // The templatized code From 4f642f848ee297a49548cda67bcbd776bc840d9b Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:40:28 +0000 Subject: [PATCH 0636/2134] Corrected wrong arguments for the 2D Ctor --- eo/src/utils/eoRealVectorBounds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index 8f51d4be5..c29e2fcc8 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -241,7 +241,7 @@ public: /** Ctor, particular case of dim-2 */ eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : - eoRealBaseVectorBounds(_xbounds, _ybounds), factor(1,2), ownedBounds(0) + eoRealBaseVectorBounds(_xbounds, _ybounds), factor(2,1), ownedBounds(0) {} /** Simple bounds = minimum and maximum (allowed) @@ -301,7 +301,7 @@ public: */ virtual void readFrom(string _s) ; - /** overload printOut method to save space */ + /** overload printOn method to save space */ virtual void printOn(ostream& _os) const { if (factor[0]>1) From 62dfe13c3ad1e3392f24f6226e741d575081b577 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:41:34 +0000 Subject: [PATCH 0637/2134] Spotted and commented (but NOT corrected :-( a bug in case the ResDir exists and is empty --- eo/src/utils/make_help.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index 493025d65..32e4a735b 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -94,6 +94,8 @@ bool testDirRes(std::string _dirName, bool _erase) return true; } //else + // WARNING: bug if dir exists and is empty; this says it is not! + // shoudl use scandir instead - no time now :-((( MS Aug. 01 s = "Dir " + _dirName + " is not empty"; throw runtime_error(s); return true; From e79edcffe700ee75432647fc35a54cd0425ef410 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:43:19 +0000 Subject: [PATCH 0638/2134] Added make_help in checkpointing, included stdexcept in eoParam. Comments updates ... --- eo/src/utils/checkpointing | 3 +++ eo/src/utils/eoParam.h | 23 ++++++++++++++++++++ eo/src/utils/eoPopStat.h | 44 ++++++++++++++++++++++---------------- 3 files changed, 51 insertions(+), 19 deletions(-) diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index dfa659349..7e08af367 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -14,3 +14,6 @@ #include #include #include + +// and make_help - any better suggestion to include it? +void make_help(eoParser & _parser); diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index c4f87351e..c0e2d4283 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -32,6 +32,7 @@ #include #include #include +#include #include // for specializations /** eoParam: Base class for monitoring and parsing parameters @@ -215,6 +216,8 @@ void eoValueParam >::setValue(std::string _value) is >> repValue.second; } +// The vector > +////////////////////////////////// /// Because MSVC does not support partial specialization, the vector is a vector of doubles, not a T template <> std::string eoValueParam > >::getValue(void) const @@ -252,6 +255,8 @@ void eoValueParam > >::setValue(std::string _val } } +// The vector +////////////////////////////////// /// Because MSVC does not support partial specialization, the vector is a double, not a T template <> std::string eoValueParam >::getValue(void) const @@ -274,6 +279,8 @@ void eoValueParam >::setValue(std::string _value) std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } +// The vector +////////////////////////////////// /// Because MSVC does not support partial specialization, the vector is a eoMinimizingFitness, not a T template <> std::string eoValueParam >::getValue(void) const @@ -297,6 +304,22 @@ void eoValueParam >::setValue(std::string _valu std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } +// The vector +////////////////////////////////// +template <> +std::string eoValueParam >::getValue(void) const +{ + throw runtime_error("I cannot getValue for a vector"); + return string(""); +} + +template <> +void eoValueParam >::setValue(std::string) +{ + throw runtime_error("I cannot setValue for a vector"); + return; +} + /*template class eoContainerParam : public eoParam { diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 8907ded7d..abe514595 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -65,7 +65,7 @@ that are written by the monitor it is probably used from. void operator()(const eoPop& _pop) { char buffer[1023]; // about one K of space per member - value() = "\n====== Pop dump =====\n"; + value() = "\n# ====== Pop dump =====\n"; unsigned howMany=combien?combien:_pop.size(); for (unsigned i = 0; i < howMany; ++i) { @@ -95,28 +95,34 @@ class eoSortedPopStat : public eoSortedStat { public : /** default Ctor, void string by default, as it appears - on the description line once at beginning of evolution. and - is meaningless there */ - eoSortedPopStat(string _desc ="") : eoSortedStat("", _desc) {} + * on the description line once at beginning of evolution. and + * is meaningless there _howMany defaults to 0, that is, the whole + * population + */ + eoSortedPopStat(unsigned _howMany = 0, string _desc ="") : + eoSortedStat("", _desc) , combien( _howMany) {} -/** Fills the value() of the eoParam with the dump of the population. -Adds a \n before so it does not get mixed up with the rest of the stats -that are written by the monitor it is probably used from. -*/ -void operator()(const vector& _pop) -{ - char buffer[1023]; // about one K of space per member - value() = "\n====== Pop dump =====\n"; - for (unsigned i = 0; i < _pop.size(); ++i) + /** Fills the value() of the eoParam with the dump of the population. + Adds a \n before so it does not get mixed up with the rest of the stats + that are written by the monitor it is probably used from. + */ + void operator()(const vector& _pop) { - std::ostrstream os(buffer, 1022); // leave space for emergency terminate - os << *_pop[i] << endl << ends; + char buffer[1023]; // about one K of space per member + value() = ""; // empty + unsigned howMany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howMany; ++i) + { + std::ostrstream os(buffer, 1022); // leave space for emergency terminate + os << *_pop[i] << endl << ends; - // paranoid: - buffer[1022] = '\0'; - value() += buffer; + // paranoid: + buffer[1022] = '\0'; + value() += buffer; + } } -} +private: + unsigned combien; }; #endif From c352b19799433e881f71333fa7d2fc091c6d59dc Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:45:14 +0000 Subject: [PATCH 0639/2134] In case you are trying to assign a value to a vector of different size, previous versions raised an exception. Now a simple warning is written to stderr - as it might be something you need to do. --- eo/src/eoVector.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 2895999ca..9c43fc6f2 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -22,7 +22,7 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-04-03 10:08:06 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.10 2001-04-03 10:08:06 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2001-09-04 06:45:14 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.11 2001-09-04 06:45:14 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -61,8 +61,13 @@ class eoVector : public EO, public std::vector // with the copy Ctor void value(const std::vector& _v) { - if (_v.size() != size()) - throw runtime_error("Wrong size in vector assignation in eoVector"); + if (_v.size() != size()) // safety check + { + if (size()) // NOT an initial empty vector + cout << "Warning: Changing size in eoVector assignation"< Date: Tue, 4 Sep 2001 06:48:15 +0000 Subject: [PATCH 0640/2134] Added a class that turns an eoInit into a generator of EOT Also added a Ctor of variable length objects that take an eoInit. Some day we might want to clean all that stuff ... unless we leave the choice to the user (but then the documentation shoudl be as clear as glass, which it is not at the moment!) --- eo/src/eoInit.h | 86 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 1e8b0112e..f872c1ddf 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -45,8 +45,32 @@ template class eoInit : public eoUF { public: - virtual void operator()(EOT& chrom) - { cout << "In the eoInit base class" << endl; } + virtual void operator()(EOT& chrom) + { + throw runtime_error("In the eoInit base class"); // just in case + } +}; + +/** turning an eoInit into a generator + * probably we should only use genrators - and suppress eoInit ??? + * MS - July 2001 + */ +template +class eoInitGenerator : public eoF +{ +public: + + /** Ctor from a plain eoInit */ + eoInitGenerator(eoInit & _init):init(_init) {} + + virtual EOT operator()() + { + EOT p; + init(p); + return (p); + } +private: + eoInit & init; }; /** @@ -76,33 +100,51 @@ class eoInitFixedLength: public eoInit }; /** - Initializor for variable length representations with a single type + Initializer for variable length representations with a single type */ -template +template class eoInitVariableLength: public eoInit { - public: - eoInitVariableLength(unsigned _minSize, unsigned _maxSize, Gen _generator = Gen()) - : offset(_minSize), extent(_maxSize - _minSize), generator(_generator) - { - if (_minSize >= _maxSize) - throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); - } +public: +typedef typename EOT::AtomType AtomType; - virtual void operator()(EOT& chrom) - { - chrom.resize(offset + rng.random(extent)); - generate(chrom.begin(), chrom.end(), generator); - chrom.invalidate(); - } +// /** Ctor from a generator */ +// eoInitVariableLength(unsigned _minSize, unsigned _maxSize, eoF & _generator = Gen()) +// : offset(_minSize), extent(_maxSize - _minSize), +// repGenerator( eoInitGenerator(*(new eoInit)) ), +// generator(_generator) +// { +// if (_minSize >= _maxSize) +// throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); +// } - private : - unsigned offset; - unsigned extent; - Gen generator; + /** Ctor from an eoInit */ + eoInitVariableLength(unsigned _minSize, unsigned _maxSize, eoInit & _init) + : offset(_minSize), extent(_maxSize - _minSize), init(_init) + { + if (_minSize >= _maxSize) + throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); + } + + + virtual void operator()(EOT& _chrom) + { + _chrom.resize(offset + rng.random(extent)); + vector::iterator it; + for (it=_chrom.begin(); it<_chrom.end(); it++) + init(*it); + _chrom.invalidate(); + } + + // accessor to the atom initializer (needed by operator constructs sometimes) + const eoInit & atomInit() {return init;} + +private : + unsigned offset; + unsigned extent; + eoInit & init; }; - /** eoInitAdaptor changes the place in the hierarchy from eoInit to eoMonOp. This is mainly a type conversion, From 5fb8958b2898f2893dee890bcc91f8487bf4715c Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:50:42 +0000 Subject: [PATCH 0641/2134] Included apply.h for consistency (though in most cases it was included from eo file --- eo/src/eoPopEvalFunc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index e825b834d..e03279225 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -28,6 +28,7 @@ #define eoPopEvalFunc_H #include +#include /** eoPopEvalFunc: This abstract class is for GLOBAL evaluators * of a population after variation. From f69b785b39d889a57508f503663f268b5c0bef7a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 06:51:59 +0000 Subject: [PATCH 0642/2134] Modified the className() method so that the Atom underlying operator is listed --- eo/src/eoVariableLengthCrossover.h | 26 ++++++++++++++++++++++++-- eo/src/eoVariableLengthMutation.h | 21 +++++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 304583a20..9f3af2058 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-03-21 13:35:09 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.6 2001-03-21 13:35:09 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2001-09-04 06:51:59 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.7 2001-09-04 06:51:59 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -45,6 +45,7 @@ class eoAtomExchange : public eoBF public: // a function to initlialize - to be called before every crossover virtual void randomize(unsigned int, unsigned int){} + virtual string className() const=0; }; /** Uniform crossover - well, not really for FixedLength */ @@ -68,6 +69,9 @@ public: { return mask[_i]; } + + virtual string className() const {return "eoUniformAtomExchange";} + private: double rate; vector mask; @@ -143,11 +147,21 @@ public : _eo2.swap(tmp2); return true; // should we test that? Yes, but no time now } + + virtual string className() const + { + char s[1024]; + ostrstream os(s, 1022); + os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")" << ends; + return string(s); + } + private: unsigned Min, Max; eoAtomExchange & atomExchange; }; -/** Exchange Crossover using an AtomExchange + +/** Crossover using an AtomCrossover (probably irrelevant in Variable Length) */ template @@ -173,6 +187,14 @@ public : } return changed; // should we test that? Yes, but no time now } + + virtual string className() const + { + char s[1024]; + ostrstream os(s, 1022); + os << "eoInnerExchangeQuadOp(" << atomExchange.className() << ")" << ends; + return string(s); + } private: float rate; eoQuadOp & op; diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index d9125d210..6e4d37ba5 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-07-11 06:26:11 $ $Version$ $Author: evomarc $ + CVS Info: $Date: 2001-09-04 06:51:59 $ $Version$ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -71,6 +71,9 @@ public : _eo.insert(_eo.begin()+pos, atom); return true; } + + virtual string className() const { return "eoVlAddMutation"; } + private: unsigned nMax; eoInit & atomInit; @@ -79,7 +82,11 @@ private: /** A helper class for choosing which site to delete */ template class eoGeneDelChooser : public eoUF -{}; +{ +public: + virtual string className() const =0; + +}; /** Uniform choice of gene to delete */ template @@ -91,6 +98,7 @@ public: { return eo::rng.random(_eo.size()); } + virtual string className() const { return "eoUniformGeneChooser"; } }; /** Deletion of a gene @@ -130,6 +138,15 @@ public : _eo.erase(_eo.begin()+pos); return true; } + + virtual string className() const + { + char s[1024]; + ostrstream os(s, 1022); + os << "eoVlDelMutation(" << chooser.className() << ")" << ends; + return string(s); + } + private: unsigned nMin; eoUniformGeneChooser uChooser; From 7bbdd173078cf7acbd35c2f1075ec8767dca103a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 4 Sep 2001 08:35:22 +0000 Subject: [PATCH 0643/2134] Added many template files, and totally modified the comments in most other. This was when preparing Evonet Summer School - though it finally was not used there! --- eo/tutorial/Templates/Makefile.tmpl | 25 ++ eo/tutorial/Templates/README | 125 +++++++ eo/tutorial/Templates/binCrossover.tmpl | 62 ++-- eo/tutorial/Templates/continue.tmpl | 45 ++- eo/tutorial/Templates/create.sh | 13 + eo/tutorial/Templates/eoMyStruct.tmpl | 78 +++++ eo/tutorial/Templates/eoMyStructEA.cpp | 321 ++++++++++++++++++ eo/tutorial/Templates/evalFunc.tmpl | 65 ++++ eo/tutorial/Templates/init.tmpl | 57 ++++ .../lessOffspringExternalSelectorGenOp.tmpl | 13 +- .../lessOffspringSameSelectorGenOp.tmpl | 17 +- eo/tutorial/Templates/moreOffspringGenOp.tmpl | 17 +- eo/tutorial/Templates/mutation.tmpl | 56 +-- eo/tutorial/Templates/quadCrossover.tmpl | 57 ++-- 14 files changed, 855 insertions(+), 96 deletions(-) create mode 100644 eo/tutorial/Templates/Makefile.tmpl create mode 100644 eo/tutorial/Templates/README create mode 100755 eo/tutorial/Templates/create.sh create mode 100644 eo/tutorial/Templates/eoMyStruct.tmpl create mode 100644 eo/tutorial/Templates/eoMyStructEA.cpp create mode 100644 eo/tutorial/Templates/evalFunc.tmpl create mode 100644 eo/tutorial/Templates/init.tmpl diff --git a/eo/tutorial/Templates/Makefile.tmpl b/eo/tutorial/Templates/Makefile.tmpl new file mode 100644 index 000000000..9975023ca --- /dev/null +++ b/eo/tutorial/Templates/Makefile.tmpl @@ -0,0 +1,25 @@ +# sample makefile for building an EA evolving a new genotype + +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I../Points -I./Sol -I./util -Wall -g -c $*.cpp + + +# START eventually modify the name of EO dir +DIR_EO = ../../src +# END eventually modify the name of EO dir + +LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +ALL = eoMyStructEA + +eoMyStructEA : eoMyStructEA.o + c++ -g -o $@ eoMyStructEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + +tar : ; tar czvf climat.tgz *.h *.cpp Makefile + +all : $(ALL) + +clean : ; /bin/rm *.o $(ALL) + + diff --git a/eo/tutorial/Templates/README b/eo/tutorial/Templates/README new file mode 100644 index 000000000..9ef2dde88 --- /dev/null +++ b/eo/tutorial/Templates/README @@ -0,0 +1,125 @@ +This directory contains sample files that should make it easy to +create an EO algorithm to evolve any type of structure +(EO comes with two examples, bitstrings and vector of real variables, +so you'll need this qs soon as you want to evolve something else). + +At the moment, only algorithms involving a scalar fitness (double) +are implemented (see test dir for Pareto optimization of multiple- +objective fitness - or be patient :-) + +This file will help you to build the same algorithm than the ones +in the Lesson4 of the tutorial, but with YOUR genotype instead of +*bitstrings or vector + +It is assumed in the following that you have read the first part of +the tutorial (Lessons 1 to 4). + +Creating the algorithm for your genotype +---------------------------------------- +In what follows, we will suppose that you want to evolve some data +structure, and that you have enough programming skills to be able to +write C code for its random initilialization, its crossover, its +mutation and the computation of its fitness. + +The helper script create.sh will create for you the files you need +from teh examples in tutorial/Templates dir, and all you'll have to do +is to include the actual code where indicated in those files (between +keywords START and END). + +First, let's choose a name: let's call the new EO class eoAppli. +All newly created classes will be named eoApplicationXXX (in the file +eoApplicationXXX) + +1- create a directory for your application in the tutorial dir, "parallel" to +the LessonX dirs (though any name can do, of course, we will suppose +its full name, from the / root dir, is APPLICATION in what follows) + +2- cd to the tutorial/Templates dir + +3- run the helper script create.sh with the following arguments + create.sh Appli APPLICATION + +4- cd to the APPLICATION dir. You should see there the following +files: + Makefile with default target eoAppliEA + eoAppli.h class eoAppli, FitT = template fitness + eoAppliEA.cpp the main file, includes all other, to be compiled + eoAppliEvalFunc.h class for the computation of fotness + eoAppliInit.h class for genotype initlialization + eoAppliMutation.h class for mutation + eoAppliQuadCrossover.h class for (quadratic) crossover + +Note: You can go directly to step 6 and 7: you'll get a lot of +warnings, but will be able to run an EA that does nothing! + +5- Edit those files one after the other and add you code where +indicated (look for keywords START and END and modify code in +between). + +Note: If your APPLICATION dir is in the tutorial dir, you don't need +to modify Makefile. + +6- Compile eoAppliEA.cpp: + + % make + +7- Run the resulting program: + + % eoAppliEA + +The default output is one line per generation with the generation +number, the number of evaluations performed, the best and average +fitnesses in the population. +The algorithm stops by default after 100 generations. + +8- Customize the parameters: copy eoAppliEA.status into +e.g. eoAppliEA.param, edit eoAppliEA.param (uncomment the lines you +want to become active), and run + + % eoAppliEA @eoAppliEA.param + +(see the Lesson 4 of the tutorial for more details now). + +HINTS +----- + +1- All new classes you will create probably require some parameters in +the constructor, and some (if not all) thoses parameters are likele to +be user parameter: you can either read them in the main file (as is +done in the sample eoAppliEA.cpp) or pass the eoParser to the +constructor of the class, and read the parameter from the parser. + +2- If you stick to privacy for the data in your EO class, you will +probably need to write accessors to those data, as well as some public +methods to modify them. + +3- The sample eoAppliEA.cpp supposes that you ony have one crossover +and one mutation operator. However, the code for multiple operators +is there: you can have for instance 2 crossover operators, and choose +among them according to relative weights (proportional choice) - same +for mutation. Look at the operator section in eoAppliEA.cpp +In particular, the user parameter mutationRate is totally useless for +a single operator, and is there only as a provision for using more +than one. + +To add another operator, you have to create another class by mimicking +what has been done for the first operator. +For instance, let's suppose you want to create another mutation. + +* duplicate the code for eoAppliMutation class +* in the second version, change the class name (eoAppliMutation) into +another name (let's say eoAppliBetterMutation) - you must change the +name in the class declaration, in the constructor and in the +className() method. +* in the new eoAppliBetterMutation class, change the code for the +operator() - and eventually the code for the constructor. +* in the eoAppliEA.cpp file, in the mutation section, uncomment the +lines + eoMyStructSecondMutation mut2(varType _anyVariable); + double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(mut2, mut2Rate); + +and change the name of the class from eoAppliSecondMutation to your +name eoAppliBetterMutation (you can also change the keyword from +mut2Rate to something more meaningful like BetterMutationRate). +You're done! diff --git a/eo/tutorial/Templates/binCrossover.tmpl b/eo/tutorial/Templates/binCrossover.tmpl index b90729b29..5adabe688 100644 --- a/eo/tutorial/Templates/binCrossover.tmpl +++ b/eo/tutorial/Templates/binCrossover.tmpl @@ -1,54 +1,70 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -The above line is usefulin Emacs-like editors +The above line is useful in Emacs-like editors */ /* Template for simple binary crossover operators ============================================== -Binary crossover operators modify the first parent only, +Binary crossover operators modify the first genotype only, based on the second */ -#ifndef eoMyDerivedBinOp_H -#define eoMyDerivedBinOp_H +#ifndef eoMyStructBinCrossover_H +#define eoMyStructBinCrossover_H #include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ -template -class eoMyDerivedBinOp: public eoBinOp + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoMyStructBinCrossover: public eoBinOp { public: /** - * (Default) Constructor. + * Ctor - no requirement */ - eoMyDerivedBinOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} +// START eventually add or modify the anyVariable argument + eoMyStructBinCrossover() + // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } /// The class name. Used to display statistics - string className() const { return "eoMyDerivedBinOp"; } + string className() const { return "eoMyStructBinCrossover"; } /** - * eoBin crossover - modifies first parent only - * @param Indi1 The first parent - * @param Indi2 The second parent - const + * binCrossover - modifies first genotype only + * @param _genotype1 The first genotype + * @param _genotype2 The second genotype - const */ - bool operator()(Indi& Indi1, const Indi& Indi2) + bool operator()(GenotypeT & _genotype1, const GenotypeT & _genotype2) { - // do whatever needs to be done - // if Indi1 has been modified - return true; - // otherwise - // return false; + // START code for crossover of _genotype1 and _genotype2 objects + + /** Requirement + * if _genotype1 has been modified + * return true; + * otherwise + * return false; + */ + + // END code for crossover of _genotype1 and _genotype2 objects } private: - paramType anyParameter +// START Private data of an eoMyStructBinCrossover object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructBinCrossover object }; #endif diff --git a/eo/tutorial/Templates/continue.tmpl b/eo/tutorial/Templates/continue.tmpl index 746bfba6e..2ec5a7be8 100644 --- a/eo/tutorial/Templates/continue.tmpl +++ b/eo/tutorial/Templates/continue.tmpl @@ -8,38 +8,57 @@ Template for continuator in EO, i.e. stopping conditions for EO algorithms ========================================================================== */ -#ifndef _eoMyContinue_h -#define _eoMyContinue_h +#ifndef _eoMyStructContinue_h +#define _eoMyStructContinue_h -#include +// include the base definition of eoContinue +#include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as operator() will + * be called with an eoPop + */ template< class EOT> -class eoMyContinue: public eoContinue { +class eoMyStructContinue: public eoContinue { public: - /// Ctor - eoMyContinue( paramType _anyParameter) : - anyParameter(_anyParameter) {} + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoMyStructContinue() + // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } /** Returns false when you want to stop + * + * @param _pop an eoPop */ virtual bool operator() ( const eoPop& _pop ) { - bool stopCondition = ... ; // compute the stopping condition + bool stopCondition ; // to store the stopping condition + // START Code of computation of stopping condition + // stopCondition = blablabla + // END Code of computation of stopping condition if (stopCondition) // the algo will stop upon return FALSE { - cout << "STOP in eoMyContinue: blablabla \n"; + cout << "STOP in eoMyStructContinue \n"; return false; } return true; // == do not stop } private: - paramType anyParameter +// START Private data of an eoMyStructContinue object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructContinue object }; #endif diff --git a/eo/tutorial/Templates/create.sh b/eo/tutorial/Templates/create.sh new file mode 100755 index 000000000..f834a31e3 --- /dev/null +++ b/eo/tutorial/Templates/create.sh @@ -0,0 +1,13 @@ +#! /bin/tcsh -f +if ($#argv < 2) then + echo Usage $argv[0] ApplicationName TargetDir + exit +endif +sed s/eoMyStruct/eo$1/g eoMyStruct.tmpl > $2/eo$1.h +sed s/eoMyStruct/eo$1/g init.tmpl > $2/eo$1Init.h +sed s/eoMyStruct/eo$1/g evalFunc.tmpl > $2/eo$1EvalFunc.h +sed s/eoMyStruct/eo$1/g mutation.tmpl > $2/eo$1Mutation.h +sed s/eoMyStruct/eo$1/g quadCrossover.tmpl > $2/eo$1QuadCrossover.h +sed s/eoMyStruct/eo$1/g eoMyStructEA.cpp > $2/eo$1EA.cpp +sed s/eoMyStruct/eo$1/g Makefile.tmpl > $2/Makefile + diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl new file mode 100644 index 000000000..b33c30f3a --- /dev/null +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -0,0 +1,78 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ +*/ + +#ifndef _eoMyStruct_h +#define _eoMyStruct_h + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + + * Note that you MUST derive your structure from EO + * but you MAY use some other already prepared class in the hierarchy + * like eoVector for instance, if you handle a vector of something.... + + * If you create a structure from scratch, + * the only thing you need to provide are + * a default constructor + * IO routines printOn and readFrom + * + * Note that operator<< and operator>> are defined at EO level + * using these routines + */ +template< class FitT> +class eoMyStruct: public EO { +public: + /** Ctor: you MUST provide a default ctor. + * though such individuals will generally be processed + * by some eoInit object + */ + eoMyStruct() + { + // START Code of default Ctor of an eoMyStruct object + // END Code of default Ctor of an eoMyStruct object + } + + + /** printing... */ + void printOn(ostream& os) const + { + // START Code of default output + + /** HINTS + * in EO we systematically write the sizes of things before the things + * so readFrom is easier to code (see below) + */ + + // END Code of default output + } + + /** reading... + * of course, your readFrom must be able to read what printOn writes!!! + */ + void readFrom(istream& is) + { + // START Code of input + + /** HINTS + * remember the eoMyStruct object will come from the default ctor + * this is why having the sizes written out is useful + */ + + // END Code of input + } + +private: // put all data here + // START Private data of an eoMyStruct object + // END Private data of an eoMyStruct object +}; + +#endif + diff --git a/eo/tutorial/Templates/eoMyStructEA.cpp b/eo/tutorial/Templates/eoMyStructEA.cpp new file mode 100644 index 000000000..8b03560f3 --- /dev/null +++ b/eo/tutorial/Templates/eoMyStructEA.cpp @@ -0,0 +1,321 @@ +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of mutation: + * class eoMyStructMonop MUST derive from eoMonOp + */ +#include "eoMyStructMutation.h" + +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): + * class eoMyStructBinCrossover MUST derive from eoBinOp + * OR + * class eoMyStructQuadCrossover MUST derive from eoQuadOp + */ +// #include "eoMyStructBinOp.h" +// OR +#include "eoMyStructQuadCrossover.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMyStruct Indi; // ***MUST*** derive from EO +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + ////////////////////////////////////////////// + // the genotype - through a genotype initializer + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START read parameters (if any) and create the initializer directly + + // As far as memory management is concerned, the parameters + // AND the values are owned by the parser (handled through references) + + // example of parameter reading using the most compact syntax + // varType var = parser.createParam(varType defaultValue, + // string keyword, + // string comment, + // char shortKeyword, + // string section,).value(); + + // an unsigned parameter + unsigned sampleUnsigned = parser.createParam(unsigned(10), "anUnsigned", "An unsigned parameter",'V', "Representation").value(); + + // a double parameter + double sampleDouble = parser.createParam(0.3, "aDouble", "A double parameter", 's', "Representation" ).value(); + + // some real bounds: [-1,1]x[-1,1] by default + eoRealVectorBounds & sampleBounds = parser.createParam(eoRealVectorBounds(2,-1,1), "someBounds", "Bounds of some real variables", 'B', "Representation").value(); +// END read parameters (if any) and create the initializer directly +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START Modify definitions of objects by eventually add parameters + + /** HINTS + * + * The following declare variables that are objects defined + * in the customized files. + * You shoudl only modify the arguments passed onto their constructors + * ("varType _anyVariable") in their definition + * + * and you can optionally uncomment and modify the lines commented between + * /* and */ + + // the initializer: will be used in make_pop + //////////////////// + eoMyStructInit init/* (varType _anyVariable) */; + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + ///////////////////////////// + // Variation operators + //////////////////////////// + // read crossover and mutations, combine each in a proportional Op + // and create the eoGenOp that calls crossover at rate pCross + // then mutation with rate pMut + + // the crossovers + ///////////////// + + // here we can have eoQuadOp (2->2) only - no time for the eoBinOp case + + // you can have more than one - combined in a proportional way + + // first, define the crossover objects and read their rates from the parser + + // A first crossover + eoMyStructQuadCrossover cross1/* (varType _anyVariable) */; + // its relative rate in the combination + double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + // and the creation of the combined operator with this one + eoPropCombinedQuadOp propXover(cross1, cross1Rate); + + // Optional: A second(and third, and ...) crossover + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoQuadOp + + /* Uncomment if necessary - and replicate as many time as you need + eoMyStructSecondCrossover cross2(varType _anyVariable); + double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(cross2, cross2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propXover.add(crossXXX, crossXXXRate, true); + + + // the mutation: same story + //////////////// + // you can have more than one - combined in a proportional way + + // for each mutation, + // - define the mutator object + // - read its rate from the parser + // - add it to the proportional combination + + // a first mutation + eoMyStructMutation mut1/* (varType _anyVariable) */; + // its relative rate in the combination + double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + // and the creation of the combined operator with this one + eoPropCombinedMonOp propMutation(mut1, mut1Rate); + + // Optional: A second(and third, and ...) mutation with their rates + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoMonOp + + /* Uncomment if necessary - and replicate as many time as you need + eoMyStructSecondMutation mut2(varType _anyVariable); + double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(mut2, mut2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propMutation.add(mutXXX, mutXXXRate, true); + + // end of crossover and mutation definitions + //////////////////////////////////////////// + +// END Modify definitions of objects by eventually add parameters +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// from now on, you do not need to modify anything +// though you CAN add things to the checkpointing (see tutorial) + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // but of course you're free to use any smart combination you could think of + // especially, if you have to use eoBinOp rather than eoQuad Op youůll have + // to modify that part + + // First read the individual level parameters + eoValueParam& pCrossParam = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + state.storeFunctor(cross); + eoQuadOp *ptQuad = new eoQuadCloneOp; + state.storeFunctor(ptQuad); + cross->add(propXover, pCrossParam.value()); // crossover, with proba pcross + cross->add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + state.storeFunctor(op); + op->add(*cross, 1.0); // always do combined crossover + op->add(propMutation, pMutParam.value()); // then mutation, with proba pmut + + // that's it! (beware op is a pointer - for lazy cut-and-paste reasons! + + // end of operator definition + //////////////////////////// + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, (*op)); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/eo/tutorial/Templates/evalFunc.tmpl b/eo/tutorial/Templates/evalFunc.tmpl new file mode 100644 index 000000000..c2c7fdd86 --- /dev/null +++ b/eo/tutorial/Templates/evalFunc.tmpl @@ -0,0 +1,65 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for continuator in EO, i.e. stopping conditions for EO algorithms +========================================================================== +*/ + +#ifndef _eoMyStructEvalFunc_h +#define _eoMyStructEvalFunc_h + +// include whatever general include you need +#include +#include + +// include the base definition of eoEvalFunc +#include "eoEvalFunc.h" + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template +class eoMyStructEvalFunc : public eoEvalFunc +{ +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + eoMyStructEvalFunc() + // eoMyStructEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } + + /** Actually compute the fitness + * + * @param EOT & _eo the EO object to evaluate + * it should stay templatized to be usable + * with any fitness type + */ + void operator()(EOT & _eo) + { + // test for invalid to avoid recomputing fitness of unmodified individuals + if (_eo.invalid()) + { + double fit; // to hold fitness value + // START Code of computation of fitness of the eoMyStruct object + // fit = blablabla + // END Code of computation of fitness of the eoMyStruct object + _eo.fitness(fit); + } + } + +private: +// START Private data of an eoMyStructEvalFunc object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructEvalFunc object +}; + + +#endif diff --git a/eo/tutorial/Templates/init.tmpl b/eo/tutorial/Templates/init.tmpl new file mode 100644 index 000000000..96d45b3ac --- /dev/null +++ b/eo/tutorial/Templates/init.tmpl @@ -0,0 +1,57 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for EO objects initialization in EO +============================================ +*/ + +#ifndef _eoMyStructInit_h +#define _eoMyStructInit_h + +// include the base definition of eoInit +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * There is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO (e.g. to initialize + * atoms of an eoVector you will need an eoInit) + */ +template +class eoMyStructInit: public eoInit { +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + eoMyStructInit() + // eoMyStructInit( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructInit object + // END Code of Ctor of an eoMyStructInit object + } + + + /** initialize a genotype + * + * @param _genotype generally a genotype that has been default-constructed + * whatever it contains will be lost + */ + void operator()(GenotypeT & _genotype) + { + // START Code of random initialization of an eoMyStruct object + // END Code of random initialization of an eoMyStruct object + } + +private: +// START Private data of an eoMyStructInit object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructInit object +}; + +#endif + diff --git a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl index 11ce2b534..9a0c3c426 100644 --- a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl +++ b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl @@ -19,11 +19,14 @@ Second version, get parents using an external eoSelectOne #include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ -template -class eoLessOffspringExternalSelectorGenOp: public eoGenOp + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * must be called if the genotypes of the indis is modified + */ +template +class eoLessOffspringExternalSelectorGenOp: public eoGenOp { public: /** diff --git a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl index 826ebf37b..c0790f93c 100644 --- a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl +++ b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl @@ -10,7 +10,7 @@ i.e. that takes any number of parents and generates any number of offspring a GenOp that creates less offspring than there are parents -First version, get parents from populator using the ibbedded select() method +First version, get parents from populator using the imbedded select() method */ #ifndef eoLessOffspringSameSelectorGenOp_H @@ -19,11 +19,14 @@ First version, get parents from populator using the ibbedded select() method #include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ -template -class eoLessOffspringSameSelectorGenOp: public eoGenOp + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * must be called if the genotypes of the indis is modified + */ +template +class eoLessOffspringSameSelectorGenOp: public eoGenOp { public: /** @@ -70,4 +73,4 @@ private: paramType anyParameter }; -#endif \ No newline at end of file +#endif diff --git a/eo/tutorial/Templates/moreOffspringGenOp.tmpl b/eo/tutorial/Templates/moreOffspringGenOp.tmpl index 9753ded61..c8644276a 100644 --- a/eo/tutorial/Templates/moreOffspringGenOp.tmpl +++ b/eo/tutorial/Templates/moreOffspringGenOp.tmpl @@ -18,11 +18,14 @@ than there are parents #include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ -template -class eoMoreOffspringGenOp: public eoGenOp + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * must be called if the genotypes of the indis is modified + */ +template +class eoMoreOffspringGenOp: public eoGenOp { public: /** @@ -53,7 +56,7 @@ public: // points to the last that has already been treated // apply operator to the parents (modifying them AND generating - // new individuals ofs1, ofs2, ..., ofsN + // new individuals ofs1, ofs2, ..., ofsN ++_plop; // advance before each insertion _plop.insert(ofs1); ... @@ -71,4 +74,4 @@ private: paramType anyParameter }; -#endif \ No newline at end of file +#endif diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 41e62e887..2b66be2cd 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -1,6 +1,6 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -The above line is usefulin Emacs-like editors +The above line is useful in Emacs-like editors */ /* @@ -8,44 +8,60 @@ Template for simple mutation operators ====================================== */ -#ifndef eoMyDerivedMonOp_H -#define eoMyDerivedMonOp_H +#ifndef eoMyStructMutation_H +#define eoMyStructMutation_H #include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ -template -class eoMyDerivedMonOp: public eoMonOp + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoMyStructMutation: public eoMonOp { public: /** - * (Default) Constructor. + * Ctor - no requirement */ - eoMyDerivedMonOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} +// START eventually add or modify the anyVariable argument + eoMyStructMutation() + // eoMyStructMutation( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } /// The class name. Used to display statistics - string className() const { return "eoMyDerivedMonOp"; } + string className() const { return "eoMyStructMutation"; } /** * modifies the parent - * @param Indi The parent + * @param _genotype The parent genotype (will be modified) */ - bool operator()(Indi& Indi) + bool operator()(GenotypeT & _genotype) { - // do whatever needs to be done - // if Indi has been modified - return true; - // otherwise - // return false; + // START code for mutation of the _genotype object + + /** Requirement + * if _genotype has been modified + * return true; + * otherwise + * return false; + */ + + // END code for mutation of the _genotype object } private: - paramType anyParameter +// START Private data of an eoMyStructMutation object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructMutation object }; #endif diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl index f66f1ea8c..355543127 100644 --- a/eo/tutorial/Templates/quadCrossover.tmpl +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -7,48 +7,63 @@ The above line is usefulin Emacs-like editors Template for simple quadratic crossover operators ================================================= -Quadratic crossover operators modify the both parents +Quadratic crossover operators modify the both genotypes */ -#ifndef eoMyDerivedQuadOp_H -#define eoMyDerivedQuadOp_H +#ifndef eoMyStructQuadCrossover_H +#define eoMyStructQuadCrossover_H #include /** - Always write a comment in this format before class definition - if you want the class to be documented by Doxygen -*/ -template -class eoMyDerivedQuadOp: public eoQuadOp + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoMyStructQuadCrossover: public eoQuadOp { public: /** - * (Default) Constructor. + * Ctor - no requirement */ - eoMyDerivedQuadOp(paramType _anyParameter) : - anyParameter(_anyParameter) {} +// START eventually add or modify the anyVariable argument + eoMyStructQuadCrossover() + // eoMyStructQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } /// The class name. Used to display statistics - string className() const { return "eoMyDerivedQuadOp"; } + string className() const { return "eoMyStructQuadCrossover"; } /** * eoQuad crossover - modifies both parents - * @param Indi1 The first parent - * @param Indi2 The second parent + * @param _genotype1 The first parent + * @param _genotype2 The second parent */ - bool operator()(Indi& Indi1, Indi& Indi2) + bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) { - // do whatever needs to be done + // START code for crossover of _genotype1 and _genotype2 objects - // if at least one individual has been modified - no way to distinguish - return true; - // otherwise - // return false; + /** Requirement + * if at least one genotype has been modified - no way to distinguish + * return true; + * otherwise + * return false; + */ + + // END code for crossover of _genotype1 and _genotype2 objects } private: - paramType anyParameter +// START Private data of an eoMyStructQuadCrossover object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructQuadCrossover object }; #endif From 37a138c81bee83d3cfc8754e5ced08e5b5bd9cab Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 8 Sep 2001 05:41:19 +0000 Subject: [PATCH 0644/2134] Added include math.h --- eo/src/eoParetoFitness.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 37b20f7f4..24ea630f5 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -26,6 +26,7 @@ #ifndef _eoParetoFitness_h #define _eoParetoFitness_h +#include #include /** From ed9dac2dfe39dc519e93d25907805805c245a0ff Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 8 Sep 2001 05:42:24 +0000 Subject: [PATCH 0645/2134] Added newline at end of file (prevents a warning) --- eo/test/t-eoParetoFitness.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index 52c9c13e1..18dbf2f31 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -79,4 +79,4 @@ int main() assert(m2.dominates(m3)); //m3 < m2); assert(!m3.dominates(m2)); // (m2 < m3)); assert(m2.dominates(m3)); //m2 > m3); -} \ No newline at end of file +} From d0d14c3ff845145aa67cb3a2bff08039c74aa020 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 8 Sep 2001 05:59:17 +0000 Subject: [PATCH 0646/2134] Removed trailing string after #endif - it generates a lot of useless warning on some versions of g++ --- eo/src/EO.h | 2 +- eo/src/eoDetTournamentSelect.h | 2 +- eo/src/eoEasyEA.h | 2 +- eo/src/eoFactory.h | 92 ++++++++-------- eo/src/eoGeneralBreeder.h | 2 +- eo/src/eoObject.h | 2 +- eo/src/eoOpSelMason.h | 166 ++++++++++++++--------------- eo/src/eoPersistent.h | 2 +- eo/src/eoPrintable.h | 2 +- eo/src/eoProportionalSelect.h | 3 +- eo/src/eoRandomSelect.h | 2 +- eo/src/eoRankingSelect.h | 3 +- eo/src/eoReduce.h | 2 +- eo/src/eoSelectFactory.h | 2 +- eo/src/eoStochTournamentSelect.h | 2 +- eo/src/es.h | 6 +- eo/src/es/eoNormalMutation.h | 2 +- eo/src/es/eoRealOp.h | 2 +- eo/src/ga.h | 6 +- eo/src/ga/eoBitOp.h | 4 +- eo/src/ga/eoBitOpFactory.h | 2 +- eo/src/utils/eoData.h | 2 +- eo/src/utils/eoGnuplot.h | 4 +- eo/src/utils/eoGnuplot1DMonitor.h | 2 +- eo/src/utils/eoGnuplot1DSnapshot.h | 2 +- 25 files changed, 154 insertions(+), 164 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index a6d32d773..82a2a2b1b 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -130,4 +130,4 @@ private: //----------------------------------------------------------------------------- -#endif EO_H +#endif diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index df25ff45d..9c6d6cd16 100755 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -69,5 +69,5 @@ template class eoDetTournamentSelect: public eoSelectOne //----------------------------------------------------------------------------- -#endif eoDetTournamentSelect_h +#endif // eoDetTournamentSelect_h diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index b675ea787..e2ad1b5d2 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -206,5 +206,5 @@ template class eoEasyEA: public eoAlgo //----------------------------------------------------------------------------- -#endif eoSelectTransformReduce_h +#endif diff --git a/eo/src/eoFactory.h b/eo/src/eoFactory.h index 05f9f8a43..f755036ec 100644 --- a/eo/src/eoFactory.h +++ b/eo/src/eoFactory.h @@ -1,7 +1,7 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- -// eoFactory.h +// eoFactory.h // (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or @@ -24,49 +24,49 @@ #ifndef _EOFACTORY_H #define _EOFACTORY_H - -//----------------------------------------------------------------------------- -#include //----------------------------------------------------------------------------- - -/** EO Factory. A factory is used to create other objects. In particular, -it can be used so that objects of that kind can´t be created in any other -way. It should be instantiated with anything that needs a factory, like selectors -or whatever; but the instance class should be the parent class from which all the -object that are going to be created descend. This class basically defines an interface, -as usual. The base factory class for each hierarchy should be redefined every time a new -object is added to the hierarchy, which is not too good, but in any case, some code would -have to be modified*/ -template -class eoFactory: public eoObject { - -public: - - /// @name ctors and dtors - //{@ - /// constructor - eoFactory( ) {} - - /// destructor - virtual ~eoFactory() {} - //@} - - /** Another factory methods: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - */ - virtual EOClass* make(istream& _is) = 0; - - ///@name eoObject methods - //@{ - /** Return the class id */ - virtual string className() const { return "eoFactory"; } - - /** Read and print are left without implementation */ - //@} - -}; - +#include -#endif _EOFACTORY_H +//----------------------------------------------------------------------------- + +/** EO Factory. A factory is used to create other objects. In particular, +it can be used so that objects of that kind can´t be created in any other +way. It should be instantiated with anything that needs a factory, like selectors +or whatever; but the instance class should be the parent class from which all the +object that are going to be created descend. This class basically defines an interface, +as usual. The base factory class for each hierarchy should be redefined every time a new +object is added to the hierarchy, which is not too good, but in any case, some code would +have to be modified*/ +template +class eoFactory: public eoObject { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoFactory( ) {} + + /// destructor + virtual ~eoFactory() {} + //@} + + /** Another factory methods: creates an object from an istream, reading from + it whatever is needed to create the object. Usually, the format for the istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual EOClass* make(istream& _is) = 0; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual string className() const { return "eoFactory"; } + + /** Read and print are left without implementation */ + //@} + +}; + + +#endif diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index 3f1ac663d..878955a81 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -102,5 +102,5 @@ class eoGeneralBreeder: public eoBreed eoHowMany howMany; }; -#endif eoBreeder_h +#endif diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 544e82517..69a6b388f 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -73,5 +73,5 @@ class eoObject }; -#endif EOOBJECT_H +#endif diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 3f96d8226..440898277 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -1,7 +1,7 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- -// eoOpSelMason.h +// eoOpSelMason.h // (c) GeNeura Team, 1999 /* This library is free software; you can redistribute it and/or @@ -24,86 +24,86 @@ #ifndef _EOOPSELMASON_H #define _EOOPSELMASON_H - -//----------------------------------------------------------------------------- -#include -#include // for eoFactory and eoOpFactory - -#include //----------------------------------------------------------------------------- - -/** EO Mason, or builder, for operator selectors. A builder must allocate memory -to the objects it builds, and then deallocate it when it gets out of scope*/ -template -class eoOpSelMason: public eoFactory > { - -public: - typedef vector* > vOpP; - typedef map*, vOpP > MEV; - - /// @name ctors and dtors - //{@ - /// constructor - eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; - - /// destructor - virtual ~eoOpSelMason() {}; - //@} - - /** Factory methods: creates an object from an istream, reading from - it whatever is needed to create the object. The format is - opSelClassName\\ - rate 1 operator1\\ - rate 2 operator2\\ - ...\\ - Stores all operators built in a database (#allocMap#), so that somebody - can destroy them later. The Mason is in charge or destroying the operators, - since the built object can´t do it itself. The objects built must be destroyed - from outside, using the #destroy# method - */ - virtual eoOpSelector* make(istream& _is) { - - string opSelName; - _is >> opSelName; - eoOpSelector* opSelectorP; - // Build the operator selector - if ( opSelName == "eoProportionalOpSel" ) { - opSelectorP = new eoProportionalOpSel(); - } - - // Temp vector for storing pointers - vOpP tmpPVec; - // read operator rate and name - while ( _is ) { - float rate; - _is >> rate; - if ( _is ) { - eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line - // Add the operators to the selector, don´t pay attention to the IDs - opSelectorP->addOp( *op, rate ); - // Keep it in the store, to destroy later - tmpPVec.push_back( op ); - } // if - } // while - - // Put it in the map - allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); - - return opSelectorP; - }; - - ///@name eoObject methods - //@{ - /** Return the class id */ - virtual string className() const { return "eoOpSelMason"; } - - //@} - -private: - map*,vector* > > allocMap; - eoOpFactory& operatorFactory; -}; - +#include +#include // for eoFactory and eoOpFactory -#endif _EOOPSELMASON_H +#include + +//----------------------------------------------------------------------------- + +/** EO Mason, or builder, for operator selectors. A builder must allocate memory +to the objects it builds, and then deallocate it when it gets out of scope*/ +template +class eoOpSelMason: public eoFactory > { + +public: + typedef vector* > vOpP; + typedef map*, vOpP > MEV; + + /// @name ctors and dtors + //{@ + /// constructor + eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; + + /// destructor + virtual ~eoOpSelMason() {}; + //@} + + /** Factory methods: creates an object from an istream, reading from + it whatever is needed to create the object. The format is + opSelClassName\\ + rate 1 operator1\\ + rate 2 operator2\\ + ...\\ + Stores all operators built in a database (#allocMap#), so that somebody + can destroy them later. The Mason is in charge or destroying the operators, + since the built object can´t do it itself. The objects built must be destroyed + from outside, using the #destroy# method + */ + virtual eoOpSelector* make(istream& _is) { + + string opSelName; + _is >> opSelName; + eoOpSelector* opSelectorP; + // Build the operator selector + if ( opSelName == "eoProportionalOpSel" ) { + opSelectorP = new eoProportionalOpSel(); + } + + // Temp vector for storing pointers + vOpP tmpPVec; + // read operator rate and name + while ( _is ) { + float rate; + _is >> rate; + if ( _is ) { + eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line + // Add the operators to the selector, don´t pay attention to the IDs + opSelectorP->addOp( *op, rate ); + // Keep it in the store, to destroy later + tmpPVec.push_back( op ); + } // if + } // while + + // Put it in the map + allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); + + return opSelectorP; + }; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual string className() const { return "eoOpSelMason"; } + + //@} + +private: + map*,vector* > > allocMap; + eoOpFactory& operatorFactory; +}; + + +#endif diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index e10edb93b..c6f838384 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -70,5 +70,5 @@ class eoPersistent: public eoPrintable ///Standard input for all objects in the EO hierarchy istream & operator >> ( istream& _is, eoPersistent& _o ); -#endif EOOBJECT_H +#endif diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index bf7c4ccb8..e416175d7 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -59,5 +59,5 @@ class eoPrintable ///Standard output for all objects in the EO hierarchy ostream & operator << ( ostream& _os, const eoPrintable& _o ); -#endif EOPRINTABLE_H +#endif diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index 36a0da265..d870dcaf7 100755 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -67,5 +67,4 @@ private : typename EOT::Fitness total; }; -#endif - +#endif diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index ada1ac53f..b8c5da6c9 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -138,5 +138,5 @@ private: unsigned current; }; -#endif eoRandomSelect_h +#endif diff --git a/eo/src/eoRankingSelect.h b/eo/src/eoRankingSelect.h index 79104b711..6f070cb9f 100644 --- a/eo/src/eoRankingSelect.h +++ b/eo/src/eoRankingSelect.h @@ -52,5 +52,4 @@ private : eoRanking ranking; // derived from eoPerf2Worth }; -#endif - +#endif diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 4c0ff77c3..85675a6c6 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -270,4 +270,4 @@ private: //----------------------------------------------------------------------------- -#endif //eoInsertion_h +#endif diff --git a/eo/src/eoSelectFactory.h b/eo/src/eoSelectFactory.h index 1d83f5f4c..aafb01a70 100644 --- a/eo/src/eoSelectFactory.h +++ b/eo/src/eoSelectFactory.h @@ -86,4 +86,4 @@ public: }; -#endif _EOFACTORY_H +#endif diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h index 75a8b508a..b0ba2ec9e 100755 --- a/eo/src/eoStochTournamentSelect.h +++ b/eo/src/eoStochTournamentSelect.h @@ -69,5 +69,5 @@ private: //----------------------------------------------------------------------------- -#endif eoStochTournamentSelect_h +#endif diff --git a/eo/src/es.h b/eo/src/es.h index 360f48e75..84fd2c738 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -55,8 +55,4 @@ #include #include -#endif _es_h - -// Local Variables: -// mode: C++ -// End: +#endif diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 4722a081a..325d981c9 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -178,5 +178,5 @@ private: //----------------------------------------------------------------------------- //@} -#endif eoRealOp_h +#endif diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 1f7ee14dc..06528cc2b 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -502,4 +502,4 @@ template class eoRealUXover: public eoQuadOp //----------------------------------------------------------------------------- //@} -#endif eoRealOp_h +#endif diff --git a/eo/src/ga.h b/eo/src/ga.h index cbb71d724..87cc0e34c 100644 --- a/eo/src/ga.h +++ b/eo/src/ga.h @@ -39,8 +39,4 @@ //----------------------------------------------------------------------------- -#endif _ga_h - -// Local Variables: -// mode: C++ -// End: +#endif diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 3e691280f..8ab786528 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.13 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2001-09-08 05:59:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.14 2001-09-08 05:59:17 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -440,5 +440,5 @@ template class eoBitGxOver: public eoQuadOp //----------------------------------------------------------------------------- //@} -#endif eoBitOp_h +#endif diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h index 5c0273c40..9ec142bdc 100644 --- a/eo/src/ga/eoBitOpFactory.h +++ b/eo/src/ga/eoBitOpFactory.h @@ -166,5 +166,5 @@ public: }; -#endif _EOBITOPFACTORY_H +#endif diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index b7327687b..7e6d256b3 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -76,5 +76,5 @@ using namespace std; #define eo_is_a_rate true #define eo_is_an_integer false -#endif EODATA_H +#endif diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index fb5a5c3a3..24efca0ee 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -129,7 +129,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.3 2001-02-12 13:58:51 maartenkeijzer Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.4 2001-09-08 05:59:17 evomarc Exp $ * ---------------------------------------------------------------------- */ @@ -282,4 +282,4 @@ inline int PipeComWaitFor( PCom *from, char *what ) } -#endif _eoGnuplot_H +#endif diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index e75508750..2f5e3bfc3 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -119,4 +119,4 @@ inline void eoGnuplot1DMonitor::FirstPlot() PipeComSend( gpCom, buff ); } -#endif _eoGnuplot1DMonitor_H +#endif diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index efb9c3238..3c0649605 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -108,4 +108,4 @@ inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) return (*this); } -#endif _eoGnuplot1DSnapshot_H +#endif From 1d7b79b85ac70b3dec8dff5ec7a3d44bf20bd0ba Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 24 Sep 2001 05:59:13 +0000 Subject: [PATCH 0647/2134] Suppressed most warning (except some unused variables) if you don't modify anythig --- eo/tutorial/Templates/mutation.tmpl | 11 ++++++----- eo/tutorial/Templates/quadCrossover.tmpl | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 2b66be2cd..befbcea93 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -46,15 +46,16 @@ public: */ bool operator()(GenotypeT & _genotype) { + bool isModified; // START code for mutation of the _genotype object /** Requirement - * if _genotype has been modified - * return true; - * otherwise - * return false; + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; */ - + return isModified; // END code for mutation of the _genotype object } diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl index 355543127..13145004f 100644 --- a/eo/tutorial/Templates/quadCrossover.tmpl +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -48,15 +48,16 @@ public: */ bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) { + bool oneAtLeastIsModified; // START code for crossover of _genotype1 and _genotype2 objects /** Requirement - * if at least one genotype has been modified - no way to distinguish - * return true; - * otherwise - * return false; + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; */ - + return oneAtLeastIsModified; // END code for crossover of _genotype1 and _genotype2 objects } From c34db3eb29ccdbf5fbe05c2ed337cbaeebcf2128 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 24 Sep 2001 05:59:42 +0000 Subject: [PATCH 0648/2134] Suppressed most warning (except some unused variables) if you don't modify anything --- eo/tutorial/Templates/eoMyStructEA.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/Templates/eoMyStructEA.cpp b/eo/tutorial/Templates/eoMyStructEA.cpp index 8b03560f3..70101225c 100644 --- a/eo/tutorial/Templates/eoMyStructEA.cpp +++ b/eo/tutorial/Templates/eoMyStructEA.cpp @@ -147,7 +147,8 @@ int main(int argc, char* argv[]) * ("varType _anyVariable") in their definition * * and you can optionally uncomment and modify the lines commented between - * /* and */ + * the usual / * and * / (without the blanks :-) + */ // the initializer: will be used in make_pop //////////////////// From f3db65795bc5f4a0a4b5eec5214315ee39d5630e Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 4 Oct 2001 20:12:19 +0000 Subject: [PATCH 0649/2134] Big modifications - now the init and most important the operators are handled in separate files make_genotype_xxx and make_op_xxx as it was done in the examples of Lesson4 --- eo/tutorial/Templates/Makefile.tmpl | 10 +- eo/tutorial/Templates/MyStructEA.cpp | 184 +++++++++++++++ eo/tutorial/Templates/README | 71 +++--- eo/tutorial/Templates/create.sh | 20 +- eo/tutorial/Templates/evalFunc.tmpl | 2 +- .../Templates/make_genotype_MyStruct.h | 73 ++++++ eo/tutorial/Templates/make_op_MyStruct.h | 210 ++++++++++++++++++ 7 files changed, 525 insertions(+), 45 deletions(-) create mode 100644 eo/tutorial/Templates/MyStructEA.cpp create mode 100644 eo/tutorial/Templates/make_genotype_MyStruct.h create mode 100644 eo/tutorial/Templates/make_op_MyStruct.h diff --git a/eo/tutorial/Templates/Makefile.tmpl b/eo/tutorial/Templates/Makefile.tmpl index 9975023ca..f91d23089 100644 --- a/eo/tutorial/Templates/Makefile.tmpl +++ b/eo/tutorial/Templates/Makefile.tmpl @@ -2,7 +2,7 @@ .cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I../Points -I./Sol -I./util -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I./util -Wall -g -c $*.cpp # START eventually modify the name of EO dir @@ -11,12 +11,12 @@ DIR_EO = ../../src LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -ALL = eoMyStructEA +ALL = MyStructEA -eoMyStructEA : eoMyStructEA.o - c++ -g -o $@ eoMyStructEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm +MyStructEA : MyStructEA.o + c++ -g -o $@ MyStructEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm -tar : ; tar czvf climat.tgz *.h *.cpp Makefile +tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile all : $(ALL) diff --git a/eo/tutorial/Templates/MyStructEA.cpp b/eo/tutorial/Templates/MyStructEA.cpp new file mode 100644 index 000000000..9d58f81d0 --- /dev/null +++ b/eo/tutorial/Templates/MyStructEA.cpp @@ -0,0 +1,184 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file. +It includes all other files that have been generated by the script create.sh +so it is the only file to compile. + +In case you want to build up a separate library for your new Evolving Object, +you'll need some work - follow what's done in the src/ga dir, used in the +main file BitEA in tutorial/Lesson4 dir. +Or you can wait until we do it :-) +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMyStruct Indi; // ***MUST*** derive from EO +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// create an initializer +#include "make_genotype_MyStruct.h" +eoInit & make_genotype(eoParameterLoader& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// and the variation operaotrs +#include "make_op_MyStruct.h" +eoGenOp& make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/eo/tutorial/Templates/README b/eo/tutorial/Templates/README index 9ef2dde88..e1284acb3 100644 --- a/eo/tutorial/Templates/README +++ b/eo/tutorial/Templates/README @@ -1,7 +1,7 @@ This directory contains sample files that should make it easy to create an EO algorithm to evolve any type of structure (EO comes with two examples, bitstrings and vector of real variables, -so you'll need this qs soon as you want to evolve something else). +so you'll need this as soon as you want to evolve something else). At the moment, only algorithms involving a scalar fitness (double) are implemented (see test dir for Pareto optimization of multiple- @@ -9,7 +9,7 @@ objective fitness - or be patient :-) This file will help you to build the same algorithm than the ones in the Lesson4 of the tutorial, but with YOUR genotype instead of -*bitstrings or vector +bitstrings or vector It is assumed in the following that you have read the first part of the tutorial (Lessons 1 to 4). @@ -21,18 +21,19 @@ structure, and that you have enough programming skills to be able to write C code for its random initilialization, its crossover, its mutation and the computation of its fitness. -The helper script create.sh will create for you the files you need -from teh examples in tutorial/Templates dir, and all you'll have to do +The helper script * create.sh * will create for you the files you need +from the samples in tutorial/Templates dir, and all you'll have to do is to include the actual code where indicated in those files (between keywords START and END). First, let's choose a name: let's call the new EO class eoAppli. -All newly created classes will be named eoApplicationXXX (in the file -eoApplicationXXX) +All newly created classes will be named eoAppliXXX (in the file +eoAppliXXX) -1- create a directory for your application in the tutorial dir, "parallel" to -the LessonX dirs (though any name can do, of course, we will suppose -its full name, from the / root dir, is APPLICATION in what follows) +1- choose a directory name for your application in the tutorial dir, +"parallel" to the LessonX dirs (though any name can do, of course, we +will suppose its full name, from the / root dir, is APPLICATION in +what follows) 2- cd to the tutorial/Templates dir @@ -41,25 +42,30 @@ its full name, from the / root dir, is APPLICATION in what follows) 4- cd to the APPLICATION dir. You should see there the following files: + AppliEA.cpp the main file, includes all other, to be compiled Makefile with default target eoAppliEA eoAppli.h class eoAppli, FitT = template fitness - eoAppliEA.cpp the main file, includes all other, to be compiled eoAppliEvalFunc.h class for the computation of fotness eoAppliInit.h class for genotype initlialization eoAppliMutation.h class for mutation eoAppliQuadCrossover.h class for (quadratic) crossover + make_genotype_Appli.h helper function that create the initializer + make_op_Appli.h helper function that creates the variatin operators Note: You can go directly to step 6 and 7: you'll get a lot of warnings, but will be able to run an EA that does nothing! -5- Edit those files one after the other and add you code where -indicated (look for keywords START and END and modify code in -between). +5- Edit those files to suit your needs. The minimal addition you'll need +to make are + in eoAppli.h define your genotype + in eoAppliInit.h define the initialization of one genotype + in eoAppliMutation.h define the mutation of one genotype + in eoAppliQuadCrossover.h define the crossover of 2 genotypes -Note: If your APPLICATION dir is in the tutorial dir, you don't need -to modify Makefile. +HINT: look for keywords START and END and modify code in between. -6- Compile eoAppliEA.cpp: +6- Compile eoAppliEA.cpp. If your APPLICATION dir is in the tutorial +dir, you don't need to modify Makefile. Just type in % make @@ -83,24 +89,22 @@ want to become active), and run HINTS ----- -1- All new classes you will create probably require some parameters in -the constructor, and some (if not all) thoses parameters are likele to -be user parameter: you can either read them in the main file (as is -done in the sample eoAppliEA.cpp) or pass the eoParser to the +1- If some new classes you create require some user parameter, you can +either read them in the file where they are created (e.g. +make_op_Appli.h for variation operators), or pass the eoParser to the constructor of the class, and read the parameter from the parser. 2- If you stick to privacy for the data in your EO class, you will probably need to write accessors to those data, as well as some public -methods to modify them. +methods to modify them, as soon as some other methods need them too. -3- The sample eoAppliEA.cpp supposes that you ony have one crossover -and one mutation operator. However, the code for multiple operators -is there: you can have for instance 2 crossover operators, and choose +3- The sample make_op_Appli.h supposes that you ony have one crossover +and one mutation operator. However, the code for multiple operators is +there: you can have for instance 2 crossover operators, and choose among them according to relative weights (proportional choice) - same -for mutation. Look at the operator section in eoAppliEA.cpp -In particular, the user parameter mutationRate is totally useless for -a single operator, and is there only as a provision for using more -than one. +for mutation. Look at the operator section in eoAppliEA.cpp In +particular, the user parameters cross1Rate and mut1Rate are totally +useless for a single operator. To add another operator, you have to create another class by mimicking what has been done for the first operator. @@ -113,13 +117,16 @@ name in the class declaration, in the constructor and in the className() method. * in the new eoAppliBetterMutation class, change the code for the operator() - and eventually the code for the constructor. -* in the eoAppliEA.cpp file, in the mutation section, uncomment the +* in the make_op_Appli.h file, in the mutation section, uncomment the lines - eoMyStructSecondMutation mut2(varType _anyVariable); - double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); - propMutation.add(mut2, mut2Rate); + mut = new eoAppliSecondMutation(varType _anyVariable); + _state.storeFunctor(mut); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); and change the name of the class from eoAppliSecondMutation to your name eoAppliBetterMutation (you can also change the keyword from mut2Rate to something more meaningful like BetterMutationRate). You're done! + +In case of problem: Marc.Schoenauer@inria.fr diff --git a/eo/tutorial/Templates/create.sh b/eo/tutorial/Templates/create.sh index f834a31e3..e8e5056cf 100755 --- a/eo/tutorial/Templates/create.sh +++ b/eo/tutorial/Templates/create.sh @@ -3,11 +3,17 @@ if ($#argv < 2) then echo Usage $argv[0] ApplicationName TargetDir exit endif -sed s/eoMyStruct/eo$1/g eoMyStruct.tmpl > $2/eo$1.h -sed s/eoMyStruct/eo$1/g init.tmpl > $2/eo$1Init.h -sed s/eoMyStruct/eo$1/g evalFunc.tmpl > $2/eo$1EvalFunc.h -sed s/eoMyStruct/eo$1/g mutation.tmpl > $2/eo$1Mutation.h -sed s/eoMyStruct/eo$1/g quadCrossover.tmpl > $2/eo$1QuadCrossover.h -sed s/eoMyStruct/eo$1/g eoMyStructEA.cpp > $2/eo$1EA.cpp -sed s/eoMyStruct/eo$1/g Makefile.tmpl > $2/Makefile +if (! -e $2) then + mkdir $2 +endif +sed s/MyStruct/$1/g eoMyStruct.tmpl > $2/eo$1.h +sed s/MyStruct/$1/g init.tmpl > $2/eo$1Init.h +sed s/MyStruct/$1/g evalFunc.tmpl > $2/eo$1EvalFunc.h +sed s/MyStruct/$1/g mutation.tmpl > $2/eo$1Mutation.h +sed s/MyStruct/$1/g quadCrossover.tmpl > $2/eo$1QuadCrossover.h +sed s/MyStruct/$1/g MyStructEA.cpp > $2/$1EA.cpp +sed s/MyStruct/$1/g make_genotype_MyStruct.h > $2/make_genotype_$1.h +sed s/MyStruct/$1/g make_op_MyStruct.h > $2/make_op_$1.h +sed s/MyStruct/$1/g Makefile.tmpl > $2/Makefile + diff --git a/eo/tutorial/Templates/evalFunc.tmpl b/eo/tutorial/Templates/evalFunc.tmpl index c2c7fdd86..b8c9f1ed7 100644 --- a/eo/tutorial/Templates/evalFunc.tmpl +++ b/eo/tutorial/Templates/evalFunc.tmpl @@ -4,7 +4,7 @@ The above line is usefulin Emacs-like editors */ /* -Template for continuator in EO, i.e. stopping conditions for EO algorithms +Template for evaluator in EO, a functor that computes the fitness of an EO ========================================================================== */ diff --git a/eo/tutorial/Templates/make_genotype_MyStruct.h b/eo/tutorial/Templates/make_genotype_MyStruct.h new file mode 100644 index 000000000..a5194f9b0 --- /dev/null +++ b/eo/tutorial/Templates/make_genotype_MyStruct.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This fuction does the create an eoInit + * + * It could be here tempatized only on the fitness, as it can be used + * to evolve structures with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ + +template +eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +{ + // read any useful parameter here from the parser + // the param itself will belong to the parser (as far as memory is concerned) + + // paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value(); + + // Then built the initializer - a pointer, stored in the eoState + eoInit* init = new eoMyStructInit /* ( param ) */ ; + // store in state + _state.storeFunctor(init); + // and return a reference + return *init; +} + +#endif diff --git a/eo/tutorial/Templates/make_op_MyStruct.h b/eo/tutorial/Templates/make_op_MyStruct.h new file mode 100644 index 000000000..8b43d17bb --- /dev/null +++ b/eo/tutorial/Templates/make_op_MyStruct.h @@ -0,0 +1,210 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_MyStruct.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_MyStruct_h +#define _make_op_MyStruct_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +/** definition of mutation: + * class eoMyStructMonop MUST derive from eoMonOp + */ +#include "eoMyStructMutation.h" + +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): + * class eoMyStructBinCrossover MUST derive from eoBinOp + * OR + * class eoMyStructQuadCrossover MUST derive from eoQuadOp + */ +// #include "eoMyStructBinOp.h" +// OR +#include "eoMyStructQuadCrossover.h" + + // also need the parser and state includes +#include +#include + + +/////////////////// variation operators /////////////// +// canonical (crossover + mutation) only at the moment // + +/* + * This function builds the operators that will be applied to the eoMyStruct + * + * It uses a parser (to get user parameters), a state (to store the memory) + * the last parameter is an eoInit: if some operator needs some info + * about the genotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object + * + * As usual, the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to eoMyStruct +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + + + ///////////////////////////// + // Variation operators + //////////////////////////// + // read crossover and mutations, combine each in a proportional Op + // and create the eoGenOp that calls crossover at rate pCross + // then mutation with rate pMut + + // the crossovers + ///////////////// + + // here we can have eoQuadOp (2->2) only - no time for the eoBinOp case + + // you can have more than one - combined in a proportional way + + // first, define the crossover objects and read their rates from the parser + + // A first crossover + eoQuadOp *cross = new eoMyStructQuadCrossover /* (varType _anyVariable) */; + // store in the state + _state.storeFunctor(cross); + + // read its relative rate in the combination + double cross1Rate = _parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // and create the combined operator with this one + eoPropCombinedQuadOp *propXover = + new eoPropCombinedQuadOp(*cross, cross1Rate); + // and of course stor it in the state + _state.storeFunctor(propXover); + + + // Optional: A second(and third, and ...) crossover + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoQuadOp + + /* Uncomment if necessary - and replicate as many time as you need + cross = new eoMyStructSecondCrossover(varType _anyVariable); + _state.storeFunctor(cross); + double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(*cross, cross2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propXover.add(*cross, crossXXXRate, true); + + + // the mutation: same story + //////////////// + // you can have more than one - combined in a proportional way + + // for each mutation, + // - define the mutator object + // - read its rate from the parser + // - add it to the proportional combination + + // a first mutation + eoMonOp *mut = new eoMyStructMutation/* (varType _anyVariable) */; + _state.storeFunctor(mut); + // its relative rate in the combination + double mut1Rate = _parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + // and the creation of the combined operator with this one + eoPropCombinedMonOp *propMutation = new eoPropCombinedMonOp(*mut, mut1Rate); + _state.storeFunctor(propMutation); + + // Optional: A second(and third, and ...) mutation with their rates + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoMonOp + + /* Uncomment if necessary - and replicate as many time as you need + mut = new eoMyStructSecondMutation(varType _anyVariable); + _state.storeFunctor(mut); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propMutation.add(*mut, mutXXXRate, true); + + // end of crossover and mutation definitions + //////////////////////////////////////////// + +// END Modify definitions of objects by eventually add parameters +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// from now on, you do not need to modify anything +// though you CAN add things to the checkpointing (see tutorial) + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // but of course you're free to use any smart combination you could think of + // especially, if you have to use eoBinOp rather than eoQuad Op youůll have + // to modify that part + + // First read the individual level parameters + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // the crossover - with probability pCross + eoProportionalOp * propOp = new eoProportionalOp ; + _state.storeFunctor(propOp); + eoQuadOp *ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + propOp->add(*propXover, pCrossParam.value()); // crossover, with proba pcross + propOp->add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*propOp, 1.0); // always do combined crossover + op->add(*propMutation, pMutParam.value()); // then mutation, with proba pmut + + // that's it - return a reference + return *op; +} +#endif From 0847875339a2201e48062ab6519f67236993f969 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 4 Oct 2001 20:13:03 +0000 Subject: [PATCH 0650/2134] eoMyStructEA.cpp has turned into MyStructEA.cpp --- eo/tutorial/Templates/eoMyStructEA.cpp | 322 ------------------------- 1 file changed, 322 deletions(-) delete mode 100644 eo/tutorial/Templates/eoMyStructEA.cpp diff --git a/eo/tutorial/Templates/eoMyStructEA.cpp b/eo/tutorial/Templates/eoMyStructEA.cpp deleted file mode 100644 index 70101225c..000000000 --- a/eo/tutorial/Templates/eoMyStructEA.cpp +++ /dev/null @@ -1,322 +0,0 @@ -#include -using namespace std; - -// eo general include -#include "eo" -// the real bounds (not yet in general eo include) -#include "utils/eoRealVectorBounds.h" - -// include here whatever specific files for your representation -// Basically, this should include at least the following - -/** definition of representation: - * class eoMyStruct MUST derive from EO for some fitness - */ -#include "eoMyStruct.h" - -/** definition of initilizqtion: - * class eoMyStructInit MUST derive from eoInit - */ -#include "eoMyStructInit.h" - -/** definition of mutation: - * class eoMyStructMonop MUST derive from eoMonOp - */ -#include "eoMyStructMutation.h" - -/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): - * class eoMyStructBinCrossover MUST derive from eoBinOp - * OR - * class eoMyStructQuadCrossover MUST derive from eoQuadOp - */ -// #include "eoMyStructBinOp.h" -// OR -#include "eoMyStructQuadCrossover.h" - -/** definition of evaluation: - * class eoMyStructEvalFunc MUST derive from eoEvalFunc - * and should test for validity before doing any computation - * see tutorial/Templates/evalFunc.tmpl - */ -#include "eoMyStructEvalFunc.h" - -// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness - -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -// START fitness type: double or eoMaximizingFitness if you are maximizing -// eoMinimizingFitness if you are minimizing -typedef eoMyStruct Indi; // ***MUST*** derive from EO -// END fitness type -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* - - -// Use existing modules to define representation independent routines -// These are parser-based definitions of objects - -// how to initialize the population -// it IS representation independent if an eoInit is given -#include -eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) -{ - return do_make_pop(_parser, _state, _init); -} - -// the stopping criterion -#include -eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) -{ - return do_make_continue(_parser, _state, _eval); -} - -// outputs (stats, population dumps, ...) -#include -eoCheckPoint& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) -{ - return do_make_checkpoint(_parser, _state, _eval, _continue); -} - -// evolution engine (selection and replacement) -#include -eoAlgo& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) -{ - return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); -} - -// simple call to the algo. stays there for consistency reasons -// no template for that one -#include -// the instanciating fitnesses -#include -void run_ea(eoAlgo& _ga, eoPop& _pop) -{ - do_run(_ga, _pop); -} - -// checks for help demand, and writes the status file -// and make_help; in libutils -void make_help(eoParser & _parser); - -// now use all of the above, + representation dependent things -int main(int argc, char* argv[]) -{ - - try - { - eoParser parser(argc, argv); // for user-parameter reading - - eoState state; // keeps all things allocated - - ///// FIRST, problem or representation dependent stuff - ////////////////////////////////////////////////////// - - ////////////////////////////////////////////// - // the genotype - through a genotype initializer - -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -// START read parameters (if any) and create the initializer directly - - // As far as memory management is concerned, the parameters - // AND the values are owned by the parser (handled through references) - - // example of parameter reading using the most compact syntax - // varType var = parser.createParam(varType defaultValue, - // string keyword, - // string comment, - // char shortKeyword, - // string section,).value(); - - // an unsigned parameter - unsigned sampleUnsigned = parser.createParam(unsigned(10), "anUnsigned", "An unsigned parameter",'V', "Representation").value(); - - // a double parameter - double sampleDouble = parser.createParam(0.3, "aDouble", "A double parameter", 's', "Representation" ).value(); - - // some real bounds: [-1,1]x[-1,1] by default - eoRealVectorBounds & sampleBounds = parser.createParam(eoRealVectorBounds(2,-1,1), "someBounds", "Bounds of some real variables", 'B', "Representation").value(); -// END read parameters (if any) and create the initializer directly -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* - -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -// START Modify definitions of objects by eventually add parameters - - /** HINTS - * - * The following declare variables that are objects defined - * in the customized files. - * You shoudl only modify the arguments passed onto their constructors - * ("varType _anyVariable") in their definition - * - * and you can optionally uncomment and modify the lines commented between - * the usual / * and * / (without the blanks :-) - */ - - // the initializer: will be used in make_pop - //////////////////// - eoMyStructInit init/* (varType _anyVariable) */; - - // The fitness - ////////////// - eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; - // turn that object into an evaluation counter - eoEvalFuncCounter eval(plainEval); - - ///////////////////////////// - // Variation operators - //////////////////////////// - // read crossover and mutations, combine each in a proportional Op - // and create the eoGenOp that calls crossover at rate pCross - // then mutation with rate pMut - - // the crossovers - ///////////////// - - // here we can have eoQuadOp (2->2) only - no time for the eoBinOp case - - // you can have more than one - combined in a proportional way - - // first, define the crossover objects and read their rates from the parser - - // A first crossover - eoMyStructQuadCrossover cross1/* (varType _anyVariable) */; - // its relative rate in the combination - double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); - // and the creation of the combined operator with this one - eoPropCombinedQuadOp propXover(cross1, cross1Rate); - - // Optional: A second(and third, and ...) crossover - // of course you must create the corresponding classes - // and all ***MUST*** derive from eoQuadOp - - /* Uncomment if necessary - and replicate as many time as you need - eoMyStructSecondCrossover cross2(varType _anyVariable); - double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); - propXover.add(cross2, cross2Rate); - */ - // if you want some gentle output, the last one shoudl be like - // propXover.add(crossXXX, crossXXXRate, true); - - - // the mutation: same story - //////////////// - // you can have more than one - combined in a proportional way - - // for each mutation, - // - define the mutator object - // - read its rate from the parser - // - add it to the proportional combination - - // a first mutation - eoMyStructMutation mut1/* (varType _anyVariable) */; - // its relative rate in the combination - double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); - // and the creation of the combined operator with this one - eoPropCombinedMonOp propMutation(mut1, mut1Rate); - - // Optional: A second(and third, and ...) mutation with their rates - // of course you must create the corresponding classes - // and all ***MUST*** derive from eoMonOp - - /* Uncomment if necessary - and replicate as many time as you need - eoMyStructSecondMutation mut2(varType _anyVariable); - double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); - propMutation.add(mut2, mut2Rate); - */ - // if you want some gentle output, the last one shoudl be like - // propMutation.add(mutXXX, mutXXXRate, true); - - // end of crossover and mutation definitions - //////////////////////////////////////////// - -// END Modify definitions of objects by eventually add parameters -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* - -// from now on, you do not need to modify anything -// though you CAN add things to the checkpointing (see tutorial) - - // now build the eoGenOp: - // to simulate SGA (crossover with proba pCross + mutation with proba pMut - // we must construct - // a sequential combination of - // with proba 1, a proportional combination of - // a QuadCopy and our crossover - // with proba pMut, our mutation - - // but of course you're free to use any smart combination you could think of - // especially, if you have to use eoBinOp rather than eoQuad Op youůll have - // to modify that part - - // First read the individual level parameters - eoValueParam& pCrossParam = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); - // minimum check - if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) - throw runtime_error("Invalid pCross"); - - eoValueParam& pMutParam = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); - // minimum check - if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) - throw runtime_error("Invalid pMut"); - - - // the crossover - with probability pCross - eoProportionalOp * cross = new eoProportionalOp ; - state.storeFunctor(cross); - eoQuadOp *ptQuad = new eoQuadCloneOp; - state.storeFunctor(ptQuad); - cross->add(propXover, pCrossParam.value()); // crossover, with proba pcross - cross->add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross - - // now the sequential - eoSequentialOp *op = new eoSequentialOp; - state.storeFunctor(op); - op->add(*cross, 1.0); // always do combined crossover - op->add(propMutation, pMutParam.value()); // then mutation, with proba pmut - - // that's it! (beware op is a pointer - for lazy cut-and-paste reasons! - - // end of operator definition - //////////////////////////// - - //// Now the representation-independent things - // - // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT - // unless you want to add specific statistics to the checkpoint - ////////////////////////////////////////////// - - // initialize the population - // yes, this is representation indepedent once you have an eoInit - eoPop& pop = make_pop(parser, state, init); - - // stopping criteria - eoContinue & term = make_continue(parser, state, eval); - // output - eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); - // algorithm (need the operator!) - eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, (*op)); - - ///// End of construction of the algorithm - - ///////////////////////////////////////// - // to be called AFTER all parameters have been read!!! - make_help(parser); - - //// GO - /////// - // evaluate intial population AFTER help and status in case it takes time - apply(eval, pop); - // if you want to print it out -// cout << "Initial Population\n"; -// pop.sortedPrintOn(cout); -// cout << endl; - - run_ea(ga, pop); // run the ga - - cout << "Final Population\n"; - pop.sortedPrintOn(cout); - cout << endl; - - } - catch(exception& e) - { - cout << e.what() << endl; - } -} From 653e64df090bff2953a3c0b72ae4b0f658644bf7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Oct 2001 03:30:12 +0000 Subject: [PATCH 0651/2134] Commented out the oeprator() default function in base class: I find it more secure to be warned at compile time that one function is still pure virtual than to look for the error after a run-time-error that gives no clue --- eo/src/eoInit.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index f872c1ddf..3d5f6835a 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -45,10 +45,10 @@ template class eoInit : public eoUF { public: - virtual void operator()(EOT& chrom) - { - throw runtime_error("In the eoInit base class"); // just in case - } +// virtual void operator()(EOT& chrom) +// { +// throw runtime_error("In the eoInit base class"); // just in case +// } }; /** turning an eoInit into a generator From f4efc65994d6fcd4afa11818c7e2fb7bedcd2237 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Oct 2001 03:51:15 +0000 Subject: [PATCH 0652/2134] Modified the reseed method in RNG class so two different seeds give different sequences, after Jeroen's remark (jeggermo@liacs.nl) --- eo/src/utils/eoRNG.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index f9b3050c6..faeead881 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -124,9 +124,24 @@ public : } /** - Re-initializes the Random Number Generator. + * Re-initializes the Random Number Generator. + * WARNING: after Jeroen Eggermont noticed that + * initialize does not differentiate between odd and even numbers, + * the argument to reseed is now doubled before being passed on. + * + * Manually divide the seed by 2 if you want to re-run old runs + * + * MS. 5 Oct. 2001 */ void reseed(uint32 s) + { + initialize(2*s); + } + + /** + Re-initializes the Random Number Generator - old version + */ + void oldReseed(uint32 s) { initialize(s); } From 30616fca424a17615f0f4b232c6ac453170ebfc9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Oct 2001 03:56:21 +0000 Subject: [PATCH 0653/2134] Forgot to double also the parameter to initialize in the Ctor! --- eo/src/utils/eoRNG.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index faeead881..1c8d8f63f 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -110,12 +110,12 @@ class eoRng : public eoObject, public eoPersistent public : /** ctor takes a random seed; if you want another seed, use reseed - @see reseed + @see reseed to see why the parameter to initialize is doubled */ eoRng(uint32 s) : state(0), next(0), left(-1), cached(false), N(624), M(397), K(0x9908B0DFU) { state = new uint32[N+1]; - initialize(s); + initialize(2*s); } ~eoRng(void) From 8f1af522a68145b552f663ebe56d3f6c92c4c5ec Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 5 Oct 2001 09:32:49 +0000 Subject: [PATCH 0654/2134] Since g++ 2.95.x on our solaris server doesn't have macros to check for infinity and NaN these checks have been removed from the source code and a protected divided function node is now used. --- eo/app/gpsymreg/fitness.h | 35 +++++++++-------------------------- eo/app/gpsymreg/node.h | 6 ------ 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h index 35563599a..d022e84c7 100644 --- a/eo/app/gpsymreg/fitness.h +++ b/eo/app/gpsymreg/fitness.h @@ -77,9 +77,13 @@ double _multiplies(double arg1, double arg2) return arg1 * arg2; } +// the function for a protected divide looks a little bit different double _divides(double arg1, double arg2) { - return arg1 / arg2; + if (arg2 ==0) + return 0; + else + return arg1 / arg2; } double _negate(double arg1) @@ -103,12 +107,8 @@ void init(vector &initSequence) Operation OpPLUS ( _plus, string("+")); Operation OpMINUS( _minus,string("-")); Operation OpMULTIPLIES(_multiplies,string("*")); - // We can use the normal divide function because there is a check for finite numbers in the node class - // so PDIV (protected divided) is enforced there so: (x/0 -> nan -> 0) + // We can use a protected divide function. Operation OpDIVIDE( _divides, string("/") ); - // we can also use the standard 'pow' function from cmath or math because of the check for nan is - // in the node class so: (-3^3.1) -> nan -> 0) - Operation OpPOW( pow, string("^") ); // Now the functions as binary functions @@ -116,23 +116,15 @@ void init(vector &initSequence) Operation MINUS( string("minus"), _minus); Operation MULTIPLIES( string("multiply"), _multiplies); Operation DIVIDE( string("divide"), _divides); - Operation POW(string("pow"), pow); // and some unary functions Operation NEGATE( _negate,string("-")); Operation SIN ( sin, string("sin")); Operation COS ( cos, string("cos")); - // all functions are "protected" inside the Node class so can also use tan(x) - // resulting values of -inf, inf or NaN (not-a-number) are converted to 0 - Operation TAN ( tan, string("tan")); - Operation EXP ( exp, string("e^")); - Operation LOG ( log, string("ln")); - // Now we are ready to add the possible nodes to our initSequence (which is used by the eoDepthInitializer) - - // always add the leaves (nodes with arity 0) first (or the program will crash) + // so lets start with our variable initSequence.push_back(varX); @@ -152,16 +144,12 @@ void init(vector &initSequence) initSequence.push_back( NEGATE ); initSequence.push_back( SIN ); initSequence.push_back( COS ); - initSequence.push_back( TAN ); - initSequence.push_back( EXP ); - initSequence.push_back( LOG ); // and the binary functions initSequence.push_back( PLUS); initSequence.push_back( MINUS ); initSequence.push_back( MULTIPLIES ); initSequence.push_back( DIVIDE ); - initSequence.push_back( POW ); // and the binary operators initSequence.push_back( OpPLUS); @@ -170,8 +158,6 @@ void init(vector &initSequence) initSequence.push_back( OpMULTIPLIES ); initSequence.push_back( OpDIVIDE ); - initSequence.push_back( OpPOW ); - }; @@ -202,11 +188,8 @@ class RegFitness: public eoEvalFunc< eoParseTree > fit += pow(target - output, 2); } - // some versions of gcc (e.g. 2.95.2 on solaris) don't have isinf(x) defined - if (isinf(fit) == 0) - fitness[NORMAL] = fit; - else - fitness[NORMAL] = MAXFLOAT; + + fitness[NORMAL] = fit; fitness[SMALLESTSIZE] = _eo.size() / (1.0*parameter.MaxSize); _eo.fitness(fitness); diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h index 6905138cd..c22e1f881 100644 --- a/eo/app/gpsymreg/node.h +++ b/eo/app/gpsymreg/node.h @@ -160,12 +160,6 @@ class Node } - // if the result is infinite (positive or negative) or not_a_number (nan) then result becomes 0 - // however some versions of gcc (e.g. 2.95.2 on solaris) don't have the finite(x) defined - #ifdef finite - if (!finite(result)) - result=0; - #endif } template From 7e885e8f8c1ef5eacb9279dc10838a7127167681 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 5 Oct 2001 12:39:30 +0000 Subject: [PATCH 0655/2134] ramped half and half initialization procedure for eoParseTree populations added. --- eo/src/gp/eoParseTreeDepthInit.h | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index ca9be86bf..85cc8efe4 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -31,6 +31,7 @@ #include #include #include +#include using namespace gp_parse_tree; using namespace std; @@ -142,4 +143,49 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > bool grow; }; +/** + * A template function for ramped half and half initialization of an eoParseTree population + * @param pop the population to be created + * @param population_size the size of the population to be created + * @param init_max_depth the initial maximum tree depth + * @param initializor A vector containing the possible nodes + + \ingroup ParseTree + */ +template +void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned int population_size, unsigned int init_max_depth, vector &initializor) +{ + typedef eoParseTree EoType; + typedef eoPop< EoType > Pop; + + unsigned int M = init_max_depth - 1; + unsigned int part_pop_size = population_size / (2*M); + unsigned int m=0; + + + pop.clear(); + + // initialize with Depth's (D) -> 2 + for(m=init_max_depth; m >= 2; m--) + { + eoGpDepthInitializer grow_initializer(m, initializor, true); + Pop grow(part_pop_size, grow_initializer); + pop.insert(pop.begin(), grow.begin(), grow.end()); + + eoGpDepthInitializer full_initializer(m, initializor, false); + Pop full(part_pop_size, full_initializer); + pop.insert(pop.begin(), full.begin(), full.end()); + } + + bool g = true; + while (pop.size() < population_size) + { + eoGpDepthInitializer initializer(init_max_depth, initializor, g); + Pop p(1, initializer); + pop.insert(pop.begin(), p.begin(), p.end()); + g= !g; + } +} + + #endif From f2c21bdc0b37311b86b7e10657fe95f516559fd1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Oct 2001 09:14:15 +0000 Subject: [PATCH 0656/2134] Removed trailing text after #endif - causes warning on many compilers --- eo/src/eoCtrlCContinue.h | 3 ++- eo/src/eoDetTournamentSelect.h | 2 +- eo/src/es/eoReal.h | 2 +- eo/src/utils/compatibility.h | 4 ++-- eo/src/utils/eoState.h | 2 +- eo/src/utils/pipecom.h | 4 ++-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 92ab661cc..edff201d2 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -70,4 +70,5 @@ public: #endif -#endif // of MSVC comment-out +#endif + // of MSVC comment-out diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index 9c6d6cd16..7bd272a7d 100755 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -69,5 +69,5 @@ template class eoDetTournamentSelect: public eoSelectOne //----------------------------------------------------------------------------- -#endif // eoDetTournamentSelect_h +#endif diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index b239fecfc..e1429e524 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -55,4 +55,4 @@ template class eoReal: public eoVector //----------------------------------------------------------------------------- -#endif //eoReal_h +#endif diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 73d2cc0b1..405317ee4 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -71,6 +71,6 @@ namespace std } } -#endif // _MSC_VER - +#endif + // _MSC_VER #endif diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index ffb195363..42fb30006 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -132,4 +132,4 @@ private : }; -#endif //eoState_h +#endif diff --git a/eo/src/utils/pipecom.h b/eo/src/utils/pipecom.h index d90f151a6..832b01bb9 100644 --- a/eo/src/utils/pipecom.h +++ b/eo/src/utils/pipecom.h @@ -5,7 +5,7 @@ * Created......: Thu Mar 9 17:21:15 1995 * Description..: Pipe communication with a process * - * Ident........: $Id: pipecom.h,v 1.2 2001-02-09 05:09:26 evomarc Exp $ + * Ident........: $Id: pipecom.h,v 1.3 2001-10-08 09:13:16 evomarc Exp $ * ---------------------------------------------------------------------- */ @@ -45,4 +45,4 @@ int PipeComWaitFor( PCom *from, char *what ); } /* ferme extern "C" */ #endif -#endif /* PIPECOM_H */ +#endif From 11b3eabfca8534cfa440da8d16b7d206dd434901 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 17 Oct 2001 17:48:50 +0000 Subject: [PATCH 0657/2134] Corrected a few small problems - thanks to Sebastiao CORREIA for pointing them out --- eo/tutorial/html/eoBottomUp.html | 7 +++- eo/tutorial/html/eoProgramming.html | 64 ++++++++++++++--------------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/eo/tutorial/html/eoBottomUp.html b/eo/tutorial/html/eoBottomUp.html index 9589a8d90..399abc82b 100644 --- a/eo/tutorial/html/eoBottomUp.html +++ b/eo/tutorial/html/eoBottomUp.html @@ -16,7 +16,7 @@ hints - EO documentation

      EO - Component-Based approach

      -


      Congratualtions - You have chosen the component-based approach!  +


      Congratulations - You have chosen the component-based approach!  From here you will be allowed to browse into the different components of an Evolutionary Algorithm, and to see how to program your favorite using the EO library. @@ -36,13 +36,16 @@ to go directly to the corresponding section of the tutorial. - + + + + diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index f1cc7bc0e..b5bca2866 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -6,12 +6,12 @@ EO Programming guide -General: Tutorial +General: Tutorial main page - -Algorithm-Based -- Component-Based -- Programming -hints - EO +Algorithm-Based +- Component-Based +- Programming +hints - EO documentation


      Local: Templates @@ -34,10 +34,10 @@ naming variables in algebra: you can write a lot of equations involving some variable $x$ without knowing even it if will be an integer or a float (or a matrix or ...). The main basic type that is templatized in EO is the fitness: an EO object is some object which has a fitness of some type -F that can be anything. The definition for that is (see EO.h) +F that can be anything. The definition for that is (see EO.h)

      template<F> class EO

      The idea is that, later in your code, you can define a class as follows -(see for instance  eoBin.h +(see for instance  eoBin.h

      template<F> class eoBin : public EO<F>
      { ... code for eoBin  };

      and then use it in your application as @@ -71,15 +71,15 @@ a hierarchy of functions with defaults behaviors and specialized sub-functions ...

    -Functors are so intimately linked to EO that a base class (eoFunctorBase) +Functors are so intimately linked to EO that a base class (eoFunctorBase) has been designed to hold all functors. This base class is itself divided into three derived class. These classes tell you immediately what kind of arguments the operator() method requires and what kind of result it produces. See EO -conventions, and the inheritance +conventions, and the inheritance diagram of class eoFunctorBase.
    For a more complete introduction to functors, with detailed discussion, -go to the STL +go to the STL documentation - as STL also heavily relies on functors, and the eoFunctorBase paradigm is borrowed from there.

    Functors: Example: @@ -118,7 +118,7 @@ method. is for arity-zero functors, i.e.  their operator() method does not require any argument. It has a single template parameter, the return type of the operator() -method. For instance,  eoMonitor  +method. For instance,  eoMonitor  are eoF's that return an eoMonitor &. @@ -127,7 +127,7 @@ that return an eoMonitor &operator() method requires one argument. It has two template parameters, the type of the argument and the return type of the operator() -method. For instance,  eoMonOp's +method. For instance,  eoMonOp's are eoUF's that take as argument an EOT & and return void @@ -138,14 +138,14 @@ and return voidoperator() method requires two arguments. It has three template parameters, the types of the arguments and the return type of the operator() -method. For instance,  eoBinOp's +method. For instance,  eoBinOp's are eoBF's that take as arguments a const EOT & and an EOT &, and return void . -Now go back to the inheritance +Now go back to the inheritance diagram of class eoFunctorBase, and guess the interface for all functors!

    Note: for @@ -153,7 +153,7 @@ obvious simplicity reasons, we very often omit the reference to the

    • -eoMonOp's +eoMonOp's are eoUF's that take as argument an EOT & and return void
    • @@ -161,7 +161,7 @@ and return void it actually means
      • -eoMonOp's +eoMonOp's are eoUF's, their operator() method takes as argument an EOT & @@ -178,9 +178,9 @@ Template Library. of STL to use EO (like with "hello", "please" and "goodbye" you can survive in a foreign country :-) and even to contribute to new EO features. Moreover, while browsing through EO code, you will gradually learn how -to use STL, especially if you check at the SGI +to use STL, especially if you check at the SGI STL Web site from time to time, where you can not only download STL, -but also browse in the Programmer's guide  for isntance from the Table +but also browse in the Programmer's guide  for isntance from the Table of Content.

        Anyway, you will only find here, in EO tutorial, the basics of STL that you will need to understand most of EO code - and to guess what the parts @@ -309,7 +309,7 @@ numbers who look random (w.r.t. some statistical criteria). to ensure reproducibility of the results across different platforms, EO has its own RNG, the ``Mersenne Twister'' random number generator MT19937 (thanks to Takuji -Nishimura, see eoRNG.h +Nishimura, see eoRNG.h comments).

        Though you can define and use as many RNGs as you wish in EO, the library also provides you with a global RNG termed eo::rng. @@ -324,22 +324,22 @@ purposes

      • random numbers are computed starting from a seed - starting from the same seed will lead to the same series of pseudo-random numbers, and hence to the same results of the algorithms. All examples in this tutorial will -use the RNG seeding procedure, see e.g. in Lesson1. +use the RNG seeding procedure, see e.g. in Lesson1.
      • to simulate "true" random runs, you can just seed the RNG with a machine-clock -related number, e.g. calling time(0), as done for instance in Lesson3 +related number, e.g. calling time(0), as done for instance in Lesson3 (and after).
      As RNGs produce, by definition, integers that are uniformly distributed between 0 and some maximal number, EO provides you with random numbers following different probability distribution -(e.g. floating point following normal -distribution). See the complete +(e.g. floating point following normal +distribution). See the complete list of RNG primitives. -

      EO also provides random_generators +

      EO also provides random_generators that can be used in STL call to generate series of random numbers, as in -eoPop +eoPop initializers.

      Note: the eo:: prefix indicates that it is in a separate C++ namespace, to avoid collision @@ -388,8 +388,8 @@ above). The name of the EO template should be EOT. This allows quick understanding of the inheritance diagrams for functors. and immediate perception of the arguments and return types of the functors oeprator() -method (as in eoMonOp -or  eoBinOp). +method (as in eoMonOp +or  eoBinOp).
       

    • @@ -403,11 +403,11 @@ Blabla
    • numbers - EO programming style

      -
      General: Tutorial -main page - Algorithm-Based -- Component-Based -- Programming -hints - EO +
      General:
      Tutorial +main page - Algorithm-Based +- Component-Based +- Programming +hints - EO documentation

      From 03308af599629b3124e97ae1ef7e878f665f92b7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 17 Oct 2001 17:49:54 +0000 Subject: [PATCH 0658/2134] Corrected a few small problems - including dependencies in Makefile thanks to Sebastiao CORREIA for pointing them out --- eo/tutorial/Templates/Makefile.tmpl | 13 +++++++++++++ eo/tutorial/Templates/MyStructEA.cpp | 5 ++++- eo/tutorial/Templates/README | 23 ++++++++++++++--------- eo/tutorial/Templates/eoMyStruct.tmpl | 1 + 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/eo/tutorial/Templates/Makefile.tmpl b/eo/tutorial/Templates/Makefile.tmpl index f91d23089..cfc870722 100644 --- a/eo/tutorial/Templates/Makefile.tmpl +++ b/eo/tutorial/Templates/Makefile.tmpl @@ -4,6 +4,17 @@ .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I./util -Wall -g -c $*.cpp +# local sources +LOCAL_SOURCES = MyStructEA.cpp \ + eoMyStruct.h \ + eoMyStructEvalFunc.h \ + eoMyStructInit.h \ + eoMyStructMutation.h \ + eoMyStructQuadCrossover.h \ + make_genotype_MyStruct.h \ + make_op_MyStruct.h + + # START eventually modify the name of EO dir DIR_EO = ../../src @@ -22,4 +33,6 @@ all : $(ALL) clean : ; /bin/rm *.o $(ALL) +########## local dependencies +AppliEA.o : $(LOCAL_SOURCES) diff --git a/eo/tutorial/Templates/MyStructEA.cpp b/eo/tutorial/Templates/MyStructEA.cpp index 9d58f81d0..9020d4728 100644 --- a/eo/tutorial/Templates/MyStructEA.cpp +++ b/eo/tutorial/Templates/MyStructEA.cpp @@ -51,10 +51,13 @@ using namespace std; //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* // START fitness type: double or eoMaximizingFitness if you are maximizing // eoMinimizingFitness if you are minimizing -typedef eoMyStruct Indi; // ***MUST*** derive from EO +typedef eoMinimizingFitness MyFitT ; // type of fitness // END fitness type //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// Then define your EO objects using that fitness type +typedef eoMyStruct Indi; // ***MUST*** derive from EO + // create an initializer #include "make_genotype_MyStruct.h" eoInit & make_genotype(eoParameterLoader& _parser, eoState&_state, Indi _eo) diff --git a/eo/tutorial/Templates/README b/eo/tutorial/Templates/README index e1284acb3..91c85d6a7 100644 --- a/eo/tutorial/Templates/README +++ b/eo/tutorial/Templates/README @@ -30,18 +30,23 @@ First, let's choose a name: let's call the new EO class eoAppli. All newly created classes will be named eoAppliXXX (in the file eoAppliXXX) -1- choose a directory name for your application in the tutorial dir, -"parallel" to the LessonX dirs (though any name can do, of course, we -will suppose its full name, from the / root dir, is APPLICATION in -what follows) +1- cd to the tutorial dir -2- cd to the tutorial/Templates dir +2- create the directory for your application (let's assume you call it +APPLICATION): type in -3- run the helper script create.sh with the following arguments - create.sh Appli APPLICATION + mkdir APPLICATION -4- cd to the APPLICATION dir. You should see there the following -files: +3- go to the Templates dir + + cd Templates + +and run the helper script create.sh with the following arguments + + ./create.sh Appli ../APPLICATION + +4- cd to the APPLICATION dir (cd ../APPLICATION). +You should see there the following files: AppliEA.cpp the main file, includes all other, to be compiled Makefile with default target eoAppliEA eoAppli.h class eoAppli, FitT = template fitness diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl index b33c30f3a..f36875168 100644 --- a/eo/tutorial/Templates/eoMyStruct.tmpl +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -40,6 +40,7 @@ public: // END Code of default Ctor of an eoMyStruct object } + virtual string className() const { return "eoMyStruct"; } /** printing... */ void printOn(ostream& os) const From 26481ab36ba7cee2676555bda31d5135b77a6d26 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Oct 2001 04:34:58 +0000 Subject: [PATCH 0659/2134] Modified the Makefile.am in main dir, and Makefile in tutorial dir to remove all pushd/popd as they don't exist in Windows/bash --- eo/Makefile.am | 12 ++++++------ eo/tutorial/Makefile | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 3c2b9a8ad..a574de0cb 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -15,22 +15,22 @@ EXTRA_DIST=LICENSE ############################################################################### lib: - pushd src; $(MAKE) all; popd + cd src; $(MAKE) all; cd .. # so that make doc always compiles the doc ... doc: doc/eo.cfg - pushd doc; $(MAKE) doc; touch eo.cfg; popd + cd doc; $(MAKE) doc; touch eo.cfg; cd .. tutorial: - pushd tutorial; $(MAKE) all; popd + cd tutorial; $(MAKE) all; cd .. app: - pushd app; $(MAKE) all; popd + cd app; $(MAKE) all; cd .. all: - for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done + for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done clean: - for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done + for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done ############################################################################### diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index 6c4153013..8bd739e40 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -1,7 +1,7 @@ SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 all: - for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done + for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done lesson1 : cd Lesson1; make @@ -23,4 +23,4 @@ distdir : check : clean: - for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done + for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done From f7377b0fcf393f72b7766c5302c9ccdc47b68c20 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Oct 2001 04:37:14 +0000 Subject: [PATCH 0660/2134] All files on one line in Makefile.am (for Windows) --- eo/src/es/Makefile.am | 7 +------ eo/src/ga/Makefile.am | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 9b3882662..b30a704a6 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -6,12 +6,7 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libes.a -libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp \ - make_continue_real.cpp make_genotype_real.cpp \ - make_op_real.cpp make_pop_real.cpp make_run_real.cpp \ - make_algo_scalar_es.cpp make_checkpoint_es.cpp \ - make_continue_es.cpp make_genotype_es.cpp \ - make_op_es.cpp make_pop_es.cpp make_run_es.cpp +libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp make_continue_real.cpp make_genotype_real.cpp make_op_real.cpp make_pop_real.cpp make_run_real.cpp make_algo_scalar_es.cpp make_checkpoint_es.cpp make_continue_es.cpp make_genotype_es.cpp make_op_es.cpp make_pop_es.cpp make_run_es.cpp CPPFLAGS = -Wall CXXFLAGS = diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index ebb625684..68d6194ac 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -6,13 +6,7 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libga.a -libga_a_SOURCES = make_algo_scalar_ga.cpp \ - make_checkpoint_ga.cpp \ - make_continue_ga.cpp \ - make_genotype_ga.cpp \ - make_op_ga.cpp \ - make_pop_ga.cpp \ - make_run_ga.cpp +libga_a_SOURCES = make_algo_scalar_ga.cpp make_checkpoint_ga.cpp make_continue_ga.cpp make_genotype_ga.cpp make_op_ga.cpp make_pop_ga.cpp make_run_ga.cpp CPPFLAGS = -Wall CXXFLAGS = libeoincdir = $(includedir)/eo/ga From 95216ac671189111b51fece47cc9c73df018f746 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Oct 2001 04:57:30 +0000 Subject: [PATCH 0661/2134] iAdding a file config.cache as it seems that the defaults don't work in Windows/Cygwin environement. Thanks to Sebastiao CORREIA and Jerome JEAN-CHARLES for providing this file. --- eo/config.cache | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 eo/config.cache diff --git a/eo/config.cache b/eo/config.cache new file mode 100644 index 000000000..b1e24a926 --- /dev/null +++ b/eo/config.cache @@ -0,0 +1,34 @@ +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +ac_cv_type_size_t=${ac_cv_type_size_t='yes'} +ac_cv_func_select=${ac_cv_func_select='yes'} +ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} +ac_cv_prog_CXX=${ac_cv_prog_CXX='c++'} +ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB='ranlib'} +ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross='no'} +ac_cv_lib_eo_main=${ac_cv_lib_eo_main='no'} +ac_cv_c_const=${ac_cv_c_const='yes'} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} +ac_cv_header_limits_h=${ac_cv_header_limits_h='yes'} +ac_cv_header_stdc=${ac_cv_header_stdc='yes'} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'} +ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works='yes'} +ac_cv_c_inline=${ac_cv_c_inline='inline'} +ac_cv_lib_m_main=${ac_cv_lib_m_main='yes'} +ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main='no'} +ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g='yes'} +ac_cv_prog_gxx=${ac_cv_prog_gxx='yes'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} + From af05dfacb9a430a801c0ef4dd6e36c69479dccf9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Oct 2001 05:30:45 +0000 Subject: [PATCH 0662/2134] Added MAXFLOAT and MINFLOAT as it seems that Cygwin needs that ??? --- eo/src/utils/eoData.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index 7e6d256b3..877b4720f 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -53,6 +53,14 @@ using namespace std; #endif #endif +// Added because it does not seem to be defined with Cygwin??? +#ifndef MINFLOAT + #define MINFLOAT ( (float)1e-127 ) +#endif +#ifndef MAXFLOAT + #define MAXFLOAT ( (float)1e127 ) +#endif + #ifndef _MSC_VER #include #define _isnan isnan From 77645540567f4f0f407cd7aa575a5826fdbb9712 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 18 Oct 2001 08:52:40 +0000 Subject: [PATCH 0663/2134] Some changes to make gpsymreg compile correctly on windows/cygwin systems --- eo/app/gpsymreg/main.cc | 336 ++++++++++++++++++++-------------------- 1 file changed, 170 insertions(+), 166 deletions(-) diff --git a/eo/app/gpsymreg/main.cc b/eo/app/gpsymreg/main.cc index 6471dd8a9..f9b6aeb08 100644 --- a/eo/app/gpsymreg/main.cc +++ b/eo/app/gpsymreg/main.cc @@ -1,166 +1,170 @@ -/* - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - jeggermo@liacs.nl -*/ - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include - -using namespace gp_parse_tree; -using namespace std; - -//----------------------------------------------------------------------------- - -#include "node.h" -#include "parameters.h" -#include "fitness.h" - - -// TYPE DECLARATIONS FOR GP - - -typedef eoParseTree EoType; -typedef eoPop Pop; - -//----------------------------------------------------------------------------- - -int main(int argc, char *argv[]) -{ - - // the vector containing the possible nodes - vector initSequence; - - // initialise parameters - Parameters parameter(argc, argv); - - // set the randomseed - rng.reseed(parameter.randomseed); - - // Create a generation counter - eoValueParam generationCounter(0, "Gen."); - - // Create an incrementor (sub-class of eoUpdater). Note that the - // parameter's value is passed by reference, - // so every time the incrementer is updated (every generation), - // the data in generationCounter will change. - eoIncrementor increment(generationCounter.value()); - - - // create an instantiation of the fitness/evaluation function - // it initializes the initSequence vector - // the parameters are passed on as well - RegFitness eval(generationCounter, initSequence, parameter); - - // Depth Initializor, defaults to grow method. - eoGpDepthInitializer initializer(parameter.InitMaxDepth, initSequence); - - // create the initial population - Pop pop(parameter.population_size, initializer); - - // and evaluate the individuals - apply(eval, pop); - - generationCounter.value()++; // set the generationCounter to 1 - - - // define X-OVER - - eoSubtreeXOver xover(parameter.MaxSize); - - // define MUTATION - eoBranchMutation mutation(initializer, parameter.MaxSize); -// eoExpansionMutation mutation(initializer, parameter.MaxSize); -// eoCollapseSubtreeMutation mutation(initializer, parameter.MaxSize); -// eoPointMutation mutation(initSequence); -// eoHoistMutation mutation; - - // The operators are encapsulated into an eoTRansform object, - // that performs sequentially crossover and mutation - eoSGATransform transform(xover, parameter.xover_rate, mutation, parameter.mutation_rate); - - // The robust tournament selection - // in our case 5-tournament selection - eoDetTournamentSelect selectOne(parameter.tournamentsize); - // is now encapsulated in a eoSelectMany - eoSelectMany select(selectOne, parameter.offspring_size, eo_is_an_integer); - - // and the generational replacement - //eoGenerationalReplacement replace; - // or the SteadtState replacment - //eoSSGAWorseReplacement replace; - // or comma selection - eoCommaReplacement replace; - - // Terminators - eoGenContinue term(parameter.nGenerations); - - eoCheckPoint checkPoint(term); - - // STATISTICS - eoAverageStat avg; - eoBestFitnessStat best; - - - // Add it to the checkpoint, - // so the counter is updated (here, incremented) every generation - checkPoint.add(increment); - checkPoint.add(avg); - checkPoint.add(best); - - eoGnuplot1DMonitor gnuplotmonitor("gnuplotBestStats"); - gnuplotmonitor.add(generationCounter); - gnuplotmonitor.add(best); - // we need to add a empty string variable if we want to seed the second fitness value - eoValueParam dummy1("", "Smallest Tree Size"); - gnuplotmonitor.add(dummy1); - - eoGnuplot1DMonitor gnuplotAvgmonitor("gnuplotAvgStats"); - gnuplotAvgmonitor.add(generationCounter); - gnuplotAvgmonitor.add(avg); - // we need to add a empty string variable if we want to seed the second fitness value - eoValueParam dummy2("", "Average Tree Size"); - gnuplotAvgmonitor.add(dummy2); - - checkPoint.add(gnuplotmonitor); - checkPoint.add(gnuplotAvgmonitor); - - // GP Generation - eoEasyEA gp(checkPoint, eval, select, transform, replace); - - cout << "Initialization done" << endl; - - - try - { - gp(pop); - } - catch (exception& e) - { - cout << "exception: " << e.what() << endl;; - exit(EXIT_FAILURE); - } - - - return 1; -}; - - +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +//----------------------------------------------------------------------------- + +#include "node.h" +#include "parameters.h" +#include "fitness.h" + + +// TYPE DECLARATIONS FOR GP + + +typedef eoParseTree EoType; +typedef eoPop Pop; + +//----------------------------------------------------------------------------- + +int main(int argc, char *argv[]) +{ +// SC debug +#ifdef NEVERDEF // patch to make run the installation of EO + + // the vector containing the possible nodes + vector initSequence; + + // initialise parameters + Parameters parameter(argc, argv); + + // set the randomseed + rng.reseed(parameter.randomseed); + + // Create a generation counter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + + // create an instantiation of the fitness/evaluation function + // it initializes the initSequence vector + // the parameters are passed on as well + RegFitness eval(generationCounter, initSequence, parameter); + + // Depth Initializor, defaults to grow method. + eoGpDepthInitializer initializer(parameter.InitMaxDepth, initSequence); + + // create the initial population + Pop pop(parameter.population_size, initializer); + + // and evaluate the individuals + apply(eval, pop); + + generationCounter.value()++; // set the generationCounter to 1 + + + // define X-OVER + + eoSubtreeXOver xover(parameter.MaxSize); + + // define MUTATION + eoBranchMutation mutation(initializer, parameter.MaxSize); +// eoExpansionMutation mutation(initializer, parameter.MaxSize); +// eoCollapseSubtreeMutation mutation(initializer, parameter.MaxSize); +// eoPointMutation mutation(initSequence); +// eoHoistMutation mutation; + + // The operators are encapsulated into an eoTRansform object, + // that performs sequentially crossover and mutation + eoSGATransform transform(xover, parameter.xover_rate, mutation, parameter.mutation_rate); + + // The robust tournament selection + // in our case 5-tournament selection + eoDetTournamentSelect selectOne(parameter.tournamentsize); + // is now encapsulated in a eoSelectMany + eoSelectMany select(selectOne, parameter.offspring_size, eo_is_an_integer); + + // and the generational replacement + //eoGenerationalReplacement replace; + // or the SteadtState replacment + //eoSSGAWorseReplacement replace; + // or comma selection + eoCommaReplacement replace; + + // Terminators + eoGenContinue term(parameter.nGenerations); + + eoCheckPoint checkPoint(term); + + // STATISTICS + eoAverageStat avg; + eoBestFitnessStat best; + + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkPoint.add(increment); + checkPoint.add(avg); + checkPoint.add(best); + + eoGnuplot1DMonitor gnuplotmonitor("gnuplotBestStats"); + gnuplotmonitor.add(generationCounter); + gnuplotmonitor.add(best); + // we need to add a empty string variable if we want to seed the second fitness value + eoValueParam dummy1("", "Smallest Tree Size"); + gnuplotmonitor.add(dummy1); + + eoGnuplot1DMonitor gnuplotAvgmonitor("gnuplotAvgStats"); + gnuplotAvgmonitor.add(generationCounter); + gnuplotAvgmonitor.add(avg); + // we need to add a empty string variable if we want to seed the second fitness value + eoValueParam dummy2("", "Average Tree Size"); + gnuplotAvgmonitor.add(dummy2); + + checkPoint.add(gnuplotmonitor); + checkPoint.add(gnuplotAvgmonitor); + + // GP Generation + eoEasyEA gp(checkPoint, eval, select, transform, replace); + + cout << "Initialization done" << endl; + + + try + { + gp(pop); + } + catch (exception& e) + { + cout << "exception: " << e.what() << endl;; + exit(EXIT_FAILURE); + } + +#endif // NEVERDEF + return 1; + +}; + + + From 5897d0062fcf5faad4696d7be81d10544ac4df86 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Oct 2001 11:48:52 +0000 Subject: [PATCH 0664/2134] Replaced pushd and popd with cd and cd .. - for Windows/Cygwin compatibility --- eo/app/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index ecd7a6764..546994654 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -9,9 +9,9 @@ SUBDIRS = gprop mastermind gpsymreg ############################################################################### all: - for i in $(SUBDIRS); do pushd $$i && $(MAKE) all; popd; done + for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done clean: - for i in $(SUBDIRS); do pushd $$i && $(MAKE) clean; popd; done + for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done ############################################################################### From 0bbe7b84cb8056eb3ce643687bc607693d7f1728 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 19 Oct 2001 12:04:12 +0000 Subject: [PATCH 0665/2134] The nameless union in node.h has been removed because not all compilers support it. --- eo/app/gpsymreg/main.cc | 3 --- eo/app/gpsymreg/node.h | 13 +++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/eo/app/gpsymreg/main.cc b/eo/app/gpsymreg/main.cc index f9b6aeb08..abf8a587b 100644 --- a/eo/app/gpsymreg/main.cc +++ b/eo/app/gpsymreg/main.cc @@ -45,8 +45,6 @@ typedef eoPop Pop; int main(int argc, char *argv[]) { -// SC debug -#ifdef NEVERDEF // patch to make run the installation of EO // the vector containing the possible nodes vector initSequence; @@ -161,7 +159,6 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } -#endif // NEVERDEF return 1; }; diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h index c22e1f881..362aae404 100644 --- a/eo/app/gpsymreg/node.h +++ b/eo/app/gpsymreg/node.h @@ -20,6 +20,8 @@ #ifndef _NODE_H #define _NODE_H + + #include #include #include // for finite(double) function @@ -57,15 +59,18 @@ struct Operation typedef string Label; - - union - { + // if your compiler allows you to have nameless unions you can make this a + // union by removing the //'s below + + //union + //{ UnaryFunction uFunction; BinaryFunction bFunction; VariableID id; double constant; - }; + //}; + Label label; Type type; From 4584fda53d3815a5327d99096a4af1281d3fd81b Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 25 Oct 2001 10:39:55 +0000 Subject: [PATCH 0666/2134] Some changes for using EO with libstdc++V3 and gcc-3.01 --- eo/src/eoReduce.h | 23 +++++++++++++++++++---- eo/src/utils/compatibility.h | 5 ++++- eo/src/utils/eoParam.h | 24 ++++++++++++------------ 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 85675a6c6..6a4143c35 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -214,8 +214,15 @@ public: // Now OK to erase some losers for (unsigned i=0; i(_newgen, t_size); - _newgen.erase(&eo); + //OLDCODE EOT & eo = inverse_deterministic_tournament(_newgen, t_size); + //OLDCODE _newgen.erase(&eo); + + // Jeroen Eggermont stdc++v3 patch + // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T + // Because eo already contained a fuction using eoPop::iterator's we will use the following + + _newgen.erase( inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_size) ); + } } private: @@ -259,8 +266,16 @@ public: // Now OK to erase some losers for (unsigned i=0; i(_newgen, t_rate); - _newgen.erase(&eo); + //OLDCODE EOT & eo = inverse_stochastic_tournament(_newgen, t_rate); + //OLDCODE _newgen.erase(&eo); + + // Jeroen Eggermont stdc++v3 patch + // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T + // Because eo already contained a fuction using eoPop::iterator's we will use the following + + _newgen.erase( inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate) ); + + } } diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 405317ee4..4d2f856e5 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -32,7 +32,10 @@ #include #ifdef __GNUC__ -typedef ios ios_base; // not currently defined in GCC + // check for stdlibc++v3 which does have ios_base + #ifndef _CPP_BITS_IOSBASE_H + typedef ios ios_base; // not currently defined in GCC + #endif #endif #ifdef _MSC_VER diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index c0e2d4283..47e680271 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -309,14 +309,14 @@ void eoValueParam >::setValue(std::string _valu template <> std::string eoValueParam >::getValue(void) const { - throw runtime_error("I cannot getValue for a vector"); - return string(""); + throw std::runtime_error("I cannot getValue for a vector"); + return std::string(""); } template <> void eoValueParam >::setValue(std::string) { - throw runtime_error("I cannot setValue for a vector"); + throw std::runtime_error("I cannot setValue for a vector"); return; } @@ -353,7 +353,7 @@ private : * See make_algo.h */ -class eoParamParamType : public std::pair > +class eoParamParamType : public std::pair > { public: eoParamParamType(std::string _value) @@ -361,7 +361,7 @@ public: readFrom(_value); } - ostream & printOn(ostream & _os) const + std::ostream & printOn(std::ostream & _os) const { _os << first; unsigned narg = second.size(); @@ -382,9 +382,9 @@ public: return _os; } - istream & readFrom(istream & _is) + std::istream & readFrom(std::istream & _is) { - string value; + std::string value; _is >> value; readFrom(value); return _is; @@ -400,16 +400,16 @@ public: return; } // so here we do have arguments - string t = _value.substr(pos+1);// the arguments + std::string t = _value.substr(pos+1);// the arguments _value.resize(pos); first = _value; // done for the keyword (NOTE: may be empty string!) // now all arguments - string delim(" (),"); + std::string delim(" (),"); while ( (pos=t.find_first_not_of(delim)) < t.size()) { size_t posEnd = t.find_first_of(delim, pos); - string u(t,pos); + std::string u(t,pos); u.resize(posEnd-pos); second.push_back(u); t = t.substr(posEnd); @@ -418,7 +418,7 @@ public: }; // at the moment, the following are defined in eoParser.cpp -ostream & operator<<(ostream & _os, const eoParamParamType & _rate); -istream & operator>>(istream & _is, eoParamParamType & _rate); +std::ostream & operator<<(std::ostream & _os, const eoParamParamType & _rate); +std::istream & operator>>(std::istream & _is, eoParamParamType & _rate); #endif From 2d12525bc590287e0971e286e417bf6fbc536134 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Sat, 3 Nov 2001 22:10:11 +0000 Subject: [PATCH 0667/2134] the name of the eoGpDepthInitializer class (initializer for parse_tree's has been changed to eoParseTreeDepthInit but backward compatibility is maintained by using a #define statement: #define eoGpDepthInitializer eoParseTreeDepthInit The initializer for strongly typed GP has been changed to eoStParseTreeDepthInit the gpsymreg application has been changed to use the new name --- eo/app/gpsymreg/main.cc | 2 +- eo/config.cache | 39 +++++++++++++++--------------- eo/src/gp/eoParseTreeDepthInit.h | 21 +++++++++------- eo/src/gp/eoStParseTreeDepthInit.h | 14 +++++------ 4 files changed, 39 insertions(+), 37 deletions(-) diff --git a/eo/app/gpsymreg/main.cc b/eo/app/gpsymreg/main.cc index abf8a587b..ee4c29433 100644 --- a/eo/app/gpsymreg/main.cc +++ b/eo/app/gpsymreg/main.cc @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) RegFitness eval(generationCounter, initSequence, parameter); // Depth Initializor, defaults to grow method. - eoGpDepthInitializer initializer(parameter.InitMaxDepth, initSequence); + eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence); // create the initial population Pop pop(parameter.population_size, initializer); diff --git a/eo/config.cache b/eo/config.cache index b1e24a926..8f137b2a7 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -12,23 +12,22 @@ # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # -ac_cv_type_size_t=${ac_cv_type_size_t='yes'} -ac_cv_func_select=${ac_cv_func_select='yes'} -ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} -ac_cv_prog_CXX=${ac_cv_prog_CXX='c++'} -ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB='ranlib'} -ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross='no'} -ac_cv_lib_eo_main=${ac_cv_lib_eo_main='no'} -ac_cv_c_const=${ac_cv_c_const='yes'} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} -ac_cv_header_limits_h=${ac_cv_header_limits_h='yes'} -ac_cv_header_stdc=${ac_cv_header_stdc='yes'} -ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'} -ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works='yes'} -ac_cv_c_inline=${ac_cv_c_inline='inline'} -ac_cv_lib_m_main=${ac_cv_lib_m_main='yes'} -ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main='no'} -ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g='yes'} -ac_cv_prog_gxx=${ac_cv_prog_gxx='yes'} -ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} - +ac_cv_c_const=${ac_cv_c_const=yes} +ac_cv_c_inline=${ac_cv_c_inline=inline} +ac_cv_func_select=${ac_cv_func_select=yes} +ac_cv_header_limits_h=${ac_cv_header_limits_h=yes} +ac_cv_header_stdc=${ac_cv_header_stdc=yes} +ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} +ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} +ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} +ac_cv_path_install=${ac_cv_path_install=$'/usr/bin/install -c'} +ac_cv_prog_CPP=${ac_cv_prog_CPP=$'cc -E'} +ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S=$'ln -s'} +ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} +ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} +ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} +ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} +ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index 85cc8efe4..dfefacf77 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -43,13 +43,16 @@ bool lt_arity(const Node &node1, const Node &node2) return (node1.arity() < node2.arity()); } -/** eoGpDepthInitializer : the initializer class for eoParseTree -\class eoGpDepthInitializer eoParseTreeDepthInit.h gp/eoParseTreeDepthInit.h +/** eoParseTreeDepthInit : the initializer class for eoParseTree +\class eoParseTreeDepthInit eoParseTreeDepthInit.h gp/eoParseTreeDepthInit.h \ingroup ParseTree */ +// eoGpDepthInitializer is defined for backward compatibility +#define eoGpDepthInitializer eoParseTreeDepthInit + template -class eoGpDepthInitializer : public eoInit< eoParseTree > +class eoParseTreeDepthInit : public eoInit< eoParseTree > { public : @@ -61,7 +64,7 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > * @param _initializor A vector containing the possible nodes * @param _grow False results in a full tree, True result is a randomly grown tree */ - eoGpDepthInitializer( + eoParseTreeDepthInit( unsigned _max_depth, const vector& _initializor, bool _grow = true) @@ -73,14 +76,14 @@ class eoGpDepthInitializer : public eoInit< eoParseTree > { if(initializor.empty()) { - throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); + throw logic_error("eoParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); } // lets sort the initializor vector according to arity (so we can be sure the terminals are in front) // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j stable_sort(initializor.begin(), initializor.end(), lt_arity); } /// My class name - virtual string className() const { return "eoDepthInitializer"; }; + virtual string className() const { return "eoParseTreeDepthInit"; }; /**initialize a tree * @param _tree : the tree to be initialized @@ -168,11 +171,11 @@ void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned in // initialize with Depth's (D) -> 2 for(m=init_max_depth; m >= 2; m--) { - eoGpDepthInitializer grow_initializer(m, initializor, true); + eoParseTreeDepthInit grow_initializer(m, initializor, true); Pop grow(part_pop_size, grow_initializer); pop.insert(pop.begin(), grow.begin(), grow.end()); - eoGpDepthInitializer full_initializer(m, initializor, false); + eoParseTreeDepthInit full_initializer(m, initializor, false); Pop full(part_pop_size, full_initializer); pop.insert(pop.begin(), full.begin(), full.end()); } @@ -180,7 +183,7 @@ void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned in bool g = true; while (pop.size() < population_size) { - eoGpDepthInitializer initializer(init_max_depth, initializor, g); + eoParseTreeDepthInit initializer(init_max_depth, initializor, g); Pop p(1, initializer); pop.insert(pop.begin(), p.begin(), p.end()); g= !g; diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index f17ad00d3..7307d063a 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoStDepthInit.h : initializor strongly type GP +// eoStParseTreeDepthInit.h : initializor strongly type GP // (c) Jeroen Eggermont 2001 /* This library is free software; you can redistribute it and/or @@ -53,13 +53,13 @@ using namespace std; Tree pruning strongly typed trees is not possible at the moment. */ -/** eoStDepthInit : the initializer class for strongly typed tree-based genetic programming -\class eoStDepthInit eoStDepthInit.h gp/eoStDepthInit.h +/** eoStParseTreeDepthInit : the initializer class for strongly typed tree-based genetic programming +\class eoStParseTreeDepthInit eoStParseTreeDepthInit.h gp/eoStParseTreeDepthInit.h \ingroup StParseTree */ template -class eoStDepthInit : public eoInit< eoParseTree > +class eoStParseTreeDepthInit : public eoInit< eoParseTree > { public : @@ -71,7 +71,7 @@ class eoStDepthInit : public eoInit< eoParseTree > * @param _initializor A vector containing the possible nodes * @param _grow False results in a full tree, True result is a randomly grown tree */ - eoStDepthInit( + eoStParseTreeDepthInit( unsigned _max_depth, const vector& _node, const int& _return_type, @@ -84,7 +84,7 @@ class eoStDepthInit : public eoInit< eoParseTree > { if(_node.empty()) { - throw logic_error("eoGpDepthInitializer: uhm, wouldn't you rather give a non-empty set of Nodes?"); + throw logic_error("eoStParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); } @@ -118,7 +118,7 @@ class eoStDepthInit : public eoInit< eoParseTree > } /// My class name - virtual string className() const { return "eoStDepthInit"; }; + virtual string className() const { return "eoStParseTreeDepthInit"; }; /**initialize a tree * @param _tree : the tree to be initialized From 50fe1cb529a493434b8dd24fb0b8b86d114b034a Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 5 Nov 2001 08:24:59 +0000 Subject: [PATCH 0668/2134] Small error in header --- eo/src/eoAlgo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoAlgo.h b/eo/src/eoAlgo.h index 74ad29636..44592fc26 100644 --- a/eo/src/eoAlgo.h +++ b/eo/src/eoAlgo.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoOp.h +// eoAlgo.h // (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or From aee6584ceaeead958048172a1d12009b2eec8069 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 5 Nov 2001 14:28:14 +0000 Subject: [PATCH 0669/2134] Just some comments --- eo/test/fitness_traits.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eo/test/fitness_traits.cpp b/eo/test/fitness_traits.cpp index 38c451bc1..d01833138 100644 --- a/eo/test/fitness_traits.cpp +++ b/eo/test/fitness_traits.cpp @@ -101,7 +101,11 @@ struct fitness_traits< pair > /* end fitness_traits.h */ -/* EO.h */ +/* EO.h + +The Fitness template argument is there for backward compatibility reasons + +*/ template > class EO From 58f5fd2f61ffb4a0ce9e8e4b89c4a74fd7509dae Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 5 Nov 2001 16:38:52 +0000 Subject: [PATCH 0670/2134] Added method eoParam* getParamWithLongName(std::string _name); so now you can get a parameter in another place than where it was defined just by giving its name --- eo/src/utils/eoParser.cpp | 20 ++++++++++++++++++++ eo/src/utils/eoParser.h | 12 +++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 10a2bea4f..d7a138d35 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -79,6 +79,26 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, processParam(needHelp); } +/** + * get a handle on a param from its longName + * + * if not found, returns 0 (null pointer :-) + * + * Not very clean (requires hard-coding of the long name twice!) + * but very useful in many occasions... + */ +eoParam* eoParser::getParamWithLongName(std::string _name) +{ + typedef std::multimap MultiMapType; + typedef MultiMapType::const_iterator It; + for (It p = params.begin(); p != params.end(); ++p) + { + if (p->second->longName() == _name) + return p->second; + } + return 0; +} + void eoParser::processParam(eoParam& param, std::string section) { doRegisterParam(param); // plainly register it diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index f95956de4..52ef152b5 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2001-04-10 15:08:09 $ $Version$ $Author: evomarc $ +CVS Info: $Date: 2001-11-05 16:38:51 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -149,6 +149,16 @@ public: virtual bool isItThere(eoParam& _param) const { return getValue(_param).first; } +/** + * get a handle on a param from its longName + * + * if not found, returns 0 (null pointer :-) + * + * Not very clean (requires hard-coding of the long name twice!) + * but very useful in many occasions... + */ + eoParam* getParamWithLongName(std::string _name); + private: void doRegisterParam(eoParam& param) const; From ddb9e026cfa2b8005644ee6e20569dfceaebd6be Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 7 Nov 2001 10:57:53 +0000 Subject: [PATCH 0671/2134] Fixed call to inverse_stochastic inside eoDetTournament --- eo/src/eoReduce.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 6a4143c35..7f737739f 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -221,7 +221,7 @@ public: // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T // Because eo already contained a fuction using eoPop::iterator's we will use the following - _newgen.erase( inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_size) ); + _newgen.erase( inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size) ); } } From beba7bd5c995e2e713a22f93b5dc7cbbe8f762a8 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 7 Nov 2001 15:23:24 +0000 Subject: [PATCH 0672/2134] Updated makefile.am such that "make check" will run all test programs. Fixed a number of erronuous return values that made the script fail. What's left is let Marc clean up the mess he made with t-eoReal and t-eoRealAllESAllAgain --- eo/test/Makefile.am | 8 ++++++- eo/test/run_tests | 38 +--------------------------------- eo/test/t-MGE-control.cpp | 6 +++--- eo/test/t-MGE.cpp | 6 +++--- eo/test/t-MGE1bit.cpp | 6 +++--- eo/test/t-eoCheckpointing.cpp | 1 - eo/test/t-eoExternalEO.cpp | 1 - eo/test/t-eoGenOp.cpp | 1 - eo/test/t-eoReplacement.cpp | 1 - eo/test/t-eoSelect.cpp | 7 +++---- eo/test/t-eoStateAndParser.cpp | 1 - eo/test/t-eoSymreg.cpp | 1 - eo/test/t-eobin.cpp | 1 - eo/test/t-eofitness.cpp | 1 - 14 files changed, 20 insertions(+), 59 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index db51f6f08..8cc72c5e9 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -16,7 +16,13 @@ CXXFLAGS = -g -Wall check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus\ t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll -TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness + + +TESTS=$(check_PROGRAMS) run_tests + +#TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness t-eoReal t-eo \ +# t-eoReplacement t-eoExternalEO t-eoGenOp t-eoSelect t-eoStateAndParser t-eoSymreg \ +# t-eobin t-eofitness # removing temporarily t-eoESFull # noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal diff --git a/eo/test/run_tests b/eo/test/run_tests index 7d269d1f3..ebaec0af7 100755 --- a/eo/test/run_tests +++ b/eo/test/run_tests @@ -1,43 +1,7 @@ #!/bin/sh -echo "Starting t-eo" -./t-eo > eo.log - -echo "Starting t-eoReplacement" -./t-eoReplacement > replacement.log - -echo "Starting t-eoCheckpointing" -./t-eoCheckpointing > checkpointing.log echo "Testing -h" -./t-eoCheckpointing -h > ch2.log - -echo "Testing t-eoExternalEO" -./t-eoExternalEO > externalEO.log - -echo "Testing t-eoGenOp" -./t-eoGenOp > genOp.log - -echo "Testing t-eoSelect" -./t-eoSelect > select.log - -echo "Testing t-eoStateAndParser" -# TODO, many different parameter settings and checks -./t-eoStateAndParser > stateAndParser.log - -echo "Testing t-eoSymreg" -./t-eoSymreg > symreg.log - -echo "Testing t-eobin" -./t-eobin > bin.log - -echo "Testing t-eofitness" -./t-eofitness > fitness.log - -echo "Testing t-eoGA" -./t-eoGA > t-eoGA.log - -echo "Testing t-eoGenOp" -./t-eoGenOp > t-eoGenOp.log +./t-eoCheckpointing -h echo "Finished" diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index 4f74adb90..f34d0699d 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -25,7 +25,7 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; unsigned i; eoBooleanGenerator gen; @@ -63,8 +63,8 @@ int main() eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(500); - eoFitContinue continuator2(128); + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 0af943564..387220ac7 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -25,7 +25,7 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; unsigned i; eoBooleanGenerator gen; @@ -67,8 +67,8 @@ int main() eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(500); - eoFitContinue continuator2(128); + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp index 8376831ac..356f7fd20 100644 --- a/eo/test/t-MGE1bit.cpp +++ b/eo/test/t-MGE1bit.cpp @@ -25,7 +25,7 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; unsigned i; eoBooleanGenerator gen; @@ -67,8 +67,8 @@ int main() eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(500); - eoFitContinue continuator2(128); + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 6d12fcf26..32491b619 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -180,5 +180,4 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index f9bb69b42..889b85744 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -129,5 +129,4 @@ int main() cross2(eo1,eo2); - return 1; }; diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index 6591ada96..d44251c01 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -385,7 +385,6 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } /* diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index fef8b2474..34d635554 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -220,5 +220,4 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index b5409e58a..672b16ec6 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -125,7 +125,7 @@ eoValueParam tournamentSizeParam = parser.createParam fitScaleSelect(rankingPressure); @@ -186,7 +186,6 @@ int main(int argc, char **argv) catch(exception& e) { cout << "Exception: " << e.what() << endl; + return 1; } - - return 1; } diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index 1f2ac1c2d..62d16891f 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -136,5 +136,4 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 56d5077f9..9ff3f3ec7 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -277,7 +277,6 @@ int main() print_best(pop); - return 1; } diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 75c7d3258..c2e9b058d 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -212,5 +212,4 @@ int main() cout << "Exception: " << e.what() << '\n'; } - return 1; } diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index 041a69077..33068781e 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -84,7 +84,6 @@ int main() test_fitness(b1,a1); - return 1; } //----------------------------------------------------------------------------- From 03045f2d587834e85bcb8d4838b7c336c7baca2b Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 7 Nov 2001 16:25:01 +0000 Subject: [PATCH 0673/2134] Corrected a bug in the selector and replacement tournamemt parameter reading: if you did not give the tournament sizes, the program either crashed or went in some endless loop. I also simplified the reading of those eoParamPram parameters! --- eo/src/do/make_algo_scalar.h | 80 ++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 17 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 9fcfe806d..3830bddee 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -80,23 +80,43 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e eoSelectOne* select ; if (ppSelect.first == string("DetTour")) { - unsigned size; - istrstream is(ppSelect.second[0].c_str()); // size of det tournament - is >> size; - select = new eoDetTournamentSelect(size); + unsigned detSize; + + if (!ppSelect.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + select = new eoDetTournamentSelect(detSize); } else if (ppSelect.first == string("StochTour")) { double p; - istrstream is(ppSelect.second[0].c_str()); // proba of binary tournament - is >> p; + if (!ppSelect.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + select = new eoStochTournamentSelect(p); } else if (ppSelect.first == string("Sequential")) // one after the other { bool b; if (ppSelect.second.size() == 0) // no argument -> default = ordered - b=true; + { + b=true; + // put back in parameter for consistency (and status file) + ppSelect.second.push_back(string("ordered")); + } else b = !(ppSelect.second[0] == string("unordered")); select = new eoSequentialSelect(b); @@ -136,10 +156,19 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e } else if (ppReplace.first == string("EPTour")) { - unsigned size; - istrstream is(ppReplace.second[0].c_str()); // size of EP tournament - is >> size; - replace = new eoEPReplacement(size); + unsigned detSize; + + if (!ppReplace.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to EPTour, using 6" << endl; + detSize = 6; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(string("6")); + } + else // parameter passed by user as EPTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + + replace = new eoEPReplacement(detSize); } else if (ppReplace.first == string("SSGAWorst")) { @@ -147,16 +176,33 @@ eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, e } else if (ppReplace.first == string("SSGADet")) { - unsigned size; - istrstream is(ppReplace.second[0].c_str()); // size of Det. tournament - is >> size; - replace = new eoSSGADetTournamentReplacement(size); + unsigned detSize; + + if (!ppReplace.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to SSGADet, using 2" << endl; + detSize = 2; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(string("2")); + } + else // parameter passed by user as SSGADet(T) + detSize = atoi(ppSelect.second[0].c_str()); + + replace = new eoSSGADetTournamentReplacement(detSize); } else if (ppReplace.first == string("SSGAStoch")) { double p; - istrstream is(ppReplace.second[0].c_str()); // proba of binary tournament - is >> p; + if (!ppReplace.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to SSGAStoch, using 1" << endl; + p = 1; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(string("1")); + } + else // parameter passed by user as SSGADet(T) + p = atof(ppSelect.second[0].c_str()); + replace = new eoSSGAStochTournamentReplacement(p); } else From 9b7556d81e93488dcab31808a4b621bcca35702c Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 8 Nov 2001 06:14:59 +0000 Subject: [PATCH 0674/2134] I have changed all calls to use an eoParser rather than an eoParameterLoader This is required if you want to use the method getParamWithLongName that allows one to get a value of a parameter read somewhere else. After changing 3 calls due to that, I decided to change ALL calls within the make_xxx functions --- eo/src/do/make_algo_scalar.h | 2 +- eo/src/do/make_checkpoint.h | 2 +- eo/src/do/make_checkpoint_FDC.h | 2 +- eo/src/do/make_continue.h | 2 +- eo/src/es/eoEsMutationInit.h | 4 +-- eo/src/es/make_algo_scalar_es.cpp | 12 ++++---- eo/src/es/make_algo_scalar_real.cpp | 4 +-- eo/src/es/make_checkpoint_es.cpp | 12 ++++---- eo/src/es/make_checkpoint_real.cpp | 4 +-- eo/src/es/make_es.h | 48 ++++++++++++++--------------- eo/src/es/make_genotype_es.cpp | 12 ++++---- eo/src/es/make_genotype_real.cpp | 4 +-- eo/src/es/make_op_es.cpp | 12 ++++---- eo/src/es/make_op_es.h | 2 +- eo/src/es/make_op_real.cpp | 4 +-- eo/src/es/make_op_real.h | 2 +- eo/src/es/make_real.h | 16 +++++----- eo/src/ga/make_algo_scalar_ga.cpp | 4 +-- eo/src/ga/make_checkpoint_ga.cpp | 4 +-- eo/src/ga/make_ga.h | 16 +++++----- eo/src/ga/make_genotype_ga.cpp | 4 +-- eo/src/ga/make_genotype_ga.h | 18 +++++++++-- eo/src/ga/make_op.h | 2 +- eo/src/ga/make_op_ga.cpp | 4 +-- 24 files changed, 104 insertions(+), 92 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 3830bddee..fed479b7f 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -70,7 +70,7 @@ */ template -eoAlgo & do_make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) { // the selection eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 282997066..b0852c0b2 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -40,7 +40,7 @@ bool testDirRes(std::string _dirName, bool _erase); template -eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { // first, create a checkpoint from the eoContinue eoCheckPoint *checkpoint = new eoCheckPoint(_continue); diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h index d9a607466..fc8792f2d 100644 --- a/eo/src/do/make_checkpoint_FDC.h +++ b/eo/src/do/make_checkpoint_FDC.h @@ -40,7 +40,7 @@ bool testDirRes(std::string _dirName, bool _erase); template -eoCheckPoint& do_make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { // first, create a checkpoint from the eoContinue eoCheckPoint *checkpoint = new eoCheckPoint(_continue); diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 8bb8d7439..3531c6194 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -60,7 +60,7 @@ eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_comb } template -eoContinue & do_make_continue(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter & _eval) +eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) { //////////// Stopping criterion /////////////////// // the combined continue - to be filled diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index 86f58c1e7..794721384 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -47,7 +47,7 @@ class eoEsMutationInit { public : - eoEsMutationInit(eoParameterLoader& _parser, + eoEsMutationInit(eoParser& _parser, std::string _section="ES mutation parameters" ) : parser(_parser), repSection(_section), TauLclParam(0), TauGlbParam(0), TauBetaParam(0) {} @@ -101,7 +101,7 @@ class eoEsMutationInit private : - eoParameterLoader& parser; + eoParser& parser; std::string repSection; eoValueParam* TauLclParam; eoValueParam* TauGlbParam; diff --git a/eo/src/es/make_algo_scalar_es.cpp b/eo/src/es/make_algo_scalar_es.cpp index b952770e0..5decab968 100644 --- a/eo/src/es/make_algo_scalar_es.cpp +++ b/eo/src/es/make_algo_scalar_es.cpp @@ -46,34 +46,34 @@ // Algo /////// -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } ////////////// -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } /////////////// -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } diff --git a/eo/src/es/make_algo_scalar_real.cpp b/eo/src/es/make_algo_scalar_real.cpp index 7c48b7fd3..a6731c177 100644 --- a/eo/src/es/make_algo_scalar_real.cpp +++ b/eo/src/es/make_algo_scalar_real.cpp @@ -44,12 +44,12 @@ // Algo /////// -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } diff --git a/eo/src/es/make_checkpoint_es.cpp b/eo/src/es/make_checkpoint_es.cpp index 489524d66..a9dfac385 100644 --- a/eo/src/es/make_checkpoint_es.cpp +++ b/eo/src/es/make_checkpoint_es.cpp @@ -46,31 +46,31 @@ // checkpoint ///////////// -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } ///////////// -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } ///////////// -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } diff --git a/eo/src/es/make_checkpoint_real.cpp b/eo/src/es/make_checkpoint_real.cpp index d278caf8a..15cb8a067 100644 --- a/eo/src/es/make_checkpoint_real.cpp +++ b/eo/src/es/make_checkpoint_real.cpp @@ -44,11 +44,11 @@ // checkpoint ///////////// -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index d4c45394b..c2c7b379e 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -64,24 +64,24 @@ //Representation dependent - rewrite everything anew for each representation ////////////////////////// // the genotypes -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo); -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo); -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo); -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo); -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo); -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo); // the operators -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); //Representation INdependent //////////////////////////// @@ -108,25 +108,25 @@ eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); // the checkpoint -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); // the algo -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); // run void run_ea(eoAlgo >& _ga, eoPop >& _pop); diff --git a/eo/src/es/make_genotype_es.cpp b/eo/src/es/make_genotype_es.cpp index 354a1ce9b..e3b0bd285 100644 --- a/eo/src/es/make_genotype_es.cpp +++ b/eo/src/es/make_genotype_es.cpp @@ -52,29 +52,29 @@ /// The following function merely call the templatized do_* functions -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsSimple _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsStdev _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoEsFull _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo) { return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/es/make_genotype_real.cpp b/eo/src/es/make_genotype_real.cpp index b5ea03741..c5d58b07e 100644 --- a/eo/src/es/make_genotype_real.cpp +++ b/eo/src/es/make_genotype_real.cpp @@ -52,11 +52,11 @@ /// The following function merely call the templatized do_* functions -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo) +eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo) { return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/es/make_op_es.cpp b/eo/src/es/make_op_es.cpp index 4d4fd948f..604d6e7e9 100644 --- a/eo/src/es/make_op_es.cpp +++ b/eo/src/es/make_op_es.cpp @@ -43,32 +43,32 @@ // operators //////////// -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index 40d72ddd5..0a5bc8d01 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -68,7 +68,7 @@ */ template -eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded& _init) { // get vector size unsigned vecSize = _init.size(); diff --git a/eo/src/es/make_op_real.cpp b/eo/src/es/make_op_real.cpp index b392193d7..195a4445c 100644 --- a/eo/src/es/make_op_real.cpp +++ b/eo/src/es/make_op_real.cpp @@ -43,12 +43,12 @@ // oeprators //////////// -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) { return do_make_op(_parser, _state, _init); } diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index c88357172..6e3e377ab 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -65,7 +65,7 @@ */ template -eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded& _init) { // get vector size unsigned vecSize = _init.size(); diff --git a/eo/src/es/make_real.h b/eo/src/es/make_real.h index f858e8a5e..5c776ff43 100644 --- a/eo/src/es/make_real.h +++ b/eo/src/es/make_real.h @@ -60,12 +60,12 @@ ////////////////////////// // the genotypes -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); -eoRealInitBounded > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoReal _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); // the operators -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); //Representation INdependent //////////////////////////// @@ -80,14 +80,14 @@ eoContinue >& make_continue(eoParser& _parser, eoState& _state, e eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); // the checkpoint -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); // the algo -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); // run void run_ea(eoAlgo >& _ga, eoPop >& _pop); diff --git a/eo/src/ga/make_algo_scalar_ga.cpp b/eo/src/ga/make_algo_scalar_ga.cpp index a7ae453b1..cb5bcca38 100644 --- a/eo/src/ga/make_algo_scalar_ga.cpp +++ b/eo/src/ga/make_algo_scalar_ga.cpp @@ -47,12 +47,12 @@ // Algo /////// -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } diff --git a/eo/src/ga/make_checkpoint_ga.cpp b/eo/src/ga/make_checkpoint_ga.cpp index e8e415729..6aaac47a8 100644 --- a/eo/src/ga/make_checkpoint_ga.cpp +++ b/eo/src/ga/make_checkpoint_ga.cpp @@ -47,11 +47,11 @@ // checkpoint ///////////// -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index ea7561f72..8cf53c0fb 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -52,12 +52,12 @@ ////////////////////////// // the genotypes -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo); - eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo); +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); + eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); // the operators -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init); //Representation INdependent //////////////////////////// @@ -72,14 +72,14 @@ eoContinue >& make_continue(eoParser& _parser, eoState& _state, eo eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); // the checkpoint -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); -eoCheckPoint >& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); // the algo -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); // run void run_ea(eoAlgo >& _ga, eoPop >& _pop); diff --git a/eo/src/ga/make_genotype_ga.cpp b/eo/src/ga/make_genotype_ga.cpp index 6903e4266..52bd31a86 100644 --- a/eo/src/ga/make_genotype_ga.cpp +++ b/eo/src/ga/make_genotype_ga.cpp @@ -40,11 +40,11 @@ /// The following function merely call the templatized do_* functions above -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo) +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo) { return do_make_genotype(_parser, _state, _eo); } -eoInit > & make_genotype(eoParameterLoader& _parser, eoState& _state, eoBit _eo) +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo) { return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index 93ea00c52..16cef294e 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -58,16 +58,28 @@ */ template -eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { // for bitstring, only thing needed is the size - eoValueParam& chromSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"Genotype Initialization"); + unsigned theSize; + // but it might have been already read in the definition fo the performance + eoParam* ptParam = _parser.getParamWithLongName(string("ChromSize")); + + if (!ptParam) // not already defined: read it here + { + theSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"Problem").value(); + } + else // it was read before, get its value + { + eoValueParam* ptChromSize = dynamic_cast*>(ptParam); + theSize = ptChromSize->value(); + } // Then we can built a bitstring random initializer // based on boolean_generator class (see utils/rnd_generator.h) eoBooleanGenerator * gen = new eoBooleanGenerator; _state.storeFunctor(gen); - eoInitFixedLength* init = new eoInitFixedLength(chromSize.value(), *gen); + eoInitFixedLength* init = new eoInitFixedLength(theSize, *gen); // store in state _state.storeFunctor(init); return *init; diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 40ae2492c..bf8d27d09 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -66,7 +66,7 @@ */ template -eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init) { // this is a temporary version, while Maarten codes the full tree-structured // general operator input diff --git a/eo/src/ga/make_op_ga.cpp b/eo/src/ga/make_op_ga.cpp index 7ee1eb1bf..9186f54ed 100644 --- a/eo/src/ga/make_op_ga.cpp +++ b/eo/src/ga/make_op_ga.cpp @@ -45,12 +45,12 @@ // oeprators //////////// -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init) { return do_make_op(_parser, _state, _init); } -eoGenOp >& make_op(eoParameterLoader& _parser, eoState& _state, eoInit >& _init) +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init) { return do_make_op(_parser, _state, _init); } From 0816b742d9ae3937f8cb27dfae74e9d3fccfae6f Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 8 Nov 2001 06:49:38 +0000 Subject: [PATCH 0675/2134] Adding PBIL files - simple PBIL algorithm with simple additive update rule --- eo/src/ga/eoPBILAdditive.h | 120 +++++++++++++++++++++++++++++++++++ eo/src/ga/eoPBILDistrib.h | 103 ++++++++++++++++++++++++++++++ eo/src/ga/eoPBILOrg.h | 78 +++++++++++++++++++++++ eo/src/ga/make_PBILdistrib.h | 89 ++++++++++++++++++++++++++ eo/src/ga/make_PBILupdate.h | 80 +++++++++++++++++++++++ 5 files changed, 470 insertions(+) create mode 100644 eo/src/ga/eoPBILAdditive.h create mode 100644 eo/src/ga/eoPBILDistrib.h create mode 100644 eo/src/ga/eoPBILOrg.h create mode 100644 eo/src/ga/make_PBILdistrib.h create mode 100644 eo/src/ga/make_PBILupdate.h diff --git a/eo/src/ga/eoPBILAdditive.h b/eo/src/ga/eoPBILAdditive.h new file mode 100644 index 000000000..577c23284 --- /dev/null +++ b/eo/src/ga/eoPBILAdditive.h @@ -0,0 +1,120 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPBILDistrib.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPBILAdditive_H +#define _eoPBILAdditive_H + +#include +#include + +/** + * Distribution Class for PBIL algorithm + * (Population-Based Incremental Learning, Baluja and Caruana 96) + * + * This class implements an extended update rule: + * in the original paper, the authors used + * + * p(i)(t+1) = (1-LR)*p(i)(t) + LR*best(i) + * + * here the same formula is applied, with some of the best individuals + * and for some of the worst individuals (with different learning rates) +*/ + +template +class eoPBILAdditive : public eoDistribUpdater +{ +public: + /** Ctor with parameters + * using the default values is equivalent to using eoPBILOrg + */ + eoPBILAdditive(double _LRBest, unsigned _nbBest = 1, + double _tolerance=0.0, + double _LRWorst = 0.0, unsigned _nbWorst = 0 ) : + maxBound(1.0-_tolerance), minBound(_tolerance), + LR(0.0), nbBest(_nbBest), nbWorst(_nbWorst) + { + if (nbBest+nbWorst == 0) + throw runtime_error("Must update either from best or from worst in eoPBILAdditive"); + + if (_nbBest) + { + lrb = _LRBest/_nbBest; + LR += _LRBest; + } + else + lrb=0.0; // just in case + if (_nbWorst) + { + lrw = _LRWorst/_nbWorst; + LR += _LRWorst; + } + else + lrw=0.0; // just in case + } + + /** Update the distribution from the current population */ + virtual void operator()(eoDistribution & _distrib, eoPop& _pop) + { + eoPBILDistrib& distrib = dynamic_cast&>(_distrib); + + vector & p = distrib.value(); + + unsigned i, popSize=_pop.size(); + vector result; + _pop.sort(result); // is it necessary to sort the whole population? + // but I'm soooooooo lazy !!! + + for (unsigned g=0; g=popSize-nbWorst; i--) + { + const EOT & best = (*result[i]); + if ( !best[g] ) // if 0, increase proba + p[g] += lrw; + } + // stay in [0,1] (possibly strictly due to tolerance) + p[g] = min(maxBound, p[g]); + p[g] = max(minBound, p[g]); + } + } + +private: + double maxBound, minBound; // proba stay away from 0 and 1 by at least tolerance + double LR; // learning rate + unsigned nbBest; // number of Best individuals used for update + unsigned nbWorst; // number of Worse individuals used for update + double lrb, lrw; // "local" learning rates (see operator()) +}; + +#endif diff --git a/eo/src/ga/eoPBILDistrib.h b/eo/src/ga/eoPBILDistrib.h new file mode 100644 index 000000000..9d0558d06 --- /dev/null +++ b/eo/src/ga/eoPBILDistrib.h @@ -0,0 +1,103 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPBILDistrib.h +// (c) Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPBILDistrib_H +#define _eoPBILDistrib_H + +#include + +/** + * Distribution Class for PBIL algorithm + * (Population-Based Incremental Learning, Baluja and Caruana 96) + * + * It encodes a univariate distribution on the space of bitstrings, + * i.e. one probability for each bit to be one + * + * It is an eoValueParam > : + * the vector stores the probabilities that each bit is 1 + * + * It is still pure virtual, as the update method needs to be specified +*/ + +template +class eoPBILDistrib : public eoDistribution, + public eoValueParam > +{ +public: + /** Ctor with size of genomes, and update parameters */ + eoPBILDistrib(unsigned _genomeSize) : + eoDistribution(), + eoValueParam >(vector(_genomeSize, 0.5), "Distribution"), + genomeSize(_genomeSize) + {} + + /** the randomizer of indis */ + virtual void operator()(EOT & _eo) + { + _eo.resize(genomeSize); // just in case + for (unsigned i=0; i&) = 0; // update from a population + + /** Accessor to the genome size */ + unsigned Size() {return genomeSize;} + + /** printing... */ + virtual void printOn(ostream& os) const + { + os << value().size() << ' '; + for (unsigned i=0; i> sz; + + value().resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + { + double atom; + is >> atom; + value()[i] = atom; + } + } + + unsigned int size() {return genomeSize;} + + virtual string className() const {return "eoPBILDistrib";}; + +private: + unsigned genomeSize; // size of indis +}; + +#endif diff --git a/eo/src/ga/eoPBILOrg.h b/eo/src/ga/eoPBILOrg.h new file mode 100644 index 000000000..d4cf8c059 --- /dev/null +++ b/eo/src/ga/eoPBILOrg.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPBILDistrib.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPBILOrg_H +#define _eoPBILOrg_H + +#include +#include + +/** + * Distribution Class for PBIL algorithm + * (Population-Based Incremental Learning, Baluja and Caruana 96) + * + * This class implements the update rule from the original paper: + * + * p(i)(t+1) = (1-LR)*p(i)(t) + LR*best(i) +*/ + +template +class eoPBILOrg : public eoDistribUpdater +{ +public: + /** Ctor with size of genomes, and update parameters */ + eoPBILOrg(double _LR, double _tolerance=0.0 ) : + LR(_LR), maxBound(1.0-_tolerance), minBound(_tolerance) + {} + + + /** Update the distribution from the current population */ + virtual void operator()(eoDistribution & _distrib, eoPop& _pop) + { + const EOT & best = _pop.best_element(); + eoPBILDistrib& distrib = dynamic_cast&>(_distrib); + + vector & p = distrib.value(); + + for (unsigned g=0; g // for time(0) for random seeding +#include +#include +#include +#include + + +//////////////////////////DISTRIB CONSTRUCTION /////////////////////////////// +/** + * Templatized version of parser-based construct of the distribution + * for PBIL distribution evolution algorithm + * + * It must then be instantiated, and compiled on its own for a given EOType + * (see test/t-eoPBIL.cpp + * + * Last argument is template-disambiguating +*/ + + +template +eoPBILDistrib & do_make_PBILdistrib(eoParser & _parser, eoState& _state, EOT) +{ + // First the random seed + eoValueParam& seedParam = _parser.createParam(uint32(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + + // the representation dependent stuff + unsigned chromSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Algorithm").value(); + + eoPBILDistrib * ptDistrib = new eoPBILDistrib(chromSize); + _state.storeFunctor(ptDistrib); + + // now the initialization: read a previously saved distribution, or random + eoValueParam& loadNameParam = _parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ); + if (loadNameParam.value() != "") // something to load + { + // create another state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the distribution in the state, + // so they can be loaded, + // and the present run will be the exact continuation of the saved run + // eventually with different parameters + inState.registerObject(*ptDistrib); + inState.registerObject(rng); + inState.load(loadNameParam.value()); // load the distrib and the rng + } + else // nothing loaded from a file + { + rng.reseed(seedParam.value()); + } + + // for future stateSave, register the algorithm into the state + _state.registerObject(_parser); + _state.registerObject(*ptDistrib); + _state.registerObject(rng); + + return *ptDistrib; +} + +#endif diff --git a/eo/src/ga/make_PBILupdate.h b/eo/src/ga/make_PBILupdate.h new file mode 100644 index 000000000..7cf371b49 --- /dev/null +++ b/eo/src/ga/make_PBILupdate.h @@ -0,0 +1,80 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_PBILupdate.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_PBILupdate_h +#define _make_PBILupdate_h + +#include // for time(0) for random seeding +#include +#include +#include +#include + + +///////CONSTRUCTION of PBIL distribution updaters///////////////// +/** + * Templatized version of parser-based construct of the update rule for PBIL + * distributions (see eoPBILDistrib.h) + * + * It must then be instantiated, and compiled on its own for a given EOType + * (see test/t-eoPBIL.cpp) + * + * Last argument is template-disambiguating +*/ + + +template +eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, EOT) +{ + // ast the moment, a single update rule is available + // but at some point we'll have to choose among different rules + + string UType = _parser.createParam(string("PBIL"), "updateRule", "Type of update rule (only PBIL additive at the moment)", 'U', "Algorithm").value(); + + unsigned nbBest = _parser.createParam(unsigned(1), "nbBest", "Number of good guys to update from", 'B', "Algorithm").value(); + double LRBest = _parser.createParam(0.1, "LRBest", "Learning Rate (from best guys)", 'L', "Algorithm").value(); + unsigned nbWorst = _parser.createParam(unsigned(0), "nbWorst", "Number of bad guys to update from", 'W', "Algorithm").value(); + double LRWorst = _parser.createParam(0.01, "LRWorst", "Learning Rate (from best guys)", 'L', "Algorithm").value(); + double tolerance = _parser.createParam(0.0, "tolerance", "Keeping away from 0 and 1", 't', "Algorithm").value(); + + // a pointer to choose among several possible types + eoDistribUpdater * ptUpdate; + + if (UType == string("PBIL")) + { + if ( (nbWorst == 0) && (nbBest == 1) ) + ptUpdate = new eoPBILOrg(LRBest, tolerance); + else + ptUpdate = new eoPBILAdditive(LRBest, nbBest, tolerance, LRWorst, nbWorst); + } + else + throw runtime_error("Only PBIL additive update rule available at the moment"); + + // done: don't forget to store the allocated pointers + _state.storeFunctor(ptUpdate); + return *ptUpdate; +} + +#endif From e0ae220420f5c4734718ef2504f164d866034b06 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 8 Nov 2001 06:53:55 +0000 Subject: [PATCH 0676/2134] Adding PBIL --- eo/test/Makefile.am | 12 ++++- eo/test/t-eoPBIL.cpp | 112 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 eo/test/t-eoPBIL.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 8cc72c5e9..037e7742a 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -15,7 +15,7 @@ CXXFLAGS = -g -Wall check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus\ t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ - t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll + t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL TESTS=$(check_PROGRAMS) run_tests @@ -151,6 +151,7 @@ t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h t_eoESAll_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a t_eoESAll_LDFLAGS = -lm t_eoESAll_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) + ############################################################################### t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h @@ -164,10 +165,19 @@ t_eoPareto_SOURCES = t-eoPareto.cpp t_eoPareto_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoPareto_LDFLAGS = -lm t_eoPareto_LDADD = $(LDADDS) + ############################################################################### t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp t_eoParetoFitness_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a t_eoParetoFitness_LDFLAGS = -lm t_eoParetoFitness_LDADD = $(LDADDS) + +############################################################################### + +t_eoPBIL_SOURCES = t-eoPBIL.cpp +t_eoPBIL_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoPBIL_LDFLAGS = -lm +t_eoPBIL_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) + ############################################################################### diff --git a/eo/test/t-eoPBIL.cpp b/eo/test/t-eoPBIL.cpp new file mode 100644 index 000000000..8863bde0f --- /dev/null +++ b/eo/test/t-eoPBIL.cpp @@ -0,0 +1,112 @@ +#include + +#include +#include +#include "binary_value.h" +#include +#include +#include +#include +#include + +using namespace std; + +typedef eoBit Indi; + +// instanciating the outside subroutine that creates the distribution +#include "ga/make_PBILdistrib.h" +eoPBILDistrib & make_PBILdistrib(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_PBILdistrib(_parser, _state, _eo); +} + +// instanciating the outside subroutine that creates the update rule +#include "ga/make_PBILupdate.h" +eoDistribUpdater & make_PBILupdate(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_PBILupdate(_parser, _state, _eo); +} + + +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr mainEval( binary_value); + eoEvalFuncCounter eval(mainEval); + + // COnstruction of the distribution + eoPBILDistrib & distrib = make_PBILdistrib(parser, state, Indi()); + // and the update rule + eoDistribUpdater & update = make_PBILupdate(parser, state, Indi()); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + + // add a graphical output for the distribution + // first, get the direname from the parser + // it has been enetered in make_checkoint + + eoParam* ptParam = parser.getParamWithLongName(string("resDir")); + eoValueParam* ptDirNameParam = dynamic_cast*>(ptParam); + if (!ptDirNameParam) // not found + throw runtime_error("Parameter resDir not found where it was supposed to be"); + + // now create the snapshot monitor + eoValueParam& plotDistribParam = parser.createParam(false, "plotDistrib", "Plot Distribution", '\0', "Output - Graphical"); + if (plotDistribParam.value()) + { + unsigned frequency=1; // frequency of plots updates + eoGnuplot1DSnapshot *distribSnapshot = new eoGnuplot1DSnapshot(ptDirNameParam->value(), frequency, "distrib"); + state.storeFunctor(distribSnapshot); + // add the distribution (it is an eoValueParam >) + distribSnapshot->add(distrib); + // and of course add it to the checkpoint + checkpoint.add(*distribSnapshot); + } + + // the algorithm: DEA + // don't know where else to put the population size! + unsigned popSize = parser.createParam(unsigned(100), "popSize", "Population Size", 'P', "Algorithm").value(); + eoSimpleDEA dea(update, eval, popSize, checkpoint); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + + dea(distrib); // run the dea + + cout << "Final Distribution\n"; + distrib.printOn(cout); + cout << endl; + + // wait - for graphical output + if (plotDistribParam.value()) + { + string foo; + cin >> foo; + } + } + catch(exception& e) + { + cout << e.what() << endl; + } +} From 818e6d8a14b99cf2927cdf4ce626fa01cf29d85d Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 8 Nov 2001 07:40:27 +0000 Subject: [PATCH 0677/2134] Adding Distribution-based base abstract classes --- eo/src/eoDEA.h | 46 +++++++++++++++++ eo/src/eoDistribUpdater.h | 47 +++++++++++++++++ eo/src/eoDistribution.h | 52 +++++++++++++++++++ eo/src/eoSimpleDEA.h | 105 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 eo/src/eoDEA.h create mode 100644 eo/src/eoDistribUpdater.h create mode 100644 eo/src/eoDistribution.h create mode 100644 eo/src/eoSimpleDEA.h diff --git a/eo/src/eoDEA.h b/eo/src/eoDEA.h new file mode 100644 index 000000000..bb717ae1b --- /dev/null +++ b/eo/src/eoDEA.h @@ -0,0 +1,46 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDEA.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDEA_h +#define _eoDEA_h + +//----------------------------------------------------------------------------- + +#include + +/** eoDEA: Distribution Evolution Algorithm within EO + * + * The abstract class for algorithms that evolve a probability distribution + * on the spaces of populations rather than a population + * + * It IS NOT an eoAlgo, as it evolves a distribution, not a population +*/ + +template class eoDEA: public eoUF&, void> +{ +}; + +#endif + diff --git a/eo/src/eoDistribUpdater.h b/eo/src/eoDistribUpdater.h new file mode 100644 index 000000000..88f6d24b8 --- /dev/null +++ b/eo/src/eoDistribUpdater.h @@ -0,0 +1,47 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDistribUpdater.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDistribUpdater_H +#define _eoDistribUpdater_H + +#include + +#include +#include + +/** + * Base class for Distribution Evolution Algorithms within EO: + * the update rule of distribution + * + * It takes one distribution and updates it according to one population + * +*/ + +template +class eoDistribUpdater : + public eoBF &, eoPop &, void> +{}; + +#endif diff --git a/eo/src/eoDistribution.h b/eo/src/eoDistribution.h new file mode 100644 index 000000000..9facd9160 --- /dev/null +++ b/eo/src/eoDistribution.h @@ -0,0 +1,52 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDistribution.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDistribution_H +#define _eoDistribution_H + +#include + +#include +#include + +/** + * Abstract class for Distribution Evolution Algorithms within EO: + * the distribution itself + * + * It basically IS AN eoInit - operator()(EOT &) generates new indis + * + * The instances will probably be eoValueParam of some kind + * see eoPBILDistrib.h +*/ + +template +class eoDistribution : public eoInit, + public eoPersistent, public eoObject +{ +public: + virtual void operator()(EOT &) = 0; // DO NOT FORGET TO INVALIDATE the EOT +}; + +#endif diff --git a/eo/src/eoSimpleDEA.h b/eo/src/eoSimpleDEA.h new file mode 100644 index 000000000..ea785250d --- /dev/null +++ b/eo/src/eoSimpleDEA.h @@ -0,0 +1,105 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSimpleDEA.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSimpleDEA_h +#define _eoSimpleDEA_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include +#include + +/** eoSimpleDEA: a very simple Distribution Evolution Algorithm + * + * The algorithm that evolves a probability distribution + * on the spaces of populations with the loop + * generate a population from the current distribution + * evaluate that population + * update the distribution +*/ + +template class eoSimpleDEA: public eoDEA +{ + public: + + /** Ctor from an eoDistribUpdater + * ... plus an eoEval and eoContinue of course + */ + eoSimpleDEA(eoDistribUpdater& _update, + eoEvalFunc& _eval, + unsigned _popSize, + eoContinue& _continuator + ) : + update(_update), + eval(_eval), + popSize(_popSize), + continuator(_continuator) + {} + + /** The algorithm: + * generate pop from distrib, + * evaluate pop, + * update distrib + */ + virtual void operator()(eoDistribution& _distrib) + { + eoPop pop(popSize, _distrib); + do + { + try + { + apply(_distrib, pop); // re-init. of _pop from distrib + + apply(eval, pop); // eval of current population + + update(_distrib, pop); // updates distrib from _pop + + } + catch (exception& e) + { + string s = e.what(); + s.append( " in eoSimpleDEA"); + throw runtime_error( s ); + } + } while ( continuator( pop ) ); + } + + private: + eoDistribUpdater & update; + + eoEvalFunc& eval; + + unsigned popSize; + + eoContinue& continuator; +}; + +//----------------------------------------------------------------------------- + +#endif + From 886523dccd74d0242b5f092a365aa10e6f07a768 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 8 Nov 2001 10:17:52 +0000 Subject: [PATCH 0678/2134] removed the return 1 in the main --- eo/test/t-eoESAll.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index adf2aace4..7afa2aef3 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -85,7 +85,6 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << '\n'; } - return 1; } /** The templatized main (sort of) From c5145c839930013ed2317358c77723b4c3904f7d Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 8 Nov 2001 11:13:19 +0000 Subject: [PATCH 0679/2134] Cleaned up --- eo/test/Makefile.am | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 037e7742a..a7ec9fa84 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -18,12 +18,9 @@ check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-e t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL +#The run_tests script can be used to check various arguments TESTS=$(check_PROGRAMS) run_tests -#TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness t-eoReal t-eo \ -# t-eoReplacement t-eoExternalEO t-eoGenOp t-eoSelect t-eoStateAndParser t-eoSymreg \ -# t-eobin t-eofitness -# removing temporarily t-eoESFull # noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal ############################################################################### From 62686ac4063c94afd281643e12a6346531d33e4f Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 10 Nov 2001 06:32:05 +0000 Subject: [PATCH 0680/2134] Added the invalidate() call - that bug was not seem before, because we always used init on newborn genotypes! --- eo/tutorial/Templates/init.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/tutorial/Templates/init.tmpl b/eo/tutorial/Templates/init.tmpl index 96d45b3ac..f3c0fbd94 100644 --- a/eo/tutorial/Templates/init.tmpl +++ b/eo/tutorial/Templates/init.tmpl @@ -45,6 +45,7 @@ public: { // START Code of random initialization of an eoMyStruct object // END Code of random initialization of an eoMyStruct object + _genotype.invalidate(); // IMPORTANT in case the _genotype is old } private: From a5e3abd9f6319f5e60baa04231d2a4260a4e0889 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 10 Nov 2001 06:59:02 +0000 Subject: [PATCH 0681/2134] Added the #pragma directive for MSVC++ in all .cpp --- eo/src/eoCtrlCContinue.cpp | 5 +++++ eo/src/eoFunctorStore.cpp | 5 +++++ eo/src/eoPersistent.cpp | 5 +++++ eo/src/eoPrintable.cpp | 5 +++++ eo/src/es/make_algo_scalar_es.cpp | 5 +++++ eo/src/es/make_algo_scalar_real.cpp | 5 +++++ eo/src/es/make_checkpoint_es.cpp | 5 +++++ eo/src/es/make_checkpoint_real.cpp | 5 +++++ eo/src/es/make_continue_es.cpp | 5 +++++ eo/src/es/make_continue_real.cpp | 5 +++++ eo/src/es/make_genotype_es.cpp | 5 +++++ eo/src/es/make_genotype_real.cpp | 5 +++++ eo/src/es/make_op_es.cpp | 5 +++++ eo/src/es/make_op_real.cpp | 5 +++++ eo/src/es/make_pop_es.cpp | 5 +++++ eo/src/es/make_pop_real.cpp | 5 +++++ eo/src/es/make_run_es.cpp | 5 +++++ eo/src/es/make_run_real.cpp | 5 +++++ eo/src/ga/make_algo_scalar_ga.cpp | 5 +++++ eo/src/ga/make_checkpoint_ga.cpp | 5 +++++ eo/src/ga/make_continue_ga.cpp | 5 +++++ eo/src/ga/make_genotype_ga.cpp | 5 +++++ eo/src/ga/make_op_ga.cpp | 5 +++++ eo/src/ga/make_pop_ga.cpp | 5 +++++ eo/src/ga/make_run_ga.cpp | 5 +++++ eo/src/utils/eoFileMonitor.cpp | 5 +++++ eo/src/utils/eoRNG.cpp | 5 +++++ eo/src/utils/eoRealBounds.cpp | 5 +++++ eo/src/utils/eoStdoutMonitor.cpp | 5 +++++ eo/src/utils/make_help.cpp | 5 +++++ 30 files changed, 150 insertions(+) diff --git a/eo/src/eoCtrlCContinue.cpp b/eo/src/eoCtrlCContinue.cpp index 5b3e5d392..36b0abe71 100644 --- a/eo/src/eoCtrlCContinue.cpp +++ b/eo/src/eoCtrlCContinue.cpp @@ -23,6 +23,11 @@ mak@dhi.dk */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include diff --git a/eo/src/eoFunctorStore.cpp b/eo/src/eoFunctorStore.cpp index dfb66529f..8d552132d 100644 --- a/eo/src/eoFunctorStore.cpp +++ b/eo/src/eoFunctorStore.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 50654fd7e..9e61c48d4 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include //Implementation of these objects diff --git a/eo/src/eoPrintable.cpp b/eo/src/eoPrintable.cpp index 6810abefc..b56495990 100644 --- a/eo/src/eoPrintable.cpp +++ b/eo/src/eoPrintable.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + //----------------------------------------------------------------------------- // eoPrintable.cpp //----------------------------------------------------------------------------- diff --git a/eo/src/es/make_algo_scalar_es.cpp b/eo/src/es/make_algo_scalar_es.cpp index 5decab968..27624f3eb 100644 --- a/eo/src/es/make_algo_scalar_es.cpp +++ b/eo/src/es/make_algo_scalar_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns * of the library for evolution of ***eoEs genotypes*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_algo_scalar_real.cpp b/eo/src/es/make_algo_scalar_real.cpp index a6731c177..0a951c0fc 100644 --- a/eo/src/es/make_algo_scalar_real.cpp +++ b/eo/src/es/make_algo_scalar_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns * of the library for evolution of ***eoReal*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_checkpoint_es.cpp b/eo/src/es/make_checkpoint_es.cpp index a9dfac385..dea658dcb 100644 --- a/eo/src/es/make_checkpoint_es.cpp +++ b/eo/src/es/make_checkpoint_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns * of the library for evolution of ***ES genotypes*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_checkpoint_real.cpp b/eo/src/es/make_checkpoint_real.cpp index 15cb8a067..1995d78c1 100644 --- a/eo/src/es/make_checkpoint_real.cpp +++ b/eo/src/es/make_checkpoint_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns * of the library for evolution of ***eoReal*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_continue_es.cpp b/eo/src/es/make_continue_es.cpp index 7d53ce399..ca9d4fee3 100644 --- a/eo/src/es/make_continue_es.cpp +++ b/eo/src/es/make_continue_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns * of the library for evolution of ***ES genotypes*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_continue_real.cpp b/eo/src/es/make_continue_real.cpp index 52574024b..868e8eeca 100644 --- a/eo/src/es/make_continue_real.cpp +++ b/eo/src/es/make_continue_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns * of the library for evolution of ***REAL vectors*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_genotype_es.cpp b/eo/src/es/make_genotype_es.cpp index e3b0bd285..a04215736 100644 --- a/eo/src/es/make_genotype_es.cpp +++ b/eo/src/es/make_genotype_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of eoReal Init fns * It should be included in the file that calls any of the corresponding fns * Compiling this file allows one to generate part of the library (i.e. object diff --git a/eo/src/es/make_genotype_real.cpp b/eo/src/es/make_genotype_real.cpp index c5d58b07e..51a546321 100644 --- a/eo/src/es/make_genotype_real.cpp +++ b/eo/src/es/make_genotype_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of eoReal Init fns * It should be included in the file that calls any of the corresponding fns * Compiling this file allows one to generate part of the library (i.e. object diff --git a/eo/src/es/make_op_es.cpp b/eo/src/es/make_op_es.cpp index 604d6e7e9..7f4635992 100644 --- a/eo/src/es/make_op_es.cpp +++ b/eo/src/es/make_op_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns * of the library for ***eoReal*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_op_real.cpp b/eo/src/es/make_op_real.cpp index 195a4445c..19435831f 100644 --- a/eo/src/es/make_op_real.cpp +++ b/eo/src/es/make_op_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns * of the library for ***eoReal*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_pop_es.cpp b/eo/src/es/make_pop_es.cpp index ca826e08d..4f77e2f58 100644 --- a/eo/src/es/make_pop_es.cpp +++ b/eo/src/es/make_pop_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns * of the library for evolution of ***ES genotypes*** indis inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_pop_real.cpp b/eo/src/es/make_pop_real.cpp index effb6245d..eaa75baab 100644 --- a/eo/src/es/make_pop_real.cpp +++ b/eo/src/es/make_pop_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns * of the library for evolution of ***eoReal*** indis inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_run_es.cpp b/eo/src/es/make_run_es.cpp index 6707fe459..77a45a086 100644 --- a/eo/src/es/make_run_es.cpp +++ b/eo/src/es/make_run_es.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of run funs * of the library for evolution of ***ES genotypes*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/es/make_run_real.cpp b/eo/src/es/make_run_real.cpp index 42f50bb29..ee10fd2a3 100644 --- a/eo/src/es/make_run_real.cpp +++ b/eo/src/es/make_run_real.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains ***INSTANCIATED DEFINITIONS*** of run funs * of the library for evolution of ***eoReal*** inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_algo_scalar_ga.cpp b/eo/src/ga/make_algo_scalar_ga.cpp index cb5bcca38..f2b6719c5 100644 --- a/eo/src/ga/make_algo_scalar_ga.cpp +++ b/eo/src/ga/make_algo_scalar_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of pop. init. * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_checkpoint_ga.cpp b/eo/src/ga/make_checkpoint_ga.cpp index 6aaac47a8..f7da6d4a8 100644 --- a/eo/src/ga/make_checkpoint_ga.cpp +++ b/eo/src/ga/make_checkpoint_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_continue_ga.cpp b/eo/src/ga/make_continue_ga.cpp index def01ab3b..e2dbb35a8 100644 --- a/eo/src/ga/make_continue_ga.cpp +++ b/eo/src/ga/make_continue_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_genotype_ga.cpp b/eo/src/ga/make_genotype_ga.cpp index 52bd31a86..873093dce 100644 --- a/eo/src/ga/make_genotype_ga.cpp +++ b/eo/src/ga/make_genotype_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_op_ga.cpp b/eo/src/ga/make_op_ga.cpp index 9186f54ed..8bed5a66a 100644 --- a/eo/src/ga/make_op_ga.cpp +++ b/eo/src/ga/make_op_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_pop_ga.cpp b/eo/src/ga/make_pop_ga.cpp index 8bbd308d2..2ab0b5cde 100644 --- a/eo/src/ga/make_pop_ga.cpp +++ b/eo/src/ga/make_pop_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of population init * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/ga/make_run_ga.cpp b/eo/src/ga/make_run_ga.cpp index e3d78ea2e..afdab3d9a 100644 --- a/eo/src/ga/make_run_ga.cpp +++ b/eo/src/ga/make_run_ga.cpp @@ -24,6 +24,11 @@ */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index e8f57a6f8..edd542e5a 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include #include diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index 62f364b0d..ad347c6cc 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include "eoRNG.h" diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 5734c6f54..3f1632a0a 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include #include "eoRealBounds.h" diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index 8fc6dc606..8120f516b 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -1,3 +1,8 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include #include diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index 32e4a735b..d6cd9eab8 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -23,6 +23,11 @@ mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + #include #include #include From d7c3d973c78f978bda6d5c521037216b85352951 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 10 Nov 2001 09:02:17 +0000 Subject: [PATCH 0682/2134] Small modifications here and there to be MSVC++ compatible Mainly, time.h -> ctime definition of loop index out of loops when multiply used no typename in declaration using template typename --- eo/src/do/make_pop.h | 2 +- eo/src/eoDistribUpdater.h | 5 ++++- eo/src/eoSelectOne.h | 4 ++++ eo/src/es/eoEsChromInit.h | 6 +++--- eo/src/ga/eoPBILAdditive.h | 2 +- eo/src/ga/eoPBILDistrib.h | 3 --- eo/src/ga/eoPBILOrg.h | 4 ++-- eo/src/ga/make_PBILdistrib.h | 20 ++++++++++++++++---- eo/src/ga/make_genotype_ga.h | 4 ++-- eo/src/utils/eoParam.h | 6 +++--- eo/src/utils/eoStat.h | 21 +++++++++++++++++---- eo/test/t-eoESAll.cpp | 2 +- eo/test/t-eoGA.cpp | 2 +- eo/test/t-eoReal.cpp | 2 +- 14 files changed, 56 insertions(+), 27 deletions(-) diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index d8ae0766f..52892be15 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -27,7 +27,7 @@ #ifndef _make_pop_h #define _make_pop_h -#include // for time(0) for random seeding +#include // for time(0) for random seeding #include #include #include diff --git a/eo/src/eoDistribUpdater.h b/eo/src/eoDistribUpdater.h index 88f6d24b8..1749994fe 100644 --- a/eo/src/eoDistribUpdater.h +++ b/eo/src/eoDistribUpdater.h @@ -42,6 +42,9 @@ template class eoDistribUpdater : public eoBF &, eoPop &, void> -{}; +{ +public: + virtual void operator()(eoDistribution &, eoPop &)=0; +}; #endif diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index 298570340..34b0782f3 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -37,7 +37,11 @@ @see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional */ +#ifdef _MSC_VER +template +#else template +#endif class eoSelectOne : public eoUF&, const EOT&> { public : diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 399397405..9e80679a5 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -99,10 +99,10 @@ private : // Adaptive mutation through a whole correlation matrix void create_self_adapt(eoEsFull& result) { - unsigned theSize = eoRealInitBounded::size(); + unsigned i, theSize = eoRealInitBounded::size(); result.stdevs.resize(theSize); - for (unsigned i = 0; i < theSize; ++i) + for (i = 0; i < theSize; ++i) { // should we scale sigmas to the corresponding object variable range? result.stdevs[i] = sigma; @@ -110,7 +110,7 @@ private : // nb of rotation angles: N*(N-1)/2 (in general!) result.correlations.resize(theSize*(theSize - 1) / 2); - for (unsigned i = 0; i < result.correlations.size(); ++i) + for (i = 0; i < result.correlations.size(); ++i) { // uniform in [-PI, PI) result.correlations[i] = rng.uniform(2 * M_PI) - M_PI; diff --git a/eo/src/ga/eoPBILAdditive.h b/eo/src/ga/eoPBILAdditive.h index 577c23284..9f32859b6 100644 --- a/eo/src/ga/eoPBILAdditive.h +++ b/eo/src/ga/eoPBILAdditive.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoPBILDistrib.h +// eoPBILAdditive.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 /* This library is free software; you can redistribute it and/or diff --git a/eo/src/ga/eoPBILDistrib.h b/eo/src/ga/eoPBILDistrib.h index 9d0558d06..96a781bcc 100644 --- a/eo/src/ga/eoPBILDistrib.h +++ b/eo/src/ga/eoPBILDistrib.h @@ -61,9 +61,6 @@ public: _eo.invalidate(); // DO NOT FORGET!!! } - /** update method - still PURE VIRTUAL */ - // virtual void update(eoPop&) = 0; // update from a population - /** Accessor to the genome size */ unsigned Size() {return genomeSize;} diff --git a/eo/src/ga/eoPBILOrg.h b/eo/src/ga/eoPBILOrg.h index d4cf8c059..da9490648 100644 --- a/eo/src/ga/eoPBILOrg.h +++ b/eo/src/ga/eoPBILOrg.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoPBILDistrib.h +// eoPBILOrg.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 /* This library is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ /** * Distribution Class for PBIL algorithm - * (Population-Based Incremental Learning, Baluja and Caruana 96) + * (Population-Based Incremental Learning, Baluja and Caruana 95) * * This class implements the update rule from the original paper: * diff --git a/eo/src/ga/make_PBILdistrib.h b/eo/src/ga/make_PBILdistrib.h index c662b9c0c..2698cc349 100644 --- a/eo/src/ga/make_PBILdistrib.h +++ b/eo/src/ga/make_PBILdistrib.h @@ -53,10 +53,22 @@ eoPBILDistrib & do_make_PBILdistrib(eoParser & _parser, eoState& _state, E if (seedParam.value() == 0) seedParam.value() = time(0); - // the representation dependent stuff - unsigned chromSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Algorithm").value(); - - eoPBILDistrib * ptDistrib = new eoPBILDistrib(chromSize); + // chromosome size: + unsigned theSize; + // but it might have been already read in the definition fo the performance + eoParam* ptParam = _parser.getParamWithLongName(string("chromSize")); + + if (!ptParam) // not already defined: read it here + { + theSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); + } + else // it was read before, get its value + { + eoValueParam* ptChromSize = dynamic_cast*>(ptParam); + theSize = ptChromSize->value(); + } + + eoPBILDistrib * ptDistrib = new eoPBILDistrib(theSize); _state.storeFunctor(ptDistrib); // now the initialization: read a previously saved distribution, or random diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index 16cef294e..f162328b3 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -63,11 +63,11 @@ eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) // for bitstring, only thing needed is the size unsigned theSize; // but it might have been already read in the definition fo the performance - eoParam* ptParam = _parser.getParamWithLongName(string("ChromSize")); + eoParam* ptParam = _parser.getParamWithLongName(string("chromSize")); if (!ptParam) // not already defined: read it here { - theSize = _parser.createParam(unsigned(10), "ChromSize", "The length of the bitstrings", 'n',"Problem").value(); + theSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); } else // it was read before, get its value { diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 47e680271..c991b3a70 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -239,16 +239,16 @@ template <> void eoValueParam > >::setValue(std::string _value) { std::istrstream is(_value.c_str()); - unsigned sz; + unsigned i,j,sz; is >> sz; repValue.resize(sz); - for (unsigned i = 0; i < repValue.size(); ++i) + for (i = 0; i < repValue.size(); ++i) { unsigned sz2; is >> sz2; repValue[i].resize(sz2); - for (unsigned j = 0; j < sz2; ++j) + for (j = 0; j < sz2; ++j) { is >> repValue[i][j]; } diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 5877ab54c..71d6d575c 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -82,8 +82,12 @@ public : Average fitness of a population, fitness can be a double, eoMinimizingFitness, eoMaximizingFitness or eoParetoFitness. In the case of pareto optimization it will calculate the average of each objective. */ -template -class eoAverageStat : public eoStat + +#ifdef _MSC_VER +template class eoAverageStat : public eoStat +#else +template class eoAverageStat : public eoStat +#endif { public : typedef typename EOT::Fitness fitness_type; @@ -99,7 +103,11 @@ public : virtual void operator()(const eoPop& _pop) { +#ifdef _MSC_VER + doit(_pop, EOT::Fitness()); // specializations for scalar and vector +#else doit(_pop, typename EOT::Fitness()); // specializations for scalar and vector +#endif } private : @@ -248,17 +256,22 @@ public : /** Best fitness in the population */ +#ifdef _MSC_VER +template +class eoBestFitnessStat : public eoStat +#else template class eoBestFitnessStat : public eoStat +#endif { public : typedef typename EOT::Fitness Fitness; - eoBestFitnessStat(std::string _description = "Best ") : eoStat(typename EOT::Fitness(), _description) {} + eoBestFitnessStat(std::string _description = "Best ") : eoStat(Fitness(), _description) {} void operator()(const eoPop& _pop) { - doit(_pop, typename EOT::Fitness()); + doit(_pop, Fitness()); } private : diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index 7afa2aef3..cd6436e7e 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -116,7 +116,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state) // initialize the population - and evaluate // yes, this is representation indepedent once you have an eoInit eoPop& pop = make_pop(_parser, _state, init); - apply(eval, pop); + apply(eval, pop); // stopping criteria eoContinue & term = make_continue(_parser, _state, eval); diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index 9fa1fd663..31a22ae3c 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) //// GO /////// // evaluate intial population AFTER help and status in case it takes time - apply(eval, pop); + apply(eval, pop); // print it out cout << "Initial Population\n"; pop.sortedPrintOn(cout); diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index 09e7ced51..8002136c0 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) //// GO /////// // evaluate intial population AFTER help and status in case it takes time - apply(eval, pop); + apply(eval, pop); // print it out cout << "Initial Population\n"; pop.sortedPrintOn(cout); From a79a7d6215d0664cbf7fc04ea9cfd4bae6e062df Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 10 Nov 2001 14:12:01 +0000 Subject: [PATCH 0683/2134] Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIA --- eo/win/lib/Readme | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 eo/win/lib/Readme diff --git a/eo/win/lib/Readme b/eo/win/lib/Readme new file mode 100644 index 000000000..24086802f --- /dev/null +++ b/eo/win/lib/Readme @@ -0,0 +1,4 @@ +Here will be copied the eo libraries. + +xx.lib are Release versions +xxd.lib are Debug versions \ No newline at end of file From 78ca5ab75c470c9709036556e3ff1a7b0f3db50e Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 10 Nov 2001 14:13:21 +0000 Subject: [PATCH 0684/2134] Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIAC --- eo/win/Makefile.am | 8 +- eo/win/eo.dsp | 378 +++++++++++++++++++++++---------------------- eo/win/eo.dsw | 112 +++++++++----- eo/win/es.dsp | 234 ++++++++++++++++++++++++++++ eo/win/ga.dsp | 154 ++++++++++++++++++ eo/win/t_eoga.dsp | 102 ++++++++++++ eo/win/utils.dsp | 250 ++++++++++++++++++++++++++++++ 7 files changed, 1013 insertions(+), 225 deletions(-) create mode 100644 eo/win/es.dsp create mode 100644 eo/win/ga.dsp create mode 100644 eo/win/t_eoga.dsp create mode 100644 eo/win/utils.dsp diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am index 33d08e380..13426269b 100644 --- a/eo/win/Makefile.am +++ b/eo/win/Makefile.am @@ -1,4 +1,4 @@ - -EXTRA_DIST=eo.dsw eo.dsp - - + +EXTRA_DIST=eo.dsw eo.dsp + + diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 8294c507a..8f6f2dbf0 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,186 +1,192 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0xc0a /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\ga.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoObject.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eod.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoObject.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 96b630710..ef95975ff 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -1,35 +1,77 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name random - End Project Dependency - Begin Project Dependency - Project_Dep_Name atomops - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "es"=.\es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ga"=.\ga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "utils"=.\utils.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/es.dsp b/eo/win/es.dsp new file mode 100644 index 000000000..f8c38c9fc --- /dev/null +++ b/eo/win/es.dsp @@ -0,0 +1,234 @@ +# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\es.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\esd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\esd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "es - Win32 Release" +# Name "es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_real.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\es\eoEsChromInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsFull.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsGlobalXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutate.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutationInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsSimple.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStandardXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStdev.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoNormalMutation.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoReal.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealAtomXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealInitBounded.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_real.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/ga.dsp b/eo/win/ga.dsp new file mode 100644 index 000000000..e07289a89 --- /dev/null +++ b/eo/win/ga.dsp @@ -0,0 +1,154 @@ +# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\ga.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ga___Win32_Debug" +# PROP BASE Intermediate_Dir "ga___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\gad.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\gad.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ga - Win32 Release" +# Name "ga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\ga\make_algo_scalar_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_checkpoint_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_continue_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_pop_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_run_ga.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\ga\eoBit.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOpFactory.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoga.dsp b/eo/win/t_eoga.dsp new file mode 100644 index 000000000..16c03fd2d --- /dev/null +++ b/eo/win/t_eoga.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoga - Win32 Release" +# Name "t_eoga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/utils.dsp b/eo/win/utils.dsp new file mode 100644 index 000000000..4c6b106d4 --- /dev/null +++ b/eo/win/utils.dsp @@ -0,0 +1,250 @@ +# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=utils - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "utils.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "utils - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\utils.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "utils - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "utils___Win32_Debug" +# PROP BASE Intermediate_Dir "utils___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\utilsd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\utilsd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "utils - Win32 Release" +# Name "utils - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\make_help.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoCheckPoint.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoDistance.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFDCStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoHowMany.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMOFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoPopStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealVectorBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRndGenerators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoScalarFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdatable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\pipecom.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\rnd_generators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\selectors.h +# End Source File +# End Group +# End Target +# End Project From aad54e0648b23cee416de767b748515a24efa355 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 11 Nov 2001 06:43:45 +0000 Subject: [PATCH 0685/2134] Improved the UI a lot (checking for already existing files, etc) --- eo/tutorial/Templates/create.sh | 67 ++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/eo/tutorial/Templates/create.sh b/eo/tutorial/Templates/create.sh index e8e5056cf..0a458b556 100755 --- a/eo/tutorial/Templates/create.sh +++ b/eo/tutorial/Templates/create.sh @@ -1,19 +1,60 @@ #! /bin/tcsh -f -if ($#argv < 2) then - echo Usage $argv[0] ApplicationName TargetDir +if ($PWD:t != Templates) then + echo You must be in the Template dir to run that script exit endif -if (! -e $2) then - mkdir $2 + +if ($#argv < 1) then + echo "Usage $0 ApplicationName [TargetDirName]" + echo " will create ../TargetDirName if necessary" + echo " (default dir name = ApplicationName)," + echo " and will put there all files that are strictly necessary" + echo " to compile and run you Application from there" + exit endif -sed s/MyStruct/$1/g eoMyStruct.tmpl > $2/eo$1.h -sed s/MyStruct/$1/g init.tmpl > $2/eo$1Init.h -sed s/MyStruct/$1/g evalFunc.tmpl > $2/eo$1EvalFunc.h -sed s/MyStruct/$1/g mutation.tmpl > $2/eo$1Mutation.h -sed s/MyStruct/$1/g quadCrossover.tmpl > $2/eo$1QuadCrossover.h -sed s/MyStruct/$1/g MyStructEA.cpp > $2/$1EA.cpp -sed s/MyStruct/$1/g make_genotype_MyStruct.h > $2/make_genotype_$1.h -sed s/MyStruct/$1/g make_op_MyStruct.h > $2/make_op_$1.h -sed s/MyStruct/$1/g Makefile.tmpl > $2/Makefile +echo " " # we're going to do something + +if ($#argv == 1) then + set TargetDir = ../$1 +else + set TargetDir = ../$2 +endif + +if (! -e $TargetDir) then + mkdir $TargetDir +endif + +if ( (-f $TargetDir/eo$1.h) || (-f $TargetDir/eo$1Init.h) || (-f $TargetDir/eo$1EvalFunc.h) || (-f $TargetDir/eo$1Mutation.h) || (-f $TargetDir/eo$1QuadCrossover.h) || (-f $TargetDir/$1EA.cpp) || (-f $TargetDir/make_genotype_$1.h) || (-f $TargetDir/make_op_$1.h) ) then + echo WARNING: some files already exist there. + echo -n "Overwrite ALL (yes/no)? " + set REP = $< + if ($REP != "yes") then + echo Nothing done! + exit + endif +endif + +if (-f $TargetDir/Makefile) then + echo A Makefile already exists there. + echo I'm creating Makefile.$1. You'll have to merge them both, + echo OR to call make -f Makefile.$1 + set MakeName = Makefile.$1 +else + set MakeName = Makefile +endif + +echo Creating source files for application $1 in $TargetDir/ + +sed s/MyStruct/$1/g eoMyStruct.tmpl > $TargetDir/eo$1.h +sed s/MyStruct/$1/g init.tmpl > $TargetDir/eo$1Init.h +sed s/MyStruct/$1/g evalFunc.tmpl > $TargetDir/eo$1EvalFunc.h +sed s/MyStruct/$1/g mutation.tmpl > $TargetDir/eo$1Mutation.h +sed s/MyStruct/$1/g quadCrossover.tmpl > $TargetDir/eo$1QuadCrossover.h +sed s/MyStruct/$1/g MyStructEA.cpp > $TargetDir/$1EA.cpp +sed s/MyStruct/$1/g make_genotype_MyStruct.h > $TargetDir/make_genotype_$1.h +sed s/MyStruct/$1/g make_op_MyStruct.h > $TargetDir/make_op_$1.h +sed s/MyStruct/$1/g Makefile.tmpl > $TargetDir/$MakeName + +echo Done! From 6324bb5179a314c5514ee0abcff098f1d3d92bdf Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 11 Nov 2001 06:55:12 +0000 Subject: [PATCH 0686/2134] Create_dsp.sh is a script that will create the .dsp file from a source file name in the test dir --- eo/win/create_dsp.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 eo/win/create_dsp.sh diff --git a/eo/win/create_dsp.sh b/eo/win/create_dsp.sh new file mode 100755 index 000000000..2baa32f56 --- /dev/null +++ b/eo/win/create_dsp.sh @@ -0,0 +1,19 @@ +#! /bin/tcsh -f + +if ($#argv < 3) then + echo Usage $0 SourceName TargetName [Additional lib] + echo Example: $0 t-eoGA t_eoga ga + echo " will create t_eoga.dsp that in turn is the Win project file" + echo " that will create the executable t_eoga using source" + echo " t-eoga.cpp in test dir" + exit +endif +echo "Creating $2.dsp" +echo s/DIRNAME/$2/g > toto.sed +echo s/SOURCENAME/$1/g >> toto.sed +if ($#argv == 3) then + echo s/ADDLIB/$3/g >> toto.sed +endif + +sed -f toto.sed test_dsp.tmpl > $2.dsp +/bin/rm toto.sed From 0e4df9e40408100840afd4c0a12f8e640dc60902 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 11 Nov 2001 06:59:42 +0000 Subject: [PATCH 0687/2134] Adding the dsp file for t-eoReal - testing the create_dsp script. Next step is to add them all from the test/Makefile file --- eo/win/t_eoreal.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 eo/win/t_eoreal.dsp diff --git a/eo/win/t_eoreal.dsp b/eo/win/t_eoreal.dsp new file mode 100644 index 000000000..f87404678 --- /dev/null +++ b/eo/win/t_eoreal.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreal - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreal - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreal - Win32 Release" +# Name "t_eoreal - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReal.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 4ad58c360edc0a506b9cdf32168bdf4cca0478a3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 14:17:58 +0000 Subject: [PATCH 0688/2134] Some more small changes for MSVC++ compatibility --- eo/src/do/make_checkpoint.h | 2 ++ eo/src/eoGenOp.h | 1 + eo/src/es/make_genotype_real.h | 2 +- eo/src/utils/eoParam.h | 4 ++-- eo/src/utils/make_help.cpp | 4 +++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index b0852c0b2..62fcc8389 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -188,6 +188,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval fileMonitor->add(*secondStat); } +#if !defined(NO_GNUPLOT) if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average { string stmp = dirNameParam.value() + "_gnu_best.xg"; @@ -218,6 +219,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // and of course add it to the checkpoint checkpoint->add(*fitSnapshot); } +#endif ////////////////////////////////// // State savers diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 8facd01f1..74b0bc2c3 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -29,6 +29,7 @@ #include #include #include +#include /** @name General variation operators diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index bd1fae01a..e6d8bdbc8 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -28,7 +28,7 @@ #define _make_genotype_h #include -#include +#include #include // also need the parser and param includes #include diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index c991b3a70..4ca81fe30 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -409,8 +409,8 @@ public: while ( (pos=t.find_first_not_of(delim)) < t.size()) { size_t posEnd = t.find_first_of(delim, pos); - std::string u(t,pos); - u.resize(posEnd-pos); + std::string u = t.substr(pos,posEnd);//(t, pos); + /*u.resize(posEnd - pos);*/ second.push_back(u); t = t.substr(posEnd); } diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index d6cd9eab8..6924c1742 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -29,9 +29,11 @@ #endif #include -#include +#include #include +using namespace std; + /** Generation of the status file, and output of the help message if needed * * MUST be called after ALL parameters have been read in order to list them From 19ebcbd5e36a892ce43760d321d10948dbd89008 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 14:27:12 +0000 Subject: [PATCH 0689/2134] Template file for dsp project files (to be used within create_dsp.sh) --- eo/win/test_dsp.tmpl | 102 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 eo/win/test_dsp.tmpl diff --git a/eo/win/test_dsp.tmpl b/eo/win/test_dsp.tmpl new file mode 100644 index 000000000..81bade90a --- /dev/null +++ b/eo/win/test_dsp.tmpl @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="DIRNAME" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=DIRNAME - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DIRNAME.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DIRNAME.mak" CFG="DIRNAME - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DIRNAME - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "DIRNAME - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DIRNAME - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "DIRNAME - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DIRNAME___Win32_Debug0" +# PROP BASE Intermediate_Dir "DIRNAME___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "DIRNAME - Win32 Release" +# Name "DIRNAME - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\SOURCENAME.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 72fc838360f81a87299135e70c62ca8da9c99845 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 14:44:01 +0000 Subject: [PATCH 0690/2134] Create.sh mdified to also add the new dsp file into eo.dsw --- eo/win/create_dsp.sh | 16 +++++ eo/win/eo.dsw | 165 +++++++++++++++++++++++-------------------- 2 files changed, 104 insertions(+), 77 deletions(-) diff --git a/eo/win/create_dsp.sh b/eo/win/create_dsp.sh index 2baa32f56..6efeef531 100755 --- a/eo/win/create_dsp.sh +++ b/eo/win/create_dsp.sh @@ -17,3 +17,19 @@ endif sed -f toto.sed test_dsp.tmpl > $2.dsp /bin/rm toto.sed + +echo "Adding $2.dsp in the main eo.dsw project file" + +echo "" >> eo.dsw +echo Project: \"$2\"=.\\\\$2.dsp - Package Owner=\<4\> >> eo.dsw +echo "" >> eo.dsw +echo Package=\<5\> >> eo.dsw +echo '{{{' >> eo.dsw +echo '}}}' >> eo.dsw +echo "" >> eo.dsw +echo Package=\<4\> >> eo.dsw +echo '{{{' >> eo.dsw +echo '}}}' >> eo.dsw +echo "" >> eo.dsw +echo '###############################################################################' >> eo.dsw + diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index ef95975ff..ef1872cd7 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -1,77 +1,88 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "es"=.\es.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ga"=.\ga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "utils"=.\utils.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "es"=.\es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ga"=.\ga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "utils"=.\utils.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + +Project: "t_eoreal"=.\t_eoreal.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### From fd4eda8aca0ce5935262d941e311c978311fe654 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 14:51:51 +0000 Subject: [PATCH 0691/2134] A readme for the win dir ... --- eo/win/Readme | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 eo/win/Readme diff --git a/eo/win/Readme b/eo/win/Readme new file mode 100644 index 000000000..2f645c46f --- /dev/null +++ b/eo/win/Readme @@ -0,0 +1,16 @@ +This directory contains the project files for MSVC++ +They have been successfully tested with MSVC++ 6.0 +on Windows NT. + +There is one main DSW project file: eo.dsw +It contains the description of the project with all compiler options. + +There are several DSP files: + +eo.dsp for the library in src +utils.dsp ... src/utils +ga.dsp ... src/ga +es.dsp ... src/es + +and one additional DSP file for each program in test dir. + From 4a39f49a741cb8813e0ccb893fe896492ea69671 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 14:59:32 +0000 Subject: [PATCH 0692/2134] Adding Jeroen :-) --- eo/AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/AUTHORS b/eo/AUTHORS index 1687ecd93..298d1c11b 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -4,4 +4,5 @@ Victor Manuel Rivas Santos Gustavo Romero Lopez Maarten Keijzer Marc Schoenauer +Jeroen Eggermont From bd53a220a5836c74823392f3fcb13f572409d859 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 15:21:40 +0000 Subject: [PATCH 0693/2134] A few more typename conditionally removed for MSVC++ --- eo/src/utils/eoStat.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 71d6d575c..66f3ffdba 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -91,7 +91,11 @@ template class eoAverageStat : public eoStat(fitness_type(), _description) {} +#else eoAverageStat(std::string _description = "Average Fitness") : eoStat(fitness_type(), _description) {} +#endif static double sumFitness(double _sum, const EOT& _eot) { @@ -170,8 +174,13 @@ public : /** The n_th element fitness in the population (see eoBestFitnessStat) */ +#ifdef _MSC_VER +template +class eoNthElementFitnessStat : public eoSortedStat +#else template class eoNthElementFitnessStat : public eoSortedStat +#endif { public : typedef typename EOT::Fitness Fitness; From af8618a47a54a5f74a9481202ae60aa05e1bfc49 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 12 Nov 2001 16:27:37 +0000 Subject: [PATCH 0694/2134] Announcing the MSVC++ compatibility revisited --- eo/tutorial/html/eoTutorial.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index c7363a8de..17451deab 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,9 +17,8 @@ and to

      EO Tutorial

      -
      Version 0.95 - May. 4 2001 -
      New: Lesson4 -- with user guide of fully operational program for bitstrings and real-valued, including full support of ES self-adaptive mutation strategies
      +
      Version 0.96 - Nov. 12 2001 +
      Nothing new in this version of the tutorial since Lesson4, that includes a user guide of fully operational program for bitstrings and real-valued with full support of ES self-adaptive mutation strategies. But EO keeps advancing: for instance, this snapshot now compiles in MSVC++ v. 6.0

      Welcome to EO tutorial/on-line documentation.

      Please note that this tutorial is not supposed From 5597f3e353e23258c6e488d3bb1ded5cb2af7757 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 15 Nov 2001 22:11:31 +0000 Subject: [PATCH 0695/2134] small change in documentation --- eo/config.cache | 6 +++--- eo/src/gp/eoStParseTreeDepthInit.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/config.cache b/eo/config.cache index 8f137b2a7..541f62a33 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -20,10 +20,10 @@ ac_cv_header_stdc=${ac_cv_header_stdc=yes} ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} -ac_cv_path_install=${ac_cv_path_install=$'/usr/bin/install -c'} -ac_cv_prog_CPP=${ac_cv_prog_CPP=$'cc -E'} +ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S=$'ln -s'} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index 7307d063a..e16d6bd07 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -50,7 +50,7 @@ using namespace std; \li int type(void) which returns the return type of the node \li int type(int child) which returns the required type for child 0, 1 or 2 - Tree pruning strongly typed trees is not possible at the moment. + Pruning strongly typed trees is not possible at the moment. */ /** eoStParseTreeDepthInit : the initializer class for strongly typed tree-based genetic programming From 49cc03546af7ed1581fc5a6676def5d29f8dab25 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Nov 2001 14:01:52 +0000 Subject: [PATCH 0696/2134] Replaced the flat definitions of ncecessary classes (eoStatxxx and eoMonitor) with the include of the corresponding .h file. as MSVC complained! --- eo/src/utils/eoCheckPoint.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 7c8a1d11f..4e74fe2f3 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -29,11 +29,8 @@ #include #include - -template class eoStatBase; -template class eoSortedStatBase; -class eoMonitor; -class eoUpdater; +#include +#include /** eoCheckPoint is a container class. It contains an eoContinue, and vertors of (pointers to) From dbfa9a7aaa0217eaf18ea50651251f03f1dc83ca Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Nov 2001 14:30:58 +0000 Subject: [PATCH 0697/2134] Adding all test files for MSVC --- eo/win/eo.dsw | 252 ++++++++++++++++++++++++++++++++++ eo/win/t_eo.dsp | 102 ++++++++++++++ eo/win/t_eobin.dsp | 102 ++++++++++++++ eo/win/t_eocheckpointing.dsp | 102 ++++++++++++++ eo/win/t_eoes.dsp | 102 ++++++++++++++ eo/win/t_eoexternaleo.dsp | 102 ++++++++++++++ eo/win/t_eofitness.dsp | 102 ++++++++++++++ eo/win/t_eogenop.dsp | 102 ++++++++++++++ eo/win/t_eopareto.dsp | 102 ++++++++++++++ eo/win/t_eoparetofitness.dsp | 102 ++++++++++++++ eo/win/t_eoparetoftness.dsp | 102 ++++++++++++++ eo/win/t_eopbil.dsp | 102 ++++++++++++++ eo/win/t_eorandom.dsp | 102 ++++++++++++++ eo/win/t_eoreplacement.dsp | 102 ++++++++++++++ eo/win/t_eoselect.dsp | 102 ++++++++++++++ eo/win/t_eossga.dsp | 102 ++++++++++++++ eo/win/t_eostateandparser.dsp | 102 ++++++++++++++ eo/win/t_eosymreg.dsp | 102 ++++++++++++++ eo/win/t_eovector.dsp | 102 ++++++++++++++ eo/win/t_eovirus.dsp | 102 ++++++++++++++ eo/win/t_mge-control.dsp | 102 ++++++++++++++ eo/win/t_mge.dsp | 102 ++++++++++++++ eo/win/t_mge1bit.dsp | 102 ++++++++++++++ 23 files changed, 2496 insertions(+) create mode 100644 eo/win/t_eo.dsp create mode 100644 eo/win/t_eobin.dsp create mode 100644 eo/win/t_eocheckpointing.dsp create mode 100644 eo/win/t_eoes.dsp create mode 100644 eo/win/t_eoexternaleo.dsp create mode 100644 eo/win/t_eofitness.dsp create mode 100644 eo/win/t_eogenop.dsp create mode 100644 eo/win/t_eopareto.dsp create mode 100644 eo/win/t_eoparetofitness.dsp create mode 100644 eo/win/t_eoparetoftness.dsp create mode 100644 eo/win/t_eopbil.dsp create mode 100644 eo/win/t_eorandom.dsp create mode 100644 eo/win/t_eoreplacement.dsp create mode 100644 eo/win/t_eoselect.dsp create mode 100644 eo/win/t_eossga.dsp create mode 100644 eo/win/t_eostateandparser.dsp create mode 100644 eo/win/t_eosymreg.dsp create mode 100644 eo/win/t_eovector.dsp create mode 100644 eo/win/t_eovirus.dsp create mode 100644 eo/win/t_mge-control.dsp create mode 100644 eo/win/t_mge.dsp create mode 100644 eo/win/t_mge1bit.dsp diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index ef1872cd7..1d4ec4c97 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -86,3 +86,255 @@ Package=<4> }}} ############################################################################### + +Project: "t_eoes"=.\t_eoes.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoparetofitness"=.\t_eoparetofitness.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eopareto"=.\t_eopareto.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eofitness"=.\t_eofitness.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eorandom"=.\t_eorandom.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eovirus"=.\t_eovirus.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_mge"=.\t_mge.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_mge1bit"=.\t_mge1bit.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_mge-control"=.\t_mge-control.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eostateandparser"=.\t_eostateandparser.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eocheckpointing"=.\t_eocheckpointing.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eossga"=.\t_eossga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoexternaleo"=.\t_eoexternaleo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eosymreg"=.\t_eosymreg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eo"=.\t_eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoreplacement"=.\t_eoreplacement.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoselect"=.\t_eoselect.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eogenop"=.\t_eogenop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eopbil"=.\t_eopbil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### diff --git a/eo/win/t_eo.dsp b/eo/win/t_eo.dsp new file mode 100644 index 000000000..3db6432d2 --- /dev/null +++ b/eo/win/t_eo.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eo - Win32 Release" +# Name "t_eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eo.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp new file mode 100644 index 000000000..814d7e9e2 --- /dev/null +++ b/eo/win/t_eobin.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobin___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eobin - Win32 Release" +# Name "t_eobin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobin.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eocheckpointing.dsp b/eo/win/t_eocheckpointing.dsp new file mode 100644 index 000000000..83e3402bd --- /dev/null +++ b/eo/win/t_eocheckpointing.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eocheckpointing - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eocheckpointing - Win32 Release" +# Name "t_eocheckpointing - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoCheckpointing.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoes.dsp b/eo/win/t_eoes.dsp new file mode 100644 index 000000000..fafebdf22 --- /dev/null +++ b/eo/win/t_eoes.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoes" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoes - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoes.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoes.mak" CFG="t_eoes - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoes - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoes - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoes - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoes - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoes___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoes___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoes - Win32 Release" +# Name "t_eoes - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESAll.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoexternaleo.dsp b/eo/win/t_eoexternaleo.dsp new file mode 100644 index 000000000..4c9051994 --- /dev/null +++ b/eo/win/t_eoexternaleo.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoexternaleo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoexternaleo - Win32 Release" +# Name "t_eoexternaleo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoExternalEO.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp new file mode 100644 index 000000000..041701b31 --- /dev/null +++ b/eo/win/t_eofitness.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eofitness - Win32 Release" +# Name "t_eofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eofitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eogenop.dsp b/eo/win/t_eogenop.dsp new file mode 100644 index 000000000..47ba81a8f --- /dev/null +++ b/eo/win/t_eogenop.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eogenop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eogenop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eogenop - Win32 Release" +# Name "t_eogenop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGenOp.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eopareto.dsp b/eo/win/t_eopareto.dsp new file mode 100644 index 000000000..4267acd23 --- /dev/null +++ b/eo/win/t_eopareto.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopareto - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopareto - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopareto - Win32 Release" +# Name "t_eopareto - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPareto.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoparetofitness.dsp b/eo/win/t_eoparetofitness.dsp new file mode 100644 index 000000000..98ea9f945 --- /dev/null +++ b/eo/win/t_eoparetofitness.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoparetofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoparetofitness - Win32 Release" +# Name "t_eoparetofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoParetoFitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoparetoftness.dsp b/eo/win/t_eoparetoftness.dsp new file mode 100644 index 000000000..697243335 --- /dev/null +++ b/eo/win/t_eoparetoftness.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoparetoftness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoparetoftness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetoftness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetoftness.mak" CFG="t_eoparetoftness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoparetoftness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoparetoftness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoparetoftness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoparetoftness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoparetoftness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoparetoftness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoparetoftness - Win32 Release" +# Name "t_eoparetoftness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoParetoFitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eopbil.dsp b/eo/win/t_eopbil.dsp new file mode 100644 index 000000000..35706971f --- /dev/null +++ b/eo/win/t_eopbil.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopbil - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopbil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopbil - Win32 Release" +# Name "t_eopbil - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPBIL.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eorandom.dsp b/eo/win/t_eorandom.dsp new file mode 100644 index 000000000..245ce8b3c --- /dev/null +++ b/eo/win/t_eorandom.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eorandom - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eorandom - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eorandom - Win32 Release" +# Name "t_eorandom - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoRandom.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoreplacement.dsp b/eo/win/t_eoreplacement.dsp new file mode 100644 index 000000000..4911f2788 --- /dev/null +++ b/eo/win/t_eoreplacement.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreplacement - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreplacement - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreplacement - Win32 Release" +# Name "t_eoreplacement - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReplacement.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoselect.dsp b/eo/win/t_eoselect.dsp new file mode 100644 index 000000000..afd75ac18 --- /dev/null +++ b/eo/win/t_eoselect.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoselect - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoselect - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoselect - Win32 Release" +# Name "t_eoselect - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSelect.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eossga.dsp b/eo/win/t_eossga.dsp new file mode 100644 index 000000000..9f6d04686 --- /dev/null +++ b/eo/win/t_eossga.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eossga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eossga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eossga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eossga - Win32 Release" +# Name "t_eossga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSSGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eostateandparser.dsp b/eo/win/t_eostateandparser.dsp new file mode 100644 index 000000000..e4ec94f47 --- /dev/null +++ b/eo/win/t_eostateandparser.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eostateandparser - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eostateandparser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eostateandparser - Win32 Release" +# Name "t_eostateandparser - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoStateAndParser.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eosymreg.dsp b/eo/win/t_eosymreg.dsp new file mode 100644 index 000000000..3ce164f95 --- /dev/null +++ b/eo/win/t_eosymreg.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eosymreg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eosymreg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eosymreg - Win32 Release" +# Name "t_eosymreg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSymreg.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp new file mode 100644 index 000000000..493b8e04f --- /dev/null +++ b/eo/win/t_eovector.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovector - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovector - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovector___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovector - Win32 Release" +# Name "t_eovector - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVector.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovirus.dsp b/eo/win/t_eovirus.dsp new file mode 100644 index 000000000..6156f7a21 --- /dev/null +++ b/eo/win/t_eovirus.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovirus - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovirus - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovirus - Win32 Release" +# Name "t_eovirus - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVirus.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge-control.dsp b/eo/win/t_mge-control.dsp new file mode 100644 index 000000000..337953fa9 --- /dev/null +++ b/eo/win/t_mge-control.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge-control - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge-control - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge-control - Win32 Release" +# Name "t_mge-control - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE-control.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge.dsp b/eo/win/t_mge.dsp new file mode 100644 index 000000000..f7f926893 --- /dev/null +++ b/eo/win/t_mge.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge - Win32 Release" +# Name "t_mge - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge1bit.dsp b/eo/win/t_mge1bit.dsp new file mode 100644 index 000000000..b32e48ff0 --- /dev/null +++ b/eo/win/t_mge1bit.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge1bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge1bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge1bit - Win32 Release" +# Name "t_mge1bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE1bit.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 86fb15267685135dc8912cc0a654c178011dbb4d Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Nov 2001 14:32:07 +0000 Subject: [PATCH 0698/2134] The file eo.org is the base project file (no file in test involved). It is upgraded by the create.sh script --- eo/win/eo.org | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 eo/win/eo.org diff --git a/eo/win/eo.org b/eo/win/eo.org new file mode 100644 index 000000000..ef95975ff --- /dev/null +++ b/eo/win/eo.org @@ -0,0 +1,77 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "es"=.\es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ga"=.\ga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "utils"=.\utils.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From 3eefeb651ebf36535a9dd800c6632d1880273e0b Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Nov 2001 15:02:35 +0000 Subject: [PATCH 0699/2134] Error in argments check --- eo/win/create_dsp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/win/create_dsp.sh b/eo/win/create_dsp.sh index 6efeef531..43cbcb6a5 100755 --- a/eo/win/create_dsp.sh +++ b/eo/win/create_dsp.sh @@ -1,6 +1,6 @@ #! /bin/tcsh -f -if ($#argv < 3) then +if ($#argv < 2) then echo Usage $0 SourceName TargetName [Additional lib] echo Example: $0 t-eoGA t_eoga ga echo " will create t_eoga.dsp that in turn is the Win project file" From 25765640ae7ad5088e401d77a86f0908a07c3b8b Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Nov 2001 15:05:41 +0000 Subject: [PATCH 0700/2134] Changed the filenaming to comply with MacroHard --- eo/src/do/make_checkpoint.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 62fcc8389..941101882 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -64,7 +64,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // dir for DISK output eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); // shoudl we empty it if exists - eoValueParam& eraseParam = _parser.createParam(false, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); + eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); bool dirOK = false; // not tested yet ///////////////////////////////////////// @@ -176,7 +176,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if (fileBestParam.value()) // A file monitor for best & secondMoment { +#ifdef _MSVC + string stmp = dirNameParam.value() + "\best.xg"; +#else string stmp = dirNameParam.value() + "/best.xg"; +#endif eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); // save and give to checkpoint _state.storeFunctor(fileMonitor); @@ -236,7 +240,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); +#ifdef _MSVC + string stmp = dirNameParam.value() + "\generations"; +#else string stmp = dirNameParam.value() + "/generations"; +#endif eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); _state.storeFunctor(stateSaver1); checkpoint->add(*stateSaver1); @@ -250,7 +258,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if (! dirOK ) dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE +#ifdef _MSVC + string stmp = dirNameParam.value() + "\time"; +#else string stmp = dirNameParam.value() + "/time"; +#endif eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); checkpoint->add(*stateSaver2); From 8abb9242c2bef605400816f59190bbe26d1a4907 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Nov 2001 15:06:29 +0000 Subject: [PATCH 0701/2134] Some error for MSVC that was not even a warning for g++ (but I'm sorry to say that MSVC is right :-) --- eo/src/es/make_genotype_real.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/es/make_genotype_real.cpp b/eo/src/es/make_genotype_real.cpp index 51a546321..bce60a840 100644 --- a/eo/src/es/make_genotype_real.cpp +++ b/eo/src/es/make_genotype_real.cpp @@ -57,11 +57,11 @@ /// The following function merely call the templatized do_* functions -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo) { return do_make_genotype(_parser, _state, _eo); } From f41cd957c0b947885fffcfe58653dc40116eb75d Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Nov 2001 07:22:59 +0000 Subject: [PATCH 0702/2134] Changes due to MSVC --- eo/src/eoEvalFuncPtr.h | 4 ++++ eo/src/eoNDSorting.h | 28 +++++++++++++++------------- eo/src/eoPerf2Worth.h | 24 ++++++++++++++++-------- eo/src/es/make_genotype_es.cpp | 12 ++++++------ eo/src/ga/make_PBILdistrib.h | 2 +- eo/src/ga/make_PBILupdate.h | 1 - eo/test/t-eoESAll.cpp | 6 +++++- eo/test/t-eoGenOp.cpp | 4 ++-- eo/test/t-eoPBIL.cpp | 31 ++++++++++++++++++++++++++++++- eo/test/t-eoPareto.cpp | 2 ++ eo/test/t-eoParetoFitness.cpp | 29 +++++++++++++++++++++++++++++ eo/test/t-eoSelect.cpp | 8 ++++---- 12 files changed, 114 insertions(+), 37 deletions(-) diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index 8c28a721d..fd98e4e34 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -35,7 +35,11 @@ * function class. That way, old style C or C++ functions can be adapted to EO * function classes. */ +#ifdef _MSC_VER +template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& > +#else template< class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT& > +#endif struct eoEvalFuncPtr: public eoEvalFunc { /** Applies the function to the chromosome and sets the fitness of the diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index dea76083b..b2d49c934 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -55,6 +55,7 @@ class eoNDSorting : public eoPerf2WorthCached void calculate_worths(const eoPop& _pop) { + unsigned i; value().resize(_pop.size()); typedef typename EOT::Fitness::fitness_traits traits; @@ -66,7 +67,7 @@ class eoNDSorting : public eoPerf2WorthCached tmp_pop.resize(_pop.size()); // copy pop to dummy population (only need the fitnesses) - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { tmp_pop[i].fitness(_pop[i].fitness()); tmp_pop[i].index = i; @@ -76,7 +77,7 @@ class eoNDSorting : public eoPerf2WorthCached tmp_pop.sort(); // - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { value()[tmp_pop[i].index] = _pop.size() - i; // set rank } @@ -87,10 +88,10 @@ class eoNDSorting : public eoPerf2WorthCached vector > S(_pop.size()); // which individuals does guy i dominate vector n(_pop.size(), 0); // how many individuals dominate guy i - - for (unsigned i = 0; i < _pop.size(); ++i) + unsigned j; + for (i = 0; i < _pop.size(); ++i) { - for (unsigned j = 0; j < _pop.size(); ++j) + for (j = 0; j < _pop.size(); ++j) { if (_pop[i].fitness().dominates(_pop[j].fitness())) { // i dominates j @@ -111,7 +112,7 @@ class eoNDSorting : public eoPerf2WorthCached current_front.reserve(_pop.size()); // get the first front out - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { if (n[i] == 0) { @@ -138,16 +139,16 @@ class eoNDSorting : public eoPerf2WorthCached double max_niche = *max_element(niche_count.begin(), niche_count.end()); - for (unsigned i = 0; i < current_front.size(); ++i) + for (i = 0; i < current_front.size(); ++i) { value()[current_front[i]] = front_index + niche_count[i] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next } // Calculate which individuals are in the next front; - for (unsigned i = 0; i < current_front.size(); ++i) + for (i = 0; i < current_front.size(); ++i) { - for (unsigned j = 0; j < S[current_front[i]].size(); ++j) + for (j = 0; j < S[current_front[i]].size(); ++j) { unsigned dominated_individual = S[current_front[i]][j]; n[dominated_individual]--; // As we remove individual i -- being part of the current front -- it no longer dominates j @@ -172,7 +173,7 @@ class eoNDSorting : public eoPerf2WorthCached unsigned nfirst = 0; - for (unsigned i = 0; i < value().size(); ++i) + for (i = 0; i < value().size(); ++i) { value()[i] = max_fitness - value()[i]; assert(n[i] == 0); @@ -255,6 +256,7 @@ class eoNDSorting_II : public eoNDSorting vector niche_penalty(const vector& _cf, const eoPop& _pop) { + unsigned i; vector niche_count(_cf.size(), 0.); unsigned nObjectives = _pop[_cf[0]].fitness().size(); @@ -263,7 +265,7 @@ class eoNDSorting_II : public eoNDSorting { vector > performance(_cf.size()); - for (unsigned i =0; i < _cf.size(); ++i) + for (i =0; i < _cf.size(); ++i) { performance[i].first = _pop[_cf[i]].fitness()[o]; performance[i].second = i; @@ -273,7 +275,7 @@ class eoNDSorting_II : public eoNDSorting vector nc(niche_count.size(), 0.0); - for (unsigned i = 1; i < _cf.size()-1; ++i) + for (i = 1; i < _cf.size()-1; ++i) { // and yet another level of indirection nc[performance[i].second] = performance[i+1].first - performance[i-1].first; } @@ -284,7 +286,7 @@ class eoNDSorting_II : public eoNDSorting nc[performance[0].second] = max_dist + 1; nc[performance.back().second] = max_dist + 1; - for (unsigned i = 0; i < nc.size(); ++i) + for (i = 0; i < nc.size(); ++i) { niche_count[i] += (max_dist + 1) - nc[i]; } diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index 21ea551a4..f5bffc4a4 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -48,7 +48,8 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam indices(_pop.size()); - for (unsigned i = 0; i < _pop.size();++i) + unsigned i; + for (i = 0; i < _pop.size();++i) { // could use generate, but who cares indices[i] = i; } @@ -59,7 +60,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam tmp_worths(value().size()); - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { tmp_pop[i] = _pop[indices[i]]; tmp_worths[i] = value()[indices[i]]; @@ -111,10 +112,11 @@ class eoPerf2WorthCached : public eoPerf2Worth */ void operator()(const eoPop& _pop) { + unsigned i; if (fitness_cache.size() == _pop.size()) { bool in_sync = true; - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { if (fitness_cache[i] != _pop[i].fitness()) { @@ -131,7 +133,7 @@ class eoPerf2WorthCached : public eoPerf2Worth else // just cache the fitness { fitness_cache.resize(_pop.size()); - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { fitness_cache[i] = _pop[i].fitness(); } @@ -151,7 +153,8 @@ class eoPerf2WorthCached : public eoPerf2Worth { // start with a vector of indices vector indices(_pop.size()); - for (unsigned i = 0; i < _pop.size();++i) + unsigned i; + for (i = 0; i < _pop.size();++i) { // could use generate, but who cares indices[i] = i; } @@ -161,9 +164,13 @@ class eoPerf2WorthCached : public eoPerf2Worth eoPop tmp_pop; tmp_pop.resize(_pop.size()); vector tmp_worths(value().size()); - vector tmp_cache(_pop.size()); - for (unsigned i = 0; i < _pop.size(); ++i) +#ifdef _MSC_VER + vector tmp_cache(_pop.size()); +#else + vector tmp_cache(_pop.size()); +#endif + for (i = 0; i < _pop.size(); ++i) { tmp_pop[i] = _pop[indices[i]]; tmp_worths[i] = value()[indices[i]]; @@ -215,8 +222,9 @@ class eoNoPerf2Worth : public eoPerf2Worth // default behaviour, just copy fitnesses void operator()(const eoPop& _pop) { + unsigned i; value.resize(_pop.size()); - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) value()[i]=_pop[i]; } }; diff --git a/eo/src/es/make_genotype_es.cpp b/eo/src/es/make_genotype_es.cpp index a04215736..42006f610 100644 --- a/eo/src/es/make_genotype_es.cpp +++ b/eo/src/es/make_genotype_es.cpp @@ -57,29 +57,29 @@ /// The following function merely call the templatized do_* functions -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo) { return do_make_genotype(_parser, _state, _eo); } -eoEsChromInit > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo) +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo) { return do_make_genotype(_parser, _state, _eo); } diff --git a/eo/src/ga/make_PBILdistrib.h b/eo/src/ga/make_PBILdistrib.h index 2698cc349..3615aa33e 100644 --- a/eo/src/ga/make_PBILdistrib.h +++ b/eo/src/ga/make_PBILdistrib.h @@ -26,7 +26,7 @@ #ifndef _make_PBILdistrib_h #define _make_PBILdistrib_h -#include // for time(0) for random seeding +#include // for time(0) for random seeding #include #include #include diff --git a/eo/src/ga/make_PBILupdate.h b/eo/src/ga/make_PBILupdate.h index 7cf371b49..db9241ea6 100644 --- a/eo/src/ga/make_PBILupdate.h +++ b/eo/src/ga/make_PBILupdate.h @@ -26,7 +26,6 @@ #ifndef _make_PBILupdate_h #define _make_PBILupdate_h -#include // for time(0) for random seeding #include #include #include diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index cd6436e7e..1752faa80 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -9,7 +9,11 @@ #include #include #include -#include +#include + +#ifdef _MSC_VER + #include +#endif using namespace std; diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index d44251c01..dd13ba322 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoGenOp.h +// eoGenOp.cpp // (c) Maarten Keijzer and Marc Schoenauer, 2001 /* This library is free software; you can redistribute it and/or @@ -189,7 +189,7 @@ int the_main(int argc, char **argv) { eoParser parser(argc, argv); - eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); + eoValueParam parentSizeParam = parser.createParam(unsigned(10), "parentSize", "Parent size",'P'); pSize = parentSizeParam.value(); // global variable eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); diff --git a/eo/test/t-eoPBIL.cpp b/eo/test/t-eoPBIL.cpp index 8863bde0f..70efa6085 100644 --- a/eo/test/t-eoPBIL.cpp +++ b/eo/test/t-eoPBIL.cpp @@ -1,5 +1,30 @@ -#include +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// t-eoPBIL.cpp +// (c) Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +/** test program for PBIL algorithm */ + +#include #include #include #include "binary_value.h" @@ -66,6 +91,7 @@ int main(int argc, char* argv[]) if (!ptDirNameParam) // not found throw runtime_error("Parameter resDir not found where it was supposed to be"); +#if !defined(NO_GNUPLOT) // now create the snapshot monitor eoValueParam& plotDistribParam = parser.createParam(false, "plotDistrib", "Plot Distribution", '\0', "Output - Graphical"); if (plotDistribParam.value()) @@ -78,6 +104,7 @@ int main(int argc, char* argv[]) // and of course add it to the checkpoint checkpoint.add(*distribSnapshot); } +#endif // the algorithm: DEA // don't know where else to put the population size! @@ -98,6 +125,7 @@ int main(int argc, char* argv[]) distrib.printOn(cout); cout << endl; +#if !defined(NO_GNUPLOT) // wait - for graphical output if (plotDistribParam.value()) { @@ -105,6 +133,7 @@ int main(int argc, char* argv[]) cin >> foo; } } +#endif catch(exception& e) { cout << e.what() << endl; diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 33e3de73d..b79c2f0ac 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -195,6 +195,7 @@ void the_main(int argc, char* argv[]) cp.add(fitness0); cp.add(fitness1); +#if !defined(NO_GNUPLOT) eoGnuplot1DSnapshot snapshot("pareto"); snapshot.pointSize =3; @@ -202,6 +203,7 @@ void the_main(int argc, char* argv[]) snapshot.add(fitness0); snapshot.add(fitness1); +#endif // the algo eoEasyEA ea(cp, eval, breeder, replace); diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index 18dbf2f31..402616703 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -1,4 +1,33 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eoParetoFitness.cpp +// (c) Maarten Keijzer +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#include #include "eoParetoFitness.h" +#include +using namespace std; + +/** test program for Pareto Fitness */ class MinimizingTraits : public eoParetoFitnessTraits { diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 672b16ec6..05142eb69 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -105,7 +105,7 @@ void testSelectOne(eoSelectOne & _select, eoHowMany & _hm, string _name) int the_main(int argc, char **argv) { eoParser parser(argc, argv); - eoValueParam parentSizeParam = parser.createParam(10, "parentSize", "Parent size",'P'); + eoValueParam parentSizeParam = parser.createParam(unsigned(10), "parentSize", "Parent size",'P'); pSize = parentSizeParam.value(); // global variable // eoValueParam offsrpringRateParam = parser.createParam(1.0, "offsrpringRate", "Offsrpring rate",'O'); @@ -113,13 +113,13 @@ int the_main(int argc, char **argv) eoValueParam offsrpringRateParam = parser.createParam(eoHowMany(1.0), "offsrpringRate", "Offsrpring rate (% or absolute)",'O'); eoHowMany oRate = offsrpringRateParam.value(); -eoValueParam tournamentSizeParam = parser.createParam(2, "tournamentSize", "Deterministic tournament size",'T'); +eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "tournamentSize", "Deterministic tournament size",'T'); unsigned int tSize = tournamentSizeParam.value(); - eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); double tRate = tournamentRateParam.value(); - eoValueParam rankingPressureParam = parser.createParam(1.75, "rankingPressure", "Selective pressure for the ranking selection",'p'); + eoValueParam rankingPressureParam = parser.createParam(1.75, "rankingPressure", "Selective pressure for the ranking selection",'p'); double rankingPressure = rankingPressureParam.value(); if (parser.userNeedsHelp()) From d686b37c1f94ab40a6a195a6e66ea880db385f4a Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Nov 2001 07:54:12 +0000 Subject: [PATCH 0703/2134] Turned bonary_value into the onemax (not pow that exploded for even only moderately small size of genome!) Turned it into a double (it was a float) as floats are dead and should dissappear --- eo/test/binary_value.h | 23 +++++++---------------- eo/test/t-eoGA.cpp | 3 ++- eo/test/t-eoPBIL.cpp | 2 +- eo/test/t-eobin.cpp | 2 +- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/eo/test/binary_value.h b/eo/test/binary_value.h index e36ad50c7..793e9de62 100644 --- a/eo/test/binary_value.h +++ b/eo/test/binary_value.h @@ -1,25 +1,16 @@ -#include +#include //----------------------------------------------------------------------------- -/** Just a simple function that takes binary value of a chromosome and sets +/** Just the simple function that takes binary value of a chromosome and sets the fitnes. @param _chrom A binary chromosome */ -template float binary_value(const Chrom& _chrom) +template double binary_value(const Chrom& _chrom) { - float sum = 0; - for (unsigned i = 0; i < _chrom.size(); i++) - if (_chrom[i]) - sum += pow(2, _chrom.size() - i - 1); - return sum; + double sum = 0.0; + for (unsigned i=0; i<_chrom.size(); i++) + sum += _chrom[i]; + return sum; } - -struct BinaryValue -{ - template void operator()(Chrom& _chrom) - { - _chrom.fitness(binary_value(_chrom)); - } -}; diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index 31a22ae3c..6763edea7 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -1,6 +1,7 @@ #include #include +#include #include "binary_value.h" #include @@ -21,7 +22,7 @@ int main(int argc, char* argv[]) ////////////////////////////////////////////////////// // The evaluation fn - encapsulated into an eval counter for output - eoEvalFuncPtr mainEval( binary_value ); + eoEvalFuncPtr mainEval( binary_value ); eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer diff --git a/eo/test/t-eoPBIL.cpp b/eo/test/t-eoPBIL.cpp index 70efa6085..c546bc6bc 100644 --- a/eo/test/t-eoPBIL.cpp +++ b/eo/test/t-eoPBIL.cpp @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) ////////////////////////////////////////////////////// // The evaluation fn - encapsulated into an eval counter for output - eoEvalFuncPtr mainEval( binary_value); + eoEvalFuncPtr mainEval( binary_value); eoEvalFuncCounter eval(mainEval); // COnstruction of the distribution diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index c2e9b058d..691f86b48 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -32,7 +32,7 @@ //----------------------------------------------------------------------------- -typedef eoBit Chrom; +typedef eoBit Chrom; //----------------------------------------------------------------------------- From 8538cc453238b5d90caa049283c323decd84e100 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Nov 2001 07:55:39 +0000 Subject: [PATCH 0704/2134] Bug in create_dsp when no additional library --- eo/win/create_dsp.sh | 8 +++++++- eo/win/test_dsp.tmpl | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/eo/win/create_dsp.sh b/eo/win/create_dsp.sh index 43cbcb6a5..4ddcffb96 100755 --- a/eo/win/create_dsp.sh +++ b/eo/win/create_dsp.sh @@ -11,8 +11,14 @@ endif echo "Creating $2.dsp" echo s/DIRNAME/$2/g > toto.sed echo s/SOURCENAME/$1/g >> toto.sed +# additional libraries: ADDLIBR = name of "Release" library +# ADDLIBD = name of "Debug" library if ($#argv == 3) then - echo s/ADDLIB/$3/g >> toto.sed + echo s/ADDLIBR/$3.lib/g >> toto.sed + echo s/ADDLIBD/$3d.lib/g >> toto.sed +else # remove the ADDLIBs !!!! + echo s/ADDLIBR//g >> toto.sed + echo s/ADDLIBD//g >> toto.sed endif sed -f toto.sed test_dsp.tmpl > $2.dsp diff --git a/eo/win/test_dsp.tmpl b/eo/win/test_dsp.tmpl index 81bade90a..dd800fa58 100644 --- a/eo/win/test_dsp.tmpl +++ b/eo/win/test_dsp.tmpl @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib ADDLIBR utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "DIRNAME - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib ADDLIBD utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF From f52b0f6646bf22c5439c5240b3d085ab145c34df Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Nov 2001 07:58:16 +0000 Subject: [PATCH 0705/2134] imply put all program names on one single line to ease bulding the win files --- eo/test/Makefile.am | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index a7ec9fa84..338bef4c1 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -13,16 +13,13 @@ LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall ############################################################################### -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus\ - t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ - t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL +# PLEASE don't break the line (see create_batch.sh) +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL #The run_tests script can be used to check various arguments TESTS=$(check_PROGRAMS) run_tests -# noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal - ############################################################################### t_eoRandom_SOURCES = t-eoRandom.cpp From b455d5392548b01dfbd02b8aed69f7120219d163 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 17 Nov 2001 08:13:55 +0000 Subject: [PATCH 0706/2134] Now the eo.dsw can be generated automatically from eo.org create_all_dsp.sh (that calls create_dsp.sh) To add a new test program, simpy add 1 line in create_all_dsp.sh and run it. DO NOT TOUCH eo.org !!! --- eo/win/create_all_dsp.sh | 38 +++++++ eo/win/eo.dsw | 71 ++++++------ eo/win/eo.org | 142 +++++++++++------------ eo/win/t_eo.dsp | 4 +- eo/win/t_eobin.dsp | 4 +- eo/win/t_eocheckpointing.dsp | 4 +- eo/win/t_eoexternaleo.dsp | 4 +- eo/win/t_eofitness.dsp | 4 +- eo/win/t_eoga.dsp | 204 +++++++++++++++++----------------- eo/win/t_eogenop.dsp | 4 +- eo/win/t_eopareto.dsp | 4 +- eo/win/t_eoparetofitness.dsp | 4 +- eo/win/t_eopbil.dsp | 4 +- eo/win/t_eorandom.dsp | 4 +- eo/win/t_eoreplacement.dsp | 4 +- eo/win/t_eoselect.dsp | 4 +- eo/win/t_eossga.dsp | 4 +- eo/win/t_eostateandparser.dsp | 4 +- eo/win/t_eosymreg.dsp | 4 +- eo/win/t_eovector.dsp | 4 +- eo/win/t_eovirus.dsp | 4 +- eo/win/t_mge-control.dsp | 4 +- eo/win/t_mge.dsp | 4 +- eo/win/t_mge1bit.dsp | 4 +- 24 files changed, 281 insertions(+), 254 deletions(-) create mode 100755 eo/win/create_all_dsp.sh diff --git a/eo/win/create_all_dsp.sh b/eo/win/create_all_dsp.sh new file mode 100755 index 000000000..feed7bfb5 --- /dev/null +++ b/eo/win/create_all_dsp.sh @@ -0,0 +1,38 @@ +#! /bin/tcsh -f +# +# script that generates the DSP files for all programs in test dir +# +# to add a new one, add the corresponding line: +# +# create_dsp SourceFileName dspFileName [optional additional library] +# +# don't use upper-case letters in the dspFileName + +# create a backup +/bin/mv eo.dsw eo.dsw~ +# restore empty DSW +cp eo.org eo.dsw +# GO for all programs +create_dsp.sh t-eoParetoFitness t_eoparetofitness +create_dsp.sh t-eoPareto t_eopareto +create_dsp.sh t-eofitness t_eofitness +create_dsp.sh t-eoRandom t_eorandom +create_dsp.sh t-eobin t_eobin +create_dsp.sh t-eoVirus t_eovirus +create_dsp.sh t-MGE t_mge +create_dsp.sh t-MGE1bit t_mge1bit +create_dsp.sh t-MGE-control t_mge-control +create_dsp.sh t-eoStateAndParser t_eostateandparser +create_dsp.sh t-eoCheckpointing t_eocheckpointing +create_dsp.sh t-eoSSGA t_eossga +create_dsp.sh t-eoExternalEO t_eoexternaleo +create_dsp.sh t-eoSymreg t_eosymreg +create_dsp.sh t-eo t_eo +create_dsp.sh t-eoReplacement t_eoreplacement +create_dsp.sh t-eoSelect t_eoselect +create_dsp.sh t-eoGenOp t_eogenop +create_dsp.sh t-eoGA t_eoga ga +create_dsp.sh t-eoReal t_eoreal es +create_dsp.sh t-eoVector t_eovector +create_dsp.sh t-eoESAll t_eoesall es +create_dsp.sh t-eoPBIL t_eopbil ga diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 1d4ec4c97..33f7ceaf6 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -39,18 +39,6 @@ Package=<4> ############################################################################### -Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "utils"=.\utils.dsp - Package Owner=<4> Package=<5> @@ -75,29 +63,6 @@ Package=<3> ############################################################################### -Project: "t_eoreal"=.\t_eoreal.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoes"=.\t_eoes.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### Project: "t_eoparetofitness"=.\t_eoparetofitness.dsp - Package Owner=<4> @@ -315,6 +280,30 @@ Package=<4> ############################################################################### +Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoreal"=.\t_eoreal.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> Package=<5> @@ -327,6 +316,18 @@ Package=<4> ############################################################################### +Project: "t_eoesall"=.\t_eoesall.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eopbil"=.\t_eopbil.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/eo.org b/eo/win/eo.org index ef95975ff..f15aec656 100644 --- a/eo/win/eo.org +++ b/eo/win/eo.org @@ -1,77 +1,65 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "es"=.\es.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ga"=.\ga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "utils"=.\utils.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "es"=.\es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ga"=.\ga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "utils"=.\utils.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/t_eo.dsp b/eo/win/t_eo.dsp index 3db6432d2..8a2775453 100644 --- a/eo/win/t_eo.dsp +++ b/eo/win/t_eo.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eo - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index 814d7e9e2..72f6feaee 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eocheckpointing.dsp b/eo/win/t_eocheckpointing.dsp index 83e3402bd..890455811 100644 --- a/eo/win/t_eocheckpointing.dsp +++ b/eo/win/t_eocheckpointing.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eoexternaleo.dsp b/eo/win/t_eoexternaleo.dsp index 4c9051994..33cc3ee92 100644 --- a/eo/win/t_eoexternaleo.dsp +++ b/eo/win/t_eoexternaleo.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp index 041701b31..ea5ca4ac7 100644 --- a/eo/win/t_eofitness.dsp +++ b/eo/win/t_eofitness.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eoga.dsp b/eo/win/t_eoga.dsp index 16c03fd2d..a0c288803 100644 --- a/eo/win/t_eoga.dsp +++ b/eo/win/t_eoga.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoga - Win32 Release" -# Name "t_eoga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoga - Win32 Release" +# Name "t_eoga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eogenop.dsp b/eo/win/t_eogenop.dsp index 47ba81a8f..2f0dda434 100644 --- a/eo/win/t_eogenop.dsp +++ b/eo/win/t_eogenop.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eopareto.dsp b/eo/win/t_eopareto.dsp index 4267acd23..fa3cb9839 100644 --- a/eo/win/t_eopareto.dsp +++ b/eo/win/t_eopareto.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eoparetofitness.dsp b/eo/win/t_eoparetofitness.dsp index 98ea9f945..058b81d49 100644 --- a/eo/win/t_eoparetofitness.dsp +++ b/eo/win/t_eoparetofitness.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eopbil.dsp b/eo/win/t_eopbil.dsp index 35706971f..31caf6430 100644 --- a/eo/win/t_eopbil.dsp +++ b/eo/win/t_eopbil.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eorandom.dsp b/eo/win/t_eorandom.dsp index 245ce8b3c..fb407b201 100644 --- a/eo/win/t_eorandom.dsp +++ b/eo/win/t_eorandom.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eoreplacement.dsp b/eo/win/t_eoreplacement.dsp index 4911f2788..8d2cc97db 100644 --- a/eo/win/t_eoreplacement.dsp +++ b/eo/win/t_eoreplacement.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eoselect.dsp b/eo/win/t_eoselect.dsp index afd75ac18..b17583e84 100644 --- a/eo/win/t_eoselect.dsp +++ b/eo/win/t_eoselect.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eossga.dsp b/eo/win/t_eossga.dsp index 9f6d04686..d714c27a3 100644 --- a/eo/win/t_eossga.dsp +++ b/eo/win/t_eossga.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eostateandparser.dsp b/eo/win/t_eostateandparser.dsp index e4ec94f47..031f5329b 100644 --- a/eo/win/t_eostateandparser.dsp +++ b/eo/win/t_eostateandparser.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eosymreg.dsp b/eo/win/t_eosymreg.dsp index 3ce164f95..ec9e3c1b9 100644 --- a/eo/win/t_eosymreg.dsp +++ b/eo/win/t_eosymreg.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp index 493b8e04f..48a8f413e 100644 --- a/eo/win/t_eovector.dsp +++ b/eo/win/t_eovector.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eovirus.dsp b/eo/win/t_eovirus.dsp index 6156f7a21..47f2cd161 100644 --- a/eo/win/t_eovirus.dsp +++ b/eo/win/t_eovirus.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_mge-control.dsp b/eo/win/t_mge-control.dsp index 337953fa9..83411f37c 100644 --- a/eo/win/t_mge-control.dsp +++ b/eo/win/t_mge-control.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_mge.dsp b/eo/win/t_mge.dsp index f7f926893..69347644a 100644 --- a/eo/win/t_mge.dsp +++ b/eo/win/t_mge.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_mge - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_mge1bit.dsp b/eo/win/t_mge1bit.dsp index b32e48ff0..44109bbaf 100644 --- a/eo/win/t_mge1bit.dsp +++ b/eo/win/t_mge1bit.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF From 7c04fc5de1e1d7302e8f80fcfc50bed579b96eb6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 18 Nov 2001 06:54:13 +0000 Subject: [PATCH 0707/2134] Added the names of the directories where the newly created files are stored. --- eo/win/Readme | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/win/Readme b/eo/win/Readme index 2f645c46f..7395bc440 100644 --- a/eo/win/Readme +++ b/eo/win/Readme @@ -14,3 +14,7 @@ es.dsp ... src/es and one additional DSP file for each program in test dir. +The libraries are created in src/win/lib directory. +The objects and executable files are created in src/win/DEBUG +directory. + From a8c554710f22e2fe4e286a745ecdc9014c12bde2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 18 Nov 2001 07:18:11 +0000 Subject: [PATCH 0708/2134] Introductory comment evolves ... --- eo/tutorial/html/eoTutorial.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 17451deab..a7c3ec6a0 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -18,7 +18,14 @@ and to EO Tutorial

      Version 0.96 - Nov. 12 2001 -
      Nothing new in this version of the tutorial since Lesson4, that includes a user guide of fully operational program for bitstrings and real-valued with full support of ES self-adaptive mutation strategies. But EO keeps advancing: for instance, this snapshot now compiles in MSVC++ v. 6.0
      +
      Nothing really new in this + version of the tutorial since +Lesson4, that includes a user guide of + fully operational program for bitstrings and real-valued with + full support of ES self-adaptive mutation strategies. But EO + itself keeps advancing: for instance, this snapshot now +compiles in MSVC++ v. 6.0 +

      Welcome to EO tutorial/on-line documentation.

      Please note that this tutorial is not supposed From 9bda49ae057f8eee42e08555e511ae8c4ba91ca0 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 22 Nov 2001 15:01:11 +0000 Subject: [PATCH 0709/2134] Fixed a small problem with eoPointMutation. --- eo/src/gp/eoParseTreeOp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/eoParseTreeOp.h b/eo/src/gp/eoParseTreeOp.h index 1af31add9..f739d14ef 100644 --- a/eo/src/gp/eoParseTreeOp.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -181,7 +181,7 @@ public: { j = rng.random(initializor.size()); - }while ((initializor[j].arity() != arity) && (_eo1[i] != initializor[j])); + }while ((initializor[j].arity() != arity)); _eo1[i] = initializor[j]; From 00f1a250003100792749977aad4686b593d2779c Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 06:53:52 +0000 Subject: [PATCH 0710/2134] Removed the trailing comment after #endif (Warning in MSVC) --- eo/src/eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eo b/eo/src/eo index cdab6e9d5..9839c1adb 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -124,7 +124,7 @@ //----------------------------------------------------------------------------- -#endif _eo_ +#endif // Local Variables: // mode: C++ From 4a90509051a141272b0bd51ecb17f230ace8fde1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 06:56:43 +0000 Subject: [PATCH 0711/2134] Removed dir win from list of subdirs (generated an error in make check) --- eo/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index a574de0cb..e72f40299 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = src test win app tutorial +SUBDIRS = src test app tutorial #Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user From eaf5ea0111a9a27b8e0d6a8521b45e568592ef17 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 06:59:17 +0000 Subject: [PATCH 0712/2134] Added links to some examples in the comments --- eo/src/utils/eoHowMany.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index e2c4bdf01..e0b24e561 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoMerge.h +// eoHowMany_h.h // Base class for choosing a number of guys to apply something from a popsize // (c) Marc Schoenauer, 2000 /* @@ -33,8 +33,13 @@ * the default value shoudl ALWAYS be true (eo_as_a_rate). * * this construct is mandatory because in some cases you might not know the - * population size that will enter the replacement for instance - so you - * cannot simply have a pre-computed (double) rate of 1/popSize if you want 1 guy + * population size that will enter the replacement. For instance, you + * cannot simply have a pre-computed (double) rate of 1/popSize + * if you want 1 guy + * + * Example use: in eoGeneralBreeder.h + * Example reading from parser: in + * do/make_algo_scalar.h line 141 */ class eoHowMany : public eoPersistent From 512d368dcf8cd4a3c8721155fcb830f7da35b06e Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 11:08:17 +0000 Subject: [PATCH 0713/2134] More details to make code MSVC-compatible --- eo/src/eoLinearFitScaling.h | 5 +++-- eo/test/t-eoPBIL.cpp | 2 +- eo/test/t-eoSelect.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h index 424ebda7c..998728a94 100644 --- a/eo/src/eoLinearFitScaling.h +++ b/eo/src/eoLinearFitScaling.h @@ -66,7 +66,8 @@ public: // average fitness double sum=0.0; - for (unsigned i=0; i(_pop[i].fitness()); double averageFitness = sum/pSize; @@ -75,7 +76,7 @@ public: double alpha = (pressure-1)/denom; double beta = (bestFitness - pressure*averageFitness)/denom; - for (unsigned i=0; i> foo; } - } #endif + } catch(exception& e) { cout << e.what() << endl; diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 05142eb69..771368085 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -61,9 +61,9 @@ void testSelectMany(eoSelect & _select, string _name) eoDummyPop parents(pSize); eoDummyPop offspring(0); - + unsigned i; // initialize parents - for (unsigned i=0; i & _select, string _name) // compute stats vector nb(parents.size(), 0); - for (unsigned i=0; i(offspring[i], parents); if (trouve == parents.size()) // pas trouve @@ -84,7 +84,7 @@ void testSelectMany(eoSelect & _select, string _name) // dump to file so you can plot using gnuplot string fName = _name + ".prop"; ofstream os(fName.c_str()); - for (unsigned i=0; i " << ( (double)nb[i])/offspring.size() << endl; os << i << " " << ( (double)nb[i])/offspring.size() << endl; From 2a1fded2541bc5a2215be3560159a275e91dacea Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 14:14:56 +0000 Subject: [PATCH 0714/2134] Added the 2 fake "projects" all_lib.dsp and all_test.dsp that allow to compile everything in 2 clics. However, we still cannot run and watch the status output of the test executables --- eo/win/all_lib.dsp | 92 +++++ eo/win/all_tests.dsp | 96 ++++++ eo/win/eo.dsw | 776 ++++++++++++++++++++++++------------------- 3 files changed, 623 insertions(+), 341 deletions(-) create mode 100644 eo/win/all_lib.dsp create mode 100644 eo/win/all_tests.dsp diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp new file mode 100644 index 000000000..ca41b2cd6 --- /dev/null +++ b/eo/win/all_lib.dsp @@ -0,0 +1,92 @@ +# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=all_lib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_lib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "all_lib - Win32 Release" +# Name "all_lib - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/eo/win/all_tests.dsp b/eo/win/all_tests.dsp new file mode 100644 index 000000000..49032a4d7 --- /dev/null +++ b/eo/win/all_tests.dsp @@ -0,0 +1,96 @@ +# Microsoft Developer Studio Project File - Name="all_tests" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=all_tests - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_tests.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_tests.mak" CFG="all_tests - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_tests - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "all_tests - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_tests - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "all_tests - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "all_tests - Win32 Release" +# Name "all_tests - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 33f7ceaf6..92808b3a4 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -1,341 +1,435 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "eo"=.\eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "es"=.\es.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ga"=.\ga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "utils"=.\utils.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - - -Project: "t_eoparetofitness"=.\t_eoparetofitness.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eopareto"=.\t_eopareto.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eofitness"=.\t_eofitness.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eorandom"=.\t_eorandom.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eovirus"=.\t_eovirus.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_mge"=.\t_mge.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_mge1bit"=.\t_mge1bit.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_mge-control"=.\t_mge-control.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eostateandparser"=.\t_eostateandparser.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eocheckpointing"=.\t_eocheckpointing.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eossga"=.\t_eossga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoexternaleo"=.\t_eoexternaleo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eosymreg"=.\t_eosymreg.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eo"=.\t_eo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoreplacement"=.\t_eoreplacement.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoselect"=.\t_eoselect.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eogenop"=.\t_eogenop.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoreal"=.\t_eoreal.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eoesall"=.\t_eoesall.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "t_eopbil"=.\t_eopbil.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "all_lib"=.\all_lib\all_lib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name eo + End Project Dependency + Begin Project Dependency + Project_Dep_Name es + End Project Dependency + Begin Project Dependency + Project_Dep_Name ga + End Project Dependency + Begin Project Dependency + Project_Dep_Name utils + End Project Dependency +}}} + +############################################################################### + +Project: "all_tests"=.\all_tests\all_tests.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name t_eo + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eobin + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eocheckpointing + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eoexternaleo + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eofitness + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eoga + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eogenop + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eopareto + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eoparetofitness + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eopbil + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eorandom + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eoreal + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eoreplacement + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eoselect + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eossga + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eostateandparser + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eosymreg + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eovector + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eovirus + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_mge + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_mge-control + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_mge1bit + End Project Dependency +}}} + +############################################################################### + +Project: "eo"=.\eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "es"=.\es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ga"=.\ga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eo"=.\t_eo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eobin"=.\t_eobin.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eocheckpointing"=.\t_eocheckpointing.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoesall"=.\t_eoesall.dsp - Package Owner=<4> + +############################################################################### + +Project: "t_eoexternaleo"=.\t_eoexternaleo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eofitness"=.\t_eofitness.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eogenop"=.\t_eogenop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eopareto"=.\t_eopareto.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoparetofitness"=.\t_eoparetofitness.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eopbil"=.\t_eopbil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eorandom"=.\t_eorandom.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoreal"=.\t_eoreal.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoreplacement"=.\t_eoreplacement.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eoselect"=.\t_eoselect.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eossga"=.\t_eossga.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eostateandparser"=.\t_eostateandparser.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eosymreg"=.\t_eosymreg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eovector"=.\t_eovector.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eovirus"=.\t_eovirus.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_mge"=.\t_mge.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_mge-control"=".\t_mge-control.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_mge1bit"=.\t_mge1bit.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "utils"=.\utils.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From 2aad10d347791814b187954578016d9afc1b3584 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 14:20:24 +0000 Subject: [PATCH 0715/2134] Added partial specialization of lt_arity .. --- eo/test/t-eoSymreg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 9ff3f3ec7..222a000d6 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -93,6 +93,16 @@ private : /// initializor static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNode::Min, SymregNode::Mult, SymregNode::PDiv}; // needed for intialization +// MSVC does not recognize the lt_arity in eoParseTreeDepthInit +// without this specialization ... +#ifdef _MSC_VER +template <> +bool lt_arity(const SymregNode &node1, const SymregNode &node2) +{ + return (node1.arity() < node2.arity()); +} +#endif + //----------------------------------------------------------- // saving, loading From d4b20d8833c7b2de3b9592cedb025a7f533297ae Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 14:31:35 +0000 Subject: [PATCH 0716/2134] MSVC didn't find (easily) the contrib/MGE dir. So now it's written in the code and the Makefile.am does not have contrib in the include look path --- eo/test/Makefile.am | 2 +- eo/test/t-MGE-control.cpp | 6 +++--- eo/test/t-MGE.cpp | 6 +++--- eo/test/t-MGE1bit.cpp | 6 +++--- eo/test/t-eoVirus.cpp | 5 +++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 338bef4c1..70223600a 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -8,7 +8,7 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/contrib +INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a CXXFLAGS = -g -Wall ############################################################################### diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index f34d0699d..c7d857d22 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -13,9 +13,9 @@ #include "RoyalRoad.h" // Viri -#include -#include -#include +#include "../contrib/MGE/VirusOp.h" +#include "../contrib/MGE/eoVirus.h" +#include "../contrib/MGE/eoInitVirus.h" //----------------------------------------------------------------------------- diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 387220ac7..4fd76f435 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -13,9 +13,9 @@ #include "RoyalRoad.h" // Viri -#include -#include -#include +#include "../contrib/MGE/VirusOp.h" +#include "../contrib/MGE/eoVirus.h" +#include "../contrib/MGE/eoInitVirus.h" //----------------------------------------------------------------------------- diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp index 356f7fd20..d6ab91e55 100644 --- a/eo/test/t-MGE1bit.cpp +++ b/eo/test/t-MGE1bit.cpp @@ -13,9 +13,9 @@ #include "RoyalRoad.h" // Viri -#include -#include -#include +#include "../contrib/MGE/VirusOp.h" +#include "../contrib/MGE/eoVirus.h" +#include "../contrib/MGE/eoInitVirus.h" //----------------------------------------------------------------------------- diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp index 65b39bdca..5ad4067f6 100644 --- a/eo/test/t-eoVirus.cpp +++ b/eo/test/t-eoVirus.cpp @@ -26,8 +26,9 @@ #include // cout #include // ostrstream, istrstream #include // general EO -#include // bitstring representation & operators -#include +#include "../contrib/MGE/VirusOp.h" +#include "../contrib/MGE/eoVirus.h" +#include "../contrib/MGE/eoInitVirus.h" #include #include "binary_value.h" From ea8c9ca9c3c99fba3401994d6f59e4bcb2fe1c05 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 16:28:30 +0000 Subject: [PATCH 0717/2134] Modified the path of include eoVirus because MSVC did not find it. Now it is assumed that src will be in the include search path, that's all. --- eo/contrib/MGE/VirusOp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/contrib/MGE/VirusOp.h b/eo/contrib/MGE/VirusOp.h index 246fdad34..b0ee6cba2 100644 --- a/eo/contrib/MGE/VirusOp.h +++ b/eo/contrib/MGE/VirusOp.h @@ -18,7 +18,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-05-17 10:08:25 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/VirusOp.h,v 1.1 2001-05-17 10:08:25 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2001-12-03 16:28:30 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/VirusOp.h,v 1.2 2001-12-03 16:28:30 evomarc Exp $ $Author: evomarc $ */ #ifndef VirusOp_h @@ -31,7 +31,7 @@ CVS Info: $Date: 2001-05-17 10:08:25 $ $Header: /home/nojhan/dev/eodev/eodev_cvs #include // string #include -#include +#include "../contrib/MGE/eoVirus.h" /** VirusBitFlip --> changes 1 bit */ From 08aae27088b3cf77a0c1fd287939ea72293866ec Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 16:35:51 +0000 Subject: [PATCH 0718/2134] Renamed gprop.cc into gprop.cpp for MSVC --- eo/app/gprop/Makefile.am | 2 +- eo/app/gprop/{gprop.cc => gprop.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eo/app/gprop/{gprop.cc => gprop.cpp} (100%) diff --git a/eo/app/gprop/Makefile.am b/eo/app/gprop/Makefile.am index eb87ebb5d..1a251c80f 100644 --- a/eo/app/gprop/Makefile.am +++ b/eo/app/gprop/Makefile.am @@ -16,7 +16,7 @@ CXXFLAGS = -g bin_PROGRAMS = gprop ############################################################################### -gprop_SOURCES = gprop.cc +gprop_SOURCES = gprop.cpp gprop_DEPENDENCIES = $(DEPS) gprop_LDFLAGS = -lm gprop_LDADD = $(LDADDS) diff --git a/eo/app/gprop/gprop.cc b/eo/app/gprop/gprop.cpp similarity index 100% rename from eo/app/gprop/gprop.cc rename to eo/app/gprop/gprop.cpp From 8847dc3c509c966035489258bb5a3df371a07baa Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 16:38:52 +0000 Subject: [PATCH 0719/2134] Renamed main.cc into main.cpp for MSVC --- eo/app/gpsymreg/Makefile.am | 2 +- eo/app/gpsymreg/{main.cc => main.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eo/app/gpsymreg/{main.cc => main.cpp} (100%) diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am index 338f1492e..a3877197d 100644 --- a/eo/app/gpsymreg/Makefile.am +++ b/eo/app/gpsymreg/Makefile.am @@ -17,7 +17,7 @@ bin_PROGRAMS = gpsymreg ############################################################################### -gpsymreg_SOURCES = main.cc +gpsymreg_SOURCES = main.cpp gpsymreg_DEPENDENCIES = $(DEPS) gpsymreg_LDFLAGS = -lm gpsymreg_LDADD = $(LDADDS) diff --git a/eo/app/gpsymreg/main.cc b/eo/app/gpsymreg/main.cpp similarity index 100% rename from eo/app/gpsymreg/main.cc rename to eo/app/gpsymreg/main.cpp From d491c193e2c0c3ca645ae600387c2dfc7e21f214 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 3 Dec 2001 16:40:32 +0000 Subject: [PATCH 0720/2134] Renamed mastermind.cc into mastermind.cpp for MSVC --- eo/app/mastermind/Makefile.am | 2 +- eo/app/mastermind/{mastermind.cc => mastermind.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eo/app/mastermind/{mastermind.cc => mastermind.cpp} (100%) diff --git a/eo/app/mastermind/Makefile.am b/eo/app/mastermind/Makefile.am index 621733f0e..d43be627f 100644 --- a/eo/app/mastermind/Makefile.am +++ b/eo/app/mastermind/Makefile.am @@ -17,7 +17,7 @@ bin_PROGRAMS = mastermind ############################################################################### -mastermind_SOURCES = mastermind.cc +mastermind_SOURCES = mastermind.cpp mastermind_DEPENDENCIES = $(DEPS) mastermind_LDFLAGS = -lm mastermind_LDADD = $(LDADDS) diff --git a/eo/app/mastermind/mastermind.cc b/eo/app/mastermind/mastermind.cpp similarity index 100% rename from eo/app/mastermind/mastermind.cc rename to eo/app/mastermind/mastermind.cpp From 61ea207287a2fc42ae0bedfe5c0b24d08602e10c Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 4 Dec 2001 11:49:25 +0000 Subject: [PATCH 0721/2134] a different solution for lt_arity has been implemented (this time inside the eoParseTreeDepthInit class --- eo/src/gp/eoParseTreeDepthInit.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index dfefacf77..ccdfa460b 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -36,13 +36,6 @@ using namespace gp_parse_tree; using namespace std; -// we need this for sorting the initializor vector -template -bool lt_arity(const Node &node1, const Node &node2) -{ - return (node1.arity() < node2.arity()); -} - /** eoParseTreeDepthInit : the initializer class for eoParseTree \class eoParseTreeDepthInit eoParseTreeDepthInit.h gp/eoParseTreeDepthInit.h \ingroup ParseTree @@ -54,6 +47,14 @@ bool lt_arity(const Node &node1, const Node &node2) template class eoParseTreeDepthInit : public eoInit< eoParseTree > { + protected: + // a binary predicate for sorting + // hopefully this will work with M$VC++ 6.0 + struct lt_arity:public binary_function + { + bool operator()(const Node &_node1, const Node &_node2) { return (_node1.arity() < _node2.arity());}; + }; + public : typedef eoParseTree EoType; @@ -80,7 +81,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > } // lets sort the initializor vector according to arity (so we can be sure the terminals are in front) // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j - stable_sort(initializor.begin(), initializor.end(), lt_arity); + stable_sort(initializor.begin(), initializor.end(), lt_arity()); } /// My class name virtual string className() const { return "eoParseTreeDepthInit"; }; From 7abbf595f71c38553ef7c1816819ec7ccbe41deb Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 4 Dec 2001 21:15:16 +0000 Subject: [PATCH 0722/2134] some template classes and functions which did not need to be templates have been changed to normal classes and functions with hard coded typed This might help with M$VC++ 6.0 compatibility --- eo/app/gpsymreg/fitness.h | 17 ++++++++--------- eo/app/gpsymreg/main.cpp | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h index d022e84c7..b7a34439f 100644 --- a/eo/app/gpsymreg/fitness.h +++ b/eo/app/gpsymreg/fitness.h @@ -95,8 +95,7 @@ double _negate(double arg1) // now let's define our tree nodes -template -void init(vector &initSequence) +void init(vector &initSequence) { // we have only one variable (X) @@ -162,12 +161,12 @@ void init(vector &initSequence) }; -template -class RegFitness: public eoEvalFunc< eoParseTree > + +class RegFitness: public eoEvalFunc< eoParseTree > { public: - typedef eoParseTree EoType; + typedef eoParseTree EoType; void operator()(EoType &_eo) { @@ -175,7 +174,7 @@ class RegFitness: public eoEvalFunc< eoParseTree > vector< double > input(1); // the input variable(s) double output; double target; - FType fitness; + FitnessType fitness; float x=0; @@ -205,9 +204,9 @@ class RegFitness: public eoEvalFunc< eoParseTree > - RegFitness(eoValueParam &_generationCounter, vector< TreeNode > &initSequence, Parameters &_parameter) : eoEvalFunc(), generationCounter(_generationCounter), parameter(_parameter) + RegFitness(eoValueParam &_generationCounter, vector< Node > &initSequence, Parameters &_parameter) : eoEvalFunc(), generationCounter(_generationCounter), parameter(_parameter) { - init(initSequence); + init(initSequence); best[NORMAL] = 1000; tree= "not found"; }; @@ -221,7 +220,7 @@ class RegFitness: public eoEvalFunc< eoParseTree > private: eoValueParam &generationCounter; // so we know the current generation Parameters ¶meter; // the parameters - FType best; // the best found fitness + FitnessType best; // the best found fitness string tree; }; diff --git a/eo/app/gpsymreg/main.cpp b/eo/app/gpsymreg/main.cpp index ee4c29433..e5e8f0f62 100644 --- a/eo/app/gpsymreg/main.cpp +++ b/eo/app/gpsymreg/main.cpp @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) // create an instantiation of the fitness/evaluation function // it initializes the initSequence vector // the parameters are passed on as well - RegFitness eval(generationCounter, initSequence, parameter); + RegFitness eval(generationCounter, initSequence, parameter); // Depth Initializor, defaults to grow method. eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence); From 04ab952760dfeec8449e2d9b5c18622636e7c35e Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 5 Dec 2001 06:54:38 +0000 Subject: [PATCH 0723/2134] Added GNUPLOT protection for MSVC compiler --- eo/app/gpsymreg/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/app/gpsymreg/main.cpp b/eo/app/gpsymreg/main.cpp index e5e8f0f62..5d217adf8 100644 --- a/eo/app/gpsymreg/main.cpp +++ b/eo/app/gpsymreg/main.cpp @@ -126,6 +126,7 @@ int main(int argc, char *argv[]) checkPoint.add(avg); checkPoint.add(best); +#if !defined(NO_GNUPLOT) eoGnuplot1DMonitor gnuplotmonitor("gnuplotBestStats"); gnuplotmonitor.add(generationCounter); gnuplotmonitor.add(best); @@ -142,7 +143,7 @@ int main(int argc, char *argv[]) checkPoint.add(gnuplotmonitor); checkPoint.add(gnuplotAvgmonitor); - +#endif // GP Generation eoEasyEA gp(checkPoint, eval, select, transform, replace); From de1ae17ea86a8d971ee17910c97f65ba5fc57eeb Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 06:38:17 +0000 Subject: [PATCH 0724/2134] CHanged a few erroneaous comments --- eo/src/eoPopulator.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index c2eed79e2..7ca1895de 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -116,7 +116,7 @@ public : bool exhausted(void) { return current == dest.end(); } /** the pure virtual selection method - will be instanciated in - * eoSeqPopulator and eoPropPopulator + * eoSeqPopulator and eoSelectivePopulator */ virtual const EOT& select() = 0; @@ -154,6 +154,7 @@ public : eoSeqPopulator(const eoPop& _pop, eoPop& _dest) : eoPopulator(_pop, _dest), current(0) {} + /** the select method simply returns next individual in the src pop */ const EOT& select(void) { if (current >= src.size()) @@ -183,6 +184,7 @@ public : sel.setup(_pop); } + /** the select method actually selects one guy from the src pop */ const EOT& select() { return sel(src); From 6dcc949ee59fd78acfd665a6483099ef37a865c9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 06:44:44 +0000 Subject: [PATCH 0725/2134] A few corrections before the big name change --- eo/tutorial/html/eoLesson1.html | 2 +- eo/tutorial/html/eoOperators.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 9bc772770..28ec5e87d 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -219,7 +219,7 @@ operator). Evolution engine: The selection/replacement mechanism (Bit - Real) is a simple generational -GA here: a simple selector, and a generational replacement. The eoDetTournament +GA here: a simple selector, and a generational replacement. The eoDetTournamentSelect has been chosen as a robust selection, and the generational replacement (all parents are replaced by the offspring) is hard-coded in the eoSGA algorithm. diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index b95b61797..0e65fb2b6 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -103,8 +103,8 @@ variation operators can be combined into the corresponding eoProportionalCombinedQuadOp. The general operators eoGenOp can be combined into some eoOpContainer, -abstract class with two implementations, eoProportionalOpContainer -and eoSequentialOpContainer +abstract class with two implementations, eoProportionalOp +and eoSequentialOp

    • Related classes: General operators From 866ef81d43a42358c018917e5daed2a5193a2171 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 07:02:07 +0000 Subject: [PATCH 0726/2134] Changed ALL names of links to class files in the documentation due to the change in Doxygen naming convention --- eo/tutorial/html/eoCheckPoint.html | 4 ++-- eo/tutorial/html/eoEngine.html | 16 +++++++------- eo/tutorial/html/eoLesson1.html | 26 +++++++++++----------- eo/tutorial/html/eoLesson2.html | 10 ++++----- eo/tutorial/html/eoLesson3.html | 6 ++--- eo/tutorial/html/eoOperators.html | 34 ++++++++++++++--------------- eo/tutorial/html/eoProgramming.html | 24 ++++++++++---------- 7 files changed, 60 insertions(+), 60 deletions(-) diff --git a/eo/tutorial/html/eoCheckPoint.html b/eo/tutorial/html/eoCheckPoint.html index 49dd8d991..fe1b4f24b 100644 --- a/eo/tutorial/html/eoCheckPoint.html +++ b/eo/tutorial/html/eoCheckPoint.html @@ -58,7 +58,7 @@ and the interface for its operator() is bool operator()(const eoPop<EOT>& ) -

      which you could have guessed from the inheritance +

      which you could have guessed from the inheritance diagram for class eoContinue, as you see there that eoContinue derives from class eoUF<const eoPop<EOT>&, @@ -88,7 +88,7 @@ when the stopping criterion is met!

    • Existing continuators: Of course you can find out all existing (non-virtual!) subclasses of eoContinue -by looking at its  inheritance +by looking at its  inheritance diagram. But you might find it more convenient to have them listed here:
        diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 35ae194c1..1b6cf46ec 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -66,7 +66,7 @@ is

        const EOT & operator()(const eoPop<EOT>& _parents) -

        which you could have guessed from the inheritance tree for class eoSelectOne., +

        which you could have guessed from the inheritance tree for class eoSelectOne., as you see there that eoSelectOne derives from class eoUF<const eoPop<EOT>&, const EOT&>. @@ -114,7 +114,7 @@ for its

        void operator()(const eoPop<EOT>& _source, eoPop<EOT>& _dest) -

        which you could have guessed from the inheritance tree for class eoSelect., +

        which you could have guessed from the inheritance tree for class eoSelect., as you see there that eoSelect derives from class eoBF<const eoPop<EOT>&, eoPop<EOT>&, void>. @@ -208,7 +208,7 @@ is

        void operator()(eoPop<EOT>& _parents, eoPop<EOT>& _offspring) -

        which you could have guessed from the inheritance tree for class eoReplacement., +

        which you could have guessed from the inheritance tree for class eoReplacement., as you see there that eoReplacement derives from class eoBF<eoPop<EOT>&, eoPop<EOT>&, void>. @@ -234,7 +234,7 @@ that offspring and parents are of the same size (but does not check!). This is one the basic types of replacement in EO. It has two major steps, merging both populations of parents and offspring, and reducing -this big population to the right size. It contains +this big population to the right size. It contains two objects of respective types eoMerge and eoReduce and you can probably guess what each of them actually does :-) @@ -506,7 +506,7 @@ is

        void operator()(const eoPop<EOT>& _parents, eoPop<EOT>& _offspring) -

        which you could have guessed from the inheritance tree for class eoMerge, +

        which you could have guessed from the inheritance tree for class eoMerge, as you see there that eoMerge derives from
        class eoBF<const eoPop<EOT>&, eoPop<EOT>&, void>. @@ -540,7 +540,7 @@ is

        void operator()(eoPop<EOT>& _parents, unsigned int new_size) -

        which you could have guessed from the inheritance tree for class eoReduce, +

        which you could have guessed from the inheritance tree for class eoReduce, as you see there that eoReduce derives from
        class eoBF<eoPop<EOT>&, unsigned int, void>. @@ -610,7 +610,7 @@ is

        unsigned int operator()(unsigned int _pop_size)

        -

        which you could have guessed from the inheritance tree for class eoHowMany, +

        which you could have guessed from the inheritance tree for class eoHowMany, as you see there that eoHowMany derives from
        class eoUF<unsigned int, unsigned int>. @@ -641,7 +641,7 @@ is

        void operator()(eoPop<EOT>& _source, eoPop<EOT>& _dest) -

        which you could have guessed from the inheritance tree for class eoSurviveAndDie, +

        which you could have guessed from the inheritance tree for class eoSurviveAndDie, as you see there that eoSurviveAndDie derives from class eoBF<eoPop<EOT>&, eoPop<EOT>&, void>. diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 28ec5e87d..7dce49a0c 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -111,7 +111,7 @@ the representation-dependent file ga. containing the bitstring representation and operators. More details about what is available for bitstrings here.
        -You then say that you will be handling Bitstring +You then say that you will be handling Bitstring genotypes, whose fitness is a double. This makes Indi derive from the STL class vector<bool> @@ -121,7 +121,7 @@ the representation-dependent file es. containing the bitstring representation and operators. More details about what is available for real-values here.
        -You then say that you will be handling Real-valued +You then say that you will be handling Real-valued genotypes, whose fitness is a double. This makes Indi derive from the STL class vector<double> @@ -191,12 +191,12 @@ vector v.

        @@ -209,7 +209,7 @@ individuals are first, and display it. Note that an eoPop has a os << pop streams the pop onto the ostream os. -This is true for all objects of of class eoPrintable +This is true for all objects of of class eoPrintable (most EO objects) through the method printOn (which is then called by the << operator). @@ -230,8 +230,8 @@ has been chosen as a robust selection, and the generational replacement in the simple algorithm considered here, individuals undergo crossover and mutation. In EO, these operators are (functor) -objects of class eoQuadOp -(binary operator that modifies both its arguments) and eoMonOp +objects of class eoQuadOp +(binary operator that modifies both its arguments) and eoMonOp (unary operator).  These operators are applied in turn to all selected parents, according to user-defined probabilities.  These probabilities are defined with all other parameters, and will @@ -242,8 +242,8 @@ corresponding pages, or to their respective documentation pages.
         
        • -Bit The crossover eo1PtBitXover -is the standard 1-point crossover, and eoBitMutation +Bit The crossover eo1PtBitXover +is the standard 1-point crossover, and eoBitMutation is the standard bit-flip mutation that randomly flips all bits with a given probability P_MUT_PER_BIT.
        • @@ -259,10 +259,10 @@ bit, which is specific of the bit-flip mutation.  Hence, to run the same algorithm as Goldberg's SGA, the mutation probability (at individual level) is 1, and the probability of flipping each bit is P_MUT_PER_BIT.
        • -Real The crossover eoSegmentCrossover +Real The crossover eoSegmentCrossover is the standard segment crossover for real-valued vectors, that chooses a point randomly on the segment between both parents -(also termed BLX-0). eoUniformMutation +(also termed BLX-0). eoUniformMutation is the uniform mutation for real-valued vectors that chooses a new value for each variable uniformly on an interval centered on the parent value. The width of the interval is an internal @@ -275,7 +275,7 @@ parameter of the object, here called EPSILON.
        • Specify a
          maximum number of generations to run (Bit - Real): the simplest of all stopping criteria at the moment, using an object of -a sub-class of class eoContinue. +a sub-class of class
          eoContinue.
           
        • @@ -388,7 +388,7 @@ give bad results!
        • select;
        Note that all these classes of eoObjects are derived from the abstract class -eoSelectOne. +eoSelectOne. To find out exactly how each procedure selects the individuals, read the corresponding component-based page.

        diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 9d8b75e63..5204e4b40 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -110,7 +110,7 @@ on a boolean generator or a random_generators.h) that is then used in the constructor of the population to build the individuals. You can also use different initializers and call them in turn through the -call to pop.append() function +call to pop.append() function (see Exercise 2).
          @@ -133,10 +133,10 @@ choosing among them according to rates.
        The class eoPropCombinedxxxOp, where -xxx is either Mon (for mutations, of class eoMonOp) -or Quad (for crossovers, of class eoQuadOp), +xxx is either Mon (for mutations, of class eoMonOp) +or Quad (for crossovers, of class eoQuadOp), is derived from the corresponding eoxxxOp class. When applying the eoPropCombinedxxxOp, -one of the eoxxxOp it contains is chosen by a roulette +one of the eoxxxOp it contains is chosen by a roulette wheel, according to their respective rates, and is applied to the arguments. For more details on these classes, go to the algorithm-based corresponding pages, or to their respective documentation pages. @@ -240,7 +240,7 @@ to select one individual from a population, its ope returning a single individual) into an object of the eoSelectPerc (perc stands for percentage) which allows to select a ... percentage of a population (his operator()  -returns a population). This was done internally in the  constructor +returns a population). This was done internally in the  constructor of eoSGA  - see lesson1.


      Exercise diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index 46e2e89f4..5213ec9ae 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -130,7 +130,7 @@ you want to handle (i.e. iinteger, double, yourPrivateClass, ...). In this lesson, we will not go into details: e.g. we will not tell you that the -eoValueParam +eoValueParam is actually a templatized sub-class of abstract class eoParam (oops, I said it!), nor will we deal with parameters outside their use from an eoParser. See the parameter section of the Component-Based tutorial, or wait until @@ -267,7 +267,7 @@ class. eoStateeoObjects
      that have both an input method (readFrom) and an output method (printOn), -i.e. that derive from the base class eoPersistent. +i.e. that derive from the base class eoPersistent. You must first register object into a state, and can then save them to a (text) file, and later read them from that file using the load @@ -319,7 +319,7 @@ compute whatever is needed over that population. templatized over the type of what they compute (e.g. double, or pair<double>, -or ...). But looking at the inheritance +or ...). But looking at the inheritance diagram of the eoStat class, you find that eoStat objects are also eoValueParam diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index 0e65fb2b6..8884adaae 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -87,29 +87,29 @@ the genotype argument has been modified or not. @@ -122,8 +122,8 @@ former type (2 --> 2) is termed quadratic crossover operator, and is implemanted in the eoQuadOp class; the latter type (2 --> 1) is termed binary operator and is implemanted in class eoBinOp. Both classes are, as usual, templatized by the type of individual they -can handle (see documentation for eoBinOp -and eoQuadOp). +can handle (see documentation for eoBinOp +and eoQuadOp).

      Note: Whereas it is straightforward to create a binary crossover operator from a quadratic one (by discarding the changes on the second parent), the reverse might prove impossible (imagine @@ -207,7 +207,7 @@ operators: MutationMutation operators modify one single individual. The corresponding EO class is called eoMonOp. and it si as usual templatized by the type of individual it can handle (see documentation -for eoMonOp). +for eoMonOp).

      Interfaces:
      The general approach in EO about simple variation operators is to perform in-place @@ -280,7 +280,7 @@ ways to get the parents they will involve, e.g. they can use a different selector for each of the parents they need to select.

      The corresponding EO class is called eoGenOp. and it is as usual templatized by the type of individual it can handle -(see documentation for eoGenOp +(see documentation for eoGenOp :-)

      Interface:
      All the work a general operator is done within the apply() @@ -504,7 +504,7 @@ mainly behaves like an iterator over a population (hence the name, Population-Iterator).

      The basic interface of an eoPopulator -(see also the documentation, +(see also the documentation, of course) is the following:

      • diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index b5bca2866..cec3d95ba 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -71,12 +71,12 @@ a hierarchy of functions with defaults behaviors and specialized sub-functions ...
      -Functors are so intimately linked to EO that a base class (eoFunctorBase) +Functors are so intimately linked to EO that a base class (eoFunctorBase) has been designed to hold all functors. This base class is itself divided into three derived class. These classes tell you immediately what kind of arguments the operator() method requires and what kind of result it produces. See EO -conventions, and the inheritance +conventions, and the inheritance diagram of class eoFunctorBase.
      For a more complete introduction to functors, with detailed discussion, go to the STL @@ -118,7 +118,7 @@ method.
      is for arity-zero functors, i.e.  their
      operator() method does not require any argument. It has a single template parameter, the return type of the operator() -method. For instance,  eoMonitor  +method. For instance,  eoMonitor  are eoF's that return an eoMonitor &. @@ -127,7 +127,7 @@ that return an
      eoMonitor &operator() method requires one argument. It has two template parameters, the type of the argument and the return type of the operator() -method. For instance,  eoMonOp's +method. For instance,  eoMonOp's are eoUF's that take as argument an EOT & and return void @@ -138,14 +138,14 @@ and return voidoperator()
      method requires two arguments. It has three template parameters, the types of the arguments and the return type of the operator() -method. For instance,  eoBinOp's +method. For instance,  eoBinOp's are eoBF's that take as arguments a const EOT & and an EOT &, and return void .
    -Now go back to the inheritance +Now go back to the inheritance diagram of class eoFunctorBase, and guess the interface for all functors!

    Note: for @@ -153,7 +153,7 @@ obvious simplicity reasons, we very often omit the reference to the

    • -eoMonOp's +eoMonOp's are eoUF's that take as argument an EOT & and return void
    • @@ -161,7 +161,7 @@ and return void it actually means
      • -eoMonOp's +eoMonOp's are eoUF's, their operator() method takes as argument an EOT & @@ -334,8 +334,8 @@ related number, e.g. calling time(0), as done for instance in different probability distribution -(e.g. floating point following normal -distribution). See the complete +(e.g. floating point following normal +distribution). See the complete list of RNG primitives.

        EO also provides random_generators that can be used in STL call to generate series of random numbers, as in @@ -388,8 +388,8 @@ above).

      • The name of the EO template should be EOT. This allows quick understanding of the inheritance diagrams for functors. and immediate perception of the arguments and return types of the functors oeprator() -method (as in eoMonOp -or  eoBinOp). +method (as in eoMonOp +or  eoBinOp).
         
      • From 82750f22d517bf26f3eaddee27d966b50c9988b5 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 11:36:39 +0000 Subject: [PATCH 0727/2134] Removed some sources that came here nobody know's how (thanks, MSDEV) --- eo/win/eo.dsp | 327 +++++++++++++++++++++----------------------------- 1 file changed, 135 insertions(+), 192 deletions(-) diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 8f6f2dbf0..552fbe176 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,192 +1,135 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\eod.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eod.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoObject.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eod.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoCtrlCContinue.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File + + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoCtrlCContinue.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoFunctorStore.H +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# End Group +# End Target +# End Project From bd42e7567244fcbfd0cbbc9ff0bbc0a3dd75c973 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 13:12:24 +0000 Subject: [PATCH 0728/2134] Removed unnecessary dirs, added first Lesson of tutorial --- eo/win/eo.dsw | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 92808b3a4..6b3a2ef3e 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "all_lib"=.\all_lib\all_lib.dsp - Package Owner=<4> +Project: "all_lib"=.\all_lib.dsp - Package Owner=<4> Package=<5> {{{ @@ -27,7 +27,7 @@ Package=<4> ############################################################################### -Project: "all_tests"=.\all_tests\all_tests.dsp - Package Owner=<4> +Project: "all_tests"=.\all_tests.dsp - Package Owner=<4> Package=<5> {{{ @@ -177,10 +177,6 @@ Package=<4> ############################################################################### -Project: "t_eoesall"=.\t_eoesall.dsp - Package Owner=<4> - -############################################################################### - Project: "t_eoexternaleo"=.\t_eoexternaleo.dsp - Package Owner=<4> Package=<5> @@ -409,6 +405,18 @@ Package=<4> ############################################################################### +Project: "tut_1_bit"=.\tut_1_bit.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "utils"=.\utils.dsp - Package Owner=<4> Package=<5> From b5a4afe8faa7a3827d13d8bdd97334b007c5f8fb Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 14:32:00 +0000 Subject: [PATCH 0729/2134] Removed unknown CrtDebug directives from the MSVC version --- eo/tutorial/Lesson1/FirstBitGA.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index 23bce2cb5..710f9b78c 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -149,13 +149,6 @@ void main_function(int argc, char **argv) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif try { From aa67e7d58dd690c98c8a4ad3bd68d24a61f3d8ce Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 6 Dec 2001 14:33:42 +0000 Subject: [PATCH 0730/2134] Need to put the \r\n at end of all files after modifications!!! --- eo/win/all_lib.dsp | 1 + eo/win/all_tests.dsp | 1 + eo/win/eo.dsp | 262 ++++++++++++++++------------------ eo/win/eo.dsw | 30 ++++ eo/win/es.dsp | 1 + eo/win/ga.dsp | 1 + eo/win/t_eo.dsp | 205 +++++++++++++------------- eo/win/t_eobin.dsp | 205 +++++++++++++------------- eo/win/t_eocheckpointing.dsp | 205 +++++++++++++------------- eo/win/t_eoes.dsp | 205 +++++++++++++------------- eo/win/t_eoexternaleo.dsp | 205 +++++++++++++------------- eo/win/t_eofitness.dsp | 205 +++++++++++++------------- eo/win/t_eoga.dsp | 205 +++++++++++++------------- eo/win/t_eogenop.dsp | 205 +++++++++++++------------- eo/win/t_eopareto.dsp | 205 +++++++++++++------------- eo/win/t_eoparetofitness.dsp | 205 +++++++++++++------------- eo/win/t_eoparetoftness.dsp | 205 +++++++++++++------------- eo/win/t_eopbil.dsp | 205 +++++++++++++------------- eo/win/t_eorandom.dsp | 205 +++++++++++++------------- eo/win/t_eoreal.dsp | 205 +++++++++++++------------- eo/win/t_eoreplacement.dsp | 205 +++++++++++++------------- eo/win/t_eoselect.dsp | 205 +++++++++++++------------- eo/win/t_eossga.dsp | 205 +++++++++++++------------- eo/win/t_eostateandparser.dsp | 205 +++++++++++++------------- eo/win/t_eosymreg.dsp | 205 +++++++++++++------------- eo/win/t_eovector.dsp | 205 +++++++++++++------------- eo/win/t_eovirus.dsp | 205 +++++++++++++------------- eo/win/t_mge-control.dsp | 205 +++++++++++++------------- eo/win/t_mge.dsp | 205 +++++++++++++------------- eo/win/t_mge1bit.dsp | 205 +++++++++++++------------- eo/win/utils.dsp | 1 + 31 files changed, 2634 insertions(+), 2583 deletions(-) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index ca41b2cd6..4b4392c1f 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -90,3 +90,4 @@ LIB32=link.exe -lib # End Group # End Target # End Project +˙ \ No newline at end of file diff --git a/eo/win/all_tests.dsp b/eo/win/all_tests.dsp index 49032a4d7..4a2a3ac78 100644 --- a/eo/win/all_tests.dsp +++ b/eo/win/all_tests.dsp @@ -94,3 +94,4 @@ LINK32=link.exe # End Group # End Target # End Project +˙ \ No newline at end of file diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 552fbe176..f8a449b9b 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,135 +1,127 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\eod.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eod.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoCtrlCContinue.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File - - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoCtrlCContinue.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoFunctorStore.H -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "eo___Win32_Debug" +# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eod.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.H +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# End Group +# End Target +# End Project +˙ diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 6b3a2ef3e..e618ea7d8 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -102,6 +102,23 @@ Package=<4> Project_Dep_Name t_mge1bit End Project Dependency }}} +############################################################################### + +Project: "all_tut"=.\all_tut.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name tut_1_bit + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_1_real + End Project Dependency +}}} ############################################################################### @@ -441,3 +458,16 @@ Package=<3> ############################################################################### + +Project: "tut_1_real"=.\tut_1_real.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### +˙ \ No newline at end of file diff --git a/eo/win/es.dsp b/eo/win/es.dsp index f8c38c9fc..5efb35556 100644 --- a/eo/win/es.dsp +++ b/eo/win/es.dsp @@ -232,3 +232,4 @@ SOURCE=..\src\es\make_real.h # End Group # End Target # End Project +˙ \ No newline at end of file diff --git a/eo/win/ga.dsp b/eo/win/ga.dsp index e07289a89..564169f3f 100644 --- a/eo/win/ga.dsp +++ b/eo/win/ga.dsp @@ -152,3 +152,4 @@ SOURCE=..\src\ga\make_op.h # End Group # End Target # End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eo.dsp b/eo/win/t_eo.dsp index 8a2775453..6d0af0670 100644 --- a/eo/win/t_eo.dsp +++ b/eo/win/t_eo.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eo___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eo - Win32 Release" -# Name "t_eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eo.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eo - Win32 Release" +# Name "t_eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eo.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index 72f6feaee..1a31b5ca9 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobin - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobin - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobin___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eobin - Win32 Release" -# Name "t_eobin - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobin.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobin___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eobin - Win32 Release" +# Name "t_eobin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobin.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eocheckpointing.dsp b/eo/win/t_eocheckpointing.dsp index 890455811..f4f32e143 100644 --- a/eo/win/t_eocheckpointing.dsp +++ b/eo/win/t_eocheckpointing.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eocheckpointing - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eocheckpointing.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eocheckpointing - Win32 Release" -# Name "t_eocheckpointing - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoCheckpointing.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eocheckpointing - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eocheckpointing - Win32 Release" +# Name "t_eocheckpointing - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoCheckpointing.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoes.dsp b/eo/win/t_eoes.dsp index fafebdf22..1ef8f9905 100644 --- a/eo/win/t_eoes.dsp +++ b/eo/win/t_eoes.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoes" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoes - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoes.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoes.mak" CFG="t_eoes - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoes - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoes - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoes - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoes - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoes___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoes___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoes - Win32 Release" -# Name "t_eoes - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESAll.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoes" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoes - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoes.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoes.mak" CFG="t_eoes - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoes - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoes - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoes - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoes - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoes___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoes___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoes - Win32 Release" +# Name "t_eoes - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESAll.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoexternaleo.dsp b/eo/win/t_eoexternaleo.dsp index 33cc3ee92..05d039a57 100644 --- a/eo/win/t_eoexternaleo.dsp +++ b/eo/win/t_eoexternaleo.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoexternaleo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoexternaleo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoexternaleo - Win32 Release" -# Name "t_eoexternaleo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoExternalEO.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoexternaleo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoexternaleo - Win32 Release" +# Name "t_eoexternaleo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoExternalEO.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp index ea5ca4ac7..d8d15fac1 100644 --- a/eo/win/t_eofitness.dsp +++ b/eo/win/t_eofitness.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eofitness - Win32 Release" -# Name "t_eofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eofitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eofitness - Win32 Release" +# Name "t_eofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eofitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoga.dsp b/eo/win/t_eoga.dsp index a0c288803..a1db31a3d 100644 --- a/eo/win/t_eoga.dsp +++ b/eo/win/t_eoga.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoga - Win32 Release" -# Name "t_eoga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoga - Win32 Release" +# Name "t_eoga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eogenop.dsp b/eo/win/t_eogenop.dsp index 2f0dda434..8c8bb75fb 100644 --- a/eo/win/t_eogenop.dsp +++ b/eo/win/t_eogenop.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eogenop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eogenop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eogenop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eogenop - Win32 Release" -# Name "t_eogenop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGenOp.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eogenop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eogenop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eogenop - Win32 Release" +# Name "t_eogenop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGenOp.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eopareto.dsp b/eo/win/t_eopareto.dsp index fa3cb9839..1f6e64b59 100644 --- a/eo/win/t_eopareto.dsp +++ b/eo/win/t_eopareto.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eopareto - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eopareto.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eopareto - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eopareto - Win32 Release" -# Name "t_eopareto - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoPareto.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopareto - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopareto - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopareto - Win32 Release" +# Name "t_eopareto - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPareto.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoparetofitness.dsp b/eo/win/t_eoparetofitness.dsp index 058b81d49..8bfa433fe 100644 --- a/eo/win/t_eoparetofitness.dsp +++ b/eo/win/t_eoparetofitness.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoparetofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoparetofitness - Win32 Release" -# Name "t_eoparetofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoParetoFitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoparetofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoparetofitness - Win32 Release" +# Name "t_eoparetofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoParetoFitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoparetoftness.dsp b/eo/win/t_eoparetoftness.dsp index 697243335..7c19f1506 100644 --- a/eo/win/t_eoparetoftness.dsp +++ b/eo/win/t_eoparetoftness.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoparetoftness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoparetoftness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetoftness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetoftness.mak" CFG="t_eoparetoftness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoparetoftness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoparetoftness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoparetoftness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoparetoftness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoparetoftness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoparetoftness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoparetoftness - Win32 Release" -# Name "t_eoparetoftness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoParetoFitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoparetoftness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoparetoftness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetoftness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetoftness.mak" CFG="t_eoparetoftness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoparetoftness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoparetoftness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoparetoftness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoparetoftness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoparetoftness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoparetoftness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoparetoftness - Win32 Release" +# Name "t_eoparetoftness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoParetoFitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eopbil.dsp b/eo/win/t_eopbil.dsp index 31caf6430..e7d23e62b 100644 --- a/eo/win/t_eopbil.dsp +++ b/eo/win/t_eopbil.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eopbil - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eopbil.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eopbil - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eopbil - Win32 Release" -# Name "t_eopbil - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoPBIL.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopbil - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopbil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopbil - Win32 Release" +# Name "t_eopbil - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPBIL.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eorandom.dsp b/eo/win/t_eorandom.dsp index fb407b201..c21b52df7 100644 --- a/eo/win/t_eorandom.dsp +++ b/eo/win/t_eorandom.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eorandom - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eorandom.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eorandom - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eorandom - Win32 Release" -# Name "t_eorandom - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoRandom.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eorandom - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eorandom - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eorandom - Win32 Release" +# Name "t_eorandom - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoRandom.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoreal.dsp b/eo/win/t_eoreal.dsp index f87404678..c20ada58d 100644 --- a/eo/win/t_eoreal.dsp +++ b/eo/win/t_eoreal.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoreal - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoreal.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoreal - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoreal - Win32 Release" -# Name "t_eoreal - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoReal.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreal - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreal - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreal - Win32 Release" +# Name "t_eoreal - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReal.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoreplacement.dsp b/eo/win/t_eoreplacement.dsp index 8d2cc97db..e33760c1e 100644 --- a/eo/win/t_eoreplacement.dsp +++ b/eo/win/t_eoreplacement.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoreplacement - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoreplacement.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoreplacement - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoreplacement - Win32 Release" -# Name "t_eoreplacement - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoReplacement.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreplacement - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreplacement - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreplacement - Win32 Release" +# Name "t_eoreplacement - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReplacement.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eoselect.dsp b/eo/win/t_eoselect.dsp index b17583e84..7231cecf4 100644 --- a/eo/win/t_eoselect.dsp +++ b/eo/win/t_eoselect.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoselect - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoselect.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoselect - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoselect - Win32 Release" -# Name "t_eoselect - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSelect.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoselect - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoselect - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoselect - Win32 Release" +# Name "t_eoselect - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSelect.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eossga.dsp b/eo/win/t_eossga.dsp index d714c27a3..a2cca142c 100644 --- a/eo/win/t_eossga.dsp +++ b/eo/win/t_eossga.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eossga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eossga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eossga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eossga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eossga - Win32 Release" -# Name "t_eossga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSSGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eossga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eossga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eossga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eossga - Win32 Release" +# Name "t_eossga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSSGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eostateandparser.dsp b/eo/win/t_eostateandparser.dsp index 031f5329b..cdfd1d131 100644 --- a/eo/win/t_eostateandparser.dsp +++ b/eo/win/t_eostateandparser.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eostateandparser - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eostateandparser.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eostateandparser - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eostateandparser - Win32 Release" -# Name "t_eostateandparser - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoStateAndParser.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eostateandparser - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eostateandparser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eostateandparser - Win32 Release" +# Name "t_eostateandparser - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoStateAndParser.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eosymreg.dsp b/eo/win/t_eosymreg.dsp index ec9e3c1b9..dc3474c09 100644 --- a/eo/win/t_eosymreg.dsp +++ b/eo/win/t_eosymreg.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eosymreg - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eosymreg.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eosymreg - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eosymreg - Win32 Release" -# Name "t_eosymreg - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSymreg.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eosymreg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eosymreg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eosymreg - Win32 Release" +# Name "t_eosymreg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSymreg.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp index 48a8f413e..7e046ff80 100644 --- a/eo/win/t_eovector.dsp +++ b/eo/win/t_eovector.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovector - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovector - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovector___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eovector - Win32 Release" -# Name "t_eovector - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoVector.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovector - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovector - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovector___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovector - Win32 Release" +# Name "t_eovector - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVector.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_eovirus.dsp b/eo/win/t_eovirus.dsp index 47f2cd161..a6ce37870 100644 --- a/eo/win/t_eovirus.dsp +++ b/eo/win/t_eovirus.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovirus - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovirus.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovirus - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eovirus - Win32 Release" -# Name "t_eovirus - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoVirus.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovirus - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovirus - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovirus - Win32 Release" +# Name "t_eovirus - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVirus.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_mge-control.dsp b/eo/win/t_mge-control.dsp index 83411f37c..ed3a2ff70 100644 --- a/eo/win/t_mge-control.dsp +++ b/eo/win/t_mge-control.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge-control - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge-control.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge-control - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge-control - Win32 Release" -# Name "t_mge-control - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE-control.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge-control - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge-control - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge-control - Win32 Release" +# Name "t_mge-control - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE-control.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_mge.dsp b/eo/win/t_mge.dsp index 69347644a..a1e941853 100644 --- a/eo/win/t_mge.dsp +++ b/eo/win/t_mge.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge - Win32 Release" -# Name "t_mge - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge - Win32 Release" +# Name "t_mge - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/t_mge1bit.dsp b/eo/win/t_mge1bit.dsp index 44109bbaf..50214957b 100644 --- a/eo/win/t_mge1bit.dsp +++ b/eo/win/t_mge1bit.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge1bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge1bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge1bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge1bit - Win32 Release" -# Name "t_mge1bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE1bit.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge1bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge1bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge1bit - Win32 Release" +# Name "t_mge1bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE1bit.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/utils.dsp b/eo/win/utils.dsp index 4c6b106d4..f2e03e8a1 100644 --- a/eo/win/utils.dsp +++ b/eo/win/utils.dsp @@ -248,3 +248,4 @@ SOURCE=..\src\utils\selectors.h # End Group # End Target # End Project +˙ \ No newline at end of file From 9f7976c29231668775d5d9782fd97da1ca254b0d Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 7 Dec 2001 05:51:36 +0000 Subject: [PATCH 0731/2134] Removed all references to CrtDebug blabla that were supposed to be MSVC specific but generated an error with MSVC 6.0 --- eo/tutorial/Lesson1/FirstRealGA.cpp | 8 -------- eo/tutorial/Lesson1/exercise1.3.cpp | 7 ------- eo/tutorial/Lesson2/FirstBitEA.cpp | 7 ------- eo/tutorial/Lesson2/FirstRealEA.cpp | 8 -------- eo/tutorial/Lesson2/exercise2.3.cpp | 8 -------- eo/tutorial/Lesson3/SecondBitEA.cpp | 7 ------- eo/tutorial/Lesson3/exercise3.1.cpp | 7 ------- eo/tutorial/Lesson4/ESEA.cpp | 8 -------- 8 files changed, 60 deletions(-) diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index c753fbb4d..74ed459b5 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -145,14 +145,6 @@ void main_function(int argc, char **argv) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif - try { main_function(argc, argv); diff --git a/eo/tutorial/Lesson1/exercise1.3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp index 3a2cb8d22..89e8cc54b 100644 --- a/eo/tutorial/Lesson1/exercise1.3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -146,13 +146,6 @@ void main_function(int argc, char **argv) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif try { diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index 99445846d..08eb2b992 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -173,13 +173,6 @@ void main_function(int argc, char **argv) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif try { diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 7995896ba..b0ceb4462 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -173,14 +173,6 @@ void main_function(int argc, char **argv) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif - try { main_function(argc, argv); diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index b666216c2..70636b564 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -179,14 +179,6 @@ void main_function(int argc, char **argv) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif - try { main_function(argc, argv); diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index c8efce2f9..ab83faa23 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -329,13 +329,6 @@ void main_function(int argc, char **argv) // A main that catches the exceptions int main(int argc, char **argv) { -#ifdef _MSC_VER - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif - try { main_function(argc, argv); diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 2030ac878..baa987f0c 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -383,13 +383,6 @@ void main_function(int argc, char **argv) // A main that catches the exceptions int main(int argc, char **argv) { -#ifdef _MSC_VER - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif - try { main_function(argc, argv); diff --git a/eo/tutorial/Lesson4/ESEA.cpp b/eo/tutorial/Lesson4/ESEA.cpp index adf2aace4..eeb0615af 100644 --- a/eo/tutorial/Lesson4/ESEA.cpp +++ b/eo/tutorial/Lesson4/ESEA.cpp @@ -68,14 +68,6 @@ int main_function(int argc, char *argv[]) int main(int argc, char **argv) { -#ifdef _MSC_VER - // rng.reseed(42); - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); -// _CrtSetBreakAlloc(100); -#endif - try { main_function(argc, argv); From d74ef7466188f6d40d16923533432cebbefe7eaf Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 7 Dec 2001 06:14:11 +0000 Subject: [PATCH 0732/2134] Adding the tutorials in MSVC project files --- eo/win/all_tut.dsp | 97 +++++++++++++++++++++++++++++++++++++++ eo/win/create_tut.sh | 37 +++++++++++++++ eo/win/tut_1_bit.dsp | 103 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_1_real.dsp | 103 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_N_XXX.tmpl | 102 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 442 insertions(+) create mode 100644 eo/win/all_tut.dsp create mode 100755 eo/win/create_tut.sh create mode 100644 eo/win/tut_1_bit.dsp create mode 100644 eo/win/tut_1_real.dsp create mode 100644 eo/win/tut_N_XXX.tmpl diff --git a/eo/win/all_tut.dsp b/eo/win/all_tut.dsp new file mode 100644 index 000000000..14bf0333d --- /dev/null +++ b/eo/win/all_tut.dsp @@ -0,0 +1,97 @@ +# Microsoft Developer Studio Project File - Name="all_tut" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=all_tut - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_tut.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_tut.mak" CFG="all_tut - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_tut - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "all_tut - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_tut - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "all_tut - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "all_tut - Win32 Release" +# Name "all_tut - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/create_tut.sh b/eo/win/create_tut.sh new file mode 100755 index 000000000..0eed9963c --- /dev/null +++ b/eo/win/create_tut.sh @@ -0,0 +1,37 @@ +#! /bin/tcsh -f + +if ($#argv < 2) then + echo "Usage $0 LessonNumber NickName SourceName (no .cpp)" + echo Example: $0 1 bit FirstBitGA + echo " will create the Win project file tut_1_bit.dsp" + echo " that will create the executable tut_1_bit.exe using source" + echo " FirstBitGA.cpp in tutorial/Lesson1 dir" + exit +endif +echo "Creating tut_{$1}_{$2}.dsp" +echo s/tut_N_XXX/tut_{$1}_{$2}/g > toto.sed +echo s/LessonN/Lesson$1/g >> toto.sed +echo s/SRCXXX/$3/g >> toto.sed + +sed -f toto.sed tut_N_XXX.tmpl > tut_{$1}_{$2}.dsp +/bin/rm toto.sed + +echo "Adding tut_{$1}_{$2}.dsp in the main eo.dsw project file" + +echo "" >> eo.dsw +echo Project: \"tut_{$1}_{$2}\"=.\\\\tut_{$1}_{$2}.dsp - Package Owner=\<4\> >> eo.dsw +echo "" >> eo.dsw +echo Package=\<5\> >> eo.dsw +echo '{{{' >> eo.dsw +echo '}}}' >> eo.dsw +echo "" >> eo.dsw +echo Package=\<4\> >> eo.dsw +echo '{{{' >> eo.dsw +echo '}}}' >> eo.dsw +echo "" >> eo.dsw +echo '###############################################################################' >> eo.dsw + +echo "AND DON'T FORGET to add the 3 lines in eo.dsw" +echo " Begin Project Dependency" +echo " " Project_Dep_Name tut_{$1}_{$2} +echo " End Project Dependency" diff --git a/eo/win/tut_1_bit.dsp b/eo/win/tut_1_bit.dsp new file mode 100644 index 000000000..8e15ca883 --- /dev/null +++ b/eo/win/tut_1_bit.dsp @@ -0,0 +1,103 @@ +# Microsoft Developer Studio Project File - Name="tut_1_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_bit.mak" CFG="tut_1_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_bit - Win32 Release" +# Name "tut_1_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\FirstBitGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/tut_1_real.dsp b/eo/win/tut_1_real.dsp new file mode 100644 index 000000000..629d84a36 --- /dev/null +++ b/eo/win/tut_1_real.dsp @@ -0,0 +1,103 @@ +# Microsoft Developer Studio Project File - Name="tut_1_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_real.mak" CFG="tut_1_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_real - Win32 Release" +# Name "tut_1_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\FirstRealGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project +˙ \ No newline at end of file diff --git a/eo/win/tut_N_XXX.tmpl b/eo/win/tut_N_XXX.tmpl new file mode 100644 index 000000000..d8098c2d3 --- /dev/null +++ b/eo/win/tut_N_XXX.tmpl @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_N_XXX" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_N_XXX - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_N_XXX.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_N_XXX.mak" CFG="tut_N_XXX - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_N_XXX - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_N_XXX - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_N_XXX - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_N_XXX - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_N_XXX___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_N_XXX___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_N_XXX - Win32 Release" +# Name "tut_N_XXX - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\LessonN\SRCXXX.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 38f35a1c5348f9e05144894bdeff41534c8fdb4b Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 7 Dec 2001 06:23:15 +0000 Subject: [PATCH 0733/2134] Adding t_eoesall that somehow ahd managed to escape until now + corrected the template test_dsp.tmpl --- eo/win/eo.dsp | 15 ++++--- eo/win/eo.dsw | 14 ++++++ eo/win/t_eoesall.dsp | 102 +++++++++++++++++++++++++++++++++++++++++++ eo/win/test_dsp.tmpl | 8 ++-- 4 files changed, 128 insertions(+), 11 deletions(-) create mode 100644 eo/win/t_eoesall.dsp diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index f8a449b9b..47f7c1039 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -38,7 +38,7 @@ RSC=rc.exe # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Intermediate_Dir "Release\obj" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c @@ -54,20 +54,20 @@ LIB32=link.exe -lib # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo.lib lib\ +PostBuild_Cmds=copy Release\eo.lib lib\ # End Special Build Tool !ELSEIF "$(CFG)" == "eo - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "eo___Win32_Debug" -# PROP BASE Intermediate_Dir "eo___Win32_Debug" +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\obj" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c @@ -83,7 +83,7 @@ LIB32=link.exe -lib # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eod.lib lib\ +PostBuild_Cmds=copy Debug\eod.lib lib\ # End Special Build Tool !ENDIF @@ -107,6 +107,8 @@ SOURCE=..\src\eoPersistent.cpp SOURCE=..\src\eoPrintable.cpp # End Source File +# End Group +# Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File @@ -124,4 +126,3 @@ SOURCE=..\src\eoPrintable.h # End Group # End Target # End Project -˙ diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index e618ea7d8..7bcc583ec 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -45,6 +45,9 @@ Package=<4> Project_Dep_Name t_eocheckpointing End Project Dependency Begin Project Dependency + Project_Dep_Name t_eoesall + End Project Dependency + Begin Project Dependency Project_Dep_Name t_eoexternaleo End Project Dependency Begin Project Dependency @@ -188,6 +191,17 @@ Package=<5> {{{ }}} +Package=<4> +{{{ +}}} +############################################################################### + +Project: "t_eoesall"=.\t_eoesall.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + Package=<4> {{{ }}} diff --git a/eo/win/t_eoesall.dsp b/eo/win/t_eoesall.dsp new file mode 100644 index 000000000..75e97cde5 --- /dev/null +++ b/eo/win/t_eoesall.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoesall - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoesall - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoesall - Win32 Release" +# Name "t_eoesall - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESAll.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/test_dsp.tmpl b/eo/win/test_dsp.tmpl index dd800fa58..69b05c4cf 100644 --- a/eo/win/test_dsp.tmpl +++ b/eo/win/test_dsp.tmpl @@ -38,7 +38,7 @@ RSC=rc.exe # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Intermediate_Dir "Release\obj" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c @@ -56,13 +56,13 @@ LINK32=link.exe # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "DIRNAME___Win32_Debug0" -# PROP BASE Intermediate_Dir "DIRNAME___Win32_Debug0" +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\obj" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c From bdb125afbdd38421e644738e8f4738fdb2352e4e Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 7 Dec 2001 06:28:38 +0000 Subject: [PATCH 0734/2134] COnverted t_eoesall to CRLF line terminators (otherwise MSDEV cannot read properly) --- eo/win/t_eoesall.dsp | 205 ++++++++++++++++++++++--------------------- 1 file changed, 103 insertions(+), 102 deletions(-) diff --git a/eo/win/t_eoesall.dsp b/eo/win/t_eoesall.dsp index 75e97cde5..6b39ba7e5 100644 --- a/eo/win/t_eoesall.dsp +++ b/eo/win/t_eoesall.dsp @@ -1,102 +1,103 @@ -# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoesall - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoesall.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoesall - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoesall - Win32 Release" -# Name "t_eoesall - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESAll.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoesall - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoesall - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoesall - Win32 Release" +# Name "t_eoesall - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESAll.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project + From 93cde922d705f811e43841ab2858550dbf854ce8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 20 Dec 2001 18:04:52 +0000 Subject: [PATCH 0735/2134] There was an error in the type of the first parameter of make_checkpoint and make_algo_scalar (changed from eoParameterLOader to eoParser) --- eo/tutorial/Templates/MyStructEA.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/Templates/MyStructEA.cpp b/eo/tutorial/Templates/MyStructEA.cpp index 9020d4728..64aa10b28 100644 --- a/eo/tutorial/Templates/MyStructEA.cpp +++ b/eo/tutorial/Templates/MyStructEA.cpp @@ -92,14 +92,14 @@ eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCo // outputs (stats, population dumps, ...) #include -eoCheckPoint& make_checkpoint(eoParameterLoader& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } // evolution engine (selection and replacement) #include -eoAlgo& make_algo_scalar(eoParameterLoader& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } From 45b5edc081bdade55df8261f10c62abe08195803 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 16 Jan 2002 14:52:11 +0000 Subject: [PATCH 0736/2134] Increased template depth --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 70223600a..bdff28ebc 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -10,7 +10,7 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a -CXXFLAGS = -g -Wall +CXXFLAGS = -g -Wall -ftemplate-depth-30 ############################################################################### # PLEASE don't break the line (see create_batch.sh) From 83978dd8af959915fcf505db79333fea95607118 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 17 Jan 2002 15:21:44 +0000 Subject: [PATCH 0737/2134] New versio of dsp files --- eo/win/Readme | 40 +++---- eo/win/all_lib.dsp | 1 - eo/win/all_tests.dsp | 1 - eo/win/all_tut.dsp | 1 - eo/win/create_dsp.sh | 16 +-- eo/win/create_tut.sh | 1 + eo/win/eo.dsw | 137 ++++++++++++++++++++++- eo/win/es.dsp | 1 - eo/win/ga.dsp | 1 - eo/win/t_eo.dsp | 5 +- eo/win/t_eobin.dsp | 5 +- eo/win/t_eocheckpointing.dsp | 5 +- eo/win/t_eoes.dsp | 103 ----------------- eo/win/t_eoesall.dsp | 4 +- eo/win/t_eoexternaleo.dsp | 5 +- eo/win/t_eofitness.dsp | 5 +- eo/win/t_eoga.dsp | 5 +- eo/win/t_eogenop.dsp | 5 +- eo/win/t_eopareto.dsp | 5 +- eo/win/t_eoparetofitness.dsp | 5 +- eo/win/t_eoparetoftness.dsp | 103 ----------------- eo/win/t_eopbil.dsp | 5 +- eo/win/t_eorandom.dsp | 5 +- eo/win/t_eoreal.dsp | 5 +- eo/win/t_eoreplacement.dsp | 5 +- eo/win/t_eoselect.dsp | 5 +- eo/win/t_eossga.dsp | 5 +- eo/win/t_eostateandparser.dsp | 5 +- eo/win/t_eosymreg.dsp | 5 +- eo/win/t_eovector.dsp | 5 +- eo/win/t_eovirus.dsp | 5 +- eo/win/t_mge-control.dsp | 5 +- eo/win/t_mge.dsp | 5 +- eo/win/t_mge1bit.dsp | 5 +- eo/win/test_dsp.tmpl | 204 +++++++++++++++++----------------- eo/win/tut_1_bit.dsp | 5 +- eo/win/tut_1_real.dsp | 5 +- eo/win/tut_N_XXX.tmpl | 204 +++++++++++++++++----------------- eo/win/utils.dsp | 1 - 39 files changed, 416 insertions(+), 522 deletions(-) delete mode 100644 eo/win/t_eoes.dsp delete mode 100644 eo/win/t_eoparetoftness.dsp diff --git a/eo/win/Readme b/eo/win/Readme index 7395bc440..d27614085 100644 --- a/eo/win/Readme +++ b/eo/win/Readme @@ -1,20 +1,20 @@ -This directory contains the project files for MSVC++ -They have been successfully tested with MSVC++ 6.0 -on Windows NT. - -There is one main DSW project file: eo.dsw -It contains the description of the project with all compiler options. - -There are several DSP files: - -eo.dsp for the library in src -utils.dsp ... src/utils -ga.dsp ... src/ga -es.dsp ... src/es - -and one additional DSP file for each program in test dir. - -The libraries are created in src/win/lib directory. -The objects and executable files are created in src/win/DEBUG -directory. - +This directory contains the project files for MSVC++ +They have been successfully tested with MSVC++ 6.0 +on Windows NT. + +There is one main DSW project file: eo.dsw +It contains the description of the project with all compiler options. + +There are several DSP files: + +eo.dsp for the library in src +utils.dsp ... src/utils +ga.dsp ... src/ga +es.dsp ... src/es + +and one additional DSP file for each program in test dir. + +The libraries are created in src/win/lib directory. +The objects and executable files are created in src/win/DEBUG +directory. + diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index 4b4392c1f..ca41b2cd6 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -90,4 +90,3 @@ LIB32=link.exe -lib # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/all_tests.dsp b/eo/win/all_tests.dsp index 4a2a3ac78..49032a4d7 100644 --- a/eo/win/all_tests.dsp +++ b/eo/win/all_tests.dsp @@ -94,4 +94,3 @@ LINK32=link.exe # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/all_tut.dsp b/eo/win/all_tut.dsp index 14bf0333d..68c0d42db 100644 --- a/eo/win/all_tut.dsp +++ b/eo/win/all_tut.dsp @@ -94,4 +94,3 @@ LINK32=link.exe # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/create_dsp.sh b/eo/win/create_dsp.sh index 4ddcffb96..78c3c2dea 100755 --- a/eo/win/create_dsp.sh +++ b/eo/win/create_dsp.sh @@ -1,7 +1,7 @@ #! /bin/tcsh -f if ($#argv < 2) then - echo Usage $0 SourceName TargetName [Additional lib] + echo Usage $0 SourceName TargetName echo Example: $0 t-eoGA t_eoga ga echo " will create t_eoga.dsp that in turn is the Win project file" echo " that will create the executable t_eoga using source" @@ -11,15 +11,6 @@ endif echo "Creating $2.dsp" echo s/DIRNAME/$2/g > toto.sed echo s/SOURCENAME/$1/g >> toto.sed -# additional libraries: ADDLIBR = name of "Release" library -# ADDLIBD = name of "Debug" library -if ($#argv == 3) then - echo s/ADDLIBR/$3.lib/g >> toto.sed - echo s/ADDLIBD/$3d.lib/g >> toto.sed -else # remove the ADDLIBs !!!! - echo s/ADDLIBR//g >> toto.sed - echo s/ADDLIBD//g >> toto.sed -endif sed -f toto.sed test_dsp.tmpl > $2.dsp /bin/rm toto.sed @@ -39,3 +30,8 @@ echo '}}}' >> eo.dsw echo "" >> eo.dsw echo '###############################################################################' >> eo.dsw +echo "AND DON'T FORGET to add the 3 lines in eo.dsw" +echo " (too lazy to do it automatically)" +echo " Begin Project Dependency" +echo " " Project_Dep_Name $2 +echo " End Project Dependency" diff --git a/eo/win/create_tut.sh b/eo/win/create_tut.sh index 0eed9963c..c9737bd0f 100755 --- a/eo/win/create_tut.sh +++ b/eo/win/create_tut.sh @@ -32,6 +32,7 @@ echo "" >> eo.dsw echo '###############################################################################' >> eo.dsw echo "AND DON'T FORGET to add the 3 lines in eo.dsw" +echo " (too lazy to do it automatically)" echo " Begin Project Dependency" echo " " Project_Dep_Name tut_{$1}_{$2} echo " End Project Dependency" diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 7bcc583ec..ec7f6e45f 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -121,6 +121,33 @@ Package=<4> Begin Project Dependency Project_Dep_Name tut_1_real End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_1_ex3 + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_2_bit + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_2_real + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_2_ex3 + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_3_bit + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_3_ex1 + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_4_bit + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_4_real + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_4_es + End Project Dependency }}} ############################################################################### @@ -472,7 +499,6 @@ Package=<3> ############################################################################### - Project: "tut_1_real"=.\tut_1_real.dsp - Package Owner=<4> Package=<5> @@ -484,4 +510,111 @@ Package=<4> }}} ############################################################################### -˙ \ No newline at end of file + +Project: "tut_1_ex3"=.\tut_1_ex3.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_2_ex3"=.\tut_2_ex3.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_2_bit"=.\tut_2_bit.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_2_real"=.\tut_2_real.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_3_bit"=.\tut_3_bit.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_3_ex1"=.\tut_3_ex1.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_4_bit"=.\tut_4_bit.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_4_real"=.\tut_4_real.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_4_es"=.\tut_4_es.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### diff --git a/eo/win/es.dsp b/eo/win/es.dsp index 5efb35556..f8c38c9fc 100644 --- a/eo/win/es.dsp +++ b/eo/win/es.dsp @@ -232,4 +232,3 @@ SOURCE=..\src\es\make_real.h # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/ga.dsp b/eo/win/ga.dsp index 564169f3f..e07289a89 100644 --- a/eo/win/ga.dsp +++ b/eo/win/ga.dsp @@ -152,4 +152,3 @@ SOURCE=..\src\ga\make_op.h # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eo.dsp b/eo/win/t_eo.dsp index 6d0af0670..3f00c1375 100644 --- a/eo/win/t_eo.dsp +++ b/eo/win/t_eo.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eo - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eo.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index 1a31b5ca9..36e56a27c 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eobin.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eocheckpointing.dsp b/eo/win/t_eocheckpointing.dsp index f4f32e143..2f004d473 100644 --- a/eo/win/t_eocheckpointing.dsp +++ b/eo/win/t_eocheckpointing.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoCheckpointing.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoes.dsp b/eo/win/t_eoes.dsp deleted file mode 100644 index 1ef8f9905..000000000 --- a/eo/win/t_eoes.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoes" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoes - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoes.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoes.mak" CFG="t_eoes - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoes - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoes - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoes - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoes - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoes___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoes___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoes - Win32 Release" -# Name "t_eoes - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESAll.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoesall.dsp b/eo/win/t_eoesall.dsp index 6b39ba7e5..37053494e 100644 --- a/eo/win/t_eoesall.dsp +++ b/eo/win/t_eoesall.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF diff --git a/eo/win/t_eoexternaleo.dsp b/eo/win/t_eoexternaleo.dsp index 05d039a57..8ad2fabb6 100644 --- a/eo/win/t_eoexternaleo.dsp +++ b/eo/win/t_eoexternaleo.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoExternalEO.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp index d8d15fac1..7494e597d 100644 --- a/eo/win/t_eofitness.dsp +++ b/eo/win/t_eofitness.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eofitness.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoga.dsp b/eo/win/t_eoga.dsp index a1db31a3d..7af890a3d 100644 --- a/eo/win/t_eoga.dsp +++ b/eo/win/t_eoga.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoGA.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eogenop.dsp b/eo/win/t_eogenop.dsp index 8c8bb75fb..f3cf03420 100644 --- a/eo/win/t_eogenop.dsp +++ b/eo/win/t_eogenop.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoGenOp.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eopareto.dsp b/eo/win/t_eopareto.dsp index 1f6e64b59..bc4e82cc9 100644 --- a/eo/win/t_eopareto.dsp +++ b/eo/win/t_eopareto.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoPareto.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoparetofitness.dsp b/eo/win/t_eoparetofitness.dsp index 8bfa433fe..37bcfc275 100644 --- a/eo/win/t_eoparetofitness.dsp +++ b/eo/win/t_eoparetofitness.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoParetoFitness.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoparetoftness.dsp b/eo/win/t_eoparetoftness.dsp deleted file mode 100644 index 7c19f1506..000000000 --- a/eo/win/t_eoparetoftness.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="t_eoparetoftness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoparetoftness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetoftness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetoftness.mak" CFG="t_eoparetoftness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoparetoftness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoparetoftness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoparetoftness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIB.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoparetoftness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoparetoftness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoparetoftness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoparetoftness - Win32 Release" -# Name "t_eoparetoftness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoParetoFitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eopbil.dsp b/eo/win/t_eopbil.dsp index e7d23e62b..0722789de 100644 --- a/eo/win/t_eopbil.dsp +++ b/eo/win/t_eopbil.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ga.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib gad.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoPBIL.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eorandom.dsp b/eo/win/t_eorandom.dsp index c21b52df7..3b2e4e085 100644 --- a/eo/win/t_eorandom.dsp +++ b/eo/win/t_eorandom.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoRandom.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoreal.dsp b/eo/win/t_eoreal.dsp index c20ada58d..ee990ab3f 100644 --- a/eo/win/t_eoreal.dsp +++ b/eo/win/t_eoreal.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib es.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib esd.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoReal.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoreplacement.dsp b/eo/win/t_eoreplacement.dsp index e33760c1e..d85271c1f 100644 --- a/eo/win/t_eoreplacement.dsp +++ b/eo/win/t_eoreplacement.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoReplacement.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eoselect.dsp b/eo/win/t_eoselect.dsp index 7231cecf4..42da93674 100644 --- a/eo/win/t_eoselect.dsp +++ b/eo/win/t_eoselect.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoSelect.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eossga.dsp b/eo/win/t_eossga.dsp index a2cca142c..82c07a4f2 100644 --- a/eo/win/t_eossga.dsp +++ b/eo/win/t_eossga.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoSSGA.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eostateandparser.dsp b/eo/win/t_eostateandparser.dsp index cdfd1d131..49d9cce37 100644 --- a/eo/win/t_eostateandparser.dsp +++ b/eo/win/t_eostateandparser.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoStateAndParser.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eosymreg.dsp b/eo/win/t_eosymreg.dsp index dc3474c09..9aaa7f3d6 100644 --- a/eo/win/t_eosymreg.dsp +++ b/eo/win/t_eosymreg.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoSymreg.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp index 7e046ff80..8f691eb15 100644 --- a/eo/win/t_eovector.dsp +++ b/eo/win/t_eovector.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoVector.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_eovirus.dsp b/eo/win/t_eovirus.dsp index a6ce37870..da07ee6c8 100644 --- a/eo/win/t_eovirus.dsp +++ b/eo/win/t_eovirus.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-eoVirus.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_mge-control.dsp b/eo/win/t_mge-control.dsp index ed3a2ff70..dba508071 100644 --- a/eo/win/t_mge-control.dsp +++ b/eo/win/t_mge-control.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-MGE-control.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_mge.dsp b/eo/win/t_mge.dsp index a1e941853..01eb1d534 100644 --- a/eo/win/t_mge.dsp +++ b/eo/win/t_mge.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_mge - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-MGE.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/t_mge1bit.dsp b/eo/win/t_mge1bit.dsp index 50214957b..560914294 100644 --- a/eo/win/t_mge1bit.dsp +++ b/eo/win/t_mge1bit.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\test\t-MGE1bit.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/test_dsp.tmpl b/eo/win/test_dsp.tmpl index 69b05c4cf..e7510a2b6 100644 --- a/eo/win/test_dsp.tmpl +++ b/eo/win/test_dsp.tmpl @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="DIRNAME" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=DIRNAME - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "DIRNAME.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "DIRNAME.mak" CFG="DIRNAME - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "DIRNAME - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "DIRNAME - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "DIRNAME - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release\obj" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib ADDLIBR utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "DIRNAME - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debugj" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug\obj" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib ADDLIBD utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "DIRNAME - Win32 Release" -# Name "DIRNAME - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\SOURCENAME.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="DIRNAME" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=DIRNAME - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DIRNAME.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DIRNAME.mak" CFG="DIRNAME - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DIRNAME - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "DIRNAME - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DIRNAME - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\obj" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "DIRNAME - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\obj" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "DIRNAME - Win32 Release" +# Name "DIRNAME - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\SOURCENAME.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_bit.dsp b/eo/win/tut_1_bit.dsp index 8e15ca883..17d2f21be 100644 --- a/eo/win/tut_1_bit.dsp +++ b/eo/win/tut_1_bit.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "tut_1_bit - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\tutorial\Lesson1\FirstBitGA.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/tut_1_real.dsp b/eo/win/tut_1_real.dsp index 629d84a36..f81ad84ab 100644 --- a/eo/win/tut_1_real.dsp +++ b/eo/win/tut_1_real.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" !ELSEIF "$(CFG)" == "tut_1_real - Win32 Debug" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" !ENDIF @@ -100,4 +100,3 @@ SOURCE="..\tutorial\Lesson1\FirstRealGA.cpp" # End Group # End Target # End Project -˙ \ No newline at end of file diff --git a/eo/win/tut_N_XXX.tmpl b/eo/win/tut_N_XXX.tmpl index d8098c2d3..0960e8bb7 100644 --- a/eo/win/tut_N_XXX.tmpl +++ b/eo/win/tut_N_XXX.tmpl @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_N_XXX" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_N_XXX - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_N_XXX.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_N_XXX.mak" CFG="tut_N_XXX - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_N_XXX - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_N_XXX - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_N_XXX - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo.lib utils.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_N_XXX - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_N_XXX___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_N_XXX___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eod.lib utilsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_N_XXX - Win32 Release" -# Name "tut_N_XXX - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\LessonN\SRCXXX.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_N_XXX" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_N_XXX - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_N_XXX.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_N_XXX.mak" CFG="tut_N_XXX - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_N_XXX - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_N_XXX - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_N_XXX - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_N_XXX - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_N_XXX___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_N_XXX___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_N_XXX - Win32 Release" +# Name "tut_N_XXX - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\LessonN\SRCXXX.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/utils.dsp b/eo/win/utils.dsp index f2e03e8a1..4c6b106d4 100644 --- a/eo/win/utils.dsp +++ b/eo/win/utils.dsp @@ -248,4 +248,3 @@ SOURCE=..\src\utils\selectors.h # End Group # End Target # End Project -˙ \ No newline at end of file From a427432291828766b2db1cc7d73484c1225b1146 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 17 Jan 2002 15:24:44 +0000 Subject: [PATCH 0738/2134] Adding tutorial files --- eo/win/tut_1_ex3.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_2_bit.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_2_ex3.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_2_real.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_3_bit.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_3_ex1.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_4_bit.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_4_es.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ eo/win/tut_4_real.dsp | 102 ++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 918 insertions(+) create mode 100644 eo/win/tut_1_ex3.dsp create mode 100644 eo/win/tut_2_bit.dsp create mode 100644 eo/win/tut_2_ex3.dsp create mode 100644 eo/win/tut_2_real.dsp create mode 100644 eo/win/tut_3_bit.dsp create mode 100644 eo/win/tut_3_ex1.dsp create mode 100644 eo/win/tut_4_bit.dsp create mode 100644 eo/win/tut_4_es.dsp create mode 100644 eo/win/tut_4_real.dsp diff --git a/eo/win/tut_1_ex3.dsp b/eo/win/tut_1_ex3.dsp new file mode 100644 index 000000000..2c87c749a --- /dev/null +++ b/eo/win/tut_1_ex3.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_1_ex3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_ex3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_ex3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_ex3.mak" CFG="tut_1_ex3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_ex3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_ex3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_ex3___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_ex3___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_ex3 - Win32 Release" +# Name "tut_1_ex3 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\exercise1.3.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_bit.dsp b/eo/win/tut_2_bit.dsp new file mode 100644 index 000000000..d819e8b1b --- /dev/null +++ b/eo/win/tut_2_bit.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_2_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_bit.mak" CFG="tut_2_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_bit - Win32 Release" +# Name "tut_2_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\FirstBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_ex3.dsp b/eo/win/tut_2_ex3.dsp new file mode 100644 index 000000000..e3904fc23 --- /dev/null +++ b/eo/win/tut_2_ex3.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_2_ex3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_ex3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_ex3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_ex3.mak" CFG="tut_2_ex3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_ex3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_ex3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_ex3___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_ex3___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_ex3 - Win32 Release" +# Name "tut_2_ex3 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\exercise2.3.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_real.dsp b/eo/win/tut_2_real.dsp new file mode 100644 index 000000000..4affaf223 --- /dev/null +++ b/eo/win/tut_2_real.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_2_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_real.mak" CFG="tut_2_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_real - Win32 Release" +# Name "tut_2_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\FirstRealEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_3_bit.dsp b/eo/win/tut_3_bit.dsp new file mode 100644 index 000000000..dec19539d --- /dev/null +++ b/eo/win/tut_3_bit.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_3_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_3_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_3_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_3_bit.mak" CFG="tut_3_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_3_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_3_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_3_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_3_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_3_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_3_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_3_bit - Win32 Release" +# Name "tut_3_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson3\SecondBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_3_ex1.dsp b/eo/win/tut_3_ex1.dsp new file mode 100644 index 000000000..7c82bdadf --- /dev/null +++ b/eo/win/tut_3_ex1.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_3_ex1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_3_ex1 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_3_ex1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_3_ex1.mak" CFG="tut_3_ex1 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_3_ex1 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_3_ex1 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_3_ex1 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_3_ex1 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_3_ex1___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_3_ex1___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_3_ex1 - Win32 Release" +# Name "tut_3_ex1 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson3\exercise3.1.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_bit.dsp b/eo/win/tut_4_bit.dsp new file mode 100644 index 000000000..ca7823bf2 --- /dev/null +++ b/eo/win/tut_4_bit.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_4_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_bit.mak" CFG="tut_4_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_bit - Win32 Release" +# Name "tut_4_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\BitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_es.dsp b/eo/win/tut_4_es.dsp new file mode 100644 index 000000000..f297b986e --- /dev/null +++ b/eo/win/tut_4_es.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_4_es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_es.mak" CFG="tut_4_es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_es - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_es - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_es___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_es___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_es - Win32 Release" +# Name "tut_4_es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\ESEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_real.dsp b/eo/win/tut_4_real.dsp new file mode 100644 index 000000000..0e872132e --- /dev/null +++ b/eo/win/tut_4_real.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_4_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_real.mak" CFG="tut_4_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_real - Win32 Release" +# Name "tut_4_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\RealEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From b51d40e24f05b0346cd1b654a57584b07c427c3d Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 17 Jan 2002 17:51:02 +0000 Subject: [PATCH 0739/2134] Protexted all calls to gnuplot for MSVC --- eo/tutorial/Lesson3/exercise3.1.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index baa987f0c..de51f7509 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -299,23 +299,26 @@ void main_function(int argc, char **argv) // test de eoPopStat and/or eoSortedPopStat. // Dumps the whole pop every 10 gen. // eoSortedPopStat popStat(10, "Dump of whole population"); - eoPopStat popStat(10, "Dump of whole population"); - checkpoint.add(popStat); - monitor.add(popStat); +// eoPopStat popStat(10, "Dump of whole population"); +// checkpoint.add(popStat); +// monitor.add(popStat); // A file monitor: will print parameters to ... a File, yes, you got it! eoFileMonitor fileMonitor("stats.xg", " "); - // and an eoGnuplot1DMonitor will 1-print to a file, and 2- plot on screen - eoGnuplot1DMonitor gnuMonitor("best_average.xg",minimizing_fitness()); - // the checkpoint mechanism can handle multiple monitors + // the checkpoint mechanism can handle monitors checkpoint.add(fileMonitor); - checkpoint.add(gnuMonitor); // the fileMonitor can monitor parameters, too, but you must tell it! fileMonitor.add(generationCounter); fileMonitor.add(bestStat); fileMonitor.add(SecondStat); + +#ifndef _MSC_VER + // and an eoGnuplot1DMonitor will 1-print to a file, and 2- plot on screen + eoGnuplot1DMonitor gnuMonitor("best_average.xg",minimizing_fitness()); + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(gnuMonitor); // the gnuMonitor can monitor parameters, too, but you must tell it! gnuMonitor.add(eval); gnuMonitor.add(bestStat); @@ -343,7 +346,7 @@ void main_function(int argc, char **argv) fitSnapshot.add(fitStat); // and of course add it to the checkpoint checkpoint.add(fitSnapshot); - +#endif // Last type of item the eoCheckpoint can handle: state savers: eoState outState; // Register the algorithm into the state (so it has something to save!!) From 6ddec3bdceb5185a5a4ff62505113e5b4042be6b Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 17 Jan 2002 17:51:58 +0000 Subject: [PATCH 0740/2134] apply -> apply for MSVC --- eo/tutorial/Lesson4/BitEA.cpp | 2 +- eo/tutorial/Lesson4/ESEA.cpp | 2 +- eo/tutorial/Lesson4/RealEA.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/Lesson4/BitEA.cpp b/eo/tutorial/Lesson4/BitEA.cpp index 9fa1fd663..31a22ae3c 100644 --- a/eo/tutorial/Lesson4/BitEA.cpp +++ b/eo/tutorial/Lesson4/BitEA.cpp @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) //// GO /////// // evaluate intial population AFTER help and status in case it takes time - apply(eval, pop); + apply(eval, pop); // print it out cout << "Initial Population\n"; pop.sortedPrintOn(cout); diff --git a/eo/tutorial/Lesson4/ESEA.cpp b/eo/tutorial/Lesson4/ESEA.cpp index eeb0615af..1c1bd30cf 100644 --- a/eo/tutorial/Lesson4/ESEA.cpp +++ b/eo/tutorial/Lesson4/ESEA.cpp @@ -109,7 +109,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state) // initialize the population - and evaluate // yes, this is representation indepedent once you have an eoInit eoPop& pop = make_pop(_parser, _state, init); - apply(eval, pop); + apply(eval, pop); // stopping criteria eoContinue & term = make_continue(_parser, _state, eval); diff --git a/eo/tutorial/Lesson4/RealEA.cpp b/eo/tutorial/Lesson4/RealEA.cpp index 09e7ced51..8002136c0 100644 --- a/eo/tutorial/Lesson4/RealEA.cpp +++ b/eo/tutorial/Lesson4/RealEA.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) //// GO /////// // evaluate intial population AFTER help and status in case it takes time - apply(eval, pop); + apply(eval, pop); // print it out cout << "Initial Population\n"; pop.sortedPrintOn(cout); From 87d733dda565cc408b2ad9fe3a94535dd9302ad9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 17 Jan 2002 17:54:56 +0000 Subject: [PATCH 0741/2134] Removed the #ifdef that protected the lt_arity avaints MSVC (!!!) --- eo/test/t-eoSymreg.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 222a000d6..fd227edbc 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -95,13 +95,16 @@ static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNod // MSVC does not recognize the lt_arity in eoParseTreeDepthInit // without this specialization ... -#ifdef _MSC_VER +// 2 months later, it seems it does not accept this definition ... +// but dies accept the lt_arity in eoParseTreeDepthInit +// !!! +// #ifdef _MSC_VER template <> bool lt_arity(const SymregNode &node1, const SymregNode &node2) { return (node1.arity() < node2.arity()); } -#endif +// #endif //----------------------------------------------------------- // saving, loading From 417c79179d345c8322e3374410974d296011a00a Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 17 Jan 2002 17:57:55 +0000 Subject: [PATCH 0742/2134] Added the move from Release and DEbug into the lib dir --- eo/win/all_lib.dsp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index ca41b2cd6..347390495 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -50,6 +50,11 @@ BSC32=bscmake.exe LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\all_lib.lib lib\ +# End Special Build Tool !ELSEIF "$(CFG)" == "all_lib - Win32 Debug" @@ -73,6 +78,11 @@ BSC32=bscmake.exe LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\all_libd.lib lib\ +# End Special Build Tool !ENDIF From 6cb8e652b5ec3ea24e40007341b647905fa88624 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 30 Jan 2002 12:24:42 +0000 Subject: [PATCH 0743/2134] Added Ranking (God knows why it was mnissing!) --- eo/src/do/make_algo_scalar.h | 46 +++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index fed479b7f..98e769f3a 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -73,7 +73,7 @@ template eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) { // the selection - eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); eoParamParamType & ppSelect = selectionParam.value(); // pair > @@ -108,6 +108,50 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc select = new eoStochTournamentSelect(p); } + else if (ppSelect.first == string("Ranking")) + { + double p,e; + if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent + { + p = atof(ppSelect.second[0].c_str()); + e = atof(ppSelect.second[1].c_str()); + } + else if (ppSelect.second.size()==1) // 1 parameter: pressure + { + cerr << "WARNING, no exponent to Ranking, using 1" << endl; + e = 1; + ppSelect.second.push_back(string("1")); + p = atof(ppSelect.second[0].c_str()); + } + else // no parameters ... or garbage + { + cerr << "WARNING, no parameter to Ranking, using (2,1)" << endl; + p=2; + e=1; + // put back in parameter for consistency (and status file) + ppSelect.second.resize(2); // just in case + ppSelect.second[0] = (string("2")); + ppSelect.second[1] = (string("1")); + } + // check for authorized values + // pressure in (0,1] + if ( (p<=1) || (p>2) ) + { + cerr << "WARNING, selective pressure must be in (0,1] in Ranking, using 2\n"; + p=2; + ppSelect.second[0] = (string("2")); + } + // exponent >0 + if (e<=0) + { + cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + e=1; + ppSelect.second[1] = (string("1")); + } + // now we're OK + eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); + select = new eoRouletteWorthSelect(p2w); + } else if (ppSelect.first == string("Sequential")) // one after the other { bool b; From 6f5a34a13461817e23e70ce67952104e84ca7d86 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 31 Jan 2002 17:32:27 +0000 Subject: [PATCH 0744/2134] Updated the comments --- eo/src/utils/eoGnuplot1DSnapshot.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 3c0649605..8134b1dda 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -47,9 +47,9 @@ This class plots through gnuplot the eoStat given as argument -/** eoGnuplot1DMonitor plots stats through gnuplot - * assumes that the same file is appened every so and so, - * and replots it everytime +/** eoGnuplot1DSnapshot plots stats through gnuplot + * assumes that the same file is re-written every so and so, + * and plots it from scratch everytime it's called */ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot { @@ -88,7 +88,7 @@ private: inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) ///////////////////////////////////////////////////////// { - // update file using the eoFileMonitor + // update file using the eoFileMonitor method eoFileSnapshot::operator()(); // sends plot order to gnuplot From 52bc2ed4f8748b2e6146ec2def5fdefc6debe14b Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 31 Jan 2002 17:42:03 +0000 Subject: [PATCH 0745/2134] Added the eoVariableParetoTraits that allows to specify the number of objectives and the max/min for each one at run-time --- eo/src/eoParetoFitness.h | 61 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 24ea630f5..e23cdc199 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: mak@dhi.dk - Marc.Schoenauer@polytechnique.fr + Marc.Schoenauer@inria.fr */ //----------------------------------------------------------------------------- @@ -28,11 +28,14 @@ #include #include +#include /** - eoFitnessTraits: a traits class to specify the number of objectives and which one are maximizing - or not. See eoParetoFitness for its use. If you define your own, make sure you make the functions - static! + * eoFitnessTraits: a traits class to specify + * the number of objectives and which one are maximizing or not + * See test/t-eoParetoFitness for its use. + * + * If you define your own, make sure you make the functions static! */ class eoParetoFitnessTraits { @@ -43,6 +46,50 @@ class eoParetoFitnessTraits static bool maximizing(int which) { return true; } // by default: all are maximizing }; +/** + * eoVariableParetoTraits : an eoParetoFitnessTraits whose characteristics + * can be set at run-time (nb objectives and min/max's) + * Why bother? For didactical purposes (and EASEA implementation :-) + */ +class eoVariableParetoTraits : public eoParetoFitnessTraits +{ +public : + /** setting the static stuff */ + static void setUp(unsigned _n, vector & _b) + { + nObj=_n; + bObj=_b; + if (nObj != bObj.size()) + throw runtime_error("Number of objectives and min/max size don't match in VariableParetoTraits::setup"); + } + + /** the accessors */ + static unsigned nObjectives() + { +#ifndef NDEBUG + if (!nObj) + throw runtime_error("Number of objectives not assigned in VariableParetoTraits"); +#endif + return nObj; + } + static bool maximizing(unsigned _i) + { +#ifndef NDEBUG + if (_i >= bObj.size()) + throw runtime_error("Wrong index in VariableParetoTraits"); +#endif + return bObj[_i]; + } +private: + static unsigned nObj; + static vector bObj; +}; + +// need to allocate these -> should probably be done in some cpp file! +unsigned eoVariableParetoTraits::nObj; +vector eoVariableParetoTraits::bObj; + + /** eoParetoFitness class: vector of doubles with overloaded comparison operators. Comparison is done on pareto dominance. The template argument FitnessTraits defaults to eoParetoFitnessTraits, which @@ -61,6 +108,12 @@ public : eoParetoFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} + /** access to the traits characteristics (so you don't have to write + * a lot of typedef's around + */ + static void setUp(unsigned _n, vector & _b) {FitnessTraits::setUp(_n, _b);} + static bool maximizing(unsigned _i) { return FitnessTraits::maximizing(_i);} + /// Partial order based on Pareto-dominance //bool operator<(const eoParetoFitness& _other) const bool dominates(const eoParetoFitness& _other) const From ef0e071dc6ec800b780eee14c52df710583f6828 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 05:51:31 +0000 Subject: [PATCH 0746/2134] Removed comment after #endif (warning in gcc 1.96+) --- eo/app/gprop/vecop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/app/gprop/vecop.h b/eo/app/gprop/vecop.h index 6e45a5d55..7cd5a6095 100644 --- a/eo/app/gprop/vecop.h +++ b/eo/app/gprop/vecop.h @@ -210,4 +210,5 @@ template T euclidean_distance(const vector& v1, //----------------------------------------------------------------------------- -#endif VECOP_H +#endif + From 76ff13b2e3cc2a06005a967c710cdadadad3fc2d Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 05:59:05 +0000 Subject: [PATCH 0747/2134] Added default value for bool arg in testDirRes function --- eo/src/utils/make_help.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index 6924c1742..1d7b2e5c2 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -76,7 +76,7 @@ void make_help(eoParser & _parser) * * Always return true (for code easy writing on the other side :-) */ -bool testDirRes(std::string _dirName, bool _erase) +bool testDirRes(std::string _dirName, bool _erase=true) { string s = "test -d " + _dirName; int res = system(s.c_str()); From daed31c0881244e90926547e9b3e015bcad514e4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 06:43:46 +0000 Subject: [PATCH 0748/2134] Moved the static variables of class eoVariableParetoTraits into a separate .cpp file (eoParetoFitness.cpp) - and modified Makefile.am --- eo/src/Makefile.am | 2 +- eo/src/eoParetoFitness.cpp | 38 ++++++++++++++++++++++++++++++++++++++ eo/src/eoParetoFitness.h | 5 ----- 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 eo/src/eoParetoFitness.cpp diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index bb878cc84..88ca6f322 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,7 +8,7 @@ SUBDIRS = es ga gp utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp +libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp eoParetoFitness.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = *.h eo diff --git a/eo/src/eoParetoFitness.cpp b/eo/src/eoParetoFitness.cpp new file mode 100644 index 000000000..908b2c9f0 --- /dev/null +++ b/eo/src/eoParetoFitness.cpp @@ -0,0 +1,38 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPareto.cpp +// (c) EEAAX,1996-GeNeura Team,1998-Maarten Keijzer,2000-Marc Schoenauer 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include "eoParetoFitness.h" + + +// need to allocate the static variables of class eoVariableParetoTraits +unsigned eoVariableParetoTraits::nObj; +vector eoVariableParetoTraits::bObj; + + diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index e23cdc199..e6e4336c8 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -85,11 +85,6 @@ private: static vector bObj; }; -// need to allocate these -> should probably be done in some cpp file! -unsigned eoVariableParetoTraits::nObj; -vector eoVariableParetoTraits::bObj; - - /** eoParetoFitness class: vector of doubles with overloaded comparison operators. Comparison is done on pareto dominance. The template argument FitnessTraits defaults to eoParetoFitnessTraits, which From cb4112b84daf0a4f6eac5eb54adf9eecdec02e24 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 07:05:31 +0000 Subject: [PATCH 0749/2134] Added the eoVariableParetoTraits (setup number of objcetives and min/max at run time). --- eo/test/t-eoParetoFitness.cpp | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index 402616703..997e6dda2 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: mak@dhi.dk + +30/01/02 - MS - Added the eoVariableParetoTraits - and the compare Fn */ //----------------------------------------------------------------------------- @@ -36,11 +38,27 @@ public : static bool maximizing(int) { return false; } }; +template +void compare(F & _eo1, F & _eo2) +{ + if (_eo1.dominates(_eo2)) + cout << _eo1 << " dominates " << _eo2 << endl; + else if (_eo2.dominates(_eo2)) + cout << _eo2 << " dominates " << _eo1 << endl; + else + cout << "None of " << _eo1 << " and " << _eo2 << "dominates the other" << endl; + return; +} + int main() { typedef eoParetoFitness<> MaxFitness; typedef eoParetoFitness MinFitness; + typedef eoParetoFitness VarFitness; + + try{ + MaxFitness f0; f0[0] = 0.0; f0[1] = 1.0; @@ -108,4 +126,64 @@ int main() assert(m2.dominates(m3)); //m3 < m2); assert(!m3.dominates(m2)); // (m2 < m3)); assert(m2.dominates(m3)); //m2 > m3); + + + ////////////////////////////////////////// + // now the run-time set-able number of objectives + //////////////////////////////////////////// + + cout << "On y va" << endl; + + + // setup fitness WARNING do not try to allocate any EO before that (runtime error) + vector b(2, true); + b[0]=true; + b[1]=false; + VarFitness::setUp(2, b); + cout << "\nMAXimizing on Obj 0 and MINimizing on Obj 1\n"; + + VarFitness mv0; + VarFitness mv1; + VarFitness mv2; + VarFitness mv3; + + mv0[0] = 0.0; + mv0[1] = 1.0; + + mv1[0] = 1.0; + mv1[1] = 0.0; + + mv2[0] = 0.0; + mv2[1] = 0.5; + + mv3[0] = 0.5; + mv3[1] = 0.5; + + compare (mv0,mv1); + compare (mv0,mv2); + compare (mv0,mv3); + compare (mv1,mv2); + compare (mv1,mv3); + compare (mv2,mv3); + + cout << "\nChanging now the min <-> max\n"; + b[0]=false; + b[1]=true; + VarFitness::setUp(2, b); + cout << "\nMINimizing on Obj 0 and MAXimizing on Obj 1\n"; + compare (mv0,mv1); + compare (mv0,mv2); + compare (mv0,mv3); + compare (mv1,mv2); + compare (mv1,mv3); + compare (mv2,mv3); + + + } + catch(exception& e) + { + cout << e.what() << endl; + } + } + From 839c8ab11074a271780a93a164e51f9b28aa9e1f Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 07:34:13 +0000 Subject: [PATCH 0750/2134] Added newline at end of file (to suppress g+ warning) --- eo/test/t-eoSSGA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoSSGA.cpp b/eo/test/t-eoSSGA.cpp index 0dbe5cf48..be2f210a0 100644 --- a/eo/test/t-eoSSGA.cpp +++ b/eo/test/t-eoSSGA.cpp @@ -114,4 +114,4 @@ int main() // and run algo(pop); -} \ No newline at end of file +} From 066ba2eec21e797f0084475b8c291fb39b25f25e Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 07:36:12 +0000 Subject: [PATCH 0751/2134] Added warning test --- eo/test/t-eoParetoFitness.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index 997e6dda2..ee04facfd 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -178,6 +178,12 @@ int main() compare (mv1,mv3); compare (mv2,mv3); + cout << "\nTesting WARNING\n"; + b.resize(3); + b[0]=false; + b[1]=true; + b[2]=true; + VarFitness::setUp(3, b); } catch(exception& e) From 2873f0b3ea3f2319da4f034be012ae2c11812aa1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 07:36:58 +0000 Subject: [PATCH 0752/2134] Suppressed the lt_arity fn that was added for MSVC - and now seems unnecessary --- eo/test/t-eoSymreg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index fd227edbc..226b1a73b 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -99,11 +99,11 @@ static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNod // but dies accept the lt_arity in eoParseTreeDepthInit // !!! // #ifdef _MSC_VER -template <> -bool lt_arity(const SymregNode &node1, const SymregNode &node2) -{ - return (node1.arity() < node2.arity()); -} +// template <> +// bool lt_arity(const SymregNode &node1, const SymregNode &node2) +// { +// return (node1.arity() < node2.arity()); +// } // #endif //----------------------------------------------------------- From e4523b3080ac23213ac1369823b1c4f2455bcab4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Feb 2002 07:37:54 +0000 Subject: [PATCH 0753/2134] Added warning in case number of objective is changed (and not set) --- eo/src/eoParetoFitness.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index e6e4336c8..3642a8d7e 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -57,6 +57,14 @@ public : /** setting the static stuff */ static void setUp(unsigned _n, vector & _b) { + // possible problems + if ( nObj && (nObj != _n) ) // was already set to a different value + { + cout << "WARNING\n"; + cout << "WARNING : you are changing the number of objectives\n"; + cout << "WARNING : Make sure all existing objects are destroyed\n"; + cout << "WARNING\n"; + } nObj=_n; bObj=_b; if (nObj != bObj.size()) From 94a13c6d534f45106098b7efa6d7e6d5609f5650 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 4 Feb 2002 13:16:50 +0000 Subject: [PATCH 0754/2134] Fixed some compatibility issues with GCC 3.0.1 and the Intel C++ Compiler for Linux v5. --- eo/config.cache | 6 +++--- eo/src/eoParetoFitness.cpp | 2 +- eo/src/eoParetoFitness.h | 32 +++++++++++++++++--------------- eo/src/gp/eoParseTree.h | 7 +++++++ 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/eo/config.cache b/eo/config.cache index 541f62a33..8f137b2a7 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -20,10 +20,10 @@ ac_cv_header_stdc=${ac_cv_header_stdc=yes} ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} -ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} -ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} +ac_cv_path_install=${ac_cv_path_install=$'/usr/bin/install -c'} +ac_cv_prog_CPP=${ac_cv_prog_CPP=$'cc -E'} ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S=$'ln -s'} ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} diff --git a/eo/src/eoParetoFitness.cpp b/eo/src/eoParetoFitness.cpp index 908b2c9f0..6de72db7c 100644 --- a/eo/src/eoParetoFitness.cpp +++ b/eo/src/eoParetoFitness.cpp @@ -33,6 +33,6 @@ // need to allocate the static variables of class eoVariableParetoTraits unsigned eoVariableParetoTraits::nObj; -vector eoVariableParetoTraits::bObj; +std::vector eoVariableParetoTraits::bObj; diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 3642a8d7e..5e09be60b 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -29,6 +29,8 @@ #include #include #include +#include + /** * eoFitnessTraits: a traits class to specify @@ -55,20 +57,20 @@ class eoVariableParetoTraits : public eoParetoFitnessTraits { public : /** setting the static stuff */ - static void setUp(unsigned _n, vector & _b) + static void setUp(unsigned _n, std::vector & _b) { // possible problems if ( nObj && (nObj != _n) ) // was already set to a different value { - cout << "WARNING\n"; - cout << "WARNING : you are changing the number of objectives\n"; - cout << "WARNING : Make sure all existing objects are destroyed\n"; - cout << "WARNING\n"; + std::cout << "WARNING\n"; + std::cout << "WARNING : you are changing the number of objectives\n"; + std::cout << "WARNING : Make sure all existing objects are destroyed\n"; + std::cout << "WARNING\n"; } nObj=_n; bObj=_b; if (nObj != bObj.size()) - throw runtime_error("Number of objectives and min/max size don't match in VariableParetoTraits::setup"); + throw std::runtime_error("Number of objectives and min/max size don't match in VariableParetoTraits::setup"); } /** the accessors */ @@ -76,7 +78,7 @@ public : { #ifndef NDEBUG if (!nObj) - throw runtime_error("Number of objectives not assigned in VariableParetoTraits"); + throw std::runtime_error("Number of objectives not assigned in VariableParetoTraits"); #endif return nObj; } @@ -84,17 +86,17 @@ public : { #ifndef NDEBUG if (_i >= bObj.size()) - throw runtime_error("Wrong index in VariableParetoTraits"); + throw std::runtime_error("Wrong index in VariableParetoTraits"); #endif return bObj[_i]; } private: static unsigned nObj; - static vector bObj; + static std::vector bObj; }; /** - eoParetoFitness class: vector of doubles with overloaded comparison operators. Comparison is done + eoParetoFitness class: std::vector of doubles with overloaded comparison operators. Comparison is done on pareto dominance. The template argument FitnessTraits defaults to eoParetoFitnessTraits, which can be replaces at will by any other class that implements the static functions defined therein. @@ -114,7 +116,7 @@ public : /** access to the traits characteristics (so you don't have to write * a lot of typedef's around */ - static void setUp(unsigned _n, vector & _b) {FitnessTraits::setUp(_n, _b);} + static void setUp(unsigned _n, std::vector & _b) {FitnessTraits::setUp(_n, _b);} static bool maximizing(unsigned _i) { return FitnessTraits::maximizing(_i);} /// Partial order based on Pareto-dominance @@ -124,8 +126,8 @@ public : bool dom = false; double tol = FitnessTraits::tol(); - const vector& performance = *this; - const vector& otherperformance = _other; + const std::vector& performance = *this; + const std::vector& otherperformance = _other; for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) { @@ -152,8 +154,8 @@ public : bool operator<(const eoParetoFitness& _other) const { double tol = FitnessTraits::tol(); - const vector& performance = *this; - const vector& otherperformance = _other; + const std::vector& performance = *this; + const std::vector& otherperformance = _other; for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) { bool maxim = FitnessTraits::maximizing(i); diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 4aa82219e..56199dc12 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -56,6 +56,13 @@ public : typedef parse_tree::subtree Subtree; + /* For Compatibility with the intel C++ compiler for Linux 5.x */ + typedef Node reference; + typedef const reference const_reference; + + + + /** * Default Constructor */ From 600b08a7f66135eecec6cf602c330026a7329a3b Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 4 Feb 2002 14:28:00 +0000 Subject: [PATCH 0755/2134] the gpsymreg code has been slightly altered to allow compilation using the Intel C++ Compiler for Linux. Other compilers should not be affected. A slightly different makefile is needed --- eo/app/gpsymreg/node.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h index 362aae404..85aa4479e 100644 --- a/eo/app/gpsymreg/node.h +++ b/eo/app/gpsymreg/node.h @@ -47,14 +47,13 @@ using namespace std; typedef enum {Variable, UFunction, BFunction, BOperator, Const} Type; +typedef double (*BinaryFunction)(const double,const double); +typedef double (*UnaryFunction)(const double); struct Operation { public: - - typedef double (*BinaryFunction)(const double,const double); - typedef double (*UnaryFunction)(const double); typedef unsigned int VariableID; typedef string Label; From 448a5189fd55cf4918b95d7104ede9c02902a0e9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 8 Feb 2002 07:47:03 +0000 Subject: [PATCH 0756/2134] Removed the const in method eoInit & atomInit() --- eo/src/eoInit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 3d5f6835a..2e3b48f55 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -137,7 +137,7 @@ typedef typename EOT::AtomType AtomType; } // accessor to the atom initializer (needed by operator constructs sometimes) - const eoInit & atomInit() {return init;} + eoInit & atomInit() {return init;} private : unsigned offset; From 5fbbe4c9e91f02da6d26b902fda2842d3eacd307 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 8 Feb 2002 07:48:03 +0000 Subject: [PATCH 0757/2134] Added a constructor from a vector - mandatory in all applications --- eo/src/eoParetoFitness.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 5e09be60b..6ebaea703 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -113,6 +113,10 @@ public : eoParetoFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} + // Ctr from a vector + eoParetoFitness(std::vector & _v) : std::vector(_v) {} + + /** access to the traits characteristics (so you don't have to write * a lot of typedef's around */ From 53eac8838bdd4d82bb2be5ad3133347c63acffa8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 8 Feb 2002 07:49:32 +0000 Subject: [PATCH 0758/2134] Added the method getORcreateParam. It has exactly the same syntax than the createParam method but it first checks whether the param has been laready entered before creating it --- eo/src/utils/eoParser.cpp | 148 ++++++++++++++++++++++++++------------ eo/src/utils/eoParser.h | 29 +++++++- 2 files changed, 131 insertions(+), 46 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index d7a138d35..d0360859c 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -1,3 +1,29 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParser.cpp +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + #ifdef _MSC_VER #pragma warning(disable:4786) #endif @@ -39,7 +65,8 @@ eoParameterLoader::~eoParameterLoader() eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : programName( _argv[0]), programDescription( _programDescription), - needHelp(false, "help", "Prints this message", 'h') + needHelp(false, "help", "Prints this message", 'h'), + stopOnUnknownParam(true, "stopOnUnknownParam", "Stop if unkonwn param entered", '\0') { // need to process the param file first // if we want command-line to have highest priority @@ -77,6 +104,7 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, readFrom(stream); processParam(needHelp); + processParam(stopOnUnknownParam); } /** @@ -99,6 +127,34 @@ eoParam* eoParser::getParamWithLongName(std::string _name) return 0; } +/** it seems finally that the easiest use of the above method is + through the following, whose interface is similar to that of the + widely-used createParam + For some (probably very stupid) reason, I failed to put it in + the .cpp. Any hint??? +*/ +/* +template +eoValueParam& eoParser::getORcreateParam ( + ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand, + std::string _section, + bool _required) +{ + eoParam* ptParam = getParamWithLongName(_longName); + if (ptParam) { // found + eoValueParam* ptTypedParam = + dynamic_cast*>(ptParam); + return *ptTypedParam; + } + // not found -> create it + return createParam (_defaultValue, _longName, _description, + _shortHand, _section, _required); +} +*/ + void eoParser::processParam(eoParam& param, std::string section) { doRegisterParam(param); // plainly register it @@ -328,55 +384,57 @@ void eoParser::printHelp(ostream& os) bool eoParser::userNeedsHelp(void) { - /* - check whether there are long or short names entered - without a corresponding parameter - */ - - for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) + /* + check whether there are long or short names entered + without a corresponding parameter + */ + // first, check if we want to check that ! + if (stopOnUnknownParam.value()) { - string entry = lIt->first; + for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) + { + string entry = lIt->first; - MultiMapType::const_iterator it; + MultiMapType::const_iterator it; - for (it = params.begin(); it != params.end(); ++it) - { - if (entry == it->second->longName()) - { - break; - } - } + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->longName()) + { + break; + } + } - if (it == params.end()) - { - string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; - messages.push_back(msg); - } + if (it == params.end()) + { + string msg = "Unknown parameter: --" + entry + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } + + for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) + { + char entry = sIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->shortName()) + { + break; + } + } + + if (it == params.end()) + { + string entryString(1, entry); + string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; + messages.push_back(msg); + } + } } - - for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) - { - char entry = sIt->first; - - MultiMapType::const_iterator it; - - for (it = params.begin(); it != params.end(); ++it) - { - if (entry == it->second->shortName()) - { - break; - } - } - - if (it == params.end()) - { - string entryString(1, entry); - string msg = "Unknown parameter: -" + entryString + " entered, type -h or --help to see available parameters"; - messages.push_back(msg); - } - } - - return needHelp.value() || !messages.empty(); + return needHelp.value() || !messages.empty(); } ///////////////// I put these here at the moment diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 52ef152b5..a676259d9 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2001-11-05 16:38:51 $ $Version$ $Author: evomarc $ +CVS Info: $Date: 2002-02-08 07:49:32 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -159,6 +159,32 @@ public: */ eoParam* getParamWithLongName(std::string _name); + /** it seems finally that the easiest use of the above method is + through the following, whose interface is similar to that of the + widely-used createParam + For some (probably very stupid) reason, I failed to put it in + the .cpp. Any hint??? + */ + template + eoValueParam& getORcreateParam + (ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + std::string _section = "", + bool _required = false) +{ + eoParam* ptParam = getParamWithLongName(_longName); + if (ptParam) { // found + eoValueParam* ptTypedParam = + dynamic_cast*>(ptParam); + return *ptTypedParam; + } + // not found -> create it + return createParam (_defaultValue, _longName, _description, + _shortHand, _section, _required); +} + private: void doRegisterParam(eoParam& param) const; @@ -182,6 +208,7 @@ private: LongNameMapType longNameMap; eoValueParam needHelp; + eoValueParam stopOnUnknownParam; mutable std::vector messages; }; From f0452128638bbd915d5c1c90e05c2de9c40e31ec Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 8 Feb 2002 07:51:59 +0000 Subject: [PATCH 0759/2134] Added the constructor from a string --- eo/src/utils/eoRealVectorBounds.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index c29e2fcc8..2fa1ffeb7 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -276,6 +276,14 @@ public: } } + /** Ctor from a string + * and don't worry, the readFrom(string) starts by setting everything to 0! + */ + eoRealVectorBounds(string _s) : eoRealBaseVectorBounds() + { + readFrom(_s); + } + /** Dtor: destroy all ownedBounds - BUG ???*/ virtual ~eoRealVectorBounds() { From 4fea57e84d478821c93f86eec644e55aaf556f39 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 9 Feb 2002 04:58:33 +0000 Subject: [PATCH 0760/2134] First instances of the make_xxx_pareto, where xxx is algo, continue and checkpoint --- eo/src/do/make_algo_pareto.h | 203 ++++++++++++++++++++++++++ eo/src/do/make_checkpoint_pareto.h | 225 +++++++++++++++++++++++++++++ eo/src/do/make_continue_pareto.h | 108 ++++++++++++++ 3 files changed, 536 insertions(+) create mode 100644 eo/src/do/make_algo_pareto.h create mode 100644 eo/src/do/make_checkpoint_pareto.h create mode 100644 eo/src/do/make_continue_pareto.h diff --git a/eo/src/do/make_algo_pareto.h b/eo/src/do/make_algo_pareto.h new file mode 100644 index 000000000..223aed6c7 --- /dev/null +++ b/eo/src/do/make_algo_pareto.h @@ -0,0 +1,203 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_pareto.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_algo_pareto_h +#define _make_algo_pareto_h + +#include "utils/eoData.h" // for eo_is_a_rate +// everything tha's needed for the algorithms - SCALAR fitness + +// Selection +// the eoSelectOne's +#include "eoSelectFromWorth.h" +#include "eoNDSorting.h" + +// Breeders +#include "eoGeneralBreeder.h" + +// Replacement - at the moment limited to eoNDPlusReplacement, locally defined +#include "eoReplacement.h" + +template +class eoNDPlusReplacement : public eoReplacement +{ +public: + eoNDPlusReplacement(eoPerf2Worth& _perf2worth) : perf2worth(_perf2worth) {} + + struct WorthPair : public pair + { + bool operator<(const WorthPair& other) const { return other.first < first; } + }; + + void operator()(eoPop& _parents, eoPop& _offspring) + { + unsigned sz = _parents.size(); + _parents.reserve(_parents.size() + _offspring.size()); + copy(_offspring.begin(), _offspring.end(), back_inserter(_parents)); + + // calculate worths + perf2worth(_parents); + perf2worth.sort_pop(_parents); + perf2worth.resize(_parents, sz); + + _offspring.clear(); + } + +private : + eoPerf2Worth& perf2worth; +}; + + +// Algorithm (only this one needed) +#include "eoEasyEA.h" + + // also need the parser and param includes +#include "utils/eoParser.h" +#include "utils/eoState.h" + + +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here +*/ + +template +eoAlgo & do_make_algo_pareto(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + // the selection + string & selStr = _parser.createParam(string("NSGA-II"), "selCrit", "Pareto Selection Criterion: NSGA, NSGA-II, ParetoRanking", 'S', "Evolution Engine").value(); + double nicheSize = _parser.createParam(1.0, "nicheSize", "Size of niche for NSGA-I", '\0', "Evolution Engine").value(); + eoPerf2Worth *p2w; + if ( (selStr == string("NSGA")) || (selStr == string("NSGA-I") ) ) + p2w = new eoNDSorting_I(nicheSize); + else if (selStr == string("NSGA-II")) + p2w = new eoNDSorting_II(); + else if (selStr == string("ParetoRanking")) + { + eoDominanceMap& dominance = _state.storeFunctor(new eoDominanceMap); + p2w = new eoParetoRanking(dominance); + } + + _state.storeFunctor(p2w); + + // now the selector (from p2w) - cut-and-pasted from make_algo_scalar! + // only all classes are now ...FromWorth ... + // only the ranking is not re-implemented (yet?) + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Random", 'S', "Evolution Engine"); + + eoParamParamType & ppSelect = selectionParam.value(); // pair > + + eoSelectOne* select ; + if (ppSelect.first == string("DetTour")) + { + unsigned detSize; + + if (!ppSelect.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + select = new eoDetTournamentWorthSelect(*p2w, detSize); + } + else if (ppSelect.first == string("StochTour")) + { + double p; + if (!ppSelect.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + + select = new eoStochTournamentWorthSelect(*p2w, p); + } +// else if (ppSelect.first == string("Sequential")) // one after the other +// { +// bool b; +// if (ppSelect.second.size() == 0) // no argument -> default = ordered +// { +// b=true; +// // put back in parameter for consistency (and status file) +// ppSelect.second.push_back(string("ordered")); +// } +// else +// b = !(ppSelect.second[0] == string("unordered")); +// select = new eoSequentialWorthSelect(b); +// } + else if (ppSelect.first == string("Roulette")) // no argument (yet) + { + select = new eoRouletteWorthSelect(*p2w); + } + else if (ppSelect.first == string("Random")) // no argument, no perf2Worth + { + select = new eoRandomSelect; + } + else + { + string stmp = string("Invalid selection: ") + ppSelect.first; + throw runtime_error(stmp.c_str()); + } + + _state.storeFunctor(select); + + + // the number of offspring + eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); + + // the replacement + // actually limited to eoNDPlusReplacement + eoReplacement & replace = _state.storeFunctor( + new eoNDPlusReplacement(*p2w) + ); + + // the general breeder + eoGeneralBreeder *breed = + new eoGeneralBreeder(*select, _op, offspringRateParam.value()); + _state.storeFunctor(breed); + + // now the eoEasyEA + eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, replace); + _state.storeFunctor(algo); + // that's it! + return *algo; +} + +#endif diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h new file mode 100644 index 000000000..8e325ec3d --- /dev/null +++ b/eo/src/do/make_checkpoint_pareto.h @@ -0,0 +1,225 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_pareto.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_pareto_h +#define _make_checkpoint_pareto_h + +#include + +#include "eoParetoFitness.h" +#include "utils/selectors.h" +#include "EO.h" +#include "eoEvalFuncCounter.h" +#include "utils/checkpointing" + +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); +/////////////////// The checkpoint and other I/O ////////////// + +/** Of course, Fitness needs to be an eoParetoFitness!!! + */ +template +eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + // first, create a checkpoint from the eoContinue - and store in _state + eoCheckPoint & checkpoint = + _state.storeFunctor(new eoCheckPoint(_continue)); + + /////// get number of obectives from Fitness - not very elegant + typedef typename EOT::Fitness Fit; + Fit fit; + unsigned nObj = fit.size(); + + /////////////////// + // Counters + ////////////////// + // is nb Eval to be used as counter? + bool useEval = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output").value(); + + // Create anyway a generation-counter parameter WARNING: not stored anywhere!!! + eoValueParam *generationCounter = new eoValueParam(0, "Gen."); + // Create an incrementor (sub-class of eoUpdater). + eoIncrementor & increment = + _state.storeFunctor(new eoIncrementor(generationCounter->value()) ); + // Add it to the checkpoint, + checkpoint.add(increment); + + // dir for DISK output + string & dirName = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value(); + // shoudl we empty it if exists + eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); + bool dirOK = false; // not tested yet + + ///////////////////////////////////////// + // now some statistics on the population: + ///////////////////////////////////////// + /** + * existing stats for Pareto as of today, Jan. 31. 2002 + * + * eoSortedPopStat : whole population - type string (!!) + */ + + eoValueParam& fPlotParam = _parser.createParam(eoParamParamType("1(0,1)"), "frontPlot", "Fronts (pairs of comma-separated objectives in 1 single parentheses pair)", '\0', "Output - Graphical"); + + eoParamParamType & fPlot = fPlotParam.value(); // pair > + unsigned frequency = atoi(fPlot.first.c_str()); + if (frequency) // something to plot + { + unsigned nbPlot = fPlot.second.size(); + if ( nbPlot % 2 ) // odd! + throw runtime_error("Odd number of objectives in make_checkpoint_pareto"); + + // only create the necessary stats + std::vector bStat(nObj, false); // track of who's already there + std::vector* > theStats(nObj); + + for (unsigned i=0; i* fStat; + if (!bStat[obj1]) // not already there: create it + { + char s[1024]; + ostrstream os(s, 1022); + os << "Obj. " << obj1 << ends; + fStat = new eoMOFitnessStat(obj1, s); + _state.storeFunctor(fStat); + bStat[obj1]=true; + theStats[obj1]=fStat; + checkpoint.add(*fStat); + } + if (!bStat[obj2]) // not already there: create it + { + char s2[1024]; + ostrstream os2(s2, 1022); + os2 << "Obj. " << obj2 << ends; + fStat = new eoMOFitnessStat(obj2, s2); + _state.storeFunctor(fStat); + bStat[obj2]=true; + theStats[obj2]=fStat; + checkpoint.add(*fStat); + } + +#if !defined(NO_GNUPLOT) + char s3[1024]; + ostrstream os3(s3, 1022); + os3 << "Front." << obj1 << "." << obj2 << "." << ends; + eoGnuplot1DSnapshot & snapshot = _state.storeFunctor(new + eoGnuplot1DSnapshot(dirName, frequency, s3 ) ); + snapshot.pointSize =3; + + checkpoint.add(snapshot); + + snapshot.add(*theStats[obj1]); + snapshot.add(*theStats[obj2]); +#endif + } + } + // Dump of the whole population + //----------------------------- + bool printPop = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output").value(); + eoSortedPopStat * popStat; + if ( printPop ) // we do want pop dump + { + cout << "On cree printpop\n"; + popStat = & _state.storeFunctor(new eoSortedPopStat); + // add it to the checkpoint + checkpoint.add(*popStat); + } + + /////////////// + // The monitors + /////////////// + // do we want an eoStdoutMonitor? + bool needStdoutMonitor = printPop ; // only this one at the moment + + // The Stdout monitor will print parameters to the screen ... + if ( needStdoutMonitor ) + { + eoStdoutMonitor & monitor = _state.storeFunctor(new eoStdoutMonitor(false)); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(*generationCounter); + if (useEval) // we want nb of evaluations + monitor.add(_eval); + if ( printPop) + monitor.add(*popStat); + } + + + ////////////////////////////////// + // State savers + ////////////////////////////// + + // feed the state to state savers + // save state every N generation + eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); + + if (_parser.isItThere(saveFrequencyParam)) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirName, eraseParam.value()); // TRUE + + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); +#ifdef _MSVC + string stmp = dirName + "\generations"; +#else + string stmp = dirName + "/generations"; +#endif + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint.add(*stateSaver1); + } + + // save state every T seconds + eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); + if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirName, eraseParam.value()); // TRUE + +#ifdef _MSVC + string stmp = dirName + "\time"; +#else + string stmp = dirName + "/time"; +#endif + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); + _state.storeFunctor(stateSaver2); + checkpoint.add(*stateSaver2); + } + + // and that's it for the (control and) output + return checkpoint; +} + +#endif diff --git a/eo/src/do/make_continue_pareto.h b/eo/src/do/make_continue_pareto.h new file mode 100644 index 000000000..d5b4400dc --- /dev/null +++ b/eo/src/do/make_continue_pareto.h @@ -0,0 +1,108 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_pareto.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_continue_pareto_h +#define _make_continue_pareto_h + +/* +Contains the templatized version of parser-based choice of stopping criterion +for Pareto optimization (e.g. no "... without improvement" criterion +It can then be instantiated, and compiled on its own for a given EOType +(see e.g. in dir ga, ga.cpp) +*/ + +// Continuators - all include eoContinue.h +#include +#include +#include +#include +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif + + // also need the parser and param includes +#include +#include + + +/////////////////// helper function //////////////// +template +eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) +{ + if (_combined) // already exists + _combined->add(*_cont); + else + _combined = new eoCombinedContinue(*_cont); + return _combined; +} + +///////////// The make_continue function +template +eoContinue & do_make_continue_pareto(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + //////////// Stopping criterion /////////////////// + // the combined continue - to be filled + eoCombinedContinue *continuator = NULL; + + // for each possible criterion, check if wanted, otherwise do nothing + + // First the eoGenContinue - need a default value so you can run blind + // but we also need to be able to avoid it <--> 0 + eoValueParam& maxGenParam = _parser.createParam(unsigned(100), "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); + + if (maxGenParam.value()) // positive: -> define and store + { + eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); + _state.storeFunctor(genCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, genCont); + } + +#ifndef _MSC_VER + // the CtrlC interception (Linux only I'm afraid) + eoCtrlCContinue *ctrlCCont; + eoValueParam& ctrlCParam = _parser.createParam(true, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); + if (_parser.isItThere(ctrlCParam)) + { + ctrlCCont = new eoCtrlCContinue; + // store + _state.storeFunctor(ctrlCCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, ctrlCCont); + } +#endif + + // now check that there is at least one! + if (!continuator) + throw runtime_error("You MUST provide a stopping criterion"); + // OK, it's there: store in the eoState + _state.storeFunctor(continuator); + + // and return + return *continuator; +} + +#endif From 6546cb8c52707f55527de6ba4d5d36eac9718893 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 9 Feb 2002 05:01:48 +0000 Subject: [PATCH 0761/2134] Corrected a serious bug in eoUniformMutation (double declaration of bool HasChanged) The consequence was that if that mutation was the only operator called on some individual, it was not invalidated, and hence its fitness not recomputed!!! --- eo/src/es/eoRealOp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 06528cc2b..01d7d6e8b 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -111,7 +111,6 @@ template class eoUniformMutation: public eoMonOp if (_eo.size() != bounds.size()) throw runtime_error("Invalid size of indi in eoUniformMutation"); - bool hasChanged=false; for (unsigned lieu=0; lieu<_eo.size(); lieu++) if (rng.flip(p_change[lieu])) { From 49dd11d2c59f125c2f54f2d3e811eec566097d13 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 11 Feb 2002 06:26:48 +0000 Subject: [PATCH 0762/2134] Added the getCounter() method so subclasses have a hand on the generation nb --- eo/src/utils/eoFileSnapshot.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index b5eb55e6b..a43f1d656 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -83,6 +83,10 @@ public : */ virtual bool hasChanged() {return boolChanged;} + /** accessor to the counter: needed by the gnuplot subclass + */ + unsigned getCounter() {return counter;} + /** accessor to the current filename: needed by the gnuplot subclass */ string getFileName() {return currentFileName;} From 78a8f3cd57a915764133f078f03653d06293ed07 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 11 Feb 2002 06:27:44 +0000 Subject: [PATCH 0763/2134] Added a title (Gen. X) to the plot so you can follow what's going on --- eo/src/utils/eoGnuplot1DSnapshot.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 8134b1dda..919f1b318 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -92,16 +92,10 @@ inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) eoFileSnapshot::operator()(); // sends plot order to gnuplot - // assumes successive plots will have same nb of columns!!! - - char buff[1024]; ostrstream os(buff, 1024); - os << "plot"; - - os << " '" << getFileName().c_str() << - "' notitle with points ps " << pointSize ; - os << "\n"; + os << "set title 'Gen. " << getCounter() << "'; plot '" + << getFileName() << "' notitle with points ps " << pointSize << "\n"; os << '\0'; PipeComSend( gpCom, buff ); From fb09ff1ac7952c36ba081433df9e980cc31b0d7d Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 11 Feb 2002 06:28:52 +0000 Subject: [PATCH 0764/2134] Added file monitors for the population in the Pareto space (were ony available as eoGnulpot1DSnapshors before) --- eo/src/do/make_checkpoint_pareto.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h index 8e325ec3d..7d638b375 100644 --- a/eo/src/do/make_checkpoint_pareto.h +++ b/eo/src/do/make_checkpoint_pareto.h @@ -83,7 +83,11 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, * eoSortedPopStat : whole population - type string (!!) */ - eoValueParam& fPlotParam = _parser.createParam(eoParamParamType("1(0,1)"), "frontPlot", "Fronts (pairs of comma-separated objectives in 1 single parentheses pair)", '\0', "Output - Graphical"); + eoValueParam& fPlotParam = _parser.createParam(eoParamParamType("1(0,1)"), "frontFileFrequency", "File save frequency in objective spaces (pairs of comma-separated objectives in 1 single parentheses pair)", '\0', "Output - Disk"); + +#if !defined(NO_GNUPLOT) + bool boolGnuplot = _parser.createParam(false, "plotFront", "Objective plots (requires corresponding files - see frontFileFrequency", '\0', "Output - Graphical").value(); +#endif eoParamParamType & fPlot = fPlotParam.value(); // pair > unsigned frequency = atoi(fPlot.first.c_str()); @@ -91,13 +95,14 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, { unsigned nbPlot = fPlot.second.size(); if ( nbPlot % 2 ) // odd! - throw runtime_error("Odd number of objectives in make_checkpoint_pareto"); + throw runtime_error("Odd number of front description in make_checkpoint_pareto"); // only create the necessary stats std::vector bStat(nObj, false); // track of who's already there std::vector* > theStats(nObj); - for (unsigned i=0; i& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, checkpoint.add(*fStat); } -#if !defined(NO_GNUPLOT) + // then the fileSnapshots char s3[1024]; ostrstream os3(s3, 1022); os3 << "Front." << obj1 << "." << obj2 << "." << ends; - eoGnuplot1DSnapshot & snapshot = _state.storeFunctor(new - eoGnuplot1DSnapshot(dirName, frequency, s3 ) ); - snapshot.pointSize =3; + eoFileSnapshot & snapshot = _state.storeFunctor(new + eoFileSnapshot(dirName, frequency, s3 ) ); checkpoint.add(snapshot); snapshot.add(*theStats[obj1]); snapshot.add(*theStats[obj2]); + + // and create the gnuplotter from the fileSnapshot +#if !defined(NO_GNUPLOT) + if (boolGnuplot) + { + eoGnuplot1DSnapshot & plotSnapshot = _state.storeFunctor(new + eoGnuplot1DSnapshot(snapshot)); + plotSnapshot.pointSize =3; + checkpoint.add(plotSnapshot); + } #endif } } From 194f6bf45ec4a6a7d97699a8761b6970761447ca Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 5 Mar 2002 05:34:27 +0000 Subject: [PATCH 0765/2134] Changed the reading of parameter resDir from createParam to getORcreateParam so it can be used in other parts of hte program (it's handy to put all disk outputs in one dir). --- eo/src/do/make_checkpoint_pareto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h index 7d638b375..4acd0295b 100644 --- a/eo/src/do/make_checkpoint_pareto.h +++ b/eo/src/do/make_checkpoint_pareto.h @@ -69,7 +69,7 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, checkpoint.add(increment); // dir for DISK output - string & dirName = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value(); + string & dirName = _parser.getORcreateParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value(); // shoudl we empty it if exists eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); bool dirOK = false; // not tested yet From 8f740ab8846ff3c663cdb14ecdf06d9fc814e30a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 5 Mar 2002 05:38:21 +0000 Subject: [PATCH 0766/2134] Adding class eoParetoOneConstraintFitness, multi-valued fitness + 1 constraint This file shoudl contain the general Pareto+contraint class - but I'm in a big hurry. --- eo/src/eoParetoConstraintFitness.h | 229 +++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 eo/src/eoParetoConstraintFitness.h diff --git a/eo/src/eoParetoConstraintFitness.h b/eo/src/eoParetoConstraintFitness.h new file mode 100644 index 000000000..c6c0446da --- /dev/null +++ b/eo/src/eoParetoConstraintFitness.h @@ -0,0 +1,229 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParetoConstraintFitness.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@cs.vu.nl + Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoParetoConstraintFitness_h +#define _eoParetoConstraintFitness_h + +#include +#include +#include +#include + + + +/** + eoParetoOneConstraintFitness class: + std::vector of doubles + constraint value + + Comparison (dominance) is done + on pareto dominance for 2 feasible individuals, + one feasible individual always wins over an infeasible + on constraint violations for 2 infeasible individuals + + The template argument FitnessTraits defaults to + eoParetoFitnessTraits, which can be replaces at will by any other + class that implements the static functions defined therein. + + Note that the domninance defines a partial order, so that + !dominates(a,b) && !domaintes(b,a) does not neccessarily imply that (a==b) + The other way around does hold. + + However, be careful that the comparison operators do define a total order + based on considering first objective, then in case of tie, second objective, etc + + NOTE: in a hurry, I did not want to make it derive from eoParetoFitness + (used cut-and-paste instead!) : I know it might be a good idea, but I'm + not sure I see why at the moment (any hint someone?) +*/ +template +class eoParetoOneConstraintFitness : public std::vector +{ +private: + // this class implements only 1 inequality constraint + // (must ponder a bit for generality without huge overload) + double constraintValue; // inequality cstr - must be negative + +public : + typedef FitnessTraits fitness_traits; + + eoParetoOneConstraintFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} + + // Ctr from a vector (size nObjectives+1) + eoParetoOneConstraintFitness(std::vector & _v) : + std::vector(_v) + { +#ifndef NDEBUG + if (_v.size() != fitness_traits::nObjectives()+1) + throw runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from vector"); +#endif + constraintValue = _v[fitness_traits::nObjectives()]; + resize(fitness_traits::nObjectives()); + } + + // Ctr from a vector and a value + eoParetoOneConstraintFitness(std::vector & _v, double _c) : + std::vector(_v), constraintValue(_c) + { +#ifndef NDEBUG + if (_v.size() != fitness_traits::nObjectives()) + throw runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from vector and value"); +#endif + } + + + /** access to the traits characteristics (so you don't have to write + * a lot of typedef's around + */ + static void setUp(unsigned _n, std::vector & _b) {FitnessTraits::setUp(_n, _b);} + static bool maximizing(unsigned _i) { return FitnessTraits::maximizing(_i);} + + bool feasible() const { return constraintValue<=0;} + double violation() const { return (feasible()?0.0:constraintValue);} + double ConstraintValue() const {return constraintValue;} + void ConstraintValue(double _c) {constraintValue=_c;} + + /// Partial order based on Pareto-dominance + //bool operator<(const eoParetoFitness& _other) const + bool dominates(const eoParetoOneConstraintFitness& _other) const + { + bool dom = false; + + double tol = FitnessTraits::tol(); + const std::vector& performance = *this; + const std::vector& otherperformance = _other; + + if (feasible() && _other.feasible()) + // here both are feasible: do the "standard" domination + for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) + { + bool maxim = FitnessTraits::maximizing(i); + double aval = maxim? performance[i] : -performance[i]; + double bval = maxim? otherperformance[i] : -otherperformance[i]; + + if (fabs(aval - bval) > tol) + { + if (aval < bval) + { + return false; // cannot dominate + } + // else aval < bval + dom = true; // for the moment: goto next objective + } + //else they're equal in this objective, goto next + } + else + { // one at least is not feasible + if (feasible()) + return true; // feasible wins + else if (_other.feasible()) + return false; // feasible wins + return (violation()<_other.violation()); // smallest violation wins + } + + return dom; + } + + /// compare *not* on dominance, but on the first, then the second, etc + bool operator<(const eoParetoOneConstraintFitness& _other) const + { + double tol = FitnessTraits::tol(); + const std::vector& performance = *this; + const std::vector& otherperformance = _other; + for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) + { + bool maxim = FitnessTraits::maximizing(i); + double aval = maxim? performance[i] : -performance[i]; + double bval = maxim? otherperformance[i] : -otherperformance[i]; + + if (fabs(aval-bval) > tol) + { + if (aval < bval) + return true; + + return false; + } + } + + return false; + } + + bool operator>(const eoParetoOneConstraintFitness& _other) const + { + return _other < *this; + } + + bool operator<=(const eoParetoOneConstraintFitness& _other) const + { + return operator==(_other) || operator<(_other); + } + + bool operator>=(const eoParetoOneConstraintFitness& _other) const + { + return _other <= *this; + } + + bool operator==(const eoParetoOneConstraintFitness& _other) const + { // check if they're all within tolerance + for (unsigned i = 0; i < size(); ++i) + { + if (fabs(operator[](i) - _other[i]) > FitnessTraits::tol()) + { + return false; + } + } + return true; + } + + bool operator!=(const eoParetoOneConstraintFitness& _other) const + { return ! operator==(_other); } + +}; + +template +std::ostream& operator<<(std::ostream& os, const eoParetoOneConstraintFitness& fitness) +{ + for (unsigned i = 0; i < fitness.size(); ++i) + { + os << fitness[i] << ' '; + } + os << fitness.ConstraintValue() << " " ; + return os; +} + +template +std::istream& operator>>(std::istream& is, eoParetoOneConstraintFitness& fitness) +{ + fitness = eoParetoOneConstraintFitness(); + for (unsigned i = 0; i < fitness.size(); ++i) + { + is >> fitness[i]; + } + double r; + is >> r; + fitness.ConstraintValue(r); + return is; +} + +#endif From c7743f88eff30bb77b934bebd88f6692d6afae71 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 5 Mar 2002 05:46:55 +0000 Subject: [PATCH 0767/2134] Corrected a sligth error in eoParamParam reading that resulted in making the comma part of the stored string value --- eo/src/utils/eoParam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 4ca81fe30..ce054a315 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -412,7 +412,7 @@ public: std::string u = t.substr(pos,posEnd);//(t, pos); /*u.resize(posEnd - pos);*/ second.push_back(u); - t = t.substr(posEnd); + t = t.substr(posEnd+1); } } }; From dcee458c27d51bf1201145ffcb089c0c23e7fde9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 6 Mar 2002 06:25:40 +0000 Subject: [PATCH 0768/2134] Added some explanations about the memory mangement (through eoFunctorStore) --- eo/tutorial/html/eoLesson3.html | 26 ++++--- eo/tutorial/html/eoLesson4.html | 94 +++++++++++++++++++++-- eo/tutorial/html/eoOperators.html | 101 +++++++++++++++---------- eo/tutorial/html/eoProgramming.html | 113 ++++++++++++++++++++++++---- eo/tutorial/html/eoTutorial.html | 18 ++--- 5 files changed, 266 insertions(+), 86 deletions(-) diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index 5213ec9ae..80726afe8 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 3 @@ -142,7 +142,7 @@ See the parameter section of the Component-Based tutorial, or wait until class, whose only purpose is the input of parameters.
      -
      eoParser: +
      eoParser: Modifying parameter values at run-time:
      Using an eoParser object, the parameter values are read, by order of priority @@ -172,10 +172,10 @@ the general syntax to modify parameter value at run-time is (either from the command-line or in a text file)
                     - --longKeyword=value     or     -cvalue    -if 'c' is the short keyword (though -c=value also works) +if 'c' is the short keyword (though -c=value +also works)
       
    • so, after compiling the executable for Lesson 3 (make @@ -183,12 +183,10 @@ lesson3 at system prompt in Unix), you can try to type in

    •                 - SecondBitEA
      and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). But you can now type in
                      - SecondBitEA --vecSize=100
      and see the output of the optimization of OneMax on 100-bit bitstrings.
        @@ -196,7 +194,6 @@ But you can now type in Take a look at all available parameters by typing in
                      - SecondBitEA --help
      or by going into the code: all parameter inputs have been grouped in the @@ -208,7 +205,8 @@ it contains the list of all actual parameters used, and can directly be used as parameter input file: change the file name (e.g. to SecondBitEA.param), edit it, change whichever parameter you want, and type in -
                        +
                       + SecondBitEA @SecondBitEA.param
      and you will see all values that you defined into the file taken into account. @@ -247,7 +245,9 @@ of eoParam returns a reference, so you can eventually modify its value somewhere else later (though of course this is not any useful for variable seed!).
    - +There is however another way to achieve the same result in less lines of +code - with a different memory management (see Lesson4). +


    eoState: saving and loadingYou might have @@ -276,7 +276,11 @@ method, as done here. method for an
    eoState object anywhere in the code. But the checkpointing mechanism offers you better ways to do that - and it's so easy .... -

    +

    Note that an eoState alos has another use in EO whan it comes to memory +management: it can be a repository of pointers that are not allocated within +obects - allowing to delete them by simply deleting the eoState (see Lesson +4). +


    eoCheckpoint: every generation I'd like to ...
    The checkpointing mechanism is a very powerful @@ -544,4 +548,4 @@ documentation

    Last modified: None of your business! - + diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index e8b518ab7..087bf4960 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -2,12 +2,12 @@ - + Tutorial: Lesson 4 -Lesson 3 - -Lesson +Lesson 3 - +Lesson 5 - Main page - Algorithm-Based @@ -485,8 +485,8 @@ Bounds for uniform initialization of the real variables. The syntax for this parameter given in the
    objectBounds parameter description below. This argument is mandatory, furthermore the given bounds must be bounded. -The default is [-1,1] -for all variables. +
    The +default is [-1,1] for all variables.
    Note that this parameter is independent of the objectBounds parameter below.

    # --sigmaInit=0.3 # -s : @@ -726,10 +726,88 @@ correlated mutation. Default is 0.0873



    Programmer's -guide -
    Lesson +guide
    +

    At the moment, you will have to browse in the source (colored!) code +(Bit - Real) almost by yourself, sorry. +

    Note that the main file is now very slim, as it only contains calls +to some make_xxx +functions - these functions contain the actual code, very similar to the +code of Lesson3, except for the memory management, performed through an +eoState +object (notice that all make_xxx +calls have an eoState as second parameter). +

    Programmer's guide: The +make_xxx files +

    Interface: all make_xxx +files have as first two parameters an eoParser +and an eoState. +The eoParser +is be used within all functions to parse the command-line and/or a parameter +file in order to read any relevant user-parameter, while the eoState +is used here to store all pointers to be allocated inside the function +(see Programming hints for more +detailed explanations). +

    There are 2 types of make_xxx +files: the ones that do depend on representation, defining the genotype +and +initialization (make_genotype_xxx, +with xxx being the type of genotype) and variation operators (make_op_xxx), +and the one that are truly representation-independent (make_pop, +make_continue, make _checkpoint, make_algo and +make_run). +
    The former are located in the directory corresponding to the actual +genotype (src/ga +for eoBit, src/es +for eoReal and all eoESxxx genotypes). The latter are in the directory +src/do. +

    If you take a close look at the code of make_continue +for instance, you will first notice that ... the function declared there +is called do_make_continue +and is not the one you are calling in +the main file, though it has the same parameters as arguments. +
    The explanation lies within the file make_continue_xxx.cpp +(with xxx = ga or real/es)which, as its color (and name)  should have +told you about, are representation-dependent: in fact the make_continue_xxx.cpp +files only instanciates the general <EOT> template into one of the possible +template for eoBit or eoReal/eoES - and this trick allows to compile +them separately! +

    The other thing that you should notice is that the code there is very +similar to the code that was in Lesson 3,  regarding parameter reading +and type of object that are allocated - except for memory management. This +goes for all make_xxx +files - so the only thing you need to understand how it goes is to look +at the memory management section. +

    Pros: you don't have to handle a +huge main function - and many of the make_xxx files can be directly used +in different applications (this is called modularity +:-))) +
    More interesting, you can even compile +the make_xxx +files separately for a given target +template, and link them e.g. with your fitness function when it is ready +(remember that up to now you needed to compile everything altogether by +including the code into your mail fine). Indeed, if you do a global make, +you will notice that there are additional libraries compiled in src/ga +and src/es +... +

    Cons: It makes the code a little +more complex to understand, first because of the indirection needed for +pre-compilation with a given template, and second because of the memory +management that this imposes. +

    Programmer's +guide: Memory management +
    As already said, all functions have an eoState +as second argument - and that object is used to store the functor objects +that were simply declared as variables of the main function up to now : +see Programming hints for more +detailed explanations and take a look at the code of make_continue +for instance, you will see the implementation of the memory management +in action. +
      +

    +


    Lesson 3 - -Lesson 5 - +Lesson 5 - Main page - Algorithm-Based - Component-Based diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index 8884adaae..87ff6491e 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -2,7 +2,7 @@ - + Variation Operators @@ -148,27 +148,27 @@ an eoQuad object.
    Directly applying crossover operators is straightforward from the interface above:
    eoBinOpDerivedClass<Indi> myBinOp(parameters); - -//  use constructor to pass +
    //  +use constructor to pass
    eoQuadOpDerivedClass<Indi> myQuadOp(parameters); //  any useful argument
    Indi eo1= ..., eo2= ...;   // the candidates to crossover
    if (myBinOp(eo1, eo2)) -
       { ...                  +
       { ...               // eo1 has been modified, not eo2
       } -
    else ...                  +
    else ...               // none has been modified
    if (myQuadOp(eo1, eo2)) -
       { ...                  +
       { ...               // both eo1 and eo2 have been modified
       } -
    else ...                  +
    else ...               // none has been modified

    However, you will hardly have to actually apply operators to individuals, @@ -225,13 +225,12 @@ above:
    Indi eo = ...;           // eo is candidate to mutation
    if (myMutation(eo)) -
       { ...     - -// eo has been modified +
       { ...    // +eo has been modified
       } -
    else         - -// eo has not been modified +
    else      +// +eo has not been modified

    However, you will hardly have to actually apply operators to individuals, as operators are used within other classes, and are applied systematically to whole sets of individuals (e.g. that have already been selected, in @@ -303,29 +302,47 @@ but rather through objects of type eoOpContainer<

    This results in the following general interface for an eoGenOp: It receives as argument an eoPopulator, gets the individuals it needs using the operator*, -and must handle the positinning of the  using the operator++ -method. +and must handle the positinning of the  using the ++operator +method (Warning: the operator++ +method is not defined, as recommended by many good-programming-style books).

    bool apply()(eoPopulator& _pop)
    {
       EOT& parent1 = *_pop; // select the first parent -
       ++_plop;      - -// advance once for each selected parents +
       ++_plop;   +// +advance once for each selected parents
       ...
       EOT& parentN = *_pop; // select the last parent -
            - -// don't advance after the last one: _plop always +
           // +don't advance after the last one: _plop always
                // points to the last that has already been treated

    // do whatever the operator is supposed to do
    } +

    Warning: as said above, an eoPopulator +should always point to the last individual that has already been treated. +This is because it is intended to be used within a loop that looks like +(see e.g. eoBreeder +class): +

          eoSelectivePopulator<EOT> +popit(_parents, _offspring, select);    // eoSelect +is an eoSelectOne +
          while (_offspring.size() +< target) +
              +{ +
                   +op(popit); +
                  +++it; +
              +}

    What happens next? Well, it all depends on how many parents and how many offspring your general op needs:

      @@ -340,9 +357,7 @@ were parents, it needs to insert them into the list using the eoPopulator as in the following: -
        -

        -

      void apply()(eoPopulator& +


      void apply()(eoPopulator& _pop)
      {
        // get the necessary number @@ -380,10 +395,8 @@ outside the curent list, so the total number of (intermediate) offspring is always equal to the initial population size. By chance, the eoPopulatorhas a handle on the initial population that was used to start the process, and you can access it from inside the GenOp method. For instance - -
        -

        -

      void apply()(eoPopulator& + +


      void apply()(eoPopulator& _pop)
      {
        // get as many parents as you @@ -414,8 +427,8 @@ If you don't care about the size of the offspring population (that is, if that size os controlled elsewhere, e.g. in some external loop), you can use the inbedded select method of the class eoPopulator. For instance - -
      void apply()(eoPopulator& + +


      void apply()(eoPopulator& _pop)
      {
        // get as many parents as you @@ -555,7 +568,8 @@ of parents, then you must use an Example: An eoSelectivePopulator -is the main ingredient of the eoGeneralBreederoperator() +is the main ingredient of the eoGeneralBreeder +operator() method - a class that creates a population of offspring from the parents applying an eoGenOp (usually an eoOpContainer) to all selected parents in turn. @@ -758,17 +772,21 @@ _pop)
      {
        EOT & eo1 = *_pop; // get (select if necessary) the first guy -
        EOT & maBlonde = findBlonde(_pop.source()); +
        EOT maBlonde = findBlonde(_pop.source()); // select mate
        // do whatever the operator is supposed -to do +to do, e.g
      +
        cross(eo1, maBonde);       +// cross is some embedded crossover
        ... -
        // if you want to put maBlonde into -the offspring, you must -
        ++_pop;     - -// advance +
        // if you don't want to put maBlonde +into the offspring, +
        // stop here (and use a reference +to maBlonde above). Otherwise +
        maBonde.invalidate(); +
       ++_pop;    // +advance
        _pop.insert(maBlonde);    // and insert it
      } @@ -776,7 +794,8 @@ the offspring, you must
      selector comes from? As usual, you have to attach it to the operator,  in its constructor for instance, which should give something like:

      sexualSelectorType<Indi>  findBlonde; -
      sexualOperatorType<Indi> yourBrainAndMyBeauty(findBlonde); +
      sexualOperatorType<Indi> yourBrainAndMyBeauty(cross, +findBlonde);


      Local: Introduction - Crossover - Mutation @@ -790,10 +809,10 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer

    Last -modified: Sat. Feb. 17 2001  +modified: Sat. Feb. 17 2002 
      diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index cec3d95ba..a3cbf439a 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -2,23 +2,22 @@ - + EO Programming guide General: Tutorial main page - -Algorithm-Based -- Component-Based -- Programming -hints - EO +Algorithm-Based - Component-Based +- Programming hints - EO documentation

    Local: Templates - Functors - STL Library - Random -numbers - EO programming style +numbers - EO programming style  - Memory +management

    @@ -77,11 +76,14 @@ into three derived class. These classes tell you immediately what kind of arguments the operator() method requires and what kind of result it produces. See EO conventions, and the inheritance -diagram of class eoFunctorBase. +diagram of class eoFunctorBase.  Also note that +if you create new functors, you should also derive from one of these classes, +as it is mandatory if you later use the EO memory management +mechanism.
    For a more complete introduction to functors, with detailed discussion, -go to the STL -documentation - as STL also heavily relies on functors, and the eoFunctorBase -paradigm is borrowed from there. +go to the STL documentation +- as STL also heavily relies on functors, and the eoFunctorBase paradigm +is borrowed from there.

    Functors: Example:

    The following is a basic example of how to program and use a functor object: First code the class: @@ -372,7 +374,13 @@ myfunction(unsigned _popSizeclass eoMyClass +
      +

      +
      +
      +
      +
      +

    class eoMyClass
    {
    public:
      eoMyClass(unsigned _popSize):popSize(_popSize){...} @@ -396,18 +404,91 @@ or  +
    EO memory +management +

    Most of EO constructs are based on the encapsulation +of objects into other objects, and the embedded objects are passed through +the constructor of the embedding object. +
    For instance, the construction of an algorithm requires a breeder (plus +many other things of course), the construction of a breeder usually requires +a selector, and in turn the construction of a selector requires some parameters. +This gives something resembling the following +

    eoTournamentSelection<EOT>  select(tSize); +
    eoBreeder<EOT> breed(select); +
    eoEasyAlgo<EOT> algo( ..., breed, ...); +

    Such a practice is no problem when doing everything +in a (large!) main function: all objects are local to that function, +but when the end of the function is also the end of the program. For instance, +all programs in Lesson1, Lesson2 +and Lesson3 of this tutorial are built that +way. +

    It is however a big problem when you want to outsource some code in +other functions: indeed, the above sequence create objects that dissapear +when exiting the function, and thus cannot be used outside their defining +function. +

    The solution is of course to use pointers, +which gives something like +

    eoTournamentSelection<EOT>  *ptSelect += new eoTournamentSelection<EOT>(tSize); +
    eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(select); +
    eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>( +..., breed, ...); +

    and you can then use the dynamically allocated objects anywhere. But +the trouble with such a construct is that after exiting the function where +such objects are defined, you will never be able +to free this allocated memory, should you not need the objects +any nore. Whereas this is not in general a big problem (except of being +a very bad practice that will make you a very naughty programmer :-), it +will prevent any re-entrance of the resulting code, and for instance you +will not be able to use an evolutionary algorithm within another loop of +some outside code. +

    The solution in EO us to use an eoFunctorStore +object to store such nowhere-belonging pointers: whenever you allocate +such a thing, store it into an eoState : deleting that state will delete +all the stored pointers - one eoState is thus the only object you have +to care of. +

    The above pointera llocation sequence thus become +

    eoTournamentSelection<EOT>  *ptSelect += new eoTournamentSelection<EOT>(tSize); +
    state.storeFunctor(ptSelect); +
    eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(select); +
    state.storeFunctor(ptBreed); +
    eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>( +..., breed, ...); +
    state.storeFunctor(ptAlgo); +

    or, even more quickly (though less readably) +

    eoTournamentSelection<EOT>  *ptSelect += +
                   +state.storeFunctor(new eoTournamentSelection<EOT>(tSize)); +
    eoBreeder<EOT> *ptBreed = +
                   +state.storeFunctor(new eoBreeder<EOT>(select)); +
    eoEasyAlgo<EOT> *ptAlgo = +
                   +state.storeFunctor(new eoEasyAlgo<EOT>( ..., breed, ...)); +

    In both the above code, state is an eoFunctorStore +that is of course passed from outside the function +- and it's called state because in most cases it will actually be an eoState. +As its name says, an eoFunctorStore +can store any object that is an (derives from) eoFunctorBase +- hence all objects in EO that are used as functors should derive from +either eoF, eoUF or eBF. +

    Examples of such constructs are shown in the make_xxx files described +in Lesson4. +


    Local: Templates - Functors - STL Library - Random -numbers - EO programming style +numbers - EO programming style  - Memory +management


    General: Tutorial -main page - Algorithm-Based -- Component-Based -- Programming -hints - EO +main page - Algorithm-Based - Component-Based +- Programming hints - EO documentation

    diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index a7c3ec6a0..6cb354d29 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -2,7 +2,7 @@ - + Tutorial EO @@ -18,14 +18,12 @@ and to
    EO Tutorial
    Version 0.96 - Nov. 12 2001 -
    Nothing really new in this - version of the tutorial since -Lesson4, that includes a user guide of - fully operational program for bitstrings and real-valued with - full support of ES self-adaptive mutation strategies. But EO - itself keeps advancing: for instance, this snapshot now -compiles in MSVC++ v. 6.0
    - +
    Nothing really new in this version +of the tutorial since Lesson4, that includes +a user guide of fully operational program for bitstrings and real-valued +with full support of ES self-adaptive mutation strategies. But EO itself +keeps advancing: for instance, this snapshot now compiles +in MSVC++ v. 6.0

    Welcome to EO tutorial/on-line documentation.

    Please note that this tutorial is not supposed @@ -195,7 +193,7 @@ case you make rapid progress ... This menu bar should be on all pages of this tutorial, allowing you to navigate easily.

    Last, but not least: EO is improving only  from the good will of contributors. This is also true for this tutorial: If you find anything -that you think could be improved, you are welcome to e-mail +that you think could be improved, you are welcome to e-mail me.

    Enjoy! From 5881cab5388c65eda12e24d242604b29f896e463 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 6 Mar 2002 06:28:27 +0000 Subject: [PATCH 0769/2134] Added the tags to generate html nice output --- eo/tutorial/Lesson4/BitEA.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/eo/tutorial/Lesson4/BitEA.cpp b/eo/tutorial/Lesson4/BitEA.cpp index 31a22ae3c..961856561 100644 --- a/eo/tutorial/Lesson4/BitEA.cpp +++ b/eo/tutorial/Lesson4/BitEA.cpp @@ -1,9 +1,12 @@ #include #include -#include "binary_value.h" #include +// EVAL +#include "binary_value.h" + +// GENERAL using namespace std; int main(int argc, char* argv[]) @@ -11,25 +14,34 @@ int main(int argc, char* argv[]) try { +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your genotype and fitness types typedef eoBit EOT; +// PARAMETRES eoParser parser(argc, argv); // for user-parameter reading +// GENERAL eoState state; // keeps all things allocated ///// FIRST, problem or representation dependent stuff ////////////////////////////////////////////////////// +// EVAL // The evaluation fn - encapsulated into an eval counter for output eoEvalFuncPtr mainEval( binary_value ); eoEvalFuncCounter eval(mainEval); +// REPRESENTATION // the genotype - through a genotype initializer eoInit& init = make_genotype(parser, state, EOT()); +// OPERATORS // Build the variation operator (any seq/prop construct) eoGenOp& op = make_op(parser, state, init); +// GENERAL //// Now the representation-independent things ////////////////////////////////////////////// @@ -37,32 +49,40 @@ int main(int argc, char* argv[]) // yes, this is representation indepedent once you have an eoInit eoPop& pop = make_pop(parser, state, init); +// STOP // stopping criteria eoContinue & term = make_continue(parser, state, eval); // output eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); +// GENERATION // algorithm (need the operator!) eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); ///// End of construction of the algorith ///////////////////////////////////////// +// PARAMETRES // to be called AFTER all parameters have been read!!! make_help(parser); //// GO /////// +// EVAL // evaluate intial population AFTER help and status in case it takes time apply(eval, pop); - // print it out +// STOP + // print it out (sort witout modifying) cout << "Initial Population\n"; pop.sortedPrintOn(cout); cout << endl; +// GENERATION run_ea(ga, pop); // run the ga - +// STOP + // print it out (sort witout modifying) cout << "Final Population\n"; pop.sortedPrintOn(cout); cout << endl; +// GENERAL } catch(exception& e) { From a80a25c5f57d6e014a14c00c8a53f776ca3806b8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 6 Mar 2002 06:54:00 +0000 Subject: [PATCH 0770/2134] More on parameter input (getORcreateParam explained) --- eo/tutorial/html/eoLesson3.html | 15 ++++++---- eo/tutorial/html/eoLesson4.html | 52 +++++++++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index 80726afe8..faa3fe58d 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -171,7 +171,8 @@ and optionally by a short (1 character) keyword. -
                   +
                  + --longKeyword=value     or     -cvalue    if 'c' is the short keyword (though -c=value @@ -182,18 +183,21 @@ so, after compiling the executable for Lesson 3 (ma lesson3 at system prompt in Unix), you can try to type in -
                    +
                   + SecondBitEA
    and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). But you can now type in -
                    +
                   + SecondBitEA --vecSize=100
    and see the output of the optimization of OneMax on 100-bit bitstrings.
     

  • Take a look at all available parameters by typing in
  • -
                    +
                   + SecondBitEA --help
    or by going into the code: all parameter inputs have been grouped in the @@ -206,7 +210,6 @@ used as parameter input file: change the file name (e.g. to SecondBitEA @SecondBitEA.param
    and you will see all values that you defined into the file taken into account. @@ -217,7 +220,7 @@ so you can still override the values in the parameter file by giving a new value directly on the command-line. -
    eoParser: +
    eoParser: Programming parameter input:
    The code of SeconBitEA provides examples of parameters reading. Lets take the example of the random number diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index 087bf4960..4057f9721 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -750,7 +750,8 @@ detailed explanations).

    There are 2 types of make_xxx files: the ones that do depend on representation, defining the genotype and -initialization (make_genotype_xxx, +initialization +(make_genotype_xxx, with xxx being the type of genotype) and variation operators (make_op_xxx), and the one that are truly representation-independent (make_pop, make_continue, make _checkpoint, make_algo and @@ -794,6 +795,8 @@ and src/es more complex to understand, first because of the indirection needed for pre-compilation with a given template, and second because of the memory management that this imposes. +
      +
     

    Programmer's guide: Memory management
    As already said, all functions have an eoState @@ -803,7 +806,52 @@ see Programming hints for more detailed explanations and take a look at the code of make_continue for instance, you will see the implementation of the memory management in action. -
      +

    Programmer's +guide: Memory management of eoParam +objects +

    It has been seen in Lesson 3 that parameters could be read from command-line +and/or a parameter file using an eoParser +object. However, the memory mangement problem also concerns EO parameter +objects (eoParam): +the way there are read in Lesson3 +makes them local variables of the function they are defined in. +
    It is however possible to ask the eoParser +to hold them, as done for instance in eoContinue for the maximum number +of generations. Local declaration would amount to something like : +

    eoValueParam<unsigned +int>& maxGenParam(100, "maxGen", "Maximum number of generations () += none)",'G'); +
     parser.processParam( +maxGenParam, "Stopping criterion" ); +
     unsigned maxGen = +maxGenParam.value(); +

    while if you want the parser to hold those eoParam objects, you will +write something like +

    eoValueParam<unsigned>& +maxGenParam = _parser.createParam(unsigned(100), "maxGen", "Maximum number +of generations () = none)",'G',"Stopping criterion"); +

    and then use maxGenParam.value() +to get the value enterred by the user. In that case, you get a reference +to an eoParam object that is hold by the eoParser - and deleted whith it. +
    Note that there are two important differences +between the arguments of the constructor of an eoParam object and the method +createParam of an eoParser object: first, you need to provide the additional +section parameter (used only when outputting the eoParser); second you +must make sure that the first argument +is of the correct type otherwise the compiler will complain. +

    Note that if you don't later need the eoParam, but simply its value, +you can even diretly write +

    unsigned maxGen = _parser.createParam(unsigned(100), +"maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion").value(); +

    Getting parameter values in different functions: +

    It is often useful (though probably very bad +programming style :-))) to be able to get the value of a user-defined +parameter in two different places of the code without passing it around +through many levels of call. You can then use the alternate function getORcreateParam +with exactly the same syntax than createParam. +
    Be careful that the link between both parameters is made through their +longmanes (second argument), and that you must so hard-code +that name in two different places with of course exactly the same spelling!!!


    Lesson 3 - From b8661ed2b620f03f62d0622c0b129a24fd223bcf Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 15 Mar 2002 06:06:22 +0000 Subject: [PATCH 0771/2134] Corrected a few linkgs to the documentation Reaplced eoBin with eiBit (about time!!!) --- eo/tutorial/html/eoProgramming.html | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index a3cbf439a..43593dd9c 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -33,14 +33,15 @@ naming variables in algebra: you can write a lot of equations involving some variable $x$ without knowing even it if will be an integer or a float (or a matrix or ...). The main basic type that is templatized in EO is the fitness: an EO object is some object which has a fitness of some type -F that can be anything. The definition for that is (see EO.h) -

    template<F> class EO +F that can be anything. The definition for that is (see EO.h) +

    template<class F> class EO

    The idea is that, later in your code, you can define a class as follows -(see for instance  eoBin.h -

    template<F> class eoBin : public EO<F> -
    { ... code for eoBin  }; +(see for instance  eoBit.h). +

    template<class F> class eoBit : public +EO<F> +
    { ... code for eoBit  };

    and then use it in your application as -

    eoBin<double> myeoBin; +

    eoBit<double> myeoBit;

    declares an object of type eoBin which has as fitness a double.

    Whereas the advantages are obvious (writing generic reusable code instead of having to rewrite the same pieces of code for different types), there @@ -376,10 +377,6 @@ names of the variables they are used to initialize, e.g.
     

      -
      -
      -
      -
     

    class eoMyClass
    {
    public: @@ -448,7 +445,7 @@ object to store such nowhere-belonging pointers: whenever you allocate such a thing, store it into an eoState : deleting that state will delete all the stored pointers - one eoState is thus the only object you have to care of. -

    The above pointera llocation sequence thus become +

    The above pointer allocation sequence thus become

    eoTournamentSelection<EOT>  *ptSelect = new eoTournamentSelection<EOT>(tSize);
    state.storeFunctor(ptSelect); @@ -492,10 +489,6 @@ main page - Algorithm-Based - Marc Schoenauer - -
    Last -modified: Mon Nov 6 07:01:57 CET 2000 +
    Marc Schoenauer From 414eafa2774e971ac92f0c34325dc9c02d11f0af Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 15 Mar 2002 06:28:25 +0000 Subject: [PATCH 0772/2134] The source file names had changed, some day, in doxygen-genertaed doc ... --- eo/tutorial/html/eoEngine.html | 12 +++++++---- eo/tutorial/html/eoOperators.html | 32 ++++++++++++++--------------- eo/tutorial/html/eoProgramming.html | 6 ++++-- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 1b6cf46ec..0c7e8a4e4 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -2,7 +2,7 @@ - + Genetic Engine @@ -241,6 +241,8 @@ and you can probably guess what each of them actually does :-)
     

      +
      +
     

    Available instances of eoMergeReduce replacement include

      @@ -310,7 +312,9 @@ size. Available instances of eoSurviveAndDieReplace are limited todayto the eoDeterministicSaDReplacement, the  that uses a deterministic MergeReduce. -


      Note: The basic use (and initial +
        +

        +

      Note: The basic use (and initial motivation) for eoSurviveAndDie takes 2 arguments, an eoMergeReduce and a number of surviving parents. It starts by copying the best parents to the new populations, then merges @@ -457,7 +461,7 @@ is implemented in the eoDetTournamentSelect< class, a sub-class of eoSelectOne, as well as in the eoDetTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament -in  selectors.h. +in  selectors.h.

    • Stochastic Tournament @@ -467,7 +471,7 @@ parameter R should be in [0.5,1]. It is implemented in the eoStochTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament -in  selectors.h.
    • +in  selectors.h.
      Note: A stochastic tournament with rate 1.0 is strictly identical to a deterministic tournament of size 2. diff --git a/eo/tutorial/html/eoOperators.html b/eo/tutorial/html/eoOperators.html index 87ff6491e..4de7b40fd 100644 --- a/eo/tutorial/html/eoOperators.html +++ b/eo/tutorial/html/eoOperators.html @@ -157,19 +157,15 @@ any useful argument
      the candidates to crossover

      if (myBinOp(eo1, eo2))
         { ...               - // eo1 has been modified, not eo2
         }
      else ...               - // none has been modified
      if (myQuadOp(eo1, eo2))
         { ...               - // both eo1 and eo2 have been modified
         }
      else ...               - // none has been modified

      However, you will hardly have to actually apply operators to individuals, as operators are used within other classes, and are applied systematically @@ -228,8 +224,7 @@ above:
         { ...    // eo has been modified
         } -
      else      -// +
      else      // eo has not been modified

      However, you will hardly have to actually apply operators to individuals, as operators are used within other classes, and are applied systematically @@ -311,8 +306,7 @@ _pop)
         EOT& parent1 = *_pop; // select the first parent -
         ++_plop;   -// +
         ++_plop;   // advance once for each selected parents
         ...
         EOT& parentN = *_pop; @@ -357,7 +351,9 @@ were parents, it needs to insert them into the list using the eoPopulator as in the following: -


      void apply()(eoPopulator& +
        +

        +

      void apply()(eoPopulator& _pop)
      {
        // get the necessary number @@ -395,8 +391,10 @@ outside the curent list, so the total number of (intermediate) offspring is always equal to the initial population size. By chance, the eoPopulatorhas a handle on the initial population that was used to start the process, and you can access it from inside the GenOp method. For instance - -


      void apply()(eoPopulator& + +
        +

        +

      void apply()(eoPopulator& _pop)
      {
        // get as many parents as you @@ -427,8 +425,10 @@ If you don't care about the size of the offspring population (that is, if that size os controlled elsewhere, e.g. in some external loop), you can use the inbedded select method of the class eoPopulator. For instance - -


      void apply()(eoPopulator& + +
        +

        +

      void apply()(eoPopulator& _pop)
      {
        // get as many parents as you @@ -569,7 +569,7 @@ to apply the variation operators to the population, and thus get exactly the number of offspring you want.

      Example: An eoSelectivePopulator is the main ingredient of the eoGeneralBreeder -operator() +operator() method - a class that creates a population of offspring from the parents applying an eoGenOp (usually an eoOpContainer) to all selected parents in turn. @@ -687,9 +687,9 @@ Gen: rate: double whose meaning depends on YYY

      where YYY can be one of Proportional and Sequential. Note that before being added to the container, all simple operators are wrapped into the -corresponding eoGenOp (see e.g. how an eoMonOpis +corresponding eoGenOp (see e.g. how an eoMonOpis wrapped into an eoMonGenOp- or -how any operator +how any operator is handled by calling the appropriate wrapper). In particular, the wrapper ensures that individuals who have been modified are invalidated. diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 43593dd9c..4c6d9115d 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -312,7 +312,7 @@ numbers who look random (w.r.t. some statistical criteria). to ensure reproducibility of the results across different platforms, EO has its own RNG, the ``Mersenne Twister'' random number generator MT19937 (thanks to Takuji -Nishimura, see eoRNG.h +Nishimura, see eoRNG.h comments).

      Though you can define and use as many RNGs as you wish in EO, the library also provides you with a global RNG termed eo::rng. @@ -340,7 +340,7 @@ following different probability distribution (e.g. floating point following normal distribution). See the complete list of RNG primitives. -

      EO also provides random_generators +

      EO also provides random_generators that can be used in STL call to generate series of random numbers, as in eoPop initializers. @@ -377,6 +377,8 @@ names of the variables they are used to initialize, e.g.
       

        +
        +
       

      class eoMyClass
      {
      public: From e1319605e69b120584ef7dc5b71ccbaada290192 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 15 Mar 2002 06:41:54 +0000 Subject: [PATCH 0773/2134] Added the lonk to SourceForge in the title, and to README in the "install" section --- eo/doc/index.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/doc/index.h b/eo/doc/index.h index d2b6480f8..6324707ff 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -1,5 +1,5 @@ -/*! \mainpage Welcome to Evolving Objects +/*! \mainpage Welcome to Evolving Objects \section intro Introduction @@ -11,7 +11,7 @@ However, you can already find some useful information in the README file in the main dir \section design Overall Design From a79eb09ea6225f9ec0d351f322fbf052849b8b7e Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 22 Mar 2002 10:57:37 +0000 Subject: [PATCH 0774/2134] Added the eoTimeCounter that allows to use time as a base counter for statistics (when you compare things that are not using the same evaluation function for instance) --- eo/src/utils/checkpointing | 1 + eo/src/utils/eoTimeCounter.h | 65 ++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 eo/src/utils/eoTimeCounter.h diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 7e08af367..3210764ce 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -14,6 +14,7 @@ #include #include #include +#include // and make_help - any better suggestion to include it? void make_help(eoParser & _parser); diff --git a/eo/src/utils/eoTimeCounter.h b/eo/src/utils/eoTimeCounter.h new file mode 100644 index 000000000..9f968bf2a --- /dev/null +++ b/eo/src/utils/eoTimeCounter.h @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTimeCounter.h +// (c) Marc Schoenauer, Maarten Keijzer, and GeNeura Team, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTimeCounter_h +#define _eoTimeCounter_h + +#include +#include + + +/** + An eoStat that simply gives the user time since first generation + It has to be tempatized by EOT because it must be an eoStat +*/ +class eoTimeCounter : public eoUpdater, public eoValueParam +{ +public: + eoTimeCounter() : eoValueParam(0.0, "Time") // : firstTime(true) + {} + + /** simply stores the time spent in process in its value() */ + virtual void operator()() + { + // ask for system time + times(&tmsStruct); +// if (firstTime) /* first generation */ +// { +// firstTime=false; +// firstUtime = tmsStruct.tms_utime; +// } + // store elapsed user time +// value(tmsStruct.tms_utime - firstUtime); + value()=double(tmsStruct.tms_utime)/100; + } + +private: +// bool firstTime; +// clock_t firstUtime; + struct tms tmsStruct; // stores time +}; + +#endif From 32f1c986309e2fda9446dfc3180fba37e9060750 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 22 Mar 2002 11:01:30 +0000 Subject: [PATCH 0775/2134] Added the time counter in make_checkpoint --- eo/src/do/make_checkpoint.h | 8 ++++++++ eo/src/do/make_continue.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 941101882..f48a2d66e 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -51,6 +51,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval ////////////////// // is nb Eval to be used as counter? eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); + eoValueParam& useTimeParam = _parser.createParam(true, "useTime", "Display time (s) every generation", '\0', "Output"); // Create anyway a generation-counter parameter eoValueParam *generationCounter = new eoValueParam(0, "Gen."); @@ -159,6 +160,13 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval monitor->add(*generationCounter); if (useEvalParam.value()) // we want nb of evaluations monitor->add(_eval); + if (useTimeParam.value()) // we want time + { + eoTimeCounter * tCounter = new eoTimeCounter; + _state.storeFunctor(tCounter); + checkpoint->add(*tCounter); + monitor->add(*tCounter); + } if (printBestParam.value()) { monitor->add(*bestStat); diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 3531c6194..5d36f3bec 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -94,7 +94,7 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu } // Same thing with Eval - but here default value is 0 - eoValueParam& maxEvalParam = _parser.createParam(unsigned(0), "maxEval", "Maximum number of evaluations (0 = none)",'E',"Stopping criterion"); + eoValueParam& maxEvalParam = _parser.createParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)",'E',"Stopping criterion"); if (maxEvalParam.value()) // positive: -> define and store { From 5b9af91d2abfbf451411042a83fea2499b478d62 Mon Sep 17 00:00:00 2001 From: cahon Date: Wed, 27 Mar 2002 17:19:25 +0000 Subject: [PATCH 0776/2134] Any EO with an invalid fitness should be printable ! --- eo/src/EO.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 82a2a2b1b..bf9a76efc 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -115,9 +115,15 @@ public: * @param _os A ostream. */ virtual void printOn(ostream& _os) const { - if (invalid()) - _os << "INVALID "; - else + + //if (invalid()) + // _os << "INVALID "; + //else + + // From now on, no special case for invalid fitnesses :-) + // A random value would so be printed. + // Even a non-evaluated EO is also serializable ... + _os << repFitness << ' '; // trailing space to make reading in that much easier } From c1d61241404f67de0f3df991440a2fa3599b8bfa Mon Sep 17 00:00:00 2001 From: cahon Date: Wed, 27 Mar 2002 17:28:04 +0000 Subject: [PATCH 0777/2134] Defines any population-based algorithm. --- eo/src/eoPopAlgo.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 eo/src/eoPopAlgo.h diff --git a/eo/src/eoPopAlgo.h b/eo/src/eoPopAlgo.h new file mode 100644 index 000000000..3cf40d21e --- /dev/null +++ b/eo/src/eoPopAlgo.h @@ -0,0 +1,17 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +#ifndef eoPopAlgo_h +#define eoPopAlgo_h + +#include +#include + +/** + For all "population transforming" algos ... + */ + +template class eoPopAlgo : public eoUF &, void> { + +} ; + +#endif From e95578b3fc3f7f2ad19696667639196cc8cab149 Mon Sep 17 00:00:00 2001 From: cahon Date: Wed, 27 Mar 2002 17:31:05 +0000 Subject: [PATCH 0778/2134] Some changes for the use in paradisEO --- eo/src/eoEasyEA.h | 54 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index e2ad1b5d2..e09efc23b 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -28,7 +28,7 @@ //----------------------------------------------------------------------------- #include -#include +#include #include #include #include @@ -55,7 +55,11 @@ Note: it looks ugly only because we wanted to authorize many different constructors. Please only look at the operator() and there shall be light */ -template class eoEasyEA: public eoAlgo +template class eoIslandsEasyEA ; + +template class eoDistEvalEasyEA ; + +template class eoEasyEA: public eoPopAlgo { public: @@ -66,21 +70,41 @@ template class eoEasyEA: public eoAlgo eoBreed& _breed, eoReplacement& _replace ) : continuator(_continuator), + eval (_eval), loopEval(_eval), popEval(loopEval), - selectTransform(dummySelect, dummyTransform), + selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(dummyMerge, dummyReduce), replace(_replace) {} + /* + eoEasyEA(eoContinue & _continuator, + eoPopEvalFunc & _pop_eval, + eoBreed & _breed, + eoReplacement & _replace + ) : + continuator (_continuator), + eval (dummyEval), + loopEval(dummyEval), + popEval (_pop_eval), + selectTransform (dummySelect, dummyTransform), + breed (_breed), + mergeReduce (dummyMerge, dummyReduce), + replace (_replace) { + + } + */ + /** NEW Ctor taking a breed and merge and an eoPopEval */ eoEasyEA( eoContinue& _continuator, eoPopEvalFunc& _eval, eoBreed& _breed, eoReplacement& _replace - ) : continuator(_continuator), + ) : continuator(_continuator), + eval (dummyEval), loopEval(dummyEval), popEval(_eval), selectTransform(dummySelect, dummyTransform), @@ -96,7 +120,8 @@ template class eoEasyEA: public eoAlgo eoBreed& _breed, eoMerge& _merge, eoReduce& _reduce - ) : continuator(_continuator), + ) : continuator(_continuator), + eval (_eval), loopEval(_eval), popEval(loopEval), selectTransform(dummySelect, dummyTransform), @@ -112,7 +137,8 @@ template class eoEasyEA: public eoAlgo eoSelect& _select, eoTransform& _transform, eoReplacement& _replace - ) : continuator(_continuator), + ) : continuator(_continuator), + eval (_eval), loopEval(_eval), popEval(loopEval), selectTransform(_select, _transform), @@ -130,6 +156,7 @@ template class eoEasyEA: public eoAlgo eoMerge& _merge, eoReduce& _reduce ) : continuator(_continuator), + eval (_eval), loopEval(_eval), popEval(loopEval), selectTransform(_select, _transform), @@ -145,7 +172,6 @@ template class eoEasyEA: public eoAlgo virtual void operator()(eoPop& _pop) { eoPop offspring; - do { try @@ -174,11 +200,11 @@ template class eoEasyEA: public eoAlgo } while ( continuator( _pop ) ); } - private: - +protected : + // If selectTransform needs not be used, dummySelect and dummyTransform are used // to instantiate it. - class eoDummySelect : public eoSelect + class eoDummySelect : public eoSelect { public : void operator()(const eoPop&, eoPop&) {} } dummySelect; class eoDummyTransform : public eoTransform @@ -188,8 +214,10 @@ template class eoEasyEA: public eoAlgo {public: void operator()(EOT &) {} } dummyEval; eoContinue& continuator; - + + eoEvalFunc & eval ; eoPopLoopEval loopEval; + eoPopEvalFunc& popEval; eoSelectTransform selectTransform; @@ -202,6 +230,10 @@ template class eoEasyEA: public eoAlgo eoMergeReduce mergeReduce; eoReplacement& replace; + + // Friend classes + friend class eoIslandsEasyEA ; + friend class eoDistEvalEasyEA ; }; //----------------------------------------------------------------------------- From e21c37d51db69014d983c4047e819dadcc43fb71 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 10:02:47 +0000 Subject: [PATCH 0779/2134] The paradiseo interface --- eo/src/paradiseo | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 eo/src/paradiseo diff --git a/eo/src/paradiseo b/eo/src/paradiseo new file mode 100644 index 000000000..c35bee4b7 --- /dev/null +++ b/eo/src/paradiseo @@ -0,0 +1,35 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "paradiseo" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +// To be continued :-) From 0de7f7aefdc9a6f4f5fe8fa24bb1d129a19778df Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 10:26:36 +0000 Subject: [PATCH 0780/2134] *** empty log message *** --- eo/src/paradisEO/eoPopAgent.h | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 eo/src/paradisEO/eoPopAgent.h diff --git a/eo/src/paradisEO/eoPopAgent.h b/eo/src/paradisEO/eoPopAgent.h new file mode 100644 index 000000000..3e81f824f --- /dev/null +++ b/eo/src/paradisEO/eoPopAgent.h @@ -0,0 +1,89 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoPopAgent.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoPopAgent_h +#define eoPopAgent_h + +#include +#include +#include + +#include + +/** + A popAgent is waiting for any populations that are queued. + For each one, a processing is performed. +*/ + +template class eoPopAgent { + +public : + + /** + Constructor + */ + + eoPopAgent (string _label, + eoListener & _listen, + eoPopAlgo & _algo + ) : + label (_label), + listen (_listen), + algo (_algo) { + + } + + // Waiting for eoPop reception and then ... + + void operator () () { + + listen.publish (label) ; // To be known by everyone ... + + while (true) { + + listen.wait () ; // While no neighbour sends any eoPop ... + + for (int i = 0 ; i < listen.size () ; i ++) { + + while (! listen [i].empty ()) { + + eoPop & pop = listen [i].front () ; + cout << "Agent [" << label << "] on " << listen.here ().host_name << " : Receiving " << pop.size () << " individuals ..." << endl ; + algo (pop) ; + eoEOSendMessTo mess (pop) ; + mess (listen [i]) ; // Coming back ... + listen [i].pop () ; + } + } + } + } + +private : + + string label ; // string identifier + eoListener & listen ; // EO's listener + eoPopAlgo & algo ; // Local supplied algo + +} ; + +#endif From f87e19bf0062bf937044e3a8ed8c571277b23734 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 10:34:16 +0000 Subject: [PATCH 0781/2134] *** empty log message *** --- eo/src/paradisEO/island/eoConnectivity.h | 88 ++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 eo/src/paradisEO/island/eoConnectivity.h diff --git a/eo/src/paradisEO/island/eoConnectivity.h b/eo/src/paradisEO/island/eoConnectivity.h new file mode 100644 index 000000000..8db27ab98 --- /dev/null +++ b/eo/src/paradisEO/island/eoConnectivity.h @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoConnectivity.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + + +#ifndef eoConnectivity_h +#define eoConnectivity_h + +#include +#include +#include + +/** + It defines the entering and outgoing channels of communication + towards the other considered agents. +*/ + +template class eoConnectivity { + +public : + + /** + Constructor. Names of others processes to consider in the topology are given + in parameter. + */ + + eoConnectivity (eoListener & _listen, + vector & _sel_neigh + ) : + listen (_listen), + sel_neigh (_sel_neigh) { + + } + + /** + Computes the subset of neighbours to receive + immigrants from ... + */ + + virtual vector *> from () = 0 ; + + /** + Computes the subset of neighbours to send + emigrants to ... + */ + + virtual vector *> to () = 0 ; + +protected : + + eoListener & listen ; + + vector sel_neigh ; + + bool selected (string & id) { + + for (int i = 0 ; i < sel_neigh.size () ; i ++) + if (sel_neigh [i] == id) + return true ; + return false ; + } + +} ; + +#endif + + + + From b6dcf911b72a3f0e1b5c0c5e724f8eba23fda3c4 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:38:36 +0000 Subject: [PATCH 0782/2134] A tool to apply a process to any incoming EO ... --- eo/src/paradisEO/eoSolAgent.h | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 eo/src/paradisEO/eoSolAgent.h diff --git a/eo/src/paradisEO/eoSolAgent.h b/eo/src/paradisEO/eoSolAgent.h new file mode 100644 index 000000000..722e8bef8 --- /dev/null +++ b/eo/src/paradisEO/eoSolAgent.h @@ -0,0 +1,91 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoSolAgent.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoSolAgent_h +#define eoSolAgent_h + +#include +#include +#include + +#include + +/** + A solAgent is waiting for any solutions that are queued. + For each one, a processing is performed. +*/ + +template class eoSolAgent { + +public : + + /** + Constructor + */ + + eoSolAgent (string _label, + eoListener & _listen, + eoSolAlgo & _algo + ) : + label (_label), + listen (_listen), + algo (_algo) { + + } + + // Waiting for eoPop reception and then ... + + void operator () () { + + listen.publish (label) ; // To be known by everyone ... + + while (true) { + + listen.wait () ; // While no neighbour sends any eoPop ... + + for (int i = 0 ; i < listen.size () ; i ++) { + + while (! listen [i].empty ()) { + + EOT & sol = listen [i].front () ; + cout << "Agent [" << label << "] on " << listen.here ().host_name << " : Receiving one individual ..." << endl ; + algo (sol) ; + eoPop pop ; + pop.push_back (sol) ; + eoEOSendMessTo mess (pop) ; + mess (listen [i]) ; // Coming back ... + listen [i].pop () ; + } + } + } + } + +private : + + string label ; // string identifier + eoListener & listen ; // EO's listener + eoSolAlgo & algo ; // Local supplied algo + +} ; + +#endif From 5e74a52bce2d6bc692f8c6d470e010f5a896a9a0 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:41:01 +0000 Subject: [PATCH 0783/2134] A continuator which periodically returns false --- eo/src/paradisEO/island/eoCyclicGenContinue.h | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 eo/src/paradisEO/island/eoCyclicGenContinue.h diff --git a/eo/src/paradisEO/island/eoCyclicGenContinue.h b/eo/src/paradisEO/island/eoCyclicGenContinue.h new file mode 100644 index 000000000..cb7d7973e --- /dev/null +++ b/eo/src/paradisEO/island/eoCyclicGenContinue.h @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoCyclicGenContinue.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#ifndef eoCyclicGenContinue_h +#define eoCyclicGenContinue_h + +#include +#include + +/** + This continuator returns false in a periodic way during generations. +*/ + +template class eoCyclicGenContinue: public eoContinue { + +public: + + /** + Constructor. The frequency is given in parameter. + */ + + eoCyclicGenContinue (unsigned _freq, + unsigned init_count = 0) : + freq (_freq), + count (init_count) { + } + + /** + Return true only if the current number of performed generations + modulo the frequency equals none. + */ + + virtual bool operator () (const eoPop & pop) { + + count ++ ; + return (count % freq) != 0 ; + } + +private: + + unsigned count, freq ; +} ; + +#endif + From 47b36ea06e85ca91281893e9ad7fc47eb1f7496e Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:45:00 +0000 Subject: [PATCH 0784/2134] The island EA model --- eo/src/paradisEO/island/eoIslandsEasyEA.h | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 eo/src/paradisEO/island/eoIslandsEasyEA.h diff --git a/eo/src/paradisEO/island/eoIslandsEasyEA.h b/eo/src/paradisEO/island/eoIslandsEasyEA.h new file mode 100644 index 000000000..f0b643b62 --- /dev/null +++ b/eo/src/paradisEO/island/eoIslandsEasyEA.h @@ -0,0 +1,97 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoIslandsEasyEA" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#ifndef eoIslandsEasyEA_h +#define eoIslandsEasyEA_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + An island distributed easy evolutionary algorithm. + It embeds an instance of easyEA. The behavior of this + last one isn't modified. However, exchanges of individuals + are performed with other EAs. + */ + +template class eoIslandsEasyEA : public eoEasyEA { + +public : + + /** + Constructor + */ + + eoIslandsEasyEA (string _id, + eoListener & _listen, + eoConnectivity & _conn, + eoEasyEA & _ea, + eoContinue & _cont, + eoSelect & _select, + eoReplacement & _replace + ) : + id (_id), + listen (_listen), + conn (_conn), + chkp (_ea.continuator), + mig_upd (_listen, + _conn, + _cont, + _select, + _replace), + eoEasyEA (chkp, + _ea.eval, + _ea.breed, + _ea.replace + ) { + chkp.add (mig_upd) ; + } + + virtual void operator () (eoPop & pop) { + + mig_upd (pop) ; // Sets pop. to send/receive EO + listen.publish (id) ; + eoEasyEA :: operator () (pop) ; + listen.publish ("_") ; + } + +private : + + // Internal components + + string id ; // String identifiant of this algorithm + eoListener & listen ; // The neighbouring of concurrent algos + eoConnectivity & conn ; // Communication topology + eoCheckPoint chkp ; + eoMigUpdater mig_upd ; +} ; + +#endif From 8ee9c80e3f528f47f4f299b8969a474a8d776417 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:47:13 +0000 Subject: [PATCH 0785/2134] A checkpoint to send/receive pop. to/from others islands --- eo/src/paradisEO/island/eoMigUpdater.h | 141 +++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 eo/src/paradisEO/island/eoMigUpdater.h diff --git a/eo/src/paradisEO/island/eoMigUpdater.h b/eo/src/paradisEO/island/eoMigUpdater.h new file mode 100644 index 000000000..d15cdb92a --- /dev/null +++ b/eo/src/paradisEO/island/eoMigUpdater.h @@ -0,0 +1,141 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoMigUpdater.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#ifndef eoMigUpdater_h +#define eoMigUpdater_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + An updater. After any evolution of an evolutionnary algorithm, it + moves some EO from/into the current population from/to a subset + of the neighbouring algos. +*/ + +template class eoMigUpdater : public eoUpdater { + +public : + + /** + Constructor. Some features which should be specified. + - The neighbouring interface, + - The communication topology, + - Which EO instancies from the given population should be sent ? + - How integrate new immigrants ? + - Then, an event to determine the time to ask neighbouring sources + for sending sets of EO. + */ + + eoMigUpdater (eoListener & _listen, + eoConnectivity & _conn, + eoContinue & _cont, + eoSelect & _select, + eoReplacement & _replace) : + listen (_listen), + conn (_conn), + cont (_cont), + select (_select), + replace (_replace) { + + } + + /** + Sets the given population to be the one to receive and/or send EO + */ + + void operator () (eoPop & _pop) { + + pop = & _pop ; + } + + /** + Should be often called. (after each local evolution ?) + */ + + virtual void operator () () { + + listen.update () ; + // listen.display () ; + + vector *> src = conn.from (), dest = conn.to () ; + + // Any coming immigrants ? + for (int i = 0 ; i < src.size () ; i ++) { + src [i] -> update () ; + while (! src [i] -> empty ()) { + replace (* pop, src [i] -> front ()) ; + cout << "[" << listen.here ().host_name << "] Arrival of " << src [i] -> front ().size () << " individuals ..." << endl ; + src [i] -> pop () ; + } + } + + // Any request ? + for (int i = 0 ; i < dest.size () ; i ++) + if (dest [i] -> need_immigration ()) { + eoPop emm ; // Emmigrants + select (* pop, emm) ; + eoEOSendMessTo mess (emm) ; + mess (* (dest [i])) ; + } + + // Any request to submit ? + if (! cont (* pop)) + for (int i = 0 ; i < src.size () ; i ++) { + eoEOReceiveMessTo mess ; + mess (* (src [i])) ; + } + } + +private : + + eoConnectivity & conn ; // The used topology + + eoContinue & cont ; /* The 'event' which determines + need of immigration */ + + eoSelect & select ; /* In order to select emmigrants + from the current population */ + + eoReplacement & replace ; // The replacement procedure + + eoPop * pop ; // The population considered + + eoListener & listen ; // A reference to the neighbouring + +} ; + +#endif + + + + + + From 9796e56c13f49224fd92d8423452fdb68656b62e Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:49:04 +0000 Subject: [PATCH 0786/2134] Each island id connected to the whole considered islands --- .../island/topologies/eoFullConnectivity.h | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 eo/src/paradisEO/island/topologies/eoFullConnectivity.h diff --git a/eo/src/paradisEO/island/topologies/eoFullConnectivity.h b/eo/src/paradisEO/island/topologies/eoFullConnectivity.h new file mode 100644 index 000000000..7c8b21165 --- /dev/null +++ b/eo/src/paradisEO/island/topologies/eoFullConnectivity.h @@ -0,0 +1,102 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoFullConnectivity.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#ifndef eoFullConnectivity_h +#define eoFullConnectivity_h + +#include + +/** + Each algorithm is also connected to the whole neighbouring ... +*/ + +template class eoFullConnectivity : public eoConnectivity { + +public : + + /** + Constructor + */ + + eoFullConnectivity (eoListener & _listen, + vector & _sel_neigh + ) : eoConnectivity (_listen, _sel_neigh) { + } + + virtual vector *> from () { + + listen.update () ; + + vector *> v ; + + for (int i = 0 ; i < listen.size () ; i ++) + if (i != listen.here ().number () && selected (listen [i].label ())) + v.push_back (& listen [i]) ; + + return v ; + } + + virtual vector *> to () { + + listen.update () ; + + vector *> v ; + + for (int i = 0 ; i < listen.size () ; i ++) + if (i != listen.here ().number () && selected (listen [i].label ())) + v.push_back (& listen [i]) ; + + return v ; + } + +} ; + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 6667499e62332775475775f40a6bec6c0ab8ce8d Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:50:11 +0000 Subject: [PATCH 0787/2134] Each island is connected from/to only one neighbour --- .../island/topologies/eoRingConnectivity.h | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 eo/src/paradisEO/island/topologies/eoRingConnectivity.h diff --git a/eo/src/paradisEO/island/topologies/eoRingConnectivity.h b/eo/src/paradisEO/island/topologies/eoRingConnectivity.h new file mode 100644 index 000000000..7de042ac7 --- /dev/null +++ b/eo/src/paradisEO/island/topologies/eoRingConnectivity.h @@ -0,0 +1,122 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoRingConnectivity.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#ifndef eoRingConnectivity_h +#define eoRingConnectivity_h + +#include + +/** + Each algorithm has a single pair of entering and outgoing + neighbours, so that the unit constitutes a circular topology. +*/ + +template class eoRingConnectivity : public eoConnectivity { + +public : + + /** + Constructor + */ + + eoRingConnectivity (eoListener & _listen, + vector & _sel_neigh + ) : eoConnectivity (_listen, _sel_neigh) { + } + + virtual vector *> from () { + + listen.update () ; + + vector *> v ; + int i, k = listen.size () ; + + for (i = 0 ; i < k ; i ++) { + if (listen [i] == listen.here ()) + break ; + } + + for (int j = (i - 1 + k) % k ; j != i ; j = (j - 1 + k) % k) + if (selected (listen [j].label ())) { + v.push_back (& listen [j]) ; + break ; + } + + return v ; + } + + /** + + */ + + virtual vector *> to () { + + listen.update () ; + + vector *> v ; + int i, k = listen.size () ; + + for (i = 0 ; i < k ; i ++) + if (listen [i] == listen.here ()) + break ; + + for (int j = (i + 1) % k ; j != i ; j = (j + 1) % k) + if (selected (listen [j].label ())) { + v.push_back (& listen [j]) ; + break ; + } + + return v ; + } + +} ; + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 828770b8701877316a15a720b170e8ab086d1796 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:54:52 +0000 Subject: [PATCH 0788/2134] An EA with a distributed evaluation process --- eo/src/paradisEO/eval/eoDistEvalEasyEA.h | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 eo/src/paradisEO/eval/eoDistEvalEasyEA.h diff --git a/eo/src/paradisEO/eval/eoDistEvalEasyEA.h b/eo/src/paradisEO/eval/eoDistEvalEasyEA.h new file mode 100644 index 000000000..c49342989 --- /dev/null +++ b/eo/src/paradisEO/eval/eoDistEvalEasyEA.h @@ -0,0 +1,63 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoDistEvalEasyEA.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoDistEvalEasyEA_h +#define eoDistEvalEasyEA_h + +#include +#include +#include + +/** + Intended for evaluation CPU cost evolutionnary algorithm ... + */ + +template class eoDistEvalEasyEA : public eoEasyEA { + +public : + + /** + Constructor. Caution ! The provided label is the one + of distributed evaluators to search for and not those of + the master program, which is isn't necessary. + */ + + eoDistEvalEasyEA (eoListener & _listen, + eoEasyEA & _ea, + string _label + ) : + pop_eval (eoDistPopEvalFunc (_listen, _label, _ea.eval)), + eoEasyEA (_ea.continuator, + pop_eval, + _ea.breed, + _ea.replace + ) { + } + +private : + + eoDistPopEvalFunc pop_eval ; + +} ; + +#endif From 67039066e251a7347dbe3d79b428ff17e4a59ca7 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:56:18 +0000 Subject: [PATCH 0789/2134] The master dispatcher evaluator --- eo/src/paradisEO/eval/eoDistPopEvalFunc.h | 120 ++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 eo/src/paradisEO/eval/eoDistPopEvalFunc.h diff --git a/eo/src/paradisEO/eval/eoDistPopEvalFunc.h b/eo/src/paradisEO/eval/eoDistPopEvalFunc.h new file mode 100644 index 000000000..4a85af42c --- /dev/null +++ b/eo/src/paradisEO/eval/eoDistPopEvalFunc.h @@ -0,0 +1,120 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoDistPopEvalFunc.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoDistPopEvalFunc_h +#define eoDistPopEvalFunc_h + +#include +#include + +template class eoDistPopEvalFunc : public eoPopEvalFunc { + +public : + + /** + Constructor + */ + + eoDistPopEvalFunc (eoListener & _listen, + string & _label, + eoEvalFunc & _eval + ) : + listen (_listen), + label (_label), + eval (_eval) { + + } + + void operator () (eoPop & _parents, eoPop & _offspring) { + + int num_eval = 0 ; // How many distributed evaluators ? + int old_size = _offspring.size () ; + + do { + listen.update () ; + for (int i = 0 ; i < listen.size () ; i ++) { + if (listen [i].label () == label) + num_eval ++ ; + } + + if (num_eval == 0) { + cout << "No [" << label << "] available ..." << endl ; + cout << "Waiting for a few seconds ..." << endl ; + sleep (2) ; + } + } while (num_eval == 0) ; + + + // Partitioning ... + + int j = 0, l = 0 ; + for (int i = 0 ; i < num_eval ; i ++) { + + eoPop pop ; + for (int k = 0 ; k < old_size / num_eval ; k ++) + pop.push_back (_offspring [j ++]) ; + + if (i < old_size % num_eval) + pop.push_back (_offspring [j ++]) ; + + // Next evaluator ... + while (listen [l].label () != label) { + + l ++ ; + } + + eoEOSendMessTo mess (pop) ; + mess (listen [l ++]) ; + } + + // On standby of the returns + _offspring.clear () ; + + while (_offspring.size () != old_size) { + + listen.wait () ; + + for (int i = 0 ; i < listen.size () ; i ++) + if (listen [i].label () == label && ! listen [i].empty ()) { + while (! listen [i].empty ()) { + + eoPop & pop = listen [i].front () ; + + for (int m = 0 ; m < pop.size () ; m ++) + _offspring.push_back (pop [m]) ; + + listen [i].pop () ; + + } + } + } + } + +private : + + eoListener & listen ; + string label ; // String identifier of evaluators + eoEvalFunc & eval ; +} ; + +#endif From 972fbb5d5875f5434522ec35cfa311b212025be2 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:57:30 +0000 Subject: [PATCH 0790/2134] The slave evaluator node --- eo/src/paradisEO/eval/eoEvaluator.h | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 eo/src/paradisEO/eval/eoEvaluator.h diff --git a/eo/src/paradisEO/eval/eoEvaluator.h b/eo/src/paradisEO/eval/eoEvaluator.h new file mode 100644 index 000000000..bc510e6de --- /dev/null +++ b/eo/src/paradisEO/eval/eoEvaluator.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoEvaluator.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoEvaluator_h +#define eoEvaluator_h + +#include +#include +#include + +#include + +/** + A special pop. based agent, applied to eval sub_populations. + Rather intended for evolutionnary algorithms, with evaluations + performed remotely. +*/ + +template class eoEvaluator : public eoPopAgent { + +public : + + /** + Constructor + */ + + eoEvaluator (string _label, + eoListener & _listen, + eoEvalFunc & _eval + ) : + pop_eval (_eval), + eoPopAgent (_label, + _listen, + pop_eval) { + + } + +private : + + eoPopEval pop_eval ; + +} ; + +#endif From 59b6246f76a43b0ab41fa4b0d3f3773a4195ee08 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 14:59:58 +0000 Subject: [PATCH 0791/2134] An evaluator which sequentially values individuals making the pop. --- eo/src/paradisEO/eval/eoPopEval.h | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 eo/src/paradisEO/eval/eoPopEval.h diff --git a/eo/src/paradisEO/eval/eoPopEval.h b/eo/src/paradisEO/eval/eoPopEval.h new file mode 100644 index 000000000..3b5860f3c --- /dev/null +++ b/eo/src/paradisEO/eval/eoPopEval.h @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoPopEval.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoPopEval_h +#define eoPopEval_h + +#include +#include +#include + +/** + An evaluator which computes fitnesses of a given population in a + sequentially manner. + */ + +template class eoPopEval : public eoPopAlgo { + +public : + + /** + Constructor + */ + + eoPopEval (eoEvalFunc & _eval) : eval(_eval) { + + } + + /** + Values sequentially each EO from the pop. given in parameter. + */ + + void operator () (eoPop & _pop) { + apply (eval, _pop) ; + } + +private : + + eoEvalFunc & eval ; +} ; + +#endif + From 694a908a61a445ee4312371249492dd3546fe769 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:04:49 +0000 Subject: [PATCH 0792/2134] The global communication layer --- eo/src/paradisEO/comm/eoListener.h | 147 +++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 eo/src/paradisEO/comm/eoListener.h diff --git a/eo/src/paradisEO/comm/eoListener.h b/eo/src/paradisEO/comm/eoListener.h new file mode 100644 index 000000000..8be169274 --- /dev/null +++ b/eo/src/paradisEO/comm/eoListener.h @@ -0,0 +1,147 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoListener.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Cont act: cahon@lifl.fr +*/ + +#ifndef eoListener_h +#define eoListener_h + +#include +#include +#include +#include +#include + +/** + Necessary for any use of a distributed model. + It makes it possible to have a total state of + that one. +*/ + +// In the near future ... Enabling different kinds of EO to send/receive .. + +template class eoListener : public vector > { + +public : + + /** + Constructor. + */ + + eoListener (int argc, char ** argv) : comm (MPI :: COMM_WORLD) { + + // Mpi requires it ! + MPI :: Init (argc, argv) ; + + // Who and how many ? + rank = MPI :: COMM_WORLD.Get_rank () ; + len = MPI :: COMM_WORLD.Get_size () ; + + // To build local listeners algorithms + for (int i = 0 ; i < len ; i ++) { + eoLocalListener loc_listen (i) ; + push_back (loc_listen) ; + } + } + + /** + Destructor. + */ + + ~ eoListener () { + + MPI :: Finalize () ; + } + + /** + A reference to the current listener + */ + + eoLocalListener & here () { + + return operator [] (rank) ; + } + + /** + To import messages ... + */ + + void update () { + + for (int i = 0 ; i < size () ; i ++) + operator [] (i).update () ; + } + + /** + To broadcast the string identifier of the local process to the + whole neighbouring ... + */ + + void publish (string label) { + + eoPublishMessTo mess (label) ; + for (int i = 0 ; i < size () ; i ++) + if (i != rank) + mess (operator [] (i)) ; + here ().label () = label ; // Nothing to send ! + } + + /** + Blocking. Waits for at least one 'eoLocalListener' to + receive any eoPop ... + */ + + void wait () { + + bool b = false ; + + do { + comm.Probe (MPI :: ANY_SOURCE, 0) ; + update () ; + for (int i = 0 ; i < size () ; i ++) + if (! operator [] (i).empty ()) + b = true ; + + } while (! b) ; + } + + void destroy (string label) { + + eoKillMessTo mess ; + for (int i = 0 ; i < len ; i ++) { + if (operator [] (i).label () == label) + mess (operator [] (i)) ; + } + } + +private : + + int rank, len ; // Rank of current process, and number of distributed processes + + MPI :: Comm & comm ; // Communicator + + +} ; + +#endif + + + From 37d09fbccd9ef1eb3c6ebd1506fd11bf60cf78ed Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:05:35 +0000 Subject: [PATCH 0793/2134] The local communication layer --- eo/src/paradisEO/comm/eoLocalListener.h | 156 ++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 eo/src/paradisEO/comm/eoLocalListener.h diff --git a/eo/src/paradisEO/comm/eoLocalListener.h b/eo/src/paradisEO/comm/eoLocalListener.h new file mode 100644 index 000000000..e106e3d00 --- /dev/null +++ b/eo/src/paradisEO/comm/eoLocalListener.h @@ -0,0 +1,156 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoLocalListener.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoLocalListener_h +#define eoLocalListener_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + A local listener to pack any coming message or, on contrary, to + send any data to another distributed process. + */ + +// Well, not very nice, but necessary for multiples header inclusions :-/ + +template class eoHeaderMessFrom ; +template class eoMessFrom ; +template class eoMessTo ; +template class eoEOReceiveMessFrom ; +template class eoEOSendMessFrom ; +template class eoPublishMessFrom ; +template class eoKillMessFrom ; + +template class eoLocalListener : public queue > { + +public : + + /** + Constructor + */ + + eoLocalListener (int _num_id) : + + num_id (_num_id), + comm (& MPI :: COMM_WORLD), // Shared communicator ... + req_EO (false) { + + gethostname (host_name, 255) ; // Host ? + } + + /** + Any distributed algorithm or agent has its own integer + identifiant, which lets us to distinguish them. + */ + + bool operator == (eoLocalListener & loc_listen) { + + return loc_listen.num_id == num_id ; + } + + /** + To import awaiting messages from other algorithms. + For each one, an action may be performed. + */ + + void update () { + + while (comm -> Iprobe (num_id, 0)) { + // While any more messages + + eoHeaderMessFrom header (* this) ; + eoMessFrom * mess ; + + /* The header identifies the kind of messages. + Currently, only four are necessary and so defined */ + + if (header == "eoEOReceiveMessTo") + mess = new eoEOReceiveMessFrom (* this) ; + else if (header == "eoEOSendMessTo") + mess = new eoEOSendMessFrom (* this) ; + else if (header == "eoPublishMessTo") + mess = new eoPublishMessFrom (* this) ; + else { + mess = new eoKillMessFrom (* this) ; + } + // Any side effects ? + mess -> operator () () ; + delete mess ; + } + } + + /** + String identifier of this algo/agent ? + */ + + string & label () { + + return name_id ; + } + + bool & need_immigration () { + + return req_EO ; + } + + int number () { + + return num_id ; + } + + void destroy () { + + cout << "Agent [" << name_id << "] stopped ..." << endl ; + MPI :: Finalize () ; + exit (0) ; + } + + char host_name [255] ; // Host string identifier + +private : + + MPI :: Comm * comm ; // MPI Communicator + + string name_id ; // String id. + int num_id ; // MPI id. + bool req_EO ; + + // Friendly classes + friend class eoMessFrom ; + friend class eoMessTo ; + +} ; + +#endif + + + From 6fd042962d27abfe6a9a431961d9d26630acb8da Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:10:04 +0000 Subject: [PATCH 0794/2134] For any sending message --- eo/src/paradisEO/comm/messages/eoMessTo.h | 75 +++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 eo/src/paradisEO/comm/messages/eoMessTo.h diff --git a/eo/src/paradisEO/comm/messages/eoMessTo.h b/eo/src/paradisEO/comm/messages/eoMessTo.h new file mode 100644 index 000000000..98efdef7c --- /dev/null +++ b/eo/src/paradisEO/comm/messages/eoMessTo.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoMessTo.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoMessTo_h +#define eoMessTo_h + +#include +#include +#include + +/** + An abstract class for any sending message. + Common features are declared. + */ + +template class eoLocalListener ; + +template class eoMessTo { + +public : + + /** + Constructor. A string identifier, being defined in subclasses + is given for any kind of messages. + */ + + eoMessTo (string _label) : + + label (_label), + comm (MPI :: COMM_WORLD) { + } + + /** + Must be called in sub-classes ... + */ + + void operator () (eoLocalListener & loc_listen) { + + eoHeaderMessTo header (label) ; + header (loc_listen) ; + } + +protected : + + MPI :: Comm & comm ; // MPI Communicator + + string label ; // String identifier of the message + +} ; + +#endif + + + + From d31c5942c4904697926e977da859b81abf78d161 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:16:11 +0000 Subject: [PATCH 0795/2134] *** empty log message *** --- eo/src/paradisEO/comm/messages/eoMessFrom.h | 66 +++++++++++++++++ .../comm/messages/from/eoEOReceiveMessFrom.h | 64 +++++++++++++++++ .../comm/messages/from/eoEOSendMessFrom.h | 72 +++++++++++++++++++ .../comm/messages/from/eoHeaderMessFrom.h | 65 +++++++++++++++++ .../comm/messages/from/eoKillMessFrom.h | 64 +++++++++++++++++ .../comm/messages/from/eoPublishMessFrom.h | 68 ++++++++++++++++++ .../comm/messages/to/eoEOReceiveMessTo.h | 52 ++++++++++++++ .../comm/messages/to/eoEOSendMessTo.h | 71 ++++++++++++++++++ .../comm/messages/to/eoHeaderMessTo.h | 71 ++++++++++++++++++ .../paradisEO/comm/messages/to/eoKillMessTo.h | 52 ++++++++++++++ .../comm/messages/to/eoPublishMessTo.h | 66 +++++++++++++++++ 11 files changed, 711 insertions(+) create mode 100644 eo/src/paradisEO/comm/messages/eoMessFrom.h create mode 100644 eo/src/paradisEO/comm/messages/from/eoEOReceiveMessFrom.h create mode 100644 eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h create mode 100644 eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h create mode 100644 eo/src/paradisEO/comm/messages/from/eoKillMessFrom.h create mode 100644 eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h create mode 100644 eo/src/paradisEO/comm/messages/to/eoEOReceiveMessTo.h create mode 100644 eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h create mode 100644 eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h create mode 100644 eo/src/paradisEO/comm/messages/to/eoKillMessTo.h create mode 100644 eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h diff --git a/eo/src/paradisEO/comm/messages/eoMessFrom.h b/eo/src/paradisEO/comm/messages/eoMessFrom.h new file mode 100644 index 000000000..f0d8f5754 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/eoMessFrom.h @@ -0,0 +1,66 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoMessFrom.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoMessFrom_h +#define eoMessFrom_h + +#include +#include + +/** + An abstract class for any kind of coming message. + Common features are declared. + */ + +template class eoLocalListener ; + +template class eoMessFrom { + +public : + + /** + Constructor + */ + + eoMessFrom (eoLocalListener & _loc_listen) : + loc_listen (_loc_listen), + comm (MPI :: COMM_WORLD) { + } + + /** + Well ... + */ + + virtual void operator () () = 0 ; + +protected : + + MPI :: Comm & comm ; // Communicator + eoLocalListener & loc_listen ; // Transmitter + +} ; + +#endif + + + diff --git a/eo/src/paradisEO/comm/messages/from/eoEOReceiveMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoEOReceiveMessFrom.h new file mode 100644 index 000000000..299e60e7e --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/eoEOReceiveMessFrom.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoEOReceiveMessFrom.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoEOReceiveMessFrom_h +#define eoEOReceiveMessFrom_h + +#include +#include +#include + +/** + A message expressing the need of immigration of EO ... + */ + +template class eoEOReceiveMessFrom : public eoMessFrom { + +public : + + /** + Constructor + */ + + eoEOReceiveMessFrom (eoLocalListener & _loc_listen) : + eoMessFrom (_loc_listen) { + + // Nothing else to receive :-) + } + + void operator () () { + + loc_listen.need_immigration () = true ; + } + +} ; + +#endif + + + + + + + + diff --git a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h new file mode 100644 index 000000000..5f8a2e771 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h @@ -0,0 +1,72 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoEOSendMessFrom.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoEOSendMessFrom_h +#define eoEOSendMessFrom_h + +#include +#include +#include +#include + +/** + A message embeding a set of immigrants ... +*/ + +template class eoEOSendMessFrom : public eoMessFrom { + +public : + + /** + Constructor + */ + + eoEOSendMessFrom (eoLocalListener & _loc_listen) : + eoMessFrom (_loc_listen) { + + MPI :: Status stat ; + comm.Probe (loc_listen.number (), 0, stat) ; + int len = stat.Get_count (MPI :: CHAR) ; + char buff [len] ; + comm.Recv (buff, len, MPI :: CHAR, loc_listen.number (), 0) ; + istrstream f (buff) ; + pop.readFrom (f) ; + + } + + void operator () () { + + loc_listen.push (pop) ; + // cout << "Reception de " << pop.size () << "individus " << endl ; + } + +private : + + eoPop pop ; // New immigrants ! + +} ; + +#endif + + + diff --git a/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h new file mode 100644 index 000000000..6986f5196 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoHeaderMessFrom.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoHeaderMessFrom_h +#define eoHeaderMessFrom_h + +#include +#include + +template class eoLocalListener ; + +/** + A header is an identifier for the kind of + message to be then received ... +*/ + +template class eoHeaderMessFrom : public string { + +public : + + /** + Second constructor. On contrary, the header is + waited for and built from the local listener. + It comes before a message. + */ + + eoHeaderMessFrom (eoLocalListener & loc_listen) : + comm (MPI :: COMM_WORLD) { + + MPI :: Status stat ; + comm.Probe (loc_listen.number (), 0, stat) ; // Blocking + int len = stat.Get_count (MPI :: CHAR) ; + char buff [len] ; // Temp. buffer + comm.Recv (buff, len, MPI :: CHAR, loc_listen.number (), 0) ; + assign (buff) ; + } + +private : + + MPI :: Comm & comm ; // Communicator + +} ; + +#endif + diff --git a/eo/src/paradisEO/comm/messages/from/eoKillMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoKillMessFrom.h new file mode 100644 index 000000000..2a8d7c097 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/eoKillMessFrom.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoKillMessFrom.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoKillMessFrom_h +#define eoKillMessFrom_h + +#include +#include +#include + +/** + To destroy current process ... + */ + +template class eoKillMessFrom : public eoMessFrom { + +public : + + /** + Constructor + */ + + eoKillMessFrom (eoLocalListener & _loc_listen) : + eoMessFrom (_loc_listen) { + + // Nothing else to receive :-) + } + + void operator () () { + + loc_listen.destroy () ; + } + +} ; + +#endif + + + + + + + + diff --git a/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h new file mode 100644 index 000000000..66c55454c --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h @@ -0,0 +1,68 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoPublishMessFrom.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoPublishMessFrom_h +#define eoPublishMessFrom_h + +#include +#include +#include + +/** + To be notified of the lauch of a new kind of process somewhere ... + */ + +template class eoPublishMessFrom : public eoMessFrom { + +public : + + /** + Constructor + */ + + eoPublishMessFrom (eoLocalListener & _loc_listen) : + eoMessFrom (_loc_listen) { + + MPI :: Status stat ; + comm.Probe (loc_listen.number (), 0, stat) ; + int len = stat.Get_count (MPI :: CHAR) ; + char buff [len] ; + comm.Recv (buff, len, MPI :: CHAR, loc_listen.number (), 0) ; + label.assign (buff) ; + } + + void operator () () { + + loc_listen.label () = label ; + } + +private : + + string label ; // String identifier ... + +} ; + +#endif + + + diff --git a/eo/src/paradisEO/comm/messages/to/eoEOReceiveMessTo.h b/eo/src/paradisEO/comm/messages/to/eoEOReceiveMessTo.h new file mode 100644 index 000000000..e9c33f039 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/eoEOReceiveMessTo.h @@ -0,0 +1,52 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoEOReceiveMessTo.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +/** + A message expressing an immigration need. +*/ + +#ifndef eoEOReceiveMessTo_h +#define eoEOReceiveMessTo_h + +#include +#include + +template class eoEOReceiveMessTo : public eoMessTo { + +public : + + /** + Constructor ... + */ + + eoEOReceiveMessTo () : eoMessTo ("eoEOReceiveMessTo") { + + } + + // Nothing else ! :-) + +} ; + +#endif + + diff --git a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h new file mode 100644 index 000000000..83999cbae --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h @@ -0,0 +1,71 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoEOSendMessTo.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +/** + A message embeding immigrants to send to ... +*/ + +#ifndef eoEOSendMessTo_h +#define eoEOSendMessTo_h + +#include +#include +#include +#include + +template class eoEOSendMessTo : public eoMessTo { + +public : + + /** + Constructor ... + */ + + eoEOSendMessTo (eoPop & _pop + ) : + pop (_pop), + eoMessTo ("eoEOSendMessTo") { + + } + + /** + To send the given population ... + */ + + void operator () (eoLocalListener & loc_listen) { + + eoMessTo :: operator () (loc_listen) ; + + ostrstream f ; + pop.printOn (f) ; + comm.Send (f.str (), f.pcount (), MPI :: CHAR, loc_listen.number (), 0) ; + loc_listen.need_immigration () = false ; + } + +private : + + eoPop & pop ; // The set of EO to send. + +} ; + +#endif diff --git a/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h b/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h new file mode 100644 index 000000000..4126d901d --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h @@ -0,0 +1,71 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoHeaderMessTo.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoHeaderMessTo_h +#define eoHeaderMessTo_h + +#include + +#include + +template class eoLocalListener ; + +/** + A header is an identifier for the kind of + message to be then sent ... +*/ + +template class eoHeaderMessTo : public string { + +public : + + /** + Constructor. + The string identifiant id given in parameter. + */ + + eoHeaderMessTo (string label) : + + string (label), + comm (MPI :: COMM_WORLD) { + + } + + /** + Emission of the header to the next process. The body message + should then follow ... + */ + + void operator () (eoLocalListener & loc_listen) { + + comm.Send (c_str (), size () + 1, MPI :: CHAR, loc_listen.number (), 0) ; + } + +private : + + MPI :: Comm & comm ; // Communicator + +} ; + +#endif + diff --git a/eo/src/paradisEO/comm/messages/to/eoKillMessTo.h b/eo/src/paradisEO/comm/messages/to/eoKillMessTo.h new file mode 100644 index 000000000..5d0597c11 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/eoKillMessTo.h @@ -0,0 +1,52 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoKillMessTo.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +/** + To destroy a distant agent ... +*/ + +#ifndef eoKillMessTo_h +#define eoKillMessTo_h + +#include +#include + +template class eoKillMessTo : public eoMessTo { + +public : + + /** + Constructor ... + */ + + eoKillMessTo () : eoMessTo ("eoKillMessTo") { + + } + + // Nothing else ! :-) + +} ; + +#endif + + diff --git a/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h b/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h new file mode 100644 index 000000000..810052950 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h @@ -0,0 +1,66 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoPublishMessTo.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +/** + To let know from distributed algos the string identifier + of the home process ... +*/ + +#ifndef eoPublishMessTo_h +#define eoPublishMessTo_h + +#include +#include +#include +#include + +template class eoPublishMessTo : public eoMessTo { + +public : + + /** + Constructor + */ + + eoPublishMessTo (string & _label + ) : + eoMessTo ("eoPublishMessTo"), + label (_label) { + + } + + void operator () (eoLocalListener & loc_listen) { + + eoMessTo :: operator () (loc_listen) ; + comm.Send (label.c_str (), label.size () + 1, MPI :: CHAR, loc_listen.number (), 0) ; + } + +private : + + string label ; // String identifier to send ... + +} ; + +#endif + + From 6bb81f22787fda9ea48cad4043dfab9627379900 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:30:55 +0000 Subject: [PATCH 0796/2134] How to build an homo/heterogenous island model of EAs ? --- eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp new file mode 100644 index 000000000..1793bc670 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp @@ -0,0 +1,87 @@ +#include +#include + +typedef eoBit Indi; // A bitstring with fitness double + +#include "binary_value.h" + +void main_function(int argc, char ** argv) { + + // Some parameters ... + const unsigned int T_SIZE = 3 ; // Size for tournament selection + const unsigned int VEC_SIZE = 50 ; // Number of bits in genotypes + const unsigned int POP_SIZE = 100 ; // Size of population + + const unsigned int MAX_GEN = 1000 ; // Fixed number of generations + + const double P_CROSS = 0.8 ; // Crossover probability + const double P_MUT = 1.0 ; // Mutation probability + + const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation + const double onePointRate = 0.5 ; // Rate for 1-pt Xover + const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation + + eoEvalFuncPtr & > eval (binary_value) ; + eoUniformGenerator uGen ; + eoInitFixedLength random (VEC_SIZE, uGen) ; + + eoPop pop (POP_SIZE, random) ; + + apply (eval, pop) ; // A first evaluation of the population + + eoDetTournamentSelect selectOne(T_SIZE) ; + eoSelectPerc select (selectOne) ; // The selection operator + + eoGenerationalReplacement replace ; // The replacement operator + + eo1PtBitXover xover1 ; + eoPropCombinedQuadOp xover (xover1, onePointRate) ; + eoBitMutation mutationBitFlip (P_MUT_PER_BIT) ; + eoPropCombinedMonOp mutation (mutationBitFlip, bitFlipRate) ; + + eoSGATransform transform (xover, P_CROSS, mutation, P_MUT) ; + + eoGenContinue genCont (MAX_GEN) ; // The continuation criteria + + // First evolutionnary algorithm + eoEasyEA gga (genCont, eval, select, transform, replace) ; + + // What's new ? + eoListener listen (argc, argv) ; + rng.reseed (listen.here ().number ()) ; + + vector v ; + v.push_back ("Mars") ; // Only evol. algos named "Mars" are considered + eoFullConnectivity conn (listen, v) ; // The ring topology used + + eoCyclicGenContinue cycl_cont (300) ; // Immigration step all 300 evolutions + eoRandomSelect sel_rand ; // Random selection of emigrants + eoSelectMany sel (sel_rand, 0.1) ; /* How many individuals should be selected + to be sent ? */ + eoPlusReplacement repl ; // How to integrate new individuals ? + // A island esay evolutionnary named "Mars" + eoIslandsEasyEA islgga ("Mars", listen, conn, gga, cycl_cont, sel, repl) ; + islgga (pop) ; + pop.sort () ; + cout << "The final population is now ..." << endl ; + cout << pop << endl ; +} + +int main(int argc, char **argv) { +#ifdef _MSC_VER + + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); + +#endif + + try { + main_function(argc, argv) ; + } + catch(exception& e) { + cout << "Exception: " << e.what () << '\n' ; + } + + return 1 ; +} From aec83a00149a63f994cca3e153d7acda450c2584 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:36:04 +0000 Subject: [PATCH 0797/2134] How to build an EA with a distributed evalaution process ? --- .../ParadisEO/Lesson2/MasterDistEvalBitEA.cpp | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp diff --git a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp new file mode 100644 index 000000000..978fd5565 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp @@ -0,0 +1,86 @@ +#include +#include +#include + +#include +#include + +typedef eoBit Indi ; // A bitstring with fitness double + +#include "binary_value.h" + +void main_function(int argc, char **argv) { + + // Some parameters + const unsigned int SEED = 42 ; // Seed for random number generator + const unsigned int T_SIZE = 3 ; // Size for tournament selection + const unsigned int VEC_SIZE = 8 ; // Number of bits in genotypes + const unsigned int POP_SIZE = 100 ; // Size of population + + const unsigned int MAX_GEN = 20 ; // Maximum number of generation before STOP + + const double P_CROSS = 0.8 ; // Crossover probability + const double P_MUT = 1.0 ; // Mutation probability + const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation + const double onePointRate = 0.5 ; // Rate for 1-pt Xover + const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation + + rng.reseed (SEED) ; + + eoEvalFuncPtr & > eval (binary_value) ; + + eoUniformGenerator uGen ; + eoInitFixedLength random (VEC_SIZE, uGen) ; + + eoPop pop (POP_SIZE, random) ; + + apply (eval, pop) ; + + eoDetTournamentSelect selectOne (T_SIZE) ; + + eoSelectPerc select (selectOne) ; + + eoGenerationalReplacement replace ; + + eo1PtBitXover xover1 ; + + eoBitMutation mutationBitFlip(P_MUT_PER_BIT) ; + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover1, P_CROSS, mutationBitFlip, P_MUT); + + eoGenContinue genCont (MAX_GEN); + + eoEasyEA gga (genCont, eval, select, transform, replace); + + eoListener listen (argc, argv) ; + + eoDistEvalEasyEA dist_gga (listen, gga, "Mars") ; + + dist_gga (pop) ; + + listen.destroy ("Mars") ; + + // OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// 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; +} From 6afc695dce3e568d1c6ca9f0cc034f429d739121 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 29 Mar 2002 15:38:15 +0000 Subject: [PATCH 0798/2134] *** empty log message *** --- .../ParadisEO/Lesson1/IslandBitEA1.cpp | 88 +++++++++++++++++ .../ParadisEO/Lesson1/IslandBitEA2.cpp | 96 +++++++++++++++++++ eo/tutorial/ParadisEO/Lesson1/Makefile | 27 ++++++ eo/tutorial/ParadisEO/Lesson1/binary_value.h | 17 ++++ .../ParadisEO/Lesson1/paradiseo.config | 4 + eo/tutorial/ParadisEO/Lesson2/Makefile | 21 ++++ .../ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp | 41 ++++++++ eo/tutorial/ParadisEO/Lesson2/binary_value.h | 17 ++++ .../ParadisEO/Lesson2/paradiseo.config | 4 + 9 files changed, 315 insertions(+) create mode 100644 eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp create mode 100644 eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp create mode 100644 eo/tutorial/ParadisEO/Lesson1/Makefile create mode 100644 eo/tutorial/ParadisEO/Lesson1/binary_value.h create mode 100644 eo/tutorial/ParadisEO/Lesson1/paradiseo.config create mode 100644 eo/tutorial/ParadisEO/Lesson2/Makefile create mode 100644 eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp create mode 100644 eo/tutorial/ParadisEO/Lesson2/binary_value.h create mode 100644 eo/tutorial/ParadisEO/Lesson2/paradiseo.config diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp new file mode 100644 index 000000000..f984bf816 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp @@ -0,0 +1,88 @@ +#include +#include + +typedef eoBit Indi; // A bitstring with fitness double + +#include "binary_value.h" + +void main_function(int argc, char ** argv) { + + // Some parameters ... + const unsigned int T_SIZE = 3 ; // Size for tournament selection + const unsigned int VEC_SIZE = 50 ; // Number of bits in genotypes + const unsigned int POP_SIZE = 100 ; // Size of population + + const unsigned int MAX_GEN = 1000 ; // Fixed number of generations + + const double P_CROSS = 0.8 ; // Crossover probability + const double P_MUT = 1.0 ; // Mutation probability + + const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation + const double onePointRate = 0.5 ; // Rate for 1-pt Xover + const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation + + eoEvalFuncPtr & > eval (binary_value) ; + eoUniformGenerator uGen ; + eoInitFixedLength random (VEC_SIZE, uGen) ; + + eoPop pop (POP_SIZE, random) ; + + apply (eval, pop) ; // A first evaluation of the population + + eoDetTournamentSelect selectOne(T_SIZE) ; + eoSelectPerc select (selectOne) ; // The selection operator + + eoGenerationalReplacement replace ; // The replacement operator + + eo1PtBitXover xover1 ; + eoPropCombinedQuadOp xover (xover1, onePointRate) ; + eoBitMutation mutationBitFlip (P_MUT_PER_BIT) ; + eoPropCombinedMonOp mutation (mutationBitFlip, bitFlipRate) ; + + eoSGATransform transform (xover, P_CROSS, mutation, P_MUT) ; + + eoGenContinue genCont (MAX_GEN) ; // The continuation criteria + + // First evolutionnary algorithm + eoEasyEA gga (genCont, eval, select, transform, replace) ; + + // What's new ? + eoListener listen (argc, argv) ; + rng.reseed (listen.here ().number ()) ; + + vector v ; + v.push_back ("Mars1") ; + v.push_back ("Mars2") ; + eoRingConnectivity conn (listen, v) ; // The ring topology used + + eoCyclicGenContinue cycl_cont (300) ; // Immigration step all 300 evolutions + eoRandomSelect sel_rand ; // Random selection of emigrants + eoSelectMany sel (sel_rand, 0.1) ; /* How many individuals should be selected + to be sent ? */ + eoPlusReplacement repl ; // How to integrate new individuals ? + // A island esay evolutionnary named "Mars" + eoIslandsEasyEA islgga ("Mars1", listen, conn, gga, cycl_cont, sel, repl) ; + islgga (pop) ; + pop.sort () ; + cout << "The final population is now ..." << endl ; + cout << pop << endl ; +} + +int main(int argc, char **argv) { +#ifdef _MSC_VER + + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); + +#endif + + try { + main_function(argc, argv) ; + } + catch(exception& e) { + cout << "Exception: " << e.what () << '\n' ; + } + + return 1 ; +} diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp new file mode 100644 index 000000000..b3e89644e --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp @@ -0,0 +1,96 @@ +#include +#include + +typedef eoBit Indi; // A bitstring with fitness double + +#include "binary_value.h" + +void main_function(int argc, char ** argv) { + + // Some parameters ... + const unsigned int T_SIZE = 3 ; // Size for tournament selection + const unsigned int VEC_SIZE = 50 ; // Number of bits in genotypes + const unsigned int POP_SIZE = 100 ; // Size of population + + const unsigned int MAX_GEN = 1000 ; // Fixed number of generations + + const double P_CROSS = 0.8 ; // Crossover probability + const double P_MUT = 1.0 ; // Mutation probability + + const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation + //const double onePointRate = 0.5 ; // Rate for 1-pt Xover + const double URate = 0.5 ; // Rate for Uniform Xover + //const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation + const double oneBitRate = 0.5 ; // Rate for one-bit mutation + + eoEvalFuncPtr & > eval (binary_value) ; + eoUniformGenerator uGen ; + eoInitFixedLength random (VEC_SIZE, uGen) ; + + eoPop pop (POP_SIZE, random) ; + + apply (eval, pop) ; // A first evaluation of the population + + eoDetTournamentSelect selectOne(T_SIZE) ; + eoSelectPerc select (selectOne) ; // The selection operator + + eoGenerationalReplacement replace ; // The replacement operator + + // Uniform crossover for bitstring + eoUBitXover xoverU ; + eoPropCombinedQuadOp xover (xoverU, URate) ; + + // eoBitMutation mutationBitFlip (P_MUT_PER_BIT) ; + + eoDetBitFlip mutationOneBit ; + + eoPropCombinedMonOp mutation (mutationOneBit, oneBitRate) ; + + eoSGATransform transform (xover, P_CROSS, mutation, P_MUT) ; + + eoGenContinue genCont (MAX_GEN) ; // The continuation criteria + + // First evolutionnary algorithm + eoEasyEA gga (genCont, eval, select, transform, replace) ; + + // What's new ? + eoListener listen (argc, argv) ; + rng.reseed (listen.here ().number ()) ; + + vector v ; + v.push_back ("Mars1") ; + v.push_back ("Mars2") ; // Algos named "Mars1" or "Mars2" are considered ... + + eoRingConnectivity conn (listen, v) ; // The ring topology used + + eoCyclicGenContinue cycl_cont (300) ; // Immigration step all 300 evolutions + eoRandomSelect sel_rand ; // Random selection of emigrants + eoSelectMany sel (sel_rand, 0.1) ; /* How many individuals should be selected + to be sent ? */ + eoPlusReplacement repl ; // How to integrate new individuals ? + // A island esay evolutionnary named "Mars2" + eoIslandsEasyEA islgga ("Mars2", listen, conn, gga, cycl_cont, sel, repl) ; + islgga (pop) ; + pop.sort () ; + cout << "The final population is now ..." << endl ; + cout << pop << endl ; +} + +int main(int argc, char **argv) { +#ifdef _MSC_VER + + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); + +#endif + + try { + main_function(argc, argv) ; + } + catch(exception& e) { + cout << "Exception: " << e.what () << '\n' ; + } + + return 1 ; +} diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile b/eo/tutorial/ParadisEO/Lesson1/Makefile new file mode 100644 index 000000000..3008b72e2 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/Makefile @@ -0,0 +1,27 @@ +ALL = IslandBitEA IslandBitEA2 IslandBitEA1 + +lesson2 : IslandBitEA IslandBitEA2 IslandBitEA1 + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +IslandBitEA : IslandBitEA.o + mpiCC -DPACKAGE=\"eo\" -o IslandBitEA IslandBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +IslandBitEA.o : IslandBitEA.cpp binary_value.h + mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA.cpp + +IslandBitEA1 : IslandBitEA1.o + mpiCC -DPACKAGE=\"eo\" -o IslandBitEA1 IslandBitEA1.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +IslandBitEA1.o : IslandBitEA1.cpp binary_value.h + mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA1.cpp + +IslandBitEA2 : IslandBitEA2.o + mpiCC -DPACKAGE=\"eo\" -o IslandBitEA2 IslandBitEA2.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +IslandBitEA2.o : IslandBitEA2.cpp binary_value.h + mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA2.cpp + diff --git a/eo/tutorial/ParadisEO/Lesson1/binary_value.h b/eo/tutorial/ParadisEO/Lesson1/binary_value.h new file mode 100644 index 000000000..a31c08644 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/binary_value.h @@ -0,0 +1,17 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} + diff --git a/eo/tutorial/ParadisEO/Lesson1/paradiseo.config b/eo/tutorial/ParadisEO/Lesson1/paradiseo.config new file mode 100644 index 000000000..f336791d5 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/paradiseo.config @@ -0,0 +1,4 @@ +127.0.0.1 0 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 +127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 +127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 +127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 diff --git a/eo/tutorial/ParadisEO/Lesson2/Makefile b/eo/tutorial/ParadisEO/Lesson2/Makefile new file mode 100644 index 000000000..12b365eaa --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/Makefile @@ -0,0 +1,21 @@ +ALL = MasterDistEvalBitEA SlaveDistEvalBitEA + +lesson2 : MasterDistEvalBitEA SlaveDistEvalBitEA + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +MasterDistEvalBitEA : MasterDistEvalBitEA.o + mpiCC -DPACKAGE=\"eo\" -o MasterDistEvalBitEA MasterDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +MasterDistEvalBitEA.o : MasterDistEvalBitEA.cpp binary_value.h + mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c MasterDistEvalBitEA.cpp + +SlaveDistEvalBitEA : SlaveDistEvalBitEA.o + mpiCC -DPACKAGE=\"eo\" -o SlaveDistEvalBitEA SlaveDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +SlaveDistEvalBitEA.o : SlaveDistEvalBitEA.cpp binary_value.h + mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c SlaveDistEvalBitEA.cpp + diff --git a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp new file mode 100644 index 000000000..590d3d882 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp @@ -0,0 +1,41 @@ +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +#include +#include + +typedef eoBit Indi; // A bitstring with fitness double + +#include "binary_value.h" + +void main_function(int argc, char **argv) { + + eoEvalFuncPtr & > eval (binary_value) ; + + eoListener listen (argc, argv) ; + + eoEvaluator 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; +} diff --git a/eo/tutorial/ParadisEO/Lesson2/binary_value.h b/eo/tutorial/ParadisEO/Lesson2/binary_value.h new file mode 100644 index 000000000..a31c08644 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/binary_value.h @@ -0,0 +1,17 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} + diff --git a/eo/tutorial/ParadisEO/Lesson2/paradiseo.config b/eo/tutorial/ParadisEO/Lesson2/paradiseo.config new file mode 100644 index 000000000..a639308e0 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/paradiseo.config @@ -0,0 +1,4 @@ +127.0.0.1 0 ${HOME}/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA +127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA +127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA +127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA From 65395e7d282ff1631775dfe1e6e9774fb7b38c5a Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 1 Apr 2002 20:15:32 +0000 Subject: [PATCH 0799/2134] After indoduction of paradisEO, eoEaseyEA was a subclass of class eoPopAlgo and not eoAlgo. I don't have time to investigate, so I went back to a subclass of eoAlgo. We'll sort that out later (after EuroGP I guess). --- eo/src/eoEasyEA.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index e09efc23b..27304b1d1 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -28,6 +28,7 @@ //----------------------------------------------------------------------------- #include +#include #include #include #include @@ -59,7 +60,7 @@ template class eoIslandsEasyEA ; template class eoDistEvalEasyEA ; -template class eoEasyEA: public eoPopAlgo +template class eoEasyEA: public eoAlgo { public: From 9341d7c2293c079ac7c88dd73b50d7cc02c2276d Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Apr 2002 08:42:01 +0000 Subject: [PATCH 0800/2134] Added a few "std::" before copy and ostream_iterator --- eo/src/eoPop.h | 2 +- eo/src/eoVector.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index c5323644e..1a052bd0c 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -257,7 +257,7 @@ class eoPop: public vector, public eoObject, public eoPersistent virtual void printOn(ostream& _os) const { _os << size() << '\n'; - copy( begin(), end(), ostream_iterator( _os, "\n") ); + std::copy( begin(), end(), std::ostream_iterator( _os, "\n") ); } /** @name Methods from eoObject */ diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 9c43fc6f2..81c7584d0 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -22,7 +22,7 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-09-04 06:45:14 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.11 2001-09-04 06:45:14 evomarc Exp $ $Author: evomarc $ + CVS Info: $Date: 2002-04-08 08:42:01 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.12 2002-04-08 08:42:01 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -68,7 +68,7 @@ class eoVector : public EO, public std::vector resize(_v.size()); } - copy(_v.begin(), _v.end(), begin()); + std::copy(_v.begin(), _v.end(), begin()); invalidate(); } @@ -86,7 +86,7 @@ class eoVector : public EO, public std::vector os << size() << ' '; - std::copy(begin(), end(), ostream_iterator(os, " ")); + std::copy(begin(), end(), std::ostream_iterator(os, " ")); } /// reading... From bd688656bba77f89e15424ba0394e2a93e002dce Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Apr 2002 08:42:46 +0000 Subject: [PATCH 0801/2134] Check that size > 1 (otherwise division by 0) --- eo/src/eoRanking.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index 24edde2ed..800232cbc 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -68,6 +68,9 @@ public: unsigned pSize =_pop.size(); unsigned int pSizeMinusOne = pSize-1; + if (pSize <= 1) + throw runtime_error("Cannot do ranking with population of size <= 1"); + // value() refers to the vector of worthes (we're in an eoParamvalue) value().resize(pSize); From 684862253982a8dc082972214235cee7a7a7b5b9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Apr 2002 08:50:27 +0000 Subject: [PATCH 0802/2134] Added the eoIncrementorParam - now ALL pointers allocated in make_checkpoint are stored somewhere (the generation counter was not) --- eo/src/do/make_checkpoint.h | 34 ++++++++++++++++++++++------------ eo/src/utils/eoUpdater.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index f48a2d66e..c9477bd36 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -45,7 +45,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // first, create a checkpoint from the eoContinue eoCheckPoint *checkpoint = new eoCheckPoint(_continue); _state.storeFunctor(checkpoint); - + /////////////////// // Counters ////////////////// @@ -53,14 +53,17 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); eoValueParam& useTimeParam = _parser.createParam(true, "useTime", "Display time (s) every generation", '\0', "Output"); - // Create anyway a generation-counter parameter - eoValueParam *generationCounter = new eoValueParam(0, "Gen."); - // Create an incrementor (sub-class of eoUpdater). - eoIncrementor* increment = new eoIncrementor(generationCounter->value()); - // Add it to the checkpoint, - checkpoint->add(*increment); - // and store it in the state - _state.storeFunctor(increment); + // if we want the time, we need an eoTimeCounter + eoTimeCounter * tCounter = NULL; + + // Create anyway a generation-counter + // Recent change (03/2002): it is now an eoIncrementorParam, both + // a parameter AND updater so you can store it into the eoState + eoIncrementorParam *generationCounter = new eoIncrementorParam("Gen."); + // store it in the state + _state.storeFunctor(generationCounter); + // And add it to the checkpoint, + checkpoint->add(*generationCounter); // dir for DISK output eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); @@ -162,7 +165,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval monitor->add(_eval); if (useTimeParam.value()) // we want time { - eoTimeCounter * tCounter = new eoTimeCounter; + tCounter = new eoTimeCounter; _state.storeFunctor(tCounter); checkpoint->add(*tCounter); monitor->add(*tCounter); @@ -196,6 +199,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // and feed with some statistics fileMonitor->add(*generationCounter); fileMonitor->add(_eval); + if (tCounter) // we want the time as well + { + cout << "On met timecounter\n"; + fileMonitor->add(*tCounter); + } fileMonitor->add(*bestStat); fileMonitor->add(*secondStat); } @@ -209,9 +217,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval _state.storeFunctor(gnuMonitor); checkpoint->add(*gnuMonitor); // and feed with some statistics - if (useEvalParam.value()) + if (useEvalParam.value()) // do we want eval as X coordinate gnuMonitor->add(_eval); - else + else if (tCounter) // or time? + gnuMonitor->add(*tCounter); + else // default: generation gnuMonitor->add(*generationCounter); gnuMonitor->add(*bestStat); gnuMonitor->add(*averageStat); diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index 593c6aa41..a7413ec07 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -29,6 +29,7 @@ #include #include +#include /** eoUpdater is a generic procudere for updating whatever you want. @@ -46,8 +47,10 @@ public: template class eoIncrementor : public eoUpdater {public : + /** Default Ctor - requires a reference to the thing to increment */ eoIncrementor(T& _counter, T _stepsize = 1) : counter(_counter), stepsize(_stepsize) {} + /** Simply increments */ virtual void operator()() { counter += stepsize; @@ -58,6 +61,33 @@ private: T stepsize; }; +/** an eoUpdater that is an eoValueParam (and thus OWNS its counter) + * Mandatory for generation counter in make_checkpoint +*/ +template +class eoIncrementorParam : public eoUpdater, public eoValueParam +{ +public : + /** Default Ctor : a name and optionally an increment*/ + eoIncrementorParam(string _name, T _stepsize = 1) : + eoValueParam(T(0), _name), stepsize(_stepsize) {} + + /** Ctor with a name and non-zero initial value + * and mandatory stepSize to remove ambiguity + */ + eoIncrementorParam(string _name, T _countValue, T _stepsize) : + eoValueParam(_countValue, _name), stepsize(_stepsize) {} + + /** Simply increments */ + virtual void operator()() + { + value() += stepsize; + } + +private: + T stepsize; +}; + #include /** From f3535911a2af230608d97a96e7b7d86fcd71f156 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Apr 2002 18:03:35 +0000 Subject: [PATCH 0803/2134] I suddenly realized that BitEA.html was NOT in the repository! --- eo/tutorial/html/BitEA.html | 261 ++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 eo/tutorial/html/BitEA.html diff --git a/eo/tutorial/html/BitEA.html b/eo/tutorial/html/BitEA.html new file mode 100644 index 000000000..7d75bec5b --- /dev/null +++ b/eo/tutorial/html/BitEA.html @@ -0,0 +1,261 @@ + + + + + + BitEA.cpp + + +Back to Lesson 4 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
      +


      +
      +

      +BitEA.cpp

      +Click on the figure to see the corresponding code.
      +In the code, the colors are meaningfull
      +The actual code is in boldface and the comment in normal face. +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
      +#include <iostream>
      +#include <ga/make_ga.h>
      +#include <apply.h>
      +
      +
      + + + + +
      + +#include "binary_value.h"
      +
      +
      + + + + +
      + +using namespace std;
      +int main(int argc, char* argv[])
      +{
      +  try
      +  {
      +
      +
      + + + + +
      + +//-----------------------------------------------------------------------------
      +// define your genotype and fitness types
      +  typedef eoBit<double> EOT;
      +
      +
      + + + + +
      + +  eoParser parser(argc, argv);  // for user-parameter reading
      +
      +
      + + + + +
      + +  eoState state;      // keeps all things allocated
      +  ///// FIRST, problem or representation dependent stuff
      +  //////////////////////////////////////////////////////
      +
      +
      + + + + +
      + +  // The evaluation fn - encapsulated into an eval counter for output
      +  eoEvalFuncPtr<EOT, float> mainEval( binary_value<EOT> );
      +  eoEvalFuncCounter<EOT> eval(mainEval);
      +
      +
      + + + + +
      + +  // the genotype - through a genotype initializer
      +  eoInit<EOT>& init = make_genotype(parser, state, EOT());
      +
      +
      + + + + +
      + +  // Build the variation operator (any seq/prop construct)
      +  eoGenOp<EOT>& op = make_op(parser, state, init);
      +
      +
      + + + + +
      + +  //// Now the representation-independent things
      +  //////////////////////////////////////////////
      +  // initialize the population - and evaluate
      +  // yes, this is representation indepedent once you have an eoInit
      +  eoPop<EOT>& pop    = make_pop(parser, state, init);
      +
      +
      + + + + +
      + +  // stopping criteria
      +  eoContinue<EOT> & term = make_continue(parser, state, eval);
      +  // output
      +  eoCheckPoint<EOT> & checkpoint = make_checkpoint(parser, state, eval, term);
      +
      +
      + + + + +
      + +  // algorithm (need the operator!)
      +  eoAlgo<EOT>& ga = make_algo_scalar(parser, state, eval, checkpoint, op);
      +  ///// End of construction of the algorith
      +  /////////////////////////////////////////
      +
      +
      + + + + +
      + +  // to be called AFTER all parameters have been read!!!
      +  make_help(parser);
      +  //// GO
      +  ///////
      +
      +
      + + + + +
      + +  // evaluate intial population AFTER help and status in case it takes time
      +  apply(eval, pop);
      +
      +
      + + + + +
      + +  // print it out (sort witout modifying)
      +  cout << "Initial Population\n";
      +  pop.sortedPrintOn(cout);
      +  cout << endl;
      +
      +
      + + + + +
      + +  run_ea(ga, pop); // run the ga
      +
      +
      + + + + +
      + +  // print it out (sort witout modifying)
      +  cout << "Final Population\n";
      +  pop.sortedPrintOn(cout);
      +  cout << endl;
      +
      +
      + + + + +
      + +  }
      +  catch(exception& e)
      +  {
      +      cout << e.what() << endl;
      +  }
      +}
      +
      +
      Back to Lesson 4 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
      +
      +Marc Schoenauer
      +
      Last +modified: Wed Mar 6 05:40:27 2002 + + + From d84517cb53e3d39501451a3bace101bff2627100 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 8 Apr 2002 18:04:32 +0000 Subject: [PATCH 0804/2134] Modified my E-mail address (the old one at Polytechnique will soon be obsolete) --- eo/tutorial/html/FirstBitEA.html | 2 +- eo/tutorial/html/FirstBitGA.html | 2 +- eo/tutorial/html/FirstRealEA.html | 2 +- eo/tutorial/html/FirstRealGA.html | 2 +- eo/tutorial/html/Firstmerge.html | 2 +- eo/tutorial/html/NoWay.html | 2 +- eo/tutorial/html/SecondBitEA.html | 2 +- eo/tutorial/html/binary_value.html | 2 +- eo/tutorial/html/eoBottomUp.html | 2 +- eo/tutorial/html/eoCheckPoint.html | 2 +- eo/tutorial/html/eoEngine.html | 2 +- eo/tutorial/html/eoEval.html | 2 +- eo/tutorial/html/eoGeneration.html | 2 +- eo/tutorial/html/eoInit.html | 2 +- eo/tutorial/html/eoIo.html | 2 +- eo/tutorial/html/eoLesson1.html | 2 +- eo/tutorial/html/eoLesson2.html | 2 +- eo/tutorial/html/eoLesson3.html | 2 +- eo/tutorial/html/eoLesson4.html | 2 +- eo/tutorial/html/eoOutput.html | 2 +- eo/tutorial/html/eoProgramming.html | 2 +- eo/tutorial/html/eoRepresentation.html | 2 +- eo/tutorial/html/eoSGA.html | 2 +- eo/tutorial/html/eoSelect.html | 2 +- eo/tutorial/html/eoStop.html | 2 +- eo/tutorial/html/eoTopDown.html | 2 +- eo/tutorial/html/eoTutorial.html | 2 +- eo/tutorial/html/real_value.html | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/eo/tutorial/html/FirstBitEA.html b/eo/tutorial/html/FirstBitEA.html index 8b7e77fac..4caa11055 100644 --- a/eo/tutorial/html/FirstBitEA.html +++ b/eo/tutorial/html/FirstBitEA.html @@ -361,7 +361,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
      Last modified: Sun Nov 19 22:26:27 2000 diff --git a/eo/tutorial/html/FirstBitGA.html b/eo/tutorial/html/FirstBitGA.html index c0bb7467a..d3012829a 100644 --- a/eo/tutorial/html/FirstBitGA.html +++ b/eo/tutorial/html/FirstBitGA.html @@ -304,7 +304,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
      Last modified: Sun Nov 19 08:31:26 2000 diff --git a/eo/tutorial/html/FirstRealEA.html b/eo/tutorial/html/FirstRealEA.html index 1ea2165ce..ad60c2c22 100644 --- a/eo/tutorial/html/FirstRealEA.html +++ b/eo/tutorial/html/FirstRealEA.html @@ -346,7 +346,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
      Last modified: Wed Nov 29 07:38:36 2000 diff --git a/eo/tutorial/html/FirstRealGA.html b/eo/tutorial/html/FirstRealGA.html index 4f77b96a2..f228adfac 100644 --- a/eo/tutorial/html/FirstRealGA.html +++ b/eo/tutorial/html/FirstRealGA.html @@ -342,7 +342,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
      Last modified: Sun Nov 19 08:31:29 2000 diff --git a/eo/tutorial/html/Firstmerge.html b/eo/tutorial/html/Firstmerge.html index 2c45d6946..2c4e7b9c5 100644 --- a/eo/tutorial/html/Firstmerge.html +++ b/eo/tutorial/html/Firstmerge.html @@ -278,7 +278,7 @@ documentation

      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Tue Nov 7 07:49:47 CET 2000 diff --git a/eo/tutorial/html/NoWay.html b/eo/tutorial/html/NoWay.html index 0976a771f..74d7204cc 100644 --- a/eo/tutorial/html/NoWay.html +++ b/eo/tutorial/html/NoWay.html @@ -69,7 +69,7 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Fri Nov 3 18:49:12 CET 2000 diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index 7715369cb..c1ebd3cbb 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -561,7 +561,7 @@ hints - documentation
      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Sun Nov 26 09:31:04 2000 diff --git a/eo/tutorial/html/binary_value.html b/eo/tutorial/html/binary_value.html index 00fcfb511..45f3e35a1 100644 --- a/eo/tutorial/html/binary_value.html +++ b/eo/tutorial/html/binary_value.html @@ -49,7 +49,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
      Last modified: Wed Nov 29 09:03:09 2000 diff --git a/eo/tutorial/html/eoBottomUp.html b/eo/tutorial/html/eoBottomUp.html index 399abc82b..b35d40262 100644 --- a/eo/tutorial/html/eoBottomUp.html +++ b/eo/tutorial/html/eoBottomUp.html @@ -69,7 +69,7 @@ hints - EO documentation

      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Mon Oct 30 07:28:36 CET 2000 diff --git a/eo/tutorial/html/eoCheckPoint.html b/eo/tutorial/html/eoCheckPoint.html index fe1b4f24b..3b905eed6 100644 --- a/eo/tutorial/html/eoCheckPoint.html +++ b/eo/tutorial/html/eoCheckPoint.html @@ -141,7 +141,7 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Fri Dec. 8 2000  diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index 0c7e8a4e4..d44a90c6f 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -672,7 +672,7 @@ hints -
      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Tue. Jan. 9 2001  diff --git a/eo/tutorial/html/eoEval.html b/eo/tutorial/html/eoEval.html index 896eaffc8..4a90ac330 100644 --- a/eo/tutorial/html/eoEval.html +++ b/eo/tutorial/html/eoEval.html @@ -25,7 +25,7 @@ hints - EO documentation page - Component-Based - Programming hints - EO documentation
      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Mon Nov 6 10:54:33 CET 2000 diff --git a/eo/tutorial/html/eoGeneration.html b/eo/tutorial/html/eoGeneration.html index 1c59d3726..39cfe3da0 100644 --- a/eo/tutorial/html/eoGeneration.html +++ b/eo/tutorial/html/eoGeneration.html @@ -10,7 +10,7 @@
      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Mon Oct 30 19:29:29 CET 2000 diff --git a/eo/tutorial/html/eoInit.html b/eo/tutorial/html/eoInit.html index 2a2d2d78b..3a4df155c 100644 --- a/eo/tutorial/html/eoInit.html +++ b/eo/tutorial/html/eoInit.html @@ -27,7 +27,7 @@ page - Component-Based - EO documentation
      -Marc Schoenauer
      +Marc Schoenauer Last modified: Mon Nov 6 11:25:18 CET 2000 diff --git a/eo/tutorial/html/eoIo.html b/eo/tutorial/html/eoIo.html index 4e37700f4..14e0d37c1 100644 --- a/eo/tutorial/html/eoIo.html +++ b/eo/tutorial/html/eoIo.html @@ -16,7 +16,7 @@

      Displaying statistics


      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Tue Oct 31 18:32:22 CET 2000 diff --git a/eo/tutorial/html/eoLesson1.html b/eo/tutorial/html/eoLesson1.html index 7dce49a0c..f88921015 100644 --- a/eo/tutorial/html/eoLesson1.html +++ b/eo/tutorial/html/eoLesson1.html @@ -432,7 +432,7 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Fri Nov 3 18:49:12 CET 2000 diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 5204e4b40..9d270b50c 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -355,7 +355,7 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Fri Nov 3 18:49:12 CET 2000 diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index faa3fe58d..8563769e8 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -546,7 +546,7 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: None of your business! diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index 4057f9721..8699cb0ad 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -864,7 +864,7 @@ documentation


      -Marc +Marc Schoenauer

      Last diff --git a/eo/tutorial/html/eoOutput.html b/eo/tutorial/html/eoOutput.html index 2a9bc810a..4e77cd2ea 100644 --- a/eo/tutorial/html/eoOutput.html +++ b/eo/tutorial/html/eoOutput.html @@ -10,7 +10,7 @@
      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Mon Oct 30 19:29:19 CET 2000 diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 4c6d9115d..d5f90c30f 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -491,6 +491,6 @@ main page - Algorithm-Based - Marc Schoenauer +
      Marc Schoenauer diff --git a/eo/tutorial/html/eoRepresentation.html b/eo/tutorial/html/eoRepresentation.html index f572f1b41..41a63f6df 100644 --- a/eo/tutorial/html/eoRepresentation.html +++ b/eo/tutorial/html/eoRepresentation.html @@ -10,7 +10,7 @@
      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Mon Oct 30 19:28:01 CET 2000 diff --git a/eo/tutorial/html/eoSGA.html b/eo/tutorial/html/eoSGA.html index 7d4547140..2e2428701 100644 --- a/eo/tutorial/html/eoSGA.html +++ b/eo/tutorial/html/eoSGA.html @@ -149,7 +149,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
      Last modified: Sun Nov 19 19:36:21 2000 diff --git a/eo/tutorial/html/eoSelect.html b/eo/tutorial/html/eoSelect.html index a415b460c..9de6bb612 100644 --- a/eo/tutorial/html/eoSelect.html +++ b/eo/tutorial/html/eoSelect.html @@ -10,7 +10,7 @@
      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Mon Oct 30 17:51:55 CET 2000 diff --git a/eo/tutorial/html/eoStop.html b/eo/tutorial/html/eoStop.html index 4e37700f4..14e0d37c1 100644 --- a/eo/tutorial/html/eoStop.html +++ b/eo/tutorial/html/eoStop.html @@ -16,7 +16,7 @@

      Displaying statistics


      -
      Marc Schoenauer
      +
      Marc Schoenauer
      Last modified: Tue Oct 31 18:32:22 CET 2000 diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index d69a71b77..0334f90a9 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -99,7 +99,7 @@ documentation


      -Marc Schoenauer
      +Marc Schoenauer
      Last modified: Tue Dec 19 2000  diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 6cb354d29..5fbba29d3 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -204,7 +204,7 @@ documentation

    -Marc Schoenauer
    +Marc Schoenauer
    Last modified: Fri Nov 28 2000  diff --git a/eo/tutorial/html/real_value.html b/eo/tutorial/html/real_value.html index dc3720f92..a5ec17852 100644 --- a/eo/tutorial/html/real_value.html +++ b/eo/tutorial/html/real_value.html @@ -48,7 +48,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
    Last modified: Wed Nov 29 08:58:50 2000 From 9492ebd58eb74d93eae80e57efd058b703e74f1f Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 9 Apr 2002 08:48:44 +0000 Subject: [PATCH 0805/2134] Modified the comments so they appear in doxygen doc (and updated them also) --- eo/src/eoReplacement.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index d0b6452ce..c90033310 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -37,12 +37,22 @@ //----------------------------------------------------------------------------- /** -eoReplacement: High level strategy for creating a new generation -from parents and offspring. +eoReplacement: the base class for all replacement functors. +NOTE: 2 eoPop as arguments +the resulting population should be in the first argument (replace +parents by offspring)! The second argument can contain any rubbish + +--- The eoMergeReduce, combination of eoMerge and eoReduce, can be found in file eoMergeReduce.h +The eoReduceMergeReduce that reduces the parents and the offspring, +merges the 2 reduced populations, and eventually reduces that final +population, can be found in eoReduceMergeReduce.h + +LOG +--- Removed the const before first argument: though it makes too many classes with the same interface, it allows to minimize the number of actual copies by choosing the right destination @@ -51,18 +61,12 @@ replacement gets a class of its own that only does the swap (instead of the eoNoReplacement that did nothing, relying on the algo to swap popualtions). MS 12/12/2000 -NOTE: the resulting population should always be in the first argument -(replace parents by offspring)! The second argument can contain any rubbish - @see eoMerge, eoReduce, eoMergeReduce, eoReduceMerge @classes eoReplacement, base (pure abstract) class eoGenerationalReplacement, as it says ... eoWeakElitistReplacement a wrapper to add elitism -*/ -/** -eoReplacement: the base class for all replacementp functors */ template class eoReplacement : public eoBF&, eoPop&, void> From 2ad3cbe9da47dade4b59f4db61f94e68615041ec Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Apr 2002 13:38:08 +0000 Subject: [PATCH 0806/2134] Added name of the Debug library --- eo/win/all_lib.dsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index 347390495..b1970d0eb 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -49,7 +49,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug/all_libd.lib" # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Install From 64ca17c66f2f155026175fbb72f6cdec893cc7b3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Apr 2002 14:13:08 +0000 Subject: [PATCH 0807/2134] Adding ParadisEO Tutorial examples --- eo/win/create_tut_para.sh | 38 ++++++++++++++ eo/win/eo.dsw | 75 ++++++++++++++++++++++++++ eo/win/tut_para1_full.dsp | 102 ++++++++++++++++++++++++++++++++++++ eo/win/tut_para1_ring1.dsp | 102 ++++++++++++++++++++++++++++++++++++ eo/win/tut_para1_ring2.dsp | 102 ++++++++++++++++++++++++++++++++++++ eo/win/tut_para2_master.dsp | 102 ++++++++++++++++++++++++++++++++++++ eo/win/tut_para2_slave.dsp | 102 ++++++++++++++++++++++++++++++++++++ eo/win/tut_paraN_XXX.tmpl | 102 ++++++++++++++++++++++++++++++++++++ 8 files changed, 725 insertions(+) create mode 100755 eo/win/create_tut_para.sh create mode 100644 eo/win/tut_para1_full.dsp create mode 100644 eo/win/tut_para1_ring1.dsp create mode 100644 eo/win/tut_para1_ring2.dsp create mode 100644 eo/win/tut_para2_master.dsp create mode 100644 eo/win/tut_para2_slave.dsp create mode 100644 eo/win/tut_paraN_XXX.tmpl diff --git a/eo/win/create_tut_para.sh b/eo/win/create_tut_para.sh new file mode 100755 index 000000000..6e12d41e4 --- /dev/null +++ b/eo/win/create_tut_para.sh @@ -0,0 +1,38 @@ +#! /bin/tcsh -f + +if ($#argv < 2) then + echo "Usage $0 LessonNumber NickName SourceName (no .cpp)" + echo Example: $0 1 bit FirstBitGA + echo " will create the Win project file tut_para1_bit.dsp" + echo " that will create the executable tut_para1_full.exe using source" + echo " IslandBitEA.cpp in tutorial/ParadisEO/Lesson1 dir" + exit +endif +echo "Creating tut_{$1}_{$2}.dsp" +echo s/tut_N_XXX/tut_para{$1}_{$2}/g > toto.sed +echo s/LessonN/Lesson$1/g >> toto.sed +echo s/SRCXXX/$3/g >> toto.sed + +sed -f toto.sed tut_paraN_XXX.tmpl > tut_para{$1}_{$2}.dsp +/bin/rm toto.sed + +echo "Adding tut_{$1}_{$2}.dsp in the main eo.dsw project file" + +echo "" >> eo.dsw +echo Project: \"tut_para{$1}_{$2}\"=.\\\\tut_para{$1}_{$2}.dsp - Package Owner=\<4\> >> eo.dsw +echo "" >> eo.dsw +echo Package=\<5\> >> eo.dsw +echo '{{{' >> eo.dsw +echo '}}}' >> eo.dsw +echo "" >> eo.dsw +echo Package=\<4\> >> eo.dsw +echo '{{{' >> eo.dsw +echo '}}}' >> eo.dsw +echo "" >> eo.dsw +echo '###############################################################################' >> eo.dsw + +echo "AND DON'T FORGET to add the 3 lines in eo.dsw" +echo " (too lazy to do it automatically)" +echo " Begin Project Dependency" +echo " " Project_Dep_Name tut_para{$1}_{$2} +echo " End Project Dependency" diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index ec7f6e45f..612aa082a 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -148,6 +148,21 @@ Package=<4> Begin Project Dependency Project_Dep_Name tut_4_es End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_para1_full + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_para1_ring1 + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_para1_ring2 + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_para2_master + End Project Dependency + Begin Project Dependency + Project_Dep_Name tut_para2_slave + End Project Dependency }}} ############################################################################### @@ -618,3 +633,63 @@ Package=<4> }}} ############################################################################### + +Project: "tut_para1_full"=.\tut_para1_full.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_para1_ring1"=.\tut_para1_ring1.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_para1_ring2"=.\tut_para1_ring2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_para2_master"=.\tut_para2_master.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tut_para2_slave"=.\tut_para2_slave.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### diff --git a/eo/win/tut_para1_full.dsp b/eo/win/tut_para1_full.dsp new file mode 100644 index 000000000..f68109e98 --- /dev/null +++ b/eo/win/tut_para1_full.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_para1_full" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_para1_full - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_para1_full.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_para1_full.mak" CFG="tut_para1_full - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_para1_full - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_para1_full - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_para1_full - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_para1_full - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_para1_full___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_para1_full___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_para1_full - Win32 Release" +# Name "tut_para1_full - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\ParadisEO\Lesson1\IslandBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_para1_ring1.dsp b/eo/win/tut_para1_ring1.dsp new file mode 100644 index 000000000..cafff2d82 --- /dev/null +++ b/eo/win/tut_para1_ring1.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_para1_ring1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_para1_ring1 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_para1_ring1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_para1_ring1.mak" CFG="tut_para1_ring1 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_para1_ring1 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_para1_ring1 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_para1_ring1 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_para1_ring1 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_para1_ring1___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_para1_ring1___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_para1_ring1 - Win32 Release" +# Name "tut_para1_ring1 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\ParadisEO\Lesson1\IslandBitEA1.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_para1_ring2.dsp b/eo/win/tut_para1_ring2.dsp new file mode 100644 index 000000000..34edd821b --- /dev/null +++ b/eo/win/tut_para1_ring2.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_para1_ring2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_para1_ring2 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_para1_ring2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_para1_ring2.mak" CFG="tut_para1_ring2 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_para1_ring2 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_para1_ring2 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_para1_ring2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_para1_ring2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_para1_ring2___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_para1_ring2___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_para1_ring2 - Win32 Release" +# Name "tut_para1_ring2 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\ParadisEO\Lesson1\IslandBitEA2.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_para2_master.dsp b/eo/win/tut_para2_master.dsp new file mode 100644 index 000000000..aa745fb63 --- /dev/null +++ b/eo/win/tut_para2_master.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_para2_master" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_para2_master - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_para2_master.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_para2_master.mak" CFG="tut_para2_master - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_para2_master - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_para2_master - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_para2_master - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_para2_master - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_para2_master___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_para2_master___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_para2_master - Win32 Release" +# Name "tut_para2_master - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\ParadisEO\Lesson2\MasterDistEvalBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_para2_slave.dsp b/eo/win/tut_para2_slave.dsp new file mode 100644 index 000000000..1106761fd --- /dev/null +++ b/eo/win/tut_para2_slave.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_para2_slave" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_para2_slave - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_para2_slave.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_para2_slave.mak" CFG="tut_para2_slave - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_para2_slave - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_para2_slave - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_para2_slave - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_para2_slave - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_para2_slave___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_para2_slave___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_para2_slave - Win32 Release" +# Name "tut_para2_slave - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\ParadisEO\Lesson2\SlaveDistEvalBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_paraN_XXX.tmpl b/eo/win/tut_paraN_XXX.tmpl new file mode 100644 index 000000000..9616115da --- /dev/null +++ b/eo/win/tut_paraN_XXX.tmpl @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="tut_N_XXX" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_N_XXX - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_N_XXX.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_N_XXX.mak" CFG="tut_N_XXX - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_N_XXX - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_N_XXX - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_N_XXX - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 all_lib.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_N_XXX - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_N_XXX___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_N_XXX___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 all_libd.lib mpich.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_N_XXX - Win32 Release" +# Name "tut_N_XXX - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\ParadisEO\LessonN\SRCXXX.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From a1fffff0455966a1e0ab5e361363d4a2d069e14f Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Apr 2002 14:39:58 +0000 Subject: [PATCH 0808/2134] 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 --- eo/src/{paradiseo => paradiseo.h} | 0 eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp | 2 +- eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp | 2 +- eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp | 2 +- eo/tutorial/ParadisEO/Lesson1/Makefile | 14 ++++++++------ eo/tutorial/ParadisEO/Lesson2/Makefile | 10 ++++++---- .../ParadisEO/Lesson2/MasterDistEvalBitEA.cpp | 2 +- .../ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp | 2 +- 8 files changed, 19 insertions(+), 15 deletions(-) rename eo/src/{paradiseo => paradiseo.h} (100%) diff --git a/eo/src/paradiseo b/eo/src/paradiseo.h similarity index 100% rename from eo/src/paradiseo rename to eo/src/paradiseo.h diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp index 1793bc670..2b2b1024c 100644 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp @@ -1,4 +1,4 @@ -#include +#include #include typedef eoBit Indi; // A bitstring with fitness double diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp index f984bf816..17d47d210 100644 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp @@ -1,4 +1,4 @@ -#include +#include #include typedef eoBit Indi; // A bitstring with fitness double diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp index b3e89644e..98a9b2b5d 100644 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp @@ -1,4 +1,4 @@ -#include +#include #include typedef eoBit Indi; // A bitstring with fitness double diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile b/eo/tutorial/ParadisEO/Lesson1/Makefile index 3008b72e2..d96cfe1c3 100644 --- a/eo/tutorial/ParadisEO/Lesson1/Makefile +++ b/eo/tutorial/ParadisEO/Lesson1/Makefile @@ -1,3 +1,5 @@ +MPICC = ./mpiCC + ALL = IslandBitEA IslandBitEA2 IslandBitEA1 lesson2 : IslandBitEA IslandBitEA2 IslandBitEA1 @@ -8,20 +10,20 @@ clean : @/bin/rm $(ALL) *.o *~ IslandBitEA : IslandBitEA.o - mpiCC -DPACKAGE=\"eo\" -o IslandBitEA IslandBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA IslandBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a IslandBitEA.o : IslandBitEA.cpp binary_value.h - mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA.cpp + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA.cpp IslandBitEA1 : IslandBitEA1.o - mpiCC -DPACKAGE=\"eo\" -o IslandBitEA1 IslandBitEA1.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA1 IslandBitEA1.o ../../../src/utils/libeoutils.a ../../../src/libeo.a IslandBitEA1.o : IslandBitEA1.cpp binary_value.h - mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA1.cpp + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA1.cpp IslandBitEA2 : IslandBitEA2.o - mpiCC -DPACKAGE=\"eo\" -o IslandBitEA2 IslandBitEA2.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA2 IslandBitEA2.o ../../../src/utils/libeoutils.a ../../../src/libeo.a IslandBitEA2.o : IslandBitEA2.cpp binary_value.h - mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA2.cpp + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA2.cpp diff --git a/eo/tutorial/ParadisEO/Lesson2/Makefile b/eo/tutorial/ParadisEO/Lesson2/Makefile index 12b365eaa..ae927b084 100644 --- a/eo/tutorial/ParadisEO/Lesson2/Makefile +++ b/eo/tutorial/ParadisEO/Lesson2/Makefile @@ -1,3 +1,5 @@ +MPICC = ./mpiCC + ALL = MasterDistEvalBitEA SlaveDistEvalBitEA lesson2 : MasterDistEvalBitEA SlaveDistEvalBitEA @@ -8,14 +10,14 @@ clean : @/bin/rm $(ALL) *.o *~ MasterDistEvalBitEA : MasterDistEvalBitEA.o - mpiCC -DPACKAGE=\"eo\" -o MasterDistEvalBitEA MasterDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + $(MPICC) -DPACKAGE=\"eo\" -o MasterDistEvalBitEA MasterDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a MasterDistEvalBitEA.o : MasterDistEvalBitEA.cpp binary_value.h - mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c MasterDistEvalBitEA.cpp + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c MasterDistEvalBitEA.cpp SlaveDistEvalBitEA : SlaveDistEvalBitEA.o - mpiCC -DPACKAGE=\"eo\" -o SlaveDistEvalBitEA SlaveDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + $(MPICC) -DPACKAGE=\"eo\" -o SlaveDistEvalBitEA SlaveDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a SlaveDistEvalBitEA.o : SlaveDistEvalBitEA.cpp binary_value.h - mpiCC -DPACKAGE=\"eo\" -I. -I../../../src -c SlaveDistEvalBitEA.cpp + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c SlaveDistEvalBitEA.cpp diff --git a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp index 978fd5565..b2b154ffe 100644 --- a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include typedef eoBit Indi ; // A bitstring with fitness double diff --git a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp index 590d3d882..5194d789d 100644 --- a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp @@ -2,7 +2,7 @@ #include // cout #include // ostrstream, istrstream -#include +#include #include typedef eoBit Indi; // A bitstring with fitness double From 019c8cd3e3de124801cdc4c2684c2bc5b4dd5e08 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Apr 2002 14:41:52 +0000 Subject: [PATCH 0809/2134] Turned the specific compiler order mpiCC into a Macro so it's easier to modify We shall need to put this into the automatic configure one day ... --- eo/tutorial/ParadisEO/Lesson1/Makefile | 2 +- eo/tutorial/ParadisEO/Lesson2/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile b/eo/tutorial/ParadisEO/Lesson1/Makefile index d96cfe1c3..7bd46d2a6 100644 --- a/eo/tutorial/ParadisEO/Lesson1/Makefile +++ b/eo/tutorial/ParadisEO/Lesson1/Makefile @@ -1,4 +1,4 @@ -MPICC = ./mpiCC +MPICC = mpiCC ALL = IslandBitEA IslandBitEA2 IslandBitEA1 diff --git a/eo/tutorial/ParadisEO/Lesson2/Makefile b/eo/tutorial/ParadisEO/Lesson2/Makefile index ae927b084..87ea5380d 100644 --- a/eo/tutorial/ParadisEO/Lesson2/Makefile +++ b/eo/tutorial/ParadisEO/Lesson2/Makefile @@ -1,4 +1,4 @@ -MPICC = ./mpiCC +MPICC = mpiCC ALL = MasterDistEvalBitEA SlaveDistEvalBitEA From 42a2a4f69e92b4913ce6046d766aafaae696707d Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Apr 2002 15:13:45 +0000 Subject: [PATCH 0810/2134] A few changes for MSVC++ compatibility --- eo/src/utils/eoFDCStat.h | 5 +++-- eo/src/utils/eoTimeCounter.h | 8 ++++---- eo/src/utils/eoUpdater.h | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h index eaee82f23..134a64f02 100644 --- a/eo/src/utils/eoFDCStat.h +++ b/eo/src/utils/eoFDCStat.h @@ -56,13 +56,14 @@ public : */ virtual void operator()(const eoPop& _pop) { + unsigned i; if (!boolOpt) // take the local best theBest = _pop.best_element(); unsigned int pSize = _pop.size(); distToBest.value().resize(pSize); fitnesses.value().resize(pSize); double sumFit = 0.0, sumDist = 0.0; - for (unsigned i=0; i +#include #include @@ -45,7 +45,7 @@ public: virtual void operator()() { // ask for system time - times(&tmsStruct); + utime = clock(); // if (firstTime) /* first generation */ // { // firstTime=false; @@ -53,13 +53,13 @@ public: // } // store elapsed user time // value(tmsStruct.tms_utime - firstUtime); - value()=double(tmsStruct.tms_utime)/100; + value()=double(utime)/CLOCKS_PER_SEC; } private: // bool firstTime; // clock_t firstUtime; - struct tms tmsStruct; // stores time + clock_t utime; }; #endif diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index a7413ec07..4d87906b5 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -27,6 +27,7 @@ #ifndef _eoUpdater_h #define _eoUpdater_h +#include #include #include #include @@ -69,13 +70,13 @@ class eoIncrementorParam : public eoUpdater, public eoValueParam { public : /** Default Ctor : a name and optionally an increment*/ - eoIncrementorParam(string _name, T _stepsize = 1) : + eoIncrementorParam( std::string _name, T _stepsize = 1) : eoValueParam(T(0), _name), stepsize(_stepsize) {} /** Ctor with a name and non-zero initial value * and mandatory stepSize to remove ambiguity */ - eoIncrementorParam(string _name, T _countValue, T _stepsize) : + eoIncrementorParam( std::string _name, T _countValue, T _stepsize) : eoValueParam(_countValue, _name), stepsize(_stepsize) {} /** Simply increments */ From 21372a2d821eaba3ac549fe50f3cd04f9d6873da Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 12 Apr 2002 16:17:02 +0000 Subject: [PATCH 0811/2134] Changed name of target in all_lib.dsp Added eoParetoFitness.cpp in sources of eo.dsp --- eo/win/all_lib.dsp | 4 ++-- eo/win/eo.dsp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index b1970d0eb..fdf343ad1 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -49,7 +49,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug/all_libd.lib" +# ADD LIB32 /nologo /out:"Debug/all_lib.lib" # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Install @@ -77,7 +77,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug/all_libd.lib" # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Install diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 47f7c1039..94c1185c0 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -101,6 +101,10 @@ SOURCE=..\src\eoFunctorStore.cpp # End Source File # Begin Source File +SOURCE=..\src\eoParetoFitness.cpp +# End Source File +# Begin Source File + SOURCE=..\src\eoPersistent.cpp # End Source File # Begin Source File From 34c5efdcbf1a6a6cad577493bcb6dc1f5a8b98fe Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 15 Apr 2002 12:56:35 +0000 Subject: [PATCH 0812/2134] eoParseTree printOn and readFrom functions changed for compatibility with paradisEO The fitness is now printed in the same way as in eoBit --- eo/src/gp/eoParseTree.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 56199dc12..6615b4edd 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -66,13 +66,14 @@ public : /** * Default Constructor */ - eoParseTree(void) {} + eoParseTree(void) : EO() {} /** * Copy Constructor * @param tree The tree to copy */ - eoParseTree(const parse_tree& tree) : parse_tree(tree) {} + eoParseTree(const parse_tree& tree) : EO(), parse_tree(tree) {} + eoParseTree(const eoParseTree& tree) : EO(), parse_tree(tree) {} /** * To prune me to a certain size * @param _size My maximum size @@ -107,8 +108,15 @@ public : */ void printOn(std::ostream& os) const { + cerr << "in eoParseTree<...>::printOn(...) " << endl; + + EO::printOn(os); + /* + * old code which caused problems for paradisEO + * now we use EO::readFrom(is) + * os << fitness() << ' '; - + */ std::copy(ebegin(), eend(), ostream_iterator(os)); } @@ -118,11 +126,18 @@ public : */ void readFrom(std::istream& is) { - FType fit; - + EO::readFrom(is); + + + /* + * old code which caused problems for paradisEO + * now we use EO::readFrom(is) + * + FType fit; is >> fit; fitness(fit); + */ std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); } @@ -132,6 +147,7 @@ public : template std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) { + cerr << "in operator<<(ostream, eoParseTree<...>)" << endl; eot.printOn(os); return os; } From 521f1b14ff12ddd4f9c18764a0e4b97c3975cfcc Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 15 Apr 2002 14:12:19 +0000 Subject: [PATCH 0813/2134] *** empty log message *** --- eo/src/gp/eoParseTree.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 6615b4edd..ce9c656fa 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -108,7 +108,6 @@ public : */ void printOn(std::ostream& os) const { - cerr << "in eoParseTree<...>::printOn(...) " << endl; EO::printOn(os); /* @@ -147,7 +146,6 @@ public : template std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) { - cerr << "in operator<<(ostream, eoParseTree<...>)" << endl; eot.printOn(os); return os; } From d1ef6b2c0060cef4bd6902ad0d9164dc5c16defb Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Apr 2002 03:22:47 +0000 Subject: [PATCH 0814/2134] Added the README, and modified the config files to remove the 127.0.0.1 that was misleading --- eo/tutorial/ParadisEO/Lesson1/paradiseo.config | 8 ++++---- eo/tutorial/ParadisEO/Lesson2/paradiseo.config | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eo/tutorial/ParadisEO/Lesson1/paradiseo.config b/eo/tutorial/ParadisEO/Lesson1/paradiseo.config index f336791d5..ac546ad3a 100644 --- a/eo/tutorial/ParadisEO/Lesson1/paradiseo.config +++ b/eo/tutorial/ParadisEO/Lesson1/paradiseo.config @@ -1,4 +1,4 @@ -127.0.0.1 0 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 -127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 -127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 -127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 +${MACHINE1} 0 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 +${MACHINE2} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 +${MACHINE3} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 +${MACHINE4} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 diff --git a/eo/tutorial/ParadisEO/Lesson2/paradiseo.config b/eo/tutorial/ParadisEO/Lesson2/paradiseo.config index a639308e0..8c1e07af8 100644 --- a/eo/tutorial/ParadisEO/Lesson2/paradiseo.config +++ b/eo/tutorial/ParadisEO/Lesson2/paradiseo.config @@ -1,4 +1,4 @@ -127.0.0.1 0 ${HOME}/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA -127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA -127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA -127.0.0.1 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA +${MACHINE0} 0 ${HOME}/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA +${MACHINE0} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA +${MACHINE1} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA +${MACHINE2} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA From 34d474e6f6be91c71f775353852ce224a5a5fa82 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Apr 2002 03:23:24 +0000 Subject: [PATCH 0815/2134] Ome explanations on how to launch the examples --- eo/tutorial/ParadisEO/README | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 eo/tutorial/ParadisEO/README diff --git a/eo/tutorial/ParadisEO/README b/eo/tutorial/ParadisEO/README new file mode 100644 index 000000000..35688438f --- /dev/null +++ b/eo/tutorial/ParadisEO/README @@ -0,0 +1,52 @@ +Using the examples +================== + +Compiling the examples +---------------------- +Of course, you need to have MPICH installed, and to set the MPICH +variable before compiling if it is not in your regular path (see the +Makefiles). + +Running the examples +-------------------- +1- For SPMD applications, this is easy. The command is: + +> mpirun -np <#num_procs> + +For example, + +> mpirun -np 3 IslandBitEA + +will launch a 3 islands-based evolutionary algorithm on the same +computer. + +-------------------- +2- When you want to run different executables on some hosts, you need +a configuration file to tell which executable is running on which +machine. For instance, in Lesson1, the config file + +pc1 0 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 +pc2 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 +pc3 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 +pc4 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 + +is then run by the command ***launched on pc1*** + +> mpirun -p4pg pgfile ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 + +and will run specifies 4 processes, respectively on the hosts pc1, +pc2, pc3 and pc4. + +Here, the path of the executables are identical, but this is always +the case. + +There ***need*** to be exactly one line corresponding to the local +computer you are running the mpirun command from with 0 after the +hostname and the name of the executable ***must*** be the same than +the name you give on the mpirun command line + +You must be able to connect to all the computers listed in the +config file using ssh + +You can put the IP numbers of the computers, but NOT use 127.0.0.1 +to specify the local host if you have more than one computer involved From aa0437dc11c0d920051dc56032d472ea2d67b6be Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 18 Apr 2002 13:56:36 +0000 Subject: [PATCH 0816/2134] new printOn and readFrom functions (they look more like the eoBit ones) --- eo/src/gp/eoParseTree.h | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index ce9c656fa..af684acfa 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -108,15 +108,12 @@ public : */ void printOn(std::ostream& os) const { - EO::printOn(os); - /* - * old code which caused problems for paradisEO - * now we use EO::readFrom(is) - * - os << fitness() << ' '; - */ - std::copy(ebegin(), eend(), ostream_iterator(os)); + os << ' '; + + os << size() << ' '; + + std::copy(ebegin(), eend(), std::ostream_iterator(os, " ")); } /** @@ -125,20 +122,42 @@ public : */ void readFrom(std::istream& is) { - EO::readFrom(is); + + + EO::readFrom(is); + + unsigned sz; + is >> sz; + + vector v(sz); + + unsigned i; + + for (i = 0; i < sz; ++i) + { + Node node; + is >> node; + v[i] = node; + } + parse_tree tmp(v.begin(), v.end()); + swap(tmp); /* * old code which caused problems for paradisEO - * now we use EO::readFrom(is) * + * this can be removed once it has proved itself + EO::readFrom(is); + + // even older code FType fit; is >> fit; fitness(fit); - */ + std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); + */ } }; From 9a56356c3376e59ee0b55afc04dff823d8f1aedb Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 19 Apr 2002 14:04:25 +0000 Subject: [PATCH 0817/2134] Replaced floats by doubles --- eo/src/eoStochTournamentSelect.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h index b0ba2ec9e..a2928a52c 100755 --- a/eo/src/eoStochTournamentSelect.h +++ b/eo/src/eoStochTournamentSelect.h @@ -44,7 +44,7 @@ template class eoStochTournamentSelect: public eoSelectOne public: /// - eoStochTournamentSelect(float _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) + eoStochTournamentSelect(double _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) { // consistency checks if (Trate < 0.5) { @@ -64,7 +64,7 @@ template class eoStochTournamentSelect: public eoSelectOne } private: - float Trate; + double Trate; }; //----------------------------------------------------------------------------- From cec8f9136aa87d27aec88a86ae34fe96aec163e2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 19 Apr 2002 14:06:50 +0000 Subject: [PATCH 0818/2134] Templatized apply added a return statement --- eo/tutorial/Templates/MyStructEA.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/Templates/MyStructEA.cpp b/eo/tutorial/Templates/MyStructEA.cpp index 64aa10b28..b8ec1bb14 100644 --- a/eo/tutorial/Templates/MyStructEA.cpp +++ b/eo/tutorial/Templates/MyStructEA.cpp @@ -167,7 +167,7 @@ int main(int argc, char* argv[]) //// GO /////// // evaluate intial population AFTER help and status in case it takes time - apply(eval, pop); + apply(eval, pop); // if you want to print it out // cout << "Initial Population\n"; // pop.sortedPrintOn(cout); @@ -184,4 +184,5 @@ int main(int argc, char* argv[]) { cout << e.what() << endl; } + return 0; } From 43779ba380959d0acfeeb686245335049d63e30a Mon Sep 17 00:00:00 2001 From: music_dev Date: Fri, 19 Apr 2002 14:42:47 +0000 Subject: [PATCH 0819/2134] Multithreaded version. Changed name of lib to eo_lib[d].lib --- eo/win/all_lib.dsp | 204 +++++++------- eo/win/all_tests.dsp | 192 ++++++------- eo/win/all_tut.dsp | 192 ++++++------- eo/win/eo.dsp | 264 +++++++++--------- eo/win/es.dsp | 468 +++++++++++++++---------------- eo/win/ga.dsp | 308 ++++++++++----------- eo/win/t_eo.dsp | 204 +++++++------- eo/win/t_eobin.dsp | 204 +++++++------- eo/win/t_eocheckpointing.dsp | 204 +++++++------- eo/win/t_eoesall.dsp | 205 +++++++------- eo/win/t_eoexternaleo.dsp | 204 +++++++------- eo/win/t_eofitness.dsp | 204 +++++++------- eo/win/t_eoga.dsp | 204 +++++++------- eo/win/t_eogenop.dsp | 204 +++++++------- eo/win/t_eopareto.dsp | 204 +++++++------- eo/win/t_eoparetofitness.dsp | 204 +++++++------- eo/win/t_eopbil.dsp | 204 +++++++------- eo/win/t_eorandom.dsp | 204 +++++++------- eo/win/t_eoreal.dsp | 204 +++++++------- eo/win/t_eoreplacement.dsp | 204 +++++++------- eo/win/t_eoselect.dsp | 204 +++++++------- eo/win/t_eossga.dsp | 204 +++++++------- eo/win/t_eostateandparser.dsp | 204 +++++++------- eo/win/t_eosymreg.dsp | 204 +++++++------- eo/win/t_eovector.dsp | 204 +++++++------- eo/win/t_eovirus.dsp | 204 +++++++------- eo/win/t_mge-control.dsp | 204 +++++++------- eo/win/t_mge.dsp | 204 +++++++------- eo/win/t_mge1bit.dsp | 204 +++++++------- eo/win/tut_1_bit.dsp | 204 +++++++------- eo/win/tut_1_ex3.dsp | 204 +++++++------- eo/win/tut_1_real.dsp | 204 +++++++------- eo/win/tut_2_bit.dsp | 204 +++++++------- eo/win/tut_2_ex3.dsp | 204 +++++++------- eo/win/tut_2_real.dsp | 204 +++++++------- eo/win/tut_3_bit.dsp | 204 +++++++------- eo/win/tut_3_ex1.dsp | 204 +++++++------- eo/win/tut_4_bit.dsp | 204 +++++++------- eo/win/tut_4_es.dsp | 204 +++++++------- eo/win/tut_4_real.dsp | 204 +++++++------- eo/win/utils.dsp | 500 +++++++++++++++++----------------- 41 files changed, 4532 insertions(+), 4533 deletions(-) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index fdf343ad1..a578ee067 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=all_lib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_lib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_lib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug/all_lib.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\all_lib.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug/all_libd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\all_libd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "all_lib - Win32 Release" -# Name "all_lib - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=all_lib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_lib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Release/eo_lib.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo_lib.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug/eo_libd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eo_libd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "all_lib - Win32 Release" +# Name "all_lib - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/eo/win/all_tests.dsp b/eo/win/all_tests.dsp index 49032a4d7..a3f4a8ce6 100644 --- a/eo/win/all_tests.dsp +++ b/eo/win/all_tests.dsp @@ -1,96 +1,96 @@ -# Microsoft Developer Studio Project File - Name="all_tests" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=all_tests - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_tests.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_tests.mak" CFG="all_tests - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_tests - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "all_tests - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_tests - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "all_tests - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "all_tests - Win32 Release" -# Name "all_tests - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_tests" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=all_tests - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_tests.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_tests.mak" CFG="all_tests - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_tests - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "all_tests - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_tests - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "all_tests - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "all_tests - Win32 Release" +# Name "all_tests - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/all_tut.dsp b/eo/win/all_tut.dsp index 68c0d42db..8e3e75f47 100644 --- a/eo/win/all_tut.dsp +++ b/eo/win/all_tut.dsp @@ -1,96 +1,96 @@ -# Microsoft Developer Studio Project File - Name="all_tut" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=all_tut - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_tut.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_tut.mak" CFG="all_tut - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_tut - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "all_tut - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_tut - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "all_tut - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "all_tut - Win32 Release" -# Name "all_tut - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_tut" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=all_tut - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_tut.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_tut.mak" CFG="all_tut - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_tut - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "all_tut - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_tut - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "all_tut - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "all_tut - Win32 Release" +# Name "all_tut - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 94c1185c0..bf88c176e 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,132 +1,132 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release\obj" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debugj" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug\obj" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\eod.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eod.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoParetoFitness.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.H -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eod.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoParetoFitness.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.H +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/es.dsp b/eo/win/es.dsp index f8c38c9fc..33c2812c2 100644 --- a/eo/win/es.dsp +++ b/eo/win/es.dsp @@ -1,234 +1,234 @@ -# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\es.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\esd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\esd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "es - Win32 Release" -# Name "es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\es\make_algo_scalar_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_algo_scalar_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_checkpoint_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_checkpoint_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_continue_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_continue_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_pop_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_pop_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_run_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_run_real.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\es\eoEsChromInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsFull.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsGlobalXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutate.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutationInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsSimple.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStandardXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStdev.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoNormalMutation.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoReal.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealAtomXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealInitBounded.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealOp.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_es.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_real.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_es.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_real.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_real.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\es.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\esd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\esd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "es - Win32 Release" +# Name "es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_real.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\es\eoEsChromInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsFull.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsGlobalXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutate.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutationInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsSimple.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStandardXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStdev.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoNormalMutation.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoReal.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealAtomXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealInitBounded.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_real.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/ga.dsp b/eo/win/ga.dsp index e07289a89..15d906f6a 100644 --- a/eo/win/ga.dsp +++ b/eo/win/ga.dsp @@ -1,154 +1,154 @@ -# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=ga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\ga.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "ga___Win32_Debug" -# PROP BASE Intermediate_Dir "ga___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\gad.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\gad.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "ga - Win32 Release" -# Name "ga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\ga\make_algo_scalar_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_checkpoint_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_continue_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_genotype_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_op_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_pop_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_run_ga.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\ga\eoBit.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\eoBitOp.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\eoBitOpFactory.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_ga.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_genotype_ga.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_op.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\ga.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ga___Win32_Debug" +# PROP BASE Intermediate_Dir "ga___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\gad.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\gad.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ga - Win32 Release" +# Name "ga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\ga\make_algo_scalar_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_checkpoint_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_continue_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_pop_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_run_ga.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\ga\eoBit.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOpFactory.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_eo.dsp b/eo/win/t_eo.dsp index 3f00c1375..d61e402bf 100644 --- a/eo/win/t_eo.dsp +++ b/eo/win/t_eo.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eo___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eo - Win32 Release" -# Name "t_eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eo.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eo - Win32 Release" +# Name "t_eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eo.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index 36e56a27c..649d24677 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobin - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobin - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobin___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eobin - Win32 Release" -# Name "t_eobin - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobin.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobin___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eobin - Win32 Release" +# Name "t_eobin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobin.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eocheckpointing.dsp b/eo/win/t_eocheckpointing.dsp index 2f004d473..4ed1715ac 100644 --- a/eo/win/t_eocheckpointing.dsp +++ b/eo/win/t_eocheckpointing.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eocheckpointing - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eocheckpointing.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eocheckpointing - Win32 Release" -# Name "t_eocheckpointing - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoCheckpointing.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eocheckpointing - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eocheckpointing - Win32 Release" +# Name "t_eocheckpointing - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoCheckpointing.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoesall.dsp b/eo/win/t_eoesall.dsp index 37053494e..599af01ff 100644 --- a/eo/win/t_eoesall.dsp +++ b/eo/win/t_eoesall.dsp @@ -1,103 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoesall - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoesall.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoesall - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoesall - Win32 Release" -# Name "t_eoesall - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESAll.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project - +# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoesall - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoesall - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoesall - Win32 Release" +# Name "t_eoesall - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESAll.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoexternaleo.dsp b/eo/win/t_eoexternaleo.dsp index 8ad2fabb6..b7b8cd659 100644 --- a/eo/win/t_eoexternaleo.dsp +++ b/eo/win/t_eoexternaleo.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoexternaleo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoexternaleo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoexternaleo - Win32 Release" -# Name "t_eoexternaleo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoExternalEO.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoexternaleo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoexternaleo - Win32 Release" +# Name "t_eoexternaleo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoExternalEO.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp index 7494e597d..08cf2e47f 100644 --- a/eo/win/t_eofitness.dsp +++ b/eo/win/t_eofitness.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eofitness - Win32 Release" -# Name "t_eofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eofitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eofitness - Win32 Release" +# Name "t_eofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eofitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoga.dsp b/eo/win/t_eoga.dsp index 7af890a3d..085165910 100644 --- a/eo/win/t_eoga.dsp +++ b/eo/win/t_eoga.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoga - Win32 Release" -# Name "t_eoga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoga - Win32 Release" +# Name "t_eoga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eogenop.dsp b/eo/win/t_eogenop.dsp index f3cf03420..b5b6daaa5 100644 --- a/eo/win/t_eogenop.dsp +++ b/eo/win/t_eogenop.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eogenop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eogenop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eogenop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eogenop - Win32 Release" -# Name "t_eogenop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGenOp.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eogenop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eogenop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eogenop - Win32 Release" +# Name "t_eogenop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGenOp.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eopareto.dsp b/eo/win/t_eopareto.dsp index bc4e82cc9..e0eece085 100644 --- a/eo/win/t_eopareto.dsp +++ b/eo/win/t_eopareto.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eopareto - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eopareto.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eopareto - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eopareto - Win32 Release" -# Name "t_eopareto - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoPareto.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopareto - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopareto - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopareto - Win32 Release" +# Name "t_eopareto - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPareto.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoparetofitness.dsp b/eo/win/t_eoparetofitness.dsp index 37bcfc275..3d9dfe473 100644 --- a/eo/win/t_eoparetofitness.dsp +++ b/eo/win/t_eoparetofitness.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoparetofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoparetofitness - Win32 Release" -# Name "t_eoparetofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoParetoFitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoparetofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoparetofitness - Win32 Release" +# Name "t_eoparetofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoParetoFitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eopbil.dsp b/eo/win/t_eopbil.dsp index 0722789de..633adb866 100644 --- a/eo/win/t_eopbil.dsp +++ b/eo/win/t_eopbil.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eopbil - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eopbil.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eopbil - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eopbil - Win32 Release" -# Name "t_eopbil - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoPBIL.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopbil - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopbil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopbil - Win32 Release" +# Name "t_eopbil - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPBIL.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eorandom.dsp b/eo/win/t_eorandom.dsp index 3b2e4e085..47f8cc9a8 100644 --- a/eo/win/t_eorandom.dsp +++ b/eo/win/t_eorandom.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eorandom - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eorandom.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eorandom - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eorandom - Win32 Release" -# Name "t_eorandom - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoRandom.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eorandom - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eorandom - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eorandom - Win32 Release" +# Name "t_eorandom - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoRandom.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoreal.dsp b/eo/win/t_eoreal.dsp index ee990ab3f..aefb42025 100644 --- a/eo/win/t_eoreal.dsp +++ b/eo/win/t_eoreal.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoreal - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoreal.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoreal - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoreal - Win32 Release" -# Name "t_eoreal - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoReal.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreal - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreal - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreal - Win32 Release" +# Name "t_eoreal - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReal.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoreplacement.dsp b/eo/win/t_eoreplacement.dsp index d85271c1f..0b84961a6 100644 --- a/eo/win/t_eoreplacement.dsp +++ b/eo/win/t_eoreplacement.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoreplacement - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoreplacement.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoreplacement - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoreplacement - Win32 Release" -# Name "t_eoreplacement - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoReplacement.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreplacement - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreplacement - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreplacement - Win32 Release" +# Name "t_eoreplacement - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReplacement.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoselect.dsp b/eo/win/t_eoselect.dsp index 42da93674..17cf165a8 100644 --- a/eo/win/t_eoselect.dsp +++ b/eo/win/t_eoselect.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoselect - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoselect.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoselect - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoselect - Win32 Release" -# Name "t_eoselect - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSelect.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoselect - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoselect - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoselect - Win32 Release" +# Name "t_eoselect - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSelect.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eossga.dsp b/eo/win/t_eossga.dsp index 82c07a4f2..fbbd71a13 100644 --- a/eo/win/t_eossga.dsp +++ b/eo/win/t_eossga.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eossga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eossga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eossga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eossga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eossga - Win32 Release" -# Name "t_eossga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSSGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eossga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eossga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eossga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eossga - Win32 Release" +# Name "t_eossga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSSGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eostateandparser.dsp b/eo/win/t_eostateandparser.dsp index 49d9cce37..5e8638aba 100644 --- a/eo/win/t_eostateandparser.dsp +++ b/eo/win/t_eostateandparser.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eostateandparser - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eostateandparser.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eostateandparser - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eostateandparser - Win32 Release" -# Name "t_eostateandparser - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoStateAndParser.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eostateandparser - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eostateandparser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eostateandparser - Win32 Release" +# Name "t_eostateandparser - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoStateAndParser.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eosymreg.dsp b/eo/win/t_eosymreg.dsp index 9aaa7f3d6..767702a45 100644 --- a/eo/win/t_eosymreg.dsp +++ b/eo/win/t_eosymreg.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eosymreg - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eosymreg.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eosymreg - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eosymreg - Win32 Release" -# Name "t_eosymreg - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSymreg.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eosymreg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eosymreg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eosymreg - Win32 Release" +# Name "t_eosymreg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSymreg.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp index 8f691eb15..6a905d573 100644 --- a/eo/win/t_eovector.dsp +++ b/eo/win/t_eovector.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovector - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovector - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovector___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eovector - Win32 Release" -# Name "t_eovector - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoVector.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovector - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovector - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovector___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovector - Win32 Release" +# Name "t_eovector - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVector.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovirus.dsp b/eo/win/t_eovirus.dsp index da07ee6c8..3670d640f 100644 --- a/eo/win/t_eovirus.dsp +++ b/eo/win/t_eovirus.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovirus - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovirus.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovirus - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eovirus - Win32 Release" -# Name "t_eovirus - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoVirus.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovirus - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovirus - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovirus - Win32 Release" +# Name "t_eovirus - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVirus.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge-control.dsp b/eo/win/t_mge-control.dsp index dba508071..d7cfb690b 100644 --- a/eo/win/t_mge-control.dsp +++ b/eo/win/t_mge-control.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge-control - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge-control.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge-control - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge-control - Win32 Release" -# Name "t_mge-control - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE-control.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge-control - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge-control - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge-control - Win32 Release" +# Name "t_mge-control - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE-control.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge.dsp b/eo/win/t_mge.dsp index 01eb1d534..92d30efa1 100644 --- a/eo/win/t_mge.dsp +++ b/eo/win/t_mge.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge - Win32 Release" -# Name "t_mge - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge - Win32 Release" +# Name "t_mge - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge1bit.dsp b/eo/win/t_mge1bit.dsp index 560914294..03f18e237 100644 --- a/eo/win/t_mge1bit.dsp +++ b/eo/win/t_mge1bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge1bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge1bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge1bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge1bit - Win32 Release" -# Name "t_mge1bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE1bit.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge1bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge1bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge1bit - Win32 Release" +# Name "t_mge1bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE1bit.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_bit.dsp b/eo/win/tut_1_bit.dsp index 17d2f21be..dc1ff8790 100644 --- a/eo/win/tut_1_bit.dsp +++ b/eo/win/tut_1_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_1_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_1_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_1_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_1_bit.mak" CFG="tut_1_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_1_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_1_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_1_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_1_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_1_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_1_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_1_bit - Win32 Release" -# Name "tut_1_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson1\FirstBitGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_1_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_bit.mak" CFG="tut_1_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_bit - Win32 Release" +# Name "tut_1_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\FirstBitGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_ex3.dsp b/eo/win/tut_1_ex3.dsp index 2c87c749a..142e5949c 100644 --- a/eo/win/tut_1_ex3.dsp +++ b/eo/win/tut_1_ex3.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_1_ex3" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_1_ex3 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_1_ex3.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_1_ex3.mak" CFG="tut_1_ex3 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_1_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_1_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_1_ex3 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_1_ex3 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_1_ex3___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_1_ex3___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_1_ex3 - Win32 Release" -# Name "tut_1_ex3 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson1\exercise1.3.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_1_ex3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_ex3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_ex3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_ex3.mak" CFG="tut_1_ex3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_ex3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_ex3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_ex3___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_ex3___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_ex3 - Win32 Release" +# Name "tut_1_ex3 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\exercise1.3.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_real.dsp b/eo/win/tut_1_real.dsp index f81ad84ab..d7c12f1bc 100644 --- a/eo/win/tut_1_real.dsp +++ b/eo/win/tut_1_real.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_1_real" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_1_real - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_1_real.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_1_real.mak" CFG="tut_1_real - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_1_real - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_1_real - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_1_real - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_1_real - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_1_real___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_1_real___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_1_real - Win32 Release" -# Name "tut_1_real - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson1\FirstRealGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_1_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_real.mak" CFG="tut_1_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_real - Win32 Release" +# Name "tut_1_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\FirstRealGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_bit.dsp b/eo/win/tut_2_bit.dsp index d819e8b1b..5261ba6f1 100644 --- a/eo/win/tut_2_bit.dsp +++ b/eo/win/tut_2_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_2_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_2_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_2_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_2_bit.mak" CFG="tut_2_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_2_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_2_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_2_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_2_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_2_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_2_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_2_bit - Win32 Release" -# Name "tut_2_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson2\FirstBitEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_2_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_bit.mak" CFG="tut_2_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_bit - Win32 Release" +# Name "tut_2_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\FirstBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_ex3.dsp b/eo/win/tut_2_ex3.dsp index e3904fc23..fc2aab256 100644 --- a/eo/win/tut_2_ex3.dsp +++ b/eo/win/tut_2_ex3.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_2_ex3" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_2_ex3 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_2_ex3.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_2_ex3.mak" CFG="tut_2_ex3 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_2_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_2_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_2_ex3 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_2_ex3 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_2_ex3___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_2_ex3___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_2_ex3 - Win32 Release" -# Name "tut_2_ex3 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson2\exercise2.3.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_2_ex3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_ex3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_ex3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_ex3.mak" CFG="tut_2_ex3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_ex3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_ex3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_ex3___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_ex3___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_ex3 - Win32 Release" +# Name "tut_2_ex3 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\exercise2.3.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_real.dsp b/eo/win/tut_2_real.dsp index 4affaf223..55195c898 100644 --- a/eo/win/tut_2_real.dsp +++ b/eo/win/tut_2_real.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_2_real" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_2_real - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_2_real.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_2_real.mak" CFG="tut_2_real - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_2_real - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_2_real - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_2_real - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_2_real - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_2_real___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_2_real___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_2_real - Win32 Release" -# Name "tut_2_real - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson2\FirstRealEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_2_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_real.mak" CFG="tut_2_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_real - Win32 Release" +# Name "tut_2_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\FirstRealEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_3_bit.dsp b/eo/win/tut_3_bit.dsp index dec19539d..b4cf730aa 100644 --- a/eo/win/tut_3_bit.dsp +++ b/eo/win/tut_3_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_3_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_3_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_3_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_3_bit.mak" CFG="tut_3_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_3_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_3_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_3_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_3_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_3_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_3_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_3_bit - Win32 Release" -# Name "tut_3_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson3\SecondBitEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_3_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_3_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_3_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_3_bit.mak" CFG="tut_3_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_3_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_3_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_3_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_3_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_3_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_3_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_3_bit - Win32 Release" +# Name "tut_3_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson3\SecondBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_3_ex1.dsp b/eo/win/tut_3_ex1.dsp index 7c82bdadf..b1f5553b4 100644 --- a/eo/win/tut_3_ex1.dsp +++ b/eo/win/tut_3_ex1.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_3_ex1" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_3_ex1 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_3_ex1.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_3_ex1.mak" CFG="tut_3_ex1 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_3_ex1 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_3_ex1 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_3_ex1 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_3_ex1 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_3_ex1___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_3_ex1___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_3_ex1 - Win32 Release" -# Name "tut_3_ex1 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson3\exercise3.1.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_3_ex1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_3_ex1 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_3_ex1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_3_ex1.mak" CFG="tut_3_ex1 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_3_ex1 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_3_ex1 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_3_ex1 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_3_ex1 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_3_ex1___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_3_ex1___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_3_ex1 - Win32 Release" +# Name "tut_3_ex1 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson3\exercise3.1.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_bit.dsp b/eo/win/tut_4_bit.dsp index ca7823bf2..f5ca96b93 100644 --- a/eo/win/tut_4_bit.dsp +++ b/eo/win/tut_4_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_4_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_4_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_4_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_4_bit.mak" CFG="tut_4_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_4_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_4_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_4_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_4_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_4_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_4_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_4_bit - Win32 Release" -# Name "tut_4_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson4\BitEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_4_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_bit.mak" CFG="tut_4_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_bit - Win32 Release" +# Name "tut_4_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\BitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_es.dsp b/eo/win/tut_4_es.dsp index f297b986e..1724ba03b 100644 --- a/eo/win/tut_4_es.dsp +++ b/eo/win/tut_4_es.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_4_es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_4_es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_4_es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_4_es.mak" CFG="tut_4_es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_4_es - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_4_es - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_4_es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_4_es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_4_es___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_4_es___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_4_es - Win32 Release" -# Name "tut_4_es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson4\ESEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_4_es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_es.mak" CFG="tut_4_es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_es - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_es - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_es___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_es___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_es - Win32 Release" +# Name "tut_4_es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\ESEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_real.dsp b/eo/win/tut_4_real.dsp index 0e872132e..52cff040f 100644 --- a/eo/win/tut_4_real.dsp +++ b/eo/win/tut_4_real.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_4_real" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_4_real - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_4_real.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_4_real.mak" CFG="tut_4_real - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_4_real - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_4_real - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_4_real - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 all_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_4_real - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_4_real___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_4_real___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 all_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_4_real - Win32 Release" -# Name "tut_4_real - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson4\RealEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_4_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_real.mak" CFG="tut_4_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_real - Win32 Release" +# Name "tut_4_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\RealEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/utils.dsp b/eo/win/utils.dsp index 4c6b106d4..c0b5bbf81 100644 --- a/eo/win/utils.dsp +++ b/eo/win/utils.dsp @@ -1,250 +1,250 @@ -# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=utils - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "utils.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "utils - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\utils.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "utils - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "utils___Win32_Debug" -# PROP BASE Intermediate_Dir "utils___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\utilsd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\utilsd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "utils - Win32 Release" -# Name "utils - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealBounds.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\make_help.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoCheckPoint.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoDistance.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFDCStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileSnapshot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot1DMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot1DSnapshot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoHowMany.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMOFitnessStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoPopStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealVectorBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRndGenerators.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoScalarFitnessStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdatable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\pipecom.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\rnd_generators.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\selectors.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=utils - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "utils.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "utils - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\utils.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "utils - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "utils___Win32_Debug" +# PROP BASE Intermediate_Dir "utils___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\utilsd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\utilsd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "utils - Win32 Release" +# Name "utils - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\make_help.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoCheckPoint.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoDistance.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFDCStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoHowMany.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMOFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoPopStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealVectorBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRndGenerators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoScalarFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdatable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\pipecom.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\rnd_generators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\selectors.h +# End Source File +# End Group +# End Target +# End Project From 09761ac2fc7dd6da6d894dabb478e1ade3dc1c87 Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 19 Apr 2002 15:24:07 +0000 Subject: [PATCH 0820/2134] Slides from Jet7, ENSTA Paris (April 2002) --- eo/tutorial/pdf/Paradiseo (Jet7).pdf | Bin 0 -> 530785 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 eo/tutorial/pdf/Paradiseo (Jet7).pdf diff --git a/eo/tutorial/pdf/Paradiseo (Jet7).pdf b/eo/tutorial/pdf/Paradiseo (Jet7).pdf new file mode 100644 index 0000000000000000000000000000000000000000..b227633f314b7b2b36e9d5122b992ff201186743 GIT binary patch literal 530785 zcmdSAbzD^2_diUhfJ*lmq}0GLFm!iGNOy@e3@r#EC@mn}AR!3SohscRC8=~HDgB%Q zz4w0Zz2A7A=l9QVcrknLwbxmD?X}l>pFL-yZfAy&4*LJ{ad$Gez(Z)r1t`Js>jQ>@u4*7V zJe*%77!UaGG%(jc`8c^afyp91e_qSU!_E0m8t*@8FeukQ_+Y&M&;`Q9^Di_Q?C;ld zLjf)RrVBR|Fyr57P#!Lxf6}1;xR!^P=O27Luz!vL19Ni!T^fH^r}f1ewe6a0@g0&{VJ|Gt)BE^f}h&kdk)|J?>)ZVtd%|I>b8 zZoqB-M&r2hL72)~3Fho?yO6Urh8FO%OK`pqs&A`S`7+?S%2!sO)<2L4nK)H?0 zIfMitCKeE=IRwfJgIJiDnwgkF06W3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382837a308d098f127092dfe4c1768fbe Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 19 Apr 2002 22:13:15 +0000 Subject: [PATCH 0821/2134] A faulty constructor in eoParseTree caused some problems --- eo/src/gp/eoParseTree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index af684acfa..4a1cd1cc4 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -66,14 +66,14 @@ public : /** * Default Constructor */ - eoParseTree(void) : EO() {} + eoParseTree(void) {} /** * Copy Constructor * @param tree The tree to copy */ - eoParseTree(const parse_tree& tree) : EO(), parse_tree(tree) {} + eoParseTree(const parse_tree& tree) : parse_tree(tree) {} - eoParseTree(const eoParseTree& tree) : EO(), parse_tree(tree) {} +// eoParseTree(const eoParseTree& tree) : parse_tree(tree) {} /** * To prune me to a certain size * @param _size My maximum size From 70a4a2add5be1ba267beee98ed6cc84f7aa53055 Mon Sep 17 00:00:00 2001 From: cahon Date: Tue, 23 Apr 2002 09:11:58 +0000 Subject: [PATCH 0822/2134] *** empty log message *** --- eo/tutorial/pdf/Paradiseo (Jet7).pdf | Bin 530785 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 eo/tutorial/pdf/Paradiseo (Jet7).pdf diff --git a/eo/tutorial/pdf/Paradiseo (Jet7).pdf b/eo/tutorial/pdf/Paradiseo (Jet7).pdf deleted file mode 100644 index b227633f314b7b2b36e9d5122b992ff201186743..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 530785 zcmdSAbzD^2_diUhfJ*lmq}0GLFm!iGNOy@e3@r#EC@mn}AR!3SohscRC8=~HDgB%Q zz4w0Zz2A7A=l9QVcrknLwbxmD?X}l>pFL-yZfAy&4*LJ{ad$Gez(Z)r1t`Js>jQ>@u4*7V zJe*%77!UaGG%(jc`8c^afyp91e_qSU!_E0m8t*@8FeukQ_+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`Xz?*{R~S0!Vf-;37n;|4P3V-t)G zUZyY>@}wEV10CQC@c^C+xe%lQ+-Y_p07@NFYU@UbEx9i!4O!Z)bM4r6o% z3}a+w#4#V!VMc>GZvP}^4T-@SN6+p(LEKBAf4tH0k%*Oi;+|N7|{AH95m7@fWz z$CtYoq&|}6Cn9X7RH~;ic|MJ^k-TZ$cBw;!L From 6d7fc8c69b0078d087b70fdd79a33e9ba9c91b8e Mon Sep 17 00:00:00 2001 From: cahon Date: Tue, 23 Apr 2002 09:16:51 +0000 Subject: [PATCH 0823/2134] Slides from Jet7, March 2002, ENSTA Paris --- eo/tutorial/pdf/Paradiseo(jet7).pdf | Bin 0 -> 530873 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 eo/tutorial/pdf/Paradiseo(jet7).pdf diff --git a/eo/tutorial/pdf/Paradiseo(jet7).pdf b/eo/tutorial/pdf/Paradiseo(jet7).pdf new file mode 100644 index 0000000000000000000000000000000000000000..18f3eafc56ae2c9fae3490b82f89d047d9683986 GIT binary patch literal 530873 zcmdSAbzD_l(?3k7fJ*mKX{kdWy1OK#n*$;ZhZY18lopU~kPxK1L%KssQt4JH>31LS ziredY?&tT$KQDY>)$CcbX3c!}?7e2ws!B?;fLXb4XumEEjp1PN@$rG!LH4FkaRdcH zIBbemc2E;1D^I972n;k;KztB*DGSmAfqB_EKs+2gAOkoZh?|q0kCzjuN`b)Kyd3bF zGKdpiXn?rE91sW>2uD~LgafrRhjR!0KlyQYf?D9fCFBHzVE^?4<^f&TKz2A-zq%m2 z;NSbeod2Zb;N$=n3;+4+S`J=rj(_&?{j(3k!}$+72;Vu7yAHtI?0~WUr~bg)fZ6`m z$9`?e|4GNr!O8wNnPE;QRyI&4z$b9n)B$e*LBJ3kHaR;Bdk`Od&p~Q{ovYc~!+<8R zwbxBmC#dVS<@3RvKu%Im(A1oZ&y3g96b#79!C`8`VPe4ph46u)U??B288<{&5NgWF z#b?fA!DGh7ZN_D8YGT33Wx`=*3gI=g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aJX+;hCpkCpxx zzTteJjNw>zb74+y%;`u(IazV}9KrYEtV+5-sS7aX>RlKkfzrLt<-YM;Xtik1K5WB% zmlPI<=b`m$^E$tzGx)QL&R@t63^ghZOPJC5-FI=474nF=PF^zR;<}8vJVsJ0D(l5~ zcHgCh(!nf-V+k`xnA>yE?AAt2y2JAYr*HW_Q03ltarGK7U02(}nA4RR1W1T(~sW(i*kl{u{0a8tuyU-(U>pS$qRg;m!w Date: Tue, 23 Apr 2002 09:56:49 +0000 Subject: [PATCH 0824/2134] Updated the documentation (comments) --- eo/src/eoPop.h | 73 ++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 1a052bd0c..353c1302b 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -35,25 +35,19 @@ #include #include // for shuffle method -/** Subpopulation: it is used to move parts of population - from one algorithm to another and one population to another. It is safer -to declare it as a separate object. I have no idea if a population can be -some other thing that a vector, but if somebody thinks of it, this concrete -implementation will be moved to "generic" and an abstract Population -interface will be provided. - -It can be instantiated with anything, provided that it accepts a "size" and a -random generator in the ctor. This happens to all the eo1d chromosomes declared -so far. EOT must also have a copy ctor, since temporaries are created and copied -to the population. - -It can also be instantiated with a "size" and an eoInit derived object. -This object must supply a full chromosome (or something the ctor of the EO -will accept). - -@author Geneura Team -@version 0.0 -*/ +/** A vector of EO object, to be used in all algorithms + * (selectors, operators, replacements, ...). + * + * We have no idea if a population can be + * some other thing that a vector, but if somebody thinks of it, this concrete + * implementation can be moved to "generic" and an abstract Population + * interface be provided. + * + * The template can be instantiated with anything that accepts a "size" + * and eoInit derived object. in the ctor. + * EOT must also have a copy ctor, since temporaries are created and then + * passed to the eoInit object + */ template class eoPop: public vector, public eoObject, public eoPersistent @@ -104,19 +98,19 @@ class eoPop: public vector, public eoObject, public eoPersistent }; - /** Ctor from an istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( istream& _is ):vector() { - readFrom( _is ); - } - - /// - ~eoPop() {}; + /** Ctor from an istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( istream& _is ):vector() { + readFrom( _is ); + } + + /** Empty Dtor */ + virtual ~eoPop() {}; - /// helper struct for getting a pointer + /// helper struct for getting a pointer struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; /// helper struct for comparing on pointers struct Cmp { @@ -133,7 +127,7 @@ class eoPop: public vector, public eoObject, public eoPersistent std::sort(begin(), end(), greater()); } - // creates a vector pointing to the individuals in descending order + /** creates a vector pointing to the individuals in descending order */ void sort(vector& result) const { result.resize(size()); @@ -153,7 +147,7 @@ class eoPop: public vector, public eoObject, public eoPersistent std::random_shuffle(begin(), end(), gen); } - // creates a vector pointing to the individuals in random order + /** creates a vector pointing to the individuals in random order */ void shuffle(vector& result) const { result.resize(size()); @@ -164,28 +158,28 @@ class eoPop: public vector, public eoObject, public eoPersistent std::random_shuffle(result.begin(), result.end(), gen); } - // returns an iterator to the best individual DOES NOT MOVE ANYBODY + /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ eoPop::iterator it_best_element() { typename eoPop::const_iterator it = max_element(begin(), end()); return it; } - // returns an iterator to the best individual DOES NOT MOVE ANYBODY + /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ const EOT & best_element() const { typename eoPop::const_iterator it = max_element(begin(), end()); return (*it); } - // returns a const reference to the worse individual DOES NOT MOVE ANYBODY + /** returns a const reference to the worse individual DOES NOT MOVE ANYBODY */ const EOT & worse_element() const { typename eoPop::const_iterator it = min_element(begin(), end()); return (*it); } -// returns an iterator to the worse individual DOES NOT MOVE ANYBODY + /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ eoPop::iterator it_worse_element() { typename eoPop::iterator it = min_element(begin(), end()); @@ -205,6 +199,7 @@ class eoPop: public vector, public eoObject, public eoPersistent struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; + /** returns the fitness of the nth element */ Fitness nth_element_fitness(int which) const { // probably not the fastest way to do this, but what the heck @@ -216,7 +211,9 @@ class eoPop: public vector, public eoObject, public eoPersistent return *it; } - /// const nth_element function, returns pointers to sorted individuals + /** const nth_element function, returns pointers to sorted individuals + * up the the nth + */ void nth_element(int which, vector& result) const { @@ -228,7 +225,7 @@ class eoPop: public vector, public eoObject, public eoPersistent std::nth_element(result.begin(), it, result.end(), Cmp()); } - // does STL swap with other pop + /** does STL swap with other pop */ void swap(eoPop& other) { std::swap(static_cast& >(*this), static_cast& >(other)); From 25b3719ce7e8c3351b1f46aca6d1dcff54f38162 Mon Sep 17 00:00:00 2001 From: cahon Date: Thu, 25 Apr 2002 14:06:43 +0000 Subject: [PATCH 0825/2134] Cellular parallel easy algorithm --- eo/src/eoCellularEasyEA.h | 161 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 eo/src/eoCellularEasyEA.h diff --git a/eo/src/eoCellularEasyEA.h b/eo/src/eoCellularEasyEA.h new file mode 100644 index 000000000..5369feb22 --- /dev/null +++ b/eo/src/eoCellularEasyEA.h @@ -0,0 +1,161 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoCellularEasyEA.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoCellularEasyEA_h +#define eoCellularEasyEA_h + +#include +#include +#include +#include +#include +#include + +/** + The abstract cellular easy algorithm. + */ + +template class eoCellularEasyEA : public eoAlgo { + +public : + + /** + Two constructors + */ + + eoCellularEasyEA (eoContinue & _cont, // Stop. criterion + eoEvalFunc & _eval, // Evaluation function + eoSelectOne & _sel_neigh, // To choose a partner + eoBinOp & _cross, // Cross-over operator + eoMonOp & _mut, // Mutation operator + eoSelectOne & _sel_repl /* Which to keep between the new + child and the old individual ? */ + ) : + cont (_cont), + eval (_eval), + popEval (_eval), + sel_neigh (_sel_neigh), + cross (_cross), + mut (_mut), + sel_child (eoSelectFirstOne ()), + sel_repl (_sel_repl) { + + } + + eoCellularEasyEA (eoContinue & _cont, + eoEvalFunc & _eval, + eoSelectOne & _sel_neigh, + eoQuadOp & _cross, + eoMonOp & _mut, + eoSelectOne & _sel_child, /* To choose one from + the both children */ + eoSelectOne & _sel_repl + ) : + cont (_cont), + eval (_eval), + popEval (_eval), + sel_neigh (_sel_neigh), + cross (_cross), + mut (_mut), + sel_child (_sel_child), + sel_repl (_sel_repl) { + + } + + /** + For a given population. + */ + + void operator () (eoPop & pop) { + + do { + + for (unsigned i = 0 ; i < pop.size () ; i ++) { + + // Who are neighbouring to the current individual ? + eoPop neigh = neighbours (pop, i) ; + + // To select a partner + EOT part, old_sol = pop [i] ; + part = sel_neigh (neigh) ; + + // To perform cross-over + cross (pop [i], part) ; + + // To perform mutation + mut (pop [i]) ; + mut (part) ; + + pop [i].invalidate () ; + part.invalidate () ; + eval (pop [i]) ; + eval (part) ; + + // To choose one of the two children ... + eoPop pop_loc ; + pop_loc.push_back (pop [i]) ; + pop_loc.push_back (part) ; + + pop [i] = sel_child (pop_loc) ; + + // To choose only one between the new made child and the old individual + pop_loc.clear () ; + pop_loc.push_back (pop [i]) ; + + pop_loc.push_back (old_sol) ; + + pop [i] = sel_repl (pop_loc) ; + } + + } while (cont (pop)) ; + } + +protected : + + virtual eoPop neighbours (const eoPop & pop, int rank) = 0 ; + +private : + + eoContinue & cont ; + eoEvalFunc & eval ; + eoPopLoopEval popEval ; + eoSelectOne & sel_neigh ; + eoBF & cross ; + eoMonOp & mut ; + eoSelectOne & sel_child ; + eoSelectOne & sel_repl ; + + class eoSelectFirstOne : public eoSelectOne { + + public : + + const EOT & operator () (const eoPop & pop) { + + return pop [0] ; + } + + } ; + +} ; + +#endif From bffe8b0dfd1beff41da5dc883e8093d7a7826ffa Mon Sep 17 00:00:00 2001 From: cahon Date: Thu, 25 Apr 2002 14:08:26 +0000 Subject: [PATCH 0826/2134] A toric topology for cellular E.A. --- eo/src/eoToricCellularEasyEA.h | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 eo/src/eoToricCellularEasyEA.h diff --git a/eo/src/eoToricCellularEasyEA.h b/eo/src/eoToricCellularEasyEA.h new file mode 100644 index 000000000..bd4149abe --- /dev/null +++ b/eo/src/eoToricCellularEasyEA.h @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoToricCellularEasyEA.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoToricCellularEasyEA_h +#define eoToricCellularEasyEA_h + +#include + +#include + +template class eoToricCellularEasyEA : public eoCellularEasyEA { + +public : + + eoToricCellularEasyEA (eoContinue & _cont, + eoEvalFunc & _eval, + eoSelectOne & _sel_neigh, + eoBinOp & _cross, + eoMonOp & _mut, + eoSelectOne & _sel_repl + ) : + eoCellularEasyEA (_cont, + _eval, + _sel_neigh, + _cross, + _mut, + _sel_repl) { + + } + + eoToricCellularEasyEA (eoContinue & _cont, + eoEvalFunc & _eval, + eoSelectOne & _sel_neigh, + eoQuadOp & _cross, + eoMonOp & _mut, + eoSelectOne & _sel_child, + eoSelectOne & _sel_repl + ) : + eoCellularEasyEA (_cont, + _eval, + _sel_neigh, + _cross, + _mut, + _sel_child, + _sel_repl) { + + } + + // Take care :-). The size of the population must be a square number ! (9, 16, ...) + + virtual eoPop neighbours (const eoPop & pop, int rank) { + + int dim2 = pop.size () ; + int dim = (int) sqrt (dim2) ; + int j = rank ; + + eoPop neigh ; + neigh.push_back (pop [j < dim ? dim2 - dim + j : j - dim]) ; + neigh.push_back (pop [(j + dim) % dim2]) ; + neigh.push_back (pop [(j + 1) % dim != 0 ? j + 1 : j + 1 - dim]) ; + neigh.push_back (pop [j % dim != 0 ? j - 1 : j + dim - 1]) ; + + return neigh ; + } + +} ; + +#endif From 9415bfad748178e7cf9810a544b3457e28fcecd6 Mon Sep 17 00:00:00 2001 From: cahon Date: Thu, 25 Apr 2002 14:10:22 +0000 Subject: [PATCH 0827/2134] Adding cellular E.A. --- eo/src/eo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/src/eo b/eo/src/eo index 9839c1adb..d78969c7c 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -118,6 +118,9 @@ #include #include +// Cellular parallel evolutionary algorithm +#include + //----------------------------------------------------------------------------- // to be continued ... //----------------------------------------------------------------------------- From c99bce368c067f77d7888e74d2087f4b0e90b0c5 Mon Sep 17 00:00:00 2001 From: cahon Date: Thu, 25 Apr 2002 14:26:02 +0000 Subject: [PATCH 0828/2134] *** empty log message *** --- .../ParadisEO/Lesson3/CellularBitEA.cpp | 86 +++++++++++++++++++ eo/tutorial/ParadisEO/Lesson3/Makefile | 15 ++++ eo/tutorial/ParadisEO/Lesson3/binary_value.h | 17 ++++ 3 files changed, 118 insertions(+) create mode 100644 eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp create mode 100644 eo/tutorial/ParadisEO/Lesson3/Makefile create mode 100644 eo/tutorial/ParadisEO/Lesson3/binary_value.h diff --git a/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp b/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp new file mode 100644 index 000000000..41640b355 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp @@ -0,0 +1,86 @@ +#include +#include +#include + +#include +#include + +typedef eoBit Indi; + +#include "binary_value.h" + +void main_function(int argc, char **argv) +{ + + const unsigned int SEED = 42; + const unsigned int VEC_SIZE = 8; + const unsigned int POP_SIZE = 25; + + const unsigned int MAX_GEN = 100; + + const double P_MUT_PER_BIT = 0.01; + + rng.reseed(SEED); + + eoEvalFuncPtr& > eval( binary_value ); + + eoUniformGenerator uGen; + eoInitFixedLength random(VEC_SIZE, uGen); + + eoPop pop(POP_SIZE, random); + + + apply(eval, pop); + + pop.sort(); + + cout << "Initial Population" << endl; + cout << pop; + + eo1PtBitXover xover1; + + eoBitMutation mutationBitFlip(P_MUT_PER_BIT); + + eoGenContinue genCont(MAX_GEN); + + eoBestSelect select ; + + eoToricCellularEasyEA gga (genCont, + eval, + select, + xover1, + mutationBitFlip, + select, + select) ; + + cout << "\n Here we go\n\n"; + gga(pop); + + pop.sort(); + cout << "FINAL Population\n" << pop << endl; + +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/eo/tutorial/ParadisEO/Lesson3/Makefile b/eo/tutorial/ParadisEO/Lesson3/Makefile new file mode 100644 index 000000000..2e5c0fdfc --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson3/Makefile @@ -0,0 +1,15 @@ +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -o $@ $*.cpp ../../../src/utils/libeoutils.a ../../../src/libeo.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -c $*.cpp + +ALL = CellularBitEA + +lesson3 : $(firstEA) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +CellularBitEA : binary_value.h + diff --git a/eo/tutorial/ParadisEO/Lesson3/binary_value.h b/eo/tutorial/ParadisEO/Lesson3/binary_value.h new file mode 100644 index 000000000..a31c08644 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson3/binary_value.h @@ -0,0 +1,17 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} + From d40ef9a053de0fab910bd3716e19d16030fdca28 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Apr 2002 02:28:19 +0000 Subject: [PATCH 0829/2134] Turned the createParam into getORcreateParam so that you can more easily define them before (e.g. from the problem at hand). This is useful specially for vecSize as some problems have predefined values --- eo/src/es/make_genotype_real.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index e6d8bdbc8..eb9128ac4 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -59,20 +59,20 @@ */ template -eoEsChromInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +eoEsChromInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { // the fitness type typedef typename EOT::Fitness FitT; - // for eoReal, only thing needed is the size - eoValueParam& vecSize = _parser.createParam(unsigned(10), "vecSize", "The number of variables ", 'n',"Genotype Initialization"); + // for eoReal, only thing needed is the size - but might have been created elswhere ... + eoValueParam& vecSize = _parser.getORcreateParam(unsigned(10), "vecSize", "The number of variables ", 'n',"Genotype Initialization"); // to build an eoReal Initializer, we need bounds: [-1,1] by default - eoValueParam& boundsParam = _parser.createParam(eoRealVectorBounds(vecSize.value(),-1,1), "initBounds", "Bounds for initialization (MUST be bounded)", 'B', "Genotype Initialization"); + eoValueParam& boundsParam = _parser.getORcreateParam(eoRealVectorBounds(vecSize.value(),-1,1), "initBounds", "Bounds for initialization (MUST be bounded)", 'B', "Genotype Initialization"); // now some initial value for sigmas - even if useless? // shoudl be used in Normal mutation - eoValueParam& sigmaParam = _parser.createParam(0.3, "sigmaInit", "Initial value for Sigma(s)", 's',"Genotype Initialization"); + eoValueParam& sigmaParam = _parser.getORcreateParam(0.3, "sigmaInit", "Initial value for Sigma(s)", 's',"Genotype Initialization"); // minimum check if ( (sigmaParam.value() < 0) ) From 1e0717859d71d197bd11e06aba9b3b7a89c13563 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Apr 2002 02:37:40 +0000 Subject: [PATCH 0830/2134] Added the negative argument in Ctor to say that you want number popSize - some fixed number --- eo/src/utils/eoHowMany.h | 77 ++++++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index e0b24e561..908dce900 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -26,53 +26,92 @@ #ifndef eoHowMany_h #define eoHowMany_h -/** - * to be used in selection / replacement procedures to indicate whether - * the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) - * or as an absolute integer (number=rate regardless of popsize). - * the default value shoudl ALWAYS be true (eo_as_a_rate). - * - * this construct is mandatory because in some cases you might not know the +/** A helper class, to determine a number of individuals from another one + * Typically, is used in selection / replacement procedures, e.g. + * the number of offspring from the number of parents, or + * the number of survivors for an eoReduce functor, ... + * + * Such construct is very useful because in some cases you might not know the * population size that will enter the replacement. For instance, you * cannot simply have a pre-computed (double) rate of 1/popSize - * if you want 1 guy + * if you want to select or kill just 1 guy. Using an eoHowMany + * allows one to modify the population size without touching anything else. + * + * There are 3 possible way to compute the return value from the argument: + * - a rate -> return rate*popSize + * - an absolute POSITIVE integer --> return rate (regardless of popsize) + * - an absolute NEGATIVE integer --> return popsize-rate + * Note that a negative rate is unnecessary because a rate is relative anyway. + * + * It has 2 private members, a double for case 1, + * and an integer for cases 2 and 3 above * * Example use: in eoGeneralBreeder.h * Example reading from parser: in * do/make_algo_scalar.h line 141 + + * MS 10/04/2002: + * Added the possibility to have a negative number - + * when treated as a number: returns then (size - combien) + * Should not modify anything when a positive number is passed in the ctor + * + * It is an eoPersistent because we need to be able to use eoParamValue */ class eoHowMany : public eoPersistent { public: - /** Original Ctor from direct rate + bool */ + /** Original Ctor from direct rate + bool + @param rate the rate, OR the integer to store, depending on 2nd arg. + @param _interpret_as_rate to tell whether the rate actually is a rate + */ eoHowMany(double _rate = 0.0, bool _interpret_as_rate = true): - rate(0), combien(0) + rate(_rate), combien(0) { if (_interpret_as_rate) { - rate = _rate; + if (_rate<0) + throw std::logic_error("Negative rate in eoHowMany!"); } else { - if (_rate<0) - throw std::logic_error("Negative number in eoHowMany!"); - combien = (unsigned int)_rate; + rate = 0.0; // just in case, but shoud be unused + combien = int(_rate); // negative values are allowed here if (combien != _rate) cout << "Warning: Number was rounded in eoHowMany"; } } + /** Ctor from an int - both from int and unsigned int are needed + * to avoid ambiguity with the Ctor from a double */ + eoHowMany(int _combien) : rate(0.0), combien(_combien) {} + + /** Ctor from an unsigned int - both from int and unsigned int are needed + * to avoid ambiguity with the Ctor from a double */ + eoHowMany(unsigned int _combien) : rate(0.0), combien(_combien) {} + /// Virtual dtor. They are needed in virtual class hierarchies. virtual ~eoHowMany() {} + /** Does what it was designed for + * - combien==0 : return rate*_size + * - else + * - combien>0 : return combien (regardless of _size) + * - combien<0 : return _size-|combien| + */ unsigned int operator()(unsigned int _size) { if (combien == 0) { return (unsigned int) (rate * _size); } - return combien; + if (combien < 0) + { + if (_size+combien<0) + throw runtime_error("Negative result in eoHowMany"); + return _size+combien; + } + return unsigned(combien); } virtual void printOn(ostream& _os) const @@ -112,16 +151,16 @@ public: rate /= 100.0; } else - combien = unsigned(rate); // and rate will not be used + combien = int(rate); // and rate will not be used // minimal check - if ( (combien <= 0) && (rate <= 0.0) ) - throw runtime_error("Invalid parameters read in eoHowMany::readFrom"); + if ( rate <= 0.0 ) + throw runtime_error("Negative rate read in eoHowMany::readFrom"); } private : double rate; - unsigned combien; + int combien; }; From 25a48948535878c5af054eb31f5cedcf927f22d5 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Apr 2002 02:39:10 +0000 Subject: [PATCH 0831/2134] Turned the code that was testing for the existence of the size parameter in to the call to getORcreateParam (actually, this was where this code has been tested the first time) --- eo/src/ga/make_genotype_ga.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index f162328b3..1ea3e1104 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -61,19 +61,8 @@ template eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { // for bitstring, only thing needed is the size - unsigned theSize; // but it might have been already read in the definition fo the performance - eoParam* ptParam = _parser.getParamWithLongName(string("chromSize")); - - if (!ptParam) // not already defined: read it here - { - theSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); - } - else // it was read before, get its value - { - eoValueParam* ptChromSize = dynamic_cast*>(ptParam); - theSize = ptChromSize->value(); - } + unsigned theSize = _parser.getORcreateParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); // Then we can built a bitstring random initializer // based on boolean_generator class (see utils/rnd_generator.h) From 8a2432b24e354b56caa496598576ee1abff83f50 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 26 Apr 2002 03:17:37 +0000 Subject: [PATCH 0832/2134] Added explanation and examples of getORcreateParam usage --- eo/tutorial/html/eoLesson4.html | 92 ++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 30 deletions(-) diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html index 8699cb0ad..541c23058 100644 --- a/eo/tutorial/html/eoLesson4.html +++ b/eo/tutorial/html/eoLesson4.html @@ -15,13 +15,19 @@ - EO documentation
    +


    +
    User's guide: General +- Bitstring - Real - ES +- Programmer's guide: General +- Memory management - Parameters +

    Tutorial Lesson 4: fully operational EA

    In this lesson, you will still use the same Evolutionary Algorithm. But this time you will have full control of all components -from the command-line or a parameter file. +from the command-line or a parameter file. You can even use the algorithm decribed here without any other knowledge of EO, just by writing your fitness function as a plain C++ function. This is why this lesson starts with a user's guide, @@ -31,9 +37,10 @@ algorithms.
    However, the ultimate purpose of this tutorial is to be able to do your own experiments - and these these will likely fall outside the scope of these two programs. This is why you should also read the programmer's -guides, as the structure and memory managements are here radically -different that in the 3 previous lessons - though relying of course on -the same objects. +guides, as the structure and memory managements +are here radically different that in the 3 previous lessons - though relying +of course on the same objects. Note that eoPersistent objects and eoParam +objects are handled by different mechanisms.
     


    @@ -53,8 +60,8 @@ is a user guide, not a programming guide. In particular, the
    not the names of the underlying classes (though they should be similar in most cases). -

    User's guide: -Parameter input The way to input parameters +

    User's guide:Parameter +input The way to input parameters has already be described in Lesson 3. To get a list of parameters, type the command with option --help (or -h): with both testBit and testReal this will result in @@ -67,8 +74,8 @@ has already be described in Lesson or testReal.status that contains the list of all recognized parameters and has the format of an input parameter file. -User's guide:The -status file +User's guide:The +status file
    This file will always contain the list of the parameters that have been actually used by the last run of the program, however thay have been entered (try testBit @@ -80,8 +87,8 @@ by the user. in sections. Note, however, that this format is not mandatory in the param file, as only the keywords are processed. -

    User's guide:Representation-independent -parameters +

    User's guide:Representation-independent +parameters
    In what follows, the fixed font colored text is directly taken from the status file and is commented between the lines. The presentation follows the status file format - only two sections are @@ -352,13 +359,13 @@ default value. current generation upon Ctrl C

    Boolean parameter: if true, Ctrl C only stops after the current generation as completed (eventually -dumping population to a file if some saver is active). THis very useful +dumping population to a file if some saver is active). This very useful feature is only available in Unix at the moment. Default is false.


    -

    User's guide: -Bistring specific parameters +

    User's guide:Bistring +specific parameters
    The following describes the specific parameters that are available in program BitEA to evolve genotypes that are bitstrings.
    The two representation-dependent sections are concerned repectively @@ -453,13 +460,13 @@ operators).
     


    -

    User's guide: -Real-valued specific parameters +

    User's guide:Real-valued +specific parameters
    The following describes the specific parameters that are available in programs RealEA and ESEA to evolve genotypes that are vector<double>. -
    RealEA  +
    RealEA implements what can be called a "real-coded GA", where everything is identical to the bitstring case above (except initialization and operators that are specific to vector<double> of course) and ESEA @@ -626,8 +633,8 @@ The value of standard deviation for Gaussian mutation - fixed along evolution (see the Evolution Strategy program below for self-adaptive mutations).


    -

    User's guide: -ES-real-valued specific parameters +

    User's guide:ES +with self-adative mutation specific parameters
    The following describes the specific parameters for program ESEA, that implements the full Evolution-Strategy self-adaptive mutation mechanism - together with specific ES crossover operators. The initialization section @@ -724,7 +731,7 @@ The factor for the mutation of the rotation angles in the case of the full correlated mutation. Default is 0.0873 (following Schwefel).

    -


    +

    Programmer's guide

    At the moment, you will have to browse in the source (colored!) code @@ -736,8 +743,8 @@ code of Lesson3, except for the memory management, performed through an eoState object (notice that all make_xxx calls have an eoState as second parameter). -

    Programmer's guide: The -make_xxx files +

    Programmer's guide: The +make_xxx files

    Interface: all make_xxx files have as first two parameters an eoParser and an eoState. @@ -798,7 +805,7 @@ management that this imposes.
     
     

    Programmer's -guide: Memory management +guide: Memory management
    As already said, all functions have an eoState as second argument - and that object is used to store the functor objects that were simply declared as variables of the main function up to now : @@ -807,8 +814,8 @@ detailed explanations and take a look at the code of Programmer's -guide: Memory management of eoParam -objects +guide: Memory management +of eoParam objects

    It has been seen in Lesson 3 that parameters could be read from command-line and/or a parameter file using an eoParser object. However, the memory mangement problem also concerns EO parameter @@ -837,13 +844,15 @@ to an eoParam object that is hold by the eoParser - and deleted whith it. between the arguments of the constructor of an eoParam object and the method createParam of an eoParser object: first, you need to provide the additional section parameter (used only when outputting the eoParser); second you -must make sure that the first argument -is of the correct type otherwise the compiler will complain. +must +make sure that the first argument is of the correct type otherwise the +compiler will complain.

    Note that if you don't later need the eoParam, but simply its value, you can even diretly write

    unsigned maxGen = _parser.createParam(unsigned(100), -"maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion").value(); -

    Getting parameter values in different functions: +"maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion").value(); +

    Getting parameter values in different +functions:

    It is often useful (though probably very bad programming style :-))) to be able to get the value of a user-defined parameter in two different places of the code without passing it around @@ -852,7 +861,31 @@ with exactly the same syntax than cre
    Be careful that the link between both parameters is made through their longmanes (second argument), and that you must so hard-code that name in two different places with of course exactly the same spelling!!! +
    Examples can be found for instance +in the make_genotype_xxx files, for the sizes of the genotypes: it is often +the case that the definition of the optimization problem requires (or computes) +such size. The idea is then that you either read or compute that size, +then create a (dummy) parameter with the name that is used later in the +make_genotype file. For instance, for bitstrings, the make_genotype_ga.h +contains the following line defining the size of the bitstring +

      unsigned theSize = +_parser.getORcreateParam(unsigned(10), "chromSize", "The length of the +bitstrings", 'n',"Problem").value(); +

    If you want to define that size earlier, you should write somewhere +before +
      +

      unsigned requiredSize  += ... ; +
     _parser.createParam(requiredSize, +"chromSize", "The length of the bitstrings", 'n',"Problem"); +

    Of course, if that size is mandatory, you should NOT modify it at run-time +by entering anther value !

    +


    User's guide: General +- Bitstring - Real - ES +- Programmer's guide: General +- Memory management - Parameters +

    Lesson 3 - Lesson 5 - @@ -864,8 +897,7 @@ documentation


    -Marc -Schoenauer
    +Marc Schoenauer
    Last modified: None of your business! From 5c34d8ee79ad53e78ad08c4594d431b032fbff9a Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Apr 2002 04:38:38 +0000 Subject: [PATCH 0833/2134] Adding SecongRealEA - mainly to prepare Lesson5 about adaptive parameters --- eo/tutorial/Lesson3/Makefile | 5 +- eo/tutorial/Lesson3/SecondRealEA.cpp | 322 +++++++++++++++++++++++++++ 2 files changed, 326 insertions(+), 1 deletion(-) create mode 100644 eo/tutorial/Lesson3/SecondRealEA.cpp diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile index bee917779..8c300c25f 100644 --- a/eo/tutorial/Lesson3/Makefile +++ b/eo/tutorial/Lesson3/Makefile @@ -2,7 +2,7 @@ .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp -secondEA = SecondBitEA +secondEA = SecondBitEA SecondRealEA ALL = $(secondEA) exercise3.1 @@ -10,5 +10,8 @@ lesson3 : $(secondEA) all : $(ALL) +SecondBitEA : binary_value.h +SecondRealEA : real_value.h + clean : @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson3/SecondRealEA.cpp b/eo/tutorial/Lesson3/SecondRealEA.cpp new file mode 100644 index 000000000..1128d1c60 --- /dev/null +++ b/eo/tutorial/Lesson3/SecondRealEA.cpp @@ -0,0 +1,322 @@ +//----------------------------------------------------------------------------- +// SecondRealEA.cpp +//----------------------------------------------------------------------------- +//* +// Same code than FirstBitEA as far as Evolutionary Computation is concerned +// but now you learn to enter the parameters in a more flexible way +// (also slightly different than in SecondBitEA.cpp) +// and to twidle the output to your preferences (as in SecondBitEA.cpp) +// +//----------------------------------------------------------------------------- +// standard includes +#include // runtime_error +#include // cout +#include // ostrstream, istrstream + +// the general include for eo +#include +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoReal Indi; + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +// Now in a separate file, and declared as binary_value(const vector &) + +#include "real_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES +//----------------------------------------------------------------------------- +// instead of having all values of useful parameters as constants, read them: +// either on the command line (--option=value or -o=value) +// or in a parameter file (same syntax, order independent, +// # = usual comment character +// or in the environment (TODO) + + // First define a parser from the command-line arguments + eoParser parser(argc, argv); + + // For each parameter, you can in on single line + // define the parameter, read it through the parser, and assign it + + unsigned seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General + + // description of genotype + unsigned vecSize = parser.createParam(unsigned(8), "vecSize", "Genotype size",'V', "Representation" ).value(); + + // parameters for evolution engine + unsigned popSize = parser.createParam(unsigned(10), "popSize", "Population size",'P', "Evolution engine" ).value(); + + unsigned tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); + + // init and stop + string loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); + + unsigned maxGen = parser.createParam(unsigned(100), "maxGen", "Maximum number of generations",'G', "Stopping criterion" ).value(); + + unsigned minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of generations",'g', "Stopping criterion" ).value(); + + unsigned steadyGen = parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion" ).value(); + + // operators probabilities at the algorithm level + double pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); + + double pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); + + // relative rates for crossovers + double hypercubeRate = parser.createParam(double(1), "hypercubeRate", "Relative rate for hypercube crossover", '\0', "Genetic Operators" ).value(); + + double segmentRate = parser.createParam(double(1), "segmentRate", "Relative rate for segment crossover", '\0', "Genetic Operators" ).value(); + + // internal parameters for the mutations + double EPSILON = parser.createParam(double(0.01), "EPSILON", "Width for uniform mutation", '\0', "Genetic Operators" ).value(); + + double SIGMA = parser.createParam(double(0.3), "SIGMA", "Sigma for normal mutation", '\0', "Genetic Operators" ).value(); + + // relative rates for mutations + double uniformMutRate = parser.createParam(double(1), "uniformMutRate", "Relative rate for uniform mutation", '\0', "Genetic Operators" ).value(); + + double detMutRate = parser.createParam(double(1), "detMutRate", "Relative rate for det-uniform mutation", '\0', "Genetic Operators" ).value(); + + double normalMutRate = parser.createParam(double(1), "normalMutRate", "Relative rate for normal mutation", '\0', "Genetic Operators" ).value(); + + // the name of the "status" file where all actual parameter values will be saved + string str_status = parser.ProgramName() + ".status"; // default value + string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + if (statusName != "") + { + ofstream os(statusName.c_str()); + os << parser; // and you can use that file as parameter file + } + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > plainEval( real_value ); + // ... to an object that counts the nb of actual evaluations + eoEvalFuncCounter eval(plainEval); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // Either load or initialize + // create an empty pop + eoPop pop; + // create a state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact conitnuation of the saved run + // eventually with different parameters + inState.registerObject(rng); + inState.registerObject(pop); + + if (loadName != "") + { + inState.load(loadName); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + } + else + { + rng.reseed(seed); + // a Indi random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoUniformGenerator uGen(-1.0, 1.0); + eoInitFixedLength random(vecSize, uGen); + + // Init pop from the randomizer: need to use the append function + pop.append(popSize, random); + // and evaluate pop (STL syntax) + apply(eval, pop); + } // end of initializatio of the population + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(tSize); + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoGenerationalReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // uniform chooce on segment made by the parents + eoSegmentCrossover xoverS; + // uniform choice in hypercube built by the parents + eoHypercubeCrossover xoverA; + // Combine them with relative weights + eoPropCombinedQuadOp xover(xoverS, segmentRate); + xover.add(xoverA, hypercubeRate, true); + +// MUTATION + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + eoUniformMutation mutationU(EPSILON); + // k (=1) coordinates of parents are uniformly modified + eoDetUniformMutation mutationD(EPSILON); + // all coordinates of parents are normally modified (stDev SIGMA) + eoNormalMutation mutationN(SIGMA); + // Combine them with relative weights + eoPropCombinedMonOp mutation(mutationU, uniformMutRate); + mutation.add(mutationD, detMutRate); + mutation.add(mutationN, normalMutRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, pCross, mutation, pMut); + +// STOP + ////////////////////////////////////// + // termination condition see FirstBitEA.cpp + ///////////////////////////////////// + eoGenContinue genCont(maxGen); + eoSteadyFitContinue steadyCont(minGen, steadyGen); + eoFitContinue fitCont(0); + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + +// CHECKPOINT + // but now you want to make many different things every generation + // (e.g. statistics, plots, ...). + // the class eoCheckPoint is dedicated to just that: + + // Declare a checkpoint (from a continuator: an eoCheckPoint + // IS AN eoContinue and will be called in the loop of all algorithms) + eoCheckPoint checkpoint(continuator); + + // Create a counter parameter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkpoint.add(increment); + + // now some statistics on the population: + // Best fitness in population + eoBestFitnessStat bestStat; + // Second moment stats: average and stdev + eoSecondMomentStats SecondStat; + + // Add them to the checkpoint to get them called at the appropriate time + checkpoint.add(bestStat); + checkpoint.add(SecondStat); + + // The Stdout monitor will print parameters to the screen ... + eoStdoutMonitor monitor(false); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(generationCounter); + monitor.add(eval); // because now eval is an eoEvalFuncCounter! + monitor.add(bestStat); + monitor.add(SecondStat); + + // A file monitor: will print parameters to ... a File, yes, you got it! + eoFileMonitor fileMonitor("stats.xg", " "); + + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(fileMonitor); + + // the fileMonitor can monitor parameters, too, but you must tell it! + fileMonitor.add(generationCounter); + fileMonitor.add(bestStat); + fileMonitor.add(SecondStat); + + // Last type of item the eoCheckpoint can handle: state savers: + eoState outState; + // Register the algorithm into the state (so it has something to save!!) + outState.registerObject(parser); + outState.registerObject(pop); + outState.registerObject(rng); + + // and feed the state to state savers + // save state every 100th generation + eoCountedStateSaver stateSaver1(20, outState, "generation"); + // save state every 1 seconds + eoTimedStateSaver stateSaver2(1, outState, "time"); + + // Don't forget to add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + // and that's it for the (control and) output + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // stopping criterion, eval, selection, transformation, replacement + eoEasyEA gga(checkpoint, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// 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; +} From 361741b72615be4dc6348f0c21ebcc20ec3f8505 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Apr 2002 05:04:24 +0000 Subject: [PATCH 0834/2134] Adding SecondRealEA --- eo/tutorial/html/SecondRealEA.html | 468 +++++++++++++++++++++++++++++ eo/tutorial/html/eoLesson3.html | 33 +- 2 files changed, 490 insertions(+), 11 deletions(-) create mode 100644 eo/tutorial/html/SecondRealEA.html diff --git a/eo/tutorial/html/SecondRealEA.html b/eo/tutorial/html/SecondRealEA.html new file mode 100644 index 000000000..551faec90 --- /dev/null +++ b/eo/tutorial/html/SecondRealEA.html @@ -0,0 +1,468 @@ + + + + + + SecondRealEA + + +Back to Lesson 3 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +
    +

    +SecondRealEA

    +Click on the figure to see the corresponding code.
    +In the code, the colors are meaningfull
    +The actual code is in boldface and the comment in normal face. +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
    +//-----------------------------------------------------------------------------
    +// SecondRealEA.cpp
    +//-----------------------------------------------------------------------------
    +//*
    +// Same code than FirstBitEA as far as Evolutionary Computation is concerned
    +// but now you learn to enter the parameters in a more flexible way
    +// (also slightly different than in SecondBitEA.cpp)
    +// and to twidle the output to your preferences (as in SecondBitEA.cpp)
    +//
    +//-----------------------------------------------------------------------------
    +// standard includes
    +#include <stdexcept>  // runtime_error
    +#include <iostream>    // cout
    +#include <strstream>  // ostrstream, istrstream
    +// the general include for eo
    +#include <eo>
    +#include <es.h>
    +
    +
    + + + + +
    + +//-----------------------------------------------------------------------------
    +// define your individuals
    +typedef eoReal<eoMinimizingFitness> Indi;
    +
    +
    + + + + +
    + +//-----------------------------------------------------------------------------
    +// a simple fitness function that computes the euclidian norm of a real vector
    +// Now in a separate file, and declared as binary_value(const vector<bool> &)
    +#include "real_value.h"
    +
    +
    + + + + +
    + +//-----------------------------------------------------------------------------
    +void main_function(int argc, char **argv)
    +{
    +
    +
    + + + + +
    + +//-----------------------------------------------------------------------------
    +// instead of having all values of useful parameters as constants, read them:
    +// either on the command line (--option=value or -o=value)
    +//        or in a parameter file (same syntax, order independent,
    +//                                                        # = usual comment character
    +//        or in the environment (TODO)
    +  // First define a parser from the command-line arguments
    +  eoParser parser(argc, argv);
    +  
    +  // For each parameter, you can in on single line
    +  // define the parameter, read it through the parser, and assign it
    +  
    + +  unsigned seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General
    +  
    +  // description of genotype
    +  unsigned vecSize = parser.createParam(unsigned(8), "vecSize", "Genotype size",'V', "Representation" ).value();
    +    // parameters for evolution engine
    +      unsigned popSize = parser.createParam(unsigned(10), "popSize", "Population size",'P', "Evolution engine" ).value();
    +      unsigned tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value();
    +    // init and stop
    +      string loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value();
    +
    +      unsigned maxGen = parser.createParam(unsigned(100), "maxGen", "Maximum number of generations",'G', "Stopping criterion" ).value();
    +      unsigned minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of generations",'g', "Stopping criterion" ).value();
    +      unsigned steadyGen = parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion" ).value();
    +    // operators probabilities at the algorithm level
    +      double pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value();
    +      double pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value();
    +    // relative rates for crossovers
    +      double hypercubeRate = parser.createParam(double(1), "hypercubeRate", "Relative rate for hypercube crossover", '\0', "Genetic Operators" ).value();
    +      double segmentRate = parser.createParam(double(1), "segmentRate", "Relative rate for segment crossover", '\0', "Genetic Operators" ).value();
    +      // internal parameters for the mutations
    +      double EPSILON = parser.createParam(double(0.01), "EPSILON", "Width for uniform mutation", '\0', "Genetic Operators" ).value();
    +      
    +      double SIGMA = parser.createParam(double(0.3), "SIGMA", "Sigma for normal mutation", '\0', "Genetic Operators" ).value();
    +    // relative rates for mutations
    +      double uniformMutRate = parser.createParam(double(1), "uniformMutRate", "Relative rate for uniform mutation", '\0', "Genetic Operators" ).value();
    +      double detMutRate = parser.createParam(double(1), "detMutRate", "Relative rate for det-uniform mutation", '\0', "Genetic Operators" ).value();
    +      double normalMutRate = parser.createParam(double(1), "normalMutRate", "Relative rate for normal mutation", '\0', "Genetic Operators" ).value();
    +      // the name of the "status" file where all actual parameter values will be saved
    +      string str_status = parser.ProgramName() + ".status"; // default value
    +      string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value();
    +    // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED
    +    // i.e. in case you need parameters somewhere else, postpone these
    +      if (parser.userNeedsHelp())
    +          {
    +              parser.printHelp(cout);
    +              exit(1);
    +          }
    +      if (statusName != "")
    +          {
    +ofstream os(statusName.c_str());
    +os << parser; // and you can use that file as parameter file
    +          }
    +
    +
    + + + + +
    + +  /////////////////////////////
    +  // Fitness function
    +  ////////////////////////////
    +  // Evaluation: from a plain C++ fn to an EvalFunc Object
    +  // you need to give the full description of the function
    +  eoEvalFuncPtr<Indi, double, const vector<double>& > plainEval(  real_value );
    +  // ... to an object that counts the nb of actual evaluations
    +  eoEvalFuncCounter<Indi> eval(plainEval);
    +
    +
    + + + + +
    + +  ////////////////////////////////
    +  // Initilisation of population
    +  ////////////////////////////////
    +  // Either load or initialize
    +  // create an empty pop
    +  eoPop<Indi> pop;
    +  // create a state for reading
    +  eoState inState; // a state for loading - WITHOUT the parser
    +  // register the rng and the pop in the state, so they can be loaded,
    +  // and the present run will be the exact conitnuation of the saved run
    +  // eventually with different parameters
    +  inState.registerObject(rng);
    +  inState.registerObject(pop);
    +      
    +  if (loadName != "")
    +      {
    +          inState.load(loadName); //  load the pop and the rng
    +          // the fitness is read in the file:
    +          // do only evaluate the pop if the fitness has changed
    +      }
    +  else
    +      {
    +          rng.reseed(seed);
    +          // a Indi random initializer
    +          // based on boolean_generator class (see utils/rnd_generator.h)
    +          eoUniformGenerator<double> uGen(-1.0, 1.0);
    +          eoInitFixedLength<Indi> random(vecSize, uGen);
    +          // Init pop from the randomizer: need to use the append function
    +          pop.append(popSize, random);          
    +          // and evaluate pop (STL syntax)      
    +          apply<Indi>(eval, pop);
    +      } // end of initializatio of the population
    +
    +
    + + + + +
    + +  // sort pop before printing it!
    +  pop.sort();
    +  // Print (sorted) intial population (raw printout)
    +  cout << "Initial Population" << endl;
    +  cout << pop;
    +
    +
    + + + + +
    + +  /////////////////////////////////////
    +  // selection and replacement
    +  ////////////////////////////////////
    +
    +
    + + + + +
    + +  // The robust tournament selection
    +  eoDetTournamentSelect<Indi> selectOne(tSize);
    +  // is now encapsulated in a eoSelectPerc (entage)
    +  eoSelectPerc<Indi> select(selectOne);// by default rate==1
    +
    +
    + + + + +
    + +  // And we now have the full slection/replacement - though with
    +  // no replacement (== generational replacement) at the moment :-)
    +  eoGenerationalReplacement<Indi> replace;
    +
    +
    + + + + +
    + +  //////////////////////////////////////
    +  // The variation operators
    +  //////////////////////////////////////
    +
    +
    + + + + +
    + +  // uniform chooce on segment made by the parents
    +  eoSegmentCrossover<Indi> xoverS;
    +  // uniform choice in hypercube built by the parents
    +  eoHypercubeCrossover<Indi> xoverA;
    +  // Combine them with relative weights
    +  eoPropCombinedQuadOp<Indi> xover(xoverS, segmentRate);
    +  xover.add(xoverA, hypercubeRate, true);
    +
    +
    + + + + +
    + +  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
    +  eoUniformMutation<Indi>  mutationU(EPSILON);
    +  // k (=1) coordinates of parents are uniformly modified
    +  eoDetUniformMutation<Indi>  mutationD(EPSILON);
    +  // all coordinates of parents are normally modified (stDev SIGMA)
    +  eoNormalMutation<Indi>  mutationN(SIGMA);
    +  // Combine them with relative weights
    +  eoPropCombinedMonOp<Indi> mutation(mutationU, uniformMutRate);
    +  mutation.add(mutationD, detMutRate);
    +  mutation.add(mutationN, normalMutRate, true);
    +  // The operators are  encapsulated into an eoTRansform object
    +  eoSGATransform<Indi> transform(xover, pCross, mutation, pMut);
    +
    +
    + + + + +
    + +  //////////////////////////////////////
    +  // termination condition see FirstBitEA.cpp
    +  /////////////////////////////////////
    +  eoGenContinue<Indi> genCont(maxGen);
    +  eoSteadyFitContinue<Indi> steadyCont(minGen, steadyGen);
    +  eoFitContinue<Indi> fitCont(0);
    +  eoCombinedContinue<Indi> continuator(genCont);
    +  continuator.add(steadyCont);
    +  continuator.add(fitCont);
    +  
    +  
    +
    +
    + + + + +
    + +  // but now you want to make many different things every generation
    +  // (e.g. statistics, plots, ...).
    +  // the class eoCheckPoint is dedicated to just that:
    +  // Declare a checkpoint (from a continuator: an eoCheckPoint
    +  // IS AN eoContinue and will be called in the loop of all algorithms)
    +  eoCheckPoint<Indi> checkpoint(continuator);
    +  
    +      // Create a counter parameter
    +      eoValueParam<unsigned> generationCounter(0, "Gen.");
    +      
    +      // Create an incrementor (sub-class of eoUpdater). Note that the
    +      // parameter's value is passed by reference,
    +      // so every time the incrementer is updated (every generation),
    +      // the data in generationCounter will change.
    +      eoIncrementor<unsigned> increment(generationCounter.value());
    +      // Add it to the checkpoint,
    +      // so the counter is updated (here, incremented) every generation
    +      checkpoint.add(increment);
    +      // now some statistics on the population:
    +      // Best fitness in population
    +      eoBestFitnessStat<Indi> bestStat;
    +      // Second moment stats: average and stdev
    +      eoSecondMomentStats<Indi> SecondStat;
    +      // Add them to the checkpoint to get them called at the appropriate time
    +      checkpoint.add(bestStat);
    +      checkpoint.add(SecondStat);
    +      // The Stdout monitor will print parameters to the screen ...
    +      eoStdoutMonitor monitor(false);
    +        
    +      // when called by the checkpoint (i.e. at every generation)
    +      checkpoint.add(monitor);
    +      // the monitor will output a series of parameters: add them
    +      monitor.add(generationCounter);
    +      monitor.add(eval); // because now eval is an eoEvalFuncCounter!
    +      monitor.add(bestStat);
    +      monitor.add(SecondStat);
    +      // A file monitor: will print parameters to ... a File, yes, you got it!
    +      eoFileMonitor fileMonitor("stats.xg", " ");
    +        
    +      // the checkpoint mechanism can handle multiple monitors
    +      checkpoint.add(fileMonitor);
    +      // the fileMonitor can monitor parameters, too, but you must tell it!
    +      fileMonitor.add(generationCounter);
    +      fileMonitor.add(bestStat);
    +      fileMonitor.add(SecondStat);
    +      // Last type of item the eoCheckpoint can handle: state savers:
    +      eoState outState;
    +      // Register the algorithm into the state (so it has something to save!!)
    +      outState.registerObject(parser);
    +      outState.registerObject(pop);
    +      outState.registerObject(rng);
    +      // and feed the state to state savers
    +      // save state every 100th  generation
    +      eoCountedStateSaver stateSaver1(20, outState, "generation");
    +      // save state every 1 seconds
    +      eoTimedStateSaver    stateSaver2(1, outState, "time");
    +      // Don't forget to add the two savers to the checkpoint
    +      checkpoint.add(stateSaver1);
    +      checkpoint.add(stateSaver2);
    +      // and that's it for the (control and) output
    +
    +
    + + + + +
    + +  /////////////////////////////////////////
    +  // the algorithm
    +  ////////////////////////////////////////
    +  // Easy EA requires
    +  // stopping criterion, eval, selection, transformation, replacement
    +  eoEasyEA<Indi> gga(checkpoint, eval, select, transform, replace);
    +  // Apply algo to pop - that's it!
    +  gga(pop);
    +  
    +
    +
    + + + + +
    + +  // Print (sorted) intial population
    +  pop.sort();
    +  cout << "FINAL Population\n" << pop << endl;
    +
    +
    + + + + +
    + +}
    +// 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;
    +}
    +
    +
    Back to Lesson 3 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    +
    Last +modified: Sun Apr 28 06:42:44 2002 + + + diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index 8563769e8..40c36e118 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -42,13 +42,13 @@ First, but you should now have done it without being told, go into the sub-dir of the tutorial dir and type make. This will compile the SecondBitEA -program (and, some day, SecondRealEA). +and SecondRealEA +programs.

    You can then either

    • -browse the corresponding code (only SecondBitEA -available right now, but you can figure out how SecondRealEA will look -like),
    • +browse the corresponding code (SecondBitEA +and SecondRealEA),
    • look at the summary of changes,
    • @@ -139,7 +139,8 @@ See the parameter section of the Component-Based tutorial, or wait until
    • The eoParser -class, whose only purpose is the input of parameters.
    • +class, whose only purpose is the input of parameters. Read its +description if you are interested.

    eoParser: @@ -171,7 +172,7 @@ and optionally by a short (1 character) keyword.
    -
                  +
                 --longKeyword=value     or     -cvalue    @@ -183,12 +184,12 @@ so, after compiling the executable for Lesson 3 (ma lesson3 at system prompt in Unix), you can try to type in -
                   +
                  SecondBitEA
    and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). But you can now type in -
                   +
                  SecondBitEA --vecSize=100
    and see the output of the optimization of OneMax on 100-bit bitstrings. @@ -196,7 +197,7 @@ But you can now type in
  • Take a look at all available parameters by typing in
  • -
                   +
                  SecondBitEA --help
    or by going into the code: all parameter inputs have been grouped in @@ -209,7 +210,7 @@ it contains the list of all actual parameters used, and can directly be used as parameter input file: change the file name (e.g. to SecondBitEA.param), edit it, change whichever parameter you want, and type in -
                     +
                    SecondBitEA @SecondBitEA.param
    and you will see all values that you defined into the file taken into account. @@ -249,7 +250,17 @@ somewhere else later (though of course this is not any useful for variable seed!). There is however another way to achieve the same result in less lines of -code - with a different memory management (see Lesson4). +code - with a different memory management. This is what is done in the +code for eoRealEA. The same parameter for the random +number generator seed +is read, but in one single line of code.  +The only difference is that now you cannot access the eoValueParam object +itself - but this is not often necessary. +
    Be careful to ensure that the type of the default value in the call +to eoParameterLoader::createParam +method as this is the only way the compiler can desambiguate the template +(remember that eoParameterLoader is a +base class for eoParser.


    eoState: From d6e33dbaee8dba52974cb9887575afc27cb60e6a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Apr 2002 04:54:25 +0000 Subject: [PATCH 0835/2134] Copied from eoRndGenerators here is eoUniformInit, same thing but in the eoInit hierarchy. Useful to embed into higher levels eoInit --- eo/src/utils/eoUniformInit.h | 155 +++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 eo/src/utils/eoUniformInit.h diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h new file mode 100644 index 000000000..aeb6a05e0 --- /dev/null +++ b/eo/src/utils/eoUniformInit.h @@ -0,0 +1,155 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoUniformInit.h + + (c) Maarten Keijzer, GeNeura Team, Marc Schoenauer, 1999 - 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + */ + +//----------------------------------------------------------------------------- +/** Copied from the eoRndGenerators to have objects deriving from eoInit + * As the whole initialization mechanism in EO is based on eoInit rather than + * eoRndGenerators, we might as well have these directly written without + * overhead + +@classes: + eoUniformInit uniform initialization for doubles, floats, ints, ... + eoBooleanInit biased init for booleans + eoNormalInit normal intialization for doubles and floats + eoNegExpInit negative exponential distributions " +*/ + +#ifndef eoUniformInit_h +#define eoUniformInit_h + +#include "eoRNG.h" +#include "eoInit.h" +#include "eoRealBounds.h" +#include + +using eo::rng; + +/** + The class eoUniformInit can be used in the STL apply function + to easily randomize floats and doubles. It can also + be used for ints and unsigneds by virtue of the static_cast + + Also present is a specialization for boolean, that will + ignore the minima and maxima that are possibly set and will + return an unbiased flip of a coin. For a biased flip, use the eoBoolean + + either in [0, _max) if only 1 value (_max) is given + (or none, as _max defaults to 1.0) + or in [_min,_max) if 2 values are given (_min, _max) +*/ +template class eoUniformInit : public eoInit +{ + public : + /** Ctor with only a max bound */ + eoUniformInit(T _max = T(1.0), eoRng& _rng = rng) : + minim(T(0.0)), range(_max), uniform(_rng) + {} + + /** Ctor with an eoRealBound */ + eoUniformInit(eoRealBounds & _bound, eoRng& _rng = rng) : + minim(_bound.minimum()), range(_bound.range()), uniform(_rng) + {} + + /** Ctor with explicit min and max */ + eoUniformInit(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), uniform(_rng) + { + if (_min>_max) + throw logic_error("Min is greater than Max in uniform_generator"); + } + + /** + Generates the number, uses a static_cast to get the right behaviour + for ints and unsigneds + */ + void operator()(T & _t) + { + _t = minim+static_cast(uniform.uniform(range)); + } + +private : + T minim; + T range; + eoRng& uniform; +}; + + +/** Specialization for bool, does an unbiased coin flip */ +template <> +void eoUniformInit::operator()(bool & _b) +{ + _b = uniform.flip(0.5); +} + +/** + The class eoBooleanInit can be used in the STL apply function + to easily generate random booleans with a specified bias +*/ +class eoBooleanInit : public eoInit +{ + public : + eoBooleanInit(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + + void operator()(bool & _b) { _b = gen.flip(bias); } + private : + float bias; + eoRng& gen; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class eoNormalInit : public eoInit +{ + public : + eoNormalInit(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + void operator()(T & _t) { _t = (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +/** + The class negexp_generator can be used in the STL generate function + to easily generate negative exponential distributed floats and doubles. The user + can supply a mean. +*/ +template class eoNegExpInit : public eoInit +{ + public : + eoNegExpInit(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + + void operator()(T & _t) { _t = (T) negexp.negexp(mean); } + + private : + T mean; + eoRng& negexp; +}; + +#endif From 8b5b42a9f8511b8e527f9ee148cbaba8285312f4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Apr 2002 04:56:39 +0000 Subject: [PATCH 0836/2134] Added utils/eoUniformInit.h --- eo/src/eo | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eo b/eo/src/eo index d78969c7c..97ac6207b 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -48,6 +48,7 @@ #include #include +#include // the variation operators #include From 9c6121604a3689f6b7d8e7d5da4f6fc12070674f Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Apr 2002 05:07:52 +0000 Subject: [PATCH 0837/2134] Added the calls to EO::printOn and EO::readFrom in the corresponding methods so th euser does not forget to use these before writing/reading the actual eo --- eo/tutorial/Templates/eoMyStruct.tmpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl index f36875168..d5c972557 100644 --- a/eo/tutorial/Templates/eoMyStruct.tmpl +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -40,11 +40,20 @@ public: // END Code of default Ctor of an eoMyStruct object } + virtual ~eoMyStruct() + { + // START Code of Destructor of an eoEASEAGenome object + // END Code of Destructor of an eoEASEAGenome object + } + virtual string className() const { return "eoMyStruct"; } /** printing... */ void printOn(ostream& os) const { + // First write the fitness + EO::printOn(os); + os << ' '; // START Code of default output /** HINTS @@ -60,6 +69,8 @@ public: */ void readFrom(istream& is) { + // of course you should read the fitness first! + EO::readFrom(is); // START Code of input /** HINTS From d4da2d9f7d787bb6d60a1ec397e681c852fd337d Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Apr 2002 05:10:49 +0000 Subject: [PATCH 0838/2134] Turned the power function to sum - was untractable with long bitstrings --- eo/tutorial/Lesson4/binary_value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/tutorial/Lesson4/binary_value.h b/eo/tutorial/Lesson4/binary_value.h index e36ad50c7..0cd560073 100644 --- a/eo/tutorial/Lesson4/binary_value.h +++ b/eo/tutorial/Lesson4/binary_value.h @@ -12,7 +12,7 @@ template float binary_value(const Chrom& _chrom) float sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) if (_chrom[i]) - sum += pow(2, _chrom.size() - i - 1); + sum += _chrom[i]; return sum; } From 8998caa4ff0672d545dc6bd92df1c4d47502729e Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 1 May 2002 02:44:54 +0000 Subject: [PATCH 0839/2134] THe code for the 1/5th mutation was completely wrong! --- eo/src/es/eoNormalMutation.h | 76 +++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 325d981c9..6dd12dc8a 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -65,10 +65,10 @@ template class eoNormalMutation: public eoMonOp * @param _p_change the probability to change a given coordinate */ eoNormalMutation(eoRealVectorBounds & _bounds, - double & _sigma, const double& _p_change = 1.0): + double _sigma, const double& _p_change = 1.0): sigma(_sigma), bounds(_bounds), p_change(_p_change) {} - /// The class name. + /** The class name */ virtual string className() const { return "eoNormalMutation"; } /** @@ -90,9 +90,11 @@ template class eoNormalMutation: public eoMonOp return hasChanged; } -protected: - double & sigma; + /** Accessor to ref to sigma - for update and monitor */ + double & Sigma() {return sigma;} + private: + double & sigma; eoRealVectorBounds & bounds; double p_change; }; @@ -112,38 +114,55 @@ public: /** * (Default) Constructor. * - * @param eval the evaluation fuinction, needed to recompute the fitmess - * @param _sigmaInit the initial value for uniform nutation + * @param eval the evaluation function, needed to recompute the fitmess + * @param _sigmaInit the initial value for uniform mutation * @param _windowSize the size of the window for statistics * @param _threshold the threshold (the 1/5 - 0.2) * @param _updateFactor multiplicative update factor for sigma */ eoOneFifthMutation(eoEvalFunc & _eval, double & _sigmaInit, - unsigned _windowSize = 10, - double _threshold=0.2, double _updateFactor=0.83): + unsigned _windowSize = 10, double _updateFactor=0.83, + double _threshold=0.2): eoNormalMutation(_sigmaInit), eval(_eval), threshold(_threshold), updateFactor(_updateFactor), - nbMut(_windowSize, 0), nbSuccess(_windowSize, 0), genIndex(0) {} + nbMut(_windowSize, 0), nbSuccess(_windowSize, 0), genIndex(0) + { + // minimal check + if (updateFactor>=1) + throw runtime_error("Update factor must be < 1 in eoOneFifthMutation"); + } + + /** The class name */ + virtual string className() const { return "eoOneFifthMutation"; } /** * Do it! - * @param _eo The cromosome undergoing the mutation - * calls the standard mutation, then checks for success + * calls the standard mutation, then checks for success and updates stats + * + * @param _eo The chromosome undergoing the mutation */ - void operator()(EOT & _eo) + bool operator()(EOT & _eo) { + if (_eo.invalid()) // due to some crossover??? + eval(_eo); Fitness oldFitness = _eo.fitness(); // save old fitness - eoNormalMutation::operator()(_eo); // normal mutation - nbMut++; // assumes normal mutation always modifies _eo + // call standard operator - then count the successes + if (eoNormalMutation::operator()(_eo)) // _eo has been modified + { + _eo.invalidate(); // don't forget!!! + nbMut[genIndex]++; + eval(_eo); // compute fitness of offspring - eval(_eo); // compute fitness of offspring - - if (_eo.fitness() > oldFitness) - nbSuccess++; // update counter + if (_eo.fitness() > oldFitness) + nbSuccess[genIndex]++; // update counter + } + return false; // because eval has reset the validity flag } - // this will be called every generation + /** the method that will be called every generation + * if the object is added to the checkpoint + */ void update() { unsigned totalMut = 0; @@ -156,23 +175,26 @@ public: } // update sigma accordingly - double prop = (double) totalSuccess / totalMut; - if (prop > threshold) - sigma /= updateFactor; // increase sigma + double prop = double(totalSuccess) / totalMut; + if (prop > threshold) { + Sigma() /= updateFactor; // increase sigma + } else - sigma *= updateFactor; // decrease sigma - - // go to next generation + { + Sigma() *= updateFactor; // decrease sigma + } genIndex = (genIndex+1) % nbMut.size() ; nbMut[genIndex] = nbSuccess[genIndex] = 0; + } + private: eoEvalFunc & eval; double threshold; // 1/5 ! double updateFactor ; // the multiplicative factor - vector nbMut; // total number of mutations per gen + vector nbMut; // total number of mutations per gen vector nbSuccess; // number of successful mutations per gen - unsigned genIndex ; // current gen + unsigned genIndex ; // current index in vectors (circular) }; From ee5297a57399cee872b2a5c2d1e3dd0899e3c9a2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 1 May 2002 04:04:15 +0000 Subject: [PATCH 0840/2134] eoParameterLoader -> eoParser --- eo/tutorial/Templates/MyStructEA.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/Templates/MyStructEA.cpp b/eo/tutorial/Templates/MyStructEA.cpp index b8ec1bb14..6b904a189 100644 --- a/eo/tutorial/Templates/MyStructEA.cpp +++ b/eo/tutorial/Templates/MyStructEA.cpp @@ -60,14 +60,14 @@ typedef eoMyStruct Indi; // ***MUST*** derive from EO // create an initializer #include "make_genotype_MyStruct.h" -eoInit & make_genotype(eoParameterLoader& _parser, eoState&_state, Indi _eo) +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) { return do_make_genotype(_parser, _state, _eo); } // and the variation operaotrs #include "make_op_MyStruct.h" -eoGenOp& make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) { return do_make_op(_parser, _state, _init); } From a4883fda9baf11393028aaea7f4e89b478413efc Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 3 May 2002 05:12:32 +0000 Subject: [PATCH 0841/2134] Replaced the eoParameterLoader parameter by an eoParser (used everywhere now) --- eo/tutorial/Templates/make_genotype_MyStruct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/tutorial/Templates/make_genotype_MyStruct.h b/eo/tutorial/Templates/make_genotype_MyStruct.h index a5194f9b0..9892583b4 100644 --- a/eo/tutorial/Templates/make_genotype_MyStruct.h +++ b/eo/tutorial/Templates/make_genotype_MyStruct.h @@ -55,7 +55,7 @@ */ template -eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { // read any useful parameter here from the parser // the param itself will belong to the parser (as far as memory is concerned) From 5b3b5d79fab1c87164a8b2aa04205046b971a63a Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 8 May 2002 06:14:23 +0000 Subject: [PATCH 0842/2134] Removed the template_depth argument (since we are finally NOT going for the fitness_trait stuff). --- eo/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index bdff28ebc..166a137af 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -10,7 +10,7 @@ DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a INCLUDES = -I$(top_builddir)/src LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a -CXXFLAGS = -g -Wall -ftemplate-depth-30 +CXXFLAGS = -g -Wall ############################################################################### # PLEASE don't break the line (see create_batch.sh) From f2e20f638ef69d87bc52b6cfb349c8ef9b47e769 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 8 May 2002 06:31:18 +0000 Subject: [PATCH 0843/2134] Replacing Paradiseo(jet7).pdf with paradiseoJet7.pdf because of Unix problems with names containing commas --- ...{Paradiseo(jet7).pdf => paradiseoJet7.pdf} | Bin 530873 -> 530785 bytes 1 file changed, 0 insertions(+), 0 deletions(-) rename eo/tutorial/pdf/{Paradiseo(jet7).pdf => paradiseoJet7.pdf} (85%) diff --git a/eo/tutorial/pdf/Paradiseo(jet7).pdf b/eo/tutorial/pdf/paradiseoJet7.pdf similarity index 85% rename from eo/tutorial/pdf/Paradiseo(jet7).pdf rename to eo/tutorial/pdf/paradiseoJet7.pdf index 18f3eafc56ae2c9fae3490b82f89d047d9683986..b227633f314b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tywxX&PN{GIt9RwjgcIN1oer e Date: Wed, 8 May 2002 06:44:04 +0000 Subject: [PATCH 0844/2134] an example of how to make a new genotype within EO - see HTML doc --- eo/tutorial/Lesson5/Makefile | 46 +++++ eo/tutorial/Lesson5/OneMaxEA.cpp | 188 ++++++++++++++++++ eo/tutorial/Lesson5/OneMaxLibEA.cpp | 162 +++++++++++++++ eo/tutorial/Lesson5/eoOneMax.h | 111 +++++++++++ eo/tutorial/Lesson5/eoOneMaxEvalFunc.h | 68 +++++++ eo/tutorial/Lesson5/eoOneMaxInit.h | 63 ++++++ eo/tutorial/Lesson5/eoOneMaxMutation.h | 68 +++++++ eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h | 70 +++++++ eo/tutorial/Lesson5/make_OneMax.cpp | 129 ++++++++++++ eo/tutorial/Lesson5/make_genotype_OneMax.h | 75 +++++++ eo/tutorial/Lesson5/make_op_OneMax.h | 210 ++++++++++++++++++++ 11 files changed, 1190 insertions(+) create mode 100644 eo/tutorial/Lesson5/Makefile create mode 100644 eo/tutorial/Lesson5/OneMaxEA.cpp create mode 100644 eo/tutorial/Lesson5/OneMaxLibEA.cpp create mode 100644 eo/tutorial/Lesson5/eoOneMax.h create mode 100644 eo/tutorial/Lesson5/eoOneMaxEvalFunc.h create mode 100644 eo/tutorial/Lesson5/eoOneMaxInit.h create mode 100644 eo/tutorial/Lesson5/eoOneMaxMutation.h create mode 100644 eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h create mode 100644 eo/tutorial/Lesson5/make_OneMax.cpp create mode 100644 eo/tutorial/Lesson5/make_genotype_OneMax.h create mode 100644 eo/tutorial/Lesson5/make_op_OneMax.h diff --git a/eo/tutorial/Lesson5/Makefile b/eo/tutorial/Lesson5/Makefile new file mode 100644 index 000000000..bc179fd22 --- /dev/null +++ b/eo/tutorial/Lesson5/Makefile @@ -0,0 +1,46 @@ +# sample makefile for building an EA evolving a new genotype + +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -I./util -Wall -g -c $*.cpp + +# local sources +COMMON_SOURCES = eoOneMax.h \ + eoOneMaxEvalFunc.h \ + eoOneMaxInit.h \ + eoOneMaxMutation.h \ + eoOneMaxQuadCrossover.h \ + make_genotype_OneMax.h \ + make_op_OneMax.h + +NO_LIB_SOURCES = OneMaxEA.cpp + +LIB_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp + + +SOURCES = $(COMMON_SOURCES) OneMaxEA.cpp OneMaxLibEA.cpp make_OneMax.cpp + +# START eventually modify the name of EO dir +DIR_EO = ../../src +# END eventually modify the name of EO dir + +LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +ALL = OneMaxEA OneMaxLibEA + +OneMaxEA : OneMaxEA.o + c++ -g -o $@ OneMaxEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + +OneMaxLibEA : OneMaxLibEA.o make_OneMax.o + c++ -g -o $@ OneMaxLibEA.o make_OneMax.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + +tar : ; tar czvf OneMax.tgz *.h *.cpp Makefile + +all : $(ALL) + +clean : ; /bin/rm *.o $(ALL) + +########## local dependencies +OneMaxEA.o : $(COMMON_SOURCES) OneMaxEA.cpp +OneMaxLibEA.o : $(COMMON_SOURCES) OneMaxLibEA.cpp +make_OneMax.o : make_OneMax.cpp eoOneMax.h diff --git a/eo/tutorial/Lesson5/OneMaxEA.cpp b/eo/tutorial/Lesson5/OneMaxEA.cpp new file mode 100644 index 000000000..1f3470f33 --- /dev/null +++ b/eo/tutorial/Lesson5/OneMaxEA.cpp @@ -0,0 +1,188 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file. +It includes all other files that have been generated by the script create.sh +so it is the only file to compile. + +In case you want to build up a separate library for your new Evolving Object, +you'll need some work - follow what's done in the src/ga dir, used in the +main file BitEA in tutorial/Lesson4 dir. +Or you can wait until we do it :-) +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoOneMax MUST derive from EO for some fitness + */ +#include "eoOneMax.h" + +/** definition of initilizqtion: + * class eoOneMaxInit MUST derive from eoInit + */ +#include "eoOneMaxInit.h" + +/** definition of evaluation: + * class eoOneMaxEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoOneMaxEvalFunc.h" + +// GENOTYPE eoOneMax ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMaximizingFitness MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef eoOneMax Indi; // ***MUST*** derive from EO + +// create an initializer +#include "make_genotype_OneMax.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// and the variation operaotrs +#include "make_op_OneMax.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoOneMaxEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/eo/tutorial/Lesson5/OneMaxLibEA.cpp b/eo/tutorial/Lesson5/OneMaxLibEA.cpp new file mode 100644 index 000000000..42d25f923 --- /dev/null +++ b/eo/tutorial/Lesson5/OneMaxLibEA.cpp @@ -0,0 +1,162 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file for compiling after creating a +library. +See make_OneMax.cpp file. +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoOneMax MUST derive from EO for some fitness + */ +#include "eoOneMax.h" + +/** definition of initilizqtion: + * class eoOneMaxInit MUST derive from eoInit + */ +#include "eoOneMaxInit.h" + +/** definition of evaluation: + * class eoOneMaxEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoOneMaxEvalFunc.h" + +// GENOTYPE eoOneMax ***MUST*** be templatized over the fitness + +// +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +// + +// Then define your EO objects using that fitness type +typedef eoOneMax Indi; // ***MUST*** derive from EO + +// create an initializer - done here and NOT in make_OneMax.cpp +// because it is NOT representation independent +#include "make_genotype_OneMax.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// same thing for the variation operaotrs +#include "make_op_OneMax.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// The representation independent routines are simply declared here + +// how to initialize the population +// it IS representation independent if an eoInit is given +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init); + +// the stopping criterion +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval); + +// outputs (stats, population dumps, ...) +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue); + +// evolution engine (selection and replacement) +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op); + +// simple call to the algo. stays there for consistency reasons +// no template for that one +void run_ea(eoAlgo& _ga, eoPop& _pop); + +// checks for help demand, and writes the status file +// and make_help; in libutils - just a declaration, code in libeoutils.a +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +// from here on, no difference with eoOneMax.cpp +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoOneMaxEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/eo/tutorial/Lesson5/eoOneMax.h b/eo/tutorial/Lesson5/eoOneMax.h new file mode 100644 index 000000000..a85bb89f7 --- /dev/null +++ b/eo/tutorial/Lesson5/eoOneMax.h @@ -0,0 +1,111 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ +*/ + +#ifndef _eoOneMax_h +#define _eoOneMax_h + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + + * Note that you MUST derive your structure from EO + * but you MAY use some other already prepared class in the hierarchy + * like eoVector for instance, if you handle a vector of something.... + + * If you create a structure from scratch, + * the only thing you need to provide are + * a default constructor + * IO routines printOn and readFrom + * + * Note that operator<< and operator>> are defined at EO level + * using these routines + */ +template< class FitT> +class eoOneMax: public EO { +public: + /** Ctor: you MUST provide a default ctor. + * though such individuals will generally be processed + * by some eoInit object + */ + eoOneMax() + { + // START Code of default Ctor of an eoOneMax object + // END Code of default Ctor of an eoOneMax object + } + + virtual ~eoOneMax() + { + // START Code of Destructor of an eoEASEAGenome object + // END Code of Destructor of an eoEASEAGenome object + } + + virtual string className() const { return "eoOneMax"; } + + /** printing... */ + void printOn(ostream& _os) const + { + // First write the fitness + EO::printOn(_os); + _os << ' '; + // START Code of default output + + /** HINTS + * in EO we systematically write the sizes of things before the things + * so readFrom is easier to code (see below) + */ + _os << b.size() << ' ' ; + for (unsigned i=0; i::readFrom(_is); + // START Code of input + + /** HINTS + * remember the eoOneMax object will come from the default ctor + * this is why having the sizes written out is useful + */ + unsigned s; + _is >> s; + b.resize(s); + for (unsigned i=0; i> bTmp; + b[i] = bTmp; + } + // END Code of input + } + + // accessing and setting values + void setB(vector & _b) + { + b=_b; + } + const vector & B() + { + return b; + } + +private: // put all data here + // START Private data of an eoOneMax object + std::vector b; + // END Private data of an eoOneMax object +}; + +#endif + diff --git a/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h b/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h new file mode 100644 index 000000000..b7f187462 --- /dev/null +++ b/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h @@ -0,0 +1,68 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for evaluator in EO, a functor that computes the fitness of an EO +========================================================================== +*/ + +#ifndef _eoOneMaxEvalFunc_h +#define _eoOneMaxEvalFunc_h + +// include whatever general include you need +#include +#include + +// include the base definition of eoEvalFunc +#include "eoEvalFunc.h" + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template +class eoOneMaxEvalFunc : public eoEvalFunc +{ +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + eoOneMaxEvalFunc() + // eoOneMaxEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } + + /** Actually compute the fitness + * + * @param EOT & _eo the EO object to evaluate + * it should stay templatized to be usable + * with any fitness type + */ + void operator()(EOT & _eo) + { + // test for invalid to avoid recomputing fitness of unmodified individuals + if (_eo.invalid()) + { + double fit; // to hold fitness value + // START Code of computation of fitness of the eoOneMax object + const vector & b = _eo.B(); + fit = 0; + for (unsigned i=0; i + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * There is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO (e.g. to initialize + * atoms of an eoVector you will need an eoInit) + */ +template +class eoOneMaxInit: public eoInit { +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument +// eoOneMaxInit() + eoOneMaxInit( unsigned _vecSize) : vecSize(_vecSize) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxInit object + // END Code of Ctor of an eoOneMaxInit object + } + + + /** initialize a genotype + * + * @param _genotype generally a genotype that has been default-constructed + * whatever it contains will be lost + */ + void operator()(GenotypeT & _genotype) + { + // START Code of random initialization of an eoOneMax object + vector b(vecSize); + for (unsigned i=0; i + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoOneMaxMutation: public eoMonOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoOneMaxMutation() + // eoOneMaxMutation( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoOneMaxMutation"; } + + /** + * modifies the parent + * @param _genotype The parent genotype (will be modified) + */ + bool operator()(GenotypeT & _genotype) + { + bool isModified; + // START code for mutation of the _genotype object + + /** Requirement + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; + */ + return isModified; + // END code for mutation of the _genotype object + } + +private: +// START Private data of an eoOneMaxMutation object + // varType anyVariable; // for example ... +// END Private data of an eoOneMaxMutation object +}; + +#endif diff --git a/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h b/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h new file mode 100644 index 000000000..1a0c414fc --- /dev/null +++ b/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h @@ -0,0 +1,70 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for simple quadratic crossover operators +================================================= + +Quadratic crossover operators modify the both genotypes +*/ + +#ifndef eoOneMaxQuadCrossover_H +#define eoOneMaxQuadCrossover_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoOneMaxQuadCrossover: public eoQuadOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoOneMaxQuadCrossover() + // eoOneMaxQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoOneMaxQuadCrossover"; } + + /** + * eoQuad crossover - modifies both parents + * @param _genotype1 The first parent + * @param _genotype2 The second parent + */ + bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) + { + bool oneAtLeastIsModified; + // START code for crossover of _genotype1 and _genotype2 objects + + /** Requirement + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; + */ + return oneAtLeastIsModified; + // END code for crossover of _genotype1 and _genotype2 objects + } + +private: +// START Private data of an eoOneMaxQuadCrossover object + // varType anyVariable; // for example ... +// END Private data of an eoOneMaxQuadCrossover object +}; + +#endif diff --git a/eo/tutorial/Lesson5/make_OneMax.cpp b/eo/tutorial/Lesson5/make_OneMax.cpp new file mode 100644 index 000000000..29fa78e6d --- /dev/null +++ b/eo/tutorial/Lesson5/make_OneMax.cpp @@ -0,0 +1,129 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template file that llows separate compilation of +everything that is representation independant (evolution engine and +general output) for an Evolutionary Algorithm with scalar fitness. + +It includes of course the definition of the genotype (eoOneMax.h) and +is written like the make_xxx.cpp files in dirs src/ga (for bitstrings) +and src/es (for real vectors). + +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoOneMax MUST derive from EO for some fitness + */ +#include "eoOneMax.h" + +// create an initializer: this is NOT representation-independent +// and will be done in the main file +// However, should you decide to freeze that part, you could use the +// following (and remove it from the main file, of course!!!) +//------------------------------------------------------------------ +// #include "make_genotype_OneMax.h" +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoOneMax _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoOneMax _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// same thing for the variation operaotrs +//--------------------------------------- +// #include "make_op_OneMax.h" +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// The following modules use ***representation independent*** routines + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + diff --git a/eo/tutorial/Lesson5/make_genotype_OneMax.h b/eo/tutorial/Lesson5/make_genotype_OneMax.h new file mode 100644 index 000000000..52ff9ebf5 --- /dev/null +++ b/eo/tutorial/Lesson5/make_genotype_OneMax.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This fuction does the create an eoInit + * + * It could be here tempatized only on the fitness, as it can be used + * to evolve structures with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ + +template +eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +{ + // read any useful parameter here from the parser + // the param itself will belong to the parser (as far as memory is concerned) + + // paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value(); + + unsigned vecSize = _parser.createParam(unsigned(8), "VecSize", "Size of the bitstrings", 'v',"Representation").value(); + + // Then built the initializer - a pointer, stored in the eoState + eoInit* init = new eoOneMaxInit(vecSize); + // store in state + _state.storeFunctor(init); + // and return a reference + return *init; +} + +#endif diff --git a/eo/tutorial/Lesson5/make_op_OneMax.h b/eo/tutorial/Lesson5/make_op_OneMax.h new file mode 100644 index 000000000..d19c89301 --- /dev/null +++ b/eo/tutorial/Lesson5/make_op_OneMax.h @@ -0,0 +1,210 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_OneMax.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_OneMax_h +#define _make_op_OneMax_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +/** definition of mutation: + * class eoOneMaxMonop MUST derive from eoMonOp + */ +#include "eoOneMaxMutation.h" + +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): + * class eoOneMaxBinCrossover MUST derive from eoBinOp + * OR + * class eoOneMaxQuadCrossover MUST derive from eoQuadOp + */ +// #include "eoOneMaxBinOp.h" +// OR +#include "eoOneMaxQuadCrossover.h" + + // also need the parser and state includes +#include +#include + + +/////////////////// variation operators /////////////// +// canonical (crossover + mutation) only at the moment // + +/* + * This function builds the operators that will be applied to the eoOneMax + * + * It uses a parser (to get user parameters), a state (to store the memory) + * the last parameter is an eoInit: if some operator needs some info + * about the genotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object + * + * As usual, the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to eoOneMax +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + + + ///////////////////////////// + // Variation operators + //////////////////////////// + // read crossover and mutations, combine each in a proportional Op + // and create the eoGenOp that calls crossover at rate pCross + // then mutation with rate pMut + + // the crossovers + ///////////////// + + // here we can have eoQuadOp (2->2) only - no time for the eoBinOp case + + // you can have more than one - combined in a proportional way + + // first, define the crossover objects and read their rates from the parser + + // A first crossover + eoQuadOp *cross = new eoOneMaxQuadCrossover /* (varType _anyVariable) */; + // store in the state + _state.storeFunctor(cross); + + // read its relative rate in the combination + double cross1Rate = _parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // and create the combined operator with this one + eoPropCombinedQuadOp *propXover = + new eoPropCombinedQuadOp(*cross, cross1Rate); + // and of course stor it in the state + _state.storeFunctor(propXover); + + + // Optional: A second(and third, and ...) crossover + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoQuadOp + + /* Uncomment if necessary - and replicate as many time as you need + cross = new eoOneMaxSecondCrossover(varType _anyVariable); + _state.storeFunctor(cross); + double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(*cross, cross2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propXover.add(*cross, crossXXXRate, true); + + + // the mutation: same story + //////////////// + // you can have more than one - combined in a proportional way + + // for each mutation, + // - define the mutator object + // - read its rate from the parser + // - add it to the proportional combination + + // a first mutation + eoMonOp *mut = new eoOneMaxMutation/* (varType _anyVariable) */; + _state.storeFunctor(mut); + // its relative rate in the combination + double mut1Rate = _parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + // and the creation of the combined operator with this one + eoPropCombinedMonOp *propMutation = new eoPropCombinedMonOp(*mut, mut1Rate); + _state.storeFunctor(propMutation); + + // Optional: A second(and third, and ...) mutation with their rates + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoMonOp + + /* Uncomment if necessary - and replicate as many time as you need + mut = new eoOneMaxSecondMutation(varType _anyVariable); + _state.storeFunctor(mut); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propMutation.add(*mut, mutXXXRate, true); + + // end of crossover and mutation definitions + //////////////////////////////////////////// + +// END Modify definitions of objects by eventually add parameters +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// from now on, you do not need to modify anything +// though you CAN add things to the checkpointing (see tutorial) + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // but of course you're free to use any smart combination you could think of + // especially, if you have to use eoBinOp rather than eoQuad Op youůll have + // to modify that part + + // First read the individual level parameters + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // the crossover - with probability pCross + eoProportionalOp * propOp = new eoProportionalOp ; + _state.storeFunctor(propOp); + eoQuadOp *ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + propOp->add(*propXover, pCrossParam.value()); // crossover, with proba pcross + propOp->add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*propOp, 1.0); // always do combined crossover + op->add(*propMutation, pMutParam.value()); // then mutation, with proba pmut + + // that's it - return a reference + return *op; +} +#endif From b407bf5e8194c2ef8c26f1967b0a8e6814148d7c Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 8 May 2002 06:47:50 +0000 Subject: [PATCH 0845/2134] Added the MyStructLibEA.cpp+make_MyStruct.cpp that allow separate compilation of representation-indenepent stuff. Modified create.sh script and Makefile accordingly. See Lesson5 of the tutorial --- eo/tutorial/Templates/Makefile.tmpl | 22 +++- eo/tutorial/Templates/MyStructLibEA.cpp | 162 ++++++++++++++++++++++++ eo/tutorial/Templates/create.sh | 2 + eo/tutorial/Templates/make_MyStruct.cpp | 129 +++++++++++++++++++ 4 files changed, 308 insertions(+), 7 deletions(-) create mode 100644 eo/tutorial/Templates/MyStructLibEA.cpp create mode 100644 eo/tutorial/Templates/make_MyStruct.cpp diff --git a/eo/tutorial/Templates/Makefile.tmpl b/eo/tutorial/Templates/Makefile.tmpl index cfc870722..053c3a99b 100644 --- a/eo/tutorial/Templates/Makefile.tmpl +++ b/eo/tutorial/Templates/Makefile.tmpl @@ -1,12 +1,11 @@ # sample makefile for building an EA evolving a new genotype -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I./util -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -I./util -Wall -g -c $*.cpp # local sources -LOCAL_SOURCES = MyStructEA.cpp \ - eoMyStruct.h \ +COMMON_SOURCES = eoMyStruct.h \ eoMyStructEvalFunc.h \ eoMyStructInit.h \ eoMyStructMutation.h \ @@ -14,7 +13,12 @@ LOCAL_SOURCES = MyStructEA.cpp \ make_genotype_MyStruct.h \ make_op_MyStruct.h +NO_LIB_SOURCES = MyStructEA.cpp +LIB_SOURCES = MyStructLibEA.cpp make_MyStruct.cpp + + +SOURCES = $(COMMON_SOURCES) MyStructEA.cpp MyStructLibEA.cpp make_MyStruct.cpp # START eventually modify the name of EO dir DIR_EO = ../../src @@ -22,11 +26,14 @@ DIR_EO = ../../src LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -ALL = MyStructEA +ALL = MyStructEA MyStructLibEA MyStructEA : MyStructEA.o c++ -g -o $@ MyStructEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm +MyStructLibEA : MyStructLibEA.o make_MyStruct.o + c++ -g -o $@ MyStructLibEA.o make_MyStruct.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile all : $(ALL) @@ -34,5 +41,6 @@ all : $(ALL) clean : ; /bin/rm *.o $(ALL) ########## local dependencies -AppliEA.o : $(LOCAL_SOURCES) - +MyStructEA.o : $(COMMON_SOURCES) MyStructEA.cpp +MyStructLibEA.o : $(COMMON_SOURCES) MyStructLibEA.cpp +make_MyStruct.o : make_MyStruct.cpp eoMyStruct.h diff --git a/eo/tutorial/Templates/MyStructLibEA.cpp b/eo/tutorial/Templates/MyStructLibEA.cpp new file mode 100644 index 000000000..24fed341d --- /dev/null +++ b/eo/tutorial/Templates/MyStructLibEA.cpp @@ -0,0 +1,162 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file for compiling after creating a +"library", i.e. putting everything but the fitness in a separate file +(make_MyStruct.cpp) and compiling it once and for all. +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +// +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +// + +// Then define your EO objects using that fitness type +typedef eoMyStruct Indi; // ***MUST*** derive from EO + +// create an initializer - done here and NOT in make_MyStruct.cpp +// because it is NOT representation independent +#include "make_genotype_MyStruct.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// same thing for the variation operaotrs +#include "make_op_MyStruct.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// The representation independent routines are simply declared here + +// how to initialize the population +// it IS representation independent if an eoInit is given +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init); + +// the stopping criterion +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval); + +// outputs (stats, population dumps, ...) +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue); + +// evolution engine (selection and replacement) +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op); + +// simple call to the algo. stays there for consistency reasons +// no template for that one +void run_ea(eoAlgo& _ga, eoPop& _pop); + +// checks for help demand, and writes the status file +// and make_help; in libutils - just a declaration, code in libeoutils.a +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +// from here on, no difference with eoMyStruct.cpp +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/eo/tutorial/Templates/create.sh b/eo/tutorial/Templates/create.sh index 0a458b556..25aa1bd3d 100755 --- a/eo/tutorial/Templates/create.sh +++ b/eo/tutorial/Templates/create.sh @@ -54,6 +54,8 @@ sed s/MyStruct/$1/g quadCrossover.tmpl > $TargetDir/eo$1QuadCrossover.h sed s/MyStruct/$1/g MyStructEA.cpp > $TargetDir/$1EA.cpp sed s/MyStruct/$1/g make_genotype_MyStruct.h > $TargetDir/make_genotype_$1.h sed s/MyStruct/$1/g make_op_MyStruct.h > $TargetDir/make_op_$1.h +sed s/MyStruct/$1/g make_MyStruct.cpp > $TargetDir/make_$1.cpp +sed s/MyStruct/$1/g MyStructLibEA.cpp > $TargetDir/$1LibEA.cpp sed s/MyStruct/$1/g Makefile.tmpl > $TargetDir/$MakeName echo Done! diff --git a/eo/tutorial/Templates/make_MyStruct.cpp b/eo/tutorial/Templates/make_MyStruct.cpp new file mode 100644 index 000000000..fff16f4a6 --- /dev/null +++ b/eo/tutorial/Templates/make_MyStruct.cpp @@ -0,0 +1,129 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template file that allows separate compilation of +everything that is representation independant (evolution engine and +general output) for an Evolutionary Algorithm with scalar fitness. + +It includes of course the definition of the genotype (eoMyStruct.h) and +is written like the make_xxx.cpp files in dirs src/ga (for bitstrings) +and src/es (for real vectors). + +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +// create an initializer: this is NOT representation-independent +// and will be done in the main file +// However, should you decide to freeze that part, you could use the +// following (and remove it from the main file, of course!!!) +//------------------------------------------------------------------ +// #include "make_genotype_MyStruct.h" +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoMyStruct _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoMyStruct _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// same thing for the variation operaotrs +//--------------------------------------- +// #include "make_op_MyStruct.h" +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// The following modules use ***representation independent*** routines + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + From c5e225551ae397fa715efffd3fe2c3b23ee8a427 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 8 May 2002 06:50:58 +0000 Subject: [PATCH 0846/2134] Adding the Lesson5 - how to create your own genotype --- eo/tutorial/html/OneMaxEA.html | 360 ++++++++++++++++++ eo/tutorial/html/SecondRealEA.html | 2 +- eo/tutorial/html/eoEngine.html | 164 +++++++-- eo/tutorial/html/eoLesson2.html | 10 +- eo/tutorial/html/eoLesson5.html | 388 ++++++++++++++++++++ eo/tutorial/html/eoOneMax.html | 209 +++++++++++ eo/tutorial/html/eoOneMaxEvalFunc.html | 160 ++++++++ eo/tutorial/html/eoOneMaxInit.html | 153 ++++++++ eo/tutorial/html/eoOneMaxMutation.html | 168 +++++++++ eo/tutorial/html/eoOneMaxQuadCrossover.html | 168 +++++++++ eo/tutorial/html/eoOneMax_complete.html | 192 ++++++++++ eo/tutorial/html/eoTopDown.html | 63 ++-- eo/tutorial/html/make_genotype_OneMax.html | 160 ++++++++ eo/tutorial/html/make_op_OneMax.html | 351 ++++++++++++++++++ 14 files changed, 2476 insertions(+), 72 deletions(-) create mode 100644 eo/tutorial/html/OneMaxEA.html create mode 100644 eo/tutorial/html/eoLesson5.html create mode 100644 eo/tutorial/html/eoOneMax.html create mode 100644 eo/tutorial/html/eoOneMaxEvalFunc.html create mode 100644 eo/tutorial/html/eoOneMaxInit.html create mode 100644 eo/tutorial/html/eoOneMaxMutation.html create mode 100644 eo/tutorial/html/eoOneMaxQuadCrossover.html create mode 100644 eo/tutorial/html/eoOneMax_complete.html create mode 100644 eo/tutorial/html/make_genotype_OneMax.html create mode 100644 eo/tutorial/html/make_op_OneMax.html diff --git a/eo/tutorial/html/OneMaxEA.html b/eo/tutorial/html/OneMaxEA.html new file mode 100644 index 000000000..47102a452 --- /dev/null +++ b/eo/tutorial/html/OneMaxEA.html @@ -0,0 +1,360 @@ + + + + + + Templates/OneMaxEA.cpp + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +
    +

    +Templates/OneMaxEA.cpp

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
    + + + + +
    /** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
    The above line is usefulin Emacs-like editors +
    */ +
    /* +
    Template for creating a new representation +in EO +
    ================================================ +
    This is the template main file. +
    It includes all other files that have been +generated by the script create.sh +
    so it is the only file to compile. +
    In case you want to build up a separate library +for your new Evolving Object, +
    you'll need some work - follow what's done +in the src/ga dir, used in the +
    main file BitEA in tutorial/Lesson4 dir. +
    Or you can wait until we do it :-) +
    */ +
    // Miscilaneous include and declaration  +
    #include <iostream> +
    using namespace std; +
    // eo general include +
    #include "eo" +
    // the real bounds (not yet in general eo +include) +
    #include "utils/eoRealVectorBounds.h" +
    // include here whatever specific files for +your representation +
    // Basically, this should include at least +the following +
    /** definition of representation:  +
    * class eoOneMax MUST derive from EO<FitT> +for some fitness +
    */
    + + + + + +
    #include "eoOneMax.h" +
    /** definition of initilizqtion:  +
    * class eoOneMaxInit MUST derive from eoInit<eoOneMax> +
    */
    + + + + + +
    #include "eoOneMaxInit.h" +
    /** definition of evaluation:  +
    * class eoOneMaxEvalFunc MUST derive from +eoEvalFunc<eoOneMax> +
    * and should test for validity before doing +any computation +
    * see tutorial/Templates/evalFunc.tmpl +
    */
    + + + + + +
    #include "eoOneMaxEvalFunc.h" +
    // GENOTYPE    eoOneMax ***MUST*** +be templatized over the fitness
    + + + + + +
    // START fitness type: double or eoMaximizingFitness +if you are maximizing +
    //                                        +eoMinimizingFitness if you are minimizing +
    typedef eoMinimizingFitness MyFitT ; // +type of fitness  +
    // END fitness type
    + + + + + +
    + + + + + +
    // Then define your EO objects using that +fitness type +
    typedef eoOneMax<MyFitT> Indi;           +// ***MUST*** derive from EO 
    + + + + + +
    // create an initializer +
    #include "make_genotype_OneMax.h" +
    eoInit<Indi> & make_genotype(eoParser& +_parser, eoState&_state, Indi _eo) +
    { +
     return do_make_genotype(_parser, +_state, _eo); +
    + + + + + +
    // and the variation operaotrs +
    #include "make_op_OneMax.h" +
    eoGenOp<Indi>&  make_op(eoParser& +_parser, eoState& _state, eoInit<Indi>& _init) +
    { +
     return do_make_op(_parser, _state, +_init); +
    }
    + + + + + +
    // Use existing modules to define representation +independent routines +
    // These are parser-based definitions of +objects +
    // how to initialize the population  +
    // it IS representation independent if an +eoInit is given +
    #include <do/make_pop.h> +
    eoPop<Indi >&  make_pop(eoParser& +_parser, eoState& _state, eoInit<Indi> & _init) +
    { +
     return do_make_pop(_parser, _state, +_init); +
    }
    + + + + + +
    // the stopping criterion +
    #include <do/make_continue.h> +
    eoContinue<Indi>& make_continue(eoParser& +_parser, eoState& _state, eoEvalFuncCounter<Indi> & _eval) +
    { +
     return do_make_continue(_parser, +_state, _eval); +
    }
    + + + + + +
    // outputs (stats, population dumps, ...) +
    #include <do/make_checkpoint.h> +
    eoCheckPoint<Indi>& make_checkpoint(eoParser& +_parser, eoState& _state, eoEvalFuncCounter<Indi>& _eval, eoContinue<Indi>& +_continue)  +
    { +
     return do_make_checkpoint(_parser, +_state, _eval, _continue); +
    }
    + + + + + +
    // evolution engine (selection and replacement) +
    #include <do/make_algo_scalar.h> +
    eoAlgo<Indi>&  make_algo_scalar(eoParser& +_parser, eoState& _state, eoEvalFunc<Indi>& _eval, eoContinue<Indi>& +_continue, eoGenOp<Indi>& _op) +
    { +
     return do_make_algo_scalar(_parser, +_state, _eval, _continue, _op); +
    }
    + + + + + +
    // simple call to the algo. stays there for +consistency reasons  +
    // no template for that one +
    #include <do/make_run.h> +
    // the instanciating fitnesses +
    #include <eoScalarFitness.h> +
    void run_ea(eoAlgo<Indi>& _ga, +eoPop<Indi>& _pop) +
    { +
     do_run(_ga, _pop); +
    } +
    // checks for help demand, and writes the +status file +
    // and make_help; in libutils +
    void make_help(eoParser & _parser); +
    // now use all of the above, + representation +dependent things +
    int main(int argc, char* argv[]) +
    { +
     try +
     { +
     eoParser parser(argc, argv);   +// for user-parameter reading +
     eoState state;       +// keeps all things allocated
    + + + + + +
          // +The fitness +
          ////////////// +
       eoOneMaxEvalFunc<Indi> +plainEval /* (varType  _anyVariable) */;; +
        // turn that object +into an evaluation counter +
       eoEvalFuncCounter<Indi> +eval(plainEval);
    + + + + + +
      // the genotype - through a +genotype initializer +
     eoInit<Indi>& init = make_genotype(parser, +state, Indi());
    + + + + + +
      // Build the variation operator +(any seq/prop construct) +
     eoGenOp<Indi>& op = make_op(parser, +state, init); +
      //// Now the representation-independent +things  +
      // +
      // YOU SHOULD NOT NEED TO MODIFY +ANYTHING BEYOND THIS POINT +
      // unless you want to add specific +statistics to the checkpoint +
      //////////////////////////////////////////////
    + + + + + +
      // initialize the population +
      // yes, this is representation +indepedent once you have an eoInit +
     eoPop<Indi>& pop    += make_pop(parser, state, init);
    + + + + + +
      // stopping criteria +
     eoContinue<Indi> & term = +make_continue(parser, state, eval);
    + + + + + +
      // output +
     eoCheckPoint<Indi> & checkpoint += make_checkpoint(parser, state, eval, term);
    + + + + + +
      // algorithm (need the operator!) +
     eoAlgo<Indi>& ga = make_algo_scalar(parser, +state, eval, checkpoint, op); +
      ///// End of construction of +the algorithm +
      ///////////////////////////////////////// +
      // to be called AFTER all parameters +have been read!!! +
     make_help(parser); +
      //// GO +
      ///////
    + + + + + +
      // evaluate intial population +AFTER help and status in case it takes time +
     apply<Indi>(eval, pop); +
      // if you want to print it +out +
    //    cout << "Initial +Population\n"; +
    //    pop.sortedPrintOn(cout); +
    //    cout << endl;
    + + + + + +
     run_ea(ga, pop); // run the +ga +
     cout << "Final Population\n"; +
     pop.sortedPrintOn(cout); +
     cout << endl; +
     } +
     catch(exception& e) +
     { +
         cout << +e.what() << endl; +
     } +
     return 0; +
    }
    + +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Sat May +4 07:37:41 2002 + + diff --git a/eo/tutorial/html/SecondRealEA.html b/eo/tutorial/html/SecondRealEA.html index 551faec90..7882e7bad 100644 --- a/eo/tutorial/html/SecondRealEA.html +++ b/eo/tutorial/html/SecondRealEA.html @@ -460,7 +460,7 @@ page - Programming hints - Marc Schoenauer +Marc Schoenauer
    Last modified: Sun Apr 28 06:42:44 2002 diff --git a/eo/tutorial/html/eoEngine.html b/eo/tutorial/html/eoEngine.html index d44a90c6f..367c94177 100644 --- a/eo/tutorial/html/eoEngine.html +++ b/eo/tutorial/html/eoEngine.html @@ -12,9 +12,9 @@ hints - Local: Introduction  - Selection - Replacement -- Popular evolution engines - Tournaments -- Merge - Reduce - HowMany -- SurviveAndDie +- General Replacement - Popular +evolution engines - Tournaments - Merge +- Reduce - HowMany - SurviveAndDie

    @@ -314,6 +314,8 @@ the  that uses a deterministic MergeReduce.
     

      +
      +
     

    Note: The basic use (and initial motivation) for eoSurviveAndDie takes 2 arguments, an eoMergeReduce and a number of surviving parents. @@ -350,11 +352,81 @@ above replacement procedures within a very simple and easy-to-monitor Dummy EO class.


    +
    General +Replacement: eoReduceMergeReduce +

    In an attempt to unify all the well-known replacements, plus most of +the less-known-though-often-used, the eoReduceMergeReduce +replacement has been designed, and supersedes all of the above instances. +
    It allows to implement strong elistism +(i.e. some parents survive, whatever their fitness and that of the offspring), +as well as multiple weak elistism (the best parents are put back in the +next population if they outperform the best offspring). +

    Basically, an eoReduceMergeReduce +starts by eventually preserving the (strong) elite parents, proceeds by +reducing both the parent and offspring populations, merges those populations, +and eventually reduces the resulting populations (augmented with the elite +parents) to the right size. Last, the weak elitism is taken care of if +necessary. +
    The following image, taken from the graphical interface of EASEA, somehow +demonstrates the different parameters of an eoReduceMergeReduce. +
    +


    +
    eoReduceMergeReduce: The  +interface +
    Of course the interface is that of eoReplacement. Let's concentrate +on the constructor. +

    The constructor takes 6 arguments: +

      +
    1. +eoHowMany elite determines +the number of parents to be treated as elite (actual behavior determined +by next parameter) using the eoHowMany behavior.
    2. + +
    3. +bool strongElitism tells whether +the elite above corresponds to strong (true) or false(weak) elitism.
    4. + +
      Note: the case of no elitism is +obtained by setting elite to 0 +
    5. +eoHowMany reducedParents gives +the number of parents remaining after reducing them
    6. + +
      Note: 0 means that no parent survive +(except the possible elite), as in eoCommaReplacement +
                  +-1 is used inside eoSSGAReplacements +(one parent is killed to make room for the newborn) +
    7. +eoReduce<EOT> & reduceParents +indicates how the parents will be reduced (see available +instances).
    8. + +
    9. +eoHowMany reducedOffspring gives +the number of offspring remaining after reducing them
    10. + +
      Note: 0 is impossible (no evolution!!!) +
    11. +eoReduce<EOT> & reduceOffspring +indicates how the offspring will be reduced (see available +instances).
    12. + +
    13. +eoReduce<EOT> & reduceFinal +indicates how the merged reduced-parents/reduced-offspring will be reduced +(see available instances).
    14. + +
      Note: the number of individuals +remaining after that reduction is of course the original size of the population.
    +All popular evolution engines use some replacement procedure that can be +viewed as an instance of an eoReduceMergeReduce. +
    Moreover, a parser-based input +of a general  is proposed in file do/make_checkpoint.h. +
    +

    Popular evolution engines -

    This section will be completed soon - in the meantime just trust us -that all of these are already implemented in EO (except maybe some of the -last category :-) !!!!!!

    The most popular evolution engines are listed below, together with the way to use them in EO. If you don't find your particuler algorithm, please send it to us, and we might include it here! In the following, P will denote @@ -372,10 +444,10 @@ a positive scalar fitness, ranking or tournament (stochatic or deterministic) in all cases.
    Replacement: Generational.
    Remark: You could -use also the Comma replacement, with exactly the same result as there are -as many offspring as we need indiviudals in the next population. And using -the eoSSGAWorseReplacement would also give the same result, but would be -very inefficient! +use also the
    eoCommaReplacement, +with exactly the same result as there are as many offspring as we need +indiviudals in the next population. And using the eoSSGAWorseReplacement +would also give the same result, but would be very inefficient!
    You can also add weak elitism to preserve the best individual.

  • @@ -461,7 +533,7 @@ is implemented in the eoDetTournamentSelect< class, a sub-class of eoSelectOne, as well as in the eoDetTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament -in  selectors.h.
  • +in  selectors.h.
  • Stochastic Tournament @@ -471,7 +543,7 @@ parameter R should be in [0.5,1]. It is implemented in the eoStochTournamentTruncate class that repeatidly removes from the population the "winner" of the inverse tournament.  These objects use the C++ function determinitic_tournament -in  selectors.h.
  • +in  selectors.h.
    Note: A stochastic tournament with rate 1.0 is strictly identical to a deterministic tournament of size 2. @@ -592,21 +664,29 @@ as parameter in the constructor (default is 0.75).
    eoHowMany: Choosing a number of individuals

    Many classes in selection/replacement procedures will handle a number -of individuals that may either be fixed or be a fraction of some argument-population +of individuals that may either be fixed or be related to some argument-population size. -
    Of course, it is possible to write two different classes that will -only differ by the way they compute the number of individuals they have -to treat, as it is done for selectors with the two classes eoSelectPerc +
    Of course, it is possible to write different classes that will only +differ by the way they compute the number of individuals they have to treat, +as it is done for selectors with the two classes eoSelectPerc and eoSelectNumber (it could also have been possible to have some pure abstrat class and implement the computation of the number of individuals to treat in some derived classes). -
    However, rather than multiply the number of class, EO has defined a -class that will handle the problem once and for all, the class eoHowMany. -It receives a double, and -a boolean indicating whether -that double is to be treated as a rate -or as an absolute (unisgned) interger. -
    +
    However, the class eoHowMany +allows one to handle in a single class three different behaviors when given +a poopulatio size as argument: +

      +
    • +return a given rate of the argument population size
    • + +
    • +return an absolute (unsigned) integer, whatever the argument population +size
    • + +
    • +return the argument population size minus a given number
    • +
    +

    eoHowMany: interface
    The class interface for its operator() @@ -618,16 +698,34 @@ is as you see there that eoHowMany derives from
    class eoUF<unsigned int, unsigned int>. -

    Its constructor takes 2 argumenrts: -

    -

    eoHowMany(double _rate, bool _interpret_as_rate -= true)

    -so by default the double is indeed interpreted as a rate. -

    It is used in eoSelectMany (which supersedes +

    It has 3 possible constructors, that determine its behavior: +

      +
    • +eoHowMany(double _rate, bool _interpret_as_rate += true) where _rate +is by default the fixed rate of behavior 1 above. However, if the boolean +second argument is false, the rate is transformed into a positive integer, +and is used for behavior 2 above
    • + +
    • +eoHowMany(int _combien): if +_combien +is positive, it is the absolute number of behavior 2 above, and if _combien +is negative, its absolute value is used to decrease the argument population +in behavior 3 above
    • + +
    • +eoHowMany(unsigned int _combien): +_combien +(positive!)  is the absolute number of behavior 2 above. Note +that this constructor is mandatory to avoid ambiguity, as an unsigned int +can be casted to either an int or a double.
    • +
    +It is used in eoSelectMany (which supersedes eoSelectPerc and eoSelectNumber, but they are left there for tutorial reasons!) as well as in many truncation -methods. +methods, and it is used a lot in the eoGeneralReplacement construct.



    Survive and @@ -661,9 +759,9 @@ should be erased from the source.


    Local: Introduction  - Selection - Replacement -- Popular evolution engines - Tournaments -- Merge - Reduce - HowMany -- SurviveAndDie +- General Replacement - Popular +evolution engines - Tournaments - Merge +- Reduce - HowMany - SurviveAndDie


    General: Algorithm-Based diff --git a/eo/tutorial/html/eoLesson2.html b/eo/tutorial/html/eoLesson2.html index 9d270b50c..6b3cf4580 100644 --- a/eo/tutorial/html/eoLesson2.html +++ b/eo/tutorial/html/eoLesson2.html @@ -2,7 +2,7 @@ - + Tutorial: Lesson 2 @@ -69,8 +69,6 @@ object that is a sub-class of the corresponding STL vector class.

     

      -
      -
     

    Note: Also, a non-templatized fitness can be compiled separately (not done here) into an object @@ -88,8 +86,6 @@ requires.
     

      -
      -
     

    Note: In the previous files (Bit - Real) , the last 2 types were deduced from the first (2nd argument = fitness @@ -115,8 +111,6 @@ call to pop.append() function
     

      -
      -
     

    Note: Don't forget to evaluate the population: the eoPop has no idea of the eval function, so it has to be done from outside!!! @@ -130,7 +124,7 @@ mutation operatorsin the same algorithm, choosing among them according to relative -rates. The +weights. The class eoPropCombinedxxxOp, where xxx is either Mon (for mutations, of class eoMonOp) diff --git a/eo/tutorial/html/eoLesson5.html b/eo/tutorial/html/eoLesson5.html new file mode 100644 index 000000000..1bd4b1eca --- /dev/null +++ b/eo/tutorial/html/eoLesson5.html @@ -0,0 +1,388 @@ + + + + + + Tutorial: Lesson 5 + + +Lesson 4 - +Lesson +6 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
    +


    +
    +

    +Tutorial Lesson 5: using your own genotype

    +In this lesson, you will learn how to design and evolve your +own genotype structure. Note that at the moment, only algorithms +involving a scalar fitness (double) are implemented (see test dir for Pareto +optimization of multiple-objective fitness - or be patient :-) +

    The minimum code you'll have to write is first, of course, the code +for the genotype structure. Then, the representation-dependent +code: intialization procedure(s), +variation +operators (quadratic crossover, mutation operator), ... and evaluation +function - and that's it : we have prepared some template files and +the script create.sh that will take care of generating a few other files +to make your application complete. +

    In what follows, we will suppose that you want to evolve some data structure, +and that you have enough programming skills to be able to write C code +for its random initilialization, its crossover, its mutation and the computation +of its fitness. +
    The examples will be described supposing you want to evolve ... bitstings +to solve the OneMax problem (oh no!!!). +

    +


    Using +template files +
    Follow this very simple procedure: +
      +
    • +choose a name for you application - +here OneMax will be used
    • + +
    • +go to the tutorial/Templates +dir
    • + +
             cd +pathWhereEOisInstalled/tutorial/Templates +
    • +run the create.sh script with +argument OneMax and second optional argument  a directory name (suppose +it's called APPLICATION here)
    • + +
                +./create.sh OneMax APPLICATION +
      This will create a directory tutorial/APPLICATION +
    • +Go to the APPLICATION directory
    • + +
                +cd ../APPLICATION +
      You should see the following files: +
          OneMaxEA.cpp           +the main main file, includes all other, to be compiled +
          Makefile               +with default target eoOneMaxEA +
          eoOneMax.h             +class eoOneMax, the genotype +
          eoOneMaxEvalFunc.h     + +class for the computation of fitness +
          eoOneMaxInit.h         +class for genotype initlialization +
          eoOneMaxMutation.h     +class for mutation +
          eoOneMaxQuadCrossover.h +class +for (quadratic) crossover +
          make_genotype_OneMax.h + +helper function that create the initializer +
          make_op_OneMax.h       +helper function that handles the rates of application of +the variation operators
      +    OneMaxLibEA.cpp        +another main file, for separate compilation of representation-independent +stuff +
          make_OneMaxEA.cpp      +the source for the representation-independent stuff +
        +
    • +Compile the whole application
    • + +
               +make +
      and you should have no error there and see a new executable file named +OneMaxEA. +You can run it and ... it will do nothing (what did you expect???).
      +
      +
    • +Now you should go and edit the files. The minimal  changes that you +will need are
    • + +
         in eoOneMax.h               +define your genotype +
         in eoOneMaxInit.h           +define the initialization of one genotype +
         in eoOneMaxMutation.h       + +define the mutation of one genotype +
         in eoOneMaxQuadCrossover.h  + +define the crossover of 2 genotypes
    +Smooth application building: +
      +
    • +After editing a particular file, compile +the whole thing immediately (by running make) and +run the algorithm, to validate your code
    • + +
    • +In each file, start by only adding code between keyword-pairs START +and END
    • +
    +We shall now take a look in turn at the 4 files mentionned above, then +describe rapidly the other files, especially the main files. +
    +
    Genotype +- and its pre-requisites: eoOneMax.h +

    First thing is to write the code for the structure +of the genotype. This is done by filling in the template file +eoOneMax.h. +There are 4 places that you should consider filling in: +

      +
    • +Of course, the data that will build up +the genotype. The convention in EO is to have it at the end of the class +definition, and as private data.
    • + +
    • +The default constructor of an instance. +Note that you must provide a default constructor, +and that no other constructor will be called within EO code. you might +think you need some other constructor to initialize problem-specific data. +This should be rather done in the eoInit object used to randomly initialize +all individuals, or in the eoEvalFunc object, used to compute the fitness.
    • + +
    • +The printOn method, that writes the object +to a stream. You must +call the EO::printOn method that will take care of the fitness, +and then write the specific code for your data structure.
    • + +
    • +The readFrom method, that will read an +object from a stream. Again, you should call the +EO::readFrom method first to take care of the fitness.
    • + +
      Also note that readFrom will be generally called from an object that +will have been constructed through the default constructor. This is why +the EO objects that we provide always start printing structures with their +length...
    +You can of course also add a destructor +if needed, and any other helper method. For instance, you will probably +consider adding accessors and setters +for the private data - unless you prefer to make everything public :-( +
    See now an example of a comple eoOneMax.h +file. Note that this is the only "colored" completed file we will show, +you will have to go to the .../tutorial/OneMax +dir to browse all files at once. +
    +
    Initialization: +

    Initializer: eoOneMaxInit.h +
    You must provide an eoInit +object for your genotype, that is an object that will randomize +a genotype built by the default constructor of the EO class +(here, an eoOneMax object) . Here you must at least fill the +code for such randomization. +
    But you might also need some parameters (e.g. the size of the bitstring +in eoOneMax): you should then pass +them through the constructor of the eoOneMaxInit class, and store +it in its private data. +
    And of course you might need to add a destructor (no example here) +if you use complex data type in the object. +

    Parameters: make_genotype_OneMax.h +
    There is another file you will probably want to modify as far as initialization +is concerned, that is make_genotype_OneMax.h. +Such helper files are used for all components of advanced EO programs (see +Lesson 4). The main reason for that is to allow separate compilation of +such sub-components for known EO types, as this is done in the directories +src/ga and src/es. But a useful consequence is to make your code modular. +For instance, the make_genotype_OneMax.h +file takes care of all the preparation of all data regarding the eoInit +object - and returns to the main fonction a reference to an eoInit that +will later be used to initialize the whole +population in a representation-independent way. +
    What you have to do in that file is to set values for all parameters +needed by the eoOneMaxInit class, for instance by reading them from the +parser: this allows later to modify them easily from the command-line. +Note however that an alternative could be to pass the parser to the constructor +of the eoOneMaxInit class, and to read all parameters there... +
    Note: Remember that the make_xxx +files were first introduced to allow the user to compile sepearately most +of the code of standard Evolutionary Algorithm written in EO for bitstring +and real vector representations ( +
    +


    Evaluation: +eoOneMaxEvalFunc.h +

    The eoOneMaxEvalFunc is +the object that will compute the fitness of an +eoOneMax object. You have to fill in the code +for the computation of the fitness value (there is no way that this +can be done automatically :-) Note that this code must  be run only +if the _eo.invalid() test +returns true, to avoid computing the fitness of an object that has not  +been modified and thus still holds a valid fitness value. After computing +the fitness, store it into the object by calling the fitness(FitnessType) +method. +
    Should you need some specific data for that, the constructor +of the object is the place to get such data, and you should, again, +store it in some private data +of the class. +
    +


    Variation +Operators +
    You can write as many crossover and mutation operators as you like. +However, we only provide the template files for quadratic +crossover and mutation, but +you could then easily write the equivalent code for binary crossover, or +general variation operator. +

    Crossover: eoOneMaxQuadCrossover.h +
    As usual, you must go and write the code +for the operator() that will perform the crossover, possibly modifying +both arguments. Don't forget to update the boolean +parameter that will report whether the genotypes have been modified +- allowing to recompute the fitness only of the ones that have actually +been modified. You can also have parameters +to the crossover by passing +them to the constructor, ans storing them in the private +data of the crossover object. +

    Mutation: eoOneMaxMutation.h +
    Here again, you must go and write the code for the operator() that +will perform the mutation, eventually modifying its arguments. Don't forget +to update the boolean parameter that +will report whether the genotype has been modified - allowing to recompute +the fitness only of the ones that have actually been modified. You can +also have parameters to the mutation +by passing them to the constructor, +ans storing them in the private data +of the mutation object. +

    Parameters: make_op_OneMax.h +
    First of all, if you intend to use only one +crossover operator and one mutation +operator, you have nothing to modify +in make_op_OneMax function, except maybe +reading user-defined parameters (copy the code from make_genotype_OneMax) +and passing them to the appropriate +operator constructor. +
    As it is written now, it allows you enter a crossover probability Pcross +and a mutation probability Pmut, +and to build an eoGeneralOp that will call in sequence the eoOneMaxQuadCrossover +that is defined above with probability Pcross +and the eoOneMaxMutation also +defined above with probability Pmut.  +Beware that all allocated objects must be stored in the eoState otherwise +you will run into trouble (see EO Memory +Management explanations). +

    However, everything is there (commented out) to allow you to use more +than one crossover and one mutation +- provided you write the code for them , of course. +

    The code starts by defining an eoOneMaxQuadCrossoverobject, +then reads some application rate that is totally useless if you have only +one crossover, then creates an eoPropCombinedQuadOp +with this simple oeprator. The same story repeats for the mutation. Finally, +the eoGeneralOp +is created from those combined operators and the individulal level probabilities +Pcross +and  Pmut. +

    In order to add a second crossover operator for instance (called eoOneMaxSecondCrossover +in the commented code) all you need to is +

      +
    • +Create the code for the new class  eoOneMaxSecondCrossover: +simply copy the eoOneMaxQuadCrossover.h +file into eoOneMaxSecondCrossover.h  +and change all names eoOneMaxQuadCrossover +to  eoOneMaxSecondCrossover (inlcluding +after the #ifdef statement!!!);
    • + +
    • +Uncomment the corresponding lines +in make_op_OneMax.h, possibly adding user-defined parameter reading
    • + +
    • +Repeat as many times as you have operators, using of course different names! +The same recommendations hold for mutations.
    • +
    +In case you have more than one operator of a kind, then of course the relative +weights of application do make sense, allowing you to tune with command-line +parameters the proportion with which each operator that will be applied. +

    +


    Main +files: OneMaxEA.cpp +and OneMaxLibEA.cpp +

    As a start, you should only (eventually) modify in OneMaxEA.cpp +the type of fitness you +will be handling, namely double +if you are maximizing, or eoMinimizingFitness +if you are minimizing. Then running +make will result in a perfectly +valid executable named OneMaxEA. +

    The skeleton of the main file here mimics that of the main file in +Lesson4, +and uses the make_xxx separate +files construct: the part of an Evolutionary Algorithm related to the +evolution +engine is indepenent of the representation, +and can be directly used ... provided it is compiled with the right template +(remember everything in EO is templatized +over the EO objects it handles.  Main file OneMaxEA.cpp +is written so that it includes eveything - and thus everytime you run make +(or make OneMaxEA), you compile +the code for make_pop, make_continue and make_checkpoint that is defined +in the .../src/do directory. +

    The basic construct is (for instance to build the evolution engine) +
      + + + + +
    #include <do/make_algo_scalar.h> +
    eoAlgo<Indi>&  make_algo_scalar(eoParser& +_parser, eoState& _state, eoEvalFunc<Indi>& _eval, eoContinue<Indi>& +_continue, eoGenOp<Indi>& _op) +
    { +
     return do_make_algo_scalar(_parser, +_state, _eval, _continue, _op); +
    }
    +First, include the code (from the do directory). Then define the make_xxx +function from the do_make_xxx function. +
    Of course, such construct is stupid here, as you could perfectly call +directly the do_make_xxx function in the main. However, if you ever want +to do separate compilation of some parts, you will need such construct +(see Lesson4) so we have kept it here for +consistency reasons. +

    Go in your application directory, and look at the differences between +both files and you'll see how this is handled in both cases. +

    Reducing compilation time: +
    However, we also provide another main file (OneMaxLibEA.cpp)that +only includes the code that is specific to your application, and is supposed +to be linked with another object file that will contain the code that is +representation independent (make_OneMax.cpp).  +This is done by running make OneMaxLibEA +on the command-line. +
    For example, on a PentiumIII 400MHz with g++ 2.96, compiling OneMaxEA +takes about 33s, compiling both make_OneMax.o +and OneMaxLibEA takes about +54s but compiling only OneMaxLibEA +takes only 14s  make_OneMax.o +is up-to-date ... +

    Hints: +
    While developping the genotype structure itself in file eoOneMax.h, +you should use the OneMaxEA.cpp +file. But after the eoOneMax.h +file is frozen, you should use the eoOneMaxLibEA.cpp +file. Of course, both  resulting programs are strictly identical! +

    +


    Lesson +4 - +Lesson 6 - +Main +page - +Algorithm-Based - Component-Based +- Hints - EO +documentation +
    +
    +
    +Marc Schoenauer
    + + + diff --git a/eo/tutorial/html/eoOneMax.html b/eo/tutorial/html/eoOneMax.html new file mode 100644 index 000000000..8f8cfb03e --- /dev/null +++ b/eo/tutorial/html/eoOneMax.html @@ -0,0 +1,209 @@ + + + + + + Templates/eoOneMax.h + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +
    +

    +Templates/eoOneMax.h

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
    + + + + +
    /** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
    The above line is usefulin Emacs-like editors +
    */ +
    /* +
    Template for creating a new representation +in EO +
    ================================================ +
    */ +
    #ifndef _eoOneMax_h +
    #define _eoOneMax_h +
    /**  +
    *  Always write a comment in this format +before class definition +
    *  if you want the class to be documented +by Doxygen +
    * Note that you MUST derive your structure +from EO<fitT> +
    * but you MAY use some other already prepared +class in the hierarchy +
    * like eoVector for instance, if you handle +a vector of something.... +
    * If you create a structure from scratch, +
    * the only thing you need to provide are  +
    *              +a default constructor +
    *              +IO routines printOn and readFrom +
    * +
    * Note that operator<< and operator>> +are defined at EO level +
    * using these routines +
    */
    + + + + + +
    template< class FitT> +
    class eoOneMax: public EO<FitT> { +
    public: +
      /** Ctor: you MUST provide +a default ctor. +
       * though such individuals will +generally be processed  +
       * by some eoInit object +
       */ +
     eoOneMax()  +
     { 
    + + + + + +
          +// START Code of default Ctor of an eoOneMax object +
          // +END    Code of default Ctor of an eoOneMax object
    + + + + + +
     } +

     virtual ~eoOneMax() +
     {

    + + + + + +
          +// START Code of Destructor of an eoEASEAGenome object +
          // +END    Code of Destructor of an eoEASEAGenome object
    + + + + + +
     } +

     virtual string className() const +{ return "eoOneMax"; } +
     

    + + + + + +
      /** printing... */ +
     void printOn(ostream& os) const +
     { +
          // +First write the fitness +
         EO<FitT>::printOn(os); +
         os << ' +';
    + + + + + +
          +// START Code of default output  +

    /** HINTS +
    * in EO we systematically write the sizes +of things before the things +
    * so readFrom is easier to code (see below) +
    */ +

          // END    +Code of default output

    + + + + + +
         } +

      /** reading...  +
       * of course, your readFrom must +be able to read what printOn writes!!! +
       */ +
     void readFrom(istream& is) +
     { +
          // +of course you should read the fitness first! +
         EO<FitT>::readFrom(is);

    + + + + + +
          +// START Code of input +

    /** HINTS +
    * remember the eoOneMax object will come +from the default ctor +
    * this is why having the sizes written out +is useful +
    */ +

          // END    +Code of input

    + + + + + +
     } +
     
    + + + + + +
    private:     // +put all data here
    + + + + + +
          // +START Private data of an eoOneMax object +
          // +END    Private data of an eoOneMax object
    + + + + + +
    }; +

    #endif

    + +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Fri May +3 06:06:09 2002 + + diff --git a/eo/tutorial/html/eoOneMaxEvalFunc.html b/eo/tutorial/html/eoOneMaxEvalFunc.html new file mode 100644 index 000000000..4d6eefbff --- /dev/null +++ b/eo/tutorial/html/eoOneMaxEvalFunc.html @@ -0,0 +1,160 @@ + + + + + + Templates/eoOneMaxEvalFunc.h + + +Back to Lesson 5 +- Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
    +
    +
    +

    +Templates/eoOneMaxEvalFunc.h

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
    + + + + +
    /** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +

    The above line is usefulin Emacs-like editors +
    */ +

    /* +
    Template for evaluator in EO, a functor that +computes the fitness of an EO +
    ========================================================================== +
    */ +

    #ifndef _eoOneMaxEvalFunc_h +
    #define _eoOneMaxEvalFunc_h +

    // include whatever general include you need +
    #include <stdexcept> +
    #include <fstream> +

    // include the base definition of eoEvalFunc +
    #include "eoEvalFunc.h" +

    /**  +
     Always write a comment in this format +before class definition +
     if you want the class to be documented +by Doxygen +
    */

    + + + + + +
    template <class EOT> +
    class eoOneMaxEvalFunc : public eoEvalFunc<EOT> +
    { +
    public: +
    /// Ctor - no requirement
    + + + + + +
    // START eventually +add or modify the anyVariable argument +
     eoOneMaxEvalFunc() +
      //  eoOneMaxEvalFunc( +varType  _anyVariable) : anyVariable(_anyVariable)  +
    // END eventually add or modify the anyVariable +argument
    + + + + + +
     {
    + + + + + +
          // +START Code of Ctor of an eoOneMaxEvalFunc object +
          // +END    Code of Ctor of an eoOneMaxEvalFunc object
    + + + + + +
     } +

      /** Actually compute the fitness +
       * +
       * @param EOT & _eo the EO +object to evaluate +
       *                                  +it should stay templatized to be usable  +
       *                                  +with any fitness type +
       */ +
     void operator()(EOT & _eo) +
     { +
          // +test for invalid to avoid recomputing fitness of unmodified individuals +
         if (_eo.invalid()) +
             +{ +
    double fit;     +// to hold fitness value

    + + + + + +
          +// START Code of computation of fitness of the eoOneMax object +
    // fit = blablabla +
          // +END    Code of computation of fitness of the eoOneMax object
    + + + + + +
    _eo.fitness(fit); +
             +} +
     } +

    private:

    + + + + + +
    // START Private data +of an eoOneMaxEvalFunc object +
      //  varType anyVariable;    +// for example ... +
    // END    Private data of +an eoOneMaxEvalFunc object
    + + + + + +
    }; +
    #endif
    + +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Fri May +3 06:14:25 2002 + + diff --git a/eo/tutorial/html/eoOneMaxInit.html b/eo/tutorial/html/eoOneMaxInit.html new file mode 100644 index 000000000..07475be6f --- /dev/null +++ b/eo/tutorial/html/eoOneMaxInit.html @@ -0,0 +1,153 @@ + + + + + + Templates/eoOneMaxInit.h + + +Back to Lesson 5 - +Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
    +
    +
    +

    +Templates/eoOneMaxInit.h

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
    + + + + +
    /** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
    The above line is usefulin Emacs-like editors +
    */ +

    /* +
    Template for EO objects initialization in +EO +
    ============================================ +
    */ +

    #ifndef _eoOneMaxInit_h +
    #define _eoOneMaxInit_h +

    // include the base definition of eoInit +
    #include <eoInit.h> +

    /**  +
    *  Always write a comment in this format +before class definition +
    *  if you want the class to be documented +by Doxygen +
    * +
    * There is NO ASSUMPTION on the class GenoypeT. +
    * In particular, it does not need to derive +from EO (e.g. to initialize  +
    *      atoms of +an eoVector you will need an eoInit<AtomType>) +
    */

    + + + + + +
    template <class GenotypeT> +
    class eoOneMaxInit: public eoInit<GenotypeT> +{ +
    public: +
    /// Ctor - no requirement
    + + + + + +
    // START eventually +add or modify the anyVariable argument +
     eoOneMaxInit() +
      //  eoOneMaxInit( varType  +_anyVariable) : anyVariable(_anyVariable)  +
    // END eventually add or modify the anyVariable +argument
    + + + + + +
     {
    + + + + + +
          // +START Code of Ctor of an eoOneMaxInit object +
          // +END    Code of Ctor of an eoOneMaxInit object
    + + + + + +
     } +

      /** initialize a genotype +
       * +
       * @param _genotype  generally +a genotype that has been default-constructed +
       *                                    +whatever it contains will be lost +
       */ +
     void operator()(GenotypeT & +_genotype) +
     {

    + + + + + +
          +// START Code of random initialization of an eoOneMax object +
          // +END    Code of random initialization of an eoOneMax object
    + + + + + +
         _genotype.invalidate();     +// IMPORTANT in case the _genotype is old +
     } +

    private:

    + + + + + +
    // START Private data +of an eoOneMaxInit object +
      //  varType anyVariable;    +// for example ... +
    // END    Private data of +an eoOneMaxInit object
    + + + + + +
    }; +

    #endif

    + +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Fri May +3 06:17:21 2002 + + diff --git a/eo/tutorial/html/eoOneMaxMutation.html b/eo/tutorial/html/eoOneMaxMutation.html new file mode 100644 index 000000000..5181567ff --- /dev/null +++ b/eo/tutorial/html/eoOneMaxMutation.html @@ -0,0 +1,168 @@ + + + + + + eoOneMaxMutation.h + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +
    +

    +eoOneMaxMutation.h

    +The places where you have to put some code are on pink background. +Only the the character colors have the usual meaning. +
      + + + + + +
    +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
    +The above line is useful in Emacs-like editors
    + */
    +/*
    +Template for simple mutation operators
    +======================================
    +*/
    +#ifndef eoOneMaxMutation_H
    +#define eoOneMaxMutation_H
    +#include <eoOp.h>
    +/**
    + *  Always write a comment in this format before class definition
    + *  if you want the class to be documented by Doxygen
    + *
    + * THere is NO ASSUMPTION on the class GenoypeT.
    + * In particular, it does not need to derive from EO
    + */
    +
    +
    + + + + +
    + +template<class GenotypeT>
    +class eoOneMaxMutation: public eoMonOp<GenotypeT>
    +{
    +public:
    +  /**
    +    * Ctor - no requirement
    +    */
    +
    +
    + + + + +
    + +// START eventually add or modify the anyVariable argument
    +  eoOneMaxMutation()
    +  //  eoOneMaxMutation( varType  _anyVariable) : anyVariable(_anyVariable)
    +// END eventually add or modify the anyVariable argument
    +
    +
    + + + + +
    + +  {
    +
    +
    + + + + +
    + +      // START Code of Ctor of an eoOneMaxEvalFunc object
    +      // END    Code of Ctor of an eoOneMaxEvalFunc object
    +
    +
    + + + + +
    + +  }
    +  /// The class name. Used to display statistics
    +  string className() const { return "eoOneMaxMutation"; }
    +  /**
    +    * modifies the parent
    +    * @param _genotype The parent genotype (will be modified)
    +    */
    +  bool operator()(GenotypeT & _genotype)
    +  {
    +      bool isModified;
    +
    +
    + + + + +
    + +      // START code for mutation of the _genotype object
    +            /** Requirement
    +* if (_genotype has been modified)
    +*        isModified = true;
    +* else
    +*        isModified = false;
    +*/
    +      return isModified;
    +      // END code for mutation of the _genotype object
    +
    +
    + + + + +
    + +  }
    +private:
    +
    +
    + + + + +
    + +// START Private data of an eoOneMaxMutation object
    +  //  varType anyVariable;    // for example ...
    +// END    Private data of an eoOneMaxMutation object
    +
    +
    + + + + +
    + +};
    +#endif
    +
    +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    +
    Last +modified: Wed May 1 07:18:00 2002 + + + diff --git a/eo/tutorial/html/eoOneMaxQuadCrossover.html b/eo/tutorial/html/eoOneMaxQuadCrossover.html new file mode 100644 index 000000000..a91a653ea --- /dev/null +++ b/eo/tutorial/html/eoOneMaxQuadCrossover.html @@ -0,0 +1,168 @@ + + + + + + Templates/eoOneMaxQuadCrossover.h + + +Back to Lesson +5 - Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
    +
    +
    +

    +Templates/eoOneMaxQuadCrossover.h

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
    + + + + +
    /** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
    The above line is usefulin Emacs-like editors +
    */ +
    /* +
    Template for simple quadratic crossover operators +
    ================================================= +
    Quadratic crossover operators modify the +both genotypes +
    */ +

    #ifndef eoOneMaxQuadCrossover_H +
    #define eoOneMaxQuadCrossover_H +

    #include <eoOp.h> +

    /**  +
    *  Always write a comment in this format +before class definition +
    *  if you want the class to be documented +by Doxygen +
    * +
    * THere is NO ASSUMPTION on the class GenoypeT. +
    * In particular, it does not need to derive +from EO +
    */

    + + + + + +
    template<class GenotypeT>  +
    class eoOneMaxQuadCrossover: public eoQuadOp<GenotypeT> +
    { +
    public: +
      /** +
       * Ctor - no requirement +
       */
    + + + + + +
    // START eventually +add or modify the anyVariable argument +
     eoOneMaxQuadCrossover() +
      //  eoOneMaxQuadCrossover( +varType  _anyVariable) : anyVariable(_anyVariable)  +
    // END eventually add or modify the anyVariable +argument
    + + + + + +
     {
    + + + + + +
          // +START Code of Ctor of an eoOneMaxEvalFunc object +
          // +END    Code of Ctor of an eoOneMaxEvalFunc object
    + + + + + +
     } +

      /// The class name. Used to +display statistics +
     string className() const { return +"eoOneMaxQuadCrossover"; } +

      /** +
       * eoQuad crossover - modifies +both parents +
       * @param _genotype1 The first +parent +
       * @param _genotype2 The second +parent +
       */ +
     bool operator()(GenotypeT& _genotype1, +GenotypeT & _genotype2)  +
     { +
         bool oneAtLeastIsModified;

    + + + + + +
          +// START code for crossover of _genotype1 and _genotype2 objects +
                +/** Requirement +
    * if (at least one genotype has been modified) +// no way to distinguish +
    *        +oneAtLeastIsModified = true; +
    * else +
    *        +oneAtLeastIsModified = false; +
    */ +
         return oneAtLeastIsModified; +
          // +END code for crossover of _genotype1 and _genotype2 objects
    + + + + + +
     } +

    private:

    + + + + + +
    // START Private data +of an eoOneMaxQuadCrossover object +
      //  varType anyVariable;    +// for example ... +
    // END    Private data of +an eoOneMaxQuadCrossover object
    + + + + + +
    }; +

    #endif

    + +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Fri May +3 07:47:13 2002 + + diff --git a/eo/tutorial/html/eoOneMax_complete.html b/eo/tutorial/html/eoOneMax_complete.html new file mode 100644 index 000000000..0c6c24680 --- /dev/null +++ b/eo/tutorial/html/eoOneMax_complete.html @@ -0,0 +1,192 @@ + + + + + + Templates/eoOneMax_complete.h + + +Back to Lesson 5 +- Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
    +
    +
    +

    +Templates/eoOneMax_complete.h

    +The user-defined code is on pink background.. +Only the the character colors have the +usual meaning. +

    + + + + +
    /** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
    The above line is usefulin Emacs-like editors +
    */ +

    /* +
    Template for creating a new representation +in EO +
    ================================================ +
    */ +

    #ifndef _eoOneMax_h +
    #define _eoOneMax_h +
     

    + + + + + +
    /**  +
    * A simple example class for bitstring (is +NOT supposed to be used :-) +
    */
    + + + + + +
    + + + + + +
    template< class FitT> +
    class eoOneMax: public EO<FitT> { +
    public: +
      /** Deafult Ctor: nothing to +be done */ +
     eoOneMax() {} +

     virtual string className() const +{ return "eoOneMax"; } +
     

    + + + + + +
      /** printing... */ +
         void printOn(ostream& +_os) const +
         { +
              +// First write the fitness +
             +EO<FitT>::printOn(_os); +
             +_os << ' ';
    + + + + + +
             +_os << b.size() << ' ' ; +
             +for (unsigned i=0; i<b.size(); i++) +
                 +_os << b[i] << ' ' ;
    + + + + + +
         } +

      /** reading...  +
       * of course, your readFrom must +be able to read what printOn writes!!! +
       */ +
     void readFrom(istream& _is) +
     { +
          // +of course you should read the fitness first! +
         EO<FitT>::readFrom(_is);

    + + + + + +
         unsigned s; +
         _is >> s; +
         b.resize(s); +
         for (unsigned +i=0; i<s; i++) +
             +{ +
                 +bool bTmp; +
                 +_is >> bTmp; +
                 +b[i] = bTmp; +
             +} 
    + + + + + +
     }
    + + + + + +
    + + + + + +
      // brute setting (we could +also have defined a Ctor from a vector<bool>) +
     void setB(vector<bool> & +_b) +
     { +
         b=_b; +
     } +

      // brute accessing (we could +also define operator[] ...) +
     const vector<bool> & B() +
     { +
         return b; +
     }

    + + + + + +
    +
    private:     // +put all data here
    + + + + + +
     std::vector<bool> b;
    + + + + + +
    }; +

    #endif

    + +


    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Sat May +4 06:02:46 2002 + + diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 0334f90a9..2e9d355bb 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -2,7 +2,7 @@ - + EO - The Algorithm-Based approach @@ -26,9 +26,9 @@ of "lessons" for you.
  • Lesson 1 - a gentle introduction to the EO way: your first steps into EO representations -using a simple generational GA. Please, spend -the necessary time on that one, since all basic constructs -presented there are used throughout EO.
  • +using a simple generational GA. Please, spend +the necessary time on that one, since all basic constructs presented +there are used throughout EO.
  • Lesson 2 - encapsulate, @@ -48,48 +48,51 @@ populations, ...).
  • -Lesson 4 - The same algorithms - again! - but now fully operational: -every component of the algorithm can be defined -on the command-line, except the type of genotype; -moreover, you now have a full library, i.e. everything except your fitness function is -already compiled. -
  • +Lesson 4 - The same algorithms - again! - +but now fully operational: every component +of the algorithm can be defined on the command-line, +except the type of genotype; moreover, you now have a full library, i.e. +everything except your fitness function is already +compiled. -


    Current version (May. 5, 2001) stops here, but ... +

  • +Lesson 5 (new) +- Use your own representation. Thanks +to template files and a little script in Unix, +or the Application template in MSVC++, you +can easily define a new genotype and run an Evolutionary Algorithm that +will intantly benefit from the power of all EO +Evolution Engines (including easy user-parameter +input presented in Lesson 4). You simply need to gradually fill +in the shell-files that the script will generate for you.
  • + +
    Current version (May. 5, 2002) stops here, but ...

    From there on, you don't need to follow the lesson order any more: you can go directly to any lesson and experiment. Of course, you will need to bring together the different pieces to write exactly what you want - but only because we had no idea of what you exactly want :-) -
      - +

    • -Lesson 4 - More general operators: -e.g. binary, n-ary, or even specific mate selection (your brain and my -beauty)! Add your own to the basic algorithm using the template files.
    • - -
    • -Lesson 5 - More about checkpointing: +Lesson 6 (forthcoming) - More about checkpointing: write your first adaptive mechanism, and find out how easy it is to update and monitor dynamic parameters
    • -Lesson 6 - Why not go parallel? From -the simple asynchronous SSGA to the more sophisticated island model (no -totally distributed population yet).
    • +Lesson 7 - More general operators: +e.g. binary, n-ary, or even specific mate selection (your brain and my +beauty)! Add your own to the basic algorithm using the template files.
    • -Lesson 7 - Use your own representation. -You need only to write the base individual class, the initilization class -and the variation operators. EO provides many helps: The eoExternal -paradigm let you encapsulate into EO classes existing code. And the eoFixedLength -and eoVariableLength super classes -allow quick definition of new genotypes that handle identical Atoms.
    • +Lesson 7 - Use predefined generic representations. +The eoFixedLength and eoVariableLength +super classes allow quick definition of new genotypes that handle identical +Atoms, together with generic variation operators.
    Of course, in each lesson, you have links to the corresponding Component-Based -page. ( ... Well, to tell you the truth, as of today, Jan. 5, 2001, this -is not exactly true :-) +page. ( ... Well, to tell you the truth, as of today, this is not exactly +true :-)


    Tutorial main page - Algorithm-Based diff --git a/eo/tutorial/html/make_genotype_OneMax.html b/eo/tutorial/html/make_genotype_OneMax.html new file mode 100644 index 000000000..3920e5548 --- /dev/null +++ b/eo/tutorial/html/make_genotype_OneMax.html @@ -0,0 +1,160 @@ + + + + + + Templates/make_genotype_OneMax.h + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +
    +

    +Templates/make_genotype_OneMax.h

    +The places where you have to put some code are on pink +background.. +Only the the character colors have the usual meaning. +
      + + + + + +
    + +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
    + +//-----------------------------------------------------------------------------
    + +// make_genotype.h
    + +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001
    + +/*
    +      This library is free software; you can redistribute it and/or
    +      modify it under the terms of the GNU Lesser General Public
    +      License as published by the Free Software Foundation; either
    +      version 2 of the License, or (at your option) any later version.
    +      This library is distributed in the hope that it will be useful,
    +      but WITHOUT ANY WARRANTY; without even the implied warranty of
    +      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +      Lesser General Public License for more details.
    +      You should have received a copy of the GNU Lesser General Public
    +      License along with this library; if not, write to the Free Software
    +      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +      Contact: todos@geneura.ugr.es, http://geneura.ugr.es
    +                        Marc.Schoenauer@inria.fr
    +                        mkeijzer@dhi.dk
    + */
    + +//-----------------------------------------------------------------------------
    +#ifndef _make_genotype_h
    +#define _make_genotype_h
    +#include <eoOneMax.h>
    +#include <eoOneMaxInit.h>
    +   +// also need the parser and param includes
    +#include <utils/eoParser.h>
    +#include <utils/eoState.h>
    + +/*
    + * This fuction does the create an eoInit<eoOneMax>
    + *
    + * It could be here tempatized only on the fitness, as it can be used
    + * to evolve structures with any fitness.
    + * However, for consistency reasons, it was finally chosen, as in
    + * the rest of EO, to templatize by the full EOT, as this eventually
    + * allows to choose the type of genotype at run time (see in es dir)
    + *
    + * It returns an eoInit<EOT> that can later be used to initialize
    + * the population (see make_pop.h).
    + *
    + * It uses a parser (to get user parameters) and a state (to store the memory)
    + * the last argument is to disambiguate the call upon different instanciations.
    + *
    + * WARNING: that last argument will generally be the result of calling
    + *                  the default ctor of EOT, resulting in most cases in an EOT
    + *                  that is ***not properly initialized***
    +*/
    +
    +
    + + + + +
    + +template <class EOT>
    +eoInit<EOT> & do_make_genotype(eoParser& _parser, eoState& _state, EOT)
    +{
    +
    +
    + + + + +
    + +   +// read any useful parameter here from the parser
    +   +// the param itself will belong to the parser (as far as memory is concerned)
    +   +//      paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value();
    +
    +
    + + + + +
    + +   +// Then built the initializer - a pointer, stored in the eoState
    +  eoInit<EOT>* init = new eoOneMaxInit<EOT> +/* ( param ) */ ; ;
    +
    +
    + + + + +
    + +   +// Eventually by passing the parameters you need
    +  //  eoInit<EOT>* init = new eoOneMaxInit<EOT> +/* ( param ) */ ; ;
    +
    +
    + + + + +
    + +   +// store in state
    +  _state.storeFunctor(init);
    +   +// and return a reference
    +  return *init;
    +}
    +#endif
    +
    +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    +
    Last +modified: Fri May 3 07:10:52 2002 + + + diff --git a/eo/tutorial/html/make_op_OneMax.html b/eo/tutorial/html/make_op_OneMax.html new file mode 100644 index 000000000..a108fb14f --- /dev/null +++ b/eo/tutorial/html/make_op_OneMax.html @@ -0,0 +1,351 @@ + + + + + + Templates/make_op_OneMax.h + + +Back to Lesson 5 +- Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
    +
    +
    +

    +Templates/make_op_OneMax.h

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +

    + + + + +
    // -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +

    //----------------------------------------------------------------------------- +
    // make_op_OneMax.h +
    // (c) Marc Schoenauer, Maarten Keijzer and +GeNeura Team, 2001 +
    /*  +
         This library is +free software; you can redistribute it and/or +
         modify it under +the terms of the GNU Lesser General Public +
         License as published +by the Free Software Foundation; either +
         version 2 of the +License, or (at your option) any later version. +
         This library is +distributed in the hope that it will be useful, +
         but WITHOUT ANY +WARRANTY; without even the implied warranty of +
         MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +
         Lesser General Public +License for more details. +
         You should have +received a copy of the GNU Lesser General Public +
         License along with +this library; if not, write to the Free Software +
         Foundation, Inc., +59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +
         Contact: todos@geneura.ugr.es, +http://geneura.ugr.es +
                           +Marc.Schoenauer@inria.fr +
                           +mkeijzer@dhi.dk +
    */ +
    //----------------------------------------------------------------------------- +

    #ifndef _make_op_OneMax_h +
    #define _make_op_OneMax_h +

    // the operators +
    #include <eoOp.h> +
    #include <eoGenOp.h> +
    #include <eoCloneOps.h> +
    #include <eoOpContainer.h> +
    // combinations of simple eoOps (eoMonOp +and eoQuadOp) +
    #include <eoProportionalCombinedOp.h> +

    /** definition of mutation:  +
    * class eoOneMaxMonop MUST derive from eoMonOp<eoOneMax> +
    */ +
    #include "eoOneMaxMutation.h" +

    /** definition of crossover (either as eoBinOp +(2->1) or eoQuadOp (2->2):  +
    * class eoOneMaxBinCrossover MUST derive +from eoBinOp<eoOneMax> +
    * OR  +
    * class eoOneMaxQuadCrossover MUST derive +from eoQuadOp<eoOneMax> +
    */ +
    // #include "eoOneMaxBinOp.h" +
    // OR +
    #include "eoOneMaxQuadCrossover.h" +

      // also need the parser and +state includes +
    #include <utils/eoParser.h> +
    #include <utils/eoState.h> +

    /////////////////// variation operators /////////////// +
    // canonical (crossover + mutation) only +at the moment // +

    /* +
    * This function builds the operators that +will be applied to the eoOneMax +
    * +
    * It uses a parser (to get user parameters), +a state (to store the memory) +
    *      the last +parameter is an eoInit: if some operator needs some info  +
    *      about the +genotypes, the init has it all (e.g. bounds, ...) +
    *      Simply do  +
    *              +EOT myEO; +
    *              +_init(myEO); +
    *      and myEO +is then an ACTUAL object +
    * +
    * As usual, the template is the complete +EOT even though only the fitness +
    * is actually templatized here: the following +only applies to eoOneMax +
    */

    + + + + + +
    template <class EOT> +
    eoGenOp<EOT> & do_make_op(eoParameterLoader& +_parser, eoState& _state, eoInit<EOT>& _init) +
    { +
      // this is a temporary version, +while Maarten codes the full tree-structured +
      // general operator input +
      // BTW we must leave that simple +version available somehow, as it is the one +
      // that 90% people use! +

          ///////////////////////////// +
          // +Variation operators +
          //////////////////////////// +
          // +read crossover and mutations, combine each in a proportional Op +
          // +and create the eoGenOp that calls crossover at rate pCross  +
          // +then mutation with rate pMut +

          // the +crossovers +
          ///////////////// +

          // here +we can have eoQuadOp (2->2) only - no time for the eoBinOp case +

          // you +can have more than one - combined in a proportional way +

          // first, +define the crossover objects and read their rates from the parser +

          // A +first crossover  +
         +eoQuadOp<Indi> *cross = new eoOneMaxQuadCrossover<Indi> /* (varType  +_anyVariable) */; +
          // +store in the state +
         _state.storeFunctor(cross); +

      // read its relative rate in +the combination +
         double cross1Rate += _parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", +'1', "Variation Operators").value(); +

      // and create the combined operator +with this one +
     eoPropCombinedQuadOp<Indi> *propXover +=  +
         new eoPropCombinedQuadOp<Indi>(*cross, +cross1Rate); +
      // and of course stor it in +the state +
         _state.storeFunctor(propXover); +
     

    + + + + + +
          +// Optional: A second(and third, and ...)  crossover  +
          //    +of course you must create the corresponding classes +
          // +and all ***MUST*** derive from eoQuadOp<Indi> +

      /* Uncomment if necessary - +and replicate as many time as you need +
             +cross = new eoOneMaxSecondCrossover<Indi>(varType  _anyVariable);  +
             +_state.storeFunctor(cross); +
             +double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate +for crossover 2", '2', "Variation Operators").value();  +
             +propXover.add(*cross, cross2Rate);  +
     */ +
      // if you want some gentle +output, the last one shoudl be like +
      //  propXover.add(*cross, +crossXXXRate, true); +
     

    + + + + + +
    +
      // the mutation: same story +
      //////////////// +
      // you can have more than one +- combined in a proportional way +

      // for each mutation,  +
      // - define the mutator object +
      // - read its rate from the +parser +
      // - add it to the proportional +combination +

      // a first mutation  +
    eoMonOp<Indi> +*mut = new eoOneMaxMutation<Indi> /* (varType  +_anyVariable) */; +
     _state.storeFunctor(mut); +
      // its relative rate in the +combination +
     double mut1Rate = _parser.createParam(1.0, +"mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); +
      // and the creation of the +combined operator with this one +
     eoPropCombinedMonOp<Indi> *propMutation += new eoPropCombinedMonOp<Indi>(*mut, mut1Rate); +
     _state.storeFunctor(propMutation); +
     

    + + + + + +
          +// Optional: A second(and third, and ...)  mutation with their rates +
          //    +of course you must create the corresponding classes +
          // +and all ***MUST*** derive from eoMonOp<Indi> +

      /* Uncomment if necessary - +and replicate as many time as you need +
             +mut = new eoOneMaxSecondMutation<Indi>(varType  _anyVariable); +
             +_state.storeFunctor(mut); +
             +double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for +mutation 2", '2', "Variation Operators").value();  +
               +propMutation.add(*mut, mut2Rate);  +
     */ +
      // if you want some gentle +output, the last one shoudl be like +
      //  propMutation.add(*mut, +mutXXXRate, true); +

      // end of crossover and mutation +definitions +
     

    + + + + + +
    +
    // from now on, you do not need to modify +anything +
    // though you CAN add things to the checkpointing +(see tutorial) +

      // now build the eoGenOp: +
      // to simulate SGA (crossover +with proba pCross + mutation with proba pMut +
      // we must construct +
      //        +a sequential combination of +
      //                  +with proba 1, a proportional combination of  +
      //                                              +a QuadCopy and our crossover +
      //                  +with proba pMut, our mutation +

      // but of course you're free +to use any smart combination you could think of +
      // especially, if you have +to use eoBinOp rather than eoQuad Op youùll have +
      // to modify that part +

      // +First read the individual level parameters +
         eoValueParam<double>& +pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", +'C', "Variation Operators" ); +
          // +minimum check +
         if ( (pCrossParam.value() +< 0) || (pCrossParam.value() > 1) ) +
             +throw runtime_error("Invalid pCross"); +

         eoValueParam<double>& +pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", +'M', "Variation Operators" ); +
          // +minimum check +
         if ( (pMutParam.value() +< 0) || (pMutParam.value() > 1) ) +
             +throw runtime_error("Invalid pMut"); +

      // the crossover - with probability +pCross +
     eoProportionalOp<Indi> * propOp += new eoProportionalOp<Indi> ; +
     _state.storeFunctor(propOp); +
     eoQuadOp<Indi> *ptQuad = new +eoQuadCloneOp<Indi>; +
     _state.storeFunctor(ptQuad); +
     propOp->add(*propXover, pCrossParam.value()); +// +crossover, with proba pcross +
     propOp->add(*ptQuad, 1-pCrossParam.value()); +// +nothing, with proba 1-pcross +

      // now the sequential +
     eoSequentialOp<Indi> *op = new +eoSequentialOp<Indi>; +
     _state.storeFunctor(op); +
     op->add(*propOp, 1.0); // always +do combined crossover +
     op->add(*propMutation, pMutParam.value()); +// +then mutation, with proba pmut +

      // that's it - return a reference +
     return *op; +
    } +

    #endif

    + +


    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Fri May +3 08:06:20 2002 + + From d17ec8cf774a6f5ae032a9b17f74e51fba46f828 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 8 May 2002 06:52:37 +0000 Subject: [PATCH 0847/2134] Updated version number --- eo/tutorial/Lesson1/Makefile | 4 ++-- eo/tutorial/Lesson2/Makefile | 4 ++-- eo/tutorial/Lesson3/Makefile | 4 ++-- eo/tutorial/Lesson4/Makefile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile index 23fb9a6c5..68b94b2b1 100644 --- a/eo/tutorial/Lesson1/Makefile +++ b/eo/tutorial/Lesson1/Makefile @@ -1,6 +1,6 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c -pg $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp firstGA = FirstRealGA FirstBitGA diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile index 52e89ff78..e08e4e351 100644 --- a/eo/tutorial/Lesson2/Makefile +++ b/eo/tutorial/Lesson2/Makefile @@ -1,6 +1,6 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c $*.cpp firstEA = FirstRealEA FirstBitEA diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile index 8c300c25f..0f6e18bbe 100644 --- a/eo/tutorial/Lesson3/Makefile +++ b/eo/tutorial/Lesson3/Makefile @@ -1,6 +1,6 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c $*.cpp secondEA = SecondBitEA SecondRealEA diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile index 3585354d8..2a88ccd35 100644 --- a/eo/tutorial/Lesson4/Makefile +++ b/eo/tutorial/Lesson4/Makefile @@ -1,6 +1,6 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c $*.cpp ALL = BitEA RealEA ESEA From 0ce2809cc7d3404c7511df767f9a32b1b870393d Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 8 May 2002 06:55:21 +0000 Subject: [PATCH 0848/2134] Added Lesson5 --- eo/tutorial/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile index 8bd739e40..61396d3c2 100644 --- a/eo/tutorial/Makefile +++ b/eo/tutorial/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 all: for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done @@ -15,6 +15,9 @@ lesson3 : lesson4 : cd Lesson4; make +lesson5 : + cd Lesson5; make + #empty dist and distdir to let top-level 'make' do its job dist : From 1611bc663c2586963cc6ac50635c7ed29d7cf214 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 9 May 2002 06:28:34 +0000 Subject: [PATCH 0849/2134] Added references to ParadisEO and Lesson5 --- eo/tutorial/html/eoTutorial.html | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 5fbba29d3..4b4c8a576 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,16 +17,30 @@ and to

    EO Tutorial

    -
    Version 0.96 - Nov. 12 2001 -
    Nothing really new in this version -of the tutorial since Lesson4, that includes -a user guide of fully operational program for bitstrings and real-valued -with full support of ES self-adaptive mutation strategies. But EO itself -keeps advancing: for instance, this snapshot now compiles -in MSVC++ v. 6.0
    +
    Version 0.97 - May. 9 2002 +

    New

    -

    Welcome to EO tutorial/on-line documentation. -

    Please note that this tutorial is not supposed +

      +
      +
    • +ParadisEO, the parallel +version of EO, is available together with +a PDF presentation
      +
      Thanks to Sébastien Cahon +(LIFL, Lille)
    • + +
      +
    • +Lesson 5 gives +you the opportunity to build your own genotype 
      +
      and still benefit from all +powerful EO features (evolution +engines, I/O, +...).
    • +
    + +


    Welcome to EO tutorial/on-line documentation. +
    Please note that this tutorial is not supposed to be printed and read off-line, as it takes full advantage of hyper-text links between the different parts, and with the technical documentation. From d3762cdff2a35f7b21b37f8982dbdc16a95b53dd Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 9 May 2002 06:35:34 +0000 Subject: [PATCH 0850/2134] Still introducing ParadisEO --- eo/tutorial/html/eoTopDown.html | 12 +++++++++++- eo/tutorial/html/eoTutorial.html | 20 ++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 2e9d355bb..0895baa16 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -65,8 +65,18 @@ will intantly benefit from the power of all EO Evolution Engines (including easy user-parameter input presented in Lesson 4). You simply need to gradually fill in the shell-files that the script will generate for you. + +

  • +(new)  In parallel +to those lessons :-), you now have access to a two lessons for ParadisEO, +the parallel version of EO. There are +no HTML files, but sample code (in dir tutorial/ParadisEO/LessonN), +together with a PDF presentation +- Thanks to Sébastien Cahon (LIFL, +Lille)
  • -
    Current version (May. 5, 2002) stops here, but ... + +


    Current version (May. 5, 2002) stops here, but ...

    From there on, you don't need to follow the lesson order any more: you can go directly to any lesson and experiment. Of course, you will need to bring together the different pieces to write exactly what you want - diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 4b4c8a576..c04907198 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,26 +17,30 @@ and to

    EO Tutorial

    -
    ...).


    Welcome to EO tutorial/on-line documentation. From 07f2de55dc48b41ac8173fed9af70687bdf84208 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 9 May 2002 15:43:01 +0000 Subject: [PATCH 0851/2134] ramped half and half initialization has been added to eoParseTreeDepthInit --- eo/app/gpsymreg/main.cpp | 4 ++-- eo/src/gp/eoParseTreeDepthInit.h | 41 +++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/eo/app/gpsymreg/main.cpp b/eo/app/gpsymreg/main.cpp index 5d217adf8..dbe7c9ebc 100644 --- a/eo/app/gpsymreg/main.cpp +++ b/eo/app/gpsymreg/main.cpp @@ -70,8 +70,8 @@ int main(int argc, char *argv[]) // the parameters are passed on as well RegFitness eval(generationCounter, initSequence, parameter); - // Depth Initializor, defaults to grow method. - eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence); + // Depth Initializor, set for Ramped Half and Half Initialization + eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence, true, true); // create the initial population Pop pop(parameter.population_size, initializer); diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index ccdfa460b..528a9cd6a 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoParseTreeDepthInit.h : initializor for eoParseTree class -// (c) Maarten Keijzer 2000 +// (c) Maarten Keijzer 2000 Jeroen Eggermont 2002 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,6 +20,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es mak@dhi.dk + jeggermo@liacs.nl */ //----------------------------------------------------------------------------- @@ -64,16 +65,20 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > * @parm _max_depth The maximum depth of a tree * @param _initializor A vector containing the possible nodes * @param _grow False results in a full tree, True result is a randomly grown tree + * @param _ramped_half_and_half True results in Ramped Half and Half Initialization */ eoParseTreeDepthInit( unsigned _max_depth, - const vector& _initializor, - bool _grow = true) + const vector& _initializor, + bool _grow = true, + bool _ramped_half_and_half = false) : eoInit(), max_depth(_max_depth), initializor(_initializor), - grow(_grow) + grow(_grow), + ramped_half_and_half(_ramped_half_and_half), + current_depth(_max_depth) { if(initializor.empty()) { @@ -92,11 +97,24 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > void operator()(EoType& _tree) { list sequence; - - generate(sequence, max_depth); + generate(sequence, current_depth); parse_tree tmp(sequence.begin(), sequence.end()); _tree.swap(tmp); + + if(ramped_half_and_half) + { + if(grow) + { + if (current_depth > 2) + current_depth--; + else + current_depth = max_depth; + } + // change the grow method from 'grow' to 'full' or from 'full' to 'grow' + grow = !grow; + }; + } private : void generate(list& sequence, int the_max, int last_terminal = -1) @@ -141,10 +159,11 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > - unsigned max_depth; - std::vector initializor; + std::vector initializor; bool grow; + bool ramped_half_and_half; + unsigned current_depth; }; /** @@ -165,7 +184,11 @@ void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned in unsigned int M = init_max_depth - 1; unsigned int part_pop_size = population_size / (2*M); unsigned int m=0; - + + cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << endl; + cerr << " This function is now obsolete and might be removed in the future so you should"<< endl; + cerr << " update your code to use: " << endl << endl; + cerr << " eoParseTreeDepth(_max_depth,_initializer,_grow, bool _ramped_half_and_half)" << endl << endl; pop.clear(); From 2e87ffd00f6f0810836d41ba3f798421b509ab9c Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 13 May 2002 11:31:32 +0000 Subject: [PATCH 0852/2134] EO::printOn has been changed so that the printOn function will always print a valid fitness value even if the fitness is invalid Jeroen --- eo/config.cache | 6 +++--- eo/src/EO.h | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/eo/config.cache b/eo/config.cache index 8f137b2a7..c576c6ba8 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -20,10 +20,10 @@ ac_cv_header_stdc=${ac_cv_header_stdc=yes} ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} -ac_cv_path_install=${ac_cv_path_install=$'/usr/bin/install -c'} -ac_cv_prog_CPP=${ac_cv_prog_CPP=$'cc -E'} +ac_cv_path_install=${ac_cv_path_install='$/usr/bin/install -c'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='$cc -E'} ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S=$'ln -s'} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S='$ln -s'} ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} diff --git a/eo/src/EO.h b/eo/src/EO.h index bf9a76efc..1e5d784c8 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -124,7 +124,14 @@ public: // A random value would so be printed. // Even a non-evaluated EO is also serializable ... - _os << repFitness << ' '; // trailing space to make reading in that much easier + + // From now on instead of printing an invalid fitness value + // a default value is printed (for paradisEO) + + if (invalid()) + _os << Fitness() << ' '; + else + _os << repFitness << ' '; // trailing space to make reading in that much easier } //@} From 43f0d7ea79773efcc95c5f5eff49880bc1f178a7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 22 May 2002 02:13:06 +0000 Subject: [PATCH 0853/2134] I had forgotten the real_value.h - SecondRealEA did not compile! --- eo/tutorial/Lesson3/real_value.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 eo/tutorial/Lesson3/real_value.h diff --git a/eo/tutorial/Lesson3/real_value.h b/eo/tutorial/Lesson3/real_value.h new file mode 100644 index 000000000..7fe002b63 --- /dev/null +++ b/eo/tutorial/Lesson3/real_value.h @@ -0,0 +1,20 @@ +#include +//----------------------------------------------------------------------------- +/** Just a simple function that takes an vector and sets the fitnes + to the sphere function. Please use doubles not float!!! + @param _ind A floatingpoint vector +*/ + +// INIT +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + { + sum += _ind[i] * _ind[i]; + } + return sum; +} + + + From 86df5ac367e889076b2f553388a455f500649a2b Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 10 Jun 2002 14:10:35 +0000 Subject: [PATCH 0854/2134] all .dsp files converted from unix to dos format --- eo/win/all_lib.dsp | 204 +++++++------- eo/win/all_tests.dsp | 192 ++++++------- eo/win/all_tut.dsp | 192 ++++++------- eo/win/eo.dsp | 264 +++++++++--------- eo/win/es.dsp | 468 +++++++++++++++---------------- eo/win/ga.dsp | 308 ++++++++++----------- eo/win/t_eo.dsp | 204 +++++++------- eo/win/t_eobin.dsp | 204 +++++++------- eo/win/t_eocheckpointing.dsp | 204 +++++++------- eo/win/t_eoesall.dsp | 204 +++++++------- eo/win/t_eoexternaleo.dsp | 204 +++++++------- eo/win/t_eofitness.dsp | 204 +++++++------- eo/win/t_eoga.dsp | 204 +++++++------- eo/win/t_eogenop.dsp | 204 +++++++------- eo/win/t_eopareto.dsp | 204 +++++++------- eo/win/t_eoparetofitness.dsp | 204 +++++++------- eo/win/t_eopbil.dsp | 204 +++++++------- eo/win/t_eorandom.dsp | 204 +++++++------- eo/win/t_eoreal.dsp | 204 +++++++------- eo/win/t_eoreplacement.dsp | 204 +++++++------- eo/win/t_eoselect.dsp | 204 +++++++------- eo/win/t_eossga.dsp | 204 +++++++------- eo/win/t_eostateandparser.dsp | 204 +++++++------- eo/win/t_eosymreg.dsp | 204 +++++++------- eo/win/t_eovector.dsp | 204 +++++++------- eo/win/t_eovirus.dsp | 204 +++++++------- eo/win/t_mge-control.dsp | 204 +++++++------- eo/win/t_mge.dsp | 204 +++++++------- eo/win/t_mge1bit.dsp | 204 +++++++------- eo/win/tut_1_bit.dsp | 204 +++++++------- eo/win/tut_1_ex3.dsp | 204 +++++++------- eo/win/tut_1_real.dsp | 204 +++++++------- eo/win/tut_2_bit.dsp | 204 +++++++------- eo/win/tut_2_ex3.dsp | 204 +++++++------- eo/win/tut_2_real.dsp | 204 +++++++------- eo/win/tut_3_bit.dsp | 204 +++++++------- eo/win/tut_3_ex1.dsp | 204 +++++++------- eo/win/tut_4_bit.dsp | 204 +++++++------- eo/win/tut_4_es.dsp | 204 +++++++------- eo/win/tut_4_real.dsp | 204 +++++++------- eo/win/utils.dsp | 500 +++++++++++++++++----------------- 41 files changed, 4532 insertions(+), 4532 deletions(-) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index a578ee067..afb4ef2ec 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=all_lib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_lib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_lib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Release/eo_lib.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo_lib.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug/eo_libd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eo_libd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "all_lib - Win32 Release" -# Name "all_lib - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=all_lib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_lib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Release/eo_lib.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo_lib.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug/eo_libd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eo_libd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "all_lib - Win32 Release" +# Name "all_lib - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/eo/win/all_tests.dsp b/eo/win/all_tests.dsp index a3f4a8ce6..d449eb7eb 100644 --- a/eo/win/all_tests.dsp +++ b/eo/win/all_tests.dsp @@ -1,96 +1,96 @@ -# Microsoft Developer Studio Project File - Name="all_tests" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=all_tests - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_tests.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_tests.mak" CFG="all_tests - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_tests - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "all_tests - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_tests - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "all_tests - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "all_tests - Win32 Release" -# Name "all_tests - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_tests" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=all_tests - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_tests.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_tests.mak" CFG="all_tests - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_tests - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "all_tests - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_tests - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "all_tests - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "all_tests - Win32 Release" +# Name "all_tests - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/all_tut.dsp b/eo/win/all_tut.dsp index 8e3e75f47..4b39e1b4d 100644 --- a/eo/win/all_tut.dsp +++ b/eo/win/all_tut.dsp @@ -1,96 +1,96 @@ -# Microsoft Developer Studio Project File - Name="all_tut" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=all_tut - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_tut.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_tut.mak" CFG="all_tut - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_tut - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "all_tut - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_tut - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "all_tut - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "all_tut - Win32 Release" -# Name "all_tut - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_tut" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=all_tut - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_tut.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_tut.mak" CFG="all_tut - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_tut - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "all_tut - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_tut - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "all_tut - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "all_tut - Win32 Release" +# Name "all_tut - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index bf88c176e..efe08f2ce 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,132 +1,132 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release\obj" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debugj" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug\obj" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\eod.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eod.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoParetoFitness.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.H -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\eo.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\eod.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoParetoFitness.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.H +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/es.dsp b/eo/win/es.dsp index 33c2812c2..2aa8ba3f4 100644 --- a/eo/win/es.dsp +++ b/eo/win/es.dsp @@ -1,234 +1,234 @@ -# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\es.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\esd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\esd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "es - Win32 Release" -# Name "es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\es\make_algo_scalar_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_algo_scalar_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_checkpoint_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_checkpoint_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_continue_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_continue_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_pop_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_pop_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_run_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_run_real.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\es\eoEsChromInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsFull.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsGlobalXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutate.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutationInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsSimple.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStandardXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStdev.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoNormalMutation.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoReal.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealAtomXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealInitBounded.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealOp.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_es.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_real.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_es.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_real.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_real.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\es.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\esd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\esd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "es - Win32 Release" +# Name "es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_real.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\es\eoEsChromInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsFull.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsGlobalXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutate.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutationInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsSimple.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStandardXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStdev.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoNormalMutation.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoReal.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealAtomXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealInitBounded.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_real.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/ga.dsp b/eo/win/ga.dsp index 15d906f6a..4cac2b9e1 100644 --- a/eo/win/ga.dsp +++ b/eo/win/ga.dsp @@ -1,154 +1,154 @@ -# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=ga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\ga.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "ga___Win32_Debug" -# PROP BASE Intermediate_Dir "ga___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\gad.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\gad.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "ga - Win32 Release" -# Name "ga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\ga\make_algo_scalar_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_checkpoint_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_continue_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_genotype_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_op_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_pop_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_run_ga.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\ga\eoBit.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\eoBitOp.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\eoBitOpFactory.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_ga.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_genotype_ga.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_op.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\ga.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ga___Win32_Debug" +# PROP BASE Intermediate_Dir "ga___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\gad.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\gad.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ga - Win32 Release" +# Name "ga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\ga\make_algo_scalar_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_checkpoint_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_continue_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_pop_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_run_ga.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\ga\eoBit.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOpFactory.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/t_eo.dsp b/eo/win/t_eo.dsp index d61e402bf..8dc7f0dc8 100644 --- a/eo/win/t_eo.dsp +++ b/eo/win/t_eo.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eo___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eo - Win32 Release" -# Name "t_eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eo.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eo.mak" CFG="t_eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eo - Win32 Release" +# Name "t_eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eo.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eobin.dsp b/eo/win/t_eobin.dsp index 649d24677..6df155e43 100644 --- a/eo/win/t_eobin.dsp +++ b/eo/win/t_eobin.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eobin - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eobin - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eobin___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eobin - Win32 Release" -# Name "t_eobin - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eobin.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eobin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eobin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eobin.mak" CFG="t_eobin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eobin - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eobin - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eobin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eobin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eobin___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eobin___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eobin - Win32 Release" +# Name "t_eobin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eobin.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eocheckpointing.dsp b/eo/win/t_eocheckpointing.dsp index 4ed1715ac..ad8097092 100644 --- a/eo/win/t_eocheckpointing.dsp +++ b/eo/win/t_eocheckpointing.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eocheckpointing - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eocheckpointing.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eocheckpointing - Win32 Release" -# Name "t_eocheckpointing - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoCheckpointing.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eocheckpointing" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eocheckpointing - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eocheckpointing.mak" CFG="t_eocheckpointing - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eocheckpointing - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eocheckpointing - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eocheckpointing - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eocheckpointing - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eocheckpointing___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eocheckpointing - Win32 Release" +# Name "t_eocheckpointing - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoCheckpointing.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoesall.dsp b/eo/win/t_eoesall.dsp index 599af01ff..d24a598bb 100644 --- a/eo/win/t_eoesall.dsp +++ b/eo/win/t_eoesall.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoesall - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoesall.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoesall - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoesall - Win32 Release" -# Name "t_eoesall - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoESAll.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoesall" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoesall - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoesall.mak" CFG="t_eoesall - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoesall - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoesall - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoesall - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoesall - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoesall___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoesall - Win32 Release" +# Name "t_eoesall - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoESAll.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoexternaleo.dsp b/eo/win/t_eoexternaleo.dsp index b7b8cd659..7b799731d 100644 --- a/eo/win/t_eoexternaleo.dsp +++ b/eo/win/t_eoexternaleo.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoexternaleo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoexternaleo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoexternaleo - Win32 Release" -# Name "t_eoexternaleo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoExternalEO.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoexternaleo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoexternaleo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoexternaleo.mak" CFG="t_eoexternaleo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoexternaleo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoexternaleo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoexternaleo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoexternaleo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoexternaleo___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoexternaleo - Win32 Release" +# Name "t_eoexternaleo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoExternalEO.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eofitness.dsp b/eo/win/t_eofitness.dsp index 08cf2e47f..6b4d8977a 100644 --- a/eo/win/t_eofitness.dsp +++ b/eo/win/t_eofitness.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eofitness - Win32 Release" -# Name "t_eofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eofitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitness.mak" CFG="t_eofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eofitness - Win32 Release" +# Name "t_eofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eofitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoga.dsp b/eo/win/t_eoga.dsp index 085165910..a91e57bb2 100644 --- a/eo/win/t_eoga.dsp +++ b/eo/win/t_eoga.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoga - Win32 Release" -# Name "t_eoga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoga.mak" CFG="t_eoga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoga - Win32 Release" +# Name "t_eoga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eogenop.dsp b/eo/win/t_eogenop.dsp index b5b6daaa5..195dd79cd 100644 --- a/eo/win/t_eogenop.dsp +++ b/eo/win/t_eogenop.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eogenop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eogenop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eogenop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eogenop - Win32 Release" -# Name "t_eogenop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoGenOp.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eogenop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eogenop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eogenop.mak" CFG="t_eogenop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eogenop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eogenop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eogenop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eogenop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eogenop___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eogenop - Win32 Release" +# Name "t_eogenop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoGenOp.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eopareto.dsp b/eo/win/t_eopareto.dsp index e0eece085..055b01655 100644 --- a/eo/win/t_eopareto.dsp +++ b/eo/win/t_eopareto.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eopareto - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eopareto.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eopareto - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eopareto - Win32 Release" -# Name "t_eopareto - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoPareto.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eopareto" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopareto - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopareto.mak" CFG="t_eopareto - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopareto - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopareto - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopareto - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopareto - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopareto___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopareto - Win32 Release" +# Name "t_eopareto - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPareto.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoparetofitness.dsp b/eo/win/t_eoparetofitness.dsp index 3d9dfe473..9b692e3f8 100644 --- a/eo/win/t_eoparetofitness.dsp +++ b/eo/win/t_eoparetofitness.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoparetofitness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetofitness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoparetofitness - Win32 Release" -# Name "t_eoparetofitness - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoParetoFitness.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoparetofitness" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoparetofitness - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoparetofitness.mak" CFG="t_eoparetofitness - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoparetofitness - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoparetofitness - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoparetofitness - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoparetofitness - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoparetofitness___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoparetofitness - Win32 Release" +# Name "t_eoparetofitness - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoParetoFitness.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eopbil.dsp b/eo/win/t_eopbil.dsp index 633adb866..66668a092 100644 --- a/eo/win/t_eopbil.dsp +++ b/eo/win/t_eopbil.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eopbil - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eopbil.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eopbil - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eopbil - Win32 Release" -# Name "t_eopbil - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoPBIL.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eopbil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eopbil - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eopbil.mak" CFG="t_eopbil - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eopbil - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eopbil - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eopbil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eopbil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eopbil___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eopbil - Win32 Release" +# Name "t_eopbil - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoPBIL.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eorandom.dsp b/eo/win/t_eorandom.dsp index 47f8cc9a8..ea1270a0a 100644 --- a/eo/win/t_eorandom.dsp +++ b/eo/win/t_eorandom.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eorandom - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eorandom.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eorandom - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eorandom - Win32 Release" -# Name "t_eorandom - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoRandom.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eorandom" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eorandom - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eorandom.mak" CFG="t_eorandom - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eorandom - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eorandom - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eorandom - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eorandom - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eorandom___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eorandom - Win32 Release" +# Name "t_eorandom - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoRandom.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoreal.dsp b/eo/win/t_eoreal.dsp index aefb42025..aacd816a8 100644 --- a/eo/win/t_eoreal.dsp +++ b/eo/win/t_eoreal.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoreal - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoreal.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoreal - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoreal - Win32 Release" -# Name "t_eoreal - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoReal.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoreal" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreal - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreal.mak" CFG="t_eoreal - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreal - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreal - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreal - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreal - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreal___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreal - Win32 Release" +# Name "t_eoreal - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReal.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoreplacement.dsp b/eo/win/t_eoreplacement.dsp index 0b84961a6..fa39a2b91 100644 --- a/eo/win/t_eoreplacement.dsp +++ b/eo/win/t_eoreplacement.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoreplacement - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoreplacement.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoreplacement - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoreplacement - Win32 Release" -# Name "t_eoreplacement - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoReplacement.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoreplacement" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoreplacement - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoreplacement.mak" CFG="t_eoreplacement - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoreplacement - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoreplacement - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoreplacement - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoreplacement - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoreplacement___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoreplacement - Win32 Release" +# Name "t_eoreplacement - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoReplacement.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eoselect.dsp b/eo/win/t_eoselect.dsp index 17cf165a8..4bc5d0745 100644 --- a/eo/win/t_eoselect.dsp +++ b/eo/win/t_eoselect.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eoselect - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eoselect.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eoselect - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eoselect - Win32 Release" -# Name "t_eoselect - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSelect.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eoselect" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoselect - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoselect.mak" CFG="t_eoselect - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoselect - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoselect - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoselect - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eoselect - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eoselect___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eoselect - Win32 Release" +# Name "t_eoselect - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSelect.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eossga.dsp b/eo/win/t_eossga.dsp index fbbd71a13..41338b532 100644 --- a/eo/win/t_eossga.dsp +++ b/eo/win/t_eossga.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eossga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eossga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eossga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eossga___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eossga - Win32 Release" -# Name "t_eossga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSSGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eossga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eossga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eossga.mak" CFG="t_eossga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eossga - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eossga - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eossga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eossga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eossga___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eossga___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eossga - Win32 Release" +# Name "t_eossga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSSGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eostateandparser.dsp b/eo/win/t_eostateandparser.dsp index 5e8638aba..7e627b581 100644 --- a/eo/win/t_eostateandparser.dsp +++ b/eo/win/t_eostateandparser.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eostateandparser - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eostateandparser.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eostateandparser - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eostateandparser - Win32 Release" -# Name "t_eostateandparser - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoStateAndParser.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eostateandparser" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eostateandparser - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eostateandparser.mak" CFG="t_eostateandparser - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eostateandparser - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eostateandparser - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eostateandparser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eostateandparser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eostateandparser___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eostateandparser - Win32 Release" +# Name "t_eostateandparser - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoStateAndParser.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eosymreg.dsp b/eo/win/t_eosymreg.dsp index 767702a45..e09b99b58 100644 --- a/eo/win/t_eosymreg.dsp +++ b/eo/win/t_eosymreg.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eosymreg - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eosymreg.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eosymreg - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eosymreg - Win32 Release" -# Name "t_eosymreg - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoSymreg.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eosymreg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eosymreg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eosymreg.mak" CFG="t_eosymreg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eosymreg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eosymreg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eosymreg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eosymreg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eosymreg___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eosymreg - Win32 Release" +# Name "t_eosymreg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoSymreg.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovector.dsp b/eo/win/t_eovector.dsp index 6a905d573..485637a92 100644 --- a/eo/win/t_eovector.dsp +++ b/eo/win/t_eovector.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovector - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovector - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovector___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eovector - Win32 Release" -# Name "t_eovector - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoVector.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovector" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovector - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovector.mak" CFG="t_eovector - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovector - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovector - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovector - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovector - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovector___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovector___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovector - Win32 Release" +# Name "t_eovector - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVector.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eovirus.dsp b/eo/win/t_eovirus.dsp index 3670d640f..684cac054 100644 --- a/eo/win/t_eovirus.dsp +++ b/eo/win/t_eovirus.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_eovirus - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_eovirus.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_eovirus - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_eovirus - Win32 Release" -# Name "t_eovirus - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-eoVirus.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_eovirus" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eovirus - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eovirus.mak" CFG="t_eovirus - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eovirus - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eovirus - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eovirus - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eovirus - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eovirus___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eovirus - Win32 Release" +# Name "t_eovirus - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoVirus.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge-control.dsp b/eo/win/t_mge-control.dsp index d7cfb690b..09888987d 100644 --- a/eo/win/t_mge-control.dsp +++ b/eo/win/t_mge-control.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge-control - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge-control.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge-control - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge-control - Win32 Release" -# Name "t_mge-control - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE-control.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge-control" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge-control - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge-control.mak" CFG="t_mge-control - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge-control - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge-control - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge-control - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge-control - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge-control___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge-control - Win32 Release" +# Name "t_mge-control - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE-control.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge.dsp b/eo/win/t_mge.dsp index 92d30efa1..aab3fb005 100644 --- a/eo/win/t_mge.dsp +++ b/eo/win/t_mge.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge - Win32 Release" -# Name "t_mge - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge.mak" CFG="t_mge - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge - Win32 Release" +# Name "t_mge - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_mge1bit.dsp b/eo/win/t_mge1bit.dsp index 03f18e237..34ee75d88 100644 --- a/eo/win/t_mge1bit.dsp +++ b/eo/win/t_mge1bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=t_mge1bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "t_mge1bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "t_mge1bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "t_mge1bit - Win32 Release" -# Name "t_mge1bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\test\t-MGE1bit.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="t_mge1bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_mge1bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_mge1bit.mak" CFG="t_mge1bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_mge1bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_mge1bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_mge1bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_mge1bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_mge1bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_mge1bit - Win32 Release" +# Name "t_mge1bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-MGE1bit.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_bit.dsp b/eo/win/tut_1_bit.dsp index dc1ff8790..5495dddef 100644 --- a/eo/win/tut_1_bit.dsp +++ b/eo/win/tut_1_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_1_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_1_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_1_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_1_bit.mak" CFG="tut_1_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_1_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_1_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_1_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_1_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_1_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_1_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_1_bit - Win32 Release" -# Name "tut_1_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson1\FirstBitGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_1_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_bit.mak" CFG="tut_1_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_bit - Win32 Release" +# Name "tut_1_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\FirstBitGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_ex3.dsp b/eo/win/tut_1_ex3.dsp index 142e5949c..dcef19f39 100644 --- a/eo/win/tut_1_ex3.dsp +++ b/eo/win/tut_1_ex3.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_1_ex3" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_1_ex3 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_1_ex3.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_1_ex3.mak" CFG="tut_1_ex3 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_1_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_1_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_1_ex3 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_1_ex3 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_1_ex3___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_1_ex3___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_1_ex3 - Win32 Release" -# Name "tut_1_ex3 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson1\exercise1.3.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_1_ex3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_ex3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_ex3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_ex3.mak" CFG="tut_1_ex3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_ex3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_ex3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_ex3___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_ex3___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_ex3 - Win32 Release" +# Name "tut_1_ex3 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\exercise1.3.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_1_real.dsp b/eo/win/tut_1_real.dsp index d7c12f1bc..673c66098 100644 --- a/eo/win/tut_1_real.dsp +++ b/eo/win/tut_1_real.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_1_real" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_1_real - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_1_real.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_1_real.mak" CFG="tut_1_real - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_1_real - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_1_real - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_1_real - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_1_real - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_1_real___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_1_real___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_1_real - Win32 Release" -# Name "tut_1_real - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson1\FirstRealGA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_1_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_1_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_1_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_1_real.mak" CFG="tut_1_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_1_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_1_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_1_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_1_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_1_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_1_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_1_real - Win32 Release" +# Name "tut_1_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson1\FirstRealGA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_bit.dsp b/eo/win/tut_2_bit.dsp index 5261ba6f1..860774bee 100644 --- a/eo/win/tut_2_bit.dsp +++ b/eo/win/tut_2_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_2_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_2_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_2_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_2_bit.mak" CFG="tut_2_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_2_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_2_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_2_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_2_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_2_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_2_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_2_bit - Win32 Release" -# Name "tut_2_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson2\FirstBitEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_2_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_bit.mak" CFG="tut_2_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_bit - Win32 Release" +# Name "tut_2_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\FirstBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_ex3.dsp b/eo/win/tut_2_ex3.dsp index fc2aab256..12a0b59c5 100644 --- a/eo/win/tut_2_ex3.dsp +++ b/eo/win/tut_2_ex3.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_2_ex3" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_2_ex3 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_2_ex3.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_2_ex3.mak" CFG="tut_2_ex3 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_2_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_2_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_2_ex3 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_2_ex3 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_2_ex3___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_2_ex3___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_2_ex3 - Win32 Release" -# Name "tut_2_ex3 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson2\exercise2.3.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_2_ex3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_ex3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_ex3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_ex3.mak" CFG="tut_2_ex3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_ex3 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_ex3 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_ex3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_ex3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_ex3___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_ex3___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_ex3 - Win32 Release" +# Name "tut_2_ex3 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\exercise2.3.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_2_real.dsp b/eo/win/tut_2_real.dsp index 55195c898..786b21f0d 100644 --- a/eo/win/tut_2_real.dsp +++ b/eo/win/tut_2_real.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_2_real" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_2_real - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_2_real.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_2_real.mak" CFG="tut_2_real - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_2_real - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_2_real - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_2_real - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_2_real - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_2_real___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_2_real___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_2_real - Win32 Release" -# Name "tut_2_real - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson2\FirstRealEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_2_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_2_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_2_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_2_real.mak" CFG="tut_2_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_2_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_2_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_2_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_2_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_2_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_2_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_2_real - Win32 Release" +# Name "tut_2_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson2\FirstRealEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_3_bit.dsp b/eo/win/tut_3_bit.dsp index b4cf730aa..ecbaad1c8 100644 --- a/eo/win/tut_3_bit.dsp +++ b/eo/win/tut_3_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_3_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_3_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_3_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_3_bit.mak" CFG="tut_3_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_3_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_3_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_3_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_3_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_3_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_3_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_3_bit - Win32 Release" -# Name "tut_3_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson3\SecondBitEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_3_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_3_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_3_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_3_bit.mak" CFG="tut_3_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_3_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_3_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_3_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_3_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_3_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_3_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_3_bit - Win32 Release" +# Name "tut_3_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson3\SecondBitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_3_ex1.dsp b/eo/win/tut_3_ex1.dsp index b1f5553b4..e87fc7651 100644 --- a/eo/win/tut_3_ex1.dsp +++ b/eo/win/tut_3_ex1.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_3_ex1" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_3_ex1 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_3_ex1.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_3_ex1.mak" CFG="tut_3_ex1 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_3_ex1 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_3_ex1 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_3_ex1 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_3_ex1 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_3_ex1___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_3_ex1___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_3_ex1 - Win32 Release" -# Name "tut_3_ex1 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson3\exercise3.1.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_3_ex1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_3_ex1 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_3_ex1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_3_ex1.mak" CFG="tut_3_ex1 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_3_ex1 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_3_ex1 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_3_ex1 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_3_ex1 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_3_ex1___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_3_ex1___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_3_ex1 - Win32 Release" +# Name "tut_3_ex1 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson3\exercise3.1.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_bit.dsp b/eo/win/tut_4_bit.dsp index f5ca96b93..a7653e8eb 100644 --- a/eo/win/tut_4_bit.dsp +++ b/eo/win/tut_4_bit.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_4_bit" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_4_bit - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_4_bit.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_4_bit.mak" CFG="tut_4_bit - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_4_bit - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_4_bit - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_4_bit - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_4_bit - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_4_bit___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_4_bit___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_4_bit - Win32 Release" -# Name "tut_4_bit - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson4\BitEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_4_bit" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_bit - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_bit.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_bit.mak" CFG="tut_4_bit - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_bit - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_bit - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_bit - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_bit - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_bit___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_bit___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_bit - Win32 Release" +# Name "tut_4_bit - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\BitEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_es.dsp b/eo/win/tut_4_es.dsp index 1724ba03b..756e08493 100644 --- a/eo/win/tut_4_es.dsp +++ b/eo/win/tut_4_es.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_4_es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_4_es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_4_es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_4_es.mak" CFG="tut_4_es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_4_es - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_4_es - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_4_es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_4_es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_4_es___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_4_es___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_4_es - Win32 Release" -# Name "tut_4_es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson4\ESEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_4_es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_es.mak" CFG="tut_4_es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_es - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_es - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_es___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_es___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_es - Win32 Release" +# Name "tut_4_es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\ESEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/tut_4_real.dsp b/eo/win/tut_4_real.dsp index 52cff040f..f544ae8f7 100644 --- a/eo/win/tut_4_real.dsp +++ b/eo/win/tut_4_real.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="tut_4_real" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tut_4_real - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tut_4_real.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tut_4_real.mak" CFG="tut_4_real - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tut_4_real - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tut_4_real - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tut_4_real - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" - -!ELSEIF "$(CFG)" == "tut_4_real - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "tut_4_real___Win32_Debug0" -# PROP BASE Intermediate_Dir "tut_4_real___Win32_Debug0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" - -!ENDIF - -# Begin Target - -# Name "tut_4_real - Win32 Release" -# Name "tut_4_real - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\tutorial\Lesson4\RealEA.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tut_4_real" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tut_4_real - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tut_4_real.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tut_4_real.mak" CFG="tut_4_real - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tut_4_real - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tut_4_real - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tut_4_real - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "tut_4_real - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "tut_4_real___Win32_Debug0" +# PROP BASE Intermediate_Dir "tut_4_real___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "tut_4_real - Win32 Release" +# Name "tut_4_real - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\tutorial\Lesson4\RealEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/utils.dsp b/eo/win/utils.dsp index c0b5bbf81..dea6e156f 100644 --- a/eo/win/utils.dsp +++ b/eo/win/utils.dsp @@ -1,250 +1,250 @@ -# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=utils - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "utils.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "utils - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\utils.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "utils - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "utils___Win32_Debug" -# PROP BASE Intermediate_Dir "utils___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\utilsd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\utilsd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "utils - Win32 Release" -# Name "utils - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealBounds.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\make_help.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoCheckPoint.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoDistance.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFDCStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileSnapshot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot1DMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot1DSnapshot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoHowMany.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMOFitnessStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoPopStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealVectorBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRndGenerators.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoScalarFitnessStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdatable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\pipecom.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\rnd_generators.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\selectors.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=utils - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "utils.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "utils - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Release\utils.lib lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "utils - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "utils___Win32_Debug" +# PROP BASE Intermediate_Dir "utils___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\utilsd.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Install +PostBuild_Cmds=copy Debug\utilsd.lib lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "utils - Win32 Release" +# Name "utils - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\make_help.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoCheckPoint.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoDistance.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFDCStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoHowMany.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMOFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoPopStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealVectorBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRndGenerators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoScalarFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdatable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\pipecom.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\rnd_generators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\selectors.h +# End Source File +# End Group +# End Target +# End Project From e9e3cbb62305520773e8e10d353dda9659e57c83 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 17 Jun 2002 04:13:45 +0000 Subject: [PATCH 0855/2134] Adding the truncation selectors. 2 versions: eoTruncatedSelectOne is an eoSelectOne, and eoTruncatedSelectMany works like an eoSelectMany (but is NOT) --- eo/src/eoTruncatedSelectMany.h | 117 +++++++++++++++++++++++++++++++++ eo/src/eoTruncatedSelectOne.h | 110 +++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) create mode 100644 eo/src/eoTruncatedSelectMany.h create mode 100644 eo/src/eoTruncatedSelectOne.h diff --git a/eo/src/eoTruncatedSelectMany.h b/eo/src/eoTruncatedSelectMany.h new file mode 100644 index 000000000..24dbc47a8 --- /dev/null +++ b/eo/src/eoTruncatedSelectMany.h @@ -0,0 +1,117 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTruncatedSelectMany.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTruncatedSelectMany_h +#define _eoTruncatedSelectMany_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoTruncatedSelectMany selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectMany needs an eoSelectOne in its ctor + + It will use an eoHowMnay to determine the number of guys to select, + and push them to the back of the destination population. + + And it will only perform selection from the top guys in the population. + + It is NOT a special case of eoSelectMany because it needs to SORT + the population to discard the worst guys before doing the selection + + However, the same result can be obtained by embedding an + eoTruncatedSelectOne into an eoSelectMany ... +*/ +template +class eoTruncatedSelectMany : public eoSelect +{ + public: + /// Ctor + eoTruncatedSelectMany(eoSelectOne& _select, + double _rateGenitors, double _rateFertile, + bool _interpret_as_rateG = true, + bool _interpret_as_rateF = true) + : select(_select), + howManyGenitors(_rateGenitors, _interpret_as_rateG), + howManyFertile(_rateFertile, _interpret_as_rateF) {} + + // Ctor with eoHowManys + eoTruncatedSelectMany(eoSelectOne& _select, + eoHowMany _howManyGenitors, eoHowMany _howManyFertile) + : select(_select), howManyGenitors(_howManyGenitors), + howManyFertile(_howManyFertile) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned target = howManyGenitors(_source.size()); + + _dest.resize(target); + + unsigned nbFertile = howManyFertile(_source.size()); + + //revert to standard selection (see eoSelectMany) if no truncation + if (nbFertile == _source.size()) + { + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + else + { + // at the moment, brute force (rush rush, no good) + // what we would need otherwise is a vector class + // and selectors that act on such a thing + eoPop tmpPop = _source; // hum hum, could be a pain in the ass + + tmpPop.sort(); // maybe we could only do partial sort? + tmpPop.resize(nbFertile); // only the best guys here now + tmpPop.shuffle(); // as some selectors are order-sensitive + + select.setup(tmpPop); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(tmpPop); + } + } + +private : + eoSelectOne& select; // selector for one guy + eoHowMany howManyGenitors; // number of guys to select + eoHowMany howManyFertile; // number of fertile guys +}; + +#endif diff --git a/eo/src/eoTruncatedSelectOne.h b/eo/src/eoTruncatedSelectOne.h new file mode 100644 index 000000000..8cc4db1bb --- /dev/null +++ b/eo/src/eoTruncatedSelectOne.h @@ -0,0 +1,110 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTruncatedSelectOne.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTruncatedSelectOne_h +#define _eoTruncatedSelectOne_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoTruncatedSelectOne selects one individual using eoSelectOne as it's + mechanism. Therefore eoTruncatedSelectOne needs an eoSelectOne in its ctor + + It will perform selection only from the top guys in the population. + +*/ +template +class eoTruncatedSelectOne : public eoSelectOne +{ +public: + /** Ctor from rate and bool */ + eoTruncatedSelectOne(eoSelectOne& _select, + double _rateFertile, + bool _interpret_as_rateF = true) + : select(_select), + howManyFertile(_rateFertile, _interpret_as_rateF), + tmpPop(), actualPop(tmpPop) + {} + + /** Ctor with eoHowMany */ + eoTruncatedSelectOne(eoSelectOne& _select, + eoHowMany _howManyFertile) + : select(_select), howManyFertile(_howManyFertile), + tmpPop(), actualPop(tmpPop) + {} + + + /** setup procedures: fills the temporary population with the fertile guys */ + void setup(const eoPop& _source) + { + unsigned fertile = howManyFertile(_source.size()); + if (fertile == _source.size()) // noting to do, all are fertile + { + actualPop = _source; + } + else + { + // copy only best ferile to actualPop + tmpPop.resize(fertile); + std::vector result; + _source.nth_element(fertile, result); + for (unsigned i=0; i& _pop) + { + return select(actualPop); + } + + +private : + eoSelectOne& select; // selector for one guy + eoHowMany howManyFertile; // number of fertile guys + eoPop tmpPop; // intermediate population - fertile guys + eoPop & actualPop; // to avoid copies when 100% fertility +}; + +#endif From a764bb57828198e5d6463d6589fe856d90ff0a3a Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 17 Jun 2002 04:51:34 +0000 Subject: [PATCH 0856/2134] Reshaped the whole code Added the SequentialSelect selectors THe generated files are now "hidden" in ResSelect dir (hardcoded!) --- eo/test/t-eoSelect.cpp | 128 +++++++++++++++++++++++++---------------- 1 file changed, 80 insertions(+), 48 deletions(-) diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 771368085..3fde7f5ca 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -7,17 +7,9 @@ #include // runtime_error -//----------------------------------------------------------------------------- -// tt.cpp: -// -//----------------------------------------------------------------------------- - - // general #include -#include -#include -#include + //----------------------------------------------------------------------------- struct Dummy : public EO @@ -52,22 +44,18 @@ unsigned isInPop(EOT & _indi, eoPop & _pop) } unsigned int pSize; // global variable, bouh! +string fitnessType; // yes, a global variable :-) +eoDummyPop parentsOrg; template void testSelectMany(eoSelect & _select, string _name) { - cout << "\n\n" << _name << endl; + unsigned i; + cout << "\n\n" << fitnessType + _name << endl; cout << "===============\n"; - eoDummyPop parents(pSize); + eoDummyPop parents(parentsOrg); eoDummyPop offspring(0); - unsigned i; - // initialize parents - for (i=0; i & _select, string _name) throw runtime_error("Pas trouve ds parents"); nb[trouve]++; } - // dump to file so you can plot using gnuplot - string fName = _name + ".prop"; + // dump to file so you can plot using gnuplot - dir name is hardcoded! + string fName = "ResSelect/" + fitnessType + _name + ".select"; ofstream os(fName.c_str()); for (i=0; i & _select, string _name) } template -void testSelectOne(eoSelectOne & _select, eoHowMany & _hm, string _name) +void testSelectOne(eoSelectOne & _select, eoHowMany & _offspringRate, + eoHowMany & _fertileRate, string _name) { - eoSelectMany percSelect(_select, _hm); + eoTruncatedSelectOne truncSelect(_select, _fertileRate); + eoSelectMany percSelect(truncSelect, _offspringRate); testSelectMany(percSelect, _name); } @@ -113,26 +103,65 @@ int the_main(int argc, char **argv) eoValueParam offsrpringRateParam = parser.createParam(eoHowMany(1.0), "offsrpringRate", "Offsrpring rate (% or absolute)",'O'); eoHowMany oRate = offsrpringRateParam.value(); + eoValueParam fertileRateParam = parser.createParam(eoHowMany(1.0), "fertileRate", "Fertility rate (% or absolute)",'F'); + eoHowMany fRate = fertileRateParam.value(); + eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "tournamentSize", "Deterministic tournament size",'T'); unsigned int tSize = tournamentSizeParam.value(); - eoValueParam tournamentRateParam = parser.createParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + eoValueParam tournamentRateParam = parser.createParam(1.0, "tournamentRate", "Stochastic tournament rate",'t'); double tRate = tournamentRateParam.value(); - eoValueParam rankingPressureParam = parser.createParam(1.75, "rankingPressure", "Selective pressure for the ranking selection",'p'); + eoValueParam rankingPressureParam = parser.createParam(2.0, "rankingPressure", "Selective pressure for the ranking selection",'p'); double rankingPressure = rankingPressureParam.value(); + eoValueParam rankingExponentParam = parser.createParam(1.0, "rankingExponent", "Exponent for the ranking selection",'e'); + double rankingExponent = rankingExponentParam.value(); + + eoValueParam fitTypeParam = parser.createParam(string("linear"), "fitType", "Type of fitness (linear, exp, log, super",'f'); + fitnessType = fitTypeParam.value(); + if (parser.userNeedsHelp()) { parser.printHelp(cout); exit(0); } + // hard-coded directory name ... + system("mkdir ResSelect"); cout << "Testing the Selections\nParents size = " << pSize - << ", offspring rate = " << oRate << endl; + << ", offspring rate = " << oRate; + cout << " and putting rsulting files in dir ResSelect" << endl; - rng.reseed(42); + // initialize parent population + parentsOrg.resize(pSize); + if (fitnessType == string("linear")) + for (unsigned i=0; i& seedParam = parser.createParam(uint32(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + rng.reseed(seedParam.value()); + + char fileName[1024]; // the selection procedures under test // eoDetSelect detSelect(oRate); @@ -140,39 +169,42 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to // Roulette eoProportionalSelect propSelect; - testSelectOne(propSelect, oRate, "propSelect"); + testSelectOne(propSelect, oRate, fRate, "PropSelect"); - // Ranking - eoRankingSelect rankSelect(rankingPressure); - testSelectOne(rankSelect, oRate, "rankSelect"); + // Linear ranking using the perf2Worth construct + eoRankingSelect newRankingSelect(rankingPressure); + sprintf(fileName,"LinRank_%g",rankingPressure); + testSelectOne(newRankingSelect, oRate, fRate, fileName); - // New ranking using the perf2Worth construct - cout << "Avant appel a LinearRanking()" << endl; - eoRankingSelect newRankingSelect(rankingPressure); // pressure 2 by default - testSelectOne(newRankingSelect, oRate, "newRankSelect"); - - // New ranking using the perf2Worth construct - cout << "Avant appel a exponentialRanking()" << endl; - eoRankingSelect expRankingSelect(rankingPressure,2); - testSelectOne(expRankingSelect, oRate, "expRankingSelect"); + // Exponential ranking using the perf2Worth construct + cout << "rankingExponent " << rankingExponent << endl; + eoRankingSelect expRankingSelect(rankingPressure,rankingExponent); + sprintf(fileName,"ExpRank_%g_%g",rankingPressure, rankingExponent); + testSelectOne(expRankingSelect, oRate, fRate, fileName); // Det tournament eoDetTournamentSelect detTourSelect(tSize); - testSelectOne(detTourSelect, oRate, "detTourSelect"); + sprintf(fileName,"DetTour_%d",tSize); + testSelectOne(detTourSelect, oRate, fRate, fileName); // Stoch tournament eoStochTournamentSelect stochTourSelect(tRate); - testSelectOne(stochTourSelect, oRate, "stochTourSelect"); - - exit(0); + sprintf(fileName,"StochTour_%g",tRate); + testSelectOne(stochTourSelect, oRate, fRate, fileName); // Fitness scaling -// eoFitnessScalingSelect fitScaleSelect(rankingPressure); -// testSelectOne(fitScaleSelect, oRate, "fitScaleSelect"); - - // NEW Fitness scaling eoFitnessScalingSelect newFitScaleSelect(rankingPressure); - testSelectOne(newFitScaleSelect, oRate, "NewFitScaleSelect"); + sprintf(fileName,"LinFitScale_%g",rankingPressure); + testSelectOne(newFitScaleSelect, oRate, fRate, fileName); + + // Sequential selections + eoSequentialSelect seqSel(false); + strcpy(fileName,"Sequential"); + testSelectOne(seqSel, oRate, fRate, fileName); + + eoEliteSequentialSelect eliteSeqSel; + strcpy(fileName,"EliteSequential"); + testSelectOne(eliteSeqSel, oRate, fRate, fileName); return 1; } From 5bdfaf0eaa23265ca59aebd5e64fba2d966c885a Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 17 Jun 2002 09:12:08 +0000 Subject: [PATCH 0857/2134] Separated eoSequentialSelect from eoRandomSelect.h file Added eoEliteSequentialSelect, where best is always selected first, useful for G3 engine --- eo/src/eoSequentialSelect.h | 143 ++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 eo/src/eoSequentialSelect.h diff --git a/eo/src/eoSequentialSelect.h b/eo/src/eoSequentialSelect.h new file mode 100644 index 000000000..523928a18 --- /dev/null +++ b/eo/src/eoSequentialSelect.h @@ -0,0 +1,143 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSequential.h +// (c) GeNeura Team, 1998 - Maarten Keijzer 2000, Marc Schoenauer, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSequential_h +#define eoSequential_h + +/** Contains the following classes: + * - eoSequentialSelect, returns all individuals one by one, + * either sorted or shuffled + * - eoEliteSequentialSelect, returns all indivisuals one by one + * starting with best, continuing shuffled (see G3 engine) + */ + +#include +#include + +//----------------------------------------------------------------------------- +/** eoSequentialSelect: returns all individual in order + * looping back to the beginning when exhasuted + * can be from best to worse, or in random order + * + * It is the eoSelectOne equivalent of eoDetSelect - + * though eoDetSelect always returns individuals from best to worst + */ +//----------------------------------------------------------------------------- + +template class eoSequentialSelect: public eoSelectOne +{ + public: + /** Ctor: sets the current pter to MAXINT so init will take place first time + not very elegant, maybe ... + */ + eoSequentialSelect(bool _ordered = true): + ordered(_ordered), current(MAXINT) {} + + void setup(const eoPop& _pop) + { + eoPters.resize(_pop.size()); + if (ordered) // probably we could have a marker to avoid re-sorting + _pop.sort(eoPters); + else + _pop.shuffle(eoPters); + current=0; + } + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + setup(_pop); + + unsigned eoN = current; + current++; + return *eoPters[eoN] ; + } +private: + bool ordered; + unsigned current; + vector eoPters; +}; + + +//----------------------------------------------------------------------------- +/** eoEliteSequentialSelect: returns the best individual first, + * then the others in sequence (random order). + * for G3 evolution engine, see Deb, Anad and Joshi, CEC 2002 + * + * As eoSequentialSelect, it is an eoSelectOne to be used within the eoEaseyEA + * algo, but conceptually it should be a global eoSelect, as + * it selects a bunch of guys in one go (done in the setup function now) + */ + +template class eoEliteSequentialSelect: public eoSelectOne +{ + public: + + /** Ctor: sets the current pter to MAXINT so init will take place first time + not very elegant, maybe ... + */ + eoEliteSequentialSelect(): current(MAXINT) {} + + void setup(const eoPop& _pop) + { + eoPters.resize(_pop.size()); + _pop.shuffle(eoPters); + // now get the best + unsigned int ibest = 0; + const EOT * best = eoPters[0]; + if (_pop.size() == 1) + throw runtime_error("Trying eoEliteSequentialSelect with only one individual!"); + for (unsigned i=1; i<_pop.size(); i++) + if (*eoPters[i]>*best) + { + ibest = i; + best = eoPters[ibest]; + } + // and put it upfront + const EOT *ptmp = eoPters[0]; + eoPters[0]=best; + eoPters[ibest] = ptmp; + // exit after setting current + current=0; + } + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + setup(_pop); + + unsigned eoN = current; + current++; + return *eoPters[eoN] ; + } +private: + unsigned current; + vector eoPters; +}; + + +#endif + From c3aa9710a1f2692bcf86961ffd90c887e5cdf3ad Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 17 Jun 2002 09:13:47 +0000 Subject: [PATCH 0858/2134] Added the Truncation embedders, and the separate eoSequentialSelect file --- eo/src/eo | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 97ac6207b..3851a06b9 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -76,23 +76,30 @@ #endif // Selection // the eoSelectOne's -#include // also contains the eoSequentialSelect +#include +#include #include #include -#include +#include // also contains eoLinearFitScaling.h #include #include +// Embedding truncation selection +#include + // the batch selection - from an eoSelectOne #include #include #include +#include + // other batch selections -// DetSelect probably shoudl be turned into an eoSelectOne +// DetSelect can also be obtained as eoSequentialSelect, an eoSelectOne // (using setup and an index) #include // Breeders -#include +#include // applies one eoGenOp, stop on offspring count +// #include // parent + SINGLE offspring compete (e.g. DE) - not ready yet... // Replacement // #include @@ -103,7 +110,7 @@ // a simple transformer #include -// Perf2Worth +// Perf2Worth stuff - includes eoSelectFromWorth.h #include #include From 801b84fc0c12e3b58bbe733c9ac156ad4e3823bd Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 17 Jun 2002 09:18:37 +0000 Subject: [PATCH 0859/2134] Removed eoSequentialSelect --- eo/src/eoRandomSelect.h | 44 ----------------------------------------- 1 file changed, 44 deletions(-) diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index b8c5da6c9..6569207b7 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -68,50 +68,6 @@ template class eoBestSelect: public eoSelectOne } }; -//----------------------------------------------------------------------------- -/** eoSequentialSelect: returns all individual in order - * looping back to the beginning when exhasuted - * can be from best to worse, or in random order - * - * It is the eoSelectOne equivalent of eoDetSelect - - * though eoDetSelect always returns individuals from best to worst - */ -//----------------------------------------------------------------------------- - -template class eoSequentialSelect: public eoSelectOne -{ - public: - /** Ctor: sets the current pter to MAXINT so init will take place first time - not very elegant, maybe ... - */ - eoSequentialSelect(bool _ordered = true): - ordered(_ordered), current(MAXINT) {} - - void setup(const eoPop& _pop) - { - eoPters.resize(_pop.size()); - if (ordered) // probably we could have a marker to avoid re-sorting - _pop.sort(eoPters); - else - _pop.shuffle(eoPters); - current=0; - } - - virtual const EOT& operator()(const eoPop& _pop) - { - if (current >= _pop.size()) - setup(_pop); - - unsigned eoN = current; - current++; - return *eoPters[eoN] ; - } -private: - bool ordered; - unsigned current; - vector eoPters; -}; - //----------------------------------------------------------------------------- /** eoNoSelect: returns all individual in order WITHOUT USING FITNESS!!! * looping back to the beginning when exhasuted From 2779191f635f24557e377c75bf1c91326fe404c7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 17 Jun 2002 09:19:17 +0000 Subject: [PATCH 0860/2134] Added include file eoHowMany for self-consistency --- eo/src/eoTruncatedSelectOne.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoTruncatedSelectOne.h b/eo/src/eoTruncatedSelectOne.h index 8cc4db1bb..b65739c41 100644 --- a/eo/src/eoTruncatedSelectOne.h +++ b/eo/src/eoTruncatedSelectOne.h @@ -31,6 +31,7 @@ //----------------------------------------------------------------------------- #include #include +#include #include //----------------------------------------------------------------------------- From eb6e630a276cfbfb3e53263054edfcbaadcd5fdf Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 19 Jun 2002 03:42:54 +0000 Subject: [PATCH 0861/2134] Replaced ../../src with the DIR_EO macro! --- eo/tutorial/Templates/Makefile.tmpl | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/eo/tutorial/Templates/Makefile.tmpl b/eo/tutorial/Templates/Makefile.tmpl index 053c3a99b..3f1a90a26 100644 --- a/eo/tutorial/Templates/Makefile.tmpl +++ b/eo/tutorial/Templates/Makefile.tmpl @@ -1,8 +1,13 @@ # sample makefile for building an EA evolving a new genotype -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +# START eventually modify the name of EO dir +DIR_EO = ../../src +# END eventually modify the name of EO dir +LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -I./util -Wall -g -c $*.cpp +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(LIB_EO) + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp # local sources COMMON_SOURCES = eoMyStruct.h \ @@ -20,19 +25,13 @@ LIB_SOURCES = MyStructLibEA.cpp make_MyStruct.cpp SOURCES = $(COMMON_SOURCES) MyStructEA.cpp MyStructLibEA.cpp make_MyStruct.cpp -# START eventually modify the name of EO dir -DIR_EO = ../../src -# END eventually modify the name of EO dir - -LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - ALL = MyStructEA MyStructLibEA -MyStructEA : MyStructEA.o - c++ -g -o $@ MyStructEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm +MyStructEA : MyStructEA.cpp + c++ -I. -I$(DIR_EO) -g -o $@ MyStructEA.cpp $(LIB_EO) -lm MyStructLibEA : MyStructLibEA.o make_MyStruct.o - c++ -g -o $@ MyStructLibEA.o make_MyStruct.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + c++ -g -o $@ MyStructLibEA.o make_MyStruct.o $(LIB_EO) -lm tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile @@ -41,6 +40,6 @@ all : $(ALL) clean : ; /bin/rm *.o $(ALL) ########## local dependencies -MyStructEA.o : $(COMMON_SOURCES) MyStructEA.cpp +MyStructEA.cpp : $(COMMON_SOURCES) MyStructLibEA.o : $(COMMON_SOURCES) MyStructLibEA.cpp make_MyStruct.o : make_MyStruct.cpp eoMyStruct.h From 6501b48ac44c29dff795c712572ea301ac888a37 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Thu, 20 Jun 2002 12:38:47 +0000 Subject: [PATCH 0862/2134] small typo --- eo/src/gp/eoParseTreeDepthInit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index 528a9cd6a..f78142910 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -188,7 +188,7 @@ void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned in cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << endl; cerr << " This function is now obsolete and might be removed in the future so you should"<< endl; cerr << " update your code to use: " << endl << endl; - cerr << " eoParseTreeDepth(_max_depth,_initializer,_grow, bool _ramped_half_and_half)" << endl << endl; + cerr << " eoParseTreeDepthInit( _max_depth, _initializer, bool _grow, bool _ramped_half_and_half)" << endl << endl; pop.clear(); From 427ed0f5bfa029d59086b91df1cdb6ccceae5de6 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 21 Jun 2002 13:30:17 +0000 Subject: [PATCH 0863/2134] Added the negative rate (-> 1-rate) and the unary operator- (useful in eoG3Replacement) --- eo/src/utils/eoHowMany.h | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 908dce900..d3580f479 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -37,14 +37,16 @@ * if you want to select or kill just 1 guy. Using an eoHowMany * allows one to modify the population size without touching anything else. * - * There are 3 possible way to compute the return value from the argument: - * - a rate -> return rate*popSize + * There are 4 possible way to compute the return value from the argument: * - an absolute POSITIVE integer --> return rate (regardless of popsize) + * - a POSITIVE rate -> return rate*popSize * - an absolute NEGATIVE integer --> return popsize-rate - * Note that a negative rate is unnecessary because a rate is relative anyway. + * - a NEGATIVE rate -> return (1-rate)*popSize + * Note that a negative rate should be unnecessary because a rate is + * relative, but it is there for consistency reasons - and because it + * is needed in eoG3Replacement * - * It has 2 private members, a double for case 1, - * and an integer for cases 2 and 3 above + * It has 2 private members, a double and an integer to cover all cases * * Example use: in eoGeneralBreeder.h * Example reading from parser: in @@ -55,6 +57,10 @@ * when treated as a number: returns then (size - combien) * Should not modify anything when a positive number is passed in the ctor * + * MS 20/06/2002: + * Added the negative rate and the operator-() (for + * eoG3Repalcement) + * * It is an eoPersistent because we need to be able to use eoParamValue */ @@ -71,14 +77,16 @@ public: if (_interpret_as_rate) { if (_rate<0) - throw std::logic_error("Negative rate in eoHowMany!"); + rate = 1.0-rate; + if (rate > 1.0) + throw std::logic_error("rate>1 in eoHowMany!"); } else { rate = 0.0; // just in case, but shoud be unused combien = int(_rate); // negative values are allowed here if (combien != _rate) - cout << "Warning: Number was rounded in eoHowMany"; + cerr << "Warning: Number was rounded in eoHowMany"; } } @@ -125,7 +133,7 @@ public: } virtual void readFrom(istream& _is) - { + { string value; _is >> value; readFrom(value); @@ -157,6 +165,16 @@ public: if ( rate <= 0.0 ) throw runtime_error("Negative rate read in eoHowMany::readFrom"); } + + /** The unary - operator: reverses the computation */ + eoHowMany operator-() + { + if (!combien) // only rate is used + rate = 1.0-rate; + else + combien = -combien; + return (*this); + } private : double rate; From e2e876790274513d5f38ac4c08b77d639e6cdf77 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 21 Jun 2002 13:50:39 +0000 Subject: [PATCH 0864/2134] Changd a const_iterator to iterator in method it_best_element God (or Maarten :-) knows why this was there --- eo/src/eoPop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 353c1302b..bcd49c9f4 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -161,7 +161,7 @@ class eoPop: public vector, public eoObject, public eoPersistent /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ eoPop::iterator it_best_element() { - typename eoPop::const_iterator it = max_element(begin(), end()); + typename eoPop::iterator it = max_element(begin(), end()); return it; } From a7a1ed2326c6bf0ea86b2f3126769beeae781f9e Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 6 Jul 2002 05:23:18 +0000 Subject: [PATCH 0865/2134] I had left a flaw in teh Ctor (did not accept rates >1) --- eo/src/utils/eoHowMany.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index d3580f479..917b41da8 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -38,11 +38,11 @@ * allows one to modify the population size without touching anything else. * * There are 4 possible way to compute the return value from the argument: - * - an absolute POSITIVE integer --> return rate (regardless of popsize) - * - a POSITIVE rate -> return rate*popSize - * - an absolute NEGATIVE integer --> return popsize-rate - * - a NEGATIVE rate -> return (1-rate)*popSize - * Note that a negative rate should be unnecessary because a rate is + * - an absolute POSITIVE integer --> return it (regardless of popsize) + * - a POSITIVE rate --> return rate*popSize + * - an absolute NEGATIVE integer --> return popsize-rate (if positive) + * - a NEGATIVE rate in [-1,0] --> store and use 1-|rate| (positive) + * Note that a negative rate should be have been necessary because a rate is * relative, but it is there for consistency reasons - and because it * is needed in eoG3Replacement * @@ -77,9 +77,11 @@ public: if (_interpret_as_rate) { if (_rate<0) - rate = 1.0-rate; - if (rate > 1.0) - throw std::logic_error("rate>1 in eoHowMany!"); + { + rate = 1.0+_rate; + if (rate < 0) // was < -1 + throw std::logic_error("rate<-1 in eoHowMany!"); + } } else { From 7f550d008e88160a4438a28e3da400a0dfc12702 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 6 Jul 2002 05:24:51 +0000 Subject: [PATCH 0866/2134] Added eoSequentialSelect.h in the includes --- eo/src/do/make_algo_scalar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 98e769f3a..7ec834bf0 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -32,7 +32,8 @@ // Selection // the eoSelectOne's -#include // also contains the eoSequentialSelect +#include +#include #include #include #include From 3b6a88f34e128ebabaef11d1680de7d620028e0d Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 22 Jul 2002 13:20:04 +0000 Subject: [PATCH 0867/2134] Added 'sweepline' optimization for eoNDSorting.h --- eo/src/eoNDSorting.h | 227 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 199 insertions(+), 28 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index b2d49c934..4c442492c 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -28,6 +28,7 @@ #define eoNDSorting_h #include +#include #include /** @@ -40,34 +41,56 @@ class eoNDSorting : public eoPerf2WorthCached { public : - /** Pure virtual function that calculates the 'distance' for each element to the current front + /** Pure virtual function that calculates the 'distance' for each element in the current front Implement to create your own nondominated sorting algorithm. The size of the returned vector should be equal to the size of the current_front. */ virtual vector niche_penalty(const vector& current_front, const eoPop& _pop) = 0; - /** implements fast nondominated sorting + void calculate_worths(const eoPop& _pop) + { + // resize the worths beforehand + value().resize(_pop.size()); + + typedef typename EOT::Fitness::fitness_traits traits; + + switch (traits::nObjectives()) + { + case 1: + { + one_objective(_pop); + return; + } + case 2: + { + two_objectives(_pop); + return; + } + default : + { + m_objectives(_pop); + } + } + } + +private : + + /** used in fast nondominated sorting + DummyEO is just a storage place for fitnesses and + to store the original index */ class DummyEO : public EO { public: unsigned index; }; - void calculate_worths(const eoPop& _pop) + void one_objective(const eoPop& _pop) { - unsigned i; - value().resize(_pop.size()); - - typedef typename EOT::Fitness::fitness_traits traits; - - if (traits::nObjectives() == 1) - { // no need to do difficult sorting, - - eoPop tmp_pop; + eoPop tmp_pop; tmp_pop.resize(_pop.size()); // copy pop to dummy population (only need the fitnesses) - for (i = 0; i < _pop.size(); ++i) + for (unsigned i = 0; i < _pop.size(); ++i) { tmp_pop[i].fitness(_pop[i].fitness()); tmp_pop[i].index = i; @@ -77,13 +100,164 @@ class eoNDSorting : public eoPerf2WorthCached tmp_pop.sort(); // - for (i = 0; i < _pop.size(); ++i) + for (unsigned i = 0; i < _pop.size(); ++i) { value()[tmp_pop[i].index] = _pop.size() - i; // set rank } + + // no point in calculcating niche penalty, as every distinct fitness value has a distinct rank + } + + /** + * Optimization for two objectives. Makes the algorithm run in + * complexity O(n log n) where n is the population size + * + * This is the same complexity as for a single objective + * or truncation selection or sorting. A paper about this + * algorithm is quite likely forthcoming. + * + * It will perform a sort on the two objectives seperately, + * and from the information on the ranks of the individuals on + * these two objectives, the non-dominated sorting rank is determined. + * There are then three nlogn operations in place: one sort per objective, + * plus a binary search procedure to combine the information about the + * ranks. + * + * After that it is a simple exercise to calculate the distance + * penalty + */ + + void two_objectives(const eoPop& _pop) + { + typedef typename EOT::Fitness::fitness_traits traits; + assert(traits::nObjectives() == 2); + + vector sort1(_pop.size()); // index into population sorted on first objective + + for (unsigned i = 0; i < _pop.size(); ++i) + { + sort1[i] = i; + } - return; - } + sort(sort1.begin(), sort1.end(), Sorter(_pop)); + + // Ok, now the meat of the algorithm + + unsigned last_front = 0; + + double max1 = -1e+20; + for (unsigned i = 0; i < _pop.size(); ++i) + { + max1 = max(max1, _pop[i].fitness()[1]); + } + + max1 = max1 + 1.0; // add a bit to it so that it is a real upperbound + + unsigned prev_front = 0; + vector d; + d.resize(_pop.size(), max1); // initialize with the value max1 everywhere + + vector > fronts(_pop.size()); // to store indices into the front + + for (unsigned i = 0; i < _pop.size(); ++i) + { + unsigned index = sort1[i]; + + // check for clones and delete them + if (0 && i > 0) + { + unsigned prev = sort1[i-1]; + if ( _pop[index].fitness() == _pop[prev].fitness()) + { // it's a clone + fronts[prev_front].push_back(index); + continue; + } + } + + double value2 = _pop[index].fitness()[1]; + + if (traits::maximizing(1)) + value2 = max1 - value2; + + // perform binary search using std::upper_bound, a log n operation for each member + vector::iterator it = + std::upper_bound(d.begin(), d.begin() + last_front, value2); + + unsigned front = unsigned(it - d.begin()); + if (front == last_front) ++last_front; + + assert(it != d.end()); + + *it = value2; //update d + fronts[front].push_back(index); // add it to the front + + prev_front = front; + } + + // ok, and finally the niche penalty + + for (unsigned i = 0; i < fronts.size(); ++i) + { + if (fronts[i].size() == 0) continue; + + // Now we have the indices to the current front in current_front, do the niching + vector niche_count = niche_penalty(fronts[i], _pop); + + // Check whether the derived class was nice + if (niche_count.size() != fronts[i].size()) + { + throw logic_error("eoNDSorting: niche and front should have the same size"); + } + + double max_niche = *max_element(niche_count.begin(), niche_count.end()); + + for (unsigned j = 0; j < fronts[i].size(); ++j) + { + value()[fronts[i][j]] = i + niche_count[j] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next + } + + } + + // invert ranks to obtain a 'bigger is better' score + rank_to_worth(); + } + + class Sorter + { + public: + Sorter(const eoPop& _pop) : pop(_pop) {} + + bool operator()(unsigned i, unsigned j) const + { + typedef typename EOT::Fitness::fitness_traits traits; + + double diff = pop[i].fitness()[0] - pop[j].fitness()[0]; + + if (fabs(diff) < traits::tol()) + { + diff = pop[i].fitness()[1] - pop[j].fitness()[1]; + + if (fabs(diff) < traits::tol()) + return false; + + if (traits::maximizing(1)) + return diff > 0.; + return diff < 0.; + } + + if (traits::maximizing(0)) + return diff > 0.; + return diff < 0.; + } + + const eoPop& pop; + }; + + void m_objectives(const eoPop& _pop) + { + unsigned i; + + typedef typename EOT::Fitness::fitness_traits traits; vector > S(_pop.size()); // which individuals does guy i dominate vector n(_pop.size(), 0); // how many individuals dominate guy i @@ -120,8 +294,6 @@ class eoNDSorting : public eoPerf2WorthCached } } - unsigned first_front_size = current_front.size(); - vector next_front; next_front.reserve(_pop.size()); @@ -165,24 +337,22 @@ class eoNDSorting : public eoPerf2WorthCached next_front.clear(); // clear it for the next iteration } + rank_to_worth(); + } + + void rank_to_worth() + { // now all that's left to do is to transform lower rank into higher worth double max_fitness = *std::max_element(value().begin(), value().end()); // but make sure it's an integer upper bound, so that all ranks inside the highest integer are the front max_fitness = ceil(max_fitness); - - unsigned nfirst = 0; - - for (i = 0; i < value().size(); ++i) + + for (unsigned i = 0; i < value().size(); ++i) { value()[i] = max_fitness - value()[i]; - assert(n[i] == 0); - - if (value()[i] > (max_fitness-1)) // this would be the test for 'front_ness' - nfirst++; } - assert(nfirst == first_front_size); } }; @@ -254,6 +424,7 @@ class eoNDSorting_II : public eoNDSorting } }; + /// _cf points into the elements that consist of the current front vector niche_penalty(const vector& _cf, const eoPop& _pop) { unsigned i; @@ -288,7 +459,7 @@ class eoNDSorting_II : public eoNDSorting for (i = 0; i < nc.size(); ++i) { - niche_count[i] += (max_dist + 1) - nc[i]; + niche_count[i] = (max_dist + 1) - nc[i]; } } From c55fcdbb3f8c329ca848105a213dac865e0a82ec Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 22 Jul 2002 13:31:55 +0000 Subject: [PATCH 0868/2134] added a 'nasty_declone_flag' to be able to declone a population --- eo/src/eoNDSorting.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 4c442492c..fa4e2981b 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -40,7 +40,10 @@ template class eoNDSorting : public eoPerf2WorthCached { public : - + + eoNDSorting() : nasty_declone_flag_that_only_is_implemented_for_two_objectives(false) + {} + /** Pure virtual function that calculates the 'distance' for each element in the current front Implement to create your own nondominated sorting algorithm. The size of the returned vector should be equal to the size of the current_front. @@ -113,8 +116,7 @@ private : * complexity O(n log n) where n is the population size * * This is the same complexity as for a single objective - * or truncation selection or sorting. A paper about this - * algorithm is quite likely forthcoming. + * or truncation selection or sorting. * * It will perform a sort on the two objectives seperately, * and from the information on the ranks of the individuals on @@ -168,8 +170,13 @@ private : { unsigned prev = sort1[i-1]; if ( _pop[index].fitness() == _pop[prev].fitness()) - { // it's a clone - fronts[prev_front].push_back(index); + { // it's a clone, give it the worst rank! + + if (nasty_declone_flag_that_only_is_implemented_for_two_objectives) + //declone + fronts.back().push_back(index); + else // assign it the rank of the previous + ronts[prev_front].push_back(index); continue; } } @@ -354,6 +361,7 @@ private : } } + public : bool nasty_declone_flag_that_only_is_implemented_for_two_objectives; }; /** From 7e5907eae245fe102033c5e949c78e9394a4b0e1 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 22 Jul 2002 13:35:11 +0000 Subject: [PATCH 0869/2134] oops, that should teach me to compile before commit --- eo/src/eoNDSorting.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index fa4e2981b..c6dccbfb2 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -176,7 +176,7 @@ private : //declone fronts.back().push_back(index); else // assign it the rank of the previous - ronts[prev_front].push_back(index); + fronts[prev_front].push_back(index); continue; } } From 5914ad91956e543c44dc0ccd47b1b14f7c218be0 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 23 Jul 2002 09:17:59 +0000 Subject: [PATCH 0870/2134] Run it for 50 generations, it's too fast otherwise :) --- eo/test/t-eoPareto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index b79c2f0ac..6a1f748e2 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -165,7 +165,7 @@ void the_main(int argc, char* argv[]) eoParser parser(argc, argv); eoState state; - unsigned num_gen = parser.createParam(unsigned(10), "num_gen", "number of generations to run", 'g').value(); + unsigned num_gen = parser.createParam(unsigned(50), "num_gen", "number of generations to run", 'g').value(); unsigned pop_size = parser.createParam(unsigned(100), "pop_size", "population size", 'p').value(); eoPop pop(pop_size, init); From 030be821326dd8b5a81460bbedc701b7210c5f60 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 23 Jul 2002 09:34:46 +0000 Subject: [PATCH 0871/2134] added EO.h to include list --- eo/src/eoNDSorting.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index c6dccbfb2..a0f726565 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -27,6 +27,7 @@ #ifndef eoNDSorting_h #define eoNDSorting_h +#include #include #include #include From bc7aee869fc4e6dc7ea5214be8711b22659a07e7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 24 Jul 2002 18:05:18 +0000 Subject: [PATCH 0872/2134] There was a problem with the activation of the Ctrl C --- eo/src/do/make_continue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 5d36f3bec..38cd0adae 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -134,7 +134,7 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu // the CtrlC interception (Linux only I'm afraid) eoCtrlCContinue *ctrlCCont; eoValueParam& ctrlCParam = _parser.createParam(false, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); - if (_parser.isItThere(ctrlCParam)) + if (ctrlCParam.value()) { ctrlCCont = new eoCtrlCContinue; // store From 98a1441137b0ad8de71279dbdb53e172d578742e Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 24 Jul 2002 18:08:30 +0000 Subject: [PATCH 0873/2134] A radical change in eoCheckPoint - though invisible from the outside: eoCheckpoint now alos contains a vector - and not only IS A eoContinue. So you can ADD another eoContinue to an eoCheckpoint... --- eo/src/utils/eoCheckPoint.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 4e74fe2f3..1117d706e 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -33,22 +33,28 @@ #include /** eoCheckPoint is a container class. - It contains an eoContinue, and vertors of (pointers to) + It contains vectors of (pointers to) + eoContinue (modif. MS July 16. 2002) eoStats, eoUpdater and eoMonitor it is an eoContinue, so its operator() will be called every generation - - and will return the contained-eoContinue result + and will return the contained-combined-eoContinue result but before that it will call in turn every single - {statistics, updaters, monitors} that it has been given. + {statistics, updaters, monitors} that it has been given, + and after that, if stopping, all lastCall methods of the above. */ template class eoCheckPoint : public eoContinue { public : - eoCheckPoint(eoContinue& _cont) : cont(_cont) {} + eoCheckPoint(eoContinue& _cont) + { + continuators.push_back(&_cont); + } bool operator()(const eoPop& _pop); + void add(eoContinue& _cont) { continuators.push_back(&_cont); } void add(eoSortedStatBase& _stat) { sorted.push_back(&_stat); } void add(eoStatBase& _stat) { stats.push_back(&_stat); } void add(eoMonitor& _mon) { monitors.push_back(&_mon); } @@ -58,7 +64,7 @@ public : private : - eoContinue& cont; + std::vector*> continuators; std::vector*> sorted; std::vector*> stats; std::vector monitors; @@ -90,7 +96,10 @@ bool eoCheckPoint::operator()(const eoPop& _pop) for (i = 0; i < monitors.size(); ++i) (*monitors[i])(); - bool bContinue = cont(_pop); + bool bContinue = true; + for (unsigned i = 0; i < continuators.size(); ++i) + if ( !(*continuators[i])(_pop) ) + bContinue = false; if (! bContinue) // we're going to stop: lastCall, gentlemen { From 4ec08e8b103e1e5681413035cc15aa067a6c3662 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 28 Jul 2002 05:40:25 +0000 Subject: [PATCH 0874/2134] Added eoReduceMergeReduce and elitism (+ corrected small bug in eoHowMany) --- eo/src/utils/eoHowMany.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 917b41da8..5a413a305 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -164,7 +164,7 @@ public: combien = int(rate); // and rate will not be used // minimal check - if ( rate <= 0.0 ) + if ( rate < 0.0 ) throw runtime_error("Negative rate read in eoHowMany::readFrom"); } From 0caf6259e9c3a6a757f6db9446b80f0fce315bec Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Jul 2002 03:21:59 +0000 Subject: [PATCH 0875/2134] Removed a typo that made gnuplot file not be in the RESULT directory --- eo/src/do/make_checkpoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index c9477bd36..333e3c8b8 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -211,7 +211,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval #if !defined(NO_GNUPLOT) if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average { - string stmp = dirNameParam.value() + "_gnu_best.xg"; + string stmp = dirNameParam.value() + "/gnu_best.xg"; eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); // save and give to checkpoint _state.storeFunctor(gnuMonitor); From 86c7c8fe958caed3a08f2caa3f1c68a9f9a41619 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 2 Aug 2002 07:40:47 +0000 Subject: [PATCH 0876/2134] Removed some multiple declaraions inside for loops that MSVC++ doesn't like --- eo/src/eoNDSorting.h | 18 ++++++++++-------- eo/src/utils/eoCheckPoint.h | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index a0f726565..e8562194c 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -89,12 +89,13 @@ private : }; void one_objective(const eoPop& _pop) - { + { + unsigned i; eoPop tmp_pop; tmp_pop.resize(_pop.size()); // copy pop to dummy population (only need the fitnesses) - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { tmp_pop[i].fitness(_pop[i].fitness()); tmp_pop[i].index = i; @@ -104,7 +105,7 @@ private : tmp_pop.sort(); // - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { value()[tmp_pop[i].index] = _pop.size() - i; // set rank } @@ -131,13 +132,14 @@ private : */ void two_objectives(const eoPop& _pop) - { + { + unsigned i; typedef typename EOT::Fitness::fitness_traits traits; assert(traits::nObjectives() == 2); vector sort1(_pop.size()); // index into population sorted on first objective - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { sort1[i] = i; } @@ -149,7 +151,7 @@ private : unsigned last_front = 0; double max1 = -1e+20; - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { max1 = max(max1, _pop[i].fitness()[1]); } @@ -162,7 +164,7 @@ private : vector > fronts(_pop.size()); // to store indices into the front - for (unsigned i = 0; i < _pop.size(); ++i) + for (i = 0; i < _pop.size(); ++i) { unsigned index = sort1[i]; @@ -204,7 +206,7 @@ private : // ok, and finally the niche penalty - for (unsigned i = 0; i < fronts.size(); ++i) + for (i = 0; i < fronts.size(); ++i) { if (fronts[i].size() == 0) continue; diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 1117d706e..729a0c742 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -97,7 +97,7 @@ bool eoCheckPoint::operator()(const eoPop& _pop) (*monitors[i])(); bool bContinue = true; - for (unsigned i = 0; i < continuators.size(); ++i) + for (i = 0; i < continuators.size(); ++i) if ( !(*continuators[i])(_pop) ) bContinue = false; From 18cd20da78d48f9fc517006fd819234f0605c156 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:41:00 +0000 Subject: [PATCH 0877/2134] Added bounds to FitnessStat and Gnuplot monitor --- eo/src/utils/eoGnuplot.h | 12 ++++++++++- eo/src/utils/eoGnuplot1DSnapshot.h | 34 ++++++++++++++++++++++++++++++ eo/src/utils/eoScalarFitnessStat.h | 20 +++++++++++++----- 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 24efca0ee..f53b6b5b2 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -77,6 +77,16 @@ class eoGnuplot } } + /** send a command to gnuplot directly + */ + void gnuplotCommand(char * _command) + { + if( gpCom ) { + PipeComSend( gpCom, _command ); + PipeComSend( gpCom, "\n" ); + } + } + protected: void initGnuPlot(std::string _title, std::string _extra); @@ -129,7 +139,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.4 2001-09-08 05:59:17 evomarc Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.5 2002-08-23 15:40:59 evomarc Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 919f1b318..ce5707343 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -28,6 +28,7 @@ #define _eoGnuplot1DSnapshot_H #include +#include #include #include @@ -43,6 +44,7 @@ This class plots through gnuplot the eoStat given as argument //----------------------------------------------------------------------------- #include +#include "eoRealVectorBounds.h" #include @@ -62,6 +64,16 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot pointSize(5) {} + // Ctor + eoGnuplot1DSnapshot(std::string _dirname, eoRealVectorBounds & _bounds, + unsigned _frequency = 1, + std::string _filename = "gen", std::string _delim = " ") : + eoFileSnapshot(_dirname, _frequency, _filename, _delim), + eoGnuplot(_filename,"set data style points"), + pointSize(5) + { + handleBounds(_bounds); + } // Ctor eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot) : eoFileSnapshot(_fSnapshot), @@ -69,6 +81,15 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot pointSize(5) {} + // Ctor with range + eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot, eoRealVectorBounds & _bounds) : + eoFileSnapshot(_fSnapshot), + eoGnuplot(_fSnapshot.baseFileName(),"set data style points"), + pointSize(5) + { + handleBounds(_bounds); + } + // Dtor virtual ~eoGnuplot1DSnapshot(){} @@ -77,6 +98,19 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot /// Class name. virtual string className() const { return "eoGnuplot1DSnapshot"; } + virtual void handleBounds(eoRealVectorBounds & _bounds) + { + ostringstream os; + os << "set autoscale\nset yrange [" ; + if (_bounds.isMinBounded(0)) + os << _bounds.minimum(0); + os << ":" ; + if (_bounds.isMaxBounded(0)) + os << _bounds.maximum(0); + os << "]\n"; + gnuplotCommand(os.str()); + } + unsigned pointSize; private: diff --git a/eo/src/utils/eoScalarFitnessStat.h b/eo/src/utils/eoScalarFitnessStat.h index acfcae5d8..9bf8b0174 100644 --- a/eo/src/utils/eoScalarFitnessStat.h +++ b/eo/src/utils/eoScalarFitnessStat.h @@ -27,6 +27,7 @@ #ifndef _eoScalarFitnessStat_h #define _eoScalarFitnessStat_h +#include #include /** @@ -36,15 +37,24 @@ template class eoScalarFitnessStat : public eoSortedStat > { public : - eoScalarFitnessStat(std::string _description = "FitnessES") : - eoSortedStat >(vector(0), _description) {} - - virtual void operator()(const vector& _popPters) + eoScalarFitnessStat(std::string _description = "FitnessES", + eoRealVectorBounds & _bounds = eoDummyVectorNoBounds) : + eoSortedStat >(vector(0), _description) , + range(*_bounds[0]) + {} + + virtual void operator()(const vector& _popPters) { value().resize(_popPters.size()); for (unsigned i=0; i<_popPters.size(); i++) - value()[i] = _popPters[i]->fitness(); + { + value()[i] = _popPters[i]->fitness(); + range.truncate(value()[i]); + } } + +private : + eoRealBounds & range; }; #endif From 5274c852f1b7408c39bf8f0446bf58a519070987 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:44:27 +0000 Subject: [PATCH 0878/2134] Tiny details --- eo/src/do/make_checkpoint.h | 2 +- eo/src/do/make_continue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 333e3c8b8..176c476b5 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -201,7 +201,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval fileMonitor->add(_eval); if (tCounter) // we want the time as well { - cout << "On met timecounter\n"; + // cout << "On met timecounter\n"; fileMonitor->add(*tCounter); } fileMonitor->add(*bestStat); diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 38cd0adae..750df2855 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -70,7 +70,7 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu // First the eoGenContinue - need a default value so you can run blind // but we also need to be able to avoid it <--> 0 - eoValueParam& maxGenParam = _parser.createParam(unsigned(100), "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); + eoValueParam& maxGenParam = _parser.getORcreateParam(unsigned(100), "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); if (maxGenParam.value()) // positive: -> define and store { From 6c2539d81f9aa623fa580e8dd305f13d4b56368f Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:49:29 +0000 Subject: [PATCH 0879/2134] Added the invalidate method --- eo/src/eoPop.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index bcd49c9f4..b880717b2 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -282,6 +282,13 @@ class eoPop: public vector, public eoObject, public eoPersistent virtual string className() const {return "eoPop";}; //@} + virtual void invalidate() + { + for (unsigned i=0; ioperator[](i).invalidate(); + } + + protected: }; From c856f433b23df7b34655de3352c35691455a4ab8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:50:57 +0000 Subject: [PATCH 0880/2134] Adding eoSGAGenOp.h - mimicking eoSGATransform into an eoGenOp --- eo/src/eo | 2 + eo/src/eoSGAGenOp.h | 141 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 eo/src/eoSGAGenOp.h diff --git a/eo/src/eo b/eo/src/eo index 3851a06b9..f1b91a005 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -57,6 +57,8 @@ #include // combinations of simple eoOps (eoMonOp and eoQuadOp) #include +// didactic (mimics SGA-like variation into an eoGenOp) +#include // population #include diff --git a/eo/src/eoSGAGenOp.h b/eo/src/eoSGAGenOp.h new file mode 100644 index 000000000..262e662b3 --- /dev/null +++ b/eo/src/eoSGAGenOp.h @@ -0,0 +1,141 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSGAGenOp.h +// (c) Marc.Schoenauer 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSGAGenOp_h +#define _eoSGAGenOp_h + +#include "eoGenOp.h" +#include "eoInvalidateOps.h" +/////////////////////////////////////////////////////////////////////////////// +// class eoSGAGenOp +/////////////////////////////////////////////////////////////////////////////// + +/** *************************************************************************** + * eoSGAGenOp (for Simple GA) mimicks the usual crossover with proba pCross + + * mutation with proba pMut inside an eoGeneralOp + * It does it exactly as class eoSGATransform, i.e. only accepts + * quadratic crossover and unary mutation + * It was introduced for didactic reasons, but seems to be popular :-) + *****************************************************************************/ +template +class eoSGAGenOp : public eoGenOp +{ + public: + + /** Ctor from crossover (with proba) and mutation (with proba) + * Builds the sequential op that first applies a proportional choice + * between the crossover and nothing (cloning), then the mutation + */ + eoSGAGenOp(eoQuadOp& _cross, double _pCross, + eoMonOp& _mut, double _pMut) + : cross(_cross), + pCross(_pCross), + mut(_mut), + pMut(_pMut) + { + // the crossover - with probability pCross + propOp.add(cross, pCross); // crossover, with proba pcross + propOp.add(quadClone, 1-pCross); // nothing, with proba 1-pcross + + // now the sequential + op.add(propOp, 1.0); // always do combined crossover + op.add(mut, pMut); // then mutation, with proba pmut + } + + /** do the job: delegate to op */ + virtual void apply(eoPopulator& _pop) + { + op.apply(_pop); + } + + /** inherited from eoGenOp */ + virtual unsigned max_production(void) {return 2;} + + virtual string className() const {return "eoSGAGenOp";} + + + private: + eoQuadOp ✗ // eoInvalidateXXX take the boolean output + double pCross; + eoMonOp & mut; // of the XXX op and invalidate the EOT + double pMut; + eoProportionalOp propOp; + eoQuadCloneOp quadClone; + eoSequentialOp op; +}; + +/** *************************************************************************** + * eoASGAGenOp (for Almost Simple GE) mimicks proportional application of + * one crossover and one mutation, together with a clone operator, each one + * with relative weights. + * This is the other almost-standard application of variation operators + * (see eoSGAGenOp for the completely standard). + *****************************************************************************/ +template +class eoASGAGenOp : public eoGenOp +{ + public: + + /** Ctor from crossover (with proba) and mutation (with proba) + * Builds the sequential op that first applies a proportional choice + * between the crossover and nothing (cloning), then the mutation + */ + eoASGAGenOp(eoQuadOp& _cross, double _pCross, + eoMonOp& _mut, double _pMut, double _pCopy) + : cross(_cross), + pCross(_pCross), + mut(_mut), + pMut(_pMut), + pCopy(_pCopy) + { + op.add(cross, pCross); // crossover, with proba pcross + op.add(quadClone, pCopy); // nothing, with proba pCopy + op.add(mut, pMut); // mutation, with proba pmut + } + + /** do the job: delegate to op */ + virtual void apply(eoPopulator& _pop) + { + op.apply(_pop); + } + + /** inherited from eoGenOp */ + virtual unsigned max_production(void) {return 2;} + + virtual string className() const {return "eoASGAGenOp";} + + + private: + eoQuadOp ✗ // eoInvalidateXXX take the boolean output + double pCross; + eoMonOp & mut; // of the XXX op and invalidate the EOT + double pMut; + eoMonCloneOp monClone; + eoProportionalOp op; +}; + + +#endif From 7bf32a66fd13766b499859733fe362422ffb65af Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:52:40 +0000 Subject: [PATCH 0881/2134] Adding make_xxx files for EASEA --- eo/src/do/make_algo_easea.h | 368 +++++++++++++++++++++++++++ eo/src/do/make_general_replacement.h | 173 +++++++++++++ 2 files changed, 541 insertions(+) create mode 100644 eo/src/do/make_algo_easea.h create mode 100644 eo/src/do/make_general_replacement.h diff --git a/eo/src/do/make_algo_easea.h b/eo/src/do/make_algo_easea.h new file mode 100644 index 000000000..605264b9a --- /dev/null +++ b/eo/src/do/make_algo_easea.h @@ -0,0 +1,368 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_easea.h +// (c) Marc Schoenauer and Pierre Collet, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Pierre.Collet@polytechnique.fr + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_algo_easea_h +#define _make_algo_easea_h + +#include // for eo_is_a_rate +// everything tha's needed for the algorithms - SCALAR fitness + +// Selection +// the eoSelectOne's +#include +#include +#include +#include +#include +#include +#include +// #include included in all others + +// Breeders +#include + +// Replacement +#include "make_general_replacement.h" +#include "eoMGGReplacement.h" +#include "eoG3Replacement.h" + + +// Algorithm (only this one needed) +#include + + // also need the parser and param includes +#include +#include + + +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here +*/ + +template +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + // the selection + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t), Sequential(ordered/unordered) or EliteSequentialSelect", 'S', "Evolution Engine"); + + eoParamParamType & ppSelect = selectionParam.value(); // pair > + + eoSelectOne* select ; + if (ppSelect.first == string("DetTour")) + { + unsigned detSize; + + if (!ppSelect.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + select = new eoDetTournamentSelect(detSize); + } + else if (ppSelect.first == string("StochTour")) + { + double p; + if (!ppSelect.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + + select = new eoStochTournamentSelect(p); + } + else if (ppSelect.first == string("Ranking")) + { + double p,e; + if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent + { + p = atof(ppSelect.second[0].c_str()); + e = atof(ppSelect.second[1].c_str()); + } + else if (ppSelect.second.size()==1) // 1 parameter: pressure + { + cerr << "WARNING, no exponent to Ranking, using 1" << endl; + e = 1; + ppSelect.second.push_back(string("1")); + p = atof(ppSelect.second[0].c_str()); + } + else // no parameters ... or garbage + { + cerr << "WARNING, no parameter to Ranking, using (2,1)" << endl; + p=2; + e=1; + // put back in parameter for consistency (and status file) + ppSelect.second.resize(2); // just in case + ppSelect.second[0] = (string("2")); + ppSelect.second[1] = (string("1")); + } + // check for authorized values + // pressure in (0,1] + if ( (p<=1) || (p>2) ) + { + cerr << "WARNING, selective pressure must be in (1,2] in Ranking, using 2\n"; + p=2; + ppSelect.second[0] = (string("2")); + } + // exponent >0 + if (e<=0) + { + cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + e=1; + ppSelect.second[1] = (string("1")); + } + // now we're OK + eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); + select = new eoRouletteWorthSelect(p2w); + } + else if (ppSelect.first == string("Sequential")) // one after the other + { + bool b; + if (ppSelect.second.size() == 0) // no argument -> default = ordered + { + b=true; + // put back in parameter for consistency (and status file) + ppSelect.second.push_back(string("ordered")); + } + else + b = !(ppSelect.second[0] == string("unordered")); + select = new eoSequentialSelect(b); + } + else if (ppSelect.first == string("EliteSequential")) // Best first, one after the other in random order afterwards + { + select = new eoEliteSequentialSelect; + } + else if (ppSelect.first == string("Roulette")) // no argument (yet) + { + select = new eoProportionalSelect; + } + else if (ppSelect.first == string("Random")) // no argument + { + select = new eoRandomSelect; + } + else + { + string stmp = string("Invalid selection: ") + ppSelect.first; + throw runtime_error(stmp.c_str()); + } + + _state.storeFunctor(select); + + // the number of offspring + eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); + + ///////////////////////////////////////////////////// + // the replacement + ///////////////////////////////////////////////////// + + /** Replacement type - high level: predefined replacements + * ESComma : + * elite = 0 + * surviveParents=0 (no reduce) + * surviveOffspring=100% (no reduce) + * reduceFinal = Deterministic + * + * ESPlus : idem, except for + * surviveParents = 100% + * + * GGA : generational GA - idem ESComma except for + * offspringRate = 100% + * all reducers are unused + * + * SSGA(T/t) : Steady-State GA + * surviveParents = 1.0 - offspringRate + * reduceFinal = DetTour(T>1) ou StochTour(0.5 * ptReplace; + + // first, separate G3 and MGG + // maybe one day we have a common class - but is it really necessary??? + if (replacementParam.first == string("G3")) + { + // reduce the parents: by default, survive parents = -2 === 2 parents die + eoHowMany surviveParents = _parser.createParam(eoHowMany(-2,false), "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + // at the moment, this is the only argument + ptReplace = new eoG3Replacement(-surviveParents); // must receive nb of eliminated parets! + _state.storeFunctor(ptReplace); + } + else if (replacementParam.first == string("MGG")) + { + float t; + unsigned tSize; + // reduce the parents: by default, survive parents = -2 === 2 parents die + eoHowMany surviveParents = _parser.createParam(eoHowMany(-2,false), "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + // the tournament size + if (!replacementParam.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to MGG replacement, using 2" << endl; + tSize = 2; + // put back 2 in parameter for consistency (and status file) + replacementParam.second.push_back(string("2")); + } + else + { + t = atof(replacementParam.second[0].c_str()); + if (t>=2) + { // build the appropriate deafult value + tSize = unsigned(t); + } + else + { + throw runtime_error("Sorry, only deterministic tournament available at the moment"); + } + } + ptReplace = new eoMGGReplacement(-surviveParents, tSize); + _state.storeFunctor(ptReplace); + } + else { // until the end of what was the only loop/switch + + // the default deafult values + eoHowMany elite (0.0); + bool strongElitism (false); + eoHowMany surviveParents (0.0); + eoParamParamType reduceParentType ("Deterministic"); + eoHowMany surviveOffspring (1.0); + eoParamParamType reduceOffspringType ("Deterministic"); + eoParamParamType reduceFinalType ("Deterministic"); + + // depending on the value entered by the user, change some of the above + double t; + + // ---------- General + if (replacementParam.first == string("General")) + { + ; // defaults OK + } + // ---------- ESComma + else if (replacementParam.first == string("ESComma")) + { + ; // OK too + } + // ---------- ESPlus + else if (replacementParam.first == string("ESPlus")) + { + surviveParents = eoHowMany(1.0); + } + // ---------- Generational + else if (replacementParam.first == string("Generational")) + { + ; // OK too (we should check nb of offspring) + } + // ---------- EP + else if (replacementParam.first == string("EP")) + { + if (!replacementParam.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to EP replacement, using 6" << endl; + // put back 6 in parameter for consistency (and status file) + replacementParam.second.push_back(string("6")); + } + // by coincidence, the syntax for the EP reducer is the same than here: + reduceFinalType = replacementParam; + surviveParents = eoHowMany(1.0); + } + // ---------- SSGA + else if (replacementParam.first == string("SSGA")) + { + if (!replacementParam.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to SSGA replacement, using 2" << endl; + // put back 2 in parameter for consistency (and status file) + replacementParam.second.push_back(string("2")); + reduceParentType = eoParamParamType(string("DetTour(2)")); + } + else + { + t = atof(replacementParam.second[0].c_str()); + if (t>=2) + { // build the appropriate deafult value + reduceParentType = eoParamParamType(string("DetTour(") + replacementParam.second[0].c_str() + ")"); + } + else // check for [0.5,1] will be made in make_general_replacement + { // build the appropriate deafult value + reduceParentType = eoParamParamType(string("StochTour(") + replacementParam.second[0].c_str() + ")"); + } + } + // + surviveParents = eoHowMany(-1); + surviveOffspring = eoHowMany(1); + } + else // no replacement recognized + { + throw runtime_error("Invalid replacement type " + replacementParam.first); + } + + ptReplace = & make_general_replacement( + _parser, _state, elite, strongElitism, surviveParents, reduceParentType, surviveOffspring, reduceOffspringType, reduceFinalType); + + } // end of the ugly construct due to G3 and MGG - totaly heterogeneous at the moment + + + /////////////////////////////// + // the general breeder + /////////////////////////////// + eoGeneralBreeder *breed = + new eoGeneralBreeder(*select, _op, offspringRateParam.value()); + _state.storeFunctor(breed); + + /////////////////////////////// + // now the eoEasyEA + /////////////////////////////// + eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, *ptReplace); + _state.storeFunctor(algo); + // that's it! + return *algo; +} + +#endif diff --git a/eo/src/do/make_general_replacement.h b/eo/src/do/make_general_replacement.h new file mode 100644 index 000000000..72358f4d3 --- /dev/null +++ b/eo/src/do/make_general_replacement.h @@ -0,0 +1,173 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_general_replacement.h +// (c) Marc Schoenauer and Pierre Collet, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_general_replacement_h +#define _make_general_replacement_h + +#include // for eo_is_a_rate + +// Replacement +#include + +// also need the parser and param includes +#include +#include + + +/** a helper function that decodes a parameter read by the parser into an + * eoReduce & (allocates the pointer and stores it into an eoState) + */ +template +eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) +{ + unsigned int detSize; + eoReduce * ptReduce; + + // ---------- Deterministic + if (_ppReduce.first == string("Deterministic")) + { + ptReduce = new eoTruncate; + } + // ---------- EP + else if (_ppReduce.first == string("EP")) + { + if (!_ppReduce.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to EP, using 6" << endl; + detSize = 6; + // put back 6 in parameter for consistency (and status file) + _ppReduce.second.push_back(string("6")); + } + else // parameter passed by user as EP(T) + detSize = atoi(_ppReduce.second[0].c_str()); + ptReduce = new eoEPReduce(detSize); + } + // ---------- DetTour + else if (_ppReduce.first == string("DetTour")) + { + if (!_ppReduce.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + _ppReduce.second.push_back(string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(_ppReduce.second[0].c_str()); + ptReduce = new eoDetTournamentTruncate(detSize); + } + else if (_ppReduce.first == string("StochTour")) + { + double p; + if (!_ppReduce.second.size()) // no parameter added + { + cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + p = 1; + // put back p in parameter for consistency (and status file) + _ppReduce.second.push_back(string("1")); + } + else // parameter passed by user as DetTour(T) + { + p = atof(_ppReduce.second[0].c_str()); + if ( (p<=0.5) || (p>1) ) + throw runtime_error("Stochastic tournament size should be in [0.5,1]"); + } + + ptReduce = new eoStochTournamentTruncate(p); + } + else if (_ppReduce.first == string("Uniform")) + { + ptReduce = new eoRandomReduce; + } + // all done, stores and return a reference + _state.storeFunctor(ptReduce); + return (*ptReduce); +} + +/** Helper function that creates a replacement from the class + * eoReduceMergeReduce using 6 parameters + * (after the usual eoState and eoParser) + * + * eoHowMany _elite the number of elite parents (0 = no elitism) + * see below + * bool _strongElitism if elite > 0, string elitism or weak elitism + * strong = elite parents survive, whatever the offspring + * weak - elite patents compete AFTER replacement with best offspring + * eoHowMany _surviveParents number of parents after parents recuction + * eoParamParamType & _reduceParentType how the parents are reduced + * eoHowMany _surviveOffspring number of offspring after offspring recuction + * eoParamParamType & _reduceOffspringType how the offspring are reduced + * eoParamParamType & _reduceFinalType how the final population is reduced to initial population size + */ + +template +eoReplacement & make_general_replacement( + eoParser& _parser, eoState& _state, + eoHowMany _elite = eoHowMany(0), + bool _strongElitism = false, + eoHowMany _surviveParents = eoHowMany(0.0), + eoParamParamType & _reduceParentType = eoParamParamType("Deterministic"), + eoHowMany _surviveOffspring = eoHowMany(1.0), + eoParamParamType & _reduceOffspringType = eoParamParamType("Deterministic"), + eoParamParamType & _reduceFinalType = eoParamParamType("Deterministic") + ) +{ + ///////////////////////////////////////////////////// + // the replacement + ///////////////////////////////////////////////////// + + // Elitism + eoHowMany elite = _parser.createParam(_elite, "elite", "Nb of elite parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + + bool strongElitism = _parser.createParam(_strongElitism,"eliteType", "Strong (true) or weak (false) elitism (set elite to 0 for none)", '\0', "Evolution Engine / Replacement").value(); + + // reduce the parents + eoHowMany surviveParents = _parser.createParam(_surviveParents, "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + + eoParamParamType & reduceParentType = _parser.createParam(_reduceParentType, "reduceParents", "Parents reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); + + eoReduce & reduceParent = decode_reduce(reduceParentType, _state); + + // reduce the offspring + eoHowMany surviveOffspring = _parser.createParam(_surviveOffspring, "surviveOffspring", "Nb of surviving offspring (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + + eoParamParamType & reduceOffspringType = _parser.createParam(_reduceOffspringType, "reduceOffspring", "Offspring reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); + + eoReduce & reduceOffspring = decode_reduce(reduceOffspringType, _state); + + eoParamParamType & reduceFinalType = _parser.createParam(_reduceFinalType, "reduceFinal", "Final reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); + + eoReduce & reduceFinal = decode_reduce(reduceFinalType, _state); + + // now the replacement itself + eoReduceMergeReduce *ptReplace = new eoReduceMergeReduce(elite, strongElitism, surviveParents, reduceParent, surviveOffspring, reduceOffspring, reduceFinal); + _state.storeFunctor(ptReplace); + + // that's it! + return *ptReplace; +} + +#endif From 065cc646aa253f0379d726a435067f4bf6e4435c Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:54:30 +0000 Subject: [PATCH 0882/2134] Adding replacement strategies: teh ReduceMergeReduce for EASEA and the MGG and G2 replacements from Deb's PCX paper --- eo/src/eoG3Replacement.h | 86 ++++++++++ eo/src/eoMGGReplacement.h | 109 +++++++++++++ eo/src/eoReduceMergeReduce.h | 143 ++++++++++++++++ eo/src/eoReduceSplit.h | 307 +++++++++++++++++++++++++++++++++++ 4 files changed, 645 insertions(+) create mode 100644 eo/src/eoG3Replacement.h create mode 100644 eo/src/eoMGGReplacement.h create mode 100644 eo/src/eoReduceMergeReduce.h create mode 100644 eo/src/eoReduceSplit.h diff --git a/eo/src/eoG3Replacement.h b/eo/src/eoG3Replacement.h new file mode 100644 index 000000000..28928edf5 --- /dev/null +++ b/eo/src/eoG3Replacement.h @@ -0,0 +1,86 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoG3Replacement.h + (c) Maarten Keijzer, Marc Schoenauer, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoG3Replacement_h +#define _eoG3Replacement_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoG3Replacement is an eoReplacement: +- no strong elitism (is suppposed to be within a steady-state engine) +- choose N (2) parents RANDOMLY - remove them from the parent population +- merge offspring and the N removed parents +- select best N of this merged population +- put them back into parent population + +*/ + +template +class eoG3Replacement : public eoReplacement +{ +public: + eoG3Replacement(eoHowMany _howManyEliminatedParents = eoHowMany(2, false)) : + // split truncates the parents and returns eliminated parents + split(_howManyEliminatedParents, true), + // reduce truncates the offpsring and does not return eliminated guys + reduce(-_howManyEliminatedParents, false) + {} + + void operator()(eoPop & _parents, eoPop & _offspring) + { + eoPop temp; + split(_parents, temp); + unsigned toKeep = temp.size(); // how many to keep from merged populations + // merge temp into offspring + plus(temp, _offspring); // add temp to _offspring (a little inconsistent!) + + // reduce merged + reduce(_offspring, temp); // temp dummy arg. will not be modified + // minimla check: + if (_offspring.size() != toKeep) + { + cerr << "Les tailles " << _offspring.size() << " " << toKeep << endl; + throw runtime_error("eoG3Replacement: wrong number of remaining offspring"); + } + // and put back into _parents + plus(_offspring, _parents); + } + +private: + eoLinearTruncateSplit split; // few parents to truncate -> linear + eoTruncateSplit reduce; // supposedly many offspring to truncate + eoPlus plus; +}; + +#endif diff --git a/eo/src/eoMGGReplacement.h b/eo/src/eoMGGReplacement.h new file mode 100644 index 000000000..c87073c44 --- /dev/null +++ b/eo/src/eoMGGReplacement.h @@ -0,0 +1,109 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoMGGReplacement.h + (c) Maarten Keijzer, Marc Schoenauer, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoMGGReplacement_h +#define _eoMGGReplacement_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoMGGReplacement is an eoReplacement: +- choose N (2) parents RANDOMLY - remove them from the parent population +- select best offspring, add to parents +- merge (other?) offspring and the N removed parents +- select best N-1 of this merged population (detTournament only at the moment) +- put them back into parent population + +*/ + +template +class eoMGGReplacement : public eoReplacement +{ +public: + eoMGGReplacement(eoHowMany _howManyEliminatedParents = eoHowMany(2, false), + unsigned _tSize=2) : + // split truncates the parents and returns eliminated parents + split(_howManyEliminatedParents, true), + tSize(_tSize) + { + if (tSize < 2) + { + cout << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2\n"; + tSize = 2; + } + } + + void operator()(eoPop & _parents, eoPop & _offspring) + { + cout << "Entering MGGReplacement" << endl; + + eoPop temp; + split(_parents, temp); + unsigned toKeep = temp.size(); // how many to keep from merged populations + // minimal check + if (toKeep < 2) + throw runtime_error("Not enough parents killed in eoMGGReplacement"); + + // select best offspring + eoPop::iterator it = _offspring.it_best_element(); + // add to parents + _parents.push_back(*it); + // remove from offspring + _offspring.erase(it); + + // merge temp into offspring + plus(temp, _offspring); + cout << "MGGReplacement - after merge" << endl; + + // repeatedly add selected offspring to parents + for (unsigned i=0; i split; // few parents to truncate -> linear + eoPlus plus; + unsigned int tSize; +}; + +#endif diff --git a/eo/src/eoReduceMergeReduce.h b/eo/src/eoReduceMergeReduce.h new file mode 100644 index 000000000..3d1eee08c --- /dev/null +++ b/eo/src/eoReduceMergeReduce.h @@ -0,0 +1,143 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoReduceMergeReduce.h + (c) Maarten Keijzer, Marc Schoenauer, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoReduceMergeReduce_h +#define _eoReduceMergeReduce_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoReduceMergeReduce is an eoReplacement: +- saves possible elite parents +- reduces rest of parents +- reduces offspring +- merges reduced populations +- reduces resulting merged pop if necessary + +*/ + +template +class eoReduceMergeReduce : public eoReplacement +{ +public: + eoReduceMergeReduce(eoHowMany _howManyElite, + bool _strongElitism, + eoHowMany _howManyReducedParents, + eoReduce & _reduceParents, + eoHowMany _howManyReducedOffspring, + eoReduce & _reduceOffspring, + eoReduce & _reduceFinal) : + howManyElite(_howManyElite), + strongElitism(_strongElitism), + howManyReducedParents(_howManyReducedParents), + howManyReducedOffspring (_howManyReducedOffspring), + reduceParents(_reduceParents), + reduceOffspring(_reduceOffspring), + reduceFinal(_reduceFinal) + {} + + void operator()(eoPop & _parents, eoPop & _offspring) + { + eoPop temp; + unsigned int finalPopSize = _parents.size(); + unsigned int offSize = _offspring.size(); + + unsigned int elite = howManyElite(finalPopSize); + if (elite) // some parents MUST be saved somewhere + { + temp.resize(elite); + _parents.nth_element(elite); + std::copy(_parents.begin(), _parents.begin()+elite, temp.begin()); + _parents.erase(_parents.begin(), _parents.begin()+elite); + } + + // the reduce steps. First the parents + unsigned reducedParentSize = howManyReducedParents(_parents.size()); + if (!reducedParentSize) + _parents.clear(); + else if (reducedParentSize != _parents.size()) + reduceParents(_parents, reducedParentSize); + + // then the offspring + unsigned reducedOffspringSize = howManyReducedOffspring(offSize); + if (!reducedOffspringSize) + throw runtime_error("No offspring left after reduction!"); + if (reducedOffspringSize != offSize) // need reduction + reduceOffspring(_offspring, reducedOffspringSize); + + // now merge reduced populations + _parents.resize(reducedParentSize + _offspring.size()); + std::copy(_offspring.begin(), _offspring.end(), + _parents.begin()+reducedParentSize); + + // reduce the resulting population + // size depends on elitism + if (elite && strongElitism) + { + if (_parents.size() != finalPopSize-elite) + reduceFinal(_parents, finalPopSize-elite); + // and put back the elite + unsigned oldPSize = _parents.size(); + _parents.resize(_parents.size()+elite); + std::copy(temp.begin(), temp.end(), _parents.begin()+oldPSize); + } + else + { // only reduce final pop to right size + if (_parents.size() != finalPopSize) + reduceFinal(_parents, finalPopSize); + if (elite) // then treat weak elitism + { + unsigned toSave = 0; + _parents.sort(); + EOT & eoLimit = _parents[elite-1]; + unsigned index=0; + while (temp[index++] > eoLimit) + toSave++; + if (toSave) + for (unsigned i=0; i weak elistism + eoHowMany howManyReducedParents; // if 0, no parent in final replacement + eoHowMany howManyReducedOffspring; // if 0, runtime_error + // the reducers + eoReduce & reduceParents; + eoReduce & reduceOffspring; + eoReduce & reduceFinal; +}; + +#endif diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h new file mode 100644 index 000000000..9db344edd --- /dev/null +++ b/eo/src/eoReduceSplit.h @@ -0,0 +1,307 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoReduceSplit.h +// Base class for population-reducing classes - retaining the poor losers +// (c) GeNeura Team, 1998, Marc Schoenauer, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoReduceSplit_h +#define eoReduceSplit_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoReduce +#include + +/** + * eoReduceSplit: reduce the pop to the specified size + * AND eventually returns the eliminated guys +*/ +template class eoReduceSplit: public eoBF&, eoPop &, void > +{}; + +/** deterministic truncation method using sort */ +template +class eoTruncateSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoTruncateSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the jonb */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoTruncateSplit: Cannot truncate to a larger size!\n"); + + _newgen.nth_element(newsize); + + // save poor losers if necessary + if (returnEliminated) + for (unsigned i=0; i +class eoLinearTruncateSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoLinearTruncateSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the job */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoLinearTruncateSplit: Cannot truncate to a larger size!\n"); + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + } + +private: + eoHowMany howMany; + bool returnEliminated; +}; + +/** random truncation - batch version */ +template +class eoRandomSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoRandomSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the job */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoRandomSplit: Cannot truncate to a larger size!\n"); + + _newgen.shuffle(); + + // save poor losers if necessary + if (returnEliminated) + for (unsigned i=0; i +class eoLinearRandomSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoLinearRandomSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the job */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoLinearRandomSplit: Cannot truncate to a larger size!\n"); + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i::iterator it = _newgen.begin()+loser; + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + return ; + } + +private: + eoHowMany howMany; + bool returnEliminated; +}; + + +/** a ReduceSplit class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) +*/ +template +class eoDetTournamentTruncateSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoDetTournamentTruncateSplit(unsigned _t_size, eoHowMany _howMany, + bool _returnEliminated = false): + t_size(_t_size), howMany(_howMany), + returnEliminated(_returnEliminated) + { + if (t_size < 2) + { + cout << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2\n"; + t_size = 2; + } + } + + /** Performs repeated inverse_deterministic_tournament on the pop */ + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoDetTournamentTruncateSplit: Cannot truncate to a larger size!\n"); + + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i::iterator it = inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + } + +private: + unsigned t_size; + eoHowMany howMany; + bool returnEliminated; +}; + +/** a ReduceSplit class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) +*/ +template +class eoStochTournamentTruncateSplit : public eoReduce +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoStochTournamentTruncateSplit(double _t_rate, eoHowMany _howMany, + bool _returnEliminated = false): + t_rate(_t_rate), howMany(_howMany), + returnEliminated(_returnEliminated) + { + if (t_rate <= 0.5) + { + cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51\n"; + t_rate = 0.51; + } + if (t_rate > 1) + { + cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1\n"; + t_rate = 1; + } + } + + /** Performs repeated inverse_stochastic_tournament on the pop */ + void operator()(eoPop& _newgen, unsigned _newsize) + { + if (!_eliminated.size()) // nothing to do + return; + unsigned oldSize = _newgen.size(); + unsigned newSize = oldSize - _eliminated.size(); + if (newSize < 0) + throw std::logic_error("eoStochTournamentTruncateSplit: Cannot truncate to a larger size!\n"); + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i<_eliminated.size(); i++) + { + eoPop::iterator it = inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + } + + +private: + double t_rate; + eoHowMany howMany; + bool returnEliminated; +}; + +//----------------------------------------------------------------------------- + +#endif From 06ac548f96a1867936bb4eac0fcfc22bdb684eb9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:56:09 +0000 Subject: [PATCH 0883/2134] Adding more repalcements utilities (see do/make_easea_algo.h) --- eo/src/eoOneToOneBreeder.h | 122 ++++++++++++++++++++++++++++++++++ eo/src/eoSharing.h | 131 +++++++++++++++++++++++++++++++++++++ eo/src/eoTruncSelect.h | 73 +++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 eo/src/eoOneToOneBreeder.h create mode 100644 eo/src/eoSharing.h create mode 100644 eo/src/eoTruncSelect.h diff --git a/eo/src/eoOneToOneBreeder.h b/eo/src/eoOneToOneBreeder.h new file mode 100644 index 000000000..7b85d8697 --- /dev/null +++ b/eo/src/eoOneToOneBreeder.h @@ -0,0 +1,122 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOneToOneBreeder.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoOneToOneBreeder_h +#define eoOneToOneBreeder_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include + +/***************************************************************************** + * eoOneToOneBreeder: transforms a population using + * - an operator that MODIFIES only one parent from the populator + * (though it can use any number aside) and thus generates ONE offspring) + * - a local replacement between the parent and its offspring + * + * Typically, Differential Evolution (Storn and Price 94) and Deb et al's + * G3 can be built on this + **************************************************************************** + */ +template +class eoOneToOneBreeder: public eoBreed +{ + public: + /** Ctor: + * @param _op a general operator (must MODIFY only ONE parent) + * @param _eval an eoEvalFunc to evaluate the offspring + * @param _select a selectoOne, to be used for all selections [sequential] + * @param _pReplace probability that the best of parent/offspring wins [1] + * @param _howMany eoHowMany offpsring to generate [100%] + */ + eoOneToOneBreeder( + eoGenOp& _op, + eoEvalFunc & _eval, + double _pReplace = 1.0, + eoHowMany _howMany = eoHowMany(1.0) ) : + op(_op), eval(_eval), select( false ), + pReplace(_pReplace), howMany(_howMany) {} + + + /** The breeder: iteratively calls the genOp ONCE on a selective populator + * after having recorded the parent + * Then does the replacement + * + * @param _parents the initial population + * @param _offspring the resulting population (content -if any- is lost) + */ + void operator()(const eoPop& _parents, eoPop& _offspring) + { + unsigned target = howMany(_parents.size()); + + _offspring.clear(); + eoSelectivePopulator popit(_parents, _offspring, select); + + for (unsigned iParent=0; iParent<_parents.size(); iParent++) + { + unsigned pos = popit.tellp(); // remember current position + EOT theParent = *popit; // remember the parent itself + + // now apply operator - will modify the parent + op(popit); + + // replacement + EOT & leOffspring = *popit; + + // check: only one offspring? + unsigned posEnd = popit.tellp(); + if (posEnd != pos) + throw runtime_error("Operator can only generate a SINGLE offspring in eoOneToOneBreeder"); + + // do the tournament between parent and offspring + eval(leOffspring); // first need to evaluate the offspring + if (theParent > leOffspring) // old parent better than offspring + if (rng.uniform() < pReplace) // if probability + leOffspring = theParent; // replace + cout << "============ Final =========================\n"; + cout << _offspring << endl; + // finally, go to next guy to handle + ++popit; + } + } + + /// The class name. + virtual string className() const { return "eoOneToOneBreeder"; } + + private: + eoGenOp& op; + eoEvalFunc & eval; + eoSequentialSelect select; + double pReplace; + eoHowMany howMany; +}; + +#endif + diff --git a/eo/src/eoSharing.h b/eo/src/eoSharing.h new file mode 100644 index 000000000..f2178adfc --- /dev/null +++ b/eo/src/eoSharing.h @@ -0,0 +1,131 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSharing.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSharing_h +#define eoPerf2Worth_h + +#include +#include + +/** Sharing is a perf2worth class that implements + * Goldberg and Richardson's basic sharing +*/ +// template > +template +class eoSharing : public eoPerf2Worth +{ + public: + /** Ctor with only nicheSize: will use the default eoQuadDistance */ + eoSharing(double _nicheSize) : eoPerf2Worth("Sharing"), + nicheSize(_nicheSize), + dist(repDist) + {} + + eoSharing(double _nicheSize, Dist _dist) : eoPerf2Worth("Sharing"), + nicheSize(_nicheSize), + dist(_dist) + {} + + /** Computes shared fitnesses + */ + void operator()(const eoPop& _pop) + { + unsigned i, j, + pSize=_pop.size(); + if (pSize <= 1) + throw runtime_error("Apptempt to do sharing with population of size 1"); + value.resize(pSize); + vector sim(pSize); // to hold the similarities + vector distMatrix(pSize*(pSize-1)/2); // to hold the distances + + // compute the distances + distMatrix(0,0)=0; + for (i=1; i + { + public: + // Ctor : sets size + dMatrix(unsigned _s) : vector(_s*(_s-1)), rSize(_s) {} + + /** simple accessor */ + double operator()(unsigned _i, unsigned _j) const + { + return this->operator[](_i*rSize + _j); + } + + /** reference - to set values */ + double & operator()(unsigned _i, unsigned _j) + { + return this->operator[](_i*rSize + _j); + } + + /** just in case */ + void printOn(ostream & _os) + { + unsigned index=0; + for (unsigned i=0; ioperator[](index++) << " " ; + _os << endl; + } + _os << endl; + } + + private: + unsigned rSize; // row size (== number of columns!) + }; + + // private data of class eoSharing +private: + double nicheSize; + eoQuadDistance repDist; // default distance + eoDistance & dist; // allows to pass a specific distance +}; + +#endif diff --git a/eo/src/eoTruncSelect.h b/eo/src/eoTruncSelect.h new file mode 100644 index 000000000..313d3c2d0 --- /dev/null +++ b/eo/src/eoTruncSelect.h @@ -0,0 +1,73 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTruncSelect.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTruncSelect_h +#define _eoTruncSelect_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoTruncSelect selects individuals after truncating the population + * using eoSelectOne as it's mechanism. + * Therefore eoSelectMany needs an eoSelectOne in its ctor + * It will use an eoHowMnay to determine the number of guys to keep, +*/ +template +class eoTruncSelect : public eoSelect +{ + public: + /** Ctor: from an eoSelect (and an eoMany to tell how many are kept for selectino */ + eoSelectMany(eoSelectOne& _select, eoHowMany _howMany) + : select(_select), howMany(_howMany) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned target = howMany(_source.size()); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + eoHowMany howMany; +}; + +#endif From 61f9b5124345233bedafd68d245363e1c4701ea9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 15:58:15 +0000 Subject: [PATCH 0884/2134] Adding a simpler way of generating files for new genotypes (see EO.tpl in EASEA). --- eo/tutorial/Templates/MakeSimple.tmpl | 28 +++ eo/tutorial/Templates/MyStructSEA.cpp | 252 ++++++++++++++++++++++++++ eo/tutorial/Templates/createSimple | 58 ++++++ 3 files changed, 338 insertions(+) create mode 100644 eo/tutorial/Templates/MakeSimple.tmpl create mode 100644 eo/tutorial/Templates/MyStructSEA.cpp create mode 100755 eo/tutorial/Templates/createSimple diff --git a/eo/tutorial/Templates/MakeSimple.tmpl b/eo/tutorial/Templates/MakeSimple.tmpl new file mode 100644 index 000000000..188793f62 --- /dev/null +++ b/eo/tutorial/Templates/MakeSimple.tmpl @@ -0,0 +1,28 @@ +# sample makefile for building an EA evolving a new genotype + +# START eventually modify the name of EO dir +DIR_EO = ../../src +# END eventually modify the name of EO dir +LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(LIB_EO) + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp + +# local sources +SOURCES = MyStructEA.cpp \ + eoMyStruct.h \ + eoMyStructEvalFunc.h \ + eoMyStructInit.h \ + eoMyStructMutation.h \ + eoMyStructQuadCrossover.h + +MyStructEA : MyStructEA.cpp + c++ -I. -I$(DIR_EO) -g -o $@ MyStructEA.cpp $(LIB_EO) -lm + +tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile + +clean : ; /bin/rm *.o MyStructEA + +########## local dependencies +MyStructEA : $(SOURCES) diff --git a/eo/tutorial/Templates/MyStructSEA.cpp b/eo/tutorial/Templates/MyStructSEA.cpp new file mode 100644 index 000000000..d4cc48014 --- /dev/null +++ b/eo/tutorial/Templates/MyStructSEA.cpp @@ -0,0 +1,252 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file. +It includes all other files that have been generated by the script create.sh +so it is the only file to compile. + +In case you want to build up a separate library for your new Evolving Object, +you'll need some work - follow what's done in the src/ga dir, used in the +main file BitEA in tutorial/Lesson4 dir. +Or you can wait until we do it :-) +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +/** definitions of operators: write as many classes as types of operators + * and include them here. In this simple example, + * one crossover (2->2) and one mutation (1->1) operators are used + */ +#include "eoMyStructQuadCrossover.h" +#include "eoMyStructMutation.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef eoMyStruct Indi; // ***MUST*** derive from EO + + +// Use existing modules to define representation independent routines + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ +try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // a genotype initializer + eoMyStructInit init; + // or, if you need some parameters, you might as well + // - write a constructor of the eoMyStructInit that uses a parser + // - call it from here: + // eoMyStructInit init(parser); + + + // Build the variation operator (any seq/prop construct) + // here, a simple example with only 1 crossover (2->2, a QuadOp) and + // one mutation, is given. + // Hints to have choice among multiple crossovers and mutations are given + + // A (first) crossover (possibly use the parser in its Ctor) + eoMyStructQuadCrossover cross /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedQuadOp cross(cross1, cross1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoMyStructQuadCrossover.h + // 2- include that file here together with eoMyStructQuadCrossover above + // 3- uncomment and duplicate the following lines: + // +// eoMyStructSecondCrossover cross2(eoParser parser); +// double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); +// cross.add(cross2, cross2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // cross.add(cross, crossXXXRate, true); + + /////////////// Same thing for MUTATION + + // a (first) mutation (possibly use the parser in its Ctor) + eoMyStructMutation mut /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedMonOp mut(mut1, mut1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoMyStructMutation.h + // 2- include that file here together with eoMyStructMutation above + // 3- uncomment and duplicate the following lines: + // +// eoMyStructSecondMutation mut2(eoParser parser); +// double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); +// mut.add(mut2, mut2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // mut.add(mut, mutXXXRate, true); + + // now encapsulate your crossover(s) and mutation(s) into an eoGeneralOp + // so you can fully benefit of the existing evolution engines + + // First read the individual level parameters + double pCross = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ).value(); + // minimum check + if ( (pCross < 0) || (pCross > 1) ) + throw runtime_error("Invalid pCross"); + + double pMut = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ).value(); + // minimum check + if ( (pMut < 0) || (pMut > 1) ) + throw runtime_error("Invalid pMut"); + + // now create the generalOp + eoSGAGenOp op(cross, pCross, mut, pMut); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/eo/tutorial/Templates/createSimple b/eo/tutorial/Templates/createSimple new file mode 100755 index 000000000..a329bc5c1 --- /dev/null +++ b/eo/tutorial/Templates/createSimple @@ -0,0 +1,58 @@ +#! /bin/tcsh -f +if ($PWD:t != Templates) then + echo You must be in the Template dir to run that script + exit +endif + +if ($#argv < 1) then + echo "Usage $0 ApplicationName [TargetDirName]" + echo " will create ../TargetDirName if necessary" + echo " (default dir name = ApplicationName)," + echo " and will put there all files that are strictly necessary" + echo " to compile and run you Application from there" + exit +endif + +echo " " # we're going to do something + +if ($#argv == 1) then + set TargetDir = ../$1 +else + set TargetDir = ../$2 +endif + +if (! -e $TargetDir) then + mkdir $TargetDir +endif + +if ( (-f $TargetDir/eo$1.h) || (-f $TargetDir/eo$1Init.h) || (-f $TargetDir/eo$1EvalFunc.h) || (-f $TargetDir/eo$1Mutation.h) || (-f $TargetDir/eo$1QuadCrossover.h) || (-f $TargetDir/$1EA.cpp) || (-f $TargetDir/make_genotype_$1.h) || (-f $TargetDir/make_op_$1.h) ) then + echo WARNING: some files already exist there. + echo -n "Overwrite ALL (yes/no)? " + set REP = $< + if ($REP != "yes") then + echo Nothing done! + exit + endif +endif + +if (-f $TargetDir/Makefile) then + echo A Makefile already exists there. + echo I'm creating Makefile.$1. You'll have to merge them both, + echo OR to call make -f Makefile.$1 + set MakeName = Makefile.$1 +else + set MakeName = Makefile +endif + +echo Creating source files for application $1 in $TargetDir/ + +sed s/MyStruct/$1/g eoMyStruct.tmpl > $TargetDir/eo$1.h +sed s/MyStruct/$1/g init.tmpl > $TargetDir/eo$1Init.h +sed s/MyStruct/$1/g evalFunc.tmpl > $TargetDir/eo$1EvalFunc.h +sed s/MyStruct/$1/g mutation.tmpl > $TargetDir/eo$1Mutation.h +sed s/MyStruct/$1/g quadCrossover.tmpl > $TargetDir/eo$1QuadCrossover.h +sed s/MyStruct/$1/g MyStructSEA.cpp > $TargetDir/$1EA.cpp +sed s/MyStruct/$1/g MakeSimple.tmpl > $TargetDir/$MakeName + +echo Done! + From 90a3e34c7f5f8d2d771deb9d7aeadacc72150a80 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 16:02:02 +0000 Subject: [PATCH 0885/2134] It was about time to enter the template file for EASEA here, as createSimple and EASEA are doing approximately the same job ...` --- eo/tutorial/Templates/EO.tpl | 938 +++++++++++++++++++++++++++++++++++ 1 file changed, 938 insertions(+) create mode 100644 eo/tutorial/Templates/EO.tpl diff --git a/eo/tutorial/Templates/EO.tpl b/eo/tutorial/Templates/EO.tpl new file mode 100644 index 000000000..438a442ca --- /dev/null +++ b/eo/tutorial/Templates/EO.tpl @@ -0,0 +1,938 @@ +\TEMPLATE_START// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEA.cpp +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// +// +// Main file for creating a new representation in EO +// ================================================= +// +// This main file includes all other files that have been generated by the +// script create.sh, so it is the only file to compile. +// +// In case you want to build up a separate library for your new Evolving Object, +// you'll need some work - follow what's done in the src/ga dir, used in the +// main file BitEA in tutorial/Lesson4 dir. +// Or you can wait until we do it :-) + +// Miscellany includes and declarations +#include +using namespace std; + +// eo general include +#include "eo" +// real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +unsigned *pCurrentGeneration; +unsigned *pEZ_NB_GEN; +double EZ_MUT_PROB, EZ_XOVER_PROB, EZ_REPL_PERC=0.0; +int EZ_NB_GEN, EZ_POP_SIZE; +unsigned long EZ_NB_EVALUATIONS=0L; + +inline int random(int b1=0, int b2=1){ + return rng.random(b2-b1)+b1; +} +inline double random(double b1=0, double b2=1){ + return rng.uniform(b2-b1)+b1; +} +inline float random(float b1=0, float b2=1){ + return rng.uniform(b2-b1)+b1; +} + +\ANALYSE_PARAMETERS +\INSERT_USER_DECLARATIONS +\INSERT_INITIALISATION_FUNCTION + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class EASEAGenome MUST derive from EO for some fitness + */ +#include "EASEAGenome.h" + +// GENOTYPE EASEAGenome ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef \MINIMAXI MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef EASEAGenome Indi; // ***MUST*** derive from EO + +\INSERT_USER_FUNCTIONS + +/** definition of evaluation: + * class EASEAEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "EASEAEvalFunc.h" + +/** definition of initialization: + * class EASEAGenomeInit MUST derive from eoInit + */ +#include "EASEAInit.h" + +/** include all files defining variation operator classes + */ +#include "EASEAMutation.h" +#include "EASEAQuadCrossover.h" + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init){ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include "do/make_continue.h" +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval){ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op){ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop){ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]){ + +try { +\INSERT_INIT_FCT_CALL + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + EASEAEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // a genotype initializer + EASEAInit init; + // or, if you need some parameters, you might as well + // - write a constructor of the eoMyStructInit that uses a parser + // - call it from here: + // eoEASEAInit init(parser); + + + // Build the variation operator (any seq/prop construct) + // here, a simple example with only 1 crossover (2->2, a QuadOp) and + // one mutation, is given. + // Hints to have choice among multiple crossovers and mutations are given + + // A (first) crossover (possibly use the parser in its Ctor) + EASEAQuadCrossover cross /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedQuadOp cross(cross1, cross1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoEASEAQuadCrossover.h + // 2- include that file here together with eoEASEAQuadCrossover above + // 3- uncomment and duplicate the following lines: + // +// eoEASEASecondCrossover cross2(eoParser parser); +// double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); +// cross.add(cross2, cross2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // cross.add(cross, crossXXXRate, true); + + /////////////// Same thing for MUTATION + + // a (first) mutation (possibly use the parser in its Ctor) + EASEAMutation mut /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedMonOp mut(mut1, mut1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoEASEAMutation.h + // 2- include that file here together with eoEASEAMutation above + // 3- uncomment and duplicate the following lines: + // +// eoEASEASecondMutation mut2(eoParser parser); +// double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); +// mut.add(mut2, mut2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // mut.add(mut, mutXXXRate, true); + + // now encapsulate your crossover(s) and mutation(s) into an eoGeneralOp + // so you can fully benefit of the existing evolution engines + + // First read the individual level parameters + double pCross = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ).value(); + // minimum check + if ( (pCross < 0) || (pCross > 1) ) + throw runtime_error("Invalid pCross"); + + double pMut = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ).value(); + // minimum check + if ( (pMut < 0) || (pMut > 1) ) + throw runtime_error("Invalid pMut"); + + // now create the generalOp + eoSGAGenOp op(cross, pCross, mut, pMut); + + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + // give popSize to AESAE control + EZ_POP_SIZE = pop.size(); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Best individual in final population\n"; + cout << pop.best_element() << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} + +\START_EO_GENOME_H_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAGenome.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +#ifndef _EASEAGenome_h +#define _EASEAGenome_h + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + + * Note that you MUST derive your structure from EO + * but you MAY use some other already prepared class in the hierarchy + * like eoVector for instance, if you handle a vector of something.... + + * If you create a structure from scratch, + * the only thing you need to provide are + * a default constructor + * IO routines printOn and readFrom + * + * Note that operator<< and operator>> are defined at EO level + * using these routines + */ +\ANALYSE_USER_CLASSES +\INSERT_USER_CLASSES + +template< class FitT> +class EASEAGenome: public EO { +public: + /** Ctor: you MUST provide a default ctor. + * though such individuals will generally be processed + * by some eoInit object + */ + EASEAGenome() : EO() + { + // START Code of default Ctor of an EASEAGenome object +\GENOME_CTOR + // END Code of default Ctor of an EASEAGenome object + } + + EASEAGenome(const EASEAGenome & arg) : EO() + { +\GENOME_CTOR + copy(arg); + } + + virtual ~EASEAGenome() + { + // START Code of Destructor of an EASEAGenome object + \GENOME_DTOR + // END Code of Destructor of an EASEAGenome object + } + + virtual string className() const { return "EASEAGenome"; } + + EASEAGenome& operator=(const EASEAGenome & arg) { + copy(arg); + return *this; + } + + void copy(const EASEAGenome& genome) + { + if(&genome != this){ + \GENOME_DTOR + \COPY_CTOR + if (genome.invalid()) { // copying an invalid genome + fitness(FitT()); // put a valid value (i.e. non NAN) + invalidate(); // but INVALIDATE the genome + } + else + fitness(genome.fitness()); + } + } + + bool operator==(const EASEAGenome & genome) const { + \EQUAL + return true; + } + + bool operator!=(const EASEAGenome & genome) const { + return !(*this==genome); + } + + /** printing... */ + void printOn(ostream& os) const + { + // First write the fitness + EO::printOn(os); + os << ' '; + // START Code of default output + + /** HINTS + * in EO we systematically write the sizes of things before the things + * so readFrom is easier to code (see below) + */ +\INSERT_DISPLAY +\WRITE + // END Code of default output + } + + /** reading... + * of course, your readFrom must be able to read what printOn writes!!! + */ + void readFrom(istream& is) + { + // of course you should read the fitness first! + EO::readFrom(is); + // START Code of input + + /** HINTS + * remember the EASEAGenome object will come from the default ctor + * this is why having the sizes written out is useful + */ +\READ + // END Code of input + } + + //private: // put all data here - no privacy in EASEA + // START Private data of an EASEAGenome object +\INSERT_GENOME + // END Private data of an EASEAGenome object +}; +#endif + +\START_EO_EVAL_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAEvalFunc.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +Evaluator in EO: a functor that computes the fitness of an EO +============================================================= +*/ + +#ifndef _EASEAEvalFunc_h +#define _EASEAEvalFunc_h + +// include whatever general include you need +#include +#include + +// include the base definition of eoEvalFunc +#include "eoEvalFunc.h" + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template +class EASEAEvalFunc : public eoEvalFunc +{ +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + EASEAEvalFunc() + // EASEAEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAEvalFunc object + // END Code of Ctor of an EASEAEvalFunc object + } + + /** Actually compute the fitness + * + * @param EOT & _eo the EO object to evaluate + * it should stay templatized to be usable + * with any fitness type + */ + void operator()(EOT & genome) + { + // test for invalid to avoid recomputing fitness of unmodified individuals + if (genome.invalid()) + { + // START Code of computation of fitness of the EASEA object +\INSERT_EVALUATOR + // END Code of computation of fitness of the EASEA object + } + } + +private: +// START Private data of an EASEAEvalFunc object + // varType anyVariable; // for example ... +// END Private data of an EASEAEvalFunc object +}; + + +#endif + +\START_EO_INITER_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAInit.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +objects initialization in EO +============================ +*/ + +#ifndef _EASEAInit_h +#define _EASEAInit_h + +// include the base definition of eoInit +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * There is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO (e.g. to initialize + * atoms of an eoVector you will need an eoInit) + */ +template +class EASEAInit: public eoInit { +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + EASEAInit() + // EASEAInit( varType & _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAInit object + // END Code of Ctor of an EASEAInit object + } + + + /** initialize a genotype + * + * @param _genotype generally a genotype that has been default-constructed + * whatever it contains will be lost + */ + void operator()(GenotypeT & _genotype) + { + // START Code of random initialization of an EASEAGenome object +\INSERT_EO_INITIALISER + // END Code of random initialization of an EASEAGenome object + _genotype.invalidate(); // IMPORTANT in case the _genotype is old + } + +private: +// START Private data of an EASEAInit object + // varType & anyVariable; // for example ... +// END Private data of an EASEAInit object +}; + +#endif + + +\START_EO_MUT_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAMutation.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +simple mutation operators +========================= +*/ + +#ifndef EASEAMutation_H +#define EASEAMutation_H + + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class EASEAMutation: public eoMonOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + EASEAMutation() + // EASEAMutation( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAMutation object + // END Code of Ctor of an EASEAMutation object + } + + /// The class name. Used to display statistics + string className() const { return "EASEAMutation"; } + + /** + * modifies the parent + * @param _genotype The parent genotype (will be modified) + */ + bool operator()(GenotypeT & _genotype) + { + // START code for mutation of the _genotype object +\INSERT_MUTATOR + // END code for mutation of the _genotype object + +private: +// START Private data of an EASEAMutation object + // varType anyVariable; // for example ... +// END Private data of an EASEAMutation object +}; + +#endif + +\START_EO_QUAD_XOVER_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAQuadCrossover.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +Template for simple quadratic crossover operators +================================================= + +Quadratic crossover operators modify both genotypes +*/ + +#ifndef EASEAQuadCrossover_H +#define EASEAQuadCrossover_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class EASEAQuadCrossover: public eoQuadOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + EASEAQuadCrossover() + // EASEAQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAQuadCrossover object + // END Code of Ctor of an EASEAQuadCrossover object + } + + /// The class name. Used to display statistics + string className() const { return "EASEAQuadCrossover"; } + + /** + * eoQuad crossover - modifies both genotypes + */ + bool operator()(GenotypeT& child1, GenotypeT & child2) + { + GenotypeT parent1(child1); + GenotypeT parent2(child2); + + // START code for crossover of child1 and child2 objects +\INSERT_CROSSOVER + return (parent1!=child1)||(parent2!=child2); + // END code for crossover of child1 and child2 objects + } + +private: +// START Private data of an EASEAQuadCrossover object + // varType anyVariable; // for example ... +// END Private data of an EASEAQuadCrossover object +}; + +#endif + +\START_EO_CONTINUE_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEA_make_continue.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +#ifndef _make_continue_h +#define _make_continue_h + +/* +Contains the templatized version of parser-based choice of stopping criterion +It can then be instantiated, and compiled on its own for a given EOType +(see e.g. in dir ga, ga.cpp) +*/ + +// Continuators - all include eoContinue.h +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif + + // also need the parser and param includes +#include +#include + + +/////////////////// the stopping criterion //////////////// +template +eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) +{ + if (_combined) // already exists + _combined->add(*_cont); + else + _combined = new eoCombinedContinue(*_cont); + return _combined; +} + +template +eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + //////////// Stopping criterion /////////////////// + // the combined continue - to be filled + eoCombinedContinue *continuator = NULL; + + // for each possible criterion, check if wanted, otherwise do nothing + + // First the eoGenContinue - need a default value so you can run blind + // but we also need to be able to avoid it <--> 0 + eoValueParam& maxGenParam = _parser.createParam(\NB_GEN, "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); + // and give control to EASEA + EZ_NB_GEN = maxGenParam.value(); + pEZ_NB_GEN = & maxGenParam.value(); + + // do not test for positivity in EASEA + // if (maxGenParam.value()) // positive: -> define and store + // { + eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); + _state.storeFunctor(genCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, genCont); + // } + + // the steadyGen continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyFitContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + + // Same thing with Eval - but here default value is 0 + eoValueParam& maxEvalParam = _parser.createParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)",'E',"Stopping criterion"); + + if (maxEvalParam.value()) // positive: -> define and store + { + eoEvalContinue *evalCont = new eoEvalContinue(_eval, maxEvalParam.value()); + _state.storeFunctor(evalCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, evalCont); + } + /* + // the steadyEval continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyGenContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + */ + // the target fitness + eoFitContinue *fitCont; + eoValueParam& targetFitnessParam = _parser.createParam(double(0.0), "targetFitness", "Stop when fitness reaches",'T', "Stopping criterion"); + if (_parser.isItThere(targetFitnessParam)) + { + fitCont = new eoFitContinue + (targetFitnessParam.value()); + // store + _state.storeFunctor(fitCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, fitCont); + } + +#ifndef _MSC_VER + // the CtrlC interception (Linux only I'm afraid) + eoCtrlCContinue *ctrlCCont; + eoValueParam& ctrlCParam = _parser.createParam(false, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); + if (_parser.isItThere(ctrlCParam)) + { + ctrlCCont = new eoCtrlCContinue; + // store + _state.storeFunctor(ctrlCCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, ctrlCCont); + } +#endif + + // now check that there is at least one! + if (!continuator) + throw runtime_error("You MUST provide a stopping criterion"); + // OK, it's there: store in the eoState + _state.storeFunctor(continuator); + + // and return + return *continuator; +} + +#endif + +\START_EO_PARAM_TPL#************************************* +# +# EASEA.prm +# +# Parameter file generated by AESAE-EO v0.7 +# +#************************************* +###### General ###### +# --help=0 # -h : Prints this message +# --stopOnUnknownParam=1 # Stop if unknown param entered +--seed=0 # -S : Random number seed + +###### Evolution Engine ###### +--popSize=\POP_SIZE # -P : Population Size +--selection=\SELECTOR\SELECT_PRM # -S : Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t) or Sequential(ordered/unordered) +--nbOffspring=\OFF_SIZE # -O : Nb of offspring (percentage or absolute) +--replacement=General # Type of replacement: Generational, ESComma, ESPlus, SSGA(T), EP(T) + +###### Evolution Engine / Replacement ###### +--elite=\ELITE_SIZE # Nb of elite parents (percentage or absolute) +--eliteType=\ELITISM # Strong (true) or weak (false) elitism (set elite to 0 for none) +--surviveParents=\SURV_PAR_SIZE # Nb of surviving parents (percentage or absolute) +--reduceParents=\RED_PAR\RED_PAR_PRM # Parents reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform +--surviveOffspring=\SURV_OFF_SIZE # Nb of surviving offspring (percentage or absolute) +--reduceOffspring=\RED_OFF\RED_OFF_PRM # Offspring reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform +--reduceFinal=\RED_FINAL\RED_FINAL_PRM # Final reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform + +###### Output ###### +# --useEval=1 # Use nb of eval. as counter (vs nb of gen.) +# --useTime=1 # Display time (s) every generation +# --printBestStat=1 # Print Best/avg/stdev every gen. +# --printPop=0 # Print sorted pop. every gen. + +###### Output - Disk ###### +# --resDir=Res # Directory to store DISK outputs +# --eraseDir=1 # erase files in dirName if any +# --fileBestStat=0 # Output bes/avg/std to file + +###### Output - Graphical ###### +# --plotBestStat=0 # Plot Best/avg Stat +# --plotHisto=0 # Plot histogram of fitnesses + +###### Persistence ###### +# --Load= # -L : A save file to restart from +# --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? +# --saveFrequency=0 # Save every F generation (0 = only final state, absent = never) +# --saveTimeInterval=0 # Save every T seconds (0 or absent = never) +# --status=OneMaxGenomeEA.status # Status file + +###### Stopping criterion ###### +# --maxGen=100 # -G : Maximum number of generations () = none) +# --steadyGen=100 # -s : Number of generations with no improvement +# --minGen=0 # -g : Minimum number of generations +# --maxEval=0 # -E : Maximum number of evaluations (0 = none) +# --targetFitness=0 # -T : Stop when fitness reaches +# --CtrlC=0 # -C : Terminate current generation upon Ctrl C + +###### Variation Operators ###### +# --cross1Rate=1 # -1 : Relative rate for crossover 1 +# --mut1Rate=1 # -1 : Relative rate for mutation 1 +--pCross=\XOVER_PROB # -C : Probability of Crossover +--pMut=\MUT_PROB # -M : Probability of Mutation + +\START_EO_MAKEFILE_TPL#************************************* +# +# EASEA.mak +# +# Makefile generated by AESAE-EO v0.7 +# +#************************************* + +# sample makefile for building an EA evolving a new genotype + +DIR_EO = \EO_DIR + +.cpp: ; c++ -DPACKAGE=\"eo\" -I. -I$(DIR_EO)/src -Wall -g -o $@ $*.cpp $(DIR_EO)/src/libeo.a $(DIR_EO)/src/utils/libeoutils.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -I. -I\EO_DIR/src -Wall -g -c $*.cpp + +LIB_EO = $(DIR_EO)/src/utils/libeoutils.a $(DIR_EO)/src/libeo.a + +SOURCES = EASEA.cpp \ + EASEAEvalFunc.h \ + EASEAGenome.h \ + EASEAInit.h \ + EASEAMutation.h \ + EASEAQuadCrossover.h \ + $(LIB_EO) + +ALL = EASEA + +EASEA : $(SOURCES) + c++ -g -I. -I$(DIR_EO)/src -o $@ EASEA.cpp $(LIB_EO) -lm + +all : $(ALL) + +clean : ; /bin/rm *.o $(ALL) + +\TEMPLATE_END From d4093063cbed71039571e0937bdd76060d901d42 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 23 Aug 2002 16:06:06 +0000 Subject: [PATCH 0886/2134] Removed non-tested code (forthcoming)... --- eo/src/eoSGAGenOp.h | 50 --------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/eo/src/eoSGAGenOp.h b/eo/src/eoSGAGenOp.h index 262e662b3..35c31cd6c 100644 --- a/eo/src/eoSGAGenOp.h +++ b/eo/src/eoSGAGenOp.h @@ -87,55 +87,5 @@ class eoSGAGenOp : public eoGenOp eoSequentialOp op; }; -/** *************************************************************************** - * eoASGAGenOp (for Almost Simple GE) mimicks proportional application of - * one crossover and one mutation, together with a clone operator, each one - * with relative weights. - * This is the other almost-standard application of variation operators - * (see eoSGAGenOp for the completely standard). - *****************************************************************************/ -template -class eoASGAGenOp : public eoGenOp -{ - public: - - /** Ctor from crossover (with proba) and mutation (with proba) - * Builds the sequential op that first applies a proportional choice - * between the crossover and nothing (cloning), then the mutation - */ - eoASGAGenOp(eoQuadOp& _cross, double _pCross, - eoMonOp& _mut, double _pMut, double _pCopy) - : cross(_cross), - pCross(_pCross), - mut(_mut), - pMut(_pMut), - pCopy(_pCopy) - { - op.add(cross, pCross); // crossover, with proba pcross - op.add(quadClone, pCopy); // nothing, with proba pCopy - op.add(mut, pMut); // mutation, with proba pmut - } - - /** do the job: delegate to op */ - virtual void apply(eoPopulator& _pop) - { - op.apply(_pop); - } - - /** inherited from eoGenOp */ - virtual unsigned max_production(void) {return 2;} - - virtual string className() const {return "eoASGAGenOp";} - - - private: - eoQuadOp ✗ // eoInvalidateXXX take the boolean output - double pCross; - eoMonOp & mut; // of the XXX op and invalidate the EOT - double pMut; - eoMonCloneOp monClone; - eoProportionalOp op; -}; - #endif From f81d92a0af1e8c291ea91174ddd711b1590f6de2 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 29 Aug 2002 16:31:50 +0000 Subject: [PATCH 0887/2134] Added an error message in case of unknown reducer (was the source of a segmentation fault with old parameter files) --- eo/src/do/make_general_replacement.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eo/src/do/make_general_replacement.h b/eo/src/do/make_general_replacement.h index 72358f4d3..1ae8424e1 100644 --- a/eo/src/do/make_general_replacement.h +++ b/eo/src/do/make_general_replacement.h @@ -99,9 +99,13 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) ptReduce = new eoStochTournamentTruncate(p); } else if (_ppReduce.first == string("Uniform")) - { - ptReduce = new eoRandomReduce; - } + { + ptReduce = new eoRandomReduce; + } + else // no known reduction entered + { + throw runtime_error("Unknown reducer: " + _ppReduce.first); + } // all done, stores and return a reference _state.storeFunctor(ptReduce); return (*ptReduce); From 746516a67553ea3b0b54f5c7992bac4077a61154 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 29 Aug 2002 16:44:30 +0000 Subject: [PATCH 0888/2134] Added a missing test in the weak elitism --- eo/src/eoReduceMergeReduce.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoReduceMergeReduce.h b/eo/src/eoReduceMergeReduce.h index 3d1eee08c..0cde81eaa 100644 --- a/eo/src/eoReduceMergeReduce.h +++ b/eo/src/eoReduceMergeReduce.h @@ -120,7 +120,7 @@ public: _parents.sort(); EOT & eoLimit = _parents[elite-1]; unsigned index=0; - while (temp[index++] > eoLimit) + while ( (temp[index++] > eoLimit) && (index < temp.size()) ) toSave++; if (toSave) for (unsigned i=0; i Date: Mon, 16 Sep 2002 12:53:08 +0000 Subject: [PATCH 0889/2134] Invalidating flags ... --- eo/src/paradisEO/eval/eoPopEval.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/src/paradisEO/eval/eoPopEval.h b/eo/src/paradisEO/eval/eoPopEval.h index 3b5860f3c..78f28e922 100644 --- a/eo/src/paradisEO/eval/eoPopEval.h +++ b/eo/src/paradisEO/eval/eoPopEval.h @@ -50,6 +50,10 @@ public : */ void operator () (eoPop & _pop) { + + for (unsigned i = 0 ; i < _pop.size () ; i ++) + _pop [i].invalidate () ; + apply (eval, _pop) ; } From fa675dd55e12606e4742fc858b011e3fe1f42cea Mon Sep 17 00:00:00 2001 From: cahon Date: Tue, 17 Sep 2002 07:08:51 +0000 Subject: [PATCH 0890/2134] Allowing a first eval. of the pop. to be performed by the E.A. --- eo/src/eoEasyEA.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 27304b1d1..e4cba5786 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -172,7 +172,8 @@ template class eoEasyEA: public eoAlgo /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { - eoPop offspring; + eoPop offspring, empty_pop; + popEval(empty_pop, _pop); // A first eval of pop. do { try From eca6dcef8eaad6a27f8651d70e57df632859c54b Mon Sep 17 00:00:00 2001 From: jeggermo Date: Wed, 18 Sep 2002 12:40:46 +0000 Subject: [PATCH 0891/2134] A new readFrom & printOn function for EO.h Now it CAN handle VALID/INVALID fitnesses. The problems are over at last --- eo/src/EO.h | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 1e5d784c8..a1147b1dc 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -103,11 +103,26 @@ public: * @throw runtime_exception If a valid object can't be read. */ virtual void readFrom(istream& _is) { - _is >> repFitness; - if (_is) - invalidFitness = false; - else - throw runtime_error("EO(istream&): can't read valid eo from istream"); + + // the new version of the reafFrom function. + // It can distinguish between valid and invalid fitness values. + string fitness_str; + int pos = _is.tellg(); + _is >> fitness_str; + + if (fitness_str == "INVALID") + { + invalidFitness = true; + } + else + { + invalidFitness = false; + _is.seekg(pos); // rewind + _is >> repFitness; + } + + + } /** @@ -116,22 +131,16 @@ public: */ virtual void printOn(ostream& _os) const { - //if (invalid()) - // _os << "INVALID "; - //else - - // From now on, no special case for invalid fitnesses :-) - // A random value would so be printed. - // Even a non-evaluated EO is also serializable ... - - // From now on instead of printing an invalid fitness value - // a default value is printed (for paradisEO) - - if (invalid()) - _os << Fitness() << ' '; - else - _os << repFitness << ' '; // trailing space to make reading in that much easier + // the latest version of the code. Very similar to the old code + if (invalid()) { + _os << "INVALID "; + } + else + { + _os << repFitness << ' '; + } + } //@} From 43d42510bc71521c023207c07031182a029ec89c Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 18 Sep 2002 15:36:41 +0000 Subject: [PATCH 0892/2134] Added accessors to private parameter stopOnUnknownParam --- eo/src/utils/eoParser.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index a676259d9..08fec4029 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2002-02-08 07:49:32 $ $Version$ $Author: evomarc $ +CVS Info: $Date: 2002-09-18 15:36:41 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -185,6 +185,11 @@ public: _shortHand, _section, _required); } +// /** accessors to the stopOnUnknownParam value */ + void setStopOnUnknownParam(bool _b) {stopOnUnknownParam.value()=_b;} + bool getStopOnUnknownParam() {return stopOnUnknownParam.value();} + + private: void doRegisterParam(eoParam& param) const; From 62db7800fc02efd12be37aa652a212f73e7c0613 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 Oct 2002 14:07:58 +0000 Subject: [PATCH 0893/2134] Removed the stringstream (sstream not in all compilers distributions) --- eo/src/utils/eoGnuplot1DSnapshot.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index ce5707343..bfe21865c 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr + Marc.Schoenauer@inria.fr mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- @@ -28,7 +28,7 @@ #define _eoGnuplot1DSnapshot_H #include -#include +// #include #include #include @@ -100,7 +100,10 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot virtual void handleBounds(eoRealVectorBounds & _bounds) { - ostringstream os; + // use strstream and not stringstream until strstream is in all distributions + char buf[1024]; + std::ostrstream os(buf, 1023); + // ostrstream os; os << "set autoscale\nset yrange [" ; if (_bounds.isMinBounded(0)) os << _bounds.minimum(0); From 0aac89e6b38a5d707f1e15c7062ca4e96b8f964f Mon Sep 17 00:00:00 2001 From: music_dev Date: Mon, 14 Oct 2002 16:16:01 +0000 Subject: [PATCH 0894/2134] Better install for libraries. --- eo/win/all_lib.dsp | 214 ++++++++++---------- eo/win/eo.dsp | 254 +++++++++++------------ eo/win/es.dsp | 458 +++++++++++++++++++++--------------------- eo/win/ga.dsp | 298 +++++++++++++-------------- eo/win/utils.dsp | 490 ++++++++++++++++++++++----------------------- 5 files changed, 842 insertions(+), 872 deletions(-) diff --git a/eo/win/all_lib.dsp b/eo/win/all_lib.dsp index afb4ef2ec..a86fc45e4 100644 --- a/eo/win/all_lib.dsp +++ b/eo/win/all_lib.dsp @@ -1,102 +1,112 @@ -# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=all_lib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all_lib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all_lib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Release/eo_lib.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo_lib.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug/eo_libd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eo_libd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "all_lib - Win32 Release" -# Name "all_lib - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="all_lib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=all_lib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "all_lib.mak" CFG="all_lib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "all_lib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "all_lib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "all_lib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Release/eo_lib.lib" +# Begin Custom Build - Installing $(InputPath) in lib directory +TargetPath=.\Release\eo_lib.lib +InputPath=.\Release\eo_lib.lib +SOURCE="$(InputPath)" + +"lib\$(TargetPath)" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if not exist "lib" md "lib" + copy "$(TargetPath)" "lib" + +# End Custom Build + +!ELSEIF "$(CFG)" == "all_lib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug/eo_libd.lib" +# Begin Custom Build - Installing $(InputPath) in lib directory +TargetPath=.\Debug\eo_libd.lib +InputPath=.\Debug\eo_libd.lib +SOURCE="$(InputPath)" + +"lib\$(TargetPath)" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if not exist "lib" md "lib" + copy "$(TargetPath)" "lib" + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "all_lib - Win32 Release" +# Name "all_lib - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index efe08f2ce..baeb493ad 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,132 +1,122 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release\obj" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\eo.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debugj" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug\obj" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\eod.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\eod.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoParetoFitness.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.H -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoParetoFitness.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.H +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/es.dsp b/eo/win/es.dsp index 2aa8ba3f4..937730776 100644 --- a/eo/win/es.dsp +++ b/eo/win/es.dsp @@ -1,234 +1,224 @@ -# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=es - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "es.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "es - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\es.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "es - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\esd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\esd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "es - Win32 Release" -# Name "es - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\es\make_algo_scalar_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_algo_scalar_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_checkpoint_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_checkpoint_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_continue_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_continue_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_pop_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_pop_real.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_run_es.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_run_real.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\es\eoEsChromInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsFull.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsGlobalXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutate.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsMutationInit.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsSimple.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStandardXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoEsStdev.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoNormalMutation.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoReal.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealAtomXover.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealInitBounded.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\eoRealOp.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_es.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_genotype_real.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_es.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_op_real.h -# End Source File -# Begin Source File - -SOURCE=..\src\es\make_real.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="es" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=es - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "es.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "es.mak" CFG="es - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "es - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "es - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "es - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /Zm200 /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "es - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /Zm200 /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\esd.lib" + +!ENDIF + +# Begin Target + +# Name "es - Win32 Release" +# Name "es - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_algo_scalar_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_checkpoint_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_continue_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_pop_real.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_es.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_run_real.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\es\eoEsChromInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsFull.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsGlobalXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutate.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsMutationInit.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsSimple.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStandardXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoEsStdev.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoNormalMutation.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoReal.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealAtomXover.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealInitBounded.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\eoRealOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_genotype_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_es.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_op_real.h +# End Source File +# Begin Source File + +SOURCE=..\src\es\make_real.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/ga.dsp b/eo/win/ga.dsp index 4cac2b9e1..0c2eeab22 100644 --- a/eo/win/ga.dsp +++ b/eo/win/ga.dsp @@ -1,154 +1,144 @@ -# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=ga - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ga.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ga - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\ga.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ga - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "ga___Win32_Debug" -# PROP BASE Intermediate_Dir "ga___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\gad.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\gad.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "ga - Win32 Release" -# Name "ga - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\ga\make_algo_scalar_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_checkpoint_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_continue_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_genotype_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_op_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_pop_ga.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_run_ga.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\ga\eoBit.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\eoBitOp.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\eoBitOpFactory.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_ga.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_genotype_ga.h -# End Source File -# Begin Source File - -SOURCE=..\src\ga\make_op.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="ga" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ga - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ga.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ga.mak" CFG="ga - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ga - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "ga - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ga - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "ga - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ga___Win32_Debug" +# PROP BASE Intermediate_Dir "ga___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\gad.lib" + +!ENDIF + +# Begin Target + +# Name "ga - Win32 Release" +# Name "ga - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\ga\make_algo_scalar_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_checkpoint_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_continue_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_pop_ga.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_run_ga.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\ga\eoBit.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOp.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\eoBitOpFactory.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_genotype_ga.h +# End Source File +# Begin Source File + +SOURCE=..\src\ga\make_op.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/utils.dsp b/eo/win/utils.dsp index dea6e156f..4dc91d3b8 100644 --- a/eo/win/utils.dsp +++ b/eo/win/utils.dsp @@ -1,250 +1,240 @@ -# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=utils - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "utils.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "utils - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Release\utils.lib lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "utils - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "utils___Win32_Debug" -# PROP BASE Intermediate_Dir "utils___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\utilsd.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Install -PostBuild_Cmds=copy Debug\utilsd.lib lib\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "utils - Win32 Release" -# Name "utils - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealBounds.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\utils\make_help.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\utils\compatibility.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoCheckPoint.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoData.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoDistance.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFDCStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoFileSnapshot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot1DMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoGnuplot1DSnapshot.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoHowMany.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMOFitnessStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParam.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoParser.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoPopStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRealVectorBounds.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRndGenerators.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoRNG.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoScalarFitnessStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStat.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoState.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoStdoutMonitor.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdatable.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\eoUpdater.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\pipecom.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\rnd_generators.h -# End Source File -# Begin Source File - -SOURCE=..\src\utils\selectors.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="utils" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=utils - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "utils.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "utils.mak" CFG="utils - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "utils - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "utils - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "utils - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "utils - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "utils___Win32_Debug" +# PROP BASE Intermediate_Dir "utils___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\utilsd.lib" + +!ENDIF + +# Begin Target + +# Name "utils - Win32 Release" +# Name "utils - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\utils\make_help.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\utils\compatibility.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoCheckPoint.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoData.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoDistance.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFDCStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoFileSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoGnuplot1DSnapshot.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoHowMany.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMOFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParam.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoParser.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoPopStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRealVectorBounds.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRndGenerators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoRNG.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoScalarFitnessStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStat.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoState.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoStdoutMonitor.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdatable.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\eoUpdater.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\pipecom.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\rnd_generators.h +# End Source File +# Begin Source File + +SOURCE=..\src\utils\selectors.h +# End Source File +# End Group +# End Target +# End Project From 2b8b491f0b8fcac780b2358aeed5e7866ad7d01e Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 18 Oct 2002 11:39:09 +0000 Subject: [PATCH 0895/2134] *** empty log message *** --- eo/src/eoPop.h | 1 + eo/src/eoVector.h | 4 +++- eo/src/utils/eoParam.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index b880717b2..1c7b3cce0 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -28,6 +28,7 @@ #include #include #include +#include // needed for GCC 3.2 // EO includes #include // for eoInit diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 81c7584d0..d888a7fec 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -22,7 +22,7 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2002-04-08 08:42:01 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.12 2002-04-08 08:42:01 evomarc Exp $ $Author: evomarc $ + CVS Info: $Date: 2002-10-18 11:39:05 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.13 2002-10-18 11:39:05 jeggermo Exp $ $Author: jeggermo $ */ //----------------------------------------------------------------------------- @@ -31,7 +31,9 @@ #define _eoVector_h #include +#include // needed for GCC 3.2 #include + /** Base class for fixed length chromosomes, just derives from EO and vector and diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index ce054a315..89c72ad70 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -32,6 +32,7 @@ #include #include #include +#include // for GCC 3.2 #include #include // for specializations /** From 7dfe081489384a89f6459bf237f5f14b6df8ff72 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 Oct 2002 04:28:11 +0000 Subject: [PATCH 0896/2134] Added the .SUFFIXES lien (for Solaris) and the use of $(CXX) instead of c++ plus a few comments :-) --- eo/tutorial/Lesson1/Makefile | 15 +++++++++++++-- eo/tutorial/Lesson2/Makefile | 20 ++++++++++++++++++-- eo/tutorial/Lesson3/Makefile | 20 ++++++++++++++++++-- eo/tutorial/Lesson4/Makefile | 19 +++++++++++++++++-- eo/tutorial/Lesson5/Makefile | 20 +++++++++++++++++--- 5 files changed, 83 insertions(+), 11 deletions(-) diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile index 68b94b2b1..0e52a7089 100644 --- a/eo/tutorial/Lesson1/Makefile +++ b/eo/tutorial/Lesson1/Makefile @@ -1,6 +1,17 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp firstGA = FirstRealGA FirstBitGA diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile index e08e4e351..c57597f97 100644 --- a/eo/tutorial/Lesson2/Makefile +++ b/eo/tutorial/Lesson2/Makefile @@ -1,6 +1,22 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c $*.cpp +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp firstEA = FirstRealEA FirstBitEA diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile index 0f6e18bbe..0a2f8f669 100644 --- a/eo/tutorial/Lesson3/Makefile +++ b/eo/tutorial/Lesson3/Makefile @@ -1,6 +1,22 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/utils/libeoutils.a ../../src/libeo.a +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c $*.cpp +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp secondEA = SecondBitEA SecondRealEA diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile index 2a88ccd35..b0402ed64 100644 --- a/eo/tutorial/Lesson4/Makefile +++ b/eo/tutorial/Lesson4/Makefile @@ -1,7 +1,22 @@ -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c $*.cpp +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp ALL = BitEA RealEA ESEA diff --git a/eo/tutorial/Lesson5/Makefile b/eo/tutorial/Lesson5/Makefile index bc179fd22..b1fbedfbd 100644 --- a/eo/tutorial/Lesson5/Makefile +++ b/eo/tutorial/Lesson5/Makefile @@ -1,8 +1,22 @@ -# sample makefile for building an EA evolving a new genotype +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -I./util -Wall -g -c $*.cpp +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp # local sources COMMON_SOURCES = eoOneMax.h \ From dc758a4854faa84c368191f0e3e31b837a58f227 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 23 Oct 2002 04:42:07 +0000 Subject: [PATCH 0897/2134] Modification of all Makefiles so that it compiles smoothly on Solaris. Thanks to Oliver Koenig --- eo/tutorial/Lesson1/Makefile | 4 ++-- eo/tutorial/Lesson2/Makefile | 4 ++-- eo/tutorial/Lesson3/Makefile | 4 ++-- eo/tutorial/Lesson4/Makefile | 11 ++++++----- eo/tutorial/Templates/Makefile.tmpl | 13 ++++++++----- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile index 0e52a7089..093ca8525 100644 --- a/eo/tutorial/Lesson1/Makefile +++ b/eo/tutorial/Lesson1/Makefile @@ -9,9 +9,9 @@ DIR_EO = ../../src # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp firstGA = FirstRealGA FirstBitGA diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile index c57597f97..1aec17105 100644 --- a/eo/tutorial/Lesson2/Makefile +++ b/eo/tutorial/Lesson2/Makefile @@ -14,9 +14,9 @@ DIR_EO = ../../src # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp firstEA = FirstRealEA FirstBitEA diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile index 0a2f8f669..186791f26 100644 --- a/eo/tutorial/Lesson3/Makefile +++ b/eo/tutorial/Lesson3/Makefile @@ -14,9 +14,9 @@ DIR_EO = ../../src # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp secondEA = SecondBitEA SecondRealEA diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile index b0402ed64..807d8e126 100644 --- a/eo/tutorial/Lesson4/Makefile +++ b/eo/tutorial/Lesson4/Makefile @@ -14,9 +14,9 @@ DIR_EO = ../../src # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp ALL = BitEA RealEA ESEA @@ -24,11 +24,12 @@ lesson3 : $(ALL) all : $(ALL) -BitEA : BitEA.o ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< ../../src/ga/libga.a ../../src/utils/libeoutils.a ../../src/libeo.a +BitEA : BitEA.o ; + $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/ga/libga.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -RealEA : RealEA.o ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a +RealEA : RealEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -ESEA : ESEA.o ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< ../../src/es/libes.a ../../src/utils/libeoutils.a ../../src/libeo.a +ESEA : ESEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a clean : @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Templates/Makefile.tmpl b/eo/tutorial/Templates/Makefile.tmpl index 3f1a90a26..722a78dcc 100644 --- a/eo/tutorial/Templates/Makefile.tmpl +++ b/eo/tutorial/Templates/Makefile.tmpl @@ -3,11 +3,15 @@ # START eventually modify the name of EO dir DIR_EO = ../../src # END eventually modify the name of EO dir + +# eo libs LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(LIB_EO) +# implicit compile rules +.SUFFIXES: .cpp +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(LIB_EO) -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp # local sources COMMON_SOURCES = eoMyStruct.h \ @@ -22,16 +26,15 @@ NO_LIB_SOURCES = MyStructEA.cpp LIB_SOURCES = MyStructLibEA.cpp make_MyStruct.cpp - SOURCES = $(COMMON_SOURCES) MyStructEA.cpp MyStructLibEA.cpp make_MyStruct.cpp ALL = MyStructEA MyStructLibEA MyStructEA : MyStructEA.cpp - c++ -I. -I$(DIR_EO) -g -o $@ MyStructEA.cpp $(LIB_EO) -lm + $(CXX) -I. -I$(DIR_EO) -g -o $@ MyStructEA.cpp $(LIB_EO) -lm MyStructLibEA : MyStructLibEA.o make_MyStruct.o - c++ -g -o $@ MyStructLibEA.o make_MyStruct.o $(LIB_EO) -lm + $(CXX) -g -o $@ MyStructLibEA.o make_MyStruct.o $(LIB_EO) -lm tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile From 27d7739aa999ab983d6c377a70f6a2eb9d8876f4 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 23 Oct 2002 04:43:10 +0000 Subject: [PATCH 0898/2134] Adding depcom so that it compile smoothly on Solaris. Thanks to Oliver Koenig --- eo/depcomp | 436 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 436 insertions(+) create mode 100755 eo/depcomp diff --git a/eo/depcomp b/eo/depcomp new file mode 100755 index 000000000..3480ce4e9 --- /dev/null +++ b/eo/depcomp @@ -0,0 +1,436 @@ +#! /bin/sh + +# depcomp - compile a program generating dependencies as side-effects +# Copyright 1999, 2000 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi +# `libtool' can also be set to `yes' or `no'. + +if test -z "$depfile"; then + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` + dir=`echo "$object" | sed 's,/.*$,/,'` + if test "$dir" = "$object"; then + dir= + fi + # FIXME: should be _deps on DOS. + depfile="$dir.deps/$base" +fi + +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. This file always lives in the current directory. + # Also, the AIX compiler puts `$object:' at the start of each line; + # $object doesn't have directory information. + stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + outname="$stripped.o" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + + base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'` + tmpdepfile1="$base.o.d" + tmpdepfile2="$base.d" + if test "$libtool" = yes; then + "$@" -Wc,-MD + else + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a space and a tab in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + test -z "$dashmflag" && dashmflag=-M + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + # X makedepend + ( + shift + cleared=no + for arg in "$@"; do + case $cleared in no) + set ""; shift + cleared=yes + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 From 5054418a6639349b502ac288c511c8452d4a92f3 Mon Sep 17 00:00:00 2001 From: okoenig Date: Wed, 23 Oct 2002 10:23:03 +0000 Subject: [PATCH 0899/2134] small bugfix, to make this example run under Solaris/g++ 2.95.3 --- eo/tutorial/Lesson5/Makefile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/eo/tutorial/Lesson5/Makefile b/eo/tutorial/Lesson5/Makefile index b1fbedfbd..bb865c104 100644 --- a/eo/tutorial/Lesson5/Makefile +++ b/eo/tutorial/Lesson5/Makefile @@ -14,9 +14,9 @@ DIR_EO = ../../src # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -pg -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -c -pg $*.cpp +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp # local sources COMMON_SOURCES = eoOneMax.h \ @@ -34,19 +34,15 @@ LIB_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp SOURCES = $(COMMON_SOURCES) OneMaxEA.cpp OneMaxLibEA.cpp make_OneMax.cpp -# START eventually modify the name of EO dir -DIR_EO = ../../src -# END eventually modify the name of EO dir - LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a ALL = OneMaxEA OneMaxLibEA OneMaxEA : OneMaxEA.o - c++ -g -o $@ OneMaxEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + $(CXX) -g -o $@ OneMaxEA.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm OneMaxLibEA : OneMaxLibEA.o make_OneMax.o - c++ -g -o $@ OneMaxLibEA.o make_OneMax.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm + $(CXX) -g -o $@ OneMaxLibEA.o make_OneMax.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm tar : ; tar czvf OneMax.tgz *.h *.cpp Makefile From c175b152bcf51a839e8c6ce8bb99341a9da05666 Mon Sep 17 00:00:00 2001 From: okoenig Date: Sun, 3 Nov 2002 13:07:43 +0000 Subject: [PATCH 0900/2134] added some typename statements to make it compile without warnings under gcc3.2 --- eo/src/eoDetSelect.h | 2 +- eo/src/eoInit.h | 2 +- eo/src/eoOpContainer.h | 2 +- eo/src/eoPop.h | 10 +++++----- eo/src/eoPopulator.h | 2 +- eo/src/eoRanking.h | 2 +- eo/src/eoReduce.h | 4 ++-- eo/src/eoSelectFromWorth.h | 6 +++--- eo/src/utils/eoStat.h | 4 ++-- eo/src/utils/selectors.h | 6 +++--- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index b92150f83..aed551563 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -59,7 +59,7 @@ class eoDetSelect : public eoSelect unsigned remain = target % pSize; unsigned entireCopy = target / pSize; - eoPop::iterator it = _dest.begin(); + typename eoPop::iterator it = _dest.begin(); if (target >= pSize) { diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 2e3b48f55..08580aac8 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -130,7 +130,7 @@ typedef typename EOT::AtomType AtomType; virtual void operator()(EOT& _chrom) { _chrom.resize(offset + rng.random(extent)); - vector::iterator it; + typename vector::iterator it; for (it=_chrom.begin(); it<_chrom.end(); it++) init(*it); _chrom.invalidate(); diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 29c62a562..43465adb9 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -145,7 +145,7 @@ class eoProportionalOp : public eoOpContainer { (*ops[i])(_pop); } - catch(eoPopulator::OutOfIndividuals&) + catch( typename eoPopulator::OutOfIndividuals&) {} } virtual string className() const {return "ProportionalOp";} diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 1c7b3cce0..7c3f8184b 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -160,7 +160,7 @@ class eoPop: public vector, public eoObject, public eoPersistent } /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ - eoPop::iterator it_best_element() + typename eoPop::iterator it_best_element() { typename eoPop::iterator it = max_element(begin(), end()); return it; @@ -181,7 +181,7 @@ class eoPop: public vector, public eoObject, public eoPersistent } /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ - eoPop::iterator it_worse_element() + typename eoPop::iterator it_worse_element() { typename eoPop::iterator it = min_element(begin(), end()); return it; @@ -191,7 +191,7 @@ class eoPop: public vector, public eoObject, public eoPersistent slightly faster algorithm than sort to find all individuals that are better than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. */ - eoPop::iterator nth_element(int nth) + typename eoPop::iterator nth_element(int nth) { typename eoPop::iterator it = begin() + nth; std::nth_element(begin(), it, end(), greater()); @@ -207,7 +207,7 @@ class eoPop: public vector, public eoObject, public eoPersistent vector fitness(size()); std::transform(begin(), end(), fitness.begin(), GetFitness()); - vector::iterator it = fitness.begin() + which; + typename vector::iterator it = fitness.begin() + which; std::nth_element(fitness.begin(), it, fitness.end(), greater()); return *it; } @@ -221,7 +221,7 @@ class eoPop: public vector, public eoObject, public eoPersistent result.resize(size()); std::transform(begin(), end(), result.begin(), Ref()); - vector::iterator it = result.begin() + which; + typename vector::iterator it = result.begin() + which; std::nth_element(result.begin(), it, result.end(), Cmp()); } diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index 7ca1895de..8c97c5ab5 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -122,7 +122,7 @@ public : protected : eoPop& dest; - eoPop::iterator current; + typename eoPop::iterator current; const eoPop& src; private : diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index 800232cbc..49bae6005 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -48,7 +48,7 @@ public: /* helper function: finds index in _pop of _eo, an EOT * */ int lookfor(const EOT *_eo, const eoPop& _pop) { - eoPop::const_iterator it; + typename eoPop::const_iterator it; for (it=_pop.begin(); it<_pop.end(); it++) { if (_eo == &(*it)) diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 7f737739f..f07615f54 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -98,7 +98,7 @@ typedef typename EOT::Fitness Fitness; /// helper struct for comparing on pairs // compares the scores // uses the fitness if scores are equals ???? - typedef pair::iterator> EPpair; + typedef pair::iterator> EPpair; struct Cmp { bool operator()(const EPpair a, const EPpair b) const { @@ -175,7 +175,7 @@ class eoLinearTruncate : public eoReduce throw std::logic_error("eoLinearTruncate: Cannot truncate to a larger size!\n"); for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); + typename eoPop::iterator it = _newgen.it_worse_element(); _newgen.erase(it); } } diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index 45751f3a3..516abf22b 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -95,7 +95,7 @@ template class eoDetTournamentWorthSelect : public eoSelectFromWorth { public: - typedef vector::iterator worthIterator; + typedef typename vector::iterator worthIterator; /* Default ctor from an eoPerf2Worth object + tournament size */ @@ -134,7 +134,7 @@ template class eoStochTournamentWorthSelect : public eoSelectFromWorth { public: - typedef vector::iterator worthIterator; + typedef typename vector::iterator worthIterator; /* Default ctor from an eoPerf2Worth object + tournament rate */ @@ -172,7 +172,7 @@ template class eoRouletteWorthSelect : public eoSelectFromWorth { public: - typedef vector::iterator worthIterator; + typedef typename vector::iterator worthIterator; /* Default ctor from an eoPerf2Worth object */ diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 66f3ffdba..c06188d59 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -225,7 +225,7 @@ private : for (unsigned o = 0; o < value().size(); ++o) { - vector::iterator nth = tmp_pop.begin() + which; + typename vector::iterator nth = tmp_pop.begin() + which; std::nth_element(tmp_pop.begin(), nth, tmp_pop.end(), CmpFitness(o, traits::maximizing(o))); value()[o] = (*nth)->fitness()[o]; } @@ -310,7 +310,7 @@ private : for (unsigned o = 0; o < traits::nObjectives(); ++o) { - eoPop::const_iterator it = max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o))); + typename eoPop::const_iterator it = max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o))); value()[o] = it->fitness()[o]; } } diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index fe2b39bd3..700cd2fbe 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -98,7 +98,7 @@ double sum_fitness(const eoPop& _pop) template double sum_fitness(const eoPop& _pop, std::pair& _minmax) { - eoPop::const_iterator it = _pop.begin(); + typename eoPop::const_iterator it = _pop.begin(); _minmax.first = it->fitness(); _minmax.second = it++->fitness(); @@ -156,7 +156,7 @@ const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rn if (roulette == 0.0) // covers the case where total==0.0 return _pop[_gen.random(_pop.size())]; // uniform choice - eoPop::const_iterator i = _pop.begin(); + typename eoPop::const_iterator i = _pop.begin(); while (roulette > 0.0) { @@ -174,7 +174,7 @@ EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) if (roulette == 0.0) // covers the case where total==0.0 return _pop[_gen.random(_pop.size())]; // uniform choice - eoPop::iterator i = _pop.begin(); + typename eoPop::iterator i = _pop.begin(); while (roulette > 0.0) { From 21d5630c3a09591f3c0b96bd8d56cc5302aff408 Mon Sep 17 00:00:00 2001 From: okoenig Date: Sun, 3 Nov 2002 13:17:48 +0000 Subject: [PATCH 0901/2134] reordered initialization list to match declaration order --- eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h index 83999cbae..ad27fece4 100644 --- a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h +++ b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h @@ -41,12 +41,10 @@ public : Constructor ... */ - eoEOSendMessTo (eoPop & _pop - ) : - pop (_pop), - eoMessTo ("eoEOSendMessTo") { - - } + eoEOSendMessTo (eoPop & _pop ) + : eoMessTo ("eoEOSendMessTo"), + pop (_pop) + {} /** To send the given population ... From cf40eab455a1d32c183ce0650fa7b8ea87c7f53a Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Dec 2002 06:17:25 +0000 Subject: [PATCH 0902/2134] Corrected a typo --- eo/src/utils/eoParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index d0360859c..c002cfd66 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -66,7 +66,7 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, programName( _argv[0]), programDescription( _programDescription), needHelp(false, "help", "Prints this message", 'h'), - stopOnUnknownParam(true, "stopOnUnknownParam", "Stop if unkonwn param entered", '\0') + stopOnUnknownParam(true, "stopOnUnknownParam", "Stop if unkown param entered", '\0') { // need to process the param file first // if we want command-line to have highest priority From b5d61be21afa7c82be1d19c53b67fd0e7d30fc74 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Dec 2002 06:19:56 +0000 Subject: [PATCH 0903/2134] Corrected an error in name of statusParam parameter --- eo/tutorial/html/SecondBitEA.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/html/SecondBitEA.html b/eo/tutorial/html/SecondBitEA.html index c1ebd3cbb..ea043f026 100644 --- a/eo/tutorial/html/SecondBitEA.html +++ b/eo/tutorial/html/SecondBitEA.html @@ -205,10 +205,10 @@ else, postpone these

          parser.printHelp(cout);
          exit(1);
       } -
    if (status_nameParam.value() != "") +
    if (statusParam.value() != "")
       {
          ofstream -os(status_nameParam.value().c_str()); +os(statusParam.value().c_str());
          os << parser; // and you can use that file as parameter file
       } From 21e07e03a9f0857924b2edac89a6a4f5e627380e Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Dec 2002 06:57:33 +0000 Subject: [PATCH 0904/2134] Corrected wrong links in the 1st paragraph --- eo/tutorial/html/eoLesson5.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/html/eoLesson5.html b/eo/tutorial/html/eoLesson5.html index 1bd4b1eca..cffede041 100644 --- a/eo/tutorial/html/eoLesson5.html +++ b/eo/tutorial/html/eoLesson5.html @@ -24,10 +24,10 @@ own genotype structure. Note that at the moment, only algorithms involving a scalar fitness (double) are implemented (see test dir for Pareto optimization of multiple-objective fitness - or be patient :-)

    The minimum code you'll have to write is first, of course, the code -for the genotype structure. Then, the representation-dependent +for the genotype structure. Then, the representation-dependent code: intialization procedure(s), variation -operators (quadratic crossover, mutation operator), ... and evaluation +operators (quadratic crossover, mutation operator), ... and evaluation function - and that's it : we have prepared some template files and the script create.sh that will take care of generating a few other files to make your application complete. From 3e673f6a8e539f407f9905c8ceea8892e9b9dd8d Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Dec 2002 21:04:47 +0000 Subject: [PATCH 0905/2134] =?UTF-8?q?There=20was=20a=20bug=20in=20teh=20Ct?= =?UTF-8?q?or=20(fortunately,=20only=20with=20the=20last=20parameter,=20th?= =?UTF-8?q?at=20was=20generally=20used=20with=20the=20default=20value).=20?= =?UTF-8?q?Thanks=20to=20Ram=C3=B3n=20Casero=20Ca=C3=B1as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/utils/eoFileMonitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 514f106cc..13479b68d 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk -CVS Info: $Date: 2001-04-03 10:08:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.9 2001-04-03 10:08:07 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2002-12-09 21:04:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.10 2002-12-09 21:04:47 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -47,7 +47,7 @@ class eoFileMonitor : public eoMonitor public : eoFileMonitor(std::string _filename, std::string _delim = " ", bool _keep = false) : - filename(_filename), delim(_delim), keep(keep) + filename(_filename), delim(_delim), keep(_keep) { if (! _keep) { From dc42894fb7f652f091441182e2a483fc88be2b4f Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 13 Dec 2002 10:03:47 +0000 Subject: [PATCH 0906/2134] Fixing bug [preserve order of the pop. to evaluate] --- eo/src/paradisEO/comm/eoLocalListener.h | 13 +++++++ eo/src/paradisEO/eval/eoDistPopEvalFunc.h | 43 +++++++++++++---------- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/eo/src/paradisEO/comm/eoLocalListener.h b/eo/src/paradisEO/comm/eoLocalListener.h index e106e3d00..a0b342d8b 100644 --- a/eo/src/paradisEO/comm/eoLocalListener.h +++ b/eo/src/paradisEO/comm/eoLocalListener.h @@ -108,6 +108,19 @@ public : } } + void wait () { + + bool b = false ; + + do { + comm -> Probe (num_id, 0) ; + update () ; + if (! empty ()) + b = true ; + + } while (! b) ; + } + /** String identifier of this algo/agent ? */ diff --git a/eo/src/paradisEO/eval/eoDistPopEvalFunc.h b/eo/src/paradisEO/eval/eoDistPopEvalFunc.h index 4a85af42c..93d20cdd3 100644 --- a/eo/src/paradisEO/eval/eoDistPopEvalFunc.h +++ b/eo/src/paradisEO/eval/eoDistPopEvalFunc.h @@ -67,7 +67,12 @@ public : // Partitioning ... - int j = 0, l = 0 ; + int j = 0, l = 0 ; + + bool t [listen.size ()] ; + for (int i = 0 ; i < listen.size () ; i ++) + t [i] = false ; + for (int i = 0 ; i < num_eval ; i ++) { eoPop pop ; @@ -84,30 +89,32 @@ public : } eoEOSendMessTo mess (pop) ; - mess (listen [l ++]) ; + mess (listen [l]) ; + t [l ++] = true ; } // On standby of the returns _offspring.clear () ; - while (_offspring.size () != old_size) { - - listen.wait () ; - - for (int i = 0 ; i < listen.size () ; i ++) - if (listen [i].label () == label && ! listen [i].empty ()) { - while (! listen [i].empty ()) { + // while (_offspring.size () != old_size) { + + // listen.wait () ; + + for (int i = 0 ; i < listen.size () ; i ++) + if (t [i]) { + listen [i].wait () ; + //while (! listen [i].empty ()) { - eoPop & pop = listen [i].front () ; - - for (int m = 0 ; m < pop.size () ; m ++) - _offspring.push_back (pop [m]) ; - - listen [i].pop () ; + eoPop & pop = listen [i].front () ; - } - } - } + for (int m = 0 ; m < pop.size () ; m ++) + _offspring.push_back (pop [m]) ; + + listen [i].pop () ; + + //} + //} + } } private : From 995cb2bd4ac4019197f61b4834681239eb5bbdeb Mon Sep 17 00:00:00 2001 From: music_dev Date: Sat, 14 Dec 2002 02:51:53 +0000 Subject: [PATCH 0907/2134] Added compatibility for MSVC.NET --- eo/src/utils/compatibility.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 4d2f856e5..0bab1f086 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -38,12 +38,13 @@ #endif #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) && (_MSC_VER < 1300) /* Maarten: added this code here because Mirkosoft has the nasty habit of #define min and max in stdlib.h (and windows.h) I'm trying to undo this horrible macro magic (microsoft yet macrohard) here. Sure hope it works +Olivier: this has been removed in .NET :) One step more standard... */ #pragma warning(disable:4786) From 3937dd0fd6a04e72a29a3219a037fd5c1fdd813d Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 29 Dec 2002 22:48:01 +0000 Subject: [PATCH 0908/2134] oops, error in line 47 --- eo/test/t-eoParetoFitness.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index ee04facfd..1cbf33732 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -43,7 +43,7 @@ void compare(F & _eo1, F & _eo2) { if (_eo1.dominates(_eo2)) cout << _eo1 << " dominates " << _eo2 << endl; - else if (_eo2.dominates(_eo2)) + else if (_eo2.dominates(_eo1)) cout << _eo2 << " dominates " << _eo1 << endl; else cout << "None of " << _eo1 << " and " << _eo2 << "dominates the other" << endl; From 131e0e033d6089acc49ff32dd2c0ffb24271d174 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 5 Jan 2003 16:31:50 +0000 Subject: [PATCH 0909/2134] Added pyeo. Some changes needed to be made for include files and the like in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. --- eo/src/EO.h | 3 - eo/src/Makefile.am | 4 +- eo/src/eoDetTournamentSelect.h | 2 +- eo/src/eoFunctor.h | 17 +- eo/src/eoGenOp.h | 8 +- eo/src/eoOneToOneBreeder.h | 7 +- eo/src/eoOpContainer.h | 2 +- eo/src/eoTruncSelect.h | 2 +- eo/src/pyeo/AUTHORS | 3 + eo/src/pyeo/COPYING | 340 +++++++++++++++++++++++++++++ eo/src/pyeo/Makefile | 48 ++++ eo/src/pyeo/NEWS | 0 eo/src/pyeo/README | 3 + eo/src/pyeo/abstract1.cpp | 43 ++++ eo/src/pyeo/algos.cpp | 93 ++++++++ eo/src/pyeo/breeders.cpp | 49 +++++ eo/src/pyeo/continuators.cpp | 63 ++++++ eo/src/pyeo/def_abstract_functor.h | 135 ++++++++++++ eo/src/pyeo/geneticOps.cpp | 155 +++++++++++++ eo/src/pyeo/mergers.cpp | 39 ++++ eo/src/pyeo/monitors.cpp | 28 +++ eo/src/pyeo/perf2worth.cpp | 30 +++ eo/src/pyeo/pickle.h | 67 ++++++ eo/src/pyeo/pyeo.cpp | 173 +++++++++++++++ eo/src/pyeo/pyeo.h | 117 ++++++++++ eo/src/pyeo/random_numbers.cpp | 66 ++++++ eo/src/pyeo/reduce.cpp | 63 ++++++ eo/src/pyeo/replacement.cpp | 65 ++++++ eo/src/pyeo/selectOne.cpp | 104 +++++++++ eo/src/pyeo/selectors.cpp | 59 +++++ eo/src/pyeo/test/maxone.py | 81 +++++++ eo/src/pyeo/test/run_tests.sh | 8 + eo/src/pyeo/test/test_breeders.py | 37 ++++ eo/src/pyeo/test/test_pickling.py | 102 +++++++++ eo/src/pyeo/test/test_populator.py | 86 ++++++++ eo/src/pyeo/test/test_reduce.py | 34 +++ eo/src/pyeo/test/test_selectone.py | 66 ++++++ eo/src/pyeo/test/test_sga.py | 25 +++ eo/src/pyeo/valueParam.cpp | 85 ++++++++ eo/src/utils/selectors.h | 6 +- 40 files changed, 2300 insertions(+), 18 deletions(-) create mode 100644 eo/src/pyeo/AUTHORS create mode 100644 eo/src/pyeo/COPYING create mode 100644 eo/src/pyeo/Makefile create mode 100644 eo/src/pyeo/NEWS create mode 100644 eo/src/pyeo/README create mode 100644 eo/src/pyeo/abstract1.cpp create mode 100644 eo/src/pyeo/algos.cpp create mode 100644 eo/src/pyeo/breeders.cpp create mode 100644 eo/src/pyeo/continuators.cpp create mode 100644 eo/src/pyeo/def_abstract_functor.h create mode 100644 eo/src/pyeo/geneticOps.cpp create mode 100644 eo/src/pyeo/mergers.cpp create mode 100644 eo/src/pyeo/monitors.cpp create mode 100644 eo/src/pyeo/perf2worth.cpp create mode 100644 eo/src/pyeo/pickle.h create mode 100644 eo/src/pyeo/pyeo.cpp create mode 100644 eo/src/pyeo/pyeo.h create mode 100644 eo/src/pyeo/random_numbers.cpp create mode 100644 eo/src/pyeo/reduce.cpp create mode 100644 eo/src/pyeo/replacement.cpp create mode 100644 eo/src/pyeo/selectOne.cpp create mode 100644 eo/src/pyeo/selectors.cpp create mode 100644 eo/src/pyeo/test/maxone.py create mode 100755 eo/src/pyeo/test/run_tests.sh create mode 100644 eo/src/pyeo/test/test_breeders.py create mode 100644 eo/src/pyeo/test/test_pickling.py create mode 100644 eo/src/pyeo/test/test_populator.py create mode 100644 eo/src/pyeo/test/test_reduce.py create mode 100644 eo/src/pyeo/test/test_selectone.py create mode 100644 eo/src/pyeo/test/test_sga.py create mode 100644 eo/src/pyeo/valueParam.cpp diff --git a/eo/src/EO.h b/eo/src/EO.h index a1147b1dc..7613d91c6 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -120,9 +120,6 @@ public: _is.seekg(pos); // rewind _is >> repFitness; } - - - } /** diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 88ca6f322..e37a70073 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,12 +4,12 @@ ## ############################################################################### -SUBDIRS = es ga gp utils other +SUBDIRS = es ga gp utils other do CPPFLAGS = -O2 lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp eoParetoFitness.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = *.h eo +libeoinc_HEADERS = *.h eo do/*.h diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index 7bd272a7d..5c72031cb 100755 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -60,7 +60,7 @@ template class eoDetTournamentSelect: public eoSelectOne */ virtual const EOT& operator()(const eoPop& _pop) { - return deterministic_tournament(_pop, tSize); + return deterministic_tournament(_pop, tSize); } private: diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index ebce1279d..3d060a73b 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -20,7 +20,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es mak@dhi.dk - CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.5 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2003-01-05 16:31:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.6 2003-01-05 16:31:47 maartenkeijzer Exp $ $Author: maartenkeijzer $ */ //----------------------------------------------------------------------------- @@ -75,6 +75,11 @@ public : /// The pure virtual function that needs to be implemented by the subclass virtual R operator()() = 0; + + static eoFunctorBase::procedure_tag functor_category() + { + return eoFunctorBase::procedure_tag(); + } }; /** @@ -106,6 +111,11 @@ public : /// The pure virtual function that needs to be implemented by the subclass virtual R operator()(A1) = 0; + + static eoFunctorBase::unary_function_tag functor_category() + { + return eoFunctorBase::unary_function_tag(); + } }; /** @@ -140,6 +150,11 @@ public : /// The pure virtual function that needs to be implemented by the subclass virtual R operator()(A1, A2) = 0; + + static eoFunctorBase::binary_function_tag functor_category() + { + return eoFunctorBase::binary_function_tag(); + } }; /** diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 74b0bc2c3..9dcf6126a 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -67,7 +67,7 @@ class eoGenOp : public eoOp, public eoUF &, void> virtual string className() const = 0; void operator()(eoPopulator& _pop) { - _pop.reserve(max_production()); + _pop.reserve(max_production()); apply(_pop); } @@ -163,13 +163,15 @@ class eoQuadGenOp : public eoGenOp void apply(eoPopulator& _pop) { EOT& a = *_pop; - EOT& b = *++_pop; - + EOT& b = *++_pop; + + if(op(a, b)) { a.invalidate(); b.invalidate(); } + } virtual string className() const {return op.className();} diff --git a/eo/src/eoOneToOneBreeder.h b/eo/src/eoOneToOneBreeder.h index 7b85d8697..09891a718 100644 --- a/eo/src/eoOneToOneBreeder.h +++ b/eo/src/eoOneToOneBreeder.h @@ -32,7 +32,10 @@ #include #include #include +#include #include +#include +#include #include /***************************************************************************** @@ -79,7 +82,7 @@ class eoOneToOneBreeder: public eoBreed _offspring.clear(); eoSelectivePopulator popit(_parents, _offspring, select); - for (unsigned iParent=0; iParent<_parents.size(); iParent++) + for (unsigned iParent=0; iParent if (theParent > leOffspring) // old parent better than offspring if (rng.uniform() < pReplace) // if probability leOffspring = theParent; // replace - cout << "============ Final =========================\n"; - cout << _offspring << endl; // finally, go to next guy to handle ++popit; } diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 43465adb9..5dbd45693 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -93,7 +93,7 @@ class eoSequentialOp : public eoOpContainer void apply(eoPopulator& _pop) { - position_type pos = _pop.tellp(); + position_type pos = _pop.tellp(); for (size_t i = 0; i < rates.size(); ++i) { diff --git a/eo/src/eoTruncSelect.h b/eo/src/eoTruncSelect.h index 313d3c2d0..0c64e1622 100644 --- a/eo/src/eoTruncSelect.h +++ b/eo/src/eoTruncSelect.h @@ -44,7 +44,7 @@ class eoTruncSelect : public eoSelect { public: /** Ctor: from an eoSelect (and an eoMany to tell how many are kept for selectino */ - eoSelectMany(eoSelectOne& _select, eoHowMany _howMany) + eoTruncSelect(eoSelectOne& _select, eoHowMany _howMany) : select(_select), howMany(_howMany) {} /** diff --git a/eo/src/pyeo/AUTHORS b/eo/src/pyeo/AUTHORS new file mode 100644 index 000000000..e1d909968 --- /dev/null +++ b/eo/src/pyeo/AUTHORS @@ -0,0 +1,3 @@ + +Maarten Keijzer (mkeijzer@cs.vu.nl) + diff --git a/eo/src/pyeo/COPYING b/eo/src/pyeo/COPYING new file mode 100644 index 000000000..d60c31a97 --- /dev/null +++ b/eo/src/pyeo/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile new file mode 100644 index 000000000..340dc7aeb --- /dev/null +++ b/eo/src/pyeo/Makefile @@ -0,0 +1,48 @@ +# Note for however is foolish enough to attempt to build this thing +# +# You need: +# Python 2.2 +# Stlport +# Boost.Python v2 +# +# +# On my debian (unstable), I used libstlport_gcc.so.4.5 +# and libboost_python.so.1.29.0 +# +# Obviously together with python2.2 (as Boost.Python.v2 needs that) +# +# I'm pretty sure any stlport will do, but less convinced about boost.python +# That lib seems to be pretty much under development (as I found out, the hard way) +# but this version 1.29 seems to work for me. +# +# My version of boost was found in /usr/include, modify INC to your system + + +CXX = g++ #-3.2 +CXXFLAGS = -g #-DNDEBUG +CPPFLAGS = -Wall #-O2 +LDFLAGS = +COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c +LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) +INC=-I/usr/include/python2.2/ -I/usr/include/stlport -I.. -ftemplate-depth-50 + +OBJECTS=eoFunctorStore.o pyeo.o abstract1.o algos.o \ + random_numbers.o geneticOps.o selectOne.o continuators.o\ + reduce.o replacement.o selectors.o breeders.o\ + mergers.o valueParam.o perf2worth.o + +all: pyeo.so + +clean: + rm *.so *.o test/*.pyc + +pyeo.so: $(OBJECTS) + $(LINK) -o pyeo.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport + +eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp + $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) + +%.o:%.cpp pyeo.h def_abstract_functor.h + $(COMPILE) $< $(INC) + + diff --git a/eo/src/pyeo/NEWS b/eo/src/pyeo/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/eo/src/pyeo/README b/eo/src/pyeo/README new file mode 100644 index 000000000..b28b04f64 --- /dev/null +++ b/eo/src/pyeo/README @@ -0,0 +1,3 @@ + + + diff --git a/eo/src/pyeo/abstract1.cpp b/eo/src/pyeo/abstract1.cpp new file mode 100644 index 000000000..d35edefc0 --- /dev/null +++ b/eo/src/pyeo/abstract1.cpp @@ -0,0 +1,43 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "pyeo.h" +#include "def_abstract_functor.h" + +void abstract1() +{ + /* Abstract Classes: overrideble from python */ + def_abstract_functor >("eoEvalFunc"); + def_abstract_functor >("eoInit"); + + def_abstract_functor >("eoTransform"); + + class_, bases > >("eoSGATransform", + init< eoQuadOp&, double, + eoMonOp&, double>()); + + def_abstract_functor >("eoPopEvalFunc"); +} diff --git a/eo/src/pyeo/algos.cpp b/eo/src/pyeo/algos.cpp new file mode 100644 index 000000000..c375a6a07 --- /dev/null +++ b/eo/src/pyeo/algos.cpp @@ -0,0 +1,93 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include + +#include "pyeo.h" +#include "def_abstract_functor.h" + +void algos() +{ + def_abstract_functor >("eoAlgo"); + + /* Algorithms */ + class_, bases >, boost::noncopyable>("eoSGA", + init&, + eoQuadOp&, float, + eoMonOp&, float, + eoEvalFunc&, + eoContinue&>()) + .def("__call__", &eoSGA::operator()) + ; + + class_, bases > >("eoEasyEA", + init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoReplacement& >() ) + .def( init< + eoContinue&, + eoPopEvalFunc&, + eoBreed&, + eoReplacement&>() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoMerge&, + eoReduce& >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoSelect&, + eoTransform&, + eoReplacement&>()) + .def( init< + eoContinue&, + eoEvalFunc&, + eoSelect&, + eoTransform&, + eoMerge&, + eoReduce&>()) + .def("__call__", &eoEasyEA::operator()) + ; + + /* + class_, bases< eoAlgo > >("eoCellularEasyEA", + init< eoContinue&, + eoEvalFunc&, + eoSelectOne&, + eoBinOp&, + eoMonOp&, + eoSelectOne&>()) + .def( + init< eoContinue&, + eoEvalFunc&, + eoSelectOne&, + eoQuadOp&, + eoMonOp&, + eoSelectOne&>()) + ; + */ +} diff --git a/eo/src/pyeo/breeders.cpp b/eo/src/pyeo/breeders.cpp new file mode 100644 index 000000000..da2b5dcca --- /dev/null +++ b/eo/src/pyeo/breeders.cpp @@ -0,0 +1,49 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include + +#include "pyeo.h" +#include "def_abstract_functor.h" + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoBreed::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoBreed::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoBreed::operator()) + +void breeders() +{ + def_abstract_functor >("eoBreed"); + + DEF3(eoSelectTransform, eoSelect&, eoTransform&); + + DEF3(eoGeneralBreeder, eoSelectOne&, eoGenOp&) + .def( init&, eoGenOp&, double>() ) + .def( init&, eoGenOp&, double, bool>() ) + .def( init&, eoGenOp&, eoHowMany>() ); + + + DEF3(eoOneToOneBreeder, eoGenOp&, eoEvalFunc&) + .def( init&, eoEvalFunc&, double>() ) + .def( init&, eoEvalFunc&, double, eoHowMany>() ); + +} + diff --git a/eo/src/pyeo/continuators.cpp b/eo/src/pyeo/continuators.cpp new file mode 100644 index 000000000..8a9cb4a91 --- /dev/null +++ b/eo/src/pyeo/continuators.cpp @@ -0,0 +1,63 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "pyeo.h" +#include "def_abstract_functor.h" + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoContinue::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) + +void continuators() +{ + /* Counters, wrappers etc */ + + class_, bases > >("eoEvalFuncCounter", + init< eoEvalFunc&, std::string>()) + .def("__call__", &eoEvalFuncCounter::operator()) + ; + /* Continuators */ + def_abstract_functor >("eoContinue"); + + class_, bases >, boost::noncopyable >("eoGenContinue", init() ) + .def("__call__", &eoGenContinue::operator()) + ; + + class_, bases > >("eoCombinedContinue", init&>()) + .def( init&, eoContinue& >() ) + .def("add", &eoCombinedContinue::add) + .def("__call__", &eoCombinedContinue::operator()) + ; + + class_, bases > >("eoEvalContinue", + init&, unsigned long>()) + .def("__call__", &eoEvalContinue::operator()) + ; + + DEF2(eoFitContinue, object); // object is the fitness type + + DEF3(eoSteadyFitContinue, unsigned long, unsigned long); +} diff --git a/eo/src/pyeo/def_abstract_functor.h b/eo/src/pyeo/def_abstract_functor.h new file mode 100644 index 000000000..eaa4aa54d --- /dev/null +++ b/eo/src/pyeo/def_abstract_functor.h @@ -0,0 +1,135 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef MAKE_ABSTRACT_FUNCTOR_H +#define MAKE_ABSTRACT_FUNCTOR_H + +#include + +namespace eoutils { + +using namespace boost::python; + +template +class ProcWrapper : public Proc +{ + public: + PyObject* self; + ProcWrapper(PyObject* s) : self(s) {} + + typename Proc::result_type operator()(void) + { + return boost::python::call_method(self, "__call__"); + } +}; + +template +void make_abstract_functor(std::string name, typename eoFunctorBase::procedure_tag) +{ + typedef ProcWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()); +} + +template +void make_abstract_functor_ref(std::string name, typename eoFunctorBase::procedure_tag) +{ + typedef ProcWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>()); +} + +template +class UnaryWrapper : public Unary +{ + public: + PyObject* self; + UnaryWrapper(PyObject* s) : self(s) {} + + typename Unary::result_type operator()(typename Unary::argument_type a) + { + return boost::python::call_method(self, "__call__", boost::ref(a) ); + } +}; + +template +void make_abstract_functor(std::string name, typename eoFunctorBase::unary_function_tag) +{ + typedef UnaryWrapper Wrapper; + + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()) + ; +} + +template +void make_abstract_functor_ref(std::string name, typename eoFunctorBase::unary_function_tag) +{ + typedef UnaryWrapper Wrapper; + + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ) + ; +} + +template +class BinaryWrapper : public Binary +{ + public: + PyObject* self; + BinaryWrapper(PyObject* s) : self(s) {} + typename Binary::result_type operator()(typename Binary::first_argument_type a1, typename Binary::second_argument_type a2) + { + return boost::python::call_method< + typename Binary::result_type>(self, "__call__", boost::ref(a1), boost::ref(a2) ); + } +}; + +template +void make_abstract_functor(std::string name, typename eoFunctorBase::binary_function_tag) +{ + typedef BinaryWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()); +} + +template +void make_abstract_functor_ref(std::string name, typename eoFunctorBase::binary_function_tag) +{ + typedef BinaryWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ); +} + +}// namespace eoutils + +template +void def_abstract_functor(std::string name) +{ + eoutils::make_abstract_functor(name, Functor::functor_category()); +} + +template +void def_abstract_functor_ref(std::string name) +{ + eoutils::make_abstract_functor_ref(name, Functor::functor_category()); +} + +#endif diff --git a/eo/src/pyeo/geneticOps.cpp b/eo/src/pyeo/geneticOps.cpp new file mode 100644 index 000000000..85f5f84ef --- /dev/null +++ b/eo/src/pyeo/geneticOps.cpp @@ -0,0 +1,155 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "pyeo.h" + +class GenOpWrapper : public eoGenOp +{ + public: + + PyObject* self; + GenOpWrapper(PyObject* p) : self(p) {} + unsigned max_production(void) + { + return call_method(self,"max_production"); + } + std::string className() const + { + return "GenOpDerivative"; // never saw the use of className anyway + } + + void apply(eoPopulator& populator ) + { + boost::python::call_method(self,"apply", boost::ref( populator ) ); + } +}; + +class PopulatorWrapper : public eoPopulator +{ +public: + PyObject* self; + PopulatorWrapper(PyObject* p, const eoPop& src, eoPop& dest) + : eoPopulator(src, dest), self(p) + { + //throw std::runtime_error("abstract base class"); + } + + const PyEO& select() + { + return call_method(self,"select"); + } +}; + +class MonOpWrapper : public eoMonOp +{ +public: + PyObject* self; + MonOpWrapper(PyObject* p) : self(p) {} + bool operator()(PyEO& _eo) + { return boost::python::call_method(self, "__call__", boost::ref( _eo )); } +}; +class BinOpWrapper : public eoBinOp +{ +public: + PyObject* self; + BinOpWrapper(PyObject* p) : self(p) {} + bool operator()(PyEO& _eo, const PyEO& _eo2) + { return boost::python::call_method(self, "__call__", boost::ref( _eo ), boost::ref(_eo2)); } +}; +class QuadOpWrapper : public eoQuadOp +{ +public: + PyObject* self; + QuadOpWrapper(PyObject* p) : self(p) {} + bool operator()(PyEO& _eo, PyEO& _eo2) + { return boost::python::call_method(self, "__call__", boost::ref( _eo ), boost::ref(_eo2)); } +}; + +void geneticOps() +{ + class_, PopulatorWrapper, boost::noncopyable> + ("eoPopulator", init&, eoPop&>() ) + .def("select", &PopulatorWrapper::select, return_internal_reference<>() ) + .def("get", &eoPopulator::operator*, return_internal_reference<>() ) + .def("next", &eoPopulator::operator++, return_internal_reference<>() ) + .def("insert", &eoPopulator::insert) + .def("reserve", &eoPopulator::reserve) + .def("source", &eoPopulator::source, return_internal_reference<>() ) + .def("offspring", &eoPopulator::offspring, return_internal_reference<>() ) + .def("tellp", &eoPopulator::tellp) + .def("seekp", &eoPopulator::seekp) + .def("exhausted", &eoPopulator::exhausted) + ; + + class_, bases > > + ("eoSeqPopulator", init&, eoPop&>() ) + .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) + ; + + class_, bases > > + ("eoSelectivePopulator", init&, eoPop&, eoSelectOne& >() ) + .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) + ; + enum_::OpType>("OpType") + .value("unary", eoOp::unary) + .value("binary", eoOp::binary) + .value("quadratic", eoOp::quadratic) + .value("general", eoOp::general) + ; + + class_ >("eoOp", init::OpType>()) + .def("getType", &eoOp::getType); + + class_, MonOpWrapper, bases >, boost::noncopyable>("eoMonOp", init<>()) + .def("__call__", &MonOpWrapper::operator(), "an example docstring"); + class_, BinOpWrapper, bases >, boost::noncopyable>("eoBinOp", init<>()) + .def("__call__", &BinOpWrapper::operator()); + class_, QuadOpWrapper, bases >, boost::noncopyable>("eoQuadOp", init<>()) + .def("__call__", &QuadOpWrapper::operator()); + + class_, GenOpWrapper, bases >, boost::noncopyable>("eoGenOp", init<>()) + .def("max_production", &GenOpWrapper::max_production) + .def("className", &GenOpWrapper::className) + .def("apply", &GenOpWrapper::apply) + .def("__call__", &eoGenOp::operator()) + ; + + class_, bases >, boost::noncopyable>("eoSequentialOp", init<>()) + .def("add", &eoSequentialOp::add) + .def("apply", &eoSequentialOp::apply) + ; + + class_, bases >, boost::noncopyable>("eoProportionalOp", init<>()) + .def("add", &eoProportionalOp::add) + .def("apply", &eoProportionalOp::apply) + ; + + /* Cloning */ + class_, bases > >("eoMonCloneOp").def("__call__", &eoMonCloneOp::operator()); + class_, bases > >("eoBinCloneOp").def("__call__", &eoBinCloneOp::operator()); + class_, bases > >("eoQuadCloneOp").def("__call__", &eoQuadCloneOp::operator()); + +} diff --git a/eo/src/pyeo/mergers.cpp b/eo/src/pyeo/mergers.cpp new file mode 100644 index 000000000..1106b663c --- /dev/null +++ b/eo/src/pyeo/mergers.cpp @@ -0,0 +1,39 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "pyeo.h" +#include "def_abstract_functor.h" + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoMerge::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoMerge::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoMerge::operator()) + +void mergers() +{ + def_abstract_functor >("eoMerge"); + + DEF2(eoElitism, double) + .def( init() ); + DEF(eoNoElitism); + DEF(eoPlus); + +} + diff --git a/eo/src/pyeo/monitors.cpp b/eo/src/pyeo/monitors.cpp new file mode 100644 index 000000000..e15f091ba --- /dev/null +++ b/eo/src/pyeo/monitors.cpp @@ -0,0 +1,28 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "pyeo.h" + +void monitors() +{ + +} + diff --git a/eo/src/pyeo/perf2worth.cpp b/eo/src/pyeo/perf2worth.cpp new file mode 100644 index 000000000..5ef8630d4 --- /dev/null +++ b/eo/src/pyeo/perf2worth.cpp @@ -0,0 +1,30 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +//#include +//#include + +//#include "pyeo.h" + +void perf2worth() // will have to rethink this +{ + // class_ >("eoNDSorting_II"); +} + + diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h new file mode 100644 index 000000000..992f04a1b --- /dev/null +++ b/eo/src/pyeo/pickle.h @@ -0,0 +1,67 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PICKLE_H +#define PICKLE_h + +#include +#include +/** Implements pickle support for eoPersistent derivatives */ + + +template +struct T_pickle_suite : boost::python::pickle_suite +{ + static + std::string print_to_string(const T& t) + { + std::ostrstream os; + t.printOn(os); + os << ends; + return os.str(); + } + + static + boost::python::tuple getstate(const T& t) + { + std::string s = print_to_string(t); + return boost::python::make_tuple( boost::python::str(s)); + } + + static + void setstate(T& t, boost::python::tuple pickled) + { + std::string s = extract(pickled[0]); + std::istrstream is(s.c_str(), s.size()); + t.readFrom(is); + } +}; + +/** Defines persistency through pickle support by using strings + * so while we're at it, we will .def("__str__") as well + */ +template +boost::python::class_& pickle(boost::python::class_& c) +{ + return c.def_pickle(T_pickle_suite()) + .def("__str__", T_pickle_suite::print_to_string); +} + +#endif diff --git a/eo/src/pyeo/pyeo.cpp b/eo/src/pyeo/pyeo.cpp new file mode 100644 index 000000000..c7abcf18d --- /dev/null +++ b/eo/src/pyeo/pyeo.cpp @@ -0,0 +1,173 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + + +#include +#include "pyeo.h" + +ostream& operator<<(ostream& os, const PyEO& _eo) +{ + os << _eo.to_string(); + return os; +} + +struct pyPop_pickle_suite : boost::python::pickle_suite +{ + static boost::python::tuple getstate(const eoPop& _pop) + { + boost::python::list entries; + for (unsigned i = 0; i != _pop.size(); ++i) + entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); + + return make_tuple(object(_pop.size()), entries); + } + + static void setstate( eoPop& _pop, boost::python::tuple pickled) + { + int sz = extract(pickled[0]); + boost::python::list entries = pickled[1]; + _pop.resize(sz); + for (unsigned i = 0; i != _pop.size(); ++i) + PyEO_pickle_suite::setstate(_pop[i], tuple(entries[i]) ); + } +}; + + +template +boost::python::str to_string(T& _p) +{ + std::ostrstream os; + _p.printOn(os); + os << ends; + std::string s(os.str()); + return str(s.c_str()); +} + +void pop_sort(eoPop& pop) { pop.sort(); } +void pop_shuffle(eoPop& pop) { pop.shuffle(); } + +struct index_error { index_error(std::string w) : what(w) {}; std::string what; }; +void translate_index_error(index_error const& e) +{ + PyErr_SetString(PyExc_IndexError, e.what.c_str()); +} + +PyEO& pop_getitem(eoPop& pop, object key) +{ + extract x(key); + if (!x.check()) + throw index_error("Slicing not allowed"); + + int i = x(); + + if (static_cast(i) >= pop.size()) + { + throw index_error("Index out of bounds"); + } + + return pop[i]; +} +void pop_setitem(eoPop& pop, object key, PyEO& value) +{ + + extract x(key); + if (!x.check()) + throw index_error("Slicing not allowed"); + + int i = x(); + + if (static_cast(i) >= pop.size()) + { + throw index_error("Index out of bounds"); + } + + pop[i] = value; +} + +void pop_push_back(eoPop& pop, PyEO& p) { pop.push_back(p); } +void pop_resize( eoPop& pop, unsigned i) { pop.resize(i); } + +extern void abstract1(); +extern void algos(); +extern void random_numbers(); +extern void geneticOps(); +extern void selectOne(); +extern void continuators(); +extern void reduce(); +extern void replacement(); +extern void selectors(); +extern void breeders(); +extern void mergers(); +extern void valueParam(); +extern void perf2worth(); + +BOOST_PYTHON_MODULE(pyeo) +{ + register_exception_translator(&translate_index_error); + + class_("EO") + .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) + .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) + .def_pickle(PyEO_pickle_suite()) + .def("invalidate", &PyEO::invalidate) + .def("invalid", &PyEO::invalid) + .def("__str__", &PyEO::to_string) + ; + + class_ >("Pop", init<>() ) + .def( init< unsigned, eoInit& >() ) + .def("append", &eoPop::append) + .def("__str__", to_string >) + .def("__len__", &eoPop::size) + .def("sort", pop_sort ) + .def("shuffle", pop_shuffle) + .def("__getitem__", pop_getitem, return_internal_reference<>() ) + .def("__setitem__", pop_setitem) + .def("best", &eoPop::best_element, return_internal_reference<>() ) + .def("push_back", pop_push_back) + .def("resize", pop_resize) + .def_pickle(pyPop_pickle_suite()) + ; + + + // Other definitions in different compilation units, + // this to avoid having g++ to choke on the load + random_numbers(); + valueParam(); + abstract1(); + geneticOps(); + selectOne(); + selectors(); + perf2worth(); + continuators(); + reduce(); + replacement(); + breeders(); + mergers(); + algos(); + +} + + +// to avoid having to build with libeo.a +ostream & operator << ( ostream& _os, const eoPrintable& _o ) { + _o.printOn(_os); + return _os; +}; diff --git a/eo/src/pyeo/pyeo.h b/eo/src/pyeo/pyeo.h new file mode 100644 index 000000000..101f6d458 --- /dev/null +++ b/eo/src/pyeo/pyeo.h @@ -0,0 +1,117 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PYEO_H +#define PYEO_H + +#include +#include + +using namespace boost::python; +/* +class PyFitness : public boost::python::object +{ + public : + PyFitness() : object() {} + + template + PyFitness(const T& o) : object(o) {} + + + static unsigned nObjectives() { return 1; } + static double tol() { return 1e-6; } + static bool maximizing(int which) { return true; } + + static bool dominates(const PyFitness& one, const PyFitness& oth) { return true; } // for the moment + + operator unsigned() const { return 1; } // for the moment + operator double() const { return 1; } // for the moment + + PyFitness operator[](int i) { return PyFitness(object::operator[](i)); } + + friend ostream& operator<<(ostream& os, const PyFitness& p) { const object& o = p; os << o; return os; } + friend istream& operator>>(istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } + + typedef PyFitness AtomType; +}; + + + +object fabs(object obj) +{ + object zero(0.0); + if (obj < zero ) + return zero-obj; + return obj; +} + +object max(object a, object b) +{ + if (a < b) + return b; + return a; +} +*/ + +struct PyEO : public EO< object > +{ + typedef object Fitness; + + Fitness getFitness() const { return invalid()? Fitness(): fitness(); } + void setFitness(Fitness f) { if (f == Fitness()) invalidate(); else fitness(f); } + + object getGenome() const { return genome; } + void setGenome(object g) { genome = g; } + object genome; + + std::string to_string() const + { + std::string result; + result += extract(str(getFitness())); + result += ' '; + result += extract(str(genome)); + return result; + } + + bool operator<(const PyEO& other) const { return EO::operator<(other); } + bool operator>(const PyEO& other) const { return EO::operator>(other); } + +}; + +ostream& operator<<(ostream& os, const PyEO& _eo); + +struct PyEO_pickle_suite : boost::python::pickle_suite +{ + typedef PyEO::Fitness Fitness; + + static + boost::python::tuple getstate(const PyEO& _eo) + { + return make_tuple(_eo.getFitness(), _eo.genome); + } + static + void setstate(PyEO& _eo, boost::python::tuple pickled) + { + _eo.setFitness( Fitness(pickled[0]) ); + _eo.genome = pickled[1]; + } +}; + +#endif diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp new file mode 100644 index 000000000..368ba0582 --- /dev/null +++ b/eo/src/pyeo/random_numbers.cpp @@ -0,0 +1,66 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include + +#include + +using namespace boost::python; + +namespace eo +{ + eoRng rng(time(0)); +} + +eoRng& get_rng() { return rng; } +double normal(eoRng& rng) { return rng.normal(); } + +std::string rng_to_string(const eoRng& _rng) +{ + std::ostrstream os; + _rng.printOn(os); + os << std::ends; + return os.str(); +} + +void rng_from_string(eoRng& _rng, std::string s) +{ + std::istrstream is(s.c_str(), s.size()); + _rng.readFrom(is); +} + +void random_numbers() +{ + class_("eoRng", init()) + .def("flip", &eoRng::flip) + .def("random", &eoRng::random) + .def("rand", &eoRng::rand) + .def("rand_max", &eoRng::rand_max) + .def("reseed", &eoRng::reseed) + .def("uniform", &eoRng::uniform) + .def("normal", normal) + .def("negexp", &eoRng::negexp) + .def("to_string", rng_to_string) + .def("from_string", rng_from_string) + ; + + def("rng", get_rng, return_value_policy()); +} diff --git a/eo/src/pyeo/reduce.cpp b/eo/src/pyeo/reduce.cpp new file mode 100644 index 000000000..24910cacf --- /dev/null +++ b/eo/src/pyeo/reduce.cpp @@ -0,0 +1,63 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include + +#include "pyeo.h" + +// unfortunately have to define it specially +class eoReduceWrapper : public eoReduce +{ + public: + PyObject* self; + eoReduceWrapper(PyObject* s) : self(s) {} + void operator()(eoPop& pop, unsigned i) + { + boost::python::call_method(self, "__call__", pop, i ); + } +}; + +void reduce() +{ + + // ref trick in def_abstract_functor does not work for unsigned int :-( + class_, eoReduceWrapper, boost::noncopyable>("eoReduce", init<>()) + .def("__call__", &eoReduceWrapper::operator()); + + class_, bases > >("eoTruncate", init<>() ) + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoRandomReduce") + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoEPReduce", init()) + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoLinearTruncate") + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoDetTournamentTruncate", init()) + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoStochTournamentTruncate", init()) + .def("__call__", &eoReduce::operator()) + ; +} + diff --git a/eo/src/pyeo/replacement.cpp b/eo/src/pyeo/replacement.cpp new file mode 100644 index 000000000..bcf799ccc --- /dev/null +++ b/eo/src/pyeo/replacement.cpp @@ -0,0 +1,65 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "pyeo.h" +#include "def_abstract_functor.h" + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoReplacement::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) + +void replacement() +{ + def_abstract_functor >("eoReplacement"); + + // eoReplacement.h + DEF(eoGenerationalReplacement); + DEF2(eoWeakElitistReplacement, eoReplacement& ); + + // eoMergeReduce.h + DEF3(eoMergeReduce, eoMerge&, eoReduce& ); + DEF(eoPlusReplacement); + DEF(eoCommaReplacement); + DEF2(eoEPReplacement, unsigned); + + // eoReduceMerge.h + DEF3(eoReduceMerge, eoReduce&, eoMerge& ); + DEF(eoSSGAWorseReplacement); + DEF2(eoSSGADetTournamentReplacement, unsigned); + DEF2(eoSSGAStochTournamentReplacement, double); + + // eoReduceMergeReduce.h + class_, bases > >("eoReplacement", + init&, + eoHowMany, eoReduce&, eoReduce&>()) + .def("__call__", &eoReplacement::operator()); + + //eoMGGReplacement + DEF(eoMGGReplacement) + .def( init() ) + .def( init() ); +} + diff --git a/eo/src/pyeo/selectOne.cpp b/eo/src/pyeo/selectOne.cpp new file mode 100644 index 000000000..42bf0f969 --- /dev/null +++ b/eo/src/pyeo/selectOne.cpp @@ -0,0 +1,104 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include + +#include "pyeo.h" +#include "pickle.h" + +class eoSelectOneWrapper : public eoSelectOne +{ + public: + PyObject* self; + eoSelectOneWrapper(PyObject* p) : self(p) {} + const PyEO& operator()(const eoPop& pop) + { + return boost::python::call_method< const PyEO& >(self, "__call__", boost::ref(pop)); + } +}; + +template +void add_select(std::string name) +{ + class_ > >(name.c_str(), init<>() ) + .def("__call__", &Select::operator(), return_internal_reference<>() ) + ; +} + +template +void add_select(std::string name, Init init) +{ + class_ > >(name.c_str(), init) + .def("__call__", &Select::operator(), return_internal_reference<>() ) + ; +} + +template +void add_select(std::string name, Init1 init1, Init2 init2) +{ + class_ > >(name.c_str(), init1) + .def( init2 ) + .def("__call__", &Select::operator(), return_internal_reference<>() ) + .def("setup", &Select::setup); +} + +void selectOne() +{ + /* Concrete classes */ + + pickle(class_("eoHowMany", init<>()) + .def( init() ) + .def( init() ) + .def( init() ) + .def("__call__", &eoHowMany::operator()) + .def("__neg__", &eoHowMany::operator-) + ); + + class_, eoSelectOneWrapper, boost::noncopyable>("eoSelectOne", init<>()) + .def("__call__", &eoSelectOneWrapper::operator(), return_internal_reference<>() ) + .def("setup", &eoSelectOne::setup); + + /* SelectOne derived classes */ + + add_select >("eoDetTournamentSelect", init<>(), init() ); + add_select >("eoStochTournamentSelect", init<>(), init() ); + add_select >("eoTruncatedSelectOne", + init&, double>(), init&, eoHowMany >() ); + + // eoProportionalSelect is not feasible to implement at this point as fitness is not recognizable as a float + // use eoDetTournament instead: with a t-size of 2 it is equivalent to eoProportional with linear scaling + //add_select >("eoProportionalSelect", init&>() ); + + add_select >("eoRandomSelect"); + add_select >("eoBestSelect"); + add_select >("eoNoSelect"); + + add_select >("eoSequentialSelect", init<>(), init()); + add_select >("eoEliteSequentialSelect"); + /* + * eoSelectFromWorth.h:class eoSelectFromWorth : public eoSelectOne + + */ +} diff --git a/eo/src/pyeo/selectors.cpp b/eo/src/pyeo/selectors.cpp new file mode 100644 index 000000000..aeb333f4d --- /dev/null +++ b/eo/src/pyeo/selectors.cpp @@ -0,0 +1,59 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "pyeo.h" +#include "def_abstract_functor.h" + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoSelect::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoSelect::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoSelect::operator()) + +void selectors() +{ + def_abstract_functor >("eoSelect"); + + DEF(eoDetSelect).def( init() ).def( init() ); + DEF3(eoSelectMany, eoSelectOne&, double) + .def( init< eoSelectOne&, double, bool>() ) + .def( init< eoSelectOne&, eoHowMany>() ); + + DEF2(eoSelectNumber, eoSelectOne&) + .def( init< eoSelectOne&, unsigned>()); + + DEF2(eoSelectPerc, eoSelectOne&) + .def( init&, float>() ); + + DEF3(eoTruncSelect, eoSelectOne&, eoHowMany); + + class_, bases > >("eoTruncatedSelectMany", + init&, double, double> ()) + .def(init&, double, double, bool> ()) + .def(init&, double, double, bool, bool> ()) + .def(init&, eoHowMany, eoHowMany> ()); + +} diff --git a/eo/src/pyeo/test/maxone.py b/eo/src/pyeo/test/maxone.py new file mode 100644 index 000000000..6f1baefa4 --- /dev/null +++ b/eo/src/pyeo/test/maxone.py @@ -0,0 +1,81 @@ + +import sys +sys.path.append('..') + +print 'importing pyeo' +from pyeo import * +print 'done' + +from copy import copy + + +class EvalFunc(eoEvalFunc): + def __call__(self, eo): + eo.fitness = reduce(lambda x,y: x+y, eo.genome, 0) + +class Init(eoInit): + def __init__(self, genome_length = 10): + eoInit.__init__(self) + self.length = genome_length + def __call__(self, eo): + eo.genome = [rng().flip(0.5) for x in range(self.length)] + +class Mutate(eoMonOp): + def __call__(self, eo): + eo.genome = copy(eo.genome) + + prob = 1. / len(eo.genome) + for i in range(len(eo.genome)): + if rng().flip(0.5): + eo.genome[i] = 1-eo.genome[i]; + return 1 + +class Crossover(eoQuadOp): + def __call__(self, eo1, eo2): + eo1.genome = copy(eo1.genome); + eo2.genome = copy(eo2.genome); + + point = rng().random( len(eo1.genome) ); + + eo1.genome[:point] = eo2.genome[:point]; + eo2.genome[point:] = eo1.genome[point:]; + + return 1 + +evaluate = EvalFunc() +init = Init(3) +mutate = Mutate() +xover = Crossover() + +if __name__ == '__main__': + + eo = EO() + eo1 = EO() + + init(eo1) + init(eo) + evaluate(eo) + print eo + + for i in range(10): + xover(eo, eo1) + mutate(eo) + + evaluate(eo) + print eo, eo1 + + print + print + print + + pop = Pop(1, init) + + pop[0] = eo; + + mutate(pop[0]) + pop[0].invalidate() + evaluate(pop[0]) + + print pop[0], eo + + diff --git a/eo/src/pyeo/test/run_tests.sh b/eo/src/pyeo/test/run_tests.sh new file mode 100755 index 000000000..dbeb34dca --- /dev/null +++ b/eo/src/pyeo/test/run_tests.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +for i in *.py +do + python $i +done + + diff --git a/eo/src/pyeo/test/test_breeders.py b/eo/src/pyeo/test/test_breeders.py new file mode 100644 index 000000000..3e0229813 --- /dev/null +++ b/eo/src/pyeo/test/test_breeders.py @@ -0,0 +1,37 @@ +from maxone import * +import unittest + +evaluate = EvalFunc() +init = Init(20) +mutate = Mutate() +xover = Crossover() + +class TestSGA(unittest.TestCase): + + def runtest(self, breed): + + pop = Pop(50, init) + for indy in pop: evaluate(indy) + + newpop = Pop(); + + breed(pop,newpop) + + print pop.best() + for indy in newpop: evaluate(indy) + print newpop.best() + + def testGeneralBreeder(self): + + seq = eoSequentialOp(); + seq.add(xover, 0.7) + seq.add(mutate, 0.9) + + sel = eoDetTournamentSelect(3) + + breed = eoGeneralBreeder(sel, seq) + + self.runtest(breed) + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/test/test_pickling.py b/eo/src/pyeo/test/test_pickling.py new file mode 100644 index 000000000..8645d061e --- /dev/null +++ b/eo/src/pyeo/test/test_pickling.py @@ -0,0 +1,102 @@ +from maxone import * +import unittest +import cPickle +import tempfile +import os + +class TestPickling(unittest.TestCase): + + def do_pickle(self, object): + + filename = tempfile.mktemp() + file = open(filename, 'wb') + pickler = cPickle.Pickler(file) + + pickler.dump(object); + del pickler + file.close() + + file = open(filename) + + unpickler = cPickle.Unpickler(file) + + object2 = unpickler.load() + + del unpickler + file.close() + os.remove(filename) + + return object2 + + def testInvalidEO(self): + + eo = EO(); + eo.genome = [1,2,3]; + + eo2 = self.do_pickle(eo) + self.failUnlessEqual( str(eo), str(eo2) ) + + def testValidEO(self): + + eo = EO(); + eo.genome = [1,2,3]; + eo.fitness = 10 + + eo2 = self.do_pickle(eo) + + self.failUnlessEqual( str(eo), str(eo2) ) + + def testPop(self): + + pop = Pop(40, init) + for indy in pop: + evaluate(indy) + + pop2 = self.do_pickle(pop) + + self.failUnlessEqual( str(pop), str(pop2) ) + + def testHowMany(self): + + howmany = eoHowMany(0.8); + howmany2 = self.do_pickle(howmany) + + self.failUnlessEqual(howmany(10), howmany2(10)) + self.failUnlessEqual( str(howmany), str(howmany) ) + + def testRNG(self): + + for i in range(10): + rng().rand() + + filename = tempfile.mktemp() + file = open(filename, 'wb') + pickler = cPickle.Pickler(file) + + s = rng().to_string() + + pickler.dump(s); + del pickler + file.close() + + file = open(filename) + + unpickler = cPickle.Unpickler(file) + + s = unpickler.load() + + rng2 = eoRng(1) + rng2.from_string(s) + + del unpickler + file.close() + os.remove(filename) + + for i in range(100): + a = rng().rand() + b = rng2.rand() + self.failUnlessEqual(a,b) + + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/test/test_populator.py b/eo/src/pyeo/test/test_populator.py new file mode 100644 index 000000000..78846b937 --- /dev/null +++ b/eo/src/pyeo/test/test_populator.py @@ -0,0 +1,86 @@ +print 'importing maxone' +from maxone import * +print 'done' +import unittest + +class Mut(Mutate): + def __init__(self): + Mutate.__init__(self) + self.cnt = 0; + def __call__(self, eo): + self.cnt += 1; + return Mutate.__call__(self, eo) + +class Xover(Crossover): + def __init__(self): + Crossover.__init__(self) + self.cnt = 0; + def __call__(self, eo1, eo2): + self.cnt += 1; + return Crossover.__call__(self, eo1, eo2) + +class TestPopulator(unittest.TestCase): + + def make_pop(self): + pop = Pop(20, init) + for indy in pop: evaluate(indy) + return pop + + def test_sequential(self): + pop = self.make_pop() + populator = eoSeqPopulator(pop, pop) + + print populator.get() + print populator.get() + + def test_selective(self): + sel = eoDetTournamentSelect(2) + pop = self.make_pop() + + populator = eoSelectivePopulator(pop, pop, sel) + + print populator.get() + print populator.get() + + def runOpContainer(self, opcontainer): + + mutate = Mut() + xover = Xover() + + print 'making seq' + seq = opcontainer() + + print "xovertype", xover.getType() + print "mutationtype", mutate.getType() + + seq.add(mutate, 0.4) + seq.add(xover, 0.8) + + pop = self.make_pop(); + offspring = Pop() + + sel = eoDetTournamentSelect(2) + + print "making populator" + populator = eoSelectivePopulator(pop, offspring, sel) + print 'made' + + for i in xrange(1000): + seq(populator) + + print mutate.cnt + print xover.cnt + + + def test_sequentialOp(self): + print '*'*20, "SequentialOp", '*'*20 + self.runOpContainer(eoSequentialOp) + + def test_proportionalOp(self): + print '*'*20, "ProportionalOp", '*'*20 + self.runOpContainer(eoProportionalOp) + + + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/test/test_reduce.py b/eo/src/pyeo/test/test_reduce.py new file mode 100644 index 000000000..d0fcd8648 --- /dev/null +++ b/eo/src/pyeo/test/test_reduce.py @@ -0,0 +1,34 @@ +from maxone import * +import unittest + +class TestReduce(unittest.TestCase): + + def run_test(self, ReduceClass, Arg = None): + pop = Pop(10, init) + for indy in pop: evaluate(indy) + + if Arg: + red = ReduceClass(Arg) + else: + red = ReduceClass() + + red(pop, 5); + + self.failUnlessEqual( len(pop), 5) + + def test_eoTruncate(self): + self.run_test(eoTruncate) + def test_eoRandomeReduce(self): + self.run_test(eoRandomReduce) + def test_eoEPRReduce(self): + self.run_test(eoEPReduce, 2) + def test_eoLinearTruncate(self): + self.run_test(eoLinearTruncate) + def test_eoDetTournamentTruncate(self): + self.run_test(eoDetTournamentTruncate, 2) + def test_eoStochTournamentTruncate(self): + self.run_test(eoStochTournamentTruncate, 0.9) + + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/test/test_selectone.py b/eo/src/pyeo/test/test_selectone.py new file mode 100644 index 000000000..b756753ce --- /dev/null +++ b/eo/src/pyeo/test/test_selectone.py @@ -0,0 +1,66 @@ +from maxone import * +import unittest + +class Init(eoInit): + def __call__(self, eo): + pass + +class TestSGA(unittest.TestCase): + + def __init__(self, a): + unittest.TestCase.__init__(self, a) + self.pop = Pop(4, Init()) + + for i in range(len(self.pop)): + self.pop[i].fitness = i; + + + def do_test(self, selectOne): + + print '*'*20, "Testing", str(selectOne.__class__), '*'*20 + selection = [0. for i in range(len(self.pop))] + + nTries = 500 + for i in range(nTries): + selection[ selectOne(self.pop).fitness ] += 1 + + for i in range(len(self.pop)): + print i, selection[i], selection[i] / nTries + + return selection, nTries + + def test_eoDetTournamenSelect(self): + + selectOne = eoDetTournamentSelect(2) + self.do_test(selectOne) + + def test_eoRandomSelect(self): + selectOne = eoRandomSelect() + self.do_test(selectOne) + + def test_eoBestSelect(self): + selectOne = eoBestSelect() + (sel, nTries) = self.do_test(selectOne) + + self.failUnlessEqual(sel[0], 0); + self.failUnlessEqual(sel[-1], nTries); + + def test_eoNoSelect(self): + selectOne = eoNoSelect() + self.do_test(selectOne) + + def test_eoStochTournament(self): + selectOne = eoStochTournamentSelect(0.75) + self.do_test(selectOne) + + def test_eoSequentialSelect(self): + selectOne = eoSequentialSelect(); + self.do_test(selectOne) + + def test_eoEliteSequentialSelect(self): + selectOne = eoEliteSequentialSelect(); + self.do_test(selectOne) + + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/test/test_sga.py b/eo/src/pyeo/test/test_sga.py new file mode 100644 index 000000000..b31a5fae1 --- /dev/null +++ b/eo/src/pyeo/test/test_sga.py @@ -0,0 +1,25 @@ +from maxone import * +import unittest + +class TestSGA(unittest.TestCase): + + def test(self): + evaluate = EvalFunc() + init = Init(20) + mutate = Mutate() + xover = Crossover() + + pop = Pop(50, init) + for indy in pop: evaluate(indy) + + select = eoDetTournamentSelect(3); + cont = eoGenContinue(20); + + sga = eoSGA(select, xover, 0.6, mutate, 0.4, evaluate, cont); + + sga(pop) + + print pop.best() + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp new file mode 100644 index 000000000..2b7eb36fc --- /dev/null +++ b/eo/src/pyeo/valueParam.cpp @@ -0,0 +1,85 @@ +/* + pyeo + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include + +using namespace boost::python; + +class ParamWrapper : public eoParam +{ +public: + PyObject* self; + ParamWrapper(PyObject* p) : self(p) {} + ParamWrapper(PyObject* p, + std::string a, + std::string b, + std::string c, + char d, + bool e) : eoParam(a,b,c,d,e), self(p) {} + + + std::string getValue() const + { + return call_method(self, "getValue"); + } + + void setValue(std::string s) + { + call_method(self, "setValue", s); + } + +}; + +template T getv(const eoValueParam& v) { return v.value(); } +template void setv(eoValueParam& v, T val) { v.value() = val; } + +template +void define_valueParam(std::string prefix) +{ + class_, bases >( (prefix + "ValueParam").c_str(), init<>()) + .def(init()) + .def(init()) + .def(init()) + .def(init()) + .def("getValue", &eoValueParam::getValue) + .def("__str__", &eoValueParam::getValue) + .def("setValue", &eoValueParam::setValue) + //.add_property("value", getv, setv) + ; +} + +void valueParam() +{ + class_("eoParam", init<>()) + .def(init< std::string, std::string, std::string, char, bool>()) + .def("getValue", &ParamWrapper::getValue) + .def("setValue", &ParamWrapper::setValue) + .def("longName", &eoParam::longName, return_value_policy()) + //.def("defValue", &eoParam::defValue, return_value_policy()) + .def("description", &eoParam::description, return_value_policy()) + .def("shortName", &eoParam::shortName) + .def("required", &eoParam::required) + ; + + define_valueParam("int"); + define_valueParam >("vec"); +} + diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 700cd2fbe..5f63af6a1 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -56,8 +56,8 @@ bool minimizing_fitness() likely not working with scalar fitness values. In that case we're sorry but you cannot use lottery or roulette_wheel selection... */ - eo1.fitness(0.0); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this - eo2.fitness(1.0); + eo1.fitness( typename EOT::Fitness(0.0) ); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this + eo2.fitness( typename EOT::Fitness(1.0) ); return eo2 < eo1; // check whether we have a minimizing fitness }; @@ -194,7 +194,7 @@ It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = It competitor = _begin + _gen.random(_end - _begin); if (*best < *competitor) - { + { best = competitor; } } From 34911abaa4a734e441a189f8477cbab8d1c9cd48 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 5 Jan 2003 16:45:48 +0000 Subject: [PATCH 0910/2134] updated build info --- eo/src/pyeo/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 340dc7aeb..ee1e43163 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -16,7 +16,13 @@ # but this version 1.29 seems to work for me. # # My version of boost was found in /usr/include, modify INC to your system - +# +# For you happy Debian unstable users, just install +# +# apt-get install libstlport4.5 +# apt-get install libboost-python-dev +# apt-get install libboost-python1.29.0 +# CXX = g++ #-3.2 CXXFLAGS = -g #-DNDEBUG From 3267a3419160e5ec4daad7462ca0616a275557cb Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 6 Jan 2003 14:25:40 +0000 Subject: [PATCH 0911/2134] Changed a few things so that the python library can be used with the multi-objective library (it basically boils down to removing the assumption that fitness() has a size() member function and changing eoPop to vector) --- eo/src/eoNDSorting.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index e8562194c..44b18b330 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -31,6 +31,7 @@ #include #include #include +#include /** Non dominated sorting, it *is a* vector of doubles, the integer part is the rank (to which front it belongs), @@ -90,8 +91,8 @@ private : void one_objective(const eoPop& _pop) { - unsigned i; - eoPop tmp_pop; + unsigned i; + vector tmp_pop; tmp_pop.resize(_pop.size()); // copy pop to dummy population (only need the fitnesses) @@ -101,10 +102,10 @@ private : tmp_pop[i].index = i; } - // sort it - tmp_pop.sort(); + // sort it in ascending + sort(tmp_pop.begin(), tmp_pop.end(), greater() ); - // + for (i = 0; i < _pop.size(); ++i) { value()[tmp_pop[i].index] = _pop.size() - i; // set rank @@ -438,10 +439,12 @@ class eoNDSorting_II : public eoNDSorting /// _cf points into the elements that consist of the current front vector niche_penalty(const vector& _cf, const eoPop& _pop) { + typedef typename EOT::Fitness::fitness_traits traits; unsigned i; vector niche_count(_cf.size(), 0.); - unsigned nObjectives = _pop[_cf[0]].fitness().size(); + + unsigned nObjectives = traits::nObjectives(); //_pop[_cf[0]].fitness().size(); for (unsigned o = 0; o < nObjectives; ++o) { @@ -470,14 +473,12 @@ class eoNDSorting_II : public eoNDSorting for (i = 0; i < nc.size(); ++i) { - niche_count[i] = (max_dist + 1) - nc[i]; + niche_count[i] = (max_dist + 1 - nc[i]); } } return niche_count; } - - }; #endif From 0a4fb5503110283a08787bfb361f7a5e30b75c84 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 6 Jan 2003 16:10:38 +0000 Subject: [PATCH 0912/2134] Added multi-objective support to PyEO (and changed its name to that) --- eo/src/pyeo/Makefile | 12 +- eo/src/pyeo/abstract1.cpp | 4 +- eo/src/pyeo/algos.cpp | 4 +- eo/src/pyeo/breeders.cpp | 4 +- eo/src/pyeo/continuators.cpp | 4 +- eo/src/pyeo/def_abstract_functor.h | 2 +- eo/src/pyeo/geneticOps.cpp | 4 +- eo/src/pyeo/mergers.cpp | 4 +- eo/src/pyeo/monitors.cpp | 4 +- eo/src/pyeo/perf2worth.cpp | 9 +- eo/src/pyeo/pickle.h | 2 +- eo/src/pyeo/pyeo.cpp | 173 ----------------------------- eo/src/pyeo/pyeo.h | 117 ------------------- eo/src/pyeo/random_numbers.cpp | 2 +- eo/src/pyeo/reduce.cpp | 4 +- eo/src/pyeo/replacement.cpp | 4 +- eo/src/pyeo/selectOne.cpp | 4 +- eo/src/pyeo/selectors.cpp | 4 +- eo/src/pyeo/test/maxone.py | 2 +- eo/src/pyeo/test/test_mo.py | 23 ++++ eo/src/pyeo/valueParam.cpp | 2 +- 21 files changed, 60 insertions(+), 328 deletions(-) delete mode 100644 eo/src/pyeo/pyeo.cpp delete mode 100644 eo/src/pyeo/pyeo.h create mode 100644 eo/src/pyeo/test/test_mo.py diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index ee1e43163..89ee85b11 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -30,25 +30,25 @@ CPPFLAGS = -Wall #-O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -INC=-I/usr/include/python2.2/ -I/usr/include/stlport -I.. -ftemplate-depth-50 +INC=-I/usr/include/python2.2 -I/usr/include/stlport -I.. -ftemplate-depth-50 -OBJECTS=eoFunctorStore.o pyeo.o abstract1.o algos.o \ +OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ random_numbers.o geneticOps.o selectOne.o continuators.o\ reduce.o replacement.o selectors.o breeders.o\ mergers.o valueParam.o perf2worth.o -all: pyeo.so +all: PyEO.so clean: rm *.so *.o test/*.pyc -pyeo.so: $(OBJECTS) - $(LINK) -o pyeo.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport +PyEO.so: $(OBJECTS) + $(LINK) -o PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) -%.o:%.cpp pyeo.h def_abstract_functor.h +%.o:%.cpp PyEO.h def_abstract_functor.h $(COMPILE) $< $(INC) diff --git a/eo/src/pyeo/abstract1.cpp b/eo/src/pyeo/abstract1.cpp index d35edefc0..5f6c07131 100644 --- a/eo/src/pyeo/abstract1.cpp +++ b/eo/src/pyeo/abstract1.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -24,7 +24,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" void abstract1() diff --git a/eo/src/pyeo/algos.cpp b/eo/src/pyeo/algos.cpp index c375a6a07..baa137bb5 100644 --- a/eo/src/pyeo/algos.cpp +++ b/eo/src/pyeo/algos.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -23,7 +23,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" void algos() diff --git a/eo/src/pyeo/breeders.cpp b/eo/src/pyeo/breeders.cpp index da2b5dcca..466286f59 100644 --- a/eo/src/pyeo/breeders.cpp +++ b/eo/src/pyeo/breeders.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -22,7 +22,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" #define DEF(x) class_, bases > >(#x).def("__call__", &eoBreed::operator()) diff --git a/eo/src/pyeo/continuators.cpp b/eo/src/pyeo/continuators.cpp index 8a9cb4a91..620ae4202 100644 --- a/eo/src/pyeo/continuators.cpp +++ b/eo/src/pyeo/continuators.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -24,7 +24,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" #define DEF(x) class_, bases > >(#x).def("__call__", &eoContinue::operator()) diff --git a/eo/src/pyeo/def_abstract_functor.h b/eo/src/pyeo/def_abstract_functor.h index eaa4aa54d..fe9379524 100644 --- a/eo/src/pyeo/def_abstract_functor.h +++ b/eo/src/pyeo/def_abstract_functor.h @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer diff --git a/eo/src/pyeo/geneticOps.cpp b/eo/src/pyeo/geneticOps.cpp index 85f5f84ef..9e4379ff7 100644 --- a/eo/src/pyeo/geneticOps.cpp +++ b/eo/src/pyeo/geneticOps.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -24,7 +24,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" class GenOpWrapper : public eoGenOp { diff --git a/eo/src/pyeo/mergers.cpp b/eo/src/pyeo/mergers.cpp index 1106b663c..23f24b5a1 100644 --- a/eo/src/pyeo/mergers.cpp +++ b/eo/src/pyeo/mergers.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -19,7 +19,7 @@ */ #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" #define DEF(x) class_, bases > >(#x).def("__call__", &eoMerge::operator()) diff --git a/eo/src/pyeo/monitors.cpp b/eo/src/pyeo/monitors.cpp index e15f091ba..0a44521f3 100644 --- a/eo/src/pyeo/monitors.cpp +++ b/eo/src/pyeo/monitors.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -19,7 +19,7 @@ */ #include -#include "pyeo.h" +#include "PyEO.h" void monitors() { diff --git a/eo/src/pyeo/perf2worth.cpp b/eo/src/pyeo/perf2worth.cpp index 5ef8630d4..77cbd70e3 100644 --- a/eo/src/pyeo/perf2worth.cpp +++ b/eo/src/pyeo/perf2worth.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -17,14 +17,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -//#include -//#include +#include -//#include "pyeo.h" +#include "PyEO.h" void perf2worth() // will have to rethink this { - // class_ >("eoNDSorting_II"); + class_ >("eoNDSorting_II"); } diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index 992f04a1b..b59306266 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer diff --git a/eo/src/pyeo/pyeo.cpp b/eo/src/pyeo/pyeo.cpp deleted file mode 100644 index c7abcf18d..000000000 --- a/eo/src/pyeo/pyeo.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - pyeo - - Copyright (C) 2003 Maarten Keijzer - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - - -#include -#include "pyeo.h" - -ostream& operator<<(ostream& os, const PyEO& _eo) -{ - os << _eo.to_string(); - return os; -} - -struct pyPop_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple getstate(const eoPop& _pop) - { - boost::python::list entries; - for (unsigned i = 0; i != _pop.size(); ++i) - entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); - - return make_tuple(object(_pop.size()), entries); - } - - static void setstate( eoPop& _pop, boost::python::tuple pickled) - { - int sz = extract(pickled[0]); - boost::python::list entries = pickled[1]; - _pop.resize(sz); - for (unsigned i = 0; i != _pop.size(); ++i) - PyEO_pickle_suite::setstate(_pop[i], tuple(entries[i]) ); - } -}; - - -template -boost::python::str to_string(T& _p) -{ - std::ostrstream os; - _p.printOn(os); - os << ends; - std::string s(os.str()); - return str(s.c_str()); -} - -void pop_sort(eoPop& pop) { pop.sort(); } -void pop_shuffle(eoPop& pop) { pop.shuffle(); } - -struct index_error { index_error(std::string w) : what(w) {}; std::string what; }; -void translate_index_error(index_error const& e) -{ - PyErr_SetString(PyExc_IndexError, e.what.c_str()); -} - -PyEO& pop_getitem(eoPop& pop, object key) -{ - extract x(key); - if (!x.check()) - throw index_error("Slicing not allowed"); - - int i = x(); - - if (static_cast(i) >= pop.size()) - { - throw index_error("Index out of bounds"); - } - - return pop[i]; -} -void pop_setitem(eoPop& pop, object key, PyEO& value) -{ - - extract x(key); - if (!x.check()) - throw index_error("Slicing not allowed"); - - int i = x(); - - if (static_cast(i) >= pop.size()) - { - throw index_error("Index out of bounds"); - } - - pop[i] = value; -} - -void pop_push_back(eoPop& pop, PyEO& p) { pop.push_back(p); } -void pop_resize( eoPop& pop, unsigned i) { pop.resize(i); } - -extern void abstract1(); -extern void algos(); -extern void random_numbers(); -extern void geneticOps(); -extern void selectOne(); -extern void continuators(); -extern void reduce(); -extern void replacement(); -extern void selectors(); -extern void breeders(); -extern void mergers(); -extern void valueParam(); -extern void perf2worth(); - -BOOST_PYTHON_MODULE(pyeo) -{ - register_exception_translator(&translate_index_error); - - class_("EO") - .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) - .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) - .def_pickle(PyEO_pickle_suite()) - .def("invalidate", &PyEO::invalidate) - .def("invalid", &PyEO::invalid) - .def("__str__", &PyEO::to_string) - ; - - class_ >("Pop", init<>() ) - .def( init< unsigned, eoInit& >() ) - .def("append", &eoPop::append) - .def("__str__", to_string >) - .def("__len__", &eoPop::size) - .def("sort", pop_sort ) - .def("shuffle", pop_shuffle) - .def("__getitem__", pop_getitem, return_internal_reference<>() ) - .def("__setitem__", pop_setitem) - .def("best", &eoPop::best_element, return_internal_reference<>() ) - .def("push_back", pop_push_back) - .def("resize", pop_resize) - .def_pickle(pyPop_pickle_suite()) - ; - - - // Other definitions in different compilation units, - // this to avoid having g++ to choke on the load - random_numbers(); - valueParam(); - abstract1(); - geneticOps(); - selectOne(); - selectors(); - perf2worth(); - continuators(); - reduce(); - replacement(); - breeders(); - mergers(); - algos(); - -} - - -// to avoid having to build with libeo.a -ostream & operator << ( ostream& _os, const eoPrintable& _o ) { - _o.printOn(_os); - return _os; -}; diff --git a/eo/src/pyeo/pyeo.h b/eo/src/pyeo/pyeo.h deleted file mode 100644 index 101f6d458..000000000 --- a/eo/src/pyeo/pyeo.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - pyeo - - Copyright (C) 2003 Maarten Keijzer - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef PYEO_H -#define PYEO_H - -#include -#include - -using namespace boost::python; -/* -class PyFitness : public boost::python::object -{ - public : - PyFitness() : object() {} - - template - PyFitness(const T& o) : object(o) {} - - - static unsigned nObjectives() { return 1; } - static double tol() { return 1e-6; } - static bool maximizing(int which) { return true; } - - static bool dominates(const PyFitness& one, const PyFitness& oth) { return true; } // for the moment - - operator unsigned() const { return 1; } // for the moment - operator double() const { return 1; } // for the moment - - PyFitness operator[](int i) { return PyFitness(object::operator[](i)); } - - friend ostream& operator<<(ostream& os, const PyFitness& p) { const object& o = p; os << o; return os; } - friend istream& operator>>(istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } - - typedef PyFitness AtomType; -}; - - - -object fabs(object obj) -{ - object zero(0.0); - if (obj < zero ) - return zero-obj; - return obj; -} - -object max(object a, object b) -{ - if (a < b) - return b; - return a; -} -*/ - -struct PyEO : public EO< object > -{ - typedef object Fitness; - - Fitness getFitness() const { return invalid()? Fitness(): fitness(); } - void setFitness(Fitness f) { if (f == Fitness()) invalidate(); else fitness(f); } - - object getGenome() const { return genome; } - void setGenome(object g) { genome = g; } - object genome; - - std::string to_string() const - { - std::string result; - result += extract(str(getFitness())); - result += ' '; - result += extract(str(genome)); - return result; - } - - bool operator<(const PyEO& other) const { return EO::operator<(other); } - bool operator>(const PyEO& other) const { return EO::operator>(other); } - -}; - -ostream& operator<<(ostream& os, const PyEO& _eo); - -struct PyEO_pickle_suite : boost::python::pickle_suite -{ - typedef PyEO::Fitness Fitness; - - static - boost::python::tuple getstate(const PyEO& _eo) - { - return make_tuple(_eo.getFitness(), _eo.genome); - } - static - void setstate(PyEO& _eo, boost::python::tuple pickled) - { - _eo.setFitness( Fitness(pickled[0]) ); - _eo.genome = pickled[1]; - } -}; - -#endif diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp index 368ba0582..0088b1c18 100644 --- a/eo/src/pyeo/random_numbers.cpp +++ b/eo/src/pyeo/random_numbers.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer diff --git a/eo/src/pyeo/reduce.cpp b/eo/src/pyeo/reduce.cpp index 24910cacf..fa37e827f 100644 --- a/eo/src/pyeo/reduce.cpp +++ b/eo/src/pyeo/reduce.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -20,7 +20,7 @@ #include -#include "pyeo.h" +#include "PyEO.h" // unfortunately have to define it specially class eoReduceWrapper : public eoReduce diff --git a/eo/src/pyeo/replacement.cpp b/eo/src/pyeo/replacement.cpp index bcf799ccc..683aa2334 100644 --- a/eo/src/pyeo/replacement.cpp +++ b/eo/src/pyeo/replacement.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -24,7 +24,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" #define DEF(x) class_, bases > >(#x).def("__call__", &eoReplacement::operator()) diff --git a/eo/src/pyeo/selectOne.cpp b/eo/src/pyeo/selectOne.cpp index 42bf0f969..3216a7534 100644 --- a/eo/src/pyeo/selectOne.cpp +++ b/eo/src/pyeo/selectOne.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -25,7 +25,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "pickle.h" class eoSelectOneWrapper : public eoSelectOne diff --git a/eo/src/pyeo/selectors.cpp b/eo/src/pyeo/selectors.cpp index aeb333f4d..25be973bc 100644 --- a/eo/src/pyeo/selectors.cpp +++ b/eo/src/pyeo/selectors.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer @@ -26,7 +26,7 @@ #include #include -#include "pyeo.h" +#include "PyEO.h" #include "def_abstract_functor.h" #define DEF(x) class_, bases > >(#x).def("__call__", &eoSelect::operator()) diff --git a/eo/src/pyeo/test/maxone.py b/eo/src/pyeo/test/maxone.py index 6f1baefa4..f95bc0a7f 100644 --- a/eo/src/pyeo/test/maxone.py +++ b/eo/src/pyeo/test/maxone.py @@ -3,7 +3,7 @@ import sys sys.path.append('..') print 'importing pyeo' -from pyeo import * +from PyEO import * print 'done' from copy import copy diff --git a/eo/src/pyeo/test/test_mo.py b/eo/src/pyeo/test/test_mo.py new file mode 100644 index 000000000..3cf43e67d --- /dev/null +++ b/eo/src/pyeo/test/test_mo.py @@ -0,0 +1,23 @@ +from maxone import * +import unittest + +class TestSGA(unittest.TestCase): + + def testMO(self): + setObjectivesSize(2); + setObjectivesValue(0,1); + setObjectivesValue(1,-1); + + eo1 = EO(); + eo2 = EO(); + + eo1.fitness = [0,1]; + eo2.fitness = [1,1]; + + print dominates(eo1, eo2) + setObjectivesValue(0,-1) + setObjectivesValue(1,1); + print dominates(eo1, eo2) + +if __name__=='__main__': + unittest.main() diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index 2b7eb36fc..5f4e21929 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -1,5 +1,5 @@ /* - pyeo + PyEO Copyright (C) 2003 Maarten Keijzer From 5bf5b1e5cbf5cc549f5325578e09f5ae95bd529c Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 6 Jan 2003 16:11:05 +0000 Subject: [PATCH 0913/2134] added --- eo/src/pyeo/PyEO.cpp | 221 +++++++++++++++++++++++++++++++++++++++++++ eo/src/pyeo/PyEO.h | 153 ++++++++++++++++++++++++++++++ 2 files changed, 374 insertions(+) create mode 100644 eo/src/pyeo/PyEO.cpp create mode 100644 eo/src/pyeo/PyEO.h diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp new file mode 100644 index 000000000..2a502070f --- /dev/null +++ b/eo/src/pyeo/PyEO.cpp @@ -0,0 +1,221 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + + +#include +#include "PyEO.h" + + +// static member, needs to be instantiated somewhere +std::vector PyFitness::objective_info; + +bool PyFitness::dominates(const PyFitness& oth) const +{ + bool dom = false; + + for (unsigned i = 0; i < nObjectives(); ++i) + { + int objective = objective_info[i]; + + if (objective == 0) // ignore + continue; + + bool maxim = objective > 0; + + double aval = maxim? (*this)[i] : -(*this)[i]; + double bval = maxim? oth[i] : -oth[i]; + + if (fabs(aval - bval) > tol()) + { + if (aval < bval) + { + return false; // cannot dominate + } + // else aval < bval + dom = true; // for the moment: goto next objective + } + //else they're equal in this objective, goto next + } + + return dom; +} + +bool dominates(const PyEO& a, const PyEO& b) +{ + return PyFitness(a.fitness()).dominates(b.fitness()); +} + +ostream& operator<<(ostream& os, const PyEO& _eo) +{ + os << _eo.to_string(); + return os; +} + +struct pyPop_pickle_suite : boost::python::pickle_suite +{ + static boost::python::tuple getstate(const eoPop& _pop) + { + boost::python::list entries; + for (unsigned i = 0; i != _pop.size(); ++i) + entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); + + return make_tuple(object(_pop.size()), entries); + } + + static void setstate( eoPop& _pop, boost::python::tuple pickled) + { + int sz = extract(pickled[0]); + boost::python::list entries = pickled[1]; + _pop.resize(sz); + for (unsigned i = 0; i != _pop.size(); ++i) + PyEO_pickle_suite::setstate(_pop[i], tuple(entries[i]) ); + } +}; + + +template +boost::python::str to_string(T& _p) +{ + std::ostrstream os; + _p.printOn(os); + os << ends; + std::string s(os.str()); + return str(s.c_str()); +} + +void pop_sort(eoPop& pop) { pop.sort(); } +void pop_shuffle(eoPop& pop) { pop.shuffle(); } + +void translate_index_error(index_error const& e) +{ + PyErr_SetString(PyExc_IndexError, e.what.c_str()); +} + +PyEO& pop_getitem(eoPop& pop, object key) +{ + extract x(key); + if (!x.check()) + throw index_error("Slicing not allowed"); + + int i = x(); + + if (static_cast(i) >= pop.size()) + { + throw index_error("Index out of bounds"); + } + + return pop[i]; +} +void pop_setitem(eoPop& pop, object key, PyEO& value) +{ + + extract x(key); + if (!x.check()) + throw index_error("Slicing not allowed"); + + int i = x(); + + if (static_cast(i) >= pop.size()) + { + throw index_error("Index out of bounds"); + } + + pop[i] = value; +} + +void pop_push_back(eoPop& pop, PyEO& p) { pop.push_back(p); } +void pop_resize( eoPop& pop, unsigned i) { pop.resize(i); } + +extern void abstract1(); +extern void algos(); +extern void random_numbers(); +extern void geneticOps(); +extern void selectOne(); +extern void continuators(); +extern void reduce(); +extern void replacement(); +extern void selectors(); +extern void breeders(); +extern void mergers(); +extern void valueParam(); +extern void perf2worth(); + +BOOST_PYTHON_MODULE(PyEO) +{ + register_exception_translator(&translate_index_error); + + class_("EO") + .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) + .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) + .def_pickle(PyEO_pickle_suite()) + .def("invalidate", &PyEO::invalidate) + .def("invalid", &PyEO::invalid) + .def("__str__", &PyEO::to_string) + ; + + class_ >("Pop", init<>() ) + .def( init< unsigned, eoInit& >() ) + .def("append", &eoPop::append) + .def("__str__", to_string >) + .def("__len__", &eoPop::size) + .def("sort", pop_sort ) + .def("shuffle", pop_shuffle) + .def("__getitem__", pop_getitem, return_internal_reference<>() ) + .def("__setitem__", pop_setitem) + .def("best", &eoPop::best_element, return_internal_reference<>() ) + .def("push_back", pop_push_back) + .def("resize", pop_resize) + .def_pickle(pyPop_pickle_suite()) + ; + + + // Other definitions in different compilation units, + // this to avoid having g++ to choke on the load + random_numbers(); + valueParam(); + abstract1(); + geneticOps(); + selectOne(); + selectors(); + perf2worth(); + continuators(); + reduce(); + replacement(); + breeders(); + mergers(); + algos(); + + // The traits class + class_("PyFitness"); + + def("nObjectives", &PyFitness::nObjectives); + def("tol", &PyFitness::tol); + def("maximizing", &PyFitness::maximizing); + def("setObjectivesSize", &PyFitness::setObjectivesSize); + def("setObjectivesValue", &PyFitness::setObjectivesValue); + def("dominates", dominates); +} + + +// to avoid having to build with libeo.a +ostream & operator << ( ostream& _os, const eoPrintable& _o ) { + _o.printOn(_os); + return _os; +}; diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h new file mode 100644 index 000000000..dc5dd260b --- /dev/null +++ b/eo/src/pyeo/PyEO.h @@ -0,0 +1,153 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PYEO_H +#define PYEO_H + +#include + +#include +#include + +using namespace boost::python; + +struct index_error { index_error(std::string w) : what(w) {}; std::string what; }; + +class PyFitness : public boost::python::object +{ + public : + + typedef PyFitness fitness_traits; // it's its own traits class :-) + + PyFitness() : object() {} + + template + PyFitness(const T& o) : object(o) {} + + + static unsigned nObjectives() { return objective_info.size(); } + static double tol() { return 1e-6; } + static bool maximizing(int which) { return objective_info[which] > 0; } + + static void setObjectivesSize(int sz) { objective_info.resize(sz); } + static void setObjectivesValue(unsigned which, int value) + { + if (which >= objective_info.size()) + { + throw index_error("Too few elements allocated, resize objectives first"); + } + + objective_info[which] = value; + } + + static std::vector objective_info; + + bool dominates(const PyFitness& oth) const; + + double operator[](int i) const + { + extract x(object::operator[](i)); + + if (!x.check()) + throw runtime_error("PyFitness: does not contain doubles"); + return x(); + } + + bool operator<(const PyFitness& other) const + { + if (objective_info.size() == 0) + { + const object& self = *this; + const object& oth = other; + return self < oth; + } + // otherwise use objective_info + + for (unsigned i = 0; i < objective_info.size(); ++i) + { + double a = objective_info[i] * operator[](i); + double b = objective_info[i] * other[i]; + + if ( fabs(a - b) > tol()) + { + if (a < b) + return true; + return false; + } + } + + return false; + } + + bool operator>(const PyFitness& other) const + { + return other.operator<(*this); + } + + //void printOn(ostream& os) const { const object& o = *this; os << o; } + //friend ostream& operator<<(ostream& os, const PyFitness& p) { p.printOn(os); return os; } + //friend istream& operator>>(istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } +}; + +struct PyEO : public EO< PyFitness > +{ + typedef PyFitness Fitness; + + object getFitness() const { return invalid()? Fitness(): fitness(); } + void setFitness(object f) { if (f == Fitness()) invalidate(); else fitness(f); } + + object getGenome() const { return genome; } + void setGenome(object g) { genome = g; } + object genome; + + std::string to_string() const + { + std::string result; + result += extract(str(getFitness())); + result += ' '; + result += extract(str(genome)); + return result; + } + + bool operator<(const PyEO& other) const { return EO::operator<(other); } + bool operator>(const PyEO& other) const { return EO::operator>(other); } + +}; + +ostream& operator<<(ostream& os, const PyEO& _eo); + +struct PyEO_pickle_suite : boost::python::pickle_suite +{ + typedef PyEO::Fitness Fitness; + + static + boost::python::tuple getstate(const PyEO& _eo) + { + return make_tuple(_eo.getFitness(), _eo.genome); + } + static + void setstate(PyEO& _eo, boost::python::tuple pickled) + { + _eo.setFitness( Fitness(pickled[0]) ); + _eo.genome = pickled[1]; + } +}; + +#endif From 423daa36d2451f6228c7b9587bdec4ddb0d1c558 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 6 Jan 2003 21:56:40 +0000 Subject: [PATCH 0914/2134] needed for redhat --- eo/src/pyeo/PyEO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index 2a502070f..4c45145a9 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -82,7 +82,7 @@ struct pyPop_pickle_suite : boost::python::pickle_suite static void setstate( eoPop& _pop, boost::python::tuple pickled) { int sz = extract(pickled[0]); - boost::python::list entries = pickled[1]; + boost::python::list entries = list(pickled[1]); _pop.resize(sz); for (unsigned i = 0; i != _pop.size(); ++i) PyEO_pickle_suite::setstate(_pop[i], tuple(entries[i]) ); From db1e3c38f4e9dc6f978e76f4d06df33e25107e3e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 7 Jan 2003 10:49:55 +0000 Subject: [PATCH 0915/2134] added a small cookbook --- eo/src/pyeo/BUILDING | 174 +++++++++++++++++++++++++++++++++++++++ eo/src/pyeo/Makefile | 4 +- eo/src/pyeo/Makefile.rpm | 30 +++++++ 3 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 eo/src/pyeo/BUILDING create mode 100644 eo/src/pyeo/Makefile.rpm diff --git a/eo/src/pyeo/BUILDING b/eo/src/pyeo/BUILDING new file mode 100644 index 000000000..3db7de1b7 --- /dev/null +++ b/eo/src/pyeo/BUILDING @@ -0,0 +1,174 @@ + + +To build PyEO, a number of steps are neccessary. PyEO depends on Boost.Python v2, +which in turn expects the presence of python2.2. As we can't expect people to have +this installed some instructions are in order to help people build PyEO.so + +First of all, currently Windows is not supported. I don't develop on windows and +don't have access to a compiler on it. + +PyEO has been developed on Debian, using gcc 2.95-4. + +My primary platform is debian, so the default Makefile provides for that. Below you +will also find instructions for rpm-based distributions. As far as I know this includes +RedHat, Mandrake, Suse, Yellowdog, and probably a lot more. If I recall correctly, the RPM +format is the LSB default. + +===== Building PyEO on Debian ===== + +Point your /etc/apt/sources.list to the unstable distribution (if it's not there already), +and install: + +for Python: + +$ apt-get install python2.2 +$ apt-get install python2.2-dev + +It might also be a good idea to install the numeric library + +$ apt-get install python2.2-numeric + + +For Boost.Python: + +$ apt-get install libboost-python1.29.0 +$ apt-get install libboost-python-dev + +If all goes well, this will also install libstlport. If it doesn't, + +$ apt-get install libstlport4.5 + +and maybe + +$ apt-get install libstlport4.5-dev + +but I'm not sure about the latter. + +Now you can type + +$ make + +And after (a long) wait, a file called PyEO.so will be produced. + +===== Building PyEO on an RPM-based Distro ===== + +The following recipe has only been tested on a RedHat 7.1 installation, on other +systems some stuff might be different. + +== Getting Python2.2 == + +If you don't have python2.2 installed (newer distro's install this by default), +you can either install it from a binary specifically build for your distro, or +you can build it from source by going to: + +http://www.python.org/2.2.1/rpms.html + +and getting the source by clicking the link to python2-2.2.1-2.src.rpm + +This actually links to: + +http://www.python.org/ftp/python/2.2.1/rpms/python2-2.2.1-2.src.rpm + +for your convenience I mirrored this file at: + +http://www.cs.vu.nl/~mkeijzer/PyEO/python2-2.2.1-2.src.rpm + +by usuing the command: + +$ rpm --rebuild python2-2.2.1-2.src.rpm + +or with newer versions of rpm + +$ rpmbuild python2-2.2.1-2.src.rpm + +It will build a binary rpm for your computer. On this Redhat 7.1 box it put the +RPMS it build in + +/usr/src/redhat/RPMS/i386/ + +The ones you need to install are: + +python2-2.2.1-2.i386.rpm +python2-devel-2.2.1-2.i386.rpm + +But you might want to install the rest as well. + +== Getting Boost.Python == + +First of all, do a quick check. At the prompt type: + +$ python + +If you see something like: + +Python 2.2.2 (#4, Oct 15 2002, 04:21:28) +[GCC 2.95.4 20011002 (Debian prerelease)] on linux2 +Type "help", "copyright", "credits" or "license" for more information. + +(don't mind the second line, It's the version info we're interested in) + +You're set to go. Unfortunately, on this Redhat 7.1 box I tested things on, /usr/bin/python +insisted on pointing to /usr/bin/python1.5 . Unfortunately, the boost source rpm depends +on python to provide 2.2. If this is the case on your machine as well, there are two +possible fixes (of which one I tested). + +/usr/bin/python is a symlink, let it point to /usr/bin/python2.2 (this one I tested) + +DON'T forget to repoint /usr/bin/python to /usr/bin/python1.5 after you build the boost libraries: Redhat tools +depend on this! + +or + +alias python=/usr/bin/python2.2 (which would be better if it works, but untested.) + +So given that you are in a shell that uses python2.2 if you issue +the command 'python', get two boost source rpms at: + +http://www.starostik.de/malte/boost/ + +namely + +boost-jam-3.1.3-1.src.rpm +boost-1.29.0-2.src.rpm + +Which I also mirrored at + +http://www.cs.vu.nl/~mkeijzer/PyEO/boost-jam-3.1.3-1.src.rpm +http://www.cs.vu.nl/~mkeijzer/PyEO/boost-1.29.0-2.src.rpm + +First build and install jam using either rpm --rebuild or rpmbuild. + +The file you have to install is: + +boost-jam-3.1.3-1.i386.rpm + +This is the 'make' replacement that is used by boost. + +Next, build boost-1.29.0.src.rpm using 'rpm --rebuild' or 'rpmbuild' + +The only rpm's that this procedure produces that you need to install is: + +boost-python-1.29.0-2.i386.rpm +boost-python-devel-1.29.0-2.i386.rpm + + +When installing boost-python-devel, I got a dependency problem with libpython-dev, +this was probably caused by the same problem I had with python2.2, python1.5. I ignored +it by using: + +$ rpm -i --nodep boost-python-devel-1.29.0-2.i386.rpm + +and you're all set to type + +$ make -fMakefile.rpm + +in the PyEO build directory + +==== Testing PyEO========== + +After building go to the test directory and type + +$ ./run_tests.sh + +If you don't see errors, all is well and you're ready to go + diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 89ee85b11..6a823a5d4 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -25,8 +25,8 @@ # CXX = g++ #-3.2 -CXXFLAGS = -g #-DNDEBUG -CPPFLAGS = -Wall #-O2 +CXXFLAGS = #-g #-DNDEBUG +CPPFLAGS = -Wall -O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) diff --git a/eo/src/pyeo/Makefile.rpm b/eo/src/pyeo/Makefile.rpm new file mode 100644 index 000000000..28b4210d1 --- /dev/null +++ b/eo/src/pyeo/Makefile.rpm @@ -0,0 +1,30 @@ +# Makefile for people that build boost using the rpm-recipe + +CXX = g++ #-3.2 +CXXFLAGS = #-g #-DNDEBUG +CPPFLAGS = -Wall -O2 +LDFLAGS = -L/usr/lib/python2.2/config/ +COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c +LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) +INC=-I/usr/include/python2.2 -I/usr/include/stlport -I.. -ftemplate-depth-50 + +OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ + random_numbers.o geneticOps.o selectOne.o continuators.o\ + reduce.o replacement.o selectors.o breeders.o\ + mergers.o valueParam.o perf2worth.o + +all: PyEO.so + +clean: + rm *.so *.o test/*.pyc + +PyEO.so: $(OBJECTS) + $(LINK) -o PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared #-lstlport + +eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp + $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) + +%.o:%.cpp PyEO.h def_abstract_functor.h + $(COMPILE) $< $(INC) + + From efafbb6f055e113d7f9b1e56f178a64af78862a5 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 7 Jan 2003 10:50:23 +0000 Subject: [PATCH 0916/2134] df --- eo/src/pyeo/README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/pyeo/README b/eo/src/pyeo/README index b28b04f64..072fe3ad2 100644 --- a/eo/src/pyeo/README +++ b/eo/src/pyeo/README @@ -1,3 +1,4 @@ - + +See BUILDING for details on how to build this thing From c6b4f255d99b65341aba4074a2c8383f189a0821 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 7 Jan 2003 14:24:56 +0000 Subject: [PATCH 0917/2134] some bugfixes --- eo/src/pyeo/PyEO.h | 2 +- eo/src/pyeo/perf2worth.cpp | 56 +++++++++++++++++++++++++++++++++++-- eo/src/pyeo/test/test_mo.py | 46 ++++++++++++++++++++++++++---- 3 files changed, 96 insertions(+), 8 deletions(-) diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index dc5dd260b..79fcee3f6 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -46,7 +46,7 @@ class PyFitness : public boost::python::object static double tol() { return 1e-6; } static bool maximizing(int which) { return objective_info[which] > 0; } - static void setObjectivesSize(int sz) { objective_info.resize(sz); } + static void setObjectivesSize(int sz) { objective_info.resize(sz, 0); } static void setObjectivesValue(unsigned which, int value) { if (which >= objective_info.size()) diff --git a/eo/src/pyeo/perf2worth.cpp b/eo/src/pyeo/perf2worth.cpp index 77cbd70e3..7c4da9af8 100644 --- a/eo/src/pyeo/perf2worth.cpp +++ b/eo/src/pyeo/perf2worth.cpp @@ -21,9 +21,61 @@ #include "PyEO.h" -void perf2worth() // will have to rethink this +struct Perf2WorthWrapper : public eoPerf2Worth { - class_ >("eoNDSorting_II"); + PyObject* self; + Perf2WorthWrapper(PyObject* p) : self(p) {} + + void operator()( const eoPop& pop) + { + call_method(self, "__call__", boost::ref(pop)); + } + +}; + +numeric::array get_worths(eoPerf2Worth& p) +{ + std::vector& worths = p.value(); + list result; + + for (unsigned i = 0; i < worths.size(); ++i) + result.append(worths[i]); + + return numeric::array(result); +} + +struct CachedPerf2WorthWrapper : public eoPerf2WorthCached +{ + PyObject* self; + CachedPerf2WorthWrapper(PyObject* p) : self(p) {} + + void calculate_worths(const eoPop& pop) + { + call_method(self, "calculate_worths", boost::ref(pop)); + } +}; + +void perf2worth() +{ + numeric::array::set_module_and_type("Numeric", "ArrayType"); + + class_, Perf2WorthWrapper, boost::noncopyable>("eoPerf2Worth", init<>()) + .def("__call__", &Perf2WorthWrapper::operator()) + .def("sort_pop", &eoPerf2Worth::sort_pop) + .def("value", get_worths) + ; + + class_, CachedPerf2WorthWrapper, bases >, boost::noncopyable> + ("eoPerf2WorthCached", init<>()) + .def("__call__", &eoPerf2WorthCached::operator()) + .def("calculate_worths", &CachedPerf2WorthWrapper::calculate_worths) + ; + + //class_, bases > >("eoNoPerf2Worth") +// .def("__call__", &eoNoPerf2Worth::operator()); + + class_, bases > >("eoNDSorting_II") + .def("calculate_worths", &eoNDSorting_II::calculate_worths); } diff --git a/eo/src/pyeo/test/test_mo.py b/eo/src/pyeo/test/test_mo.py index 3cf43e67d..11a02c039 100644 --- a/eo/src/pyeo/test/test_mo.py +++ b/eo/src/pyeo/test/test_mo.py @@ -3,10 +3,10 @@ import unittest class TestSGA(unittest.TestCase): - def testMO(self): + def testIndividuals(self): setObjectivesSize(2); setObjectivesValue(0,1); - setObjectivesValue(1,-1); + setObjectivesValue(1,1); eo1 = EO(); eo2 = EO(); @@ -14,10 +14,46 @@ class TestSGA(unittest.TestCase): eo1.fitness = [0,1]; eo2.fitness = [1,1]; - print dominates(eo1, eo2) + self.failUnlessEqual(dominates(eo1, eo2), 0) + self.failUnlessEqual(dominates(eo2, eo1), 1) + self.failUnlessEqual(dominates(eo2, eo2), 0) + setObjectivesValue(0,-1) - setObjectivesValue(1,1); - print dominates(eo1, eo2) + setObjectivesValue(1,-1); + + self.failUnlessEqual(dominates(eo1, eo2), 1) + self.failUnlessEqual(dominates(eo2, eo1), 0) + self.failUnlessEqual(dominates(eo2, eo2), 0) + + def testNDSorting(self): + + setObjectivesSize(2); + setObjectivesValue(0,-1) + setObjectivesValue(1,-1); + + pop = Pop() + pop.resize(6) + + pop[5].fitness = [0.15,0.87] + pop[4].fitness = [0.1,0.9] + pop[3].fitness = [0,1]; + pop[2].fitness = [1,0]; + pop[1].fitness = [1,1]; + pop[0].fitness = [2,1]; + + srt = eoNDSorting_II() + + srt(pop) + srt.sort_pop(pop) + + for indy in pop: + print indy.fitness + + + worths = srt.value() + print worths + print type(worths) + if __name__=='__main__': unittest.main() From d953d25f089ec71cdaf8ca9e14fcf24dc06aa886 Mon Sep 17 00:00:00 2001 From: okoenig Date: Wed, 8 Jan 2003 12:43:31 +0000 Subject: [PATCH 0918/2134] bugfix: since there are no Makefiles in the directory ~eo/src/do anymore, I removed this directory from the subdirs list in this Makefile.am --- eo/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index e37a70073..85a048d04 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = es ga gp utils other do +SUBDIRS = es ga gp utils other CPPFLAGS = -O2 lib_LIBRARIES = libeo.a From ea2e36954268c31d72a0aef96ff653f793cd7dab Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 10 Jan 2003 15:41:17 +0000 Subject: [PATCH 0919/2134] Added monitors and statistics, also made a module with some specific python stuff in __init__.py --- eo/src/pyeo/Makefile | 13 +-- eo/src/pyeo/Makefile.rpm | 3 +- eo/src/pyeo/PyEO.cpp | 6 +- eo/src/pyeo/PyEO.h | 1 + eo/src/pyeo/PyEO/__init__.py | 87 ++++++++++++++++++++ eo/src/pyeo/continuators.cpp | 23 ++++++ eo/src/pyeo/monitors.cpp | 44 +++++++++- eo/src/pyeo/perf2worth.cpp | 15 ++-- eo/src/pyeo/statistics.cpp | 61 ++++++++++++++ eo/src/pyeo/test/maxone.py | 14 +++- eo/src/pyeo/test/run_tests.sh | 3 +- eo/src/pyeo/test/test_breeders.py | 8 +- eo/src/pyeo/test/test_mo.py | 125 ++++++++++++++++++++++++++++- eo/src/pyeo/test/test_pickling.py | 2 +- eo/src/pyeo/test/test_populator.py | 4 +- eo/src/pyeo/test/test_reduce.py | 2 +- eo/src/pyeo/test/test_selectone.py | 2 +- eo/src/pyeo/test/test_sga.py | 29 +++++-- eo/src/pyeo/valueParam.cpp | 108 +++++++++++++++++++++---- 19 files changed, 503 insertions(+), 47 deletions(-) create mode 100644 eo/src/pyeo/PyEO/__init__.py create mode 100644 eo/src/pyeo/statistics.cpp diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 6a823a5d4..3e1799373 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -26,24 +26,25 @@ CXX = g++ #-3.2 CXXFLAGS = #-g #-DNDEBUG -CPPFLAGS = -Wall -O2 +CPPFLAGS = -Wall -O2 #-g #-O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -INC=-I/usr/include/python2.2 -I/usr/include/stlport -I.. -ftemplate-depth-50 +INC=-I/usr/include/python2.2 -I.. -ftemplate-depth-50 -I/usr/include/stlport OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ random_numbers.o geneticOps.o selectOne.o continuators.o\ reduce.o replacement.o selectors.o breeders.o\ - mergers.o valueParam.o perf2worth.o + mergers.o valueParam.o perf2worth.o monitors.o\ + statistics.o -all: PyEO.so +all: PyEO/PyEO.so clean: rm *.so *.o test/*.pyc -PyEO.so: $(OBJECTS) - $(LINK) -o PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport +PyEO/PyEO.so: $(OBJECTS) + $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) diff --git a/eo/src/pyeo/Makefile.rpm b/eo/src/pyeo/Makefile.rpm index 28b4210d1..dccf30eed 100644 --- a/eo/src/pyeo/Makefile.rpm +++ b/eo/src/pyeo/Makefile.rpm @@ -11,7 +11,8 @@ INC=-I/usr/include/python2.2 -I/usr/include/stlport -I.. -ftemplate-depth-50 OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ random_numbers.o geneticOps.o selectOne.o continuators.o\ reduce.o replacement.o selectors.o breeders.o\ - mergers.o valueParam.o perf2worth.o + mergers.o valueParam.o perf2worth.o monitors.o\ + statistics.o all: PyEO.so diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index 4c45145a9..085eb7282 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -156,6 +156,8 @@ extern void breeders(); extern void mergers(); extern void valueParam(); extern void perf2worth(); +extern void monitors(); +extern void statistics(); BOOST_PYTHON_MODULE(PyEO) { @@ -170,7 +172,7 @@ BOOST_PYTHON_MODULE(PyEO) .def("__str__", &PyEO::to_string) ; - class_ >("Pop", init<>() ) + class_ >("eoPop", init<>() ) .def( init< unsigned, eoInit& >() ) .def("append", &eoPop::append) .def("__str__", to_string >) @@ -195,6 +197,8 @@ BOOST_PYTHON_MODULE(PyEO) selectOne(); selectors(); perf2worth(); + monitors(); + statistics(); continuators(); reduce(); replacement(); diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index 79fcee3f6..cf9a4933d 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -23,6 +23,7 @@ #include +#include #include #include diff --git a/eo/src/pyeo/PyEO/__init__.py b/eo/src/pyeo/PyEO/__init__.py new file mode 100644 index 000000000..4e5e7d0e2 --- /dev/null +++ b/eo/src/pyeo/PyEO/__init__.py @@ -0,0 +1,87 @@ + +from PyEO import * + +try: + import Gnuplot +except ImportError: + print "Python support for Gnuplot not found" +else: + + class eoGnuplot1DMonitor(eoMonitor): + def __init__(self): + eoMonitor.__init__(self) + self.values = [] + self.indices = [] + self.g = Gnuplot.Gnuplot() + self.g.reset(); + + + def handleParam(self, i, param): + param = float(param) + + while len(self.values) <= i: + self.values.append( [] ) + + self.values[i].append(param) + + def __call__(self): + + l = len(self) + + if l > 3 or l == 0: + print 'Can only handle 1 to 3 params currently' + + i = 0 + for param in self: + self.handleParam(i,param) + i += 1 + + self.indices.append( len(self.indices) ) + + + data1 = Gnuplot.Data(self.indices, self.values[0], with = 'lines') + + if l == 1: + self.g.plot(data1) + else: + data2 = Gnuplot.Data(self.indices, self.values[1], with = 'lines') + + if l == 2: + self.g.plot(data1, data2) + else: + data3 = Gnuplot.Data(self.indices, self.values[2], with = 'lines') + + self.g.plot(data1, data2, data3) + +def SeperatedVolumeMonitor(eoMonitor): + def __init__(self, file): + eoMonitor.__init__(self) + self.file = file + self.initialized = None; + + def __call__(self): + pass + +class eoStat(eoStatBase, eoValueParamPy): + def __init__(self): + eoStatBase.__init__(self) + eoValueParamPy.__init__(self) + +class eoSortedStat(eoSortedStatBase, eoValueParamPy): + def __init__(self): + eoSortedStatBase.__init__(self) + eoValueParamPy.__init__(self) + +class eoAverageStat(eoStat): + def __call__(self, pop): + sum = 0.0; + for indy in pop: + sum += indy.fitness + + sum /= len(pop) + self.object = sum + +class eoBestFitnessStat(eoSortedStat): + + def __call__(self, pop): + self.object = pop[0].fitness diff --git a/eo/src/pyeo/continuators.cpp b/eo/src/pyeo/continuators.cpp index 620ae4202..a7231a87e 100644 --- a/eo/src/pyeo/continuators.cpp +++ b/eo/src/pyeo/continuators.cpp @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "PyEO.h" #include "def_abstract_functor.h" @@ -31,6 +33,8 @@ #define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) #define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) +void add_checkpoint(); + void continuators() { /* Counters, wrappers etc */ @@ -60,4 +64,23 @@ void continuators() DEF2(eoFitContinue, object); // object is the fitness type DEF3(eoSteadyFitContinue, unsigned long, unsigned long); + + add_checkpoint(); +} + +void addContinue(eoCheckPoint& c, eoContinue& cc) { c.add(cc); } +void addMonitor(eoCheckPoint& c, eoMonitor& m) { c.add(m);} +void addStat(eoCheckPoint& c, eoStatBase& s) { c.add(s);} +void addSortedStat(eoCheckPoint& c, eoSortedStatBase& s) { c.add(s);} + +void add_checkpoint() +{ + class_, bases< eoContinue > >("eoCheckPoint", + init&>()) + .def("add", addContinue) + .def("add", addMonitor, with_custodian_and_ward<1,2>() ) + .def("add", addStat) + .def("add", addSortedStat) + .def("__call__", &eoCheckPoint::operator()) + ; } diff --git a/eo/src/pyeo/monitors.cpp b/eo/src/pyeo/monitors.cpp index 0a44521f3..0b0e17344 100644 --- a/eo/src/pyeo/monitors.cpp +++ b/eo/src/pyeo/monitors.cpp @@ -18,11 +18,53 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include "PyEO.h" +class MonitorWrapper : public eoMonitor +{ + public: + PyObject* self; + list objects; + + MonitorWrapper(PyObject* p) :self(p) {} + + eoMonitor& operator()() + { + call_method(self, "__call__"); + return *this; + } + + std::string getString(int i) + { + if (static_cast(i) >= vec.size()) + { + throw index_error("Index out of bounds"); + } + + return vec[i]->getValue(); + } + + unsigned size() { return vec.size(); } +}; + void monitors() { - + /** + * Change of interface: I encountered some difficulties with + * transferring eoParams from and to Python, so now we can + * only get at the strings contained in the eoParams. + * sorry + */ + + class_("eoMonitor", init<>()) + .def("lastCall", &eoMonitor::lastCall) + .def("add", &eoMonitor::add) + .def("__call__", &MonitorWrapper::operator(), return_internal_reference<1>() ) + .def("__getitem__", &MonitorWrapper::getString, + "Returns the string value of the indexed Parameter") + .def("__len__", &MonitorWrapper::size) + ; } diff --git a/eo/src/pyeo/perf2worth.cpp b/eo/src/pyeo/perf2worth.cpp index 7c4da9af8..6bf216148 100644 --- a/eo/src/pyeo/perf2worth.cpp +++ b/eo/src/pyeo/perf2worth.cpp @@ -57,12 +57,17 @@ struct CachedPerf2WorthWrapper : public eoPerf2WorthCached void perf2worth() { - numeric::array::set_module_and_type("Numeric", "ArrayType"); + //numeric::array::set_module_and_type("Numeric", "ArrayType"); - class_, Perf2WorthWrapper, boost::noncopyable>("eoPerf2Worth", init<>()) - .def("__call__", &Perf2WorthWrapper::operator()) - .def("sort_pop", &eoPerf2Worth::sort_pop) - .def("value", get_worths) + class_< + eoPerf2Worth, + Perf2WorthWrapper, + bases< eoValueParam > >, + boost::noncopyable>("eoPerf2Worth", init<>()) + + .def("__call__", &Perf2WorthWrapper::operator()) + .def("sort_pop", &eoPerf2Worth::sort_pop) + //.def("value", get_worths) ; class_, CachedPerf2WorthWrapper, bases >, boost::noncopyable> diff --git a/eo/src/pyeo/statistics.cpp b/eo/src/pyeo/statistics.cpp new file mode 100644 index 000000000..7ffac706f --- /dev/null +++ b/eo/src/pyeo/statistics.cpp @@ -0,0 +1,61 @@ +#include + +#include "PyEO.h" +#include "valueParam.h" + +class StatBaseWrapper : public eoStatBase +{ + public: + PyObject* self; + StatBaseWrapper(PyObject* p) : self(p) {} + + void operator()(const eoPop& pop) + { + call_method(self, "__call__", boost::ref(pop)); + } +}; + +class SortedStatBaseWrapper : public eoSortedStatBase +{ + public: + PyObject* self; + SortedStatBaseWrapper(PyObject* p) : self(p) {} + + void operator()(const std::vector& pop) + { + call_method(self, "__call__", boost::ref(pop)); + } +}; + +typedef std::vector eoPopView; + +const PyEO& popview_getitem(const std::vector& pop, int it) +{ + unsigned item = unsigned(it); + if (item > pop.size()) + throw index_error("too much"); + + return *pop[item]; +} + +void statistics() +{ + class_, StatBaseWrapper, boost::noncopyable> + ("eoStatBase", init<>()) + .def("lastCall", &eoStatBase::lastCall) + .def("__call__", &StatBaseWrapper::operator()) + ; + + class_< eoPopView >("eoPopView") + .def("__getitem__", popview_getitem, return_internal_reference<>() ) + .def("__len__", &eoPopView::size) + ; + + class_, SortedStatBaseWrapper, boost::noncopyable> + ("eoSortedStatBase", init<>()) + .def("lastCall", &eoSortedStatBase::lastCall) + .def("__call__", &SortedStatBaseWrapper::operator()) + ; + + +} diff --git a/eo/src/pyeo/test/maxone.py b/eo/src/pyeo/test/maxone.py index f95bc0a7f..c2b6a0cf9 100644 --- a/eo/src/pyeo/test/maxone.py +++ b/eo/src/pyeo/test/maxone.py @@ -8,10 +8,20 @@ print 'done' from copy import copy - +class MinimFit(float): + def __cmp__(self, other): + if other == None: # I seem to be getting None's, don't know why + return 1 + return float.__cmp__(other, self) + class EvalFunc(eoEvalFunc): def __call__(self, eo): eo.fitness = reduce(lambda x,y: x+y, eo.genome, 0) + +class MinEvalFunc(eoEvalFunc): + def __call__(self, eo): + f = reduce(lambda x,y: x+y, eo.genome, 0 ) + eo.fitness = MinimFit(f) class Init(eoInit): def __init__(self, genome_length = 10): @@ -68,7 +78,7 @@ if __name__ == '__main__': print print - pop = Pop(1, init) + pop = eoPop(1, init) pop[0] = eo; diff --git a/eo/src/pyeo/test/run_tests.sh b/eo/src/pyeo/test/run_tests.sh index dbeb34dca..f3901050c 100755 --- a/eo/src/pyeo/test/run_tests.sh +++ b/eo/src/pyeo/test/run_tests.sh @@ -2,7 +2,8 @@ for i in *.py do - python $i + python $i > /dev/null + done diff --git a/eo/src/pyeo/test/test_breeders.py b/eo/src/pyeo/test/test_breeders.py index 3e0229813..ae77a8499 100644 --- a/eo/src/pyeo/test/test_breeders.py +++ b/eo/src/pyeo/test/test_breeders.py @@ -10,10 +10,10 @@ class TestSGA(unittest.TestCase): def runtest(self, breed): - pop = Pop(50, init) + pop = eoPop(50, init) for indy in pop: evaluate(indy) - newpop = Pop(); + newpop = eoPop(); breed(pop,newpop) @@ -33,5 +33,9 @@ class TestSGA(unittest.TestCase): self.runtest(breed) +def suite(): + return unittest.makeSuite(TestSGA,'test') + + if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_mo.py b/eo/src/pyeo/test/test_mo.py index 11a02c039..d224fcfde 100644 --- a/eo/src/pyeo/test/test_mo.py +++ b/eo/src/pyeo/test/test_mo.py @@ -1,7 +1,115 @@ from maxone import * +from math import exp import unittest -class TestSGA(unittest.TestCase): + +class MyInit(eoInit): + def __call__(self, eo): + eo.genome = [rng().normal(), rng().normal(), rng().normal()]; + +class MyMutate(eoMonOp): + def __call__(self, eo): + + std = 0.05 + eo.genome = copy(eo.genome) + + eo.genome[0] += rng().normal() * std + eo.genome[1] += rng().normal() * std + eo.genome[2] += rng().normal() * std + return 1 + +class AnEval(eoEvalFunc): + def __init__(self): + eoEvalFunc.__init__(self) + + setObjectivesSize(2); + setObjectivesValue(0,1); + setObjectivesValue(1,1); + + def __call__(self, eo): + x = abs(eo.genome[0]) + y = abs(eo.genome[1]) + z = abs(eo.genome[2]) + + eo.fitness = [ x / (x+y+z), y /(x+y+z) ] + +import Gnuplot + +g = Gnuplot.Gnuplot() +g.reset() + +def do_plot(pop): + l1 = [] + l2 = [] + + for indy in pop: + l1.append(indy.fitness[0]) + l2.append(indy.fitness[1]) + + d = Gnuplot.Data(l1,l2, with = 'points') + + d2 = Gnuplot.Data([0,1],[1,0], with='lines') + + g.plot(d,d2) + + + +class NSGA_II(eoAlgo): + def __init__(self, ngens): + + self.cont = eoGenContinue(ngens); + + self.selectOne = eoDetTournamentSelect(2); + self.evaluate = AnEval() + self.mutate = MyMutate() + self.init = MyInit() + + self.seq = eoProportionalOp() + self.seq.add(self.mutate, 1.0) + + self.perf2worth = eoNDSorting_II() + + def __call__(self, pop): + + sz = len(pop) + i = 0 + while self.cont(pop): + newpop = eoPop() + populator = eoSelectivePopulator(pop, newpop, self.selectOne); + + while len(newpop) < sz: + self.seq(populator) + + for indy in newpop: + self.evaluate(indy) + pop.push_back(indy) + + self.perf2worth(pop) + self.perf2worth.sort_pop(pop) + + #print pop[0].fitness, pop[0].genome + pop.resize(sz) + + #worth = self.perf2worth.getValue() + #print worth[0], worth[sz-1] + + i += 1 + if i%100 == 0: + pass #do_plot(pop) + + worths = self.perf2worth.getValue() + + w0 = int(worths[0]-0.001) + + for i in range(len(pop)): + if worths[i] <= w0: + break; + + print pop[i].genome + print pop[i].fitness + + +class TestNSGA_II(unittest.TestCase): def testIndividuals(self): setObjectivesSize(2); @@ -26,12 +134,11 @@ class TestSGA(unittest.TestCase): self.failUnlessEqual(dominates(eo2, eo2), 0) def testNDSorting(self): - setObjectivesSize(2); setObjectivesValue(0,-1) setObjectivesValue(1,-1); - pop = Pop() + pop = eoPop() pop.resize(6) pop[5].fitness = [0.15,0.87] @@ -50,10 +157,20 @@ class TestSGA(unittest.TestCase): print indy.fitness - worths = srt.value() + worths = srt.getValue() print worths print type(worths) + def testNSGA_II(self): + + init = MyInit(); + evaluate = AnEval(); + pop = eoPop(25, init) + for indy in pop: evaluate(indy) + + nsga = NSGA_II(50) + nsga(pop) + if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_pickling.py b/eo/src/pyeo/test/test_pickling.py index 8645d061e..fcaf0553c 100644 --- a/eo/src/pyeo/test/test_pickling.py +++ b/eo/src/pyeo/test/test_pickling.py @@ -48,7 +48,7 @@ class TestPickling(unittest.TestCase): def testPop(self): - pop = Pop(40, init) + pop = eoPop(40, init) for indy in pop: evaluate(indy) diff --git a/eo/src/pyeo/test/test_populator.py b/eo/src/pyeo/test/test_populator.py index 78846b937..a6743fda4 100644 --- a/eo/src/pyeo/test/test_populator.py +++ b/eo/src/pyeo/test/test_populator.py @@ -22,7 +22,7 @@ class Xover(Crossover): class TestPopulator(unittest.TestCase): def make_pop(self): - pop = Pop(20, init) + pop = eoPop(20, init) for indy in pop: evaluate(indy) return pop @@ -57,7 +57,7 @@ class TestPopulator(unittest.TestCase): seq.add(xover, 0.8) pop = self.make_pop(); - offspring = Pop() + offspring = eoPop() sel = eoDetTournamentSelect(2) diff --git a/eo/src/pyeo/test/test_reduce.py b/eo/src/pyeo/test/test_reduce.py index d0fcd8648..2ca99dc5b 100644 --- a/eo/src/pyeo/test/test_reduce.py +++ b/eo/src/pyeo/test/test_reduce.py @@ -4,7 +4,7 @@ import unittest class TestReduce(unittest.TestCase): def run_test(self, ReduceClass, Arg = None): - pop = Pop(10, init) + pop = eoPop(10, init) for indy in pop: evaluate(indy) if Arg: diff --git a/eo/src/pyeo/test/test_selectone.py b/eo/src/pyeo/test/test_selectone.py index b756753ce..1a25bc7fe 100644 --- a/eo/src/pyeo/test/test_selectone.py +++ b/eo/src/pyeo/test/test_selectone.py @@ -9,7 +9,7 @@ class TestSGA(unittest.TestCase): def __init__(self, a): unittest.TestCase.__init__(self, a) - self.pop = Pop(4, Init()) + self.pop = eoPop(4, Init()) for i in range(len(self.pop)): self.pop[i].fitness = i; diff --git a/eo/src/pyeo/test/test_sga.py b/eo/src/pyeo/test/test_sga.py index b31a5fae1..b84afe752 100644 --- a/eo/src/pyeo/test/test_sga.py +++ b/eo/src/pyeo/test/test_sga.py @@ -3,23 +3,42 @@ import unittest class TestSGA(unittest.TestCase): - def test(self): - evaluate = EvalFunc() + def dotestSGA(self, evaluate): init = Init(20) mutate = Mutate() xover = Crossover() - pop = Pop(50, init) + pop = eoPop(50, init) for indy in pop: evaluate(indy) select = eoDetTournamentSelect(3); - cont = eoGenContinue(20); - + cont1 = eoGenContinue(20); + + cont = eoCheckPoint(cont1) + + mon = eoGnuplot1DMonitor() + + avg = eoAverageStat() + bst = eoBestFitnessStat() + mon.add(avg) + mon.add(bst) + + # add it to the checkpoint + cont.add(avg) + #cont.add(mon) + cont.add(bst) + sga = eoSGA(select, xover, 0.6, mutate, 0.4, evaluate, cont); sga(pop) print pop.best() + def testSGA_Max(self): + evaluate = EvalFunc() + self.dotestSGA(evaluate) + def testSGA_Min(self): + evaluate = MinEvalFunc() + self.dotestSGA(evaluate) if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index 5f4e21929..86fd4facf 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -19,7 +19,12 @@ */ #include -#include +#include + +// Here's 'len'. Why? dunno +#include "valueParam.h" +#include + using namespace boost::python; @@ -38,31 +43,92 @@ public: std::string getValue() const { - return call_method(self, "getValue"); + return call_method(self, "getValueAsString"); } void setValue(std::string s) { - call_method(self, "setValue", s); + call_method(self, "setValueAsString", s); } }; -template T getv(const eoValueParam& v) { return v.value(); } -template void setv(eoValueParam& v, T val) { v.value() = val; } -template +template +U getv(const eoValueParam& v) { return v.value(); } + +template +void setv(eoValueParam& v, U val) { v.value() = val; } + +template <> +numeric::array getv< std::vector, numeric::array > + (const eoValueParam< std::vector >& param) +{ + const std::vector& v = param.value(); + list result; + + for (unsigned i =0; i < v.size(); ++i) + result.append(v[i]); + + return numeric::array(result); +} + +template <> +void setv< std::vector, numeric::array > + (eoValueParam< std::vector >& param, numeric::array val) +{ + std::vector& v = param.value(); + v.resize( boost::python::len(val) ); + for (unsigned i = 0; i < v.size(); ++i) + { + extract x(val[i]); + if (!x.check()) + throw std::runtime_error("double expected"); + + v[i] = x(); + } +} + +template <> +tuple getv, tuple > + (const eoValueParam< std::pair >& p) +{ + return make_tuple(p.value().first, p.value().second); +} + +template <> +void setv< std::pair, tuple > + (eoValueParam< std::pair >& p, tuple val) +{ + extract first(val[0]); + extract second(val[1]); + + if (!first.check()) + throw std::runtime_error("doubles expected"); + if (!second.check()) + throw std::runtime_error("doubles expected"); + + p.value().first = first(); + p.value().second = second(); +} + +template void define_valueParam(std::string prefix) { - class_, bases >( (prefix + "ValueParam").c_str(), init<>()) + std::string name = "eoValueParam"; + name += prefix; + + class_, bases >(name.c_str(), init<>()) .def(init()) .def(init()) .def(init()) .def(init()) - .def("getValue", &eoValueParam::getValue) + .def("getValueAsString", &eoValueParam::getValue) .def("__str__", &eoValueParam::getValue) - .def("setValue", &eoValueParam::setValue) - //.add_property("value", getv, setv) + .def("setValueAsString", &eoValueParam::setValue) + .def("getValue", getv) + .def("setValue", setv) + //.add_property("value", getv, setv) ; } @@ -70,8 +136,8 @@ void valueParam() { class_("eoParam", init<>()) .def(init< std::string, std::string, std::string, char, bool>()) - .def("getValue", &ParamWrapper::getValue) - .def("setValue", &ParamWrapper::setValue) + .def("getValueAsString", &ParamWrapper::getValue) + .def("setValueAsString", &ParamWrapper::setValue) .def("longName", &eoParam::longName, return_value_policy()) //.def("defValue", &eoParam::defValue, return_value_policy()) .def("description", &eoParam::description, return_value_policy()) @@ -79,7 +145,21 @@ void valueParam() .def("required", &eoParam::required) ; - define_valueParam("int"); - define_valueParam >("vec"); + define_valueParam("Int"); + define_valueParam("Float"); + define_valueParam, numeric::array >("Vec"); + define_valueParam< std::pair, tuple >("Pair"); + + class_ >("eoValueParamPy", init<>()) + //.def(init()) + //.def(init()) + //.def(init()) + //.def(init()) + .def("getValueAsString", &ValueParam::getValue) + .def("__str__", &ValueParam::getValue) + .def("setValueAsString", &ValueParam::setValue) + .add_property("object", &ValueParam::getObj, &ValueParam::setObj) + ; + } From 01727c5a5d5b19c1a36fcc6fead0f74c7ebb7ec7 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 10 Jan 2003 15:42:45 +0000 Subject: [PATCH 0920/2134] found a bug in eoProportionalOp, hope this helps... --- eo/src/eoOpContainer.h | 3 ++- eo/src/eoPerf2Worth.h | 31 ++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 5dbd45693..b68665df1 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -131,7 +131,7 @@ class eoSequentialOp : public eoOpContainer }; -/** The proportinoal verions: easy! */ +/** The proportional versions: easy! */ template class eoProportionalOp : public eoOpContainer { @@ -144,6 +144,7 @@ class eoProportionalOp : public eoOpContainer try { (*ops[i])(_pop); + ++_pop; } catch( typename eoPopulator::OutOfIndividuals&) {} diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index f5bffc4a4..0807fb035 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -28,17 +28,22 @@ #define eoPerf2Worth_h #include +#include +#include + #include +#include +#include /** Base class to transform raw fitnesses into fitness for selection @see eoSelectFromWorth */ template -class eoPerf2Worth : public eoUF&, void>, public eoValueParam > +class eoPerf2Worth : public eoUF&, void>, public eoValueParam > { public: - eoPerf2Worth(std::string _description = "Worths"):eoValueParam >(vector(0), + eoPerf2Worth(std::string _description = "Worths"):eoValueParam >(std::vector(0), _description) {} /** @@ -46,7 +51,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam& _pop) { // start with a vector of indices - vector indices(_pop.size()); + std::vector indices(_pop.size()); unsigned i; for (i = 0; i < _pop.size();++i) @@ -58,7 +63,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam tmp_pop; tmp_pop.resize(_pop.size()); - vector tmp_worths(value().size()); + std::vector tmp_worths(value().size()); for (i = 0; i < _pop.size(); ++i) { @@ -75,7 +80,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam& _worths) : worths(_worths) {} + compare_worth(const std::vector& _worths) : worths(_worths) {} bool operator()(unsigned a, unsigned b) const { @@ -84,7 +89,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam& worths; + const std::vector& worths; }; virtual void resize(eoPop& _pop, unsigned sz) @@ -151,7 +156,7 @@ class eoPerf2WorthCached : public eoPerf2Worth */ virtual void sort_pop(eoPop& _pop) { // start with a vector of indices - vector indices(_pop.size()); + std::vector indices(_pop.size()); unsigned i; for (i = 0; i < _pop.size();++i) @@ -163,12 +168,12 @@ class eoPerf2WorthCached : public eoPerf2Worth eoPop tmp_pop; tmp_pop.resize(_pop.size()); - vector tmp_worths(value().size()); + std::vector tmp_worths(value().size()); #ifdef _MSC_VER - vector tmp_cache(_pop.size()); + std::vector tmp_cache(_pop.size()); #else - vector tmp_cache(_pop.size()); + std::vector tmp_cache(_pop.size()); #endif for (i = 0; i < _pop.size(); ++i) { @@ -188,7 +193,7 @@ class eoPerf2WorthCached : public eoPerf2Worth class compare_worth { public : - compare_worth(const vector& _worths) : worths(_worths) {} + compare_worth(const std::vector& _worths) : worths(_worths) {} bool operator()(unsigned a, unsigned b) const { @@ -197,7 +202,7 @@ class eoPerf2WorthCached : public eoPerf2Worth private : - const vector& worths; + const std::vector& worths; }; virtual void resize(eoPop& _pop, unsigned sz) @@ -208,7 +213,7 @@ class eoPerf2WorthCached : public eoPerf2Worth } private : - vector fitness_cache; + std::vector fitness_cache; }; /** From b5d1a95cf6cbcbf02934d8df8fc48c84c4f3306e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 14 Jan 2003 09:37:45 +0000 Subject: [PATCH 0921/2134] next iteration --- eo/src/pyeo/PyEO.cpp | 2 +- eo/src/pyeo/PyEO.h | 3 +-- eo/src/pyeo/algos.cpp | 13 ++++++++++++- eo/src/pyeo/breeders.cpp | 14 +++++++------- eo/src/pyeo/continuators.cpp | 18 ++++++++++-------- eo/src/pyeo/def_abstract_functor.h | 4 ++++ eo/src/pyeo/geneticOps.cpp | 5 +++-- eo/src/pyeo/random_numbers.cpp | 22 ++++++++++++++++++++++ eo/src/pyeo/replacement.cpp | 19 ++++++++++++------- eo/src/pyeo/selectOne.cpp | 3 ++- eo/src/pyeo/selectors.cpp | 20 ++++++++++---------- eo/src/pyeo/statistics.cpp | 4 +--- eo/src/pyeo/test/test_breeders.py | 18 ++++++------------ eo/src/pyeo/test/test_mo.py | 6 +++--- 14 files changed, 94 insertions(+), 57 deletions(-) diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index 085eb7282..ce8c6164a 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -173,7 +173,7 @@ BOOST_PYTHON_MODULE(PyEO) ; class_ >("eoPop", init<>() ) - .def( init< unsigned, eoInit& >() ) + .def( init< unsigned, eoInit& >()[with_custodian_and_ward<1,3>()] ) .def("append", &eoPop::append) .def("__str__", to_string >) .def("__len__", &eoPop::size) diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index cf9a4933d..086d830cc 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -41,7 +41,6 @@ class PyFitness : public boost::python::object template PyFitness(const T& o) : object(o) {} - static unsigned nObjectives() { return objective_info.size(); } static double tol() { return 1e-6; } @@ -117,7 +116,7 @@ struct PyEO : public EO< PyFitness > object getGenome() const { return genome; } void setGenome(object g) { genome = g; } object genome; - + std::string to_string() const { std::string result; diff --git a/eo/src/pyeo/algos.cpp b/eo/src/pyeo/algos.cpp index baa137bb5..b8c69558d 100644 --- a/eo/src/pyeo/algos.cpp +++ b/eo/src/pyeo/algos.cpp @@ -36,7 +36,18 @@ void algos() eoQuadOp&, float, eoMonOp&, float, eoEvalFunc&, - eoContinue&>()) + eoContinue&>() + [ + with_custodian_and_ward<1,2, + with_custodian_and_ward<1,3, + with_custodian_and_ward<1,5, + with_custodian_and_ward<1,7, + with_custodian_and_ward<1,8> + > + > + > + >() + ]) .def("__call__", &eoSGA::operator()) ; diff --git a/eo/src/pyeo/breeders.cpp b/eo/src/pyeo/breeders.cpp index 466286f59..4610e947d 100644 --- a/eo/src/pyeo/breeders.cpp +++ b/eo/src/pyeo/breeders.cpp @@ -25,9 +25,9 @@ #include "PyEO.h" #include "def_abstract_functor.h" -#define DEF(x) class_, bases > >(#x).def("__call__", &eoBreed::operator()) -#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoBreed::operator()) -#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoBreed::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, \ + init()[with_custodian_and_ward<1,2,with_custodian_and_ward<1,3> >()])\ + .def("__call__", &eoBreed::operator()) void breeders() { @@ -36,14 +36,14 @@ void breeders() DEF3(eoSelectTransform, eoSelect&, eoTransform&); DEF3(eoGeneralBreeder, eoSelectOne&, eoGenOp&) - .def( init&, eoGenOp&, double>() ) - .def( init&, eoGenOp&, double, bool>() ) + .def( init&, eoGenOp&, double>()[WC2]) + .def( init&, eoGenOp&, double, bool>()[WC2] ) .def( init&, eoGenOp&, eoHowMany>() ); DEF3(eoOneToOneBreeder, eoGenOp&, eoEvalFunc&) - .def( init&, eoEvalFunc&, double>() ) - .def( init&, eoEvalFunc&, double, eoHowMany>() ); + .def( init&, eoEvalFunc&, double>()[WC2] ) + .def( init&, eoEvalFunc&, double, eoHowMany>()[WC2] ); } diff --git a/eo/src/pyeo/continuators.cpp b/eo/src/pyeo/continuators.cpp index a7231a87e..974f5d5f5 100644 --- a/eo/src/pyeo/continuators.cpp +++ b/eo/src/pyeo/continuators.cpp @@ -50,14 +50,14 @@ void continuators() .def("__call__", &eoGenContinue::operator()) ; - class_, bases > >("eoCombinedContinue", init&>()) - .def( init&, eoContinue& >() ) - .def("add", &eoCombinedContinue::add) + class_, bases > >("eoCombinedContinue", init&>()[WC1]) + .def( init&, eoContinue& >()[WC2] ) + .def("add", &eoCombinedContinue::add, WC1) .def("__call__", &eoCombinedContinue::operator()) ; class_, bases > >("eoEvalContinue", - init&, unsigned long>()) + init&, unsigned long>()[WC1]) .def("__call__", &eoEvalContinue::operator()) ; @@ -76,11 +76,13 @@ void addSortedStat(eoCheckPoint& c, eoSortedStatBase& s) { c.add(s); void add_checkpoint() { class_, bases< eoContinue > >("eoCheckPoint", - init&>()) - .def("add", addContinue) + + init&> ()[with_custodian_and_ward<1,2>()] + ) + .def("add", addContinue, with_custodian_and_ward<1,2>() ) .def("add", addMonitor, with_custodian_and_ward<1,2>() ) - .def("add", addStat) - .def("add", addSortedStat) + .def("add", addStat, with_custodian_and_ward<1,2>()) + .def("add", addSortedStat, with_custodian_and_ward<1,2>()) .def("__call__", &eoCheckPoint::operator()) ; } diff --git a/eo/src/pyeo/def_abstract_functor.h b/eo/src/pyeo/def_abstract_functor.h index fe9379524..7324dc481 100644 --- a/eo/src/pyeo/def_abstract_functor.h +++ b/eo/src/pyeo/def_abstract_functor.h @@ -23,6 +23,10 @@ #include +// DEFINES for call +#define WC1 boost::python::with_custodian_and_ward<1,2>() +#define WC2 boost::python::with_custodian_and_ward<1,2, with_custodian_and_ward<1,3> >() + namespace eoutils { using namespace boost::python; diff --git a/eo/src/pyeo/geneticOps.cpp b/eo/src/pyeo/geneticOps.cpp index 9e4379ff7..777a0f5c2 100644 --- a/eo/src/pyeo/geneticOps.cpp +++ b/eo/src/pyeo/geneticOps.cpp @@ -25,6 +25,7 @@ #include #include "PyEO.h" +#include "def_abstract_functor.h" class GenOpWrapper : public eoGenOp { @@ -138,12 +139,12 @@ void geneticOps() ; class_, bases >, boost::noncopyable>("eoSequentialOp", init<>()) - .def("add", &eoSequentialOp::add) + .def("add", &eoSequentialOp::add, WC1) .def("apply", &eoSequentialOp::apply) ; class_, bases >, boost::noncopyable>("eoProportionalOp", init<>()) - .def("add", &eoProportionalOp::add) + .def("add", &eoProportionalOp::add, WC1) .def("apply", &eoProportionalOp::apply) ; diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp index 0088b1c18..c2cbd993f 100644 --- a/eo/src/pyeo/random_numbers.cpp +++ b/eo/src/pyeo/random_numbers.cpp @@ -22,6 +22,7 @@ #include #include +#include using namespace boost::python; @@ -47,6 +48,26 @@ void rng_from_string(eoRng& _rng, std::string s) _rng.readFrom(is); } +int spin(eoRng& _rng, numeric::array values, double total) +{ + if (total == 0.0) + { + unsigned sz = len(values); + for (unsigned i = 0; i < sz; ++i) + { + total += extract(values[i]); //extract? + } + } + + double chance = _rng.uniform() * total; + + int i = 0; + while (chance >= 0.0) + chance -= extract(values[i++]); + + return --i; +} + void random_numbers() { class_("eoRng", init()) @@ -60,6 +81,7 @@ void random_numbers() .def("negexp", &eoRng::negexp) .def("to_string", rng_to_string) .def("from_string", rng_from_string) + .def("roulette_wheel", spin) ; def("rng", get_rng, return_value_policy()); diff --git a/eo/src/pyeo/replacement.cpp b/eo/src/pyeo/replacement.cpp index 683aa2334..ecfcf2847 100644 --- a/eo/src/pyeo/replacement.cpp +++ b/eo/src/pyeo/replacement.cpp @@ -29,7 +29,9 @@ #define DEF(x) class_, bases > >(#x).def("__call__", &eoReplacement::operator()) #define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) -#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, \ + init() [WC2])\ + .def("__call__", &eoReplacement::operator()) void replacement() { @@ -37,8 +39,11 @@ void replacement() // eoReplacement.h DEF(eoGenerationalReplacement); - DEF2(eoWeakElitistReplacement, eoReplacement& ); - + + class_, bases > > + ("eoWeakElitistReplacement", + init< eoReplacement& >()[WC1]); + // eoMergeReduce.h DEF3(eoMergeReduce, eoMerge&, eoReduce& ); DEF(eoPlusReplacement); @@ -52,10 +57,10 @@ void replacement() DEF2(eoSSGAStochTournamentReplacement, double); // eoReduceMergeReduce.h - class_, bases > >("eoReplacement", - init&, - eoHowMany, eoReduce&, eoReduce&>()) - .def("__call__", &eoReplacement::operator()); + //class_, bases > >("eoReplacement", +// init&, +// eoHowMany, eoReduce&, eoReduce&>()) +// .def("__call__", &eoReplacement::operator()); //eoMGGReplacement DEF(eoMGGReplacement) diff --git a/eo/src/pyeo/selectOne.cpp b/eo/src/pyeo/selectOne.cpp index 3216a7534..877f05953 100644 --- a/eo/src/pyeo/selectOne.cpp +++ b/eo/src/pyeo/selectOne.cpp @@ -27,6 +27,7 @@ #include "PyEO.h" #include "pickle.h" +#include "def_abstract_functor.h" class eoSelectOneWrapper : public eoSelectOne { @@ -85,7 +86,7 @@ void selectOne() add_select >("eoDetTournamentSelect", init<>(), init() ); add_select >("eoStochTournamentSelect", init<>(), init() ); add_select >("eoTruncatedSelectOne", - init&, double>(), init&, eoHowMany >() ); + init&, double>()[WC1], init&, eoHowMany >()[WC1] ); // eoProportionalSelect is not feasible to implement at this point as fitness is not recognizable as a float // use eoDetTournament instead: with a t-size of 2 it is equivalent to eoProportional with linear scaling diff --git a/eo/src/pyeo/selectors.cpp b/eo/src/pyeo/selectors.cpp index 25be973bc..4d5cfae79 100644 --- a/eo/src/pyeo/selectors.cpp +++ b/eo/src/pyeo/selectors.cpp @@ -30,8 +30,8 @@ #include "def_abstract_functor.h" #define DEF(x) class_, bases > >(#x).def("__call__", &eoSelect::operator()) -#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoSelect::operator()) -#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoSelect::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init()[WC1] ).def("__call__", &eoSelect::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init()[WC1] ).def("__call__", &eoSelect::operator()) void selectors() { @@ -39,21 +39,21 @@ void selectors() DEF(eoDetSelect).def( init() ).def( init() ); DEF3(eoSelectMany, eoSelectOne&, double) - .def( init< eoSelectOne&, double, bool>() ) - .def( init< eoSelectOne&, eoHowMany>() ); + .def( init< eoSelectOne&, double, bool>()[WC1] ) + .def( init< eoSelectOne&, eoHowMany>()[WC1] ); DEF2(eoSelectNumber, eoSelectOne&) - .def( init< eoSelectOne&, unsigned>()); + .def( init< eoSelectOne&, unsigned>()[WC1]); DEF2(eoSelectPerc, eoSelectOne&) - .def( init&, float>() ); + .def( init&, float>()[WC1] ); DEF3(eoTruncSelect, eoSelectOne&, eoHowMany); class_, bases > >("eoTruncatedSelectMany", - init&, double, double> ()) - .def(init&, double, double, bool> ()) - .def(init&, double, double, bool, bool> ()) - .def(init&, eoHowMany, eoHowMany> ()); + init&, double, double>()[WC1]) + .def(init&, double, double, bool> ()[WC1]) + .def(init&, double, double, bool, bool> ()[WC1]) + .def(init&, eoHowMany, eoHowMany> ()[WC1]); } diff --git a/eo/src/pyeo/statistics.cpp b/eo/src/pyeo/statistics.cpp index 7ffac706f..8dacf46e7 100644 --- a/eo/src/pyeo/statistics.cpp +++ b/eo/src/pyeo/statistics.cpp @@ -37,7 +37,7 @@ const PyEO& popview_getitem(const std::vector& pop, int it) return *pop[item]; } - + void statistics() { class_, StatBaseWrapper, boost::noncopyable> @@ -56,6 +56,4 @@ void statistics() .def("lastCall", &eoSortedStatBase::lastCall) .def("__call__", &SortedStatBaseWrapper::operator()) ; - - } diff --git a/eo/src/pyeo/test/test_breeders.py b/eo/src/pyeo/test/test_breeders.py index ae77a8499..fb8f19b74 100644 --- a/eo/src/pyeo/test/test_breeders.py +++ b/eo/src/pyeo/test/test_breeders.py @@ -1,16 +1,12 @@ from maxone import * import unittest -evaluate = EvalFunc() -init = Init(20) -mutate = Mutate() -xover = Crossover() - -class TestSGA(unittest.TestCase): +class TestBreeders(unittest.TestCase): def runtest(self, breed): - pop = eoPop(50, init) + pop = eoPop(50, Init(20)) + evaluate = EvalFunc() for indy in pop: evaluate(indy) newpop = eoPop(); @@ -24,12 +20,10 @@ class TestSGA(unittest.TestCase): def testGeneralBreeder(self): seq = eoSequentialOp(); - seq.add(xover, 0.7) - seq.add(mutate, 0.9) + seq.add(Crossover(), 0.7) + seq.add(Mutate(), 0.1) - sel = eoDetTournamentSelect(3) - - breed = eoGeneralBreeder(sel, seq) + breed = eoGeneralBreeder(eoDetTournamentSelect(3), seq) self.runtest(breed) diff --git a/eo/src/pyeo/test/test_mo.py b/eo/src/pyeo/test/test_mo.py index d224fcfde..ac8472903 100644 --- a/eo/src/pyeo/test/test_mo.py +++ b/eo/src/pyeo/test/test_mo.py @@ -95,7 +95,8 @@ class NSGA_II(eoAlgo): i += 1 if i%100 == 0: - pass #do_plot(pop) + pass + do_plot(pop) worths = self.perf2worth.getValue() @@ -163,9 +164,8 @@ class TestNSGA_II(unittest.TestCase): def testNSGA_II(self): - init = MyInit(); evaluate = AnEval(); - pop = eoPop(25, init) + pop = eoPop(25, MyInit()) for indy in pop: evaluate(indy) nsga = NSGA_II(50) From 395ca20a5cd6740fea2dbe9a978ada6bc19cc057 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 14 Jan 2003 10:09:28 +0000 Subject: [PATCH 0922/2134] added missing valueparm.h" --- eo/src/pyeo/valueParam.h | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 eo/src/pyeo/valueParam.h diff --git a/eo/src/pyeo/valueParam.h b/eo/src/pyeo/valueParam.h new file mode 100644 index 000000000..4ca7f61bc --- /dev/null +++ b/eo/src/pyeo/valueParam.h @@ -0,0 +1,43 @@ +#ifndef VALUEPARAM_H +#define VALUEPARAM_H + +#include +#include + +class ValueParam : public eoParam // ValueParam containing python object +{ + boost::python::object obj; + + public: + + ValueParam() : eoParam(), obj() {} + + ValueParam(boost::python::object o, + std::string longName, + std::string d = "No Description", + char s = 0, + bool r = false) : eoParam(longName, "", d, s, r) + { + std::cerr << "HI" << std::endl; + obj = o; + eoParam::defValue(getValue()); + } + + + std::string getValue() const + { + boost::python::str s = boost::python::str(obj); + return std::string(boost::python::extract(s)); + } + + void setValue(std::string v) + { + std::cerr << "not implemented yet" << std::endl; + } + + boost::python::object getObj() const { return obj;} + void setObj(boost::python::object o) { obj = o; } + +}; + +#endif From 149ad68cb5c1c4699b3b77661b22cb2df744df91 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 8 Feb 2003 05:24:51 +0000 Subject: [PATCH 0923/2134] Removed debugging printouts --- eo/src/eoMGGReplacement.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/eo/src/eoMGGReplacement.h b/eo/src/eoMGGReplacement.h index c87073c44..e5ecdc26b 100644 --- a/eo/src/eoMGGReplacement.h +++ b/eo/src/eoMGGReplacement.h @@ -65,8 +65,6 @@ public: void operator()(eoPop & _parents, eoPop & _offspring) { - cout << "Entering MGGReplacement" << endl; - eoPop temp; split(_parents, temp); unsigned toKeep = temp.size(); // how many to keep from merged populations @@ -83,21 +81,17 @@ public: // merge temp into offspring plus(temp, _offspring); - cout << "MGGReplacement - after merge" << endl; // repeatedly add selected offspring to parents for (unsigned i=0; i Date: Sat, 8 Feb 2003 05:36:01 +0000 Subject: [PATCH 0924/2134] =?UTF-8?q?Added=20a=20mthod=20to=20remove=20one?= =?UTF-8?q?=20of=20the=20combined=20things=20(from=20Ram=C3=B3n=20Casero?= =?UTF-8?q?=20Ca=C3=B1as)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/eoCombinedContinue.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index 2420288f0..b6035ffe3 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -34,6 +34,8 @@ 20/11/00 MS: Changed the 2-continuator construct to a vector > to be consistent with other Combined constructs and allow to easily handle more than 2 continuators + +02/2003 Ramón Casero Cańas - added the removeLast() method */ template< class EOT> @@ -63,6 +65,14 @@ public: continuators.push_back(&_cont); } + ///////////// RAMON'S CODE /////////////// + void removeLast(void) + { + continuators.pop_back(); + } + ///////////// RAMON'S CODE (end) /////////////// + + /** Returns false when one of the embedded continuators say so (logical and) */ virtual bool operator() ( const eoPop& _pop ) From fc1113aad63257dbfb5b638d0d1836dbb70a7271 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 17 Feb 2003 09:52:36 +0000 Subject: [PATCH 0925/2134] rolled back unfortunate change in eoAverageStat --- eo/src/utils/eoStat.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index c06188d59..ef0137160 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -35,7 +35,10 @@ /** Base class for all statistics that need to be calculated - over the (unsorted) population (I guess it is not really necessary? MS) + over the (unsorted) population + (I guess it is not really necessary? MS. + Depends, there might be reasons to have a stat that is not an eoValueParam, + but maybe I'm just kidding myself, MK) */ template class eoStatBase : public eoUF&, void> @@ -97,7 +100,7 @@ public : eoAverageStat(std::string _description = "Average Fitness") : eoStat(fitness_type(), _description) {} #endif - static double sumFitness(double _sum, const EOT& _eot) + static fitness_type sumFitness(double _sum, const EOT& _eot) { _sum += _eot.fitness(); return _sum; @@ -135,7 +138,7 @@ private : template void doit(const eoPop& _pop, T) { - double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness); + fitness_type v = std::accumulate(_pop.begin(), _pop.end(), fitness_type(0.0), eoAverageStat::sumFitness); value() = v / _pop.size(); } @@ -149,6 +152,8 @@ template class eoSecondMomentStats : public eoStat > { public : + typedef typename EOT::Fitness fitness_type; + typedef std::pair SquarePair; eoSecondMomentStats(std::string _description = "Average & Stdev") : eoStat(std::make_pair(0.0,0.0), _description) {} @@ -245,6 +250,10 @@ private : /* Actually, you shouldn't need to sort the population to get the best fitness MS - 17/11/00 + But then again, if another stat needs sorted fitness anyway, getting the best + out would be very fast. + MK - 09/01/03 + template class eoBestFitnessStat : public eoStat { From ff2968bd6004bdf1323c029ffad084003a432d7d Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 17 Feb 2003 10:19:25 +0000 Subject: [PATCH 0926/2134] Updated to use gcc-3.2 --- eo/configure.in | 2 +- eo/src/gp/eoParseTree.h | 4 +++- eo/src/gp/eoParseTreeDepthInit.h | 6 +++--- eo/src/gp/eoParseTreeOp.h | 2 +- eo/src/gp/parse_tree.h | 18 +++++++++--------- eo/src/utils/eoParam.h | 2 +- eo/test/t-eoPareto.cpp | 2 +- eo/test/t-eoSelect.cpp | 4 ++-- 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 90de61241..1fcca74b3 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,5 +34,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile src/do/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 4a1cd1cc4..5a36a5dcd 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -27,6 +27,8 @@ #ifndef eoParseTree_h #define eoParseTree_h +#include + #include #include @@ -54,7 +56,7 @@ class eoParseTree : public EO, public parse_tree { public : - typedef parse_tree::subtree Subtree; + typedef typename parse_tree::subtree Subtree; /* For Compatibility with the intel C++ compiler for Linux 5.x */ typedef Node reference; diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index f78142910..d77c2d480 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -121,7 +121,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > { if (last_terminal == -1) { // check where the last terminal in the sequence resides - vector::iterator it; + typename vector::iterator it; for (it = initializor.begin(); it != initializor.end(); ++it) { if (it->arity() > 0) @@ -133,12 +133,12 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > if (the_max == 1) { // generate terminals only - vector::iterator it = initializor.begin() + rng.random(last_terminal); + typename vector::iterator it = initializor.begin() + rng.random(last_terminal); sequence.push_front(*it); return; } - vector::iterator what_it; + typename vector::iterator what_it; if (grow) { diff --git a/eo/src/gp/eoParseTreeOp.h b/eo/src/gp/eoParseTreeOp.h index f739d14ef..649b1926d 100644 --- a/eo/src/gp/eoParseTreeOp.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -66,7 +66,7 @@ public: int i = rng.random(_eo1.size()); int j = rng.random(_eo2.size()); - parse_tree::subtree tmp = _eo1[i]; + typename parse_tree::subtree tmp = _eo1[i]; _eo1[i] = _eo2[j]; // insert subtree _eo2[j] = tmp; diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index 90be70bf4..badb062af 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -282,7 +282,7 @@ public : } template - void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) { (content->*f)(v, begin(), misc); } @@ -618,7 +618,7 @@ private : { _root.apply(v, varValues); } template - void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) { _root.apply_mem_func(v, misc, f); } @@ -689,7 +689,7 @@ private : return *this; } // else - subtree::iterator it; + typename subtree::iterator it; for (it = parent->begin(); it != parent->end(); ++it) { if (node == &(*it)) @@ -779,7 +779,7 @@ private : return *this; } // else - subtree::const_iterator it; + typename subtree::const_iterator it; for (it = parent->begin(); it != parent->end(); ++it) { @@ -888,7 +888,7 @@ private : _root = t; - for (subtree::iterator it = _root.begin(); it != _root.end(); it++) + for (typename subtree::iterator it = _root.begin(); it != _root.end(); it++) { *it = pushed.back(); pushed.pop_back(); @@ -940,25 +940,25 @@ namespace std { // for use with stlport on MSVC template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) +std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::embedded_iterator) { return std::forward_iterator_tag(); } template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) +ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::embedded_iterator) { return 0; } template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) +std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::iterator) { return std::forward_iterator_tag(); } template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) +ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::iterator) { return 0; } diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 89c72ad70..c69b2ff44 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -169,7 +169,7 @@ public : is >> repValue; } -private : +//private : ValueType repValue; }; diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 6a1f748e2..2d5cc48c3 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -197,7 +197,7 @@ void the_main(int argc, char* argv[]) #if !defined(NO_GNUPLOT) eoGnuplot1DSnapshot snapshot("pareto"); - snapshot.pointSize =3; + //snapshot.with(eoGnuplot::Points(3)); cp.add(snapshot); diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 3fde7f5ca..6e2139b05 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -140,10 +140,10 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to parentsOrg[i].fitness(i); else if (fitnessType == string("exp")) for (unsigned i=0; i Date: Mon, 17 Feb 2003 10:42:03 +0000 Subject: [PATCH 0927/2134] added std:: --- eo/src/gp/parse_tree.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index badb062af..ca9892dc0 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -298,7 +298,7 @@ public : */ template - void find_nodes(vector& result, Pred& p) + void find_nodes(std::vector& result, Pred& p) { if (p(*content)) { @@ -312,7 +312,7 @@ public : } template - void find_nodes(vector& result, Pred& p) const + void find_nodes(std::vector& result, Pred& p) const { if (p(*content)) { @@ -632,13 +632,13 @@ private : // { _root.apply(v, varValues, moreValues, evenMoreValues); } template - void find_nodes(vector& result, Pred& p) + void find_nodes(std::vector& result, Pred& p) { _root.find_nodes(result, p); } template - void find_nodes(vector& result, Pred& p) const + void find_nodes(std::vector& result, Pred& p) const { _root.find_nodes(p); } From 4052187a6c266513637faee8dca00f94c136462f Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 20 Feb 2003 19:13:33 +0000 Subject: [PATCH 0928/2134] added an #ifdef _MSC_VER statement to hide "typename" identifier for Visual Studio --- eo/src/utils/selectors.h | 662 ++++++++++++++++++++------------------- 1 file changed, 334 insertions(+), 328 deletions(-) diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 5f63af6a1..297a05239 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -1,328 +1,334 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - selectors.h - A bunch of useful selector functions. They generally have three forms: - - template - It select(It begin, It end, params, eoRng& gen = rng); - - template - const EOT& select(const eoPop& pop, params, eoRng& gen = rng); - - template - EOT& select(eoPop& pop, params, eoRng& gen = rng); - - where select is one of: roulette_wheel, deterministic_tournament - and stochastic_tournament (at the moment). - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef SELECT__H -#define SELECT__H - -#include - -#include "eoRNG.h" -#include -/** -\defgroup selectors -*/ - -template -bool minimizing_fitness() -{ - EOT eo1; // Assuming people don't do anything fancy in the default constructor! - EOT eo2; - - /* Dear user, when the two line below do not compile you are most - likely not working with scalar fitness values. In that case we're sorry - but you cannot use lottery or roulette_wheel selection... - */ - eo1.fitness( typename EOT::Fitness(0.0) ); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this - eo2.fitness( typename EOT::Fitness(1.0) ); - - return eo2 < eo1; // check whether we have a minimizing fitness -}; - -inline double scale_fitness(const std::pair& _minmax, double _value) -{ - if (_minmax.first == _minmax.second) - { - return 0.0; // no differences in fitness, population converged! - } - // else - - return (_value - _minmax.first) / (_minmax.second - _minmax.first); -} - -template -double sum_fitness(It begin, It end) -{ - double sum = 0.0; - - for (; begin != end; ++begin) - { - double v = static_cast(begin->fitness()); - if (v < 0.0) - throw std::logic_error("sum_fitness: negative fitness value encountered"); - sum += v; - } - - return sum; -} - -template -double sum_fitness(const eoPop& _pop) -{ - return sum_fitness(_pop.begin(), _pop.end()); -} - -template -double sum_fitness(const eoPop& _pop, std::pair& _minmax) -{ - typename eoPop::const_iterator it = _pop.begin(); - - _minmax.first = it->fitness(); - _minmax.second = it++->fitness(); - - for(; it != _pop.end(); ++it) - { - double v = static_cast(it->fitness()); - - _minmax.first = std::min(_minmax.first, v); - _minmax.second = std::max(_minmax.second, v); - - rawTotal += v; - } - - if (minimizing_fitness()) - { - std::swap(_minmax.first, _minmax.second); - } - - scaledTotal = 0.0; - - // unfortunately a second loop is neccessary to scale the fitness - for (it = _pop.begin(); it != _pop.end(); ++it) - { - double v = scale_fitness(static_cast(it->fitness())); - - scaledTotal += v; - } -} - -template -It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) -{ - - float roulette = _gen.uniform(total); - - if (roulette == 0.0) // covers the case where total==0.0 - return _begin + _gen.random(_end - _begin); // uniform choice - - It i = _begin; - - while (roulette > 0.0) - { - roulette -= static_cast(*(i++)); - } - - return --i; -} - -template -const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - if (roulette == 0.0) // covers the case where total==0.0 - return _pop[_gen.random(_pop.size())]; // uniform choice - - typename eoPop::const_iterator i = _pop.begin(); - - while (roulette > 0.0) - { - roulette -= static_cast((i++)->fitness()); - } - - return *--i; -} - -template -EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) -{ - float roulette = _gen.uniform(total); - - if (roulette == 0.0) // covers the case where total==0.0 - return _pop[_gen.random(_pop.size())]; // uniform choice - - typename eoPop::iterator i = _pop.begin(); - - while (roulette > 0.0) - { - roulette -= static_cast((i++)->fitness()); - } - - return *--i; -} - -template -It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) -{ - It best = _begin + _gen.random(_end - _begin); - - for (unsigned i = 0; i < _t_size - 1; ++i) - { - It competitor = _begin + _gen.random(_end - _begin); - - if (*best < *competitor) - { - best = competitor; - } - } - - return best; -} - -template -const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) -{ - It worst = _begin + _gen.random(_end - _begin); - - for (unsigned i = 1; i < _t_size; ++i) - { - It competitor = _begin + _gen.random(_end - _begin); - - if (competitor == worst) - { - --i; - continue; // try again - } - - if (*competitor < *worst) - { - worst = competitor; - } - } - - return worst; -} - -template -const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) -{ - return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); -} - -template -It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) -{ - It i1 = _begin + _gen.random(_end - _begin); - It i2 = _begin + _gen.random(_end - _begin); - - bool return_better = _gen.flip(_t_rate); - - if (*i1 < *i2) - { - if (return_better) return i2; - // else - - return i1; - } - else - { - if (return_better) return i1; - // else - } - // else - - return i2; -} - -template -const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) -{ - It i1 = _begin + _gen.random(_end - _begin); - It i2 = _begin + _gen.random(_end - _begin); - - bool return_worse = _gen.flip(_t_rate); - - if (*i1 < *i2) - { - if (return_worse) return i1; - // else - - return i2; - } - else - { - if (return_worse) return i2; - // else - } - // else - - return i1; -} - -template -const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - -template -EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) -{ - return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); -} - - -#endif +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + selectors.h + A bunch of useful selector functions. They generally have three forms: + + template + It select(It begin, It end, params, eoRng& gen = rng); + + template + const EOT& select(const eoPop& pop, params, eoRng& gen = rng); + + template + EOT& select(eoPop& pop, params, eoRng& gen = rng); + + where select is one of: roulette_wheel, deterministic_tournament + and stochastic_tournament (at the moment). + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef SELECT__H +#define SELECT__H + +#include + +#include "eoRNG.h" +#include +/** +\defgroup selectors +*/ + +template +bool minimizing_fitness() +{ + EOT eo1; // Assuming people don't do anything fancy in the default constructor! + EOT eo2; + + /* Dear user, when the two line below do not compile you are most + likely not working with scalar fitness values. In that case we're sorry + but you cannot use lottery or roulette_wheel selection... + */ + +#ifdef _MSC_VER + eo1.fitness( EOT::Fitness(0.0) ); + eo2.fitness( EOT::Fitness(1.0) ); +#else + eo1.fitness( typename EOT::Fitness(0.0) ); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this + eo2.fitness( typename EOT::Fitness(1.0) ); +#endif + + return eo2 < eo1; // check whether we have a minimizing fitness +}; + +inline double scale_fitness(const std::pair& _minmax, double _value) +{ + if (_minmax.first == _minmax.second) + { + return 0.0; // no differences in fitness, population converged! + } + // else + + return (_value - _minmax.first) / (_minmax.second - _minmax.first); +} + +template +double sum_fitness(It begin, It end) +{ + double sum = 0.0; + + for (; begin != end; ++begin) + { + double v = static_cast(begin->fitness()); + if (v < 0.0) + throw std::logic_error("sum_fitness: negative fitness value encountered"); + sum += v; + } + + return sum; +} + +template +double sum_fitness(const eoPop& _pop) +{ + return sum_fitness(_pop.begin(), _pop.end()); +} + +template +double sum_fitness(const eoPop& _pop, std::pair& _minmax) +{ + typename eoPop::const_iterator it = _pop.begin(); + + _minmax.first = it->fitness(); + _minmax.second = it++->fitness(); + + for(; it != _pop.end(); ++it) + { + double v = static_cast(it->fitness()); + + _minmax.first = std::min(_minmax.first, v); + _minmax.second = std::max(_minmax.second, v); + + rawTotal += v; + } + + if (minimizing_fitness()) + { + std::swap(_minmax.first, _minmax.second); + } + + scaledTotal = 0.0; + + // unfortunately a second loop is neccessary to scale the fitness + for (it = _pop.begin(); it != _pop.end(); ++it) + { + double v = scale_fitness(static_cast(it->fitness())); + + scaledTotal += v; + } +} + +template +It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) +{ + + float roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _begin + _gen.random(_end - _begin); // uniform choice + + It i = _begin; + + while (roulette > 0.0) + { + roulette -= static_cast(*(i++)); + } + + return --i; +} + +template +const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _pop[_gen.random(_pop.size())]; // uniform choice + + typename eoPop::const_iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _pop[_gen.random(_pop.size())]; // uniform choice + + typename eoPop::iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It best = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (*best < *competitor) + { + best = competitor; + } + } + + return best; +} + +template +const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It worst = _begin + _gen.random(_end - _begin); + + for (unsigned i = 1; i < _t_size; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (competitor == worst) + { + --i; + continue; // try again + } + + if (*competitor < *worst) + { + worst = competitor; + } + } + + return worst; +} + +template +const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_better = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_better) return i2; + // else + + return i1; + } + else + { + if (return_better) return i1; + // else + } + // else + + return i2; +} + +template +const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_worse = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_worse) return i1; + // else + + return i2; + } + else + { + if (return_worse) return i2; + // else + } + // else + + return i1; +} + +template +const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + + +#endif From 89a99dab17def7fdd612d7ac69981ffd05933ef2 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 27 Feb 2003 19:18:07 +0000 Subject: [PATCH 0929/2134] removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. --- eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp | 2 ++ eo/tutorial/ParadisEO/Lesson3/Makefile | 1 + eo/tutorial/ParadisEO/Lesson3/binary_value.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp b/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp index 41640b355..42cb4a958 100644 --- a/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp @@ -9,6 +9,8 @@ typedef eoBit Indi; #include "binary_value.h" +using namespace std; + void main_function(int argc, char **argv) { diff --git a/eo/tutorial/ParadisEO/Lesson3/Makefile b/eo/tutorial/ParadisEO/Lesson3/Makefile index 2e5c0fdfc..3b255b387 100644 --- a/eo/tutorial/ParadisEO/Lesson3/Makefile +++ b/eo/tutorial/ParadisEO/Lesson3/Makefile @@ -1,3 +1,4 @@ +.SUFFIXES: .cpp .cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -o $@ $*.cpp ../../../src/utils/libeoutils.a ../../../src/libeo.a .cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -c $*.cpp diff --git a/eo/tutorial/ParadisEO/Lesson3/binary_value.h b/eo/tutorial/ParadisEO/Lesson3/binary_value.h index a31c08644..f2f5d6ca1 100644 --- a/eo/tutorial/ParadisEO/Lesson3/binary_value.h +++ b/eo/tutorial/ParadisEO/Lesson3/binary_value.h @@ -7,7 +7,7 @@ @param _chrom A binary chromosome */ // INIT -double binary_value(const vector& _chrom) +double binary_value(const std::vector& _chrom) { double sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) From 6441ea1ec3e24816b961c2396ab21afd21a5e206 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 27 Feb 2003 19:18:53 +0000 Subject: [PATCH 0930/2134] removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary --- eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp | 2 ++ eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp | 2 ++ eo/tutorial/ParadisEO/Lesson2/binary_value.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp index b2b154ffe..0d61b5018 100644 --- a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp @@ -9,6 +9,8 @@ typedef eoBit Indi ; // A bitstring with fitness double #include "binary_value.h" +using namespace std; + void main_function(int argc, char **argv) { // Some parameters diff --git a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp index 5194d789d..c6cd8969e 100644 --- a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp @@ -9,6 +9,8 @@ typedef eoBit Indi; // A bitstring with fitness double #include "binary_value.h" +using namespace std; + void main_function(int argc, char **argv) { eoEvalFuncPtr & > eval (binary_value) ; diff --git a/eo/tutorial/ParadisEO/Lesson2/binary_value.h b/eo/tutorial/ParadisEO/Lesson2/binary_value.h index a31c08644..f2f5d6ca1 100644 --- a/eo/tutorial/ParadisEO/Lesson2/binary_value.h +++ b/eo/tutorial/ParadisEO/Lesson2/binary_value.h @@ -7,7 +7,7 @@ @param _chrom A binary chromosome */ // INIT -double binary_value(const vector& _chrom) +double binary_value(const std::vector& _chrom) { double sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) From 86fa476c675b313b58dffc505c00ce6703d10a47 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 27 Feb 2003 19:28:07 +0000 Subject: [PATCH 0931/2134] Removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. --- eo/app/mastermind/mastermind.cpp | 2 + eo/app/mastermind/mastermind.h | 14 +- eo/configure.in | 2 +- eo/contrib/MGE/VirusOp.h | 14 +- eo/contrib/MGE/eoVirus.h | 26 +- eo/contrib/eoAged.h | 4 +- eo/src/EO.h | 20 +- eo/src/apply.h | 2 +- eo/src/do/make_algo_easea.h | 88 +++--- eo/src/do/make_algo_pareto.h | 38 +-- eo/src/do/make_algo_scalar.h | 78 ++--- eo/src/do/make_checkpoint.h | 26 +- eo/src/do/make_checkpoint_FDC.h | 18 +- eo/src/do/make_checkpoint_pareto.h | 32 +-- eo/src/do/make_continue.h | 2 +- eo/src/do/make_continue_pareto.h | 2 +- eo/src/do/make_general_replacement.h | 28 +- eo/src/do/make_pop.h | 2 +- eo/src/eoCloneOps.h | 8 +- eo/src/eoCombinedContinue.h | 2 +- eo/src/eoCtrlCContinue.h | 2 +- eo/src/eoDetTournamentSelect.h | 2 +- eo/src/eoDominanceMap.h | 16 +- eo/src/eoEasyEA.h | 10 +- eo/src/eoEvalContinue.h | 4 +- eo/src/eoFactory.h | 8 +- eo/src/eoFitContinue.h | 2 +- eo/src/eoG3Replacement.h | 4 +- eo/src/eoGenContinue.h | 4 +- eo/src/eoGenOp.h | 10 +- eo/src/eoGeneralBreeder.h | 2 +- eo/src/eoInit.h | 8 +- eo/src/eoLinearFitScaling.h | 2 +- eo/src/eoMGGReplacement.h | 4 +- eo/src/eoMerge.h | 4 +- eo/src/eoNDSorting.h | 60 ++-- eo/src/eoObject.h | 8 +- eo/src/eoOneToOneBreeder.h | 4 +- eo/src/eoOp.h | 14 +- eo/src/eoOpContainer.h | 20 +- eo/src/eoOpSelMason.h | 14 +- eo/src/eoParetoConstraintFitness.h | 8 +- eo/src/eoParetoFitness.h | 2 +- eo/src/eoParetoRanking.h | 2 +- eo/src/eoPerf2Worth.h | 16 +- eo/src/eoPersistent.cpp | 2 +- eo/src/eoPersistent.h | 14 +- eo/src/eoPop.h | 68 ++--- eo/src/eoPrintable.cpp | 2 +- eo/src/eoPrintable.h | 12 +- eo/src/eoProportionalCombinedOp.h | 18 +- eo/src/eoProportionalSelect.h | 2 +- eo/src/eoRanking.h | 12 +- eo/src/eoRankingSelect.h | 2 +- eo/src/eoReduce.h | 22 +- eo/src/eoReduceMergeReduce.h | 8 +- eo/src/eoReduceSplit.h | 6 +- eo/src/eoSGAGenOp.h | 2 +- eo/src/eoSGATransform.h | 2 +- eo/src/eoSelectFactory.h | 14 +- eo/src/eoSelectFromWorth.h | 12 +- eo/src/eoSequentialSelect.h | 19 +- eo/src/eoSharing.h | 16 +- eo/src/eoSimpleDEA.h | 6 +- eo/src/eoSteadyFitContinue.h | 6 +- eo/src/eoStochTournamentSelect.h | 4 +- eo/src/eoSurviveAndDie.h | 4 +- eo/src/eoToricCellularEasyEA.h | 4 +- eo/src/eoTruncatedSelectMany.h | 2 +- eo/src/eoVariableLengthCrossover.h | 30 +- eo/src/eoVariableLengthMutation.h | 16 +- eo/src/eoVector.h | 22 +- eo/src/es.h | 2 +- eo/src/es/eoEsChromInit.h | 4 +- eo/src/es/eoEsFull.h | 6 +- eo/src/es/eoEsGlobalXover.h | 2 +- eo/src/es/eoEsMutate.h | 10 +- eo/src/es/eoEsSimple.h | 2 +- eo/src/es/eoEsStandardXover.h | 2 +- eo/src/es/eoEsStdev.h | 4 +- eo/src/es/eoNormalMutation.h | 14 +- eo/src/es/eoReal.h | 8 +- eo/src/es/eoRealAtomXover.h | 6 +- eo/src/es/eoRealInitBounded.h | 4 +- eo/src/es/eoRealOp.h | 72 ++--- eo/src/es/make_genotype_real.h | 4 +- eo/src/es/make_op.h | 44 +-- eo/src/es/make_op_es.h | 40 +-- eo/src/es/make_op_real.h | 34 +-- eo/src/es/make_real.h | 2 +- eo/src/ga/eoBit.h | 26 +- eo/src/ga/eoBitOp.h | 66 ++--- eo/src/ga/eoBitOpFactory.h | 14 +- eo/src/ga/eoPBILAdditive.h | 6 +- eo/src/ga/eoPBILDistrib.h | 14 +- eo/src/ga/eoPBILOrg.h | 2 +- eo/src/ga/make_PBILdistrib.h | 4 +- eo/src/ga/make_PBILupdate.h | 6 +- eo/src/ga/make_op.h | 26 +- eo/src/gp/eoParseTree.h | 13 +- eo/src/gp/eoParseTreeDepthInit.h | 35 ++- eo/src/gp/eoParseTreeOp.h | 18 +- eo/src/gp/eoStParseTreeDepthInit.h | 35 ++- eo/src/gp/eoStParseTreeOp.h | 30 +- eo/src/gp/parse_tree.h | 16 +- eo/src/obsolete/eo1d.h | 32 +-- eo/src/obsolete/eo1dWDistance.h | 8 +- eo/src/obsolete/eo2d.h | 48 ++-- eo/src/obsolete/eo2dVector.h | 114 ++++---- eo/src/obsolete/eoAtomBitFlip.h | 2 +- eo/src/obsolete/eoAtomCreep.h | 2 +- eo/src/obsolete/eoAtomRandom.h | 2 +- eo/src/obsolete/eoBackInserter.h | 4 +- eo/src/obsolete/eoBin.h | 22 +- eo/src/obsolete/eoBreeder.h | 4 +- eo/src/obsolete/eoCopyElite.h | 2 +- eo/src/obsolete/eoDetTournament.h | 2 +- eo/src/obsolete/eoDetTournamentInserter.h | 2 +- eo/src/obsolete/eoDistance.h | 2 +- eo/src/obsolete/eoDup.h | 2 +- eo/src/obsolete/eoES.h | 14 +- eo/src/obsolete/eoESChrom.h | 14 +- eo/src/obsolete/eoESFullChrom.h | 54 ++-- eo/src/obsolete/eoESFullMut.h | 4 +- eo/src/obsolete/eoEsObjectiveBounds.h | 2 +- eo/src/obsolete/eoGOpBreeder.h | 2 +- eo/src/obsolete/eoGOpSelector.h | 26 +- eo/src/obsolete/eoGenTerm.h | 2 +- eo/src/obsolete/eoGeneration.h | 6 +- eo/src/obsolete/eoGenericBinOp.h | 4 +- eo/src/obsolete/eoGenericMonOp.h | 4 +- eo/src/obsolete/eoGenericQuadOp.h | 4 +- eo/src/obsolete/eoID.h | 16 +- eo/src/obsolete/eoInclusion.h | 6 +- eo/src/obsolete/eoInplaceTransform.h | 2 +- eo/src/obsolete/eoInsertion.h | 6 +- eo/src/obsolete/eoKill.h | 2 +- eo/src/obsolete/eoLottery.h | 4 +- eo/src/obsolete/eoMutation.h | 10 +- eo/src/obsolete/eoOpFactory.h | 12 +- eo/src/obsolete/eoOpSelector.h | 10 +- eo/src/obsolete/eoParser.h | 268 +++++++++--------- eo/src/obsolete/eoPopOps.h | 6 +- eo/src/obsolete/eoProportional.h | 2 +- eo/src/obsolete/eoProportionalGOpSel.h | 2 +- eo/src/obsolete/eoProportionalOpSel.h | 30 +- eo/src/obsolete/eoRandomBreed.h | 12 +- eo/src/obsolete/eoRandomSelect.h | 10 +- eo/src/obsolete/eoRank.h | 14 +- eo/src/obsolete/eoScheme.h | 34 +-- eo/src/obsolete/eoSteadyStateEA.h | 6 +- eo/src/obsolete/eoStochTournament.h | 2 +- eo/src/obsolete/eoStochTournamentInserter.h | 2 +- eo/src/obsolete/eoStringMutation.h | 2 +- eo/src/obsolete/eoTournament.h | 18 +- eo/src/obsolete/eoTranspose.h | 6 +- eo/src/obsolete/eoUniformXOver.h | 4 +- eo/src/obsolete/eoVector.h | 40 +-- eo/src/obsolete/eoWrappedOps.h | 2 +- eo/src/obsolete/eoXOver2.h | 4 +- eo/src/other/eoExternalEO.h | 8 +- eo/src/other/eoString.h | 12 +- eo/src/paradisEO/comm/eoListener.h | 8 +- eo/src/paradisEO/comm/eoLocalListener.h | 10 +- eo/src/paradisEO/comm/messages/eoMessTo.h | 6 +- .../comm/messages/from/eoEOSendMessFrom.h | 2 +- .../comm/messages/from/eoHeaderMessFrom.h | 2 +- .../comm/messages/from/eoPublishMessFrom.h | 2 +- .../comm/messages/to/eoEOSendMessTo.h | 2 +- .../comm/messages/to/eoHeaderMessTo.h | 8 +- .../comm/messages/to/eoPublishMessTo.h | 6 +- eo/src/paradisEO/eoPopAgent.h | 6 +- eo/src/paradisEO/eoSolAgent.h | 6 +- eo/src/paradisEO/eval/eoDistEvalEasyEA.h | 2 +- eo/src/paradisEO/eval/eoDistPopEvalFunc.h | 8 +- eo/src/paradisEO/eval/eoEvaluator.h | 2 +- eo/src/paradisEO/island/eoConnectivity.h | 10 +- eo/src/paradisEO/island/eoIslandsEasyEA.h | 4 +- eo/src/paradisEO/island/eoMigUpdater.h | 4 +- .../island/topologies/eoFullConnectivity.h | 10 +- .../island/topologies/eoRingConnectivity.h | 12 +- eo/src/pyeo/PyEO.h | 12 +- eo/src/pyeo/pickle.h | 10 +- eo/src/utils/compatibility.h | 2 +- eo/src/utils/eoCheckPoint.h | 4 +- eo/src/utils/eoData.h | 6 +- eo/src/utils/eoDistance.h | 2 +- eo/src/utils/eoFDCStat.h | 16 +- eo/src/utils/eoFileMonitor.h | 10 +- eo/src/utils/eoFileSnapshot.h | 56 ++-- eo/src/utils/eoGnuplot.h | 12 +- eo/src/utils/eoGnuplot1DMonitor.h | 6 +- eo/src/utils/eoGnuplot1DSnapshot.h | 8 +- eo/src/utils/eoHowMany.h | 12 +- eo/src/utils/eoMOFitnessStat.h | 20 +- eo/src/utils/eoMonitor.h | 4 +- eo/src/utils/eoParam.h | 56 ++-- eo/src/utils/eoParser.h | 24 +- eo/src/utils/eoPopStat.h | 32 +-- eo/src/utils/eoRNG.h | 8 +- eo/src/utils/eoRealBounds.cpp | 34 +-- eo/src/utils/eoRealBounds.h | 74 ++--- eo/src/utils/eoRealVectorBounds.h | 98 +++---- eo/src/utils/eoRndGenerators.h | 2 +- eo/src/utils/eoScalarFitnessStat.h | 8 +- eo/src/utils/eoStat.h | 25 +- eo/src/utils/eoUniformInit.h | 2 +- eo/src/utils/rnd_generators.h | 4 +- eo/src/utils/selectors.h | 2 +- eo/test/fitness_traits.cpp | 54 ++-- eo/test/t-MGE-control.cpp | 14 +- eo/test/t-MGE.cpp | 14 +- eo/test/t-MGE1bit.cpp | 14 +- eo/test/t-eo.cpp | 4 +- eo/test/t-eoAtomOps.cpp | 6 +- eo/test/t-eoBaseFunctions.cpp | 4 +- eo/test/t-eoCheckpointing.cpp | 14 +- eo/test/t-eoESAll.cpp | 24 +- eo/test/t-eoESFull.cpp | 6 +- eo/test/t-eoESOps.cpp | 12 +- eo/test/t-eoEasyEA.cpp | 12 +- eo/test/t-eoExternalEO.cpp | 18 +- eo/test/t-eoGA.cpp | 16 +- eo/test/t-eoGOpSel.cpp | 6 +- eo/test/t-eoGenOp.cpp | 74 ++--- eo/test/t-eoNonUniform.cpp | 10 +- eo/test/t-eoPBIL.cpp | 10 +- eo/test/t-eoPareto.cpp | 10 +- eo/test/t-eoParetoFitness.cpp | 26 +- eo/test/t-eoRandom.cpp | 10 +- eo/test/t-eoReal.cpp | 16 +- eo/test/t-eoReplacement.cpp | 72 ++--- eo/test/t-eoSSGA.cpp | 4 +- eo/test/t-eoSelect.cpp | 50 ++-- eo/test/t-eoStateAndParser.cpp | 20 +- eo/test/t-eoSymreg.cpp | 14 +- eo/test/t-eoUniform.cpp | 6 +- eo/test/t-eoVector.cpp | 6 +- eo/test/t-eoVirus.cpp | 16 +- eo/test/t-eobin.cpp | 88 +++--- eo/test/t-eobreeder.cpp | 8 +- eo/test/t-eofitness.cpp | 46 +-- eo/test/t-eogeneration.cpp | 22 +- eo/test/t-eoinclusion.cpp | 32 +-- eo/test/t-eoinsertion.cpp | 32 +-- eo/test/t-eolottery.cpp | 8 +- eo/test/t-eoproblem.cpp | 10 +- eo/test/t-selectOne.cpp | 10 +- eo/tutorial/Lesson1/FirstBitGA.cpp | 3 + eo/tutorial/Lesson1/FirstRealGA.cpp | 3 + eo/tutorial/Lesson1/exercise1.3.cpp | 2 + eo/tutorial/Lesson2/FirstBitEA.cpp | 3 + eo/tutorial/Lesson2/FirstRealEA.cpp | 3 + eo/tutorial/Lesson2/binary_value.h | 2 +- eo/tutorial/Lesson2/exercise2.3.cpp | 2 + eo/tutorial/Lesson3/SecondBitEA.cpp | 3 + eo/tutorial/Lesson3/SecondRealEA.cpp | 3 + eo/tutorial/Lesson3/binary_value.h | 2 +- eo/tutorial/Lesson3/exercise3.1.cpp | 2 + eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp | 2 + .../ParadisEO/Lesson1/IslandBitEA1.cpp | 2 + .../ParadisEO/Lesson1/IslandBitEA2.cpp | 2 + eo/tutorial/ParadisEO/Lesson1/binary_value.h | 2 +- 263 files changed, 2009 insertions(+), 1976 deletions(-) diff --git a/eo/app/mastermind/mastermind.cpp b/eo/app/mastermind/mastermind.cpp index 0db39120f..25ee725bb 100644 --- a/eo/app/mastermind/mastermind.cpp +++ b/eo/app/mastermind/mastermind.cpp @@ -10,6 +10,8 @@ #include // all usefull eo stuff #include "mastermind.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator +using namespace std; + //----------------------------------------------------------------------------- // global variables //----------------------------------------------------------------------------- diff --git a/eo/app/mastermind/mastermind.h b/eo/app/mastermind/mastermind.h index 82495a3d4..59d2cd747 100644 --- a/eo/app/mastermind/mastermind.h +++ b/eo/app/mastermind/mastermind.h @@ -23,7 +23,7 @@ typedef float phenotype; // genotype //----------------------------------------------------------------------------- -typedef vector genotype; +typedef std::vector genotype; //----------------------------------------------------------------------------- // Chrom @@ -67,12 +67,12 @@ phenotype eoChromEvaluator(const Chrom& chrom) const unsigned default_length = 8; const unsigned default_colors = 8; -const string default_solution = "01234567"; +const std::string default_solution = "01234567"; unsigned num_colors; -void init_eoChromEvaluator(const unsigned& c, const unsigned& l, string s) +void init_eoChromEvaluator(const unsigned& c, const unsigned& l, std::string s) { num_colors = c; @@ -82,14 +82,14 @@ void init_eoChromEvaluator(const unsigned& c, const unsigned& l, string s) // check length if (l != default_length && s.size() != l) { - cerr << "solution length != length" << endl; + std::cerr << "solution length != length" << std::endl; exit(EXIT_FAILURE); } // check number of colors if (c != default_colors && c < *max_element(s.begin(), s.end()) - '0') { - cerr << "too high color number found!" << endl; + std::cerr << "too high color number found!" << std::endl; exit(EXIT_FAILURE); } } @@ -160,12 +160,12 @@ class eoChromMutation: public eoMonOp case 1: { // transposition - swap(chrom[position()], chrom[position()]); + std::swap(chrom[position()], chrom[position()]); break; } default: { - cerr << "unknown operator!" << endl; + std::cerr << "unknown operator!" << std::endl; exit(EXIT_FAILURE); break; } diff --git a/eo/configure.in b/eo/configure.in index 1fcca74b3..90de61241 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,5 +34,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile src/do/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) diff --git a/eo/contrib/MGE/VirusOp.h b/eo/contrib/MGE/VirusOp.h index b0ee6cba2..5d8459c46 100644 --- a/eo/contrib/MGE/VirusOp.h +++ b/eo/contrib/MGE/VirusOp.h @@ -18,7 +18,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-12-03 16:28:30 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/VirusOp.h,v 1.2 2001-12-03 16:28:30 evomarc Exp $ $Author: evomarc $ +CVS Info: $Date: 2003-02-27 19:26:43 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/VirusOp.h,v 1.3 2003-02-27 19:26:43 okoenig Exp $ $Author: okoenig $ */ #ifndef VirusOp_h @@ -28,7 +28,7 @@ CVS Info: $Date: 2001-12-03 16:28:30 $ $Header: /home/nojhan/dev/eodev/eodev_cvs #include // ostream, istream #include // bind2nd -#include // string +#include // std::string #include #include "../contrib/MGE/eoVirus.h" @@ -40,7 +40,7 @@ template class VirusBitFlip: public eoMonOp > { public: /// The class name. - virtual string className() const { return "VirusBitFlip"; }; + virtual std::string className() const { return "VirusBitFlip"; }; /** * Change one bit. @@ -57,7 +57,7 @@ template class VirusMutation: public eoMonOp > { public: /// The class name. - virtual string className() const { return "VirusMutation"; }; + virtual std::string className() const { return "VirusMutation"; }; /** * Change one bit. @@ -65,7 +65,7 @@ class VirusMutation: public eoMonOp > { */ bool operator()(eoVirus& _chrom) { // Search for virus bits - vector bitsSet; + std::vector bitsSet; for ( unsigned i = 0; i < _chrom.size(); i ++ ) { if ( _chrom.virusBit(i) ) { bitsSet.push_back( i ); @@ -90,7 +90,7 @@ class VirusShiftMutation: public eoMonOp > { VirusShiftMutation( ) {}; /// The class name. - virtual string className() const { return "VirusShiftMutation"; }; + virtual std::string className() const { return "VirusShiftMutation"; }; /** * Change one bit. @@ -125,7 +125,7 @@ template class VirusTransmission: public eoBinOp > { public: /// The class name. - virtual string className() const { return "VirusTransmission"; }; + virtual std::string className() const { return "VirusTransmission"; }; /** * Change one bit. diff --git a/eo/contrib/MGE/eoVirus.h b/eo/contrib/MGE/eoVirus.h index d49af26cf..720e2edad 100644 --- a/eo/contrib/MGE/eoVirus.h +++ b/eo/contrib/MGE/eoVirus.h @@ -18,7 +18,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr -CVS Info: $Date: 2001-05-17 10:08:25 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/eoVirus.h,v 1.1 2001-05-17 10:08:25 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2003-02-27 19:26:44 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/eoVirus.h,v 1.2 2003-02-27 19:26:44 okoenig Exp $ $Author: okoenig $ */ #ifndef eoVirus_h @@ -28,7 +28,7 @@ CVS Info: $Date: 2001-05-17 10:08:25 $ $Header: /home/nojhan/dev/eodev/eodev_cvs #include // ostream, istream #include // bind2nd -#include // string +#include // std::string #include @@ -49,13 +49,13 @@ template class eoVirus: public eoBit /** * (Default) Constructor. - * @param size Size of the binary string. + * @param size Size of the binary std::string. */ eoVirus(unsigned _size = 0, bool _value = false, bool _virValue = false): eoBit(_size, _value), virus( _size, _virValue) {} /// My class name. - virtual string className() const { + virtual std::string className() const { return "eoVirus"; } @@ -78,33 +78,33 @@ template class eoVirus: public eoBit * To print me on a stream. * @param os The ostream. */ - virtual void printOn(ostream& os) const { + virtual void printOn(std::ostream& os) const { EO::printOn(os); os << ' '; os << size() << ' '; - copy(begin(), end(), ostream_iterator(os)); - cout << endl; - copy(virus.begin(), virus.end(), ostream_iterator(os)); + std::copy(begin(), end(), std::ostream_iterator(os)); + std::cout << std::endl; + std::copy(virus.begin(), virus.end(), std::ostream_iterator(os)); } /** * To read me from a stream. * @param is The istream. */ - virtual void readFrom(istream& is){ + virtual void readFrom(std::istream& is){ eoBit::readFrom(is); unsigned s; is >> s; - string bits; + std::string bits; is >> bits; if (is) { virus.resize(bits.size()); - transform(bits.begin(), bits.end(), virus.begin(), - bind2nd(equal_to(), '1')); + std::transform(bits.begin(), bits.end(), virus.begin(), + std::bind2nd(std::equal_to(), '1')); } } private: - vector virus; + std::vector virus; }; //----------------------------------------------------------------------------- diff --git a/eo/contrib/eoAged.h b/eo/contrib/eoAged.h index 3211791df..c4c02fc3f 100644 --- a/eo/contrib/eoAged.h +++ b/eo/contrib/eoAged.h @@ -29,7 +29,7 @@ //----------------------------------------------------------------------------- #include // istream, ostream -#include // para string +#include // para std::string using namespace std; @@ -71,7 +71,7 @@ class eoAged: public Object it's got code as an example of implementation. Only "leaf" classes can be non-virtual. */ - virtual string className() const { return string("eoAged")+Object::className(); }; + virtual std::string className() const { return std::string("eoAged")+Object::className(); }; /** * Read object. diff --git a/eo/src/EO.h b/eo/src/EO.h index 7613d91c6..fae793ae7 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -27,7 +27,7 @@ //----------------------------------------------------------------------------- -#include // runtime_error +#include // std::runtime_error #include // eoObject #include // eoPersistent @@ -59,7 +59,7 @@ public: /// Return fitness value. Fitness fitness() const { if (invalid()) - throw runtime_error("invalid fitness"); + throw std::runtime_error("invalid fitness"); return repFitness; } @@ -90,23 +90,23 @@ public: //@{ /** Return the class id. - * @return the class name as a string + * @return the class name as a std::string */ - virtual string className() const { return "EO"; } + virtual std::string className() const { return "EO"; } /** * Read object.\\ * Calls base class, just in case that one had something to do. * The read and print methods should be compatible and have the same format. * In principle, format is "plain": they just print a number - * @param _is a istream. - * @throw runtime_exception If a valid object can't be read. + * @param _is a std::istream. + * @throw runtime_std::exception If a valid object can't be read. */ - virtual void readFrom(istream& _is) { + virtual void readFrom(std::istream& _is) { // the new version of the reafFrom function. // It can distinguish between valid and invalid fitness values. - string fitness_str; + std::string fitness_str; int pos = _is.tellg(); _is >> fitness_str; @@ -124,9 +124,9 @@ public: /** * Write object. Called printOn since it prints the object _on_ a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const { + virtual void printOn(std::ostream& _os) const { // the latest version of the code. Very similar to the old code diff --git a/eo/src/apply.h b/eo/src/apply.h index f376a91e7..54cf162ee 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -30,7 +30,7 @@ #include /** - Applies a unary function to a vector of things. + Applies a unary function to a std::vector of things. */ template void apply(eoUF& _proc, std::vector& _pop) diff --git a/eo/src/do/make_algo_easea.h b/eo/src/do/make_algo_easea.h index 605264b9a..cbcb9960a 100644 --- a/eo/src/do/make_algo_easea.h +++ b/eo/src/do/make_algo_easea.h @@ -77,40 +77,40 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // the selection eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t), Sequential(ordered/unordered) or EliteSequentialSelect", 'S', "Evolution Engine"); - eoParamParamType & ppSelect = selectionParam.value(); // pair > + eoParamParamType & ppSelect = selectionParam.value(); // std::pair > eoSelectOne* select ; - if (ppSelect.first == string("DetTour")) + if (ppSelect.first == std::string("DetTour")) { unsigned detSize; if (!ppSelect.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; detSize = 2; // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(string("2")); + ppSelect.second.push_back(std::string("2")); } else // parameter passed by user as DetTour(T) detSize = atoi(ppSelect.second[0].c_str()); select = new eoDetTournamentSelect(detSize); } - else if (ppSelect.first == string("StochTour")) + else if (ppSelect.first == std::string("StochTour")) { double p; if (!ppSelect.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; p = 1; // put back p in parameter for consistency (and status file) - ppSelect.second.push_back(string("1")); + ppSelect.second.push_back(std::string("1")); } else // parameter passed by user as DetTour(T) p = atof(ppSelect.second[0].c_str()); select = new eoStochTournamentSelect(p); } - else if (ppSelect.first == string("Ranking")) + else if (ppSelect.first == std::string("Ranking")) { double p,e; if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent @@ -120,69 +120,69 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc } else if (ppSelect.second.size()==1) // 1 parameter: pressure { - cerr << "WARNING, no exponent to Ranking, using 1" << endl; + std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; e = 1; - ppSelect.second.push_back(string("1")); + ppSelect.second.push_back(std::string("1")); p = atof(ppSelect.second[0].c_str()); } else // no parameters ... or garbage { - cerr << "WARNING, no parameter to Ranking, using (2,1)" << endl; + std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; p=2; e=1; // put back in parameter for consistency (and status file) ppSelect.second.resize(2); // just in case - ppSelect.second[0] = (string("2")); - ppSelect.second[1] = (string("1")); + ppSelect.second[0] = (std::string("2")); + ppSelect.second[1] = (std::string("1")); } // check for authorized values // pressure in (0,1] if ( (p<=1) || (p>2) ) { - cerr << "WARNING, selective pressure must be in (1,2] in Ranking, using 2\n"; + std::cerr << "WARNING, selective pressure must be in (1,2] in Ranking, using 2\n"; p=2; - ppSelect.second[0] = (string("2")); + ppSelect.second[0] = (std::string("2")); } // exponent >0 if (e<=0) { - cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; e=1; - ppSelect.second[1] = (string("1")); + ppSelect.second[1] = (std::string("1")); } // now we're OK eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); select = new eoRouletteWorthSelect(p2w); } - else if (ppSelect.first == string("Sequential")) // one after the other + else if (ppSelect.first == std::string("Sequential")) // one after the other { bool b; if (ppSelect.second.size() == 0) // no argument -> default = ordered { b=true; // put back in parameter for consistency (and status file) - ppSelect.second.push_back(string("ordered")); + ppSelect.second.push_back(std::string("ordered")); } else - b = !(ppSelect.second[0] == string("unordered")); + b = !(ppSelect.second[0] == std::string("unordered")); select = new eoSequentialSelect(b); } - else if (ppSelect.first == string("EliteSequential")) // Best first, one after the other in random order afterwards + else if (ppSelect.first == std::string("EliteSequential")) // Best first, one after the other in random order afterwards { select = new eoEliteSequentialSelect; } - else if (ppSelect.first == string("Roulette")) // no argument (yet) + else if (ppSelect.first == std::string("Roulette")) // no argument (yet) { select = new eoProportionalSelect; } - else if (ppSelect.first == string("Random")) // no argument + else if (ppSelect.first == std::string("Random")) // no argument { select = new eoRandomSelect; } else { - string stmp = string("Invalid selection: ") + ppSelect.first; - throw runtime_error(stmp.c_str()); + std::string stmp = std::string("Invalid selection: ") + ppSelect.first; + throw std::runtime_error(stmp.c_str()); } _state.storeFunctor(select); @@ -228,7 +228,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // first, separate G3 and MGG // maybe one day we have a common class - but is it really necessary??? - if (replacementParam.first == string("G3")) + if (replacementParam.first == std::string("G3")) { // reduce the parents: by default, survive parents = -2 === 2 parents die eoHowMany surviveParents = _parser.createParam(eoHowMany(-2,false), "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); @@ -236,7 +236,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc ptReplace = new eoG3Replacement(-surviveParents); // must receive nb of eliminated parets! _state.storeFunctor(ptReplace); } - else if (replacementParam.first == string("MGG")) + else if (replacementParam.first == std::string("MGG")) { float t; unsigned tSize; @@ -245,10 +245,10 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // the tournament size if (!replacementParam.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to MGG replacement, using 2" << endl; + std::cerr << "WARNING, no parameter passed to MGG replacement, using 2" << std::endl; tSize = 2; // put back 2 in parameter for consistency (and status file) - replacementParam.second.push_back(string("2")); + replacementParam.second.push_back(std::string("2")); } else { @@ -259,7 +259,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc } else { - throw runtime_error("Sorry, only deterministic tournament available at the moment"); + throw std::runtime_error("Sorry, only deterministic tournament available at the moment"); } } ptReplace = new eoMGGReplacement(-surviveParents, tSize); @@ -280,58 +280,58 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc double t; // ---------- General - if (replacementParam.first == string("General")) + if (replacementParam.first == std::string("General")) { ; // defaults OK } // ---------- ESComma - else if (replacementParam.first == string("ESComma")) + else if (replacementParam.first == std::string("ESComma")) { ; // OK too } // ---------- ESPlus - else if (replacementParam.first == string("ESPlus")) + else if (replacementParam.first == std::string("ESPlus")) { surviveParents = eoHowMany(1.0); } // ---------- Generational - else if (replacementParam.first == string("Generational")) + else if (replacementParam.first == std::string("Generational")) { ; // OK too (we should check nb of offspring) } // ---------- EP - else if (replacementParam.first == string("EP")) + else if (replacementParam.first == std::string("EP")) { if (!replacementParam.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to EP replacement, using 6" << endl; + std::cerr << "WARNING, no parameter passed to EP replacement, using 6" << std::endl; // put back 6 in parameter for consistency (and status file) - replacementParam.second.push_back(string("6")); + replacementParam.second.push_back(std::string("6")); } // by coincidence, the syntax for the EP reducer is the same than here: reduceFinalType = replacementParam; surviveParents = eoHowMany(1.0); } // ---------- SSGA - else if (replacementParam.first == string("SSGA")) + else if (replacementParam.first == std::string("SSGA")) { if (!replacementParam.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to SSGA replacement, using 2" << endl; + std::cerr << "WARNING, no parameter passed to SSGA replacement, using 2" << std::endl; // put back 2 in parameter for consistency (and status file) - replacementParam.second.push_back(string("2")); - reduceParentType = eoParamParamType(string("DetTour(2)")); + replacementParam.second.push_back(std::string("2")); + reduceParentType = eoParamParamType(std::string("DetTour(2)")); } else { t = atof(replacementParam.second[0].c_str()); if (t>=2) { // build the appropriate deafult value - reduceParentType = eoParamParamType(string("DetTour(") + replacementParam.second[0].c_str() + ")"); + reduceParentType = eoParamParamType(std::string("DetTour(") + replacementParam.second[0].c_str() + ")"); } else // check for [0.5,1] will be made in make_general_replacement { // build the appropriate deafult value - reduceParentType = eoParamParamType(string("StochTour(") + replacementParam.second[0].c_str() + ")"); + reduceParentType = eoParamParamType(std::string("StochTour(") + replacementParam.second[0].c_str() + ")"); } } // @@ -340,7 +340,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc } else // no replacement recognized { - throw runtime_error("Invalid replacement type " + replacementParam.first); + throw std::runtime_error("Invalid replacement type " + replacementParam.first); } ptReplace = & make_general_replacement( diff --git a/eo/src/do/make_algo_pareto.h b/eo/src/do/make_algo_pareto.h index 223aed6c7..726fa8349 100644 --- a/eo/src/do/make_algo_pareto.h +++ b/eo/src/do/make_algo_pareto.h @@ -47,7 +47,7 @@ class eoNDPlusReplacement : public eoReplacement public: eoNDPlusReplacement(eoPerf2Worth& _perf2worth) : perf2worth(_perf2worth) {} - struct WorthPair : public pair + struct WorthPair : public std::pair { bool operator<(const WorthPair& other) const { return other.first < first; } }; @@ -96,14 +96,14 @@ template eoAlgo & do_make_algo_pareto(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) { // the selection - string & selStr = _parser.createParam(string("NSGA-II"), "selCrit", "Pareto Selection Criterion: NSGA, NSGA-II, ParetoRanking", 'S', "Evolution Engine").value(); + std::string & selStr = _parser.createParam(std::string("NSGA-II"), "selCrit", "Pareto Selection Criterion: NSGA, NSGA-II, ParetoRanking", 'S', "Evolution Engine").value(); double nicheSize = _parser.createParam(1.0, "nicheSize", "Size of niche for NSGA-I", '\0', "Evolution Engine").value(); eoPerf2Worth *p2w; - if ( (selStr == string("NSGA")) || (selStr == string("NSGA-I") ) ) + if ( (selStr == std::string("NSGA")) || (selStr == std::string("NSGA-I") ) ) p2w = new eoNDSorting_I(nicheSize); - else if (selStr == string("NSGA-II")) + else if (selStr == std::string("NSGA-II")) p2w = new eoNDSorting_II(); - else if (selStr == string("ParetoRanking")) + else if (selStr == std::string("ParetoRanking")) { eoDominanceMap& dominance = _state.storeFunctor(new eoDominanceMap); p2w = new eoParetoRanking(dominance); @@ -116,64 +116,64 @@ eoAlgo & do_make_algo_pareto(eoParser& _parser, eoState& _state, eoEvalFunc // only the ranking is not re-implemented (yet?) eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Random", 'S', "Evolution Engine"); - eoParamParamType & ppSelect = selectionParam.value(); // pair > + eoParamParamType & ppSelect = selectionParam.value(); // std::pair > eoSelectOne* select ; - if (ppSelect.first == string("DetTour")) + if (ppSelect.first == std::string("DetTour")) { unsigned detSize; if (!ppSelect.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; detSize = 2; // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(string("2")); + ppSelect.second.push_back(std::string("2")); } else // parameter passed by user as DetTour(T) detSize = atoi(ppSelect.second[0].c_str()); select = new eoDetTournamentWorthSelect(*p2w, detSize); } - else if (ppSelect.first == string("StochTour")) + else if (ppSelect.first == std::string("StochTour")) { double p; if (!ppSelect.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; p = 1; // put back p in parameter for consistency (and status file) - ppSelect.second.push_back(string("1")); + ppSelect.second.push_back(std::string("1")); } else // parameter passed by user as DetTour(T) p = atof(ppSelect.second[0].c_str()); select = new eoStochTournamentWorthSelect(*p2w, p); } -// else if (ppSelect.first == string("Sequential")) // one after the other +// else if (ppSelect.first == std::string("Sequential")) // one after the other // { // bool b; // if (ppSelect.second.size() == 0) // no argument -> default = ordered // { // b=true; // // put back in parameter for consistency (and status file) -// ppSelect.second.push_back(string("ordered")); +// ppSelect.second.push_back(std::string("ordered")); // } // else -// b = !(ppSelect.second[0] == string("unordered")); +// b = !(ppSelect.second[0] == std::string("unordered")); // select = new eoSequentialWorthSelect(b); // } - else if (ppSelect.first == string("Roulette")) // no argument (yet) + else if (ppSelect.first == std::string("Roulette")) // no argument (yet) { select = new eoRouletteWorthSelect(*p2w); } - else if (ppSelect.first == string("Random")) // no argument, no perf2Worth + else if (ppSelect.first == std::string("Random")) // no argument, no perf2Worth { select = new eoRandomSelect; } else { - string stmp = string("Invalid selection: ") + ppSelect.first; - throw runtime_error(stmp.c_str()); + std::string stmp = std::string("Invalid selection: ") + ppSelect.first; + throw std::runtime_error(stmp.c_str()); } _state.storeFunctor(select); diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 7ec834bf0..6500492e5 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -76,40 +76,40 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // the selection eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); - eoParamParamType & ppSelect = selectionParam.value(); // pair > + eoParamParamType & ppSelect = selectionParam.value(); // std::pair > eoSelectOne* select ; - if (ppSelect.first == string("DetTour")) + if (ppSelect.first == std::string("DetTour")) { unsigned detSize; if (!ppSelect.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; detSize = 2; // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(string("2")); + ppSelect.second.push_back(std::string("2")); } else // parameter passed by user as DetTour(T) detSize = atoi(ppSelect.second[0].c_str()); select = new eoDetTournamentSelect(detSize); } - else if (ppSelect.first == string("StochTour")) + else if (ppSelect.first == std::string("StochTour")) { double p; if (!ppSelect.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; p = 1; // put back p in parameter for consistency (and status file) - ppSelect.second.push_back(string("1")); + ppSelect.second.push_back(std::string("1")); } else // parameter passed by user as DetTour(T) p = atof(ppSelect.second[0].c_str()); select = new eoStochTournamentSelect(p); } - else if (ppSelect.first == string("Ranking")) + else if (ppSelect.first == std::string("Ranking")) { double p,e; if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent @@ -119,65 +119,65 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc } else if (ppSelect.second.size()==1) // 1 parameter: pressure { - cerr << "WARNING, no exponent to Ranking, using 1" << endl; + std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; e = 1; - ppSelect.second.push_back(string("1")); + ppSelect.second.push_back(std::string("1")); p = atof(ppSelect.second[0].c_str()); } else // no parameters ... or garbage { - cerr << "WARNING, no parameter to Ranking, using (2,1)" << endl; + std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; p=2; e=1; // put back in parameter for consistency (and status file) ppSelect.second.resize(2); // just in case - ppSelect.second[0] = (string("2")); - ppSelect.second[1] = (string("1")); + ppSelect.second[0] = (std::string("2")); + ppSelect.second[1] = (std::string("1")); } // check for authorized values // pressure in (0,1] if ( (p<=1) || (p>2) ) { - cerr << "WARNING, selective pressure must be in (0,1] in Ranking, using 2\n"; + std::cerr << "WARNING, selective pressure must be in (0,1] in Ranking, using 2\n"; p=2; - ppSelect.second[0] = (string("2")); + ppSelect.second[0] = (std::string("2")); } // exponent >0 if (e<=0) { - cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; e=1; - ppSelect.second[1] = (string("1")); + ppSelect.second[1] = (std::string("1")); } // now we're OK eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); select = new eoRouletteWorthSelect(p2w); } - else if (ppSelect.first == string("Sequential")) // one after the other + else if (ppSelect.first == std::string("Sequential")) // one after the other { bool b; if (ppSelect.second.size() == 0) // no argument -> default = ordered { b=true; // put back in parameter for consistency (and status file) - ppSelect.second.push_back(string("ordered")); + ppSelect.second.push_back(std::string("ordered")); } else - b = !(ppSelect.second[0] == string("unordered")); + b = !(ppSelect.second[0] == std::string("unordered")); select = new eoSequentialSelect(b); } - else if (ppSelect.first == string("Roulette")) // no argument (yet) + else if (ppSelect.first == std::string("Roulette")) // no argument (yet) { select = new eoProportionalSelect; } - else if (ppSelect.first == string("Random")) // no argument + else if (ppSelect.first == std::string("Random")) // no argument { select = new eoRandomSelect; } else { - string stmp = string("Invalid selection: ") + ppSelect.first; - throw runtime_error(stmp.c_str()); + std::string stmp = std::string("Invalid selection: ") + ppSelect.first; + throw std::runtime_error(stmp.c_str()); } _state.storeFunctor(select); @@ -188,62 +188,62 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // the replacement eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)", 'R', "Evolution Engine"); - eoParamParamType & ppReplace = replacementParam.value(); // pair > + eoParamParamType & ppReplace = replacementParam.value(); // std::pair > eoReplacement* replace ; - if (ppReplace.first == string("Comma")) // Comma == generational + if (ppReplace.first == std::string("Comma")) // Comma == generational { replace = new eoCommaReplacement; } - else if (ppReplace.first == string("Plus")) + else if (ppReplace.first == std::string("Plus")) { replace = new eoPlusReplacement; } - else if (ppReplace.first == string("EPTour")) + else if (ppReplace.first == std::string("EPTour")) { unsigned detSize; if (!ppReplace.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to EPTour, using 6" << endl; + std::cerr << "WARNING, no parameter passed to EPTour, using 6" << std::endl; detSize = 6; // put back in parameter for consistency (and status file) - ppReplace.second.push_back(string("6")); + ppReplace.second.push_back(std::string("6")); } else // parameter passed by user as EPTour(T) detSize = atoi(ppSelect.second[0].c_str()); replace = new eoEPReplacement(detSize); } - else if (ppReplace.first == string("SSGAWorst")) + else if (ppReplace.first == std::string("SSGAWorst")) { replace = new eoSSGAWorseReplacement; } - else if (ppReplace.first == string("SSGADet")) + else if (ppReplace.first == std::string("SSGADet")) { unsigned detSize; if (!ppReplace.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to SSGADet, using 2" << endl; + std::cerr << "WARNING, no parameter passed to SSGADet, using 2" << std::endl; detSize = 2; // put back in parameter for consistency (and status file) - ppReplace.second.push_back(string("2")); + ppReplace.second.push_back(std::string("2")); } else // parameter passed by user as SSGADet(T) detSize = atoi(ppSelect.second[0].c_str()); replace = new eoSSGADetTournamentReplacement(detSize); } - else if (ppReplace.first == string("SSGAStoch")) + else if (ppReplace.first == std::string("SSGAStoch")) { double p; if (!ppReplace.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to SSGAStoch, using 1" << endl; + std::cerr << "WARNING, no parameter passed to SSGAStoch, using 1" << std::endl; p = 1; // put back in parameter for consistency (and status file) - ppReplace.second.push_back(string("1")); + ppReplace.second.push_back(std::string("1")); } else // parameter passed by user as SSGADet(T) p = atof(ppSelect.second[0].c_str()); @@ -252,8 +252,8 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc } else { - string stmp = string("Invalid replacement: ") + ppReplace.first; - throw runtime_error(stmp.c_str()); + std::string stmp = std::string("Invalid replacement: ") + ppReplace.first; + throw std::runtime_error(stmp.c_str()); } _state.storeFunctor(replace); diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 176c476b5..0ee6f1296 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -66,7 +66,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval checkpoint->add(*generationCounter); // dir for DISK output - eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + eoValueParam& dirNameParam = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); // shoudl we empty it if exists eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); bool dirOK = false; // not tested yet @@ -79,9 +79,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval * * eoBestFitnessStat : best value in pop - type EOT::Fitness * eoAverageStat : average value in pop - type EOT::Fitness - * eoSecondMomentStat: average + stdev - type pair - * eoSortedPopStat : whole population - type string (!!) - * eoScalarFitnessStat: the fitnesses - type vector + * eoSecondMomentStat: average + stdev - type std::pair + * eoSortedPopStat : whole population - type std::string (!!) + * eoScalarFitnessStat: the fitnesses - type std::vector */ // Best fitness in population @@ -188,9 +188,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if (fileBestParam.value()) // A file monitor for best & secondMoment { #ifdef _MSVC - string stmp = dirNameParam.value() + "\best.xg"; + std::string stmp = dirNameParam.value() + "\best.xg"; #else - string stmp = dirNameParam.value() + "/best.xg"; + std::string stmp = dirNameParam.value() + "/best.xg"; #endif eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); // save and give to checkpoint @@ -201,7 +201,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval fileMonitor->add(_eval); if (tCounter) // we want the time as well { - // cout << "On met timecounter\n"; + // std::cout << "On met timecounter\n"; fileMonitor->add(*tCounter); } fileMonitor->add(*bestStat); @@ -211,7 +211,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval #if !defined(NO_GNUPLOT) if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average { - string stmp = dirNameParam.value() + "/gnu_best.xg"; + std::string stmp = dirNameParam.value() + "/gnu_best.xg"; eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); // save and give to checkpoint _state.storeFunctor(gnuMonitor); @@ -236,7 +236,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // a gnuplot-based monitor for snapshots: needs a dir name eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); _state.storeFunctor(fitSnapshot); - // add any stat that is a vector to it + // add any stat that is a std::vector to it fitSnapshot->add(*fitStat); // and of course add it to the checkpoint checkpoint->add(*fitSnapshot); @@ -259,9 +259,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); #ifdef _MSVC - string stmp = dirNameParam.value() + "\generations"; + std::string stmp = dirNameParam.value() + "\generations"; #else - string stmp = dirNameParam.value() + "/generations"; + std::string stmp = dirNameParam.value() + "/generations"; #endif eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); _state.storeFunctor(stateSaver1); @@ -277,9 +277,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE #ifdef _MSVC - string stmp = dirNameParam.value() + "\time"; + std::string stmp = dirNameParam.value() + "\time"; #else - string stmp = dirNameParam.value() + "/time"; + std::string stmp = dirNameParam.value() + "/time"; #endif eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h index fc8792f2d..d198c9dd7 100644 --- a/eo/src/do/make_checkpoint_FDC.h +++ b/eo/src/do/make_checkpoint_FDC.h @@ -62,7 +62,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval _state.storeFunctor(increment); // dir for DISK output - eoValueParam& dirNameParam = _parser.createParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + eoValueParam& dirNameParam = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); // shoudl we empty it if exists eoValueParam& eraseParam = _parser.createParam(false, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); bool dirOK = false; // not tested yet @@ -75,9 +75,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval * * eoBestFitnessStat : best value in pop - type EOT::Fitness * eoAverageStat : average value in pop - type EOT::Fitness - * eoSecondMomentStat: average + stdev - type pair - * eoSortedPopStat : whole population - type string (!!) - * eoScalarFitnessStat: the fitnesses - type vector + * eoSecondMomentStat: average + stdev - type std::pair + * eoSortedPopStat : whole population - type std::string (!!) + * eoScalarFitnessStat: the fitnesses - type std::vector * eoDFCSTat : FDC wrt best in pop or absolute best - type double * requires an eoDistance. See eoFDCStat.h * also computes all elements for the FDC scatter plot @@ -199,7 +199,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if (fileBestParam.value()) // A file monitor for best & secondMoment { - string stmp = dirNameParam.value() + "/best.xg"; + std::string stmp = dirNameParam.value() + "/best.xg"; eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); // save and give to checkpoint _state.storeFunctor(fileMonitor); @@ -213,7 +213,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average { - string stmp = dirNameParam.value() + "_gnu_best.xg"; + std::string stmp = dirNameParam.value() + "_gnu_best.xg"; eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); // save and give to checkpoint _state.storeFunctor(gnuMonitor); @@ -250,7 +250,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // a gnuplot-based monitor for snapshots: needs a dir name eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); _state.storeFunctor(fitSnapshot); - // add any stat that is a vector to it + // add any stat that is a std::vector to it fitSnapshot->add(*fitStat); // and of course add it to the checkpoint checkpoint->add(*fitSnapshot); @@ -271,7 +271,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); - string stmp = dirNameParam.value() + "/generations"; + std::string stmp = dirNameParam.value() + "/generations"; eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); _state.storeFunctor(stateSaver1); checkpoint->add(*stateSaver1); @@ -285,7 +285,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if (! dirOK ) dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE - string stmp = dirNameParam.value() + "/time"; + std::string stmp = dirNameParam.value() + "/time"; eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); checkpoint->add(*stateSaver2); diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h index 4acd0295b..37ab768f1 100644 --- a/eo/src/do/make_checkpoint_pareto.h +++ b/eo/src/do/make_checkpoint_pareto.h @@ -69,7 +69,7 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, checkpoint.add(increment); // dir for DISK output - string & dirName = _parser.getORcreateParam(string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value(); + std::string & dirName = _parser.getORcreateParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value(); // shoudl we empty it if exists eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); bool dirOK = false; // not tested yet @@ -80,22 +80,22 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, /** * existing stats for Pareto as of today, Jan. 31. 2002 * - * eoSortedPopStat : whole population - type string (!!) + * eoSortedPopStat : whole population - type std::string (!!) */ - eoValueParam& fPlotParam = _parser.createParam(eoParamParamType("1(0,1)"), "frontFileFrequency", "File save frequency in objective spaces (pairs of comma-separated objectives in 1 single parentheses pair)", '\0', "Output - Disk"); + eoValueParam& fPlotParam = _parser.createParam(eoParamParamType("1(0,1)"), "frontFileFrequency", "File save frequency in objective spaces (std::pairs of comma-separated objectives in 1 single parentheses std::pair)", '\0', "Output - Disk"); #if !defined(NO_GNUPLOT) bool boolGnuplot = _parser.createParam(false, "plotFront", "Objective plots (requires corresponding files - see frontFileFrequency", '\0', "Output - Graphical").value(); #endif - eoParamParamType & fPlot = fPlotParam.value(); // pair > + eoParamParamType & fPlot = fPlotParam.value(); // std::pair > unsigned frequency = atoi(fPlot.first.c_str()); if (frequency) // something to plot { unsigned nbPlot = fPlot.second.size(); if ( nbPlot % 2 ) // odd! - throw runtime_error("Odd number of front description in make_checkpoint_pareto"); + throw std::runtime_error("Odd number of front description in make_checkpoint_pareto"); // only create the necessary stats std::vector bStat(nObj, false); // track of who's already there @@ -110,8 +110,8 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, if (!bStat[obj1]) // not already there: create it { char s[1024]; - ostrstream os(s, 1022); - os << "Obj. " << obj1 << ends; + std::ostrstream os(s, 1022); + os << "Obj. " << obj1 << std::ends; fStat = new eoMOFitnessStat(obj1, s); _state.storeFunctor(fStat); bStat[obj1]=true; @@ -121,8 +121,8 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, if (!bStat[obj2]) // not already there: create it { char s2[1024]; - ostrstream os2(s2, 1022); - os2 << "Obj. " << obj2 << ends; + std::ostrstream os2(s2, 1022); + os2 << "Obj. " << obj2 << std::ends; fStat = new eoMOFitnessStat(obj2, s2); _state.storeFunctor(fStat); bStat[obj2]=true; @@ -132,8 +132,8 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, // then the fileSnapshots char s3[1024]; - ostrstream os3(s3, 1022); - os3 << "Front." << obj1 << "." << obj2 << "." << ends; + std::ostrstream os3(s3, 1022); + os3 << "Front." << obj1 << "." << obj2 << "." << std::ends; eoFileSnapshot & snapshot = _state.storeFunctor(new eoFileSnapshot(dirName, frequency, s3 ) ); @@ -160,7 +160,7 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, eoSortedPopStat * popStat; if ( printPop ) // we do want pop dump { - cout << "On cree printpop\n"; + std::cout << "On cree printpop\n"; popStat = & _state.storeFunctor(new eoSortedPopStat); // add it to the checkpoint checkpoint.add(*popStat); @@ -205,9 +205,9 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); #ifdef _MSVC - string stmp = dirName + "\generations"; + std::string stmp = dirName + "\generations"; #else - string stmp = dirName + "/generations"; + std::string stmp = dirName + "/generations"; #endif eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); _state.storeFunctor(stateSaver1); @@ -223,9 +223,9 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, dirOK = testDirRes(dirName, eraseParam.value()); // TRUE #ifdef _MSVC - string stmp = dirName + "\time"; + std::string stmp = dirName + "\time"; #else - string stmp = dirName + "/time"; + std::string stmp = dirName + "/time"; #endif eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 750df2855..0ae6a9077 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -146,7 +146,7 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu // now check that there is at least one! if (!continuator) - throw runtime_error("You MUST provide a stopping criterion"); + throw std::runtime_error("You MUST provide a stopping criterion"); // OK, it's there: store in the eoState _state.storeFunctor(continuator); diff --git a/eo/src/do/make_continue_pareto.h b/eo/src/do/make_continue_pareto.h index d5b4400dc..364f60574 100644 --- a/eo/src/do/make_continue_pareto.h +++ b/eo/src/do/make_continue_pareto.h @@ -97,7 +97,7 @@ eoContinue & do_make_continue_pareto(eoParser& _parser, eoState& _state, e // now check that there is at least one! if (!continuator) - throw runtime_error("You MUST provide a stopping criterion"); + throw std::runtime_error("You MUST provide a stopping criterion"); // OK, it's there: store in the eoState _state.storeFunctor(continuator); diff --git a/eo/src/do/make_general_replacement.h b/eo/src/do/make_general_replacement.h index 1ae8424e1..9f9aba44b 100644 --- a/eo/src/do/make_general_replacement.h +++ b/eo/src/do/make_general_replacement.h @@ -47,64 +47,64 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) eoReduce * ptReduce; // ---------- Deterministic - if (_ppReduce.first == string("Deterministic")) + if (_ppReduce.first == std::string("Deterministic")) { ptReduce = new eoTruncate; } // ---------- EP - else if (_ppReduce.first == string("EP")) + else if (_ppReduce.first == std::string("EP")) { if (!_ppReduce.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to EP, using 6" << endl; + std::cerr << "WARNING, no parameter passed to EP, using 6" << std::endl; detSize = 6; // put back 6 in parameter for consistency (and status file) - _ppReduce.second.push_back(string("6")); + _ppReduce.second.push_back(std::string("6")); } else // parameter passed by user as EP(T) detSize = atoi(_ppReduce.second[0].c_str()); ptReduce = new eoEPReduce(detSize); } // ---------- DetTour - else if (_ppReduce.first == string("DetTour")) + else if (_ppReduce.first == std::string("DetTour")) { if (!_ppReduce.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; detSize = 2; // put back 2 in parameter for consistency (and status file) - _ppReduce.second.push_back(string("2")); + _ppReduce.second.push_back(std::string("2")); } else // parameter passed by user as DetTour(T) detSize = atoi(_ppReduce.second[0].c_str()); ptReduce = new eoDetTournamentTruncate(detSize); } - else if (_ppReduce.first == string("StochTour")) + else if (_ppReduce.first == std::string("StochTour")) { double p; if (!_ppReduce.second.size()) // no parameter added { - cerr << "WARNING, no parameter passed to StochTour, using 1" << endl; + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; p = 1; // put back p in parameter for consistency (and status file) - _ppReduce.second.push_back(string("1")); + _ppReduce.second.push_back(std::string("1")); } else // parameter passed by user as DetTour(T) { p = atof(_ppReduce.second[0].c_str()); if ( (p<=0.5) || (p>1) ) - throw runtime_error("Stochastic tournament size should be in [0.5,1]"); + throw std::runtime_error("Stochastic tournament size should be in [0.5,1]"); } ptReduce = new eoStochTournamentTruncate(p); } - else if (_ppReduce.first == string("Uniform")) + else if (_ppReduce.first == std::string("Uniform")) { ptReduce = new eoRandomReduce; } else // no known reduction entered { - throw runtime_error("Unknown reducer: " + _ppReduce.first); + throw std::runtime_error("Unknown reducer: " + _ppReduce.first); } // all done, stores and return a reference _state.storeFunctor(ptReduce); @@ -117,7 +117,7 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) * * eoHowMany _elite the number of elite parents (0 = no elitism) * see below - * bool _strongElitism if elite > 0, string elitism or weak elitism + * bool _strongElitism if elite > 0, std::string elitism or weak elitism * strong = elite parents survive, whatever the offspring * weak - elite patents compete AFTER replacement with best offspring * eoHowMany _surviveParents number of parents after parents recuction diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 52892be15..244485df0 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -58,7 +58,7 @@ eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _ini // create an empty pop and let the state handle the memory eoPop& pop = _state.takeOwnership(eoPop()); - eoValueParam& loadNameParam = _parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ); + eoValueParam& loadNameParam = _parser.createParam(std::string(""), "Load","A save file to restart from",'L', "Persistence" ); eoValueParam & recomputeFitnessParam = _parser.createParam(false, "recomputeFitness", "Recompute the fitness after re-loading the pop.?", 'r', "Persistence" ); if (loadNameParam.value() != "") // something to load diff --git a/eo/src/eoCloneOps.h b/eo/src/eoCloneOps.h index 89a91db4f..4af49c626 100644 --- a/eo/src/eoCloneOps.h +++ b/eo/src/eoCloneOps.h @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - CVS Info: $Date: 2001-04-12 16:46:55 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoCloneOps.h,v 1.1 2001-04-12 16:46:55 evomarc Exp $ $Author: evomarc $ + CVS Info: $Date: 2003-02-27 19:26:09 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoCloneOps.h,v 1.2 2003-02-27 19:26:09 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -46,7 +46,7 @@ class eoMonCloneOp: public eoMonOp public: /// Ctor eoMonCloneOp() : eoMonOp() {} - virtual string className() const {return "eoMonCloneOp";} + virtual std::string className() const {return "eoMonCloneOp";} virtual bool operator()(EOT&){return false;} }; @@ -59,7 +59,7 @@ class eoBinCloneOp: public eoBinOp public: /// Ctor eoBinCloneOp() : eoBinOp() {} - virtual string className() const {return "eoBinCloneOp";} + virtual std::string className() const {return "eoBinCloneOp";} virtual bool operator()(EOT&, const EOT&){return false;} }; @@ -71,7 +71,7 @@ class eoQuadCloneOp: public eoQuadOp public: /// Ctor eoQuadCloneOp():eoQuadOp() {} - virtual string className() const {return "eoQuadCloneOp";} + virtual std::string className() const {return "eoQuadCloneOp";} virtual bool operator()(EOT& , EOT& ) {return false;} }; diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index b6035ffe3..35932ea2b 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -31,7 +31,7 @@ Combined continuators - logical AND: Continues until one of the embedded continuators says halt! -20/11/00 MS: Changed the 2-continuator construct to a vector > +20/11/00 MS: Changed the 2-continuator construct to a std::vector > to be consistent with other Combined constructs and allow to easily handle more than 2 continuators diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index edff201d2..5997d9923 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -51,7 +51,7 @@ public: { // First checks that no other eoCtrlCContinue does exist if (existCtrlCContinue) - throw runtime_error("A signal handler for Ctrl C is already defined!\n"); + throw std::runtime_error("A signal handler for Ctrl C is already defined!\n"); signal( SIGINT, signal_handler ); signal( SIGQUIT, signal_handler ); existCtrlCContinue = true; diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index 5c72031cb..4a197b3ab 100755 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -50,7 +50,7 @@ template class eoDetTournamentSelect: public eoSelectOne eoDetTournamentSelect(unsigned _tSize = 2 ):eoSelectOne(), tSize(_tSize) { // consistency check if (tSize < 2) { - cout << "Warning, Tournament size should be >= 2\nAdjusted to 2\n"; + std::cout << "Warning, Tournament size should be >= 2\nAdjusted to 2\n"; tSize = 2; } } diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h index 01b76e2d7..fab752b7e 100644 --- a/eo/src/eoDominanceMap.h +++ b/eo/src/eoDominanceMap.h @@ -31,7 +31,7 @@ #include /** - eoDominanceMap, utility class to calculate and maintain a map (vector >) of pareto dominance statistics. + eoDominanceMap, utility class to calculate and maintain a map (std::vector >) of pareto dominance statistics. It is set up such that @@ -115,12 +115,12 @@ class eoDominanceMap : public eoUF&, void>, public std::vect /** For all elements, returns the no. of elements that dominate the element Thus: lower is better (and 0 is the front). - It returns a vector cuz that + It returns a std::vector cuz that makes subsequent manipulation that much easier */ - vector sum_dominators() const + std::vector sum_dominators() const { - vector result(size(), 0.0); + std::vector result(size(), 0.0); for (unsigned i = 0; i < size(); ++i) { @@ -137,12 +137,12 @@ class eoDominanceMap : public eoUF&, void>, public std::vect /** For all elements, returns the number of elements that the element dominates Thus: higher is better - It returns a vector cuz that + It returns a std::vector cuz that makes subsequent manipulation that much easier */ - vector sum_dominants() const + std::vector sum_dominants() const { - vector result(size(), 0.0); + std::vector result(size(), 0.0); for (unsigned i = 0; i < size(); ++i) { @@ -159,7 +159,7 @@ class eoDominanceMap : public eoUF&, void>, public std::vect private : - vector fitness; + std::vector fitness; }; #endif diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index e4cba5786..eddced4c6 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -188,16 +188,16 @@ template class eoEasyEA: public eoAlgo replace(_pop, offspring); // after replace, the new pop. is in _pop if (pSize > _pop.size()) - throw runtime_error("Population shrinking!"); + throw std::runtime_error("Population shrinking!"); else if (pSize < _pop.size()) - throw runtime_error("Population growing!"); + throw std::runtime_error("Population growing!"); } - catch (exception& e) + catch (std::exception& e) { - string s = e.what(); + std::string s = e.what(); s.append( " in eoEasyEA"); - throw runtime_error( s ); + throw std::runtime_error( s ); } } while ( continuator( _pop ) ); } diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index a2245247f..34bd6c3f6 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -39,7 +39,7 @@ public: /// Ctor eoEvalContinue( eoEvalFuncCounter & _eval, unsigned long _totalEval) : eval(_eval), repTotalEvaluations( _totalEval ) { - cout << "Ctor de eoEvalFuncCounter avec total = " << repTotalEvaluations << endl; + std::cout << "Ctor de eoEvalFuncCounter avec total = " << repTotalEvaluations << std::endl; }; /** Returns false when a certain number of evaluations has been done @@ -47,7 +47,7 @@ public: virtual bool operator() ( const eoPop& _vEO ) { if (eval.value() >= repTotalEvaluations) { - cout << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]\n"; + std::cout << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]\n"; return false; } return true; diff --git a/eo/src/eoFactory.h b/eo/src/eoFactory.h index f755036ec..13864f030 100644 --- a/eo/src/eoFactory.h +++ b/eo/src/eoFactory.h @@ -52,16 +52,16 @@ public: virtual ~eoFactory() {} //@} - /** Another factory methods: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ objectType parameter1 parameter2 ... parametern\\ */ - virtual EOClass* make(istream& _is) = 0; + virtual EOClass* make(std::istream& _is) = 0; ///@name eoObject methods //@{ /** Return the class id */ - virtual string className() const { return "eoFactory"; } + virtual std::string className() const { return "eoFactory"; } /** Read and print are left without implementation */ //@} diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index 276e0b7ca..dc823c53b 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -50,7 +50,7 @@ public: FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); if (bestCurrentFitness >= maximum) { - cout << "STOP in eoFitContinue: Best fitness has reached " << + std::cout << "STOP in eoFitContinue: Best fitness has reached " << bestCurrentFitness << "\n"; return false; } diff --git a/eo/src/eoG3Replacement.h b/eo/src/eoG3Replacement.h index 28928edf5..7e7950f78 100644 --- a/eo/src/eoG3Replacement.h +++ b/eo/src/eoG3Replacement.h @@ -70,8 +70,8 @@ public: // minimla check: if (_offspring.size() != toKeep) { - cerr << "Les tailles " << _offspring.size() << " " << toKeep << endl; - throw runtime_error("eoG3Replacement: wrong number of remaining offspring"); + std::cerr << "Les tailles " << _offspring.size() << " " << toKeep << std::endl; + throw std::runtime_error("eoG3Replacement: wrong number of remaining offspring"); } // and put back into _parents plus(_offspring, _parents); diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 201d15ac0..0f97e99a7 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -51,10 +51,10 @@ public: * reached */ virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; - // cout << " [" << thisGeneration << "] "; + // std::cout << " [" << thisGeneration << "] "; if (thisGeneration >= repTotalGenerations) { - cout << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; + std::cout << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; return false; } return true; diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 9dcf6126a..077bfcad6 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -64,7 +64,7 @@ class eoGenOp : public eoOp, public eoUF &, void> */ virtual unsigned max_production(void) = 0; - virtual string className() const = 0; + virtual std::string className() const = 0; void operator()(eoPopulator& _pop) { _pop.reserve(max_production()); @@ -94,7 +94,7 @@ class eoMonGenOp : public eoGenOp (*_it).invalidate(); // look how simple } - virtual string className() const {return op.className();} + virtual std::string className() const {return op.className();} private : eoMonOp& op; }; @@ -121,7 +121,7 @@ class eoBinGenOp : public eoGenOp if (op(a, b)) a.invalidate(); } - virtual string className() const {return op.className();} + virtual std::string className() const {return op.className();} private : eoBinOp& op; @@ -142,7 +142,7 @@ class eoSelBinGenOp : public eoGenOp if (op(*_pop, sel(_pop.source()))) (*_pop).invalidate(); } - virtual string className() const {return op.className();} + virtual std::string className() const {return op.className();} private : eoBinOp& op; @@ -173,7 +173,7 @@ class eoQuadGenOp : public eoGenOp } } - virtual string className() const {return op.className();} + virtual std::string className() const {return op.className();} private : eoQuadOp& op; diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index 878955a81..db46ab90a 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -94,7 +94,7 @@ class eoGeneralBreeder: public eoBreed } /// The class name. - virtual string className() const { return "eoGeneralBreeder"; } + virtual std::string className() const { return "eoGeneralBreeder"; } private: eoSelectOne& select; diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 08580aac8..8383e7d27 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -47,7 +47,7 @@ class eoInit : public eoUF public: // virtual void operator()(EOT& chrom) // { -// throw runtime_error("In the eoInit base class"); // just in case +// throw std::runtime_error("In the eoInit base class"); // just in case // } }; @@ -115,7 +115,7 @@ typedef typename EOT::AtomType AtomType; // generator(_generator) // { // if (_minSize >= _maxSize) -// throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); +// throw std::logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); // } /** Ctor from an eoInit */ @@ -123,14 +123,14 @@ typedef typename EOT::AtomType AtomType; : offset(_minSize), extent(_maxSize - _minSize), init(_init) { if (_minSize >= _maxSize) - throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); + throw std::logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); } virtual void operator()(EOT& _chrom) { _chrom.resize(offset + rng.random(extent)); - typename vector::iterator it; + typename std::vector::iterator it; for (it=_chrom.begin(); it<_chrom.end(); it++) init(*it); _chrom.invalidate(); diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h index 998728a94..ead16039d 100644 --- a/eo/src/eoLinearFitScaling.h +++ b/eo/src/eoLinearFitScaling.h @@ -78,7 +78,7 @@ public: for (i=0; i::iterator it = _offspring.it_best_element(); diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 27e6e49bd..defd1fc56 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -70,7 +70,7 @@ public : throw std::logic_error("Negative number of offspring in eoElitism!"); combien = (unsigned int)_rate; if (combien != _rate) - cout << "Warning: Number of guys to merge in eoElitism was rounded"; + std::cout << "Warning: Number of guys to merge in eoElitism was rounded"; } } @@ -87,7 +87,7 @@ public : if (combienLocal > _pop.size()) throw std::logic_error("Elite larger than population"); - vector result; + std::vector result; _pop.nth_element(combienLocal, result); for (size_t i = 0; i < result.size(); ++i) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 44b18b330..fedbf8682 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -34,7 +34,7 @@ #include /** - Non dominated sorting, it *is a* vector of doubles, the integer part is the rank (to which front it belongs), + Non dominated sorting, it *is a* std::vector of doubles, the integer part is the rank (to which front it belongs), the fractional part the niching penalty or distance penalty or whatever penalty you want to squeeze into the bits. */ @@ -47,10 +47,10 @@ class eoNDSorting : public eoPerf2WorthCached {} /** Pure virtual function that calculates the 'distance' for each element in the current front - Implement to create your own nondominated sorting algorithm. The size of the returned vector + Implement to create your own nondominated sorting algorithm. The size of the returned std::vector should be equal to the size of the current_front. */ - virtual vector niche_penalty(const vector& current_front, const eoPop& _pop) = 0; + virtual std::vector niche_penalty(const std::vector& current_front, const eoPop& _pop) = 0; void calculate_worths(const eoPop& _pop) { @@ -92,7 +92,7 @@ private : void one_objective(const eoPop& _pop) { unsigned i; - vector tmp_pop; + std::vector tmp_pop; tmp_pop.resize(_pop.size()); // copy pop to dummy population (only need the fitnesses) @@ -101,10 +101,6 @@ private : tmp_pop[i].fitness(_pop[i].fitness()); tmp_pop[i].index = i; } - - // sort it in ascending - sort(tmp_pop.begin(), tmp_pop.end(), greater() ); - for (i = 0; i < _pop.size(); ++i) { @@ -138,7 +134,7 @@ private : typedef typename EOT::Fitness::fitness_traits traits; assert(traits::nObjectives() == 2); - vector sort1(_pop.size()); // index into population sorted on first objective + std::vector sort1(_pop.size()); // index into population sorted on first objective for (i = 0; i < _pop.size(); ++i) { @@ -160,10 +156,10 @@ private : max1 = max1 + 1.0; // add a bit to it so that it is a real upperbound unsigned prev_front = 0; - vector d; + std::vector d; d.resize(_pop.size(), max1); // initialize with the value max1 everywhere - vector > fronts(_pop.size()); // to store indices into the front + std::vector > fronts(_pop.size()); // to store indices into the front for (i = 0; i < _pop.size(); ++i) { @@ -191,7 +187,7 @@ private : value2 = max1 - value2; // perform binary search using std::upper_bound, a log n operation for each member - vector::iterator it = + std::vector::iterator it = std::upper_bound(d.begin(), d.begin() + last_front, value2); unsigned front = unsigned(it - d.begin()); @@ -212,15 +208,15 @@ private : if (fronts[i].size() == 0) continue; // Now we have the indices to the current front in current_front, do the niching - vector niche_count = niche_penalty(fronts[i], _pop); + std::vector niche_count = niche_penalty(fronts[i], _pop); // Check whether the derived class was nice if (niche_count.size() != fronts[i].size()) { - throw logic_error("eoNDSorting: niche and front should have the same size"); + throw std::logic_error("eoNDSorting: niche and front should have the same size"); } - double max_niche = *max_element(niche_count.begin(), niche_count.end()); + double max_niche = *std::max_element(niche_count.begin(), niche_count.end()); for (unsigned j = 0; j < fronts[i].size(); ++j) { @@ -270,8 +266,8 @@ private : typedef typename EOT::Fitness::fitness_traits traits; - vector > S(_pop.size()); // which individuals does guy i dominate - vector n(_pop.size(), 0); // how many individuals dominate guy i + std::vector > S(_pop.size()); // which individuals does guy i dominate + std::vector n(_pop.size(), 0); // how many individuals dominate guy i unsigned j; for (i = 0; i < _pop.size(); ++i) @@ -280,12 +276,12 @@ private : { if (_pop[i].fitness().dominates(_pop[j].fitness())) { // i dominates j - S[i].push_back(j); // add j to i's domination list + S[i].push_back(j); // add j to i's domination std::list //n[j]++; // as i dominates j } else if (_pop[j].fitness().dominates(_pop[i].fitness())) - { // j dominates i, increment count for i, add i to the domination list of j + { // j dominates i, increment count for i, add i to the domination std::list of j n[i]++; //S[j].push_back(i); @@ -293,7 +289,7 @@ private : } } - vector current_front; + std::vector current_front; current_front.reserve(_pop.size()); // get the first front out @@ -305,22 +301,22 @@ private : } } - vector next_front; + std::vector next_front; next_front.reserve(_pop.size()); unsigned front_index = 0; // which front are we processing while (!current_front.empty()) { // Now we have the indices to the current front in current_front, do the niching - vector niche_count = niche_penalty(current_front, _pop); + std::vector niche_count = niche_penalty(current_front, _pop); // Check whether the derived class was nice if (niche_count.size() != current_front.size()) { - throw logic_error("eoNDSorting: niche and front should have the same size"); + throw std::logic_error("eoNDSorting: niche and front should have the same size"); } - double max_niche = *max_element(niche_count.begin(), niche_count.end()); + double max_niche = *std::max_element(niche_count.begin(), niche_count.end()); for (i = 0; i < current_front.size(); ++i) { @@ -377,9 +373,9 @@ class eoNDSorting_I : public eoNDSorting public : eoNDSorting_I(double _nicheSize) : eoNDSorting(), nicheSize(_nicheSize) {} - vector niche_penalty(const vector& current_front, const eoPop& _pop) + std::vector niche_penalty(const std::vector& current_front, const eoPop& _pop) { - vector niche_count(current_front.size(), 0.); + std::vector niche_count(current_front.size(), 0.); for (unsigned i = 0; i < current_front.size(); ++i) { // calculate whether the other points lie within the nice @@ -415,7 +411,7 @@ public : Adapted from Deb, Agrawal, Pratab and Meyarivan: A Fast Elitist Non-Dominant Sorting Genetic Algorithm for MultiObjective Optimization: NSGA-II KanGAL Report No. 200001 - Note that this class does not do the sorting per se, but the sorting of it worth_vector will give the right order + Note that this class does not do the sorting per se, but the sorting of it worth_std::vector will give the right order The crowding distance is calculated as the sum of the distances to the nearest neighbours. As we need to return the penalty value, we have to invert that and invert it again in the base class, but such is life, sigh @@ -437,11 +433,11 @@ class eoNDSorting_II : public eoNDSorting }; /// _cf points into the elements that consist of the current front - vector niche_penalty(const vector& _cf, const eoPop& _pop) + std::vector niche_penalty(const std::vector& _cf, const eoPop& _pop) { typedef typename EOT::Fitness::fitness_traits traits; unsigned i; - vector niche_count(_cf.size(), 0.); + std::vector niche_count(_cf.size(), 0.); unsigned nObjectives = traits::nObjectives(); //_pop[_cf[0]].fitness().size(); @@ -449,7 +445,7 @@ class eoNDSorting_II : public eoNDSorting for (unsigned o = 0; o < nObjectives; ++o) { - vector > performance(_cf.size()); + std::vector > performance(_cf.size()); for (i =0; i < _cf.size(); ++i) { performance[i].first = _pop[_cf[i]].fitness()[o]; @@ -458,14 +454,14 @@ class eoNDSorting_II : public eoNDSorting sort(performance.begin(), performance.end(), compare_nodes()); // a lambda operator would've been nice here - vector nc(niche_count.size(), 0.0); + std::vector nc(niche_count.size(), 0.0); for (i = 1; i < _cf.size()-1; ++i) { // and yet another level of indirection nc[performance[i].second] = performance[i+1].first - performance[i-1].first; } - double max_dist = *max_element(nc.begin(), nc.end()); + double max_dist = *std::max_element(nc.begin(), nc.end()); // set boundary at max_dist + 1 (so it will get chosen over all the others nc[performance[0].second] = max_dist + 1; diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 69a6b388f..7f6039053 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -28,13 +28,11 @@ //----------------------------------------------------------------------------- #include // For limits definition -#include // istream, ostream -#include // string +#include // std::istream, std::ostream +#include // std::string #include -using namespace std; - //----------------------------------------------------------------------------- // eoObject //----------------------------------------------------------------------------- @@ -69,7 +67,7 @@ class eoObject their own. Having it pure will force the implementor to provide a name. */ - virtual string className() const = 0; + virtual std::string className() const = 0; }; diff --git a/eo/src/eoOneToOneBreeder.h b/eo/src/eoOneToOneBreeder.h index 09891a718..cd18edd19 100644 --- a/eo/src/eoOneToOneBreeder.h +++ b/eo/src/eoOneToOneBreeder.h @@ -96,7 +96,7 @@ class eoOneToOneBreeder: public eoBreed // check: only one offspring? unsigned posEnd = popit.tellp(); if (posEnd != pos) - throw runtime_error("Operator can only generate a SINGLE offspring in eoOneToOneBreeder"); + throw std::runtime_error("Operator can only generate a SINGLE offspring in eoOneToOneBreeder"); // do the tournament between parent and offspring eval(leOffspring); // first need to evaluate the offspring @@ -109,7 +109,7 @@ class eoOneToOneBreeder: public eoBreed } /// The class name. - virtual string className() const { return "eoOneToOneBreeder"; } + virtual std::string className() const { return "eoOneToOneBreeder"; } private: eoGenOp& op; diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index e19867593..e2143619a 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.27 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2003-02-27 19:25:56 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.28 2003-02-27 19:25:56 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -58,9 +58,9 @@ how to build them from a description in a file. /** Abstract data types for EO operators. Genetic operators act on chromosomes, changing them. The type to use them on is problem specific. If your genotype - is a vector, there are operators that work specifically - on vector, but you might also find that generic operators - working on vector are what you need. + is a std::vector, there are operators that work specifically + on std::vector, but you might also find that generic operators + working on std::vector are what you need. */ template @@ -103,7 +103,7 @@ public: /// Ctor eoMonOp() : eoOp( eoOp::unary ) {}; - virtual string className() const {return "eoMonOp";}; + virtual std::string className() const {return "eoMonOp";}; }; @@ -119,7 +119,7 @@ public: /// Ctor eoBinOp() :eoOp( eoOp::binary ) {}; - virtual string className() const {return "eoBinOp";}; + virtual std::string className() const {return "eoBinOp";}; }; /** Quad genetic operator: subclasses eoOp, and defines basically the @@ -133,7 +133,7 @@ public: /// Ctor eoQuadOp() :eoOp( eoOp::quadratic ) {}; - virtual string className() const {return "eoQuadOp";}; + virtual std::string className() const {return "eoQuadOp";}; }; /** Turning an eoQuadOp into an eoBinOp: simply don't touch the second arg! diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index b68665df1..00a3addfd 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -64,15 +64,15 @@ class eoOpContainer : public eoGenOp { ops.push_back(&wrap_op(_op, store)); rates.push_back(_rate); - max_to_produce = max(max_to_produce,ops.back()->max_production()); + max_to_produce = std::max(max_to_produce,ops.back()->max_production()); } - virtual string className() const = 0; + virtual std::string className() const = 0; protected : - vector rates; - vector*> ops; + std::vector rates; + std::vector*> ops; private : eoFunctorStore store; @@ -105,13 +105,13 @@ class eoSequentialOp : public eoOpContainer { // try // { - // apply it to all the guys in the todo list + // apply it to all the guys in the todo std::list (*ops[i])(_pop); // } // check for out of individuals and do nothing with that... // catch(eoPopulator::OutOfIndividuals&) // { - // cout << "Warning: not enough individuals to handle\n"; + // std::cout << "Warning: not enough individuals to handle\n"; // return ; // } } @@ -122,12 +122,12 @@ class eoSequentialOp : public eoOpContainer while (!_pop.exhausted()); } } - virtual string className() const {return "SequentialOp";} + virtual std::string className() const {return "SequentialOp";} private : - vector to_apply; - vector production; + std::vector to_apply; + std::vector production; }; @@ -149,7 +149,7 @@ class eoProportionalOp : public eoOpContainer catch( typename eoPopulator::OutOfIndividuals&) {} } - virtual string className() const {return "ProportionalOp";} + virtual std::string className() const {return "ProportionalOp";} }; diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 440898277..6c1d80924 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -39,7 +39,7 @@ template class eoOpSelMason: public eoFactory > { public: - typedef vector* > vOpP; + typedef std::vector* > vOpP; typedef map*, vOpP > MEV; /// @name ctors and dtors @@ -51,7 +51,7 @@ public: virtual ~eoOpSelMason() {}; //@} - /** Factory methods: creates an object from an istream, reading from + /** Factory methods: creates an object from an std::istream, reading from it whatever is needed to create the object. The format is opSelClassName\\ rate 1 operator1\\ @@ -62,9 +62,9 @@ public: since the built object can´t do it itself. The objects built must be destroyed from outside, using the #destroy# method */ - virtual eoOpSelector* make(istream& _is) { + virtual eoOpSelector* make(std::istream& _is) { - string opSelName; + std::string opSelName; _is >> opSelName; eoOpSelector* opSelectorP; // Build the operator selector @@ -72,7 +72,7 @@ public: opSelectorP = new eoProportionalOpSel(); } - // Temp vector for storing pointers + // Temp std::vector for storing pointers vOpP tmpPVec; // read operator rate and name while ( _is ) { @@ -96,12 +96,12 @@ public: ///@name eoObject methods //@{ /** Return the class id */ - virtual string className() const { return "eoOpSelMason"; } + virtual std::string className() const { return "eoOpSelMason"; } //@} private: - map*,vector* > > allocMap; + map*,std::vector* > > allocMap; eoOpFactory& operatorFactory; }; diff --git a/eo/src/eoParetoConstraintFitness.h b/eo/src/eoParetoConstraintFitness.h index c6c0446da..9e2b29429 100644 --- a/eo/src/eoParetoConstraintFitness.h +++ b/eo/src/eoParetoConstraintFitness.h @@ -70,25 +70,25 @@ public : eoParetoOneConstraintFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} - // Ctr from a vector (size nObjectives+1) + // Ctr from a std::vector (size nObjectives+1) eoParetoOneConstraintFitness(std::vector & _v) : std::vector(_v) { #ifndef NDEBUG if (_v.size() != fitness_traits::nObjectives()+1) - throw runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from vector"); + throw std::runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from std::vector"); #endif constraintValue = _v[fitness_traits::nObjectives()]; resize(fitness_traits::nObjectives()); } - // Ctr from a vector and a value + // Ctr from a std::vector and a value eoParetoOneConstraintFitness(std::vector & _v, double _c) : std::vector(_v), constraintValue(_c) { #ifndef NDEBUG if (_v.size() != fitness_traits::nObjectives()) - throw runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from vector and value"); + throw std::runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from std::vector and value"); #endif } diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 6ebaea703..4634c9f4a 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -113,7 +113,7 @@ public : eoParetoFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} - // Ctr from a vector + // Ctr from a std::vector eoParetoFitness(std::vector & _v) : std::vector(_v) {} diff --git a/eo/src/eoParetoRanking.h b/eo/src/eoParetoRanking.h index 322c97ba1..60063fabe 100644 --- a/eo/src/eoParetoRanking.h +++ b/eo/src/eoParetoRanking.h @@ -50,7 +50,7 @@ class eoParetoRanking : public eoPerf2WorthCached value() = dominanceMap.sum_dominators(); // get rank: 0 means part of current front // calculate maximum - double maxim = *max_element(value().begin(), value().end()); + double maxim = *std::max_element(value().begin(), value().end()); // higher is better, so invert the value for (unsigned i = 0; i < value().size(); ++i) diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index 0807fb035..4138817a1 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -50,7 +50,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam& _pop) - { // start with a vector of indices + { // start with a std::vector of indices std::vector indices(_pop.size()); unsigned i; @@ -59,7 +59,7 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam tmp_pop; tmp_pop.resize(_pop.size()); @@ -71,8 +71,8 @@ class eoPerf2Worth : public eoUF&, void>, public eoValueParam Sort population according to worth, will keep the worths and fitness_cache in sync with the population. */ virtual void sort_pop(eoPop& _pop) - { // start with a vector of indices + { // start with a std::vector of indices std::vector indices(_pop.size()); unsigned i; @@ -183,9 +183,9 @@ class eoPerf2WorthCached : public eoPerf2Worth tmp_cache[i] = fitness_cache[indices[i]]; } - swap(_pop, tmp_pop); - swap(value(), tmp_worths); - swap(fitness_cache, tmp_cache); + std::swap(_pop, tmp_pop); + std::swap(value(), tmp_worths); + std::swap(fitness_cache, tmp_cache); } /** helper class used to sort indices into populations/worths diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 9e61c48d4..1c0c52ea7 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -9,7 +9,7 @@ //----------------------------------------------------------------------------- -istream & operator >> ( istream& _is, eoPersistent& _o ) { +std::istream & operator >> ( std::istream& _is, eoPersistent& _o ) { _o.readFrom(_is); return _is; }; diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index c6f838384..2d4c3eb1a 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -36,14 +36,12 @@ const unsigned MAXLINELENGTH=1024; //----------------------------------------------------------------------------- -#include // istream, ostream -#include // para string +#include // std::istream, std::ostream +#include // para std::string //----------------------------------------------------------------------------- #include "eoPrintable.h" -using namespace std; - //----------------------------------------------------------------------------- // eoPersistent //----------------------------------------------------------------------------- @@ -59,16 +57,16 @@ class eoPersistent: public eoPrintable /** * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. + * @param _is A std::istream. + * @throw runtime_std::exception If a valid object can't be read. */ - virtual void readFrom(istream& _is) = 0; + virtual void readFrom(std::istream& _is) = 0; }; //----------------------------------------------------------------------------- ///Standard input for all objects in the EO hierarchy -istream & operator >> ( istream& _is, eoPersistent& _o ); +std::istream & operator >> ( std::istream& _is, eoPersistent& _o ); #endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 7c3f8184b..46cc2ab90 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -36,11 +36,11 @@ #include #include // for shuffle method -/** A vector of EO object, to be used in all algorithms +/** A std::vector of EO object, to be used in all algorithms * (selectors, operators, replacements, ...). * * We have no idea if a population can be - * some other thing that a vector, but if somebody thinks of it, this concrete + * some other thing that a std::vector, but if somebody thinks of it, this concrete * implementation can be moved to "generic" and an abstract Population * interface be provided. * @@ -51,14 +51,14 @@ */ template -class eoPop: public vector, public eoObject, public eoPersistent +class eoPop: public std::vector, public eoObject, public eoPersistent { public: typedef typename EOT::Fitness Fitness; /** Default ctor. Creates empty pop */ - eoPop() : vector(), eoObject(), eoPersistent() {}; + eoPop() : std::vector(), eoObject(), eoPersistent() {}; /** Ctor for the initialization of chromosomes @@ -66,7 +66,7 @@ class eoPop: public vector, public eoObject, public eoPersistent @param _chromInit Initialization routine, produces EO's, needs to be an eoInit */ eoPop( unsigned _popSize, eoInit& _chromInit ) - :vector() + :std::vector() { resize(_popSize); for ( unsigned i = 0; i < _popSize; i++ ) @@ -75,7 +75,7 @@ class eoPop: public vector, public eoObject, public eoPersistent } }; - /** appends random guys at end of pop. + /** appstd::ends random guys at end of pop. Can be used to initialize it pop is empty @param _popSize total population size @@ -86,7 +86,7 @@ class eoPop: public vector, public eoObject, public eoPersistent unsigned oldSize = size(); if (_newPopSize < oldSize) { - throw runtime_error("New size smaller than old size in pop.append"); + throw std::runtime_error("New size smaller than old size in pop.append"); return; } if (_newPopSize == oldSize) @@ -99,11 +99,11 @@ class eoPop: public vector, public eoObject, public eoPersistent }; - /** Ctor from an istream; reads the population from a stream, + /** Ctor from an std::istream; reads the population from a stream, each element should be in different lines @param _is the stream */ - eoPop( istream& _is ):vector() { + eoPop( std::istream& _is ) :std::vector() { readFrom( _is ); } @@ -125,11 +125,11 @@ class eoPop: public vector, public eoObject, public eoPersistent */ void sort(void) { - std::sort(begin(), end(), greater()); + std::sort(begin(), end(), std::greater()); } - /** creates a vector pointing to the individuals in descending order */ - void sort(vector& result) const + /** creates a std::vector pointing to the individuals in descending order */ + void sort(std::vector& result) const { result.resize(size()); @@ -148,8 +148,8 @@ class eoPop: public vector, public eoObject, public eoPersistent std::random_shuffle(begin(), end(), gen); } - /** creates a vector pointing to the individuals in random order */ - void shuffle(vector& result) const + /** creates a std::vector pointing to the individuals in random order */ + void shuffle(std::vector& result) const { result.resize(size()); @@ -162,28 +162,28 @@ class eoPop: public vector, public eoObject, public eoPersistent /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ typename eoPop::iterator it_best_element() { - typename eoPop::iterator it = max_element(begin(), end()); + typename eoPop::iterator it = std::max_element(begin(), end()); return it; } /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ const EOT & best_element() const { - typename eoPop::const_iterator it = max_element(begin(), end()); + typename eoPop::const_iterator it = std::max_element(begin(), end()); return (*it); } /** returns a const reference to the worse individual DOES NOT MOVE ANYBODY */ const EOT & worse_element() const { - typename eoPop::const_iterator it = min_element(begin(), end()); + typename eoPop::const_iterator it = std::min_element(begin(), end()); return (*it); } /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ typename eoPop::iterator it_worse_element() { - typename eoPop::iterator it = min_element(begin(), end()); + typename eoPop::iterator it = std::min_element(begin(), end()); return it; } @@ -194,7 +194,7 @@ class eoPop: public vector, public eoObject, public eoPersistent typename eoPop::iterator nth_element(int nth) { typename eoPop::iterator it = begin() + nth; - std::nth_element(begin(), it, end(), greater()); + std::nth_element(begin(), it, end(), std::greater()); return it; } @@ -204,24 +204,24 @@ class eoPop: public vector, public eoObject, public eoPersistent Fitness nth_element_fitness(int which) const { // probably not the fastest way to do this, but what the heck - vector fitness(size()); + std::vector fitness(size()); std::transform(begin(), end(), fitness.begin(), GetFitness()); - typename vector::iterator it = fitness.begin() + which; - std::nth_element(fitness.begin(), it, fitness.end(), greater()); + typename std::vector::iterator it = fitness.begin() + which; + std::nth_element(fitness.begin(), it, fitness.end(), std::greater()); return *it; } /** const nth_element function, returns pointers to sorted individuals * up the the nth */ - void nth_element(int which, vector& result) const + void nth_element(int which, std::vector& result) const { result.resize(size()); std::transform(begin(), end(), result.begin(), Ref()); - typename vector::iterator it = result.begin() + which; + typename std::vector::iterator it = result.begin() + which; std::nth_element(result.begin(), it, result.end(), Cmp()); } @@ -229,30 +229,30 @@ class eoPop: public vector, public eoObject, public eoPersistent /** does STL swap with other pop */ void swap(eoPop& other) { - std::swap(static_cast& >(*this), static_cast& >(other)); + std::swap(static_cast& >(*this), static_cast& >(other)); } /** * Prints sorted pop but does NOT modify it! * - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void sortedPrintOn(ostream& _os) const + virtual void sortedPrintOn(std::ostream& _os) const { - vector result; + std::vector result; sort(result); _os << size() << '\n'; for (unsigned i = 0; i < size(); ++i) { - _os << *result[i] << endl; + _os << *result[i] << std::endl; } } /** * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { _os << size() << '\n'; std::copy( begin(), end(), std::ostream_iterator( _os, "\n") ); @@ -263,9 +263,9 @@ class eoPop: public vector, public eoObject, public eoPersistent /** * Read object. The EOT class must have a ctor from a stream; in this case, a strstream is used. - * @param _is A istream. + * @param _is A std::istream. */ - virtual void readFrom(istream& _is) + virtual void readFrom(std::istream& _is) { size_t sz; _is >> sz; @@ -280,7 +280,7 @@ class eoPop: public vector, public eoObject, public eoPersistent /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoPop";}; + virtual std::string className() const {return "eoPop";}; //@} virtual void invalidate() diff --git a/eo/src/eoPrintable.cpp b/eo/src/eoPrintable.cpp index b56495990..c90e6424b 100644 --- a/eo/src/eoPrintable.cpp +++ b/eo/src/eoPrintable.cpp @@ -13,7 +13,7 @@ //Implementation of these objects //----------------------------------------------------------------------------- -ostream & operator << ( ostream& _os, const eoPrintable& _o ) { +std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ) { _o.printOn(_os); return _os; }; diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index e416175d7..256383dc6 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -27,10 +27,8 @@ //----------------------------------------------------------------------------- -#include // istream, ostream -#include // para string - -using namespace std; +#include // std::istream, std::ostream +#include // para std::string //----------------------------------------------------------------------------- // eoPrintable @@ -50,14 +48,14 @@ class eoPrintable /** * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const = 0; + virtual void printOn(std::ostream& _os) const = 0; }; //----------------------------------------------------------------------------- ///Standard output for all objects in the EO hierarchy -ostream & operator << ( ostream& _os, const eoPrintable& _o ); +std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ); #endif diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 5fba7fe5c..7fa8a8959 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -65,7 +65,7 @@ public: rates.push_back(_rate); } - virtual string className() const { return "eoPropCombinedMonOp"; } + virtual std::string className() const { return "eoPropCombinedMonOp"; } virtual void add(eoMonOp & _op, const double _rate, bool _verbose=false) { @@ -73,11 +73,11 @@ public: rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - printOn(cout); + printOn(std::cout); } // outputs the operators and percentages - virtual void printOn(ostream & _os) + virtual void printOn(std::ostream & _os) { double total = 0; unsigned i; @@ -116,7 +116,7 @@ public: rates.push_back(_rate); } -virtual string className() const { return "eoPropCombinedBinOp"; } +virtual std::string className() const { return "eoPropCombinedBinOp"; } virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) { @@ -129,9 +129,9 @@ virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) unsigned i; for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + std::cout << ops[i]->className() << " with rate " << 100*rates[i]/total << " %\n"; } } @@ -170,7 +170,7 @@ public: rates.push_back(_rate); } -virtual string className() const { return "eoPropCombinedQuadOp"; } +virtual std::string className() const { return "eoPropCombinedQuadOp"; } // addition of a true operator virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) @@ -179,11 +179,11 @@ virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - printOn(cout); + printOn(std::cout); } // outputs the operators and percentages - virtual void printOn(ostream & _os) + virtual void printOn(std::ostream & _os) { double total = 0; unsigned i; diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index d870dcaf7..f85321f44 100755 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -48,7 +48,7 @@ public: total((pop.size() == 0) ? -1.0 : sum_fitness(pop)) { if (minimizing_fitness()) - throw logic_error("eoProportionalSelect: minimizing fitness"); + throw std::logic_error("eoProportionalSelect: minimizing fitness"); } void setup(const eoPop& _pop) diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index 49bae6005..5b7421be2 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -32,7 +32,7 @@ /** An instance of eoPerfFromWorth * COmputes the ranked fitness: fitnesses range in [m,M] * with m=2-pressure/popSize and M=pressure/popSize. - * in between, the progression depends on exponent (linear if 1). + * in between, the progression depstd::ends on exponent (linear if 1). */ template class eoRanking : public eoPerf2Worth // false: do not cache fitness @@ -54,24 +54,24 @@ public: if (_eo == &(*it)) return it-_pop.begin(); } - throw runtime_error("Not found in eoLinearRanking"); + throw std::runtime_error("Not found in eoLinearRanking"); } /* COmputes the ranked fitness: fitnesses range in [m,M] with m=2-pressure/popSize and M=pressure/popSize. - in between, the progression depends on exponent (linear if 1). + in between, the progression depstd::ends on exponent (linear if 1). */ virtual void operator()(const eoPop& _pop) { - vector rank; + std::vector rank; _pop.sort(rank); unsigned pSize =_pop.size(); unsigned int pSizeMinusOne = pSize-1; if (pSize <= 1) - throw runtime_error("Cannot do ranking with population of size <= 1"); + throw std::runtime_error("Cannot do ranking with population of size <= 1"); - // value() refers to the vector of worthes (we're in an eoParamvalue) + // value() refers to the std::vector of worthes (we're in an eoParamvalue) value().resize(pSize); double beta = (2-pressure)/pSize; diff --git a/eo/src/eoRankingSelect.h b/eo/src/eoRankingSelect.h index 6f070cb9f..fd5619a94 100644 --- a/eo/src/eoRankingSelect.h +++ b/eo/src/eoRankingSelect.h @@ -32,7 +32,7 @@ #include /** eoRankingSelect: select an individual by roulette wheel on its rank - * is an eoRouletteWorthSelect, i.e. a selector using a vector of worthes + * is an eoRouletteWorthSelect, i.e. a selector using a std::vector of worthes * rather than the raw fitness (see eoSelectFromWorth.h) * uses an internal eoRanking object which is an eoPerf2Worth */ diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index f07615f54..53d8e427f 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -90,15 +90,15 @@ typedef typename EOT::Fitness Fitness; { if (t_size < 2) { - cout << "Warning: EP tournament size should be >= 2. Adjusted" << endl; + std::cout << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; t_size = 2; } } - /// helper struct for comparing on pairs + /// helper struct for comparing on std::pairs // compares the scores // uses the fitness if scores are equals ???? - typedef pair::iterator> EPpair; + typedef std::pair::iterator> EPpair; struct Cmp { bool operator()(const EPpair a, const EPpair b) const { @@ -117,7 +117,7 @@ typedef typename EOT::Fitness Fitness; return; if (presentSize < _newsize) throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); - vector scores(presentSize); + std::vector scores(presentSize); for (unsigned i=0; i::iterator it = scores.begin() + _newsize; + typename std::vector::iterator it = scores.begin() + _newsize; std::nth_element(scores.begin(), it, scores.end(), Cmp()); // sort(scores.begin(), scores.end(), Cmp()); unsigned j; -// cout << "Les scores apres tri\n"; +// std::cout << "Les scores apres tri\n"; // for (j=0; j tmPop; for (j=0; j<_newsize; j++) @@ -149,7 +149,7 @@ typedef typename EOT::Fitness Fitness; } _newgen.swap(tmPop); // erase does not work, but I'm sure there is a way in STL to mark - // and later delete all inside a vector ?????? + // and later delete all inside a std::vector ?????? // this would avoid all copies here // it = scores.begin() + _newsize; @@ -193,7 +193,7 @@ public: { if (t_size < 2) { - cout << "Warning, Size for eoDetTournamentTruncate adjusted to 2\n"; + std::cout << "Warning, Size for eoDetTournamentTruncate adjusted to 2\n"; t_size = 2; } } @@ -241,12 +241,12 @@ public: { if (t_rate <= 0.5) { - cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51\n"; + std::cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51\n"; t_rate = 0.51; } if (t_rate > 1) { - cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 1\n"; + std::cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 1\n"; t_rate = 1; } } diff --git a/eo/src/eoReduceMergeReduce.h b/eo/src/eoReduceMergeReduce.h index 0cde81eaa..05854ea76 100644 --- a/eo/src/eoReduceMergeReduce.h +++ b/eo/src/eoReduceMergeReduce.h @@ -90,7 +90,7 @@ public: // then the offspring unsigned reducedOffspringSize = howManyReducedOffspring(offSize); if (!reducedOffspringSize) - throw runtime_error("No offspring left after reduction!"); + throw std::runtime_error("No offspring left after reduction!"); if (reducedOffspringSize != offSize) // need reduction reduceOffspring(_offspring, reducedOffspringSize); @@ -100,7 +100,7 @@ public: _parents.begin()+reducedParentSize); // reduce the resulting population - // size depends on elitism + // size depstd::ends on elitism if (elite && strongElitism) { if (_parents.size() != finalPopSize-elite) @@ -131,9 +131,9 @@ public: private: eoHowMany howManyElite; // if 0, no elitism at all - bool strongElitism; // if false -> weak elistism + bool strongElitism; // if false -> weak estd::listism eoHowMany howManyReducedParents; // if 0, no parent in final replacement - eoHowMany howManyReducedOffspring; // if 0, runtime_error + eoHowMany howManyReducedOffspring; // if 0, std::runtime_error // the reducers eoReduce & reduceParents; eoReduce & reduceOffspring; diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index 9db344edd..fcc4cc7e9 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -215,7 +215,7 @@ public: { if (t_size < 2) { - cout << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2\n"; + std::cout << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2\n"; t_size = 2; } } @@ -265,12 +265,12 @@ public: { if (t_rate <= 0.5) { - cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51\n"; + std::cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51\n"; t_rate = 0.51; } if (t_rate > 1) { - cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1\n"; + std::cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1\n"; t_rate = 1; } } diff --git a/eo/src/eoSGAGenOp.h b/eo/src/eoSGAGenOp.h index 35c31cd6c..a6533f072 100644 --- a/eo/src/eoSGAGenOp.h +++ b/eo/src/eoSGAGenOp.h @@ -74,7 +74,7 @@ class eoSGAGenOp : public eoGenOp /** inherited from eoGenOp */ virtual unsigned max_production(void) {return 2;} - virtual string className() const {return "eoSGAGenOp";} + virtual std::string className() const {return "eoSGAGenOp";} private: diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 47e2747a0..4eebbe375 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -33,7 +33,7 @@ /////////////////////////////////////////////////////////////////////////////// // class eoSGATransform /////////////////////////////////////////////////////////////////////////////// -#include // vector +#include // std::vector #include #include diff --git a/eo/src/eoSelectFactory.h b/eo/src/eoSelectFactory.h index aafb01a70..d94a0fa0f 100644 --- a/eo/src/eoSelectFactory.h +++ b/eo/src/eoSelectFactory.h @@ -49,13 +49,13 @@ public: virtual ~eoSelectFactory() {} //@} - /** Another factory methods: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ objectType parameter1 parameter2 ... parametern\\ */ - virtual eoSelect* make(istream& _is) { + virtual eoSelect* make(std::istream& _is) { eoSelect * selectPtr; - string objectTypeStr; + std::string objectTypeStr; _is >> objectTypeStr; // All selectors have a rate, the proportion of the original population float rate; @@ -69,7 +69,7 @@ public: if ( objectTypeStr == "eoRandomSelect" ) { selectPtr = new eoRandomSelect( rate ); } else { - throw runtime_error( "Incorrect selector type" ); + throw std::runtime_error( "Incorrect selector type" ); } } return selectPtr; @@ -77,8 +77,8 @@ public: ///@name eoObject methods //@{ - void printOn( ostream& _os ) const {}; - void readFrom( istream& _is ){}; + void printOn( std::ostream& _os ) const {}; + void readFrom( std::istream& _is ){}; /** className is inherited */ //@} diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index 516abf22b..d2c993dc3 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -34,14 +34,14 @@ //----------------------------------------------------------------------------- /** selects one element from a population (is an eoSelectOne) -but the selection is based on a vector of Worth that is different +but the selection is based on a std::vector of Worth that is different from the fitnesses (e.g. EO fitness is what Koza terms "raw fitness", Worth is what the selection is based upon). see class eoPerf2Worth: an eoStat that transforms fitnesses into Worthes Note: Worthes will not always be doubles - see some multi-objective -techniques where it is a pair of doubles ... +techniques where it is a std::pair of doubles ... It has to have a < operator it you want to call an existing selector (see selector.h) - but of course you can write the whole @@ -79,7 +79,7 @@ protected: { if (fitness[index] != _eo.fitness()) { - throw runtime_error("eoSelectFromWorth: fitnesses are not in sync"); + throw std::runtime_error("eoSelectFromWorth: fitnesses are not in sync"); } } @@ -95,7 +95,7 @@ template class eoDetTournamentWorthSelect : public eoSelectFromWorth { public: - typedef typename vector::iterator worthIterator; + typedef typename std::vector::iterator worthIterator; /* Default ctor from an eoPerf2Worth object + tournament size */ @@ -134,7 +134,7 @@ template class eoStochTournamentWorthSelect : public eoSelectFromWorth { public: - typedef typename vector::iterator worthIterator; + typedef typename std::vector::iterator worthIterator; /* Default ctor from an eoPerf2Worth object + tournament rate */ @@ -172,7 +172,7 @@ template class eoRouletteWorthSelect : public eoSelectFromWorth { public: - typedef typename vector::iterator worthIterator; + typedef typename std::vector::iterator worthIterator; /* Default ctor from an eoPerf2Worth object */ diff --git a/eo/src/eoSequentialSelect.h b/eo/src/eoSequentialSelect.h index 523928a18..adb65327e 100644 --- a/eo/src/eoSequentialSelect.h +++ b/eo/src/eoSequentialSelect.h @@ -53,8 +53,13 @@ template class eoSequentialSelect: public eoSelectOne /** Ctor: sets the current pter to MAXINT so init will take place first time not very elegant, maybe ... */ - eoSequentialSelect(bool _ordered = true): - ordered(_ordered), current(MAXINT) {} +#ifdef _MSC_VER + eoSequentialSelect(bool _ordered = true) + : ordered(_ordered), current(std::MAXINT) {} +#else + eoSequentialSelect(bool _ordered = true) + : ordered(_ordered), current(MAXINT) {} +#endif void setup(const eoPop& _pop) { @@ -78,7 +83,7 @@ template class eoSequentialSelect: public eoSelectOne private: bool ordered; unsigned current; - vector eoPters; + std::vector eoPters; }; @@ -99,7 +104,11 @@ template class eoEliteSequentialSelect: public eoSelectOne /** Ctor: sets the current pter to MAXINT so init will take place first time not very elegant, maybe ... */ + #ifdef _MSC_VER + eoEliteSequentialSelect(): current(std::MAXINT) {} + #else eoEliteSequentialSelect(): current(MAXINT) {} + #endif void setup(const eoPop& _pop) { @@ -109,7 +118,7 @@ template class eoEliteSequentialSelect: public eoSelectOne unsigned int ibest = 0; const EOT * best = eoPters[0]; if (_pop.size() == 1) - throw runtime_error("Trying eoEliteSequentialSelect with only one individual!"); + throw std::runtime_error("Trying eoEliteSequentialSelect with only one individual!"); for (unsigned i=1; i<_pop.size(); i++) if (*eoPters[i]>*best) { @@ -135,7 +144,7 @@ template class eoEliteSequentialSelect: public eoSelectOne } private: unsigned current; - vector eoPters; + std::vector eoPters; }; diff --git a/eo/src/eoSharing.h b/eo/src/eoSharing.h index f2178adfc..037dfcce2 100644 --- a/eo/src/eoSharing.h +++ b/eo/src/eoSharing.h @@ -55,10 +55,10 @@ class eoSharing : public eoPerf2Worth unsigned i, j, pSize=_pop.size(); if (pSize <= 1) - throw runtime_error("Apptempt to do sharing with population of size 1"); + throw std::runtime_error("Apptempt to do sharing with population of size 1"); value.resize(pSize); - vector sim(pSize); // to hold the similarities - vector distMatrix(pSize*(pSize-1)/2); // to hold the distances + std::vector sim(pSize); // to hold the similarities + std::vector distMatrix(pSize*(pSize-1)/2); // to hold the distances // compute the distances distMatrix(0,0)=0; @@ -86,11 +86,11 @@ class eoSharing : public eoPerf2Worth } // helper class to hold distances - class dMatrix : public vector + class dMatrix : public std::vector { public: // Ctor : sets size - dMatrix(unsigned _s) : vector(_s*(_s-1)), rSize(_s) {} + dMatrix(unsigned _s) : std::vector(_s*(_s-1)), rSize(_s) {} /** simple accessor */ double operator()(unsigned _i, unsigned _j) const @@ -105,16 +105,16 @@ class eoSharing : public eoPerf2Worth } /** just in case */ - void printOn(ostream & _os) + void printOn(std::ostream & _os) { unsigned index=0; for (unsigned i=0; ioperator[](index++) << " " ; - _os << endl; + _os << std::endl; } - _os << endl; + _os << std::endl; } private: diff --git a/eo/src/eoSimpleDEA.h b/eo/src/eoSimpleDEA.h index ea785250d..3eef44c79 100644 --- a/eo/src/eoSimpleDEA.h +++ b/eo/src/eoSimpleDEA.h @@ -80,11 +80,11 @@ template class eoSimpleDEA: public eoDEA update(_distrib, pop); // updates distrib from _pop } - catch (exception& e) + catch (std::exception& e) { - string s = e.what(); + std::string s = e.what(); s.append( " in eoSimpleDEA"); - throw runtime_error( s ); + throw std::runtime_error( s ); } } while ( continuator( pop ) ); } diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index 7b3e0ef12..62b3e6fec 100755 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -54,7 +54,7 @@ public: * reached withtout improvement */ virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; - // cout << " [" << thisGeneration << "] "; + // std::cout << " [" << thisGeneration << "] "; Fitness bestCurrentFitness = _vEO.nth_element_fitness(0); if (steadyState) { // already after MinGenenerations @@ -63,7 +63,7 @@ public: lastImprovement = thisGeneration; } else { if (thisGeneration - lastImprovement > repSteadyGenerations) { - cout << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations + std::cout << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations << " generations without improvement\n"; return false; } @@ -73,7 +73,7 @@ public: steadyState = true; bestSoFar = bestCurrentFitness; lastImprovement = thisGeneration; - cout << "eoSteadyFitContinue: Done the minimum number of generations\n"; + std::cout << "eoSteadyFitContinue: Done the minimum number of generations\n"; } } return true; diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h index a2928a52c..69f0376ee 100755 --- a/eo/src/eoStochTournamentSelect.h +++ b/eo/src/eoStochTournamentSelect.h @@ -48,11 +48,11 @@ template class eoStochTournamentSelect: public eoSelectOne { // consistency checks if (Trate < 0.5) { - cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + std::cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; Trate = 0.55; } if (Trate > 1) { - cerr << "Warning, Tournament rate should be < 1\nAdjusted to 1\n"; + std::cerr << "Warning, Tournament rate should be < 1\nAdjusted to 1\n"; Trate = 1; } } diff --git a/eo/src/eoSurviveAndDie.h b/eo/src/eoSurviveAndDie.h index eb582cb17..1c4f766fa 100644 --- a/eo/src/eoSurviveAndDie.h +++ b/eo/src/eoSurviveAndDie.h @@ -90,14 +90,14 @@ public: _pop.nth_element(nbSurvive); // copy best _luckyGuys.resize(nbSurvive); - copy(_pop.begin(), _pop.begin()+nbSurvive, _luckyGuys.begin()); + std::copy(_pop.begin(), _pop.begin()+nbSurvive, _luckyGuys.begin()); // erase them from pop _pop.erase(_pop.begin(), _pop.begin()+nbSurvive); } unsigned nbRemaining = _pop.size(); // carefull, we can have a rate of 1 if we want to kill all remaining - unsigned nbDie = min(howmanyDie(pSize), pSize-nbSurvive); + unsigned nbDie = std::min(howmanyDie(pSize), pSize-nbSurvive); if (nbDie > nbRemaining) throw std::logic_error("eoDeterministicSurviveAndDie: Too many to kill!\n"); diff --git a/eo/src/eoToricCellularEasyEA.h b/eo/src/eoToricCellularEasyEA.h index bd4149abe..1710cec66 100644 --- a/eo/src/eoToricCellularEasyEA.h +++ b/eo/src/eoToricCellularEasyEA.h @@ -26,7 +26,7 @@ #include -#include +#include template class eoToricCellularEasyEA : public eoCellularEasyEA { @@ -71,7 +71,7 @@ public : virtual eoPop neighbours (const eoPop & pop, int rank) { int dim2 = pop.size () ; - int dim = (int) sqrt (dim2) ; + int dim = (int) std::sqrt ( (double) dim2) ; int j = rank ; eoPop neigh ; diff --git a/eo/src/eoTruncatedSelectMany.h b/eo/src/eoTruncatedSelectMany.h index 24dbc47a8..9cad8dbc4 100644 --- a/eo/src/eoTruncatedSelectMany.h +++ b/eo/src/eoTruncatedSelectMany.h @@ -93,7 +93,7 @@ class eoTruncatedSelectMany : public eoSelect else { // at the moment, brute force (rush rush, no good) - // what we would need otherwise is a vector class + // what we would need otherwise is a std::vector class // and selectors that act on such a thing eoPop tmpPop = _source; // hum hum, could be a pain in the ass diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 9f3af2058..1d1eaf823 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-09-04 06:51:59 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.7 2001-09-04 06:51:59 evomarc Exp $ $Author: evomarc $ + CVS Info: $Date: 2003-02-27 19:25:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.8 2003-02-27 19:25:48 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -45,7 +45,7 @@ class eoAtomExchange : public eoBF public: // a function to initlialize - to be called before every crossover virtual void randomize(unsigned int, unsigned int){} - virtual string className() const=0; + virtual std::string className() const=0; }; /** Uniform crossover - well, not really for FixedLength */ @@ -70,11 +70,11 @@ public: return mask[_i]; } - virtual string className() const {return "eoUniformAtomExchange";} + virtual std::string className() const {return "eoUniformAtomExchange";} private: double rate; - vector mask; + std::vector mask; }; @@ -124,7 +124,7 @@ public : && (index<10000) ); if (index >= 10000) { - cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + std::cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; return false; } // here we know we have the right sizes: do the actual exchange @@ -148,12 +148,12 @@ public : return true; // should we test that? Yes, but no time now } - virtual string className() const + virtual std::string className() const { char s[1024]; - ostrstream os(s, 1022); - os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")" << ends; - return string(s); + std::ostrstream os(s, 1022); + os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")" << std::ends; + return std::string(s); } private: @@ -188,12 +188,12 @@ public : return changed; // should we test that? Yes, but no time now } - virtual string className() const + virtual std::string className() const { char s[1024]; - ostrstream os(s, 1022); - os << "eoInnerExchangeQuadOp(" << atomExchange.className() << ")" << ends; - return string(s); + std::ostrstream os(s, 1022); + os << "eoInnerExchangeQuadOp(" << atomExchange.className() << ")" << std::ends; + return std::string(s); } private: float rate; @@ -250,7 +250,7 @@ public : && (index<10000) ); if (index >= 10000) { - cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + std::cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; return false; } @@ -318,7 +318,7 @@ public : // this while condition is not optimal, as it may take some time if (index >= 10000) { - cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + std::cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; return false; } diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 6e4d37ba5..949b5d9ac 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-09-04 06:51:59 $ $Version$ $Author: evomarc $ + CVS Info: $Date: 2003-02-27 19:25:48 $ $Version$ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -72,7 +72,7 @@ public : return true; } - virtual string className() const { return "eoVlAddMutation"; } + virtual std::string className() const { return "eoVlAddMutation"; } private: unsigned nMax; @@ -84,7 +84,7 @@ template class eoGeneDelChooser : public eoUF { public: - virtual string className() const =0; + virtual std::string className() const =0; }; @@ -98,7 +98,7 @@ public: { return eo::rng.random(_eo.size()); } - virtual string className() const { return "eoUniformGeneChooser"; } + virtual std::string className() const { return "eoUniformGeneChooser"; } }; /** Deletion of a gene @@ -139,12 +139,12 @@ public : return true; } - virtual string className() const + virtual std::string className() const { char s[1024]; - ostrstream os(s, 1022); - os << "eoVlDelMutation(" << chooser.className() << ")" << ends; - return string(s); + std::ostrstream os(s, 1022); + os << "eoVlDelMutation(" << chooser.className() << ")" << std::ends; + return std::string(s); } private: diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index d888a7fec..bc95bf79c 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -22,7 +22,7 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2002-10-18 11:39:05 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.13 2002-10-18 11:39:05 jeggermo Exp $ $Author: jeggermo $ + CVS Info: $Date: 2003-02-27 19:25:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.14 2003-02-27 19:25:47 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -36,9 +36,9 @@ /** - Base class for fixed length chromosomes, just derives from EO and vector and + Base class for fixed length chromosomes, just derives from EO and std::vector and redirects the smaller than operator to EO (fitness based comparison). GeneType - must have the following methods: void ctor (needed for the vector<>), copy ctor, + must have the following methods: void ctor (needed for the std::vector<>), copy ctor, */ @@ -56,17 +56,17 @@ class eoVector : public EO, public std::vector /// copy ctor abstracting from the FitT template - eoVector(const eoVector& _vec) : vector(_vec) + eoVector(const eoVector& _vec) : std::vector(_vec) {} - // we can't have a Ctor from a vector, it would create ambiguity + // we can't have a Ctor from a std::vector, it would create ambiguity // with the copy Ctor void value(const std::vector& _v) { if (_v.size() != size()) // safety check { - if (size()) // NOT an initial empty vector - cout << "Warning: Changing size in eoVector assignation"<, public std::vector invalidate(); } - /// to avoid conflicts between EO::operator< and vector::operator< + /// to avoid conflicts between EO::operator< and std::vector::operator< bool operator<(const eoVector& _eo) const { return EO::operator<(_eo); } /// printing... - virtual void printOn(ostream& os) const + virtual void printOn(std::ostream& os) const { EO::printOn(os); os << ' '; @@ -92,7 +92,7 @@ class eoVector : public EO, public std::vector } /// reading... - virtual void readFrom(istream& is) + virtual void readFrom(std::istream& is) { EO::readFrom(is); @@ -111,7 +111,7 @@ class eoVector : public EO, public std::vector } }; -/// to avoid conflicts between EO::operator< and vector::operator< +/// to avoid conflicts between EO::operator< and std::vector::operator< template bool operator<(const eoVector& _eo1, const eoVector& _eo2) { diff --git a/eo/src/es.h b/eo/src/es.h index 84fd2c738..c3d307ae5 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -35,7 +35,7 @@ // contains the include specific to real representations, i.e. in src/es dir //----------------------------------------------------------------------------- -// the genotypes - from plain vector to full correlated mutation +// the genotypes - from plain std::vector to full correlated mutation #include #include #include diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 9e80679a5..a9b40e41c 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -46,7 +46,7 @@ eoReal just an eoVector eoEsSimple + one self-adapting single sigma for all variables - eoEsStdev a whole vector of self-adapting sigmas + eoEsStdev a whole std::vector of self-adapting sigmas eoEsFull a full self-adapting correlation matrix @see eoReal eoEsSimple eoEsStdev eoEsFull eoInit @@ -84,7 +84,7 @@ private : result.stdev = sigma; } - // Adaptive mutation through a vector of sigmas + // Adaptive mutation through a std::vector of sigmas void create_self_adapt(eoEsStdev& result) { unsigned theSize = eoRealInitBounded::size(); diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 1f6eb7346..7c5b5fafd 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -60,7 +60,7 @@ class eoEsFull : public eoVector os << ' '; } - void readFrom(istream& is) + void readFrom(std::istream& is) { eoVector::readFrom(is); @@ -76,8 +76,8 @@ class eoEsFull : public eoVector is >> correlations[i]; } - vector stdevs; - vector correlations; + std::vector stdevs; + std::vector correlations; }; diff --git a/eo/src/es/eoEsGlobalXover.h b/eo/src/es/eoEsGlobalXover.h index ce016b56f..1743e1702 100644 --- a/eo/src/es/eoEsGlobalXover.h +++ b/eo/src/es/eoEsGlobalXover.h @@ -53,7 +53,7 @@ public: crossObj(_crossObj), crossMut(_crossMut) {} /// The class name. Used to display statistics - virtual string className() const { return "eoEsGlobalXover"; } + virtual std::string className() const { return "eoEsGlobalXover"; } /// The TOTAL number of offspring (here = nb of parents modified in place) unsigned max_production(void) { return 1; } diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index d6568a908..e86feb057 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -84,7 +84,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoESMutate";}; + virtual std::string className() const {return "eoESMutate";}; /** Mutate eoEsSimple @@ -191,7 +191,7 @@ public: unsigned k, n1, n2; double d1,d2, S, C; - vector VarStp(_eo.size()); + std::vector VarStp(_eo.size()); for (i = 0; i < _eo.size(); i++) VarStp[i] = _eo.stdevs[i] * rng.normal(); @@ -230,7 +230,7 @@ public: unsigned size = bounds.size(); TauLcl = _init.TauLcl(); TauLcl /= sqrt(2*(double) size); - cout << "Init: tau local " << TauLcl << endl; + std::cout << "Init: tau local " << TauLcl << std::endl; } void init(eoEsStdev, eoEsMutationInit& _init) @@ -243,14 +243,14 @@ public: // renormalization TauLcl /= sqrt( 2.0 * sqrt( (double)size ) ); TauGlb /= sqrt( 2.0 * ( (double) size ) ); - cout << "Init: tau local " << TauLcl << " et global " << TauGlb << endl; + std::cout << "Init: tau local " << TauLcl << " et global " << TauGlb << std::endl; } void init(eoEsFull, eoEsMutationInit& _init) { init(eoEsStdev(), _init); TauBeta = _init.TauBeta(); - cout << "Init: tau local " << TauLcl << " et global " << TauGlb << endl; + std::cout << "Init: tau local " << TauLcl << " et global " << TauGlb << std::endl; } // the data diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h index 9ec29040f..3a38faa34 100644 --- a/eo/src/es/eoEsSimple.h +++ b/eo/src/es/eoEsSimple.h @@ -61,7 +61,7 @@ public : os << ' ' << stdev << ' '; } - void readFrom(istream& is) + void readFrom(std::istream& is) { eoVector::readFrom(is); diff --git a/eo/src/es/eoEsStandardXover.h b/eo/src/es/eoEsStandardXover.h index d360d9531..b4cc11533 100644 --- a/eo/src/es/eoEsStandardXover.h +++ b/eo/src/es/eoEsStandardXover.h @@ -55,7 +55,7 @@ public: crossObj(_crossObj), crossMut(_crossMut) {} /// The class name. Used to display statistics - virtual string className() const { return "eoEsStandardXover"; } + virtual std::string className() const { return "eoEsStandardXover"; } /** * modifies one parents in the populator diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index fd43476d5..277b2d90f 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -57,7 +57,7 @@ class eoEsStdev : public eoVector os << ' '; } - void readFrom(istream& is) + void readFrom(std::istream& is) { eoVector::readFrom(is); stdevs.resize(size()); @@ -68,7 +68,7 @@ class eoEsStdev : public eoVector } - vector stdevs; + std::vector stdevs; }; #endif diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 6dd12dc8a..cb4ef5514 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -36,7 +36,7 @@ #include //----------------------------------------------------------------------------- -/** Simple normal mutation of a vector of real values. +/** Simple normal mutation of a std::vector of real values. * The stDev is fixed - but it is passed ans stored as a reference, * to enable dynamic mutations (see eoOenFithMutation below). * @@ -69,7 +69,7 @@ template class eoNormalMutation: public eoMonOp sigma(_sigma), bounds(_bounds), p_change(_p_change) {} /** The class name */ - virtual string className() const { return "eoNormalMutation"; } + virtual std::string className() const { return "eoNormalMutation"; } /** * Do it! @@ -129,11 +129,11 @@ public: { // minimal check if (updateFactor>=1) - throw runtime_error("Update factor must be < 1 in eoOneFifthMutation"); + throw std::runtime_error("Update factor must be < 1 in eoOneFifthMutation"); } /** The class name */ - virtual string className() const { return "eoOneFifthMutation"; } + virtual std::string className() const { return "eoOneFifthMutation"; } /** * Do it! @@ -192,9 +192,9 @@ private: eoEvalFunc & eval; double threshold; // 1/5 ! double updateFactor ; // the multiplicative factor - vector nbMut; // total number of mutations per gen - vector nbSuccess; // number of successful mutations per gen - unsigned genIndex ; // current index in vectors (circular) + std::vector nbMut; // total number of mutations per gen + std::vector nbSuccess; // number of successful mutations per gen + unsigned genIndex ; // current index in std::vectors (circular) }; diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index e1429e524..516395f15 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -26,8 +26,8 @@ //----------------------------------------------------------------------------- -#include // ostream, istream -#include // string +#include // std::ostream, std::istream +#include // std::string #include @@ -40,13 +40,13 @@ template class eoReal: public eoVector /** * (Default) Constructor. - * @param size Size of the vector + * @param size Size of the std::vector */ eoReal(unsigned size = 0, double value = 0.0): eoVector(size, value) {} /// My class name. - virtual string className() const + virtual std::string className() const { return "eoReal"; } diff --git a/eo/src/es/eoRealAtomXover.h b/eo/src/es/eoRealAtomXover.h index 91d7520eb..9380b443a 100644 --- a/eo/src/es/eoRealAtomXover.h +++ b/eo/src/es/eoRealAtomXover.h @@ -1,7 +1,7 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoRealAtomXover.h : helper classes for vector crossover +// eoRealAtomXover.h : helper classes for std::vector crossover // (c) Marc Schoenauer 2001 This library is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ public: eoDoubleExchange() {} /// The class name. Used to display statistics - virtual string className() const { return "eoDoubleExchange"; } + virtual std::string className() const { return "eoDoubleExchange"; } /** Exchanges or not the values @@ -77,7 +77,7 @@ public: eoDoubleIntermediate() {} /// The class name. Used to display statistics - virtual string className() const { return "eoDoubleIntermediate"; } + virtual std::string className() const { return "eoDoubleIntermediate"; } /** Linear combination of both parents diff --git a/eo/src/es/eoRealInitBounded.h b/eo/src/es/eoRealInitBounded.h index 8d8fb05b6..b0f98ba6f 100644 --- a/eo/src/es/eoRealInitBounded.h +++ b/eo/src/es/eoRealInitBounded.h @@ -33,7 +33,7 @@ #include #include -/** Simple initialization for any EOT that derives from vector +/** Simple initialization for any EOT that derives from std::vector * uniformly in some bounds */ template @@ -44,7 +44,7 @@ class eoRealInitBounded : public eoInit eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) { if (!bounds.isBounded()) - throw runtime_error("Needs bounded bounds to initialize a vector"); + throw std::runtime_error("Needs bounded bounds to initialize a std::vector"); } /** simply passes the argument to the uniform method of the bounds */ diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 01d7d6e8b..405f9692e 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -35,7 +35,7 @@ //----------------------------------------------------------------------------- -/** eoUniformMutation --> changes all values of the vector +/** eoUniformMutation --> changes all values of the std::vector by uniform choice with range epsilon with probability p_change per variable \class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h @@ -81,13 +81,13 @@ template class eoUniformMutation: public eoMonOp * @param _p_change the VECTOR of probabilities for each coordinates */ eoUniformMutation(eoRealVectorBounds & _bounds, - const vector& _epsilon, - const vector& _p_change): + const std::vector& _epsilon, + const std::vector& _p_change): homogeneous(false), bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} /// The class name. - virtual string className() const { return "eoUniformMutation"; } + virtual std::string className() const { return "eoUniformMutation"; } /** * Do it! @@ -109,7 +109,7 @@ template class eoUniformMutation: public eoMonOp { // sanity check ? if (_eo.size() != bounds.size()) - throw runtime_error("Invalid size of indi in eoUniformMutation"); + throw std::runtime_error("Invalid size of indi in eoUniformMutation"); for (unsigned lieu=0; lieu<_eo.size(); lieu++) if (rng.flip(p_change[lieu])) @@ -118,9 +118,9 @@ template class eoUniformMutation: public eoMonOp double emin = _eo[lieu]-epsilon[lieu]; double emax = _eo[lieu]+epsilon[lieu]; if (bounds.isMinBounded(lieu)) - emin = max(bounds.minimum(lieu), emin); + emin = std::max(bounds.minimum(lieu), emin); if (bounds.isMaxBounded(lieu)) - emax = min(bounds.maximum(lieu), emax); + emax = std::min(bounds.maximum(lieu), emax); _eo[lieu] = emin + (emax-emin)*rng.uniform(); hasChanged = true; } @@ -131,11 +131,11 @@ template class eoUniformMutation: public eoMonOp private: bool homogeneous; // == no bounds passed in the ctor eoRealVectorBounds & bounds; - vector epsilon; // the ranges for mutation - vector p_change; // the proba that each variable is modified + std::vector epsilon; // the ranges for mutation + std::vector p_change; // the proba that each variable is modified }; -/** eoDetUniformMutation --> changes exactly k values of the vector +/** eoDetUniformMutation --> changes exactly k values of the std::vector by uniform choice with range epsilon \class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h \ingroup parameteric @@ -173,13 +173,13 @@ template class eoDetUniformMutation: public eoMonOp } /** - * Constructor with bounds and full vector of epsilon + * Constructor with bounds and full std::vector of epsilon * @param _bounds an eoRealVectorBounds that contains the bounds * @param _epsilon the VECTOR of ranges for uniform mutation * @param number of coordinate to modify */ eoDetUniformMutation(eoRealVectorBounds & _bounds, - const vector& _epsilon, + const std::vector& _epsilon, const unsigned& _no = 1): homogeneous(false), bounds(_bounds), epsilon(_epsilon), no(_no) { @@ -190,7 +190,7 @@ template class eoDetUniformMutation: public eoMonOp } /// The class name. - virtual string className() const { return "eoDetUniformMutation"; } + virtual std::string className() const { return "eoDetUniformMutation"; } /** * Do it! @@ -209,7 +209,7 @@ template class eoDetUniformMutation: public eoMonOp { // sanity check ? if (_eo.size() != bounds.size()) - throw runtime_error("Invalid size of indi in eoDetUniformMutation"); + throw std::runtime_error("Invalid size of indi in eoDetUniformMutation"); for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp double emin = _eo[lieu]-epsilon[lieu]; double emax = _eo[lieu]+epsilon[lieu]; if (bounds.isMinBounded(lieu)) - emin = max(bounds.minimum(lieu), emin); + emin = std::max(bounds.minimum(lieu), emin); if (bounds.isMaxBounded(lieu)) - emax = min(bounds.maximum(lieu), emax); + emax = std::min(bounds.maximum(lieu), emax); _eo[lieu] = emin + (emax-emin)*rng.uniform(); } } @@ -231,7 +231,7 @@ template class eoDetUniformMutation: public eoMonOp private: bool homogeneous; // == no bounds passed in the ctor eoRealVectorBounds & bounds; - vector epsilon; // the ranges of mutation + std::vector epsilon; // the ranges of mutation unsigned no; }; @@ -272,7 +272,7 @@ template class eoSegmentCrossover: public eoQuadOp bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} /// The class name. - virtual string className() const { return "eoSegmentCrossover"; } + virtual std::string className() const { return "eoSegmentCrossover"; } /** * segment crossover - modifies both parents @@ -294,18 +294,18 @@ template class eoSegmentCrossover: public eoQuadOp r1=_eo1[i]; r2=_eo2[i]; if (r1 != r2) { // otherwise you'll get NAN's - double rmin = min(r1, r2); - double rmax = max(r1, r2); + double rmin = std::min(r1, r2); + double rmax = std::max(r1, r2); double length = rmax - rmin; if (bounds.isMinBounded(i)) { - alphaMin = max(alphaMin, (bounds.minimum(i)-rmin)/length); - alphaMax = min(alphaMax, (rmax-bounds.minimum(i))/length); + alphaMin = std::max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMax = std::min(alphaMax, (rmax-bounds.minimum(i))/length); } if (bounds.isMaxBounded(i)) { - alphaMax = min(alphaMax, (bounds.maximum(i)-rmin)/length); - alphaMin = max(alphaMin, (rmax-bounds.maximum(i))/length); + alphaMax = std::min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMin = std::max(alphaMin, (rmax-bounds.maximum(i))/length); } } } @@ -350,7 +350,7 @@ template class eoHypercubeCrossover: public eoQuadOp bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) - throw runtime_error("BLX coefficient should be positive"); + throw std::runtime_error("BLX coefficient should be positive"); } /** @@ -366,11 +366,11 @@ template class eoHypercubeCrossover: public eoQuadOp bounds(_bounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) - throw runtime_error("BLX coefficient should be positive"); + throw std::runtime_error("BLX coefficient should be positive"); } /// The class name. - virtual string className() const { return "eoHypercubeCrossover"; } + virtual std::string className() const { return "eoHypercubeCrossover"; } /** * hypercube crossover - modifies both parents @@ -402,8 +402,8 @@ template class eoHypercubeCrossover: public eoQuadOp r1=_eo1[i]; r2=_eo2[i]; if (r1 != r2) { // otherwise do nothing - double rmin = min(r1, r2); - double rmax = max(r1, r2); + double rmin = std::min(r1, r2); + double rmax = std::max(r1, r2); // compute min and max for object variables double objMin = -alpha * rmax + (1+alpha) * rmin; @@ -412,11 +412,11 @@ template class eoHypercubeCrossover: public eoQuadOp // first find the limits on the alpha's if (bounds.isMinBounded(i)) { - objMin = max(objMin, bounds.minimum(i)); + objMin = std::max(objMin, bounds.minimum(i)); } if (bounds.isMaxBounded(i)) { - objMax = min(objMax, bounds.maximum(i)); + objMax = std::min(objMax, bounds.maximum(i)); } // then draw variables double median = (objMin+objMax)/2.0; // uniform within bounds @@ -464,22 +464,22 @@ template class eoRealUXover: public eoQuadOp eoRealUXover(const float& _preference = 0.5): preference(_preference) { if ( (_preference <= 0.0) || (_preference >= 1.0) ) - runtime_error("UxOver --> invalid preference"); + std::runtime_error("UxOver --> invalid preference"); } /// The class name. - virtual string className() const { return "eoRealUXover"; } + virtual std::string className() const { return "eoRealUXover"; } /** - * Uniform crossover for real vectors + * Uniform crossover for real std::vectors * @param _eo1 The first parent * @param _eo2 The second parent - * @runtime_error if sizes don't match + * @std::runtime_error if sizes don't match */ bool operator()(EOT& _eo1, EOT& _eo2) { if ( _eo1.size() != _eo2.size()) - runtime_error("UxOver --> chromosomes sizes don't match" ); + std::runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i<_eo1.size(); i++) { diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index eb9128ac4..948e6962a 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -37,7 +37,7 @@ /* * This fuction does the initialization of what's needed for a particular - * genotype (here, vector == eoReal). + * genotype (here, std::vector == eoReal). * It could be here tempatied only on the fitness, as it can be used to evolve * bitstrings with any fitness. * However, for consistency reasons, it was finally chosen, as in @@ -76,7 +76,7 @@ eoEsChromInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) // minimum check if ( (sigmaParam.value() < 0) ) - throw runtime_error("Invalid sigma"); + throw std::runtime_error("Invalid sigma"); eoEsChromInit * init = new eoEsChromInit(boundsParam.value(), sigmaParam.value()); diff --git a/eo/src/es/make_op.h b/eo/src/es/make_op.h index fb2c4bf88..846c9908c 100644 --- a/eo/src/es/make_op.h +++ b/eo/src/es/make_op.h @@ -70,11 +70,11 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Genetic Operators"); - // get initisalizer size == vector size + // get initisalizer size == std::vector size // eoRealInitBounded * realInit = (eoRealInitBounded*)(&_init); // unsigned vecSize = realInit->theBounds().size(); - // get vector size: safer??? + // get std::vector size: safer??? EOT eoTmp; _init(eoTmp); unsigned vecSize = eoTmp.size(); @@ -86,10 +86,10 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit with specific implementation //// in eoParser.cpp. At the moemnt, it is there (cf also make_genotype - eoParamParamType & ppBounds = boundsParam.value(); // pair > - // transform into a vector - vector v; - vector::iterator it; + eoParamParamType & ppBounds = boundsParam.value(); // std::pair > + // transform into a std::vector + std::vector v; + std::vector::iterator it; for (it=ppBounds.second.begin(); itc_str()); @@ -101,7 +101,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); + eoValueParam& operatorParam = _parser.createParam(std::string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Genetic Operators"); - if (operatorParam.value() != string("SGA")) - throw runtime_error("Sorry, only SGA-like operator available right now\n"); + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Sorry, only SGA-like operator available right now\n"); // now we read Pcross and Pmut, // the relative weights for all crossovers -> proportional choice @@ -127,12 +127,12 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Genetic Operators" ); // minimum check if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) - throw runtime_error("Invalid pCross"); + throw std::runtime_error("Invalid pCross"); eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Genetic Operators" ); // minimum check if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) - throw runtime_error("Invalid pMut"); + throw std::runtime_error("Invalid pMut"); // the crossovers ///////////////// @@ -140,18 +140,18 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Genetic Operators" ); // minimum check if ( (segmentRateParam.value() < 0) ) - throw runtime_error("Invalid segmentRate"); + throw std::runtime_error("Invalid segmentRate"); eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Genetic Operators" ); // minimum check if ( (arithmeticRateParam.value() < 0) ) - throw runtime_error("Invalid arithmeticRate"); + throw std::runtime_error("Invalid arithmeticRate"); // minimum check bool bCross = true; if (segmentRateParam.value()+arithmeticRateParam.value()==0) { - cerr << "Warning: no crossover" << endl; + std::cerr << "Warning: no crossover" << std::endl; bCross = false; } @@ -181,37 +181,37 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Genetic Operators" ); // minimum check if ( (epsilonParam.value() < 0) ) - throw runtime_error("Invalid epsilon"); + throw std::runtime_error("Invalid epsilon"); eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Genetic Operators" ); // minimum check if ( (uniformMutRateParam.value() < 0) ) - throw runtime_error("Invalid uniformMutRate"); + throw std::runtime_error("Invalid uniformMutRate"); eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Genetic Operators" ); // minimum check if ( (detMutRateParam.value() < 0) ) - throw runtime_error("Invalid detMutRate"); + throw std::runtime_error("Invalid detMutRate"); eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Genetic Operators" ); // minimum check if ( (normalMutRateParam.value() < 0) ) - throw runtime_error("Invalid normalMutRate"); + throw std::runtime_error("Invalid normalMutRate"); // and the sigma eoValueParam & sigmaParam = _parser.createParam(1.0, "sigma", "Sigma (fixed) for Gaussian mutation", 'S', "Genetic Operators" ); // minimum check if ( (sigmaParam.value() < 0) ) - throw runtime_error("Invalid sigma"); + throw std::runtime_error("Invalid sigma"); // minimum check bool bMut = true; if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) { - cerr << "Warning: no mutation" << endl; + std::cerr << "Warning: no mutation" << std::endl; bMut = false; } if (!bCross && !bMut) - throw runtime_error("No operator called in SGA operator definition!!!"); + throw std::runtime_error("No operator called in SGA operator definition!!!"); // Create the CombinedMonOp eoPropCombinedMonOp *ptCombinedMonOp = NULL; diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index 0a5bc8d01..5f2d938a7 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -70,17 +70,17 @@ template eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded& _init) { - // get vector size + // get std::vector size unsigned vecSize = _init.size(); // First, decide whether the objective variables are bounded eoValueParam& boundsParam = _parser.createParam(eoRealVectorBounds(vecSize,eoDummyRealNoBounds), "objectBounds", "Bounds for variables", 'B', "Variation Operators"); // now we read Pcross and Pmut, - eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + eoValueParam& operatorParam = _parser.createParam(std::string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); - if (operatorParam.value() != string("SGA")) - throw runtime_error("Sorry, only SGA-like operator available right now\n"); + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Sorry, only SGA-like operator available right now\n"); // now we read Pcross and Pmut, // and create the eoGenOp that is exactly @@ -89,21 +89,21 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoValueParam& pCrossParam = _parser.createParam(1.0, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); // minimum check if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) - throw runtime_error("Invalid pCross"); + throw std::runtime_error("Invalid pCross"); eoValueParam& pMutParam = _parser.createParam(1.0, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); // minimum check if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) - throw runtime_error("Invalid pMut"); + throw std::runtime_error("Invalid pMut"); // crossover ///////////// // ES crossover - eoValueParam& crossTypeParam = _parser.createParam(string("global"), "crossType", "Type of ES recombination (global or standard)", 'C', "Variation Operators"); + eoValueParam& crossTypeParam = _parser.createParam(std::string("global"), "crossType", "Type of ES recombination (global or standard)", 'C', "Variation Operators"); - eoValueParam& crossObjParam = _parser.createParam(string("discrete"), "crossObj", "Recombination of object variables (discrete, intermediate or none)", 'O', "Variation Operators"); - eoValueParam& crossStdevParam = _parser.createParam(string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate, discrete or none)", 'S', "Variation Operators"); + eoValueParam& crossObjParam = _parser.createParam(std::string("discrete"), "crossObj", "Recombination of object variables (discrete, intermediate or none)", 'O', "Variation Operators"); + eoValueParam& crossStdevParam = _parser.createParam(std::string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate, discrete or none)", 'S', "Variation Operators"); // The pointers: first the atom Xover eoBinOp *ptObjAtomCross = NULL; @@ -112,33 +112,33 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoGenOp *ptCross; // check for the atom Xovers - if (crossObjParam.value() == string("discrete")) + if (crossObjParam.value() == std::string("discrete")) ptObjAtomCross = new eoDoubleExchange; - else if (crossObjParam.value() == string("intermediate")) + else if (crossObjParam.value() == std::string("intermediate")) ptObjAtomCross = new eoDoubleIntermediate; - else if (crossObjParam.value() == string("none")) + else if (crossObjParam.value() == std::string("none")) ptObjAtomCross = new eoBinCloneOp; - else throw runtime_error("Invalid Object variable crossover type"); + else throw std::runtime_error("Invalid Object variable crossover type"); - if (crossStdevParam.value() == string("discrete")) + if (crossStdevParam.value() == std::string("discrete")) ptStdevAtomCross = new eoDoubleExchange; - else if (crossStdevParam.value() == string("intermediate")) + else if (crossStdevParam.value() == std::string("intermediate")) ptStdevAtomCross = new eoDoubleIntermediate; - else if (crossStdevParam.value() == string("none")) + else if (crossStdevParam.value() == std::string("none")) ptStdevAtomCross = new eoBinCloneOp; - else throw runtime_error("Invalid mutation strategy parameter crossover type"); + else throw std::runtime_error("Invalid mutation strategy parameter crossover type"); // and build the indi Xover - if (crossTypeParam.value() == string("global")) + if (crossTypeParam.value() == std::string("global")) ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); - else if (crossTypeParam.value() == string("standard")) + else if (crossTypeParam.value() == std::string("standard")) { // using a standard eoBinOp, but wrap it into an eoGenOp eoBinOp & crossTmp = _state.storeFunctor( new eoEsStandardXover(*ptObjAtomCross, *ptStdevAtomCross) ); ptCross = new eoBinGenOp(crossTmp); } - else throw runtime_error("Invalide Object variable crossover type"); + else throw std::runtime_error("Invalide Object variable crossover type"); // now that everything is OK, DON'T FORGET TO STORE MEMORY _state.storeFunctor(ptObjAtomCross); diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 6e3e377ab..80fc42e4c 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -67,7 +67,7 @@ template eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded& _init) { - // get vector size + // get std::vector size unsigned vecSize = _init.size(); // First, decide whether the objective variables are bounded @@ -77,10 +77,10 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< // while Maarten codes the full tree-structured general operator input // BTW we must leave that simple version available somehow, as it is the one // that 90% people use! - eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + eoValueParam& operatorParam = _parser.createParam(std::string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); - if (operatorParam.value() != string("SGA")) - throw runtime_error("Sorry, only SGA-like operator available right now\n"); + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Sorry, only SGA-like operator available right now\n"); // now we read Pcross and Pmut, // the relative weights for all crossovers -> proportional choice @@ -91,12 +91,12 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); // minimum check if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) - throw runtime_error("Invalid pCross"); + throw std::runtime_error("Invalid pCross"); eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); // minimum check if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) - throw runtime_error("Invalid pMut"); + throw std::runtime_error("Invalid pMut"); // the crossovers ///////////////// @@ -104,29 +104,29 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoValueParam& alphaParam = _parser.createParam(double(0.0), "alpha", "Bound for factor of linear recombinations", 'a', "Variation Operators" ); // minimum check if ( (alphaParam.value() < 0) ) - throw runtime_error("Invalid BLX coefficient alpha"); + throw std::runtime_error("Invalid BLX coefficient alpha"); eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Variation Operators" ); // minimum check if ( (segmentRateParam.value() < 0) ) - throw runtime_error("Invalid segmentRate"); + throw std::runtime_error("Invalid segmentRate"); eoValueParam& hypercubeRateParam = _parser.createParam(double(1.0), "hypercubeRate", "Relative rate for hypercube crossover", 'A', "Variation Operators" ); // minimum check if ( (hypercubeRateParam.value() < 0) ) - throw runtime_error("Invalid hypercubeRate"); + throw std::runtime_error("Invalid hypercubeRate"); eoValueParam& uxoverRateParam = _parser.createParam(double(1.0), "uxoverRate", "Relative rate for uniform crossover", 'A', "Variation Operators" ); // minimum check if ( (uxoverRateParam.value() < 0) ) - throw runtime_error("Invalid uxoverRate"); + throw std::runtime_error("Invalid uxoverRate"); // minimum check bool bCross = true; if (segmentRateParam.value()+hypercubeRateParam.value()+uxoverRateParam.value()==0) { - cerr << "Warning: no crossover" << endl; + std::cerr << "Warning: no crossover" << std::endl; bCross = false; } @@ -161,22 +161,22 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoValueParam & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Variation Operators" ); // minimum check if ( (epsilonParam.value() < 0) ) - throw runtime_error("Invalid epsilon"); + throw std::runtime_error("Invalid epsilon"); eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Variation Operators" ); // minimum check if ( (uniformMutRateParam.value() < 0) ) - throw runtime_error("Invalid uniformMutRate"); + throw std::runtime_error("Invalid uniformMutRate"); eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Variation Operators" ); // minimum check if ( (detMutRateParam.value() < 0) ) - throw runtime_error("Invalid detMutRate"); + throw std::runtime_error("Invalid detMutRate"); eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Variation Operators" ); // minimum check if ( (normalMutRateParam.value() < 0) ) - throw runtime_error("Invalid normalMutRate"); + throw std::runtime_error("Invalid normalMutRate"); eoValueParam & sigmaParam = _parser.createParam(0.3, "sigma", "Sigma (fixed) for Gaussian mutation", 's', "Variation Operators" ); @@ -184,11 +184,11 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< bool bMut = true; if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) { - cerr << "Warning: no mutation" << endl; + std::cerr << "Warning: no mutation" << std::endl; bMut = false; } if (!bCross && !bMut) - throw runtime_error("No operator called in SGA operator definition!!!"); + throw std::runtime_error("No operator called in SGA operator definition!!!"); // Create the CombinedMonOp eoPropCombinedMonOp *ptCombinedMonOp = NULL; diff --git a/eo/src/es/make_real.h b/eo/src/es/make_real.h index 5c776ff43..8c227f269 100644 --- a/eo/src/es/make_real.h +++ b/eo/src/es/make_real.h @@ -25,7 +25,7 @@ //----------------------------------------------------------------------------- /** This file contains all ***INSTANCIATED*** declarations of all components - * of the library for ***vector*** evolution inside EO. + * of the library for ***std::vector*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * * The corresponding ***INSTANCIATED*** definitions are contained in diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 558903b18..96383c020 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -35,9 +35,9 @@ //----------------------------------------------------------------------------- -#include // ostream, istream +#include // std::ostream, std::istream #include // bind2nd -#include // string +#include // std::string #include @@ -50,7 +50,7 @@ /** eoBit: implementation of bitstring chromosome. \class eoBit eoBit.h ga/eoBit.h \ingroup bitstring - * based on STL's vector specialization. + * based on STL's std::vector specialization. */ template class eoBit: public eoVector { @@ -58,45 +58,45 @@ template class eoBit: public eoVector /** * (Default) Constructor. - * @param size Size of the binary string. + * @param size Size of the binary std::string. */ eoBit(unsigned size = 0, bool value = false): eoVector(size, value) {} /// My class name. - virtual string className() const + virtual std::string className() const { return "eoBit"; } /** * To print me on a stream. - * @param os The ostream. + * @param os The std::ostream. */ - virtual void printOn(ostream& os) const + virtual void printOn(std::ostream& os) const { EO::printOn(os); os << ' '; os << size() << ' '; - copy(begin(), end(), ostream_iterator(os)); + std::copy(begin(), end(), std::ostream_iterator(os)); } /** * To read me from a stream. - * @param is The istream. + * @param is The std::istream. */ - virtual void readFrom(istream& is) + virtual void readFrom(std::istream& is) { EO::readFrom(is); unsigned s; is >> s; - string bits; + std::string bits; is >> bits; if (is) { resize(bits.size()); - transform(bits.begin(), bits.end(), begin(), - bind2nd(equal_to(), '1')); + std::transform(bits.begin(), bits.end(), begin(), + std::bind2nd(std::equal_to(), '1')); } } }; diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 8ab786528..3c1ff1b2e 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2001-09-08 05:59:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.14 2001-09-08 05:59:17 evomarc Exp $ $Author: evomarc $ + CVS Info: $Date: 2003-02-27 19:24:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.15 2003-02-27 19:24:47 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -45,7 +45,7 @@ template class eoOneBitFlip: public eoMonOp { public: /// The class name. - virtual string className() const { return "eoOneBitFlip"; } + virtual std::string className() const { return "eoOneBitFlip"; } /** * Change one bit. @@ -75,7 +75,7 @@ template class eoDetBitFlip: public eoMonOp eoDetBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} /// The class name. - virtual string className() const { return "eoDetBitFlip"; } + virtual std::string className() const { return "eoDetBitFlip"; } /** * Change num_bit bits. @@ -112,7 +112,7 @@ template class eoBitMutation: public eoMonOp rate(_rate), normalize(_normalize) {} /// The class name. - virtual string className() const { return "eoBitMutation"; } + virtual std::string className() const { return "eoBitMutation"; } /** * Mutate a chromosome. @@ -147,7 +147,7 @@ template class eoBitInversion: public eoMonOp { public: /// The class name. - virtual string className() const { return "eoBitInversion"; } + virtual std::string className() const { return "eoBitInversion"; } /** * Inverts a range of bits in a binary chromosome. @@ -158,9 +158,9 @@ template class eoBitInversion: public eoMonOp unsigned u1 = eo::rng.random(chrom.size() + 1) , u2; do u2 = eo::rng.random(chrom.size() + 1); while (u1 == u2); - unsigned r1 = min(u1, u2), r2 = max(u1, u2); + unsigned r1 = std::min(u1, u2), r2 = std::max(u1, u2); - reverse(chrom.begin() + r1, chrom.begin() + r2); + std::reverse(chrom.begin() + r1, chrom.begin() + r2); return true; } }; @@ -175,10 +175,10 @@ template class eoBitNext: public eoMonOp { public: /// The class name. - virtual string className() const { return "eoBitNext"; } + virtual std::string className() const { return "eoBitNext"; } /** - * Change the bit string x to be x+1. + * Change the bit std::string x to be x+1. * @param chrom The chromosome to be added one. */ bool operator()(Chrom& chrom) @@ -209,10 +209,10 @@ template class eoBitPrev: public eoMonOp { public: /// The class name. - virtual string className() const { return "eoBitPrev"; } + virtual std::string className() const { return "eoBitPrev"; } /** - * Change the bit string x to be x-1. + * Change the bit std::string x to be x-1. * @param chrom The chromosome to be substracted one. */ bool operator()(Chrom& chrom) @@ -243,7 +243,7 @@ template class eo1PtBitXover: public eoQuadOp { public: /// The class name. - virtual string className() const { return "eo1PtBitXover"; } + virtual std::string className() const { return "eo1PtBitXover"; } /** * 1-point crossover for binary chromosomes. @@ -252,12 +252,12 @@ template class eo1PtBitXover: public eoQuadOp */ bool operator()(Chrom& chrom1, Chrom& chrom2) { - unsigned site = eo::rng.random(min(chrom1.size(), chrom2.size())); + unsigned site = eo::rng.random(std::min(chrom1.size(), chrom2.size())); if (!std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) { - swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); + std::swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); return true; } @@ -278,21 +278,21 @@ template class eoUBitXover: public eoQuadOp eoUBitXover(const float& _preference = 0.5): preference(_preference) { if ( (_preference <= 0.0) || (_preference >= 1.0) ) - runtime_error("UxOver --> invalid preference"); + std::runtime_error("UxOver --> invalid preference"); } /// The class name. - virtual string className() const { return "eoUBitXover"; } + virtual std::string className() const { return "eoUBitXover"; } /** * Uniform crossover for binary chromosomes. * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. - * @runtime_error if sizes don't match + * @std::runtime_error if sizes don't match */ bool operator()(Chrom& chrom1, Chrom& chrom2) { if ( chrom1.size() != chrom2.size()) - runtime_error("UxOver --> chromosomes sizes don't match" ); + std::runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i class eoNPtsBitXover: public eoQuadOp eoNPtsBitXover(const unsigned& _num_points = 2): num_points(_num_points) { if (num_points < 1) - runtime_error("NxOver --> invalid number of points"); + std::runtime_error("NxOver --> invalid number of points"); } /// The class name. - virtual string className() const { return "eoNPtsBitXover"; } + virtual std::string className() const { return "eoNPtsBitXover"; } /** * n-point crossover for binary chromosomes. @@ -336,10 +336,10 @@ template class eoNPtsBitXover: public eoQuadOp */ bool operator()(Chrom& chrom1, Chrom& chrom2) { - unsigned max_size = min(chrom1.size(), chrom2.size()); - unsigned max_points = min(max_size - 1, num_points); + unsigned max_size = std::min(chrom1.size(), chrom2.size()); + unsigned max_points = std::min(max_size - 1, num_points); - vector points(max_size, false); + std::vector points(max_size, false); // select ranges of bits to swap do { @@ -362,7 +362,7 @@ template class eoNPtsBitXover: public eoQuadOp change = !change; if (change) - swap(chrom1[bit], chrom2[bit]); + std::swap(chrom1[bit], chrom2[bit]); } return true; @@ -374,8 +374,8 @@ template class eoNPtsBitXover: public eoQuadOp -/** eoBitGxOver --> Npts crossover when bistring considered - as a string of binary-encoded genes (exchanges genes) +/** eoBitGxOver --> Npts crossover when bistd::string considered + as a std::string of binary-encoded genes (exchanges genes) Is anybody still using it apart from historians ??? :-) \class eoBitGxOver eoBitOp.h ga/eoBitOp.h \ingroup bitstring @@ -389,13 +389,13 @@ template class eoBitGxOver: public eoQuadOp gene_size(_gene_size), num_points(_num_points) { if (gene_size < 1) - runtime_error("GxOver --> invalid gene size"); + std::runtime_error("GxOver --> invalid gene size"); if (num_points < 1) - runtime_error("GxOver --> invalid number of points"); + std::runtime_error("GxOver --> invalid number of points"); } /// The class name - virtual string className() const { return "eoBitGxOver"; } + virtual std::string className() const { return "eoBitGxOver"; } /** * Gene crossover for binary chromosomes. @@ -404,10 +404,10 @@ template class eoBitGxOver: public eoQuadOp */ bool operator()(Chrom& chrom1, Chrom& chrom2) { - unsigned max_genes = min(chrom1.size(), chrom2.size()) / gene_size; - unsigned cut_genes = min(max_genes, num_points); + unsigned max_genes = std::min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = std::min(max_genes, num_points); - vector points(max_genes, false); + std::vector points(max_genes, false); // selects genes to swap do { @@ -424,7 +424,7 @@ template class eoBitGxOver: public eoQuadOp // swaps genes for (unsigned i = 0; i < points.size(); i++) if (points[i]) - swap_ranges(chrom1.begin() + i * gene_size, + std::swap_ranges(chrom1.begin() + i * gene_size, chrom1.begin() + i * gene_size + gene_size, chrom2.begin() + i * gene_size); diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h index 9ec142bdc..27394aef6 100644 --- a/eo/src/ga/eoBitOpFactory.h +++ b/eo/src/ga/eoBitOpFactory.h @@ -50,22 +50,22 @@ public: virtual ~eoBitOpFactory() {}; //@} - /** Another factory method: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ + /** Another factory method: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ objectType parameter1 parameter2 ... parametern\\ - If there are problems, an exception is raised; it should be caught at the + If there are problems, an std::exception is raised; it should be caught at the upper level, because it might be something for that level\\ - At the same time, it catches exceptions thrown at a lower level, which will + At the same time, it catches std::exceptions thrown at a lower level, which will indicate that whatever is in the stream is for this method to process @param _is an stream from where a single line will be read - @throw runtime_exception if the object type is not known + @throw runtime_std::exception if the object type is not known */ - virtual eoOp* make(istream& _is) + virtual eoOp* make(std::istream& _is) { eoOp * opPtr = NULL; try { opPtr = eoFactory::make( _is ); - } catch ( const string& objectTypeStr ) { + } catch ( const std::string& objectTypeStr ) { if ( objectTypeStr == "eoBinBitFlip" ) { opPtr = new eoOneBitFlip( ); } diff --git a/eo/src/ga/eoPBILAdditive.h b/eo/src/ga/eoPBILAdditive.h index 9f32859b6..29b3fdd66 100644 --- a/eo/src/ga/eoPBILAdditive.h +++ b/eo/src/ga/eoPBILAdditive.h @@ -56,7 +56,7 @@ public: LR(0.0), nbBest(_nbBest), nbWorst(_nbWorst) { if (nbBest+nbWorst == 0) - throw runtime_error("Must update either from best or from worst in eoPBILAdditive"); + throw std::runtime_error("Must update either from best or from worst in eoPBILAdditive"); if (_nbBest) { @@ -79,10 +79,10 @@ public: { eoPBILDistrib& distrib = dynamic_cast&>(_distrib); - vector & p = distrib.value(); + std::vector & p = distrib.value(); unsigned i, popSize=_pop.size(); - vector result; + std::vector result; _pop.sort(result); // is it necessary to sort the whole population? // but I'm soooooooo lazy !!! diff --git a/eo/src/ga/eoPBILDistrib.h b/eo/src/ga/eoPBILDistrib.h index 96a781bcc..91720acb3 100644 --- a/eo/src/ga/eoPBILDistrib.h +++ b/eo/src/ga/eoPBILDistrib.h @@ -34,21 +34,21 @@ * It encodes a univariate distribution on the space of bitstrings, * i.e. one probability for each bit to be one * - * It is an eoValueParam > : - * the vector stores the probabilities that each bit is 1 + * It is an eoValueParam > : + * the std::vector stores the probabilities that each bit is 1 * * It is still pure virtual, as the update method needs to be specified */ template class eoPBILDistrib : public eoDistribution, - public eoValueParam > + public eoValueParam > { public: /** Ctor with size of genomes, and update parameters */ eoPBILDistrib(unsigned _genomeSize) : eoDistribution(), - eoValueParam >(vector(_genomeSize, 0.5), "Distribution"), + eoValueParam >(std::vector(_genomeSize, 0.5), "Distribution"), genomeSize(_genomeSize) {} @@ -65,7 +65,7 @@ public: unsigned Size() {return genomeSize;} /** printing... */ - virtual void printOn(ostream& os) const + virtual void printOn(std::ostream& os) const { os << value().size() << ' '; for (unsigned i=0; i> sz; @@ -91,7 +91,7 @@ public: unsigned int size() {return genomeSize;} - virtual string className() const {return "eoPBILDistrib";}; + virtual std::string className() const {return "eoPBILDistrib";}; private: unsigned genomeSize; // size of indis diff --git a/eo/src/ga/eoPBILOrg.h b/eo/src/ga/eoPBILOrg.h index da9490648..b236412a5 100644 --- a/eo/src/ga/eoPBILOrg.h +++ b/eo/src/ga/eoPBILOrg.h @@ -54,7 +54,7 @@ public: const EOT & best = _pop.best_element(); eoPBILDistrib& distrib = dynamic_cast&>(_distrib); - vector & p = distrib.value(); + std::vector & p = distrib.value(); for (unsigned g=0; g & do_make_PBILdistrib(eoParser & _parser, eoState& _state, E // chromosome size: unsigned theSize; // but it might have been already read in the definition fo the performance - eoParam* ptParam = _parser.getParamWithLongName(string("chromSize")); + eoParam* ptParam = _parser.getParamWithLongName(std::string("chromSize")); if (!ptParam) // not already defined: read it here { @@ -72,7 +72,7 @@ eoPBILDistrib & do_make_PBILdistrib(eoParser & _parser, eoState& _state, E _state.storeFunctor(ptDistrib); // now the initialization: read a previously saved distribution, or random - eoValueParam& loadNameParam = _parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ); + eoValueParam& loadNameParam = _parser.createParam(std::string(""), "Load","A save file to restart from",'L', "Persistence" ); if (loadNameParam.value() != "") // something to load { // create another state for reading diff --git a/eo/src/ga/make_PBILupdate.h b/eo/src/ga/make_PBILupdate.h index db9241ea6..9b4ffd83c 100644 --- a/eo/src/ga/make_PBILupdate.h +++ b/eo/src/ga/make_PBILupdate.h @@ -50,7 +50,7 @@ eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, // ast the moment, a single update rule is available // but at some point we'll have to choose among different rules - string UType = _parser.createParam(string("PBIL"), "updateRule", "Type of update rule (only PBIL additive at the moment)", 'U', "Algorithm").value(); + std::string UType = _parser.createParam(std::string("PBIL"), "updateRule", "Type of update rule (only PBIL additive at the moment)", 'U', "Algorithm").value(); unsigned nbBest = _parser.createParam(unsigned(1), "nbBest", "Number of good guys to update from", 'B', "Algorithm").value(); double LRBest = _parser.createParam(0.1, "LRBest", "Learning Rate (from best guys)", 'L', "Algorithm").value(); @@ -61,7 +61,7 @@ eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, // a pointer to choose among several possible types eoDistribUpdater * ptUpdate; - if (UType == string("PBIL")) + if (UType == std::string("PBIL")) { if ( (nbWorst == 0) && (nbBest == 1) ) ptUpdate = new eoPBILOrg(LRBest, tolerance); @@ -69,7 +69,7 @@ eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, ptUpdate = new eoPBILAdditive(LRBest, nbBest, tolerance, LRWorst, nbWorst); } else - throw runtime_error("Only PBIL additive update rule available at the moment"); + throw std::runtime_error("Only PBIL additive update rule available at the moment"); // done: don't forget to store the allocated pointers _state.storeFunctor(ptUpdate); diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index bf8d27d09..85af41ffb 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -72,10 +72,10 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init // general operator input // BTW we must leave that simple version available somehow, as it is the one // that 90% people use! - eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + eoValueParam& operatorParam = _parser.createParam(std::string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); - if (operatorParam.value() != string("SGA")) - throw runtime_error("Only SGA-like operator available right now\n"); + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Only SGA-like operator available right now\n"); // now we read Pcross and Pmut, // the relative weights for all crossovers -> proportional choice @@ -86,12 +86,12 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); // minimum check if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) - throw runtime_error("Invalid pCross"); + throw std::runtime_error("Invalid pCross"); eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); // minimum check if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) - throw runtime_error("Invalid pMut"); + throw std::runtime_error("Invalid pMut"); // the crossovers ///////////////// @@ -99,23 +99,23 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init eoValueParam& onePointRateParam = _parser.createParam(double(1.0), "onePointRate", "Relative rate for one point crossover", '1', "Variation Operators" ); // minimum check if ( (onePointRateParam.value() < 0) ) - throw runtime_error("Invalid onePointRate"); + throw std::runtime_error("Invalid onePointRate"); eoValueParam& twoPointsRateParam = _parser.createParam(double(1.0), "twoPointRate", "Relative rate for two point crossover", '2', "Variation Operators" ); // minimum check if ( (twoPointsRateParam.value() < 0) ) - throw runtime_error("Invalid twoPointsRate"); + throw std::runtime_error("Invalid twoPointsRate"); eoValueParam& uRateParam = _parser.createParam(double(2.0), "uRate", "Relative rate for uniform crossover", 'U', "Variation Operators" ); // minimum check if ( (uRateParam.value() < 0) ) - throw runtime_error("Invalid uRate"); + throw std::runtime_error("Invalid uRate"); // minimum check bool bCross = true; if (onePointRateParam.value()+twoPointsRateParam.value()+uRateParam.value()==0) { - cerr << "Warning: no crossover" << endl; + std::cerr << "Warning: no crossover" << std::endl; bCross = false; } @@ -146,23 +146,23 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init eoValueParam & pMutPerBitParam = _parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Variation Operators" ); // minimum check if ( (pMutPerBitParam.value() < 0) || (pMutPerBitParam.value() > 0.5) ) - throw runtime_error("Invalid pMutPerBit"); + throw std::runtime_error("Invalid pMutPerBit"); eoValueParam & bitFlipRateParam = _parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 's', "Variation Operators" ); // minimum check if ( (bitFlipRateParam.value() < 0) ) - throw runtime_error("Invalid bitFlipRate"); + throw std::runtime_error("Invalid bitFlipRate"); eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Variation Operators" ); // minimum check if ( (oneBitRateParam.value() < 0) ) - throw runtime_error("Invalid oneBitRate"); + throw std::runtime_error("Invalid oneBitRate"); // minimum check bool bMut = true; if (bitFlipRateParam.value()+oneBitRateParam.value()==0) { - cerr << "Warning: no mutation" << endl; + std::cerr << "Warning: no mutation" << std::endl; bMut = false; } diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 5a36a5dcd..2f92d593a 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -37,7 +37,6 @@ #include using namespace gp_parse_tree; -using namespace std; /** \defgroup ParseTree @@ -93,7 +92,7 @@ public : /** * To read me from a stream - * @param is The istream + * @param is The std::istream */ eoParseTree(std::istream& is) : EO(), parse_tree() @@ -102,11 +101,11 @@ public : } /// My class name - string className(void) const { return "eoParseTree"; } + std::string className(void) const { return "eoParseTree"; } /** * To print me on a stream - * @param os The ostream + * @param os The std::ostream */ void printOn(std::ostream& os) const { @@ -120,7 +119,7 @@ public : /** * To read me from a stream - * @param is The istream + * @param is The std::istream */ void readFrom(std::istream& is) { @@ -132,7 +131,7 @@ public : is >> sz; - vector v(sz); + std::vector v(sz); unsigned i; @@ -158,7 +157,7 @@ public : fitness(fit); - std::copy(istream_iterator(is), istream_iterator(), back_inserter(*this)); + std::copy(std::istream_iterator(is), std::istream_iterator(), back_inserter(*this)); */ } }; diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index d77c2d480..3cd95b04f 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -35,7 +35,6 @@ #include using namespace gp_parse_tree; -using namespace std; /** eoParseTreeDepthInit : the initializer class for eoParseTree \class eoParseTreeDepthInit eoParseTreeDepthInit.h gp/eoParseTreeDepthInit.h @@ -51,7 +50,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > protected: // a binary predicate for sorting // hopefully this will work with M$VC++ 6.0 - struct lt_arity:public binary_function + struct lt_arity:public std::binary_function { bool operator()(const Node &_node1, const Node &_node2) { return (_node1.arity() < _node2.arity());}; }; @@ -63,13 +62,13 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > /** * Constructor * @parm _max_depth The maximum depth of a tree - * @param _initializor A vector containing the possible nodes + * @param _initializor A std::vector containing the possible nodes * @param _grow False results in a full tree, True result is a randomly grown tree * @param _ramped_half_and_half True results in Ramped Half and Half Initialization */ eoParseTreeDepthInit( unsigned _max_depth, - const vector& _initializor, + const std::vector& _initializor, bool _grow = true, bool _ramped_half_and_half = false) : @@ -82,21 +81,21 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > { if(initializor.empty()) { - throw logic_error("eoParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); + throw std::logic_error("eoParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); } - // lets sort the initializor vector according to arity (so we can be sure the terminals are in front) + // lets sort the initializor std::vector according to arity (so we can be sure the terminals are in front) // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j stable_sort(initializor.begin(), initializor.end(), lt_arity()); } /// My class name - virtual string className() const { return "eoParseTreeDepthInit"; }; + virtual std::string className() const { return "eoParseTreeDepthInit"; }; /**initialize a tree * @param _tree : the tree to be initialized */ void operator()(EoType& _tree) { - list sequence; + std::list sequence; generate(sequence, current_depth); parse_tree tmp(sequence.begin(), sequence.end()); @@ -117,11 +116,11 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > } private : - void generate(list& sequence, int the_max, int last_terminal = -1) + void generate(std::list& sequence, int the_max, int last_terminal = -1) { if (last_terminal == -1) { // check where the last terminal in the sequence resides - typename vector::iterator it; + typename std::vector::iterator it; for (it = initializor.begin(); it != initializor.end(); ++it) { if (it->arity() > 0) @@ -133,12 +132,12 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > if (the_max == 1) { // generate terminals only - typename vector::iterator it = initializor.begin() + rng.random(last_terminal); + typename std::vector::iterator it = initializor.begin() + rng.random(last_terminal); sequence.push_front(*it); return; } - typename vector::iterator what_it; + typename std::vector::iterator what_it; if (grow) { @@ -171,12 +170,12 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > * @param pop the population to be created * @param population_size the size of the population to be created * @param init_max_depth the initial maximum tree depth - * @param initializor A vector containing the possible nodes + * @param initializor A std::vector containing the possible nodes \ingroup ParseTree */ template -void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned int population_size, unsigned int init_max_depth, vector &initializor) +void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned int population_size, unsigned int init_max_depth, std::vector &initializor) { typedef eoParseTree EoType; typedef eoPop< EoType > Pop; @@ -185,10 +184,10 @@ void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned in unsigned int part_pop_size = population_size / (2*M); unsigned int m=0; - cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << endl; - cerr << " This function is now obsolete and might be removed in the future so you should"<< endl; - cerr << " update your code to use: " << endl << endl; - cerr << " eoParseTreeDepthInit( _max_depth, _initializer, bool _grow, bool _ramped_half_and_half)" << endl << endl; + std::cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << std::endl; + std::cerr << " This function is now obsolete and might be removed in the future so you should"<< std::endl; + std::cerr << " update your code to use: " << std::endl << std::endl; + std::cerr << " eoParseTreeDepthInit( _max_depth, _initializer, bool _grow, bool _ramped_half_and_half)" << std::endl << std::endl; pop.clear(); diff --git a/eo/src/gp/eoParseTreeOp.h b/eo/src/gp/eoParseTreeOp.h index 649b1926d..1cc91a733 100644 --- a/eo/src/gp/eoParseTreeOp.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -51,7 +51,7 @@ public: : eoQuadOp(), max_length(_max_length) {}; /// the ckassname - virtual string className() const { return "eoSubtreeXOver"; }; + virtual std::string className() const { return "eoSubtreeXOver"; }; /// Dtor virtual ~eoSubtreeXOver () {}; @@ -99,7 +99,7 @@ public: {}; /// the class name - virtual string className() const { return "eoBranchMutation"; }; + virtual std::string className() const { return "eoBranchMutation"; }; /// Dtor virtual ~eoBranchMutation() {}; @@ -152,14 +152,14 @@ public: /** * Constructor - * @param _initializor The vector of Nodes given to the eoGpDepthInitializer + * @param _initializor The std::vector of Nodes given to the eoGpDepthInitializer */ - eoPointMutation( vector& _initializor) + eoPointMutation( std::vector& _initializor) : eoMonOp(), initializor(_initializor) {}; /// the class name - virtual string className() const { return "eoPointMutation"; }; + virtual std::string className() const { return "eoPointMutation"; }; /// Dtor virtual ~eoPointMutation() {}; @@ -191,7 +191,7 @@ public: } private : - vector& initializor; + std::vector& initializor; }; @@ -217,7 +217,7 @@ public: {}; /// The class name - virtual string className() const { return "eoExpansionMutation"; }; + virtual std::string className() const { return "eoExpansionMutation"; }; /// Dtor virtual ~eoExpansionMutation() {}; @@ -284,7 +284,7 @@ public: {}; /// The class name - virtual string className() const { return "eoCollapseSubtreeMutation"; }; + virtual std::string className() const { return "eoCollapseSubtreeMutation"; }; /// Dtor virtual ~eoCollapseSubtreeMutation() {}; @@ -347,7 +347,7 @@ public: {}; /// The class name - virtual string className() const { return "eoHoistMutation"; }; + virtual std::string className() const { return "eoHoistMutation"; }; /// Dtor virtual ~eoHoistMutation() {}; diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index e16d6bd07..3dac6f134 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -34,7 +34,6 @@ using namespace gp_parse_tree; -using namespace std; #define TERMINAL 0 @@ -68,12 +67,12 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > /** * Constructor * @parm _max_depth The maximum depth of a tree - * @param _initializor A vector containing the possible nodes + * @param _initializor A std::vector containing the possible nodes * @param _grow False results in a full tree, True result is a randomly grown tree */ eoStParseTreeDepthInit( unsigned _max_depth, - const vector& _node, + const std::vector& _node, const int& _return_type, bool _grow = true) : @@ -84,48 +83,48 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > { if(_node.empty()) { - throw logic_error("eoStParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); + throw std::logic_error("eoStParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); } unsigned int i=0; int arity=0; int type=0; - vector node_vector; + std::vector node_std::vector; for(i=0; i < _node.size(); i++) { arity = _node[i].arity(); type = _node[i].type(); if(arity==0) { - node_vector = node[type][TERMINAL]; - node_vector.push_back(_node[i]); - node[type][TERMINAL]= node_vector; + node_std::vector = node[type][TERMINAL]; + node_std::vector.push_back(_node[i]); + node[type][TERMINAL]= node_std::vector; } else //if (arity != 0) // non-terminal { - node_vector = node[type][NONTERMINAL]; - node_vector.push_back(_node[i]); - node[type][NONTERMINAL] = node_vector; + node_std::vector = node[type][NONTERMINAL]; + node_std::vector.push_back(_node[i]); + node[type][NONTERMINAL] = node_std::vector; } - node_vector = node[type][ALL]; - node_vector.push_back(_node[i]); - node[type][ALL] = node_vector; + node_std::vector = node[type][ALL]; + node_std::vector.push_back(_node[i]); + node[type][ALL] = node_std::vector; } } /// My class name - virtual string className() const { return "eoStParseTreeDepthInit"; }; + virtual std::string className() const { return "eoStParseTreeDepthInit"; }; /**initialize a tree * @param _tree : the tree to be initialized */ void operator()(EoType& _tree) { - list sequence; + std::list sequence; bool good_tree = false; do { @@ -137,7 +136,7 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > _tree.swap(tmp); } private : - bool generate(list& sequence, int the_max, int request_type) + bool generate(std::list& sequence, int the_max, int request_type) { int selected=0; @@ -182,7 +181,7 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > unsigned max_depth; - map < int, map < int, vector > > node; + map < int, map < int, std::vector > > node; int return_type; bool grow; diff --git a/eo/src/gp/eoStParseTreeOp.h b/eo/src/gp/eoStParseTreeOp.h index c2e975217..28bd3ff83 100644 --- a/eo/src/gp/eoStParseTreeOp.h +++ b/eo/src/gp/eoStParseTreeOp.h @@ -37,7 +37,7 @@ // a help function template -void get_possible_nodes(const EOT &_eo, vector &possible_nodes, const int type) +void get_possible_nodes(const EOT &_eo, std::vector &possible_nodes, const int type) { int n=0; possible_nodes.clear(); @@ -65,7 +65,7 @@ public: : eoQuadOp(), max_length(_max_length) {}; /// the ckassname - virtual string className() const { return "eoStSubtreeXOver"; }; + virtual std::string className() const { return "eoStSubtreeXOver"; }; /// Dtor virtual ~eoStSubtreeXOver () {}; @@ -78,7 +78,7 @@ public: bool operator()(EoType & _eo1, EoType & _eo2 ) { int i = 0; - vector nodes; + std::vector nodes; int n = 0; int type = 0; int j = 0; @@ -142,7 +142,7 @@ public: {}; /// the class name - virtual string className() const { return "eoStBranchMutation"; }; + virtual std::string className() const { return "eoStBranchMutation"; }; /// Dtor virtual ~eoStBranchMutation() {}; @@ -154,7 +154,7 @@ public: bool operator()(EoType& _eo1 ) { int i = rng.random(_eo1.size()); - vector nodes; + std::vector nodes; int type = _eo1[i]->type(); int j=0; int n=0; @@ -200,29 +200,29 @@ public: /** * Constructor - * @param _initializor The vector of Nodes given to the eoGpDepthInitializer + * @param _initializor The std::vector of Nodes given to the eoGpDepthInitializer */ - eoStPointMutation( vector& _node) + eoStPointMutation( std::vector& _node) : eoMonOp() { unsigned int i=0; int arity=0; int type=0; - vector node_vector; + std::vector node_std::vector; for(i=0; i < _node.size(); i++) { arity = _node[i].arity(); type = _node[i].type(); - node_vector = node[type][arity]; - node_vector.push_back(_node[i]); - node[type][arity]= node_vector; + node_std::vector = node[type][arity]; + node_std::vector.push_back(_node[i]); + node[type][arity]= node_std::vector; }; }; /// the class name - virtual string className() const { return "eoStPointMutation"; }; + virtual std::string className() const { return "eoStPointMutation"; }; /// Dtor virtual ~eoStPointMutation() {}; @@ -246,7 +246,7 @@ public: private : - map < int, map < int, vector > > node; + map < int, map < int, std::vector > > node; }; @@ -270,7 +270,7 @@ public: {}; /// the class name - virtual string className() const { return "eoStHoistMutation"; }; + virtual std::string className() const { return "eoStHoistMutation"; }; /// Dtor virtual ~eoStHoistMutation() {}; @@ -282,7 +282,7 @@ public: bool operator()(EoType& _eo1 ) { - vector nodes; + std::vector nodes; // get the type of the current tree int type = _eo1[ _eo1.size() - 1 ]->type(); diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index ca9892dc0..032606ee0 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -53,7 +53,7 @@ RetVal Node::operator()(RetVal, subtree<... , It values) where It is whatever type you desire (most of the time - this will be a vector containing the values of your + this will be a std::vector containing the values of your variables); 3) parse_tree::apply(RetVal, It values, It2 moreValues) @@ -129,22 +129,22 @@ tree[2] points at the root node4 Embedded iterators are implemented to iterate over nodes rather - than subtrees. So an easy way to copy your tree to a vector is: + than subtrees. So an easy way to copy your tree to a std::vector is: - vector vec(tree.size()); + std::vector vec(tree.size()); copy(tree.ebegin(), tree.eend(), vec.begin()); - You can also copy it to an ostream_iterator with this + You can also copy it to an std::ostream_iterator with this technique, given that your Node implements an appropriate - operator<<. Reinitializing a tree with the vector is also + operator<<. Reinitializing a tree with the std::vector is also simple: tree.clear(); copy(vec.begin(), vec.end(), back_inserter(tree)); - or from an istream: + or from an std::istream: - copy(istream_iterator(my_stream), istream_iterator(), back_inserter(tree)); + copy(std::istream_iterator(my_stream), std::istream_iterator(), back_inserter(tree)); Note that the back_inserter must be used as there is no resize member in the parse_tree. back_inserter will use @@ -972,7 +972,7 @@ void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) } template inline -void iter_swap(vector >::iterator a, vector > b) +void iter_swap(std::vector >::iterator a, std::vector > b) { a->swap(*b); }*/ diff --git a/eo/src/obsolete/eo1d.h b/eo/src/obsolete/eo1d.h index 7642692ff..73e83ea05 100644 --- a/eo/src/obsolete/eo1d.h +++ b/eo/src/obsolete/eo1d.h @@ -27,7 +27,7 @@ #ifndef _EO1D_H #define _EO1D_H -#include // for ostream +#include // for std::ostream // EO Includes #include @@ -59,7 +59,7 @@ least, a copy ctor, assignment operators, \deprecated As eo1d provides a so-called 'fat' interface, it might be wiser to use eoFixedLength or eoVariableLength instead, that derive from - vector and list respectively and (important) redirect the less than + std::vector and std::list respectively and (important) redirect the less than comparison operator to EO rather than the STL variants. @see eoFixedLength eoVariableLength @@ -80,15 +80,15 @@ public: /** Ctor using a random number generator and with an specified size @param _rndGen Random number generator @param _size lineal dimension of the eo1d - @param _ID An ID string, preferably unique + @param _ID An ID std::string, preferably unique */ - eo1d( unsigned _size, eoRnd& _rndGen, const string& _ID = ""); + eo1d( unsigned _size, eoRnd& _rndGen, const std::string& _ID = ""); - /** Ctor from a istream. It just passes the stream to EO, subclasses should + /** Ctor from a std::istream. It just passes the stream to EO, subclasses should have to implement this. @param _is the input stream */ - eo1d( istream& _is): EO(){ readFrom(is); } + eo1d( std::istream& _is): EO(){ readFrom(is); } /// Copy ctor eo1d( const eo1d& _eo ) @@ -108,7 +108,7 @@ public: @param _i index of the gene, which is the minimal unit. Must be an unsigned less than #length()# @return what's inside the gene, with the correct type - @exception out_of_range if _i > size() + @std::exception out_of_range if _i > size() */ virtual T getGene( unsigned _i ) const = 0; @@ -117,7 +117,7 @@ public: * for T must be defined . @param _i index @return what's inside the gene, with the correct type - @exception out_of_range if _i > size() + @std::exception out_of_range if _i > size() */ virtual void setGene( unsigned _i, const T& _value ) = 0; @@ -143,10 +143,10 @@ public: /** * Read object. Theoretically, the length is known in advance. All objects * Should call base class - * @param _s A istream. - * @throw runtime_exception If a valid object can't be read. + * @param _s A std::istream. + * @throw runtime_std::exception If a valid object can't be read. */ - virtual void readFrom(istream& _s) { + virtual void readFrom(std::istream& _s) { for ( unsigned i = 0; i < length(); i ++ ) { T tmp; @@ -160,8 +160,8 @@ public: /** Print itself: inherited from eoObject implementation. Instance from base classes are processed in base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ + @param _s the std::ostream in which things are written*/ + virtual void printOn( std::ostream& _s ) const{ for ( unsigned i = 0; i < length(); i ++ ) { _s << getGene( i ) << " "; } @@ -170,7 +170,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eo1d";}; + std::string className() const {return "eo1d";}; //@} @@ -184,11 +184,11 @@ public: /* Ctor using a random number generator and with an specified size @param _rndGen Random number generator @param _size lineal dimension of the eo1d - @param _ID An ID string, preferably unique + @param _ID An ID std::string, preferably unique */ template< class T, class fitnessT> eo1d::eo1d( unsigned _size, eoRnd& _rndGen, - const string& _ID ) + const std::string& _ID ) :EO ( _ID ) { for ( unsigned i = 0; i < _size; i ++ ) { insertGene( i, _rndGen() ); diff --git a/eo/src/obsolete/eo1dWDistance.h b/eo/src/obsolete/eo1dWDistance.h index 0cd940497..2019e95c7 100644 --- a/eo/src/obsolete/eo1dWDistance.h +++ b/eo/src/obsolete/eo1dWDistance.h @@ -27,7 +27,7 @@ #ifndef _EO1DWDISTANCE_H #define _EO1DWDISTANCE_H -#include // for ostream +#include // for std::ostream // EO Includes #include @@ -58,7 +58,7 @@ public: @param _i index of the gene, which is the minimal unit. Must be an unsigned less than #length()# @return what's inside the gene, with the correct type - @exception out_of_range if _i > size() + @std::exception out_of_range if _i > size() */ virtual T getGene( unsigned _i ) const { return innereo1d.getGene( _i ); @@ -69,7 +69,7 @@ public: * for T must be defined . @param _i index @return what's inside the gene, with the correct type - @exception out_of_range if _i > size() + @std::exception out_of_range if _i > size() */ virtual void setGene( unsigned _i, const T& _value ) { innereo1d.setGene( _i, _value); @@ -118,7 +118,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eo1dWDistance";}; + std::string className() const {return "eo1dWDistance";}; //@} diff --git a/eo/src/obsolete/eo2d.h b/eo/src/obsolete/eo2d.h index e02d5f159..c8d082197 100644 --- a/eo/src/obsolete/eo2d.h +++ b/eo/src/obsolete/eo2d.h @@ -39,7 +39,7 @@ Description.....: Implementation of a 2-dimensional chromosome. #ifndef _EO2D_H #define _EO2D_H -#include // for ostream +#include // for std::ostream #include // EO Includes @@ -81,18 +81,18 @@ public: @param _rows Initial number of rows @param _columns Initial number of columns @param _rndGen Random "T-type" generator - @param _ID An ID string, preferably unique + @param _ID An ID std::string, preferably unique */ eo2d( const unsigned _rows, const unsigned _columns, eoRnd& _rndGen, - const string& _ID = ""); + const std::string& _ID = ""); - /** Ctor from an istream. It just passes the stream to EO, subclasses should + /** Ctor from an std::istream. It just passes the stream to EO, subclasses should have to implement this. @param _is the input stream */ - eo2d( istream& _is): EO( _is ){}; + eo2d( std::istream& _is): EO( _is ){}; /// Copy ctor eo2d( const eo2d& _eo ) @@ -112,8 +112,8 @@ public: @param _r Index for rows. Must be an unsigned less than #numOfRows()# @param _c Index for columns. Must be an unsigned less than #numOfCols()# @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() + @std::exception out_of_range if _r >=numOfRows() + @std::exception out_of_range if _c >=numOfCols() */ virtual T getGene( const unsigned _r, const unsigned _j ) const = 0; @@ -124,8 +124,8 @@ public: @param _r Index for rows. Must be an unsigned less than #numOfRows()# @param _c Index for columns. Must be an unsigned less than #numOfCols()# @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() + @std::exception out_of_range if _r >=numOfRows() + @std::exception out_of_range if _c >=numOfCols() */ virtual void setGene( const unsigned _r, const unsigned _c, @@ -136,16 +136,16 @@ public: * Obviously, changes number of rows. @param _r Position where the new row will be inserted. @param _val Vector containing the new values to be inserted. - @exception invalid_argument If _val has not numOfCols() components. - @exception out_of_range If _r is greater than numOfRows() + @std::exception invalid_argument If _val has not numOfCols() components. + @std::exception out_of_range If _r is greater than numOfRows() */ virtual void insertRow( const unsigned _r, - const vector& _val ) = 0; + const std::vector& _val ) = 0; /** Eliminates the row at position _r; all the other genes will be shifted up. @param _r Number of he row to be deleted. - @exception out_of_range if _r >=numOfRows() + @std::exception out_of_range if _r >=numOfRows() */ virtual void deleteRow( const unsigned _r ) = 0; @@ -154,15 +154,15 @@ public: * Obviously, changes number of cols. @param _r Position where the new column will be inserted. @param _val Vector containing the new values to be inserted. - @exception invalid_argument if _val has not numOfRows() components. + @std::exception invalid_argument if _val has not numOfRows() components. */ virtual void insertCol( const unsigned _c, - const vector& _val ) = 0; + const std::vector& _val ) = 0; /** Eliminates the column at position _c; all the other columns will be shifted left. @param _c Number of he column to be deleted. - @exception out_of_range if _c >=numOfCols() + @std::exception out_of_range if _c >=numOfCols() */ virtual void deleteCol( const unsigned _c ) = 0; @@ -177,10 +177,10 @@ public: /** * Read object. Theoretically, the length is known in advance. All objects * Should call base class - * @param _s A istream. - * @throw runtime_exception If a valid object can't be read. + * @param _s A std::istream. + * @throw runtime_std::exception If a valid object can't be read. */ - virtual void readFrom(istream& _s) { + virtual void readFrom(std::istream& _s) { for ( unsigned r = 0; r < numOfRows(); ++r ) { for ( unsigned c = 0; c < numOfCols(); ++c ) { @@ -196,8 +196,8 @@ public: /** Print itself: inherited from eoObject implementation. Instance from base classes are processed in base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ + @param _s the std::ostream in which things are written*/ + virtual void printOn( std::ostream& _s ) const{ for ( unsigned r = 0; r < numOfRows(); ++r ) { for ( unsigned c = 0; c < numOfCols(); ++c ) { _s << getGene( r,c ) << " "; @@ -208,7 +208,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eo2d";}; + std::string className() const {return "eo2d";}; //@} @@ -223,13 +223,13 @@ public: @param _rows Initial number of rows @param _columns Initial number of columns @param _rndGen Random "T-type" generator - @param _ID An ID string, preferably unique + @param _ID An ID std::string, preferably unique */ template< class T, class fitnessT> eo2d::eo2d( const unsigned _rows, const unsigned _columns, eoRnd& _rndGen, - const string& _ID = "") + const std::string& _ID = "") :EO ( _ID ) { for ( unsigned r = 0; r < _rows; ++r ) { for ( unsigned c = 0; c < _cols; ++c ) { diff --git a/eo/src/obsolete/eo2dVector.h b/eo/src/obsolete/eo2dVector.h index febbca362..ec5833681 100644 --- a/eo/src/obsolete/eo2dVector.h +++ b/eo/src/obsolete/eo2dVector.h @@ -5,14 +5,14 @@ File............: eo2dVector.h Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) Description.....: Implementation of a 2-dimensional chromosome usign STL - vectors. + std::vectors. ================ Modif. 1 ================ Author........: Date..........: Description...: -QUEDA: Operador de asignación, lectura desde istream, escritura a ostream +QUEDA: Operador de asignación, lectura desde std::istream, escritura a std::ostream ----------------------------------------------------------------------------- */ //----------------------------------------------------------------------------- @@ -42,20 +42,20 @@ QUEDA: Operador de asignaci #define _eo2dVector_H // STL libraries -#include // For vector +#include // For std::vector #include #include -#include +#include #include #include -/** Adaptor that turns an STL vector of vectror into an EO +/** Adaptor that turns an STL std::vector of vectror into an EO with the same gene type as the type with which - the vector of vector has been instantiated. + the std::vector of std::vector has been instantiated. */ template -class eo2dVector: public eo2d, public vector< vector > { +class eo2dVector: public eo2d, public std::vector< std::vector > { public: typedef T Type ; @@ -72,7 +72,7 @@ public: eo2dVector( const unsigned _rows = 0, const unsigned _cols = 0, T _val = T() ) - : eo2d(), vector< vector >( _rows, vector( _cols, _val ) ){}; + : eo2d(), std::vector< std::vector >( _rows, std::vector( _cols, _val ) ){}; /** Ctor using a random number generator. @param _rows Number of rows. @@ -83,23 +83,23 @@ public: const unsigned _cols, eoRnd& _rnd ); - /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, + /** Ctor from a std::istream. The T class should accept reading from a std::istream. It doesn't read fitness, which is supposed to be dynamic and dependent on environment. @param _is the input stream; should have all values in a single line, separated by whitespace */ - //eo2dVector( istream& _is); + //eo2dVector( std::istream& _is); /// copy ctor eo2dVector( const eo2dVector & _eo ) - : eo2d( _eo ), vector< vector >( _eo ){ }; + : eo2d( _eo ), std::vector< std::vector >( _eo ){ }; /// Assignment operator /* const eo2dVector& operator =( const eo2dVector & _eo ) { if ( this != &_eo ){ eo2d::operator=( _eo ); - vector< >::operator=( _eo ); + std::vector< >::operator=( _eo ); } return *this; } @@ -113,21 +113,21 @@ public: @param _r Index for rows. Must be an unsigned less than #numOfRows()# @param _c Index for columns. Must be an unsigned less than #numOfCols()# @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() + @std::exception out_of_range if _r >=numOfRows() + @std::exception out_of_range if _c >=numOfCols() */ virtual T getGene( const unsigned _r, const unsigned _c ) const { if ( _r >= numOfRows() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::getGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; + << "It should be <" << numOfRows() << '\0' << std::endl; throw out_of_range( msg.str() ); } if ( _c >= numOfCols() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::getGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; + << "It should be <" << numOfCols() << '\0' << std::endl; throw out_of_range( msg.str() ); } return (*this)[_r][_c]; @@ -138,22 +138,22 @@ public: @param _r Index for rows. Must be an unsigned less than #numOfRows()# @param _c Index for columns. Must be an unsigned less than #numOfCols()# @return what's inside the gene, with the correct type - @exception out_of_range if _r >=numOfRows() - @exception out_of_range if _c >=numOfCols() + @std::exception out_of_range if _r >=numOfRows() + @std::exception out_of_range if _c >=numOfCols() */ virtual void setGene( const unsigned _r, const unsigned _c, const T& _value ) { if ( _r >= numOfRows() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::setGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; + << "It should be <" << numOfRows() << '\0' << std::endl; throw out_of_range( msg.str() ); } if ( _c >= numOfCols() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::setGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; + << "It should be <" << numOfCols() << '\0' << std::endl; throw out_of_range( msg.str() ); } (*this)[_r][_c]=_value; @@ -166,47 +166,47 @@ public: * Obviously, changes number of rows. @param _r Position where the new row will be inserted. @param _val Vector containing the new values to be inserted. - @exception invalid_argument If _val has not numOfCols() components. - @exception out_of_range If _r is greater than numOfRows() + @std::exception invalid_argument If _val has not numOfCols() components. + @std::exception out_of_range If _r is greater than numOfRows() */ virtual void insertRow( const unsigned _r, - const vector& _val ) { + const std::vector& _val ) { // Test errors. if ( _r > numOfRows() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::insertRow: row out of range. " - << "It should be <=" << numOfRows() << '\0' << endl; + << "It should be <=" << numOfRows() << '\0' << std::endl; throw out_of_range( msg.str() ); } if ( _val.size() != numOfCols() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::insertRow: " << "Incorrect number of values to be added. " - << "It should be ==" << numOfCols() << '\0' << endl; + << "It should be ==" << numOfCols() << '\0' << std::endl; throw invalid_argument( msg.str() ); } // Insert the row. - vector< vector >::iterator ite = begin()+_r; + std::vector< std::vector >::iterator ite = begin()+_r; insert( ite, _val ); }; /** Eliminates the row at position _r; all the other genes will be shifted up. @param _r Number of he row to be deleted. - @exception out_of_range if _r >=numOfRows() + @std::exception out_of_range if _r >=numOfRows() */ virtual void deleteRow( const unsigned _r ) { // Test error. if ( _r >= numOfRows() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::deleteRow: " << "Row out of range. " - << "It should be <" << numOfRows() << '\0' << endl; + << "It should be <" << numOfRows() << '\0' << std::endl; throw out_of_range( msg.str() ); } // Delete row. - vector< vector >::iterator ite = this->begin()+_r; + std::vector< std::vector >::iterator ite = this->begin()+_r; this->erase( ite ); }; @@ -215,30 +215,30 @@ public: * Obviously, changes number of cols. @param _r Position where the new column will be inserted. @param _val Vector containing the new values to be inserted. - @exception invalid_argument if _val has not numOfRows() components. + @std::exception invalid_argument if _val has not numOfRows() components. */ virtual void insertCol( const unsigned _c, - const vector& _val ) { + const std::vector& _val ) { // Test errors. if ( _c > numOfCols() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::insertCol: " << "Column out of range. " - << "It should be >=" << numOfCols() << '\0' << endl; + << "It should be >=" << numOfCols() << '\0' << std::endl; throw out_of_range( msg.str() ); } if ( _val.size() != numOfRows() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::insertCol: " << "Incorrect number of values to be added. " - << "It should be ==" << numOfRows() << '\0' << endl; + << "It should be ==" << numOfRows() << '\0' << std::endl; throw invalid_argument( msg.str() ); } // Insert column. for( unsigned r=0; r >::iterator it1 = begin()+r; - vector::iterator it2 = (*it1).begin()+_c; + std::vector >::iterator it1 = begin()+r; + std::vector::iterator it2 = (*it1).begin()+_c; (*it1).insert( it2, _val[r] ); }; } @@ -246,21 +246,21 @@ public: /** Eliminates the column at position _c; all the other columns will be shifted left. @param _c Number of he column to be deleted. - @exception out_of_range if _c >=numOfCols() + @std::exception out_of_range if _c >=numOfCols() */ virtual void deleteCol( const unsigned _c ) { // Test error. if ( _c >= numOfCols() ) { - ostrstream msg; + std::ostrstream msg; msg << "ERROR in eo2dVector::deleteCol: " << "Column out of range. " - << "It should be <" << numOfCols() << '\0' << endl; + << "It should be <" << numOfCols() << '\0' << std::endl; throw out_of_range( msg.str() ); } // Delete columns. for( unsigned r=0; r >::iterator it1 = begin()+r; - vector::iterator it2 = (*it1).begin()+_c; + std::vector >::iterator it1 = begin()+r; + std::vector::iterator it2 = (*it1).begin()+_c; (*it1).erase( it2 ); } }; @@ -283,7 +283,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eo2dVector";}; + std::string className() const {return "eo2dVector";}; //@} }; @@ -297,9 +297,9 @@ template eo2dVector::eo2dVector( const unsigned _rows, const unsigned _cols, eoRnd& _rnd ) - : eo2d(), vector< vector >( _rows, vector( _cols, T() ) ){ - for ( vector< vector >::iterator i = begin(); i != end(); ++i ) { - for( vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { + : eo2d(), std::vector< std::vector >( _rows, std::vector( _cols, T() ) ){ + for ( std::vector< std::vector >::iterator i = begin(); i != end(); ++i ) { + for( std::vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { *j = _rnd(); } } @@ -307,8 +307,8 @@ eo2dVector::eo2dVector( const unsigned _rows, //_____________________________________________________________________________ /*template -eoVector::eoVector( istream& _is) - : eo1d(), vector( ){ +eoVector::eoVector( std::istream& _is) + : eo1d(), std::vector( ){ while (_is ) { T tmp; _is >> tmp; @@ -320,12 +320,12 @@ eoVector::eoVector( istream& _is) //_____________________________________________________________________________ template -ostream& operator<<( ostream& _os, const eo2dVector& _eo) { +std::ostream& operator<<( std::ostream& _os, const eo2dVector& _eo) { for( unsigned i=0; i<_eo.numOfRows(); ++i ) { for( unsigned j=0; j<_eo.numOfCols(); ++j ) { _os << _eo.getGene( i,j ) << " "; } - _os << endl; + _os << std::endl; } return _os; }; diff --git a/eo/src/obsolete/eoAtomBitFlip.h b/eo/src/obsolete/eoAtomBitFlip.h index 99bf4acb8..be1a1be5f 100644 --- a/eo/src/obsolete/eoAtomBitFlip.h +++ b/eo/src/obsolete/eoAtomBitFlip.h @@ -48,7 +48,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoAtomBitFlip";}; + std::string className() const {return "eoAtomBitFlip";}; //@} }; diff --git a/eo/src/obsolete/eoAtomCreep.h b/eo/src/obsolete/eoAtomCreep.h index 05fda7642..8c293208a 100644 --- a/eo/src/obsolete/eoAtomCreep.h +++ b/eo/src/obsolete/eoAtomCreep.h @@ -56,7 +56,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoAtomCreep";}; + virtual std::string className() const {return "eoAtomCreep";}; //@} }; diff --git a/eo/src/obsolete/eoAtomRandom.h b/eo/src/obsolete/eoAtomRandom.h index 18ca49a8c..1cc846ee0 100644 --- a/eo/src/obsolete/eoAtomRandom.h +++ b/eo/src/obsolete/eoAtomRandom.h @@ -52,7 +52,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoAtomRandom";}; + std::string className() const {return "eoAtomRandom";}; //@} private: diff --git a/eo/src/obsolete/eoBackInserter.h b/eo/src/obsolete/eoBackInserter.h index 79727870f..24bdad380 100644 --- a/eo/src/obsolete/eoBackInserter.h +++ b/eo/src/obsolete/eoBackInserter.h @@ -5,7 +5,7 @@ Abstract population insertion operator, which is used by the eoGeneralOps to insert the results in the (intermediate) population. This file also contains the definitions of a derived classes that implements a back inserter, - probably the only efficient inserter for populations of type vector. + probably the only efficient inserter for populations of type std::vector. (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 @@ -49,7 +49,7 @@ class eoBackInserter : public eoPopInserter return *this; } - string className(void) const { return "eoBackInserter"; } + std::string className(void) const { return "eoBackInserter"; } }; diff --git a/eo/src/obsolete/eoBin.h b/eo/src/obsolete/eoBin.h index 544c3bb3b..86dc8e7a9 100644 --- a/eo/src/obsolete/eoBin.h +++ b/eo/src/obsolete/eoBin.h @@ -24,9 +24,9 @@ //----------------------------------------------------------------------------- -#include // ostream, istream +#include // std::ostream, std::istream #include // bind2nd -#include // string +#include // std::string #include @@ -39,7 +39,7 @@ /** eoBin: implementation of binary chromosome. \class eoBin eoBin.h ga/eoBin.h \ingroup bitstring - * based on STL's bit_vector (vector). + * based on STL's bit_std::vector (std::vector). */ template class eoBin: public eoFixedLength { @@ -47,33 +47,33 @@ template class eoBin: public eoFixedLength /** * (Default) Constructor. - * @param size Size of the binary string. + * @param size Size of the binary std::string. */ eoBin(unsigned size = 0, bool value = false): eoVector(size, value) {} /// My class name. - string className() const + std::string className() const { return "eoBin"; } /** * To print me on a stream. - * @param os The ostream. + * @param os The std::ostream. */ - void printOn(ostream& os) const + void printOn(std::ostream& os) const { - copy(begin(), end(), ostream_iterator(os)); + copy(begin(), end(), std::ostream_iterator(os)); } /** * To read me from a stream. - * @param is The istream. + * @param is The std::istream. */ - void readFrom(istream& is) + void readFrom(std::istream& is) { - string bits; + std::string bits; is >> bits; if (is) { diff --git a/eo/src/obsolete/eoBreeder.h b/eo/src/obsolete/eoBreeder.h index 1cacd7e6a..7d8dd9bca 100644 --- a/eo/src/obsolete/eoBreeder.h +++ b/eo/src/obsolete/eoBreeder.h @@ -28,7 +28,7 @@ //----------------------------------------------------------------------------- -#include // vector +#include // std::vector #include #include // eoOp, eoMonOp, eoBinOp #include // eoPop @@ -103,7 +103,7 @@ template class eoBreeder: public eoTransform }; /// The class name. - string className() const { return "eoBreeder"; } + std::string className() const { return "eoBreeder"; } private: eoOpSelector& opSel; diff --git a/eo/src/obsolete/eoCopyElite.h b/eo/src/obsolete/eoCopyElite.h index cb27500b5..19dafcff9 100644 --- a/eo/src/obsolete/eoCopyElite.h +++ b/eo/src/obsolete/eoCopyElite.h @@ -63,7 +63,7 @@ template class eoElitism : public eoCopyElite if (howmany > _pop.size()) throw logical_error("Elite larger than population"); - vector result; + std::vector result; _pop.nth_element(howmany, result); for (int i = 0; i < result.size(); ++i) diff --git a/eo/src/obsolete/eoDetTournament.h b/eo/src/obsolete/eoDetTournament.h index e4697b7cc..2bd15b9d3 100644 --- a/eo/src/obsolete/eoDetTournament.h +++ b/eo/src/obsolete/eoDetTournament.h @@ -48,7 +48,7 @@ template class eoDetTournament: public eoSelectOne eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { // consistency check if (Tsize < 2) { - cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; + std::cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; Tsize = 2; } } diff --git a/eo/src/obsolete/eoDetTournamentInserter.h b/eo/src/obsolete/eoDetTournamentInserter.h index 95bd0b34a..9077aece6 100644 --- a/eo/src/obsolete/eoDetTournamentInserter.h +++ b/eo/src/obsolete/eoDetTournamentInserter.h @@ -61,7 +61,7 @@ public : return *this; } - string className(void) const { return "eoDetTournamentInserter"; } + std::string className(void) const { return "eoDetTournamentInserter"; } private : unsigned t_size; diff --git a/eo/src/obsolete/eoDistance.h b/eo/src/obsolete/eoDistance.h index 13ca197e0..5f3c333e6 100644 --- a/eo/src/obsolete/eoDistance.h +++ b/eo/src/obsolete/eoDistance.h @@ -56,7 +56,7 @@ class eoDistance { virtual double distance( const EOT& ) const = 0; /// Returns classname - virtual string className() const { return "eoDistance"; } + virtual std::string className() const { return "eoDistance"; } }; diff --git a/eo/src/obsolete/eoDup.h b/eo/src/obsolete/eoDup.h index b41cb7a50..67e4a8639 100644 --- a/eo/src/obsolete/eoDup.h +++ b/eo/src/obsolete/eoDup.h @@ -62,7 +62,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoDup";}; + virtual std::string className() const {return "eoDup";}; //@} }; diff --git a/eo/src/obsolete/eoES.h b/eo/src/obsolete/eoES.h index fdc258c3b..9f4051f85 100644 --- a/eo/src/obsolete/eoES.h +++ b/eo/src/obsolete/eoES.h @@ -27,17 +27,17 @@ #define _eoESCHROM_H // STL libraries -#include // For vector<> +#include // For std::vector<> #include #include -#include // for ostream +#include // for std::ostream // EO includes #include /**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation +Each chromosome in an evolution strategies is composed of a std::vector of floating point +values plus a std::vector of sigmas, that are added to them during mutation */ //@{ @@ -97,13 +97,13 @@ bool operator == ( eoESGene _e1, eoESGene _e2 ) { } /// -ostream & operator << ( ostream& _s, const eoESGene& _e ) { +std::ostream & operator << ( std::ostream& _s, const eoESGene& _e ) { _s << _e.val << ", " << _e.sigma << " | "; return _s; } /// Dummy >> -istream & operator >> ( istream& _s, const eoESGene& _e ) { +std::istream & operator >> ( std::istream& _s, const eoESGene& _e ) { _s >> _e.val; _s >> _e.sigma; return _s; @@ -154,7 +154,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoESChrom";}; + std::string className() const {return "eoESChrom";}; //@} }; diff --git a/eo/src/obsolete/eoESChrom.h b/eo/src/obsolete/eoESChrom.h index dc51db0de..1ad0bcf41 100644 --- a/eo/src/obsolete/eoESChrom.h +++ b/eo/src/obsolete/eoESChrom.h @@ -27,17 +27,17 @@ #define _eoESCHROM_H // STL libraries -#include // For vector<> +#include // For std::vector<> #include #include -#include // for ostream +#include // for std::ostream // EO includes #include /**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation +Each chromosome in an evolution strategies is composed of a std::vector of floating point +values plus a std::vector of sigmas, that are added to them during mutation */ //@{ @@ -97,13 +97,13 @@ bool operator == ( eoESGene _e1, eoESGene _e2 ) { } /// -ostream & operator << ( ostream& _s, const eoESGene& _e ) { +std::ostream & operator << ( std::ostream& _s, const eoESGene& _e ) { _s << _e.val << ", " << _e.sigma << " | "; return _s; } /// Dummy >> -istream & operator >> ( istream& _s, const eoESGene& _e ) { +std::istream & operator >> ( std::istream& _s, const eoESGene& _e ) { _s >> _e.val; _s >> _e.sigma; return _s; @@ -154,7 +154,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoESChrom";}; + std::string className() const {return "eoESChrom";}; //@} }; diff --git a/eo/src/obsolete/eoESFullChrom.h b/eo/src/obsolete/eoESFullChrom.h index e8e674573..e00914b5d 100644 --- a/eo/src/obsolete/eoESFullChrom.h +++ b/eo/src/obsolete/eoESFullChrom.h @@ -27,28 +27,28 @@ #define _EOESFULLCHROM_H // STL libraries -#include // For vector<> +#include // For std::vector<> #include #include -#include // for ostream +#include // for std::ostream // EO includes #include #include /**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a vector of floating point -values plus a vector of sigmas, that are added to them during mutation and a vector of correlations +Each chromosome in an evolution strategies is composed of a std::vector of floating point +values plus a std::vector of sigmas, that are added to them during mutation and a std::vector of correlations */ //@{ /**@name individuals for evolution strategies -MS- 22/10/99 Each individual in an evolution strategy is composed of - a vector of floating point values - a vector of std deviations - a vector of rotation angles (for correlated mutations) + a std::vector of floating point values + a std::vector of std deviations + a std::vector of rotation angles (for correlated mutations) -These individuals CANNOT BE IMPLEMENTED as vectors of anything +These individuals CANNOT BE IMPLEMENTED as std::vectors of anything at least in the case of correlated mutations */ //@{ @@ -95,11 +95,11 @@ class eoESFullChrom : public eoVector { StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", "Initial value for std. dev. (scaled by range)" ); verbose = parser.getBool("-Iv", "--verbose", - "Verbose listing of ES individuals (mutation parameters"); + "Verbose std::listing of ES individuals (mutation parameters"); } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -109,10 +109,10 @@ class eoESFullChrom : public eoVector { throw invalid_argument( "No standard deviation: choose another representation please" ); } if (num_sigma > num_genes) { - cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; + std::cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; num_sigma = num_genes; // modify the Param value - so .status is OK - ostrstream sloc; + std::ostrstream sloc; sloc << num_genes; parser.setParamValue("--NbSigma", sloc.str()); } @@ -122,8 +122,8 @@ class eoESFullChrom : public eoVector { StdDev.resize(num_sigma); if (correlated_mutations) { if (num_sigma < num_genes) { - cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; - cout << "Though possible, this is a strange setting" << endl; + std::cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; + std::cout << "Though possible, this is a strange setting" << std::endl; } // nb of rotation angles: N*(N-1)/2 (in general!) CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); @@ -201,32 +201,32 @@ class eoESFullChrom : public eoVector { /** Print itself: inherited from eoObject implementation. Instance from base classes are processed in base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - copy( begin(), end(), ostream_iterator( _s, " ") ); + @param _s the std::ostream in which things are written*/ + virtual void printOn( std::ostream& _s ) const{ + copy( begin(), end(), std::ostream_iterator( _s, " ") ); // The formatting instructinos shoudl be left to the caller // _s << "\n"; if (verbose) { _s << "\n\tStd Dev. " ; - copy( StdDev.begin(), StdDev.end(), ostream_iterator( _s, " ") ); + copy( StdDev.begin(), StdDev.end(), std::ostream_iterator( _s, " ") ); if (CorCff.size()) { _s << "\n\t"; - copy( CorCff.begin(), CorCff.end(), ostream_iterator( _s, " ") ); + copy( CorCff.begin(), CorCff.end(), std::ostream_iterator( _s, " ") ); } } }; - /** This exception should be thrown when trying to insert or delete a gene + /** This std::exception should be thrown when trying to insert or delete a gene in a fixed length chromosome */ - class FixedLengthChromosome : public exception { + class FixedLengthChromosome : public std::exception { public: /** * Constructor */ FixedLengthChromosome() - : exception() { }; + : std::exception() { }; ~FixedLengthChromosome() {}; }; @@ -239,14 +239,14 @@ class eoESFullChrom : public eoVector { /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoESFullChrom";}; + virtual std::string className() const {return "eoESFullChrom";}; private: - // vector ObjVar; /* object variable vector */ + // std::vector ObjVar; /* object variable std::vector */ // or shoudl the class be subclass of EOVector ??? - vector StdDev; /* standard deviation vector */ - vector CorCff; /* correlation coefficient vector */ + std::vector StdDev; /* standard deviation std::vector */ + std::vector CorCff; /* correlation coefficient std::vector */ bool verbose; /* Print std deviations or not */ diff --git a/eo/src/obsolete/eoESFullMut.h b/eo/src/obsolete/eoESFullMut.h index 5d2d2fa78..9d967c7af 100644 --- a/eo/src/obsolete/eoESFullMut.h +++ b/eo/src/obsolete/eoESFullMut.h @@ -95,7 +95,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoESMutate";}; + virtual std::string className() const {return "eoESMutate";}; /** Mutate eoEsSimple @@ -197,7 +197,7 @@ public: */ unsigned i,k; - vector VarStp(_eo.size()); + std::vector VarStp(_eo.size()); for (i = 0; i < _eo.size(); i++) VarStp[i] = _eo.stdevs[i] * rng.normal(); diff --git a/eo/src/obsolete/eoEsObjectiveBounds.h b/eo/src/obsolete/eoEsObjectiveBounds.h index f6e2fdda0..4a25aa30b 100644 --- a/eo/src/obsolete/eoEsObjectiveBounds.h +++ b/eo/src/obsolete/eoEsObjectiveBounds.h @@ -30,7 +30,7 @@ /** \defgroup EvolutionStrategies - Various classes for the initialization and mutation of real valued vectors. + Various classes for the initialization and mutation of real valued std::vectors. Supports simple mutations and various more adaptable mutations, including correlated mutations. diff --git a/eo/src/obsolete/eoGOpBreeder.h b/eo/src/obsolete/eoGOpBreeder.h index 13c8a717a..0b8c76f65 100644 --- a/eo/src/obsolete/eoGOpBreeder.h +++ b/eo/src/obsolete/eoGOpBreeder.h @@ -48,7 +48,7 @@ class eoGOpBreeder: public eoUF&, void> } /// The class name. - string className() const { return "eoGOpBreeder"; } + std::string className() const { return "eoGOpBreeder"; } private: eoGOpSelector& opSel; diff --git a/eo/src/obsolete/eoGOpSelector.h b/eo/src/obsolete/eoGOpSelector.h index ae207b9c6..279d709b7 100644 --- a/eo/src/obsolete/eoGOpSelector.h +++ b/eo/src/obsolete/eoGOpSelector.h @@ -41,7 +41,7 @@ using namespace std; /** Base class for alternative selectors, which use the generalized operator interface. eoGOpBreeders expects this class */ template -class eoGOpSelector: public eoOpSelector, public vector*> +class eoGOpSelector: public eoOpSelector, public std::vector*> { public: @@ -49,7 +49,7 @@ public: /// Dtor virtual ~eoGOpSelector() { - for ( list< eoGeneralOp* >::iterator i= ownOpList.begin(); + for ( std::list< eoGeneralOp* >::iterator i= ownOpList.begin(); i != ownOpList.end(); i++ ) { delete *i; } @@ -65,7 +65,7 @@ public: // implementation can be found below /** Retrieve the operator using its integer handle - @param _id The id number. Should be a valid id, or an exception + @param _id The id number. Should be a valid id, or an std::exception will be thrown @return a reference of the operator corresponding to that id. */ @@ -88,22 +88,22 @@ public: virtual eoGeneralOp& selectOp() = 0; /// - virtual string className() const { return "eoGOpSelector"; }; + virtual std::string className() const { return "eoGOpSelector"; }; /// - void printOn(ostream& _os) const {} - // _os << className().c_str() << endl; + void printOn(std::ostream& _os) const {} + // _os << className().c_str() << std::endl; // for ( unsigned i=0; i!= rates.size(); i++ ) { - // _os << *(operator[](i)) << "\t" << rates[i] << endl; + // _os << *(operator[](i)) << "\t" << rates[i] << std::endl; // } //} - const vector& getRates(void) const { return rates; } + const std::vector& getRates(void) const { return rates; } private : - vector rates; - list< eoGeneralOp* > ownOpList; + std::vector rates; + std::list< eoGeneralOp* > ownOpList; }; /* Implementation of longish functions defined above */ @@ -121,7 +121,7 @@ inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, else { // if it's not a general op, it's a "old" op; create a wrapped op from it - // and keep it on a list to delete them afterwards + // and keep it on a std::list to delete them afterwards // will use auto_ptr when they're readily available switch(_op.getType()) @@ -167,9 +167,9 @@ inline void eoGOpSelector::deleteOp( ID _id ) operator[](_id) = 0; rates[_id] = 0.0; - // check oplist and clear it there too. + // check opstd::list and clear it there too. - list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); + std::list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); if(it != ownOpList.end()) { diff --git a/eo/src/obsolete/eoGenTerm.h b/eo/src/obsolete/eoGenTerm.h index 6a52cdb8e..615ab90b2 100644 --- a/eo/src/obsolete/eoGenTerm.h +++ b/eo/src/obsolete/eoGenTerm.h @@ -42,7 +42,7 @@ public: * reached */ virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; - // cout << " [" << thisGeneration << "] "; + // std::cout << " [" << thisGeneration << "] "; return (thisGeneration < repTotalGenerations) ; // for the postincrement } diff --git a/eo/src/obsolete/eoGeneration.h b/eo/src/obsolete/eoGeneration.h index 93cdfd3be..282de928b 100644 --- a/eo/src/obsolete/eoGeneration.h +++ b/eo/src/obsolete/eoGeneration.h @@ -65,13 +65,13 @@ template class eoGeneration: public eoAlgo for ( i = breeders.begin(); i != breeders.end(); i++) evaluator(*i); replace(breeders, pop); - } catch ( exception& e ) { - throw runtime_error( e.what() ); + } catch ( std::exception& e ) { + throw std::runtime_error( e.what() ); } } /// Class name. - string className() const { return "eoGeneration"; } + std::string className() const { return "eoGeneration"; } private: eoBinPopOp& select; diff --git a/eo/src/obsolete/eoGenericBinOp.h b/eo/src/obsolete/eoGenericBinOp.h index dbf909f83..7c06546a6 100644 --- a/eo/src/obsolete/eoGenericBinOp.h +++ b/eo/src/obsolete/eoGenericBinOp.h @@ -46,7 +46,7 @@ public: /// Ctor eoGenericBinOp() : eoOp( eoOp::binary ) {}; - virtual string className() const {return "eoGenericBinOp";}; + virtual std::string className() const {return "eoGenericBinOp";}; }; /** Converter from eoGenericBinOp to eoBinOp @@ -60,7 +60,7 @@ public: /// Ctor eoGeneric2TrueBinOp(eoGenericBinOp & _binOp) : binOp( _binOp ) {}; - virtual string className() const {return "eoGeneric2TrueBinOp";} + virtual std::string className() const {return "eoGeneric2TrueBinOp";} virtual void operator()(EOT & _eo1, const EOT & _eo2) { diff --git a/eo/src/obsolete/eoGenericMonOp.h b/eo/src/obsolete/eoGenericMonOp.h index d6d833c97..f090d1fa5 100644 --- a/eo/src/obsolete/eoGenericMonOp.h +++ b/eo/src/obsolete/eoGenericMonOp.h @@ -46,7 +46,7 @@ public: /// Ctor eoGenericMonOp() : eoOp( eoOp::unary ) {}; - virtual string className() const {return "eoGenericMonOp";}; + virtual std::string className() const {return "eoGenericMonOp";}; }; /** COnverter from eoGenericMonOp to eoMonOp @@ -60,7 +60,7 @@ public: /// Ctor eoGeneric2TrueMonOp(eoGenericMonOp & _monOp) : monOp( _monOp ) {}; - virtual string className() const {return "eoGeneric2trueMonOp";} + virtual std::string className() const {return "eoGeneric2trueMonOp";} virtual void operator()(EOT & _eo) { diff --git a/eo/src/obsolete/eoGenericQuadOp.h b/eo/src/obsolete/eoGenericQuadOp.h index 95b3667de..35455cfbd 100644 --- a/eo/src/obsolete/eoGenericQuadOp.h +++ b/eo/src/obsolete/eoGenericQuadOp.h @@ -51,7 +51,7 @@ public: /// Ctor eoGenericQuadOp() : eoOp( eoOp::quadratic ) {}; - virtual string className() const {return "eoGenericQuadOp";}; + virtual std::string className() const {return "eoGenericQuadOp";}; }; /** Converter from eoGenericQuadOp to eoQuadOp @@ -65,7 +65,7 @@ public: /// Ctor eoGeneric2TrueQuadOp(eoGenericQuadOp & _quadOp) : quadOp( _quadOp ) {}; - virtual string className() const {return "eoGeneric2TrueQuadOp";} + virtual std::string className() const {return "eoGeneric2TrueQuadOp";} virtual void operator()(EOT & _eo1, EOT & _eo2) { diff --git a/eo/src/obsolete/eoID.h b/eo/src/obsolete/eoID.h index f7d65ec7f..5763b11ba 100644 --- a/eo/src/obsolete/eoID.h +++ b/eo/src/obsolete/eoID.h @@ -27,8 +27,8 @@ //----------------------------------------------------------------------------- -#include // istream, ostream -#include // for string +#include // std::istream, std::ostream +#include // for std::string using namespace std; @@ -68,14 +68,14 @@ class eoID: public Object it's got code as an example of implementation. Only "leaf" classes can be non-virtual. */ - virtual string className() const { return string("[eoID]")+Object::className(); }; + virtual std::string className() const { return std::string("[eoID]")+Object::className(); }; /** * Read object. - * @param _is A istream. - * @throw runtime_exception If a valid object can't be read. + * @param _is A std::istream. + * @throw runtime_std::exception If a valid object can't be read. */ - virtual void readFrom(istream& _is) { + virtual void readFrom(std::istream& _is) { Object::readFrom( _is ); _is >> thisID; } @@ -83,9 +83,9 @@ class eoID: public Object /** * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const{ + virtual void printOn(std::ostream& _os) const{ Object::printOn( _os ); _os << thisID; } diff --git a/eo/src/obsolete/eoInclusion.h b/eo/src/obsolete/eoInclusion.h index cc84cdaf2..5e752a15a 100644 --- a/eo/src/obsolete/eoInclusion.h +++ b/eo/src/obsolete/eoInclusion.h @@ -25,8 +25,8 @@ template class eoInclusion: public eoMerge /// (Default) Constructor. eoInclusion(const float& _rate = 1.0): eoMerge( _rate ) {} - /// Ctor from istream - eoInclusion( istream& _is): eoBinPopOp( _is ) {}; + /// Ctor from std::istream + eoInclusion( std::istream& _is): eoBinPopOp( _is ) {}; /// Dtor virtual ~eoInclusion() {}; @@ -55,7 +55,7 @@ template class eoInclusion: public eoMerge /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoInclusion";}; + virtual std::string className() const {return "eoInclusion";}; //@} }; diff --git a/eo/src/obsolete/eoInplaceTransform.h b/eo/src/obsolete/eoInplaceTransform.h index 17a358cc1..a2785506b 100644 --- a/eo/src/obsolete/eoInplaceTransform.h +++ b/eo/src/obsolete/eoInplaceTransform.h @@ -27,7 +27,7 @@ //----------------------------------------------------------------------------- -#include // vector +#include // std::vector #include #include // eoOp, eoMonOp, eoBinOp #include // eoPop diff --git a/eo/src/obsolete/eoInsertion.h b/eo/src/obsolete/eoInsertion.h index 39c65b1ae..26774f67f 100644 --- a/eo/src/obsolete/eoInsertion.h +++ b/eo/src/obsolete/eoInsertion.h @@ -46,8 +46,8 @@ template class eoInsertion: public eoBinaryFunctor&, c /// (Default) Constructor. eoInsertion(const float& _rate = 1.0): eoMerge( _rate ) {} - /// Ctor from istream - eoInsertion( istream& _is): eoBinPopOp( _is ) {}; + /// Ctor from std::istream + eoInsertion( std::istream& _is): eoBinPopOp( _is ) {}; /// Dtor virtual ~eoInsertion() {}; @@ -86,7 +86,7 @@ template class eoInsertion: public eoBinaryFunctor&, c /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoInsertion";}; + virtual std::string className() const {return "eoInsertion";}; //@} }; diff --git a/eo/src/obsolete/eoKill.h b/eo/src/obsolete/eoKill.h index e32eed285..e7ec85a57 100644 --- a/eo/src/obsolete/eoKill.h +++ b/eo/src/obsolete/eoKill.h @@ -54,7 +54,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoKill";}; + virtual std::string className() const {return "eoKill";}; //@} }; diff --git a/eo/src/obsolete/eoLottery.h b/eo/src/obsolete/eoLottery.h index a96c54e46..39ca87230 100644 --- a/eo/src/obsolete/eoLottery.h +++ b/eo/src/obsolete/eoLottery.h @@ -28,7 +28,7 @@ //----------------------------------------------------------------------------- -#include // logic_error +#include // std::logic_error #include // sum_fitness #include @@ -53,7 +53,7 @@ template class eoLottery: public eoBinaryFunctor()) { - throw logic_error("eoLottery: minimizing fitness"); + throw std::logic_error("eoLottery: minimizing fitness"); } } diff --git a/eo/src/obsolete/eoMutation.h b/eo/src/obsolete/eoMutation.h index ecca1826d..f3225fffb 100644 --- a/eo/src/obsolete/eoMutation.h +++ b/eo/src/obsolete/eoMutation.h @@ -51,14 +51,14 @@ public: } /// To print me on a stream. - /// @param os The ostream. - void printOn(ostream& os) const { + /// @param os The std::ostream. + void printOn(std::ostream& os) const { os << rate ; } /// To read me from a stream. - /// @param is The istream. - void readFrom(istream& is) { + /// @param is The std::istream. + void readFrom(std::istream& is) { is >> rate ; } @@ -68,7 +68,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoMutation";}; + std::string className() const {return "eoMutation";}; //@} protected: diff --git a/eo/src/obsolete/eoOpFactory.h b/eo/src/obsolete/eoOpFactory.h index f4182acd9..2d835d999 100644 --- a/eo/src/obsolete/eoOpFactory.h +++ b/eo/src/obsolete/eoOpFactory.h @@ -50,17 +50,17 @@ public: virtual ~eoOpFactory() {} //@} - /** Another factory method: creates an object from an istream, reading from - it whatever is needed to create the object. Usually, the format for the istream will be\\ + /** Another factory method: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ objectType parameter1 parameter2 ... parametern\\ - If there are problems, an exception is raised; it should be caught at the + If there are problems, an std::exception is raised; it should be caught at the upper level, because it might be something for that level @param _is an stream from where a single line will be read - @throw runtime_exception if the object type is not known + @throw runtime_std::exception if the object type is not known */ - virtual eoOp* make(istream& _is) { + virtual eoOp* make(std::istream& _is) { eoOp * opPtr = NULL; - string objectTypeStr; + std::string objectTypeStr; _is >> objectTypeStr; if ( objectTypeStr == "eoDup") { opPtr = new eoDup(); diff --git a/eo/src/obsolete/eoOpSelector.h b/eo/src/obsolete/eoOpSelector.h index 82be47326..d15f620c9 100644 --- a/eo/src/obsolete/eoOpSelector.h +++ b/eo/src/obsolete/eoOpSelector.h @@ -31,7 +31,7 @@ //----------------------------------------------------------------------------- -#include // runtime_error +#include // std::runtime_error #include #include @@ -63,12 +63,12 @@ public: /** Gets a non-const reference to an operator, so that it can be changed, modified or whatever @param _id a previously assigned ID - @throw runtime_exception if the ID does not exist*/ + @throw runtime_std::exception if the ID does not exist*/ virtual eoOp& getOp( ID _id ) = 0; /** Remove an operator from the operator set @param _id a previously assigned ID - @throw runtime_exception if the ID does not exist + @throw runtime_std::exception if the ID does not exist */ virtual void deleteOp( ID _id ) = 0; @@ -79,9 +79,9 @@ public: //@{ /** Return the class id. - @return the class name as a string + @return the class name as a std::string */ - virtual string className() const { return "eoOpSelector"; }; + virtual std::string className() const { return "eoOpSelector"; }; /** * Read object and print objects are left for subclasses to define. diff --git a/eo/src/obsolete/eoParser.h b/eo/src/obsolete/eoParser.h index 013699132..fb837370f 100644 --- a/eo/src/obsolete/eoParser.h +++ b/eo/src/obsolete/eoParser.h @@ -29,8 +29,8 @@ #include // for strcasecmp ... maybe there's a c++ way of doing it? // Yep there is, but needs either a simple functor for the equal function - // or a hand-rolled string template class (this isn't that horrible as - // it sounds, it just means a new string_traits class with two changed + // or a hand-rolled std::string template class (this isn't that horrible as + // it sounds, it just means a new std::string_traits class with two changed // function definitions. (Maarten) #ifdef _MSC_VER #define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) @@ -44,8 +44,8 @@ #include #include -// include for exceptions -#include // logic_error +// include for std::exceptions +#include // std::logic_error //----------------------------------------------------------------------------- // Class Param @@ -71,9 +71,9 @@ public: * @param _description Description of the parameter. What is useful for. * @param _required If it is a necessary parameter or not */ - Param (string _shortName="-h", string _longName="--help", - string _default = "", valueType _valType= STRING, - string _description="Shows this help", + Param (std::string _shortName="-h", std::string _longName="--help", + std::string _default = "", valueType _valType= STRING, + std::string _description="Shows this help", bool _required=false ) : repShortName(_shortName), repLongName(_longName), repDescription(_description ), repEnv(""), repDefault(_default), @@ -108,38 +108,38 @@ public: /** * Returns the short name. */ - const string& shortName ( void ) const { return repShortName; }; + const std::string& shortName ( void ) const { return repShortName; }; /** * Returns the long name. */ - const string& longName ( void ) const { return repLongName; }; + const std::string& longName ( void ) const { return repLongName; }; /** * Returns the description of the argument */ - const string& description ( void ) const { return repDescription; }; + const std::string& description ( void ) const { return repDescription; }; /** * Returns the environment variable of the argument */ - const string& environment ( void ) const { return repEnv; }; + const std::string& environment ( void ) const { return repEnv; }; /** * Returns the default value of the argument */ - const string& defValue ( void ) const { return repDefault; }; + const std::string& defValue ( void ) const { return repDefault; }; /** * Sets a value for the param. * @param _value The new value. */ - void value ( const string& _value ) { repValue = _value; repChanged = true; }; + void value ( const std::string& _value ) { repValue = _value; repChanged = true; }; /** * Returns the value of the param. */ - const string& value ( void ) const { return repValue; }; + const std::string& value ( void ) const { return repValue; }; /** * Returns if required or not. @@ -157,13 +157,13 @@ public: bool changed( void ) const { return repChanged; }; private: - string repShortName; - string repLongName; - string repDescription; - string repEnv; - string repDefault; + std::string repShortName; + std::string repLongName; + std::string repDescription; + std::string repEnv; + std::string repDefault; - string repValue; + std::string repValue; Param::valueType repValType; bool repRequired; bool repChanged; @@ -194,15 +194,15 @@ public: * @param _argc, _ argv command line arguments * @param _programDescription Description of the work the program does */ - Parser ( int _argc, char **_argv , string _programDescription, - string _sFileParamName = "-P", - string _lFileParamName = "--Param") : + Parser ( int _argc, char **_argv , std::string _programDescription, + std::string _sFileParamName = "-P", + std::string _lFileParamName = "--Param") : params(), programName( _argv[0]), programDescription( _programDescription), parse_argc(_argc), parse_argv(_argv), InputFileName("") { // the input file name has to be read immediately - from command-line or environement (not input0file :-) - string _default = _argv[0]; + std::string _default = _argv[0]; _default += ".param"; Param param (_sFileParamName, _lFileParamName, _default, Param::STRING, "Name of the input file", 0); @@ -249,7 +249,7 @@ public: * Adds a fake parameter == title in the output file * @param the title */ - void AddTitle (const string& _title) + void AddTitle (const std::string& _title) { Param param ( "", "", "", Param::TITLE, _title, false ); params.push_back( param ); @@ -266,12 +266,12 @@ public: */ /** - * Gets the string value of a param from the full parameter description + * Gets the std::string value of a param from the full parameter description * @param see above */ - string getString (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { + std::string getString (const std::string& _shortName, const std::string& _longName, + const std::string& _default = "", + const std::string& _description="", bool _required=false) { Param param ( _shortName, _longName, _default, Param::STRING, _description, _required ); parse( param ); params.push_back( param ); @@ -284,8 +284,8 @@ public: * @param see above */ - bool getBool (const string& _shortName, const string& _longName, - const string& _description="") { + bool getBool (const std::string& _shortName, const std::string& _longName, + const std::string& _description="") { Param param ( _shortName, _longName, "false", Param::BOOL, _description, false ); parse( param ); params.push_back( param ); @@ -299,19 +299,19 @@ public: }; /** - * Gets the "array" (vector of strings) value of a param from the full parameter description + * Gets the "array" (std::vector of std::strings) value of a param from the full parameter description * @param see above */ - vector getArray (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { + std::vector getArray (const std::string& _shortName, const std::string& _longName, + const std::string& _default = "", + const std::string& _description="", bool _required=false) { Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); parse( param ); params.push_back( param ); istrstream is(param.value().c_str()); - vector retValue; - string tmpStr; + std::vector retValue; + std::string tmpStr; is >> tmpStr; while(is){ @@ -324,12 +324,12 @@ public: /** * Gets the int value of a param given the full description of the parameter * @param see above - * @exception BadType if the param's value isn't a correct int + * @std::exception BadType if the param's value isn't a correct int */ - int getInt (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { + int getInt (const std::string& _shortName, const std::string& _longName, + const std::string& _default = "", + const std::string& _description="", bool _required=false) { Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); parse( param ); params.push_back( param ); @@ -350,12 +350,12 @@ public: /** * Gets the unsigned lon value of a param given ... * @param see above - * @exception BadType if the param's value isn't a correct unsigned long + * @std::exception BadType if the param's value isn't a correct unsigned long */ - int getUnsignedLong (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { + int getUnsignedLong (const std::string& _shortName, const std::string& _longName, + const std::string& _default = "", + const std::string& _description="", bool _required=false) { Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); parse( param ); params.push_back( param ); @@ -376,12 +376,12 @@ public: /** * Gets the float value of a param given the description of the parameter * @param see above - * @exception BadType if the param's value isn't a correct int + * @std::exception BadType if the param's value isn't a correct int */ - float getFloat (const string& _shortName, const string& _longName, - const string& _default = "", - const string& _description="", bool _required=false) { + float getFloat (const std::string& _shortName, const std::string& _longName, + const std::string& _default = "", + const std::string& _description="", bool _required=false) { Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); parse( param ); params.push_back( param ); @@ -400,19 +400,19 @@ public: }; - string parse_string (istream & _is) { - string paramValue; + std::string parse_std::string (std::istream & _is) { + std::string paramValue; _is >> paramValue; - //if the first character of the string or array is not a " => just one word or array-element. + //if the first character of the std::string or array is not a " => just one word or array-element. if( paramValue[0] != '\"' ) return paramValue; - if( paramValue[1] == '\"' ) // the empty string + if( paramValue[1] == '\"' ) // the empty std::string return "" ; - //else => read until the next " (the end of the string). + //else => read until the next " (the end of the std::string). const char *c = paramValue.c_str(); - string tmpStr = c+1;// skip the " + std::string tmpStr = c+1;// skip the " if (tmpStr[tmpStr.length()-1] == '\"') { // one word only //tmpStr[tmpStr.length()-1] = '\0'; tmpStr.erase( &tmpStr[tmpStr.length()-1] ); @@ -436,11 +436,11 @@ public: void parse (Param & param) { int i; - string tmpStr, ReadStr, FirstWord; + std::string tmpStr, ReadStr, FirstWord; // FIRST: look if the associated environment variables have any value, to use them. if( getenv( param.environment().c_str() ) ) { - //cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<shortName()<<", ,"<environment().c_str())<" --> a single string in the array + ReadStr = parse_std::string(is); + if ( ReadStr != "<" ) { // no "<" ">" --> a single std::string in the array param.value(ReadStr); break; } // read next word - and keep it in case of <> mismatch - FirstWord = parse_string(is); + FirstWord = parse_std::string(is); // test for empty array if (FirstWord == ">") { param.value(""); @@ -491,15 +491,15 @@ public: } // else, read all words until ">" tmpStr = FirstWord; - ReadStr = parse_string(is); + ReadStr = parse_std::string(is); while ( is && (ReadStr != ">") ) { tmpStr = tmpStr + " " + ReadStr; - ReadStr = parse_string(is); + ReadStr = parse_std::string(is); } if (!is) { // there was a "<" without the corresponding ">" throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string + param.value(FirstWord); // assume unique std::string } else param.value(tmpStr); @@ -516,18 +516,18 @@ public: ( ! strcmp(param.shortName().c_str(), parse_argv[i]) ) ) { // found the parameter name if (param.valType() == Param::BOOL) { - //cout <<"BOOL: "<" --> a single string in the array + if ( ReadStr != "<" ) { // no "<" ">" --> a single std::string in the array param.value(ReadStr); }else{ // read next word - and keep it in case of <> mismatch @@ -544,11 +544,11 @@ public: tmpStr = tmpStr + " " + ReadStr; ReadStr = parse_argv[i++]; } - //cout <<"tmpStr ;"<=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique string + param.value(FirstWord); // assume unique std::string }else{ param.value(tmpStr); } @@ -570,11 +570,11 @@ public: * Sets a new value for a param given its short name or its long name. * @param _name One of the names of the param. * @param _value Value to be assigned. - * @exception UnknownArg if the param doesn't exist - * @exception MissingVal if the param hasn't got a value + * @std::exception UnknownArg if the param doesn't exist + * @std::exception MissingVal if the param hasn't got a value */ - Param::valueType setParamValue (const string& _name, const char* _value){ - vector::iterator pos; + Param::valueType setParamValue (const std::string& _name, const char* _value){ + std::vector::iterator pos; for (pos=params.begin() ; pos!=params.end() ; pos++) if (pos->shortName()==_name || pos->longName()==_name) @@ -584,7 +584,7 @@ public: if (pos!=params.end()) { switch ( pos->valType() ) { case Param::TITLE: - cerr << "Error, we should not be there" << endl; + std::cerr << "Error, we should not be there" << std::endl; exit(1); break; case Param::BOOL : @@ -613,14 +613,14 @@ public: }; /// the output method - generate the .status file (unless other name is given) - friend ostream & operator<< ( ostream & os, Parser & _parser ) + friend std::ostream & operator<< ( std::ostream & os, Parser & _parser ) { - vector::iterator p; + std::vector::iterator p; //print every param with its value for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { switch ( p->valType() ) { case Param::BOOL : - if( p->value() == (string) "true") + if( p->value() == (std::string) "true") os << p->longName(); else os << "#" << p->longName() ; // so the name of the bool is commented out @@ -639,30 +639,30 @@ public: os << p->longName()<<" \""<value().c_str()<<"\" "; break; case Param::TITLE: - os << endl; // Title is in the description below + os << std::endl; // Title is in the description below break; } // switch os << "\t #" << p->shortName() << " : " << p->description(); if (p->valType() != Param::TITLE) os << " [" << p->defValue() << "]" ; - os << endl; + os << std::endl; } return os; }; /** - * Prints out the list of parameters in the output file (if specified) + * Prints out the std::list of parameters in the output file (if specified) */ - void outputParam(string _OutputFile="") + void outputParam(std::string _OutputFile="") { if (_OutputFile == "") { _OutputFile = parse_argv[0]; _OutputFile += ".status"; } - ofstream os(_OutputFile.c_str()); + std::ofstream os(_OutputFile.c_str()); os << "Parameters used by \"" << programName << "\" (" - << programDescription << ")" << endl << endl; + << programDescription << ")" << std::endl << std::endl; os << *this; }; @@ -671,80 +671,80 @@ public: * provided by parameters */ void printHelp() { - vector::iterator p; + std::vector::iterator p; // unsigned i; // print program name and description - cout << this->programName <<": "<programName <<": "<valType() != Param::TITLE ) { // if( p->valType() != Param::BOOL ){ - // cout << ( (!p->required())?"[":""); - // cout <shortName()<<" value"<required())?"]":"")<<" "; + // std::cout << ( (!p->required())?"[":""); + // std::cout <shortName()<<" value"<required())?"]":"")<<" "; // }else{ - // cout << "["<shortName()<<"] "; + // std::cout << "["<shortName()<<"] "; // } // } // for p - cout << "Where:"<valType() != Param::TITLE ) { // Victor: 04-Jan-2000 // Modified because the - and -- prefixes are not needed. /* - cout << "-" << p->shortName() + std::cout << "-" << p->shortName() <<", --"<longName()<<":\t" - <description()<description()<shortName() + std::cout << p->shortName() <<", " << p->longName()<<":\t" - <description()<description()<valType() ) { - case Param::INT: cout <<"Integer"; break; - case Param::UL: cout <<"Unsigned Long Integer"; break; - case Param::FLOAT: cout <<"Float"; break; - case Param::STRING: cout <<"String"; break; - case Param::ARRAY: cout <<"An array of strings, enclosed within < >"; break; - case Param::BOOL: cout << "Flag"; break; + case Param::INT: std::cout <<"Integer"; break; + case Param::UL: std::cout <<"Unsigned Long Integer"; break; + case Param::FLOAT: std::cout <<"Float"; break; + case Param::STRING: std::cout <<"String"; break; + case Param::ARRAY: std::cout <<"An array of std::strings, enclosed within < >"; break; + case Param::BOOL: std::cout << "Flag"; break; case Param::TITLE: break; } // switch if(p->valType() == Param::BOOL) - cout << ") True if present" << endl; + std::cout << ") True if present" << std::endl; else - cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<required())?"Required":"Optional" )<<". By default: "<defValue()<description() << endl; + std::cout << "\n\t # " << p->description() << std::endl; } } // for p - cout << endl; + std::cout << std::endl; }; /** - * This class managges unknown argument exceptions. + * This class managges unknown argument std::exceptions. */ - class UnknownArg : public logic_error { + class UnknownArg : public std::logic_error { public: /** * Constructor - * @param _arg string to be shown when the exception occurs + * @param _arg std::string to be shown when the std::exception occurs */ - UnknownArg( const string& _arg): logic_error( "Invalid argument: "+_arg ) { }; + UnknownArg( const std::string& _arg): std::logic_error( "Invalid argument: "+_arg ) { }; }; /** * This class managges bad param types. */ - class BadType : public logic_error { + class BadType : public std::logic_error { public: /** @@ -752,40 +752,40 @@ public: * @param _param The param * @param _value The value of the param */ - BadType(const string& _param, const string& _value, const string& _correctType) - : logic_error("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; + BadType(const std::string& _param, const std::string& _value, const std::string& _correctType) + : std::logic_error("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; }; /** - * This class managges exceptions produced when there isn't a value for a parameter. + * This class managges std::exceptions produced when there isn't a value for a parameter. */ - class MissingVal : public logic_error { + class MissingVal : public std::logic_error { public: /** * Constructor * @param _param The param */ - MissingVal(const string& _param) : logic_error("Missing value for parameter " + _param) {}; + MissingVal(const std::string& _param) : std::logic_error("Missing value for parameter " + _param) {}; }; /** - * This class managges exceptions produced when the user forgot a required parameter. + * This class managges std::exceptions produced when the user forgot a required parameter. */ - class MissingReqParam : public logic_error { + class MissingReqParam : public std::logic_error { public: /** * Constructor * @param _shortName The param's short name */ - MissingReqParam(const string& _shortName) : logic_error("Missing required parameter " + _shortName) {}; + MissingReqParam(const std::string& _shortName) : std::logic_error("Missing required parameter " + _shortName) {}; }; /** - * This class managges exceptions du to < without a > in array value + * This class managges std::exceptions du to < without a > in array value */ - class BadArrayParam : public logic_error { + class BadArrayParam : public std::logic_error { public: /** @@ -793,17 +793,17 @@ public: * @param _param The param * @param _first_word The first word read after the "<" */ - BadArrayParam(const string& _param, const string &_first_word) : - logic_error("Array parameter " + _param + ": No matching > (" + _first_word + BadArrayParam(const std::string& _param, const std::string &_first_word) : + std::logic_error("Array parameter " + _param + ": No matching > (" + _first_word + "... )") {}; }; - void createParamFile( ostream& _os ) { - vector::iterator p; + void createParamFile( std::ostream& _os ) { + std::vector::iterator p; for ( p=params.begin(); p!=params.end(); p++ ) { switch( p->valType() ) { case Param::TITLE: - _os << endl << "# -- "; + _os << std::endl << "# -- "; break; case Param::BOOL: _os << ((p->value()=="true" )?"":"#") @@ -819,16 +819,16 @@ public: _os << p->longName()<<"\t"<value(); break; } // switch - _os << "\t #" << p->description() << endl; + _os << "\t #" << p->description() << std::endl; } } private: - vector params; - string programName; - string programDescription; + std::vector params; + std::string programName; + std::string programDescription; int parse_argc; char **parse_argv; - string InputFileName; + std::string InputFileName; }; diff --git a/eo/src/obsolete/eoPopOps.h b/eo/src/obsolete/eoPopOps.h index b719ec238..bd1dbf687 100644 --- a/eo/src/obsolete/eoPopOps.h +++ b/eo/src/obsolete/eoPopOps.h @@ -68,7 +68,7 @@ class eoMonPopOp: public eoObject{ /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoMonPopOp";}; + virtual std::string className() const {return "eoMonPopOp";}; //@} }; @@ -101,7 +101,7 @@ class eoBinPopOp: public eoObject{ /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoBinPopOp";}; + virtual std::string className() const {return "eoBinPopOp";}; //@} }; @@ -135,7 +135,7 @@ class eoSelectOne: public eoObject{ /** Inherited from eoObject. Returns the class name. @see eoObject */ - virtual string className() const {return "eoSelectOne";}; + virtual std::string className() const {return "eoSelectOne";}; //@} }; diff --git a/eo/src/obsolete/eoProportional.h b/eo/src/obsolete/eoProportional.h index 6840f697c..7116e7863 100644 --- a/eo/src/obsolete/eoProportional.h +++ b/eo/src/obsolete/eoProportional.h @@ -48,7 +48,7 @@ public: total((pop.size() == 0) ? -1.0 : sum_fitness(pop)) { if (minimizing_fitness()) - throw logic_error("eoProportional: minimizing fitness"); + throw std::logic_error("eoProportional: minimizing fitness"); } void setup(const eoPop& _pop) diff --git a/eo/src/obsolete/eoProportionalGOpSel.h b/eo/src/obsolete/eoProportionalGOpSel.h index 68eb8ce61..a52bac60f 100644 --- a/eo/src/obsolete/eoProportionalGOpSel.h +++ b/eo/src/obsolete/eoProportionalGOpSel.h @@ -44,7 +44,7 @@ public : } /// - virtual string className() const { return "eoGOpSelector"; }; + virtual std::string className() const { return "eoGOpSelector"; }; }; diff --git a/eo/src/obsolete/eoProportionalOpSel.h b/eo/src/obsolete/eoProportionalOpSel.h index 00ea5fb92..72c17dc2c 100644 --- a/eo/src/obsolete/eoProportionalOpSel.h +++ b/eo/src/obsolete/eoProportionalOpSel.h @@ -31,7 +31,7 @@ //----------------------------------------------------------------------------- -#include // runtime_error +#include // std::runtime_error #include // greater #include @@ -42,8 +42,8 @@ //----------------------------------------------------------------------------- /** This class selects operators according to probability. All operator percentages -should add up to one; if not, an exception will be raised.\\ -Operators are represented as pairs (proportion,operator) +should add up to one; if not, an std::exception will be raised.\\ +Operators are represented as std::pairs (proportion,operator) */ template class eoProportionalOpSel: public eoOpSelector, @@ -63,14 +63,14 @@ public: /** Gets a non-const reference to an operator, so that it can be changed, modified or whatever @param _id a previously assigned ID - @throw runtime_error if the ID does not exist*/ + @throw std::runtime_error if the ID does not exist*/ virtual eoOp& getOp( ID _id ) { MMF::iterator i=begin(); ID j = 1; while ( (i++!=end()) && (j++ != _id) ); if ( i == end() ) - throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); + throw std::runtime_error( "No such id in eoProportionalOpSel::op\n" ); return *(i->second); //return i->second; } @@ -87,7 +87,7 @@ public: /** Remove an operator from the operator set @param _id a previously assigned ID - @throw runtime_error if the ID does not exist + @throw std::runtime_error if the ID does not exist */ virtual void deleteOp( ID _id ) { unsigned j; @@ -98,7 +98,7 @@ public: return; } if ( i == end() ) - throw runtime_error( "No such id in eoProportionalOpSel::op\n" ); + throw std::runtime_error( "No such id in eoProportionalOpSel::op\n" ); }; /// Returns a genetic operator according to the established criteria @@ -111,7 +111,7 @@ public: acc +=i->first; } if ( acc != 1.0 ) - throw runtime_error( "Operator rates added up different from 1.0" ); + throw std::runtime_error( "Operator rates added up different from 1.0" ); // If here, operators ordered by rate and no problem float aRnd = rng.uniform(); @@ -121,7 +121,7 @@ public: acc += i->first; } while ( (acc <= aRnd ) && (i++!=end() ) ); if ( i == end() ) - throw runtime_error( "Operator not found in eoProportionalOpSelector" ); + throw std::runtime_error( "Operator not found in eoProportionalOpSelector" ); return i->second; //return i->second; } @@ -130,18 +130,18 @@ public: //@{ /** Return the class id. - @return the class name as a string + @return the class name as a std::string */ - virtual string className() const { return "eoProportionalOpSel"; }; + virtual std::string className() const { return "eoProportionalOpSel"; }; /** Print itself: inherited from eoObject implementation. Declared virtual so that it can be reimplemented anywhere. Instance from base classes are processed in base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ - _s << className().c_str() << endl; + @param _s the std::ostream in which things are written*/ + virtual void printOn( std::ostream& _s ) const{ + _s << className().c_str() << std::endl; for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { - _s << i->first << "\t" << *(i->second )<< endl; + _s << i->first << "\t" << *(i->second )<< std::endl; } } diff --git a/eo/src/obsolete/eoRandomBreed.h b/eo/src/obsolete/eoRandomBreed.h index dd22d8437..61b76e08d 100644 --- a/eo/src/obsolete/eoRandomBreed.h +++ b/eo/src/obsolete/eoRandomBreed.h @@ -27,13 +27,13 @@ #include -/** Takes those on the selection list and creates a list of new individuals +/** Takes those on the selection std::list and creates a std::list of new individuals * Destroys the genetic pool */ template class EORandomBreed: public EOBreeder{ public: - typedef vector< EOOp * > vecOpT; + typedef std::vector< EOOp * > vecOpT; /// Ctor EORandomBreed():vecOp() {}; @@ -54,12 +54,12 @@ public: vecOp.push_back( _eop); }; - /// Takes the operator pointed to from the operator list + /// Takes the operator pointed to from the operator std::list virtual void deleteOp( const EOOp* _eop); /** Takes the genetic pool, and returns next generation, destroying the * genetic pool container - * Non-const because it might order the operator vector. In this case, + * Non-const because it might order the operator std::vector. In this case, * it mates all members of the population randomly */ virtual void operator() ( EOPop< EOT >& _ptVeo ); @@ -133,7 +133,7 @@ template class EORandomBreedLog: public EORandomBreed{ public: - typedef vector< EOOp * > vecOpT; + typedef std::vector< EOOp * > vecOpT; /// Ctor EORandomBreedLog( EOFactory & _eof ):EORandomBreed(), factory( _eof ) {}; @@ -148,7 +148,7 @@ public: /** Takes the genetic pool, and returns next generation, destroying the * genetic pool container - * Non-const because it might order the operator vector. In this case, it mates + * Non-const because it might order the operator std::vector. In this case, it mates * all population randomly */ virtual void operator() ( EOPop< EOT >& _ptVeo ) { diff --git a/eo/src/obsolete/eoRandomSelect.h b/eo/src/obsolete/eoRandomSelect.h index 53b7a03e4..26faa9eae 100644 --- a/eo/src/obsolete/eoRandomSelect.h +++ b/eo/src/obsolete/eoRandomSelect.h @@ -78,11 +78,11 @@ template class eoRandomSelect: public eoBinPopOp * Should call base class, just in case. - * @param _s A istream. + * @param _s A std::istream. */ - virtual void readFrom(istream& _s) { + virtual void readFrom(std::istream& _s) { _s >> repRate; @@ -96,9 +96,9 @@ template class eoRandomSelect: public eoBinPopOp base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ + @param _s the std::ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ + virtual void printOn( std::ostream& _s ) const{ _s << repRate; @@ -112,7 +112,7 @@ template class eoRandomSelect: public eoBinPopOp */ - string className() const {return "eoRandomSelect";}; + std::string className() const {return "eoRandomSelect";}; diff --git a/eo/src/obsolete/eoRank.h b/eo/src/obsolete/eoRank.h index 67d6707f3..588fb1dab 100644 --- a/eo/src/obsolete/eoRank.h +++ b/eo/src/obsolete/eoRank.h @@ -40,9 +40,9 @@ /** - * Takes those on the selection list and creates a list of new individuals + * Takes those on the selection std::list and creates a std::list of new individuals * Destroys the genetic pool. There's no requisite on EOT, other than the - * genetic operators can be instantiated with it, so it fully depends on + * genetic operators can be instantiated with it, so it fully depstd::ends on * the genetic operators used. If generic genetic operators are used, then * EOT must be an EO */ @@ -61,14 +61,14 @@ class eoRank: public eoSelect, public eoObject, public eoPrintable /** Takes the genetic pool, and returns next generation, destroying the * genetic pool container - * Non-const because it might order the operator vector*/ + * Non-const because it might order the operator std::vector*/ virtual void operator() ( const eoPop< EOT >& _ptVeo, eoPop< EOT >& _siblings ) const { unsigned inLen = _ptVeo.size(); // size of subPop if ( !inLen ) - throw runtime_error( "zero population in eoRank"); + throw std::runtime_error( "zero population in eoRank"); for ( unsigned i = 0; i < repNewPopSize; i ++ ) { // Create a copy of a random input EO with copy ctor. The members of the @@ -113,13 +113,13 @@ class eoRank: public eoSelect, public eoObject, public eoPrintable /** Return the class id. - @return the class name as a string + @return the class name as a std::string */ - virtual string className() const { return "eoRank"; }; + virtual std::string className() const { return "eoRank"; }; - virtual void printOn( ostream& _s ) const + virtual void printOn( std::ostream& _s ) const { _s << repNewPopSize; }; diff --git a/eo/src/obsolete/eoScheme.h b/eo/src/obsolete/eoScheme.h index 5920fdb64..a66695b0f 100644 --- a/eo/src/obsolete/eoScheme.h +++ b/eo/src/obsolete/eoScheme.h @@ -81,8 +81,8 @@ class eoScheme: public eoAlgo{ eoScheme(Parser & parser) { // read the popsize parser.AddTitle("Description of evolution"); - string Evol; - string SelectString; + std::string Evol; + std::string SelectString; // temporary float rate_offspring; @@ -92,9 +92,9 @@ class eoScheme: public eoAlgo{ popsize = parser.getInt("-EP", "--population", "10", "Population size" ); } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -128,9 +128,9 @@ class eoScheme: public eoAlgo{ ptreplace = new eoInclusion(); // put here the choice of elitism } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -156,9 +156,9 @@ class eoScheme: public eoAlgo{ ptselect_mate = new eoDetTournament((int)_rate); } } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -178,9 +178,9 @@ class eoScheme: public eoAlgo{ ptselect_mate = new eoUniformSelect(); ptreplace = new eoESPlus(); } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -197,9 +197,9 @@ class eoScheme: public eoAlgo{ ptselect_mate = new eoUniformSelect(); ptreplace = new eoESComma(); } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -218,9 +218,9 @@ class eoScheme: public eoAlgo{ "Size of stocahstic replacement tournament" ); ptreplace = new eoEPTournament(tsize); } - catch (exception & e) + catch (std::exception & e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; parser.printHelp(); exit(1); } @@ -249,7 +249,7 @@ class eoScheme: public eoAlgo{ /** Inherited from eoObject. Returns the class name. @see eoObject */ - string className() const {return "eoScheme";}; + std::string className() const {return "eoScheme";}; //@} private: unsigned popsize; /* but should it be here ??? */ @@ -275,7 +275,7 @@ class eoScheme: public eoAlgo{ in SSGA, nb_offspring = 1 (usually) elitism can be used anywhere - though stupid in ES, EP and SSGA who are - elist by definition + estd::list by definition */ #endif _EOSCHEME_H @@ -319,7 +319,7 @@ class eoScheme: public eoAlgo{ mate = select_mate(pop, tmp); // though useless ig mutation else mate = tmp; // assumed: mate will not be used! - cout << op->className() << " for offspring " << i << endl; + std::cout << op->className() << " for offspring " << i << std::endl; tmp = (*op)( tmp, mate, pop ); op = seqselop.Op(&id); } diff --git a/eo/src/obsolete/eoSteadyStateEA.h b/eo/src/obsolete/eoSteadyStateEA.h index 7be4870ff..caa9ebedd 100644 --- a/eo/src/obsolete/eoSteadyStateEA.h +++ b/eo/src/obsolete/eoSteadyStateEA.h @@ -63,11 +63,11 @@ template class eoSteadyStateEA: public eoAlgo { step(pop); } - catch (exception& e) + catch (std::exception& e) { - string s = e.what(); + std::string s = e.what(); s.append( " in eoSteadyStateEA "); - throw runtime_error( s ); + throw std::runtime_error( s ); } } while ( continuator( pop ) ); diff --git a/eo/src/obsolete/eoStochTournament.h b/eo/src/obsolete/eoStochTournament.h index 78a5f1fd1..5569ce624 100644 --- a/eo/src/obsolete/eoStochTournament.h +++ b/eo/src/obsolete/eoStochTournament.h @@ -48,7 +48,7 @@ template class eoStochTournament: public eoSelectOne { // consistency check if (Trate < 0.5) { - cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + std::cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; Trate = 0.55; } } diff --git a/eo/src/obsolete/eoStochTournamentInserter.h b/eo/src/obsolete/eoStochTournamentInserter.h index 002f3d9c1..3856aeccb 100644 --- a/eo/src/obsolete/eoStochTournamentInserter.h +++ b/eo/src/obsolete/eoStochTournamentInserter.h @@ -66,7 +66,7 @@ public : return *this; } - string className(void) const { return "eoStochTournamentInserter"; } + std::string className(void) const { return "eoStochTournamentInserter"; } private : double t_rate; diff --git a/eo/src/obsolete/eoStringMutation.h b/eo/src/obsolete/eoStringMutation.h index ee8590dea..1612da4a9 100644 --- a/eo/src/obsolete/eoStringMutation.h +++ b/eo/src/obsolete/eoStringMutation.h @@ -51,7 +51,7 @@ class eoStringMutation: public eoMutation { /** Inherited from eoObject @see eoObject */ - string className() const {return "eoStringMutation";}; + std::string className() const {return "eoStringMutation";}; //@} diff --git a/eo/src/obsolete/eoTournament.h b/eo/src/obsolete/eoTournament.h index 6cc013902..01dc4619e 100644 --- a/eo/src/obsolete/eoTournament.h +++ b/eo/src/obsolete/eoTournament.h @@ -73,7 +73,7 @@ public: unsigned thisSize = _vEO.size(); - // Build vector + // Build std::vector for ( unsigned j = 0; j < thisSize*perc; j ++ ) { // Randomly select a tournamentSize set, and choose the best eoPop veoTournament; @@ -84,10 +84,10 @@ public: veoTournament.push_back( newEO ); } - eoPop::const_iterator best = max_element(veoTournament.begin(), + eoPop::const_iterator best = std::max_element(veoTournament.begin(), veoTournament.end()); if (best == veoTournament.end()) { - throw runtime_error("error in void eoTournament::operator(eoPop&, eoPop&)"); + throw std::runtime_error("error in void eoTournament::operator(eoPop&, eoPop&)"); } // The best individual is chosen for the new population @@ -106,11 +106,11 @@ public: * Should call base class, just in case. - * @param _s A istream. + * @param _s A std::istream. */ - virtual void readFrom(istream& _s) { + virtual void readFrom(std::istream& _s) { _s >> perc >> repTournamentSize; @@ -124,11 +124,11 @@ public: base classes, so you don´t have to worry about, for instance, fitness. - @param _s the ostream in which things are written*/ + @param _s the std::ostream in which things are written*/ - virtual void printOn( ostream& _s ) const{ + virtual void printOn( std::ostream& _s ) const{ - _s << perc << endl << repTournamentSize << endl; + _s << perc << std::endl << repTournamentSize << std::endl; } @@ -140,7 +140,7 @@ public: */ - string className() const {return "eoTournament";}; + std::string className() const {return "eoTournament";}; diff --git a/eo/src/obsolete/eoTranspose.h b/eo/src/obsolete/eoTranspose.h index 7d2a8d74c..51671830a 100644 --- a/eo/src/obsolete/eoTranspose.h +++ b/eo/src/obsolete/eoTranspose.h @@ -41,7 +41,7 @@ class eoTranspose: public eoMonOp { public: - // Specialization for a vector + // Specialization for a std::vector void operator()(eoFixedLength& _eo ) { unsigned pos1 = rng.random(_eo.size()), @@ -54,7 +54,7 @@ public: _eo.invalidate(); } - // Specialization for a list + // Specialization for a std::list void operator()(eoVariableLength& _eo ) { unsigned pos1 = rng.random(_eo.size()), @@ -85,7 +85,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoTranspose";}; + virtual std::string className() const {return "eoTranspose";}; //@} }; diff --git a/eo/src/obsolete/eoUniformXOver.h b/eo/src/obsolete/eoUniformXOver.h index 961efa8bf..76623a0ec 100644 --- a/eo/src/obsolete/eoUniformXOver.h +++ b/eo/src/obsolete/eoUniformXOver.h @@ -110,7 +110,7 @@ class eoUniformXOver: public eoQuadraticOp< EOT > if (rate < 0 || rate > 1) - runtime_error("UxOver --> invalid rate"); + std::runtime_error("UxOver --> invalid rate"); } @@ -152,7 +152,7 @@ class eoUniformXOver: public eoQuadraticOp< EOT > */ - string className() const {return "eoUniformXOver";}; + std::string className() const {return "eoUniformXOver";}; //@} diff --git a/eo/src/obsolete/eoVector.h b/eo/src/obsolete/eoVector.h index d9a24dc8a..315683f57 100644 --- a/eo/src/obsolete/eoVector.h +++ b/eo/src/obsolete/eoVector.h @@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- eoVector.h - Turns an STL vector into an EO + Turns an STL std::vector into an EO (c) GeNeura Team, 1998 This library is free software; you can redistribute it and/or @@ -28,19 +28,19 @@ #define _eoVector_H // STL libraries -#include // For vector +#include // For std::vector #include #include #include #include -/** Adaptor that turns an STL vector into an EO +/** Adaptor that turns an STL std::vector into an EO with the same gene type as the type with which - the vector has been instantiated + the std::vector has been instantiated */ template -class eoVector: public eo1d, public vector { +class eoVector: public eo1d, public std::vector { public: typedef T Type ; @@ -52,7 +52,7 @@ public: @param _val Common initial value */ eoVector( unsigned _size = 0, T _val = 0) - : eo1d(), vector( _size, _val ){ }; + : eo1d(), std::vector( _size, _val ){ }; /** Ctor using a random number generator @param _size Lineal length of the object @@ -60,22 +60,22 @@ public: */ eoVector( unsigned _size, eoRnd& _rnd ); - /** Ctor from a istream. The T class should accept reading from a istream. It doesn't read fitness, + /** Ctor from a std::istream. The T class should accept reading from a std::istream. It doesn't read fitness, which is supposed to be dynamic and dependent on environment. @param _is the input stream; should have all values in a single line, separated by whitespace */ - eoVector( istream& _is); + eoVector( std::istream& _is); /// copy ctor eoVector( const eoVector & _eo ) - : eo1d( _eo ), vector( _eo ){ }; + : eo1d( _eo ), std::vector( _eo ){ }; /// Assignment operator const eoVector& operator =( const eoVector & _eo ) { if ( this != &_eo ){ eo1d::operator=( _eo ); - vector::operator=( _eo ); + std::vector::operator=( _eo ); } return *this; } @@ -86,7 +86,7 @@ which is supposed to be dynamic and dependent on environment. //@} /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size + @std::exception out_of_range if _i is larger than EO´s size */ virtual T getGene( unsigned _i ) const { if ( _i >= length() ) @@ -95,7 +95,7 @@ which is supposed to be dynamic and dependent on environment. }; /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size + @std::exception out_of_range if _i is larger than EO´s size */ virtual void setGene( unsigned _i, const T& _value ) { if ( _i >= size() ) @@ -104,11 +104,11 @@ which is supposed to be dynamic and dependent on environment. }; /** methods that implement the eo1d protocol - @exception out_of_range if _i is larger than EO´s size + @std::exception out_of_range if _i is larger than EO´s size */ virtual void insertGene( unsigned _i, T _val ) { if (_i <= size() ) { - vector::iterator i = begin()+_i; + std::vector::iterator i = begin()+_i; insert( i, _val ); } else { throw out_of_range( "out_of_range when inserting a gene"); @@ -116,11 +116,11 @@ which is supposed to be dynamic and dependent on environment. }; /** Eliminates the gene at position _i - @exception out_of_range if _i is larger than EO´s size + @std::exception out_of_range if _i is larger than EO´s size */ virtual void deleteGene( unsigned _i ) { if (_i < this->size() ) { - vector::iterator i = this->begin()+_i; + std::vector::iterator i = this->begin()+_i; this->erase( i ); } else { throw out_of_range( "out_of_range when deleting a gene"); @@ -137,7 +137,7 @@ which is supposed to be dynamic and dependent on environment. /** Inherited from eoObject @see eoObject */ - string className() const {return "eoVector";}; + std::string className() const {return "eoVector";}; //@} }; @@ -149,7 +149,7 @@ which is supposed to be dynamic and dependent on environment. //____________________________________________________________________________________ template eoVector::eoVector( unsigned _size, eoRnd& _rnd ) - : eo1d(), vector( _size ){ + : eo1d(), std::vector( _size ){ for ( iterator i = begin(); i != end(); i ++ ) { *i = _rnd(); } @@ -157,8 +157,8 @@ eoVector::eoVector( unsigned _size, eoRnd& _rnd ) //____________________________________________________________________________________ template -eoVector::eoVector( istream& _is) - : eo1d(), vector( ){ +eoVector::eoVector( std::istream& _is) + : eo1d(), std::vector( ){ while (_is ) { T tmp; _is >> tmp; diff --git a/eo/src/obsolete/eoWrappedOps.h b/eo/src/obsolete/eoWrappedOps.h index cd7432ef1..805bb29e7 100644 --- a/eo/src/obsolete/eoWrappedOps.h +++ b/eo/src/obsolete/eoWrappedOps.h @@ -176,7 +176,7 @@ class eoCombinedOp : public eoGeneralOp counter++; if (counter > 1000) { - throw logic_error("eoCombinedOp: no termination after 1000 tries, did you forget to insert individuals in your eoGeneralOp?"); + throw std::logic_error("eoCombinedOp: no termination after 1000 tries, did you forget to insert individuals in your eoGeneralOp?"); } } while (next.size() < intermediate.size()); diff --git a/eo/src/obsolete/eoXOver2.h b/eo/src/obsolete/eoXOver2.h index ddb1682e3..d1f538526 100644 --- a/eo/src/obsolete/eoXOver2.h +++ b/eo/src/obsolete/eoXOver2.h @@ -69,7 +69,7 @@ public: /** Inherited from eoObject @see eoObject */ - string className() const {return "eoXOver2";}; + std::string className() const {return "eoXOver2";}; //@} private: @@ -91,7 +91,7 @@ private: len= (len1 > len2)?len2:len1; if ( (_j > len) || (_i> len ) ) - throw runtime_error( "xOver2: applying xOver past boundaries"); + throw std::runtime_error( "xOver2: applying xOver past boundaries"); for ( unsigned i = _i; i < _j; i++ ) { Type tmp = _eo.gene( i ); diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 37e1036af..803806705 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -46,12 +46,12 @@ public : Init externalEo with the struct itself and set fitness to zero */ eoExternalEO(const External& ext) : EO(), External(ext) {} - eoExternalEO(istream& is) : EO(), External(ext) { readFrom(is); } + eoExternalEO(std::istream& is) : EO(), External(ext) { readFrom(is); } /** * Read object, the external struct needs to have an operator>> defined */ - virtual void readFrom(istream& _is) + virtual void readFrom(std::istream& _is) { EO::readFrom(_is); _is >> static_cast(*this); @@ -59,9 +59,9 @@ public : /** * Write object. Called printOn since it prints the object _on_ a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { EO::printOn(_os); _os << static_cast(*this); diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index 88e6d4636..e37adba12 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -29,15 +29,13 @@ #include #include -using namespace std; - //----------------------------------------------------------------------------- // eoString //----------------------------------------------------------------------------- -/** Adaptor that turns an STL string into an EO */ +/** Adaptor that turns an STL std::string into an EO */ template -class eoString: public EO, public string +class eoString: public EO, public std::string { public: @@ -46,8 +44,8 @@ public: /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator //@{ /// ctor - eoString( const string& _str ="" ) - : string( _str ) {}; + eoString( const std::string& _str ="" ) + : std::string( _str ) {}; /** @name Methods from eoObject readFrom and printOn are directly inherited from eo1d @@ -56,7 +54,7 @@ public: /** Inherited from eoObject @see eoObject */ - virtual string className() const {return "eoString";}; + virtual std::string className() const {return "eoString";}; //@} diff --git a/eo/src/paradisEO/comm/eoListener.h b/eo/src/paradisEO/comm/eoListener.h index 8be169274..6ac32f5bb 100644 --- a/eo/src/paradisEO/comm/eoListener.h +++ b/eo/src/paradisEO/comm/eoListener.h @@ -38,7 +38,7 @@ // In the near future ... Enabling different kinds of EO to send/receive .. -template class eoListener : public vector > { +template class eoListener : public std::vector > { public : @@ -91,11 +91,11 @@ public : } /** - To broadcast the string identifier of the local process to the + To broadcast the std::string identifier of the local process to the whole neighbouring ... */ - void publish (string label) { + void publish (std::string label) { eoPublishMessTo mess (label) ; for (int i = 0 ; i < size () ; i ++) @@ -123,7 +123,7 @@ public : } while (! b) ; } - void destroy (string label) { + void destroy (std::string label) { eoKillMessTo mess ; for (int i = 0 ; i < len ; i ++) { diff --git a/eo/src/paradisEO/comm/eoLocalListener.h b/eo/src/paradisEO/comm/eoLocalListener.h index a0b342d8b..b11e21768 100644 --- a/eo/src/paradisEO/comm/eoLocalListener.h +++ b/eo/src/paradisEO/comm/eoLocalListener.h @@ -50,7 +50,7 @@ template class eoEOSendMessFrom ; template class eoPublishMessFrom ; template class eoKillMessFrom ; -template class eoLocalListener : public queue > { +template class eoLocalListener : public std::queue > { public : @@ -125,7 +125,7 @@ public : String identifier of this algo/agent ? */ - string & label () { + std::string & label () { return name_id ; } @@ -142,18 +142,18 @@ public : void destroy () { - cout << "Agent [" << name_id << "] stopped ..." << endl ; + std::cout << "Agent [" << name_id << "] stopped ..." << std::endl ; MPI :: Finalize () ; exit (0) ; } - char host_name [255] ; // Host string identifier + char host_name [255] ; // Host std::string identifier private : MPI :: Comm * comm ; // MPI Communicator - string name_id ; // String id. + std::string name_id ; // String id. int num_id ; // MPI id. bool req_EO ; diff --git a/eo/src/paradisEO/comm/messages/eoMessTo.h b/eo/src/paradisEO/comm/messages/eoMessTo.h index 98efdef7c..913f99a20 100644 --- a/eo/src/paradisEO/comm/messages/eoMessTo.h +++ b/eo/src/paradisEO/comm/messages/eoMessTo.h @@ -40,11 +40,11 @@ template class eoMessTo { public : /** - Constructor. A string identifier, being defined in subclasses + Constructor. A std::string identifier, being defined in subclasses is given for any kind of messages. */ - eoMessTo (string _label) : + eoMessTo (std::string _label) : label (_label), comm (MPI :: COMM_WORLD) { @@ -64,7 +64,7 @@ protected : MPI :: Comm & comm ; // MPI Communicator - string label ; // String identifier of the message + std::string label ; // String identifier of the message } ; diff --git a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h index 5f8a2e771..f4824d256 100644 --- a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h +++ b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h @@ -57,7 +57,7 @@ public : void operator () () { loc_listen.push (pop) ; - // cout << "Reception de " << pop.size () << "individus " << endl ; + // std::cout << "Reception de " << pop.size () << "individus " << std::endl ; } private : diff --git a/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h index 6986f5196..bd30c04ae 100644 --- a/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h +++ b/eo/src/paradisEO/comm/messages/from/eoHeaderMessFrom.h @@ -34,7 +34,7 @@ template class eoLocalListener ; message to be then received ... */ -template class eoHeaderMessFrom : public string { +template class eoHeaderMessFrom : public std::string { public : diff --git a/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h index 66c55454c..4521fa7cf 100644 --- a/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h +++ b/eo/src/paradisEO/comm/messages/from/eoPublishMessFrom.h @@ -58,7 +58,7 @@ public : private : - string label ; // String identifier ... + std::string label ; // String identifier ... } ; diff --git a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h index ad27fece4..127214c73 100644 --- a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h +++ b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h @@ -54,7 +54,7 @@ public : eoMessTo :: operator () (loc_listen) ; - ostrstream f ; + std::ostrstream f ; pop.printOn (f) ; comm.Send (f.str (), f.pcount (), MPI :: CHAR, loc_listen.number (), 0) ; loc_listen.need_immigration () = false ; diff --git a/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h b/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h index 4126d901d..a7f368e4a 100644 --- a/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h +++ b/eo/src/paradisEO/comm/messages/to/eoHeaderMessTo.h @@ -35,18 +35,18 @@ template class eoLocalListener ; message to be then sent ... */ -template class eoHeaderMessTo : public string { +template class eoHeaderMessTo : public std::string { public : /** Constructor. - The string identifiant id given in parameter. + The std::string identifiant id given in parameter. */ - eoHeaderMessTo (string label) : + eoHeaderMessTo (std::string label) : - string (label), + std::string (label), comm (MPI :: COMM_WORLD) { } diff --git a/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h b/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h index 810052950..0b7f81340 100644 --- a/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h +++ b/eo/src/paradisEO/comm/messages/to/eoPublishMessTo.h @@ -22,7 +22,7 @@ */ /** - To let know from distributed algos the string identifier + To let know from distributed algos the std::string identifier of the home process ... */ @@ -42,7 +42,7 @@ public : Constructor */ - eoPublishMessTo (string & _label + eoPublishMessTo (std::string & _label ) : eoMessTo ("eoPublishMessTo"), label (_label) { @@ -57,7 +57,7 @@ public : private : - string label ; // String identifier to send ... + std::string label ; // String identifier to send ... } ; diff --git a/eo/src/paradisEO/eoPopAgent.h b/eo/src/paradisEO/eoPopAgent.h index 3e81f824f..093fca236 100644 --- a/eo/src/paradisEO/eoPopAgent.h +++ b/eo/src/paradisEO/eoPopAgent.h @@ -43,7 +43,7 @@ public : Constructor */ - eoPopAgent (string _label, + eoPopAgent (std::string _label, eoListener & _listen, eoPopAlgo & _algo ) : @@ -68,7 +68,7 @@ public : while (! listen [i].empty ()) { eoPop & pop = listen [i].front () ; - cout << "Agent [" << label << "] on " << listen.here ().host_name << " : Receiving " << pop.size () << " individuals ..." << endl ; + std::cout << "Agent [" << label << "] on " << listen.here ().host_name << " : Receiving " << pop.size () << " individuals ..." << std::endl ; algo (pop) ; eoEOSendMessTo mess (pop) ; mess (listen [i]) ; // Coming back ... @@ -80,7 +80,7 @@ public : private : - string label ; // string identifier + std::string label ; // std::string identifier eoListener & listen ; // EO's listener eoPopAlgo & algo ; // Local supplied algo diff --git a/eo/src/paradisEO/eoSolAgent.h b/eo/src/paradisEO/eoSolAgent.h index 722e8bef8..96683bbdc 100644 --- a/eo/src/paradisEO/eoSolAgent.h +++ b/eo/src/paradisEO/eoSolAgent.h @@ -43,7 +43,7 @@ public : Constructor */ - eoSolAgent (string _label, + eoSolAgent (std::string _label, eoListener & _listen, eoSolAlgo & _algo ) : @@ -68,7 +68,7 @@ public : while (! listen [i].empty ()) { EOT & sol = listen [i].front () ; - cout << "Agent [" << label << "] on " << listen.here ().host_name << " : Receiving one individual ..." << endl ; + std::cout << "Agent [" << label << "] on " << listen.here ().host_name << " : Receiving one individual ..." << std::endl ; algo (sol) ; eoPop pop ; pop.push_back (sol) ; @@ -82,7 +82,7 @@ public : private : - string label ; // string identifier + std::string label ; // std::string identifier eoListener & listen ; // EO's listener eoSolAlgo & algo ; // Local supplied algo diff --git a/eo/src/paradisEO/eval/eoDistEvalEasyEA.h b/eo/src/paradisEO/eval/eoDistEvalEasyEA.h index c49342989..49395fcce 100644 --- a/eo/src/paradisEO/eval/eoDistEvalEasyEA.h +++ b/eo/src/paradisEO/eval/eoDistEvalEasyEA.h @@ -44,7 +44,7 @@ public : eoDistEvalEasyEA (eoListener & _listen, eoEasyEA & _ea, - string _label + std::string _label ) : pop_eval (eoDistPopEvalFunc (_listen, _label, _ea.eval)), eoEasyEA (_ea.continuator, diff --git a/eo/src/paradisEO/eval/eoDistPopEvalFunc.h b/eo/src/paradisEO/eval/eoDistPopEvalFunc.h index 93d20cdd3..00170c032 100644 --- a/eo/src/paradisEO/eval/eoDistPopEvalFunc.h +++ b/eo/src/paradisEO/eval/eoDistPopEvalFunc.h @@ -36,7 +36,7 @@ public : */ eoDistPopEvalFunc (eoListener & _listen, - string & _label, + std::string & _label, eoEvalFunc & _eval ) : listen (_listen), @@ -58,8 +58,8 @@ public : } if (num_eval == 0) { - cout << "No [" << label << "] available ..." << endl ; - cout << "Waiting for a few seconds ..." << endl ; + std::cout << "No [" << label << "] available ..." << std::endl ; + std::cout << "Waiting for a few seconds ..." << std::endl ; sleep (2) ; } } while (num_eval == 0) ; @@ -120,7 +120,7 @@ public : private : eoListener & listen ; - string label ; // String identifier of evaluators + std::string label ; // String identifier of evaluators eoEvalFunc & eval ; } ; diff --git a/eo/src/paradisEO/eval/eoEvaluator.h b/eo/src/paradisEO/eval/eoEvaluator.h index bc510e6de..eb2a98e60 100644 --- a/eo/src/paradisEO/eval/eoEvaluator.h +++ b/eo/src/paradisEO/eval/eoEvaluator.h @@ -44,7 +44,7 @@ public : Constructor */ - eoEvaluator (string _label, + eoEvaluator (std::string _label, eoListener & _listen, eoEvalFunc & _eval ) : diff --git a/eo/src/paradisEO/island/eoConnectivity.h b/eo/src/paradisEO/island/eoConnectivity.h index 8db27ab98..fdfdd83e7 100644 --- a/eo/src/paradisEO/island/eoConnectivity.h +++ b/eo/src/paradisEO/island/eoConnectivity.h @@ -44,7 +44,7 @@ public : */ eoConnectivity (eoListener & _listen, - vector & _sel_neigh + std::vector & _sel_neigh ) : listen (_listen), sel_neigh (_sel_neigh) { @@ -56,22 +56,22 @@ public : immigrants from ... */ - virtual vector *> from () = 0 ; + virtual std::vector *> from () = 0 ; /** Computes the subset of neighbours to send emigrants to ... */ - virtual vector *> to () = 0 ; + virtual std::vector *> to () = 0 ; protected : eoListener & listen ; - vector sel_neigh ; + std::vector sel_neigh ; - bool selected (string & id) { + bool selected (std::string & id) { for (int i = 0 ; i < sel_neigh.size () ; i ++) if (sel_neigh [i] == id) diff --git a/eo/src/paradisEO/island/eoIslandsEasyEA.h b/eo/src/paradisEO/island/eoIslandsEasyEA.h index f0b643b62..df7471519 100644 --- a/eo/src/paradisEO/island/eoIslandsEasyEA.h +++ b/eo/src/paradisEO/island/eoIslandsEasyEA.h @@ -50,7 +50,7 @@ public : Constructor */ - eoIslandsEasyEA (string _id, + eoIslandsEasyEA (std::string _id, eoListener & _listen, eoConnectivity & _conn, eoEasyEA & _ea, @@ -87,7 +87,7 @@ private : // Internal components - string id ; // String identifiant of this algorithm + std::string id ; // String identifiant of this algorithm eoListener & listen ; // The neighbouring of concurrent algos eoConnectivity & conn ; // Communication topology eoCheckPoint chkp ; diff --git a/eo/src/paradisEO/island/eoMigUpdater.h b/eo/src/paradisEO/island/eoMigUpdater.h index d15cdb92a..bfdbf3db4 100644 --- a/eo/src/paradisEO/island/eoMigUpdater.h +++ b/eo/src/paradisEO/island/eoMigUpdater.h @@ -85,14 +85,14 @@ public : listen.update () ; // listen.display () ; - vector *> src = conn.from (), dest = conn.to () ; + std::vector *> src = conn.from (), dest = conn.to () ; // Any coming immigrants ? for (int i = 0 ; i < src.size () ; i ++) { src [i] -> update () ; while (! src [i] -> empty ()) { replace (* pop, src [i] -> front ()) ; - cout << "[" << listen.here ().host_name << "] Arrival of " << src [i] -> front ().size () << " individuals ..." << endl ; + std::cout << "[" << listen.here ().host_name << "] Arrival of " << src [i] -> front ().size () << " individuals ..." << std::endl ; src [i] -> pop () ; } } diff --git a/eo/src/paradisEO/island/topologies/eoFullConnectivity.h b/eo/src/paradisEO/island/topologies/eoFullConnectivity.h index 7c8b21165..9ee3d78d9 100644 --- a/eo/src/paradisEO/island/topologies/eoFullConnectivity.h +++ b/eo/src/paradisEO/island/topologies/eoFullConnectivity.h @@ -39,15 +39,15 @@ public : */ eoFullConnectivity (eoListener & _listen, - vector & _sel_neigh + std::vector & _sel_neigh ) : eoConnectivity (_listen, _sel_neigh) { } - virtual vector *> from () { + virtual std::vector *> from () { listen.update () ; - vector *> v ; + std::vector *> v ; for (int i = 0 ; i < listen.size () ; i ++) if (i != listen.here ().number () && selected (listen [i].label ())) @@ -56,11 +56,11 @@ public : return v ; } - virtual vector *> to () { + virtual std::vector *> to () { listen.update () ; - vector *> v ; + std::vector *> v ; for (int i = 0 ; i < listen.size () ; i ++) if (i != listen.here ().number () && selected (listen [i].label ())) diff --git a/eo/src/paradisEO/island/topologies/eoRingConnectivity.h b/eo/src/paradisEO/island/topologies/eoRingConnectivity.h index 7de042ac7..b2f654ece 100644 --- a/eo/src/paradisEO/island/topologies/eoRingConnectivity.h +++ b/eo/src/paradisEO/island/topologies/eoRingConnectivity.h @@ -27,7 +27,7 @@ #include /** - Each algorithm has a single pair of entering and outgoing + Each algorithm has a single std::pair of entering and outgoing neighbours, so that the unit constitutes a circular topology. */ @@ -40,15 +40,15 @@ public : */ eoRingConnectivity (eoListener & _listen, - vector & _sel_neigh + std::vector & _sel_neigh ) : eoConnectivity (_listen, _sel_neigh) { } - virtual vector *> from () { + virtual std::vector *> from () { listen.update () ; - vector *> v ; + std::vector *> v ; int i, k = listen.size () ; for (i = 0 ; i < k ; i ++) { @@ -69,11 +69,11 @@ public : */ - virtual vector *> to () { + virtual std::vector *> to () { listen.update () ; - vector *> v ; + std::vector *> v ; int i, k = listen.size () ; for (i = 0 ; i < k ; i ++) diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index 086d830cc..8ab69ede6 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -66,7 +66,7 @@ class PyFitness : public boost::python::object extract x(object::operator[](i)); if (!x.check()) - throw runtime_error("PyFitness: does not contain doubles"); + throw std::runtime_error("PyFitness: does not contain doubles"); return x(); } @@ -101,9 +101,9 @@ class PyFitness : public boost::python::object return other.operator<(*this); } - //void printOn(ostream& os) const { const object& o = *this; os << o; } - //friend ostream& operator<<(ostream& os, const PyFitness& p) { p.printOn(os); return os; } - //friend istream& operator>>(istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } + //void printOn(std::ostream& os) const { const object& o = *this; os << o; } + //friend std::ostream& operator<<(std::ostream& os, const PyFitness& p) { p.printOn(os); return os; } + //friend std::istream& operator>>(std::istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } }; struct PyEO : public EO< PyFitness > @@ -117,7 +117,7 @@ struct PyEO : public EO< PyFitness > void setGenome(object g) { genome = g; } object genome; - std::string to_string() const + std::string to_std::string() const { std::string result; result += extract(str(getFitness())); @@ -131,7 +131,7 @@ struct PyEO : public EO< PyFitness > }; -ostream& operator<<(ostream& os, const PyEO& _eo); +std::ostream& operator<<(std::ostream& os, const PyEO& _eo); struct PyEO_pickle_suite : boost::python::pickle_suite { diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index b59306266..d6e20d138 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -30,18 +30,18 @@ template struct T_pickle_suite : boost::python::pickle_suite { static - std::string print_to_string(const T& t) + std::string print_to_std::string(const T& t) { std::ostrstream os; t.printOn(os); - os << ends; + os << std::ends; return os.str(); } static boost::python::tuple getstate(const T& t) { - std::string s = print_to_string(t); + std::string s = print_to_std::string(t); return boost::python::make_tuple( boost::python::str(s)); } @@ -54,14 +54,14 @@ struct T_pickle_suite : boost::python::pickle_suite } }; -/** Defines persistency through pickle support by using strings +/** Defines persistency through pickle support by using std::strings * so while we're at it, we will .def("__str__") as well */ template boost::python::class_& pickle(boost::python::class_& c) { return c.def_pickle(T_pickle_suite()) - .def("__str__", T_pickle_suite::print_to_string); + .def("__str__", T_pickle_suite::print_to_std::string); } #endif diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 0bab1f086..29481b8fe 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -52,7 +52,7 @@ Olivier: this has been removed in .NET :) One step more standard... #ifdef min #undef min -#undef max // as they come in pairs +#undef max // as they come in std::pairs #endif // add min and max to std... diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 729a0c742..544595e13 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -33,7 +33,7 @@ #include /** eoCheckPoint is a container class. - It contains vectors of (pointers to) + It contains std::vectors of (pointers to) eoContinue (modif. MS July 16. 2002) eoStats, eoUpdater and eoMonitor it is an eoContinue, so its operator() will be called every generation - @@ -76,7 +76,7 @@ bool eoCheckPoint::operator()(const eoPop& _pop) { unsigned i; - vector sorted_pop; + std::vector sorted_pop; if (!sorted.empty()) { _pop.sort(sorted_pop); diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index 877b4720f..6fd9a8b5d 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -27,11 +27,9 @@ //----------------------------------------------------------------------------- -#include // vector +#include // std::vector #include // set -#include // string - -using namespace std; +#include // std::string #ifdef _MSC_VER diff --git a/eo/src/utils/eoDistance.h b/eo/src/utils/eoDistance.h index ddc3d2f3a..2ffb8ccc1 100644 --- a/eo/src/utils/eoDistance.h +++ b/eo/src/utils/eoDistance.h @@ -38,7 +38,7 @@ class eoDistance : public eoBF /** This is a generic class for Euclidain distance computation: - assumes the 2 things are vectors of something that is double-castable + assumes the 2 things are std::vectors of something that is double-castable */ template< class EOT > diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h index 134a64f02..55aca7378 100644 --- a/eo/src/utils/eoFDCStat.h +++ b/eo/src/utils/eoFDCStat.h @@ -84,11 +84,11 @@ public : value() = num/(sqrt(sumDist)*sqrt(sumFit)); } - /** accessors to the private eoValueParam > + /** accessors to the private eoValueParam > */ - const eoValueParam > & theDist() + const eoValueParam > & theDist() { return distToBest; } - const eoValueParam > & theFit() + const eoValueParam > & theFit() { return fitnesses; } @@ -96,13 +96,13 @@ private: eoDistance & dist; EOT theBest; bool boolOpt; // whether the best is known or not - eoValueParam > distToBest; - eoValueParam > fitnesses; + eoValueParam > distToBest; + eoValueParam > fitnesses; }; /** Specific class for FDCStat monitoring: * As I failed to have FDC stat as an eoStat, this is the trick - * to put the 2 eoParam > into a monitor + * to put the 2 eoParam > into a monitor * This class does nothing else. */ template @@ -110,7 +110,7 @@ class eoFDCFileSnapshot : public eoFileSnapshot // is an eoMonitor { public: /** Ctor: in addition to the parameters of the ctor of an eoFileSnapshot - we need here an eoFDCStat. The 2 vectors (distances to optimum + we need here an eoFDCStat. The 2 std::vectors (distances to optimum and fitnesses) are added to the monitor so they can be processed later to a file - and eventually by gnuplot */ @@ -127,7 +127,7 @@ public: /** just to be sure the add method is not called further */ virtual void add(const eoParam& _param) - { throw runtime_error("eoFDCFileSnapshot::add(). Trying to add stats to an eoFDCFileSnapshot"); } + { throw std::runtime_error("eoFDCFileSnapshot::add(). Trying to add stats to an eoFDCFileSnapshot"); } private: eoFDCStat & FDCstat; diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 13479b68d..543bd5938 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk -CVS Info: $Date: 2002-12-09 21:04:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.10 2002-12-09 21:04:47 evomarc Exp $ $Author: evomarc $ +CVS Info: $Date: 2003-02-27 19:21:19 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.11 2003-02-27 19:21:19 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -51,11 +51,11 @@ public : { if (! _keep) { - ofstream os(filename.c_str()); + std::ofstream os(filename.c_str()); if (!os) { - string str = "eoFileMonitor: Could not open " + filename; - throw runtime_error(str); + std::string str = "eoFileMonitor: Could not open " + filename; + throw std::runtime_error(str); } } } @@ -65,7 +65,7 @@ public : void printHeader(void); virtual void printHeader(std::ostream& os); - virtual string getFileName() // for eoGnuPlot + virtual std::string getFileName() // for eoGnuPlot { return filename;} private : std::string filename; diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index a43f1d656..354d2c2ad 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -38,7 +38,7 @@ Prints snapshots of fitnesses to a (new) file every N generations Assumes that the parameters that are passed to the monitor -(method add in eoMonitor.h) are eoValueParam > of same size. +(method add in eoMonitor.h) are eoValueParam > of same size. A dir is created and one file per snapshot is created there - so you can later generate a movie! @@ -46,34 +46,34 @@ so you can later generate a movie! TODO: The counter is handled internally, but this should be changed so that you can pass e.g. an evalcounter (minor) -I failed to templatize everything so that it can handle eoParam > +I failed to templatize everything so that it can handle eoParam > for any type T, simply calling their getValue method ... */ class eoFileSnapshot : public eoMonitor { public : - typedef vector vDouble; - typedef eoValueParam > vDoubleParam; + typedef std::vector vDouble; + typedef eoValueParam > vDoubleParam; eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, std::string _filename = "gen", std::string _delim = " "): dirname(_dirname), frequency(_frequency), filename(_filename), delim(_delim), counter(0), boolChanged(true) { - string s = "test -d " + dirname; + std::string s = "test -d " + dirname; int res = system(s.c_str()); // test for (unlikely) errors if ( (res==-1) || (res==127) ) - throw runtime_error("Problem executing test of dir in eoFileSnapshot"); + throw std::runtime_error("Problem executing test of dir in eoFileSnapshot"); // now make sure there is a dir without any genXXX file in it if (res) // no dir present { - s = string("mkdir ")+dirname; + s = std::string("mkdir ")+dirname; } else { - s = string("/bin/rm ")+dirname+ "/" + filename + "*"; + s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; } system(s.c_str()); // all done @@ -89,20 +89,20 @@ public : /** accessor to the current filename: needed by the gnuplot subclass */ - string getFileName() {return currentFileName;} + std::string getFileName() {return currentFileName;} /** sets the current filename depending on the counter */ void setCurrentFileName() { char buff[255]; - ostrstream oscount(buff, 254); + std::ostrstream oscount(buff, 254); oscount << counter; oscount << std::ends; currentFileName = dirname + "/" + filename + oscount.str(); } - /** The operator(void): opens the ostream and calls the write method + /** The operator(void): opens the std::ostream and calls the write method */ eoMonitor& operator()(void) { @@ -115,40 +115,40 @@ public : counter++; boolChanged = true; setCurrentFileName(); - ofstream os(currentFileName.c_str()); + std::ofstream os(currentFileName.c_str()); if (!os) { - string str = "eoFileSnapshot: Could not open " + currentFileName; - throw runtime_error(str); + std::string str = "eoFileSnapshot: Could not open " + currentFileName; + throw std::runtime_error(str); } return operator()(os); } - /** The operator(): write on an ostream + /** The operator(): write on an std::ostream */ eoMonitor& operator()(std::ostream& _os) { - const eoValueParam > * ptParam = - static_cast >* >(vec[0]); + const eoValueParam > * ptParam = + static_cast >* >(vec[0]); - const vector v = ptParam->value(); - if (vec.size() == 1) // only one vector: -> add number in front + const std::vector v = ptParam->value(); + if (vec.size() == 1) // only one std::vector: -> add number in front { for (unsigned k=0; k > vv(vec.size()); + std::vector > vv(vec.size()); vv[0]=v; for (unsigned i=1; i >* >(vec[1]); + ptParam = static_cast >* >(vec[1]); vv[i] = ptParam->value(); if (vv[i].size() != v.size()) - throw runtime_error("Dimension error in eoSnapshotMonitor"); + throw std::runtime_error("Dimension error in eoSnapshotMonitor"); } for (unsigned k=0; k >*>(&_param)) + if (!dynamic_cast >*>(&_param)) { - throw logic_error(string("eoFileSnapshot: I can only monitor vectors of doubles, sorry. The offending parameter name = ") + _param.longName()); + throw std::logic_error(std::string("eoFileSnapshot: I can only monitor std::vectors of doubles, sorry. The offending parameter name = ") + _param.longName()); } eoMonitor::add(_param); } diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index f53b6b5b2..0d61e40c6 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -47,7 +47,7 @@ class eoGnuplot { public: // Ctor - eoGnuplot(std::string _title, std::string _extra = string("")) : + eoGnuplot(std::string _title, std::string _extra = std::string("")) : firstTime(true) { // opens pipe with Gnuplot @@ -65,7 +65,7 @@ class eoGnuplot } /// Class name. - virtual string className() const { return "eoGnuplot"; } + virtual std::string className() const { return "eoGnuplot"; } /** send a command to gnuplot directly */ @@ -105,8 +105,8 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) ///////////////////////////////////////////////////////// { char snum[255]; - ostrstream os(snum, 254); - os << "300x200-0+" << numWindow*220 << ends; + std::ostrstream os(snum, 254); + os << "300x200-0+" << numWindow*220 << std::ends; numWindow++; char *args[6]; args[0] = strdup( "gnuplot" ); @@ -117,7 +117,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) args[5] = 0; gpCom = PipeComOpenArgv( "gnuplot", args ); if( ! gpCom ) - throw runtime_error("Impossible to spawn gnuplot\n"); + throw std::runtime_error("Impossible to spawn gnuplot\n"); else { PipeComSend( gpCom, "set grid\n" ); PipeComSend( gpCom, _extra.c_str() ); @@ -139,7 +139,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.5 2002-08-23 15:40:59 evomarc Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.6 2003-02-27 19:21:18 okoenig Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 2f5e3bfc3..00799f6eb 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -67,7 +67,7 @@ class eoGnuplot1DMonitor: public eoFileMonitor, public eoGnuplot virtual void FirstPlot(); /// Class name. - virtual string className() const { return "eoGnuplot1DMonitor"; } + virtual std::string className() const { return "eoGnuplot1DMonitor"; } private: }; @@ -103,10 +103,10 @@ inline void eoGnuplot1DMonitor::FirstPlot() { if (vec.size() < 2) { - throw runtime_error("Must have some stats to plot!\n"); + throw std::runtime_error("Must have some stats to plot!\n"); } char buff[1024]; - ostrstream os(buff, 1024); + std::ostrstream os(buff, 1024); os << "plot"; for (unsigned i=1; i> value; readFrom(value); return; @@ -165,7 +165,7 @@ public: // minimal check if ( rate < 0.0 ) - throw runtime_error("Negative rate read in eoHowMany::readFrom"); + throw std::runtime_error("Negative rate read in eoHowMany::readFrom"); } /** The unary - operator: reverses the computation */ diff --git a/eo/src/utils/eoMOFitnessStat.h b/eo/src/utils/eoMOFitnessStat.h index 27b2d7041..dd77740fc 100644 --- a/eo/src/utils/eoMOFitnessStat.h +++ b/eo/src/utils/eoMOFitnessStat.h @@ -33,13 +33,13 @@ The fitnesses of a whole population, as a vector */ template -class eoFitnessStat : public eoSortedStat > +class eoFitnessStat : public eoSortedStat > { public : eoFitnessStat(std::string _description = "AllFitnesses") : - eoSortedStat >(vector(0), _description) {} + eoSortedStat >(std::vector(0), _description) {} - virtual void operator()(const vector& _popPters) + virtual void operator()(const std::vector& _popPters) { value().resize(_popPters.size()); for (unsigned i=0; i<_popPters.size(); i++) @@ -51,17 +51,25 @@ public : /** For multi-objective fitness, we need to translate a stat > into a vector, so each objective gets a seperate stat */ +#ifdef _MSC_VER +// The follownig is needed to avoid some bug in Visual Studio 6.0 +typedef double PartFitDefault; +template +class eoMOFitnessStat : public eoSortedStat > +#else template -class eoMOFitnessStat : public eoSortedStat > +class eoMOFitnessStat : public eoSortedStat > +#endif + { public : /** Ctor: say what component you want */ eoMOFitnessStat(unsigned _objective, std::string _description = "MO-Fitness") : - eoSortedStat >(vector(0), _description), + eoSortedStat >(std::vector(0), _description), objective(_objective) {} - virtual void operator()(const vector& _popPters) + virtual void operator()(const std::vector& _popPters) { value().resize(_popPters.size()); diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index d71a2a0ff..9ac2d7a6e 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk -CVS Info: $Date: 2001-04-03 10:08:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.9 2001-04-03 10:08:07 jmerelo Exp $ $Author: jmerelo $ +CVS Info: $Date: 2003-02-27 19:21:18 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.10 2003-02-27 19:21:18 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -37,7 +37,7 @@ CVS Info: $Date: 2001-04-03 10:08:07 $ $Header: /home/nojhan/dev/eodev/eodev_cvs class eoParam; /** - The abstract monitor class is a vector of parameter pointers. Use + The abstract monitor class is a std::vector of parameter pointers. Use either push_back a pointer or add a reference to a parameter. Derived classes will then implement the operator()(void) which will stream or pipe the current values of the parameters to wherever you diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index c69b2ff44..1a0354a4e 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -103,7 +103,7 @@ public: void defValue ( std::string str ) { repDefault = str; }; /** - * Returns the value of the param as a string + * Returns the value of the param as a std::string */ /** * Returns if required or not. @@ -123,8 +123,8 @@ private: any scalar value type. It makes use of std::strstream to get and set values. This should be changed to std::stringstream when that class is available in g++. - Note also that there is a template specialization for pair and - for vector. These stream their contents delimited with whitespace. + Note also that there is a template specialization for std::pair and + for std::vector. These stream their contents delimited with whitespace. */ template @@ -174,7 +174,7 @@ public : }; /* - Specialization for string + Specialization for std::string */ template <> std::string eoValueParam::getValue(void) const @@ -197,7 +197,7 @@ void eoValueParam::setValue(std::string _value) } -/// Because MSVC does not support partial specialization, the pair is a double, not a T +/// Because MSVC does not support partial specialization, the std::pair is a double, not a T template <> std::string eoValueParam >::getValue(void) const { @@ -208,7 +208,7 @@ std::string eoValueParam >::getValue(void) const return os.str(); } -/// Because MSVC does not support partial specialization, the pair is a double, not a T +/// Because MSVC does not support partial specialization, the std::pair is a double, not a T template <> void eoValueParam >::setValue(std::string _value) { @@ -217,9 +217,9 @@ void eoValueParam >::setValue(std::string _value) is >> repValue.second; } -// The vector > +// The std::vector > ////////////////////////////////// -/// Because MSVC does not support partial specialization, the vector is a vector of doubles, not a T +/// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T template <> std::string eoValueParam > >::getValue(void) const { @@ -235,7 +235,7 @@ std::string eoValueParam > >::getValue(void) con return os.str(); } -/// Because MSVC does not support partial specialization, the vector is a vector of doubles, not a T +/// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T template <> void eoValueParam > >::setValue(std::string _value) { @@ -256,9 +256,9 @@ void eoValueParam > >::setValue(std::string _val } } -// The vector +// The std::vector ////////////////////////////////// -/// Because MSVC does not support partial specialization, the vector is a double, not a T +/// Because MSVC does not support partial specialization, the std::vector is a double, not a T template <> std::string eoValueParam >::getValue(void) const { @@ -269,7 +269,7 @@ std::string eoValueParam >::getValue(void) const return os.str(); } -/// Because MSVC does not support partial specialization, the vector is a double, not a T +/// Because MSVC does not support partial specialization, the std::vector is a double, not a T template <> void eoValueParam >::setValue(std::string _value) { @@ -280,9 +280,9 @@ void eoValueParam >::setValue(std::string _value) std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } -// The vector +// The std::vector ////////////////////////////////// -/// Because MSVC does not support partial specialization, the vector is a eoMinimizingFitness, not a T +/// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T template <> std::string eoValueParam >::getValue(void) const { @@ -293,7 +293,7 @@ std::string eoValueParam >::getValue(void) cons return os.str(); } -/// Because MSVC does not support partial specialization, the vector is a eoMinimizingFitness, not a T +/// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T // NOTE: g++ doesn support it either!!! template <> void eoValueParam >::setValue(std::string _value) @@ -305,19 +305,19 @@ void eoValueParam >::setValue(std::string _valu std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); } -// The vector +// The std::vector ////////////////////////////////// template <> std::string eoValueParam >::getValue(void) const { - throw std::runtime_error("I cannot getValue for a vector"); + throw std::runtime_error("I cannot getValue for a std::vector"); return std::string(""); } template <> void eoValueParam >::setValue(std::string) { - throw std::runtime_error("I cannot setValue for a vector"); + throw std::runtime_error("I cannot setValue for a std::vector"); return; } @@ -325,19 +325,19 @@ void eoValueParam >::setValue(std::string) class eoContainerParam : public eoParam { public : - eoContainerParam (ContainerType& value, string _shortName, string _longName, - string _default, - string _description, + eoContainerParam (ContainerType& value, std::string _shortName, std::string _longName, + std::string _default, + std::string _description, bool _required, bool _change ) : value(_value), eoParam(_shortName, _longName, _description, _default, _required, _change) {} - // void setValue(const string & _value) + // void setValue(const std::string & _value) // { - // std::istringstream is(_value); - // copy(istream_iterator(is), istream_iterator(), back_inserter(value)); + // std::istd::stringstream is(_value); + // copy(std::istream_iterator(is), std::istream_iterator(), back_inserter(value)); // } private : @@ -348,9 +348,9 @@ private : * Another helper class for parsing parameters like * Keyword(arg1, arg2, ...) * - * It is basically a pair > - * first string is keyword - * the vector contains all arguments (as strings) + * It is basically a std::pair > + * first std::string is keyword + * the std::vector contains all arguments (as std::strings) * See make_algo.h */ @@ -403,7 +403,7 @@ public: // so here we do have arguments std::string t = _value.substr(pos+1);// the arguments _value.resize(pos); - first = _value; // done for the keyword (NOTE: may be empty string!) + first = _value; // done for the keyword (NOTE: may be empty std::string!) // now all arguments std::string delim(" (),"); diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 08fec4029..5c1f07a3b 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2002-09-18 15:36:41 $ $Version$ $Author: evomarc $ +CVS Info: $Date: 2003-02-27 19:21:17 $ $Version$ $Author: okoenig $ */ #ifndef eoParser_h #define eoParser_h @@ -118,17 +118,17 @@ public: * @param _lFileParamName Name of the parameter specifying the configuration file (--param-file) * @param _shortHand Single charachter shorthand for specifying the configuration file */ - eoParser ( unsigned _argc, char **_argv , string _programDescription = "", - string _lFileParamName = "param-file", char _shortHand = 'p'); + eoParser ( unsigned _argc, char **_argv , std::string _programDescription = "", + std::string _lFileParamName = "param-file", char _shortHand = 'p'); /** Processes the parameter and puts it in the appropriate section for readability */ void processParam(eoParam& param, std::string section = ""); - void readFrom(istream& is); + void readFrom(std::istream& is); - void printOn(ostream& os) const; + void printOn(std::ostream& os) const; /// className for readibility std::string className(void) const { return "Parser"; } @@ -139,9 +139,9 @@ public: * Prints an automatic help in the specified output using the information * provided by parameters */ - void printHelp(ostream& os); + void printHelp(std::ostream& os); - string ProgramName() { return programName; } + std::string ProgramName() { return programName; } /** * checks if _param has been actually entered by the user @@ -194,7 +194,7 @@ private: void doRegisterParam(eoParam& param) const; - std::pair getValue(eoParam& _param) const; + std::pair getValue(eoParam& _param) const; void updateParameters() const; @@ -203,13 +203,13 @@ private: // used to store all parameters that are processed MultiMapType params; - string programName; - string programDescription; + std::string programName; + std::string programDescription; - typedef map ShortNameMapType; + typedef std::map ShortNameMapType; ShortNameMapType shortNameMap; - typedef map LongNameMapType; + typedef std::map LongNameMapType; LongNameMapType longNameMap; eoValueParam needHelp; diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index abe514595..80ecb6fdb 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -28,7 +28,7 @@ eoPopString and eoSortedPopString -that transform the population into a string +that transform the population into a std::string that can be used to dump to the screen */ @@ -38,9 +38,9 @@ that can be used to dump to the screen #include -/** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats. +/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. This snippet is a workaround: -This class will "print" a whole population into a string - that you can later +This class will "print" a whole population into a std::string - that you can later send to any stream This is the plain version - see eoPopString for the Sorted version @@ -48,15 +48,15 @@ Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there. */ template -class eoPopStat : public eoStat +class eoPopStat : public eoStat { public : - /** default Ctor, void string by default, as it appears + /** default Ctor, void std::string by default, as it appears on the description line once at beginning of evolution. and is meaningless there. _howMany defaults to 0, that is, the whole population*/ - eoPopStat(unsigned _howMany = 0, string _desc ="") - : eoStat("", _desc), combien( _howMany) {} + eoPopStat(unsigned _howMany = 0, std::string _desc ="") + : eoStat("", _desc), combien( _howMany) {} /** Fills the value() of the eoParam with the dump of the population. Adds a \n before so it does not get mixed up with the rest of the stats @@ -70,7 +70,7 @@ void operator()(const eoPop& _pop) for (unsigned i = 0; i < howMany; ++i) { std::ostrstream os(buffer, 1022); // leave space for emergency terminate - os << _pop[i] << endl << ends; + os << _pop[i] << std::endl << std::ends; // paranoid: buffer[1022] = '\0'; @@ -81,9 +81,9 @@ private: unsigned combien; }; -/** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats. +/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. This snippet is a workaround: -This class will "print" a whole population into a string - that you can later +This class will "print" a whole population into a std::string - that you can later send to any stream This is the Sorted version - see eoPopString for the plain version @@ -91,22 +91,22 @@ Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there. */ template -class eoSortedPopStat : public eoSortedStat +class eoSortedPopStat : public eoSortedStat { public : - /** default Ctor, void string by default, as it appears + /** default Ctor, void std::string by default, as it appears * on the description line once at beginning of evolution. and * is meaningless there _howMany defaults to 0, that is, the whole * population */ - eoSortedPopStat(unsigned _howMany = 0, string _desc ="") : - eoSortedStat("", _desc) , combien( _howMany) {} + eoSortedPopStat(unsigned _howMany = 0, std::string _desc ="") : + eoSortedStat("", _desc) , combien( _howMany) {} /** Fills the value() of the eoParam with the dump of the population. Adds a \n before so it does not get mixed up with the rest of the stats that are written by the monitor it is probably used from. */ - void operator()(const vector& _pop) + void operator()(const std::vector& _pop) { char buffer[1023]; // about one K of space per member value() = ""; // empty @@ -114,7 +114,7 @@ public : for (unsigned i = 0; i < howMany; ++i) { std::ostrstream os(buffer, 1022); // leave space for emergency terminate - os << *_pop[i] << endl << ends; + os << *_pop[i] << std::endl << std::ends; // paranoid: buffer[1022] = '\0'; diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 1c8d8f63f..a1bd8276b 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -41,7 +41,7 @@ // (and paraphrasing a bit in places), the Mersenne Twister is ``designed // with consideration of the flaws of various existing generators,'' has // a period of 2^19937 - 1, gives a sequence that is 623-dimensionally -// equidistributed, and ``has passed many stringent tests, including the +// equidistributed, and ``has passed many std::stringent tests, including the // die-hard test of G. Marsaglia and the load test of P. Hellekalek and // S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 // to 5012 bytes of static data, depending on data type sizes, and the code @@ -212,7 +212,7 @@ public : /** roulette_wheel(vec, total = 0) does a roulette wheel selection - on the input vector vec. If the total is not supplied, it is + on the input std::vector vec. If the total is not supplied, it is calculated. It returns an integer denoting the selected argument. */ template @@ -237,7 +237,7 @@ public : } /// - void printOn(ostream& _os) const + void printOn(std::ostream& _os) const { for (int i = 0; i < N; ++i) { @@ -248,7 +248,7 @@ public : } /// - void readFrom(istream& _is) + void readFrom(std::istream& _is) { for (int i = 0; i < N; ++i) { diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 3f1632a0a..647f3db03 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -16,7 +16,7 @@ eoRealVectorNoBounds eoDummyVectorNoBounds(0); ///////////// helper read functions - could be somewhere else // removes leading delimiters - return false if nothing else left -bool remove_leading(std::string & _s, const string _delim) +bool remove_leading(std::string & _s, const std::string _delim) { size_t posDebToken = _s.find_first_not_of(_delim); if (posDebToken >= _s.size()) @@ -27,7 +27,7 @@ bool remove_leading(std::string & _s, const string _delim) double read_double(std::string _s) { - istrstream is(_s.c_str()); + std::istrstream is(_s.c_str()); double r; is >> r; return r; @@ -35,7 +35,7 @@ double read_double(std::string _s) int read_int(std::string _s) { - istrstream is(_s.c_str()); + std::istrstream is(_s.c_str()); int i; is >> i; return i; @@ -56,9 +56,9 @@ eoRealVectorBounds::eoRealVectorBounds(const eoRealVectorBounds & _b): // the readFrom method of eoRealVectorNoBounds: // only calls the readFrom(string) - for param reading -void eoRealVectorBounds::readFrom(istream& _is) +void eoRealVectorBounds::readFrom(std::istream& _is) { - string value; + std::string value; _is >> value; readFrom(value); return; @@ -79,7 +79,7 @@ void eoRealVectorBounds::readFrom(std::string _value) resize(0); // now read - string delim(",; "); + std::string delim(",; "); while (_value.size()>0) { if (!remove_leading(_value, delim)) // only delimiters were left @@ -91,38 +91,38 @@ void eoRealVectorBounds::readFrom(std::string _value) break; } // ending char - string closeChar = (_value[posDeb] == '(' ? string(")") : string("]") ); + std::string closeChar = (_value[posDeb] == '(' ? std::string(")") : std::string("]") ); - size_t posFin = _value.find_first_of(string(closeChar)); + size_t posFin = _value.find_first_of(std::string(closeChar)); if (posFin >= _value.size()) - throw runtime_error("Syntax error when reading bounds"); + throw std::runtime_error("Syntax error when reading bounds"); // y a-t-il un nbre devant unsigned count = 1; if (posDeb > 0) // something before opening { - string sCount = _value.substr(0, posDeb); + std::string sCount = _value.substr(0, posDeb); count = read_int(sCount); if (count <= 0) - throw runtime_error("Syntax error when reading bounds"); + throw std::runtime_error("Syntax error when reading bounds"); } // the bounds - string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); // and remove from original string _value = _value.substr(posFin+1); remove_leading(sBounds, delim); size_t posDelim = sBounds.find_first_of(delim); if (posDelim >= sBounds.size()) - throw runtime_error("Syntax error when reading bounds"); + throw std::runtime_error("Syntax error when reading bounds"); bool minBounded=false, maxBounded=false; double minBound=0, maxBound=0; // min bound - string sMinBounds = sBounds.substr(0,posDelim); - if (sMinBounds != string("-inf")) + std::string sMinBounds = sBounds.substr(0,posDelim); + if (sMinBounds != std::string("-inf")) { minBounded = true; minBound = read_double(sMinBounds); @@ -131,8 +131,8 @@ void eoRealVectorBounds::readFrom(std::string _value) // max bound size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); - string sMaxBounds = sBounds.substr(posEndDelim); - if (sMaxBounds != string("+inf")) + std::string sMaxBounds = sBounds.substr(posEndDelim); + if (sMaxBounds != std::string("+inf")) { maxBounded = true; maxBound = read_double(sMaxBounds); diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 73bd761cf..0ed662b03 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -27,7 +27,7 @@ #ifndef _eoRealBounds_h #define _eoRealBounds_h -#include // exceptions! +#include // std::exceptions! #include /** @@ -56,8 +56,8 @@ it exceeds it So mutation can choose - iterate trying until they fall in bounds, -- only try once and "repair" by using the foldsInBounds method -- only try once and repair using the truncate method (will create a +- only try once and "restd::pair" by using the foldsInBounds method +- only try once and restd::pair using the truncate method (will create a huge bias toward the bound if the soluiton is not far from the bounds) There is also a uniform() method that generates a uniform value @@ -107,20 +107,20 @@ public: virtual void truncate(double &) = 0; /** get minimum value - * @exception if does not exist + * @std::exception if does not exist */ virtual double minimum() = 0; /** get maximum value - * @exception if does not exist + * @std::exception if does not exist */ virtual double maximum() = 0; /** get range - * @exception if unbounded + * @std::exception if unbounded */ virtual double range() = 0; /** random generator of uniform numbers in bounds - * @exception if unbounded + * @std::exception if unbounded */ virtual double uniform(eoRng & _rng = eo::rng) = 0; @@ -145,39 +145,39 @@ public: virtual double minimum() { - throw logic_error("Trying to get minimum of unbounded eoRealBounds"); + throw std::logic_error("Trying to get minimum of unbounded eoRealBounds"); } virtual double maximum() { - throw logic_error("Trying to get maximum of unbounded eoRealBounds"); + throw std::logic_error("Trying to get maximum of unbounded eoRealBounds"); } virtual double range() { - throw logic_error("Trying to get range of unbounded eoRealBounds"); + throw std::logic_error("Trying to get range of unbounded eoRealBounds"); } virtual double uniform(eoRng & _rng = eo::rng) { - throw logic_error("Trying to generate uniform values in unbounded eoRealBounds"); + throw std::logic_error("Trying to generate uniform values in unbounded eoRealBounds"); } // methods from eoPersistent /** * Read object. - * @param _is A istream. + * @param _is A std::istream. * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(istream& _is) + virtual void readFrom(std::istream& _is) { - throw runtime_error("Should not use eoRealBounds::readFrom"); + throw std::runtime_error("Should not use eoRealBounds::readFrom"); } /** * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { _os << "[-inf,+inf]"; } @@ -279,20 +279,20 @@ public : // methods from eoPersistent /** * Read object. - * @param _is A istream. + * @param _is A std::istream. * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(istream& _is) + virtual void readFrom(std::istream& _is) { - throw runtime_error("Should not use eoRealInterval::readFrom"); + throw std::runtime_error("Should not use eoRealInterval::readFrom"); } /** * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { _os << "[" << repMinimum << "," << repMaximum << "]"; } @@ -328,17 +328,17 @@ public : virtual double maximum() { - throw logic_error("Trying to get maximum of eoRealBelowBound"); + throw std::logic_error("Trying to get maximum of eoRealBelowBound"); } virtual double range() { - throw logic_error("Trying to get range of eoRealBelowBound"); + throw std::logic_error("Trying to get range of eoRealBelowBound"); } // random generators virtual double uniform(eoRng & _rng = eo::rng) { - throw logic_error("Trying to generate uniform values in eoRealBelowBound"); + throw std::logic_error("Trying to generate uniform values in eoRealBelowBound"); } // description @@ -375,20 +375,20 @@ public : // methods from eoPersistent /** * Read object. - * @param _is A istream. + * @param _is A std::istream. * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(istream& _is) + virtual void readFrom(std::istream& _is) { - throw runtime_error("Should not use eoRealBelowBound::readFrom"); + throw std::runtime_error("Should not use eoRealBelowBound::readFrom"); } /** * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { _os << "[" << repMinimum << ",+inf]"; } @@ -423,17 +423,17 @@ public : virtual double minimum() { - throw logic_error("Trying to get minimum of eoRealAboveBound"); + throw std::logic_error("Trying to get minimum of eoRealAboveBound"); } virtual double range() { - throw logic_error("Trying to get range of eoRealAboveBound"); + throw std::logic_error("Trying to get range of eoRealAboveBound"); } // random generators virtual double uniform(eoRng & _rng = eo::rng) { - throw logic_error("Trying to generate uniform values in eoRealAboveBound"); + throw std::logic_error("Trying to generate uniform values in eoRealAboveBound"); } // description @@ -470,20 +470,20 @@ public : // methods from eoPersistent /** * Read object. - * @param _is A istream. + * @param _is A std::istream. * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(istream& _is) + virtual void readFrom(std::istream& _is) { - throw runtime_error("Should not use eoRealAboveBound::readFrom"); + throw std::runtime_error("Should not use eoRealAboveBound::readFrom"); } /** * Write object. It's called printOn since it prints the object on a stream. - * @param _os A ostream. + * @param _os A std::ostream. */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { _os << "[-inf," << repMaximum << "]"; } diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index 2fa1ffeb7..11144b390 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -27,7 +27,7 @@ #ifndef _eoRealVectorBounds_h #define _eoRealVectorBounds_h -#include // exceptions! +#include // std::exceptions! #include #include @@ -40,9 +40,9 @@ /** Vector type for bounds (see eoRealBounds.h for scalar types) ------------ -Class eoRealVectorBounds implements the vectorized version: -it is basically a vector of eoRealBounds * and forwards all request -to the elements of the vector. +Class eoRealVectorBounds implements the std::vectorized version: +it is basically a std::vector of eoRealBounds * and forwards all request +to the elements of the std::vector. This file also contains the global variables and eoDummyVectorNoBounds that are used as defaults in ctors (i.e. when no @@ -55,7 +55,7 @@ eoRealVectorBounds which derives from the preceding *and* eoPersistent and also has a mechanism for memory handling of the pointers it has to allocate */ -class eoRealBaseVectorBounds : public vector +class eoRealBaseVectorBounds : public std::vector { public: // virtual desctructor (to avoid warning?) @@ -63,18 +63,18 @@ public: /** Default Ctor. */ - eoRealBaseVectorBounds() : vector(0) {} + eoRealBaseVectorBounds() : std::vector(0) {} /** Ctor: same bounds for everybody, given as an eoRealBounds */ eoRealBaseVectorBounds(unsigned _dim, eoRealBounds & _bounds) : - vector(_dim, &_bounds) + std::vector(_dim, &_bounds) {} /** Ctor, particular case of dim-2 */ eoRealBaseVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : - vector(0) + std::vector(0) { push_back( &_xbounds); push_back( &_ybounds); @@ -127,9 +127,9 @@ public: (*this)[_i]->foldsInBounds(_r); } - /** Folds all variables of a vector of real values into the bounds + /** Folds all variables of a std::vector of real values into the bounds */ - virtual void foldsInBounds(vector & _v) + virtual void foldsInBounds(std::vector & _v) { for (unsigned i=0; itruncate(_r); } - /** truncates all variables of a vector of real values to the bounds + /** truncates all variables of a std::vector of real values to the bounds */ - virtual void truncate(vector & _v) + virtual void truncate(std::vector & _v) { for (unsigned i=0; i _v) + virtual bool isInBounds(std::vector _v) { for (unsigned i=0; iminimum();} virtual double maximum(unsigned _i) {return (*this)[_i]->maximum();} virtual double range(unsigned _i) {return (*this)[_i]->range();} /** Computes the average range - * An exception will be raised if one of the component is unbounded + * An std::exception will be raised if one of the component is unbounded */ virtual double averageRange() { @@ -187,7 +187,7 @@ public: } /** Generates a random number in i_th range - * An exception will be raised if one of the component is unbounded + * An std::exception will be raised if one of the component is unbounded */ virtual double uniform(unsigned _i, eoRng & _rng = eo::rng) { @@ -195,10 +195,10 @@ public: return r; } - /** fills a vector with uniformly chosen variables in bounds - * An exception will be raised if one of the component is unbounded + /** fills a std::vector with uniformly chosen variables in bounds + * An std::exception will be raised if one of the component is unbounded */ - void uniform(vector & _v, eoRng & _rng = eo::rng) + void uniform(std::vector & _v, eoRng & _rng = eo::rng) { _v.resize(size()); for (unsigned i=0; i _min, vector _max) : + eoRealVectorBounds(std::vector _min, std::vector _max) : factor(_min.size(), 1), ownedBounds(0) { if (_max.size() != _min.size()) @@ -276,10 +276,10 @@ public: } } - /** Ctor from a string - * and don't worry, the readFrom(string) starts by setting everything to 0! + /** Ctor from a std::string + * and don't worry, the readFrom(std::string) starts by setting everything to 0! */ - eoRealVectorBounds(string _s) : eoRealBaseVectorBounds() + eoRealVectorBounds(std::string _s) : eoRealBaseVectorBounds() { readFrom(_s); } @@ -287,7 +287,7 @@ public: /** Dtor: destroy all ownedBounds - BUG ???*/ virtual ~eoRealVectorBounds() { -// cout << "Dtor, avec size = " << ownedBounds.size() << endl; +// std::cout << "Dtor, avec size = " << ownedBounds.size() << std::endl; // for (unsigned i = 0; i < ownedBounds.size(); ++i) // { // delete ownedBounds[i]; @@ -298,19 +298,19 @@ public: // methods from eoPersistent /** * Read object from a stream - * only calls the readFrom(string) - for param reading - * @param _is A istream. + * only calls the readFrom(std::string) - for param reading + * @param _is A std::istream. */ - virtual void readFrom(istream& _is) ; + virtual void readFrom(std::istream& _is) ; /** - * Read object from a string - * @param _is A istream. + * Read object from a std::string + * @param _is A std::istream. */ - virtual void readFrom(string _s) ; + virtual void readFrom(std::string _s) ; /** overload printOn method to save space */ - virtual void printOn(ostream& _os) const + virtual void printOn(std::ostream& _os) const { if (factor[0]>1) _os << factor[0] ; @@ -336,10 +336,10 @@ public: * because of ownedBounds */ eoRealVectorBounds(const eoRealVectorBounds &); -private:// WARNING: there is no reason for both vector below +private:// WARNING: there is no reason for both std::vector below //to be synchronized in any manner - vector factor; // list of nb of "grouped" bounds - vector ownedBounds; + std::vector factor; // std::list of nb of "grouped" bounds + std::vector ownedBounds; // keep this one private eoRealVectorBounds& operator=(const eoRealVectorBounds&); }; @@ -347,7 +347,7 @@ private:// WARNING: there is no reason for both vector below ////////////////////////////////////////////////////////////// /** the dummy unbounded eoRealVectorBounds: usefull if you don't need bounds! * everything is inlined. - * Warning: we do need this class, and not only a vector + * Warning: we do need this class, and not only a std::vector */ class eoRealVectorNoBounds: public eoRealVectorBounds { @@ -373,43 +373,43 @@ public: virtual bool isMaxBounded(unsigned) {return false;} virtual void foldsInBounds(unsigned, double &) {return;} - virtual void foldsInBounds(vector &) {return;} + virtual void foldsInBounds(std::vector &) {return;} virtual void truncate(unsigned, double &) {return;} - virtual void truncate(vector &) {return;} + virtual void truncate(std::vector &) {return;} virtual bool isInBounds(unsigned, double) {return true;} - virtual bool isInBounds(vector) {return true;} + virtual bool isInBounds(std::vector) {return true;} // accessors virtual double minimum(unsigned) { - throw logic_error("Trying to get minimum of eoRealVectorNoBounds"); + throw std::logic_error("Trying to get minimum of eoRealVectorNoBounds"); } virtual double maximum(unsigned) { - throw logic_error("Trying to get maximum of eoRealVectorNoBounds"); + throw std::logic_error("Trying to get maximum of eoRealVectorNoBounds"); } virtual double range(unsigned) { - throw logic_error("Trying to get range of eoRealVectorNoBounds"); + throw std::logic_error("Trying to get range of eoRealVectorNoBounds"); } virtual double averageRange() { - throw logic_error("Trying to get average range of eoRealVectorNoBounds"); + throw std::logic_error("Trying to get average range of eoRealVectorNoBounds"); } // random generators virtual double uniform(unsigned, eoRng & _rng = eo::rng) { - throw logic_error("No uniform distribution on eoRealVectorNoBounds"); + throw std::logic_error("No uniform distribution on eoRealVectorNoBounds"); } - // fills a vector with uniformly chosen variables in bounds - void uniform(vector &, eoRng & _rng = eo::rng) + // fills a std::vector with uniformly chosen variables in bounds + void uniform(std::vector &, eoRng & _rng = eo::rng) { - throw logic_error("No uniform distribution on eoRealVectorNoBounds"); + throw std::logic_error("No uniform distribution on eoRealVectorNoBounds"); } }; diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index 76d9a9918..ab5a30496 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -74,7 +74,7 @@ template class eoUniformGenerator : public eoRndGenerator minim(_min), range(_max-_min), uniform(_rng) { if (_min>_max) - throw logic_error("Min is greater than Max in uniform_generator"); + throw std::logic_error("Min is greater than Max in uniform_generator"); } /** diff --git a/eo/src/utils/eoScalarFitnessStat.h b/eo/src/utils/eoScalarFitnessStat.h index 9bf8b0174..83495833c 100644 --- a/eo/src/utils/eoScalarFitnessStat.h +++ b/eo/src/utils/eoScalarFitnessStat.h @@ -31,19 +31,19 @@ #include /** - The fitnesses of a whole population, as a vector + The fitnesses of a whole population, as a std::vector */ template -class eoScalarFitnessStat : public eoSortedStat > +class eoScalarFitnessStat : public eoSortedStat > { public : eoScalarFitnessStat(std::string _description = "FitnessES", eoRealVectorBounds & _bounds = eoDummyVectorNoBounds) : - eoSortedStat >(vector(0), _description) , + eoSortedStat >(std::vector(0), _description) , range(*_bounds[0]) {} - virtual void operator()(const vector& _popPters) + virtual void operator()(const std::vector& _popPters) { value().resize(_popPters.size()); for (unsigned i=0; i<_popPters.size(); i++) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index ef0137160..67abbc3ce 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -27,17 +27,18 @@ #ifndef _eoStat_h #define _eoStat_h +#include // accumulate + #include #include #include -#include // accumulate #include /** Base class for all statistics that need to be calculated over the (unsorted) population (I guess it is not really necessary? MS. - Depends, there might be reasons to have a stat that is not an eoValueParam, + Depstd::ends, there might be reasons to have a stat that is not an eoValueParam, but maybe I'm just kidding myself, MK) */ template @@ -63,10 +64,10 @@ public : Base class for statistics calculated over a sorted snapshot of the population */ template -class eoSortedStatBase : public eoUF&, void> +class eoSortedStatBase : public eoUF&, void> { public: - virtual void lastCall(const vector&) {} + virtual void lastCall(const std::vector&) {} }; /** @@ -111,9 +112,9 @@ public : virtual void operator()(const eoPop& _pop) { #ifdef _MSC_VER - doit(_pop, EOT::Fitness()); // specializations for scalar and vector + doit(_pop, EOT::Fitness()); // specializations for scalar and std::vector #else - doit(_pop, typename EOT::Fitness()); // specializations for scalar and vector + doit(_pop, typename EOT::Fitness()); // specializations for scalar and std::vector #endif } private : @@ -192,10 +193,10 @@ public : eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : eoSortedStat(Fitness(), _description), which(_which) {} - virtual void operator()(const vector& _pop) + virtual void operator()(const std::vector& _pop) { if (which > _pop.size()) - throw logic_error("fitness requested of element outside of pop"); + throw std::logic_error("fitness requested of element outside of pop"); doit(_pop, Fitness()); } @@ -226,11 +227,11 @@ private : value().resize(traits::nObjectives()); // copy of pointers, what the heck - vector tmp_pop = _pop; + std::vector tmp_pop = _pop; for (unsigned o = 0; o < value().size(); ++o) { - typename vector::iterator nth = tmp_pop.begin() + which; + typename std::vector::iterator nth = tmp_pop.begin() + which; std::nth_element(tmp_pop.begin(), nth, tmp_pop.end(), CmpFitness(o, traits::maximizing(o))); value()[o] = (*nth)->fitness()[o]; } @@ -238,7 +239,7 @@ private : // for everything else template - void doit(const vector& _pop, T) + void doit(const std::vector& _pop, T) { value() = _pop[which]->fitness(); } @@ -319,7 +320,7 @@ private : for (unsigned o = 0; o < traits::nObjectives(); ++o) { - typename eoPop::const_iterator it = max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o))); + typename eoPop::const_iterator it = std::max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o))); value()[o] = it->fitness()[o]; } } diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h index aeb6a05e0..575398bbe 100644 --- a/eo/src/utils/eoUniformInit.h +++ b/eo/src/utils/eoUniformInit.h @@ -77,7 +77,7 @@ template class eoUniformInit : public eoInit minim(_min), range(_max-_min), uniform(_rng) { if (_min>_max) - throw logic_error("Min is greater than Max in uniform_generator"); + throw std::logic_error("Min is greater than Max in uniform_generator"); } /** diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 7c43b90d8..292205bd5 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -51,7 +51,7 @@ template class uniform_generator minim(_min), range(_max-_min), uniform(_rng) { if (_min>_max) - throw logic_error("Min is greater than Max in uniform_generator"); + throw std::logic_error("Min is greater than Max in uniform_generator"); } T operator()(void) { return minim+static_cast(uniform.uniform(range)); } @@ -94,7 +94,7 @@ template class random_generator minim(_min), range(_max-_min), random(_rng) { if (_min>_max) - throw logic_error("Min is greater than Max in random_generator"); + throw std::logic_error("Min is greater than Max in random_generator"); } T operator()(void) { return (T) (minim + random.random(range)); } diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 297a05239..f12dd7713 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -114,7 +114,7 @@ double sum_fitness(const eoPop& _pop, std::pair& _minmax) double v = static_cast(it->fitness()); _minmax.first = std::min(_minmax.first, v); - _minmax.second = std::max(_minmax.second, v); + _minmax.second = max(_minmax.second, v); rawTotal += v; } diff --git a/eo/test/fitness_traits.cpp b/eo/test/fitness_traits.cpp index d01833138..19edb27a4 100644 --- a/eo/test/fitness_traits.cpp +++ b/eo/test/fitness_traits.cpp @@ -290,7 +290,7 @@ void algo(eoPop& _pop) eoPop offspring; // how to get the scaling info into this guy?? offspring.setPerf2Worth(_pop.getPerf2Worth()); // like this! - copy(_pop.begin(), _pop.end(), back_inserter(offspring)); + std::copy(_pop.begin(), _pop.end(), back_inserter(offspring)); offspring.sort(); // should call scale @@ -307,9 +307,9 @@ void minimization_test() eo1.performance(1.0); eo2.performance(2.0); - cout << "With minimizing fitness" << endl; - cout << eo1.fitness() << " < " << eo2.fitness() << " returns " << (eo1 < eo2) << endl; - cout << eo2.fitness() << " < " << eo1.fitness() << " returns " << (eo2 < eo1) << endl; + std::cout << "With minimizing fitness" << std::endl; + std::cout << eo1.fitness() << " < " << eo2.fitness() << " returns " << (eo1 < eo2) << std::endl; + std::cout << eo2.fitness() << " < " << eo1.fitness() << " returns " << (eo2 < eo1) << std::endl; } void the_main() @@ -325,10 +325,10 @@ void the_main() eo1.fitness(10); // could also use performance() eo3.fitness(5); - cout << eo1.fitness() << endl; - cout << eo3.fitness() << endl; + std::cout << eo1.fitness() << std::endl; + std::cout << eo3.fitness() << std::endl; - cout << "eo1 < eo3 = " << (eo1 < eo3) << endl; + std::cout << "eo1 < eo3 = " << (eo1 < eo3) << std::endl; scaled_eo eo2; @@ -340,14 +340,14 @@ void the_main() try { - cout << eo2.fitness() << endl; - cout << "did not throw" << endl; + std::cout << eo2.fitness() << std::endl; + std::cout << "did not throw" << std::endl; assert(false); // should throw } - catch(exception& e) + catch(std::exception& e) { - cout << "Fitness threw exception, as it should" << endl; - cout << e.what() << endl; + std::cout << "Fitness threw exception, as it should" << std::endl; + std::cout << e.what() << std::endl; } /* Set the worth and all is well (this is normally done by some perf2worth functor */ @@ -355,10 +355,10 @@ void the_main() eo2.worth(3); eo4.worth(5); - cout << "with maximization " << endl; - cout << eo2.fitness() << endl; - cout << eo4.fitness() << endl; - cout << eo2.fitness() << " < " << eo4.fitness() << " returns " << (eo2 < eo4) << endl; + std::cout << "with maximization " << std::endl; + std::cout << eo2.fitness() << std::endl; + std::cout << eo4.fitness() << std::endl; + std::cout << eo2.fitness() << " < " << eo4.fitness() << " returns " << (eo2 < eo4) << std::endl; /* Test the minimization of fitness */ minimization_test(); @@ -373,7 +373,7 @@ void the_main() algo(pop0); - cout << pop0[0].fitness() << endl; + std::cout << pop0[0].fitness() << std::endl; assert(pop0[0].fitness() == 1); @@ -389,14 +389,14 @@ void the_main() // at this point getting the fitness should throw try { - cout << pop1[0].fitness() << endl; - cout << "did not throw" << endl; + std::cout << pop1[0].fitness() << std::endl; + std::cout << "did not throw" << std::endl; assert(false); // should throw } - catch(exception& e) + catch(std::exception& e) { - cout << "Fitness threw exception, as it should" << endl; - cout << e.what() << endl; + std::cout << "Fitness threw exception, as it should" << std::endl; + std::cout << e.what() << std::endl; } // at this point trying to scale should throw @@ -405,9 +405,9 @@ void the_main() algo(pop1); // should complain that it cannot scale assert(false); // so it would never get here } - catch(exception& e) + catch(std::exception& e) { // but rather ends here - cout << e.what() << endl; + std::cout << e.what() << std::endl; } // ok, now set the scaling @@ -415,7 +415,7 @@ void the_main() algo(pop1); - cout << "the fitness has been transformed from " << pop1[0].performance() << " to exp(-1) = " << pop1[0].fitness() << endl; + std::cout << "the fitness has been transformed from " << pop1[0].performance() << " to exp(-1) = " << pop1[0].fitness() << std::endl; } int main() @@ -424,9 +424,9 @@ int main() { the_main(); } - catch(exception& e) + catch(std::exception& e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; } } diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index c7d857d22..d9db93a7e 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -44,9 +44,9 @@ int main() pop.push_back(chrom); } - cout << "population:" << endl; + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; // selection eoStochTournamentSelect lottery(0.9 ); @@ -83,17 +83,17 @@ int main() { ea(pop); } - catch (exception& e) + catch (std::exception& e) { - cout << "exception: " << e.what() << endl;; + std::cout << "exception: " << e.what() << std::endl;; exit(EXIT_FAILURE); } - cout << "pop" << endl; + std::cout << "pop" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - cout << "\n --> Number of Evaluations = " << eval.getValue() << endl; + std::cout << "\n --> Number of Evaluations = " << eval.getValue() << std::endl; return 0; } diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 4fd76f435..b19aba9b7 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -44,9 +44,9 @@ int main() pop.push_back(chrom); } - cout << "population:" << endl; + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; // selection eoStochTournamentSelect lottery(0.9 ); @@ -87,17 +87,17 @@ int main() { ea(pop); } - catch (exception& e) + catch (std::exception& e) { - cout << "exception: " << e.what() << endl;; + std::cout << "exception: " << e.what() << std::endl;; exit(EXIT_FAILURE); } - cout << "pop" << endl; + std::cout << "pop" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - cout << "\n --> Number of Evaluations = " << eval.getValue() << endl; + std::cout << "\n --> Number of Evaluations = " << eval.getValue() << std::endl; return 0; } diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp index d6ab91e55..c4e68d052 100644 --- a/eo/test/t-MGE1bit.cpp +++ b/eo/test/t-MGE1bit.cpp @@ -44,9 +44,9 @@ int main() pop.push_back(chrom); } - cout << "population:" << endl; + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; // selection eoStochTournamentSelect lottery(0.9 ); @@ -87,17 +87,17 @@ int main() { ea(pop); } - catch (exception& e) + catch (std::exception& e) { - cout << "exception: " << e.what() << endl;; + std::cout << "exception: " << e.what() << std::endl;; exit(EXIT_FAILURE); } - cout << "pop" << endl; + std::cout << "pop" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - cout << "\n --> Number of Evaluations = " << eval.getValue() << endl; + std::cout << "\n --> Number of Evaluations = " << eval.getValue() << std::endl; return 0; } diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp index f5cd88fa9..aea451c34 100644 --- a/eo/test/t-eo.cpp +++ b/eo/test/t-eo.cpp @@ -14,8 +14,8 @@ int main() { Chrom chrom1, chrom2; - cout << "chrom1 = " << chrom1 << endl - << "chrom2 = " << chrom2 << endl; + std::cout << "chrom1 = " << chrom1 << std::endl + << "chrom2 = " << chrom2 << std::endl; return 0; } diff --git a/eo/test/t-eoAtomOps.cpp b/eo/test/t-eoAtomOps.cpp index 020c30173..d1c70de74 100644 --- a/eo/test/t-eoAtomOps.cpp +++ b/eo/test/t-eoAtomOps.cpp @@ -56,11 +56,11 @@ main(int argc, char *argv[]) { eoAtomRandom randomer( charNE ); eoAtomMutation< eoString > mutator2 ( randomer, 0.5 ); - cout << "Before aString " << aString << endl; + std::cout << "Before aString " << aString << std::endl; mutator( aString); - cout << " after mutator " << aString << endl; + std::cout << " after mutator " << aString << std::endl; mutator2( aString); - cout << " after mutator2 " << aString << endl;; + std::cout << " after mutator2 " << aString << std::endl;; return 0; // to avoid VC++ complaints } diff --git a/eo/test/t-eoBaseFunctions.cpp b/eo/test/t-eoBaseFunctions.cpp index 636b0a381..6f6745ac7 100644 --- a/eo/test/t-eoBaseFunctions.cpp +++ b/eo/test/t-eoBaseFunctions.cpp @@ -21,6 +21,6 @@ int main() eo2 _2; int i = _2(); - cout << i << '\n'; + std::cout << i << '\n'; return i; -} \ No newline at end of file +} diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 32491b619..6e826a4a0 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -49,8 +49,8 @@ int the_main(int argc, char **argv) eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); eoValueParam seed(time(0), "seed", "Random number seed"); - eoValueParam load_name("", "Load","Load",'L'); - eoValueParam save_name("", "Save","Save",'S'); + eoValueParam load_name("", "Load","Load",'L'); + eoValueParam save_name("", "Save","Save",'S'); // Register them parser.processParam(rate, "Genetic Operators"); @@ -122,7 +122,7 @@ int the_main(int argc, char **argv) if (parser.userNeedsHelp()) { - parser.printHelp(cout); + parser.printHelp(std::cout); return 0; } @@ -153,7 +153,7 @@ int the_main(int argc, char **argv) while (time(0) == now) {} // wait a second to test timed saver - cout << "gen " << generationCounter.value() << endl; + std::cout << "gen " << generationCounter.value() << std::endl; } // run the algorithm @@ -161,7 +161,7 @@ int the_main(int argc, char **argv) // Save when needed if (save_name.value() != "") { - string file_name = save_name.value(); + std::string file_name = save_name.value(); save_name.value() = ""; // so that it does not appear in the parser section of the state file state.save(file_name); } @@ -175,9 +175,9 @@ int main(int argc, char **argv) { the_main(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index 1752faa80..8d728ec4a 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -46,22 +46,22 @@ int main_function(int argc, char *argv[]) // Run the appropriate algorithm if (simpleParam.value() == false) { - cout << "Using eoReal" << endl; + std::cout << "Using eoReal" << std::endl; runAlgorithm(eoReal(), parser, state); } else if (stdevsParam.value() == false) { - cout << "Using eoEsSimple" << endl; + std::cout << "Using eoEsSimple" << std::endl; runAlgorithm(eoEsSimple(), parser, state); } else if (corrParam.value() == false) { - cout << "Using eoEsStdev" << endl; + std::cout << "Using eoEsStdev" << std::endl; runAlgorithm(eoEsStdev(), parser, state); } else { - cout << "Using eoEsFull" << endl; + std::cout << "Using eoEsFull" << std::endl; runAlgorithm(eoEsFull(), parser, state); } @@ -84,9 +84,9 @@ int main(int argc, char **argv) { main_function(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << '\n'; + std::cout << "Exception: " << e.what() << '\n'; } } @@ -136,13 +136,13 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state) //// GO /////// - cout << "Initial Population\n"; - pop.sortedPrintOn(cout); - cout << endl; + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; run_ea(ga, pop); // run the ga - cout << "Final Population\n"; - pop.sortedPrintOn(cout); - cout << endl; + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; } diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 05d9c4219..7b555025a 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -99,9 +99,9 @@ int main(int argc, char **argv) { main_function(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << '\n'; + std::cout << "Exception: " << e.what() << '\n'; } return 1; @@ -174,6 +174,6 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _ es(pop); pop.sort(); - cout << "Final population\n" << pop << endl; + std::cout << "Final population\n" << pop << std::endl; } diff --git a/eo/test/t-eoESOps.cpp b/eo/test/t-eoESOps.cpp index dc25ca99f..d583ada6d 100644 --- a/eo/test/t-eoESOps.cpp +++ b/eo/test/t-eoESOps.cpp @@ -54,9 +54,9 @@ main(int argc, char *argv[]) { FirstEO.StdDevLength(), FirstEO.size(), FirstEO.CorCffLength() ); - cout << "First EO " << FirstEO << endl; + std::cout << "First EO " << FirstEO << std::endl; MyMut(FirstEO); - cout << "First EO mutated" << FirstEO << endl; + std::cout << "First EO mutated" << FirstEO << std::endl; /* // Evolution and population parameters @@ -88,10 +88,10 @@ main(int argc, char *argv[]) { unsigned i, iind; - cout << "Initial population: \n" << endl; + std::cout << "Initial population: \n" << std::endl; for (i = 0; i < pop.size(); ++i) { eval(pop[i]); - cout << pop[i].fitness() << "\t" << pop[i] << endl; + std::cout << pop[i].fitness() << "\t" << pop[i] << std::endl; } // the Operators @@ -107,9 +107,9 @@ main(int argc, char *argv[]) { ea(pop); - cout << "Final population: \n" << endl; + std::cout << "Final population: \n" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << pop[i].fitness() << "\t" << pop[i] << endl; + std::cout << pop[i].fitness() << "\t" << pop[i] << std::endl; return 0; */ } diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index 160d03040..1b201cfad 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -38,9 +38,9 @@ main() pop.push_back(chrom); } - cout << "population:" << endl; + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; // selection @@ -68,15 +68,15 @@ main() { ea(pop); } - catch (exception& e) + catch (std::exception& e) { - cout << "exception: " << e.what() << endl;; + std::cout << "exception: " << e.what() << std::endl;; exit(EXIT_FAILURE); } - cout << "pop" << endl; + std::cout << "pop" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << "\t" << pop[i] << " " << pop[i].fitness() << endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; return 0; } diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index 889b85744..f8f71c93f 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -20,7 +20,7 @@ struct UserDefStruct enum Enum { just, another, test } d; }; -ostream& operator<<(ostream& os, const UserDefStruct& str) +std::ostream& operator<<(std::ostream& os, const UserDefStruct& str) { return os << str.a << ' ' << str.b << ' ' << str.c << ' ' << static_cast(str.d) << ' '; } @@ -40,7 +40,7 @@ istream& operator>>(istream& is, UserDefStruct& str) UserDefStruct RandomStruct() { - cout << "RandomStruct\n"; + std::cout << "RandomStruct\n"; UserDefStruct result; @@ -57,7 +57,7 @@ UserDefStruct RandomStruct() bool UserDefMutate(UserDefStruct& a) { - cout << "UserDefMutate\n"; + std::cout << "UserDefMutate\n"; a = RandomStruct(); // just for testing if (rng.flip(0.1f)) @@ -69,7 +69,7 @@ bool UserDefMutate(UserDefStruct& a) bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) { - cout << "UserDefBinCrossover\n"; + std::cout << "UserDefBinCrossover\n"; if (rng.flip(0.5)) a.a = b.a; @@ -84,7 +84,7 @@ bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) { - cout << "UserDefQuadCrossover\n"; + std::cout << "UserDefQuadCrossover\n"; if (rng.flip(0.5)) swap(a.a, b.a); if (rng.flip(0.5)) @@ -99,7 +99,7 @@ bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) float UserDefEvalFunc(const UserDefStruct& a) { - cout << "UserDefEvalFunc\n"; + std::cout << "UserDefEvalFunc\n"; return a.b; } @@ -121,11 +121,11 @@ int main() EoType eo2; init(eo2); - cout << "before mutation " << eo1 << '\n'; + std::cout << "before mutation " << eo1 << '\n'; mutate(eo1); - cout << "after mutation " << eo1 << '\n'; + std::cout << "after mutation " << eo1 << '\n'; cross1(eo1, eo2); - cout << "after crossover " << eo1 << '\n'; + std::cout << "after crossover " << eo1 << '\n'; cross2(eo1,eo2); diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index 6763edea7..effac3b03 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -55,18 +55,18 @@ int main(int argc, char* argv[]) // evaluate intial population AFTER help and status in case it takes time apply(eval, pop); // print it out - cout << "Initial Population\n"; - pop.sortedPrintOn(cout); - cout << endl; + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; run_ea(ga, pop); // run the ga - cout << "Final Population\n"; - pop.sortedPrintOn(cout); - cout << endl; + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; } - catch(exception& e) + catch(std::exception& e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; } } diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp index 7b6043f07..2606bab69 100644 --- a/eo/test/t-eoGOpSel.cpp +++ b/eo/test/t-eoGOpSel.cpp @@ -75,9 +75,9 @@ main() pop.push_back(chrom); } - cout << "population:" << endl; + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; + std::cout << pop[i] << " " << pop[i].fitness() << std::endl; eoBinBitFlip bitflip; eoBinCrossover xover; @@ -123,7 +123,7 @@ main() state.registerObject(pop); - state.save(std::cout); + state.save(std::std::cout); return 0; } diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index dd13ba322..e85fe19ab 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -32,16 +32,16 @@ struct Dummy : public EO { - typedef double Type; + typedef double Type; Dummy(std::string _s="") : s(_s) {} - void printOn(ostream & _os) const + void printOn(std::ostream & _os) const { EO::printOn(_os); _os << " - " << s ; } - string s; + std::string s; }; typedef Dummy EOT; @@ -59,9 +59,9 @@ class monop : public eoMonOp _eo.fitness(_eo.fitness()+pSize); return false; } - string className() const {return sig;} + std::string className() const {return sig;} private: - string sig; + std::string sig; }; class binop: public eoBinOp @@ -74,13 +74,13 @@ class binop: public eoBinOp _eo1.fitness(_eo1.fitness()+f); return false; } - string className() const {return "binop";} + std::string className() const {return "binop";} }; class quadop: public eoQuadOp { public : - string className() const {return "quadop";} + std::string className() const {return "quadop";} bool operator()(EOT& a, EOT& b) { EOT oi = a; @@ -98,7 +98,7 @@ class quadop: public eoQuadOp class quadClone: public eoQuadOp { public : - string className() const {return "quadclone";} + std::string className() const {return "quadclone";} bool operator()(EOT& , EOT& ) {return false;} }; @@ -120,7 +120,7 @@ class one2threeOp : public eoGenOp // :-) eo.s = "v(" + eo.s + ", 0)"; // only now change the thing // oh right, and invalidate fitnesses } - virtual string className() const {return "one2threeOp";} + virtual std::string className() const {return "one2threeOp";} }; @@ -136,7 +136,7 @@ class two2oneOp : public eoGenOp // :-) eo.s = "221(" + eo.s + ", " + eo2.s + ")"; // oh right, and invalidate fitnesses } - virtual string className() const {return "two2oneOp";} + virtual std::string className() const {return "two2oneOp";} }; class three2threeOp : public eoGenOp // :-) @@ -152,14 +152,14 @@ class three2threeOp : public eoGenOp // :-) EOT a = eo1; EOT b = eo2; EOT c = eo3; - cout << "les selectionnes: a=" << a << " et b=" << b << " et c=" << c << endl; + std::cout << "les selectionnes: a=" << a << " et b=" << b << " et c=" << c << std::endl; eo1.s = "323-1(" + a.s + ", " + b.s + ", " + c.s + ")"; eo2.s = "323-2(" + a.s + ", " + b.s + ", " + c.s + ")"; eo3.s = "323-3(" + a.s + ", " + b.s + ", " + c.s + ")"; // oh right, and invalidate fitnesses - cout << "les enfants: a=" << eo1 << " et b=" << eo2 << " et c=" << eo3 << endl; + std::cout << "les enfants: a=" << eo1 << " et b=" << eo2 << " et c=" << eo3 << std::endl; } - virtual string className() const {return "three2threeOp";} + virtual std::string className() const {return "three2threeOp";} }; @@ -172,13 +172,13 @@ void init(eoPop & _pop, unsigned _pSize) } else { - throw runtime_error("init pop with 0 size"); + throw std::runtime_error("init pop with 0 size"); } for (unsigned i=0; i<_pSize; i++) { char s[255]; - ostrstream os(s, 254); - os << i << ends; + std::ostrstream os(s, 254); + os << i << std::ends; _pop[i] = Dummy(s); _pop[i].fitness(i); } @@ -200,7 +200,7 @@ int the_main(int argc, char **argv) // i.e. in case you need parameters somewhere else, postpone these if (parser.userNeedsHelp()) { - parser.printHelp(cout); + parser.printHelp(std::cout); exit(1); } @@ -267,7 +267,7 @@ int the_main(int argc, char **argv) init(pop, pSize); // sort pop so seqPopulator is identical to SelectPopulator(SequentialSelect) pop.sort(); - cout << "Population initiale\n" << pop << endl; + std::cout << "Population initiale\n" << pop << std::endl; // To simulate SGA: first a prop between quadOp and quadClone eoProportionalOp pSGAOp; @@ -286,25 +286,25 @@ int the_main(int argc, char **argv) while (offspring.size() < pop.size()) { virtualSGA(popit); - cout << "SeqPopulator boucle et incremente\n"; + std::cout << "SeqPopulator boucle et incremente\n"; ++popit; } } catch(eoPopulator::OutOfIndividuals&) { - cout << "Warning: not enough individuals to handle\n"; + std::cout << "Warning: not enough individuals to handle\n"; } - swap(pop, offspring); + std::swap(pop, offspring); offspring.clear(); // ok, now print - cout << "Apres virtualSGA \n" << pop << endl; + std::cout << "Apres virtualSGA \n" << pop << std::endl; init(pop, pSize); - cout << "=========================================================\n"; - cout << "Now the eoSelectPopulator version !" << endl; + std::cout << "=========================================================\n"; + std::cout << "Now the eoSelectPopulator version !" << std::endl; eoSequentialSelect seqSelect; // select.init(); should be sorted out: is it the setup method??? @@ -313,18 +313,18 @@ int the_main(int argc, char **argv) while (offspring.size() < 2*pop.size()) { virtualSGA(it_step3); - cout << "SelectPopulator boucle et incremente\n"; + std::cout << "SelectPopulator boucle et incremente\n"; ++it_step3; } - swap(pop, offspring); + std::swap(pop, offspring); offspring.clear(); // ok, now print - cout << "Apres SGA-like eoSelectivePopulator\n" << pop << endl; + std::cout << "Apres SGA-like eoSelectivePopulator\n" << pop << std::endl; - cout << "=========================================================\n"; - cout << "Now the pure addition !" << endl; + std::cout << "=========================================================\n"; + std::cout << "Now the pure addition !" << std::endl; init(pop, pSize); eoSelectivePopulator it_step4(pop, offspring, seqSelect); @@ -334,11 +334,11 @@ int the_main(int argc, char **argv) ++it_step4; } - swap(pop, offspring); + std::swap(pop, offspring); offspring.clear(); // ok, now print - cout << "Apres Quad+Mon ds un eoSelectivePopulator\n" << pop << endl; + std::cout << "Apres Quad+Mon ds un eoSelectivePopulator\n" << pop << std::endl; // On teste 1->3 init(pop, pSize); @@ -349,11 +349,11 @@ int the_main(int argc, char **argv) ++it_step5; } - swap(pop, offspring); + std::swap(pop, offspring); offspring.clear(); // ok, now print - cout << "Apres 1->3 seul ds un eoSelectivePopulator\n" << pop << endl; + std::cout << "Apres 1->3 seul ds un eoSelectivePopulator\n" << pop << std::endl; // On teste 3->3 init(pop, pSize); @@ -364,11 +364,11 @@ int the_main(int argc, char **argv) ++it_step6; } - swap(pop, offspring); + std::swap(pop, offspring); offspring.clear(); // ok, now print - cout << "Apres 3->3 seul ds un eoSelectivePopulator\n" << pop << endl; + std::cout << "Apres 3->3 seul ds un eoSelectivePopulator\n" << pop << std::endl; return 1; @@ -380,9 +380,9 @@ int main(int argc, char **argv) { the_main(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoNonUniform.cpp b/eo/test/t-eoNonUniform.cpp index 647b78c92..3a59bc8c2 100644 --- a/eo/test/t-eoNonUniform.cpp +++ b/eo/test/t-eoNonUniform.cpp @@ -11,20 +11,20 @@ main() { eoNonUniform nu(1000); - cout << "----------------------------------------------------------" << endl + std::cout << "----------------------------------------------------------" << std::endl << "nu.step() = " << nu.step() - << "\t nu.num_step() = " << nu.num_step() << endl - << "----------------------------------------------------------" << endl; + << "\t nu.num_step() = " << nu.num_step() << std::endl + << "----------------------------------------------------------" << std::endl; eoLinear l1(0, 1, nu), l2(1, 0, nu); eoNegExp2 n1(0.1, 8, nu), n2(0.75, 3, nu); for (; nu; ++nu) { - cout << nu.step() + std::cout << nu.step() << "\t" << l1() << "\t" << l2() << "\t" << n1() << "\t" << n2() - << endl; + << std::endl; } } diff --git a/eo/test/t-eoPBIL.cpp b/eo/test/t-eoPBIL.cpp index b62d30811..1c28c4590 100644 --- a/eo/test/t-eoPBIL.cpp +++ b/eo/test/t-eoPBIL.cpp @@ -121,9 +121,9 @@ int main(int argc, char* argv[]) dea(distrib); // run the dea - cout << "Final Distribution\n"; - distrib.printOn(cout); - cout << endl; + std::cout << "Final Distribution\n"; + distrib.printOn(std::cout); + std::cout << std::endl; #if !defined(NO_GNUPLOT) // wait - for graphical output @@ -134,8 +134,8 @@ int main(int argc, char* argv[]) } #endif } - catch(exception& e) + catch(std::exception& e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; } } diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 2d5cc48c3..e9a290b6c 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -95,7 +95,7 @@ public: { unsigned sz = _parents.size(); _parents.reserve(_parents.size() + _offspring.size()); - copy(_offspring.begin(), _offspring.end(), back_inserter(_parents)); + std::copy(_offspring.begin(), _offspring.end(), back_inserter(_parents)); // calculate worths perf2worth(_parents); @@ -131,7 +131,7 @@ eoPerf2Worth& make_perf2worth(eoParser& parser, eoState& state) if (what > 2) { - cout << "Warning, need an integer < 3 for perf2worth" << endl; + std::cout << "Warning, need an integer < 3 for perf2worth" << std::endl; // should actually set parser flag, but I don't care } @@ -210,7 +210,7 @@ void the_main(int argc, char* argv[]) if (parser.userNeedsHelp()) { - parser.printHelp(cout); + parser.printHelp(std::cout); return; } @@ -225,9 +225,9 @@ int main(int argc, char* argv[]) { the_main(argc, argv); } - catch (exception& e) + catch (std::exception& e) { - cout << "Exception thrown: " << e.what() << endl; + std::cout << "Exception thrown: " << e.what() << std::endl; throw e; // make sure it does not pass the test } } diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index 1cbf33732..1adcb1702 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -42,11 +42,11 @@ template void compare(F & _eo1, F & _eo2) { if (_eo1.dominates(_eo2)) - cout << _eo1 << " dominates " << _eo2 << endl; + std::cout << _eo1 << " dominates " << _eo2 << std::endl; else if (_eo2.dominates(_eo1)) - cout << _eo2 << " dominates " << _eo1 << endl; + std::cout << _eo2 << " dominates " << _eo1 << std::endl; else - cout << "None of " << _eo1 << " and " << _eo2 << "dominates the other" << endl; + std::cout << "None of " << _eo1 << " and " << _eo2 << "dominates the other" << std::endl; return; } @@ -75,7 +75,7 @@ int main() if (!f0.dominates(f2)) { - cout << f2 << " not dominated by " << f0; + std::cout << f2 << " not dominated by " << f0; throw; } @@ -83,13 +83,13 @@ int main() if (f0.dominates(f1) || f1.dominates(f0)) { - cout << f0 << " and " << f1 << " dominate"; + std::cout << f0 << " and " << f1 << " dominate"; throw; } if (! (f0 == f0)) { - cout << "f0 == f0 failed" << endl; + std::cout << "f0 == f0 failed" << std::endl; throw; } @@ -132,7 +132,7 @@ int main() // now the run-time set-able number of objectives //////////////////////////////////////////// - cout << "On y va" << endl; + std::cout << "On y va" << std::endl; // setup fitness WARNING do not try to allocate any EO before that (runtime error) @@ -140,7 +140,7 @@ int main() b[0]=true; b[1]=false; VarFitness::setUp(2, b); - cout << "\nMAXimizing on Obj 0 and MINimizing on Obj 1\n"; + std::cout << "\nMAXimizing on Obj 0 and MINimizing on Obj 1\n"; VarFitness mv0; VarFitness mv1; @@ -166,11 +166,11 @@ int main() compare (mv1,mv3); compare (mv2,mv3); - cout << "\nChanging now the min <-> max\n"; + std::cout << "\nChanging now the min <-> max\n"; b[0]=false; b[1]=true; VarFitness::setUp(2, b); - cout << "\nMINimizing on Obj 0 and MAXimizing on Obj 1\n"; + std::cout << "\nMINimizing on Obj 0 and MAXimizing on Obj 1\n"; compare (mv0,mv1); compare (mv0,mv2); compare (mv0,mv3); @@ -178,7 +178,7 @@ int main() compare (mv1,mv3); compare (mv2,mv3); - cout << "\nTesting WARNING\n"; + std::cout << "\nTesting WARNING\n"; b.resize(3); b[0]=false; b[1]=true; @@ -186,9 +186,9 @@ int main() VarFitness::setUp(3, b); } - catch(exception& e) + catch(std::exception& e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; } } diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 1091ddc3e..30da63e30 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,7 +24,7 @@ */ /** -CVS Info: $Date: 2001-04-24 04:52:04 $ $Author: evomarc $ $Revision: 1.12 $ +CVS Info: $Date: 2003-02-27 19:20:24 $ $Author: okoenig $ $Revision: 1.13 $ */ //----------------------------------------------------------------------------- @@ -47,16 +47,16 @@ int main() { eoUniformGenerator utest( 10000000U, 10000U); throw; // if this succeeds something is wrong, make sure that that is noticed } - catch (logic_error& e) + catch (std::logic_error& e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; } - ofstream os("t-eoRandom.out"); + std::ofstream os("t-eoRandom.out"); for ( unsigned i = 0; i < 100; i ++) { - os << u1() << "\t" << u2() << "\t" << u3() << endl; + os << u1() << "\t" << u2() << "\t" << u3() << std::endl; } return 0; // to avoid VC++ complaints diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index 8002136c0..851e19829 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -55,18 +55,18 @@ int main(int argc, char* argv[]) // evaluate intial population AFTER help and status in case it takes time apply(eval, pop); // print it out - cout << "Initial Population\n"; - pop.sortedPrintOn(cout); - cout << endl; + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; run_ea(ea, pop); // run the ea - cout << "Final Population\n"; - pop.sortedPrintOn(cout); - cout << endl; + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; } - catch(exception& e) + catch(std::exception& e) { - cout << e.what() << endl; + std::cout << e.what() << std::endl; } } diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index 34d635554..a0f024060 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -20,7 +20,7 @@ struct Dummy : public EO { typedef double Type; - void printOn(ostream & _os) const + void printOn(std::ostream & _os) const { _os << " - "; EO::printOn(_os); @@ -73,14 +73,14 @@ int the_main(int argc, char **argv) if (parser.userNeedsHelp()) { - parser.printHelp(cout); + parser.printHelp(std::cout); exit(1); } unsigned i; - cout << "Testing the replacements\nParents SIze = " << pSize - << " and offspring size = " << oSize << endl; + std::cout << "Testing the replacements\nParents SIze = " << pSize + << " and offspring size = " << oSize << std::endl; rng.reseed(42); @@ -94,7 +94,7 @@ int the_main(int argc, char **argv) for (i=0; i offspring.size() ) - cout << "Skipping Comma Replacement, more parents than offspring\n"; + std::cout << "Skipping Comma Replacement, more parents than offspring\n"; else { - cout << "eoCommaReplacement\n"; - cout << "==================\n"; + std::cout << "eoCommaReplacement\n"; + std::cout << "==================\n"; commaReplace(parents, offspring); - cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; // Comma with weak elitism parents = orgParents; offspring = orgOffspring; - cout << "The same, with WEAK elitism\n"; - cout << "===========================\n"; + std::cout << "The same, with WEAK elitism\n"; + std::cout << "===========================\n"; weakElitistReplace(parents, offspring); - cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; } // preparing SSGA replace worse @@ -167,31 +167,31 @@ cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originall offspring = orgOffspring; if (parents.size() < offspring.size() ) - cout << "Skipping all SSGA Replacements, more offspring than parents\n"; + std::cout << "Skipping all SSGA Replacements, more offspring than parents\n"; else { - cout << "SSGA replace worse\n"; - cout << "==================\n"; + std::cout << "SSGA replace worse\n"; + std::cout << "==================\n"; ssgaWorseReplace(parents, offspring); - cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; // SSGA deterministic tournament parents = orgParents; offspring = orgOffspring; - cout << "SSGA deterministic tournament\n"; - cout << "=============================\n"; + std::cout << "SSGA deterministic tournament\n"; + std::cout << "=============================\n"; ssgaDTReplace(parents, offspring); - cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; // SSGA stochastic tournament parents = orgParents; offspring = orgOffspring; - cout << "SSGA stochastic tournament\n"; - cout << "==========================\n"; + std::cout << "SSGA stochastic tournament\n"; + std::cout << "==========================\n"; ssgaDTReplace(parents, offspring); - cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; } // the general replacement @@ -200,10 +200,10 @@ cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originall parents = orgParents; offspring = orgOffspring; - cout << "General - strong elitism\n"; - cout << "========================\n"; + std::cout << "General - strong elitism\n"; + std::cout << "========================\n"; sAdReplace(parents, offspring); - cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << endl; + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; return 1; @@ -215,9 +215,9 @@ int main(int argc, char **argv) { the_main(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoSSGA.cpp b/eo/test/t-eoSSGA.cpp index be2f210a0..d1c467e5a 100644 --- a/eo/test/t-eoSSGA.cpp +++ b/eo/test/t-eoSSGA.cpp @@ -31,7 +31,7 @@ class eoMyEval : public eoEvalFunc void operator()(EOT& _eo) { - _eo.fitness(*max_element(_eo.begin(), _eo.end())); + _eo.fitness(*std::max_element(_eo.begin(), _eo.end())); } }; @@ -41,7 +41,7 @@ class Xover : public eoBinOp bool operator()(EOT& _eo, const EOT& _eo2) { unsigned point = rng.random(_eo.size()); - copy(_eo2.begin() + point, _eo2.end(), _eo.begin() + point); + std::copy(_eo2.begin() + point, _eo2.end(), _eo.begin() + point); return true; } }; diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 6e2139b05..4f3078e97 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -15,7 +15,7 @@ struct Dummy : public EO { typedef double Type; - void printOn(ostream & _os) const + void printOn(std::ostream & _os) const { _os << " - "; EO::printOn(_os); @@ -44,15 +44,15 @@ unsigned isInPop(EOT & _indi, eoPop & _pop) } unsigned int pSize; // global variable, bouh! -string fitnessType; // yes, a global variable :-) +std::string fitnessType; // yes, a global variable :-) eoDummyPop parentsOrg; template -void testSelectMany(eoSelect & _select, string _name) +void testSelectMany(eoSelect & _select, std::string _name) { unsigned i; - cout << "\n\n" << fitnessType + _name << endl; - cout << "===============\n"; + std::cout << "\n\n" << fitnessType + _name << std::endl; + std::cout << "===============\n"; eoDummyPop parents(parentsOrg); eoDummyPop offspring(0); @@ -61,28 +61,28 @@ void testSelectMany(eoSelect & _select, string _name) _select(parents, offspring); // compute stats - vector nb(parents.size(), 0); + std::vector nb(parents.size(), 0); for (i=0; i(offspring[i], parents); if (trouve == parents.size()) // pas trouve - throw runtime_error("Pas trouve ds parents"); + throw std::runtime_error("Pas trouve ds parents"); nb[trouve]++; } // dump to file so you can plot using gnuplot - dir name is hardcoded! - string fName = "ResSelect/" + fitnessType + _name + ".select"; - ofstream os(fName.c_str()); + std::string fName = "ResSelect/" + fitnessType + _name + ".select"; + std::ofstream os(fName.c_str()); for (i=0; i " << ( (double)nb[i])/offspring.size() << endl; - os << i << " " << ( (double)nb[i])/offspring.size() << endl; + std::cout << i << " -> " << ( (double)nb[i])/offspring.size() << std::endl; + os << i << " " << ( (double)nb[i])/offspring.size() << std::endl; } } template void testSelectOne(eoSelectOne & _select, eoHowMany & _offspringRate, - eoHowMany & _fertileRate, string _name) + eoHowMany & _fertileRate, std::string _name) { eoTruncatedSelectOne truncSelect(_select, _fertileRate); eoSelectMany percSelect(truncSelect, _offspringRate); @@ -118,42 +118,42 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to eoValueParam rankingExponentParam = parser.createParam(1.0, "rankingExponent", "Exponent for the ranking selection",'e'); double rankingExponent = rankingExponentParam.value(); - eoValueParam fitTypeParam = parser.createParam(string("linear"), "fitType", "Type of fitness (linear, exp, log, super",'f'); + eoValueParam fitTypeParam = parser.createParam(std::string("linear"), "fitType", "Type of fitness (linear, exp, log, super",'f'); fitnessType = fitTypeParam.value(); if (parser.userNeedsHelp()) { - parser.printHelp(cout); + parser.printHelp(std::cout); exit(0); } // hard-coded directory name ... system("mkdir ResSelect"); - cout << "Testing the Selections\nParents size = " << pSize + std::cout << "Testing the Selections\nParents size = " << pSize << ", offspring rate = " << oRate; - cout << " and putting rsulting files in dir ResSelect" << endl; + std::cout << " and putting rsulting files in dir ResSelect" << std::endl; // initialize parent population parentsOrg.resize(pSize); - if (fitnessType == string("linear")) + if (fitnessType == std::string("linear")) for (unsigned i=0; i& seedParam = parser.createParam(uint32(0), "seed", "Random number seed", 'S'); @@ -177,7 +177,7 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to testSelectOne(newRankingSelect, oRate, fRate, fileName); // Exponential ranking using the perf2Worth construct - cout << "rankingExponent " << rankingExponent << endl; + std::cout << "rankingExponent " << rankingExponent << std::endl; eoRankingSelect expRankingSelect(rankingPressure,rankingExponent); sprintf(fileName,"ExpRank_%g_%g",rankingPressure, rankingExponent); testSelectOne(expRankingSelect, oRate, fRate, fileName); @@ -215,9 +215,9 @@ int main(int argc, char **argv) { the_main(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << endl; + std::cout << "Exception: " << e.what() << std::endl; return 1; } } diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index 62d16891f..bceb192b6 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -48,12 +48,12 @@ int the_main(int argc, char **argv) eoValueParam seed(time(0), "seed", "Random number seed"); // test if user entered or if default value used if (parser.isItThere(seed)) - cout << "YES\n"; + std::cout << "YES\n"; else - cout << "NO\n"; + std::cout << "NO\n"; - eoValueParam load_name("", "Load","Load",'L'); - eoValueParam save_name("", "Save","Save",'S'); + eoValueParam load_name("", "Load","Load",'L'); + eoValueParam save_name("", "Save","Save",'S'); // Register them @@ -69,7 +69,7 @@ int the_main(int argc, char **argv) parser.processParam(boundParam, "Genetic Operators"); - cout << "Bounds: " << boundParam.value() << endl; + std::cout << "Bounds: " << boundParam.value() << std::endl; eoState state; state.registerObject(parser); @@ -89,7 +89,7 @@ int the_main(int argc, char **argv) if (parser.userNeedsHelp()) { - parser.printHelp(cout); + parser.printHelp(std::cout); return 0; } @@ -112,7 +112,7 @@ int the_main(int argc, char **argv) // Save when needed if (save_name.value() != "") { - string file_name = save_name.value(); + std::string file_name = save_name.value(); save_name.value() = ""; // so that it does not appear in the parser section of the state file state.save(file_name); } @@ -120,7 +120,7 @@ int the_main(int argc, char **argv) for (int i = 0; i < 100; ++i) rng.rand(); - cout << "a random number is " << rng.random(1024) << endl;; + std::cout << "a random number is " << rng.random(1024) << std::endl;; return 1; } @@ -131,9 +131,9 @@ int main(int argc, char **argv) { the_main(argc, argv); } - catch(exception& e) + catch(std::exception& e) { - cout << "Exception: " << e.what() << endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 226b1a73b..f83f3aaa4 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -194,7 +194,7 @@ private : template void print_best(eoPop& pop) { - cout << endl; + std::cout << std::endl; FitnessType best = pop[0].fitness(); int index = 0; @@ -207,13 +207,13 @@ void print_best(eoPop& pop) } } - cout << "\t"; + std::cout << "\t"; string str; pop[index].apply(str); - cout << str.c_str(); - cout << endl << "RMS Error = " << pop[index].fitness() << endl; + std::cout << str.c_str(); + std::cout << std::endl << "RMS Error = " << pop[index].fitness() << std::endl; } int main() @@ -274,7 +274,7 @@ int main() // GP generation eoEasyEA gp(checkPoint, eval, select, transform, replace); - cout << "Initialization done" << endl; + std::cout << "Initialization done" << std::endl; print_best(pop); @@ -282,9 +282,9 @@ int main() { gp(pop); } - catch (exception& e) + catch (std::exception& e) { - cout << "exception: " << e.what() << endl;; + std::cout << "exception: " << e.what() << std::endl;; exit(EXIT_FAILURE); } diff --git a/eo/test/t-eoUniform.cpp b/eo/test/t-eoUniform.cpp index 5e14a7284..04c23e5ca 100644 --- a/eo/test/t-eoUniform.cpp +++ b/eo/test/t-eoUniform.cpp @@ -2,7 +2,7 @@ // t-eouniform //----------------------------------------------------------------------------- -#include // cout +#include // std::cout #include // ostrstream, istrstream #include // eoBin @@ -12,9 +12,9 @@ main() { eoUniform u1(-2.5,3.5); eoUniform u2(0.003, 0 ); eoUniform u3( 10000U, 10000000U); - cout << "u1\t\tu2\t\tu3" << endl; + std::cout << "u1\t\tu2\t\tu3" << std::endl; for ( unsigned i = 0; i < 100; i ++) { - cout << u1() << "\t" << u2() << "\t" << u3() << endl; + std::cout << u1() << "\t" << u2() << "\t" << u3() << std::endl; } } diff --git a/eo/test/t-eoVector.cpp b/eo/test/t-eoVector.cpp index 759414c40..8554b3eb5 100644 --- a/eo/test/t-eoVector.cpp +++ b/eo/test/t-eoVector.cpp @@ -25,7 +25,7 @@ */ //----------------------------------------------------------------------------- -#include // cout +#include // std::cout #include // ostrstream, istrstream #include @@ -59,11 +59,11 @@ int main() init(chrom); - cout << chrom << endl; + std::cout << chrom << std::endl; Chrom2 chrom2(chrom); - cout << chrom2 << endl; + std::cout << chrom2 << std::endl; // eoInitVariableLength initvar( diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp index 5ad4067f6..612906a92 100644 --- a/eo/test/t-eoVirus.cpp +++ b/eo/test/t-eoVirus.cpp @@ -23,7 +23,7 @@ */ //----------------------------------------------------------------------------- -#include // cout +#include // std::cout #include // ostrstream, istrstream #include // general EO #include "../contrib/MGE/VirusOp.h" @@ -47,30 +47,30 @@ int main() Chrom chrom(SIZE), chrom2(SIZE); chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); - cout << chrom << endl; - cout << chrom2 << endl; + std::cout << chrom << std::endl; + std::cout << chrom2 << std::endl; // Virus Mutation VirusBitFlip vf; unsigned i; for ( i = 0; i < 10; i++ ) { vf( chrom ); - cout << chrom << endl; + std::cout << chrom << std::endl; } // Chrom Mutation - cout << "Chrom mutation--------" << endl; + std::cout << "Chrom mutation--------" << std::endl; VirusMutation vm; for ( i = 0; i < 10; i++ ) { vm( chrom ); - cout << chrom << endl; + std::cout << chrom << std::endl; } // Chrom Transmision - cout << "Chrom transmission--------" << endl; + std::cout << "Chrom transmission--------" << std::endl; VirusTransmission vt; vt( chrom2, chrom ); - cout << chrom2 << endl; + std::cout << chrom2 << std::endl; return 0; diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 691f86b48..220df5fae 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -23,7 +23,7 @@ */ //----------------------------------------------------------------------------- -#include // cout +#include // std::cout #include // ostrstream, istrstream #include // general EO #include // bitstring representation & operators @@ -45,91 +45,91 @@ void main_function() Chrom chrom(SIZE), chrom2; chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); - cout << "chrom: " << chrom << endl; + std::cout << "chrom: " << chrom << std::endl; chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); - cout << "chrom: " << chrom << endl; + std::cout << "chrom: " << chrom << std::endl; chrom[0] = chrom[SIZE - 1] = false; chrom.fitness(binary_value(chrom)); - cout << "chrom: " << chrom << endl; + std::cout << "chrom: " << chrom << std::endl; chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); - cout << "chrom.className() = " << chrom.className() << endl; + std::cout << "chrom.className() = " << chrom.className() << std::endl; - cout << "chrom: " << chrom << endl - << "chrom2: " << chrom2 << endl; + std::cout << "chrom: " << chrom << std::endl + << "chrom2: " << chrom2 << std::endl; char buff[1024]; - ostrstream os(buff, 1024); + std::ostrstream os(buff, 1024); os << chrom; - istrstream is(os.str()); + std::istrstream is(os.str()); is >> chrom2; chrom.fitness(binary_value(chrom2)); - cout << "\nTesting reading, writing\n"; - cout << "chrom: " << chrom << "\nchrom2: " << chrom2 << '\n'; + std::cout << "\nTesting reading, writing\n"; + std::cout << "chrom: " << chrom << "\nchrom2: " << chrom2 << '\n'; - fill(chrom.begin(), chrom.end(), false); - cout << "--------------------------------------------------" - << endl << "eoMonOp's aplied to .......... " << chrom << endl; + std::fill(chrom.begin(), chrom.end(), false); + std::cout << "--------------------------------------------------" + << std::endl << "eoMonOp's aplied to .......... " << chrom << std::endl; eoInitFixedLength random(chrom.size(), gen); random(chrom); chrom.fitness(binary_value(chrom)); - cout << "after eoBinRandom ............ " << chrom << endl; + std::cout << "after eoBinRandom ............ " << chrom << std::endl; eoOneBitFlip bitflip; bitflip(chrom); chrom.fitness(binary_value(chrom)); - cout << "after eoBitFlip .............. " << chrom << endl; + std::cout << "after eoBitFlip .............. " << chrom << std::endl; eoBitMutation mutation(0.5); mutation(chrom); chrom.fitness(binary_value(chrom)); - cout << "after eoBinMutation(0.5) ..... " << chrom << endl; + std::cout << "after eoBinMutation(0.5) ..... " << chrom << std::endl; eoBitInversion inversion; inversion(chrom); chrom.fitness(binary_value(chrom)); - cout << "after eoBinInversion ......... " << chrom << endl; + std::cout << "after eoBinInversion ......... " << chrom << std::endl; eoBitNext next; next(chrom); chrom.fitness(binary_value(chrom)); - cout << "after eoBinNext .............. " << chrom << endl; + std::cout << "after eoBinNext .............. " << chrom << std::endl; eoBitPrev prev; prev(chrom); chrom.fitness(binary_value(chrom)); - cout << "after eoBinPrev .............. " << chrom << endl; + std::cout << "after eoBinPrev .............. " << chrom << std::endl; - fill(chrom.begin(), chrom.end(), false); chrom.fitness(binary_value(chrom)); - fill(chrom2.begin(), chrom2.end(), true); chrom2.fitness(binary_value(chrom2)); - cout << "--------------------------------------------------" - << endl << "eoBinOp's aplied to ... " - << chrom << " " << chrom2 << endl; + std::fill(chrom.begin(), chrom.end(), false); chrom.fitness(binary_value(chrom)); + std::fill(chrom2.begin(), chrom2.end(), true); chrom2.fitness(binary_value(chrom2)); + std::cout << "--------------------------------------------------" + << std::endl << "eoBinOp's aplied to ... " + << chrom << " " << chrom2 << std::endl; eo1PtBitXover xover; - fill(chrom.begin(), chrom.end(), false); - fill(chrom2.begin(), chrom2.end(), true); + std::fill(chrom.begin(), chrom.end(), false); + std::fill(chrom2.begin(), chrom2.end(), true); xover(chrom, chrom2); chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); - cout << "eoBinCrossover ........ " << chrom << " " << chrom2 << endl; + std::cout << "eoBinCrossover ........ " << chrom << " " << chrom2 << std::endl; for (i = 1; i < SIZE; i++) { eoNPtsBitXover nxover(i); - fill(chrom.begin(), chrom.end(), false); - fill(chrom2.begin(), chrom2.end(), true); + std::fill(chrom.begin(), chrom.end(), false); + std::fill(chrom2.begin(), chrom2.end(), true); nxover(chrom, chrom2); chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); - cout << "eoBinNxOver(" << i << ") ........ " - << chrom << " " << chrom2 << endl; + std::cout << "eoBinNxOver(" << i << ") ........ " + << chrom << " " << chrom2 << std::endl; } for (i = 1; i < SIZE / 2; i++) for (j = 1; j < SIZE / 2; j++) { eoBitGxOver gxover(i, j); - fill(chrom.begin(), chrom.end(), false); - fill(chrom2.begin(), chrom2.end(), true); + std::fill(chrom.begin(), chrom.end(), false); + std::fill(chrom2.begin(), chrom2.end(), true); gxover(chrom, chrom2); chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); - cout << "eoBinGxOver(" << i << ", " << j << ") ..... " - << chrom << " " << chrom2 << endl; + std::cout << "eoBinGxOver(" << i << ", " << j << ") ..... " + << chrom << " " << chrom2 << std::endl; } // test SGA algorithm @@ -163,9 +163,9 @@ void main_function() pop.sort(); - cout << "Population " << pop << endl; + std::cout << "Population " << pop << std::endl; - cout << "\nBest: " << pop[0].fitness() << '\n'; + std::cout << "\nBest: " << pop[0].fitness() << '\n'; /* @@ -174,16 +174,16 @@ void main_function() // Check multiOps eoMultiMonOp mOp( &next ); mOp.adOp( &bitflip ); - cout << "before multiMonOp............ " << chrom << endl; + std::cout << "before multiMonOp............ " << chrom << std::endl; mOp( chrom ); - cout << "after multiMonOp .............. " << chrom << endl; + std::cout << "after multiMonOp .............. " << chrom << std::endl; eoBinGxOver gxover(2, 4); eoMultiBinOp mbOp( &gxover ); mOp.adOp( &bitflip ); - cout << "before multiBinOp............ " << chrom << " " << chrom2 << endl; + std::cout << "before multiBinOp............ " << chrom << " " << chrom2 << std::endl; mbOp( chrom, chrom2 ); - cout << "after multiBinOp .............. " << chrom << " " << chrom2 < bitflip; eoBinCrossover xover; @@ -77,9 +77,9 @@ main() // reevaluation of fitness for_each(pop.begin(), pop.end(), BinaryValue()); - cout << "new population:" << endl; + std::cout << "new population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; + std::cout << pop[i] << " " << pop[i].fitness() << std::endl; return 0; } diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index 33068781e..1999e9fd5 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -5,7 +5,7 @@ #include // time #include // srand, rand -#include // cout +#include // std::cout #include @@ -21,35 +21,35 @@ int test_fitness(Fitness a, Fitness b) // Fitness a = aval; //static_cast(rand()) / RAND_MAX; // Fitness b = bval; //static_cast(rand()) / RAND_MAX; - cout.precision(2); + std::cout.precision(2); unsigned repeat = 2; while (repeat--) { - cout << "------------------------------------------------------" << endl; - cout << "testing < "; + std::cout << "------------------------------------------------------" << std::endl; + std::cout << "testing < "; if (a < b) - cout << a << " < " << b << " is true" << endl; + std::cout << a << " < " << b << " is true" << std::endl; else - cout << a << " < " << b << " is false" < "; + std::cout << "testing > "; if (a > b) - cout << a << " > " << b << " is true" << endl; + std::cout << a << " > " << b << " is true" << std::endl; else - cout << a << " > " << b << " is false" < " << b << " is false" < i) - cout << pop[i] << " " << pop[i].fitness() << " \t"; + std::cout << pop[i] << " " << pop[i].fitness() << " \t"; else - cout << "\t\t"; + std::cout << "\t\t"; if (pop2.size() > i) - cout << pop2[i] << " " << pop2[i].fitness(); - cout << endl; + std::cout << pop2[i] << " " << pop2[i].fitness(); + std::cout << std::endl; } eoInclusion inclusion(0.75); @@ -71,22 +71,22 @@ main() pop5 = pop2; inclusion3(pop, pop5); - cout << endl - << "0.75 \t\t1.0 \t\t1.5" << endl - << "---- \t\t--- \t\t---" << endl; + std::cout << std::endl + << "0.75 \t\t1.0 \t\t1.5" << std::endl + << "---- \t\t--- \t\t---" << std::endl; for (i = 0; i < pop5.size(); i++) { if (pop3.size() > i) - cout << pop3[i] << " " << pop3[i].fitness() << " \t"; + std::cout << pop3[i] << " " << pop3[i].fitness() << " \t"; else - cout << " \t\t"; + std::cout << " \t\t"; if (pop4.size() > i) - cout << pop4[i] << " " << pop4[i].fitness() << " \t"; + std::cout << pop4[i] << " " << pop4[i].fitness() << " \t"; else - cout << " \t\t"; + std::cout << " \t\t"; if (pop5.size() > i) - cout << pop5[i] << " " << pop5[i].fitness(); - cout << endl; + std::cout << pop5[i] << " " << pop5[i].fitness(); + std::cout << std::endl; } } } diff --git a/eo/test/t-eoinsertion.cpp b/eo/test/t-eoinsertion.cpp index 993c228ff..051ca8211 100644 --- a/eo/test/t-eoinsertion.cpp +++ b/eo/test/t-eoinsertion.cpp @@ -52,18 +52,18 @@ main() pop2.push_back(chrom); } - cout << "--------------------------------------------------" << endl - << "breeders \tpop" << endl - << "--------------------------------------------------" << endl; + std::cout << "--------------------------------------------------" << std::endl + << "breeders \tpop" << std::endl + << "--------------------------------------------------" << std::endl; for (i = 0; i < max(pop.size(), pop2.size()); i++) { if (pop.size() > i) - cout << pop[i] << " " << pop[i].fitness() << " \t"; + std::cout << pop[i] << " " << pop[i].fitness() << " \t"; else - cout << "\t\t"; + std::cout << "\t\t"; if (pop2.size() > i) - cout << pop2[i] << " " << pop2[i].fitness(); - cout << endl; + std::cout << pop2[i] << " " << pop2[i].fitness(); + std::cout << std::endl; } eoInsertion insertion(0.75); @@ -81,22 +81,22 @@ main() pop5 = pop2; insertion3(popx, pop5); - cout << endl - << "0.75 \t\t1.0 \t\t1.5" << endl - << "---- \t\t--- \t\t---" << endl; + std::cout << std::endl + << "0.75 \t\t1.0 \t\t1.5" << std::endl + << "---- \t\t--- \t\t---" << std::endl; for (i = 0; i < pop5.size(); i++) { if (pop3.size() > i) - cout << pop3[i] << " " << pop3[i].fitness() << " \t"; + std::cout << pop3[i] << " " << pop3[i].fitness() << " \t"; else - cout << " \t\t"; + std::cout << " \t\t"; if (pop4.size() > i) - cout << pop4[i] << " " << pop4[i].fitness() << " \t"; + std::cout << pop4[i] << " " << pop4[i].fitness() << " \t"; else - cout << " \t\t"; + std::cout << " \t\t"; if (pop5.size() > i) - cout << pop5[i] << " " << pop5[i].fitness(); - cout << endl; + std::cout << pop5[i] << " " << pop5[i].fitness(); + std::cout << std::endl; } } } diff --git a/eo/test/t-eolottery.cpp b/eo/test/t-eolottery.cpp index 6fd97d2f8..e03926380 100644 --- a/eo/test/t-eolottery.cpp +++ b/eo/test/t-eolottery.cpp @@ -35,18 +35,18 @@ main() pop.push_back(chrom); } - cout << "original population:" << endl; + std::cout << "original population:" << std::endl; sort(pop.begin(), pop.end()); for (i = 0; i < pop.size(); i++) - cout << pop[i] << " " << pop[i].fitness() << endl; + std::cout << pop[i] << " " << pop[i].fitness() << std::endl; eoLottery lottery; lottery(pop, pop2); - cout << "selected by lottery population:" << endl; + std::cout << "selected by lottery population:" << std::endl; sort(pop2.begin(), pop2.end()); for (i = 0; i < pop2.size(); i++) - cout << pop2[i] << " " << pop2[i].fitness() << endl; + std::cout << pop2[i] << " " << pop2[i].fitness() << std::endl; return 0; } diff --git a/eo/test/t-eoproblem.cpp b/eo/test/t-eoproblem.cpp index e7c36666e..066efb62f 100644 --- a/eo/test/t-eoproblem.cpp +++ b/eo/test/t-eoproblem.cpp @@ -5,7 +5,7 @@ #include // time #include // fabs -#include // cout +#include // std::cout #include // eoVector, eoProblem //----------------------------------------------------------------------------- @@ -14,9 +14,9 @@ typedef eoVector Chrom; //----------------------------------------------------------------------------- -ostream& operator<<(ostream& os, const Chrom& chrom) +std::ostream& operator<<(std::ostream& os, const Chrom& chrom) { - copy(chrom.begin(), chrom.end(), ostream_iterator(os)); + copy(chrom.begin(), chrom.end(), std::ostream_iterator(os)); return os; } @@ -46,8 +46,8 @@ int main() chrom[0] = ((float)rand()) / ((float)RAND_MAX); chrom.fitness(easy(chrom)); - cout << "chrom = " << chrom << endl - << "chrom.fitness() = " << chrom.fitness() << endl; + std::cout << "chrom = " << chrom << std::endl + << "chrom.fitness() = " << chrom.fitness() << std::endl; return 0; } diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp index 56da601c4..e401188eb 100644 --- a/eo/test/t-selectOne.cpp +++ b/eo/test/t-selectOne.cpp @@ -63,24 +63,24 @@ main() } // print population - cout << "population:" << endl; + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) - cout << pop[i] << " " << pop[i].fitness() << endl; + std::cout << pop[i] << " " << pop[i].fitness() << std::endl; // Declare 1-selectors eoUniformSelect uSelect; Chrom aChrom; aChrom = uSelect( pop ); - cout << "Uniform Select " << aChrom << " " << aChrom.fitness() << endl; + std::cout << "Uniform Select " << aChrom << " " << aChrom.fitness() << std::endl; eoStochTournament sSelect(0.7); aChrom = sSelect( pop ); - cout << "Stochastic Tournament " << aChrom << " " << aChrom.fitness() << endl; + std::cout << "Stochastic Tournament " << aChrom << " " << aChrom.fitness() << std::endl; eoDetTournament dSelect(3); aChrom = dSelect( pop ); - cout << "Deterministic Tournament " << aChrom << " " << aChrom.fitness() << endl; + std::cout << "Deterministic Tournament " << aChrom << " " << aChrom.fitness() << std::endl; return 0; } diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index 710f9b78c..4e7ea1ab1 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -15,6 +15,9 @@ #include #include +// Use functions from namespace std +using namespace std; + // REPRESENTATION //----------------------------------------------------------------------------- // define your individuals diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index 74ed459b5..76556882d 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -15,6 +15,9 @@ #include #include +// Use functions from namespace std +using namespace std; + // REPRESENTATION //----------------------------------------------------------------------------- // define your individuals diff --git a/eo/tutorial/Lesson1/exercise1.3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp index 89e8cc54b..d2702ad1d 100644 --- a/eo/tutorial/Lesson1/exercise1.3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -22,6 +22,8 @@ // define your individuals typedef eoBit Indi; // A bitstring with fitness double +using namespace std; + //----------------------------------------------------------------------------- /** a simple fitness function that computes the number of ones of a bitstring @param _indi A biststring individual diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index 08eb2b992..f5ca1afa6 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -15,6 +15,9 @@ #include #include +// Use functions from namespace std +using namespace std; + // REPRESENTATION //----------------------------------------------------------------------------- // define your individuals diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index b0ceb4462..1f9686f94 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -20,6 +20,9 @@ // define your individuals typedef eoReal Indi; +// Use functions from namespace std +using namespace std; + // EVALFUNC //----------------------------------------------------------------------------- // a simple fitness function that computes the euclidian norm of a real vector diff --git a/eo/tutorial/Lesson2/binary_value.h b/eo/tutorial/Lesson2/binary_value.h index a31c08644..f2f5d6ca1 100644 --- a/eo/tutorial/Lesson2/binary_value.h +++ b/eo/tutorial/Lesson2/binary_value.h @@ -7,7 +7,7 @@ @param _chrom A binary chromosome */ // INIT -double binary_value(const vector& _chrom) +double binary_value(const std::vector& _chrom) { double sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index 70636b564..e07dd768d 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -31,6 +31,8 @@ typedef eoBit Indi; // A bitstring with fitness double // GENERAL //----------------------------------------------------------------------------- +using namespace std; + void main_function(int argc, char **argv) { // PARAMETRES diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index ab83faa23..7a7bbb0c9 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -16,6 +16,9 @@ #include #include +// Use functions from namespace std +using namespace std; + // EVAL #include "binary_value.h" diff --git a/eo/tutorial/Lesson3/SecondRealEA.cpp b/eo/tutorial/Lesson3/SecondRealEA.cpp index 1128d1c60..df2bed9a6 100644 --- a/eo/tutorial/Lesson3/SecondRealEA.cpp +++ b/eo/tutorial/Lesson3/SecondRealEA.cpp @@ -22,6 +22,9 @@ // define your individuals typedef eoReal Indi; +// Use functions from namespace std +using namespace std; + // EVALFUNC //----------------------------------------------------------------------------- // a simple fitness function that computes the euclidian norm of a real vector diff --git a/eo/tutorial/Lesson3/binary_value.h b/eo/tutorial/Lesson3/binary_value.h index a31c08644..f2f5d6ca1 100644 --- a/eo/tutorial/Lesson3/binary_value.h +++ b/eo/tutorial/Lesson3/binary_value.h @@ -7,7 +7,7 @@ @param _chrom A binary chromosome */ // INIT -double binary_value(const vector& _chrom) +double binary_value(const std::vector& _chrom) { double sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index de51f7509..cde1cc537 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -25,6 +25,8 @@ // define your genotype and fitness types typedef eoBit Indi; +using namespace std; + // the main_function: nothing changed(!), except variable initialization void main_function(int argc, char **argv) { diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp index 2b2b1024c..97adb8e85 100644 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp @@ -5,6 +5,8 @@ typedef eoBit Indi; // A bitstring with fitness double #include "binary_value.h" +using namespace std; + void main_function(int argc, char ** argv) { // Some parameters ... diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp index 17d47d210..04114ec0b 100644 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp @@ -5,6 +5,8 @@ typedef eoBit Indi; // A bitstring with fitness double #include "binary_value.h" +using namespace std; + void main_function(int argc, char ** argv) { // Some parameters ... diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp index 98a9b2b5d..5b616a303 100644 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp +++ b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp @@ -5,6 +5,8 @@ typedef eoBit Indi; // A bitstring with fitness double #include "binary_value.h" +using namespace std; + void main_function(int argc, char ** argv) { // Some parameters ... diff --git a/eo/tutorial/ParadisEO/Lesson1/binary_value.h b/eo/tutorial/ParadisEO/Lesson1/binary_value.h index a31c08644..f2f5d6ca1 100644 --- a/eo/tutorial/ParadisEO/Lesson1/binary_value.h +++ b/eo/tutorial/ParadisEO/Lesson1/binary_value.h @@ -7,7 +7,7 @@ @param _chrom A binary chromosome */ // INIT -double binary_value(const vector& _chrom) +double binary_value(const std::vector& _chrom) { double sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) From 153b80440c12cd996753be6a48902cc700fff043 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 28 Feb 2003 16:49:19 +0000 Subject: [PATCH 0932/2134] changed to using sstream --- eo/Makefile.am | 2 +- eo/acinclude.m4 | 37 ++++++++++++++++++++++ eo/app/Makefile.am | 2 +- eo/configure.in | 4 ++- eo/doc/Makefile.am | 2 -- eo/src/Makefile.am | 2 +- eo/src/eoCtrlCContinue.cpp | 4 +-- eo/src/eoPop.h | 2 -- eo/src/utils/eoFileSnapshot.h | 5 +++ eo/src/utils/eoGnuplot.h | 13 ++++++-- eo/src/utils/eoGnuplot1DMonitor.h | 9 ++++++ eo/src/utils/eoGnuplot1DSnapshot.h | 21 ++++++++++-- eo/src/utils/eoHowMany.h | 5 +++ eo/src/utils/eoParam.h | 51 +++++++++++++++++++++++++++++- eo/src/utils/eoParser.cpp | 6 +++- eo/src/utils/eoPopStat.h | 41 +++++++++++++++++++++--- eo/src/utils/eoRealBounds.cpp | 14 ++++++++ eo/src/utils/eoState.cpp | 19 +++++++++-- eo/src/utils/eoUpdater.cpp | 19 ++++++++--- eo/test/t-eoGenOp.cpp | 9 ++++-- eo/test/t-eoVirus.cpp | 1 - eo/test/t-eobin.cpp | 16 +++++++++- 22 files changed, 253 insertions(+), 31 deletions(-) create mode 100644 eo/acinclude.m4 diff --git a/eo/Makefile.am b/eo/Makefile.am index e72f40299..3296c41b2 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -10,7 +10,7 @@ DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user IDXDIR = ~/index -EXTRA_DIST=LICENSE +EXTRA_DIST=LICENSE ############################################################################### diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 new file mode 100644 index 000000000..3454628cb --- /dev/null +++ b/eo/acinclude.m4 @@ -0,0 +1,37 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_sstream.html +dnl +AC_DEFUN([AC_CXX_HAVE_SSTREAM], +[AC_CACHE_CHECK(whether the compiler has stringstream, +ac_cv_cxx_have_sstream, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[stringstream message; message << "Hello"; return 0;], + ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_sstream" = yes; then + AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) +fi +]) +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html +dnl +AC_DEFUN([AC_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ac_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 546994654..39553c1c7 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = gprop mastermind gpsymreg +SUBDIRS = mastermind gpsymreg gprop ############################################################################### diff --git a/eo/configure.in b/eo/configure.in index 90de61241..a728dd4f7 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -22,9 +22,11 @@ AC_CHECK_LIB(eoutils, main) dnl Replace `main' with a function in -lm: AC_CHECK_LIB(m, main) + dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(limits.h) +#AC_CXX_HAVE_SSTREAM dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -34,5 +36,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) +AC_OUTPUT(doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile src/do/Makefile) diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index f77794690..64f03e40b 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -8,8 +8,6 @@ EXTRA_DIST = eo.cfg foot.html html/* latex/* -all: doc - doc: eo.cfg doxygen eo.cfg diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 85a048d04..0bf74599e 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = es ga gp utils other +SUBDIRS = es ga gp utils other do CPPFLAGS = -O2 lib_LIBRARIES = libeo.a diff --git a/eo/src/eoCtrlCContinue.cpp b/eo/src/eoCtrlCContinue.cpp index 36b0abe71..deec41765 100644 --- a/eo/src/eoCtrlCContinue.cpp +++ b/eo/src/eoCtrlCContinue.cpp @@ -29,7 +29,7 @@ #endif #include -#include +#include // --- Global variables - but don't know what else to do - MS --- bool arret_demande = false; @@ -44,7 +44,7 @@ void signal_handler( int sig ) // --- On veut la paix, jusqu'a la fin --- signal( SIGINT, SIG_IGN ); signal( SIGQUIT, SIG_IGN ); - cerr << "Ctrl C entered ... closing down" << endl ; + std::cerr << "Ctrl C entered ... closing down" << std::endl ; arret_demande = true; } diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 46cc2ab90..06babccaf 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -26,7 +26,6 @@ #define _EOPOP_H #include -#include #include #include // needed for GCC 3.2 @@ -262,7 +261,6 @@ class eoPop: public std::vector, public eoObject, public eoPersistent //@{ /** * Read object. The EOT class must have a ctor from a stream; - in this case, a strstream is used. * @param _is A std::istream. */ virtual void readFrom(std::istream& _is) diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 354d2c2ad..0c89ef7e7 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -95,10 +95,15 @@ public : */ void setCurrentFileName() { +#ifdef HAVE_SSTREAM + std::ostringstream oscount; +#else char buff[255]; std::ostrstream oscount(buff, 254); +#endif oscount << counter; oscount << std::ends; + currentFileName = dirname + "/" + filename + oscount.str(); } diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 0d61e40c6..38aea2b45 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -104,14 +104,23 @@ private: inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) ///////////////////////////////////////////////////////// { - char snum[255]; +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else + char snum[255]; std::ostrstream os(snum, 254); +#endif + os << "300x200-0+" << numWindow*220 << std::ends; numWindow++; char *args[6]; args[0] = strdup( "gnuplot" ); args[1] = strdup( "-geometry" ); +#ifdef HAVE_SSTREAM + args[2] = strdup( os.str().c_str()); +#else args[2] = strdup( os.str() ); +#endif args[3] = strdup( "-title" ); args[4] = strdup( _title.c_str() ); args[5] = 0; @@ -139,7 +148,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.6 2003-02-27 19:21:18 okoenig Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.7 2003-02-28 16:49:14 maartenkeijzer Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 00799f6eb..05af81d51 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -105,8 +105,13 @@ inline void eoGnuplot1DMonitor::FirstPlot() { throw std::runtime_error("Must have some stats to plot!\n"); } +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else char buff[1024]; std::ostrstream os(buff, 1024); +#endif + os << "plot"; for (unsigned i=1; i> rate; // now store if (interpret_as_rate) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 1a0354a4e..c1f750925 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -30,7 +30,13 @@ //----------------------------------------------------------------------------- #include // for floor #include + +#ifdef HAVE_SSTREAM +#include +#else #include +#endif + #include #include // for GCC 3.2 #include @@ -156,8 +162,12 @@ public : std::string getValue(void) const { +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else char buf[1024]; std::ostrstream os(buf, 1023); +#endif os << repValue; os << std::ends; return os.str(); @@ -165,7 +175,11 @@ public : void setValue(std::string _value) { +#ifdef HAVE_SSTREAM + std::istringstream is(_value); +#else std::istrstream is(_value.c_str()); +#endif is >> repValue; } @@ -191,8 +205,11 @@ void eoValueParam::setValue(std::string _value) repValue = true; return; } - +#ifdef HAVE_SSTREAM + std::istringstream is(_value); +#else std::istrstream is(_value.c_str()); +#endif is >> repValue; } @@ -202,8 +219,12 @@ template <> std::string eoValueParam >::getValue(void) const { // use own buffer as MSVC's buffer leaks! +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else char buff[1024]; std::ostrstream os(buff, 1024); +#endif os << repValue.first << ' ' << repValue.second << std::ends; return os.str(); } @@ -212,7 +233,11 @@ std::string eoValueParam >::getValue(void) const template <> void eoValueParam >::setValue(std::string _value) { +#ifdef HAVE_SSTREAM + std::istringstream is(_value); +#else std::istrstream is(_value.c_str()); +#endif is >> repValue.first; is >> repValue.second; } @@ -223,7 +248,11 @@ void eoValueParam >::setValue(std::string _value) template <> std::string eoValueParam > >::getValue(void) const { +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else std::ostrstream os; +#endif os << repValue.size() << ' '; for (unsigned i = 0; i < repValue.size(); ++i) { @@ -239,7 +268,11 @@ std::string eoValueParam > >::getValue(void) con template <> void eoValueParam > >::setValue(std::string _value) { +#ifdef HAVE_SSTREAM + std::istringstream is(_value); +#else std::istrstream is(_value.c_str()); +#endif unsigned i,j,sz; is >> sz; repValue.resize(sz); @@ -262,7 +295,11 @@ void eoValueParam > >::setValue(std::string _val template <> std::string eoValueParam >::getValue(void) const { +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else std::ostrstream os; +#endif os << repValue.size() << ' '; std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); os << std::ends; @@ -273,7 +310,11 @@ std::string eoValueParam >::getValue(void) const template <> void eoValueParam >::setValue(std::string _value) { +#ifdef HAVE_SSTREAM + std::istringstream is(_value); +#else std::istrstream is(_value.c_str()); +#endif unsigned sz; is >> sz; repValue.resize(sz); @@ -286,7 +327,11 @@ void eoValueParam >::setValue(std::string _value) template <> std::string eoValueParam >::getValue(void) const { +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else std::ostrstream os; +#endif os << repValue.size() << ' '; std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); os << std::ends; @@ -298,7 +343,11 @@ std::string eoValueParam >::getValue(void) cons template <> void eoValueParam >::setValue(std::string _value) { +#ifdef HAVE_SSTREAM + std::istringstream is(_value); +#else std::istrstream is(_value.c_str()); +#endif unsigned sz; is >> sz; repValue.resize(sz); diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index c002cfd66..68f593231 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -94,8 +94,12 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, } // now read arguments on command-line +#ifdef HAVE_SSTREAM + stringstream stream; +#else strstream stream; - +#endif + for (i = 1; i < _argc; ++i) { stream << _argv[i] << '\n'; diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 80ecb6fdb..4c06f2d54 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -62,12 +62,27 @@ public : Adds a \n before so it does not get mixed up with the rest of the stats that are written by the monitor it is probably used from. */ +#ifdef HAVE_SSTREAM void operator()(const eoPop& _pop) { - char buffer[1023]; // about one K of space per member - value() = "\n# ====== Pop dump =====\n"; - unsigned howMany=combien?combien:_pop.size(); - for (unsigned i = 0; i < howMany; ++i) + value() = "\n# ====== pop dump =====\n"; + unsigned howmany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howmany; ++i) + { + std::ostringstream os; + os << _pop[i] << std::endl << std::ends; + + // paranoid: + value() += os.str(); + } +} +#else +void operator()(const eoPop& _pop) +{ + char buffer[1023]; // about one k of space per member + value() = "\n# ====== pop dump =====\n"; + unsigned howmany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howmany; ++i) { std::ostrstream os(buffer, 1022); // leave space for emergency terminate os << _pop[i] << std::endl << std::ends; @@ -77,6 +92,8 @@ void operator()(const eoPop& _pop) value() += buffer; } } +#endif + private: unsigned combien; }; @@ -106,6 +123,21 @@ public : Adds a \n before so it does not get mixed up with the rest of the stats that are written by the monitor it is probably used from. */ +#ifdef HAVE_SSTREAM + void operator()(const std::vector& _pop) + { + value() = ""; // empty + unsigned howMany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howMany; ++i) + { + std::ostringstream os; // leave space for emergency terminate + os << *_pop[i] << std::endl << std::ends; + + // paranoid: + value() += os.str(); + } + } +#else void operator()(const std::vector& _pop) { char buffer[1023]; // about one K of space per member @@ -121,6 +153,7 @@ public : value() += buffer; } } +#endif private: unsigned combien; }; diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 647f3db03..e052a3416 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -4,7 +4,13 @@ #endif #include + +#ifdef HAVE_SSTREAM +#include +#else #include +#endif + #include "eoRealBounds.h" #include "eoRealVectorBounds.h" @@ -27,7 +33,11 @@ bool remove_leading(std::string & _s, const std::string _delim) double read_double(std::string _s) { +#ifdef HAVE_SSTREAM + std::istringstream is(_s); +#else std::istrstream is(_s.c_str()); +#endif double r; is >> r; return r; @@ -35,7 +45,11 @@ double read_double(std::string _s) int read_int(std::string _s) { +#ifdef HAVE_SSTREAM + std::istringstream is(_s); +#else std::istrstream is(_s.c_str()); +#endif int i; is >> i; return i; diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index baf57c7d8..e8eec0dd2 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -5,7 +5,12 @@ #include #include + +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include "eoState.h" #include "eoObject.h" @@ -126,9 +131,11 @@ void eoState::load(std::istream& is) removeComment(str, getCommentString()); fullstring += str + "\n"; } - +#ifdef HAVE_SSTREAM + istringstream the_stream(fullstring); +#else istrstream the_stream(fullstring.c_str(), fullstring.size()); - +#endif object->readFrom(the_stream); } } @@ -163,7 +170,11 @@ string eoState::createObjectName(eoObject* obj) { if (obj == 0) { +#ifdef HAVE_SSTREAM + ostringstream os; +#else ostrstream os; +#endif os << objectMap.size(); return os.str(); } @@ -175,7 +186,11 @@ string eoState::createObjectName(eoObject* obj) unsigned count = 1; while (it != objectMap.end()) { +#ifdef HAVE_SSTREAM + ostringstream os; +#else ostrstream os; +#endif os << obj->className().c_str() << count++ << ends; name = os.str(); diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp index 87759cb48..dd30b4b47 100644 --- a/eo/src/utils/eoUpdater.cpp +++ b/eo/src/utils/eoUpdater.cpp @@ -2,8 +2,11 @@ #pragma warning(disable:4786) #endif - +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include #include @@ -17,8 +20,12 @@ void eoTimedStateSaver::operator()(void) if (now >= last_time + interval) { last_time = now; - - ostrstream os; + +#ifdef HAVE_SSTREAM + ostringstream os; +#else + ostrstream os; +#endif os << prefix << (now - first_time) << '.' << extension << ends; state.save(os.str()); } @@ -26,7 +33,11 @@ void eoTimedStateSaver::operator()(void) void eoCountedStateSaver::doItNow(void) { - ostrstream os; +#ifdef HAVE_SSTREAM + ostringstream os; +#else + ostrstream os; +#endif os << prefix << counter << '.' << extension << ends; state.save(os.str()); } diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index e85fe19ab..23d1c8f80 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -176,10 +176,15 @@ void init(eoPop & _pop, unsigned _pSize) } for (unsigned i=0; i<_pSize; i++) { - char s[255]; +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else + char s[255]; std::ostrstream os(s, 254); +#endif + os << i << std::ends; - _pop[i] = Dummy(s); + _pop[i] = Dummy(os.str()); _pop[i].fitness(i); } } diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp index 612906a92..7c127c3bf 100644 --- a/eo/test/t-eoVirus.cpp +++ b/eo/test/t-eoVirus.cpp @@ -24,7 +24,6 @@ //----------------------------------------------------------------------------- #include // std::cout -#include // ostrstream, istrstream #include // general EO #include "../contrib/MGE/VirusOp.h" #include "../contrib/MGE/eoVirus.h" diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 220df5fae..7c14c6def 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -24,7 +24,13 @@ //----------------------------------------------------------------------------- #include // std::cout + +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif + #include // general EO #include // bitstring representation & operators #include @@ -56,11 +62,19 @@ void main_function() std::cout << "chrom: " << chrom << std::endl << "chrom2: " << chrom2 << std::endl; - + +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else char buff[1024]; std::ostrstream os(buff, 1024); +#endif os << chrom; +#ifdef HAVE_SSTREAM + std::istringstream is(os.str()); +#else std::istrstream is(os.str()); +#endif is >> chrom2; chrom.fitness(binary_value(chrom2)); std::cout << "\nTesting reading, writing\n"; From d250c9edf6fe94f4451ba8fbbe1449d42fdee8ec Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 28 Feb 2003 16:56:59 +0000 Subject: [PATCH 0933/2134] oops, forgot thisone --- eo/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/configure.in b/eo/configure.in index a728dd4f7..ed5513960 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -26,7 +26,7 @@ AC_CHECK_LIB(m, main) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(limits.h) -#AC_CXX_HAVE_SSTREAM +AC_CXX_HAVE_SSTREAM dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST From c2bad596f2d06fe90586721f9b3a3fca921dfeb4 Mon Sep 17 00:00:00 2001 From: okoenig Date: Fri, 28 Feb 2003 17:47:24 +0000 Subject: [PATCH 0934/2134] This Makefile.am was missing; all it does is adding the *.h and Readme files to distribution --- eo/src/do/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 eo/src/do/Makefile.am diff --git a/eo/src/do/Makefile.am b/eo/src/do/Makefile.am new file mode 100644 index 000000000..998e07824 --- /dev/null +++ b/eo/src/do/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = *.h Readme + +CLEANFILES = *~ From adab0958408647b78852c792d5f2a6f6bc6d9bb2 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 2 Mar 2003 11:16:33 +0000 Subject: [PATCH 0935/2134] added include file --- eo/src/utils/eoHowMany.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index ac5d0e6fe..696a701e1 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -63,6 +63,11 @@ * * It is an eoPersistent because we need to be able to use eoParamValue */ +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif class eoHowMany : public eoPersistent { From e5c83ac2e815fe13de135552711d8d1e2488f6e6 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 2 Mar 2003 11:26:45 +0000 Subject: [PATCH 0936/2134] added typenames for pop::iterator --- eo/src/eoMGGReplacement.h | 2 +- eo/src/eoReduceSplit.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/eoMGGReplacement.h b/eo/src/eoMGGReplacement.h index 89adff148..c436f4ce3 100644 --- a/eo/src/eoMGGReplacement.h +++ b/eo/src/eoMGGReplacement.h @@ -73,7 +73,7 @@ public: throw std::runtime_error("Not enough parents killed in eoMGGReplacement"); // select best offspring - eoPop::iterator it = _offspring.it_best_element(); + typename eoPop::iterator it = _offspring.it_best_element(); // add to parents _parents.push_back(*it); // remove from offspring diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index fcc4cc7e9..79a4637a0 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -107,7 +107,7 @@ public: _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); + typename eoPop::iterator it = _newgen.it_worse_element(); if (returnEliminated) _eliminated.push_back(*it); _newgen.erase(it); @@ -184,7 +184,7 @@ public: for (unsigned i=0; i::iterator it = _newgen.begin()+loser; + typename eoPop::iterator it = _newgen.begin()+loser; if (returnEliminated) _eliminated.push_back(*it); _newgen.erase(it); @@ -235,7 +235,7 @@ public: _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i::iterator it = inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size); + typename eoPop::iterator it = inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size); if (returnEliminated) _eliminated.push_back(*it); _newgen.erase(it); @@ -288,7 +288,7 @@ public: _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i<_eliminated.size(); i++) { - eoPop::iterator it = inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate); + typename eoPop::iterator it = inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate); if (returnEliminated) _eliminated.push_back(*it); _newgen.erase(it); From 0441872bea2c37a589fbb6ce7ceb4e2163356c0e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 2 Mar 2003 11:29:01 +0000 Subject: [PATCH 0937/2134] decorated copy with std:: specifier --- eo/src/eoDetSelect.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index aed551563..312053cbb 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -65,14 +65,14 @@ class eoDetSelect : public eoSelect { for (unsigned i=0; i Date: Sun, 2 Mar 2003 11:35:43 +0000 Subject: [PATCH 0938/2134] decorated sort and max with std:: specifier --- eo/src/eoNDSorting.h | 6 +++--- eo/src/eoPerf2Worth.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index fedbf8682..67db237e2 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -141,7 +141,7 @@ private : sort1[i] = i; } - sort(sort1.begin(), sort1.end(), Sorter(_pop)); + std::sort(sort1.begin(), sort1.end(), Sorter(_pop)); // Ok, now the meat of the algorithm @@ -150,7 +150,7 @@ private : double max1 = -1e+20; for (i = 0; i < _pop.size(); ++i) { - max1 = max(max1, _pop[i].fitness()[1]); + max1 = std::max(max1, _pop[i].fitness()[1]); } max1 = max1 + 1.0; // add a bit to it so that it is a real upperbound @@ -452,7 +452,7 @@ class eoNDSorting_II : public eoNDSorting performance[i].second = i; } - sort(performance.begin(), performance.end(), compare_nodes()); // a lambda operator would've been nice here + std::sort(performance.begin(), performance.end(), compare_nodes()); // a lambda operator would've been nice here std::vector nc(niche_count.size(), 0.0); diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index 4138817a1..ec0df6622 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -164,7 +164,7 @@ class eoPerf2WorthCached : public eoPerf2Worth indices[i] = i; } - sort(indices.begin(), indices.end(), eoPerf2Worth::compare_worth(value())); + std::sort(indices.begin(), indices.end(), eoPerf2Worth::compare_worth(value())); eoPop tmp_pop; tmp_pop.resize(_pop.size()); From cde5b5d22bd809a74ce23f173481dce419af546c Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 18 Mar 2003 09:35:46 +0000 Subject: [PATCH 0939/2134] hi --- eo/src/pyeo/Makefile | 4 ++-- eo/src/pyeo/PyEO.cpp | 18 ++++++++++++++++-- eo/src/pyeo/PyEO.h | 8 ++++---- eo/src/pyeo/pickle.h | 18 +++++++++++++++--- eo/src/pyeo/random_numbers.cpp | 13 +++++++++++++ 5 files changed, 50 insertions(+), 11 deletions(-) diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 3e1799373..df0e09cb2 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -25,7 +25,7 @@ # CXX = g++ #-3.2 -CXXFLAGS = #-g #-DNDEBUG +CXXFLAGS = -DHAVE_SSTREAM#-g #-DNDEBUG CPPFLAGS = -Wall -O2 #-g #-O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c @@ -41,7 +41,7 @@ OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ all: PyEO/PyEO.so clean: - rm *.so *.o test/*.pyc + rm PyEO/*.so *.o test/*.pyc PyEO/PyEO.so: $(OBJECTS) $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index ce8c6164a..a22c60365 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -21,7 +21,13 @@ #include #include "PyEO.h" +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif +using namespace std; // static member, needs to be instantiated somewhere std::vector PyFitness::objective_info; @@ -76,7 +82,7 @@ struct pyPop_pickle_suite : boost::python::pickle_suite for (unsigned i = 0; i != _pop.size(); ++i) entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); - return make_tuple(object(_pop.size()), entries); + return boost::python::make_tuple(object(_pop.size()), entries); } static void setstate( eoPop& _pop, boost::python::tuple pickled) @@ -85,7 +91,9 @@ struct pyPop_pickle_suite : boost::python::pickle_suite boost::python::list entries = list(pickled[1]); _pop.resize(sz); for (unsigned i = 0; i != _pop.size(); ++i) - PyEO_pickle_suite::setstate(_pop[i], tuple(entries[i]) ); + { + PyEO_pickle_suite::setstate(_pop[i], boost::python::tuple(entries[i]) ); + } } }; @@ -93,11 +101,17 @@ struct pyPop_pickle_suite : boost::python::pickle_suite template boost::python::str to_string(T& _p) { +#ifdef HAVE_SSTREAM + std::ostringstream os; + _p.printOn(os); + return str(os.str().c_str()); +#else std::ostrstream os; _p.printOn(os); os << ends; std::string s(os.str()); return str(s.c_str()); +#endif } void pop_sort(eoPop& pop) { pop.sort(); } diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index 8ab69ede6..abca84b6f 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -101,9 +101,9 @@ class PyFitness : public boost::python::object return other.operator<(*this); } - //void printOn(std::ostream& os) const { const object& o = *this; os << o; } - //friend std::ostream& operator<<(std::ostream& os, const PyFitness& p) { p.printOn(os); return os; } - //friend std::istream& operator>>(std::istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } + void printOn(std::ostream& os) const { const object& o = *this; boost::python::api::operator<<(os,o); } + friend std::ostream& operator<<(std::ostream& os, const PyFitness& p) { p.printOn(os); return os; } + friend std::istream& operator>>(std::istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } }; struct PyEO : public EO< PyFitness > @@ -117,7 +117,7 @@ struct PyEO : public EO< PyFitness > void setGenome(object g) { genome = g; } object genome; - std::string to_std::string() const + std::string to_string() const { std::string result; result += extract(str(getFitness())); diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index d6e20d138..4dba587b0 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -22,7 +22,11 @@ #define PICKLE_h #include +#ifdef HAVE_SSTREAM +#include +#else #include +#endif /** Implements pickle support for eoPersistent derivatives */ @@ -30,9 +34,13 @@ template struct T_pickle_suite : boost::python::pickle_suite { static - std::string print_to_std::string(const T& t) + std::string print_to_string(const T& t) { +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else std::ostrstream os; +#endif t.printOn(os); os << std::ends; return os.str(); @@ -41,7 +49,7 @@ struct T_pickle_suite : boost::python::pickle_suite static boost::python::tuple getstate(const T& t) { - std::string s = print_to_std::string(t); + std::string s = print_to_string(t); return boost::python::make_tuple( boost::python::str(s)); } @@ -49,7 +57,11 @@ struct T_pickle_suite : boost::python::pickle_suite void setstate(T& t, boost::python::tuple pickled) { std::string s = extract(pickled[0]); +#ifdef HAVE_SSTREAM + std::istringstream is(s); +#else std::istrstream is(s.c_str(), s.size()); +#endif t.readFrom(is); } }; @@ -61,7 +73,7 @@ template boost::python::class_& pickle(boost::python::class_& c) { return c.def_pickle(T_pickle_suite()) - .def("__str__", T_pickle_suite::print_to_std::string); + .def("__str__", T_pickle_suite::print_to_string); } #endif diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp index c2cbd993f..77ebcdf20 100644 --- a/eo/src/pyeo/random_numbers.cpp +++ b/eo/src/pyeo/random_numbers.cpp @@ -21,7 +21,12 @@ #include #include +#ifdef HAVE_SSTREAM +#include +#else #include +#endif + #include using namespace boost::python; @@ -36,7 +41,11 @@ double normal(eoRng& rng) { return rng.normal(); } std::string rng_to_string(const eoRng& _rng) { +#ifdef HAVE_SSTREAM + std::ostringstream os; +#else std::ostrstream os; +#endif _rng.printOn(os); os << std::ends; return os.str(); @@ -44,7 +53,11 @@ std::string rng_to_string(const eoRng& _rng) void rng_from_string(eoRng& _rng, std::string s) { +#ifdef HAVE_SSTREAM + std::istringstream is(s); +#else std::istrstream is(s.c_str(), s.size()); +#endif _rng.readFrom(is); } From a597ec6f8a82fa95ed9a9b651653fd89790b03a7 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 18 Mar 2003 09:40:36 +0000 Subject: [PATCH 0940/2134] excluded gcc>3 from check --- eo/src/utils/compatibility.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index 29481b8fe..af20a7920 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -31,12 +31,14 @@ #include #include -#ifdef __GNUC__ +#ifdef __GNUC__ +#if __GNUC__ < 3 // check for stdlibc++v3 which does have ios_base #ifndef _CPP_BITS_IOSBASE_H typedef ios ios_base; // not currently defined in GCC #endif #endif +#endif #if defined(_MSC_VER) && (_MSC_VER < 1300) /* From 01de9c47632ede7734082f0c623fa6c61456e9f8 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 18 Mar 2003 16:35:27 +0000 Subject: [PATCH 0941/2134] *** empty log message *** --- eo/src/pyeo/Makefile | 4 +-- eo/src/pyeo/PyEO.cpp | 57 ++++++++++++++++++++++--------- eo/src/pyeo/PyEO.h | 37 +++++++++++--------- eo/src/pyeo/abstract1.cpp | 2 ++ eo/src/pyeo/algos.cpp | 2 ++ eo/src/pyeo/breeders.cpp | 2 ++ eo/src/pyeo/continuators.cpp | 2 ++ eo/src/pyeo/geneticOps.cpp | 2 ++ eo/src/pyeo/mergers.cpp | 2 ++ eo/src/pyeo/monitors.cpp | 2 ++ eo/src/pyeo/perf2worth.cpp | 2 ++ eo/src/pyeo/pickle.h | 2 +- eo/src/pyeo/random_numbers.cpp | 2 ++ eo/src/pyeo/reduce.cpp | 2 ++ eo/src/pyeo/replacement.cpp | 2 ++ eo/src/pyeo/selectOne.cpp | 2 ++ eo/src/pyeo/selectors.cpp | 2 ++ eo/src/pyeo/statistics.cpp | 2 ++ eo/src/pyeo/test/test_breeders.py | 4 +-- eo/src/pyeo/valueParam.cpp | 1 - 20 files changed, 93 insertions(+), 40 deletions(-) diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index df0e09cb2..7f48a8952 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -30,7 +30,7 @@ CPPFLAGS = -Wall -O2 #-g #-O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -INC=-I/usr/include/python2.2 -I.. -ftemplate-depth-50 -I/usr/include/stlport +INC=-I/usr/include/python2.2 -I.. -ftemplate-depth-50 #-I/usr/include/stlport OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ random_numbers.o geneticOps.o selectOne.o continuators.o\ @@ -44,7 +44,7 @@ clean: rm PyEO/*.so *.o test/*.pyc PyEO/PyEO.so: $(OBJECTS) - $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared -lstlport + $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared #-lstlport eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index a22c60365..6a0a13940 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -18,16 +18,37 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include #include "PyEO.h" +#include + #ifdef HAVE_SSTREAM #include #else #include #endif +typedef eoPop::iterator PopIt; +typedef eoPop::const_iterator cPopIt; + +PopIt operator+(PopIt it, size_t a) +{ + return it + ptrdiff_t(a); +} +cPopIt operator+(cPopIt it, size_t a) +{ + return it + ptrdiff_t(a); +} +PopIt operator-(PopIt it, size_t a) +{ + return it - ptrdiff_t(a); +} +cPopIt operator-(cPopIt it, size_t a) +{ + return it - ptrdiff_t(a); +} + using namespace std; +//using namespace boost::python; // static member, needs to be instantiated somewhere std::vector PyFitness::objective_info; @@ -82,13 +103,13 @@ struct pyPop_pickle_suite : boost::python::pickle_suite for (unsigned i = 0; i != _pop.size(); ++i) entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); - return boost::python::make_tuple(object(_pop.size()), entries); + return boost::python::make_tuple(boost::python::object(_pop.size()), entries); } static void setstate( eoPop& _pop, boost::python::tuple pickled) { - int sz = extract(pickled[0]); - boost::python::list entries = list(pickled[1]); + int sz = boost::python::extract(pickled[0]); + boost::python::list entries = boost::python::list(pickled[1]); _pop.resize(sz); for (unsigned i = 0; i != _pop.size(); ++i) { @@ -104,13 +125,13 @@ boost::python::str to_string(T& _p) #ifdef HAVE_SSTREAM std::ostringstream os; _p.printOn(os); - return str(os.str().c_str()); + return boost::python::str(os.str().c_str()); #else std::ostrstream os; _p.printOn(os); os << ends; std::string s(os.str()); - return str(s.c_str()); + return boost::python::str(s.c_str()); #endif } @@ -122,9 +143,9 @@ void translate_index_error(index_error const& e) PyErr_SetString(PyExc_IndexError, e.what.c_str()); } -PyEO& pop_getitem(eoPop& pop, object key) +PyEO& pop_getitem(eoPop& pop, boost::python::object key) { - extract x(key); + boost::python::extract x(key); if (!x.check()) throw index_error("Slicing not allowed"); @@ -132,15 +153,17 @@ PyEO& pop_getitem(eoPop& pop, object key) if (static_cast(i) >= pop.size()) { + cerr << "throwing" << endl; throw index_error("Index out of bounds"); } - + cerr << "indexing " << i << endl; + return pop[i]; } -void pop_setitem(eoPop& pop, object key, PyEO& value) -{ - extract x(key); +void pop_setitem(eoPop& pop, boost::python::object key, PyEO& value) +{ + boost::python::extract x(key); if (!x.check()) throw index_error("Slicing not allowed"); @@ -175,9 +198,11 @@ extern void statistics(); BOOST_PYTHON_MODULE(PyEO) { - register_exception_translator(&translate_index_error); + using namespace boost::python; + + boost::python::register_exception_translator(&translate_index_error); - class_("EO") + boost::python::class_("EO") .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) .def_pickle(PyEO_pickle_suite()) @@ -186,7 +211,7 @@ BOOST_PYTHON_MODULE(PyEO) .def("__str__", &PyEO::to_string) ; - class_ >("eoPop", init<>() ) + boost::python::class_ >("eoPop", init<>() ) .def( init< unsigned, eoInit& >()[with_custodian_and_ward<1,3>()] ) .def("append", &eoPop::append) .def("__str__", to_string >) diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index abca84b6f..6cf3c003c 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -21,15 +21,18 @@ #ifndef PYEO_H #define PYEO_H -#include #include #include +#include #include -using namespace boost::python; - -struct index_error { index_error(std::string w) : what(w) {}; std::string what; }; +#include +struct index_error : public std::exception { + index_error(std::string w) : what(w) {}; + virtual ~index_error() throw() {} + std::string what; +}; class PyFitness : public boost::python::object { @@ -37,10 +40,10 @@ class PyFitness : public boost::python::object typedef PyFitness fitness_traits; // it's its own traits class :-) - PyFitness() : object() {} + PyFitness() : boost::python::object() {} template - PyFitness(const T& o) : object(o) {} + PyFitness(const T& o) : boost::python::object(o) {} static unsigned nObjectives() { return objective_info.size(); } static double tol() { return 1e-6; } @@ -63,7 +66,7 @@ class PyFitness : public boost::python::object double operator[](int i) const { - extract x(object::operator[](i)); + boost::python::extract x(object::operator[](i)); if (!x.check()) throw std::runtime_error("PyFitness: does not contain doubles"); @@ -101,28 +104,28 @@ class PyFitness : public boost::python::object return other.operator<(*this); } - void printOn(std::ostream& os) const { const object& o = *this; boost::python::api::operator<<(os,o); } + void printOn(std::ostream& os) const { const boost::python::object& o = *this; boost::python::api::operator<<(os,o); } friend std::ostream& operator<<(std::ostream& os, const PyFitness& p) { p.printOn(os); return os; } - friend std::istream& operator>>(std::istream& is, PyFitness& p) { object o; is >> o; p = o; return is; } + friend std::istream& operator>>(std::istream& is, PyFitness& p) { boost::python::object o; is >> o; p = o; return is; } }; struct PyEO : public EO< PyFitness > { typedef PyFitness Fitness; - object getFitness() const { return invalid()? Fitness(): fitness(); } - void setFitness(object f) { if (f == Fitness()) invalidate(); else fitness(f); } + boost::python::object getFitness() const { return invalid()? Fitness(): fitness(); } + void setFitness(boost::python::object f) { if (f == Fitness()) invalidate(); else fitness(f); } - object getGenome() const { return genome; } - void setGenome(object g) { genome = g; } - object genome; + boost::python::object getGenome() const { return genome; } + void setGenome(boost::python::object g) { genome = g; } + boost::python::object genome; std::string to_string() const { std::string result; - result += extract(str(getFitness())); + result += boost::python::extract(boost::python::str(getFitness())); result += ' '; - result += extract(str(genome)); + result += boost::python::extract(boost::python::str(genome)); return result; } @@ -140,7 +143,7 @@ struct PyEO_pickle_suite : boost::python::pickle_suite static boost::python::tuple getstate(const PyEO& _eo) { - return make_tuple(_eo.getFitness(), _eo.genome); + return boost::python::make_tuple(_eo.getFitness(), _eo.genome); } static void setstate(PyEO& _eo, boost::python::tuple pickled) diff --git a/eo/src/pyeo/abstract1.cpp b/eo/src/pyeo/abstract1.cpp index 5f6c07131..8a443a04c 100644 --- a/eo/src/pyeo/abstract1.cpp +++ b/eo/src/pyeo/abstract1.cpp @@ -27,6 +27,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + void abstract1() { /* Abstract Classes: overrideble from python */ diff --git a/eo/src/pyeo/algos.cpp b/eo/src/pyeo/algos.cpp index b8c69558d..12feaf196 100644 --- a/eo/src/pyeo/algos.cpp +++ b/eo/src/pyeo/algos.cpp @@ -26,6 +26,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + void algos() { def_abstract_functor >("eoAlgo"); diff --git a/eo/src/pyeo/breeders.cpp b/eo/src/pyeo/breeders.cpp index 4610e947d..30cf0994c 100644 --- a/eo/src/pyeo/breeders.cpp +++ b/eo/src/pyeo/breeders.cpp @@ -25,6 +25,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + #define DEF3(x, i1, i2) class_, bases > >(#x, \ init()[with_custodian_and_ward<1,2,with_custodian_and_ward<1,3> >()])\ .def("__call__", &eoBreed::operator()) diff --git a/eo/src/pyeo/continuators.cpp b/eo/src/pyeo/continuators.cpp index 974f5d5f5..4f1a76c50 100644 --- a/eo/src/pyeo/continuators.cpp +++ b/eo/src/pyeo/continuators.cpp @@ -29,6 +29,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + #define DEF(x) class_, bases > >(#x).def("__call__", &eoContinue::operator()) #define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) #define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) diff --git a/eo/src/pyeo/geneticOps.cpp b/eo/src/pyeo/geneticOps.cpp index 777a0f5c2..2665837b2 100644 --- a/eo/src/pyeo/geneticOps.cpp +++ b/eo/src/pyeo/geneticOps.cpp @@ -27,6 +27,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + class GenOpWrapper : public eoGenOp { public: diff --git a/eo/src/pyeo/mergers.cpp b/eo/src/pyeo/mergers.cpp index 23f24b5a1..fd2b34110 100644 --- a/eo/src/pyeo/mergers.cpp +++ b/eo/src/pyeo/mergers.cpp @@ -22,6 +22,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + #define DEF(x) class_, bases > >(#x).def("__call__", &eoMerge::operator()) #define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoMerge::operator()) #define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoMerge::operator()) diff --git a/eo/src/pyeo/monitors.cpp b/eo/src/pyeo/monitors.cpp index 0b0e17344..8215128d7 100644 --- a/eo/src/pyeo/monitors.cpp +++ b/eo/src/pyeo/monitors.cpp @@ -22,6 +22,8 @@ #include #include "PyEO.h" +using namespace boost::python; + class MonitorWrapper : public eoMonitor { public: diff --git a/eo/src/pyeo/perf2worth.cpp b/eo/src/pyeo/perf2worth.cpp index 6bf216148..3ca13996d 100644 --- a/eo/src/pyeo/perf2worth.cpp +++ b/eo/src/pyeo/perf2worth.cpp @@ -21,6 +21,8 @@ #include "PyEO.h" +using namespace boost::python; + struct Perf2WorthWrapper : public eoPerf2Worth { PyObject* self; diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index 4dba587b0..3d0bc4e04 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -56,7 +56,7 @@ struct T_pickle_suite : boost::python::pickle_suite static void setstate(T& t, boost::python::tuple pickled) { - std::string s = extract(pickled[0]); + std::string s = boost::python::extract(pickled[0]); #ifdef HAVE_SSTREAM std::istringstream is(s); #else diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp index 77ebcdf20..a496a371f 100644 --- a/eo/src/pyeo/random_numbers.cpp +++ b/eo/src/pyeo/random_numbers.cpp @@ -21,6 +21,8 @@ #include #include +using namespace boost::python; + #ifdef HAVE_SSTREAM #include #else diff --git a/eo/src/pyeo/reduce.cpp b/eo/src/pyeo/reduce.cpp index fa37e827f..a23c15cd5 100644 --- a/eo/src/pyeo/reduce.cpp +++ b/eo/src/pyeo/reduce.cpp @@ -22,6 +22,8 @@ #include "PyEO.h" +using namespace boost::python; + // unfortunately have to define it specially class eoReduceWrapper : public eoReduce { diff --git a/eo/src/pyeo/replacement.cpp b/eo/src/pyeo/replacement.cpp index ecfcf2847..9867a113f 100644 --- a/eo/src/pyeo/replacement.cpp +++ b/eo/src/pyeo/replacement.cpp @@ -27,6 +27,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + #define DEF(x) class_, bases > >(#x).def("__call__", &eoReplacement::operator()) #define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) #define DEF3(x, i1, i2) class_, bases > >(#x, \ diff --git a/eo/src/pyeo/selectOne.cpp b/eo/src/pyeo/selectOne.cpp index 877f05953..554a6e36a 100644 --- a/eo/src/pyeo/selectOne.cpp +++ b/eo/src/pyeo/selectOne.cpp @@ -29,6 +29,8 @@ #include "pickle.h" #include "def_abstract_functor.h" +using namespace boost::python; + class eoSelectOneWrapper : public eoSelectOne { public: diff --git a/eo/src/pyeo/selectors.cpp b/eo/src/pyeo/selectors.cpp index 4d5cfae79..ba8d405d6 100644 --- a/eo/src/pyeo/selectors.cpp +++ b/eo/src/pyeo/selectors.cpp @@ -29,6 +29,8 @@ #include "PyEO.h" #include "def_abstract_functor.h" +using namespace boost::python; + #define DEF(x) class_, bases > >(#x).def("__call__", &eoSelect::operator()) #define DEF2(x, i1) class_, bases > >(#x, init()[WC1] ).def("__call__", &eoSelect::operator()) #define DEF3(x, i1, i2) class_, bases > >(#x, init()[WC1] ).def("__call__", &eoSelect::operator()) diff --git a/eo/src/pyeo/statistics.cpp b/eo/src/pyeo/statistics.cpp index 8dacf46e7..9c436ba52 100644 --- a/eo/src/pyeo/statistics.cpp +++ b/eo/src/pyeo/statistics.cpp @@ -3,6 +3,8 @@ #include "PyEO.h" #include "valueParam.h" +using namespace boost::python; + class StatBaseWrapper : public eoStatBase { public: diff --git a/eo/src/pyeo/test/test_breeders.py b/eo/src/pyeo/test/test_breeders.py index fb8f19b74..5d3fc7601 100644 --- a/eo/src/pyeo/test/test_breeders.py +++ b/eo/src/pyeo/test/test_breeders.py @@ -7,8 +7,8 @@ class TestBreeders(unittest.TestCase): pop = eoPop(50, Init(20)) evaluate = EvalFunc() + print 'HERE' for indy in pop: evaluate(indy) - newpop = eoPop(); breed(pop,newpop) @@ -18,13 +18,11 @@ class TestBreeders(unittest.TestCase): print newpop.best() def testGeneralBreeder(self): - seq = eoSequentialOp(); seq.add(Crossover(), 0.7) seq.add(Mutate(), 0.1) breed = eoGeneralBreeder(eoDetTournamentSelect(3), seq) - self.runtest(breed) def suite(): diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index 86fd4facf..a9f5f310f 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -25,7 +25,6 @@ #include "valueParam.h" #include - using namespace boost::python; class ParamWrapper : public eoParam From 19fe39105678ae3590e0f174fead7031f091e648 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 18 Mar 2003 16:52:31 +0000 Subject: [PATCH 0942/2134] fixed a bug reported on sourceforge --- eo/src/ga/make_ga.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index 8cf53c0fb..4c63c22c7 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -65,7 +65,7 @@ eoGenOp >& make_op(eoParser& _parser, eoState& _stat // init pop eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); -eoPop >& make_ga(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); // the continue's eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); From 9512291e3e0c9e376b7ec430b430812bc64ea9e2 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 18 Mar 2003 16:57:17 +0000 Subject: [PATCH 0943/2134] added operator> --- eo/src/eoVector.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index bc95bf79c..9211006c8 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -22,7 +22,7 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2003-02-27 19:25:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.14 2003-02-27 19:25:47 okoenig Exp $ $Author: okoenig $ + CVS Info: $Date: 2003-03-18 16:57:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.15 2003-03-18 16:57:17 maartenkeijzer Exp $ $Author: maartenkeijzer $ */ //----------------------------------------------------------------------------- @@ -117,5 +117,10 @@ bool operator<(const eoVector& _eo1, const eoVector +bool operator>(const eoVector& _eo1, const eoVector& _eo2) +{ + return _eo1.operator>(_eo2); +} #endif From 380d4eca0b3daa8c46c318ec97f006c5ce837367 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 19 Mar 2003 08:53:59 +0000 Subject: [PATCH 0944/2134] removed comment in PyEO.cpp --- eo/src/pyeo/Makefile | 2 +- eo/src/pyeo/PyEO.cpp | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 7f48a8952..11587b13f 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -30,7 +30,7 @@ CPPFLAGS = -Wall -O2 #-g #-O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -INC=-I/usr/include/python2.2 -I.. -ftemplate-depth-50 #-I/usr/include/stlport +INC=-I/usr/include/python2.2 -I/home/mkeijzer/src/boost -I.. -ftemplate-depth-50 #-I/usr/include/stlport OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ random_numbers.o geneticOps.o selectOne.o continuators.o\ diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index 6a0a13940..9ccd0c9a9 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -27,25 +27,6 @@ #include #endif -typedef eoPop::iterator PopIt; -typedef eoPop::const_iterator cPopIt; - -PopIt operator+(PopIt it, size_t a) -{ - return it + ptrdiff_t(a); -} -cPopIt operator+(cPopIt it, size_t a) -{ - return it + ptrdiff_t(a); -} -PopIt operator-(PopIt it, size_t a) -{ - return it - ptrdiff_t(a); -} -cPopIt operator-(cPopIt it, size_t a) -{ - return it - ptrdiff_t(a); -} using namespace std; //using namespace boost::python; @@ -153,11 +134,8 @@ PyEO& pop_getitem(eoPop& pop, boost::python::object key) if (static_cast(i) >= pop.size()) { - cerr << "throwing" << endl; throw index_error("Index out of bounds"); } - cerr << "indexing " << i << endl; - return pop[i]; } From 95d3c19211519d546f2b11ee2f84f46aa9f53dca Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 19 Mar 2003 10:16:56 +0000 Subject: [PATCH 0945/2134] Added pickling support for ValueParams --- eo/src/pyeo/PyEO/__init__.py | 8 ++++---- eo/src/pyeo/valueParam.cpp | 22 +++++++++++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/eo/src/pyeo/PyEO/__init__.py b/eo/src/pyeo/PyEO/__init__.py index 4e5e7d0e2..cc6795425 100644 --- a/eo/src/pyeo/PyEO/__init__.py +++ b/eo/src/pyeo/PyEO/__init__.py @@ -62,15 +62,15 @@ def SeperatedVolumeMonitor(eoMonitor): def __call__(self): pass -class eoStat(eoStatBase, eoValueParamPy): +class eoStat(eoStatBase, eoValueParam): def __init__(self): eoStatBase.__init__(self) - eoValueParamPy.__init__(self) + eoValueParam.__init__(self) -class eoSortedStat(eoSortedStatBase, eoValueParamPy): +class eoSortedStat(eoSortedStatBase, eoValueParam): def __init__(self): eoSortedStatBase.__init__(self) - eoValueParamPy.__init__(self) + eoValueParam.__init__(self) class eoAverageStat(eoStat): def __call__(self, pop): diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index a9f5f310f..ce8e4f801 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -52,6 +52,21 @@ public: }; +template +struct ValueParam_pickle_suite : boost::python::pickle_suite +{ + static + boost::python::tuple getstate(const eoValueParam& _param) + { + return make_tuple(boost::python::str(_param.getValue())); + } + static + void setstate(eoValueParam& _param, boost::python::tuple pickled) + { + std::string s = extract(pickled[0]); + _param.setValue(s); + } +}; template U getv(const eoValueParam& v) { return v.value(); } @@ -127,7 +142,8 @@ void define_valueParam(std::string prefix) .def("setValueAsString", &eoValueParam::setValue) .def("getValue", getv) .def("setValue", setv) - //.add_property("value", getv, setv) + .add_property("value", getv, setv) + .def_pickle(ValueParam_pickle_suite()) ; } @@ -149,11 +165,11 @@ void valueParam() define_valueParam, numeric::array >("Vec"); define_valueParam< std::pair, tuple >("Pair"); - class_ >("eoValueParamPy", init<>()) + class_ >("eoValueParam", init<>()) //.def(init()) //.def(init()) //.def(init()) - //.def(init()) + .def(init()) .def("getValueAsString", &ValueParam::getValue) .def("__str__", &ValueParam::getValue) .def("setValueAsString", &ValueParam::setValue) From 27f9ae089461338d671021075a9d4b0ab04426d4 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 19 Mar 2003 10:47:08 +0000 Subject: [PATCH 0946/2134] finished pickling support for valueParam --- eo/src/pyeo/test/test_pickling.py | 31 +++++++++++++++++++++++++++++++ eo/src/pyeo/valueParam.cpp | 21 +++++++++++++++++---- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/eo/src/pyeo/test/test_pickling.py b/eo/src/pyeo/test/test_pickling.py index fcaf0553c..dbe36bc2c 100644 --- a/eo/src/pyeo/test/test_pickling.py +++ b/eo/src/pyeo/test/test_pickling.py @@ -97,6 +97,37 @@ class TestPickling(unittest.TestCase): b = rng2.rand() self.failUnlessEqual(a,b) + def vParam(self,v): + + filename = tempfile.mktemp() + file = open(filename,'wb') + pickler = cPickle.Pickler(file) + + pickler.dump(v) + del pickler + file.close() + file = open(filename) + + unpickler = cPickle.Unpickler(file) + + v2 = unpickler.load(); + + self.failUnlessEqual(v.value, v2.value) + + def testValueParam(self): + import Numeric + + self.vParam(eoValueParamInt(42,'int')) + self.vParam(eoValueParamFloat(4.2,'float')) + + v = eoValueParamVec() + v.value = Numeric.arange(10) + self.vParam(v) + + v = eoValueParamPair() + v.value = (0.3,0.5) + self.vParam(v) + if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index ce8e4f801..1e201770f 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -58,13 +58,27 @@ struct ValueParam_pickle_suite : boost::python::pickle_suite static boost::python::tuple getstate(const eoValueParam& _param) { - return make_tuple(boost::python::str(_param.getValue())); + str v(_param.getValue()); + str d(_param.description()); + str def(_param.defValue()); + str l(_param.longName()); + object s(_param.shortName()); + object r(_param.required()); + return make_tuple(v,d,def,l,s,r); } static void setstate(eoValueParam& _param, boost::python::tuple pickled) { - std::string s = extract(pickled[0]); - _param.setValue(s); + std::string v = extract(pickled[0]); + std::string d = extract(pickled[1]); + std::string def = extract(pickled[2]); + std::string l = extract(pickled[3]); + char s = extract(pickled[4]); + bool r = extract(pickled[5]); + + _param = eoValueParam(T(), l, d, s, r); + _param.defValue(d); + _param.setValue(v); } }; @@ -175,6 +189,5 @@ void valueParam() .def("setValueAsString", &ValueParam::setValue) .add_property("object", &ValueParam::getObj, &ValueParam::setObj) ; - } From b15d1cef39bd57a0138d2915c84f2eac3c7eeb10 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Thu, 20 Mar 2003 19:49:32 +0000 Subject: [PATCH 0947/2134] replace \0 with std::ends --- eo/src/utils/eoGnuplot1DMonitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 05af81d51..9bc9261df 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -119,8 +119,8 @@ inline void eoGnuplot1DMonitor::FirstPlot() if (i Date: Thu, 20 Mar 2003 20:00:38 +0000 Subject: [PATCH 0948/2134] eliminated gprop from the build until someone makes sure it builds under gcc-3.2 --- eo/app/Makefile.am | 2 +- eo/app/gprop/gprop.cpp | 1 + eo/configure.in | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 39553c1c7..650368343 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -SUBDIRS = mastermind gpsymreg gprop +SUBDIRS = mastermind gpsymreg ############################################################################### diff --git a/eo/app/gprop/gprop.cpp b/eo/app/gprop/gprop.cpp index dc17379a0..7758ec35b 100644 --- a/eo/app/gprop/gprop.cpp +++ b/eo/app/gprop/gprop.cpp @@ -1,6 +1,7 @@ //----------------------------------------------------------------------------- // gprop //----------------------------------------------------------------------------- +using namespace std; #include // EXIT_SUCCESS EXIT_FAILURE #include // exception diff --git a/eo/configure.in b/eo/configure.in index ed5513960..84f16aa9b 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -36,5 +36,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile src/do/Makefile) - +AC_OUTPUT(doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/mastermind/Makefile app/gpsymreg/Makefile src/do/Makefile) +#app/gprop/Makefile is in the sinbin From eaabc7ae3b0f8c861be49cf80013ee2f680d01a9 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 21 Mar 2003 02:39:09 +0000 Subject: [PATCH 0949/2134] fixed (?) some problems with stringstreams and std::ends --- eo/src/eoVariableLengthCrossover.h | 9 +++++++- eo/src/eoVariableLengthMutation.h | 10 ++++++-- eo/src/pyeo/random_numbers.cpp | 17 ++++++++++++++ eo/src/pyeo/test/test_pickling.py | 37 ++---------------------------- eo/src/utils/eoFileSnapshot.h | 3 ++- eo/src/utils/eoGnuplot.h | 5 ++-- eo/src/utils/eoGnuplot1DMonitor.h | 2 +- eo/src/utils/eoHowMany.h | 4 ++-- eo/src/utils/eoParam.h | 14 ++++++++--- eo/src/utils/eoPopStat.h | 6 ++--- 10 files changed, 57 insertions(+), 50 deletions(-) diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 1d1eaf823..db5696254 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2003-02-27 19:25:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.8 2003-02-27 19:25:48 okoenig Exp $ $Author: okoenig $ + CVS Info: $Date: 2003-03-21 02:38:57 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.9 2003-03-21 02:38:57 maartenkeijzer Exp $ $Author: maartenkeijzer $ */ //----------------------------------------------------------------------------- @@ -150,10 +150,17 @@ public : virtual std::string className() const { +#ifdef HAVE_SSTREAM + std::ostringstream os; + os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")"; + return os.str() +#else + char s[1024]; std::ostrstream os(s, 1022); os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")" << std::ends; return std::string(s); +#endif } private: diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 949b5d9ac..30b1d3b0c 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2003-02-27 19:25:48 $ $Version$ $Author: okoenig $ + CVS Info: $Date: 2003-03-21 02:38:57 $ $Version$ $Author: maartenkeijzer $ */ //----------------------------------------------------------------------------- @@ -140,11 +140,17 @@ public : } virtual std::string className() const - { + { +#ifdef HAVE_SSTREAM + std::ostringstream os; + os << "eoVlDelMutation("<(pickled[0]); + rng_from_string(_rng, state); + } +}; + int spin(eoRng& _rng, numeric::array values, double total) { if (total == 0.0) @@ -97,6 +113,7 @@ void random_numbers() .def("to_string", rng_to_string) .def("from_string", rng_from_string) .def("roulette_wheel", spin) + .def_pickle(RNG_pickle_suite()) ; def("rng", get_rng, return_value_policy()); diff --git a/eo/src/pyeo/test/test_pickling.py b/eo/src/pyeo/test/test_pickling.py index dbe36bc2c..161668bb3 100644 --- a/eo/src/pyeo/test/test_pickling.py +++ b/eo/src/pyeo/test/test_pickling.py @@ -69,28 +69,7 @@ class TestPickling(unittest.TestCase): for i in range(10): rng().rand() - filename = tempfile.mktemp() - file = open(filename, 'wb') - pickler = cPickle.Pickler(file) - - s = rng().to_string() - - pickler.dump(s); - del pickler - file.close() - - file = open(filename) - - unpickler = cPickle.Unpickler(file) - - s = unpickler.load() - - rng2 = eoRng(1) - rng2.from_string(s) - - del unpickler - file.close() - os.remove(filename) + rng2 = self.do_pickle(rng()) for i in range(100): a = rng().rand() @@ -99,19 +78,7 @@ class TestPickling(unittest.TestCase): def vParam(self,v): - filename = tempfile.mktemp() - file = open(filename,'wb') - pickler = cPickle.Pickler(file) - - pickler.dump(v) - del pickler - file.close() - file = open(filename) - - unpickler = cPickle.Unpickler(file) - - v2 = unpickler.load(); - + v2 = self.do_pickle(v); self.failUnlessEqual(v.value, v2.value) def testValueParam(self): diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 0c89ef7e7..67182d798 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -97,12 +97,13 @@ public : { #ifdef HAVE_SSTREAM std::ostringstream oscount; + oscount << counter; #else char buff[255]; std::ostrstream oscount(buff, 254); -#endif oscount << counter; oscount << std::ends; +#endif currentFileName = dirname + "/" + filename + oscount.str(); } diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 38aea2b45..b06cba516 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -106,12 +106,13 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) { #ifdef HAVE_SSTREAM std::ostringstream os; + os << "300x200-0+" << numWindow*220; #else char snum[255]; std::ostrstream os(snum, 254); + os << "300x200-0+" << numWindow*220 << std::ends; #endif - os << "300x200-0+" << numWindow*220 << std::ends; numWindow++; char *args[6]; args[0] = strdup( "gnuplot" ); @@ -148,7 +149,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.7 2003-02-28 16:49:14 maartenkeijzer Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.8 2003-03-21 02:39:09 maartenkeijzer Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 9bc9261df..8ab8082ab 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -120,10 +120,10 @@ inline void eoGnuplot1DMonitor::FirstPlot() os << ", "; } os << '\n'; - os << std::ends; #ifdef HAVE_SSTREAM PipeComSend( gpCom, os.str().c_str()); #else + os << std::ends; PipeComSend( gpCom, buff ); #endif } diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 696a701e1..95f36c670 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -132,9 +132,9 @@ public: virtual void printOn(std::ostream& _os) const { if (combien == 0) - _os << 100*rate << "% " << std::ends; + _os << 100*rate << "% "; else - _os << combien << " " << std::ends; + _os << combien << " "; return; } diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index c1f750925..921d85e28 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -164,12 +164,13 @@ public : { #ifdef HAVE_SSTREAM std::ostringstream os; + os << repValue; #else char buf[1024]; std::ostrstream os(buf, 1023); -#endif os << repValue; os << std::ends; +#endif return os.str(); } @@ -221,11 +222,12 @@ std::string eoValueParam >::getValue(void) const // use own buffer as MSVC's buffer leaks! #ifdef HAVE_SSTREAM std::ostringstream os; + os << repValue.first << ' ' << repValue.second; #else char buff[1024]; std::ostrstream os(buff, 1024); -#endif os << repValue.first << ' ' << repValue.second << std::ends; +#endif return os.str(); } @@ -260,7 +262,9 @@ std::string eoValueParam > >::getValue(void) con std::copy(repValue[i].begin(), repValue[i].end(), std::ostream_iterator(os, " ")); } +#ifndef HAVE_SSTREAM os << std::ends; +#endif return os.str(); } @@ -302,7 +306,9 @@ std::string eoValueParam >::getValue(void) const #endif os << repValue.size() << ' '; std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); +#ifndef HAVE_SSTREAM os << std::ends; +#endif return os.str(); } @@ -334,7 +340,9 @@ std::string eoValueParam >::getValue(void) cons #endif os << repValue.size() << ' '; std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); - os << std::ends; +#ifndef HAVE_SSTREAM + os<< std::ends; +#endif return os.str(); } diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 4c06f2d54..f607590f4 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -70,7 +70,7 @@ void operator()(const eoPop& _pop) for (unsigned i = 0; i < howmany; ++i) { std::ostringstream os; - os << _pop[i] << std::endl << std::ends; + os << _pop[i] << std::endl; // paranoid: value() += os.str(); @@ -130,8 +130,8 @@ public : unsigned howMany=combien?combien:_pop.size(); for (unsigned i = 0; i < howMany; ++i) { - std::ostringstream os; // leave space for emergency terminate - os << *_pop[i] << std::endl << std::ends; + std::ostringstream os; + os << *_pop[i] << std::endl; // paranoid: value() += os.str(); From 6f9894421280430c09d37bbe066552ef31c12db1 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 21 Mar 2003 02:41:54 +0000 Subject: [PATCH 0950/2134] again: std::ends and stringstream --- eo/src/utils/eoState.cpp | 3 ++- eo/src/utils/eoUpdater.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index e8eec0dd2..814a4aaae 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -188,10 +188,11 @@ string eoState::createObjectName(eoObject* obj) { #ifdef HAVE_SSTREAM ostringstream os; + os << obj->className().c_str() << count++; #else ostrstream os; -#endif os << obj->className().c_str() << count++ << ends; +#endif name = os.str(); diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp index dd30b4b47..64b07dfc0 100644 --- a/eo/src/utils/eoUpdater.cpp +++ b/eo/src/utils/eoUpdater.cpp @@ -23,10 +23,11 @@ void eoTimedStateSaver::operator()(void) #ifdef HAVE_SSTREAM ostringstream os; + os << prefix << (now - first_time) << '.' << extension; #else ostrstream os; -#endif os << prefix << (now - first_time) << '.' << extension << ends; +#endif state.save(os.str()); } } @@ -35,10 +36,11 @@ void eoCountedStateSaver::doItNow(void) { #ifdef HAVE_SSTREAM ostringstream os; + os << prefix << counter << '.' << extension; #else ostrstream os; -#endif os << prefix << counter << '.' << extension << ends; +#endif state.save(os.str()); } From fda39068afaf8d2f7a25f07b4b7bcdad614dfbad Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 21 Mar 2003 02:44:05 +0000 Subject: [PATCH 0951/2134] now added an std::ends for plotting strstream --- eo/src/utils/eoGnuplot1DSnapshot.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 5bb0b676e..a8a967b24 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -149,6 +149,7 @@ inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) #ifdef HAVE_SSTREAM PipeComSend( gpCom, os.str().c_str()); #else + os << std::ends; PipeComSend( gpCom, buff ); #endif return (*this); From f64292b777c9934b91a53ccbfa3c1f5aac7a8480 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 21 Mar 2003 09:17:38 +0000 Subject: [PATCH 0952/2134] bumped up the version number --- eo/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/configure.in b/eo/configure.in index 84f16aa9b..05a61ac2e 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/eo) dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.2) +AM_INIT_AUTOMAKE(eo, 0.9.3) dnl Checks for maintainer mode AM_MAINTAINER_MODE From 59fe39da93b95e598a4e553283ff726f89d99117 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 22 Mar 2003 06:39:21 +0000 Subject: [PATCH 0953/2134] ADded comments and hook for copy constructor --- eo/tutorial/Templates/eoMyStruct.tmpl | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl index d5c972557..ddf4e0089 100644 --- a/eo/tutorial/Templates/eoMyStruct.tmpl +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -6,6 +6,21 @@ The above line is usefulin Emacs-like editors /* Template for creating a new representation in EO ================================================ + +Mandatory: +- a default constructor (constructor without any argument) +- the I/O functions (readFrom and printOn) + +However, if you are using dynamic memory, there are 2 places +to allocate it: the default constructor (if possible?), or, more in +the EO spirit, the eoInit object, that you will need to write anyway +(template file init.tmpl). + +But remember that a COPY CONSTRUCTOR will be used in many places in EO, +so make sure that the default copy constructor works, or, even better, +do write your own if in doubt. +And of course write the corresponding destructor! + */ #ifndef _eoMyStruct_h @@ -40,6 +55,19 @@ public: // END Code of default Ctor of an eoMyStruct object } + /** Copy Ctor: you MUST provide a copy ctor if the default + * one is not what you want + * If this is the case, uncomment and fill the following + */ + /* + eoMyStruct(const eoMyStruct &) + { + // START Code of copy Ctor of an eoMyStruct object + // END Code of copy Ctor of an eoMyStruct object + } + */ + + virtual ~eoMyStruct() { // START Code of Destructor of an eoEASEAGenome object From 9a636428ba45165b33c2d88d79f9a3c0309c2a99 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 25 Mar 2003 10:46:08 +0000 Subject: [PATCH 0954/2134] Deleted political statement as I changed my mind about this --- eo/src/gp/node_pool.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/eo/src/gp/node_pool.h b/eo/src/gp/node_pool.h index 94484b5b9..e3b41b8ac 100644 --- a/eo/src/gp/node_pool.h +++ b/eo/src/gp/node_pool.h @@ -13,18 +13,6 @@ * modified is included with the above copyright notice. - * Special disclaimer and political statement: - - * In contrast with the rest of the EO package where you might have found this code, this software - * does NOT fall under the GNU Lesser Public License or the GNU Public License, nor is anyone allowed - * by the copyright holder (that's me) to put it under either license. - * Doing this would limit my and your freedom to use this software in any way - * you or I see fit, including but not limited to closed-source software. I personally do not adher to - * virus-like qualities of the GPL and therefore take the liberty to open this code as wide as I can. - * Furthermore, as this work was carried out in an academic environment and thus paid by the public - * I do not see the need for the same public (which includes commercial companies) - * to be limited in any way to use this software. - */ #ifndef node_pool_h From eb279c8f98cbe975ac219f0aac4a9fa40c5a6473 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 1 Apr 2003 12:09:37 +0000 Subject: [PATCH 0955/2134] Removed a dummy line containing reference to lesson3! --- eo/tutorial/Lesson4/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile index 807d8e126..75bd41dd4 100644 --- a/eo/tutorial/Lesson4/Makefile +++ b/eo/tutorial/Lesson4/Makefile @@ -20,8 +20,6 @@ DIR_EO = ../../src ALL = BitEA RealEA ESEA -lesson3 : $(ALL) - all : $(ALL) BitEA : BitEA.o ; From b3e57bedad0f6e5b92243ff5dc582c34906b6f13 Mon Sep 17 00:00:00 2001 From: okoenig Date: Wed, 2 Apr 2003 21:10:53 +0000 Subject: [PATCH 0956/2134] included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. --- eo/src/Makefile.am | 2 +- eo/src/do/make_checkpoint_assembled.h | 196 +++++++++++++++++++++++ eo/src/eoScalarFitnessAssembled.cpp | 41 +++++ eo/src/eoScalarFitnessAssembled.h | 221 ++++++++++++++++++++++++++ eo/src/utils/eoStat.h | 107 ++++++++++--- eo/test/Makefile.am | 18 ++- eo/test/t-eoFitnessAssembled.cpp | 105 ++++++++++++ eo/test/t-eoFitnessAssembledEA.cpp | 170 ++++++++++++++++++++ 8 files changed, 837 insertions(+), 23 deletions(-) create mode 100644 eo/src/do/make_checkpoint_assembled.h create mode 100644 eo/src/eoScalarFitnessAssembled.cpp create mode 100644 eo/src/eoScalarFitnessAssembled.h create mode 100644 eo/test/t-eoFitnessAssembled.cpp create mode 100644 eo/test/t-eoFitnessAssembledEA.cpp diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 0bf74599e..64113f2eb 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -8,7 +8,7 @@ SUBDIRS = es ga gp utils other do CPPFLAGS = -O2 lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp eoParetoFitness.cpp +libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp eoParetoFitness.cpp eoScalarFitnessAssembled.cpp libeoincdir = $(includedir)/eo libeoinc_HEADERS = *.h eo do/*.h diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h new file mode 100644 index 000000000..3d012cfbe --- /dev/null +++ b/eo/src/do/make_checkpoint_assembled.h @@ -0,0 +1,196 @@ + /* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- */ + +//----------------------------------------------------------------------------- +// make_checkpoint_assembled.h +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_assembled_h +#define _make_checkpoint_assembled_h + +#include +#include + +#include +#include +#include +#include +#include + +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); +/////////////////// The checkpoint and other I/O ////////////// + +/** Of course, Fitness needs to be an eoScalarFitnessAssembled!!! */ +template +eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + + // SOME PARSER PARAMETERS + // ---------------------- + std::string dirName = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output").value(); + bool erase = _parser.createParam(true, "eraseDir", "Erase files in dirName if any", '\0', "Output").value(); +#if !defined(NO_GNUPLOT) + bool gnuplots = _parser.createParam(true,"plots","Plot stuff using GnuPlot",'\0',"Output").value(); +#endif + bool printFile = _parser.createParam(true,"printFile","Print statistics file",'\0',"Output").value(); + + eoValueParam& saveFrequencyParam = + _parser.createParam(unsigned(0),"saveFrequency","Save every F generation (0 = only final state, absent = never)",'\0',"Persistence" ); + + testDirRes(dirName, erase); // TRUE + + // CREATE CHECKPOINT FROM eoContinue + // --------------------------------- + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + _state.storeFunctor(checkpoint); + + // GENERATIONS + // ----------- + eoIncrementorParam *generationCounter = new eoIncrementorParam("Gen."); + _state.storeFunctor(generationCounter); + checkpoint->add(*generationCounter); + + // TIME + // ---- + eoTimeCounter * tCounter = NULL; + tCounter = new eoTimeCounter; + _state.storeFunctor(tCounter); + checkpoint->add(*tCounter); + + // ACCESS DESCRIPTIONS OF TERMS OF FITNESS CLASS + // --------------------------------------------- + // define a temporary fitness instance + typedef typename EOT::Fitness Fit; + Fit fit; + std::vector fitness_descriptions = fit.getDescriptionVector(); + unsigned nTerms = fitness_descriptions.size(); + + // STAT VALUES OF A POPULATION + // --------------------------- + + // average vals + std::vector* > avgvals( nTerms ); + for (unsigned i=0; i < nTerms; ++i){ + std::string descr = "Avg. of " + fitness_descriptions[i]; + avgvals[i] = new eoAverageStat(i, descr); + _state.storeFunctor( avgvals[i] ); + checkpoint->add( *avgvals[i] ); + } + + // best vals + std::vector* > bestvals( nTerms ); + for (unsigned i=0; i < nTerms; ++i){ + std::string descr = fitness_descriptions[i] + " of best ind."; + bestvals[i] = new eoBestFitnessStat(i, descr); + _state.storeFunctor( bestvals[i] ); + checkpoint->add( *bestvals[i] ); + } + + // STDOUT + // ------ + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); + checkpoint->add(*monitor); + monitor->add(*generationCounter); + monitor->add(_eval); + monitor->add(*tCounter); + + // Add best fitness + monitor->add( *bestvals[0] ); + + // Add all average vals + for (unsigned i=0; i < nTerms; ++i) + monitor->add( *avgvals[i] ); + + // GNUPLOT + // ------- +#if !defined(NO_GNUPLOT) + if (gnuplots ){ + std::string stmp; + + // Histogramm of the different fitness vals + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirName); + _state.storeFunctor(fitSnapshot); + // add any stat that is a vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + + std::vector gnumonitors(nTerms, NULL ); + for (unsigned i=0; i < nTerms; ++i){ + stmp = dirName + "/gnuplot_" + fitness_descriptions[i] + ".xg"; + gnumonitors[i] = new eoGnuplot1DMonitor(stmp,true); + _state.storeFunctor(gnumonitors[i]); + checkpoint->add(*gnumonitors[i]); + gnumonitors[i]->add(*generationCounter); + gnumonitors[i]->add(*bestvals[i]); + gnumonitors[i]->add(*avgvals[i]); + } + + } +#endif + + // WRITE STUFF TO FILE + // ------------------- + if( printFile ){ + std::string stmp2 = dirName + "/eoStatistics.sav"; + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp2); + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + fileMonitor->add(*tCounter); + + for (unsigned i=0; i < nTerms; ++i){ + fileMonitor->add(*bestvals[i]); + fileMonitor->add(*avgvals[i]); + } + + } + + // STATE SAVER + // ----------- + // feed the state to state savers + + if (_parser.isItThere(saveFrequencyParam)) { + + unsigned freq = (saveFrequencyParam.value() > 0 ? saveFrequencyParam.value() : UINT_MAX ); + std::string stmp = dirName + "/generations"; + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } + + // and that's it for the (control and) output + return *checkpoint; +} + +#endif diff --git a/eo/src/eoScalarFitnessAssembled.cpp b/eo/src/eoScalarFitnessAssembled.cpp new file mode 100644 index 000000000..a30289abc --- /dev/null +++ b/eo/src/eoScalarFitnessAssembled.cpp @@ -0,0 +1,41 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoScalarFitnessAssembled.cpp +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include "eoScalarFitnessAssembled.h" + + +// need to allocate the static variables of class eoScalarFitnessAssembledTraits +std::vector eoScalarFitnessAssembledTraits::TermDescriptions; + + + diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h new file mode 100644 index 000000000..8c278d8bf --- /dev/null +++ b/eo/src/eoScalarFitnessAssembled.h @@ -0,0 +1,221 @@ + /* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- */ + +//----------------------------------------------------------------------------- +// eoScalarFitnessAssembled.h +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef eoScalarFitnessAssembled_h +#define eoScalarFitnessAssembled_h + +#include +#include +#include +#include +#include + +//! Defines properties of eoScalarFitnessAssembled. +/*! Properties that are hold in this traits class: + - std::vector to hold descriptions of the different fitness terms +*/ +class eoScalarFitnessAssembledTraits{ + +public: + + typedef std::vector::size_type size_type; + + static void setDescription( size_type _idx, std::string _descr ) { + if ( _idx < TermDescriptions.size() ) + TermDescriptions[_idx] = _descr; + else{ + TermDescriptions.resize(_idx, "Unnamed variable" ); + TermDescriptions[_idx] = _descr; + } + } + + static std::string getDescription( size_type _idx) { + if ( _idx < TermDescriptions.size() ) + return TermDescriptions[_idx ]; + else + return "Unnamed Variable"; + } + + static void resize( size_type _n, const std::string& _descr) { + TermDescriptions.resize(_n, _descr); + } + + static size_type size() { return TermDescriptions.size(); } + + static std::vector getDescriptionVector() { return TermDescriptions; } + +private: + static std::vector TermDescriptions; +}; + +//! Implements fitness as std::vector, storing all values that might occur during fitness assembly +/*! Properties: + - Wraps a scalar fitness values such as a double or int, with the option of + maximizing (using less) or minimizing (using greater). + - Stores all kinda different values met during fitness assembly, to be defined in eoEvalFunc. + - It overrides operator<() to use the Compare template argument. + - Suitable constructors and assignments and casts are defined to work + with this quantity as if it were a ScalarType. + - Global fitness value is stored as first element in the vector +*/ +template +class eoScalarFitnessAssembled : public std::vector { + +public: + + typedef typename std::vector::size_type size_type; + + // Basic constructors and assignments + eoScalarFitnessAssembled() + : std::vector( FitnessTraits::size() ) {} + + eoScalarFitnessAssembled( size_type _n, + const ScalarType& _val, + const std::string& _descr="Unnamed variable" ) + : std::vector(_n, _val) + { + if ( _n > FitnessTraits::size() ) + FitnessTraits::resize(_n, _descr); + } + + eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : std::vector( other ) {} + + eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { + std::vector::operator=( other ); + return *this; + } + + // Constructors and assignments to work with scalar type + eoScalarFitnessAssembled( const ScalarType& v ) : std::vector( 1, v ) {} + eoScalarFitnessAssembled& operator=( const ScalarType& v ) { + + if ( empty() ) + push_back( v ); + else + front() = v; + + return *this; + } + + //! Overload push_back() + void push_back(const ScalarType& _val ){ + std::vector::push_back( _val ); + if ( size() > FitnessTraits::size() ) + FitnessTraits::setDescription( size()-1, "Unnamed variable"); + } + + //! Overload push_back() + void push_back(const ScalarType& _val, const std::string& _descr ){ + std::vector::push_back( _val ); + FitnessTraits::setDescription( size()-1, _descr ); + } + + //! Overload resize() + void resize( size_type _n, const ScalarType& _val = ScalarType(), const std::string& _descr = "Unnamed variable" ){ + std::vector::resize(_n, _val); + FitnessTraits::resize(_n, _descr); + } + + //! Set description + void setDescription( size_type _idx, std::string _descr ) { + FitnessTraits::setDescription( _idx, _descr ); + } + + //! Get description + std::string getDescription( size_type _idx ){ return FitnessTraits::getDescription( _idx ); } + + //! Get vector with descriptions + std::vector getDescriptionVector() { return FitnessTraits::getDescriptionVector(); } + + // Scalar type access + operator ScalarType(void) const { + if ( empty() ) + return 0.0; + else + return front(); + } + + //! Print term values and descriptions + void printAll(std::ostream& os) const { + for (size_type i=0; i < size(); ++i ) + os << FitnessTraits::getDescription(i) << " = " << operator[](i) << " "; + } + + // Comparison, using less by default + bool operator<(const eoScalarFitnessAssembled& other) const{ + if ( empty() || other.empty() ) + return false; + else + return Compare()( front() , other.front() ); + } + + // implementation of the other operators + bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } + + // implementation of the other operators + bool operator<=( const eoScalarFitnessAssembled& y ) const { return !(*this > y); } + + // implementation of the other operators + bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } + +}; + +/** +Typedefs for fitness comparison, Maximizing Fitness compares with less, +and minimizing fitness compares with greater. This because we want ordinary +fitness values (doubles) to be equivalent with Maximizing Fitness, and +comparing with less is the default behaviour. +*/ +typedef eoScalarFitnessAssembled > eoAssembledMaximizingFitness; +typedef eoScalarFitnessAssembled > eoAssembledMinimizingFitness; + +template +std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled& f) +{ + for (unsigned i=0; i < f.size(); ++i) + os << f[i] << " "; + return os; +} + +template +std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled& f) +{ + for (unsigned i=0; i < f.size(); ++i){ + F value; + is >> value; + f[i] = value; + } + + return is; +} + +#endif + + + diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 67abbc3ce..73e568fae 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -32,6 +32,7 @@ #include #include #include +#include #include /** @@ -83,10 +84,14 @@ public : }; /** - Average fitness of a population, fitness can be a double, eoMinimizingFitness, eoMaximizingFitness or eoParetoFitness. - In the case of pareto optimization it will calculate the average of each objective. + Average fitness of a population. Fitness can be: + - double + - eoMinimizingFitness or eoMaximizingFitness + - eoScalarFitnessAssembled: + Specify in the constructor, for which fitness term (index) the average should be evaluated. + - eoParetoFitness: + The average of each objective is evaluated. */ - #ifdef _MSC_VER template class eoAverageStat : public eoStat #else @@ -96,9 +101,15 @@ template class eoAverageStat : public eoStat(fitness_type(), _description) {} + eoAverageStat(std::string _description = "Average Fitness") + : eoStat(fitness_type(), _description), whichFitnessTerm() {} + eoAverageStat(unsigned _whichTerm, std::string _description = "Average Fitness") + : eoStat(fitness_type(), _description), whichFitnessTerm(_whichTerm) {} #else - eoAverageStat(std::string _description = "Average Fitness") : eoStat(fitness_type(), _description) {} + eoAverageStat(std::string _description = "Average Fitness") + : eoStat(fitness_type(), _description), whichFitnessTerm() {} + eoAverageStat(unsigned _whichTerm, std::string _description = "Average Fitness") + : eoStat(fitness_type(), _description), whichFitnessTerm(_whichTerm) {} #endif static fitness_type sumFitness(double _sum, const EOT& _eot) @@ -118,7 +129,8 @@ public : #endif } private : - + + // Specialization for pareto fitness template void doit(const eoPop& _pop, eoParetoFitness) { @@ -135,7 +147,23 @@ private : value()[o] /= _pop.size(); } } - + + // Specialization for eoScalarFitnessAssembled + template + void doit(const eoPop& _pop, eoScalarFitnessAssembled) + { + + if ( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + + double result =0.0; + for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it) + result+= it->fitness()[whichFitnessTerm]; + value().clear(); + value() = result / _pop.size(); + } + + // Default behavior template void doit(const eoPop& _pop, T) { @@ -144,6 +172,8 @@ private : value() = v / _pop.size(); } + // Store an index of the fitness term to be evaluated in eoScalarFitnessAssembled + unsigned whichFitnessTerm; }; /** @@ -191,34 +221,38 @@ class eoNthElementFitnessStat : public eoSortedStat public : typedef typename EOT::Fitness Fitness; - eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : eoSortedStat(Fitness(), _description), which(_which) {} + eoNthElementFitnessStat(unsigned _whichElement, std::string _description = "nth element fitness") + : eoSortedStat(Fitness(), _description), whichElement(_whichElement) {} + eoNthElementFitnessStat(unsigned _whichElement, unsigned _whichTerm, std::string _description = "nth element fitness") + : eoSortedStat(Fitness(), _description), whichElement(_whichElement), whichFitnessTerm(_whichTerm) {} virtual void operator()(const std::vector& _pop) { - if (which > _pop.size()) + if (whichElement > _pop.size()) throw std::logic_error("fitness requested of element outside of pop"); doit(_pop, Fitness()); } private : - + struct CmpFitness { - CmpFitness(unsigned _which, bool _maxim) : which(_which), maxim(_maxim) {} + CmpFitness(unsigned _whichElement, bool _maxim) : whichElement(_whichElement), maxim(_maxim) {} bool operator()(const EOT* a, const EOT* b) { if (maxim) - return a->fitness()[which] > b->fitness()[which]; + return a->fitness()[whichElement] > b->fitness()[whichElement]; - return a->fitness()[which] < b->fitness()[which]; + return a->fitness()[whichElement] < b->fitness()[whichElement]; } - unsigned which; + unsigned whichElement; bool maxim; }; + // Specialization for eoParetoFitness template void doit(const eoPop& _pop, eoParetoFitness) { @@ -231,21 +265,31 @@ private : for (unsigned o = 0; o < value().size(); ++o) { - typename std::vector::iterator nth = tmp_pop.begin() + which; + typename std::vector::iterator nth = tmp_pop.begin() + whichElement; std::nth_element(tmp_pop.begin(), nth, tmp_pop.end(), CmpFitness(o, traits::maximizing(o))); value()[o] = (*nth)->fitness()[o]; } } + + // Specialization for eoScalarFitnessAssembled + template + void doit(const eoPop& _pop, eoScalarFitnessAssembled) + { + if ( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + value().clear(); + value() = _pop[whichElement]->fitness()[whichFitnessTerm]; + } // for everything else template void doit(const std::vector& _pop, T) { - value() = _pop[which]->fitness(); + value() = _pop[whichElement]->fitness(); } - - unsigned which; + unsigned whichElement; + unsigned whichFitnessTerm; }; /* Actually, you shouldn't need to sort the population to get the best fitness @@ -273,8 +317,15 @@ public : */ /** - Best fitness in the population + Best fitness of a population. Fitness can be: + - double + - eoMinimizingFitness or eoMaximizingFitness + - eoScalarFitnessAssembled: + Best individual is found according to its fitness, + specify in the constructor which fitness term of this individual should then be stored. + - eoParetoFitness: */ + #ifdef _MSC_VER template class eoBestFitnessStat : public eoStat @@ -286,7 +337,10 @@ class eoBestFitnessStat : public eoStat public : typedef typename EOT::Fitness Fitness; - eoBestFitnessStat(std::string _description = "Best ") : eoStat(Fitness(), _description) {} + eoBestFitnessStat(std::string _description = "Best ") + : eoStat(Fitness(), _description) {} + eoBestFitnessStat(unsigned _whichTerm, std::string _description = "Best ") + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} void operator()(const eoPop& _pop) { @@ -311,7 +365,7 @@ private : bool maxim; }; - + // Specialization for pareto fitness template void doit(const eoPop& _pop, eoParetoFitness) { @@ -324,7 +378,17 @@ private : value()[o] = it->fitness()[o]; } } + + // Specialization for eoScalarFitnessAssembled + template + void doit(const eoPop& _pop, eoScalarFitnessAssembled){ + if ( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + value().clear(); + value() = _pop.best_element().fitness()[whichFitnessTerm]; + } + // default template void doit(const eoPop& _pop, T) @@ -332,6 +396,7 @@ private : value() = _pop.best_element().fitness(); } + unsigned whichFitnessTerm; }; template diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 166a137af..e1238d633 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,6 +4,8 @@ ## ############################################################################### +CLEANFILES = *~ *.sav *.status + DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a ############################################################################### @@ -15,7 +17,7 @@ CXXFLAGS = -g -Wall # PLEASE don't break the line (see create_batch.sh) -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA #The run_tests script can be used to check various arguments TESTS=$(check_PROGRAMS) run_tests @@ -175,3 +177,17 @@ t_eoPBIL_LDFLAGS = -lm t_eoPBIL_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) ############################################################################### + +t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp +t_eoFitnessAssembled_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a +t_eoFitnessAssembled_LDFLAGS = -lm +t_eoFitnessAssembled_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) + +############################################################################### + +t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp +t_eoFitnessAssembledEA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a +t_eoFitnessAssembledEA_LDFLAGS = -lm +t_eoFitnessAssembledEA_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) + +############################################################################### diff --git a/eo/test/t-eoFitnessAssembled.cpp b/eo/test/t-eoFitnessAssembled.cpp new file mode 100644 index 000000000..5a492aedf --- /dev/null +++ b/eo/test/t-eoFitnessAssembled.cpp @@ -0,0 +1,105 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eoFitnessAssembled.cpp +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#include +#include + +#include "eoScalarFitnessAssembled.h" + +void test_eoScalarFitnessAssembledClass(){ + + // Create instances + eoAssembledMinimizingFitness A,B,C(5, 1.3, "C value"); + + // Add some values to them + A.push_back( 5.6, "first value" ); + A.push_back( 3.2, "second value" ); + A.push_back( 2.6, "third value" ); + + B.push_back( 1.2 ); + B.push_back( 3.2 ); + B.push_back( 5.2 ); + + B.setDescription( 1, "B descr" ); + + std::cout << "Created instances A,B and C, added some vals; testing << operator " << std::endl; + std::cout << "A= " << A << std::endl; + std::cout << "B= " << B << std::endl; + std::cout << "C= " << C << std::endl; + std::cout << "Printing values and descriptions: " << std::endl; + std::cout << "A: "; A.printAll( std::cout ); std::cout << std::endl; + std::cout << "B: "; B.printAll( std::cout ); std::cout << std::endl; + std::cout << "C: "; C.printAll( std::cout ); std::cout << std::endl; + + A.resize(8, 100.3, "A resized"); + std::cout << "Resized A: "; A.printAll( std::cout ); std::cout << std::endl; + + std::cout << "Access fitness values of A and B: " << "f(A)= " << (double) A << " f(B)= " << (double) B << std::endl; + + // Testing constructors and assignments + eoAssembledMinimizingFitness D(A) ,E(3.2); + std::cout << "D(A) = " << D << "\t" << "E(3.2)= " << E << std::endl; + eoAssembledMinimizingFitness F,G; + F=A; + G= 7.5; + std::cout << "F = A : " << F << "\t G = 7.5 : " << G << std::endl; + + // Comparing... + std::cout << "AB: " << (A>B) << std::endl; + std::cout << "A<=B: " << (A<=B) << std::endl; + std::cout << "A>=B: " << (A>=B) << std::endl; + +} + + + +int main(){ + + std::cout << "-----------------------------------" << std::endl; + std::cout << "START t-eoFitnessAssembled" << std::endl; + + try{ + // Test the fitness class itself + test_eoScalarFitnessAssembledClass(); + + + + } + catch(std::exception& e){ + std::cout << e.what() << std::endl; + return 1; + } + + std::cout << "END t-eoFitnessAssembled" << std::endl; + std::cout << "----------------------------------" << std::endl; + + return 0; + +} + diff --git a/eo/test/t-eoFitnessAssembledEA.cpp b/eo/test/t-eoFitnessAssembledEA.cpp new file mode 100644 index 000000000..f21e31be8 --- /dev/null +++ b/eo/test/t-eoFitnessAssembledEA.cpp @@ -0,0 +1,170 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eoFitnessAssembledEA.cpp +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#include +#include + +// General eo includes +#include +#include // The real bounds (not yet in general eo include) + +// Representation dependent includes and typedefs +#include // Definition of representation +#include // Uniformly initializes real vector in bounds +#include // Initialization of a genotype +#include // Base class for fitness evaluation +#include // Variation operators using standard Real operators +#include // The fitness class +typedef eoReal Indi; + +// Representation independent modules +#include // Initialization of population +#include // The stopping criterion +#include // Outputs (stats, population dumps, ...) +#include // Evolution engine (selection and replacement) +#include // simple call to the algo.stays there for consistency reasons + +// Define a fitness class +template +class eoAssembledEvalFunc : public eoEvalFunc{ +public: + // Constructor defining number and descriptions of fitness terms + eoAssembledEvalFunc() { + + // Define a temporary fitness object to have access to its static traits + typename EOT::Fitness tmpfit(3, 0.0); + tmpfit.setDescription(0,"Fitness"); + tmpfit.setDescription(1,"Some Value"); + tmpfit.setDescription(2,"Other Value"); + + } + + void operator()(EOT& _eo){ + + // Define temporary fitness object + // (automatically gets initialized with size given in constructor) + typename EOT::Fitness tmpfit; + + // Eval some dummy fitness + double sum1=0.0, sum2=0.0; + for (unsigned i=0; i < _eo.size(); ++i){ + sum1 += _eo[i]*_eo[i]; + sum2 += fabs(_eo[i]) + fabs(_eo[i]); + } + + // Store some fitness terms + tmpfit[1]= sum1; + tmpfit[2]= sum2; + + // Store the fitness + tmpfit = (sum1 + sum2)/_eo.size(); + + // Pass it + _eo.fitness( tmpfit ); + + } +}; + +// checks for help demand, and writes the status file and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]){ + + std::cout << "-----------------------------------" << std::endl; + std::cout << "START t-eoFitnessAssembledEA" << std::endl; + + try{ + + // Parser & State + eoParser parser(argc, argv); // for user-parameter reading + eoState state; // keeps all things allocated + + //// + // A) Representation dependent stuff + //// + + // The fitness + eoAssembledEvalFunc plainEval; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // The genotype + eoRealInitBounded& init = do_make_genotype(parser, state, Indi() ); + + // The variation operators + eoGenOp& op = do_make_op(parser, state, init); + + //// + // B) Create representation independent stuff + //// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = do_make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = do_make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = do_make_checkpoint_assembled(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = do_make_algo_scalar(parser, state, eval, checkpoint, op); + + + make_help(parser); // To be called after all parameters have been read ! + + //// + // C) Run the algorithm + //// + + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + do_run(ga, pop); // run the ga + + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + } + catch(std::exception& e) + { + std::cout << e.what() << std::endl; + return 1; + } + + std::cout << "-----------------------------------" << std::endl; + std::cout << "END t-eoFitnessAssembledEA" << std::endl; + + return 0; + +} From 1d70ba7a9bda4ba4c7d06dc002a4b08002bc897f Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 3 Apr 2003 09:11:17 +0000 Subject: [PATCH 0957/2134] Minor changes to make it run under Visual Studio 6.0 --- eo/src/eoScalarFitnessAssembled.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 8c278d8bf..d1cc19ddb 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -107,7 +107,12 @@ public: eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : std::vector( other ) {} eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { +#ifdef _MSC_VER + typedef std::vector myvector; + myvector::operator=( other ); +#else std::vector::operator=( other ); +#endif return *this; } @@ -125,7 +130,12 @@ public: //! Overload push_back() void push_back(const ScalarType& _val ){ +#ifdef _MSC_VER + typedef std::vector myvector; + myvector::push_back( _val ); +#else std::vector::push_back( _val ); +#endif if ( size() > FitnessTraits::size() ) FitnessTraits::setDescription( size()-1, "Unnamed variable"); } From ce04cca4b9a2533cc7bb7c28d333e29e1f3adc06 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 3 Apr 2003 09:23:52 +0000 Subject: [PATCH 0958/2134] Minor changes to make it run under Visual Studio 6.0 --- eo/src/do/make_checkpoint_assembled.h | 30 +++++++++++++-------------- eo/src/utils/eoStat.h | 11 ++++++---- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h index 3d012cfbe..182e92201 100644 --- a/eo/src/do/make_checkpoint_assembled.h +++ b/eo/src/do/make_checkpoint_assembled.h @@ -103,11 +103,11 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta // best vals std::vector* > bestvals( nTerms ); - for (unsigned i=0; i < nTerms; ++i){ - std::string descr = fitness_descriptions[i] + " of best ind."; - bestvals[i] = new eoBestFitnessStat(i, descr); - _state.storeFunctor( bestvals[i] ); - checkpoint->add( *bestvals[i] ); + for (unsigned j=0; j < nTerms; ++j){ + std::string descr = fitness_descriptions[j] + " of best ind."; + bestvals[j] = new eoBestFitnessStat(j, descr); + _state.storeFunctor( bestvals[j] ); + checkpoint->add( *bestvals[j] ); } // STDOUT @@ -123,8 +123,8 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta monitor->add( *bestvals[0] ); // Add all average vals - for (unsigned i=0; i < nTerms; ++i) - monitor->add( *avgvals[i] ); + for (unsigned l=0; l < nTerms; ++l) + monitor->add( *avgvals[l] ); // GNUPLOT // ------- @@ -145,14 +145,14 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta checkpoint->add(*fitSnapshot); std::vector gnumonitors(nTerms, NULL ); - for (unsigned i=0; i < nTerms; ++i){ - stmp = dirName + "/gnuplot_" + fitness_descriptions[i] + ".xg"; - gnumonitors[i] = new eoGnuplot1DMonitor(stmp,true); - _state.storeFunctor(gnumonitors[i]); - checkpoint->add(*gnumonitors[i]); - gnumonitors[i]->add(*generationCounter); - gnumonitors[i]->add(*bestvals[i]); - gnumonitors[i]->add(*avgvals[i]); + for (unsigned k=0; k < nTerms; ++k){ + stmp = dirName + "/gnuplot_" + fitness_descriptions[k] + ".xg"; + gnumonitors[k] = new eoGnuplot1DMonitor(stmp,true); + _state.storeFunctor(gnumonitors[k]); + checkpoint->add(*gnumonitors[k]); + gnumonitors[k]->add(*generationCounter); + gnumonitors[k]->add(*bestvals[k]); + gnumonitors[k]->add(*avgvals[k]); } } diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 73e568fae..d02089064 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -341,10 +341,13 @@ public : : eoStat(Fitness(), _description) {} eoBestFitnessStat(unsigned _whichTerm, std::string _description = "Best ") : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} - - void operator()(const eoPop& _pop) - { - doit(_pop, Fitness()); + + void operator()(const eoPop& _pop){ +#ifdef _MSC_VER + doit(_pop, EOT::Fitness() ); // specializations for scalar and std::vector +#else + doit(_pop, typename EOT::Fitness()); // specializations for scalar and std::vector +#endif } private : From a63c6ee2ba55cfd2b0b6502c114c2ae8d150b7d7 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 3 Apr 2003 10:44:35 +0000 Subject: [PATCH 0959/2134] Minor changes to make it run under Visual Studio 6.0 --- eo/src/utils/eoStat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index d02089064..25da3e2bf 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -149,7 +149,7 @@ private : } // Specialization for eoScalarFitnessAssembled - template + template void doit(const eoPop& _pop, eoScalarFitnessAssembled) { @@ -383,7 +383,7 @@ private : } // Specialization for eoScalarFitnessAssembled - template + template void doit(const eoPop& _pop, eoScalarFitnessAssembled){ if ( whichFitnessTerm >= _pop[0].fitness().size() ) From 9b6619687083b3e5c1b6786106935f9033959dd5 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 3 Apr 2003 16:25:55 +0000 Subject: [PATCH 0960/2134] Minor changes to make it run under Visual Studio 6.0 --- eo/src/eoScalarFitnessAssembled.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index d1cc19ddb..739632d3a 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -142,7 +142,12 @@ public: //! Overload push_back() void push_back(const ScalarType& _val, const std::string& _descr ){ - std::vector::push_back( _val ); +#ifdef _MSC_VER + typedef std::vector myvector; + myvector::push_back( _val ); +#else + std::vector::push_back( _val ); +#endif FitnessTraits::setDescription( size()-1, _descr ); } From f587793a6ab481e90bf4a81917db86aa104fddbf Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 3 Apr 2003 16:47:47 +0000 Subject: [PATCH 0961/2134] Minor changes to make it run under Visual Studio 6.0 --- eo/src/eoScalarFitnessAssembled.h | 35 +++++++++---------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 739632d3a..64fc674d5 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -88,36 +88,31 @@ template { public: - - typedef typename std::vector::size_type size_type; + typedef typename std::vector baseVector; + typedef typename baseVector::size_type size_type; // Basic constructors and assignments eoScalarFitnessAssembled() - : std::vector( FitnessTraits::size() ) {} + : baseVector( FitnessTraits::size() ) {} eoScalarFitnessAssembled( size_type _n, const ScalarType& _val, const std::string& _descr="Unnamed variable" ) - : std::vector(_n, _val) + : baseVector(_n, _val) { if ( _n > FitnessTraits::size() ) FitnessTraits::resize(_n, _descr); } - eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : std::vector( other ) {} + eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : baseVector( other ) {} eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { -#ifdef _MSC_VER - typedef std::vector myvector; - myvector::operator=( other ); -#else - std::vector::operator=( other ); -#endif + baseVector::operator=( other ); return *this; } // Constructors and assignments to work with scalar type - eoScalarFitnessAssembled( const ScalarType& v ) : std::vector( 1, v ) {} + eoScalarFitnessAssembled( const ScalarType& v ) : baseVector( 1, v ) {} eoScalarFitnessAssembled& operator=( const ScalarType& v ) { if ( empty() ) @@ -130,30 +125,20 @@ public: //! Overload push_back() void push_back(const ScalarType& _val ){ -#ifdef _MSC_VER - typedef std::vector myvector; - myvector::push_back( _val ); -#else - std::vector::push_back( _val ); -#endif + baseVector::push_back( _val ); if ( size() > FitnessTraits::size() ) FitnessTraits::setDescription( size()-1, "Unnamed variable"); } //! Overload push_back() void push_back(const ScalarType& _val, const std::string& _descr ){ -#ifdef _MSC_VER - typedef std::vector myvector; - myvector::push_back( _val ); -#else - std::vector::push_back( _val ); -#endif + baseVector::push_back( _val ); FitnessTraits::setDescription( size()-1, _descr ); } //! Overload resize() void resize( size_type _n, const ScalarType& _val = ScalarType(), const std::string& _descr = "Unnamed variable" ){ - std::vector::resize(_n, _val); + baseVector::resize(_n, _val); FitnessTraits::resize(_n, _descr); } From a172d34e5fb35d82877bfc7eec11c867b3b5b53b Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 3 Apr 2003 16:51:47 +0000 Subject: [PATCH 0962/2134] Included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. --- eo/win/eo.dsp | 248 +++++++++++++++--------------- eo/win/eo.dsw | 89 +++++++---- eo/win/t_eofitnessassembled.dsp | 102 ++++++++++++ eo/win/t_eofitnessassembledea.dsp | 102 ++++++++++++ 4 files changed, 391 insertions(+), 150 deletions(-) create mode 100755 eo/win/t_eofitnessassembled.dsp create mode 100644 eo/win/t_eofitnessassembledea.dsp diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index baeb493ad..bac4ac287 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -1,122 +1,126 @@ -# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=eo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "eo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "eo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "eo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debugj" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0xc0a /d "_DEBUG" -# ADD RSC /l 0xc0a /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\eod.lib" - -!ENDIF - -# Begin Target - -# Name "eo - Win32 Release" -# Name "eo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoParetoFitness.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.cpp -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\eoFunctorStore.H -# End Source File -# Begin Source File - -SOURCE=..\src\eoPersistent.h -# End Source File -# Begin Source File - -SOURCE=..\src\eoPrintable.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="eo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=eo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "eo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "eo.mak" CFG="eo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "eo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "eo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "eo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "eo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debugj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\eod.lib" + +!ENDIF + +# Begin Target + +# Name "eo - Win32 Release" +# Name "eo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoParetoFitness.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\eoScalarFitnessAssembled.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\src\eoFunctorStore.H +# End Source File +# Begin Source File + +SOURCE=..\src\eoPersistent.h +# End Source File +# Begin Source File + +SOURCE=..\src\eoPrintable.h +# End Source File +# End Group +# End Target +# End Project diff --git a/eo/win/eo.dsw b/eo/win/eo.dsw index 612aa082a..44eae5eea 100644 --- a/eo/win/eo.dsw +++ b/eo/win/eo.dsw @@ -104,7 +104,14 @@ Package=<4> Begin Project Dependency Project_Dep_Name t_mge1bit End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eofitnessassembledea + End Project Dependency + Begin Project Dependency + Project_Dep_Name t_eofitnessassembled + End Project Dependency }}} + ############################################################################### Project: "all_tut"=.\all_tut.dsp - Package Owner=<4> @@ -236,6 +243,7 @@ Package=<5> Package=<4> {{{ }}} + ############################################################################### Project: "t_eoesall"=.\t_eoesall.dsp - Package Owner=<4> @@ -274,6 +282,30 @@ Package=<4> ############################################################################### +Project: "t_eofitnessassembled"=.\t_eofitnessassembled.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "t_eofitnessassembledea"=.\t_eofitnessassembledea.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eoga"=.\t_eoga.dsp - Package Owner=<4> Package=<5> @@ -490,7 +522,7 @@ Package=<4> ############################################################################### -Project: "utils"=.\utils.dsp - Package Owner=<4> +Project: "tut_1_ex3"=.\tut_1_ex3.dsp - Package Owner=<4> Package=<5> {{{ @@ -502,18 +534,6 @@ Package=<4> ############################################################################### -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - Project: "tut_1_real"=.\tut_1_real.dsp - Package Owner=<4> Package=<5> @@ -526,7 +546,7 @@ Package=<4> ############################################################################### -Project: "tut_1_ex3"=.\tut_1_ex3.dsp - Package Owner=<4> +Project: "tut_2_bit"=.\tut_2_bit.dsp - Package Owner=<4> Package=<5> {{{ @@ -550,18 +570,6 @@ Package=<4> ############################################################################### -Project: "tut_2_bit"=.\tut_2_bit.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "tut_2_real"=.\tut_2_real.dsp - Package Owner=<4> Package=<5> @@ -610,7 +618,7 @@ Package=<4> ############################################################################### -Project: "tut_4_real"=.\tut_4_real.dsp - Package Owner=<4> +Project: "tut_4_es"=.\tut_4_es.dsp - Package Owner=<4> Package=<5> {{{ @@ -622,7 +630,7 @@ Package=<4> ############################################################################### -Project: "tut_4_es"=.\tut_4_es.dsp - Package Owner=<4> +Project: "tut_4_real"=.\tut_4_real.dsp - Package Owner=<4> Package=<5> {{{ @@ -693,3 +701,28 @@ Package=<4> }}} ############################################################################### + +Project: "utils"=.\utils.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/eo/win/t_eofitnessassembled.dsp b/eo/win/t_eofitnessassembled.dsp new file mode 100755 index 000000000..91a6fe385 --- /dev/null +++ b/eo/win/t_eofitnessassembled.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eofitnessassembled" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitnessassembled - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitnessassembled.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitnessassembled.mak" CFG="t_eofitnessassembled - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitnessassembled - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitnessassembled - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitnessassembled - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eofitnessassembled - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitnessassembled___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eofitnessassembled___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eofitnessassembled - Win32 Release" +# Name "t_eofitnessassembled - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoFitnessAssembled.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_eofitnessassembledea.dsp b/eo/win/t_eofitnessassembledea.dsp new file mode 100644 index 000000000..b3270eb75 --- /dev/null +++ b/eo/win/t_eofitnessassembledea.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="t_eofitnessassembledea" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eofitnessassembledea - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eofitnessassembledea.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eofitnessassembledea.mak" CFG="t_eofitnessassembledea - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eofitnessassembledea - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eofitnessassembledea - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eofitnessassembledea - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /w /W0 /GR /GX /O2 /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 eo_lib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:".\lib" + +!ELSEIF "$(CFG)" == "t_eofitnessassembledea - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eofitnessassembledea___Win32_Debug0" +# PROP BASE Intermediate_Dir "t_eofitnessassembledea___Win32_Debug0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GR /GX /ZI /Od /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NO_GNUPLOT" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 eo_libd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:".\lib" + +!ENDIF + +# Begin Target + +# Name "t_eofitnessassembledea - Win32 Release" +# Name "t_eofitnessassembledea - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoFitnessAssembledEA.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project From 45e3b86bcb011b833182e1610bba02319d1f8e7b Mon Sep 17 00:00:00 2001 From: okoenig Date: Sat, 5 Apr 2003 13:40:57 +0000 Subject: [PATCH 0963/2134] Removed function template specializations for eoScalarFitnessAssembled from classes in this file, since they do not work under Visual Studio! Reimplemented these stat classes for this new fitness class in eoAssembledFitnessStat.h --- eo/src/utils/eoStat.h | 92 +++++++------------------------------------ 1 file changed, 15 insertions(+), 77 deletions(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 25da3e2bf..cdf0f1279 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -32,7 +32,6 @@ #include #include #include -#include #include /** @@ -87,10 +86,10 @@ public : Average fitness of a population. Fitness can be: - double - eoMinimizingFitness or eoMaximizingFitness - - eoScalarFitnessAssembled: - Specify in the constructor, for which fitness term (index) the average should be evaluated. - eoParetoFitness: The average of each objective is evaluated. + + ( For eoScalarFitnessAssembled user eoAssembledFitnessStat classes.) */ #ifdef _MSC_VER template class eoAverageStat : public eoStat @@ -99,35 +98,22 @@ template class eoAverageStat : public eoStat(fitness_type(), _description), whichFitnessTerm() {} - eoAverageStat(unsigned _whichTerm, std::string _description = "Average Fitness") - : eoStat(fitness_type(), _description), whichFitnessTerm(_whichTerm) {} -#else - eoAverageStat(std::string _description = "Average Fitness") - : eoStat(fitness_type(), _description), whichFitnessTerm() {} - eoAverageStat(unsigned _whichTerm, std::string _description = "Average Fitness") - : eoStat(fitness_type(), _description), whichFitnessTerm(_whichTerm) {} -#endif + typedef typename EOT::Fitness Fitness; - static fitness_type sumFitness(double _sum, const EOT& _eot) - { + eoAverageStat(std::string _description = "Average Fitness") + : eoStat(Fitness(), _description) {} + + static Fitness sumFitness(double _sum, const EOT& _eot){ _sum += _eot.fitness(); return _sum; } eoAverageStat(double _value, std::string _desc) : eoStat(_value, _desc) {} - virtual void operator()(const eoPop& _pop) - { -#ifdef _MSC_VER - doit(_pop, EOT::Fitness()); // specializations for scalar and std::vector -#else - doit(_pop, typename EOT::Fitness()); // specializations for scalar and std::vector -#endif + virtual void operator()(const eoPop& _pop){ + doit(_pop, Fitness()); // specializations for scalar and std::vector } + private : // Specialization for pareto fitness @@ -147,33 +133,16 @@ private : value()[o] /= _pop.size(); } } - - // Specialization for eoScalarFitnessAssembled - template - void doit(const eoPop& _pop, eoScalarFitnessAssembled) - { - - if ( whichFitnessTerm >= _pop[0].fitness().size() ) - throw std::logic_error("Fitness term requested out of range"); - - double result =0.0; - for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it) - result+= it->fitness()[whichFitnessTerm]; - value().clear(); - value() = result / _pop.size(); - } - + // Default behavior template void doit(const eoPop& _pop, T) { - fitness_type v = std::accumulate(_pop.begin(), _pop.end(), fitness_type(0.0), eoAverageStat::sumFitness); + Fitness v = std::accumulate(_pop.begin(), _pop.end(), Fitness(0.0), eoAverageStat::sumFitness); value() = v / _pop.size(); } - // Store an index of the fitness term to be evaluated in eoScalarFitnessAssembled - unsigned whichFitnessTerm; }; /** @@ -223,8 +192,6 @@ public : eoNthElementFitnessStat(unsigned _whichElement, std::string _description = "nth element fitness") : eoSortedStat(Fitness(), _description), whichElement(_whichElement) {} - eoNthElementFitnessStat(unsigned _whichElement, unsigned _whichTerm, std::string _description = "nth element fitness") - : eoSortedStat(Fitness(), _description), whichElement(_whichElement), whichFitnessTerm(_whichTerm) {} virtual void operator()(const std::vector& _pop) { @@ -271,16 +238,6 @@ private : } } - // Specialization for eoScalarFitnessAssembled - template - void doit(const eoPop& _pop, eoScalarFitnessAssembled) - { - if ( whichFitnessTerm >= _pop[0].fitness().size() ) - throw std::logic_error("Fitness term requested out of range"); - value().clear(); - value() = _pop[whichElement]->fitness()[whichFitnessTerm]; - } - // for everything else template void doit(const std::vector& _pop, T) @@ -289,7 +246,6 @@ private : } unsigned whichElement; - unsigned whichFitnessTerm; }; /* Actually, you shouldn't need to sort the population to get the best fitness @@ -320,10 +276,9 @@ public : Best fitness of a population. Fitness can be: - double - eoMinimizingFitness or eoMaximizingFitness - - eoScalarFitnessAssembled: - Best individual is found according to its fitness, - specify in the constructor which fitness term of this individual should then be stored. - eoParetoFitness: + + ( For eoScalarFitnessAssembled look at eoAssembledFitnessStat ) */ #ifdef _MSC_VER @@ -339,15 +294,9 @@ public : eoBestFitnessStat(std::string _description = "Best ") : eoStat(Fitness(), _description) {} - eoBestFitnessStat(unsigned _whichTerm, std::string _description = "Best ") - : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} void operator()(const eoPop& _pop){ -#ifdef _MSC_VER - doit(_pop, EOT::Fitness() ); // specializations for scalar and std::vector -#else - doit(_pop, typename EOT::Fitness()); // specializations for scalar and std::vector -#endif + doit(_pop, Fitness() ); // specializations for scalar and std::vector } private : @@ -382,16 +331,6 @@ private : } } - // Specialization for eoScalarFitnessAssembled - template - void doit(const eoPop& _pop, eoScalarFitnessAssembled){ - - if ( whichFitnessTerm >= _pop[0].fitness().size() ) - throw std::logic_error("Fitness term requested out of range"); - value().clear(); - value() = _pop.best_element().fitness()[whichFitnessTerm]; - } - // default template void doit(const eoPop& _pop, T) @@ -399,7 +338,6 @@ private : value() = _pop.best_element().fitness(); } - unsigned whichFitnessTerm; }; template From c39b2414134f0532ac6aed667d58b708453b725d Mon Sep 17 00:00:00 2001 From: okoenig Date: Sat, 5 Apr 2003 13:42:01 +0000 Subject: [PATCH 0964/2134] added eoAssembledFitnessStat.h to implement Best and Avg Stat for eoScalarFitnessAssembled --- eo/src/do/make_checkpoint_assembled.h | 8 +- eo/src/utils/checkpointing | 1 + eo/src/utils/eoAssembledFitnessStat.h | 111 ++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 4 deletions(-) create mode 100644 eo/src/utils/eoAssembledFitnessStat.h diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h index 182e92201..92d855d4c 100644 --- a/eo/src/do/make_checkpoint_assembled.h +++ b/eo/src/do/make_checkpoint_assembled.h @@ -93,19 +93,19 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta // --------------------------- // average vals - std::vector* > avgvals( nTerms ); + std::vector* > avgvals( nTerms ); for (unsigned i=0; i < nTerms; ++i){ std::string descr = "Avg. of " + fitness_descriptions[i]; - avgvals[i] = new eoAverageStat(i, descr); + avgvals[i] = new eoAssembledFitnessAverageStat(i, descr); _state.storeFunctor( avgvals[i] ); checkpoint->add( *avgvals[i] ); } // best vals - std::vector* > bestvals( nTerms ); + std::vector* > bestvals( nTerms ); for (unsigned j=0; j < nTerms; ++j){ std::string descr = fitness_descriptions[j] + " of best ind."; - bestvals[j] = new eoBestFitnessStat(j, descr); + bestvals[j] = new eoAssembledFitnessBestStat(j, descr); _state.storeFunctor( bestvals[j] ); checkpoint->add( *bestvals[j] ); } diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 3210764ce..e2b7ce425 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/eo/src/utils/eoAssembledFitnessStat.h b/eo/src/utils/eoAssembledFitnessStat.h new file mode 100644 index 000000000..b468f564f --- /dev/null +++ b/eo/src/utils/eoAssembledFitnessStat.h @@ -0,0 +1,111 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAssembledFitnessStat.h +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// April 2003 + +//----------------------------------------------------------------------------- +// eoStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoAssembledFitnessStat_h +#define _eoAssembledFitnessStat_h + +#include +#include + +/** + Average fitness values of a population, where the fitness is + of type eoScalarAssembledFitness. Specify in the constructor, + for which fitness term (index) the average should be evaluated. +*/ +#ifdef _MSC_VER +template +class eoAssembledFitnessAverageStat : public eoStat +#else +template +class eoAssembledFitnessAverageStat : public eoStat +#endif +{ +public : + + typedef typename EOT::Fitness Fitness; + + eoAssembledFitnessAverageStat(unsigned _whichTerm=0, std::string _description = "Average Fitness") + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} + + virtual void operator()(const eoPop& _pop){ + + if ( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + + double result =0.0; + for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it) + result+= it->fitness()[whichFitnessTerm]; + + value().clear(); + value() = result / _pop.size(); + + } + +private: + // Store an index of the fitness term to be evaluated in eoScalarFitnessAssembled + unsigned whichFitnessTerm; +}; + +/** + Fitness values of best individuum in a population, where the fitness is + of type eoScalarAssembledFitness. Specify in the constructor, + for which fitness term (index) the value should be evaluated. +*/ +#ifdef _MSC_VER +template +class eoAssembledFitnessBestStat : public eoStat +#else +template +class eoAssembledFitnessBestStat : public eoStat +#endif +{ +public : + typedef typename EOT::Fitness Fitness; + + eoAssembledFitnessBestStat(unsigned _whichTerm=0, std::string _description = "Best Fitness") + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} + + virtual void operator()(const eoPop& _pop){ + + if ( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + + value().clear(); + value() = _pop.best_element().fitness()[whichFitnessTerm]; + } + +private: + // Store an index of the fitness term to be evaluated in eoScalarFitnessAssembled + unsigned whichFitnessTerm; +}; + +#endif From d51ee5916b7df005131f4b6321883551c1eda225 Mon Sep 17 00:00:00 2001 From: okoenig Date: Sat, 5 Apr 2003 13:42:44 +0000 Subject: [PATCH 0965/2134] minor changes --- eo/src/eoScalarFitnessAssembled.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 64fc674d5..522dc9732 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -84,7 +84,7 @@ private: with this quantity as if it were a ScalarType. - Global fitness value is stored as first element in the vector */ -template +template class eoScalarFitnessAssembled : public std::vector { public: @@ -176,13 +176,13 @@ public: } // implementation of the other operators - bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } + bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } // implementation of the other operators - bool operator<=( const eoScalarFitnessAssembled& y ) const { return !(*this > y); } + bool operator<=( const eoScalarFitnessAssembled& y ) const { return !(*this > y); } // implementation of the other operators - bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } + bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } }; @@ -192,19 +192,19 @@ and minimizing fitness compares with greater. This because we want ordinary fitness values (doubles) to be equivalent with Maximizing Fitness, and comparing with less is the default behaviour. */ -typedef eoScalarFitnessAssembled > eoAssembledMaximizingFitness; -typedef eoScalarFitnessAssembled > eoAssembledMinimizingFitness; +typedef eoScalarFitnessAssembled, eoScalarFitnessAssembledTraits > eoAssembledMaximizingFitness; +typedef eoScalarFitnessAssembled, eoScalarFitnessAssembledTraits > eoAssembledMinimizingFitness; -template -std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled& f) +template +std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled& f) { for (unsigned i=0; i < f.size(); ++i) os << f[i] << " "; return os; } -template -std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled& f) +template +std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled& f) { for (unsigned i=0; i < f.size(); ++i){ F value; From ba68ffe0c2ea46b0f3542d1d3fa3668533dea2fd Mon Sep 17 00:00:00 2001 From: cahon Date: Fri, 18 Apr 2003 13:32:39 +0000 Subject: [PATCH 0966/2134] missing include eoParetoFitness.h --- eo/src/eoParetoConstraintFitness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoParetoConstraintFitness.h b/eo/src/eoParetoConstraintFitness.h index 9e2b29429..c33417ad4 100644 --- a/eo/src/eoParetoConstraintFitness.h +++ b/eo/src/eoParetoConstraintFitness.h @@ -31,7 +31,7 @@ #include #include - +#include /** eoParetoOneConstraintFitness class: From af5fee947894d5c84d72cdec2cd1bc7be8564456 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 20 Apr 2003 12:57:59 +0000 Subject: [PATCH 0967/2134] Removed HAVE_SSTREAM for redhat 2.96 --- eo/acinclude.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 index 3454628cb..aa781f376 100644 --- a/eo/acinclude.m4 +++ b/eo/acinclude.m4 @@ -10,7 +10,13 @@ ac_cv_cxx_have_sstream, AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; -#endif],[stringstream message; message << "Hello"; return 0;], +#endif +#if __GNUC__ == 2 +#if __GNUC_MINOR__ == 96 +#error("force_error_for_2_96") +#endif +#endif],[stringstream message; message << "Hello"; return 0; +], ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) AC_LANG_RESTORE ]) From 364cded6a4e5dbf7aa6797ca401fcecdd38292f9 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sun, 27 Apr 2003 06:08:11 +0000 Subject: [PATCH 0968/2134] Added keywords "Sequential" and "Random" as synonyms of resp. "Deterministic" and "Uniform" - for EASEA --- eo/src/do/make_general_replacement.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eo/src/do/make_general_replacement.h b/eo/src/do/make_general_replacement.h index 9f9aba44b..dfefb649b 100644 --- a/eo/src/do/make_general_replacement.h +++ b/eo/src/do/make_general_replacement.h @@ -47,7 +47,9 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) eoReduce * ptReduce; // ---------- Deterministic - if (_ppReduce.first == std::string("Deterministic")) + if ( (_ppReduce.first == std::string("Deterministic")) || + (_ppReduce.first == std::string("Sequential")) + ) { ptReduce = new eoTruncate; } @@ -98,7 +100,9 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) ptReduce = new eoStochTournamentTruncate(p); } - else if (_ppReduce.first == std::string("Uniform")) + else if ( (_ppReduce.first == std::string("Uniform")) || + (_ppReduce.first == std::string("Random")) + ) { ptReduce = new eoRandomReduce; } From 347f64413e4f087a6bd0c399292897ad9aa2be07 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Fri, 16 May 2003 14:28:52 +0000 Subject: [PATCH 0969/2134] GCC 3.3 --- eo/config.cache | 12 +++++++----- eo/src/ga/eoBitOp.h | 8 ++++++-- eo/src/utils/eoParam.h | 24 ++++++++++++------------ eo/src/utils/eoRndGenerators.h | 2 +- eo/src/utils/eoUniformInit.h | 2 +- eo/src/utils/rnd_generators.h | 2 +- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/eo/config.cache b/eo/config.cache index c576c6ba8..bb2c1689e 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -14,20 +14,22 @@ # ac_cv_c_const=${ac_cv_c_const=yes} ac_cv_c_inline=${ac_cv_c_inline=inline} +ac_cv_cxx_have_sstream=${ac_cv_cxx_have_sstream=yes} +ac_cv_cxx_namespaces=${ac_cv_cxx_namespaces=yes} ac_cv_func_select=${ac_cv_func_select=yes} ac_cv_header_limits_h=${ac_cv_header_limits_h=yes} ac_cv_header_stdc=${ac_cv_header_stdc=yes} ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} -ac_cv_path_install=${ac_cv_path_install='$/usr/bin/install -c'} -ac_cv_prog_CPP=${ac_cv_prog_CPP='$cc -E'} -ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S='$ln -s'} +ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} +ac_cv_prog_CXX=${ac_cv_prog_CXX=/opt/intel/compiler70/ia32/bin/icpc} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} -ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} +ac_cv_prog_gxx=${ac_cv_prog_gxx=no} ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} ac_cv_type_size_t=${ac_cv_type_size_t=yes} diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 3c1ff1b2e..1bfdf0b0b 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2003-02-27 19:24:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.15 2003-02-27 19:24:47 okoenig Exp $ $Author: okoenig $ + CVS Info: $Date: 2003-05-16 14:28:52 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.16 2003-05-16 14:28:52 jeggermo Exp $ $Author: jeggermo $ */ //----------------------------------------------------------------------------- @@ -362,7 +362,11 @@ template class eoNPtsBitXover: public eoQuadOp change = !change; if (change) - std::swap(chrom1[bit], chrom2[bit]); + { + typename Chrom::AtomType tmp= chrom1[bit]; + chrom1[bit] = chrom2[bit]; + chrom2[bit] = tmp; + } } return true; diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 921d85e28..05ff9b2c0 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -192,14 +192,14 @@ public : Specialization for std::string */ template <> -std::string eoValueParam::getValue(void) const +inline std::string eoValueParam::getValue(void) const { return repValue; } template <> -void eoValueParam::setValue(std::string _value) +inline void eoValueParam::setValue(std::string _value) { if (_value.empty()) { @@ -217,7 +217,7 @@ void eoValueParam::setValue(std::string _value) /// Because MSVC does not support partial specialization, the std::pair is a double, not a T template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { // use own buffer as MSVC's buffer leaks! #ifdef HAVE_SSTREAM @@ -233,7 +233,7 @@ std::string eoValueParam >::getValue(void) const /// Because MSVC does not support partial specialization, the std::pair is a double, not a T template <> -void eoValueParam >::setValue(std::string _value) +inline void eoValueParam >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -248,7 +248,7 @@ void eoValueParam >::setValue(std::string _value) ////////////////////////////////// /// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T template <> -std::string eoValueParam > >::getValue(void) const +inline std::string eoValueParam > >::getValue(void) const { #ifdef HAVE_SSTREAM std::ostringstream os; @@ -270,7 +270,7 @@ std::string eoValueParam > >::getValue(void) con /// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T template <> -void eoValueParam > >::setValue(std::string _value) +inline void eoValueParam > >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -297,7 +297,7 @@ void eoValueParam > >::setValue(std::string _val ////////////////////////////////// /// Because MSVC does not support partial specialization, the std::vector is a double, not a T template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { #ifdef HAVE_SSTREAM std::ostringstream os; @@ -314,7 +314,7 @@ std::string eoValueParam >::getValue(void) const /// Because MSVC does not support partial specialization, the std::vector is a double, not a T template <> -void eoValueParam >::setValue(std::string _value) +inline void eoValueParam >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -331,7 +331,7 @@ void eoValueParam >::setValue(std::string _value) ////////////////////////////////// /// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { #ifdef HAVE_SSTREAM std::ostringstream os; @@ -349,7 +349,7 @@ std::string eoValueParam >::getValue(void) cons /// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T // NOTE: g++ doesn support it either!!! template <> -void eoValueParam >::setValue(std::string _value) +inline void eoValueParam >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -365,14 +365,14 @@ void eoValueParam >::setValue(std::string _valu // The std::vector ////////////////////////////////// template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { throw std::runtime_error("I cannot getValue for a std::vector"); return std::string(""); } template <> -void eoValueParam >::setValue(std::string) +inline void eoValueParam >::setValue(std::string) { throw std::runtime_error("I cannot setValue for a std::vector"); return; diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index ab5a30496..e851bb027 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -92,7 +92,7 @@ private : /// Specialization for bool, does an unbiased coin flip template <> -bool eoUniformGenerator::operator()(void) +inline bool eoUniformGenerator::operator()(void) { return uniform.flip(0.5); } diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h index 575398bbe..7960339f7 100644 --- a/eo/src/utils/eoUniformInit.h +++ b/eo/src/utils/eoUniformInit.h @@ -98,7 +98,7 @@ private : /** Specialization for bool, does an unbiased coin flip */ template <> -void eoUniformInit::operator()(bool & _b) +inline void eoUniformInit::operator()(bool & _b) { _b = uniform.flip(0.5); } diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 292205bd5..90fdd2902 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -107,7 +107,7 @@ private : /// Specialization for bool template <> -bool random_generator::operator()(void) +inline bool random_generator::operator()(void) { return random.flip(0.5); } From a7b5d90f1b4bcd622a156d527c7edfbfe63eec7e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 4 Jun 2003 09:33:27 +0000 Subject: [PATCH 0970/2134] optimized eoProportional and added universalselect --- eo/src/eoProportionalSelect.h | 31 +++++--- eo/src/eoStochasticUniversalSelect.h | 102 +++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 8 deletions(-) create mode 100755 eo/src/eoStochasticUniversalSelect.h diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index f85321f44..8c01b7503 100755 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -32,11 +32,13 @@ #include #include #include - +#include //----------------------------------------------------------------------------- /** eoProportionalSelect: select an individual proportional to her stored fitness value - + + Changed the algorithm to make use of a cumulative array of fitness scores, + This changes the algorithm from O(n) per call to O(log n) per call. (MK) */ //----------------------------------------------------------------------------- @@ -44,8 +46,7 @@ template class eoProportionalSelect: public eoSelectOne { public: /// Sanity check - eoProportionalSelect(const eoPop& pop = eoPop()): - total((pop.size() == 0) ? -1.0 : sum_fitness(pop)) + eoProportionalSelect(const eoPop& pop = eoPop()) { if (minimizing_fitness()) throw std::logic_error("eoProportionalSelect: minimizing fitness"); @@ -53,18 +54,32 @@ public: void setup(const eoPop& _pop) { - total = sum_fitness(_pop); + if (_pop.size() == 0) return; + + cumulative.resize(_pop.size()); + cumulative[0] = _pop[0].fitness(); + + for (unsigned i = 1; i < _pop.size(); ++i) + { + cumulative[i] = _pop[i].fitness() + cumulative[i-1]; + } } - /** do the selection, call roulette_wheel. + /** do the selection, */ const EOT& operator()(const eoPop& _pop) { - return roulette_wheel(_pop, total) ; + if (cumulative.size() == 0) setup(_pop); + + double fortune = rng.uniform() * cumulative.back(); + typename FitVec::iterator result = std::upper_bound(cumulative.begin(), cumulative.end(), fortune); + return _pop[result - cumulative.begin()]; } private : - typename EOT::Fitness total; + + typedef std::vector FitVec; + FitVec cumulative; }; #endif diff --git a/eo/src/eoStochasticUniversalSelect.h b/eo/src/eoStochasticUniversalSelect.h new file mode 100755 index 000000000..d9ec16ef7 --- /dev/null +++ b/eo/src/eoStochasticUniversalSelect.h @@ -0,0 +1,102 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochasticUniversalSelect.h +// (c) Maarten Keijzer 2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef eoStochasticUniversalSelect_h +#define eoStochasticUniversalSelect_h + +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- +/** eoStochasticUniversalSelect: select an individual proportional to her stored fitness + value, but in contrast with eoStochasticUniversalSelect, get rid of most finite sampling effects + by doing all selections in one go, using a single random number. +*/ +//----------------------------------------------------------------------------- + +template class eoStochasticUniversalSelect: public eoSelectOne +{ +public: + /// Sanity check + eoStochasticUniversalSelect(const eoPop& pop = eoPop()) + { + if (minimizing_fitness()) + throw std::logic_error("eoStochasticUniversalSelect: minimizing fitness"); + } + + void setup(const eoPop& _pop) + { + if (_pop.size() == 0) return; + + std::vector cumulative(_pop.size()); + + cumulative[0] = _pop[0].fitness(); + for (unsigned i = 1; i < _pop.size(); ++i) + { + cumulative[i] = _pop[i].fitness() + cumulative[i-1]; + } + + indices.reserve(_pop.size()); + indices.resize(0); + + double fortune = rng.uniform() * cumulative.back(); + double step = cumulative.back() / double(_pop.size()); + + unsigned i = std::upper_bound(cumulative.begin(), cumulative.end(), fortune) - cumulative.begin(); + + while (indices.size() < _pop.size()) { + + while (cumulative[i] < fortune) {i++;} // linear search is good enough as we average one step each time + + indices.push_back(i); + fortune += step; + if (fortune >= cumulative.back()) { // start at the beginning + fortune -= cumulative.back(); + i = 0; + } + } + } + + /** do the selection, + */ + const EOT& operator()(const eoPop& _pop) + { + if (indices.empty()) setup(_pop); + + unsigned index = indices.back(); + indices.pop_back(); + return _pop[index]; + } + +private : + + typedef std::vector IndexVec; + IndexVec indices; +}; + +#endif From b6104c6f324bbfa84e53746e298533dfcdcc5b6b Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 4 Jun 2003 09:34:26 +0000 Subject: [PATCH 0971/2134] Added tests for roulette wheel selection --- eo/test/Makefile.am | 9 +++++- eo/test/t-eoRoulette.cpp | 68 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 eo/test/t-eoRoulette.cpp diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index e1238d633..5d30ccd00 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -17,7 +17,7 @@ CXXFLAGS = -g -Wall # PLEASE don't break the line (see create_batch.sh) -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette #The run_tests script can be used to check various arguments TESTS=$(check_PROGRAMS) run_tests @@ -191,3 +191,10 @@ t_eoFitnessAssembledEA_LDFLAGS = -lm t_eoFitnessAssembledEA_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) ############################################################################### + +t_eoRoulette_SOURCES = t-eoRoulette.cpp +t_eoRoulette_DEPENDENCIES = $(DEPS) +t_eoRoulette_LDFLAGS = -lm +t_eoRoulette_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/test/t-eoRoulette.cpp b/eo/test/t-eoRoulette.cpp new file mode 100644 index 000000000..5c350122c --- /dev/null +++ b/eo/test/t-eoRoulette.cpp @@ -0,0 +1,68 @@ + +#include +#include +#include +#include + +class TestEO : public EO { public: unsigned index; }; + +using namespace std; + +template +int test_select() +{ + vector probs(4); + probs[0] = 0.1; + probs[1] = 0.4; + probs[2] = 0.2; + probs[3] = 0.3; + + vector counts(4,0.0); + + // setup population + eoPop pop; + for (unsigned i = 0; i < probs.size(); ++i) + { + pop.push_back( TestEO()); + pop.back().fitness( probs[i] * 2.1232 ); // some number to check scaling + pop.back().index = i; + } + + Select select; + + unsigned ndraws = 10000; + + for (unsigned i = 0; i < ndraws; ++i) + { + const TestEO& eo = select(pop); + + counts[eo.index]++; + } + + cout << "Threshold = " << 1./sqrt(double(ndraws)) << endl; + + for (unsigned i = 0; i < 4; ++i) + { + cout << counts[i]/ndraws << ' '; + + double c = counts[i]/ndraws; + + if (fabs(c - probs[i]) > 1./sqrt((double)ndraws)) { + cout << "ERROR" << endl; + return 1; + } + } + + cout << endl; + return 0; +} + +int main() +{ + rng.reseed(44); + + if (test_select >()) return 1; + + return test_select >(); +} + From 43b5effcdb9acb5c021303c9ea6276d10206e9e9 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 4 Jun 2003 11:50:48 +0000 Subject: [PATCH 0972/2134] added shuffle --- eo/src/eoStochasticUniversalSelect.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eo/src/eoStochasticUniversalSelect.h b/eo/src/eoStochasticUniversalSelect.h index d9ec16ef7..ac64f149f 100755 --- a/eo/src/eoStochasticUniversalSelect.h +++ b/eo/src/eoStochasticUniversalSelect.h @@ -31,6 +31,8 @@ #include #include +#include +#include //----------------------------------------------------------------------------- /** eoStochasticUniversalSelect: select an individual proportional to her stored fitness @@ -80,6 +82,11 @@ public: i = 0; } } + // shuffle + for (int i = indices.size() - 1; i > 0; --i) { + int j = rng.random(i+1); + swap(indices[i], indices[j]); + } } /** do the selection, From 0a85f1780322d65499b3970214d9ca64aedd3062 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 6 Jun 2003 10:29:13 +0000 Subject: [PATCH 0973/2134] Improved the check for changed. Now it will only set the changed flag when the elements that are flipped are actually different --- eo/src/ga/eoBitOp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 1bfdf0b0b..e5286a52f 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2003-05-16 14:28:52 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.16 2003-05-16 14:28:52 jeggermo Exp $ $Author: jeggermo $ + CVS Info: $Date: 2003-06-06 10:29:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.17 2003-06-06 10:29:13 maartenkeijzer Exp $ $Author: maartenkeijzer $ */ //----------------------------------------------------------------------------- @@ -296,7 +296,7 @@ template class eoUBitXover: public eoQuadOp bool changed = false; for (unsigned int i=0; i Date: Mon, 9 Jun 2003 06:06:13 +0000 Subject: [PATCH 0974/2134] Change in terminology: EDA (Estimation of Distribution Algorithms) replaces DEA (Distribution Evolution Algorithms), as it seems more widely used today. --- eo/src/{ => obsolete}/eoDEA.h | 0 eo/src/{ => obsolete}/eoSimpleDEA.h | 0 eo/test/t-eoPBIL.cpp | 8 ++++---- 3 files changed, 4 insertions(+), 4 deletions(-) rename eo/src/{ => obsolete}/eoDEA.h (100%) rename eo/src/{ => obsolete}/eoSimpleDEA.h (100%) diff --git a/eo/src/eoDEA.h b/eo/src/obsolete/eoDEA.h similarity index 100% rename from eo/src/eoDEA.h rename to eo/src/obsolete/eoDEA.h diff --git a/eo/src/eoSimpleDEA.h b/eo/src/obsolete/eoSimpleDEA.h similarity index 100% rename from eo/src/eoSimpleDEA.h rename to eo/src/obsolete/eoSimpleDEA.h diff --git a/eo/test/t-eoPBIL.cpp b/eo/test/t-eoPBIL.cpp index 1c28c4590..2d4f49142 100644 --- a/eo/test/t-eoPBIL.cpp +++ b/eo/test/t-eoPBIL.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include using namespace std; @@ -106,10 +106,10 @@ int main(int argc, char* argv[]) } #endif - // the algorithm: DEA + // the algorithm: EDA // don't know where else to put the population size! unsigned popSize = parser.createParam(unsigned(100), "popSize", "Population Size", 'P', "Algorithm").value(); - eoSimpleDEA dea(update, eval, popSize, checkpoint); + eoSimpleEDA eda(update, eval, popSize, checkpoint); ///// End of construction of the algorith ///////////////////////////////////////// @@ -119,7 +119,7 @@ int main(int argc, char* argv[]) //// GO /////// - dea(distrib); // run the dea + eda(distrib); // run the eda std::cout << "Final Distribution\n"; distrib.printOn(std::cout); From 21301c327dfd2f357beb1307429840f1921130df Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 9 Jun 2003 06:17:26 +0000 Subject: [PATCH 0975/2134] Change in terminology: EDA (Estimation of Distribution Algorithms) replaces DEA (Distribution Evolution Algorithms), as it seems more widely used today. --- eo/src/eoEDA.h | 46 +++++++++++++++++++ eo/src/eoSimpleEDA.h | 105 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 eo/src/eoEDA.h create mode 100644 eo/src/eoSimpleEDA.h diff --git a/eo/src/eoEDA.h b/eo/src/eoEDA.h new file mode 100644 index 000000000..490af15e6 --- /dev/null +++ b/eo/src/eoEDA.h @@ -0,0 +1,46 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEDA.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEDA_h +#define _eoEDA_h + +//----------------------------------------------------------------------------- + +#include + +/** eoEDA: Estimation of Distribution Algorithm within EO + * + * The abstract class for algorithms that evolve a probability distribution + * on the spaces of populations rather than a population + * + * It IS NOT an eoAlgo, as it evolves a distribution, not a population +*/ + +template class eoEDA: public eoUF&, void> +{ +}; + +#endif + diff --git a/eo/src/eoSimpleEDA.h b/eo/src/eoSimpleEDA.h new file mode 100644 index 000000000..1da9040ec --- /dev/null +++ b/eo/src/eoSimpleEDA.h @@ -0,0 +1,105 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSimpleEDA.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSimpleEDA_h +#define _eoSimpleEDA_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include +#include + +/** eoSimpleEDA: a very simple Estimation of Distribution Algorithm + * + * The algorithm that evolves a probability distribution + * on the spaces of populations with the loop + * generate a population from the current distribution + * evaluate that population + * update the distribution +*/ + +template class eoSimpleEDA: public eoEDA +{ + public: + + /** Ctor from an eoDistribUpdater + * ... plus an eoEval and eoContinue of course + */ + eoSimpleEDA(eoDistribUpdater& _update, + eoEvalFunc& _eval, + unsigned _popSize, + eoContinue& _continuator + ) : + update(_update), + eval(_eval), + popSize(_popSize), + continuator(_continuator) + {} + + /** The algorithm: + * generate pop from distrib, + * evaluate pop, + * update distrib + */ + virtual void operator()(eoDistribution& _distrib) + { + eoPop pop(popSize, _distrib); + do + { + try + { + apply(_distrib, pop); // re-init. of _pop from distrib + + apply(eval, pop); // eval of current population + + update(_distrib, pop); // updates distrib from _pop + + } + catch (std::exception& e) + { + std::string s = e.what(); + s.append( " in eoSimpleEDA"); + throw std::runtime_error( s ); + } + } while ( continuator( pop ) ); + } + + private: + eoDistribUpdater & update; + + eoEvalFunc& eval; + + unsigned popSize; + + eoContinue& continuator; +}; + +//----------------------------------------------------------------------------- + +#endif + From ed7902ed909d3a5086d3b124509e69d56a9223aa Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 9 Jun 2003 06:25:11 +0000 Subject: [PATCH 0976/2134] Exported operator() for eoSGATransform in abstract1.cpp --- eo/src/pyeo/abstract1.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/pyeo/abstract1.cpp b/eo/src/pyeo/abstract1.cpp index 8a443a04c..e8e847772 100644 --- a/eo/src/pyeo/abstract1.cpp +++ b/eo/src/pyeo/abstract1.cpp @@ -39,7 +39,8 @@ void abstract1() class_, bases > >("eoSGATransform", init< eoQuadOp&, double, - eoMonOp&, double>()); + eoMonOp&, double>()) + .def("__call__", &eoSGATransform::operator()); def_abstract_functor >("eoPopEvalFunc"); } From 2184dc845fa316256226d880d4a18b82a23d7e3b Mon Sep 17 00:00:00 2001 From: okoenig Date: Mon, 16 Jun 2003 21:41:30 +0000 Subject: [PATCH 0977/2134] added a public bool feasible, used to identify feasible individuals in initialization processes --- eo/src/eoScalarFitnessAssembled.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 522dc9732..fe734d76a 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -93,26 +93,37 @@ public: // Basic constructors and assignments eoScalarFitnessAssembled() - : baseVector( FitnessTraits::size() ) {} + : baseVector( FitnessTraits::size() ), + feasible(true) + {} eoScalarFitnessAssembled( size_type _n, const ScalarType& _val, const std::string& _descr="Unnamed variable" ) - : baseVector(_n, _val) + : baseVector(_n, _val), + feasible(true) { if ( _n > FitnessTraits::size() ) FitnessTraits::resize(_n, _descr); } - eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : baseVector( other ) {} + eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) + : baseVector( other ), + feasible(other.feasible) + {} eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { baseVector::operator=( other ); + feasible = other.feasible; return *this; } // Constructors and assignments to work with scalar type - eoScalarFitnessAssembled( const ScalarType& v ) : baseVector( 1, v ) {} + eoScalarFitnessAssembled( const ScalarType& v ) + : baseVector( 1, v ), + feasible(true) + {} + eoScalarFitnessAssembled& operator=( const ScalarType& v ) { if ( empty() ) @@ -120,6 +131,8 @@ public: else front() = v; + feasible=true; + return *this; } @@ -152,6 +165,13 @@ public: //! Get vector with descriptions std::vector getDescriptionVector() { return FitnessTraits::getDescriptionVector(); } + + //! Feasibility boolean + /** + * Can be specified anywhere in fitness evaluation + * as an indicator if the individual is in some feasible range. + */ + bool feasible; // Scalar type access operator ScalarType(void) const { From e17eb77e3918e532cc7ff2b04cc09b6553c8d9bc Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 17 Jun 2003 06:24:15 +0000 Subject: [PATCH 0978/2134] Changes to obsolete things --- eo/src/other/eoString.h | 5 +++++ eo/src/utils/rnd_generators.h | 1 + 2 files changed, 6 insertions(+) diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index e37adba12..85843411e 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -29,6 +29,11 @@ #include #include + +#include + +using namespace std; + //----------------------------------------------------------------------------- // eoString //----------------------------------------------------------------------------- diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 90fdd2902..d1058ab17 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -32,6 +32,7 @@ #define eoRND_GENERATORS_H #include "eoRNG.h" +#include /** The class uniform_generator can be used in the STL generate function From b354bd51f8e996c9da457540d876d83b8e07e878 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 17 Jun 2003 12:03:42 +0000 Subject: [PATCH 0979/2134] better eoString --- eo/src/other/eoString.h | 42 ++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index 85843411e..3c17b704b 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -44,23 +44,35 @@ class eoString: public EO, public std::string { public: - typedef char Type; + typedef char Type; + typedef char AtomType; + typedef std::string ContainerType; - /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator - //@{ - /// ctor - eoString( const std::string& _str ="" ) - : std::string( _str ) {}; + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + /// ctor + eoString( const std::string& _str ="" ) + : std::string( _str ) {}; - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoString";}; - //@} + /// printing... + virtual void printOn(std::ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' ' << substr() << endl; + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual std::string className() const {return "eoString";}; + //@} }; From 0b5a174da0edafeb631b73f18c021da799c2c1e3 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 18 Jun 2003 09:07:19 +0000 Subject: [PATCH 0980/2134] Eliminated using namespace std --- eo/src/other/eoString.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index 3c17b704b..58f8c40df 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -32,8 +32,6 @@ #include -using namespace std; - //----------------------------------------------------------------------------- // eoString //----------------------------------------------------------------------------- From 334f5ce3d7f619532d11d738674ce3623eef3ab8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 21 Jun 2003 06:34:00 +0000 Subject: [PATCH 0981/2134] More precise comment --- eo/tutorial/Templates/quadCrossover.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl index 13145004f..c3b92ca55 100644 --- a/eo/tutorial/Templates/quadCrossover.tmpl +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -42,7 +42,8 @@ public: string className() const { return "eoMyStructQuadCrossover"; } /** - * eoQuad crossover - modifies both parents + * eoQuad crossover - _genotype1 and _genotype2 are the (future) + * offspring, i.e. _copies_ of the parents, to be modified * @param _genotype1 The first parent * @param _genotype2 The second parent */ From 4c2d0f2ea090cca5e2b2c69217325450765abea0 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 28 Jul 2003 09:47:15 +0000 Subject: [PATCH 0982/2134] Adding the SBX operator in es dir --- eo/src/es/eoSBXcross.h | 116 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 eo/src/es/eoSBXcross.h diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h new file mode 100644 index 000000000..dc62b0f36 --- /dev/null +++ b/eo/src/es/eoSBXcross.h @@ -0,0 +1,116 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSBXcross.h +// (c) Maarten Keijzer 2000 - Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include +#include +#include + + + +template class eoSBXCrossover: public eoQuadOp +{ + public: + /**** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * + */ + eoSBXCrossover(const double& _eta = 1.0) : + bounds(eoDummyVectorNoBounds), eta(_eta), range(1) {} + + + ////////////////////////////////////////////// + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alphaMin the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + + + + eoSBXCrossover(eoRealVectorBounds & _bounds, + const double& _eta = 1.0) : + bounds(_bounds), eta(_eta), range(1) {} + + /////////////////////////////////////////////// + + + /// The class name. + virtual string className() const { return "eoSBXCrossover"; } + + /***************************************** + * SBX crossover - modifies both parents * + * @param _eo1 The first parent * + * @param _eo2 The first parent * + *****************************************/ + bool operator()(EOT& _eo1, EOT& _eo2) + { + unsigned i; + double r1, r2, beta; + + for (i=0; i<_eo1.size(); i++) + { + double u = rng.uniform(range) ; + + if ( u <= 0.5 ) + beta = exp( (1/(eta+1))*log(2*u)); + else + beta = exp((1/(eta+1))*log(1/(2*(1-u)))); + + + + r1=_eo1[i]; + r2=_eo2[i]; + _eo1[i] =0.5*((1+beta)*r1+(1-beta)*r2); + _eo2[i] =0.5*((1-beta)*r1+(1+beta)*r2); + + + if(!(bounds.isInBounds(i,_eo1[i]))) + bounds.foldsInBounds(i,_eo1[i]); + if(!(bounds.isInBounds(i,_eo2[i]))) + bounds.foldsInBounds(i,_eo2[i]); + + + + } + return true; + } + + + +protected: + eoRealVectorBounds & bounds; + double eta; + double range; // == 1 +}; + + From c249cecc62342b8f57e1979db27662bf00c5ed43 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 28 Jul 2003 09:48:58 +0000 Subject: [PATCH 0983/2134] Adding SBX crossover operator in es dir --- eo/src/es.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo/src/es.h b/eo/src/es.h index c3d307ae5..bb2023be3 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -48,6 +48,11 @@ #include #include #include // for generic operators + +// SBX crossover (following Deb) +#include + +// ES specific operators #include // Global ES Xover #include // 2-parents ES Xover From 5c7f17c1535234202caa29955da35432dba94ecd Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 29 Jul 2003 05:33:58 +0000 Subject: [PATCH 0984/2134] Forgot the dir when adding eoSBXcross.h :-((( --- eo/src/es.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/es.h b/eo/src/es.h index bb2023be3..17545f3e0 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -50,7 +50,7 @@ #include // for generic operators // SBX crossover (following Deb) -#include +#include // ES specific operators #include // Global ES Xover From b643ec2be3d7c58534591696f0a50d76b505171a Mon Sep 17 00:00:00 2001 From: okoenig Date: Wed, 30 Jul 2003 14:48:13 +0000 Subject: [PATCH 0985/2134] Inserted a missing std:: --- eo/src/es/eoSBXcross.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h index dc62b0f36..86ced64ac 100644 --- a/eo/src/es/eoSBXcross.h +++ b/eo/src/es/eoSBXcross.h @@ -65,7 +65,7 @@ template class eoSBXCrossover: public eoQuadOp /// The class name. - virtual string className() const { return "eoSBXCrossover"; } + virtual std::string className() const { return "eoSBXCrossover"; } /***************************************** * SBX crossover - modifies both parents * From 3a8d9dd7a9e038b70900d857a857eb18d30dd1d8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Aug 2003 06:42:33 +0000 Subject: [PATCH 0986/2134] Adding the generic operators for FIXED-LENGTH ORDERED genotypes eoFlOrXxxOp.h --- eo/src/eoFlOrBinOp.h | 219 +++++++++++++++++++++++++++++++++++++++++ eo/src/eoFlOrMonOp.h | 124 +++++++++++++++++++++++ eo/src/eoFlOrQuadOp.h | 213 +++++++++++++++++++++++++++++++++++++++ eo/src/ga/eoBoolFlip.h | 46 +++++++++ 4 files changed, 602 insertions(+) create mode 100644 eo/src/eoFlOrBinOp.h create mode 100644 eo/src/eoFlOrMonOp.h create mode 100644 eo/src/eoFlOrQuadOp.h create mode 100644 eo/src/ga/eoBoolFlip.h diff --git a/eo/src/eoFlOrBinOp.h b/eo/src/eoFlOrBinOp.h new file mode 100644 index 000000000..124ca4fd4 --- /dev/null +++ b/eo/src/eoFlOrBinOp.h @@ -0,0 +1,219 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlOrBinOp.h +// (c) Marc Schoenauer - Maarten Keijzer 2000-2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFlOrBinOp_h +#define _eoFlOrBinOp_h + +#include +#include + +/** Generic eoBinOps on fixed length genotypes. + * Contains exchange crossovers (1pt and uniform) + * and crossovers that applies an Atom crossover + * to all components with given rate, or + * to a fixed prescribed nb of components + * + * Example: the standard bitstring 1-point and uniform crossovers + * could be implemented as resp. eoFlOr1ptBinOp and eoFlOrUniformBinOp +*/ + +////////////////////////////////////////////////////////////////////// +// eoFlOrAllAtomBinOp +////////////////////////////////////////////////////////////////////// +/** Bin Crossover using an Atom Crossover + * that is applied to a ALL components with given rate + */ +template +class eoFlOrAllAtomBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom BinOp */ + eoFlOrAllAtomBinOp( eoBinOp& _op, float _rate = 1.0): + op(_op), rate( _rate ) {} + + /** applies Atom crossover to ALL components with given rate */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool changed = false; + for ( unsigned i = 0; i < _eo1.size(); i++ ) { + if ( rng.flip( rate ) ) { + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; + } + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrAllAtomBinOp"; } + +private: + double rate; + eoBinOp & op; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOrKAtomBinOp +////////////////////////////////////////////////////////////////////// +/** Bin Crossover using an Atom Crossover + * that is applied to a FIXED NB of components + */ +template +class eoFlOrKAtomBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom BinOp and an unsigned */ + eoFlOrAtomBinOp( eoBinOp& _op, unsigned _k = 1): + op(_op), k( _k ) {} + + /** applies the Atom BinOp to some components */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + + bool changed = false; + for ( unsigned i = 0; i < k; i++ ) // TODO: check that we don't do twice the same + { + unsigned where = eo::rng.random(_eo1.size()); + bool changedHere = op( _eo1[where], _eo2[where] ); + changed |= changedHere; + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrKAtomBinOp"; } + +private: + unsigned k; + eoBinOp & op; +}; + + +////////////////////////////////////////////////////////////////////// +// eoFlOrUniformBinOp +////////////////////////////////////////////////////////////////////// + +/** The uniform crossover - exchanges atoms uniformly ! */ +template +class eoFlOrUniformBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires a rate - 0.5 by default */ + eoFlOrUniformBinOp(double _rate=0.5) : eoBinOp(_size), + rate(_rate) {} + + /** excahnges atoms at given rate */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + for (unsigned i=0; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) + { + _eo1[i] = _eo2[i]; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrUniformBinOp"; } + +private: + double rate; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOr1ptBinOp +////////////////////////////////////////////////////////////////////// + +/** The 1pt crossover (just in case someone wants it some day!) */ +template +class eoFlOr1ptBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: no argument */ + eoVlUniformBinOp() {} + + /** exchanges first and second parts of the vectors of Atoms */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + unsigned where = eo::rng.random(_eo1.size()-1); + for (unsigned i=where+1; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) ) + { + _eo1[i] = _eo2[i]; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOr1ptBinOp"; } + +}; + + +#endif diff --git a/eo/src/eoFlOrMonOp.h b/eo/src/eoFlOrMonOp.h new file mode 100644 index 000000000..982dc7e8c --- /dev/null +++ b/eo/src/eoFlOrMonOp.h @@ -0,0 +1,124 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlOrMonOp.h +// (c) Marc Schoenauer - Maarten Keijzer 2000-2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFlOrMonOp_h +#define _eoFlOrMonOp_h + +#include +#include +#include + +/** Base classes for generic mutations on fixed length chromosomes. + * COntains 2 classes that both use an atomic mutation + * eoFlOrAllMutation applies the atom mutation to all components with given rate + * eoFlOrKMutation applies the atom mutation to a fixed nb of components + * + * Remark: the standard bit-flip mutation is an eoFlOrAllMutation + * with atom mutation == bitflipping + */ + +/** applies an atomic mutation to all the components with a given rate + */ +template +class eoFlOrAllMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom mutation and a rate */ + eoFlOrAllMutation(eoMonOp & _atomMutation, double _rate=1.0) : + atomMutation(_atomMutation), rate(_rate) {} + + /** applies the atom mutation to all components with given rate */ + bool operator()(EOT & _eo) + { + bool modified=false; + for (unsigned i=0; i<_eo.size(); i++) + if (eo::rng.flip(rate)) + if (atomMutation(_eo[i])) + modified = true; + + return modified; + } + + /** inherited className() */ + virtual string className() const + { + char s[1024]; + ostrstream os(s, 1022); + os << "eoFlOrAllMutation(" << atomMutation.className() << ")"; + return string(s); + } + +private: + eoMonOp & atomMutation; // the atom mutation + double rate; // the mutation rate PER ATOM +}; + +/** Applies an atomic mutation to a fixed + number of components (1 by default) + */ +template +class eoFlOrKMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom mutation */ + eoFlOrKMutation(eoMonOp & _atomMutation, unsigned _nb=1) : + nb(_nb), atomMutation(_atomMutation) {} + + + /** applies the atom mutation to K randomly selected components */ + bool operator()(EOT & _eo) + { + bool modified=false; + for (unsigned k=0; k & atomMutation; // the atom mutation +}; + + +#endif diff --git a/eo/src/eoFlOrQuadOp.h b/eo/src/eoFlOrQuadOp.h new file mode 100644 index 000000000..1ad873c48 --- /dev/null +++ b/eo/src/eoFlOrQuadOp.h @@ -0,0 +1,213 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlOrQuadOp.h +// (c) Marc Schoenauer - Maarten Keijzer 2000-2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFlOrQuadOp_h +#define _eoFlOrQuadOp_h + +#include +#include + +/** Generic eoQuadOps on fixed length genotypes. + * Contains exchange crossovers (1pt and uniform) + * and crossovers that applies an Atom crossover + * to all components with given rate, or + * to a fixed prescribed nb of components +*/ + +////////////////////////////////////////////////////////////////////// +// eoFlOrAllAtomQuadOp +////////////////////////////////////////////////////////////////////// + +/** Quad Crossover using an Atom Crossover + */ +template +class eoFlOrAllAtomQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom QuadOp */ + eoFlOrAllAtomQuadOp( eoQuadOp& _op, double _rate = 1): + op(_op), rate( _rate ) {} + + /** applies Atom crossover to ALL components with given rate */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + bool changed = false; + for ( unsigned i = 0; i < _eo1.size(); i++ ) { + if ( rng.flip( rate ) ) { + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; + } + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrAllAtomQuadOp"; } + +private: + double rate; + eoQuadOp & op; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOrKAtomQuadOp +////////////////////////////////////////////////////////////////////// +/** Quad Crossover using an Atom Crossover + * that is applied to a FIXED NB of components + */ +template +class eoFlOrKAtomQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom QuadOp and an unsigned */ + eoFlOrAtomQuadOp( eoQuadOp& _op, unsigned _k = 1): + op(_op), k( _k ) {} + + /** applies the Atom QuadOp to some components */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + + bool changed = false; + for ( unsigned i = 0; i < k; i++ ) // TODO: check that we don't do twice the same + { + unsigned where = eo::rng.random(_eo1.size()); + bool changedHere = op( _eo1[where], _eo2[where] ); + changed |= changedHere; + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrKAtomQuadOp"; } + +private: + unsigned k; + eoQuadOp & op; +}; + + +////////////////////////////////////////////////////////////////////// +// eoFlOrUniformQuadOp +////////////////////////////////////////////////////////////////////// +/** The uniform crossover - exchanges atoms uniformly ! */ +template +class eoFlOrUniformQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires a rate - 0.5 by default */ + eoVlUniformQuadOp(double _rate=0.5) : eoQuadOp(_size), + rate(_rate) {} + + /** excahnges atoms at given rate */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + for (unsigned i=0; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) + { + tmp = _eo1[i]; + _eo1[i] = _eo2[i]; + _eo2[i] = tmp; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrUniformQuadOp"; } + +private: + double rate; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOr1ptQuadOp +////////////////////////////////////////////////////////////////////// +/** The 1pt crossover (just in case someone wants it some day!) */ +template +class eoFlOr1ptQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: no argument */ + eoVlUniformQuadOp() {} + + /** exchanges first and second parts of the vectors of Atoms */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + unsigned where = eo::rng.random(_eo1.size()-1); + for (unsigned i=where+1; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) ) + { + tmp = _eo1[i]; + _eo1[i] = _eo2[i]; + _eo2[i] = tmp; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOr1ptQuadOp"; } + +}; + + +#endif diff --git a/eo/src/ga/eoBoolFlip.h b/eo/src/ga/eoBoolFlip.h new file mode 100644 index 000000000..cf226ebac --- /dev/null +++ b/eo/src/ga/eoBoolFlip.h @@ -0,0 +1,46 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBoolFlip.h +// (c) Marc Schoenauer, 2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoBoolFlip_h +#define _eoBoolFlip_h + +#include + +/** a simple boolean mutation - to be used in generic eoOp's + */ +class eoBoolFlip : public eoMonOp { +public: + /** simply flips the boolean argument */ + bool operator()(bool & _b) + { + _b = !_b; + return true; + } + + /** inherited className() */ + virtual string className() const {return "boolFlip";} + +}; + +#endif From 4238ee1bd3d1721821b87f86873fb9cadcfd4325 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 2 Aug 2003 06:55:47 +0000 Subject: [PATCH 0987/2134] CLean-up --- eo/src/eoVariableLengthCrossover.h | 37 +++++++++++++++++------------- eo/src/eoVariableLengthMutation.h | 13 ++++++----- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index db5696254..6a4bf7876 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -18,10 +18,8 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - CVS Info: $Date: 2003-03-21 02:38:57 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVariableLengthCrossover.h,v 1.9 2003-03-21 02:38:57 maartenkeijzer Exp $ $Author: maartenkeijzer $ + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl */ //----------------------------------------------------------------------------- @@ -43,20 +41,23 @@ template class eoAtomExchange : public eoBF { public: - // a function to initlialize - to be called before every crossover + /** a function to initlialize - to be called before every crossover */ virtual void randomize(unsigned int, unsigned int){} + /** the inherited className() */ virtual std::string className() const=0; }; -/** Uniform crossover - well, not really for FixedLength */ +/** Uniform crossover - well, not really, efficient for FixedLength */ template class eoUniformAtomExchange: public eoAtomExchange { public: eoUniformAtomExchange(double _rate=0.5):rate(_rate){} - // randomize: fill the mask: the exchange will be simulated first - // to see if sizes are OK, so it must be repeatable + /** randomize: fill the mask: the exchange will be simulated first + * to see if sizes are OK, so it must be repeatable : + * the mask has to be a private data, cannot be computed on the fly + */ void randomize(unsigned _size1, unsigned _size2) { mask.resize(_size1 + _size2); @@ -64,12 +65,13 @@ public: mask[i]=eo::rng.flip(rate); } - // the operator() simply returns the mask booleans in turn + /** the operator() simply returns the mask booleans in turn */ bool operator()(unsigned _i, Atom & ) { return mask[_i]; } + /** inherited className() */ virtual std::string className() const {return "eoUniformAtomExchange";} private: @@ -77,10 +79,12 @@ private: std::vector mask; }; +///////////////////////////////////////////////////////////////////// +////// Now the operators themsleves +///////////////////////////////////////////////////////////////////// /** Exchange Crossover using an AtomExchange */ - template class eoVlAtomExchangeQuadOp : public eoQuadOp { @@ -88,7 +92,7 @@ public : typedef typename EOT::AtomType AtomType; - // default ctor: requires bounds on number of genes + a rate + /** default ctor: requires bounds on number of genes + a rate */ eoVlAtomExchangeQuadOp(unsigned _Min, unsigned _Max, eoAtomExchange& _atomExchange): Min(_Min), Max(_Max), atomExchange(_atomExchange) {} @@ -148,6 +152,7 @@ public : return true; // should we test that? Yes, but no time now } + /** the inherited className */ virtual std::string className() const { #ifdef HAVE_SSTREAM @@ -155,7 +160,6 @@ public : os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")"; return os.str() #else - char s[1024]; std::ostrstream os(s, 1022); os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")" << std::ends; @@ -168,9 +172,9 @@ private: eoAtomExchange & atomExchange; }; -/** Crossover using an AtomCrossover (probably irrelevant in Variable Length) +/** Crossover using an AtomCrossover. Probably irrelevant in Variable Length - + see eoFlOrBinOp.h and eoFlOrQuadOp.h for the similar Fixed Length operators */ - template class eoInnerExchangeQuadOp : public eoQuadOp { @@ -178,10 +182,11 @@ public : typedef typename EOT::AtomType AtomType; - // default ctor: requires bounds on number of genes + a rate + /** default ctor: requires bounds on number of genes + a rate */ eoInnerExchangeQuadOp( eoQuadOp& _op, float _rate = 0.5): op(_op), rate( _rate ) {} + /** performs the Atom crossover */ bool operator()(EOT & _eo1, EOT & _eo2) { unsigned size1 = _eo1.size(), size2 = _eo2.size(), minsize = ( size1 > size2)?size2:size1; @@ -210,7 +215,7 @@ private: -/** Direct Uniform Exchange of genes (obsolete, already :-) +/** Direct Uniform Exchange of genes (obsolete, already :-) stays there for historical reasons A very primitive version, that does no verification at all!!! NEEDS to be improved - but no time now :-((( diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 30b1d3b0c..2a17da685 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoVariableLengthMutation.h -// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +// (c) Marc Schoenauer 1999 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,10 +18,8 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - CVS Info: $Date: 2003-03-21 02:38:57 $ $Version$ $Author: maartenkeijzer $ + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl */ //----------------------------------------------------------------------------- @@ -61,6 +59,7 @@ public : eoVlAddMutation(unsigned _nMax, eoInit & _atomInit) : nMax(_nMax), atomInit(_atomInit) {} + /** operator: actually adds an Atom */ bool operator()(EOT & _eo) { if (_eo.size() >= nMax) @@ -72,6 +71,7 @@ public : return true; } + /** inherited className */ virtual std::string className() const { return "eoVlAddMutation"; } private: @@ -79,6 +79,7 @@ private: eoInit & atomInit; }; + /** A helper class for choosing which site to delete */ template class eoGeneDelChooser : public eoUF @@ -120,7 +121,7 @@ public : eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : nMin(_nMin), uChooser(), chooser(_chooser) {} - /** ctor with uniform gene chooser + /** ctor with uniform gene chooser - the default * @param nMin min number of atoms to leave in the individual */ From aac8ff6cb98f5a4a5ae4482dfe4381f0916dd6d6 Mon Sep 17 00:00:00 2001 From: okoenig Date: Thu, 21 Aug 2003 13:02:53 +0000 Subject: [PATCH 0988/2134] added parameters to the constructors to start generation counting !=0 the parameters are optional and appended in the end --- eo/src/utils/eoFileSnapshot.h | 12 ++++++++---- eo/src/utils/eoGnuplot1DSnapshot.h | 12 ++++++------ eo/src/utils/eoUpdater.h | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 67182d798..ed2857685 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -56,12 +56,13 @@ public : typedef std::vector vDouble; typedef eoValueParam > vDoubleParam; - eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, - std::string _filename = "gen", std::string _delim = " "): + eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, std::string _filename = "gen", + std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true): dirname(_dirname), frequency(_frequency), - filename(_filename), delim(_delim), counter(0), boolChanged(true) + filename(_filename), delim(_delim), counter(_counter), boolChanged(true) { std::string s = "test -d " + dirname; + int res = system(s.c_str()); // test for (unlikely) errors if ( (res==-1) || (res==127) ) @@ -71,10 +72,13 @@ public : { s = std::string("mkdir ")+dirname; } - else + else if (!res && _rmFiles) { s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; } + else + s = " "; + system(s.c_str()); // all done } diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index a8a967b24..0e208321e 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -58,17 +58,17 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot public: // Ctor eoGnuplot1DSnapshot(std::string _dirname, unsigned _frequency = 1, - std::string _filename = "gen", std::string _delim = " ") : - eoFileSnapshot(_dirname, _frequency, _filename, _delim), + std::string _filename = "gen", std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true) : + eoFileSnapshot(_dirname, _frequency, _filename, _delim, _counter, _rmFiles), eoGnuplot(_filename,"set data style points"), pointSize(5) {} // Ctor - eoGnuplot1DSnapshot(std::string _dirname, eoRealVectorBounds & _bounds, - unsigned _frequency = 1, - std::string _filename = "gen", std::string _delim = " ") : - eoFileSnapshot(_dirname, _frequency, _filename, _delim), + eoGnuplot1DSnapshot(std::string _dirname, eoRealVectorBounds & _bounds, + unsigned _frequency = 1, std::string _filename = "gen", + std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true ) : + eoFileSnapshot(_dirname, _frequency, _filename, _delim, _counter, _rmFiles), eoGnuplot(_filename,"set data style points"), pointSize(5) { diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index 4d87906b5..c708fd5d9 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -119,13 +119,13 @@ private : class eoCountedStateSaver : public eoUpdater { public : - eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix, bool _saveOnLastCall, std::string _extension = "sav") - : state(_state), interval(_interval), counter(0), + eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix, bool _saveOnLastCall, std::string _extension = "sav", unsigned _counter = 0) + : state(_state), interval(_interval), counter(_counter), saveOnLastCall(_saveOnLastCall), prefix(_prefix), extension(_extension) {} - eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav") - : state(_state), interval(_interval), counter(0), + eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav", unsigned _counter = 0) + : state(_state), interval(_interval), counter(_counter), saveOnLastCall(true), prefix(_prefix), extension(_extension) {} From baeeeec1e51873e3eca706458742cfb35569aed8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 26 Aug 2003 18:07:06 +0000 Subject: [PATCH 0989/2134] Corrected a HUGE bug in eoRealUXover !!! Thanks to Gilles BAUDRILLARD - EADS --- eo/src/es/eoRealOp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 405f9692e..7faef3dc5 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -484,7 +484,7 @@ template class eoRealUXover: public eoQuadOp for (unsigned int i=0; i<_eo1.size(); i++) { if (rng.flip(preference)) - if (_eo1[i] == _eo2[i]) + if (_eo1[i] != _eo2[i]) { double tmp = _eo1[i]; _eo1[i]=_eo2[i]; From 0f8244e6940f640fea5429b54b18f34c906a29fe Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 1 Sep 2003 12:56:29 +0000 Subject: [PATCH 0990/2134] =?UTF-8?q?Added=202=20missing=20headers=20(and?= =?UTF-8?q?=20broke=20the=20long=20lines).=20Thanks=20to=20Jochen=20K?= =?UTF-8?q?=C3=BCpper=20for=20pointing=20this=20out.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/es/Makefile.am | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index b30a704a6..8c01cf159 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -6,9 +6,14 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libes.a -libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp make_continue_real.cpp make_genotype_real.cpp make_op_real.cpp make_pop_real.cpp make_run_real.cpp make_algo_scalar_es.cpp make_checkpoint_es.cpp make_continue_es.cpp make_genotype_es.cpp make_op_es.cpp make_pop_es.cpp make_run_es.cpp +libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp make_continue_real.cpp \ +make_genotype_real.cpp make_op_real.cpp make_pop_real.cpp make_run_real.cpp make_algo_scalar_es.cpp \ +make_checkpoint_es.cpp make_continue_es.cpp make_genotype_es.cpp make_op_es.cpp make_pop_es.cpp \ +make_run_es.cpp CPPFLAGS = -Wall CXXFLAGS = libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h eoEsSimple.h eoEsStdev.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h eoEsStandardXover.h eoRealAtomXover.h +libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h \ +eoEsSimple.h eoEsStdev.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h \ +eoEsStandardXover.h eoRealAtomXover.h eoRealInitBounded.h eoSBXcross.h From 45a2d08432942c1998786cbb28af9604f0cd6e18 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 2 Sep 2003 05:49:37 +0000 Subject: [PATCH 0991/2134] Slightly modified the formula: the worst individual had "fitness" 0 in hte case of linear scaling with pressure=2. Now it has fitness 1/[P(P-1)/2] Thanks to Gilles BAUDRILLARD (EADS) --- eo/src/eoRanking.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index 5b7421be2..3918cc538 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -81,7 +81,7 @@ public: for (unsigned i=0; i 1/[P(P-1)/2] } } else // exponent != 1 @@ -91,7 +91,7 @@ public: { int which = lookfor(rank[i], _pop); // value in in [0,1] - double tmp = ((double)(pSizeMinusOne-i))/pSizeMinusOne; + double tmp = ((double)(pSize-i))/pSize; // to the exponent, and back to [m,M] value()[which] = gamma*pow(tmp, exponent)+beta; } From 31971866e84465a481b0a3136c490b5a4c3714fb Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 18 Sep 2003 15:09:34 +0000 Subject: [PATCH 0992/2134] Modified a wrong link --- eo/tutorial/html/eoTopDown.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 0895baa16..c9a668acb 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -48,7 +48,7 @@ populations, ...).

  • -Lesson 4 - The same algorithms - again! - +Lesson 4 - The same algorithms - again! - but now fully operational: every component of the algorithm can be defined on the command-line, except the type of genotype; moreover, you now have a full library, i.e. @@ -95,7 +95,7 @@ e.g. binary, n-ary, or even specific mate selection (your brain and my beauty)! Add your own to the basic algorithm using the template files.
  • -Lesson 7 - Use predefined generic representations. +Lesson 8 - Use predefined generic representations. The eoFixedLength and eoVariableLength super classes allow quick definition of new genotypes that handle identical Atoms, together with generic variation operators.
  • From bc1e98a65af47e7e9ad4dde5fe6714693b1ca768 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 20 Sep 2003 05:42:23 +0000 Subject: [PATCH 0993/2134] Updated lists of headers in some Makefile.am (thanks to Claude Dion for pointing this out) While there, changed the presentations of source and headers (1 per line with \) --- eo/src/es/Makefile.am | 42 +++++++++++++++++++++++++++++++++++------- eo/src/ga/Makefile.am | 22 ++++++++++++++++++++-- eo/src/gp/Makefile.am | 8 +++++++- 3 files changed, 62 insertions(+), 10 deletions(-) diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 8c01cf159..b6b056fe5 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -6,14 +6,42 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libes.a -libes_a_SOURCES = make_algo_scalar_real.cpp make_checkpoint_real.cpp make_continue_real.cpp \ -make_genotype_real.cpp make_op_real.cpp make_pop_real.cpp make_run_real.cpp make_algo_scalar_es.cpp \ -make_checkpoint_es.cpp make_continue_es.cpp make_genotype_es.cpp make_op_es.cpp make_pop_es.cpp \ -make_run_es.cpp +libes_a_SOURCES = make_algo_scalar_es.cpp \ + make_algo_scalar_real.cpp \ + make_checkpoint_es.cpp \ + make_checkpoint_real.cpp \ + make_continue_es.cpp \ + make_continue_real.cpp \ + make_genotype_es.cpp \ + make_genotype_real.cpp \ + make_op_es.cpp \ + make_op_real.cpp \ + make_pop_es.cpp \ + make_pop_real.cpp \ + make_run_es.cpp \ + make_run_real.cpp CPPFLAGS = -Wall CXXFLAGS = libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h eoEsFull.h eoEsMutate.h eoEsMutationInit.h \ -eoEsSimple.h eoEsStdev.h eoNormalMutation.h eoReal.h eoRealOp.h eoEsGlobalXover.h \ -eoEsStandardXover.h eoRealAtomXover.h eoRealInitBounded.h eoSBXcross.h +libeoinc_HEADERS = eoEsChromInit.h \ + eoEsFull.h \ + eoEsGlobalXover.h \ + eoEsMutate.h \ + eoEsMutationInit.h \ + eoEsSimple.h \ + eoEsStandardXover.h \ + eoEsStdev.h \ + eoNormalMutation.h \ + eoRealAtomXover.h \ + eoReal.h \ + eoRealInitBounded.h \ + eoRealOp.h \ + eoSBXcross.h \ + make_es.h \ + make_genotype_real.h \ + make_op_es.h \ + make_op.h \ + make_op_real.h \ + make_real.h + diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 68d6194ac..b06e9dcfc 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -6,8 +6,26 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libga.a -libga_a_SOURCES = make_algo_scalar_ga.cpp make_checkpoint_ga.cpp make_continue_ga.cpp make_genotype_ga.cpp make_op_ga.cpp make_pop_ga.cpp make_run_ga.cpp +libga_a_SOURCES = make_algo_scalar_ga.cpp \ + make_checkpoint_ga.cpp \ + make_continue_ga.cpp \ + make_genotype_ga.cpp \ + make_op_ga.cpp \ + make_pop_ga.cpp \ + make_run_ga.cpp + CPPFLAGS = -Wall CXXFLAGS = libeoincdir = $(includedir)/eo/ga -libeoinc_HEADERS = eoBit.h eoBitOp.h eoBitOpFactory.h make_ga.h +libeoinc_HEADERS = eoBit.h \ + eoBitOpFactory.h \ + eoBitOp.h \ + eoBoolFlip.h \ + eoPBILAdditive.h \ + eoPBILDistrib.h \ + eoPBILOrg.h \ + make_ga.h \ + make_genotype_ga.h \ + make_op.h \ + make_PBILdistrib.h \ + make_PBILupdate.h diff --git a/eo/src/gp/Makefile.am b/eo/src/gp/Makefile.am index 1775610aa..2de158c3a 100644 --- a/eo/src/gp/Makefile.am +++ b/eo/src/gp/Makefile.am @@ -5,4 +5,10 @@ ############################################################################### libeoincdir = $(includedir)/eo/gp -libeoinc_HEADERS = eoParseTree.h node_pool.h parse_tree.h eoParseTreeDepthInit.h eoParseTreeOp.h +libeoinc_HEADERS = eoParseTreeDepthInit.h \ + eoParseTree.h \ + eoParseTreeOp.h \ + eoStParseTreeDepthInit.h \ + eoStParseTreeOp.h \ + node_pool.h \ + parse_tree.h From fd2fcc8e2ba7ffe6bca2e0a88a38d013d798c28a Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 12 Oct 2003 20:53:28 +0000 Subject: [PATCH 0994/2134] Sort dissappeared in one-objective --- eo/src/eoNDSorting.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 67db237e2..002d28c16 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -101,7 +101,9 @@ private : tmp_pop[i].fitness(_pop[i].fitness()); tmp_pop[i].index = i; } - + + sort(tmp_pop.begin(), tmp_pop.end(), std::greater()); + for (i = 0; i < _pop.size(); ++i) { value()[tmp_pop[i].index] = _pop.size() - i; // set rank From 91c45767c03629341f8977bbf42ca36844e6f03e Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sun, 12 Oct 2003 23:49:23 +0000 Subject: [PATCH 0995/2134] oops, forgot std:: --- eo/src/eoNDSorting.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index 002d28c16..2efafdb9a 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -102,7 +102,7 @@ private : tmp_pop[i].index = i; } - sort(tmp_pop.begin(), tmp_pop.end(), std::greater()); + std::sort(tmp_pop.begin(), tmp_pop.end(), std::greater()); for (i = 0; i < _pop.size(); ++i) { From 099b24d3639cf9c04342fe1976ce5f542f9b7719 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 4 Nov 2003 15:29:24 +0000 Subject: [PATCH 0996/2134] eoData has been changed slightly for MacOSX --- eo/src/utils/eoData.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index 6fd9a8b5d..3ede8d38c 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -41,23 +41,25 @@ #else #include #include -#ifndef _WIN32 // should be the define for UN*X flavours: _POSIX?? - #include -#endif - #ifndef MAXFLOAT - #define MAXFLOAT (float)1e127 - #define MAXDOUBLE (double)1.79769313486231570e+308 - #define MAXINT 2147483647 - #endif #endif -// Added because it does not seem to be defined with Cygwin??? +#if !defined(_WIN32) && !defined(__CYGWIN__) && !(defined(__APPLE__) || defined(MACOSX)) + #include +#endif + +// for cygwin and windows (and possibly MacOsX) #ifndef MINFLOAT #define MINFLOAT ( (float)1e-127 ) #endif #ifndef MAXFLOAT #define MAXFLOAT ( (float)1e127 ) #endif +#ifndef MAXINT + #define MAXINT 2147483647 +#endif +#ifndef MAXDOUBLE + #define MAXDOUBLE (double)1.79769313486231570e+308 +#endif #ifndef _MSC_VER #include From 7c8da3722ef023bba9c463d70c49bdf0e1c7d5a4 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 4 Nov 2003 15:32:24 +0000 Subject: [PATCH 0997/2134] parse_tree.h now uses standard memory allocation for MacOSX --- eo/src/gp/parse_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index 032606ee0..eece67ed3 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -186,7 +186,7 @@ class subtree TODO: use the std::allocator interface */ -#if (defined(__GNUC__) || defined(_MSC_VER)) && !defined(_MT) // not multithreaded +#if (defined(__GNUC__) || defined(_MSC_VER)) && !(defined(_MT) || defined(MACOSX) || defined(__APPLE__)) // not multithreaded (or MACOSX - J. Eggermont) Node_alloc node_allocator; Tree_alloc tree_allocator; #else From aa76efbb29585762a8a337c6507ae2a4997b33ec Mon Sep 17 00:00:00 2001 From: okoenig Date: Wed, 19 Nov 2003 13:29:15 +0000 Subject: [PATCH 0998/2134] Added possibility to print header to first line of output file; control through last bool in constructor - default = false... --- eo/src/utils/eoFileMonitor.cpp | 5 ++++ eo/src/utils/eoFileMonitor.h | 43 ++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index edd542e5a..1b42bbd84 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -52,6 +52,11 @@ eoMonitor& eoFileMonitor::operator()(void) throw runtime_error(str); } + if (firstcall && !keep && header ){ + printHeader(); + firstcall = false; + } + return operator()(os); } diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 543bd5938..0d6d3b394 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk -CVS Info: $Date: 2003-02-27 19:21:19 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.11 2003-02-27 19:21:19 okoenig Exp $ $Author: okoenig $ +CVS Info: $Date: 2003-11-19 13:29:15 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.12 2003-11-19 13:29:15 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -45,32 +45,35 @@ MS 25/11/00 class eoFileMonitor : public eoMonitor { public : - eoFileMonitor(std::string _filename, std::string _delim = " ", - bool _keep = false) : - filename(_filename), delim(_delim), keep(_keep) + + eoFileMonitor(std::string _filename, std::string _delim = " ", bool _keep = false, bool _header=false) + : filename(_filename), delim(_delim), keep(_keep), header(_header), firstcall(true) { - if (! _keep) - { - std::ofstream os(filename.c_str()); - if (!os) - { - std::string str = "eoFileMonitor: Could not open " + filename; - throw std::runtime_error(str); - } + if (! _keep) { + std::ofstream os(filename.c_str()); + if (!os){ + std::string str = "eoFileMonitor: Could not open " + filename; + throw std::runtime_error(str); } + } } - eoMonitor& operator()(void); + + eoMonitor& operator()(void); - eoMonitor& operator()(std::ostream& os); + eoMonitor& operator()(std::ostream& os); - void printHeader(void); - virtual void printHeader(std::ostream& os); - virtual std::string getFileName() // for eoGnuPlot - { return filename;} + void printHeader(void); + virtual void printHeader(std::ostream& os); + + virtual std::string getFileName() { return filename;} + private : - std::string filename; - std::string delim; + std::string filename; + std::string delim; bool keep; // should we append or create a new file + bool header; // printing header at begin of file? + bool firstcall; + }; #endif From f71b436120da7b742922ca4302a6502b1b19251e Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 26 Nov 2003 11:15:59 +0000 Subject: [PATCH 0999/2134] THe call to randomize was forgotten after the choice of a terminal at max_depth. This was only visible if - you implemented the randomize method - you reached the maximum depth (or used ramped half-and-half). --- eo/src/gp/eoParseTreeDepthInit.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index 3cd95b04f..2f41c2fb9 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -133,6 +133,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > if (the_max == 1) { // generate terminals only typename std::vector::iterator it = initializor.begin() + rng.random(last_terminal); + it->randomize(); sequence.push_front(*it); return; } From 926286b969e353253ada6e45dfcc25c4094ce8ac Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 26 Nov 2003 14:20:26 +0000 Subject: [PATCH 1000/2134] A minor typo ... --- eo/src/utils/eoFDCStat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h index 55aca7378..05964885c 100644 --- a/eo/src/utils/eoFDCStat.h +++ b/eo/src/utils/eoFDCStat.h @@ -52,7 +52,7 @@ public : theBest(_theBest), boolOpt(true) {} /** Compute the FDC - either from best in pop, or from absolute best - * if it was past in the constructor + * if it was passed in the constructor */ virtual void operator()(const eoPop& _pop) { From 041791eb4b2b96ceefde882df5ed60a19dfcc109 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Dec 2003 05:38:02 +0000 Subject: [PATCH 1001/2134] Added a few user-friendly comments in case sizes don't match between load file and required popsize --- eo/src/do/make_pop.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 244485df0..87d7e5f3f 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -78,6 +78,13 @@ eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _ini for (unsigned i=0; i popSize.value()) + { + std::cerr << "WARNING, Load file contained too many individuals. Only the best will be retained" << std::endl; + pop.resize(popSize.value()); + } } else // nothing loaded from a file { From a3d7e396b41c4006178ac4a24dfee1b52fb2d128 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Dec 2003 05:39:40 +0000 Subject: [PATCH 1002/2134] There was an infinite loop in case of a file without section header on first line! --- eo/src/utils/eoState.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index 814a4aaae..5d3797ba9 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -98,8 +98,8 @@ void eoState::load(std::istream& is) string str = "Error while reading stream"; throw runtime_error(str); } - - while(is) + + while(! is.eof()) { // parse section header if (is_section(str, name)) { @@ -125,8 +125,10 @@ void eoState::load(std::istream& is) while (getline(is, str)) { - if (is_section(str, name)) - break; + if (is.eof()) + throw runtime_error("No section in load file"); + if (is_section(str, name)) + break; removeComment(str, getCommentString()); fullstring += str + "\n"; @@ -139,6 +141,12 @@ void eoState::load(std::istream& is) object->readFrom(the_stream); } } + else // if (is_section(str, name)) - what if file empty + { + getline(is, str); // try next line! + // if (is.eof()) + // throw runtime_error("No section in load file"); + } } } From c819ba4f6afb25a96750523d8dac87a6a5032f92 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 24 Dec 2003 16:38:02 +0000 Subject: [PATCH 1003/2134] Corrected a but in eoUniformMutation (only the first component ever got modified! Thanks to Jeroen's student ... --- eo/src/es/eoRealOp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 7faef3dc5..c2eae2f15 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -101,7 +101,7 @@ template class eoUniformMutation: public eoMonOp { if (rng.flip(p_change[0])) { - _eo[0] += 2*epsilon[0]*rng.uniform()-epsilon[0]; + _eo[lieu] += 2*epsilon[0]*rng.uniform()-epsilon[0]; hasChanged = true; } } From 31aa0eedf761de4d8ac5aa18f38a697893d00762 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 13 Jan 2004 03:35:27 +0000 Subject: [PATCH 1004/2134] Added the standard header - just a test of CVS in fact! --- eo/app/gprop/gprop.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index a0c7c0ecf..dc75b5c3b 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -1,7 +1,28 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- // gprop.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ //----------------------------------------------------------------------------- + #ifndef gprop_h #define gprop_h From 4662677a5feed26ab63dbd7d0f5b04defc09ab8d Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 13 Jan 2004 20:21:52 +0000 Subject: [PATCH 1005/2134] Made it compile under gcc 3.2.2 by adding explicit definitions of normally derived comparison operators >, >=, and == for the structure phenotype. ( adding #include was not sufficient to solve the problem) Also added function gprop_use_datasets() to give more flexibility in subclassing the datasets used to train the nets. --- eo/app/gprop/gprop.cpp | 20 +++++++++------- eo/app/gprop/gprop.h | 54 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/eo/app/gprop/gprop.cpp b/eo/app/gprop/gprop.cpp index 7758ec35b..10871d21e 100644 --- a/eo/app/gprop/gprop.cpp +++ b/eo/app/gprop/gprop.cpp @@ -16,6 +16,7 @@ using namespace std; //----------------------------------------------------------------------------- unsigned in, out, hidden; +mlp::set train, validate, test; //----------------------------------------------------------------------------- // parameters @@ -77,16 +78,17 @@ void arg(int argc, char** argv) exit(EXIT_SUCCESS); } - load_file(trn_set, "trn"); - load_file(val_set, "val"); - load_file(tst_set, "tst"); + load_file(train, "trn"); + load_file(validate, "val"); + load_file(test, "tst"); - phenotype::trn_max = trn_set.size(); - phenotype::val_max = val_set.size(); - phenotype::tst_max = tst_set.size(); + phenotype::trn_max = train.size(); + phenotype::val_max = validate.size(); + phenotype::tst_max = test.size(); - in = trn_set.front().input.size(); - out = trn_set.front().output.size(); + in = train.front().input.size(); + out = train.front().output.size(); + gprop_use_datasets(&train, &validate, &test); hidden = hiddenp.value(); } @@ -133,7 +135,7 @@ void ga() // stop condition eoGenContinue continuator1(generations.value()); - phenotype p; p.val_ok = val_set.size() - 1; p.mse_error = 0; + phenotype p; p.val_ok = validate.size() - 1; p.mse_error = 0; eoFitContinue continuator2(p); eoCombinedContinue continuator(continuator1, continuator2); diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index dc75b5c3b..da2f41d7c 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -54,6 +54,23 @@ struct phenotype { return a.val_ok < b.val_ok || !(b.val_ok < a.val_ok) && b.mse_error < a.mse_error; } + + friend bool operator==(const phenotype& a, const phenotype& b) + { + return a.val_ok == b.val_ok && b.mse_error == a.mse_error; + } + + friend bool operator>=(const phenotype& a, const phenotype& b) + { + return !(a < b); + } + + friend bool operator>(const phenotype& a, const phenotype& b) + { + return (!(a == b)) && (!(a < b)); + } + + friend ostream& operator<<(ostream& os, const phenotype& p) { @@ -69,6 +86,7 @@ struct phenotype } }; + unsigned phenotype::trn_max = 0, phenotype::val_max = 0, phenotype::tst_max = 0; //----------------------------------------------------------------------------- @@ -121,7 +139,21 @@ public: // global variables //----------------------------------------------------------------------------- -mlp::set trn_set, val_set, tst_set; +mlp::set *trn_set = 0, *val_set = 0, *tst_set = 0; + +void gprop_use_datasets(mlp::set *trn, mlp::set *val, mlp::set *tst) { + trn_set = trn; + val_set = val; + tst_set = tst; +} + +void ensure_datasets_initialized() { + if (!trn_set) { + cerr << "trn_set is not initialized. Must call gprop_use_datasets before training\n"; + cerr.flush(); + abort(); + } +} //----------------------------------------------------------------------------- // eoChromMutation @@ -133,7 +165,7 @@ public: bool operator()(Chrom& chrom) { mse::net tmp(chrom); - tmp.train(trn_set, 10, 0, 0.001); + tmp.train(*trn_set, 10, 0, 0.001); return true; } }; @@ -151,8 +183,9 @@ public: chrom2.desaturate(); mse::net tmp1(chrom1), tmp2(chrom2); - tmp1.train(trn_set, 100, 0, 0.001); - tmp2.train(trn_set, 100, 0, 0.001); + ensure_datasets_initialized(); + tmp1.train(*trn_set, 100, 0, 0.001); + tmp2.train(*trn_set, 100, 0, 0.001); return true; } @@ -162,11 +195,11 @@ public: // eoChromEvaluator //----------------------------------------------------------------------------- -unsigned correct(const mlp::net& net, const qp::set& set) +unsigned correct(const mlp::net& net, const mlp::set& set) { unsigned sum = 0; - for (qp::set::const_iterator s = set.begin(); s != set.end(); ++s) + for (mlp::set::const_iterator s = set.begin(); s != set.end(); ++s) { unsigned partial = 0; @@ -185,10 +218,11 @@ unsigned correct(const mlp::net& net, const qp::set& set) phenotype eoChromEvaluator(const Chrom& chrom) { phenotype p; - p.trn_ok = correct(chrom, trn_set); - p.val_ok = correct(chrom, val_set); - p.tst_ok = correct(chrom, tst_set); - p.mse_error = mse::error(chrom, val_set); + ensure_datasets_initialized(); + p.trn_ok = correct(chrom, *trn_set); + p.val_ok = correct(chrom, *val_set); + p.tst_ok = correct(chrom, *tst_set); + p.mse_error = mse::error(chrom, *val_set); return p; }; From 0a9f57e6521f4515ee8b9117970b0a4f4abca5c2 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 13 Jan 2004 20:28:33 +0000 Subject: [PATCH 1006/2134] Fixed the string serialization operators (>>, <<) for neuron, layer, and net so they actually work and added or fixed stream-source constructors where appropriate. --- eo/app/gprop/mlp.h | 142 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 133 insertions(+), 9 deletions(-) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 68e81a58e..1205f3b25 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -16,17 +16,40 @@ #include // eoRng #include // normal_geneurator #include // * +#include +#include //----------------------------------------------------------------------------- +namespace mlp +{ + typedef double real; + typedef std::vector vector; +} + +namespace std { + ostream& operator<<(ostream& os, const mlp::vector& v) + { + ostream_iterator oi(os, " "); + copy(v.begin(), v.end(), oi); + return os; + } + + istream& operator>>(istream& is, mlp::vector& v) + { + for (mlp::vector::iterator vi = v.begin() ; vi != v.end() ; vi++) { + is >> *vi; + } + return is; + } +} + namespace mlp { //--------------------------------------------------------------------------- // useful typedefs //--------------------------------------------------------------------------- - typedef double real; - typedef std::vector vector; const real max_real = MAXFLOAT; const real min_real = MINFLOAT; @@ -65,7 +88,7 @@ namespace mlp return sigmoid(bias + weight * input); } - unsigned length() { return weight.size() + 1; } + unsigned length() const { return weight.size() + 1; } void normalize() { @@ -82,12 +105,23 @@ namespace mlp *w = -5.0 + 10.0 / (1.0 + exp(*w / -5.0)); } }; +} - ostream& operator<<(ostream& os, const neuron& n) +namespace std { + + ostream& operator<<(ostream& os, const mlp::neuron& n) { return os << n.bias << " " << n.weight; } - + + istream& operator>>(istream& is, mlp::neuron& n) + { + return is >> n.bias >> n.weight; + } + +} + +namespace mlp { //--------------------------------------------------------------------------- // layer @@ -116,7 +150,7 @@ namespace mlp return output; } - unsigned length() { return front().length() * size(); } + unsigned length() const { return front().length() * size(); } void normalize() { @@ -131,6 +165,29 @@ namespace mlp } }; +} + +namespace std { + + ostream& operator<<(ostream& os, const mlp::layer& l) + { + ostream_iterator oi(os, " "); + copy(l.begin(), l.end(), oi); + return os; + } + + istream& operator>>(istream& is, mlp::layer& l) + { + for (mlp::layer::iterator li = l.begin() ; li != l.end() ; li++) { + is >> *li; + } + return is; + } + +} + +namespace mlp { + //--------------------------------------------------------------------------- // net @@ -143,6 +200,43 @@ namespace mlp const unsigned& num_outputs = 0, const std::vector& hidden = std::vector()) { + init(num_inputs,num_outputs,hidden); + } + + + net(istream &is) { + load(is); + } + + void load(istream &is) { + unsigned num_inputs; + unsigned num_outputs; + unsigned num_hidden_layers; + + is >> num_inputs >> num_outputs >> num_hidden_layers; + + std::vector layer_sizes; + for (int i=0; i> layer_size; + layer_sizes.push_back(layer_size); + } + unsigned check_outputs; + is >> check_outputs; + assert (check_outputs == num_outputs); + init (num_inputs,num_outputs,layer_sizes); + // skip forward to pass up opening '<' char + char c=' '; + while (c!='<') { is >> c;} + for (iterator l =begin() ; l != end(); l++) { + is >> *l; + } + } + + void init( unsigned num_inputs, + unsigned num_outputs, + const std::vector& hidden ) { + clear(); switch(hidden.size()) { case 0: @@ -180,6 +274,24 @@ namespace mlp return (max_element(tmp.begin(), tmp.end()) - tmp.begin()); } + void save(ostream &os) { + // Save the number of inputs, number of outputs, and number of hidden layers + os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n"; + for(const_iterator l = begin(); l != end(); ++l) + os << l->size() << " "; + os << "\n"; + os << *this; + os << "\n"; + } + + unsigned num_inputs() const { return front().front().length() - 1; } + unsigned num_outputs() const { return back().size(); } + unsigned num_hidden_layers() const { + signed s = (signed) size() -1; + return (s<0) ? 0 : s ; + } + + unsigned length() { unsigned sum = 0; @@ -238,9 +350,21 @@ namespace mlp unsigned num_samples = 0): std::vector(num_samples, sample(input_size, output_size)) {} - set(istream& is) - { - is >> (*this); + set(istream& is) : std::vector(0, sample(0, 0)) { + clear(); + load(is); + } + + void load(istream &is) { + unsigned input_size, output_size; + is >> input_size >> output_size; + sample samp(input_size, output_size);; + while (is >> samp) { push_back(samp); } + } + + void save(ostream &os) { + os << front().input.size() << " " << front().output.size() << endl; + copy(begin(), end(), ostream_iterator(os,"\n")); } }; From b2de3403a622e66cff6d7949254a1b09c47cf6c9 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 21 Jan 2004 19:57:19 +0000 Subject: [PATCH 1007/2134] Added define NO_GNUPLOT to disable gnuplot extensions Needed for win32 (well, at least for me) --- eo/config.cache | 4 +- eo/src/pyeo/Makefile | 19 ---------- eo/src/pyeo/test/test_transform.py | 61 ++++++++++++++++++++++++++++++ eo/src/pyeo/valueParam.cpp | 1 + eo/src/utils/eoGnuplot.h | 5 ++- eo/src/utils/eoGnuplot1DMonitor.h | 2 + eo/src/utils/eoGnuplot1DSnapshot.h | 2 + 7 files changed, 71 insertions(+), 23 deletions(-) create mode 100644 eo/src/pyeo/test/test_transform.py diff --git a/eo/config.cache b/eo/config.cache index bb2c1689e..e125cf21c 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -24,12 +24,12 @@ ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} -ac_cv_prog_CXX=${ac_cv_prog_CXX=/opt/intel/compiler70/ia32/bin/icpc} +ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} -ac_cv_prog_gxx=${ac_cv_prog_gxx=no} +ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} ac_cv_type_size_t=${ac_cv_type_size_t=yes} diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 11587b13f..3bf2977c2 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -2,27 +2,8 @@ # # You need: # Python 2.2 -# Stlport # Boost.Python v2 # -# -# On my debian (unstable), I used libstlport_gcc.so.4.5 -# and libboost_python.so.1.29.0 -# -# Obviously together with python2.2 (as Boost.Python.v2 needs that) -# -# I'm pretty sure any stlport will do, but less convinced about boost.python -# That lib seems to be pretty much under development (as I found out, the hard way) -# but this version 1.29 seems to work for me. -# -# My version of boost was found in /usr/include, modify INC to your system -# -# For you happy Debian unstable users, just install -# -# apt-get install libstlport4.5 -# apt-get install libboost-python-dev -# apt-get install libboost-python1.29.0 -# CXX = g++ #-3.2 CXXFLAGS = -DHAVE_SSTREAM#-g #-DNDEBUG diff --git a/eo/src/pyeo/test/test_transform.py b/eo/src/pyeo/test/test_transform.py new file mode 100644 index 000000000..67d892e68 --- /dev/null +++ b/eo/src/pyeo/test/test_transform.py @@ -0,0 +1,61 @@ +"""Test script for the eoSGATranform class""" + +from copy import deepcopy +from PyEO import * +from maxone import * + +pop = eoPop() +for i in range(10): + eo = EO() + init(eo) + evaluate(eo) + pop.push_back(eo) + +transform = eoSGATransform(xover, 0.8, mutate, 0.2) + +def test1(pop, transform): + pop = deepcopy(pop) + print "test 1" + print "Initial population:" + print pop + + transform(pop) + + print "GM pop:" + print pop + +def test2(pop, transform): + pop = deepcopy(pop) + + print "test 2" + print "Initial population" + print pop + + checkpoint = eoCheckPoint(eoGenContinue(50)) + select = eoSelectNumber(eoDetTournamentSelect(3), 10) + replace = eoGenerationalReplacement() + + algo = eoEasyEA(checkpoint, evaluate, select, transform, replace) + algo(pop) + + print "Evoluated pop:" + print pop + +if __name__ == "__main__": + try: + test1(pop, transform) + except: + import sys + print + print "Caught an exception:" + print sys.exc_type, sys.exc_value + print + + try: + test2(pop, transform) + except: + import sys + print + print "Caught an exception:" + print sys.exc_type, sys.exc_value + print diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index 1e201770f..c648df5f2 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -178,6 +178,7 @@ void valueParam() define_valueParam("Float"); define_valueParam, numeric::array >("Vec"); define_valueParam< std::pair, tuple >("Pair"); + //define_valueParam< object, object >("Py"); class_ >("eoValueParam", init<>()) //.def(init()) diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index b06cba516..4498c1e1e 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -21,6 +21,7 @@ Contact: Marc.Schoenauer@polytechnique.fr */ //----------------------------------------------------------------------------- +#ifndef NO_GNUPLOT #ifndef _eoGnuplot_H #define _eoGnuplot_H @@ -149,7 +150,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.8 2003-03-21 02:39:09 maartenkeijzer Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.9 2004-01-21 19:57:19 maartenkeijzer Exp $ * ---------------------------------------------------------------------- */ @@ -301,5 +302,5 @@ inline int PipeComWaitFor( PCom *from, char *what ) return 1; } - +#endif #endif diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 8ab8082ab..aa24a2865 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -23,6 +23,7 @@ mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- +#ifndef NO_GNUPLOT #ifndef _eoGnuplot1DMonitor_H #define _eoGnuplot1DMonitor_H @@ -129,3 +130,4 @@ inline void eoGnuplot1DMonitor::FirstPlot() } #endif +#endif diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 0e208321e..983b634ef 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -23,6 +23,7 @@ mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- +#ifndef NO_GNUPLOT #ifndef _eoGnuplot1DSnapshot_H #define _eoGnuplot1DSnapshot_H @@ -156,3 +157,4 @@ inline eoMonitor& eoGnuplot1DSnapshot::operator() (void) } #endif +#endif From 68e970e455b3d8f91a304b8c2ab3eac9ec8d41e5 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Mon, 2 Feb 2004 08:54:10 +0000 Subject: [PATCH 1008/2134] *** empty log message *** --- eo/src/utils/eoData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index 3ede8d38c..5fb9cb30d 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -43,7 +43,7 @@ #include #endif -#if !defined(_WIN32) && !defined(__CYGWIN__) && !(defined(__APPLE__) || defined(MACOSX)) +#if !defined(_WIN32) && !defined(__CYGWIN__) && !(defined(__APPLE__) || defined(MACOSX)) && !defined(__FreeBSD__) #include #endif From 250d31f904478a4492122197195e3c626a05abad Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 10 Feb 2004 22:33:30 +0000 Subject: [PATCH 1009/2134] Fixed some signed/unsigned conversion bugs --- eo/app/gprop/gprop.h | 17 ++++++++++------- eo/app/gprop/mlp.h | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index da2f41d7c..7c96b14cf 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -45,10 +45,10 @@ struct phenotype { - unsigned trn_ok, val_ok, tst_ok; + int trn_ok, val_ok, tst_ok; double mse_error; - static unsigned trn_max, val_max, tst_max; + static int trn_max, val_max, tst_max; friend bool operator<(const phenotype& a, const phenotype& b) { @@ -87,13 +87,16 @@ struct phenotype }; -unsigned phenotype::trn_max = 0, phenotype::val_max = 0, phenotype::tst_max = 0; +int phenotype::trn_max = 0, phenotype::val_max = 0, phenotype::tst_max = 0; //----------------------------------------------------------------------------- // genotype //----------------------------------------------------------------------------- +#ifndef GPROP_GENOTYPE +#define GPROP_GENOTYPE mlp::net +#endif -typedef mlp::net genotype; +typedef GPROP_GENOTYPE genotype; //----------------------------------------------------------------------------- // Chrom @@ -195,13 +198,13 @@ public: // eoChromEvaluator //----------------------------------------------------------------------------- -unsigned correct(const mlp::net& net, const mlp::set& set) +int correct(const mlp::net& net, const mlp::set& set) { - unsigned sum = 0; + int sum = 0; for (mlp::set::const_iterator s = set.begin(); s != set.end(); ++s) { - unsigned partial = 0; + int partial = 0; for (unsigned i = 0; i < s->output.size(); ++i) if (s->output[i] < 0.5 && net(s->input)[i] < 0.5 || diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 1205f3b25..779e53e82 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -274,7 +274,7 @@ namespace mlp { return (max_element(tmp.begin(), tmp.end()) - tmp.begin()); } - void save(ostream &os) { + void save(ostream &os) const { // Save the number of inputs, number of outputs, and number of hidden layers os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n"; for(const_iterator l = begin(); l != end(); ++l) @@ -362,7 +362,7 @@ namespace mlp { while (is >> samp) { push_back(samp); } } - void save(ostream &os) { + void save(ostream &os) const { os << front().input.size() << " " << front().output.size() << endl; copy(begin(), end(), ostream_iterator(os,"\n")); } From 3943287ad0879774856136c8ae417c5ad8519585 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Wed, 11 Feb 2004 23:03:23 +0000 Subject: [PATCH 1010/2134] Made mlp::net::operator() a virtual function to allow for subclassing with networks that transform their input or output. --- eo/app/gprop/mlp.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 779e53e82..e0e706a34 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -7,6 +7,7 @@ //----------------------------------------------------------------------------- +using namespace std; #include // MAXFLOAT MINFLOAT #include // exp #include // invalid_argument @@ -258,15 +259,7 @@ namespace mlp { l->reset(); } - vector operator()(const vector& input) const - { - vector tmp = input; - - for(const_iterator l = begin(); l != end(); ++l) - tmp = (*l)(tmp); - - return tmp; - } + virtual vector operator()(const vector& input) const ; unsigned winner(const vector& input) const { @@ -315,6 +308,18 @@ namespace mlp { } }; +#ifndef NO_MLP_VIRTUALS + vector net::operator()(const vector& input) const + { + vector tmp = input; + + for(const_iterator l = begin(); l != end(); ++l) + tmp = (*l)(tmp); + + return tmp; + } +#endif + //--------------------------------------------------------------------------- // sample From a715dda207c1b17e81c64dd18911e80128e646f7 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 26 Mar 2004 09:36:07 +0000 Subject: [PATCH 1011/2134] Fixed rng::uniform to not provide the wrong result (1.0) once in every 2^32 times --- eo/src/utils/eoRNG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index a1bd8276b..3601cf062 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -151,7 +151,7 @@ public : */ double uniform(double m = 1.0) { // random number between [0, m] - return m * double(rand()) / double(rand_max()); + return m * double(rand()) / double(1.0+rand_max()); } /** From 4bdccb3dae683c034cddd3c7361b45aa6b31ab13 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Fri, 26 Mar 2004 09:56:56 +0000 Subject: [PATCH 1012/2134] Fixed bug in rng::roulette_wheel: use of float had too little precision in change/fortune var --- eo/src/utils/eoRNG.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 3601cf062..867dc9df3 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -224,15 +224,14 @@ public : total += vec[i]; } - float change = uniform() * total; - + double fortune = uniform() * total; int i = 0; - while (change > 0) + while (fortune > 0) { - change -= vec[i++]; + fortune -= vec[i++]; } - + return --i; } From 3276d502eaeef6607119692393d66ce93a7eda57 Mon Sep 17 00:00:00 2001 From: okoenig Date: Sun, 28 Mar 2004 22:18:03 +0000 Subject: [PATCH 1013/2134] Bugfix regarding the feasible flag --- eo/src/eoScalarFitnessAssembled.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index fe734d76a..d679d1a25 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -130,9 +130,7 @@ public: push_back( v ); else front() = v; - - feasible=true; - + return *this; } From fe9de42802c1ac91a1dc3087880ec6f81e2a793f Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Mar 2004 16:51:06 +0000 Subject: [PATCH 1014/2134] Corrected errors in the "memory management" section. Thanks to ZhangQian for pointing them out --- eo/tutorial/html/eoProgramming.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index d5f90c30f..7889a499b 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -430,9 +430,9 @@ function. which gives something like

    eoTournamentSelection<EOT>  *ptSelect = new eoTournamentSelection<EOT>(tSize); -
    eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(select); +
    eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(*ptSselect);
    eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>( -..., breed, ...); +..., *ptBreed, ...);

    and you can then use the dynamically allocated objects anywhere. But the trouble with such a construct is that after exiting the function where such objects are defined, you will never be able @@ -451,10 +451,10 @@ to care of.

    eoTournamentSelection<EOT>  *ptSelect = new eoTournamentSelection<EOT>(tSize);
    state.storeFunctor(ptSelect); -
    eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(select); +
    eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(*ptSelect);
    state.storeFunctor(ptBreed);
    eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>( -..., breed, ...); +..., *ptBreed, ...);

    state.storeFunctor(ptAlgo);

    or, even more quickly (though less readably)

    eoTournamentSelection<EOT>  *ptSelect @@ -463,10 +463,10 @@ to care of. state.storeFunctor(new eoTournamentSelection<EOT>(tSize));
    eoBreeder<EOT> *ptBreed =
                   -state.storeFunctor(new eoBreeder<EOT>(select)); +state.storeFunctor(new eoBreeder<EOT>(*ptSelect));
    eoEasyAlgo<EOT> *ptAlgo =
                   -state.storeFunctor(new eoEasyAlgo<EOT>( ..., breed, ...)); +state.storeFunctor(new eoEasyAlgo<EOT>( ..., *ptBreed, ...));

    In both the above code, state is an eoFunctorStore that is of course passed from outside the function - and it's called state because in most cases it will actually be an eoState. From 87ddb6f8b5004982b93f640e9aaf31cb54ea82f3 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 5 Apr 2004 15:28:12 +0000 Subject: [PATCH 1015/2134] Added a prefix data in eoParser - and the setPrefix method - for multi-population parameter input. Now you can call the make_xxx functions from teh src/do directory several times for different populations provided you do different calls to setPrefix inbetween --- eo/src/utils/eoParser.cpp | 9 ++++++++- eo/src/utils/eoParser.h | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 68f593231..009fd402b 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -125,7 +125,7 @@ eoParam* eoParser::getParamWithLongName(std::string _name) typedef MultiMapType::const_iterator It; for (It p = params.begin(); p != params.end(); ++p) { - if (p->second->longName() == _name) + if (p->second->longName() == prefix+_name) return p->second; } return 0; @@ -161,6 +161,13 @@ eoValueParam& eoParser::getORcreateParam ( void eoParser::processParam(eoParam& param, std::string section) { + // this param enters the parser: add the prefix to the long name + if (prefix != "") + { + param.setLongName(prefix+param.longName()); + section = prefix + section; // and to section + } + doRegisterParam(param); // plainly register it params.insert(make_pair(section, ¶m)); } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 5c1f07a3b..e783e62a4 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2003-02-27 19:21:17 $ $Version$ $Author: okoenig $ +CVS Info: $Date: 2004-04-05 15:28:12 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -189,6 +189,12 @@ public: void setStopOnUnknownParam(bool _b) {stopOnUnknownParam.value()=_b;} bool getStopOnUnknownParam() {return stopOnUnknownParam.value();} + /** Prefix handling */ + void setPrefix(const std:: string & _prefix) {prefix = _prefix;} + + void resetPrefix() {prefix = "";} + + std::string getPrefix() {return prefix;} private: @@ -216,6 +222,9 @@ private: eoValueParam stopOnUnknownParam; mutable std::vector messages; + + std::string prefix; // used for all created params - in processParam + }; From aecd7bdf2b37acbc56c6ff9cba6964ffda4a8e54 Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 8 Apr 2004 07:55:40 +0000 Subject: [PATCH 1016/2134] Added the setLongName method to handle the prefix trick in eoParser --- eo/src/utils/eoParam.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 05ff9b2c0..4110be5c3 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -109,8 +109,10 @@ public: void defValue ( std::string str ) { repDefault = str; }; /** - * Returns the value of the param as a std::string + * ALlows to change the name (see the prefix in eoParser.h) */ + void setLongName(std::string _longName) { repLongName = _longName;} + /** * Returns if required or not. */ From 7863168b69e2abe78cfd31cbc2d2ea912253a2bc Mon Sep 17 00:00:00 2001 From: stevemadere Date: Fri, 23 Apr 2004 16:20:12 +0000 Subject: [PATCH 1017/2134] Added weight perturbation operators to enable implementation of exact GPROP-III algorithm. --- eo/app/gprop/mlp.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index e0e706a34..544935d7b 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -105,7 +105,23 @@ namespace mlp for (vector::iterator w = weight.begin(); w != weight.end(); ++w) *w = -5.0 + 10.0 / (1.0 + exp(*w / -5.0)); } - }; + + void perturb_num(double &num, double magnitude) { + double scale = max(num, 0.05) * magnitude; + double perturbation = scale * (drand48() - 0.5); + num += perturbation; + } + + void perturb(double magnitude = 0.3, double probability = 1.0) + { + + for (vector::iterator w = weight.begin(); w != weight.end(); ++w) + if ( probability >= 1.0 || drand48() < probability) + perturb_num(*w, magnitude); + if ( probability >= 1.0 || drand48() < probability) + perturb_num(bias, magnitude); + } + }; } namespace std { @@ -164,6 +180,13 @@ namespace mlp { for(iterator n = begin(); n != end(); ++n) n->desaturate(); } + + void perturb(double magnitude = 0.3, double probability = 1.0) + { + for(iterator n = begin(); n != end(); ++n) + n->perturb(); + } + }; } @@ -306,6 +329,12 @@ namespace mlp { for(iterator l = begin(); l != end(); ++l) l->desaturate(); } + + void perturb(double magnitude = 0.3, double probability = 1.0) + { + for(iterator l = begin(); l != end(); ++l) + l->perturb(); + } }; #ifndef NO_MLP_VIRTUALS From b0969cf3d4c38e801b4141e5fc32b44bc7b7af08 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Fri, 21 May 2004 01:44:32 +0000 Subject: [PATCH 1018/2134] Fixed a bug in mlp::net::load() that prevented loading of multiple nets from the same stream. --- eo/app/gprop/mlp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 544935d7b..a3d841bd6 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -251,10 +251,12 @@ namespace mlp { init (num_inputs,num_outputs,layer_sizes); // skip forward to pass up opening '<' char char c=' '; - while (c!='<') { is >> c;} + while (c!='<' && !is.eof()) { is >> c;} for (iterator l =begin() ; l != end(); l++) { is >> *l; } + do { is >> c; } while (c == ' ' && !is.eof()); + assert(c == '>'); } void init( unsigned num_inputs, From 13c70628584d1e76f74c6d613290ecd1df22a183 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 25 May 2004 07:57:52 +0000 Subject: [PATCH 1019/2134] Adding the statistics in createSimple (create.sh is becoming obsolete) --- eo/tutorial/Templates/MakeSimple.tmpl | 6 +- eo/tutorial/Templates/MyStructSEA.cpp | 106 ++++++++++++++++++++++++-- eo/tutorial/Templates/README | 16 +++- eo/tutorial/Templates/createSimple | 3 +- eo/tutorial/Templates/stat.tmpl | 64 ++++++++++++++++ 5 files changed, 184 insertions(+), 11 deletions(-) create mode 100644 eo/tutorial/Templates/stat.tmpl diff --git a/eo/tutorial/Templates/MakeSimple.tmpl b/eo/tutorial/Templates/MakeSimple.tmpl index 188793f62..85ddd69d6 100644 --- a/eo/tutorial/Templates/MakeSimple.tmpl +++ b/eo/tutorial/Templates/MakeSimple.tmpl @@ -5,9 +5,9 @@ DIR_EO = ../../src # END eventually modify the name of EO dir LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(LIB_EO) +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -Wno-deprecated -g -o $@ $*.cpp $(LIB_EO) -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -Wno-deprecated -g -c $*.cpp # local sources SOURCES = MyStructEA.cpp \ @@ -18,7 +18,7 @@ SOURCES = MyStructEA.cpp \ eoMyStructQuadCrossover.h MyStructEA : MyStructEA.cpp - c++ -I. -I$(DIR_EO) -g -o $@ MyStructEA.cpp $(LIB_EO) -lm + c++ -I. -I$(DIR_EO) -Wno-deprecated -g -o $@ MyStructEA.cpp $(LIB_EO) -lm tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile diff --git a/eo/tutorial/Templates/MyStructSEA.cpp b/eo/tutorial/Templates/MyStructSEA.cpp index d4cc48014..bf2a3ad80 100644 --- a/eo/tutorial/Templates/MyStructSEA.cpp +++ b/eo/tutorial/Templates/MyStructSEA.cpp @@ -53,6 +53,9 @@ using namespace std; #include "eoMyStructQuadCrossover.h" #include "eoMyStructMutation.h" +/* and (possibly) your personal statistics */ +#include "eoMyStructStat.h" + // GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* @@ -92,9 +95,9 @@ eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFu // evolution engine (selection and replacement) #include -eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op, eoDistance *_dist = NULL) { - return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } // simple call to the algo. stays there for consistency reasons @@ -133,6 +136,15 @@ try // - call it from here: // eoMyStructInit init(parser); + // if you want to do sharing, you'll need a distance. + // see file utils/eoDistance.h + // + // IF you representation has an operator[]() double-castable, + // then you can use for instance the quadratic distance (L2 norm) + // eoQuadDistance dist; + // or the Hamming distance (L1 norm) + // eoHammingDistance dist; + // Build the variation operator (any seq/prop construct) // here, a simple example with only 1 crossover (2->2, a QuadOp) and @@ -165,7 +177,7 @@ try /////////////// Same thing for MUTATION // a (first) mutation (possibly use the parser in its Ctor) - eoMyStructMutation mut /* (eoParser parser) */; + eoMyStructMutation mut /* (parser) */; // IF MORE THAN ONE: @@ -205,10 +217,12 @@ try eoSGAGenOp op(cross, pCross, mut, pMut); - //// Now the representation-independent things + //// Now some representation-independent things // - // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // You do not need to modify anything beyond this point // unless you want to add specific statistics to the checkpoint + // in which case you should uncomment the corresponding block + // and possibly modify the parameters in the stat object creation ////////////////////////////////////////////// // initialize the population @@ -219,8 +233,90 @@ try eoContinue & term = make_continue(parser, state, eval); // output eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + + + // UNCOMMENT the following commented block if you want to add you stats + + // if uncommented, it is assumed that you will want to print some stat. + // if not, then the following objects will be created uselessly - but what the heck! + + eoMyStructStat myStat; // or maybe myStat(parser); + checkpoint.add(myStat); + // This one is probably redundant with the one in make_checkpoint, but w.t.h. + eoIncrementorParam generationCounter("Gen."); + checkpoint.add(generationCounter); + // need to get the name of the redDir param (if any) + std::string dirName = parser.getORcreateParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value() + "/"; + + + // those need to be pointers because of the if's + eoStdoutMonitor *myStdOutMonitor; + eoFileMonitor *myFileMonitor; +#if !defined(NO_GNUPLOT) + eoGnuplot1DMonitor *myGnuMonitor; +#endif + + // now check how you want to output the stat: + bool printMyStructStat = parser.createParam(true, "coutMyStructStat", "Affiche ma stat ŕ l'écran", '\0', "Mon Probleme").value(); + bool fileMyStructStat = parser.createParam(false, "fileMyStructStat", "Stocke ma stat Dans un fichier", '\0', "Mon Probleme").value(); + bool plotMyStructStat = parser.createParam(false, "plotMyStructStat", "Affiche graphiquement ma stat pendant l'évolution", '\0', "Mon Probleme").value(); + + // should we write it on StdOut ? + if (printMyStructStat) + { + myStdOutMonitor = new eoStdoutMonitor(false); + // don't forget to store the memory in the state + state.storeFunctor(myStdOutMonitor); + // and of course to add the monitor to the checkpoint + checkpoint.add(*myStdOutMonitor); + // and the different fields to the monitor + myStdOutMonitor->add(generationCounter); + myStdOutMonitor->add(eval); + myStdOutMonitor->add(myStat); + } + + // first check the directory (and creates it if not exists already): + if (fileMyStructStat || plotMyStructStat) + if (! testDirRes(dirName, true) ) + throw runtime_error("Problem with resDir"); + + // should we write it to a file ? + if (fileMyStructStat) + { + myFileMonitor = new eoFileMonitor(dirName + "myStat.xg"); + // don't forget to store the memory in the state + state.storeFunctor(myFileMonitor); + // and of course to add the monitor to the checkpoint + checkpoint.add(*myFileMonitor); + // and the different fields to the monitor + myFileMonitor->add(generationCounter); + myFileMonitor->add(eval); + myFileMonitor->add(myStat); + } + +#if !defined(NO_GNUPLOT) + // should we PLOT it on StdOut ? (one dot per generation, incremental plot) + if (plotMyStructStat) + { + myGnuMonitor = new eoGnuplot1DMonitor(dirName+"plot_myStat.xg",minimizing_fitness()); + // NOTE: you cand send commands to gnuplot at any time with the method + // myGnuMonitor->gnuplotCommand(string) + // par exemple, gnuplotCommand("set logscale y") + + // don't forget to store the memory in the state + state.storeFunctor(myGnuMonitor); + // and of course to add the monitor to the checkpoint + checkpoint.add(*myGnuMonitor); + // and the different fields to the monitor (X = eval, Y = myStat) + myGnuMonitor->add(eval); + myGnuMonitor->add(myStat); + } +#endif + // algorithm (need the operator!) eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + // and the distance if you want to do sharing + // eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op, &dist); ///// End of construction of the algorithm diff --git a/eo/tutorial/Templates/README b/eo/tutorial/Templates/README index 91c85d6a7..d0904df8d 100644 --- a/eo/tutorial/Templates/README +++ b/eo/tutorial/Templates/README @@ -1,3 +1,15 @@ +Quick NOTE: This version of README is obsolete (May 25, 2004) +In particular, a simpler version of the algorithm can be generated +using the script + createSimple + +with the same syntax. It is also more powerful, allowing for instance +to create you own statistics on the population, saving it in a file +and/or plotting on on-line during the run (see eoStat.tmpl). +More details some day, when I have some time ... + +============= Old README (most is still accurate, though) ========== + This directory contains sample files that should make it easy to create an EO algorithm to evolve any type of structure (EO comes with two examples, bitstrings and vector of real variables, @@ -9,7 +21,7 @@ objective fitness - or be patient :-) This file will help you to build the same algorithm than the ones in the Lesson4 of the tutorial, but with YOUR genotype instead of -bitstrings or vector +bitstrings or vector. More details in Lesson5 of the tutorial. It is assumed in the following that you have read the first part of the tutorial (Lessons 1 to 4). @@ -89,7 +101,7 @@ want to become active), and run % eoAppliEA @eoAppliEA.param -(see the Lesson 4 of the tutorial for more details now). +(see the Lesson 5 of the tutorial for more details now). HINTS ----- diff --git a/eo/tutorial/Templates/createSimple b/eo/tutorial/Templates/createSimple index a329bc5c1..9d7184754 100755 --- a/eo/tutorial/Templates/createSimple +++ b/eo/tutorial/Templates/createSimple @@ -37,7 +37,7 @@ endif if (-f $TargetDir/Makefile) then echo A Makefile already exists there. - echo I'm creating Makefile.$1. You'll have to merge them both, + echo "I'm creating Makefile.$1. You'll have to merge them both," echo OR to call make -f Makefile.$1 set MakeName = Makefile.$1 else @@ -48,6 +48,7 @@ echo Creating source files for application $1 in $TargetDir/ sed s/MyStruct/$1/g eoMyStruct.tmpl > $TargetDir/eo$1.h sed s/MyStruct/$1/g init.tmpl > $TargetDir/eo$1Init.h +sed s/MyStruct/$1/g stat.tmpl > $TargetDir/eo$1Stat.h sed s/MyStruct/$1/g evalFunc.tmpl > $TargetDir/eo$1EvalFunc.h sed s/MyStruct/$1/g mutation.tmpl > $TargetDir/eo$1Mutation.h sed s/MyStruct/$1/g quadCrossover.tmpl > $TargetDir/eo$1QuadCrossover.h diff --git a/eo/tutorial/Templates/stat.tmpl b/eo/tutorial/Templates/stat.tmpl new file mode 100644 index 000000000..cc3d1f84f --- /dev/null +++ b/eo/tutorial/Templates/stat.tmpl @@ -0,0 +1,64 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for computing statistics on eoPop +============================================ +*/ + +#ifndef _eoMyStructStat_h +#define _eoMyStructStat_h + +// include the base definition of eoInit +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ASSUMPTION on the class GenoypeT: + * it needs to derive from EO (i.e. has a Fitness). + * + * It is assumed that you want to compute a double. + * In case you want something else, then your stat should derive from + * eoStat + * where class T is the class of the computed statistics + */ +template +class eoMyStructStat : public eoStat +{ +public : + typedef typename EOT::Fitness Fitness; + +// START eventually add or modify the anyVariable argument + /** Ctor - you change the default name of course. + * @param + * _description : inherited from eoValueParam (eoStat is an from eoVapueParam) + */ + eoMyStructStat(std::string _description = "eoMyStructStat ") : + eoStat(0.0, _description) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMonReelStat object + // END Code of Ctor of an eoMonReelStat object + } + + void operator()(const eoPop& _pop){ + double tmpStat; + // START Code for computing the statistics - in tmpStat + // tmpStat = blablabla + // END Code for computing the statistics + value() = tmpStat; // store the stat in the eoParam value() field + } + + virtual std::string className(void) const { return "eoMyStructStat"; } +private : +// START Private data of an eoMyStructStat object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructStat object +}; + +#endif + From 795f63b7feae82efec3d68aeaa51912552586594 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 25 May 2004 08:03:30 +0000 Subject: [PATCH 1020/2134] Adding sharing - needed to modify quite a few files, like eoDistance.h make_algo_scalar.h and all related files, and the like --- eo/src/do/make_algo_scalar.h | 34 +++++++- eo/src/eoSelectFromWorth.h | 8 +- eo/src/eoSharing.h | 124 ++++++++++++++++------------ eo/src/eoSharingSelect.h | 54 ++++++++++++ eo/src/es/make_algo_scalar_es.cpp | 12 +-- eo/src/es/make_algo_scalar_real.cpp | 8 +- eo/src/es/make_es.h | 13 +-- eo/src/es/make_real.h | 5 +- eo/src/ga/make_algo_scalar_ga.cpp | 8 +- eo/src/ga/make_ga.h | 5 +- eo/src/utils/eoDistance.h | 43 +++++++++- eo/test/Makefile.am | 9 +- eo/tutorial/Lesson4/BitEA.cpp | 10 ++- eo/tutorial/Lesson4/binary_value.h | 4 +- 14 files changed, 244 insertions(+), 93 deletions(-) create mode 100644 eo/src/eoSharingSelect.h diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 6500492e5..975f9f6ee 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -39,6 +39,7 @@ #include #include #include +#include // Breeders #include @@ -49,6 +50,9 @@ #include #include +// distance +#include + // Algorithm (only this one needed) #include @@ -70,11 +74,18 @@ * is actually templatized here */ + template -eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op, eoDistance * _dist = NULL) { - // the selection - eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t) or Sequential(ordered/unordered)", 'S', "Evolution Engine"); + // the selection : help and comment depend on whether or not a distance is passed + std::string comment; + if (_dist == NULL) + comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e) or Sequential(ordered/unordered)"; + else + comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e), Sharing(sigma_share) or Sequential(ordered/unordered)"; + + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", comment, 'S', "Evolution Engine"); eoParamParamType & ppSelect = selectionParam.value(); // std::pair > @@ -94,6 +105,23 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc detSize = atoi(ppSelect.second[0].c_str()); select = new eoDetTournamentSelect(detSize); } + else if (ppSelect.first == std::string("Sharing")) + { + double nicheSize; + + if (!ppSelect.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to Sharing, using 0.5" << std::endl; + nicheSize = 0.5; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("0.5")); + } + else // parameter passed by user as DetTour(T) + nicheSize = atof(ppSelect.second[0].c_str()); + if (_dist == NULL) // no distance + throw std::runtime_error("You didn't specify a distance when calling make_algo_scalar and using sharing"); + select = new eoSharingSelect(nicheSize, *_dist); + } else if (ppSelect.first == std::string("StochTour")) { double p; diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index d2c993dc3..fa596c13d 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -26,7 +26,7 @@ #ifndef _eoSelectFromWorth_h #define _eoSelectFromWorth_h - +#include //----------------------------------------------------------------------------- #include #include @@ -197,6 +197,12 @@ public: */ virtual const EOT& operator()(const eoPop& _pop) { +// cout << "On affiche les worths\n"; +// for (unsigned i=0; +// i > -template -class eoSharing : public eoPerf2Worth -{ - public: - /** Ctor with only nicheSize: will use the default eoQuadDistance */ - eoSharing(double _nicheSize) : eoPerf2Worth("Sharing"), - nicheSize(_nicheSize), - dist(repDist) - {} - - eoSharing(double _nicheSize, Dist _dist) : eoPerf2Worth("Sharing"), - nicheSize(_nicheSize), - dist(_dist) - {} - - /** Computes shared fitnesses - */ - void operator()(const eoPop& _pop) - { - unsigned i, j, - pSize=_pop.size(); - if (pSize <= 1) - throw std::runtime_error("Apptempt to do sharing with population of size 1"); - value.resize(pSize); - std::vector sim(pSize); // to hold the similarities - std::vector distMatrix(pSize*(pSize-1)/2); // to hold the distances - - // compute the distances - distMatrix(0,0)=0; - for (i=1; i { public: // Ctor : sets size - dMatrix(unsigned _s) : std::vector(_s*(_s-1)), rSize(_s) {} + dMatrix(unsigned _s) : std::vector(_s*_s), rSize(_s) {} /** simple accessor */ double operator()(unsigned _i, unsigned _j) const @@ -121,11 +70,76 @@ class eoSharing : public eoPerf2Worth unsigned rSize; // row size (== number of columns!) }; + +// template > +template +class eoSharing : public eoPerf2Worth +{ + public: + /* Ctor requires a distance - cannot have a default distance! */ + eoSharing(double _nicheSize, eoDistance & _dist) : eoPerf2Worth("Sharing"), + nicheSize(_nicheSize), + dist(_dist) + {} + + /** Computes shared fitnesses + */ + void operator()(const eoPop& _pop) + { + unsigned i, j, + pSize=_pop.size(); + if (pSize <= 1) + throw std::runtime_error("Apptempt to do sharing with population of size 1"); + value().resize(pSize); + std::vector sim(pSize); // to hold the similarities + dMatrix distMatrix(pSize*(pSize-1)/2); // to hold the distances + + // compute the similarities (wrong name for distMatrix, I know) + distMatrix(0,0)=1; + for (i=1; inicheSize ? 0 : 1-(d/nicheSize) ); + } + } + +// cout << "Matrice des similarités\n"; +// for (i=0; i repDist; // default distance - eoDistance & dist; // allows to pass a specific distance + eoDistance & dist; // specific distance }; + + #endif diff --git a/eo/src/eoSharingSelect.h b/eo/src/eoSharingSelect.h new file mode 100644 index 000000000..7daf9fd1a --- /dev/null +++ b/eo/src/eoSharingSelect.h @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSharingSelect.h +// (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSharingSelect_h +#define eoSharingSelect_h + +//----------------------------------------------------------------------------- + +#include +#include + +/** eoRankingSelect: select an individual by roulette wheel on its rank + * is an eoRouletteWorthSelect, i.e. a selector using a std::vector of worthes + * rather than the raw fitness (see eoSelectFromWorth.h) + * uses an internal eoRanking object which is an eoPerf2Worth +*/ + +template +class eoSharingSelect: public eoRouletteWorthSelect +{ +public: + /** Ctor: + * @param _s the sigma_share + */ + eoSharingSelect(double _sigma, eoDistance & _dist): + eoRouletteWorthSelect(sharing), sharing(_sigma, _dist) {} + +private : + eoSharing sharing; // derived from eoPerf2Worth +}; + +#endif diff --git a/eo/src/es/make_algo_scalar_es.cpp b/eo/src/es/make_algo_scalar_es.cpp index 27624f3eb..abc526825 100644 --- a/eo/src/es/make_algo_scalar_es.cpp +++ b/eo/src/es/make_algo_scalar_es.cpp @@ -51,34 +51,34 @@ // Algo /////// -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } ////////////// -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } /////////////// -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } diff --git a/eo/src/es/make_algo_scalar_real.cpp b/eo/src/es/make_algo_scalar_real.cpp index 0a951c0fc..91b5ccd13 100644 --- a/eo/src/es/make_algo_scalar_real.cpp +++ b/eo/src/es/make_algo_scalar_real.cpp @@ -49,13 +49,13 @@ // Algo /////// -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { - return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { - return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index c2c7b379e..3212f3916 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -52,6 +52,7 @@ #include #include #include +#include #include // one Sigma per individual #include // one sigmal per object variable @@ -119,14 +120,14 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, // the algo -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); // run void run_ea(eoAlgo >& _ga, eoPop >& _pop); diff --git a/eo/src/es/make_real.h b/eo/src/es/make_real.h index 8c227f269..594934ddf 100644 --- a/eo/src/es/make_real.h +++ b/eo/src/es/make_real.h @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -85,9 +86,9 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, e // the algo -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); // run void run_ea(eoAlgo >& _ga, eoPop >& _pop); diff --git a/eo/src/ga/make_algo_scalar_ga.cpp b/eo/src/ga/make_algo_scalar_ga.cpp index f2b6719c5..aa9b2e051 100644 --- a/eo/src/ga/make_algo_scalar_ga.cpp +++ b/eo/src/ga/make_algo_scalar_ga.cpp @@ -52,13 +52,13 @@ // Algo /////// -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { - return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) { - return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index 4c63c22c7..ee75b8134 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -45,6 +45,7 @@ #include #include #include +#include #include @@ -77,9 +78,9 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, eo // the algo -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); -eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); // run void run_ea(eoAlgo >& _ga, eoPop >& _pop); diff --git a/eo/src/utils/eoDistance.h b/eo/src/utils/eoDistance.h index 2ffb8ccc1..26ef0ea6f 100644 --- a/eo/src/utils/eoDistance.h +++ b/eo/src/utils/eoDistance.h @@ -27,7 +27,6 @@ #define _eoDistance_H #include - /** This is a generic class for distance functors: takes 2 things ane returns a double @@ -36,27 +35,63 @@ template< class EOT > class eoDistance : public eoBF {}; + /** - This is a generic class for Euclidain distance computation: + This is a generic class for Euclidain distance (L2 norm) computation: assumes the 2 things are std::vectors of something that is double-castable */ - template< class EOT > class eoQuadDistance : public eoDistance { public: double operator()(const EOT & _v1, const EOT & _v2) { - double sum=0.0; + double sum=0.0; for (unsigned i=0; i<_v1.size(); i++) { double r = static_cast (_v1[i]) - static_cast (_v2[i]); sum += r*r; } + return sqrt(sum); + } +}; + +/** + This is a generic class for L1 distance computation: + assumes the 2 things are std::vectors of something + that is double-castable + For bitstrings, this is the Hamming distance +*/ +template< class EOT > +class eoHammingDistance : public eoDistance +{ +public: + double operator()(const EOT & _v1, const EOT & _v2) + { + double sum=0.0; + for (unsigned i=0; i<_v1.size(); i++) + { + double r = static_cast (_v1[i]) - static_cast (_v2[i]); + sum += fabs(r); + } return sum; } }; +/* this distance measures the difference in fitness + * I am not sure it can be of any use, though ... + * except for some testing + */ +template< class EOT > +class eoFitnessDistance : public eoDistance +{ +public: + double operator()(const EOT & _v1, const EOT & _v2) + { + double d = _v1.fitness() - _v2.fitness(); + return sqrt(d*d); + } +}; diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 5d30ccd00..43b61b81f 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -17,7 +17,7 @@ CXXFLAGS = -g -Wall # PLEASE don't break the line (see create_batch.sh) -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette +check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette t-eoSharing #The run_tests script can be used to check various arguments TESTS=$(check_PROGRAMS) run_tests @@ -198,3 +198,10 @@ t_eoRoulette_LDFLAGS = -lm t_eoRoulette_LDADD = $(LDADDS) ############################################################################### + +t_eoSharing_SOURCES = t-eoSharing.cpp +t_eoSharing_DEPENDENCIES = $(DEPS) +t_eoSharing_LDFLAGS = -lm +t_eoSharing_LDADD = $(LDADDS) + +############################################################################### diff --git a/eo/tutorial/Lesson4/BitEA.cpp b/eo/tutorial/Lesson4/BitEA.cpp index 961856561..fd6f1fbda 100644 --- a/eo/tutorial/Lesson4/BitEA.cpp +++ b/eo/tutorial/Lesson4/BitEA.cpp @@ -10,7 +10,7 @@ using namespace std; int main(int argc, char* argv[]) -{ +{ try { @@ -30,13 +30,17 @@ int main(int argc, char* argv[]) // EVAL // The evaluation fn - encapsulated into an eval counter for output - eoEvalFuncPtr mainEval( binary_value ); + eoEvalFuncPtr mainEval( binary_value ); eoEvalFuncCounter eval(mainEval); // REPRESENTATION // the genotype - through a genotype initializer eoInit& init = make_genotype(parser, state, EOT()); + // if you want to do sharing, you'll need a distance. + // here Hamming distance + eoHammingDistance dist; + // OPERATORS // Build the variation operator (any seq/prop construct) eoGenOp& op = make_op(parser, state, init); @@ -56,7 +60,7 @@ int main(int argc, char* argv[]) eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); // GENERATION // algorithm (need the operator!) - eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op, &dist); ///// End of construction of the algorith ///////////////////////////////////////// diff --git a/eo/tutorial/Lesson4/binary_value.h b/eo/tutorial/Lesson4/binary_value.h index 0cd560073..188835fca 100644 --- a/eo/tutorial/Lesson4/binary_value.h +++ b/eo/tutorial/Lesson4/binary_value.h @@ -7,9 +7,9 @@ @param _chrom A binary chromosome */ -template float binary_value(const Chrom& _chrom) +template double binary_value(const Chrom& _chrom) { - float sum = 0; + double sum = 0; for (unsigned i = 0; i < _chrom.size(); i++) if (_chrom[i]) sum += _chrom[i]; From 9e0edc381e3e845206ed271b904756269684cc03 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 26 May 2004 09:00:26 +0000 Subject: [PATCH 1021/2134] Temporary modification of the tutorial to account for the new features - stat.tmpl allowing easy creation of own stat - sharing as a new possible selector in make_algo_scalar - requires a distance No detail given, though ... --- eo/tutorial/Templates/MyStructSEA.cpp | 8 +++-- eo/tutorial/html/eoLesson5.html | 27 ++++++++++++++++ eo/tutorial/html/eoTutorial.html | 46 ++++++++++++++++++--------- 3 files changed, 63 insertions(+), 18 deletions(-) diff --git a/eo/tutorial/Templates/MyStructSEA.cpp b/eo/tutorial/Templates/MyStructSEA.cpp index bf2a3ad80..39c4dea1c 100644 --- a/eo/tutorial/Templates/MyStructSEA.cpp +++ b/eo/tutorial/Templates/MyStructSEA.cpp @@ -257,9 +257,9 @@ try #endif // now check how you want to output the stat: - bool printMyStructStat = parser.createParam(true, "coutMyStructStat", "Affiche ma stat ŕ l'écran", '\0', "Mon Probleme").value(); - bool fileMyStructStat = parser.createParam(false, "fileMyStructStat", "Stocke ma stat Dans un fichier", '\0', "Mon Probleme").value(); - bool plotMyStructStat = parser.createParam(false, "plotMyStructStat", "Affiche graphiquement ma stat pendant l'évolution", '\0', "Mon Probleme").value(); + bool printMyStructStat = parser.createParam(false, "coutMyStructStat", "Prints my stat to screen, one line per generation", '\0', "My application").value(); + bool fileMyStructStat = parser.createParam(false, "fileMyStructStat", "Saves my stat to file (in resDir", '\0', "My application").value(); + bool plotMyStructStat = parser.createParam(false, "plotMyStructStat", "On-line plots my stat using gnuplot", '\0', "My application").value(); // should we write it on StdOut ? if (printMyStructStat) @@ -283,6 +283,8 @@ try // should we write it to a file ? if (fileMyStructStat) { + // the file name is hard-coded - of course you can read + // a string parameter in the parser if you prefer myFileMonitor = new eoFileMonitor(dirName + "myStat.xg"); // don't forget to store the memory in the state state.storeFunctor(myFileMonitor); diff --git a/eo/tutorial/html/eoLesson5.html b/eo/tutorial/html/eoLesson5.html index cffede041..fcb025784 100644 --- a/eo/tutorial/html/eoLesson5.html +++ b/eo/tutorial/html/eoLesson5.html @@ -38,6 +38,33 @@ of its fitness.
    The examples will be described supposing you want to evolve ... bitstings to solve the OneMax problem (oh no!!!).

    + +New May 2004 : A +second script, createSimple, + was added some time ago, that generates much simpler +set of files, and the stat.tmpl +file is now used to allow you to +compute and +print and +save-to-disk and +plot-on-line your +own statistics. +But you'll have to find out by yourself how those work, sorry, no +time. It should be easy by just looking at the code (in main file, and +in OneMaxEA.cpp +and the newly created +eoOneMaxStat.h.

    + +New May 2004 : In +the same simplified main file (e.g. OneMaxEA.cpp after running +./createsimple OneMax in +dir .../eo/tutorial/Templates), you +will also be able to use fitness sharing (together with roulette) as a +possible selector. + +


    Using template files
    Follow this very simple procedure: diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index c04907198..273704440 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,34 +17,50 @@ and to

    EO Tutorial

    -
    Version 0.97 - May. 9 2002 -

    New

    +
    Version 0.98 - May 2004 +
      -
      +
    • New +Lesson 5 + has been improved: some of +the empty template files in dir +.../eo/tutorial/Templates +have been simplified, and file stat.tmpl +has been added, allowing you to +compute and +print and +save-to-disk and +plot-on-line your +own statistics. +The magic script is now (see Lesson5) createSimple.
      + +The same simplified main file in +dir .../eo/tutorial/Templates) +also allows you to use +fitness sharing + (together with roulette wheel) as a possible selector.
      + +Unfortunately, the HTML file for Lesson5 and the corresponding +html-ized code are not yet updated - time is missing +(volunteers welcome).

      +
    • + +
      May 2002
    • ParadisEO, the parallel version of EO, is available together with a PDF presentation
    • -
      Thanks to Sébastien +Thanks to Sébastien Cahon (LIFL, Lille)
      -
      -
    • -Lesson 5 gives -you the opportunity to build your own genotype
    • - -
      -
      and still benefit from all -powerful EO features (evolution -engines, I/O, -...).


    Welcome to EO tutorial/on-line documentation. -
    Please note that this tutorial is not supposed +
    Please note that this tutorial is not supposed to be printed and read off-line, as it takes full advantage of hyper-text links between the different parts, and with the technical documentation. From ab9d4de66bd741be9c13010535b7962bf673c79f Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 26 May 2004 10:23:07 +0000 Subject: [PATCH 1022/2134] Adding Sharing (though eoSharingSelect - a roulette selection on shared fitnesses --- eo/src/eo | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eo b/eo/src/eo index f1b91a005..7850578f6 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -85,6 +85,7 @@ #include // also contains eoLinearFitScaling.h #include #include +#include // Embedding truncation selection #include From 06eb601d8ee0eb95e1ea8596c0b4ef216d52ce02 Mon Sep 17 00:00:00 2001 From: okoenig Date: Mon, 14 Jun 2004 11:23:48 +0000 Subject: [PATCH 1023/2134] Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) --- eo/src/eoScalarFitnessAssembled.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index d679d1a25..a266d595e 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -94,14 +94,14 @@ public: // Basic constructors and assignments eoScalarFitnessAssembled() : baseVector( FitnessTraits::size() ), - feasible(true) + feasible(true), failed(false) {} eoScalarFitnessAssembled( size_type _n, const ScalarType& _val, const std::string& _descr="Unnamed variable" ) : baseVector(_n, _val), - feasible(true) + feasible(true), failed(false) { if ( _n > FitnessTraits::size() ) FitnessTraits::resize(_n, _descr); @@ -109,19 +109,21 @@ public: eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : baseVector( other ), - feasible(other.feasible) + feasible(other.feasible), + failed(other.failed) {} eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { baseVector::operator=( other ); feasible = other.feasible; + failed = other.failed; return *this; } // Constructors and assignments to work with scalar type eoScalarFitnessAssembled( const ScalarType& v ) : baseVector( 1, v ), - feasible(true) + feasible(true), failed(false) {} eoScalarFitnessAssembled& operator=( const ScalarType& v ) { @@ -170,7 +172,15 @@ public: * as an indicator if the individual is in some feasible range. */ bool feasible; - + + //! Failed boolean + + /** + * Can be specified anywhere in fitness evaluation + * as an indicator if the evaluation of the individual failed + */ + bool failed; + // Scalar type access operator ScalarType(void) const { if ( empty() ) From 16e09360c9789fcf1309fc3ae64212d975db4b39 Mon Sep 17 00:00:00 2001 From: okoenig Date: Mon, 14 Jun 2004 11:24:37 +0000 Subject: [PATCH 1024/2134] Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) Avg Stats are now only evaluated of individuals if this bool is false! --- eo/src/utils/eoAssembledFitnessStat.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/eo/src/utils/eoAssembledFitnessStat.h b/eo/src/utils/eoAssembledFitnessStat.h index b468f564f..6a064b1e0 100644 --- a/eo/src/utils/eoAssembledFitnessStat.h +++ b/eo/src/utils/eoAssembledFitnessStat.h @@ -40,6 +40,7 @@ Average fitness values of a population, where the fitness is of type eoScalarAssembledFitness. Specify in the constructor, for which fitness term (index) the average should be evaluated. + Only values of object where the failed boolean = false is set are counted. */ #ifdef _MSC_VER template @@ -61,10 +62,15 @@ public : if ( whichFitnessTerm >= _pop[0].fitness().size() ) throw std::logic_error("Fitness term requested out of range"); - double result =0.0; - for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it) - result+= it->fitness()[whichFitnessTerm]; - + double result =0.0; + unsigned count = 0; + for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it){ + if ( it->fitness().failed == false ){ + result+= it->fitness()[whichFitnessTerm]; + ++count; + } + } + value().clear(); value() = result / _pop.size(); From 6d8d7c994c2b51f9e38451d98cbe1b938fb91168 Mon Sep 17 00:00:00 2001 From: okoenig Date: Mon, 14 Jun 2004 11:59:39 +0000 Subject: [PATCH 1025/2134] Replaced #include with #include to get rid of "deprecated" warnings in gcc 3.3 --- eo/src/eoSelectFromWorth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index fa596c13d..2ccc9de8e 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -26,7 +26,7 @@ #ifndef _eoSelectFromWorth_h #define _eoSelectFromWorth_h -#include +#include //----------------------------------------------------------------------------- #include #include From 500f66efbfffb3b9fe6fc75c25cde3695a48f945 Mon Sep 17 00:00:00 2001 From: okoenig Date: Mon, 14 Jun 2004 17:05:07 +0000 Subject: [PATCH 1026/2134] Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) Avg Stats are now only evaluated of individuals if this bool is false! --- eo/src/eoScalarFitnessAssembled.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index a266d595e..59324b381 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -228,7 +228,11 @@ std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled @@ -239,7 +243,10 @@ std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled> value; f[i] = value; } - + + is >> f.feasible; + is >> f.failed; + return is; } From 4cfe47a8e512b76038fe0eed90d00ef46e0716bf Mon Sep 17 00:00:00 2001 From: okoenig Date: Mon, 14 Jun 2004 17:07:25 +0000 Subject: [PATCH 1027/2134] Added a failed boolean to the fitness, for statistics... Average stat values are now computed from succesful fitness evaluations only --- eo/src/utils/eoAssembledFitnessStat.h | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/eo/src/utils/eoAssembledFitnessStat.h b/eo/src/utils/eoAssembledFitnessStat.h index 6a064b1e0..c44bb7b41 100644 --- a/eo/src/utils/eoAssembledFitnessStat.h +++ b/eo/src/utils/eoAssembledFitnessStat.h @@ -42,20 +42,15 @@ for which fitness term (index) the average should be evaluated. Only values of object where the failed boolean = false is set are counted. */ -#ifdef _MSC_VER template -class eoAssembledFitnessAverageStat : public eoStat -#else -template -class eoAssembledFitnessAverageStat : public eoStat -#endif +class eoAssembledFitnessAverageStat : public eoStat { public : typedef typename EOT::Fitness Fitness; eoAssembledFitnessAverageStat(unsigned _whichTerm=0, std::string _description = "Average Fitness") - : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} virtual void operator()(const eoPop& _pop){ @@ -66,14 +61,12 @@ public : unsigned count = 0; for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it){ if ( it->fitness().failed == false ){ - result+= it->fitness()[whichFitnessTerm]; - ++count; + result+= it->fitness()[whichFitnessTerm]; + ++count; } } - value().clear(); - value() = result / _pop.size(); - + value() = result / (double) count; } private: @@ -86,26 +79,20 @@ private: of type eoScalarAssembledFitness. Specify in the constructor, for which fitness term (index) the value should be evaluated. */ -#ifdef _MSC_VER template -class eoAssembledFitnessBestStat : public eoStat -#else -template -class eoAssembledFitnessBestStat : public eoStat -#endif +class eoAssembledFitnessBestStat : public eoStat { public : typedef typename EOT::Fitness Fitness; eoAssembledFitnessBestStat(unsigned _whichTerm=0, std::string _description = "Best Fitness") - : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) {} virtual void operator()(const eoPop& _pop){ if ( whichFitnessTerm >= _pop[0].fitness().size() ) throw std::logic_error("Fitness term requested out of range"); - value().clear(); value() = _pop.best_element().fitness()[whichFitnessTerm]; } From 6e650914cca1b308b4696f1380dd00da934630a7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 15 Jun 2004 07:04:12 +0000 Subject: [PATCH 1028/2134] Added the allClassName method to print the name of all classes that have been added to the checkpoint --- eo/src/utils/eoCheckPoint.h | 40 ++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 544595e13..849a5b0ee 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -60,7 +60,8 @@ public : void add(eoMonitor& _mon) { monitors.push_back(&_mon); } void add(eoUpdater& _upd) { updaters.push_back(&_upd); } - std::string className(void) const { return "eoCheckPoint"; } + virtual std::string className(void) const { return "eoCheckPoint"; } + std::string allClassNames() const ; private : @@ -122,4 +123,41 @@ bool eoCheckPoint::operator()(const eoPop& _pop) return bContinue; } +/** returns a string with all className() + * of data separated with "\n" (for debugging) + */ +template +std::string eoCheckPoint::allClassNames() const +{ + unsigned i; + std::string s = "\n" + className() + "\n"; + + s += "Sorted Stats\n"; + for (i = 0; i < sorted.size(); ++i) + s += sorted[i]->className() + "\n"; + s += "\n"; + + s += "Stats\n"; + for (i = 0; i < stats.size(); ++i) + s += stats[i]->className() + "\n"; + s += "\n"; + + s += "Updaters\n"; + for (i = 0; i < updaters.size(); ++i) + s += updaters[i]->className() + "\n"; + s += "\n"; + + s += "Monitors\n"; + for (i = 0; i < monitors.size(); ++i) + s += monitors[i]->className() + "\n"; + s += "\n"; + + s += "Continuators\n"; + for (i = 0; i < continuators.size(); ++i) + s += continuators[i]->className() + "\n"; + s += "\n"; + + return s; +} + #endif From c0d5eec30307ba18ac9fd1ee57d0c429d68a83db Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 15 Jun 2004 07:06:27 +0000 Subject: [PATCH 1029/2134] Added newline at end of stat --- eo/src/utils/eoPopStat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index f607590f4..727612426 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -82,6 +82,7 @@ void operator()(const eoPop& _pop) char buffer[1023]; // about one k of space per member value() = "\n# ====== pop dump =====\n"; unsigned howmany=combien?combien:_pop.size(); + value() += "\n"; // otherwise, possible mix-up with other stats for (unsigned i = 0; i < howmany; ++i) { std::ostrstream os(buffer, 1022); // leave space for emergency terminate From e44cf2c446adfd4552e3ef384286c94d19f2708f Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 15 Jun 2004 07:09:57 +0000 Subject: [PATCH 1030/2134] Added the className methods everywhere --- eo/src/utils/eoMonitor.h | 3 ++- eo/src/utils/eoStat.h | 12 ++++++++++++ eo/src/utils/eoStdoutMonitor.h | 1 + eo/src/utils/eoUpdater.h | 6 ++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index 9ac2d7a6e..2789431dd 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk -CVS Info: $Date: 2003-02-27 19:21:18 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.10 2003-02-27 19:21:18 okoenig Exp $ $Author: okoenig $ +CVS Info: $Date: 2004-06-15 07:09:57 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.11 2004-06-15 07:09:57 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -55,6 +55,7 @@ public : */ virtual void add(const eoParam& _param) { vec.push_back(&_param); } + virtual std::string className(void) const { return "eoMonitor"; } protected : typedef std::vector::iterator iterator; diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index cdf0f1279..6a69f71d9 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -46,6 +46,7 @@ class eoStatBase : public eoUF&, void> { public: virtual void lastCall(const eoPop&) {} + virtual std::string className(void) const { return "eoStatBase"; } }; /** @@ -58,6 +59,7 @@ class eoStat : public eoValueParam, public eoStatBase { public : eoStat(T _value, std::string _description) : eoValueParam(_value, _description) {} + virtual std::string className(void) const { return "eoStat"; } }; /** @@ -68,6 +70,7 @@ class eoSortedStatBase : public eoUF&, void> { public: virtual void lastCall(const std::vector&) {} + virtual std::string className(void) const { return "eoSortedStatBase"; } }; /** @@ -80,6 +83,7 @@ class eoSortedStat : public eoSortedStatBase, public eoValueParam(_value, _desc) {} + virtual std::string className(void) const { return "eoSortedStat"; } }; /** @@ -114,6 +118,8 @@ public : doit(_pop, Fitness()); // specializations for scalar and std::vector } + virtual std::string className(void) const { return "eoAverageStat"; } + private : // Specialization for pareto fitness @@ -174,6 +180,8 @@ public : value().first = result.first / n; // average value().second = sqrt( (result.second - n * value().first * value().first) / (n - 1.0)); // stdev } + + virtual std::string className(void) const { return "eoSecondMomentStats"; } }; /** @@ -201,6 +209,7 @@ public : doit(_pop, Fitness()); } + virtual std::string className(void) const { return "eoNthElementFitnessStat"; } private : struct CmpFitness @@ -299,6 +308,7 @@ public : doit(_pop, Fitness() ); // specializations for scalar and std::vector } + virtual std::string className(void) const { return "eoBestFitnessStat"; } private : struct CmpFitness @@ -377,6 +387,8 @@ public : double sz = _pop.size(); v /= sz * sz * _pop[0].size(); } + virtual std::string className(void) const { return "eoDistanceStat"; } + }; diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 2cab5e81e..43335a574 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -42,6 +42,7 @@ public : verbose(_verbose), delim(_delim), firsttime(true) {} eoMonitor& operator()(void); + virtual std::string className(void) const { return "eoStdoutMonitor"; } private : bool verbose; std::string delim; diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index c708fd5d9..490d08315 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -40,6 +40,7 @@ class eoUpdater : public eoF { public: virtual void lastCall() {} + virtual std::string className(void) const { return "eoUpdater"; } }; /** @@ -57,6 +58,7 @@ class eoIncrementor : public eoUpdater counter += stepsize; } + virtual std::string className(void) const { return "eoIncrementor"; } private: T& counter; T stepsize; @@ -85,6 +87,8 @@ public : value() += stepsize; } + virtual std::string className(void) const { return "eoIncrementorParam"; } + private: T stepsize; }; @@ -103,6 +107,7 @@ public : void operator()(void); + virtual std::string className(void) const { return "eoTimedStateSaver"; } private : const eoState& state; @@ -132,6 +137,7 @@ public : virtual void lastCall(void); void operator()(void); + virtual std::string className(void) const { return "eoCountedStateSaver"; } private : void doItNow(void); From 66a51c5ddb8f9f202248cb3338deb20b1d622d1a Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 15 Jun 2004 07:28:54 +0000 Subject: [PATCH 1031/2134] Added the className method everywhere --- eo/src/eoCombinedContinue.h | 2 ++ eo/src/eoContinue.h | 6 +++++- eo/src/eoCtrlCContinue.h | 2 ++ eo/src/eoEvalContinue.h | 1 + eo/src/eoFitContinue.h | 1 + eo/src/eoGenContinue.h | 1 + eo/src/eoSteadyFitContinue.h | 1 + 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index 35932ea2b..ec644521d 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -82,6 +82,8 @@ public: return true; } + virtual std::string className(void) const { return "eoCombinedContinue"; } + private: std::vector*> continuators; }; diff --git a/eo/src/eoContinue.h b/eo/src/eoContinue.h index 2d7998c4b..0521043d7 100644 --- a/eo/src/eoContinue.h +++ b/eo/src/eoContinue.h @@ -33,7 +33,11 @@ * false for termination */ template< class EOT> -class eoContinue : public eoUF&, bool> {}; +class eoContinue : public eoUF&, bool> +{ +public: + virtual std::string className(void) const { return "eoContinue"; } +}; #endif diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 5997d9923..f524fc97d 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -65,6 +65,8 @@ public: return false; return true; } + + virtual std::string className(void) const { return "eoCtrlCContinue"; } }; diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index 34bd6c3f6..b13ef90be 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -59,6 +59,7 @@ public: return repTotalEvaluations; }; + virtual std::string className(void) const { return "eoEvalContinue"; } private: eoEvalFuncCounter & eval; unsigned long repTotalEvaluations; diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index dc823c53b..4d594c3dd 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -57,6 +57,7 @@ public: return true; } + virtual std::string className(void) const { return "eoFitContinue"; } private: FitnessType maximum; }; diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 0f97e99a7..71d67c645 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -73,6 +73,7 @@ public: return repTotalGenerations; }; + virtual std::string className(void) const { return "eoGenContinue"; } private: unsigned long repTotalGenerations; unsigned long thisGenerationPlaceHolder; diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index 62b3e6fec..d40b6a041 100755 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -94,6 +94,7 @@ public: virtual unsigned long steadyGenerations( ) { return repSteadyGenerations; }; + virtual std::string className(void) const { return "eoSteadyFitContinue"; } private: unsigned long repMinGenerations; unsigned long repSteadyGenerations; From 30ceb2bf450184edf1600865e8f27267454012ce Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 23 Jun 2004 23:19:17 +0000 Subject: [PATCH 1032/2134] Added the Ctor using the Parser --- eo/src/es/eoSBXcross.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h index 86ced64ac..34fa47944 100644 --- a/eo/src/es/eoSBXcross.h +++ b/eo/src/es/eoSBXcross.h @@ -24,6 +24,7 @@ //----------------------------------------------------------------------------- #include // swap_ranges +#include #include #include #include @@ -63,6 +64,22 @@ template class eoSBXCrossover: public eoQuadOp /////////////////////////////////////////////// + ////////////////////////////////////////////// + + /** + * Constructor from a parser. Will read from the argument parser + * eoRealVectorBounds that contains the bounds + * eta, the SBX parameter + */ + + eoSBXCrossover(eoParser & _parser) : + // First, decide whether the objective variables are bounded + // Warning, must be the same keywords than other possible objectBounds elsewhere + bounds (_parser.getORcreateParam(eoDummyVectorNoBounds, "objectBounds", "Bounds for variables", 'B', "Variation Operators").value()) , + // then get eta value + eta (_parser.getORcreateParam(1.0, "eta", "SBX eta parameter", '\0', "Variation Operators").value()) , + range(1) {} + /// The class name. virtual std::string className() const { return "eoSBXCrossover"; } From 4127f426038afd99f359a34493b88fa72307c02d Mon Sep 17 00:00:00 2001 From: cahon Date: Mon, 12 Jul 2004 08:57:38 +0000 Subject: [PATCH 1033/2134] Adding typedef EOT EOType ; --- eo/src/eoEvalFunc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 73a27bac7..d3d07bd5e 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -41,6 +41,9 @@ template class eoEvalFunc : public eoUF { public : + + typedef EOT EOType; + typedef typename EOT::Fitness EOFitT; }; From 42819983dca9c69206e9e2dcaee436236fefa6f0 Mon Sep 17 00:00:00 2001 From: cahon Date: Mon, 12 Jul 2004 09:16:41 +0000 Subject: [PATCH 1034/2134] Adding typedef EOT EOType ; --- eo/src/eoEvalFunc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index d3d07bd5e..3dfaeba07 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -41,7 +41,6 @@ template class eoEvalFunc : public eoUF { public : - typedef EOT EOType; typedef typename EOT::Fitness EOFitT; From caa611661a1f74bcfed9ba9e9b2d10a726be18c1 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Jul 2004 08:44:14 +0000 Subject: [PATCH 1035/2134] Allows proportional combinations of eoInit objects Similar to eoPropostionalCombinedXXXOp --- eo/src/eoCombinedInit.h | 85 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 eo/src/eoCombinedInit.h diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h new file mode 100644 index 000000000..7e6801f1e --- /dev/null +++ b/eo/src/eoCombinedInit.h @@ -0,0 +1,85 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCombinedInit.h +// (c) Maarten Keijzer, GeNeura Team, Marc Schoenauer 2004 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCombinedInit_h +#define _eoCombinedInit_h + +#include + +/** + Combined INIT: a proportional recombination of eoInit +*/ + +template< class EOT> +class eoCombinedInit: public eoInit { +public: + + /// Ctor, make sure that at least on continuator is present + eoCombinedInit( eoInit& _init, double _rate) + : eoInit () + { + initializers.push_back(&_init); + rates.push_back(_rate); + } + + void add(eoInit & _init, double _rate, bool _verbose=false) + { + initializers.push_back(&_init); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + printOn(std::cout); + } + + // outputs the operators and percentages + virtual void printOn(std::ostream & _os) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + + /** Performs the init: chooses among all initializers + * using some roulette wheel choice + */ + virtual void operator() ( EOT & _eo ) + { + unsigned what = rng.roulette_wheel(rates); // choose one op + (*initializers[what])(_eo); // apply it + return; + } + + virtual std::string className(void) const { return "eoCombinedInit"; } + +private: +std::vector*> initializers; +std::vector rates; +}; + +#endif + From b72ea29e0dd63c15baea1074a4ea813e03e3235c Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 16 Jul 2004 08:45:02 +0000 Subject: [PATCH 1036/2134] Added className (mysteriously missint) mandatory for eoCombinedInit --- eo/src/eoInit.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 8383e7d27..49303dac0 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -45,10 +45,10 @@ template class eoInit : public eoUF { public: -// virtual void operator()(EOT& chrom) -// { -// throw std::runtime_error("In the eoInit base class"); // just in case -// } + + /** SHould be pure virtual, but then we should go over the whole + * code to write the method for all derived classes ... MS 16/7/04 */ + virtual std::string className(void) const { return "eoInit"; } }; /** turning an eoInit into a generator From 7d0e70fd1aca67a0ef3b06b64faef44279425ce8 Mon Sep 17 00:00:00 2001 From: okoenig Date: Sun, 25 Jul 2004 13:26:02 +0000 Subject: [PATCH 1037/2134] added a string msg to eoScalarFitnessAssembled, in order to store all sorts of messages for an individual --- eo/src/eoScalarFitnessAssembled.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 59324b381..88b7da50b 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -94,14 +94,14 @@ public: // Basic constructors and assignments eoScalarFitnessAssembled() : baseVector( FitnessTraits::size() ), - feasible(true), failed(false) + feasible(true), failed(false), msg("") {} eoScalarFitnessAssembled( size_type _n, const ScalarType& _val, const std::string& _descr="Unnamed variable" ) : baseVector(_n, _val), - feasible(true), failed(false) + feasible(true), failed(false), msg("") { if ( _n > FitnessTraits::size() ) FitnessTraits::resize(_n, _descr); @@ -110,20 +110,22 @@ public: eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) : baseVector( other ), feasible(other.feasible), - failed(other.failed) + failed(other.failed), + msg(other.msg) {} eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { baseVector::operator=( other ); feasible = other.feasible; failed = other.failed; + msg = other.msg; return *this; } // Constructors and assignments to work with scalar type eoScalarFitnessAssembled( const ScalarType& v ) : baseVector( 1, v ), - feasible(true), failed(false) + feasible(true), failed(false), msg("") {} eoScalarFitnessAssembled& operator=( const ScalarType& v ) { @@ -174,13 +176,20 @@ public: bool feasible; //! Failed boolean - /** * Can be specified anywhere in fitness evaluation * as an indicator if the evaluation of the individual failed */ bool failed; + //! Message + /** + * Can be specified anywhere in fitness evaluation. + * Typically used to store some sort of error messages, if evaluation of individual failed. + */ + std::string msg; + + // Scalar type access operator ScalarType(void) const { if ( empty() ) From 55a118517c9bd1291e71745d90342875a0bffb1e Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 10 Aug 2004 07:39:10 +0000 Subject: [PATCH 1038/2134] Updating doxygen configuration --- eo/doc/eo.cfg | 1198 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 877 insertions(+), 321 deletions(-) diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 621e754cc..17c29d6a4 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -1,190 +1,386 @@ -# Doxyfile 1.1.1 +# Doxyfile 1.3.6 -# This file describes the settings to be used by doxygen for a project +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- -# General configuration options +# Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of word surrounded -# by quotes) that should identify the project. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. -PROJECT_NAME = EO +PROJECT_NAME = EO -# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.9.2 +PROJECT_NUMBER = 0.9.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. # The default language is English, other supported languages are: -# Dutch, French, Italian, Czech, Swedish, German and Japanese +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. -OUTPUT_LANGUAGE = English +OUTPUT_LANGUAGE = English -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). -QUIET = NO +USE_WINDOWS_ENCODING = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# If the EXTRACT_ALL tag is set to YES all classes and functions will be -# included in the documentation, even if no documentation was available. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members inside documented classes or files. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all -# undocumented classes. - -HIDE_UNDOC_CLASSES = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. -BRIEF_MEMBER_DESC = YES +BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. -REPEAT_BRIEF = YES +REPEAT_BRIEF = YES -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is used +# as the annotated text. Otherwise, the brief description is used as-is. If left +# blank, the following values are used ("$name" is automatically replaced with the +# name of the entity): "The $name class" "The $name widget" "The $name file" +# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. -ALWAYS_DETAILED_SEC = NO +ALWAYS_DETAILED_SEC = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. -FULL_PATH_NAMES = NO +FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. It is allowed to use relative paths in the argument list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. -INTERNAL_DOCS = NO +SHORT_NAMES = NO -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a class diagram (in Html and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. -CLASS_DIAGRAMS = YES +JAVADOC_AUTOBRIEF = YES -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. -SOURCE_BROWSER = YES +MULTILINE_CPP_IS_BRIEF = NO -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. -INLINE_SOURCES = NO +DETAILS_AT_TOP = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. -STRIP_CODE_COMMENTS = YES +INHERIT_DOCS = YES -# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen -# will only generate file names in lower case letters. If set to -# YES upper case letters are also allowed. This is useful if you have -# classes or files whose names only differ in case and if your file system -# supports case sensitive file names. +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. -CASE_SENSE_NAMES = NO +DISTRIBUTE_GROUP_DOC = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the Javadoc-style will -# behave just like the Qt-style comments. - -JAVADOC_AUTOBRIEF = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - -INHERIT_DOCS = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. -TAB_SIZE = 8 +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files @@ -195,369 +391,729 @@ TAB_SIZE = 8 # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../src . +INPUT = ../src \ + . # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc -FILE_PATTERNS = *.cpp *.h +FILE_PATTERNS = *.cpp \ + *.h -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. -RECURSIVE = YES +RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should +# The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = ../src/obsolete +EXCLUDE = ../src/obsolete -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should +# The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes # to standard output. -INPUT_FILTER = +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# configuration options related to source browsing #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. -GENERATE_HTML = YES +SOURCE_BROWSER = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. -HTML_OUTPUT = html +INLINE_SOURCES = NO -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. -HTML_HEADER = +STRIP_CODE_COMMENTS = YES -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. -HTML_FOOTER = +REFERENCED_BY_RELATION = YES -# The HTML_STYLESHEET tag can be used to specify a user defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. -HTML_STYLESHEET = +REFERENCES_RELATION = YES -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO +VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. -ALPHABETICAL_INDEX = YES +ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) -COLS_IN_ALPHA_INDEX = 5 +COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = eo +IGNORE_PREFIX = eo + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. -GENERATE_LATEX = YES +GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. -LATEX_OUTPUT = latex +LATEX_OUTPUT = latex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. -COMPACT_LATEX = NO +COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used +# The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. -PAPER_TYPE = a4wide +PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until +# the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. -PDF_HYPERLINKS = NO +PDF_HYPERLINKS = NO +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. -LATEX_BATCHMODE = NO + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# For now this is experimental and is disabled by default. The RTF output -# is optimised for Word 97 and may not look too pretty with other readers -# or editors. +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. -GENERATE_RTF = NO +GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. -RTF_OUTPUT = rtf +RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. -COMPACT_RTF = NO +COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using a WORD or other. -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. -RTF_HYPERLINKS = NO +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages -GENERATE_MAN = YES +GENERATE_MAN = YES -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. -MAN_OUTPUT = man +MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) -MAN_EXTENSION = .3 +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# configuration options related to the XML output #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional -# compilation will be performed. +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. -MACRO_EXPANSION = NO +MACRO_EXPANSION = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. -SEARCH_INCLUDES = YES +SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. -PREDEFINED = +PREDEFINED = -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED tag. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_ONLY_PREDEF = NO +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration options related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES tag can be used to specify one or more tagfiles. +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. -ALLEXTERNALS = NO +ALLEXTERNALS = NO -# The PERL_PATH should be the absolute path and name of the perl script +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). -PERL_PATH = /usr/bin/perl +PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superseded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = NO +HAVE_DOT = NO -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. -COLLABORATION_GRAPH = YES +COLLABORATION_GRAPH = YES -# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to -# YES then doxygen will generate a graph for each documented file showing -# the direct and indirect include dependencies of the file with other -# documented files. +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. -INCLUDE_GRAPH = YES +UML_LOOK = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. -GRAPHICAL_HIERARCHY = YES +GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes that +# lay further from the root node will be omitted. Note that setting this option to +# 1 or 2 may greatly reduce the computation time needed for large code bases. Also +# note that a graph may be further truncated if the graph's image dimensions are +# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). +# If 0 is used for the depth value (the default), the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration options related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. -SEARCHENGINE = NO - -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. - -CGI_NAME = search.cgi - -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. - -CGI_URL = - -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. - -DOC_URL = - -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. - -DOC_ABSPATH = - -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. - -BIN_ABSPATH = /usr/local/bin/ - -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. - -EXT_DOC_PATHS = +SEARCHENGINE = NO From 669f41a315fd21a0ddd9447d4df090f3a5fd0453 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 10 Aug 2004 17:19:46 +0000 Subject: [PATCH 1039/2134] Changes in docs and added stuff to eoEvalSteadyFitness to reset after using it --- eo/src/eoEasyEA.h | 19 +++++++++---------- eo/src/eoGenOp.h | 2 ++ eo/src/eoOp.h | 4 +++- eo/src/eoProportionalCombinedOp.h | 2 +- eo/src/eoReplacement.h | 9 ++++++++- eo/src/eoSGATransform.h | 8 +++----- eo/src/eoSteadyFitContinue.h | 9 +++++++-- 7 files changed, 33 insertions(+), 20 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index eddced4c6..50a9ad5d8 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -38,8 +38,13 @@ #include #include -/** eoEasyEA: - An easy-to-use evolutionary algorithm; you can use any chromosome, + + +template class eoIslandsEasyEA ; + +template class eoDistEvalEasyEA ; + +/** An easy-to-use evolutionary algorithm; you can use any chromosome, and any selection transformation, merging and evaluation algorithms; you can even change in runtime parameters of those sub-algorithms @@ -55,14 +60,8 @@ Change (MS, July 3. 2001): Note: it looks ugly only because we wanted to authorize many different constructors. Please only look at the operator() and there shall be light */ - -template class eoIslandsEasyEA ; - -template class eoDistEvalEasyEA ; - -template class eoEasyEA: public eoAlgo -{ - public: +template class eoEasyEA: public eoAlgo { +public: /** Ctor taking a breed and merge */ eoEasyEA( diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 077bfcad6..f2bea9c58 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -40,6 +40,7 @@ thanks to the friend class eoPopulator @version 0.0 */ +//@{ /** The base class for General Operators Subclass this operator is you want to define an operator that falls @@ -220,3 +221,4 @@ class eoQuadGenOp : public eoGenOp #endif +//@} diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index e2143619a..81c7c9d61 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - CVS Info: $Date: 2003-02-27 19:25:56 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.28 2003-02-27 19:25:56 okoenig Exp $ $Author: okoenig $ + CVS Info: $Date: 2004-08-10 17:19:46 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.29 2004-08-10 17:19:46 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -54,6 +54,7 @@ how to build them from a description in a file. @see eoGenOp.h eoOpFactory */ +//@{ /** Abstract data types for EO operators. Genetic operators act on chromosomes, changing them. @@ -166,3 +167,4 @@ private: #endif +//@} diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 7fa8a8959..8a30d368d 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -30,7 +30,7 @@ #include #include /** -\defgroup PropCombined operators +\defgroup PropCombinedOperators Combination of same-type Genetic Operators - Proportional choice */ diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index c90033310..364553729 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -67,7 +67,12 @@ MS 12/12/2000 eoGenerationalReplacement, as it says ... eoWeakElitistReplacement a wrapper to add elitism - */ +*/ + + +//@{ + +/// template class eoReplacement : public eoBF&, eoPop&, void> {}; @@ -118,4 +123,6 @@ private: eoReplacement & replace; }; +//@} + #endif diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 4eebbe375..e1e9c82f5 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -37,12 +37,11 @@ #include #include -/** *************************************************************************** - * eoSGATransform: transforms a population using genetic operators. +/** eoSGATransform: transforms a population using genetic operators. * It does it exactly as class eoSGA, i.e. only accepts * quadratic crossover and unary mutation * It is here mainly for tutorial reasons - *****************************************************************************/ +*/ template class eoSGATransform : public eoTransform { public: @@ -90,8 +89,7 @@ template class eoSGATransform : public eoTransform double mutationProba; }; -/** *************************************************************************** - * eoDynSGATransform: transforms a population using genetic operators. +/** eoDynSGATransform: transforms a population using genetic operators. * It is the Dynamic version of the above eoSGATransform * i.e. the operators probabilities can be passed as an eoValueParam, * and hence can be modified from outside diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index d40b6a041..c9d8ca7ed 100755 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -84,10 +84,15 @@ public: virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) { repMinGenerations = _mg; repSteadyGenerations = _sg; - thisGeneration = 0; - steadyState = false; + reset(); }; + /// Resets the state after it's been reached + virtual void reset () { + steadyState=false; + thisGeneration = 0; + } + /** accessors*/ virtual unsigned long minGenerations( ) { return repMinGenerations; }; From 17db378c84174c81fde4bb7304182ba93c077522 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 28 Aug 2004 14:03:34 +0000 Subject: [PATCH 1040/2134] Cleaned up the comments --- eo/src/eoCombinedInit.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 7e6801f1e..3d2441322 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -28,14 +28,14 @@ #include /** - Combined INIT: a proportional recombination of eoInit + Combined INIT: a proportional recombination of eoInit objects */ template< class EOT> class eoCombinedInit: public eoInit { public: - /// Ctor, make sure that at least on continuator is present + /** Ctor, make sure that at least one eoInit is present */ eoCombinedInit( eoInit& _init, double _rate) : eoInit () { @@ -43,6 +43,10 @@ public: rates.push_back(_rate); } + /** The usual method to add objects to the combination + * note the _verbose parameter, that allows to print what's + * inside the combination with scaled rates + */ void add(eoInit & _init, double _rate, bool _verbose=false) { initializers.push_back(&_init); @@ -52,7 +56,7 @@ public: printOn(std::cout); } - // outputs the operators and percentages + /** outputs the operators and percentages */ virtual void printOn(std::ostream & _os) { double total = 0; @@ -65,7 +69,7 @@ public: } /** Performs the init: chooses among all initializers - * using some roulette wheel choice + * using roulette wheel on the rates */ virtual void operator() ( EOT & _eo ) { From e7643ccc10d32ecba2851822557f8080260914cb Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 28 Aug 2004 16:25:12 +0000 Subject: [PATCH 1041/2134] Committing at last the long awaited test for Sharing --- eo/test/t-eoSharing.cpp | 236 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 eo/test/t-eoSharing.cpp diff --git a/eo/test/t-eoSharing.cpp b/eo/test/t-eoSharing.cpp new file mode 100644 index 000000000..2cd436da9 --- /dev/null +++ b/eo/test/t-eoSharing.cpp @@ -0,0 +1,236 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include // runtime_error + +// general +#include +#include +//----------------------------------------------------------------------------- + +struct Dummy : public EO +{ + typedef double Type; + void printOn(std::ostream & _os) const + { + EO::printOn(_os); + cout << " " << xdist ; + } + double xdist; +}; + +class +eoDummyDistance : public eoDistance +{ + double operator()(const Dummy & _v1, const Dummy & _v2) + { + double r= _v1.xdist - _v2.xdist; + return sqrt(r*r); + } +}; + + +bool operator==(const Dummy & _d1, const Dummy & _d2) +{ + return _d1.fitness() == _d2.fitness(); +} + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s=0) { resize(s); } +}; + +// helper - DOES NOT WORK if different individuals have same fitness!!! +template +unsigned isInPop(EOT & _indi, eoPop & _pop) +{ + for (unsigned i=0; i<_pop.size(); i++) + if (_pop[i] == _indi) + return i; + return _pop.size(); +} + +unsigned int pSize; // global variable, bouh! +std::string fitnessType; // yes, a global variable :-) +eoDummyPop parentsOrg; + +template +void testSelectMany(eoSelect & _select, std::string _name) +{ + unsigned i; + std::cout << "\n\n" << fitnessType + _name << std::endl; + std::cout << "===============\n"; + + eoDummyPop parents(parentsOrg); + eoDummyPop offspring(0); + + // do the selection + _select(parents, offspring); + + // cout << "Pop offspring \n" << offspring << endl; + + // compute stats + std::vector nb(parents.size(), 0); + for (i=0; i(offspring[i], parents); + if (trouve == parents.size()) // pas trouve + throw std::runtime_error("Pas trouve ds parents"); + nb[trouve]++; + } + // dump to file so you can plot using gnuplot - dir name is hardcoded! + std::string fName = "ResSelect/" + fitnessType + _name + ".select"; + std::ofstream os(fName.c_str()); + for (i=0; i " << ( (double)nb[i])/offspring.size() << std::endl; + os << i << " " << ( (double)nb[i])/offspring.size() << std::endl; + } + +} + +template +void testSelectOne(eoSelectOne & _select, eoHowMany & _offspringRate, + eoHowMany & _fertileRate, std::string _name) +{ + eoTruncatedSelectOne truncSelect(_select, _fertileRate); + eoSelectMany percSelect(truncSelect, _offspringRate); + testSelectMany(percSelect, _name); +} + + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + + // random seed + eoValueParam& seedParam = parser.createParam(uint32(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + rng.reseed(seedParam.value()); + + + // pSize global variable ! + eoValueParam pSizeParam = parser.createParam(unsigned(10), "parentSize", "Parent size",'P'); + pSize = pSizeParam.value(); + + eoHowMany oRate = parser.createParam(eoHowMany(1.0), "offsrpringRate", "Offsrpring rate (% or absolute)",'O').value(); + + eoHowMany fRate = parser.createParam(eoHowMany(1.0), "fertileRate", "Fertility rate (% or absolute)",'F').value(); + + + double nicheSize = parser.createParam(0.1, "nicheSize", "Paramter Sigma for Sharing",'\0').value(); + + eoParamParamType & peakParam = parser.createParam(eoParamParamType("2(1,2)"), "peaks", "Description of the peaks: N(nb1,nb2,...,nbN)", 'p').value(); + + // the number of peaks: first item of the paramparam + unsigned peakNumber = atoi(peakParam.first.c_str()); + if (peakNumber < 2) + { + std::cerr << "WARNING, nb of peaks must be larger than 2, using 2" << std::endl; + peakNumber = 2; + } + + vector nbIndiPerPeak(peakNumber); + unsigned i, sum=0; + + // the second item is a vector containing all values + if (!peakParam.second.size()) // no other parameter : equal peaks + { + std::cerr << "WARNING, no nb of indis per peaks, using equal nbs" << std::endl; + for (i=0; i detSelect(oRate); + // testSelectMany(detSelect, "detSelect"); + + // Sharing using the perf2Worth construct + // need a distance for that + eoDummyDistance dist; + eoSharingSelect newSharingSelect(nicheSize, dist); + sprintf(fileName,"Niche_%g",nicheSize); + testSelectOne(newSharingSelect, oRate, fRate, fileName); + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + return 1; + } +} From 57881e56c4a940aefc8872bdc25eb9d67a39838c Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 28 Aug 2004 16:26:03 +0000 Subject: [PATCH 1042/2134] CLeaned up the comments in files related to Sharing (added t-eoSharing in test) --- eo/src/eoSharing.h | 26 +++++++------------------- eo/src/eoSharingSelect.h | 10 ++++++---- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/eo/src/eoSharing.h b/eo/src/eoSharing.h index 7f177aee3..771e2be93 100644 --- a/eo/src/eoSharing.h +++ b/eo/src/eoSharing.h @@ -24,7 +24,7 @@ //----------------------------------------------------------------------------- #ifndef eoSharing_h -#define eoPerf2Worth_h +#define eoSharing_h #include #include @@ -33,8 +33,7 @@ * Goldberg and Richardson's basic sharing */ -// First a helper class - // helper class to hold distances +/** A helper class for Sharing - to hold distances */ class dMatrix : public std::vector { public: @@ -71,7 +70,11 @@ }; -// template > +/** Sharing is a perf2worth class that implements + * Goldberg and Richardson's basic sharing + * see eoSharingSelect for how to use it + * and test/t-eoSharing.cpp for a sample use of both +*/ template class eoSharing : public eoPerf2Worth { @@ -107,28 +110,13 @@ class eoSharing : public eoPerf2Worth } } -// cout << "Matrice des similarités\n"; -// for (i=0; i #include -/** eoRankingSelect: select an individual by roulette wheel on its rank - * is an eoRouletteWorthSelect, i.e. a selector using a std::vector of worthes - * rather than the raw fitness (see eoSelectFromWorth.h) - * uses an internal eoRanking object which is an eoPerf2Worth +/** eoSharingSelect: select an individual by roulette wheel + * on its SHARED fitness. It is an eoRouletteWorthSelect, + * i.e. a selector using a std::vector of worthes + * rather than the raw fitness (see eoSelectFromWorth.h) + * It uses an internal eoSharing object which is + * an eoPerf2Worth */ template From dbd0a46d75f1e30079701b4c27c3631508bfa7a9 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 30 Aug 2004 19:44:48 +0000 Subject: [PATCH 1043/2134] added verbose flag that can be used to turn off annoying message to cout --- eo/src/eoGenContinue.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 71d67c645..42f6f5d79 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -39,13 +39,13 @@ public: eoGenContinue( unsigned long _totalGens) : repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), - thisGeneration(thisGenerationPlaceHolder){}; + thisGeneration(thisGenerationPlaceHolder), verbose(true) {}; /// Ctor for enabling the save/load the no. of generations counted eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) : repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), - thisGeneration(_currentGen){}; + thisGeneration(_currentGen), verbose(true){}; /** Returns false when a certain number of generations is * reached */ @@ -54,7 +54,8 @@ public: // std::cout << " [" << thisGeneration << "] "; if (thisGeneration >= repTotalGenerations) { - std::cout << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; + if (verbose) + std::cout << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; return false; } return true; @@ -72,12 +73,16 @@ public: { return repTotalGenerations; }; + virtual std::string className(void) const { return "eoGenContinue"; } private: unsigned long repTotalGenerations; unsigned long thisGenerationPlaceHolder; unsigned long& thisGeneration; + +public: + bool verbose; // allows to turn off annoying message to cout }; #endif From 32cf83cfee845d72649e170ebe076a0370be63af Mon Sep 17 00:00:00 2001 From: kuepper Date: Fri, 17 Sep 2004 15:20:19 +0000 Subject: [PATCH 1044/2134] Save copies of old simple Makefiles --- eo/tutorial/Lesson1/Makefile.simple | 25 +++++++++ eo/tutorial/Lesson2/Makefile.simple | 34 +++++++++++ eo/tutorial/Lesson3/Makefile.simple | 33 +++++++++++ eo/tutorial/Lesson4/Makefile.simple | 33 +++++++++++ eo/tutorial/Lesson5/Makefile.simple | 56 +++++++++++++++++++ eo/tutorial/Makefile.simple | 29 ++++++++++ eo/tutorial/ParadisEO/Lesson1/Makefile.simple | 29 ++++++++++ eo/tutorial/ParadisEO/Lesson2/Makefile.simple | 23 ++++++++ eo/tutorial/ParadisEO/Lesson3/Makefile.simple | 16 ++++++ 9 files changed, 278 insertions(+) create mode 100644 eo/tutorial/Lesson1/Makefile.simple create mode 100644 eo/tutorial/Lesson2/Makefile.simple create mode 100644 eo/tutorial/Lesson3/Makefile.simple create mode 100644 eo/tutorial/Lesson4/Makefile.simple create mode 100644 eo/tutorial/Lesson5/Makefile.simple create mode 100644 eo/tutorial/Makefile.simple create mode 100644 eo/tutorial/ParadisEO/Lesson1/Makefile.simple create mode 100644 eo/tutorial/ParadisEO/Lesson2/Makefile.simple create mode 100644 eo/tutorial/ParadisEO/Lesson3/Makefile.simple diff --git a/eo/tutorial/Lesson1/Makefile.simple b/eo/tutorial/Lesson1/Makefile.simple new file mode 100644 index 000000000..093ca8525 --- /dev/null +++ b/eo/tutorial/Lesson1/Makefile.simple @@ -0,0 +1,25 @@ +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +firstGA = FirstRealGA FirstBitGA + +ALL = $(firstGA) exercise1.3 + +lesson1 : $(firstGA) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson2/Makefile.simple b/eo/tutorial/Lesson2/Makefile.simple new file mode 100644 index 000000000..1aec17105 --- /dev/null +++ b/eo/tutorial/Lesson2/Makefile.simple @@ -0,0 +1,34 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +firstEA = FirstRealEA FirstBitEA + +ALL = $(firstEA) exercise2.3 + +lesson2 : $(firstEA) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +FirstRealEA : real_value.h + +FirstBitEA : binary_value.h diff --git a/eo/tutorial/Lesson3/Makefile.simple b/eo/tutorial/Lesson3/Makefile.simple new file mode 100644 index 000000000..186791f26 --- /dev/null +++ b/eo/tutorial/Lesson3/Makefile.simple @@ -0,0 +1,33 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +secondEA = SecondBitEA SecondRealEA + +ALL = $(secondEA) exercise3.1 + +lesson3 : $(secondEA) + +all : $(ALL) + +SecondBitEA : binary_value.h +SecondRealEA : real_value.h + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson4/Makefile.simple b/eo/tutorial/Lesson4/Makefile.simple new file mode 100644 index 000000000..75bd41dd4 --- /dev/null +++ b/eo/tutorial/Lesson4/Makefile.simple @@ -0,0 +1,33 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp + +ALL = BitEA RealEA ESEA + +all : $(ALL) + +BitEA : BitEA.o ; + $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/ga/libga.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +RealEA : RealEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +ESEA : ESEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson5/Makefile.simple b/eo/tutorial/Lesson5/Makefile.simple new file mode 100644 index 000000000..bb865c104 --- /dev/null +++ b/eo/tutorial/Lesson5/Makefile.simple @@ -0,0 +1,56 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp + +# local sources +COMMON_SOURCES = eoOneMax.h \ + eoOneMaxEvalFunc.h \ + eoOneMaxInit.h \ + eoOneMaxMutation.h \ + eoOneMaxQuadCrossover.h \ + make_genotype_OneMax.h \ + make_op_OneMax.h + +NO_LIB_SOURCES = OneMaxEA.cpp + +LIB_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp + + +SOURCES = $(COMMON_SOURCES) OneMaxEA.cpp OneMaxLibEA.cpp make_OneMax.cpp + +LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +ALL = OneMaxEA OneMaxLibEA + +OneMaxEA : OneMaxEA.o + $(CXX) -g -o $@ OneMaxEA.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm + +OneMaxLibEA : OneMaxLibEA.o make_OneMax.o + $(CXX) -g -o $@ OneMaxLibEA.o make_OneMax.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm + +tar : ; tar czvf OneMax.tgz *.h *.cpp Makefile + +all : $(ALL) + +clean : ; /bin/rm *.o $(ALL) + +########## local dependencies +OneMaxEA.o : $(COMMON_SOURCES) OneMaxEA.cpp +OneMaxLibEA.o : $(COMMON_SOURCES) OneMaxLibEA.cpp +make_OneMax.o : make_OneMax.cpp eoOneMax.h diff --git a/eo/tutorial/Makefile.simple b/eo/tutorial/Makefile.simple new file mode 100644 index 000000000..61396d3c2 --- /dev/null +++ b/eo/tutorial/Makefile.simple @@ -0,0 +1,29 @@ +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 + +all: + for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done + +lesson1 : + cd Lesson1; make + +lesson2 : + cd Lesson2; make + +lesson3 : + cd Lesson3; make + +lesson4 : + cd Lesson4; make + +lesson5 : + cd Lesson5; make + +#empty dist and distdir to let top-level 'make' do its job +dist : + +distdir : + +check : + +clean: + for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile.simple b/eo/tutorial/ParadisEO/Lesson1/Makefile.simple new file mode 100644 index 000000000..7bd46d2a6 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/Makefile.simple @@ -0,0 +1,29 @@ +MPICC = mpiCC + +ALL = IslandBitEA IslandBitEA2 IslandBitEA1 + +lesson2 : IslandBitEA IslandBitEA2 IslandBitEA1 + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +IslandBitEA : IslandBitEA.o + $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA IslandBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +IslandBitEA.o : IslandBitEA.cpp binary_value.h + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA.cpp + +IslandBitEA1 : IslandBitEA1.o + $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA1 IslandBitEA1.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +IslandBitEA1.o : IslandBitEA1.cpp binary_value.h + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA1.cpp + +IslandBitEA2 : IslandBitEA2.o + $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA2 IslandBitEA2.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +IslandBitEA2.o : IslandBitEA2.cpp binary_value.h + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA2.cpp + diff --git a/eo/tutorial/ParadisEO/Lesson2/Makefile.simple b/eo/tutorial/ParadisEO/Lesson2/Makefile.simple new file mode 100644 index 000000000..87ea5380d --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/Makefile.simple @@ -0,0 +1,23 @@ +MPICC = mpiCC + +ALL = MasterDistEvalBitEA SlaveDistEvalBitEA + +lesson2 : MasterDistEvalBitEA SlaveDistEvalBitEA + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +MasterDistEvalBitEA : MasterDistEvalBitEA.o + $(MPICC) -DPACKAGE=\"eo\" -o MasterDistEvalBitEA MasterDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +MasterDistEvalBitEA.o : MasterDistEvalBitEA.cpp binary_value.h + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c MasterDistEvalBitEA.cpp + +SlaveDistEvalBitEA : SlaveDistEvalBitEA.o + $(MPICC) -DPACKAGE=\"eo\" -o SlaveDistEvalBitEA SlaveDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a + +SlaveDistEvalBitEA.o : SlaveDistEvalBitEA.cpp binary_value.h + $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c SlaveDistEvalBitEA.cpp + diff --git a/eo/tutorial/ParadisEO/Lesson3/Makefile.simple b/eo/tutorial/ParadisEO/Lesson3/Makefile.simple new file mode 100644 index 000000000..3b255b387 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson3/Makefile.simple @@ -0,0 +1,16 @@ +.SUFFIXES: .cpp +.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -o $@ $*.cpp ../../../src/utils/libeoutils.a ../../../src/libeo.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -c $*.cpp + +ALL = CellularBitEA + +lesson3 : $(firstEA) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +CellularBitEA : binary_value.h + From c8494642d5b5233f26fc523664593b44bbe22e75 Mon Sep 17 00:00:00 2001 From: kuepper Date: Fri, 17 Sep 2004 16:53:31 +0000 Subject: [PATCH 1045/2134] Updated build-prcess to be completely under automake control. For the tutorial the old Makefiles are saved as Makefile.simple in all the respective directories. Use generated config.h instead of command-line passing of preprocessor flags. Updated support files from current automake. --- eo/.cvsignore | 8 +- eo/COPYING | 4 +- eo/INSTALL | 154 ++++++++++++--------- eo/Makefile.am | 34 +++-- eo/app/mastermind/Makefile.am | 2 +- eo/app/mastermind/mastermind.cpp | 3 +- eo/autogen.sh | 32 ++--- eo/configure.in | 31 ++++- eo/depcomp | 215 ++++++++++++++--------------- eo/install-sh | 37 ++--- eo/missing | 190 ++++++++++++++++++++++--- eo/mkinstalldirs | 73 +++++++++- eo/src/Makefile.am | 14 +- eo/src/eoVariableLengthCrossover.h | 2 + eo/src/es/Makefile.am | 2 +- eo/src/ga/Makefile.am | 2 +- eo/src/pyeo/pickle.h | 2 + eo/src/utils/Makefile.am | 4 +- eo/src/utils/eoFileSnapshot.h | 2 + eo/src/utils/eoGnuplot.h | 4 +- eo/src/utils/eoGnuplot1DMonitor.h | 2 + eo/src/utils/eoGnuplot1DSnapshot.h | 6 +- eo/src/utils/eoHowMany.h | 3 + eo/src/utils/eoParam.h | 2 + eo/src/utils/eoPopStat.h | 2 + eo/tutorial/.cvsignore | 1 + eo/tutorial/Lesson1/.cvsignore | 1 + eo/tutorial/Lesson1/Makefile.am | 16 +++ eo/tutorial/Lesson2/.cvsignore | 1 + eo/tutorial/Lesson2/Makefile.am | 23 +++ eo/tutorial/Lesson3/.cvsignore | 1 + eo/tutorial/Lesson3/Makefile.am | 26 ++++ eo/tutorial/Lesson4/.cvsignore | 1 + eo/tutorial/Lesson4/Makefile.am | 27 ++++ eo/tutorial/Lesson5/.cvsignore | 1 + eo/tutorial/Lesson5/Makefile.am | 25 ++++ eo/tutorial/Makefile.am | 1 + 37 files changed, 675 insertions(+), 279 deletions(-) create mode 100644 eo/tutorial/.cvsignore create mode 100644 eo/tutorial/Lesson1/.cvsignore create mode 100644 eo/tutorial/Lesson1/Makefile.am create mode 100644 eo/tutorial/Lesson2/.cvsignore create mode 100644 eo/tutorial/Lesson2/Makefile.am create mode 100644 eo/tutorial/Lesson3/.cvsignore create mode 100644 eo/tutorial/Lesson3/Makefile.am create mode 100644 eo/tutorial/Lesson4/.cvsignore create mode 100644 eo/tutorial/Lesson4/Makefile.am create mode 100644 eo/tutorial/Lesson5/.cvsignore create mode 100644 eo/tutorial/Lesson5/Makefile.am create mode 100644 eo/tutorial/Makefile.am diff --git a/eo/.cvsignore b/eo/.cvsignore index 0339526b1..f48de12bf 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -1,17 +1,19 @@ -*.lo *.la +*.lo .deps .libs Makefile Makefile.in aclocal.m4 +autom4te.cache confdefs.h +config.cache +config.cache config.h config.h.in -configure config.log -config.cache config.status +configure libtool stamp-h stamp-h.in diff --git a/eo/COPYING b/eo/COPYING index eeb586b39..d60c31a97 100644 --- a/eo/COPYING +++ b/eo/COPYING @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/eo/INSTALL b/eo/INSTALL index 4e887f76b..a4b34144d 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -1,27 +1,8 @@ - EO INSTALL FILE -======================================================================= - check latest news at http://eodev.sourceforge.net/ -======================================================================= +Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. -This file contains the standard installation instructions for packages -built using GNU package management facilities. - -You should not need to read this file unless something goes wrong when -doing the basic install which goes: - -- go to the EO directory - that was created when you unzipped the - archive file. - -- run - ./autogen.sh - -- run - make - -and that's it. You should probably go to the tutorial and start -learning about EO features and programming. - -======================================================================= + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. Basic Installation ================== @@ -33,20 +14,27 @@ various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. The simplest way to compile this package is: @@ -80,14 +68,16 @@ Compilers and Options ===================== Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== @@ -100,11 +90,11 @@ directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. Installation Names ================== @@ -147,22 +137,32 @@ you can use the `configure' options `--x-includes=DIR' and Specifying the System Type ========================== - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + CPU-COMPANY-SYSTEM -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. +where SYSTEM can have one of these forms: - If you are building compiler tools for cross-compiling, you can also + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. Sharing Defaults ================ @@ -175,20 +175,44 @@ default values for variables like `CC', `cache_file', and `prefix'. `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Operation Controls +Defining Variables ================== + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + `configure' recognizes the following options to control how it operates. -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - `--help' +`-h' Print a summary of the options to `configure', and exit. +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + `--quiet' `--silent' `-q' @@ -200,8 +224,6 @@ operates. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. -`configure' also accepts some other, not widely useful, options. diff --git a/eo/Makefile.am b/eo/Makefile.am index 3296c41b2..ae03e3c9e 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,33 +4,43 @@ ## ############################################################################### -SUBDIRS = src test app tutorial +SUBDIRS = src test app tutorial + #Directory for documents DOCDIR = ~/public_html/eodocs + #Directory for indices -- not useful for the user IDXDIR = ~/index -EXTRA_DIST=LICENSE +# EXTRA_DIST=LICENSE -############################################################################### -lib: - cd src; $(MAKE) all; cd .. + +# special targets +app: + cd app; $(MAKE) all; cd .. # so that make doc always compiles the doc ... doc: doc/eo.cfg cd doc; $(MAKE) doc; touch eo.cfg; cd .. tutorial: - cd tutorial; $(MAKE) all; cd .. + cd $(srcdir)/tutorial; $(MAKE) all; cd .. + -app: - cd app; $(MAKE) all; cd .. -all: - for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done -clean: - for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done + +############################################################################### + +#lib: +# cd src; $(MAKE) all; cd .. + + +#all: +# for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done + +#clean: +# for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done ############################################################################### diff --git a/eo/app/mastermind/Makefile.am b/eo/app/mastermind/Makefile.am index d43be627f..4d3c0c887 100644 --- a/eo/app/mastermind/Makefile.am +++ b/eo/app/mastermind/Makefile.am @@ -8,7 +8,7 @@ DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a ############################################################################### diff --git a/eo/app/mastermind/mastermind.cpp b/eo/app/mastermind/mastermind.cpp index 25ee725bb..40f137778 100644 --- a/eo/app/mastermind/mastermind.cpp +++ b/eo/app/mastermind/mastermind.cpp @@ -7,7 +7,8 @@ #include // cerr cout #include // ifstream #include // string -#include // all usefull eo stuff +#include // all usefull eo stuff\ + #include "mastermind.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator using namespace std; diff --git a/eo/autogen.sh b/eo/autogen.sh index c65b09984..b76c3a8fd 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -29,32 +29,26 @@ if test "$DIE" -eq 1; then exit 1 fi -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish" - echo "to pass any to it, please specify them on the $0 command line." -fi +set aclocalinclude="$ACLOCAL_FLAGS" +aclocal $aclocalinclude +unset $aclocalinclude +autoheader +automake +autoconf -for dir in . -do - echo processing $dir - ( - cd $dir; \ - aclocalinclude="$ACLOCAL_FLAGS"; \ - aclocal $aclocalinclude; \ - autoheader; \ - automake; \ - autoconf - ) -done - -./configure "$@" +# if test -z "$*"; then +# echo "I am going to run ./configure with no arguments - if you wish" +# echo "to pass any to it, please specify them on the $0 command line." +# fi +# +# ./configure "$@" # we want doc to be recompiled - and it keeps saying it's up to date!!! touch doc/eo.cfg echo echo "Now type 'make' to compile $PROG." -echo "And if you have Doxygen installed, type 'make doc' to generate $PROG documentation." +echo "If you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo #echo "WARNING: Compiling all test programs can take some time." #echo "But you don't have to: you can simply type" diff --git a/eo/configure.in b/eo/configure.in index 05a61ac2e..26640610e 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -4,6 +4,8 @@ AC_INIT(src/eo) dnl Change the version number here AM_INIT_AUTOMAKE(eo, 0.9.3) +AM_CONFIG_HEADER([config.h]) + dnl Checks for maintainer mode AM_MAINTAINER_MODE @@ -15,13 +17,9 @@ AC_PROG_MAKE_SET AC_PROG_RANLIB dnl Checks for libraries. -dnl Replace `main' with a function in -leo: AC_CHECK_LIB(eo, main) -dnl Replace `main' with a function in -leoutils: AC_CHECK_LIB(eoutils, main) -dnl Replace `main' with a function in -lm: -AC_CHECK_LIB(m, main) - +AC_CHECK_LIB(m, cos) dnl Checks for header files. AC_HEADER_STDC @@ -36,5 +34,24 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/mastermind/Makefile app/gpsymreg/Makefile src/do/Makefile) -#app/gprop/Makefile is in the sinbin +AC_OUTPUT(Makefile \ + src/Makefile \ + src/do/Makefile \ + src/es/Makefile \ + src/gp/Makefile \ + src/ga/Makefile \ + src/other/Makefile \ + src/utils/Makefile \ + contrib/Makefile \ + doc/Makefile \ + win/Makefile \ + test/Makefile \ + tutorial/Makefile \ + tutorial/Lesson1/Makefile \ + tutorial/Lesson2/Makefile \ + tutorial/Lesson3/Makefile \ + tutorial/Lesson4/Makefile \ + tutorial/Lesson5/Makefile \ + app/Makefile \ + app/mastermind/Makefile \ + app/gpsymreg/Makefile) diff --git a/eo/depcomp b/eo/depcomp index 3480ce4e9..807b991f4 100755 --- a/eo/depcomp +++ b/eo/depcomp @@ -209,16 +209,20 @@ aix) tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'` - tmpdepfile1="$base.o.d" - tmpdepfile2="$base.d" if test "$libtool" = yes; then + tmpdepfile1="$dir.libs/$base.lo.d" + tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else + tmpdepfile1="$dir$base.o.d" + tmpdepfile2="$dir$base.d" "$@" -MD fi @@ -250,34 +254,40 @@ tru64) dashmstdout) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - test -z "$dashmflag" && dashmflag=-M - ( IFS=" " - case " $* " in - *" --mode=compile "*) # this is libtool, let us make it quiet - for arg - do # cycle over the arguments - case "$arg" in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done + # always write the proprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. We will use -o /dev/null later, + # however we can't do the remplacement now because + # `-o $object' might simply not be used + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg ;; esac - "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi + done + + test -z "$dashmflag" && dashmflag=-M + "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' @@ -295,33 +305,28 @@ dashXmstdout) ;; makedepend) + "$@" || exit $? # X makedepend - ( - shift - cleared=no - for arg in "$@"; do - case $cleared in no) - set ""; shift - cleared=yes - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift;; - -*) - ;; - *) - set fnord "$@" "$arg"; shift;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' @@ -334,35 +339,39 @@ makedepend) cpp) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - ( IFS=" " - case " $* " in - *" --mode=compile "*) - for arg - do # cycle over the arguments - case $arg in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done + # always write the proprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg ;; esac - "$@" -E | + done + + "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -374,47 +383,25 @@ msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. - ( IFS=" " - case " $* " in - *" --mode=compile "*) - for arg - do # cycle over the arguments - case $arg in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done - ;; - esac - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; - *) + *) set fnord "$@" "$arg" shift shift ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" diff --git a/eo/install-sh b/eo/install-sh index e8436696c..11870f1b0 100755 --- a/eo/install-sh +++ b/eo/install-sh @@ -109,7 +109,7 @@ then echo "install: no input file specified" exit 1 else - true + : fi if [ x"$dir_arg" != x ]; then @@ -118,8 +118,9 @@ if [ x"$dir_arg" != x ]; then if [ -d $dst ]; then instcmd=: + chmodcmd="" else - instcmd=mkdir + instcmd=$mkdirprog fi else @@ -127,9 +128,9 @@ else # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. - if [ -f $src -o -d $src ] + if [ -f "$src" ] || [ -d "$src" ] then - true + : else echo "install: $src does not exist" exit 1 @@ -140,7 +141,7 @@ else echo "install: no destination specified" exit 1 else - true + : fi # If destination is a directory, append the input filename; if your system @@ -150,7 +151,7 @@ else then dst="$dst"/`basename $src` else - true + : fi fi @@ -162,8 +163,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then -defaultIFS=' -' +defaultIFS=' + ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" @@ -182,7 +183,7 @@ while [ $# -ne 0 ] ; do then $mkdirprog "${pathcomp}" else - true + : fi pathcomp="${pathcomp}/" @@ -193,10 +194,10 @@ if [ x"$dir_arg" != x ] then $doit $instcmd $dst && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. @@ -215,7 +216,7 @@ else then dstfile=`basename $dst` else - true + : fi # Make a temp file name in the proper directory. @@ -234,10 +235,10 @@ else # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. diff --git a/eo/missing b/eo/missing index cbe2b0ef0..6a37006e8 100755 --- a/eo/missing +++ b/eo/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. +# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,11 +18,37 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. case "$1" in -h|--h|--he|--hel|--help) @@ -35,6 +61,7 @@ error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' @@ -43,13 +70,15 @@ Supported PROGRAM values: automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" + echo "missing 0.4 - GNU automake" ;; -*) @@ -58,50 +87,100 @@ Supported PROGRAM values: exit 1 ;; - aclocal) + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want + you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the + you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want + you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` - if test -z "$files"; then - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` - test -z "$files" || files="$files.in" - else - files=`echo "$files" | sed -e 's/:/ /g'` - fi - test -z "$files" && files="config.h.in" - touch $files + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files ;; - automake) + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." - find . -type f -name Makefile.am -print \ - | sed 's/^\(.*\).am$/touch \1.in/' \ - | sh + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. + You can get \`$1Help2man' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi ;; bison|yacc) @@ -157,7 +236,37 @@ WARNING: \`$1' is missing on your system. You should only need it if fi ;; + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -173,6 +282,45 @@ WARNING: \`$1' is missing on your system. You should only need it if touch $file ;; + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your diff --git a/eo/mkinstalldirs b/eo/mkinstalldirs index 42b58cdb1..8ab885ec9 100755 --- a/eo/mkinstalldirs +++ b/eo/mkinstalldirs @@ -4,9 +4,53 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 5.1 1999-02-12 17:39:01 gustavo Exp $ - errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) # -h for help + echo "${usage}" 1>&2; exit 0 ;; + -m ) # -m PERM arg + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + dirmode="${1}" + shift ;; + -- ) shift; break ;; # stop option processing + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option + * ) break ;; # first non-opt arg + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in +0) exit 0 ;; +esac + +case $dirmode in +'') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi ;; +*) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi ;; +esac for file do @@ -22,13 +66,24 @@ do esac if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 + echo "mkdir $pathcomp" - mkdir "$pathcomp" || lasterr=$? + mkdir "$pathcomp" || lasterr=$? - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi fi pathcomp="$pathcomp/" @@ -37,4 +92,8 @@ done exit $errstatus +# Local Variables: +# mode: shell-script +# sh-indentation: 3 +# End: # mkinstalldirs ends here diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 64113f2eb..6e41c85eb 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,12 +4,22 @@ ## ############################################################################### +INCLUDES = -I$(top_srcdir)/src + SUBDIRS = es ga gp utils other do + CPPFLAGS = -O2 lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp eoParetoFitness.cpp eoScalarFitnessAssembled.cpp + +libeo_a_SOURCES = eoFunctorStore.cpp \ + eoPersistent.cpp \ + eoPrintable.cpp \ + eoCtrlCContinue.cpp \ + eoParetoFitness.cpp \ + eoScalarFitnessAssembled.cpp libeoincdir = $(includedir)/eo -libeoinc_HEADERS = *.h eo do/*.h + +libeoinc_HEADERS = $(srcdir)/*.h $(srcdir)/eo $(srcdir)/do/*.h diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 6a4bf7876..f2a389324 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -26,6 +26,8 @@ #ifndef _eoVariableLengthCrossover_h #define _eoVariableLengthCrossover_h +#include + #include #include diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index b6b056fe5..2957f3719 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src lib_LIBRARIES = libes.a libes_a_SOURCES = make_algo_scalar_es.cpp \ make_algo_scalar_real.cpp \ diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index b06e9dcfc..bd4ba013e 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -4,7 +4,7 @@ ## ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src lib_LIBRARIES = libga.a libga_a_SOURCES = make_algo_scalar_ga.cpp \ make_checkpoint_ga.cpp \ diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index 3d0bc4e04..496a28726 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -21,6 +21,8 @@ #ifndef PICKLE_H #define PICKLE_h +#include + #include #ifdef HAVE_SSTREAM #include diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 1b2484a8c..9076455dc 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -4,13 +4,13 @@ ## ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src CPPFLAGS = -O2 -Wall lib_LIBRARIES = libeoutils.a libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp eoRealBounds.cpp make_help.cpp libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = checkpointing *.h +libeoinc_HEADERS = checkpointing $(srcdir)/*.h #compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h eoRndGenerators.h selectors.h diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index ed2857685..51643ff47 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -27,6 +27,8 @@ #ifndef _eoFileSnapshot_h #define _eoFileSnapshot_h +#include + #include #include #include diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 4498c1e1e..38297cd62 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -26,6 +26,8 @@ #ifndef _eoGnuplot_H #define _eoGnuplot_H +#include + #include /** @@ -150,7 +152,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.9 2004-01-21 19:57:19 maartenkeijzer Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.10 2004-09-17 16:53:15 kuepper Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index aa24a2865..655966231 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -28,6 +28,8 @@ #ifndef _eoGnuplot1DMonitor_H #define _eoGnuplot1DMonitor_H +#include + #include #include diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 983b634ef..ef70aa637 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -28,8 +28,12 @@ #ifndef _eoGnuplot1DSnapshot_H #define _eoGnuplot1DSnapshot_H +#include + #include -// #include +#ifdef HAVE_SSTREAM +#include +#endif #include #include diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 95f36c670..782bbd447 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -63,6 +63,9 @@ * * It is an eoPersistent because we need to be able to use eoParamValue */ + +#include + #ifdef HAVE_SSTREAM #include #else diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 4110be5c3..7595ef502 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -27,6 +27,8 @@ #ifndef eoParam_h #define eoParam_h +#include + //----------------------------------------------------------------------------- #include // for floor #include diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 727612426..7dcf82596 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -35,6 +35,8 @@ that can be used to dump to the screen #ifndef _eoPopStat_h #define _eoPopStat_h +#include + #include diff --git a/eo/tutorial/.cvsignore b/eo/tutorial/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Lesson1/.cvsignore b/eo/tutorial/Lesson1/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/Lesson1/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Lesson1/Makefile.am b/eo/tutorial/Lesson1/Makefile.am new file mode 100644 index 000000000..fca2f1828 --- /dev/null +++ b/eo/tutorial/Lesson1/Makefile.am @@ -0,0 +1,16 @@ + +bin_PROGRAMS = FirstBitGA FirstRealGA exercise1.3 + +FirstBitGA_SOURCES = FirstBitGA.cpp + +FirstRealGA_SOURCES = FirstRealGA.cpp + +exercise1_3_SOURCES = exercise1.3.cpp + + +LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils + +LIBS = -lga -leoutils -leo + +INCLUDES = -I$(top_srcdir)/src + diff --git a/eo/tutorial/Lesson2/.cvsignore b/eo/tutorial/Lesson2/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/Lesson2/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Lesson2/Makefile.am b/eo/tutorial/Lesson2/Makefile.am new file mode 100644 index 000000000..91294fc7d --- /dev/null +++ b/eo/tutorial/Lesson2/Makefile.am @@ -0,0 +1,23 @@ + +bin_PROGRAMS = FirstBitEA FirstRealEA exercise2.3 + + +FirstBitEA_SOURCES = FirstBitEA.cpp + +FirstRealEA_SOURCES = FirstRealEA.cpp + +exercise2_3_SOURCES = exercise2.3.cpp + + +noinst_HEADERS = binary_value.h \ + real_value.h + +extra_DIST = Makefile.simple + + +LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils + +LIBS = -lga -leoutils -leo + +INCLUDES = -I$(top_srcdir)/src + diff --git a/eo/tutorial/Lesson3/.cvsignore b/eo/tutorial/Lesson3/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/Lesson3/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Lesson3/Makefile.am b/eo/tutorial/Lesson3/Makefile.am new file mode 100644 index 000000000..5e942ca56 --- /dev/null +++ b/eo/tutorial/Lesson3/Makefile.am @@ -0,0 +1,26 @@ + +bin_PROGRAMS = SecondBitEA SecondRealEA exercise3.1 + + +SecondBitEA_SOURCES = SecondBitEA.cpp + +SecondRealEA_SOURCES = SecondRealEA.cpp + +exercise3_1_SOURCES = exercise3.1.cpp + + +noinst_HEADERS = binary_value.h \ + real_value.h + +extra_DIST = Makefile.simple + + +LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils + +LIBS = -lga -leoutils -leo + +INCLUDES = -I$(top_srcdir)/src + + +clean-local: + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson4/.cvsignore b/eo/tutorial/Lesson4/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/Lesson4/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Lesson4/Makefile.am b/eo/tutorial/Lesson4/Makefile.am new file mode 100644 index 000000000..6c55fcfea --- /dev/null +++ b/eo/tutorial/Lesson4/Makefile.am @@ -0,0 +1,27 @@ + +bin_PROGRAMS = BitEA RealEA ESEA + + +BitEA_SOURCES = BitEA.cpp + +RealEA_SOURCES = RealEA.cpp + +ESEA_SOURCES = ESEA.cpp + + +noinst_HEADERS = binary_value.h \ + real_value.h + +extra_DIST = Makefile.simple + + +LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/es \ + -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils + +LIBS = -lga -les -leoutils -leo + +INCLUDES = -I$(top_srcdir)/src + + +clean-local: + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson5/.cvsignore b/eo/tutorial/Lesson5/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/Lesson5/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Lesson5/Makefile.am b/eo/tutorial/Lesson5/Makefile.am new file mode 100644 index 000000000..89c1b97ee --- /dev/null +++ b/eo/tutorial/Lesson5/Makefile.am @@ -0,0 +1,25 @@ + +bin_PROGRAMS = OneMaxEA OneMaxLibEA + +OneMaxEA_SOURCES = OneMaxEA.cpp + +OneMaxLibEA_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp + + +noinst_HEADERS = eoOneMax.h \ + eoOneMaxEvalFunc.h \ + eoOneMaxInit.h \ + eoOneMaxMutation.h \ + eoOneMaxQuadCrossover.h \ + make_genotype_OneMax.h \ + make_op_OneMax.h + +extra_DIST = Makefile.simple + + +LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils + +LIBS = -lga -leoutils -leo + +INCLUDES = -I$(top_srcdir)/src + diff --git a/eo/tutorial/Makefile.am b/eo/tutorial/Makefile.am new file mode 100644 index 000000000..2df653912 --- /dev/null +++ b/eo/tutorial/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 From 6c7d888194f74a1214c5c18a1a23e8ad9e2a6aaa Mon Sep 17 00:00:00 2001 From: kuepper Date: Fri, 17 Sep 2004 17:00:04 +0000 Subject: [PATCH 1046/2134] cleanup --- eo/acconfig.h | 3 - eo/app/gpsymreg/.cvsignore | 1 + eo/config.cache | 35 - eo/ltconfig | 3114 ------------------------------------ eo/ltmain.sh | 0 eo/src/do/.cvsignore | 1 + 6 files changed, 2 insertions(+), 3152 deletions(-) delete mode 100644 eo/acconfig.h create mode 100644 eo/app/gpsymreg/.cvsignore delete mode 100644 eo/config.cache delete mode 100755 eo/ltconfig delete mode 100644 eo/ltmain.sh create mode 100644 eo/src/do/.cvsignore diff --git a/eo/acconfig.h b/eo/acconfig.h deleted file mode 100644 index 498212945..000000000 --- a/eo/acconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -#undef PACKAGE -#undef VERSION -#undef HAVE_BIT_VECTOR diff --git a/eo/app/gpsymreg/.cvsignore b/eo/app/gpsymreg/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/app/gpsymreg/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/config.cache b/eo/config.cache deleted file mode 100644 index e125cf21c..000000000 --- a/eo/config.cache +++ /dev/null @@ -1,35 +0,0 @@ -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -ac_cv_c_const=${ac_cv_c_const=yes} -ac_cv_c_inline=${ac_cv_c_inline=inline} -ac_cv_cxx_have_sstream=${ac_cv_cxx_have_sstream=yes} -ac_cv_cxx_namespaces=${ac_cv_cxx_namespaces=yes} -ac_cv_func_select=${ac_cv_func_select=yes} -ac_cv_header_limits_h=${ac_cv_header_limits_h=yes} -ac_cv_header_stdc=${ac_cv_header_stdc=yes} -ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} -ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} -ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} -ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} -ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} -ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} -ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} -ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} -ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} -ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} -ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} -ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} -ac_cv_type_size_t=${ac_cv_type_size_t=yes} diff --git a/eo/ltconfig b/eo/ltconfig deleted file mode 100755 index c14d83c16..000000000 --- a/eo/ltconfig +++ /dev/null @@ -1,3114 +0,0 @@ -#! /bin/sh - -# ltconfig - Create a system-specific libtool. -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A lot of this script is taken from autoconf-2.10. - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} -echo=echo -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec "$SHELL" "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null`} - case X$UNAME in - *-DOS) PATH_SEPARATOR=';' ;; - *) PATH_SEPARATOR=':' ;; - esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || - test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH /usr/ucb; do - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running ltconfig again with it. - ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf "%s\n"' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # Cool, printf works - : - elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# The name of this program. -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - -# Constants: -PROGRAM=ltconfig -PACKAGE=libtool -VERSION=1.3.5 -TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -rm="rm -f" - -help="Try \`$progname --help' for more information." - -# Global variables: -default_ofile=libtool -can_build_shared=yes -enable_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -enable_static=yes -enable_fast_install=yes -enable_dlopen=unknown -enable_win32_dll=no -ltmain= -silent= -srcdir= -ac_config_guess= -ac_config_sub= -host= -nonopt= -ofile="$default_ofile" -verify_host=yes -with_gcc=no -with_gnu_ld=no -need_locks=yes -ac_ext=c -objext=o -libext=a -exeext= -cache_file= - -old_AR="$AR" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -old_CPPFLAGS="$CPPFLAGS" -old_LDFLAGS="$LDFLAGS" -old_LD="$LD" -old_LN_S="$LN_S" -old_LIBS="$LIBS" -old_NM="$NM" -old_RANLIB="$RANLIB" -old_DLLTOOL="$DLLTOOL" -old_OBJDUMP="$OBJDUMP" -old_AS="$AS" - -# Parse the command line options. -args= -prev= -for option -do - case "$option" in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case "$option" in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - if test -z "$ltmain"; then - ltmain="$option" - elif test -z "$host"; then -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then -# echo "$progname: warning \`$option' is not a valid host type" 1>&2 -# fi - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac -done - -if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test ! -f "$ltmain"; then - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -# Quote any args containing shell metacharacters. -ltconfig_args= -for arg -do - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac -done - -# A relevant subset of AC_INIT. - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 5 compiler messages saved in config.log -# 6 checking for... messages and results -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>>./config.log - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi -if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi - -if test -n "$cache_file" && test -r "$cache_file"; then - echo "loading cache $cache_file within ltconfig" - . $cache_file -fi - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - -if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to LTMAIN. - srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. -fi - -trap "$rm conftest*; exit 1" 1 2 15 -if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case "$host_alias" in - "") - if host_alias=`$SHELL $ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - host=`$SHELL $ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - test -z "$host" && exit 1 - -elif test -z "$host"; then - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 - echo "$help" 1>&2 - exit 1 -else - host_alias=$host -fi - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case "$host_os" in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -case "$host_os" in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR cru $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -# Set a sane default for `AR'. -test -z "$AR" && AR=ar - -# Set a sane default for `OBJDUMP'. -test -z "$OBJDUMP" && OBJDUMP=objdump - -# If RANLIB is not set, then run the test. -if test "${RANLIB+set}" != "set"; then - result=no - - echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then - RANLIB="ranlib" - result="ranlib" - break - fi - done - IFS="$save_ifs" - - echo "$ac_t$result" 1>&6 -fi - -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -fi - -# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$AS" && AS=as - -# Check to see if we are using GCC. -if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc || test -f $dir/cc$ac_exeext; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - fi - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$CC"; then - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # Now see if the compiler is really GCC. - with_gcc=no - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:581: checking whether we are using GNU C" >&5 - - $rm conftest.c - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - fi - $rm conftest.c - echo "$ac_t$with_gcc" 1>&6 -fi - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -echo $ac_n "checking for object suffix... $ac_c" 1>&6 -$rm conftest* -echo 'int i = 1;' > conftest.c -echo "$progname:603: checking for object suffix" >& 5 -if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 -fi -$rm conftest* -echo "$ac_t$objext" 1>&6 - -echo $ac_n "checking for executable suffix... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_exeext="no" - $rm conftest* - echo 'main () { return 0; }' > conftest.c - echo "$progname:629: checking for executable suffix" >& 5 - if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c | *.err | *.$objext ) ;; - *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* -fi -if test "X$ac_cv_exeext" = Xno; then - exeext="" -else - exeext="$ac_cv_exeext" -fi -echo "$ac_t$ac_cv_exeext" 1>&6 - -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -pic_flag= -special_shlib_compile_flags= -wl= -link_static_flag= -no_builtin_flag= - -if test "$with_gcc" = yes; then - wl='-Wl,' - link_static_flag='-static' - - case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - aix*) - # Below there is a dirty hack to force normal static linking with -ldl - # The problem is because libdl dynamically linked with both libc and - # libC (AIX C++ library), which obviously doesn't included in libraries - # list by gcc. This cause undefined symbols with -static flags. - # This hack allows C programs to be linked with "-static -ldl", but - # we not sure about C++ programs. - link_static_flag="$link_static_flag ${wl}-lC" - ;; - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - pic_flag='-m68020 -resident32 -malways-restore-a4' - ;; - sysv4*MP*) - if test -d /usr/nec; then - pic_flag=-Kconform_pic - fi - ;; - *) - pic_flag='-fPIC' - ;; - esac -else - # PORTME Check for PIC flags for the system compiler. - case "$host_os" in - aix3* | aix4*) - # All AIX code is PIC. - link_static_flag='-bnso -bI:/lib/syscalls.exp' - ;; - - hpux9* | hpux10* | hpux11*) - # Is there a better link_static_flag that works with the bundled CC? - wl='-Wl,' - link_static_flag="${wl}-a ${wl}archive" - pic_flag='+Z' - ;; - - irix5* | irix6*) - wl='-Wl,' - link_static_flag='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - wl='-Wl,' - link_static_flag='-non_shared' - ;; - - sco3.2v5*) - pic_flag='-Kpic' - link_static_flag='-dn' - special_shlib_compile_flags='-belf' - ;; - - solaris*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - sunos4*) - pic_flag='-PIC' - link_static_flag='-Bstatic' - wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - uts4*) - pic_flag='-pic' - link_static_flag='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec ;then - pic_flag='-Kconform_pic' - link_static_flag='-Bstatic' - fi - ;; - *) - can_build_shared=no - ;; - esac -fi - -if test -n "$pic_flag"; then - echo "$ac_t$pic_flag" 1>&6 - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - case "$host_os" in - hpux9* | hpux10* | hpux11*) - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - fi - ;; - *) - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - ;; - esac - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - can_build_shared=no - pic_flag= - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - echo "$ac_t"none 1>&6 -fi - -# Check to see if options -o and -c are simultaneously supported by compiler -echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 -$rm -r conftest 2>/dev/null -mkdir conftest -cd conftest -$rm conftest* -echo "int some_variable = 0;" > conftest.c -mkdir out -# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -# that will create temporary files in the current directory regardless of -# the output directory. Thus, making CWD read-only will cause this test -# to fail, enabling locking or at least warning the user not to do parallel -# builds. -chmod -w . -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -o out/conftest2.o" -echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 -if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then - echo "$ac_t"no 1>&6 - compiler_c_o=no - else - echo "$ac_t"yes 1>&6 - compiler_c_o=yes - fi -else - # Append any errors to the config.log. - cat out/conftest.err 1>&5 - compiler_c_o=no - echo "$ac_t"no 1>&6 -fi -CFLAGS="$save_CFLAGS" -chmod u+w . -$rm conftest* out/* -rmdir out -cd .. -rmdir conftest -$rm -r conftest 2>/dev/null - -if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 -if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_o_lo=no - else - echo "$ac_t"yes 1>&6 - compiler_o_lo=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_o_lo=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - compiler_o_lo=no -fi - -# Check to see if we can do hard links to lock some files if needed -hard_links="nottested" -if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$ac_t$hard_links" 1>&6 - $rm conftest* - if test "$hard_links" = no; then - echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 - need_locks=warn - fi -else - need_locks=no -fi - -if test "$with_gcc" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_rtti_exceptions=no - else - echo "$ac_t"yes 1>&6 - compiler_rtti_exceptions=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_rtti_exceptions=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - - if test "$compiler_rtti_exceptions" = "yes"; then - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' - else - no_builtin_flag=' -fno-builtin' - fi - -fi - -# Check for any special shared library compilation flags. -if test -n "$special_shlib_compile_flags"; then - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : - else - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 - can_build_shared=no - fi -fi - -echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 -$rm conftest* -echo 'main(){return(0);}' > conftest.c -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - echo "$ac_t$link_static_flag" 1>&6 -else - echo "$ac_t"none 1>&6 - link_static_flag= -fi -LDFLAGS="$save_LDFLAGS" -$rm conftest* - -if test -z "$LN_S"; then - # Check to see if we can use ln -s, or we need hard links. - echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftest.dat - if ln -s X conftest.dat 2>/dev/null; then - $rm conftest.dat - LN_S="ln -s" - else - LN_S=ln - fi - if test "$LN_S" = "ln -s"; then - echo "$ac_t"yes 1>&6 - else - echo "$ac_t"no 1>&6 - fi -fi - -# Make sure LD is an absolute path. -if test -z "$LD"; then - ac_prog=ld - if test "$with_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:991: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we are not using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:1015: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:1018: checking for non-GNU ld" >&5 - fi - - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LD"; then - echo "$ac_t$LD" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$LD"; then - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 - exit 1 - fi -fi - -# Check to see if it really is or is not GNU ld. -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - with_gnu_ld=yes -else - with_gnu_ld=no -fi -echo "$ac_t$with_gnu_ld" 1>&6 - -# See if the linker supports building shared libraries. -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 - -allow_undefined_flag= -no_undefined_flag= -need_lib_prefix=unknown -need_version=unknown -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -archive_cmds= -archive_expsym_cmds= -old_archive_from_new_cmds= -export_dynamic_flag_spec= -whole_archive_flag_spec= -thread_safe_flag_spec= -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= -always_export_symbols=no -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -# include_expsyms should be a list of space-separated symbols to be *always* -# included in the symbol list -include_expsyms= -# exclude_expsyms can be an egrep regular expression of symbols to exclude -# it will be wrapped by ` (' and `)$', so one must not match beginning or -# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -# as well as any symbol that contains `d'. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -# platforms (ab)use it in PIC code, but their linkers get confused if -# the symbol is explicitly referenced. Since portable code cannot -# rely on this symbol name, it's probably fine to never include it in -# preloaded symbol tables. - -case "$host_os" in -cygwin* | mingw*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$with_gcc" != yes; then - with_gnu_ld=no - fi - ;; - -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case "$host_os" in - aix3* | aix4*) - # On AIX, the GNU linker is very broken - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=yes - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - # Be careful not to strip the DATA tag left by newer dlltools. - export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' - - # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \$# in - 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; - *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done~ - test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' - - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - ;; - esac - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$host_os" in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4*) - hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' - hardcode_libdir_separator=':' - if test "$with_gcc" = yes; then - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - shared_flag='-shared' - else - shared_flag='${wl}-bM:SRE' - hardcode_direct=yes - fi - allow_undefined_flag=' ${wl}-berok' - archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' - archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' - case "$host_os" in aix4.[01]|aix4.[01].*) - # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on - always_export_symbols=yes ;; - esac - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - cygwin* | mingw*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs' - fix_srcfile_path='`cygpath -w $srcfile`' - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - case "$host_os" in - hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; - esac - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF - fi - hardcode_libdir_flag_spec='${wl}-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' - ;; - - osf3*) - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # As osf3* with the addition of the -msym flag - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - rhapsody*) - archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flags_spec='-L$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case "$host_os" in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' - else - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - unixware7*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac -fi -echo "$ac_t$ld_shlibs" 1>&6 -test "$ld_shlibs" = no && can_build_shared=no - -if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - break - else - NM=${NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$NM" && NM=nm - ;; - esac - echo "$ac_t$NM" 1>&6 -fi - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - -# Transform an extracted symbol line into a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - -# Define system-specific variables. -case "$host_os" in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" - ;; -irix*) - symcode='[BCDEGRST]' - ;; -solaris*) - symcode='[BDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTW]' -fi - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - $rm conftest* - cat > conftest.c <&5 - if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' - - cat <> conftest.c -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$objext conftstm.$objext - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$objext" - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - global_symbol_pipe= - fi -done -if test "$pipe_works" = yes; then - echo "${ac_t}ok" 1>&6 -else - echo "${ac_t}failed" 1>&6 -fi - -if test -z "$global_symbol_pipe"; then - global_symbol_to_cdecl= -fi - -# Check hardcoding attributes. -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$hardcode_shlibpath_var" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$ac_t$hardcode_action" 1>&6 - - -reload_flag= -reload_cmds='$LD$reload_flag -o $output$reload_objs' -echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 -# PORTME Some linkers may need a different reload flag. -reload_flag='-r' -echo "$ac_t$reload_flag" 1>&6 -test -n "$reload_flag" && reload_flag=" $reload_flag" - -# PORTME Fill in your ld.so characteristics -library_names_spec= -libname_spec='lib$name' -soname_spec= -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -file_magic_cmd= -file_magic_test_file= -deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [regex]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given egrep regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. -echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 -case "$host_os" in -aix3*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so$major' - ;; - -aix4*) - version_type=linux - # AIX has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - # We preserve .a as extension for shared libraries though AIX4.2 - # and later linker supports .so - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' - shlibpath_var=LIBPATH - deplibs_check_method=pass_all - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - deplibs_check_method=pass_all - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - -bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - export_dynamic_flag_spec=-rdynamic - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw*) - version_type=windows - need_version=no - need_lib_prefix=no - if test "$with_gcc" = yes; then - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' - else - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' - fi - dynamic_linker='Win32 ld.exe' - deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - file_magic_cmd='${OBJDUMP} -f' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case "$version_type" in - freebsd-elf*) - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - deplibs_check_method=unknown - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case "$host_os" in - freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - case "$host_os" in - hpux10.20*) - # TODO: Does this work for hpux-11 too? - deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -irix5* | irix6*) - version_type=irix - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}.so.$major' - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' - case "$host_os" in - irix5*) - libsuff= shlibsuff= - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case "$LD" in # libtool.m4 will add one of these switches to LD - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib${libsuff}/libc.so*` - deplibs_check_method='pass_all' - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - deplibs_check_method=pass_all - - if test -f /lib/ld.so.1; then - dynamic_linker='GNU ld.so' - else - # Only the GNU ld.so supports shared libraries on MkLinux. - case "$host_cpu" in - powerpc*) dynamic_linker=no ;; - *) dynamic_linker='Linux ld.so' ;; - esac - fi - ;; - -netbsd*) - version_type=sunos - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' - soname_spec='${libname}${release}.so$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - ;; - -openbsd*) - version_type=sunos - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - need_version=no - fi - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - shlibpath_var=LD_LIBRARY_PATH - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method='file_magic COFF format alpha shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - deplibs_check_method='pass_all' - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rhapsody*) - version_type=sunos - library_names_spec='${libname}.so' - soname_spec='${libname}.so' - shlibpath_var=DYLD_LIBRARY_PATH - deplibs_check_method=pass_all - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" - file_magic_cmd=/usr/bin/file - file_magic_test_file=/lib/libc.so - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - case "$host_vendor" in - sequent) - file_magic_cmd='/bin/file' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - ncr) - deplibs_check_method='pass_all' - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - esac - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' - soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$ac_t$dynamic_linker" 1>&6 -test "$dynamic_linker" = no && can_build_shared=no - -# Report the final consequences. -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - -# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in -# configure.in, otherwise build static only libraries. -case "$host_os" in -cygwin* | mingw* | os2*) - if test x$can_build_shared = xyes; then - test x$enable_win32_dll = xno && can_build_shared=no - echo "checking if package supports dlls... $can_build_shared" 1>&6 - fi -;; -esac - -if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then - case "$deplibs_check_method" in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - egrep "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac -fi - -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4*) - test "$enable_shared" = yes && enable_static=no - ;; -esac - -echo "$ac_t$enable_shared" 1>&6 - -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes - -echo "checking whether to build static libraries... $enable_static" 1>&6 - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -echo $ac_n "checking for objdir... $ac_c" 1>&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$ac_t$objdir" 1>&6 - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else -if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then - lt_cv_dlopen=no lt_cv_dlopen_libs= -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2248: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2288: checking for dlopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -dlopen(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dlopen=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2335: checking for dld_link in -ldld" >&5 -ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2375: checking for shl_load" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -shl_load(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shl_load=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2423: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -fi - - -fi - - -fi - -fi - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - fi - - case "$lt_cv_dlopen" in - dlopen) -for ac_hdr in dlfcn.h; do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2488: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int fnord = 0; -EOF -ac_try="$ac_compile >/dev/null 2>conftest.out" -{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -done - - if test "x$ac_cv_header_dlfcn_h" = xyes; then - CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - fi - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2526: checking whether a program can dlopen itself" >&5 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self=cross - else - cat > conftest.c < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -fnord() { int i=42;} -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self" 1>&6 - - if test "$lt_cv_dlopen_self" = yes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self_static=cross - else - cat > conftest.c < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -fnord() { int i=42;} -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self_static=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self_static=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 -fi - ;; - esac - - case "$lt_cv_dlopen_self" in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case "$lt_cv_dlopen_self_static" in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - -# Copy echo and quote the copy, instead of the original, because it is -# used later. -ltecho="$echo" -if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ltecho="$CONFIG_SHELL \$0 --fallback-echo" -fi -LTSHELL="$SHELL" - -LTCONFIG_VERSION="$VERSION" - -# Only quote variables if we're using ltmain.sh. -case "$ltmain" in -*.sh) - # Now quote all the things that may contain metacharacters. - for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ - AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ - reload_flag reload_cmds wl \ - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ - thread_safe_flag_spec whole_archive_flag_spec libname_spec \ - library_names_spec soname_spec \ - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ - file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ - hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case "$ltecho" in - *'\$0 --fallback-echo"') - ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - - trap "$rm \"$ofile\"; exit 1" 1 2 15 - echo "creating $ofile" - $rm "$ofile" - cat < "$ofile" -#! $SHELL - -# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. -# -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="sed -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -### BEGIN LIBTOOL CONFIG -EOF - cfgfile="$ofile" - ;; - -*) - # Double-quote the variables that need it (for aesthetics). - for var in old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do - eval "$var=\\\"\$var\\\"" - done - - # Just create a config file. - cfgfile="$ofile.cfg" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - echo "creating $cfgfile" - $rm "$cfgfile" - cat < "$cfgfile" -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -EOF - ;; -esac - -cat <> "$cfgfile" -# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ -# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ -# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ -# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ -# $0$ltconfig_args -# -# Compiler and other test output produced by $progname, useful for -# debugging $progname, is in ./config.log if it exists. - -# The version of $progname that generated this script. -LTCONFIG_VERSION=$LTCONFIG_VERSION - -# Shell to use when invoking shell scripts. -SHELL=$LTSHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$ltecho - -# The archiver. -AR=$AR - -# The default C compiler. -CC=$CC - -# The linker used to build libraries. -LD=$LD - -# Whether we need hard or soft links. -LN_S=$LN_S - -# A BSD-compatible nm program. -NM=$NM - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$reload_flag -reload_cmds=$reload_cmds - -# How to pass a linker flag through the compiler. -wl=$wl - -# Object file suffix (normally "o"). -objext="$objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$pic_flag - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$compiler_c_o - -# Can we write directly to a .lo ? -compiler_o_lo=$compiler_o_lo - -# Must we lock files when doing compilation ? -need_locks=$need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$link_static_flag - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$RANLIB -old_archive_cmds=$old_archive_cmds -old_postinstall_cmds=$old_postinstall_cmds -old_postuninstall_cmds=$old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$old_archive_from_new_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$archive_cmds -archive_expsym_cmds=$archive_expsym_cmds -postinstall_cmds=$postinstall_cmds -postuninstall_cmds=$postuninstall_cmds - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$global_symbol_to_cdecl - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$hardcode_libdir_separator - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$include_expsyms - -EOF - -case "$ltmain" in -*.sh) - echo '### END LIBTOOL CONFIG' >> "$ofile" - echo >> "$ofile" - case "$host_os" in - aix3*) - cat <<\EOF >> "$ofile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # Append the ltmain.sh script. - sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - - chmod +x "$ofile" - ;; - -*) - # Compile the libtool program. - echo "FIXME: would compile $ltmain" - ;; -esac - -test -n "$cache_file" || exit 0 - -# AC_CACHE_SAVE -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/eo/ltmain.sh b/eo/ltmain.sh deleted file mode 100644 index e69de29bb..000000000 diff --git a/eo/src/do/.cvsignore b/eo/src/do/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/do/.cvsignore @@ -0,0 +1 @@ +Makefile.in From 36af75bc949fcff09c2d6744737cd48075fda16a Mon Sep 17 00:00:00 2001 From: kuepper Date: Fri, 17 Sep 2004 17:05:28 +0000 Subject: [PATCH 1047/2134] add conditional includes for sstream --- eo/tutorial/Lesson1/FirstBitGA.cpp | 9 +++++++++ eo/tutorial/Lesson1/FirstRealGA.cpp | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index 4e7ea1ab1..f12344b71 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -5,10 +5,19 @@ // An instance of a VERY simple Bitstring Genetic Algorithm // //----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes #include // runtime_error #include // cout +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif // the general include for eo diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index 76556882d..392aff4aa 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -5,10 +5,18 @@ // An instance of a VERY simple Real-coded Genetic Algorithm // //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes #include // runtime_error #include // cout +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif // the general include for eo From f599c8eb779ea29113caf2617968135d37c4a1a3 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 09:46:48 +0000 Subject: [PATCH 1048/2134] remove Makefiles from cvs --- eo/tutorial/Lesson1/Makefile | 25 ------------ eo/tutorial/Lesson2/Makefile | 34 ---------------- eo/tutorial/Lesson3/Makefile | 33 --------------- eo/tutorial/Lesson4/Makefile | 33 --------------- eo/tutorial/Lesson5/Makefile | 56 -------------------------- eo/tutorial/ParadisEO/Lesson1/Makefile | 29 ------------- eo/tutorial/ParadisEO/Lesson2/Makefile | 23 ----------- eo/tutorial/ParadisEO/Lesson3/Makefile | 16 -------- 8 files changed, 249 deletions(-) delete mode 100644 eo/tutorial/Lesson1/Makefile delete mode 100644 eo/tutorial/Lesson2/Makefile delete mode 100644 eo/tutorial/Lesson3/Makefile delete mode 100644 eo/tutorial/Lesson4/Makefile delete mode 100644 eo/tutorial/Lesson5/Makefile delete mode 100644 eo/tutorial/ParadisEO/Lesson1/Makefile delete mode 100644 eo/tutorial/ParadisEO/Lesson2/Makefile delete mode 100644 eo/tutorial/ParadisEO/Lesson3/Makefile diff --git a/eo/tutorial/Lesson1/Makefile b/eo/tutorial/Lesson1/Makefile deleted file mode 100644 index 093ca8525..000000000 --- a/eo/tutorial/Lesson1/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# if you use this Makefile as a starting point for another application -# you might need to modify the following -DIR_EO = ../../src - -.SUFFIXES: .cpp - -# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, -# and have problems with the interpretation of the output (and its colors) -# then you should use c++ instead (make CXX=c++ will do) - -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp - -firstGA = FirstRealGA FirstBitGA - -ALL = $(firstGA) exercise1.3 - -lesson1 : $(firstGA) - -all : $(ALL) - -clean : - @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson2/Makefile b/eo/tutorial/Lesson2/Makefile deleted file mode 100644 index 1aec17105..000000000 --- a/eo/tutorial/Lesson2/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf -# so that it stays easy to understant (you are in the tutorial, remember!) -# MS, Oct. 2002 - -# if you use this Makefile as a starting point for another application -# you might need to modify the following -DIR_EO = ../../src - -.SUFFIXES: .cpp - -# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, -# and have problems with the interpretation of the output (and its colors) -# then you should use c++ instead (make CXX=c++ will do) - -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp - -firstEA = FirstRealEA FirstBitEA - -ALL = $(firstEA) exercise2.3 - -lesson2 : $(firstEA) - -all : $(ALL) - -clean : - @/bin/rm $(ALL) *.o *~ - -FirstRealEA : real_value.h - -FirstBitEA : binary_value.h diff --git a/eo/tutorial/Lesson3/Makefile b/eo/tutorial/Lesson3/Makefile deleted file mode 100644 index 186791f26..000000000 --- a/eo/tutorial/Lesson3/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf -# so that it stays easy to understant (you are in the tutorial, remember!) -# MS, Oct. 2002 - -# if you use this Makefile as a starting point for another application -# you might need to modify the following -DIR_EO = ../../src - -.SUFFIXES: .cpp - -# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, -# and have problems with the interpretation of the output (and its colors) -# then you should use c++ instead (make CXX=c++ will do) - -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp - -secondEA = SecondBitEA SecondRealEA - -ALL = $(secondEA) exercise3.1 - -lesson3 : $(secondEA) - -all : $(ALL) - -SecondBitEA : binary_value.h -SecondRealEA : real_value.h - -clean : - @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson4/Makefile b/eo/tutorial/Lesson4/Makefile deleted file mode 100644 index 75bd41dd4..000000000 --- a/eo/tutorial/Lesson4/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf -# so that it stays easy to understant (you are in the tutorial, remember!) -# MS, Oct. 2002 - -# if you use this Makefile as a starting point for another application -# you might need to modify the following -DIR_EO = ../../src - -.SUFFIXES: .cpp - -# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, -# and have problems with the interpretation of the output (and its colors) -# then you should use c++ instead (make CXX=c++ will do) - -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp - -ALL = BitEA RealEA ESEA - -all : $(ALL) - -BitEA : BitEA.o ; - $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/ga/libga.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -RealEA : RealEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -ESEA : ESEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -clean : - @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson5/Makefile b/eo/tutorial/Lesson5/Makefile deleted file mode 100644 index bb865c104..000000000 --- a/eo/tutorial/Lesson5/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf -# so that it stays easy to understant (you are in the tutorial, remember!) -# MS, Oct. 2002 - -# if you use this Makefile as a starting point for another application -# you might need to modify the following -DIR_EO = ../../src - -.SUFFIXES: .cpp - -# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, -# and have problems with the interpretation of the output (and its colors) -# then you should use c++ instead (make CXX=c++ will do) - -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp - -# local sources -COMMON_SOURCES = eoOneMax.h \ - eoOneMaxEvalFunc.h \ - eoOneMaxInit.h \ - eoOneMaxMutation.h \ - eoOneMaxQuadCrossover.h \ - make_genotype_OneMax.h \ - make_op_OneMax.h - -NO_LIB_SOURCES = OneMaxEA.cpp - -LIB_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp - - -SOURCES = $(COMMON_SOURCES) OneMaxEA.cpp OneMaxLibEA.cpp make_OneMax.cpp - -LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a - -ALL = OneMaxEA OneMaxLibEA - -OneMaxEA : OneMaxEA.o - $(CXX) -g -o $@ OneMaxEA.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm - -OneMaxLibEA : OneMaxLibEA.o make_OneMax.o - $(CXX) -g -o $@ OneMaxLibEA.o make_OneMax.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm - -tar : ; tar czvf OneMax.tgz *.h *.cpp Makefile - -all : $(ALL) - -clean : ; /bin/rm *.o $(ALL) - -########## local dependencies -OneMaxEA.o : $(COMMON_SOURCES) OneMaxEA.cpp -OneMaxLibEA.o : $(COMMON_SOURCES) OneMaxLibEA.cpp -make_OneMax.o : make_OneMax.cpp eoOneMax.h diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile b/eo/tutorial/ParadisEO/Lesson1/Makefile deleted file mode 100644 index 7bd46d2a6..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -MPICC = mpiCC - -ALL = IslandBitEA IslandBitEA2 IslandBitEA1 - -lesson2 : IslandBitEA IslandBitEA2 IslandBitEA1 - -all : $(ALL) - -clean : - @/bin/rm $(ALL) *.o *~ - -IslandBitEA : IslandBitEA.o - $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA IslandBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -IslandBitEA.o : IslandBitEA.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA.cpp - -IslandBitEA1 : IslandBitEA1.o - $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA1 IslandBitEA1.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -IslandBitEA1.o : IslandBitEA1.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA1.cpp - -IslandBitEA2 : IslandBitEA2.o - $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA2 IslandBitEA2.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -IslandBitEA2.o : IslandBitEA2.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA2.cpp - diff --git a/eo/tutorial/ParadisEO/Lesson2/Makefile b/eo/tutorial/ParadisEO/Lesson2/Makefile deleted file mode 100644 index 87ea5380d..000000000 --- a/eo/tutorial/ParadisEO/Lesson2/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -MPICC = mpiCC - -ALL = MasterDistEvalBitEA SlaveDistEvalBitEA - -lesson2 : MasterDistEvalBitEA SlaveDistEvalBitEA - -all : $(ALL) - -clean : - @/bin/rm $(ALL) *.o *~ - -MasterDistEvalBitEA : MasterDistEvalBitEA.o - $(MPICC) -DPACKAGE=\"eo\" -o MasterDistEvalBitEA MasterDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -MasterDistEvalBitEA.o : MasterDistEvalBitEA.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c MasterDistEvalBitEA.cpp - -SlaveDistEvalBitEA : SlaveDistEvalBitEA.o - $(MPICC) -DPACKAGE=\"eo\" -o SlaveDistEvalBitEA SlaveDistEvalBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -SlaveDistEvalBitEA.o : SlaveDistEvalBitEA.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c SlaveDistEvalBitEA.cpp - diff --git a/eo/tutorial/ParadisEO/Lesson3/Makefile b/eo/tutorial/ParadisEO/Lesson3/Makefile deleted file mode 100644 index 3b255b387..000000000 --- a/eo/tutorial/ParadisEO/Lesson3/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -.SUFFIXES: .cpp -.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -o $@ $*.cpp ../../../src/utils/libeoutils.a ../../../src/libeo.a - -.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../../src -Wall -g -c $*.cpp - -ALL = CellularBitEA - -lesson3 : $(firstEA) - -all : $(ALL) - -clean : - @/bin/rm $(ALL) *.o *~ - -CellularBitEA : binary_value.h - From cf4248b67b3c9b76dda9ab429de7b61acdf96f46 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 09:47:19 +0000 Subject: [PATCH 1049/2134] remove --- eo/tutorial/Makefile | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 eo/tutorial/Makefile diff --git a/eo/tutorial/Makefile b/eo/tutorial/Makefile deleted file mode 100644 index 61396d3c2..000000000 --- a/eo/tutorial/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 - -all: - for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done - -lesson1 : - cd Lesson1; make - -lesson2 : - cd Lesson2; make - -lesson3 : - cd Lesson3; make - -lesson4 : - cd Lesson4; make - -lesson5 : - cd Lesson5; make - -#empty dist and distdir to let top-level 'make' do its job -dist : - -distdir : - -check : - -clean: - for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done From 683c4e573e123fda4b40cb691d31205722d790ae Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 09:50:47 +0000 Subject: [PATCH 1050/2134] update --- eo/autogen.sh | 11 +++++++---- eo/configure.in | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/eo/autogen.sh b/eo/autogen.sh index b76c3a8fd..c5150d866 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -36,6 +36,10 @@ autoheader automake autoconf +# we want doc to be recompiled - and it keeps saying it's up to date!!! +touch doc/eo.cfg + + # if test -z "$*"; then # echo "I am going to run ./configure with no arguments - if you wish" # echo "to pass any to it, please specify them on the $0 command line." @@ -43,13 +47,12 @@ autoconf # # ./configure "$@" -# we want doc to be recompiled - and it keeps saying it's up to date!!! -touch doc/eo.cfg - echo -echo "Now type 'make' to compile $PROG." +echo "Now run 'configure' and 'make' to build $PROG." +echo echo "If you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo + #echo "WARNING: Compiling all test programs can take some time." #echo "But you don't have to: you can simply type" #echo " 'make lib'" diff --git a/eo/configure.in b/eo/configure.in index 26640610e..017ba9ce5 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,9 +1,11 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/eo) - dnl Change the version number here -AM_INIT_AUTOMAKE(eo, 0.9.3) +AC_INIT(Evolving Objects, 0.9.3, eodev-main@sourceforge.net, eo) +AC_PREREQ(2.53) +dnl make sure we are compiling from the correct sources +AC_CONFIG_SRCDIR(src/eoOp.h) +AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) dnl Checks for maintainer mode @@ -16,10 +18,9 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB -dnl Checks for libraries. -AC_CHECK_LIB(eo, main) -AC_CHECK_LIB(eoutils, main) -AC_CHECK_LIB(m, cos) +# Why shall we check for these, we just build them... +# AC_CHECK_LIB(eo, main) +# AC_CHECK_LIB(eoutils, main) dnl Checks for header files. AC_HEADER_STDC @@ -31,9 +32,14 @@ AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T +dnl Checks for libraries. +AC_CHECK_LIB(m, cos) + dnl Checks for library functions. AC_CHECK_FUNCS(select) + +dnl create makefiles AC_OUTPUT(Makefile \ src/Makefile \ src/do/Makefile \ From 81492da319932f8ab6456d5ff2ba5be63d1b1dde Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 09:52:19 +0000 Subject: [PATCH 1051/2134] Remove support files, they are automatically created by autotools --- eo/config.guess | 890 -------------------------------------------- eo/config.sub | 952 ----------------------------------------------- eo/depcomp | 423 --------------------- eo/install-sh | 251 ------------- eo/missing | 336 ----------------- eo/mkinstalldirs | 99 ----- 6 files changed, 2951 deletions(-) delete mode 100755 eo/config.guess delete mode 100755 eo/config.sub delete mode 100755 eo/depcomp delete mode 100755 eo/install-sh delete mode 100755 eo/missing delete mode 100755 eo/mkinstalldirs diff --git a/eo/config.guess b/eo/config.guess deleted file mode 100755 index 30230b3df..000000000 --- a/eo/config.guess +++ /dev/null @@ -1,890 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[3478]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin32 - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff --git a/eo/config.sub b/eo/config.sub deleted file mode 100755 index e24b85041..000000000 --- a/eo/config.sub +++ /dev/null @@ -1,952 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 \ - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown - ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | k6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff --git a/eo/depcomp b/eo/depcomp deleted file mode 100755 index 807b991f4..000000000 --- a/eo/depcomp +++ /dev/null @@ -1,423 +0,0 @@ -#! /bin/sh - -# depcomp - compile a program generating dependencies as side-effects -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi -# `libtool' can also be set to `yes' or `no'. - -if test -z "$depfile"; then - base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` - dir=`echo "$object" | sed 's,/.*$,/,'` - if test "$dir" = "$object"; then - dir= - fi - # FIXME: should be _deps on DOS. - depfile="$dir.deps/$base" -fi - -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. This file always lives in the current directory. - # Also, the AIX compiler puts `$object:' at the start of each line; - # $object doesn't have directory information. - stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - outname="$stripped.o" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - tmpdepfile1="$dir.libs/$base.lo.d" - tmpdepfile2="$dir.libs/$base.d" - "$@" -Wc,-MD - else - tmpdepfile1="$dir$base.o.d" - tmpdepfile2="$dir$base.d" - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - if test -f "$tmpdepfile1"; then - tmpdepfile="$tmpdepfile1" - else - tmpdepfile="$tmpdepfile2" - fi - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a space and a tab in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. We will use -o /dev/null later, - # however we can't do the remplacement now because - # `-o $object' might simply not be used - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - -*) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 diff --git a/eo/install-sh b/eo/install-sh deleted file mode 100755 index 11870f1b0..000000000 --- a/eo/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f "$src" ] || [ -d "$src" ] - then - : - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/eo/missing b/eo/missing deleted file mode 100755 index 6a37006e8..000000000 --- a/eo/missing +++ /dev/null @@ -1,336 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.4 - GNU automake" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. - You can get \`$1Help2man' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/eo/mkinstalldirs b/eo/mkinstalldirs deleted file mode 100755 index 8ab885ec9..000000000 --- a/eo/mkinstalldirs +++ /dev/null @@ -1,99 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -errstatus=0 -dirmode="" - -usage="\ -Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." - -# process command line arguments -while test $# -gt 0 ; do - case "${1}" in - -h | --help | --h* ) # -h for help - echo "${usage}" 1>&2; exit 0 ;; - -m ) # -m PERM arg - shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - dirmode="${1}" - shift ;; - -- ) shift; break ;; # stop option processing - -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option - * ) break ;; # first non-opt arg - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in -0) exit 0 ;; -esac - -case $dirmode in -'') - if mkdir -p -- . 2>/dev/null; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - fi ;; -*) - if mkdir -m "$dirmode" -p -- . 2>/dev/null; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - fi ;; -esac - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 3 -# End: -# mkinstalldirs ends here From 17c8eddd5c6211fa959049818c341635be669989 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 09:56:10 +0000 Subject: [PATCH 1052/2134] *** empty log message *** --- eo/.cvsignore | 4 ++++ eo/autogen.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eo/.cvsignore b/eo/.cvsignore index f48de12bf..2073b8c31 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -14,6 +14,10 @@ config.h.in config.log config.status configure +depcomp +install-sh libtool +missing +mkinstalldirs stamp-h stamp-h.in diff --git a/eo/autogen.sh b/eo/autogen.sh index c5150d866..c5d876a2f 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -33,7 +33,7 @@ set aclocalinclude="$ACLOCAL_FLAGS" aclocal $aclocalinclude unset $aclocalinclude autoheader -automake +automake --add --copy autoconf # we want doc to be recompiled - and it keeps saying it's up to date!!! From e618920c44b29ac945cba8213355a01e785a9ba1 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 14:11:24 +0000 Subject: [PATCH 1053/2134] updates for build-process --- eo/autogen.sh | 1 + eo/configure.in | 4 +- eo/src/Makefile.am | 6 +- eo/src/eo | 3 + eo/test/LICENSE | 340 ----------------------------- eo/test/Makefile.am | 227 ++++--------------- eo/test/t-eoFitnessAssembledEA.cpp | 4 + eo/test/t-eoSharing.cpp | 20 +- eo/test/t-eoVector.cpp | 14 +- eo/test/t-eobin.cpp | 4 +- 10 files changed, 80 insertions(+), 543 deletions(-) delete mode 100644 eo/test/LICENSE diff --git a/eo/autogen.sh b/eo/autogen.sh index c5d876a2f..b7b3997c0 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -49,6 +49,7 @@ touch doc/eo.cfg echo echo "Now run 'configure' and 'make' to build $PROG." +echo "You can check the build running 'make check'" echo echo "If you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo diff --git a/eo/configure.in b/eo/configure.in index 017ba9ce5..d705abf91 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -8,10 +8,8 @@ AC_CONFIG_SRCDIR(src/eoOp.h) AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) -dnl Checks for maintainer mode -AM_MAINTAINER_MODE - dnl Checks for programs. +AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 6e41c85eb..73f8fd312 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,11 +4,9 @@ ## ############################################################################### -INCLUDES = -I$(top_srcdir)/src +SUBDIRS = es ga gp utils other do -SUBDIRS = es ga gp utils other do - -CPPFLAGS = -O2 +AM_CXXFLAGS = -I$(top_srcdir)/src lib_LIBRARIES = libeo.a diff --git a/eo/src/eo b/eo/src/eo index 7850578f6..5071dfa12 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -29,6 +29,9 @@ #define _eo_ //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif // general purpose #include #include diff --git a/eo/test/LICENSE b/eo/test/LICENSE deleted file mode 100644 index 60549be51..000000000 --- a/eo/test/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 43b61b81f..d766b42dc 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,204 +4,61 @@ ## ############################################################################### -CLEANFILES = *~ *.sav *.status +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a +LIBES = $(top_builddir)/src/es/libes.a +LIBGA = $(top_builddir)/src/ga/libga.a + +AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src + +CLEANFILES = *~ *.sav *.status monitor.csv t-eoRandom.out + +DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) + +LDADD = $(DEPS) -DEPS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a -############################################################################### -INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/utils/libeoutils.a $(top_builddir)/src/libeo.a -CXXFLAGS = -g -Wall -############################################################################### # PLEASE don't break the line (see create_batch.sh) check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette t-eoSharing -#The run_tests script can be used to check various arguments +noinst_headers = binary_value.h real_value.h + + +# The run_tests script can be used to check various arguments TESTS=$(check_PROGRAMS) run_tests -############################################################################### + +# Specify source-files, +# otherwise automake/make looks for C sources +# t_eoRandom_SOURCES = t-eoRandom.cpp -t_eoRandom_DEPENDENCIES = $(DEPS) -t_eoRandom_LDADD = $(LDADDS) - -############################################################################### - t_eofitness_SOURCES = t-eofitness.cpp -t_eofitness_DEPENDENCIES = $(DEPS) -t_eofitness_LDADD = $(LDADDS) - -############################################################################### - -t_eobin_SOURCES = t-eobin.cpp binary_value.h -t_eobin_DEPENDENCIES = $(DEPS) -t_eobin_LDADD = $(LDADDS) - -############################################################################### - -t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h -t_eoVirus_DEPENDENCIES = $(DEPS) -t_eoVirus_LDADD = $(LDADDS) - -############################################################################### - -t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h -t_MGE1bit_DEPENDENCIES = $(DEPS) -t_MGE1bit_LDADD = $(LDADDS) - -############################################################################### - -t_MGE_SOURCES = t-MGE.cpp binary_value.h -t_MGE_DEPENDENCIES = $(DEPS) -t_MGE_LDADD = $(LDADDS) - -############################################################################### - -t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h -t_MGE_control_DEPENDENCIES = $(DEPS) -t_MGE_control_LDADD = $(LDADDS) - -############################################################################### - -t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp -t_eoStateAndParser_DEPENDENCIES = $(DEPS) -t_eoStateAndParser_LDFLAGS = -lm -t_eoStateAndParser_LDADD = $(LDADDS) - -############################################################################### - -t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp -t_eoCheckpointing_DEPENDENCIES = $(DEPS) -t_eoCheckpointing_LDFLAGS = -lm -t_eoCheckpointing_LDADD = $(LDADDS) - -############################################################################### - -t_eoReplacement_SOURCES = t-eoReplacement.cpp -t_eoReplacement_DEPENDENCIES = $(DEPS) -t_eoReplacement_LDFLAGS = -lm -t_eoReplacement_LDADD = $(LDADDS) - -############################################################################### - -t_eoSelect_SOURCES = t-eoSelect.cpp -t_eoSelect_DEPENDENCIES = $(DEPS) -t_eoSelect_LDFLAGS = -lm -t_eoSelect_LDADD = $(LDADDS) - -############################################################################### - -t_eoExternalEO_SOURCES = t-eoExternalEO.cpp -t_eoExternalEO_DEPENDENCIES = $(DEPS) -t_eoExternalEO_LDFLAGS = -lm -t_eoExternalEO_LDADD = $(LDADDS) - -############################################################################### - -t_eoSymreg_SOURCES = t-eoSymreg.cpp -t_eoSymreg_DEPENDENCIES = $(DEPS) -t_eoSymreg_LDFLAGS = -lm -t_eoSymreg_LDADD = $(LDADDS) - -############################################################################### - -t_eo_SOURCES = t-eo.cpp -t_eo_DEPENDENCIES = $(DEPS) -t_eo_LDFLAGS = -lm -t_eo_LDADD = $(LDADDS) - -############################################################################### - -t_eoGenOp_SOURCES = t-eoGenOp.cpp -t_eoGenOp_DEPENDENCIES = $(DEPS) -t_eoGenOp_LDFLAGS = -lm -t_eoGenOp_LDADD = $(LDADDS) - -############################################################################### - -t_eoVector_SOURCES = t-eoVector.cpp -t_eoVector_DEPENDENCIES = $(DEPS) -t_eoVector_LDFLAGS = -lm -t_eoVector_LDADD = $(LDADDS) - -############################################################################### - -t_eoGA_SOURCES = t-eoGA.cpp binary_value.h -t_eoGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoGA_LDFLAGS = -lm -t_eoGA_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) - -############################################################################### - -t_eoReal_SOURCES = t-eoReal.cpp real_value.h -t_eoReal_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a -t_eoReal_LDFLAGS = -lm -t_eoReal_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) - -############################################################################### - -t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h -t_eoESAll_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a -t_eoESAll_LDFLAGS = -lm -t_eoESAll_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) - -############################################################################### - -t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h -t_eoSSGA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoSSGA_LDFLAGS = -lm -t_eoSSGA_LDADD = $(LDADDS) - -############################################################################### - -t_eoPareto_SOURCES = t-eoPareto.cpp -t_eoPareto_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoPareto_LDFLAGS = -lm -t_eoPareto_LDADD = $(LDADDS) - -############################################################################### - -t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp -t_eoParetoFitness_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoParetoFitness_LDFLAGS = -lm -t_eoParetoFitness_LDADD = $(LDADDS) - -############################################################################### - -t_eoPBIL_SOURCES = t-eoPBIL.cpp -t_eoPBIL_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoPBIL_LDFLAGS = -lm -t_eoPBIL_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) - -############################################################################### - -t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp -t_eoFitnessAssembled_DEPENDENCIES = $(DEPS) $(top_builddir)/src/ga/libga.a -t_eoFitnessAssembled_LDFLAGS = -lm -t_eoFitnessAssembled_LDADD = $(top_builddir)/src/ga/libga.a $(LDADDS) - -############################################################################### - t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp -t_eoFitnessAssembledEA_DEPENDENCIES = $(DEPS) $(top_builddir)/src/es/libes.a -t_eoFitnessAssembledEA_LDFLAGS = -lm -t_eoFitnessAssembledEA_LDADD = $(top_builddir)/src/es/libes.a $(LDADDS) - -############################################################################### - +t_eobin_SOURCES = t-eobin.cpp binary_value.h +t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h +t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h +t_MGE_SOURCES = t-MGE.cpp binary_value.h +t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h +t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp +t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp +t_eoReplacement_SOURCES = t-eoReplacement.cpp +t_eoSelect_SOURCES = t-eoSelect.cpp +t_eoExternalEO_SOURCES = t-eoExternalEO.cpp +t_eoSymreg_SOURCES = t-eoSymreg.cpp +t_eo_SOURCES = t-eo.cpp +t_eoGenOp_SOURCES = t-eoGenOp.cpp +t_eoVector_SOURCES = t-eoVector.cpp +t_eoGA_SOURCES = t-eoGA.cpp binary_value.h +t_eoReal_SOURCES = t-eoReal.cpp real_value.h +t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h +t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h +t_eoPareto_SOURCES = t-eoPareto.cpp +t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp +t_eoPBIL_SOURCES = t-eoPBIL.cpp +t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp t_eoRoulette_SOURCES = t-eoRoulette.cpp -t_eoRoulette_DEPENDENCIES = $(DEPS) -t_eoRoulette_LDFLAGS = -lm -t_eoRoulette_LDADD = $(LDADDS) - -############################################################################### - t_eoSharing_SOURCES = t-eoSharing.cpp -t_eoSharing_DEPENDENCIES = $(DEPS) -t_eoSharing_LDFLAGS = -lm -t_eoSharing_LDADD = $(LDADDS) - -############################################################################### diff --git a/eo/test/t-eoFitnessAssembledEA.cpp b/eo/test/t-eoFitnessAssembledEA.cpp index f21e31be8..6369ac579 100644 --- a/eo/test/t-eoFitnessAssembledEA.cpp +++ b/eo/test/t-eoFitnessAssembledEA.cpp @@ -26,6 +26,10 @@ mak@dhi.dk */ //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/eo/test/t-eoSharing.cpp b/eo/test/t-eoSharing.cpp index 2cd436da9..965041abe 100644 --- a/eo/test/t-eoSharing.cpp +++ b/eo/test/t-eoSharing.cpp @@ -1,17 +1,25 @@ -//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif // to avoid long name warnings #ifdef _MSC_VER #pragma warning(disable:4786) #endif -#include -#include -#include // runtime_error +#include +#include +#include +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif // general #include #include + //----------------------------------------------------------------------------- struct Dummy : public EO @@ -20,7 +28,7 @@ struct Dummy : public EO void printOn(std::ostream & _os) const { EO::printOn(_os); - cout << " " << xdist ; + std::cout << " " << xdist ; } double xdist; }; @@ -140,7 +148,7 @@ int the_main(int argc, char **argv) peakNumber = 2; } - vector nbIndiPerPeak(peakNumber); + std::vector nbIndiPerPeak(peakNumber); unsigned i, sum=0; // the second item is a vector containing all values diff --git a/eo/test/t-eoVector.cpp b/eo/test/t-eoVector.cpp index 8554b3eb5..87c6cdda8 100644 --- a/eo/test/t-eoVector.cpp +++ b/eo/test/t-eoVector.cpp @@ -24,11 +24,17 @@ */ //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif -#include // std::cout -#include // ostrstream, istrstream - -#include +#include +#include +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif #include #include // eoVector diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 7c14c6def..8342b3411 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -22,9 +22,11 @@ */ //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif #include // std::cout - #ifdef HAVE_SSTREAM #include #else From 988e6a43ea3bcb74f1f04f5b8dc56a2127c1fbe8 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 15:50:00 +0000 Subject: [PATCH 1054/2134] *** empty log message *** --- eo/app/gpsymreg/Makefile.am | 18 +++++------------- eo/app/gpsymreg/main.cpp | 4 ++++ eo/src/Makefile.am | 2 +- eo/src/eo | 2 +- eo/src/gp/eoParseTree.h | 4 ++++ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am index a3877197d..0e9032cdc 100644 --- a/eo/app/gpsymreg/Makefile.am +++ b/eo/app/gpsymreg/Makefile.am @@ -4,22 +4,14 @@ # ############################################################################### -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -############################################################################### - -INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a - -############################################################################### bin_PROGRAMS = gpsymreg -############################################################################### +AM_CXXFLAGS = -I$(top_builddir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(top_builddir)/src/utils/libeoutils.a gpsymreg_SOURCES = main.cpp -gpsymreg_DEPENDENCIES = $(DEPS) -gpsymreg_LDFLAGS = -lm -gpsymreg_LDADD = $(LDADDS) - -############################################################################### diff --git a/eo/app/gpsymreg/main.cpp b/eo/app/gpsymreg/main.cpp index dbe7c9ebc..2db9ba370 100644 --- a/eo/app/gpsymreg/main.cpp +++ b/eo/app/gpsymreg/main.cpp @@ -21,6 +21,10 @@ #pragma warning(disable:4786) #endif +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 73f8fd312..f6f9280ec 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -11,7 +11,7 @@ AM_CXXFLAGS = -I$(top_srcdir)/src lib_LIBRARIES = libeo.a libeo_a_SOURCES = eoFunctorStore.cpp \ - eoPersistent.cpp \ + eoPersistent.cpp eoPrintable.cpp \ eoCtrlCContinue.cpp \ eoParetoFitness.cpp \ diff --git a/eo/src/eo b/eo/src/eo index 5071dfa12..9ce3f01c5 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -28,10 +28,10 @@ #ifndef _eo_ #define _eo_ -//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include #endif + // general purpose #include #include diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 2f92d593a..6bccb7dda 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -27,6 +27,10 @@ #ifndef eoParseTree_h #define eoParseTree_h +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include From 9e508c66a68a9ef1d31f2ae9e40212b7b7aa6de7 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 15:51:53 +0000 Subject: [PATCH 1055/2134] update user commentary --- eo/autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/autogen.sh b/eo/autogen.sh index b7b3997c0..e0eae074a 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -49,7 +49,7 @@ touch doc/eo.cfg echo echo "Now run 'configure' and 'make' to build $PROG." -echo "You can check the build running 'make check'" +echo "You can check the libraries by running 'make check'" echo echo "If you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo From 5e416e4a1c50cf2bfbdc60500c6a52bb77ada8ff Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 16:05:25 +0000 Subject: [PATCH 1056/2134] don't use user-variables --- eo/autogen.sh | 14 ------- eo/src/es/Makefile.am | 80 ++++++++++++++++++++-------------------- eo/src/ga/Makefile.am | 49 ++++++++++++------------ eo/src/utils/Makefile.am | 21 +++++++---- 4 files changed, 80 insertions(+), 84 deletions(-) diff --git a/eo/autogen.sh b/eo/autogen.sh index e0eae074a..22b83ab38 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -39,23 +39,9 @@ autoconf # we want doc to be recompiled - and it keeps saying it's up to date!!! touch doc/eo.cfg - -# if test -z "$*"; then -# echo "I am going to run ./configure with no arguments - if you wish" -# echo "to pass any to it, please specify them on the $0 command line." -# fi -# -# ./configure "$@" - echo echo "Now run 'configure' and 'make' to build $PROG." echo "You can check the libraries by running 'make check'" echo echo "If you have Doxygen installed, type 'make doc' to generate $PROG documentation." echo - -#echo "WARNING: Compiling all test programs can take some time." -#echo "But you don't have to: you can simply type" -#echo " 'make lib'" -#echo "and then go in your application dir (or in the tutorial dir)" -#echo "and there type 'make'" diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index 2957f3719..e8648910b 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -4,44 +4,46 @@ ## ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src -lib_LIBRARIES = libes.a -libes_a_SOURCES = make_algo_scalar_es.cpp \ - make_algo_scalar_real.cpp \ - make_checkpoint_es.cpp \ - make_checkpoint_real.cpp \ - make_continue_es.cpp \ - make_continue_real.cpp \ - make_genotype_es.cpp \ - make_genotype_real.cpp \ - make_op_es.cpp \ - make_op_real.cpp \ - make_pop_es.cpp \ - make_pop_real.cpp \ - make_run_es.cpp \ - make_run_real.cpp +AM_CXXFLAGS = -I$(top_srcdir)/src -CPPFLAGS = -Wall -CXXFLAGS = -libeoincdir = $(includedir)/eo/es -libeoinc_HEADERS = eoEsChromInit.h \ - eoEsFull.h \ - eoEsGlobalXover.h \ - eoEsMutate.h \ - eoEsMutationInit.h \ - eoEsSimple.h \ - eoEsStandardXover.h \ - eoEsStdev.h \ - eoNormalMutation.h \ - eoRealAtomXover.h \ - eoReal.h \ - eoRealInitBounded.h \ - eoRealOp.h \ - eoSBXcross.h \ - make_es.h \ - make_genotype_real.h \ - make_op_es.h \ - make_op.h \ - make_op_real.h \ - make_real.h + +lib_LIBRARIES = libes.a + +libes_a_SOURCES = make_algo_scalar_es.cpp \ + make_algo_scalar_real.cpp \ + make_checkpoint_es.cpp \ + make_checkpoint_real.cpp \ + make_continue_es.cpp \ + make_continue_real.cpp \ + make_genotype_es.cpp \ + make_genotype_real.cpp \ + make_op_es.cpp \ + make_op_real.cpp \ + make_pop_es.cpp \ + make_pop_real.cpp \ + make_run_es.cpp \ + make_run_real.cpp + +libeoincdir = $(includedir)/eo/es + +libeoinc_HEADERS = eoEsChromInit.h \ + eoEsFull.h \ + eoEsGlobalXover.h \ + eoEsMutate.h \ + eoEsMutationInit.h \ + eoEsSimple.h \ + eoEsStandardXover.h \ + eoEsStdev.h \ + eoNormalMutation.h \ + eoRealAtomXover.h \ + eoReal.h \ + eoRealInitBounded.h \ + eoRealOp.h \ + eoSBXcross.h \ + make_es.h \ + make_genotype_real.h \ + make_op_es.h \ + make_op.h \ + make_op_real.h \ + make_real.h diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index bd4ba013e..1c6959c00 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -4,28 +4,29 @@ ## ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src -lib_LIBRARIES = libga.a -libga_a_SOURCES = make_algo_scalar_ga.cpp \ - make_checkpoint_ga.cpp \ - make_continue_ga.cpp \ - make_genotype_ga.cpp \ - make_op_ga.cpp \ - make_pop_ga.cpp \ - make_run_ga.cpp +AM_CXXFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src -CPPFLAGS = -Wall -CXXFLAGS = -libeoincdir = $(includedir)/eo/ga -libeoinc_HEADERS = eoBit.h \ - eoBitOpFactory.h \ - eoBitOp.h \ - eoBoolFlip.h \ - eoPBILAdditive.h \ - eoPBILDistrib.h \ - eoPBILOrg.h \ - make_ga.h \ - make_genotype_ga.h \ - make_op.h \ - make_PBILdistrib.h \ - make_PBILupdate.h +lib_LIBRARIES = libga.a + +libga_a_SOURCES = make_algo_scalar_ga.cpp \ + make_checkpoint_ga.cpp \ + make_continue_ga.cpp \ + make_genotype_ga.cpp \ + make_op_ga.cpp \ + make_pop_ga.cpp \ + make_run_ga.cpp + +libeoincdir = $(includedir)/eo/ga + +libeoinc_HEADERS = eoBit.h \ + eoBitOpFactory.h \ + eoBitOp.h \ + eoBoolFlip.h \ + eoPBILAdditive.h \ + eoPBILDistrib.h \ + eoPBILOrg.h \ + make_ga.h \ + make_genotype_ga.h \ + make_op.h \ + make_PBILdistrib.h \ + make_PBILupdate.h diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 9076455dc..7222246bc 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -4,14 +4,21 @@ ## ############################################################################### -INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src -CPPFLAGS = -O2 -Wall lib_LIBRARIES = libeoutils.a -libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp eoUpdater.cpp eoFileMonitor.cpp eoStdoutMonitor.cpp eoRealBounds.cpp make_help.cpp - -libeoincdir = $(includedir)/eo/utils -libeoinc_HEADERS = checkpointing $(srcdir)/*.h -#compatibility.h eoCheckPoint.h eoData.h eoDistance.h eoFDCStat.h eoFileMonitor.h eoGnuplot1DMonitor.h eoGnuplot1DSnapshot.h eoHowMany.h eoMonitor.h eoParam.h eoParser.h eoRNG.h eoStat.h eoScalarFitnessStat.h eoState.h eoStdoutMonitor.h eoUpdatable.h eoUpdater.h rnd_generators.h eoRndGenerators.h selectors.h +AM_CXXFLAGS = -I$(top_srcdir)/src + +libeoutils_a_SOURCES = eoParser.cpp \ + eoRNG.cpp \ + eoState.cpp \ + eoUpdater.cpp \ + eoFileMonitor.cpp \ + eoStdoutMonitor.cpp \ + eoRealBounds.cpp \ + make_help.cpp + +libeoincdir = $(includedir)/eo/utils + +libeoinc_HEADERS = checkpointing $(srcdir)/*.h From 1cf47e414ee2fbbc65c57e1d686cb788783d1773 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 17:06:25 +0000 Subject: [PATCH 1057/2134] conditional compilation fixes --- eo/tutorial/Lesson2/FirstBitEA.cpp | 8 ++++++++ eo/tutorial/Lesson2/FirstRealEA.cpp | 8 ++++++++ eo/tutorial/Lesson2/exercise2.3.cpp | 8 ++++++++ eo/tutorial/Lesson3/SecondBitEA.cpp | 14 +++++++++++--- eo/tutorial/Lesson3/SecondRealEA.cpp | 11 ++++++++++- eo/tutorial/Lesson3/exercise3.1.cpp | 14 +++++++++++--- 6 files changed, 56 insertions(+), 7 deletions(-) diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index f5ca1afa6..928e60196 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -6,10 +6,18 @@ // (see FirstBitGA.cpp) but now with Breeder - and Combined Ops // //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes #include // runtime_error #include // cout +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif // the general include for eo #include diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 1f9686f94..91793a1b1 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -6,10 +6,18 @@ // (see FirstBitGA.cpp) but now with Breeder - and Combined Ops // //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes #include // runtime_error #include // cout +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif // the general include for eo #include diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index e07dd768d..20867a0fc 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -6,10 +6,18 @@ // (see FirstBitGA.cpp) but now with Breeder - and Combined Ops // //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes #include // runtime_error #include // cout +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif // the general include for eo #include diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 7a7bbb0c9..dfcf8e13f 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -6,11 +6,19 @@ // but now you learn to enter the parameters in a more flexible way // and to twidle the output to your preferences! //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes -#include // runtime_error -#include // cout -#include // ostrstream, istrstream #include +#include // cout +#include // runtime_error +#ifdef HAVE_SSTREAM +#include +#else +#include // ostrstream, istrstream +#endif // the general include for eo #include diff --git a/eo/tutorial/Lesson3/SecondRealEA.cpp b/eo/tutorial/Lesson3/SecondRealEA.cpp index df2bed9a6..48d50b6ca 100644 --- a/eo/tutorial/Lesson3/SecondRealEA.cpp +++ b/eo/tutorial/Lesson3/SecondRealEA.cpp @@ -8,10 +8,19 @@ // and to twidle the output to your preferences (as in SecondBitEA.cpp) // //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes -#include // runtime_error +#include #include // cout +#include // runtime_error +#ifdef HAVE_SSTREAM +#include +#else #include // ostrstream, istrstream +#endif // the general include for eo #include diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index cde1cc537..300005417 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -6,11 +6,19 @@ // but now you learn to enter the parameters in a more flexible way // and to twidle the output to your preferences! //----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + // standard includes -#include // runtime_error -#include // cout -#include // ostrstream, istrstream #include +#include // cout +#include // runtime_error +#ifdef HAVE_SSTREAM +#include +#else +#include // ostrstream, istrstream +#endif // the general include for eo #include From 72c070585f348e5c6ce7545e896db2b025e15eb6 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 17:12:12 +0000 Subject: [PATCH 1058/2134] better distribution support (not finished) --- eo/Makefile.am | 19 ++----------------- eo/configure.in | 12 ++++++------ eo/contrib/Makefile.am | 6 +----- eo/doc/Makefile.am | 11 +++++------ eo/src/Makefile.am | 21 ++++++++++----------- eo/src/es/Makefile.am | 7 +------ eo/win/Makefile.am | 5 +---- 7 files changed, 26 insertions(+), 55 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index ae03e3c9e..9e6eb03a5 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,7 +4,8 @@ ## ############################################################################### -SUBDIRS = src test app tutorial +SUBDIRS = src test doc app tutorial contrib win + #Directory for documents DOCDIR = ~/public_html/eodocs @@ -12,9 +13,6 @@ DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user IDXDIR = ~/index -# EXTRA_DIST=LICENSE - - # special targets app: @@ -24,10 +22,6 @@ app: doc: doc/eo.cfg cd doc; $(MAKE) doc; touch eo.cfg; cd .. -tutorial: - cd $(srcdir)/tutorial; $(MAKE) all; cd .. - - @@ -35,12 +29,3 @@ tutorial: #lib: # cd src; $(MAKE) all; cd .. - - -#all: -# for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done - -#clean: -# for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done - -############################################################################### diff --git a/eo/configure.in b/eo/configure.in index d705abf91..8af929c9b 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -39,6 +39,11 @@ AC_CHECK_FUNCS(select) dnl create makefiles AC_OUTPUT(Makefile \ + app/Makefile \ + app/mastermind/Makefile \ + app/gpsymreg/Makefile \ + contrib/Makefile \ + doc/Makefile \ src/Makefile \ src/do/Makefile \ src/es/Makefile \ @@ -46,9 +51,6 @@ AC_OUTPUT(Makefile \ src/ga/Makefile \ src/other/Makefile \ src/utils/Makefile \ - contrib/Makefile \ - doc/Makefile \ - win/Makefile \ test/Makefile \ tutorial/Makefile \ tutorial/Lesson1/Makefile \ @@ -56,6 +58,4 @@ AC_OUTPUT(Makefile \ tutorial/Lesson3/Makefile \ tutorial/Lesson4/Makefile \ tutorial/Lesson5/Makefile \ - app/Makefile \ - app/mastermind/Makefile \ - app/gpsymreg/Makefile) + win/Makefile) diff --git a/eo/contrib/Makefile.am b/eo/contrib/Makefile.am index d9268a84d..f0faf7472 100644 --- a/eo/contrib/Makefile.am +++ b/eo/contrib/Makefile.am @@ -6,8 +6,4 @@ SUBDIRS = -#lib_LIBRARIES = -#libeo_a_SOURCES = - -libeoincdir = $(includedir)/eo -libeoinc_HEADERS=eoAged.h eoDraw.h +pkginclude_HEADERS = eoAged.h eoDrawable.h diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index 64f03e40b..c31407947 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -4,12 +4,11 @@ ## ############################################################################### -############################################################################### -EXTRA_DIST = eo.cfg foot.html html/* latex/* +# EXTRA_DIST = eo.cfg foot.html html/* latex/* -doc: eo.cfg - doxygen eo.cfg +doc: eo.cfg + doxygen eo.cfg -clean: - rm -rf html latex man +clean-local: + rm -rf html latex man diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index f6f9280ec..42772c24f 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,20 +4,19 @@ ## ############################################################################### -SUBDIRS = es ga gp utils other do +SUBDIRS = es ga gp utils other do -AM_CXXFLAGS = -I$(top_srcdir)/src -lib_LIBRARIES = libeo.a +lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoFunctorStore.cpp \ - eoPersistent.cpp - eoPrintable.cpp \ - eoCtrlCContinue.cpp \ - eoParetoFitness.cpp \ - eoScalarFitnessAssembled.cpp +libeo_a_SOURCES = eoFunctorStore.cpp \ + eoPersistent.cpp \ + eoPrintable.cpp \ + eoCtrlCContinue.cpp \ + eoParetoFitness.cpp \ + eoScalarFitnessAssembled.cpp -libeoincdir = $(includedir)/eo +pkginclude_HEADERS = eo *.h do/*.h -libeoinc_HEADERS = $(srcdir)/*.h $(srcdir)/eo $(srcdir)/do/*.h +AM_CXXFLAGS = -I$(top_srcdir)/src diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index e8648910b..ae6d7d0f9 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -4,9 +4,6 @@ ## ############################################################################### -AM_CXXFLAGS = -I$(top_srcdir)/src - - lib_LIBRARIES = libes.a libes_a_SOURCES = make_algo_scalar_es.cpp \ @@ -24,9 +21,7 @@ libes_a_SOURCES = make_algo_scalar_es.cpp \ make_run_es.cpp \ make_run_real.cpp -libeoincdir = $(includedir)/eo/es - -libeoinc_HEADERS = eoEsChromInit.h \ +pkginclude_HEADERS = eoEsChromInit.h \ eoEsFull.h \ eoEsGlobalXover.h \ eoEsMutate.h \ diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am index 13426269b..88b4fcc2d 100644 --- a/eo/win/Makefile.am +++ b/eo/win/Makefile.am @@ -1,4 +1 @@ - -EXTRA_DIST=eo.dsw eo.dsp - - +EXTRA_DIST = eo.dsw eo.dsp From 7db38bc9cd6b603fe5502d9ee56314f491d04f95 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 17:14:11 +0000 Subject: [PATCH 1059/2134] fix --- eo/src/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 42772c24f..906bb994a 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -16,7 +16,9 @@ libeo_a_SOURCES = eoFunctorStore.cpp \ eoParetoFitness.cpp \ eoScalarFitnessAssembled.cpp -pkginclude_HEADERS = eo *.h do/*.h +pkginclude_HEADERS = $(srcdir)/eo $(srcdir)/*.h $(srcdir)/do/*.h AM_CXXFLAGS = -I$(top_srcdir)/src + +EXTRA_DIST = eo *.h do/*.h From de69e235f43535cee55b10676954122a60de64d9 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 20 Sep 2004 21:47:15 +0000 Subject: [PATCH 1060/2134] updates --- eo/autogen.sh | 2 +- eo/src/es/Makefile.am | 2 ++ eo/tutorial/Lesson1/exercise1.3.cpp | 15 ++++++++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/eo/autogen.sh b/eo/autogen.sh index 22b83ab38..8005b6bb9 100755 --- a/eo/autogen.sh +++ b/eo/autogen.sh @@ -33,7 +33,7 @@ set aclocalinclude="$ACLOCAL_FLAGS" aclocal $aclocalinclude unset $aclocalinclude autoheader -automake --add --copy +automake -a -c autoconf # we want doc to be recompiled - and it keeps saying it's up to date!!! diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index ae6d7d0f9..e15e5eff5 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -42,3 +42,5 @@ pkginclude_HEADERS = eoEsChromInit.h \ make_op_real.h \ make_real.h + +AM_CXXFLAGS = -I$(top_srcdir)/src diff --git a/eo/tutorial/Lesson1/exercise1.3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp index d2702ad1d..c7bf389a0 100644 --- a/eo/tutorial/Lesson1/exercise1.3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -1,4 +1,6 @@ -#include // runtime_error +#ifdef HAVE_CONFIG_H +#include +#endif //----------------------------------------------------------------------------- // FirstBitGA.cpp @@ -8,12 +10,15 @@ // //----------------------------------------------------------------------------- // standard includes - -#include // cout -#include // ostrstream, istrstream +#include +#include +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif // the general include for eo - #include //----------------------------------------------------------------------------- From 5150bd4888d27d4fa8f9e08a52e40a1abf6e850a Mon Sep 17 00:00:00 2001 From: kuepper Date: Tue, 21 Sep 2004 10:23:33 +0000 Subject: [PATCH 1061/2134] fix 'make dist', works now (besides ParadisEO). --- eo/.cvsignore | 1 + eo/app/Makefile.am | 10 ----- eo/app/gpsymreg/Makefile.am | 17 ++++---- eo/app/mastermind/Makefile.am | 23 ++++------- eo/contrib/Makefile.am | 4 +- eo/src/utils/Makefile.am | 10 ++--- eo/src/utils/eoRealBounds.cpp | 5 ++- eo/src/utils/eoState.cpp | 6 ++- eo/src/utils/eoUpdater.cpp | 4 ++ eo/test/Makefile.am | 73 +++++++++++++++++---------------- eo/test/t-eoVirus.cpp | 6 +-- eo/tutorial/Lesson5/Makefile.am | 5 +-- 12 files changed, 79 insertions(+), 85 deletions(-) diff --git a/eo/.cvsignore b/eo/.cvsignore index 2073b8c31..b7e78eccf 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -6,6 +6,7 @@ Makefile Makefile.in aclocal.m4 autom4te.cache +build* confdefs.h config.cache config.cache diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 650368343..578f94dce 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -5,13 +5,3 @@ ############################################################################### SUBDIRS = mastermind gpsymreg - -############################################################################### - -all: - for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done - -clean: - for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done - -############################################################################### diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am index 0e9032cdc..ad9744c5b 100644 --- a/eo/app/gpsymreg/Makefile.am +++ b/eo/app/gpsymreg/Makefile.am @@ -4,14 +4,17 @@ # ############################################################################### -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a +bin_PROGRAMS = gpsymreg + +gpsymreg_SOURCES = main.cpp + +noinst_HEADERS = fitness.h node.h parameters.h -bin_PROGRAMS = gpsymreg +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -AM_CXXFLAGS = -I$(top_builddir)/src -DEPS = $(LIBEOUTILS) $(LIBEO) -LIBS = $(top_builddir)/src/utils/libeoutils.a +AM_CXXFLAGS = -I$(top_builddir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) -gpsymreg_SOURCES = main.cpp diff --git a/eo/app/mastermind/Makefile.am b/eo/app/mastermind/Makefile.am index 4d3c0c887..fc1f42511 100644 --- a/eo/app/mastermind/Makefile.am +++ b/eo/app/mastermind/Makefile.am @@ -4,22 +4,15 @@ # ############################################################################### -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +bin_PROGRAMS = mastermind -############################################################################### +mastermind_SOURCES = mastermind.cpp -INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +noinst_HEADERS = mastermind.h -############################################################################### +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -bin_PROGRAMS = mastermind - -############################################################################### - -mastermind_SOURCES = mastermind.cpp -mastermind_DEPENDENCIES = $(DEPS) -mastermind_LDFLAGS = -lm -mastermind_LDADD = $(LDADDS) - -############################################################################### +AM_CXXFLAGS = -I$(top_srcdir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) diff --git a/eo/contrib/Makefile.am b/eo/contrib/Makefile.am index f0faf7472..e01377206 100644 --- a/eo/contrib/Makefile.am +++ b/eo/contrib/Makefile.am @@ -4,6 +4,6 @@ ## ############################################################################### -SUBDIRS = - pkginclude_HEADERS = eoAged.h eoDrawable.h + +EXTRA_DIST = MGE/VirusOp.h MGE/eoInitVirus.h MGE/eoVirus.h diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 7222246bc..8dc5d1381 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -6,10 +6,6 @@ lib_LIBRARIES = libeoutils.a - -AM_CXXFLAGS = -I$(top_srcdir)/src - - libeoutils_a_SOURCES = eoParser.cpp \ eoRNG.cpp \ eoState.cpp \ @@ -19,6 +15,8 @@ libeoutils_a_SOURCES = eoParser.cpp \ eoRealBounds.cpp \ make_help.cpp -libeoincdir = $(includedir)/eo/utils +pkginclude_HEADERS = checkpointing $(srcdir)/*.h -libeoinc_HEADERS = checkpointing $(srcdir)/*.h +AM_CXXFLAGS = -I$(top_srcdir)/src + +EXTRA_DIST = *.h diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index e052a3416..4b8fabb80 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -3,8 +3,11 @@ #pragma warning(disable:4786) #endif -#include +#ifdef HAVE_CONFIG_H +#include +#endif +#include #ifdef HAVE_SSTREAM #include #else diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index 5d3797ba9..09447339d 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -1,11 +1,13 @@ - #ifdef _MSC_VER #pragma warning(disable:4786) #endif +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include - #ifdef HAVE_SSTREAM #include #else diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp index 64b07dfc0..b39ff0732 100644 --- a/eo/src/utils/eoUpdater.cpp +++ b/eo/src/utils/eoUpdater.cpp @@ -2,6 +2,10 @@ #pragma warning(disable:4786) #endif +#ifdef HAVE_CONFIG_H +#include +#endif + #ifdef HAVE_SSTREAM #include #else diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index d766b42dc..83a2dac22 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,18 +4,18 @@ ## ############################################################################### -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -LIBES = $(top_builddir)/src/es/libes.a -LIBGA = $(top_builddir)/src/ga/libga.a +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a +LIBES = $(top_builddir)/src/es/libes.a +LIBGA = $(top_builddir)/src/ga/libga.a -AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src +AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src -CLEANFILES = *~ *.sav *.status monitor.csv t-eoRandom.out +CLEANFILES = monitor.csv t-eoRandom.out -DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) +DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) -LDADD = $(DEPS) +LIBS = $(DEPS) @@ -35,30 +35,33 @@ TESTS=$(check_PROGRAMS) run_tests # Specify source-files, # otherwise automake/make looks for C sources # -t_eoRandom_SOURCES = t-eoRandom.cpp -t_eofitness_SOURCES = t-eofitness.cpp -t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp -t_eobin_SOURCES = t-eobin.cpp binary_value.h -t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h -t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h -t_MGE_SOURCES = t-MGE.cpp binary_value.h -t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h -t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp -t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp -t_eoReplacement_SOURCES = t-eoReplacement.cpp -t_eoSelect_SOURCES = t-eoSelect.cpp -t_eoExternalEO_SOURCES = t-eoExternalEO.cpp -t_eoSymreg_SOURCES = t-eoSymreg.cpp -t_eo_SOURCES = t-eo.cpp -t_eoGenOp_SOURCES = t-eoGenOp.cpp -t_eoVector_SOURCES = t-eoVector.cpp -t_eoGA_SOURCES = t-eoGA.cpp binary_value.h -t_eoReal_SOURCES = t-eoReal.cpp real_value.h -t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h -t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h -t_eoPareto_SOURCES = t-eoPareto.cpp -t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp -t_eoPBIL_SOURCES = t-eoPBIL.cpp -t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp -t_eoRoulette_SOURCES = t-eoRoulette.cpp -t_eoSharing_SOURCES = t-eoSharing.cpp +t_eoRandom_SOURCES = t-eoRandom.cpp +t_eofitness_SOURCES = t-eofitness.cpp +t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp +t_eobin_SOURCES = t-eobin.cpp binary_value.h +t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h +t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h +t_MGE_SOURCES = t-MGE.cpp binary_value.h +t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h +t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp +t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp +t_eoReplacement_SOURCES = t-eoReplacement.cpp +t_eoSelect_SOURCES = t-eoSelect.cpp +t_eoExternalEO_SOURCES = t-eoExternalEO.cpp +t_eoSymreg_SOURCES = t-eoSymreg.cpp +t_eo_SOURCES = t-eo.cpp +t_eoGenOp_SOURCES = t-eoGenOp.cpp +t_eoVector_SOURCES = t-eoVector.cpp +t_eoGA_SOURCES = t-eoGA.cpp binary_value.h +t_eoReal_SOURCES = t-eoReal.cpp real_value.h +t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h +t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h +t_eoPareto_SOURCES = t-eoPareto.cpp +t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp +t_eoPBIL_SOURCES = t-eoPBIL.cpp +t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp +t_eoRoulette_SOURCES = t-eoRoulette.cpp +t_eoSharing_SOURCES = t-eoSharing.cpp + +# extra flags for specific targets +t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp index 7c127c3bf..347a78963 100644 --- a/eo/test/t-eoVirus.cpp +++ b/eo/test/t-eoVirus.cpp @@ -25,9 +25,9 @@ #include // std::cout #include // general EO -#include "../contrib/MGE/VirusOp.h" -#include "../contrib/MGE/eoVirus.h" -#include "../contrib/MGE/eoInitVirus.h" +#include "MGE/VirusOp.h" +#include "MGE/eoVirus.h" +#include "MGE/eoInitVirus.h" #include #include "binary_value.h" diff --git a/eo/tutorial/Lesson5/Makefile.am b/eo/tutorial/Lesson5/Makefile.am index 89c1b97ee..6fd9f2fa1 100644 --- a/eo/tutorial/Lesson5/Makefile.am +++ b/eo/tutorial/Lesson5/Makefile.am @@ -16,10 +16,7 @@ noinst_HEADERS = eoOneMax.h \ extra_DIST = Makefile.simple - +AM_CXXFLAGS = -I$(top_srcdir)/src LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils - LIBS = -lga -leoutils -leo -INCLUDES = -I$(top_srcdir)/src - From 056ac87efb3260812fccf1be98d5b7633d9d5839 Mon Sep 17 00:00:00 2001 From: kuepper Date: Tue, 21 Sep 2004 10:30:45 +0000 Subject: [PATCH 1062/2134] fix dist-header --- eo/test/Makefile.am | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 83a2dac22..5f55323a3 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -21,10 +21,9 @@ LIBS = $(DEPS) # PLEASE don't break the line (see create_batch.sh) - check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette t-eoSharing -noinst_headers = binary_value.h real_value.h +noinst_headers = binary_value.h real_value.h RoyalRoad.h # The run_tests script can be used to check various arguments @@ -38,11 +37,11 @@ TESTS=$(check_PROGRAMS) run_tests t_eoRandom_SOURCES = t-eoRandom.cpp t_eofitness_SOURCES = t-eofitness.cpp t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp -t_eobin_SOURCES = t-eobin.cpp binary_value.h -t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h -t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h -t_MGE_SOURCES = t-MGE.cpp binary_value.h -t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h +t_eobin_SOURCES = t-eobin.cpp +t_eoVirus_SOURCES = t-eoVirus.cpp +t_MGE1bit_SOURCES = t-MGE1bit.cpp +t_MGE_SOURCES = t-MGE.cpp +t_MGE_control_SOURCES = t-MGE-control.cpp t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp t_eoReplacement_SOURCES = t-eoReplacement.cpp @@ -52,10 +51,10 @@ t_eoSymreg_SOURCES = t-eoSymreg.cpp t_eo_SOURCES = t-eo.cpp t_eoGenOp_SOURCES = t-eoGenOp.cpp t_eoVector_SOURCES = t-eoVector.cpp -t_eoGA_SOURCES = t-eoGA.cpp binary_value.h -t_eoReal_SOURCES = t-eoReal.cpp real_value.h -t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h -t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h +t_eoGA_SOURCES = t-eoGA.cpp +t_eoReal_SOURCES = t-eoReal.cpp +t_eoESAll_SOURCES = t-eoESAll.cpp +t_eoSSGA_SOURCES = t-eoSSGA.cpp t_eoPareto_SOURCES = t-eoPareto.cpp t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp t_eoPBIL_SOURCES = t-eoPBIL.cpp From 63cbb12e69fa7de7549728b069ff38d120de6517 Mon Sep 17 00:00:00 2001 From: kuepper Date: Tue, 21 Sep 2004 17:01:14 +0000 Subject: [PATCH 1063/2134] updates, start supoorting ParadisEO --- eo/.cvsignore | 3 ++- eo/Makefile.am | 24 +++++++----------------- eo/acinclude.m4 | 25 +++++++++++++++++++++++++ eo/configure.in | 15 +++++++++++---- eo/doc/Makefile.am | 12 ++++++++---- eo/doc/eo.cfg | 2 +- eo/test/Makefile.am | 29 ++++++++++++----------------- 7 files changed, 66 insertions(+), 44 deletions(-) diff --git a/eo/.cvsignore b/eo/.cvsignore index b7e78eccf..3e34ecb4c 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -9,11 +9,12 @@ autom4te.cache build* confdefs.h config.cache -config.cache +config.guess config.h config.h.in config.log config.status +config.sub configure depcomp install-sh diff --git a/eo/Makefile.am b/eo/Makefile.am index 9e6eb03a5..25d8c43a6 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,28 +4,18 @@ ## ############################################################################### -SUBDIRS = src test doc app tutorial contrib win +SUBDIRS = src test doc app tutorial contrib win #Directory for documents -DOCDIR = ~/public_html/eodocs +DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user -IDXDIR = ~/index +IDXDIR = ~/index -# special targets -app: - cd app; $(MAKE) all; cd .. +dist-hook: + $(MAKE) doc -# so that make doc always compiles the doc ... -doc: doc/eo.cfg - cd doc; $(MAKE) doc; touch eo.cfg; cd .. - - - - -############################################################################### - -#lib: -# cd src; $(MAKE) all; cd .. +doc: $(srcdir)/doc/eo.cfg + cd doc && $(MAKE) doc && cd .. diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 index aa781f376..855ffdddf 100644 --- a/eo/acinclude.m4 +++ b/eo/acinclude.m4 @@ -1,3 +1,26 @@ +# AC_PARADISEO() +# +# Compile ParadisEO if user requests it. +AC_DEFUN([AC_PARADISEO],[dnl + AC_ARG_ENABLE([paradiseo],[ --enable-paradiseo build ParadisEO (default=no)], + [ case "${enableval}" in + yes) paradiseo=true ;; + no) paradiseo=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for paradiseo option) ;; + esac], + [paradiseo=false]) + if test "$paradiseo" = "true"; then + AC_DEFINE([PARADISEO], 1, [ParadisEO flag]) + AM_CONDITIONAL([USE_PARADISEO], true) + AC_CHECK_PROG([MPICXX], [mpiCC], [], AC_MSG_ERROR([Need mpiCC to build PAradisEO.])) + AC_CHECK_PROG([MPIRUN], [mpirun], [], AC_MSG_ERROR([Need mpirun to use PAradisEO.])) + else + AM_CONDITIONAL([USE_PARADISEO], false) + fi +]) + + + dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_sstream.html dnl @@ -24,6 +47,8 @@ if test "$ac_cv_cxx_have_sstream" = yes; then AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) fi ]) + + dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html dnl diff --git a/eo/configure.in b/eo/configure.in index 8af929c9b..f71d1fc77 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -2,12 +2,22 @@ dnl Process this file with autoconf to produce a configure script. dnl Change the version number here AC_INIT(Evolving Objects, 0.9.3, eodev-main@sourceforge.net, eo) AC_PREREQ(2.53) + dnl make sure we are compiling from the correct sources AC_CONFIG_SRCDIR(src/eoOp.h) +dnl define host, build, and target machine +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +dnl automake initialization AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) +dnl user-switches +AC_PARADISEO + dnl Checks for programs. AC_PROG_CC AC_PROG_CXX @@ -15,10 +25,7 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB - -# Why shall we check for these, we just build them... -# AC_CHECK_LIB(eo, main) -# AC_CHECK_LIB(eoutils, main) +AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, true) dnl Checks for header files. AC_HEADER_STDC diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index c31407947..0bcba7a27 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -5,10 +5,14 @@ ############################################################################### -# EXTRA_DIST = eo.cfg foot.html html/* latex/* +EXTRA_DIST = eo.cfg foot.html \ + $(srcdir)/html/* \ + $(srcdir)/latex/* \ + $(srcdir)/man/* -doc: eo.cfg - doxygen eo.cfg + +doc: + cd $(srcdir) && $(DOXYGEN) eo.cfg && touch eo.cfg clean-local: - rm -rf html latex man + cd $(srcdir) && rm -rf html latex man && touch eo.cfg diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 17c29d6a4..40844dc5d 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -23,7 +23,7 @@ PROJECT_NAME = EO # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.9.2 +PROJECT_NUMBER = 0.9.3 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 5f55323a3..b662839cf 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,27 +9,25 @@ LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a LIBES = $(top_builddir)/src/es/libes.a LIBGA = $(top_builddir)/src/ga/libga.a -AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src - -CLEANFILES = monitor.csv t-eoRandom.out - -DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) - -LIBS = $(DEPS) - - - - # PLEASE don't break the line (see create_batch.sh) check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette t-eoSharing -noinst_headers = binary_value.h real_value.h RoyalRoad.h + +TESTS = $(check_PROGRAMS) \ + run_tests # This script can be used to check command-line arguments + +noinst_HEADERS = binary_value.h real_value.h RoyalRoad.h -# The run_tests script can be used to check various arguments -TESTS=$(check_PROGRAMS) run_tests +AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src +DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) +LIBS = $(DEPS) +CLEANFILES = monitor.csv t-eoRandom.out +EXTRA_DIST = run_tests +# extra flags for specific targets +t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib # Specify source-files, # otherwise automake/make looks for C sources @@ -61,6 +59,3 @@ t_eoPBIL_SOURCES = t-eoPBIL.cpp t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp t_eoRoulette_SOURCES = t-eoRoulette.cpp t_eoSharing_SOURCES = t-eoSharing.cpp - -# extra flags for specific targets -t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib From 0a6e0c687c43e9ed69ff8906256885ad0e20462c Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 21 Sep 2004 19:49:48 +0000 Subject: [PATCH 1064/2134] Made couple of functions virtual --- eo/src/utils/eoFileMonitor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 0d6d3b394..96a3e07ee 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk -CVS Info: $Date: 2003-11-19 13:29:15 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.12 2003-11-19 13:29:15 okoenig Exp $ $Author: okoenig $ +CVS Info: $Date: 2004-09-21 19:49:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoFileMonitor.h,v 1.13 2004-09-21 19:49:48 maartenkeijzer Exp $ $Author: maartenkeijzer $ */ //----------------------------------------------------------------------------- @@ -58,9 +58,9 @@ public : } } - eoMonitor& operator()(void); + virtual eoMonitor& operator()(void); - eoMonitor& operator()(std::ostream& os); + virtual eoMonitor& operator()(std::ostream& os); void printHeader(void); virtual void printHeader(std::ostream& os); From e388461a3b27ba07fbb3a880070bf1d848c50478 Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 22 Sep 2004 08:18:29 +0000 Subject: [PATCH 1065/2134] Update configure with switches for app, ParadisEO, and tutorial. Add ParadisEO/Lesson1 tutorial in build-process. minor fixes. --- eo/Makefile.am | 11 ++-- eo/acinclude.m4 | 53 +++++++++++++++++-- eo/configure.in | 4 ++ .../comm/messages/from/eoEOSendMessFrom.h | 11 ++++ eo/src/utils/eoFileSnapshot.h | 2 + eo/src/utils/eoGnuplot.h | 4 +- eo/src/utils/eoGnuplot1DMonitor.h | 2 + eo/src/utils/eoGnuplot1DSnapshot.h | 2 + eo/src/utils/eoHowMany.h | 2 + eo/src/utils/eoParam.h | 2 + eo/src/utils/eoPopStat.h | 2 + eo/tutorial/Makefile.am | 4 ++ eo/tutorial/ParadisEO/.cvsignore | 1 + eo/tutorial/ParadisEO/Lesson1/.cvsignore | 1 + eo/tutorial/ParadisEO/Lesson1/Makefile.am | 19 +++++++ eo/tutorial/ParadisEO/Makefile.am | 1 + 16 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 eo/tutorial/ParadisEO/.cvsignore create mode 100644 eo/tutorial/ParadisEO/Lesson1/.cvsignore create mode 100644 eo/tutorial/ParadisEO/Lesson1/Makefile.am create mode 100644 eo/tutorial/ParadisEO/Makefile.am diff --git a/eo/Makefile.am b/eo/Makefile.am index 25d8c43a6..07b73ede2 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,10 +4,15 @@ ## ############################################################################### -SUBDIRS = src test doc app tutorial contrib win +SUBDIRS = src test doc contrib win +if USE_APPLICATIONS +SUBDIRS += app +endif +if USE_TUTORIAL +SUBDIRS += tutorial +endif - -#Directory for documents +# Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 index 855ffdddf..4fc7561fa 100644 --- a/eo/acinclude.m4 +++ b/eo/acinclude.m4 @@ -1,8 +1,28 @@ +# AC_APPLICATIONS() +# +# Compile applications unless user requests not to do it. +AC_DEFUN([AC_APPLICATIONS],[dnl + AC_ARG_ENABLE([applications],[ --enable-applications build applications (default=yes)], + [ case "${enableval}" in + yes) applications=true ;; + no) applications=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for applications option) ;; + esac], + [applications=true]) + if test "$applications" = "true"; then + AM_CONDITIONAL([USE_APPLICATIONS], true) + else + AM_CONDITIONAL([USE_APPLICATIONS], false) + fi +]) + + + # AC_PARADISEO() # # Compile ParadisEO if user requests it. AC_DEFUN([AC_PARADISEO],[dnl - AC_ARG_ENABLE([paradiseo],[ --enable-paradiseo build ParadisEO (default=no)], + AC_ARG_ENABLE([paradiseo],[ --enable-paradiseo build ParadisEO (default=no)], [ case "${enableval}" in yes) paradiseo=true ;; no) paradiseo=false ;; @@ -10,10 +30,15 @@ AC_DEFUN([AC_PARADISEO],[dnl esac], [paradiseo=false]) if test "$paradiseo" = "true"; then - AC_DEFINE([PARADISEO], 1, [ParadisEO flag]) AM_CONDITIONAL([USE_PARADISEO], true) - AC_CHECK_PROG([MPICXX], [mpiCC], [], AC_MSG_ERROR([Need mpiCC to build PAradisEO.])) - AC_CHECK_PROG([MPIRUN], [mpirun], [], AC_MSG_ERROR([Need mpirun to use PAradisEO.])) + AC_CHECK_PROGS(MPICXX, [mpic++ mpiCC mpicxx], [false]) + if test $MPICXX = false; then + AC_MSG_ERROR([mpic++ is required for ParadisEO builds.]) + fi + AC_CHECK_PROGS(MPIRUN, [mpirun], [false]) + if test $MPIRUN = false; then + AC_MSG_ERROR([mpirun is required for ParadisEO builds.]) + fi else AM_CONDITIONAL([USE_PARADISEO], false) fi @@ -21,6 +46,26 @@ AC_DEFUN([AC_PARADISEO],[dnl +# AC_TUTORIAL() +# +# Compile tutorial unless user requests not to do it. +AC_DEFUN([AC_TUTORIAL],[dnl + AC_ARG_ENABLE([tutorial],[ --enable-tutorial build tutorial (default=yes)], + [ case "${enableval}" in + yes) tutorial=true ;; + no) tutorial=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for tutorial option) ;; + esac], + [tutorial=true]) + if test "$tutorial" = "true"; then + AM_CONDITIONAL([USE_TUTORIAL], true) + else + AM_CONDITIONAL([USE_TUTORIAL], false) + fi +]) + + + dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_sstream.html dnl diff --git a/eo/configure.in b/eo/configure.in index f71d1fc77..bd1ca3681 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -16,7 +16,9 @@ AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) dnl user-switches +AC_APPLICATIONS AC_PARADISEO +AC_TUTORIAL dnl Checks for programs. AC_PROG_CC @@ -65,4 +67,6 @@ AC_OUTPUT(Makefile \ tutorial/Lesson3/Makefile \ tutorial/Lesson4/Makefile \ tutorial/Lesson5/Makefile \ + tutorial/ParadisEO/Makefile \ + tutorial/ParadisEO/Lesson1/Makefile \ win/Makefile) diff --git a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h index f4824d256..01cc5d0f1 100644 --- a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h +++ b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h @@ -24,11 +24,22 @@ #ifndef eoEOSendMessFrom_h #define eoEOSendMessFrom_h +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include #include +using namespace std; + /** A message embeding a set of immigrants ... */ diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 51643ff47..97a8e6f71 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -27,7 +27,9 @@ #ifndef _eoFileSnapshot_h #define _eoFileSnapshot_h +#ifdef HAVE_CONFIG_H #include +#endif #include #include diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 38297cd62..50e372b45 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -26,7 +26,9 @@ #ifndef _eoGnuplot_H #define _eoGnuplot_H +#ifdef HAVE_CONFIG_H #include +#endif #include @@ -152,7 +154,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.10 2004-09-17 16:53:15 kuepper Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.11 2004-09-22 08:18:28 kuepper Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 655966231..8e01413e5 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -28,7 +28,9 @@ #ifndef _eoGnuplot1DMonitor_H #define _eoGnuplot1DMonitor_H +#ifdef HAVE_CONFIG_H #include +#endif #include diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index ef70aa637..0ef17c8ae 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -28,7 +28,9 @@ #ifndef _eoGnuplot1DSnapshot_H #define _eoGnuplot1DSnapshot_H +#ifdef HAVE_CONFIG_H #include +#endif #include #ifdef HAVE_SSTREAM diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 782bbd447..3f84a9c9e 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -64,7 +64,9 @@ * It is an eoPersistent because we need to be able to use eoParamValue */ +#ifdef HAVE_CONFIG_H #include +#endif #ifdef HAVE_SSTREAM #include diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 7595ef502..75875b9bd 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -27,7 +27,9 @@ #ifndef eoParam_h #define eoParam_h +#ifdef HAVE_CONFIG_H #include +#endif //----------------------------------------------------------------------------- #include // for floor diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 7dcf82596..983c8c1c4 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -35,7 +35,9 @@ that can be used to dump to the screen #ifndef _eoPopStat_h #define _eoPopStat_h +#ifdef HAVE_CONFIG_H #include +#endif #include diff --git a/eo/tutorial/Makefile.am b/eo/tutorial/Makefile.am index 2df653912..61d590ddb 100644 --- a/eo/tutorial/Makefile.am +++ b/eo/tutorial/Makefile.am @@ -1 +1,5 @@ +if USE_PARADISEO +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 ParadisEO +else SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 +endif diff --git a/eo/tutorial/ParadisEO/.cvsignore b/eo/tutorial/ParadisEO/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/ParadisEO/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson1/.cvsignore b/eo/tutorial/ParadisEO/Lesson1/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile.am b/eo/tutorial/ParadisEO/Lesson1/Makefile.am new file mode 100644 index 000000000..67f0e9e77 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/Makefile.am @@ -0,0 +1,19 @@ +noinst_PROGRAMS = IslandBitEA IslandBitEA1 IslandBitEA2 + +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a + +CXX = $(MPICXX) +LD = $(MPICXX) +AM_CXXFLAGS = -I$(top_srcdir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) + + +noinst_HEADERS = binary_value.h + +IslandBitEA_SOURCES = IslandBitEA.cpp + +IslandBitEA1_SOURCES = IslandBitEA1.cpp + +IslandBitEA2_SOURCES = IslandBitEA2.cpp diff --git a/eo/tutorial/ParadisEO/Makefile.am b/eo/tutorial/ParadisEO/Makefile.am new file mode 100644 index 000000000..3bdf4ca5b --- /dev/null +++ b/eo/tutorial/ParadisEO/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = Lesson1 \ No newline at end of file From 3cb80bc73b33c340fa75a13a09154b18ebbc4634 Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 22 Sep 2004 12:38:28 +0000 Subject: [PATCH 1066/2134] update build process to include paradiseo tutorial, fix paradiseo headers for sstream --- eo/configure.in | 2 + eo/src/eoPop.h | 3 +- eo/src/paradisEO/comm/eoListener.h | 3 +- eo/src/paradisEO/comm/eoLocalListener.h | 5 +- .../comm/messages/from/eoEOSendMessFrom.h | 65 +++++++++---------- .../comm/messages/to/eoEOSendMessTo.h | 62 ++++++++++-------- eo/tutorial/ParadisEO/Lesson2/.cvsignore | 1 + eo/tutorial/ParadisEO/Lesson2/Makefile.am | 17 +++++ .../ParadisEO/Lesson2/MasterDistEvalBitEA.cpp | 9 ++- .../ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp | 12 +++- eo/tutorial/ParadisEO/Lesson3/.cvsignore | 1 + .../ParadisEO/Lesson3/CellularBitEA.cpp | 10 ++- eo/tutorial/ParadisEO/Lesson3/Makefile.am | 15 +++++ eo/tutorial/ParadisEO/Makefile.am | 2 +- 14 files changed, 139 insertions(+), 68 deletions(-) create mode 100644 eo/tutorial/ParadisEO/Lesson2/.cvsignore create mode 100644 eo/tutorial/ParadisEO/Lesson2/Makefile.am create mode 100644 eo/tutorial/ParadisEO/Lesson3/.cvsignore create mode 100644 eo/tutorial/ParadisEO/Lesson3/Makefile.am diff --git a/eo/configure.in b/eo/configure.in index bd1ca3681..501f4e2b1 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -69,4 +69,6 @@ AC_OUTPUT(Makefile \ tutorial/Lesson5/Makefile \ tutorial/ParadisEO/Makefile \ tutorial/ParadisEO/Lesson1/Makefile \ + tutorial/ParadisEO/Lesson2/Makefile \ + tutorial/ParadisEO/Lesson3/Makefile \ win/Makefile) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 06babccaf..1829ddc1a 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -25,9 +25,10 @@ #ifndef _EOPOP_H #define _EOPOP_H -#include #include +#include #include // needed for GCC 3.2 +#include // EO includes #include // for eoInit diff --git a/eo/src/paradisEO/comm/eoListener.h b/eo/src/paradisEO/comm/eoListener.h index 6ac32f5bb..1f085e1e9 100644 --- a/eo/src/paradisEO/comm/eoListener.h +++ b/eo/src/paradisEO/comm/eoListener.h @@ -24,11 +24,12 @@ #ifndef eoListener_h #define eoListener_h +#include #include + #include #include #include -#include /** Necessary for any use of a distributed model. diff --git a/eo/src/paradisEO/comm/eoLocalListener.h b/eo/src/paradisEO/comm/eoLocalListener.h index b11e21768..0c2d79168 100644 --- a/eo/src/paradisEO/comm/eoLocalListener.h +++ b/eo/src/paradisEO/comm/eoLocalListener.h @@ -24,16 +24,17 @@ #ifndef eoLocalListener_h #define eoLocalListener_h +#include #include #include +#include + #include #include #include #include #include #include -#include -#include /** A local listener to pack any coming message or, on contrary, to diff --git a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h index 01cc5d0f1..442c9bcbc 100644 --- a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h +++ b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h @@ -28,6 +28,7 @@ #include #endif +#include #include #include #ifdef HAVE_SSTREAM @@ -35,49 +36,47 @@ #else #include #endif -#include + #include -using namespace std; + /** A message embeding a set of immigrants ... */ - -template class eoEOSendMessFrom : public eoMessFrom { +template class eoEOSendMessFrom : public eoMessFrom +{ +public: -public : + /** + Constructor + */ + eoEOSendMessFrom (eoLocalListener & _loc_listen) + : eoMessFrom (_loc_listen) { + MPI :: Status stat ; + comm.Probe (loc_listen.number (), 0, stat) ; + int len = stat.Get_count (MPI :: CHAR) ; + char buff [len] ; + comm.Recv(buff, len, MPI::CHAR, loc_listen.number (), 0) ; +#ifdef HAVE_SSTREAM + std::istringstream f(buff); +#else + istrstream f(buff); +#endif + _pop.readFrom(f); + } + + - /** - Constructor - */ + void operator() () { + loc_listen.push (_pop) ; + // std::cout << "Reception de " << pop.size () << "individus " << std::endl ; + } - eoEOSendMessFrom (eoLocalListener & _loc_listen) : - eoMessFrom (_loc_listen) { - - MPI :: Status stat ; - comm.Probe (loc_listen.number (), 0, stat) ; - int len = stat.Get_count (MPI :: CHAR) ; - char buff [len] ; - comm.Recv (buff, len, MPI :: CHAR, loc_listen.number (), 0) ; - istrstream f (buff) ; - pop.readFrom (f) ; - } - - void operator () () { - - loc_listen.push (pop) ; - // std::cout << "Reception de " << pop.size () << "individus " << std::endl ; - } +protected: -private : - - eoPop pop ; // New immigrants ! - -} ; + eoPop _pop ; // New immigrants ! +}; #endif - - - diff --git a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h index 127214c73..a5f4dfa71 100644 --- a/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h +++ b/eo/src/paradisEO/comm/messages/to/eoEOSendMessTo.h @@ -21,49 +21,59 @@ Contact: cahon@lifl.fr */ -/** - A message embeding immigrants to send to ... -*/ #ifndef eoEOSendMessTo_h #define eoEOSendMessTo_h +#ifdef HAVE_CONFIG_H +#include +#endif + #include +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include #include + +/** A message embeding immigrants to send to ... */ template class eoEOSendMessTo : public eoMessTo { public : - /** - Constructor ... - */ + /** + Constructor ... + */ - eoEOSendMessTo (eoPop & _pop ) - : eoMessTo ("eoEOSendMessTo"), - pop (_pop) - {} + eoEOSendMessTo (eoPop & _pop ) + : eoMessTo ("eoEOSendMessTo"), + pop (_pop) + {} + + /** + To send the given population ... + */ + void operator () (eoLocalListener & loc_listen) { + eoMessTo :: operator () (loc_listen) ; +#ifdef HAVE_SSTREAM + std::ostringstream f; + pop.printOn(f); + comm.Send(f.str().c_str(), f.str().size(), MPI::CHAR, loc_listen.number(), 0); +#else + std::ostrstream f; + pop.printOn (f); + comm.Send (f.str(), f.pcount(), MPI::CHAR, loc_listen.number(), 0); +#endif + loc_listen.need_immigration () = false; + } - /** - To send the given population ... - */ - void operator () (eoLocalListener & loc_listen) { - - eoMessTo :: operator () (loc_listen) ; - - std::ostrstream f ; - pop.printOn (f) ; - comm.Send (f.str (), f.pcount (), MPI :: CHAR, loc_listen.number (), 0) ; - loc_listen.need_immigration () = false ; - } - -private : - - eoPop & pop ; // The set of EO to send. +protected: + eoPop & pop ; // The set of EO to send. } ; #endif diff --git a/eo/tutorial/ParadisEO/Lesson2/.cvsignore b/eo/tutorial/ParadisEO/Lesson2/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson2/Makefile.am b/eo/tutorial/ParadisEO/Lesson2/Makefile.am new file mode 100644 index 000000000..8a856631e --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson2/Makefile.am @@ -0,0 +1,17 @@ +noinst_PROGRAMS = MasterDistEvalBitEA SlaveDistEvalBitEA + +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a + +CXX = $(MPICXX) +LD = $(MPICXX) +AM_CXXFLAGS = -I$(top_srcdir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) + + +noinst_HEADERS = binary_value.h + +MasterDistEvalBitEA_SOURCES = MasterDistEvalBitEA.cpp + +SlaveDistEvalBitEA_SOURCES = SlaveDistEvalBitEA.cpp diff --git a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp index 0d61b5018..e98e3d0d5 100644 --- a/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson2/MasterDistEvalBitEA.cpp @@ -1,6 +1,13 @@ -#include +#ifdef HAVE_CONFIG_H +#include +#endif + #include +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include #include diff --git a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp index c6cd8969e..cf7a9420a 100644 --- a/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp @@ -1,6 +1,14 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include // runtime_error -#include // cout -#include // ostrstream, istrstream +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif #include #include diff --git a/eo/tutorial/ParadisEO/Lesson3/.cvsignore b/eo/tutorial/ParadisEO/Lesson3/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson3/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp b/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp index 42cb4a958..f1773cc0e 100644 --- a/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp +++ b/eo/tutorial/ParadisEO/Lesson3/CellularBitEA.cpp @@ -1,6 +1,14 @@ -#include +#ifdef HAVE_CONFIG_H +#include +#endif + #include +#include // runtime_error +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include #include diff --git a/eo/tutorial/ParadisEO/Lesson3/Makefile.am b/eo/tutorial/ParadisEO/Lesson3/Makefile.am new file mode 100644 index 000000000..13dbcc309 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson3/Makefile.am @@ -0,0 +1,15 @@ +noinst_PROGRAMS = CellularBitEA + +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a + +CXX = $(MPICXX) +LD = $(MPICXX) +AM_CXXFLAGS = -I$(top_srcdir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) + + +noinst_HEADERS = binary_value.h + +CellularBitEA_SOURCES = CellularBitEA.cpp diff --git a/eo/tutorial/ParadisEO/Makefile.am b/eo/tutorial/ParadisEO/Makefile.am index 3bdf4ca5b..d1890d249 100644 --- a/eo/tutorial/ParadisEO/Makefile.am +++ b/eo/tutorial/ParadisEO/Makefile.am @@ -1 +1 @@ -SUBDIRS = Lesson1 \ No newline at end of file +SUBDIRS = Lesson1 Lesson2 Lesson3 From 6fff184ba31d081e620eee41caaf6e6f48c5936b Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 22 Sep 2004 13:20:15 +0000 Subject: [PATCH 1067/2134] update for new build-process --- eo/README | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/eo/README b/eo/README index af19a1918..333e90d75 100644 --- a/eo/README +++ b/eo/README @@ -13,39 +13,33 @@ In case of any problem, please e-mail us at eodev@egroups.com, eodev-main@lists.sourceforge.net + ================================================================== BUILDING EO ================================================================== -The basic installatio procedure goes the following: +The basic installation procedure goes the following: -- go to the EO directory - that was created when you unzipped the - archive file. +Go to your build-directory and run + $(SRCDIR)/configure + make + make check + make install +where $(SRCDIR) is the top-level source directory of EO, i.e. where +the sources where unpacked. -- run - ./autogen.sh +See $(SRCDIR)/configure for possible options. You can specify to not +build example applications, the tutorial, or to build the ParadisEO +tutorial. You may also change the installation directory that way. -- run - make +Now you should probably go to the tutorial and start learning about EO +features and programming. -and that's it. You should probably go to the tutorial and start -learning about EO features and programming. - -WARNING: Compiling all test programs can take some time. - But you don't have to: - -- you can simply type - - make lib - -and then go in your application (or in the tutorial) dir and run make - - cd tutorial - make In case of problems, you can read the INSTALL file - but remember this is a standard installation file from GNU and that it contains nothing specific about EO. + =================================================================== DIRECTORY STRUCTURE =================================================================== @@ -101,14 +95,8 @@ structure: =================================================================== NOTES -=================================================================== -if you extracted a fresh snapshot from the cvs-repository, remember to do: - -$> ./autogen.sh --enable-maintainer-mode - -instead of - -$> ./autogen.sh - -before making the libraries. - +=================================================================== if +you extracted a fresh snapshot from the cvs-repository, remember to +run + ./autogen.sh +in the source-directory before building the libraries. From 495057c341b5975e35788211c72cfd3a37a4694b Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 22 Sep 2004 17:30:11 +0000 Subject: [PATCH 1068/2134] updates for distributing/installing ParadisEO. --- eo/Makefile.am | 13 +- eo/THANKS | 0 eo/configure.in | 12 +- eo/src/Makefile.am | 130 ++++++++++++++++-- eo/src/do/Makefile.am | 4 +- eo/src/es/Makefile.am | 4 - eo/src/paradisEO/.cvsignore | 1 + eo/src/paradisEO/Makefile.am | 7 + eo/src/paradisEO/comm/.cvsignore | 1 + eo/src/paradisEO/comm/Makefile.am | 7 + eo/src/paradisEO/comm/messages/.cvsignore | 1 + eo/src/paradisEO/comm/messages/Makefile.am | 8 ++ .../paradisEO/comm/messages/from/.cvsignore | 1 + .../paradisEO/comm/messages/from/Makefile.am | 9 ++ eo/src/paradisEO/comm/messages/to/.cvsignore | 1 + eo/src/paradisEO/comm/messages/to/Makefile.am | 9 ++ eo/src/paradisEO/eval/.cvsignore | 1 + eo/src/paradisEO/eval/Makefile.am | 9 ++ eo/src/paradisEO/island/.cvsignore | 1 + eo/src/paradisEO/island/Makefile.am | 10 ++ eo/src/paradisEO/island/topologies/.cvsignore | 1 + .../paradisEO/island/topologies/Makefile.am | 6 + eo/src/utils/Makefile.am | 40 +++++- 23 files changed, 243 insertions(+), 33 deletions(-) create mode 100644 eo/THANKS create mode 100644 eo/src/paradisEO/.cvsignore create mode 100644 eo/src/paradisEO/Makefile.am create mode 100644 eo/src/paradisEO/comm/.cvsignore create mode 100644 eo/src/paradisEO/comm/Makefile.am create mode 100644 eo/src/paradisEO/comm/messages/.cvsignore create mode 100644 eo/src/paradisEO/comm/messages/Makefile.am create mode 100644 eo/src/paradisEO/comm/messages/from/.cvsignore create mode 100644 eo/src/paradisEO/comm/messages/from/Makefile.am create mode 100644 eo/src/paradisEO/comm/messages/to/.cvsignore create mode 100644 eo/src/paradisEO/comm/messages/to/Makefile.am create mode 100644 eo/src/paradisEO/eval/.cvsignore create mode 100644 eo/src/paradisEO/eval/Makefile.am create mode 100644 eo/src/paradisEO/island/.cvsignore create mode 100644 eo/src/paradisEO/island/Makefile.am create mode 100644 eo/src/paradisEO/island/topologies/.cvsignore create mode 100644 eo/src/paradisEO/island/topologies/Makefile.am diff --git a/eo/Makefile.am b/eo/Makefile.am index 07b73ede2..925bbf890 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -1,17 +1,16 @@ -############################################################################### -## ## Makefile.am for eo -## -############################################################################### -SUBDIRS = src test doc contrib win if USE_APPLICATIONS -SUBDIRS += app +SUBDIRS_APP = app endif + if USE_TUTORIAL -SUBDIRS += tutorial +SUBDIRS_TUT = tutorial endif +SUBDIRS = src test doc contrib win $(SUBDIRS_APP) $(SUBDIRS_TUT) + + # Directory for documents DOCDIR = ~/public_html/eodocs diff --git a/eo/THANKS b/eo/THANKS new file mode 100644 index 000000000..e69de29bb diff --git a/eo/configure.in b/eo/configure.in index 501f4e2b1..6a770c30d 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl Change the version number here -AC_INIT(Evolving Objects, 0.9.3, eodev-main@sourceforge.net, eo) +AC_INIT(Evolving Objects, 0.9.3, eodev-help@sourceforge.net, eo) AC_PREREQ(2.53) dnl make sure we are compiling from the correct sources @@ -12,7 +12,7 @@ AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl automake initialization -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([gnu dist-bzip2]) AM_CONFIG_HEADER([config.h]) dnl user-switches @@ -59,6 +59,14 @@ AC_OUTPUT(Makefile \ src/gp/Makefile \ src/ga/Makefile \ src/other/Makefile \ + src/paradisEO/Makefile \ + src/paradisEO/comm/Makefile \ + src/paradisEO/comm/messages/Makefile \ + src/paradisEO/comm/messages/from/Makefile \ + src/paradisEO/comm/messages/to/Makefile \ + src/paradisEO/eval/Makefile \ + src/paradisEO/island/Makefile \ + src/paradisEO/island/topologies/Makefile \ src/utils/Makefile \ test/Makefile \ tutorial/Makefile \ diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 906bb994a..04e71ee2c 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -1,11 +1,12 @@ -############################################################################### -## -## Makefile.am for eo/src -## -############################################################################### - -SUBDIRS = es ga gp utils other do +# Makefile.am for eo/src +if USE_PARADISEO +SUBDIRS = es ga gp do utils other paradisEO +PARADISEO_H = paradiseo.h +else +SUBDIRS = es ga gp do utils other +PARADISEO_H = +endif lib_LIBRARIES = libeo.a @@ -16,9 +17,118 @@ libeo_a_SOURCES = eoFunctorStore.cpp \ eoParetoFitness.cpp \ eoScalarFitnessAssembled.cpp -pkginclude_HEADERS = $(srcdir)/eo $(srcdir)/*.h $(srcdir)/do/*.h - AM_CXXFLAGS = -I$(top_srcdir)/src -EXTRA_DIST = eo *.h do/*.h +pkginclude_HEADERS = eo \ + EO.h \ + apply.h \ + eoAlgo.h \ + eoBreed.h \ + eoCellularEasyEA.h \ + eoCloneOps.h \ + eoCombinedContinue.h \ + eoCombinedInit.h \ + eoContinue.h \ + eoCounter.h \ + eoCtrlCContinue.h \ + eoDetSelect.h \ + eoDetTournamentSelect.h \ + eoDistribUpdater.h \ + eoDistribution.h \ + eoDominanceMap.h \ + eoEDA.h \ + eoEasyEA.h \ + eoEvalContinue.h \ + eoEvalFunc.h \ + eoEvalFuncCounter.h \ + eoEvalFuncPtr.h \ + eoFactory.h \ + eoFitContinue.h \ + eoFitnessScalingSelect.h \ + eoFlOrBinOp.h \ + eoFlOrMonOp.h \ + eoFlOrQuadOp.h \ + eoFunctor.h \ + eoFunctorStore.h \ + eoG3Replacement.h \ + eoGenContinue.h \ + eoGenOp.h \ + eoGeneralBreeder.h \ + eoInit.h \ + eoInvalidateOps.h \ + eoLinearFitScaling.h \ + eoMGGReplacement.h \ + eoMerge.h \ + eoMergeReduce.h \ + eoNDSorting.h \ + eoObject.h \ + eoOneToOneBreeder.h \ + eoOp.h \ + eoOpContainer.h \ + eoOpSelMason.h \ + eoParetoConstraintFitness.h \ + eoParetoFitness.h \ + eoParetoRanking.h \ + eoPerf2Worth.h \ + eoPersistent.h \ + eoPop.h \ + eoPopAlgo.h \ + eoPopEvalFunc.h \ + eoPopulator.h \ + eoPrintable.h \ + eoProportionalCombinedOp.h \ + eoProportionalSelect.h \ + eoRandomSelect.h \ + eoRanking.h \ + eoRankingSelect.h \ + eoReduce.h \ + eoReduceMerge.h \ + eoReduceMergeReduce.h \ + eoReduceSplit.h \ + eoReplacement.h \ + eoSGA.h \ + eoSGAGenOp.h \ + eoSGATransform.h \ + eoSTLFunctor.h \ + eoScalarFitness.h \ + eoScalarFitnessAssembled.cpp \ + eoScalarFitnessAssembled.h \ + eoSelect.h \ + eoSelectFactory.h \ + eoSelectFromWorth.h \ + eoSelectMany.h \ + eoSelectNumber.h \ + eoSelectOne.h \ + eoSelectPerc.h \ + eoSequentialSelect.h \ + eoSharing.h \ + eoSharingSelect.h \ + eoSimpleEDA.h \ + eoSteadyFitContinue.h \ + eoStochTournamentSelect.h \ + eoStochasticUniversalSelect.h \ + eoSurviveAndDie.h \ + eoToricCellularEasyEA.h \ + eoTransform.h \ + eoTruncSelect.h \ + eoTruncatedSelectMany.h \ + eoTruncatedSelectOne.h \ + eoVariableLengthCrossover.h \ + eoVariableLengthMutation.h \ + eoVector.h \ + es.h \ + ga.h \ + do/make_algo_easea.h \ + do/make_algo_pareto.h \ + do/make_algo_scalar.h \ + do/make_checkpoint.h \ + do/make_checkpoint_FDC.h \ + do/make_checkpoint_assembled.h \ + do/make_checkpoint_pareto.h \ + do/make_continue.h \ + do/make_continue_pareto.h \ + do/make_general_replacement.h \ + do/make_pop.h \ + do/make_run.h \ + $(PARADISEO_H) diff --git a/eo/src/do/Makefile.am b/eo/src/do/Makefile.am index 998e07824..ca6877ec1 100644 --- a/eo/src/do/Makefile.am +++ b/eo/src/do/Makefile.am @@ -1,3 +1 @@ -EXTRA_DIST = *.h Readme - -CLEANFILES = *~ +EXTRA_DIST = Readme diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index e15e5eff5..c9faaaa78 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -1,8 +1,4 @@ -############################################################################### -## ## Makefile.am for eo/src/es -## -############################################################################### lib_LIBRARIES = libes.a diff --git a/eo/src/paradisEO/.cvsignore b/eo/src/paradisEO/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/Makefile.am b/eo/src/paradisEO/Makefile.am new file mode 100644 index 000000000..dcf813f1c --- /dev/null +++ b/eo/src/paradisEO/Makefile.am @@ -0,0 +1,7 @@ +# Copyright (C) 2004 Jochen Küpper + +SUBDIRS = comm eval island + +pkginclude_HEADERS = eoPopAgent.h eoSolAgent.h + +### Makefile.am ends here diff --git a/eo/src/paradisEO/comm/.cvsignore b/eo/src/paradisEO/comm/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/comm/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/comm/Makefile.am b/eo/src/paradisEO/comm/Makefile.am new file mode 100644 index 000000000..62654d8f6 --- /dev/null +++ b/eo/src/paradisEO/comm/Makefile.am @@ -0,0 +1,7 @@ +# Copyright (C) 2004 Jochen Küpper + +SUBDIRS = messages + +pkginclude_HEADERS = eoListener.h eoLocalListener.h + +### Makefile.am ends here diff --git a/eo/src/paradisEO/comm/messages/.cvsignore b/eo/src/paradisEO/comm/messages/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/comm/messages/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/comm/messages/Makefile.am b/eo/src/paradisEO/comm/messages/Makefile.am new file mode 100644 index 000000000..c3caa8865 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/Makefile.am @@ -0,0 +1,8 @@ +# Copyright (C) 2004 Jochen Küpper + +SUBDIRS = from to + +pkginclude_HEADERS = eoMessFrom.h eoMessTo.h + + +### Makefile.am ends here diff --git a/eo/src/paradisEO/comm/messages/from/.cvsignore b/eo/src/paradisEO/comm/messages/from/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/comm/messages/from/Makefile.am b/eo/src/paradisEO/comm/messages/from/Makefile.am new file mode 100644 index 000000000..94a772db9 --- /dev/null +++ b/eo/src/paradisEO/comm/messages/from/Makefile.am @@ -0,0 +1,9 @@ +# Copyright (C) 2004 Jochen Küpper + +pkginclude_HEADERS = eoEOReceiveMessFrom.h \ + eoEOSendMessFrom.h \ + eoHeaderMessFrom.h \ + eoKillMessFrom.h \ + eoPublishMessFrom.h + +### Makefile.am ends here diff --git a/eo/src/paradisEO/comm/messages/to/.cvsignore b/eo/src/paradisEO/comm/messages/to/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/comm/messages/to/Makefile.am b/eo/src/paradisEO/comm/messages/to/Makefile.am new file mode 100644 index 000000000..0a8259bfe --- /dev/null +++ b/eo/src/paradisEO/comm/messages/to/Makefile.am @@ -0,0 +1,9 @@ +# Copyright (C) 2004 Jochen Küpper + +pkginclude_HEADERS = eoEOReceiveMessTo.h \ + eoEOSendMessTo.h \ + eoHeaderMessTo.h \ + eoKillMessTo.h \ + eoPublishMessTo.h + +### Makefile.am ends here diff --git a/eo/src/paradisEO/eval/.cvsignore b/eo/src/paradisEO/eval/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/eval/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/eval/Makefile.am b/eo/src/paradisEO/eval/Makefile.am new file mode 100644 index 000000000..a6947edf0 --- /dev/null +++ b/eo/src/paradisEO/eval/Makefile.am @@ -0,0 +1,9 @@ +# Copyright (C) 2004 Jochen Küpper + +pkginclude_HEADERS = eoDistEvalEasyEA.h \ + eoDistEvalEasyEA.h \ + eoDistPopEvalFunc.h \ + eoEvaluator.h \ + eoPopEval.h + +### Makefile.am ends here diff --git a/eo/src/paradisEO/island/.cvsignore b/eo/src/paradisEO/island/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/island/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/island/Makefile.am b/eo/src/paradisEO/island/Makefile.am new file mode 100644 index 000000000..96c78619a --- /dev/null +++ b/eo/src/paradisEO/island/Makefile.am @@ -0,0 +1,10 @@ +# Copyright (C) 2004 Jochen Küpper + +SUBDIRS = topologies + +pkginclude_HEADERS = eoConnectivity.h \ + eoCyclicGenContinue.h \ + eoIslandsEasyEA.h \ + eoMigUpdater.h + +### Makefile.am ends here diff --git a/eo/src/paradisEO/island/topologies/.cvsignore b/eo/src/paradisEO/island/topologies/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/paradisEO/island/topologies/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/paradisEO/island/topologies/Makefile.am b/eo/src/paradisEO/island/topologies/Makefile.am new file mode 100644 index 000000000..946d9d9cd --- /dev/null +++ b/eo/src/paradisEO/island/topologies/Makefile.am @@ -0,0 +1,6 @@ +# Copyright (C) 2004 Jochen Küpper + +pkginclude_HEADERS = eoFullConnectivity.h\ + eoRingConnectivity.h + +### Makefile.am ends here diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 8dc5d1381..77fbf0800 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -1,8 +1,4 @@ -############################################################################### -## ## Makefile.am for eo/src/utils -## -############################################################################### lib_LIBRARIES = libeoutils.a @@ -15,8 +11,38 @@ libeoutils_a_SOURCES = eoParser.cpp \ eoRealBounds.cpp \ make_help.cpp -pkginclude_HEADERS = checkpointing $(srcdir)/*.h - AM_CXXFLAGS = -I$(top_srcdir)/src -EXTRA_DIST = *.h +pkginclude_HEADERS = checkpointing \ + compatibility.h \ + eoAssembledFitnessStat.h \ + eoCheckPoint.h \ + eoData.h \ + eoDistance.h \ + eoFDCStat.h \ + eoFileMonitor.h \ + eoFileSnapshot.h \ + eoGnuplot.h \ + eoGnuplot1DMonitor.h \ + eoGnuplot1DSnapshot.h \ + eoHowMany.h \ + eoMOFitnessStat.h \ + eoMonitor.h \ + eoParam.h \ + eoParser.h \ + eoPopStat.h \ + eoRNG.h \ + eoRealBounds.h \ + eoRealVectorBounds.h \ + eoRndGenerators.h \ + eoScalarFitnessStat.h \ + eoStat.h \ + eoState.h \ + eoStdoutMonitor.h \ + eoTimeCounter.h \ + eoUniformInit.h \ + eoUpdatable.h \ + eoUpdater.h \ + pipecom.h \ + rnd_generators.h \ + selectors.h From 51471804cde758412dcfad8fdae1cbfdee5ae285 Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 22 Sep 2004 18:18:31 +0000 Subject: [PATCH 1069/2134] fix installation, dist-preparation --- eo/acinclude.m4 | 24 ++++++++++++++++++++++++ eo/app/Makefile.am | 6 +----- eo/app/gprop/Makefile.am | 32 +++++++++++++++----------------- eo/app/gprop/mlp.h | 31 ++++++++++++++++++++++++------- eo/app/gpsymreg/Makefile.am | 6 +----- eo/app/mastermind/Makefile.am | 6 +----- eo/configure.in | 4 ++++ eo/src/Makefile.am | 12 ------------ eo/src/do/Makefile.am | 14 ++++++++++++++ eo/src/es/Makefile.am | 4 +++- eo/src/ga/Makefile.am | 4 ++-- eo/src/gp/Makefile.am | 21 +++++++++------------ eo/src/other/Makefile.am | 16 +++++++--------- eo/tutorial/Lesson1/Makefile.am | 2 +- eo/tutorial/Lesson2/Makefile.am | 2 +- eo/tutorial/Lesson3/Makefile.am | 2 +- eo/tutorial/Lesson4/Makefile.am | 2 +- eo/tutorial/Lesson5/Makefile.am | 2 +- 18 files changed, 110 insertions(+), 80 deletions(-) diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 index 4fc7561fa..f7af62380 100644 --- a/eo/acinclude.m4 +++ b/eo/acinclude.m4 @@ -94,6 +94,7 @@ fi ]) + dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html dnl @@ -111,3 +112,26 @@ if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) fi ]) + + + +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_numeric_limits.html +dnl +AC_DEFUN([AC_CXX_HAVE_NUMERIC_LIMITS], +[AC_CACHE_CHECK(whether the compiler has numeric_limits, +ac_cv_cxx_have_numeric_limits, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[double e = numeric_limits::epsilon(); return 0;], + ac_cv_cxx_have_numeric_limits=yes, ac_cv_cxx_have_numeric_limits=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_numeric_limits" = yes; then + AC_DEFINE(HAVE_NUMERIC_LIMITS,,[define if the compiler has numeric_limits]) +fi +]) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 578f94dce..662248021 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -1,7 +1,3 @@ -############################################################################### -## ## Makefile.am for app dir in eo -## -############################################################################### -SUBDIRS = mastermind gpsymreg +SUBDIRS = mastermind gprop gpsymreg diff --git a/eo/app/gprop/Makefile.am b/eo/app/gprop/Makefile.am index 1a251c80f..b1515ce53 100644 --- a/eo/app/gprop/Makefile.am +++ b/eo/app/gprop/Makefile.am @@ -1,24 +1,22 @@ -############################################################################### -# # Makefile.am for app/gprop -# -############################################################################### -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +noinst_PROGRAMS = gprop -############################################################################### -INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a -CXXFLAGS = -g -############################################################################### +gprop_SOURCES = gprop.cpp -bin_PROGRAMS = gprop -############################################################################### +noinst_HEADERS = gprop.h \ + l2.h \ + mlp.h \ + mse.h \ + qp.h \ + vecop.h -gprop_SOURCES = gprop.cpp -gprop_DEPENDENCIES = $(DEPS) -gprop_LDFLAGS = -lm -gprop_LDADD = $(LDADDS) -############################################################################### +AM_CXXFLAGS = -I$(top_srcdir)/src + +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a + +DEPS = $(LIBEO) $(LIBEOUTILS) +LIBS = $(LIBEO) $(LIBEOUTILS) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index a3d841bd6..b0e7a232d 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -5,10 +5,21 @@ #ifndef mlp_h #define mlp_h -//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif -using namespace std; -#include // MAXFLOAT MINFLOAT +#ifdef HAVE_NUMERIC_LIMITS +#include +#define MLP_MAXFLOAT std::numeric_limits::max() +#define MLP_MINFLOAT std::numeric_limits::min() +#elif defined HAVE_VALUES_H +#include +#define MLP_MAXFLOAT MAXFLOAT +#define MLP_MINFLOAT MINFLOAT +#else +#error numerical limits not available +#endif #include // exp #include // invalid_argument #include // istream ostream @@ -20,7 +31,9 @@ using namespace std; #include #include -//----------------------------------------------------------------------------- + +using namespace std; + namespace mlp { @@ -52,8 +65,8 @@ namespace mlp //--------------------------------------------------------------------------- - const real max_real = MAXFLOAT; - const real min_real = MINFLOAT; + const real max_real = MLP_MAXFLOAT; + const real min_real = MLP_MINFLOAT; //--------------------------------------------------------------------------- @@ -441,7 +454,11 @@ namespace mlp { } // namespace mlp -//----------------------------------------------------------------------------- + + +#undef MLP_MAXFLOAT +#undef MLP_MINFLOAT + #endif // mlp_h diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am index ad9744c5b..d9140fa81 100644 --- a/eo/app/gpsymreg/Makefile.am +++ b/eo/app/gpsymreg/Makefile.am @@ -1,10 +1,6 @@ -############################################################################### -# # Makefile.am for app/gpsymreg -# -############################################################################### -bin_PROGRAMS = gpsymreg +noinst_PROGRAMS = gpsymreg gpsymreg_SOURCES = main.cpp diff --git a/eo/app/mastermind/Makefile.am b/eo/app/mastermind/Makefile.am index fc1f42511..c06298671 100644 --- a/eo/app/mastermind/Makefile.am +++ b/eo/app/mastermind/Makefile.am @@ -1,10 +1,6 @@ -############################################################################### -# # Makefile.am for app/mastermind -# -############################################################################### -bin_PROGRAMS = mastermind +noinst_PROGRAMS = mastermind mastermind_SOURCES = mastermind.cpp diff --git a/eo/configure.in b/eo/configure.in index 6a770c30d..5234233d4 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -32,7 +32,10 @@ AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, true) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(limits.h) +AC_CHECK_HEADERS(values.h) +AC_CXX_HAVE_NUMERIC_LIMITS AC_CXX_HAVE_SSTREAM +AC_CXX_NAMESPACES dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -50,6 +53,7 @@ dnl create makefiles AC_OUTPUT(Makefile \ app/Makefile \ app/mastermind/Makefile \ + app/gprop/Makefile \ app/gpsymreg/Makefile \ contrib/Makefile \ doc/Makefile \ diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 04e71ee2c..b28bb4408 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -119,16 +119,4 @@ pkginclude_HEADERS = eo \ eoVector.h \ es.h \ ga.h \ - do/make_algo_easea.h \ - do/make_algo_pareto.h \ - do/make_algo_scalar.h \ - do/make_checkpoint.h \ - do/make_checkpoint_FDC.h \ - do/make_checkpoint_assembled.h \ - do/make_checkpoint_pareto.h \ - do/make_continue.h \ - do/make_continue_pareto.h \ - do/make_general_replacement.h \ - do/make_pop.h \ - do/make_run.h \ $(PARADISEO_H) diff --git a/eo/src/do/Makefile.am b/eo/src/do/Makefile.am index ca6877ec1..3ec747297 100644 --- a/eo/src/do/Makefile.am +++ b/eo/src/do/Makefile.am @@ -1 +1,15 @@ +pkginclude_HEADERS = make_algo_easea.h \ + make_algo_pareto.h \ + make_algo_scalar.h \ + make_checkpoint.h \ + make_checkpoint_FDC.h \ + make_checkpoint_assembled.h \ + make_checkpoint_pareto.h \ + make_continue.h \ + make_continue_pareto.h \ + make_general_replacement.h \ + make_pop.h \ + make_run.h + + EXTRA_DIST = Readme diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am index c9faaaa78..2fc5ecb06 100644 --- a/eo/src/es/Makefile.am +++ b/eo/src/es/Makefile.am @@ -17,7 +17,9 @@ libes_a_SOURCES = make_algo_scalar_es.cpp \ make_run_es.cpp \ make_run_real.cpp -pkginclude_HEADERS = eoEsChromInit.h \ +esincludedir = $(pkgincludedir)/es + +esinclude_HEADERS = eoEsChromInit.h \ eoEsFull.h \ eoEsGlobalXover.h \ eoEsMutate.h \ diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am index 1c6959c00..6429011eb 100644 --- a/eo/src/ga/Makefile.am +++ b/eo/src/ga/Makefile.am @@ -16,9 +16,9 @@ libga_a_SOURCES = make_algo_scalar_ga.cpp \ make_pop_ga.cpp \ make_run_ga.cpp -libeoincdir = $(includedir)/eo/ga +gaincludedir = $(pkgincludedir)/ga -libeoinc_HEADERS = eoBit.h \ +gainclude_HEADERS = eoBit.h \ eoBitOpFactory.h \ eoBitOp.h \ eoBoolFlip.h \ diff --git a/eo/src/gp/Makefile.am b/eo/src/gp/Makefile.am index 2de158c3a..9ebcdd237 100644 --- a/eo/src/gp/Makefile.am +++ b/eo/src/gp/Makefile.am @@ -1,14 +1,11 @@ -############################################################################### -## ## Makefile.am for eo/src/gp -## -############################################################################### -libeoincdir = $(includedir)/eo/gp -libeoinc_HEADERS = eoParseTreeDepthInit.h \ - eoParseTree.h \ - eoParseTreeOp.h \ - eoStParseTreeDepthInit.h \ - eoStParseTreeOp.h \ - node_pool.h \ - parse_tree.h +gpincludedir = $(pkgincludedir)/gp + +gpinclude_HEADERS = eoParseTreeDepthInit.h \ + eoParseTree.h \ + eoParseTreeOp.h \ + eoStParseTreeDepthInit.h \ + eoStParseTreeOp.h \ + node_pool.h \ + parse_tree.h diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am index 674f52d98..074966a36 100644 --- a/eo/src/other/Makefile.am +++ b/eo/src/other/Makefile.am @@ -1,13 +1,11 @@ -############################################################################### -## ## Makefile.am for eo/src/other -## -############################################################################### -INCLUDES = -I$(top_builddir)/src -#lib_LIBRARIES = libeoother.a -#libeoother_a_SOURCES = +AM_CXXFLAGS = -I$(top_builddir)/src -libeootherincdir = $(includedir)/eo/other -libeootherinc_HEADERS = eoExternalEO.h eoString.h external_eo eoExternalOpFunctions.h +otherincludedir = $(pkgincludedir)/other + +otherinclude_HEADERS = eoExternalEO.h \ + eoString.h \ + external_eo \ + eoExternalOpFunctions.h diff --git a/eo/tutorial/Lesson1/Makefile.am b/eo/tutorial/Lesson1/Makefile.am index fca2f1828..d74f07337 100644 --- a/eo/tutorial/Lesson1/Makefile.am +++ b/eo/tutorial/Lesson1/Makefile.am @@ -1,5 +1,5 @@ -bin_PROGRAMS = FirstBitGA FirstRealGA exercise1.3 +noinst_PROGRAMS = FirstBitGA FirstRealGA exercise1.3 FirstBitGA_SOURCES = FirstBitGA.cpp diff --git a/eo/tutorial/Lesson2/Makefile.am b/eo/tutorial/Lesson2/Makefile.am index 91294fc7d..8deb738c0 100644 --- a/eo/tutorial/Lesson2/Makefile.am +++ b/eo/tutorial/Lesson2/Makefile.am @@ -1,5 +1,5 @@ -bin_PROGRAMS = FirstBitEA FirstRealEA exercise2.3 +noinst_PROGRAMS = FirstBitEA FirstRealEA exercise2.3 FirstBitEA_SOURCES = FirstBitEA.cpp diff --git a/eo/tutorial/Lesson3/Makefile.am b/eo/tutorial/Lesson3/Makefile.am index 5e942ca56..2d6a0ea17 100644 --- a/eo/tutorial/Lesson3/Makefile.am +++ b/eo/tutorial/Lesson3/Makefile.am @@ -1,5 +1,5 @@ -bin_PROGRAMS = SecondBitEA SecondRealEA exercise3.1 +noinst_PROGRAMS = SecondBitEA SecondRealEA exercise3.1 SecondBitEA_SOURCES = SecondBitEA.cpp diff --git a/eo/tutorial/Lesson4/Makefile.am b/eo/tutorial/Lesson4/Makefile.am index 6c55fcfea..97a2b80c5 100644 --- a/eo/tutorial/Lesson4/Makefile.am +++ b/eo/tutorial/Lesson4/Makefile.am @@ -1,5 +1,5 @@ -bin_PROGRAMS = BitEA RealEA ESEA +noinst_PROGRAMS = BitEA RealEA ESEA BitEA_SOURCES = BitEA.cpp diff --git a/eo/tutorial/Lesson5/Makefile.am b/eo/tutorial/Lesson5/Makefile.am index 6fd9f2fa1..65027f15a 100644 --- a/eo/tutorial/Lesson5/Makefile.am +++ b/eo/tutorial/Lesson5/Makefile.am @@ -1,5 +1,5 @@ -bin_PROGRAMS = OneMaxEA OneMaxLibEA +noinst_PROGRAMS = OneMaxEA OneMaxLibEA OneMaxEA_SOURCES = OneMaxEA.cpp From 503efdcdb6b4b344ae1027ea9ff42a50eb2148f1 Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 22 Sep 2004 18:38:12 +0000 Subject: [PATCH 1070/2134] Removed clean-local due to problems with "make distcheck" --- eo/tutorial/Lesson3/Makefile.am | 4 ---- eo/tutorial/Lesson4/Makefile.am | 4 ---- 2 files changed, 8 deletions(-) diff --git a/eo/tutorial/Lesson3/Makefile.am b/eo/tutorial/Lesson3/Makefile.am index 2d6a0ea17..50f53cd8b 100644 --- a/eo/tutorial/Lesson3/Makefile.am +++ b/eo/tutorial/Lesson3/Makefile.am @@ -20,7 +20,3 @@ LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/u LIBS = -lga -leoutils -leo INCLUDES = -I$(top_srcdir)/src - - -clean-local: - @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson4/Makefile.am b/eo/tutorial/Lesson4/Makefile.am index 97a2b80c5..168b4a42b 100644 --- a/eo/tutorial/Lesson4/Makefile.am +++ b/eo/tutorial/Lesson4/Makefile.am @@ -21,7 +21,3 @@ LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/es \ LIBS = -lga -les -leoutils -leo INCLUDES = -I$(top_srcdir)/src - - -clean-local: - @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ From fa108bbd6bd9c342c62e1086249277f62be7019d Mon Sep 17 00:00:00 2001 From: kuepper Date: Fri, 24 Sep 2004 11:55:09 +0000 Subject: [PATCH 1071/2134] minor fixes --- eo/configure.in | 2 +- eo/test/Makefile.am | 32 +++++++++++++++++++++++++++++--- eo/test/t-MGE1bit.cpp | 14 +++++++------- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 5234233d4..6569c2b81 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -13,7 +13,7 @@ AC_CANONICAL_TARGET dnl automake initialization AM_INIT_AUTOMAKE([gnu dist-bzip2]) -AM_CONFIG_HEADER([config.h]) +AM_CONFIG_HEADER(config.h) dnl user-switches AC_APPLICATIONS diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index b662839cf..94fcee7bb 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -10,7 +10,33 @@ LIBES = $(top_builddir)/src/es/libes.a LIBGA = $(top_builddir)/src/ga/libga.a # PLEASE don't break the line (see create_batch.sh) -check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette t-eoSharing +check_PROGRAMS = t-eoParetoFitness \ + t-eoPareto \ + t-eofitness \ + t-eoRandom \ + t-eobin \ + t-eoVirus \ + t-MGE \ + t-MGE1bit \ + t-MGE-control \ + t-eoStateAndParser \ + t-eoCheckpointing \ + t-eoSSGA \ + t-eoExternalEO \ + t-eoSymreg \ + t-eo \ + t-eoReplacement \ + t-eoSelect \ + t-eoGenOp \ + t-eoGA \ + t-eoReal \ + t-eoVector \ + t-eoESAll \ + t-eoPBIL \ + t-eoFitnessAssembled \ + t-eoFitnessAssembledEA \ + t-eoRoulette \ + t-eoSharing TESTS = $(check_PROGRAMS) \ @@ -19,7 +45,7 @@ TESTS = $(check_PROGRAMS) \ noinst_HEADERS = binary_value.h real_value.h RoyalRoad.h -AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src +AM_CXXFLAGS = -I$(top_srcdir)/src DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) LIBS = $(DEPS) @@ -27,7 +53,7 @@ CLEANFILES = monitor.csv t-eoRandom.out EXTRA_DIST = run_tests # extra flags for specific targets -t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib +t_eoVirus_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir)/contrib # Specify source-files, # otherwise automake/make looks for C sources diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp index c4e68d052..3e1da98ac 100644 --- a/eo/test/t-MGE1bit.cpp +++ b/eo/test/t-MGE1bit.cpp @@ -80,18 +80,18 @@ int main() checkpoint.add(stats); // GA generation - eoEasyEA ea(checkpoint, eval, breeder, replace ); + eoEasyEA ea(checkpoint, eval, breeder, replace); // evolution try - { + { ea(pop); - } + } catch (std::exception& e) - { - std::cout << "exception: " << e.what() << std::endl;; - exit(EXIT_FAILURE); - } + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } std::cout << "pop" << std::endl; for (i = 0; i < pop.size(); ++i) From c5a9348dd999fac5e19a9b9166460a89fd561ad2 Mon Sep 17 00:00:00 2001 From: kuepper Date: Fri, 24 Sep 2004 15:00:48 +0000 Subject: [PATCH 1072/2134] Fix doc-target. Fix inclusion of documentation in dist. --- eo/Makefile.am | 7 +++++-- eo/doc/Makefile.am | 14 +++----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 925bbf890..034808a6f 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -19,7 +19,10 @@ IDXDIR = ~/index dist-hook: - $(MAKE) doc + $(MAKE) documentation + cp -p -r $(srcdir)/doc/html $(srcdir)/doc/latex $(srcdir)/doc/man $(distdir)/doc/ -doc: $(srcdir)/doc/eo.cfg +documentation: cd doc && $(MAKE) doc && cd .. + +doc: documentation diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index 0bcba7a27..1d82cf01c 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -1,18 +1,10 @@ -############################################################################### -## ## Makefile.am for eo/doc -## -############################################################################### -EXTRA_DIST = eo.cfg foot.html \ - $(srcdir)/html/* \ - $(srcdir)/latex/* \ - $(srcdir)/man/* - +EXTRA_DIST = eo.cfg foot.html doc: - cd $(srcdir) && $(DOXYGEN) eo.cfg && touch eo.cfg + cd $(srcdir) && $(DOXYGEN) eo.cfg clean-local: - cd $(srcdir) && rm -rf html latex man && touch eo.cfg + cd $(srcdir) && rm -rf html latex man From 6584747d3cccd7c9250f64ecfc80ab46a6914235 Mon Sep 17 00:00:00 2001 From: okoenig Date: Sun, 26 Sep 2004 09:45:59 +0000 Subject: [PATCH 1073/2134] Removing a "/" at the end of a comment --- eo/app/mastermind/mastermind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/app/mastermind/mastermind.cpp b/eo/app/mastermind/mastermind.cpp index 40f137778..7a971efe8 100644 --- a/eo/app/mastermind/mastermind.cpp +++ b/eo/app/mastermind/mastermind.cpp @@ -7,7 +7,7 @@ #include // cerr cout #include // ifstream #include // string -#include // all usefull eo stuff\ +#include // all usefull eo stuff #include "mastermind.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator From eac4f15bf0466445ca566cb5a071606b08d8f5ac Mon Sep 17 00:00:00 2001 From: okoenig Date: Sun, 26 Sep 2004 09:47:06 +0000 Subject: [PATCH 1074/2134] Replaced top_builddir with top_srcdir --- eo/app/gpsymreg/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am index d9140fa81..b129dcbdc 100644 --- a/eo/app/gpsymreg/Makefile.am +++ b/eo/app/gpsymreg/Makefile.am @@ -10,7 +10,6 @@ noinst_HEADERS = fitness.h node.h parameters.h LIBEO = $(top_builddir)/src/libeo.a LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -AM_CXXFLAGS = -I$(top_builddir)/src +AM_CXXFLAGS = -I$(top_srcdir)/src DEPS = $(LIBEOUTILS) $(LIBEO) LIBS = $(LIBEOUTILS) $(LIBEO) - From db44c94c9c746ef15a494e0c3a8f74a252006606 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 27 Sep 2004 13:31:40 +0000 Subject: [PATCH 1075/2134] Added the class eoNormalVecMutation (yes, should have made another file :-( --- eo/src/es/eoNormalMutation.h | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index cb4ef5514..3b9b48886 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -36,6 +36,74 @@ #include //----------------------------------------------------------------------------- +/** Simple normal mutation of a std::vector of real values. + * The stDev is fixed - but it is passed ans stored as a reference, + * to enable dynamic mutations (see eoOenFithMutation below). + * + * As for the bounds, the values are here folded back into the bounds. + * The other possiblity would be to iterate until we fall inside the bounds - + * but this sometimes takes a long time!!! + */ + +template class eoNormalVecMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoNormalVecMutation(double _sigma, const double& _p_change = 1.0): + sigma(_sigma), bounds(eoDummyVectorNoBounds), p_change(_p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + * + * for each component, the sigma is scaled to the range of the bound, if bounded + */ + eoNormalVecMutation(eoRealVectorBounds & _bounds, + double _sigma, const double& _p_change = 1.0): + sigma(_bounds.size(), _sigma), bounds(_bounds), p_change(_p_change) + { + // scale to the range - if any + for (unsigned i=0; i sigma; + eoRealVectorBounds & bounds; + double p_change; +}; + /** Simple normal mutation of a std::vector of real values. * The stDev is fixed - but it is passed ans stored as a reference, * to enable dynamic mutations (see eoOenFithMutation below). From a0c7412c188b0bb70e147c7a027b964392e110a8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 27 Sep 2004 13:34:34 +0000 Subject: [PATCH 1076/2134] Replaced the eoNormalMutation (mutating ALL variables of a real-valued vector) with eiNormalVecMutation that has a proba. to mutation each variable --- eo/src/es/make_op_real.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 80fc42e4c..111388217 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -180,6 +180,8 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoValueParam & sigmaParam = _parser.createParam(0.3, "sigma", "Sigma (fixed) for Gaussian mutation", 's', "Variation Operators" ); + eoValueParam & pNormalParam = _parser.createParam(1.0, "pNormal", "Proba. to change each variable for Gaussian mutation", 's', "Variation Operators" ); + // minimum check bool bMut = true; if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) @@ -209,7 +211,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); // mutate all component using Gaussian mutation - ptMon = new eoNormalMutation(boundsParam.value(), sigmaParam.value()); + ptMon = new eoNormalVecMutation(boundsParam.value(), sigmaParam.value(), pNormalParam.value()); _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); _state.storeFunctor(ptCombinedMonOp); From 76e78116ac0d20ff4152e7bb4fd3a468074af0eb Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 27 Sep 2004 15:19:53 +0000 Subject: [PATCH 1077/2134] Added include eoDistance.h --- eo/src/do/make_algo_scalar.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 975f9f6ee..ee7540c25 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -39,7 +39,11 @@ #include #include #include +<<<<<<< make_algo_scalar.h +#include +======= #include +>>>>>>> 1.13 // Breeders #include From 9786fe0a6a270d0ce16ac4c4e6068d48ff042aad Mon Sep 17 00:00:00 2001 From: kuepper Date: Tue, 28 Sep 2004 17:13:34 +0000 Subject: [PATCH 1078/2134] Fix cvs-commit error (<<< still there...) --- eo/src/do/make_algo_scalar.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index ee7540c25..7dfebe3a0 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -39,11 +39,8 @@ #include #include #include -<<<<<<< make_algo_scalar.h -#include -======= #include ->>>>>>> 1.13 +#include // Breeders #include From 73c97e6bfa1bfb7a96e7e91f1b5f6778fc91df8e Mon Sep 17 00:00:00 2001 From: kuepper Date: Wed, 29 Sep 2004 18:37:20 +0000 Subject: [PATCH 1079/2134] update for sstream --- eo/Makefile.am | 2 +- eo/Tutorial/.cvsignore | 1 + eo/app/gprop/gprop.h | 2 +- eo/src/do/make_checkpoint_pareto.h | 68 ++++++++++++++++++++++-------- eo/test/t-eoParetoFitness.cpp | 5 ++- 5 files changed, 56 insertions(+), 22 deletions(-) create mode 100644 eo/Tutorial/.cvsignore diff --git a/eo/Makefile.am b/eo/Makefile.am index 034808a6f..5a1ea9277 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -8,7 +8,7 @@ if USE_TUTORIAL SUBDIRS_TUT = tutorial endif -SUBDIRS = src test doc contrib win $(SUBDIRS_APP) $(SUBDIRS_TUT) +SUBDIRS = src doc contrib win $(SUBDIRS_APP) $(SUBDIRS_TUT) test # Directory for documents diff --git a/eo/Tutorial/.cvsignore b/eo/Tutorial/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/Tutorial/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 7c96b14cf..60e3bce6a 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -204,7 +204,7 @@ int correct(const mlp::net& net, const mlp::set& set) for (mlp::set::const_iterator s = set.begin(); s != set.end(); ++s) { - int partial = 0; + unsigned partial = 0; for (unsigned i = 0; i < s->output.size(); ++i) if (s->output[i] < 0.5 && net(s->input)[i] < 0.5 || diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h index 37ab768f1..d14d40da3 100644 --- a/eo/src/do/make_checkpoint_pareto.h +++ b/eo/src/do/make_checkpoint_pareto.h @@ -27,13 +27,22 @@ #ifndef _make_checkpoint_pareto_h #define _make_checkpoint_pareto_h -#include +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif -#include "eoParetoFitness.h" -#include "utils/selectors.h" #include "EO.h" +#include "eoParetoFitness.h" #include "eoEvalFuncCounter.h" #include "utils/checkpointing" +#include "utils/selectors.h" // at the moment, in utils/make_help.cpp // this should become some eoUtils.cpp with corresponding eoUtils.h @@ -83,10 +92,17 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, * eoSortedPopStat : whole population - type std::string (!!) */ - eoValueParam& fPlotParam = _parser.createParam(eoParamParamType("1(0,1)"), "frontFileFrequency", "File save frequency in objective spaces (std::pairs of comma-separated objectives in 1 single parentheses std::pair)", '\0', "Output - Disk"); + eoValueParam& fPlotParam = _parser.createParam( + eoParamParamType("1(0,1)"), "frontFileFrequency", + "File save frequency in objective spaces (std::pairs of comma-separated objectives " \ + "in 1 single parentheses std::pair)", + '\0', "Output - Disk"); #if !defined(NO_GNUPLOT) - bool boolGnuplot = _parser.createParam(false, "plotFront", "Objective plots (requires corresponding files - see frontFileFrequency", '\0', "Output - Graphical").value(); + bool boolGnuplot = _parser.createParam(false, "plotFront", + "Objective plots (requires corresponding files " \ + "- see frontFileFrequency", + '\0', "Output - Graphical").value(); #endif eoParamParamType & fPlot = fPlotParam.value(); // std::pair > @@ -107,36 +123,52 @@ eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, unsigned obj1 = atoi(fPlot.second[i].c_str()); unsigned obj2 = atoi(fPlot.second[i+1].c_str()); eoMOFitnessStat* fStat; - if (!bStat[obj1]) // not already there: create it - { + if (!bStat[obj1]) { // not already there: create it +#ifdef HAVE_SSTREAM + std::ostringstream os; + os << "Obj. " << obj1 << std::ends; + fStat = new eoMOFitnessStat(obj1, os.str().c_str()); +#else char s[1024]; std::ostrstream os(s, 1022); os << "Obj. " << obj1 << std::ends; fStat = new eoMOFitnessStat(obj1, s); +#endif _state.storeFunctor(fStat); bStat[obj1]=true; theStats[obj1]=fStat; checkpoint.add(*fStat); - } - if (!bStat[obj2]) // not already there: create it - { - char s2[1024]; - std::ostrstream os2(s2, 1022); - os2 << "Obj. " << obj2 << std::ends; - fStat = new eoMOFitnessStat(obj2, s2); + } + if (!bStat[obj2]) { // not already there: create it +#ifdef HAVE_SSTREAM + std::ostringstream os; + os << "Obj. " << obj2 << std::ends; + fStat = new eoMOFitnessStat(obj2, os.str().c_str()); +#else + char s[1024]; + std::ostrstream os2(s, 1022); + os << "Obj. " << obj2 << std::ends; + fStat = new eoMOFitnessStat(obj, s); +#endif _state.storeFunctor(fStat); bStat[obj2]=true; theStats[obj2]=fStat; checkpoint.add(*fStat); - } + } // then the fileSnapshots +#ifdef HAVE_SSTREAM + std::ostringstream os; + os << "Front." << obj1 << "." << obj2 << "." << std::ends; + eoFileSnapshot& snapshot = _state.storeFunctor( + new eoFileSnapshot(dirName, frequency, os.str().c_str())); +#else char s3[1024]; std::ostrstream os3(s3, 1022); os3 << "Front." << obj1 << "." << obj2 << "." << std::ends; - eoFileSnapshot & snapshot = _state.storeFunctor(new - eoFileSnapshot(dirName, frequency, s3 ) ); - + eoFileSnapshot & snapshot = _state.storeFunctor( + new eoFileSnapshot(dirName, frequency, s3 ) ); +#endif checkpoint.add(snapshot); snapshot.add(*theStats[obj1]); diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp index 1adcb1702..bd5d0d2bd 100644 --- a/eo/test/t-eoParetoFitness.cpp +++ b/eo/test/t-eoParetoFitness.cpp @@ -24,9 +24,11 @@ */ //----------------------------------------------------------------------------- +#include #include + #include "eoParetoFitness.h" -#include + using namespace std; /** test program for Pareto Fitness */ @@ -192,4 +194,3 @@ int main() } } - From ebedf7ca7d2fc3ca3f449598c054492e23e0c222 Mon Sep 17 00:00:00 2001 From: kuepper Date: Thu, 7 Oct 2004 13:34:08 +0000 Subject: [PATCH 1080/2134] wrong directory --- eo/Tutorial/.cvsignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 eo/Tutorial/.cvsignore diff --git a/eo/Tutorial/.cvsignore b/eo/Tutorial/.cvsignore deleted file mode 100644 index 70845e08e..000000000 --- a/eo/Tutorial/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in From 795ca38589add25eee73d66cd8bcd069c12c009b Mon Sep 17 00:00:00 2001 From: kuepper Date: Thu, 7 Oct 2004 13:36:43 +0000 Subject: [PATCH 1081/2134] were these lost? --- eo/Tutorial/.cvsignore | 1 + eo/Tutorial/Makefile.am | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 eo/Tutorial/.cvsignore create mode 100644 eo/Tutorial/Makefile.am diff --git a/eo/Tutorial/.cvsignore b/eo/Tutorial/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/Tutorial/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/Tutorial/Makefile.am b/eo/Tutorial/Makefile.am new file mode 100644 index 000000000..61d590ddb --- /dev/null +++ b/eo/Tutorial/Makefile.am @@ -0,0 +1,5 @@ +if USE_PARADISEO +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 ParadisEO +else +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 +endif From 50b395d16dcb5897dc299736ae36b9620d49d89d Mon Sep 17 00:00:00 2001 From: kuepper Date: Thu, 7 Oct 2004 14:32:54 +0000 Subject: [PATCH 1082/2134] fix install dir --- eo/src/utils/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 77fbf0800..5767df46c 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -13,7 +13,9 @@ libeoutils_a_SOURCES = eoParser.cpp \ AM_CXXFLAGS = -I$(top_srcdir)/src -pkginclude_HEADERS = checkpointing \ +utilsincludedir = $(pkgincludedir)/utils + +utilsinclude_HEADERS = checkpointing \ compatibility.h \ eoAssembledFitnessStat.h \ eoCheckPoint.h \ From 7a695e65df500b41b90c8a1e2b391b688265660e Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Nov 2004 08:55:12 +0000 Subject: [PATCH 1083/2134] Added classes to hendle bounds: - eoGeneralRealBound that can be initialized using a string (and hence can be easily read as a parameter) - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h Note that there is no equivalent to eoRealVectorBounds for vector of integers --- eo/src/utils/Makefile.am | 2 + eo/src/utils/eoIntBounds.cpp | 99 +++++ eo/src/utils/eoIntBounds.h | 689 ++++++++++++++++++++++++++++++++++ eo/src/utils/eoRealBounds.cpp | 82 +++- eo/src/utils/eoRealBounds.h | 268 ++++++++++--- 5 files changed, 1078 insertions(+), 62 deletions(-) create mode 100644 eo/src/utils/eoIntBounds.cpp create mode 100644 eo/src/utils/eoIntBounds.h diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 5767df46c..5c041cb7d 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -9,6 +9,7 @@ libeoutils_a_SOURCES = eoParser.cpp \ eoFileMonitor.cpp \ eoStdoutMonitor.cpp \ eoRealBounds.cpp \ + eoIntBounds.cpp \ make_help.cpp AM_CXXFLAGS = -I$(top_srcdir)/src @@ -35,6 +36,7 @@ utilsinclude_HEADERS = checkpointing \ eoPopStat.h \ eoRNG.h \ eoRealBounds.h \ + eoIntBounds.h \ eoRealVectorBounds.h \ eoRndGenerators.h \ eoScalarFitnessStat.h \ diff --git a/eo/src/utils/eoIntBounds.cpp b/eo/src/utils/eoIntBounds.cpp new file mode 100644 index 000000000..924efe292 --- /dev/null +++ b/eo/src/utils/eoIntBounds.cpp @@ -0,0 +1,99 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include + +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif + +#include "eoIntBounds.h" + + +// the global dummy bounds +// (used for unbounded variables when bounds are required) +eoIntNoBounds eoDummyIntNoBounds; + +///////////// helper read functions defined in eoRealBounds.cpp +extern bool remove_leading(std::string & _s, const std::string _delim); +extern double read_double(std::string _s); +extern long int read_int(std::string _s); + + +/** the constructor for eoGeneralIntBound - from a string + */ +eoIntBounds* eoGeneralIntBounds::getBoundsFromString(std::string _value) +{ + // now read + std::string delim(",; "); + std::string beginOrClose("[(])"); + if (!remove_leading(_value, delim)) // only delimiters were left + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + // look for opening char + size_t posDeb = _value.find_first_of(beginOrClose); // allow ]a,b] + if (posDeb >= _value.size()) // nothing left to read + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + // ending char: next {}() after posDeb + size_t posFin = _value.find_first_of(beginOrClose,posDeb+1); + if (posFin >= _value.size()) // not found + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + // the bounds + std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + // and remove from original string + _value = _value.substr(posFin+1); + + remove_leading(sBounds, delim); + size_t posDelim = sBounds.find_first_of(delim); + if (posDelim >= sBounds.size()) + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + bool minBounded=false, maxBounded=false; + long int minBound=0, maxBound=0; + + // min bound + std::string sMinBounds = sBounds.substr(0,posDelim); + + if ( (sMinBounds != std::string("-inf")) && + (sMinBounds != std::string("-infinity")) + ) + { + minBounded = true; + minBound = read_int(sMinBounds); + } + + // max bound + size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); + + std::string sMaxBounds = sBounds.substr(posEndDelim); + + if ( (sMaxBounds != std::string("+inf")) && + (sMaxBounds != std::string("+infinity")) + ) + { + maxBounded = true; + maxBound = read_int(sMaxBounds); + } + + // now create the embedded eoIntBounds object + eoIntBounds * locBound; + if (minBounded && maxBounded) + { + if (maxBound <= minBound) + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + locBound = new eoIntInterval(minBound, maxBound); + } + else if (!minBounded && !maxBounded) // no bound at all + locBound = new eoIntNoBounds; + else if (!minBounded && maxBounded) + locBound = new eoIntAboveBound(maxBound); + else if (minBounded && !maxBounded) + locBound = new eoIntBelowBound(minBound); + return locBound; +} diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h new file mode 100644 index 000000000..a38253b4d --- /dev/null +++ b/eo/src/utils/eoIntBounds.h @@ -0,0 +1,689 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoIntBounds.h +// (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoIntBounds_h +#define _eoIntBounds_h + +#include // std::exceptions! +#include + +/** +\defgroup EvolutionStrategies + +*/ + + +/** +\class eoIntBounds eoIntBounds.h es/eoIntBounds.h +\ingroup EvolutionStrategies + + Defines bound classes for real numbers. + +Scalar type: +------------ +Basic class is eoIntBounds, a pure virtual. + +The following pure virtual methods are to be used in mutations: +- void foldsInBounds(long int &) that folds any value that falls out of + the bounds back into the bounds, by bouncing on the limit (if any) +- bool isInBounds(long int) that simply says whether or not the argument + is in the bounds +- void truncate(long int &) that set the argument to the bound value it +it exceeds it + +So mutation can choose +- iterate trying until they fall in bounds, +- only try once and "restd::pair" by using the foldsInBounds method +- only try once and restd::pair using the truncate method (will create a + huge bias toward the bound if the soluiton is not far from the bounds) + +There is also a uniform() method that generates a uniform value +(if possible, i.e. if bounded) in the interval. + +Derived class are +eoIntInterval that holds a minimum and maximum value, +eoIntNoBounds the "unbounded bounds" (-infinity, +infinity) +eoIntBelowBound the half-bounded interval [min, +infinity) +eoIntAboveBound the half-bounded interval (-infinity, max] + +THis file also contains the declaration of *the* global object that +is the unbounded bound +*/ +class eoIntBounds : public eoPersistent +{ +public: + virtual ~eoIntBounds(){} + + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const = 0; + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const = 0; + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const = 0; + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const = 0; + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double) const = 0; + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double &) const = 0; + + /** foldsInBounds for ints: + * call the method for double and convert back */ + virtual void foldsInBounds(long int & i) const + { + double r = double(i); + foldsInBounds(r); + i = (long int)(r); + } + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double &) const = 0; + + /** truncate for ints: call the method for double and convert back + */ + virtual void truncate(long int & i) const + { + double r = double(i); + truncate(r); + i = (long int)(r); + } + + /** get minimum value + * @std::exception if does not exist + */ + virtual long int minimum() const = 0 ; + /** get maximum value + * @std::exception if does not exist + */ + virtual long int maximum() const = 0 ; + /** get range + * @std::exception if unbounded + */ + virtual long int range() const = 0; + + /** random generator of uniform numbers in bounds + * uses same naming convention than eo::rng + * @std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const = 0; + virtual long int random(eoRng & _rng = eo::rng) const = 0; + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const = 0; +}; + +/** A default class for unbounded variables + */ +class eoIntNoBounds : public eoIntBounds +{ +public: + virtual ~eoIntNoBounds(){} + + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return true;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return false;} + virtual void foldsInBounds(double &) const {return;} + virtual void truncate(double &) const {return;} + virtual bool isInBounds(double) const {return true;} + + virtual long int minimum() const + { + throw std::logic_error("Trying to get minimum of unbounded eoIntBounds"); + } + virtual long int maximum() const + { + throw std::logic_error("Trying to get maximum of unbounded eoIntBounds"); + } + virtual long int range() const + { + throw std::logic_error("Trying to get range of unbounded eoIntBounds"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + throw std::logic_error("Trying to generate uniform values in unbounded eoIntBounds"); + } + virtual long int random(eoRng & _rng = eo::rng) const + { + throw std::logic_error("Trying to generate uniform values in unbounded eoIntBounds"); + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + throw std::runtime_error("Should not use eoIntBounds::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[-inf,+inf]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntNoBounds(*this); + } + +}; + +// one object for all - see eoIntBounds.cpp +extern eoIntNoBounds eoDummyIntNoBounds; + +/** + * fully bounded eoIntBound == interval + */ +class eoIntInterval : public eoIntBounds +{ +public : + virtual ~eoIntInterval(){} + + /** + Simple bounds = minimum and maximum (allowed) + */ + eoIntInterval(long int _min=0, long int _max=1) : + repMinimum(_min), repMaximum(_max), repRange(_max-_min) + { + if (repRange<=0) + throw std::logic_error("Void range in eoIntBounds"); + } + + // accessors + virtual long int minimum() const { return repMinimum; } + virtual long int maximum() const { return repMaximum; } + virtual long int range() const { return repRange; } + + // description + virtual bool isBounded(void) const {return true;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return true;} + + virtual double uniform(eoRng & _rng = eo::rng) const + { + return repMinimum + _rng.uniform(repRange); + } + + virtual long int random(eoRng & _rng = eo::rng) const + { + return repMinimum + _rng.random(repRange); + } + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r < repMinimum) + return false; + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + long iloc; + double dlargloc = 2 * range() ; + + if (fabs(_r) > 1.0E9) // iloc too large! + { + _r = uniform(); + return; + } + + if ( (_r > maximum()) ) + { + iloc = (long) ( (_r-minimum()) / dlargloc ) ; + _r -= dlargloc * iloc ; + if ( _r > maximum() ) + _r = 2*maximum() - _r ; + } + + if (_r < minimum()) + { + iloc = (long) ( (maximum()-_r) / dlargloc ) ; + _r += dlargloc * iloc ; + if (_r < minimum()) + _r = 2*minimum() - _r ; + } + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r < repMinimum) + _r = repMinimum; + else if (_r > repMaximum) + _r = repMaximum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + throw std::runtime_error("Should not use eoIntInterval::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[" << repMinimum << "," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntInterval(*this); + } + +private : + long int repMinimum; + long int repMaximum; + long int repRange; // to minimize operations ??? +}; + +/** + * an eoIntBound bounded from below only + */ +class eoIntBelowBound : public eoIntBounds +{ +public : + virtual ~eoIntBelowBound(){} + /** + Simple bounds = minimum + */ + eoIntBelowBound(long int _min=0) : + repMinimum(_min) + {} + + // accessors + virtual long int minimum() const { return repMinimum; } + + virtual long int maximum() const + { + throw std::logic_error("Trying to get maximum of eoIntBelowBound"); + } + virtual long int range() const + { + throw std::logic_error("Trying to get range of eoIntBelowBound"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + throw std::logic_error("Trying to generate uniform values in eoIntBelowBound"); + } + virtual long int random(eoRng & _rng = eo::rng) const + { + throw std::logic_error("Trying to generate uniform values in eoIntBelowBound"); + } + + // description + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return false;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r < repMinimum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + // easy as a pie: symmetry w.r.t. minimum + if (_r < repMinimum) // nothing to do otherwise + _r = 2*repMinimum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r < repMinimum) + _r = repMinimum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + throw std::runtime_error("Should not use eoIntBelowBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[" << repMinimum << ",+inf]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntBelowBound(*this); + } + +private : + long int repMinimum; +}; + +/** +An eoIntBound bounded from above only +*/ +class eoIntAboveBound : public eoIntBounds +{ +public : + virtual ~eoIntAboveBound(){} + + /** + Simple bounds = minimum + */ + eoIntAboveBound(long int _max=0) : + repMaximum(_max) + {} + + // accessors + virtual long int maximum() const { return repMaximum; } + + virtual long int minimum() const + { + throw std::logic_error("Trying to get minimum of eoIntAboveBound"); + } + virtual long int range() const + { + throw std::logic_error("Trying to get range of eoIntAboveBound"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + throw std::logic_error("Trying to generate uniform values in eoIntAboveBound"); + } + virtual long int random(eoRng & _rng = eo::rng) const + { + throw std::logic_error("Trying to generate uniform values in eoIntAboveBound"); + } + + // description + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return true;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + // easy as a pie: symmetry w.r.t. maximum + if (_r > repMaximum) // nothing to do otherwise + _r = 2*repMaximum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r > repMaximum) + _r = repMaximum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + throw std::runtime_error("Should not use eoIntAboveBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[-inf," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntAboveBound(*this); + } + +private : + long int repMaximum; +}; + +//////////////////////// tentative for a general BOUND class that is constructed from a string + +class eoGeneralIntBounds : public eoIntBounds +{ +public: + /** Ctor: from a string, chooses the type of bound */ + eoGeneralIntBounds(std::string _s) + { + repBound = getBoundsFromString(_s); + } + + /** Need a Cpy Ctor because we are allocating memory */ + eoGeneralIntBounds(eoGeneralIntBounds & _b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + long int minimum, maximum; + const eoIntBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + if (minBounded && maxBounded) + repBound = new eoIntInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoIntNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoIntAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoIntBelowBound(minimum); + } + + eoGeneralIntBounds& operator=(const eoGeneralIntBounds& _b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + long int minimum, maximum; + const eoIntBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + // first delete the embedded bounds if necessary + if (repBound) + delete repBound; + // now reallocate + if (minBounded && maxBounded) + repBound = new eoIntInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoIntNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoIntAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoIntBelowBound(minimum); + return (*this); + } + + + /** Need a Dtor because we allocate an actual bound */ + ~eoGeneralIntBounds() + { + delete repBound; + } + + ///// and now all methods from the embedded bounds + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const {return repBound->isBounded();} + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const {return repBound->hasNoBoundAtAll();} + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const {return repBound->isMinBounded();} + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const {return repBound->isMaxBounded();} + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double _x) const {return repBound->isInBounds(_x);} + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double & _x) const {return repBound->foldsInBounds(_x);} + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double & _x) const {return repBound->truncate(_x);} + + /** get minimum value + * @std::exception if does not exist + */ + virtual long int minimum() const {return repBound->minimum();} + /** get maximum value + * @std::exception if does not exist + */ + virtual long int maximum() const {return repBound->maximum();} + /** get range + * @std::exception if unbounded + */ + virtual long int range() const {return repBound->range();} + + /** random generator of uniform doubles in bounds + * @std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const {return repBound->uniform();} + + /** random generator of uniform ints in bounds + * @std::exception if unbounded + */ + virtual long int random(eoRng & _rng = eo::rng) const {return repBound->random();} + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const {return repBound->dup();} + + /** for efficiency, it's better to use the embedded boud directly */ + const eoIntBounds & theBounds() const { return *repBound;} + + /** don't forget the printOn method - + * again that of the embedded bound + */ + virtual void printOn(std::ostream& _os) const + { + repBound->printOn(_os); + } + + /** no readFrom ??? Have to check that later */ + virtual void readFrom(std::istream& _is) + { + std::string s; + _is >> s; + if (repBound) + delete repBound; + repBound = getBoundsFromString(s); + } + +private: + // reading from a string + eoIntBounds * getBoundsFromString(std::string); + + eoIntBounds * repBound; +}; + + +#endif diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 4b8fabb80..cd59620be 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -17,6 +17,7 @@ #include "eoRealBounds.h" #include "eoRealVectorBounds.h" + // the global dummy bounds // (used for unbounded variables when bounds are required) eoRealNoBounds eoDummyRealNoBounds; @@ -46,14 +47,14 @@ double read_double(std::string _s) return r; } -int read_int(std::string _s) +long int read_int(std::string _s) { #ifdef HAVE_SSTREAM std::istringstream is(_s); #else std::istrstream is(_s.c_str()); #endif - int i; + long int i; is >> i; return i; } @@ -191,3 +192,80 @@ void eoRealVectorBounds::adjust_size(unsigned _dim) factor[factor.size()-1] += missing; } } + +/** the constructor for eoGeneralRealBound - from a string + * very similar to the eoRealVectorBounds::readFrom above + * but was written much later so the readFrom does not call this one + * as it should do + */ +eoRealBounds* eoGeneralRealBounds::getBoundsFromString(std::string _value) +{ + // now read + std::string delim(",; "); + std::string beginOrClose("[(])"); + if (!remove_leading(_value, delim)) // only delimiters were left + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + // look for opening char + size_t posDeb = _value.find_first_of(beginOrClose); // allow ]a,b] + if (posDeb >= _value.size()) // nothing left to read + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + // ending char: next {}() after posDeb + size_t posFin = _value.find_first_of(beginOrClose,posDeb+1); + if (posFin >= _value.size()) // not found + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + // the bounds + std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + // and remove from original string + _value = _value.substr(posFin+1); + + remove_leading(sBounds, delim); + size_t posDelim = sBounds.find_first_of(delim); + if (posDelim >= sBounds.size()) + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + bool minBounded=false, maxBounded=false; + double minBound=0, maxBound=0; + + // min bound + std::string sMinBounds = sBounds.substr(0,posDelim); + + if ( (sMinBounds != std::string("-inf")) && + (sMinBounds != std::string("-infinity")) + ) + { + minBounded = true; + minBound = read_double(sMinBounds); + } + + // max bound + size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); + + std::string sMaxBounds = sBounds.substr(posEndDelim); + + if ( (sMaxBounds != std::string("+inf")) && + (sMaxBounds != std::string("+infinity")) + ) + { + maxBounded = true; + maxBound = read_double(sMaxBounds); + } + + // now create the embedded eoRealBounds object + eoRealBounds * locBound; + if (minBounded && maxBounded) + { + if (maxBound <= minBound) + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + locBound = new eoRealInterval(minBound, maxBound); + } + else if (!minBounded && !maxBounded) // no bound at all + locBound = new eoRealNoBounds; + else if (!minBounded && maxBounded) + locBound = new eoRealAboveBound(maxBound); + else if (minBounded && !maxBounded) + locBound = new eoRealBelowBound(minBound); + return locBound; +} diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 0ed662b03..fa69e440d 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -79,53 +79,53 @@ public: /** Self-Test: true if ***both*** a min and a max */ - virtual bool isBounded(void) = 0; + virtual bool isBounded(void) const = 0; /** Self-Test: true if no min ***and*** no max * hence no further need to test/truncate/fold anything */ - virtual bool hasNoBoundAtAll(void) = 0; + virtual bool hasNoBoundAtAll(void) const = 0; /** Self-Test: bounded from below??? */ - virtual bool isMinBounded(void) = 0; + virtual bool isMinBounded(void) const = 0; /** Self-Test: bounded from above??? */ - virtual bool isMaxBounded(void) = 0; + virtual bool isMaxBounded(void) const = 0; /** Test on a value: is it in bounds? */ - virtual bool isInBounds(double) = 0; + virtual bool isInBounds(double) const = 0; /** Put value back into bounds - by folding back and forth */ - virtual void foldsInBounds(double &) = 0; + virtual void foldsInBounds(double &) const = 0; /** Put value back into bounds - by truncating to a boundary value */ - virtual void truncate(double &) = 0; + virtual void truncate(double &) const = 0; /** get minimum value * @std::exception if does not exist */ - virtual double minimum() = 0; + virtual double minimum() const = 0 ; /** get maximum value * @std::exception if does not exist */ - virtual double maximum() = 0; + virtual double maximum() const = 0 ; /** get range * @std::exception if unbounded */ - virtual double range() = 0; + virtual double range() const = 0; /** random generator of uniform numbers in bounds * @std::exception if unbounded */ - virtual double uniform(eoRng & _rng = eo::rng) = 0; + virtual double uniform(eoRng & _rng = eo::rng) const = 0; /** for memory managements - ugly */ - virtual eoRealBounds * dup() = 0; + virtual eoRealBounds * dup() const = 0; }; /** A default class for unbounded variables @@ -135,28 +135,28 @@ class eoRealNoBounds : public eoRealBounds public: virtual ~eoRealNoBounds(){} - virtual bool isBounded(void) {return false;} - virtual bool hasNoBoundAtAll(void) {return true;} - virtual bool isMinBounded(void) {return false;} - virtual bool isMaxBounded(void) {return false;} - virtual void foldsInBounds(double &) {return;} - virtual void truncate(double &) {return;} - virtual bool isInBounds(double) {return true;} + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return true;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return false;} + virtual void foldsInBounds(double &) const {return;} + virtual void truncate(double &) const {return;} + virtual bool isInBounds(double) const {return true;} - virtual double minimum() + virtual double minimum() const { throw std::logic_error("Trying to get minimum of unbounded eoRealBounds"); } - virtual double maximum() + virtual double maximum() const { throw std::logic_error("Trying to get maximum of unbounded eoRealBounds"); } - virtual double range() + virtual double range() const { throw std::logic_error("Trying to get range of unbounded eoRealBounds"); } - virtual double uniform(eoRng & _rng = eo::rng) + virtual double uniform(eoRng & _rng = eo::rng) const { throw std::logic_error("Trying to generate uniform values in unbounded eoRealBounds"); } @@ -183,7 +183,7 @@ public: } /** for memory managements - ugly */ - virtual eoRealBounds * dup() + virtual eoRealBounds * dup() const { return new eoRealNoBounds(*this); } @@ -212,23 +212,23 @@ public : } // accessors - virtual double minimum() { return repMinimum; } - virtual double maximum() { return repMaximum; } - virtual double range() { return repRange; } + virtual double minimum() const { return repMinimum; } + virtual double maximum() const { return repMaximum; } + virtual double range() const { return repRange; } // description - virtual bool isBounded(void) {return true;} - virtual bool hasNoBoundAtAll(void) {return false;} - virtual bool isMinBounded(void) {return true;} - virtual bool isMaxBounded(void) {return true;} + virtual bool isBounded(void) const {return true;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return true;} - virtual double uniform(eoRng & _rng = eo::rng) + virtual double uniform(eoRng & _rng = eo::rng) const { return repMinimum + _rng.uniform(repRange); } // says if a given double is within the bounds - virtual bool isInBounds(double _r) + virtual bool isInBounds(double _r) const { if (_r < repMinimum) return false; @@ -238,7 +238,7 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) + virtual void foldsInBounds(double & _r) const { long iloc; double dlargloc = 2 * range() ; @@ -267,7 +267,7 @@ public : } // truncates to the bounds - virtual void truncate(double & _r) + virtual void truncate(double & _r) const { if (_r < repMinimum) _r = repMinimum; @@ -298,7 +298,7 @@ public : } /** for memory managements - ugly */ - virtual eoRealBounds * dup() + virtual eoRealBounds * dup() const { return new eoRealInterval(*this); } @@ -324,31 +324,31 @@ public : {} // accessors - virtual double minimum() { return repMinimum; } + virtual double minimum() const { return repMinimum; } - virtual double maximum() + virtual double maximum() const { throw std::logic_error("Trying to get maximum of eoRealBelowBound"); } - virtual double range() + virtual double range() const { throw std::logic_error("Trying to get range of eoRealBelowBound"); } // random generators - virtual double uniform(eoRng & _rng = eo::rng) + virtual double uniform(eoRng & _rng = eo::rng) const { throw std::logic_error("Trying to generate uniform values in eoRealBelowBound"); } // description - virtual bool isBounded(void) {return false;} - virtual bool hasNoBoundAtAll(void) {return false;} - virtual bool isMinBounded(void) {return true;} - virtual bool isMaxBounded(void) {return false;} + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return false;} // says if a given double is within the bounds - virtual bool isInBounds(double _r) + virtual bool isInBounds(double _r) const { if (_r < repMinimum) return false; @@ -356,7 +356,7 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) + virtual void foldsInBounds(double & _r) const { // easy as a pie: symmetry w.r.t. minimum if (_r < repMinimum) // nothing to do otherwise @@ -365,7 +365,7 @@ public : } // truncates to the bounds - virtual void truncate(double & _r) + virtual void truncate(double & _r) const { if (_r < repMinimum) _r = repMinimum; @@ -394,7 +394,7 @@ public : } /** for memory managements - ugly */ - virtual eoRealBounds * dup() + virtual eoRealBounds * dup() const { return new eoRealBelowBound(*this); } @@ -419,31 +419,31 @@ public : {} // accessors - virtual double maximum() { return repMaximum; } + virtual double maximum() const { return repMaximum; } - virtual double minimum() + virtual double minimum() const { throw std::logic_error("Trying to get minimum of eoRealAboveBound"); } - virtual double range() + virtual double range() const { throw std::logic_error("Trying to get range of eoRealAboveBound"); } // random generators - virtual double uniform(eoRng & _rng = eo::rng) + virtual double uniform(eoRng & _rng = eo::rng) const { throw std::logic_error("Trying to generate uniform values in eoRealAboveBound"); } // description - virtual bool isBounded(void) {return false;} - virtual bool hasNoBoundAtAll(void) {return false;} - virtual bool isMinBounded(void) {return false;} - virtual bool isMaxBounded(void) {return true;} + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return true;} // says if a given double is within the bounds - virtual bool isInBounds(double _r) + virtual bool isInBounds(double _r) const { if (_r > repMaximum) return false; @@ -451,7 +451,7 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) + virtual void foldsInBounds(double & _r) const { // easy as a pie: symmetry w.r.t. maximum if (_r > repMaximum) // nothing to do otherwise @@ -460,7 +460,7 @@ public : } // truncates to the bounds - virtual void truncate(double & _r) + virtual void truncate(double & _r) const { if (_r > repMaximum) _r = repMaximum; @@ -489,7 +489,7 @@ public : } /** for memory managements - ugly */ - virtual eoRealBounds * dup() + virtual eoRealBounds * dup() const { return new eoRealAboveBound(*this); } @@ -498,4 +498,152 @@ private : double repMaximum; }; +//////////////////////// tentative for a general BOUND class that is constructed from a string + +class eoGeneralRealBounds : public eoRealBounds +{ +public: + /** Ctor: from a string, chooses the type of bound */ + eoGeneralRealBounds(std::string _s) + { + repBound = getBoundsFromString(_s); + } + + /** Need a Cpy Ctor because we are allocating memory */ + eoGeneralRealBounds(eoGeneralRealBounds & _b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + double minimum, maximum; + const eoRealBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + if (minBounded && maxBounded) + repBound = new eoRealInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoRealNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoRealAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoRealBelowBound(minimum); + } + + eoGeneralRealBounds& operator=(const eoGeneralRealBounds& _b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + double minimum, maximum; + const eoRealBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + // first delete the embedded bounds if necessary + if (repBound) + delete repBound; + // now reallocate + if (minBounded && maxBounded) + repBound = new eoRealInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoRealNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoRealAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoRealBelowBound(minimum); + return (*this); + } + + + /** Need a Dtor because we allocate an actual bound */ + ~eoGeneralRealBounds() + { + delete repBound; + } + + ///// and now all methods from the embedded bounds + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const {return repBound->isBounded();} + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const {return repBound->hasNoBoundAtAll();} + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const {return repBound->isMinBounded();} + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const {return repBound->isMaxBounded();} + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double _x) const {return repBound->isInBounds(_x);} + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double & _x) const {return repBound->foldsInBounds(_x);} + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double & _x) const {return repBound->truncate(_x);} + + /** get minimum value + * @std::exception if does not exist + */ + virtual double minimum() const {return repBound->minimum();} + /** get maximum value + * @std::exception if does not exist + */ + virtual double maximum() const {return repBound->maximum();} + /** get range + * @std::exception if unbounded + */ + virtual double range() const {return repBound->range();} + + /** random generator of uniform numbers in bounds + * @std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const {return repBound->uniform();} + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const {return repBound->dup();} + + /** for efficiency, it's better to use the embedded boud directly */ + const eoRealBounds & theBounds() const { return *repBound;} + + /** don't forget the printOn method - + * again that of the embedded bound + */ + virtual void printOn(std::ostream& _os) const + { + repBound->printOn(_os); + } + + /** no readFrom ??? Have to check that later */ + virtual void readFrom(std::istream& _is) + { + std::string s; + _is >> s; + if (repBound) + delete repBound; + repBound = getBoundsFromString(s); + } + +private: + // reading from a string + eoRealBounds * getBoundsFromString(std::string); + + eoRealBounds * repBound; +}; + + #endif From 9b1524ec002de89ba330d9090c11308dbb5b8460 Mon Sep 17 00:00:00 2001 From: evomarc Date: Fri, 5 Nov 2004 08:57:34 +0000 Subject: [PATCH 1084/2134] Added classes to hendle bounds: - eoGeneralRealBound that can be initialized using a string (and hence can be easily read as a parameter) - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h Note that there is no equivalent to eoRealVectorBounds for vector of integers In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h The first one was already there by chance, through eoUniformInit.h --- eo/src/eo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eo b/eo/src/eo index 9ce3f01c5..325572d42 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -127,6 +127,8 @@ // Utils #include +#include // includes eoRealBounds.h +#include // no eoIntVectorBounds // aliens #include From ab95b3fd979bb317fef516f68daa6e01cabd1a33 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 29 Nov 2004 20:49:34 +0000 Subject: [PATCH 1085/2134] Corrected some bugs in eoGeneralXXXBounds (e.g. no const in copy Ctor arguments) Added a default value for the intialization (-infty, +infty) Needs to allow uniform() on unbounded - still pondering --- eo/src/utils/eoIntBounds.h | 4 ++-- eo/src/utils/eoRealBounds.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h index a38253b4d..0fbc26b3f 100644 --- a/eo/src/utils/eoIntBounds.h +++ b/eo/src/utils/eoIntBounds.h @@ -539,13 +539,13 @@ class eoGeneralIntBounds : public eoIntBounds { public: /** Ctor: from a string, chooses the type of bound */ - eoGeneralIntBounds(std::string _s) + eoGeneralIntBounds(std::string _s = "[-infinity,+infinity]") { repBound = getBoundsFromString(_s); } /** Need a Cpy Ctor because we are allocating memory */ - eoGeneralIntBounds(eoGeneralIntBounds & _b) + eoGeneralIntBounds(const eoGeneralIntBounds & _b) { // replicate the embedded bound (I'm pretty sure there is another // way to do that !!! diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index fa69e440d..552ee038d 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -504,13 +504,13 @@ class eoGeneralRealBounds : public eoRealBounds { public: /** Ctor: from a string, chooses the type of bound */ - eoGeneralRealBounds(std::string _s) + eoGeneralRealBounds(std::string _s = "[-infinity,+infinity]") { repBound = getBoundsFromString(_s); } /** Need a Cpy Ctor because we are allocating memory */ - eoGeneralRealBounds(eoGeneralRealBounds & _b) + eoGeneralRealBounds(const eoGeneralRealBounds & _b) { // replicate the embedded bound (I'm pretty sure there is another // way to do that !!! From 641b49e995be18bfa7445514bf4dd3211bce6ad0 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 1 Dec 2004 08:49:40 +0000 Subject: [PATCH 1086/2134] Added a few words about Lesson5, and the change in the Makefiles. Also, looking alive is probably important ! --- eo/tutorial/html/eoTutorial.html | 37 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index 273704440..077bfe8f5 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,12 +17,31 @@ and to

    EO Tutorial

    -
    Version 0.98 - May 2004 +
    Version 0.98a - December 2004
      -
    • New -Lesson 5 +
    • New - +Well, in fact, nothing really new, +but some people advised us to annouce from the very beginning that +if you are looking for a ready-to-use +(except for the fitness) fully tunable Evolutionary +Algorithm evolving real values or bitstring, you can +go directly to +Lesson 5 after +just reading this page, and maybe the Programming hints +(link on top of each page too).
      +In fact, there is something new: thanks to Jochen Küpper, EO automatic configuration +and build process has been cleaned up and upgraded. For consistency, the same +automatically-built Makefiles have +been created in the tutorial directories. But the good-old manually-created files +are still there, now named Makefile.simple. +
      +
    • + +
      Version 0.98 - May 2004
      +
      +
    • Lesson 5 has been improved: some of the empty template files in dir .../eo/tutorial/Templates @@ -58,15 +77,13 @@ a PDF presentation
    Cahon (LIFL, Lille) - -


    Welcome to EO tutorial/on-line documentation. -
    Please note that this tutorial is not supposed +


    +
    Welcome to EO tutorial/on-line documentation.
    +

    About this tutorial

    +First, please note that this tutorial is not supposed to be printed and read off-line, as it takes full advantage of hyper-text links between the different parts, and with the technical documentation. -

    - -
    About this tutorial

    This tutorial can be used in 2 different ways: algorithm-based and component-based.
    From 860040ae53f506af63b0d881d44d99352e6b9f4e Mon Sep 17 00:00:00 2001 From: ldacosta Date: Thu, 13 Mar 2008 16:28:34 +0000 Subject: [PATCH 1397/2134] "Tutorial" (with capital T) was interfering with the checkout of eo on Eclipse (because there is already one "tutorial", with "t"). This is just a renaming of "Tutorial". --- eo/Tutorial/.project | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 eo/Tutorial/.project diff --git a/eo/Tutorial/.project b/eo/Tutorial/.project new file mode 100644 index 000000000..41599391e --- /dev/null +++ b/eo/Tutorial/.project @@ -0,0 +1,11 @@ + + + TutorialNOTGOOD + + + + + + + + From 52d9a1fed95675b9e7973aba2855f76c870d3201 Mon Sep 17 00:00:00 2001 From: tlegrand Date: Thu, 20 Mar 2008 08:43:44 +0000 Subject: [PATCH 1398/2134] added minimal test config --- eo/test/CMakeLists.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index fb1155451..f1a4112ae 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -78,13 +78,22 @@ FOREACH (test ${TEST_LIST}) SET ("T_${test}_SOURCES" "${test}.cpp") ENDFOREACH (test) -# Add the tests -IF(ENABLE_CMAKE_TESTING) - FOREACH (test ${TEST_LIST}) + +IF(ENABLE_MINIMAL_CMAKE_TESTING) + SET (MIN_TEST_LIST t-eoEasyPSO) + FOREACH (mintest ${MIN_TEST_LIST}) + SET ("T_${mintest}_SOURCES" "${mintest}.cpp") + ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) + ADD_TEST(${mintest} ${mintest}) + TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo eomoo) + ENDFOREACH (mintest) + +ELSEIF(ENABLE_CMAKE_TESTING) + FOREACH (test ${TEST_LIST}) ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) ADD_TEST(${test} ${test}) TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo eomoo) ENDFOREACH (test) -ENDIF(ENABLE_CMAKE_TESTING) +ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) ###################################################################################### From aee8aa452f5d053f4dcb8ebcc5c0ea4351197a02 Mon Sep 17 00:00:00 2001 From: tlegrand Date: Thu, 20 Mar 2008 15:48:31 +0000 Subject: [PATCH 1399/2134] come back to dart.irisa.fr ! --- eo/DartConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/DartConfig.cmake b/eo/DartConfig.cmake index b4674de6c..53b66a905 100644 --- a/eo/DartConfig.cmake +++ b/eo/DartConfig.cmake @@ -4,7 +4,7 @@ ############################################################################# SET (DROP_METHOD "xmlrpc") -SET (DROP_SITE "http://dart-test.irisa.fr") +SET (DROP_SITE "http://dart.irisa.fr") SET (DROP_LOCATION "ParadisEO") SET (CVS_WEB_URL "http://eodev.cvs.sourceforge.net/eodev/") SET (CVS_WEB_CVSROOT "eo") From 3e17a2dd67ceae010ab5a9136518d5abefd353c4 Mon Sep 17 00:00:00 2001 From: ldacosta Date: Fri, 28 Mar 2008 13:49:13 +0000 Subject: [PATCH 1400/2134] "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names --- eo/NOGOODTutorial/.cvsignore | 1 + eo/{Tutorial => NOGOODTutorial}/.project | 0 eo/NOGOODTutorial/CMakeLists.txt | 9 +++++++++ eo/NOGOODTutorial/ChangeLog | 11 +++++++++++ eo/NOGOODTutorial/Makefile.am | 1 + 5 files changed, 22 insertions(+) create mode 100644 eo/NOGOODTutorial/.cvsignore rename eo/{Tutorial => NOGOODTutorial}/.project (100%) create mode 100644 eo/NOGOODTutorial/CMakeLists.txt create mode 100644 eo/NOGOODTutorial/ChangeLog create mode 100644 eo/NOGOODTutorial/Makefile.am diff --git a/eo/NOGOODTutorial/.cvsignore b/eo/NOGOODTutorial/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/NOGOODTutorial/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/Tutorial/.project b/eo/NOGOODTutorial/.project similarity index 100% rename from eo/Tutorial/.project rename to eo/NOGOODTutorial/.project diff --git a/eo/NOGOODTutorial/CMakeLists.txt b/eo/NOGOODTutorial/CMakeLists.txt new file mode 100644 index 000000000..842421e4d --- /dev/null +++ b/eo/NOGOODTutorial/CMakeLists.txt @@ -0,0 +1,9 @@ + + +###################################################################################### +### 1) Where must cmake go now ? +###################################################################################### + +SUBDIRS(Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6) + +###################################################################################### diff --git a/eo/NOGOODTutorial/ChangeLog b/eo/NOGOODTutorial/ChangeLog new file mode 100644 index 000000000..66e95543c --- /dev/null +++ b/eo/NOGOODTutorial/ChangeLog @@ -0,0 +1,11 @@ +2006-12-03 Jochen Küpper + + * tutorial/Makefile.am: Add all necessary files, including html and + Templates to distribution. + + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/eo/NOGOODTutorial/Makefile.am b/eo/NOGOODTutorial/Makefile.am new file mode 100644 index 000000000..1faf4710f --- /dev/null +++ b/eo/NOGOODTutorial/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = html Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 pdf Templates From c86d07fed3f625f8d6e688e18c8ae79ed974115e Mon Sep 17 00:00:00 2001 From: ldacosta Date: Fri, 28 Mar 2008 13:49:14 +0000 Subject: [PATCH 1401/2134] "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names --- eo/{NOGOODTutorial => }/.project | 2 +- eo/NOGOODTutorial/.cvsignore | 1 - eo/NOGOODTutorial/CMakeLists.txt | 9 --------- eo/NOGOODTutorial/ChangeLog | 11 ----------- eo/NOGOODTutorial/Makefile.am | 1 - eo/Tutorial/.cvsignore | 1 - eo/Tutorial/CMakeLists.txt | 9 --------- eo/Tutorial/ChangeLog | 11 ----------- eo/Tutorial/Makefile.am | 1 - 9 files changed, 1 insertion(+), 45 deletions(-) rename eo/{NOGOODTutorial => }/.project (85%) delete mode 100644 eo/NOGOODTutorial/.cvsignore delete mode 100644 eo/NOGOODTutorial/CMakeLists.txt delete mode 100644 eo/NOGOODTutorial/ChangeLog delete mode 100644 eo/NOGOODTutorial/Makefile.am delete mode 100644 eo/Tutorial/.cvsignore delete mode 100644 eo/Tutorial/CMakeLists.txt delete mode 100644 eo/Tutorial/ChangeLog delete mode 100644 eo/Tutorial/Makefile.am diff --git a/eo/NOGOODTutorial/.project b/eo/.project similarity index 85% rename from eo/NOGOODTutorial/.project rename to eo/.project index 41599391e..04b42278f 100644 --- a/eo/NOGOODTutorial/.project +++ b/eo/.project @@ -1,6 +1,6 @@ - TutorialNOTGOOD + eo diff --git a/eo/NOGOODTutorial/.cvsignore b/eo/NOGOODTutorial/.cvsignore deleted file mode 100644 index 70845e08e..000000000 --- a/eo/NOGOODTutorial/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/eo/NOGOODTutorial/CMakeLists.txt b/eo/NOGOODTutorial/CMakeLists.txt deleted file mode 100644 index 842421e4d..000000000 --- a/eo/NOGOODTutorial/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - - -###################################################################################### -### 1) Where must cmake go now ? -###################################################################################### - -SUBDIRS(Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6) - -###################################################################################### diff --git a/eo/NOGOODTutorial/ChangeLog b/eo/NOGOODTutorial/ChangeLog deleted file mode 100644 index 66e95543c..000000000 --- a/eo/NOGOODTutorial/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -2006-12-03 Jochen Küpper - - * tutorial/Makefile.am: Add all necessary files, including html and - Templates to distribution. - - - * Local Variables: - * coding: iso-8859-1 - * mode: flyspell - * fill-column: 80 - * End: diff --git a/eo/NOGOODTutorial/Makefile.am b/eo/NOGOODTutorial/Makefile.am deleted file mode 100644 index 1faf4710f..000000000 --- a/eo/NOGOODTutorial/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = html Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 pdf Templates diff --git a/eo/Tutorial/.cvsignore b/eo/Tutorial/.cvsignore deleted file mode 100644 index 70845e08e..000000000 --- a/eo/Tutorial/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/eo/Tutorial/CMakeLists.txt b/eo/Tutorial/CMakeLists.txt deleted file mode 100644 index 842421e4d..000000000 --- a/eo/Tutorial/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - - -###################################################################################### -### 1) Where must cmake go now ? -###################################################################################### - -SUBDIRS(Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6) - -###################################################################################### diff --git a/eo/Tutorial/ChangeLog b/eo/Tutorial/ChangeLog deleted file mode 100644 index 66e95543c..000000000 --- a/eo/Tutorial/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -2006-12-03 Jochen Küpper - - * tutorial/Makefile.am: Add all necessary files, including html and - Templates to distribution. - - - * Local Variables: - * coding: iso-8859-1 - * mode: flyspell - * fill-column: 80 - * End: diff --git a/eo/Tutorial/Makefile.am b/eo/Tutorial/Makefile.am deleted file mode 100644 index 1faf4710f..000000000 --- a/eo/Tutorial/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = html Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 pdf Templates From 8c1726ef9715f2055346416e353bcde8e8f04809 Mon Sep 17 00:00:00 2001 From: ldacosta Date: Fri, 28 Mar 2008 15:51:48 +0000 Subject: [PATCH 1402/2134] do_make_algo_scalar is extended: now it accepts also an evaluation of the fitness of the population as parameter. --- eo/src/do/make_algo_easea.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/eo/src/do/make_algo_easea.h b/eo/src/do/make_algo_easea.h index cbcb9960a..84818e6c4 100644 --- a/eo/src/do/make_algo_easea.h +++ b/eo/src/do/make_algo_easea.h @@ -57,7 +57,6 @@ #include #include - /* * This function builds the algorithm (i.e. selection and replacement) * from existing continue (or checkpoint) and operators @@ -72,7 +71,7 @@ */ template -eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalFunc& _popeval, eoContinue& _continue, eoGenOp& _op) { // the selection eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t), Sequential(ordered/unordered) or EliteSequentialSelect", 'S', "Evolution Engine"); @@ -359,10 +358,30 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc /////////////////////////////// // now the eoEasyEA /////////////////////////////// - eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, *ptReplace); + eoAlgo *algo = new eoEasyEA(_continue, _popeval, *breed, *ptReplace); _state.storeFunctor(algo); // that's it! return *algo; } +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here +*/ +template +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + do_make_algo_scalar( _parser, _state, *(new eoPopLoopEval(_eval)), _continue, _op); +} + + + #endif From af8cd4b08bcb7b13201ac054627e3313120bb393 Mon Sep 17 00:00:00 2001 From: ldacosta Date: Fri, 28 Mar 2008 15:57:55 +0000 Subject: [PATCH 1403/2134] Adjusting configuration for Eclipse --- eo/.cproject | 221 +++++ eo/.project | 71 ++ eo/AUTHORS | 5 +- eo/ChangeLog | 8 - eo/Makefile.in | 603 ++++++++++++ eo/README | 5 +- eo/aclocal.m4 | 928 +++++++++++++++++++ eo/app/gpsymreg/.cvsignore | 2 + eo/config.guess | 1466 ++++++++++++++++++++++++++++++ eo/configure.in | 16 +- eo/src/do/.cvsignore | 1 + eo/src/es/.cvsignore | 2 + eo/src/ga/.cvsignore | 1 + eo/src/moo/.cvsignore | 1 + eo/src/utils/.cvsignore | 1 + eo/stamp-h1 | 1 + eo/tutorial/.cvsignore | 1 + eo/tutorial/Lesson1/.cvsignore | 5 + eo/tutorial/Lesson2/.cvsignore | 5 + eo/tutorial/Lesson3/.cvsignore | 2 + eo/tutorial/Lesson4/.cvsignore | 2 + eo/tutorial/Lesson5/.cvsignore | 2 + eo/tutorial/Lesson6/.cvsignore | 1 + eo/tutorial/Templates/.cvsignore | 1 + eo/tutorial/html/.cvsignore | 1 + eo/tutorial/pdf/.cvsignore | 1 + 26 files changed, 3328 insertions(+), 25 deletions(-) create mode 100644 eo/.cproject create mode 100644 eo/Makefile.in create mode 100644 eo/aclocal.m4 create mode 100755 eo/config.guess create mode 100644 eo/src/moo/.cvsignore create mode 100644 eo/stamp-h1 create mode 100644 eo/tutorial/Lesson6/.cvsignore diff --git a/eo/.cproject b/eo/.cproject new file mode 100644 index 000000000..364c33744 --- /dev/null +++ b/eo/.cproject @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +make + +Lesson1 +true +true +true + + + + + + + + + diff --git a/eo/.project b/eo/.project index 04b42278f..349044742 100644 --- a/eo/.project +++ b/eo/.project @@ -5,7 +5,78 @@ + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + ?name? + + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.buildLocation + ${workspace_loc:/eo/tutorial/Lesson2} + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature diff --git a/eo/AUTHORS b/eo/AUTHORS index 1d6304e8d..dc2384bb9 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -1,4 +1,3 @@ --*- coding: iso-8859-1 -*- vim:fenc=iso-8859-1 Pedro Angel Castillo Valdivieso Juan Julian Merelo Guervos Victor Manuel Rivas Santos @@ -6,6 +5,4 @@ Gustavo Romero Lopez Maarten Keijzer Marc Schoenauer Jeroen Eggermont -Jochen Kpper -Thomas Legrand -Clive Canape +Jochen Küpper diff --git a/eo/ChangeLog b/eo/ChangeLog index c54244e21..dca09d239 100644 --- a/eo/ChangeLog +++ b/eo/ChangeLog @@ -1,17 +1,9 @@ -2007-01-23 Jochen Küpper - - * NEWS: Add 1.0.1 release - - * configure.in: Bump version to 1.0.1 - 2006-12-18 Jochen Küpper * TODO.html, README.html: Remove these old files. * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. - * configure.in: Bump version to 1.0 - 2006-12-17 Jochen Küpper * README: Better links to Templates/ diff --git a/eo/Makefile.in b/eo/Makefile.in new file mode 100644 index 000000000..279b4cf06 --- /dev/null +++ b/eo/Makefile.in @@ -0,0 +1,603 @@ +# Makefile.in generated by automake 1.8.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + THANKS config.guess config.sub depcomp install-sh missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(mkdir_p) +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src doc contrib win app tutorial test +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GNUPLOT = @GNUPLOT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_APPLICATIONS_FALSE = @USE_APPLICATIONS_FALSE@ +USE_APPLICATIONS_TRUE = @USE_APPLICATIONS_TRUE@ +USE_TUTORIAL_FALSE = @USE_TUTORIAL_FALSE@ +USE_TUTORIAL_TRUE = @USE_TUTORIAL_TRUE@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +@USE_APPLICATIONS_TRUE@SUBDIRS_APP = app +@USE_TUTORIAL_TRUE@SUBDIRS_TUT = tutorial +SUBDIRS = src doc contrib win $(SUBDIRS_APP) $(SUBDIRS_TUT) test + +# Directory for documents +DOCDIR = ~/public_html/eodocs + +# Directory for indices -- not useful for the user +IDXDIR = ~/index +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if (etags --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + else \ + include_option=--include; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="../$(top_distdir)" \ + distdir="../$(distdir)/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-info-am + + +# Add documentation to distribution +dist-hook: + $(MAKE) documentation + $(INSTALL_DATA) -d $(srcdir)/doc/html $(srcdir)/doc/latex $(srcdir)/doc/man $(distdir)/doc/ + +# Prepare documentation +documentation: + cd doc && $(MAKE) doc && cd .. +# convinience-target +doc: documentation +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/eo/README b/eo/README index 0e459c7f7..0ce229362 100644 --- a/eo/README +++ b/eo/README @@ -36,8 +36,9 @@ where $(SRCDIR) is the top-level source directory of EO, i.e. where the sources where unpacked. Run "$(SRCDIR)/configure --help" for possible options. You can specify -to not build example applications, the tutorial. -You may also change the installation directory that way. +to not build example applications, the tutorial, or to build the +ParadisEO tutorial. You may also change the installation directory +that way. Now you should probably go to the tutorial and start learning about EO features and programming. diff --git a/eo/aclocal.m4 b/eo/aclocal.m4 new file mode 100644 index 000000000..8c7060b10 --- /dev/null +++ b/eo/aclocal.m4 @@ -0,0 +1,928 @@ +# generated automatically by aclocal 1.8.3 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.8.3])]) + +# AM_AUX_DIR_EXPAND + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 6 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]) +fi])]) + +# serial 7 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 7 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# -*- Autoconf -*- + + +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +m4_include([acinclude.m4]) diff --git a/eo/app/gpsymreg/.cvsignore b/eo/app/gpsymreg/.cvsignore index 70845e08e..236f1048d 100644 --- a/eo/app/gpsymreg/.cvsignore +++ b/eo/app/gpsymreg/.cvsignore @@ -1 +1,3 @@ Makefile.in +.deps +Makefile diff --git a/eo/config.guess b/eo/config.guess new file mode 100755 index 000000000..9b9789b1a --- /dev/null +++ b/eo/config.guess @@ -0,0 +1,1466 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2004-03-03' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_MACHINE}" in + i?86) + test -z "$VENDOR" && VENDOR=pc + ;; + *) + test -z "$VENDOR" && VENDOR=unknown + ;; +esac +test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pegasos:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit 0 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-${VENDOR}-linux + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-${VENDOR}-linux + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-${VENDOR}-linux ;; + PA8*) echo hppa2.0-${VENDOR}-linux ;; + *) echo hppa-${VENDOR}-linux ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-${VENDOR}-linux + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-${VENDOR}-linux + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-${VENDOR}-linuxaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linuxoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/eo/configure.in b/eo/configure.in index c0bfd5ee9..bcd1abb9f 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -1,11 +1,8 @@ dnl Process this file with autoconf to produce a configure script. dnl dnl Change the version number here -AC_INIT([Evolving Objects],[1.02-cvs1],[eodev-help@sourceforge.net],[eo]) -AC_PREREQ(2.60) - -dnl Autoconf 2.6 or higher compatibility -AC_DEFUN([AC_DATAROOTDIR_CHECKED]) +AC_INIT([Evolving Objects], [1.0.1], [eodev-help@sourceforge.net], [eo]) +AC_PREREQ(2.53) dnl make sure we are compiling from the correct sources AC_CONFIG_SRCDIR(src/eoOp.h) @@ -17,7 +14,7 @@ AC_CANONICAL_TARGET dnl automake initialization AM_INIT_AUTOMAKE([gnu dist-bzip2 dist-zip]) -AC_CONFIG_HEADERS([config.h]) +AM_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC @@ -48,7 +45,7 @@ AC_GNUPLOT AC_TUTORIAL dnl create makefiles -AC_CONFIG_FILES([Makefile \ +AC_OUTPUT(Makefile \ app/Makefile \ app/mastermind/Makefile \ app/gprop/Makefile \ @@ -62,7 +59,6 @@ AC_CONFIG_FILES([Makefile \ src/ga/Makefile \ src/other/Makefile \ src/utils/Makefile \ - src/moo/Makefile \ test/Makefile \ tutorial/Makefile \ tutorial/html/Makefile \ @@ -71,8 +67,6 @@ AC_CONFIG_FILES([Makefile \ tutorial/Lesson3/Makefile \ tutorial/Lesson4/Makefile \ tutorial/Lesson5/Makefile \ - tutorial/Lesson6/Makefile \ tutorial/Templates/Makefile \ tutorial/pdf/Makefile \ - win/Makefile]) -AC_OUTPUT + win/Makefile) diff --git a/eo/src/do/.cvsignore b/eo/src/do/.cvsignore index 70845e08e..3dda72986 100644 --- a/eo/src/do/.cvsignore +++ b/eo/src/do/.cvsignore @@ -1 +1,2 @@ Makefile.in +Makefile diff --git a/eo/src/es/.cvsignore b/eo/src/es/.cvsignore index 69fb0bd82..022447b47 100644 --- a/eo/src/es/.cvsignore +++ b/eo/src/es/.cvsignore @@ -4,3 +4,5 @@ .libs Makefile Makefile.in +libcma.a +libes.a diff --git a/eo/src/ga/.cvsignore b/eo/src/ga/.cvsignore index 69fb0bd82..ffea8dd07 100644 --- a/eo/src/ga/.cvsignore +++ b/eo/src/ga/.cvsignore @@ -4,3 +4,4 @@ .libs Makefile Makefile.in +libga.a diff --git a/eo/src/moo/.cvsignore b/eo/src/moo/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/src/moo/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/src/utils/.cvsignore b/eo/src/utils/.cvsignore index 69fb0bd82..f4f7c5b38 100644 --- a/eo/src/utils/.cvsignore +++ b/eo/src/utils/.cvsignore @@ -4,3 +4,4 @@ .libs Makefile Makefile.in +libeoutils.a diff --git a/eo/stamp-h1 b/eo/stamp-h1 new file mode 100644 index 000000000..4547fe1b5 --- /dev/null +++ b/eo/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h diff --git a/eo/tutorial/.cvsignore b/eo/tutorial/.cvsignore index 70845e08e..3dda72986 100644 --- a/eo/tutorial/.cvsignore +++ b/eo/tutorial/.cvsignore @@ -1 +1,2 @@ Makefile.in +Makefile diff --git a/eo/tutorial/Lesson1/.cvsignore b/eo/tutorial/Lesson1/.cvsignore index 70845e08e..58e05e18f 100644 --- a/eo/tutorial/Lesson1/.cvsignore +++ b/eo/tutorial/Lesson1/.cvsignore @@ -1 +1,6 @@ Makefile.in +.deps +FirstBitGA +Makefile +exercise1.3 +FirstRealGA diff --git a/eo/tutorial/Lesson2/.cvsignore b/eo/tutorial/Lesson2/.cvsignore index 70845e08e..7c39fd82b 100644 --- a/eo/tutorial/Lesson2/.cvsignore +++ b/eo/tutorial/Lesson2/.cvsignore @@ -1 +1,6 @@ Makefile.in +.deps +FirstBitEA +FirstRealEA +exercise2.3 +Makefile diff --git a/eo/tutorial/Lesson3/.cvsignore b/eo/tutorial/Lesson3/.cvsignore index 70845e08e..236f1048d 100644 --- a/eo/tutorial/Lesson3/.cvsignore +++ b/eo/tutorial/Lesson3/.cvsignore @@ -1 +1,3 @@ Makefile.in +.deps +Makefile diff --git a/eo/tutorial/Lesson4/.cvsignore b/eo/tutorial/Lesson4/.cvsignore index 70845e08e..236f1048d 100644 --- a/eo/tutorial/Lesson4/.cvsignore +++ b/eo/tutorial/Lesson4/.cvsignore @@ -1 +1,3 @@ Makefile.in +.deps +Makefile diff --git a/eo/tutorial/Lesson5/.cvsignore b/eo/tutorial/Lesson5/.cvsignore index 70845e08e..236f1048d 100644 --- a/eo/tutorial/Lesson5/.cvsignore +++ b/eo/tutorial/Lesson5/.cvsignore @@ -1 +1,3 @@ Makefile.in +.deps +Makefile diff --git a/eo/tutorial/Lesson6/.cvsignore b/eo/tutorial/Lesson6/.cvsignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/eo/tutorial/Lesson6/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/Templates/.cvsignore b/eo/tutorial/Templates/.cvsignore index 70845e08e..3dda72986 100644 --- a/eo/tutorial/Templates/.cvsignore +++ b/eo/tutorial/Templates/.cvsignore @@ -1 +1,2 @@ Makefile.in +Makefile diff --git a/eo/tutorial/html/.cvsignore b/eo/tutorial/html/.cvsignore index 70845e08e..3dda72986 100644 --- a/eo/tutorial/html/.cvsignore +++ b/eo/tutorial/html/.cvsignore @@ -1 +1,2 @@ Makefile.in +Makefile diff --git a/eo/tutorial/pdf/.cvsignore b/eo/tutorial/pdf/.cvsignore index 70845e08e..3dda72986 100644 --- a/eo/tutorial/pdf/.cvsignore +++ b/eo/tutorial/pdf/.cvsignore @@ -1 +1,2 @@ Makefile.in +Makefile From 64fb5d2c4510ed560d7b1af90ddd5bd51734e04d Mon Sep 17 00:00:00 2001 From: ldacosta Date: Fri, 28 Mar 2008 16:09:40 +0000 Subject: [PATCH 1404/2134] Change in do_make_checkpoint: it receives not just a parameter from the evaluation function, not the function itself!! --- eo/src/do/make_checkpoint.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index f18943df7..dcb99c079 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -82,15 +82,16 @@ bool testDirRes(std::string _dirName, bool _erase); - +/** + * + * CHANGE (March 2008): now receiving an eoValueParam instead of an eoEvalFuncCounter. This function is just interested + * in the value of the parameter calculated on the evaluation function, not in the actual function itself!! +*/ template - -eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) - +eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValueParam& _eval, eoContinue& _continue) { // first, create a checkpoint from the eoContinue - eoCheckPoint *checkpoint = new eoCheckPoint(_continue); _state.storeFunctor(checkpoint); From fac8fc0742f4547220a8f3de9bc39c064a2954aa Mon Sep 17 00:00:00 2001 From: ldacosta Date: Fri, 28 Mar 2008 16:24:17 +0000 Subject: [PATCH 1405/2134] Output functor is needed if there is screen output OR FILE OUTPUT - until now, it was only created and stored in the screen output was activated. Line 120 of make_checkpoint.h --- eo/src/do/make_checkpoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index dcb99c079..f700a5196 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -238,7 +238,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu eoSecondMomentStats *secondStat = NULL; - if ( printBestParam.value() ) // we need it for sreen output + if ( printBestParam.value() || fileBestParam.value() ) // we need it for screen output or file output { From fb6201a1449f90816abcf8153d4d28a216eac88b Mon Sep 17 00:00:00 2001 From: ldacosta Date: Mon, 31 Mar 2008 12:53:51 +0000 Subject: [PATCH 1406/2134] make_continue... just a little formatting --- eo/.cproject | 2 +- eo/.project | 2 +- eo/src/do/make_continue.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eo/.cproject b/eo/.cproject index 364c33744..b6834b52e 100644 --- a/eo/.cproject +++ b/eo/.cproject @@ -9,7 +9,7 @@ - + diff --git a/eo/.project b/eo/.project index 349044742..995b188c0 100644 --- a/eo/.project +++ b/eo/.project @@ -23,7 +23,7 @@ org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/eo/tutorial/Lesson2} + ${workspace_loc:/eo} org.eclipse.cdt.make.core.enableFullBuild diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 7dbce4a2a..a45dcd0a7 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -59,6 +59,7 @@ eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_comb return _combined; } + template eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) { From 1187a83c8235957094674b25c7d65afcf6593a75 Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 31 Mar 2008 13:35:41 +0000 Subject: [PATCH 1407/2134] Add climits header as required for gcc-4.3 when using UINT_MAX --- eo/src/do/make_checkpoint.h | 29 ++++++--------------------- eo/src/do/make_checkpoint_FDC.h | 26 +++++++++++++----------- eo/src/do/make_checkpoint_assembled.h | 3 ++- eo/src/do/make_checkpoint_pareto.h | 3 ++- 4 files changed, 24 insertions(+), 37 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index f700a5196..99aca2bf1 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -9,35 +9,20 @@ // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 /* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr @@ -59,14 +44,12 @@ #include #endif +#include + #include - #include // for minimizing_fitness() - #include - #include - #include @@ -83,10 +66,10 @@ bool testDirRes(std::string _dirName, bool _erase); /** - * - * CHANGE (March 2008): now receiving an eoValueParam instead of an eoEvalFuncCounter. This function is just interested - * in the value of the parameter calculated on the evaluation function, not in the actual function itself!! -*/ + * + * CHANGE (March 2008): now receiving an eoValueParam instead of an eoEvalFuncCounter. This function is just interested + * in the value of the parameter calculated on the evaluation function, not in the actual function itself!! +*/ template eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValueParam& _eval, eoContinue& _continue) { diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h index d198c9dd7..80686c936 100644 --- a/eo/src/do/make_checkpoint_FDC.h +++ b/eo/src/do/make_checkpoint_FDC.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_checkpoint.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,6 +27,8 @@ #ifndef _make_checkpoint_h #define _make_checkpoint_h +#include + #include #include // for minimizing_fitness() #include @@ -56,7 +58,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoValueParam *generationCounter = new eoValueParam(0, "Gen."); // Create an incrementor (sub-class of eoUpdater). eoIncrementor* increment = new eoIncrementor(generationCounter->value()); - // Add it to the checkpoint, + // Add it to the checkpoint, checkpoint->add(*increment); // and store it in the state _state.storeFunctor(increment); @@ -90,7 +92,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); eoBestFitnessStat *bestStat = NULL; - if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) // we need the bestStat for at least one of the 3 above { bestStat = new eoBestFitnessStat; @@ -164,11 +166,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // The monitors /////////////// // do we want an eoStdoutMonitor? - bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() + bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() || printPopParam.value() ; - // The Stdout monitor will print parameters to the screen ... - if ( needStdoutMonitor ) + // The Stdout monitor will print parameters to the screen ... + if ( needStdoutMonitor ) { eoStdoutMonitor *monitor = new eoStdoutMonitor(false); _state.storeFunctor(monitor); @@ -192,7 +194,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval } // first handle the dir test - if we need at least one file - if ( ( fileBestParam.value() || plotBestParam.value() || + if ( ( fileBestParam.value() || plotBestParam.value() || plotFDCParam.value() || plotHistogramParam.value() ) && !dirOK ) // just in case we add something before dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE @@ -207,7 +209,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // and feed with some statistics fileMonitor->add(*generationCounter); fileMonitor->add(_eval); - fileMonitor->add(*bestStat); + fileMonitor->add(*bestStat); fileMonitor->add(*secondStat); } @@ -235,7 +237,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // then to a Gnuplot monitor eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); _state.storeFunctor(fdcGnuplot); - + // and of course add them to the checkPoint checkpoint->add(*fdcFileSnapshot); checkpoint->add(*fdcGnuplot); @@ -272,12 +274,12 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); std::string stmp = dirNameParam.value() + "/generations"; - eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); _state.storeFunctor(stateSaver1); checkpoint->add(*stateSaver1); } - // save state every T seconds + // save state every T seconds eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) { @@ -286,7 +288,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE std::string stmp = dirNameParam.value() + "/time"; - eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); _state.storeFunctor(stateSaver2); checkpoint->add(*stateSaver2); } diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h index 125d46f94..96518f610 100644 --- a/eo/src/do/make_checkpoint_assembled.h +++ b/eo/src/do/make_checkpoint_assembled.h @@ -34,6 +34,7 @@ #include #endif +#include #include #include @@ -147,7 +148,7 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; _state.storeFunctor(fitStat); checkpoint->add(*fitStat); -#ifdef HAVE_GNUPLOT +#ifdef HAVE_GNUPLOT // a gnuplot-based monitor for snapshots: needs a dir name eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirName); _state.storeFunctor(fitSnapshot); diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h index 715f395a3..50b7253ef 100644 --- a/eo/src/do/make_checkpoint_pareto.h +++ b/eo/src/do/make_checkpoint_pareto.h @@ -27,7 +27,8 @@ #ifndef _make_checkpoint_pareto_h #define _make_checkpoint_pareto_h -#include +#include +#include #include #include "EO.h" From 0388f957581593bc98488ada6cea60b733a8cfda Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 31 Mar 2008 19:11:13 +0000 Subject: [PATCH 1408/2134] Update for gcc-4.3 compatibility --- eo/app/gprop/gprop.cpp | 34 ++++----- eo/app/gprop/gprop.h | 34 ++++----- eo/src/eoFitContinue.h | 19 +++-- eo/src/eoInitializer.h | 10 +-- eo/src/eoTwoOptMutation.h | 106 ++++++++++++++------------- eo/src/ga/eoBit.h | 12 ++- eo/src/other/eoExternalEO.h | 2 +- eo/src/utils/eoFileSnapshot.h | 15 +++- eo/src/utils/eoGnuplot1DSnapshot.cpp | 5 +- eo/src/utils/make_help.cpp | 27 ++++--- eo/test/t-eoSelect.cpp | 6 +- 11 files changed, 146 insertions(+), 124 deletions(-) diff --git a/eo/app/gprop/gprop.cpp b/eo/app/gprop/gprop.cpp index 3b977d5c7..3c8d17c44 100644 --- a/eo/app/gprop/gprop.cpp +++ b/eo/app/gprop/gprop.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- #include // EXIT_SUCCESS EXIT_FAILURE -#include // exception +#include // exception #include // cerr cout #include // ifstream #include // string @@ -35,7 +35,7 @@ eoValueParam hiddenp(0, "hidden", "number of neurons in hidden layer", //----------------------------------------------------------------------------- void arg(int argc, char** argv); -void load_file(mlp::set& s, const string& s); +void load_file(mlp::set& s1, const string& s2); void ga(); //----------------------------------------------------------------------------- @@ -65,7 +65,7 @@ int main(int argc, char** argv) void arg(int argc, char** argv) { eoParser parser(argc, argv); - + parser.processParam(pop_size, "genetic operators"); parser.processParam(generations, "genetic operators"); parser.processParam(mut_rate, "genetic operators"); @@ -82,7 +82,7 @@ void arg(int argc, char** argv) load_file(train, "trn"); load_file(validate, "val"); load_file(test, "tst"); - + phenotype::trn_max = train.size(); phenotype::val_max = validate.size(); phenotype::tst_max = test.size(); @@ -104,8 +104,8 @@ void load_file(mlp::set& set, const string& ext) { cerr << "can't open file \"" << filename << "\"" << endl; exit(EXIT_FAILURE); - } - + } + ifs >> set; if (set.size() == 0) @@ -122,18 +122,18 @@ void ga() // create population eoInitChrom init; eoPop pop(pop_size.value(), init); - + // evaluate population eoEvalFuncPtr evaluator(eoChromEvaluator); apply(evaluator, pop); - + // selector eoStochTournamentSelect select; // genetic operators eoChromMutation mutation; eoChromXover xover; - + // stop condition eoGenContinue continuator1(generations.value()); phenotype p; p.val_ok = validate.size() - 1; p.mse_error = 0; @@ -142,23 +142,23 @@ void ga() // checkpoint eoCheckPoint checkpoint(continuator); - + // monitor eoStdoutMonitor monitor; checkpoint.add(monitor); - + // statistics eoBestFitnessStat stats; checkpoint.add(stats); monitor.add(stats); - + // genetic algorithm eoSGA sga(select, - xover, xover_rate.value(), - mutation, mut_rate.value(), - evaluator, + xover, xover_rate.value(), + mutation, mut_rate.value(), + evaluator, checkpoint); - + sga(pop); cout << "best: " << *max_element(pop.begin(), pop.end()) << endl; @@ -166,6 +166,6 @@ void ga() //----------------------------------------------------------------------------- -// Local Variables: +// Local Variables: // mode:C++ // End: diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 399a1ff65..11bf684b5 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -52,12 +52,12 @@ struct phenotype friend bool operator<(const phenotype& a, const phenotype& b) { - return a.val_ok < b.val_ok || !(b.val_ok < a.val_ok) && b.mse_error < a.mse_error; + return (a.val_ok < b.val_ok) || (!(b.val_ok < a.val_ok)) && (b.mse_error < a.mse_error); } friend bool operator==(const phenotype& a, const phenotype& b) { - return a.val_ok == b.val_ok && b.mse_error == a.mse_error; + return (a.val_ok == b.val_ok) && (b.mse_error == a.mse_error); } friend bool operator>=(const phenotype& a, const phenotype& b) @@ -69,9 +69,9 @@ struct phenotype { return (!(a == b)) && (!(a < b)); } - - - + + + friend std::ostream& operator<<(std::ostream& os, const phenotype& p) { return os << p.trn_ok << "/" << p.trn_max << " " @@ -79,7 +79,7 @@ struct phenotype << p.tst_ok << "/" << p.tst_max << " " << p.mse_error; } - + friend std::istream& operator>>(std::istream& is, phenotype& p) { return is; // complete me @@ -111,14 +111,14 @@ public: std::string className() const { return "Chrom"; } - void printOn (std::ostream& os) const - { - os << std::setprecision(3) << static_cast(*this) << " \t" - << fitness(); + void printOn (std::ostream& os) const + { + os << std::setprecision(3) << static_cast(*this) << " \t" + << fitness(); // os << fitness(); } - - void readFrom (std::istream& is) + + void readFrom (std::istream& is) { invalidate(); // complete me } @@ -201,16 +201,16 @@ public: int correct(const mlp::net& net, const mlp::set& set) { int sum = 0; - + for (mlp::set::const_iterator s = set.begin(); s != set.end(); ++s) { unsigned partial = 0; - + for (unsigned i = 0; i < s->output.size(); ++i) if (s->output[i] < 0.5 && net(s->input)[i] < 0.5 || s->output[i] > 0.5 && net(s->input)[i] > 0.5) ++partial; - + if (partial == s->output.size()) ++sum; } @@ -234,6 +234,6 @@ phenotype eoChromEvaluator(const Chrom& chrom) #endif // gprop_h -// Local Variables: -// mode:C++ +// Local Variables: +// mode:C++ // End: diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index 4d594c3dd..b23283088 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFitContinue.h // (c) Maarten Keijzer, GeNeura Team, 1999, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,8 +27,8 @@ #include -/** -Fitness continuation: +/** +Fitness continuation: Continues until the maximum fitness level is reached. */ @@ -39,18 +39,17 @@ public: /// Define Fitness typedef typename EOT::Fitness FitnessType; - /// Ctor + /// Ctor eoFitContinue( const FitnessType _maximum) - : eoContinue (), maximum( _maximum ) {}; + : eoContinue (), maximum( _maximum ) {}; - /** Returns false when a fitness criterium is - * reached. Assumes pop is not sorted! */ - virtual bool operator() ( const eoPop& _pop ) + /** Returns false when a fitness criterium is reached. Assumes pop is not sorted! */ + virtual bool operator() ( const eoPop& _pop ) { FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); - if (bestCurrentFitness >= maximum) + if (bestCurrentFitness >= maximum) { - std::cout << "STOP in eoFitContinue: Best fitness has reached " << + std::cout << "STOP in eoFitContinue: Best fitness has reached " << bestCurrentFitness << "\n"; return false; } diff --git a/eo/src/eoInitializer.h b/eo/src/eoInitializer.h index 3900ffe41..44933666a 100644 --- a/eo/src/eoInitializer.h +++ b/eo/src/eoInitializer.h @@ -68,7 +68,7 @@ public: eoParticleBestInit &_initBest, eoTopology &_topology, eoPop < POT > &_pop - ) : proc(_proc), procPara(dummyEval), initVelo(_initVelo), initBest(_initBest), topology(_topology), pop(_pop) + ) : proc(_proc), initVelo(_initVelo), procPara(dummyEval), initBest(_initBest), topology(_topology), pop(_pop) {} //! Constructor for parallel evaluation @@ -110,15 +110,15 @@ private : /* @param proc First evaluation @param initVelo Initialization of the velocity - @param initBest Initialization of the best - */ + @param initBest Initialization of the best + */ eoUF& proc; eoVelocityInit < POT > & initVelo; eoParticleBestInit & initBest; - eoPopEvalFunc & procPara; + eoPopEvalFunc & procPara; eoTopology & topology; eoPop < POT > & pop; - + class eoDummyEval : public eoPopEvalFunc { public: diff --git a/eo/src/eoTwoOptMutation.h b/eo/src/eoTwoOptMutation.h index d6e27ca0c..edeeb2f2e 100644 --- a/eo/src/eoTwoOptMutation.h +++ b/eo/src/eoTwoOptMutation.h @@ -1,29 +1,27 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - //----------------------------------------------------------------------------- // eoTwoOptMutation.h // (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 // (c) INRIA Futurs - Dolphin Team - Thomas Legrand 2007 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. +/* +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - thomas.legrand@lifl.fr - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ +Contact: todos@geneura.ugr.es, http://geneura.ugr.es +thomas.legrand@lifl.fr +Marc.Schoenauer@polytechnique.fr +mak@dhi.dk +*/ //----------------------------------------------------------------------------- #ifndef eoTwoOptMutation_h @@ -33,48 +31,52 @@ /** - * Especially designed for combinatorial problem such as the TSP. - */ +* Especially designed for combinatorial problem such as the TSP. +*/ template class eoTwoOptMutation: public eoMonOp { - public: - - typedef typename EOT::AtomType GeneType; - - /// CTor - eoTwoOptMutation(){} - - - /// The class name. - virtual std::string className() const { return "eoTwoOptMutation"; } +public: + typedef typename EOT::AtomType GeneType; - /** - * - * @param eo The cromosome which is going to be changed. - */ - bool operator()(EOT& _eo) - { - unsigned i,j,from,to; - - // generate two different indices - i=eo::rng.random(_eo.size()); - do j = eo::rng.random(_eo.size()); while (i == j); - - from=std::min(i,j); - to=std::max(i,j); - int idx =(to-from)/2; - - // inverse between from and to - for(unsigned int k = 0; k <= idx ;k++) - std::swap(_eo[from+k],_eo[to-k]); + /// CTor + eoTwoOptMutation(){} - return true; + /// The class name. + virtual std::string className() const { return "eoTwoOptMutation"; } + + /** + * + * @param eo The cromosome which is going to be changed. + */ + bool operator()(EOT& _eo) { + // generate two different indices + unsigned i(eo::rng.random(_eo.size())); + unsigned j; + do { + j = eo::rng.random(_eo.size()); + } while(i == j); + unsigned from(std::min(i,j)); + unsigned to(std::max(i,j)); + unsigned idx((to - from)/2); + + // inverse between from and to + for(unsigned k = 0; k <= idx; ++k) + std::swap(_eo[from+k],_eo[to-k]); + return true; } - + }; //----------------------------------------------------------------------------- #endif + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 7d8748935..989f32100 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -35,9 +35,10 @@ //----------------------------------------------------------------------------- -#include // std::ostream, std::istream -#include // bind2nd -#include // std::string +#include +#include +#include +#include #include "eoVector.h" @@ -102,7 +103,7 @@ public: { resize(bits.size()); std::transform(bits.begin(), bits.end(), begin(), - std::bind2nd(std::equal_to(), '1')); + std::bind2nd(std::equal_to(), '1')); } } }; @@ -113,6 +114,9 @@ public: // Local Variables: +// coding: iso-8859-1 // mode: C++ +// c-file-offsets: ((c . 0)) // c-file-style: "Stroustrup" +// fill-column: 80 // End: diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 08516138c..9be61020b 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -41,7 +41,7 @@ class eoExternalEO : public EO, virtual public External public : eoExternalEO() - : EO(), External() + : External(), EO() {} /** Init externalEo with the struct itself and set fitness to zero */ diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 5dff408af..d94d53462 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -1,5 +1,3 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - //----------------------------------------------------------------------------- // eoFileSnapshot.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 @@ -27,8 +25,10 @@ #ifndef _eoFileSnapshot_h #define _eoFileSnapshot_h -#include +#include #include +#include + #include #include #include @@ -188,3 +188,12 @@ private : }; #endif + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/eo/src/utils/eoGnuplot1DSnapshot.cpp b/eo/src/utils/eoGnuplot1DSnapshot.cpp index 10dba9230..b41477a22 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.cpp +++ b/eo/src/utils/eoGnuplot1DSnapshot.cpp @@ -11,7 +11,6 @@ eoMonitor& eoGnuplot1DSnapshot::operator()() // update file using the eoFileMonitor method eoFileSnapshot::operator()(); #ifdef HAVE_GNUPLOT - // sends plot order to gnuplot std::ostringstream os; os << "set title 'Gen. " << getCounter() << "'; plot '" @@ -25,8 +24,10 @@ eoMonitor& eoGnuplot1DSnapshot::operator()() } - // Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) // c-file-style: "Stroustrup" // fill-column: 80 // End: diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index 1d7b2e5c2..6647cf01e 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -1,9 +1,7 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - //----------------------------------------------------------------------------- // make_help.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -26,19 +24,21 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif -#include +#include #include #include +#include + using namespace std; /** Generation of the status file, and output of the help message if needed * * MUST be called after ALL parameters have been read in order to list them * - * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, + * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, * but compiled separately and stored in a library. * * It is declared in all make_xxx.h files in representation-dependent dirs @@ -63,15 +63,15 @@ void make_help(eoParser & _parser) if (_parser.userNeedsHelp()) { _parser.printHelp(cout); - cout << "You can use an edited copy of file " << statusParam.value() + cout << "You can use an edited copy of file " << statusParam.value() << " as parameter file" << endl; exit(1); } } -/** test a dir. +/** test a dir. * Creates it if does not exist - * If exists, throws an exception or erase everything there, + * If exists, throws an exception or erase everything there, * depending on last parameter * * Always return true (for code easy writing on the other side :-) @@ -107,3 +107,12 @@ bool testDirRes(std::string _dirName, bool _erase=true) throw runtime_error(s); return true; } + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 30fb00085..d62e5ade1 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -1,13 +1,11 @@ -//----------------------------------------------------------------------------- - // to avoid long name warnings #ifdef _MSC_VER #pragma warning(disable:4786) #endif -#include // runtime_error +#include +#include -// general #include //----------------------------------------------------------------------------- From 86cda0d3b6d8f01c149b4aaefd3ad49c5a96dfca Mon Sep 17 00:00:00 2001 From: kuepper Date: Mon, 31 Mar 2008 19:12:12 +0000 Subject: [PATCH 1409/2134] start preparation for 1.1 release --- eo/NEWS | 4 ++++ eo/doc/index.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/eo/NEWS b/eo/NEWS index a299baaf2..e51662cee 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,3 +1,7 @@ +* release 1.1 (not yet released) + - provide cmake build system + - GCC 4.3 compatibility + * release 1.0.1 (23. Jan. 2006) - Templates/ improvements diff --git a/eo/doc/index.h b/eo/doc/index.h index 6948e8450..b44f98631 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -72,6 +72,8 @@ algorithms, evaluators. Try to adapt most well-know algorithms to EO @todo (old) Integrate the gTK interface seamlessly in the library. @todo Complete documentation. + +@todo (for release 1.1) Update README, INSTALL, ... for cmake based build system. */ From 7a7340f9ad3e224dd88c6af3991123414edea884 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 17 Apr 2008 14:26:59 +0000 Subject: [PATCH 1410/2134] new crossover dedicated to permutation-based representation --- eo/src/eoOrderXover.h | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 eo/src/eoOrderXover.h diff --git a/eo/src/eoOrderXover.h b/eo/src/eoOrderXover.h new file mode 100644 index 000000000..3d0e89393 --- /dev/null +++ b/eo/src/eoOrderXover.h @@ -0,0 +1,86 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoOrderXover.h +//----------------------------------------------------------------------------- + +#ifndef eoOrderXover_h +#define eoOrderXover_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + +/** + * apply orderXover on two chromosomes. + * Example: + * With 2 parents p1= [1,2,4,3,6,5], p2= [4,5,3,1,6,2] + * It applies a random cut between ("|") two indices. Example: the second element and the fourth: + * p1 : [1|2,4,3|6,5] and p2 : [4|5,3,1|6,2] generate two children: + * c1 = [2,4,3,6,5,1] 2,4,3 taken from p1 and 6,5,1 from p2 + * c2 = [5,3,1,6,2,4] 5,3,1 taken from p2 and 6,2,4 from p1 + */ +template class eoOrderXover: public eoQuadOp +{ + public: + /// The class name. + virtual std::string className() const { return "eoOrderXover"; } + + /** + * @return true if the chromosome has changed + * @param _chrom1 The first chromosome which will be crossed with chrom2. + * @param _chrom2 The second chromosome which will be crossed with chrom1. + */ + bool operator()(Chrom& _chrom1, Chrom& _chrom2){ + + char direction=eo::rng.flip()? 1 : -1; + unsigned cut2= 1 + eo::rng.random(_chrom1.size()); + unsigned cut1= eo::rng.random(cut2); + Chrom tmp1= _chrom1; + Chrom tmp2= _chrom2; + + cross(tmp1, tmp2, _chrom1, direction, cut1, cut2); + cross(tmp2, tmp1, _chrom2, direction, cut1, cut2); + + _chrom1.invalidate(); + _chrom2.invalidate(); + + return true; + } + + private: + + /** + * @param _chrom1 The first parent chromosome. + * @param _chrom2 The second parent chromosome. + * @param _child The result chromosome. + * @param _direction The direction of the OrderXover (left: -1 or right: 1) + */ + void cross(Chrom& _chrom1, Chrom& _chrom2, Chrom& _child, char _direction, unsigned _cut1, unsigned _cut2){ + + unsigned size, id=0, from=0; + size= _chrom1.size(); + + std::vector verif(size, false); + + for(unsigned i= _cut1; i<_cut2; i++){ + _child[id++]= _chrom1[i]; + verif[_chrom1[i] % size] = true; + } + + while(_chrom2[from] != _child[_cut2 - 1]) + from++; + + for(unsigned i=0; i Date: Thu, 17 Apr 2008 14:29:10 +0000 Subject: [PATCH 1411/2134] test of eoOrderXover --- eo/test/t-eoOrderXover.cpp | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 eo/test/t-eoOrderXover.cpp diff --git a/eo/test/t-eoOrderXover.cpp b/eo/test/t-eoOrderXover.cpp new file mode 100644 index 000000000..1280cf84d --- /dev/null +++ b/eo/test/t-eoOrderXover.cpp @@ -0,0 +1,71 @@ +//----------------------------------------------------------------------------- +// t-eoOrderXover.cpp +//----------------------------------------------------------------------------- + +#include + +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- +// Return true if the given chromosome corresponds to a permutation +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; +} + + +int main() +{ + const unsigned POP_SIZE = 3, CHROM_SIZE = 8; + unsigned i; + + // a chromosome randomizer + eoInitPermutation random(CHROM_SIZE); + + // the population: + eoPop pop; + + // Evaluation + //eoEvalFuncPtr eval( real_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + //eval(chrom); + pop.push_back(chrom); + } + + // a shift mutation + eoOrderXover cross; + + for (i = 0; i < POP_SIZE; ++i) + std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; + + cross(pop[0],pop[1]); + cross(pop[1],pop[2]); + + for (i = 0; i < POP_SIZE; ++i) { + std::cout << " Initial chromosome n°" << i << " becomes : " << pop[i] << " after orderXover" << std::endl; + check_permutation(pop[i]); + } + return 0; +} + +//----------------------------------------------------------------------------- From b2404c9daa6a3fe1715130a88c657300db47f115 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 17 Apr 2008 14:29:57 +0000 Subject: [PATCH 1412/2134] Add t-eoOrderXover in the test list --- eo/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index f1a4112ae..0cb39405a 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -70,6 +70,7 @@ SET (TEST_LIST t-eoParetoFitness t-eoTwoOptMutation t-eoRingTopology t-eoSyncEasyPSO + t-eoOrderXover # t-eoFrontSorter # t-eoEpsMOEA ) From 4b844243cebb20dc68a26f9f00cfd3588fa45267 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 17 Apr 2008 14:31:11 +0000 Subject: [PATCH 1413/2134] new implementation of the test --- eo/test/t-eoShiftMutation.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/eo/test/t-eoShiftMutation.cpp b/eo/test/t-eoShiftMutation.cpp index 928cdf306..afc277496 100644 --- a/eo/test/t-eoShiftMutation.cpp +++ b/eo/test/t-eoShiftMutation.cpp @@ -6,6 +6,7 @@ #include #include +#include //----------------------------------------------------------------------------- @@ -23,19 +24,19 @@ double real_value(const Chrom & _chrom) } // Return true if the given chromosome corresponds to a permutation -// There must be an nicer way to do it (set?) ... -bool check_permutation(const Chrom & _chrom) -{ - for (unsigned i = 0; i < _chrom.size(); ++i) - for (unsigned j = 0; j < _chrom.size(); ++j) - if(i!=j) - if(_chrom[i]==_chrom[j]){ - std::cout << " Error: Wrong permutation !" << std::endl; - std::string s; - s.append( " Wrong permutation in t-eoShiftMutation"); - throw std::runtime_error( s ); - } - return true; +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; } From 9d3da02ea95cc7237e5a52cfcd96a03010d02c27 Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 07:58:17 +0000 Subject: [PATCH 1414/2134] deleted old and obsolete paradiseo's pdf slides --- eo/tutorial/pdf/Makefile.am | 2 +- eo/tutorial/pdf/paradiseoJet7.pdf | Bin 530785 -> 0 bytes 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 eo/tutorial/pdf/paradiseoJet7.pdf diff --git a/eo/tutorial/pdf/Makefile.am b/eo/tutorial/pdf/Makefile.am index 6d22a65d1..363f857f7 100644 --- a/eo/tutorial/pdf/Makefile.am +++ b/eo/tutorial/pdf/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = paradiseoJet7.pdf +EXTRA_DIST = diff --git a/eo/tutorial/pdf/paradiseoJet7.pdf b/eo/tutorial/pdf/paradiseoJet7.pdf deleted file mode 100644 index b227633f314b7b2b36e9d5122b992ff201186743..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 530785 zcmdSAbzD^2_diUhfJ*lmq}0GLFm!iGNOy@e3@r#EC@mn}AR!3SohscRC8=~HDgB%Q zz4w0Zz2A7A=l9QVcrknLwbxmD?X}l>pFL-yZfAy&4*LJ{ad$Gez(Z)r1t`Js>jQ>@u4*7V zJe*%77!UaGG%(jc`8c^afyp91e_qSU!_E0m8t*@8FeukQ_+Y&M&;`Q9^Di_Q?C;ld zLjf)RrVBR|Fyr57P#!Lxf6}1;xR!^P=O27Luz!vL19Ni!T^fH^r}f1ewe6a0@g0&{VJ|Gt)BE^f}h&kdk)|J?>)ZVtd%|I>b8 zZoqB-M&r2hL72)~3Fho?yO6Urh8FO%OK`pqs&A`S`7+?S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X7RH~;ic|MJ^k-TZ$cBw;!L From aaa8df129b222063eb2891effb6e9a6271ffd9ee Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 08:19:22 +0000 Subject: [PATCH 1415/2134] updated a few things about paradiseo (links, docs) --- eo/AUTHORS | 4 +++- eo/doc/index.h | 7 ++++--- eo/doc/mainpage.html | 16 +++++++--------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/eo/AUTHORS b/eo/AUTHORS index dc2384bb9..39ec25202 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -5,4 +5,6 @@ Gustavo Romero Lopez Maarten Keijzer Marc Schoenauer Jeroen Eggermont -Jochen Küpper +Jochen Kďż˝pper +Thomas Legrand +Clive Canape \ No newline at end of file diff --git a/eo/doc/index.h b/eo/doc/index.h index b44f98631..35de836cf 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -52,9 +52,10 @@ Conference on Artificial Evolution.

    ParadisEO

    -ParadisEO is a project to -extend EO to make use of dedicated parallel or distributed computing -environments by the INRIA Dolphin project-team. +ParadisEO is a project that +extends EO for the flexible design of single solution-based metaheuristics, +metaheuristics for multi objective optimization as well as hybrid, parallel and distributed +metaheuristics. */ diff --git a/eo/doc/mainpage.html b/eo/doc/mainpage.html index cf0427d5c..e175850c6 100644 --- a/eo/doc/mainpage.html +++ b/eo/doc/mainpage.html @@ -47,9 +47,8 @@ background: #00309c; href="http://www.cs.vu.nl/~mkeijzer">Maarten Keijzer, the C++ wizzard, and Marc Schoenauer. Later came Jeroen - Eggermont, who, among other things, did a lot of work on GP, Sébastien Cahon, who - developped the parallel version of EO, ParadisEO-PEO, , who, among other things, did a lot of work on GP, + INRIA Dolphin Team, Olivier König, who did a lot of useful additions and cleaning of the code and Jochen Küpper, working on @@ -228,16 +227,15 @@ background: #00309c;

    ParadisEO-PEO provides extensions for EO on parallel - architectures.

    + target="_blank">ParadisEO provides EO extensions for + the flexible design of single solution-based metaheuristics, + metaheuristics for multi objective optimization as well as hybrid, parallel and distributed + metaheuristics.

    DegaX is an ActiveX control which embeds EO 0.8.4.

    - -

    MOEO, a multi-objective package on top of EO.

    - + From 78a798d169fad5043fb98e4648192b6163f0e638 Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 08:50:22 +0000 Subject: [PATCH 1416/2134] added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities --- eo/src/eo | 3 +- eo/src/eoLinearTopology.h | 16 ++++--- eo/src/eoStandardVelocity.h | 18 ++++---- eo/src/eoTopology.h | 35 ++++----------- eo/test/CMakeLists.txt | 1 + eo/test/t-eoExtendedVelocity.cpp | 76 ++++++++++++++++++++++++++++++++ eo/test/t-eoRingTopology.cpp | 7 ++- 7 files changed, 110 insertions(+), 46 deletions(-) create mode 100644 eo/test/t-eoExtendedVelocity.cpp diff --git a/eo/src/eo b/eo/src/eo index 0d79e6f13..cd28e8489 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -161,7 +161,8 @@ // velocities #include -#include +#include +#include #include #include #include diff --git a/eo/src/eoLinearTopology.h b/eo/src/eoLinearTopology.h index 21854c185..4c61bf00d 100644 --- a/eo/src/eoLinearTopology.h +++ b/eo/src/eoLinearTopology.h @@ -162,17 +162,19 @@ public: return (neighborhoods[theGoodNhbd].best()); } - /* + + /* * Return the global best of the topology - */ - - virtual POT & globalBest(const eoPop& _pop) + */ + virtual POT & globalBest() { - unsigned howManyNeighborhood=_pop.size()/ neighborhoodSize; POT gBest,tmp; - unsigned indGlobalBest=0; + unsigned indGlobalBest=0; + if(neighborhoods.size()==1) + return neighborhoods[0].best(); + gBest=neighborhoods[0].best(); - for(unsigned i=1;i class eoStandardVelocity:public eoVelocity < POT > { @@ -53,8 +54,8 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology to get the global/local/other best * @param _w - The weight factor. - * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). @@ -79,8 +80,8 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology to get the global/local/other best * @param _w - The weight factor. - * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng @@ -101,9 +102,10 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology to get the global/local/other best * @param _w - The weight factor. - * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoStandardVelocity (eoTopology < POT > & _topology, diff --git a/eo/src/eoTopology.h b/eo/src/eoTopology.h index ca1395a93..827064fe0 100644 --- a/eo/src/eoTopology.h +++ b/eo/src/eoTopology.h @@ -59,36 +59,19 @@ public: for (unsigned i = 0; i < _pop.size (); i++) updateNeighborhood(_pop[i],i); } + /** * Builds the neighborhoods contained in the topology. */ - virtual POT & best (unsigned ) = 0; - - - /* - * Returns the global best particle of the given population. - * Even if the extended topology does not define a global best, - * it should always be possible to get it by searching in all the neighborhoods. - * This method is virtual in order not to have to define it in all the extended topologies. - */ - virtual POT & globalBest(const eoPop& _pop) - { - POT gBest,tmp; - unsigned indGlobalBest=0; - gBest=best(0); - for(unsigned i=1;i<_pop.size();i++) - { - tmp=best(i); - if(gBest.best() < tmp.best()) - { - gBest=tmp; - indGlobalBest=i; - } - - } - return best(indGlobalBest); - } + virtual POT & best (unsigned ) = 0; + + + /* + * Return the global best of the topology + */ + virtual POT & globalBest(){} + /** * Prints the neighborhoods contained in the topology. diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 0cb39405a..07279bec9 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -71,6 +71,7 @@ SET (TEST_LIST t-eoParetoFitness t-eoRingTopology t-eoSyncEasyPSO t-eoOrderXover + t-eoExtendedVelocity # t-eoFrontSorter # t-eoEpsMOEA ) diff --git a/eo/test/t-eoExtendedVelocity.cpp b/eo/test/t-eoExtendedVelocity.cpp new file mode 100644 index 000000000..c019bf695 --- /dev/null +++ b/eo/test/t-eoExtendedVelocity.cpp @@ -0,0 +1,76 @@ +//----------------------------------------------------------------------------- +// t-eoExtendedVelocity.cpp +//----------------------------------------------------------------------------- + + +#include + +typedef eoRealParticle < double > Particle; + +//Evaluation function +double f (const Particle & _particle) +{ + double sum = 0; + for (unsigned i = 0; i < _particle.size (); i++) + sum += pow(_particle[i],2); + return (-sum); +} + +int main_function(int argc, char **argv) +{ + const unsigned POP_SIZE = 6, VEC_SIZE = 2, NEIGHBORHOOD_SIZE=2; + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( f ); + + // position + velocity + best init + eoUniformGenerator < double >uGen (-3, 3); + eoInitFixedLength < Particle > random (VEC_SIZE, uGen); + eoUniformGenerator < double >sGen (-2, 2); + eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); + eoFirstIsBestInit < Particle > localInit; + pop.append (POP_SIZE, random); + + // topology + eoLinearTopology topology(NEIGHBORHOOD_SIZE); + eoInitializer init(eval,veloRandom,localInit,topology,pop); + init(); + + // velocity + eoExtendedVelocity velocity (topology,1,1,1,1); + + // the test itself + for (unsigned int i = 0; i < POP_SIZE; ++i) + { + std::cout << " Initial particle n°" << i << " velocity: " << std::endl; + for (unsigned int j = 0; j < VEC_SIZE; ++j) + std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; + } + + for (unsigned int i = 0; i < POP_SIZE; ++i) + velocity (pop[i],i); + + for (unsigned int i = 0; i < POP_SIZE; ++i) + { + std::cout << " Final particle n°" << i << " velocity: " << std::endl; + for (unsigned int j = 0; j < VEC_SIZE; ++j) + std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; + } + +} + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl; + } + +} diff --git a/eo/test/t-eoRingTopology.cpp b/eo/test/t-eoRingTopology.cpp index 9fd1a47ca..e7d7488da 100644 --- a/eo/test/t-eoRingTopology.cpp +++ b/eo/test/t-eoRingTopology.cpp @@ -16,7 +16,7 @@ double f (const Indi & _indi) return (-sum); } -int the_main(int argc, char **argv) +int main_function(int argc, char **argv) { //Parameters const unsigned int VEC_SIZE = 2; @@ -31,7 +31,6 @@ int the_main(int argc, char **argv) eoUniformGenerator < double >sGen (-1., 1.); eoVelocityInitFixedLength < Indi > veloRandom (VEC_SIZE, sGen); eoFirstIsBestInit < Indi > localInit; - eoStandardFlight < Indi > flight; eoPop < Indi > pop; pop.append (POP_SIZE, random); apply(eval, pop); @@ -58,11 +57,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + main_function(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; + std::cout << "Exception: " << e.what() << " in t-eoRingTopology" << std::endl; } } From 49d3df2cc4f3683e1416c36ac68ad85bb722cb09 Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 08:51:38 +0000 Subject: [PATCH 1417/2134] updated the doc tags --- eo/src/eoRingTopology.h | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/eo/src/eoRingTopology.h b/eo/src/eoRingTopology.h index d1046bd64..bd5ba7b52 100644 --- a/eo/src/eoRingTopology.h +++ b/eo/src/eoRingTopology.h @@ -74,7 +74,7 @@ public: if(_pop[(_pop.size()+i-k+j)%_pop.size()].fitness() > currentNghd.best().fitness()) currentNghd.best(_pop[(_pop.size()+i-k+j)%_pop.size()]); } - neighborhood.push_back(currentNghd); + neighborhoods.push_back(currentNghd); } isSetup=true; } @@ -119,8 +119,8 @@ public: for (unsigned i=-neighborhoodSize+1; i < neighborhoodSize; i++) { unsigned indi = (_po.size()+_indice+i)%_po.size(); - if (_po.fitness() > neighborhood[indi].best().fitness()) - neighborhood[indi].best(_po); + if (_po.fitness() > neighborhoods[indi].best().fitness()) + neighborhoods[indi].best(_po); } } @@ -134,7 +134,7 @@ public: { unsigned theGoodNhbd= retrieveNeighborhoodByIndice(_indice); - return (neighborhood[theGoodNhbd].best()); + return (neighborhoods[theGoodNhbd].best()); } @@ -145,20 +145,44 @@ public: */ void printOn() { - for (unsigned i=0;i< neighborhood.size();i++) + for (unsigned i=0;i< neighborhoods.size();i++) { std::cout << "{ " ; - for (unsigned j=0;j< neighborhood[i].size();j++) + for (unsigned j=0;j< neighborhoods[i].size();j++) { - std::cout << neighborhood[i].get(j) << " "; + std::cout << neighborhoods[i].get(j) << " "; } std::cout << "}" << std::endl; } } + + /* + * Return the global best of the topology + */ + virtual POT & globalBest() + { + POT gBest,tmp; + unsigned indGlobalBest=0; + if(neighborhoods.size()==1) + return neighborhoods[0].best(); + + gBest=neighborhoods[0].best(); + for(unsigned i=1;i > neighborhood; + std::vector > neighborhoods; unsigned neighborhoodSize; bool isSetup; }; From a1ee120589c7df7270a42027ed4cc2af6fcd5c5e Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 08:58:42 +0000 Subject: [PATCH 1418/2134] imrproved PSO topology/velocity tests --- eo/test/t-eoExtendedVelocity.cpp | 10 +++++----- eo/test/t-eoOrderXover.cpp | 9 +++++---- eo/test/t-eoSwapMutation.cpp | 30 ++++++++++++++++-------------- eo/test/t-eoTwoOptMutation.cpp | 30 ++++++++++++++++-------------- 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/eo/test/t-eoExtendedVelocity.cpp b/eo/test/t-eoExtendedVelocity.cpp index c019bf695..d40d28817 100644 --- a/eo/test/t-eoExtendedVelocity.cpp +++ b/eo/test/t-eoExtendedVelocity.cpp @@ -43,20 +43,20 @@ int main_function(int argc, char **argv) eoExtendedVelocity velocity (topology,1,1,1,1); // the test itself - for (unsigned int i = 0; i < POP_SIZE; ++i) + for (unsigned int i = 0; i < POP_SIZE; i++) { std::cout << " Initial particle n°" << i << " velocity: " << std::endl; - for (unsigned int j = 0; j < VEC_SIZE; ++j) + for (unsigned int j = 0; j < VEC_SIZE; j++) std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; } - for (unsigned int i = 0; i < POP_SIZE; ++i) + for (unsigned int i = 0; i < POP_SIZE; i++) velocity (pop[i],i); - for (unsigned int i = 0; i < POP_SIZE; ++i) + for (unsigned int i = 0; i < POP_SIZE; i++) { std::cout << " Final particle n°" << i << " velocity: " << std::endl; - for (unsigned int j = 0; j < VEC_SIZE; ++j) + for (unsigned int j = 0; j < VEC_SIZE; j++) std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; } diff --git a/eo/test/t-eoOrderXover.cpp b/eo/test/t-eoOrderXover.cpp index 1280cf84d..f44b8c69d 100644 --- a/eo/test/t-eoOrderXover.cpp +++ b/eo/test/t-eoOrderXover.cpp @@ -2,11 +2,12 @@ // t-eoOrderXover.cpp //----------------------------------------------------------------------------- -#include +#include +#include #include #include -#include + //----------------------------------------------------------------------------- @@ -56,13 +57,13 @@ int main() eoOrderXover cross; for (i = 0; i < POP_SIZE; ++i) - std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; + std::cout << " Initial chromosome nďż˝" << i << " : " << pop[i] << "..." << std::endl; cross(pop[0],pop[1]); cross(pop[1],pop[2]); for (i = 0; i < POP_SIZE; ++i) { - std::cout << " Initial chromosome n°" << i << " becomes : " << pop[i] << " after orderXover" << std::endl; + std::cout << " Initial chromosome nďż˝" << i << " becomes : " << pop[i] << " after orderXover" << std::endl; check_permutation(pop[i]); } return 0; diff --git a/eo/test/t-eoSwapMutation.cpp b/eo/test/t-eoSwapMutation.cpp index af35b42fd..f2c33789e 100644 --- a/eo/test/t-eoSwapMutation.cpp +++ b/eo/test/t-eoSwapMutation.cpp @@ -2,8 +2,9 @@ // t-eoSwapMutation.cpp //----------------------------------------------------------------------------- -#include +#include +#include #include #include @@ -22,20 +23,21 @@ double real_value(const Chrom & _chrom) return sum/_chrom.size(); } +//----------------------------------------------------------------------------- // Return true if the given chromosome corresponds to a permutation -// There must be an nicer way to do it (set?) ... -bool check_permutation(const Chrom & _chrom) -{ - for (unsigned i = 0; i < _chrom.size(); ++i) - for (unsigned j = 0; j < _chrom.size(); ++j) - if(i!=j) - if(_chrom[i]==_chrom[j]){ - std::cout << " Error: Wrong permutation !" << std::endl; - std::string s; - s.append( " Wrong permutation in t-eoSwapMutation"); - throw std::runtime_error( s ); - } - return true; +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; } diff --git a/eo/test/t-eoTwoOptMutation.cpp b/eo/test/t-eoTwoOptMutation.cpp index bfc68fe6e..95e713a6c 100644 --- a/eo/test/t-eoTwoOptMutation.cpp +++ b/eo/test/t-eoTwoOptMutation.cpp @@ -2,8 +2,9 @@ // t-eoTwoOptMutation.cpp //----------------------------------------------------------------------------- -#include +#include +#include #include #include @@ -22,20 +23,21 @@ double real_value(const Chrom & _chrom) return sum/_chrom.size(); } +//----------------------------------------------------------------------------- // Return true if the given chromosome corresponds to a permutation -// There must be an nicer way to do it (set?) ... -bool check_permutation(const Chrom & _chrom) -{ - for (unsigned i = 0; i < _chrom.size(); ++i) - for (unsigned j = 0; j < _chrom.size(); ++j) - if(i!=j) - if(_chrom[i]==_chrom[j]){ - std::cout << " Error: Wrong permutation !" << std::endl; - std::string s; - s.append( " Wrong permutation in t-eoTwoOptMutation"); - throw std::runtime_error( s ); - } - return true; +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; } From a93ed43907db7426d72318bdca73f0096a606eed Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 08:59:02 +0000 Subject: [PATCH 1419/2134] added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities --- eo/src/eoExtendedVelocity.h | 208 ++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 eo/src/eoExtendedVelocity.h diff --git a/eo/src/eoExtendedVelocity.h b/eo/src/eoExtendedVelocity.h new file mode 100644 index 000000000..1a39c2ce8 --- /dev/null +++ b/eo/src/eoExtendedVelocity.h @@ -0,0 +1,208 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoExtendedVelocity.h +// (c) INRIA Dolphin 2008 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoExtendedVelocity_H +#define eoExtendedVelocity_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** Extended velocity performer for particle swarm optimization. Derivated from abstract eoVelocity, +* At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) +* It includes both a "topology" best and a global best in the social knowledge. Each topology +* provides a method to retrieve the global best <=> the best of all the neighborhood the topology contains. +*/ +template < class POT > class eoExtendedVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology + * @param _w - The weight factor. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local best + * @param _c3 - Learning factor used for the global best + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoExtendedVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology + * @param _w - The weight factor. + * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType + * @param _c3 - Learning factor used for the global best + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoExtendedVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology + * @param _w - The weight factor. + * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType + * @param _c3 - Learning factor used for the global best + * @param _gen - The eo random generator, default=rng + */ + eoExtendedVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + VelocityType r3; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + r3 = (VelocityType) rng.uniform (1) * c3; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= omega * _po.velocities[j] + + r1 * (_po.bestPositions[j] - _po[j]) + + r2 * (topology.best (_indice)[j] - _po[j]) + + r3 * (topology.globalBest()[j] - _po[j]); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + //! eoTopology getTopology + //! @return topology + + eoTopology & getTopology () + { + return topology; + } + +protected: + eoTopology < POT > & topology; + const VelocityType & omega; // social/cognitive coefficient + const VelocityType & c1; + const VelocityType & c2; // social/cognitive coefficient + const VelocityType & c3; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + + +#endif /*eoExtendedVelocity_H */ + From aa33f98459d05f8bbb829948fc54524ab112afee Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 18 Apr 2008 12:00:15 +0000 Subject: [PATCH 1420/2134] deleted "win" directory in the autotools config --- eo/Makefile.am | 2 +- eo/configure.in | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/eo/Makefile.am b/eo/Makefile.am index 76c8d1374..e9b7e7aa8 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -8,7 +8,7 @@ if USE_TUTORIAL SUBDIRS_TUT = tutorial endif -SUBDIRS = src doc contrib win $(SUBDIRS_APP) $(SUBDIRS_TUT) test +SUBDIRS = src doc contrib $(SUBDIRS_APP) $(SUBDIRS_TUT) test # Directory for documents diff --git a/eo/configure.in b/eo/configure.in index bcd1abb9f..6cd843467 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -68,5 +68,4 @@ AC_OUTPUT(Makefile \ tutorial/Lesson4/Makefile \ tutorial/Lesson5/Makefile \ tutorial/Templates/Makefile \ - tutorial/pdf/Makefile \ - win/Makefile) + tutorial/pdf/Makefile) From 74c5be143994aa239169d0f5bc317cfe44793753 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 5 May 2008 12:33:26 +0000 Subject: [PATCH 1421/2134] updated configure.in to generate moo files --- eo/configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/configure.in b/eo/configure.in index 6cd843467..6aaa54484 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -59,6 +59,7 @@ AC_OUTPUT(Makefile \ src/ga/Makefile \ src/other/Makefile \ src/utils/Makefile \ + src/moo/Makefile \ test/Makefile \ tutorial/Makefile \ tutorial/html/Makefile \ From 512c18b0d06c3ec1c972016ee13df89dfc7d77cf Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 11 Nov 2008 09:50:52 +0000 Subject: [PATCH 1422/2134] fixed some stupid problems --- eo/src/gp/eoStParseTreeOp.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/eo/src/gp/eoStParseTreeOp.h b/eo/src/gp/eoStParseTreeOp.h index 28bd3ff83..860e1a7c8 100644 --- a/eo/src/gp/eoStParseTreeOp.h +++ b/eo/src/gp/eoStParseTreeOp.h @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -82,7 +83,7 @@ public: int n = 0; int type = 0; int j = 0; - set test; + std::set test; do { do // select a random node in _eo1 as crossover point, and check if we didn't try it already @@ -106,7 +107,9 @@ public: n = rng.random(nodes.size()); j = nodes[n]; - parse_tree::subtree tmp = _eo1[i]; + + + typename eoParseTree::subtree tmp = _eo1[i]; _eo1[i] = _eo2[j]; // insert subtree _eo2[j] = tmp; @@ -208,15 +211,15 @@ public: unsigned int i=0; int arity=0; int type=0; - std::vector node_std::vector; + std::vector node_vector; for(i=0; i < _node.size(); i++) { arity = _node[i].arity(); type = _node[i].type(); - node_std::vector = node[type][arity]; - node_std::vector.push_back(_node[i]); - node[type][arity]= node_std::vector; + node_vector = node[type][arity]; + node_vector.push_back(_node[i]); + node[type][arity]= node_vector; }; }; @@ -246,7 +249,7 @@ public: private : - map < int, map < int, std::vector > > node; + std::map < int, std::map < int, std::vector > > node; }; @@ -286,13 +289,7 @@ public: // get the type of the current tree int type = _eo1[ _eo1.size() - 1 ]->type(); - - - do - { - initializer(eo2); - get_possible_nodes(eo2, nodes, type); - }while (nodes.empty()); + get_possible_nodes(_eo1, nodes, type); // select a subtree-node to replace the current tree int n = rng.random(nodes.size()); From 462d3ac5683c818ae92a16df1e5a7ab79a26a972 Mon Sep 17 00:00:00 2001 From: jeggermo Date: Tue, 11 Nov 2008 09:51:17 +0000 Subject: [PATCH 1423/2134] fixed some very old and stupid problems --- eo/src/gp/eoStParseTreeDepthInit.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index 3dac6f134..5aeee4e9c 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -32,6 +32,7 @@ #include #include +#include using namespace gp_parse_tree; @@ -90,27 +91,27 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > unsigned int i=0; int arity=0; int type=0; - std::vector node_std::vector; + std::vector node_vector; for(i=0; i < _node.size(); i++) { arity = _node[i].arity(); type = _node[i].type(); if(arity==0) { - node_std::vector = node[type][TERMINAL]; - node_std::vector.push_back(_node[i]); - node[type][TERMINAL]= node_std::vector; + node_vector = node[type][TERMINAL]; + node_vector.push_back(_node[i]); + node[type][TERMINAL]= node_vector; } else //if (arity != 0) // non-terminal { - node_std::vector = node[type][NONTERMINAL]; - node_std::vector.push_back(_node[i]); - node[type][NONTERMINAL] = node_std::vector; + node_vector = node[type][NONTERMINAL]; + node_vector.push_back(_node[i]); + node[type][NONTERMINAL] = node_vector; } - node_std::vector = node[type][ALL]; - node_std::vector.push_back(_node[i]); - node[type][ALL] = node_std::vector; + node_vector = node[type][ALL]; + node_vector.push_back(_node[i]); + node[type][ALL] = node_vector; } @@ -181,7 +182,7 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > unsigned max_depth; - map < int, map < int, std::vector > > node; + std::map < int, std::map < int, std::vector > > node; int return_type; bool grow; From 48204d18ff68108472ddd4d7f4544c0663abe562 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Mon, 17 Nov 2008 10:27:55 +0000 Subject: [PATCH 1424/2134] Switch from Dart to Dash. --- eo/CTestConfig.cmake | 7 +++++++ eo/DartConfig.cmake | 13 ------------- 2 files changed, 7 insertions(+), 13 deletions(-) create mode 100644 eo/CTestConfig.cmake delete mode 100644 eo/DartConfig.cmake diff --git a/eo/CTestConfig.cmake b/eo/CTestConfig.cmake new file mode 100644 index 000000000..465d208d6 --- /dev/null +++ b/eo/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "ParadisEO") +set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "cdash.inria.fr") +set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/eo/DartConfig.cmake b/eo/DartConfig.cmake deleted file mode 100644 index 53b66a905..000000000 --- a/eo/DartConfig.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -############################################################################# -# Dart config for report submission -############################################################################# - -SET (DROP_METHOD "xmlrpc") -SET (DROP_SITE "http://dart.irisa.fr") -SET (DROP_LOCATION "ParadisEO") -SET (CVS_WEB_URL "http://eodev.cvs.sourceforge.net/eodev/") -SET (CVS_WEB_CVSROOT "eo") -SET (NIGHTLY_START_TIME "23:00:00 WEST") - -############################################################################# From 916152b02ef1373e1a7517b473731a1bfc96b25b Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 20 Nov 2008 16:35:47 +0000 Subject: [PATCH 1425/2134] remove DartConfig --- eo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 07608326f..258aaec29 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -52,7 +52,7 @@ INCLUDE(ConfigureChecks.cmake) INCLUDE(Dart OPTIONNAL) # the project can have a DartConfig.cmake file -INCLUDE(DartConfig.cmake OPTIONNAL) +#INCLUDE(DartConfig.cmake OPTIONNAL) # now create config headers configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) From 8c40a38cdc672175839c90f3132ba935bafd4d56 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Fri, 5 Dec 2008 13:55:41 +0000 Subject: [PATCH 1426/2134] add "=0;" at the end of two virtual method --- eo/src/eoTopology.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/src/eoTopology.h b/eo/src/eoTopology.h index 827064fe0..531f1fe9d 100644 --- a/eo/src/eoTopology.h +++ b/eo/src/eoTopology.h @@ -33,7 +33,7 @@ /** * Defines the interface of a swarm topology. Can be static (usually the case for the social topologies) - * or dynamic. It's the same interface for both social and physical topologies. ("social" topology means + * or dynamic. It's the same interface for both social and physical topologies. ("social" topology means * social-neighborhood-based toplogy and so on ...) */ template < class POT > class eoTopology:public eoPop < POT > @@ -59,24 +59,24 @@ public: for (unsigned i = 0; i < _pop.size (); i++) updateNeighborhood(_pop[i],i); } - + /** * Builds the neighborhoods contained in the topology. */ - virtual POT & best (unsigned ) = 0; + virtual POT & best (unsigned ) = 0; /* * Return the global best of the topology - */ - virtual POT & globalBest(){} + */ + virtual POT & globalBest() = 0; /** * Prints the neighborhoods contained in the topology. */ - virtual void printOn(){} + virtual void printOn() = 0; }; From 893204f8f1293644092ff1541ac2234af0faa44d Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 25 Dec 2008 16:01:57 +0000 Subject: [PATCH 1427/2134] Fixing a small glitch that was giving wrong clues to newcomers ... Thanks to Christophe-Marie Duquesne for the post --- eo/tutorial/html/eoProgramming.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index a986b341a..64fca549f 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -36,13 +36,13 @@ the fitness: an EO object is some object which has a fitness of some type F that can be anything. The definition for that is (see EO.h)

    template<class F> class EO

    The idea is that, later in your code, you can define a class as follows -(see for instance  eoBit.h). -

    template<class F> class eoBit : public +(see for instance  eoOneMax.h - or check Lesson 5 for more details). +

    template<class F> class eoOneMax : public EO<F> -
    { ... code for eoBit  }; +
    { ... code for eoOneMax  };

    and then use it in your application as -

    eoBit<double> myeoBit; -

    declares an object of type eoBin which has as fitness a double. +

    eoOneMax<double> myeoBit; +

    declares an object of type eoOneMax which has as fitness a double.

    Whereas the advantages are obvious (writing generic reusable code instead of having to rewrite the same pieces of code for different types), there From f2d19ce1878326343a641e748f1cb5257d506da8 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Mon, 12 Jan 2009 09:14:02 +0000 Subject: [PATCH 1428/2134] Update to cmake2.6 + modif to support compatibility with icc --- eo/CMakeLists.txt | 21 ++++++++------- eo/app/CMakeLists.txt | 5 ++-- eo/src/utils/eoStat.h | 8 +++--- eo/tutorial/CMakeLists.txt | 7 ++++- eo/tutorial/Lesson4/CMakeLists.txt | 41 ++++++++++++++++++------------ 5 files changed, 50 insertions(+), 32 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 258aaec29..e9dccf3d4 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -1,4 +1,4 @@ - + ###################################################################################### ### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line ###################################################################################### @@ -24,7 +24,7 @@ SET(VERSION "1.02" CACHE STRING "Global version" FORCE) SET(GLOBAL_VERSION "${VERSION}") # check cmake version compatibility -CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) # regular expression checking INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") @@ -51,9 +51,6 @@ INCLUDE(ConfigureChecks.cmake) INCLUDE(Dart OPTIONNAL) -# the project can have a DartConfig.cmake file -#INCLUDE(DartConfig.cmake OPTIONNAL) - # now create config headers configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) @@ -110,13 +107,16 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) ##################################################################################### +###################################################################################### +### compilation of examples? +###################################################################################### + +SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?") ###################################################################################### ### 4) Test config ###################################################################################### -#SET(ENABLE_CMAKE_TESTING TRUE CACHE BOOL "Enable testing ?") - IF (ENABLE_CMAKE_TESTING) ENABLE_TESTING() ENDIF (ENABLE_CMAKE_TESTING) @@ -127,6 +127,9 @@ ENDIF (ENABLE_CMAKE_TESTING) ### 5) Where must cmake go now ? ###################################################################################### -SUBDIRS(app doc src test tutorial) - +ADD_SUBDIRECTORY(app) +ADD_SUBDIRECTORY(doc) +ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(test) +ADD_SUBDIRECTORY(tutorial) ###################################################################################### diff --git a/eo/app/CMakeLists.txt b/eo/app/CMakeLists.txt index 587a4584f..2a56c9ce5 100644 --- a/eo/app/CMakeLists.txt +++ b/eo/app/CMakeLists.txt @@ -3,6 +3,7 @@ ### 1) Where must cmake go now ? ###################################################################################### -SUBDIRS(gprop gpsymreg mastermind) - +ADD_SUBDIRECTORY(gprop) +ADD_SUBDIRECTORY(gpsymreg) +ADD_SUBDIRECTORY(mastermind) ###################################################################################### diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 5ece2686a..a0cf08a67 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -71,7 +71,7 @@ public: virtual std::string className(void) const { return "eoStat"; } - + eoStat& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } eoStat& addTo(eoMonitor& mon) { mon.add(*this); return *this; } }; @@ -87,7 +87,7 @@ class eoSortedStatBase : public eoUF&, void> public: virtual void lastCall(const std::vector&) {} virtual std::string className(void) const { return "eoSortedStatBase"; } - + }; /** @@ -101,7 +101,7 @@ class eoSortedStat : public eoSortedStatBase, public eoValueParam(_value, _desc) {} virtual std::string className(void) const { return "eoSortedStat"; } - + eoSortedStat& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } eoSortedStat& addTo(eoMonitor& mon) { mon.add(*this); return *this; } }; @@ -392,7 +392,7 @@ class eoDistanceStat : public eoStat { public: - using eoDistanceStat< EOT >::value; + using eoStat::value; eoDistanceStat(std::string _name = "distance") : eoStat(0.0, _name) diff --git a/eo/tutorial/CMakeLists.txt b/eo/tutorial/CMakeLists.txt index 842421e4d..bbc56aba4 100644 --- a/eo/tutorial/CMakeLists.txt +++ b/eo/tutorial/CMakeLists.txt @@ -4,6 +4,11 @@ ### 1) Where must cmake go now ? ###################################################################################### -SUBDIRS(Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6) +ADD_SUBDIRECTORY(Lesson1) +ADD_SUBDIRECTORY(Lesson2) +ADD_SUBDIRECTORY(Lesson3) +ADD_SUBDIRECTORY(Lesson4) +ADD_SUBDIRECTORY(Lesson5) +ADD_SUBDIRECTORY(Lesson6) ###################################################################################### diff --git a/eo/tutorial/Lesson4/CMakeLists.txt b/eo/tutorial/Lesson4/CMakeLists.txt index 84a1c6a3d..669b67894 100644 --- a/eo/tutorial/Lesson4/CMakeLists.txt +++ b/eo/tutorial/Lesson4/CMakeLists.txt @@ -3,23 +3,32 @@ ### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use. ###################################################################################### -ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param) -ADD_CUSTOM_COMMAND( - TARGET param - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param - ${EO_BINARY_DIR}/tutorial/Lesson4) +EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param + ${EO_BINARY_DIR}/tutorial/Lesson4/ESEA.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param + ${EO_BINARY_DIR}/tutorial/Lesson4/RealEA.param +) + +#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param) +#ADD_CUSTOM_COMMAND( +# TARGET param +# POST_BUILD +# COMMAND ${CMAKE_COMMAND} +# ARGS -E copy_if_different +# ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param +# ${EO_BINARY_DIR}/tutorial/Lesson4) -ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param) -ADD_CUSTOM_COMMAND( - TARGET param - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param - ${EO_BINARY_DIR}/tutorial/Lesson4) +#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param) +#ADD_CUSTOM_COMMAND( +# TARGET param +# POST_BUILD +# COMMAND ${CMAKE_COMMAND} +# ARGS -E copy_if_different +# ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param +# ${EO_BINARY_DIR}/tutorial/Lesson4) ###################################################################################### From 080f98bffafc29df4daa78ac343e2ac8978b943b Mon Sep 17 00:00:00 2001 From: paradiseo Date: Wed, 14 Jan 2009 14:50:46 +0000 Subject: [PATCH 1429/2134] Cmake configuration modified --- eo/CMakeLists.txt | 19 ++++--------------- eo/app/CMakeLists.txt | 1 - eo/app/gprop/CMakeLists.txt | 10 ---------- eo/app/gpsymreg/CMakeLists.txt | 16 ---------------- eo/app/mastermind/CMakeLists.txt | 16 ---------------- eo/doc/CMakeLists.txt | 2 -- eo/src/CMakeLists.txt | 18 +++++++----------- eo/src/es/CMakeLists.txt | 9 +-------- eo/src/ga/CMakeLists.txt | 6 ------ eo/src/moo/CMakeLists.txt | 7 ------- eo/src/utils/CMakeLists.txt | 7 ------- eo/test/CMakeLists.txt | 7 ------- eo/tutorial/CMakeLists.txt | 2 -- eo/tutorial/Lesson1/CMakeLists.txt | 16 ---------------- eo/tutorial/Lesson2/CMakeLists.txt | 16 ---------------- eo/tutorial/Lesson3/CMakeLists.txt | 16 ---------------- eo/tutorial/Lesson4/CMakeLists.txt | 21 ++++----------------- eo/tutorial/Lesson5/CMakeLists.txt | 15 --------------- eo/tutorial/Lesson6/CMakeLists.txt | 13 ------------- 19 files changed, 16 insertions(+), 201 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index e9dccf3d4..bf91d5ba4 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -1,13 +1,9 @@ - ###################################################################################### ### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line ###################################################################################### INCLUDE(eo-conf.cmake OPTIONAL) -###################################################################################### - - ###################################################################################### ### 1) Main project config ###################################################################################### @@ -33,12 +29,10 @@ INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") ENABLE_LANGUAGE(CXX) ENABLE_LANGUAGE(C) -#################################################################################### - - ##################################################################################### ### 2) Include required modules / configuration files ##################################################################################### + INCLUDE(CMakeBackwardCompatibilityCXX) INCLUDE(FindDoxygen) @@ -58,9 +52,7 @@ configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) IF (WIN32) ADD_DEFINITIONS(-D_WINDOWS=1) ENDIF (WIN32) -###################################################################################### - - + ##################################################################################### ### 3) Manage the build type ##################################################################################### @@ -95,7 +87,7 @@ IF(WIN32 AND NOT CYGWIN) ENDIF(CMAKE_CXX_COMPILER MATCHES cl) ELSE(WIN32 AND NOT CYGWIN) IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra") + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") ENDIF(CMAKE_COMPILER_IS_GNUCXX) @@ -105,8 +97,6 @@ IF(CMAKE_BUILD_TYPE MATCHES Debug) ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON) ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) -##################################################################################### - ###################################################################################### ### compilation of examples? ###################################################################################### @@ -120,8 +110,6 @@ SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters f IF (ENABLE_CMAKE_TESTING) ENABLE_TESTING() ENDIF (ENABLE_CMAKE_TESTING) -###################################################################################### - ###################################################################################### ### 5) Where must cmake go now ? @@ -132,4 +120,5 @@ ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(tutorial) + ###################################################################################### diff --git a/eo/app/CMakeLists.txt b/eo/app/CMakeLists.txt index 2a56c9ce5..55116b43d 100644 --- a/eo/app/CMakeLists.txt +++ b/eo/app/CMakeLists.txt @@ -1,4 +1,3 @@ - ###################################################################################### ### 1) Where must cmake go now ? ###################################################################################### diff --git a/eo/app/gprop/CMakeLists.txt b/eo/app/gprop/CMakeLists.txt index 38d40c792..e19df9bd8 100644 --- a/eo/app/gprop/CMakeLists.txt +++ b/eo/app/gprop/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -7,20 +5,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - - ###################################################################################### ### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) -###################################################################################### - - - ###################################################################################### ### 3) Define your target(s): just an executable here ###################################################################################### diff --git a/eo/app/gpsymreg/CMakeLists.txt b/eo/app/gpsymreg/CMakeLists.txt index 98de00c59..45b561e16 100644 --- a/eo/app/gpsymreg/CMakeLists.txt +++ b/eo/app/gpsymreg/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -7,20 +5,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - - ###################################################################################### ### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) -###################################################################################### - - - ###################################################################################### ### 3) Define your target(s): just an executable here ###################################################################################### @@ -31,9 +21,6 @@ SET (GPSYMREG_SOURCES main.cpp) ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES}) ADD_DEPENDENCIES(gpsymreg eo eoutils) -###################################################################################### - - ###################################################################################### ### 4) Optionnal: define your target(s)'s version: no effect for windows @@ -41,9 +28,6 @@ ADD_DEPENDENCIES(gpsymreg eo eoutils) SET(GPSYMREG_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for your target(s) diff --git a/eo/app/mastermind/CMakeLists.txt b/eo/app/mastermind/CMakeLists.txt index a1df48bdb..d07e97415 100644 --- a/eo/app/mastermind/CMakeLists.txt +++ b/eo/app/mastermind/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -7,20 +5,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - - ###################################################################################### ### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) -###################################################################################### - - - ###################################################################################### ### 3) Define your target(s): just an executable here ###################################################################################### @@ -31,9 +21,6 @@ SET (MASTERMIND_SOURCES mastermind.cpp) ADD_EXECUTABLE(mastermind ${MASTERMIND_SOURCES}) ADD_DEPENDENCIES(mastermind eo eoutils) -###################################################################################### - - ###################################################################################### ### 4) Optionnal: define your target(s)'s version: no effect for windows @@ -41,9 +28,6 @@ ADD_DEPENDENCIES(mastermind eo eoutils) SET(MASTERMIND_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(mastermind PROPERTIES VERSION "${MASTERMIND_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for your target(s) diff --git a/eo/doc/CMakeLists.txt b/eo/doc/CMakeLists.txt index 2c2cb3c53..845471ddd 100644 --- a/eo/doc/CMakeLists.txt +++ b/eo/doc/CMakeLists.txt @@ -1,5 +1,3 @@ - - ########################################################################################## ### EO Doc generation using Doxygen ########################################################################################## diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index e77bd8307..ab4bc930c 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -1,14 +1,9 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - - ###################################################################################### ### 2) Define the eo target ###################################################################################### @@ -26,23 +21,24 @@ SET (EO_SOURCES eoFunctorStore.cpp ADD_LIBRARY(eo STATIC ${EO_SOURCES}) -###################################################################################### - - ###################################################################################### ### 3) Optionnal: define your target(s)'s version: no effect for windows ###################################################################################### SET(EO_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(eo PROPERTIES VERSION "${EO_VERSION}") -###################################################################################### - ###################################################################################### ### 4) Where must cmake go now ? ###################################################################################### -SUBDIRS(do es ga gp moo other utils) # forget pyeo for the moment +ADD_SUBDIRECTORY(do) +ADD_SUBDIRECTORY(es) +ADD_SUBDIRECTORY(ga) +ADD_SUBDIRECTORY(gp) +ADD_SUBDIRECTORY(moo) +ADD_SUBDIRECTORY(other) +ADD_SUBDIRECTORY(utils) ###################################################################################### diff --git a/eo/src/es/CMakeLists.txt b/eo/src/es/CMakeLists.txt index be718b1d3..0ffff0eb5 100644 --- a/eo/src/es/CMakeLists.txt +++ b/eo/src/es/CMakeLists.txt @@ -1,4 +1,3 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -6,9 +5,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - ###################################################################################### ### 2) Define the es and cma targets ###################################################################################### @@ -41,10 +37,6 @@ SET (CMA_SOURCES eig.cpp ADD_LIBRARY(es STATIC ${ES_SOURCES}) ADD_LIBRARY(cma STATIC ${CMA_SOURCES}) -###################################################################################### - - - ###################################################################################### ### 3) Optionnal ###################################################################################### @@ -54,5 +46,6 @@ SET_TARGET_PROPERTIES(es PROPERTIES VERSION "${ES_VERSION}") SET(CMA_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(cma PROPERTIES VERSION "${CMA_VERSION}") + ###################################################################################### diff --git a/eo/src/ga/CMakeLists.txt b/eo/src/ga/CMakeLists.txt index 4a97b9ce1..61bef4948 100644 --- a/eo/src/ga/CMakeLists.txt +++ b/eo/src/ga/CMakeLists.txt @@ -1,12 +1,9 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - ###################################################################################### ### 2) Define the ga target @@ -25,9 +22,6 @@ SET (GA_SOURCES make_algo_scalar_ga.cpp ADD_LIBRARY(ga STATIC ${GA_SOURCES}) -###################################################################################### - - ###################################################################################### ### 3) Optionnal diff --git a/eo/src/moo/CMakeLists.txt b/eo/src/moo/CMakeLists.txt index 366d5f930..b4160974a 100644 --- a/eo/src/moo/CMakeLists.txt +++ b/eo/src/moo/CMakeLists.txt @@ -1,4 +1,3 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -6,9 +5,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - ###################################################################################### ### 2) Define the eomoo target ###################################################################################### @@ -22,9 +18,6 @@ SET (EOMOO_SOURCES eoFrontSorter.cpp ADD_LIBRARY(eomoo STATIC ${EOMOO_SOURCES}) -###################################################################################### - - ###################################################################################### ### 3) Optionnal diff --git a/eo/src/utils/CMakeLists.txt b/eo/src/utils/CMakeLists.txt index b56bfc9d4..216693e45 100644 --- a/eo/src/utils/CMakeLists.txt +++ b/eo/src/utils/CMakeLists.txt @@ -1,4 +1,3 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -6,9 +5,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - ###################################################################################### ### 2) Define the ga target ###################################################################################### @@ -33,9 +29,6 @@ SET (EOUTILS_SOURCES eoData.cpp ADD_LIBRARY(eoutils STATIC ${EOUTILS_SOURCES}) -###################################################################################### - - ###################################################################################### ### 3) Optionnal diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 07279bec9..b8d5b75a2 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -14,19 +14,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib/MGE) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) -###################################################################################### - - - ###################################################################################### ### 3) Define your targets and link the librairies ###################################################################################### diff --git a/eo/tutorial/CMakeLists.txt b/eo/tutorial/CMakeLists.txt index bbc56aba4..4573f0b4d 100644 --- a/eo/tutorial/CMakeLists.txt +++ b/eo/tutorial/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Where must cmake go now ? ###################################################################################### diff --git a/eo/tutorial/Lesson1/CMakeLists.txt b/eo/tutorial/Lesson1/CMakeLists.txt index 8693dcd81..346bede15 100644 --- a/eo/tutorial/Lesson1/CMakeLists.txt +++ b/eo/tutorial/Lesson1/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -8,10 +6,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) -###################################################################################### - - - ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### @@ -25,10 +19,6 @@ IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) -###################################################################################### - - - ###################################################################################### ### 3) Define your targets ###################################################################################### @@ -41,9 +31,6 @@ ADD_EXECUTABLE(exercise1.3 exercise1.3.cpp) ADD_DEPENDENCIES(FirstBitGA ga eo eoutils) ADD_DEPENDENCIES(FirstRealGA ga eo eoutils) ADD_DEPENDENCIES(exercise1.3 ga eo eoutils) -###################################################################################### - - ###################################################################################### ### 4) Optionnal @@ -57,9 +44,6 @@ SET_TARGET_PROPERTIES(FirstRealGA PROPERTIES VERSION "${FIRSTREALGA_VERSION}") SET(EXERCICE13_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(exercise1.3 PROPERTIES VERSION "${EXERCICE13_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for the targets diff --git a/eo/tutorial/Lesson2/CMakeLists.txt b/eo/tutorial/Lesson2/CMakeLists.txt index be35a00f3..6eefc5ca3 100644 --- a/eo/tutorial/Lesson2/CMakeLists.txt +++ b/eo/tutorial/Lesson2/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -8,10 +6,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) -###################################################################################### - - - ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### @@ -25,10 +19,6 @@ IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) -###################################################################################### - - - ###################################################################################### ### 3) Define your targets ###################################################################################### @@ -37,9 +27,6 @@ ENDIF(WIN32 AND NOT CYGWIN) ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp) ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp) ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp) -###################################################################################### - - ###################################################################################### ### 4) Optionnal @@ -53,9 +40,6 @@ SET_TARGET_PROPERTIES(FirstRealEA PROPERTIES VERSION "${FIRSTREALEA_VERSION}") SET(EXERCICE23_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(exercise2.3 PROPERTIES VERSION "${EXERCICE23_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for the targets diff --git a/eo/tutorial/Lesson3/CMakeLists.txt b/eo/tutorial/Lesson3/CMakeLists.txt index ed549055b..836df97d1 100644 --- a/eo/tutorial/Lesson3/CMakeLists.txt +++ b/eo/tutorial/Lesson3/CMakeLists.txt @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -8,10 +6,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) -###################################################################################### - - - ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### @@ -25,10 +19,6 @@ IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) -###################################################################################### - - - ###################################################################################### ### 3) Define your targets ###################################################################################### @@ -41,9 +31,6 @@ ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp) ADD_DEPENDENCIES(SecondBitEA ga eoutils eo) ADD_DEPENDENCIES(SecondRealEA ga eoutils eo) ADD_DEPENDENCIES(exercise3.1 ga eoutils eo) -###################################################################################### - - ###################################################################################### ### 4) Optionnal @@ -57,9 +44,6 @@ SET_TARGET_PROPERTIES(SecondRealEA PROPERTIES VERSION "${SECONDREALEA_VERSION}") SET(EXERCICE31_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(exercise3.1 PROPERTIES VERSION "${EXERCICE31_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for the targets diff --git a/eo/tutorial/Lesson4/CMakeLists.txt b/eo/tutorial/Lesson4/CMakeLists.txt index 669b67894..d2f1a5199 100644 --- a/eo/tutorial/Lesson4/CMakeLists.txt +++ b/eo/tutorial/Lesson4/CMakeLists.txt @@ -1,4 +1,3 @@ - ###################################################################################### ### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use. ###################################################################################### @@ -12,6 +11,9 @@ EXECUTE_PROCESS( ${EO_BINARY_DIR}/tutorial/Lesson4/RealEA.param ) +############## +# OLD_TARGETS +############## #ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param) #ADD_CUSTOM_COMMAND( # TARGET param @@ -19,8 +21,7 @@ EXECUTE_PROCESS( # COMMAND ${CMAKE_COMMAND} # ARGS -E copy_if_different # ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param -# ${EO_BINARY_DIR}/tutorial/Lesson4) - +# ${EO_BINARY_DIR}/tutorial/Lesson4) #ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param) #ADD_CUSTOM_COMMAND( # TARGET param @@ -30,7 +31,6 @@ EXECUTE_PROCESS( # ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param # ${EO_BINARY_DIR}/tutorial/Lesson4) - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -39,9 +39,6 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/es) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) -###################################################################################### - - ###################################################################################### ### 2) Specify where CMake can find the libraries @@ -56,10 +53,6 @@ IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) -###################################################################################### - - - ###################################################################################### ### 3) Define your targets ###################################################################################### @@ -72,9 +65,6 @@ ADD_EXECUTABLE(ESEA ESEA.cpp) #ADD_DEPENDENCIES(BitEA es ga eo eoutils) #ADD_DEPENDENCIES(RealEA es ga eo eoutils) #ADD_DEPENDENCIES(ESEA es ga eo eoutils) -###################################################################################### - - ###################################################################################### ### 4) Optionnal @@ -88,9 +78,6 @@ SET_TARGET_PROPERTIES(RealEA PROPERTIES VERSION "${REALEA_VERSION}") SET(ESEA_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(ESEA PROPERTIES VERSION "${ESEA_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for the targets diff --git a/eo/tutorial/Lesson5/CMakeLists.txt b/eo/tutorial/Lesson5/CMakeLists.txt index ef8ea1000..8a2eb1033 100644 --- a/eo/tutorial/Lesson5/CMakeLists.txt +++ b/eo/tutorial/Lesson5/CMakeLists.txt @@ -1,14 +1,9 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -###################################################################################### - - ###################################################################################### ### 2) Specify where CMake can find the libraries @@ -23,10 +18,6 @@ IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) -###################################################################################### - - - ###################################################################################### ### 3) Define your targets ###################################################################################### @@ -37,9 +28,6 @@ ADD_EXECUTABLE(OneMaxLibEA OneMaxLibEA.cpp make_OneMax.cpp) ADD_DEPENDENCIES(OneMaxEA es ga eo eoutils) ADD_DEPENDENCIES(OneMaxLibEA es ga eo eoutils) -###################################################################################### - - ###################################################################################### ### 4) Optionnal @@ -50,9 +38,6 @@ SET_TARGET_PROPERTIES(OneMaxEA PROPERTIES VERSION "${ONEMAXEA_VERSION}") SET(ONEMAXLIBEA_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(OneMaxLibEA PROPERTIES VERSION "${ONEMAXLIBEA_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for the targets diff --git a/eo/tutorial/Lesson6/CMakeLists.txt b/eo/tutorial/Lesson6/CMakeLists.txt index 17f368f99..4d967d717 100644 --- a/eo/tutorial/Lesson6/CMakeLists.txt +++ b/eo/tutorial/Lesson6/CMakeLists.txt @@ -1,13 +1,9 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) -###################################################################################### - - ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### @@ -21,9 +17,6 @@ IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) -###################################################################################### - - ###################################################################################### ### 3) Define your targets ###################################################################################### @@ -31,9 +24,6 @@ ENDIF(WIN32 AND NOT CYGWIN) ADD_EXECUTABLE(BinaryPSO BinaryPSO.cpp) ADD_EXECUTABLE(RealPSO RealPSO.cpp) -###################################################################################### - - ###################################################################################### ### 4) Optionnal ###################################################################################### @@ -44,9 +34,6 @@ SET_TARGET_PROPERTIES(BinaryPSO PROPERTIES VERSION "${BINARYPSO_VERSION}") SET(REALPSO_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(RealPSO PROPERTIES VERSION "${REALPSO_VERSION}") -###################################################################################### - - ###################################################################################### ### 5) Link the librairies for the targets ###################################################################################### From 1204ce35b7af1101ee221c58500197a9d5dd8098 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Fri, 16 Jan 2009 14:29:42 +0000 Subject: [PATCH 1430/2134] modif cmake --- eo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index bf91d5ba4..2c36b3ab0 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -87,7 +87,7 @@ IF(WIN32 AND NOT CYGWIN) ENDIF(CMAKE_CXX_COMPILER MATCHES cl) ELSE(WIN32 AND NOT CYGWIN) IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers") + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") ENDIF(CMAKE_COMPILER_IS_GNUCXX) From 37c3989ee902f0cb78261d8b36a1c9f49fe18804 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 22 Jan 2009 10:18:10 +0000 Subject: [PATCH 1431/2134] test on PSO changed. --- eo/test/t-eoExtendedVelocity.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/eo/test/t-eoExtendedVelocity.cpp b/eo/test/t-eoExtendedVelocity.cpp index d40d28817..c42fb4c61 100644 --- a/eo/test/t-eoExtendedVelocity.cpp +++ b/eo/test/t-eoExtendedVelocity.cpp @@ -19,10 +19,10 @@ double f (const Particle & _particle) int main_function(int argc, char **argv) { const unsigned POP_SIZE = 6, VEC_SIZE = 2, NEIGHBORHOOD_SIZE=2; - + // the population: eoPop pop; - + // Evaluation eoEvalFuncPtr eval( f ); @@ -33,33 +33,33 @@ int main_function(int argc, char **argv) eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); eoFirstIsBestInit < Particle > localInit; pop.append (POP_SIZE, random); - + // topology eoLinearTopology topology(NEIGHBORHOOD_SIZE); eoInitializer init(eval,veloRandom,localInit,topology,pop); - init(); + init(); // velocity eoExtendedVelocity velocity (topology,1,1,1,1); - + // the test itself for (unsigned int i = 0; i < POP_SIZE; i++) { std::cout << " Initial particle n°" << i << " velocity: " << std::endl; for (unsigned int j = 0; j < VEC_SIZE; j++) - std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; + std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; } - + for (unsigned int i = 0; i < POP_SIZE; i++) velocity (pop[i],i); - + for (unsigned int i = 0; i < POP_SIZE; i++) { std::cout << " Final particle n°" << i << " velocity: " << std::endl; for (unsigned int j = 0; j < VEC_SIZE; j++) - std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; + std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; } - + return EXIT_SUCCESS; } int main(int argc, char **argv) @@ -72,5 +72,5 @@ int main(int argc, char **argv) { std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl; } - + return EXIT_SUCCESS; } From 7fc04f1de76217f43121387854c64a07294c79e6 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Mon, 26 Jan 2009 09:07:59 +0000 Subject: [PATCH 1432/2134] cmake < 2.6 authorized --- eo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 2c36b3ab0..a825730c2 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -20,7 +20,7 @@ SET(VERSION "1.02" CACHE STRING "Global version" FORCE) SET(GLOBAL_VERSION "${VERSION}") # check cmake version compatibility -CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) # regular expression checking INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") From 072979a705b152f13b1a7c73a224596230e0009a Mon Sep 17 00:00:00 2001 From: paradiseo Date: Mon, 26 Jan 2009 13:38:01 +0000 Subject: [PATCH 1433/2134] option added to disable warning (mode release with Visual Studio) --- eo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index a825730c2..e9eaf9c87 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -78,7 +78,7 @@ IF(WIN32 AND NOT CYGWIN) IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od") - SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2") + SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") From cfd7f2b008363f1f15b43c3cf7b9e45f188d6878 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Mon, 26 Jan 2009 13:43:40 +0000 Subject: [PATCH 1434/2134] disable warning C4530 (Visual Studio) --- eo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index e9eaf9c87..09b0d4003 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -78,7 +78,7 @@ IF(WIN32 AND NOT CYGWIN) IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od") - SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2") + SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") From bda9e1c712ff1444996b31e5ff92864ad9d458f4 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Mon, 26 Jan 2009 14:39:37 +0000 Subject: [PATCH 1435/2134] Change Compiler flags --- eo/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 09b0d4003..9dd280c8c 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -76,8 +76,8 @@ IF(WIN32 AND NOT CYGWIN) IF(CMAKE_CXX_COMPILER MATCHES cl) IF(NOT WITH_SHARED_LIBS) IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") - SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") - SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od") + SET(CMAKE_CXX_FLAGS "/nologo /Gy") + SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od") SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") From 6563aa6e7aa99e8f0fb71755cebacf83eb3eda58 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Tue, 27 Jan 2009 16:21:53 +0000 Subject: [PATCH 1436/2134] little modif to delete warning --- eo/app/gprop/gprop.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 11bf684b5..989041863 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -52,7 +52,7 @@ struct phenotype friend bool operator<(const phenotype& a, const phenotype& b) { - return (a.val_ok < b.val_ok) || (!(b.val_ok < a.val_ok)) && (b.mse_error < a.mse_error); + return (a.val_ok < b.val_ok) || ((!(b.val_ok < a.val_ok)) && (b.mse_error < a.mse_error)); } friend bool operator==(const phenotype& a, const phenotype& b) @@ -207,8 +207,8 @@ int correct(const mlp::net& net, const mlp::set& set) unsigned partial = 0; for (unsigned i = 0; i < s->output.size(); ++i) - if (s->output[i] < 0.5 && net(s->input)[i] < 0.5 || - s->output[i] > 0.5 && net(s->input)[i] > 0.5) + if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) || + (s->output[i] > 0.5 && net(s->input)[i] > 0.5)) ++partial; if (partial == s->output.size()) From eca555a7a315b528f9ce89333b5f494da2ad458c Mon Sep 17 00:00:00 2001 From: paradiseo Date: Tue, 27 Jan 2009 16:26:44 +0000 Subject: [PATCH 1437/2134] little change to delete warning --- eo/src/utils/eoRNG.h | 6 +++--- eo/src/utils/eoTimedMonitor.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index c9d16ac81..0aeb6969e 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -276,7 +276,7 @@ public : @return Uniformly chosen element from the vector. */ template - const TYPE& choice(const std::vector& vec) + const TYPE& choice(const std::vector& vec) { return vec[random(vec.size())]; } @@ -450,10 +450,10 @@ inline void eoRng::initialize(uint32_t seed) left = -1; register uint32_t x = (seed | 1U) & 0xFFFFFFFFU, *s = state; - register int j; + register int j; for(left=0, *s++=x, j=N; --j; - *s++ = (x*=69069U) & 0xFFFFFFFFU); + *s++ = (x*=69069U) & 0xFFFFFFFFU) ; } diff --git a/eo/src/utils/eoTimedMonitor.h b/eo/src/utils/eoTimedMonitor.h index c024083a2..3c264c306 100644 --- a/eo/src/utils/eoTimedMonitor.h +++ b/eo/src/utils/eoTimedMonitor.h @@ -57,7 +57,7 @@ public: clock_t tick = clock(); - if ( (tick-last_tick) >= seconds * CLOCKS_PER_SEC) { + if ( (unsigned)(tick-last_tick) >= seconds * CLOCKS_PER_SEC) { monitor = true; } From b20c5e98c148fb3ac2398d0690e758e1985ed512 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Tue, 27 Jan 2009 16:28:55 +0000 Subject: [PATCH 1438/2134] little modif to delete warning --- eo/src/eoInitializer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoInitializer.h b/eo/src/eoInitializer.h index 44933666a..63fbd6454 100644 --- a/eo/src/eoInitializer.h +++ b/eo/src/eoInitializer.h @@ -82,7 +82,7 @@ public: eoParticleBestInit &_initBest, eoTopology &_topology, eoPop < POT > &_pop - ) : proc(dummy), procPara(_proc), initVelo(_initVelo), initBest(_initBest), topology(_topology), pop(_pop) + ) : proc(dummy), initVelo(_initVelo), procPara(_proc), initBest(_initBest), topology(_topology), pop(_pop) {} @@ -114,8 +114,8 @@ private : */ eoUF& proc; eoVelocityInit < POT > & initVelo; - eoParticleBestInit & initBest; eoPopEvalFunc & procPara; + eoParticleBestInit & initBest; eoTopology & topology; eoPop < POT > & pop; From 45ce5f84043eba5327ab3cfd2401ec9c23cf0dc7 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Tue, 27 Jan 2009 16:30:18 +0000 Subject: [PATCH 1439/2134] little change to delete warnings --- eo/test/t-eoCMAES.cpp | 2 +- eo/test/t-eoGenOp.cpp | 4 ++-- eo/test/t-eoSecondsElapsedContinue.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/eo/test/t-eoCMAES.cpp b/eo/test/t-eoCMAES.cpp index 0c795de79..912d51280 100644 --- a/eo/test/t-eoCMAES.cpp +++ b/eo/test/t-eoCMAES.cpp @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) { // make sure we have a dimensionality parameter (for testing) char** rargv = new char*[argc+1]; rargv[0] = argv[0]; - rargv[1] = "-N10"; + rargv[1] = (char*)"-N10"; for (int i = 2; i < argc; ++i) { rargv[i] = argv[i-1]; } diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index af8f5e692..910474f96 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -206,8 +206,8 @@ int the_main(int argc, char **argv) } ////////////////////////////////// define operators - monop mon("mon1"); - monop clone("clone"); + monop mon((char*)"mon1"); + monop clone((char*)"clone"); binop bin; quadop quad; quadClone quadclone; diff --git a/eo/test/t-eoSecondsElapsedContinue.cpp b/eo/test/t-eoSecondsElapsedContinue.cpp index 80b1391b1..e6e59a61d 100644 --- a/eo/test/t-eoSecondsElapsedContinue.cpp +++ b/eo/test/t-eoSecondsElapsedContinue.cpp @@ -11,10 +11,9 @@ class Dummy : public EO {}; int main() { - + eoPop pop; - int s = 1; eoSecondsElapsedContinue cnt(1); time_t start_time = time(0); From d46117cda1348ad4ba3544bca457e13ef8d3bc4c Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 25 Jun 2009 14:49:53 +0000 Subject: [PATCH 1440/2134] Accept long time --- eo/src/utils/eoTimeCounter.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoTimeCounter.h b/eo/src/utils/eoTimeCounter.h index 0ff34ecca..bfd16c56e 100644 --- a/eo/src/utils/eoTimeCounter.h +++ b/eo/src/utils/eoTimeCounter.h @@ -39,27 +39,34 @@ class eoTimeCounter : public eoUpdater, public eoValueParam { public: eoTimeCounter() : eoValueParam(0.0, "Time") // : firstTime(true) - {} - + { + start = time(NULL); + } + /** simply stores the time spent in process in its value() */ virtual void operator()() { // ask for system time utime = clock(); -// if (firstTime) /* first generation */ -// { -// firstTime=false; -// firstUtime = tmsStruct.tms_utime; -// } + + // if (firstTime) /* first generation */ + // { + // firstTime=false; + // firstUtime = tmsStruct.tms_utime; + // } // store elapsed user time -// value(tmsStruct.tms_utime - firstUtime); - value()=double(utime)/CLOCKS_PER_SEC; + // value(tmsStruct.tms_utime - firstUtime); + // value()=double(utime)/CLOCKS_PER_SEC; + double seconds_elapsed = time(NULL) - start; + + value() = (seconds_elapsed > 2140) ? seconds_elapsed : double(utime)/CLOCKS_PER_SEC; } private: // bool firstTime; // clock_t firstUtime; clock_t utime; + time_t start; }; #endif From a2703a8eabd8284107bfbfc016a70bce33ef3850 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Wed, 9 Dec 2009 15:49:30 +0000 Subject: [PATCH 1441/2134] No real change -> test commit --- eo/src/eoParticleBestInit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/eoParticleBestInit.h b/eo/src/eoParticleBestInit.h index 79d78ed3f..b847f7162 100644 --- a/eo/src/eoParticleBestInit.h +++ b/eo/src/eoParticleBestInit.h @@ -63,8 +63,9 @@ public: void operator () (POT & _po1) { - for (unsigned i = 0; i < _po1.size (); i++) - _po1.bestPositions[i] = _po1[i]; + //Set the bestPositions + _po1.bestPositions = _po1 ; + // set the fitness _po1.best(_po1.fitness()); @@ -74,4 +75,3 @@ public: #endif /*_EOPARTICLEBESTINIT_H */ - From 8c07ca4cc5329cbf4376a1ceb9f0f53035fcdb02 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 18 Mar 2010 12:44:45 +0000 Subject: [PATCH 1442/2134] add an include --- eo/src/utils/eoMonitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index 09360fb6e..a41c9fd39 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk -CVS Info: $Date: 2007-09-05 11:36:44 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.12 2007-09-05 11:36:44 maartenkeijzer Exp $ $Author: maartenkeijzer $ +CVS Info: $Date: 2010-03-18 12:44:45 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.13 2010-03-18 12:44:45 paradiseo Exp $ $Author: paradiseo $ */ //----------------------------------------------------------------------------- @@ -31,7 +31,7 @@ CVS Info: $Date: 2007-09-05 11:36:44 $ $Header: /home/nojhan/dev/eodev/eodev_cvs #include - +#include #include class eoParam; From 227e7fd2e5df41ddf361c8d08ac4eaa0770f535e Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 4 May 2010 12:50:29 +0000 Subject: [PATCH 1443/2134] Removed reference to Lesson6 until its makefile is fixed --- eo/tutorial/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/tutorial/Makefile.am b/eo/tutorial/Makefile.am index b55edecb7..41f6058d7 100644 --- a/eo/tutorial/Makefile.am +++ b/eo/tutorial/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = html Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 pdf Templates +SUBDIRS = html Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 pdf Templates From dfad82c0431cf53846436ca51c07aae09d226aba Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 4 May 2010 12:54:36 +0000 Subject: [PATCH 1444/2134] Removed references to eliminated headers eoDummyFlight.h, eoLSPSO.h, eoSSPSO.h --- eo/src/Makefile.am | 3 --- 1 file changed, 3 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index b48f8be77..37817996c 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -33,7 +33,6 @@ pkginclude_HEADERS = eo \ eoDistribUpdater.h \ eoDistribution.h \ eoDominanceMap.h \ - eoDummyFlight.h \ eoEDA.h \ eoEasyEA.h \ eoEasyPSO.h \ @@ -61,7 +60,6 @@ pkginclude_HEADERS = eo \ eoLinearDecreasingWeightUp.h \ eoLinearFitScaling.h \ eoLinearTopology.h \ - eoLSPSO.h \ eoMGGReplacement.h \ eoMerge.h \ eoMergeReduce.h \ @@ -119,7 +117,6 @@ pkginclude_HEADERS = eo \ eoSigBinaryFlight.h \ eoSimpleEDA.h \ eoSocialNeighborhood.h \ - eoSSPSO.h \ eoStandardFlight.h \ eoStandardVelocity.h \ eoStarTopology.h \ From 8214fe3f5e94e4dd8defb9078f606d3ba5455100 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 4 May 2010 12:56:54 +0000 Subject: [PATCH 1445/2134] Added includes necessary to compile using gcc 4.4 --- eo/app/gprop/mlp.h | 2 ++ eo/src/utils/eoGnuplot.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index b05f8c243..3628325f1 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -17,6 +17,8 @@ #include // normal_generator #include // * +#include +#include namespace mlp diff --git a/eo/src/utils/eoGnuplot.cpp b/eo/src/utils/eoGnuplot.cpp index 55bca8d18..2905e6161 100644 --- a/eo/src/utils/eoGnuplot.cpp +++ b/eo/src/utils/eoGnuplot.cpp @@ -24,6 +24,7 @@ #include #endif +#include #include #include From abc65a390a67d1ef603534a0005a2dcbd8d002e4 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 4 May 2010 13:00:50 +0000 Subject: [PATCH 1446/2134] Reflecting build process changes in doc and source tree (now using autogen.sh;./configure) --- eo/INSTALL | 3 + eo/Makefile.in | 603 -------------------------------- eo/aclocal.m4 | 928 ------------------------------------------------- 3 files changed, 3 insertions(+), 1531 deletions(-) delete mode 100644 eo/Makefile.in delete mode 100644 eo/aclocal.m4 diff --git a/eo/INSTALL b/eo/INSTALL index a4b34144d..05d180f8a 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -9,6 +9,9 @@ Basic Installation These are generic installation instructions. + First, you need to generate a configure script using autoconf. + To do this, run the shell script sh ./autogen.sh. + The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. diff --git a/eo/Makefile.in b/eo/Makefile.in deleted file mode 100644 index 279b4cf06..000000000 --- a/eo/Makefile.in +++ /dev/null @@ -1,603 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_triplet = @host@ -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - THANKS config.guess config.sub depcomp install-sh missing -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = src doc contrib win app tutorial test -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GNUPLOT = @GNUPLOT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -USE_APPLICATIONS_FALSE = @USE_APPLICATIONS_FALSE@ -USE_APPLICATIONS_TRUE = @USE_APPLICATIONS_TRUE@ -USE_TUTORIAL_FALSE = @USE_TUTORIAL_FALSE@ -USE_TUTORIAL_TRUE = @USE_TUTORIAL_TRUE@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -@USE_APPLICATIONS_TRUE@SUBDIRS_APP = app -@USE_TUTORIAL_TRUE@SUBDIRS_TUT = tutorial -SUBDIRS = src doc contrib win $(SUBDIRS_APP) $(SUBDIRS_TUT) test - -# Directory for documents -DOCDIR = ~/public_html/eodocs - -# Directory for indices -- not useful for the user -IDXDIR = ~/index -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - else \ - include_option=--include; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) -dist-bzip2: distdir - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-recursive distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-info-am - - -# Add documentation to distribution -dist-hook: - $(MAKE) documentation - $(INSTALL_DATA) -d $(srcdir)/doc/html $(srcdir)/doc/latex $(srcdir)/doc/man $(distdir)/doc/ - -# Prepare documentation -documentation: - cd doc && $(MAKE) doc && cd .. -# convinience-target -doc: documentation -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/eo/aclocal.m4 b/eo/aclocal.m4 deleted file mode 100644 index 8c7060b10..000000000 --- a/eo/aclocal.m4 +++ /dev/null @@ -1,928 +0,0 @@ -# generated automatically by aclocal 1.8.3 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.8.3])]) - -# AM_AUX_DIR_EXPAND - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 6 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) -fi])]) - -# serial 7 -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -#serial 2 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 7 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 11 - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl - -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# -*- Autoconf -*- - - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -m4_include([acinclude.m4]) From 7f81c03af4249a6251c49282f1e9b558aa5b711b Mon Sep 17 00:00:00 2001 From: "(EO team)" <(EO team)> Date: Tue, 4 May 2010 13:00:51 +0000 Subject: [PATCH 1447/2134] This commit was manufactured by cvs2svn to create branch 'yaml_load_and_save'. --- CVSROOT/checkoutlist | 13 - CVSROOT/commitinfo | 15 - CVSROOT/config | 11 - CVSROOT/cvswrappers | 23 -- CVSROOT/editinfo | 21 -- CVSROOT/loginfo | 26 -- CVSROOT/modules | 26 -- CVSROOT/notify | 12 - CVSROOT/rcsinfo | 13 - CVSROOT/taginfo | 20 -- CVSROOT/verifymsg | 21 -- eo/test/Makefile.in | 659 ------------------------------------ eo/tutorial/html/index.html | 199 ----------- 13 files changed, 1059 deletions(-) delete mode 100644 CVSROOT/checkoutlist delete mode 100644 CVSROOT/commitinfo delete mode 100644 CVSROOT/config delete mode 100644 CVSROOT/cvswrappers delete mode 100644 CVSROOT/editinfo delete mode 100644 CVSROOT/loginfo delete mode 100644 CVSROOT/modules delete mode 100644 CVSROOT/notify delete mode 100644 CVSROOT/rcsinfo delete mode 100644 CVSROOT/taginfo delete mode 100644 CVSROOT/verifymsg delete mode 100644 eo/test/Makefile.in delete mode 100644 eo/tutorial/html/index.html diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist deleted file mode 100644 index b04b3501f..000000000 --- a/CVSROOT/checkoutlist +++ /dev/null @@ -1,13 +0,0 @@ -# The "checkoutlist" file is used to support additional version controlled -# administrative files in $CVSROOT/CVSROOT, such as template files. -# -# The first entry on a line is a filename which will be checked out from -# the corresponding RCS file in the $CVSROOT/CVSROOT directory. -# The remainder of the line is an error message to use if the file cannot -# be checked out. -# -# File format: -# -# [] -# -# comment lines begin with '#' diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo deleted file mode 100644 index b19e7b7a6..000000000 --- a/CVSROOT/commitinfo +++ /dev/null @@ -1,15 +0,0 @@ -# The "commitinfo" file is used to control pre-commit checks. -# The filter on the right is invoked with the repository and a list -# of files to check. A non-zero exit of the filter program will -# cause the commit to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/config b/CVSROOT/config deleted file mode 100644 index 8069cad5d..000000000 --- a/CVSROOT/config +++ /dev/null @@ -1,11 +0,0 @@ -# Set this to "no" if pserver shouldn't check system users/passwords -#SystemAuth=no - -# Set `PreservePermissions' to `yes' to save file status information -# in the repository. -#PreservePermissions=no - -# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top -# level of the new working directory when using the `cvs checkout' -# command. -#TopLevelAdmin=no diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers deleted file mode 100644 index 0accaf1b1..000000000 --- a/CVSROOT/cvswrappers +++ /dev/null @@ -1,23 +0,0 @@ -# This file affects handling of files based on their names. -# -# The -t/-f options allow one to treat directories of files -# as a single file, or to transform a file in other ways on -# its way in and out of CVS. -# -# The -m option specifies whether CVS attempts to merge files. -# -# The -k option specifies keyword expansion (e.g. -kb for binary). -# -# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) -# -# wildcard [option value][option value]... -# -# where option is one of -# -f from cvs filter value: path to filter -# -t to cvs filter value: path to filter -# -m update methodology value: MERGE or COPY -# -k expansion mode value: b, o, kkv, &c -# -# and value is a single-quote delimited value. -# For example: -#*.gif -k 'b' diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo deleted file mode 100644 index d78886c15..000000000 --- a/CVSROOT/editinfo +++ /dev/null @@ -1,21 +0,0 @@ -# The "editinfo" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo deleted file mode 100644 index 5a59f0a54..000000000 --- a/CVSROOT/loginfo +++ /dev/null @@ -1,26 +0,0 @@ -# The "loginfo" file controls where "cvs commit" log information -# is sent. The first entry on a line is a regular expression which must match -# the directory that the change is being made to, relative to the -# $CVSROOT. If a match is found, then the remainder of the line is a filter -# program that should expect log information on its standard input. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name ALL appears as a regular expression it is always used -# in addition to the first matching regex or DEFAULT. -# -# You may specify a format string as part of the -# filter. The string is composed of a `%' followed -# by a single format character, or followed by a set of format -# characters surrounded by `{' and `}' as separators. The format -# characters are: -# -# s = file name -# V = old version number (pre-checkin) -# v = new version number (post-checkin) -# -# For example: -#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog -# or -#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog diff --git a/CVSROOT/modules b/CVSROOT/modules deleted file mode 100644 index cb9e9efc9..000000000 --- a/CVSROOT/modules +++ /dev/null @@ -1,26 +0,0 @@ -# Three different line formats are valid: -# key -a aliases... -# key [options] directory -# key [options] directory files... -# -# Where "options" are composed of: -# -i prog Run "prog" on "cvs commit" from top-level of module. -# -o prog Run "prog" on "cvs checkout" of module. -# -e prog Run "prog" on "cvs export" of module. -# -t prog Run "prog" on "cvs rtag" of module. -# -u prog Run "prog" on "cvs update" of module. -# -d dir Place module in directory "dir" instead of module name. -# -l Top-level directory only -- do not recurse. -# -# NOTE: If you change any of the "Run" options above, you'll have to -# release and re-checkout any working directories of these modules. -# -# And "directory" is a path to a directory relative to $CVSROOT. -# -# The "-a" option specifies an alias. An alias is interpreted as if -# everything on the right of the "-a" had been typed on the command line. -# -# You can encode a module within a module by using the special '&' -# character to interpose another module into the current module. This -# can be useful for creating a module that consists of many directories -# spread out over the entire source repository. diff --git a/CVSROOT/notify b/CVSROOT/notify deleted file mode 100644 index 34f0bc288..000000000 --- a/CVSROOT/notify +++ /dev/null @@ -1,12 +0,0 @@ -# The "notify" file controls where notifications from watches set by -# "cvs watch add" or "cvs edit" are sent. The first entry on a line is -# a regular expression which is tested against the directory that the -# change is being made to, relative to the $CVSROOT. If it matches, -# then the remainder of the line is a filter program that should contain -# one occurrence of %s for the user to notify, and information on its -# standard input. -# -# "ALL" or "DEFAULT" can be used in place of the regular expression. -# -# For example: -#ALL mail %s -s "CVS notification" diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo deleted file mode 100644 index 49e59f4d0..000000000 --- a/CVSROOT/rcsinfo +++ /dev/null @@ -1,13 +0,0 @@ -# The "rcsinfo" file is used to control templates with which the editor -# is invoked on commit and import. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being made to, relative to the -# $CVSROOT. For the first match that is found, then the remainder of the -# line is the name of the file that contains the template. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo deleted file mode 100644 index 274a46dd5..000000000 --- a/CVSROOT/taginfo +++ /dev/null @@ -1,20 +0,0 @@ -# The "taginfo" file is used to control pre-tag checks. -# The filter on the right is invoked with the following arguments: -# -# $1 -- tagname -# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d -# $3 -- repository -# $4-> file revision [file revision ...] -# -# A non-zero exit of the filter program will cause the tag to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg deleted file mode 100644 index 86f747ce2..000000000 --- a/CVSROOT/verifymsg +++ /dev/null @@ -1,21 +0,0 @@ -# The "verifymsg" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in deleted file mode 100644 index 09f0d9479..000000000 --- a/eo/test/Makefile.in +++ /dev/null @@ -1,659 +0,0 @@ -# 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 -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -############################################################################### -############################################################################### - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -AS = @AS@ -CC = @CC@ -CXX = @CXX@ -DLLTOOL = @DLLTOOL@ -LD = @LD@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -OBJDUMP = @OBJDUMP@ -PACKAGE = @PACKAGE@ -RANLIB = @RANLIB@ -VERSION = @VERSION@ - -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a - -############################################################################### - -INCLUDES = -I$(top_builddir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/obsolete/libeoobsolete.a $(top_builddir)/src/utils/libeoutils.a - -############################################################################### - -noinst_PROGRAMS = t-eobreeder t-eoinclusion t-eoinsertion t-eo t-eofitness t-eoproblem t-eobin t-eolottery t-eo2dVector t-eogeneration t-eoEasyEA t-eoNonUniform t-eoUniform t-eoRandom t-eoStateAndParser t-eoAtomOps t-selectOne t-eoGOpSel t-eoVector t-eoCheckpointing t-eoExternalEO t-eoESFull - - -############################################################################### - -t_eoVector_SOURCES = t-eoVector.cpp -t_eoVector_DEPENDENCIES = $(DEPS) -t_eoVector_LDFLAGS = -lm -t_eoVector_LDADD = $(LDADDS) - -############################################################################### - -t_eoGOpSel_SOURCES = t-eoGOpSel.cpp -t_eoGOpSel_DEPENDENCIES = $(DEPS) -t_eoGOpSel_LDFLAGS = -lm -t_eoGOpSel_LDADD = $(LDADDS) - -############################################################################### - -t_selectOne_SOURCES = t-selectOne.cpp -t_selectOne_DEPENDENCIES = $(DEPS) -t_selectOne_LDFLAGS = -lm -t_selectOne_LDADD = $(LDADDS) - -############################################################################### - -t_eoAtomOps_SOURCES = t-eoAtomOps.cpp -t_eoAtomOps_DEPENDENCIES = $(DEPS) -t_eoAtomOps_LDFLAGS = -lm -t_eoAtomOps_LDADD = $(LDADDS) - -############################################################################### -#disabled -#t_eoESOps_SOURCES = t-eoESOps.cpp -#t_eoESOps_DEPENDENCIES = $(DEPS) -#t_eoESOps_LDFLAGS = -lm -#t_eoESOps_LDADD = $(LDADDS) - -############################################################################### - -t_eoESFull_SOURCES = t-eoESFull.cpp real_value.h -t_eoESFull_DEPENDENCIES = $(DEPS) -t_eoESFull_LDFLAGS = -lm -t_eoESFull_LDADD = $(LDADDS) - -############################################################################### - -t_eoNonUniform_SOURCES = t-eoNonUniform.cpp -t_eoNonUniform_DEPENDENCIES = $(DEPS) -t_eoNonUniform_LDFLAGS = -lm -t_eoNonUniform_LDADD = $(LDADDS) - -############################################################################### - -t_eoUniform_SOURCES = t-eoUniform.cpp -t_eoUniform_DEPENDENCIES = $(DEPS) -t_eoUniform_LDFLAGS = -lm -t_eoUniform_LDADD = $(LDADDS) - -############################################################################### - -t_eoRandom_SOURCES = t-eoRandom.cpp -t_eoRandom_DEPENDENCIES = $(DEPS) -t_eoRandom_LDFLAGS = -lm -t_eoRandom_LDADD = $(LDADDS) - -############################################################################### - -t_eogeneration_SOURCES = t-eogeneration.cpp -t_eogeneration_DEPENDENCIES = $(DEPS) -t_eogeneration_LDFLAGS = -lm -t_eogeneration_LDADD = $(LDADDS) - -############################################################################### - -t_eoEasyEA_SOURCES = t-eoEasyEA.cpp binary_value.h -t_eoEasyEA_DEPENDENCIES = $(DEPS) -t_eoEasyEA_LDFLAGS = -lm -t_eoEasyEA_LDADD = $(LDADDS) - -############################################################################### - -t_eobreeder_SOURCES = t-eobreeder.cpp binary_value.h -t_eobreeder_DEPENDENCIES = $(DEPS) -t_eobreeder_LDFLAGS = -lm -t_eobreeder_LDADD = $(LDADDS) - -############################################################################### - -t_eoinclusion_SOURCES = t-eoinclusion.cpp -t_eoinclusion_DEPENDENCIES = $(DEPS) -t_eoinclusion_LDFLAGS = -lm -t_eoinclusion_LDADD = $(LDADDS) - -############################################################################### - -t_eoinsertion_SOURCES = t-eoinsertion.cpp -t_eoinsertion_DEPENDENCIES = $(DEPS) -t_eoinsertion_LDFLAGS = -lm -t_eoinsertion_LDADD = $(LDADDS) - -############################################################################### - -t_eo_SOURCES = t-eo.cpp -t_eo_DEPENDENCIES = $(DEPS) -t_eo_LDADD = $(LDADDS) - -############################################################################### - -t_eofitness_SOURCES = t-eofitness.cpp -t_eofitness_DEPENDENCIES = $(DEPS) -t_eofitness_LDADD = $(LDADDS) - -############################################################################### - -t_eoproblem_SOURCES = t-eoproblem.cpp -t_eoproblem_LDFLAGS = -lm - -############################################################################### - -t_eobin_SOURCES = t-eobin.cpp -t_eobin_DEPENDENCIES = $(DEPS) -t_eobin_LDADD = $(LDADDS) - -############################################################################### - -t_eolottery_SOURCES = t-eolottery.cpp -t_eolottery_DEPENDENCIES = $(DEPS) -t_eolottery_LDFLAGS = -lm -t_eolottery_LDADD = $(LDADDS) - -############################################################################### - -t_eo2dVector_SOURCES = t-eo2dVector.cc -t_eo2dVector_DEPENDENCIES = $(DEPS) -t_eo2dVector_LDFLAGS = -lm -t_eo2dVector_LDADD = $(LDADDS) - -############################################################################### - -t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp -t_eoStateAndParser_DEPENDENCIES = $(DEPS) -t_eoStateAndParser_LDFLAGS = -lm -t_eoStateAndParser_LDADD = $(LDADDS) - -############################################################################### - -t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp -t_eoCheckpointing_DEPENDENCIES = $(DEPS) -t_eoCheckpointing_LDFLAGS = -lm -t_eoCheckpointing_LDADD = $(LDADDS) - -############################################################################### - -t_eoExternalEO_SOURCES = t-eoExternalEO.cpp -t_eoExternalEO_DEPENDENCIES = $(DEPS) -t_eoExternalEO_LDFLAGS = -lm -t_eoExternalEO_LDADD = $(LDADDS) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) - - -DEFS = @DEFS@ -I. -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -t_eobreeder_OBJECTS = t-eobreeder.o -t_eoinclusion_OBJECTS = t-eoinclusion.o -t_eoinsertion_OBJECTS = t-eoinsertion.o -t_eo_OBJECTS = t-eo.o -t_eo_LDFLAGS = -t_eofitness_OBJECTS = t-eofitness.o -t_eofitness_LDFLAGS = -t_eoproblem_OBJECTS = t-eoproblem.o -t_eoproblem_LDADD = $(LDADD) -t_eoproblem_DEPENDENCIES = -t_eobin_OBJECTS = t-eobin.o -t_eobin_LDFLAGS = -t_eolottery_OBJECTS = t-eolottery.o -t_eo2dVector_OBJECTS = t-eo2dVector.o -t_eogeneration_OBJECTS = t-eogeneration.o -t_eoEasyEA_OBJECTS = t-eoEasyEA.o -t_eoNonUniform_OBJECTS = t-eoNonUniform.o -t_eoUniform_OBJECTS = t-eoUniform.o -t_eoRandom_OBJECTS = t-eoRandom.o -t_eoStateAndParser_OBJECTS = t-eoStateAndParser.o -t_eoAtomOps_OBJECTS = t-eoAtomOps.o -t_selectOne_OBJECTS = t-selectOne.o -t_eoGOpSel_OBJECTS = t-eoGOpSel.o -t_eoVector_OBJECTS = t-eoVector.o -t_eoCheckpointing_OBJECTS = t-eoCheckpointing.o -t_eoExternalEO_OBJECTS = t-eoExternalEO.o -t_eoESFull_OBJECTS = t-eoESFull.o -CXXFLAGS = @CXXFLAGS@ -CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = Makefile.am Makefile.in - - -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-eoCheckpointing.P .deps/t-eoESFull.P .deps/t-eoEasyEA.P \ -.deps/t-eoExternalEO.P .deps/t-eoGOpSel.P .deps/t-eoNonUniform.P \ -.deps/t-eoRandom.P .deps/t-eoStateAndParser.P .deps/t-eoUniform.P \ -.deps/t-eoVector.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-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_eoStateAndParser_SOURCES) $(t_eoAtomOps_SOURCES) $(t_selectOne_SOURCES) $(t_eoGOpSel_SOURCES) $(t_eoVector_SOURCES) $(t_eoCheckpointing_SOURCES) $(t_eoExternalEO_SOURCES) $(t_eoESFull_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_eoStateAndParser_OBJECTS) $(t_eoAtomOps_OBJECTS) $(t_selectOne_OBJECTS) $(t_eoGOpSel_OBJECTS) $(t_eoVector_OBJECTS) $(t_eoCheckpointing_OBJECTS) $(t_eoExternalEO_OBJECTS) $(t_eoESFull_OBJECTS) - -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 test/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -mostlyclean-noinstPROGRAMS: - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -distclean-noinstPROGRAMS: - -maintainer-clean-noinstPROGRAMS: - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -.s.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -.S.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -maintainer-clean-libtool: - -t-eobreeder: $(t_eobreeder_OBJECTS) $(t_eobreeder_DEPENDENCIES) - @rm -f t-eobreeder - $(CXXLINK) $(t_eobreeder_LDFLAGS) $(t_eobreeder_OBJECTS) $(t_eobreeder_LDADD) $(LIBS) - -t-eoinclusion: $(t_eoinclusion_OBJECTS) $(t_eoinclusion_DEPENDENCIES) - @rm -f t-eoinclusion - $(CXXLINK) $(t_eoinclusion_LDFLAGS) $(t_eoinclusion_OBJECTS) $(t_eoinclusion_LDADD) $(LIBS) - -t-eoinsertion: $(t_eoinsertion_OBJECTS) $(t_eoinsertion_DEPENDENCIES) - @rm -f t-eoinsertion - $(CXXLINK) $(t_eoinsertion_LDFLAGS) $(t_eoinsertion_OBJECTS) $(t_eoinsertion_LDADD) $(LIBS) - -t-eo: $(t_eo_OBJECTS) $(t_eo_DEPENDENCIES) - @rm -f t-eo - $(CXXLINK) $(t_eo_LDFLAGS) $(t_eo_OBJECTS) $(t_eo_LDADD) $(LIBS) - -t-eofitness: $(t_eofitness_OBJECTS) $(t_eofitness_DEPENDENCIES) - @rm -f t-eofitness - $(CXXLINK) $(t_eofitness_LDFLAGS) $(t_eofitness_OBJECTS) $(t_eofitness_LDADD) $(LIBS) - -t-eoproblem: $(t_eoproblem_OBJECTS) $(t_eoproblem_DEPENDENCIES) - @rm -f t-eoproblem - $(CXXLINK) $(t_eoproblem_LDFLAGS) $(t_eoproblem_OBJECTS) $(t_eoproblem_LDADD) $(LIBS) - -t-eobin: $(t_eobin_OBJECTS) $(t_eobin_DEPENDENCIES) - @rm -f t-eobin - $(CXXLINK) $(t_eobin_LDFLAGS) $(t_eobin_OBJECTS) $(t_eobin_LDADD) $(LIBS) - -t-eolottery: $(t_eolottery_OBJECTS) $(t_eolottery_DEPENDENCIES) - @rm -f t-eolottery - $(CXXLINK) $(t_eolottery_LDFLAGS) $(t_eolottery_OBJECTS) $(t_eolottery_LDADD) $(LIBS) - -t-eo2dVector: $(t_eo2dVector_OBJECTS) $(t_eo2dVector_DEPENDENCIES) - @rm -f t-eo2dVector - $(CXXLINK) $(t_eo2dVector_LDFLAGS) $(t_eo2dVector_OBJECTS) $(t_eo2dVector_LDADD) $(LIBS) - -t-eogeneration: $(t_eogeneration_OBJECTS) $(t_eogeneration_DEPENDENCIES) - @rm -f t-eogeneration - $(CXXLINK) $(t_eogeneration_LDFLAGS) $(t_eogeneration_OBJECTS) $(t_eogeneration_LDADD) $(LIBS) - -t-eoEasyEA: $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_DEPENDENCIES) - @rm -f t-eoEasyEA - $(CXXLINK) $(t_eoEasyEA_LDFLAGS) $(t_eoEasyEA_OBJECTS) $(t_eoEasyEA_LDADD) $(LIBS) - -t-eoNonUniform: $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_DEPENDENCIES) - @rm -f t-eoNonUniform - $(CXXLINK) $(t_eoNonUniform_LDFLAGS) $(t_eoNonUniform_OBJECTS) $(t_eoNonUniform_LDADD) $(LIBS) - -t-eoUniform: $(t_eoUniform_OBJECTS) $(t_eoUniform_DEPENDENCIES) - @rm -f t-eoUniform - $(CXXLINK) $(t_eoUniform_LDFLAGS) $(t_eoUniform_OBJECTS) $(t_eoUniform_LDADD) $(LIBS) - -t-eoRandom: $(t_eoRandom_OBJECTS) $(t_eoRandom_DEPENDENCIES) - @rm -f t-eoRandom - $(CXXLINK) $(t_eoRandom_LDFLAGS) $(t_eoRandom_OBJECTS) $(t_eoRandom_LDADD) $(LIBS) - -t-eoStateAndParser: $(t_eoStateAndParser_OBJECTS) $(t_eoStateAndParser_DEPENDENCIES) - @rm -f t-eoStateAndParser - $(CXXLINK) $(t_eoStateAndParser_LDFLAGS) $(t_eoStateAndParser_OBJECTS) $(t_eoStateAndParser_LDADD) $(LIBS) - -t-eoAtomOps: $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_DEPENDENCIES) - @rm -f t-eoAtomOps - $(CXXLINK) $(t_eoAtomOps_LDFLAGS) $(t_eoAtomOps_OBJECTS) $(t_eoAtomOps_LDADD) $(LIBS) - -t-selectOne: $(t_selectOne_OBJECTS) $(t_selectOne_DEPENDENCIES) - @rm -f t-selectOne - $(CXXLINK) $(t_selectOne_LDFLAGS) $(t_selectOne_OBJECTS) $(t_selectOne_LDADD) $(LIBS) - -t-eoGOpSel: $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_DEPENDENCIES) - @rm -f t-eoGOpSel - $(CXXLINK) $(t_eoGOpSel_LDFLAGS) $(t_eoGOpSel_OBJECTS) $(t_eoGOpSel_LDADD) $(LIBS) - -t-eoVector: $(t_eoVector_OBJECTS) $(t_eoVector_DEPENDENCIES) - @rm -f t-eoVector - $(CXXLINK) $(t_eoVector_LDFLAGS) $(t_eoVector_OBJECTS) $(t_eoVector_LDADD) $(LIBS) - -t-eoCheckpointing: $(t_eoCheckpointing_OBJECTS) $(t_eoCheckpointing_DEPENDENCIES) - @rm -f t-eoCheckpointing - $(CXXLINK) $(t_eoCheckpointing_LDFLAGS) $(t_eoCheckpointing_OBJECTS) $(t_eoCheckpointing_LDADD) $(LIBS) - -t-eoExternalEO: $(t_eoExternalEO_OBJECTS) $(t_eoExternalEO_DEPENDENCIES) - @rm -f t-eoExternalEO - $(CXXLINK) $(t_eoExternalEO_LDFLAGS) $(t_eoExternalEO_OBJECTS) $(t_eoExternalEO_LDADD) $(LIBS) - -t-eoESFull: $(t_eoESFull_OBJECTS) $(t_eoESFull_DEPENDENCIES) - @rm -f t-eoESFull - $(CXXLINK) $(t_eoESFull_LDFLAGS) $(t_eoESFull_OBJECTS) $(t_eoESFull_LDADD) $(LIBS) -.cc.o: - $(CXXCOMPILE) -c $< -.cc.lo: - $(LTCXXCOMPILE) -c $< -.cpp.o: - $(CXXCOMPILE) -c $< -.cpp.lo: - $(LTCXXCOMPILE) -c $< - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -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 $$/$$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: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile $(PROGRAMS) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ - mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ - clean-depend clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-noinstPROGRAMS distclean-compile \ - 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-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." - -maintainer-clean: maintainer-clean-am - -.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ -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 \ -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 - - -############################################################################### - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/eo/tutorial/html/index.html b/eo/tutorial/html/index.html deleted file mode 100644 index 00734f654..000000000 --- a/eo/tutorial/html/index.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Tutorial EO - - -Algorithm-Based - Component-Based -- Programming hints - EO -documentation -


    -
    Welcome to EO, the Evolving Objects library, -and to -  -

    -EO Tutorial

    - -
    Version 0.92 - Jan. 5 2001
    - -

    The short term idea of this tutorial is to help you build -your own Evolutionary Algorithms using EO - while the long term -idea is that you will be able to contribute to EO, and ultimately write -our -EAs :-) -

    - -
    About this tutorial

    -This tutorial can be used in 2 different ways: algorithm-based and component-based. -
      -
    • -Algorithm-Based means you start from a very -simple, ready-to-run algorithm, and gradually modify it, making -it both more powerful and more complex.
    • - -
    • -Component-Based means you start by examining -the -components of an EA one by one, down to -the level of complexity you feel comfortable with, and then build the whole -algorithm using those components you need (or the one you are mastering). -Such approach might be viewed as going through a simplified user guide, -too.
    • -
    -However, it is strongly recommended -that you take some time on the first lesson of the Algorithm-Based approach -to get familiar with the basic concepts that are used throughout EO. Anyway, -as of today, December 19, the Component-Based is only very sparsely written -:-) -

    -


    Links and Related -documents -
      -
    • -There are of course a few (very few) programming -hints that you should know.
    • - -
    • -THe EO documentation - automatically -generated from the comments in the code - is very helpful to get an idea -of the inheritance diagrams of EO classes, -and to quickly reach some specific part of the code.
    • - -
      The top page of each class documentation is for instance the inheritance -diagram of the class, and you'll learn a lot by simply looking at it. -
    • -And, last but not least, we assume you know approximately that an Evolutionary -Algorithm looks like this, but otherwise you can try this very -brief introduction (not written yet, Jan. 2001, sorry).
    • -
    - -


    -


    Colors and navigation: -

    You will see this diagram in quite many places, as for instance at the -top of all examples - usually it will be clickable and will help you navigate -among the different parts of an EO program. See the brief -introduction to Evolutionary Computation for a detailed explanation. -

    -

    - -

    But in the text itself, colors are important, -as they will be used throughout this tutorial to clearly mark which part -of the algorithm we are discussing. So please keep in mind that, whereas -orange -is for emphasis, -

      -
    • -Yellowish is for representation, -i.e. the choice of the genotype
    • - -
    • -Magenta is for the stochastic -operators that are representation-dependent, -i.e. initialisation and variation operators -(crossover, mutation -and the like).
    • - -
    • -Green is for the implementation of Darwinism, -i.e. the way the individuals are selected -for reproduction and survive.
    • - -
    • -Red is for evaluation, i.e. the computation -of the fitness of all individuals
    • - -
    • -Blue is for interactions of the user and the -program, as for instance choice of stopping criterion, -on-line display of nice statistics or initial -choice -of all program parameters.
    • - -
    • -Brown is for everything that is NOT part of -any of the above, i.e. random number generator, or basic C++/STL syntax -.
    • - -
    • -Note that pink will be used to describe the -syntax of compile orders (i.e. at the operating system level, see e.g. -below).
    • - -
    • -Last, but not least, all -links into EO documentation will use the Helvetica typeface, like this -line you are now reading.
    • -
    - -
    This tutorial is -not -
      -
    • -A course on Evolutionary Computation. You can find such things on the Internet, -maybe you can start here.
    • - -
    • -An interface that would allow you to build your Evolutionary Programs by -a few clicks; such a thing does exist, is called EASEA, -and is complementary to this tutorial as it helps the user to build some -simple EO programs from simple description. But there are things that EASEA -cannot do, and you will have to do it yourself and will need to increase -your knowledge about EO for that - hence this tutorial.
    • - -
    • -A coffee machine - though you might want to spend some time here when you're -tired of everything else, to improve your knowledge of EO slowly and gradually -rather than when you have something urgent to code :-)
    • -
    - -
    Before -you start -

    You should of course have downloaded and installed the whole EO -library (how did you get this file if not???). -
    So we'll assume that you are now in the Tutorial directory, and that -your prompt looks something like -

    (myname@myhost) EOdir/Tutorial % -

    so you should now type in -

    make lesson1 -

    and see something like -

    (myname@myhost) -EOdir/Tutorial % make lesson1 -
    c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" --I. -I../../src -Wall -g -c FirstBitGA.cpp -
    c++ -Wall -g -o FirstBitGA FirstBitGA.o -../../src/libeo.a ../../src/utils/libeoutils.a -
    c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" --I. -I../../src -Wall -g -c FirstRealGA.cpp -
    c++ -Wall -g -o FirstRealGA FirstRealGA.o -../../src/libeo.a ../../src/utils/libeoutils.a -

    and two now executable files should have appeared in the subdirectory -Lesson1, namely FirstBitGA -and FirstRealGA (see First -lesson to know more about these two ready-to-run programs). If this -doesn't work, please go back to the main EO directory and run the installation -program. -

    You should also test that you can access the EO documentation in the -menu line below: you might not need to go there immediately, but just in -case you make rapid progress ... This menu bar should be on all pages of -this tutorial, allowing you to navigate easily. -

    Last, but not least: EO is improving only  from the good will of -contributors. This is also true for this tutorial: If you find anything -that you think could be improved, you are welcome to e-mail -me. -

    -

    Enjoy! -


    Algorithm-Based -- Component-Based - Programming -hints - EO -documentation
    - -
    -
    -Marc Schoenauer
    - -
    Last -modified: Fri Nov 28 2000  - - From f8bd8605794dbbd25463f93613443d085d939864 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Tue, 4 May 2010 17:18:12 +0000 Subject: [PATCH 1448/2134] configure changes to prepare for use of libyaml-cpp --- eo/configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eo/configure.in b/eo/configure.in index 6aaa54484..50c257941 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -38,6 +38,22 @@ AC_TYPE_SIZE_T dnl Checks for libraries and library functions. AC_CHECK_LIB(m, cos) + +dnl Check for C++ library yaml-cpp (AC_CHEC_LIB only supports checking for C libraries) +AC_MSG_CHECKING('libyaml-cpp available') +AC_LANG(C++) +SAVED_LDFLAGS=$LDFLAGS +LDFLAGS="$LDFLAGS -lyaml-cpp" +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [YAML::Emitter dummy])], + [ AC_MSG_RESULT([yes]) + SAVED_LDFLAGS="$SAVED_LDFLAGS -lyaml-cpp" + AC_DEFINE(HAVE_LIBYAML_CPP,1,[Define to 1 if you have libyaml-cpp installed]) ], + [AC_MSG_RESULT([no])]) +LDFLAGS=$SAVED_LDFLAGS + + + dnl user-switches AC_APPLICATIONS AC_DEBUG From e58ef45f70f76d1ef0fcdb33d756760ffebfa82c Mon Sep 17 00:00:00 2001 From: stevemadere Date: Thu, 6 May 2010 22:46:10 +0000 Subject: [PATCH 1449/2134] added support to save app/gprop/mlp as YAML --- eo/app/gprop/mlp.h | 63 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 3628325f1..06036e607 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -20,6 +20,10 @@ #include #include +#ifdef HAVE_LIBYAML_CPP +#include +#endif // HAVE_LIBYAML_CPP + namespace mlp { @@ -125,6 +129,36 @@ namespace mlp if ( probability >= 1.0 || rng.uniform() < probability) perturb_num(bias, magnitude); } + + #ifdef HAVE_LIBYAML_CPP + friend YAML::Emitter& operator<<(YAML::Emitter& out, const mlp::neuron& n) { + n.emit_yaml(out); + return out; + } + + void emit_yaml(YAML::Emitter&out) const { + out << YAML::BeginMap; + out << YAML::Key << "Class" << YAML::Value << "mlp::neuron"; + #define MY_EMIT_MEMBER(emitter,member) emitter << YAML::Key << #member << YAML::Value << this->member + MY_EMIT_MEMBER(out,bias); + MY_EMIT_MEMBER(out,weight); + out << YAML::EndMap; + #undef MY_EMIT_MEMBER + } + + friend void operator >>(const YAML::Node& node, mlp::neuron& n) { + n.load_yaml(node); + } + + void load_yaml(const YAML::Node& node) { + #define MY_LOAD_MEMBER(doc,member) doc[#member] >> member + MY_LOAD_MEMBER(node, bias); + MY_LOAD_MEMBER(node, weight); + #undef MY_LOAD_MEMBER + } + + + #endif }; } @@ -140,8 +174,10 @@ namespace std { return is >> n.bias >> n.weight; } + } + namespace mlp { //--------------------------------------------------------------------------- @@ -190,6 +226,21 @@ namespace mlp { for(iterator n = begin(); n != end(); ++n) n->perturb(); } + #ifdef HAVE_LIBYAML_CPP + friend ostream& operator<<(YAML::Emitter& e, const layer &l) { + e << ((std::vector)l); + } + + friend void operator>>(const YAML::Node& n, layer &l) { + // These temporary variable shenanegins are necessary because + // the compiler gets very confused about which template operator>> + // function to use. + // This does not work: n >> l; + // So we use a temporary variable thusly: + std::vector *obviously_a_vector = &l; + n >> *obviously_a_vector; + } + #endif }; @@ -235,6 +286,11 @@ namespace mlp { net(istream &is) { load(is); } + #ifdef HAVE_LIBYAML_CPP + net (YAML::Node &node) { + node >> *((std::vector*)this); + } + #endif /** Virtual destructor */ virtual ~net() {}; @@ -305,10 +361,13 @@ namespace mlp { for(const_iterator l = begin(); l != end(); ++l) os << l->size() << " "; os << "\n"; - os << *this; - os << "\n"; + os << "< "; + for(const_iterator l = begin(); l != end(); ++l) + os << *l << " "; + os << ">\n"; } + unsigned num_inputs() const { return front().front().length() - 1; } unsigned num_outputs() const { return back().size(); } unsigned num_hidden_layers() const { From 68a03aa429b6fecf26e1d1942f11cefe62a01455 Mon Sep 17 00:00:00 2001 From: stevemadere Date: Fri, 7 May 2010 03:17:44 +0000 Subject: [PATCH 1450/2134] changed YAML saving technique to YAML::Serializable --- eo/app/gprop/mlp.h | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 06036e607..dbd12bda2 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -21,7 +21,7 @@ #include #ifdef HAVE_LIBYAML_CPP -#include +#include #endif // HAVE_LIBYAML_CPP @@ -131,33 +131,18 @@ namespace mlp } #ifdef HAVE_LIBYAML_CPP - friend YAML::Emitter& operator<<(YAML::Emitter& out, const mlp::neuron& n) { - n.emit_yaml(out); - return out; - } - + YAML_SERIALIZABLE_AUTO(neuron) void emit_yaml(YAML::Emitter&out) const { out << YAML::BeginMap; out << YAML::Key << "Class" << YAML::Value << "mlp::neuron"; - #define MY_EMIT_MEMBER(emitter,member) emitter << YAML::Key << #member << YAML::Value << this->member - MY_EMIT_MEMBER(out,bias); - MY_EMIT_MEMBER(out,weight); + YAML_EMIT_MEMBER(out,bias); + YAML_EMIT_MEMBER(out,weight); out << YAML::EndMap; - #undef MY_EMIT_MEMBER } - - friend void operator >>(const YAML::Node& node, mlp::neuron& n) { - n.load_yaml(node); - } - void load_yaml(const YAML::Node& node) { - #define MY_LOAD_MEMBER(doc,member) doc[#member] >> member - MY_LOAD_MEMBER(node, bias); - MY_LOAD_MEMBER(node, weight); - #undef MY_LOAD_MEMBER + YAML_LOAD_MEMBER(node, bias); + YAML_LOAD_MEMBER(node, weight); } - - #endif }; } @@ -235,7 +220,7 @@ namespace mlp { // These temporary variable shenanegins are necessary because // the compiler gets very confused about which template operator>> // function to use. - // This does not work: n >> l; + // The following does not work: n >> l; // So we use a temporary variable thusly: std::vector *obviously_a_vector = &l; n >> *obviously_a_vector; @@ -273,6 +258,9 @@ namespace mlp { //--------------------------------------------------------------------------- class net: public std::vector + #ifdef HAVE_LIBYAML_CPP + , public YAML::Serializable + #endif { public: net(const unsigned& num_inputs = 0, @@ -287,10 +275,17 @@ namespace mlp { load(is); } #ifdef HAVE_LIBYAML_CPP - net (YAML::Node &node) { - node >> *((std::vector*)this); + YAML_SERIALIZABLE_AUTO(net) + void emit_members(YAML::Emitter&out) const { + const std::vector* me_as_layer_vector = this; + out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector; } - #endif + + void load_members(const YAML::Node& node) { + std::vector* me_as_layer_vector = this; + node["layers"] >> *me_as_layer_vector; + } + #endif // HAVE_LIBYAML_CPP /** Virtual destructor */ virtual ~net() {}; From 0695b25c08782bb1cd435ef7ecc6a22a3c6f37d6 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Thu, 10 Jun 2010 10:03:26 +0000 Subject: [PATCH 1451/2134] Add "Visual Studio 10" in config file for CMake --- eo/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 9dd280c8c..dcfd9d609 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -75,14 +75,14 @@ ENDIF(NOT CMAKE_BUILD_TYPE) IF(WIN32 AND NOT CYGWIN) IF(CMAKE_CXX_COMPILER MATCHES cl) IF(NOT WITH_SHARED_LIBS) - IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") + IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") SET(CMAKE_CXX_FLAGS "/nologo /Gy") SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od") SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") - ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") + ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") ENDIF(NOT WITH_SHARED_LIBS) ENDIF(CMAKE_CXX_COMPILER MATCHES cl) ELSE(WIN32 AND NOT CYGWIN) From ed35ed4da09b37ea13859a609e0c78d7bcf3d9e4 Mon Sep 17 00:00:00 2001 From: paradiseo Date: Tue, 22 Jun 2010 09:31:58 +0000 Subject: [PATCH 1452/2134] Store a result in a variable to have no warning --- eo/src/utils/eoFileSnapshot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index d94d53462..7392c70a4 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -79,7 +79,7 @@ public : else s = " "; - system(s.c_str()); + res=system(s.c_str()); // all done } From a038586edbe551ac13db8a9754b04e65b992bdb5 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 5 Jul 2010 19:04:35 +0200 Subject: [PATCH 1454/2134] + do files --- src/CMakeLists.txt | 35 ++++ src/do | 36 ++++ src/doAlgo.h | 16 ++ src/doBounder.h | 27 +++ src/doBounderBound.h | 35 ++++ src/doBounderNo.h | 14 ++ src/doBounderRng.h | 35 ++++ src/doCMASA.h | 395 +++++++++++++++++++++++++++++++++++++ src/doDistrib.h | 14 ++ src/doDistribParams.h | 32 +++ src/doEstimator.h | 16 ++ src/doEstimatorNormal.h | 46 +++++ src/doEstimatorUniform.h | 44 +++++ src/doFileSnapshot.h | 227 +++++++++++++++++++++ src/doModifier.h | 13 ++ src/doModifierDispersion.h | 16 ++ src/doModifierMass.h | 17 ++ src/doNormal.h | 16 ++ src/doNormalCenter.h | 19 ++ src/doNormalParams.h | 24 +++ src/doSampler.h | 58 ++++++ src/doSamplerNormal.h | 60 ++++++ src/doSamplerUniform.h | 55 ++++++ src/doStats.h | 121 ++++++++++++ src/doUniform.h | 16 ++ src/doUniformCenter.h | 28 +++ src/doVectorBounds.h | 24 +++ 27 files changed, 1439 insertions(+) create mode 100644 src/CMakeLists.txt create mode 100644 src/do create mode 100644 src/doAlgo.h create mode 100644 src/doBounder.h create mode 100644 src/doBounderBound.h create mode 100644 src/doBounderNo.h create mode 100644 src/doBounderRng.h create mode 100644 src/doCMASA.h create mode 100644 src/doDistrib.h create mode 100644 src/doDistribParams.h create mode 100644 src/doEstimator.h create mode 100644 src/doEstimatorNormal.h create mode 100644 src/doEstimatorUniform.h create mode 100644 src/doFileSnapshot.h create mode 100644 src/doModifier.h create mode 100644 src/doModifierDispersion.h create mode 100644 src/doModifierMass.h create mode 100644 src/doNormal.h create mode 100644 src/doNormalCenter.h create mode 100644 src/doNormalParams.h create mode 100644 src/doSampler.h create mode 100644 src/doSamplerNormal.h create mode 100644 src/doSamplerUniform.h create mode 100644 src/doStats.h create mode 100644 src/doUniform.h create mode 100644 src/doUniformCenter.h create mode 100644 src/doVectorBounds.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..a913882bf --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,35 @@ +FIND_PACKAGE(Boost 1.33.0 REQUIRED) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +SET(RESOURCES + cma_sa.param + plot.py + ) + +FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${CMAKE_CURRENT_BINARY_DIR}/${file} + ) +ENDFOREACH(file) + +ADD_EXECUTABLE(cma_sa main.cpp) + +TARGET_LINK_LIBRARIES(cma_sa + ${Boost_LIBRARIES} + BOPO + eoutils + pthread + moeo + eo + peo + rmc_mpi + eometah + nklandscapes + BOPO + #${MPICH2_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${MPI_LIBRARIES} + ) diff --git a/src/do b/src/do new file mode 100644 index 000000000..302895786 --- /dev/null +++ b/src/do @@ -0,0 +1,36 @@ +#ifndef _do_ +#define _do_ + +#include "doAlgo.h" +#include "doCMASA.h" + +#include "doDistrib.h" +#include "doUniform.h" +#include "doNormal.h" + +#include "doEstimator.h" +#include "doEstimatorUniform.h" +#include "doEstimatorNormal.h" + +#include "doModifier.h" +#include "doModifierDispersion.h" +#include "doModifierMass.h" +#include "doUniformCenter.h" +#include "doNormalCenter.h" + +#include "doSampler.h" +#include "doSamplerUniform.h" +#include "doSamplerNormal.h" + +#include "doDistribParams.h" +#include "doVectorBounds.h" +#include "doNormalParams.h" + +#include "doBounder.h" +#include "doBounderNo.h" +#include "doBounderBound.h" +#include "doBounderRng.h" + +#include "doStats.h" + +#endif // !_do_ diff --git a/src/doAlgo.h b/src/doAlgo.h new file mode 100644 index 000000000..54ea1698f --- /dev/null +++ b/src/doAlgo.h @@ -0,0 +1,16 @@ +#ifndef _doAlgo_h +#define _doAlgo_h + +#include + +template < typename D > +class doAlgo : public eoAlgo< typename D::EOType > +{ + //! Alias for the type + typedef typename D::EOType EOT; + +public: + virtual ~doAlgo(){} +}; + +#endif // !_doAlgo_h diff --git a/src/doBounder.h b/src/doBounder.h new file mode 100644 index 000000000..28996474c --- /dev/null +++ b/src/doBounder.h @@ -0,0 +1,27 @@ +#ifndef _doBounder_h +#define _doBounder_h + +#include + +template < typename EOT > +class doBounder : public eoUF< EOT&, void > +{ +public: + doBounder( EOT min = -5, EOT max = 5 ) + : _min(min), _max(max) + { + assert(_min.size() > 0); + assert(_min.size() == _max.size()); + } + + // virtual void operator()( EOT& ) = 0 (provided by eoUF< A1, R >) + + EOT& min(){return _min;} + EOT& max(){return _max;} + +private: + EOT _min; + EOT _max; +}; + +#endif // !_doBounder_h diff --git a/src/doBounderBound.h b/src/doBounderBound.h new file mode 100644 index 000000000..a284d2cbe --- /dev/null +++ b/src/doBounderBound.h @@ -0,0 +1,35 @@ +#ifndef _doBounderBound_h +#define _doBounderBound_h + +#include "doBounder.h" + +template < typename EOT > +class doBounderBound : public doBounder< EOT > +{ +public: + doBounderBound( EOT min, EOT max ) + : doBounder< EOT >( min, max ) + {} + + void operator()( EOT& x ) + { + unsigned int size = x.size(); + assert(size > 0); + + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { + if (x[d] < this->min()[d]) + { + x[d] = this->min()[d]; + continue; + } + + if (x[d] > this->max()[d]) + { + x[d] = this->max()[d]; + } + } + } +}; + +#endif // !_doBounderBound_h diff --git a/src/doBounderNo.h b/src/doBounderNo.h new file mode 100644 index 000000000..36e34451a --- /dev/null +++ b/src/doBounderNo.h @@ -0,0 +1,14 @@ +#ifndef _doBounderNo_h +#define _doBounderNo_h + +#include "doBounder.h" + +template < typename EOT > +class doBounderNo : public doBounder< EOT > +{ +public: + void operator()( EOT& x ) + {} +}; + +#endif // !_doBounderNo_h diff --git a/src/doBounderRng.h b/src/doBounderRng.h new file mode 100644 index 000000000..2f2450bc7 --- /dev/null +++ b/src/doBounderRng.h @@ -0,0 +1,35 @@ +#ifndef _doBounderRng_h +#define _doBounderRng_h + +#include "doBounder.h" + +template < typename EOT > +class doBounderRng : public doBounder< EOT > +{ +public: + doBounderRng( EOT min, EOT max, eoRndGenerator< double > & rng ) + : doBounder< EOT >( min, max ), _rng(rng) + {} + + void operator()( EOT& x ) + { + unsigned int size = x.size(); + assert(size > 0); + + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { + + // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. + + if (x[d] < this->min()[d] || x[d] > this->max()[d]) + { + x[d] = _rng(); + } + } + } + +private: + eoRndGenerator< double> & _rng; +}; + +#endif // !_doBounderRng_h diff --git a/src/doCMASA.h b/src/doCMASA.h new file mode 100644 index 000000000..cdf446c8f --- /dev/null +++ b/src/doCMASA.h @@ -0,0 +1,395 @@ +#ifndef _doCMASA_h +#define _doCMASA_h + +//----------------------------------------------------------------------------- +// Temporary solution to store populations state at each iteration for plotting. +//----------------------------------------------------------------------------- + +// system header inclusion +#include +// end system header inclusion + +// mkdir headers inclusion +#include +#include +// end mkdir headers inclusion + +#include +#include + +#include + +#include +#include + +//----------------------------------------------------------------------------- + +#include +#include + +#include + +#include "doAlgo.h" +#include "doEstimator.h" +#include "doModifierMass.h" +#include "doSampler.h" + +using namespace boost::numeric::ublas; + +template < typename D > +class doCMASA : public doAlgo< D > +{ +public: + //! Alias for the type + typedef typename D::EOType EOT; + + //! Alias for the fitness + typedef typename EOT::Fitness Fitness; + +public: + + //! doCMASA constructor + /*! + All the boxes used by a CMASA need to be given. + + \param selector The EOT selector + \param estomator The EOT selector + \param selectone SelectOne + \param modifier The D modifier + \param sampler The D sampler + \param evaluation The evaluation function. + \param continue The stopping criterion. + \param cooling_schedule The cooling schedule, describes how the temperature is modified. + \param initial_temperature The initial temperature. + \param replacor The EOT replacor + */ + doCMASA (eoSelect< EOT > & selector, + doEstimator< D > & estimator, + eoSelectOne< EOT > & selectone, + doModifierMass< D > & modifier, + doSampler< D > & sampler, + eoContinue< EOT > & monitoring_continue, + eoEvalFunc < EOT > & evaluation, + moSolContinue < EOT > & continuator, + moCoolingSchedule & cooling_schedule, + double initial_temperature, + eoReplacement< EOT > & replacor + ) + : _selector(selector), + _estimator(estimator), + _selectone(selectone), + _modifier(modifier), + _sampler(sampler), + _monitoring_continue(monitoring_continue), + _evaluation(evaluation), + _continuator(continuator), + _cooling_schedule(cooling_schedule), + _initial_temperature(initial_temperature), + _replacor(replacor) + {} + + //! function that launches the CMASA algorithm. + /*! + As a moTS or a moHC, the CMASA can be used for HYBRIDATION in an evolutionary algorithm. + + \param pop A population to improve. + \return TRUE. + */ + //bool operator ()(eoPop< EOT > & pop) + void operator ()(eoPop< EOT > & pop) + { + assert(pop.size() > 0); + + double temperature = _initial_temperature; + + eoPop< EOT > current_pop = pop; + + eoPop< EOT > selected_pop; + + //------------------------------------------------------------- + // Temporary solution used by plot to enumerate iterations in + // several files. + //------------------------------------------------------------- + + int number_of_iterations = 0; + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Temporary solution to store populations state at each + // iteration for plotting. + //------------------------------------------------------------- + + std::string pop_results_destination("ResPop"); + + { + std::stringstream ss; + ss << "rm -rf " << pop_results_destination; + ::system(ss.str().c_str()); + } + + ::mkdir(pop_results_destination.c_str(), 0755); // create a first time the + // directory where populations state are going to be stored. + std::ofstream ofs_params("ResParams.txt"); + std::ofstream ofs_params_var("ResVars.txt"); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Temporary solution to store bounds valeur for each distribution. + //------------------------------------------------------------- + + std::string bounds_results_destination("ResBounds"); + + { + std::stringstream ss; + ss << "rm -rf " << bounds_results_destination; + ::system(ss.str().c_str()); + } + + ::mkdir(bounds_results_destination.c_str(), 0755); // create a first time the + + //------------------------------------------------------------- + + + { + D distrib = _estimator(pop); + + double size = distrib.size(); + + assert(size > 0); + + double vacc = 1; + + for (int i = 0; i < size; ++i) + { + vacc *= sqrt(distrib.variance()[i]); + } + + assert(vacc <= std::numeric_limits::max()); + + ofs_params_var << vacc << std::endl; + } + + do + { + if (pop != current_pop) + { + _replacor(pop, current_pop); + } + + current_pop.clear(); + selected_pop.clear(); + + + //------------------------------------------------------------- + // (3) Selection of the best points in the population + //------------------------------------------------------------- + + _selector(pop, selected_pop); + + //------------------------------------------------------------- + + + _continuator.init(); + + + //------------------------------------------------------------- + // (4) Estimation of the distribution parameters + //------------------------------------------------------------- + + D distrib = _estimator(selected_pop); + + //------------------------------------------------------------- + + + // TODO: utiliser selected_pop ou pop ??? + + assert(selected_pop.size() > 0); + + + //------------------------------------------------------------- + // Init of a variable contening a point with the bestest fitnesses + //------------------------------------------------------------- + + EOT current_solution = _selectone(selected_pop); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Fit the current solution with the distribution parameters (bounds) + //------------------------------------------------------------- + + // FIXME: si besoin de modifier la dispersion de la distribution + // _modifier_dispersion(distribution, selected_pop); + _modifier(distrib, current_solution); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Building of the sampler in current_pop + //------------------------------------------------------------- + + do + { + EOT candidate_solution = _sampler(distrib); + + EOT& e1 = candidate_solution; + _evaluation( e1 ); + EOT& e2 = current_solution; + _evaluation( e2 ); + + // TODO: verifier le critere d'acceptation + if ( e1.fitness() < e2.fitness() || + rng.uniform() < exp( ::fabs(e1.fitness() - e2.fitness()) / temperature ) ) + { + current_pop.push_back(candidate_solution); + current_solution = candidate_solution; + } + } + while ( _continuator( current_solution) ); + + + //------------------------------------------------------------- + // Temporary solution to store populations state + // at each iteration for plotting. + //------------------------------------------------------------- + + { + std::stringstream ss; + ss << pop_results_destination << "/" << number_of_iterations; + std::ofstream ofs(ss.str().c_str()); + ofs << current_pop; + } + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Temporary solution used by plot to enumerate iterations in + // several files. + //------------------------------------------------------------- + + { + double size = distrib.size(); + + assert(size > 0); + + std::stringstream ss; + ss << bounds_results_destination << "/" << number_of_iterations; + std::ofstream ofs(ss.str().c_str()); + + ofs << size << " "; + std::copy(distrib.param(0).begin(), distrib.param(0).end(), std::ostream_iterator< double >(ofs, " ")); + std::copy(distrib.param(1).begin(), distrib.param(1).end(), std::ostream_iterator< double >(ofs, " ")); + ofs << std::endl; + } + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Temporary saving to get a proof for distribution bounds + // dicreasement + //------------------------------------------------------------- + + { + // double size = distrib.size(); + + // assert(size > 0); + + // vector< double > vmin(size); + // vector< double > vmax(size); + + // std::copy(distrib.param(0).begin(), distrib.param(0).end(), vmin.begin()); + // std::copy(distrib.param(1).begin(), distrib.param(1).end(), vmax.begin()); + + // vector< double > vrange = vmax - vmin; + + // double vacc = 1; + + // for (int i = 0, size = vrange.size(); i < size; ++i) + // { + // vacc *= vrange(i); + // } + + // assert(vacc <= std::numeric_limits::max()); + + // ofs_params << vacc << std::endl; + } + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Temporary saving to get a proof for distribution bounds + // dicreasement + //------------------------------------------------------------- + + { + double size = distrib.size(); + + assert(size > 0); + + double vacc = 1; + + for (int i = 0; i < size; ++i) + { + vacc *= sqrt(distrib.variance()[i]); + } + + assert(vacc <= std::numeric_limits::max()); + + ofs_params_var << vacc << std::endl; + } + + //------------------------------------------------------------- + + ++number_of_iterations; + + } + while ( _cooling_schedule( temperature ) && + _monitoring_continue( selected_pop ) ); + } + +private: + + //! A EOT selector + eoSelect < EOT > & _selector; + + //! A EOT estimator. It is going to estimate distribution parameters. + doEstimator< D > & _estimator; + + //! SelectOne + eoSelectOne< EOT > & _selectone; + + //! A D modifier + doModifierMass< D > & _modifier; + + //! A D sampler + doSampler< D > & _sampler; + + //! A EOT monitoring continuator + eoContinue < EOT > & _monitoring_continue; + + //! A full evaluation function. + eoEvalFunc < EOT > & _evaluation; + + //! Stopping criterion before temperature update + moSolContinue < EOT > & _continuator; + + //! The cooling schedule + moCoolingSchedule & _cooling_schedule; + + //! Initial temperature + double _initial_temperature; + + //! A EOT replacor + eoReplacement < EOT > & _replacor; +}; + +#endif // !_doCMASA_h diff --git a/src/doDistrib.h b/src/doDistrib.h new file mode 100644 index 000000000..71c2f6f1c --- /dev/null +++ b/src/doDistrib.h @@ -0,0 +1,14 @@ +#ifndef _doDistrib_h +#define _doDistrib_h + +template < typename EOT > +class doDistrib +{ +public: + //! Alias for the type + typedef EOT EOType; + + virtual ~doDistrib(){} +}; + +#endif // !_doDistrib_h diff --git a/src/doDistribParams.h b/src/doDistribParams.h new file mode 100644 index 000000000..b895eec98 --- /dev/null +++ b/src/doDistribParams.h @@ -0,0 +1,32 @@ +#ifndef _doDistribParams_h +#define _doDistribParams_h + +#include + +template < typename EOT > +class doDistribParams +{ +public: + doDistribParams(unsigned n = 2) + : _params(n) + {} + + EOT& param(unsigned int i = 0){return _params[i];} + + unsigned int param_size(){return _params.size();} + + unsigned int size() + { + for (unsigned int i = 0, size = param_size(); i < size - 1; ++i) + { + assert(param(i).size() == param(i + 1).size()); + } + + return param(0).size(); + } + +private: + std::vector< EOT > _params; +}; + +#endif // !_doDistribParams_h diff --git a/src/doEstimator.h b/src/doEstimator.h new file mode 100644 index 000000000..682dd3f76 --- /dev/null +++ b/src/doEstimator.h @@ -0,0 +1,16 @@ +#ifndef _doEstimator_h +#define _doEstimator_h + +#include +#include + +template < typename D > +class doEstimator : public eoUF< eoPop< typename D::EOType >&, D > +{ +public: + typedef typename D::EOType EOType; + + // virtual D operator() ( eoPop< EOT >& )=0 (provided by eoUF< A1, R >) +}; + +#endif // !_doEstimator_h diff --git a/src/doEstimatorNormal.h b/src/doEstimatorNormal.h new file mode 100644 index 000000000..133b98032 --- /dev/null +++ b/src/doEstimatorNormal.h @@ -0,0 +1,46 @@ +#ifndef _doEstimatorNormal_h +#define _doEstimatorNormal_h + +#include "doEstimator.h" +#include "doUniform.h" +#include "doStats.h" + +// TODO: calcule de la moyenne + covariance dans une classe derivee + +template < typename EOT > +class doEstimatorNormal : public doEstimator< doNormal< EOT > > +{ +public: + doNormal< EOT > operator()(eoPop& pop) + { + unsigned int popsize = pop.size(); + assert(popsize > 0); + + unsigned int dimsize = pop[0].size(); + assert(dimsize > 0); + + std::vector< Var > var(dimsize); + + for (unsigned int i = 0; i < popsize; ++i) + { + for (unsigned int d = 0; d < dimsize; ++d) + { + var[d].update(pop[i][d]); + } + } + + EOT mean(dimsize); + EOT variance(dimsize); + + for (unsigned int d = 0; d < dimsize; ++d) + { + mean[d] = var[d].get_mean(); + variance[d] = var[d].get_var(); + //variance[d] = var[d].get_std(); // perhaps I should use this !?! + } + + return doNormal< EOT >(mean, variance); + } +}; + +#endif // !_doEstimatorNormal_h diff --git a/src/doEstimatorUniform.h b/src/doEstimatorUniform.h new file mode 100644 index 000000000..8f9b35519 --- /dev/null +++ b/src/doEstimatorUniform.h @@ -0,0 +1,44 @@ +#ifndef _doEstimatorUniform_h +#define _doEstimatorUniform_h + +#include "doEstimator.h" +#include "doUniform.h" + +// TODO: calcule de la moyenne + covariance dans une classe derivee + +template < typename EOT > +class doEstimatorUniform : public doEstimator< doUniform< EOT > > +{ +public: + doUniform< EOT > operator()(eoPop& pop) + { + unsigned int size = pop.size(); + + assert(size > 0); + + EOT min = pop[0]; + EOT max = pop[0]; + + for (unsigned int i = 1; i < size; ++i) + { + unsigned int size = pop[i].size(); + + assert(size > 0); + + // possibilitĂ© d'utiliser std::min_element et std::max_element mais exige 2 pass au lieu d'1. + + for (unsigned int d = 0; d < size; ++d) + { + if (pop[i][d] < min[d]) + min[d] = pop[i][d]; + + if (pop[i][d] > max[d]) + max[d] = pop[i][d]; + } + } + + return doUniform< EOT >(min, max); + } +}; + +#endif // !_doEstimatorUniform_h diff --git a/src/doFileSnapshot.h b/src/doFileSnapshot.h new file mode 100644 index 000000000..39a5bb169 --- /dev/null +++ b/src/doFileSnapshot.h @@ -0,0 +1,227 @@ +//----------------------------------------------------------------------------- +// eoFileSnapshot.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Caner Candan caner@candan.fr + Johann Dréo nojhan@gmail.com + */ +//----------------------------------------------------------------------------- + +#ifndef _doFileSnapshot_h +#define _doFileSnapshot_h + +#include // for mkdir +#include // for mkdir +#include // for unlink + +#include +#include +#include + +#include +#include +#include + +#include + +/** +Prints snapshots of fitnesses to a (new) file every N generations + +Assumes that the parameters that are passed to the monitor +(method add in eoMonitor.h) are eoValueParam > of same size. + +A dir is created and one file per snapshot is created there - +so you can later generate a movie! + +TODO: The counter is handled internally, but this should be changed +so that you can pass e.g. an evalcounter (minor) + +I failed to templatize everything so that it can handle eoParam > +for any type T, simply calling their getValue method ... +*/ + +template < typename EOTParam > +class doFileSnapshot : public eoMonitor +{ +public : + doFileSnapshot(std::string _dirname, unsigned _frequency = 1, + std::string _filename = "gen", + std::string _delim = " ", unsigned _counter = 0, + bool _rmFiles = true): + dirname(_dirname), frequency(_frequency), + filename(_filename), delim(_delim), counter(_counter), boolChanged(true) + { + // FIXME START + // TO REPLACE test command by somethink more gernerical + + std::string s = "test -d " + dirname; + + int res = system(s.c_str()); + // test for (unlikely) errors + if ( (res==-1) || (res==127) ) + throw std::runtime_error("Problem executing test of dir in eoFileSnapshot"); + + // FIXME END + + // now make sure there is a dir without any genXXX file in it + if (res) // no dir present + { + //s = std::string("mkdir ")+dirname; + ::mkdir(dirname.c_str(), 0755); + } + else if (!res && _rmFiles) + { + //s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; + std::string s = dirname+ "/" + filename + "*"; + ::unlink(s.c_str()); + } + // else + // s = " "; + + //int nothing = system(s.c_str()); + // all done + } + + /** accessor: has something changed (for gnuplot subclass) + */ + virtual bool hasChanged() {return boolChanged;} + + /** accessor to the counter: needed by the gnuplot subclass + */ + unsigned getCounter() {return counter;} + + /** accessor to the current filename: needed by the gnuplot subclass + */ + std::string getFileName() {return currentFileName;} + + /** sets the current filename depending on the counter + */ + void setCurrentFileName() + { + std::ostringstream oscount; + oscount << counter; + currentFileName = dirname + "/" + filename + oscount.str(); + } + + /** The operator(void): opens the std::ostream and calls the write method + */ + eoMonitor& operator()(void) + { + if (counter % frequency) + { + boolChanged = false; // subclass with gnuplot will do nothing + counter++; + return (*this); + } + counter++; + boolChanged = true; + setCurrentFileName(); + std::ofstream os(currentFileName.c_str()); + + if (!os) + { + std::string str = "eoFileSnapshot: Could not open " + currentFileName; + throw std::runtime_error(str); + } + + return operator()(os); + } + + /** The operator(): write on an std::ostream + */ + eoMonitor& operator()(std::ostream& _os) + { + //eo::log << eo::debug << "TOTO" << std::endl; + + //_os << "TOTO" << "\n"; + + //_os << v[0] << "\n"; + + // const eoValueParam > * ptParam = + // static_cast >* >(vec[0]); + + // what's the size of vec ?!? + + eo::log << eo::debug; + + eo::log << "vec size: " << vec.size() << std::endl; + + const eoValueParam< EOTParam > * ptParam = + static_cast< const eoValueParam< EOTParam >* >(vec[0]); + + //const std::vector v = ptParam->value(); + EOTParam v(ptParam->value()); + if (vec.size() == 1) // only one std::vector: -> add number in front + { + eo::log << "I am here..." << std::endl; + + //eo::log << *vec[0] << std::endl; + + for (unsigned k=0; k > vv(vec.size()); + std::vector< EOTParam > vv(vec.size()); + vv[0]=v; + for (unsigned i=1; i >* >(vec[1]); + ptParam = static_cast< const eoValueParam< EOTParam >* >(vec[1]); + vv[i] = ptParam->value(); + if (vv[i].size() != v.size()) + throw std::runtime_error("Dimension error in eoSnapshotMonitor"); + } + for (unsigned k=0; k +class doModifier +{ +public: + virtual ~doModifier(){} + + typedef typename D::EOType EOType; +}; + +#endif // !_doModifier_h diff --git a/src/doModifierDispersion.h b/src/doModifierDispersion.h new file mode 100644 index 000000000..2632757b5 --- /dev/null +++ b/src/doModifierDispersion.h @@ -0,0 +1,16 @@ +#ifndef _doModifierDispersion_h +#define _doModifierDispersion_h + +#include +#include + +#include "doModifier.h" + +template < typename D > +class doModifierDispersion : public doModifier< D >, public eoBF< D&, eoPop< typename D::EOType >&, void > +{ +public: + // virtual void operator() ( D&, eoPop< D::EOType >& )=0 (provided by eoBF< A1, A2, R >) +}; + +#endif // !_doModifierDispersion_h diff --git a/src/doModifierMass.h b/src/doModifierMass.h new file mode 100644 index 000000000..411c3f297 --- /dev/null +++ b/src/doModifierMass.h @@ -0,0 +1,17 @@ +#ifndef _doModifierMass_h +#define _doModifierMass_h + +#include + +#include "doModifier.h" + +template < typename D > +class doModifierMass : public doModifier< D >, public eoBF< D&, typename D::EOType&, void > +{ +public: + //typedef typename D::EOType::AtomType AtomType; // does not work !!! + + // virtual void operator() ( D&, D::EOType& )=0 (provided by eoBF< A1, A2, R >) +}; + +#endif // !_doModifierMass_h diff --git a/src/doNormal.h b/src/doNormal.h new file mode 100644 index 000000000..6de887fc9 --- /dev/null +++ b/src/doNormal.h @@ -0,0 +1,16 @@ +#ifndef _doNormal_h +#define _doNormal_h + +#include "doDistrib.h" +#include "doNormalParams.h" + +template < typename EOT > +class doNormal : public doDistrib< EOT >, public doNormalParams< EOT > +{ +public: + doNormal(EOT mean, EOT variance) + : doNormalParams< EOT >(mean, variance) + {} +}; + +#endif // !_doNormal_h diff --git a/src/doNormalCenter.h b/src/doNormalCenter.h new file mode 100644 index 000000000..061130605 --- /dev/null +++ b/src/doNormalCenter.h @@ -0,0 +1,19 @@ +#ifndef _doNormalCenter_h +#define _doNormalCenter_h + +#include "doModifierMass.h" +#include "doNormal.h" + +template < typename EOT > +class doNormalCenter : public doModifierMass< doNormal< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + void operator() ( doNormal< EOT >& distrib, EOT& mass ) + { + distrib.mean() = mass; // vive les references!!! + } +}; + +#endif // !_doNormalCenter_h diff --git a/src/doNormalParams.h b/src/doNormalParams.h new file mode 100644 index 000000000..fbfc88edf --- /dev/null +++ b/src/doNormalParams.h @@ -0,0 +1,24 @@ +#ifndef _doNormalParams_h +#define _doNormalParams_h + +#include "doDistribParams.h" + +template < typename EOT > +class doNormalParams : public doDistribParams< EOT > +{ +public: + doNormalParams(EOT _mean, EOT _variance) + : doDistribParams< EOT >(2) + { + assert(_mean.size() > 0); + assert(_mean.size() == _variance.size()); + + mean() = _mean; + variance() = _variance; + } + + EOT& mean(){return this->param(0);} + EOT& variance(){return this->param(1);} +}; + +#endif // !_doNormalParams_h diff --git a/src/doSampler.h b/src/doSampler.h new file mode 100644 index 000000000..1bb66b44a --- /dev/null +++ b/src/doSampler.h @@ -0,0 +1,58 @@ +#ifndef _doSampler_h +#define _doSampler_h + +#include + +#include "doBounder.h" + +template < typename D > +class doSampler : public eoUF< D&, typename D::EOType > +{ +public: + typedef typename D::EOType EOType; + + doSampler(doBounder< EOType > & bounder) + : _bounder(bounder) + {} + + // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) + + virtual EOType sample( D& ) = 0; + + EOType operator()( D& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + + //------------------------------------------------------------- + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + // the sample method is implemented in the derivated class + //------------------------------------------------------------- + + EOType solution(sample(distrib)); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Now we are bounding the distribution thanks to min and max + // parameters. + //------------------------------------------------------------- + + _bounder(solution); + + //------------------------------------------------------------- + + + return solution; + } + +private: + //! Bounder functor + doBounder< EOType > & _bounder; +}; + +#endif // !_doSampler_h diff --git a/src/doSamplerNormal.h b/src/doSamplerNormal.h new file mode 100644 index 000000000..7ba4c2d5b --- /dev/null +++ b/src/doSamplerNormal.h @@ -0,0 +1,60 @@ +#ifndef _doSamplerNormal_h +#define _doSamplerNormal_h + +#include + +#include "doSampler.h" +#include "doNormal.h" +#include "doBounder.h" + +/** + * doSamplerNormal + * This class uses the Normal distribution parameters (bounds) to return + * a random position used for population sampling. + */ +template < typename EOT > +class doSamplerNormal : public doSampler< doNormal< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + doSamplerNormal( doBounder< EOT > & bounder ) + : doSampler< doNormal< EOT > >( bounder ) + {} + + EOT sample( doNormal< EOT >& distrib ) + { + unsigned int size = distrib.size(); + + assert(size > 0); + + //------------------------------------------------------------- + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + //------------------------------------------------------------- + + EOT solution; + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Sampling all dimensions + //------------------------------------------------------------- + + for (unsigned int i = 0; i < size; ++i) + { + solution.push_back( + rng.normal(distrib.mean()[i], + distrib.variance()[i]) + ); + } + + //------------------------------------------------------------- + + return solution; + } +}; + +#endif // !_doSamplerNormal_h diff --git a/src/doSamplerUniform.h b/src/doSamplerUniform.h new file mode 100644 index 000000000..f49b69245 --- /dev/null +++ b/src/doSamplerUniform.h @@ -0,0 +1,55 @@ +#ifndef _doSamplerUniform_h +#define _doSamplerUniform_h + +#include + +#include "doSampler.h" +#include "doUniform.h" + +/** + * doSamplerUniform + * This class uses the Uniform distribution parameters (bounds) to return + * a random position used for population sampling. + */ +template < typename EOT > +class doSamplerUniform : public doSampler< doUniform< EOT > > +{ +public: + EOT sample( doUniform< EOT >& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + //------------------------------------------------------------- + // Point we want to sample to get higher a population + // x = {x1, x2, ..., xn} + //------------------------------------------------------------- + + EOT solution; + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Sampling all dimensions + //------------------------------------------------------------- + + for (unsigned int i = 0; i < size; ++i) + { + double min = distrib.min()[i]; + double max = distrib.max()[i]; + double random = rng.uniform(min, max); + + assert(min <= random && random <= max); + + solution.push_back(random); + } + + //------------------------------------------------------------- + + + return solution; + } +}; + +#endif // !_doSamplerUniform_h diff --git a/src/doStats.h b/src/doStats.h new file mode 100644 index 000000000..b5ac32b25 --- /dev/null +++ b/src/doStats.h @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +class Mean { + + double n; + double mean; + + public: + Mean() : n(0), mean(0) {} + + void update(double v) { + n++; + double d = v - mean; + mean += 1/n * d; + } + + double get_mean() const { return mean; } +}; + +class Var { + double n; + double mean; + double sumvar; + + public: + Var() : n(0), mean(0), sumvar(0) {} + + void update(double v) { + n++; + double d = v - mean; + mean += 1/n * d; + sumvar += (n-1)/n * d * d; + } + + double get_mean() const { return mean; } + double get_var() const { return sumvar / (n-1); } + double get_std() const { return sqrt(get_var()); } +}; + +/** Single covariance between two variates */ +class Cov { + double n; + double meana; + double meanb; + double sumcov; + + public: + Cov() : n(0), meana(0), meanb(0), sumcov(0) {} + + void update(double a, double b) { + ++n; + double da = a - meana; + double db = b - meanb; + + meana += 1/n * da; + meanb += 1/n * db; + + sumcov += (n-1)/n * da * db; + } + + double get_meana() const { return meana; } + double get_meanb() const { return meanb; } + double get_cov() const { return sumcov / (n-1); } +}; + +class CovMatrix { + double n; + std::vector mean; + std::vector< std::vector > sumcov; + + public: + CovMatrix(unsigned dim) : n(0), mean(dim), sumcov(dim , std::vector(dim)) {} + + void update(const std::vector& v) { + assert(v.size() == mean.size()); + + n++; + + for (unsigned i = 0; i < v.size(); ++i) { + double d = v[i] - mean[i]; + mean[i] += 1/n * d; + + sumcov[i][i] += (n-1)/n * d * d; + + for (unsigned j = i; j < v.size(); ++j) { + double e = v[j] - mean[j]; // mean[j] is not updated yet + + double upd = (n-1)/n * d * e; + + sumcov[i][j] += upd; + sumcov[j][i] += upd; + + } + } + + } + + double get_mean(int i) const { return mean[i]; } + double get_var(int i ) const { return sumcov[i][i] / (n-1); } + double get_std(int i) const { return sqrt(get_var(i)); } + double get_cov(int i, int j) const { return sumcov[i][j] / (n-1); } + +}; diff --git a/src/doUniform.h b/src/doUniform.h new file mode 100644 index 000000000..6bfd90160 --- /dev/null +++ b/src/doUniform.h @@ -0,0 +1,16 @@ +#ifndef _doUniform_h +#define _doUniform_h + +#include "doDistrib.h" +#include "doVectorBounds.h" + +template < typename EOT > +class doUniform : public doDistrib< EOT >, public doVectorBounds< EOT > +{ +public: + doUniform(EOT min, EOT max) + : doVectorBounds< EOT >(min, max) + {} +}; + +#endif // !_doUniform_h diff --git a/src/doUniformCenter.h b/src/doUniformCenter.h new file mode 100644 index 000000000..74864d8b2 --- /dev/null +++ b/src/doUniformCenter.h @@ -0,0 +1,28 @@ +#ifndef _doUniformCenter_h +#define _doUniformCenter_h + +#include "doModifierMass.h" +#include "doUniform.h" + +template < typename EOT > +class doUniformCenter : public doModifierMass< doUniform< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + void operator() ( doUniform< EOT >& distrib, EOT& mass ) + { + for (unsigned int i = 0, n = mass.size(); i < n; ++i) + { + AtomType& min = distrib.min()[i]; + AtomType& max = distrib.max()[i]; + + AtomType range = (max - min) / 2; + + min = mass[i] - range; + max = mass[i] + range; + } + } +}; + +#endif // !_doUniformCenter_h diff --git a/src/doVectorBounds.h b/src/doVectorBounds.h new file mode 100644 index 000000000..65655c3c1 --- /dev/null +++ b/src/doVectorBounds.h @@ -0,0 +1,24 @@ +#ifndef _doVectorBounds_h +#define _doVectorBounds_h + +#include "doDistribParams.h" + +template < typename EOT > +class doVectorBounds : public doDistribParams< EOT > +{ +public: + doVectorBounds(EOT _min, EOT _max) + : doDistribParams< EOT >(2) + { + assert(_min.size() > 0); + assert(_min.size() == _max.size()); + + min() = _min; + max() = _max; + } + + EOT& min(){return this->param(0);} + EOT& max(){return this->param(1);} +}; + +#endif // !_doVectorBounds_h From 8ba39921faeb2ae75817a427c7ef1256775bbf06 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 5 Jul 2010 19:06:34 +0200 Subject: [PATCH 1455/2134] + cma_sa application --- application/cma_sa/CMakeLists.txt | 35 +++++ application/cma_sa/Rosenbrock.h | 42 ++++++ application/cma_sa/Sphere.h | 42 ++++++ application/cma_sa/cma_sa.param | 7 + application/cma_sa/main.cpp | 233 ++++++++++++++++++++++++++++++ application/cma_sa/plot.py | 232 +++++++++++++++++++++++++++++ 6 files changed, 591 insertions(+) create mode 100644 application/cma_sa/CMakeLists.txt create mode 100644 application/cma_sa/Rosenbrock.h create mode 100644 application/cma_sa/Sphere.h create mode 100644 application/cma_sa/cma_sa.param create mode 100644 application/cma_sa/main.cpp create mode 100755 application/cma_sa/plot.py diff --git a/application/cma_sa/CMakeLists.txt b/application/cma_sa/CMakeLists.txt new file mode 100644 index 000000000..a913882bf --- /dev/null +++ b/application/cma_sa/CMakeLists.txt @@ -0,0 +1,35 @@ +FIND_PACKAGE(Boost 1.33.0 REQUIRED) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +SET(RESOURCES + cma_sa.param + plot.py + ) + +FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${CMAKE_CURRENT_BINARY_DIR}/${file} + ) +ENDFOREACH(file) + +ADD_EXECUTABLE(cma_sa main.cpp) + +TARGET_LINK_LIBRARIES(cma_sa + ${Boost_LIBRARIES} + BOPO + eoutils + pthread + moeo + eo + peo + rmc_mpi + eometah + nklandscapes + BOPO + #${MPICH2_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${MPI_LIBRARIES} + ) diff --git a/application/cma_sa/Rosenbrock.h b/application/cma_sa/Rosenbrock.h new file mode 100644 index 000000000..c21a8ccea --- /dev/null +++ b/application/cma_sa/Rosenbrock.h @@ -0,0 +1,42 @@ +#ifndef _Rosenbrock_h +#define _Rosenbrock_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template < typename EOT > +class Rosenbrock : public eoEvalFunc< EOT > +{ +public: + typedef typename EOT::AtomType AtomType; + + virtual void operator()( EOT& p ) + { + if (!p.invalid()) + return; + + p.fitness( _evaluate( p ) ); + } + +private: + AtomType _evaluate( EOT& p ) + { + AtomType r = 0.0; + + for (unsigned int i = 0; i < p.size() - 1; ++i) + { + r += p[i] * p[i]; + } + + return r; + } +}; + +#endif // !_Rosenbrock_h diff --git a/application/cma_sa/Sphere.h b/application/cma_sa/Sphere.h new file mode 100644 index 000000000..1e73b3eaf --- /dev/null +++ b/application/cma_sa/Sphere.h @@ -0,0 +1,42 @@ +#ifndef _Sphere_h +#define _Sphere_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template < typename EOT > +class Sphere : public eoEvalFunc< EOT > +{ +public: + typedef typename EOT::AtomType AtomType; + + virtual void operator()( EOT& p ) + { + if (!p.invalid()) + return; + + p.fitness( _evaluate( p ) ); + } + +private: + AtomType _evaluate( EOT& p ) + { + AtomType r = 0.0; + + for (unsigned int i = 0; i < p.size() - 1; ++i) + { + r += p[i] * p[i]; + } + + return r; + } +}; + +#endif // !_Sphere_h diff --git a/application/cma_sa/cma_sa.param b/application/cma_sa/cma_sa.param new file mode 100644 index 000000000..9aceb2306 --- /dev/null +++ b/application/cma_sa/cma_sa.param @@ -0,0 +1,7 @@ +--rho=0 # -p : +// #include + +#ifndef HAVE_GNUPLOT +// FIXME: temporary define to force use of gnuplot without compiling +// again EO. +# define HAVE_GNUPLOT +#endif + +#include +#include + +#include +#include + +#include +#include +#include +#include + +//#include "BopoRosenbrock.h" +#include "Rosenbrock.h" +#include "Sphere.h" + +#include + +typedef eoReal EOT; +//typedef doUniform< EOT > Distrib; +//typedef doNormal< EOT > Distrib; + +int main(int ac, char** av) +{ + eoParserLogger parser(ac, av); + + // Letters used by the following declarations : + // a d i p t + + std::string section("Algorithm parameters"); + + // FIXME: a verifier la valeur par defaut + double initial_temperature = parser.createParam((double)10e5, "temperature", "Initial temperature", 'i', section).value(); // i + + eoState state; + + //----------------------------------------------------------------------------- + // Instantiate all need parameters for CMASA algorithm + //----------------------------------------------------------------------------- + + eoSelect< EOT >* selector = new eoDetSelect< EOT >(0.1); + state.storeFunctor(selector); + + //doEstimator< doUniform< EOT > >* estimator = new doEstimatorUniform< EOT >(); + doEstimator< doNormal< EOT > >* estimator = new doEstimatorNormal< EOT >(); + state.storeFunctor(estimator); + + eoSelectOne< EOT >* selectone = new eoDetTournamentSelect< EOT >(); + state.storeFunctor(selectone); + + //doModifierMass< doUniform< EOT > >* modifier = new doUniformCenter< EOT >(); + doModifierMass< doNormal< EOT > >* modifier = new doNormalCenter< EOT >(); + state.storeFunctor(modifier); + + // EOT min(2, 42); + // EOT max(2, 32); + + //eoEvalFunc< EOT >* plainEval = new BopoRosenbrock< EOT, double, const EOT& >(); + eoEvalFunc< EOT >* plainEval = new Sphere< EOT >(); + state.storeFunctor(plainEval); + + eoEvalFuncCounter< EOT > eval(*plainEval); + + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + //eoRndGenerator< double >* gen = new eoNormalGenerator< double >(0, 1); + state.storeFunctor(gen); + + + unsigned int dimension_size = parser.createParam((unsigned int)10, "dimension-size", "Dimension size", 'd', section).value(); // d + + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( dimension_size, *gen ); + state.storeFunctor(init); + + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (1) Population init and sampler + //----------------------------------------------------------------------------- + + // Generation of population from do_make_pop (creates parameter, manages persistance and so on...) + // ... and creates the parameter letters: L P r S + + // this first sampler creates a uniform distribution independently of our distribution (it doesnot use doUniform). + + eoPop< EOT >& pop = do_make_pop(parser, state, *init); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (2) First evaluation before starting the research algorithm + //----------------------------------------------------------------------------- + + apply(eval, pop); + + //----------------------------------------------------------------------------- + + + //doBounder< EOT >* bounder = new doBounderNo< EOT >(); + doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + EOT(pop[0].size(), 5), + *gen); + state.storeFunctor(bounder); + + //doSampler< doUniform< EOT > >* sampler = new doSamplerUniform< EOT >(); + doSampler< doNormal< EOT > >* sampler = new doSamplerNormal< EOT >( *bounder ); + state.storeFunctor(sampler); + + + unsigned int rho = parser.createParam((unsigned int)0, "rho", "Rho: metropolis sample size", 'p', section).value(); // p + + moGenSolContinue< EOT >* continuator = new moGenSolContinue< EOT >(rho); + state.storeFunctor(continuator); + + double threshold = parser.createParam((double)0.1, "threshold", "Threshold: temperature threshold stopping criteria", 't', section).value(); // t + double alpha = parser.createParam((double)0.1, "alpha", "Alpha: temperature dicrease rate", 'a', section).value(); // a + + moCoolingSchedule* cooling_schedule = new moGeometricCoolingSchedule(threshold, alpha); + state.storeFunctor(cooling_schedule); + + // stopping criteria + // ... and creates the parameter letters: C E g G s T + + eoContinue< EOT >& monitoringContinue = do_make_continue(parser, state, eval); + + // output + + eoCheckPoint< EOT >& checkpoint = do_make_checkpoint(parser, state, eval, monitoringContinue); + + // appends some missing code to checkpoint + + // eoValueParam& plotPopParam = parser.createParam(false, "plotPop", "Plot sorted pop. every gen.", 0, "Graphical Output"); + + // if (plotPopParam.value()) // we do want plot dump + // { + // eoScalarFitnessStat* fitStat = new eoScalarFitnessStat; + // state.storeFunctor(fitStat); + + // checkpoint.add(*fitStat); + + // eoFileSnapshot* snapshot = new eoFileSnapshot("ResPop"); + // state.storeFunctor(snapshot); + + // snapshot->add(*fitStat); + + // checkpoint.add(*snapshot); + // } + + // -------------------------- + + // eoPopStat< EOT >* popStat = new eoPopStat; + // state.storeFunctor(popStat); + + // checkpoint.add(*popStat); + + // eoMonitor* fileSnapshot = new doFileSnapshot< std::vector< std::string > >("ResPop"); + // state.storeFunctor(fileSnapshot); + + // fileSnapshot->add(*popStat); + // checkpoint.add(*fileSnapshot); + + + //----------------------------------------------------------------------------- + // eoEPRemplacement causes the using of the current and previous + // sample for sampling. + //----------------------------------------------------------------------------- + + eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); + + // Below, use eoGenerationalReplacement to sample only on the current sample + + //eoReplacement< EOT >* replacor = new eoGenerationalReplacement< EOT >(); // FIXME: to define the size + + state.storeFunctor(replacor); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // CMASA algorithm configuration + //----------------------------------------------------------------------------- + + //doAlgo< doUniform< EOT > >* algo = new doCMASA< doUniform< EOT > > + doAlgo< doNormal< EOT > >* algo = new doCMASA< doNormal< EOT > > + (*selector, *estimator, *selectone, *modifier, *sampler, + checkpoint, eval, *continuator, *cooling_schedule, + initial_temperature, *replacor); + + //----------------------------------------------------------------------------- + + + // state.storeFunctor(algo); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + // Help + Verbose routines + + make_verbose(parser); + make_help(parser); + + + //----------------------------------------------------------------------------- + // Beginning of the algorithm call + //----------------------------------------------------------------------------- + + try + { + do_run(*algo, pop); + } + catch (std::exception& e) + { + eo::log << eo::errors << "exception: " << e.what() << std::endl; + exit(EXIT_FAILURE); + } + + //----------------------------------------------------------------------------- + + return 0; +} diff --git a/application/cma_sa/plot.py b/application/cma_sa/plot.py new file mode 100755 index 000000000..4fc5924c8 --- /dev/null +++ b/application/cma_sa/plot.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python + +"""plot.py -- Plot CMA-SA results file""" + +import os, time, math, tempfile +import numpy + +try: + import Gnuplot, Gnuplot.PlotItems, Gnuplot.funcutils +except ImportError: + # kludge in case Gnuplot hasn't been installed as a module yet: + import __init__ + Gnuplot = __init__ + import PlotItems + Gnuplot.PlotItems = PlotItems + import funcutils + Gnuplot.funcutils = funcutils + +def wait(str=None, prompt='Press return to show results...\n'): + if str is not None: + print str + raw_input(prompt) + +def draw2DRect(min=(0,0), max=(1,1), color='black', state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + xmin, ymin = min + xmax, ymax = max + + cmd = 'set arrow from %s,%s to %s,%s nohead lc rgb "%s"' + + g(cmd % (xmin, ymin, xmin, ymax, color)) + g(cmd % (xmin, ymax, xmax, ymax, color)) + g(cmd % (xmax, ymax, xmax, ymin, color)) + g(cmd % (xmax, ymin, xmin, ymin, color)) + + return g + +def draw3DRect(min=(0,0,0), max=(1,1,1), state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + # TODO + + return g + +def getSortedFiles(path): + assert path != None + + filelist = os.listdir(path) + filelist.sort() + + return filelist + +def plotXPointYFitness(path, fields='3:1', state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + g.title('Fitness observation') + g.xlabel('Coordinates') + g.ylabel('Fitness (Quality)') + + files=[] + for filename in getSortedFiles(path): + files.append(Gnuplot.File(path + '/' + filename, using=fields, + with_='points', + title='distribution \'' + filename + '\'')) + + g.plot(*files) + + return g + +def plotXYPointZFitness(path, fields='4:3:1', state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + g.title('Fitness observation in 3-D') + g.xlabel('x-axes') + g.ylabel('y-axes') + g.zlabel('Fitness (Quality)') + + files=[] + for filename in getSortedFiles(path): + files.append(Gnuplot.File(path + '/' + filename, using=fields, + with_='points', + title='distribution \'' + filename + '\'')) + + g.splot(*files) + + return g + +def plotXYPoint(path, fields='3:4', state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + g.title('Points observation in 2-D') + g.xlabel('x-axes') + g.ylabel('y-axes') + + files=[] + for filename in getSortedFiles(path): + files.append(Gnuplot.File(path + '/' + filename, using=fields, + with_='points', + title='distribution \'' + filename + '\'')) + + g.plot(*files) + + return g + +def plotXYZPoint(path, fields='3:4:5', state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + g.title('Points observation in 3-D') + g.xlabel('x-axes') + g.ylabel('y-axes') + g.zlabel('z-axes') + + files=[] + for filename in getSortedFiles(path): + files.append(Gnuplot.File(path + '/' + filename, using=fields, + with_='points', + title='distribution \'' + filename + '\'')) + + g.splot(*files) + + return g + +def plotParams(path, field='1', state=None, g=None): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + g.title('Hyper-volume comparaison through all dimensions') + g.xlabel('Iterations') + g.ylabel('Hyper-volume') + + g.plot(Gnuplot.File(path, with_='lines', using=field, + title='multivariate distribution narrowing')) + + return g + +def plot2DRectFromFiles(path, state=None, g=None, plot=True): + if g == None: g = Gnuplot.Gnuplot() + if state != None: state.append(g) + + g.title('Rectangle drawing observation') + g.xlabel('x-axes') + g.ylabel('y-axes') + + x1,x2,y1,y2 = 0,0,0,0 + + colors = ['red', 'orange', 'blue', 'green', 'gold', 'yellow', 'gray'] + #colors = open('rgb.txt', 'r').readlines() + colors_size = len(colors) + i = 0 # for color + + for filename in getSortedFiles(path): + line = open(path + '/' + filename, 'r').readline() + + fields = line.split(' ') + + if not fields[0] == '2': + print 'plot2DRectFromFiles: higher than 2 dimensions not possible to draw' + return + + xmin,ymin,xmax,ymax = fields[1:5] + #print xmin,ymin,xmax,ymax + + cur_color = colors[i % colors_size] + + draw2DRect((xmin,ymin), (xmax,ymax), cur_color, g=g) + + g('set obj rect from %s,%s to %s,%s back lw 1.0 fc rgb "%s" fillstyle solid 1.00 border -1' + % (xmin,ymin,xmax,ymax,cur_color) + ) + + if plot: + if float(xmin) < x1: x1 = float(xmin) + if float(ymin) < y1: y1 = float(ymin) + if float(xmax) > x2: x2 = float(xmax) + if float(ymax) > y2: y2 = float(ymax) + + #print x1,y1,x2,y2 + + i += 1 + + #print x1,y1,x2,y2 + + if plot: + g.plot('[%s:%s][%s:%s] -9999 notitle' % (x1, x2, y1, y2)) + + return g + +def main(n): + gstate = [] + + if n >= 1: + plotXPointYFitness('./ResPop', state=gstate) + + if n >= 2: + plotXPointYFitness('./ResPop', '4:1', state=gstate) + + if n >= 2: + plotXYPointZFitness('./ResPop', state=gstate) + + if n >= 3: + plotXYZPoint('./ResPop', state=gstate) + + if n >= 1: + plotParams('./ResParams.txt', state=gstate) + + if n >= 2: + plot2DRectFromFiles('./ResBounds', state=gstate) + plotXYPoint('./ResPop', state=gstate) + + g = plot2DRectFromFiles('./ResBounds', state=gstate, plot=False) + plotXYPoint('./ResPop', g=g) + + wait(prompt='Press return to end the plot.\n') + + pass + +# when executed, just run main(): +if __name__ == '__main__': + from sys import argv, exit + + if len(argv) < 2: + print 'Usage: plot [dimension]' + exit() + + main(int(argv[1])) From 2b9402d3f5aaa813aa35f90fa803b7b4e9b0a31c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 5 Jul 2010 19:42:34 +0200 Subject: [PATCH 1456/2134] + packaging + cmake files --- CMakeLists.txt | 77 ++++++++++++++++++++++++++++++++++++++++++++++ Packaging.cmake | 74 ++++++++++++++++++++++++++++++++++++++++++++ src/CMakeLists.txt | 65 +++++++++++++++++++++----------------- 3 files changed, 188 insertions(+), 28 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 Packaging.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..ce4a1d859 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,77 @@ +###################################################################################### +### 1) Set the application properties +###################################################################################### + +# Checks cmake version compatibility +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +PROJECT(DO) + +SET(PROJECT_VERSION_MAJOR 1) +SET(PROJECT_VERSION_MINOR 0) +SET(PROJECT_VERSION_PATCH 0) +SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") + +###################################################################################### + + +###################################################################################### +### 2) Include the install configuration file where are defined the main variables +###################################################################################### + +INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/install.cmake) + +###################################################################################### + + +##################################################################################### +### 3) Include required modules & utilities +##################################################################################### + +INCLUDE(CMakeBackwardCompatibilityCXX) +#INCLUDE(FindDoxygen) +INCLUDE(CheckLibraryExists) +#INCLUDE(Dart OPTIONAL) + +FIND_PACKAGE(Doxygen) +FIND_PACKAGE(MPI REQUIRED) +FIND_PACKAGE(Gnuplot REQUIRED) + +# Set a special flag if the environment is windows (should do the same in a config.g file) +IF (WIN32) + ADD_DEFINITIONS(-D_WINDOWS=1) +ENDIF (WIN32) + +###################################################################################### + + +##################################################################################### +### 4) Manage the build type +##################################################################################### + +INCLUDE(${CMAKE_SOURCE_DIR}/BuildConfig.cmake) + +###################################################################################### + + +###################################################################################### +### 5) Now where we go ??? +###################################################################################### + +# warning: you have to compile libraries before bopo sources because of dependencies. +ADD_SUBDIRECTORY(lib) +ADD_SUBDIRECTORY(doc) +ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(test) +ADD_SUBDIRECTORY(application) + +###################################################################################### + + +###################################################################################### +### 6) Include packaging +###################################################################################### + +INCLUDE(Packaging.cmake) + +###################################################################################### diff --git a/Packaging.cmake b/Packaging.cmake new file mode 100644 index 000000000..d4d8bbe34 --- /dev/null +++ b/Packaging.cmake @@ -0,0 +1,74 @@ +###################################################################################### +### 1) Check dependencies +###################################################################################### + +IF (NOT DEFINED PROJECT_NAME OR + NOT DEFINED PROJECT_VERSION_MAJOR OR + NOT DEFINED PROJECT_VERSION_MINOR OR + NOT DEFINED PROJECT_VERSION_PATCH OR + NOT DEFINED PROJECT_VERSION) + MESSAGE(FATAL_ERROR "Be sure you have defined PROJECT_NAME and PROJECT_VERSION*.") +ENDIF() + +###################################################################################### + + +###################################################################################### +### 2) Set up components +###################################################################################### + +SET(CPACK_COMPONENTS_ALL libraries) +SET(CPACK_ALL_INSTALL_TYPES Full) + +SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Distribution Objects") +SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Distribution Objects library") +SET(CPACK_COMPONENT_LIBRARIES_GROUP "Devel") +SET(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Full) + +###################################################################################### + + +###################################################################################### +### 3) Set up general information about packaging +###################################################################################### + +# For more details: http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack + +#cpack package information +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") +SET(CPACK_PACKAGE_DESCRIPTION "Distribution Objects") +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Distribution Objects") +SET(CPACK_PACKAGE_VENDOR "Thales") +SET(CPACK_PACKAGE_CONTACT "caner.candan@thalesgroup.com") +SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) +SET(CPACK_STRIP_FILES ${PROJECT_NAME}) +SET(CPACK_SOURCE_STRIP_FILES "bin/${PROJECT_NAME}") +SET(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}") +SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") +SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") +SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") + +###################################################################################### + + +###################################################################################### +### 4) Set up debian packaging information +###################################################################################### + +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, libxml2, libmpich2-1.2") + +SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") +SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") + +###################################################################################### + + +###################################################################################### +### 5) And finally, include cpack, this is the last thing to do. +###################################################################################### + +INCLUDE(CPack) + +###################################################################################### diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a913882bf..7ea925128 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,35 +1,44 @@ +###################################################################################### +### 1) Include useful packages +###################################################################################### + FIND_PACKAGE(Boost 1.33.0 REQUIRED) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +###################################################################################### -SET(RESOURCES - cma_sa.param - plot.py + +###################################################################################### +### 2) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES( + ${PARADISEO_EO_SRC_DIR}/src + ${PARADISEO_MO_SRC_DIR}/src + ${PARADISEO_MOEO_SRC_DIR}/src + ${PARADISEO_PEO_SRC_DIR}/src + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/lib/eometah + ${CMAKE_SOURCE_DIR}/lib/nk-landscapes + ${Boost_INCLUDE_DIRS} ) -FOREACH(file ${RESOURCES}) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${CMAKE_CURRENT_BINARY_DIR}/${file} - ) -ENDFOREACH(file) +###################################################################################### -ADD_EXECUTABLE(cma_sa main.cpp) -TARGET_LINK_LIBRARIES(cma_sa - ${Boost_LIBRARIES} - BOPO - eoutils - pthread - moeo - eo - peo - rmc_mpi - eometah - nklandscapes - BOPO - #${MPICH2_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${MPI_LIBRARIES} - ) +###################################################################################### +### 3) Define your target(s) +###################################################################################### + +SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) + +FILE(GLOB SOURCES *.cpp) + +ADD_LIBRARY(${PROJECT_NAME} STATIC ${SOURCES}) + +# INSTALL( +# TARGETS ${LIBRARY_OUTPUT_PATH}/lib${PROJECT_NAME}.a +# DESTINATION lib +# COMPONENT libraries +# ) + +###################################################################################### From 27552a573e13d2a3c34737e512c1498a99c190d7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 5 Jul 2010 20:31:30 +0200 Subject: [PATCH 1457/2134] ... --- .gitignore | 23 +++ CMakeLists.txt | 112 ++++++++++----- COPYING | 1 + README | 57 ++++++++ application/CMakeLists.txt | 7 + application/cma_sa/CMakeLists.txt | 22 +-- application/cma_sa/main.cpp | 16 +-- doc/CMakeLists.txt | 26 ++++ doc/doxyfile.cmake | 229 ++++++++++++++++++++++++++++++ doc/index.h | 0 src/CMakeLists.txt | 16 +-- 11 files changed, 426 insertions(+), 83 deletions(-) create mode 100644 .gitignore create mode 100644 COPYING create mode 100644 README create mode 100644 application/CMakeLists.txt create mode 100644 doc/CMakeLists.txt create mode 100644 doc/doxyfile.cmake create mode 100644 doc/index.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..a6f796491 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# ignore html files +*.html + +# ignore all textual files +*.txt + +# ignore object and archive files +*.[oa] + +# ignore auto-saved files +*~ +\#*\# + +# excepted these manually configured files +!CMakeLists.txt +!README.txt +!application/ +!build/ +!doc/ +!lib/ +!src/ +!test/ +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt index ce4a1d859..9bc3de9b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,60 +16,96 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT ###################################################################################### -### 2) Include the install configuration file where are defined the main variables +### 2) Prepare some useful variables ###################################################################################### -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/install.cmake) - -###################################################################################### - - -##################################################################################### -### 3) Include required modules & utilities -##################################################################################### - -INCLUDE(CMakeBackwardCompatibilityCXX) -#INCLUDE(FindDoxygen) -INCLUDE(CheckLibraryExists) -#INCLUDE(Dart OPTIONAL) - -FIND_PACKAGE(Doxygen) -FIND_PACKAGE(MPI REQUIRED) -FIND_PACKAGE(Gnuplot REQUIRED) - -# Set a special flag if the environment is windows (should do the same in a config.g file) -IF (WIN32) - ADD_DEFINITIONS(-D_WINDOWS=1) -ENDIF (WIN32) - -###################################################################################### - - -##################################################################################### -### 4) Manage the build type -##################################################################################### - -INCLUDE(${CMAKE_SOURCE_DIR}/BuildConfig.cmake) +SET(DO_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +SET(DO_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}") ###################################################################################### ###################################################################################### -### 5) Now where we go ??? +### 3) Include useful features +###################################################################################### + +INCLUDE(FindDoxygen) + +INCLUDE(FindPkgConfig) + +PKG_CHECK_MODULES(EO eo REQUIRED) + +INCLUDE_DIRECTORIES(${EO_INCLUDE_DIR}) +LINK_DIRECTORIES(${EO_LIBRARY_DIRS}) + +###################################################################################### + + +###################################################################################### +### 4) Include header files path +###################################################################################### + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR}/src + ) + +###################################################################################### + + +###################################################################################### +### 5) Set compiler definitions +###################################################################################### + +IF(UNIX) + # enable warnings + ADD_DEFINITIONS( -Wall -W -Wextra ) + # ADD_DEFINITIONS( -Weffc++) + # ADD_DEFINITIONS( -g3 ) +ENDIF() + +###################################################################################### + + +###################################################################################### +### 6) Prepare some variables for CMAKE usage +###################################################################################### + +SET(SAMPLE_SRCS) + +###################################################################################### + + +###################################################################################### +### 7) Now where we go ? ###################################################################################### -# warning: you have to compile libraries before bopo sources because of dependencies. -ADD_SUBDIRECTORY(lib) -ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(application) +ADD_SUBDIRECTORY(test) +ADD_SUBDIRECTORY(doc) ###################################################################################### ###################################################################################### -### 6) Include packaging +### 8) Create executable, link libraries and prepare target +###################################################################################### + +SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) + +LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}) + +ADD_LIBRARY(${PROJECT_NAME} STATIC ${SAMPLE_SRCS}) +#ADD_LIBRARY(${PROJECT_NAME} SHARED ${SAMPLE_SRCS}) + +# INSTALL( +# TARGETS ${LIBRARY_OUTPUT_PATH}/lib${PROJECT_NAME}.a +# DESTINATION lib +# COMPONENT libraries +# ) + +###################################################################################### +### 9) Include packaging ###################################################################################### INCLUDE(Packaging.cmake) diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..90cbe47b8 --- /dev/null +++ b/COPYING @@ -0,0 +1 @@ +Private license diff --git a/README b/README new file mode 100644 index 000000000..64629f58e --- /dev/null +++ b/README @@ -0,0 +1,57 @@ +This package contains the source code for BOPO problems. + +# Step 1 - Configuration +------------------------ +Rename the "install.cmake-dist" file as "install.cmake" and edit it, inserting the FULL PATH +to your ParadisEO distribution. +On Windows write your path with double antislash (ex: C:\\Users\\...) + + +# Step 2 - Build process +------------------------ +ParadisEO is assumed to be compiled. To download ParadisEO, please visit http://paradiseo.gforge.inria.fr/. +Go to the BOPO/build/ directory and lunch cmake: +(Unix) > cmake .. +(Windows) > cmake .. -G"Visual Studio 9 2008" + +Note for windows users: if you don't use VisualStudio 9, enter the name of your generator instead of "VisualStudio 9 2008". + + +# Step 3 - Compilation +---------------------- +In the bopo/build/ directory: +(Unix) > make +(Windows) Open the VisualStudio solution and compile it, compile also the target install. +You can refer to this tutorial if you don't know how to compile a solution: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial + + +# Step 4 - Execution +--------------------- +A toy example is given to test the components. You can run these tests as following. +To define problem-related components for your own problem, please refer to the tutorials available on the website : http://paradiseo.gforge.inria.fr/. +In the bopo/build/ directory: +(Unix) > ctest +Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial + +In the directory "application", there are several directory such as p_eoco which instantiate NSGAII on BOPO problems. + +(Unix) After compilation you can run the script "bopo/run.sh" and see results in "NSGAII.out". Parameters can be modified in the script. + +(Windows) Add argument "NSGAII.param" and execute the corresponding algorithms. +Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial + + +# Documentation +--------------- +The API-documentation is available in doc/html/index.html + + +# Things to keep in mind when using BOPO +---------------------------------------- +* By default, the EO random generator's seed is initialized by the number of seconds since the epoch (with time(0)). It is available in the status file dumped at each execution. Please, keep in mind that if you start two run at the same second without modifying the seed, you will get exactly the same results. + +* Execution times are measured with the boost:timer, that measure wallclock time. Additionaly, it could not measure times larger than approximatively 596.5 hours (or even less). See http://www.boost.org/doc/libs/1_33_1/libs/timer/timer.htm + +* The q-quantile computation use averaging at discontinuities (in R, it correspond to the R-2 method, in SAS, SAS-5). For more explanations, see http://en.wikipedia.org/wiki/Quantile#Estimating_the_quantiles_of_a_population and http://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html + +* You can send a SIGUSR1 to a process to get some information (written down in the log file) on the current state of the search. diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt new file mode 100644 index 000000000..07bcc2d04 --- /dev/null +++ b/application/CMakeLists.txt @@ -0,0 +1,7 @@ +###################################################################################### +### 1) Where do we go now ?!? +###################################################################################### + +ADD_SUBDIRECTORY(cma_sa) + +###################################################################################### diff --git a/application/cma_sa/CMakeLists.txt b/application/cma_sa/CMakeLists.txt index a913882bf..10305c283 100644 --- a/application/cma_sa/CMakeLists.txt +++ b/application/cma_sa/CMakeLists.txt @@ -1,5 +1,3 @@ -FIND_PACKAGE(Boost 1.33.0 REQUIRED) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(RESOURCES @@ -15,21 +13,7 @@ FOREACH(file ${RESOURCES}) ) ENDFOREACH(file) -ADD_EXECUTABLE(cma_sa main.cpp) +FILE(GLOB SOURCES *.cpp) -TARGET_LINK_LIBRARIES(cma_sa - ${Boost_LIBRARIES} - BOPO - eoutils - pthread - moeo - eo - peo - rmc_mpi - eometah - nklandscapes - BOPO - #${MPICH2_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${MPI_LIBRARIES} - ) +ADD_EXECUTABLE(cma_sa ${SOURCES}) +TARGET_LINK_LIBRARIES(cma_sa DO ${EO_LIBRARIES}) diff --git a/application/cma_sa/main.cpp b/application/cma_sa/main.cpp index e771e6498..e15d37f39 100644 --- a/application/cma_sa/main.cpp +++ b/application/cma_sa/main.cpp @@ -1,12 +1,3 @@ -// #include -// #include - -#ifndef HAVE_GNUPLOT -// FIXME: temporary define to force use of gnuplot without compiling -// again EO. -# define HAVE_GNUPLOT -#endif - #include #include @@ -18,15 +9,12 @@ #include #include -//#include "BopoRosenbrock.h" +#include + #include "Rosenbrock.h" #include "Sphere.h" -#include - typedef eoReal EOT; -//typedef doUniform< EOT > Distrib; -//typedef doNormal< EOT > Distrib; int main(int ac, char** av) { diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 000000000..c44ffc477 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,26 @@ +####################################################################################### +### Doc generation using Doxygen +####################################################################################### + +IF (DOXYGEN_FOUND) + SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "documentation directory") + SET(DOC_CONFIG_FILE "doxyfile" CACHE PATH "documentation configuration file") + + # define the doc target + IF (DOXYGEN_EXECUTABLE) + ADD_CUSTOM_TARGET(doc + COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_CONFIG_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + ENDIF (DOXYGEN_EXECUTABLE) + + # configure doxyfile file + CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/${DOC_CONFIG_FILE}.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${DOC_CONFIG_FILE}" + ) +ELSE (DOXYGEN_FOUND) + MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") +ENDIF (DOXYGEN_FOUND) + +####################################################################################### diff --git a/doc/doxyfile.cmake b/doc/doxyfile.cmake new file mode 100644 index 000000000..e19b4f280 --- /dev/null +++ b/doc/doxyfile.cmake @@ -0,0 +1,229 @@ +# Doxyfile 1.5.1 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = @PACKAGE_NAME@ +PROJECT_NUMBER = @PACKAGE_VERSION@ +OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +#DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = YES +WARNINGS = NO +WARN_IF_UNDOCUMENTED = NO +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = @CMAKE_SOURCE_DIR@ +FILE_PATTERNS = *.cpp \ + *.h \ + NEWS README +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = moeo +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = YES diff --git a/doc/index.h b/doc/index.h new file mode 100644 index 000000000..e69de29bb diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ea925128..a9beb5c7c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,7 @@ ### 1) Include useful packages ###################################################################################### -FIND_PACKAGE(Boost 1.33.0 REQUIRED) +#FIND_PACKAGE(Boost 1.33.0 REQUIRED) ###################################################################################### @@ -11,16 +11,7 @@ FIND_PACKAGE(Boost 1.33.0 REQUIRED) ### 2) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES( - ${PARADISEO_EO_SRC_DIR}/src - ${PARADISEO_MO_SRC_DIR}/src - ${PARADISEO_MOEO_SRC_DIR}/src - ${PARADISEO_PEO_SRC_DIR}/src - ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/lib/eometah - ${CMAKE_SOURCE_DIR}/lib/nk-landscapes - ${Boost_INCLUDE_DIRS} - ) +#INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) ###################################################################################### @@ -32,8 +23,9 @@ INCLUDE_DIRECTORIES( SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) FILE(GLOB SOURCES *.cpp) +SET(SAMPLE_SRCS ${SOURCES} PARENT_SCOPE) -ADD_LIBRARY(${PROJECT_NAME} STATIC ${SOURCES}) +ADD_LIBRARY(${PROJECT_NAME} STATIC ${SAMPLE_SRCS}) # INSTALL( # TARGETS ${LIBRARY_OUTPUT_PATH}/lib${PROJECT_NAME}.a From 45a9cb88e0968c316051f75ab483bbcff0a5c111 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 5 Jul 2010 20:39:41 +0200 Subject: [PATCH 1458/2134] + test --- application/cma_sa/CMakeLists.txt | 2 +- test/CMakeLists.txt | 35 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 test/CMakeLists.txt diff --git a/application/cma_sa/CMakeLists.txt b/application/cma_sa/CMakeLists.txt index 10305c283..5336cc4c5 100644 --- a/application/cma_sa/CMakeLists.txt +++ b/application/cma_sa/CMakeLists.txt @@ -16,4 +16,4 @@ ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) ADD_EXECUTABLE(cma_sa ${SOURCES}) -TARGET_LINK_LIBRARIES(cma_sa DO ${EO_LIBRARIES}) +TARGET_LINK_LIBRARIES(cma_sa ${PROJECT_NAME} ${EO_LIBRARIES}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 000000000..674dac153 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################### +## +## CMakeLists file for unit test +## +############################################################################### + + +###################################################################################### +### 1) Include the sources +###################################################################################### + +###################################################################################### + + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +###################################################################################### + + +###################################################################################### +### 3) Define your targets and link the librairies +###################################################################################### + +SET(SOURCES + ) + +FOREACH(current ${SOURCES}) + ADD_EXECUTABLE(${current} ${current}.cpp) + TARGET_LINK_LIBRARIES(${current} ${PROJECT_NAME} ${EO_LIBRARIES}) + ADD_CURRENT(${current} ${current}) +ENDFOREACH() + +###################################################################################### From 7ebb8f405bf852f00520f83d81996abaaf6ce16e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 6 Jul 2010 01:27:14 +0200 Subject: [PATCH 1459/2134] config cmake --- CMakeLists.txt | 19 +++++++++---------- application/cma_sa/CMakeLists.txt | 2 +- src/CMakeLists.txt | 31 ++----------------------------- src/doStats.h | 5 +++++ src/test.cpp | 4 ++++ 5 files changed, 21 insertions(+), 40 deletions(-) create mode 100644 src/test.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bc3de9b9..0ce2d1ab9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,13 +30,15 @@ SET(DO_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}") ###################################################################################### INCLUDE(FindDoxygen) - INCLUDE(FindPkgConfig) PKG_CHECK_MODULES(EO eo REQUIRED) +PKG_CHECK_MODULES(MO mo REQUIRED) -INCLUDE_DIRECTORIES(${EO_INCLUDE_DIR}) -LINK_DIRECTORIES(${EO_LIBRARY_DIRS}) +INCLUDE_DIRECTORIES( + ${EO_INCLUDE_DIRS} + ${MO_INCLUDE_DIRS} + ) ###################################################################################### @@ -95,14 +97,11 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}) -ADD_LIBRARY(${PROJECT_NAME} STATIC ${SAMPLE_SRCS}) -#ADD_LIBRARY(${PROJECT_NAME} SHARED ${SAMPLE_SRCS}) +ADD_LIBRARY(do STATIC ${SAMPLE_SRCS}) +INSTALL(TARGETS do ARCHIVE DESTINATION lib COMPONENT libraries) + +###################################################################################### -# INSTALL( -# TARGETS ${LIBRARY_OUTPUT_PATH}/lib${PROJECT_NAME}.a -# DESTINATION lib -# COMPONENT libraries -# ) ###################################################################################### ### 9) Include packaging diff --git a/application/cma_sa/CMakeLists.txt b/application/cma_sa/CMakeLists.txt index 5336cc4c5..d4c9092ad 100644 --- a/application/cma_sa/CMakeLists.txt +++ b/application/cma_sa/CMakeLists.txt @@ -16,4 +16,4 @@ ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) ADD_EXECUTABLE(cma_sa ${SOURCES}) -TARGET_LINK_LIBRARIES(cma_sa ${PROJECT_NAME} ${EO_LIBRARIES}) +TARGET_LINK_LIBRARIES(cma_sa do ${EO_LIBRARIES} ${MO_LIBRARIES}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a9beb5c7c..1e45136a3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,36 +1,9 @@ ###################################################################################### -### 1) Include useful packages +### 1) Set all needed source files for the project ###################################################################################### -#FIND_PACKAGE(Boost 1.33.0 REQUIRED) - -###################################################################################### - - -###################################################################################### -### 2) Include the sources -###################################################################################### - -#INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s) -###################################################################################### - -SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) - FILE(GLOB SOURCES *.cpp) + SET(SAMPLE_SRCS ${SOURCES} PARENT_SCOPE) -ADD_LIBRARY(${PROJECT_NAME} STATIC ${SAMPLE_SRCS}) - -# INSTALL( -# TARGETS ${LIBRARY_OUTPUT_PATH}/lib${PROJECT_NAME}.a -# DESTINATION lib -# COMPONENT libraries -# ) - ###################################################################################### diff --git a/src/doStats.h b/src/doStats.h index b5ac32b25..c46a72932 100644 --- a/src/doStats.h +++ b/src/doStats.h @@ -15,6 +15,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef _doStats_h +#define _doStats_h + #include #include @@ -119,3 +122,5 @@ class CovMatrix { double get_cov(int i, int j) const { return sumcov[i][j] / (n-1); } }; + +#endif // !_doStats_h diff --git a/src/test.cpp b/src/test.cpp new file mode 100644 index 000000000..97e5ab2cc --- /dev/null +++ b/src/test.cpp @@ -0,0 +1,4 @@ +namespace DO +{ + void test(){} +} From 42d780621d970276a8f991b6c883c23c5ea20bf3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 6 Jul 2010 01:31:44 +0200 Subject: [PATCH 1460/2134] cpack works --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1e45136a3..8b6d787a8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,9 @@ ### 1) Set all needed source files for the project ###################################################################################### +FILE(GLOB HDRS *.h do) +INSTALL(FILES ${HDRS} DESTINATION include/do COMPONENT headers) + FILE(GLOB SOURCES *.cpp) SET(SAMPLE_SRCS ${SOURCES} PARENT_SCOPE) From 011f93da7d96c234f36e59c972574a2c94b35887 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 6 Jul 2010 10:15:47 +0200 Subject: [PATCH 1461/2134] * fixed some packaging issues --- CMakeLists.txt | 11 ++++++++++- Packaging.cmake | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ce2d1ab9..a51f4ba70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,16 @@ INSTALL(TARGETS do ARCHIVE DESTINATION lib COMPONENT libraries) ###################################################################################### -### 9) Include packaging +### 9) Install pkg-config config file for EO +###################################################################################### + +INSTALL(FILES do.pc DESTINATION lib/pkgconfig COMPONENT headers) + +###################################################################################### + + +###################################################################################### +### 10) Include packaging ###################################################################################### INCLUDE(Packaging.cmake) diff --git a/Packaging.cmake b/Packaging.cmake index d4d8bbe34..d5104c512 100644 --- a/Packaging.cmake +++ b/Packaging.cmake @@ -57,7 +57,7 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${ ### 4) Set up debian packaging information ###################################################################################### -SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, libxml2, libmpich2-1.2") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, libxml2, libmpich2-1.2, eo, mo") SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") From d8d8f1268d5661f4f217a1d745e5b0772d76487a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 6 Jul 2010 11:25:02 +0200 Subject: [PATCH 1462/2134] + do.pc --- do.pc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 do.pc diff --git a/do.pc b/do.pc new file mode 100644 index 000000000..44155200b --- /dev/null +++ b/do.pc @@ -0,0 +1,12 @@ +# Package Information for pkg-config + +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/do + +Name: Distribution Object +Description: Distribution Object +Version: 1.0 +Libs: -L${libdir} -ldo +Cflags: -I${includedir} From fb83f09b830674d4246a5b5bc91d7eca75fc4dc7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 6 Jul 2010 15:43:15 +0200 Subject: [PATCH 1463/2134] ... --- CMakeLists.txt | 26 ++++++++------------------ application/cma_sa/CMakeLists.txt | 6 ++++-- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a51f4ba70..715fc0cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,17 +16,7 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT ###################################################################################### -### 2) Prepare some useful variables -###################################################################################### - -SET(DO_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -SET(DO_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}") - -###################################################################################### - - -###################################################################################### -### 3) Include useful features +### 2) Include useful features ###################################################################################### INCLUDE(FindDoxygen) @@ -44,7 +34,7 @@ INCLUDE_DIRECTORIES( ###################################################################################### -### 4) Include header files path +### 3) Include header files path ###################################################################################### INCLUDE_DIRECTORIES( @@ -55,7 +45,7 @@ INCLUDE_DIRECTORIES( ###################################################################################### -### 5) Set compiler definitions +### 4) Set compiler definitions ###################################################################################### IF(UNIX) @@ -69,7 +59,7 @@ ENDIF() ###################################################################################### -### 6) Prepare some variables for CMAKE usage +### 5) Prepare some variables for CMAKE usage ###################################################################################### SET(SAMPLE_SRCS) @@ -78,7 +68,7 @@ SET(SAMPLE_SRCS) ###################################################################################### -### 7) Now where we go ? +### 6) Now where we go ? ###################################################################################### ADD_SUBDIRECTORY(src) @@ -90,7 +80,7 @@ ADD_SUBDIRECTORY(doc) ###################################################################################### -### 8) Create executable, link libraries and prepare target +### 7) Create executable, link libraries and prepare target ###################################################################################### SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) @@ -104,7 +94,7 @@ INSTALL(TARGETS do ARCHIVE DESTINATION lib COMPONENT libraries) ###################################################################################### -### 9) Install pkg-config config file for EO +### 8) Install pkg-config config file for EO ###################################################################################### INSTALL(FILES do.pc DESTINATION lib/pkgconfig COMPONENT headers) @@ -113,7 +103,7 @@ INSTALL(FILES do.pc DESTINATION lib/pkgconfig COMPONENT headers) ###################################################################################### -### 10) Include packaging +### 9) Include packaging ###################################################################################### INCLUDE(Packaging.cmake) diff --git a/application/cma_sa/CMakeLists.txt b/application/cma_sa/CMakeLists.txt index d4c9092ad..586ba66cd 100644 --- a/application/cma_sa/CMakeLists.txt +++ b/application/cma_sa/CMakeLists.txt @@ -1,3 +1,5 @@ +PROJECT(cma_sa) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(RESOURCES @@ -15,5 +17,5 @@ ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) -ADD_EXECUTABLE(cma_sa ${SOURCES}) -TARGET_LINK_LIBRARIES(cma_sa do ${EO_LIBRARIES} ${MO_LIBRARIES}) +ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} do ${EO_LIBRARIES} ${MO_LIBRARIES}) From fc1adfcc78646f7ed8c51c3efcc0f3df8c8cffc6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 13 Jul 2010 13:20:07 +0200 Subject: [PATCH 1464/2134] * doStats * doEstimatorNormal: replaced use of Variance by CoMatrix --- src/doCMASA.h | 53 +++++++-------- src/doEstimatorNormal.h | 19 ++++-- src/doStats.h | 147 ++++++++++++++++++---------------------- src/test.cpp | 4 -- 4 files changed, 102 insertions(+), 121 deletions(-) delete mode 100644 src/test.cpp diff --git a/src/doCMASA.h b/src/doCMASA.h index cdf446c8f..aa8f56927 100644 --- a/src/doCMASA.h +++ b/src/doCMASA.h @@ -33,6 +33,7 @@ #include "doEstimator.h" #include "doModifierMass.h" #include "doSampler.h" +#include "doStats.h" using namespace boost::numeric::ublas; @@ -106,6 +107,7 @@ public: eoPop< EOT > selected_pop; + //------------------------------------------------------------- // Temporary solution used by plot to enumerate iterations in // several files. @@ -158,19 +160,16 @@ public: D distrib = _estimator(pop); double size = distrib.size(); - assert(size > 0); - double vacc = 1; + doHyperVolume hv; for (int i = 0; i < size; ++i) { - vacc *= sqrt(distrib.variance()[i]); + hv.update( distrib.variance()[i] ); } - assert(vacc <= std::numeric_limits::max()); - - ofs_params_var << vacc << std::endl; + ofs_params_var << hv << std::endl; } do @@ -297,30 +296,27 @@ public: // dicreasement //------------------------------------------------------------- - { - // double size = distrib.size(); + // { + // double size = distrib.size(); + // assert(size > 0); - // assert(size > 0); + // vector< double > vmin(size); + // vector< double > vmax(size); - // vector< double > vmin(size); - // vector< double > vmax(size); + // std::copy(distrib.param(0).begin(), distrib.param(0).end(), vmin.begin()); + // std::copy(distrib.param(1).begin(), distrib.param(1).end(), vmax.begin()); - // std::copy(distrib.param(0).begin(), distrib.param(0).end(), vmin.begin()); - // std::copy(distrib.param(1).begin(), distrib.param(1).end(), vmax.begin()); + // vector< double > vrange = vmax - vmin; - // vector< double > vrange = vmax - vmin; + // doHyperVolume hv; - // double vacc = 1; + // for (int i = 0, size = vrange.size(); i < size; ++i) + // { + // hv.update( vrange(i) ); + // } - // for (int i = 0, size = vrange.size(); i < size; ++i) - // { - // vacc *= vrange(i); - // } - - // assert(vacc <= std::numeric_limits::max()); - - // ofs_params << vacc << std::endl; - } + // ofs_params << hv << std::endl; + // } //------------------------------------------------------------- @@ -332,19 +328,16 @@ public: { double size = distrib.size(); - assert(size > 0); - double vacc = 1; + doHyperVolume hv; for (int i = 0; i < size; ++i) { - vacc *= sqrt(distrib.variance()[i]); + hv.update( distrib.variance()[i] ); } - assert(vacc <= std::numeric_limits::max()); - - ofs_params_var << vacc << std::endl; + ofs_params_var << hv << std::endl; } //------------------------------------------------------------- diff --git a/src/doEstimatorNormal.h b/src/doEstimatorNormal.h index 133b98032..84430f350 100644 --- a/src/doEstimatorNormal.h +++ b/src/doEstimatorNormal.h @@ -19,14 +19,16 @@ public: unsigned int dimsize = pop[0].size(); assert(dimsize > 0); - std::vector< Var > var(dimsize); + //std::vector< doVar > var(dimsize); + doCovMatrix cov(dimsize); for (unsigned int i = 0; i < popsize; ++i) { - for (unsigned int d = 0; d < dimsize; ++d) - { - var[d].update(pop[i][d]); - } + cov.update(pop[i]); + // for (unsigned int d = 0; d < dimsize; ++d) + // { + // var[d].update(pop[i][d]); + // } } EOT mean(dimsize); @@ -34,9 +36,12 @@ public: for (unsigned int d = 0; d < dimsize; ++d) { - mean[d] = var[d].get_mean(); - variance[d] = var[d].get_var(); + // mean[d] = var[d].get_mean(); + // variance[d] = var[d].get_var(); //variance[d] = var[d].get_std(); // perhaps I should use this !?! + + mean[d] = cov.get_mean(d); + variance[d] = cov.get_var(d); } return doNormal< EOT >(mean, variance); diff --git a/src/doStats.h b/src/doStats.h index c46a72932..27a4b9c48 100644 --- a/src/doStats.h +++ b/src/doStats.h @@ -18,109 +18,96 @@ #ifndef _doStats_h #define _doStats_h -#include -#include +#include -class Mean { +class doStats : public eoPrintable +{ +public: + doStats(); - double n; - double mean; + virtual void printOn(std::ostream&) const; - public: - Mean() : n(0), mean(0) {} - - void update(double v) { - n++; - double d = v - mean; - mean += 1/n * d; - } - - double get_mean() const { return mean; } +protected: + double _n; }; -class Var { - double n; - double mean; - double sumvar; +class doMean : public doStats +{ +public: + doMean(); - public: - Var() : n(0), mean(0), sumvar(0) {} + virtual void update(double); + virtual void printOn(std::ostream&) const; - void update(double v) { - n++; - double d = v - mean; - mean += 1/n * d; - sumvar += (n-1)/n * d * d; - } + double get_mean() const; - double get_mean() const { return mean; } - double get_var() const { return sumvar / (n-1); } - double get_std() const { return sqrt(get_var()); } +protected: + double _mean; +}; + +class doVar : public doMean +{ +public: + doVar(); + + virtual void update(double); + virtual void printOn(std::ostream&) const; + + double get_var() const; + double get_std() const; + +protected: + double _sumvar; }; /** Single covariance between two variates */ -class Cov { - double n; - double meana; - double meanb; - double sumcov; +class doCov : public doStats +{ +public: + doCov(); - public: - Cov() : n(0), meana(0), meanb(0), sumcov(0) {} + virtual void update(double, double); + virtual void printOn(std::ostream&) const; - void update(double a, double b) { - ++n; - double da = a - meana; - double db = b - meanb; + double get_meana() const; + double get_meanb() const; + double get_cov() const; - meana += 1/n * da; - meanb += 1/n * db; - - sumcov += (n-1)/n * da * db; - } - - double get_meana() const { return meana; } - double get_meanb() const { return meanb; } - double get_cov() const { return sumcov / (n-1); } +protected: + double _meana; + double _meanb; + double _sumcov; }; -class CovMatrix { - double n; - std::vector mean; - std::vector< std::vector > sumcov; +class doCovMatrix : public doStats +{ +public: + doCovMatrix(unsigned dim); - public: - CovMatrix(unsigned dim) : n(0), mean(dim), sumcov(dim , std::vector(dim)) {} + virtual void update(const std::vector&); - void update(const std::vector& v) { - assert(v.size() == mean.size()); + double get_mean(int) const; + double get_var(int) const; + double get_std(int) const; + double get_cov(int, int) const; - n++; +protected: + std::vector< double > _mean; + std::vector< std::vector< double > > _sumcov; +}; - for (unsigned i = 0; i < v.size(); ++i) { - double d = v[i] - mean[i]; - mean[i] += 1/n * d; +class doHyperVolume : public doStats +{ +public: + doHyperVolume(); - sumcov[i][i] += (n-1)/n * d * d; + virtual void update(double); + virtual void printOn(std::ostream&) const; - for (unsigned j = i; j < v.size(); ++j) { - double e = v[j] - mean[j]; // mean[j] is not updated yet - - double upd = (n-1)/n * d * e; - - sumcov[i][j] += upd; - sumcov[j][i] += upd; - - } - } - - } - - double get_mean(int i) const { return mean[i]; } - double get_var(int i ) const { return sumcov[i][i] / (n-1); } - double get_std(int i) const { return sqrt(get_var(i)); } - double get_cov(int i, int j) const { return sumcov[i][j] / (n-1); } + double get_hypervolume() const; +protected: + double _hv; }; #endif // !_doStats_h diff --git a/src/test.cpp b/src/test.cpp deleted file mode 100644 index 97e5ab2cc..000000000 --- a/src/test.cpp +++ /dev/null @@ -1,4 +0,0 @@ -namespace DO -{ - void test(){} -} From fde64b063bfc170bda84c09a5f736863d22894de Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 23 Jul 2010 13:18:30 +0200 Subject: [PATCH 1465/2134] * some cleaner updates --- application/cma_sa/CMakeLists.txt | 4 +++- application/cma_sa/main.cpp | 13 +++++-------- src/doDistribParams.h | 12 ++++++++++++ src/doEstimatorNormal.h | 17 +++-------------- src/doFileSnapshot.h | 27 --------------------------- src/doNormalParams.h | 4 ++++ src/doVectorBounds.h | 4 ++++ 7 files changed, 31 insertions(+), 50 deletions(-) diff --git a/application/cma_sa/CMakeLists.txt b/application/cma_sa/CMakeLists.txt index 586ba66cd..d68a49c07 100644 --- a/application/cma_sa/CMakeLists.txt +++ b/application/cma_sa/CMakeLists.txt @@ -11,11 +11,13 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${CMAKE_CURRENT_BINARY_DIR}/${file} + ${DO_BINARY_DIR}/${file} ) ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) +SET(EXECUTABLE_OUTPUT_PATH ${DO_BINARY_DIR}) + ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} do ${EO_LIBRARIES} ${MO_LIBRARIES}) diff --git a/application/cma_sa/main.cpp b/application/cma_sa/main.cpp index e15d37f39..f0864a682 100644 --- a/application/cma_sa/main.cpp +++ b/application/cma_sa/main.cpp @@ -48,9 +48,6 @@ int main(int ac, char** av) doModifierMass< doNormal< EOT > >* modifier = new doNormalCenter< EOT >(); state.storeFunctor(modifier); - // EOT min(2, 42); - // EOT max(2, 32); - //eoEvalFunc< EOT >* plainEval = new BopoRosenbrock< EOT, double, const EOT& >(); eoEvalFunc< EOT >* plainEval = new Sphere< EOT >(); state.storeFunctor(plainEval); @@ -119,11 +116,11 @@ int main(int ac, char** av) // stopping criteria // ... and creates the parameter letters: C E g G s T - eoContinue< EOT >& monitoringContinue = do_make_continue(parser, state, eval); + eoContinue< EOT >& monitoring_continue = do_make_continue(parser, state, eval); // output - eoCheckPoint< EOT >& checkpoint = do_make_checkpoint(parser, state, eval, monitoringContinue); + eoCheckPoint< EOT >& checkpoint = do_make_checkpoint(parser, state, eval, monitoring_continue); // appends some missing code to checkpoint @@ -146,10 +143,10 @@ int main(int ac, char** av) // -------------------------- - // eoPopStat< EOT >* popStat = new eoPopStat; - // state.storeFunctor(popStat); + eoPopStat< EOT >* popStat = new eoPopStat; + state.storeFunctor(popStat); - // checkpoint.add(*popStat); + checkpoint.add(*popStat); // eoMonitor* fileSnapshot = new doFileSnapshot< std::vector< std::string > >("ResPop"); // state.storeFunctor(fileSnapshot); diff --git a/src/doDistribParams.h b/src/doDistribParams.h index b895eec98..ef07c1513 100644 --- a/src/doDistribParams.h +++ b/src/doDistribParams.h @@ -11,6 +11,18 @@ public: : _params(n) {} + doDistribParams(const doDistribParams& p) { *this = p; } + + doDistribParams& operator=(const doDistribParams& p) + { + if (this != &p) + { + this->_params = p._params; + } + + return *this; + } + EOT& param(unsigned int i = 0){return _params[i];} unsigned int param_size(){return _params.size();} diff --git a/src/doEstimatorNormal.h b/src/doEstimatorNormal.h index 84430f350..3bd2058fc 100644 --- a/src/doEstimatorNormal.h +++ b/src/doEstimatorNormal.h @@ -5,8 +5,6 @@ #include "doUniform.h" #include "doStats.h" -// TODO: calcule de la moyenne + covariance dans une classe derivee - template < typename EOT > class doEstimatorNormal : public doEstimator< doNormal< EOT > > { @@ -19,32 +17,23 @@ public: unsigned int dimsize = pop[0].size(); assert(dimsize > 0); - //std::vector< doVar > var(dimsize); doCovMatrix cov(dimsize); for (unsigned int i = 0; i < popsize; ++i) { cov.update(pop[i]); - // for (unsigned int d = 0; d < dimsize; ++d) - // { - // var[d].update(pop[i][d]); - // } } EOT mean(dimsize); - EOT variance(dimsize); + EOT covariance(dimsize); for (unsigned int d = 0; d < dimsize; ++d) { - // mean[d] = var[d].get_mean(); - // variance[d] = var[d].get_var(); - //variance[d] = var[d].get_std(); // perhaps I should use this !?! - mean[d] = cov.get_mean(d); - variance[d] = cov.get_var(d); + covariance[d] = cov.get_var(d); } - return doNormal< EOT >(mean, variance); + return doNormal< EOT >(mean, covariance); } }; diff --git a/src/doFileSnapshot.h b/src/doFileSnapshot.h index 39a5bb169..def9efc27 100644 --- a/src/doFileSnapshot.h +++ b/src/doFileSnapshot.h @@ -83,20 +83,13 @@ public : // now make sure there is a dir without any genXXX file in it if (res) // no dir present { - //s = std::string("mkdir ")+dirname; ::mkdir(dirname.c_str(), 0755); } else if (!res && _rmFiles) { - //s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; std::string s = dirname+ "/" + filename + "*"; ::unlink(s.c_str()); } - // else - // s = " "; - - //int nothing = system(s.c_str()); - // all done } /** accessor: has something changed (for gnuplot subclass) @@ -148,43 +141,23 @@ public : */ eoMonitor& operator()(std::ostream& _os) { - //eo::log << eo::debug << "TOTO" << std::endl; - - //_os << "TOTO" << "\n"; - - //_os << v[0] << "\n"; - - // const eoValueParam > * ptParam = - // static_cast >* >(vec[0]); - - // what's the size of vec ?!? - - eo::log << eo::debug; - - eo::log << "vec size: " << vec.size() << std::endl; - const eoValueParam< EOTParam > * ptParam = static_cast< const eoValueParam< EOTParam >* >(vec[0]); - //const std::vector v = ptParam->value(); EOTParam v(ptParam->value()); if (vec.size() == 1) // only one std::vector: -> add number in front { eo::log << "I am here..." << std::endl; - //eo::log << *vec[0] << std::endl; - for (unsigned k=0; k > vv(vec.size()); std::vector< EOTParam > vv(vec.size()); vv[0]=v; for (unsigned i=1; i >* >(vec[1]); ptParam = static_cast< const eoValueParam< EOTParam >* >(vec[1]); vv[i] = ptParam->value(); if (vv[i].size() != v.size()) diff --git a/src/doNormalParams.h b/src/doNormalParams.h index fbfc88edf..18d88fb45 100644 --- a/src/doNormalParams.h +++ b/src/doNormalParams.h @@ -17,6 +17,10 @@ public: variance() = _variance; } + doNormalParams(const doNormalParams& p) + : doDistribParams< EOT >( p ) + {} + EOT& mean(){return this->param(0);} EOT& variance(){return this->param(1);} }; diff --git a/src/doVectorBounds.h b/src/doVectorBounds.h index 65655c3c1..8a0530dba 100644 --- a/src/doVectorBounds.h +++ b/src/doVectorBounds.h @@ -17,6 +17,10 @@ public: max() = _max; } + doVectorBounds(const doVectorBounds& v) + : doDistribParams< EOT >( v ) + {} + EOT& min(){return this->param(0);} EOT& max(){return this->param(1);} }; From 84b1515a56715b8459fd8d875d8c38304652a001 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 23 Jul 2010 13:24:09 +0200 Subject: [PATCH 1466/2134] + TODO + doStats.cpp --- src/TODO | 2 + src/doStats.cpp | 192 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+) create mode 100644 src/TODO create mode 100644 src/doStats.cpp diff --git a/src/TODO b/src/TODO new file mode 100644 index 000000000..13785cc8e --- /dev/null +++ b/src/TODO @@ -0,0 +1,2 @@ +* deplacer les ecritures pour gnuplot dans des classes type eoContinue (eoMonitor) +* integrer ACP diff --git a/src/doStats.cpp b/src/doStats.cpp new file mode 100644 index 000000000..80c9869fd --- /dev/null +++ b/src/doStats.cpp @@ -0,0 +1,192 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#include +#include + +#include "doStats.h" + +doStats::doStats() + : _n(0) +{} + +void doStats::printOn(std::ostream& _os) const +{ + _os << "Not implemented yet! "; +} + +doMean::doMean() + : _mean(0) +{} + +void doMean::update(double v) +{ + _n++; + + double d = v - _mean; + + _mean += 1 / _n * d; +} + +double doMean::get_mean() const +{ + return _mean; +} + +void doMean::printOn(std::ostream& _os) const +{ + _os << get_mean(); +} + +doVar::doVar() + : _sumvar(0) +{} + +void doVar::update(double v) +{ + _n++; + + double d = v - _mean; + + _mean += 1 / _n * d; + _sumvar += (_n - 1) / _n * d * d; +} + +double doVar::get_var() const +{ + return _sumvar / (_n - 1); +} + +double doVar::get_std() const +{ + return ::sqrt( get_var() ); +} + +void doVar::printOn(std::ostream& _os) const +{ + _os << get_var(); +} + +doCov::doCov() + : _meana(0), _meanb(0), _sumcov(0) +{} + +void doCov::update(double a, double b) +{ + ++_n; + + double da = a - _meana; + double db = b - _meanb; + + _meana += 1 / _n * da; + _meanb += 1 / _n * db; + + _sumcov += (_n - 1) / _n * da * db; +} + +double doCov::get_meana() const +{ + return _meana; +} + +double doCov::get_meanb() const +{ + return _meanb; +} + +double doCov::get_cov() const +{ + return _sumcov / (_n - 1); +} + +void doCov::printOn(std::ostream& _os) const +{ + _os << get_cov(); +} + +doCovMatrix::doCovMatrix(unsigned dim) + : _mean(dim), _sumcov(dim, std::vector< double >( dim )) +{} + +void doCovMatrix::update(const std::vector& v) +{ + assert(v.size() == _mean.size()); + + _n++; + + for (unsigned int i = 0; i < v.size(); ++i) + { + double d = v[i] - _mean[i]; + + _mean[i] += 1 / _n * d; + _sumcov[i][i] += (_n - 1) / _n * d * d; + + for (unsigned j = i; j < v.size(); ++j) + { + double e = v[j] - _mean[j]; // _mean[j] is not updated yet + + double upd = (_n - 1) / _n * d * e; + + _sumcov[i][j] += upd; + _sumcov[j][i] += upd; + } + } +} + +double doCovMatrix::get_mean(int i) const +{ + return _mean[i]; +} + +double doCovMatrix::get_var(int i) const +{ + return _sumcov[i][i] / (_n - 1); +} + +double doCovMatrix::get_std(int i) const +{ + return ::sqrt( get_var(i) ); +} + +double doCovMatrix::get_cov(int i, int j) const +{ + return _sumcov[i][j] / (_n - 1); +} + +doHyperVolume::doHyperVolume() + : _hv(1) +{} + +void doHyperVolume::update(double v) +{ + _hv *= ::sqrt(v); + + assert( _hv <= std::numeric_limits< double >::max() ); +} + +double doHyperVolume::get_hypervolume() const +{ + return _hv; +} + +void doHyperVolume::printOn(std::ostream& _os) const +{ + _os << get_hypervolume(); +} From 78c68ebf3082e6e959248c7a46f583f74d196c08 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 23 Jul 2010 13:34:42 +0200 Subject: [PATCH 1467/2134] + added some useful files --- build_gcc_linux_debug | 7 +++++++ build_gcc_linux_release | 7 +++++++ distclean | 4 ++++ package_deb | 5 +++++ package_rpm | 5 +++++ 5 files changed, 28 insertions(+) create mode 100755 build_gcc_linux_debug create mode 100755 build_gcc_linux_release create mode 100755 distclean create mode 100755 package_deb create mode 100755 package_rpm diff --git a/build_gcc_linux_debug b/build_gcc_linux_debug new file mode 100755 index 000000000..da385fdb8 --- /dev/null +++ b/build_gcc_linux_debug @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir debug +cd debug +cmake -DCMAKE_BUILD_TYPE=Debug .. +make +cd .. diff --git a/build_gcc_linux_release b/build_gcc_linux_release new file mode 100755 index 000000000..78a66c551 --- /dev/null +++ b/build_gcc_linux_release @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir release +cd release +cmake .. +make +cd .. diff --git a/distclean b/distclean new file mode 100755 index 000000000..e4a02bc44 --- /dev/null +++ b/distclean @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +rm -rf debug +rm -rf release diff --git a/package_deb b/package_deb new file mode 100755 index 000000000..1a44d0219 --- /dev/null +++ b/package_deb @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd release +cpack -G DEB +cd .. diff --git a/package_rpm b/package_rpm new file mode 100755 index 000000000..8d46b7d04 --- /dev/null +++ b/package_rpm @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd release +cpack -G RPM +cd .. From f66efcba04a67006b8aa97c640967307e41e6984 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 29 Jul 2010 11:22:10 +0200 Subject: [PATCH 1468/2134] * doc installable --- doc/CMakeLists.txt | 9 + doc/doxyfile.cmake | 1413 +++++++++++++++++++++++++++++++++++++++-- src/do | 1 - src/doCMASA.h | 8 +- src/doDistribParams.h | 44 -- src/doNormalParams.h | 27 +- src/doStats.h | 5 + src/doVectorBounds.h | 28 +- 8 files changed, 1421 insertions(+), 114 deletions(-) delete mode 100644 src/doDistribParams.h diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index c44ffc477..056f3f2fc 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -19,6 +19,15 @@ IF (DOXYGEN_FOUND) "${CMAKE_CURRENT_SOURCE_DIR}/${DOC_CONFIG_FILE}.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${DOC_CONFIG_FILE}" ) + + INSTALL( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION share/do COMPONENT libraries + PATTERN "CMakeFiles" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "doxyfile" EXCLUDE + ) ELSE (DOXYGEN_FOUND) MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") ENDIF (DOXYGEN_FOUND) diff --git a/doc/doxyfile.cmake b/doc/doxyfile.cmake index e19b4f280..1d610acc9 100644 --- a/doc/doxyfile.cmake +++ b/doc/doxyfile.cmake @@ -1,15 +1,91 @@ -# Doxyfile 1.5.1 +# Doxyfile 1.6.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + PROJECT_NAME = @PACKAGE_NAME@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + PROJECT_NUMBER = @PACKAGE_VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ @@ -21,209 +97,1468 @@ ABBREVIATE_BRIEF = "The $name class" \ a \ an \ the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ -STRIP_FROM_INC_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + MULTILINE_CPP_IS_BRIEF = NO -#DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + TAB_SIZE = 8 -ALIASES = + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + WARNINGS = NO + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + INPUT = @CMAKE_SOURCE_DIR@ -FILE_PATTERNS = *.cpp \ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.cpp \ *.h \ - NEWS README + NEWS \ + README + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + RECURSIVE = YES -EXCLUDE = + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = @CMAKE_BINARY_DIR@ + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + EXCLUDE_PATTERNS = -EXAMPLE_PATH = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + FILTER_SOURCE_FILES = NO + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + VERBATIM_HEADERS = YES + #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + COLS_IN_ALPHA_INDEX = 3 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + IGNORE_PREFIX = moeo + #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + GENERATE_TREEVIEW = YES + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + MAN_LINKS = NO + #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + XML_PROGRAMLISTING = YES + #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + GENERATE_AUTOGEN_DEF = NO + #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + SKIP_FUNCTION_MACROS = YES + #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + HAVE_DOT = NO + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES diff --git a/src/do b/src/do index 302895786..478a3f216 100644 --- a/src/do +++ b/src/do @@ -22,7 +22,6 @@ #include "doSamplerUniform.h" #include "doSamplerNormal.h" -#include "doDistribParams.h" #include "doVectorBounds.h" #include "doNormalParams.h" diff --git a/src/doCMASA.h b/src/doCMASA.h index aa8f56927..1e28b7836 100644 --- a/src/doCMASA.h +++ b/src/doCMASA.h @@ -140,7 +140,7 @@ public: //------------------------------------------------------------- - // Temporary solution to store bounds valeur for each distribution. + // Temporary solution to store bounds values for each distribution. //------------------------------------------------------------- std::string bounds_results_destination("ResBounds"); @@ -151,7 +151,7 @@ public: ::system(ss.str().c_str()); } - ::mkdir(bounds_results_destination.c_str(), 0755); // create a first time the + ::mkdir(bounds_results_destination.c_str(), 0755); // create once directory //------------------------------------------------------------- @@ -283,8 +283,8 @@ public: std::ofstream ofs(ss.str().c_str()); ofs << size << " "; - std::copy(distrib.param(0).begin(), distrib.param(0).end(), std::ostream_iterator< double >(ofs, " ")); - std::copy(distrib.param(1).begin(), distrib.param(1).end(), std::ostream_iterator< double >(ofs, " ")); + std::copy(distrib.mean().begin(), distrib.mean().end(), std::ostream_iterator< double >(ofs, " ")); + std::copy(distrib.variance().begin(), distrib.variance().end(), std::ostream_iterator< double >(ofs, " ")); ofs << std::endl; } diff --git a/src/doDistribParams.h b/src/doDistribParams.h deleted file mode 100644 index ef07c1513..000000000 --- a/src/doDistribParams.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _doDistribParams_h -#define _doDistribParams_h - -#include - -template < typename EOT > -class doDistribParams -{ -public: - doDistribParams(unsigned n = 2) - : _params(n) - {} - - doDistribParams(const doDistribParams& p) { *this = p; } - - doDistribParams& operator=(const doDistribParams& p) - { - if (this != &p) - { - this->_params = p._params; - } - - return *this; - } - - EOT& param(unsigned int i = 0){return _params[i];} - - unsigned int param_size(){return _params.size();} - - unsigned int size() - { - for (unsigned int i = 0, size = param_size(); i < size - 1; ++i) - { - assert(param(i).size() == param(i + 1).size()); - } - - return param(0).size(); - } - -private: - std::vector< EOT > _params; -}; - -#endif // !_doDistribParams_h diff --git a/src/doNormalParams.h b/src/doNormalParams.h index 18d88fb45..87a3a65aa 100644 --- a/src/doNormalParams.h +++ b/src/doNormalParams.h @@ -1,28 +1,29 @@ #ifndef _doNormalParams_h #define _doNormalParams_h -#include "doDistribParams.h" - template < typename EOT > -class doNormalParams : public doDistribParams< EOT > +class doNormalParams { public: - doNormalParams(EOT _mean, EOT _variance) - : doDistribParams< EOT >(2) + doNormalParams(EOT mean, EOT variance) + : _mean(mean), _variance(variance) { assert(_mean.size() > 0); assert(_mean.size() == _variance.size()); - - mean() = _mean; - variance() = _variance; } - doNormalParams(const doNormalParams& p) - : doDistribParams< EOT >( p ) - {} + EOT& mean(){return _mean;} + EOT& variance(){return _variance;} - EOT& mean(){return this->param(0);} - EOT& variance(){return this->param(1);} + unsigned int size() + { + assert(_mean.size() == _variance.size()); + return _mean.size(); + } + +private: + EOT _mean; + EOT _variance; }; #endif // !_doNormalParams_h diff --git a/src/doStats.h b/src/doStats.h index 27a4b9c48..94756fa3f 100644 --- a/src/doStats.h +++ b/src/doStats.h @@ -110,4 +110,9 @@ protected: double _hv; }; +class doCholesky : public doStats +{ + +}; + #endif // !_doStats_h diff --git a/src/doVectorBounds.h b/src/doVectorBounds.h index 8a0530dba..07e4e2cfd 100644 --- a/src/doVectorBounds.h +++ b/src/doVectorBounds.h @@ -1,28 +1,30 @@ #ifndef _doVectorBounds_h #define _doVectorBounds_h -#include "doDistribParams.h" - template < typename EOT > -class doVectorBounds : public doDistribParams< EOT > +class doVectorBounds { public: - doVectorBounds(EOT _min, EOT _max) - : doDistribParams< EOT >(2) + doVectorBounds(EOT min, EOT max) + : _min(min), _max(max) { assert(_min.size() > 0); assert(_min.size() == _max.size()); - - min() = _min; - max() = _max; } - doVectorBounds(const doVectorBounds& v) - : doDistribParams< EOT >( v ) - {} + EOT& min(){return _min;} + EOT& max(){return _max;} - EOT& min(){return this->param(0);} - EOT& max(){return this->param(1);} + + unsigned int size() + { + assert(_min.size() == _max.size()); + return _min.size(); + } + +private: + EOT _min; + EOT _max; }; #endif // !_doVectorBounds_h From d3fc6438c0e6016cee1af61ea2890c5ecdfb51df Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 29 Jul 2010 14:28:05 +0200 Subject: [PATCH 1469/2134] no more CVSROOT --- CVSROOT/checkoutlist | 13 ------------- CVSROOT/commitinfo | 15 --------------- CVSROOT/config | 11 ----------- CVSROOT/cvswrappers | 23 ----------------------- CVSROOT/editinfo | 21 --------------------- CVSROOT/loginfo | 26 -------------------------- CVSROOT/modules | 26 -------------------------- CVSROOT/notify | 12 ------------ CVSROOT/rcsinfo | 13 ------------- CVSROOT/taginfo | 20 -------------------- CVSROOT/verifymsg | 21 --------------------- 11 files changed, 201 deletions(-) delete mode 100644 CVSROOT/checkoutlist delete mode 100644 CVSROOT/commitinfo delete mode 100644 CVSROOT/config delete mode 100644 CVSROOT/cvswrappers delete mode 100644 CVSROOT/editinfo delete mode 100644 CVSROOT/loginfo delete mode 100644 CVSROOT/modules delete mode 100644 CVSROOT/notify delete mode 100644 CVSROOT/rcsinfo delete mode 100644 CVSROOT/taginfo delete mode 100644 CVSROOT/verifymsg diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist deleted file mode 100644 index b04b3501f..000000000 --- a/CVSROOT/checkoutlist +++ /dev/null @@ -1,13 +0,0 @@ -# The "checkoutlist" file is used to support additional version controlled -# administrative files in $CVSROOT/CVSROOT, such as template files. -# -# The first entry on a line is a filename which will be checked out from -# the corresponding RCS file in the $CVSROOT/CVSROOT directory. -# The remainder of the line is an error message to use if the file cannot -# be checked out. -# -# File format: -# -# [] -# -# comment lines begin with '#' diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo deleted file mode 100644 index b19e7b7a6..000000000 --- a/CVSROOT/commitinfo +++ /dev/null @@ -1,15 +0,0 @@ -# The "commitinfo" file is used to control pre-commit checks. -# The filter on the right is invoked with the repository and a list -# of files to check. A non-zero exit of the filter program will -# cause the commit to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/config b/CVSROOT/config deleted file mode 100644 index 8069cad5d..000000000 --- a/CVSROOT/config +++ /dev/null @@ -1,11 +0,0 @@ -# Set this to "no" if pserver shouldn't check system users/passwords -#SystemAuth=no - -# Set `PreservePermissions' to `yes' to save file status information -# in the repository. -#PreservePermissions=no - -# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top -# level of the new working directory when using the `cvs checkout' -# command. -#TopLevelAdmin=no diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers deleted file mode 100644 index 0accaf1b1..000000000 --- a/CVSROOT/cvswrappers +++ /dev/null @@ -1,23 +0,0 @@ -# This file affects handling of files based on their names. -# -# The -t/-f options allow one to treat directories of files -# as a single file, or to transform a file in other ways on -# its way in and out of CVS. -# -# The -m option specifies whether CVS attempts to merge files. -# -# The -k option specifies keyword expansion (e.g. -kb for binary). -# -# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) -# -# wildcard [option value][option value]... -# -# where option is one of -# -f from cvs filter value: path to filter -# -t to cvs filter value: path to filter -# -m update methodology value: MERGE or COPY -# -k expansion mode value: b, o, kkv, &c -# -# and value is a single-quote delimited value. -# For example: -#*.gif -k 'b' diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo deleted file mode 100644 index d78886c15..000000000 --- a/CVSROOT/editinfo +++ /dev/null @@ -1,21 +0,0 @@ -# The "editinfo" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo deleted file mode 100644 index 5a59f0a54..000000000 --- a/CVSROOT/loginfo +++ /dev/null @@ -1,26 +0,0 @@ -# The "loginfo" file controls where "cvs commit" log information -# is sent. The first entry on a line is a regular expression which must match -# the directory that the change is being made to, relative to the -# $CVSROOT. If a match is found, then the remainder of the line is a filter -# program that should expect log information on its standard input. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name ALL appears as a regular expression it is always used -# in addition to the first matching regex or DEFAULT. -# -# You may specify a format string as part of the -# filter. The string is composed of a `%' followed -# by a single format character, or followed by a set of format -# characters surrounded by `{' and `}' as separators. The format -# characters are: -# -# s = file name -# V = old version number (pre-checkin) -# v = new version number (post-checkin) -# -# For example: -#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog -# or -#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog diff --git a/CVSROOT/modules b/CVSROOT/modules deleted file mode 100644 index cb9e9efc9..000000000 --- a/CVSROOT/modules +++ /dev/null @@ -1,26 +0,0 @@ -# Three different line formats are valid: -# key -a aliases... -# key [options] directory -# key [options] directory files... -# -# Where "options" are composed of: -# -i prog Run "prog" on "cvs commit" from top-level of module. -# -o prog Run "prog" on "cvs checkout" of module. -# -e prog Run "prog" on "cvs export" of module. -# -t prog Run "prog" on "cvs rtag" of module. -# -u prog Run "prog" on "cvs update" of module. -# -d dir Place module in directory "dir" instead of module name. -# -l Top-level directory only -- do not recurse. -# -# NOTE: If you change any of the "Run" options above, you'll have to -# release and re-checkout any working directories of these modules. -# -# And "directory" is a path to a directory relative to $CVSROOT. -# -# The "-a" option specifies an alias. An alias is interpreted as if -# everything on the right of the "-a" had been typed on the command line. -# -# You can encode a module within a module by using the special '&' -# character to interpose another module into the current module. This -# can be useful for creating a module that consists of many directories -# spread out over the entire source repository. diff --git a/CVSROOT/notify b/CVSROOT/notify deleted file mode 100644 index 34f0bc288..000000000 --- a/CVSROOT/notify +++ /dev/null @@ -1,12 +0,0 @@ -# The "notify" file controls where notifications from watches set by -# "cvs watch add" or "cvs edit" are sent. The first entry on a line is -# a regular expression which is tested against the directory that the -# change is being made to, relative to the $CVSROOT. If it matches, -# then the remainder of the line is a filter program that should contain -# one occurrence of %s for the user to notify, and information on its -# standard input. -# -# "ALL" or "DEFAULT" can be used in place of the regular expression. -# -# For example: -#ALL mail %s -s "CVS notification" diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo deleted file mode 100644 index 49e59f4d0..000000000 --- a/CVSROOT/rcsinfo +++ /dev/null @@ -1,13 +0,0 @@ -# The "rcsinfo" file is used to control templates with which the editor -# is invoked on commit and import. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being made to, relative to the -# $CVSROOT. For the first match that is found, then the remainder of the -# line is the name of the file that contains the template. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo deleted file mode 100644 index 274a46dd5..000000000 --- a/CVSROOT/taginfo +++ /dev/null @@ -1,20 +0,0 @@ -# The "taginfo" file is used to control pre-tag checks. -# The filter on the right is invoked with the following arguments: -# -# $1 -- tagname -# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d -# $3 -- repository -# $4-> file revision [file revision ...] -# -# A non-zero exit of the filter program will cause the tag to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg deleted file mode 100644 index 86f747ce2..000000000 --- a/CVSROOT/verifymsg +++ /dev/null @@ -1,21 +0,0 @@ -# The "verifymsg" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. From eee9b46c0bd4f7976ee10a5149dec86544265987 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 31 Jul 2010 18:59:12 +0200 Subject: [PATCH 1470/2134] website sources --- website/200px-Graph_betweenness.svg.png | Bin 0 -> 30793 bytes website/BatchGantt1.png | Bin 0 -> 20208 bytes website/Evolutionary_algorithm.png | Bin 0 -> 23716 bytes website/Evolutionary_algorithm.svg | 402 +++++++++++++++++++ website/Gallagher_Gaussian_BBOB_f21.png | Bin 0 -> 22721 bytes website/Graph_betweenness.svg | 501 ++++++++++++++++++++++++ website/eo_ico.png | Bin 0 -> 705 bytes website/eo_logo.png | Bin 0 -> 15934 bytes website/eo_logo.svg | 423 ++++++++++++++++++++ website/eo_logo_fronde.svg | 391 ++++++++++++++++++ website/fronde.png | Bin 0 -> 43920 bytes website/index.html | 449 +++++++++++++++++++++ website/lightblue.css | 253 ++++++++++++ 13 files changed, 2419 insertions(+) create mode 100644 website/200px-Graph_betweenness.svg.png create mode 100644 website/BatchGantt1.png create mode 100644 website/Evolutionary_algorithm.png create mode 100644 website/Evolutionary_algorithm.svg create mode 100644 website/Gallagher_Gaussian_BBOB_f21.png create mode 100644 website/Graph_betweenness.svg create mode 100644 website/eo_ico.png create mode 100644 website/eo_logo.png create mode 100644 website/eo_logo.svg create mode 100644 website/eo_logo_fronde.svg create mode 100644 website/fronde.png create mode 100644 website/index.html create mode 100644 website/lightblue.css diff --git a/website/200px-Graph_betweenness.svg.png b/website/200px-Graph_betweenness.svg.png new file mode 100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m3O#xOc)qQwuxB&9 zBL+Hb04Q@&RrsF26;}i{Mq^a~eAR@vE-x<6csSkDwX4;_D&qo=mRHssh>0ukr~K=% zNmq-ymf8l1TI(V~V4I%l5!@(WKOX=ThPfZ+q*d?lkWE|KX2m;OmCekcvIGHuGo)J> zf*L=jrXEe*AvCFE9_df|W$?m3{!AE6N{sL)ia{X89N&aGXth^QCNWjtbCs z;b{0TMP(~uh6S;4pw%~d8EQYLCE?WKP)xAC+lv4GYb1W33D;w$XO`k`yb1r;P&aWt z(VRn-&kmDvS>)d=GK1if&lc0eB_AFDY4ZbV%||(HGXHAiVqdDL!DR;z9S@_dKczT1 zN0ktN*!@ud7nDlp9Q%Y=`e{x0gf_bmoMi=L6@qr5F00=zS5v08wWwnfkrEN$P#8wK zZI}OAQk90fX;;6+Vomr@Vfk~71TCxO-)dx(8I|9g@VTm`&lQ&MkC@(D3BdhcRp{U- zmt8Z_K(V+wT#1I={_4pesZ{?ninUJ&*o`}|J1p=-xZ(8KO%cLssyDZq5GNoG+9*T% z!>DV)EK)oR6RIs5dEM_VI806u6ft&OBmZSF@`%``|dACI^hj-j1Y4#OQ z>7MBQ*{(er!%cuy`|}F@DaR~dwysq!j|vvlOs$mC{=jJIPx({+lt1N9`BVOs|1aeK Y0Xgqm459OI(f|Me07*qoM6N<$f~1CEj{pDw literal 0 HcmV?d00001 diff --git a/website/BatchGantt1.png b/website/BatchGantt1.png new file mode 100644 index 0000000000000000000000000000000000000000..b35c6dd93a8b713c68b28763f173f86a3eb63712 GIT binary patch literal 20208 zcmV*5Ky<%}P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igZ3 z6%R2!UW04^000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}001BWNkl4XMC2&5A}to*FzcLF%o|BwHMit|_h-6@ZcpvIMoich4! z&?nW-Uwa$sIESeCUOM6bD$XWoo_OMkC)93GQ5z&7P$UVtWDR#dGM5Nz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ijzH!kOky$6{% zel&l0p=?c6I-RR@Ez(zyHf1>_w(%GI+>-@2~r z6ql5dJt&RB6D4G3q_Xe8VJ;hME{j}VQAKKMBHMQC<+fYrV;BaHe)le}xq2%9{P+ue zvVL2rKT0X^ePAf6`(+{Kf(s!8UC?`|?xU#grI@K>e+%?jGOcedna^GKKgkDcKjX=# ze#Ps5dXLGuW4Utbc=mj8kgtvu@XGJsB70CeilU$>3PABsFhS7nwm>0Vbg^yg&S%jbqA_L7c9aGpBVXj(qDRByT z6?g^JT@Y?#1br7F=z_>X^CSUxW3IC~iT>*rYz96BUISL6x&vXhN6-%tf-Z<$OmV*+ zbFqlIKy-Kw>NX|7=><8~p}HHxY>%LyAp~8}H!vqF&A=4*`M}`t8q{HSV+!~hU{}O0 znJ4HM2tgP0O*Bt7FadKpy74U~IgA#aUQA;*u&ZUe8`WJEMwQfuNtzUqiwK0)gO?LkPM+AQ1EugrExq0zp6F{{shAb~=!H RTAly^002ovPDHLkV1i~rAjALw literal 0 HcmV?d00001 diff --git a/website/Evolutionary_algorithm.svg b/website/Evolutionary_algorithm.svg new file mode 100644 index 000000000..489f4424b --- /dev/null +++ b/website/Evolutionary_algorithm.svg @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Evolutionary Computation + 2007-04-02 + + + Johann "nojhan" Dréo + + + i: initialization, f(X): evaluation, ?: stopping criterion, Se: selection, Cr: cross-over, Mu: mutation, Re: replacement, X*: optimu + + + + + + + + + + + + + + + + + Best solution + + + Variation + + + + Stop. criteria? + + + + Initialization + + + + Evaluation + + + + Replacement + + + + Selection + + Parents + Genitors + Offsprings + + diff --git a/website/Gallagher_Gaussian_BBOB_f21.png b/website/Gallagher_Gaussian_BBOB_f21.png new file mode 100644 index 0000000000000000000000000000000000000000..97cca748bb30ae55cb719b7c0fd364c03db7c625 GIT binary patch literal 22721 zcmV*rKt#WZP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01Fc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ws0R|eu68yh>pY#IQ(@Cqg)h?vXI z!PealZ!j41R=UaRnW-oc)iXjP#6T7t96UNYDmZ`lU0b}(P!cE5;laau{jU!4bgN!| z#FEtVUtjL}16R}C_T${~wO&X4W9946-d7NrxFgtuC&%>Ll5U$?0H$Qzw{iz!e*j0e z=NhZFv%Tb$L5qBAtEl~p$N~i!S;fotGk^k*f%p;N;q~?Pf+yh^-0n^REEl(R`&RsL z?ZvRk)gRzaxzpaNvlP?|m>cts$6vlA44KOgq@`LB{K%V`Ta0YOJM6P0$ zSZ*>g8T8T8kxV^k;G(SipNP1Sd!;&X4yD>Iw|UQJUsIDmWF=FuxG$v#AoP9pC` k^(;52`-b-K_&Hotnlok40&lsmz+V`mqM#;UDTfaFA9%2Uj{pDw literal 0 HcmV?d00001 diff --git a/website/Graph_betweenness.svg b/website/Graph_betweenness.svg new file mode 100644 index 000000000..662cb69b8 --- /dev/null +++ b/website/Graph_betweenness.svg @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/eo_ico.png b/website/eo_ico.png new file mode 100644 index 0000000000000000000000000000000000000000..92db090fc081982d19606f538609a1ffa1bf576d GIT binary patch literal 705 zcmV;y0zUnTP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L015v9015vA2h2W300007bV*G`2igZ8 z3=2Bx$@eV)00KctL_t(I%Z<}JXx;@B1@Pbf_p3&Xp)Hc4_7QCj3Ze+om^%1?78fBX ziZ6(dItXrpuFh`apx~egN{0?{D1yZYQTdw2LeW$~)F2AVN1M{LCNZY});9O$3E=A9KOQmI5IIlyiTf(1E#vY+wiusGci-_Rq0Ayi<@x? zKjP_$@!?;f*+6~{vtdE3RMkaXsjUmR2D8PxxDnq>b$ff)74$dHV7f{tF@p0L6i1Xv zt@qP7P;65*CmF=u%~ZEHfcJ15BZ-@$rm-E1%3av3{88+nUae%luWGV`M{onS;&)Z2 zs?7r`Yl)?*+9hVHaVYU-YWu9xi!@9L1S1Ep=Zs=TyF<9v5?D z4Np#t4=*-2jG@RaIG3vDxBR*NnY11)?PEAy$x?B7%8Ig++CMQqd}3n~KftX~9~Gl2 zTg4Vl^N_Zk$2b;oYGQo&!p7(8^y_Q*xRHHfNb1wJ+4RbTW7~f1_mBDytbgNFxA%3C nrp=3I|62ayse49N{15yM?=1@TZ_9Ve00000NkvXXu0mjff>}w? literal 0 HcmV?d00001 diff --git a/website/eo_logo.png b/website/eo_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..257f1b08e7be0e33231031f90e2e8fb45afc1858 GIT binary patch literal 15934 zcmbWeWmwc*)GrJOHy|O6bV#Rkg9t-NH%K=~cY}b^ozl|M-Q5ks(B0i2A@y#b=X`p< zo#Q2PIn3~{wb%O94po$wM0-v68U_XiOY19kVrcG|vDzfk2zK50F-*EJM zM51as|Mbzf!>g&CXDIU3H~6Kmp%nkA=)5nVkF%Dkrjk+DpE-FtKCoGQGIrJYY?D^g zVjj+QHYdY6BIz`q!g1xjdoMiEfZSYuq^YSH5yrbjYhcKhTm^4r$cCQufr+WV3oGP% zAFn1{Rpnbm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kuw11QZXN-5(9iZP{rtyw+*8b@P{3fo1^`j8yJD$- zlEmm%PbHKNNwA|M8H}=dDp<%&@MioeJAufw;weCk(g4YWkys7+Zdq{yu<|!-c01DW z^IH*-S8x5lzFGd<(^caDg@e`9+1Wi4srr`HKGjujj5+Rt#>&t98V+3OWoTNlq~On5 ze?%v+UFv8K_evy_H=O+aHk$tDlMQShwdjW@xbr$Mynhf1OyK0bn;S}lAK?Hi*2_`1 zo&{*hU?DvJ?Fk2u#mrY=eVxSQ1dhzlwTt@%5O5$f778do{!x&xt{xxZ5w4A4UC|xr znP|A^+4~&ngb@)#F8Y4-vZVosMz54S5m&(_PZ7t7?8r5YGvQ6vxG98;@IBa)wdG3q zdcZWbnd7<-1VAGo&wXBp!ynM}lf{U+92)@!qcS{h)HyDM*(VM8Q_SLkUPcQx5K>Js zgcmQ1tzKS4kx`|pf~`60wc$*^>^CYyz0Xq2R=-4CG?3|k6wAcysY>V`y1|M47O+AC zrhg9DG`gAo-_S6jxd0UG)%)@(or;~ooL?Ep5Qm?1nM$4CXrH;-$)i1K*{?AV4o@EYC nW~N + + + + EO logo + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + EO logo + 2010-07-30 + + + nojhan + + + en + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Evolving Objects + + diff --git a/website/eo_logo_fronde.svg b/website/eo_logo_fronde.svg new file mode 100644 index 000000000..a7e3dfab1 --- /dev/null +++ b/website/eo_logo_fronde.svg @@ -0,0 +1,391 @@ + + + + + EO logo + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + EO logo + + 2010-07-30 + + + nojhan + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/fronde.png b/website/fronde.png new file mode 100644 index 0000000000000000000000000000000000000000..c463d8df9076095b254e468d63e9ce8716872d7a GIT binary patch literal 43920 zcmXt9WmJ^i76$1C>F$&U>245^6hvxh>F$zlkP-={yIZ)Zi1mi2yd{joZZ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!yVPqljaJt1@7^q^nn)BH&$kt+{*P3clA^sRxaBKmr- z@_%$M>H??8r>^HhXtBY&)^cay5e}ijvTXXthz@F)n4+35b25&=9gSEyq=-4JdWj=P zY{(?iHRJ@)(PBG4YSJrXSiRz+aq!F=`vg{{m8d|Pvy6P0sQcdbTNPNwULG_+GMYLG=LF4wV+OE8<+h~wT z*%gm@NnsO$!-kgDun;};2T}mb9m1vsvj_P|#;zJVo_B5oZIBNJHZO75NV~4LjgWZ% zQ9|ete0-qIg^55mm$BXSU((Ww7~18d1KLq>$^c3ZKenUaN)W-}u;d%k*tKeK{71#9 z9VioX+9(nI^3yfvIxRBj5Tdd`^iiVRuOG+j6QK2x9;~&#i|%QI{2(XR&$xkNg9znC z+4M>J1}#?z5S8{Tx6`d-PTJmrf@wDzlG`{NI&!bWk{T9=QgwHcQnfM;4xUzD;o+E>t(XQ5MCy+m;sl<5k588kVRhlX6 zPH&!5V1CF$p+lnM0wkb3_kVc=WZuNaK%ggJV)RUb3A$ob%#kqPyXGf^_Yp` zB94VnPT2^QiV$VXm(q*b83 zcFT>73tBS-%2J$0j_k3mSF$;Gp-`R9ovBw90#34j`5=- zEy$=M`}Y={+2BJ`zj;K|RpPCjc756U#&dd1LEA_pi);7@=9=S}16a zsuPsa9K#pcRp=TG#UH8CgVv;+FT#{Qa#b*a*F#ZH{#*S+%x`djh9dr#=us^yNM{J^ z)g9khPrZ_>g+WnSy3&44eH_KzdSSKN@SaBjPx!!HmPzEllI4lrx~|NlQ|9YSw_Io;zZXuub_ROp^8d})MDyCN=K%NYIQBE0|sKh=9$%9ToH Gxc>*Gy<1fP literal 0 HcmV?d00001 diff --git a/website/index.html b/website/index.html new file mode 100644 index 000000000..39d74515d --- /dev/null +++ b/website/index.html @@ -0,0 +1,449 @@ + + + + + + + + + + + + + + + + Evolving Objects (EO): Evolutionary Computation Framework + + + + + + + +

    + Evolving Objects logo + +
    + +
    + + +

    Evolving Objects (EO): an Evolutionary Computation Framework

    +

    EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast.

    + +
    We have lost all the mailing-list subscriptions in a crash, please subscribe again on the eodev-main subscription page.
    + +

    Evolutionary algorithms forms a family of algorithms inspired by the theory of evolution, that solve various problems. + They evolve a set of solutions to a given problem, in order to produce the best results. + These are stochastic algorithms, because they iteratively use random processes. + The vast majority of these methods are used to solve optimization problems, and may be also called "metaheuristics". + They are also ranked among computational intelligence methods, a domain close to artificial intelligence. +

    + +

    + + + +

    + +

    With the help of EO, you can easily design evolutionary algorithms that will find solutions to virtually all kind of hard optimization problems, from continuous to combinatorial ones.

    + +

    Features

    + +

    Component-based framework

    + +

    Designing an algorithm with EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks.

    +

    If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution).

    +

    If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in EO.

    +

    + + +

    Main Features

    + +
      +
    • Flexible design that permits to easily create virtually any algorithm
    • +
    • Solution representation for continuous and combinatorial problems: +
        +
      • binary-strings,
      • +
      • permutations,
      • +
      • vectors,
      • +
      • easily write your own,
      • +
      • …
      • +
      +
    • +
    • Several algorithm paradigms: +
        +
      • evolution strategies,
      • +
      • genetic algorithms,
      • +
      • estimation of distribution,
      • +
      • particle swarm optimization
      • +
      • …
      • +
      +
    • +
    • Many selection and replacement operators: +
        +
      • rank-based,
      • +
      • deterministic or stochastic tournaments,
      • +
      • roulette,
      • +
      • elitism,
      • +
      • …
      • +
      +
    • +
    • Ready-to-use variations operators: +
        +
      • uniform initializer, +
      • gaussian mutation, +
      • subtree crossover, +
      • …
      • +
      +
    • +
    • Easy combination of several operators: +
        +
      • proportional combination,
      • +
      • sequential call,
      • +
      • …
      • +
      +
    • +
    • Portable and human-readable parameter files
    • +
    • Suspend and load population from files
    • +
    • Versatile checkpointing and logging: +
        +
      • graphical display,
      • +
      • file dump,
      • +
      • various statistics,
      • +
      • signal catching,
      • +
      • …
      • +
      +
    • +
    • Mersenne Twister random number generator (and various distributions)
    • +
    • No useless computation (sparing fitness call, functor-based calls)
    • +
    • Fast running speed, thanks to C++
    • +
    • And more!
    • +
    + +

    Portability

    +

    EO should work on Windows and any Un*x-like operating system with a + standard-conforming C++ development system.

    + +

    Recent versions of EO have been tested on the following platforms: +

    + +
      +
    • Linux x86 with GCC 3.x and 4.x
    • +
    • Linux x86_64 with GCC 3.x and GCC 4.x
    • +
    • MacOS X/Darwin PowerPC with GCC 3.x
    • +
    • MacOS X/Darwin x86 with GCC 4.x
    • +
    • Microsoft Windows using Cygwin's GCC 3.x (cygming special). +
    • Microsoft Windows using Visual Studio 2003/2005; projects files + are provided.
    • +
    • Solaris SPARC with GCC 3.x
    • +
    • Solaris x86 with GCC 3.x
    • +
    + +

    Recent versions of EO uses the CMake portable build system, that permits to easily generate a build chain for your environment.

    + +

    If you have tested EO on a system not listed here, please let + us know.

    + +

    If you are working on a system with an older C++ compiler there + is a good chance that eo-0.9.3z.1 works. It is tested on Linux + with gcc-2.9x and several systems (IRIX, Solaris) with egcs.

    + + +

    Presentations

    + +

    A functional and "philosophical" overview of EO was presented at EA'01 conference. + You can download the paper + or the + slides.

    + +

    A PowerPoint presentation shows the EO philosophy, and + it includes a Visual Basic macro for evolving objects in Visual Basic + for Applications.

    + +

    EO is described in the following scientific article:
    + M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, + "Evolving + objects: A general purpose evolutionary computation + library", Artificial Evolution, 2310, 829--888 (2002).

    + +

    + +@Article{Keijzer2001,
    +  title =     "Evolving Objects: A General Purpose Evolutionary Computation Library ",
    +  author =    "Maarten Keijzer and J. J. Merelo and G. Romero and M. Schoenauer",
    +  journal =   "Artificial Evolution",
    +  year =      "2002",
    +  volume =    "2310",
    +  pages =     "829--888",
    +  keywords =  "genetic algorithms, genetic programming, evolutionary computation, metaheuristic, computational intelligence, optimization",
    +  URL =       "http://www.lri.fr/~marc/EO/EO-EA01.ps.gz",
    +  size =      "12 pages",
    +  abstract =  "This paper presents the evolving objects library
    +                 (EOlib), an object-oriented framework for evolutionary
    +                 computation (EC) that aims to provide a flexible set of
    +                 classes to build EC applications. EOlib design
    +                 objective is to be able to evolve any object in which
    +                 fitness makes sense.",
    +}
    +
    +
    +

    + + + + + +

    Code

    + +

    License

    + +

    EO is distributed under the + + GNU Lesser General Public License.

    + +

    Note that this license places copyleft restrictions on a program created with EO, but does not apply these restrictions to other software that would links with the program.

    + +

    Download

    + +

    The current stable release is EO 1.0. + It supports any standard-compliant C++ compiler.

    + +

    You can obtain the latest version directly via GIT + or browse the repository online. + +

    + +

    All releases can be obtained from the SourceForge download + area.

    + + +

    Documentation

    + +

    The tutorial demonstrates that writing an evolutionary algorithm + evolving your own structures is now easy, using ready-to-use + template files. Although the tutorial has not been upgraded for some + time now and refers to version 0.9.2 of EO, it nevertheless remains the + best way to dive into EO. You can start by trying it on-line at LRI + or SourceForge, + before downloading it. The + tutorial is also included in the released + sources.

    + +

    The latest tutorial + release. +

    + +

    The complete code is also well documented and you can look at the + generated interface + documentation.

    + +

    The easiest way to create a complete new EO-project, even for new + genomes, is to use the script provided in tutorial/Templates/; see + the README in that directory and lesson 5 of the tutorial for + detail.

    + +

    Facts

    + +

    Those statistics are automatically generated by ohloh.net, directly from the EO source code.

    + + + + + + + + + + +
    + + + +

    Development

    + +

    Mailing-lists

    + +

    EO is an open development effort; that is why we have + created mailing lists to discuss future developments, solve technical + problems, announce releases, publish patches, and discuss evolutionary + computation in general. Browse the archives or join the EO mailing lists.

    + + +

    Get involved

    + +

    The following resources are available, thanks to sourceforge

    + + +

    Related software

    + +

    ParadisEO provides EO extensions for + the flexible design of single solution-based metaheuristics, + metaheuristics for multi objective optimization as well as hybrid, parallel and distributed + metaheuristics.

    + +

    DegaX is an ActiveX control which embeds EO 0.8.4. +

    + + +

    Authors

    + +

    EO was started by the Geneura + Team at the University of Granada, headed by Juan Julián Merelo. The original Web site is also the only place where you + will find old releases of EO (up to 0.8.7), but beware that it is not + compatible at all with the current version.

    + +

    The developement team has then been reinforced by Maarten Keijzer, the C++ + wizzard, and Marc Schoenauer. + Later came Jeroen + Eggermont, who, among other things, did a lot of work on GP, + INRIA Dolphin Team, Olivier König, who did a + lot of useful additions and cleaning of the code and Jochen Küpper, working on + infrastructure maintenance.

    + + +

    Links

    + + + +
    + + + + + + + + + diff --git a/website/lightblue.css b/website/lightblue.css new file mode 100644 index 000000000..6a6f6111f --- /dev/null +++ b/website/lightblue.css @@ -0,0 +1,253 @@ +/*************************************************************************** +* * +* contented3 - An open source xhtml/css website template by Contented * +* Designs. You're free to modify it and use it for any purpose without * +* cost or obligation. We'd prefer that you leave the link to our website * +* in the footer but it's not required. * +* * +* If you have comments or questions, please contact us at * +* http://www.ContentedDesigns.com. Thanks! * +* * +***************************************************************************/ + +* { + padding:0px; + margin:0px; +} + +html { +} + +body { + color: #333333; + font-family:Arial, sans-serif; + font-size:0.83em; + + background-image:url("fronde.png"); + background-repeat:no-repeat; + background-position:bottom left; +} + +#alt { + float:left; + width:20%; + text-align:center; + margin-right:2%; +} + +ul.shortcuts { + text-align:left; +} + +ul.badges { + list-style-type:none; +} + +ul.badges li { + margin-left:0px; + margin-top:0.1em; +} + +#menu { + padding:0.5em; +} + +#main { + float:right; + width:78%; +} + +h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, +fieldset, address { margin:0.75em 0;} + +h1 { + font-size:1.67em; + border-bottom:thin solid lightgray; + margin-top:2em; +} + +h2 {font-size:1.39em;} + +h3 {font-size:1.2em;} + +h4 {font-size:1em;} + +li, dd { + margin-left:2em; +} + +table > caption { + font-weight:bold; +} + +table { + padding:0.5em; + border:thin solid lightgray; + border-left:0.2em solid #3366CC; +} + +a { + color: #3366CC; + /*background-color: #FFFFFF;*/ + font-weight: normal; + text-decoration: none; + outline:none; +} + +a:hover { + color: #0033CC; + /*background-color: #FFFFFF;*/ + font-weight: normal; + text-decoration: underline; +} + + +#appendix { + background:url("Purine_Nucleoside_Phosphorylase_small.jpg"); + background-repeat:no-repeat; + background-position:top right; +} + +#title { + color:#3366CC; + /*background-color:#FFFFFF;*/ + font-size:3em; + font-weight:bold; + margin:0px 0px 10px 0px; + float:left; +} + +#slogan { + color: #88f; + /*background-color:#FFFFFF;*/ + font-size:small; + font-weight:normal; + font-style:italic; + padding:18px 0px 0px 50px; + float:left; + margin:0px 0px 10px 0px; +} + +ul#login { + margin:0px; + padding:0px; + list-style: none; + position:absolute; + top:0px; + right:1em; +} + +ul#login li { + display:inline; +} + +ul#menu { + clear:both; + margin: 0; + padding: 0; + list-style: none; + /*width:650px;*/ +} + +ul#menu li { + margin: 0; + padding:0; + float: left; + width:16.5%; + text-align: center; +} + +ul#menu li a { + display: block; + font-size: small; + color: #FFFFFF; + font-weight: bold; + text-decoration: none; + background: #5588CC; + padding: 2px 0px 2px 0px; + padding: 0em 1em 0em 1em; +} + +ul#menu li a:hover { background: #3366CC; color: #FFFFFF; } +ul#menu a.selected:link { background: #3366CC; color: #FFFFFF; } +ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } + +#page { + font-size:1.0em; + padding:1em; + margin:1em; + /*width:650px; + float:left;*/ + clear:left; +} + + +#foot { + color:#000000; + background-color:#FFFFFF; + border-top:1px solid #0033CC; + font-size:80%; + /*line-height:1.5em;*/ + /*width: 650px;*/ + clear:both; +} + +#foot a { + color:#3366CC; + background-color:#FFFFFF; + text-decoration: none; +} + +#foot a:hover { + color:#0033CC; + background-color:#FFFFFF; + font-weight: normal; + text-decoration: underline; +} + +#copyright { + color:#000000; + background-color:#FFFFFF; + padding:5px 20px 5px 0px; + float:left; +} + +#contact { + color:#0033CC; + background-color:#FFFFFF; + padding:5px 0px 5px 0px; + float:right; +} + + +.table_form_title { + font-weight:bold; +} + + .table_form_label { + text-align:right; + padding-right:1em; + } + +.table_form_submit { + text-align:center; +} + +.figure { + float:right; + text-align:center; + margin:1em; + padding:5px; + border:thin solid #eee; +} + +.legend { + font-style:italic; + font-size:80%; +} + +#ohloh_stats { + text-align:left; + font-weight:normal; + font-style:italic; +} From 535b26b903abf89ce466ef675686475e6b3505a0 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 31 Jul 2010 22:06:27 +0200 Subject: [PATCH 1471/2134] slides via slideshare, better section order, small design changes --- website/index.html | 75 +++++++++++++++++++++++-------------------- website/lightblue.css | 4 +++ 2 files changed, 44 insertions(+), 35 deletions(-) diff --git a/website/index.html b/website/index.html index 39d74515d..26618862b 100644 --- a/website/index.html +++ b/website/index.html @@ -26,15 +26,15 @@ Evolving Objects logo @@ -129,6 +129,8 @@

    Main Features

    + +
    • Flexible design that permits to easily create virtually any algorithm
    • Solution representation for continuous and combinatorial problems: @@ -227,18 +229,22 @@ You can download the paper or the - slides.

      + slides, or browse them right here:

      -

      A PowerPoint presentation shows the EO philosophy, and - it includes a Visual Basic macro for evolving objects in Visual Basic +

      + + +

      You can also read this + PowerPoint presentation, that shows the EO philosophy. + It includes a Visual Basic macro for evolving objects in Visual Basic for Applications.

      EO is described in the following scientific article:
      - M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, +

      M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, "Evolving objects: A general purpose evolutionary computation - library", Artificial Evolution, 2310, 829--888 (2002).

      + library", Artificial Evolution, 2310, 829--888 (2002).
      +

      @@ -262,7 +268,6 @@

      - +

      Code ⤒

      -

      Code

      Download

      The current stable release is -

      Development

      +

      Development ⤒

      Mailing-lists

      From 6c4bdcff461d4f69ed6afd4a965df42385d62a1e Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 31 Jul 2010 22:48:49 +0200 Subject: [PATCH 1474/2134] correct layout in 1024, better spacing for greater resolutions --- website/lightblue.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/lightblue.css b/website/lightblue.css index 825a20a9e..67442f4c6 100644 --- a/website/lightblue.css +++ b/website/lightblue.css @@ -32,7 +32,7 @@ body { float:left; width:20%; text-align:center; - margin-right:2%; + margin-right:5%; } ul.shortcuts { @@ -54,7 +54,7 @@ ul.badges li { #main { float:right; - width:78%; + width:75%; } blockquote { From 9a5871cce26722098306198849d037c1b2ade800 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 31 Jul 2010 23:00:10 +0200 Subject: [PATCH 1475/2134] better layout for the menu --- website/index.html | 28 +++++++++++++++++----------- website/lightblue.css | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/website/index.html b/website/index.html index 109e9bd30..1a2f30ed2 100644 --- a/website/index.html +++ b/website/index.html @@ -24,15 +24,26 @@
        @@ -123,7 +148,7 @@

        Features ⤒

        -

        Component-based framework

        +

        Component-based framework

        Designing an algorithm with EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks.

        If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution).

        @@ -131,7 +156,7 @@

        -

        Main Features

        +

        Main Features

        @@ -210,7 +235,7 @@
      • And more!
      -

      Portability

      +

      Portability

      EO should work on Windows and any Un*x-like operating system with a standard-conforming C++ development system.

      @@ -240,7 +265,7 @@ with gcc-2.9x and several systems (IRIX, Solaris) with egcs.

      -

      Presentations

      +

      Presentations

      A functional and "philosophical" overview of EO was presented at EA'01 conference. @@ -304,7 +329,7 @@

      Code ⤒

      -

      Download

      +

      Download

      The current stable release is EO 1.0. @@ -321,7 +346,7 @@ href="http://sourceforge.net/project/showfiles.php?group_id=9775">download area.

      -

      Facts

      +

      Facts

      Those statistics are automatically generated by ohloh.net, directly from the EO source code.

      @@ -338,7 +363,7 @@ -

      License

      +

      License

      EO is distributed under the @@ -347,7 +372,7 @@

      Note that this license places copyleft restrictions on a program created with EO, but does not apply these restrictions to other software that would links with the program.

      -

      Documentation

      +

      Documentation

      The tutorial demonstrates that writing an evolutionary algorithm evolving your own structures is now easy, using ready-to-use @@ -380,7 +405,7 @@

      Development ⤒

      -

      Mailing-lists

      +

      Mailing-lists

      EO is an open development effort; that is why we have created mailing lists to discuss future developments, solve technical @@ -389,7 +414,7 @@ href="http://sourceforge.net/mail/?group_id=9775">EO mailing lists.

      -

      Get involved

      +

      Get involved

      The following resources are available, thanks to sourceforge

      -

      Related software

      +

      Related software

      ParadisEO provides EO extensions for @@ -422,7 +447,7 @@

      -

      Authors

      +

      Authors

      EO was started by the Geneura Team at the University of Granada, headed by -

      Links

      +

      Links

      • The Hitch-Hiker's Guide to Evolutionary Computation, FAQ for comp.ai.genetic.
      • From 0c5545c421d0ab996b1b8610849f06c5c08634c5 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 23 Aug 2010 15:56:58 +0200 Subject: [PATCH 1509/2134] + plot populations by generation - removed dump from doEDASA --- application/eda_sa/main.cpp | 86 ++++++++++++---- src/do | 3 + src/doEDASA.h | 196 ++---------------------------------- src/doFileSnapshot.cpp | 119 ++++++++++++++++++++++ src/doFileSnapshot.h | 189 ++++++---------------------------- src/doPopStat.h | 75 ++++++++++++++ 6 files changed, 299 insertions(+), 369 deletions(-) create mode 100644 src/doFileSnapshot.cpp create mode 100644 src/doPopStat.h diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index e689d936e..b362529ca 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -24,18 +24,19 @@ int main(int ac, char** av) { eoParserLogger parser(ac, av); - // Letters used by the following declarations : + // Letters used by the following declarations: // a d i p t std::string section("Algorithm parameters"); - // FIXME: a verifier la valeur par defaut + // FIXME: default value to check double initial_temperature = parser.createParam((double)10e5, "temperature", "Initial temperature", 'i', section).value(); // i eoState state; + //----------------------------------------------------------------------------- - // Instantiate all need parameters for EDASA algorithm + // Instantiate all needed parameters for EDASA algorithm //----------------------------------------------------------------------------- eoSelect< EOT >* selector = new eoDetSelect< EOT >(0.5); @@ -81,10 +82,10 @@ int main(int ac, char** av) // (1) Population init and sampler //----------------------------------------------------------------------------- - // Generation of population from do_make_pop (creates parameter, manages persistance and so on...) - // ... and creates the parameter letters: L P r S + // Generation of population from do_make_pop (creates parameters, manages persistance and so on...) + // ... and creates the parameters: L P r S - // this first sampler creates a uniform distribution independently of our distribution (it doesnot use doUniform). + // this first sampler creates a uniform distribution independently from our distribution (it does not use doUniform). eoPop< EOT >& pop = do_make_pop(parser, state, *init); @@ -100,18 +101,37 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- + // Prepare bounder class to set bounds of sampling. + // This is used by doSampler. + //----------------------------------------------------------------------------- + + //doBounder< EOT >* bounder = new doBounderNo< EOT >(); doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); state.storeFunctor(bounder); + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare sampler class with a specific distribution + //----------------------------------------------------------------------------- + doSampler< Distrib >* sampler = //new doSamplerUniform< EOT >(); //new doSamplerNormalMono< EOT >( *bounder ); new doSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Metropolis sample parameters + //----------------------------------------------------------------------------- // FIXME: should I set the default value of rho to pop size ?!? @@ -120,42 +140,63 @@ int main(int ac, char** av) moGenSolContinue< EOT >* sa_continue = new moGenSolContinue< EOT >(rho); state.storeFunctor(sa_continue); + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // SA parameters + //----------------------------------------------------------------------------- + double threshold = parser.createParam((double)0.1, "threshold", "Threshold: temperature threshold stopping criteria", 't', section).value(); // t double alpha = parser.createParam((double)0.1, "alpha", "Alpha: temperature dicrease rate", 'a', section).value(); // a moCoolingSchedule* cooling_schedule = new moGeometricCoolingSchedule(threshold, alpha); state.storeFunctor(cooling_schedule); + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- // stopping criteria // ... and creates the parameter letters: C E g G s T + //----------------------------------------------------------------------------- eoContinue< EOT >& eo_continue = do_make_continue(parser, state, eval); - // output + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // general output + //----------------------------------------------------------------------------- eoCheckPoint< EOT >& monitoring_continue = do_make_checkpoint(parser, state, eval, eo_continue); - // eoPopStat< EOT >* popStat = new eoPopStat; - // state.storeFunctor(popStat); + //----------------------------------------------------------------------------- - // checkpoint.add(*popStat); - // eoGnuplot1DMonitor* gnuplot = new eoGnuplot1DMonitor("gnuplot.txt"); - // state.storeFunctor(gnuplot); + //----------------------------------------------------------------------------- + // population output + //----------------------------------------------------------------------------- - // gnuplot->add(eval); - // gnuplot->add(*popStat); + eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( eo_continue ); + state.storeFunctor(pop_continue); - //gnuplot->gnuplotCommand("set yrange [0:500]"); + doPopStat< EOT >* popStat = new doPopStat; + state.storeFunctor(popStat); + pop_continue->add(*popStat); - // checkpoint.add(*gnuplot); + doFileSnapshot* fileSnapshot = new doFileSnapshot("ResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue->add(*fileSnapshot); - // eoMonitor* fileSnapshot = new doFileSnapshot< std::vector< std::string > >("ResPop"); - // state.storeFunctor(fileSnapshot); + //----------------------------------------------------------------------------- - // fileSnapshot->add(*popStat); - // checkpoint.add(*fileSnapshot); + //----------------------------------------------------------------------------- + // distribution output + //----------------------------------------------------------------------------- doDummyContinue< Distrib >* dummy_continue = new doDummyContinue< Distrib >(); state.storeFunctor(dummy_continue); @@ -178,6 +219,9 @@ int main(int ac, char** av) file_monitor->add(*distrib_stat); distribution_continue->add( *file_monitor ); + //----------------------------------------------------------------------------- + + //----------------------------------------------------------------------------- // eoEPRemplacement causes the using of the current and previous // sample for sampling. @@ -200,7 +244,7 @@ int main(int ac, char** av) doAlgo< Distrib >* algo = new doEDASA< Distrib > (*selector, *estimator, *selectone, *modifier, *sampler, - monitoring_continue, *distribution_continue, + monitoring_continue, *pop_continue, *distribution_continue, eval, *sa_continue, *cooling_schedule, initial_temperature, *replacor); diff --git a/src/do b/src/do index 74df1ca13..e96262c97 100644 --- a/src/do +++ b/src/do @@ -48,4 +48,7 @@ #include "doStatNormalMono.h" #include "doStatNormalMulti.h" +#include "doFileSnapshot.h" +#include "doPopStat.h" + #endif // !_do_ diff --git a/src/doEDASA.h b/src/doEDASA.h index 35cec339c..25fc5e5d7 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -8,29 +8,6 @@ #ifndef _doEDASA_h #define _doEDASA_h -//----------------------------------------------------------------------------- -// Temporary solution to store populations state at each iteration for plotting. -//----------------------------------------------------------------------------- - -// system header inclusion -#include -// end system header inclusion - -// mkdir headers inclusion -#include -#include -// end mkdir headers inclusion - -#include -#include - -#include - -#include -#include - -//----------------------------------------------------------------------------- - #include #include @@ -44,8 +21,6 @@ #include "doStat.h" #include "doContinue.h" -using namespace boost::numeric::ublas; - template < typename D > class doEDASA : public doAlgo< D > { @@ -82,6 +57,7 @@ public: doModifierMass< D > & modifier, doSampler< D > & sampler, eoContinue< EOT > & monitoring_continue, + eoContinue< EOT > & pop_continue, doContinue< D > & distribution_continue, eoEvalFunc < EOT > & evaluation, moSolContinue < EOT > & sa_continue, @@ -95,53 +71,14 @@ public: _modifier(modifier), _sampler(sampler), _monitoring_continue(monitoring_continue), + _pop_continue(pop_continue), _distribution_continue(distribution_continue), _evaluation(evaluation), _sa_continue(sa_continue), _cooling_schedule(cooling_schedule), _initial_temperature(initial_temperature), - _replacor(replacor), - - _pop_results_destination("ResPop")//, - - // directory where populations state are going to be stored. - // _ofs_params("ResParams.txt"), - // _ofs_params_var("ResVars.txt"), - - // _bounds_results_destination("ResBounds") - { - - //------------------------------------------------------------- - // Temporary solution to store populations state at each - // iteration for plotting. - //------------------------------------------------------------- - - { - std::stringstream os; - os << "rm -rf " << _pop_results_destination; - ::system(os.str().c_str()); - } - - ::mkdir(_pop_results_destination.c_str(), 0755); // create a first time - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Temporary solution to store bounds values for each distribution. - //------------------------------------------------------------- - - // { - // std::stringstream os; - // os << "rm -rf " << _bounds_results_destination; - // ::system(os.str().c_str()); - // } - - //::mkdir(_bounds_results_destination.c_str(), 0755); // create once directory - - //------------------------------------------------------------- - - } + _replacor(replacor) + {} //! function that launches the EDASA algorithm. /*! @@ -150,7 +87,6 @@ public: \param pop A population to improve. \return TRUE. */ - //bool operator ()(eoPop< EOT > & pop) void operator ()(eoPop< EOT > & pop) { assert(pop.size() > 0); @@ -162,16 +98,6 @@ public: eoPop< EOT > selected_pop; - //------------------------------------------------------------- - // Temporary solution used by plot to enumerate iterations in - // several files. - //------------------------------------------------------------- - - int number_of_iterations = 0; - - //------------------------------------------------------------- - - //------------------------------------------------------------- // Estimating a first time the distribution parameter thanks // to population. @@ -185,22 +111,6 @@ public: //------------------------------------------------------------- - // { - // D distrib = _estimator(pop); - - // double size = distrib.size(); - // assert(size > 0); - - // doHyperVolume< EOT > hv; - - // for (int i = 0; i < size; ++i) - // { - // //hv.update( distrib.varcovar()[i] ); - // } - - // // _ofs_params_var << hv << std::endl; - // } - do { if (pop != current_pop) @@ -283,102 +193,10 @@ public: } while ( _sa_continue( current_solution) ); - - //------------------------------------------------------------- - // Temporary solution to store populations state - // at each iteration for plotting. - //------------------------------------------------------------- - - { - std::ostringstream os; - os << _pop_results_destination << "/" << number_of_iterations; - std::ofstream ofs(os.str().c_str()); - ofs << current_pop; - } - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Temporary solution used by plot to enumerate iterations in - // several files. - //------------------------------------------------------------- - - // { - // double size = distrib.size(); - - // assert(size > 0); - - // std::stringstream os; - // os << _bounds_results_destination << "/" << number_of_iterations; - // std::ofstream ofs(os.str().c_str()); - - // ofs << size << " "; - //ublas::vector< AtomType > mean = distrib.mean(); - //std::copy(mean.begin(), mean.end(), std::ostream_iterator< double >(ofs, " ")); - //std::copy(distrib.varcovar().begin(), distrib.varcovar().end(), std::ostream_iterator< double >(ofs, " ")); - // ofs << std::endl; - // } - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Temporary saving to get a proof for distribution bounds - // dicreasement - //------------------------------------------------------------- - - // { - // double size = distrib.size(); - // assert(size > 0); - - // vector< double > vmin(size); - // vector< double > vmax(size); - - // std::copy(distrib.param(0).begin(), distrib.param(0).end(), vmin.begin()); - // std::copy(distrib.param(1).begin(), distrib.param(1).end(), vmax.begin()); - - // vector< double > vrange = vmax - vmin; - - // doHyperVolume hv; - - // for (int i = 0, size = vrange.size(); i < size; ++i) - // { - // hv.update( vrange(i) ); - // } - - // ofs_params << hv << std::endl; - // } - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Temporary saving to get a proof for distribution bounds - // dicreasement - //------------------------------------------------------------- - - // { - // double size = distrib.size(); - // assert(size > 0); - - // doHyperVolume< EOT > hv; - - // for (int i = 0; i < size; ++i) - // { - // //hv.update( distrib.varcovar()[i] ); - // } - - // //_ofs_params_var << hv << std::endl; - // } - - //------------------------------------------------------------- - - ++number_of_iterations; - } while ( _cooling_schedule( temperature ) && _distribution_continue( distrib ) && + _pop_continue( current_pop ) && _monitoring_continue( selected_pop ) ); } @@ -403,6 +221,9 @@ private: //! A EOT monitoring continuator eoContinue < EOT > & _monitoring_continue; + //! A EOT population continuator + eoContinue < EOT > & _pop_continue; + //! A D continuator doContinue < D > & _distribution_continue; @@ -426,7 +247,6 @@ private: // iteration for plotting. //------------------------------------------------------------- - std::string _pop_results_destination; // std::ofstream _ofs_params; // std::ofstream _ofs_params_var; diff --git a/src/doFileSnapshot.cpp b/src/doFileSnapshot.cpp new file mode 100644 index 000000000..0bda8ea6f --- /dev/null +++ b/src/doFileSnapshot.cpp @@ -0,0 +1,119 @@ +//----------------------------------------------------------------------------- +// doFileSnapshot.cpp +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann Dreo + Caner Candan + */ +//----------------------------------------------------------------------------- + +#include +#include +#include + +#include +#include +#include + +doFileSnapshot::doFileSnapshot(std::string dirname, + unsigned int frequency /*= 1*/, + std::string filename /*= "gen"*/, + std::string delim /*= " "*/, + unsigned int counter /*= 0*/, + bool rmFiles /*= true*/) + : _dirname(dirname), _frequency(frequency), + _filename(filename), _delim(delim), + _counter(counter), _boolChanged(true) +{ + std::string s = "test -d " + _dirname; + + int res = system(s.c_str()); + + // test for (unlikely) errors + + if ( (res == -1) || (res == 127) ) + { + throw std::runtime_error("Problem executing test of dir in eoFileSnapshot"); + } + + // now make sure there is a dir without any genXXX file in it + if (res) // no dir present + { + s = std::string("mkdir ") + _dirname; + } + else if (!res && rmFiles) + { + s = std::string("/bin/rm ") + _dirname+ "/" + _filename + "*"; + } + else + { + s = " "; + } + + int dummy; + dummy = system(s.c_str()); + // all done +} + + +void doFileSnapshot::setCurrentFileName() +{ + std::ostringstream oscount; + oscount << _counter; + _currentFileName = _dirname + "/" + _filename + oscount.str(); +} + +eoMonitor& doFileSnapshot::operator()(void) +{ + if (_counter % _frequency) + { + _boolChanged = false; // subclass with gnuplot will do nothing + _counter++; + return (*this); + } + _counter++; + _boolChanged = true; + setCurrentFileName(); + std::ofstream os(_currentFileName.c_str()); + + if (!os) + { + std::string str = "doFileSnapshot: Could not open " + _currentFileName; + throw std::runtime_error(str); + } + + return operator()(os); +} + +eoMonitor& doFileSnapshot::operator()(std::ostream& os) +{ + iterator it = vec.begin(); + + os << (*it)->getValue(); + + for ( ++it; it != vec.end(); ++it ) + { + os << _delim.c_str() << (*it)->getValue(); + } + + os << '\n'; + + return *this; +} diff --git a/src/doFileSnapshot.h b/src/doFileSnapshot.h index def9efc27..9329eed97 100644 --- a/src/doFileSnapshot.h +++ b/src/doFileSnapshot.h @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// eoFileSnapshot.h +// doFileSnapshot.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 /* This library is free software; you can redistribute it and/or @@ -19,182 +19,51 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk - Caner Candan caner@candan.fr - Johann Dréo nojhan@gmail.com + Johann Dreo + Caner Candan */ //----------------------------------------------------------------------------- #ifndef _doFileSnapshot_h #define _doFileSnapshot_h -#include // for mkdir -#include // for mkdir -#include // for unlink - -#include -#include #include +#include +#include -#include -#include -#include +#include "utils/eoMonitor.h" -#include - -/** -Prints snapshots of fitnesses to a (new) file every N generations - -Assumes that the parameters that are passed to the monitor -(method add in eoMonitor.h) are eoValueParam > of same size. - -A dir is created and one file per snapshot is created there - -so you can later generate a movie! - -TODO: The counter is handled internally, but this should be changed -so that you can pass e.g. an evalcounter (minor) - -I failed to templatize everything so that it can handle eoParam > -for any type T, simply calling their getValue method ... -*/ - -template < typename EOTParam > class doFileSnapshot : public eoMonitor { -public : - doFileSnapshot(std::string _dirname, unsigned _frequency = 1, - std::string _filename = "gen", - std::string _delim = " ", unsigned _counter = 0, - bool _rmFiles = true): - dirname(_dirname), frequency(_frequency), - filename(_filename), delim(_delim), counter(_counter), boolChanged(true) - { - // FIXME START - // TO REPLACE test command by somethink more gernerical +public: - std::string s = "test -d " + dirname; + doFileSnapshot(std::string dirname, + unsigned int frequency = 1, + std::string filename = "gen", + std::string delim = " ", + unsigned int counter = 0, + bool rmFiles = true); - int res = system(s.c_str()); - // test for (unlikely) errors - if ( (res==-1) || (res==127) ) - throw std::runtime_error("Problem executing test of dir in eoFileSnapshot"); + virtual bool hasChanged() {return _boolChanged;} + virtual std::string getDirName() { return _dirname; } + virtual unsigned int getCounter() { return _counter; } + virtual const std::string baseFileName() { return _filename;} + std::string getFileName() {return _currentFileName;} - // FIXME END + void setCurrentFileName(); - // now make sure there is a dir without any genXXX file in it - if (res) // no dir present - { - ::mkdir(dirname.c_str(), 0755); - } - else if (!res && _rmFiles) - { - std::string s = dirname+ "/" + filename + "*"; - ::unlink(s.c_str()); - } - } + virtual eoMonitor& operator()(void); - /** accessor: has something changed (for gnuplot subclass) - */ - virtual bool hasChanged() {return boolChanged;} - - /** accessor to the counter: needed by the gnuplot subclass - */ - unsigned getCounter() {return counter;} - - /** accessor to the current filename: needed by the gnuplot subclass - */ - std::string getFileName() {return currentFileName;} - - /** sets the current filename depending on the counter - */ - void setCurrentFileName() - { - std::ostringstream oscount; - oscount << counter; - currentFileName = dirname + "/" + filename + oscount.str(); - } - - /** The operator(void): opens the std::ostream and calls the write method - */ - eoMonitor& operator()(void) - { - if (counter % frequency) - { - boolChanged = false; // subclass with gnuplot will do nothing - counter++; - return (*this); - } - counter++; - boolChanged = true; - setCurrentFileName(); - std::ofstream os(currentFileName.c_str()); - - if (!os) - { - std::string str = "eoFileSnapshot: Could not open " + currentFileName; - throw std::runtime_error(str); - } - - return operator()(os); - } - - /** The operator(): write on an std::ostream - */ - eoMonitor& operator()(std::ostream& _os) - { - const eoValueParam< EOTParam > * ptParam = - static_cast< const eoValueParam< EOTParam >* >(vec[0]); - - EOTParam v(ptParam->value()); - if (vec.size() == 1) // only one std::vector: -> add number in front - { - eo::log << "I am here..." << std::endl; - - for (unsigned k=0; k vv(vec.size()); - vv[0]=v; - for (unsigned i=1; i* >(vec[1]); - vv[i] = ptParam->value(); - if (vv[i].size() != v.size()) - throw std::runtime_error("Dimension error in eoSnapshotMonitor"); - } - for (unsigned k=0; k + Caner Candan + */ +//----------------------------------------------------------------------------- + +/** WARNING: this file contains 2 classes: + +eoPopString and eoSortedPopString + +that transform the population into a std::string +that can be used to dump to the screen +*/ + +#ifndef _doPopStat_h +#define _doPopStat_h + +#include + + +/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. +This snippet is a workaround: +This class will "print" a whole population into a std::string - that you can later +send to any stream +This is the plain version - see eoPopString for the Sorted version + +Note: this Stat should probably be used only within eoStdOutMonitor, and not +inside an eoFileMonitor, as the eoState construct will work much better there. +*/ +template +class doPopStat : public eoStat +{ +public: + + using eoStat::value; + + /** default Ctor, void std::string by default, as it appears + on the description line once at beginning of evolution. and + is meaningless there. _howMany defaults to 0, that is, the whole + population*/ + doPopStat(std::string _desc ="") + : eoStat("", _desc) {} + + /** Fills the value() of the eoParam with the dump of the population. */ + void operator()(const eoPop& _pop) + { + std::ostringstream os; + os << _pop; + value() = os.str(); + } +}; + +#endif // !_doPopStat_h From 7cfd111468fc694f6f0314d3d10f45a18be07495 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 23 Aug 2010 16:14:02 +0200 Subject: [PATCH 1510/2134] a C header include missed --- src/doFileSnapshot.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doFileSnapshot.cpp b/src/doFileSnapshot.cpp index 0bda8ea6f..6d0578e88 100644 --- a/src/doFileSnapshot.cpp +++ b/src/doFileSnapshot.cpp @@ -24,6 +24,8 @@ */ //----------------------------------------------------------------------------- +#include + #include #include #include From 5cbb27aee387988aec8d87635cb2724de1943808 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 23 Aug 2010 18:03:44 +0200 Subject: [PATCH 1511/2134] + multiplot with gnuplot --- application/eda_sa/plot.py | 127 ++++++++++++++++++++++++++++++------- 1 file changed, 103 insertions(+), 24 deletions(-) diff --git a/application/eda_sa/plot.py b/application/eda_sa/plot.py index f5fa7c42b..1d3298e24 100644 --- a/application/eda_sa/plot.py +++ b/application/eda_sa/plot.py @@ -16,6 +16,42 @@ except ImportError: import funcutils Gnuplot.funcutils = funcutils +import optparse, logging, sys + +LEVELS = {'debug': logging.DEBUG, + 'info': logging.INFO, + 'warning': logging.WARNING, + 'error': logging.ERROR, + 'critical': logging.CRITICAL} + +def logger(level_name, filename='plot.log'): + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + filename=filename, filemode='a' + ) + + console = logging.StreamHandler() + console.setLevel(LEVELS.get(level_name, logging.NOTSET)) + console.setFormatter(logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')) + logging.getLogger('').addHandler(console) + +def parser(parser=optparse.OptionParser()): + parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='warning', help='set a verbose level') + parser.add_option('-f', '--file', help='give an input project filename', default='') + parser.add_option('-o', '--output', help='give an output filename for logging', default='plot.log') + parser.add_option('-d', '--dimension', help='give a dimension size', default=2) + parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True) + parser.add_option('-p', '--plot', action="store_false", help='plot graphics separetly, one by window', dest="multiplot") + + options, args = parser.parse_args() + + logger(options.verbose, options.output) + + return options + +options = parser() + def wait(str=None, prompt='Press return to show results...\n'): if str is not None: print str @@ -65,7 +101,10 @@ def plotXPointYFitness(path, fields='3:1', state=None, g=None): for filename in getSortedFiles(path): files.append(Gnuplot.File(path + '/' + filename, using=fields, with_='points', - title='distribution \'' + filename + '\'')) + #title='distribution \'' + filename + '\'' + title="" + ) + ) g.plot(*files) @@ -84,7 +123,10 @@ def plotXYPointZFitness(path, fields='4:3:1', state=None, g=None): for filename in getSortedFiles(path): files.append(Gnuplot.File(path + '/' + filename, using=fields, with_='points', - title='distribution \'' + filename + '\'')) + #title='distribution \'' + filename + '\'' + title="" + ) + ) g.splot(*files) @@ -102,7 +144,10 @@ def plotXYPoint(path, fields='3:4', state=None, g=None): for filename in getSortedFiles(path): files.append(Gnuplot.File(path + '/' + filename, using=fields, with_='points', - title='distribution \'' + filename + '\'')) + #title='distribution \'' + filename + '\'' + title="" + ) + ) g.plot(*files) @@ -121,7 +166,10 @@ def plotXYZPoint(path, fields='3:4:5', state=None, g=None): for filename in getSortedFiles(path): files.append(Gnuplot.File(path + '/' + filename, using=fields, with_='points', - title='distribution \'' + filename + '\'')) + #title='distribution \'' + filename + '\'' + title="" + ) + ) g.splot(*files) @@ -195,27 +243,60 @@ def plot2DRectFromFiles(path, state=None, g=None, plot=True): def main(n): gstate = [] - if n >= 1: - plotXPointYFitness('./ResPop', state=gstate) + if options.multiplot: + g = Gnuplot.Gnuplot() - if n >= 2: - plotXPointYFitness('./ResPop', '4:1', state=gstate) + g('set size 1.0, 1.0') + g('set origin 0.0, 0.0') + g('set multiplot') - if n >= 2: - plotXYPointZFitness('./ResPop', state=gstate) + g('set size 0.5, 0.5') + g('set origin 0.0, 0.5') - if n >= 3: - plotXYZPoint('./ResPop', state=gstate) + if n >= 1: + plotXPointYFitness('./ResPop', state=gstate, g=g) - if n >= 1: - plotParams('./ResParams.txt', state=gstate) + g('set size 0.5, 0.5') + g('set origin 0.0, 0.0') - if n >= 2: - plot2DRectFromFiles('./ResBounds', state=gstate) - plotXYPoint('./ResPop', state=gstate) + if n >= 2: + plotXPointYFitness('./ResPop', '4:1', state=gstate, g=g) - g = plot2DRectFromFiles('./ResBounds', state=gstate, plot=False) - plotXYPoint('./ResPop', g=g) + g('set size 0.5, 0.5') + g('set origin 0.5, 0.5') + + if n >= 2: + plotXYPointZFitness('./ResPop', state=gstate, g=g) + + g('set size 0.5, 0.5') + g('set origin 0.5, 0.0') + + if n >= 3: + plotXYZPoint('./ResPop', state=gstate, g=g) + + g('unset multiplot') + else: + if n >= 1: + plotXPointYFitness('./ResPop', state=gstate) + + if n >= 2: + plotXPointYFitness('./ResPop', '4:1', state=gstate) + + if n >= 2: + plotXYPointZFitness('./ResPop', state=gstate) + + if n >= 3: + plotXYZPoint('./ResPop', state=gstate) + + # if n >= 1: + # plotParams('./ResParams.txt', state=gstate) + + # if n >= 2: + # plot2DRectFromFiles('./ResBounds', state=gstate) + # plotXYPoint('./ResPop', state=gstate) + + # g = plot2DRectFromFiles('./ResBounds', state=gstate, plot=False) + # plotXYPoint('./ResPop', g=g) wait(prompt='Press return to end the plot.\n') @@ -223,10 +304,8 @@ def main(n): # when executed, just run main(): if __name__ == '__main__': - from sys import argv, exit + logging.debug('### plotting started ###') - if len(argv) < 2: - print 'Usage: plot [dimension]' - exit() + main(int(options.dimension)) - main(int(argv[1])) + logging.debug('### plotting ended ###') From 5b3f42d277fb1bce08cab7dd767530049630eb2d Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 24 Aug 2010 10:26:36 +0200 Subject: [PATCH 1512/2134] + lib utils --- src/CMakeLists.txt | 9 +++++++++ src/TODO | 1 - src/do | 14 +++++++------- src/doContinue.h | 5 ++--- src/doEDASA.h | 2 -- src/utils/CMakeLists.txt | 14 ++++++++++++++ src/{ => utils}/doCheckPoint.h | 0 src/{ => utils}/doFileSnapshot.cpp | 2 +- src/{ => utils}/doFileSnapshot.h | 0 src/{ => utils}/doHyperVolume.h | 0 src/{ => utils}/doPopStat.h | 0 src/{ => utils}/doStat.h | 0 src/{ => utils}/doStatNormalMono.h | 0 src/{ => utils}/doStatNormalMulti.h | 0 src/{ => utils}/doStatUniform.h | 0 15 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 src/utils/CMakeLists.txt rename src/{ => utils}/doCheckPoint.h (100%) rename src/{ => utils}/doFileSnapshot.cpp (98%) rename src/{ => utils}/doFileSnapshot.h (100%) rename src/{ => utils}/doHyperVolume.h (100%) rename src/{ => utils}/doPopStat.h (100%) rename src/{ => utils}/doStat.h (100%) rename src/{ => utils}/doStatNormalMono.h (100%) rename src/{ => utils}/doStatNormalMulti.h (100%) rename src/{ => utils}/doStatUniform.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8b6d787a8..f4cdbfae1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,3 +10,12 @@ FILE(GLOB SOURCES *.cpp) SET(SAMPLE_SRCS ${SOURCES} PARENT_SCOPE) ###################################################################################### + + +###################################################################################### +### 2) Where must cmake go now ? +###################################################################################### + +ADD_SUBDIRECTORY(utils) + +###################################################################################### diff --git a/src/TODO b/src/TODO index 13785cc8e..bed1db02a 100644 --- a/src/TODO +++ b/src/TODO @@ -1,2 +1 @@ -* deplacer les ecritures pour gnuplot dans des classes type eoContinue (eoMonitor) * integrer ACP diff --git a/src/do b/src/do index e96262c97..bcd43e19f 100644 --- a/src/do +++ b/src/do @@ -41,14 +41,14 @@ #include "doBounderRng.h" #include "doContinue.h" -#include "doCheckPoint.h" +#include "utils/doCheckPoint.h" -#include "doStat.h" -#include "doStatUniform.h" -#include "doStatNormalMono.h" -#include "doStatNormalMulti.h" +#include "utils/doStat.h" +#include "utils/doStatUniform.h" +#include "utils/doStatNormalMono.h" +#include "utils/doStatNormalMulti.h" -#include "doFileSnapshot.h" -#include "doPopStat.h" +#include "utils/doFileSnapshot.h" +#include "utils/doPopStat.h" #endif // !_do_ diff --git a/src/doContinue.h b/src/doContinue.h index a93de093c..64f1d4831 100644 --- a/src/doContinue.h +++ b/src/doContinue.h @@ -9,10 +9,9 @@ #define _doContinue_h #include -#include #include -//! eoContinue< EOT > classe fitted to Distribution Object library +//! doContinue< EOT > classe fitted to Distribution Object library template < typename D > class doContinue : public eoUF< const D&, bool >, public eoPersistent @@ -36,7 +35,7 @@ class doDummyContinue : public doContinue< D > { bool operator()(const D&){ return true; } - virtual std::string className() const { return "doNoContinue"; } + virtual std::string className() const { return "doDummyContinue"; } }; #endif // !_doContinue_h diff --git a/src/doEDASA.h b/src/doEDASA.h index 25fc5e5d7..ae2e39cd9 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -17,8 +17,6 @@ #include "doEstimator.h" #include "doModifierMass.h" #include "doSampler.h" -#include "doHyperVolume.h" -#include "doStat.h" #include "doContinue.h" template < typename D > diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt new file mode 100644 index 000000000..48a655194 --- /dev/null +++ b/src/utils/CMakeLists.txt @@ -0,0 +1,14 @@ +###################################################################################### +### 1) Set all needed source files for the project +###################################################################################### + +FILE(GLOB SOURCES *.cpp) + +SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) +ADD_LIBRARY(doutils ${SOURCES}) +INSTALL(TARGETS doutils ARCHIVE DESTINATION lib COMPONENT libraries) + +FILE(GLOB HDRS *.h utils) +INSTALL(FILES ${HDRS} DESTINATION include/do/utils COMPONENT headers) + +###################################################################################### diff --git a/src/doCheckPoint.h b/src/utils/doCheckPoint.h similarity index 100% rename from src/doCheckPoint.h rename to src/utils/doCheckPoint.h diff --git a/src/doFileSnapshot.cpp b/src/utils/doFileSnapshot.cpp similarity index 98% rename from src/doFileSnapshot.cpp rename to src/utils/doFileSnapshot.cpp index 6d0578e88..6879d75ee 100644 --- a/src/doFileSnapshot.cpp +++ b/src/utils/doFileSnapshot.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/src/doFileSnapshot.h b/src/utils/doFileSnapshot.h similarity index 100% rename from src/doFileSnapshot.h rename to src/utils/doFileSnapshot.h diff --git a/src/doHyperVolume.h b/src/utils/doHyperVolume.h similarity index 100% rename from src/doHyperVolume.h rename to src/utils/doHyperVolume.h diff --git a/src/doPopStat.h b/src/utils/doPopStat.h similarity index 100% rename from src/doPopStat.h rename to src/utils/doPopStat.h diff --git a/src/doStat.h b/src/utils/doStat.h similarity index 100% rename from src/doStat.h rename to src/utils/doStat.h diff --git a/src/doStatNormalMono.h b/src/utils/doStatNormalMono.h similarity index 100% rename from src/doStatNormalMono.h rename to src/utils/doStatNormalMono.h diff --git a/src/doStatNormalMulti.h b/src/utils/doStatNormalMulti.h similarity index 100% rename from src/doStatNormalMulti.h rename to src/utils/doStatNormalMulti.h diff --git a/src/doStatUniform.h b/src/utils/doStatUniform.h similarity index 100% rename from src/doStatUniform.h rename to src/utils/doStatUniform.h From 752b1722bb5725558b4b0f91b84467a1f0a47408 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 24 Aug 2010 11:19:31 +0200 Subject: [PATCH 1513/2134] * pkg-config updated + cmake file --- application/eda_sa/CMakeLists.txt | 2 +- do.pc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/eda_sa/CMakeLists.txt b/application/eda_sa/CMakeLists.txt index 8cdc8c13c..e8ec6f133 100644 --- a/application/eda_sa/CMakeLists.txt +++ b/application/eda_sa/CMakeLists.txt @@ -25,4 +25,4 @@ FILE(GLOB SOURCES *.cpp) SET(EXECUTABLE_OUTPUT_PATH ${DO_BINARY_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} do ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/do.pc b/do.pc index 44155200b..b207747db 100644 --- a/do.pc +++ b/do.pc @@ -8,5 +8,5 @@ includedir=${prefix}/include/do Name: Distribution Object Description: Distribution Object Version: 1.0 -Libs: -L${libdir} -ldo +Libs: -L${libdir} -ldo -ldoutils Cflags: -I${includedir} From b21f90c75ec262a10d04bcd9a49f9ac17daca2c1 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 24 Aug 2010 11:22:06 +0200 Subject: [PATCH 1514/2134] * fixed remove command issue --- src/utils/doFileSnapshot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/doFileSnapshot.cpp b/src/utils/doFileSnapshot.cpp index 6879d75ee..3ad012f76 100644 --- a/src/utils/doFileSnapshot.cpp +++ b/src/utils/doFileSnapshot.cpp @@ -62,7 +62,7 @@ doFileSnapshot::doFileSnapshot(std::string dirname, } else if (!res && rmFiles) { - s = std::string("/bin/rm ") + _dirname+ "/" + _filename + "*"; + s = std::string("/bin/rm -f ") + _dirname+ "/" + _filename + "*"; } else { From 74b23dd76b2fdf25f7a4d11a157127c0c185ccb4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 24 Aug 2010 11:23:55 +0200 Subject: [PATCH 1515/2134] * LICENSE --- COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COPYING b/COPYING index 90cbe47b8..8862bf50f 100644 --- a/COPYING +++ b/COPYING @@ -1 +1 @@ -Private license +(c) Thales group, 2010 From 799a8f01f324d5fb5988b16f591aa21bc3d41aec Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 24 Aug 2010 18:40:49 +0200 Subject: [PATCH 1516/2134] + script to plot on ggobi --- application/eda_sa/CMakeLists.txt | 2 +- application/eda_sa/plot_on_ggobi.py | 68 +++++++++++++++++++++++++++++ do.pc | 2 +- src/utils/doFileSnapshot.cpp | 2 +- 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100755 application/eda_sa/plot_on_ggobi.py diff --git a/application/eda_sa/CMakeLists.txt b/application/eda_sa/CMakeLists.txt index 8cdc8c13c..e8ec6f133 100644 --- a/application/eda_sa/CMakeLists.txt +++ b/application/eda_sa/CMakeLists.txt @@ -25,4 +25,4 @@ FILE(GLOB SOURCES *.cpp) SET(EXECUTABLE_OUTPUT_PATH ${DO_BINARY_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} do ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/application/eda_sa/plot_on_ggobi.py b/application/eda_sa/plot_on_ggobi.py new file mode 100755 index 000000000..2e9341830 --- /dev/null +++ b/application/eda_sa/plot_on_ggobi.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +from pprint import * +import sys, os + +if __name__ == '__main__': + + # parameter phase + + if len(sys.argv) < 2: + print 'Usage: %s [FILE]' % sys.argv[0] + sys.exit() + + filename = sys.argv[1] + + lines = open(filename).readlines() + + # formatting phase + + try: + results = [ x.split() for x in lines[1:-1] ] + except IOError, e: + print 'Error: %s' % e + sys.exit() + + # dimension estimating phase + + popsize = int(lines[0].split()[0]) + dimsize = int(results[0][1]) + + # printing phase + + print 'popsize: %d' % popsize + print 'dimsize: %d' % dimsize + + print + pprint( results ) + + # cvs converting phase + + i = 1 + for x in results: + x.insert(0, '"%d"' % i) + i += 1 + + header = ['""', '"fitness"', '"dimsize"'] + + for i in range(0, dimsize): + header.append( '"dim%d"' % i ) + + results.insert(0, header) + + # cvs printing phase + + file_results = '\n'.join( [ ','.join( x ) for x in results ] ) + + print + print file_results + + try: + open('%s.csv' % filename, 'w').write(file_results + '\n') + except IOError, e: + print 'Error: %s' % e + sys.exit() + + # ggobi plotting phase + + os.system('ggobi %s.csv' % filename) diff --git a/do.pc b/do.pc index 44155200b..b207747db 100644 --- a/do.pc +++ b/do.pc @@ -8,5 +8,5 @@ includedir=${prefix}/include/do Name: Distribution Object Description: Distribution Object Version: 1.0 -Libs: -L${libdir} -ldo +Libs: -L${libdir} -ldo -ldoutils Cflags: -I${includedir} diff --git a/src/utils/doFileSnapshot.cpp b/src/utils/doFileSnapshot.cpp index 6879d75ee..3ad012f76 100644 --- a/src/utils/doFileSnapshot.cpp +++ b/src/utils/doFileSnapshot.cpp @@ -62,7 +62,7 @@ doFileSnapshot::doFileSnapshot(std::string dirname, } else if (!res && rmFiles) { - s = std::string("/bin/rm ") + _dirname+ "/" + _filename + "*"; + s = std::string("/bin/rm -f ") + _dirname+ "/" + _filename + "*"; } else { From b017a0eb4602b1449090135ae05bc8a6371cbdc0 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 25 Aug 2010 19:15:32 +0200 Subject: [PATCH 1517/2134] * removed rho parameter and replaced it by popsize --- application/eda_sa/CMakeLists.txt | 1 + application/eda_sa/main.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/eda_sa/CMakeLists.txt b/application/eda_sa/CMakeLists.txt index e8ec6f133..25c077722 100644 --- a/application/eda_sa/CMakeLists.txt +++ b/application/eda_sa/CMakeLists.txt @@ -10,6 +10,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) SET(RESOURCES eda_sa.param plot.py + plot_on_ggobi.py ) FOREACH(file ${RESOURCES}) diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index b362529ca..6c9d2738c 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -135,9 +135,11 @@ int main(int ac, char** av) // FIXME: should I set the default value of rho to pop size ?!? - unsigned int rho = parser.createParam((unsigned int)0, "rho", "Rho: metropolis sample size", 'p', section).value(); // p + // unsigned int rho = parser.createParam((unsigned int)0, "rho", "Rho: metropolis sample size", 'p', section).value(); // p - moGenSolContinue< EOT >* sa_continue = new moGenSolContinue< EOT >(rho); + unsigned int popSize = parser.getORcreateParam((unsigned int)20, "popSize", "Population Size", 'P', "Evolution Engine").value(); + + moGenSolContinue< EOT >* sa_continue = new moGenSolContinue< EOT >( popSize ); state.storeFunctor(sa_continue); //----------------------------------------------------------------------------- From e71e86d6c103fd3d4efa05a4270151585116708f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 26 Aug 2010 19:31:30 +0200 Subject: [PATCH 1518/2134] ... --- application/eda_sa/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index 6c9d2738c..cdc615b01 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -133,8 +133,6 @@ int main(int ac, char** av) // Metropolis sample parameters //----------------------------------------------------------------------------- - // FIXME: should I set the default value of rho to pop size ?!? - // unsigned int rho = parser.createParam((unsigned int)0, "rho", "Rho: metropolis sample size", 'p', section).value(); // p unsigned int popSize = parser.getORcreateParam((unsigned int)20, "popSize", "Population Size", 'P', "Evolution Engine").value(); From 2fdc24a29a37de13bd8b56387c09744aefeac368 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 28 Aug 2010 12:30:37 +0200 Subject: [PATCH 1519/2134] openhatch button, supposed to facilitate the involvement of new contributors --- website/index.html | 28 ++++++++++++++++++++++++++-- website/lightblue.css | 1 + 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/website/index.html b/website/index.html index ed8562022..97010172d 100644 --- a/website/index.html +++ b/website/index.html @@ -34,7 +34,9 @@
      • Project page
      • see also ParadisEO
      +
    Version 0.97 - May. 9 2002 +
    Version 0.97 - May. 9 2002

    New

    + +
    +
    Thanks to Sébastien +Cahon (LIFL, Lille)
  • Lesson 5 gives -you the opportunity to build your own genotype 
    -
    and still benefit from all +you the opportunity to build your own genotype
  • + +
    +
    and still benefit from all powerful EO features (evolution engines, I/O, -...).
    +
    +
      Jump to section:
    1. @@ -144,8 +146,30 @@

      With the help of EO, you can easily design evolutionary algorithms that will find solutions to virtually all kind of hard optimization problems, from continuous to combinatorial ones.

      - - + +

      If you want to help us to improve EO, the easiest way is to click on the following button: + +

      + + + +
      + + + + + + +
      +

      +

      Features ⤒

      Component-based framework

      diff --git a/website/lightblue.css b/website/lightblue.css index 0d2d5dffd..e96546fb7 100644 --- a/website/lightblue.css +++ b/website/lightblue.css @@ -37,6 +37,7 @@ body { .shortcuts { text-align:left; + clear:both; } .shortcuts p { From 08754eeaee2caad86294e7a8c4b4bcfd0dde8b93 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 30 Aug 2010 16:20:55 +0200 Subject: [PATCH 1520/2134] fixed a bug with using of replacor, it didnt reduce the fitness --- src/doEDASA.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/doEDASA.h b/src/doEDASA.h index ae2e39cd9..b8c947068 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -54,7 +54,7 @@ public: eoSelectOne< EOT > & selectone, doModifierMass< D > & modifier, doSampler< D > & sampler, - eoContinue< EOT > & monitoring_continue, + // eoContinue< EOT > & monitoring_continue, eoContinue< EOT > & pop_continue, doContinue< D > & distribution_continue, eoEvalFunc < EOT > & evaluation, @@ -68,7 +68,7 @@ public: _selectone(selectone), _modifier(modifier), _sampler(sampler), - _monitoring_continue(monitoring_continue), + // _monitoring_continue(monitoring_continue), _pop_continue(pop_continue), _distribution_continue(distribution_continue), _evaluation(evaluation), @@ -91,7 +91,7 @@ public: double temperature = _initial_temperature; - eoPop< EOT > current_pop = pop; + eoPop< EOT > current_pop; eoPop< EOT > selected_pop; @@ -111,19 +111,12 @@ public: do { - if (pop != current_pop) - { - _replacor(pop, current_pop); - } - - current_pop.clear(); - selected_pop.clear(); - - //------------------------------------------------------------- // (3) Selection of the best points in the population //------------------------------------------------------------- + selected_pop.clear(); + _selector(pop, selected_pop); assert( selected_pop.size() > 0 ); @@ -172,6 +165,8 @@ public: // Building of the sampler in current_pop //------------------------------------------------------------- + current_pop.clear(); + do { EOT candidate_solution = _sampler(distrib); @@ -191,12 +186,18 @@ public: } while ( _sa_continue( current_solution) ); + //selected_pop.sort(); + + _replacor(pop, current_pop); + + if ( ! _cooling_schedule( temperature ) ){ eo::log << eo::debug << "_cooling_schedule" << std::endl; break; } + + if ( ! _distribution_continue( distrib ) ){ eo::log << eo::debug << "_distribution_continue" << std::endl; break; } + + if ( ! _pop_continue( pop ) ){ eo::log << eo::debug << "_pop_continue" << std::endl; break; } + } - while ( _cooling_schedule( temperature ) && - _distribution_continue( distrib ) && - _pop_continue( current_pop ) && - _monitoring_continue( selected_pop ) - ); + while ( 1 ); } private: @@ -217,7 +218,7 @@ private: doSampler< D > & _sampler; //! A EOT monitoring continuator - eoContinue < EOT > & _monitoring_continue; + // eoContinue < EOT > & _monitoring_continue; //! A EOT population continuator eoContinue < EOT > & _pop_continue; From ee6d52ec812ebe6c2c51819f3db80d98b2509c7d Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:42:42 +0200 Subject: [PATCH 1521/2134] no ; at the end of the line --- eo/src/utils/eoParam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 27ebd1110..de1e11c23 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -67,7 +67,7 @@ public: /** * Virtual destructor is needed. */ - virtual ~eoParam () {}; + virtual ~eoParam () {} /** * Pure virtual function to get the value out. From eb79ec2b6c20b860d844c15e0c51082ddeb3550d Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:43:50 +0200 Subject: [PATCH 1522/2134] New class: A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. --- eo/src/eoDualFitness.h | 179 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 eo/src/eoDualFitness.h diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h new file mode 100644 index 000000000..7c649fb4c --- /dev/null +++ b/eo/src/eoDualFitness.h @@ -0,0 +1,179 @@ +/* + +(c) 2010 Thales group + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; version 2 + of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + Johann Dréo + +*/ + +#ifndef _eoDualFitness_h_ +#define _eoDualFitness_h_ + +#include +#include +#include // for std::pair + +//! A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. +/** + * Use this class as fitness if you have some kind of individuals + * that must be always considered as better than others while having the same fitness type. + * + * Wraps a scalar fitness _values such as a double or int, with the option of + * maximizing (using less, @see eoMaximizingDualFitness) + * or minimizing (using greater, @see eoMinimizingDualFitness). + * + * Suitable constructors, assignments and casts are defined to work + * with those quantities as if they were a pair of: a BaseType and a boolean. + * + * When changing the fitness, you can use: + * individual.fitness( std::make_pair( fitness, feasibility ) ); + * + * Be aware that, when printing or reading an eDualFitness instance on a iostream, + * friend IO classes use a space separator. + * + * This class overrides operator<() to use the Compare template argument and handle feasibility. + * Over operators are coded using this sole function. +*/ +template +class eoDualFitness +{ +private: + //! Scalar type of the fitness (generally a double) + BaseType _value; + + //! Flag that marks if the individual is feasible + bool _is_feasible; + +public: + + //! Empty initialization + /*! + * Unfeasible by default + */ + eoDualFitness() : + _value(), + _is_feasible(false) + {} + + //! Copy constructor + eoDualFitness(const eoDualFitness& other) : + _value(other._value), + _is_feasible(other._is_feasible) + {} + + //! Constructor from explicit value/feasibility + eoDualFitness(const BaseType& v, const bool& is_feasible) : + _value(v), + _is_feasible(is_feasible) + {} + + //! From a std::pair (first element is the value, second is the feasibility) + eoDualFitness(const std::pair& dual) : + _value(dual.first), + _is_feasible(dual.second) + {} + + //! Copy operator + eoDualFitness& operator=(const eoDualFitness& other) + { + _value = other._value; + _is_feasible = other._is_feasible; + return *this; + } + + //! Copy operator from a std::pair + eoDualFitness& operator=(const std::pair& v) + { + _value = v.first; + _is_feasible = v.second; + return *this; + } + + //! Comparison that separate feasible individuals from unfeasible ones. Feasible are always better + /*! + * Use less as a default comparison operator + * (see the "Compare" template of the class to change this behaviour, + * @see eoMinimizingDualFitness for an example). + */ + bool operator<(const eoDualFitness& other) const + { + // am I better (less, by default) than the other ? + + // if I'm feasible and the other is not + if( this->_is_feasible && !other._is_feasible ) { + // no, the other has a better fitness + return false; + + } else if( !this->_is_feasible && other._is_feasible ) { + // yes, a feasible fitness is always better than an unfeasible one + return true; + + } else { + // the two fitness are of the same type + // lets rely on the comparator + return Compare()(_value, other._value); + } + } + + //! Greater: if the other is lesser than me + bool operator>( const eoDualFitness& other ) const { return other < *this; } + + //! Less or equal: if the other is not lesser than me + bool operator<=( const eoDualFitness& other ) const { return !(other < *thisr); } + + //! Greater or equal: if the other is not greater than me + bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + +public: + + //! Print an eoDualFitness instance as a pair of numbers, separated by a space + template + friend + std::ostream& operator<<(std::ostream& os, const eoDualFitness& f) + { + os << f._value << " " << f._is_feasible; + return os; + } + + //! Read an eoDualFitness instance as a pair of numbers, separated by a space + template + friend + std::istream& operator>>(std::istream& is, eoDualFitness& f) + { + F value; + is >> value; + + bool feasible; + is >> feasible; + + f = std::make_pair( value, feasible ); + return is; + } + +}; + +//! Compare dual fitnesses as if we were maximizing +typedef eoDualFitness > eoMaximizingDualFitness; + +//! Compare dual fitnesses as if we were minimizing +typedef eoDualFitness > eoMinimizingDualFitness; + +#endif // _eoDualFitness_h_ + From 03978e9ead16def2ee37af70adbabacac6ef2bfa Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:44:18 +0200 Subject: [PATCH 1523/2134] no ; at the end of the line --- eo/src/eoPop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index f8d758545..2b1a08f68 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -115,7 +115,7 @@ class eoPop: public std::vector, public eoObject, public eoPersistent } /** Empty Dtor */ - virtual ~eoPop() {}; + virtual ~eoPop() {} /// helper struct for getting a pointer From e184e9dd966f713c1f7dfd068afc3cd75855020c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:46:37 +0200 Subject: [PATCH 1524/2134] add a xdebug level & update of the license headers, LGPL version 2 only for this new file --- eo/src/utils/eoLogger.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 5f07ad290..106720eaf 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -1,13 +1,12 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eoLogger.h -// (c) Thales group, 2010 /* +(c) Thales group, 2010 + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + License as published by the Free Software Foundation; + version 2 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,11 +17,13 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Authors: - Johann Dréo - Caner Candan - */ -//----------------------------------------------------------------------------- +Contact: http://eodev.sourceforge.net + +Authors: + Johann Dréo + Caner Candan + +*/ /** Here's an example explaning how to use eoLogger: @@ -89,7 +90,6 @@ # include "eoObject.h" -//----------------------------------------------------------------------------- namespace eo { @@ -101,7 +101,8 @@ namespace eo warnings, progress, logging, - debug}; + debug, + xdebug}; /** * file From ce0c96967123e7910be816c5c85f0223b23854f7 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:46:55 +0200 Subject: [PATCH 1525/2134] update of the license headers, LGPL version 2 only for those new files --- eo/src/utils/eoHowMany.h | 5 +++-- eo/src/utils/eoLogger.cpp | 21 +++++++++++---------- eo/src/utils/eoParserLogger.cpp | 24 +++++++++++++----------- eo/src/utils/eoParserLogger.h | 25 +++++++++++++------------ 4 files changed, 40 insertions(+), 35 deletions(-) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 4ec32c364..ffa420d02 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -21,8 +21,9 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +Contact: http://eodev.sourceforge.net + +*/ //----------------------------------------------------------------------------- #ifndef eoHowMany_h diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index cf44cb802..c9d023705 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -1,13 +1,13 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eoLogger.h -// (c) Thales group, 2010 /* + +(c) Thales group, 2010 + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + License as published by the Free Software Foundation; + version 2 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,12 +18,13 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Authors: - Johann Dréo - Caner Candan - */ -//----------------------------------------------------------------------------- +Contact: http://eodev.sourceforge.net +Authors: + Johann Dréo + Caner Candan + +*/ #include #include diff --git a/eo/src/utils/eoParserLogger.cpp b/eo/src/utils/eoParserLogger.cpp index 356552b48..7e1ecd651 100644 --- a/eo/src/utils/eoParserLogger.cpp +++ b/eo/src/utils/eoParserLogger.cpp @@ -1,23 +1,25 @@ -/* (c) Thales group, 2010 +/* -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2 of the License, or (at your option) any -later version. +(c) Thales group, 2010 -This library is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free + Software Foundation; version 2 of the license. -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 59 -Temple Place, Suite 330, Boston, MA 02111-1307 USA + This library is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., 59 + Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: http://eodev.sourceforge.net Authors: Johann Dreo Caner Candan + */ #include "eoParserLogger.h" diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h index 9e53a1745..3bf6b2dcc 100644 --- a/eo/src/utils/eoParserLogger.h +++ b/eo/src/utils/eoParserLogger.h @@ -1,22 +1,23 @@ -/* (c) Thales group, 2010 +/* -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2 of the License, or (at your option) any -later version. +(c) Thales group, 2010 -This library is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free + Software Foundation; version 2 of the license. -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 59 -Temple Place, Suite 330, Boston, MA 02111-1307 USA + This library is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., 59 + Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: http://eodev.sourceforge.net Authors: - Johann Dreo + Johann Dréo Caner Candan */ From 528893cba96b161a76deaf325810ebf53204399f Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:50:34 +0200 Subject: [PATCH 1526/2134] bugfix: typo on _this_ --- eo/src/eoDualFitness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 7c649fb4c..d54750ba3 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -136,7 +136,7 @@ public: bool operator>( const eoDualFitness& other ) const { return other < *this; } //! Less or equal: if the other is not lesser than me - bool operator<=( const eoDualFitness& other ) const { return !(other < *thisr); } + bool operator<=( const eoDualFitness& other ) const { return !(other < *this); } //! Greater or equal: if the other is not greater than me bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } From 248d12d2f480a0f2f82e0f33e3823d659f359a66 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 30 Aug 2010 22:50:59 +0200 Subject: [PATCH 1527/2134] add eoDualFitness.h to the list of headers --- eo/src/eo | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eo b/eo/src/eo index cd28e8489..cb05a8988 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -38,6 +38,7 @@ #include #include #include +#include #include #include From 364877cc23439496cf00f6297df2f245e6fb0b46 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:04:25 +0200 Subject: [PATCH 1528/2134] removed useless eo.cfg, this is generated automaticaly by cmake with the file eo.cfg.cmake --- eo/doc/eo.cfg | 1125 ------------------------------------------------- 1 file changed, 1125 deletions(-) delete mode 100644 eo/doc/eo.cfg diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg deleted file mode 100644 index 84c511036..000000000 --- a/eo/doc/eo.cfg +++ /dev/null @@ -1,1125 +0,0 @@ -# Doxyfile 1.3.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for the EO project -# -# -# Please keep this file generic, i.e. do not use any absolute -# pathnames, otherwise automatic generation of documentation at -# SourceForge will fail. -# -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Evolving Objects - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 1.0.2-cvs - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = .. - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc - -FILE_PATTERNS = *.cpp \ - *.h \ - NEWS README - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = ../src/obsolete - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 3 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = eo - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = YES - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = YES - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = eo.doxytag - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = YES From 27d5cbbc3ba202e69ef7ab6a53d97adadb5d9a30 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:06:34 +0200 Subject: [PATCH 1529/2134] updated doc/CMakeLists.txt in order to add docs in packages --- eo/doc/CMakeLists.txt | 59 +++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/eo/doc/CMakeLists.txt b/eo/doc/CMakeLists.txt index 845471ddd..b1043c8af 100644 --- a/eo/doc/CMakeLists.txt +++ b/eo/doc/CMakeLists.txt @@ -4,30 +4,41 @@ IF (DOXYGEN_FOUND) - SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "EO documentation directory") - SET(EO_DOC_CONFIG_FILE "eo.cfg" CACHE PATH "EO documentation configuration file") - - # Copy necessary doc files - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${DOC_DIR}/index.h COPYONLY) - FILE(GLOB header_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.htm*) - FILE(GLOB pdf_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.pdf) - FILE(GLOB jpg_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.jpg) - FOREACH (file ${header_files} ${pdf_files} ${jpg_files}) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${DOC_DIR}/${file} COPYONLY) - ENDFOREACH (file) - - # define the doc target - IF (DOXYGEN_EXECUTABLE) - ADD_CUSTOM_TARGET(doc - COMMAND ${DOXYGEN_EXECUTABLE} ${EO_DOC_CONFIG_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDIF (DOXYGEN_EXECUTABLE) - - # configure cfg file - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${EO_DOC_CONFIG_FILE}.cmake" - "${CMAKE_BINARY_DIR}/doc/${EO_DOC_CONFIG_FILE}") + SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "EO documentation directory") + SET(EO_DOC_CONFIG_FILE "eo.cfg" CACHE PATH "EO documentation configuration file") + # Copy necessary doc files + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${DOC_DIR}/index.h COPYONLY) + FILE(GLOB header_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.htm*) + FILE(GLOB pdf_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.pdf) + FILE(GLOB jpg_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.jpg) + FOREACH (file ${header_files} ${pdf_files} ${jpg_files}) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${DOC_DIR}/${file} COPYONLY) + ENDFOREACH (file) + + # define the doc target + IF (DOXYGEN_EXECUTABLE) + ADD_CUSTOM_TARGET(doc + COMMAND ${DOXYGEN_EXECUTABLE} ${EO_DOC_CONFIG_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + ENDIF (DOXYGEN_EXECUTABLE) + + # configure cfg file + CONFIGURE_FILE( + "${CMAKE_SOURCE_DIR}/doc/${EO_DOC_CONFIG_FILE}.cmake" + "${CMAKE_BINARY_DIR}/doc/${EO_DOC_CONFIG_FILE}" + ) + + INSTALL( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION share/eo COMPONENT libraries + PATTERN "CMakeFiles" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "eo.cfg" EXCLUDE + PATTERN "eo.doxytag" EXCLUDE + ) ELSE (DOXYGEN_FOUND) - MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") + MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") ENDIF (DOXYGEN_FOUND) From ce8f5f692fef83e44e6dbd9574c0a90019187d07 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:10:13 +0200 Subject: [PATCH 1530/2134] * fixed some warning issues during compilation --- eo/src/eoParetoFitness.h | 13 +++++---- eo/src/eoRealBoundModifier.h | 6 +++- eo/src/utils/eoIntBounds.h | 47 +++++++++++++++++++++++-------- eo/src/utils/eoRealBounds.h | 26 +++++++++++++---- eo/src/utils/eoRealVectorBounds.h | 8 +++++- 5 files changed, 74 insertions(+), 26 deletions(-) diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h index 4634c9f4a..445949374 100644 --- a/eo/src/eoParetoFitness.h +++ b/eo/src/eoParetoFitness.h @@ -30,7 +30,7 @@ #include #include #include - +#include /** * eoFitnessTraits: a traits class to specify @@ -45,7 +45,7 @@ class eoParetoFitnessTraits static unsigned nObjectives() { return 2; } static double tol() { return 1e-6; } - static bool maximizing(int which) { return true; } // by default: all are maximizing + static bool maximizing(int which) { (void)which; return true; } // by default: all are maximizing }; /** @@ -62,10 +62,11 @@ public : // possible problems if ( nObj && (nObj != _n) ) // was already set to a different value { - std::cout << "WARNING\n"; - std::cout << "WARNING : you are changing the number of objectives\n"; - std::cout << "WARNING : Make sure all existing objects are destroyed\n"; - std::cout << "WARNING\n"; + eo::log << eo::warnings; + eo::log << "WARNING\n"; + eo::log << "WARNING : you are changing the number of objectives\n"; + eo::log << "WARNING : Make sure all existing objects are destroyed\n"; + eo::log << "WARNING\n"; } nObj=_n; bObj=_b; diff --git a/eo/src/eoRealBoundModifier.h b/eo/src/eoRealBoundModifier.h index b309a4838..d9fa099e6 100644 --- a/eo/src/eoRealBoundModifier.h +++ b/eo/src/eoRealBoundModifier.h @@ -46,7 +46,11 @@ public: eoDummyRealBoundModifier (){} - void operator() (eoRealBaseVectorBounds & _bnds,unsigned _i){} + void operator() (eoRealBaseVectorBounds & _bnds,unsigned _i) + { + (void)_bnds; + (void)_i; + } }; diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h index 59c98c03f..074c08363 100644 --- a/eo/src/utils/eoIntBounds.h +++ b/eo/src/utils/eoIntBounds.h @@ -176,12 +176,17 @@ public: throw std::logic_error("Trying to get range of unbounded eoIntBounds"); } - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in unbounded eoIntBounds"); } - virtual long int random(eoRng & _rng = eo::rng) const + + virtual long int random(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in unbounded eoIntBounds"); } @@ -192,8 +197,10 @@ public: * but reading should not be done here, because of bound problems * see eoIntVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoIntBounds::readFrom"); } @@ -312,8 +319,10 @@ public : * but reading should not be done here, because of bound problems * see eoIntVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoIntInterval::readFrom"); } @@ -364,12 +373,17 @@ public : throw std::logic_error("Trying to get range of eoIntBelowBound"); } - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in eoIntBelowBound"); } - virtual long int random(eoRng & _rng = eo::rng) const + + virtual long int random(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in eoIntBelowBound"); } @@ -411,8 +425,10 @@ public : * but reading should not be done here, because of bound problems * see eoIntVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoIntBelowBound::readFrom"); } @@ -462,12 +478,17 @@ public : throw std::logic_error("Trying to get range of eoIntAboveBound"); } - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in eoIntAboveBound"); } - virtual long int random(eoRng & _rng = eo::rng) const + + virtual long int random(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in eoIntAboveBound"); } @@ -509,8 +530,10 @@ public : * but reading should not be done here, because of bound problems * see eoIntVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoIntAboveBound::readFrom"); } @@ -650,12 +673,12 @@ public: /** random generator of uniform doubles in bounds * @std::exception if unbounded */ - virtual double uniform(eoRng & _rng = eo::rng) const {return repBound->uniform();} + virtual double uniform(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->uniform();} /** random generator of uniform ints in bounds * @std::exception if unbounded */ - virtual long int random(eoRng & _rng = eo::rng) const {return repBound->random();} + virtual long int random(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->random();} /** for memory managements - ugly */ virtual eoIntBounds * dup() const {return repBound->dup();} diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 12cb7b46a..d67f4450d 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -158,6 +158,8 @@ public: virtual double uniform(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in unbounded eoRealBounds"); } @@ -168,8 +170,10 @@ public: * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoRealBounds::readFrom"); } @@ -283,8 +287,10 @@ public : * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoRealInterval::readFrom"); } @@ -336,8 +342,10 @@ public : } // random generators - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in eoRealBelowBound"); } @@ -381,6 +389,8 @@ public : */ virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoRealBelowBound::readFrom"); } @@ -431,8 +441,10 @@ public : } // random generators - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { + (void)_rng; + throw std::logic_error("Trying to generate uniform values in eoRealAboveBound"); } @@ -474,8 +486,10 @@ public : * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { + (void)_is; + throw std::runtime_error("Should not use eoRealAboveBound::readFrom"); } @@ -615,7 +629,7 @@ public: /** random generator of uniform numbers in bounds * @std::exception if unbounded */ - virtual double uniform(eoRng & _rng = eo::rng) const {return repBound->uniform();} + virtual double uniform(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->uniform();} /** for memory managements - ugly */ virtual eoRealBounds * dup() const {return repBound->dup();} diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index 11144b390..7cdbcb613 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -190,7 +190,9 @@ public: * An std::exception will be raised if one of the component is unbounded */ virtual double uniform(unsigned _i, eoRng & _rng = eo::rng) - { + { + (void)_rng; + double r= (*this)[_i]->uniform(); return r; } @@ -403,12 +405,16 @@ public: // random generators virtual double uniform(unsigned, eoRng & _rng = eo::rng) { + (void)_rng; + throw std::logic_error("No uniform distribution on eoRealVectorNoBounds"); } // fills a std::vector with uniformly chosen variables in bounds void uniform(std::vector &, eoRng & _rng = eo::rng) { + (void)_rng; + throw std::logic_error("No uniform distribution on eoRealVectorNoBounds"); } From 1b3172a40c07b6c7411cbed859524b975ae4c9dd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:15:54 +0200 Subject: [PATCH 1531/2134] updated doxygen config file to the version 1.6.x --- eo/doc/eo.cfg.cmake | 1370 ++++++++++++++++++++++++++++--------------- 1 file changed, 884 insertions(+), 486 deletions(-) diff --git a/eo/doc/eo.cfg.cmake b/eo/doc/eo.cfg.cmake index 7069f87ca..35ce7680c 100644 --- a/eo/doc/eo.cfg.cmake +++ b/eo/doc/eo.cfg.cmake @@ -1,4 +1,4 @@ -# Doxyfile 1.3.6 +# Doxyfile 1.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -14,456 +14,666 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = @PACKAGE_NAME@ -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc +OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. -DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = NO -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @CMAKE_SOURCE_DIR@ -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.cpp \ *.h \ - NEWS README + NEWS \ + README -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = @CMAKE_SOURCE_DIR@/src/obsolete -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes # to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. -INPUT_FILTER = +INPUT_FILTER = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -472,38 +682,54 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -512,21 +738,21 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 3 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = eo @@ -535,256 +761,370 @@ IGNORE_PREFIX = eo # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = YES -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = YES + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -793,33 +1133,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -828,10 +1168,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -840,280 +1180,338 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/eo.doxytag -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. -MAX_DOT_GRAPH_WIDTH = 1024 +DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = YES From 2b3db39aff1fef32c687fedefc858f76cd7b5c98 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:52:08 +0200 Subject: [PATCH 1532/2134] repared some compile warning messages --- eo/src/eoCtrlCContinue.h | 3 ++- eo/src/eoGenContinue.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 1936a5e59..797e294a9 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -65,8 +65,9 @@ public: /** Returns false when Ctrl C has been typed in * reached */ - virtual bool operator() ( const eoPop& _vEO ) + virtual bool operator() ( const eoPop& _vEO ) { + (void)_vEO; if (arret_demande) return false; return true; diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 7d24e2438..c578fcc9c 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -27,6 +27,8 @@ #include #include +#include + /** Generational continuator: continues until a number of generations is reached */ @@ -52,13 +54,14 @@ public: /** Returns false when a certain number of generations is * reached */ virtual bool operator() ( const eoPop& _vEO ) { + (void)_vEO; thisGeneration++; value() = thisGeneration; // std::cout << " [" << thisGeneration << "] "; if (thisGeneration >= repTotalGenerations) { if (verbose) - std::cout << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; + eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; return false; } return true; From 12a631cfb188b5662c7010cad049397b8d07b701 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:54:42 +0200 Subject: [PATCH 1533/2134] removed a wrong logging message from eoEvalContinue.h --- eo/src/eoEvalContinue.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index b13ef90be..d92bef314 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -38,9 +38,7 @@ class eoEvalContinue: public eoContinue public: /// Ctor eoEvalContinue( eoEvalFuncCounter & _eval, unsigned long _totalEval) - : eval(_eval), repTotalEvaluations( _totalEval ) { - std::cout << "Ctor de eoEvalFuncCounter avec total = " << repTotalEvaluations << std::endl; -}; + : eval(_eval), repTotalEvaluations( _totalEval ) {}; /** Returns false when a certain number of evaluations has been done */ From e42a1dae74433bdc2fe64875cccb87f5b44edec3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 14:56:11 +0200 Subject: [PATCH 1534/2134] * eoFitContinue: using of _pop.best_element().fitness() instead of pop.nth_element_fitness(0) --- eo/src/eoFitContinue.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index b23283088..8cf1c9f37 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -26,12 +26,16 @@ #define _eoFitContinue_h #include +#include /** Fitness continuation: - Continues until the maximum fitness level is reached. + Continues until the optimum fitness level is reached. */ + +//! all types which derive from eoScalarFitness is able to compare well via the operator override ( <, >, <=, ...) + template< class EOT> class eoFitContinue: public eoContinue { public: @@ -40,26 +44,27 @@ public: typedef typename EOT::Fitness FitnessType; /// Ctor - eoFitContinue( const FitnessType _maximum) - : eoContinue (), maximum( _maximum ) {}; + eoFitContinue( const FitnessType _optimum) + : eoContinue (), optimum( _optimum ) {}; /** Returns false when a fitness criterium is reached. Assumes pop is not sorted! */ virtual bool operator() ( const eoPop& _pop ) { - FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); - if (bestCurrentFitness >= maximum) - { - std::cout << "STOP in eoFitContinue: Best fitness has reached " << - bestCurrentFitness << "\n"; - return false; - } - return true; + //FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); + FitnessType bestCurrentFitness = _pop.best_element().fitness(); + if (bestCurrentFitness >= optimum) + { + eo::log << eo::logging << "STOP in eoFitContinue: Best fitness has reached " << + bestCurrentFitness << "\n"; + return false; + } + return true; } - virtual std::string className(void) const { return "eoFitContinue"; } + virtual std::string className(void) const { return "eoFitContinue"; } + private: - FitnessType maximum; + FitnessType optimum; }; #endif - From 1619b2b38cfb508b88c2299e74e235fb5e192b00 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 15:53:32 +0200 Subject: [PATCH 1535/2134] * eoRNG.h: added double uniform(double min, double max) --- eo/src/utils/eoRNG.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 0aeb6969e..99de37298 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -171,6 +171,17 @@ public : return m * double(rand()) / double(1.0 + rand_max()); } + /** Random number from unifom distribution + + @param min Define minimum for interval in the range [min, max) + @param max Define maximum for interval in the range [min, max) + @return random number in the range [min, max) + */ + double uniform(double min, double max) + { // random number between [min, max] + return min + uniform(max - min); + } + /** Random integer number from unifom distribution @param m Define interval for random number to [0, m) From 698c692a63b2867aae37bea0e0cc564f099f1bf4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 16:31:39 +0200 Subject: [PATCH 1536/2134] + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached --- eo/src/eoEvalFuncCounter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoEvalFuncCounter.h b/eo/src/eoEvalFuncCounter.h index fb28de59f..b8532e2a4 100644 --- a/eo/src/eoEvalFuncCounter.h +++ b/eo/src/eoEvalFuncCounter.h @@ -49,7 +49,7 @@ template class eoEvalFuncCounter : public eoEvalFunc, public eoV } } - private : + protected : eoEvalFunc& func; }; From b790bbc35bd2adf426a86f8acbd28a06ba9713f0 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 16:32:19 +0200 Subject: [PATCH 1537/2134] + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached --- eo/src/eoEvalFuncCounterBounded.h | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 eo/src/eoEvalFuncCounterBounded.h diff --git a/eo/src/eoEvalFuncCounterBounded.h b/eo/src/eoEvalFuncCounterBounded.h new file mode 100644 index 000000000..7ba6c465c --- /dev/null +++ b/eo/src/eoEvalFuncCounterBounded.h @@ -0,0 +1,56 @@ +#ifndef eoEvalFuncCounterBounder_H +#define eoEvalFuncCounterBounder_H + +#include +#include + +class eoEvalFuncCounterBounderException : public std::exception +{ +public: + eoEvalFuncCounterBounderException(unsigned long threshold) : _threshold(threshold){} + + const char* what() const throw() + { + std::ostringstream ss; + ss << "STOP in eoEvalFuncCounterBounderException: the maximum number of evaluation has been reached (" << _threshold << ")."; + return ss.str().c_str(); + } + +private: + unsigned long _threshold; +}; + +/** +Counts the number of evaluations actually performed, thus checks first +if it has to evaluate.. etc. +*/ +template < typename EOT > +class eoEvalFuncCounterBounder : public eoEvalFuncCounter< EOT > +{ +public : + eoEvalFuncCounterBounder(eoEvalFunc& func, unsigned long threshold, std::string name = "Eval. ") + : eoEvalFuncCounter< EOT >( func, name ), _threshold( threshold ) + {} + + using eoEvalFuncCounter< EOT >::value; + + virtual void operator()(EOT& _eo) + { + if (_eo.invalid()) + { + value()++; + + if (_threshold > 0 && value() >= threshold) + { + throw eoEvalFuncCounterBounderException(threshold); + } + + func(_eo); + } + } + +private : + unsigned long _threshold; +}; + +#endif From 52d4107bc420c151c1233c36c681fc2505756613 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 16:34:03 +0200 Subject: [PATCH 1538/2134] + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached --- eo/src/{eoEvalFuncCounterBounded.h => eoEvalFuncCounterBounder.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename eo/src/{eoEvalFuncCounterBounded.h => eoEvalFuncCounterBounder.h} (100%) diff --git a/eo/src/eoEvalFuncCounterBounded.h b/eo/src/eoEvalFuncCounterBounder.h similarity index 100% rename from eo/src/eoEvalFuncCounterBounded.h rename to eo/src/eoEvalFuncCounterBounder.h From f98e1385626d403566a61f107362bb3f64c2df6c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 16:35:50 +0200 Subject: [PATCH 1539/2134] + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached --- eo/src/eoEvalFuncCounterBounder.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/eoEvalFuncCounterBounder.h b/eo/src/eoEvalFuncCounterBounder.h index 7ba6c465c..d9d83c18a 100644 --- a/eo/src/eoEvalFuncCounterBounder.h +++ b/eo/src/eoEvalFuncCounterBounder.h @@ -34,18 +34,18 @@ public : using eoEvalFuncCounter< EOT >::value; - virtual void operator()(EOT& _eo) + virtual void operator()(EOT& eo) { - if (_eo.invalid()) + if (eo.invalid()) { value()++; - if (_threshold > 0 && value() >= threshold) + if (_threshold > 0 && value() >= _threshold) { - throw eoEvalFuncCounterBounderException(threshold); + throw eoEvalFuncCounterBounderException(_threshold); } - func(_eo); + func(eo); } } From 20a4496b839d293ab01546a22763b273e0992c47 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 16:39:21 +0200 Subject: [PATCH 1540/2134] fixed some warning messages while compiling --- eo/src/eoContinue.h | 4 ++-- eo/src/eoEvalContinue.h | 1 + eo/src/eoSelectOne.h | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/src/eoContinue.h b/eo/src/eoContinue.h index d3b45f366..692d01f39 100644 --- a/eo/src/eoContinue.h +++ b/eo/src/eoContinue.h @@ -40,12 +40,12 @@ public: virtual std::string className(void) const { return "eoContinue"; } void readFrom (std :: istream & __is) { - + (void)__is; /* It should be implemented by subclasses ! */ } void printOn (std :: ostream & __os) const { - + (void)__os; /* It should be implemented by subclasses ! */ } }; diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index d92bef314..7ee38dee0 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -43,6 +43,7 @@ public: /** Returns false when a certain number of evaluations has been done */ virtual bool operator() ( const eoPop& _vEO ) { + (void)_vEO; if (eval.value() >= repTotalEvaluations) { std::cout << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]\n"; diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index 7896138a6..dc8a3b1c6 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -47,7 +47,9 @@ class eoSelectOne : public eoUF&, const EOT&> public : /// virtual function to setup some population stats (for instance eoProportional can benefit greatly from this) virtual void setup(const eoPop& _pop) - {} + { + (void)_pop; + } }; From 1086dc4d492010a43633f60beb460b92634bf326 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 17:16:48 +0200 Subject: [PATCH 1541/2134] * main.cpp: removed useless comments * src/do: added some lines to make detectable language file * doEDASA.h: added some comments --- application/eda_sa/main.cpp | 71 +++++++++++++++---------------------- src/do | 4 +++ src/doEDASA.h | 25 ++++++------- 3 files changed, 43 insertions(+), 57 deletions(-) diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index cdc615b01..023976ca0 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -4,6 +4,8 @@ #include #include +#include + #include #include #include @@ -14,12 +16,11 @@ #include "Rosenbrock.h" #include "Sphere.h" -typedef eoReal EOT; -//typedef doUniform< EOT > Distrib; -//typedef doNormalMono< EOT > Distrib; +typedef eoReal EOT; typedef doNormalMulti< EOT > Distrib; + int main(int ac, char** av) { eoParserLogger parser(ac, av); @@ -39,34 +40,27 @@ int main(int ac, char** av) // Instantiate all needed parameters for EDASA algorithm //----------------------------------------------------------------------------- - eoSelect< EOT >* selector = new eoDetSelect< EOT >(0.5); + double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R + + eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); state.storeFunctor(selector); - doEstimator< Distrib >* estimator = - //new doEstimatorUniform< EOT >(); - //new doEstimatorNormalMono< EOT >(); - new doEstimatorNormalMulti< EOT >(); + doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); eoSelectOne< EOT >* selectone = new eoDetTournamentSelect< EOT >( 2 ); state.storeFunctor(selectone); - doModifierMass< Distrib >* modifier = - //new doUniformCenter< EOT >(); - //new doNormalMonoCenter< EOT >(); - new doNormalMultiCenter< EOT >(); + doModifierMass< Distrib >* modifier = new doNormalMultiCenter< EOT >(); state.storeFunctor(modifier); - eoEvalFunc< EOT >* plainEval = - new Rosenbrock< EOT >(); - //new Sphere< EOT >(); + eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); state.storeFunctor(plainEval); unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E - eoEvalFuncCounter< EOT > eval(*plainEval, max_eval); + eoEvalFuncCounterBounder< EOT > eval(*plainEval, max_eval); eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); - //eoRndGenerator< double >* gen = new eoNormalGenerator< double >(0, 1); state.storeFunctor(gen); @@ -106,8 +100,6 @@ int main(int ac, char** av) // This is used by doSampler. //----------------------------------------------------------------------------- - - //doBounder< EOT >* bounder = new doBounderNo< EOT >(); doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); @@ -120,10 +112,7 @@ int main(int ac, char** av) // Prepare sampler class with a specific distribution //----------------------------------------------------------------------------- - doSampler< Distrib >* sampler = - //new doSamplerUniform< EOT >(); - //new doSamplerNormalMono< EOT >( *bounder ); - new doSamplerNormalMulti< EOT >( *bounder ); + doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); //----------------------------------------------------------------------------- @@ -133,8 +122,6 @@ int main(int ac, char** av) // Metropolis sample parameters //----------------------------------------------------------------------------- - // unsigned int rho = parser.createParam((unsigned int)0, "rho", "Rho: metropolis sample size", 'p', section).value(); // p - unsigned int popSize = parser.getORcreateParam((unsigned int)20, "popSize", "Population Size", 'P', "Evolution Engine").value(); moGenSolContinue< EOT >* sa_continue = new moGenSolContinue< EOT >( popSize ); @@ -170,7 +157,16 @@ int main(int ac, char** av) // general output //----------------------------------------------------------------------------- - eoCheckPoint< EOT >& monitoring_continue = do_make_checkpoint(parser, state, eval, eo_continue); + eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); + + doPopStat< EOT >* popStat = new doPopStat; + state.storeFunctor(popStat); + pop_continue.add(*popStat); + + doFileSnapshot* fileSnapshot = new doFileSnapshot("ResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue.add(*fileSnapshot); //----------------------------------------------------------------------------- @@ -179,17 +175,6 @@ int main(int ac, char** av) // population output //----------------------------------------------------------------------------- - eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( eo_continue ); - state.storeFunctor(pop_continue); - - doPopStat< EOT >* popStat = new doPopStat; - state.storeFunctor(popStat); - pop_continue->add(*popStat); - - doFileSnapshot* fileSnapshot = new doFileSnapshot("ResPop"); - state.storeFunctor(fileSnapshot); - fileSnapshot->add(*popStat); - pop_continue->add(*fileSnapshot); //----------------------------------------------------------------------------- @@ -244,7 +229,7 @@ int main(int ac, char** av) doAlgo< Distrib >* algo = new doEDASA< Distrib > (*selector, *estimator, *selectone, *modifier, *sampler, - monitoring_continue, *pop_continue, *distribution_continue, + pop_continue, *distribution_continue, eval, *sa_continue, *cooling_schedule, initial_temperature, *replacor); @@ -273,13 +258,13 @@ int main(int ac, char** av) { do_run(*algo, pop); } - catch (eoReachedThresholdException& e) - { - eo::log << eo::warnings << e.what() << std::endl; - } + catch (eoEvalFuncCounterBounderException& e) + { + eo::log << eo::warnings << "warning: " << e.what() << std::endl; + } catch (std::exception& e) { - eo::log << eo::errors << "exception: " << e.what() << std::endl; + eo::log << eo::errors << "error: " << e.what() << std::endl; exit(EXIT_FAILURE); } diff --git a/src/do b/src/do index bcd43e19f..1f91d3923 100644 --- a/src/do +++ b/src/do @@ -52,3 +52,7 @@ #include "utils/doPopStat.h" #endif // !_do_ + +// Local Variables: +// mode: C++ +// End: diff --git a/src/doEDASA.h b/src/doEDASA.h index b8c947068..db49375c7 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -38,23 +38,24 @@ public: /*! All the boxes used by a EDASA need to be given. - \param selector The EOT selector - \param estomator The EOT selector + \param selector Population Selector + \param estimator Distribution Estimator \param selectone SelectOne - \param modifier The D modifier - \param sampler The D sampler - \param evaluation The evaluation function. - \param continue The stopping criterion. - \param cooling_schedule The cooling schedule, describes how the temperature is modified. + \param modifier Distribution Modifier + \param sampler Distribution Sampler + \param pop_continue Population Continuator + \param distribution_continue Distribution Continuator + \param evaluation Evaluation function. + \param sa_continue Stopping criterion. + \param cooling_schedule Cooling schedule, describes how the temperature is modified. \param initial_temperature The initial temperature. - \param replacor The EOT replacor + \param replacor Population replacor */ doEDASA (eoSelect< EOT > & selector, doEstimator< D > & estimator, eoSelectOne< EOT > & selectone, doModifierMass< D > & modifier, doSampler< D > & sampler, - // eoContinue< EOT > & monitoring_continue, eoContinue< EOT > & pop_continue, doContinue< D > & distribution_continue, eoEvalFunc < EOT > & evaluation, @@ -68,7 +69,6 @@ public: _selectone(selectone), _modifier(modifier), _sampler(sampler), - // _monitoring_continue(monitoring_continue), _pop_continue(pop_continue), _distribution_continue(distribution_continue), _evaluation(evaluation), @@ -186,7 +186,7 @@ public: } while ( _sa_continue( current_solution) ); - //selected_pop.sort(); + pop.sort(); _replacor(pop, current_pop); @@ -217,9 +217,6 @@ private: //! A D sampler doSampler< D > & _sampler; - //! A EOT monitoring continuator - // eoContinue < EOT > & _monitoring_continue; - //! A EOT population continuator eoContinue < EOT > & _pop_continue; From 0834d689e8684b3c50d2bc8172e70a5af1e2aff5 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 19:26:51 +0200 Subject: [PATCH 1542/2134] * added some useful comments in eoLogger class --- eo/src/utils/eoLogger.cpp | 3 ++ eo/src/utils/eoLogger.h | 94 ++++++++++++++++++++------------------- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index c9d023705..a5e24c2d1 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -50,12 +50,15 @@ eoLogger::eoLogger() _standard_io_streams[&std::clog] = 2; _standard_io_streams[&std::cerr] = 2; + // /!\ If you want to add a level dont forget to add it at the header file in the enumerator Levels + addLevel("quiet", eo::quiet); addLevel("errors", eo::errors); addLevel("warnings", eo::warnings); addLevel("progress", eo::progress); addLevel("logging", eo::logging); addLevel("debug", eo::debug); + addLevel("xdebug", eo::debug); } eoLogger::~eoLogger() diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 106720eaf..0a4c27e3f 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -20,65 +20,65 @@ Contact: http://eodev.sourceforge.net Authors: - Johann Dréo - Caner Candan +Johann Dréo +Caner Candan */ /** Here's an example explaning how to use eoLogger: - #include - #include - #include + #include + #include + #include - int main(int ac, char** av) - { - // We are declaring first an overload of eoParser class using Logger - // component. - eoParserLogger parser(ac, av); + int main(int ac, char** av) + { + // We are declaring first an overload of eoParser class using Logger + // component. + eoParserLogger parser(ac, av); - // This call is important to allow -v parameter to change user level. - make_verbose(parser); + // This call is important to allow -v parameter to change user level. + make_verbose(parser); - // At this time we are switching to warning message and messages - // which are going to follow it are going to be warnings message too. - // These messages can be displayed only if the user level (sets with - // eo::setlevel function) is set to eo::warnings. - eo::log << eo::warnings; + // At this time we are switching to warning message and messages + // which are going to follow it are going to be warnings message too. + // These messages can be displayed only if the user level (sets with + // eo::setlevel function) is set to eo::warnings. + eo::log << eo::warnings; - // With the following eo::file function we are defining that - // all future logs are going to this new file resource which is - // test.txt - eo::log << eo::file("test.txt") << "In FILE" << std::endl; + // With the following eo::file function we are defining that + // all future logs are going to this new file resource which is + // test.txt + eo::log << eo::file("test.txt") << "In FILE" << std::endl; - // Now we are changing again the resources destination to cout which - // is the standard output. - eo::log << std::cout << "In COUT" << std::endl; + // Now we are changing again the resources destination to cout which + // is the standard output. + eo::log << std::cout << "In COUT" << std::endl; - // Here are 2 differents examples of how to set the errors user level - // in using either a string or an identifier. - eo::log << eo::setlevel("errors"); - eo::log << eo::setlevel(eo::errors); + // Here are 2 differents examples of how to set the errors user level + // in using either a string or an identifier. + eo::log << eo::setlevel("errors"); + eo::log << eo::setlevel(eo::errors); - // Now we are writting a message, that will be displayed only if we are above the "quiet" level - eo::log << eo::quiet << "1) Must be in quiet mode to see that" << std::endl; + // Now we are writting a message, that will be displayed only if we are above the "quiet" level + eo::log << eo::quiet << "1) Must be in quiet mode to see that" << std::endl; - // And so on... - eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) Must be in warnings mode to see that" << std::endl; + // And so on... + eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) Must be in warnings mode to see that" << std::endl; - eo::log << eo::setlevel(eo::logging); + eo::log << eo::setlevel(eo::logging); - eo::log << eo::errors; - eo::log << "3) Must be in errors mode to see that"; - eo::log << std::endl; + eo::log << eo::errors; + eo::log << "3) Must be in errors mode to see that"; + eo::log << std::endl; - eo::log << eo::debug << 4 << ')' - << " Must be in debug mode to see that\n"; + eo::log << eo::debug << 4 << ')' + << " Must be in debug mode to see that\n"; - return 0; - } + return 0; + } - */ +*/ #ifndef eoLogger_h # define eoLogger_h @@ -95,6 +95,8 @@ namespace eo { /** * Levels contents all the available levels in eoLogger + * + * /!\ If you want to add a level dont forget to add it at the implementation of the class eoLogger in the ctor */ enum Levels {quiet = 0, errors, @@ -102,16 +104,16 @@ namespace eo progress, logging, debug, - xdebug}; + xdebug}; /** * file - * this structure combined with the friend operator<< below is an easy way to select a file like output. + * this structure combined with the friend operator<< below is an easy way to select a file as output. */ struct file { file(const std::string f); - const std::string _f; + const std::string _f; }; /** @@ -122,8 +124,8 @@ namespace eo { setlevel(const std::string v); setlevel(const Levels lvl); - const std::string _v; - const Levels _lvl; + const std::string _v; + const Levels _lvl; }; } From 13b9b623975824ce384102fe9412f425201790a1 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 31 Aug 2010 19:29:05 +0200 Subject: [PATCH 1543/2134] added temporary population sorting --- src/doEDASA.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doEDASA.h b/src/doEDASA.h index db49375c7..05c8cc1c9 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -184,12 +184,12 @@ public: current_solution = candidate_solution; } } - while ( _sa_continue( current_solution) ); + while ( _sa_continue( current_solution) ); + + _replacor(pop, current_pop); // copy current_pop in pop pop.sort(); - _replacor(pop, current_pop); - if ( ! _cooling_schedule( temperature ) ){ eo::log << eo::debug << "_cooling_schedule" << std::endl; break; } if ( ! _distribution_continue( distrib ) ){ eo::log << eo::debug << "_distribution_continue" << std::endl; break; } From 5bd0baace7402bb0ff61636301d181429d53b299 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 1 Sep 2010 12:01:42 +0200 Subject: [PATCH 1544/2134] eo::log: added the parameter -o in order to define a log file + removed some warning messages at compile time --- eo/src/utils/eoParserLogger.cpp | 42 +++++++++++++++++++++++++++------ eo/src/utils/eoParserLogger.h | 1 + eo/src/utils/make_help.cpp | 6 +++-- eo/test/t-eoLogger.cpp | 6 +++++ 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoParserLogger.cpp b/eo/src/utils/eoParserLogger.cpp index 7e1ecd651..21b67f6c6 100644 --- a/eo/src/utils/eoParserLogger.cpp +++ b/eo/src/utils/eoParserLogger.cpp @@ -17,8 +17,8 @@ Contact: http://eodev.sourceforge.net Authors: - Johann Dreo - Caner Candan +Johann Dreo +Caner Candan */ @@ -30,16 +30,44 @@ eoParserLogger::eoParserLogger(unsigned _argc, char** _argv, std::string _lFileParamName /*= "param-file"*/, char _shortHand /*= 'p'*/) : eoParser(_argc, _argv, _programDescription, _lFileParamName, _shortHand), - _verbose("quiet", "verbose", "Set the verbose level", 'v'), - _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l') + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o') { + //------------------------------------------------------------------ + // we are saying to eoParser to create the parameters created above. + //------------------------------------------------------------------ + processParam(_verbose); processParam(_printVerboseLevels); + processParam(_output); - if (!_printVerboseLevels.value()) - return; + //------------------------------------------------------------------ + + + //------------------------------------------------------------------ + // we're gonna redirect the log to the given filename if -o is used. + //------------------------------------------------------------------ + + if ( ! _output.value().empty() ) + { + eo::log << eo::file( _output.value() ); + } + + //------------------------------------------------------------------ + + + //------------------------------------------------------------------ + // // we're gonna print the list of levels if -l parameter is used. + //------------------------------------------------------------------ + + if ( _printVerboseLevels.value() ) + { + eo::log.printLevels(); + } + + //------------------------------------------------------------------ - eo::log.printLevels(); } eoParserLogger::~eoParserLogger() diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h index 3bf6b2dcc..55801105f 100644 --- a/eo/src/utils/eoParserLogger.h +++ b/eo/src/utils/eoParserLogger.h @@ -43,6 +43,7 @@ private: friend void make_verbose(eoParserLogger&); eoValueParam _verbose; eoValueParam _printVerboseLevels; + eoValueParam _output; }; void make_verbose(eoParserLogger&); diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index e83b4f1a3..a9aa74f97 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -90,14 +90,16 @@ bool testDirRes(std::string _dirName, bool _erase=true) if (res) // no dir present { s = string("mkdir ")+ _dirName; - system(s.c_str()); + int res = system(s.c_str()); + (void)res; return true; } // else if (_erase) // OK to erase { s = string("/bin/rm ")+ _dirName + "/*"; - system(s.c_str()); + int res = system(s.c_str()); + (void)res; return true; } //else diff --git a/eo/test/t-eoLogger.cpp b/eo/test/t-eoLogger.cpp index cea441662..b263b7b83 100644 --- a/eo/test/t-eoLogger.cpp +++ b/eo/test/t-eoLogger.cpp @@ -6,18 +6,24 @@ #include #include +#include + //----------------------------------------------------------------------------- int main(int ac, char** av) { eoParserLogger parser(ac, av); + make_help(parser); + make_verbose(parser); eo::log << eo::setlevel(eo::debug); eo::log << eo::warnings; + eo::log << "We are written on the default defined standard output" << std::endl; + eo::log << eo::file("test.txt") << "In FILE" << std::endl; eo::log << std::cout << "In COUT" << std::endl; From 6d04ba9d3287d5bcae98fe695e43462b37b7d4e2 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 1 Sep 2010 14:51:09 +0200 Subject: [PATCH 1545/2134] ticket #1: Remove the autotools files done --- eo/Makefile.am | 30 ------ eo/acinclude.m4 | 84 --------------- eo/app/Makefile.am | 3 - eo/app/gprop/Makefile.am | 22 ---- eo/app/gpsymreg/Makefile.am | 15 --- eo/app/mastermind/Makefile.am | 14 --- eo/autogen.sh | 39 ------- eo/configure.in | 88 ---------------- eo/contrib/Makefile.am | 9 -- eo/doc/Makefile.am | 11 -- eo/src/Makefile.am | 146 --------------------------- eo/src/do/Makefile.am | 15 --- eo/src/eoDetTournamentSelect.h | 0 eo/src/eoProportionalSelect.h | 0 eo/src/eoSteadyFitContinue.h | 0 eo/src/eoStochTournamentSelect.h | 0 eo/src/eoStochasticUniversalSelect.h | 0 eo/src/es/Makefile.am | 56 ---------- eo/src/ga/Makefile.am | 32 ------ eo/src/gp/Makefile.am | 11 -- eo/src/moo/Makefile.am | 18 ---- eo/src/obsolete/Makefile.am | 14 --- eo/src/other/Makefile.am | 11 -- eo/src/utils/Makefile.am | 58 ----------- eo/stamp-h1 | 1 - eo/test/Makefile.am | 118 ---------------------- eo/tutorial/Lesson1/Makefile.am | 16 --- eo/tutorial/Lesson2/Makefile.am | 23 ----- eo/tutorial/Lesson3/Makefile.am | 22 ---- eo/tutorial/Lesson4/Makefile.am | 26 ----- eo/tutorial/Lesson5/Makefile.am | 28 ----- eo/tutorial/Lesson6/Makefile.am | 19 ---- eo/tutorial/Makefile.am | 2 - eo/tutorial/Templates/Makefile.am | 15 --- eo/tutorial/html/Makefile.am | 44 -------- eo/tutorial/pdf/Makefile.am | 1 - eo/win/Makefile.am | 7 -- 37 files changed, 998 deletions(-) delete mode 100644 eo/Makefile.am delete mode 100644 eo/acinclude.m4 delete mode 100644 eo/app/Makefile.am delete mode 100644 eo/app/gprop/Makefile.am delete mode 100644 eo/app/gpsymreg/Makefile.am delete mode 100644 eo/app/mastermind/Makefile.am delete mode 100755 eo/autogen.sh delete mode 100644 eo/configure.in delete mode 100644 eo/contrib/Makefile.am delete mode 100644 eo/doc/Makefile.am delete mode 100644 eo/src/Makefile.am delete mode 100644 eo/src/do/Makefile.am mode change 100755 => 100644 eo/src/eoDetTournamentSelect.h mode change 100755 => 100644 eo/src/eoProportionalSelect.h mode change 100755 => 100644 eo/src/eoSteadyFitContinue.h mode change 100755 => 100644 eo/src/eoStochTournamentSelect.h mode change 100755 => 100644 eo/src/eoStochasticUniversalSelect.h delete mode 100644 eo/src/es/Makefile.am delete mode 100644 eo/src/ga/Makefile.am delete mode 100644 eo/src/gp/Makefile.am delete mode 100644 eo/src/moo/Makefile.am delete mode 100644 eo/src/obsolete/Makefile.am delete mode 100644 eo/src/other/Makefile.am delete mode 100644 eo/src/utils/Makefile.am delete mode 100644 eo/stamp-h1 delete mode 100644 eo/test/Makefile.am delete mode 100644 eo/tutorial/Lesson1/Makefile.am delete mode 100644 eo/tutorial/Lesson2/Makefile.am delete mode 100644 eo/tutorial/Lesson3/Makefile.am delete mode 100644 eo/tutorial/Lesson4/Makefile.am delete mode 100644 eo/tutorial/Lesson5/Makefile.am delete mode 100644 eo/tutorial/Lesson6/Makefile.am delete mode 100644 eo/tutorial/Makefile.am delete mode 100644 eo/tutorial/Templates/Makefile.am delete mode 100644 eo/tutorial/html/Makefile.am delete mode 100644 eo/tutorial/pdf/Makefile.am delete mode 100644 eo/win/Makefile.am diff --git a/eo/Makefile.am b/eo/Makefile.am deleted file mode 100644 index e9b7e7aa8..000000000 --- a/eo/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## Makefile.am for eo - -if USE_APPLICATIONS -SUBDIRS_APP = app -endif - -if USE_TUTORIAL -SUBDIRS_TUT = tutorial -endif - -SUBDIRS = src doc contrib $(SUBDIRS_APP) $(SUBDIRS_TUT) test - - -# Directory for documents -DOCDIR = ~/public_html/eodocs - -# Directory for indices -- not useful for the user -IDXDIR = ~/index - - -# Add documentation to distribution -dist-hook: - $(MAKE) documentation - $(INSTALL_DATA) -d $(srcdir)/doc/html $(srcdir)/doc/latex $(srcdir)/doc/man $(distdir)/doc/ - -# Prepare documentation -documentation: - cd doc && $(MAKE) doc && cd .. -# convinience-target -doc: documentation diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 deleted file mode 100644 index f9e35376e..000000000 --- a/eo/acinclude.m4 +++ /dev/null @@ -1,84 +0,0 @@ -# AC_APPLICATIONS() -# -# Compile applications unless user requests not to do it. -AC_DEFUN([AC_APPLICATIONS],[dnl - AC_ARG_ENABLE([applications], - AC_HELP_STRING([--enable-applications], [build applications (default=yes)]), - [ case "${enableval}" in - yes) applications=true ;; - no) applications=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for applications option) ;; - esac], - [applications=true]) - if test "$applications" = "true"; then - AM_CONDITIONAL([USE_APPLICATIONS], true) - else - AM_CONDITIONAL([USE_APPLICATIONS], false) - fi -]) - - - -# AC_DEBUG() -# -# Check for commandline options requesting DEBUG feature. -# Might define DEBUG, NODEBUG, or NDEBUG, depending on flags given. -AC_DEFUN([AC_DEBUG],[dnl - AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], [include debugging code (default=no)]), - [ case "${enableval}" in - yes) debug=true ;; - no) debug=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for debug option) ;; - esac], - [debug=false]) - if test "$debug" = true; then - AC_DEFINE([DEBUG], true, [Debugging flag]) - else - AC_DEFINE([NDEBUG], true, [no debugging]) - AC_DEFINE([NODEBUG], true, [no debugging]) - fi -]) - - - -# AC_GNUPLOT() -# -# Compile applications unless user requests not to do it. -AC_DEFUN([AC_GNUPLOT], [dnl - AC_ARG_ENABLE([gnuplot], - AC_HELP_STRING([--enable-gnuplot], [use gnuplot for graphical display (default=yes)]), - [ac_cv_use_gnuplot=$enableval], - [ac_cv_use_gnuplot=yes]) - AC_CACHE_CHECK([use gnuplot for graphical display], - [ac_cv_use_gnuplot], - [ac_cv_use_gnuplot=no]) - if test "$ac_cv_use_gnuplot" = "yes"; then - AC_ARG_VAR([GNUPLOT], [gnuplot executable used for graphical display]) - AC_CHECK_PROG([GNUPLOT], [gnuplot], [gnuplot], [true]) - AC_DEFINE([HAVE_GNUPLOT], [1], [gnuplot graphical display]) - else - AC_DEFINE([NO_GNUPLOT], [1], [no gnuplot graphical display -- deprecated, will be reomoved!]) - fi -]) - - - -# AC_TUTORIAL() -# -# Compile tutorial unless user requests not to do it. -AC_DEFUN([AC_TUTORIAL],[dnl - AC_ARG_ENABLE([tutorial], - AC_HELP_STRING([--enable-tutorial], [build tutorial (default=yes)]), - [ case "${enableval}" in - yes) tutorial=true ;; - no) tutorial=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for tutorial option) ;; - esac], - [tutorial=true]) - if test "$tutorial" = "true"; then - AM_CONDITIONAL([USE_TUTORIAL], true) - else - AM_CONDITIONAL([USE_TUTORIAL], false) - fi -]) diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am deleted file mode 100644 index 662248021..000000000 --- a/eo/app/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -## Makefile.am for app dir in eo - -SUBDIRS = mastermind gprop gpsymreg diff --git a/eo/app/gprop/Makefile.am b/eo/app/gprop/Makefile.am deleted file mode 100644 index b1515ce53..000000000 --- a/eo/app/gprop/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# Makefile.am for app/gprop - -noinst_PROGRAMS = gprop - - -gprop_SOURCES = gprop.cpp - -noinst_HEADERS = gprop.h \ - l2.h \ - mlp.h \ - mse.h \ - qp.h \ - vecop.h - - -AM_CXXFLAGS = -I$(top_srcdir)/src - -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a - -DEPS = $(LIBEO) $(LIBEOUTILS) -LIBS = $(LIBEO) $(LIBEOUTILS) diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am deleted file mode 100644 index 0ada4ba5e..000000000 --- a/eo/app/gpsymreg/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# Makefile.am for app/gpsymreg - -noinst_PROGRAMS = gpsymreg - -gpsymreg_SOURCES = main.cpp - -noinst_HEADERS = fitness.h node.h parameters.h - - -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a - -AM_CXXFLAGS = -I$(top_srcdir)/src -DEPS = $(LIBEO) $(LIBEOUTILS) -LIBS = $(LIBEO) $(LIBEOUTILS) diff --git a/eo/app/mastermind/Makefile.am b/eo/app/mastermind/Makefile.am deleted file mode 100644 index 91caec05d..000000000 --- a/eo/app/mastermind/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# Makefile.am for app/mastermind - -noinst_PROGRAMS = mastermind - -mastermind_SOURCES = mastermind.cpp - -noinst_HEADERS = mastermind.h - -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a - -AM_CXXFLAGS = -I$(top_srcdir)/src -DEPS = $(LIBEO) $(LIBEOUTILS) -LIBS = $(LIBEO) $(LIBEOUTILS) diff --git a/eo/autogen.sh b/eo/autogen.sh deleted file mode 100755 index 7825332c3..000000000 --- a/eo/autogen.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -DIE=0 -PROG=eo - -(autoconf --version) < /dev/null > /dev/null 2>&1 || -{ - echo - echo "You must have autoconf installed to compile $PROG." - DIE=1 -} - -(automake --version) < /dev/null > /dev/null 2>&1 || -{ - echo - echo "You must have automake installed to compile $PROG." - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -set aclocalinclude="$ACLOCAL_FLAGS" -aclocal $aclocalinclude -unset $aclocalinclude -autoheader -automake -a -c -autoconf - -# we want doc to be recompiled - and it keeps saying it's up to date!!! -# touch doc/eo.cfg - -echo -echo "Now run 'configure' and 'make' to build $PROG." -echo "You can check the libraries by running 'make check'" -echo -echo "If you have Doxygen installed, type 'make doc' to generate $PROG documentation." -echo diff --git a/eo/configure.in b/eo/configure.in deleted file mode 100644 index 50c257941..000000000 --- a/eo/configure.in +++ /dev/null @@ -1,88 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Change the version number here -AC_INIT([Evolving Objects], [1.0.1], [eodev-help@sourceforge.net], [eo]) -AC_PREREQ(2.53) - -dnl make sure we are compiling from the correct sources -AC_CONFIG_SRCDIR(src/eoOp.h) - -dnl define host, build, and target machine -AC_CANONICAL_BUILD -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -dnl automake initialization -AM_INIT_AUTOMAKE([gnu dist-bzip2 dist-zip]) -AM_CONFIG_HEADER(config.h) - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CXX -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_RANLIB -AC_PATH_PROG([AR], [ar], [false], [$PATH:/usr/ccs/bin]) # solaris-x86 needs extra path -AC_ARG_VAR([DOXYGEN], [automatic documentation generation]) -AC_CHECK_PROGS([DOXYGEN], [doxygen], [true]) - -dnl Checks for header files. -AC_LANG(C++) -AC_HEADER_STDC - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_CHECK_TYPES(uint32_t, [], AC_MSG_WARN([Need uint32_t from C99 standard.])) -AC_TYPE_SIZE_T - -dnl Checks for libraries and library functions. -AC_CHECK_LIB(m, cos) - - -dnl Check for C++ library yaml-cpp (AC_CHEC_LIB only supports checking for C libraries) -AC_MSG_CHECKING('libyaml-cpp available') -AC_LANG(C++) -SAVED_LDFLAGS=$LDFLAGS -LDFLAGS="$LDFLAGS -lyaml-cpp" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include ], [YAML::Emitter dummy])], - [ AC_MSG_RESULT([yes]) - SAVED_LDFLAGS="$SAVED_LDFLAGS -lyaml-cpp" - AC_DEFINE(HAVE_LIBYAML_CPP,1,[Define to 1 if you have libyaml-cpp installed]) ], - [AC_MSG_RESULT([no])]) -LDFLAGS=$SAVED_LDFLAGS - - - -dnl user-switches -AC_APPLICATIONS -AC_DEBUG -AC_GNUPLOT -AC_TUTORIAL - -dnl create makefiles -AC_OUTPUT(Makefile \ - app/Makefile \ - app/mastermind/Makefile \ - app/gprop/Makefile \ - app/gpsymreg/Makefile \ - contrib/Makefile \ - doc/Makefile \ - src/Makefile \ - src/do/Makefile \ - src/es/Makefile \ - src/gp/Makefile \ - src/ga/Makefile \ - src/other/Makefile \ - src/utils/Makefile \ - src/moo/Makefile \ - test/Makefile \ - tutorial/Makefile \ - tutorial/html/Makefile \ - tutorial/Lesson1/Makefile \ - tutorial/Lesson2/Makefile \ - tutorial/Lesson3/Makefile \ - tutorial/Lesson4/Makefile \ - tutorial/Lesson5/Makefile \ - tutorial/Templates/Makefile \ - tutorial/pdf/Makefile) diff --git a/eo/contrib/Makefile.am b/eo/contrib/Makefile.am deleted file mode 100644 index e01377206..000000000 --- a/eo/contrib/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -############################################################################### -## -## Makefile.am for eo/src -## -############################################################################### - -pkginclude_HEADERS = eoAged.h eoDrawable.h - -EXTRA_DIST = MGE/VirusOp.h MGE/eoInitVirus.h MGE/eoVirus.h diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am deleted file mode 100644 index 885cfdb72..000000000 --- a/eo/doc/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -## Makefile.am for eo/doc - - -EXTRA_DIST = EO_EA2001.pdf LeCreusot.pdf eo.cfg index.h \ - mainpage.html publications.html sflogo-hammer1.jpg - -doc: - cd $(srcdir) && $(DOXYGEN) eo.cfg - -clean-local: - cd $(srcdir) && rm -rf html latex man diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am deleted file mode 100644 index 37817996c..000000000 --- a/eo/src/Makefile.am +++ /dev/null @@ -1,146 +0,0 @@ -# Makefile.am for eo/src - -SUBDIRS = es ga gp do utils other moo - -lib_LIBRARIES = libeo.a - -libeo_a_SOURCES = eoFunctorStore.cpp \ - eoPersistent.cpp \ - eoPrintable.cpp \ - eoCtrlCContinue.cpp \ - eoParetoFitness.cpp \ - eoScalarFitnessAssembled.cpp - - -pkginclude_HEADERS = eo \ - EO.h \ - apply.h \ - eoAlgo.h \ - eoBinaryFlight.h \ - eoBitParticle.h \ - eoBreed.h \ - eoCellularEasyEA.h \ - eoCloneOps.h \ - eoCombinedContinue.h \ - eoCombinedInit.h \ - eoConstrictedVariableWeightVelocity.h \ - eoConstrictedVelocity.h \ - eoContinue.h \ - eoCounter.h \ - eoCtrlCContinue.h \ - eoDetSelect.h \ - eoDetTournamentSelect.h \ - eoDistribUpdater.h \ - eoDistribution.h \ - eoDominanceMap.h \ - eoEDA.h \ - eoEasyEA.h \ - eoEasyPSO.h \ - eoEvalContinue.h \ - eoEvalFunc.h \ - eoEvalFuncCounter.h \ - eoEvalFuncPtr.h \ - eoFactory.h \ - eoFitContinue.h \ - eoFitnessScalingSelect.h \ - eoFixedInertiaWeightedVelocity.h \ - eoFlight.h \ - eoFlOrBinOp.h \ - eoFlOrMonOp.h \ - eoFlOrQuadOp.h \ - eoFunctor.h \ - eoFunctorStore.h \ - eoG3Replacement.h \ - eoGaussRealWeightUp.h \ - eoGenContinue.h \ - eoGenOp.h \ - eoGeneralBreeder.h \ - eoInit.h \ - eoInvalidateOps.h \ - eoLinearDecreasingWeightUp.h \ - eoLinearFitScaling.h \ - eoLinearTopology.h \ - eoMGGReplacement.h \ - eoMerge.h \ - eoMergeReduce.h \ - eoNDSorting.h \ - eoNeighborhood.h \ - eoObject.h \ - eoOneToOneBreeder.h \ - eoOp.h \ - eoOpContainer.h \ - eoOpSelMason.h \ - eoParetoConstraintFitness.h \ - eoParetoFitness.h \ - eoParetoRanking.h \ - eoParticleBestInit.h \ - eoPerf2Worth.h \ - eoPeriodicContinue.h \ - eoPersistent.h \ - eoPop.h \ - eoPopAlgo.h \ - eoPopEvalFunc.h \ - eoPopulator.h \ - eoPrintable.h \ - eoPropGAGenOp.h \ - eoProportionalCombinedOp.h \ - eoProportionalSelect.h \ - eoPSO.h \ - eoRandomRealWeightUp.h \ - eoRandomSelect.h \ - eoRanking.h \ - eoRankingSelect.h \ - eoRealBoundModifier.h \ - eoRealParticle.h \ - eoReduce.h \ - eoReduceMerge.h \ - eoReduceMergeReduce.h \ - eoReduceSplit.h \ - eoReplacement.h \ - eoSGA.h \ - eoSGAGenOp.h \ - eoSGATransform.h \ - eoSTLFunctor.h \ - eoScalarFitness.h \ - eoScalarFitnessAssembled.cpp \ - eoScalarFitnessAssembled.h \ - eoSelect.h \ - eoSelectFactory.h \ - eoSelectFromWorth.h \ - eoSelectMany.h \ - eoSelectNumber.h \ - eoSelectOne.h \ - eoSelectPerc.h \ - eoSequentialSelect.h \ - eoSharing.h \ - eoSharingSelect.h \ - eoSigBinaryFlight.h \ - eoSimpleEDA.h \ - eoSocialNeighborhood.h \ - eoStandardFlight.h \ - eoStandardVelocity.h \ - eoStarTopology.h \ - eoSteadyFitContinue.h \ - eoStochTournamentSelect.h \ - eoStochasticUniversalSelect.h \ - eoSurviveAndDie.h \ - eoSyncEasyPSO.h \ - eoTopology.h \ - eoTransform.h \ - eoTruncSelect.h \ - eoTruncatedSelectMany.h \ - eoTruncatedSelectOne.h \ - eoVariableInertiaWeightedVelocity.h \ - eoVariableLengthCrossover.h \ - eoVariableLengthMutation.h \ - eoVector.h \ - eoVectorParticle.h \ - eoVelocity.h \ - eoVelocityInit.h \ - eoWeightUpdater.h \ - es.h \ - ga.h \ - PO.h \ - eoTimeContinue.h - -AM_CXXFLAGS = -I$(top_srcdir)/src diff --git a/eo/src/do/Makefile.am b/eo/src/do/Makefile.am deleted file mode 100644 index 3ec747297..000000000 --- a/eo/src/do/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -pkginclude_HEADERS = make_algo_easea.h \ - make_algo_pareto.h \ - make_algo_scalar.h \ - make_checkpoint.h \ - make_checkpoint_FDC.h \ - make_checkpoint_assembled.h \ - make_checkpoint_pareto.h \ - make_continue.h \ - make_continue_pareto.h \ - make_general_replacement.h \ - make_pop.h \ - make_run.h - - -EXTRA_DIST = Readme diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h old mode 100755 new mode 100644 diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h old mode 100755 new mode 100644 diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h old mode 100755 new mode 100644 diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h old mode 100755 new mode 100644 diff --git a/eo/src/eoStochasticUniversalSelect.h b/eo/src/eoStochasticUniversalSelect.h old mode 100755 new mode 100644 diff --git a/eo/src/es/Makefile.am b/eo/src/es/Makefile.am deleted file mode 100644 index d9c280dfa..000000000 --- a/eo/src/es/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -## Makefile.am for eo/src/es - -lib_LIBRARIES = libes.a libcma.a - -libes_a_SOURCES = make_algo_scalar_es.cpp \ - make_algo_scalar_real.cpp \ - make_checkpoint_es.cpp \ - make_checkpoint_real.cpp \ - make_continue_es.cpp \ - make_continue_real.cpp \ - make_genotype_es.cpp \ - make_genotype_real.cpp \ - make_op_es.cpp \ - make_op_real.cpp \ - make_pop_es.cpp \ - make_pop_real.cpp \ - make_run_es.cpp \ - make_run_real.cpp - -esincludedir = $(pkgincludedir)/es - -esinclude_HEADERS = eoEsChromInit.h \ - eoEsFull.h \ - eoEsGlobalXover.h \ - eoEsMutate.h \ - eoEsMutationInit.h \ - eoEsSimple.h \ - eoEsStandardXover.h \ - eoEsStdev.h \ - eoNormalMutation.h \ - eoRealAtomXover.h \ - eoReal.h \ - eoRealInitBounded.h \ - eoRealOp.h \ - eoSBXcross.h \ - make_es.h \ - make_genotype_real.h \ - make_op_es.h \ - make_op.h \ - make_op_real.h \ - make_real.h - -libcma_a_SOURCES = eig.cpp \ - CMAState.cpp \ - CMAParams.cpp - -cmaincludedir = $(pkgincludedir)/es - -cmainclude_HEADERS = CMAParams.h \ - CMAState.h \ - eig.h \ - eoCMAInit.h \ - eoCMABreed.h \ - matrices.h - -AM_CXXFLAGS = -I$(top_srcdir)/src diff --git a/eo/src/ga/Makefile.am b/eo/src/ga/Makefile.am deleted file mode 100644 index 6429011eb..000000000 --- a/eo/src/ga/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################### -## -## Makefile.am for eo/src/ga -## -############################################################################### - -AM_CXXFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src - -lib_LIBRARIES = libga.a - -libga_a_SOURCES = make_algo_scalar_ga.cpp \ - make_checkpoint_ga.cpp \ - make_continue_ga.cpp \ - make_genotype_ga.cpp \ - make_op_ga.cpp \ - make_pop_ga.cpp \ - make_run_ga.cpp - -gaincludedir = $(pkgincludedir)/ga - -gainclude_HEADERS = eoBit.h \ - eoBitOpFactory.h \ - eoBitOp.h \ - eoBoolFlip.h \ - eoPBILAdditive.h \ - eoPBILDistrib.h \ - eoPBILOrg.h \ - make_ga.h \ - make_genotype_ga.h \ - make_op.h \ - make_PBILdistrib.h \ - make_PBILupdate.h diff --git a/eo/src/gp/Makefile.am b/eo/src/gp/Makefile.am deleted file mode 100644 index 9ebcdd237..000000000 --- a/eo/src/gp/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -## Makefile.am for eo/src/gp - -gpincludedir = $(pkgincludedir)/gp - -gpinclude_HEADERS = eoParseTreeDepthInit.h \ - eoParseTree.h \ - eoParseTreeOp.h \ - eoStParseTreeDepthInit.h \ - eoStParseTreeOp.h \ - node_pool.h \ - parse_tree.h diff --git a/eo/src/moo/Makefile.am b/eo/src/moo/Makefile.am deleted file mode 100644 index e829bd1f9..000000000 --- a/eo/src/moo/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ - -lib_LIBRARIES = libeomoo.a - -libeomoo_a_SOURCES = eoFrontSorter.cpp \ - eoNSGA_IIa_Eval.cpp \ - eoNSGA_II_Eval.cpp - -pkginclude_HEADERS =\ -eoEpsilonArchive.h\ -eoEpsMOEA.h\ -eoFrontSorter.h\ -eoMOEval.h\ -eoMOFitness.h\ -eoNSGA_I_Eval.h\ -eoNSGA_IIa_Eval.h\ -eoNSGA_II_Eval.h - -AM_CXXFLAGS = -I$(top_srcdir)/src diff --git a/eo/src/obsolete/Makefile.am b/eo/src/obsolete/Makefile.am deleted file mode 100644 index 1a94e144a..000000000 --- a/eo/src/obsolete/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################### -## -## Makefile.am for eo/src/obsolete -## -############################################################################### - -INCLUDES = -I$(top_builddir)/src - -lib_LIBRARIES = libeoobsolete.a -libeoobsolete_a_SOURCES = eoParserUtils.cpp - -libeoobsoleteincdir = $(includedir)/eo/obsolete -libeoobsoleteinc_HEADERS = eo1d.h eo1dWDistance.h eo2d.h eo2dVector.h eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h eoAtomRandom.h eoBin.h eoBreeder.h eoCopyElite.h eoDetTournament.h eoDetTournamentIndiSelector.h eoDistance.h eoDup.h eoES.h eoESChrom.h eoESFullChrom.h eoESFullMut.h eoEsObjectiveBounds.h eoEvalFuncPtrCnt.h eoFitTerm.h eoFitness.h eoGenTerm.h eoGeneration.h eoID.h eoInclusion.h eoInsertion.h eoKill.h eoLottery.h eoMutation.h eoNegExp.h eoNonUniform.h eoNormal.h eoParser.h eoParserUtils.h eoPopOps.h eoProblem.h eoProportional.h eoRandomBreed.h eoRandomIndiSelector.h eoRandomSelect.h eoRank.h eoRnd.h eoScheme.h eoSelectRandom.h eoStochTournament.h eoStringMutation.h eoTerm.h eoTournament.h eoTranspose.h eoUniform.h eoUniformXOver.h eoVector.h eoXOver2.h - diff --git a/eo/src/other/Makefile.am b/eo/src/other/Makefile.am deleted file mode 100644 index 074966a36..000000000 --- a/eo/src/other/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -## Makefile.am for eo/src/other - - -AM_CXXFLAGS = -I$(top_builddir)/src - -otherincludedir = $(pkgincludedir)/other - -otherinclude_HEADERS = eoExternalEO.h \ - eoString.h \ - external_eo \ - eoExternalOpFunctions.h diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am deleted file mode 100644 index fc8072535..000000000 --- a/eo/src/utils/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## Makefile.am for eo/src/utils - -lib_LIBRARIES = libeoutils.a - -libeoutils_a_SOURCES = eoData.cpp \ - eoFileMonitor.cpp \ - eoGnuplot.cpp \ - eoGnuplot1DMonitor.cpp \ - eoGnuplot1DSnapshot.cpp \ - eoIntBounds.cpp \ - eoParser.cpp \ - eoRealBounds.cpp \ - eoRNG.cpp \ - eoState.cpp \ - eoStdoutMonitor.cpp \ - eoUpdater.cpp \ - make_help.cpp \ - pipecom.cpp - -utilsincludedir = $(pkgincludedir)/utils - -utilsinclude_HEADERS = checkpointing \ - compatibility.h \ - eoAssembledFitnessStat.h \ - eoCheckPoint.h \ - eoData.h \ - eoDistance.h \ - eoFDCStat.h \ - eoFileMonitor.h \ - eoFileSnapshot.h \ - eoGnuplot.h \ - eoGnuplot1DMonitor.h \ - eoGnuplot1DSnapshot.h \ - eoHowMany.h \ - eoMOFitnessStat.h \ - eoMonitor.h \ - eoParam.h \ - eoParser.h \ - eoPopStat.h \ - eoRNG.h \ - eoRealBounds.h \ - eoIntBounds.h \ - eoRealVectorBounds.h \ - eoRndGenerators.h \ - eoScalarFitnessStat.h \ - eoStat.h \ - eoState.h \ - eoStdoutMonitor.h \ - eoTimeCounter.h \ - eoTimedMonitor.h \ - eoUniformInit.h \ - eoUpdatable.h \ - eoUpdater.h \ - pipecom.h \ - rnd_generators.h \ - selectors.h - -AM_CXXFLAGS = -I$(top_srcdir)/src -DGNUPLOT_PROGRAM=\"@GNUPLOT@\" diff --git a/eo/stamp-h1 b/eo/stamp-h1 deleted file mode 100644 index 4547fe1b5..000000000 --- a/eo/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for config.h diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am deleted file mode 100644 index 80b87bde6..000000000 --- a/eo/test/Makefile.am +++ /dev/null @@ -1,118 +0,0 @@ -############################################################################### -## -## Makefile.am for eo/test -## -############################################################################### -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -LIBES = $(top_builddir)/src/es/libes.a -LIBGA = $(top_builddir)/src/ga/libga.a -LIBCMA = $(top_builddir)/src/es/libcma.a -LIBMOO = $(top_builddir)/src/moo/libeomoo.a - -# PLEASE don't break the line (see create_batch.sh) -check_PROGRAMS = t-eoParetoFitness \ - t-eoPareto \ - t-eofitness \ - t-eoRandom \ - t-eobin \ - t-eoVirus \ - t-MGE \ - t-MGE1bit \ - t-MGE-control \ - t-eoStateAndParser \ - t-eoCheckpointing \ - t-eoSSGA \ - t-eoExternalEO \ - t-eoSymreg \ - t-eo \ - t-eoReplacement \ - t-eoSelect \ - t-eoGenOp \ - t-eoGA \ - t-eoReal \ - t-eoVector \ - t-eoESAll \ - t-eoPBIL \ - t-eoFitnessAssembled \ - t-eoFitnessAssembledEA \ - t-eoRoulette \ - t-eoSharing \ - t-eoCMAES \ - t-eoSecondsElapsedContinue\ - t-eoRNG \ - t-eoEasyPSO \ - t-eoNSGA \ - t-eoFrontSorter \ - t-eoEpsMOEA \ - t-eoInt \ - t-eoInitPermutation \ - t-eoSwapMutation \ - t-eoShiftMutation \ - t-eoTwoOptMutation \ - t-eoRingTopology \ - t-eoSyncEasyPSO - -TESTS = $(check_PROGRAMS) \ - run_tests # This script can be used to check command-line arguments - -noinst_HEADERS = binary_value.h real_value.h RoyalRoad.h - - -DEPS = $(LIBGA) $(LIBES) $(LIBCMA) $(LIBEOUTILS) $(LIBEO) $(LIBMOO) -INCLUDES = -I$(top_srcdir)/src -I$(srcdir)/../src -LIBS = $(DEPS) - -CLEANFILES = monitor.csv t-eoRandom.out -EXTRA_DIST = run_tests - -# extra flags for specific targets -t_eoVirus_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir)/contrib -t_MGE_CXXFLAGS = -I$(top_srcdir)/contrib/MGE -t_MGE1bit_CXXFLAGS = -I$(top_srcdir)/contrib/MGE -t_MGE_control_CXXFLAGS = -I$(top_srcdir)/contrib/MGE - -# Specify source-files, -# otherwise automake/make looks for C sources -# -t_eoRandom_SOURCES = t-eoRandom.cpp -t_eofitness_SOURCES = t-eofitness.cpp -t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp -t_eobin_SOURCES = t-eobin.cpp -t_eoVirus_SOURCES = t-eoVirus.cpp -t_MGE1bit_SOURCES = t-MGE1bit.cpp -t_MGE_SOURCES = t-MGE.cpp -t_MGE_control_SOURCES = t-MGE-control.cpp -t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp -t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp -t_eoReplacement_SOURCES = t-eoReplacement.cpp -t_eoSelect_SOURCES = t-eoSelect.cpp -t_eoExternalEO_SOURCES = t-eoExternalEO.cpp -t_eoSymreg_SOURCES = t-eoSymreg.cpp -t_eo_SOURCES = t-eo.cpp -t_eoGenOp_SOURCES = t-eoGenOp.cpp -t_eoVector_SOURCES = t-eoVector.cpp -t_eoGA_SOURCES = t-eoGA.cpp -t_eoReal_SOURCES = t-eoReal.cpp -t_eoESAll_SOURCES = t-eoESAll.cpp -t_eoSSGA_SOURCES = t-eoSSGA.cpp -t_eoPareto_SOURCES = t-eoPareto.cpp -t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp -t_eoPBIL_SOURCES = t-eoPBIL.cpp -t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp -t_eoRoulette_SOURCES = t-eoRoulette.cpp -t_eoSharing_SOURCES = t-eoSharing.cpp -t_eoCMAES_SOURCES = t-eoCMAES.cpp -t_eoRNG_SOURCES = t-eoRNG.cpp -t_eoSecondsElapsedContinue_SOURCES = t-eoSecondsElapsedContinue.cpp -t_eoEasyPSO_SOURCES = t-eoEasyPSO.cpp -t_eoNSGA_SOURCES = t-eoNSGA.cpp -t_eoFrontSorter_SOURCES = t-eoFrontSorter.cpp -t_eoEpsMOEA_SOURCES = t-eoEpsMOEA.cpp -t_eoInt_SOURCES = t-eoInt.cpp -t_eoInitPermutation_SOURCES = t-eoInitPermutation.cpp -t_eoSwapMutation_SOURCES = t-eoSwapMutation.cpp -t_eoShiftMutation_SOURCES = t-eoShiftMutation.cpp -t_eoTwoOptMutation_SOURCES = t-eoTwoOptMutation.cpp -t_eoRingTopology_SOURCES = t-eoRingTopology.cpp -t_eoSyncEasyPSO_SOURCES = t-eoSyncEasyPSO.cpp diff --git a/eo/tutorial/Lesson1/Makefile.am b/eo/tutorial/Lesson1/Makefile.am deleted file mode 100644 index d74f07337..000000000 --- a/eo/tutorial/Lesson1/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ - -noinst_PROGRAMS = FirstBitGA FirstRealGA exercise1.3 - -FirstBitGA_SOURCES = FirstBitGA.cpp - -FirstRealGA_SOURCES = FirstRealGA.cpp - -exercise1_3_SOURCES = exercise1.3.cpp - - -LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils - -LIBS = -lga -leoutils -leo - -INCLUDES = -I$(top_srcdir)/src - diff --git a/eo/tutorial/Lesson2/Makefile.am b/eo/tutorial/Lesson2/Makefile.am deleted file mode 100644 index 44abb144c..000000000 --- a/eo/tutorial/Lesson2/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ - -noinst_PROGRAMS = FirstBitEA FirstRealEA exercise2.3 - - -FirstBitEA_SOURCES = FirstBitEA.cpp - -FirstRealEA_SOURCES = FirstRealEA.cpp - -exercise2_3_SOURCES = exercise2.3.cpp - - -noinst_HEADERS = binary_value.h \ - real_value.h - -extra_DIST = Makefile.simple - - -LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils - -LIBS = -lga -leo -leoutils - -INCLUDES = -I$(top_srcdir)/src - diff --git a/eo/tutorial/Lesson3/Makefile.am b/eo/tutorial/Lesson3/Makefile.am deleted file mode 100644 index 50f53cd8b..000000000 --- a/eo/tutorial/Lesson3/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ - -noinst_PROGRAMS = SecondBitEA SecondRealEA exercise3.1 - - -SecondBitEA_SOURCES = SecondBitEA.cpp - -SecondRealEA_SOURCES = SecondRealEA.cpp - -exercise3_1_SOURCES = exercise3.1.cpp - - -noinst_HEADERS = binary_value.h \ - real_value.h - -extra_DIST = Makefile.simple - - -LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils - -LIBS = -lga -leoutils -leo - -INCLUDES = -I$(top_srcdir)/src diff --git a/eo/tutorial/Lesson4/Makefile.am b/eo/tutorial/Lesson4/Makefile.am deleted file mode 100644 index 7b1c2dcce..000000000 --- a/eo/tutorial/Lesson4/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -noinst_PROGRAMS = BitEA RealEA ESEA - - -BitEA_SOURCES = BitEA.cpp - -RealEA_SOURCES = RealEA.cpp - -ESEA_SOURCES = ESEA.cpp - - -noinst_HEADERS = binary_value.h \ - real_value.h - -extra_DIST = Makefile.simple - - -AM_CXXFLAGS = -I$(top_srcdir)/src - -LIBEO = $(top_builddir)/src/libeo.a -LIBES = $(top_builddir)/src/es/libes.a -LIBGA = $(top_builddir)/src/ga/libga.a -LIBUTILS = $(top_builddir)/src/utils/libeoutils.a - -DEPS = $(LIBEO) $(LIBUTILS) $(LIBES) $(LIBGA) - -LIBS = $(LIBES) $(LIBGA) $(LIBEO) $(LIBUTILS) diff --git a/eo/tutorial/Lesson5/Makefile.am b/eo/tutorial/Lesson5/Makefile.am deleted file mode 100644 index 110cfb087..000000000 --- a/eo/tutorial/Lesson5/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ - -noinst_PROGRAMS = OneMaxEA OneMaxLibEA - -OneMaxEA_SOURCES = OneMaxEA.cpp - -OneMaxLibEA_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp - - -noinst_HEADERS = eoOneMax.h \ - eoOneMaxEvalFunc.h \ - eoOneMaxInit.h \ - eoOneMaxMutation.h \ - eoOneMaxQuadCrossover.h \ - make_genotype_OneMax.h \ - make_op_OneMax.h - -extra_DIST = Makefile.simple - -AM_CXXFLAGS = -I$(top_srcdir)/src - -LIBEO = $(top_builddir)/src/libeo.a -LIBES = $(top_builddir)/src/es/libes.a -LIBGA = $(top_builddir)/src/ga/libga.a -LIBUTILS = $(top_builddir)/src/utils/libeoutils.a - -DEPS = $(LIBEO) $(LIBUTILS) $(LIBES) $(LIBGA) - -LIBS = $(LIBES) $(LIBGA) $(LIBEO) $(LIBUTILS) diff --git a/eo/tutorial/Lesson6/Makefile.am b/eo/tutorial/Lesson6/Makefile.am deleted file mode 100644 index 460fae7ac..000000000 --- a/eo/tutorial/Lesson6/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ - -noinst_PROGRAMS = BinaryPSO RealPSO - - -SecondBitEA_SOURCES = BinaryPSO.cpp - -SecondRealEA_SOURCES = RealPSO.cpp - - -noinst_HEADERS = - -extra_DIST = Makefile.simple - - -LDADD = -L$(top_builddir)/src - -LIBS = -leoutils -leo - -INCLUDES = -I$(top_srcdir)/src diff --git a/eo/tutorial/Makefile.am b/eo/tutorial/Makefile.am deleted file mode 100644 index 41f6058d7..000000000 --- a/eo/tutorial/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = html Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 pdf Templates - diff --git a/eo/tutorial/Templates/Makefile.am b/eo/tutorial/Templates/Makefile.am deleted file mode 100644 index c7c30ced0..000000000 --- a/eo/tutorial/Templates/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -EXTRA_DIST = EO.tpl \ - eoMyStruct.tmpl \ - evalFunc.tmpl \ - init.tmpl \ - mutation.tmpl \ - quadCrossover.tmpl \ - MyStructSEA.cpp \ - stat.tmpl \ - README \ - README.manual \ - README.tmpl \ - configure.ac.tmpl \ - Makefile.am.top-tmpl \ - Makefile.am.src-tmpl \ - createEOproject.sh diff --git a/eo/tutorial/html/Makefile.am b/eo/tutorial/html/Makefile.am deleted file mode 100644 index 0191bbefb..000000000 --- a/eo/tutorial/html/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -EXTRA_DIST = BitEA.html \ - EA_tutorial.jpg \ - FirstBitEA.html \ - FirstBitGA.html \ - FirstRealEA.html \ - FirstRealGA.html \ - Firstmerge.html \ - NoWay.html \ - OneMaxEA.html \ - SecondBitEA.html \ - SecondRealEA.html \ - beige009.jpg \ - binary_value.html \ - debut.html \ - eoBottomUp.html \ - eoCheckPoint.html \ - eoEngine.html \ - eoEval.html \ - eoGeneration.html \ - eoInit.html \ - eoIo.html \ - eoLesson1.html \ - eoLesson2.html \ - eoLesson3.html \ - eoLesson4.html \ - eoLesson5.html \ - eoOneMax.html \ - eoOneMaxEvalFunc.html \ - eoOneMaxInit.html \ - eoOneMaxMutation.html \ - eoOneMaxQuadCrossover.html \ - eoOneMax_complete.html \ - eoOperators.html \ - eoOutput.html \ - eoProgramming.html \ - eoRepresentation.html \ - eoSGA.html \ - eoSelect.html \ - eoStop.html \ - eoTopDown.html \ - eoTutorial.html \ - make_genotype_OneMax.html \ - make_op_OneMax.html \ - real_value.html diff --git a/eo/tutorial/pdf/Makefile.am b/eo/tutorial/pdf/Makefile.am deleted file mode 100644 index 363f857f7..000000000 --- a/eo/tutorial/pdf/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = diff --git a/eo/win/Makefile.am b/eo/win/Makefile.am deleted file mode 100644 index fdb0ff6cf..000000000 --- a/eo/win/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -EXTRA_DIST = eo.sln \ - EO/eo.vcproj \ - ES/es.vcproj \ - GA/ga.vcproj \ - UTILS/utils.vcproj \ - README \ - lib/Readme From 541a14babff45c4f616184d770f508cd43de709b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 1 Sep 2010 17:30:50 +0200 Subject: [PATCH 1546/2134] * packaging: now the test and tutorial binaries are installed in share directory --- eo/Packaging.cmake | 16 +++- eo/test/CMakeLists.txt | 132 +++++++++++++++-------------- eo/tutorial/Lesson1/CMakeLists.txt | 7 ++ eo/tutorial/Lesson2/CMakeLists.txt | 8 ++ eo/tutorial/Lesson3/CMakeLists.txt | 8 ++ eo/tutorial/Lesson4/CMakeLists.txt | 8 ++ eo/tutorial/Lesson5/CMakeLists.txt | 7 ++ eo/tutorial/Lesson6/CMakeLists.txt | 7 ++ 8 files changed, 127 insertions(+), 66 deletions(-) diff --git a/eo/Packaging.cmake b/eo/Packaging.cmake index 7bdaa5de1..c9e2d44b1 100644 --- a/eo/Packaging.cmake +++ b/eo/Packaging.cmake @@ -17,13 +17,23 @@ ENDIF() ### 2) Set up components ###################################################################################### -SET(CPACK_COMPONENTS_ALL libraries) -SET(CPACK_ALL_INSTALL_TYPES Full) +SET(CPACK_COMPONENTS_ALL libraries test examples) +SET(CPACK_ALL_INSTALL_TYPES Minimal Full) SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "${PACKAGE_NAME}") SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "${PACKAGE_NAME} library") SET(CPACK_COMPONENT_LIBRARIES_GROUP "Devel") -SET(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Full) +SET(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Minimal Full) + +SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "${PACKAGE_NAME}") +SET(CPACK_COMPONENT_TEST_DESCRIPTION "${PACKAGE_NAME} test") +SET(CPACK_COMPONENT_TEST_GROUP "Devel") +SET(CPACK_COMPONENT_TEST_INSTALL_TYPES Full) + +SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "${PACKAGE_NAME}") +SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "${PACKAGE_NAME} examples") +SET(CPACK_COMPONENT_EXAMPLES_GROUP "Devel") +SET(CPACK_COMPONENT_EXAMPLES_INSTALL_TYPES Full) ###################################################################################### diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index e9ecce708..cc4becdb1 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -24,72 +24,78 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ### 3) Define your targets and link the librairies ###################################################################################### -SET (TEST_LIST t-eoParetoFitness - t-eoPareto - t-eofitness - t-eoRandom - t-eobin - t-eoVirus - t-MGE - t-MGE1bit - t-MGE-control - t-eoStateAndParser - t-eoCheckpointing - t-eoSSGA - t-eoExternalEO - t-eoSymreg - t-eo - t-eoReplacement - t-eoSelect - t-eoGenOp - t-eoGA - t-eoReal - t-eoVector - t-eoESAll - t-eoPBIL - t-eoFitnessAssembled - t-eoFitnessAssembledEA - t-eoRoulette - t-eoSharing - t-eoCMAES - t-eoSecondsElapsedContinue - t-eoRNG - t-eoEasyPSO - t-eoNSGA - t-eoInt - t-eoInitPermutation - t-eoSwapMutation - t-eoShiftMutation - t-eoTwoOptMutation - t-eoRingTopology - t-eoSyncEasyPSO - t-eoOrderXover - t-eoExtendedVelocity - # t-eoFrontSorter - # t-eoEpsMOEA - t-eoLogger - ) - +SET (TEST_LIST + t-eoParetoFitness + t-eoPareto + t-eofitness + t-eoRandom + t-eobin + t-eoVirus + t-MGE + t-MGE1bit + t-MGE-control + t-eoStateAndParser + t-eoCheckpointing + t-eoSSGA + t-eoExternalEO + t-eoSymreg + t-eo + t-eoReplacement + t-eoSelect + t-eoGenOp + t-eoGA + t-eoReal + t-eoVector + t-eoESAll + t-eoPBIL + t-eoFitnessAssembled + t-eoFitnessAssembledEA + t-eoRoulette + t-eoSharing + t-eoCMAES + t-eoSecondsElapsedContinue + t-eoRNG + t-eoEasyPSO + t-eoNSGA + t-eoInt + t-eoInitPermutation + t-eoSwapMutation + t-eoShiftMutation + t-eoTwoOptMutation + t-eoRingTopology + t-eoSyncEasyPSO + t-eoOrderXover + t-eoExtendedVelocity + # t-eoFrontSorter + # t-eoEpsMOEA + t-eoLogger + ) + + FOREACH (test ${TEST_LIST}) - SET ("T_${test}_SOURCES" "${test}.cpp") + SET ("T_${test}_SOURCES" "${test}.cpp") ENDFOREACH (test) IF(ENABLE_MINIMAL_CMAKE_TESTING) - SET (MIN_TEST_LIST t-eoEasyPSO) - FOREACH (mintest ${MIN_TEST_LIST}) - SET ("T_${mintest}_SOURCES" "${mintest}.cpp") - ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) - ADD_TEST(${mintest} ${mintest}) - TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo eomoo) - ENDFOREACH (mintest) - -ELSEIF(ENABLE_CMAKE_TESTING) - FOREACH (test ${TEST_LIST}) - ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) - ADD_TEST(${test} ${test}) - TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo eomoo) - ENDFOREACH (test) -ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) -###################################################################################### + SET (MIN_TEST_LIST t-eoEasyPSO) + FOREACH (mintest ${MIN_TEST_LIST}) + SET ("T_${mintest}_SOURCES" "${mintest}.cpp") + ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) + ADD_TEST(${mintest} ${mintest}) + TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo eomoo) + ENDFOREACH (mintest) + +ELSEIF(ENABLE_CMAKE_TESTING) + + FOREACH (test ${TEST_LIST}) + ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) + ADD_TEST(${test} ${test}) + TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo eomoo) + INSTALL(TARGETS ${test} RUNTIME DESTINATION share/eo/test COMPONENT test) + ENDFOREACH (test) + +ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) + +###################################################################################### diff --git a/eo/tutorial/Lesson1/CMakeLists.txt b/eo/tutorial/Lesson1/CMakeLists.txt index 346bede15..614b8421a 100644 --- a/eo/tutorial/Lesson1/CMakeLists.txt +++ b/eo/tutorial/Lesson1/CMakeLists.txt @@ -53,5 +53,12 @@ TARGET_LINK_LIBRARIES(FirstBitGA ga eo eoutils) TARGET_LINK_LIBRARIES(FirstRealGA ga eo eoutils) TARGET_LINK_LIBRARIES(exercise1.3 ga eo eoutils) +###################################################################################### +### 6) Configure project installation paths ###################################################################################### +INSTALL(TARGETS FirstBitGA RUNTIME DESTINATION share/eo/examples/Lesson1 COMPONENT examples) +INSTALL(TARGETS FirstRealGA RUNTIME DESTINATION share/eo/examples/Lesson1 COMPONENT examples) +INSTALL(TARGETS exercise1.3 RUNTIME DESTINATION share/eo/examples/Lesson1 COMPONENT examples) + +###################################################################################### diff --git a/eo/tutorial/Lesson2/CMakeLists.txt b/eo/tutorial/Lesson2/CMakeLists.txt index 6eefc5ca3..db3e0e98c 100644 --- a/eo/tutorial/Lesson2/CMakeLists.txt +++ b/eo/tutorial/Lesson2/CMakeLists.txt @@ -50,3 +50,11 @@ TARGET_LINK_LIBRARIES(FirstRealEA ga eo eoutils) TARGET_LINK_LIBRARIES(exercise2.3 ga eo eoutils) ###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS FirstBitEA RUNTIME DESTINATION share/eo/examples/Lesson2 COMPONENT examples) +INSTALL(TARGETS FirstRealEA RUNTIME DESTINATION share/eo/examples/Lesson2 COMPONENT examples) +INSTALL(TARGETS exercise2.3 RUNTIME DESTINATION share/eo/examples/Lesson2 COMPONENT examples) + +###################################################################################### diff --git a/eo/tutorial/Lesson3/CMakeLists.txt b/eo/tutorial/Lesson3/CMakeLists.txt index 836df97d1..b3e7c0a78 100644 --- a/eo/tutorial/Lesson3/CMakeLists.txt +++ b/eo/tutorial/Lesson3/CMakeLists.txt @@ -54,4 +54,12 @@ TARGET_LINK_LIBRARIES(SecondRealEA ga eoutils eo) TARGET_LINK_LIBRARIES(exercise3.1 ga eoutils eo) ###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS SecondBitEA RUNTIME DESTINATION share/eo/examples/Lesson3 COMPONENT examples) +INSTALL(TARGETS SecondRealEA RUNTIME DESTINATION share/eo/examples/Lesson3 COMPONENT examples) +INSTALL(TARGETS exercise3.1 RUNTIME DESTINATION share/eo/examples/Lesson3 COMPONENT examples) + +###################################################################################### diff --git a/eo/tutorial/Lesson4/CMakeLists.txt b/eo/tutorial/Lesson4/CMakeLists.txt index d2f1a5199..20e0cde43 100644 --- a/eo/tutorial/Lesson4/CMakeLists.txt +++ b/eo/tutorial/Lesson4/CMakeLists.txt @@ -88,4 +88,12 @@ TARGET_LINK_LIBRARIES(RealEA es ga eo eoutils) TARGET_LINK_LIBRARIES(ESEA es ga eo eoutils) ###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS BitEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT examples) +INSTALL(TARGETS RealEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT examples) +INSTALL(TARGETS ESEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT examples) + +###################################################################################### diff --git a/eo/tutorial/Lesson5/CMakeLists.txt b/eo/tutorial/Lesson5/CMakeLists.txt index 8a2eb1033..224552e3f 100644 --- a/eo/tutorial/Lesson5/CMakeLists.txt +++ b/eo/tutorial/Lesson5/CMakeLists.txt @@ -47,3 +47,10 @@ TARGET_LINK_LIBRARIES(OneMaxEA es ga eo eoutils) TARGET_LINK_LIBRARIES(OneMaxLibEA es ga eo eoutils) ###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS OneMaxEA RUNTIME DESTINATION share/eo/examples/Lesson5 COMPONENT examples) +INSTALL(TARGETS OneMaxLibEA RUNTIME DESTINATION share/eo/examples/Lesson5 COMPONENT examples) + +###################################################################################### diff --git a/eo/tutorial/Lesson6/CMakeLists.txt b/eo/tutorial/Lesson6/CMakeLists.txt index 4d967d717..b1e414537 100644 --- a/eo/tutorial/Lesson6/CMakeLists.txt +++ b/eo/tutorial/Lesson6/CMakeLists.txt @@ -42,4 +42,11 @@ TARGET_LINK_LIBRARIES(BinaryPSO eo eoutils) TARGET_LINK_LIBRARIES(RealPSO eo eoutils) ###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS BinaryPSO RUNTIME DESTINATION share/eo/examples/Lesson6 COMPONENT examples) +INSTALL(TARGETS RealPSO RUNTIME DESTINATION share/eo/examples/Lesson6 COMPONENT examples) + +###################################################################################### From f7170e2ebacda69cc42034149ebb22b58e91ef29 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 1 Sep 2010 19:15:26 +0200 Subject: [PATCH 1547/2134] * t-eoLogger: missed some code lines to display correctly the help --- eo/test/t-eoLogger.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eo/test/t-eoLogger.cpp b/eo/test/t-eoLogger.cpp index b263b7b83..e306fb9d3 100644 --- a/eo/test/t-eoLogger.cpp +++ b/eo/test/t-eoLogger.cpp @@ -14,8 +14,13 @@ int main(int ac, char** av) { eoParserLogger parser(ac, av); - make_help(parser); + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + make_help(parser); make_verbose(parser); eo::log << eo::setlevel(eo::debug); From 2b4f14b8d720611cb34d60cbabc1eb53ed3efd90 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 3 Sep 2010 09:19:23 +0200 Subject: [PATCH 1548/2134] official xmpp chat room --- website/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/index.html b/website/index.html index 97010172d..306078c0a 100644 --- a/website/index.html +++ b/website/index.html @@ -147,7 +147,7 @@

      With the help of EO, you can easily design evolutionary algorithms that will find solutions to virtually all kind of hard optimization problems, from continuous to combinatorial ones.

      -

      If you want to help us to improve EO, the easiest way is to click on the following button: +

      If you want to know how to help us to improve EO, the easiest way is to click on the following button:

      @@ -168,8 +168,11 @@
      +

      +

      If you need immediate support or have any question, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

      +

      Features ⤒

      Component-based framework

      From be19562147e9c55326ec9e139ec7221be5e2a5cc Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 3 Sep 2010 15:55:28 +0200 Subject: [PATCH 1549/2134] Patch from Karima.Boufaras@inria.fr: compilation wth CUDACC --- eo/src/PO.h | 6 +++- eo/src/eoPop.h | 65 ++++++++++++++++++++++++++++------------ eo/src/eoScalarFitness.h | 6 ++++ 3 files changed, 57 insertions(+), 20 deletions(-) diff --git a/eo/src/PO.h b/eo/src/PO.h index 2cac3d864..1b15ef030 100644 --- a/eo/src/PO.h +++ b/eo/src/PO.h @@ -41,7 +41,11 @@ template < class F > class PO:public EO < F > public: - typedef typename PO < F >::Fitness Fitness; + #if defined(__CUDACC__) + typedef typename EO < F >::Fitness Fitness; + #else + typedef typename PO::Fitness Fitness; + #endif /** Default constructor. Fitness must have a ctor which takes 0 as a value. Best fitness mush also have the same constructor. diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 2b1a08f68..99927e25a 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -53,16 +53,20 @@ template class eoPop: public std::vector, public eoObject, public eoPersistent { +public: + + using std::vector::size; + using std::vector::resize; + using std::vector::operator[]; + using std::vector::begin; + using std::vector::end; + + typedef typename EOT::Fitness Fitness; +#if defined(__CUDACC__) + typedef typename std::vector::iterator iterator; + typedef typename std::vector::const_iterator const_iterator; +#endif - public: - - using std::vector::size; - using std::vector::resize; - using std::vector::operator[]; - using std::vector::begin; - using std::vector::end; - - typedef typename EOT::Fitness Fitness; /** Default ctor. Creates empty pop */ eoPop() : std::vector(), eoObject(), eoPersistent() {}; @@ -177,30 +181,48 @@ class eoPop: public std::vector, public eoObject, public eoPersistent } /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ - typename eoPop::iterator it_best_element() + eoPop::iterator it_best_element() { - typename eoPop::iterator it = std::max_element(begin(), end()); +#if defined(__CUDACC__) + eoPop:: iterator it = std::max_element(begin(), end()); +#else + typename eoPop::iterator it_best_element() { + typename eoPop::iterator it = std::max_element(begin(), end()); +#endif return it; } /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ const EOT & best_element() const { - typename eoPop::const_iterator it = std::max_element(begin(), end()); +#if defined(__CUDACC__) + eoPop::const_iterator it = std::max_element(begin(), end()); +#else + typename eoPop::const_iterator it = std::max_element(begin(), end()); +#endif return (*it); } /** returns a const reference to the worse individual DOES NOT MOVE ANYBODY */ const EOT & worse_element() const { - typename eoPop::const_iterator it = std::min_element(begin(), end()); +#if defined(__CUDACC__) + eoPop::const_iterator it = std::min_element(begin(), end()); +#else + typename eoPop::const_iterator it = std::min_element(begin(), end()); +#endif return (*it); } /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ - typename eoPop::iterator it_worse_element() - { - typename eoPop::iterator it = std::min_element(begin(), end()); + eoPop::iterator it_worse_element() + { +#if defined(__CUDACC__) + eoPop::iterator it = std::min_element(begin(), end()); +#else + typename eoPop::iterator it_worse_element() { + typename eoPop::iterator it = std::min_element(begin(), end()); +#endif return it; } @@ -208,9 +230,14 @@ class eoPop: public std::vector, public eoObject, public eoPersistent slightly faster algorithm than sort to find all individuals that are better than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. */ - typename eoPop::iterator nth_element(int nth) - { - typename eoPop::iterator it = begin() + nth; + eoPop::iterator nth_element(int nth) + { +#if defined(__CUDACC__) + eoPop::iterator it = begin() + nth; +#else + typename eoPop::iterator nth_element(int nth) { + typename eoPop::iterator it = begin() + nth; +#endif std::nth_element(begin(), it, end(), std::greater()); return it; } diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 59c68f9b3..26bad2737 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -82,8 +82,14 @@ and minimizing fitness compares with greater. This because we want ordinary fitness values (doubles) to be equivalent with Maximizing Fitness, and comparing with less is the default behaviour. */ + +#if defined(__CUDACC__) +typedef eoScalarFitness > eoMaximizingFitness; +typedef eoScalarFitness > eoMinimizingFitness; +#else typedef eoScalarFitness > eoMaximizingFitness; typedef eoScalarFitness > eoMinimizingFitness; +#endif template std::ostream& operator<<(std::ostream& os, const eoScalarFitness& f) From 97143d65a398de62fb1c0d4dfc1a28545010fb16 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 3 Sep 2010 18:32:27 +0200 Subject: [PATCH 1550/2134] switch to new MO 1.3 classes and interface --- src/doEDASA.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doEDASA.h b/src/doEDASA.h index 05c8cc1c9..c0dce883d 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -59,8 +59,8 @@ public: eoContinue< EOT > & pop_continue, doContinue< D > & distribution_continue, eoEvalFunc < EOT > & evaluation, - moSolContinue < EOT > & sa_continue, - moCoolingSchedule & cooling_schedule, + moContinuator< moDummyNeighbor > & sa_continue, + moCoolingSchedule & cooling_schedule, double initial_temperature, eoReplacement< EOT > & replacor ) @@ -227,10 +227,10 @@ private: eoEvalFunc < EOT > & _evaluation; //! Stopping criterion before temperature update - moSolContinue < EOT > & _sa_continue; + moContinuator< moDummyNeighbor > & _sa_continue; //! The cooling schedule - moCoolingSchedule & _cooling_schedule; + moCoolingSchedule & _cooling_schedule; //! Initial temperature double _initial_temperature; From 5dc8a1a8fe55b92b468d5bdc189fd02426095f79 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sat, 4 Sep 2010 23:07:37 +0200 Subject: [PATCH 1551/2134] some MO types replacement --- application/eda_sa/main.cpp | 8 ++++---- src/doEDASA.h | 7 +++++-- src/doSampler.h | 7 +++++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index 023976ca0..b873c1d67 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -124,7 +124,7 @@ int main(int ac, char** av) unsigned int popSize = parser.getORcreateParam((unsigned int)20, "popSize", "Population Size", 'P', "Evolution Engine").value(); - moGenSolContinue< EOT >* sa_continue = new moGenSolContinue< EOT >( popSize ); + moContinuator< moDummyNeighbor >* sa_continue = new moIterContinuator< moDummyNeighbor >( popSize ); state.storeFunctor(sa_continue); //----------------------------------------------------------------------------- @@ -134,10 +134,10 @@ int main(int ac, char** av) // SA parameters //----------------------------------------------------------------------------- - double threshold = parser.createParam((double)0.1, "threshold", "Threshold: temperature threshold stopping criteria", 't', section).value(); // t - double alpha = parser.createParam((double)0.1, "alpha", "Alpha: temperature dicrease rate", 'a', section).value(); // a + double threshold_temperature = parser.createParam((double)0.1, "threshold", "Minimal temperature at which stop", 't', section).value(); // t + double alpha = parser.createParam((double)0.1, "alpha", "Temperature decrease rate", 'a', section).value(); // a - moCoolingSchedule* cooling_schedule = new moGeometricCoolingSchedule(threshold, alpha); + moCoolingSchedule* cooling_schedule = new moSimpleCoolingSchedule(initial_temperature, alpha, 0, threshold_temperature); state.storeFunctor(cooling_schedule); //----------------------------------------------------------------------------- diff --git a/src/doEDASA.h b/src/doEDASA.h index c0dce883d..93586249d 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -75,7 +75,9 @@ public: _sa_continue(sa_continue), _cooling_schedule(cooling_schedule), _initial_temperature(initial_temperature), - _replacor(replacor) + _replacor(replacor), + _dummy_neighbor() + {} //! function that launches the EDASA algorithm. @@ -124,7 +126,7 @@ public: //------------------------------------------------------------- - _sa_continue.init(); + _sa_continue.init( _dummy_neighbor ); //------------------------------------------------------------- @@ -256,6 +258,7 @@ private: //------------------------------------------------------------- + moDummyNeighbor _dummy_neighbor; }; #endif // !_doEDASA_h diff --git a/src/doSampler.h b/src/doSampler.h index 636412476..dac38e5fe 100644 --- a/src/doSampler.h +++ b/src/doSampler.h @@ -11,6 +11,7 @@ #include #include "doBounder.h" +#include "doBounderNo.h" template < typename D > class doSampler : public eoUF< D&, typename D::EOType > @@ -22,6 +23,10 @@ public: : _bounder(bounder) {} + doSampler() + : _bounder( _dummy_bounder ) + {} + // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) virtual EOType sample( D& ) = 0; @@ -60,6 +65,8 @@ public: private: //! Bounder functor doBounder< EOType > & _bounder; + + doBounderNo _dummy_bounder; }; #endif // !_doSampler_h From b18817b46fb40feec2e4d71ac8b69e89795a2570 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 5 Sep 2010 23:42:58 +0200 Subject: [PATCH 1552/2134] use eo::log instead of cout --- eo/src/utils/eoStdoutMonitor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index 8120f516b..b0b3863dd 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -10,6 +10,7 @@ #include #include #include +#include using namespace std; @@ -23,7 +24,7 @@ eoMonitor& eoStdoutMonitor::operator()(void) if (firsttime) { if (verbose) - cout << "First Generation" << endl; + eo::log << eo::progress << "First Generation" << endl; else { for(iterator it = vec.begin(); it != vec.end(); ++it) @@ -41,7 +42,7 @@ eoMonitor& eoStdoutMonitor::operator()(void) { cout << (*it)->longName() << ": " << (*it)->getValue() << '\n'; } - cout << "\n****** End of Generation ******\n" << endl; + eo::log << eo::progress << "End of Generation\n" << endl; } else // a one-liner { From b9d74c0b55590e980a2173721ca266d7e9f3e68e Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 5 Sep 2010 23:56:17 +0200 Subject: [PATCH 1553/2134] replace \n with endl --- eo/src/utils/eoStdoutMonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index b0b3863dd..95754de44 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -40,9 +40,9 @@ eoMonitor& eoStdoutMonitor::operator()(void) { for(iterator it = vec.begin(); it != vec.end(); ++it) { - cout << (*it)->longName() << ": " << (*it)->getValue() << '\n'; + cout << (*it)->longName() << ": " << (*it)->getValue() << endl; } - eo::log << eo::progress << "End of Generation\n" << endl; + eo::log << eo::progress << "End of Generation" << endl; } else // a one-liner { From 236dd026088d572022729a7ca103ca74f9072ba4 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 6 Sep 2010 00:04:37 +0200 Subject: [PATCH 1554/2134] indent clean, more comments --- eo/src/utils/eoStdoutMonitor.cpp | 70 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index 95754de44..622a2743e 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -16,41 +16,43 @@ using namespace std; eoMonitor& eoStdoutMonitor::operator()(void) { - if (!cout) - { - string str = "eoStdoutMonitor: Could not write to cout"; - throw runtime_error(str); + if (!cout) { + string str = "eoStdoutMonitor: Could not write to cout"; + throw runtime_error (str); } - if (firsttime) - { - if (verbose) + + if (firsttime) { + + if (verbose) { eo::log << eo::progress << "First Generation" << endl; - else - { - for(iterator it = vec.begin(); it != vec.end(); ++it) - { - cout << (*it)->longName() << delim; - } - cout << endl; - } - firsttime = false; - } + + } else { // else verbose + for (iterator it = vec.begin (); it != vec.end (); ++it) { + cout << (*it)->longName () << delim; + } + cout << endl; + } // else verbose + + firsttime = false; + } // if firstime + // ok, now the real saving. write out - if (verbose) - { - for(iterator it = vec.begin(); it != vec.end(); ++it) - { - cout << (*it)->longName() << ": " << (*it)->getValue() << endl; - } - eo::log << eo::progress << "End of Generation" << endl; - } - else // a one-liner - { - for(iterator it = vec.begin(); it != vec.end(); ++it) - { - cout << (*it)->getValue() << delim; - } - cout << endl; - } - return *this; + if (verbose) { + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // name: value + cout << (*it)->longName () << ": " << (*it)->getValue () << endl; + } // for it in vec + + eo::log << eo::progress << "End of Generation" << endl; + + } else { // else verbose + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // value only + cout << (*it)->getValue () << delim; + } // for it in vec + + cout << endl; + } // if verbose + + return *this; } From c8d9acd0a5f7d28ff93960685b87d4837425b46a Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 6 Sep 2010 10:43:07 +0200 Subject: [PATCH 1555/2134] constructors for passing the bounder to super class --- src/doSamplerUniform.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/doSamplerUniform.h b/src/doSamplerUniform.h index e407360dd..1d62b903c 100644 --- a/src/doSamplerUniform.h +++ b/src/doSamplerUniform.h @@ -18,10 +18,23 @@ * This class uses the Uniform distribution parameters (bounds) to return * a random position used for population sampling. */ -template < typename EOT > +template < typename EOT, class D=doUniform > class doSamplerUniform : public doSampler< doUniform< EOT > > { public: + + typedef D Distrib; + + doSamplerUniform(doBounder< EOT > & bounder) + : doSampler< doUniform >(bounder) + {} + + /* + doSamplerUniform() + : doSampler< doUniform >() + {} + */ + EOT sample( doUniform< EOT >& distrib ) { unsigned int size = distrib.size(); From acadd9928157f7c6da6c0e0bb010d2fdd092d20b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 6 Sep 2010 10:43:34 +0200 Subject: [PATCH 1556/2134] no more dummy bounder --- src/doSampler.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/doSampler.h b/src/doSampler.h index dac38e5fe..0d69223c4 100644 --- a/src/doSampler.h +++ b/src/doSampler.h @@ -20,12 +20,14 @@ public: typedef typename D::EOType EOType; doSampler(doBounder< EOType > & bounder) - : _bounder(bounder) + : /*_dummy_bounder(),*/ _bounder(bounder) {} + /* doSampler() - : _bounder( _dummy_bounder ) + : _dummy_bounder(), _bounder( _dummy_bounder ) {} + */ // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) @@ -63,10 +65,11 @@ public: } private: + //doBounderNo _dummy_bounder; + //! Bounder functor doBounder< EOType > & _bounder; - doBounderNo _dummy_bounder; }; #endif // !_doSampler_h From 3c2639a876148028fb779176c519415ec36087b3 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 6 Sep 2010 11:20:00 +0200 Subject: [PATCH 1557/2134] use eo::log instead of cout --- eo/src/eoSteadyFitContinue.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index c9d8ca7ed..ef78aa127 100644 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -26,6 +26,7 @@ #define _eoSteadyFitContinue_h #include +#include /** A continuator: does a minimum number of generations, then @@ -54,7 +55,7 @@ public: * reached withtout improvement */ virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; - // std::cout << " [" << thisGeneration << "] "; + Fitness bestCurrentFitness = _vEO.nth_element_fitness(0); if (steadyState) { // already after MinGenenerations @@ -63,7 +64,7 @@ public: lastImprovement = thisGeneration; } else { if (thisGeneration - lastImprovement > repSteadyGenerations) { - std::cout << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations + eo::log << eo::progress << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations << " generations without improvement\n"; return false; } @@ -73,7 +74,7 @@ public: steadyState = true; bestSoFar = bestCurrentFitness; lastImprovement = thisGeneration; - std::cout << "eoSteadyFitContinue: Done the minimum number of generations\n"; + eo::log << eo::progress << "eoSteadyFitContinue: Done the minimum number of generations\n"; } } return true; From 526dfe150b42711086b486375b57396db0e7d4dc Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 6 Sep 2010 12:05:13 +0200 Subject: [PATCH 1558/2134] bugfix xdebug level --- eo/src/utils/eoLogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index a5e24c2d1..ff8dcea43 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -58,7 +58,7 @@ eoLogger::eoLogger() addLevel("progress", eo::progress); addLevel("logging", eo::logging); addLevel("debug", eo::debug); - addLevel("xdebug", eo::debug); + addLevel("xdebug", eo::xdebug); } eoLogger::~eoLogger() From 56680e865dac21a81086d3e854dcd4607dff88cc Mon Sep 17 00:00:00 2001 From: Caner CANDAN Date: Tue, 7 Sep 2010 15:36:16 +0200 Subject: [PATCH 1559/2134] * fixed bad using of method moNeighbor< EOT >::init( EOT& ) --- src/doEDASA.h | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/doEDASA.h b/src/doEDASA.h index 93586249d..c8e9ad9a9 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -75,8 +75,7 @@ public: _sa_continue(sa_continue), _cooling_schedule(cooling_schedule), _initial_temperature(initial_temperature), - _replacor(replacor), - _dummy_neighbor() + _replacor(replacor) {} @@ -126,9 +125,6 @@ public: //------------------------------------------------------------- - _sa_continue.init( _dummy_neighbor ); - - //------------------------------------------------------------- // (4) Estimation of the distribution parameters //------------------------------------------------------------- @@ -167,6 +163,8 @@ public: // Building of the sampler in current_pop //------------------------------------------------------------- + _sa_continue.init( current_solution ); + current_pop.clear(); do @@ -239,26 +237,6 @@ private: //! A EOT replacor eoReplacement < EOT > & _replacor; - - //------------------------------------------------------------- - // Temporary solution to store populations state at each - // iteration for plotting. - //------------------------------------------------------------- - - // std::ofstream _ofs_params; - // std::ofstream _ofs_params_var; - - //------------------------------------------------------------- - - //------------------------------------------------------------- - // Temporary solution to store bounds values for each distribution. - //------------------------------------------------------------- - - // std::string _bounds_results_destination; - - //------------------------------------------------------------- - - moDummyNeighbor _dummy_neighbor; }; #endif // !_doEDASA_h From 2e43f4743ae43ddf096001647c2aeb3f3d1aed10 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 8 Sep 2010 12:14:15 +0200 Subject: [PATCH 1560/2134] bounder on uniform distribution that can handle different bounds on several dimensions --- src/doBounderUniform.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/doBounderUniform.h diff --git a/src/doBounderUniform.h b/src/doBounderUniform.h new file mode 100644 index 000000000..9fac7dac3 --- /dev/null +++ b/src/doBounderUniform.h @@ -0,0 +1,35 @@ +// (c) Thales group, 2010 +/* + Authors: + Johann Dreo +*/ + +#ifndef _doBounderUniform_h +#define _doBounderUniform_h + +#include "doBounder.h" + +template < typename EOT > +class doBounderUniform : public doBounder< EOT > +{ +public: + doBounderUniform( EOT min, EOT max ) + : doBounder< EOT >( min, max ) + {} + + void operator()( EOT& sol ) + { + unsigned int size = sol.size(); + assert(size > 0); + + for (unsigned int d = 0; d < size; ++d) { + + if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { + // use EO's global "rng" + sol[d] = rng.uniform( this->min()[d], this->max()[d] ); + } + } // for d in size + } +}; + +#endif // !_doBounderUniform_h From 70cfb72205225baf1d7e41bc0a83c22cf4df2cfb Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 07:56:15 +0200 Subject: [PATCH 1561/2134] * added some features in plot.py plotting script --- application/eda_sa/plot.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) mode change 100644 => 100755 application/eda_sa/plot.py diff --git a/application/eda_sa/plot.py b/application/eda_sa/plot.py old mode 100644 new mode 100755 index 1d3298e24..81a3cabf5 --- a/application/eda_sa/plot.py +++ b/application/eda_sa/plot.py @@ -38,11 +38,12 @@ def logger(level_name, filename='plot.log'): def parser(parser=optparse.OptionParser()): parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='warning', help='set a verbose level') - parser.add_option('-f', '--file', help='give an input project filename', default='') + parser.add_option('-f', '--files', help='give some input sample files separated by comma (cf. gen1,gen2,...)', default='') parser.add_option('-o', '--output', help='give an output filename for logging', default='plot.log') parser.add_option('-d', '--dimension', help='give a dimension size', default=2) parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True) parser.add_option('-p', '--plot', action="store_false", help='plot graphics separetly, one by window', dest="multiplot") + parser.add_option('-w', '--window', help='give the number of the window you want to display, 0 means you want to display all ones', default=0) options, args = parser.parse_args() @@ -84,8 +85,14 @@ def draw3DRect(min=(0,0,0), max=(1,1,1), state=None, g=None): def getSortedFiles(path): assert path != None - filelist = os.listdir(path) - filelist.sort() + if options.files == '': + + filelist = os.listdir(path) + filelist.sort() + + else: + + filelist = options.files.split(',') return filelist @@ -240,9 +247,12 @@ def plot2DRectFromFiles(path, state=None, g=None, plot=True): return g -def main(n): +def main(): gstate = [] + n = int(options.dimension) + w = int(options.window) + if options.multiplot: g = Gnuplot.Gnuplot() @@ -275,19 +285,24 @@ def main(n): plotXYZPoint('./ResPop', state=gstate, g=g) g('unset multiplot') + else: - if n >= 1: + + if n >= 1 and w in [0, 1]: plotXPointYFitness('./ResPop', state=gstate) - if n >= 2: + if n >= 2 and w in [0, 2]: plotXPointYFitness('./ResPop', '4:1', state=gstate) - if n >= 2: + if n >= 2 and w in [0, 3]: plotXYPointZFitness('./ResPop', state=gstate) - if n >= 3: + if n >= 3 and w in [0, 4]: plotXYZPoint('./ResPop', state=gstate) + if n >= 2 and w in [0, 5]: + plotXYPoint('./ResPop', state=gstate) + # if n >= 1: # plotParams('./ResParams.txt', state=gstate) @@ -306,6 +321,6 @@ def main(n): if __name__ == '__main__': logging.debug('### plotting started ###') - main(int(options.dimension)) + main() logging.debug('### plotting ended ###') From 573bc959116c7027f84629774fc1da135f7728a7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 07:58:05 +0200 Subject: [PATCH 1562/2134] renamed scripts filenames --- application/eda_sa/{plot_on_ggobi.py => ggobi.py} | 0 application/eda_sa/{plot.py => gplot.py} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename application/eda_sa/{plot_on_ggobi.py => ggobi.py} (100%) rename application/eda_sa/{plot.py => gplot.py} (100%) diff --git a/application/eda_sa/plot_on_ggobi.py b/application/eda_sa/ggobi.py similarity index 100% rename from application/eda_sa/plot_on_ggobi.py rename to application/eda_sa/ggobi.py diff --git a/application/eda_sa/plot.py b/application/eda_sa/gplot.py similarity index 100% rename from application/eda_sa/plot.py rename to application/eda_sa/gplot.py From 839392f0dcf07b0c238ac012dcdd63727473ca39 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 07:59:50 +0200 Subject: [PATCH 1563/2134] buxfixed on CMakeLists.txt regarding copying failures --- application/eda_sa/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/eda_sa/CMakeLists.txt b/application/eda_sa/CMakeLists.txt index 25c077722..63901a33a 100644 --- a/application/eda_sa/CMakeLists.txt +++ b/application/eda_sa/CMakeLists.txt @@ -9,8 +9,8 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) SET(RESOURCES eda_sa.param - plot.py - plot_on_ggobi.py + gplot.py + ggobi.py ) FOREACH(file ${RESOURCES}) From f542d3f894ecede36369af494577033294ceacc3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 08:03:01 +0200 Subject: [PATCH 1564/2134] * README --- README | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README b/README index 64629f58e..f58d9d3c6 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This package contains the source code for BOPO problems. +This package contains the source code for DO. # Step 1 - Configuration ------------------------ @@ -10,7 +10,7 @@ On Windows write your path with double antislash (ex: C:\\Users\\...) # Step 2 - Build process ------------------------ ParadisEO is assumed to be compiled. To download ParadisEO, please visit http://paradiseo.gforge.inria.fr/. -Go to the BOPO/build/ directory and lunch cmake: +Go to the DO/build/ directory and lunch cmake: (Unix) > cmake .. (Windows) > cmake .. -G"Visual Studio 9 2008" @@ -19,7 +19,7 @@ Note for windows users: if you don't use VisualStudio 9, enter the name of your # Step 3 - Compilation ---------------------- -In the bopo/build/ directory: +In the do/build/ directory: (Unix) > make (Windows) Open the VisualStudio solution and compile it, compile also the target install. You can refer to this tutorial if you don't know how to compile a solution: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial @@ -29,15 +29,15 @@ You can refer to this tutorial if you don't know how to compile a solution: http --------------------- A toy example is given to test the components. You can run these tests as following. To define problem-related components for your own problem, please refer to the tutorials available on the website : http://paradiseo.gforge.inria.fr/. -In the bopo/build/ directory: +In the do/build/ directory: (Unix) > ctest Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial -In the directory "application", there are several directory such as p_eoco which instantiate NSGAII on BOPO problems. +In the directory "application", there are several directory such as eda_sa which instantiate EDA-SA solver. -(Unix) After compilation you can run the script "bopo/run.sh" and see results in "NSGAII.out". Parameters can be modified in the script. +(Unix) After compilation you can run the binary "build/eda_sa" and see results. Parameters can be modified from command line. -(Windows) Add argument "NSGAII.param" and execute the corresponding algorithms. +(Windows) Add argument "eda_sa.param" and execute the corresponding algorithms. Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial @@ -46,7 +46,7 @@ Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/i The API-documentation is available in doc/html/index.html -# Things to keep in mind when using BOPO +# Things to keep in mind when using DO ---------------------------------------- * By default, the EO random generator's seed is initialized by the number of seconds since the epoch (with time(0)). It is available in the status file dumped at each execution. Please, keep in mind that if you start two run at the same second without modifying the seed, you will get exactly the same results. From 8f735f0b165477ca43fa04fab15daa623a9a65eb Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 11:24:35 +0200 Subject: [PATCH 1565/2134] * some updates on gplot.py to have a better display + screenshots from gnuplot --- application/eda_sa/gplot.py | 16 ++++++++++++---- screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png | Bin 0 -> 78493 bytes screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png | Bin 0 -> 50871 bytes 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png create mode 100644 screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png diff --git a/application/eda_sa/gplot.py b/application/eda_sa/gplot.py index 81a3cabf5..159c1caf9 100755 --- a/application/eda_sa/gplot.py +++ b/application/eda_sa/gplot.py @@ -43,7 +43,7 @@ def parser(parser=optparse.OptionParser()): parser.add_option('-d', '--dimension', help='give a dimension size', default=2) parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True) parser.add_option('-p', '--plot', action="store_false", help='plot graphics separetly, one by window', dest="multiplot") - parser.add_option('-w', '--window', help='give the number of the window you want to display, 0 means you want to display all ones', default=0) + parser.add_option('-w', '--windowid', help='give the window id you want to display, 0 means we display all ones', default=0) options, args = parser.parse_args() @@ -251,11 +251,17 @@ def main(): gstate = [] n = int(options.dimension) - w = int(options.window) + w = int(options.windowid) if options.multiplot: g = Gnuplot.Gnuplot() + g('set parametric') + g('set nokey') + g('set noxtic') + g('set noytic') + g('set noztic') + g('set size 1.0, 1.0') g('set origin 0.0, 0.0') g('set multiplot') @@ -281,10 +287,12 @@ def main(): g('set size 0.5, 0.5') g('set origin 0.5, 0.0') - if n >= 3: + if n >= 2: + plotXYPoint('./ResPop', state=gstate, g=g) + elif n >= 3: plotXYZPoint('./ResPop', state=gstate, g=g) - g('unset multiplot') + g('set nomultiplot') else: diff --git a/screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png b/screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1f6c8855392117d3a6d17796ad3341be759a06 GIT binary patch literal 78493 zcmafbWmFwY6YUTZoM6E%gy0SVf(LhZ3+@`+A$V|icXxMp*Wm6R+~4Hh`@LUpt@q=s zbC~JruI}1hwRcS~e#uA)Bf{ap0RVs~Dk2~U0B^j(4*>H9ypnjB6bXJo+VY7iz`(#P zZAhm^JJowG~q1Qpzqs)vwWV3Y0c|Hd(HCiijMED8*|A-_9s4} zlYfBoI5*I7m76~EtO(w<=%Ea#FRq&#&G0Dz0F#L$7xMQ` z%n@M-1MvCxMys@vkG6lh)7_~!i5udPAb9V?P^f^-m&;YM;$gB}=d@x~i+=`b?9>JT zu8Z>(OgK(8UKRNXxgQ?9ojb$#WsI!-mk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j17DfSo NZ>1C^%fvtU{}=RL28aLv literal 0 HcmV?d00001 diff --git a/screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png b/screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png new file mode 100644 index 0000000000000000000000000000000000000000..578c38db178bef6cc5c9eb1a2ef073915f038965 GIT binary patch literal 50871 zcmY(r1ymK^8#X$mNJxi(l+r1Uq_lu^rywnjNSA~l-6`GONOw0#w{&;c-TwaHch|kF z1?QZZIkWeE`+43y1j@@wpdk|?LlA`aK~hu^f?&UcUkC{n97)(si~uii_QD^Ok&uw) zSLIf~$CqEl)W0fO8-I1ww=;rFtgJ1K80|mX85vpGn_7Q8f@=|gATsEK=zC?SbY*@3}X) zi4TV_JY46EQpdp5n3>H zQ!5~H3kf5U`}X&Q?R_KgcmoN!)mzoITwGHh!3mWlI>seSpEdk=>rU;*LN^) zj`_Cs@5y{Igqd*>q23=NcYJ+{2}!=Vd{=qgZ1nW6UsvYI_nq){ut2T0#64!!n#HPL z_`^})i-gENX}}Cr7$wJTImhZ}*?kc5YH3MLU5!pg%O?l-lf~bs#)BY}bech2LAohZ z_N&9?Y11kpZ&*rrr+#cG)(9T9T$G~R$k`WTvC?GG)7uLHLqW;`cjMboVUk$3vYvp!Q|MJ z4{h+|y&QT3s-xqq3Fd)_!%VwH*BuII!n|9KDNOR5SCkJQv5hsz z-EgipXX3n6b#hX%wr2iPxTdU}6c>@Z@_uFY6`7+@(ANS5Lql2~Z}wI>y0UCDoqRSS z4xXJGDP&l=ROqGB+SW!qe4J0rZshgu6t2g5ubq zpoW182Duwm@+FkpZ%982hHjr>qYJK7yIJ{j^3!e{7AG{w>d7d@2X#_J{C2K1w%-~m zR;2v1UD(-~rJ*-i@3a%CX<2WzkmIaE7ow_Fs2VNQI)~{`o2yI{q^!v(2jj&OEJTAN z{YFurM>~#IO@3SOIEhxroy>M1PU%V2MVb*Fx1fJ$XaYjofLY417peX!+(NQE=vu5e zo)V}>tmY)CK2TS~3^&3^D~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V`Stc`3O?su|@zqcoE1^!I>ip0*C3asWURG*8DAk<77#Q( zlkziwtsUH4KFV2uI3@O=yWxxsl72mZ|G$8E3Qm41WbwzdPsI|?_kl?uZhTko!1TJae&hX+AwpzOe^JvfMk%Wa|HO}oYy`ptjlOPRQV zA=Xng&Y}L7&xe=t@M{r%kSgW>&u{P$>%)@q-viUk`2H%eQ_Fb%h0H(x--qSk<7I#6 zfxsGg$=;~WT3eFO&tnipgd^}m`2+CI0O)i_Y25!l<&vGr0xF4E%w6?Z@;r8-yW)P+ zrzbk?6ZRD|>iEx(5ILSAiHRF)B=Fp~`s}l!JpW{L8ZkeYi}mwSp8vkCmM*xti<_5I z)c-lwmoun;rp?nf0VIpxcBkJ8Lh(MJ)>#VYdE6v+3UBz}5GuSRt)C= literal 0 HcmV?d00001 From f41002606813c910ae27750d85244243712d488f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 11:53:14 +0200 Subject: [PATCH 1566/2134] + new screenshot with parameters -P=10000 -d=10 --- screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png | Bin 0 -> 82590 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png diff --git a/screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png b/screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png new file mode 100644 index 0000000000000000000000000000000000000000..fc12f2a977c7a17c5c74a0cf5376b64704cbe546 GIT binary patch literal 82590 zcmZ^~WmH_z(goNAf;+)IxVtqLf(3WiKyY{W1cJLe1Pd12-Q6X)ySp}X^WOXB&#Yms zUfjNNZkuvA{oQr_WNV@bK`< zn+hAiSA1u2O=lH5Q)joYjwT>8TRR&QCMRP@6BAn}b35mA=nf$ehzukpCZg(|agyob z{Xu+bz;DjUlzM1~T9*~l0*it=NxbZL zeh8#D&=T1EsMuO*ZOzD7sm3g&l?o&Sp^Gbh$doUdIV@X=wW=d1S1+A1=OP$W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0^oEl`k#>vFpo)kNuel<%_+P>OlNe=f(853m@8d@4UTKZAjZV-`8jq?< zji{XmL*o9at)5&_8VCIgKl2~;kK~R=#krLKj}^qeA9Vv#WsuFCp$We?o*9*v*+<#- zl~($m>eLhRb4bdXp`D>NoX}q^29p7_gl^}CE=z0D<2k`#*$3a&|ECb*Xlg?hV%oiC zzffzl*LUKFyJYf!&*cB(0;sr@L^kCxSHb^4BZ7hur_G3NRMgObUGZ4nZ@>9?r7*Dj z#vk{FBF1AXE`RSp^|k&K?O-H?9$+wR{_

      Related software

      -

      ParadisEO provides EO extensions for - the flexible design of single solution-based metaheuristics, - metaheuristics for multi objective optimization as well as hybrid, parallel and distributed - metaheuristics.

      +

      The softwares listed here are using EO, but they are not maintained by the EO team. + They may not be free softwares or may even be outdated.

      -

      DegaX is an ActiveX control which embeds EO 0.8.4. -

      +
        +
      • ParadisEO provides EO extensions for + the flexible design of single solution-based metaheuristics, + metaheuristics for multi objective optimization as well as hybrid, parallel and distributed + metaheuristics.
      • + +
      • DegaX + is an ActiveX control which embeds EO 0.8.4. +
      • + +
      • EASEA was a GUI that permits to build evolutionary algorithm with EO or the GAlib. + It is now a platform that allows program evolutionary algorithms on massively parallel many-core architectures.
      • + +
      • GUIDE is a GUI that allows the generation of evolutionary algorithms. It can use EO or ECJ.
      • +
      + + +

      Authors

      @@ -499,9 +512,9 @@

      Links

      From e70464630e6c8d8820df13a7515fcaea4debb9f8 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 10 Sep 2010 01:09:16 +0200 Subject: [PATCH 1569/2134] + test/t-doEstimatorNormalMulti --- application/eda_sa/gplot.py | 26 ++-- application/eda_sa/main.cpp | 10 +- src/doEstimatorNormalMulti.h | 2 +- test/CMakeLists.txt | 15 ++- test/t-doEstimatorNormalMulti.cpp | 199 ++++++++++++++++++++++++++++++ 5 files changed, 228 insertions(+), 24 deletions(-) create mode 100644 test/t-doEstimatorNormalMulti.cpp diff --git a/application/eda_sa/gplot.py b/application/eda_sa/gplot.py index 159c1caf9..2d012e162 100755 --- a/application/eda_sa/gplot.py +++ b/application/eda_sa/gplot.py @@ -39,6 +39,7 @@ def logger(level_name, filename='plot.log'): def parser(parser=optparse.OptionParser()): parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='warning', help='set a verbose level') parser.add_option('-f', '--files', help='give some input sample files separated by comma (cf. gen1,gen2,...)', default='') + parser.add_option('-r', '--respop', help='define the population results containing folder', default='./ResPop') parser.add_option('-o', '--output', help='give an output filename for logging', default='plot.log') parser.add_option('-d', '--dimension', help='give a dimension size', default=2) parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True) @@ -252,6 +253,7 @@ def main(): n = int(options.dimension) w = int(options.windowid) + r = options.respop if options.multiplot: g = Gnuplot.Gnuplot() @@ -270,56 +272,56 @@ def main(): g('set origin 0.0, 0.5') if n >= 1: - plotXPointYFitness('./ResPop', state=gstate, g=g) + plotXPointYFitness(r, state=gstate, g=g) g('set size 0.5, 0.5') g('set origin 0.0, 0.0') if n >= 2: - plotXPointYFitness('./ResPop', '4:1', state=gstate, g=g) + plotXPointYFitness(r, '4:1', state=gstate, g=g) g('set size 0.5, 0.5') g('set origin 0.5, 0.5') if n >= 2: - plotXYPointZFitness('./ResPop', state=gstate, g=g) + plotXYPointZFitness(r, state=gstate, g=g) g('set size 0.5, 0.5') g('set origin 0.5, 0.0') if n >= 2: - plotXYPoint('./ResPop', state=gstate, g=g) + plotXYPoint(r, state=gstate, g=g) elif n >= 3: - plotXYZPoint('./ResPop', state=gstate, g=g) + plotXYZPoint(r, state=gstate, g=g) g('set nomultiplot') else: if n >= 1 and w in [0, 1]: - plotXPointYFitness('./ResPop', state=gstate) + plotXPointYFitness(r, state=gstate) if n >= 2 and w in [0, 2]: - plotXPointYFitness('./ResPop', '4:1', state=gstate) + plotXPointYFitness(r, '4:1', state=gstate) if n >= 2 and w in [0, 3]: - plotXYPointZFitness('./ResPop', state=gstate) + plotXYPointZFitness(r, state=gstate) if n >= 3 and w in [0, 4]: - plotXYZPoint('./ResPop', state=gstate) + plotXYZPoint(r, state=gstate) if n >= 2 and w in [0, 5]: - plotXYPoint('./ResPop', state=gstate) + plotXYPoint(r, state=gstate) # if n >= 1: # plotParams('./ResParams.txt', state=gstate) # if n >= 2: # plot2DRectFromFiles('./ResBounds', state=gstate) - # plotXYPoint('./ResPop', state=gstate) + # plotXYPoint(r, state=gstate) # g = plot2DRectFromFiles('./ResBounds', state=gstate, plot=False) - # plotXYPoint('./ResPop', g=g) + # plotXYPoint(r, g=g) wait(prompt='Press return to end the plot.\n') diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index b873c1d67..00cbea6f2 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -154,7 +154,7 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- - // general output + // population output //----------------------------------------------------------------------------- eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); @@ -171,14 +171,6 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- - //----------------------------------------------------------------------------- - // population output - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - - //----------------------------------------------------------------------------- // distribution output //----------------------------------------------------------------------------- diff --git a/src/doEstimatorNormalMulti.h b/src/doEstimatorNormalMulti.h index e1c907b27..19ad7828e 100644 --- a/src/doEstimatorNormalMulti.h +++ b/src/doEstimatorNormalMulti.h @@ -9,7 +9,7 @@ #define _doEstimatorNormalMulti_h #include "doEstimator.h" -#include "doUniform.h" +#include "doNormalMulti.h" template < typename EOT > class doEstimatorNormalMulti : public doEstimator< doNormalMulti< EOT > > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 674dac153..cf1c0b4fc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,13 +23,24 @@ ### 3) Define your targets and link the librairies ###################################################################################### +FIND_PACKAGE(Boost 1.33.0) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/eda_sa) + SET(SOURCES + t-doEstimatorNormalMulti ) FOREACH(current ${SOURCES}) ADD_EXECUTABLE(${current} ${current}.cpp) - TARGET_LINK_LIBRARIES(${current} ${PROJECT_NAME} ${EO_LIBRARIES}) - ADD_CURRENT(${current} ${current}) + ADD_TEST(${current} ${current}) + TARGET_LINK_LIBRARIES(${current} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) + INSTALL(TARGETS ${current} RUNTIME DESTINATION share/do/test COMPONENT test) ENDFOREACH() ###################################################################################### diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp new file mode 100644 index 000000000..398cdcbfd --- /dev/null +++ b/test/t-doEstimatorNormalMulti.cpp @@ -0,0 +1,199 @@ +#include +#include + +#include +#include + +#include + +#include "Rosenbrock.h" +#include "Sphere.h" + +typedef eoReal< eoMinimizingFitness > EOT; +typedef doNormalMulti< EOT > Distrib; +typedef EOT::AtomType AtomType; + +int main(int ac, char** av) +{ + //----------------------------------------------------- + // (0) parser + eo routines + //----------------------------------------------------- + + eoParserLogger parser(ac, av); + + std::string section("Algorithm parameters"); + + unsigned int p_size = parser.createParam((unsigned int)100, "popSize", "Population Size", 'P', section).value(); // P + + unsigned int s_size = parser.createParam((unsigned int)2, "dimension-size", "Dimension size", 'd', section).value(); // d + + AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m + + AtomType covar1_value = parser.createParam((AtomType)1, "covar1", "Covar value 1", '1', section).value(); + AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); + AtomType covar3_value = parser.createParam((AtomType)1, "covar3", "Covar value 3", '3', section).value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_verbose(parser); + make_help(parser); + + + assert(p_size > 0); + assert(s_size > 0); + + + eoState state; + + //----------------------------------------------------- + + + //----------------------------------------------------- + // (1) Population init and sampler + //----------------------------------------------------- + + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + state.storeFunctor(gen); + + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( s_size, *gen ); + state.storeFunctor(init); + + // create an empty pop and let the state handle the memory + // fill population thanks to eoInit instance + eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); + + //----------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (2) distribution initial parameters + //----------------------------------------------------------------------------- + + ublas::vector< AtomType > mean( s_size, mean_value ); + ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); + + varcovar( 0, 0 ) = covar1_value; + varcovar( 0, 1 ) = covar2_value; + varcovar( 1, 1 ) = covar3_value; + + Distrib distrib( mean, varcovar ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (3) distribution output + //----------------------------------------------------------------------------- + + doDummyContinue< Distrib >* dummy_continue = new doDummyContinue< Distrib >(); + state.storeFunctor(dummy_continue); + + doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); + state.storeFunctor(distribution_continue); + + doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + state.storeFunctor(distrib_stat); + + distribution_continue->add( *distrib_stat ); + + eoMonitor* stdout_monitor = new eoStdoutMonitor(); + state.storeFunctor(stdout_monitor); + stdout_monitor->add(*distrib_stat); + distribution_continue->add( *stdout_monitor ); + + (*distribution_continue)( distrib ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare bounder class to set bounds of sampling. + // This is used by doSampler. + //----------------------------------------------------------------------------- + + doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + EOT(pop[0].size(), 5), + *gen); + state.storeFunctor(bounder); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare sampler class with a specific distribution + //----------------------------------------------------------------------------- + + doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + state.storeFunctor(sampler); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (4) sampling phase + //----------------------------------------------------------------------------- + + pop.clear(); + + for (unsigned int i = 0; i < p_size; ++i) + { + EOT candidate_solution = (*sampler)( distrib ); + pop.push_back( candidate_solution ); + } + + // pop.sort(); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (5) population output + //----------------------------------------------------------------------------- + + eoContinue< EOT >* cont = new eoGenContinue< EOT >( 2 ); // never reached fitness + state.storeFunctor(cont); + + eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( *cont ); + state.storeFunctor(pop_continue); + + doPopStat< EOT >* popStat = new doPopStat; + state.storeFunctor(popStat); + pop_continue->add(*popStat); + + doFileSnapshot* fileSnapshot = new doFileSnapshot("TestResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue->add(*fileSnapshot); + + (*pop_continue)( pop ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (6) estimation phase + //----------------------------------------------------------------------------- + + doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + state.storeFunctor(estimator); + + distrib = (*estimator)( pop ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (7) distribution output + //----------------------------------------------------------------------------- + + (*distribution_continue)( distrib ); + + //----------------------------------------------------------------------------- + + + return 0; +} From 7845ba50c7ac4efe55a8d81f1daed65d5e440d43 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 10 Sep 2010 15:48:16 +0200 Subject: [PATCH 1570/2134] + test_cov_parameters.py: script to execute the estimator testor (t-EstimatorNormalMulti) in using all combinaison parameters values for 2-D cov-matrix --- application/eda_sa/gplot.py | 91 ++++++++++++++++++++++++++----- test/t-doEstimatorNormalMulti.cpp | 58 ++++++++++++-------- test/test_cov_parameters.py | 17 ++++++ 3 files changed, 130 insertions(+), 36 deletions(-) create mode 100755 test/test_cov_parameters.py diff --git a/application/eda_sa/gplot.py b/application/eda_sa/gplot.py index 2d012e162..55e95cb01 100755 --- a/application/eda_sa/gplot.py +++ b/application/eda_sa/gplot.py @@ -44,7 +44,11 @@ def parser(parser=optparse.OptionParser()): parser.add_option('-d', '--dimension', help='give a dimension size', default=2) parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True) parser.add_option('-p', '--plot', action="store_false", help='plot graphics separetly, one by window', dest="multiplot") - parser.add_option('-w', '--windowid', help='give the window id you want to display, 0 means we display all ones', default=0) + parser.add_option('-w', '--windowid', help='give the window id you want to display, 0 means we display all ones, this option should be combined with -p', default=0) + parser.add_option('-G', '--graphicsdirectory', help='give a directory name for graphics, this option should be combined with -u', default='plot') + parser.add_option('-g', '--graphicsprefixname', help='give a prefix name for graphics, this option should be combined with -u', default='plot') + parser.add_option('-t', '--terminal', action="store_true", help='display graphics on gnuplot windows', dest="terminal", default=True) + parser.add_option('-u', '--png', action="store_false", help='display graphics on png files', dest="terminal") options, args = parser.parse_args() @@ -95,10 +99,26 @@ def getSortedFiles(path): filelist = options.files.split(',') + checkFileErrors(path, filelist) + return filelist +def checkFileErrors(path, filelist): + for filename in filelist: + for line in open('%s/%s' % (path, filename)): + if '-nan' in line: + logging.warning("checkFileErrors: %s/%s file contains bad value, it is going to be skipped" % (path, filename)) + filelist.remove(filename) + break + def plotXPointYFitness(path, fields='3:1', state=None, g=None): - if g == None: g = Gnuplot.Gnuplot() + if g == None: + g = Gnuplot.Gnuplot() + + if not options.terminal: + g('set terminal png') + g('set output \'%s/%s_%s.png\'' % (options.graphicsdirectory, options.graphicsprefixname, 'plotXPointYFitness')) + if state != None: state.append(g) g.title('Fitness observation') @@ -114,12 +134,19 @@ def plotXPointYFitness(path, fields='3:1', state=None, g=None): ) ) - g.plot(*files) + if len(files) > 0: + g.plot(*files) return g def plotXYPointZFitness(path, fields='4:3:1', state=None, g=None): - if g == None: g = Gnuplot.Gnuplot() + if g == None: + g = Gnuplot.Gnuplot() + + if not options.terminal: + g('set terminal png') + g('set output \'%s/%s_%s.png\'' % (options.graphicsdirectory, options.graphicsprefixname, 'plotXYPointZFitness')) + if state != None: state.append(g) g.title('Fitness observation in 3-D') @@ -136,12 +163,19 @@ def plotXYPointZFitness(path, fields='4:3:1', state=None, g=None): ) ) - g.splot(*files) + if len(files) > 0: + g.splot(*files) return g def plotXYPoint(path, fields='3:4', state=None, g=None): - if g == None: g = Gnuplot.Gnuplot() + if g == None: + g = Gnuplot.Gnuplot() + + if not options.terminal: + g('set terminal png') + g('set output \'%s/%s_%s.png\'' % (options.graphicsdirectory, options.graphicsprefixname, 'plotXYPoint')) + if state != None: state.append(g) g.title('Points observation in 2-D') @@ -157,12 +191,19 @@ def plotXYPoint(path, fields='3:4', state=None, g=None): ) ) - g.plot(*files) + if len(files) > 0: + g.plot(*files) return g def plotXYZPoint(path, fields='3:4:5', state=None, g=None): - if g == None: g = Gnuplot.Gnuplot() + if g == None: + g = Gnuplot.Gnuplot() + + if not options.terminal: + g('set terminal png') + g('set output \'%s/%s_%s.png\'' % (options.graphicsdirectory, options.graphicsprefixname, 'plotXYZPoint')) + if state != None: state.append(g) g.title('Points observation in 3-D') @@ -179,12 +220,19 @@ def plotXYZPoint(path, fields='3:4:5', state=None, g=None): ) ) - g.splot(*files) + if len(files) > 0: + g.splot(*files) return g def plotParams(path, field='1', state=None, g=None): - if g == None: g = Gnuplot.Gnuplot() + if g == None: + g = Gnuplot.Gnuplot() + + if not options.terminal: + g('set terminal png') + g('set output \'%s/%s_%s.png\'' % (options.graphicsdirectory, options.graphicsprefixname, 'plotXYZPoint')) + if state != None: state.append(g) g.title('Hyper-volume comparaison through all dimensions') @@ -197,7 +245,13 @@ def plotParams(path, field='1', state=None, g=None): return g def plot2DRectFromFiles(path, state=None, g=None, plot=True): - if g == None: g = Gnuplot.Gnuplot() + if g == None: + g = Gnuplot.Gnuplot() + + if not options.terminal: + g('set terminal png') + g('set output \'%s_%s.png\'' % (options.graphicsprefixname, 'plot2DRectFromFiles')) + if state != None: state.append(g) g.title('Rectangle drawing observation') @@ -255,9 +309,19 @@ def main(): w = int(options.windowid) r = options.respop + if not options.terminal: + try: + os.mkdir(options.graphicsdirectory) + except OSError: + pass + if options.multiplot: g = Gnuplot.Gnuplot() + if not options.terminal: + g('set terminal png') + g('set output \'%s/%s_%s.png\'' % (options.graphicsdirectory, options.graphicsprefixname, 'multiplot')) + g('set parametric') g('set nokey') g('set noxtic') @@ -323,9 +387,8 @@ def main(): # g = plot2DRectFromFiles('./ResBounds', state=gstate, plot=False) # plotXYPoint(r, g=g) - wait(prompt='Press return to end the plot.\n') - - pass + if options.terminal: + wait(prompt='Press return to end the plot.\n') # when executed, just run main(): if __name__ == '__main__': diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp index 398cdcbfd..2ba3c9684 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-doEstimatorNormalMulti.cpp @@ -1,3 +1,5 @@ +#include + #include #include @@ -33,6 +35,7 @@ int main(int ac, char** av) AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); AtomType covar3_value = parser.createParam((AtomType)1, "covar3", "Covar value 3", '3', section).value(); + if (parser.userNeedsHelp()) { parser.printHelp(std::cout); @@ -86,26 +89,37 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- - // (3) distribution output + // (3a) distribution output preparation //----------------------------------------------------------------------------- - doDummyContinue< Distrib >* dummy_continue = new doDummyContinue< Distrib >(); - state.storeFunctor(dummy_continue); + doDummyContinue< Distrib >* distrib_dummy_continue = new doDummyContinue< Distrib >(); + state.storeFunctor(distrib_dummy_continue); - doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); - state.storeFunctor(distribution_continue); + doCheckPoint< Distrib >* distrib_continue = new doCheckPoint< Distrib >( *distrib_dummy_continue ); + state.storeFunctor(distrib_continue); doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); state.storeFunctor(distrib_stat); - distribution_continue->add( *distrib_stat ); + distrib_continue->add( *distrib_stat ); - eoMonitor* stdout_monitor = new eoStdoutMonitor(); - state.storeFunctor(stdout_monitor); - stdout_monitor->add(*distrib_stat); - distribution_continue->add( *stdout_monitor ); + std::ostringstream ss; + ss << p_size << "_" << mean_value << "_" << covar1_value << "_" + << covar2_value << "_" << covar3_value << "_gen"; - (*distribution_continue)( distrib ); + doFileSnapshot* distrib_file_snapshot = new doFileSnapshot("TestResDistrib", 1, ss.str()); + state.storeFunctor(distrib_file_snapshot); + distrib_file_snapshot->add(*distrib_stat); + distrib_continue->add(*distrib_file_snapshot); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (3b) distribution output + //----------------------------------------------------------------------------- + + (*distrib_continue)( distrib ); //----------------------------------------------------------------------------- @@ -154,20 +168,20 @@ int main(int ac, char** av) // (5) population output //----------------------------------------------------------------------------- - eoContinue< EOT >* cont = new eoGenContinue< EOT >( 2 ); // never reached fitness - state.storeFunctor(cont); + eoContinue< EOT >* pop_cont = new eoGenContinue< EOT >( 2 ); // never reached fitness + state.storeFunctor(pop_cont); - eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( *cont ); + eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( *pop_cont ); state.storeFunctor(pop_continue); - doPopStat< EOT >* popStat = new doPopStat; - state.storeFunctor(popStat); - pop_continue->add(*popStat); + doPopStat< EOT >* pop_stat = new doPopStat; + state.storeFunctor(pop_stat); + pop_continue->add(*pop_stat); - doFileSnapshot* fileSnapshot = new doFileSnapshot("TestResPop"); - state.storeFunctor(fileSnapshot); - fileSnapshot->add(*popStat); - pop_continue->add(*fileSnapshot); + doFileSnapshot* pop_file_snapshot = new doFileSnapshot("TestResPop"); + state.storeFunctor(pop_file_snapshot); + pop_file_snapshot->add(*pop_stat); + pop_continue->add(*pop_file_snapshot); (*pop_continue)( pop ); @@ -190,7 +204,7 @@ int main(int ac, char** av) // (7) distribution output //----------------------------------------------------------------------------- - (*distribution_continue)( distrib ); + (*distrib_continue)( distrib ); //----------------------------------------------------------------------------- diff --git a/test/test_cov_parameters.py b/test/test_cov_parameters.py new file mode 100755 index 000000000..c73c9fbbd --- /dev/null +++ b/test/test_cov_parameters.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +PSIZE = 10000 +MEAN = 0 +CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters" + +from os import system +from numpy import arange + +if __name__ == '__main__': + + for p1 in list(arange(0.1, 1.1, 0.1)): + for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)): + for p3 in list(arange(0.1, 1.1, 0.1)): + cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) ) + print cmd + system( cmd ) From b7f8934517d25cc2c8f99052c7c880354b2d6f1b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 10 Sep 2010 15:52:54 +0200 Subject: [PATCH 1571/2134] replaced generated prefix name in result folder --- test/t-doEstimatorNormalMulti.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp index 2ba3c9684..661fe4740 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-doEstimatorNormalMulti.cpp @@ -35,6 +35,9 @@ int main(int ac, char** av) AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); AtomType covar3_value = parser.createParam((AtomType)1, "covar3", "Covar value 3", '3', section).value(); + std::ostringstream ss; + ss << p_size << "_" << mean_value << "_" << covar1_value << "_" << covar2_value << "_" << covar3_value << "_gen"; + std::string gen_filename = ss.str(); if (parser.userNeedsHelp()) { @@ -103,11 +106,7 @@ int main(int ac, char** av) distrib_continue->add( *distrib_stat ); - std::ostringstream ss; - ss << p_size << "_" << mean_value << "_" << covar1_value << "_" - << covar2_value << "_" << covar3_value << "_gen"; - - doFileSnapshot* distrib_file_snapshot = new doFileSnapshot("TestResDistrib", 1, ss.str()); + doFileSnapshot* distrib_file_snapshot = new doFileSnapshot( "TestResDistrib", 1, gen_filename ); state.storeFunctor(distrib_file_snapshot); distrib_file_snapshot->add(*distrib_stat); distrib_continue->add(*distrib_file_snapshot); @@ -178,7 +177,7 @@ int main(int ac, char** av) state.storeFunctor(pop_stat); pop_continue->add(*pop_stat); - doFileSnapshot* pop_file_snapshot = new doFileSnapshot("TestResPop"); + doFileSnapshot* pop_file_snapshot = new doFileSnapshot( "TestResPop", 1, gen_filename ); state.storeFunctor(pop_file_snapshot); pop_file_snapshot->add(*pop_stat); pop_continue->add(*pop_file_snapshot); From 492451f247561ee977257fd3f52cf0adfc2635c7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 10 Sep 2010 17:04:02 +0200 Subject: [PATCH 1572/2134] * bugfixed on test_cov_parameters --- test/t-doEstimatorNormalMulti.cpp | 9 ++++++--- test/test_cov_parameters.py | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp index 661fe4740..c6fdeabce 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-doEstimatorNormalMulti.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -31,12 +32,14 @@ int main(int ac, char** av) AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m - AtomType covar1_value = parser.createParam((AtomType)1, "covar1", "Covar value 1", '1', section).value(); + AtomType covar1_value = parser.createParam((AtomType)1.0, "covar1", "Covar value 1", '1', section).value(); AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); - AtomType covar3_value = parser.createParam((AtomType)1, "covar3", "Covar value 3", '3', section).value(); + AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value(); std::ostringstream ss; - ss << p_size << "_" << mean_value << "_" << covar1_value << "_" << covar2_value << "_" << covar3_value << "_gen"; + ss << p_size << "_" << fixed << setprecision(1) + << mean_value << "_" << covar1_value << "_" << covar2_value << "_" + << covar3_value << "_gen"; std::string gen_filename = ss.str(); if (parser.userNeedsHelp()) diff --git a/test/test_cov_parameters.py b/test/test_cov_parameters.py index c73c9fbbd..f9199a9e4 100755 --- a/test/test_cov_parameters.py +++ b/test/test_cov_parameters.py @@ -2,7 +2,7 @@ PSIZE = 10000 MEAN = 0 -CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters" +CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1" from os import system from numpy import arange @@ -12,6 +12,7 @@ if __name__ == '__main__': for p1 in list(arange(0.1, 1.1, 0.1)): for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)): for p3 in list(arange(0.1, 1.1, 0.1)): - cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) ) + gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) + cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen ) print cmd system( cmd ) From 0f4e43c0e7c41a1fbac512032af83aa27697cebc Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 10 Sep 2010 23:21:31 +0200 Subject: [PATCH 1573/2134] t-doEstimatorNormalMulti: display means and distance --- test/t-doEstimatorNormalMulti.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp index c6fdeabce..4dbc658ce 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-doEstimatorNormalMulti.cpp @@ -161,8 +161,6 @@ int main(int ac, char** av) pop.push_back( candidate_solution ); } - // pop.sort(); - //----------------------------------------------------------------------------- @@ -211,5 +209,29 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- + // (8) euclidianne distance estimation + //----------------------------------------------------------------------------- + + ublas::vector< AtomType > new_mean = distrib.mean(); + ublas::symmetric_matrix< AtomType, ublas::lower > new_varcovar = distrib.varcovar(); + + AtomType distance = 0; + + for ( unsigned int d = 0; d < s_size; ++d ) + { + distance += pow( mean[ d ] - new_mean[ d ], 2 ); + } + + distance = sqrt( distance ); + + eo::log << eo::logging + << "mean: " << mean << std::endl + << "new mean: " << new_mean << std::endl + << "distance: " << distance << std::endl + ; + + //----------------------------------------------------------------------------- + return 0; } From 86b7538263c096ae50a3b7cd893ef67930ede2f1 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 13 Sep 2010 06:17:44 +0200 Subject: [PATCH 1574/2134] - screenshots --- screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png | Bin 78493 -> 0 bytes screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png | Bin 82590 -> 0 bytes screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png | Bin 50871 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png delete mode 100644 screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png delete mode 100644 screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png diff --git a/screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png b/screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png deleted file mode 100644 index 9f1f6c8855392117d3a6d17796ad3341be759a06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78493 zcmafbWmFwY6YUTZoM6E%gy0SVf(LhZ3+@`+A$V|icXxMp*Wm6R+~4Hh`@LUpt@q=s zbC~JruI}1hwRcS~e#uA)Bf{ap0RVs~Dk2~U0B^j(4*>H9ypnjB6bXJo+VY7iz`(#P zZAhm^JJowG~q1Qpzqs)vwWV3Y0c|Hd(HCiijMED8*|A-_9s4} zlYfBoI5*I7m76~EtO(w<=%Ea#FRq&#&G0Dz0F#L$7xMQ` z%n@M-1MvCxMys@vkG6lh)7_~!i5udPAb9V?P^f^-m&;YM;$gB}=d@x~i+=`b?9>JT zu8Z>(OgK(8UKRNXxgQ?9ojb$#WsI!-mk8Ye(EkH(@AmQ8qrHuYHBlvcu&0VN&Y&18 ze$P2h=hG((QPE$&U}2{sQXowJF?#0fHEIbduntp3uiU0^e0eXG!g+9c4*>}kf_$DJ z3{VdzNGK(b8h+;Tji|VxellaM1TaD>>17GzG>C%wPq-XuIaqIXtMepB4Q(5TW~%f5 z+Rp3^3pk}!(2qcTla;+lWZIJ;MH|12G@P!kcRZP^)ZB`*pzlxRbUD9mf8Tz2sU;Og z*1p^I0LO1Tg@4Xg{^<4=RQCJjG;_^8~HHc%X7KP0|?VvF6DyG=k zdO0;k<*Ak(wo0eWD@lX%VTX67M)@SpC3O=9;pTnt4)s5lMZH za3|8lp-&;e^ zJv&UA2X&_8amxN&PhW%^_yn~>#zHU|VV$LgSttaP9-D7FC)ps_tGzgJ{%&n0kYlAI_}rE zQ`C59NWEG$r}X}QJ?#;e;+3I~BeCes?tr;3*P{2gCzE>NxZbXNE)N3YK67;4 zcXVEtoc*vaPF&x^x&fFdjrTDlJIW!`W42=H|xAAYusqj??$z9&7$Uwtx4 z^s9W(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 z9e~E21KivIv37ITBf2+JRWP*;a>Eqrh}wbnK+liX1Ox=Or^=^pIJACr?w{&3sVDQp z1F-#zleh+xUweg`o&064n|s;PgoAb$ogmbo=DfBO`j|@pM?k8$iwGq1Ut$gKzQ@#v z$Jp`D9gb9TUr7IrY@V%qG&+q!6#teKT8Q|6_eeW---^y_AtJW!N)22dS!!A57*QA% zDc&CBF?CXL|0go?lPF7@|F32L-=gM!uVnDWd`+^JfI9hqDoY5vzzelM6u3~itBH8b zr<7DmBVASNf8*{@SG5#t?mw}QL@&ZTO#MF;C@@ zlFjVe6nX#lg)Y%_PJ*)bKhb=M(T}|mFV}GxUK#Yyrw~V4WeT`kcgeg^t)ub#e_KC( z07sTPbzqp#I<$YEPbd1PC-9%>d#}e>7Kr8`{?p0LtzrG@g%2wK84kVf{$b%yTRsbD zt_lUu=^C;5PnRv5*p>esft}{70eav3Hcb;v31Z`a3M5JQV{WCqrSr6|Y&Oj17DfSo NZ>1C^%fvtU{}=RL28aLv diff --git a/screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png b/screenshots/gplot-eda_sa-P-10000-d-10-a-0.1.png deleted file mode 100644 index fc12f2a977c7a17c5c74a0cf5376b64704cbe546..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 82590 zcmZ^~WmH_z(goNAf;+)IxVtqLf(3WiKyY{W1cJLe1Pd12-Q6X)ySp}X^WOXB&#Yms zUfjNNZkuvA{oQr_WNV@bK`< zn+hAiSA1u2O=lH5Q)joYjwT>8TRR&QCMRP@6BAn}b35mA=nf$ehzukpCZg(|agyob z{Xu+bz;DjUlzM1~T9*~l0*it=NxbZL zeh8#D&=T1EsMuO*ZOzD7sm3g&l?o&Sp^Gbh$doUdIV@X=wW=d1S1+A1=OP$WD@>%6 zqJaNuYOJekZ7mxCE<6a~{wFRx->osSHYhLp_aDtQwG(^ZsBGR%d)}_DF8rWgDp+&Q zKy@otf=CEaG#mB3;D}$HHcHNZ#t6zTR6%0=V%c4d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Q< z!u)TsHxZ@9l(`#r;KyLku@km7erC;l4*th3&BrVJBx-Q}Z!C*Gvqez3ma%ozXXjFJR{ Q1p+=&V)CMYgbf1!7XhnDZU6uP diff --git a/screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png b/screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png deleted file mode 100644 index 578c38db178bef6cc5c9eb1a2ef073915f038965..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50871 zcmY(r1ymK^8#X$mNJxi(l+r1Uq_lu^rywnjNSA~l-6`GONOw0#w{&;c-TwaHch|kF z1?QZZIkWeE`+43y1j@@wpdk|?LlA`aK~hu^f?&UcUkC{n97)(si~uii_QD^Ok&uw) zSLIf~$CqEl)W0fO8-I1ww=;rFtgJ1K80|mX85vpGn_7Q8f@=|gATsEK=zC?SbY*@3}X) zi4TV_JY46EQpdp5n3>H zQ!5~H3kf5U`}X&Q?R_KgcmoN!)mzoITwGHh!3mWlI>seSpEdk=>rU;*LN^) zj`_Cs@5y{Igqd*>q23=NcYJ+{2}!=Vd{=qgZ1nW6UsvYI_nq){ut2T0#64!!n#HPL z_`^})i-gENX}}Cr7$wJTImhZ}*?kc5YH3MLU5!pg%O?l-lf~bs#)BY}bech2LAohZ z_N&9?Y11kpZ&*rrr+#cG)(9T9T$G~R$k`WTvC?GG)7uLHLqW;`cjMboVUk$3vYvp!Q|MJ z4{h+|y&QT3s-xqq3Fd)_!%VwH*BuII!n|9KDNOR5SCkJQv5hsz z-EgipXX3n6b#hX%wr2iPxTdU}6c>@Z@_uFY6`7+@(ANS5Lql2~Z}wI>y0UCDoqRSS z4xXJGDP&l=ROqGB+SW!qe4J0rZshgu6t2g5ubq zpoW182Duwm@+FkpZ%982hHjr>qYJK7yIJ{j^3!e{7AG{w>d7d@2X#_J{C2K1w%-~m zR;2v1UD(-~rJ*-i@3a%CX<2WzkmIaE7ow_Fs2VNQI)~{`o2yI{q^!v(2jj&OEJTAN z{YFurM>~#IO@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E1rN{FuDng?(7Gp(C(k$s2LqMxI`XxttGF8uE?M-7zEHvmP&;pgT8NO^NxoUgZO zEAh>-;pgvSV`Stc`3O?su|@zqcoE1^!I>ip0*C3asWURG*8DAk<77#Q( zlkziwtsUH4KFV2uI3@O=yWxxsl72mZ|G$8E3Qm41WbwzdPsI|?_kl?uZhTko!1TJae&hX+AwpzOe^JvfMk%Wa|HO}oYy`ptjlOPRQV zA=Xng&Y}L7&xe=t@M{r%kSgW>&u{P$>%)@q-viUk`2H%eQ_Fb%h0H(x--qSk<7I#6 zfxsGg$=;~WT3eFO&tnipgd^}m`2+CI0O)i_Y25!l<&vGr0xF4E%w6?Z@;r8-yW)P+ zrzbk?6ZRD|>iEx(5ILSAiHRF)B=Fp~`s}l!JpW{L8ZkeYi}mwSp8vkCmM*xti<_5I z)c-lwmoun;rp?nf0VIpxcBkJ8Lh(MJ)>#VYdE6v+3UBz}5GuSRt)C= From 26ac5cae052cc2204c92c2f8832cd27f5a5efc98 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 14 Sep 2010 13:19:43 +0200 Subject: [PATCH 1575/2134] bugfixed from ublas::vector assignement ctor for old version of boost --- test/t-doEstimatorNormalMulti.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp index 4dbc658ce..71b07e2a5 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-doEstimatorNormalMulti.cpp @@ -82,7 +82,10 @@ int main(int ac, char** av) // (2) distribution initial parameters //----------------------------------------------------------------------------- - ublas::vector< AtomType > mean( s_size, mean_value ); + ublas::vector< AtomType > mean( s_size ); + + for (unsigned int i = 0; i < s_size; ++i) { mean( i ) = mean_value; } + ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); varcovar( 0, 0 ) = covar1_value; From 22ce03233ebaa2472538c623ec0172f819e61f3c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 15 Sep 2010 22:28:29 +0200 Subject: [PATCH 1576/2134] doc comments --- eo/src/utils/eoFileMonitor.h | 75 ++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 545c51984..ce243a983 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -45,34 +45,69 @@ class eoFileMonitor : public eoMonitor { public : - eoFileMonitor(std::string _filename, std::string _delim = " ", bool _keep = false, bool _header=false) - : filename(_filename), delim(_delim), keep(_keep), header(_header), firstcall(true) - { - if (! _keep) { - std::ofstream os(filename.c_str()); - if (!os){ - std::string str = "eoFileMonitor: Could not open " + filename; - throw std::runtime_error(str); - } + /*! Constructor + * + * Try to create the file in writing mode, erasing it if asked. + * + * @param _filename complete filename to write to + * @param _delim delimiter string to use between each item of the registered vector (e.g. of eoStats) + * @param _keep_existing if true, overwrite any existing file with the same name prior to any output + * @param _header print the header (with the descriptions of registered eoStats) at the beginning of the file + */ + eoFileMonitor( + std::string _filename, + std::string _delim = " ", + bool _keep_existing = false, + bool _header=false + ) + : filename(_filename), + delim(_delim), + keep(_keep_existing), + header(_header), + firstcall(true) + { + if (!_keep) { + std::ofstream os (filename.c_str ()); + + if (!os) { + std::string str = "Error, eoFileMonitor could not open: " + filename; + throw std::runtime_error (str); + } + } // if ! keep } - } - virtual eoMonitor& operator()(void); + //! Called first, try to open the file in append mode and write the header if asked + virtual eoMonitor& operator()(void); - virtual eoMonitor& operator()(std::ostream& os); + /*! Main call, normally called at each generation. + Write the content of the registered vector into the file, each item being separated by delim + */ + virtual eoMonitor& operator()(std::ostream& os); - void printHeader(void); - virtual void printHeader(std::ostream& os); + //! Try to open the file, and then call printHeader(file) + void printHeader(void); - virtual std::string getFileName() { return filename;} + //! Print long names of the registered items, separated by delim. + virtual void printHeader(std::ostream& os); + + virtual std::string getFileName() { return filename;} private : - std::string filename; - std::string delim; - bool keep; // should we append or create a new file - bool header; // printing header at begin of file? - bool firstcall; + //! complete filename to write to + std::string filename; + + //! delimiter to use between each write + std::string delim; + + //! should we append or create a new file + bool keep; + + //! printing header at begin of file? + bool header; + + //! flag to avoid calling twice operator()(void) + bool firstcall; }; #endif From d8a1aedf015cf7ab8c91388c8f21e5fc2ed8a6eb Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 15 Sep 2010 22:28:58 +0200 Subject: [PATCH 1577/2134] use eo::log --- eo/src/eoTimeContinue.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/src/eoTimeContinue.h b/eo/src/eoTimeContinue.h index a0f97accf..47f94b671 100644 --- a/eo/src/eoTimeContinue.h +++ b/eo/src/eoTimeContinue.h @@ -25,7 +25,10 @@ #ifndef _EOTIMECONTINUE_H #define _EOTIMECONTINUE_H +#include + #include +#include /** * Termination condition until a running time is reached. @@ -54,7 +57,7 @@ public: time_t elapsed = (time_t) difftime(time(NULL), start); if (elapsed >= max) { - std::cout << "STOP in eoTimeContinue: Reached maximum time [" << elapsed << "/" << max << "]" << std::endl; + eo::log << eo::progress << "STOP in eoTimeContinue: Reached maximum time [" << elapsed << "/" << max << "]" << std::endl; return false; } return true; From 9d19cc2cfaec74a26ba98421015de68babfba222 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 15 Sep 2010 22:53:15 +0200 Subject: [PATCH 1578/2134] bugfix _keep_existing name ; added an overwriting option to use ios_base::trunc instead of ios_base::app --- eo/src/utils/eoFileMonitor.cpp | 9 +++++++-- eo/src/utils/eoFileMonitor.h | 13 +++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index f5fcd8d65..f8b664078 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -44,11 +44,16 @@ void eoFileMonitor::printHeader() eoMonitor& eoFileMonitor::operator()(void) { - ofstream os(filename.c_str(), ios_base::app); + ofstream os(filename.c_str(), + overwrite ? + ios_base::out|ios_base::trunc // FIXME does not seems to work + : + ios_base::out|ios_base::app + ); if (!os) { - string str = "eoFileMonitor: Could not append to " + filename; + string str = "eoFileMonitor: Could not write to " + filename; throw runtime_error(str); } diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index ce243a983..45d5b0fcd 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -52,21 +52,23 @@ public : * @param _filename complete filename to write to * @param _delim delimiter string to use between each item of the registered vector (e.g. of eoStats) * @param _keep_existing if true, overwrite any existing file with the same name prior to any output - * @param _header print the header (with the descriptions of registered eoStats) at the beginning of the file + * @param _header print the header (with the descriptions of registered eoStats) at the beginning of the file (WARNING: true will discards header printing) */ eoFileMonitor( std::string _filename, std::string _delim = " ", bool _keep_existing = false, - bool _header=false + bool _header = false, + bool _overwrite = false ) : filename(_filename), delim(_delim), keep(_keep_existing), header(_header), - firstcall(true) + firstcall(true), + overwrite(_overwrite) { - if (!_keep) { + if (!_keep_existing) { std::ofstream os (filename.c_str ()); if (!os) { @@ -108,6 +110,9 @@ private : //! flag to avoid calling twice operator()(void) bool firstcall; + + //! erase the entire file prior to writing in it (mode eos_base:: + bool overwrite; }; #endif From 2ed8146723a3ad9c1311e5a2fd2ed5882c98bed5 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 09:28:55 +0200 Subject: [PATCH 1579/2134] use std::endl ; error message format ; more comments --- eo/src/utils/eoFileMonitor.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index f8b664078..9863646b8 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -23,9 +23,10 @@ void eoFileMonitor::printHeader(std::ostream& os) for (; it != vec.end(); ++it) { + // use the longName of the eoParam for the header os << delim.c_str() << (*it)->longName(); } - os << '\n'; + os << std::endl; } void eoFileMonitor::printHeader() @@ -35,7 +36,7 @@ void eoFileMonitor::printHeader() if (!os) { - string str = "eoFileMonitor: Could not open " + filename; + string str = "eoFileMonitor could not open: " + filename; throw runtime_error(str); } @@ -46,20 +47,25 @@ eoMonitor& eoFileMonitor::operator()(void) { ofstream os(filename.c_str(), overwrite ? - ios_base::out|ios_base::trunc // FIXME does not seems to work + ios_base::out|ios_base::trunc // truncate : - ios_base::out|ios_base::app + ios_base::out|ios_base::app // append ); if (!os) { - string str = "eoFileMonitor: Could not write to " + filename; + string str = "eoFileMonitor could not write to: " + filename; throw runtime_error(str); } - if (firstcall && !keep && header ){ - printHeader(); - firstcall = false; + if ( + header // we want to write headers + && firstcall // we do not want to write headers twice + && !keep // if we append to an existing file, headers are useless + && !overwriting // we do not want to write headers if the file is to be overwriten + ) { + printHeader(); + firstcall = false; } return operator()(os); @@ -77,7 +83,8 @@ eoMonitor& eoFileMonitor::operator()(std::ostream& os) os << delim.c_str() << (*it)->getValue(); } - os << '\n'; + os << std::endl; + return *this; } From 991138053c8605d9538bb114edc7754a498ddeaf Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 09:29:51 +0200 Subject: [PATCH 1580/2134] typo bugfix --- eo/src/utils/eoFileMonitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index 9863646b8..cd5cbab65 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -62,7 +62,7 @@ eoMonitor& eoFileMonitor::operator()(void) header // we want to write headers && firstcall // we do not want to write headers twice && !keep // if we append to an existing file, headers are useless - && !overwriting // we do not want to write headers if the file is to be overwriten + && !overwrite // we do not want to write headers if the file is to be overwriten ) { printHeader(); firstcall = false; From ccd5b01dee2ef9099e5ea24eb39b3acca7df7c0c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 09:33:55 +0200 Subject: [PATCH 1581/2134] more comments ; header --- eo/src/eoEvalCounterThrowException.h | 85 ++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 eo/src/eoEvalCounterThrowException.h diff --git a/eo/src/eoEvalCounterThrowException.h b/eo/src/eoEvalCounterThrowException.h new file mode 100644 index 000000000..f2230c857 --- /dev/null +++ b/eo/src/eoEvalCounterThrowException.h @@ -0,0 +1,85 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann DrĂ©o +Caner Candan + +*/ + +#ifndef __eoEvalCounterThrowException_h__ +#define __eoEvalCounterThrowException_h__ + +#include +#include +#include + +/*! +Wrap an evaluation function so that an exception may be thrown when the +algorithm have reached a maximum number of evaluations. + +This may be useful if you want to check this kind of stopping criterion +at each _evaluation_, instead of using continuators at each _iteration_. + +The class first call the evaluation function, then check the number of +times it has been called. If the maximum number of evaluation has been +reached, it throw an eoMaxEvalException. You can catch this exception +from your main function, so as to stop everything properly. +*/ +template < typename EOT > +class eoEvalCounterThrowException : public eoEvalFuncCounter< EOT > +{ +public : + eoEvalCounterThrowException( eoEvalFunc& func, unsigned long max_evals, std::string name = "Eval. ") + : eoEvalFuncCounter< EOT >( func, name ), _threshold( max_evals ) + {} + + using eoEvalFuncCounter< EOT >::value; + + //! Evaluate the individual, then throw an exception if it exceed the max number of evals. + virtual void operator()(EOT& eo) + { + // bypass already evaluated individuals + if (eo.invalid()) { + + // increment the value of the self parameter + // (eoEvalFuncCounter inherits from @see eoValueParam) + value()++; + + // if we have reached the maximum + if ( value() >= _threshold ) { + + // go back through the stack until catched + throw eoMaxEvalException(_threshold); + } + + // evaluate + func(eo); + + } // if invalid + } + + virtual std::string className() const {return "eoEvalCounterThrowException";} + +private : + unsigned long _threshold; +}; + +#endif // __eoEvalCounterThrowException_h__ + From d26a9d87673bda9a17075493ac39a69732bffda6 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 11:06:04 +0200 Subject: [PATCH 1582/2134] evals that can throw exceptions --- eo/src/eo | 2 + eo/src/eoEvalCounterThrowException.h | 2 +- eo/src/eoEvalTimeThrowException.h | 47 +++++++++++++++++ eo/src/eoExceptions.h | 79 ++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 eo/src/eoEvalTimeThrowException.h create mode 100644 eo/src/eoExceptions.h diff --git a/eo/src/eo b/eo/src/eo index cb05a8988..61868d16e 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -75,6 +75,8 @@ // Evaluation functions (all include eoEvalFunc.h) #include #include +#include +#include // Continuators - all include eoContinue.h #include diff --git a/eo/src/eoEvalCounterThrowException.h b/eo/src/eoEvalCounterThrowException.h index f2230c857..bf19e73ee 100644 --- a/eo/src/eoEvalCounterThrowException.h +++ b/eo/src/eoEvalCounterThrowException.h @@ -26,7 +26,7 @@ Caner Candan #ifndef __eoEvalCounterThrowException_h__ #define __eoEvalCounterThrowException_h__ -#include +#include #include #include diff --git a/eo/src/eoEvalTimeThrowException.h b/eo/src/eoEvalTimeThrowException.h new file mode 100644 index 000000000..b1ac96626 --- /dev/null +++ b/eo/src/eoEvalTimeThrowException.h @@ -0,0 +1,47 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann DrĂ©o +*/ + +#include + +#include + +template< class EOT > +class eoEvalTimeThrowException : public eoEvalFuncCounter< EOT > +{ +public: + eoEvalTimeThrowException( eoEvalFunc & func, time_t max ) : _max(max), _start( std::time(NULL) ), eoEvalFuncCounter( func, "Eval.") {} + + virtual bool operator() (const eoPop < EOT > & _pop) + { + time_t elapsed = static_cast( std::difftime( std::time(NULL) , _start ) ); + + if( elapsed >= _max ) { + throw eoMaxTimeException(elapsed); + } + } + +protected: + time_t _max; + + time_t _start; +}; diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h new file mode 100644 index 000000000..7a72f4c5c --- /dev/null +++ b/eo/src/eoExceptions.h @@ -0,0 +1,79 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann DrĂ©o +*/ + +#ifndef __eoExceptions_h__ +#define __eoExceptions_h__ + +#include +#include + +class eoMaxException : public std::exception {}; + + + +/*! +An error that signals that a maximum elapsed time has been reached. + +Thrown by @see eoEvalTimeThrowException +*/ +class eoMaxTimeException : public eoMaxException +{ +public: + eoMaxTimeException( time_t elapsed) : _elapsed(elapsed) {} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "STOP in eoMaxTimeException: the maximum number of seconds has been reached (" << _elapsed << ")."; + return ss.str().c_str(); + } + +private: + time_t _elapsed; +}; + + + +/*! +An error that signals that a maximum number of evaluations has been reached. + +Thrown by @see eoEvalEvalThrowException +*/ +class eoMaxEvalException : public eoMaxException +{ +public: + eoMaxEvalException(unsigned long threshold) : _threshold(threshold){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "STOP in eoMaxEvalException: the maximum number of evaluation has been reached (" << _threshold << ")."; + return ss.str().c_str(); + } + +private: + unsigned long _threshold; +}; + + +#endif // __eoExceptions_h__ From faec5f102cc8b63276928f46679ed34e65fde1e4 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 11:16:55 +0200 Subject: [PATCH 1583/2134] bugfix operator() signature --- eo/src/eoEvalTimeThrowException.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eo/src/eoEvalTimeThrowException.h b/eo/src/eoEvalTimeThrowException.h index b1ac96626..3b0bc14f5 100644 --- a/eo/src/eoEvalTimeThrowException.h +++ b/eo/src/eoEvalTimeThrowException.h @@ -31,12 +31,17 @@ class eoEvalTimeThrowException : public eoEvalFuncCounter< EOT > public: eoEvalTimeThrowException( eoEvalFunc & func, time_t max ) : _max(max), _start( std::time(NULL) ), eoEvalFuncCounter( func, "Eval.") {} - virtual bool operator() (const eoPop < EOT > & _pop) + virtual void operator() ( EOT & eo ) { - time_t elapsed = static_cast( std::difftime( std::time(NULL) , _start ) ); + if( eo.invalid() ) { - if( elapsed >= _max ) { + time_t elapsed = static_cast( std::difftime( std::time(NULL) , _start ) ); + + if( elapsed >= _max ) { throw eoMaxTimeException(elapsed); + } else { + func(eo); + } } } From 8dc13bbaff422f5f22acb562339c8dc0c7a6774b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 11:29:32 +0200 Subject: [PATCH 1584/2134] important note: we are using wallclock time --- eo/src/eoExceptions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index 7a72f4c5c..3e595c068 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -44,7 +44,7 @@ public: virtual const char* what() const throw() { std::ostringstream ss; - ss << "STOP in eoMaxTimeException: the maximum number of seconds has been reached (" << _elapsed << ")."; + ss << "STOP in eoMaxTimeException: the maximum number of wallclock seconds has been reached (" << _elapsed << ")."; return ss.str().c_str(); } From f39183b8d7656b618afc4043095dc3ab98b42d90 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Sep 2010 14:16:24 +0200 Subject: [PATCH 1585/2134] accessors to levels ; typofix on _contextLevel --- eo/src/utils/eoLogger.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 0a4c27e3f..c92616984 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -143,8 +143,23 @@ public: virtual std::string className() const; + //! Print the available levels on the standard output + void printLevels() const; + + /*! Returns the selected levels, that is the one asked by the user + * + * Use this function if you want to be able to compare selected levels to a given one, like: + * if( eo::log.getLevelSelected() >= eo::progress ) {...} + */ + eo::Levels getLevelSelected() const { return _selectedLevel; } + + /*! Returns the current level of the context + * the one given when you output message with the logger + */ + eo::Levels getLevelContext() const { return _contextLevel; } + +protected: void addLevel(std::string name, eo::Levels level); - void printLevels() const; private: /** @@ -161,7 +176,7 @@ private: virtual int overflow(int_type c); private: const int& _fd; - const eo::Levels& _contexLevel; + const eo::Levels& _contextLevel; const eo::Levels& _selectedLevel; }; @@ -197,7 +212,7 @@ private: * _selectedLevel is the member storing verbose level setted by the user thanks to operator() */ eo::Levels _selectedLevel; - eo::Levels _contexLevel; + eo::Levels _contextLevel; /** * _fd in storing the file descriptor at this place we can disable easily the buffer in From 9a6dbdd70e061b385baff228617895a4fcce1dc4 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 20 Sep 2010 11:32:55 +0200 Subject: [PATCH 1586/2134] deactivate -fprofile-arcs -ftest-coverage that necessitate gcov --- eo/BuildConfig.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/BuildConfig.cmake b/eo/BuildConfig.cmake index fe3820a22..79eae18d8 100644 --- a/eo/BuildConfig.cmake +++ b/eo/BuildConfig.cmake @@ -32,7 +32,8 @@ IF(WIN32 AND NOT CYGWIN) ENDIF(CMAKE_CXX_COMPILER MATCHES cl) ELSE(WIN32 AND NOT CYGWIN) IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter") + # SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter") + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -Wall -Wextra -Wno-unused-parameter") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") ENDIF(CMAKE_COMPILER_IS_GNUCXX) From 66b4dfd54b6d92abf937b4f885e95f7fd0e14f17 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 20 Sep 2010 13:35:51 +0200 Subject: [PATCH 1587/2134] typofix declaration types in macro --- eo/src/eoPop.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 99927e25a..b2d58fac6 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -181,9 +181,9 @@ public: } /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ +#if defined(__CUDACC__) eoPop::iterator it_best_element() { -#if defined(__CUDACC__) eoPop:: iterator it = std::max_element(begin(), end()); #else typename eoPop::iterator it_best_element() { @@ -207,20 +207,21 @@ public: const EOT & worse_element() const { #if defined(__CUDACC__) - eoPop::const_iterator it = std::min_element(begin(), end()); + eoPop::const_iterator it = std::min_element(begin(), end()); #else - typename eoPop::const_iterator it = std::min_element(begin(), end()); + typename eoPop::const_iterator it = std::min_element(begin(), end()); #endif return (*it); } /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ - eoPop::iterator it_worse_element() - { #if defined(__CUDACC__) + eoPop::iterator it_worse_element() + { eoPop::iterator it = std::min_element(begin(), end()); #else - typename eoPop::iterator it_worse_element() { + typename eoPop::iterator it_worse_element() + { typename eoPop::iterator it = std::min_element(begin(), end()); #endif return it; @@ -230,12 +231,13 @@ public: slightly faster algorithm than sort to find all individuals that are better than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. */ - eoPop::iterator nth_element(int nth) - { -#if defined(__CUDACC__) - eoPop::iterator it = begin() + nth; +#if defined(__CUDACC__) + eoPop::iterator nth_element(int nth) + { + eoPop::iterator it = begin() + nth; #else - typename eoPop::iterator nth_element(int nth) { + typename eoPop::iterator nth_element(int nth) + { typename eoPop::iterator it = begin() + nth; #endif std::nth_element(begin(), it, end(), std::greater()); From b70a60bc59135ff71003e492d8be53d3302a9246 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 21 Sep 2010 15:08:38 +0200 Subject: [PATCH 1588/2134] + t-mean-distance: program to generate distance value between the theorical and visual means --- test/t-mean-distance.cpp | 176 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 test/t-mean-distance.cpp diff --git a/test/t-mean-distance.cpp b/test/t-mean-distance.cpp new file mode 100644 index 000000000..3e852a4a5 --- /dev/null +++ b/test/t-mean-distance.cpp @@ -0,0 +1,176 @@ +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include "Rosenbrock.h" +#include "Sphere.h" + +typedef eoReal< eoMinimizingFitness > EOT; +typedef doNormalMulti< EOT > Distrib; +typedef EOT::AtomType AtomType; + +int main(int ac, char** av) +{ + //----------------------------------------------------- + // (0) parser + eo routines + //----------------------------------------------------- + + eoParserLogger parser(ac, av); + + std::string section("Algorithm parameters"); + + unsigned int p_min = parser.createParam((unsigned int)10, "population-min", "Population min", 'p', section).value(); // p + unsigned int p_max = parser.createParam((unsigned int)10000, "population-max", "Population max", 'P', section).value(); // P + unsigned int p_step = parser.createParam((unsigned int)10, "population-step", "Population step", 't', section).value(); // t + unsigned int s_size = parser.createParam((unsigned int)2, "dimension-size", "Dimension size", 'd', section).value(); // d + + AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m + AtomType covar1_value = parser.createParam((AtomType)1.0, "covar1", "Covar value 1", '1', section).value(); // 1 + AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); // 2 + AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value(); // 3 + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_verbose(parser); + make_help(parser); + + //----------------------------------------------------- + + + assert(s_size >= 2); + + eo::log << eo::debug << "p_size s_size mean(0) mean(1) new-mean(0) new-mean(1) distance" << std::endl; + + eo::log << eo::logging; + + for ( unsigned int p_size = p_min; p_size <= p_max; p_size *= p_step ) + { + + assert(p_size >= p_min); + + eoState state; + + + //----------------------------------------------------- + // (1) Population init and sampler + //----------------------------------------------------- + + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + state.storeFunctor(gen); + + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( s_size, *gen ); + state.storeFunctor(init); + + // create an empty pop and let the state handle the memory + // fill population thanks to eoInit instance + eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); + + //----------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (2) distribution initial parameters + //----------------------------------------------------------------------------- + + ublas::vector< AtomType > mean( s_size, mean_value ); + ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); + + varcovar( 0, 0 ) = covar1_value; + varcovar( 0, 1 ) = covar2_value; + varcovar( 1, 1 ) = covar3_value; + + Distrib distrib( mean, varcovar ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare bounder class to set bounds of sampling. + // This is used by doSampler. + //----------------------------------------------------------------------------- + + doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + EOT(pop[0].size(), 5), + *gen); + state.storeFunctor(bounder); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare sampler class with a specific distribution + //----------------------------------------------------------------------------- + + doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + state.storeFunctor(sampler); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (4) sampling phase + //----------------------------------------------------------------------------- + + pop.clear(); + + for (unsigned int i = 0; i < p_size; ++i) + { + EOT candidate_solution = (*sampler)( distrib ); + pop.push_back( candidate_solution ); + } + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (6) estimation phase + //----------------------------------------------------------------------------- + + doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + state.storeFunctor(estimator); + + distrib = (*estimator)( pop ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (8) euclidianne distance estimation + //----------------------------------------------------------------------------- + + ublas::vector< AtomType > new_mean = distrib.mean(); + ublas::symmetric_matrix< AtomType, ublas::lower > new_varcovar = distrib.varcovar(); + + AtomType distance = 0; + + for ( unsigned int d = 0; d < s_size; ++d ) + { + distance += pow( mean[ d ] - new_mean[ d ], 2 ); + } + + distance = sqrt( distance ); + + eo::log << p_size << " " << s_size << " " + << mean(0) << " " << mean(1) << " " + << new_mean(0) << " " << new_mean(1) << " " + << distance << std::endl + ; + + //----------------------------------------------------------------------------- + + } + + return 0; +} From ba6770df43079143b13e4536c1a07d8522ffe7e0 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 21 Sep 2010 15:12:19 +0200 Subject: [PATCH 1589/2134] + boxplot.py: script to generate graphic with boxplot to illustrate distances between theorical and visual means for each population value --- test/CMakeLists.txt | 1 + test/boxplot.py | 19 +++ test/t-mean-distance.cpp | 241 +++++++++++++++++++++------------------ 3 files changed, 153 insertions(+), 108 deletions(-) create mode 100755 test/boxplot.py diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cf1c0b4fc..80651e533 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -34,6 +34,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/eda_sa) SET(SOURCES t-doEstimatorNormalMulti + t-mean-distance ) FOREACH(current ${SOURCES}) diff --git a/test/boxplot.py b/test/boxplot.py new file mode 100755 index 000000000..3e10e4066 --- /dev/null +++ b/test/boxplot.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +from pylab import * + +FILE_LOCATIONS = 'means_distances_results/files_description.txt' + +data = [] + +locations = [ line.split()[0] for line in open( FILE_LOCATIONS ) ] + +for cur_file in locations: + data.append( [ float(line.split()[7]) for line in open( cur_file ).readlines() ] ) + +print locations +#print data + +boxplot( data ) + +show() diff --git a/test/t-mean-distance.cpp b/test/t-mean-distance.cpp index 3e852a4a5..46173883f 100644 --- a/test/t-mean-distance.cpp +++ b/test/t-mean-distance.cpp @@ -1,3 +1,6 @@ +#include +#include + #include #include #include @@ -27,9 +30,10 @@ int main(int ac, char** av) std::string section("Algorithm parameters"); + unsigned int r_max = parser.createParam((unsigned int)100, "run-number", "Number of run", 'r', section).value(); // r unsigned int p_min = parser.createParam((unsigned int)10, "population-min", "Population min", 'p', section).value(); // p - unsigned int p_max = parser.createParam((unsigned int)10000, "population-max", "Population max", 'P', section).value(); // P - unsigned int p_step = parser.createParam((unsigned int)10, "population-step", "Population step", 't', section).value(); // t + unsigned int p_max = parser.createParam((unsigned int)1000, "population-max", "Population max", 'P', section).value(); // P + unsigned int p_step = parser.createParam((unsigned int)50, "population-step", "Population step", 't', section).value(); // t unsigned int s_size = parser.createParam((unsigned int)2, "dimension-size", "Dimension size", 'd', section).value(); // d AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m @@ -37,6 +41,9 @@ int main(int ac, char** av) AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); // 2 AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value(); // 3 + std::string results_directory = parser.createParam((std::string)"means_distances_results", "results-directory", "Results directory", 'R', section).value(); // R + std::string files_description = parser.createParam((std::string)"files_description.txt", "files-description", "Files description", 'F', section).value(); // F + if (parser.userNeedsHelp()) { parser.printHelp(std::cout); @@ -48,128 +55,146 @@ int main(int ac, char** av) //----------------------------------------------------- - + assert(r_max >= 1); assert(s_size >= 2); - eo::log << eo::debug << "p_size s_size mean(0) mean(1) new-mean(0) new-mean(1) distance" << std::endl; + eo::log << eo::quiet; - eo::log << eo::logging; + ::mkdir( results_directory.c_str(), 0755 ); - for ( unsigned int p_size = p_min; p_size <= p_max; p_size *= p_step ) + for ( unsigned int p_size = p_min; p_size <= p_max; p_size += p_step ) { - assert(p_size >= p_min); - eoState state; + std::ostringstream desc_file; + desc_file << results_directory << "/" << files_description; + std::ostringstream cur_file; + cur_file << results_directory << "/pop_" << p_size << ".txt"; - //----------------------------------------------------- - // (1) Population init and sampler - //----------------------------------------------------- + eo::log << eo::file( desc_file.str() ) << cur_file.str().c_str() << std::endl; - eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); - state.storeFunctor(gen); + eo::log << eo::file( cur_file.str() ); - eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( s_size, *gen ); - state.storeFunctor(init); + eo::log << eo::logging << "run_number p_size s_size mean(0) mean(1) new-mean(0) new-mean(1) distance" << std::endl; - // create an empty pop and let the state handle the memory - // fill population thanks to eoInit instance - eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); + eo::log << eo::quiet; - //----------------------------------------------------- - - - //----------------------------------------------------------------------------- - // (2) distribution initial parameters - //----------------------------------------------------------------------------- - - ublas::vector< AtomType > mean( s_size, mean_value ); - ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); - - varcovar( 0, 0 ) = covar1_value; - varcovar( 0, 1 ) = covar2_value; - varcovar( 1, 1 ) = covar3_value; - - Distrib distrib( mean, varcovar ); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // Prepare bounder class to set bounds of sampling. - // This is used by doSampler. - //----------------------------------------------------------------------------- - - doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), - EOT(pop[0].size(), 5), - *gen); - state.storeFunctor(bounder); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // Prepare sampler class with a specific distribution - //----------------------------------------------------------------------------- - - doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); - state.storeFunctor(sampler); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // (4) sampling phase - //----------------------------------------------------------------------------- - - pop.clear(); - - for (unsigned int i = 0; i < p_size; ++i) + for ( unsigned int r = 1; r <= r_max; ++r) { - EOT candidate_solution = (*sampler)( distrib ); - pop.push_back( candidate_solution ); + + eoState state; + + + //----------------------------------------------------- + // (1) Population init and sampler + //----------------------------------------------------- + + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + state.storeFunctor(gen); + + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( s_size, *gen ); + state.storeFunctor(init); + + // create an empty pop and let the state handle the memory + // fill population thanks to eoInit instance + eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); + + //----------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (2) distribution initial parameters + //----------------------------------------------------------------------------- + + ublas::vector< AtomType > mean( s_size, mean_value ); + ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); + + varcovar( 0, 0 ) = covar1_value; + varcovar( 0, 1 ) = covar2_value; + varcovar( 1, 1 ) = covar3_value; + + Distrib distrib( mean, varcovar ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare bounder class to set bounds of sampling. + // This is used by doSampler. + //----------------------------------------------------------------------------- + + doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + EOT(pop[0].size(), 5), + *gen); + state.storeFunctor(bounder); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare sampler class with a specific distribution + //----------------------------------------------------------------------------- + + doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + state.storeFunctor(sampler); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (4) sampling phase + //----------------------------------------------------------------------------- + + pop.clear(); + + for (unsigned int i = 0; i < p_size; ++i) + { + EOT candidate_solution = (*sampler)( distrib ); + pop.push_back( candidate_solution ); + } + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (6) estimation phase + //----------------------------------------------------------------------------- + + doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + state.storeFunctor(estimator); + + distrib = (*estimator)( pop ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (8) euclidianne distance estimation + //----------------------------------------------------------------------------- + + ublas::vector< AtomType > new_mean = distrib.mean(); + ublas::symmetric_matrix< AtomType, ublas::lower > new_varcovar = distrib.varcovar(); + + AtomType distance = 0; + + for ( unsigned int d = 0; d < s_size; ++d ) + { + distance += pow( mean[ d ] - new_mean[ d ], 2 ); + } + + distance = sqrt( distance ); + + eo::log << r << " " << p_size << " " << s_size << " " + << mean(0) << " " << mean(1) << " " + << new_mean(0) << " " << new_mean(1) << " " + << distance << std::endl + ; + + //----------------------------------------------------------------------------- + } - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // (6) estimation phase - //----------------------------------------------------------------------------- - - doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); - state.storeFunctor(estimator); - - distrib = (*estimator)( pop ); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // (8) euclidianne distance estimation - //----------------------------------------------------------------------------- - - ublas::vector< AtomType > new_mean = distrib.mean(); - ublas::symmetric_matrix< AtomType, ublas::lower > new_varcovar = distrib.varcovar(); - - AtomType distance = 0; - - for ( unsigned int d = 0; d < s_size; ++d ) - { - distance += pow( mean[ d ] - new_mean[ d ], 2 ); - } - - distance = sqrt( distance ); - - eo::log << p_size << " " << s_size << " " - << mean(0) << " " << mean(1) << " " - << new_mean(0) << " " << new_mean(1) << " " - << distance << std::endl - ; - - //----------------------------------------------------------------------------- - } return 0; From eade49c45ad7b4e89ece2a40b1479f7506389ffd Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 21 Sep 2010 17:52:59 +0200 Subject: [PATCH 1590/2134] typo variable name --- eo/src/utils/eoLogger.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index ff8dcea43..a0aa36e51 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -43,8 +43,8 @@ eoLogger eo::log; eoLogger::eoLogger() : std::ostream(&_obuf), - _selectedLevel(eo::progress), _contexLevel(eo::quiet), - _fd(2), _obuf(_fd, _contexLevel, _selectedLevel) + _selectedLevel(eo::progress), _contextLevel(eo::quiet), + _fd(2), _obuf(_fd, _contextLevel, _selectedLevel) { _standard_io_streams[&std::cout] = 1; _standard_io_streams[&std::clog] = 2; @@ -90,7 +90,7 @@ void eoLogger::printLevels() const eoLogger& operator<<(eoLogger& l, const eo::Levels lvl) { - l._contexLevel = lvl; + l._contextLevel = lvl; return l; } @@ -118,12 +118,12 @@ eoLogger& operator<<(eoLogger& l, std::ostream& os) eoLogger::outbuf::outbuf(const int& fd, const eo::Levels& contexlvl, const eo::Levels& selectedlvl) - : _fd(fd), _contexLevel(contexlvl), _selectedLevel(selectedlvl) + : _fd(fd), _contextLevel(contexlvl), _selectedLevel(selectedlvl) {} int eoLogger::outbuf::overflow(int_type c) { - if (_selectedLevel >= _contexLevel) + if (_selectedLevel >= _contextLevel) { if (_fd >= 0 && c != EOF) { From ffc6efeb97ec2b1148fd08225b9d0698a44d9a8b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 21 Sep 2010 17:53:48 +0200 Subject: [PATCH 1591/2134] do not explicitely specify build type, use O3 instead of O2 for release --- eo/BuildConfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/BuildConfig.cmake b/eo/BuildConfig.cmake index 79eae18d8..80107b6ea 100644 --- a/eo/BuildConfig.cmake +++ b/eo/BuildConfig.cmake @@ -2,7 +2,7 @@ #SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE) -SET(CMAKE_BUILD_TYPE Debug) # allows to enable assert calls and -g flag +#SET(CMAKE_BUILD_TYPE Debug) # allows to enable assert calls and -g flag FIND_PROGRAM(MEMORYCHECK_COMMAND NAMES purify valgrind @@ -34,7 +34,7 @@ ELSE(WIN32 AND NOT CYGWIN) IF(CMAKE_COMPILER_IS_GNUCXX) # SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -Wall -Wextra -Wno-unused-parameter") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") ENDIF(CMAKE_COMPILER_IS_GNUCXX) ENDIF(WIN32 AND NOT CYGWIN) From 65191e221259530d45b22fe8939b841a520da146 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Sep 2010 14:38:15 +0200 Subject: [PATCH 1592/2134] + eda algo: same algo than eda-sa without sa, + plotting scripts and problem functions moved to application/common --- CMakeLists.txt | 1 + application/CMakeLists.txt | 6 + application/common/CMakeLists.txt | 14 + application/{eda_sa => common}/Rosenbrock.h | 0 application/{eda_sa => common}/Sphere.h | 0 application/{eda_sa => common}/ggobi.py | 0 application/{eda_sa => common}/gplot.py | 0 application/eda/CMakeLists.txt | 27 ++ application/eda/eda.param | 7 + application/eda/main.cpp | 267 ++++++++++++++++++++ application/eda_sa/CMakeLists.txt | 4 +- application/eda_sa/main.cpp | 4 +- src/do | 1 + src/doEDA.h | 252 ++++++++++++++++++ src/doEDASA.h | 24 +- test/CMakeLists.txt | 2 +- 16 files changed, 595 insertions(+), 14 deletions(-) create mode 100644 application/common/CMakeLists.txt rename application/{eda_sa => common}/Rosenbrock.h (100%) rename application/{eda_sa => common}/Sphere.h (100%) rename application/{eda_sa => common}/ggobi.py (100%) rename application/{eda_sa => common}/gplot.py (100%) create mode 100644 application/eda/CMakeLists.txt create mode 100644 application/eda/eda.param create mode 100644 application/eda/main.cpp create mode 100644 src/doEDA.h diff --git a/CMakeLists.txt b/CMakeLists.txt index da9615509..31da2b9c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,7 @@ ADD_SUBDIRECTORY(doc) ###################################################################################### + ###################################################################################### ### 7) Create executable, link libraries and prepare target ###################################################################################### diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 591fb3035..dabb9ea0f 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -2,6 +2,12 @@ ### 1) Where do we go now ?!? ###################################################################################### +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR}/common + ) + +ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(eda_sa) +ADD_SUBDIRECTORY(eda) ###################################################################################### diff --git a/application/common/CMakeLists.txt b/application/common/CMakeLists.txt new file mode 100644 index 000000000..41a16ecfc --- /dev/null +++ b/application/common/CMakeLists.txt @@ -0,0 +1,14 @@ +PROJECT(common) + +SET(RESOURCES + gplot.py + ggobi.py + ) + +FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${DO_BINARY_DIR}/${file} + ) +ENDFOREACH(file) diff --git a/application/eda_sa/Rosenbrock.h b/application/common/Rosenbrock.h similarity index 100% rename from application/eda_sa/Rosenbrock.h rename to application/common/Rosenbrock.h diff --git a/application/eda_sa/Sphere.h b/application/common/Sphere.h similarity index 100% rename from application/eda_sa/Sphere.h rename to application/common/Sphere.h diff --git a/application/eda_sa/ggobi.py b/application/common/ggobi.py similarity index 100% rename from application/eda_sa/ggobi.py rename to application/common/ggobi.py diff --git a/application/eda_sa/gplot.py b/application/common/gplot.py similarity index 100% rename from application/eda_sa/gplot.py rename to application/common/gplot.py diff --git a/application/eda/CMakeLists.txt b/application/eda/CMakeLists.txt new file mode 100644 index 000000000..41d61ce04 --- /dev/null +++ b/application/eda/CMakeLists.txt @@ -0,0 +1,27 @@ +PROJECT(eda) + +FIND_PACKAGE(Boost 1.33.0) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + +SET(RESOURCES + ${PROJECT_NAME}.param + ) + +FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${DO_BINARY_DIR}/${file} + ) +ENDFOREACH(file) + +FILE(GLOB SOURCES *.cpp) + +SET(EXECUTABLE_OUTPUT_PATH ${DO_BINARY_DIR}) + +ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/application/eda/eda.param b/application/eda/eda.param new file mode 100644 index 000000000..9aceb2306 --- /dev/null +++ b/application/eda/eda.param @@ -0,0 +1,7 @@ +--rho=0 # -p : +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include "Rosenbrock.h" +#include "Sphere.h" + + +typedef eoReal EOT; +typedef doNormalMulti< EOT > Distrib; + + +int main(int ac, char** av) +{ + eoParserLogger parser(ac, av); + + // Letters used by the following declarations: + // a d i p t + + std::string section("Algorithm parameters"); + + // FIXME: default value to check + //double initial_temperature = parser.createParam((double)10e5, "temperature", "Initial temperature", 'i', section).value(); // i + + eoState state; + + + //----------------------------------------------------------------------------- + // Instantiate all needed parameters for EDA algorithm + //----------------------------------------------------------------------------- + + double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R + + eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); + state.storeFunctor(selector); + + doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + state.storeFunctor(estimator); + + eoSelectOne< EOT >* selectone = new eoDetTournamentSelect< EOT >( 2 ); + state.storeFunctor(selectone); + + doModifierMass< Distrib >* modifier = new doNormalMultiCenter< EOT >(); + state.storeFunctor(modifier); + + eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); + state.storeFunctor(plainEval); + + unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E + eoEvalFuncCounterBounder< EOT > eval(*plainEval, max_eval); + + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + state.storeFunctor(gen); + + + unsigned int dimension_size = parser.createParam((unsigned int)10, "dimension-size", "Dimension size", 'd', section).value(); // d + + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( dimension_size, *gen ); + state.storeFunctor(init); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (1) Population init and sampler + //----------------------------------------------------------------------------- + + // Generation of population from do_make_pop (creates parameters, manages persistance and so on...) + // ... and creates the parameters: L P r S + + // this first sampler creates a uniform distribution independently from our distribution (it does not use doUniform). + + eoPop< EOT >& pop = do_make_pop(parser, state, *init); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // (2) First evaluation before starting the research algorithm + //----------------------------------------------------------------------------- + + apply(eval, pop); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare bounder class to set bounds of sampling. + // This is used by doSampler. + //----------------------------------------------------------------------------- + + doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + EOT(pop[0].size(), 5), + *gen); + state.storeFunctor(bounder); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Prepare sampler class with a specific distribution + //----------------------------------------------------------------------------- + + doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + state.storeFunctor(sampler); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // Metropolis sample parameters + //----------------------------------------------------------------------------- + + //unsigned int popSize = parser.getORcreateParam((unsigned int)20, "popSize", "Population Size", 'P', "Evolution Engine").value(); + + //moContinuator< moDummyNeighbor >* sa_continue = new moIterContinuator< moDummyNeighbor >( popSize ); + //state.storeFunctor(sa_continue); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // SA parameters + //----------------------------------------------------------------------------- + + //double threshold_temperature = parser.createParam((double)0.1, "threshold", "Minimal temperature at which stop", 't', section).value(); // t + //double alpha = parser.createParam((double)0.1, "alpha", "Temperature decrease rate", 'a', section).value(); // a + + //moCoolingSchedule* cooling_schedule = new moSimpleCoolingSchedule(initial_temperature, alpha, 0, threshold_temperature); + //state.storeFunctor(cooling_schedule); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // stopping criteria + // ... and creates the parameter letters: C E g G s T + //----------------------------------------------------------------------------- + + eoContinue< EOT >& eo_continue = do_make_continue(parser, state, eval); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // population output + //----------------------------------------------------------------------------- + + eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); + + doPopStat< EOT >* popStat = new doPopStat; + state.storeFunctor(popStat); + pop_continue.add(*popStat); + + doFileSnapshot* fileSnapshot = new doFileSnapshot("EDA_ResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue.add(*fileSnapshot); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // distribution output + //----------------------------------------------------------------------------- + + doDummyContinue< Distrib >* dummy_continue = new doDummyContinue< Distrib >(); + state.storeFunctor(dummy_continue); + + doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); + state.storeFunctor(distribution_continue); + + doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + state.storeFunctor(distrib_stat); + + distribution_continue->add( *distrib_stat ); + + // eoMonitor* stdout_monitor = new eoStdoutMonitor(); + // state.storeFunctor(stdout_monitor); + // stdout_monitor->add(*distrib_stat); + // distribution_continue->add( *stdout_monitor ); + + eoFileMonitor* file_monitor = new eoFileMonitor("eda_distribution_bounds.txt"); + state.storeFunctor(file_monitor); + file_monitor->add(*distrib_stat); + distribution_continue->add( *file_monitor ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // eoEPRemplacement causes the using of the current and previous + // sample for sampling. + //----------------------------------------------------------------------------- + + eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); + + // Below, use eoGenerationalReplacement to sample only on the current sample + + //eoReplacement< EOT >* replacor = new eoGenerationalReplacement< EOT >(); // FIXME: to define the size + + state.storeFunctor(replacor); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // EDA algorithm configuration + //----------------------------------------------------------------------------- + + doAlgo< Distrib >* algo = new doEDA< Distrib > + (*selector, *estimator, *selectone, *modifier, *sampler, + pop_continue, *distribution_continue, + eval, + //*sa_continue, *cooling_schedule, initial_temperature, + *replacor); + + //----------------------------------------------------------------------------- + + + // state.storeFunctor(algo); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + // Help + Verbose routines + + make_verbose(parser); + make_help(parser); + + + //----------------------------------------------------------------------------- + // Beginning of the algorithm call + //----------------------------------------------------------------------------- + + try + { + do_run(*algo, pop); + } + catch (eoEvalFuncCounterBounderException& e) + { + eo::log << eo::warnings << "warning: " << e.what() << std::endl; + } + catch (std::exception& e) + { + eo::log << eo::errors << "error: " << e.what() << std::endl; + exit(EXIT_FAILURE); + } + + //----------------------------------------------------------------------------- + + return 0; +} diff --git a/application/eda_sa/CMakeLists.txt b/application/eda_sa/CMakeLists.txt index 63901a33a..f92e105f2 100644 --- a/application/eda_sa/CMakeLists.txt +++ b/application/eda_sa/CMakeLists.txt @@ -8,9 +8,7 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) SET(RESOURCES - eda_sa.param - gplot.py - ggobi.py + ${PROJECT_NAME}.param ) FOREACH(file ${RESOURCES}) diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index 00cbea6f2..6e4729de3 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -163,7 +163,7 @@ int main(int ac, char** av) state.storeFunctor(popStat); pop_continue.add(*popStat); - doFileSnapshot* fileSnapshot = new doFileSnapshot("ResPop"); + doFileSnapshot* fileSnapshot = new doFileSnapshot("EDASA_ResPop"); state.storeFunctor(fileSnapshot); fileSnapshot->add(*popStat); pop_continue.add(*fileSnapshot); @@ -191,7 +191,7 @@ int main(int ac, char** av) // stdout_monitor->add(*distrib_stat); // distribution_continue->add( *stdout_monitor ); - eoFileMonitor* file_monitor = new eoFileMonitor("distribution_bounds.txt"); + eoFileMonitor* file_monitor = new eoFileMonitor("eda_sa_distribution_bounds.txt"); state.storeFunctor(file_monitor); file_monitor->add(*distrib_stat); distribution_continue->add( *file_monitor ); diff --git a/src/do b/src/do index 1f91d3923..ff2b3e674 100644 --- a/src/do +++ b/src/do @@ -10,6 +10,7 @@ #include "doAlgo.h" #include "doEDASA.h" +#include "doEDA.h" #include "doDistrib.h" #include "doUniform.h" diff --git a/src/doEDA.h b/src/doEDA.h new file mode 100644 index 000000000..6873e5da4 --- /dev/null +++ b/src/doEDA.h @@ -0,0 +1,252 @@ +// (c) Thales group, 2010 +/* + Authors: + Johann Dreo + Caner Candan +*/ + +#ifndef _doEDA_h +#define _doEDA_h + +#include +#include + +#include + +#include "doAlgo.h" +#include "doEstimator.h" +#include "doModifierMass.h" +#include "doSampler.h" +#include "doContinue.h" + +template < typename D > +class doEDA : public doAlgo< D > +{ +public: + //! Alias for the type EOT + typedef typename D::EOType EOT; + + //! Alias for the atom type + typedef typename EOT::AtomType AtomType; + + //! Alias for the fitness + typedef typename EOT::Fitness Fitness; + +public: + + //! doEDA constructor + /*! + All the boxes used by a EDASA need to be given. + + \param selector Population Selector + \param estimator Distribution Estimator + \param selectone SelectOne + \param modifier Distribution Modifier + \param sampler Distribution Sampler + \param pop_continue Population Continuator + \param distribution_continue Distribution Continuator + \param evaluation Evaluation function. + \param sa_continue Stopping criterion. + \param cooling_schedule Cooling schedule, describes how the temperature is modified. + \param initial_temperature The initial temperature. + \param replacor Population replacor + */ + doEDA (eoSelect< EOT > & selector, + doEstimator< D > & estimator, + eoSelectOne< EOT > & selectone, + doModifierMass< D > & modifier, + doSampler< D > & sampler, + eoContinue< EOT > & pop_continue, + doContinue< D > & distribution_continue, + eoEvalFunc < EOT > & evaluation, + //moContinuator< moDummyNeighbor > & sa_continue, + //moCoolingSchedule & cooling_schedule, + //double initial_temperature, + eoReplacement< EOT > & replacor + ) + : _selector(selector), + _estimator(estimator), + _selectone(selectone), + _modifier(modifier), + _sampler(sampler), + _pop_continue(pop_continue), + _distribution_continue(distribution_continue), + _evaluation(evaluation), + //_sa_continue(sa_continue), + //_cooling_schedule(cooling_schedule), + //_initial_temperature(initial_temperature), + _replacor(replacor) + + {} + + //! function that launches the EDASA algorithm. + /*! + As a moTS or a moHC, the EDASA can be used for HYBRIDATION in an evolutionary algorithm. + + \param pop A population to improve. + \return TRUE. + */ + void operator ()(eoPop< EOT > & pop) + { + assert(pop.size() > 0); + + //double temperature = _initial_temperature; + + eoPop< EOT > current_pop; + + eoPop< EOT > selected_pop; + + + //------------------------------------------------------------- + // Estimating a first time the distribution parameter thanks + // to population. + //------------------------------------------------------------- + + D distrib = _estimator(pop); + + double size = distrib.size(); + assert(size > 0); + + //------------------------------------------------------------- + + + do + { + //------------------------------------------------------------- + // (3) Selection of the best points in the population + //------------------------------------------------------------- + + selected_pop.clear(); + + _selector(pop, selected_pop); + + assert( selected_pop.size() > 0 ); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // (4) Estimation of the distribution parameters + //------------------------------------------------------------- + + distrib = _estimator(selected_pop); + + //------------------------------------------------------------- + + + // TODO: utiliser selected_pop ou pop ??? + + assert(selected_pop.size() > 0); + + + //------------------------------------------------------------- + // Init of a variable contening a point with the bestest fitnesses + //------------------------------------------------------------- + + EOT current_solution = _selectone(selected_pop); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Fit the current solution with the distribution parameters (bounds) + //------------------------------------------------------------- + + // FIXME: si besoin de modifier la dispersion de la distribution + // _modifier_dispersion(distribution, selected_pop); + _modifier(distrib, current_solution); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Evaluating a first time the current solution + //------------------------------------------------------------- + + _evaluation( current_solution ); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Building of the sampler in current_pop + //------------------------------------------------------------- + + //_sa_continue.init( current_solution ); + + current_pop.clear(); + + for ( unsigned int i = 0; i < pop.size(); ++i ) + //do + { + EOT candidate_solution = _sampler(distrib); + _evaluation( candidate_solution ); + + // TODO: verifier le critere d'acceptation + if ( candidate_solution.fitness() < current_solution.fitness() + // || rng.uniform() < exp( ::fabs(candidate_solution.fitness() - current_solution.fitness()) / temperature ) + ) + { + current_pop.push_back(candidate_solution); + current_solution = candidate_solution; + } + } + //while ( _sa_continue( current_solution) ); + + //------------------------------------------------------------- + + + _replacor(pop, current_pop); // copy current_pop in pop + + pop.sort(); + + //if ( ! _cooling_schedule( temperature ) ){ eo::log << eo::debug << "_cooling_schedule" << std::endl; break; } + + if ( ! _distribution_continue( distrib ) ){ eo::log << eo::debug << "_distribution_continue" << std::endl; break; } + + if ( ! _pop_continue( pop ) ){ eo::log << eo::debug << "_pop_continue" << std::endl; break; } + + } + while ( 1 ); + } + +private: + + //! A EOT selector + eoSelect < EOT > & _selector; + + //! A EOT estimator. It is going to estimate distribution parameters. + doEstimator< D > & _estimator; + + //! SelectOne + eoSelectOne< EOT > & _selectone; + + //! A D modifier + doModifierMass< D > & _modifier; + + //! A D sampler + doSampler< D > & _sampler; + + //! A EOT population continuator + eoContinue < EOT > & _pop_continue; + + //! A D continuator + doContinue < D > & _distribution_continue; + + //! A full evaluation function. + eoEvalFunc < EOT > & _evaluation; + + //! Stopping criterion before temperature update + //moContinuator< moDummyNeighbor > & _sa_continue; + + //! The cooling schedule + //moCoolingSchedule & _cooling_schedule; + + //! Initial temperature + //double _initial_temperature; + + //! A EOT replacor + eoReplacement < EOT > & _replacor; +}; + +#endif // !_doEDA_h diff --git a/src/doEDASA.h b/src/doEDASA.h index c8e9ad9a9..c6fb4927d 100644 --- a/src/doEDASA.h +++ b/src/doEDASA.h @@ -159,6 +159,15 @@ public: //------------------------------------------------------------- + //------------------------------------------------------------- + // Evaluating a first time the current solution + //------------------------------------------------------------- + + _evaluation( current_solution ); + + //------------------------------------------------------------- + + //------------------------------------------------------------- // Building of the sampler in current_pop //------------------------------------------------------------- @@ -170,21 +179,20 @@ public: do { EOT candidate_solution = _sampler(distrib); - - EOT& e1 = candidate_solution; - _evaluation( e1 ); - EOT& e2 = current_solution; - _evaluation( e2 ); + _evaluation( candidate_solution ); // TODO: verifier le critere d'acceptation - if ( e1.fitness() < e2.fitness() || - rng.uniform() < exp( ::fabs(e1.fitness() - e2.fitness()) / temperature ) ) + if ( candidate_solution.fitness() < current_solution.fitness() || + rng.uniform() < exp( ::fabs(candidate_solution.fitness() - current_solution.fitness()) / temperature ) ) { current_pop.push_back(candidate_solution); current_solution = candidate_solution; } } - while ( _sa_continue( current_solution) ); + while ( _sa_continue( current_solution ) ); + + //------------------------------------------------------------- + _replacor(pop, current_pop); // copy current_pop in pop diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 80651e533..dbb444816 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -30,7 +30,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/eda_sa) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common) SET(SOURCES t-doEstimatorNormalMulti From b1798ad35154ad5939baff669f3ca8286e703d18 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Sep 2010 19:25:37 +0200 Subject: [PATCH 1593/2134] * eda n eda_sa: bug fixed, while we were using -h the result folder was removed --- application/common/CMakeLists.txt | 1 + application/common/boxplot_eda_n_edasa.py | 36 +++++++++ application/eda/main.cpp | 95 ++++++++++++++--------- application/eda_sa/main.cpp | 93 +++++++++++++--------- src/utils/doFileSnapshot.cpp | 19 ++++- src/utils/doFileSnapshot.h | 7 +- 6 files changed, 175 insertions(+), 76 deletions(-) create mode 100755 application/common/boxplot_eda_n_edasa.py diff --git a/application/common/CMakeLists.txt b/application/common/CMakeLists.txt index 41a16ecfc..d16353f59 100644 --- a/application/common/CMakeLists.txt +++ b/application/common/CMakeLists.txt @@ -3,6 +3,7 @@ PROJECT(common) SET(RESOURCES gplot.py ggobi.py + boxplot_eda_n_edasa.py ) FOREACH(file ${RESOURCES}) diff --git a/application/common/boxplot_eda_n_edasa.py b/application/common/boxplot_eda_n_edasa.py new file mode 100755 index 000000000..a4086a677 --- /dev/null +++ b/application/common/boxplot_eda_n_edasa.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +from pylab import * +#from pprint import pprint + +FILE_LOCATIONS = 'EDA_ResPop/list_of_files.txt' + +data = [] + +locations = [ line.split()[0] for line in open( FILE_LOCATIONS ) ] +#pprint( locations ) + +for cur_file in locations: + fitnesses = [ float(line.split()[0]) for line in open( cur_file ).readlines()[1:-1] ] + data.append( fitnesses[1:] ) + +#pprint( data ) + +boxplot( data ) + +# FILE_LOCATIONS = 'EDASA_ResPop/list_of_files.txt' + +# data = [] + +# locations = [ line.split()[0] for line in open( FILE_LOCATIONS ) ] +# #pprint( locations ) + +# for cur_file in locations: +# fitnesses = [ float(line.split()[0]) for line in open( cur_file ).readlines()[1:-1] ] +# data.append( fitnesses[1:] ) + +# #pprint( data ) + +# boxplot( data ) + +show() diff --git a/application/eda/main.cpp b/application/eda/main.cpp index dd5b81378..3e8e0fae4 100644 --- a/application/eda/main.cpp +++ b/application/eda/main.cpp @@ -159,15 +159,6 @@ int main(int ac, char** av) eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); - doPopStat< EOT >* popStat = new doPopStat; - state.storeFunctor(popStat); - pop_continue.add(*popStat); - - doFileSnapshot* fileSnapshot = new doFileSnapshot("EDA_ResPop"); - state.storeFunctor(fileSnapshot); - fileSnapshot->add(*popStat); - pop_continue.add(*fileSnapshot); - //----------------------------------------------------------------------------- @@ -181,21 +172,6 @@ int main(int ac, char** av) doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); state.storeFunctor(distribution_continue); - doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); - state.storeFunctor(distrib_stat); - - distribution_continue->add( *distrib_stat ); - - // eoMonitor* stdout_monitor = new eoStdoutMonitor(); - // state.storeFunctor(stdout_monitor); - // stdout_monitor->add(*distrib_stat); - // distribution_continue->add( *stdout_monitor ); - - eoFileMonitor* file_monitor = new eoFileMonitor("eda_distribution_bounds.txt"); - state.storeFunctor(file_monitor); - file_monitor->add(*distrib_stat); - distribution_continue->add( *file_monitor ); - //----------------------------------------------------------------------------- @@ -216,21 +192,9 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- - // EDA algorithm configuration + // Some stuff to display helper when we are using -h option //----------------------------------------------------------------------------- - doAlgo< Distrib >* algo = new doEDA< Distrib > - (*selector, *estimator, *selectone, *modifier, *sampler, - pop_continue, *distribution_continue, - eval, - //*sa_continue, *cooling_schedule, initial_temperature, - *replacor); - - //----------------------------------------------------------------------------- - - - // state.storeFunctor(algo); - if (parser.userNeedsHelp()) { parser.printHelp(std::cout); @@ -242,6 +206,63 @@ int main(int ac, char** av) make_verbose(parser); make_help(parser); + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // population output (after helper) + // + // FIXME: theses objects are instanciate there in order to avoid a folder + // removing as doFileSnapshot does within ctor. + //----------------------------------------------------------------------------- + + doPopStat< EOT >* popStat = new doPopStat; + state.storeFunctor(popStat); + pop_continue.add(*popStat); + + doFileSnapshot* fileSnapshot = new doFileSnapshot("EDA_ResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue.add(*fileSnapshot); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // distribution output (after helper) + //----------------------------------------------------------------------------- + + doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + state.storeFunctor(distrib_stat); + + distribution_continue->add( *distrib_stat ); + + // eoMonitor* stdout_monitor = new eoStdoutMonitor(); + // state.storeFunctor(stdout_monitor); + // stdout_monitor->add(*distrib_stat); + // distribution_continue->add( *stdout_monitor ); + + eoFileMonitor* file_monitor = new eoFileMonitor("eda_distribution_bounds.txt"); + state.storeFunctor(file_monitor); + file_monitor->add(*distrib_stat); + distribution_continue->add( *file_monitor ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // EDA algorithm configuration + //----------------------------------------------------------------------------- + + doAlgo< Distrib >* algo = new doEDA< Distrib > + (*selector, *estimator, *selectone, *modifier, *sampler, + pop_continue, *distribution_continue, + eval, + //*sa_continue, *cooling_schedule, initial_temperature, + *replacor); + + //----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- // Beginning of the algorithm call diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index 6e4729de3..2d72ad832 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -159,15 +159,6 @@ int main(int ac, char** av) eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); - doPopStat< EOT >* popStat = new doPopStat; - state.storeFunctor(popStat); - pop_continue.add(*popStat); - - doFileSnapshot* fileSnapshot = new doFileSnapshot("EDASA_ResPop"); - state.storeFunctor(fileSnapshot); - fileSnapshot->add(*popStat); - pop_continue.add(*fileSnapshot); - //----------------------------------------------------------------------------- @@ -181,21 +172,6 @@ int main(int ac, char** av) doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); state.storeFunctor(distribution_continue); - doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); - state.storeFunctor(distrib_stat); - - distribution_continue->add( *distrib_stat ); - - // eoMonitor* stdout_monitor = new eoStdoutMonitor(); - // state.storeFunctor(stdout_monitor); - // stdout_monitor->add(*distrib_stat); - // distribution_continue->add( *stdout_monitor ); - - eoFileMonitor* file_monitor = new eoFileMonitor("eda_sa_distribution_bounds.txt"); - state.storeFunctor(file_monitor); - file_monitor->add(*distrib_stat); - distribution_continue->add( *file_monitor ); - //----------------------------------------------------------------------------- @@ -216,20 +192,9 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- - // EDASA algorithm configuration + // Some stuff to display helper when we are using -h option //----------------------------------------------------------------------------- - doAlgo< Distrib >* algo = new doEDASA< Distrib > - (*selector, *estimator, *selectone, *modifier, *sampler, - pop_continue, *distribution_continue, - eval, *sa_continue, *cooling_schedule, - initial_temperature, *replacor); - - //----------------------------------------------------------------------------- - - - // state.storeFunctor(algo); - if (parser.userNeedsHelp()) { parser.printHelp(std::cout); @@ -241,6 +206,62 @@ int main(int ac, char** av) make_verbose(parser); make_help(parser); + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // population output (after helper) + // + // FIXME: theses objects are instanciate there in order to avoid a folder + // removing as doFileSnapshot does within ctor. + //----------------------------------------------------------------------------- + + doPopStat< EOT >* popStat = new doPopStat; + state.storeFunctor(popStat); + pop_continue.add(*popStat); + + doFileSnapshot* fileSnapshot = new doFileSnapshot("EDASA_ResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue.add(*fileSnapshot); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // distribution output (after helper) + //----------------------------------------------------------------------------- + + doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + state.storeFunctor(distrib_stat); + + distribution_continue->add( *distrib_stat ); + + // eoMonitor* stdout_monitor = new eoStdoutMonitor(); + // state.storeFunctor(stdout_monitor); + // stdout_monitor->add(*distrib_stat); + // distribution_continue->add( *stdout_monitor ); + + eoFileMonitor* file_monitor = new eoFileMonitor("eda_sa_distribution_bounds.txt"); + state.storeFunctor(file_monitor); + file_monitor->add(*distrib_stat); + distribution_continue->add( *file_monitor ); + + //----------------------------------------------------------------------------- + + + //----------------------------------------------------------------------------- + // EDASA algorithm configuration + //----------------------------------------------------------------------------- + + doAlgo< Distrib >* algo = new doEDASA< Distrib > + (*selector, *estimator, *selectone, *modifier, *sampler, + pop_continue, *distribution_continue, + eval, *sa_continue, *cooling_schedule, + initial_temperature, *replacor); + + //----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- // Beginning of the algorithm call diff --git a/src/utils/doFileSnapshot.cpp b/src/utils/doFileSnapshot.cpp index 3ad012f76..268cfe82e 100644 --- a/src/utils/doFileSnapshot.cpp +++ b/src/utils/doFileSnapshot.cpp @@ -39,10 +39,12 @@ doFileSnapshot::doFileSnapshot(std::string dirname, std::string filename /*= "gen"*/, std::string delim /*= " "*/, unsigned int counter /*= 0*/, - bool rmFiles /*= true*/) + bool rmFiles /*= true*/, + bool saveFilenames /*= true*/) : _dirname(dirname), _frequency(frequency), _filename(filename), _delim(delim), - _counter(counter), _boolChanged(true) + _counter(counter), _saveFilenames(saveFilenames), + _descOfFiles( NULL ), _boolChanged(true) { std::string s = "test -d " + _dirname; @@ -72,8 +74,15 @@ doFileSnapshot::doFileSnapshot(std::string dirname, int dummy; dummy = system(s.c_str()); // all done + + _descOfFiles = new std::ofstream( std::string(dirname + "/list_of_files.txt").c_str() ); + } +doFileSnapshot::~doFileSnapshot() +{ + delete _descOfFiles; +} void doFileSnapshot::setCurrentFileName() { @@ -93,6 +102,7 @@ eoMonitor& doFileSnapshot::operator()(void) _counter++; _boolChanged = true; setCurrentFileName(); + std::ofstream os(_currentFileName.c_str()); if (!os) @@ -101,6 +111,11 @@ eoMonitor& doFileSnapshot::operator()(void) throw std::runtime_error(str); } + if ( _saveFilenames ) + { + *_descOfFiles << _currentFileName.c_str() << std::endl; + } + return operator()(os); } diff --git a/src/utils/doFileSnapshot.h b/src/utils/doFileSnapshot.h index 9329eed97..ea0ffeb63 100644 --- a/src/utils/doFileSnapshot.h +++ b/src/utils/doFileSnapshot.h @@ -42,7 +42,10 @@ public: std::string filename = "gen", std::string delim = " ", unsigned int counter = 0, - bool rmFiles = true); + bool rmFiles = true, + bool saveFilenames = true); + + virtual ~doFileSnapshot(); virtual bool hasChanged() {return _boolChanged;} virtual std::string getDirName() { return _dirname; } @@ -63,6 +66,8 @@ private : std::string _delim; std::string _currentFileName; unsigned int _counter; + bool _saveFilenames; + std::ofstream* _descOfFiles; bool _boolChanged; }; From ebb20c44c5058969754f8ded0e375eb6a81c8ff9 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Sep 2010 10:38:38 +0200 Subject: [PATCH 1594/2134] there was an issue on doBounderNo class tied to the default values of the ctor of mother class doBounder: fixed --- application/CMakeLists.txt | 1 + src/doBounder.h | 2 +- src/doBounderNo.h | 3 +-- test/CMakeLists.txt | 1 + test/t-bounderno.cpp | 18 ++++++++++++++++++ 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 test/t-bounderno.cpp diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index dabb9ea0f..24b57198d 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -9,5 +9,6 @@ INCLUDE_DIRECTORIES( ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(eda_sa) ADD_SUBDIRECTORY(eda) +ADD_SUBDIRECTORY(sa) ###################################################################################### diff --git a/src/doBounder.h b/src/doBounder.h index 3ce4a5543..44240246e 100644 --- a/src/doBounder.h +++ b/src/doBounder.h @@ -14,7 +14,7 @@ template < typename EOT > class doBounder : public eoUF< EOT&, void > { public: - doBounder( EOT min = -5, EOT max = 5 ) + doBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) : _min(min), _max(max) { assert(_min.size() > 0); diff --git a/src/doBounderNo.h b/src/doBounderNo.h index 94d873a83..0ca883bc7 100644 --- a/src/doBounderNo.h +++ b/src/doBounderNo.h @@ -14,8 +14,7 @@ template < typename EOT > class doBounderNo : public doBounder< EOT > { public: - void operator()( EOT& x ) - {} + void operator()( EOT& ) {} }; #endif // !_doBounderNo_h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dbb444816..4e8bffc72 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -35,6 +35,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common) SET(SOURCES t-doEstimatorNormalMulti t-mean-distance + t-bounderno ) FOREACH(current ${SOURCES}) diff --git a/test/t-bounderno.cpp b/test/t-bounderno.cpp new file mode 100644 index 000000000..1a1571632 --- /dev/null +++ b/test/t-bounderno.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +#include +#include + +#include "Rosenbrock.h" +#include "Sphere.h" + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(void) +{ + doBounderNo< EOT > bounder; + + return 0; +} From ac0a909d1da643b62a3cfd7b61f5e070d30974f4 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 29 Sep 2010 22:52:30 +0200 Subject: [PATCH 1595/2134] using eo::log instead of std::cout --- eo/src/eoCombinedInit.h | 2 +- eo/src/eoDetTournamentSelect.h | 3 ++- eo/src/eoEvalContinue.h | 2 +- eo/src/eoGenContinue.h | 2 +- eo/src/eoMGGReplacement.h | 2 +- eo/src/eoMerge.h | 2 +- eo/src/eoProportionalCombinedOp.h | 9 +++++---- eo/src/eoReduce.h | 8 ++++---- eo/src/eoReduceSplit.h | 6 +++--- eo/src/eoVariableLengthCrossover.h | 9 +++++---- eo/src/eoVector.h | 3 ++- eo/src/eoVectorParticle.h | 3 +-- 12 files changed, 27 insertions(+), 24 deletions(-) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 3d2441322..7acbe3795 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -53,7 +53,7 @@ public: rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - printOn(std::cout); + printOn( eo::log << eo::logging ); } /** outputs the operators and percentages */ diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index 4a197b3ab..7042a3394 100644 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -33,6 +33,7 @@ #include #include +#include #include //----------------------------------------------------------------------------- @@ -50,7 +51,7 @@ template class eoDetTournamentSelect: public eoSelectOne eoDetTournamentSelect(unsigned _tSize = 2 ):eoSelectOne(), tSize(_tSize) { // consistency check if (tSize < 2) { - std::cout << "Warning, Tournament size should be >= 2\nAdjusted to 2\n"; + eo::log << eo::warnings << "Tournament size should be >= 2, adjusted to 2" << std::endl; tSize = 2; } } diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index 7ee38dee0..c8af79fe3 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -46,7 +46,7 @@ public: (void)_vEO; if (eval.value() >= repTotalEvaluations) { - std::cout << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]\n"; + eo::log << eo::progress << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]" << std::endl; return false; } return true; diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index c578fcc9c..e670cf317 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -57,7 +57,7 @@ public: (void)_vEO; thisGeneration++; value() = thisGeneration; - // std::cout << " [" << thisGeneration << "] "; + if (thisGeneration >= repTotalGenerations) { if (verbose) diff --git a/eo/src/eoMGGReplacement.h b/eo/src/eoMGGReplacement.h index c436f4ce3..55eaaa54b 100644 --- a/eo/src/eoMGGReplacement.h +++ b/eo/src/eoMGGReplacement.h @@ -58,7 +58,7 @@ public: { if (tSize < 2) { - std::cout << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2\n"; + eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2" << std::endl; tSize = 2; } } diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index defd1fc56..0e359ae53 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -70,7 +70,7 @@ public : throw std::logic_error("Negative number of offspring in eoElitism!"); combien = (unsigned int)_rate; if (combien != _rate) - std::cout << "Warning: Number of guys to merge in eoElitism was rounded"; + eo::log << eo::warnings << "Warning: Number of guys to merge in eoElitism was rounded" << std::endl; } } diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index e1f3053c7..79b74111d 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -29,6 +29,7 @@ #include #include #include +#include /** \defgroup PropCombinedOperators Combination of same-type Genetic Operators - Proportional choice @@ -73,7 +74,7 @@ public: rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - printOn(std::cout); + printOn( eo::log << eo::logging ); } // outputs the operators and percentages @@ -129,9 +130,9 @@ virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) unsigned i; for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + eo::log << eo::logging << ops[i]->className() << " with rate " << 100*rates[i]/total << " %" << std::endl; } } @@ -179,7 +180,7 @@ virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) rates.push_back(_rate); // compute the relative rates in percent - to warn the user! if (_verbose) - printOn(std::cout); + printOn( eo::log << eo::logging ); } // outputs the operators and percentages diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 31ecd7767..9d5ff97b4 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -90,7 +90,7 @@ typedef typename EOT::Fitness Fitness; { if (t_size < 2) { - std::cout << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; + eo::log << eo::warnings << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; t_size = 2; } } @@ -193,7 +193,7 @@ public: { if (t_size < 2) { - std::cout << "Warning, Size for eoDetTournamentTruncate adjusted to 2\n"; + eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncate adjusted to 2" << std::endl; t_size = 2; } } @@ -241,12 +241,12 @@ public: { if (t_rate <= 0.5) { - std::cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51\n"; + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51" << std::endl; t_rate = 0.51; } if (t_rate > 1) { - std::cout << "Warning, Rate for eoStochTournamentTruncate adjusted to 1\n"; + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncate adjusted to 1" << std::endl; t_rate = 1; } } diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index 62a6f142f..915de4741 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -215,7 +215,7 @@ public: { if (t_size < 2) { - std::cout << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2\n"; + eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2" << std::endl; t_size = 2; } } @@ -266,12 +266,12 @@ public: { if (t_rate <= 0.5) { - std::cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51\n"; + eo::log << eo:warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl; t_rate = 0.51; } if (t_rate > 1) { - std::cout << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1\n"; + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1" << std::endl; t_rate = 1; } } diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 1e0772da8..ff86c60f6 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -128,7 +128,7 @@ public : && (index<10000) ); if (index >= 10000) { - std::cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; return false; } // here we know we have the right sizes: do the actual exchange @@ -251,9 +251,10 @@ public : } while ( ( (tmp1.size()Max) || (tmp2.size()>Max) ) && (index<10000) ); + // FIXME bad hardcoded limit, should use an algorithm that guarantee a correct size in a finite number of tries if (index >= 10000) { - std::cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; return false; } @@ -318,10 +319,10 @@ public : index++; } while ( ( (tmp1.size()Max) ) && (index<10000) ); - // this while condition is not optimal, as it may take some time + // this while condition is not optimal, as it may take some time, see the FIXME above if (index >= 10000) { - std::cout << "Warning: impossible to generate individual of the right size in 10000 trials\n"; + eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; return false; } diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index a3a634531..ce85391f6 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -26,6 +26,7 @@ Old contact: todos@geneura.ugr.es, http://geneura.ugr.es #include #include #include +#include /** Base class for fixed length chromosomes @@ -71,7 +72,7 @@ public: if (_v.size() != size()) // safety check { if (size()) // NOT an initial empty std::vector - std::cout << "Warning: Changing size in eoVector assignation"< Date: Tue, 12 Oct 2010 10:09:56 +0200 Subject: [PATCH 1596/2134] I have fixed some bugs and added some tests for doDistrib classes --- src/TODO | 1 - src/doDistrib.h | 4 +++- src/doSamplerUniform.h | 7 +++---- test/CMakeLists.txt | 2 ++ test/t-bounderno.cpp | 5 ----- test/t-continue.cpp | 17 +++++++++++++++++ test/t-uniform.cpp | 16 ++++++++++++++++ 7 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 test/t-continue.cpp create mode 100644 test/t-uniform.cpp diff --git a/src/TODO b/src/TODO index bed1db02a..e69de29bb 100644 --- a/src/TODO +++ b/src/TODO @@ -1 +0,0 @@ -* integrer ACP diff --git a/src/doDistrib.h b/src/doDistrib.h index 15b051f8f..f150e8e0e 100644 --- a/src/doDistrib.h +++ b/src/doDistrib.h @@ -8,8 +8,10 @@ #ifndef _doDistrib_h #define _doDistrib_h +#include + template < typename EOT > -class doDistrib +class doDistrib : public eoFunctorBase { public: //! Alias for the type diff --git a/src/doSamplerUniform.h b/src/doSamplerUniform.h index 1d62b903c..6f79c1387 100644 --- a/src/doSamplerUniform.h +++ b/src/doSamplerUniform.h @@ -18,15 +18,14 @@ * This class uses the Uniform distribution parameters (bounds) to return * a random position used for population sampling. */ -template < typename EOT, class D=doUniform > +template < typename EOT, class D=doUniform > // FIXME: D template name is there really used ?!? class doSamplerUniform : public doSampler< doUniform< EOT > > { public: - typedef D Distrib; - + doSamplerUniform(doBounder< EOT > & bounder) - : doSampler< doUniform >(bounder) + : doSampler< doUniform >(bounder) // FIXME: Why D is not used here ? {} /* diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4e8bffc72..74ad84ac6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,6 +36,8 @@ SET(SOURCES t-doEstimatorNormalMulti t-mean-distance t-bounderno + t-uniform + t-continue ) FOREACH(current ${SOURCES}) diff --git a/test/t-bounderno.cpp b/test/t-bounderno.cpp index 1a1571632..0898520b4 100644 --- a/test/t-bounderno.cpp +++ b/test/t-bounderno.cpp @@ -1,12 +1,7 @@ #include #include -#include - -#include -#include #include "Rosenbrock.h" -#include "Sphere.h" typedef eoReal< eoMinimizingFitness > EOT; diff --git a/test/t-continue.cpp b/test/t-continue.cpp new file mode 100644 index 000000000..5cae79ff3 --- /dev/null +++ b/test/t-continue.cpp @@ -0,0 +1,17 @@ +#include +#include + +#include "Rosenbrock.h" + +typedef eoReal< eoMinimizingFitness > EOT; +typedef doUniform< EOT > Distrib; + +int main(void) +{ + eoState state; + + doContinue< Distrib >* continuator = new doDummyContinue< Distrib >(); + state.storeFunctor(continuator); + + return 0; +} diff --git a/test/t-uniform.cpp b/test/t-uniform.cpp new file mode 100644 index 000000000..d7aedfea6 --- /dev/null +++ b/test/t-uniform.cpp @@ -0,0 +1,16 @@ +#include +#include + +#include "Rosenbrock.h" + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(void) +{ + eoState state; + + doUniform< EOT >* distrib = new doUniform< EOT >( EOT(3, -1), EOT(3, 1) ); + state.storeFunctor(distrib); + + return 0; +} From 11b14cf597756f645d4b43b944f5d675c1f36512 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 22 Oct 2010 10:07:09 +0200 Subject: [PATCH 1597/2134] Arithmetic operators (note: priority to unfeasibility) --- eo/src/eoDualFitness.h | 43 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index d54750ba3..c57d9fcc7 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -143,6 +143,48 @@ public: public: + //! Add a given fitness to the current one + template + friend + eoDualFitness & operator+=( eoDualFitness & from, const eoDualFitness & that ) + { + from._value += that._value; + + // true only if the two are feasible, else false + from._is_feasible = from._is_feasible && that._is_feasible; + + return from; + } + + //! Substract a given fitness to the current one + template + friend + eoDualFitness & operator-=( eoDualFitness & from, const eoDualFitness & that ) + { + from._value -= that._value; + + // true only if the two are feasible, else false + from._is_feasible = from._is_feasible && that._is_feasible; + + return from; + } + + // Add this fitness's value to that other, and return a _new_ instance with the result. + template + eoDualFitness operator+(const eoDualFitness & that) + { + eoDualFitness from( *this ); + return from += that; + } + + // Add this fitness's value to that other, and return a _new_ instance with the result. + template + eoDualFitness operator-(const eoDualFitness & that) + { + eoDualFitness from( *this ); + return from -= that; + } + //! Print an eoDualFitness instance as a pair of numbers, separated by a space template friend @@ -166,7 +208,6 @@ public: f = std::make_pair( value, feasible ); return is; } - }; //! Compare dual fitnesses as if we were maximizing From 91ab6b8296dc162efef69c19118405c5c487c7b3 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 22 Oct 2010 10:08:57 +0200 Subject: [PATCH 1598/2134] a stat object for computing interquartile range (a robust measure of dispersion) --- eo/src/utils/eoStat.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index a0cf08a67..bc267e11e 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -453,4 +453,31 @@ public : } }; */ + +//! A robust measure of dispersion (also called midspread or middle fifty) that is the difference between the third and the first quartile. +template +class eoInterquartileRangeStat : public eoStat< EOT, typename EOT::Fitness > +{ +public: + using eoStat::value; + + eoInterquartileRangeStat( typename EOT::Fitness start, std::string description = "IQR" ) : eoStat( start, description ) {} + + virtual void operator()( const eoPop & _pop ) + { + eoPop pop = _pop; + + unsigned int quartile = pop.size()/4; + std::nth_element( pop.begin(), pop.begin()+quartile*1, pop.end() ); + typename EOT::Fitness Q1 = pop[quartile].fitness(); + + std::nth_element( pop.begin(), pop.begin()+quartile*3, pop.end() ); + typename EOT::Fitness Q3 = pop[quartile*3].fitness(); + + value() = Q1 - Q3; + } + + virtual std::string className(void) const { return "eoInterquartileRangeStat"; } +}; + #endif From 47c4f58eb8a989cc387cccedcadd795a1fb31e06 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 25 Oct 2010 09:50:50 +0200 Subject: [PATCH 1599/2134] Stat object to compute ratio of feasible indviduals in a pop using eoDualFitness --- eo/src/eoDualFitness.h | 16 ++++++++ eo/src/utils/eoFeasibleRatioStat.h | 65 ++++++++++++++++++++++++++++++ eo/src/utils/eoStat.h | 11 +++-- 3 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 eo/src/utils/eoFeasibleRatioStat.h diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index c57d9fcc7..946f95c6c 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -50,6 +50,11 @@ Authors: * * This class overrides operator<() to use the Compare template argument and handle feasibility. * Over operators are coded using this sole function. + * + * Standard arithmetic operators are provided to add or substract dual fitnesses. + * They behave as expected for the fitness value and gives priority to unfeasible fitness + * (i.e. when adding or substracting dual fitness, the only case when the result will be + * a feasible fitness is when both are feasible, else the result is an unfeasibe fitness) */ template class eoDualFitness @@ -90,6 +95,11 @@ public: _is_feasible(dual.second) {} + inline bool is_feasible() const + { + return _is_feasible; + } + //! Copy operator eoDualFitness& operator=(const eoDualFitness& other) { @@ -216,5 +226,11 @@ typedef eoDualFitness > eoMaximizingDualFitness; //! Compare dual fitnesses as if we were minimizing typedef eoDualFitness > eoMinimizingDualFitness; +//! A predicate that returns the feasibility of a given dual fitness +/** Use this in STL algorithm that use binary predicates (e.g. count_if, find_if, etc.) + */ +template< class EOT> +bool eoIsFeasible ( const EOT & sol ) { return sol.fitness().is_feasible(); } + #endif // _eoDualFitness_h_ diff --git a/eo/src/utils/eoFeasibleRatioStat.h b/eo/src/utils/eoFeasibleRatioStat.h new file mode 100644 index 000000000..1092e9036 --- /dev/null +++ b/eo/src/utils/eoFeasibleRatioStat.h @@ -0,0 +1,65 @@ + +/* + +(c) 2010 Thales group + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; version 2 + of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + Johann DrĂ©o + +*/ + +#ifndef _eoFeasibleRatioStat_h_ +#define _eoFeasibleRatioStat_h_ + +#include + +#include +#include + +#include "eoStat.h" + +//! Ratio of the number of individuals with a feasible dual fitness in the population (@see eoDualFitness) +template +class eoFeasibleRatioStat : public eoStat< EOT, double > +{ +public: + using eoStat::value; + + eoFeasibleRatioStat( std::string description = "FeasibleRatio" ) : eoStat( 0.0, description ) {} + + virtual void operator()( const eoPop & pop ) + { +#ifndef NDEBUG + assert( pop.size() > 0 ); + + double count = static_cast( std::count_if( pop.begin(), pop.end(), eoIsFeasible ) ); + double size = static_cast( pop.size() ); + double ratio = count/size; + eo::log << eo::xdebug << "eoFeasibleRatioStat: " << count << " / " << size << " = " << ratio << std::endl; + value() = ratio; +#else + value() = static_cast( std::count_if( pop.begin(), pop.end(), eoIsFeasible ) ) / static_cast( pop.size() ); +#endif + } + + virtual std::string className(void) const { return "eoFeasibleRatioStat"; } +}; + +#endif // _eoFeasibleRatioStat_h_ + diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index bc267e11e..6897bfb54 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -3,6 +3,7 @@ //----------------------------------------------------------------------------- // eoStat.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +// (c) 2010 Thales group /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,9 +19,13 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk +Contact: http://eodev.sourceforge.net + + Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann DrĂ©o */ //----------------------------------------------------------------------------- From 4a90420dd3807fd569c8886dca059cd34d04c622 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 10:51:48 +0200 Subject: [PATCH 1600/2134] create a more generic class for monitoring to any ostream (useful for output to clog or cerr, for example), the stdout monitor now inherits from it --- eo/src/utils/CMakeLists.txt | 2 +- eo/src/utils/checkpointing | 1 + ...StdoutMonitor.cpp => eoOStreamMonitor.cpp} | 30 +++++---- eo/src/utils/eoOStreamMonitor.h | 62 +++++++++++++++++++ eo/src/utils/eoStdoutMonitor.h | 34 +++++----- 5 files changed, 97 insertions(+), 32 deletions(-) rename eo/src/utils/{eoStdoutMonitor.cpp => eoOStreamMonitor.cpp} (51%) create mode 100644 eo/src/utils/eoOStreamMonitor.h diff --git a/eo/src/utils/CMakeLists.txt b/eo/src/utils/CMakeLists.txt index ea36d4bbd..ec70053b5 100644 --- a/eo/src/utils/CMakeLists.txt +++ b/eo/src/utils/CMakeLists.txt @@ -22,7 +22,7 @@ SET (EOUTILS_SOURCES eoData.cpp eoRealBounds.cpp eoRNG.cpp eoState.cpp - eoStdoutMonitor.cpp + eoOStreamMonitor.cpp eoUpdater.cpp make_help.cpp pipecom.cpp diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index e2b7ce425..dea1432c9 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -4,6 +4,7 @@ #include #include #include +#include #ifndef _MSC_VER #include #include diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp similarity index 51% rename from eo/src/utils/eoStdoutMonitor.cpp rename to eo/src/utils/eoOStreamMonitor.cpp index 622a2743e..817d9ab21 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -6,31 +6,34 @@ #include #include #include +#include +#include -#include +#include #include #include #include -using namespace std; +//using namespace std; -eoMonitor& eoStdoutMonitor::operator()(void) +eoMonitor& eoOStreamMonitor::operator()(void) { - if (!cout) { - string str = "eoStdoutMonitor: Could not write to cout"; - throw runtime_error (str); + if (!out) { + std::string str = "eoOStreamMonitor: Could not write to the ooutput stream"; + throw std::runtime_error(str); } if (firsttime) { if (verbose) { - eo::log << eo::progress << "First Generation" << endl; + eo::log << eo::progress << "First Generation" << std::endl; } else { // else verbose for (iterator it = vec.begin (); it != vec.end (); ++it) { - cout << (*it)->longName () << delim; + out << (*it)->longName (); + out << delim << std::left << std::setfill(fill) << std::setw(width); } - cout << endl; + out << std::endl; } // else verbose firsttime = false; @@ -40,18 +43,19 @@ eoMonitor& eoStdoutMonitor::operator()(void) if (verbose) { for (iterator it = vec.begin (); it != vec.end (); ++it) { // name: value - cout << (*it)->longName () << ": " << (*it)->getValue () << endl; + out << (*it)->longName () << ": " << (*it)->getValue () << std::endl; } // for it in vec - eo::log << eo::progress << "End of Generation" << endl; + eo::log << eo::progress << "End of Generation" << std::endl; } else { // else verbose for (iterator it = vec.begin (); it != vec.end (); ++it) { // value only - cout << (*it)->getValue () << delim; + out << (*it)->getValue (); + out << delim << std::left << std::setfill(fill) << std::setw(width); } // for it in vec - cout << endl; + out << std::endl; } // if verbose return *this; diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h new file mode 100644 index 000000000..d96588044 --- /dev/null +++ b/eo/src/utils/eoOStreamMonitor.h @@ -0,0 +1,62 @@ + +/* + +(c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free + Software Foundation; version 2 of the license. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., 59 + Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + todos@geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann DrĂ©o +*/ + + + +#ifndef _eoOStreamMonitor_h_ +#define _eoOStreamMonitor_h_ + +#include +#include + +#include +#include + +/** + Prints statistics to stdout +*/ +class eoOStreamMonitor : public eoMonitor +{ +public : + eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), verbose(_verbose), delim(_delim), width(_width), fill(_fill), firsttime(true) {} + + eoMonitor& operator()(void); + + virtual std::string className(void) const { return "eoOStreamMonitor"; } + +private : + std::ostream & out; + bool verbose; + std::string delim; + unsigned int width; + char fill; + bool firsttime; +}; + +#endif // _eoOStreamMonitor_h_ + diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 43335a574..4a2083ab3 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -1,9 +1,8 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eoStdoutMonitor.h -// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 /* +(c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +(c) Thales group, 2010 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -18,35 +17,34 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- + +Contact: http://eodev.sourceforge.net + +Authors: + todos@geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann DrĂ©o +*/ #ifndef _eoStdoutMonitor_h #define _eoStdoutMonitor_h #include -#include +#include #include /** Prints statistics to stdout */ -class eoStdoutMonitor : public eoMonitor +class eoStdoutMonitor : public eoOStreamMonitor { public : - eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t") : - verbose(_verbose), delim(_delim), firsttime(true) {} - eoMonitor& operator()(void); + eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) {} - virtual std::string className(void) const { return "eoStdoutMonitor"; } -private : - bool verbose; - std::string delim; - bool firsttime; + virtual std::string className(void) const { return "eoStdoutMonitor"; } }; #endif From 2ff9506810f52d565b8ffa558a87c80b4d662f61 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 13:32:43 +0200 Subject: [PATCH 1601/2134] replace the changelog with the (cleaned) git log, more up-to-date --- eo/CHANGELOG | 8444 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 8444 insertions(+) create mode 100644 eo/CHANGELOG diff --git a/eo/CHANGELOG b/eo/CHANGELOG new file mode 100644 index 000000000..09c7a2e60 --- /dev/null +++ b/eo/CHANGELOG @@ -0,0 +1,8444 @@ +Author: Johann Dreo +Date: Tue Oct 26 10:51:48 2010 +0200 + + create a more generic class for monitoring to any ostream (useful for output to clog or cerr, for example), the stdout monitor now inherits from it + +Author: Johann Dreo +Date: Mon Oct 25 09:50:50 2010 +0200 + + Stat object to compute ratio of feasible indviduals in a pop using eoDualFitness + +Author: Johann Dreo +Date: Fri Oct 22 10:08:57 2010 +0200 + + a stat object for computing interquartile range (a robust measure of dispersion) + +Author: Johann Dreo +Date: Fri Oct 22 10:07:09 2010 +0200 + + Arithmetic operators (note: priority to unfeasibility) + +Author: Johann Dreo +Date: Wed Sep 29 22:52:30 2010 +0200 + + using eo::log instead of std::cout + +Author: Johann Dreo +Date: Tue Sep 21 17:53:48 2010 +0200 + + do not explicitely specify build type, use O3 instead of O2 for release + +Author: Johann Dreo +Date: Tue Sep 21 17:52:59 2010 +0200 + + typo variable name + +Author: Johann Dreo +Date: Mon Sep 20 11:32:55 2010 +0200 + + deactivate -fprofile-arcs -ftest-coverage that necessitate gcov + +Author: Johann Dreo +Date: Thu Sep 16 14:16:24 2010 +0200 + + accessors to levels ; typofix on _contextLevel + +Author: Johann Dreo +Date: Thu Sep 16 11:29:32 2010 +0200 + + important note: we are using wallclock time + +Author: Johann Dreo +Date: Thu Sep 16 11:16:55 2010 +0200 + + bugfix operator() signature + +Author: Johann Dreo +Date: Thu Sep 16 11:06:04 2010 +0200 + + evals that can throw exceptions + +Merge: ccd5b01 88b2ec3 +Author: Johann Dreo +Date: Thu Sep 16 09:41:26 2010 +0200 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Thu Sep 16 09:33:55 2010 +0200 + + more comments ; header + +Author: Johann Dreo +Date: Thu Sep 16 09:29:51 2010 +0200 + + typo bugfix + +Author: Johann Dreo +Date: Thu Sep 16 09:28:55 2010 +0200 + + use std::endl ; error message format ; more comments + +Author: Johann Dreo +Date: Wed Sep 15 22:53:15 2010 +0200 + + bugfix _keep_existing name ; added an overwriting option to use ios_base::trunc instead of ios_base::app + +Author: Johann Dreo +Date: Wed Sep 15 22:28:58 2010 +0200 + + use eo::log + +Author: Johann Dreo +Date: Wed Sep 15 22:28:29 2010 +0200 + + doc comments + +Author: nojhan +Date: Thu Sep 9 22:37:50 2010 +0200 + + update related softwares: + EASEA, GUIDE + +Author: Johann Dreo +Date: Mon Sep 6 12:05:13 2010 +0200 + + bugfix xdebug level + +Author: Johann Dreo +Date: Mon Sep 6 11:20:00 2010 +0200 + + use eo::log instead of cout + +Author: Johann Dreo +Date: Mon Sep 6 00:04:37 2010 +0200 + + indent clean, more comments + +Author: Johann Dreo +Date: Sun Sep 5 23:56:17 2010 +0200 + + replace \n with endl + +Author: Johann Dreo +Date: Sun Sep 5 23:42:58 2010 +0200 + + use eo::log instead of cout + +Author: nojhan +Date: Fri Sep 3 09:19:23 2010 +0200 + + official xmpp chat room + +Author: Caner Candan +Date: Wed Sep 1 19:15:26 2010 +0200 + + * t-eoLogger: missed some code lines to display correctly the help + +Author: Caner Candan +Date: Wed Sep 1 17:30:50 2010 +0200 + + * packaging: now the test and tutorial binaries are installed in share directory + +Author: Caner Candan +Date: Wed Sep 1 14:51:09 2010 +0200 + + ticket #1: Remove the autotools files done + +Merge: 5bd0baa 7159f8e +Author: Caner Candan +Date: Wed Sep 1 12:07:23 2010 +0200 + + Merge branch 'packaging' of ssh://localhost:9001/gitroot/eodev/eodev + +Author: Caner Candan +Date: Wed Sep 1 12:01:42 2010 +0200 + + eo::log: added the parameter -o in order to define a log file + removed some warning messages at compile time + +Author: Caner Candan +Date: Tue Aug 31 19:26:51 2010 +0200 + + * added some useful comments in eoLogger class + +Author: Caner Candan +Date: Tue Aug 31 16:39:21 2010 +0200 + + fixed some warning messages while compiling + +Author: Caner Candan +Date: Tue Aug 31 16:35:50 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 16:34:03 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 16:32:19 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 16:31:39 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 15:53:32 2010 +0200 + + * eoRNG.h: added double uniform(double min, double max) + +Author: Caner Candan +Date: Tue Aug 31 14:56:11 2010 +0200 + + * eoFitContinue: using of _pop.best_element().fitness() instead of pop.nth_element_fitness(0) + +Author: Caner Candan +Date: Tue Aug 31 14:54:42 2010 +0200 + + removed a wrong logging message from eoEvalContinue.h + +Author: Caner Candan +Date: Tue Aug 31 14:52:08 2010 +0200 + + repared some compile warning messages + +Author: Caner Candan +Date: Tue Aug 31 14:15:54 2010 +0200 + + updated doxygen config file to the version 1.6.x + +Author: Caner Candan +Date: Tue Aug 31 14:10:13 2010 +0200 + + * fixed some warning issues during compilation + +Author: Caner Candan +Date: Tue Aug 31 14:06:34 2010 +0200 + + updated doc/CMakeLists.txt in order to add docs in packages + +Author: Caner Candan +Date: Tue Aug 31 14:04:25 2010 +0200 + + removed useless eo.cfg, this is generated automaticaly by cmake with the file eo.cfg.cmake + +Merge: 248d12d 2fdc24a +Author: Johann Dreo +Date: Tue Aug 31 10:22:46 2010 +0200 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Mon Aug 30 22:50:59 2010 +0200 + + add eoDualFitness.h to the list of headers + +Author: Johann Dreo +Date: Mon Aug 30 22:50:34 2010 +0200 + + bugfix: typo on _this_ + +Author: Johann Dreo +Date: Mon Aug 30 22:46:55 2010 +0200 + + update of the license headers, LGPL version 2 only for those new files + +Author: Johann Dreo +Date: Mon Aug 30 22:46:37 2010 +0200 + + add a xdebug level & update of the license headers, LGPL version 2 only for this new file + +Author: Johann Dreo +Date: Mon Aug 30 22:44:18 2010 +0200 + + no ; at the end of the line + +Author: Johann Dreo +Date: Mon Aug 30 22:43:50 2010 +0200 + + New class: A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. + +Author: Johann Dreo +Date: Mon Aug 30 22:42:42 2010 +0200 + + no ; at the end of the line + +Author: nojhan +Date: Sat Aug 28 12:30:37 2010 +0200 + + openhatch button, supposed to facilitate the involvement of new contributors + +Author: nojhan +Date: Thu Aug 19 22:04:01 2010 +0200 + + more sections to jump to + +Author: nojhan +Date: Thu Aug 19 21:45:19 2010 +0200 + + correct links to sourceforge features + +Author: nojhan +Date: Thu Aug 19 20:38:19 2010 +0200 + + bugfix #2054922: using base_const_iterator::node; + +Author: Caner CANDAN +Date: Wed Aug 18 17:30:11 2010 +0200 + + * eoDetSelect: when the call of howmany() returns 0 it is replaced by 1 + +Author: Caner CANDAN +Date: Wed Aug 18 17:18:36 2010 +0200 + + fixed a warning issue at the file eoRealBounds.cpp + +Author: Caner CANDAN +Date: Wed Aug 18 17:06:16 2010 +0200 + + + cpack configuration in order to generate packaging files, to make it easier use the script package_deb and package_rpm + +Merge: 0a37f66 6ec3fc5 +Author: Caner CANDAN +Date: Wed Aug 18 12:16:13 2010 +0200 + + Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Tue Aug 17 15:11:18 2010 +0200 + + correct headers ; class comment + +Author: Johann Dreo +Date: Tue Aug 17 15:07:17 2010 +0200 + + improved explanations + +Author: Johann Dreo +Date: Tue Aug 17 15:02:39 2010 +0200 + + missing header ; correct copyright ; correct emails + +Author: Johann Dreo +Date: Tue Aug 17 14:59:24 2010 +0200 + + translate variable from french to english + +Author: Johann Dreo +Date: Tue Aug 17 14:56:33 2010 +0200 + + use eo::log ; warning when returns 0 + +Merge: 9f4c073 68a03aa +Author: Caner CANDAN +Date: Wed Aug 4 14:10:57 2010 +0200 + + Merge branch 'yaml_load_and_save' of ssh://localhost:9001/gitroot/eodev/eodev + +Author: Caner CANDAN +Date: Wed Aug 4 13:47:51 2010 +0200 + + + feature eoSIGContinue: Continuator can catch user signals + feature eoLogger: flexible logging system for eo + +Author: Johann Dreo +Date: Mon Aug 2 17:07:32 2010 +0200 + + code to display only once the message about the help parameter + some indent fix + some more comments + +Author: nojhan +Date: Sun Aug 1 22:27:31 2010 +0200 + + list of some publications + +Author: nojhan +Date: Sun Aug 1 10:55:38 2010 +0200 + + example diagrams now close to features list, with a better legend + +Author: nojhan +Date: Sat Jul 31 23:00:10 2010 +0200 + + better layout for the menu + +Author: nojhan +Date: Sat Jul 31 22:48:49 2010 +0200 + + correct layout in 1024, better spacing for greater resolutions + +Author: nojhan +Date: Sat Jul 31 22:40:04 2010 +0200 + + 'jump to section' links and back links + +Author: nojhan +Date: Sat Jul 31 22:14:09 2010 +0200 + + logo icon for sourceforge, without text, 48px + +Author: nojhan +Date: Sat Jul 31 22:06:27 2010 +0200 + + slides via slideshare, better section order, small design changes + +Author: nojhan +Date: Sat Jul 31 18:59:12 2010 +0200 + + website sources + +Author: nojhan +Date: Thu Jul 29 14:28:05 2010 +0200 + + no more CVSROOT + +Author: paradiseo +Date: Tue Jun 22 09:31:58 2010 +0000 + + Store a result in a variable to have no warning + +Author: paradiseo +Date: Thu Jun 10 10:03:26 2010 +0000 + + Add "Visual Studio 10" in config file for CMake + +Author: stevemadere +Date: Fri May 7 03:17:44 2010 +0000 + + changed YAML saving technique to YAML::Serializable + +Author: stevemadere +Date: Thu May 6 22:46:10 2010 +0000 + + added support to save app/gprop/mlp as YAML + +Author: stevemadere +Date: Tue May 4 17:18:12 2010 +0000 + + configure changes to prepare for use of libyaml-cpp + +Author: (EO team) <(EO team)> +Date: Tue May 4 13:00:51 2010 +0000 + + 'yaml_load_and_save'. + +Author: stevemadere +Date: Tue May 4 13:00:50 2010 +0000 + + Reflecting build process changes in doc and source tree (now using autogen.sh;./configure) + +Author: stevemadere +Date: Tue May 4 12:56:54 2010 +0000 + + Added includes necessary to compile using gcc 4.4 + +Author: stevemadere +Date: Tue May 4 12:54:36 2010 +0000 + + Removed references to eliminated headers eoDummyFlight.h, eoLSPSO.h, eoSSPSO.h + +Author: stevemadere +Date: Tue May 4 12:50:29 2010 +0000 + + Removed reference to Lesson6 until its makefile is fixed + +Author: paradiseo +Date: Thu Mar 18 12:44:45 2010 +0000 + + add an include + +Author: paradiseo +Date: Wed Dec 9 15:49:30 2009 +0000 + + +Author: paradiseo +Date: Thu Jun 25 14:49:53 2009 +0000 + + Accept long time + +Author: paradiseo +Date: Tue Jan 27 16:30:18 2009 +0000 + + little change to delete warnings + +Author: paradiseo +Date: Tue Jan 27 16:28:55 2009 +0000 + + little modif to delete warning + +Author: paradiseo +Date: Tue Jan 27 16:26:44 2009 +0000 + + little change to delete warning + +Author: paradiseo +Date: Tue Jan 27 16:21:53 2009 +0000 + + little modif to delete warning + +Author: paradiseo +Date: Mon Jan 26 14:39:37 2009 +0000 + + Change Compiler flags + +Author: paradiseo +Date: Mon Jan 26 13:43:40 2009 +0000 + + disable warning C4530 (Visual Studio) + +Author: paradiseo +Date: Mon Jan 26 13:38:01 2009 +0000 + + option added to disable warning (mode release with Visual Studio) + +Author: paradiseo +Date: Mon Jan 26 09:07:59 2009 +0000 + + cmake < 2.6 authorized + +Author: paradiseo +Date: Thu Jan 22 10:18:10 2009 +0000 + + test on PSO changed. + +Author: paradiseo +Date: Fri Jan 16 14:29:42 2009 +0000 + + modif cmake + +Author: paradiseo +Date: Wed Jan 14 14:50:46 2009 +0000 + + Cmake configuration modified + +Author: paradiseo +Date: Mon Jan 12 09:14:02 2009 +0000 + + Update to cmake2.6 + modif to support compatibility with icc + +Author: evomarc +Date: Thu Dec 25 16:01:57 2008 +0000 + + Fixing a small glitch that was giving wrong clues to newcomers ... + Thanks to Christophe-Marie Duquesne for the post + +Author: paradiseo +Date: Fri Dec 5 13:55:41 2008 +0000 + + add "=0;" at the end of two virtual method + +Author: paradiseo +Date: Thu Nov 20 16:35:47 2008 +0000 + + remove DartConfig + +Author: paradiseo +Date: Mon Nov 17 10:27:55 2008 +0000 + + Switch from Dart to Dash. + +Author: jeggermo +Date: Tue Nov 11 09:51:17 2008 +0000 + + fixed some very old and stupid problems + +Author: jeggermo +Date: Tue Nov 11 09:50:52 2008 +0000 + + fixed some stupid problems + +Author: maartenkeijzer +Date: Mon May 5 12:33:26 2008 +0000 + + updated configure.in to generate moo files + +Author: tlegrand +Date: Fri Apr 18 12:00:15 2008 +0000 + + deleted "win" directory in the autotools config + +Author: tlegrand +Date: Fri Apr 18 08:59:02 2008 +0000 + + added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities + +Author: tlegrand +Date: Fri Apr 18 08:58:42 2008 +0000 + + imrproved PSO topology/velocity tests + +Author: tlegrand +Date: Fri Apr 18 08:51:38 2008 +0000 + + updated the doc tags + +Author: tlegrand +Date: Fri Apr 18 08:50:22 2008 +0000 + + added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities + +Author: tlegrand +Date: Fri Apr 18 08:19:22 2008 +0000 + + updated a few things about paradiseo (links, docs) + +Author: tlegrand +Date: Fri Apr 18 07:58:17 2008 +0000 + + deleted old and obsolete paradiseo's pdf slides + +Author: paradiseo +Date: Thu Apr 17 14:31:11 2008 +0000 + + new implementation of the test + +Author: paradiseo +Date: Thu Apr 17 14:29:57 2008 +0000 + + Add t-eoOrderXover in the test list + +Author: paradiseo +Date: Thu Apr 17 14:29:10 2008 +0000 + + test of eoOrderXover + +Author: paradiseo +Date: Thu Apr 17 14:26:59 2008 +0000 + + new crossover dedicated to permutation-based representation + +Author: kuepper +Date: Mon Mar 31 19:12:12 2008 +0000 + + start preparation for 1.1 release + +Author: kuepper +Date: Mon Mar 31 19:11:13 2008 +0000 + + Update for gcc-4.3 compatibility + +Author: kuepper +Date: Mon Mar 31 13:35:41 2008 +0000 + + Add climits header as required for gcc-4.3 when using UINT_MAX + +Author: ldacosta +Date: Mon Mar 31 12:53:51 2008 +0000 + + make_continue... just a little formatting + +Author: ldacosta +Date: Fri Mar 28 16:24:17 2008 +0000 + + Output functor is needed if there is screen output OR FILE OUTPUT - until now, it was only created and stored in the screen output was activated. Line 120 of make_checkpoint.h + +Author: ldacosta +Date: Fri Mar 28 16:09:40 2008 +0000 + + Change in do_make_checkpoint: it receives not just a parameter from the evaluation function, not the function itself!! + +Author: ldacosta +Date: Fri Mar 28 15:57:55 2008 +0000 + + Adjusting configuration for Eclipse + +Author: ldacosta +Date: Fri Mar 28 15:51:48 2008 +0000 + + do_make_algo_scalar is extended: now it accepts also an evaluation of the fitness of the population as parameter. + +Author: ldacosta +Date: Fri Mar 28 13:49:14 2008 +0000 + + "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names + +Author: ldacosta +Date: Fri Mar 28 13:49:13 2008 +0000 + + "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names + +Author: tlegrand +Date: Thu Mar 20 15:48:31 2008 +0000 + + come back to dart.irisa.fr ! + +Author: tlegrand +Date: Thu Mar 20 08:43:44 2008 +0000 + + added minimal test config + +Author: ldacosta +Date: Thu Mar 13 16:28:34 2008 +0000 + + "Tutorial" (with capital T) was interfering with the checkout of eo on Eclipse (because there is already one "tutorial", with "t"). This is just a renaming of "Tutorial". + +Author: tlegrand +Date: Wed Mar 12 15:36:58 2008 +0000 + + replaced ParadisEO links + +Author: tlegrand +Date: Wed Mar 12 15:29:29 2008 +0000 + + replaced ParadisEO links + +Author: tlegrand +Date: Wed Mar 12 15:23:35 2008 +0000 + + added lesson6 + +Author: tlegrand +Date: Wed Mar 12 14:59:03 2008 +0000 + + added lesson 6 subdir + +Author: tlegrand +Date: Tue Mar 11 13:16:35 2008 +0000 + + changed dart server + +Author: tlegrand +Date: Mon Mar 10 14:27:19 2008 +0000 + + added coverage flags + visual studio 9 specific flags + +Author: tlegrand +Date: Thu Mar 6 17:05:16 2008 +0000 + + deleted CMAKE_BUILD_TYPE tags and management + +Author: tlegrand +Date: Wed Mar 5 09:41:24 2008 +0000 + + deleted old customized LL/SS PSO algorithms + +Author: tlegrand +Date: Wed Mar 5 09:06:50 2008 +0000 + + added lesson6 subdir + +Author: tlegrand +Date: Tue Mar 4 14:01:29 2008 +0000 + + Added new lesson (6) dedicated to the PSO. Also changed a few things into the PSO-dedicated components (constructors) + +Author: tlegrand +Date: Tue Feb 26 14:53:32 2008 +0000 + + corrected bad index error when uniform()=0 in roulette_wheel. The error was: if fortune=0, we first have "int i=0", then "return --i" . + +Author: tlegrand +Date: Wed Feb 20 10:07:49 2008 +0000 + + changed nightly start time : EDT -> WEST + +Author: kuepper +Date: Mon Feb 18 20:14:47 2008 +0000 + + fix SF doc-generation, + remove absolute paths + +Author: tlegrand +Date: Mon Feb 18 15:08:08 2008 +0000 + + added nighlty start date for Dart config + +Author: tlegrand +Date: Mon Feb 18 14:43:09 2008 +0000 + + set new gcc warning flags -Wall & -Wextra (deleted the others) + +Author: tlegrand +Date: Fri Feb 15 13:10:06 2008 +0000 + + Replaced "_isOneIndexed" boolean by an unsigned "_startFrom" + +Author: tlegrand +Date: Fri Feb 15 12:50:58 2008 +0000 + + Completed eoInitPermutation: CTor now has a "isOneIndexed" parameter to assign 1..Indi_size as genotype values instead of 0..Indi_size + +Author: tlegrand +Date: Thu Feb 14 09:08:42 2008 +0000 + + added "IF(ENABLE_CMAKE_TESTING)" to add test only if they have been enabled + +Author: tlegrand +Date: Thu Feb 14 08:39:41 2008 +0000 + + Added DartConfig for Dart reporting. By default CTest will submit to dart.irisa.fr (project ParadisEO). + +Author: tlegrand +Date: Thu Feb 14 08:28:47 2008 +0000 + + Added cl compiler flags + new DartConfig + +Author: tlegrand +Date: Thu Feb 14 08:23:48 2008 +0000 + + set warning flags to OFF + +Author: tlegrand +Date: Thu Feb 14 08:23:16 2008 +0000 + + deleted cxx flags for cl compiler. They have been moved to the CMakeLists.txt at the top level + +Author: paradiseo +Date: Thu Jan 24 08:35:11 2008 +0000 + + Addition of a method sort for PSO + +Author: paradiseo +Date: Fri Jan 18 09:49:16 2008 +0000 + + Modification of cotinuator.h + +Author: tlegrand +Date: Thu Jan 17 13:08:21 2008 +0000 + + added generic continuator for tests. just an "continuator" class extended by eoContinue. No impact for the rest. + +Author: tlegrand +Date: Wed Jan 16 08:30:38 2008 +0000 + + removed bad semicolon at the end of a "{}" bloc which is not a class/template/struct. + Debugged using g++ flags + +Author: tlegrand +Date: Wed Jan 16 08:14:18 2008 +0000 + + corrected contructor parameter names. All tests OK + +Author: tlegrand +Date: Tue Jan 15 13:57:32 2008 +0000 + + renamed "globalBest" parameter in "globalBest" function ... + +Author: tlegrand +Date: Tue Jan 15 13:53:18 2008 +0000 + + removed bad semicolon at the end of a "{}" bloc which is not a class/template. + Debugged using g++ flags (see CMakeLists.txt at the root) + +Author: tlegrand +Date: Tue Jan 8 15:34:43 2008 +0000 + + corrected weight factor and updated doc + +Author: tlegrand +Date: Tue Jan 8 15:13:32 2008 +0000 + + corrected PSO dummy errors and completed documentation + +Author: tlegrand +Date: Tue Jan 8 14:50:13 2008 +0000 + + corrected PSO dummy errors and completed documentation + +Author: evomarc +Date: Sat Dec 8 15:05:51 2007 +0000 + + Added the GDB trick to visualize the components of a vector + (but it still doesn't work with EO objects, though???) + +Author: evomarc +Date: Sat Dec 8 14:49:52 2007 +0000 + + 3 identical typos in 3 different files :-) + +Author: tlegrand +Date: Mon Nov 26 08:00:25 2007 +0000 + + Warning: A '_WINDOWS' definition is added to compile four Unix-dedicated files (eoCtrlCContinue.h,eoCtrlCContinue.cpp, pipecom.h, pipecom.cpp). The same definition should be added in the automake configuration file to ensure the compatibility. + +Author: tlegrand +Date: Mon Nov 26 07:56:08 2007 +0000 + + added definition _WINDOWS for (mingw and others) compatibility + +Author: maartenkeijzer +Date: Mon Nov 12 16:23:57 2007 +0000 + + Updated makefiles, updated the moo stuff and cleaned up some stuff that refused to compile + +Author: tlegrand +Date: Mon Nov 12 15:48:56 2007 +0000 + + indented file + +Author: tlegrand +Date: Mon Nov 12 15:46:42 2007 +0000 + + completed with pso new components + +Author: tlegrand +Date: Mon Nov 12 15:45:27 2007 +0000 + + completed pso topologies+velocities + +Author: tlegrand +Date: Mon Nov 12 15:43:43 2007 +0000 + + added pso initializer+ integerVelocity + +Author: tlegrand +Date: Mon Nov 12 15:41:46 2007 +0000 + + added permutation init + +Author: tlegrand +Date: Mon Nov 12 15:41:09 2007 +0000 + + added permut components + +Author: tlegrand +Date: Thu Oct 11 14:14:10 2007 +0000 + + added test for permutation components + +Author: tlegrand +Date: Thu Oct 11 14:10:27 2007 +0000 + + added generic parameter for sigmoid function + +Author: tlegrand +Date: Thu Oct 11 14:08:41 2007 +0000 + + added new tests + +Author: tlegrand +Date: Thu Oct 11 14:08:06 2007 +0000 + + added PSO ring topology test + +Author: tlegrand +Date: Thu Oct 11 14:03:18 2007 +0000 + + added PSO ring topology + +Author: tlegrand +Date: Mon Oct 8 15:33:46 2007 +0000 + + *** empty log message *** + +Author: tlegrand +Date: Mon Oct 8 15:22:25 2007 +0000 + + added best position updating + printOn + +Author: tlegrand +Date: Thu Oct 4 15:10:11 2007 +0000 + + added autoconf > 2.6 compatibility + +Author: kuepper +Date: Tue Sep 25 21:29:31 2007 +0000 + + add coding cookies for Emacs and vim + +Author: maartenkeijzer +Date: Sun Sep 23 08:37:09 2007 +0000 + + added patched tcc source tree + +Author: maartenkeijzer +Date: Sun Sep 23 08:35:51 2007 +0000 + + updated include dependencies + +Author: tlegrand +Date: Wed Sep 19 11:45:19 2007 +0000 + + Added #ifdef HAVE_GNUPLOT for Windows compatibility + +Author: tlegrand +Date: Wed Sep 19 11:44:39 2007 +0000 + + Added eoNSGA_II classes in eomoo lib + +Author: tlegrand +Date: Wed Sep 19 11:41:08 2007 +0000 + + Forget gprop application under Visual Studio + +Author: tlegrand +Date: Wed Sep 19 11:40:31 2007 +0000 + + Several fixes + +Author: tlegrand +Date: Wed Sep 19 11:32:47 2007 +0000 + + Added basic CMake file + +Author: tlegrand +Date: Tue Sep 18 15:40:31 2007 +0000 + + Avoid EONSGA in the lib (errors with Windows/MVS) + +Author: tlegrand +Date: Tue Sep 18 15:12:22 2007 +0000 + + Completed CMake config + +Author: tlegrand +Date: Fri Sep 14 14:47:15 2007 +0000 + + Corrected missing eo.doxytag + +Author: tlegrand +Date: Thu Sep 13 15:13:15 2007 +0000 + + removed --force-missing option for Automake: incompatible with the latest versions + +Author: tlegrand +Date: Thu Sep 13 13:36:13 2007 +0000 + + Added cmake support, deleted Autoconf/Automake stuff and made an easy-to-use process + +Author: tlegrand +Date: Tue Sep 11 14:20:16 2007 +0000 + + Changed file format (to avoid Visual Studio errors): MAC --> DOS + +Author: tlegrand +Date: Tue Sep 11 13:59:49 2007 +0000 + + Added HAVE_GNUPLOT checking + +Author: maartenkeijzer +Date: Mon Sep 10 10:30:53 2007 +0000 + + Various changes and optimizations + +Author: maartenkeijzer +Date: Thu Sep 6 08:15:22 2007 +0000 + + Woops, used the wrong sort here + +Author: maartenkeijzer +Date: Wed Sep 5 13:52:17 2007 +0000 + + added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc + +Author: maartenkeijzer +Date: Wed Sep 5 11:36:44 2007 +0000 + + added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc + +Author: maartenkeijzer +Date: Tue Sep 4 15:30:42 2007 +0000 + + added eoEpsMOEA support + +Author: maartenkeijzer +Date: Tue Sep 4 15:26:45 2007 +0000 + + added epsilon moea + +Author: maartenkeijzer +Date: Tue Sep 4 13:44:41 2007 +0000 + + made fitness() query return const reference + +Author: maartenkeijzer +Date: Tue Sep 4 13:44:02 2007 +0000 + + removed const qualifier from choice() member + +Author: maartenkeijzer +Date: Tue Sep 4 07:50:31 2007 +0000 + + Added member to get to the embedded fitness object + +Author: maartenkeijzer +Date: Tue Sep 4 07:47:46 2007 +0000 + + Added reinitialization of fitness when fitness is invalidated. Needed this to clear worths in multi-objective case + +Author: maartenkeijzer +Date: Mon Sep 3 14:37:27 2007 +0000 + + several fixes + +Author: maartenkeijzer +Date: Fri Aug 31 14:12:54 2007 +0000 + + more bugfixes + +Author: maartenkeijzer +Date: Fri Aug 31 14:03:35 2007 +0000 + + changed eoTruncate to use sort. nth_element leads to weird results in moo case + +Author: maartenkeijzer +Date: Fri Aug 31 13:45:46 2007 +0000 + + made stuff virtual + +Author: maartenkeijzer +Date: Fri Aug 31 13:27:40 2007 +0000 + + Refactoring + +Author: maartenkeijzer +Date: Fri Aug 31 13:26:41 2007 +0000 + + updated nsga + +Author: maartenkeijzer +Date: Fri Aug 31 12:59:18 2007 +0000 + + refactoring + +Author: maartenkeijzer +Date: Fri Aug 31 11:19:26 2007 +0000 + + hmm not a good idea to replace with dummy + +Author: maartenkeijzer +Date: Fri Aug 31 11:08:25 2007 +0000 + + update needed for multi-objective approach + +Author: maartenkeijzer +Date: Fri Aug 31 11:05:59 2007 +0000 + + updated comments + +Author: maartenkeijzer +Date: Fri Aug 31 10:57:05 2007 +0000 + + added new multi-objective support + +Author: maartenkeijzer +Date: Fri Aug 31 06:47:39 2007 +0000 + + fixed bug in NSGA-II, only niching on last objective + +Author: maartenkeijzer +Date: Thu Aug 30 22:30:52 2007 +0000 + + fixed bug in NSGA-II, only niching on last objective + +Author: kuepper +Date: Wed Aug 22 07:30:47 2007 +0000 + + eoRNG.h (eoRng::random): Add comment on truncation as standard way of + floating point to integer conversion. + +Author: kuepper +Date: Tue Aug 21 14:52:50 2007 +0000 + + Fix according to + [ 1663606 ] eoBitOp vector access + +Author: kuepper +Date: Tue Aug 21 14:50:55 2007 +0000 + + Fix wrong removalr of necessary include statement + +Author: kuepper +Date: Tue Aug 21 14:47:14 2007 +0000 + + Correctly round towards zero in random(uint32_t) + +Author: kuepper +Date: Tue Aug 21 14:44:41 2007 +0000 + + Minor cleanup + +Author: kuepper +Date: Tue Aug 21 13:58:53 2007 +0000 + + Fix typos + +Author: maartenkeijzer +Date: Sat Aug 11 20:48:07 2007 +0000 + + brought gprop into 21st century + +Author: tlegrand +Date: Fri Aug 10 14:31:04 2007 +0000 + + added #ifdef SIGQUIT for windows compatibility + +Author: tlegrand +Date: Fri Aug 10 14:30:26 2007 +0000 + + added #define _MSC_VER_ for windows compatibility + +Author: tlegrand +Date: Fri Aug 10 14:29:12 2007 +0000 + + added CMake configuration files + +Author: tlegrand +Date: Fri Aug 10 14:27:12 2007 +0000 + + added CMake configuration file + +Author: xohm +Date: Thu Aug 2 10:48:20 2007 +0000 + + Add extra functionwrapper to member 'size' + +Author: xohm +Date: Thu Aug 2 10:47:15 2007 +0000 + + Excluded 'config.h' from windows build + +Author: xohm +Date: Thu Aug 2 10:46:07 2007 +0000 + + Add static var-declaration + +Author: xohm +Date: Thu Aug 2 10:45:12 2007 +0000 + + Cmake multiplattform buildfile + +Author: xohm +Date: Thu Aug 2 10:15:13 2007 +0000 + + *** empty log message *** + +Author: maartenkeijzer +Date: Tue Jul 17 13:03:29 2007 +0000 + + comments removed + +Author: maartenkeijzer +Date: Tue Jul 17 13:01:00 2007 +0000 + + Adding timed continuator + +Author: tlegrand +Date: Tue Jul 3 09:13:07 2007 +0000 + + added doc details to recognize particle swarm optimization + +Author: tlegrand +Date: Mon Jul 2 13:05:14 2007 +0000 + + added t-eoEasyPSO test + +Author: tlegrand +Date: Mon Jul 2 13:02:26 2007 +0000 + + added myself in the author list :-)) + +Author: tlegrand +Date: Mon Jul 2 13:01:49 2007 +0000 + + particle-swarm-optimization includes added + +Author: tlegrand +Date: Mon Jul 2 13:00:48 2007 +0000 + + removed unconsitent reference in "eoWeakElitistReplacement" (const EOT oldChamp) + +Author: tlegrand +Date: Mon Jul 2 12:59:49 2007 +0000 + + "dMatrix distMatrix(pSize*(pSize-1)/2)" replaced by "distMatrix(pSize) " + +Author: tlegrand +Date: Mon Jul 2 12:58:13 2007 +0000 + + particle-swarm-optimization main templates added + +Author: tlegrand +Date: Mon Jun 25 09:38:44 2007 +0000 + + PSO package - contains src+doc+examples and build process files - should be removed before integrating sources + +Author: maartenkeijzer +Date: Tue Jun 19 17:48:16 2007 +0000 + + Re-enabled declone flag (seemed to be commented out for some reason) + +Author: jeggermo +Date: Thu May 3 14:00:50 2007 +0000 + + All debug (dll and non-dll libs) and release libs are placed in either debug or release + +Author: jeggermo +Date: Thu May 3 13:54:27 2007 +0000 + + Added Multi-Threaded DLL projects settings for both deebug and release + +Author: kuepper +Date: Thu Feb 22 08:27:32 2007 +0000 + + * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly + uninitialized variables. + + * README.tmpl: Hint to regular Templates/README for details. + + * README: Add documentation for adding new source-files. + + * Makefile.am.src-tmpl (noinst_HEADERS): Add + (MyStruct_SOURCES): Move header files from here to the new + noinst_HEADERS variable. + +Author: kuepper +Date: Tue Jan 23 22:25:57 2007 +0000 + + bump versions to 1.0.2-cvs + +Author: kuepper +Date: Tue Jan 23 22:23:31 2007 +0000 + + *** empty log message *** + +Author: kuepper +Date: Tue Jan 23 22:09:17 2007 +0000 + + updates for 1.0.1 release + +Author: evomarc +Date: Wed Jan 17 05:31:05 2007 +0000 + + Slightly modified the README.tmpl for more help to first-timers + +Author: kuepper +Date: Tue Jan 16 08:28:24 2007 +0000 + + Add instructions for bash. + +Author: kuepper +Date: Sun Jan 14 18:56:31 2007 +0000 + + * createEOproject.sh: Set TargetDir to /tmp/. This is a workaround + for automake finding the scripts of eo itself if we run it in a embedded + subdirectory. + (COPYING, INSTALL): create. + + * README: State more explicitly what a "complete installation" means. + Give build-instructions for moved directories. + +Author: kuepper +Date: Sun Jan 14 18:13:40 2007 +0000 + + State more explicitly what a "complete installation" means. + +Author: kuepper +Date: Fri Dec 29 14:16:01 2006 +0000 + + Update after release + +Author: kuepper +Date: Mon Dec 18 18:56:05 2006 +0000 + + (EXTRA_DIST): Add README's + +Author: kuepper +Date: Mon Dec 18 18:51:12 2006 +0000 + + Update for release. + +Author: jeggermo +Date: Mon Dec 18 16:21:38 2006 +0000 + + Small changes to 2 readme files to stress that the release version are in + eo\win\lib\release and the debug versions in eo\win\lib\debug + +Author: kuepper +Date: Mon Dec 18 12:18:32 2006 +0000 + + * index.h: Add old ToDos + +Author: kuepper +Date: Mon Dec 18 11:19:53 2006 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Dec 18 11:17:55 2006 +0000 + + * TODO.html, README.html: Remove these old files. + + * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. + + * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 + +Author: kuepper +Date: Sun Dec 17 23:18:33 2006 +0000 + + update + +Author: kuepper +Date: Sun Dec 17 22:59:53 2006 +0000 + + * README: Better links to Templates/ + + * configure.in: Bump version to 1.0-beta2. + +Author: kuepper +Date: Sun Dec 17 22:56:03 2006 +0000 + + Remove these, potentially confusing files + +Author: kuepper +Date: Sun Dec 17 22:50:26 2006 +0000 + + Added new README. + Removed old unnecesary files + +Author: kuepper +Date: Sat Dec 16 22:05:17 2006 +0000 + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + +Author: kuepper +Date: Sat Dec 16 22:01:46 2006 +0000 + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + +Author: kuepper +Date: Sat Dec 16 21:55:03 2006 +0000 + + * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use + correct names for includes. + + * README.manual: This is a copy of the old README. + + * README: Describe the new way and setup of creating a new EO project. + + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: + * configure.ac.tmpl: New files to create a standalone EO project from + templates. + +Author: uid24343 +Date: Thu Dec 7 21:54:48 2006 +0000 + + clean up + +Author: kuepper +Date: Thu Dec 7 21:36:33 2006 +0000 + + cleanup for release + +Author: kuepper +Date: Tue Dec 5 08:42:39 2006 +0000 + + set version to 1.0-cvs again + +Author: kuepper +Date: Tue Dec 5 08:41:24 2006 +0000 + + (EXTRA_DIST): Add new MSVC project files to distribution. + +Author: kuepper +Date: Mon Dec 4 22:27:41 2006 +0000 + + * Makefile.am: Add t-eoRNG + + * t-eoRNG.cpp: Start test for random number generator. + +Author: kuepper +Date: Mon Dec 4 21:55:31 2006 +0000 + + (eoRng::normal(stdev)): Revert erroneous change. + +Author: kuepper +Date: Sun Dec 3 11:57:34 2006 +0000 + + Fixupper/lowercase issues + +Author: kuepper +Date: Sun Dec 3 11:44:38 2006 +0000 + + fix html errors + +Author: kuepper +Date: Sun Dec 3 11:40:25 2006 +0000 + + update + +Author: kuepper +Date: Sun Dec 3 11:24:41 2006 +0000 + + update, add link to Niko Hansen's comparison + +Author: kuepper +Date: Sun Dec 3 10:53:29 2006 +0000 + + update version number of next release + +Author: kuepper +Date: Sun Dec 3 10:41:54 2006 +0000 + + * mainpage.html: update, add link to Niko Hansen's comparison + + * README: Add more specific note about tutorial. + + * configure.in: Bump version to 1.0-beta1 + + * tutorial/Makefile.am: Add all necessary files, including html and + Templates to distribution. + +Author: evomarc +Date: Sun Dec 3 07:21:44 2006 +0000 + + Added a note to avoid that some dishonest researchers use teh code + in this tutorial as a basis for comparing their algorithms with "EAs" + as was done for the LEM3 algorithm in GECCO 2006. + +Author: kuepper +Date: Sat Dec 2 12:15:29 2006 +0000 + + update + +Author: kuepper +Date: Sat Dec 2 11:46:34 2006 +0000 + + cleanup, docs + +Author: kuepper +Date: Sat Dec 2 11:36:29 2006 +0000 + + (VirusShiftMutation::operator()): Fix test for i>1. + This makes t-MGE1bit pass on x86_64 using GCC. + +Author: kuepper +Date: Sat Dec 2 11:32:00 2006 +0000 + + Change float to double. + +Author: kuepper +Date: Sat Dec 2 11:02:13 2006 +0000 + + Remove unnecessary tests. + +Author: kuepper +Date: Sat Dec 2 10:18:57 2006 +0000 + + * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + + * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this + results in escape-codes (^@) to be printed at runtime and is not + necessary anyway. + + * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to + avoid compiler warnings. + +Author: kuepper +Date: Sat Dec 2 09:39:13 2006 +0000 + + * eoRNG.h: Cleanup docs and document /all/ members. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + +Author: kuepper +Date: Fri Dec 1 21:07:55 2006 +0000 + + minor typos + +Author: kuepper +Date: Fri Dec 1 20:40:54 2006 +0000 + + Use C++ style cast. + +Author: kuepper +Date: Fri Dec 1 20:08:51 2006 +0000 + + * Makefile.am: Update for release-distribution. + + * Makefile.am: Add missing CMA header for distribution. + + * Makefile.am: Add missing header for distribution. + +Author: kuepper +Date: Fri Dec 1 10:49:47 2006 +0000 + + minor cleanup of code and docs, + resolve some compiler warnings + +Author: okoenig +Date: Fri Dec 1 08:42:54 2006 +0000 + + Replaced float vars with double to avoid conversion warnings on VS 8.0 + +Author: kuepper +Date: Wed Nov 29 23:47:40 2006 +0000 + + update for release + +Author: kuepper +Date: Wed Nov 29 23:37:29 2006 +0000 + + Generally include + +Author: okoenig +Date: Tue Nov 28 17:14:05 2006 +0000 + + Removing MAC line endings, because Windows VS 8.0 does not accept them. + +Author: okoenig +Date: Tue Nov 28 17:12:21 2006 +0000 + + Added additonal definition for operator< between fitness and ScalarType. Needed for compilation with VS 8.0. + +Author: jeggermo +Date: Mon Nov 20 13:34:28 2006 +0000 + + Added Solution and Project files for MSVC 2003 + +Author: jeggermo +Date: Mon Nov 20 13:25:46 2006 +0000 + + Changed some files for compatibility with MSVC 2003 and 2005 + +Author: kuepper +Date: Thu Nov 16 13:21:41 2006 +0000 + + include + +Author: kuepper +Date: Thu Nov 16 12:52:46 2006 +0000 + + * configure.in (AC_DEBUG): add test + + * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, + or NDEBUG according to its value. + +Author: kuepper +Date: Thu Nov 16 12:35:46 2006 +0000 + + * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: + If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise + always use vecSigmaInit with default all values of sigmaInit. + + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else + clause around ptParam (found or not). + + * eoParam.h (eoValueParam::setValue): Document. + (eoValueParam >::setValue): Allow delimiters ',' and + ';'. A plain ' ' does not work, as it is not correctly read by + eoParser::readFrom. + +Author: kuepper +Date: Tue Jun 13 13:35:26 2006 +0000 + + update + +Author: kuepper +Date: Mon Mar 27 18:55:20 2006 +0000 + + Fix using directives for gcc-4.1 + +Author: maartenkeijzer +Date: Sun Mar 26 13:33:25 2006 +0000 + + fixed t-eoCMAES.cpp test + +Author: kuepper +Date: Sun Mar 26 10:04:01 2006 +0000 + + Update docs, some cleanup + +Author: kuepper +Date: Sat Mar 25 13:03:45 2006 +0000 + + Start list of publications + +Author: kuepper +Date: Thu Mar 23 18:06:10 2006 +0000 + + Fix spelling + +Author: kuepper +Date: Thu Mar 23 10:15:17 2006 +0000 + + update Makefile.am foe eoPeriodicContiunue addition + +Author: maartenkeijzer +Date: Mon Mar 6 20:47:28 2006 +0000 + + making dimensionality requirement optional + +Author: maartenkeijzer +Date: Mon Mar 6 20:31:03 2006 +0000 + + making dimensionality requirement optional + +Author: cahon +Date: Tue Feb 28 14:40:37 2006 +0000 + + Adding a continuator + +Author: cahon +Date: Tue Feb 28 14:39:45 2006 +0000 + + New continuation strategy + +Author: evomarc +Date: Wed Feb 22 04:53:20 2006 +0000 + + Corrected a few typos, and acknowledged the fact that all Lessons are now + compiled within the installation procedure... + +Author: maartenkeijzer +Date: Mon Jan 23 15:12:49 2006 +0000 + + updated makefile to boost-python3.3 and python2.4 + +Author: evomarc +Date: Mon Jan 2 14:09:22 2006 +0000 + + Changed some bug in never-used-except-in-make_algo_easea.h file + (probably some change in the compiler made this stop working ???) + +Author: cahon +Date: Fri Dec 9 17:49:43 2005 +0000 + + eoGenContinue is now persistent + +Author: cahon +Date: Fri Dec 9 17:45:56 2005 +0000 + + eoContinue is now persistent + +Author: kuepper +Date: Wed Dec 7 15:51:32 2005 +0000 + + fix build for our FC4 systems + +Author: kuepper +Date: Wed Dec 7 15:40:23 2005 +0000 + + fixes for gcc-4 compilation -- still have a linker problem + +Author: maartenkeijzer +Date: Thu Nov 24 09:38:05 2005 +0000 + + kd + +Author: maartenkeijzer +Date: Thu Nov 24 09:35:34 2005 +0000 + + Various bugfixes and additions + +Author: evomarc +Date: Tue Nov 8 11:34:12 2005 +0000 + + Removed the "using eoMonitor::vec from eoGnuplot1DMonitor.h because it generated + an internal compiler error with gcc4.0.0. + Repalced all occurences of "vec" by "this->vec" in eoGnuplot1DMonitor.cpp + so it is understood by the compiler :-( + +Author: evomarc +Date: Tue Nov 8 11:31:01 2005 +0000 + + Removed extra colon (;) at end of class definitions. + They didn't hurt until gcc 3.4.1 but then they generated an error! + +Author: maartenkeijzer +Date: Mon Oct 17 12:46:53 2005 +0000 + + Woops, forgot to clear a static string for compile + +Author: maartenkeijzer +Date: Sun Oct 16 15:38:38 2005 +0000 + + Added lambda expression (user/automatically defined functions + +Author: maartenkeijzer +Date: Sat Oct 15 21:27:47 2005 +0000 + + Solved some issues and prepared the library for using unordered_map instead of hash_map (C++ TR1). Can only use this when g++-4.0.3 is out + +Author: maartenkeijzer +Date: Sat Oct 15 09:05:57 2005 +0000 + + Made eoGencontinue a ValueParam, so that it can be attached to a monitor + +Author: maartenkeijzer +Date: Fri Oct 14 16:14:37 2005 +0000 + + forgot to invalidate + +Author: maartenkeijzer +Date: Fri Oct 14 15:34:45 2005 +0000 + + Tester for CMA + +Author: maartenkeijzer +Date: Fri Oct 14 15:33:32 2005 +0000 + + Added CMA + +Author: maartenkeijzer +Date: Fri Oct 14 15:33:16 2005 +0000 + + added timed monitor + +Author: maartenkeijzer +Date: Wed Oct 12 18:35:13 2005 +0000 + + oops, stats.h was missing + +Author: maartenkeijzer +Date: Tue Oct 11 08:15:29 2005 +0000 + + Added simplify and differentiation tests + +Author: kuepper +Date: Mon Oct 10 21:59:57 2005 +0000 + + prepare vecInitSize + +Author: kuepper +Date: Mon Oct 10 21:42:31 2005 +0000 + + cleanup, prepare vecSigmaInit change + +Author: kuepper +Date: Mon Oct 10 21:13:27 2005 +0000 + + cleanup + +Author: evomarc +Date: Mon Oct 10 13:34:21 2005 +0000 + + Added an accessor to the pointsize in eoeoGnuplot1DSnapshot.h + +Author: evomarc +Date: Mon Oct 10 13:33:13 2005 +0000 + + Added an accessor to the pointsize, for do_make_checkpoint_pareto + +Author: maartenkeijzer +Date: Sun Oct 9 07:03:35 2005 +0000 + + Added symbolic differentiation + +Author: maartenkeijzer +Date: Fri Oct 7 13:31:20 2005 +0000 + + Faster scaled evaluation, etc. + +Author: maartenkeijzer +Date: Fri Oct 7 11:31:01 2005 +0000 + + Constant mutation + simplification added + +Author: evomarc +Date: Fri Oct 7 08:27:59 2005 +0000 + + A colon had mystriously dissappeared !!! + +Author: maartenkeijzer +Date: Thu Oct 6 22:26:59 2005 +0000 + + more ramblings in readme + +Author: maartenkeijzer +Date: Thu Oct 6 22:14:48 2005 +0000 + + Added constant getting and setting + +Author: maartenkeijzer +Date: Thu Oct 6 18:10:13 2005 +0000 + + fix + +Author: kuepper +Date: Thu Oct 6 17:22:40 2005 +0000 + + Handle including from contrib/MGE nicely. + +Author: maartenkeijzer +Date: Thu Oct 6 14:31:09 2005 +0000 + + removed stray object files + +Author: maartenkeijzer +Date: Thu Oct 6 12:25:00 2005 +0000 + + first fix in makefile + +Author: maartenkeijzer +Date: Thu Oct 6 12:13:53 2005 +0000 + + Added mathsym+tcc and boost against all advice + +Author: maartenkeijzer +Date: Thu Oct 6 10:06:25 2005 +0000 + + Replaced GPL with LGPL license here. EO has always been LGPL + +Author: kuepper +Date: Wed Oct 5 22:22:25 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Wed Oct 5 22:08:29 2005 +0000 + + typos + +Author: kuepper +Date: Wed Oct 5 21:48:01 2005 +0000 + + cleanup + +Author: kuepper +Date: Wed Oct 5 21:40:53 2005 +0000 + + comments + +Author: kuepper +Date: Wed Oct 5 21:34:19 2005 +0000 + + finish the handling of gnuplot completely at build-time. + No gnuplot-ifs in headers anymore. + +Author: kuepper +Date: Wed Oct 5 21:25:51 2005 +0000 + + some first external links + +Author: kuepper +Date: Mon Oct 3 21:48:15 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Oct 3 12:54:45 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Oct 3 10:58:01 2005 +0000 + + cleanup + +Author: kuepper +Date: Mon Oct 3 10:53:35 2005 +0000 + + clean up + +Author: kuepper +Date: Mon Oct 3 10:32:56 2005 +0000 + + some nifty details, + passes W3 validator. + +Author: kuepper +Date: Mon Oct 3 10:26:30 2005 +0000 + + clean up html + +Author: kuepper +Date: Mon Oct 3 10:10:09 2005 +0000 + + move logo to cvs + +Author: kuepper +Date: Mon Oct 3 10:06:26 2005 +0000 + + updates for release + +Author: kuepper +Date: Mon Oct 3 09:56:02 2005 +0000 + + Make clear that the docs are for the cvs code. + +Author: kuepper +Date: Mon Oct 3 09:51:27 2005 +0000 + + update for release. + +Author: kuepper +Date: Mon Oct 3 09:47:06 2005 +0000 + + Initialize booleans to get rid of compiler-warnings. + +Author: kuepper +Date: Sun Oct 2 21:57:43 2005 +0000 + + fix foe gnuplot configuration-switch usage + +Author: kuepper +Date: Sun Oct 2 21:42:08 2005 +0000 + + Clean up configure/build-process. + - assume C++ standard-conforming environment + - add a user-option for gnuplot-support + - separate gnuplot-code into declaration and implementation, + so we can define at EO-build-time whether to use it or not. + + Adopt code and Makefiles to above changes. + + Some minor fixes. + +Author: kuepper +Date: Sat Oct 1 17:07:59 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 16:05:01 2005 +0000 + + add zip to dist, + update release-plan. + +Author: kuepper +Date: Sat Oct 1 15:35:45 2005 +0000 + + Search for ar as necessary on Solaris-x86. + Make DOXYGEN and AR precious variables. + +Author: kuepper +Date: Sat Oct 1 14:25:29 2005 +0000 + + update for solaris-x86 + +Author: kuepper +Date: Sat Oct 1 14:00:42 2005 +0000 + + Include inttypes.h if available but stdint.h is not. + Add powerpc success. + +Author: kuepper +Date: Sat Oct 1 13:27:25 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 13:26:29 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 13:07:01 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 13:00:59 2005 +0000 + + update and clean up + +Author: kuepper +Date: Sat Oct 1 12:18:21 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 12:13:00 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 11:59:14 2005 +0000 + + update docs + clean Tutorial + bump version-number for cvs + +Author: kuepper +Date: Fri Sep 30 21:16:24 2005 +0000 + + typo + +Author: kuepper +Date: Fri Sep 30 11:47:26 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Thu Sep 29 22:08:19 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Thu Sep 29 22:01:52 2005 +0000 + + add main web-page + +Author: kuepper +Date: Thu Sep 29 16:53:06 2005 +0000 + + Use install to copy generated documentation. + +Author: kuepper +Date: Wed Sep 28 21:57:40 2005 +0000 + + remove forgotten config.h + +Author: kuepper +Date: Wed Sep 28 21:49:26 2005 +0000 + + Simplify configuration. + Remove support for (outdated) , require . + Require uint32_t for now, defined in stdint.h according to C99. + Some general cleanup and more documentation. + +Author: kuepper +Date: Wed Sep 28 18:25:38 2005 +0000 + + +Author: kuepper +Date: Wed Sep 28 17:59:59 2005 +0000 + + +Author: kuepper +Date: Wed Sep 28 16:32:35 2005 +0000 + + Switch on documentation generation for private and static members. + +Author: kuepper +Date: Wed Sep 28 14:32:12 2005 +0000 + + Some more documentation + +Author: kuepper +Date: Wed Sep 28 10:00:16 2005 +0000 + + Add ignore-files to quiten cvs + +Author: kuepper +Date: Wed Sep 28 08:36:00 2005 +0000 + + documente for stdev_eps + +Author: kuepper +Date: Tue Sep 27 22:06:08 2005 +0000 + + cleanup + +Author: kuepper +Date: Tue Sep 27 21:54:05 2005 +0000 + + documentation, whitespace + +Author: maartenkeijzer +Date: Mon Sep 26 11:22:47 2005 +0000 + + Removed wrong reference to rng from choice members (what was I thinking?) + +Author: kuepper +Date: Mon Sep 26 10:18:15 2005 +0000 + + Make sure uint32_t is defined correctly in eoRNG.h and use it where + appropriate. + +Author: maartenkeijzer +Date: Sun Sep 25 19:32:10 2005 +0000 + + Added few convenience functions + +Author: maartenkeijzer +Date: Sun Sep 25 19:09:38 2005 +0000 + + Added choice functions, plus rolled back inadvertant chance to eoRNG + +Author: kuepper +Date: Tue Sep 13 10:24:50 2005 +0000 + + setORcreate returns it parameter. + +Author: kuepper +Date: Mon Sep 12 17:53:25 2005 +0000 + + Use getORcreateParam instead of createParam when getting values from + the eoParser. + Update setORcreateParam. + +Author: maartenkeijzer +Date: Wed Sep 7 17:09:19 2005 +0000 + + eoRNG.h + +Author: kuepper +Date: Mon Sep 5 17:04:13 2005 +0000 + + Remove paradiseo configuration switch + +Author: kuepper +Date: Mon Sep 5 16:47:53 2005 +0000 + + Provide virtual destructors as gcc-4 barks heavily otherwise + +Author: kuepper +Date: Mon Sep 5 16:11:00 2005 +0000 + + ParadiesEO cleanup + +Author: kuepper +Date: Mon Sep 5 16:09:43 2005 +0000 + + Remove useless PAradisEO files + +Author: kuepper +Date: Mon Sep 5 16:08:14 2005 +0000 + + Remove useless files from paradiseo directories + +Author: cahon +Date: Fri Sep 2 13:36:21 2005 +0000 + + Removing ParadisEO + +Author: cahon +Date: Fri Sep 2 07:12:27 2005 +0000 + + Removing ParadisEO + +Author: cahon +Date: Fri Sep 2 07:00:45 2005 +0000 + + Removing ParadisEO + +Author: kuepper +Date: Mon Aug 29 07:50:50 2005 +0000 + + Provide eoParser::setORcreateParam to set a paramter in the parser to + a specific value. + +Author: kuepper +Date: Mon Aug 29 07:32:13 2005 +0000 + + Install eoPropGAGenOp.h + Add #include in eoEsChromInit.h in order to make gcc-4.0 happy. + +Author: evomarc +Date: Sat May 7 15:43:29 2005 +0000 + + Added eoPropGAGenOp, the sequential application of crossover and mutation + +Author: evomarc +Date: Mon Apr 4 20:41:06 2005 +0000 + + Small upgrade for gcc 3.3 (I guess no-one is using those files, right?) + +Author: evomarc +Date: Mon Mar 14 21:00:00 2005 +0000 + + Updated the src:: everywhere in eoVariableLengthCrossover.h eoFlOrMonOp.h + (that nobody seems to actually use btw :-) + +Author: cahon +Date: Wed Feb 23 13:31:20 2005 +0000 + + Removing ParadisEO + +Author: cahon +Date: Tue Feb 22 14:12:19 2005 +0000 + + Removing ParadisEO + +Author: evomarc +Date: Thu Feb 10 09:57:28 2005 +0000 + + Added the complete reference to the base class in call for value() + because g++3.4 otherwise complains + +Author: kuepper +Date: Mon Jan 3 09:35:39 2005 +0000 + + include config.h + +Author: kuepper +Date: Mon Jan 3 09:35:17 2005 +0000 + + fix for gcc-3.4 + +Author: evomarc +Date: Mon Dec 27 09:08:44 2004 +0000 + + Mainly made it obvious that Lesson4 contains "ready-to-use" EAs + +Author: evomarc +Date: Mon Dec 27 08:01:29 2004 +0000 + + Modified the way to set the initial values of the sigmas (and stdevs) + so that they can be scaled to the range of each variable (by adding + a "%" after the value in the parameter file) + See also the examples in tutorial/Lesson4 + +Author: evomarc +Date: Mon Dec 27 07:59:58 2004 +0000 + + Added the 2 parameter files ESEA.param amd RealEA.param + so both programs go to 0 nicely instead of staying anywhere but close + +Author: evomarc +Date: Mon Dec 27 07:33:03 2004 +0000 + + Added the explicit calls to the base class ctors in eoXXXGeneralBounds copy Ctors + +Author: evomarc +Date: Mon Dec 27 07:31:59 2004 +0000 + + Fixed some int - unsigned int problem for the case "combien < 0" + +Author: kuepper +Date: Thu Dec 23 17:33:08 2004 +0000 + + reshuffle libraries to resolve all dependencies + +Author: kuepper +Date: Thu Dec 23 17:26:39 2004 +0000 + + minor updates, + create doxytag-file when running doxygen + +Author: kuepper +Date: Thu Dec 23 17:22:52 2004 +0000 + + more adjustments for gcc-3.4 (now using optimization, go figure...) + +Author: kuepper +Date: Thu Dec 23 16:06:37 2004 +0000 + + small fix for gcc-3.3.3 + +Author: maartenkeijzer +Date: Thu Dec 23 15:40:44 2004 +0000 + + Some small changes concerning flags and warnings + +Author: kuepper +Date: Thu Dec 23 15:29:07 2004 +0000 + + Adjust code to perform to C++ standard according to gcc-3.4 + interpretation... (Have not compiled/checked/changed paradisEO.) + + That is, the current code compiles with gcc-3.4 and the checks + (besides t-MGE1bit) all pass. + +Author: maartenkeijzer +Date: Thu Dec 23 10:14:42 2004 +0000 + + Added using declarations to avoid g++-3.4 errors + +Author: evomarc +Date: Wed Dec 1 09:27:31 2004 +0000 + + Added comments so that the new classes eoGeneralXXXBounds are taken into account + by Doxygen. + +Author: evomarc +Date: Wed Dec 1 09:23:53 2004 +0000 + + ... some comments ... + +Author: evomarc +Date: Wed Dec 1 09:22:48 2004 +0000 + + ... some comments for Doxygen ... + +Author: evomarc +Date: Wed Dec 1 09:19:47 2004 +0000 + + ... a comment ... + +Author: evomarc +Date: Wed Dec 1 08:49:40 2004 +0000 + + Added a few words about Lesson5, and the change in the Makefiles. + Also, looking alive is probably important ! + +Author: evomarc +Date: Mon Nov 29 20:49:34 2004 +0000 + + Corrected some bugs in eoGeneralXXXBounds (e.g. no const in copy Ctor arguments) + Added a default value for the intialization (-infty, +infty) + Needs to allow uniform() on unbounded - still pondering + +Author: evomarc +Date: Fri Nov 5 08:57:34 2004 +0000 + + Added classes to hendle bounds: + - eoGeneralRealBound that can be initialized using a string (and hence can be + easily read as a parameter) + - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h + Note that there is no equivalent to eoRealVectorBounds for vector of integers + + In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h + The first one was already there by chance, through eoUniformInit.h + +Author: evomarc +Date: Fri Nov 5 08:55:12 2004 +0000 + + Added classes to hendle bounds: + - eoGeneralRealBound that can be initialized using a string (and hence can be + easily read as a parameter) + - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h + Note that there is no equivalent to eoRealVectorBounds for vector of integers + +Author: kuepper +Date: Thu Oct 7 14:32:54 2004 +0000 + + fix install dir + +Author: kuepper +Date: Thu Oct 7 13:36:43 2004 +0000 + + were these lost? + +Author: kuepper +Date: Thu Oct 7 13:34:08 2004 +0000 + + wrong directory + +Author: kuepper +Date: Wed Sep 29 18:37:20 2004 +0000 + + update for sstream + +Author: kuepper +Date: Tue Sep 28 17:13:34 2004 +0000 + + +Author: evomarc +Date: Mon Sep 27 15:19:53 2004 +0000 + + Added include eoDistance.h + +Author: evomarc +Date: Mon Sep 27 13:34:34 2004 +0000 + + Replaced the eoNormalMutation (mutating ALL variables of a real-valued vector) + with eiNormalVecMutation that has a proba. to mutation each variable + +Author: evomarc +Date: Mon Sep 27 13:31:40 2004 +0000 + + Added the class eoNormalVecMutation (yes, should have made another file :-( + +Author: okoenig +Date: Sun Sep 26 09:47:06 2004 +0000 + + Replaced top_builddir with top_srcdir + +Author: okoenig +Date: Sun Sep 26 09:45:59 2004 +0000 + + Removing a "/" at the end of a comment + +Author: kuepper +Date: Fri Sep 24 15:00:48 2004 +0000 + + Fix doc-target. + Fix inclusion of documentation in dist. + +Author: kuepper +Date: Fri Sep 24 11:55:09 2004 +0000 + + minor fixes + +Author: kuepper +Date: Wed Sep 22 18:38:12 2004 +0000 + + Removed clean-local due to problems with "make distcheck" + +Author: kuepper +Date: Wed Sep 22 18:18:31 2004 +0000 + + fix installation, dist-preparation + +Author: kuepper +Date: Wed Sep 22 17:30:11 2004 +0000 + + updates for distributing/installing ParadisEO. + +Author: kuepper +Date: Wed Sep 22 13:20:15 2004 +0000 + + update for new build-process + +Author: kuepper +Date: Wed Sep 22 12:38:28 2004 +0000 + + update build process to include paradiseo tutorial, + fix paradiseo headers for sstream + +Author: kuepper +Date: Wed Sep 22 08:18:29 2004 +0000 + + Update configure with switches for app, ParadisEO, and tutorial. + Add ParadisEO/Lesson1 tutorial in build-process. + minor fixes. + +Author: maartenkeijzer +Date: Tue Sep 21 19:49:48 2004 +0000 + + Made couple of functions virtual + +Author: kuepper +Date: Tue Sep 21 17:01:14 2004 +0000 + + updates, + start supoorting ParadisEO + +Author: kuepper +Date: Tue Sep 21 10:30:45 2004 +0000 + + fix dist-header + +Author: kuepper +Date: Tue Sep 21 10:23:33 2004 +0000 + + fix 'make dist', works now (besides ParadisEO). + +Author: kuepper +Date: Mon Sep 20 21:47:15 2004 +0000 + + updates + +Author: kuepper +Date: Mon Sep 20 17:14:11 2004 +0000 + + fix + +Author: kuepper +Date: Mon Sep 20 17:12:12 2004 +0000 + + better distribution support (not finished) + +Author: kuepper +Date: Mon Sep 20 17:06:25 2004 +0000 + + conditional compilation fixes + +Author: kuepper +Date: Mon Sep 20 16:05:25 2004 +0000 + + don't use user-variables + +Author: kuepper +Date: Mon Sep 20 15:51:53 2004 +0000 + + update user commentary + +Author: kuepper +Date: Mon Sep 20 15:50:00 2004 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Sep 20 14:11:24 2004 +0000 + + updates for build-process + +Author: kuepper +Date: Mon Sep 20 09:56:10 2004 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Sep 20 09:52:19 2004 +0000 + + Remove support files, they are automatically created by autotools + +Author: kuepper +Date: Mon Sep 20 09:50:47 2004 +0000 + + update + +Author: kuepper +Date: Mon Sep 20 09:47:19 2004 +0000 + + remove + +Author: kuepper +Date: Mon Sep 20 09:46:48 2004 +0000 + + remove Makefiles from cvs + +Author: kuepper +Date: Fri Sep 17 17:05:28 2004 +0000 + + add conditional includes for sstream + +Author: kuepper +Date: Fri Sep 17 17:00:04 2004 +0000 + + cleanup + +Author: kuepper +Date: Fri Sep 17 16:53:31 2004 +0000 + + Updated build-prcess to be completely under automake control. + + For the tutorial the old Makefiles are saved as Makefile.simple in all + the respective directories. + + Use generated config.h instead of command-line passing of preprocessor + flags. + + Updated support files from current automake. + +Author: kuepper +Date: Fri Sep 17 15:20:19 2004 +0000 + + Save copies of old simple Makefiles + +Author: maartenkeijzer +Date: Mon Aug 30 19:44:48 2004 +0000 + + added verbose flag that can be used to turn off annoying message to cout + +Author: evomarc +Date: Sat Aug 28 16:26:03 2004 +0000 + + CLeaned up the comments in files related to Sharing (added t-eoSharing in test) + +Author: evomarc +Date: Sat Aug 28 16:25:12 2004 +0000 + + Committing at last the long awaited test for Sharing + +Author: evomarc +Date: Sat Aug 28 14:03:34 2004 +0000 + + Cleaned up the comments + +Author: jmerelo +Date: Tue Aug 10 17:19:46 2004 +0000 + + Changes in docs and added stuff to eoEvalSteadyFitness to reset after using it + +Author: jmerelo +Date: Tue Aug 10 07:39:10 2004 +0000 + + Updating doxygen configuration + +Author: okoenig +Date: Sun Jul 25 13:26:02 2004 +0000 + + added a string msg to eoScalarFitnessAssembled, in order to store all sorts of messages for an individual + +Author: evomarc +Date: Fri Jul 16 08:45:02 2004 +0000 + + Added className (mysteriously missint) mandatory for eoCombinedInit + +Author: evomarc +Date: Fri Jul 16 08:44:14 2004 +0000 + + Allows proportional combinations of eoInit objects + Similar to eoPropostionalCombinedXXXOp + +Author: cahon +Date: Mon Jul 12 09:16:41 2004 +0000 + + Adding typedef EOT EOType ; + +Author: cahon +Date: Mon Jul 12 08:57:38 2004 +0000 + + Adding typedef EOT EOType ; + +Author: evomarc +Date: Wed Jun 23 23:19:17 2004 +0000 + + Added the Ctor using the Parser + +Author: evomarc +Date: Tue Jun 15 07:28:54 2004 +0000 + + Added the className method everywhere + +Author: evomarc +Date: Tue Jun 15 07:09:57 2004 +0000 + + Added the className methods everywhere + +Author: evomarc +Date: Tue Jun 15 07:06:27 2004 +0000 + + Added newline at end of stat + +Author: evomarc +Date: Tue Jun 15 07:04:12 2004 +0000 + + Added the allClassName method to print the name of all + classes that have been added to the checkpoint + +Author: okoenig +Date: Mon Jun 14 17:07:25 2004 +0000 + + Added a failed boolean to the fitness, for statistics... Average stat values are now computed from succesful fitness evaluations only + +Author: okoenig +Date: Mon Jun 14 17:05:07 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + Avg Stats are now only evaluated of individuals if this bool is false! + +Author: okoenig +Date: Mon Jun 14 11:59:39 2004 +0000 + + Replaced #include with #include to get rid of "deprecated" warnings in gcc 3.3 + +Author: okoenig +Date: Mon Jun 14 11:24:37 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + Avg Stats are now only evaluated of individuals if this bool is false! + +Author: okoenig +Date: Mon Jun 14 11:23:48 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + +Author: evomarc +Date: Wed May 26 10:23:07 2004 +0000 + + Adding Sharing (though eoSharingSelect - a roulette selection on shared fitnesses + +Author: evomarc +Date: Wed May 26 09:00:26 2004 +0000 + + Temporary modification of the tutorial to account for the new features + - stat.tmpl allowing easy creation of own stat + - sharing as a new possible selector in make_algo_scalar - requires a distance + No detail given, though ... + +Author: evomarc +Date: Tue May 25 08:03:30 2004 +0000 + + Adding sharing - needed to modify quite a few files, like eoDistance.h + make_algo_scalar.h and all related files, and the like + +Author: evomarc +Date: Tue May 25 07:57:52 2004 +0000 + + Adding the statistics in createSimple (create.sh is becoming obsolete) + +Author: stevemadere +Date: Fri May 21 01:44:32 2004 +0000 + + Fixed a bug in mlp::net::load() that prevented loading of multiple nets + from the same stream. + +Author: stevemadere +Date: Fri Apr 23 16:20:12 2004 +0000 + + Added weight perturbation operators to enable implementation of + exact GPROP-III algorithm. + +Author: evomarc +Date: Thu Apr 8 07:55:40 2004 +0000 + + Added the setLongName method to handle the prefix trick in eoParser + +Author: evomarc +Date: Mon Apr 5 15:28:12 2004 +0000 + + Added a prefix data in eoParser - and the setPrefix method - + for multi-population parameter input. Now you can call the make_xxx + functions from teh src/do directory several times for different populations + provided you do different calls to setPrefix inbetween + +Author: evomarc +Date: Tue Mar 30 16:51:06 2004 +0000 + + Corrected errors in the "memory management" section. + Thanks to ZhangQian for pointing them out + +Author: okoenig +Date: Sun Mar 28 22:18:03 2004 +0000 + + Bugfix regarding the feasible flag + +Author: maartenkeijzer +Date: Fri Mar 26 09:56:56 2004 +0000 + + Fixed bug in rng::roulette_wheel: use of float had too little precision in change/fortune var + +Author: maartenkeijzer +Date: Fri Mar 26 09:36:07 2004 +0000 + + Fixed rng::uniform to not provide the wrong result (1.0) once in every 2^32 times + +Author: stevemadere +Date: Wed Feb 11 23:03:23 2004 +0000 + + Made mlp::net::operator() a virtual function to allow for subclassing + with networks that transform their input or output. + +Author: stevemadere +Date: Tue Feb 10 22:33:30 2004 +0000 + + Fixed some signed/unsigned conversion bugs + +Author: jeggermo +Date: Mon Feb 2 08:54:10 2004 +0000 + + *** empty log message *** + +Author: maartenkeijzer +Date: Wed Jan 21 19:57:19 2004 +0000 + + Added define NO_GNUPLOT to disable gnuplot extensions + Needed for win32 (well, at least for me) + +Author: stevemadere +Date: Tue Jan 13 20:28:33 2004 +0000 + + Fixed the string serialization operators (>>, <<) for neuron, layer, + and net so they actually work and added or fixed stream-source + constructors where appropriate. + +Author: stevemadere +Date: Tue Jan 13 20:21:52 2004 +0000 + + Made it compile under gcc 3.2.2 by adding explicit definitions + of normally derived comparison operators >, >=, and == for the + structure phenotype. ( adding #include was not sufficient + to solve the problem) + Also added function gprop_use_datasets() to give more flexibility + in subclassing the datasets used to train the nets. + +Author: evomarc +Date: Tue Jan 13 03:35:27 2004 +0000 + + Added the standard header - just a test of CVS in fact! + +Author: evomarc +Date: Wed Dec 24 16:38:02 2003 +0000 + + Corrected a but in eoUniformMutation (only the first component ever got modified! + Thanks to Jeroen's student ... + +Author: evomarc +Date: Fri Dec 5 05:39:40 2003 +0000 + + There was an infinite loop in case of a file without section header on first line! + +Author: evomarc +Date: Fri Dec 5 05:38:02 2003 +0000 + + Added a few user-friendly comments in case sizes don't match between + load file and required popsize + +Author: evomarc +Date: Wed Nov 26 14:20:26 2003 +0000 + + A minor typo ... + +Author: evomarc +Date: Wed Nov 26 11:15:59 2003 +0000 + + THe call to randomize was forgotten after the choice of a terminal + at max_depth. + This was only visible if + - you implemented the randomize method + - you reached the maximum depth (or used ramped half-and-half). + +Author: okoenig +Date: Wed Nov 19 13:29:15 2003 +0000 + + Added possibility to print header to first line of output file; control through last bool in constructor - default = false... + +Author: jeggermo +Date: Tue Nov 4 15:32:24 2003 +0000 + + parse_tree.h now uses standard memory allocation + for MacOSX + +Author: jeggermo +Date: Tue Nov 4 15:29:24 2003 +0000 + + eoData has been changed slightly for MacOSX + +Author: maartenkeijzer +Date: Sun Oct 12 23:49:23 2003 +0000 + + oops, forgot std:: + +Author: maartenkeijzer +Date: Sun Oct 12 20:53:28 2003 +0000 + + Sort dissappeared in one-objective + +Author: evomarc +Date: Sat Sep 20 05:42:23 2003 +0000 + + Updated lists of headers in some Makefile.am (thanks to Claude Dion for pointing this out) + While there, changed the presentations of source and headers (1 per line with \) + +Author: evomarc +Date: Thu Sep 18 15:09:34 2003 +0000 + + Modified a wrong link + +Author: evomarc +Date: Tue Sep 2 05:49:37 2003 +0000 + + Slightly modified the formula: the worst individual had "fitness" 0 in hte case of linear scaling with pressure=2. Now it has fitness 1/[P(P-1)/2] + Thanks to Gilles BAUDRILLARD (EADS) + +Author: evomarc +Date: Mon Sep 1 12:56:29 2003 +0000 + + Added 2 missing headers (and broke the long lines). + Thanks to Jochen KĂĽpper for pointing this out. + +Author: evomarc +Date: Tue Aug 26 18:07:06 2003 +0000 + + Corrected a HUGE bug in eoRealUXover !!! + Thanks to Gilles BAUDRILLARD - EADS + +Author: okoenig +Date: Thu Aug 21 13:02:53 2003 +0000 + + added parameters to the constructors to start generation counting !=0 + the parameters are optional and appended in the end + +Author: evomarc +Date: Sat Aug 2 06:55:47 2003 +0000 + + CLean-up + +Author: evomarc +Date: Sat Aug 2 06:42:33 2003 +0000 + + Adding the generic operators for FIXED-LENGTH ORDERED genotypes eoFlOrXxxOp.h + +Author: okoenig +Date: Wed Jul 30 14:48:13 2003 +0000 + + Inserted a missing std:: + +Author: evomarc +Date: Tue Jul 29 05:33:58 2003 +0000 + + Forgot the dir when adding eoSBXcross.h :-((( + +Author: evomarc +Date: Mon Jul 28 09:48:58 2003 +0000 + + Adding SBX crossover operator in es dir + +Author: evomarc +Date: Mon Jul 28 09:47:15 2003 +0000 + + Adding the SBX operator in es dir + +Author: evomarc +Date: Sat Jun 21 06:34:00 2003 +0000 + + More precise comment + +Author: jmerelo +Date: Wed Jun 18 09:07:19 2003 +0000 + + Eliminated using namespace std + +Author: jmerelo +Date: Tue Jun 17 12:03:42 2003 +0000 + + better eoString + +Author: jmerelo +Date: Tue Jun 17 06:24:15 2003 +0000 + + Changes to obsolete things + +Author: okoenig +Date: Mon Jun 16 21:41:30 2003 +0000 + + added a public bool feasible, used to identify feasible individuals in initialization processes + +Author: maartenkeijzer +Date: Mon Jun 9 06:25:11 2003 +0000 + + Exported operator() for eoSGATransform in abstract1.cpp + +Author: evomarc +Date: Mon Jun 9 06:17:26 2003 +0000 + + Change in terminology: EDA (Estimation of Distribution Algorithms) replaces + DEA (Distribution Evolution Algorithms), as it seems more widely used today. + +Author: evomarc +Date: Mon Jun 9 06:06:13 2003 +0000 + + Change in terminology: EDA (Estimation of Distribution Algorithms) replaces + DEA (Distribution Evolution Algorithms), as it seems more widely used today. + +Author: maartenkeijzer +Date: Fri Jun 6 10:29:13 2003 +0000 + + Improved the check for changed. Now it will only set the changed flag when the elements that are flipped are actually different + +Author: maartenkeijzer +Date: Wed Jun 4 11:50:48 2003 +0000 + + added shuffle + +Author: maartenkeijzer +Date: Wed Jun 4 09:34:26 2003 +0000 + + Added tests for roulette wheel selection + +Author: maartenkeijzer +Date: Wed Jun 4 09:33:27 2003 +0000 + + optimized eoProportional and added universalselect + +Author: jeggermo +Date: Fri May 16 14:28:52 2003 +0000 + + GCC 3.3 + +Author: evomarc +Date: Sun Apr 27 06:08:11 2003 +0000 + + Added keywords "Sequential" and "Random" as synonyms of resp. "Deterministic" + and "Uniform" - for EASEA + +Author: maartenkeijzer +Date: Sun Apr 20 12:57:59 2003 +0000 + + Removed HAVE_SSTREAM for redhat 2.96 + +Author: cahon +Date: Fri Apr 18 13:32:39 2003 +0000 + + missing include eoParetoFitness.h + +Author: okoenig +Date: Sat Apr 5 13:42:44 2003 +0000 + + minor changes + +Author: okoenig +Date: Sat Apr 5 13:42:01 2003 +0000 + + added eoAssembledFitnessStat.h to implement Best and Avg Stat for eoScalarFitnessAssembled + +Author: okoenig +Date: Sat Apr 5 13:40:57 2003 +0000 + + Removed function template specializations for eoScalarFitnessAssembled from classes in this file, since they do not work under Visual Studio! Reimplemented these stat classes for this new fitness class in eoAssembledFitnessStat.h + +Author: okoenig +Date: Thu Apr 3 16:51:47 2003 +0000 + + Included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. + +Author: okoenig +Date: Thu Apr 3 16:47:47 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 16:25:55 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 10:44:35 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 09:23:52 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 09:11:17 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Wed Apr 2 21:10:53 2003 +0000 + + included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. + +Author: evomarc +Date: Tue Apr 1 12:09:37 2003 +0000 + + Removed a dummy line containing reference to lesson3! + +Author: maartenkeijzer +Date: Tue Mar 25 10:46:08 2003 +0000 + + Deleted political statement as I changed my mind about this + +Author: evomarc +Date: Sat Mar 22 06:39:21 2003 +0000 + + ADded comments and hook for copy constructor + +Author: maartenkeijzer +Date: Fri Mar 21 09:17:38 2003 +0000 + + bumped up the version number + +Author: maartenkeijzer +Date: Fri Mar 21 02:44:05 2003 +0000 + + now added an std::ends for plotting strstream + +Author: maartenkeijzer +Date: Fri Mar 21 02:41:54 2003 +0000 + + again: std::ends and stringstream + +Author: maartenkeijzer +Date: Fri Mar 21 02:39:09 2003 +0000 + + fixed (?) some problems with stringstreams and std::ends + +Author: maartenkeijzer +Date: Thu Mar 20 20:00:38 2003 +0000 + + eliminated gprop from the build until someone makes sure it builds under gcc-3.2 + +Author: maartenkeijzer +Date: Thu Mar 20 19:49:32 2003 +0000 + + replace \0 with std::ends + +Author: maartenkeijzer +Date: Wed Mar 19 10:47:08 2003 +0000 + + finished pickling support for valueParam + +Author: maartenkeijzer +Date: Wed Mar 19 10:16:56 2003 +0000 + + Added pickling support for ValueParams + +Author: maartenkeijzer +Date: Wed Mar 19 08:53:59 2003 +0000 + + removed comment in PyEO.cpp + +Author: maartenkeijzer +Date: Tue Mar 18 16:57:17 2003 +0000 + + added operator> + +Author: maartenkeijzer +Date: Tue Mar 18 16:52:31 2003 +0000 + + fixed a bug reported on sourceforge + +Author: maartenkeijzer +Date: Tue Mar 18 16:35:27 2003 +0000 + + *** empty log message *** + +Author: maartenkeijzer +Date: Tue Mar 18 09:40:36 2003 +0000 + + excluded gcc>3 from check + +Author: maartenkeijzer +Date: Tue Mar 18 09:35:46 2003 +0000 + + hi + +Author: maartenkeijzer +Date: Sun Mar 2 11:35:43 2003 +0000 + + decorated sort and max with std:: specifier + +Author: maartenkeijzer +Date: Sun Mar 2 11:29:01 2003 +0000 + + decorated copy with std:: specifier + +Author: maartenkeijzer +Date: Sun Mar 2 11:26:45 2003 +0000 + + added typenames for pop::iterator + +Author: maartenkeijzer +Date: Sun Mar 2 11:16:33 2003 +0000 + + added include file + +Author: okoenig +Date: Fri Feb 28 17:47:24 2003 +0000 + + This Makefile.am was missing; all it does is adding the *.h and Readme files to distribution + +Author: maartenkeijzer +Date: Fri Feb 28 16:56:59 2003 +0000 + + oops, forgot thisone + +Author: maartenkeijzer +Date: Fri Feb 28 16:49:19 2003 +0000 + + changed to using sstream + +Author: okoenig +Date: Thu Feb 27 19:28:07 2003 +0000 + + Removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. + +Author: okoenig +Date: Thu Feb 27 19:18:53 2003 +0000 + + removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary + +Author: okoenig +Date: Thu Feb 27 19:18:07 2003 +0000 + + removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. + +Author: okoenig +Date: Thu Feb 20 19:13:33 2003 +0000 + + added an #ifdef _MSC_VER statement to hide "typename" identifier for Visual Studio + +Author: maartenkeijzer +Date: Mon Feb 17 10:42:03 2003 +0000 + + added std:: + +Author: maartenkeijzer +Date: Mon Feb 17 10:19:25 2003 +0000 + + Updated to use gcc-3.2 + +Author: maartenkeijzer +Date: Mon Feb 17 09:52:36 2003 +0000 + + rolled back unfortunate change in eoAverageStat + +Author: evomarc +Date: Sat Feb 8 05:36:01 2003 +0000 + + Added a mthod to remove one of the combined things (from RamĂłn Casero Cañas) + +Author: evomarc +Date: Sat Feb 8 05:24:51 2003 +0000 + + Removed debugging printouts + +Author: maartenkeijzer +Date: Tue Jan 14 10:09:28 2003 +0000 + + added missing valueparm.h" + +Author: maartenkeijzer +Date: Tue Jan 14 09:37:45 2003 +0000 + + next iteration + +Author: maartenkeijzer +Date: Fri Jan 10 15:42:45 2003 +0000 + + found a bug in eoProportionalOp, hope this helps... + +Author: maartenkeijzer +Date: Fri Jan 10 15:41:17 2003 +0000 + + Added monitors and statistics, also made a module with some + specific python stuff in __init__.py + +Author: okoenig +Date: Wed Jan 8 12:43:31 2003 +0000 + + bugfix: since there are no Makefiles in the directory ~eo/src/do anymore, I removed this directory from the subdirs list in this Makefile.am + +Author: maartenkeijzer +Date: Tue Jan 7 14:24:56 2003 +0000 + + some bugfixes + +Author: maartenkeijzer +Date: Tue Jan 7 10:50:23 2003 +0000 + + df + +Author: maartenkeijzer +Date: Tue Jan 7 10:49:55 2003 +0000 + + added a small cookbook + +Author: maartenkeijzer +Date: Mon Jan 6 21:56:40 2003 +0000 + + needed for redhat + +Author: maartenkeijzer +Date: Mon Jan 6 16:11:05 2003 +0000 + + added + +Author: maartenkeijzer +Date: Mon Jan 6 16:10:38 2003 +0000 + + Added multi-objective support to PyEO (and changed its name to that) + +Author: maartenkeijzer +Date: Mon Jan 6 14:25:40 2003 +0000 + + Changed a few things so that the python library can + be used with the multi-objective library (it basically + boils down to removing the assumption that fitness() has a + size() member function and changing eoPop to vector) + +Author: maartenkeijzer +Date: Sun Jan 5 16:45:48 2003 +0000 + + updated build info + +Author: maartenkeijzer +Date: Sun Jan 5 16:31:50 2003 +0000 + + Added pyeo. Some changes needed to be made for include files and the like + in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) + + eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. + +Author: maartenkeijzer +Date: Sun Dec 29 22:48:01 2002 +0000 + + oops, error in line 47 + +Author: music_dev +Date: Sat Dec 14 02:51:53 2002 +0000 + + Added compatibility for MSVC.NET + +Author: cahon +Date: Fri Dec 13 10:03:47 2002 +0000 + + Fixing bug [preserve order of the pop. to evaluate] + +Author: evomarc +Date: Mon Dec 9 21:04:47 2002 +0000 + + There was a bug in teh Ctor (fortunately, only with the last + parameter, that was generally used with the default value). + Thanks to RamĂłn Casero Cañas + +Author: evomarc +Date: Mon Dec 9 06:57:33 2002 +0000 + + Corrected wrong links in the 1st paragraph + +Author: evomarc +Date: Mon Dec 9 06:19:56 2002 +0000 + + Corrected an error in name of statusParam parameter + +Author: evomarc +Date: Mon Dec 9 06:17:25 2002 +0000 + + Corrected a typo + +Author: okoenig +Date: Sun Nov 3 13:17:48 2002 +0000 + + reordered initialization list to match declaration order + +Author: okoenig +Date: Sun Nov 3 13:07:43 2002 +0000 + + added some typename statements to make it compile without warnings under gcc3.2 + +Author: okoenig +Date: Wed Oct 23 10:23:03 2002 +0000 + + small bugfix, to make this example run under Solaris/g++ 2.95.3 + +Author: evomarc +Date: Wed Oct 23 04:43:10 2002 +0000 + + Adding depcom so that it compile smoothly on Solaris. + Thanks to Oliver Koenig + +Author: evomarc +Date: Wed Oct 23 04:42:07 2002 +0000 + + Modification of all Makefiles so that it compiles smoothly on Solaris. + Thanks to Oliver Koenig + +Author: evomarc +Date: Mon Oct 21 04:28:11 2002 +0000 + + Added the .SUFFIXES lien (for Solaris) and the use of $(CXX) instead of c++ + plus a few comments :-) + +Author: jeggermo +Date: Fri Oct 18 11:39:09 2002 +0000 + + *** empty log message *** + +Author: music_dev +Date: Mon Oct 14 16:16:01 2002 +0000 + + Better install for libraries. + +Author: evomarc +Date: Wed Oct 2 14:07:58 2002 +0000 + + Removed the stringstream (sstream not in all compilers distributions) + +Author: evomarc +Date: Wed Sep 18 15:36:41 2002 +0000 + + Added accessors to private parameter stopOnUnknownParam + +Author: jeggermo +Date: Wed Sep 18 12:40:46 2002 +0000 + + A new readFrom & printOn function for EO.h + Now it CAN handle VALID/INVALID fitnesses. + + The problems are over at last + +Author: cahon +Date: Tue Sep 17 07:08:51 2002 +0000 + + Allowing a first eval. of the pop. to be performed by the E.A. + +Author: cahon +Date: Mon Sep 16 12:53:08 2002 +0000 + + Invalidating flags ... + +Author: evomarc +Date: Thu Aug 29 16:44:30 2002 +0000 + + Added a missing test in the weak elitism + +Author: evomarc +Date: Thu Aug 29 16:31:50 2002 +0000 + + Added an error message in case of unknown reducer + (was the source of a segmentation fault with old parameter files) + +Author: evomarc +Date: Fri Aug 23 16:06:06 2002 +0000 + + Removed non-tested code (forthcoming)... + +Author: evomarc +Date: Fri Aug 23 16:02:02 2002 +0000 + + It was about time to enter the template file for EASEA here, as createSimple + and EASEA are doing approximately the same job ...` + +Author: evomarc +Date: Fri Aug 23 15:58:15 2002 +0000 + + Adding a simpler way of generating files for new genotypes (see EO.tpl + in EASEA). + +Author: evomarc +Date: Fri Aug 23 15:56:09 2002 +0000 + + Adding more repalcements utilities (see do/make_easea_algo.h) + +Author: evomarc +Date: Fri Aug 23 15:54:30 2002 +0000 + + Adding replacement strategies: teh ReduceMergeReduce for EASEA and the + MGG and G2 replacements from Deb's PCX paper + +Author: evomarc +Date: Fri Aug 23 15:52:40 2002 +0000 + + Adding make_xxx files for EASEA + +Author: evomarc +Date: Fri Aug 23 15:50:57 2002 +0000 + + Adding eoSGAGenOp.h - mimicking eoSGATransform into an eoGenOp + +Author: evomarc +Date: Fri Aug 23 15:49:29 2002 +0000 + + Added the invalidate method + +Author: evomarc +Date: Fri Aug 23 15:44:27 2002 +0000 + + Tiny details + +Author: evomarc +Date: Fri Aug 23 15:41:00 2002 +0000 + + Added bounds to FitnessStat and Gnuplot monitor + +Author: evomarc +Date: Fri Aug 2 07:40:47 2002 +0000 + + Removed some multiple declaraions inside for loops that MSVC++ doesn't like + +Author: evomarc +Date: Tue Jul 30 03:21:59 2002 +0000 + + Removed a typo that made gnuplot file not be in the RESULT directory + +Author: evomarc +Date: Sun Jul 28 05:40:25 2002 +0000 + + Added eoReduceMergeReduce and elitism (+ corrected small bug in eoHowMany) + +Author: evomarc +Date: Wed Jul 24 18:08:30 2002 +0000 + + A radical change in eoCheckPoint - though invisible from the outside: + eoCheckpoint now alos contains a vector - and not only + IS A eoContinue. So you can ADD another eoContinue to an eoCheckpoint... + +Author: evomarc +Date: Wed Jul 24 18:05:18 2002 +0000 + + There was a problem with the activation of the Ctrl C + +Author: maartenkeijzer +Date: Tue Jul 23 09:34:46 2002 +0000 + + added EO.h to include list + +Author: maartenkeijzer +Date: Tue Jul 23 09:17:59 2002 +0000 + + Run it for 50 generations, it's too fast otherwise :) + +Author: maartenkeijzer +Date: Mon Jul 22 13:35:11 2002 +0000 + + +Author: maartenkeijzer +Date: Mon Jul 22 13:31:55 2002 +0000 + + added a 'nasty_declone_flag' to be able to declone a population + +Author: maartenkeijzer +Date: Mon Jul 22 13:20:04 2002 +0000 + + Added 'sweepline' optimization for eoNDSorting.h + +Author: evomarc +Date: Sat Jul 6 05:24:51 2002 +0000 + + Added eoSequentialSelect.h in the includes + +Author: evomarc +Date: Sat Jul 6 05:23:18 2002 +0000 + + I had left a flaw in teh Ctor (did not accept rates >1) + +Author: evomarc +Date: Fri Jun 21 13:50:39 2002 +0000 + + Changd a const_iterator to iterator in method it_best_element + God (or Maarten :-) knows why this was there + +Author: evomarc +Date: Fri Jun 21 13:30:17 2002 +0000 + + Added the negative rate (-> 1-rate) and the unary operator- (useful + in eoG3Replacement) + +Author: jeggermo +Date: Thu Jun 20 12:38:47 2002 +0000 + + small typo + +Author: evomarc +Date: Wed Jun 19 03:42:54 2002 +0000 + + Replaced ../../src with the DIR_EO macro! + +Author: evomarc +Date: Mon Jun 17 09:19:17 2002 +0000 + + Added include file eoHowMany for self-consistency + +Author: evomarc +Date: Mon Jun 17 09:18:37 2002 +0000 + + Removed eoSequentialSelect + +Author: evomarc +Date: Mon Jun 17 09:13:47 2002 +0000 + + Added the Truncation embedders, and the separate eoSequentialSelect file + +Author: evomarc +Date: Mon Jun 17 09:12:08 2002 +0000 + + Separated eoSequentialSelect from eoRandomSelect.h file + Added eoEliteSequentialSelect, where best is always selected first, useful for + G3 engine + +Author: evomarc +Date: Mon Jun 17 04:51:34 2002 +0000 + + Reshaped the whole code + Added the SequentialSelect selectors + THe generated files are now "hidden" in ResSelect dir (hardcoded!) + +Author: evomarc +Date: Mon Jun 17 04:13:45 2002 +0000 + + Adding the truncation selectors. + 2 versions: eoTruncatedSelectOne is an eoSelectOne, and + eoTruncatedSelectMany works like an eoSelectMany (but is NOT) + +Author: jeggermo +Date: Mon Jun 10 14:10:35 2002 +0000 + + all .dsp files converted from unix to dos format + +Author: evomarc +Date: Wed May 22 02:13:06 2002 +0000 + + I had forgotten the real_value.h - SecondRealEA did not compile! + +Author: jeggermo +Date: Mon May 13 11:31:32 2002 +0000 + + EO::printOn has been changed so that the printOn function will + always print a valid fitness value even if the fitness is invalid + + Jeroen + +Author: jeggermo +Date: Thu May 9 15:43:01 2002 +0000 + + ramped half and half initialization has been added to eoParseTreeDepthInit + +Author: evomarc +Date: Thu May 9 06:35:34 2002 +0000 + + Still introducing ParadisEO + +Author: evomarc +Date: Thu May 9 06:28:34 2002 +0000 + + Added references to ParadisEO and Lesson5 + +Author: evomarc +Date: Wed May 8 06:55:21 2002 +0000 + + Added Lesson5 + +Author: evomarc +Date: Wed May 8 06:52:37 2002 +0000 + + Updated version number + +Author: evomarc +Date: Wed May 8 06:50:58 2002 +0000 + + Adding the Lesson5 - how to create your own genotype + +Author: evomarc +Date: Wed May 8 06:47:50 2002 +0000 + + Added the MyStructLibEA.cpp+make_MyStruct.cpp that allow separate + compilation of representation-indenepent stuff. Modified create.sh script + and Makefile accordingly. See Lesson5 of the tutorial + +Author: evomarc +Date: Wed May 8 06:44:04 2002 +0000 + + an example of how to make a new genotype within EO - see HTML doc + +Author: evomarc +Date: Wed May 8 06:31:18 2002 +0000 + + Replacing Paradiseo(jet7).pdf with paradiseoJet7.pdf because of Unix problems + with names containing commas + +Author: evomarc +Date: Wed May 8 06:14:23 2002 +0000 + + Removed the template_depth argument (since we are finally NOT going for + the fitness_trait stuff). + +Author: evomarc +Date: Fri May 3 05:12:32 2002 +0000 + + Replaced the eoParameterLoader parameter by an eoParser (used everywhere now) + +Author: evomarc +Date: Wed May 1 04:04:15 2002 +0000 + + eoParameterLoader -> eoParser + +Author: evomarc +Date: Wed May 1 02:44:54 2002 +0000 + + THe code for the 1/5th mutation was completely wrong! + +Author: evomarc +Date: Tue Apr 30 05:10:49 2002 +0000 + + Turned the power function to sum - was untractable with long bitstrings + +Author: evomarc +Date: Tue Apr 30 05:07:52 2002 +0000 + + Added the calls to EO::printOn and EO::readFrom in the corresponding methods + so th euser does not forget to use these before writing/reading the actual eo + +Author: evomarc +Date: Tue Apr 30 04:56:39 2002 +0000 + + Added utils/eoUniformInit.h + +Author: evomarc +Date: Tue Apr 30 04:54:25 2002 +0000 + + Copied from eoRndGenerators here is eoUniformInit, same thing but in the eoInit + hierarchy. + Useful to embed into higher levels eoInit + +Author: evomarc +Date: Sun Apr 28 05:04:24 2002 +0000 + + Adding SecondRealEA + +Author: evomarc +Date: Sun Apr 28 04:38:38 2002 +0000 + + Adding SecongRealEA - mainly to prepare Lesson5 about adaptive parameters + +Author: evomarc +Date: Fri Apr 26 03:17:37 2002 +0000 + + Added explanation and examples of getORcreateParam usage + +Author: evomarc +Date: Fri Apr 26 02:39:10 2002 +0000 + + Turned the code that was testing for the existence of the size parameter + in to the call to getORcreateParam (actually, this was where this code + has been tested the first time) + +Author: evomarc +Date: Fri Apr 26 02:37:40 2002 +0000 + + Added the negative argument in Ctor to say that you want number + popSize - some fixed number + +Author: evomarc +Date: Fri Apr 26 02:28:19 2002 +0000 + + Turned the createParam into getORcreateParam so that you can more easily + define them before (e.g. from the problem at hand). + This is useful specially for vecSize as some problems have predefined values + +Author: cahon +Date: Thu Apr 25 14:26:02 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Thu Apr 25 14:10:22 2002 +0000 + + Adding cellular E.A. + +Author: cahon +Date: Thu Apr 25 14:08:26 2002 +0000 + + A toric topology for cellular E.A. + +Author: cahon +Date: Thu Apr 25 14:06:43 2002 +0000 + + Cellular parallel easy algorithm + +Author: evomarc +Date: Tue Apr 23 09:56:49 2002 +0000 + + Updated the documentation (comments) + +Author: cahon +Date: Tue Apr 23 09:16:51 2002 +0000 + + Slides from Jet7, March 2002, ENSTA Paris + +Author: cahon +Date: Tue Apr 23 09:11:58 2002 +0000 + + *** empty log message *** + +Author: jeggermo +Date: Fri Apr 19 22:13:15 2002 +0000 + + A faulty constructor in eoParseTree caused some problems + +Author: cahon +Date: Fri Apr 19 15:24:07 2002 +0000 + + Slides from Jet7, ENSTA Paris (April 2002) + +Author: music_dev +Date: Fri Apr 19 14:42:47 2002 +0000 + + Multithreaded version. Changed name of lib to eo_lib[d].lib + +Author: evomarc +Date: Fri Apr 19 14:06:50 2002 +0000 + + Templatized apply + added a return statement + +Author: evomarc +Date: Fri Apr 19 14:04:25 2002 +0000 + + Replaced floats by doubles + +Author: jeggermo +Date: Thu Apr 18 13:56:36 2002 +0000 + + new printOn and readFrom functions + (they look more like the eoBit ones) + +Author: evomarc +Date: Thu Apr 18 03:23:24 2002 +0000 + + Ome explanations on how to launch the examples + +Author: evomarc +Date: Thu Apr 18 03:22:47 2002 +0000 + + Added the README, and modified the config files to remove the 127.0.0.1 + that was misleading + +Author: jeggermo +Date: Mon Apr 15 14:12:19 2002 +0000 + + *** empty log message *** + +Author: jeggermo +Date: Mon Apr 15 12:56:35 2002 +0000 + + eoParseTree printOn and readFrom functions changed for + compatibility with paradisEO + + The fitness is now printed in the same way as in eoBit + +Author: evomarc +Date: Fri Apr 12 16:17:02 2002 +0000 + + Changed name of target in all_lib.dsp + Added eoParetoFitness.cpp in sources of eo.dsp + +Author: evomarc +Date: Fri Apr 12 15:13:45 2002 +0000 + + A few changes for MSVC++ compatibility + +Author: evomarc +Date: Fri Apr 12 14:41:52 2002 +0000 + + Turned the specific compiler order mpiCC into a Macro + so it's easier to modify + We shall need to put this into the automatic configure one day ... + +Author: evomarc +Date: Fri Apr 12 14:39:58 2002 +0000 + + 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 + +Author: evomarc +Date: Fri Apr 12 14:13:08 2002 +0000 + + Adding ParadisEO Tutorial examples + +Author: evomarc +Date: Fri Apr 12 13:38:08 2002 +0000 + + Added name of the Debug library + +Author: evomarc +Date: Tue Apr 9 08:48:44 2002 +0000 + + Modified the comments so they appear in doxygen doc (and updated them also) + +Author: evomarc +Date: Mon Apr 8 18:04:32 2002 +0000 + + Modified my E-mail address (the old one at Polytechnique will soon be obsolete) + +Author: evomarc +Date: Mon Apr 8 18:03:35 2002 +0000 + + I suddenly realized that BitEA.html was NOT in the repository! + +Author: evomarc +Date: Mon Apr 8 08:50:27 2002 +0000 + + Added the eoIncrementorParam - now ALL pointers allocated in make_checkpoint + are stored somewhere (the generation counter was not) + +Author: evomarc +Date: Mon Apr 8 08:42:46 2002 +0000 + + Check that size > 1 (otherwise division by 0) + +Author: evomarc +Date: Mon Apr 8 08:42:01 2002 +0000 + + Added a few "std::" before copy and ostream_iterator + +Author: evomarc +Date: Mon Apr 1 20:15:32 2002 +0000 + + After indoduction of paradisEO, eoEaseyEA was a subclass of class eoPopAlgo + and not eoAlgo. + I don't have time to investigate, so I went back to a subclass of eoAlgo. + We'll sort that out later (after EuroGP I guess). + +Author: cahon +Date: Fri Mar 29 15:38:15 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 15:36:04 2002 +0000 + + How to build an EA with a distributed evalaution process ? + +Author: cahon +Date: Fri Mar 29 15:30:55 2002 +0000 + + How to build an homo/heterogenous island model of EAs ? + +Author: cahon +Date: Fri Mar 29 15:16:11 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 15:10:04 2002 +0000 + + For any sending message + +Author: cahon +Date: Fri Mar 29 15:05:35 2002 +0000 + + The local communication layer + +Author: cahon +Date: Fri Mar 29 15:04:49 2002 +0000 + + The global communication layer + +Author: cahon +Date: Fri Mar 29 14:59:58 2002 +0000 + + An evaluator which sequentially values individuals making the pop. + +Author: cahon +Date: Fri Mar 29 14:57:30 2002 +0000 + + The slave evaluator node + +Author: cahon +Date: Fri Mar 29 14:56:18 2002 +0000 + + The master dispatcher evaluator + +Author: cahon +Date: Fri Mar 29 14:54:52 2002 +0000 + + An EA with a distributed evaluation process + +Author: cahon +Date: Fri Mar 29 14:50:11 2002 +0000 + + Each island is connected from/to only one neighbour + +Author: cahon +Date: Fri Mar 29 14:49:04 2002 +0000 + + Each island id connected to the whole considered islands + +Author: cahon +Date: Fri Mar 29 14:47:13 2002 +0000 + + A checkpoint to send/receive pop. to/from others islands + +Author: cahon +Date: Fri Mar 29 14:45:00 2002 +0000 + + The island EA model + +Author: cahon +Date: Fri Mar 29 14:41:01 2002 +0000 + + A continuator which periodically returns false + +Author: cahon +Date: Fri Mar 29 14:38:36 2002 +0000 + + A tool to apply a process to any incoming EO ... + +Author: cahon +Date: Fri Mar 29 10:34:16 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 10:26:36 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 10:02:47 2002 +0000 + + The paradiseo interface + +Author: cahon +Date: Wed Mar 27 17:31:05 2002 +0000 + + Some changes for the use in paradisEO + +Author: cahon +Date: Wed Mar 27 17:28:04 2002 +0000 + + Defines any population-based algorithm. + +Author: cahon +Date: Wed Mar 27 17:19:25 2002 +0000 + + Any EO with an invalid fitness should be printable ! + +Author: evomarc +Date: Fri Mar 22 11:01:30 2002 +0000 + + Added the time counter in make_checkpoint + +Author: evomarc +Date: Fri Mar 22 10:57:37 2002 +0000 + + Added the eoTimeCounter that allows to use time as a base counter + for statistics (when you compare things that are not using the same + evaluation function for instance) + +Author: evomarc +Date: Fri Mar 15 06:41:54 2002 +0000 + + Added the lonk to SourceForge in the title, and to README in the "install" section + +Author: evomarc +Date: Fri Mar 15 06:28:25 2002 +0000 + + The source file names had changed, some day, in doxygen-genertaed doc ... + +Author: evomarc +Date: Fri Mar 15 06:06:22 2002 +0000 + + Corrected a few linkgs to the documentation + Reaplced eoBin with eiBit (about time!!!) + +Author: evomarc +Date: Wed Mar 6 06:54:00 2002 +0000 + + More on parameter input (getORcreateParam explained) + +Author: evomarc +Date: Wed Mar 6 06:28:27 2002 +0000 + + Added the tags to generate html nice output + +Author: evomarc +Date: Wed Mar 6 06:25:40 2002 +0000 + + Added some explanations about the memory mangement (through eoFunctorStore) + +Author: evomarc +Date: Tue Mar 5 05:46:55 2002 +0000 + + Corrected a sligth error in eoParamParam reading that resulted in making the comma + part of the stored string value + +Author: evomarc +Date: Tue Mar 5 05:38:21 2002 +0000 + + Adding class eoParetoOneConstraintFitness, multi-valued fitness + 1 constraint + This file shoudl contain the general Pareto+contraint class - but + I'm in a big hurry. + +Author: evomarc +Date: Tue Mar 5 05:34:27 2002 +0000 + + Changed the reading of parameter resDir from createParam to getORcreateParam + so it can be used in other parts of hte program (it's handy to put all + disk outputs in one dir). + +Author: evomarc +Date: Mon Feb 11 06:28:52 2002 +0000 + + Added file monitors for the population in the Pareto space (were ony available as + eoGnulpot1DSnapshors before) + +Author: evomarc +Date: Mon Feb 11 06:27:44 2002 +0000 + + Added a title (Gen. X) to the plot so you can follow what's going on + +Author: evomarc +Date: Mon Feb 11 06:26:48 2002 +0000 + + Added the getCounter() method so subclasses have a hand on the generation nb + +Author: evomarc +Date: Sat Feb 9 05:01:48 2002 +0000 + + Corrected a serious bug in eoUniformMutation (double declaration of bool HasChanged) + The consequence was that if that mutation was the only operator called on some + individual, it was not invalidated, and hence its fitness not recomputed!!! + +Author: evomarc +Date: Sat Feb 9 04:58:33 2002 +0000 + + First instances of the make_xxx_pareto, where xxx is algo, continue and checkpoint + +Author: evomarc +Date: Fri Feb 8 07:51:59 2002 +0000 + + Added the constructor from a string + +Author: evomarc +Date: Fri Feb 8 07:49:32 2002 +0000 + + Added the method getORcreateParam. + It has exactly the same syntax than the createParam method + but it first checks whether the param has been laready entered before creating it + +Author: evomarc +Date: Fri Feb 8 07:48:03 2002 +0000 + + Added a constructor from a vector - mandatory in all applications + +Author: evomarc +Date: Fri Feb 8 07:47:03 2002 +0000 + + Removed the const in method eoInit & atomInit() + +Author: jeggermo +Date: Mon Feb 4 14:28:00 2002 +0000 + + the gpsymreg code has been slightly altered to allow compilation using the + Intel C++ Compiler for Linux. + + Other compilers should not be affected. + + A slightly different makefile is needed + +Author: jeggermo +Date: Mon Feb 4 13:16:50 2002 +0000 + + Fixed some compatibility issues with GCC 3.0.1 and the Intel C++ Compiler + for Linux v5. + +Author: evomarc +Date: Sat Feb 2 07:37:54 2002 +0000 + + Added warning in case number of objective is changed (and not set) + +Author: evomarc +Date: Sat Feb 2 07:36:58 2002 +0000 + + Suppressed the lt_arity fn that was added for MSVC - and now seems unnecessary + +Author: evomarc +Date: Sat Feb 2 07:36:12 2002 +0000 + + Added warning test + +Author: evomarc +Date: Sat Feb 2 07:34:13 2002 +0000 + + Added newline at end of file (to suppress g+ warning) + +Author: evomarc +Date: Sat Feb 2 07:05:31 2002 +0000 + + Added the eoVariableParetoTraits (setup number of objcetives and min/max + at run time). + +Author: evomarc +Date: Sat Feb 2 06:43:46 2002 +0000 + + Moved the static variables of class eoVariableParetoTraits + into a separate .cpp file (eoParetoFitness.cpp) - and modified Makefile.am + +Author: evomarc +Date: Sat Feb 2 05:59:05 2002 +0000 + + Added default value for bool arg in testDirRes function + +Author: evomarc +Date: Sat Feb 2 05:51:31 2002 +0000 + + Removed comment after #endif (warning in gcc 1.96+) + +Author: evomarc +Date: Thu Jan 31 17:42:03 2002 +0000 + + Added the eoVariableParetoTraits that allows to specify the number + of objectives and the max/min for each one at run-time + +Author: evomarc +Date: Thu Jan 31 17:32:27 2002 +0000 + + Updated the comments + +Author: evomarc +Date: Wed Jan 30 12:24:42 2002 +0000 + + Added Ranking (God knows why it was mnissing!) + +Author: evomarc +Date: Thu Jan 17 17:57:55 2002 +0000 + + Added the move from Release and DEbug into the lib dir + +Author: evomarc +Date: Thu Jan 17 17:54:56 2002 +0000 + + Removed the #ifdef that protected the lt_arity avaints MSVC (!!!) + +Author: evomarc +Date: Thu Jan 17 17:51:58 2002 +0000 + + apply -> apply for MSVC + +Author: evomarc +Date: Thu Jan 17 17:51:02 2002 +0000 + + Protexted all calls to gnuplot for MSVC + +Author: evomarc +Date: Thu Jan 17 15:24:44 2002 +0000 + + Adding tutorial files + +Author: evomarc +Date: Thu Jan 17 15:21:44 2002 +0000 + + New versio of dsp files + +Author: maartenkeijzer +Date: Wed Jan 16 14:52:11 2002 +0000 + + Increased template depth + +Author: evomarc +Date: Thu Dec 20 18:04:52 2001 +0000 + + There was an error in the type of the first parameter of make_checkpoint and + make_algo_scalar (changed from eoParameterLOader to eoParser) + +Author: evomarc +Date: Fri Dec 7 06:28:38 2001 +0000 + + COnverted t_eoesall to CRLF line terminators (otherwise MSDEV cannot read properly) + +Author: evomarc +Date: Fri Dec 7 06:23:15 2001 +0000 + + Adding t_eoesall that somehow ahd managed to escape until now + + corrected the template test_dsp.tmpl + +Author: evomarc +Date: Fri Dec 7 06:14:11 2001 +0000 + + Adding the tutorials in MSVC project files + +Author: evomarc +Date: Fri Dec 7 05:51:36 2001 +0000 + + Removed all references to CrtDebug blabla that were supposed to be + MSVC specific but generated an error with MSVC 6.0 + +Author: evomarc +Date: Thu Dec 6 14:33:42 2001 +0000 + + Need to put the \r\n at end of all files after modifications!!! + +Author: evomarc +Date: Thu Dec 6 14:32:00 2001 +0000 + + Removed unknown CrtDebug directives from the MSVC version + +Author: evomarc +Date: Thu Dec 6 13:12:24 2001 +0000 + + Removed unnecessary dirs, added first Lesson of tutorial + +Author: evomarc +Date: Thu Dec 6 11:36:39 2001 +0000 + + Removed some sources that came here nobody know's how (thanks, MSDEV) + +Author: evomarc +Date: Thu Dec 6 07:02:07 2001 +0000 + + Changed ALL names of links to class files in the documentation due to the change in + Doxygen naming convention + +Author: evomarc +Date: Thu Dec 6 06:44:44 2001 +0000 + + A few corrections before the big name change + +Author: evomarc +Date: Thu Dec 6 06:38:17 2001 +0000 + + CHanged a few erroneaous comments + +Author: evomarc +Date: Wed Dec 5 06:54:38 2001 +0000 + + Added GNUPLOT protection for MSVC compiler + +Author: jeggermo +Date: Tue Dec 4 21:15:16 2001 +0000 + + some template classes and functions which did not need + to be templates have been changed to normal classes and functions + with hard coded typed + + This might help with M$VC++ 6.0 compatibility + +Author: jeggermo +Date: Tue Dec 4 11:49:25 2001 +0000 + + a different solution for lt_arity has been implemented (this time inside the + eoParseTreeDepthInit class + +Author: evomarc +Date: Mon Dec 3 16:40:32 2001 +0000 + + Renamed mastermind.cc into mastermind.cpp for MSVC + +Author: evomarc +Date: Mon Dec 3 16:38:52 2001 +0000 + + Renamed main.cc into main.cpp for MSVC + +Author: evomarc +Date: Mon Dec 3 16:35:51 2001 +0000 + + Renamed gprop.cc into gprop.cpp for MSVC + +Author: evomarc +Date: Mon Dec 3 16:28:30 2001 +0000 + + Modified the path of include eoVirus because MSVC did not find it. + Now it is assumed that src will be in the include search path, that's all. + +Author: evomarc +Date: Mon Dec 3 14:31:35 2001 +0000 + + MSVC didn't find (easily) the contrib/MGE dir. So now it's written in the code + and the Makefile.am does not have contrib in the include look path + +Author: evomarc +Date: Mon Dec 3 14:20:24 2001 +0000 + + Added partial specialization of lt_arity .. + +Author: evomarc +Date: Mon Dec 3 14:14:56 2001 +0000 + + Added the 2 fake "projects" all_lib.dsp and all_test.dsp that allow to compile + everything in 2 clics. + However, we still cannot run and watch the status output of the test executables + +Author: evomarc +Date: Mon Dec 3 11:08:17 2001 +0000 + + More details to make code MSVC-compatible + +Author: evomarc +Date: Mon Dec 3 06:59:17 2001 +0000 + + Added links to some examples in the comments + +Author: evomarc +Date: Mon Dec 3 06:56:43 2001 +0000 + + Removed dir win from list of subdirs (generated an error in make check) + +Author: evomarc +Date: Mon Dec 3 06:53:52 2001 +0000 + + Removed the trailing comment after #endif (Warning in MSVC) + +Author: jeggermo +Date: Thu Nov 22 15:01:11 2001 +0000 + + Fixed a small problem with eoPointMutation. + +Author: evomarc +Date: Sun Nov 18 07:18:11 2001 +0000 + + Introductory comment evolves ... + +Author: evomarc +Date: Sun Nov 18 06:54:13 2001 +0000 + + Added the names of the directories where the newly created files are stored. + +Author: evomarc +Date: Sat Nov 17 08:13:55 2001 +0000 + + Now the eo.dsw can be generated automatically from + eo.org + create_all_dsp.sh (that calls create_dsp.sh) + To add a new test program, simpy add 1 line in create_all_dsp.sh + and run it. + DO NOT TOUCH eo.org !!! + +Author: evomarc +Date: Sat Nov 17 07:58:16 2001 +0000 + + imply put all program names on one single line to ease bulding the win files + +Author: evomarc +Date: Sat Nov 17 07:55:39 2001 +0000 + + Bug in create_dsp when no additional library + +Author: evomarc +Date: Sat Nov 17 07:54:12 2001 +0000 + + Turned bonary_value into the onemax (not pow that exploded for even only + moderately small size of genome!) + Turned it into a double (it was a float) as floats are dead and should dissappear + +Author: evomarc +Date: Sat Nov 17 07:22:59 2001 +0000 + + Changes due to MSVC + +Author: evomarc +Date: Fri Nov 16 15:06:29 2001 +0000 + + Some error for MSVC that was not even a warning for g++ (but I'm sorry + to say that MSVC is right :-) + +Author: evomarc +Date: Fri Nov 16 15:05:41 2001 +0000 + + Changed the filenaming to comply with MacroHard + +Author: evomarc +Date: Fri Nov 16 15:02:35 2001 +0000 + + Error in argments check + +Author: evomarc +Date: Fri Nov 16 14:32:07 2001 +0000 + + The file eo.org is the base project file (no file in test involved). + It is upgraded by the create.sh script + +Author: evomarc +Date: Fri Nov 16 14:30:58 2001 +0000 + + Adding all test files for MSVC + +Author: evomarc +Date: Fri Nov 16 14:01:52 2001 +0000 + + Replaced the flat definitions of ncecessary classes (eoStatxxx and eoMonitor) + with the include of the corresponding .h file. as MSVC complained! + +Author: jeggermo +Date: Thu Nov 15 22:11:31 2001 +0000 + + small change in documentation + +Author: evomarc +Date: Mon Nov 12 16:27:37 2001 +0000 + + Announcing the MSVC++ compatibility revisited + +Author: evomarc +Date: Mon Nov 12 15:21:40 2001 +0000 + + A few more typename conditionally removed for MSVC++ + +Author: evomarc +Date: Mon Nov 12 14:59:32 2001 +0000 + + Adding Jeroen :-) + +Author: evomarc +Date: Mon Nov 12 14:51:51 2001 +0000 + + A readme for the win dir ... + +Author: evomarc +Date: Mon Nov 12 14:44:01 2001 +0000 + + Create.sh mdified to also add the new dsp file into eo.dsw + +Author: evomarc +Date: Mon Nov 12 14:27:12 2001 +0000 + + Template file for dsp project files (to be used within create_dsp.sh) + +Author: evomarc +Date: Mon Nov 12 14:17:58 2001 +0000 + + Some more small changes for MSVC++ compatibility + +Author: evomarc +Date: Sun Nov 11 06:59:42 2001 +0000 + + Adding the dsp file for t-eoReal - testing the create_dsp script. + Next step is to add them all from the test/Makefile file + +Author: evomarc +Date: Sun Nov 11 06:55:12 2001 +0000 + + Create_dsp.sh is a script that will create the .dsp file from a source file + name in the test dir + +Author: evomarc +Date: Sun Nov 11 06:43:45 2001 +0000 + + Improved the UI a lot (checking for already existing files, etc) + +Author: evomarc +Date: Sat Nov 10 14:13:21 2001 +0000 + + Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIAC + +Author: evomarc +Date: Sat Nov 10 14:12:01 2001 +0000 + + Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIA + +Author: evomarc +Date: Sat Nov 10 09:02:17 2001 +0000 + + Small modifications here and there to be MSVC++ compatible + Mainly, time.h -> ctime + definition of loop index out of loops when multiply used + no typename in declaration using template typename + +Author: evomarc +Date: Sat Nov 10 06:59:02 2001 +0000 + + Added the #pragma directive for MSVC++ in all .cpp + +Author: evomarc +Date: Sat Nov 10 06:32:05 2001 +0000 + + Added the invalidate() call - that bug was not seem before, because + we always used init on newborn genotypes! + +Author: maartenkeijzer +Date: Thu Nov 8 11:13:19 2001 +0000 + + Cleaned up + +Author: maartenkeijzer +Date: Thu Nov 8 10:17:52 2001 +0000 + + removed the return 1 in the main + +Author: evomarc +Date: Thu Nov 8 07:40:27 2001 +0000 + + Adding Distribution-based base abstract classes + +Author: evomarc +Date: Thu Nov 8 06:53:55 2001 +0000 + + Adding PBIL + +Author: evomarc +Date: Thu Nov 8 06:49:38 2001 +0000 + + Adding PBIL files - simple PBIL algorithm with simple additive update rule + +Author: evomarc +Date: Thu Nov 8 06:14:59 2001 +0000 + + I have changed all calls to use an eoParser rather than an eoParameterLoader + This is required if you want to use the method getParamWithLongName that allows + one to get a value of a parameter read somewhere else. + After changing 3 calls due to that, I decided to change ALL calls within + the make_xxx functions + +Author: evomarc +Date: Wed Nov 7 16:25:01 2001 +0000 + + Corrected a bug in the selector and replacement tournamemt parameter reading: + if you did not give the tournament sizes, the program either crashed or went + in some endless loop. + I also simplified the reading of those eoParamPram parameters! + +Author: maartenkeijzer +Date: Wed Nov 7 15:23:24 2001 +0000 + + Updated makefile.am such that "make check" will run all test programs. Fixed + a number of erronuous return values that made the script fail. What's left + is let Marc clean up the mess he made with t-eoReal and t-eoRealAllESAllAgain + +Author: maartenkeijzer +Date: Wed Nov 7 10:57:53 2001 +0000 + + Fixed call to inverse_stochastic inside eoDetTournament + +Author: evomarc +Date: Mon Nov 5 16:38:52 2001 +0000 + + Added method + eoParam* getParamWithLongName(std::string _name); + so now you can get a parameter in another place than where it was defined + just by giving its name + +Author: maartenkeijzer +Date: Mon Nov 5 14:28:14 2001 +0000 + + Just some comments + +Author: evomarc +Date: Mon Nov 5 08:24:59 2001 +0000 + + Small error in header + +Author: jeggermo +Date: Sat Nov 3 22:10:11 2001 +0000 + + the name of the eoGpDepthInitializer class (initializer for + parse_tree's has been changed to + + eoParseTreeDepthInit but backward compatibility is maintained by + using a #define statement: + + #define eoGpDepthInitializer eoParseTreeDepthInit + + The initializer for strongly typed GP has been changed to + eoStParseTreeDepthInit + + the gpsymreg application has been changed to use the new name + +Author: jeggermo +Date: Thu Oct 25 10:39:55 2001 +0000 + + Some changes for using EO with libstdc++V3 and gcc-3.01 + +Author: jeggermo +Date: Fri Oct 19 12:04:12 2001 +0000 + + The nameless union in node.h has been removed because not all compilers + support it. + +Author: evomarc +Date: Thu Oct 18 11:48:52 2001 +0000 + + Replaced pushd and popd with cd and cd .. - for Windows/Cygwin compatibility + +Author: jeggermo +Date: Thu Oct 18 08:52:40 2001 +0000 + + Some changes to make gpsymreg compile correctly on windows/cygwin systems + +Author: evomarc +Date: Thu Oct 18 05:30:45 2001 +0000 + + Added MAXFLOAT and MINFLOAT as it seems that Cygwin needs that ??? + +Author: evomarc +Date: Thu Oct 18 04:57:30 2001 +0000 + + iAdding a file config.cache as it seems that the defaults don't work + in Windows/Cygwin environement. Thanks to Sebastiao CORREIA and + Jerome JEAN-CHARLES for providing this file. + +Author: evomarc +Date: Thu Oct 18 04:37:14 2001 +0000 + + All files on one line in Makefile.am (for Windows) + +Author: evomarc +Date: Thu Oct 18 04:34:58 2001 +0000 + + Modified the Makefile.am in main dir, and Makefile in tutorial dir to remove + all pushd/popd as they don't exist in Windows/bash + +Author: evomarc +Date: Wed Oct 17 17:49:54 2001 +0000 + + Corrected a few small problems - including dependencies in Makefile + thanks to Sebastiao CORREIA for pointing them out + +Author: evomarc +Date: Wed Oct 17 17:48:50 2001 +0000 + + Corrected a few small problems - + thanks to Sebastiao CORREIA for pointing them out + +Author: evomarc +Date: Mon Oct 8 09:14:15 2001 +0000 + + Removed trailing text after #endif - causes warning on many compilers + +Author: jeggermo +Date: Fri Oct 5 12:39:30 2001 +0000 + + ramped half and half initialization procedure for eoParseTree populations + added. + +Author: jeggermo +Date: Fri Oct 5 09:32:49 2001 +0000 + + Since g++ 2.95.x on our solaris server doesn't have macros to check + for infinity and NaN these checks have been removed from the source code + and a protected divided function node is now used. + +Author: evomarc +Date: Fri Oct 5 03:56:21 2001 +0000 + + Forgot to double also the parameter to initialize in the Ctor! + +Author: evomarc +Date: Fri Oct 5 03:51:15 2001 +0000 + + Modified the reseed method in RNG class so two different seeds give different + sequences, after Jeroen's remark (jeggermo@liacs.nl) + +Author: evomarc +Date: Fri Oct 5 03:30:12 2001 +0000 + + Commented out the oeprator() default function in base class: I find it more secure + to be warned at compile time that one function is still pure virtual + than to look for the error after a run-time-error that gives no clue + +Author: evomarc +Date: Thu Oct 4 20:13:03 2001 +0000 + + eoMyStructEA.cpp has turned into MyStructEA.cpp + +Author: evomarc +Date: Thu Oct 4 20:12:19 2001 +0000 + + Big modifications - now the init and most important the operators + are handled in separate files make_genotype_xxx and make_op_xxx + as it was done in the examples of Lesson4 + +Author: evomarc +Date: Mon Sep 24 05:59:42 2001 +0000 + + Suppressed most warning (except some unused variables) if you don't modify anything + +Author: evomarc +Date: Mon Sep 24 05:59:13 2001 +0000 + + Suppressed most warning (except some unused variables) if you don't modify anythig + +Author: evomarc +Date: Sat Sep 8 05:59:17 2001 +0000 + + Removed trailing string after #endif - it generates a lot of useless warning + on some versions of g++ + +Author: evomarc +Date: Sat Sep 8 05:42:24 2001 +0000 + + Added newline at end of file (prevents a warning) + +Author: evomarc +Date: Sat Sep 8 05:41:19 2001 +0000 + + Added include math.h + +Author: evomarc +Date: Tue Sep 4 08:35:22 2001 +0000 + + Added many template files, and totally modified the comments in most other. + This was when preparing Evonet Summer School - though it finally was not used there! + +Author: evomarc +Date: Tue Sep 4 06:51:59 2001 +0000 + + Modified the className() method so that the Atom underlying operator is listed + +Author: evomarc +Date: Tue Sep 4 06:50:42 2001 +0000 + + Included apply.h for consistency (though in most cases it was included from eo file + +Author: evomarc +Date: Tue Sep 4 06:48:15 2001 +0000 + + Added a class that turns an eoInit into a generator of EOT + Also added a Ctor of variable length objects that take an eoInit. + Some day we might want to clean all that stuff ... unless we leave + the choice to the user (but then the documentation shoudl be as clear + as glass, which it is not at the moment!) + +Author: evomarc +Date: Tue Sep 4 06:45:14 2001 +0000 + + In case you are trying to assign a value to a vector of different size, + previous versions raised an exception. + Now a simple warning is written to stderr - as it might be something + you need to do. + +Author: evomarc +Date: Tue Sep 4 06:43:19 2001 +0000 + + Added make_help in checkpointing, included stdexcept in eoParam. Comments + updates ... + +Author: evomarc +Date: Tue Sep 4 06:41:34 2001 +0000 + + Spotted and commented (but NOT corrected :-( a bug in case the ResDir + exists and is empty + +Author: evomarc +Date: Tue Sep 4 06:40:28 2001 +0000 + + Corrected wrong arguments for the 2D Ctor + +Author: evomarc +Date: Tue Sep 4 06:37:25 2001 +0000 + + Comments update + +Author: evomarc +Date: Tue Sep 4 06:35:58 2001 +0000 + + Changed the wrong #ifdef in make_algo_scalar (+ minor comments elsewhere) + +Author: jeggermo +Date: Tue Jul 17 13:06:28 2001 +0000 + + check for the existence of isinf didn't work the way it should so + it has been removed + +Author: jeggermo +Date: Tue Jul 17 08:58:52 2001 +0000 + + small documentation change for eoParseTree.h. + + added a depth initializer for strongly typed genetic programming + added subtree xover for strongly typed genetic programming + added branch mutation for strongly typed genetic programming + added point mutation for strongly typed genetic programming + added hoist mutation for strongly typed genetic programming + +Author: evomarc +Date: Wed Jul 11 06:26:11 2001 +0000 + + Suppressed the gene mutations, as they are now in eoFlOrMonOp.h + +Author: evomarc +Date: Wed Jul 4 04:59:02 2001 +0000 + + Oups! + +Author: evomarc +Date: Wed Jul 4 04:44:30 2001 +0000 + + Adding eoPopEvalFunc, that handles evaluation globally: it receives + two populations, parents and offspring, and does whatever necessary. + The subclass eoPopLoopEval does the simple loop on the offspring. + + eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, + but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. + +Author: evomarc +Date: Tue Jul 3 12:56:44 2001 +0000 + + Added the eoPopEvalFunc class: gets the full parents + offspring populations + in order to evaluate them. + Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as + before (it is then encapsulated into an eoPopLoopEval that does the good + old loop on the offspring - or directly pass a full eoPopEvalFunc + + Small modification also in make_op_es -> keyword "none" is now recognized + for one of the crossover of either object variables or stdev's + +Author: jeggermo +Date: Mon Jul 2 13:31:04 2001 +0000 + + Changed the directory structure for gp + now: eoParseTree <-- the eoParseTree class + eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) + eoParseTreeOp <-- the operators (xover and mutation) + + base documentation written for: + * eoParseTree + * eoGpDepthInitializer + * eoSubtreeXOver + * eoBranchMutation + * eoPointMutation + * eoExpansionMutation + * eoCollapseSubtreeMutation + * eoHoistMutation + + I also created a group ParseTree which contains all classes related to eoParseTree + + eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp + +Author: jeggermo +Date: Mon Jul 2 11:38:27 2001 +0000 + + The constructor for the eoGpDepthInitializer has been extended with a + sort of the initializor vector containing all possible nodes. This sort + assures that the terminals are in the front of vector. Untill now this + was assumed but not checked or enforced. + +Author: jeggermo +Date: Mon Jul 2 08:28:40 2001 +0000 + + eoSubtreeXOver fixed + +Author: evomarc +Date: Sat Jun 30 05:59:26 2001 +0000 + + Added random selection + +Author: evomarc +Date: Sat Jun 30 05:57:10 2001 +0000 + + Corrected a wrong comment + +Author: maartenkeijzer +Date: Fri Jun 29 18:06:10 2001 +0000 + + oops, thanks jeroen + +Author: jeggermo +Date: Fri Jun 29 12:15:15 2001 +0000 + + checks for the existence of finite(x) and isinf(x) built into app/gpsymreg. + Linux gcc compilers have the 'macros ??' but solaris gcc does not + +Author: jeggermo +Date: Fri Jun 29 09:22:26 2001 +0000 + + app/gpsymreg/Makefile added to configure.in + +Author: jeggermo +Date: Thu Jun 28 15:03:53 2001 +0000 + + app/gpsymreg/Makefile added to configure.in + +Author: jeggermo +Date: Thu Jun 28 14:39:36 2001 +0000 + + addition file for parameters for symreg gp + +Author: jeggermo +Date: Thu Jun 28 14:38:00 2001 +0000 + + node.h containing Tree-node classes for symreg gp + +Author: jeggermo +Date: Thu Jun 28 14:33:51 2001 +0000 + + main.cc for symreg gp + +Author: jeggermo +Date: Thu Jun 28 14:26:35 2001 +0000 + + gp symbolic regression trees added + +Author: jeggermo +Date: Thu Jun 28 14:18:47 2001 +0000 + + eoGpMutate.h added containing 4 new mutation operators for eoParseTree class + +Author: jeggermo +Date: Thu Jun 28 14:11:04 2001 +0000 + + Symbolic Regression GP added app-dir + +Author: jeggermo +Date: Thu Jun 28 14:03:59 2001 +0000 + + new Mutation operators for eoParseTree in src/gp/eoGpMutate.h + + a symbolic regression example program added to the app-dir + + configure.in and Makefile(s).am changed + +Author: jeggermo +Date: Thu Jun 28 13:55:14 2001 +0000 + + Additional mutation operators for eoParseTree + + * Point Mutation + * Expansion Mutation + * Collapse Subtree Mutation + * Hoist + +Author: jmerelo +Date: Thu Jun 21 12:03:17 2001 +0000 + + Updating Royal Road + +Author: maartenkeijzer +Date: Mon Jun 11 12:37:21 2001 +0000 + + Added a check for an empty initializor + +Author: evomarc +Date: Fri May 25 16:27:59 2001 +0000 + + Added a frequency parameter to eoPopStat (dump pop every N gen) + +Author: evomarc +Date: Mon May 21 06:13:56 2001 +0000 + + Forgot to update ESEA with crossover + +Author: evomarc +Date: Mon May 21 04:16:26 2001 +0000 + + ? + +Author: evomarc +Date: Mon May 21 04:15:36 2001 +0000 + + Added libes in Makefile + +Author: evomarc +Date: Mon May 21 04:14:36 2001 +0000 + + Modifs in es (crossover added in make_op_es). + Added a dummy selector in eoReandomSelect that does work even with invalid EOs + +Author: evomarc +Date: Mon May 21 04:13:10 2001 +0000 + + Added the crossover in make_op_es (parameters were read, but that's all! + +Author: evomarc +Date: Mon May 21 04:10:55 2001 +0000 + + Normalized real_value + +Author: evomarc +Date: Sat May 19 06:15:01 2001 +0000 + + Changed name of eoEsLocalXover to eoEsStandardXover and made it an eoBinOp + Removed obsolete eoEsStdevXOver.h (see eoEsStandardXover.h above) + +Author: evomarc +Date: Fri May 18 17:46:33 2001 +0000 + + Coreected a cut-and-paste bug :-( + +Author: jmerelo +Date: Fri May 18 07:33:12 2001 +0000 + + Added the missing file + +Author: evomarc +Date: Fri May 18 03:59:22 2001 +0000 + + Removed remaining debugging comment + +Author: jmerelo +Date: Thu May 17 10:08:25 2001 +0000 + + Changed MGE to the contrib dir. No need to change the prefix, I guess + +Author: jmerelo +Date: Thu May 17 07:29:50 2001 +0000 + + Added missing files and updated old MGE files + +Author: jmerelo +Date: Fri May 11 10:44:01 2001 +0000 + + Added Royal Road, MGE now work with it, small modifications to eoPopStat + +Author: jmerelo +Date: Thu May 10 12:16:00 2001 +0000 + + Added 'Viral' operators with test. Implements the Mobile Genetic Elements Technique + +Author: evomarc +Date: Tue May 8 04:44:30 2001 +0000 + + CHanged CXXFLAGS to nothing - so lib files remain of manageable size! + +Author: evomarc +Date: Tue May 8 04:41:51 2001 +0000 + + Bing change in eoRealBounds: it is now deriving from eoPersistent. + More important, the eoRealVectorBounds, vectorized version (a vector + has also become an eoPersistent object and now derives from an eoRealBaseVectorBounds + class. + A useful consequence (and actual motivatino) was to be able to have soem + eoValueParam with all possibilities for input + (see doc for Lesson4 in the tutorial for the syntax). + +Author: evomarc +Date: Tue May 8 03:49:35 2001 +0000 + + In eoParser::readFrom, added a test to avoid reading non-parser sections + as these generally contain many -xxx that generate a reading error + when xxx is not a keyword. + This allows to use State-savec files directly as parameter files + +Author: evomarc +Date: Mon May 7 07:13:36 2001 +0000 + + Replaced stupid eoRateParam by eoValueParam + Had to transform eoHowMany into an eoPersistent ... + +Author: evomarc +Date: Fri May 4 16:51:29 2001 +0000 + + A full working version of ES is now available in tutorial/Lesson4, + that makes full use of libes.a. + The user guide is in Lesson4 of the tutorial - programmer's guide + will come later. + Plus many small changes here and there + +Author: evomarc +Date: Fri May 4 16:13:37 2001 +0000 + + Removing old trash! + +Author: evomarc +Date: Thu May 3 17:20:27 2001 +0000 + + Corrected a problem in eoEsChromInit (it refused plain eoReal) + some + other minor modications (e.g. a dir in make_checkpoint where ALL file + will go). + +Author: evomarc +Date: Thu May 3 13:06:34 2001 +0000 + + Adding code to Lesson4 + +Author: evomarc +Date: Thu May 3 05:44:29 2001 +0000 + + Lesson4 advancing + +Author: evomarc +Date: Thu May 3 05:43:40 2001 +0000 + + Hange of comments and names + +Author: evomarc +Date: Wed May 2 11:13:40 2001 +0000 + + Updated main pages of doc and tutorial. Doc now points to tutorial + +Author: evomarc +Date: Wed May 2 11:12:55 2001 +0000 + + Date change + info about Lesson4 in main tutorial page + +Author: evomarc +Date: Wed May 2 11:09:57 2001 +0000 + + Adding test file for ES - note that it's completely different from old + eoESFull.cp - and hence has an other name, t-eoESAll.cpp. + Old eoESFull.cp is still there (and working) but is not in the test targets + +Author: evomarc +Date: Wed May 2 10:57:35 2001 +0000 + + Adding files in es for ES Crossovers + +Author: evomarc +Date: Wed May 2 10:54:17 2001 +0000 + + Forgotten file ... + +Author: evomarc +Date: Wed May 2 10:53:14 2001 +0000 + + Forgotten new file + +Author: evomarc +Date: Wed May 2 10:50:01 2001 +0000 + + Added the new eoEsXXXover.h in Malefile.am + +Author: evomarc +Date: Wed May 2 10:47:56 2001 +0000 + + Forgotten ES files + start of tutorial Lesson4 (about make_XXX) + +Author: evomarc +Date: Wed May 2 10:42:32 2001 +0000 + + Adding Evolution Strategies: + src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover + src/es/make_XXX_es.h for user-input + test/t-eoEsAll.cpp to test + + However, an old bug appeared: className was not const in eoGenOp (and derived classes) + so I had to change that throughtout the hierarchy + +Author: evomarc +Date: Tue May 1 05:00:29 2001 +0000 + + Removing make_help.cpp + +Author: evomarc +Date: Mon Apr 30 13:24:42 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) + Changed the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain + a copy into each representation dir!). + +Author: evomarc +Date: Mon Apr 30 13:01:07 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) + Changed the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain + a copy into each representation dir!). + +Author: evomarc +Date: Mon Apr 30 12:26:31 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed ga.h in src/ga into make_ga.h (was ambiguous with src/ga.h) + Chenged the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + +Author: evomarc +Date: Mon Apr 30 09:26:37 2001 +0000 + + Changed EA basic image: + - caption changed from population-parents to parents-genitors + - quality improved (now 177Ko instead of 53 :-( + +Author: evomarc +Date: Sun Apr 29 05:03:05 2001 +0000 + + Re-introduced the old ctors for the mutations (for backward compatibility + with the tutorial :-( + +Author: evomarc +Date: Sat Apr 28 06:06:21 2001 +0000 + + Declarations for make_xxx_real.cpp files - for eoReal genotypes + Was previously es.h - now es.h is specifically for ES genotypes + +Author: evomarc +Date: Sat Apr 28 05:53:37 2001 +0000 + + Adding first bricks of ES algorithm - make_XXX_es.cpp + +Author: evomarc +Date: Sat Apr 28 05:47:18 2001 +0000 + + Added bounds to the real operators in make_XXX (and hence in t-eoReal) + +Author: evomarc +Date: Fri Apr 27 04:03:16 2001 +0000 + + Removed the -O2 from ga and es dirs - it takes waaaaaaaaaaaaay too much time + at least with g++ 2.95.3 + +Author: evomarc +Date: Thu Apr 26 15:47:37 2001 +0000 + + The declaratio file for all make_* + +Author: evomarc +Date: Thu Apr 26 15:35:30 2001 +0000 + + Removing eoRealBounds from Makefile.am + +Author: evomarc +Date: Thu Apr 26 15:31:48 2001 +0000 + + An initializer of eoReal that uses bounds + +Author: evomarc +Date: Thu Apr 26 15:27:48 2001 +0000 + + Adding all make_*_real.* - similar to ga stuff for eoReal (not ES yet) + +Author: evomarc +Date: Thu Apr 26 15:24:53 2001 +0000 + + Doing libes.a in src/es and adding t-eoReal.cpp in test + I had to move eoRealBounds to utils dir because of global objects + Some domino consequences here and there ... + +Author: evomarc +Date: Tue Apr 24 09:42:01 2001 +0000 + + Changed obscure comment into more detailed one + +Author: evomarc +Date: Tue Apr 24 05:13:10 2001 +0000 + + CLeaning up + +Author: evomarc +Date: Tue Apr 24 05:08:08 2001 +0000 + + Forgot the 2 representation dependent make_XXX.h + +Author: evomarc +Date: Tue Apr 24 05:05:09 2001 +0000 + + Adding eoEvalContinue + +Author: evomarc +Date: Tue Apr 24 05:03:54 2001 +0000 + + Cleaning up + +Author: evomarc +Date: Tue Apr 24 04:56:12 2001 +0000 + + eoEvalFuncCounter is now in a separate file + +Author: evomarc +Date: Tue Apr 24 04:52:04 2001 +0000 + + The new libga + Apart from big changes in the src/ga dir, and the addition of the src/do dir + it also generated a few changes here and there, e.g. some include file still + missing. Also removed some warning from some test files. + +Author: evomarc +Date: Fri Apr 13 08:57:40 2001 +0000 + + Few cosmetic modifs: + put the #define of some boolean in eoData.h + added some include that were missing (unnoticed because of include) + some checks in eoXXXTournamentSelect + +Author: evomarc +Date: Thu Apr 12 16:46:55 2001 +0000 + + Added eoCloneOps.h that contains ... cloning instances of eoXXXOp (all in + 1 file, sorry JJ). + Modified eo - also added a few comments there + +Author: evomarc +Date: Thu Apr 12 05:35:05 2001 +0000 + + Modified the default behavior of eoCountedStateSaver to save the final population. + So if you don't want any population save, don't use any eoCountedStateSaver. + +Author: evomarc +Date: Thu Apr 12 05:29:34 2001 +0000 + + Added a new boolean argument to the ctor of eoBitMutation: + you can now specify a rate-per-bit that will be normalized by the chromSize + +Author: evomarc +Date: Thu Apr 12 05:28:23 2001 +0000 + + Added a few "virtual" that were missing + +Author: evomarc +Date: Wed Apr 11 12:01:51 2001 +0000 + + Changed all variables named howmany into combien (French for how many) + because of a silly problem on Solaris (howmany seems to be some macro???) + +Author: evomarc +Date: Wed Apr 11 04:44:39 2001 +0000 + + Modified printOn so that parameters that are not set explicitely by the user + are commented out - but still appear. Uses the (now public and pure virtual + in the base class eoParameterLoader) method isItThere. + +Author: evomarc +Date: Tue Apr 10 15:08:09 2001 +0000 + + Added the pure virtual isItThere method in base class eoParameterLoader + Also made the corresponding isItThere method in eoParser public. + This allows one to test if the user did actually input a given parameter + and thus not to write it in the output if not - as we want the output + of printOn to be "as identical as possible" to the actual user input + +Author: evomarc +Date: Mon Apr 9 16:03:18 2001 +0000 + + eoCtrlCcontinue had a few remaining errors :-( + +Author: evomarc +Date: Mon Apr 9 15:28:24 2001 +0000 + + Modified the eoCtrlCContinue - had to create the eoCtrlCContinue.cpp + to make t-eoGA work (you should NOT have separate functions in .h files!) + I also included everything related to Ctrl C handling in #ifndef _MSC_VER + until someone tells me how to do it in MSVC + +Author: evomarc +Date: Mon Apr 9 14:20:48 2001 +0000 + + Sorry, last check in was a mistake + +Author: evomarc +Date: Mon Apr 9 08:52:41 2001 +0000 + + Commented some ====== that resulted in error when running autogen.sh + +Author: evomarc +Date: Thu Apr 5 16:47:54 2001 +0000 + + Added the continue.tmpl template - and modified the html pages accordingly + (though eoCheckPoint.html is still a long way to complete). + Added some comments in all template files - and replaced + the protected by private (don't remember why these were protected!!!). + +Author: evomarc +Date: Wed Apr 4 03:47:33 2001 +0000 + + Added the signal handling - see eoCtrlCContinue.h + I've disabled it in case of MSC as I don't know if this works there ... + + Also added a couple of "virtual" in the ga dir + +Author: evomarc +Date: Tue Apr 3 17:14:53 2001 +0000 + + eoOperators now is in sync with the last modif of eoPopulator by Maarten! + +Author: evomarc +Date: Tue Apr 3 17:14:08 2001 +0000 + + Modified the tempaltes to take into account + - the last modifications of the eopopulator class + - the include files (were totally missing in the old templates) + - JJ's demand for one class - one file :-) + +Author: jmerelo +Date: Tue Apr 3 10:08:08 2001 +0000 + + In eoVector, changed printOn and readFrom to virtual + +Author: maartenkeijzer +Date: Wed Mar 28 09:00:54 2001 +0000 + + eoParam, added specialization for eoValueParam::getValue + FDCStat and FileSnapshot: better error messageing + Scalar fitness: is now a vector of doubles + exercise3.1 added gnuplot again + + Don't know about eoCombinedContinue + +Author: evomarc +Date: Tue Mar 27 16:27:15 2001 +0000 + + Modified the names in eoPopStat! + Hoever, the way it's done now, the string gets TRUNCATED - and I dont' know why + +Author: evomarc +Date: Tue Mar 27 16:02:00 2001 +0000 + + Adding Maarten's "snippet" to dump the whole pop to the screen: eoPopStat.h + Modified utils/checkpointing accordingly. + Tested in tutorial/Lesson3/exercise3.1 + BTW, the eoFileSnapShot does not work any more - I've commented it out + and will look at that later... + +Author: maartenkeijzer +Date: Mon Mar 26 10:09:40 2001 +0000 + + NDSorting: changed exact ranking values to make check for front easier + eoRNG: changed nothing (did some debugging) + +Author: maartenkeijzer +Date: Fri Mar 23 12:24:39 2001 +0000 + + added test for printing population + +Author: maartenkeijzer +Date: Fri Mar 23 08:54:31 2001 +0000 + + let doxygen look into this dir + +Author: maartenkeijzer +Date: Fri Mar 23 08:53:48 2001 +0000 + + added + +Author: maartenkeijzer +Date: Thu Mar 22 16:23:56 2001 +0000 + + updated project number + +Author: maartenkeijzer +Date: Thu Mar 22 11:22:31 2001 +0000 + + oops + +Author: maartenkeijzer +Date: Thu Mar 22 10:51:16 2001 +0000 + + Changed the single objective shortcut calculation + +Author: maartenkeijzer +Date: Thu Mar 22 09:00:30 2001 +0000 + + temporarily added fitness_traits to keep people up to date with this proposal + +Author: jmerelo +Date: Wed Mar 21 13:35:10 2001 +0000 + + Added a new xover to varlenxover + +Author: jmerelo +Date: Wed Mar 21 13:09:47 2001 +0000 + + Added a new atommutator to Variable Length, and corrected some headers which had problems + +Author: jmerelo +Date: Wed Mar 21 12:10:13 2001 +0000 + + Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes + +Author: maartenkeijzer +Date: Wed Mar 21 11:09:29 2001 +0000 + + test paretofitness class + +Author: maartenkeijzer +Date: Wed Mar 21 11:08:27 2001 +0000 + + Few changes in setting up the algorithms. It now gives an example of how to + write factory functions + +Author: maartenkeijzer +Date: Wed Mar 21 10:55:22 2001 +0000 + + Changed a few things in the eoPerf2Worth classes, EO.h and eoSelectOne.h are functionally unchanged + +Author: maartenkeijzer +Date: Tue Mar 20 14:34:07 2001 +0000 + + Updated eoStat.h to also "do the right thing" when confronted with pareto style fitness + +Author: maartenkeijzer +Date: Fri Mar 16 14:19:11 2001 +0000 + + added help + +Author: maartenkeijzer +Date: Fri Mar 16 14:09:55 2001 +0000 + + Now look how perty t-eoPareto has become (though it doesn't do a proper mo modelling yet) + +Author: maartenkeijzer +Date: Fri Mar 16 13:11:32 2001 +0000 + + Some bugfixing in MO optimization and added empty check: target in tutorial + +Author: maartenkeijzer +Date: Fri Mar 16 12:09:36 2001 +0000 + + oops, ngens is now the nice 10 + +Author: maartenkeijzer +Date: Fri Mar 16 12:08:26 2001 +0000 + + Ok, made an eoParetoFitness class, which meant that I could roll back a few changes in EO.h (phew). + Also changed eoSelectFromWorth etc. + +Author: maartenkeijzer +Date: Fri Mar 16 11:48:32 2001 +0000 + + added + +Author: maartenkeijzer +Date: Thu Mar 15 14:11:24 2001 +0000 + + added dist and distdir targets + +Author: maartenkeijzer +Date: Wed Mar 14 12:47:14 2001 +0000 + + Using nd-sorting now + +Author: maartenkeijzer +Date: Wed Mar 14 12:46:37 2001 +0000 + + First go, does not do niching yet + +Author: maartenkeijzer +Date: Wed Mar 14 11:58:47 2001 +0000 + + OOPS, that was a major bug, letting non-dominating individuals dominate one another. + +Author: maartenkeijzer +Date: Wed Mar 14 10:14:27 2001 +0000 + + t-eoPareto now plots the evolving population and t-eoRandom check is slightly more strict + +Author: maartenkeijzer +Date: Wed Mar 14 10:13:27 2001 +0000 + + Added support for printing vector as a fitness + +Author: maartenkeijzer +Date: Wed Mar 14 10:12:37 2001 +0000 + + Added Multi-objective fitness monitoring added support for vector > in eoParam + and made eoFileSnapshot type-safe + +Author: maartenkeijzer +Date: Tue Mar 13 08:25:05 2001 +0000 + + Swapped linking order of utility libs + +Author: evomarc +Date: Tue Mar 13 05:25:51 2001 +0000 + + Just modified an wrong comment (after a too quick cut-and-paste) + +Author: maartenkeijzer +Date: Mon Mar 12 16:07:55 2001 +0000 + + Production of binop back to 1 + +Author: maartenkeijzer +Date: Mon Mar 12 16:04:18 2001 +0000 + + Added first batch of pareto based stuff + +Author: maartenkeijzer +Date: Mon Mar 12 16:03:08 2001 +0000 + + Added pareto based stuff + +Author: maartenkeijzer +Date: Mon Mar 12 16:00:58 2001 +0000 + + EO: added overloaded printing of fitness (for vectors and pairs) + + Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth + +Author: maartenkeijzer +Date: Mon Mar 12 14:27:31 2001 +0000 + + invalidating supported now + +Author: maartenkeijzer +Date: Sat Mar 10 14:02:23 2001 +0000 + + Changed the populator to be a) more efficient and b) more useable + + It is no longer derived from eoPop, it now gets a destination population. + This saves a lot of copying. The semantics has changed a little as well. It is + now an _infinite_ iterator. operator++ will *not* dispense new individuals, but + will merely stay at the end. To get a new indy, use operator*() as before. + + eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring + eoGeneralBreeder is changed to reflect the changes in eoPopulator + eoSequentialSelect now uses setup() rather than init() + +Author: maartenkeijzer +Date: Fri Mar 9 14:14:53 2001 +0000 + + Test for a ssga added. + +Author: maartenkeijzer +Date: Fri Mar 9 14:13:28 2001 +0000 + + Various bugs found and resolved. + +Author: maartenkeijzer +Date: Thu Mar 8 13:38:41 2001 +0000 + + radically simplified the Makefile.am, but this only works for headers (no idea what the problem is with sources) + +Author: maartenkeijzer +Date: Tue Feb 27 11:45:31 2001 +0000 + + put using eo::rng in top of file to help out gcc 2.91 + +Author: maartenkeijzer +Date: Tue Feb 27 11:44:28 2001 +0000 + + swapped order of libeo and libeoutils, gcc 2.91 did not like it + +Author: maartenkeijzer +Date: Tue Feb 27 11:43:06 2001 +0000 + + Made dtor virtual + +Author: evomarc +Date: Tue Feb 27 05:24:24 2001 +0000 + + Still modifying eoInit ... + +Author: evomarc +Date: Tue Feb 27 05:09:10 2001 +0000 + + Modified all init sequences in Lesson2 and Lesson3 - and all corresponding + files in html dir - after the return of eoRndGenerators and subsequent + modifications of eoInit + +Author: maartenkeijzer +Date: Mon Feb 19 12:23:13 2001 +0000 + + Modified eoInit so that it would use the eoRndGenerator base class. + To be able to use the primitive std::generate function, added a + set of wrappers in eoSTLFunctor.h that have the copy semantics most + STL functions expect (namely pass-by-value rather then pass-by-reference). + + Updated test/Makefile.am to also test t-eoRandom + +Author: evomarc +Date: Sun Feb 18 06:41:30 2001 +0000 + + Date and version number + +Author: evomarc +Date: Sun Feb 18 04:34:57 2001 +0000 + + Added the eo::rng (instead of rng) as default parameter to all calls. + Also t-eoRandom was abruptly aborting-> a min was greater than a max, and + exceptions were not being caught. + +Author: maartenkeijzer +Date: Sat Feb 17 10:51:31 2001 +0000 + + eoVector is back (eoFixedLength and eoVariableLength are gone) + + Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: + + eoNormalGenerator + eoUniformGenerator + eoBooleanGenerator + eoNegExpGenerator + + Note the suffix that are added to aid in determining what these classes do + +Author: evomarc +Date: Sat Feb 17 08:22:53 2001 +0000 + + Now takes into account the last (and last!) modification of the operator interace: + no more invalidate, but a bool returned for simple operators, and a better description + of the eoPopulator/eoOpContainer links. + +Author: evomarc +Date: Sat Feb 17 06:47:31 2001 +0000 + + Forgot the selector in the ctor + +Author: evomarc +Date: Sat Feb 17 06:42:20 2001 +0000 + + Modified crossover and mutation to account for the new interface (bool ...) + Added the genop.tmpl, template for general op, 3 cases, growing pop, + shrinking pop through erase, thrinking pop through extra selector + +Author: evomarc +Date: Fri Feb 16 18:00:18 2001 +0000 + + Added oine star at start of comment to have Doxygen process it !!! + +Author: maartenkeijzer +Date: Fri Feb 16 09:39:06 2001 +0000 + + works for me + +Author: evomarc +Date: Fri Feb 16 08:21:25 2001 +0000 + + The perf2worth major check in + 2 new important classes: eoPerf2Worth and eoSelectFromWorth + Instances of eoPerf2Worth are eoRanking and eoLinearFitScaling. + Coming soon (piece of cake now) are the niching strategies (sharing, clearing) + +Author: evomarc +Date: Fri Feb 16 05:06:17 2001 +0000 + + Only names modifications, to comply to EO strict rules :-) + +Author: maartenkeijzer +Date: Thu Feb 15 08:31:38 2001 +0000 + + reverted the max-to-produce initializer + +Author: evomarc +Date: Thu Feb 15 05:36:28 2001 +0000 + + Changed the default values for popsize, vecsize and maxgen so + the user has a chance to see something even on Pentium 10GHz :-) + +Author: evomarc +Date: Thu Feb 15 05:35:31 2001 +0000 + + Modified the comments so that all callses are documented by Doxygen + (a comment starting with // before the class definition is not taken into account) + Also updated the initial overall comment - + and waouw, doxygen generates links there, too! Cool. + +Author: evomarc +Date: Thu Feb 15 04:47:18 2001 +0000 + + +Author: maartenkeijzer +Date: Wed Feb 14 18:05:36 2001 +0000 + + updated the dsp, dsw files for the library + +Author: maartenkeijzer +Date: Wed Feb 14 18:01:30 2001 +0000 + + no need to keep these test functions here, will start new project in /test + +Author: maartenkeijzer +Date: Wed Feb 14 14:09:16 2001 +0000 + + Changed the return value to return what it got in + +Author: maartenkeijzer +Date: Wed Feb 14 10:35:26 2001 +0000 + + + Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, + without invalidating fitness. Added a set of invalidators to take over + that job (see for instance eoSGA and eoSGATransform how this can transparantly used) + + Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) + + Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor + exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) + and of course changed all the operators to reflect the change (and found a few that didn't + invalidate the fitness, thus really pointing out the advantage of the current approach) + +Author: jmerelo +Date: Tue Feb 13 22:39:56 2001 +0000 + + Just playing with the CVS variables + +Author: jmerelo +Date: Tue Feb 13 22:38:23 2001 +0000 + + Just playing with the CVS variables + +Author: jmerelo +Date: Tue Feb 13 22:35:07 2001 +0000 + + Moved out of the 'obsolete' directory a couple of honest classes, which didn't harm anybody; activated also in Makefile.am the program that tested them + +Author: maartenkeijzer +Date: Tue Feb 13 14:43:54 2001 +0000 + + Added a bit more documentation, more to follow (I hope) + +Author: maartenkeijzer +Date: Tue Feb 13 12:38:19 2001 +0000 + + fixed a bug: the parser now correctly parses parameters of the form + + -Pvalue + + This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply + ashamed to have created such an off-by-one error. + + Marc assumed this was wanted behaviour (so that it should read: -P=value) + I must admit that this is a logical conclusion, though it was merely a side-effect + of the error. To not force Marc to rewrite the tutorial and his way of working with + EO, I decided to make a feature out of the bug, so that now the parser will parse: + + -Pvalue + -P=value + + and of course the true and blue: + + -Parameter=value + + I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) + +Author: maartenkeijzer +Date: Tue Feb 13 10:35:47 2001 +0000 + + Just an update + +Author: maartenkeijzer +Date: Mon Feb 12 13:58:51 2001 +0000 + + Ok, updated the Makefile.am again to use the + + make check + + Command I picked up in the automake documentation (RTFM, you know) + + Tagged a lot of header functions in the GnuPlot files with 'inline', + so they can be used from more than one sourcefile. + + Ok, now the interesting news. Started a new library libga (not to be confused + with Matthew's GaLib). Here I suggest we put a fairly complete and configurable + genetic algorithm. Just to see how far we can stretch ourselves and also to have + a GA-componenent that can be used in other applications without having to rebuild + the entire thing. test/t-eoGA.cpp tests this library + +Author: maartenkeijzer +Date: Sun Feb 11 16:35:21 2001 +0000 + + run_tests is expanded to run everything (but only once yet, will have + to address this later). + t-eoSymreg is build to run for just a few generations, otherwise testing + it would be an excercise in patience. + +Author: maartenkeijzer +Date: Sun Feb 11 16:25:03 2001 +0000 + + Removed small bug in reading outside a buffer in eoParser::readFrom + + This caused the parser to crash when a simple flag of the form program -f + was given. + +Author: maartenkeijzer +Date: Sun Feb 11 16:01:47 2001 +0000 + + run_tests, add your own tests here + +Author: maartenkeijzer +Date: Sun Feb 11 15:58:55 2001 +0000 + + Test now is not build automatically, make test should be given explicitely, then a new script run_tests will be used to check if everything still works + +Author: maartenkeijzer +Date: Sun Feb 11 15:57:01 2001 +0000 + + Commented out the check for libtool, as we don't use it currently + +Author: evomarc +Date: Sat Feb 10 05:36:50 2001 +0000 + + Added matermind in SUBDIRS + +Author: jmerelo +Date: Fri Feb 9 16:52:06 2001 +0000 + + Minor bugs for Win quashed; fixed Win project files + +Author: maartenkeijzer +Date: Fri Feb 9 11:52:55 2001 +0000 + + Removed the -O2 flag from the makefile in the test directory. + Builds should go faster now. + +Author: evomarc +Date: Fri Feb 9 08:32:47 2001 +0000 + + Added a comment before eoPopulator class so it is documented! + +Author: evomarc +Date: Fri Feb 9 08:21:35 2001 +0000 + + Changed the first paragraph, added warning that it should be used on-line only + +Author: evomarc +Date: Fri Feb 9 05:52:44 2001 +0000 + + Big change in eoGeneralOp interface: left out! + +Author: evomarc +Date: Fri Feb 9 05:46:12 2001 +0000 + + Change in Makefile - but again it should be replaced with clean Makefile.am + +Author: evomarc +Date: Fri Feb 9 05:43:06 2001 +0000 + + The big GeneraoOp interface change - in test dir + +Author: evomarc +Date: Fri Feb 9 05:34:04 2001 +0000 + + Modified the Makefile of Lesson? to allow make all to also make the exercises + It need to be modified anyway into Makefile.am stuff + +Author: evomarc +Date: Fri Feb 9 05:28:33 2001 +0000 + + Removed eoEvolutionStrategy because it was based on eoGeneralOp old interface + +Author: evomarc +Date: Fri Feb 9 05:25:25 2001 +0000 + + Because it has not extension, I had forgotten to update the eo file itself! + Now reflects the change of eoGenOp interface and the changes of names in ga + +Author: evomarc +Date: Fri Feb 9 05:21:04 2001 +0000 + + Added the GnuPlotSnapshotMonitor, the eoScalarFitnessStat and eoFDCStat in checkpointing + +Author: evomarc +Date: Fri Feb 9 05:10:25 2001 +0000 + + Left-out from the big change of general op interface! + +Author: evomarc +Date: Fri Feb 9 05:09:26 2001 +0000 + + The BIG change of general operator interface + I also changed + - the eoQuadratic into eoQuad (as dicussed with Maarten) + - the eoBin into eoBit, with more appropriate names for the "binary" + operators (that can be unary!) as no one protested when I posted on + eodev list + +Author: evomarc +Date: Wed Feb 7 05:15:18 2001 +0000 + + Added the missing include of eoScalarFitness - mandatory due to + explicit specialization for eoParamValue > + +Author: evomarc +Date: Wed Feb 7 05:13:33 2001 +0000 + + Added the handling of generic operators in Combined Ops + +Author: evomarc +Date: Wed Feb 7 05:11:37 2001 +0000 + + Added the shuffle(vector) method + +Author: evomarc +Date: Wed Feb 7 05:04:24 2001 +0000 + + Added selection methods + eoBestSelect always return the best individual + eoSequentialSelect a selectOne version of eoDetSelect (uses an index to + return next offspring from sorted pop) + +Author: evomarc +Date: Thu Feb 1 05:27:36 2001 +0000 + + Forgotten a debug print + +Author: evomarc +Date: Thu Feb 1 05:17:16 2001 +0000 + + I had forgotten to add pipecom.h + Moreover, I got fed up with error due to const/non const, so I modified + PipeComSend to take a const argument. THe consequence is that it will not run + under plain C any more. + +Author: evomarc +Date: Wed Jan 31 18:38:39 2001 +0000 + + Added the monitoring facilities for snapshots (i.e. generating and plotting a new file + every generation) which is different from the continuous monitoring (same file/plot is + angemented every generation). + This lead to a number of modifications in many files in utils dir + + But now we can watch on-line + - fitness spreadout + - FDC plots + - multi-objective Pareto fronts (though the multi-objective sruff isn't there yet!) + +Author: evomarc +Date: Tue Jan 30 04:53:05 2001 +0000 + + Comments added to remove undocumented classes from Doxygen documentation + +Author: evomarc +Date: Mon Jan 29 10:25:44 2001 +0000 + + Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. + The former simply set values to the boundary values in case they are out + The latter allows to short-cut all bound-checks when no need + + SOme day I will put this in utils, and have a eoRealBounds.cpp in the + pre-compiled library + +Author: evomarc +Date: Sun Jan 28 07:31:34 2001 +0000 + + Modified to use eoRealBounds rather than eoEsObjectiveBounds + +Author: evomarc +Date: Sun Jan 28 07:27:12 2001 +0000 + + Error in src/Makefile.am + +Author: evomarc +Date: Sun Jan 28 07:02:27 2001 +0000 + + Actually removed eoEsObjectiveBounds.h and evolution_strategies + +Author: evomarc +Date: Sun Jan 28 07:00:41 2001 +0000 + + Added the includes ga.h and es.h + Removed the old eoEsObjectiveBounds and evolutionar_strategies from es dir + +Author: evomarc +Date: Sat Jan 27 08:38:31 2001 +0000 + + Added some comments so eoRealVectorBounds is documented + +Author: evomarc +Date: Sat Jan 27 08:20:39 2001 +0000 + + Following the change in includes (added ga.h and es.h everywhere pfuhh) + +Author: evomarc +Date: Sat Jan 27 07:46:07 2001 +0000 + + Added eoGenericRealOp.h that are the exact copy of the operators of eoReaOp.h, + but in generic format. + They are used at the omoment only in eoEsStdevXOver.h that calls a crossover + on the object variables, then a crossover on teh stdev vectors! + A piece of cake :-) + +Author: evomarc +Date: Sat Jan 27 07:43:58 2001 +0000 + + I have separated the include files into + eo everything that is general to any representation + es.h everything about real representation (in es dir) + ga.h everything related to bitstring representation (in ga dir) + + To be continued by gp.h, and ... + + This has lead to some slight modifications in test file eobin and all tutorial + examples files... + + I've also added in utils eoDistance, generic functor to compute distances, + including also the generic Euclidian distance + +Author: evomarc +Date: Sat Jan 27 07:41:46 2001 +0000 + + I have separated the include files into + eo everything that is general to any representation + es.h everything about real representation (in es dir) + ga.h everything related to bitstring representation (in ga dir) + + To be continued by gp.h, and ... + + This has lead to some slight modifications in test file eobin and all tutorial + examples files... + +Author: evomarc +Date: Sat Jan 27 07:33:55 2001 +0000 + + A few mistakes corrected - and some comments on the setup method + +Author: evomarc +Date: Fri Jan 26 18:26:30 2001 +0000 + + Added the bounds to all eoRealOp operators (and to the eoNormalMutation). + The eoESObjectiveBounds should soon dissapear!! + +Author: evomarc +Date: Fri Jan 26 17:12:13 2001 +0000 + + Typos in comments + +Author: evomarc +Date: Fri Jan 26 17:09:33 2001 +0000 + + Some includes were missing in eoPop and eoOp that I had not noticed before + trying to compile test/t-eoSymreg.cpp + +Author: evomarc +Date: Fri Jan 26 04:06:09 2001 +0000 + + Added eoRandomReduce + +Author: evomarc +Date: Thu Jan 25 16:14:25 2001 +0000 + + Full t-eoSelect file, that allows to test all selectors + feature: generation of files suitable for gnuplot to see how individual spread out + +Author: evomarc +Date: Thu Jan 25 16:13:15 2001 +0000 + + Added ranking selection (eoRankingSelect) and (linear) fitness scaling in + proportional selection (a completely different file, eoFitnessScalingSelect.h) + +Author: evomarc +Date: Wed Jan 17 05:29:54 2001 +0000 + + Modified the link to EO pages so that users can download the development + version - as no example works with the current snapshot + +Author: evomarc +Date: Tue Jan 16 09:49:46 2001 +0000 + + Added the shuffle method + +Author: evomarc +Date: Tue Jan 16 07:20:48 2001 +0000 + + Added the normal mutation - and the 1/5 mutation in FirstRealEA in Lesson2 + +Author: evomarc +Date: Tue Jan 16 07:20:02 2001 +0000 + + Added the normal and 1/5 mutations (file es/eoNormalMutation.h) + +Author: evomarc +Date: Tue Jan 16 07:18:45 2001 +0000 + + Added the normal mutation - and the 1/5 mutation + +Author: evomarc +Date: Tue Jan 16 05:52:01 2001 +0000 + + Added the eoRandomReduce class - hence I also added the shuffle method + in eoPop (I had been postponing that for a long time!) which in turn required + another class of random generator (whose operator() takes an unsigned as argument) + +Author: evomarc +Date: Fri Jan 12 21:31:42 2001 +0000 + + Corrected some error in variable name after last changes in method append + +Author: evomarc +Date: Thu Jan 11 11:02:37 2001 +0000 + + New versions of bounds for real variables. + Should supersede eoEsObjectiveBounds, whose name was misleading anyway + as this can be used in any REal-ceded GA for isntance + +Author: evomarc +Date: Thu Jan 11 10:48:31 2001 +0000 + + GOing to the generic operators: some additions (eoGeneric*) + and some modifications in eoFixedLength and eoVariableLength. + +Author: evomarc +Date: Tue Jan 9 03:33:16 2001 +0000 + + Added the eoSurviveAndDie comments. + Should be complete!!! + +Author: evomarc +Date: Tue Jan 9 02:17:28 2001 +0000 + + Added the namespace in description of RNGs (and corrected a few broken links) + +Author: evomarc +Date: Mon Jan 8 10:07:27 2001 +0000 + + Added the namespace eo for the global variable rng in eoRNG.cpp + Also added "using eo::rng" in eoRNG.h so nothing has to be modified. + We should gradually move to write eo::rng everywhere, and remove that using + directive to be almost full-proofed against possible name collision. + +Author: evomarc +Date: Mon Jan 8 09:52:15 2001 +0000 + + Added the descrition of evolution engines in eoEngine + and links to SGAI STL Web site in eoTutorial and eoProgramming + +Author: evomarc +Date: Fri Jan 5 14:42:48 2001 +0000 + + Removed a forgotten comment :-) + +Author: evomarc +Date: Fri Jan 5 08:50:01 2001 +0000 + + I'm not sure about whether the sourceforge list is equivalent to the onelist list, + so I finally ut both in README! + +Author: evomarc +Date: Fri Jan 5 08:17:11 2001 +0000 + + Put the sourceforge name for the mailing list + +Author: evomarc +Date: Fri Jan 5 07:30:34 2001 +0000 + + Updating installation ... + +Author: evomarc +Date: Fri Jan 5 07:20:45 2001 +0000 + + Correcting my previous errors ... + +Author: evomarc +Date: Fri Jan 5 07:10:25 2001 +0000 + + Trying to make the installation lighter, but the doc and the src + would not compile, with make doc or make src ... + +Author: evomarc +Date: Fri Jan 5 06:55:16 2001 +0000 + + Removed Lesson4 from Makefile - it is not there yet, and generates an error + +Author: evomarc +Date: Fri Jan 5 06:25:26 2001 +0000 + + Added a message about generating the documentation if you have doxygen + +Author: evomarc +Date: Fri Jan 5 06:24:53 2001 +0000 + + Removed doc from the SUBDIRS as most people don't have doxygen installed. + Now you need to type in "make doc" to generate the doc + +Author: evomarc +Date: Fri Jan 5 06:23:54 2001 +0000 + + Updated Makefile.am to account for the change of names in selectors + +Author: evomarc +Date: Fri Jan 5 05:48:16 2001 +0000 + + Changed the names of the exercise files to exerciseN.p - N lesson nb, p exercise nb + +Author: evomarc +Date: Fri Jan 5 05:44:35 2001 +0000 + + eoHowMany is now included in utils dir + +Author: evomarc +Date: Fri Jan 5 05:42:08 2001 +0000 + + Checking in the name changes in selection procedures. + This impacts on many files, creating new entries in src (the old ones are moved + to obsolete dir), modifying t-eoSymreg.cpp and t-eobin.cpp in test, + as well as gprop.cc and mastermind.cc in app dir (not to mention almost all + files in tutorial:-( + +Author: evomarc +Date: Fri Jan 5 05:41:26 2001 +0000 + + Trying to ci eoTutorial.html (there is a sticky tag that keeps bothering me ...) + +Author: evomarc +Date: Thu Jan 4 15:23:14 2001 +0000 + + I had removed the wrong file!!! + +Author: evomarc +Date: Thu Jan 4 15:21:18 2001 +0000 + + removed redundant index.html in html dir + +Author: evomarc +Date: Thu Jan 4 05:06:09 2001 +0000 + + Sorry: removed eoSGATransform, that is in eoSGA.h ... + +Author: evomarc +Date: Thu Jan 4 05:00:40 2001 +0000 + + Adding the selectin and replacement procedures + +Author: evomarc +Date: Tue Jan 2 13:31:40 2001 +0000 + + Adding t-eoSelect.cpp to test selection procedures. Modified Makefile.am accordingly + +Author: evomarc +Date: Tue Jan 2 13:27:11 2001 +0000 + + Adding eoDetSelect, deterministic batch selection, that copies the individuals + one after the other. Should shuffle them in between (TODO). + +Author: evomarc +Date: Tue Jan 2 07:54:12 2001 +0000 + + A few deatils + +Author: evomarc +Date: Tue Jan 2 07:35:56 2001 +0000 + + Still the same !@#$$%% modif due to egcs problems ... + +Author: evomarc +Date: Tue Jan 2 07:23:35 2001 +0000 + + Follow-up to the modif of SecondBitEA.cpp due to egcs... + +Author: evomarc +Date: Tue Jan 2 07:19:55 2001 +0000 + + A few details in the comments + +Author: evomarc +Date: Tue Jan 2 07:03:57 2001 +0000 + + I had to change the whole way the parameters are read, because EGCS did not + allow the nice constructs I had imagined (and compiled with g++) + - I removed the createParam method in Parser class - that was creating the parameters + on the heap. Not allowed to have a templatized method ??? + - I removed the subroutine read_param in SecondBitEA, as you need to create + permanent parameters (eoParser only holds references), and egcs did not allow + to create them by reference, i.e. in the line + eoValueParam & blablaParam(...); + + So now everything is done in the main_function, and 3 lines are needed to create + and read every paramter (sigh ...) + +Author: evomarc +Date: Wed Dec 27 11:37:05 2000 +0000 + + A few additions and corrections ... + +Author: evomarc +Date: Tue Dec 26 10:28:27 2000 +0000 + + Modified the help message for the short name (added the missing =) + +Author: evomarc +Date: Tue Dec 26 08:33:48 2000 +0000 + + Moved eoSGATransform into a separate file and added the dynamic version + (where arguments can be passed by value or by reference). + Modified eo accordingly + +Author: evomarc +Date: Tue Dec 26 07:42:09 2000 +0000 + + Modified the include list after the big eoReplacement changes + +Author: evomarc +Date: Fri Dec 22 15:13:54 2000 +0000 + + Had forgotten the section name of the parser.processParam call in the + definition fo the parameter. + +Author: evomarc +Date: Fri Dec 22 14:59:10 2000 +0000 + + Back to the 3 lines to declare a parameter and read it within the parser: + some compiler (egcs) don't like the createParam method in eoParser.h + +Author: evomarc +Date: Fri Dec 22 14:56:12 2000 +0000 + + Back to the 3 lines to declare a parameter and read it within the parser: + some compiler (egcs) don't like the createParam method in eoParser.h + Also removed the reference in parameters declarations (a cut-and-paste error). + +Author: evomarc +Date: Thu Dec 21 06:49:41 2000 +0000 + + Augmented the functors and STL parts - but I still would appreciate + help on the STL part! + +Author: evomarc +Date: Thu Dec 21 05:35:01 2000 +0000 + + Removed the silly reference for all parameters (cut-and-paste error!). + But the funny thing is that my compiler did not complain ... + +Author: evomarc +Date: Tue Dec 19 22:14:29 2000 +0000 + + Updated INSTALL and README to EO-specific instructions! + +Author: evomarc +Date: Tue Dec 19 18:43:25 2000 +0000 + + Update after the change in replacements + +Author: evomarc +Date: Tue Dec 19 18:42:41 2000 +0000 + + Added t-eoRepalcement.cpp, that tests all new replacement procedures + +Author: evomarc +Date: Tue Dec 19 18:41:19 2000 +0000 + + THe big eoReplacement update: + The interface for eoReplacement is now eoPop&, eoPop& + (i.e. no const) and the result must be in the first argument in the end. + + Hence it is possible to do SSGA and all intermediate replacmeent procedures + + The classes derived from eoMergeReduce.h are now in a separate file + The SSGA-like replcaement procedures are in eoReduceMerge.h + A more general replacement can be found in eoSurviveAndDie.h + (it could be made a littel more general - still open for upgrades). + + Also some accessors have been added to the eoPop (best and worse individuals) + + And include file eo has been updated + +Author: evomarc +Date: Tue Dec 19 18:32:09 2000 +0000 + + A few errors + local TOC at top of eoEngine + +Author: evomarc +Date: Tue Dec 19 18:18:08 2000 +0000 + + Bottom-Up/Top-Down modifs + +Author: evomarc +Date: Tue Dec 19 18:09:10 2000 +0000 + + A new util class to handle the rate/integer argument to selectors/replacement + +Author: evomarc +Date: Tue Dec 19 18:02:19 2000 +0000 + + Changed NoReplacement to GenerationalReplacement + +Author: evomarc +Date: Tue Dec 19 10:17:39 2000 +0000 + + Changed the "to-down / bottom-up" to "algorithm-based / component-based" + Also added all replacement procedures in eoEngine.html + and the general operator interface in eoOperators.html + +Author: evomarc +Date: Tue Dec 19 05:31:54 2000 +0000 + + A small detail ... + +Author: evomarc +Date: Sun Dec 17 07:49:55 2000 +0000 + + Updated teh INSTALL and README files that were really minimal!!! + +Author: evomarc +Date: Fri Dec 15 18:09:08 2000 +0000 + + Corrected a bad link + +Author: evomarc +Date: Fri Dec 15 17:01:11 2000 +0000 + + deleted trash file lesson1.ps + CVS ---------------------------------------------------------------------- + +Author: evomarc +Date: Fri Dec 15 16:57:37 2000 +0000 + + Added utils/eoGnuplot1DMonitor.h ni the list of includes + +Author: gustavoromero +Date: Mon Dec 11 09:28:40 2000 +0000 + + adding .deps + +Author: evomarc +Date: Fri Dec 8 15:10:13 2000 +0000 + + Adding Templates in dir tutorial, to hold some simple files that + only need to be filled by the user to code new items. + At the moment, only eoMonOp (in mutation.tmpl), and + eoBinOp and eoQuadOp (in crossover.tmpl) + +Author: evomarc +Date: Fri Dec 8 14:16:13 2000 +0000 + + Corrected a few bugs after the first "public" presentation + +Author: evomarc +Date: Thu Dec 7 09:56:00 2000 +0000 + + New base class eoUpdatable.h - for objects that need upates in eoCheckPoints + Also contains the class eoDynUpdater. They are eoUpdater, they receive an eoUpdatable + at construct time, and call their upate() method in their operator() method + +Author: gustavoromero +Date: Tue Dec 5 13:46:21 2000 +0000 + + small change + +Author: evomarc +Date: Tue Dec 5 05:27:12 2000 +0000 + + Removed trash file + +Author: evomarc +Date: Tue Dec 5 05:22:55 2000 +0000 + + Added virtual and const keywords all around - as I tried to use a derived + class for adaptive rates (see eoDynProportionalCombinedOp.h, at the moment + in the tutorial) + +Author: gustavoromero +Date: Mon Dec 4 19:26:19 2000 +0000 + + erasing comments + +Author: gustavoromero +Date: Mon Dec 4 19:10:20 2000 +0000 + + small improvements + +Author: evomarc +Date: Mon Dec 4 16:49:42 2000 +0000 + + Added normal mutation for reals, and corrected error of segment-> arithmetic + for the crossover operators + +Author: evomarc +Date: Mon Dec 4 15:01:31 2000 +0000 + + omment of line apply(pop, eval) was found misleading ... + +Author: evomarc +Date: Mon Dec 4 14:55:18 2000 +0000 + + - added the #define for eo_verbose (true) and eo_no_verbose (false) + - added the eoNormMutation, simple normal mutation for simple real variables + +Author: evomarc +Date: Mon Dec 4 14:53:59 2000 +0000 + + - added the #define for eo_verbose (true) and eo_no_verbose (false) + - added the eoNormMutation, simple normal mutation for simple real variables + Modified Files: + src/eo src/es/eoRealOp.h tutorial/Lesson2/FirstRealEA.cpp + tutorial/Lesson3/SecondBitEA.cpp + +Author: evomarc +Date: Mon Dec 4 06:58:43 2000 +0000 + + Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, + a method called lastCall is called for everything contained in that checkpoint + (stats, updaters and monitors). This can be extremely useful + - for stateSavers (see below) + - for monitoring things like rates of success of operators, where what you + are interested in is the final result only. + Added of course a virtual method lastCall that does nothing by default in classes + eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor + Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall + so you can ask that the state is saved at final population, whatever happens. + I also added the corresponding constructor to take this into account. + +Author: evomarc +Date: Mon Dec 4 05:55:59 2000 +0000 + + Added a comment so Doxygen documents it + +Author: evomarc +Date: Sat Dec 2 08:35:42 2000 +0000 + + eoStdoutMonitor -> eoFileMonitor to correct an abusive cut-and-paste! + +Author: evomarc +Date: Sat Dec 2 08:29:45 2000 +0000 + + Suppressed the warning for the need to create a link - see html files log. + +Author: evomarc +Date: Sat Dec 2 08:27:30 2000 +0000 + + Changed the links to the EO doc - removed the need for a (Unix) link from + tutorial/html dir to doc/ dir: it's simpler, and I was not able to do + the same thing in Windows anyway! + +Author: evomarc +Date: Sat Dec 2 08:21:18 2000 +0000 + + Changed the (abstract) name for fitness from F to FitT so it matches + that of file eoFixedLength.h - it is far clearer in the documentation + diagrams this way. + +Author: gustavoromero +Date: Fri Dec 1 19:13:12 2000 +0000 + + initial version of mastermind + +Author: gustavoromero +Date: Fri Dec 1 19:09:34 2000 +0000 + + adding a new terminator and a monitor + +Author: evomarc +Date: Fri Dec 1 18:26:16 2000 +0000 + + Corrected the outState.regiserObject(parser) ommission (see SecondBitEA.html) + +Author: evomarc +Date: Fri Dec 1 18:03:17 2000 +0000 + + I had dropped the parser from the outState - so I had to modify also + read_param to get it back! + +Author: evomarc +Date: Fri Dec 1 17:56:52 2000 +0000 + + Used spell-checker!!! + +Author: gustavoromero +Date: Fri Dec 1 15:46:07 2000 +0000 + + adding a lot of includes + +Author: gustavoromero +Date: Thu Nov 30 17:11:53 2000 +0000 + + small fix for uniform + +Author: evomarc +Date: Thu Nov 30 06:38:15 2000 +0000 + + Corrected a small bug (!): the -C=value was not processed correctly + as somebody forgot one character when counting up to ... 3 :-))) + +Author: evomarc +Date: Thu Nov 30 06:20:20 2000 +0000 + + Reversed the priority between command-line and parameter file + +Author: evomarc +Date: Thu Nov 30 06:11:49 2000 +0000 + + Moved eoCopyElite.h to obsolete dir - was redundant with eoMerge.h + +Author: evomarc +Date: Thu Nov 30 06:04:09 2000 +0000 + + Removed eoCopyElite.h, redundant with eoMerge.h + +Author: evomarc +Date: Thu Nov 30 04:44:32 2000 +0000 + + Added the tutorial SUBDIR + It works fine ... for make clean + But of course it would require some Makefile.am in each subdir of tutorial + and I am not sure I know what to put there... + +Author: gustavoromero +Date: Wed Nov 29 18:36:13 2000 +0000 + + sorry, old version was right + +Author: evomarc +Date: Wed Nov 29 18:19:57 2000 +0000 + + Initial version of the tutorial. + Warning: all Makefile's are hand-made, and will only work in Linux + +Author: evomarc +Date: Wed Nov 29 18:19:18 2000 +0000 + + dded teh comment about the link to be made from html to ../../doc + +Author: evomarc +Date: Wed Nov 29 18:06:09 2000 +0000 + + Initial version of the tutorial. + Warning: the Makefil is hand-made, and only works in Linux + +Author: evomarc +Date: Wed Nov 29 17:20:16 2000 +0000 + + An include file was missing!!! + I've inserted it in teh file actually - but if we go on with gnuplot, + it will need to be taken out again, and used in all other monitors + we will write using gnuplot (e.g. eoGnuplotWithErrorbarsMonitor, + eoGnuplotHistogramMonitor, ...). + +Author: evomarc +Date: Tue Nov 28 17:42:53 2000 +0000 + + Added eoProportionalCombinedOp.h + +Author: evomarc +Date: Tue Nov 28 17:41:41 2000 +0000 + + I added this very simple instance of operator proportional selector + for the tutorial - it is consistent with all other xxxCombined constructs. + However, I am not sure that Occam's razor will not make it widely used... + +Author: evomarc +Date: Tue Nov 28 17:17:19 2000 +0000 + + Added the class eoSGATransform: I break the one file / one class rule + a lot, but both are supposed to be used mainly in the tutorial, not + in real life :-) + +Author: evomarc +Date: Tue Nov 28 15:40:39 2000 +0000 + + Added fstream in the include files - I had an error message at some point! + +Author: evomarc +Date: Tue Nov 28 15:35:09 2000 +0000 + + Added a comment to stdout upon termination - so we know why we stop in case + of multiple criteria + +Author: evomarc +Date: Tue Nov 28 15:31:38 2000 +0000 + + Minor change of the default label + +Author: gustavoromero +Date: Tue Nov 28 13:36:29 2000 +0000 + + now works + +Author: evomarc +Date: Tue Nov 28 08:20:01 2000 +0000 + + Added a few comments so Doxygen documents all classes + +Author: evomarc +Date: Tue Nov 28 06:58:06 2000 +0000 + + This is the first attempt to use gnuplot through a fork to plot statistics. + At the moment it is only tested for Linux! + Use with care + +Author: evomarc +Date: Tue Nov 28 06:46:37 2000 +0000 + + Modified the contructor: the default value for the delimiter is now " " + and I added a boolean argument to indicate whether or not we want to + overwrite an existing file with same name (default is overwrite). + Added the getFileName accessor. + +Author: evomarc +Date: Fri Nov 24 17:45:07 2000 +0000 + + Added eoSteadyGenContinue.h, es/eoReal.h and es/eoRealOp.h + +Author: evomarc +Date: Fri Nov 24 17:44:21 2000 +0000 + + Very simple classes for vectors of (unbounded) real numbers. + A few straightforward operators only (BLX-0, uniform mutation). + Mostly for tutorial reasons - though it might improve in usefull classes later + +Author: gustavoromero +Date: Fri Nov 24 17:43:02 2000 +0000 + + bug fix + +Author: evomarc +Date: Fri Nov 24 17:41:39 2000 +0000 + + An eoContinue class that allows a minimum number of generations, + then stops whenever a number of generations happens without fitness + improvement. + +Author: evomarc +Date: Fri Nov 24 17:36:03 2000 +0000 + + Added a verbose mode (the default behavior) which is as before. + But when in non-verbose mode, prints only one line per generation. + +Author: evomarc +Date: Fri Nov 24 17:30:37 2000 +0000 + + Turned the eoBestFitness into an eoStat (it was an eoSortedStat). + Alos added a few comments so that Doxygen documents all classes there. + +Author: evomarc +Date: Fri Nov 24 17:26:22 2000 +0000 + + Changed Maarten's 2-continuator construct into a vector of pointer, + as in all other Combined constructs in EO. + Kept the construtor with 2 eoCOntinue for backward compatibility. + Added of course the add method! + +Author: gustavoromero +Date: Fri Nov 24 12:33:44 2000 +0000 + + changing genetic operators + +Author: gustavoromero +Date: Fri Nov 24 11:52:49 2000 +0000 + + fix Fitness default construction value + +Author: gustavoromero +Date: Fri Nov 24 09:51:31 2000 +0000 + + adding new parameters + +Author: gustavoromero +Date: Thu Nov 23 19:45:49 2000 +0000 + + reordering Makefile creation + +Author: gustavoromero +Date: Thu Nov 23 19:45:13 2000 +0000 + + adding some files + +Author: gustavoromero +Date: Thu Nov 23 19:44:47 2000 +0000 + + initial release + +Author: gustavoromero +Date: Thu Nov 23 19:17:24 2000 +0000 + + initial version + +Author: gustavoromero +Date: Thu Nov 23 19:15:31 2000 +0000 + + adding Makefile.in + +Author: gustavoromero +Date: Thu Nov 23 19:14:09 2000 +0000 + + new application gprop + +Author: evomarc +Date: Fri Nov 17 17:50:08 2000 +0000 + + Made eoBestFitnessStat an eoStat, NOT an eoSortedStat + Cde VS: Committing in . + +Author: evomarc +Date: Fri Nov 17 17:06:53 2000 +0000 + + dded the className method for eoMon, eoBin and eoQuad classes + +Author: gustavoromero +Date: Mon Nov 13 12:12:14 2000 +0000 + + fixing template type + +Author: gustavoromero +Date: Mon Nov 13 12:09:53 2000 +0000 + + adding evaluation in some places + +Author: gustavoromero +Date: Fri Nov 10 09:55:10 2000 +0000 + + fix warning: no newline at end of file + +Author: gustavoromero +Date: Wed Nov 8 15:15:26 2000 +0000 + + fix no newline at end of file warning + +Author: gustavoromero +Date: Wed Nov 8 13:37:41 2000 +0000 + + choose a constructor + +Author: gustavoromero +Date: Wed Nov 8 13:26:03 2000 +0000 + + fix no newline at end of file warning + +Author: gustavoromero +Date: Wed Nov 8 12:56:14 2000 +0000 + + adding a include for apply.h + +Author: gustavoromero +Date: Wed Nov 8 12:55:26 2000 +0000 + + fix no newline at end of file warning + +Author: gustavoromero +Date: Wed Nov 8 12:38:13 2000 +0000 + + bug fix + +Author: gustavoromero +Date: Tue Nov 7 19:16:42 2000 +0000 + + adding old targets + +Author: gustavoromero +Date: Tue Nov 7 19:13:22 2000 +0000 + + removing a warning + +Author: gustavoromero +Date: Tue Nov 7 13:02:48 2000 +0000 + + adding targets + +Author: gustavoromero +Date: Mon Nov 6 12:38:54 2000 +0000 + + adding subdirectories + +Author: gustavoromero +Date: Mon Nov 6 12:37:58 2000 +0000 + + adding t-eoSymreg + +Author: gustavoromero +Date: Mon Nov 6 11:34:38 2000 +0000 + + adding target doc + +Author: gustavoromero +Date: Mon Nov 6 11:31:10 2000 +0000 + + adding doc target to all + +Author: evomarc +Date: Sun Nov 5 05:33:43 2000 +0000 + + Added constructors with 2 params _min and _max in generators + so you can now generate things in [_min, _max) instead of [0,_max) only + Modified the private data from maxim to {minim, range} accordingly. + +Author: evomarc +Date: Sun Nov 5 04:50:10 2000 +0000 + + Added a default value (0.5) to method flip + +Author: gustavoromero +Date: Fri Nov 3 21:23:09 2000 +0000 + + initial version + +Author: gustavoromero +Date: Fri Nov 3 20:03:26 2000 +0000 + + fixing autoconfiguration + +Author: evomarc +Date: Mon Oct 30 14:54:29 2000 +0000 + + Added some safety test in roulette_wheel procedures: + if total is zero, used to return iterator -1 - now returns uniform choice + +Author: evomarc +Date: Mon Oct 30 14:51:57 2000 +0000 + + Fine tuning of printOn: if fitness is invalid, now prints it + +Author: maartenkeijzer +Date: Fri Oct 27 09:13:06 2000 +0000 + + Another attempt in adding the flush + +Author: maartenkeijzer +Date: Fri Oct 27 09:12:31 2000 +0000 + + updated version info, added flush to stdoutmonitor and sprinkled a few typenames + in eoPop.h and eoGOpSelector.h (egcs 2.96 started complaining). + +Author: evomarc +Date: Fri Oct 27 04:38:29 2000 +0000 + + added a second ctor with more didactic ordering of parameters (for tutorial) + +Author: evomarc +Date: Fri Oct 27 04:07:21 2000 +0000 + + Added the member function append( unsigned _popSize, eoInit& _chromInit ) + who appends _popSize members to the population using an eoInit + +Author: evomarc +Date: Tue Oct 24 03:58:02 2000 +0000 + + dded Uniform Crossover (!) and "deterministic" bit-filp mutation + +Author: evomarc +Date: Tue Oct 24 03:57:10 2000 +0000 + + Added the calls to base class I/O routines in printOn and readFrom + +Author: maartenkeijzer +Date: Mon Oct 23 10:58:54 2000 +0000 + + It is using delim now + +Author: maartenkeijzer +Date: Mon Oct 9 16:13:20 2000 +0000 + + Changed functor base names and added to version + +Author: maartenkeijzer +Date: Fri Oct 6 10:41:38 2000 +0000 + + Added an eoSortedStatBase for more efficient statistic calculations + + updated a few makefiles to include the html and latex docs with the + distribution. + +Author: maartenkeijzer +Date: Fri Oct 6 07:50:10 2000 +0000 + + Updated authors and started a README + +Author: maartenkeijzer +Date: Fri Oct 6 07:32:26 2000 +0000 + + Changed ostream_iterator to use AtomType rather than double. + Stupid me! + +Author: mac +Date: Fri Sep 29 10:39:19 2000 +0000 + + Updated version no. to 0.9.1 + +Author: mac +Date: Wed Sep 20 13:32:28 2000 +0000 + + Error in random_generator removed. + +Author: mac +Date: Sat Sep 9 13:52:16 2000 +0000 + + Changed construction order as gcc was warning + +Author: mac +Date: Sat Sep 9 13:43:31 2000 +0000 + + eo: added some missing entries + Pop: error in nth_element_fitness + sga: error in eval + eoParseTree: oddities with gcc + checkpointing: added eoParser and eoState + eoParser: support for wrongly entered parameter names + rnd_generators: flip(0.5) -> flip(bias) in binary_generator + selectors.h: ??? + +Author: mac +Date: Wed Aug 23 14:56:04 2000 +0000 + + Added -O2 as compiler flag + +Author: mac +Date: Wed Aug 23 13:07:51 2000 +0000 + + ok, fixed this problem with typedefs in gcc-0.92 (strange....) + +Author: mac +Date: Wed Aug 23 12:52:48 2000 +0000 + + Yet another change in eoParseTree + +Author: mac +Date: Wed Aug 23 12:50:34 2000 +0000 + + eoParseTree-- changed typedef + +Author: mac +Date: Wed Aug 23 12:03:01 2000 +0000 + + eoCounter? + eoEasyEA -- made it copyable again + eoEvalFunc -- added specialized eoEvalFuncCounter + eoEvolutionStrategy -- nothing much + eoGenContinue -- nothing + eoPop -- fixed nth_element_fitness + eoBitOp -- fixed error in xover + eoFileMonitor -- now appends always + eoParam -- worked around memory leak in MSC's strstream + eoParser -- changed -pconfig_file to @config_file + eoParser -- added messages instead of exception when required param is missing + eoStat -- added eoDistanceStat + t-eoFunctor -- don't know + +Author: mac +Date: Fri Aug 18 08:59:20 2000 +0000 + + +Author: mac +Date: Fri Aug 18 08:57:26 2000 +0000 + + Oh, right, dangling pragma + +Author: mac +Date: Fri Aug 18 08:56:14 2000 +0000 + + some signed/unsigned comparisons removed + +Author: mac +Date: Fri Aug 18 08:44:22 2000 +0000 + + Added symbolic regression, which tests combined ops as well + +Author: root +Date: Tue Aug 15 21:15:36 2000 +0000 + + initial checkin + +Author: mac +Date: Mon Aug 14 11:18:34 2000 +0000 + + Removed a few dsp files and changed saving/loading eoPops a bit. + +Author: mac +Date: Thu Aug 10 16:43:39 2000 +0000 + + changed int to size_t + +Author: mac +Date: Thu Aug 10 16:42:37 2000 +0000 + + *** empty log message *** + +Author: mac +Date: Thu Aug 10 16:41:04 2000 +0000 + + Added binary_value.h + +Author: mac +Date: Thu Aug 10 16:36:55 2000 +0000 + + changed int compare to size_t + +Author: mac +Date: Thu Aug 10 16:35:15 2000 +0000 + + changed int compare to size_t + +Author: mac +Date: Thu Aug 10 16:34:05 2000 +0000 + + main should return int + +Author: mac +Date: Thu Aug 10 16:32:44 2000 +0000 + + changed int to size_t + +Author: mac +Date: Thu Aug 10 14:33:37 2000 +0000 + + Forgot to remove enum value init + +Author: mac +Date: Thu Aug 10 14:31:19 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:30:25 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:26:50 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:25:45 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:23:19 2000 +0000 + + no + +Author: mac +Date: Thu Aug 10 14:18:34 2000 +0000 + + Extreme cleanup, see src/obsolete for details + +Author: mac +Date: Thu Aug 3 20:00:39 2000 +0000 + + Temporarily added Makefile.am to prevent errors + +Author: mac +Date: Thu Aug 3 19:54:42 2000 +0000 + + Removed contrib dir reference + +Author: jmerelo +Date: Thu Aug 3 17:33:03 2000 +0000 + + More changes to Makefile.am + +Author: jmerelo +Date: Thu Aug 3 17:30:57 2000 +0000 + + More changes to Makefile.am + +Author: jmerelo +Date: Thu Aug 3 17:22:46 2000 +0000 + + More changes to Makefile.am + +Author: jmerelo +Date: Thu Aug 3 17:15:42 2000 +0000 + + Changes mostly to Makefile.ams here and there, to be able to do a clean distribution + +Author: mac +Date: Thu Aug 3 17:11:54 2000 +0000 + + New fresh ltconfig, works on my RedHat distr and also on geneura + +Author: mac +Date: Thu Aug 3 17:11:02 2000 +0000 + + Added a different libtool configure so it runs on more machines + +Author: jmerelo +Date: Thu Aug 3 16:37:51 2000 +0000 + + Changed some problems with Makefile.am + +Author: jmerelo +Date: Thu Aug 3 15:44:01 2000 +0000 + + Added missing files, and LICENSE + +Author: mac +Date: Fri Jul 28 10:26:44 2000 +0000 + + removed + +Author: mac +Date: Fri Jul 28 06:10:34 2000 +0000 + + testing if this configure is protable + +Author: gustavo +Date: Tue Jul 18 11:33:56 2000 +0000 + + ignore files created by examples + +Author: gustavo +Date: Tue Jul 18 11:30:39 2000 +0000 + + fix examples using binary_value + +Author: marc +Date: Thu Jun 22 03:23:15 2000 +0000 + + The initial individuals were evaluated directly using binary_value + This resulted in the fitness NOT being set, and some abort or segmentation fault later + Only eoEvalFunc shouydl be used to evaluate individuals!!! + +Author: gustavo +Date: Fri Jun 16 10:20:23 2000 +0000 + + changing version number + +Author: gustavo +Date: Fri Jun 16 09:38:43 2000 +0000 + + erasing LICENSE from test directory + +Author: gustavo +Date: Thu Jun 15 14:29:25 2000 +0000 + + *** empty log message *** + +Author: gustavo +Date: Wed Jun 14 16:29:00 2000 +0000 + + erasing warnings + +Author: mac +Date: Wed Jun 14 10:33:53 2000 +0000 + + Yet again some documentation change + +Author: mac +Date: Wed Jun 14 07:30:21 2000 +0000 + + Removed double reference to t-eoESFull + +Author: mac +Date: Wed Jun 14 07:27:51 2000 +0000 + + Removed double reference to t-eoESFull + +Author: mac +Date: Tue Jun 13 14:31:53 2000 +0000 + + Added ownership functionality and made the thing non-copyable + +Author: mac +Date: Tue Jun 13 14:31:22 2000 +0000 + + Some 'improvements' added + +Author: mac +Date: Tue Jun 13 14:30:47 2000 +0000 + + Added an ownership function to eoState + +Author: mac +Date: Tue Jun 13 10:27:10 2000 +0000 + + Changed base class eoEsBase to eoFixedLength + +Author: mac +Date: Tue Jun 13 10:25:53 2000 +0000 + + updated documentation + +Author: mac +Date: Tue Jun 13 09:48:24 2000 +0000 + + Fixed typedef Type error + +Author: mac +Date: Tue Jun 13 09:43:34 2000 +0000 + + Removed eoEsBase and created an eoFixedLength + +Author: mac +Date: Mon Jun 12 20:24:27 2000 +0000 + + Oh, right found some errors using gcc + +Author: mac +Date: Mon Jun 12 20:23:20 2000 +0000 + + Oh, right found some errors + +Author: mac +Date: Mon Jun 12 20:09:59 2000 +0000 + + New ES routines + +Author: mac +Date: Mon Jun 12 20:08:01 2000 +0000 + + Added a range member function to evaluate an iterator range + +Author: mac +Date: Mon Jun 12 20:07:25 2000 +0000 + + eoInit is a base class for making EO's, eoPop now has a constructor + for eoInit's + +Author: mac +Date: Sat Jun 10 13:22:53 2000 +0000 + + Removed dependence on eoUniform, changed it to use rng.random or rng.uniform directly + +Author: gustavo +Date: Fri May 26 17:18:06 2000 +0000 + + ignore t-eoExternalEO + +Author: mac +Date: Thu May 25 13:04:57 2000 +0000 + + Removed this ugly defaulting to 1 behaviour and solved it using template specialization + +Author: mac +Date: Thu May 25 12:21:06 2000 +0000 + + Added dummy case general: + +Author: gustavo +Date: Thu May 25 11:03:00 2000 +0000 + + warning hunting + +Author: mac +Date: Thu May 25 07:26:13 2000 +0000 + + Oops, corrected error in ctor(istream) + +Author: mac +Date: Thu May 25 07:23:24 2000 +0000 + + Oops, corrected error in adding t-eoExternalEO + +Author: mac +Date: Thu May 25 07:18:25 2000 +0000 + + eoExternalEO, support for using plain functions and structs in EO + +Author: mac +Date: Thu May 25 07:17:23 2000 +0000 + + Changed default printOn to have a trailing space instead of endl + +Author: mac +Date: Thu May 25 07:16:35 2000 +0000 + + Updated dsp, dsw and added t_eoExternalEO.dsp + +Author: mac +Date: Thu May 25 07:13:43 2000 +0000 + + Updated makefile and added t-eoExternalEO + +Author: mac +Date: Thu Apr 20 11:11:58 2000 +0000 + + removed reference to rint() (what does this function do anyway? it is not ANSI and defined nowhere in eo!) + +Author: mac +Date: Thu Apr 20 11:06:02 2000 +0000 + + Added a bias function next to bind(). This function will bias the selection to select certain specific guys... + +Author: mac +Date: Thu Apr 20 10:48:07 2000 +0000 + + Remove eoBinaryTerm, should not have been here in the first place + +Author: gustavo +Date: Wed Apr 12 09:51:50 2000 +0000 + + adding test to test/.cvsignore + +Author: gustavo +Date: Tue Apr 11 12:18:30 2000 +0000 + + some fix + +Author: mac +Date: Sun Apr 9 10:16:28 2000 +0000 + + getOp() should return a non-const reference + +Author: mac +Date: Sun Apr 9 10:13:27 2000 +0000 + + Changed int target to size_t target (produced warning) + +Author: mac +Date: Sun Apr 9 10:10:39 2000 +0000 + + eoFitTerm did not implement className + +Author: mac +Date: Sun Apr 9 10:09:32 2000 +0000 + + eoFitTerm did not implement className + +Author: mac +Date: Sun Apr 9 10:05:55 2000 +0000 + + Updated eoBreeder to use the even newer general operator interface + +Author: mac +Date: Sun Apr 9 10:00:55 2000 +0000 + + Updated eoBreeder to use the even newer general operator interface + +Author: mac +Date: Sun Apr 9 09:59:06 2000 +0000 + + Specialized it for bool, so that we don't get these MSVC warnings. + +Author: mac +Date: Sun Apr 9 09:54:25 2000 +0000 + + Oops, it's a pain to get the makefiles up to date when you are working on two machines.... + +Author: mac +Date: Sun Apr 9 09:50:44 2000 +0000 + + Oops, forgot to make operator() return an eoMonitor + +Author: mac +Date: Sun Apr 9 09:48:38 2000 +0000 + + Oops, forgot to make operator() return an eoMonitor + +Author: mac +Date: Sun Apr 9 09:46:20 2000 +0000 + + Updated documentation to give proper include file in doxygen and define a module selectors + Also added a load(stream) and save(stream) to eoState + +Author: mac +Date: Sun Apr 9 09:44:53 2000 +0000 + + Updated documentation to give proper include file in doxygen and define a module bitstring + +Author: mac +Date: Sun Apr 9 09:43:40 2000 +0000 + + Added t-eoGOpSel. + +Author: mac +Date: Sun Apr 9 09:41:29 2000 +0000 + + Changed the general operator interface to be consistent with the rest + of EO, updated some documentation. + +Author: mac +Date: Fri Apr 7 14:23:59 2000 +0000 + + updated Makefiles and removed a few unneeded files. note: ES files are pending + +Author: mac +Date: Fri Apr 7 09:04:50 2000 +0000 + + no message + +Author: gustavo +Date: Tue Apr 4 15:22:04 2000 +0000 + + changing include style from ... to <...> + +Author: gustavo +Date: Tue Apr 4 11:00:18 2000 +0000 + + initial .cvsignore + +Author: gustavo +Date: Mon Apr 3 15:52:31 2000 +0000 + + changing autonconfiguration to compile more examples and to create documentation + +Author: gustavo +Date: Mon Apr 3 15:27:56 2000 +0000 + + forgeting multiOps + +Author: gustavo +Date: Mon Apr 3 09:51:29 2000 +0000 + + too many EMPTY constructors + +Author: gustavo +Date: Mon Apr 3 09:32:43 2000 +0000 + + adding & modifying .cvsignore's + +Author: gustavo +Date: Fri Mar 31 16:23:16 2000 +0000 + + Maarten was right + +Author: gustavo +Date: Fri Mar 31 14:34:50 2000 +0000 + + Makefile.in don't need to be in cvs + +Author: gustavo +Date: Fri Mar 31 14:33:13 2000 +0000 + + more fix in makefiles + +Author: mac +Date: Fri Mar 31 10:14:15 2000 +0000 + + Added checkpointing to the makefile, but have to test it later on a Linux box + +Author: mac +Date: Fri Mar 31 10:04:39 2000 +0000 + + Finalized Checkpointing, renamed t-testSta.... to t-eoStateAndParser + added a checkpoint tester, but did not yet update the Makefiles as + I don't have automake on my machine + +Author: mac +Date: Fri Mar 31 10:02:18 2000 +0000 + + Finalized Checkpointing, see t-eoCheckpointing for a test + +Author: mac +Date: Fri Mar 31 10:00:22 2000 +0000 + + Added a className member + +Author: gustavo +Date: Thu Mar 30 18:15:14 2000 +0000 + + adding const... leaving as is + +Author: gustavo +Date: Thu Mar 30 18:02:03 2000 +0000 + + makefiles almost work + +Author: gustavo +Date: Thu Mar 30 17:11:20 2000 +0000 + + fixing makefiles + +Author: gustavo +Date: Thu Mar 30 14:20:25 2000 +0000 + + changing Makefile.am's to accept new subdiretory structure + +Author: mac +Date: Thu Mar 30 09:43:21 2000 +0000 + + changed erronuous classname() to className() + +Author: mac +Date: Thu Mar 23 14:41:12 2000 +0000 + + few minor mods + +Author: mac +Date: Wed Mar 22 18:55:12 2000 +0000 + + Adapted it for the poor stdc++ support of g++ + +Author: mac +Date: Wed Mar 22 17:10:07 2000 +0000 + + no message + +Author: mac +Date: Wed Mar 22 17:09:36 2000 +0000 + + Changed some includes for the new dir structure + +Author: mac +Date: Wed Mar 22 16:49:35 2000 +0000 + + Changed some includes for the new dir structure + +Author: mac +Date: Wed Mar 22 16:47:27 2000 +0000 + + test the state and the parser + +Author: mac +Date: Wed Mar 22 15:39:32 2000 +0000 + + Changed readFrom, which is no longer line based + +Author: mac +Date: Wed Mar 22 15:38:16 2000 +0000 + + Obsolete, now present in eoOp.h + +Author: mac +Date: Wed Mar 22 15:14:16 2000 +0000 + + Changed a few params in the configuration file + +Author: mac +Date: Wed Mar 22 15:00:38 2000 +0000 + + (re)moving... + +Author: mac +Date: Wed Mar 22 14:48:49 2000 +0000 + + (re)moving... + +Author: mac +Date: Wed Mar 22 14:38:10 2000 +0000 + + Configuration file for doxygen + +Author: mac +Date: Wed Mar 22 14:32:37 2000 +0000 + + (re)moving... + +Author: mac +Date: Wed Mar 22 14:30:57 2000 +0000 + + no message + +Author: mac +Date: Wed Mar 22 14:23:20 2000 +0000 + + moving... + +Author: mac +Date: Wed Mar 22 14:21:02 2000 +0000 + + moved old files here + +Author: mac +Date: Wed Mar 22 14:18:39 2000 +0000 + + Moved the es files to an es directory + +Author: mac +Date: Wed Mar 22 14:12:08 2000 +0000 + + no message + +Author: mac +Date: Wed Mar 22 14:04:03 2000 +0000 + + Added utilities directory, this contains state, parser etc. + +Author: mac +Date: Wed Mar 22 13:58:29 2000 +0000 + + Removed obsolete references + +Author: mac +Date: Wed Mar 22 13:57:57 2000 +0000 + + moved to utils + +Author: mac +Date: Mon Mar 20 17:35:24 2000 +0000 + + eoSelfEval was empty + +Author: mac +Date: Mon Mar 20 17:32:42 2000 +0000 + + Just changed a typo in the documentation + +Author: mac +Date: Mon Mar 20 16:13:32 2000 +0000 + + +Author: marc +Date: Mon Mar 13 10:17:12 2000 +0000 + + Put eoTerm into the eo hierarchy - it was in the air! + Added the className method + +Author: marc +Date: Mon Mar 13 10:14:20 2000 +0000 + + Changed some int into unsigned to avoid Gnu warnings + +Author: marc +Date: Mon Mar 13 10:10:00 2000 +0000 + + Removed extra {} in operator() + +Author: mac +Date: Mon Mar 6 16:28:37 2000 +0000 + + Removed the call to the istream ctor, replaced it with readFrom + +Author: mac +Date: Mon Mar 6 16:21:54 2000 +0000 + + Removed the call to the istream ctor, replaced it with readFrom + +Author: mac +Date: Mon Mar 6 16:09:46 2000 +0000 + + Removed the istream ctor + +Author: mac +Date: Mon Mar 6 16:05:47 2000 +0000 + + Fixed bug in eoGOpSelector (missing break!) + + eoOp.h: binOp's second arg is const once more + + all dsp and dsw files were touched by msvc, but did add some stuff (which + will be added to eo later) + + Hope this all works + +Author: mac +Date: Mon Mar 6 15:55:44 2000 +0000 + + Upgraded parse_tree a bit... + +Author: marc +Date: Thu Mar 2 05:54:01 2000 +0000 + + Removed extra () in method virtual const EOT& operator()(const eoPop& pop) + Changed the include of eoPop.h from <> to "" + +Author: marc +Date: Thu Mar 2 05:48:23 2000 +0000 + + - added the virtual destructors of all classes, + to suppress g++ annoying warnings when using -Wall option + +Author: marc +Date: Tue Feb 29 05:22:32 2000 +0000 + + Modified the order of base type and private data initializations + so the g++ does not complain when using the -Wall compile option + +Author: marc +Date: Tue Feb 29 05:14:40 2000 +0000 + + wherease the command "cvs ci" is OK. + + Here we go: + - added the virtual destructors of all classes, + to suppress g++ annoying warnings when using -Wall option + +Author: victor +Date: Mon Feb 21 18:21:58 2000 +0000 + + *** empty log message *** + +Author: victor +Date: Mon Feb 21 18:21:14 2000 +0000 + + A: has been fixed, ONCE MORE :-( + +Author: victor +Date: Mon Feb 21 18:03:31 2000 +0000 + + making the second parameter of the oprator() for binaria operators to be NON const + +Author: mac +Date: Sat Feb 19 18:21:47 2000 +0000 + + Changed double linefeeds, will undo this if it doesn't work + +Author: mac +Date: Sat Feb 19 17:37:18 2000 +0000 + + Removed double line feeds + +Author: mac +Date: Sat Feb 19 16:54:09 2000 +0000 + + Hi, just a simple test, I'm sorry to do it with the real repository, + but my machine here is not Unix + +Author: mac +Date: Sat Feb 19 16:32:12 2000 +0000 + + eoScalarFitness, 'envelope class' for making minimizing/maximizing fitness + +Author: mac +Date: Sat Feb 19 16:31:01 2000 +0000 + + Example file + +Author: mac +Date: Sat Feb 19 16:30:42 2000 +0000 + + Moved the static eoRNG rng to an extern eoRNG + This external object is now defined in eoPersistent.cpp + + This should change... + +Author: mac +Date: Sat Feb 19 16:27:38 2000 +0000 + + Added gp, example file in t-eoSymreg.cpp + +Author: victor +Date: Sat Feb 19 13:14:36 2000 +0000 + + Someone was using eoAltProportionalSelect.h only he/she knows whycd src + +Author: victor +Date: Sat Feb 19 12:50:48 2000 +0000 + + A: has been fixed , ONCE MORE :-( + +Author: victor +Date: Sat Feb 19 12:37:28 2000 +0000 + + Changing (ONCE MORE) eoEasyEA.h to allow 0 generation processes. + +Author: mac +Date: Wed Feb 16 15:17:43 2000 +0000 + + *** empty log message *** + +Author: mac +Date: Wed Feb 16 15:11:18 2000 +0000 + + *** empty log message *** + +Author: mac +Date: Wed Feb 16 15:05:19 2000 +0000 + + Mak: Added the eoQuadratic Op and more ... (and I hate VI) + +Author: mac +Date: Wed Feb 16 15:03:45 2000 +0000 + + *** empty log message *** + +Author: marc +Date: Wed Feb 16 04:40:20 2000 +0000 + + Changed all "float" to "double" + But more than that, this is a test of CVS for me + Marc + +Author: mac +Date: Tue Feb 15 15:08:00 2000 +0000 + + just a test + +Author: victor +Date: Fri Feb 11 12:05:07 2000 +0000 + + A: has been fixed :-)) + +Author: gustavo +Date: Wed Feb 9 19:50:02 2000 +0000 + + some test + +Author: jmerelo +Date: Mon Feb 7 17:16:16 2000 +0000 + + Added new files to the brew, mainly distance and new-op-interface related + +Author: gustavo +Date: Wed Jan 26 17:48:24 2000 +0000 + + *** empty log message *** + +Author: victor +Date: Tue Jan 25 08:20:22 2000 +0000 + + A very silly error has been fixed + +Author: gustavo +Date: Mon Jan 24 21:16:54 2000 +0000 + + some reviews + +Author: gustavo +Date: Mon Jan 24 21:13:21 2000 +0000 + + some reviews + +Author: victor +Date: Tue Jan 18 13:43:39 2000 +0000 + + I have change the do...while(terminator) into while(terminator){...}, because may be the termination condition is reached just atthe beginning (for instance 0 generations) + +Author: victor +Date: Tue Jan 11 13:25:32 2000 +0000 + + Another little bug fixed + +Author: gustavo +Date: Tue Jan 11 12:13:18 2000 +0000 + + bug fix in eoTournament + +Author: victor +Date: Tue Jan 4 13:04:00 2000 +0000 + + A little problem existed when the Parser tried to read a String because a \0 was inserted sometimes (no others) making imposible to add a new string to the one read and then turning the full string into a char* (understable? :-) + +Author: victor +Date: Tue Jan 4 10:43:06 2000 +0000 + + Changing the way parameters are shown to the user when the -h or --help flags are used + +Author: victor +Date: Tue Dec 21 13:39:42 1999 +0000 + + Minor changes in eoRNG.h + +Author: victor +Date: Tue Dec 21 12:12:29 1999 +0000 + + eoOpSelector has a method called getOp that HAD to return a non-constant reference to an operator; in fact it returned a CONST reference. Now, I've changed it + +Author: victor +Date: Tue Dec 21 11:41:19 1999 +0000 + + Updating the selectors: they inherited from eoSelect and noew the inherite from eoBinPopOp + +Author: victor +Date: Tue Dec 21 09:58:45 1999 +0000 + + Minor changes in eoParser.h + +Author: victor +Date: Fri Dec 17 12:04:06 1999 +0000 + + Moving function InitRamdom to eoParserUtils.h + +Author: jmerelo +Date: Fri Dec 17 09:19:13 1999 +0000 + + Changes + +Author: victor +Date: Wed Dec 15 16:47:41 1999 +0000 + + A little mistake has been corrected + +Author: victor +Date: Wed Dec 15 16:42:13 1999 +0000 + + The constants N,M and K are not declared twice when using RNG in different file of the same program + +Author: victor +Date: Wed Dec 15 13:57:09 1999 +0000 + + I have turned into comments the Pop constructor that used Type as the type of the gene, given that an EO can have NO genes + +Author: jmerelo +Date: Mon Nov 22 09:47:32 1999 +0000 + + Added changes mainly by Marc + +Author: jmerelo +Date: Mon Nov 15 09:26:33 1999 +0000 + + Added Marc's ES files and .dsp files for others + +Author: jmerelo +Date: Fri Oct 29 11:23:10 1999 +0000 + + Added eoParser + +Author: jmerelo +Date: Mon Oct 25 08:25:42 1999 +0000 + + Added new RNG and test files for it + +Author: jmerelo +Date: Tue Oct 19 11:47:15 1999 +0000 + + Small modifications + +Author: gustavo +Date: Fri Oct 15 13:16:50 1999 +0000 + + bug fix in eoBinBitflip + +Author: jmerelo +Date: Fri Oct 15 11:18:52 1999 +0000 + + Changed eoBinBitFlip thanks to Jacques suggestion + +Author: jmerelo +Date: Fri Oct 15 07:34:55 1999 +0000 + + Small changes to makefiles + +Author: jmerelo +Date: Wed Oct 13 08:38:33 1999 +0000 + + Changes in configure y makefiles to account for new version and new files + +Author: gustavo +Date: Mon Oct 11 10:20:39 1999 +0000 + + updating with new tests + +Author: gustavo +Date: Fri Oct 8 17:45:49 1999 +0000 + + adding more functions and tests for eoNonUniform + +Author: jmerelo +Date: Fri Oct 8 11:39:58 1999 +0000 + + Two files left over added to the repo + +Author: jmerelo +Date: Fri Oct 8 11:39:20 1999 +0000 + + Added a full algorithm to the new EO, with terminators, and things like that + +Author: jmerelo +Date: Fri Oct 8 09:52:31 1999 +0000 + + Added two more files + +Author: jmerelo +Date: Fri Oct 8 09:51:40 1999 +0000 + + Changed stuff to make eoGeneration work + +Author: jmerelo +Date: Fri Oct 8 07:40:34 1999 +0000 + + Cosmetic changes + +Author: gustavo +Date: Thu Oct 7 11:39:08 1999 +0000 + + adding t-eogeneration + +Author: gustavo +Date: Thu Oct 7 11:38:14 1999 +0000 + + putting eoNonUniform into a separate file + +Author: gustavo +Date: Tue Oct 5 11:32:17 1999 +0000 + + adding eoNonUniformOperator to eoOp.h + +Author: gustavo +Date: Mon Oct 4 11:17:19 1999 +0000 + + adding t-eogeneration.cpp + +Author: victor +Date: Fri Oct 1 17:00:38 1999 +0000 + + Updating Makefile.am to include eo2d.h and eo2dVector.h + +Author: victor +Date: Fri Oct 1 17:00:02 1999 +0000 + + Updating Makefile.am to compile t-eo2dVector.h + +Author: victor +Date: Fri Oct 1 16:36:04 1999 +0000 + + *** empty log message *** + +Author: victor +Date: Fri Oct 1 16:33:59 1999 +0000 + + All the methods have been implemented. Only three of them (asignement operator, read from and write to a stream) remain unfinished. + +Author: victor +Date: Fri Oct 1 16:32:46 1999 +0000 + + Final (or almost) version by now. + +Author: victor +Date: Wed Sep 29 11:43:34 1999 +0000 + + Adding an interface for 2-dimensional chromosomes + +Author: victor +Date: Wed Sep 29 11:41:34 1999 +0000 + + Fixing a little bug in the random generator. Variable size was used instead of _size, which is the parameter the method gets + +Author: gustavo +Date: Tue Sep 28 11:56:21 1999 +0000 + + testing and debugging eoGeneration + +Author: gustavo +Date: Tue Sep 28 10:26:39 1999 +0000 + + finish eoGeneration... still to be tested + +Author: gustavo +Date: Tue Sep 21 18:14:39 1999 +0000 + + fixing bugs in replacers and moving some code between files + +Author: gustavo +Date: Tue Sep 21 11:36:38 1999 +0000 + + pop need a reevaluation after breeding + +Author: gustavo +Date: Mon Sep 20 18:07:35 1999 +0000 + + fixing cvsignore + +Author: gustavo +Date: Mon Sep 20 11:48:52 1999 +0000 + + fixing tests + +Author: jmerelo +Date: Mon Sep 20 11:37:00 1999 +0000 + + Added LICENSE + +Author: jmerelo +Date: Mon Sep 20 11:35:01 1999 +0000 + + Changes to eo1d interface and bug fixes + +Author: gustavo +Date: Fri Sep 10 12:21:50 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Fri Sep 10 12:13:53 1999 +0000 + + updating eo/test/.cvsignore for new eoBin tests + +Author: gustavo +Date: Fri Sep 10 12:11:11 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Fri Sep 10 12:05:57 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Fri Sep 10 12:03:51 1999 +0000 + + adding examples for eoBin & other stuff + +Author: gustavo +Date: Fri Sep 10 11:48:42 1999 +0000 + + adding examples for eoBin & other stuff + +Author: gustavo +Date: Fri Sep 10 11:07:46 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Mon Feb 15 17:47:30 1999 +0000 + + adding eoGeneration + +Author: jmerelo +Date: Mon Feb 15 16:03:04 1999 +0000 + + New .dsp files for new test programs + +Author: jmerelo +Date: Mon Feb 15 16:01:35 1999 +0000 + + Compiled new stuff on VC++, changes to breeder + +Author: gustavo +Date: Mon Feb 15 11:55:59 1999 +0000 + + doing things work on VC++ + +Author: gustavo +Date: Fri Feb 12 17:56:55 1999 +0000 + + bux fix in t-eoinsertion.cpp + +Author: gustavo +Date: Fri Feb 12 17:43:28 1999 +0000 + + eoBreeder almost finished + +Author: jmerelo +Date: Wed Feb 10 17:14:08 1999 +0000 + + Added some files, compiled some stuff in VC++, and finished eoOpSelMason + +Author: gustavo +Date: Wed Feb 10 17:05:16 1999 +0000 + + adding eoBreeder + +Author: gustavo +Date: Wed Feb 10 13:39:48 1999 +0000 + + small bug fixes + +Author: gustavo +Date: Tue Feb 9 19:06:51 1999 +0000 + + *** empty log message *** + +Author: jmerelo +Date: Tue Feb 9 18:40:00 1999 +0000 + + Changes to makefiles and other things + +Author: gustavo +Date: Tue Feb 9 18:16:42 1999 +0000 + + *** empty log message *** + +Author: jmerelo +Date: Tue Feb 9 17:31:16 1999 +0000 + + New bitOp factories and things like that + +Author: gustavo +Date: Tue Feb 9 17:27:22 1999 +0000 + + new replacer + +Author: jmerelo +Date: Mon Feb 8 19:15:27 1999 +0000 + + Changed monopfactory to opfactory; changes in the examples + +Author: gustavo +Date: Mon Feb 8 18:47:07 1999 +0000 + + looking for a bug in eoInsertion + +Author: jmerelo +Date: Mon Feb 8 16:13:26 1999 +0000 + + New files added and fixes for VC++ + +Author: gustavo +Date: Mon Feb 8 16:11:55 1999 +0000 + + some bug fix + +Author: gustavo +Date: Mon Feb 8 14:15:11 1999 +0000 + + learning about autoconf: eoBin and bvector.h + +Author: gustavo +Date: Mon Feb 8 12:43:52 1999 +0000 + + eoBin/eoBinOp division + +Author: gustavo +Date: Fri Feb 5 18:25:28 1999 +0000 + + adding eoInsertion + +Author: gustavo +Date: Fri Feb 5 16:34:00 1999 +0000 + + eoLottery finished + +Author: gustavo +Date: Thu Feb 4 17:38:39 1999 +0000 + + adding acconfig.h + +Author: gustavo +Date: Wed Feb 3 20:42:57 1999 +0000 + + changes on eoLottery + +Author: jmerelo +Date: Wed Feb 3 18:34:20 1999 +0000 + + Changes to eo and opsel to quash compiling bugs + +Author: gustavo +Date: Wed Feb 3 17:28:07 1999 +0000 + + some changes to start, new work on eoLottery + +Author: jmerelo +Date: Wed Feb 3 17:26:52 1999 +0000 + + Chenges to EO + +Author: jmerelo +Date: Mon Feb 1 18:18:39 1999 +0000 + + Remove old eoObject.cpp + +Author: gustavo +Date: Fri Jan 29 12:23:55 1999 +0000 From 7ec4e0e13d358e4842f3f5b00645e41c50923f97 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 13:32:55 +0200 Subject: [PATCH 1602/2134] added Johann and Caner as authors --- eo/AUTHORS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/AUTHORS b/eo/AUTHORS index 39ec25202..6eff7dbe4 100644 --- a/eo/AUTHORS +++ b/eo/AUTHORS @@ -7,4 +7,6 @@ Marc Schoenauer Jeroen Eggermont Jochen Kďż˝pper Thomas Legrand -Clive Canape \ No newline at end of file +Clive Canape +Johann DrĂ©o +Caner Candan From 538d302ecfd4e1b05341fe4c323324be42b15b47 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 13:34:19 +0200 Subject: [PATCH 1603/2134] warning: not up-to-date --- eo/INSTALL | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eo/INSTALL b/eo/INSTALL index 05d180f8a..6336b026e 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -1,3 +1,7 @@ + ----------------------------------------- +| WARNING THOSE INSTRUCTIONA ARE OUTDATED | + ----------------------------------------- + Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. From cca54d50b3f046c2b8e841e5493da8e599883837 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 13:35:08 +0200 Subject: [PATCH 1604/2134] renamed in CHANGELOG --- eo/ChangeLog | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 eo/ChangeLog diff --git a/eo/ChangeLog b/eo/ChangeLog deleted file mode 100644 index dca09d239..000000000 --- a/eo/ChangeLog +++ /dev/null @@ -1,34 +0,0 @@ -2006-12-18 Jochen Küpper - - * TODO.html, README.html: Remove these old files. - - * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. - -2006-12-17 Jochen Küpper - - * README: Better links to Templates/ - - * configure.in: Bump version to 1.0-beta2. - -2006-12-03 Jochen Küpper - - * README: Add more specific note about tutorial. - - * configure.in: Bump version to 1.0-beta1 - -2006-12-02 Jochen Küpper - - * configure.in: Remove unnecessary tests. - -2006-11-16 Jochen Küpper - - * configure.in (AC_DEBUG): add test - - * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, - or NDEBUG according to its value. - - * Local Variables: - * coding: iso-8859-1 - * mode: flyspell - * fill-column: 80 - * End: From c6886126f02f51354f4bd923dd66bc126ac95e5c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 13:37:15 +0200 Subject: [PATCH 1605/2134] replace the changelog with the (cleaned) git log, more up-to-date --- CHANGELOG | 9987 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 9987 insertions(+) create mode 100644 CHANGELOG diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 000000000..6217c7917 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,9987 @@ +commit 4a90420dd3807fd569c8886dca059cd34d04c622 +Author: Johann Dreo +Date: Tue Oct 26 10:51:48 2010 +0200 + + create a more generic class for monitoring to any ostream (useful for output to clog or cerr, for example), the stdout monitor now inherits from it + +commit 47c4f58eb8a989cc387cccedcadd795a1fb31e06 +Author: Johann Dreo +Date: Mon Oct 25 09:50:50 2010 +0200 + + Stat object to compute ratio of feasible indviduals in a pop using eoDualFitness + +commit 91ab6b8296dc162efef69c19118405c5c487c7b3 +Author: Johann Dreo +Date: Fri Oct 22 10:08:57 2010 +0200 + + a stat object for computing interquartile range (a robust measure of dispersion) + +commit 11b14cf597756f645d4b43b944f5d675c1f36512 +Author: Johann Dreo +Date: Fri Oct 22 10:07:09 2010 +0200 + + Arithmetic operators (note: priority to unfeasibility) + +commit ac0a909d1da643b62a3cfd7b61f5e070d30974f4 +Author: Johann Dreo +Date: Wed Sep 29 22:52:30 2010 +0200 + + using eo::log instead of std::cout + +commit ffc6efeb97ec2b1148fd08225b9d0698a44d9a8b +Author: Johann Dreo +Date: Tue Sep 21 17:53:48 2010 +0200 + + do not explicitely specify build type, use O3 instead of O2 for release + +commit eade49c45ad7b4e89ece2a40b1479f7506389ffd +Author: Johann Dreo +Date: Tue Sep 21 17:52:59 2010 +0200 + + typo variable name + +commit 9a6dbdd70e061b385baff228617895a4fcce1dc4 +Author: Johann Dreo +Date: Mon Sep 20 11:32:55 2010 +0200 + + deactivate -fprofile-arcs -ftest-coverage that necessitate gcov + +commit f39183b8d7656b618afc4043095dc3ab98b42d90 +Author: Johann Dreo +Date: Thu Sep 16 14:16:24 2010 +0200 + + accessors to levels ; typofix on _contextLevel + +commit 8dc13bbaff422f5f22acb562339c8dc0c7a6774b +Author: Johann Dreo +Date: Thu Sep 16 11:29:32 2010 +0200 + + important note: we are using wallclock time + +commit faec5f102cc8b63276928f46679ed34e65fde1e4 +Author: Johann Dreo +Date: Thu Sep 16 11:16:55 2010 +0200 + + bugfix operator() signature + +commit d26a9d87673bda9a17075493ac39a69732bffda6 +Author: Johann Dreo +Date: Thu Sep 16 11:06:04 2010 +0200 + + evals that can throw exceptions + +commit 5adfdc8a0853c278e0f8d054ae64390393faacac +Merge: ccd5b01 88b2ec3 +Author: Johann Dreo +Date: Thu Sep 16 09:41:26 2010 +0200 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +commit ccd5b01dee2ef9099e5ea24eb39b3acca7df7c0c +Author: Johann Dreo +Date: Thu Sep 16 09:33:55 2010 +0200 + + more comments ; header + +commit 991138053c8605d9538bb114edc7754a498ddeaf +Author: Johann Dreo +Date: Thu Sep 16 09:29:51 2010 +0200 + + typo bugfix + +commit 2ed8146723a3ad9c1311e5a2fd2ed5882c98bed5 +Author: Johann Dreo +Date: Thu Sep 16 09:28:55 2010 +0200 + + use std::endl ; error message format ; more comments + +commit 9d19cc2cfaec74a26ba98421015de68babfba222 +Author: Johann Dreo +Date: Wed Sep 15 22:53:15 2010 +0200 + + bugfix _keep_existing name ; added an overwriting option to use ios_base::trunc instead of ios_base::app + +commit d8a1aedf015cf7ab8c91388c8f21e5fc2ed8a6eb +Author: Johann Dreo +Date: Wed Sep 15 22:28:58 2010 +0200 + + use eo::log + +commit 22ce03233ebaa2472538c623ec0172f819e61f3c +Author: Johann Dreo +Date: Wed Sep 15 22:28:29 2010 +0200 + + doc comments + +commit 88b2ec3d1a95e3f1d87e3ed150c4a09035e4e270 +Author: nojhan +Date: Thu Sep 9 22:37:50 2010 +0200 + + update related softwares: + EASEA, GUIDE + +commit 526dfe150b42711086b486375b57396db0e7d4dc +Author: Johann Dreo +Date: Mon Sep 6 12:05:13 2010 +0200 + + bugfix xdebug level + +commit 3c2639a876148028fb779176c519415ec36087b3 +Author: Johann Dreo +Date: Mon Sep 6 11:20:00 2010 +0200 + + use eo::log instead of cout + +commit 236dd026088d572022729a7ca103ca74f9072ba4 +Author: Johann Dreo +Date: Mon Sep 6 00:04:37 2010 +0200 + + indent clean, more comments + +commit b9d74c0b55590e980a2173721ca266d7e9f3e68e +Author: Johann Dreo +Date: Sun Sep 5 23:56:17 2010 +0200 + + replace \n with endl + +commit b18817b46fb40feec2e4d71ac8b69e89795a2570 +Author: Johann Dreo +Date: Sun Sep 5 23:42:58 2010 +0200 + + use eo::log instead of cout + +commit 2b4f14b8d720611cb34d60cbabc1eb53ed3efd90 +Author: nojhan +Date: Fri Sep 3 09:19:23 2010 +0200 + + official xmpp chat room + +commit f7170e2ebacda69cc42034149ebb22b58e91ef29 +Author: Caner Candan +Date: Wed Sep 1 19:15:26 2010 +0200 + + * t-eoLogger: missed some code lines to display correctly the help + +commit 541a14babff45c4f616184d770f508cd43de709b +Author: Caner Candan +Date: Wed Sep 1 17:30:50 2010 +0200 + + * packaging: now the test and tutorial binaries are installed in share directory + +commit 6d04ba9d3287d5bcae98fe695e43462b37b7d4e2 +Author: Caner Candan +Date: Wed Sep 1 14:51:09 2010 +0200 + + ticket #1: Remove the autotools files done + +commit 76d8dac2fdc8d56d0b51b276970f8e773f053b13 +Merge: 5bd0baa 7159f8e +Author: Caner Candan +Date: Wed Sep 1 12:07:23 2010 +0200 + + Merge branch 'packaging' of ssh://localhost:9001/gitroot/eodev/eodev + +commit 5bd0baace7402bb0ff61636301d181429d53b299 +Author: Caner Candan +Date: Wed Sep 1 12:01:42 2010 +0200 + + eo::log: added the parameter -o in order to define a log file + removed some warning messages at compile time + +commit 0834d689e8684b3c50d2bc8172e70a5af1e2aff5 +Author: Caner Candan +Date: Tue Aug 31 19:26:51 2010 +0200 + + * added some useful comments in eoLogger class + +commit 20a4496b839d293ab01546a22763b273e0992c47 +Author: Caner Candan +Date: Tue Aug 31 16:39:21 2010 +0200 + + fixed some warning messages while compiling + +commit f98e1385626d403566a61f107362bb3f64c2df6c +Author: Caner Candan +Date: Tue Aug 31 16:35:50 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +commit 52d4107bc420c151c1233c36c681fc2505756613 +Author: Caner Candan +Date: Tue Aug 31 16:34:03 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +commit b790bbc35bd2adf426a86f8acbd28a06ba9713f0 +Author: Caner Candan +Date: Tue Aug 31 16:32:19 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +commit 698c692a63b2867aae37bea0e0cc564f099f1bf4 +Author: Caner Candan +Date: Tue Aug 31 16:31:39 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +commit 1619b2b38cfb508b88c2299e74e235fb5e192b00 +Author: Caner Candan +Date: Tue Aug 31 15:53:32 2010 +0200 + + * eoRNG.h: added double uniform(double min, double max) + +commit e42a1dae74433bdc2fe64875cccb87f5b44edec3 +Author: Caner Candan +Date: Tue Aug 31 14:56:11 2010 +0200 + + * eoFitContinue: using of _pop.best_element().fitness() instead of pop.nth_element_fitness(0) + +commit 12a631cfb188b5662c7010cad049397b8d07b701 +Author: Caner Candan +Date: Tue Aug 31 14:54:42 2010 +0200 + + removed a wrong logging message from eoEvalContinue.h + +commit 2b3db39aff1fef32c687fedefc858f76cd7b5c98 +Author: Caner Candan +Date: Tue Aug 31 14:52:08 2010 +0200 + + repared some compile warning messages + +commit 1b3172a40c07b6c7411cbed859524b975ae4c9dd +Author: Caner Candan +Date: Tue Aug 31 14:15:54 2010 +0200 + + updated doxygen config file to the version 1.6.x + +commit ce8f5f692fef83e44e6dbd9574c0a90019187d07 +Author: Caner Candan +Date: Tue Aug 31 14:10:13 2010 +0200 + + * fixed some warning issues during compilation + +commit 27d5cbbc3ba202e69ef7ab6a53d97adadb5d9a30 +Author: Caner Candan +Date: Tue Aug 31 14:06:34 2010 +0200 + + updated doc/CMakeLists.txt in order to add docs in packages + +commit 364877cc23439496cf00f6297df2f245e6fb0b46 +Author: Caner Candan +Date: Tue Aug 31 14:04:25 2010 +0200 + + removed useless eo.cfg, this is generated automaticaly by cmake with the file eo.cfg.cmake + +commit 23dc5dfed8d16da278a6c630730e47bd945d179d +Merge: 248d12d 2fdc24a +Author: Johann Dreo +Date: Tue Aug 31 10:22:46 2010 +0200 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +commit 248d12d2f480a0f2f82e0f33e3823d659f359a66 +Author: Johann Dreo +Date: Mon Aug 30 22:50:59 2010 +0200 + + add eoDualFitness.h to the list of headers + +commit 528893cba96b161a76deaf325810ebf53204399f +Author: Johann Dreo +Date: Mon Aug 30 22:50:34 2010 +0200 + + bugfix: typo on _this_ + +commit ce0c96967123e7910be816c5c85f0223b23854f7 +Author: Johann Dreo +Date: Mon Aug 30 22:46:55 2010 +0200 + + update of the license headers, LGPL version 2 only for those new files + +commit e184e9dd966f713c1f7dfd068afc3cd75855020c +Author: Johann Dreo +Date: Mon Aug 30 22:46:37 2010 +0200 + + add a xdebug level & update of the license headers, LGPL version 2 only for this new file + +commit 03978e9ead16def2ee37af70adbabacac6ef2bfa +Author: Johann Dreo +Date: Mon Aug 30 22:44:18 2010 +0200 + + no ; at the end of the line + +commit eb79ec2b6c20b860d844c15e0c51082ddeb3550d +Author: Johann Dreo +Date: Mon Aug 30 22:43:50 2010 +0200 + + New class: A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. + +commit ee6d52ec812ebe6c2c51819f3db80d98b2509c7d +Author: Johann Dreo +Date: Mon Aug 30 22:42:42 2010 +0200 + + no ; at the end of the line + +commit 2fdc24a29a37de13bd8b56387c09744aefeac368 +Author: nojhan +Date: Sat Aug 28 12:30:37 2010 +0200 + + openhatch button, supposed to facilitate the involvement of new contributors + +commit 113d2ac145b8202bdcadecc21518c7aefcdc9bfa +Author: nojhan +Date: Thu Aug 19 22:04:01 2010 +0200 + + more sections to jump to + +commit 52eeae0f5b163476a248d22d738e50c42d1f7b52 +Author: nojhan +Date: Thu Aug 19 21:45:19 2010 +0200 + + correct links to sourceforge features + +commit 82c873fc1a32f74f30488466def189026630b180 +Author: nojhan +Date: Thu Aug 19 20:38:19 2010 +0200 + + bugfix #2054922: using base_const_iterator::node; + +commit bb5b1965c75cd633e0a94d50169ecd23c5d1ed06 +Author: Caner CANDAN +Date: Wed Aug 18 17:30:11 2010 +0200 + + * eoDetSelect: when the call of howmany() returns 0 it is replaced by 1 + +commit 8e858e8fff373c5635758de7a61395157d5c673e +Author: Caner CANDAN +Date: Wed Aug 18 17:18:36 2010 +0200 + + fixed a warning issue at the file eoRealBounds.cpp + +commit 7159f8e5c43166269e34bd551c0c6ca1c9a40b24 +Author: Caner CANDAN +Date: Wed Aug 18 17:06:16 2010 +0200 + + + cpack configuration in order to generate packaging files, to make it easier use the script package_deb and package_rpm + +commit 9632d429dc6a48e5bef597060cba1b71f192584f +Merge: 0a37f66 6ec3fc5 +Author: Caner CANDAN +Date: Wed Aug 18 12:16:13 2010 +0200 + + Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev + +commit 6ec3fc5c09a275b8fa92a8485524f68106309f9a +Author: Johann Dreo +Date: Tue Aug 17 15:11:18 2010 +0200 + + correct headers ; class comment + +commit 8896fec32152a6b22a87b4ac8038bcfd0f36e150 +Author: Johann Dreo +Date: Tue Aug 17 15:07:17 2010 +0200 + + improved explanations + +commit 4ba3f62a3a5ed032ae0519ac75af7d3e38f1e0f7 +Author: Johann Dreo +Date: Tue Aug 17 15:02:39 2010 +0200 + + missing header ; correct copyright ; correct emails + +commit d698065579e2410d2f62b2fbbc13442edc918d90 +Author: Johann Dreo +Date: Tue Aug 17 14:59:24 2010 +0200 + + translate variable from french to english + +commit ce99bb02f1f6624d650ff103349f64ffed279c53 +Author: Johann Dreo +Date: Tue Aug 17 14:56:33 2010 +0200 + + use eo::log ; warning when returns 0 + +commit 0a37f66ef0f22ee5232cac9f5b2830fa580fb7db +Merge: 9f4c073 68a03aa +Author: Caner CANDAN +Date: Wed Aug 4 14:10:57 2010 +0200 + + Merge branch 'yaml_load_and_save' of ssh://localhost:9001/gitroot/eodev/eodev + +commit 1ecf4d3def049e8496b7d8f8382a165a7b7f931e +Author: Caner CANDAN +Date: Wed Aug 4 13:47:51 2010 +0200 + + + feature eoSIGContinue: Continuator can catch user signals + feature eoLogger: flexible logging system for eo + +commit 9f4c073678ab98462055d8b9e8b2324c9b41822d +Author: Johann Dreo +Date: Mon Aug 2 17:07:32 2010 +0200 + + code to display only once the message about the help parameter + some indent fix + some more comments + +commit 1d1046d19f22bab1cdd9398bf9679d464cdfd91f +Author: nojhan +Date: Sun Aug 1 22:27:31 2010 +0200 + + list of some publications + +commit 82e7d3c04116f070c6b6d400d765e720852f0359 +Author: nojhan +Date: Sun Aug 1 10:55:38 2010 +0200 + + example diagrams now close to features list, with a better legend + +commit 9a5871cce26722098306198849d037c1b2ade800 +Author: nojhan +Date: Sat Jul 31 23:00:10 2010 +0200 + + better layout for the menu + +commit 6c4bdcff461d4f69ed6afd4a965df42385d62a1e +Author: nojhan +Date: Sat Jul 31 22:48:49 2010 +0200 + + correct layout in 1024, better spacing for greater resolutions + +commit f531247627fcb372a0b4ce96b6af62072838d771 +Author: nojhan +Date: Sat Jul 31 22:40:04 2010 +0200 + + 'jump to section' links and back links + +commit a9c4805ebd6abd7e62724f34e4415494313cc2c0 +Author: nojhan +Date: Sat Jul 31 22:14:09 2010 +0200 + + logo icon for sourceforge, without text, 48px + +commit 535b26b903abf89ce466ef675686475e6b3505a0 +Author: nojhan +Date: Sat Jul 31 22:06:27 2010 +0200 + + slides via slideshare, better section order, small design changes + +commit eee9b46c0bd4f7976ee10a5149dec86544265987 +Author: nojhan +Date: Sat Jul 31 18:59:12 2010 +0200 + + website sources + +commit d3fc6438c0e6016cee1af61ea2890c5ecdfb51df +Author: nojhan +Date: Thu Jul 29 14:28:05 2010 +0200 + + no more CVSROOT + +commit ed35ed4da09b37ea13859a609e0c78d7bcf3d9e4 +Author: paradiseo +Date: Tue Jun 22 09:31:58 2010 +0000 + + Store a result in a variable to have no warning + +commit 0695b25c08782bb1cd435ef7ecc6a22a3c6f37d6 +Author: paradiseo +Date: Thu Jun 10 10:03:26 2010 +0000 + + Add "Visual Studio 10" in config file for CMake + +commit 68a03aa429b6fecf26e1d1942f11cefe62a01455 +Author: stevemadere +Date: Fri May 7 03:17:44 2010 +0000 + + changed YAML saving technique to YAML::Serializable + +commit e58ef45f70f76d1ef0fcdb33d756760ffebfa82c +Author: stevemadere +Date: Thu May 6 22:46:10 2010 +0000 + + added support to save app/gprop/mlp as YAML + +commit f8bd8605794dbbd25463f93613443d085d939864 +Author: stevemadere +Date: Tue May 4 17:18:12 2010 +0000 + + configure changes to prepare for use of libyaml-cpp + +commit 7f81c03af4249a6251c49282f1e9b558aa5b711b +Author: (EO team) <(EO team)> +Date: Tue May 4 13:00:51 2010 +0000 + + This commit was manufactured by cvs2svn to create branch + 'yaml_load_and_save'. + +commit abc65a390a67d1ef603534a0005a2dcbd8d002e4 +Author: stevemadere +Date: Tue May 4 13:00:50 2010 +0000 + + Reflecting build process changes in doc and source tree (now using autogen.sh;./configure) + +commit 8214fe3f5e94e4dd8defb9078f606d3ba5455100 +Author: stevemadere +Date: Tue May 4 12:56:54 2010 +0000 + + Added includes necessary to compile using gcc 4.4 + +commit dfad82c0431cf53846436ca51c07aae09d226aba +Author: stevemadere +Date: Tue May 4 12:54:36 2010 +0000 + + Removed references to eliminated headers eoDummyFlight.h, eoLSPSO.h, eoSSPSO.h + +commit 227e7fd2e5df41ddf361c8d08ac4eaa0770f535e +Author: stevemadere +Date: Tue May 4 12:50:29 2010 +0000 + + Removed reference to Lesson6 until its makefile is fixed + +commit 8c07ca4cc5329cbf4376a1ceb9f0f53035fcdb02 +Author: paradiseo +Date: Thu Mar 18 12:44:45 2010 +0000 + + add an include + +commit a2703a8eabd8284107bfbfc016a70bce33ef3850 +Author: paradiseo +Date: Wed Dec 9 15:49:30 2009 +0000 + + No real change -> test commit + +commit d46117cda1348ad4ba3544bca457e13ef8d3bc4c +Author: paradiseo +Date: Thu Jun 25 14:49:53 2009 +0000 + + Accept long time + +commit 45ce5f84043eba5327ab3cfd2401ec9c23cf0dc7 +Author: paradiseo +Date: Tue Jan 27 16:30:18 2009 +0000 + + little change to delete warnings + +commit b20c5e98c148fb3ac2398d0690e758e1985ed512 +Author: paradiseo +Date: Tue Jan 27 16:28:55 2009 +0000 + + little modif to delete warning + +commit eca555a7a315b528f9ce89333b5f494da2ad458c +Author: paradiseo +Date: Tue Jan 27 16:26:44 2009 +0000 + + little change to delete warning + +commit 6563aa6e7aa99e8f0fb71755cebacf83eb3eda58 +Author: paradiseo +Date: Tue Jan 27 16:21:53 2009 +0000 + + little modif to delete warning + +commit bda9e1c712ff1444996b31e5ff92864ad9d458f4 +Author: paradiseo +Date: Mon Jan 26 14:39:37 2009 +0000 + + Change Compiler flags + +commit cfd7f2b008363f1f15b43c3cf7b9e45f188d6878 +Author: paradiseo +Date: Mon Jan 26 13:43:40 2009 +0000 + + disable warning C4530 (Visual Studio) + +commit 072979a705b152f13b1a7c73a224596230e0009a +Author: paradiseo +Date: Mon Jan 26 13:38:01 2009 +0000 + + option added to disable warning (mode release with Visual Studio) + +commit 7fc04f1de76217f43121387854c64a07294c79e6 +Author: paradiseo +Date: Mon Jan 26 09:07:59 2009 +0000 + + cmake < 2.6 authorized + +commit 37c3989ee902f0cb78261d8b36a1c9f49fe18804 +Author: paradiseo +Date: Thu Jan 22 10:18:10 2009 +0000 + + test on PSO changed. + +commit 1204ce35b7af1101ee221c58500197a9d5dd8098 +Author: paradiseo +Date: Fri Jan 16 14:29:42 2009 +0000 + + modif cmake + +commit 080f98bffafc29df4daa78ac343e2ac8978b943b +Author: paradiseo +Date: Wed Jan 14 14:50:46 2009 +0000 + + Cmake configuration modified + +commit f2d19ce1878326343a641e748f1cb5257d506da8 +Author: paradiseo +Date: Mon Jan 12 09:14:02 2009 +0000 + + Update to cmake2.6 + modif to support compatibility with icc + +commit 893204f8f1293644092ff1541ac2234af0faa44d +Author: evomarc +Date: Thu Dec 25 16:01:57 2008 +0000 + + Fixing a small glitch that was giving wrong clues to newcomers ... + Thanks to Christophe-Marie Duquesne for the post + +commit 8c40a38cdc672175839c90f3132ba935bafd4d56 +Author: paradiseo +Date: Fri Dec 5 13:55:41 2008 +0000 + + add "=0;" at the end of two virtual method + +commit 916152b02ef1373e1a7517b473731a1bfc96b25b +Author: paradiseo +Date: Thu Nov 20 16:35:47 2008 +0000 + + remove DartConfig + +commit 48204d18ff68108472ddd4d7f4544c0663abe562 +Author: paradiseo +Date: Mon Nov 17 10:27:55 2008 +0000 + + Switch from Dart to Dash. + +commit 462d3ac5683c818ae92a16df1e5a7ab79a26a972 +Author: jeggermo +Date: Tue Nov 11 09:51:17 2008 +0000 + + fixed some very old and stupid problems + +commit 512c18b0d06c3ec1c972016ee13df89dfc7d77cf +Author: jeggermo +Date: Tue Nov 11 09:50:52 2008 +0000 + + fixed some stupid problems + +commit 74c5be143994aa239169d0f5bc317cfe44793753 +Author: maartenkeijzer +Date: Mon May 5 12:33:26 2008 +0000 + + updated configure.in to generate moo files + +commit aa33f98459d05f8bbb829948fc54524ab112afee +Author: tlegrand +Date: Fri Apr 18 12:00:15 2008 +0000 + + deleted "win" directory in the autotools config + +commit a93ed43907db7426d72318bdca73f0096a606eed +Author: tlegrand +Date: Fri Apr 18 08:59:02 2008 +0000 + + added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities + +commit a1ee120589c7df7270a42027ed4cc2af6fcd5c5e +Author: tlegrand +Date: Fri Apr 18 08:58:42 2008 +0000 + + imrproved PSO topology/velocity tests + +commit 49d3df2cc4f3683e1416c36ac68ad85bb722cb09 +Author: tlegrand +Date: Fri Apr 18 08:51:38 2008 +0000 + + updated the doc tags + +commit 78a798d169fad5043fb98e4648192b6163f0e638 +Author: tlegrand +Date: Fri Apr 18 08:50:22 2008 +0000 + + added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities + +commit aaa8df129b222063eb2891effb6e9a6271ffd9ee +Author: tlegrand +Date: Fri Apr 18 08:19:22 2008 +0000 + + updated a few things about paradiseo (links, docs) + +commit 9d3da02ea95cc7237e5a52cfcd96a03010d02c27 +Author: tlegrand +Date: Fri Apr 18 07:58:17 2008 +0000 + + deleted old and obsolete paradiseo's pdf slides + +commit 4b844243cebb20dc68a26f9f00cfd3588fa45267 +Author: paradiseo +Date: Thu Apr 17 14:31:11 2008 +0000 + + new implementation of the test + +commit b2404c9daa6a3fe1715130a88c657300db47f115 +Author: paradiseo +Date: Thu Apr 17 14:29:57 2008 +0000 + + Add t-eoOrderXover in the test list + +commit 08d4b90578e29b8df21fa2e9fc2c918eef981232 +Author: paradiseo +Date: Thu Apr 17 14:29:10 2008 +0000 + + test of eoOrderXover + +commit 7a7340f9ad3e224dd88c6af3991123414edea884 +Author: paradiseo +Date: Thu Apr 17 14:26:59 2008 +0000 + + new crossover dedicated to permutation-based representation + +commit 86cda0d3b6d8f01c149b4aaefd3ad49c5a96dfca +Author: kuepper +Date: Mon Mar 31 19:12:12 2008 +0000 + + start preparation for 1.1 release + +commit 0388f957581593bc98488ada6cea60b733a8cfda +Author: kuepper +Date: Mon Mar 31 19:11:13 2008 +0000 + + Update for gcc-4.3 compatibility + +commit 1187a83c8235957094674b25c7d65afcf6593a75 +Author: kuepper +Date: Mon Mar 31 13:35:41 2008 +0000 + + Add climits header as required for gcc-4.3 when using UINT_MAX + +commit fb6201a1449f90816abcf8153d4d28a216eac88b +Author: ldacosta +Date: Mon Mar 31 12:53:51 2008 +0000 + + make_continue... just a little formatting + +commit fac8fc0742f4547220a8f3de9bc39c064a2954aa +Author: ldacosta +Date: Fri Mar 28 16:24:17 2008 +0000 + + Output functor is needed if there is screen output OR FILE OUTPUT - until now, it was only created and stored in the screen output was activated. Line 120 of make_checkpoint.h + +commit 64fb5d2c4510ed560d7b1af90ddd5bd51734e04d +Author: ldacosta +Date: Fri Mar 28 16:09:40 2008 +0000 + + Change in do_make_checkpoint: it receives not just a parameter from the evaluation function, not the function itself!! + +commit af8cd4b08bcb7b13201ac054627e3313120bb393 +Author: ldacosta +Date: Fri Mar 28 15:57:55 2008 +0000 + + Adjusting configuration for Eclipse + +commit 8c1726ef9715f2055346416e353bcde8e8f04809 +Author: ldacosta +Date: Fri Mar 28 15:51:48 2008 +0000 + + do_make_algo_scalar is extended: now it accepts also an evaluation of the fitness of the population as parameter. + +commit c86d07fed3f625f8d6e688e18c8ae79ed974115e +Author: ldacosta +Date: Fri Mar 28 13:49:14 2008 +0000 + + "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names + +commit 3e17a2dd67ceae010ab5a9136518d5abefd353c4 +Author: ldacosta +Date: Fri Mar 28 13:49:13 2008 +0000 + + "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names + +commit aee8aa452f5d053f4dcb8ebcc5c0ea4351197a02 +Author: tlegrand +Date: Thu Mar 20 15:48:31 2008 +0000 + + come back to dart.irisa.fr ! + +commit 52d9a1fed95675b9e7973aba2855f76c870d3201 +Author: tlegrand +Date: Thu Mar 20 08:43:44 2008 +0000 + + added minimal test config + +commit 860040ae53f506af63b0d881d44d99352e6b9f4e +Author: ldacosta +Date: Thu Mar 13 16:28:34 2008 +0000 + + "Tutorial" (with capital T) was interfering with the checkout of eo on Eclipse (because there is already one "tutorial", with "t"). This is just a renaming of "Tutorial". + +commit 575660e9034377e0c9e703f5c065bf1e55ed727a +Author: tlegrand +Date: Wed Mar 12 15:36:58 2008 +0000 + + replaced ParadisEO links + +commit 9c62897d10336f61c3bf40f43bc7e7ba9dc4b285 +Author: tlegrand +Date: Wed Mar 12 15:29:29 2008 +0000 + + replaced ParadisEO links + +commit b3c99998a36248e97c2777f40b170c76e68efed3 +Author: tlegrand +Date: Wed Mar 12 15:23:35 2008 +0000 + + added lesson6 + +commit 50c6c59bc3efd2673cba40d2f528a9e2d700eb07 +Author: tlegrand +Date: Wed Mar 12 14:59:03 2008 +0000 + + added lesson 6 subdir + +commit ad5e398ff39a47a5369b15cb39118dd0ceb9021b +Author: tlegrand +Date: Tue Mar 11 13:16:35 2008 +0000 + + changed dart server + +commit 137cb9d28afbcfb0a608e2cd13bcfff9383a6c69 +Author: tlegrand +Date: Mon Mar 10 14:27:19 2008 +0000 + + added coverage flags + visual studio 9 specific flags + +commit b6b5742369957c85ef1824431ecff8eb20c0132d +Author: tlegrand +Date: Thu Mar 6 17:05:16 2008 +0000 + + deleted CMAKE_BUILD_TYPE tags and management + +commit f532a3f109b241744f3bb2cbecdf1acf80646aa5 +Author: tlegrand +Date: Wed Mar 5 09:41:24 2008 +0000 + + deleted old customized LL/SS PSO algorithms + +commit edc049f8044df51ee297f6cf958dca5786fcbaed +Author: tlegrand +Date: Wed Mar 5 09:06:50 2008 +0000 + + added lesson6 subdir + +commit 4ad79a91487d784dda89198bf8b03b4ced59c705 +Author: tlegrand +Date: Tue Mar 4 14:01:29 2008 +0000 + + Added new lesson (6) dedicated to the PSO. Also changed a few things into the PSO-dedicated components (constructors) + +commit 4834adbe5f03e5f324b750f1f869e2f1bf9b09e0 +Author: tlegrand +Date: Tue Feb 26 14:53:32 2008 +0000 + + corrected bad index error when uniform()=0 in roulette_wheel. The error was: if fortune=0, we first have "int i=0", then "return --i" . + +commit 28abc86db7a530a5664eec27c9ca43b8d50428d0 +Author: tlegrand +Date: Wed Feb 20 10:07:49 2008 +0000 + + changed nightly start time : EDT -> WEST + +commit 82eb5028936c410ba5435120f7bd1f8b370fe8b1 +Author: kuepper +Date: Mon Feb 18 20:14:47 2008 +0000 + + fix SF doc-generation, + remove absolute paths + +commit b08b22f172f67f73a47a9e9696c9074e9261883c +Author: tlegrand +Date: Mon Feb 18 15:08:08 2008 +0000 + + added nighlty start date for Dart config + +commit 4818863cd09ad8dfbc54ebe5db0356359aba5e9e +Author: tlegrand +Date: Mon Feb 18 14:43:09 2008 +0000 + + set new gcc warning flags -Wall & -Wextra (deleted the others) + +commit 596d24511adabc8cab226f7acf8f694c88262ab9 +Author: tlegrand +Date: Fri Feb 15 13:10:06 2008 +0000 + + Replaced "_isOneIndexed" boolean by an unsigned "_startFrom" + +commit 259dad2820d0585ee11fe21442301b16774be550 +Author: tlegrand +Date: Fri Feb 15 12:50:58 2008 +0000 + + Completed eoInitPermutation: CTor now has a "isOneIndexed" parameter to assign 1..Indi_size as genotype values instead of 0..Indi_size + +commit 25719d800cadbf73f8f5243ec93ac048b923ec60 +Author: tlegrand +Date: Thu Feb 14 09:08:42 2008 +0000 + + added "IF(ENABLE_CMAKE_TESTING)" to add test only if they have been enabled + +commit 60e8d2bc0f729e77057a668ab93e0dc997b11dea +Author: tlegrand +Date: Thu Feb 14 08:39:41 2008 +0000 + + Added DartConfig for Dart reporting. By default CTest will submit to dart.irisa.fr (project ParadisEO). + +commit af0f4fdd4269eca09dc6144c83f794ec54644bd1 +Author: tlegrand +Date: Thu Feb 14 08:28:47 2008 +0000 + + Added cl compiler flags + new DartConfig + +commit fba67414df3009b0ace322d3e170881b96442fa3 +Author: tlegrand +Date: Thu Feb 14 08:23:48 2008 +0000 + + set warning flags to OFF + +commit 1613342bcf902ce9e6168c5cb42eedbe40e550b3 +Author: tlegrand +Date: Thu Feb 14 08:23:16 2008 +0000 + + deleted cxx flags for cl compiler. They have been moved to the CMakeLists.txt at the top level + +commit 2273573e04e193f82d6df3b3cab17a90cc3a1f6e +Author: paradiseo +Date: Thu Jan 24 08:35:11 2008 +0000 + + Addition of a method sort for PSO + +commit ef8bc7b03f5b69818d0e2e021e343c588218e7ee +Author: paradiseo +Date: Fri Jan 18 09:49:16 2008 +0000 + + Modification of cotinuator.h + +commit d7682cae19b994cc9f2b455a92c199091113483b +Author: tlegrand +Date: Thu Jan 17 13:08:21 2008 +0000 + + added generic continuator for tests. just an "continuator" class extended by eoContinue. No impact for the rest. + +commit de5e71eb551873fac7907ef94b0047aabd59d064 +Author: tlegrand +Date: Wed Jan 16 08:30:38 2008 +0000 + + removed bad semicolon at the end of a "{}" bloc which is not a class/template/struct. + Debugged using g++ flags + +commit 012c71e8fbb0292bef25061e11dd8a72b8dbf0ae +Author: tlegrand +Date: Wed Jan 16 08:14:18 2008 +0000 + + corrected contructor parameter names. All tests OK + +commit e8883486f6102b7de41f063caefd869930834b8a +Author: tlegrand +Date: Tue Jan 15 13:57:32 2008 +0000 + + renamed "globalBest" parameter in "globalBest" function ... + +commit 5cbbe83a0effae8e3576ebe14ea6b1d8cebc4a05 +Author: tlegrand +Date: Tue Jan 15 13:53:18 2008 +0000 + + removed bad semicolon at the end of a "{}" bloc which is not a class/template. + Debugged using g++ flags (see CMakeLists.txt at the root) + +commit f3e1e35ea36a6ca9099947a7f67c5f0748866b43 +Author: tlegrand +Date: Tue Jan 8 15:34:43 2008 +0000 + + corrected weight factor and updated doc + +commit ef252cf7de046c5d47b0ede07f12b3d46fe055e4 +Author: tlegrand +Date: Tue Jan 8 15:13:32 2008 +0000 + + corrected PSO dummy errors and completed documentation + +commit 4b99bc8bc957f8b242672971f34c53d66ecb876d +Author: tlegrand +Date: Tue Jan 8 14:50:13 2008 +0000 + + corrected PSO dummy errors and completed documentation + +commit b8da2db21fbe849118508526fe3180c63f923175 +Author: evomarc +Date: Sat Dec 8 15:05:51 2007 +0000 + + Added the GDB trick to visualize the components of a vector + (but it still doesn't work with EO objects, though???) + +commit f2b98abd906f36611a1b017d275bce222fbe81e8 +Author: evomarc +Date: Sat Dec 8 14:49:52 2007 +0000 + + 3 identical typos in 3 different files :-) + +commit 465874cb0bc2524783de68b8c23c6c3a8215d10b +Author: tlegrand +Date: Mon Nov 26 08:00:25 2007 +0000 + + Warning: A '_WINDOWS' definition is added to compile four Unix-dedicated files (eoCtrlCContinue.h,eoCtrlCContinue.cpp, pipecom.h, pipecom.cpp). The same definition should be added in the automake configuration file to ensure the compatibility. + +commit 5ee50170b0b7dd726cc9ab49ba20ad60777e0972 +Author: tlegrand +Date: Mon Nov 26 07:56:08 2007 +0000 + + added definition _WINDOWS for (mingw and others) compatibility + +commit 18adaef0568f3ff99f1c452eef389843b85c3fa4 +Author: maartenkeijzer +Date: Mon Nov 12 16:23:57 2007 +0000 + + Updated makefiles, updated the moo stuff and cleaned up some stuff that refused to compile + +commit ffb683368f299d09da928898e45db56631d9993b +Author: tlegrand +Date: Mon Nov 12 15:48:56 2007 +0000 + + indented file + +commit 7ffea6f818d954a27c6687ed47f6e152d84b6191 +Author: tlegrand +Date: Mon Nov 12 15:46:42 2007 +0000 + + completed with pso new components + +commit 942f5214e0c0f80467e8c6653e2813c0df463378 +Author: tlegrand +Date: Mon Nov 12 15:45:27 2007 +0000 + + completed pso topologies+velocities + +commit 0280487348d2de94c069f01ffa7488f70ef0b0a3 +Author: tlegrand +Date: Mon Nov 12 15:43:43 2007 +0000 + + added pso initializer+ integerVelocity + +commit 2767fadf90396599c25bc1f28d2c6c2cf707a0d3 +Author: tlegrand +Date: Mon Nov 12 15:41:46 2007 +0000 + + added permutation init + +commit ec112ae2f271db9299713ffca86b37059298a6a9 +Author: tlegrand +Date: Mon Nov 12 15:41:09 2007 +0000 + + added permut components + +commit 0aa67ac17b04ecf0e98ee707845e9fcf43ebd709 +Author: tlegrand +Date: Thu Oct 11 14:14:10 2007 +0000 + + added test for permutation components + +commit 141ccae1dd2a3956e293ed0f5ba93e552281622f +Author: tlegrand +Date: Thu Oct 11 14:10:27 2007 +0000 + + added generic parameter for sigmoid function + +commit b17888d0b4b8a62b22c6ef32733921b553b4cddc +Author: tlegrand +Date: Thu Oct 11 14:08:41 2007 +0000 + + added new tests + +commit 9174a37355fc7b48d6ee3266b9b4ea763a138b82 +Author: tlegrand +Date: Thu Oct 11 14:08:06 2007 +0000 + + added PSO ring topology test + +commit 9ff1e99715b483c9a1f902a9c11c10e09e87b3ba +Author: tlegrand +Date: Thu Oct 11 14:03:18 2007 +0000 + + added PSO ring topology + +commit 65907b622241147e9462480b16cb6027499b3a4e +Author: tlegrand +Date: Mon Oct 8 15:33:46 2007 +0000 + + *** empty log message *** + +commit c864f2deb543afbdf7c82fdd921b77fc944b2829 +Author: tlegrand +Date: Mon Oct 8 15:22:25 2007 +0000 + + added best position updating + printOn + +commit 7d89f5a97c2f8862e8fc36cfa121ef3442d2b2ac +Author: tlegrand +Date: Thu Oct 4 15:10:11 2007 +0000 + + added autoconf > 2.6 compatibility + +commit f5789db336f78e76f1bd21ba9f288ecbc5f9bc87 +Author: kuepper +Date: Tue Sep 25 21:29:31 2007 +0000 + + add coding cookies for Emacs and vim + +commit 3f5d0df3ee368eb1627d0db077b0d7e6e659b2b3 +Author: maartenkeijzer +Date: Sun Sep 23 08:37:09 2007 +0000 + + added patched tcc source tree + +commit 40f5377cf14418f4b6157efc3b1fd2e676e5c6cd +Author: maartenkeijzer +Date: Sun Sep 23 08:35:51 2007 +0000 + + updated include dependencies + +commit 6b0cfffe09bea60967d0de57ecbbcab19c69bf16 +Author: tlegrand +Date: Wed Sep 19 11:45:19 2007 +0000 + + Added #ifdef HAVE_GNUPLOT for Windows compatibility + +commit b1220d189b6a97dd68afa601606486bf978366f1 +Author: tlegrand +Date: Wed Sep 19 11:44:39 2007 +0000 + + Added eoNSGA_II classes in eomoo lib + +commit 1063826d14702f9b1efe9347ca5733a61b8549c0 +Author: tlegrand +Date: Wed Sep 19 11:41:08 2007 +0000 + + Forget gprop application under Visual Studio + +commit 1990bffd2b29b216dafe88d1cd646e57face521a +Author: tlegrand +Date: Wed Sep 19 11:40:31 2007 +0000 + + Several fixes + +commit 5b734537f6040450fe4f565a0cb9e75aea47247b +Author: tlegrand +Date: Wed Sep 19 11:32:47 2007 +0000 + + Added basic CMake file + +commit c28be053cc02ef8719e1e51624a9a5c42a423207 +Author: tlegrand +Date: Tue Sep 18 15:40:31 2007 +0000 + + Avoid EONSGA in the lib (errors with Windows/MVS) + +commit 112b34bceb73710d239429f64d294ee8a06060fb +Author: tlegrand +Date: Tue Sep 18 15:12:22 2007 +0000 + + Completed CMake config + +commit 45dff2e35f3fef3f199968578b8d9a215463bf57 +Author: tlegrand +Date: Fri Sep 14 14:47:15 2007 +0000 + + Corrected missing eo.doxytag + +commit 0e264b575b6ede952032c15353b7550c82dd5716 +Author: tlegrand +Date: Thu Sep 13 15:13:15 2007 +0000 + + removed --force-missing option for Automake: incompatible with the latest versions + +commit 292f9cfd2acb96d7cdce1837d768af53e1195f7c +Author: tlegrand +Date: Thu Sep 13 13:36:13 2007 +0000 + + Added cmake support, deleted Autoconf/Automake stuff and made an easy-to-use process + +commit 04fcf88b4ca1540a68c59eae22279c0e661c1057 +Author: tlegrand +Date: Tue Sep 11 14:20:16 2007 +0000 + + Changed file format (to avoid Visual Studio errors): MAC --> DOS + +commit e5cd9cb3799de249e3eb4d762813c50701ac5c14 +Author: tlegrand +Date: Tue Sep 11 13:59:49 2007 +0000 + + Added HAVE_GNUPLOT checking + +commit 36c14fed9e196c5a15c5b7d84f8b46caa58bc14c +Author: maartenkeijzer +Date: Mon Sep 10 10:30:53 2007 +0000 + + Various changes and optimizations + +commit 373c26caba0a3d4523b8db590f03ba98748f86cb +Author: maartenkeijzer +Date: Thu Sep 6 08:15:22 2007 +0000 + + Woops, used the wrong sort here + +commit 2b303560fa7d50923c326f09fb625806c14a4653 +Author: maartenkeijzer +Date: Wed Sep 5 13:52:17 2007 +0000 + + added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc + +commit cb85c1925990581183a0767ec8de060faf627af9 +Author: maartenkeijzer +Date: Wed Sep 5 11:36:44 2007 +0000 + + added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc + +commit d78387591b96262227f8aec9249d9614b184883a +Author: maartenkeijzer +Date: Tue Sep 4 15:30:42 2007 +0000 + + added eoEpsMOEA support + +commit 29816fc1974380edc5a30dc08702650e16a0887e +Author: maartenkeijzer +Date: Tue Sep 4 15:26:45 2007 +0000 + + added epsilon moea + +commit 1be65a94ade6bb9790a7cd42e6656d2d525cdd69 +Author: maartenkeijzer +Date: Tue Sep 4 13:44:41 2007 +0000 + + made fitness() query return const reference + +commit fe9fe17eb61dcabe85a615d11f3ad678d8b389af +Author: maartenkeijzer +Date: Tue Sep 4 13:44:02 2007 +0000 + + removed const qualifier from choice() member + +commit b2ac3d69587cc2db633ab56b73f1423d75750849 +Author: maartenkeijzer +Date: Tue Sep 4 07:50:31 2007 +0000 + + Added member to get to the embedded fitness object + +commit 98f763466a6f12797005a203e695c02ee405ded0 +Author: maartenkeijzer +Date: Tue Sep 4 07:47:46 2007 +0000 + + Added reinitialization of fitness when fitness is invalidated. Needed this to clear worths in multi-objective case + +commit f93327a041ce43a9ddbc71ca8408e7b908383d5b +Author: maartenkeijzer +Date: Mon Sep 3 14:37:27 2007 +0000 + + several fixes + +commit f2f65d7ed48e7ff87c7295805370c45f647c341b +Author: maartenkeijzer +Date: Fri Aug 31 14:12:54 2007 +0000 + + more bugfixes + +commit 220c89d1d5151f37825ee9e0024dbdcfeb056fd8 +Author: maartenkeijzer +Date: Fri Aug 31 14:03:35 2007 +0000 + + changed eoTruncate to use sort. nth_element leads to weird results in moo case + +commit 1d4cfb0da813077f419ea334892c76d34774c072 +Author: maartenkeijzer +Date: Fri Aug 31 13:45:46 2007 +0000 + + made stuff virtual + +commit a5261fec51de7b410204eadfa60dc343bb1b1cd3 +Author: maartenkeijzer +Date: Fri Aug 31 13:27:40 2007 +0000 + + Refactoring + +commit 7e76e6e9c20cca25d01cb48756005083669761f8 +Author: maartenkeijzer +Date: Fri Aug 31 13:26:41 2007 +0000 + + updated nsga + +commit b11638cd5440914887713b552b1af285e5d7b25b +Author: maartenkeijzer +Date: Fri Aug 31 12:59:18 2007 +0000 + + refactoring + +commit ec2eaae4ce33c66471f88ed193e5fcc12138bc3c +Author: maartenkeijzer +Date: Fri Aug 31 11:19:26 2007 +0000 + + hmm not a good idea to replace with dummy + +commit 879da6b82e2e448b35e7cff405b1e3cd610d4ef1 +Author: maartenkeijzer +Date: Fri Aug 31 11:08:25 2007 +0000 + + update needed for multi-objective approach + +commit bc1207edb86d1c58d1ec103968e46776380bc27f +Author: maartenkeijzer +Date: Fri Aug 31 11:05:59 2007 +0000 + + updated comments + +commit 553586d55f23625bdfc75b52012b001c0b4ba021 +Author: maartenkeijzer +Date: Fri Aug 31 10:57:05 2007 +0000 + + added new multi-objective support + +commit 283026ed5cc336f9b7aa67295cdc75210cdb1030 +Author: maartenkeijzer +Date: Fri Aug 31 06:47:39 2007 +0000 + + fixed bug in NSGA-II, only niching on last objective + +commit 5f9b1a9bfd2f588ef6d5529e79d93257bad06407 +Author: maartenkeijzer +Date: Thu Aug 30 22:30:52 2007 +0000 + + fixed bug in NSGA-II, only niching on last objective + +commit 28e59ff06458a72d2cc276fc0d072547da5cca5e +Author: kuepper +Date: Wed Aug 22 07:30:47 2007 +0000 + + eoRNG.h (eoRng::random): Add comment on truncation as standard way of + floating point to integer conversion. + +commit 4c89acad7267a19c2724e22349109a96aff67830 +Author: kuepper +Date: Tue Aug 21 14:52:50 2007 +0000 + + Fix according to + [ 1663606 ] eoBitOp vector access + +commit 44fab2d8e4317f58b44fb0c1bde7978573862362 +Author: kuepper +Date: Tue Aug 21 14:50:55 2007 +0000 + + Fix wrong removalr of necessary include statement + +commit ac601df3716ff4a00442631851fa644f4d461f96 +Author: kuepper +Date: Tue Aug 21 14:47:14 2007 +0000 + + Correctly round towards zero in random(uint32_t) + +commit 797896e002b8f6204d6f5c3f7a3f61a1c6698775 +Author: kuepper +Date: Tue Aug 21 14:44:41 2007 +0000 + + Minor cleanup + +commit 2bbd2e0d8050e8bba5e546b241d9f9304c1fbce4 +Author: kuepper +Date: Tue Aug 21 13:58:53 2007 +0000 + + Fix typos + +commit ab0fd90f46d99f90579bce9e94a6291acce19319 +Author: maartenkeijzer +Date: Sat Aug 11 20:48:07 2007 +0000 + + brought gprop into 21st century + +commit 7f62a3f6f256887efd73298b4d0135a498522cd6 +Author: tlegrand +Date: Fri Aug 10 14:31:04 2007 +0000 + + added #ifdef SIGQUIT for windows compatibility + +commit 952bf0a1d8879bc5e9f9753bcf8f4f24830cd2d0 +Author: tlegrand +Date: Fri Aug 10 14:30:26 2007 +0000 + + added #define _MSC_VER_ for windows compatibility + +commit 89047a3db6b244fd2134694709a01fcbe34bc33f +Author: tlegrand +Date: Fri Aug 10 14:29:12 2007 +0000 + + added CMake configuration files + +commit fae3ee5b53d8724e6edee19acad6ce82eb172846 +Author: tlegrand +Date: Fri Aug 10 14:27:12 2007 +0000 + + added CMake configuration file + +commit 47b858df87f40d766d8a2776cc560e459712cd15 +Author: xohm +Date: Thu Aug 2 10:48:20 2007 +0000 + + Add extra functionwrapper to member 'size' + +commit a601ae0e8abc79845faa6577d662858a56ed4f03 +Author: xohm +Date: Thu Aug 2 10:47:15 2007 +0000 + + Excluded 'config.h' from windows build + +commit 1d19fdd3ecb5483abf1055270e2178f3a17a8517 +Author: xohm +Date: Thu Aug 2 10:46:07 2007 +0000 + + Add static var-declaration + +commit a6d670243d21588ada73656f306611e71e671c6d +Author: xohm +Date: Thu Aug 2 10:45:12 2007 +0000 + + Cmake multiplattform buildfile + +commit cf2310ff626a6bab543e99d5c91ecc5fa1384a55 +Author: xohm +Date: Thu Aug 2 10:15:13 2007 +0000 + + *** empty log message *** + +commit 99bb07466fc521e871ae8937038d36d26b7bc3f4 +Author: maartenkeijzer +Date: Tue Jul 17 13:03:29 2007 +0000 + + comments removed + +commit 39a6864e3da631bdabb95c74b8dc7db2b0423f3c +Author: maartenkeijzer +Date: Tue Jul 17 13:01:00 2007 +0000 + + Adding timed continuator + +commit 3adf8a19f4c0f3dfd385b8b83b525f18d5ffcb0c +Author: tlegrand +Date: Tue Jul 3 09:13:07 2007 +0000 + + added doc details to recognize particle swarm optimization + +commit 967b6b77415c2270162b455bfd8e3f817d64b1af +Author: tlegrand +Date: Mon Jul 2 13:05:14 2007 +0000 + + added t-eoEasyPSO test + +commit 12dacbe7de7b690ac54fa88431fd38d57415230f +Author: tlegrand +Date: Mon Jul 2 13:02:26 2007 +0000 + + added myself in the author list :-)) + +commit 703edd5087b6ad185a7e6311c7d3ae6ebd7f8f05 +Author: tlegrand +Date: Mon Jul 2 13:01:49 2007 +0000 + + particle-swarm-optimization includes added + +commit 860cb372b0a5d4e2eec1ea669c546cce31bbcf5b +Author: tlegrand +Date: Mon Jul 2 13:00:48 2007 +0000 + + removed unconsitent reference in "eoWeakElitistReplacement" (const EOT oldChamp) + +commit a290987e89fc4623be3407675598b292cddbaf3e +Author: tlegrand +Date: Mon Jul 2 12:59:49 2007 +0000 + + "dMatrix distMatrix(pSize*(pSize-1)/2)" replaced by "distMatrix(pSize) " + +commit bec7d02c50e06800b6ae77fc8280209f75702079 +Author: tlegrand +Date: Mon Jul 2 12:58:13 2007 +0000 + + particle-swarm-optimization main templates added + +commit a6de2b9a3a489770e1c1d7c2d24e3a585f911209 +Author: tlegrand +Date: Mon Jun 25 09:38:44 2007 +0000 + + PSO package - contains src+doc+examples and build process files - should be removed before integrating sources + +commit 742457ae3e0354831c9e8f3efe8a4d73a7d4d2e3 +Author: maartenkeijzer +Date: Tue Jun 19 17:48:16 2007 +0000 + + Re-enabled declone flag (seemed to be commented out for some reason) + +commit e930ff84ddc172ce7540f83ee4c10dc338ef0f10 +Author: jeggermo +Date: Thu May 3 14:00:50 2007 +0000 + + All debug (dll and non-dll libs) and release libs are placed in either debug or release + +commit abd3b9db593fe1aa91d58ffe6ac14a3e73b98147 +Author: jeggermo +Date: Thu May 3 13:54:27 2007 +0000 + + Added Multi-Threaded DLL projects settings for both deebug and release + +commit 8acc9dcbce155f18a8cbe7eb479249d7f3af2267 +Author: kuepper +Date: Thu Feb 22 08:27:32 2007 +0000 + + * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly + uninitialized variables. + + * README.tmpl: Hint to regular Templates/README for details. + + * README: Add documentation for adding new source-files. + + * Makefile.am.src-tmpl (noinst_HEADERS): Add + (MyStruct_SOURCES): Move header files from here to the new + noinst_HEADERS variable. + +commit 4a9c5127f8f96e7474ad8c1a745d57721a6e8b83 +Author: kuepper +Date: Tue Jan 23 22:25:57 2007 +0000 + + bump versions to 1.0.2-cvs + +commit 3107f12f30eb2f3c3f6c9a3847a986930717301b +Author: kuepper +Date: Tue Jan 23 22:23:31 2007 +0000 + + *** empty log message *** + +commit 6a4d4f6cabe4598c472fc7f76a7e4d872e10a673 +Author: kuepper +Date: Tue Jan 23 22:09:17 2007 +0000 + + updates for 1.0.1 release + +commit ba9d9f42e5fdf99afcd9980ce075908b79432778 +Author: evomarc +Date: Wed Jan 17 05:31:05 2007 +0000 + + Slightly modified the README.tmpl for more help to first-timers + +commit 5c255c805ed4594e63414faaa7255bbf37e1b7d6 +Author: kuepper +Date: Tue Jan 16 08:28:24 2007 +0000 + + Add instructions for bash. + +commit f7ce3d8b91cad80861710994f1a127f3bf1265f0 +Author: kuepper +Date: Sun Jan 14 18:56:31 2007 +0000 + + * createEOproject.sh: Set TargetDir to /tmp/. This is a workaround + for automake finding the scripts of eo itself if we run it in a embedded + subdirectory. + (COPYING, INSTALL): create. + + * README: State more explicitly what a "complete installation" means. + Give build-instructions for moved directories. + +commit ac67af6da398e244f155c6aa834a2d07366d8b2a +Author: kuepper +Date: Sun Jan 14 18:13:40 2007 +0000 + + State more explicitly what a "complete installation" means. + +commit 514a18aaf16ae6f69faf46ea4cf26a7b5cf2faa2 +Author: kuepper +Date: Fri Dec 29 14:16:01 2006 +0000 + + Update after release + +commit 7e4d81cc85956f8eedaed1cbf1d81a54e65a3729 +Author: kuepper +Date: Mon Dec 18 18:56:05 2006 +0000 + + (EXTRA_DIST): Add README's + +commit 513be8c25af1dcae6cf9a389f145aeb1a4a4206e +Author: kuepper +Date: Mon Dec 18 18:51:12 2006 +0000 + + Update for release. + +commit f1b702da217e3ad82275712eefccff02d9a5096d +Author: jeggermo +Date: Mon Dec 18 16:21:38 2006 +0000 + + Small changes to 2 readme files to stress that the release version are in + eo\win\lib\release and the debug versions in eo\win\lib\debug + +commit 30de251d7fbfd33759eeb4048bdb043401c0d075 +Author: kuepper +Date: Mon Dec 18 12:18:32 2006 +0000 + + * index.h: Add old ToDos + +commit 4ef6a360e5c03289e22d267d9d10ed2894e86caa +Author: kuepper +Date: Mon Dec 18 11:19:53 2006 +0000 + + *** empty log message *** + +commit 0afa0b9fa4f4bf7743bf549565531b35b71564c6 +Author: kuepper +Date: Mon Dec 18 11:17:55 2006 +0000 + + * TODO.html, README.html: Remove these old files. + + * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. + + * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 + +commit 51d6ddc239f4b125ed10f5a22a49d835332351c0 +Author: kuepper +Date: Sun Dec 17 23:18:33 2006 +0000 + + update + +commit 7adf24b71deaed320e670857699adb32ab64e7c4 +Author: kuepper +Date: Sun Dec 17 22:59:53 2006 +0000 + + * README: Better links to Templates/ + + * configure.in: Bump version to 1.0-beta2. + +commit 8e64e34e243c4c08d768eea288e208f4537d13e8 +Author: kuepper +Date: Sun Dec 17 22:56:03 2006 +0000 + + Remove these, potentially confusing files + +commit bdb09263277427563ec446773f5b3c5c74a86712 +Author: kuepper +Date: Sun Dec 17 22:50:26 2006 +0000 + + Added new README. + Removed old unnecesary files + +commit d6364b4bf63a334fd4881f92e67591f2763043ab +Author: kuepper +Date: Sat Dec 16 22:05:17 2006 +0000 + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + +commit 9a549fbf8354a5a8baea8a3f46e563d31c3829b0 +Author: kuepper +Date: Sat Dec 16 22:01:46 2006 +0000 + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + +commit 301e29ac0218078b32ec1ce60e77f495c8c63c6b +Author: kuepper +Date: Sat Dec 16 21:55:03 2006 +0000 + + * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use + correct names for includes. + + * README.manual: This is a copy of the old README. + + * README: Describe the new way and setup of creating a new EO project. + + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: + * configure.ac.tmpl: New files to create a standalone EO project from + templates. + +commit b28f39af40b60f0db3c58b6f0f09613bae59b96c +Author: uid24343 +Date: Thu Dec 7 21:54:48 2006 +0000 + + clean up + +commit e9956fad83b3071c4160231621b5000b4e6055c5 +Author: kuepper +Date: Thu Dec 7 21:36:33 2006 +0000 + + cleanup for release + +commit 05943b2a83124f623bf13113563ad390c7580c30 +Author: kuepper +Date: Tue Dec 5 08:42:39 2006 +0000 + + set version to 1.0-cvs again + +commit 1e743cb571d7b2de0d4741171a3e68eea571d35c +Author: kuepper +Date: Tue Dec 5 08:41:24 2006 +0000 + + (EXTRA_DIST): Add new MSVC project files to distribution. + +commit 651a55a51bf457cda7b2385cbfeb2d31d3ad2aaa +Author: kuepper +Date: Mon Dec 4 22:27:41 2006 +0000 + + * Makefile.am: Add t-eoRNG + + * t-eoRNG.cpp: Start test for random number generator. + +commit dbdeaf33531489ace941cf350c77c36cfae4611d +Author: kuepper +Date: Mon Dec 4 21:55:31 2006 +0000 + + (eoRng::normal(stdev)): Revert erroneous change. + +commit 422b0bfa3c2111f559ce7ca76555c0ca6681aebf +Author: kuepper +Date: Sun Dec 3 11:57:34 2006 +0000 + + Fixupper/lowercase issues + +commit 03e3c88b3059728d1df8f22e30d7398ac5d9ce66 +Author: kuepper +Date: Sun Dec 3 11:44:38 2006 +0000 + + fix html errors + +commit b4b4cbc3f229b9ffb84bf61a0644af0de6a63352 +Author: kuepper +Date: Sun Dec 3 11:40:25 2006 +0000 + + update + +commit af5d6583cd22da6014d1f6ecd693400855598c32 +Author: kuepper +Date: Sun Dec 3 11:24:41 2006 +0000 + + update, add link to Niko Hansen's comparison + +commit 02294002e3b2d6c11f35a7cd7d5a82f95be2ebfe +Author: kuepper +Date: Sun Dec 3 10:53:29 2006 +0000 + + update version number of next release + +commit ab9b38654d9bf5ac096beada568298e6707160d8 +Author: kuepper +Date: Sun Dec 3 10:41:54 2006 +0000 + + * mainpage.html: update, add link to Niko Hansen's comparison + + * README: Add more specific note about tutorial. + + * configure.in: Bump version to 1.0-beta1 + + * tutorial/Makefile.am: Add all necessary files, including html and + Templates to distribution. + +commit 20d37259e9ec3a4f605084bacb653db4db754880 +Author: evomarc +Date: Sun Dec 3 07:21:44 2006 +0000 + + Added a note to avoid that some dishonest researchers use teh code + in this tutorial as a basis for comparing their algorithms with "EAs" + as was done for the LEM3 algorithm in GECCO 2006. + +commit 0e2c6ccffcbc3e10e1be66e2275836ba1fbd20f9 +Author: kuepper +Date: Sat Dec 2 12:15:29 2006 +0000 + + update + +commit 14b3a61ba8e7a436d0ff0fe7392c51c30e3148b8 +Author: kuepper +Date: Sat Dec 2 11:46:34 2006 +0000 + + cleanup, docs + +commit 3533d8addbdb9fac52e5876c37e8a9027de6c2bd +Author: kuepper +Date: Sat Dec 2 11:36:29 2006 +0000 + + (VirusShiftMutation::operator()): Fix test for i>1. + This makes t-MGE1bit pass on x86_64 using GCC. + +commit 037ce32d90396584d3e6b4541786cbbe81df2f16 +Author: kuepper +Date: Sat Dec 2 11:32:00 2006 +0000 + + Change float to double. + +commit 3eba6b962c79ec7b2cca06756cb0d6dc533abaf2 +Author: kuepper +Date: Sat Dec 2 11:02:13 2006 +0000 + + Remove unnecessary tests. + +commit 7baf7cb799ba374446f1a4fc0070c9a8c5836d6f +Author: kuepper +Date: Sat Dec 2 10:18:57 2006 +0000 + + * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + + * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this + results in escape-codes (^@) to be printed at runtime and is not + necessary anyway. + + * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to + avoid compiler warnings. + +commit da50bf0986babee20266f0c62f3507ec4a9a75ab +Author: kuepper +Date: Sat Dec 2 09:39:13 2006 +0000 + + * eoRNG.h: Cleanup docs and document /all/ members. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + +commit c7ce6e70f32c1c2695cf16ccc625b944fef47565 +Author: kuepper +Date: Fri Dec 1 21:07:55 2006 +0000 + + minor typos + +commit e222eacd7490cdf4883298da102449f51dff70b8 +Author: kuepper +Date: Fri Dec 1 20:40:54 2006 +0000 + + Use C++ style cast. + +commit b2ce7bedb6b9416de1ae8800b00f18c31aff9aca +Author: kuepper +Date: Fri Dec 1 20:08:51 2006 +0000 + + * Makefile.am: Update for release-distribution. + + * Makefile.am: Add missing CMA header for distribution. + + * Makefile.am: Add missing header for distribution. + +commit bcaa0cf5e41476caaab29b73ee7dc7fb0291084d +Author: kuepper +Date: Fri Dec 1 10:49:47 2006 +0000 + + minor cleanup of code and docs, + resolve some compiler warnings + +commit 4c76c8959273e32d3e25cfae63cb88834b909fb0 +Author: okoenig +Date: Fri Dec 1 08:42:54 2006 +0000 + + Replaced float vars with double to avoid conversion warnings on VS 8.0 + +commit 692d26a881088032ebaabb8d3fda7e41b456d938 +Author: kuepper +Date: Wed Nov 29 23:47:40 2006 +0000 + + update for release + +commit 532aec85e54480aedbea9405a50c6fb31a67a122 +Author: kuepper +Date: Wed Nov 29 23:37:29 2006 +0000 + + Generally include + +commit 2558aa33fab2da1ad10d82a578c6bcb5224523bb +Author: okoenig +Date: Tue Nov 28 17:14:05 2006 +0000 + + Removing MAC line endings, because Windows VS 8.0 does not accept them. + +commit cc12fd27605df0828b18d30459c439d3c3a50fca +Author: okoenig +Date: Tue Nov 28 17:12:21 2006 +0000 + + Added additonal definition for operator< between fitness and ScalarType. Needed for compilation with VS 8.0. + +commit 975e0ffaadc63b6e2b4c0200c1e1183793b543d9 +Author: jeggermo +Date: Mon Nov 20 13:34:28 2006 +0000 + + Added Solution and Project files for MSVC 2003 + +commit 219e9bd648ac94f18b4ebd8a271dc825f03c24cf +Author: jeggermo +Date: Mon Nov 20 13:25:46 2006 +0000 + + Changed some files for compatibility with MSVC 2003 and 2005 + +commit 359c5ba8ec651991e8824b63e6c5d0c2a15b0e5a +Author: kuepper +Date: Thu Nov 16 13:21:41 2006 +0000 + + include + +commit e2e59d3e4901b9405a86cbe754dde1f681fe25b7 +Author: kuepper +Date: Thu Nov 16 12:52:46 2006 +0000 + + * configure.in (AC_DEBUG): add test + + * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, + or NDEBUG according to its value. + +commit d7b935b6455d1d70d17bb992db8663f43d6fe2ab +Author: kuepper +Date: Thu Nov 16 12:35:46 2006 +0000 + + * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: + If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise + always use vecSigmaInit with default all values of sigmaInit. + + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else + clause around ptParam (found or not). + + * eoParam.h (eoValueParam::setValue): Document. + (eoValueParam >::setValue): Allow delimiters ',' and + ';'. A plain ' ' does not work, as it is not correctly read by + eoParser::readFrom. + +commit 20c3369349cc9dfe11ccbd62f12cf1cd2605e175 +Author: kuepper +Date: Tue Jun 13 13:35:26 2006 +0000 + + update + +commit 10d582b31d2c5a779acd1dc950b339d897b07e2b +Author: kuepper +Date: Mon Mar 27 18:55:20 2006 +0000 + + Fix using directives for gcc-4.1 + +commit 929974805dd66c3f2a4ae3fe1b7c61b608a0e2f0 +Author: maartenkeijzer +Date: Sun Mar 26 13:33:25 2006 +0000 + + fixed t-eoCMAES.cpp test + +commit 5c913192e93528d001aefc847779eee40cce5ae5 +Author: kuepper +Date: Sun Mar 26 10:04:01 2006 +0000 + + Update docs, some cleanup + +commit f20a29beff542752b1beace903a69258bbd58b86 +Author: kuepper +Date: Sat Mar 25 13:03:45 2006 +0000 + + Start list of publications + +commit 89012a53b3d1dfda3f9fdc674ad0ec1d63a6476a +Author: kuepper +Date: Thu Mar 23 18:06:10 2006 +0000 + + Fix spelling + +commit 115429c1a0e4f4a026c95ca9c3e6d26c532aed17 +Author: kuepper +Date: Thu Mar 23 10:15:17 2006 +0000 + + update Makefile.am foe eoPeriodicContiunue addition + +commit 65eea59971fec429533a4d5c248bec8cd06785f0 +Author: maartenkeijzer +Date: Mon Mar 6 20:47:28 2006 +0000 + + making dimensionality requirement optional + +commit 948394e5b7d3d38437543407a11613d03d1ea3d8 +Author: maartenkeijzer +Date: Mon Mar 6 20:31:03 2006 +0000 + + making dimensionality requirement optional + +commit 6f06d3349dc0996856b1fceee96e003045ef7b88 +Author: cahon +Date: Tue Feb 28 14:40:37 2006 +0000 + + Adding a continuator + +commit d331301022e4283cbb52aceec2d4a695cbaed931 +Author: cahon +Date: Tue Feb 28 14:39:45 2006 +0000 + + New continuation strategy + +commit 9e874fcf39a97e7193120ecaf8ba5ca2abfaf229 +Author: evomarc +Date: Wed Feb 22 04:53:20 2006 +0000 + + Corrected a few typos, and acknowledged the fact that all Lessons are now + compiled within the installation procedure... + +commit e14b4a8d4841a76feaac6d070ca5edc0ba8df887 +Author: maartenkeijzer +Date: Mon Jan 23 15:12:49 2006 +0000 + + updated makefile to boost-python3.3 and python2.4 + +commit 116f21f182d3215acc78dcc6f2697de22828ebe5 +Author: evomarc +Date: Mon Jan 2 14:09:22 2006 +0000 + + Changed some bug in never-used-except-in-make_algo_easea.h file + (probably some change in the compiler made this stop working ???) + +commit 30a18fa8ca7d16b42ef2b04a6d3c59b028ff2d7b +Author: cahon +Date: Fri Dec 9 17:49:43 2005 +0000 + + eoGenContinue is now persistent + +commit 07ea076b1366dae5477114d26f7256bd82b04780 +Author: cahon +Date: Fri Dec 9 17:45:56 2005 +0000 + + eoContinue is now persistent + +commit 4ff1ac3e982ede5fa6f98df93c1524ae3c892629 +Author: kuepper +Date: Wed Dec 7 15:51:32 2005 +0000 + + fix build for our FC4 systems + +commit adbc5dd461b9aea179b60c7f8bb53f9ff704bdc4 +Author: kuepper +Date: Wed Dec 7 15:40:23 2005 +0000 + + fixes for gcc-4 compilation -- still have a linker problem + +commit 4b2093332579a615f9cbb4b6a083b893f57be028 +Author: maartenkeijzer +Date: Thu Nov 24 09:38:05 2005 +0000 + + kd + +commit 44876f0926ea44040f3261ed2f403f0ea90409f5 +Author: maartenkeijzer +Date: Thu Nov 24 09:35:34 2005 +0000 + + Various bugfixes and additions + +commit 14c3182200a9bd5fdff40e09c65fabd816c10a65 +Author: evomarc +Date: Tue Nov 8 11:34:12 2005 +0000 + + Removed the "using eoMonitor::vec from eoGnuplot1DMonitor.h because it generated + an internal compiler error with gcc4.0.0. + Repalced all occurences of "vec" by "this->vec" in eoGnuplot1DMonitor.cpp + so it is understood by the compiler :-( + +commit e07c50457198492bade2432cefd6c12474feb93c +Author: evomarc +Date: Tue Nov 8 11:31:01 2005 +0000 + + Removed extra colon (;) at end of class definitions. + They didn't hurt until gcc 3.4.1 but then they generated an error! + +commit ecbb2e3598c7734f1192beb8fa76ac15b6abb5b1 +Author: maartenkeijzer +Date: Mon Oct 17 12:46:53 2005 +0000 + + Woops, forgot to clear a static string for compile + +commit b4f15601cb3bca353191d83b6dde3bdd6066e560 +Author: maartenkeijzer +Date: Sun Oct 16 15:38:38 2005 +0000 + + Added lambda expression (user/automatically defined functions + +commit bac66449150e2549ff17264922ccaf3b24a6b26f +Author: maartenkeijzer +Date: Sat Oct 15 21:27:47 2005 +0000 + + Solved some issues and prepared the library for using unordered_map instead of hash_map (C++ TR1). Can only use this when g++-4.0.3 is out + +commit f128fcd86f7bf7852539404271a13af881e03fc8 +Author: maartenkeijzer +Date: Sat Oct 15 09:05:57 2005 +0000 + + Made eoGencontinue a ValueParam, so that it can be attached to a monitor + +commit be8873be4fd657a468524ac31bfe58e51e532d83 +Author: maartenkeijzer +Date: Fri Oct 14 16:14:37 2005 +0000 + + forgot to invalidate + +commit 0eee2ff13d39f97b362e58fff1541535d9a5ac17 +Author: maartenkeijzer +Date: Fri Oct 14 15:34:45 2005 +0000 + + Tester for CMA + +commit 8b03a5232a5710453379defe7adf1e6a74d63a75 +Author: maartenkeijzer +Date: Fri Oct 14 15:33:32 2005 +0000 + + Added CMA + +commit dd81a3ebc81eb78c395f4038f468bf9191d12dd2 +Author: maartenkeijzer +Date: Fri Oct 14 15:33:16 2005 +0000 + + added timed monitor + +commit d0c62606b35012ea4a616e760817798887bfd540 +Author: maartenkeijzer +Date: Wed Oct 12 18:35:13 2005 +0000 + + oops, stats.h was missing + +commit 72c8b3d1c59f33de708ac4b084a80757c84b38cd +Author: maartenkeijzer +Date: Tue Oct 11 08:15:29 2005 +0000 + + Added simplify and differentiation tests + +commit 89b76ab2618d1d8779aa5c602fc23021f819e278 +Author: kuepper +Date: Mon Oct 10 21:59:57 2005 +0000 + + prepare vecInitSize + +commit 4510b6d7126f37370e63dd50f875cdda8b24fcb1 +Author: kuepper +Date: Mon Oct 10 21:42:31 2005 +0000 + + cleanup, prepare vecSigmaInit change + +commit e9324fdb070574119876b1c86569302a6de0f2e5 +Author: kuepper +Date: Mon Oct 10 21:13:27 2005 +0000 + + cleanup + +commit 2934551289186f6dda97884196cecccf1031ea26 +Author: evomarc +Date: Mon Oct 10 13:34:21 2005 +0000 + + Added an accessor to the pointsize in eoeoGnuplot1DSnapshot.h + +commit 800a62ae34df21430b533172374e561c636dec97 +Author: evomarc +Date: Mon Oct 10 13:33:13 2005 +0000 + + Added an accessor to the pointsize, for do_make_checkpoint_pareto + +commit ffdce66c98d80d9f0d3920dfaad92e4097da3f65 +Author: maartenkeijzer +Date: Sun Oct 9 07:03:35 2005 +0000 + + Added symbolic differentiation + +commit 3ca7c0f6f473f79a15662fc0536c28bf590e0769 +Author: maartenkeijzer +Date: Fri Oct 7 13:31:20 2005 +0000 + + Faster scaled evaluation, etc. + +commit 4042798417f5f209cd61e2ca4aedc8317c0f9c67 +Author: maartenkeijzer +Date: Fri Oct 7 11:31:01 2005 +0000 + + Constant mutation + simplification added + +commit 05790afc2161d28e15c663f494264c8821a87aec +Author: evomarc +Date: Fri Oct 7 08:27:59 2005 +0000 + + A colon had mystriously dissappeared !!! + +commit 9f770670e5c59d4745a25fc1ba33fc3cebdf07c0 +Author: maartenkeijzer +Date: Thu Oct 6 22:26:59 2005 +0000 + + more ramblings in readme + +commit b55e86881788baf9eb0a1c22e8d9e198945b4eab +Author: maartenkeijzer +Date: Thu Oct 6 22:14:48 2005 +0000 + + Added constant getting and setting + +commit 93ad61538951d9f4123959bab25b601377ffa959 +Author: maartenkeijzer +Date: Thu Oct 6 18:10:13 2005 +0000 + + fix + +commit 7c3702f6a603fa5af9d7fe8425f87f31de9da1db +Author: kuepper +Date: Thu Oct 6 17:22:40 2005 +0000 + + Handle including from contrib/MGE nicely. + +commit c563e2c302692cbc53061742cc4b31a428b860c0 +Author: maartenkeijzer +Date: Thu Oct 6 14:31:09 2005 +0000 + + removed stray object files + +commit 92f2e523e0ddafa8e5f3a38c66bd6e846bc50f02 +Author: maartenkeijzer +Date: Thu Oct 6 12:25:00 2005 +0000 + + first fix in makefile + +commit 90702a435d8e4b019d511fc129e6b713afc56c6b +Author: maartenkeijzer +Date: Thu Oct 6 12:13:53 2005 +0000 + + Added mathsym+tcc and boost against all advice + +commit 58ae49dd99c60cde0753b5aeff10354d04d5ef12 +Author: maartenkeijzer +Date: Thu Oct 6 10:06:25 2005 +0000 + + Replaced GPL with LGPL license here. EO has always been LGPL + +commit 27883034167a8391c23a529d907607001ac85bd1 +Author: kuepper +Date: Wed Oct 5 22:22:25 2005 +0000 + + *** empty log message *** + +commit 3428a464c11b3ebdf785ef74e29cb0c9dba917ef +Author: kuepper +Date: Wed Oct 5 22:08:29 2005 +0000 + + typos + +commit e318a65aa329877ca2230af149d95eca6a34f652 +Author: kuepper +Date: Wed Oct 5 21:48:01 2005 +0000 + + cleanup + +commit ced022186e4ac9db4fa64bb12c37c95091ab1a41 +Author: kuepper +Date: Wed Oct 5 21:40:53 2005 +0000 + + comments + +commit afc0659e35540237c2537ca9c621507c00dd4919 +Author: kuepper +Date: Wed Oct 5 21:34:19 2005 +0000 + + finish the handling of gnuplot completely at build-time. + No gnuplot-ifs in headers anymore. + +commit 4eb298ac739f4e6844fd0366316316c629051baa +Author: kuepper +Date: Wed Oct 5 21:25:51 2005 +0000 + + some first external links + +commit 6cdab707904cf5c45d4e2fd2a68fd50a8a52d9ff +Author: kuepper +Date: Mon Oct 3 21:48:15 2005 +0000 + + *** empty log message *** + +commit 4bfc3afe9b76631d45d7374c18df184e9955bb77 +Author: kuepper +Date: Mon Oct 3 12:54:45 2005 +0000 + + *** empty log message *** + +commit a3d4ae8a1ee0a29beebfdccba51fbb4e60a8b689 +Author: kuepper +Date: Mon Oct 3 10:58:01 2005 +0000 + + cleanup + +commit d6fc655ccb879e9486cf67eada225bfc83e56fed +Author: kuepper +Date: Mon Oct 3 10:53:35 2005 +0000 + + clean up + +commit fe91e0104865c62586f7c61691e46c50f34b9b4a +Author: kuepper +Date: Mon Oct 3 10:32:56 2005 +0000 + + some nifty details, + passes W3 validator. + +commit 8fac249ba6720a80f30a26db1e58d5629957a134 +Author: kuepper +Date: Mon Oct 3 10:26:30 2005 +0000 + + clean up html + +commit 40e8f8a11f55885ed6eb3f29603f86371b65fead +Author: kuepper +Date: Mon Oct 3 10:10:09 2005 +0000 + + move logo to cvs + +commit 29f22eaa419582d3ff4bed2fe93591e68e065804 +Author: kuepper +Date: Mon Oct 3 10:06:26 2005 +0000 + + updates for release + +commit 665936864ca4edc68786654035938f89c2c4c6c2 +Author: kuepper +Date: Mon Oct 3 09:56:02 2005 +0000 + + Make clear that the docs are for the cvs code. + +commit ed5e1c120a62728e0d089c69218e5c0822285c0b +Author: kuepper +Date: Mon Oct 3 09:51:27 2005 +0000 + + update for release. + +commit 03b1689de99510eb5c8c4ab9a2b550c0d249d9ba +Author: kuepper +Date: Mon Oct 3 09:47:06 2005 +0000 + + Initialize booleans to get rid of compiler-warnings. + +commit 1f0ba7fab65a6c4be46516d30600d09209ef7292 +Author: kuepper +Date: Sun Oct 2 21:57:43 2005 +0000 + + fix foe gnuplot configuration-switch usage + +commit 47af7cfe5a3142a5c877c9a381d76552b4ed5c59 +Author: kuepper +Date: Sun Oct 2 21:42:08 2005 +0000 + + Clean up configure/build-process. + - assume C++ standard-conforming environment + - add a user-option for gnuplot-support + - separate gnuplot-code into declaration and implementation, + so we can define at EO-build-time whether to use it or not. + + Adopt code and Makefiles to above changes. + + Some minor fixes. + +commit 6485482f39d1155898797853fc26ad55cf531d02 +Author: kuepper +Date: Sat Oct 1 17:07:59 2005 +0000 + + *** empty log message *** + +commit 1926817eaed34d336bd745b243137ebbf2b35e91 +Author: kuepper +Date: Sat Oct 1 16:05:01 2005 +0000 + + add zip to dist, + update release-plan. + +commit 348375915a54cbc8b13b7c0d65434005706a22eb +Author: kuepper +Date: Sat Oct 1 15:35:45 2005 +0000 + + Search for ar as necessary on Solaris-x86. + Make DOXYGEN and AR precious variables. + +commit 88ebd6ffc1fe227e47cb9ce15f42e50672c26c8f +Author: kuepper +Date: Sat Oct 1 14:25:29 2005 +0000 + + update for solaris-x86 + +commit 12f80ea2919e8e0c28d00cd3cdb7f891cd7dc7e5 +Author: kuepper +Date: Sat Oct 1 14:00:42 2005 +0000 + + Include inttypes.h if available but stdint.h is not. + Add powerpc success. + +commit 76437817aee5c0d3cc223e5c4d8cf21c3170583e +Author: kuepper +Date: Sat Oct 1 13:27:25 2005 +0000 + + *** empty log message *** + +commit c71bc4618902011f35f003342d0b22e0dc24a458 +Author: kuepper +Date: Sat Oct 1 13:26:29 2005 +0000 + + *** empty log message *** + +commit 4addcb7374524629b9d8af8c008d3155d3b74b8f +Author: kuepper +Date: Sat Oct 1 13:07:01 2005 +0000 + + *** empty log message *** + +commit a3d4193333643a925b4e730c594c7907faeb54d7 +Author: kuepper +Date: Sat Oct 1 13:00:59 2005 +0000 + + update and clean up + +commit f7571db2da65293ec76bee53f1b39ce115f7239f +Author: kuepper +Date: Sat Oct 1 12:18:21 2005 +0000 + + *** empty log message *** + +commit c2dd7f6d01896b9cb7dfe314ae09f5e7fd9d1582 +Author: kuepper +Date: Sat Oct 1 12:13:00 2005 +0000 + + *** empty log message *** + +commit 1b59c07cba35a6b6db0e46a0657ac17786a9c8c1 +Author: kuepper +Date: Sat Oct 1 11:59:14 2005 +0000 + + update docs + clean Tutorial + bump version-number for cvs + +commit 676131832a7d49d55d30667dac630df716c91fb7 +Author: kuepper +Date: Fri Sep 30 21:16:24 2005 +0000 + + typo + +commit 5e208b467a19cf8c6adfc39a460791311d705e7e +Author: kuepper +Date: Fri Sep 30 11:47:26 2005 +0000 + + *** empty log message *** + +commit a28dbeed43446c8d0cfab1332b7eb63bb1f0d33b +Author: kuepper +Date: Thu Sep 29 22:08:19 2005 +0000 + + *** empty log message *** + +commit 8a4a1bc90360a651d4986788b9632e1f245e26bf +Author: kuepper +Date: Thu Sep 29 22:01:52 2005 +0000 + + add main web-page + +commit efee2faf3134c3ac6ed2f3a0704f02497402d2eb +Author: kuepper +Date: Thu Sep 29 16:53:06 2005 +0000 + + Use install to copy generated documentation. + +commit 09ebf789058fcda90b6c0248c34ed6bbe72d85fd +Author: kuepper +Date: Wed Sep 28 21:57:40 2005 +0000 + + remove forgotten config.h + +commit cf2a57dd88a6ac3654fa9fadbe56df9f4ed0397a +Author: kuepper +Date: Wed Sep 28 21:49:26 2005 +0000 + + Simplify configuration. + Remove support for (outdated) , require . + Require uint32_t for now, defined in stdint.h according to C99. + Some general cleanup and more documentation. + +commit abe55a641a8bc996629df4a94b23f5cf6c62ab47 +Author: kuepper +Date: Wed Sep 28 18:25:38 2005 +0000 + + Remove wrongly committed files. + +commit 21d534be674c0690a57c678fd52cef43659a3dcb +Author: kuepper +Date: Wed Sep 28 17:59:59 2005 +0000 + + Remove wrongly committed files. + +commit ccee1d22c337d59b63483ce1e1ed6a9ce114a72d +Author: kuepper +Date: Wed Sep 28 16:32:35 2005 +0000 + + Switch on documentation generation for private and static members. + +commit 57a07840c4c0fcef213217c6bd38b2a7ef06127d +Author: kuepper +Date: Wed Sep 28 14:32:12 2005 +0000 + + Some more documentation + +commit 3b7770fe3816c81b834c23cbc7b4173736c53db7 +Author: kuepper +Date: Wed Sep 28 10:00:16 2005 +0000 + + Add ignore-files to quiten cvs + +commit 439350bc56d1822f4ada5d573ac8f95b8f6fd51f +Author: kuepper +Date: Wed Sep 28 08:36:00 2005 +0000 + + documente for stdev_eps + +commit 3735dbaac48053373ccafaa8139779a85d2ae246 +Author: kuepper +Date: Tue Sep 27 22:06:08 2005 +0000 + + cleanup + +commit 0a57d80b1b0095ba234772b2681ba0e4202535ca +Author: kuepper +Date: Tue Sep 27 21:54:05 2005 +0000 + + documentation, whitespace + +commit c73cc51ab99c83612fe680fb708c138a5eada3ed +Author: maartenkeijzer +Date: Mon Sep 26 11:22:47 2005 +0000 + + Removed wrong reference to rng from choice members (what was I thinking?) + +commit 6e0c4a72642de8c67ad4438be96d2cd0de1cf8dd +Author: kuepper +Date: Mon Sep 26 10:18:15 2005 +0000 + + Make sure uint32_t is defined correctly in eoRNG.h and use it where + appropriate. + +commit 462fbaad6625feca04ddcf61737785265139cd7c +Author: maartenkeijzer +Date: Sun Sep 25 19:32:10 2005 +0000 + + Added few convenience functions + +commit cbfff8fda9a8e2c2f7fa4b2e9f25fcce124afa1b +Author: maartenkeijzer +Date: Sun Sep 25 19:09:38 2005 +0000 + + Added choice functions, plus rolled back inadvertant chance to eoRNG + +commit a3a9010e9af1077c5692e4673348f66291fabc77 +Author: kuepper +Date: Tue Sep 13 10:24:50 2005 +0000 + + setORcreate returns it parameter. + +commit 438e8ef6d63df36975ed9bb2039aa86d35ec4745 +Author: kuepper +Date: Mon Sep 12 17:53:25 2005 +0000 + + Use getORcreateParam instead of createParam when getting values from + the eoParser. + Update setORcreateParam. + +commit f948ccda3ac6b856e8659d485083b3cf90ce1281 +Author: maartenkeijzer +Date: Wed Sep 7 17:09:19 2005 +0000 + + eoRNG.h + +commit 471bd9a9e243d3a9be01be47a5e85013bfc7413c +Author: kuepper +Date: Mon Sep 5 17:04:13 2005 +0000 + + Remove paradiseo configuration switch + +commit 88a3a641c6e678cfd2822501ed6f8282bc00e777 +Author: kuepper +Date: Mon Sep 5 16:47:53 2005 +0000 + + Provide virtual destructors as gcc-4 barks heavily otherwise + +commit 54a3b8d10edaf298fa3a672055773949fa32043b +Author: kuepper +Date: Mon Sep 5 16:11:00 2005 +0000 + + ParadiesEO cleanup + +commit 2ca5ddb18682a2c2d1e69e2ea32cfe14cb1db756 +Author: kuepper +Date: Mon Sep 5 16:09:43 2005 +0000 + + Remove useless PAradisEO files + +commit d7ee654d6450fb268c8f7d9b1ea5fe81b1d737af +Author: kuepper +Date: Mon Sep 5 16:08:14 2005 +0000 + + Remove useless files from paradiseo directories + +commit 5a322446f08bb146751682575f9de77888f9a1d8 +Author: cahon +Date: Fri Sep 2 13:36:21 2005 +0000 + + Removing ParadisEO + +commit e1cc2dd7f5e7587cf05d2dfa190afd6261395a38 +Author: cahon +Date: Fri Sep 2 07:12:27 2005 +0000 + + Removing ParadisEO + +commit c498de10e2e25032023438dbfc8ebb8ec8f84784 +Author: cahon +Date: Fri Sep 2 07:00:45 2005 +0000 + + Removing ParadisEO + +commit f0fd15f20c806d65cf895c1a16c7e655417c6ed5 +Author: kuepper +Date: Mon Aug 29 07:50:50 2005 +0000 + + Provide eoParser::setORcreateParam to set a paramter in the parser to + a specific value. + +commit d418459a0121216d02dab8d5eda221c7c8c30a82 +Author: kuepper +Date: Mon Aug 29 07:32:13 2005 +0000 + + Install eoPropGAGenOp.h + Add #include in eoEsChromInit.h in order to make gcc-4.0 happy. + +commit f63e9c37920601ceea79235fca55873505781f76 +Author: evomarc +Date: Sat May 7 15:43:29 2005 +0000 + + Added eoPropGAGenOp, the sequential application of crossover and mutation + +commit 935910f2f4e6d932b14cb210b2fa8f37c72e536b +Author: evomarc +Date: Mon Apr 4 20:41:06 2005 +0000 + + Small upgrade for gcc 3.3 (I guess no-one is using those files, right?) + +commit a17e266c46efd4da96c3aef60b9a6b1b47ee94ac +Author: evomarc +Date: Mon Mar 14 21:00:00 2005 +0000 + + Updated the src:: everywhere in eoVariableLengthCrossover.h eoFlOrMonOp.h + (that nobody seems to actually use btw :-) + +commit 558e197adca8fb5427234602ddd406145c0b1c43 +Author: cahon +Date: Wed Feb 23 13:31:20 2005 +0000 + + Removing ParadisEO + +commit 96dd240cf376458209560d93fa8e73c1bc4ef7fa +Author: cahon +Date: Tue Feb 22 14:12:19 2005 +0000 + + Removing ParadisEO + +commit d144ba2885bbca69aa22f82feebbcc1fcda971d2 +Author: evomarc +Date: Thu Feb 10 09:57:28 2005 +0000 + + Added the complete reference to the base class in call for value() + because g++3.4 otherwise complains + +commit 5cd40b50ae9d92794dcf415ec90348c56f4404da +Author: kuepper +Date: Mon Jan 3 09:35:39 2005 +0000 + + include config.h + +commit 521871a7ea940047ff61447eb904129d844b6d58 +Author: kuepper +Date: Mon Jan 3 09:35:17 2005 +0000 + + fix for gcc-3.4 + +commit 503ee25d9cf27175115e02df0ea7457ae440126d +Author: evomarc +Date: Mon Dec 27 09:08:44 2004 +0000 + + Mainly made it obvious that Lesson4 contains "ready-to-use" EAs + +commit 835a14e8ff8a1951eb4ef5764418b5e4ac5b02d2 +Author: evomarc +Date: Mon Dec 27 08:01:29 2004 +0000 + + Modified the way to set the initial values of the sigmas (and stdevs) + so that they can be scaled to the range of each variable (by adding + a "%" after the value in the parameter file) + See also the examples in tutorial/Lesson4 + +commit ce560e5bfaadd471ce308439859f2472d205020d +Author: evomarc +Date: Mon Dec 27 07:59:58 2004 +0000 + + Added the 2 parameter files ESEA.param amd RealEA.param + so both programs go to 0 nicely instead of staying anywhere but close + +commit fbdc8995855f3b128aee70b5c1ef697a5b786d71 +Author: evomarc +Date: Mon Dec 27 07:33:03 2004 +0000 + + Added the explicit calls to the base class ctors in eoXXXGeneralBounds copy Ctors + +commit 8c36a1274b5eef1aac4dc9c73a912f8f52b74ae3 +Author: evomarc +Date: Mon Dec 27 07:31:59 2004 +0000 + + Fixed some int - unsigned int problem for the case "combien < 0" + +commit a415aef4d98ac9846348df69fb9137442a37aeca +Author: kuepper +Date: Thu Dec 23 17:33:08 2004 +0000 + + reshuffle libraries to resolve all dependencies + +commit 57a39197b97a412edbf797e10b2deba0c9aed5e1 +Author: kuepper +Date: Thu Dec 23 17:26:39 2004 +0000 + + minor updates, + create doxytag-file when running doxygen + +commit 7b9e6d3e1f980629490c68333f157914480ca041 +Author: kuepper +Date: Thu Dec 23 17:22:52 2004 +0000 + + more adjustments for gcc-3.4 (now using optimization, go figure...) + +commit cf4849c472e5f87ff680c305b73ecd18382b41ff +Author: kuepper +Date: Thu Dec 23 16:06:37 2004 +0000 + + small fix for gcc-3.3.3 + +commit 0ad2d5ad2b8611fa254bd8452018fde31a3f4598 +Author: maartenkeijzer +Date: Thu Dec 23 15:40:44 2004 +0000 + + Some small changes concerning flags and warnings + +commit 85a326c5e496d0f9932ad8790d68e2f153655a4c +Author: kuepper +Date: Thu Dec 23 15:29:07 2004 +0000 + + Adjust code to perform to C++ standard according to gcc-3.4 + interpretation... (Have not compiled/checked/changed paradisEO.) + + That is, the current code compiles with gcc-3.4 and the checks + (besides t-MGE1bit) all pass. + +commit faaadf7599179afc3256ee44a688c70466015a88 +Author: maartenkeijzer +Date: Thu Dec 23 10:14:42 2004 +0000 + + Added using declarations to avoid g++-3.4 errors + +commit 1828fda30c3433f6e9a5cc3fe76aa4e7ca497e57 +Author: evomarc +Date: Wed Dec 1 09:27:31 2004 +0000 + + Added comments so that the new classes eoGeneralXXXBounds are taken into account + by Doxygen. + +commit 71e1984aeb2c7beb85bd787a143277573579808b +Author: evomarc +Date: Wed Dec 1 09:23:53 2004 +0000 + + ... some comments ... + +commit a24cd30c81679ffff7ff637b6798f6e097c97079 +Author: evomarc +Date: Wed Dec 1 09:22:48 2004 +0000 + + ... some comments for Doxygen ... + +commit c592a74025d291ebb738c74d0e3273cbd470a7ce +Author: evomarc +Date: Wed Dec 1 09:19:47 2004 +0000 + + ... a comment ... + +commit 641b49e995be18bfa7445514bf4dd3211bce6ad0 +Author: evomarc +Date: Wed Dec 1 08:49:40 2004 +0000 + + Added a few words about Lesson5, and the change in the Makefiles. + Also, looking alive is probably important ! + +commit ab95b3fd979bb317fef516f68daa6e01cabd1a33 +Author: evomarc +Date: Mon Nov 29 20:49:34 2004 +0000 + + Corrected some bugs in eoGeneralXXXBounds (e.g. no const in copy Ctor arguments) + Added a default value for the intialization (-infty, +infty) + Needs to allow uniform() on unbounded - still pondering + +commit 9b1524ec002de89ba330d9090c11308dbb5b8460 +Author: evomarc +Date: Fri Nov 5 08:57:34 2004 +0000 + + Added classes to hendle bounds: + - eoGeneralRealBound that can be initialized using a string (and hence can be + easily read as a parameter) + - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h + Note that there is no equivalent to eoRealVectorBounds for vector of integers + + In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h + The first one was already there by chance, through eoUniformInit.h + +commit 7a695e65df500b41b90c8a1e2b391b688265660e +Author: evomarc +Date: Fri Nov 5 08:55:12 2004 +0000 + + Added classes to hendle bounds: + - eoGeneralRealBound that can be initialized using a string (and hence can be + easily read as a parameter) + - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h + Note that there is no equivalent to eoRealVectorBounds for vector of integers + +commit 50b395d16dcb5897dc299736ae36b9620d49d89d +Author: kuepper +Date: Thu Oct 7 14:32:54 2004 +0000 + + fix install dir + +commit 795ca38589add25eee73d66cd8bcd069c12c009b +Author: kuepper +Date: Thu Oct 7 13:36:43 2004 +0000 + + were these lost? + +commit ebedf7ca7d2fc3ca3f449598c054492e23e0c222 +Author: kuepper +Date: Thu Oct 7 13:34:08 2004 +0000 + + wrong directory + +commit 73c97e6bfa1bfb7a96e7e91f1b5f6778fc91df8e +Author: kuepper +Date: Wed Sep 29 18:37:20 2004 +0000 + + update for sstream + +commit 9786fe0a6a270d0ce16ac4c4e6068d48ff042aad +Author: kuepper +Date: Tue Sep 28 17:13:34 2004 +0000 + + Fix cvs-commit error (<<< still there...) + +commit 76e78116ac0d20ff4152e7bb4fd3a468074af0eb +Author: evomarc +Date: Mon Sep 27 15:19:53 2004 +0000 + + Added include eoDistance.h + +commit a0c7412c188b0bb70e147c7a027b964392e110a8 +Author: evomarc +Date: Mon Sep 27 13:34:34 2004 +0000 + + Replaced the eoNormalMutation (mutating ALL variables of a real-valued vector) + with eiNormalVecMutation that has a proba. to mutation each variable + +commit db44c94c9c746ef15a494e0c3a8f74a252006606 +Author: evomarc +Date: Mon Sep 27 13:31:40 2004 +0000 + + Added the class eoNormalVecMutation (yes, should have made another file :-( + +commit eac4f15bf0466445ca566cb5a071606b08d8f5ac +Author: okoenig +Date: Sun Sep 26 09:47:06 2004 +0000 + + Replaced top_builddir with top_srcdir + +commit 6584747d3cccd7c9250f64ecfc80ab46a6914235 +Author: okoenig +Date: Sun Sep 26 09:45:59 2004 +0000 + + Removing a "/" at the end of a comment + +commit c5a9348dd999fac5e19a9b9166460a89fd561ad2 +Author: kuepper +Date: Fri Sep 24 15:00:48 2004 +0000 + + Fix doc-target. + Fix inclusion of documentation in dist. + +commit fa108bbd6bd9c342c62e1086249277f62be7019d +Author: kuepper +Date: Fri Sep 24 11:55:09 2004 +0000 + + minor fixes + +commit 503efdcdb6b4b344ae1027ea9ff42a50eb2148f1 +Author: kuepper +Date: Wed Sep 22 18:38:12 2004 +0000 + + Removed clean-local due to problems with "make distcheck" + +commit 51471804cde758412dcfad8fdae1cbfdee5ae285 +Author: kuepper +Date: Wed Sep 22 18:18:31 2004 +0000 + + fix installation, dist-preparation + +commit 495057c341b5975e35788211c72cfd3a37a4694b +Author: kuepper +Date: Wed Sep 22 17:30:11 2004 +0000 + + updates for distributing/installing ParadisEO. + +commit 6fff184ba31d081e620eee41caaf6e6f48c5936b +Author: kuepper +Date: Wed Sep 22 13:20:15 2004 +0000 + + update for new build-process + +commit 3cb80bc73b33c340fa75a13a09154b18ebbc4634 +Author: kuepper +Date: Wed Sep 22 12:38:28 2004 +0000 + + update build process to include paradiseo tutorial, + fix paradiseo headers for sstream + +commit e388461a3b27ba07fbb3a880070bf1d848c50478 +Author: kuepper +Date: Wed Sep 22 08:18:29 2004 +0000 + + Update configure with switches for app, ParadisEO, and tutorial. + Add ParadisEO/Lesson1 tutorial in build-process. + minor fixes. + +commit 0a6e0c687c43e9ed69ff8906256885ad0e20462c +Author: maartenkeijzer +Date: Tue Sep 21 19:49:48 2004 +0000 + + Made couple of functions virtual + +commit 63cbb12e69fa7de7549728b069ff38d120de6517 +Author: kuepper +Date: Tue Sep 21 17:01:14 2004 +0000 + + updates, + start supoorting ParadisEO + +commit 056ac87efb3260812fccf1be98d5b7633d9d5839 +Author: kuepper +Date: Tue Sep 21 10:30:45 2004 +0000 + + fix dist-header + +commit 5150bd4888d27d4fa8f9e08a52e40a1abf6e850a +Author: kuepper +Date: Tue Sep 21 10:23:33 2004 +0000 + + fix 'make dist', works now (besides ParadisEO). + +commit de69e235f43535cee55b10676954122a60de64d9 +Author: kuepper +Date: Mon Sep 20 21:47:15 2004 +0000 + + updates + +commit 7db38bc9cd6b603fe5502d9ee56314f491d04f95 +Author: kuepper +Date: Mon Sep 20 17:14:11 2004 +0000 + + fix + +commit 72c070585f348e5c6ce7545e896db2b025e15eb6 +Author: kuepper +Date: Mon Sep 20 17:12:12 2004 +0000 + + better distribution support (not finished) + +commit 1cf47e414ee2fbbc65c57e1d686cb788783d1773 +Author: kuepper +Date: Mon Sep 20 17:06:25 2004 +0000 + + conditional compilation fixes + +commit 5e416e4a1c50cf2bfbdc60500c6a52bb77ada8ff +Author: kuepper +Date: Mon Sep 20 16:05:25 2004 +0000 + + don't use user-variables + +commit 9e508c66a68a9ef1d31f2ae9e40212b7b7aa6de7 +Author: kuepper +Date: Mon Sep 20 15:51:53 2004 +0000 + + update user commentary + +commit 988e6a43ea3bcb74f1f04f5b8dc56a2127c1fbe8 +Author: kuepper +Date: Mon Sep 20 15:50:00 2004 +0000 + + *** empty log message *** + +commit e618920c44b29ac945cba8213355a01e785a9ba1 +Author: kuepper +Date: Mon Sep 20 14:11:24 2004 +0000 + + updates for build-process + +commit 17c8eddd5c6211fa959049818c341635be669989 +Author: kuepper +Date: Mon Sep 20 09:56:10 2004 +0000 + + *** empty log message *** + +commit 81492da319932f8ab6456d5ff2ba5be63d1b1dde +Author: kuepper +Date: Mon Sep 20 09:52:19 2004 +0000 + + Remove support files, they are automatically created by autotools + +commit 683c4e573e123fda4b40cb691d31205722d790ae +Author: kuepper +Date: Mon Sep 20 09:50:47 2004 +0000 + + update + +commit cf4248b67b3c9b76dda9ab429de7b61acdf96f46 +Author: kuepper +Date: Mon Sep 20 09:47:19 2004 +0000 + + remove + +commit f599c8eb779ea29113caf2617968135d37c4a1a3 +Author: kuepper +Date: Mon Sep 20 09:46:48 2004 +0000 + + remove Makefiles from cvs + +commit 36af75bc949fcff09c2d6744737cd48075fda16a +Author: kuepper +Date: Fri Sep 17 17:05:28 2004 +0000 + + add conditional includes for sstream + +commit 6c7d888194f74a1214c5c18a1a23e8ad9e2a6aaa +Author: kuepper +Date: Fri Sep 17 17:00:04 2004 +0000 + + cleanup + +commit c8494642d5b5233f26fc523664593b44bbe22e75 +Author: kuepper +Date: Fri Sep 17 16:53:31 2004 +0000 + + Updated build-prcess to be completely under automake control. + + For the tutorial the old Makefiles are saved as Makefile.simple in all + the respective directories. + + Use generated config.h instead of command-line passing of preprocessor + flags. + + Updated support files from current automake. + +commit 32cf83cfee845d72649e170ebe076a0370be63af +Author: kuepper +Date: Fri Sep 17 15:20:19 2004 +0000 + + Save copies of old simple Makefiles + +commit dbd0a46d75f1e30079701b4c27c3631508bfa7a9 +Author: maartenkeijzer +Date: Mon Aug 30 19:44:48 2004 +0000 + + added verbose flag that can be used to turn off annoying message to cout + +commit 57881e56c4a940aefc8872bdc25eb9d67a39838c +Author: evomarc +Date: Sat Aug 28 16:26:03 2004 +0000 + + CLeaned up the comments in files related to Sharing (added t-eoSharing in test) + +commit e7643ccc10d32ecba2851822557f8080260914cb +Author: evomarc +Date: Sat Aug 28 16:25:12 2004 +0000 + + Committing at last the long awaited test for Sharing + +commit 17db378c84174c81fde4bb7304182ba93c077522 +Author: evomarc +Date: Sat Aug 28 14:03:34 2004 +0000 + + Cleaned up the comments + +commit 669f41a315fd21a0ddd9447d4df090f3a5fd0453 +Author: jmerelo +Date: Tue Aug 10 17:19:46 2004 +0000 + + Changes in docs and added stuff to eoEvalSteadyFitness to reset after using it + +commit 55a118517c9bd1291e71745d90342875a0bffb1e +Author: jmerelo +Date: Tue Aug 10 07:39:10 2004 +0000 + + Updating doxygen configuration + +commit 7d0e70fd1aca67a0ef3b06b64faef44279425ce8 +Author: okoenig +Date: Sun Jul 25 13:26:02 2004 +0000 + + added a string msg to eoScalarFitnessAssembled, in order to store all sorts of messages for an individual + +commit b72ea29e0dd63c15baea1074a4ea813e03e3235c +Author: evomarc +Date: Fri Jul 16 08:45:02 2004 +0000 + + Added className (mysteriously missint) mandatory for eoCombinedInit + +commit caa611661a1f74bcfed9ba9e9b2d10a726be18c1 +Author: evomarc +Date: Fri Jul 16 08:44:14 2004 +0000 + + Allows proportional combinations of eoInit objects + Similar to eoPropostionalCombinedXXXOp + +commit 42819983dca9c69206e9e2dcaee436236fefa6f0 +Author: cahon +Date: Mon Jul 12 09:16:41 2004 +0000 + + Adding typedef EOT EOType ; + +commit 4127f426038afd99f359a34493b88fa72307c02d +Author: cahon +Date: Mon Jul 12 08:57:38 2004 +0000 + + Adding typedef EOT EOType ; + +commit 30ceb2bf450184edf1600865e8f27267454012ce +Author: evomarc +Date: Wed Jun 23 23:19:17 2004 +0000 + + Added the Ctor using the Parser + +commit 66a51c5ddb8f9f202248cb3338deb20b1d622d1a +Author: evomarc +Date: Tue Jun 15 07:28:54 2004 +0000 + + Added the className method everywhere + +commit e44cf2c446adfd4552e3ef384286c94d19f2708f +Author: evomarc +Date: Tue Jun 15 07:09:57 2004 +0000 + + Added the className methods everywhere + +commit c0d5eec30307ba18ac9fd1ee57d0c429d68a83db +Author: evomarc +Date: Tue Jun 15 07:06:27 2004 +0000 + + Added newline at end of stat + +commit 6e650914cca1b308b4696f1380dd00da934630a7 +Author: evomarc +Date: Tue Jun 15 07:04:12 2004 +0000 + + Added the allClassName method to print the name of all + classes that have been added to the checkpoint + +commit 4cfe47a8e512b76038fe0eed90d00ef46e0716bf +Author: okoenig +Date: Mon Jun 14 17:07:25 2004 +0000 + + Added a failed boolean to the fitness, for statistics... Average stat values are now computed from succesful fitness evaluations only + +commit 500f66efbfffb3b9fe6fc75c25cde3695a48f945 +Author: okoenig +Date: Mon Jun 14 17:05:07 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + Avg Stats are now only evaluated of individuals if this bool is false! + +commit 6d8d7c994c2b51f9e38451d98cbe1b938fb91168 +Author: okoenig +Date: Mon Jun 14 11:59:39 2004 +0000 + + Replaced #include with #include to get rid of "deprecated" warnings in gcc 3.3 + +commit 16e09360c9789fcf1309fc3ae64212d975db4b39 +Author: okoenig +Date: Mon Jun 14 11:24:37 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + Avg Stats are now only evaluated of individuals if this bool is false! + +commit 06eb601d8ee0eb95e1ea8596c0b4ef216d52ce02 +Author: okoenig +Date: Mon Jun 14 11:23:48 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + +commit ab9d4de66bd741be9c13010535b7962bf673c79f +Author: evomarc +Date: Wed May 26 10:23:07 2004 +0000 + + Adding Sharing (though eoSharingSelect - a roulette selection on shared fitnesses + +commit 9e0edc381e3e845206ed271b904756269684cc03 +Author: evomarc +Date: Wed May 26 09:00:26 2004 +0000 + + Temporary modification of the tutorial to account for the new features + - stat.tmpl allowing easy creation of own stat + - sharing as a new possible selector in make_algo_scalar - requires a distance + No detail given, though ... + +commit 795f63b7feae82efec3d68aeaa51912552586594 +Author: evomarc +Date: Tue May 25 08:03:30 2004 +0000 + + Adding sharing - needed to modify quite a few files, like eoDistance.h + make_algo_scalar.h and all related files, and the like + +commit 13c70628584d1e76f74c6d613290ecd1df22a183 +Author: evomarc +Date: Tue May 25 07:57:52 2004 +0000 + + Adding the statistics in createSimple (create.sh is becoming obsolete) + +commit b0969cf3d4c38e801b4141e5fc32b44bc7b7af08 +Author: stevemadere +Date: Fri May 21 01:44:32 2004 +0000 + + Fixed a bug in mlp::net::load() that prevented loading of multiple nets + from the same stream. + +commit 7863168b69e2abe78cfd31cbc2d2ea912253a2bc +Author: stevemadere +Date: Fri Apr 23 16:20:12 2004 +0000 + + Added weight perturbation operators to enable implementation of + exact GPROP-III algorithm. + +commit aecd7bdf2b37acbc56c6ff9cba6964ffda4a8e54 +Author: evomarc +Date: Thu Apr 8 07:55:40 2004 +0000 + + Added the setLongName method to handle the prefix trick in eoParser + +commit 87ddb6f8b5004982b93f640e9aaf31cb54ea82f3 +Author: evomarc +Date: Mon Apr 5 15:28:12 2004 +0000 + + Added a prefix data in eoParser - and the setPrefix method - + for multi-population parameter input. Now you can call the make_xxx + functions from teh src/do directory several times for different populations + provided you do different calls to setPrefix inbetween + +commit fe9de42802c1ac91a1dc3087880ec6f81e2a793f +Author: evomarc +Date: Tue Mar 30 16:51:06 2004 +0000 + + Corrected errors in the "memory management" section. + Thanks to ZhangQian for pointing them out + +commit 3276d502eaeef6607119692393d66ce93a7eda57 +Author: okoenig +Date: Sun Mar 28 22:18:03 2004 +0000 + + Bugfix regarding the feasible flag + +commit 4bdccb3dae683c034cddd3c7361b45aa6b31ab13 +Author: maartenkeijzer +Date: Fri Mar 26 09:56:56 2004 +0000 + + Fixed bug in rng::roulette_wheel: use of float had too little precision in change/fortune var + +commit a715dda207c1b17e81c64dd18911e80128e646f7 +Author: maartenkeijzer +Date: Fri Mar 26 09:36:07 2004 +0000 + + Fixed rng::uniform to not provide the wrong result (1.0) once in every 2^32 times + +commit 3943287ad0879774856136c8ae417c5ad8519585 +Author: stevemadere +Date: Wed Feb 11 23:03:23 2004 +0000 + + Made mlp::net::operator() a virtual function to allow for subclassing + with networks that transform their input or output. + +commit 250d31f904478a4492122197195e3c626a05abad +Author: stevemadere +Date: Tue Feb 10 22:33:30 2004 +0000 + + Fixed some signed/unsigned conversion bugs + +commit 68e970e455b3d8f91a304b8c2ab3eac9ec8d41e5 +Author: jeggermo +Date: Mon Feb 2 08:54:10 2004 +0000 + + *** empty log message *** + +commit b2de3403a622e66cff6d7949254a1b09c47cf6c9 +Author: maartenkeijzer +Date: Wed Jan 21 19:57:19 2004 +0000 + + Added define NO_GNUPLOT to disable gnuplot extensions + Needed for win32 (well, at least for me) + +commit 0a9f57e6521f4515ee8b9117970b0a4f4abca5c2 +Author: stevemadere +Date: Tue Jan 13 20:28:33 2004 +0000 + + Fixed the string serialization operators (>>, <<) for neuron, layer, + and net so they actually work and added or fixed stream-source + constructors where appropriate. + +commit 4662677a5feed26ab63dbd7d0f5b04defc09ab8d +Author: stevemadere +Date: Tue Jan 13 20:21:52 2004 +0000 + + Made it compile under gcc 3.2.2 by adding explicit definitions + of normally derived comparison operators >, >=, and == for the + structure phenotype. ( adding #include was not sufficient + to solve the problem) + Also added function gprop_use_datasets() to give more flexibility + in subclassing the datasets used to train the nets. + +commit 31aa0eedf761de4d8ac5aa18f38a697893d00762 +Author: evomarc +Date: Tue Jan 13 03:35:27 2004 +0000 + + Added the standard header - just a test of CVS in fact! + +commit c819ba4f6afb25a96750523d8dac87a6a5032f92 +Author: evomarc +Date: Wed Dec 24 16:38:02 2003 +0000 + + Corrected a but in eoUniformMutation (only the first component ever got modified! + Thanks to Jeroen's student ... + +commit a3d7e396b41c4006178ac4a24dfee1b52fb2d128 +Author: evomarc +Date: Fri Dec 5 05:39:40 2003 +0000 + + There was an infinite loop in case of a file without section header on first line! + +commit 041791eb4b2b96ceefde882df5ed60a19dfcc109 +Author: evomarc +Date: Fri Dec 5 05:38:02 2003 +0000 + + Added a few user-friendly comments in case sizes don't match between + load file and required popsize + +commit 926286b969e353253ada6e45dfcc25c4094ce8ac +Author: evomarc +Date: Wed Nov 26 14:20:26 2003 +0000 + + A minor typo ... + +commit f71b436120da7b742922ca4302a6502b1b19251e +Author: evomarc +Date: Wed Nov 26 11:15:59 2003 +0000 + + THe call to randomize was forgotten after the choice of a terminal + at max_depth. + This was only visible if + - you implemented the randomize method + - you reached the maximum depth (or used ramped half-and-half). + +commit aa76efbb29585762a8a337c6507ae2a4997b33ec +Author: okoenig +Date: Wed Nov 19 13:29:15 2003 +0000 + + Added possibility to print header to first line of output file; control through last bool in constructor - default = false... + +commit 7c8da3722ef023bba9c463d70c49bdf0e1c7d5a4 +Author: jeggermo +Date: Tue Nov 4 15:32:24 2003 +0000 + + parse_tree.h now uses standard memory allocation + for MacOSX + +commit 099b24d3639cf9c04342fe1976ce5f542f9b7719 +Author: jeggermo +Date: Tue Nov 4 15:29:24 2003 +0000 + + eoData has been changed slightly for MacOSX + +commit 91c45767c03629341f8977bbf42ca36844e6f03e +Author: maartenkeijzer +Date: Sun Oct 12 23:49:23 2003 +0000 + + oops, forgot std:: + +commit fd2fcc8e2ba7ffe6bca2e0a88a38d013d798c28a +Author: maartenkeijzer +Date: Sun Oct 12 20:53:28 2003 +0000 + + Sort dissappeared in one-objective + +commit bc1e98a65af47e7e9ad4dde5fe6714693b1ca768 +Author: evomarc +Date: Sat Sep 20 05:42:23 2003 +0000 + + Updated lists of headers in some Makefile.am (thanks to Claude Dion for pointing this out) + While there, changed the presentations of source and headers (1 per line with \) + +commit 31971866e84465a481b0a3136c490b5a4c3714fb +Author: evomarc +Date: Thu Sep 18 15:09:34 2003 +0000 + + Modified a wrong link + +commit 45a2d08432942c1998786cbb28af9604f0cd6e18 +Author: evomarc +Date: Tue Sep 2 05:49:37 2003 +0000 + + Slightly modified the formula: the worst individual had "fitness" 0 in hte case of linear scaling with pressure=2. Now it has fitness 1/[P(P-1)/2] + Thanks to Gilles BAUDRILLARD (EADS) + +commit 0f8244e6940f640fea5429b54b18f34c906a29fe +Author: evomarc +Date: Mon Sep 1 12:56:29 2003 +0000 + + Added 2 missing headers (and broke the long lines). + Thanks to Jochen KĂĽpper for pointing this out. + +commit baeeeec1e51873e3eca706458742cfb35569aed8 +Author: evomarc +Date: Tue Aug 26 18:07:06 2003 +0000 + + Corrected a HUGE bug in eoRealUXover !!! + Thanks to Gilles BAUDRILLARD - EADS + +commit aac8ff6cb98f5a4a5ae4482dfe4381f0916dd6d6 +Author: okoenig +Date: Thu Aug 21 13:02:53 2003 +0000 + + added parameters to the constructors to start generation counting !=0 + the parameters are optional and appended in the end + +commit 4238ee1bd3d1721821b87f86873fb9cadcfd4325 +Author: evomarc +Date: Sat Aug 2 06:55:47 2003 +0000 + + CLean-up + +commit 3a8d9dd7a9e038b70900d857a857eb18d30dd1d8 +Author: evomarc +Date: Sat Aug 2 06:42:33 2003 +0000 + + Adding the generic operators for FIXED-LENGTH ORDERED genotypes eoFlOrXxxOp.h + +commit b643ec2be3d7c58534591696f0a50d76b505171a +Author: okoenig +Date: Wed Jul 30 14:48:13 2003 +0000 + + Inserted a missing std:: + +commit 5c7f17c1535234202caa29955da35432dba94ecd +Author: evomarc +Date: Tue Jul 29 05:33:58 2003 +0000 + + Forgot the dir when adding eoSBXcross.h :-((( + +commit c249cecc62342b8f57e1979db27662bf00c5ed43 +Author: evomarc +Date: Mon Jul 28 09:48:58 2003 +0000 + + Adding SBX crossover operator in es dir + +commit 4c2d0f2ea090cca5e2b2c69217325450765abea0 +Author: evomarc +Date: Mon Jul 28 09:47:15 2003 +0000 + + Adding the SBX operator in es dir + +commit 334f5ce3d7f619532d11d738674ce3623eef3ab8 +Author: evomarc +Date: Sat Jun 21 06:34:00 2003 +0000 + + More precise comment + +commit 0b5a174da0edafeb631b73f18c021da799c2c1e3 +Author: jmerelo +Date: Wed Jun 18 09:07:19 2003 +0000 + + Eliminated using namespace std + +commit b354bd51f8e996c9da457540d876d83b8e07e878 +Author: jmerelo +Date: Tue Jun 17 12:03:42 2003 +0000 + + better eoString + +commit e17eb77e3918e532cc7ff2b04cc09b6553c8d9bc +Author: jmerelo +Date: Tue Jun 17 06:24:15 2003 +0000 + + Changes to obsolete things + +commit 2184dc845fa316256226d880d4a18b82a23d7e3b +Author: okoenig +Date: Mon Jun 16 21:41:30 2003 +0000 + + added a public bool feasible, used to identify feasible individuals in initialization processes + +commit ed7902ed909d3a5086d3b124509e69d56a9223aa +Author: maartenkeijzer +Date: Mon Jun 9 06:25:11 2003 +0000 + + Exported operator() for eoSGATransform in abstract1.cpp + +commit 21301c327dfd2f357beb1307429840f1921130df +Author: evomarc +Date: Mon Jun 9 06:17:26 2003 +0000 + + Change in terminology: EDA (Estimation of Distribution Algorithms) replaces + DEA (Distribution Evolution Algorithms), as it seems more widely used today. + +commit d6cce45ad058b2fe50fe7e435f6390b6d30cb2d6 +Author: evomarc +Date: Mon Jun 9 06:06:13 2003 +0000 + + Change in terminology: EDA (Estimation of Distribution Algorithms) replaces + DEA (Distribution Evolution Algorithms), as it seems more widely used today. + +commit 0a85f1780322d65499b3970214d9ca64aedd3062 +Author: maartenkeijzer +Date: Fri Jun 6 10:29:13 2003 +0000 + + Improved the check for changed. Now it will only set the changed flag when the elements that are flipped are actually different + +commit 43b5effcdb9acb5c021303c9ea6276d10206e9e9 +Author: maartenkeijzer +Date: Wed Jun 4 11:50:48 2003 +0000 + + added shuffle + +commit b6104c6f324bbfa84e53746e298533dfcdcc5b6b +Author: maartenkeijzer +Date: Wed Jun 4 09:34:26 2003 +0000 + + Added tests for roulette wheel selection + +commit a7b5d90f1b4bcd622a156d527c7edfbfe63eec7e +Author: maartenkeijzer +Date: Wed Jun 4 09:33:27 2003 +0000 + + optimized eoProportional and added universalselect + +commit 347f64413e4f087a6bd0c399292897ad9aa2be07 +Author: jeggermo +Date: Fri May 16 14:28:52 2003 +0000 + + GCC 3.3 + +commit 364cded6a4e5dbf7aa6797ca401fcecdd38292f9 +Author: evomarc +Date: Sun Apr 27 06:08:11 2003 +0000 + + Added keywords "Sequential" and "Random" as synonyms of resp. "Deterministic" + and "Uniform" - for EASEA + +commit af5fee947894d5c84d72cdec2cd1bc7be8564456 +Author: maartenkeijzer +Date: Sun Apr 20 12:57:59 2003 +0000 + + Removed HAVE_SSTREAM for redhat 2.96 + +commit ba68ffe0c2ea46b0f3542d1d3fa3668533dea2fd +Author: cahon +Date: Fri Apr 18 13:32:39 2003 +0000 + + missing include eoParetoFitness.h + +commit d51ee5916b7df005131f4b6321883551c1eda225 +Author: okoenig +Date: Sat Apr 5 13:42:44 2003 +0000 + + minor changes + +commit c39b2414134f0532ac6aed667d58b708453b725d +Author: okoenig +Date: Sat Apr 5 13:42:01 2003 +0000 + + added eoAssembledFitnessStat.h to implement Best and Avg Stat for eoScalarFitnessAssembled + +commit 45e3b86bcb011b833182e1610bba02319d1f8e7b +Author: okoenig +Date: Sat Apr 5 13:40:57 2003 +0000 + + Removed function template specializations for eoScalarFitnessAssembled from classes in this file, since they do not work under Visual Studio! Reimplemented these stat classes for this new fitness class in eoAssembledFitnessStat.h + +commit a172d34e5fb35d82877bfc7eec11c867b3b5b53b +Author: okoenig +Date: Thu Apr 3 16:51:47 2003 +0000 + + Included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. + +commit f587793a6ab481e90bf4a81917db86aa104fddbf +Author: okoenig +Date: Thu Apr 3 16:47:47 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +commit 9b6619687083b3e5c1b6786106935f9033959dd5 +Author: okoenig +Date: Thu Apr 3 16:25:55 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +commit a63c6ee2ba55cfd2b0b6502c114c2ae8d150b7d7 +Author: okoenig +Date: Thu Apr 3 10:44:35 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +commit ce04cca4b9a2533cc7bb7c28d333e29e1f3adc06 +Author: okoenig +Date: Thu Apr 3 09:23:52 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +commit 1d70ba7a9bda4ba4c7d06dc002a4b08002bc897f +Author: okoenig +Date: Thu Apr 3 09:11:17 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +commit b3e57bedad0f6e5b92243ff5dc582c34906b6f13 +Author: okoenig +Date: Wed Apr 2 21:10:53 2003 +0000 + + included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. + +commit eb279c8f98cbe975ac219f0aac4a9fa40c5a6473 +Author: evomarc +Date: Tue Apr 1 12:09:37 2003 +0000 + + Removed a dummy line containing reference to lesson3! + +commit 9a636428ba45165b33c2d88d79f9a3c0309c2a99 +Author: maartenkeijzer +Date: Tue Mar 25 10:46:08 2003 +0000 + + Deleted political statement as I changed my mind about this + +commit 59fe39da93b95e598a4e553283ff726f89d99117 +Author: evomarc +Date: Sat Mar 22 06:39:21 2003 +0000 + + ADded comments and hook for copy constructor + +commit f64292b777c9934b91a53ccbfa3c1f5aac7a8480 +Author: maartenkeijzer +Date: Fri Mar 21 09:17:38 2003 +0000 + + bumped up the version number + +commit fda39068afaf8d2f7a25f07b4b7bcdad614dfbad +Author: maartenkeijzer +Date: Fri Mar 21 02:44:05 2003 +0000 + + now added an std::ends for plotting strstream + +commit 6f9894421280430c09d37bbe066552ef31c12db1 +Author: maartenkeijzer +Date: Fri Mar 21 02:41:54 2003 +0000 + + again: std::ends and stringstream + +commit eaabc7ae3b0f8c861be49cf80013ee2f680d01a9 +Author: maartenkeijzer +Date: Fri Mar 21 02:39:09 2003 +0000 + + fixed (?) some problems with stringstreams and std::ends + +commit 07a3e56db177c1912ddeb3920f4198022eb96eb0 +Author: maartenkeijzer +Date: Thu Mar 20 20:00:38 2003 +0000 + + eliminated gprop from the build until someone makes sure it builds under gcc-3.2 + +commit b15d1cef39bd57a0138d2915c84f2eac3c7eeb10 +Author: maartenkeijzer +Date: Thu Mar 20 19:49:32 2003 +0000 + + replace \0 with std::ends + +commit 27f9ae089461338d671021075a9d4b0ab04426d4 +Author: maartenkeijzer +Date: Wed Mar 19 10:47:08 2003 +0000 + + finished pickling support for valueParam + +commit 95d3c19211519d546f2b11ee2f84f46aa9f53dca +Author: maartenkeijzer +Date: Wed Mar 19 10:16:56 2003 +0000 + + Added pickling support for ValueParams + +commit 380d4eca0b3daa8c46c318ec97f006c5ce837367 +Author: maartenkeijzer +Date: Wed Mar 19 08:53:59 2003 +0000 + + removed comment in PyEO.cpp + +commit 9512291e3e0c9e376b7ec430b430812bc64ea9e2 +Author: maartenkeijzer +Date: Tue Mar 18 16:57:17 2003 +0000 + + added operator> + +commit 19fe39105678ae3590e0f174fead7031f091e648 +Author: maartenkeijzer +Date: Tue Mar 18 16:52:31 2003 +0000 + + fixed a bug reported on sourceforge + +commit 01de9c47632ede7734082f0c623fa6c61456e9f8 +Author: maartenkeijzer +Date: Tue Mar 18 16:35:27 2003 +0000 + + *** empty log message *** + +commit a597ec6f8a82fa95ed9a9b651653fd89790b03a7 +Author: maartenkeijzer +Date: Tue Mar 18 09:40:36 2003 +0000 + + excluded gcc>3 from check + +commit cde5b5d22bd809a74ce23f173481dce419af546c +Author: maartenkeijzer +Date: Tue Mar 18 09:35:46 2003 +0000 + + hi + +commit 33fae18bdd9b846c75c11cc4f2892ed65b858a86 +Author: maartenkeijzer +Date: Sun Mar 2 11:35:43 2003 +0000 + + decorated sort and max with std:: specifier + +commit 0441872bea2c37a589fbb6ce7ceb4e2163356c0e +Author: maartenkeijzer +Date: Sun Mar 2 11:29:01 2003 +0000 + + decorated copy with std:: specifier + +commit e5c83ac2e815fe13de135552711d8d1e2488f6e6 +Author: maartenkeijzer +Date: Sun Mar 2 11:26:45 2003 +0000 + + added typenames for pop::iterator + +commit adab0958408647b78852c792d5f2a6f6bc6d9bb2 +Author: maartenkeijzer +Date: Sun Mar 2 11:16:33 2003 +0000 + + added include file + +commit c2bad596f2d06fe90586721f9b3a3fca921dfeb4 +Author: okoenig +Date: Fri Feb 28 17:47:24 2003 +0000 + + This Makefile.am was missing; all it does is adding the *.h and Readme files to distribution + +commit d250c9edf6fe94f4451ba8fbbe1449d42fdee8ec +Author: maartenkeijzer +Date: Fri Feb 28 16:56:59 2003 +0000 + + oops, forgot thisone + +commit 153b80440c12cd996753be6a48902cc700fff043 +Author: maartenkeijzer +Date: Fri Feb 28 16:49:19 2003 +0000 + + changed to using sstream + +commit 86fa476c675b313b58dffc505c00ce6703d10a47 +Author: okoenig +Date: Thu Feb 27 19:28:07 2003 +0000 + + Removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. + +commit 6441ea1ec3e24816b961c2396ab21afd21a5e206 +Author: okoenig +Date: Thu Feb 27 19:18:53 2003 +0000 + + removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary + +commit 89a99dab17def7fdd612d7ac69981ffd05933ef2 +Author: okoenig +Date: Thu Feb 27 19:18:07 2003 +0000 + + removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. + +commit 4052187a6c266513637faee8dca00f94c136462f +Author: okoenig +Date: Thu Feb 20 19:13:33 2003 +0000 + + added an #ifdef _MSC_VER statement to hide "typename" identifier for Visual Studio + +commit 1bac8a427a0e11634a4e2b00c1cc982ca7e5e6de +Author: maartenkeijzer +Date: Mon Feb 17 10:42:03 2003 +0000 + + added std:: + +commit ff2968bd6004bdf1323c029ffad084003a432d7d +Author: maartenkeijzer +Date: Mon Feb 17 10:19:25 2003 +0000 + + Updated to use gcc-3.2 + +commit fc1113aad63257dbfb5b638d0d1836dbb70a7271 +Author: maartenkeijzer +Date: Mon Feb 17 09:52:36 2003 +0000 + + rolled back unfortunate change in eoAverageStat + +commit a339a548c3e41f5836821abce1dc6debea54ceb1 +Author: evomarc +Date: Sat Feb 8 05:36:01 2003 +0000 + + Added a mthod to remove one of the combined things (from RamĂłn Casero Cañas) + +commit 149ad68cb5c1c4699b3b77661b22cb2df744df91 +Author: evomarc +Date: Sat Feb 8 05:24:51 2003 +0000 + + Removed debugging printouts + +commit 395ca20a5cd6740fea2dbe9a978ada6bc19cc057 +Author: maartenkeijzer +Date: Tue Jan 14 10:09:28 2003 +0000 + + added missing valueparm.h" + +commit b5d1a95cf6cbcbf02934d8df8fc48c84c4f3306e +Author: maartenkeijzer +Date: Tue Jan 14 09:37:45 2003 +0000 + + next iteration + +commit 01727c5a5d5b19c1a36fcc6fead0f74c7ebb7ec7 +Author: maartenkeijzer +Date: Fri Jan 10 15:42:45 2003 +0000 + + found a bug in eoProportionalOp, hope this helps... + +commit ea2e36954268c31d72a0aef96ff653f793cd7dab +Author: maartenkeijzer +Date: Fri Jan 10 15:41:17 2003 +0000 + + Added monitors and statistics, also made a module with some + specific python stuff in __init__.py + +commit d953d25f089ec71cdaf8ca9e14fcf24dc06aa886 +Author: okoenig +Date: Wed Jan 8 12:43:31 2003 +0000 + + bugfix: since there are no Makefiles in the directory ~eo/src/do anymore, I removed this directory from the subdirs list in this Makefile.am + +commit c6b4f255d99b65341aba4074a2c8383f189a0821 +Author: maartenkeijzer +Date: Tue Jan 7 14:24:56 2003 +0000 + + some bugfixes + +commit efafbb6f055e113d7f9b1e56f178a64af78862a5 +Author: maartenkeijzer +Date: Tue Jan 7 10:50:23 2003 +0000 + + df + +commit db1e3c38f4e9dc6f978e76f4d06df33e25107e3e +Author: maartenkeijzer +Date: Tue Jan 7 10:49:55 2003 +0000 + + added a small cookbook + +commit 423daa36d2451f6228c7b9587bdec4ddb0d1c558 +Author: maartenkeijzer +Date: Mon Jan 6 21:56:40 2003 +0000 + + needed for redhat + +commit 5bf5b1e5cbf5cc549f5325578e09f5ae95bd529c +Author: maartenkeijzer +Date: Mon Jan 6 16:11:05 2003 +0000 + + added + +commit 0a4fb5503110283a08787bfb361f7a5e30b75c84 +Author: maartenkeijzer +Date: Mon Jan 6 16:10:38 2003 +0000 + + Added multi-objective support to PyEO (and changed its name to that) + +commit 3267a3419160e5ec4daad7462ca0616a275557cb +Author: maartenkeijzer +Date: Mon Jan 6 14:25:40 2003 +0000 + + Changed a few things so that the python library can + be used with the multi-objective library (it basically + boils down to removing the assumption that fitness() has a + size() member function and changing eoPop to vector) + +commit 34911abaa4a734e441a189f8477cbab8d1c9cd48 +Author: maartenkeijzer +Date: Sun Jan 5 16:45:48 2003 +0000 + + updated build info + +commit 131e0e033d6089acc49ff32dd2c0ffb24271d174 +Author: maartenkeijzer +Date: Sun Jan 5 16:31:50 2003 +0000 + + Added pyeo. Some changes needed to be made for include files and the like + in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) + + eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. + +commit 3937dd0fd6a04e72a29a3219a037fd5c1fdd813d +Author: maartenkeijzer +Date: Sun Dec 29 22:48:01 2002 +0000 + + oops, error in line 47 + +commit 995cb2bd4ac4019197f61b4834681239eb5bbdeb +Author: music_dev +Date: Sat Dec 14 02:51:53 2002 +0000 + + Added compatibility for MSVC.NET + +commit dc42894fb7f652f091441182e2a483fc88be2b4f +Author: cahon +Date: Fri Dec 13 10:03:47 2002 +0000 + + Fixing bug [preserve order of the pop. to evaluate] + +commit 3e673f6a8e539f407f9905c8ceea8892e9b9dd8d +Author: evomarc +Date: Mon Dec 9 21:04:47 2002 +0000 + + There was a bug in teh Ctor (fortunately, only with the last + parameter, that was generally used with the default value). + Thanks to RamĂłn Casero Cañas + +commit 21e07e03a9f0857924b2edac89a6a4f5e627380e +Author: evomarc +Date: Mon Dec 9 06:57:33 2002 +0000 + + Corrected wrong links in the 1st paragraph + +commit b5d61be21afa7c82be1d19c53b67fd0e7d30fc74 +Author: evomarc +Date: Mon Dec 9 06:19:56 2002 +0000 + + Corrected an error in name of statusParam parameter + +commit cf40eab455a1d32c183ce0650fa7b8ea87c7f53a +Author: evomarc +Date: Mon Dec 9 06:17:25 2002 +0000 + + Corrected a typo + +commit 21d5630c3a09591f3c0b96bd8d56cc5302aff408 +Author: okoenig +Date: Sun Nov 3 13:17:48 2002 +0000 + + reordered initialization list to match declaration order + +commit c175b152bcf51a839e8c6ce8bb99341a9da05666 +Author: okoenig +Date: Sun Nov 3 13:07:43 2002 +0000 + + added some typename statements to make it compile without warnings under gcc3.2 + +commit 5054418a6639349b502ac288c511c8452d4a92f3 +Author: okoenig +Date: Wed Oct 23 10:23:03 2002 +0000 + + small bugfix, to make this example run under Solaris/g++ 2.95.3 + +commit 27d7739aa999ab983d6c377a70f6a2eb9d8876f4 +Author: evomarc +Date: Wed Oct 23 04:43:10 2002 +0000 + + Adding depcom so that it compile smoothly on Solaris. + Thanks to Oliver Koenig + +commit dc758a4854faa84c368191f0e3e31b837a58f227 +Author: evomarc +Date: Wed Oct 23 04:42:07 2002 +0000 + + Modification of all Makefiles so that it compiles smoothly on Solaris. + Thanks to Oliver Koenig + +commit 7dfe081489384a89f6459bf237f5f14b6df8ff72 +Author: evomarc +Date: Mon Oct 21 04:28:11 2002 +0000 + + Added the .SUFFIXES lien (for Solaris) and the use of $(CXX) instead of c++ + plus a few comments :-) + +commit 2b8b491f0b8fcac780b2358aeed5e7866ad7d01e +Author: jeggermo +Date: Fri Oct 18 11:39:09 2002 +0000 + + *** empty log message *** + +commit 0aac89e6b38a5d707f1e15c7062ca4e96b8f964f +Author: music_dev +Date: Mon Oct 14 16:16:01 2002 +0000 + + Better install for libraries. + +commit 62db7800fc02efd12be37aa652a212f73e7c0613 +Author: evomarc +Date: Wed Oct 2 14:07:58 2002 +0000 + + Removed the stringstream (sstream not in all compilers distributions) + +commit 43d42510bc71521c023207c07031182a029ec89c +Author: evomarc +Date: Wed Sep 18 15:36:41 2002 +0000 + + Added accessors to private parameter stopOnUnknownParam + +commit eca6dcef8eaad6a27f8651d70e57df632859c54b +Author: jeggermo +Date: Wed Sep 18 12:40:46 2002 +0000 + + A new readFrom & printOn function for EO.h + Now it CAN handle VALID/INVALID fitnesses. + + The problems are over at last + +commit fa675dd55e12606e4742fc858b011e3fe1f42cea +Author: cahon +Date: Tue Sep 17 07:08:51 2002 +0000 + + Allowing a first eval. of the pop. to be performed by the E.A. + +commit 4d786ef3ce32590496ced6e4dc6b44d792b17221 +Author: cahon +Date: Mon Sep 16 12:53:08 2002 +0000 + + Invalidating flags ... + +commit 746516a67553ea3b0b54f5c7992bac4077a61154 +Author: evomarc +Date: Thu Aug 29 16:44:30 2002 +0000 + + Added a missing test in the weak elitism + +commit f81d92a0af1e8c291ea91174ddd711b1590f6de2 +Author: evomarc +Date: Thu Aug 29 16:31:50 2002 +0000 + + Added an error message in case of unknown reducer + (was the source of a segmentation fault with old parameter files) + +commit d4093063cbed71039571e0937bdd76060d901d42 +Author: evomarc +Date: Fri Aug 23 16:06:06 2002 +0000 + + Removed non-tested code (forthcoming)... + +commit 90a3e34c7f5f8d2d771deb9d7aeadacc72150a80 +Author: evomarc +Date: Fri Aug 23 16:02:02 2002 +0000 + + It was about time to enter the template file for EASEA here, as createSimple + and EASEA are doing approximately the same job ...` + +commit 61f9b5124345233bedafd68d245363e1c4701ea9 +Author: evomarc +Date: Fri Aug 23 15:58:15 2002 +0000 + + Adding a simpler way of generating files for new genotypes (see EO.tpl + in EASEA). + +commit 06ac548f96a1867936bb4eac0fcfc22bdb684eb9 +Author: evomarc +Date: Fri Aug 23 15:56:09 2002 +0000 + + Adding more repalcements utilities (see do/make_easea_algo.h) + +commit 065cc646aa253f0379d726a435067f4bf6e4435c +Author: evomarc +Date: Fri Aug 23 15:54:30 2002 +0000 + + Adding replacement strategies: teh ReduceMergeReduce for EASEA and the + MGG and G2 replacements from Deb's PCX paper + +commit 7bf32a66fd13766b499859733fe362422ffb65af +Author: evomarc +Date: Fri Aug 23 15:52:40 2002 +0000 + + Adding make_xxx files for EASEA + +commit c856f433b23df7b34655de3352c35691455a4ab8 +Author: evomarc +Date: Fri Aug 23 15:50:57 2002 +0000 + + Adding eoSGAGenOp.h - mimicking eoSGATransform into an eoGenOp + +commit 6c2539d81f9aa623fa580e8dd305f13d4b56368f +Author: evomarc +Date: Fri Aug 23 15:49:29 2002 +0000 + + Added the invalidate method + +commit 5274c852f1b7408c39bf8f0446bf58a519070987 +Author: evomarc +Date: Fri Aug 23 15:44:27 2002 +0000 + + Tiny details + +commit 18cd20da78d48f9fc517006fd819234f0605c156 +Author: evomarc +Date: Fri Aug 23 15:41:00 2002 +0000 + + Added bounds to FitnessStat and Gnuplot monitor + +commit 86c7c8fe958caed3a08f2caa3f1c68a9f9a41619 +Author: evomarc +Date: Fri Aug 2 07:40:47 2002 +0000 + + Removed some multiple declaraions inside for loops that MSVC++ doesn't like + +commit 0caf6259e9c3a6a757f6db9446b80f0fce315bec +Author: evomarc +Date: Tue Jul 30 03:21:59 2002 +0000 + + Removed a typo that made gnuplot file not be in the RESULT directory + +commit 4ec08e8b103e1e5681413035cc15aa067a6c3662 +Author: evomarc +Date: Sun Jul 28 05:40:25 2002 +0000 + + Added eoReduceMergeReduce and elitism (+ corrected small bug in eoHowMany) + +commit 98a1441137b0ad8de71279dbdb53e172d578742e +Author: evomarc +Date: Wed Jul 24 18:08:30 2002 +0000 + + A radical change in eoCheckPoint - though invisible from the outside: + eoCheckpoint now alos contains a vector - and not only + IS A eoContinue. So you can ADD another eoContinue to an eoCheckpoint... + +commit bc7aee869fc4e6dc7ea5214be8711b22659a07e7 +Author: evomarc +Date: Wed Jul 24 18:05:18 2002 +0000 + + There was a problem with the activation of the Ctrl C + +commit 030be821326dd8b5a81460bbedc701b7210c5f60 +Author: maartenkeijzer +Date: Tue Jul 23 09:34:46 2002 +0000 + + added EO.h to include list + +commit 5914ad91956e543c44dc0ccd47b1b14f7c218be0 +Author: maartenkeijzer +Date: Tue Jul 23 09:17:59 2002 +0000 + + Run it for 50 generations, it's too fast otherwise :) + +commit 7e5907eae245fe102033c5e949c78e9394a4b0e1 +Author: maartenkeijzer +Date: Mon Jul 22 13:35:11 2002 +0000 + + oops, that should teach me to compile before commit + +commit c55fcdbb3f8c329ca848105a213dac865e0a82ec +Author: maartenkeijzer +Date: Mon Jul 22 13:31:55 2002 +0000 + + added a 'nasty_declone_flag' to be able to declone a population + +commit 3b6a88f34e128ebabaef11d1680de7d620028e0d +Author: maartenkeijzer +Date: Mon Jul 22 13:20:04 2002 +0000 + + Added 'sweepline' optimization for eoNDSorting.h + +commit 7f550d008e88160a4438a28e3da400a0dfc12702 +Author: evomarc +Date: Sat Jul 6 05:24:51 2002 +0000 + + Added eoSequentialSelect.h in the includes + +commit a7a1ed2326c6bf0ea86b2f3126769beeae781f9e +Author: evomarc +Date: Sat Jul 6 05:23:18 2002 +0000 + + I had left a flaw in teh Ctor (did not accept rates >1) + +commit e2e876790274513d5f38ac4c08b77d639e6cdf77 +Author: evomarc +Date: Fri Jun 21 13:50:39 2002 +0000 + + Changd a const_iterator to iterator in method it_best_element + God (or Maarten :-) knows why this was there + +commit 427ed0f5bfa029d59086b91df1cdb6ccceae5de6 +Author: evomarc +Date: Fri Jun 21 13:30:17 2002 +0000 + + Added the negative rate (-> 1-rate) and the unary operator- (useful + in eoG3Replacement) + +commit 6501b48ac44c29dff795c712572ea301ac888a37 +Author: jeggermo +Date: Thu Jun 20 12:38:47 2002 +0000 + + small typo + +commit eb6e630a276cfbfb3e53263054edfcbaadcd5fdf +Author: evomarc +Date: Wed Jun 19 03:42:54 2002 +0000 + + Replaced ../../src with the DIR_EO macro! + +commit 2779191f635f24557e377c75bf1c91326fe404c7 +Author: evomarc +Date: Mon Jun 17 09:19:17 2002 +0000 + + Added include file eoHowMany for self-consistency + +commit 801b84fc0c12e3b58bbe733c9ac156ad4e3823bd +Author: evomarc +Date: Mon Jun 17 09:18:37 2002 +0000 + + Removed eoSequentialSelect + +commit c3aa9710a1f2692bcf86961ffd90c887e5cdf3ad +Author: evomarc +Date: Mon Jun 17 09:13:47 2002 +0000 + + Added the Truncation embedders, and the separate eoSequentialSelect file + +commit 5bdfaf0eaa23265ca59aebd5e64fba2d966c885a +Author: evomarc +Date: Mon Jun 17 09:12:08 2002 +0000 + + Separated eoSequentialSelect from eoRandomSelect.h file + Added eoEliteSequentialSelect, where best is always selected first, useful for + G3 engine + +commit a764bb57828198e5d6463d6589fe856d90ff0a3a +Author: evomarc +Date: Mon Jun 17 04:51:34 2002 +0000 + + Reshaped the whole code + Added the SequentialSelect selectors + THe generated files are now "hidden" in ResSelect dir (hardcoded!) + +commit e9e3cbb62305520773e8e10d353dda9659e57c83 +Author: evomarc +Date: Mon Jun 17 04:13:45 2002 +0000 + + Adding the truncation selectors. + 2 versions: eoTruncatedSelectOne is an eoSelectOne, and + eoTruncatedSelectMany works like an eoSelectMany (but is NOT) + +commit 86df5ac367e889076b2f553388a455f500649a2b +Author: jeggermo +Date: Mon Jun 10 14:10:35 2002 +0000 + + all .dsp files converted from unix to dos format + +commit 43f0d7ea79773efcc95c5f5eff49880bc1f178a7 +Author: evomarc +Date: Wed May 22 02:13:06 2002 +0000 + + I had forgotten the real_value.h - SecondRealEA did not compile! + +commit 2e87ffd00f6f0810836d41ba3f798421b509ab9c +Author: jeggermo +Date: Mon May 13 11:31:32 2002 +0000 + + EO::printOn has been changed so that the printOn function will + always print a valid fitness value even if the fitness is invalid + + Jeroen + +commit 07f2de55dc48b41ac8173fed9af70687bdf84208 +Author: jeggermo +Date: Thu May 9 15:43:01 2002 +0000 + + ramped half and half initialization has been added to eoParseTreeDepthInit + +commit d3762cdff2a35f7b21b37f8982dbdc16a95b53dd +Author: evomarc +Date: Thu May 9 06:35:34 2002 +0000 + + Still introducing ParadisEO + +commit 1611bc663c2586963cc6ac50635c7ed29d7cf214 +Author: evomarc +Date: Thu May 9 06:28:34 2002 +0000 + + Added references to ParadisEO and Lesson5 + +commit 0ce2809cc7d3404c7511df767f9a32b1b870393d +Author: evomarc +Date: Wed May 8 06:55:21 2002 +0000 + + Added Lesson5 + +commit d17ec8cf774a6f5ae032a9b17f74e51fba46f828 +Author: evomarc +Date: Wed May 8 06:52:37 2002 +0000 + + Updated version number + +commit c5e225551ae397fa715efffd3fe2c3b23ee8a427 +Author: evomarc +Date: Wed May 8 06:50:58 2002 +0000 + + Adding the Lesson5 - how to create your own genotype + +commit b407bf5e8194c2ef8c26f1967b0a8e6814148d7c +Author: evomarc +Date: Wed May 8 06:47:50 2002 +0000 + + Added the MyStructLibEA.cpp+make_MyStruct.cpp that allow separate + compilation of representation-indenepent stuff. Modified create.sh script + and Makefile accordingly. See Lesson5 of the tutorial + +commit e2e2f39cc75fa318c9afb742da0dd680e2900d3c +Author: evomarc +Date: Wed May 8 06:44:04 2002 +0000 + + an example of how to make a new genotype within EO - see HTML doc + +commit f2e20f638ef69d87bc52b6cfb349c8ef9b47e769 +Author: evomarc +Date: Wed May 8 06:31:18 2002 +0000 + + Replacing Paradiseo(jet7).pdf with paradiseoJet7.pdf because of Unix problems + with names containing commas + +commit 5b3b5d79fab1c87164a8b2aa04205046b971a63a +Author: evomarc +Date: Wed May 8 06:14:23 2002 +0000 + + Removed the template_depth argument (since we are finally NOT going for + the fitness_trait stuff). + +commit a4883fda9baf11393028aaea7f4e89b478413efc +Author: evomarc +Date: Fri May 3 05:12:32 2002 +0000 + + Replaced the eoParameterLoader parameter by an eoParser (used everywhere now) + +commit ee5297a57399cee872b2a5c2d1e3dd0899e3c9a2 +Author: evomarc +Date: Wed May 1 04:04:15 2002 +0000 + + eoParameterLoader -> eoParser + +commit 8998caa4ff0672d545dc6bd92df1c4d47502729e +Author: evomarc +Date: Wed May 1 02:44:54 2002 +0000 + + THe code for the 1/5th mutation was completely wrong! + +commit d4da2d9f7d787bb6d60a1ec397e681c852fd337d +Author: evomarc +Date: Tue Apr 30 05:10:49 2002 +0000 + + Turned the power function to sum - was untractable with long bitstrings + +commit 9c6121604a3689f6b7d8e7d5da4f6fc12070674f +Author: evomarc +Date: Tue Apr 30 05:07:52 2002 +0000 + + Added the calls to EO::printOn and EO::readFrom in the corresponding methods + so th euser does not forget to use these before writing/reading the actual eo + +commit 8b5b42a9f8511b8e527f9ee148cbaba8285312f4 +Author: evomarc +Date: Tue Apr 30 04:56:39 2002 +0000 + + Added utils/eoUniformInit.h + +commit d6e33dbaee8dba52974cb9887575afc27cb60e6a +Author: evomarc +Date: Tue Apr 30 04:54:25 2002 +0000 + + Copied from eoRndGenerators here is eoUniformInit, same thing but in the eoInit + hierarchy. + Useful to embed into higher levels eoInit + +commit 361741b72615be4dc6348f0c21ebcc20ec3f8505 +Author: evomarc +Date: Sun Apr 28 05:04:24 2002 +0000 + + Adding SecondRealEA + +commit 5c34d8ee79ad53e78ad08c4594d431b032fbff9a +Author: evomarc +Date: Sun Apr 28 04:38:38 2002 +0000 + + Adding SecongRealEA - mainly to prepare Lesson5 about adaptive parameters + +commit 8a2432b24e354b56caa496598576ee1abff83f50 +Author: evomarc +Date: Fri Apr 26 03:17:37 2002 +0000 + + Added explanation and examples of getORcreateParam usage + +commit 25a48948535878c5af054eb31f5cedcf927f22d5 +Author: evomarc +Date: Fri Apr 26 02:39:10 2002 +0000 + + Turned the code that was testing for the existence of the size parameter + in to the call to getORcreateParam (actually, this was where this code + has been tested the first time) + +commit 1e0717859d71d197bd11e06aba9b3b7a89c13563 +Author: evomarc +Date: Fri Apr 26 02:37:40 2002 +0000 + + Added the negative argument in Ctor to say that you want number + popSize - some fixed number + +commit d40ef9a053de0fab910bd3716e19d16030fdca28 +Author: evomarc +Date: Fri Apr 26 02:28:19 2002 +0000 + + Turned the createParam into getORcreateParam so that you can more easily + define them before (e.g. from the problem at hand). + This is useful specially for vecSize as some problems have predefined values + +commit c99bce368c067f77d7888e74d2087f4b0e90b0c5 +Author: cahon +Date: Thu Apr 25 14:26:02 2002 +0000 + + *** empty log message *** + +commit 9415bfad748178e7cf9810a544b3457e28fcecd6 +Author: cahon +Date: Thu Apr 25 14:10:22 2002 +0000 + + Adding cellular E.A. + +commit bffe8b0dfd1beff41da5dc883e8093d7a7826ffa +Author: cahon +Date: Thu Apr 25 14:08:26 2002 +0000 + + A toric topology for cellular E.A. + +commit 25b3719ce7e8c3351b1f46aca6d1dcff54f38162 +Author: cahon +Date: Thu Apr 25 14:06:43 2002 +0000 + + Cellular parallel easy algorithm + +commit d5b44015ab317c026d409f563a297e72220412c0 +Author: evomarc +Date: Tue Apr 23 09:56:49 2002 +0000 + + Updated the documentation (comments) + +commit 6d7fc8c69b0078d087b70fdd79a33e9ba9c91b8e +Author: cahon +Date: Tue Apr 23 09:16:51 2002 +0000 + + Slides from Jet7, March 2002, ENSTA Paris + +commit 70a4a2add5be1ba267beee98ed6cc84f7aa53055 +Author: cahon +Date: Tue Apr 23 09:11:58 2002 +0000 + + *** empty log message *** + +commit da53e1a382837a308d098f127092dfe4c1768fbe +Author: jeggermo +Date: Fri Apr 19 22:13:15 2002 +0000 + + A faulty constructor in eoParseTree caused some problems + +commit 09761ac2fc7dd6da6d894dabb478e1ade3dc1c87 +Author: cahon +Date: Fri Apr 19 15:24:07 2002 +0000 + + Slides from Jet7, ENSTA Paris (April 2002) + +commit 43779ba380959d0acfeeb686245335049d63e30a +Author: music_dev +Date: Fri Apr 19 14:42:47 2002 +0000 + + Multithreaded version. Changed name of lib to eo_lib[d].lib + +commit cec8f9136aa87d27aec88a86ae34fe96aec163e2 +Author: evomarc +Date: Fri Apr 19 14:06:50 2002 +0000 + + Templatized apply + added a return statement + +commit 9a56356c3376e59ee0b55afc04dff823d8f1aedb +Author: evomarc +Date: Fri Apr 19 14:04:25 2002 +0000 + + Replaced floats by doubles + +commit aa0437dc11c0d920051dc56032d472ea2d67b6be +Author: jeggermo +Date: Thu Apr 18 13:56:36 2002 +0000 + + new printOn and readFrom functions + (they look more like the eoBit ones) + +commit 34d474e6f6be91c71f775353852ce224a5a5fa82 +Author: evomarc +Date: Thu Apr 18 03:23:24 2002 +0000 + + Ome explanations on how to launch the examples + +commit d1ef6b2c0060cef4bd6902ad0d9164dc5c16defb +Author: evomarc +Date: Thu Apr 18 03:22:47 2002 +0000 + + Added the README, and modified the config files to remove the 127.0.0.1 + that was misleading + +commit 521f1b14ff12ddd4f9c18764a0e4b97c3975cfcc +Author: jeggermo +Date: Mon Apr 15 14:12:19 2002 +0000 + + *** empty log message *** + +commit 34c5efdcbf1a6a6cad577493bcb6dc1f5a8b98fe +Author: jeggermo +Date: Mon Apr 15 12:56:35 2002 +0000 + + eoParseTree printOn and readFrom functions changed for + compatibility with paradisEO + + The fitness is now printed in the same way as in eoBit + +commit 21372a2d821eaba3ac549fe50f3cd04f9d6873da +Author: evomarc +Date: Fri Apr 12 16:17:02 2002 +0000 + + Changed name of target in all_lib.dsp + Added eoParetoFitness.cpp in sources of eo.dsp + +commit 42a2a4f69e92b4913ce6046d766aafaae696707d +Author: evomarc +Date: Fri Apr 12 15:13:45 2002 +0000 + + A few changes for MSVC++ compatibility + +commit 019c8cd3e3de124801cdc4c2684c2bc5b4dd5e08 +Author: evomarc +Date: Fri Apr 12 14:41:52 2002 +0000 + + Turned the specific compiler order mpiCC into a Macro + so it's easier to modify + We shall need to put this into the automatic configure one day ... + +commit a1fffff0455966a1e0ab5e361363d4a2d069e14f +Author: evomarc +Date: Fri Apr 12 14:39:58 2002 +0000 + + 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 + +commit 64ca17c66f2f155026175fbb72f6cdec893cc7b3 +Author: evomarc +Date: Fri Apr 12 14:13:08 2002 +0000 + + Adding ParadisEO Tutorial examples + +commit 2ad3cbe9da47dade4b59f4db61f94e68615041ec +Author: evomarc +Date: Fri Apr 12 13:38:08 2002 +0000 + + Added name of the Debug library + +commit 9492ebd58eb74d93eae80e57efd058b703e74f1f +Author: evomarc +Date: Tue Apr 9 08:48:44 2002 +0000 + + Modified the comments so they appear in doxygen doc (and updated them also) + +commit d84517cb53e3d39501451a3bace101bff2627100 +Author: evomarc +Date: Mon Apr 8 18:04:32 2002 +0000 + + Modified my E-mail address (the old one at Polytechnique will soon be obsolete) + +commit f3535911a2af230608d97a96e7b7d86fcd71f156 +Author: evomarc +Date: Mon Apr 8 18:03:35 2002 +0000 + + I suddenly realized that BitEA.html was NOT in the repository! + +commit 684862253982a8dc082972214235cee7a7a7b5b9 +Author: evomarc +Date: Mon Apr 8 08:50:27 2002 +0000 + + Added the eoIncrementorParam - now ALL pointers allocated in make_checkpoint + are stored somewhere (the generation counter was not) + +commit bd688656bba77f89e15424ba0394e2a93e002dce +Author: evomarc +Date: Mon Apr 8 08:42:46 2002 +0000 + + Check that size > 1 (otherwise division by 0) + +commit 9341d7c2293c079ac7c88dd73b50d7cc02c2276d +Author: evomarc +Date: Mon Apr 8 08:42:01 2002 +0000 + + Added a few "std::" before copy and ostream_iterator + +commit 65395e7d282ff1631775dfe1e6e9774fb7b38c5a +Author: evomarc +Date: Mon Apr 1 20:15:32 2002 +0000 + + After indoduction of paradisEO, eoEaseyEA was a subclass of class eoPopAlgo + and not eoAlgo. + I don't have time to investigate, so I went back to a subclass of eoAlgo. + We'll sort that out later (after EuroGP I guess). + +commit 6afc695dce3e568d1c6ca9f0cc034f429d739121 +Author: cahon +Date: Fri Mar 29 15:38:15 2002 +0000 + + *** empty log message *** + +commit aec83a00149a63f994cca3e153d7acda450c2584 +Author: cahon +Date: Fri Mar 29 15:36:04 2002 +0000 + + How to build an EA with a distributed evalaution process ? + +commit 6bb81f22787fda9ea48cad4043dfab9627379900 +Author: cahon +Date: Fri Mar 29 15:30:55 2002 +0000 + + How to build an homo/heterogenous island model of EAs ? + +commit d31c5942c4904697926e977da859b81abf78d161 +Author: cahon +Date: Fri Mar 29 15:16:11 2002 +0000 + + *** empty log message *** + +commit 6fd042962d27abfe6a9a431961d9d26630acb8da +Author: cahon +Date: Fri Mar 29 15:10:04 2002 +0000 + + For any sending message + +commit 37d09fbccd9ef1eb3c6ebd1506fd11bf60cf78ed +Author: cahon +Date: Fri Mar 29 15:05:35 2002 +0000 + + The local communication layer + +commit 694a908a61a445ee4312371249492dd3546fe769 +Author: cahon +Date: Fri Mar 29 15:04:49 2002 +0000 + + The global communication layer + +commit 59b6246f76a43b0ab41fa4b0d3f3773a4195ee08 +Author: cahon +Date: Fri Mar 29 14:59:58 2002 +0000 + + An evaluator which sequentially values individuals making the pop. + +commit 972fbb5d5875f5434522ec35cfa311b212025be2 +Author: cahon +Date: Fri Mar 29 14:57:30 2002 +0000 + + The slave evaluator node + +commit 67039066e251a7347dbe3d79b428ff17e4a59ca7 +Author: cahon +Date: Fri Mar 29 14:56:18 2002 +0000 + + The master dispatcher evaluator + +commit 828770b8701877316a15a720b170e8ab086d1796 +Author: cahon +Date: Fri Mar 29 14:54:52 2002 +0000 + + An EA with a distributed evaluation process + +commit 6667499e62332775475775f40a6bec6c0ab8ce8d +Author: cahon +Date: Fri Mar 29 14:50:11 2002 +0000 + + Each island is connected from/to only one neighbour + +commit 9796e56c13f49224fd92d8423452fdb68656b62e +Author: cahon +Date: Fri Mar 29 14:49:04 2002 +0000 + + Each island id connected to the whole considered islands + +commit 8ee9c80e3f528f47f4f299b8969a474a8d776417 +Author: cahon +Date: Fri Mar 29 14:47:13 2002 +0000 + + A checkpoint to send/receive pop. to/from others islands + +commit 47b36ea06e85ca91281893e9ad7fc47eb1f7496e +Author: cahon +Date: Fri Mar 29 14:45:00 2002 +0000 + + The island EA model + +commit 5e74a52bce2d6bc692f8c6d470e010f5a896a9a0 +Author: cahon +Date: Fri Mar 29 14:41:01 2002 +0000 + + A continuator which periodically returns false + +commit b6dcf911b72a3f0e1b5c0c5e724f8eba23fda3c4 +Author: cahon +Date: Fri Mar 29 14:38:36 2002 +0000 + + A tool to apply a process to any incoming EO ... + +commit f87e19bf0062bf937044e3a8ed8c571277b23734 +Author: cahon +Date: Fri Mar 29 10:34:16 2002 +0000 + + *** empty log message *** + +commit 0de7f7aefdc9a6f4f5fe8fa24bb1d129a19778df +Author: cahon +Date: Fri Mar 29 10:26:36 2002 +0000 + + *** empty log message *** + +commit e21c37d51db69014d983c4047e819dadcc43fb71 +Author: cahon +Date: Fri Mar 29 10:02:47 2002 +0000 + + The paradiseo interface + +commit e95578b3fc3f7f2ad19696667639196cc8cab149 +Author: cahon +Date: Wed Mar 27 17:31:05 2002 +0000 + + Some changes for the use in paradisEO + +commit c1d61241404f67de0f3df991440a2fa3599b8bfa +Author: cahon +Date: Wed Mar 27 17:28:04 2002 +0000 + + Defines any population-based algorithm. + +commit 5b9af91d2abfbf451411042a83fea2499b478d62 +Author: cahon +Date: Wed Mar 27 17:19:25 2002 +0000 + + Any EO with an invalid fitness should be printable ! + +commit 32f1c986309e2fda9446dfc3180fba37e9060750 +Author: evomarc +Date: Fri Mar 22 11:01:30 2002 +0000 + + Added the time counter in make_checkpoint + +commit a79eb09ea6225f9ec0d351f322fbf052849b8b7e +Author: evomarc +Date: Fri Mar 22 10:57:37 2002 +0000 + + Added the eoTimeCounter that allows to use time as a base counter + for statistics (when you compare things that are not using the same + evaluation function for instance) + +commit e1319605e69b120584ef7dc5b71ccbaada290192 +Author: evomarc +Date: Fri Mar 15 06:41:54 2002 +0000 + + Added the lonk to SourceForge in the title, and to README in the "install" section + +commit 414eafa2774e971ac92f0c34325dc9c02d11f0af +Author: evomarc +Date: Fri Mar 15 06:28:25 2002 +0000 + + The source file names had changed, some day, in doxygen-genertaed doc ... + +commit b8661ed2b620f03f62d0622c0b129a24fd223bcf +Author: evomarc +Date: Fri Mar 15 06:06:22 2002 +0000 + + Corrected a few linkgs to the documentation + Reaplced eoBin with eiBit (about time!!!) + +commit a80a25c5f57d6e014a14c00c8a53f776ca3806b8 +Author: evomarc +Date: Wed Mar 6 06:54:00 2002 +0000 + + More on parameter input (getORcreateParam explained) + +commit 5881cab5388c65eda12e24d242604b29f896e463 +Author: evomarc +Date: Wed Mar 6 06:28:27 2002 +0000 + + Added the tags to generate html nice output + +commit dcee458c27d51bf1201145ffcb089c0c23e7fde9 +Author: evomarc +Date: Wed Mar 6 06:25:40 2002 +0000 + + Added some explanations about the memory mangement (through eoFunctorStore) + +commit c7743f88eff30bb77b934bebd88f6692d6afae71 +Author: evomarc +Date: Tue Mar 5 05:46:55 2002 +0000 + + Corrected a sligth error in eoParamParam reading that resulted in making the comma + part of the stored string value + +commit 8f740ab8846ff3c663cdb14ecdf06d9fc814e30a +Author: evomarc +Date: Tue Mar 5 05:38:21 2002 +0000 + + Adding class eoParetoOneConstraintFitness, multi-valued fitness + 1 constraint + This file shoudl contain the general Pareto+contraint class - but + I'm in a big hurry. + +commit 194f6bf45ec4a6a7d97699a8761b6970761447ca +Author: evomarc +Date: Tue Mar 5 05:34:27 2002 +0000 + + Changed the reading of parameter resDir from createParam to getORcreateParam + so it can be used in other parts of hte program (it's handy to put all + disk outputs in one dir). + +commit fb09ff1ac7952c36ba081433df9e980cc31b0d7d +Author: evomarc +Date: Mon Feb 11 06:28:52 2002 +0000 + + Added file monitors for the population in the Pareto space (were ony available as + eoGnulpot1DSnapshors before) + +commit 78a8f3cd57a915764133f078f03653d06293ed07 +Author: evomarc +Date: Mon Feb 11 06:27:44 2002 +0000 + + Added a title (Gen. X) to the plot so you can follow what's going on + +commit 49dd11d2c59f125c2f54f2d3e811eec566097d13 +Author: evomarc +Date: Mon Feb 11 06:26:48 2002 +0000 + + Added the getCounter() method so subclasses have a hand on the generation nb + +commit 6546cb8c52707f55527de6ba4d5d36eac9718893 +Author: evomarc +Date: Sat Feb 9 05:01:48 2002 +0000 + + Corrected a serious bug in eoUniformMutation (double declaration of bool HasChanged) + The consequence was that if that mutation was the only operator called on some + individual, it was not invalidated, and hence its fitness not recomputed!!! + +commit 4fea57e84d478821c93f86eec644e55aaf556f39 +Author: evomarc +Date: Sat Feb 9 04:58:33 2002 +0000 + + First instances of the make_xxx_pareto, where xxx is algo, continue and checkpoint + +commit f0452128638bbd915d5c1c90e05c2de9c40e31ec +Author: evomarc +Date: Fri Feb 8 07:51:59 2002 +0000 + + Added the constructor from a string + +commit 53eac8838bdd4d82bb2be5ad3133347c63acffa8 +Author: evomarc +Date: Fri Feb 8 07:49:32 2002 +0000 + + Added the method getORcreateParam. + It has exactly the same syntax than the createParam method + but it first checks whether the param has been laready entered before creating it + +commit 5fbbe4c9e91f02da6d26b902fda2842d3eacd307 +Author: evomarc +Date: Fri Feb 8 07:48:03 2002 +0000 + + Added a constructor from a vector - mandatory in all applications + +commit 448a5189fd55cf4918b95d7104ede9c02902a0e9 +Author: evomarc +Date: Fri Feb 8 07:47:03 2002 +0000 + + Removed the const in method eoInit & atomInit() + +commit 600b08a7f66135eecec6cf602c330026a7329a3b +Author: jeggermo +Date: Mon Feb 4 14:28:00 2002 +0000 + + the gpsymreg code has been slightly altered to allow compilation using the + Intel C++ Compiler for Linux. + + Other compilers should not be affected. + + A slightly different makefile is needed + +commit 94a13c6d534f45106098b7efa6d7e6d5609f5650 +Author: jeggermo +Date: Mon Feb 4 13:16:50 2002 +0000 + + Fixed some compatibility issues with GCC 3.0.1 and the Intel C++ Compiler + for Linux v5. + +commit e4523b3080ac23213ac1369823b1c4f2455bcab4 +Author: evomarc +Date: Sat Feb 2 07:37:54 2002 +0000 + + Added warning in case number of objective is changed (and not set) + +commit 2873f0b3ea3f2319da4f034be012ae2c11812aa1 +Author: evomarc +Date: Sat Feb 2 07:36:58 2002 +0000 + + Suppressed the lt_arity fn that was added for MSVC - and now seems unnecessary + +commit 066ba2eec21e797f0084475b8c291fb39b25f25e +Author: evomarc +Date: Sat Feb 2 07:36:12 2002 +0000 + + Added warning test + +commit 839c8ab11074a271780a93a164e51f9b28aa9e1f +Author: evomarc +Date: Sat Feb 2 07:34:13 2002 +0000 + + Added newline at end of file (to suppress g+ warning) + +commit cb4112b84daf0a4f6eac5eb54adf9eecdec02e24 +Author: evomarc +Date: Sat Feb 2 07:05:31 2002 +0000 + + Added the eoVariableParetoTraits (setup number of objcetives and min/max + at run time). + +commit daed31c0881244e90926547e9b3e015bcad514e4 +Author: evomarc +Date: Sat Feb 2 06:43:46 2002 +0000 + + Moved the static variables of class eoVariableParetoTraits + into a separate .cpp file (eoParetoFitness.cpp) - and modified Makefile.am + +commit 76ff13b2e3cc2a06005a967c710cdadadad3fc2d +Author: evomarc +Date: Sat Feb 2 05:59:05 2002 +0000 + + Added default value for bool arg in testDirRes function + +commit ef0e071dc6ec800b780eee14c52df710583f6828 +Author: evomarc +Date: Sat Feb 2 05:51:31 2002 +0000 + + Removed comment after #endif (warning in gcc 1.96+) + +commit 52bc2ed4f8748b2e6146ec2def5fdefc6debe14b +Author: evomarc +Date: Thu Jan 31 17:42:03 2002 +0000 + + Added the eoVariableParetoTraits that allows to specify the number + of objectives and the max/min for each one at run-time + +commit 6f5a34a13461817e23e70ce67952104e84ca7d86 +Author: evomarc +Date: Thu Jan 31 17:32:27 2002 +0000 + + Updated the comments + +commit 6cb8e652b5ec3ea24e40007341b647905fa88624 +Author: evomarc +Date: Wed Jan 30 12:24:42 2002 +0000 + + Added Ranking (God knows why it was mnissing!) + +commit 417c79179d345c8322e3374410974d296011a00a +Author: evomarc +Date: Thu Jan 17 17:57:55 2002 +0000 + + Added the move from Release and DEbug into the lib dir + +commit 87d733dda565cc408b2ad9fe3a94535dd9302ad9 +Author: evomarc +Date: Thu Jan 17 17:54:56 2002 +0000 + + Removed the #ifdef that protected the lt_arity avaints MSVC (!!!) + +commit 6ddec3bdceb5185a5a4ff62505113e5b4042be6b +Author: evomarc +Date: Thu Jan 17 17:51:58 2002 +0000 + + apply -> apply for MSVC + +commit b51d40e24f05b0346cd1b654a57584b07c427c3d +Author: evomarc +Date: Thu Jan 17 17:51:02 2002 +0000 + + Protexted all calls to gnuplot for MSVC + +commit a427432291828766b2db1cc7d73484c1225b1146 +Author: evomarc +Date: Thu Jan 17 15:24:44 2002 +0000 + + Adding tutorial files + +commit 83978dd8af959915fcf505db79333fea95607118 +Author: evomarc +Date: Thu Jan 17 15:21:44 2002 +0000 + + New versio of dsp files + +commit 45b5edc081bdade55df8261f10c62abe08195803 +Author: maartenkeijzer +Date: Wed Jan 16 14:52:11 2002 +0000 + + Increased template depth + +commit 93cde922d705f811e43841ab2858550dbf854ce8 +Author: evomarc +Date: Thu Dec 20 18:04:52 2001 +0000 + + There was an error in the type of the first parameter of make_checkpoint and + make_algo_scalar (changed from eoParameterLOader to eoParser) + +commit bdb125afbdd38421e644738e8f4738fdb2352e4e +Author: evomarc +Date: Fri Dec 7 06:28:38 2001 +0000 + + COnverted t_eoesall to CRLF line terminators (otherwise MSDEV cannot read properly) + +commit 38f35a1c5348f9e05144894bdeff41534c8fdb4b +Author: evomarc +Date: Fri Dec 7 06:23:15 2001 +0000 + + Adding t_eoesall that somehow ahd managed to escape until now + + corrected the template test_dsp.tmpl + +commit d74ef7466188f6d40d16923533432cebbefe7eaf +Author: evomarc +Date: Fri Dec 7 06:14:11 2001 +0000 + + Adding the tutorials in MSVC project files + +commit 9f7976c29231668775d5d9782fd97da1ca254b0d +Author: evomarc +Date: Fri Dec 7 05:51:36 2001 +0000 + + Removed all references to CrtDebug blabla that were supposed to be + MSVC specific but generated an error with MSVC 6.0 + +commit aa67e7d58dd690c98c8a4ad3bd68d24a61f3d8ce +Author: evomarc +Date: Thu Dec 6 14:33:42 2001 +0000 + + Need to put the \r\n at end of all files after modifications!!! + +commit b5a4afe8faa7a3827d13d8bdd97334b007c5f8fb +Author: evomarc +Date: Thu Dec 6 14:32:00 2001 +0000 + + Removed unknown CrtDebug directives from the MSVC version + +commit bd42e7567244fcbfd0cbbc9ff0bbc0a3dd75c973 +Author: evomarc +Date: Thu Dec 6 13:12:24 2001 +0000 + + Removed unnecessary dirs, added first Lesson of tutorial + +commit 82750f22d517bf26f3eaddee27d966b50c9988b5 +Author: evomarc +Date: Thu Dec 6 11:36:39 2001 +0000 + + Removed some sources that came here nobody know's how (thanks, MSDEV) + +commit 866ef81d43a42358c018917e5daed2a5193a2171 +Author: evomarc +Date: Thu Dec 6 07:02:07 2001 +0000 + + Changed ALL names of links to class files in the documentation due to the change in + Doxygen naming convention + +commit 6dcc949ee59fd78acfd665a6483099ef37a865c9 +Author: evomarc +Date: Thu Dec 6 06:44:44 2001 +0000 + + A few corrections before the big name change + +commit de1ae17ea86a8d971ee17910c97f65ba5fc57eeb +Author: evomarc +Date: Thu Dec 6 06:38:17 2001 +0000 + + CHanged a few erroneaous comments + +commit 04ab952760dfeec8449e2d9b5c18622636e7c35e +Author: evomarc +Date: Wed Dec 5 06:54:38 2001 +0000 + + Added GNUPLOT protection for MSVC compiler + +commit 7abbf595f71c38553ef7c1816819ec7ccbe41deb +Author: jeggermo +Date: Tue Dec 4 21:15:16 2001 +0000 + + some template classes and functions which did not need + to be templates have been changed to normal classes and functions + with hard coded typed + + This might help with M$VC++ 6.0 compatibility + +commit 61ea207287a2fc42ae0bedfe5c0b24d08602e10c +Author: jeggermo +Date: Tue Dec 4 11:49:25 2001 +0000 + + a different solution for lt_arity has been implemented (this time inside the + eoParseTreeDepthInit class + +commit d491c193e2c0c3ca645ae600387c2dfc7e21f214 +Author: evomarc +Date: Mon Dec 3 16:40:32 2001 +0000 + + Renamed mastermind.cc into mastermind.cpp for MSVC + +commit 8847dc3c509c966035489258bb5a3df371a07baa +Author: evomarc +Date: Mon Dec 3 16:38:52 2001 +0000 + + Renamed main.cc into main.cpp for MSVC + +commit 08aae27088b3cf77a0c1fd287939ea72293866ec +Author: evomarc +Date: Mon Dec 3 16:35:51 2001 +0000 + + Renamed gprop.cc into gprop.cpp for MSVC + +commit ea8c9ca9c3c99fba3401994d6f59e4bcb2fe1c05 +Author: evomarc +Date: Mon Dec 3 16:28:30 2001 +0000 + + Modified the path of include eoVirus because MSVC did not find it. + Now it is assumed that src will be in the include search path, that's all. + +commit d4b20d8833c7b2de3b9592cedb025a7f533297ae +Author: evomarc +Date: Mon Dec 3 14:31:35 2001 +0000 + + MSVC didn't find (easily) the contrib/MGE dir. So now it's written in the code + and the Makefile.am does not have contrib in the include look path + +commit 2aad10d347791814b187954578016d9afc1b3584 +Author: evomarc +Date: Mon Dec 3 14:20:24 2001 +0000 + + Added partial specialization of lt_arity .. + +commit 2a1fded2541bc5a2215be3560159a275e91dacea +Author: evomarc +Date: Mon Dec 3 14:14:56 2001 +0000 + + Added the 2 fake "projects" all_lib.dsp and all_test.dsp that allow to compile + everything in 2 clics. + However, we still cannot run and watch the status output of the test executables + +commit 512d368dcf8cd4a3c8721155fcb830f7da35b06e +Author: evomarc +Date: Mon Dec 3 11:08:17 2001 +0000 + + More details to make code MSVC-compatible + +commit eaf5ea0111a9a27b8e0d6a8521b45e568592ef17 +Author: evomarc +Date: Mon Dec 3 06:59:17 2001 +0000 + + Added links to some examples in the comments + +commit 4a90509051a141272b0bd51ecb17f230ace8fde1 +Author: evomarc +Date: Mon Dec 3 06:56:43 2001 +0000 + + Removed dir win from list of subdirs (generated an error in make check) + +commit 00f1a250003100792749977aad4686b593d2779c +Author: evomarc +Date: Mon Dec 3 06:53:52 2001 +0000 + + Removed the trailing comment after #endif (Warning in MSVC) + +commit 9bda49ae057f8eee42e08555e511ae8c4ba91ca0 +Author: jeggermo +Date: Thu Nov 22 15:01:11 2001 +0000 + + Fixed a small problem with eoPointMutation. + +commit a8c554710f22e2fe4e286a745ecdc9014c12bde2 +Author: evomarc +Date: Sun Nov 18 07:18:11 2001 +0000 + + Introductory comment evolves ... + +commit 7c04fc5de1e1d7302e8f80fcfc50bed579b96eb6 +Author: evomarc +Date: Sun Nov 18 06:54:13 2001 +0000 + + Added the names of the directories where the newly created files are stored. + +commit b455d5392548b01dfbd02b8aed69f7120219d163 +Author: evomarc +Date: Sat Nov 17 08:13:55 2001 +0000 + + Now the eo.dsw can be generated automatically from + eo.org + create_all_dsp.sh (that calls create_dsp.sh) + To add a new test program, simpy add 1 line in create_all_dsp.sh + and run it. + DO NOT TOUCH eo.org !!! + +commit f52b0f6646bf22c5439c5240b3d085ab145c34df +Author: evomarc +Date: Sat Nov 17 07:58:16 2001 +0000 + + imply put all program names on one single line to ease bulding the win files + +commit 8538cc453238b5d90caa049283c323decd84e100 +Author: evomarc +Date: Sat Nov 17 07:55:39 2001 +0000 + + Bug in create_dsp when no additional library + +commit d686b37c1f94ab40a6a195a6e66ea880db385f4a +Author: evomarc +Date: Sat Nov 17 07:54:12 2001 +0000 + + Turned bonary_value into the onemax (not pow that exploded for even only + moderately small size of genome!) + Turned it into a double (it was a float) as floats are dead and should dissappear + +commit f41cd957c0b947885fffcfe58653dc40116eb75d +Author: evomarc +Date: Sat Nov 17 07:22:59 2001 +0000 + + Changes due to MSVC + +commit 8abb9242c2bef605400816f59190bbe26d1a4907 +Author: evomarc +Date: Fri Nov 16 15:06:29 2001 +0000 + + Some error for MSVC that was not even a warning for g++ (but I'm sorry + to say that MSVC is right :-) + +commit 25765640ae7ad5088e401d77a86f0908a07c3b8b +Author: evomarc +Date: Fri Nov 16 15:05:41 2001 +0000 + + Changed the filenaming to comply with MacroHard + +commit 3eefeb651ebf36535a9dd800c6632d1880273e0b +Author: evomarc +Date: Fri Nov 16 15:02:35 2001 +0000 + + Error in argments check + +commit 86fb15267685135dc8912cc0a654c178011dbb4d +Author: evomarc +Date: Fri Nov 16 14:32:07 2001 +0000 + + The file eo.org is the base project file (no file in test involved). + It is upgraded by the create.sh script + +commit dbfa9a7aaa0217eaf18ea50651251f03f1dc83ca +Author: evomarc +Date: Fri Nov 16 14:30:58 2001 +0000 + + Adding all test files for MSVC + +commit 49cc03546af7ed1581fc5a6676def5d29f8dab25 +Author: evomarc +Date: Fri Nov 16 14:01:52 2001 +0000 + + Replaced the flat definitions of ncecessary classes (eoStatxxx and eoMonitor) + with the include of the corresponding .h file. as MSVC complained! + +commit 5597f3e353e23258c6e488d3bb1ded5cb2af7757 +Author: jeggermo +Date: Thu Nov 15 22:11:31 2001 +0000 + + small change in documentation + +commit af8618a47a54a5f74a9481202ae60aa05e1bfc49 +Author: evomarc +Date: Mon Nov 12 16:27:37 2001 +0000 + + Announcing the MSVC++ compatibility revisited + +commit bd53a220a5836c74823392f3fcb13f572409d859 +Author: evomarc +Date: Mon Nov 12 15:21:40 2001 +0000 + + A few more typename conditionally removed for MSVC++ + +commit 4a39f49a741cb8813e0ccb893fe896492ea69671 +Author: evomarc +Date: Mon Nov 12 14:59:32 2001 +0000 + + Adding Jeroen :-) + +commit fd4eda8aca0ce5935262d941e311c978311fe654 +Author: evomarc +Date: Mon Nov 12 14:51:51 2001 +0000 + + A readme for the win dir ... + +commit 72fc838360f81a87299135e70c62ca8da9c99845 +Author: evomarc +Date: Mon Nov 12 14:44:01 2001 +0000 + + Create.sh mdified to also add the new dsp file into eo.dsw + +commit 19ebcbd5e36a892ce43760d321d10948dbd89008 +Author: evomarc +Date: Mon Nov 12 14:27:12 2001 +0000 + + Template file for dsp project files (to be used within create_dsp.sh) + +commit 4ad58c360edc0a506b9cdf32168bdf4cca0478a3 +Author: evomarc +Date: Mon Nov 12 14:17:58 2001 +0000 + + Some more small changes for MSVC++ compatibility + +commit 0e4df9e40408100840afd4c0a12f8e640dc60902 +Author: evomarc +Date: Sun Nov 11 06:59:42 2001 +0000 + + Adding the dsp file for t-eoReal - testing the create_dsp script. + Next step is to add them all from the test/Makefile file + +commit 6324bb5179a314c5514ee0abcff098f1d3d92bdf +Author: evomarc +Date: Sun Nov 11 06:55:12 2001 +0000 + + Create_dsp.sh is a script that will create the .dsp file from a source file + name in the test dir + +commit aad54e0648b23cee416de767b748515a24efa355 +Author: evomarc +Date: Sun Nov 11 06:43:45 2001 +0000 + + Improved the UI a lot (checking for already existing files, etc) + +commit 78ca5ab75c470c9709036556e3ff1a7b0f3db50e +Author: evomarc +Date: Sat Nov 10 14:13:21 2001 +0000 + + Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIAC + +commit a79a7d6215d0664cbf7fc04ea9cfd4bae6e062df +Author: evomarc +Date: Sat Nov 10 14:12:01 2001 +0000 + + Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIA + +commit d7c3d973c78f978bda6d5c521037216b85352951 +Author: evomarc +Date: Sat Nov 10 09:02:17 2001 +0000 + + Small modifications here and there to be MSVC++ compatible + Mainly, time.h -> ctime + definition of loop index out of loops when multiply used + no typename in declaration using template typename + +commit a5e3abd9f6319f5e60baa04231d2a4260a4e0889 +Author: evomarc +Date: Sat Nov 10 06:59:02 2001 +0000 + + Added the #pragma directive for MSVC++ in all .cpp + +commit 62686ac4063c94afd281643e12a6346531d33e4f +Author: evomarc +Date: Sat Nov 10 06:32:05 2001 +0000 + + Added the invalidate() call - that bug was not seem before, because + we always used init on newborn genotypes! + +commit c5145c839930013ed2317358c77723b4c3904f7d +Author: maartenkeijzer +Date: Thu Nov 8 11:13:19 2001 +0000 + + Cleaned up + +commit 886523dccd74d0242b5f092a365aa10e6f07a768 +Author: maartenkeijzer +Date: Thu Nov 8 10:17:52 2001 +0000 + + removed the return 1 in the main + +commit 818e6d8a14b99cf2927cdf4ce626fa01cf29d85d +Author: evomarc +Date: Thu Nov 8 07:40:27 2001 +0000 + + Adding Distribution-based base abstract classes + +commit e0ae220420f5c4734718ef2504f164d866034b06 +Author: evomarc +Date: Thu Nov 8 06:53:55 2001 +0000 + + Adding PBIL + +commit 0816b742d9ae3937f8cb27dfae74e9d3fccfae6f +Author: evomarc +Date: Thu Nov 8 06:49:38 2001 +0000 + + Adding PBIL files - simple PBIL algorithm with simple additive update rule + +commit 9b7556d81e93488dcab31808a4b621bcca35702c +Author: evomarc +Date: Thu Nov 8 06:14:59 2001 +0000 + + I have changed all calls to use an eoParser rather than an eoParameterLoader + This is required if you want to use the method getParamWithLongName that allows + one to get a value of a parameter read somewhere else. + After changing 3 calls due to that, I decided to change ALL calls within + the make_xxx functions + +commit 03045f2d587834e85bcb8d4838b7c336c7baca2b +Author: evomarc +Date: Wed Nov 7 16:25:01 2001 +0000 + + Corrected a bug in the selector and replacement tournamemt parameter reading: + if you did not give the tournament sizes, the program either crashed or went + in some endless loop. + I also simplified the reading of those eoParamPram parameters! + +commit beba7bd5c995e2e713a22f93b5dc7cbbe8f762a8 +Author: maartenkeijzer +Date: Wed Nov 7 15:23:24 2001 +0000 + + Updated makefile.am such that "make check" will run all test programs. Fixed + a number of erronuous return values that made the script fail. What's left + is let Marc clean up the mess he made with t-eoReal and t-eoRealAllESAllAgain + +commit ddb9e026cfa2b8005644ee6e20569dfceaebd6be +Author: maartenkeijzer +Date: Wed Nov 7 10:57:53 2001 +0000 + + Fixed call to inverse_stochastic inside eoDetTournament + +commit 58f5fd2f61ffb4a0ce9e8e4b89c4a74fd7509dae +Author: evomarc +Date: Mon Nov 5 16:38:52 2001 +0000 + + Added method + eoParam* getParamWithLongName(std::string _name); + so now you can get a parameter in another place than where it was defined + just by giving its name + +commit aee6584ceaeead958048172a1d12009b2eec8069 +Author: maartenkeijzer +Date: Mon Nov 5 14:28:14 2001 +0000 + + Just some comments + +commit 50fe1cb529a493434b8dd24fb0b8b86d114b034a +Author: evomarc +Date: Mon Nov 5 08:24:59 2001 +0000 + + Small error in header + +commit 2d12525bc590287e0971e286e417bf6fbc536134 +Author: jeggermo +Date: Sat Nov 3 22:10:11 2001 +0000 + + the name of the eoGpDepthInitializer class (initializer for + parse_tree's has been changed to + + eoParseTreeDepthInit but backward compatibility is maintained by + using a #define statement: + + #define eoGpDepthInitializer eoParseTreeDepthInit + + The initializer for strongly typed GP has been changed to + eoStParseTreeDepthInit + + the gpsymreg application has been changed to use the new name + +commit 4584fda53d3815a5327d99096a4af1281d3fd81b +Author: jeggermo +Date: Thu Oct 25 10:39:55 2001 +0000 + + Some changes for using EO with libstdc++V3 and gcc-3.01 + +commit 0bbe7b84cb8056eb3ce643687bc607693d7f1728 +Author: jeggermo +Date: Fri Oct 19 12:04:12 2001 +0000 + + The nameless union in node.h has been removed because not all compilers + support it. + +commit 5897d0062fcf5faad4696d7be81d10544ac4df86 +Author: evomarc +Date: Thu Oct 18 11:48:52 2001 +0000 + + Replaced pushd and popd with cd and cd .. - for Windows/Cygwin compatibility + +commit 77645540567f4f0f407cd7aa575a5826fdbb9712 +Author: jeggermo +Date: Thu Oct 18 08:52:40 2001 +0000 + + Some changes to make gpsymreg compile correctly on windows/cygwin systems + +commit af05dfacb9a430a801c0ef4dd6e36c69479dccf9 +Author: evomarc +Date: Thu Oct 18 05:30:45 2001 +0000 + + Added MAXFLOAT and MINFLOAT as it seems that Cygwin needs that ??? + +commit 95216ac671189111b51fece47cc9c73df018f746 +Author: evomarc +Date: Thu Oct 18 04:57:30 2001 +0000 + + iAdding a file config.cache as it seems that the defaults don't work + in Windows/Cygwin environement. Thanks to Sebastiao CORREIA and + Jerome JEAN-CHARLES for providing this file. + +commit f7377b0fcf393f72b7766c5302c9ccdc47b68c20 +Author: evomarc +Date: Thu Oct 18 04:37:14 2001 +0000 + + All files on one line in Makefile.am (for Windows) + +commit 26481ab36ba7cee2676555bda31d5135b77a6d26 +Author: evomarc +Date: Thu Oct 18 04:34:58 2001 +0000 + + Modified the Makefile.am in main dir, and Makefile in tutorial dir to remove + all pushd/popd as they don't exist in Windows/bash + +commit 03308af599629b3124e97ae1ef7e878f665f92b7 +Author: evomarc +Date: Wed Oct 17 17:49:54 2001 +0000 + + Corrected a few small problems - including dependencies in Makefile + thanks to Sebastiao CORREIA for pointing them out + +commit 11b3eabfca8534cfa440da8d16b7d206dd434901 +Author: evomarc +Date: Wed Oct 17 17:48:50 2001 +0000 + + Corrected a few small problems - + thanks to Sebastiao CORREIA for pointing them out + +commit f2c21bdc0b37311b86b7e10657fe95f516559fd1 +Author: evomarc +Date: Mon Oct 8 09:14:15 2001 +0000 + + Removed trailing text after #endif - causes warning on many compilers + +commit 7e885e8f8c1ef5eacb9279dc10838a7127167681 +Author: jeggermo +Date: Fri Oct 5 12:39:30 2001 +0000 + + ramped half and half initialization procedure for eoParseTree populations + added. + +commit 8f1af522a68145b552f663ebe56d3f6c92c4c5ec +Author: jeggermo +Date: Fri Oct 5 09:32:49 2001 +0000 + + Since g++ 2.95.x on our solaris server doesn't have macros to check + for infinity and NaN these checks have been removed from the source code + and a protected divided function node is now used. + +commit 30616fca424a17615f0f4b232c6ac453170ebfc9 +Author: evomarc +Date: Fri Oct 5 03:56:21 2001 +0000 + + Forgot to double also the parameter to initialize in the Ctor! + +commit f4efc65994d6fcd4afa11818c7e2fb7bedcd2237 +Author: evomarc +Date: Fri Oct 5 03:51:15 2001 +0000 + + Modified the reseed method in RNG class so two different seeds give different + sequences, after Jeroen's remark (jeggermo@liacs.nl) + +commit 653e64df090bff2953a3c0b72ae4b0f658644bf7 +Author: evomarc +Date: Fri Oct 5 03:30:12 2001 +0000 + + Commented out the oeprator() default function in base class: I find it more secure + to be warned at compile time that one function is still pure virtual + than to look for the error after a run-time-error that gives no clue + +commit 0847875339a2201e48062ab6519f67236993f969 +Author: evomarc +Date: Thu Oct 4 20:13:03 2001 +0000 + + eoMyStructEA.cpp has turned into MyStructEA.cpp + +commit f3db65795bc5f4a0a4b5eec5214315ee39d5630e +Author: evomarc +Date: Thu Oct 4 20:12:19 2001 +0000 + + Big modifications - now the init and most important the operators + are handled in separate files make_genotype_xxx and make_op_xxx + as it was done in the examples of Lesson4 + +commit c34db3eb29ccdbf5fbe05c2ed337cbaeebcf2128 +Author: evomarc +Date: Mon Sep 24 05:59:42 2001 +0000 + + Suppressed most warning (except some unused variables) if you don't modify anything + +commit 1d7b79b85ac70b3dec8dff5ec7a3d44bf20bd0ba +Author: evomarc +Date: Mon Sep 24 05:59:13 2001 +0000 + + Suppressed most warning (except some unused variables) if you don't modify anythig + +commit d0d14c3ff845145aa67cb3a2bff08039c74aa020 +Author: evomarc +Date: Sat Sep 8 05:59:17 2001 +0000 + + Removed trailing string after #endif - it generates a lot of useless warning + on some versions of g++ + +commit ed9dac2dfe39dc519e93d25907805805c245a0ff +Author: evomarc +Date: Sat Sep 8 05:42:24 2001 +0000 + + Added newline at end of file (prevents a warning) + +commit 37a138c81bee83d3cfc8754e5ced08e5b5bd9cab +Author: evomarc +Date: Sat Sep 8 05:41:19 2001 +0000 + + Added include math.h + +commit 7bbdd173078cf7acbd35c2f1075ec8767dca103a +Author: evomarc +Date: Tue Sep 4 08:35:22 2001 +0000 + + Added many template files, and totally modified the comments in most other. + This was when preparing Evonet Summer School - though it finally was not used there! + +commit f69b785b39d889a57508f503663f268b5c0bef7a +Author: evomarc +Date: Tue Sep 4 06:51:59 2001 +0000 + + Modified the className() method so that the Atom underlying operator is listed + +commit 5fb8958b2898f2893dee890bcc91f8487bf4715c +Author: evomarc +Date: Tue Sep 4 06:50:42 2001 +0000 + + Included apply.h for consistency (though in most cases it was included from eo file + +commit 861f11e1532e71ee0a9d75da9d61ff5902273867 +Author: evomarc +Date: Tue Sep 4 06:48:15 2001 +0000 + + Added a class that turns an eoInit into a generator of EOT + Also added a Ctor of variable length objects that take an eoInit. + Some day we might want to clean all that stuff ... unless we leave + the choice to the user (but then the documentation shoudl be as clear + as glass, which it is not at the moment!) + +commit c352b19799433e881f71333fa7d2fc091c6d59dc +Author: evomarc +Date: Tue Sep 4 06:45:14 2001 +0000 + + In case you are trying to assign a value to a vector of different size, + previous versions raised an exception. + Now a simple warning is written to stderr - as it might be something + you need to do. + +commit e79edcffe700ee75432647fc35a54cd0425ef410 +Author: evomarc +Date: Tue Sep 4 06:43:19 2001 +0000 + + Added make_help in checkpointing, included stdexcept in eoParam. Comments + updates ... + +commit 62dfe13c3ad1e3392f24f6226e741d575081b577 +Author: evomarc +Date: Tue Sep 4 06:41:34 2001 +0000 + + Spotted and commented (but NOT corrected :-( a bug in case the ResDir + exists and is empty + +commit 4f642f848ee297a49548cda67bcbd776bc840d9b +Author: evomarc +Date: Tue Sep 4 06:40:28 2001 +0000 + + Corrected wrong arguments for the 2D Ctor + +commit 0f9f1cc3ea03df50dfa33ba0a311b767d9a080ab +Author: evomarc +Date: Tue Sep 4 06:37:25 2001 +0000 + + Comments update + +commit bb658f550ce2470eba74d17c1c5d84340cba33ba +Author: evomarc +Date: Tue Sep 4 06:35:58 2001 +0000 + + Changed the wrong #ifdef in make_algo_scalar (+ minor comments elsewhere) + +commit af9155765609aaad5f8281694c67db94b3ac27f5 +Author: jeggermo +Date: Tue Jul 17 13:06:28 2001 +0000 + + check for the existence of isinf didn't work the way it should so + it has been removed + +commit 21e42be6d3dd284b38a4872ca2033080e7e3122c +Author: jeggermo +Date: Tue Jul 17 08:58:52 2001 +0000 + + small documentation change for eoParseTree.h. + + added a depth initializer for strongly typed genetic programming + added subtree xover for strongly typed genetic programming + added branch mutation for strongly typed genetic programming + added point mutation for strongly typed genetic programming + added hoist mutation for strongly typed genetic programming + +commit 6c969bfbce5764097698d1d8f5b9035f015682aa +Author: evomarc +Date: Wed Jul 11 06:26:11 2001 +0000 + + Suppressed the gene mutations, as they are now in eoFlOrMonOp.h + +commit 7ac99966757e2c2f6dde92f224331ced63bea9c8 +Author: evomarc +Date: Wed Jul 4 04:59:02 2001 +0000 + + Oups! + +commit 963683996d6143c4422661bfd0eed2d0187006a1 +Author: evomarc +Date: Wed Jul 4 04:44:30 2001 +0000 + + Adding eoPopEvalFunc, that handles evaluation globally: it receives + two populations, parents and offspring, and does whatever necessary. + The subclass eoPopLoopEval does the simple loop on the offspring. + + eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, + but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. + +commit 88061395f12b6b387c849103f6bdccc4c953f332 +Author: evomarc +Date: Tue Jul 3 12:56:44 2001 +0000 + + Added the eoPopEvalFunc class: gets the full parents + offspring populations + in order to evaluate them. + Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as + before (it is then encapsulated into an eoPopLoopEval that does the good + old loop on the offspring - or directly pass a full eoPopEvalFunc + + Small modification also in make_op_es -> keyword "none" is now recognized + for one of the crossover of either object variables or stdev's + +commit a611939e684885a63d7b333c6ffaec0fd8148069 +Author: jeggermo +Date: Mon Jul 2 13:31:04 2001 +0000 + + Changed the directory structure for gp + now: eoParseTree <-- the eoParseTree class + eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) + eoParseTreeOp <-- the operators (xover and mutation) + + base documentation written for: + * eoParseTree + * eoGpDepthInitializer + * eoSubtreeXOver + * eoBranchMutation + * eoPointMutation + * eoExpansionMutation + * eoCollapseSubtreeMutation + * eoHoistMutation + + I also created a group ParseTree which contains all classes related to eoParseTree + + eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp + +commit 402e34c238445f4d9d5d2c15abfb95ae93daf9fb +Author: jeggermo +Date: Mon Jul 2 11:38:27 2001 +0000 + + The constructor for the eoGpDepthInitializer has been extended with a + sort of the initializor vector containing all possible nodes. This sort + assures that the terminals are in the front of vector. Untill now this + was assumed but not checked or enforced. + +commit af726e9d9ec1d5428259028c409b746f995a204d +Author: jeggermo +Date: Mon Jul 2 08:28:40 2001 +0000 + + eoSubtreeXOver fixed + +commit 967670e2c7fe6b249d61e5c48cf0de860876a6be +Author: evomarc +Date: Sat Jun 30 05:59:26 2001 +0000 + + Added random selection + +commit 48a784d122e6a5405e85dcecce309d3eb5b9de33 +Author: evomarc +Date: Sat Jun 30 05:57:10 2001 +0000 + + Corrected a wrong comment + +commit f674fbeb1411b3f5a4adf30c650c9a667b462e3e +Author: maartenkeijzer +Date: Fri Jun 29 18:06:10 2001 +0000 + + oops, thanks jeroen + +commit 375568853aa7c9c6b01ab96261837132746ea7af +Author: jeggermo +Date: Fri Jun 29 12:15:15 2001 +0000 + + checks for the existence of finite(x) and isinf(x) built into app/gpsymreg. + Linux gcc compilers have the 'macros ??' but solaris gcc does not + +commit c7aba2f3c4a45d69d904eb5ba04856d32c06bb5e +Author: jeggermo +Date: Fri Jun 29 09:22:26 2001 +0000 + + app/gpsymreg/Makefile added to configure.in + +commit 9242c8454145d7783261c8834cb065bf5441eed9 +Author: jeggermo +Date: Thu Jun 28 15:03:53 2001 +0000 + + app/gpsymreg/Makefile added to configure.in + +commit f41c5f2ff68bb1e0b57400f687afe4dfbf104b85 +Author: jeggermo +Date: Thu Jun 28 14:39:36 2001 +0000 + + addition file for parameters for symreg gp + +commit 00c671f24c9de4b6fe453148fb7598b84c857f42 +Author: jeggermo +Date: Thu Jun 28 14:38:00 2001 +0000 + + node.h containing Tree-node classes for symreg gp + +commit f1b6eb5dd8c95b7f29ec36c1b6837c30a20e6df8 +Author: jeggermo +Date: Thu Jun 28 14:33:51 2001 +0000 + + main.cc for symreg gp + +commit 0c1ab037046bc0a9fe87de865b0de754696d8f6b +Author: jeggermo +Date: Thu Jun 28 14:26:35 2001 +0000 + + gp symbolic regression trees added + +commit 3486dfafd64f3f7207076a89eaa1f7612147b3f0 +Author: jeggermo +Date: Thu Jun 28 14:18:47 2001 +0000 + + eoGpMutate.h added containing 4 new mutation operators for eoParseTree class + +commit 9efdfa59f8b2d592866fb2c8534c68a57de591bd +Author: jeggermo +Date: Thu Jun 28 14:11:04 2001 +0000 + + Symbolic Regression GP added app-dir + +commit 840717bea8c37e356d6805b8252399019ac80002 +Author: jeggermo +Date: Thu Jun 28 14:03:59 2001 +0000 + + new Mutation operators for eoParseTree in src/gp/eoGpMutate.h + + a symbolic regression example program added to the app-dir + + configure.in and Makefile(s).am changed + +commit 164e36b184e48a8499b8b5a28ea6531ea1d657fb +Author: jeggermo +Date: Thu Jun 28 13:55:14 2001 +0000 + + Additional mutation operators for eoParseTree + + * Point Mutation + * Expansion Mutation + * Collapse Subtree Mutation + * Hoist + +commit fd61f8f475353259be22388939f44ee1c9372c14 +Author: jmerelo +Date: Thu Jun 21 12:03:17 2001 +0000 + + Updating Royal Road + +commit 49434ecc03cb33a93b6cf5ed573fbcd1737afb01 +Author: maartenkeijzer +Date: Mon Jun 11 12:37:21 2001 +0000 + + Added a check for an empty initializor + +commit 45f61a0e0b82fbd7209a9d185e5044445fd05eb3 +Author: evomarc +Date: Fri May 25 16:27:59 2001 +0000 + + Added a frequency parameter to eoPopStat (dump pop every N gen) + +commit 73157edba6b08e057a67e27f6c94be0ef372a4b6 +Author: evomarc +Date: Mon May 21 06:13:56 2001 +0000 + + Forgot to update ESEA with crossover + +commit b72a85fa1bedd11ab8c575d030b2c059a7061911 +Author: evomarc +Date: Mon May 21 04:16:26 2001 +0000 + + ? + +commit af73dfbd45ad1391db2af061d8d1bf175da99d7f +Author: evomarc +Date: Mon May 21 04:15:36 2001 +0000 + + Added libes in Makefile + +commit 91342e7080ecaea80ca8c00cf5ed483942f3bfd0 +Author: evomarc +Date: Mon May 21 04:14:36 2001 +0000 + + Modifs in es (crossover added in make_op_es). + Added a dummy selector in eoReandomSelect that does work even with invalid EOs + +commit 8b177dd6cd3d4d27631d3bcce2af0522590a4f3d +Author: evomarc +Date: Mon May 21 04:13:10 2001 +0000 + + Added the crossover in make_op_es (parameters were read, but that's all! + +commit d9ddfeeaea3cdb410888f5c13ad1f90606e122c7 +Author: evomarc +Date: Mon May 21 04:10:55 2001 +0000 + + Normalized real_value + +commit 9631c9eb118ebe607ecfaf59f166b6f52876c2e8 +Author: evomarc +Date: Sat May 19 06:15:01 2001 +0000 + + Changed name of eoEsLocalXover to eoEsStandardXover and made it an eoBinOp + Removed obsolete eoEsStdevXOver.h (see eoEsStandardXover.h above) + +commit 8e5e9d14cf56086b2e5cd329c76bed2fa6303344 +Author: evomarc +Date: Fri May 18 17:46:33 2001 +0000 + + Coreected a cut-and-paste bug :-( + +commit 422ddc6f5f2e9858615f35b075af82235220ed48 +Author: jmerelo +Date: Fri May 18 07:33:12 2001 +0000 + + Added the missing file + +commit 0286faed1b400720ad1aad8ec6f6530927964c9a +Author: evomarc +Date: Fri May 18 03:59:22 2001 +0000 + + Removed remaining debugging comment + +commit 17dc4f9d105bf0537736c9ce64c9fd50129d6056 +Author: jmerelo +Date: Thu May 17 10:08:25 2001 +0000 + + Changed MGE to the contrib dir. No need to change the prefix, I guess + +commit e32c52d332a650a692192adf1b3029dfc87eaab5 +Author: jmerelo +Date: Thu May 17 07:29:50 2001 +0000 + + Added missing files and updated old MGE files + +commit 34cb430bd7fa2185cedb4674d496b1b5b698aecd +Author: jmerelo +Date: Fri May 11 10:44:01 2001 +0000 + + Added Royal Road, MGE now work with it, small modifications to eoPopStat + +commit 88f281b6061e9d350be9adddf8bb4a459c802c52 +Author: jmerelo +Date: Thu May 10 12:16:00 2001 +0000 + + Added 'Viral' operators with test. Implements the Mobile Genetic Elements Technique + +commit b7915a4bbed0ab6b13e3d007f9ae97ba6dc7acec +Author: evomarc +Date: Tue May 8 04:44:30 2001 +0000 + + CHanged CXXFLAGS to nothing - so lib files remain of manageable size! + +commit 09388c8ed57acb42f33ece6e69ba32df3d24432b +Author: evomarc +Date: Tue May 8 04:41:51 2001 +0000 + + Bing change in eoRealBounds: it is now deriving from eoPersistent. + More important, the eoRealVectorBounds, vectorized version (a vector + has also become an eoPersistent object and now derives from an eoRealBaseVectorBounds + class. + A useful consequence (and actual motivatino) was to be able to have soem + eoValueParam with all possibilities for input + (see doc for Lesson4 in the tutorial for the syntax). + +commit 42cb1981d59f32a477bf22841adf5dc6e9a812bf +Author: evomarc +Date: Tue May 8 03:49:35 2001 +0000 + + In eoParser::readFrom, added a test to avoid reading non-parser sections + as these generally contain many -xxx that generate a reading error + when xxx is not a keyword. + This allows to use State-savec files directly as parameter files + +commit 0aa6a235ef2f495eeb5c4c2768223789c38aeb1e +Author: evomarc +Date: Mon May 7 07:13:36 2001 +0000 + + Replaced stupid eoRateParam by eoValueParam + Had to transform eoHowMany into an eoPersistent ... + +commit 5508869d00dfdba36bc8ec4fab7a6c255035eb59 +Author: evomarc +Date: Fri May 4 16:51:29 2001 +0000 + + A full working version of ES is now available in tutorial/Lesson4, + that makes full use of libes.a. + The user guide is in Lesson4 of the tutorial - programmer's guide + will come later. + Plus many small changes here and there + +commit eb25bf0ab5dc35fbbe0270765d2b05b4d81531e1 +Author: evomarc +Date: Fri May 4 16:13:37 2001 +0000 + + Removing old trash! + +commit f4d2630516f7bd973590a18ea9ce98c90e059bbd +Author: evomarc +Date: Thu May 3 17:20:27 2001 +0000 + + Corrected a problem in eoEsChromInit (it refused plain eoReal) + some + other minor modications (e.g. a dir in make_checkpoint where ALL file + will go). + +commit 1eee26598b7a43a62272a4cc92d263f5c4cdb5f6 +Author: evomarc +Date: Thu May 3 13:06:34 2001 +0000 + + Adding code to Lesson4 + +commit 7294d6acd561040fb6d165e68669c2a9ab4f5c03 +Author: evomarc +Date: Thu May 3 05:44:29 2001 +0000 + + Lesson4 advancing + +commit 4cce84280e28d0e7e2f11cd6a5a110de612f1667 +Author: evomarc +Date: Thu May 3 05:43:40 2001 +0000 + + Hange of comments and names + +commit b52ea27e2fd42ce93f813f0710ef4d349e8037c8 +Author: evomarc +Date: Wed May 2 11:13:40 2001 +0000 + + Updated main pages of doc and tutorial. Doc now points to tutorial + +commit b03e4f51068854c8359406417e5b4434b7eca88d +Author: evomarc +Date: Wed May 2 11:12:55 2001 +0000 + + Date change + info about Lesson4 in main tutorial page + +commit 6085c82229586033b8b8916c69e81e9666f1c119 +Author: evomarc +Date: Wed May 2 11:09:57 2001 +0000 + + Adding test file for ES - note that it's completely different from old + eoESFull.cp - and hence has an other name, t-eoESAll.cpp. + Old eoESFull.cp is still there (and working) but is not in the test targets + +commit 6af035d2fad40121a4f830584d580860db923aca +Author: evomarc +Date: Wed May 2 10:57:35 2001 +0000 + + Adding files in es for ES Crossovers + +commit 29b25024b78eee43c229e9c41da95151f0e8de63 +Author: evomarc +Date: Wed May 2 10:54:17 2001 +0000 + + Forgotten file ... + +commit bb19ed633bf287990d28eb57723c1266fd599d92 +Author: evomarc +Date: Wed May 2 10:53:14 2001 +0000 + + Forgotten new file + +commit 6493ef88896534ea626bba4a02c6de13a35f3fdc +Author: evomarc +Date: Wed May 2 10:50:01 2001 +0000 + + Added the new eoEsXXXover.h in Malefile.am + +commit 17484feeef9a25163b267871511af36691a84216 +Author: evomarc +Date: Wed May 2 10:47:56 2001 +0000 + + Forgotten ES files + start of tutorial Lesson4 (about make_XXX) + +commit 10064ad967107092b1b8b7e0bae1553ad84c0377 +Author: evomarc +Date: Wed May 2 10:42:32 2001 +0000 + + Adding Evolution Strategies: + src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover + src/es/make_XXX_es.h for user-input + test/t-eoEsAll.cpp to test + + However, an old bug appeared: className was not const in eoGenOp (and derived classes) + so I had to change that throughtout the hierarchy + +commit 4a152dc172b21f894efa7a34c21617c0a86df450 +Author: evomarc +Date: Tue May 1 05:00:29 2001 +0000 + + Removing make_help.cpp + +commit 5bea22e87661d0ceedaaf1ea3e7c6e658f51a0e8 +Author: evomarc +Date: Mon Apr 30 13:24:42 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) + Changed the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain + a copy into each representation dir!). + +commit d90286d890b9d871e8f1edc89d3b452adde2a12d +Author: evomarc +Date: Mon Apr 30 13:01:07 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) + Changed the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain + a copy into each representation dir!). + +commit 1c75344197eacc3066e64ec2ac7264ccecb60586 +Author: evomarc +Date: Mon Apr 30 12:26:31 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed ga.h in src/ga into make_ga.h (was ambiguous with src/ga.h) + Chenged the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + +commit 3f6d869b9058b4538a3cd65ef7817818156a7bf1 +Author: evomarc +Date: Mon Apr 30 09:26:37 2001 +0000 + + Changed EA basic image: + - caption changed from population-parents to parents-genitors + - quality improved (now 177Ko instead of 53 :-( + +commit 4f05bfaaf133fe8e5d966ba7e1b701815e86c150 +Author: evomarc +Date: Sun Apr 29 05:03:05 2001 +0000 + + Re-introduced the old ctors for the mutations (for backward compatibility + with the tutorial :-( + +commit 0c3f372f7bcc5810a9240f69ea7569c0ab5a4a7a +Author: evomarc +Date: Sat Apr 28 06:06:21 2001 +0000 + + Declarations for make_xxx_real.cpp files - for eoReal genotypes + Was previously es.h - now es.h is specifically for ES genotypes + +commit fc01c6862a59ba5d1d0ff8d16480953dd2e08b54 +Author: evomarc +Date: Sat Apr 28 05:53:37 2001 +0000 + + Adding first bricks of ES algorithm - make_XXX_es.cpp + +commit a7042bffee246a271b133b12424008b86c4b7264 +Author: evomarc +Date: Sat Apr 28 05:47:18 2001 +0000 + + Added bounds to the real operators in make_XXX (and hence in t-eoReal) + +commit 7b8999b2059a11bde54de8880fa9e4c25ba9ea45 +Author: evomarc +Date: Fri Apr 27 04:03:16 2001 +0000 + + Removed the -O2 from ga and es dirs - it takes waaaaaaaaaaaaay too much time + at least with g++ 2.95.3 + +commit 95bd02adbfa468f6c6b734d7b00ac4e6e6c2cc53 +Author: evomarc +Date: Thu Apr 26 15:47:37 2001 +0000 + + The declaratio file for all make_* + +commit 2d6bb7ae0c06375285e8f27c6e42ad4a6cfcac79 +Author: evomarc +Date: Thu Apr 26 15:35:30 2001 +0000 + + Removing eoRealBounds from Makefile.am + +commit b7ad190260b4afac594b703446f90ada7dc9f9de +Author: evomarc +Date: Thu Apr 26 15:31:48 2001 +0000 + + An initializer of eoReal that uses bounds + +commit 538d91c601ab16403553e5749769979bb254491e +Author: evomarc +Date: Thu Apr 26 15:27:48 2001 +0000 + + Adding all make_*_real.* - similar to ga stuff for eoReal (not ES yet) + +commit 4968d64b0541ac25fa9462e118cf3afea712e367 +Author: evomarc +Date: Thu Apr 26 15:24:53 2001 +0000 + + Doing libes.a in src/es and adding t-eoReal.cpp in test + I had to move eoRealBounds to utils dir because of global objects + Some domino consequences here and there ... + +commit 511dc266233409ee8d5a0c18cc4bd242cd45a0e8 +Author: evomarc +Date: Tue Apr 24 09:42:01 2001 +0000 + + Changed obscure comment into more detailed one + +commit ce5f9c052867eb3301aaddd08aaae61848fdd99e +Author: evomarc +Date: Tue Apr 24 05:13:10 2001 +0000 + + CLeaning up + +commit f7bdc4a07439e04f0be7d87af4e6bea62bc5976b +Author: evomarc +Date: Tue Apr 24 05:08:08 2001 +0000 + + Forgot the 2 representation dependent make_XXX.h + +commit 204fe8052be0662198d6fec0c82e5456096c6677 +Author: evomarc +Date: Tue Apr 24 05:05:09 2001 +0000 + + Adding eoEvalContinue + +commit 02db7f7e2435603ac420620d5f740168eb9a163d +Author: evomarc +Date: Tue Apr 24 05:03:54 2001 +0000 + + Cleaning up + +commit 9197e3e5c57c1e067971a62e0636eabf5c1c8252 +Author: evomarc +Date: Tue Apr 24 04:56:12 2001 +0000 + + eoEvalFuncCounter is now in a separate file + +commit 56c9464306a795a94e96d43f49c314361f0bffea +Author: evomarc +Date: Tue Apr 24 04:52:04 2001 +0000 + + The new libga + Apart from big changes in the src/ga dir, and the addition of the src/do dir + it also generated a few changes here and there, e.g. some include file still + missing. Also removed some warning from some test files. + +commit e71aea497fa62098651452db706e8824971e295a +Author: evomarc +Date: Fri Apr 13 08:57:40 2001 +0000 + + Few cosmetic modifs: + put the #define of some boolean in eoData.h + added some include that were missing (unnoticed because of include) + some checks in eoXXXTournamentSelect + +commit 51c15ed0b8f16d6cdbc9bf821fde77e77abe2904 +Author: evomarc +Date: Thu Apr 12 16:46:55 2001 +0000 + + Added eoCloneOps.h that contains ... cloning instances of eoXXXOp (all in + 1 file, sorry JJ). + Modified eo - also added a few comments there + +commit 369ef1708177ca18c49df8cc4dae4b555a91b054 +Author: evomarc +Date: Thu Apr 12 05:35:05 2001 +0000 + + Modified the default behavior of eoCountedStateSaver to save the final population. + So if you don't want any population save, don't use any eoCountedStateSaver. + +commit e3834441fdd1e02a7f42f6a80e6fc0b654825d87 +Author: evomarc +Date: Thu Apr 12 05:29:34 2001 +0000 + + Added a new boolean argument to the ctor of eoBitMutation: + you can now specify a rate-per-bit that will be normalized by the chromSize + +commit 78f6c6ef3c83da52cc88801fd4fb2ce1656bbb31 +Author: evomarc +Date: Thu Apr 12 05:28:23 2001 +0000 + + Added a few "virtual" that were missing + +commit 64990a1ac4069d6e5b32ffba960fe54685a61853 +Author: evomarc +Date: Wed Apr 11 12:01:51 2001 +0000 + + Changed all variables named howmany into combien (French for how many) + because of a silly problem on Solaris (howmany seems to be some macro???) + +commit 28c6b9a2855dd492f848a0b509fa6db24db5ee81 +Author: evomarc +Date: Wed Apr 11 04:44:39 2001 +0000 + + Modified printOn so that parameters that are not set explicitely by the user + are commented out - but still appear. Uses the (now public and pure virtual + in the base class eoParameterLoader) method isItThere. + +commit eafaa2d65e1200a5be83a3d6edc2dc101a179b87 +Author: evomarc +Date: Tue Apr 10 15:08:09 2001 +0000 + + Added the pure virtual isItThere method in base class eoParameterLoader + Also made the corresponding isItThere method in eoParser public. + This allows one to test if the user did actually input a given parameter + and thus not to write it in the output if not - as we want the output + of printOn to be "as identical as possible" to the actual user input + +commit 27691b21fdc9d9d40f2c5522c3559d3efccb79d8 +Author: evomarc +Date: Mon Apr 9 16:03:18 2001 +0000 + + eoCtrlCcontinue had a few remaining errors :-( + +commit 3d757e3243059e9a197c453f72d20bc9c8ada5d7 +Author: evomarc +Date: Mon Apr 9 15:28:24 2001 +0000 + + Modified the eoCtrlCContinue - had to create the eoCtrlCContinue.cpp + to make t-eoGA work (you should NOT have separate functions in .h files!) + I also included everything related to Ctrl C handling in #ifndef _MSC_VER + until someone tells me how to do it in MSVC + +commit bfca8ca4336a3d625c9a0e91e23a4905f6450c7d +Author: evomarc +Date: Mon Apr 9 14:20:48 2001 +0000 + + Sorry, last check in was a mistake + +commit e3745d0674f41a3884fde791c93e2d64184a4f2a +Author: evomarc +Date: Mon Apr 9 08:52:41 2001 +0000 + + Commented some ====== that resulted in error when running autogen.sh + +commit f0813c55cac3dfb1c33f100cf26a02011cc43273 +Author: evomarc +Date: Thu Apr 5 16:47:54 2001 +0000 + + Added the continue.tmpl template - and modified the html pages accordingly + (though eoCheckPoint.html is still a long way to complete). + Added some comments in all template files - and replaced + the protected by private (don't remember why these were protected!!!). + +commit ddc6650ce55437342495abe4640936ffaff4da2e +Author: evomarc +Date: Wed Apr 4 03:47:33 2001 +0000 + + Added the signal handling - see eoCtrlCContinue.h + I've disabled it in case of MSC as I don't know if this works there ... + + Also added a couple of "virtual" in the ga dir + +commit 4cb797544acca7c91057ca2a9fe46cef2a15af3a +Author: evomarc +Date: Tue Apr 3 17:14:53 2001 +0000 + + eoOperators now is in sync with the last modif of eoPopulator by Maarten! + +commit 7ec7a856e5b8ffc9b97189970da27c160dc97aa4 +Author: evomarc +Date: Tue Apr 3 17:14:08 2001 +0000 + + Modified the tempaltes to take into account + - the last modifications of the eopopulator class + - the include files (were totally missing in the old templates) + - JJ's demand for one class - one file :-) + +commit d634d95838d0cd0777e4c73732eba32aa092bd19 +Author: jmerelo +Date: Tue Apr 3 10:08:08 2001 +0000 + + In eoVector, changed printOn and readFrom to virtual + +commit 195ad728388b3e2f88f415f377325c3f2f31df1b +Author: maartenkeijzer +Date: Wed Mar 28 09:00:54 2001 +0000 + + eoParam, added specialization for eoValueParam::getValue + FDCStat and FileSnapshot: better error messageing + Scalar fitness: is now a vector of doubles + exercise3.1 added gnuplot again + + Don't know about eoCombinedContinue + +commit 434010d221a21f24d1b19573f8d78719383ccb09 +Author: evomarc +Date: Tue Mar 27 16:27:15 2001 +0000 + + Modified the names in eoPopStat! + Hoever, the way it's done now, the string gets TRUNCATED - and I dont' know why + +commit 1726a068612065ff8b742777bfc7835e35646a1d +Author: evomarc +Date: Tue Mar 27 16:02:00 2001 +0000 + + Adding Maarten's "snippet" to dump the whole pop to the screen: eoPopStat.h + Modified utils/checkpointing accordingly. + Tested in tutorial/Lesson3/exercise3.1 + BTW, the eoFileSnapShot does not work any more - I've commented it out + and will look at that later... + +commit ebca71e228614aa2b9e2334ffdba91fd47eca041 +Author: maartenkeijzer +Date: Mon Mar 26 10:09:40 2001 +0000 + + NDSorting: changed exact ranking values to make check for front easier + eoRNG: changed nothing (did some debugging) + +commit a1508b75a28e3d7c0c6175d6168665b853c6e929 +Author: maartenkeijzer +Date: Fri Mar 23 12:24:39 2001 +0000 + + added test for printing population + +commit b5bbc729579007734aaf38f82b3f514e1e3857b2 +Author: maartenkeijzer +Date: Fri Mar 23 08:54:31 2001 +0000 + + let doxygen look into this dir + +commit 65b1e9d2b6e0cf1078b4c399046c4d77d813b7a0 +Author: maartenkeijzer +Date: Fri Mar 23 08:53:48 2001 +0000 + + added + +commit d139d2df644496ce8d94de3bdb282f40bfcd68f1 +Author: maartenkeijzer +Date: Thu Mar 22 16:23:56 2001 +0000 + + updated project number + +commit efd02fa4b603e6baa0643affee906c119ddeb71c +Author: maartenkeijzer +Date: Thu Mar 22 11:22:31 2001 +0000 + + oops + +commit 94f0558d43ca9426cee7f443c64a6d0d8d1c7058 +Author: maartenkeijzer +Date: Thu Mar 22 10:51:16 2001 +0000 + + Changed the single objective shortcut calculation + +commit 0f243e4d92d856d71f80df8d7a522460223bc91f +Author: maartenkeijzer +Date: Thu Mar 22 09:00:30 2001 +0000 + + temporarily added fitness_traits to keep people up to date with this proposal + +commit 8ff63ff776a2ce01fbcb340322b456db715056e3 +Author: jmerelo +Date: Wed Mar 21 13:35:10 2001 +0000 + + Added a new xover to varlenxover + +commit d8fe00183a02c15b76995bad88fea820c367e3dd +Author: jmerelo +Date: Wed Mar 21 13:09:47 2001 +0000 + + Added a new atommutator to Variable Length, and corrected some headers which had problems + +commit 06dd2dc314f462b97224576cbcb7f09b90b632a9 +Author: jmerelo +Date: Wed Mar 21 12:10:13 2001 +0000 + + Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes + +commit 6f6ce7d81a9546a7852cef57cfc281c7d10f7438 +Author: maartenkeijzer +Date: Wed Mar 21 11:09:29 2001 +0000 + + test paretofitness class + +commit 3d82e6cddfd320b0c713ff4e88b2bd0f135b77bc +Author: maartenkeijzer +Date: Wed Mar 21 11:08:27 2001 +0000 + + Few changes in setting up the algorithms. It now gives an example of how to + write factory functions + +commit 665e20b0f8eaabb95e7fa9c64013829dfea73ce4 +Author: maartenkeijzer +Date: Wed Mar 21 10:55:22 2001 +0000 + + Changed a few things in the eoPerf2Worth classes, EO.h and eoSelectOne.h are functionally unchanged + +commit 9bbac485f99064309cb31c21f963d12a47d966db +Author: maartenkeijzer +Date: Tue Mar 20 14:34:07 2001 +0000 + + Updated eoStat.h to also "do the right thing" when confronted with pareto style fitness + +commit 11cdd38f245c13ae6f2bc8a76b4d38f4fcaa2a25 +Author: maartenkeijzer +Date: Fri Mar 16 14:19:11 2001 +0000 + + added help + +commit 3c45141ba7d7d0042a4e8375e3637b41b8eaf7dc +Author: maartenkeijzer +Date: Fri Mar 16 14:09:55 2001 +0000 + + Now look how perty t-eoPareto has become (though it doesn't do a proper mo modelling yet) + +commit 548b2ae5284abf14905b15bf831e5310f80f3781 +Author: maartenkeijzer +Date: Fri Mar 16 13:11:32 2001 +0000 + + Some bugfixing in MO optimization and added empty check: target in tutorial + +commit 2dd807ecbed7a05613594318fb6e316101518777 +Author: maartenkeijzer +Date: Fri Mar 16 12:09:36 2001 +0000 + + oops, ngens is now the nice 10 + +commit d09c216b61b1ca8f980a10342dabc3680077e139 +Author: maartenkeijzer +Date: Fri Mar 16 12:08:26 2001 +0000 + + Ok, made an eoParetoFitness class, which meant that I could roll back a few changes in EO.h (phew). + Also changed eoSelectFromWorth etc. + +commit cf8f6b5c1634d044ff026fc85f4bf773242c5f3f +Author: maartenkeijzer +Date: Fri Mar 16 11:48:32 2001 +0000 + + added + +commit d0fd97515e407df053cc5369790f9967843243dc +Author: maartenkeijzer +Date: Thu Mar 15 14:11:24 2001 +0000 + + added dist and distdir targets + +commit 67c357587381e947ccbf21824a897d4a04af7e5f +Author: maartenkeijzer +Date: Wed Mar 14 12:47:14 2001 +0000 + + Using nd-sorting now + +commit 9aa9e38090bf5ab4c34c0711a377866135c5441b +Author: maartenkeijzer +Date: Wed Mar 14 12:46:37 2001 +0000 + + First go, does not do niching yet + +commit 843d442475ad3b15e29a08f9ad012e47ae9eb090 +Author: maartenkeijzer +Date: Wed Mar 14 11:58:47 2001 +0000 + + OOPS, that was a major bug, letting non-dominating individuals dominate one another. + +commit fe89662e3c8d62794501d8aa703018c394413510 +Author: maartenkeijzer +Date: Wed Mar 14 10:14:27 2001 +0000 + + t-eoPareto now plots the evolving population and t-eoRandom check is slightly more strict + +commit 3798b665d47ee37cdb8a3a810f8c852ef653e4bb +Author: maartenkeijzer +Date: Wed Mar 14 10:13:27 2001 +0000 + + Added support for printing vector as a fitness + +commit 68904d7650273cf4e39502bf597e8f834ee25f4d +Author: maartenkeijzer +Date: Wed Mar 14 10:12:37 2001 +0000 + + Added Multi-objective fitness monitoring added support for vector > in eoParam + and made eoFileSnapshot type-safe + +commit 3449314a28b0c6d6940bc2910eee752f81da9424 +Author: maartenkeijzer +Date: Tue Mar 13 08:25:05 2001 +0000 + + Swapped linking order of utility libs + +commit b2a0349595136c8dc47408fc03b30a025b706c6a +Author: evomarc +Date: Tue Mar 13 05:25:51 2001 +0000 + + Just modified an wrong comment (after a too quick cut-and-paste) + +commit b917e54486aa70bcd29597687944d392a964152e +Author: maartenkeijzer +Date: Mon Mar 12 16:07:55 2001 +0000 + + Production of binop back to 1 + +commit 6a6b8551b06f1585e5614be63b6f1a32f535f464 +Author: maartenkeijzer +Date: Mon Mar 12 16:04:18 2001 +0000 + + Added first batch of pareto based stuff + +commit 3c19641c70772e1e1ddd07b228eae8c0297cacf2 +Author: maartenkeijzer +Date: Mon Mar 12 16:03:08 2001 +0000 + + Added pareto based stuff + +commit 4222e648297da77fb7b213c6f8a41d367aadcb83 +Author: maartenkeijzer +Date: Mon Mar 12 16:00:58 2001 +0000 + + EO: added overloaded printing of fitness (for vectors and pairs) + + Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth + +commit 492899bfb2d278932e5ad5209aeb9f45a1bc9a3c +Author: maartenkeijzer +Date: Mon Mar 12 14:27:31 2001 +0000 + + invalidating supported now + +commit ead2ac2c6268afae446bfb17d7432498f5492875 +Author: maartenkeijzer +Date: Sat Mar 10 14:02:23 2001 +0000 + + Changed the populator to be a) more efficient and b) more useable + + It is no longer derived from eoPop, it now gets a destination population. + This saves a lot of copying. The semantics has changed a little as well. It is + now an _infinite_ iterator. operator++ will *not* dispense new individuals, but + will merely stay at the end. To get a new indy, use operator*() as before. + + eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring + eoGeneralBreeder is changed to reflect the changes in eoPopulator + eoSequentialSelect now uses setup() rather than init() + +commit a27aa7112a316ef187e2249e9302534da6031a67 +Author: maartenkeijzer +Date: Fri Mar 9 14:14:53 2001 +0000 + + Test for a ssga added. + +commit 4388faec2e7a8fa0489876c674c249a46b753870 +Author: maartenkeijzer +Date: Fri Mar 9 14:13:28 2001 +0000 + + Various bugs found and resolved. + +commit 4f1802c4e992f501e444af8b6c60096f4dd13cae +Author: maartenkeijzer +Date: Thu Mar 8 13:38:41 2001 +0000 + + radically simplified the Makefile.am, but this only works for headers (no idea what the problem is with sources) + +commit 00c7a10cb0cc7330f4d089356d34555e4490396c +Author: maartenkeijzer +Date: Tue Feb 27 11:45:31 2001 +0000 + + put using eo::rng in top of file to help out gcc 2.91 + +commit 7eecd318f9231075c34cafa15f5a35fe9ca70f1a +Author: maartenkeijzer +Date: Tue Feb 27 11:44:28 2001 +0000 + + swapped order of libeo and libeoutils, gcc 2.91 did not like it + +commit ef75dbc2ee8e5890368b91abe53ef6a336eab0c5 +Author: maartenkeijzer +Date: Tue Feb 27 11:43:06 2001 +0000 + + Made dtor virtual + +commit 59a42603af32c73a2c08ace555b0e4cd5a63b4fb +Author: evomarc +Date: Tue Feb 27 05:24:24 2001 +0000 + + Still modifying eoInit ... + +commit 72b6692f9baf39e3a77cce2d6674dce13643eb8e +Author: evomarc +Date: Tue Feb 27 05:09:10 2001 +0000 + + Modified all init sequences in Lesson2 and Lesson3 - and all corresponding + files in html dir - after the return of eoRndGenerators and subsequent + modifications of eoInit + +commit a79075f67308997ddcf1a3d1000743d311cddc4f +Author: maartenkeijzer +Date: Mon Feb 19 12:23:13 2001 +0000 + + Modified eoInit so that it would use the eoRndGenerator base class. + To be able to use the primitive std::generate function, added a + set of wrappers in eoSTLFunctor.h that have the copy semantics most + STL functions expect (namely pass-by-value rather then pass-by-reference). + + Updated test/Makefile.am to also test t-eoRandom + +commit e28211188aa04766d1e4739fb305b3039f89b22c +Author: evomarc +Date: Sun Feb 18 06:41:30 2001 +0000 + + Date and version number + +commit f36f6d12658ad0429385f260a5729d757e4c445c +Author: evomarc +Date: Sun Feb 18 04:34:57 2001 +0000 + + Added the eo::rng (instead of rng) as default parameter to all calls. + Also t-eoRandom was abruptly aborting-> a min was greater than a max, and + exceptions were not being caught. + +commit 025eb736ee523bb51c27fb2c923c2aa24f7b0cf9 +Author: maartenkeijzer +Date: Sat Feb 17 10:51:31 2001 +0000 + + eoVector is back (eoFixedLength and eoVariableLength are gone) + + Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: + + eoNormalGenerator + eoUniformGenerator + eoBooleanGenerator + eoNegExpGenerator + + Note the suffix that are added to aid in determining what these classes do + +commit e0ace0794fa94b08662a5d3452ede74f6be170e3 +Author: evomarc +Date: Sat Feb 17 08:22:53 2001 +0000 + + Now takes into account the last (and last!) modification of the operator interace: + no more invalidate, but a bool returned for simple operators, and a better description + of the eoPopulator/eoOpContainer links. + +commit a403525af015525a30a95491f61d5e96b36adb95 +Author: evomarc +Date: Sat Feb 17 06:47:31 2001 +0000 + + Forgot the selector in the ctor + +commit 1662fd2a8baac63d8e5b0bcb90f8a77f35cfffdd +Author: evomarc +Date: Sat Feb 17 06:42:20 2001 +0000 + + Modified crossover and mutation to account for the new interface (bool ...) + Added the genop.tmpl, template for general op, 3 cases, growing pop, + shrinking pop through erase, thrinking pop through extra selector + +commit 83e883a1586fea464c93184d7c4752d5e4bdbaf0 +Author: evomarc +Date: Fri Feb 16 18:00:18 2001 +0000 + + Added oine star at start of comment to have Doxygen process it !!! + +commit 70d98042777680a022502411eda7d78af3de3565 +Author: maartenkeijzer +Date: Fri Feb 16 09:39:06 2001 +0000 + + works for me + +commit 7e849e2082805e6e5ba743303ec627f1dabd5804 +Author: evomarc +Date: Fri Feb 16 08:21:25 2001 +0000 + + The perf2worth major check in + 2 new important classes: eoPerf2Worth and eoSelectFromWorth + Instances of eoPerf2Worth are eoRanking and eoLinearFitScaling. + Coming soon (piece of cake now) are the niching strategies (sharing, clearing) + +commit da8b467b12c34a729664b19e45f716cbfbb2b932 +Author: evomarc +Date: Fri Feb 16 05:06:17 2001 +0000 + + Only names modifications, to comply to EO strict rules :-) + +commit 0540496021ec723d0ed639b0dd35f04811af5844 +Author: maartenkeijzer +Date: Thu Feb 15 08:31:38 2001 +0000 + + reverted the max-to-produce initializer + +commit 562b0b63e355a8bdd8a9b06f35a1679c89cde099 +Author: evomarc +Date: Thu Feb 15 05:36:28 2001 +0000 + + Changed the default values for popsize, vecsize and maxgen so + the user has a chance to see something even on Pentium 10GHz :-) + +commit 9dbb516d8bfba182ebf20e865d66c486e7816b54 +Author: evomarc +Date: Thu Feb 15 05:35:31 2001 +0000 + + Modified the comments so that all callses are documented by Doxygen + (a comment starting with // before the class definition is not taken into account) + Also updated the initial overall comment - + and waouw, doxygen generates links there, too! Cool. + +commit bf0e84fc5608717b8351f58773f3f9e83a23209a +Author: evomarc +Date: Thu Feb 15 04:47:18 2001 +0000 + + A few minor corrections (and some comments) after Maarten big commit + +commit 2ff2b66fddc425f390d50a862d80c0694896db6b +Author: maartenkeijzer +Date: Wed Feb 14 18:05:36 2001 +0000 + + updated the dsp, dsw files for the library + +commit 98a9f24879043926bc1eda68398e03a852cadf4f +Author: maartenkeijzer +Date: Wed Feb 14 18:01:30 2001 +0000 + + no need to keep these test functions here, will start new project in /test + +commit 8ce0e6bb2a83e200e290f9d8ae34e45afede0a53 +Author: maartenkeijzer +Date: Wed Feb 14 14:09:16 2001 +0000 + + Changed the return value to return what it got in + +commit 3a9b5a0e7e0299b2e0ad6a7e3947122858fd1ebd +Author: maartenkeijzer +Date: Wed Feb 14 10:35:26 2001 +0000 + + Well, what do you know, major commit. + + Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, + without invalidating fitness. Added a set of invalidators to take over + that job (see for instance eoSGA and eoSGATransform how this can transparantly used) + + Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) + + Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor + exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) + and of course changed all the operators to reflect the change (and found a few that didn't + invalidate the fitness, thus really pointing out the advantage of the current approach) + +commit 17d55ae92bb25f9fc554dd8459fc04f52947ce02 +Author: jmerelo +Date: Tue Feb 13 22:39:56 2001 +0000 + + Just playing with the CVS variables + +commit b7d071d92d731ee65e5254b6d328f6d28dd6da28 +Author: jmerelo +Date: Tue Feb 13 22:38:23 2001 +0000 + + Just playing with the CVS variables + +commit 0dd3e27e4e74a468edda4de5a17bd4fba1f77ed3 +Author: jmerelo +Date: Tue Feb 13 22:35:07 2001 +0000 + + Moved out of the 'obsolete' directory a couple of honest classes, which didn't harm anybody; activated also in Makefile.am the program that tested them + +commit 07bc61e6940f45755de8671a5aa2a061db3bf4b8 +Author: maartenkeijzer +Date: Tue Feb 13 14:43:54 2001 +0000 + + Added a bit more documentation, more to follow (I hope) + +commit 262869d0ae416a7fe67b072057cc3310d56b4346 +Author: maartenkeijzer +Date: Tue Feb 13 12:38:19 2001 +0000 + + fixed a bug: the parser now correctly parses parameters of the form + + -Pvalue + + This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply + ashamed to have created such an off-by-one error. + + Marc assumed this was wanted behaviour (so that it should read: -P=value) + I must admit that this is a logical conclusion, though it was merely a side-effect + of the error. To not force Marc to rewrite the tutorial and his way of working with + EO, I decided to make a feature out of the bug, so that now the parser will parse: + + -Pvalue + -P=value + + and of course the true and blue: + + -Parameter=value + + I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) + +commit 680229507fb7dbe798cc9a6483bac1bdf82e2496 +Author: maartenkeijzer +Date: Tue Feb 13 10:35:47 2001 +0000 + + Just an update + +commit dea8a51f7ed34f198ce7f30dee4b438c62dec0e0 +Author: maartenkeijzer +Date: Mon Feb 12 13:58:51 2001 +0000 + + Ok, updated the Makefile.am again to use the + + make check + + Command I picked up in the automake documentation (RTFM, you know) + + Tagged a lot of header functions in the GnuPlot files with 'inline', + so they can be used from more than one sourcefile. + + Ok, now the interesting news. Started a new library libga (not to be confused + with Matthew's GaLib). Here I suggest we put a fairly complete and configurable + genetic algorithm. Just to see how far we can stretch ourselves and also to have + a GA-componenent that can be used in other applications without having to rebuild + the entire thing. test/t-eoGA.cpp tests this library + +commit 9f5069b23af50c585d93e9a885267af281bad863 +Author: maartenkeijzer +Date: Sun Feb 11 16:35:21 2001 +0000 + + run_tests is expanded to run everything (but only once yet, will have + to address this later). + t-eoSymreg is build to run for just a few generations, otherwise testing + it would be an excercise in patience. + +commit 4aed1813110464356b318a58bf048f0afb637325 +Author: maartenkeijzer +Date: Sun Feb 11 16:25:03 2001 +0000 + + Removed small bug in reading outside a buffer in eoParser::readFrom + + This caused the parser to crash when a simple flag of the form program -f + was given. + +commit 27432e53777f1f812ca9443e3b8705fa1b68d769 +Author: maartenkeijzer +Date: Sun Feb 11 16:01:47 2001 +0000 + + run_tests, add your own tests here + +commit 05ed67ccd154acf5edd1c6d15544e807640e5e18 +Author: maartenkeijzer +Date: Sun Feb 11 15:58:55 2001 +0000 + + Test now is not build automatically, make test should be given explicitely, then a new script run_tests will be used to check if everything still works + +commit ed6ae447e8bd17851563dcf70b8fe563b01de60f +Author: maartenkeijzer +Date: Sun Feb 11 15:57:01 2001 +0000 + + Commented out the check for libtool, as we don't use it currently + +commit 2796319a13d52298b9bcc224857e48e302984198 +Author: evomarc +Date: Sat Feb 10 05:36:50 2001 +0000 + + Added matermind in SUBDIRS + +commit 3c2df139bd2a31e02399b99e37961ef1bfff68f8 +Author: jmerelo +Date: Fri Feb 9 16:52:06 2001 +0000 + + Minor bugs for Win quashed; fixed Win project files + +commit d58511132c25d2b32b8f510526dd049212255b87 +Author: maartenkeijzer +Date: Fri Feb 9 11:52:55 2001 +0000 + + Removed the -O2 flag from the makefile in the test directory. + Builds should go faster now. + +commit b893445d31658e5d1b7891b44ba6ab174561b9f4 +Author: evomarc +Date: Fri Feb 9 08:32:47 2001 +0000 + + Added a comment before eoPopulator class so it is documented! + +commit 5bf1d83f6a823740185748327831704b3787b540 +Author: evomarc +Date: Fri Feb 9 08:21:35 2001 +0000 + + Changed the first paragraph, added warning that it should be used on-line only + +commit 0c1036617e0dee870af3ba8c047ac14d59c9c400 +Author: evomarc +Date: Fri Feb 9 05:52:44 2001 +0000 + + Big change in eoGeneralOp interface: left out! + +commit a55603631594efd0ee7a1abbdef2a94df4abdc94 +Author: evomarc +Date: Fri Feb 9 05:46:12 2001 +0000 + + Change in Makefile - but again it should be replaced with clean Makefile.am + +commit 018db6689a1604502555033ba92b0048f834932f +Author: evomarc +Date: Fri Feb 9 05:43:06 2001 +0000 + + The big GeneraoOp interface change - in test dir + +commit 97486fba28bf355084aa7afe8fa096e06e821e18 +Author: evomarc +Date: Fri Feb 9 05:34:04 2001 +0000 + + Modified the Makefile of Lesson? to allow make all to also make the exercises + It need to be modified anyway into Makefile.am stuff + +commit 890218e270a4d31b0a59864cabed1e5a452e2c7c +Author: evomarc +Date: Fri Feb 9 05:28:33 2001 +0000 + + Removed eoEvolutionStrategy because it was based on eoGeneralOp old interface + +commit d347fa9da27e02f51b8696d78e501e295c9e6a7d +Author: evomarc +Date: Fri Feb 9 05:25:25 2001 +0000 + + Because it has not extension, I had forgotten to update the eo file itself! + Now reflects the change of eoGenOp interface and the changes of names in ga + +commit 09b669ed466517e8480feec0b82062a4046ef878 +Author: evomarc +Date: Fri Feb 9 05:21:04 2001 +0000 + + Added the GnuPlotSnapshotMonitor, the eoScalarFitnessStat and eoFDCStat in checkpointing + +commit 3b2125e060bf036c720bdfd1141da8383f8cbaac +Author: evomarc +Date: Fri Feb 9 05:10:25 2001 +0000 + + Left-out from the big change of general op interface! + +commit 415b4196711991ddd3e73e331c8f5d0eda73191c +Author: evomarc +Date: Fri Feb 9 05:09:26 2001 +0000 + + The BIG change of general operator interface + I also changed + - the eoQuadratic into eoQuad (as dicussed with Maarten) + - the eoBin into eoBit, with more appropriate names for the "binary" + operators (that can be unary!) as no one protested when I posted on + eodev list + +commit 1b681e4e0dc467260f4f8f56c537e6756210aca5 +Author: evomarc +Date: Wed Feb 7 05:15:18 2001 +0000 + + Added the missing include of eoScalarFitness - mandatory due to + explicit specialization for eoParamValue > + +commit d3525298feb143dba22c0cdd0a70f90d46ed2aa2 +Author: evomarc +Date: Wed Feb 7 05:13:33 2001 +0000 + + Added the handling of generic operators in Combined Ops + +commit b89d06386d5305db955b91a63f830e8fd4d48b08 +Author: evomarc +Date: Wed Feb 7 05:11:37 2001 +0000 + + Added the shuffle(vector) method + +commit 1c93adc43ac421074a9b28e8eb66db38b786afc2 +Author: evomarc +Date: Wed Feb 7 05:04:24 2001 +0000 + + Added selection methods + eoBestSelect always return the best individual + eoSequentialSelect a selectOne version of eoDetSelect (uses an index to + return next offspring from sorted pop) + +commit f9fed9acc1f8eec2214cb07e6344e13b10f7eeb3 +Author: evomarc +Date: Thu Feb 1 05:27:36 2001 +0000 + + Forgotten a debug print + +commit 1ace1cf8f901c64c86e57c5023dd028b2bfdfdb1 +Author: evomarc +Date: Thu Feb 1 05:17:16 2001 +0000 + + I had forgotten to add pipecom.h + Moreover, I got fed up with error due to const/non const, so I modified + PipeComSend to take a const argument. THe consequence is that it will not run + under plain C any more. + +commit 56abe665823ab92b01bc497ec376e4a3343ee5ef +Author: evomarc +Date: Wed Jan 31 18:38:39 2001 +0000 + + Added the monitoring facilities for snapshots (i.e. generating and plotting a new file + every generation) which is different from the continuous monitoring (same file/plot is + angemented every generation). + This lead to a number of modifications in many files in utils dir + + But now we can watch on-line + - fitness spreadout + - FDC plots + - multi-objective Pareto fronts (though the multi-objective sruff isn't there yet!) + +commit 097d34be395c450cac88620df7eec3cb53f2aba3 +Author: evomarc +Date: Tue Jan 30 04:53:05 2001 +0000 + + Comments added to remove undocumented classes from Doxygen documentation + +commit 2b46277eedef09dc032410f94751cf90e2b3843f +Author: evomarc +Date: Mon Jan 29 10:25:44 2001 +0000 + + Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. + The former simply set values to the boundary values in case they are out + The latter allows to short-cut all bound-checks when no need + + SOme day I will put this in utils, and have a eoRealBounds.cpp in the + pre-compiled library + +commit 0f985c627e5e8718e3f184baa0a2be5b9351c796 +Author: evomarc +Date: Sun Jan 28 07:31:34 2001 +0000 + + Modified to use eoRealBounds rather than eoEsObjectiveBounds + +commit 75dad8f8992df7cadb7b69f1bea8c2a9df205ba4 +Author: evomarc +Date: Sun Jan 28 07:27:12 2001 +0000 + + Error in src/Makefile.am + +commit 03bc482da05702af77f17dc14502fe56425cb27e +Author: evomarc +Date: Sun Jan 28 07:02:27 2001 +0000 + + Actually removed eoEsObjectiveBounds.h and evolution_strategies + +commit 8d35fad13654a080d2ce71afc8fb3ee7128274cb +Author: evomarc +Date: Sun Jan 28 07:00:41 2001 +0000 + + Added the includes ga.h and es.h + Removed the old eoEsObjectiveBounds and evolutionar_strategies from es dir + +commit 508a5b9215224542af569c95ad638ab16985cd5c +Author: evomarc +Date: Sat Jan 27 08:38:31 2001 +0000 + + Added some comments so eoRealVectorBounds is documented + +commit 9d9958d3bc673f9e0dc850dacd3fce9ec084a1cb +Author: evomarc +Date: Sat Jan 27 08:20:39 2001 +0000 + + Following the change in includes (added ga.h and es.h everywhere pfuhh) + +commit c015b82506440fe9a8b431076625ee9f78830aab +Author: evomarc +Date: Sat Jan 27 07:46:07 2001 +0000 + + Added eoGenericRealOp.h that are the exact copy of the operators of eoReaOp.h, + but in generic format. + They are used at the omoment only in eoEsStdevXOver.h that calls a crossover + on the object variables, then a crossover on teh stdev vectors! + A piece of cake :-) + +commit 72e959054419a439f0643f4be6a7dd7926e4afec +Author: evomarc +Date: Sat Jan 27 07:43:58 2001 +0000 + + I have separated the include files into + eo everything that is general to any representation + es.h everything about real representation (in es dir) + ga.h everything related to bitstring representation (in ga dir) + + To be continued by gp.h, and ... + + This has lead to some slight modifications in test file eobin and all tutorial + examples files... + + I've also added in utils eoDistance, generic functor to compute distances, + including also the generic Euclidian distance + +commit 41ff11bd7fc8368d024fcdfb76f2f1493372a3a7 +Author: evomarc +Date: Sat Jan 27 07:41:46 2001 +0000 + + I have separated the include files into + eo everything that is general to any representation + es.h everything about real representation (in es dir) + ga.h everything related to bitstring representation (in ga dir) + + To be continued by gp.h, and ... + + This has lead to some slight modifications in test file eobin and all tutorial + examples files... + +commit 8aad8f547cf832f048793c13b28cf3ae383046ca +Author: evomarc +Date: Sat Jan 27 07:33:55 2001 +0000 + + A few mistakes corrected - and some comments on the setup method + +commit c917207b5d0f03ab669c2c097f45b9fb5309505a +Author: evomarc +Date: Fri Jan 26 18:26:30 2001 +0000 + + Added the bounds to all eoRealOp operators (and to the eoNormalMutation). + The eoESObjectiveBounds should soon dissapear!! + +commit 70caa91b2259a6c73425a6689ad61bd430d9b50d +Author: evomarc +Date: Fri Jan 26 17:12:13 2001 +0000 + + Typos in comments + +commit 576249509b15c32413dd80989054bebb860dad6e +Author: evomarc +Date: Fri Jan 26 17:09:33 2001 +0000 + + Some includes were missing in eoPop and eoOp that I had not noticed before + trying to compile test/t-eoSymreg.cpp + +commit ce031f10a3a371f3687009ebfc3dc779d0e66900 +Author: evomarc +Date: Fri Jan 26 04:06:09 2001 +0000 + + Added eoRandomReduce + +commit da6685830866478789dd1252cb1b4b86fe0058bd +Author: evomarc +Date: Thu Jan 25 16:14:25 2001 +0000 + + Full t-eoSelect file, that allows to test all selectors + feature: generation of files suitable for gnuplot to see how individual spread out + +commit 42ac826f3c21037dbfbcf92a035c49207ac6dfe6 +Author: evomarc +Date: Thu Jan 25 16:13:15 2001 +0000 + + Added ranking selection (eoRankingSelect) and (linear) fitness scaling in + proportional selection (a completely different file, eoFitnessScalingSelect.h) + +commit 585c5435699b951f35df6206941725077ae6c3b7 +Author: evomarc +Date: Wed Jan 17 05:29:54 2001 +0000 + + Modified the link to EO pages so that users can download the development + version - as no example works with the current snapshot + +commit c62521648b86d69c367784ac27fc8c9ce956365c +Author: evomarc +Date: Tue Jan 16 09:49:46 2001 +0000 + + Added the shuffle method + +commit deace62e55da1111374a49cae431f5f9f834c489 +Author: evomarc +Date: Tue Jan 16 07:20:48 2001 +0000 + + Added the normal mutation - and the 1/5 mutation in FirstRealEA in Lesson2 + +commit 51f3b56fd2e7b50b9de0ac85ec89bf3efaac02d3 +Author: evomarc +Date: Tue Jan 16 07:20:02 2001 +0000 + + Added the normal and 1/5 mutations (file es/eoNormalMutation.h) + +commit 20b70de2a16de473882594ddf8095f35df153a7e +Author: evomarc +Date: Tue Jan 16 07:18:45 2001 +0000 + + Added the normal mutation - and the 1/5 mutation + +commit a8bf667774b4224e45699418a6ad35b120e8d14e +Author: evomarc +Date: Tue Jan 16 05:52:01 2001 +0000 + + Added the eoRandomReduce class - hence I also added the shuffle method + in eoPop (I had been postponing that for a long time!) which in turn required + another class of random generator (whose operator() takes an unsigned as argument) + +commit f988b42fed4c7bf818bc96f045ba95ba7e4691af +Author: evomarc +Date: Fri Jan 12 21:31:42 2001 +0000 + + Corrected some error in variable name after last changes in method append + +commit e532234d1ce73cef0b477b437d3036906e14a16f +Author: evomarc +Date: Thu Jan 11 11:02:37 2001 +0000 + + New versions of bounds for real variables. + Should supersede eoEsObjectiveBounds, whose name was misleading anyway + as this can be used in any REal-ceded GA for isntance + +commit 4b2bb7f5641799966bb1ba92491ff2d83264f4f1 +Author: evomarc +Date: Thu Jan 11 10:48:31 2001 +0000 + + GOing to the generic operators: some additions (eoGeneric*) + and some modifications in eoFixedLength and eoVariableLength. + +commit 5f925a4c12290395294f19e300f57738980ec00e +Author: evomarc +Date: Tue Jan 9 03:33:16 2001 +0000 + + Added the eoSurviveAndDie comments. + Should be complete!!! + +commit 5edbc0e98befa02aea0e2900e82fad4b3f98db69 +Author: evomarc +Date: Tue Jan 9 02:17:28 2001 +0000 + + Added the namespace in description of RNGs (and corrected a few broken links) + +commit 61a85582d53e4a35ebe6a7978f24ad2416d286ea +Author: evomarc +Date: Mon Jan 8 10:07:27 2001 +0000 + + Added the namespace eo for the global variable rng in eoRNG.cpp + Also added "using eo::rng" in eoRNG.h so nothing has to be modified. + We should gradually move to write eo::rng everywhere, and remove that using + directive to be almost full-proofed against possible name collision. + +commit 4b83dbd0f48842527f99e500223d73da8d4c3504 +Author: evomarc +Date: Mon Jan 8 09:52:15 2001 +0000 + + Added the descrition of evolution engines in eoEngine + and links to SGAI STL Web site in eoTutorial and eoProgramming + +commit c34e94b0d041f1deb86bfd00473f3a08e4b8a688 +Author: evomarc +Date: Fri Jan 5 14:42:48 2001 +0000 + + Removed a forgotten comment :-) + +commit f876356d37554853011774e4cd2e9cc4bc85fada +Author: evomarc +Date: Fri Jan 5 08:50:01 2001 +0000 + + I'm not sure about whether the sourceforge list is equivalent to the onelist list, + so I finally ut both in README! + +commit 82743acd3a49a17e3759441627fb32367f7431b0 +Author: evomarc +Date: Fri Jan 5 08:17:11 2001 +0000 + + Put the sourceforge name for the mailing list + +commit 63628141759544e2d185b58d5282415f0a7ac9a4 +Author: evomarc +Date: Fri Jan 5 07:30:34 2001 +0000 + + Updating installation ... + +commit 39521b2b687fbffa608e1c9c4db9e82ccb1ddecc +Author: evomarc +Date: Fri Jan 5 07:20:45 2001 +0000 + + Correcting my previous errors ... + +commit 222f533a9efc02eef2b1758d749710744b7f42e8 +Author: evomarc +Date: Fri Jan 5 07:10:25 2001 +0000 + + Trying to make the installation lighter, but the doc and the src + would not compile, with make doc or make src ... + +commit 8c82c8aa566b45bd02980c5e097fdae3405abbf4 +Author: evomarc +Date: Fri Jan 5 06:55:16 2001 +0000 + + Removed Lesson4 from Makefile - it is not there yet, and generates an error + +commit 1beb08c39d8debdcbc4e5df4ca2e9da56a64c73b +Author: evomarc +Date: Fri Jan 5 06:25:26 2001 +0000 + + Added a message about generating the documentation if you have doxygen + +commit 8e4513d8804b296fec394c67b9fd85adf9e79929 +Author: evomarc +Date: Fri Jan 5 06:24:53 2001 +0000 + + Removed doc from the SUBDIRS as most people don't have doxygen installed. + Now you need to type in "make doc" to generate the doc + +commit b2636604a286c4245f0dfdddbd8763863a6f7b31 +Author: evomarc +Date: Fri Jan 5 06:23:54 2001 +0000 + + Updated Makefile.am to account for the change of names in selectors + +commit b1fa5076e2e96560b488b76dec61b0368846d88a +Author: evomarc +Date: Fri Jan 5 05:48:16 2001 +0000 + + Changed the names of the exercise files to exerciseN.p - N lesson nb, p exercise nb + +commit 67ae5f5a6f6bfe44c63d91d3a9b546c9716962e4 +Author: evomarc +Date: Fri Jan 5 05:44:35 2001 +0000 + + eoHowMany is now included in utils dir + +commit a998ad0a411709f62fb1fe76f1f2f1f9d7d29a58 +Author: evomarc +Date: Fri Jan 5 05:42:08 2001 +0000 + + Checking in the name changes in selection procedures. + This impacts on many files, creating new entries in src (the old ones are moved + to obsolete dir), modifying t-eoSymreg.cpp and t-eobin.cpp in test, + as well as gprop.cc and mastermind.cc in app dir (not to mention almost all + files in tutorial:-( + +commit b6e99450281f28fcaba596e9568643e52d8e1fc6 +Author: evomarc +Date: Fri Jan 5 05:41:26 2001 +0000 + + Trying to ci eoTutorial.html (there is a sticky tag that keeps bothering me ...) + +commit c3fef2e4931ee7d3f39cb6d50b980aaa2469ad84 +Author: evomarc +Date: Thu Jan 4 15:23:14 2001 +0000 + + I had removed the wrong file!!! + +commit b685eb8048702b214f3fb0d1194097eb7d27ae28 +Author: evomarc +Date: Thu Jan 4 15:21:18 2001 +0000 + + removed redundant index.html in html dir + +commit 4d77c9116f3a8a1bc5f56d34541e19363d8ab47f +Author: evomarc +Date: Thu Jan 4 05:06:09 2001 +0000 + + Sorry: removed eoSGATransform, that is in eoSGA.h ... + +commit 2f130666258d8c0ff5323a5cd30b3f1b2dd77102 +Author: evomarc +Date: Thu Jan 4 05:00:40 2001 +0000 + + Adding the selectin and replacement procedures + +commit 647156c6a88d90d6d0c645e700094340197ebe38 +Author: evomarc +Date: Tue Jan 2 13:31:40 2001 +0000 + + Adding t-eoSelect.cpp to test selection procedures. Modified Makefile.am accordingly + +commit 3074101d1c18cb8a7fbbc2238bac92bf24154fa2 +Author: evomarc +Date: Tue Jan 2 13:27:11 2001 +0000 + + Adding eoDetSelect, deterministic batch selection, that copies the individuals + one after the other. Should shuffle them in between (TODO). + +commit 4fd2be4bfff8160fc71057b2c39efc006ec49eb7 +Author: evomarc +Date: Tue Jan 2 07:54:12 2001 +0000 + + A few deatils + +commit 52ed2ef8b6d50b9071d193042c17cf62908cbe3c +Author: evomarc +Date: Tue Jan 2 07:35:56 2001 +0000 + + Still the same !@#$$%% modif due to egcs problems ... + +commit 721e8d2cd54e6790cce23d85d7ede03a0647e530 +Author: evomarc +Date: Tue Jan 2 07:23:35 2001 +0000 + + Follow-up to the modif of SecondBitEA.cpp due to egcs... + +commit 5d8c30b2ae18c1925ad676644d267bf1dac29cbb +Author: evomarc +Date: Tue Jan 2 07:19:55 2001 +0000 + + A few details in the comments + +commit 04e429fdb1061039f25c11d4c4212f465e99500a +Author: evomarc +Date: Tue Jan 2 07:03:57 2001 +0000 + + I had to change the whole way the parameters are read, because EGCS did not + allow the nice constructs I had imagined (and compiled with g++) + - I removed the createParam method in Parser class - that was creating the parameters + on the heap. Not allowed to have a templatized method ??? + - I removed the subroutine read_param in SecondBitEA, as you need to create + permanent parameters (eoParser only holds references), and egcs did not allow + to create them by reference, i.e. in the line + eoValueParam & blablaParam(...); + + So now everything is done in the main_function, and 3 lines are needed to create + and read every paramter (sigh ...) + +commit 769b1fe31e09d8823866631ecc8fc568df33fd9b +Author: evomarc +Date: Wed Dec 27 11:37:05 2000 +0000 + + A few additions and corrections ... + +commit 0447391f7c7627675e78cdeb55a7d11b85ba1097 +Author: evomarc +Date: Tue Dec 26 10:28:27 2000 +0000 + + Modified the help message for the short name (added the missing =) + +commit d7693131a600e49ec1bd4694d93f2ec201445353 +Author: evomarc +Date: Tue Dec 26 08:33:48 2000 +0000 + + Moved eoSGATransform into a separate file and added the dynamic version + (where arguments can be passed by value or by reference). + Modified eo accordingly + +commit 5d0a03fa4ed79f66d6b6504d9a49b6f6c876f0ca +Author: evomarc +Date: Tue Dec 26 07:42:09 2000 +0000 + + Modified the include list after the big eoReplacement changes + +commit f97ab01cd4c7c71670ae1779b1d50c8eb4921b61 +Author: evomarc +Date: Fri Dec 22 15:13:54 2000 +0000 + + Had forgotten the section name of the parser.processParam call in the + definition fo the parameter. + +commit 7b1074f44e90f694bb40dcc474b3fd0fb5cef6bb +Author: evomarc +Date: Fri Dec 22 14:59:10 2000 +0000 + + Back to the 3 lines to declare a parameter and read it within the parser: + some compiler (egcs) don't like the createParam method in eoParser.h + +commit 21cd652430ac4120e44c8a277e052db485bec659 +Author: evomarc +Date: Fri Dec 22 14:56:12 2000 +0000 + + Back to the 3 lines to declare a parameter and read it within the parser: + some compiler (egcs) don't like the createParam method in eoParser.h + Also removed the reference in parameters declarations (a cut-and-paste error). + +commit af950bdc78a71f47c07ca184f294ddeca600d3b5 +Author: evomarc +Date: Thu Dec 21 06:49:41 2000 +0000 + + Augmented the functors and STL parts - but I still would appreciate + help on the STL part! + +commit d411685a5cb82a2f76919b23bbe79e3024d324d6 +Author: evomarc +Date: Thu Dec 21 05:35:01 2000 +0000 + + Removed the silly reference for all parameters (cut-and-paste error!). + But the funny thing is that my compiler did not complain ... + +commit a3555b2e8a29b48a62fd1e87433ffa012fb03a44 +Author: evomarc +Date: Tue Dec 19 22:14:29 2000 +0000 + + Updated INSTALL and README to EO-specific instructions! + +commit ed0e76350a80da4a0087f3b778e6abcb8a88f4ec +Author: evomarc +Date: Tue Dec 19 18:43:25 2000 +0000 + + Update after the change in replacements + +commit ca586fc799e816be9ff16747838166abc2c72ed0 +Author: evomarc +Date: Tue Dec 19 18:42:41 2000 +0000 + + Added t-eoRepalcement.cpp, that tests all new replacement procedures + +commit 6acdcb6d9b673cde3937d7217f793d4e44245cbf +Author: evomarc +Date: Tue Dec 19 18:41:19 2000 +0000 + + THe big eoReplacement update: + The interface for eoReplacement is now eoPop&, eoPop& + (i.e. no const) and the result must be in the first argument in the end. + + Hence it is possible to do SSGA and all intermediate replacmeent procedures + + The classes derived from eoMergeReduce.h are now in a separate file + The SSGA-like replcaement procedures are in eoReduceMerge.h + A more general replacement can be found in eoSurviveAndDie.h + (it could be made a littel more general - still open for upgrades). + + Also some accessors have been added to the eoPop (best and worse individuals) + + And include file eo has been updated + +commit 25dd305ee6d488f853763c3af6bf798b9de11d1d +Author: evomarc +Date: Tue Dec 19 18:32:09 2000 +0000 + + A few errors + local TOC at top of eoEngine + +commit 47031e82c93096396fae157338e56ae67fbd0b1d +Author: evomarc +Date: Tue Dec 19 18:18:08 2000 +0000 + + Bottom-Up/Top-Down modifs + +commit 6a0010474aa3bbadac6576ac6573d3f40eba40d1 +Author: evomarc +Date: Tue Dec 19 18:09:10 2000 +0000 + + A new util class to handle the rate/integer argument to selectors/replacement + +commit 727f190a8850e030e4cbfc2532515108f7f42fb4 +Author: evomarc +Date: Tue Dec 19 18:02:19 2000 +0000 + + Changed NoReplacement to GenerationalReplacement + +commit 2a93bba7e65e8bbeab93c8c885a93d7e7388d5a1 +Author: evomarc +Date: Tue Dec 19 10:17:39 2000 +0000 + + Changed the "to-down / bottom-up" to "algorithm-based / component-based" + Also added all replacement procedures in eoEngine.html + and the general operator interface in eoOperators.html + +commit 9c3453e876e4bad22ad19db7f21e2732abe8deae +Author: evomarc +Date: Tue Dec 19 05:31:54 2000 +0000 + + A small detail ... + +commit ba78a70aa44230abc2c481047109867fe4c7b6e8 +Author: evomarc +Date: Sun Dec 17 07:49:55 2000 +0000 + + Updated teh INSTALL and README files that were really minimal!!! + +commit 2d93e7374b2c2b568d2c01dd15991a90b25d4971 +Author: evomarc +Date: Fri Dec 15 18:09:08 2000 +0000 + + Corrected a bad link + +commit 44e715f24194292ffff38b29cb0cba5ad7a6587d +Author: evomarc +Date: Fri Dec 15 17:01:11 2000 +0000 + + deleted trash file lesson1.ps + CVS ---------------------------------------------------------------------- + +commit c18f63f7e4da2cf9cd748bf302ce7a20d1ba7cca +Author: evomarc +Date: Fri Dec 15 16:57:37 2000 +0000 + + Added utils/eoGnuplot1DMonitor.h ni the list of includes + +commit a83da72b4624a7622a28293c9def14411712ec0f +Author: gustavoromero +Date: Mon Dec 11 09:28:40 2000 +0000 + + adding .deps + +commit 3d93a07d74ddd717a7f35156ec266eaf74a9113f +Author: evomarc +Date: Fri Dec 8 15:10:13 2000 +0000 + + Adding Templates in dir tutorial, to hold some simple files that + only need to be filled by the user to code new items. + At the moment, only eoMonOp (in mutation.tmpl), and + eoBinOp and eoQuadOp (in crossover.tmpl) + +commit 00b435f19a33821496518bb3a2921fe6613166b4 +Author: evomarc +Date: Fri Dec 8 14:16:13 2000 +0000 + + Corrected a few bugs after the first "public" presentation + +commit 0d9e6b2941b96b1cef2540e8725c44e6c988e483 +Author: evomarc +Date: Thu Dec 7 09:56:00 2000 +0000 + + New base class eoUpdatable.h - for objects that need upates in eoCheckPoints + Also contains the class eoDynUpdater. They are eoUpdater, they receive an eoUpdatable + at construct time, and call their upate() method in their operator() method + +commit a4dd409033fe56a19ce28caf9d25bc101e69616f +Author: gustavoromero +Date: Tue Dec 5 13:46:21 2000 +0000 + + small change + +commit 1e3cd432d6ec4e1ba0b3aea8cdfd91b0e60dcc50 +Author: evomarc +Date: Tue Dec 5 05:27:12 2000 +0000 + + Removed trash file + +commit e0076740f809c0b3e4dd0e43874d05487889d465 +Author: evomarc +Date: Tue Dec 5 05:22:55 2000 +0000 + + Added virtual and const keywords all around - as I tried to use a derived + class for adaptive rates (see eoDynProportionalCombinedOp.h, at the moment + in the tutorial) + +commit c22047df11d887bfa302b6b371c0442325fb9e90 +Author: gustavoromero +Date: Mon Dec 4 19:26:19 2000 +0000 + + erasing comments + +commit 8ee0ae0e3a9c9549489d673f104e25f06a71bce9 +Author: gustavoromero +Date: Mon Dec 4 19:10:20 2000 +0000 + + small improvements + +commit e5ff1bf59ce1763c9ca1b39673b004c1257476bf +Author: evomarc +Date: Mon Dec 4 16:49:42 2000 +0000 + + Added normal mutation for reals, and corrected error of segment-> arithmetic + for the crossover operators + +commit c00c15145d531ffdcb6caf2c63539fa5b20afa28 +Author: evomarc +Date: Mon Dec 4 15:01:31 2000 +0000 + + omment of line apply(pop, eval) was found misleading ... + +commit b5382fce748225d03b3bc949254c84e1a478ae73 +Author: evomarc +Date: Mon Dec 4 14:55:18 2000 +0000 + + - added the #define for eo_verbose (true) and eo_no_verbose (false) + - added the eoNormMutation, simple normal mutation for simple real variables + +commit 4944881d7c2c4dadb06b88319e092ecfbc128268 +Author: evomarc +Date: Mon Dec 4 14:53:59 2000 +0000 + + - added the #define for eo_verbose (true) and eo_no_verbose (false) + - added the eoNormMutation, simple normal mutation for simple real variables + Modified Files: + src/eo src/es/eoRealOp.h tutorial/Lesson2/FirstRealEA.cpp + tutorial/Lesson3/SecondBitEA.cpp + +commit 0e62de2d1499c8cca89dd9d6eb7d1bbc78022a69 +Author: evomarc +Date: Mon Dec 4 06:58:43 2000 +0000 + + Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, + a method called lastCall is called for everything contained in that checkpoint + (stats, updaters and monitors). This can be extremely useful + - for stateSavers (see below) + - for monitoring things like rates of success of operators, where what you + are interested in is the final result only. + Added of course a virtual method lastCall that does nothing by default in classes + eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor + Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall + so you can ask that the state is saved at final population, whatever happens. + I also added the corresponding constructor to take this into account. + +commit 5c5142e59cee22c897ff72089d2d6f972c2421d8 +Author: evomarc +Date: Mon Dec 4 05:55:59 2000 +0000 + + Added a comment so Doxygen documents it + +commit f7f226bae9db69558eddfa14da45d32326c9d295 +Author: evomarc +Date: Sat Dec 2 08:35:42 2000 +0000 + + eoStdoutMonitor -> eoFileMonitor to correct an abusive cut-and-paste! + +commit d20d36a116417ced50b7d8d6fb6c0243b38b7a88 +Author: evomarc +Date: Sat Dec 2 08:29:45 2000 +0000 + + Suppressed the warning for the need to create a link - see html files log. + +commit 46d9671e0539f9b7f78ccf35e7680b3cc5f4bc5a +Author: evomarc +Date: Sat Dec 2 08:27:30 2000 +0000 + + Changed the links to the EO doc - removed the need for a (Unix) link from + tutorial/html dir to doc/ dir: it's simpler, and I was not able to do + the same thing in Windows anyway! + +commit 00e21770adb12b6dcb57ce6ceb9b3313a792612e +Author: evomarc +Date: Sat Dec 2 08:21:18 2000 +0000 + + Changed the (abstract) name for fitness from F to FitT so it matches + that of file eoFixedLength.h - it is far clearer in the documentation + diagrams this way. + +commit c829969431aa07b0cb111a96499c997fd002a09b +Author: gustavoromero +Date: Fri Dec 1 19:13:12 2000 +0000 + + initial version of mastermind + +commit 2abab21960ea162d163d71bac3b45590b8e61d8e +Author: gustavoromero +Date: Fri Dec 1 19:09:34 2000 +0000 + + adding a new terminator and a monitor + +commit 41a85aaa7db4e0c5a7e3bc4004a0bac8a614c124 +Author: evomarc +Date: Fri Dec 1 18:26:16 2000 +0000 + + Corrected the outState.regiserObject(parser) ommission (see SecondBitEA.html) + +commit b225f093e6212764c0dcfb8fb614c365220b1f4f +Author: evomarc +Date: Fri Dec 1 18:03:17 2000 +0000 + + I had dropped the parser from the outState - so I had to modify also + read_param to get it back! + +commit c1dd2dd1272de29b513be59617177d64870e60df +Author: evomarc +Date: Fri Dec 1 17:56:52 2000 +0000 + + Used spell-checker!!! + +commit 142c7d779c39943ae426ec61806eec9f0ffae5f8 +Author: gustavoromero +Date: Fri Dec 1 15:46:07 2000 +0000 + + adding a lot of includes + +commit a9468f38c993caa4ca842be83797e9993b4849dc +Author: gustavoromero +Date: Thu Nov 30 17:11:53 2000 +0000 + + small fix for uniform + +commit 9af974070af197674ed97de32628ebdddd810e3c +Author: evomarc +Date: Thu Nov 30 06:38:15 2000 +0000 + + Corrected a small bug (!): the -C=value was not processed correctly + as somebody forgot one character when counting up to ... 3 :-))) + +commit 109fc551ab40f9aff9eb62c4462efdbbe2e30e7a +Author: evomarc +Date: Thu Nov 30 06:20:20 2000 +0000 + + Reversed the priority between command-line and parameter file + +commit 2169a65f80ce059ca22393690f2bc908951c2699 +Author: evomarc +Date: Thu Nov 30 06:11:49 2000 +0000 + + Moved eoCopyElite.h to obsolete dir - was redundant with eoMerge.h + +commit 5c9bec34d671ca9167e6e7db00708493742ac125 +Author: evomarc +Date: Thu Nov 30 06:04:09 2000 +0000 + + Removed eoCopyElite.h, redundant with eoMerge.h + +commit 5b26c61445b2332d0a04d0e27cf6a0a7db8d2576 +Author: evomarc +Date: Thu Nov 30 04:44:32 2000 +0000 + + Added the tutorial SUBDIR + It works fine ... for make clean + But of course it would require some Makefile.am in each subdir of tutorial + and I am not sure I know what to put there... + +commit 15c3588ac756ed02340c4b9b25cb8e1f9976f869 +Author: gustavoromero +Date: Wed Nov 29 18:36:13 2000 +0000 + + sorry, old version was right + +commit b8d4e7faefbaa307155830cbb770f6f9c26aa665 +Author: evomarc +Date: Wed Nov 29 18:19:57 2000 +0000 + + Initial version of the tutorial. + Warning: all Makefile's are hand-made, and will only work in Linux + +commit a27dc53ef04953190471f32aa48ca6fe74a64ea6 +Author: evomarc +Date: Wed Nov 29 18:19:18 2000 +0000 + + dded teh comment about the link to be made from html to ../../doc + +commit ca843a88fca9cc44fbafaff23543939b77632bc6 +Author: evomarc +Date: Wed Nov 29 18:06:09 2000 +0000 + + Initial version of the tutorial. + Warning: the Makefil is hand-made, and only works in Linux + +commit 29b8f1153c0055f8bdc26eac171d0200e35f9ec2 +Author: evomarc +Date: Wed Nov 29 17:20:16 2000 +0000 + + An include file was missing!!! + I've inserted it in teh file actually - but if we go on with gnuplot, + it will need to be taken out again, and used in all other monitors + we will write using gnuplot (e.g. eoGnuplotWithErrorbarsMonitor, + eoGnuplotHistogramMonitor, ...). + +commit a69a19877046fb64a1333f2e011109b3ac19d8d5 +Author: evomarc +Date: Tue Nov 28 17:42:53 2000 +0000 + + Added eoProportionalCombinedOp.h + +commit 52a9c830c860bd40332ecae52e88e62824d991fb +Author: evomarc +Date: Tue Nov 28 17:41:41 2000 +0000 + + I added this very simple instance of operator proportional selector + for the tutorial - it is consistent with all other xxxCombined constructs. + However, I am not sure that Occam's razor will not make it widely used... + +commit 12c6bdf058db11c726fa57605fc93845cba8a617 +Author: evomarc +Date: Tue Nov 28 17:17:19 2000 +0000 + + Added the class eoSGATransform: I break the one file / one class rule + a lot, but both are supposed to be used mainly in the tutorial, not + in real life :-) + +commit f5174e3a4255efe146f8ff3597dc5e6b21e7b13e +Author: evomarc +Date: Tue Nov 28 15:40:39 2000 +0000 + + Added fstream in the include files - I had an error message at some point! + +commit e4b735b17f18e05baa7b3cb34f5380d4be1a1fb4 +Author: evomarc +Date: Tue Nov 28 15:35:09 2000 +0000 + + Added a comment to stdout upon termination - so we know why we stop in case + of multiple criteria + +commit 5aa258fbcb0f455a363f68a5325015ca99aef5aa +Author: evomarc +Date: Tue Nov 28 15:31:38 2000 +0000 + + Minor change of the default label + +commit 65a985631c73caf31e4fdfa48fc410fd56d0fa9c +Author: gustavoromero +Date: Tue Nov 28 13:36:29 2000 +0000 + + now works + +commit afdcdf5d07af53bf05bb7f61ca325deaee60aba6 +Author: evomarc +Date: Tue Nov 28 08:20:01 2000 +0000 + + Added a few comments so Doxygen documents all classes + +commit 622cbea0d53d13990e1274f458d9af59c6edb666 +Author: evomarc +Date: Tue Nov 28 06:58:06 2000 +0000 + + This is the first attempt to use gnuplot through a fork to plot statistics. + At the moment it is only tested for Linux! + Use with care + +commit bee8388a1eafd9a36226bbdd823bf5a49149d557 +Author: evomarc +Date: Tue Nov 28 06:46:37 2000 +0000 + + Modified the contructor: the default value for the delimiter is now " " + and I added a boolean argument to indicate whether or not we want to + overwrite an existing file with same name (default is overwrite). + Added the getFileName accessor. + +commit b39ebbed702ecf7c04a2d0076bc433823002b103 +Author: evomarc +Date: Fri Nov 24 17:45:07 2000 +0000 + + Added eoSteadyGenContinue.h, es/eoReal.h and es/eoRealOp.h + +commit d0e566fdf4da9cef637c17067d308cd733b96ee6 +Author: evomarc +Date: Fri Nov 24 17:44:21 2000 +0000 + + Very simple classes for vectors of (unbounded) real numbers. + A few straightforward operators only (BLX-0, uniform mutation). + Mostly for tutorial reasons - though it might improve in usefull classes later + +commit 2b8c04928384f235736c34cf0beea93cab621885 +Author: gustavoromero +Date: Fri Nov 24 17:43:02 2000 +0000 + + bug fix + +commit 8f9f25522300f72318a15e12081925d4a4430ee1 +Author: evomarc +Date: Fri Nov 24 17:41:39 2000 +0000 + + An eoContinue class that allows a minimum number of generations, + then stops whenever a number of generations happens without fitness + improvement. + +commit 08e6be4b66a4e712aba0c29c4b1d74d75f7a2ba9 +Author: evomarc +Date: Fri Nov 24 17:36:03 2000 +0000 + + Added a verbose mode (the default behavior) which is as before. + But when in non-verbose mode, prints only one line per generation. + +commit 0fd1336bfe949c1df223eff1436833b5418dd4f3 +Author: evomarc +Date: Fri Nov 24 17:30:37 2000 +0000 + + Turned the eoBestFitness into an eoStat (it was an eoSortedStat). + Alos added a few comments so that Doxygen documents all classes there. + +commit 3ec57ed93fe418662434ca81f48f833ebf6d2b9f +Author: evomarc +Date: Fri Nov 24 17:26:22 2000 +0000 + + Changed Maarten's 2-continuator construct into a vector of pointer, + as in all other Combined constructs in EO. + Kept the construtor with 2 eoCOntinue for backward compatibility. + Added of course the add method! + +commit 6a7102f5b620e025f0cb7399c24db5d6b94ac5da +Author: gustavoromero +Date: Fri Nov 24 12:33:44 2000 +0000 + + changing genetic operators + +commit 2b03bd6dae27cbd1e23c9b6ded75df0cada0cd09 +Author: gustavoromero +Date: Fri Nov 24 11:52:49 2000 +0000 + + fix Fitness default construction value + +commit 5ac5a72db20363b3995cd3c6c694ea88d7e764af +Author: gustavoromero +Date: Fri Nov 24 09:51:31 2000 +0000 + + adding new parameters + +commit 9a40169867694f0cc3a20242196a35cd7012bd26 +Author: gustavoromero +Date: Thu Nov 23 19:45:49 2000 +0000 + + reordering Makefile creation + +commit 7b27d430ed03ef6aadfe864043a2d9494562c27c +Author: gustavoromero +Date: Thu Nov 23 19:45:13 2000 +0000 + + adding some files + +commit 70b7f7954564215737dac41729f71637779593f9 +Author: gustavoromero +Date: Thu Nov 23 19:44:47 2000 +0000 + + initial release + +commit 0da6982d68f523fcaf0e99b521fb8e29e88d3e97 +Author: gustavoromero +Date: Thu Nov 23 19:17:24 2000 +0000 + + initial version + +commit 8a5ee316e1755741654d7b91cfbf0b02e1787e54 +Author: gustavoromero +Date: Thu Nov 23 19:15:31 2000 +0000 + + adding Makefile.in + +commit 8527bd83785d0bf9e76a996a5650c778c272f84f +Author: gustavoromero +Date: Thu Nov 23 19:14:09 2000 +0000 + + new application gprop + +commit 265be972ef282138a2290100809b3b40c72960df +Author: evomarc +Date: Fri Nov 17 17:50:08 2000 +0000 + + Made eoBestFitnessStat an eoStat, NOT an eoSortedStat + Cde VS: Committing in . + +commit 683bc2e44febd0a798f472fd9af7f20a33987faf +Author: evomarc +Date: Fri Nov 17 17:06:53 2000 +0000 + + dded the className method for eoMon, eoBin and eoQuad classes + +commit 5682f296cd478b81783be8f58393ff21a5293d38 +Author: gustavoromero +Date: Mon Nov 13 12:12:14 2000 +0000 + + fixing template type + +commit 34be1fd17438f3a900f05126429299943de1c390 +Author: gustavoromero +Date: Mon Nov 13 12:09:53 2000 +0000 + + adding evaluation in some places + +commit a1cd1fd3bf155431f135c079c7213af210e65657 +Author: gustavoromero +Date: Fri Nov 10 09:55:10 2000 +0000 + + fix warning: no newline at end of file + +commit 5af354e45557f93dd662d6c1389205cac6f5162e +Author: gustavoromero +Date: Wed Nov 8 15:15:26 2000 +0000 + + fix no newline at end of file warning + +commit 13169492160880f15d2cd007aba3d9e5a2f98955 +Author: gustavoromero +Date: Wed Nov 8 13:37:41 2000 +0000 + + choose a constructor + +commit 38838f753a0cfab0e8f583e04a0bafb01d9ac231 +Author: gustavoromero +Date: Wed Nov 8 13:26:03 2000 +0000 + + fix no newline at end of file warning + +commit f48fbcf51a17e76138a0eda1944b70251fe724ae +Author: gustavoromero +Date: Wed Nov 8 12:56:14 2000 +0000 + + adding a include for apply.h + +commit 2d5dbf6cfb88dae7d93bf4ab20e5ab478af13a23 +Author: gustavoromero +Date: Wed Nov 8 12:55:26 2000 +0000 + + fix no newline at end of file warning + +commit 9692852c9500a246186b6dd2b8d841961ad8f26e +Author: gustavoromero +Date: Wed Nov 8 12:38:13 2000 +0000 + + bug fix + +commit 558bded5c085ed246c41133fa451b4912e48d6a0 +Author: gustavoromero +Date: Tue Nov 7 19:16:42 2000 +0000 + + adding old targets + +commit 31ed49002bf30759df4b52db2a48806331355323 +Author: gustavoromero +Date: Tue Nov 7 19:13:22 2000 +0000 + + removing a warning + +commit e1d391d1ab112413603ae4d81ab3c655d1c4d597 +Author: gustavoromero +Date: Tue Nov 7 13:02:48 2000 +0000 + + adding targets + +commit 594a8e146f11f99cdfbfac8cea7972d4ade6ffce +Author: gustavoromero +Date: Mon Nov 6 12:38:54 2000 +0000 + + adding subdirectories + +commit 5bb5003a074eccfc0a68c9a7e66c4e96b656ba51 +Author: gustavoromero +Date: Mon Nov 6 12:37:58 2000 +0000 + + adding t-eoSymreg + +commit 9f8ffd7696bece1b760cf12f67b2d87fc981db29 +Author: gustavoromero +Date: Mon Nov 6 11:34:38 2000 +0000 + + adding target doc + +commit 865a0d4672267cd070db491275bd1e04464ec371 +Author: gustavoromero +Date: Mon Nov 6 11:31:10 2000 +0000 + + adding doc target to all + +commit 6fc47590cd54837d40686954fef139a8203a2205 +Author: evomarc +Date: Sun Nov 5 05:33:43 2000 +0000 + + Added constructors with 2 params _min and _max in generators + so you can now generate things in [_min, _max) instead of [0,_max) only + Modified the private data from maxim to {minim, range} accordingly. + +commit 06429540352eadaec1c9e06a2cfcd7668a82ed3f +Author: evomarc +Date: Sun Nov 5 04:50:10 2000 +0000 + + Added a default value (0.5) to method flip + +commit 4a8c1b3947ef03a1bb3b1c95fc4925f493d31275 +Author: gustavoromero +Date: Fri Nov 3 21:23:09 2000 +0000 + + initial version + +commit 6fdb214b71a76ef72c2b8db4f82e50fd92e3c6fd +Author: gustavoromero +Date: Fri Nov 3 20:03:26 2000 +0000 + + fixing autoconfiguration + +commit 01e4aa9cdc1b4d8f9045e1bef1b1a2678f930b58 +Author: evomarc +Date: Mon Oct 30 14:54:29 2000 +0000 + + Added some safety test in roulette_wheel procedures: + if total is zero, used to return iterator -1 - now returns uniform choice + +commit e3e4a0b719beab9e77f30c9497e7ea7a14298450 +Author: evomarc +Date: Mon Oct 30 14:51:57 2000 +0000 + + Fine tuning of printOn: if fitness is invalid, now prints it + +commit 08abf46576d1f99921f46726bda3e236619753fb +Author: maartenkeijzer +Date: Fri Oct 27 09:13:06 2000 +0000 + + Another attempt in adding the flush + +commit 8684e1fac1ff6434421c8215348ec4416f9504ab +Author: maartenkeijzer +Date: Fri Oct 27 09:12:31 2000 +0000 + + updated version info, added flush to stdoutmonitor and sprinkled a few typenames + in eoPop.h and eoGOpSelector.h (egcs 2.96 started complaining). + +commit 5e31ae1338ef8eb3a855b598c4b4b0aa32ed00ce +Author: evomarc +Date: Fri Oct 27 04:38:29 2000 +0000 + + added a second ctor with more didactic ordering of parameters (for tutorial) + +commit 2a0a3e074d826dd5dfcb19aaaa404de2ebbe597c +Author: evomarc +Date: Fri Oct 27 04:07:21 2000 +0000 + + Added the member function append( unsigned _popSize, eoInit& _chromInit ) + who appends _popSize members to the population using an eoInit + +commit 5e33a2e50b1d1d37f01c87626a45165b3b0769c7 +Author: evomarc +Date: Tue Oct 24 03:58:02 2000 +0000 + + dded Uniform Crossover (!) and "deterministic" bit-filp mutation + +commit 9cc1cfd1b492d84c25b63f9546d2e63da30d6c57 +Author: evomarc +Date: Tue Oct 24 03:57:10 2000 +0000 + + Added the calls to base class I/O routines in printOn and readFrom + +commit b0b0a3f9dad61acf5ec7f3d6bbd5e01e8182a294 +Author: maartenkeijzer +Date: Mon Oct 23 10:58:54 2000 +0000 + + It is using delim now + +commit f7c98d5b31e8f017cb26cc9086e9465ac98811b3 +Author: maartenkeijzer +Date: Mon Oct 9 16:13:20 2000 +0000 + + Changed functor base names and added to version + +commit 1d0794c46a0fe12684577d7d5f3a07a9da697974 +Author: maartenkeijzer +Date: Fri Oct 6 10:41:38 2000 +0000 + + Added an eoSortedStatBase for more efficient statistic calculations + + updated a few makefiles to include the html and latex docs with the + distribution. + +commit d42f16481d9c9fa74318001d41b3021e4b9f6779 +Author: maartenkeijzer +Date: Fri Oct 6 07:50:10 2000 +0000 + + Updated authors and started a README + +commit 543d5a5918ed4afeca03e0e50e03c6d16ebeeb85 +Author: maartenkeijzer +Date: Fri Oct 6 07:32:26 2000 +0000 + + Changed ostream_iterator to use AtomType rather than double. + Stupid me! + +commit 686e7f32730e1f8f3a4b2c2a10fb68072df52612 +Author: mac +Date: Fri Sep 29 10:39:19 2000 +0000 + + Updated version no. to 0.9.1 + +commit f1ec21e7244c2c8473452a68e8a3798621dfe3a1 +Author: mac +Date: Wed Sep 20 13:32:28 2000 +0000 + + Error in random_generator removed. + +commit f7c157c1549dc18536e9906d6c00d6f701cdb652 +Author: mac +Date: Sat Sep 9 13:52:16 2000 +0000 + + Changed construction order as gcc was warning + +commit fd8a2529a50b3f167347e559891fea7e327b5b15 +Author: mac +Date: Sat Sep 9 13:43:31 2000 +0000 + + eo: added some missing entries + Pop: error in nth_element_fitness + sga: error in eval + eoParseTree: oddities with gcc + checkpointing: added eoParser and eoState + eoParser: support for wrongly entered parameter names + rnd_generators: flip(0.5) -> flip(bias) in binary_generator + selectors.h: ??? + +commit fc172ef858b3b064747c2e8cff97211967524fb5 +Author: mac +Date: Wed Aug 23 14:56:04 2000 +0000 + + Added -O2 as compiler flag + +commit ca46a3651b08b8dc7b0ae010ed45d7445a8e8321 +Author: mac +Date: Wed Aug 23 13:07:51 2000 +0000 + + ok, fixed this problem with typedefs in gcc-0.92 (strange....) + +commit 40783947488490ae410b6b778cc43d34076ab8ea +Author: mac +Date: Wed Aug 23 12:52:48 2000 +0000 + + Yet another change in eoParseTree + +commit e18a48d4a141db4ca26bffc165fa8a062176f47a +Author: mac +Date: Wed Aug 23 12:50:34 2000 +0000 + + eoParseTree-- changed typedef + +commit ff108477c35aa4b83b3be14687c0ba512214b47b +Author: mac +Date: Wed Aug 23 12:03:01 2000 +0000 + + eoCounter? + eoEasyEA -- made it copyable again + eoEvalFunc -- added specialized eoEvalFuncCounter + eoEvolutionStrategy -- nothing much + eoGenContinue -- nothing + eoPop -- fixed nth_element_fitness + eoBitOp -- fixed error in xover + eoFileMonitor -- now appends always + eoParam -- worked around memory leak in MSC's strstream + eoParser -- changed -pconfig_file to @config_file + eoParser -- added messages instead of exception when required param is missing + eoStat -- added eoDistanceStat + t-eoFunctor -- don't know + +commit a7131a7f719419b1305567ee9cbd1c693a363214 +Author: mac +Date: Fri Aug 18 08:59:20 2000 +0000 + + commited + +commit be0c1996f773860df58f21c0e3111be6ba0f74ac +Author: mac +Date: Fri Aug 18 08:57:26 2000 +0000 + + Oh, right, dangling pragma + +commit 8034b9f344ea48e945fa130e625d7954e2dfdb80 +Author: mac +Date: Fri Aug 18 08:56:14 2000 +0000 + + some signed/unsigned comparisons removed + +commit 8ae796ab282011c459f5698f8dec56c7a1fad326 +Author: mac +Date: Fri Aug 18 08:44:22 2000 +0000 + + Added symbolic regression, which tests combined ops as well + +commit 04bc4ecde8960debfd16034ddf88e4b4ce4b5e88 +Author: root +Date: Tue Aug 15 21:15:36 2000 +0000 + + initial checkin + +commit 4f1bcfa292d8664d647d7dff3befc42526fff118 +Author: mac +Date: Mon Aug 14 11:18:34 2000 +0000 + + Removed a few dsp files and changed saving/loading eoPops a bit. + +commit 33803be4cddd897f930728cc41ee7c8cb2c017ab +Author: mac +Date: Thu Aug 10 16:43:39 2000 +0000 + + changed int to size_t + +commit adcb2c38b83b3c57603e05afc51f61fd39789413 +Author: mac +Date: Thu Aug 10 16:42:37 2000 +0000 + + *** empty log message *** + +commit a4009dee15c84cc3f5108f8148a51bbf2a4e8642 +Author: mac +Date: Thu Aug 10 16:41:04 2000 +0000 + + Added binary_value.h + +commit d3b83c70b004018fb6a8ddeab8b6ce3c38aceccd +Author: mac +Date: Thu Aug 10 16:36:55 2000 +0000 + + changed int compare to size_t + +commit 107c4568a07e628e2122c083c2e81ebaff73b8da +Author: mac +Date: Thu Aug 10 16:35:15 2000 +0000 + + changed int compare to size_t + +commit 173756916a50874ad03f565ede456591f75bd2c1 +Author: mac +Date: Thu Aug 10 16:34:05 2000 +0000 + + main should return int + +commit 8b63d5e58d591f53a1cf4f963b29dc88643ca5a2 +Author: mac +Date: Thu Aug 10 16:32:44 2000 +0000 + + changed int to size_t + +commit fc326c72ab1e01a89dac151dfe6740f75aba413a +Author: mac +Date: Thu Aug 10 14:33:37 2000 +0000 + + Forgot to remove enum value init + +commit 13df8199376ee0c38ee86c748044252c9d32c57b +Author: mac +Date: Thu Aug 10 14:31:19 2000 +0000 + + Still part of extreme cleanup + +commit 73461e2d761955cd29730d87c55bbde90f81aa04 +Author: mac +Date: Thu Aug 10 14:30:25 2000 +0000 + + Still part of extreme cleanup + +commit 664c1f12d917416a78395cf40f2181b651e84e96 +Author: mac +Date: Thu Aug 10 14:26:50 2000 +0000 + + Still part of extreme cleanup + +commit 410bc184881b247dffcfbc2460fad6ae57539d82 +Author: mac +Date: Thu Aug 10 14:25:45 2000 +0000 + + Still part of extreme cleanup + +commit 511d874b683a3d63f76268b8bcd0705fb49ea214 +Author: mac +Date: Thu Aug 10 14:23:19 2000 +0000 + + no + +commit 6d8e3a65043d7cf56a699c5a64d63c5ea4659ef1 +Author: mac +Date: Thu Aug 10 14:18:34 2000 +0000 + + Extreme cleanup, see src/obsolete for details + +commit 7f04d616e6e218b93340994e60fd1364209e0d8f +Author: mac +Date: Thu Aug 3 20:00:39 2000 +0000 + + Temporarily added Makefile.am to prevent errors + +commit 8dea30897d7732ddc95b2fa59f34bb73f21c62b4 +Author: mac +Date: Thu Aug 3 19:54:42 2000 +0000 + + Removed contrib dir reference + +commit d2fedcb5b99b3d958c1a7164a7fd44834dc669bf +Author: jmerelo +Date: Thu Aug 3 17:33:03 2000 +0000 + + More changes to Makefile.am + +commit 1bee1e1f81eb7a359a10476ae03daed768e643e3 +Author: jmerelo +Date: Thu Aug 3 17:30:57 2000 +0000 + + More changes to Makefile.am + +commit afd636cdbfa762c6fb4f855f18fd920f1894152d +Author: jmerelo +Date: Thu Aug 3 17:22:46 2000 +0000 + + More changes to Makefile.am + +commit a758eb1bd2e5325ee4e9c6ced3773e6b52e17fa2 +Author: jmerelo +Date: Thu Aug 3 17:15:42 2000 +0000 + + Changes mostly to Makefile.ams here and there, to be able to do a clean distribution + +commit a7e0b39cfd58f4142fdc6e028d05d464f1d42132 +Author: mac +Date: Thu Aug 3 17:11:54 2000 +0000 + + New fresh ltconfig, works on my RedHat distr and also on geneura + +commit bef10d6f9ad8ef3b8bf769ff62dbcf1782447605 +Author: mac +Date: Thu Aug 3 17:11:02 2000 +0000 + + Added a different libtool configure so it runs on more machines + +commit 8036c7fd7dfe68e9e54f5a03807854f05af62f56 +Author: jmerelo +Date: Thu Aug 3 16:37:51 2000 +0000 + + Changed some problems with Makefile.am + +commit cb952a2b7db52891e12d5a482f26e3e0d3ba7ed0 +Author: jmerelo +Date: Thu Aug 3 15:44:01 2000 +0000 + + Added missing files, and LICENSE + +commit 70ddb00b4cf2153e3aece52b1f28ed524dfe885f +Author: mac +Date: Fri Jul 28 10:26:44 2000 +0000 + + removed + +commit ee5bdda9321fd89a781edc82db6e6f3c3d47e761 +Author: mac +Date: Fri Jul 28 06:10:34 2000 +0000 + + testing if this configure is protable + +commit aa0b74ac9da2c210b613287f593f0a5a4121cb5c +Author: gustavo +Date: Tue Jul 18 11:33:56 2000 +0000 + + ignore files created by examples + +commit 01e44cf82876872de37e56750fab1580230fa1bd +Author: gustavo +Date: Tue Jul 18 11:30:39 2000 +0000 + + fix examples using binary_value + +commit b03bd951e0c65d3b2434edc205a658f24ea58747 +Author: marc +Date: Thu Jun 22 03:23:15 2000 +0000 + + The initial individuals were evaluated directly using binary_value + This resulted in the fitness NOT being set, and some abort or segmentation fault later + Only eoEvalFunc shouydl be used to evaluate individuals!!! + +commit ff52d48ccd9cc4ff8d9bffabf7bc11612a32bd67 +Author: gustavo +Date: Fri Jun 16 10:20:23 2000 +0000 + + changing version number + +commit cc7148d622d71278dda3b4240bb284990ab5fadc +Author: gustavo +Date: Fri Jun 16 09:38:43 2000 +0000 + + erasing LICENSE from test directory + +commit 34758a584dfa8d8383ef23a95a7ef231bff5199d +Author: gustavo +Date: Thu Jun 15 14:29:25 2000 +0000 + + *** empty log message *** + +commit 3bc1cb49d83516c4d351d520f5268b1bf827c25b +Author: gustavo +Date: Wed Jun 14 16:29:00 2000 +0000 + + erasing warnings + +commit 318697af40f4a49021b5400b625a54ef77c75990 +Author: mac +Date: Wed Jun 14 10:33:53 2000 +0000 + + Yet again some documentation change + +commit ff057c799abcfd2d55643f41f0b81f9884c1f52b +Author: mac +Date: Wed Jun 14 07:30:21 2000 +0000 + + Removed double reference to t-eoESFull + +commit 0533618306fefd376745ee13de97891c168d4578 +Author: mac +Date: Wed Jun 14 07:27:51 2000 +0000 + + Removed double reference to t-eoESFull + +commit 570397e89e48aee3d95e3027908a40279052b302 +Author: mac +Date: Tue Jun 13 14:31:53 2000 +0000 + + Added ownership functionality and made the thing non-copyable + +commit 49ee190e108a1258d39eceff741696b357e17b95 +Author: mac +Date: Tue Jun 13 14:31:22 2000 +0000 + + Some 'improvements' added + +commit 00780d785a3013774d9c8d97d5c9a92d871db52e +Author: mac +Date: Tue Jun 13 14:30:47 2000 +0000 + + Added an ownership function to eoState + +commit b5222c8aa5ea233b55b63643ee9ce84b1e583745 +Author: mac +Date: Tue Jun 13 10:27:10 2000 +0000 + + Changed base class eoEsBase to eoFixedLength + +commit 0219de5b614abc449f6c6c3e1438291697bf4eda +Author: mac +Date: Tue Jun 13 10:25:53 2000 +0000 + + updated documentation + +commit df56ae514560e1fbb9bec997e48d9481d7aa4467 +Author: mac +Date: Tue Jun 13 09:48:24 2000 +0000 + + Fixed typedef Type error + +commit 152d42d41ec56013d7e07cc5c18d5f7eff0f96bd +Author: mac +Date: Tue Jun 13 09:43:34 2000 +0000 + + Removed eoEsBase and created an eoFixedLength + +commit 71b0dc17716a39350ee6bb3777dea7ebce3293f7 +Author: mac +Date: Mon Jun 12 20:24:27 2000 +0000 + + Oh, right found some errors using gcc + +commit e55e3813dc442a1978170da3e9b9a39b0f0756e9 +Author: mac +Date: Mon Jun 12 20:23:20 2000 +0000 + + Oh, right found some errors + +commit 4c4ce70c0468f6fb0c490d2e15f2ff9b5fa62f9b +Author: mac +Date: Mon Jun 12 20:09:59 2000 +0000 + + New ES routines + +commit c6589b59518855a6e6843be9b235b894dd98171b +Author: mac +Date: Mon Jun 12 20:08:01 2000 +0000 + + Added a range member function to evaluate an iterator range + +commit 382557878aeccfca47221714b7ea94678c7d04a4 +Author: mac +Date: Mon Jun 12 20:07:25 2000 +0000 + + eoInit is a base class for making EO's, eoPop now has a constructor + for eoInit's + +commit c1b0a6c5034eb4cc194f114a8f8ef4c1269fcb9d +Author: mac +Date: Sat Jun 10 13:22:53 2000 +0000 + + Removed dependence on eoUniform, changed it to use rng.random or rng.uniform directly + +commit f39f1599244479063cb1483193a82e9868568b32 +Author: gustavo +Date: Fri May 26 17:18:06 2000 +0000 + + ignore t-eoExternalEO + +commit 6893a8565d621c9e50a19a60e296d3d2aa5b0615 +Author: mac +Date: Thu May 25 13:04:57 2000 +0000 + + Removed this ugly defaulting to 1 behaviour and solved it using template specialization + +commit 207698fcc878832647ad168cb9d829985a3175e0 +Author: mac +Date: Thu May 25 12:21:06 2000 +0000 + + Added dummy case general: + +commit 0363af1289e67e7f1aeaf5a3f6d052e5624fa999 +Author: gustavo +Date: Thu May 25 11:03:00 2000 +0000 + + warning hunting + +commit 9aaafc2cdb418d512c386f6ec3f5662dfcfa8c82 +Author: mac +Date: Thu May 25 07:26:13 2000 +0000 + + Oops, corrected error in ctor(istream) + +commit 69d9ee7a0f013a6458db7a6fcd89d91b412cc768 +Author: mac +Date: Thu May 25 07:23:24 2000 +0000 + + Oops, corrected error in adding t-eoExternalEO + +commit 86ae1ddbaacab65e673e1e883abb1268e2cbe45b +Author: mac +Date: Thu May 25 07:18:25 2000 +0000 + + eoExternalEO, support for using plain functions and structs in EO + +commit 9ad8767c418340987ebc343fd9b7278bf988f108 +Author: mac +Date: Thu May 25 07:17:23 2000 +0000 + + Changed default printOn to have a trailing space instead of endl + +commit e7a1922d76672a5542028cc5cd29f18ab8d685d7 +Author: mac +Date: Thu May 25 07:16:35 2000 +0000 + + Updated dsp, dsw and added t_eoExternalEO.dsp + +commit 05c4bec808fef3450eb2acce26b4d45356c716c0 +Author: mac +Date: Thu May 25 07:13:43 2000 +0000 + + Updated makefile and added t-eoExternalEO + +commit 230e1a03d1e35eda5bd0f025e1415583b4d765ea +Author: mac +Date: Thu Apr 20 11:11:58 2000 +0000 + + removed reference to rint() (what does this function do anyway? it is not ANSI and defined nowhere in eo!) + +commit 007046c134cc67322302c89a526090437d4d94de +Author: mac +Date: Thu Apr 20 11:06:02 2000 +0000 + + Added a bias function next to bind(). This function will bias the selection to select certain specific guys... + +commit 2af4074c2c7dd266f85e384502e7f11db5956ce7 +Author: mac +Date: Thu Apr 20 10:48:07 2000 +0000 + + Remove eoBinaryTerm, should not have been here in the first place + +commit 7ac73895896e9506f6cb323806aabdd880b6d7d6 +Author: gustavo +Date: Wed Apr 12 09:51:50 2000 +0000 + + adding test to test/.cvsignore + +commit e5825c4d756779604c5efc73e694aceaeefe4368 +Author: gustavo +Date: Tue Apr 11 12:18:30 2000 +0000 + + some fix + +commit 1992d60fa3e351c8cb401893833ac045699d8c45 +Author: mac +Date: Sun Apr 9 10:16:28 2000 +0000 + + getOp() should return a non-const reference + +commit 064ebabac52822ef802a9632922e130ec2c2f90a +Author: mac +Date: Sun Apr 9 10:13:27 2000 +0000 + + Changed int target to size_t target (produced warning) + +commit dd42eec50a06744f9f54a09976794efa0f0f3a05 +Author: mac +Date: Sun Apr 9 10:10:39 2000 +0000 + + eoFitTerm did not implement className + +commit f6c08c994885c34c063e498c97b849b2db7b5f0a +Author: mac +Date: Sun Apr 9 10:09:32 2000 +0000 + + eoFitTerm did not implement className + +commit 6d61aa2811d54016722c90af245eff27ccdc6217 +Author: mac +Date: Sun Apr 9 10:05:55 2000 +0000 + + Updated eoBreeder to use the even newer general operator interface + +commit 697d38b37292c3368639e21b1b93911bbb7e61bb +Author: mac +Date: Sun Apr 9 10:00:55 2000 +0000 + + Updated eoBreeder to use the even newer general operator interface + +commit 7973019d0b673238382d4adbcfe937353384fb64 +Author: mac +Date: Sun Apr 9 09:59:06 2000 +0000 + + Specialized it for bool, so that we don't get these MSVC warnings. + +commit 4654d42e30c5b167ed8578e52ce9c7245f00c4b0 +Author: mac +Date: Sun Apr 9 09:54:25 2000 +0000 + + Oops, it's a pain to get the makefiles up to date when you are working on two machines.... + +commit bd0cc50be9081f227c253b0038abd5f73e7dbf07 +Author: mac +Date: Sun Apr 9 09:50:44 2000 +0000 + + Oops, forgot to make operator() return an eoMonitor + +commit 481bfba8bf4cfe8de52fd30be98bd912ef895b27 +Author: mac +Date: Sun Apr 9 09:48:38 2000 +0000 + + Oops, forgot to make operator() return an eoMonitor + +commit f357a908bfd8de6308317eac4a814ac1af9fb10b +Author: mac +Date: Sun Apr 9 09:46:20 2000 +0000 + + Updated documentation to give proper include file in doxygen and define a module selectors + Also added a load(stream) and save(stream) to eoState + +commit 6e925bedea58bd03e63eb871a22ba56a6dc53924 +Author: mac +Date: Sun Apr 9 09:44:53 2000 +0000 + + Updated documentation to give proper include file in doxygen and define a module bitstring + +commit fee9a330b11926d09fdc18acc377e000dc27ffb7 +Author: mac +Date: Sun Apr 9 09:43:40 2000 +0000 + + Added t-eoGOpSel. + +commit ed4537545107701d2f21aff5e80179ac0e6d088c +Author: mac +Date: Sun Apr 9 09:41:29 2000 +0000 + + Changed the general operator interface to be consistent with the rest + of EO, updated some documentation. + +commit 64a5d2de5838095403f635a1a5cfd086444b94b7 +Author: mac +Date: Fri Apr 7 14:23:59 2000 +0000 + + updated Makefiles and removed a few unneeded files. note: ES files are pending + +commit 87cdfa00c4c6e50658954d166ac53db5a746a3d3 +Author: mac +Date: Fri Apr 7 09:04:50 2000 +0000 + + no message + +commit e35a59cdd610f01134533f7dd09383bc2366471e +Author: gustavo +Date: Tue Apr 4 15:22:04 2000 +0000 + + changing include style from ... to <...> + +commit b40fefb6ed177c63d597dcc31c1e239cdb82621c +Author: gustavo +Date: Tue Apr 4 11:00:18 2000 +0000 + + initial .cvsignore + +commit 64cb3f19e176563a06d7b43227229c66fa3000ef +Author: gustavo +Date: Mon Apr 3 15:52:31 2000 +0000 + + changing autonconfiguration to compile more examples and to create documentation + +commit 06dab1f9146f638867b4373a0e41b4246546292a +Author: gustavo +Date: Mon Apr 3 15:27:56 2000 +0000 + + forgeting multiOps + +commit bf3370461005dc8badc22b8d728815b9a7fb8737 +Author: gustavo +Date: Mon Apr 3 09:51:29 2000 +0000 + + too many EMPTY constructors + +commit 902d88fef66423c6dd0b75263129d593668f2293 +Author: gustavo +Date: Mon Apr 3 09:32:43 2000 +0000 + + adding & modifying .cvsignore's + +commit b5606ad11aa0c1559a8c098a36c49533a68a174e +Author: gustavo +Date: Fri Mar 31 16:23:16 2000 +0000 + + Maarten was right + +commit e6e9dbeaf43ceb9005495f1b26a6762d01d789aa +Author: gustavo +Date: Fri Mar 31 14:34:50 2000 +0000 + + Makefile.in don't need to be in cvs + +commit f07b16a5750612cf0f538966d5479c942a67579a +Author: gustavo +Date: Fri Mar 31 14:33:13 2000 +0000 + + more fix in makefiles + +commit 1fb9e6ceb7110833508088e9d8e16b76294358bf +Author: mac +Date: Fri Mar 31 10:14:15 2000 +0000 + + Added checkpointing to the makefile, but have to test it later on a Linux box + +commit 9823af7c093c63d70464e9d0ad41049e7910df74 +Author: mac +Date: Fri Mar 31 10:04:39 2000 +0000 + + Finalized Checkpointing, renamed t-testSta.... to t-eoStateAndParser + added a checkpoint tester, but did not yet update the Makefiles as + I don't have automake on my machine + +commit 9bcf9d95f89f3389a5b4dfb8674e38463c143a8d +Author: mac +Date: Fri Mar 31 10:02:18 2000 +0000 + + Finalized Checkpointing, see t-eoCheckpointing for a test + +commit 6d5d34ba1f12dc69a33d69c730e354eab0b973ea +Author: mac +Date: Fri Mar 31 10:00:22 2000 +0000 + + Added a className member + +commit c7eccdbe13ca7d0f41e0184be2780d05f5b93e28 +Author: gustavo +Date: Thu Mar 30 18:15:14 2000 +0000 + + adding const... leaving as is + +commit 28219fcc1216dab2cc2e75f855ce7a82a055ebf1 +Author: gustavo +Date: Thu Mar 30 18:02:03 2000 +0000 + + makefiles almost work + +commit 5fe751080749f42d251ef64e777a709bad20d502 +Author: gustavo +Date: Thu Mar 30 17:11:20 2000 +0000 + + fixing makefiles + +commit 1fe3a72e10223b1dff3861f30528caa6cfcea02f +Author: gustavo +Date: Thu Mar 30 14:20:25 2000 +0000 + + changing Makefile.am's to accept new subdiretory structure + +commit 5467df160c0d84900e87dc72a1cb5d9e77ed0413 +Author: mac +Date: Thu Mar 30 09:43:21 2000 +0000 + + changed erronuous classname() to className() + +commit a2457cf12615b21cee60d8c468aeb94d9c52d82c +Author: mac +Date: Thu Mar 23 14:41:12 2000 +0000 + + few minor mods + +commit f290f94301726aa3aab45c3b99aa051030cf8114 +Author: mac +Date: Wed Mar 22 18:55:12 2000 +0000 + + Adapted it for the poor stdc++ support of g++ + +commit 737779f235dc8cdb32b5ffef94f8b55ecd87465b +Author: mac +Date: Wed Mar 22 17:10:07 2000 +0000 + + no message + +commit b6c506643aec0f23046a377e0b993aaeb227bb53 +Author: mac +Date: Wed Mar 22 17:09:36 2000 +0000 + + Changed some includes for the new dir structure + +commit 6c79787c43447002f807259ed58f33cf95e31f1b +Author: mac +Date: Wed Mar 22 16:49:35 2000 +0000 + + Changed some includes for the new dir structure + +commit 340edc2420a222662c9f9bda7c5608483135c579 +Author: mac +Date: Wed Mar 22 16:47:27 2000 +0000 + + test the state and the parser + +commit 7fe8f333e783d59b9efef14a3bd7a0e6e834d6ad +Author: mac +Date: Wed Mar 22 15:39:32 2000 +0000 + + Changed readFrom, which is no longer line based + +commit 7303d62c1a0f1b348315d177da5ab9a826b14964 +Author: mac +Date: Wed Mar 22 15:38:16 2000 +0000 + + Obsolete, now present in eoOp.h + +commit 0b0c3f2fc0fb0f4a09ebebfb936269522a150d5b +Author: mac +Date: Wed Mar 22 15:14:16 2000 +0000 + + Changed a few params in the configuration file + +commit 0b35985e6d182ab18dcdee02b66581a4b593167d +Author: mac +Date: Wed Mar 22 15:00:38 2000 +0000 + + (re)moving... + +commit a5a4d65ab869242e97faae526c9765a5679114af +Author: mac +Date: Wed Mar 22 14:48:49 2000 +0000 + + (re)moving... + +commit c4f6d9272f8cfa0f8bc1bc4e49ce89db57a39482 +Author: mac +Date: Wed Mar 22 14:38:10 2000 +0000 + + Configuration file for doxygen + +commit 2e6d406d8e4d89f55df68b52feef7e68615df972 +Author: mac +Date: Wed Mar 22 14:32:37 2000 +0000 + + (re)moving... + +commit 2620c402bc51338b92767935624ffe2cbe586260 +Author: mac +Date: Wed Mar 22 14:30:57 2000 +0000 + + no message + +commit 2799347236f408e88d0547b766fc6f1cf39533ef +Author: mac +Date: Wed Mar 22 14:23:20 2000 +0000 + + moving... + +commit 5ecddc312c50bb9f5d08ddc5d1c7d0980e15d923 +Author: mac +Date: Wed Mar 22 14:21:02 2000 +0000 + + moved old files here + +commit ddb4bfb00b295547b4e1a487ff8bfc77f77a3b91 +Author: mac +Date: Wed Mar 22 14:18:39 2000 +0000 + + Moved the es files to an es directory + +commit 648c4ab6ec2fbdaae42e92a96dbc43246c20c7a9 +Author: mac +Date: Wed Mar 22 14:12:08 2000 +0000 + + no message + +commit 81751e279f600de6528679ff24930d10e7998a4c +Author: mac +Date: Wed Mar 22 14:04:03 2000 +0000 + + Added utilities directory, this contains state, parser etc. + +commit 2e35c416ce7e0ba5c515eb6b71c18878fd3a65bc +Author: mac +Date: Wed Mar 22 13:58:29 2000 +0000 + + Removed obsolete references + +commit 32541d5fe7ad3688d68be89eb97b0e2ea77bfe17 +Author: mac +Date: Wed Mar 22 13:57:57 2000 +0000 + + moved to utils + +commit f7547d6f8b2fd21e8ea5eafb1663d1c6f03ea618 +Author: mac +Date: Mon Mar 20 17:35:24 2000 +0000 + + eoSelfEval was empty + +commit d55c0a5456a9ef5b0682dd3474ade16948f5e5a9 +Author: mac +Date: Mon Mar 20 17:32:42 2000 +0000 + + Just changed a typo in the documentation + +commit 4a6202ff132e5792268f085ad7791db1db11dbd1 +Author: mac +Date: Mon Mar 20 16:13:32 2000 +0000 + + Removed some obsolete files, changed min and max in compatibility, commented the parser out of eoESFullMut and added some default initialization (please check this Marc). Why eoParser has changed is beyond me, but I am too late to uncommit. I will update a real parser very soon now. + +commit b111bf01aa7e0ddd6c496c243d82b53def8aee68 +Author: marc +Date: Mon Mar 13 10:17:12 2000 +0000 + + Put eoTerm into the eo hierarchy - it was in the air! + Added the className method + +commit 83ca890c10b427736d801e67e934332a8dbd659b +Author: marc +Date: Mon Mar 13 10:14:20 2000 +0000 + + Changed some int into unsigned to avoid Gnu warnings + +commit b4e61489c787d0730cd2efff2a1a6f188c85afc5 +Author: marc +Date: Mon Mar 13 10:10:00 2000 +0000 + + Removed extra {} in operator() + +commit f430468921edbcf49e5779e6d5af14c0dd294c8f +Author: mac +Date: Mon Mar 6 16:28:37 2000 +0000 + + Removed the call to the istream ctor, replaced it with readFrom + +commit 60857fcf3bf5691b16c04a69e4e84d1a37b1a60f +Author: mac +Date: Mon Mar 6 16:21:54 2000 +0000 + + Removed the call to the istream ctor, replaced it with readFrom + +commit 0b449f9817a1361c4709234640341a6dcfd9f4b7 +Author: mac +Date: Mon Mar 6 16:09:46 2000 +0000 + + Removed the istream ctor + +commit 64693768805169ab16e6fa179820bb116b541346 +Author: mac +Date: Mon Mar 6 16:05:47 2000 +0000 + + Fixed bug in eoGOpSelector (missing break!) + + eoOp.h: binOp's second arg is const once more + + all dsp and dsw files were touched by msvc, but did add some stuff (which + will be added to eo later) + + Hope this all works + +commit ca4e470092918f03cf16b4065c66ba9d68b96dd1 +Author: mac +Date: Mon Mar 6 15:55:44 2000 +0000 + + Upgraded parse_tree a bit... + +commit f1fd1f8e33c0df501840bd46f48ec77c8e4409fc +Author: marc +Date: Thu Mar 2 05:54:01 2000 +0000 + + Removed extra () in method virtual const EOT& operator()(const eoPop& pop) + Changed the include of eoPop.h from <> to "" + +commit 4b38c62c95b29c2d539213ad6740147ef0080e9b +Author: marc +Date: Thu Mar 2 05:48:23 2000 +0000 + + Something went wrong with past commit's. So, again + - added the virtual destructors of all classes, + to suppress g++ annoying warnings when using -Wall option + +commit 9c75e1c408c054aedc4e5293d2e3fb844a48f62a +Author: marc +Date: Tue Feb 29 05:22:32 2000 +0000 + + Modified the order of base type and private data initializations + so the g++ does not complain when using the -Wall compile option + +commit 9a4946c75c500804b9191135cee0a253028d2341 +Author: marc +Date: Tue Feb 29 05:14:40 2000 +0000 + + Warning: this comment refers to the previous commit of eoException: + The command "cvs commit" does not seem to allow to enter comments ??? + wherease the command "cvs ci" is OK. + + Here we go: + - added the virtual destructors of all classes, + to suppress g++ annoying warnings when using -Wall option + +commit b109ef46b2ea7465a6b6fc79926335e8f4353597 +Author: victor +Date: Mon Feb 21 18:21:58 2000 +0000 + + *** empty log message *** + +commit 93fcc4c04817cf5d43d890b0be8d0abf5f470172 +Author: victor +Date: Mon Feb 21 18:21:14 2000 +0000 + + A: has been fixed, ONCE MORE :-( + +commit 4777d091288959add913f3da14c6167b44ce0637 +Author: victor +Date: Mon Feb 21 18:03:31 2000 +0000 + + making the second parameter of the oprator() for binaria operators to be NON const + +commit 0d439f9f56aab9c704defb416de524354b750e1a +Author: mac +Date: Sat Feb 19 18:21:47 2000 +0000 + + Changed double linefeeds, will undo this if it doesn't work + +commit 6569496f6e92d63fe92aa8df80c7ba18909d57b7 +Author: mac +Date: Sat Feb 19 17:37:18 2000 +0000 + + Removed double line feeds + +commit 131b6a85fbff2757be7b3ad8f2af82ddbda35108 +Author: mac +Date: Sat Feb 19 16:54:09 2000 +0000 + + Hi, just a simple test, I'm sorry to do it with the real repository, + but my machine here is not Unix + +commit c3fd4eb3ee1d9322d70247afbddc84c984b5554b +Author: mac +Date: Sat Feb 19 16:32:12 2000 +0000 + + eoScalarFitness, 'envelope class' for making minimizing/maximizing fitness + +commit 589df91b4e182f15caa24214ab6fef6ae3a7e4c8 +Author: mac +Date: Sat Feb 19 16:31:01 2000 +0000 + + Example file + +commit 2443677f13edf1c59f5bafc82ded943a2dd0353e +Author: mac +Date: Sat Feb 19 16:30:42 2000 +0000 + + Moved the static eoRNG rng to an extern eoRNG + This external object is now defined in eoPersistent.cpp + + This should change... + +commit c48c1f2c1249fadb777f8043cda9ac18c84ad96c +Author: mac +Date: Sat Feb 19 16:27:38 2000 +0000 + + Added gp, example file in t-eoSymreg.cpp + +commit 88c32ee09b56ce0dd5b75ed1520b394df0c334da +Author: victor +Date: Sat Feb 19 13:14:36 2000 +0000 + + Someone was using eoAltProportionalSelect.h only he/she knows whycd src + +commit 66465c5a0927ee1a14dc45a342212e1e6fb04c02 +Author: victor +Date: Sat Feb 19 12:50:48 2000 +0000 + + A: has been fixed , ONCE MORE :-( + +commit 5b5b71b148632253445cba6ebd280b497204c423 +Author: victor +Date: Sat Feb 19 12:37:28 2000 +0000 + + Changing (ONCE MORE) eoEasyEA.h to allow 0 generation processes. + +commit 25f9229b98b82f96cb26c3e25771af16fce2f265 +Author: mac +Date: Wed Feb 16 15:17:43 2000 +0000 + + *** empty log message *** + +commit 4ebd212d143d4d48d92b77199bcbcff9f05c8045 +Author: mac +Date: Wed Feb 16 15:11:18 2000 +0000 + + *** empty log message *** + +commit 9fba2bfbb9a15dbe86a89b3637ea95d13b9e2ee7 +Author: mac +Date: Wed Feb 16 15:05:19 2000 +0000 + + Mak: Added the eoQuadratic Op and more ... (and I hate VI) + +commit 4ac185022674c439d7171f7bb8d71aa5825327ad +Author: mac +Date: Wed Feb 16 15:03:45 2000 +0000 + + *** empty log message *** + +commit cbc26ed5b26519192c0708d985db22c2bc5fac79 +Author: marc +Date: Wed Feb 16 04:40:20 2000 +0000 + + Changed all "float" to "double" + But more than that, this is a test of CVS for me + Marc + +commit 871fcc8184ea36547a47f76a29e8b449a630f156 +Author: mac +Date: Tue Feb 15 15:08:00 2000 +0000 + + just a test + +commit 4f40da85e4d422ebcc503296c660981a891c556a +Author: victor +Date: Fri Feb 11 12:05:07 2000 +0000 + + A: has been fixed :-)) + +commit 801ba49682c675f46b91d7dc402fddacdf56922b +Author: gustavo +Date: Wed Feb 9 19:50:02 2000 +0000 + + some test + +commit 7db1492943fdfdcd0f85332d4268ff2c42aaa554 +Author: jmerelo +Date: Mon Feb 7 17:16:16 2000 +0000 + + Added new files to the brew, mainly distance and new-op-interface related + +commit 472898871ced7f9c36f47afd6376e7a3fe394497 +Author: gustavo +Date: Wed Jan 26 17:48:24 2000 +0000 + + *** empty log message *** + +commit 83365de0d1dfa7b0473742cb7bfd79e82571bf9e +Author: victor +Date: Tue Jan 25 08:20:22 2000 +0000 + + A very silly error has been fixed + +commit 947ea09fa1df1818aab8f06d32e9e66d166cbb1e +Author: gustavo +Date: Mon Jan 24 21:16:54 2000 +0000 + + some reviews + +commit 96f618f88fd53aaee94b831ec9f8d657b3900ee2 +Author: gustavo +Date: Mon Jan 24 21:13:21 2000 +0000 + + some reviews + +commit 729fa74b42b62902ba2bb1409ba03e96035bb2fb +Author: victor +Date: Tue Jan 18 13:43:39 2000 +0000 + + I have change the do...while(terminator) into while(terminator){...}, because may be the termination condition is reached just atthe beginning (for instance 0 generations) + +commit 6fece409a7837b71b097b236219d6591c7acb902 +Author: victor +Date: Tue Jan 11 13:25:32 2000 +0000 + + Another little bug fixed + +commit c0e85685f80ef72fa7c51ac759ff2f52c49e1eac +Author: gustavo +Date: Tue Jan 11 12:13:18 2000 +0000 + + bug fix in eoTournament + +commit 29dc5ac0342f90295d0e25d3953fe8d1005a2a68 +Author: victor +Date: Tue Jan 4 13:04:00 2000 +0000 + + A little problem existed when the Parser tried to read a String because a \0 was inserted sometimes (no others) making imposible to add a new string to the one read and then turning the full string into a char* (understable? :-) + +commit 8eac30156619989786efcece181cb799e20c3c66 +Author: victor +Date: Tue Jan 4 10:43:06 2000 +0000 + + Changing the way parameters are shown to the user when the -h or --help flags are used + +commit 7d3e4c83f28176b7369acbbe5e16d0cff9243567 +Author: victor +Date: Tue Dec 21 13:39:42 1999 +0000 + + Minor changes in eoRNG.h + +commit bf3e77d97b0969fe779e1f9184f21b85eeda051f +Author: victor +Date: Tue Dec 21 12:12:29 1999 +0000 + + eoOpSelector has a method called getOp that HAD to return a non-constant reference to an operator; in fact it returned a CONST reference. Now, I've changed it + +commit a92af188c8712344f41559216c8c08023f5dcb6b +Author: victor +Date: Tue Dec 21 11:41:19 1999 +0000 + + Updating the selectors: they inherited from eoSelect and noew the inherite from eoBinPopOp + +commit 050df933c8014f7411ca642cb6dd919d6ed69d06 +Author: victor +Date: Tue Dec 21 09:58:45 1999 +0000 + + Minor changes in eoParser.h + +commit 5a735c3915f8eb8a8843a93d41fe64a2908a5ee3 +Author: victor +Date: Fri Dec 17 12:04:06 1999 +0000 + + Moving function InitRamdom to eoParserUtils.h + +commit d3642e4fde60773c5640a525e89f1f71bd1fdf28 +Author: jmerelo +Date: Fri Dec 17 09:19:13 1999 +0000 + + Changes + +commit de33c67f0e95db37cd6af3069186f6f3c8a38e27 +Author: victor +Date: Wed Dec 15 16:47:41 1999 +0000 + + A little mistake has been corrected + +commit df6c6008600ca5ca627f3374e5b117ebb128ebc8 +Author: victor +Date: Wed Dec 15 16:42:13 1999 +0000 + + The constants N,M and K are not declared twice when using RNG in different file of the same program + +commit 29ea368191dcffa928dd55b3cd9f3d58101ae9f8 +Author: victor +Date: Wed Dec 15 13:57:09 1999 +0000 + + I have turned into comments the Pop constructor that used Type as the type of the gene, given that an EO can have NO genes + +commit 91f5ddbdaadfd608ccad0ccfac798bc45343d841 +Author: jmerelo +Date: Mon Nov 22 09:47:32 1999 +0000 + + Added changes mainly by Marc + +commit 449ed17ff850f629ba330eaf305f62637bacb3fa +Author: jmerelo +Date: Mon Nov 15 09:26:33 1999 +0000 + + Added Marc's ES files and .dsp files for others + +commit 0d8648c0e67a395a787a3966e5000b159ca4e7b4 +Author: jmerelo +Date: Fri Oct 29 11:23:10 1999 +0000 + + Added eoParser + +commit 46b6a9e17a2254aaa2e0b620b57619145377274b +Author: jmerelo +Date: Mon Oct 25 08:25:42 1999 +0000 + + Added new RNG and test files for it + +commit 18f6c3151390a7a2589e56a2d279799664113ee6 +Author: jmerelo +Date: Tue Oct 19 11:47:15 1999 +0000 + + Small modifications + +commit ef43aaf616e8ef28a938e3e4c1475bd32607995b +Author: gustavo +Date: Fri Oct 15 13:16:50 1999 +0000 + + bug fix in eoBinBitflip + +commit bc922d38714d4ef68e070143dbd14fdd24c21294 +Author: jmerelo +Date: Fri Oct 15 11:18:52 1999 +0000 + + Changed eoBinBitFlip thanks to Jacques suggestion + +commit 0e4d27ec4d6f55678c97452077d204d325451e04 +Author: jmerelo +Date: Fri Oct 15 07:34:55 1999 +0000 + + Small changes to makefiles + +commit 661069d01cd16c36414eade4a06f9bb170d9a7f7 +Author: jmerelo +Date: Wed Oct 13 08:38:33 1999 +0000 + + Changes in configure y makefiles to account for new version and new files + +commit f92b133fd00a4fcf6988cd14a5c12d0b31d7e1db +Author: gustavo +Date: Mon Oct 11 10:20:39 1999 +0000 + + updating with new tests + +commit 387059901b003f043761a2f313c6ac03ee946bb6 +Author: gustavo +Date: Fri Oct 8 17:45:49 1999 +0000 + + adding more functions and tests for eoNonUniform + +commit 557a06ff22d8c2bf8cb22c94e625b203c7d9ddca +Author: jmerelo +Date: Fri Oct 8 11:39:58 1999 +0000 + + Two files left over added to the repo + +commit 259420d9ce40977c084df0a529277d93bb1b864a +Author: jmerelo +Date: Fri Oct 8 11:39:20 1999 +0000 + + Added a full algorithm to the new EO, with terminators, and things like that + +commit 378ee811e77f0ae494234f9daa6348ba6908d879 +Author: jmerelo +Date: Fri Oct 8 09:52:31 1999 +0000 + + Added two more files + +commit ba4ace6324a4d7071d3373325955d5bef076d324 +Author: jmerelo +Date: Fri Oct 8 09:51:40 1999 +0000 + + Changed stuff to make eoGeneration work + +commit c85363121964c48a59a84fa52c787a19ec7ec8ff +Author: jmerelo +Date: Fri Oct 8 07:40:34 1999 +0000 + + Cosmetic changes + +commit dabbcdc7b43de66f56338b4d12ecef9c624620f7 +Author: gustavo +Date: Thu Oct 7 11:39:08 1999 +0000 + + adding t-eogeneration + +commit 0133499ac3166f2e81fcb1eb47820895bac35b9a +Author: gustavo +Date: Thu Oct 7 11:38:14 1999 +0000 + + putting eoNonUniform into a separate file + +commit b5d3db43ade0189f2ef30c80405ace9d478008d1 +Author: gustavo +Date: Tue Oct 5 11:32:17 1999 +0000 + + adding eoNonUniformOperator to eoOp.h + +commit 7d7542e705852519dbec812ec2866ee730f70cae +Author: gustavo +Date: Mon Oct 4 11:17:19 1999 +0000 + + adding t-eogeneration.cpp + +commit 648fd000c10ff292733aed5adced04f51a2ff512 +Author: victor +Date: Fri Oct 1 17:00:38 1999 +0000 + + Updating Makefile.am to include eo2d.h and eo2dVector.h + +commit f395b6d93e1decc1a8cb9c74a8b9f97717c1534e +Author: victor +Date: Fri Oct 1 17:00:02 1999 +0000 + + Updating Makefile.am to compile t-eo2dVector.h + +commit 90d6310aef89f51afbe4bd4521f4ff0a34af2259 +Author: victor +Date: Fri Oct 1 16:36:04 1999 +0000 + + *** empty log message *** + +commit 7c107635b07e8ed33b221f79fe951e8a8f73deae +Author: victor +Date: Fri Oct 1 16:33:59 1999 +0000 + + All the methods have been implemented. Only three of them (asignement operator, read from and write to a stream) remain unfinished. + +commit a789371939706b82eb018d9a6f7ac62c1201b6fe +Author: victor +Date: Fri Oct 1 16:32:46 1999 +0000 + + Final (or almost) version by now. + +commit 8e4e9197ea8055f70e8db366e61ebcffe86cad2c +Author: victor +Date: Wed Sep 29 11:43:34 1999 +0000 + + Adding an interface for 2-dimensional chromosomes + +commit bed45e65a22c442032c5432fd8a7b97071246290 +Author: victor +Date: Wed Sep 29 11:41:34 1999 +0000 + + Fixing a little bug in the random generator. Variable size was used instead of _size, which is the parameter the method gets + +commit 1247f801fbeba3cf0f4d723444b3641df20e2a08 +Author: gustavo +Date: Tue Sep 28 11:56:21 1999 +0000 + + testing and debugging eoGeneration + +commit 49b35da8f920f5f8df58192fdb4adf32bd6d301f +Author: gustavo +Date: Tue Sep 28 10:26:39 1999 +0000 + + finish eoGeneration... still to be tested + +commit bc9638f53c2e7300bc09e008de2e57ef8346da28 +Author: gustavo +Date: Tue Sep 21 18:14:39 1999 +0000 + + fixing bugs in replacers and moving some code between files + +commit 265c5671bf0bded411cefe738c0a8a87daa007e1 +Author: gustavo +Date: Tue Sep 21 11:36:38 1999 +0000 + + pop need a reevaluation after breeding + +commit ad0a77bb61604058c356b8829b95c43756a53aab +Author: gustavo +Date: Mon Sep 20 18:07:35 1999 +0000 + + fixing cvsignore + +commit f3ebe8be708214e09e425324e420ac7465cb23f6 +Author: gustavo +Date: Mon Sep 20 11:48:52 1999 +0000 + + fixing tests + +commit 6daefd1ccff76994e781c6a9936928c61e72c030 +Author: jmerelo +Date: Mon Sep 20 11:37:00 1999 +0000 + + Added LICENSE + +commit 759dba7ea83f1f9e6d09e40fe98c83cbdb5bf366 +Author: jmerelo +Date: Mon Sep 20 11:35:01 1999 +0000 + + Changes to eo1d interface and bug fixes + +commit 06db0c058e48011852cca0a2af7c988825d8c6c2 +Author: gustavo +Date: Fri Sep 10 12:21:50 1999 +0000 + + *** empty log message *** + +commit b0232f9c0c810427df122be30015da0d2933286c +Author: gustavo +Date: Fri Sep 10 12:13:53 1999 +0000 + + updating eo/test/.cvsignore for new eoBin tests + +commit 8056d48505994eecbea4e8070db10ba4c311e73d +Author: gustavo +Date: Fri Sep 10 12:11:11 1999 +0000 + + *** empty log message *** + +commit 3214eead0ebef7a764e9187e4c79e99c2172d41d +Author: gustavo +Date: Fri Sep 10 12:05:57 1999 +0000 + + *** empty log message *** + +commit 0f4ff4691c8d623134e68325e2fb85985d713963 +Author: gustavo +Date: Fri Sep 10 12:03:51 1999 +0000 + + adding examples for eoBin & other stuff + +commit 50062e7c303ac84b853f498ccf8a368c93a0122e +Author: gustavo +Date: Fri Sep 10 11:48:42 1999 +0000 + + adding examples for eoBin & other stuff + +commit 9ac2220c5dd4c1dc7341ba9b8de691682e9a82b1 +Author: gustavo +Date: Fri Sep 10 11:07:46 1999 +0000 + + *** empty log message *** + +commit c1cddf3236f957069eb642653cb02e6f4a0f0933 +Author: gustavo +Date: Mon Feb 15 17:47:30 1999 +0000 + + adding eoGeneration + +commit c1481ac24f5dd5a057ac43a6f7faa10e28793d93 +Author: jmerelo +Date: Mon Feb 15 16:03:04 1999 +0000 + + New .dsp files for new test programs + +commit e3bff7d45f1d09f271fb62561d44ea3327620d35 +Author: jmerelo +Date: Mon Feb 15 16:01:35 1999 +0000 + + Compiled new stuff on VC++, changes to breeder + +commit 1eaeece266182bbcdca46bb486aeb1eb1e97d350 +Author: gustavo +Date: Mon Feb 15 11:55:59 1999 +0000 + + doing things work on VC++ + +commit 24b8b8045ac22fe59f07ef77a1c8370816ef1fdb +Author: gustavo +Date: Fri Feb 12 17:56:55 1999 +0000 + + bux fix in t-eoinsertion.cpp + +commit 9303c4b53dd49954f2445fba73afcbe542af3172 +Author: gustavo +Date: Fri Feb 12 17:43:28 1999 +0000 + + eoBreeder almost finished + +commit 11be20aefa012ef1ba82e1ca6815f5f089d3c758 +Author: jmerelo +Date: Wed Feb 10 17:14:08 1999 +0000 + + Added some files, compiled some stuff in VC++, and finished eoOpSelMason + +commit 044acb151be86f096a96fd275f87188e3695eade +Author: gustavo +Date: Wed Feb 10 17:05:16 1999 +0000 + + adding eoBreeder + +commit 9d1fdcd126ff7a70178d50c438260958b9e45d25 +Author: gustavo +Date: Wed Feb 10 13:39:48 1999 +0000 + + small bug fixes + +commit 73f37176e82a9491d3d9af8ebee95b1d39978c7f +Author: gustavo +Date: Tue Feb 9 19:06:51 1999 +0000 + + *** empty log message *** + +commit a5d27679da3b939887c012d24ae6dabe6138db82 +Author: jmerelo +Date: Tue Feb 9 18:40:00 1999 +0000 + + Changes to makefiles and other things + +commit 5318810e816a04289b506bd6e47a3bb8ac6d5e82 +Author: gustavo +Date: Tue Feb 9 18:16:42 1999 +0000 + + *** empty log message *** + +commit 9860e201f24f7663dc7b933f30aa54586aae45af +Author: jmerelo +Date: Tue Feb 9 17:31:16 1999 +0000 + + New bitOp factories and things like that + +commit a86873dcbf8424286e3672820d31358383a3f938 +Author: gustavo +Date: Tue Feb 9 17:27:22 1999 +0000 + + new replacer + +commit e721603cf2387dcc416a7ffdd73fe5a763f14ae9 +Author: jmerelo +Date: Mon Feb 8 19:15:27 1999 +0000 + + Changed monopfactory to opfactory; changes in the examples + +commit 204b0bcac835821b74f15b4b2f16a247bc62266d +Author: gustavo +Date: Mon Feb 8 18:47:07 1999 +0000 + + looking for a bug in eoInsertion + +commit 2141b13f9d1dd041e0487c3e2949e0e0e3655d32 +Author: jmerelo +Date: Mon Feb 8 16:13:26 1999 +0000 + + New files added and fixes for VC++ + +commit 6e9bdc8b2ea0798c7f8f39b3e66749e97984420d +Author: gustavo +Date: Mon Feb 8 16:11:55 1999 +0000 + + some bug fix + +commit 3d7d4a7a51098869069cc37b4a2ace453a881536 +Author: gustavo +Date: Mon Feb 8 14:15:11 1999 +0000 + + learning about autoconf: eoBin and bvector.h + +commit 93d15b9778ced0016ea7bfa79fc113c4074d0abc +Author: gustavo +Date: Mon Feb 8 12:43:52 1999 +0000 + + eoBin/eoBinOp division + +commit 46e19b13c393683679e1af8ec1eaaafb55181879 +Author: gustavo +Date: Fri Feb 5 18:25:28 1999 +0000 + + adding eoInsertion + +commit 5247c976ce6c56b5dc43e9634f8626efa1e29ad9 +Author: gustavo +Date: Fri Feb 5 16:34:00 1999 +0000 + + eoLottery finished + +commit 57e734fdf2e40561a190dabad737bb2a1cd66880 +Author: gustavo +Date: Thu Feb 4 17:38:39 1999 +0000 + + adding acconfig.h + +commit a44af3e7f462ebf52dcbbea33eccd2c270889bdc +Author: gustavo +Date: Wed Feb 3 20:42:57 1999 +0000 + + changes on eoLottery + +commit b5cb78b70f8ffd8ee61230534cd0455fa704b9b8 +Author: jmerelo +Date: Wed Feb 3 18:34:20 1999 +0000 + + Changes to eo and opsel to quash compiling bugs + +commit e20fb6c7aaa84685da5ce215b53e24ebbe082596 +Author: gustavo +Date: Wed Feb 3 17:28:07 1999 +0000 + + some changes to start, new work on eoLottery + +commit 2cafee6bc6ef57f249e90a89d8739dda968fe140 +Author: jmerelo +Date: Wed Feb 3 17:26:52 1999 +0000 + + Chenges to EO + +commit 6e9ddda69c70fd967542c554bc7df193cf6b8452 +Author: jmerelo +Date: Mon Feb 1 18:18:39 1999 +0000 + + Remove old eoObject.cpp + +commit 3fe0218a72811649a8f39ec61dc0952a6bee9063 +Author: gustavo +Date: Fri Jan 29 12:23:55 1999 +0000 From 77e97a6ba00ad09f4f851e3f7bf1c9581db35cce Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 26 Oct 2010 13:48:47 +0200 Subject: [PATCH 1606/2134] file not at the right place --- CHANGELOG | 9987 ----------------------------------------------------- 1 file changed, 9987 deletions(-) delete mode 100644 CHANGELOG diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 6217c7917..000000000 --- a/CHANGELOG +++ /dev/null @@ -1,9987 +0,0 @@ -commit 4a90420dd3807fd569c8886dca059cd34d04c622 -Author: Johann Dreo -Date: Tue Oct 26 10:51:48 2010 +0200 - - create a more generic class for monitoring to any ostream (useful for output to clog or cerr, for example), the stdout monitor now inherits from it - -commit 47c4f58eb8a989cc387cccedcadd795a1fb31e06 -Author: Johann Dreo -Date: Mon Oct 25 09:50:50 2010 +0200 - - Stat object to compute ratio of feasible indviduals in a pop using eoDualFitness - -commit 91ab6b8296dc162efef69c19118405c5c487c7b3 -Author: Johann Dreo -Date: Fri Oct 22 10:08:57 2010 +0200 - - a stat object for computing interquartile range (a robust measure of dispersion) - -commit 11b14cf597756f645d4b43b944f5d675c1f36512 -Author: Johann Dreo -Date: Fri Oct 22 10:07:09 2010 +0200 - - Arithmetic operators (note: priority to unfeasibility) - -commit ac0a909d1da643b62a3cfd7b61f5e070d30974f4 -Author: Johann Dreo -Date: Wed Sep 29 22:52:30 2010 +0200 - - using eo::log instead of std::cout - -commit ffc6efeb97ec2b1148fd08225b9d0698a44d9a8b -Author: Johann Dreo -Date: Tue Sep 21 17:53:48 2010 +0200 - - do not explicitely specify build type, use O3 instead of O2 for release - -commit eade49c45ad7b4e89ece2a40b1479f7506389ffd -Author: Johann Dreo -Date: Tue Sep 21 17:52:59 2010 +0200 - - typo variable name - -commit 9a6dbdd70e061b385baff228617895a4fcce1dc4 -Author: Johann Dreo -Date: Mon Sep 20 11:32:55 2010 +0200 - - deactivate -fprofile-arcs -ftest-coverage that necessitate gcov - -commit f39183b8d7656b618afc4043095dc3ab98b42d90 -Author: Johann Dreo -Date: Thu Sep 16 14:16:24 2010 +0200 - - accessors to levels ; typofix on _contextLevel - -commit 8dc13bbaff422f5f22acb562339c8dc0c7a6774b -Author: Johann Dreo -Date: Thu Sep 16 11:29:32 2010 +0200 - - important note: we are using wallclock time - -commit faec5f102cc8b63276928f46679ed34e65fde1e4 -Author: Johann Dreo -Date: Thu Sep 16 11:16:55 2010 +0200 - - bugfix operator() signature - -commit d26a9d87673bda9a17075493ac39a69732bffda6 -Author: Johann Dreo -Date: Thu Sep 16 11:06:04 2010 +0200 - - evals that can throw exceptions - -commit 5adfdc8a0853c278e0f8d054ae64390393faacac -Merge: ccd5b01 88b2ec3 -Author: Johann Dreo -Date: Thu Sep 16 09:41:26 2010 +0200 - - Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev - -commit ccd5b01dee2ef9099e5ea24eb39b3acca7df7c0c -Author: Johann Dreo -Date: Thu Sep 16 09:33:55 2010 +0200 - - more comments ; header - -commit 991138053c8605d9538bb114edc7754a498ddeaf -Author: Johann Dreo -Date: Thu Sep 16 09:29:51 2010 +0200 - - typo bugfix - -commit 2ed8146723a3ad9c1311e5a2fd2ed5882c98bed5 -Author: Johann Dreo -Date: Thu Sep 16 09:28:55 2010 +0200 - - use std::endl ; error message format ; more comments - -commit 9d19cc2cfaec74a26ba98421015de68babfba222 -Author: Johann Dreo -Date: Wed Sep 15 22:53:15 2010 +0200 - - bugfix _keep_existing name ; added an overwriting option to use ios_base::trunc instead of ios_base::app - -commit d8a1aedf015cf7ab8c91388c8f21e5fc2ed8a6eb -Author: Johann Dreo -Date: Wed Sep 15 22:28:58 2010 +0200 - - use eo::log - -commit 22ce03233ebaa2472538c623ec0172f819e61f3c -Author: Johann Dreo -Date: Wed Sep 15 22:28:29 2010 +0200 - - doc comments - -commit 88b2ec3d1a95e3f1d87e3ed150c4a09035e4e270 -Author: nojhan -Date: Thu Sep 9 22:37:50 2010 +0200 - - update related softwares: + EASEA, GUIDE - -commit 526dfe150b42711086b486375b57396db0e7d4dc -Author: Johann Dreo -Date: Mon Sep 6 12:05:13 2010 +0200 - - bugfix xdebug level - -commit 3c2639a876148028fb779176c519415ec36087b3 -Author: Johann Dreo -Date: Mon Sep 6 11:20:00 2010 +0200 - - use eo::log instead of cout - -commit 236dd026088d572022729a7ca103ca74f9072ba4 -Author: Johann Dreo -Date: Mon Sep 6 00:04:37 2010 +0200 - - indent clean, more comments - -commit b9d74c0b55590e980a2173721ca266d7e9f3e68e -Author: Johann Dreo -Date: Sun Sep 5 23:56:17 2010 +0200 - - replace \n with endl - -commit b18817b46fb40feec2e4d71ac8b69e89795a2570 -Author: Johann Dreo -Date: Sun Sep 5 23:42:58 2010 +0200 - - use eo::log instead of cout - -commit 2b4f14b8d720611cb34d60cbabc1eb53ed3efd90 -Author: nojhan -Date: Fri Sep 3 09:19:23 2010 +0200 - - official xmpp chat room - -commit f7170e2ebacda69cc42034149ebb22b58e91ef29 -Author: Caner Candan -Date: Wed Sep 1 19:15:26 2010 +0200 - - * t-eoLogger: missed some code lines to display correctly the help - -commit 541a14babff45c4f616184d770f508cd43de709b -Author: Caner Candan -Date: Wed Sep 1 17:30:50 2010 +0200 - - * packaging: now the test and tutorial binaries are installed in share directory - -commit 6d04ba9d3287d5bcae98fe695e43462b37b7d4e2 -Author: Caner Candan -Date: Wed Sep 1 14:51:09 2010 +0200 - - ticket #1: Remove the autotools files done - -commit 76d8dac2fdc8d56d0b51b276970f8e773f053b13 -Merge: 5bd0baa 7159f8e -Author: Caner Candan -Date: Wed Sep 1 12:07:23 2010 +0200 - - Merge branch 'packaging' of ssh://localhost:9001/gitroot/eodev/eodev - -commit 5bd0baace7402bb0ff61636301d181429d53b299 -Author: Caner Candan -Date: Wed Sep 1 12:01:42 2010 +0200 - - eo::log: added the parameter -o in order to define a log file + removed some warning messages at compile time - -commit 0834d689e8684b3c50d2bc8172e70a5af1e2aff5 -Author: Caner Candan -Date: Tue Aug 31 19:26:51 2010 +0200 - - * added some useful comments in eoLogger class - -commit 20a4496b839d293ab01546a22763b273e0992c47 -Author: Caner Candan -Date: Tue Aug 31 16:39:21 2010 +0200 - - fixed some warning messages while compiling - -commit f98e1385626d403566a61f107362bb3f64c2df6c -Author: Caner Candan -Date: Tue Aug 31 16:35:50 2010 +0200 - - + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached - -commit 52d4107bc420c151c1233c36c681fc2505756613 -Author: Caner Candan -Date: Tue Aug 31 16:34:03 2010 +0200 - - + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached - -commit b790bbc35bd2adf426a86f8acbd28a06ba9713f0 -Author: Caner Candan -Date: Tue Aug 31 16:32:19 2010 +0200 - - + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached - -commit 698c692a63b2867aae37bea0e0cc564f099f1bf4 -Author: Caner Candan -Date: Tue Aug 31 16:31:39 2010 +0200 - - + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached - -commit 1619b2b38cfb508b88c2299e74e235fb5e192b00 -Author: Caner Candan -Date: Tue Aug 31 15:53:32 2010 +0200 - - * eoRNG.h: added double uniform(double min, double max) - -commit e42a1dae74433bdc2fe64875cccb87f5b44edec3 -Author: Caner Candan -Date: Tue Aug 31 14:56:11 2010 +0200 - - * eoFitContinue: using of _pop.best_element().fitness() instead of pop.nth_element_fitness(0) - -commit 12a631cfb188b5662c7010cad049397b8d07b701 -Author: Caner Candan -Date: Tue Aug 31 14:54:42 2010 +0200 - - removed a wrong logging message from eoEvalContinue.h - -commit 2b3db39aff1fef32c687fedefc858f76cd7b5c98 -Author: Caner Candan -Date: Tue Aug 31 14:52:08 2010 +0200 - - repared some compile warning messages - -commit 1b3172a40c07b6c7411cbed859524b975ae4c9dd -Author: Caner Candan -Date: Tue Aug 31 14:15:54 2010 +0200 - - updated doxygen config file to the version 1.6.x - -commit ce8f5f692fef83e44e6dbd9574c0a90019187d07 -Author: Caner Candan -Date: Tue Aug 31 14:10:13 2010 +0200 - - * fixed some warning issues during compilation - -commit 27d5cbbc3ba202e69ef7ab6a53d97adadb5d9a30 -Author: Caner Candan -Date: Tue Aug 31 14:06:34 2010 +0200 - - updated doc/CMakeLists.txt in order to add docs in packages - -commit 364877cc23439496cf00f6297df2f245e6fb0b46 -Author: Caner Candan -Date: Tue Aug 31 14:04:25 2010 +0200 - - removed useless eo.cfg, this is generated automaticaly by cmake with the file eo.cfg.cmake - -commit 23dc5dfed8d16da278a6c630730e47bd945d179d -Merge: 248d12d 2fdc24a -Author: Johann Dreo -Date: Tue Aug 31 10:22:46 2010 +0200 - - Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev - -commit 248d12d2f480a0f2f82e0f33e3823d659f359a66 -Author: Johann Dreo -Date: Mon Aug 30 22:50:59 2010 +0200 - - add eoDualFitness.h to the list of headers - -commit 528893cba96b161a76deaf325810ebf53204399f -Author: Johann Dreo -Date: Mon Aug 30 22:50:34 2010 +0200 - - bugfix: typo on _this_ - -commit ce0c96967123e7910be816c5c85f0223b23854f7 -Author: Johann Dreo -Date: Mon Aug 30 22:46:55 2010 +0200 - - update of the license headers, LGPL version 2 only for those new files - -commit e184e9dd966f713c1f7dfd068afc3cd75855020c -Author: Johann Dreo -Date: Mon Aug 30 22:46:37 2010 +0200 - - add a xdebug level & update of the license headers, LGPL version 2 only for this new file - -commit 03978e9ead16def2ee37af70adbabacac6ef2bfa -Author: Johann Dreo -Date: Mon Aug 30 22:44:18 2010 +0200 - - no ; at the end of the line - -commit eb79ec2b6c20b860d844c15e0c51082ddeb3550d -Author: Johann Dreo -Date: Mon Aug 30 22:43:50 2010 +0200 - - New class: A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. - -commit ee6d52ec812ebe6c2c51819f3db80d98b2509c7d -Author: Johann Dreo -Date: Mon Aug 30 22:42:42 2010 +0200 - - no ; at the end of the line - -commit 2fdc24a29a37de13bd8b56387c09744aefeac368 -Author: nojhan -Date: Sat Aug 28 12:30:37 2010 +0200 - - openhatch button, supposed to facilitate the involvement of new contributors - -commit 113d2ac145b8202bdcadecc21518c7aefcdc9bfa -Author: nojhan -Date: Thu Aug 19 22:04:01 2010 +0200 - - more sections to jump to - -commit 52eeae0f5b163476a248d22d738e50c42d1f7b52 -Author: nojhan -Date: Thu Aug 19 21:45:19 2010 +0200 - - correct links to sourceforge features - -commit 82c873fc1a32f74f30488466def189026630b180 -Author: nojhan -Date: Thu Aug 19 20:38:19 2010 +0200 - - bugfix #2054922: using base_const_iterator::node; - -commit bb5b1965c75cd633e0a94d50169ecd23c5d1ed06 -Author: Caner CANDAN -Date: Wed Aug 18 17:30:11 2010 +0200 - - * eoDetSelect: when the call of howmany() returns 0 it is replaced by 1 - -commit 8e858e8fff373c5635758de7a61395157d5c673e -Author: Caner CANDAN -Date: Wed Aug 18 17:18:36 2010 +0200 - - fixed a warning issue at the file eoRealBounds.cpp - -commit 7159f8e5c43166269e34bd551c0c6ca1c9a40b24 -Author: Caner CANDAN -Date: Wed Aug 18 17:06:16 2010 +0200 - - + cpack configuration in order to generate packaging files, to make it easier use the script package_deb and package_rpm - -commit 9632d429dc6a48e5bef597060cba1b71f192584f -Merge: 0a37f66 6ec3fc5 -Author: Caner CANDAN -Date: Wed Aug 18 12:16:13 2010 +0200 - - Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev - -commit 6ec3fc5c09a275b8fa92a8485524f68106309f9a -Author: Johann Dreo -Date: Tue Aug 17 15:11:18 2010 +0200 - - correct headers ; class comment - -commit 8896fec32152a6b22a87b4ac8038bcfd0f36e150 -Author: Johann Dreo -Date: Tue Aug 17 15:07:17 2010 +0200 - - improved explanations - -commit 4ba3f62a3a5ed032ae0519ac75af7d3e38f1e0f7 -Author: Johann Dreo -Date: Tue Aug 17 15:02:39 2010 +0200 - - missing header ; correct copyright ; correct emails - -commit d698065579e2410d2f62b2fbbc13442edc918d90 -Author: Johann Dreo -Date: Tue Aug 17 14:59:24 2010 +0200 - - translate variable from french to english - -commit ce99bb02f1f6624d650ff103349f64ffed279c53 -Author: Johann Dreo -Date: Tue Aug 17 14:56:33 2010 +0200 - - use eo::log ; warning when returns 0 - -commit 0a37f66ef0f22ee5232cac9f5b2830fa580fb7db -Merge: 9f4c073 68a03aa -Author: Caner CANDAN -Date: Wed Aug 4 14:10:57 2010 +0200 - - Merge branch 'yaml_load_and_save' of ssh://localhost:9001/gitroot/eodev/eodev - -commit 1ecf4d3def049e8496b7d8f8382a165a7b7f931e -Author: Caner CANDAN -Date: Wed Aug 4 13:47:51 2010 +0200 - - + feature eoSIGContinue: Continuator can catch user signals + feature eoLogger: flexible logging system for eo - -commit 9f4c073678ab98462055d8b9e8b2324c9b41822d -Author: Johann Dreo -Date: Mon Aug 2 17:07:32 2010 +0200 - - code to display only once the message about the help parameter + some indent fix + some more comments - -commit 1d1046d19f22bab1cdd9398bf9679d464cdfd91f -Author: nojhan -Date: Sun Aug 1 22:27:31 2010 +0200 - - list of some publications - -commit 82e7d3c04116f070c6b6d400d765e720852f0359 -Author: nojhan -Date: Sun Aug 1 10:55:38 2010 +0200 - - example diagrams now close to features list, with a better legend - -commit 9a5871cce26722098306198849d037c1b2ade800 -Author: nojhan -Date: Sat Jul 31 23:00:10 2010 +0200 - - better layout for the menu - -commit 6c4bdcff461d4f69ed6afd4a965df42385d62a1e -Author: nojhan -Date: Sat Jul 31 22:48:49 2010 +0200 - - correct layout in 1024, better spacing for greater resolutions - -commit f531247627fcb372a0b4ce96b6af62072838d771 -Author: nojhan -Date: Sat Jul 31 22:40:04 2010 +0200 - - 'jump to section' links and back links - -commit a9c4805ebd6abd7e62724f34e4415494313cc2c0 -Author: nojhan -Date: Sat Jul 31 22:14:09 2010 +0200 - - logo icon for sourceforge, without text, 48px - -commit 535b26b903abf89ce466ef675686475e6b3505a0 -Author: nojhan -Date: Sat Jul 31 22:06:27 2010 +0200 - - slides via slideshare, better section order, small design changes - -commit eee9b46c0bd4f7976ee10a5149dec86544265987 -Author: nojhan -Date: Sat Jul 31 18:59:12 2010 +0200 - - website sources - -commit d3fc6438c0e6016cee1af61ea2890c5ecdfb51df -Author: nojhan -Date: Thu Jul 29 14:28:05 2010 +0200 - - no more CVSROOT - -commit ed35ed4da09b37ea13859a609e0c78d7bcf3d9e4 -Author: paradiseo -Date: Tue Jun 22 09:31:58 2010 +0000 - - Store a result in a variable to have no warning - -commit 0695b25c08782bb1cd435ef7ecc6a22a3c6f37d6 -Author: paradiseo -Date: Thu Jun 10 10:03:26 2010 +0000 - - Add "Visual Studio 10" in config file for CMake - -commit 68a03aa429b6fecf26e1d1942f11cefe62a01455 -Author: stevemadere -Date: Fri May 7 03:17:44 2010 +0000 - - changed YAML saving technique to YAML::Serializable - -commit e58ef45f70f76d1ef0fcdb33d756760ffebfa82c -Author: stevemadere -Date: Thu May 6 22:46:10 2010 +0000 - - added support to save app/gprop/mlp as YAML - -commit f8bd8605794dbbd25463f93613443d085d939864 -Author: stevemadere -Date: Tue May 4 17:18:12 2010 +0000 - - configure changes to prepare for use of libyaml-cpp - -commit 7f81c03af4249a6251c49282f1e9b558aa5b711b -Author: (EO team) <(EO team)> -Date: Tue May 4 13:00:51 2010 +0000 - - This commit was manufactured by cvs2svn to create branch - 'yaml_load_and_save'. - -commit abc65a390a67d1ef603534a0005a2dcbd8d002e4 -Author: stevemadere -Date: Tue May 4 13:00:50 2010 +0000 - - Reflecting build process changes in doc and source tree (now using autogen.sh;./configure) - -commit 8214fe3f5e94e4dd8defb9078f606d3ba5455100 -Author: stevemadere -Date: Tue May 4 12:56:54 2010 +0000 - - Added includes necessary to compile using gcc 4.4 - -commit dfad82c0431cf53846436ca51c07aae09d226aba -Author: stevemadere -Date: Tue May 4 12:54:36 2010 +0000 - - Removed references to eliminated headers eoDummyFlight.h, eoLSPSO.h, eoSSPSO.h - -commit 227e7fd2e5df41ddf361c8d08ac4eaa0770f535e -Author: stevemadere -Date: Tue May 4 12:50:29 2010 +0000 - - Removed reference to Lesson6 until its makefile is fixed - -commit 8c07ca4cc5329cbf4376a1ceb9f0f53035fcdb02 -Author: paradiseo -Date: Thu Mar 18 12:44:45 2010 +0000 - - add an include - -commit a2703a8eabd8284107bfbfc016a70bce33ef3850 -Author: paradiseo -Date: Wed Dec 9 15:49:30 2009 +0000 - - No real change -> test commit - -commit d46117cda1348ad4ba3544bca457e13ef8d3bc4c -Author: paradiseo -Date: Thu Jun 25 14:49:53 2009 +0000 - - Accept long time - -commit 45ce5f84043eba5327ab3cfd2401ec9c23cf0dc7 -Author: paradiseo -Date: Tue Jan 27 16:30:18 2009 +0000 - - little change to delete warnings - -commit b20c5e98c148fb3ac2398d0690e758e1985ed512 -Author: paradiseo -Date: Tue Jan 27 16:28:55 2009 +0000 - - little modif to delete warning - -commit eca555a7a315b528f9ce89333b5f494da2ad458c -Author: paradiseo -Date: Tue Jan 27 16:26:44 2009 +0000 - - little change to delete warning - -commit 6563aa6e7aa99e8f0fb71755cebacf83eb3eda58 -Author: paradiseo -Date: Tue Jan 27 16:21:53 2009 +0000 - - little modif to delete warning - -commit bda9e1c712ff1444996b31e5ff92864ad9d458f4 -Author: paradiseo -Date: Mon Jan 26 14:39:37 2009 +0000 - - Change Compiler flags - -commit cfd7f2b008363f1f15b43c3cf7b9e45f188d6878 -Author: paradiseo -Date: Mon Jan 26 13:43:40 2009 +0000 - - disable warning C4530 (Visual Studio) - -commit 072979a705b152f13b1a7c73a224596230e0009a -Author: paradiseo -Date: Mon Jan 26 13:38:01 2009 +0000 - - option added to disable warning (mode release with Visual Studio) - -commit 7fc04f1de76217f43121387854c64a07294c79e6 -Author: paradiseo -Date: Mon Jan 26 09:07:59 2009 +0000 - - cmake < 2.6 authorized - -commit 37c3989ee902f0cb78261d8b36a1c9f49fe18804 -Author: paradiseo -Date: Thu Jan 22 10:18:10 2009 +0000 - - test on PSO changed. - -commit 1204ce35b7af1101ee221c58500197a9d5dd8098 -Author: paradiseo -Date: Fri Jan 16 14:29:42 2009 +0000 - - modif cmake - -commit 080f98bffafc29df4daa78ac343e2ac8978b943b -Author: paradiseo -Date: Wed Jan 14 14:50:46 2009 +0000 - - Cmake configuration modified - -commit f2d19ce1878326343a641e748f1cb5257d506da8 -Author: paradiseo -Date: Mon Jan 12 09:14:02 2009 +0000 - - Update to cmake2.6 + modif to support compatibility with icc - -commit 893204f8f1293644092ff1541ac2234af0faa44d -Author: evomarc -Date: Thu Dec 25 16:01:57 2008 +0000 - - Fixing a small glitch that was giving wrong clues to newcomers ... - Thanks to Christophe-Marie Duquesne for the post - -commit 8c40a38cdc672175839c90f3132ba935bafd4d56 -Author: paradiseo -Date: Fri Dec 5 13:55:41 2008 +0000 - - add "=0;" at the end of two virtual method - -commit 916152b02ef1373e1a7517b473731a1bfc96b25b -Author: paradiseo -Date: Thu Nov 20 16:35:47 2008 +0000 - - remove DartConfig - -commit 48204d18ff68108472ddd4d7f4544c0663abe562 -Author: paradiseo -Date: Mon Nov 17 10:27:55 2008 +0000 - - Switch from Dart to Dash. - -commit 462d3ac5683c818ae92a16df1e5a7ab79a26a972 -Author: jeggermo -Date: Tue Nov 11 09:51:17 2008 +0000 - - fixed some very old and stupid problems - -commit 512c18b0d06c3ec1c972016ee13df89dfc7d77cf -Author: jeggermo -Date: Tue Nov 11 09:50:52 2008 +0000 - - fixed some stupid problems - -commit 74c5be143994aa239169d0f5bc317cfe44793753 -Author: maartenkeijzer -Date: Mon May 5 12:33:26 2008 +0000 - - updated configure.in to generate moo files - -commit aa33f98459d05f8bbb829948fc54524ab112afee -Author: tlegrand -Date: Fri Apr 18 12:00:15 2008 +0000 - - deleted "win" directory in the autotools config - -commit a93ed43907db7426d72318bdca73f0096a606eed -Author: tlegrand -Date: Fri Apr 18 08:59:02 2008 +0000 - - added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities - -commit a1ee120589c7df7270a42027ed4cc2af6fcd5c5e -Author: tlegrand -Date: Fri Apr 18 08:58:42 2008 +0000 - - imrproved PSO topology/velocity tests - -commit 49d3df2cc4f3683e1416c36ac68ad85bb722cb09 -Author: tlegrand -Date: Fri Apr 18 08:51:38 2008 +0000 - - updated the doc tags - -commit 78a798d169fad5043fb98e4648192b6163f0e638 -Author: tlegrand -Date: Fri Apr 18 08:50:22 2008 +0000 - - added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities - -commit aaa8df129b222063eb2891effb6e9a6271ffd9ee -Author: tlegrand -Date: Fri Apr 18 08:19:22 2008 +0000 - - updated a few things about paradiseo (links, docs) - -commit 9d3da02ea95cc7237e5a52cfcd96a03010d02c27 -Author: tlegrand -Date: Fri Apr 18 07:58:17 2008 +0000 - - deleted old and obsolete paradiseo's pdf slides - -commit 4b844243cebb20dc68a26f9f00cfd3588fa45267 -Author: paradiseo -Date: Thu Apr 17 14:31:11 2008 +0000 - - new implementation of the test - -commit b2404c9daa6a3fe1715130a88c657300db47f115 -Author: paradiseo -Date: Thu Apr 17 14:29:57 2008 +0000 - - Add t-eoOrderXover in the test list - -commit 08d4b90578e29b8df21fa2e9fc2c918eef981232 -Author: paradiseo -Date: Thu Apr 17 14:29:10 2008 +0000 - - test of eoOrderXover - -commit 7a7340f9ad3e224dd88c6af3991123414edea884 -Author: paradiseo -Date: Thu Apr 17 14:26:59 2008 +0000 - - new crossover dedicated to permutation-based representation - -commit 86cda0d3b6d8f01c149b4aaefd3ad49c5a96dfca -Author: kuepper -Date: Mon Mar 31 19:12:12 2008 +0000 - - start preparation for 1.1 release - -commit 0388f957581593bc98488ada6cea60b733a8cfda -Author: kuepper -Date: Mon Mar 31 19:11:13 2008 +0000 - - Update for gcc-4.3 compatibility - -commit 1187a83c8235957094674b25c7d65afcf6593a75 -Author: kuepper -Date: Mon Mar 31 13:35:41 2008 +0000 - - Add climits header as required for gcc-4.3 when using UINT_MAX - -commit fb6201a1449f90816abcf8153d4d28a216eac88b -Author: ldacosta -Date: Mon Mar 31 12:53:51 2008 +0000 - - make_continue... just a little formatting - -commit fac8fc0742f4547220a8f3de9bc39c064a2954aa -Author: ldacosta -Date: Fri Mar 28 16:24:17 2008 +0000 - - Output functor is needed if there is screen output OR FILE OUTPUT - until now, it was only created and stored in the screen output was activated. Line 120 of make_checkpoint.h - -commit 64fb5d2c4510ed560d7b1af90ddd5bd51734e04d -Author: ldacosta -Date: Fri Mar 28 16:09:40 2008 +0000 - - Change in do_make_checkpoint: it receives not just a parameter from the evaluation function, not the function itself!! - -commit af8cd4b08bcb7b13201ac054627e3313120bb393 -Author: ldacosta -Date: Fri Mar 28 15:57:55 2008 +0000 - - Adjusting configuration for Eclipse - -commit 8c1726ef9715f2055346416e353bcde8e8f04809 -Author: ldacosta -Date: Fri Mar 28 15:51:48 2008 +0000 - - do_make_algo_scalar is extended: now it accepts also an evaluation of the fitness of the population as parameter. - -commit c86d07fed3f625f8d6e688e18c8ae79ed974115e -Author: ldacosta -Date: Fri Mar 28 13:49:14 2008 +0000 - - "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names - -commit 3e17a2dd67ceae010ab5a9136518d5abefd353c4 -Author: ldacosta -Date: Fri Mar 28 13:49:13 2008 +0000 - - "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names - -commit aee8aa452f5d053f4dcb8ebcc5c0ea4351197a02 -Author: tlegrand -Date: Thu Mar 20 15:48:31 2008 +0000 - - come back to dart.irisa.fr ! - -commit 52d9a1fed95675b9e7973aba2855f76c870d3201 -Author: tlegrand -Date: Thu Mar 20 08:43:44 2008 +0000 - - added minimal test config - -commit 860040ae53f506af63b0d881d44d99352e6b9f4e -Author: ldacosta -Date: Thu Mar 13 16:28:34 2008 +0000 - - "Tutorial" (with capital T) was interfering with the checkout of eo on Eclipse (because there is already one "tutorial", with "t"). This is just a renaming of "Tutorial". - -commit 575660e9034377e0c9e703f5c065bf1e55ed727a -Author: tlegrand -Date: Wed Mar 12 15:36:58 2008 +0000 - - replaced ParadisEO links - -commit 9c62897d10336f61c3bf40f43bc7e7ba9dc4b285 -Author: tlegrand -Date: Wed Mar 12 15:29:29 2008 +0000 - - replaced ParadisEO links - -commit b3c99998a36248e97c2777f40b170c76e68efed3 -Author: tlegrand -Date: Wed Mar 12 15:23:35 2008 +0000 - - added lesson6 - -commit 50c6c59bc3efd2673cba40d2f528a9e2d700eb07 -Author: tlegrand -Date: Wed Mar 12 14:59:03 2008 +0000 - - added lesson 6 subdir - -commit ad5e398ff39a47a5369b15cb39118dd0ceb9021b -Author: tlegrand -Date: Tue Mar 11 13:16:35 2008 +0000 - - changed dart server - -commit 137cb9d28afbcfb0a608e2cd13bcfff9383a6c69 -Author: tlegrand -Date: Mon Mar 10 14:27:19 2008 +0000 - - added coverage flags + visual studio 9 specific flags - -commit b6b5742369957c85ef1824431ecff8eb20c0132d -Author: tlegrand -Date: Thu Mar 6 17:05:16 2008 +0000 - - deleted CMAKE_BUILD_TYPE tags and management - -commit f532a3f109b241744f3bb2cbecdf1acf80646aa5 -Author: tlegrand -Date: Wed Mar 5 09:41:24 2008 +0000 - - deleted old customized LL/SS PSO algorithms - -commit edc049f8044df51ee297f6cf958dca5786fcbaed -Author: tlegrand -Date: Wed Mar 5 09:06:50 2008 +0000 - - added lesson6 subdir - -commit 4ad79a91487d784dda89198bf8b03b4ced59c705 -Author: tlegrand -Date: Tue Mar 4 14:01:29 2008 +0000 - - Added new lesson (6) dedicated to the PSO. Also changed a few things into the PSO-dedicated components (constructors) - -commit 4834adbe5f03e5f324b750f1f869e2f1bf9b09e0 -Author: tlegrand -Date: Tue Feb 26 14:53:32 2008 +0000 - - corrected bad index error when uniform()=0 in roulette_wheel. The error was: if fortune=0, we first have "int i=0", then "return --i" . - -commit 28abc86db7a530a5664eec27c9ca43b8d50428d0 -Author: tlegrand -Date: Wed Feb 20 10:07:49 2008 +0000 - - changed nightly start time : EDT -> WEST - -commit 82eb5028936c410ba5435120f7bd1f8b370fe8b1 -Author: kuepper -Date: Mon Feb 18 20:14:47 2008 +0000 - - fix SF doc-generation, - remove absolute paths - -commit b08b22f172f67f73a47a9e9696c9074e9261883c -Author: tlegrand -Date: Mon Feb 18 15:08:08 2008 +0000 - - added nighlty start date for Dart config - -commit 4818863cd09ad8dfbc54ebe5db0356359aba5e9e -Author: tlegrand -Date: Mon Feb 18 14:43:09 2008 +0000 - - set new gcc warning flags -Wall & -Wextra (deleted the others) - -commit 596d24511adabc8cab226f7acf8f694c88262ab9 -Author: tlegrand -Date: Fri Feb 15 13:10:06 2008 +0000 - - Replaced "_isOneIndexed" boolean by an unsigned "_startFrom" - -commit 259dad2820d0585ee11fe21442301b16774be550 -Author: tlegrand -Date: Fri Feb 15 12:50:58 2008 +0000 - - Completed eoInitPermutation: CTor now has a "isOneIndexed" parameter to assign 1..Indi_size as genotype values instead of 0..Indi_size - -commit 25719d800cadbf73f8f5243ec93ac048b923ec60 -Author: tlegrand -Date: Thu Feb 14 09:08:42 2008 +0000 - - added "IF(ENABLE_CMAKE_TESTING)" to add test only if they have been enabled - -commit 60e8d2bc0f729e77057a668ab93e0dc997b11dea -Author: tlegrand -Date: Thu Feb 14 08:39:41 2008 +0000 - - Added DartConfig for Dart reporting. By default CTest will submit to dart.irisa.fr (project ParadisEO). - -commit af0f4fdd4269eca09dc6144c83f794ec54644bd1 -Author: tlegrand -Date: Thu Feb 14 08:28:47 2008 +0000 - - Added cl compiler flags + new DartConfig - -commit fba67414df3009b0ace322d3e170881b96442fa3 -Author: tlegrand -Date: Thu Feb 14 08:23:48 2008 +0000 - - set warning flags to OFF - -commit 1613342bcf902ce9e6168c5cb42eedbe40e550b3 -Author: tlegrand -Date: Thu Feb 14 08:23:16 2008 +0000 - - deleted cxx flags for cl compiler. They have been moved to the CMakeLists.txt at the top level - -commit 2273573e04e193f82d6df3b3cab17a90cc3a1f6e -Author: paradiseo -Date: Thu Jan 24 08:35:11 2008 +0000 - - Addition of a method sort for PSO - -commit ef8bc7b03f5b69818d0e2e021e343c588218e7ee -Author: paradiseo -Date: Fri Jan 18 09:49:16 2008 +0000 - - Modification of cotinuator.h - -commit d7682cae19b994cc9f2b455a92c199091113483b -Author: tlegrand -Date: Thu Jan 17 13:08:21 2008 +0000 - - added generic continuator for tests. just an "continuator" class extended by eoContinue. No impact for the rest. - -commit de5e71eb551873fac7907ef94b0047aabd59d064 -Author: tlegrand -Date: Wed Jan 16 08:30:38 2008 +0000 - - removed bad semicolon at the end of a "{}" bloc which is not a class/template/struct. - Debugged using g++ flags - -commit 012c71e8fbb0292bef25061e11dd8a72b8dbf0ae -Author: tlegrand -Date: Wed Jan 16 08:14:18 2008 +0000 - - corrected contructor parameter names. All tests OK - -commit e8883486f6102b7de41f063caefd869930834b8a -Author: tlegrand -Date: Tue Jan 15 13:57:32 2008 +0000 - - renamed "globalBest" parameter in "globalBest" function ... - -commit 5cbbe83a0effae8e3576ebe14ea6b1d8cebc4a05 -Author: tlegrand -Date: Tue Jan 15 13:53:18 2008 +0000 - - removed bad semicolon at the end of a "{}" bloc which is not a class/template. - Debugged using g++ flags (see CMakeLists.txt at the root) - -commit f3e1e35ea36a6ca9099947a7f67c5f0748866b43 -Author: tlegrand -Date: Tue Jan 8 15:34:43 2008 +0000 - - corrected weight factor and updated doc - -commit ef252cf7de046c5d47b0ede07f12b3d46fe055e4 -Author: tlegrand -Date: Tue Jan 8 15:13:32 2008 +0000 - - corrected PSO dummy errors and completed documentation - -commit 4b99bc8bc957f8b242672971f34c53d66ecb876d -Author: tlegrand -Date: Tue Jan 8 14:50:13 2008 +0000 - - corrected PSO dummy errors and completed documentation - -commit b8da2db21fbe849118508526fe3180c63f923175 -Author: evomarc -Date: Sat Dec 8 15:05:51 2007 +0000 - - Added the GDB trick to visualize the components of a vector - (but it still doesn't work with EO objects, though???) - -commit f2b98abd906f36611a1b017d275bce222fbe81e8 -Author: evomarc -Date: Sat Dec 8 14:49:52 2007 +0000 - - 3 identical typos in 3 different files :-) - -commit 465874cb0bc2524783de68b8c23c6c3a8215d10b -Author: tlegrand -Date: Mon Nov 26 08:00:25 2007 +0000 - - Warning: A '_WINDOWS' definition is added to compile four Unix-dedicated files (eoCtrlCContinue.h,eoCtrlCContinue.cpp, pipecom.h, pipecom.cpp). The same definition should be added in the automake configuration file to ensure the compatibility. - -commit 5ee50170b0b7dd726cc9ab49ba20ad60777e0972 -Author: tlegrand -Date: Mon Nov 26 07:56:08 2007 +0000 - - added definition _WINDOWS for (mingw and others) compatibility - -commit 18adaef0568f3ff99f1c452eef389843b85c3fa4 -Author: maartenkeijzer -Date: Mon Nov 12 16:23:57 2007 +0000 - - Updated makefiles, updated the moo stuff and cleaned up some stuff that refused to compile - -commit ffb683368f299d09da928898e45db56631d9993b -Author: tlegrand -Date: Mon Nov 12 15:48:56 2007 +0000 - - indented file - -commit 7ffea6f818d954a27c6687ed47f6e152d84b6191 -Author: tlegrand -Date: Mon Nov 12 15:46:42 2007 +0000 - - completed with pso new components - -commit 942f5214e0c0f80467e8c6653e2813c0df463378 -Author: tlegrand -Date: Mon Nov 12 15:45:27 2007 +0000 - - completed pso topologies+velocities - -commit 0280487348d2de94c069f01ffa7488f70ef0b0a3 -Author: tlegrand -Date: Mon Nov 12 15:43:43 2007 +0000 - - added pso initializer+ integerVelocity - -commit 2767fadf90396599c25bc1f28d2c6c2cf707a0d3 -Author: tlegrand -Date: Mon Nov 12 15:41:46 2007 +0000 - - added permutation init - -commit ec112ae2f271db9299713ffca86b37059298a6a9 -Author: tlegrand -Date: Mon Nov 12 15:41:09 2007 +0000 - - added permut components - -commit 0aa67ac17b04ecf0e98ee707845e9fcf43ebd709 -Author: tlegrand -Date: Thu Oct 11 14:14:10 2007 +0000 - - added test for permutation components - -commit 141ccae1dd2a3956e293ed0f5ba93e552281622f -Author: tlegrand -Date: Thu Oct 11 14:10:27 2007 +0000 - - added generic parameter for sigmoid function - -commit b17888d0b4b8a62b22c6ef32733921b553b4cddc -Author: tlegrand -Date: Thu Oct 11 14:08:41 2007 +0000 - - added new tests - -commit 9174a37355fc7b48d6ee3266b9b4ea763a138b82 -Author: tlegrand -Date: Thu Oct 11 14:08:06 2007 +0000 - - added PSO ring topology test - -commit 9ff1e99715b483c9a1f902a9c11c10e09e87b3ba -Author: tlegrand -Date: Thu Oct 11 14:03:18 2007 +0000 - - added PSO ring topology - -commit 65907b622241147e9462480b16cb6027499b3a4e -Author: tlegrand -Date: Mon Oct 8 15:33:46 2007 +0000 - - *** empty log message *** - -commit c864f2deb543afbdf7c82fdd921b77fc944b2829 -Author: tlegrand -Date: Mon Oct 8 15:22:25 2007 +0000 - - added best position updating + printOn - -commit 7d89f5a97c2f8862e8fc36cfa121ef3442d2b2ac -Author: tlegrand -Date: Thu Oct 4 15:10:11 2007 +0000 - - added autoconf > 2.6 compatibility - -commit f5789db336f78e76f1bd21ba9f288ecbc5f9bc87 -Author: kuepper -Date: Tue Sep 25 21:29:31 2007 +0000 - - add coding cookies for Emacs and vim - -commit 3f5d0df3ee368eb1627d0db077b0d7e6e659b2b3 -Author: maartenkeijzer -Date: Sun Sep 23 08:37:09 2007 +0000 - - added patched tcc source tree - -commit 40f5377cf14418f4b6157efc3b1fd2e676e5c6cd -Author: maartenkeijzer -Date: Sun Sep 23 08:35:51 2007 +0000 - - updated include dependencies - -commit 6b0cfffe09bea60967d0de57ecbbcab19c69bf16 -Author: tlegrand -Date: Wed Sep 19 11:45:19 2007 +0000 - - Added #ifdef HAVE_GNUPLOT for Windows compatibility - -commit b1220d189b6a97dd68afa601606486bf978366f1 -Author: tlegrand -Date: Wed Sep 19 11:44:39 2007 +0000 - - Added eoNSGA_II classes in eomoo lib - -commit 1063826d14702f9b1efe9347ca5733a61b8549c0 -Author: tlegrand -Date: Wed Sep 19 11:41:08 2007 +0000 - - Forget gprop application under Visual Studio - -commit 1990bffd2b29b216dafe88d1cd646e57face521a -Author: tlegrand -Date: Wed Sep 19 11:40:31 2007 +0000 - - Several fixes - -commit 5b734537f6040450fe4f565a0cb9e75aea47247b -Author: tlegrand -Date: Wed Sep 19 11:32:47 2007 +0000 - - Added basic CMake file - -commit c28be053cc02ef8719e1e51624a9a5c42a423207 -Author: tlegrand -Date: Tue Sep 18 15:40:31 2007 +0000 - - Avoid EONSGA in the lib (errors with Windows/MVS) - -commit 112b34bceb73710d239429f64d294ee8a06060fb -Author: tlegrand -Date: Tue Sep 18 15:12:22 2007 +0000 - - Completed CMake config - -commit 45dff2e35f3fef3f199968578b8d9a215463bf57 -Author: tlegrand -Date: Fri Sep 14 14:47:15 2007 +0000 - - Corrected missing eo.doxytag - -commit 0e264b575b6ede952032c15353b7550c82dd5716 -Author: tlegrand -Date: Thu Sep 13 15:13:15 2007 +0000 - - removed --force-missing option for Automake: incompatible with the latest versions - -commit 292f9cfd2acb96d7cdce1837d768af53e1195f7c -Author: tlegrand -Date: Thu Sep 13 13:36:13 2007 +0000 - - Added cmake support, deleted Autoconf/Automake stuff and made an easy-to-use process - -commit 04fcf88b4ca1540a68c59eae22279c0e661c1057 -Author: tlegrand -Date: Tue Sep 11 14:20:16 2007 +0000 - - Changed file format (to avoid Visual Studio errors): MAC --> DOS - -commit e5cd9cb3799de249e3eb4d762813c50701ac5c14 -Author: tlegrand -Date: Tue Sep 11 13:59:49 2007 +0000 - - Added HAVE_GNUPLOT checking - -commit 36c14fed9e196c5a15c5b7d84f8b46caa58bc14c -Author: maartenkeijzer -Date: Mon Sep 10 10:30:53 2007 +0000 - - Various changes and optimizations - -commit 373c26caba0a3d4523b8db590f03ba98748f86cb -Author: maartenkeijzer -Date: Thu Sep 6 08:15:22 2007 +0000 - - Woops, used the wrong sort here - -commit 2b303560fa7d50923c326f09fb625806c14a4653 -Author: maartenkeijzer -Date: Wed Sep 5 13:52:17 2007 +0000 - - added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc - -commit cb85c1925990581183a0767ec8de060faf627af9 -Author: maartenkeijzer -Date: Wed Sep 5 11:36:44 2007 +0000 - - added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc - -commit d78387591b96262227f8aec9249d9614b184883a -Author: maartenkeijzer -Date: Tue Sep 4 15:30:42 2007 +0000 - - added eoEpsMOEA support - -commit 29816fc1974380edc5a30dc08702650e16a0887e -Author: maartenkeijzer -Date: Tue Sep 4 15:26:45 2007 +0000 - - added epsilon moea - -commit 1be65a94ade6bb9790a7cd42e6656d2d525cdd69 -Author: maartenkeijzer -Date: Tue Sep 4 13:44:41 2007 +0000 - - made fitness() query return const reference - -commit fe9fe17eb61dcabe85a615d11f3ad678d8b389af -Author: maartenkeijzer -Date: Tue Sep 4 13:44:02 2007 +0000 - - removed const qualifier from choice() member - -commit b2ac3d69587cc2db633ab56b73f1423d75750849 -Author: maartenkeijzer -Date: Tue Sep 4 07:50:31 2007 +0000 - - Added member to get to the embedded fitness object - -commit 98f763466a6f12797005a203e695c02ee405ded0 -Author: maartenkeijzer -Date: Tue Sep 4 07:47:46 2007 +0000 - - Added reinitialization of fitness when fitness is invalidated. Needed this to clear worths in multi-objective case - -commit f93327a041ce43a9ddbc71ca8408e7b908383d5b -Author: maartenkeijzer -Date: Mon Sep 3 14:37:27 2007 +0000 - - several fixes - -commit f2f65d7ed48e7ff87c7295805370c45f647c341b -Author: maartenkeijzer -Date: Fri Aug 31 14:12:54 2007 +0000 - - more bugfixes - -commit 220c89d1d5151f37825ee9e0024dbdcfeb056fd8 -Author: maartenkeijzer -Date: Fri Aug 31 14:03:35 2007 +0000 - - changed eoTruncate to use sort. nth_element leads to weird results in moo case - -commit 1d4cfb0da813077f419ea334892c76d34774c072 -Author: maartenkeijzer -Date: Fri Aug 31 13:45:46 2007 +0000 - - made stuff virtual - -commit a5261fec51de7b410204eadfa60dc343bb1b1cd3 -Author: maartenkeijzer -Date: Fri Aug 31 13:27:40 2007 +0000 - - Refactoring - -commit 7e76e6e9c20cca25d01cb48756005083669761f8 -Author: maartenkeijzer -Date: Fri Aug 31 13:26:41 2007 +0000 - - updated nsga - -commit b11638cd5440914887713b552b1af285e5d7b25b -Author: maartenkeijzer -Date: Fri Aug 31 12:59:18 2007 +0000 - - refactoring - -commit ec2eaae4ce33c66471f88ed193e5fcc12138bc3c -Author: maartenkeijzer -Date: Fri Aug 31 11:19:26 2007 +0000 - - hmm not a good idea to replace with dummy - -commit 879da6b82e2e448b35e7cff405b1e3cd610d4ef1 -Author: maartenkeijzer -Date: Fri Aug 31 11:08:25 2007 +0000 - - update needed for multi-objective approach - -commit bc1207edb86d1c58d1ec103968e46776380bc27f -Author: maartenkeijzer -Date: Fri Aug 31 11:05:59 2007 +0000 - - updated comments - -commit 553586d55f23625bdfc75b52012b001c0b4ba021 -Author: maartenkeijzer -Date: Fri Aug 31 10:57:05 2007 +0000 - - added new multi-objective support - -commit 283026ed5cc336f9b7aa67295cdc75210cdb1030 -Author: maartenkeijzer -Date: Fri Aug 31 06:47:39 2007 +0000 - - fixed bug in NSGA-II, only niching on last objective - -commit 5f9b1a9bfd2f588ef6d5529e79d93257bad06407 -Author: maartenkeijzer -Date: Thu Aug 30 22:30:52 2007 +0000 - - fixed bug in NSGA-II, only niching on last objective - -commit 28e59ff06458a72d2cc276fc0d072547da5cca5e -Author: kuepper -Date: Wed Aug 22 07:30:47 2007 +0000 - - eoRNG.h (eoRng::random): Add comment on truncation as standard way of - floating point to integer conversion. - -commit 4c89acad7267a19c2724e22349109a96aff67830 -Author: kuepper -Date: Tue Aug 21 14:52:50 2007 +0000 - - Fix according to - [ 1663606 ] eoBitOp vector access - -commit 44fab2d8e4317f58b44fb0c1bde7978573862362 -Author: kuepper -Date: Tue Aug 21 14:50:55 2007 +0000 - - Fix wrong removalr of necessary include statement - -commit ac601df3716ff4a00442631851fa644f4d461f96 -Author: kuepper -Date: Tue Aug 21 14:47:14 2007 +0000 - - Correctly round towards zero in random(uint32_t) - -commit 797896e002b8f6204d6f5c3f7a3f61a1c6698775 -Author: kuepper -Date: Tue Aug 21 14:44:41 2007 +0000 - - Minor cleanup - -commit 2bbd2e0d8050e8bba5e546b241d9f9304c1fbce4 -Author: kuepper -Date: Tue Aug 21 13:58:53 2007 +0000 - - Fix typos - -commit ab0fd90f46d99f90579bce9e94a6291acce19319 -Author: maartenkeijzer -Date: Sat Aug 11 20:48:07 2007 +0000 - - brought gprop into 21st century - -commit 7f62a3f6f256887efd73298b4d0135a498522cd6 -Author: tlegrand -Date: Fri Aug 10 14:31:04 2007 +0000 - - added #ifdef SIGQUIT for windows compatibility - -commit 952bf0a1d8879bc5e9f9753bcf8f4f24830cd2d0 -Author: tlegrand -Date: Fri Aug 10 14:30:26 2007 +0000 - - added #define _MSC_VER_ for windows compatibility - -commit 89047a3db6b244fd2134694709a01fcbe34bc33f -Author: tlegrand -Date: Fri Aug 10 14:29:12 2007 +0000 - - added CMake configuration files - -commit fae3ee5b53d8724e6edee19acad6ce82eb172846 -Author: tlegrand -Date: Fri Aug 10 14:27:12 2007 +0000 - - added CMake configuration file - -commit 47b858df87f40d766d8a2776cc560e459712cd15 -Author: xohm -Date: Thu Aug 2 10:48:20 2007 +0000 - - Add extra functionwrapper to member 'size' - -commit a601ae0e8abc79845faa6577d662858a56ed4f03 -Author: xohm -Date: Thu Aug 2 10:47:15 2007 +0000 - - Excluded 'config.h' from windows build - -commit 1d19fdd3ecb5483abf1055270e2178f3a17a8517 -Author: xohm -Date: Thu Aug 2 10:46:07 2007 +0000 - - Add static var-declaration - -commit a6d670243d21588ada73656f306611e71e671c6d -Author: xohm -Date: Thu Aug 2 10:45:12 2007 +0000 - - Cmake multiplattform buildfile - -commit cf2310ff626a6bab543e99d5c91ecc5fa1384a55 -Author: xohm -Date: Thu Aug 2 10:15:13 2007 +0000 - - *** empty log message *** - -commit 99bb07466fc521e871ae8937038d36d26b7bc3f4 -Author: maartenkeijzer -Date: Tue Jul 17 13:03:29 2007 +0000 - - comments removed - -commit 39a6864e3da631bdabb95c74b8dc7db2b0423f3c -Author: maartenkeijzer -Date: Tue Jul 17 13:01:00 2007 +0000 - - Adding timed continuator - -commit 3adf8a19f4c0f3dfd385b8b83b525f18d5ffcb0c -Author: tlegrand -Date: Tue Jul 3 09:13:07 2007 +0000 - - added doc details to recognize particle swarm optimization - -commit 967b6b77415c2270162b455bfd8e3f817d64b1af -Author: tlegrand -Date: Mon Jul 2 13:05:14 2007 +0000 - - added t-eoEasyPSO test - -commit 12dacbe7de7b690ac54fa88431fd38d57415230f -Author: tlegrand -Date: Mon Jul 2 13:02:26 2007 +0000 - - added myself in the author list :-)) - -commit 703edd5087b6ad185a7e6311c7d3ae6ebd7f8f05 -Author: tlegrand -Date: Mon Jul 2 13:01:49 2007 +0000 - - particle-swarm-optimization includes added - -commit 860cb372b0a5d4e2eec1ea669c546cce31bbcf5b -Author: tlegrand -Date: Mon Jul 2 13:00:48 2007 +0000 - - removed unconsitent reference in "eoWeakElitistReplacement" (const EOT oldChamp) - -commit a290987e89fc4623be3407675598b292cddbaf3e -Author: tlegrand -Date: Mon Jul 2 12:59:49 2007 +0000 - - "dMatrix distMatrix(pSize*(pSize-1)/2)" replaced by "distMatrix(pSize) " - -commit bec7d02c50e06800b6ae77fc8280209f75702079 -Author: tlegrand -Date: Mon Jul 2 12:58:13 2007 +0000 - - particle-swarm-optimization main templates added - -commit a6de2b9a3a489770e1c1d7c2d24e3a585f911209 -Author: tlegrand -Date: Mon Jun 25 09:38:44 2007 +0000 - - PSO package - contains src+doc+examples and build process files - should be removed before integrating sources - -commit 742457ae3e0354831c9e8f3efe8a4d73a7d4d2e3 -Author: maartenkeijzer -Date: Tue Jun 19 17:48:16 2007 +0000 - - Re-enabled declone flag (seemed to be commented out for some reason) - -commit e930ff84ddc172ce7540f83ee4c10dc338ef0f10 -Author: jeggermo -Date: Thu May 3 14:00:50 2007 +0000 - - All debug (dll and non-dll libs) and release libs are placed in either debug or release - -commit abd3b9db593fe1aa91d58ffe6ac14a3e73b98147 -Author: jeggermo -Date: Thu May 3 13:54:27 2007 +0000 - - Added Multi-Threaded DLL projects settings for both deebug and release - -commit 8acc9dcbce155f18a8cbe7eb479249d7f3af2267 -Author: kuepper -Date: Thu Feb 22 08:27:32 2007 +0000 - - * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly - uninitialized variables. - - * README.tmpl: Hint to regular Templates/README for details. - - * README: Add documentation for adding new source-files. - - * Makefile.am.src-tmpl (noinst_HEADERS): Add - (MyStruct_SOURCES): Move header files from here to the new - noinst_HEADERS variable. - -commit 4a9c5127f8f96e7474ad8c1a745d57721a6e8b83 -Author: kuepper -Date: Tue Jan 23 22:25:57 2007 +0000 - - bump versions to 1.0.2-cvs - -commit 3107f12f30eb2f3c3f6c9a3847a986930717301b -Author: kuepper -Date: Tue Jan 23 22:23:31 2007 +0000 - - *** empty log message *** - -commit 6a4d4f6cabe4598c472fc7f76a7e4d872e10a673 -Author: kuepper -Date: Tue Jan 23 22:09:17 2007 +0000 - - updates for 1.0.1 release - -commit ba9d9f42e5fdf99afcd9980ce075908b79432778 -Author: evomarc -Date: Wed Jan 17 05:31:05 2007 +0000 - - Slightly modified the README.tmpl for more help to first-timers - -commit 5c255c805ed4594e63414faaa7255bbf37e1b7d6 -Author: kuepper -Date: Tue Jan 16 08:28:24 2007 +0000 - - Add instructions for bash. - -commit f7ce3d8b91cad80861710994f1a127f3bf1265f0 -Author: kuepper -Date: Sun Jan 14 18:56:31 2007 +0000 - - * createEOproject.sh: Set TargetDir to /tmp/. This is a workaround - for automake finding the scripts of eo itself if we run it in a embedded - subdirectory. - (COPYING, INSTALL): create. - - * README: State more explicitly what a "complete installation" means. - Give build-instructions for moved directories. - -commit ac67af6da398e244f155c6aa834a2d07366d8b2a -Author: kuepper -Date: Sun Jan 14 18:13:40 2007 +0000 - - State more explicitly what a "complete installation" means. - -commit 514a18aaf16ae6f69faf46ea4cf26a7b5cf2faa2 -Author: kuepper -Date: Fri Dec 29 14:16:01 2006 +0000 - - Update after release - -commit 7e4d81cc85956f8eedaed1cbf1d81a54e65a3729 -Author: kuepper -Date: Mon Dec 18 18:56:05 2006 +0000 - - (EXTRA_DIST): Add README's - -commit 513be8c25af1dcae6cf9a389f145aeb1a4a4206e -Author: kuepper -Date: Mon Dec 18 18:51:12 2006 +0000 - - Update for release. - -commit f1b702da217e3ad82275712eefccff02d9a5096d -Author: jeggermo -Date: Mon Dec 18 16:21:38 2006 +0000 - - Small changes to 2 readme files to stress that the release version are in - eo\win\lib\release and the debug versions in eo\win\lib\debug - -commit 30de251d7fbfd33759eeb4048bdb043401c0d075 -Author: kuepper -Date: Mon Dec 18 12:18:32 2006 +0000 - - * index.h: Add old ToDos - -commit 4ef6a360e5c03289e22d267d9d10ed2894e86caa -Author: kuepper -Date: Mon Dec 18 11:19:53 2006 +0000 - - *** empty log message *** - -commit 0afa0b9fa4f4bf7743bf549565531b35b71564c6 -Author: kuepper -Date: Mon Dec 18 11:17:55 2006 +0000 - - * TODO.html, README.html: Remove these old files. - - * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. - - * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 - -commit 51d6ddc239f4b125ed10f5a22a49d835332351c0 -Author: kuepper -Date: Sun Dec 17 23:18:33 2006 +0000 - - update - -commit 7adf24b71deaed320e670857699adb32ab64e7c4 -Author: kuepper -Date: Sun Dec 17 22:59:53 2006 +0000 - - * README: Better links to Templates/ - - * configure.in: Bump version to 1.0-beta2. - -commit 8e64e34e243c4c08d768eea288e208f4537d13e8 -Author: kuepper -Date: Sun Dec 17 22:56:03 2006 +0000 - - Remove these, potentially confusing files - -commit bdb09263277427563ec446773f5b3c5c74a86712 -Author: kuepper -Date: Sun Dec 17 22:50:26 2006 +0000 - - Added new README. - Removed old unnecesary files - -commit d6364b4bf63a334fd4881f92e67591f2763043ab -Author: kuepper -Date: Sat Dec 16 22:05:17 2006 +0000 - - * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files - -commit 9a549fbf8354a5a8baea8a3f46e563d31c3829b0 -Author: kuepper -Date: Sat Dec 16 22:01:46 2006 +0000 - - * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files - -commit 301e29ac0218078b32ec1ce60e77f495c8c63c6b -Author: kuepper -Date: Sat Dec 16 21:55:03 2006 +0000 - - * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use - correct names for includes. - - * README.manual: This is a copy of the old README. - - * README: Describe the new way and setup of creating a new EO project. - - * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: - * configure.ac.tmpl: New files to create a standalone EO project from - templates. - -commit b28f39af40b60f0db3c58b6f0f09613bae59b96c -Author: uid24343 -Date: Thu Dec 7 21:54:48 2006 +0000 - - clean up - -commit e9956fad83b3071c4160231621b5000b4e6055c5 -Author: kuepper -Date: Thu Dec 7 21:36:33 2006 +0000 - - cleanup for release - -commit 05943b2a83124f623bf13113563ad390c7580c30 -Author: kuepper -Date: Tue Dec 5 08:42:39 2006 +0000 - - set version to 1.0-cvs again - -commit 1e743cb571d7b2de0d4741171a3e68eea571d35c -Author: kuepper -Date: Tue Dec 5 08:41:24 2006 +0000 - - (EXTRA_DIST): Add new MSVC project files to distribution. - -commit 651a55a51bf457cda7b2385cbfeb2d31d3ad2aaa -Author: kuepper -Date: Mon Dec 4 22:27:41 2006 +0000 - - * Makefile.am: Add t-eoRNG - - * t-eoRNG.cpp: Start test for random number generator. - -commit dbdeaf33531489ace941cf350c77c36cfae4611d -Author: kuepper -Date: Mon Dec 4 21:55:31 2006 +0000 - - (eoRng::normal(stdev)): Revert erroneous change. - -commit 422b0bfa3c2111f559ce7ca76555c0ca6681aebf -Author: kuepper -Date: Sun Dec 3 11:57:34 2006 +0000 - - Fixupper/lowercase issues - -commit 03e3c88b3059728d1df8f22e30d7398ac5d9ce66 -Author: kuepper -Date: Sun Dec 3 11:44:38 2006 +0000 - - fix html errors - -commit b4b4cbc3f229b9ffb84bf61a0644af0de6a63352 -Author: kuepper -Date: Sun Dec 3 11:40:25 2006 +0000 - - update - -commit af5d6583cd22da6014d1f6ecd693400855598c32 -Author: kuepper -Date: Sun Dec 3 11:24:41 2006 +0000 - - update, add link to Niko Hansen's comparison - -commit 02294002e3b2d6c11f35a7cd7d5a82f95be2ebfe -Author: kuepper -Date: Sun Dec 3 10:53:29 2006 +0000 - - update version number of next release - -commit ab9b38654d9bf5ac096beada568298e6707160d8 -Author: kuepper -Date: Sun Dec 3 10:41:54 2006 +0000 - - * mainpage.html: update, add link to Niko Hansen's comparison - - * README: Add more specific note about tutorial. - - * configure.in: Bump version to 1.0-beta1 - - * tutorial/Makefile.am: Add all necessary files, including html and - Templates to distribution. - -commit 20d37259e9ec3a4f605084bacb653db4db754880 -Author: evomarc -Date: Sun Dec 3 07:21:44 2006 +0000 - - Added a note to avoid that some dishonest researchers use teh code - in this tutorial as a basis for comparing their algorithms with "EAs" - as was done for the LEM3 algorithm in GECCO 2006. - -commit 0e2c6ccffcbc3e10e1be66e2275836ba1fbd20f9 -Author: kuepper -Date: Sat Dec 2 12:15:29 2006 +0000 - - update - -commit 14b3a61ba8e7a436d0ff0fe7392c51c30e3148b8 -Author: kuepper -Date: Sat Dec 2 11:46:34 2006 +0000 - - cleanup, docs - -commit 3533d8addbdb9fac52e5876c37e8a9027de6c2bd -Author: kuepper -Date: Sat Dec 2 11:36:29 2006 +0000 - - (VirusShiftMutation::operator()): Fix test for i>1. - This makes t-MGE1bit pass on x86_64 using GCC. - -commit 037ce32d90396584d3e6b4541786cbbe81df2f16 -Author: kuepper -Date: Sat Dec 2 11:32:00 2006 +0000 - - Change float to double. - -commit 3eba6b962c79ec7b2cca06756cb0d6dc533abaf2 -Author: kuepper -Date: Sat Dec 2 11:02:13 2006 +0000 - - Remove unnecessary tests. - -commit 7baf7cb799ba374446f1a4fc0070c9a8c5836d6f -Author: kuepper -Date: Sat Dec 2 10:18:57 2006 +0000 - - * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. - - * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. - - * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this - results in escape-codes (^@) to be printed at runtime and is not - necessary anyway. - - * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to - avoid compiler warnings. - -commit da50bf0986babee20266f0c62f3507ec4a9a75ab -Author: kuepper -Date: Sat Dec 2 09:39:13 2006 +0000 - - * eoRNG.h: Cleanup docs and document /all/ members. - - * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. - -commit c7ce6e70f32c1c2695cf16ccc625b944fef47565 -Author: kuepper -Date: Fri Dec 1 21:07:55 2006 +0000 - - minor typos - -commit e222eacd7490cdf4883298da102449f51dff70b8 -Author: kuepper -Date: Fri Dec 1 20:40:54 2006 +0000 - - Use C++ style cast. - -commit b2ce7bedb6b9416de1ae8800b00f18c31aff9aca -Author: kuepper -Date: Fri Dec 1 20:08:51 2006 +0000 - - * Makefile.am: Update for release-distribution. - - * Makefile.am: Add missing CMA header for distribution. - - * Makefile.am: Add missing header for distribution. - -commit bcaa0cf5e41476caaab29b73ee7dc7fb0291084d -Author: kuepper -Date: Fri Dec 1 10:49:47 2006 +0000 - - minor cleanup of code and docs, - resolve some compiler warnings - -commit 4c76c8959273e32d3e25cfae63cb88834b909fb0 -Author: okoenig -Date: Fri Dec 1 08:42:54 2006 +0000 - - Replaced float vars with double to avoid conversion warnings on VS 8.0 - -commit 692d26a881088032ebaabb8d3fda7e41b456d938 -Author: kuepper -Date: Wed Nov 29 23:47:40 2006 +0000 - - update for release - -commit 532aec85e54480aedbea9405a50c6fb31a67a122 -Author: kuepper -Date: Wed Nov 29 23:37:29 2006 +0000 - - Generally include - -commit 2558aa33fab2da1ad10d82a578c6bcb5224523bb -Author: okoenig -Date: Tue Nov 28 17:14:05 2006 +0000 - - Removing MAC line endings, because Windows VS 8.0 does not accept them. - -commit cc12fd27605df0828b18d30459c439d3c3a50fca -Author: okoenig -Date: Tue Nov 28 17:12:21 2006 +0000 - - Added additonal definition for operator< between fitness and ScalarType. Needed for compilation with VS 8.0. - -commit 975e0ffaadc63b6e2b4c0200c1e1183793b543d9 -Author: jeggermo -Date: Mon Nov 20 13:34:28 2006 +0000 - - Added Solution and Project files for MSVC 2003 - -commit 219e9bd648ac94f18b4ebd8a271dc825f03c24cf -Author: jeggermo -Date: Mon Nov 20 13:25:46 2006 +0000 - - Changed some files for compatibility with MSVC 2003 and 2005 - -commit 359c5ba8ec651991e8824b63e6c5d0c2a15b0e5a -Author: kuepper -Date: Thu Nov 16 13:21:41 2006 +0000 - - include - -commit e2e59d3e4901b9405a86cbe754dde1f681fe25b7 -Author: kuepper -Date: Thu Nov 16 12:52:46 2006 +0000 - - * configure.in (AC_DEBUG): add test - - * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, - or NDEBUG according to its value. - -commit d7b935b6455d1d70d17bb992db8663f43d6fe2ab -Author: kuepper -Date: Thu Nov 16 12:35:46 2006 +0000 - - * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: - If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise - always use vecSigmaInit with default all values of sigmaInit. - - * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else - clause around ptParam (found or not). - - * eoParam.h (eoValueParam::setValue): Document. - (eoValueParam >::setValue): Allow delimiters ',' and - ';'. A plain ' ' does not work, as it is not correctly read by - eoParser::readFrom. - -commit 20c3369349cc9dfe11ccbd62f12cf1cd2605e175 -Author: kuepper -Date: Tue Jun 13 13:35:26 2006 +0000 - - update - -commit 10d582b31d2c5a779acd1dc950b339d897b07e2b -Author: kuepper -Date: Mon Mar 27 18:55:20 2006 +0000 - - Fix using directives for gcc-4.1 - -commit 929974805dd66c3f2a4ae3fe1b7c61b608a0e2f0 -Author: maartenkeijzer -Date: Sun Mar 26 13:33:25 2006 +0000 - - fixed t-eoCMAES.cpp test - -commit 5c913192e93528d001aefc847779eee40cce5ae5 -Author: kuepper -Date: Sun Mar 26 10:04:01 2006 +0000 - - Update docs, some cleanup - -commit f20a29beff542752b1beace903a69258bbd58b86 -Author: kuepper -Date: Sat Mar 25 13:03:45 2006 +0000 - - Start list of publications - -commit 89012a53b3d1dfda3f9fdc674ad0ec1d63a6476a -Author: kuepper -Date: Thu Mar 23 18:06:10 2006 +0000 - - Fix spelling - -commit 115429c1a0e4f4a026c95ca9c3e6d26c532aed17 -Author: kuepper -Date: Thu Mar 23 10:15:17 2006 +0000 - - update Makefile.am foe eoPeriodicContiunue addition - -commit 65eea59971fec429533a4d5c248bec8cd06785f0 -Author: maartenkeijzer -Date: Mon Mar 6 20:47:28 2006 +0000 - - making dimensionality requirement optional - -commit 948394e5b7d3d38437543407a11613d03d1ea3d8 -Author: maartenkeijzer -Date: Mon Mar 6 20:31:03 2006 +0000 - - making dimensionality requirement optional - -commit 6f06d3349dc0996856b1fceee96e003045ef7b88 -Author: cahon -Date: Tue Feb 28 14:40:37 2006 +0000 - - Adding a continuator - -commit d331301022e4283cbb52aceec2d4a695cbaed931 -Author: cahon -Date: Tue Feb 28 14:39:45 2006 +0000 - - New continuation strategy - -commit 9e874fcf39a97e7193120ecaf8ba5ca2abfaf229 -Author: evomarc -Date: Wed Feb 22 04:53:20 2006 +0000 - - Corrected a few typos, and acknowledged the fact that all Lessons are now - compiled within the installation procedure... - -commit e14b4a8d4841a76feaac6d070ca5edc0ba8df887 -Author: maartenkeijzer -Date: Mon Jan 23 15:12:49 2006 +0000 - - updated makefile to boost-python3.3 and python2.4 - -commit 116f21f182d3215acc78dcc6f2697de22828ebe5 -Author: evomarc -Date: Mon Jan 2 14:09:22 2006 +0000 - - Changed some bug in never-used-except-in-make_algo_easea.h file - (probably some change in the compiler made this stop working ???) - -commit 30a18fa8ca7d16b42ef2b04a6d3c59b028ff2d7b -Author: cahon -Date: Fri Dec 9 17:49:43 2005 +0000 - - eoGenContinue is now persistent - -commit 07ea076b1366dae5477114d26f7256bd82b04780 -Author: cahon -Date: Fri Dec 9 17:45:56 2005 +0000 - - eoContinue is now persistent - -commit 4ff1ac3e982ede5fa6f98df93c1524ae3c892629 -Author: kuepper -Date: Wed Dec 7 15:51:32 2005 +0000 - - fix build for our FC4 systems - -commit adbc5dd461b9aea179b60c7f8bb53f9ff704bdc4 -Author: kuepper -Date: Wed Dec 7 15:40:23 2005 +0000 - - fixes for gcc-4 compilation -- still have a linker problem - -commit 4b2093332579a615f9cbb4b6a083b893f57be028 -Author: maartenkeijzer -Date: Thu Nov 24 09:38:05 2005 +0000 - - kd - -commit 44876f0926ea44040f3261ed2f403f0ea90409f5 -Author: maartenkeijzer -Date: Thu Nov 24 09:35:34 2005 +0000 - - Various bugfixes and additions - -commit 14c3182200a9bd5fdff40e09c65fabd816c10a65 -Author: evomarc -Date: Tue Nov 8 11:34:12 2005 +0000 - - Removed the "using eoMonitor::vec from eoGnuplot1DMonitor.h because it generated - an internal compiler error with gcc4.0.0. - Repalced all occurences of "vec" by "this->vec" in eoGnuplot1DMonitor.cpp - so it is understood by the compiler :-( - -commit e07c50457198492bade2432cefd6c12474feb93c -Author: evomarc -Date: Tue Nov 8 11:31:01 2005 +0000 - - Removed extra colon (;) at end of class definitions. - They didn't hurt until gcc 3.4.1 but then they generated an error! - -commit ecbb2e3598c7734f1192beb8fa76ac15b6abb5b1 -Author: maartenkeijzer -Date: Mon Oct 17 12:46:53 2005 +0000 - - Woops, forgot to clear a static string for compile - -commit b4f15601cb3bca353191d83b6dde3bdd6066e560 -Author: maartenkeijzer -Date: Sun Oct 16 15:38:38 2005 +0000 - - Added lambda expression (user/automatically defined functions - -commit bac66449150e2549ff17264922ccaf3b24a6b26f -Author: maartenkeijzer -Date: Sat Oct 15 21:27:47 2005 +0000 - - Solved some issues and prepared the library for using unordered_map instead of hash_map (C++ TR1). Can only use this when g++-4.0.3 is out - -commit f128fcd86f7bf7852539404271a13af881e03fc8 -Author: maartenkeijzer -Date: Sat Oct 15 09:05:57 2005 +0000 - - Made eoGencontinue a ValueParam, so that it can be attached to a monitor - -commit be8873be4fd657a468524ac31bfe58e51e532d83 -Author: maartenkeijzer -Date: Fri Oct 14 16:14:37 2005 +0000 - - forgot to invalidate - -commit 0eee2ff13d39f97b362e58fff1541535d9a5ac17 -Author: maartenkeijzer -Date: Fri Oct 14 15:34:45 2005 +0000 - - Tester for CMA - -commit 8b03a5232a5710453379defe7adf1e6a74d63a75 -Author: maartenkeijzer -Date: Fri Oct 14 15:33:32 2005 +0000 - - Added CMA - -commit dd81a3ebc81eb78c395f4038f468bf9191d12dd2 -Author: maartenkeijzer -Date: Fri Oct 14 15:33:16 2005 +0000 - - added timed monitor - -commit d0c62606b35012ea4a616e760817798887bfd540 -Author: maartenkeijzer -Date: Wed Oct 12 18:35:13 2005 +0000 - - oops, stats.h was missing - -commit 72c8b3d1c59f33de708ac4b084a80757c84b38cd -Author: maartenkeijzer -Date: Tue Oct 11 08:15:29 2005 +0000 - - Added simplify and differentiation tests - -commit 89b76ab2618d1d8779aa5c602fc23021f819e278 -Author: kuepper -Date: Mon Oct 10 21:59:57 2005 +0000 - - prepare vecInitSize - -commit 4510b6d7126f37370e63dd50f875cdda8b24fcb1 -Author: kuepper -Date: Mon Oct 10 21:42:31 2005 +0000 - - cleanup, prepare vecSigmaInit change - -commit e9324fdb070574119876b1c86569302a6de0f2e5 -Author: kuepper -Date: Mon Oct 10 21:13:27 2005 +0000 - - cleanup - -commit 2934551289186f6dda97884196cecccf1031ea26 -Author: evomarc -Date: Mon Oct 10 13:34:21 2005 +0000 - - Added an accessor to the pointsize in eoeoGnuplot1DSnapshot.h - -commit 800a62ae34df21430b533172374e561c636dec97 -Author: evomarc -Date: Mon Oct 10 13:33:13 2005 +0000 - - Added an accessor to the pointsize, for do_make_checkpoint_pareto - -commit ffdce66c98d80d9f0d3920dfaad92e4097da3f65 -Author: maartenkeijzer -Date: Sun Oct 9 07:03:35 2005 +0000 - - Added symbolic differentiation - -commit 3ca7c0f6f473f79a15662fc0536c28bf590e0769 -Author: maartenkeijzer -Date: Fri Oct 7 13:31:20 2005 +0000 - - Faster scaled evaluation, etc. - -commit 4042798417f5f209cd61e2ca4aedc8317c0f9c67 -Author: maartenkeijzer -Date: Fri Oct 7 11:31:01 2005 +0000 - - Constant mutation + simplification added - -commit 05790afc2161d28e15c663f494264c8821a87aec -Author: evomarc -Date: Fri Oct 7 08:27:59 2005 +0000 - - A colon had mystriously dissappeared !!! - -commit 9f770670e5c59d4745a25fc1ba33fc3cebdf07c0 -Author: maartenkeijzer -Date: Thu Oct 6 22:26:59 2005 +0000 - - more ramblings in readme - -commit b55e86881788baf9eb0a1c22e8d9e198945b4eab -Author: maartenkeijzer -Date: Thu Oct 6 22:14:48 2005 +0000 - - Added constant getting and setting - -commit 93ad61538951d9f4123959bab25b601377ffa959 -Author: maartenkeijzer -Date: Thu Oct 6 18:10:13 2005 +0000 - - fix - -commit 7c3702f6a603fa5af9d7fe8425f87f31de9da1db -Author: kuepper -Date: Thu Oct 6 17:22:40 2005 +0000 - - Handle including from contrib/MGE nicely. - -commit c563e2c302692cbc53061742cc4b31a428b860c0 -Author: maartenkeijzer -Date: Thu Oct 6 14:31:09 2005 +0000 - - removed stray object files - -commit 92f2e523e0ddafa8e5f3a38c66bd6e846bc50f02 -Author: maartenkeijzer -Date: Thu Oct 6 12:25:00 2005 +0000 - - first fix in makefile - -commit 90702a435d8e4b019d511fc129e6b713afc56c6b -Author: maartenkeijzer -Date: Thu Oct 6 12:13:53 2005 +0000 - - Added mathsym+tcc and boost against all advice - -commit 58ae49dd99c60cde0753b5aeff10354d04d5ef12 -Author: maartenkeijzer -Date: Thu Oct 6 10:06:25 2005 +0000 - - Replaced GPL with LGPL license here. EO has always been LGPL - -commit 27883034167a8391c23a529d907607001ac85bd1 -Author: kuepper -Date: Wed Oct 5 22:22:25 2005 +0000 - - *** empty log message *** - -commit 3428a464c11b3ebdf785ef74e29cb0c9dba917ef -Author: kuepper -Date: Wed Oct 5 22:08:29 2005 +0000 - - typos - -commit e318a65aa329877ca2230af149d95eca6a34f652 -Author: kuepper -Date: Wed Oct 5 21:48:01 2005 +0000 - - cleanup - -commit ced022186e4ac9db4fa64bb12c37c95091ab1a41 -Author: kuepper -Date: Wed Oct 5 21:40:53 2005 +0000 - - comments - -commit afc0659e35540237c2537ca9c621507c00dd4919 -Author: kuepper -Date: Wed Oct 5 21:34:19 2005 +0000 - - finish the handling of gnuplot completely at build-time. - No gnuplot-ifs in headers anymore. - -commit 4eb298ac739f4e6844fd0366316316c629051baa -Author: kuepper -Date: Wed Oct 5 21:25:51 2005 +0000 - - some first external links - -commit 6cdab707904cf5c45d4e2fd2a68fd50a8a52d9ff -Author: kuepper -Date: Mon Oct 3 21:48:15 2005 +0000 - - *** empty log message *** - -commit 4bfc3afe9b76631d45d7374c18df184e9955bb77 -Author: kuepper -Date: Mon Oct 3 12:54:45 2005 +0000 - - *** empty log message *** - -commit a3d4ae8a1ee0a29beebfdccba51fbb4e60a8b689 -Author: kuepper -Date: Mon Oct 3 10:58:01 2005 +0000 - - cleanup - -commit d6fc655ccb879e9486cf67eada225bfc83e56fed -Author: kuepper -Date: Mon Oct 3 10:53:35 2005 +0000 - - clean up - -commit fe91e0104865c62586f7c61691e46c50f34b9b4a -Author: kuepper -Date: Mon Oct 3 10:32:56 2005 +0000 - - some nifty details, - passes W3 validator. - -commit 8fac249ba6720a80f30a26db1e58d5629957a134 -Author: kuepper -Date: Mon Oct 3 10:26:30 2005 +0000 - - clean up html - -commit 40e8f8a11f55885ed6eb3f29603f86371b65fead -Author: kuepper -Date: Mon Oct 3 10:10:09 2005 +0000 - - move logo to cvs - -commit 29f22eaa419582d3ff4bed2fe93591e68e065804 -Author: kuepper -Date: Mon Oct 3 10:06:26 2005 +0000 - - updates for release - -commit 665936864ca4edc68786654035938f89c2c4c6c2 -Author: kuepper -Date: Mon Oct 3 09:56:02 2005 +0000 - - Make clear that the docs are for the cvs code. - -commit ed5e1c120a62728e0d089c69218e5c0822285c0b -Author: kuepper -Date: Mon Oct 3 09:51:27 2005 +0000 - - update for release. - -commit 03b1689de99510eb5c8c4ab9a2b550c0d249d9ba -Author: kuepper -Date: Mon Oct 3 09:47:06 2005 +0000 - - Initialize booleans to get rid of compiler-warnings. - -commit 1f0ba7fab65a6c4be46516d30600d09209ef7292 -Author: kuepper -Date: Sun Oct 2 21:57:43 2005 +0000 - - fix foe gnuplot configuration-switch usage - -commit 47af7cfe5a3142a5c877c9a381d76552b4ed5c59 -Author: kuepper -Date: Sun Oct 2 21:42:08 2005 +0000 - - Clean up configure/build-process. - - assume C++ standard-conforming environment - - add a user-option for gnuplot-support - - separate gnuplot-code into declaration and implementation, - so we can define at EO-build-time whether to use it or not. - - Adopt code and Makefiles to above changes. - - Some minor fixes. - -commit 6485482f39d1155898797853fc26ad55cf531d02 -Author: kuepper -Date: Sat Oct 1 17:07:59 2005 +0000 - - *** empty log message *** - -commit 1926817eaed34d336bd745b243137ebbf2b35e91 -Author: kuepper -Date: Sat Oct 1 16:05:01 2005 +0000 - - add zip to dist, - update release-plan. - -commit 348375915a54cbc8b13b7c0d65434005706a22eb -Author: kuepper -Date: Sat Oct 1 15:35:45 2005 +0000 - - Search for ar as necessary on Solaris-x86. - Make DOXYGEN and AR precious variables. - -commit 88ebd6ffc1fe227e47cb9ce15f42e50672c26c8f -Author: kuepper -Date: Sat Oct 1 14:25:29 2005 +0000 - - update for solaris-x86 - -commit 12f80ea2919e8e0c28d00cd3cdb7f891cd7dc7e5 -Author: kuepper -Date: Sat Oct 1 14:00:42 2005 +0000 - - Include inttypes.h if available but stdint.h is not. - Add powerpc success. - -commit 76437817aee5c0d3cc223e5c4d8cf21c3170583e -Author: kuepper -Date: Sat Oct 1 13:27:25 2005 +0000 - - *** empty log message *** - -commit c71bc4618902011f35f003342d0b22e0dc24a458 -Author: kuepper -Date: Sat Oct 1 13:26:29 2005 +0000 - - *** empty log message *** - -commit 4addcb7374524629b9d8af8c008d3155d3b74b8f -Author: kuepper -Date: Sat Oct 1 13:07:01 2005 +0000 - - *** empty log message *** - -commit a3d4193333643a925b4e730c594c7907faeb54d7 -Author: kuepper -Date: Sat Oct 1 13:00:59 2005 +0000 - - update and clean up - -commit f7571db2da65293ec76bee53f1b39ce115f7239f -Author: kuepper -Date: Sat Oct 1 12:18:21 2005 +0000 - - *** empty log message *** - -commit c2dd7f6d01896b9cb7dfe314ae09f5e7fd9d1582 -Author: kuepper -Date: Sat Oct 1 12:13:00 2005 +0000 - - *** empty log message *** - -commit 1b59c07cba35a6b6db0e46a0657ac17786a9c8c1 -Author: kuepper -Date: Sat Oct 1 11:59:14 2005 +0000 - - update docs - clean Tutorial - bump version-number for cvs - -commit 676131832a7d49d55d30667dac630df716c91fb7 -Author: kuepper -Date: Fri Sep 30 21:16:24 2005 +0000 - - typo - -commit 5e208b467a19cf8c6adfc39a460791311d705e7e -Author: kuepper -Date: Fri Sep 30 11:47:26 2005 +0000 - - *** empty log message *** - -commit a28dbeed43446c8d0cfab1332b7eb63bb1f0d33b -Author: kuepper -Date: Thu Sep 29 22:08:19 2005 +0000 - - *** empty log message *** - -commit 8a4a1bc90360a651d4986788b9632e1f245e26bf -Author: kuepper -Date: Thu Sep 29 22:01:52 2005 +0000 - - add main web-page - -commit efee2faf3134c3ac6ed2f3a0704f02497402d2eb -Author: kuepper -Date: Thu Sep 29 16:53:06 2005 +0000 - - Use install to copy generated documentation. - -commit 09ebf789058fcda90b6c0248c34ed6bbe72d85fd -Author: kuepper -Date: Wed Sep 28 21:57:40 2005 +0000 - - remove forgotten config.h - -commit cf2a57dd88a6ac3654fa9fadbe56df9f4ed0397a -Author: kuepper -Date: Wed Sep 28 21:49:26 2005 +0000 - - Simplify configuration. - Remove support for (outdated) , require . - Require uint32_t for now, defined in stdint.h according to C99. - Some general cleanup and more documentation. - -commit abe55a641a8bc996629df4a94b23f5cf6c62ab47 -Author: kuepper -Date: Wed Sep 28 18:25:38 2005 +0000 - - Remove wrongly committed files. - -commit 21d534be674c0690a57c678fd52cef43659a3dcb -Author: kuepper -Date: Wed Sep 28 17:59:59 2005 +0000 - - Remove wrongly committed files. - -commit ccee1d22c337d59b63483ce1e1ed6a9ce114a72d -Author: kuepper -Date: Wed Sep 28 16:32:35 2005 +0000 - - Switch on documentation generation for private and static members. - -commit 57a07840c4c0fcef213217c6bd38b2a7ef06127d -Author: kuepper -Date: Wed Sep 28 14:32:12 2005 +0000 - - Some more documentation - -commit 3b7770fe3816c81b834c23cbc7b4173736c53db7 -Author: kuepper -Date: Wed Sep 28 10:00:16 2005 +0000 - - Add ignore-files to quiten cvs - -commit 439350bc56d1822f4ada5d573ac8f95b8f6fd51f -Author: kuepper -Date: Wed Sep 28 08:36:00 2005 +0000 - - documente for stdev_eps - -commit 3735dbaac48053373ccafaa8139779a85d2ae246 -Author: kuepper -Date: Tue Sep 27 22:06:08 2005 +0000 - - cleanup - -commit 0a57d80b1b0095ba234772b2681ba0e4202535ca -Author: kuepper -Date: Tue Sep 27 21:54:05 2005 +0000 - - documentation, whitespace - -commit c73cc51ab99c83612fe680fb708c138a5eada3ed -Author: maartenkeijzer -Date: Mon Sep 26 11:22:47 2005 +0000 - - Removed wrong reference to rng from choice members (what was I thinking?) - -commit 6e0c4a72642de8c67ad4438be96d2cd0de1cf8dd -Author: kuepper -Date: Mon Sep 26 10:18:15 2005 +0000 - - Make sure uint32_t is defined correctly in eoRNG.h and use it where - appropriate. - -commit 462fbaad6625feca04ddcf61737785265139cd7c -Author: maartenkeijzer -Date: Sun Sep 25 19:32:10 2005 +0000 - - Added few convenience functions - -commit cbfff8fda9a8e2c2f7fa4b2e9f25fcce124afa1b -Author: maartenkeijzer -Date: Sun Sep 25 19:09:38 2005 +0000 - - Added choice functions, plus rolled back inadvertant chance to eoRNG - -commit a3a9010e9af1077c5692e4673348f66291fabc77 -Author: kuepper -Date: Tue Sep 13 10:24:50 2005 +0000 - - setORcreate returns it parameter. - -commit 438e8ef6d63df36975ed9bb2039aa86d35ec4745 -Author: kuepper -Date: Mon Sep 12 17:53:25 2005 +0000 - - Use getORcreateParam instead of createParam when getting values from - the eoParser. - Update setORcreateParam. - -commit f948ccda3ac6b856e8659d485083b3cf90ce1281 -Author: maartenkeijzer -Date: Wed Sep 7 17:09:19 2005 +0000 - - eoRNG.h - -commit 471bd9a9e243d3a9be01be47a5e85013bfc7413c -Author: kuepper -Date: Mon Sep 5 17:04:13 2005 +0000 - - Remove paradiseo configuration switch - -commit 88a3a641c6e678cfd2822501ed6f8282bc00e777 -Author: kuepper -Date: Mon Sep 5 16:47:53 2005 +0000 - - Provide virtual destructors as gcc-4 barks heavily otherwise - -commit 54a3b8d10edaf298fa3a672055773949fa32043b -Author: kuepper -Date: Mon Sep 5 16:11:00 2005 +0000 - - ParadiesEO cleanup - -commit 2ca5ddb18682a2c2d1e69e2ea32cfe14cb1db756 -Author: kuepper -Date: Mon Sep 5 16:09:43 2005 +0000 - - Remove useless PAradisEO files - -commit d7ee654d6450fb268c8f7d9b1ea5fe81b1d737af -Author: kuepper -Date: Mon Sep 5 16:08:14 2005 +0000 - - Remove useless files from paradiseo directories - -commit 5a322446f08bb146751682575f9de77888f9a1d8 -Author: cahon -Date: Fri Sep 2 13:36:21 2005 +0000 - - Removing ParadisEO - -commit e1cc2dd7f5e7587cf05d2dfa190afd6261395a38 -Author: cahon -Date: Fri Sep 2 07:12:27 2005 +0000 - - Removing ParadisEO - -commit c498de10e2e25032023438dbfc8ebb8ec8f84784 -Author: cahon -Date: Fri Sep 2 07:00:45 2005 +0000 - - Removing ParadisEO - -commit f0fd15f20c806d65cf895c1a16c7e655417c6ed5 -Author: kuepper -Date: Mon Aug 29 07:50:50 2005 +0000 - - Provide eoParser::setORcreateParam to set a paramter in the parser to - a specific value. - -commit d418459a0121216d02dab8d5eda221c7c8c30a82 -Author: kuepper -Date: Mon Aug 29 07:32:13 2005 +0000 - - Install eoPropGAGenOp.h - Add #include in eoEsChromInit.h in order to make gcc-4.0 happy. - -commit f63e9c37920601ceea79235fca55873505781f76 -Author: evomarc -Date: Sat May 7 15:43:29 2005 +0000 - - Added eoPropGAGenOp, the sequential application of crossover and mutation - -commit 935910f2f4e6d932b14cb210b2fa8f37c72e536b -Author: evomarc -Date: Mon Apr 4 20:41:06 2005 +0000 - - Small upgrade for gcc 3.3 (I guess no-one is using those files, right?) - -commit a17e266c46efd4da96c3aef60b9a6b1b47ee94ac -Author: evomarc -Date: Mon Mar 14 21:00:00 2005 +0000 - - Updated the src:: everywhere in eoVariableLengthCrossover.h eoFlOrMonOp.h - (that nobody seems to actually use btw :-) - -commit 558e197adca8fb5427234602ddd406145c0b1c43 -Author: cahon -Date: Wed Feb 23 13:31:20 2005 +0000 - - Removing ParadisEO - -commit 96dd240cf376458209560d93fa8e73c1bc4ef7fa -Author: cahon -Date: Tue Feb 22 14:12:19 2005 +0000 - - Removing ParadisEO - -commit d144ba2885bbca69aa22f82feebbcc1fcda971d2 -Author: evomarc -Date: Thu Feb 10 09:57:28 2005 +0000 - - Added the complete reference to the base class in call for value() - because g++3.4 otherwise complains - -commit 5cd40b50ae9d92794dcf415ec90348c56f4404da -Author: kuepper -Date: Mon Jan 3 09:35:39 2005 +0000 - - include config.h - -commit 521871a7ea940047ff61447eb904129d844b6d58 -Author: kuepper -Date: Mon Jan 3 09:35:17 2005 +0000 - - fix for gcc-3.4 - -commit 503ee25d9cf27175115e02df0ea7457ae440126d -Author: evomarc -Date: Mon Dec 27 09:08:44 2004 +0000 - - Mainly made it obvious that Lesson4 contains "ready-to-use" EAs - -commit 835a14e8ff8a1951eb4ef5764418b5e4ac5b02d2 -Author: evomarc -Date: Mon Dec 27 08:01:29 2004 +0000 - - Modified the way to set the initial values of the sigmas (and stdevs) - so that they can be scaled to the range of each variable (by adding - a "%" after the value in the parameter file) - See also the examples in tutorial/Lesson4 - -commit ce560e5bfaadd471ce308439859f2472d205020d -Author: evomarc -Date: Mon Dec 27 07:59:58 2004 +0000 - - Added the 2 parameter files ESEA.param amd RealEA.param - so both programs go to 0 nicely instead of staying anywhere but close - -commit fbdc8995855f3b128aee70b5c1ef697a5b786d71 -Author: evomarc -Date: Mon Dec 27 07:33:03 2004 +0000 - - Added the explicit calls to the base class ctors in eoXXXGeneralBounds copy Ctors - -commit 8c36a1274b5eef1aac4dc9c73a912f8f52b74ae3 -Author: evomarc -Date: Mon Dec 27 07:31:59 2004 +0000 - - Fixed some int - unsigned int problem for the case "combien < 0" - -commit a415aef4d98ac9846348df69fb9137442a37aeca -Author: kuepper -Date: Thu Dec 23 17:33:08 2004 +0000 - - reshuffle libraries to resolve all dependencies - -commit 57a39197b97a412edbf797e10b2deba0c9aed5e1 -Author: kuepper -Date: Thu Dec 23 17:26:39 2004 +0000 - - minor updates, - create doxytag-file when running doxygen - -commit 7b9e6d3e1f980629490c68333f157914480ca041 -Author: kuepper -Date: Thu Dec 23 17:22:52 2004 +0000 - - more adjustments for gcc-3.4 (now using optimization, go figure...) - -commit cf4849c472e5f87ff680c305b73ecd18382b41ff -Author: kuepper -Date: Thu Dec 23 16:06:37 2004 +0000 - - small fix for gcc-3.3.3 - -commit 0ad2d5ad2b8611fa254bd8452018fde31a3f4598 -Author: maartenkeijzer -Date: Thu Dec 23 15:40:44 2004 +0000 - - Some small changes concerning flags and warnings - -commit 85a326c5e496d0f9932ad8790d68e2f153655a4c -Author: kuepper -Date: Thu Dec 23 15:29:07 2004 +0000 - - Adjust code to perform to C++ standard according to gcc-3.4 - interpretation... (Have not compiled/checked/changed paradisEO.) - - That is, the current code compiles with gcc-3.4 and the checks - (besides t-MGE1bit) all pass. - -commit faaadf7599179afc3256ee44a688c70466015a88 -Author: maartenkeijzer -Date: Thu Dec 23 10:14:42 2004 +0000 - - Added using declarations to avoid g++-3.4 errors - -commit 1828fda30c3433f6e9a5cc3fe76aa4e7ca497e57 -Author: evomarc -Date: Wed Dec 1 09:27:31 2004 +0000 - - Added comments so that the new classes eoGeneralXXXBounds are taken into account - by Doxygen. - -commit 71e1984aeb2c7beb85bd787a143277573579808b -Author: evomarc -Date: Wed Dec 1 09:23:53 2004 +0000 - - ... some comments ... - -commit a24cd30c81679ffff7ff637b6798f6e097c97079 -Author: evomarc -Date: Wed Dec 1 09:22:48 2004 +0000 - - ... some comments for Doxygen ... - -commit c592a74025d291ebb738c74d0e3273cbd470a7ce -Author: evomarc -Date: Wed Dec 1 09:19:47 2004 +0000 - - ... a comment ... - -commit 641b49e995be18bfa7445514bf4dd3211bce6ad0 -Author: evomarc -Date: Wed Dec 1 08:49:40 2004 +0000 - - Added a few words about Lesson5, and the change in the Makefiles. - Also, looking alive is probably important ! - -commit ab95b3fd979bb317fef516f68daa6e01cabd1a33 -Author: evomarc -Date: Mon Nov 29 20:49:34 2004 +0000 - - Corrected some bugs in eoGeneralXXXBounds (e.g. no const in copy Ctor arguments) - Added a default value for the intialization (-infty, +infty) - Needs to allow uniform() on unbounded - still pondering - -commit 9b1524ec002de89ba330d9090c11308dbb5b8460 -Author: evomarc -Date: Fri Nov 5 08:57:34 2004 +0000 - - Added classes to hendle bounds: - - eoGeneralRealBound that can be initialized using a string (and hence can be - easily read as a parameter) - - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h - Note that there is no equivalent to eoRealVectorBounds for vector of integers - - In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h - The first one was already there by chance, through eoUniformInit.h - -commit 7a695e65df500b41b90c8a1e2b391b688265660e -Author: evomarc -Date: Fri Nov 5 08:55:12 2004 +0000 - - Added classes to hendle bounds: - - eoGeneralRealBound that can be initialized using a string (and hence can be - easily read as a parameter) - - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h - Note that there is no equivalent to eoRealVectorBounds for vector of integers - -commit 50b395d16dcb5897dc299736ae36b9620d49d89d -Author: kuepper -Date: Thu Oct 7 14:32:54 2004 +0000 - - fix install dir - -commit 795ca38589add25eee73d66cd8bcd069c12c009b -Author: kuepper -Date: Thu Oct 7 13:36:43 2004 +0000 - - were these lost? - -commit ebedf7ca7d2fc3ca3f449598c054492e23e0c222 -Author: kuepper -Date: Thu Oct 7 13:34:08 2004 +0000 - - wrong directory - -commit 73c97e6bfa1bfb7a96e7e91f1b5f6778fc91df8e -Author: kuepper -Date: Wed Sep 29 18:37:20 2004 +0000 - - update for sstream - -commit 9786fe0a6a270d0ce16ac4c4e6068d48ff042aad -Author: kuepper -Date: Tue Sep 28 17:13:34 2004 +0000 - - Fix cvs-commit error (<<< still there...) - -commit 76e78116ac0d20ff4152e7bb4fd3a468074af0eb -Author: evomarc -Date: Mon Sep 27 15:19:53 2004 +0000 - - Added include eoDistance.h - -commit a0c7412c188b0bb70e147c7a027b964392e110a8 -Author: evomarc -Date: Mon Sep 27 13:34:34 2004 +0000 - - Replaced the eoNormalMutation (mutating ALL variables of a real-valued vector) - with eiNormalVecMutation that has a proba. to mutation each variable - -commit db44c94c9c746ef15a494e0c3a8f74a252006606 -Author: evomarc -Date: Mon Sep 27 13:31:40 2004 +0000 - - Added the class eoNormalVecMutation (yes, should have made another file :-( - -commit eac4f15bf0466445ca566cb5a071606b08d8f5ac -Author: okoenig -Date: Sun Sep 26 09:47:06 2004 +0000 - - Replaced top_builddir with top_srcdir - -commit 6584747d3cccd7c9250f64ecfc80ab46a6914235 -Author: okoenig -Date: Sun Sep 26 09:45:59 2004 +0000 - - Removing a "/" at the end of a comment - -commit c5a9348dd999fac5e19a9b9166460a89fd561ad2 -Author: kuepper -Date: Fri Sep 24 15:00:48 2004 +0000 - - Fix doc-target. - Fix inclusion of documentation in dist. - -commit fa108bbd6bd9c342c62e1086249277f62be7019d -Author: kuepper -Date: Fri Sep 24 11:55:09 2004 +0000 - - minor fixes - -commit 503efdcdb6b4b344ae1027ea9ff42a50eb2148f1 -Author: kuepper -Date: Wed Sep 22 18:38:12 2004 +0000 - - Removed clean-local due to problems with "make distcheck" - -commit 51471804cde758412dcfad8fdae1cbfdee5ae285 -Author: kuepper -Date: Wed Sep 22 18:18:31 2004 +0000 - - fix installation, dist-preparation - -commit 495057c341b5975e35788211c72cfd3a37a4694b -Author: kuepper -Date: Wed Sep 22 17:30:11 2004 +0000 - - updates for distributing/installing ParadisEO. - -commit 6fff184ba31d081e620eee41caaf6e6f48c5936b -Author: kuepper -Date: Wed Sep 22 13:20:15 2004 +0000 - - update for new build-process - -commit 3cb80bc73b33c340fa75a13a09154b18ebbc4634 -Author: kuepper -Date: Wed Sep 22 12:38:28 2004 +0000 - - update build process to include paradiseo tutorial, - fix paradiseo headers for sstream - -commit e388461a3b27ba07fbb3a880070bf1d848c50478 -Author: kuepper -Date: Wed Sep 22 08:18:29 2004 +0000 - - Update configure with switches for app, ParadisEO, and tutorial. - Add ParadisEO/Lesson1 tutorial in build-process. - minor fixes. - -commit 0a6e0c687c43e9ed69ff8906256885ad0e20462c -Author: maartenkeijzer -Date: Tue Sep 21 19:49:48 2004 +0000 - - Made couple of functions virtual - -commit 63cbb12e69fa7de7549728b069ff38d120de6517 -Author: kuepper -Date: Tue Sep 21 17:01:14 2004 +0000 - - updates, - start supoorting ParadisEO - -commit 056ac87efb3260812fccf1be98d5b7633d9d5839 -Author: kuepper -Date: Tue Sep 21 10:30:45 2004 +0000 - - fix dist-header - -commit 5150bd4888d27d4fa8f9e08a52e40a1abf6e850a -Author: kuepper -Date: Tue Sep 21 10:23:33 2004 +0000 - - fix 'make dist', works now (besides ParadisEO). - -commit de69e235f43535cee55b10676954122a60de64d9 -Author: kuepper -Date: Mon Sep 20 21:47:15 2004 +0000 - - updates - -commit 7db38bc9cd6b603fe5502d9ee56314f491d04f95 -Author: kuepper -Date: Mon Sep 20 17:14:11 2004 +0000 - - fix - -commit 72c070585f348e5c6ce7545e896db2b025e15eb6 -Author: kuepper -Date: Mon Sep 20 17:12:12 2004 +0000 - - better distribution support (not finished) - -commit 1cf47e414ee2fbbc65c57e1d686cb788783d1773 -Author: kuepper -Date: Mon Sep 20 17:06:25 2004 +0000 - - conditional compilation fixes - -commit 5e416e4a1c50cf2bfbdc60500c6a52bb77ada8ff -Author: kuepper -Date: Mon Sep 20 16:05:25 2004 +0000 - - don't use user-variables - -commit 9e508c66a68a9ef1d31f2ae9e40212b7b7aa6de7 -Author: kuepper -Date: Mon Sep 20 15:51:53 2004 +0000 - - update user commentary - -commit 988e6a43ea3bcb74f1f04f5b8dc56a2127c1fbe8 -Author: kuepper -Date: Mon Sep 20 15:50:00 2004 +0000 - - *** empty log message *** - -commit e618920c44b29ac945cba8213355a01e785a9ba1 -Author: kuepper -Date: Mon Sep 20 14:11:24 2004 +0000 - - updates for build-process - -commit 17c8eddd5c6211fa959049818c341635be669989 -Author: kuepper -Date: Mon Sep 20 09:56:10 2004 +0000 - - *** empty log message *** - -commit 81492da319932f8ab6456d5ff2ba5be63d1b1dde -Author: kuepper -Date: Mon Sep 20 09:52:19 2004 +0000 - - Remove support files, they are automatically created by autotools - -commit 683c4e573e123fda4b40cb691d31205722d790ae -Author: kuepper -Date: Mon Sep 20 09:50:47 2004 +0000 - - update - -commit cf4248b67b3c9b76dda9ab429de7b61acdf96f46 -Author: kuepper -Date: Mon Sep 20 09:47:19 2004 +0000 - - remove - -commit f599c8eb779ea29113caf2617968135d37c4a1a3 -Author: kuepper -Date: Mon Sep 20 09:46:48 2004 +0000 - - remove Makefiles from cvs - -commit 36af75bc949fcff09c2d6744737cd48075fda16a -Author: kuepper -Date: Fri Sep 17 17:05:28 2004 +0000 - - add conditional includes for sstream - -commit 6c7d888194f74a1214c5c18a1a23e8ad9e2a6aaa -Author: kuepper -Date: Fri Sep 17 17:00:04 2004 +0000 - - cleanup - -commit c8494642d5b5233f26fc523664593b44bbe22e75 -Author: kuepper -Date: Fri Sep 17 16:53:31 2004 +0000 - - Updated build-prcess to be completely under automake control. - - For the tutorial the old Makefiles are saved as Makefile.simple in all - the respective directories. - - Use generated config.h instead of command-line passing of preprocessor - flags. - - Updated support files from current automake. - -commit 32cf83cfee845d72649e170ebe076a0370be63af -Author: kuepper -Date: Fri Sep 17 15:20:19 2004 +0000 - - Save copies of old simple Makefiles - -commit dbd0a46d75f1e30079701b4c27c3631508bfa7a9 -Author: maartenkeijzer -Date: Mon Aug 30 19:44:48 2004 +0000 - - added verbose flag that can be used to turn off annoying message to cout - -commit 57881e56c4a940aefc8872bdc25eb9d67a39838c -Author: evomarc -Date: Sat Aug 28 16:26:03 2004 +0000 - - CLeaned up the comments in files related to Sharing (added t-eoSharing in test) - -commit e7643ccc10d32ecba2851822557f8080260914cb -Author: evomarc -Date: Sat Aug 28 16:25:12 2004 +0000 - - Committing at last the long awaited test for Sharing - -commit 17db378c84174c81fde4bb7304182ba93c077522 -Author: evomarc -Date: Sat Aug 28 14:03:34 2004 +0000 - - Cleaned up the comments - -commit 669f41a315fd21a0ddd9447d4df090f3a5fd0453 -Author: jmerelo -Date: Tue Aug 10 17:19:46 2004 +0000 - - Changes in docs and added stuff to eoEvalSteadyFitness to reset after using it - -commit 55a118517c9bd1291e71745d90342875a0bffb1e -Author: jmerelo -Date: Tue Aug 10 07:39:10 2004 +0000 - - Updating doxygen configuration - -commit 7d0e70fd1aca67a0ef3b06b64faef44279425ce8 -Author: okoenig -Date: Sun Jul 25 13:26:02 2004 +0000 - - added a string msg to eoScalarFitnessAssembled, in order to store all sorts of messages for an individual - -commit b72ea29e0dd63c15baea1074a4ea813e03e3235c -Author: evomarc -Date: Fri Jul 16 08:45:02 2004 +0000 - - Added className (mysteriously missint) mandatory for eoCombinedInit - -commit caa611661a1f74bcfed9ba9e9b2d10a726be18c1 -Author: evomarc -Date: Fri Jul 16 08:44:14 2004 +0000 - - Allows proportional combinations of eoInit objects - Similar to eoPropostionalCombinedXXXOp - -commit 42819983dca9c69206e9e2dcaee436236fefa6f0 -Author: cahon -Date: Mon Jul 12 09:16:41 2004 +0000 - - Adding typedef EOT EOType ; - -commit 4127f426038afd99f359a34493b88fa72307c02d -Author: cahon -Date: Mon Jul 12 08:57:38 2004 +0000 - - Adding typedef EOT EOType ; - -commit 30ceb2bf450184edf1600865e8f27267454012ce -Author: evomarc -Date: Wed Jun 23 23:19:17 2004 +0000 - - Added the Ctor using the Parser - -commit 66a51c5ddb8f9f202248cb3338deb20b1d622d1a -Author: evomarc -Date: Tue Jun 15 07:28:54 2004 +0000 - - Added the className method everywhere - -commit e44cf2c446adfd4552e3ef384286c94d19f2708f -Author: evomarc -Date: Tue Jun 15 07:09:57 2004 +0000 - - Added the className methods everywhere - -commit c0d5eec30307ba18ac9fd1ee57d0c429d68a83db -Author: evomarc -Date: Tue Jun 15 07:06:27 2004 +0000 - - Added newline at end of stat - -commit 6e650914cca1b308b4696f1380dd00da934630a7 -Author: evomarc -Date: Tue Jun 15 07:04:12 2004 +0000 - - Added the allClassName method to print the name of all - classes that have been added to the checkpoint - -commit 4cfe47a8e512b76038fe0eed90d00ef46e0716bf -Author: okoenig -Date: Mon Jun 14 17:07:25 2004 +0000 - - Added a failed boolean to the fitness, for statistics... Average stat values are now computed from succesful fitness evaluations only - -commit 500f66efbfffb3b9fe6fc75c25cde3695a48f945 -Author: okoenig -Date: Mon Jun 14 17:05:07 2004 +0000 - - Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) - Avg Stats are now only evaluated of individuals if this bool is false! - -commit 6d8d7c994c2b51f9e38451d98cbe1b938fb91168 -Author: okoenig -Date: Mon Jun 14 11:59:39 2004 +0000 - - Replaced #include with #include to get rid of "deprecated" warnings in gcc 3.3 - -commit 16e09360c9789fcf1309fc3ae64212d975db4b39 -Author: okoenig -Date: Mon Jun 14 11:24:37 2004 +0000 - - Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) - Avg Stats are now only evaluated of individuals if this bool is false! - -commit 06eb601d8ee0eb95e1ea8596c0b4ef216d52ce02 -Author: okoenig -Date: Mon Jun 14 11:23:48 2004 +0000 - - Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) - -commit ab9d4de66bd741be9c13010535b7962bf673c79f -Author: evomarc -Date: Wed May 26 10:23:07 2004 +0000 - - Adding Sharing (though eoSharingSelect - a roulette selection on shared fitnesses - -commit 9e0edc381e3e845206ed271b904756269684cc03 -Author: evomarc -Date: Wed May 26 09:00:26 2004 +0000 - - Temporary modification of the tutorial to account for the new features - - stat.tmpl allowing easy creation of own stat - - sharing as a new possible selector in make_algo_scalar - requires a distance - No detail given, though ... - -commit 795f63b7feae82efec3d68aeaa51912552586594 -Author: evomarc -Date: Tue May 25 08:03:30 2004 +0000 - - Adding sharing - needed to modify quite a few files, like eoDistance.h - make_algo_scalar.h and all related files, and the like - -commit 13c70628584d1e76f74c6d613290ecd1df22a183 -Author: evomarc -Date: Tue May 25 07:57:52 2004 +0000 - - Adding the statistics in createSimple (create.sh is becoming obsolete) - -commit b0969cf3d4c38e801b4141e5fc32b44bc7b7af08 -Author: stevemadere -Date: Fri May 21 01:44:32 2004 +0000 - - Fixed a bug in mlp::net::load() that prevented loading of multiple nets - from the same stream. - -commit 7863168b69e2abe78cfd31cbc2d2ea912253a2bc -Author: stevemadere -Date: Fri Apr 23 16:20:12 2004 +0000 - - Added weight perturbation operators to enable implementation of - exact GPROP-III algorithm. - -commit aecd7bdf2b37acbc56c6ff9cba6964ffda4a8e54 -Author: evomarc -Date: Thu Apr 8 07:55:40 2004 +0000 - - Added the setLongName method to handle the prefix trick in eoParser - -commit 87ddb6f8b5004982b93f640e9aaf31cb54ea82f3 -Author: evomarc -Date: Mon Apr 5 15:28:12 2004 +0000 - - Added a prefix data in eoParser - and the setPrefix method - - for multi-population parameter input. Now you can call the make_xxx - functions from teh src/do directory several times for different populations - provided you do different calls to setPrefix inbetween - -commit fe9de42802c1ac91a1dc3087880ec6f81e2a793f -Author: evomarc -Date: Tue Mar 30 16:51:06 2004 +0000 - - Corrected errors in the "memory management" section. - Thanks to ZhangQian for pointing them out - -commit 3276d502eaeef6607119692393d66ce93a7eda57 -Author: okoenig -Date: Sun Mar 28 22:18:03 2004 +0000 - - Bugfix regarding the feasible flag - -commit 4bdccb3dae683c034cddd3c7361b45aa6b31ab13 -Author: maartenkeijzer -Date: Fri Mar 26 09:56:56 2004 +0000 - - Fixed bug in rng::roulette_wheel: use of float had too little precision in change/fortune var - -commit a715dda207c1b17e81c64dd18911e80128e646f7 -Author: maartenkeijzer -Date: Fri Mar 26 09:36:07 2004 +0000 - - Fixed rng::uniform to not provide the wrong result (1.0) once in every 2^32 times - -commit 3943287ad0879774856136c8ae417c5ad8519585 -Author: stevemadere -Date: Wed Feb 11 23:03:23 2004 +0000 - - Made mlp::net::operator() a virtual function to allow for subclassing - with networks that transform their input or output. - -commit 250d31f904478a4492122197195e3c626a05abad -Author: stevemadere -Date: Tue Feb 10 22:33:30 2004 +0000 - - Fixed some signed/unsigned conversion bugs - -commit 68e970e455b3d8f91a304b8c2ab3eac9ec8d41e5 -Author: jeggermo -Date: Mon Feb 2 08:54:10 2004 +0000 - - *** empty log message *** - -commit b2de3403a622e66cff6d7949254a1b09c47cf6c9 -Author: maartenkeijzer -Date: Wed Jan 21 19:57:19 2004 +0000 - - Added define NO_GNUPLOT to disable gnuplot extensions - Needed for win32 (well, at least for me) - -commit 0a9f57e6521f4515ee8b9117970b0a4f4abca5c2 -Author: stevemadere -Date: Tue Jan 13 20:28:33 2004 +0000 - - Fixed the string serialization operators (>>, <<) for neuron, layer, - and net so they actually work and added or fixed stream-source - constructors where appropriate. - -commit 4662677a5feed26ab63dbd7d0f5b04defc09ab8d -Author: stevemadere -Date: Tue Jan 13 20:21:52 2004 +0000 - - Made it compile under gcc 3.2.2 by adding explicit definitions - of normally derived comparison operators >, >=, and == for the - structure phenotype. ( adding #include was not sufficient - to solve the problem) - Also added function gprop_use_datasets() to give more flexibility - in subclassing the datasets used to train the nets. - -commit 31aa0eedf761de4d8ac5aa18f38a697893d00762 -Author: evomarc -Date: Tue Jan 13 03:35:27 2004 +0000 - - Added the standard header - just a test of CVS in fact! - -commit c819ba4f6afb25a96750523d8dac87a6a5032f92 -Author: evomarc -Date: Wed Dec 24 16:38:02 2003 +0000 - - Corrected a but in eoUniformMutation (only the first component ever got modified! - Thanks to Jeroen's student ... - -commit a3d7e396b41c4006178ac4a24dfee1b52fb2d128 -Author: evomarc -Date: Fri Dec 5 05:39:40 2003 +0000 - - There was an infinite loop in case of a file without section header on first line! - -commit 041791eb4b2b96ceefde882df5ed60a19dfcc109 -Author: evomarc -Date: Fri Dec 5 05:38:02 2003 +0000 - - Added a few user-friendly comments in case sizes don't match between - load file and required popsize - -commit 926286b969e353253ada6e45dfcc25c4094ce8ac -Author: evomarc -Date: Wed Nov 26 14:20:26 2003 +0000 - - A minor typo ... - -commit f71b436120da7b742922ca4302a6502b1b19251e -Author: evomarc -Date: Wed Nov 26 11:15:59 2003 +0000 - - THe call to randomize was forgotten after the choice of a terminal - at max_depth. - This was only visible if - - you implemented the randomize method - - you reached the maximum depth (or used ramped half-and-half). - -commit aa76efbb29585762a8a337c6507ae2a4997b33ec -Author: okoenig -Date: Wed Nov 19 13:29:15 2003 +0000 - - Added possibility to print header to first line of output file; control through last bool in constructor - default = false... - -commit 7c8da3722ef023bba9c463d70c49bdf0e1c7d5a4 -Author: jeggermo -Date: Tue Nov 4 15:32:24 2003 +0000 - - parse_tree.h now uses standard memory allocation - for MacOSX - -commit 099b24d3639cf9c04342fe1976ce5f542f9b7719 -Author: jeggermo -Date: Tue Nov 4 15:29:24 2003 +0000 - - eoData has been changed slightly for MacOSX - -commit 91c45767c03629341f8977bbf42ca36844e6f03e -Author: maartenkeijzer -Date: Sun Oct 12 23:49:23 2003 +0000 - - oops, forgot std:: - -commit fd2fcc8e2ba7ffe6bca2e0a88a38d013d798c28a -Author: maartenkeijzer -Date: Sun Oct 12 20:53:28 2003 +0000 - - Sort dissappeared in one-objective - -commit bc1e98a65af47e7e9ad4dde5fe6714693b1ca768 -Author: evomarc -Date: Sat Sep 20 05:42:23 2003 +0000 - - Updated lists of headers in some Makefile.am (thanks to Claude Dion for pointing this out) - While there, changed the presentations of source and headers (1 per line with \) - -commit 31971866e84465a481b0a3136c490b5a4c3714fb -Author: evomarc -Date: Thu Sep 18 15:09:34 2003 +0000 - - Modified a wrong link - -commit 45a2d08432942c1998786cbb28af9604f0cd6e18 -Author: evomarc -Date: Tue Sep 2 05:49:37 2003 +0000 - - Slightly modified the formula: the worst individual had "fitness" 0 in hte case of linear scaling with pressure=2. Now it has fitness 1/[P(P-1)/2] - Thanks to Gilles BAUDRILLARD (EADS) - -commit 0f8244e6940f640fea5429b54b18f34c906a29fe -Author: evomarc -Date: Mon Sep 1 12:56:29 2003 +0000 - - Added 2 missing headers (and broke the long lines). - Thanks to Jochen KĂĽpper for pointing this out. - -commit baeeeec1e51873e3eca706458742cfb35569aed8 -Author: evomarc -Date: Tue Aug 26 18:07:06 2003 +0000 - - Corrected a HUGE bug in eoRealUXover !!! - Thanks to Gilles BAUDRILLARD - EADS - -commit aac8ff6cb98f5a4a5ae4482dfe4381f0916dd6d6 -Author: okoenig -Date: Thu Aug 21 13:02:53 2003 +0000 - - added parameters to the constructors to start generation counting !=0 - the parameters are optional and appended in the end - -commit 4238ee1bd3d1721821b87f86873fb9cadcfd4325 -Author: evomarc -Date: Sat Aug 2 06:55:47 2003 +0000 - - CLean-up - -commit 3a8d9dd7a9e038b70900d857a857eb18d30dd1d8 -Author: evomarc -Date: Sat Aug 2 06:42:33 2003 +0000 - - Adding the generic operators for FIXED-LENGTH ORDERED genotypes eoFlOrXxxOp.h - -commit b643ec2be3d7c58534591696f0a50d76b505171a -Author: okoenig -Date: Wed Jul 30 14:48:13 2003 +0000 - - Inserted a missing std:: - -commit 5c7f17c1535234202caa29955da35432dba94ecd -Author: evomarc -Date: Tue Jul 29 05:33:58 2003 +0000 - - Forgot the dir when adding eoSBXcross.h :-((( - -commit c249cecc62342b8f57e1979db27662bf00c5ed43 -Author: evomarc -Date: Mon Jul 28 09:48:58 2003 +0000 - - Adding SBX crossover operator in es dir - -commit 4c2d0f2ea090cca5e2b2c69217325450765abea0 -Author: evomarc -Date: Mon Jul 28 09:47:15 2003 +0000 - - Adding the SBX operator in es dir - -commit 334f5ce3d7f619532d11d738674ce3623eef3ab8 -Author: evomarc -Date: Sat Jun 21 06:34:00 2003 +0000 - - More precise comment - -commit 0b5a174da0edafeb631b73f18c021da799c2c1e3 -Author: jmerelo -Date: Wed Jun 18 09:07:19 2003 +0000 - - Eliminated using namespace std - -commit b354bd51f8e996c9da457540d876d83b8e07e878 -Author: jmerelo -Date: Tue Jun 17 12:03:42 2003 +0000 - - better eoString - -commit e17eb77e3918e532cc7ff2b04cc09b6553c8d9bc -Author: jmerelo -Date: Tue Jun 17 06:24:15 2003 +0000 - - Changes to obsolete things - -commit 2184dc845fa316256226d880d4a18b82a23d7e3b -Author: okoenig -Date: Mon Jun 16 21:41:30 2003 +0000 - - added a public bool feasible, used to identify feasible individuals in initialization processes - -commit ed7902ed909d3a5086d3b124509e69d56a9223aa -Author: maartenkeijzer -Date: Mon Jun 9 06:25:11 2003 +0000 - - Exported operator() for eoSGATransform in abstract1.cpp - -commit 21301c327dfd2f357beb1307429840f1921130df -Author: evomarc -Date: Mon Jun 9 06:17:26 2003 +0000 - - Change in terminology: EDA (Estimation of Distribution Algorithms) replaces - DEA (Distribution Evolution Algorithms), as it seems more widely used today. - -commit d6cce45ad058b2fe50fe7e435f6390b6d30cb2d6 -Author: evomarc -Date: Mon Jun 9 06:06:13 2003 +0000 - - Change in terminology: EDA (Estimation of Distribution Algorithms) replaces - DEA (Distribution Evolution Algorithms), as it seems more widely used today. - -commit 0a85f1780322d65499b3970214d9ca64aedd3062 -Author: maartenkeijzer -Date: Fri Jun 6 10:29:13 2003 +0000 - - Improved the check for changed. Now it will only set the changed flag when the elements that are flipped are actually different - -commit 43b5effcdb9acb5c021303c9ea6276d10206e9e9 -Author: maartenkeijzer -Date: Wed Jun 4 11:50:48 2003 +0000 - - added shuffle - -commit b6104c6f324bbfa84e53746e298533dfcdcc5b6b -Author: maartenkeijzer -Date: Wed Jun 4 09:34:26 2003 +0000 - - Added tests for roulette wheel selection - -commit a7b5d90f1b4bcd622a156d527c7edfbfe63eec7e -Author: maartenkeijzer -Date: Wed Jun 4 09:33:27 2003 +0000 - - optimized eoProportional and added universalselect - -commit 347f64413e4f087a6bd0c399292897ad9aa2be07 -Author: jeggermo -Date: Fri May 16 14:28:52 2003 +0000 - - GCC 3.3 - -commit 364cded6a4e5dbf7aa6797ca401fcecdd38292f9 -Author: evomarc -Date: Sun Apr 27 06:08:11 2003 +0000 - - Added keywords "Sequential" and "Random" as synonyms of resp. "Deterministic" - and "Uniform" - for EASEA - -commit af5fee947894d5c84d72cdec2cd1bc7be8564456 -Author: maartenkeijzer -Date: Sun Apr 20 12:57:59 2003 +0000 - - Removed HAVE_SSTREAM for redhat 2.96 - -commit ba68ffe0c2ea46b0f3542d1d3fa3668533dea2fd -Author: cahon -Date: Fri Apr 18 13:32:39 2003 +0000 - - missing include eoParetoFitness.h - -commit d51ee5916b7df005131f4b6321883551c1eda225 -Author: okoenig -Date: Sat Apr 5 13:42:44 2003 +0000 - - minor changes - -commit c39b2414134f0532ac6aed667d58b708453b725d -Author: okoenig -Date: Sat Apr 5 13:42:01 2003 +0000 - - added eoAssembledFitnessStat.h to implement Best and Avg Stat for eoScalarFitnessAssembled - -commit 45e3b86bcb011b833182e1610bba02319d1f8e7b -Author: okoenig -Date: Sat Apr 5 13:40:57 2003 +0000 - - Removed function template specializations for eoScalarFitnessAssembled from classes in this file, since they do not work under Visual Studio! Reimplemented these stat classes for this new fitness class in eoAssembledFitnessStat.h - -commit a172d34e5fb35d82877bfc7eec11c867b3b5b53b -Author: okoenig -Date: Thu Apr 3 16:51:47 2003 +0000 - - Included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. - -commit f587793a6ab481e90bf4a81917db86aa104fddbf -Author: okoenig -Date: Thu Apr 3 16:47:47 2003 +0000 - - Minor changes to make it run under Visual Studio 6.0 - -commit 9b6619687083b3e5c1b6786106935f9033959dd5 -Author: okoenig -Date: Thu Apr 3 16:25:55 2003 +0000 - - Minor changes to make it run under Visual Studio 6.0 - -commit a63c6ee2ba55cfd2b0b6502c114c2ae8d150b7d7 -Author: okoenig -Date: Thu Apr 3 10:44:35 2003 +0000 - - Minor changes to make it run under Visual Studio 6.0 - -commit ce04cca4b9a2533cc7bb7c28d333e29e1f3adc06 -Author: okoenig -Date: Thu Apr 3 09:23:52 2003 +0000 - - Minor changes to make it run under Visual Studio 6.0 - -commit 1d70ba7a9bda4ba4c7d06dc002a4b08002bc897f -Author: okoenig -Date: Thu Apr 3 09:11:17 2003 +0000 - - Minor changes to make it run under Visual Studio 6.0 - -commit b3e57bedad0f6e5b92243ff5dc582c34906b6f13 -Author: okoenig -Date: Wed Apr 2 21:10:53 2003 +0000 - - included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. - -commit eb279c8f98cbe975ac219f0aac4a9fa40c5a6473 -Author: evomarc -Date: Tue Apr 1 12:09:37 2003 +0000 - - Removed a dummy line containing reference to lesson3! - -commit 9a636428ba45165b33c2d88d79f9a3c0309c2a99 -Author: maartenkeijzer -Date: Tue Mar 25 10:46:08 2003 +0000 - - Deleted political statement as I changed my mind about this - -commit 59fe39da93b95e598a4e553283ff726f89d99117 -Author: evomarc -Date: Sat Mar 22 06:39:21 2003 +0000 - - ADded comments and hook for copy constructor - -commit f64292b777c9934b91a53ccbfa3c1f5aac7a8480 -Author: maartenkeijzer -Date: Fri Mar 21 09:17:38 2003 +0000 - - bumped up the version number - -commit fda39068afaf8d2f7a25f07b4b7bcdad614dfbad -Author: maartenkeijzer -Date: Fri Mar 21 02:44:05 2003 +0000 - - now added an std::ends for plotting strstream - -commit 6f9894421280430c09d37bbe066552ef31c12db1 -Author: maartenkeijzer -Date: Fri Mar 21 02:41:54 2003 +0000 - - again: std::ends and stringstream - -commit eaabc7ae3b0f8c861be49cf80013ee2f680d01a9 -Author: maartenkeijzer -Date: Fri Mar 21 02:39:09 2003 +0000 - - fixed (?) some problems with stringstreams and std::ends - -commit 07a3e56db177c1912ddeb3920f4198022eb96eb0 -Author: maartenkeijzer -Date: Thu Mar 20 20:00:38 2003 +0000 - - eliminated gprop from the build until someone makes sure it builds under gcc-3.2 - -commit b15d1cef39bd57a0138d2915c84f2eac3c7eeb10 -Author: maartenkeijzer -Date: Thu Mar 20 19:49:32 2003 +0000 - - replace \0 with std::ends - -commit 27f9ae089461338d671021075a9d4b0ab04426d4 -Author: maartenkeijzer -Date: Wed Mar 19 10:47:08 2003 +0000 - - finished pickling support for valueParam - -commit 95d3c19211519d546f2b11ee2f84f46aa9f53dca -Author: maartenkeijzer -Date: Wed Mar 19 10:16:56 2003 +0000 - - Added pickling support for ValueParams - -commit 380d4eca0b3daa8c46c318ec97f006c5ce837367 -Author: maartenkeijzer -Date: Wed Mar 19 08:53:59 2003 +0000 - - removed comment in PyEO.cpp - -commit 9512291e3e0c9e376b7ec430b430812bc64ea9e2 -Author: maartenkeijzer -Date: Tue Mar 18 16:57:17 2003 +0000 - - added operator> - -commit 19fe39105678ae3590e0f174fead7031f091e648 -Author: maartenkeijzer -Date: Tue Mar 18 16:52:31 2003 +0000 - - fixed a bug reported on sourceforge - -commit 01de9c47632ede7734082f0c623fa6c61456e9f8 -Author: maartenkeijzer -Date: Tue Mar 18 16:35:27 2003 +0000 - - *** empty log message *** - -commit a597ec6f8a82fa95ed9a9b651653fd89790b03a7 -Author: maartenkeijzer -Date: Tue Mar 18 09:40:36 2003 +0000 - - excluded gcc>3 from check - -commit cde5b5d22bd809a74ce23f173481dce419af546c -Author: maartenkeijzer -Date: Tue Mar 18 09:35:46 2003 +0000 - - hi - -commit 33fae18bdd9b846c75c11cc4f2892ed65b858a86 -Author: maartenkeijzer -Date: Sun Mar 2 11:35:43 2003 +0000 - - decorated sort and max with std:: specifier - -commit 0441872bea2c37a589fbb6ce7ceb4e2163356c0e -Author: maartenkeijzer -Date: Sun Mar 2 11:29:01 2003 +0000 - - decorated copy with std:: specifier - -commit e5c83ac2e815fe13de135552711d8d1e2488f6e6 -Author: maartenkeijzer -Date: Sun Mar 2 11:26:45 2003 +0000 - - added typenames for pop::iterator - -commit adab0958408647b78852c792d5f2a6f6bc6d9bb2 -Author: maartenkeijzer -Date: Sun Mar 2 11:16:33 2003 +0000 - - added include file - -commit c2bad596f2d06fe90586721f9b3a3fca921dfeb4 -Author: okoenig -Date: Fri Feb 28 17:47:24 2003 +0000 - - This Makefile.am was missing; all it does is adding the *.h and Readme files to distribution - -commit d250c9edf6fe94f4451ba8fbbe1449d42fdee8ec -Author: maartenkeijzer -Date: Fri Feb 28 16:56:59 2003 +0000 - - oops, forgot thisone - -commit 153b80440c12cd996753be6a48902cc700fff043 -Author: maartenkeijzer -Date: Fri Feb 28 16:49:19 2003 +0000 - - changed to using sstream - -commit 86fa476c675b313b58dffc505c00ce6703d10a47 -Author: okoenig -Date: Thu Feb 27 19:28:07 2003 +0000 - - Removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. - -commit 6441ea1ec3e24816b961c2396ab21afd21a5e206 -Author: okoenig -Date: Thu Feb 27 19:18:53 2003 +0000 - - removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary - -commit 89a99dab17def7fdd612d7ac69981ffd05933ef2 -Author: okoenig -Date: Thu Feb 27 19:18:07 2003 +0000 - - removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. - -commit 4052187a6c266513637faee8dca00f94c136462f -Author: okoenig -Date: Thu Feb 20 19:13:33 2003 +0000 - - added an #ifdef _MSC_VER statement to hide "typename" identifier for Visual Studio - -commit 1bac8a427a0e11634a4e2b00c1cc982ca7e5e6de -Author: maartenkeijzer -Date: Mon Feb 17 10:42:03 2003 +0000 - - added std:: - -commit ff2968bd6004bdf1323c029ffad084003a432d7d -Author: maartenkeijzer -Date: Mon Feb 17 10:19:25 2003 +0000 - - Updated to use gcc-3.2 - -commit fc1113aad63257dbfb5b638d0d1836dbb70a7271 -Author: maartenkeijzer -Date: Mon Feb 17 09:52:36 2003 +0000 - - rolled back unfortunate change in eoAverageStat - -commit a339a548c3e41f5836821abce1dc6debea54ceb1 -Author: evomarc -Date: Sat Feb 8 05:36:01 2003 +0000 - - Added a mthod to remove one of the combined things (from RamĂłn Casero Cañas) - -commit 149ad68cb5c1c4699b3b77661b22cb2df744df91 -Author: evomarc -Date: Sat Feb 8 05:24:51 2003 +0000 - - Removed debugging printouts - -commit 395ca20a5cd6740fea2dbe9a978ada6bc19cc057 -Author: maartenkeijzer -Date: Tue Jan 14 10:09:28 2003 +0000 - - added missing valueparm.h" - -commit b5d1a95cf6cbcbf02934d8df8fc48c84c4f3306e -Author: maartenkeijzer -Date: Tue Jan 14 09:37:45 2003 +0000 - - next iteration - -commit 01727c5a5d5b19c1a36fcc6fead0f74c7ebb7ec7 -Author: maartenkeijzer -Date: Fri Jan 10 15:42:45 2003 +0000 - - found a bug in eoProportionalOp, hope this helps... - -commit ea2e36954268c31d72a0aef96ff653f793cd7dab -Author: maartenkeijzer -Date: Fri Jan 10 15:41:17 2003 +0000 - - Added monitors and statistics, also made a module with some - specific python stuff in __init__.py - -commit d953d25f089ec71cdaf8ca9e14fcf24dc06aa886 -Author: okoenig -Date: Wed Jan 8 12:43:31 2003 +0000 - - bugfix: since there are no Makefiles in the directory ~eo/src/do anymore, I removed this directory from the subdirs list in this Makefile.am - -commit c6b4f255d99b65341aba4074a2c8383f189a0821 -Author: maartenkeijzer -Date: Tue Jan 7 14:24:56 2003 +0000 - - some bugfixes - -commit efafbb6f055e113d7f9b1e56f178a64af78862a5 -Author: maartenkeijzer -Date: Tue Jan 7 10:50:23 2003 +0000 - - df - -commit db1e3c38f4e9dc6f978e76f4d06df33e25107e3e -Author: maartenkeijzer -Date: Tue Jan 7 10:49:55 2003 +0000 - - added a small cookbook - -commit 423daa36d2451f6228c7b9587bdec4ddb0d1c558 -Author: maartenkeijzer -Date: Mon Jan 6 21:56:40 2003 +0000 - - needed for redhat - -commit 5bf5b1e5cbf5cc549f5325578e09f5ae95bd529c -Author: maartenkeijzer -Date: Mon Jan 6 16:11:05 2003 +0000 - - added - -commit 0a4fb5503110283a08787bfb361f7a5e30b75c84 -Author: maartenkeijzer -Date: Mon Jan 6 16:10:38 2003 +0000 - - Added multi-objective support to PyEO (and changed its name to that) - -commit 3267a3419160e5ec4daad7462ca0616a275557cb -Author: maartenkeijzer -Date: Mon Jan 6 14:25:40 2003 +0000 - - Changed a few things so that the python library can - be used with the multi-objective library (it basically - boils down to removing the assumption that fitness() has a - size() member function and changing eoPop to vector) - -commit 34911abaa4a734e441a189f8477cbab8d1c9cd48 -Author: maartenkeijzer -Date: Sun Jan 5 16:45:48 2003 +0000 - - updated build info - -commit 131e0e033d6089acc49ff32dd2c0ffb24271d174 -Author: maartenkeijzer -Date: Sun Jan 5 16:31:50 2003 +0000 - - Added pyeo. Some changes needed to be made for include files and the like - in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) - - eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. - -commit 3937dd0fd6a04e72a29a3219a037fd5c1fdd813d -Author: maartenkeijzer -Date: Sun Dec 29 22:48:01 2002 +0000 - - oops, error in line 47 - -commit 995cb2bd4ac4019197f61b4834681239eb5bbdeb -Author: music_dev -Date: Sat Dec 14 02:51:53 2002 +0000 - - Added compatibility for MSVC.NET - -commit dc42894fb7f652f091441182e2a483fc88be2b4f -Author: cahon -Date: Fri Dec 13 10:03:47 2002 +0000 - - Fixing bug [preserve order of the pop. to evaluate] - -commit 3e673f6a8e539f407f9905c8ceea8892e9b9dd8d -Author: evomarc -Date: Mon Dec 9 21:04:47 2002 +0000 - - There was a bug in teh Ctor (fortunately, only with the last - parameter, that was generally used with the default value). - Thanks to RamĂłn Casero Cañas - -commit 21e07e03a9f0857924b2edac89a6a4f5e627380e -Author: evomarc -Date: Mon Dec 9 06:57:33 2002 +0000 - - Corrected wrong links in the 1st paragraph - -commit b5d61be21afa7c82be1d19c53b67fd0e7d30fc74 -Author: evomarc -Date: Mon Dec 9 06:19:56 2002 +0000 - - Corrected an error in name of statusParam parameter - -commit cf40eab455a1d32c183ce0650fa7b8ea87c7f53a -Author: evomarc -Date: Mon Dec 9 06:17:25 2002 +0000 - - Corrected a typo - -commit 21d5630c3a09591f3c0b96bd8d56cc5302aff408 -Author: okoenig -Date: Sun Nov 3 13:17:48 2002 +0000 - - reordered initialization list to match declaration order - -commit c175b152bcf51a839e8c6ce8bb99341a9da05666 -Author: okoenig -Date: Sun Nov 3 13:07:43 2002 +0000 - - added some typename statements to make it compile without warnings under gcc3.2 - -commit 5054418a6639349b502ac288c511c8452d4a92f3 -Author: okoenig -Date: Wed Oct 23 10:23:03 2002 +0000 - - small bugfix, to make this example run under Solaris/g++ 2.95.3 - -commit 27d7739aa999ab983d6c377a70f6a2eb9d8876f4 -Author: evomarc -Date: Wed Oct 23 04:43:10 2002 +0000 - - Adding depcom so that it compile smoothly on Solaris. - Thanks to Oliver Koenig - -commit dc758a4854faa84c368191f0e3e31b837a58f227 -Author: evomarc -Date: Wed Oct 23 04:42:07 2002 +0000 - - Modification of all Makefiles so that it compiles smoothly on Solaris. - Thanks to Oliver Koenig - -commit 7dfe081489384a89f6459bf237f5f14b6df8ff72 -Author: evomarc -Date: Mon Oct 21 04:28:11 2002 +0000 - - Added the .SUFFIXES lien (for Solaris) and the use of $(CXX) instead of c++ - plus a few comments :-) - -commit 2b8b491f0b8fcac780b2358aeed5e7866ad7d01e -Author: jeggermo -Date: Fri Oct 18 11:39:09 2002 +0000 - - *** empty log message *** - -commit 0aac89e6b38a5d707f1e15c7062ca4e96b8f964f -Author: music_dev -Date: Mon Oct 14 16:16:01 2002 +0000 - - Better install for libraries. - -commit 62db7800fc02efd12be37aa652a212f73e7c0613 -Author: evomarc -Date: Wed Oct 2 14:07:58 2002 +0000 - - Removed the stringstream (sstream not in all compilers distributions) - -commit 43d42510bc71521c023207c07031182a029ec89c -Author: evomarc -Date: Wed Sep 18 15:36:41 2002 +0000 - - Added accessors to private parameter stopOnUnknownParam - -commit eca6dcef8eaad6a27f8651d70e57df632859c54b -Author: jeggermo -Date: Wed Sep 18 12:40:46 2002 +0000 - - A new readFrom & printOn function for EO.h - Now it CAN handle VALID/INVALID fitnesses. - - The problems are over at last - -commit fa675dd55e12606e4742fc858b011e3fe1f42cea -Author: cahon -Date: Tue Sep 17 07:08:51 2002 +0000 - - Allowing a first eval. of the pop. to be performed by the E.A. - -commit 4d786ef3ce32590496ced6e4dc6b44d792b17221 -Author: cahon -Date: Mon Sep 16 12:53:08 2002 +0000 - - Invalidating flags ... - -commit 746516a67553ea3b0b54f5c7992bac4077a61154 -Author: evomarc -Date: Thu Aug 29 16:44:30 2002 +0000 - - Added a missing test in the weak elitism - -commit f81d92a0af1e8c291ea91174ddd711b1590f6de2 -Author: evomarc -Date: Thu Aug 29 16:31:50 2002 +0000 - - Added an error message in case of unknown reducer - (was the source of a segmentation fault with old parameter files) - -commit d4093063cbed71039571e0937bdd76060d901d42 -Author: evomarc -Date: Fri Aug 23 16:06:06 2002 +0000 - - Removed non-tested code (forthcoming)... - -commit 90a3e34c7f5f8d2d771deb9d7aeadacc72150a80 -Author: evomarc -Date: Fri Aug 23 16:02:02 2002 +0000 - - It was about time to enter the template file for EASEA here, as createSimple - and EASEA are doing approximately the same job ...` - -commit 61f9b5124345233bedafd68d245363e1c4701ea9 -Author: evomarc -Date: Fri Aug 23 15:58:15 2002 +0000 - - Adding a simpler way of generating files for new genotypes (see EO.tpl - in EASEA). - -commit 06ac548f96a1867936bb4eac0fcfc22bdb684eb9 -Author: evomarc -Date: Fri Aug 23 15:56:09 2002 +0000 - - Adding more repalcements utilities (see do/make_easea_algo.h) - -commit 065cc646aa253f0379d726a435067f4bf6e4435c -Author: evomarc -Date: Fri Aug 23 15:54:30 2002 +0000 - - Adding replacement strategies: teh ReduceMergeReduce for EASEA and the - MGG and G2 replacements from Deb's PCX paper - -commit 7bf32a66fd13766b499859733fe362422ffb65af -Author: evomarc -Date: Fri Aug 23 15:52:40 2002 +0000 - - Adding make_xxx files for EASEA - -commit c856f433b23df7b34655de3352c35691455a4ab8 -Author: evomarc -Date: Fri Aug 23 15:50:57 2002 +0000 - - Adding eoSGAGenOp.h - mimicking eoSGATransform into an eoGenOp - -commit 6c2539d81f9aa623fa580e8dd305f13d4b56368f -Author: evomarc -Date: Fri Aug 23 15:49:29 2002 +0000 - - Added the invalidate method - -commit 5274c852f1b7408c39bf8f0446bf58a519070987 -Author: evomarc -Date: Fri Aug 23 15:44:27 2002 +0000 - - Tiny details - -commit 18cd20da78d48f9fc517006fd819234f0605c156 -Author: evomarc -Date: Fri Aug 23 15:41:00 2002 +0000 - - Added bounds to FitnessStat and Gnuplot monitor - -commit 86c7c8fe958caed3a08f2caa3f1c68a9f9a41619 -Author: evomarc -Date: Fri Aug 2 07:40:47 2002 +0000 - - Removed some multiple declaraions inside for loops that MSVC++ doesn't like - -commit 0caf6259e9c3a6a757f6db9446b80f0fce315bec -Author: evomarc -Date: Tue Jul 30 03:21:59 2002 +0000 - - Removed a typo that made gnuplot file not be in the RESULT directory - -commit 4ec08e8b103e1e5681413035cc15aa067a6c3662 -Author: evomarc -Date: Sun Jul 28 05:40:25 2002 +0000 - - Added eoReduceMergeReduce and elitism (+ corrected small bug in eoHowMany) - -commit 98a1441137b0ad8de71279dbdb53e172d578742e -Author: evomarc -Date: Wed Jul 24 18:08:30 2002 +0000 - - A radical change in eoCheckPoint - though invisible from the outside: - eoCheckpoint now alos contains a vector - and not only - IS A eoContinue. So you can ADD another eoContinue to an eoCheckpoint... - -commit bc7aee869fc4e6dc7ea5214be8711b22659a07e7 -Author: evomarc -Date: Wed Jul 24 18:05:18 2002 +0000 - - There was a problem with the activation of the Ctrl C - -commit 030be821326dd8b5a81460bbedc701b7210c5f60 -Author: maartenkeijzer -Date: Tue Jul 23 09:34:46 2002 +0000 - - added EO.h to include list - -commit 5914ad91956e543c44dc0ccd47b1b14f7c218be0 -Author: maartenkeijzer -Date: Tue Jul 23 09:17:59 2002 +0000 - - Run it for 50 generations, it's too fast otherwise :) - -commit 7e5907eae245fe102033c5e949c78e9394a4b0e1 -Author: maartenkeijzer -Date: Mon Jul 22 13:35:11 2002 +0000 - - oops, that should teach me to compile before commit - -commit c55fcdbb3f8c329ca848105a213dac865e0a82ec -Author: maartenkeijzer -Date: Mon Jul 22 13:31:55 2002 +0000 - - added a 'nasty_declone_flag' to be able to declone a population - -commit 3b6a88f34e128ebabaef11d1680de7d620028e0d -Author: maartenkeijzer -Date: Mon Jul 22 13:20:04 2002 +0000 - - Added 'sweepline' optimization for eoNDSorting.h - -commit 7f550d008e88160a4438a28e3da400a0dfc12702 -Author: evomarc -Date: Sat Jul 6 05:24:51 2002 +0000 - - Added eoSequentialSelect.h in the includes - -commit a7a1ed2326c6bf0ea86b2f3126769beeae781f9e -Author: evomarc -Date: Sat Jul 6 05:23:18 2002 +0000 - - I had left a flaw in teh Ctor (did not accept rates >1) - -commit e2e876790274513d5f38ac4c08b77d639e6cdf77 -Author: evomarc -Date: Fri Jun 21 13:50:39 2002 +0000 - - Changd a const_iterator to iterator in method it_best_element - God (or Maarten :-) knows why this was there - -commit 427ed0f5bfa029d59086b91df1cdb6ccceae5de6 -Author: evomarc -Date: Fri Jun 21 13:30:17 2002 +0000 - - Added the negative rate (-> 1-rate) and the unary operator- (useful - in eoG3Replacement) - -commit 6501b48ac44c29dff795c712572ea301ac888a37 -Author: jeggermo -Date: Thu Jun 20 12:38:47 2002 +0000 - - small typo - -commit eb6e630a276cfbfb3e53263054edfcbaadcd5fdf -Author: evomarc -Date: Wed Jun 19 03:42:54 2002 +0000 - - Replaced ../../src with the DIR_EO macro! - -commit 2779191f635f24557e377c75bf1c91326fe404c7 -Author: evomarc -Date: Mon Jun 17 09:19:17 2002 +0000 - - Added include file eoHowMany for self-consistency - -commit 801b84fc0c12e3b58bbe733c9ac156ad4e3823bd -Author: evomarc -Date: Mon Jun 17 09:18:37 2002 +0000 - - Removed eoSequentialSelect - -commit c3aa9710a1f2692bcf86961ffd90c887e5cdf3ad -Author: evomarc -Date: Mon Jun 17 09:13:47 2002 +0000 - - Added the Truncation embedders, and the separate eoSequentialSelect file - -commit 5bdfaf0eaa23265ca59aebd5e64fba2d966c885a -Author: evomarc -Date: Mon Jun 17 09:12:08 2002 +0000 - - Separated eoSequentialSelect from eoRandomSelect.h file - Added eoEliteSequentialSelect, where best is always selected first, useful for - G3 engine - -commit a764bb57828198e5d6463d6589fe856d90ff0a3a -Author: evomarc -Date: Mon Jun 17 04:51:34 2002 +0000 - - Reshaped the whole code - Added the SequentialSelect selectors - THe generated files are now "hidden" in ResSelect dir (hardcoded!) - -commit e9e3cbb62305520773e8e10d353dda9659e57c83 -Author: evomarc -Date: Mon Jun 17 04:13:45 2002 +0000 - - Adding the truncation selectors. - 2 versions: eoTruncatedSelectOne is an eoSelectOne, and - eoTruncatedSelectMany works like an eoSelectMany (but is NOT) - -commit 86df5ac367e889076b2f553388a455f500649a2b -Author: jeggermo -Date: Mon Jun 10 14:10:35 2002 +0000 - - all .dsp files converted from unix to dos format - -commit 43f0d7ea79773efcc95c5f5eff49880bc1f178a7 -Author: evomarc -Date: Wed May 22 02:13:06 2002 +0000 - - I had forgotten the real_value.h - SecondRealEA did not compile! - -commit 2e87ffd00f6f0810836d41ba3f798421b509ab9c -Author: jeggermo -Date: Mon May 13 11:31:32 2002 +0000 - - EO::printOn has been changed so that the printOn function will - always print a valid fitness value even if the fitness is invalid - - Jeroen - -commit 07f2de55dc48b41ac8173fed9af70687bdf84208 -Author: jeggermo -Date: Thu May 9 15:43:01 2002 +0000 - - ramped half and half initialization has been added to eoParseTreeDepthInit - -commit d3762cdff2a35f7b21b37f8982dbdc16a95b53dd -Author: evomarc -Date: Thu May 9 06:35:34 2002 +0000 - - Still introducing ParadisEO - -commit 1611bc663c2586963cc6ac50635c7ed29d7cf214 -Author: evomarc -Date: Thu May 9 06:28:34 2002 +0000 - - Added references to ParadisEO and Lesson5 - -commit 0ce2809cc7d3404c7511df767f9a32b1b870393d -Author: evomarc -Date: Wed May 8 06:55:21 2002 +0000 - - Added Lesson5 - -commit d17ec8cf774a6f5ae032a9b17f74e51fba46f828 -Author: evomarc -Date: Wed May 8 06:52:37 2002 +0000 - - Updated version number - -commit c5e225551ae397fa715efffd3fe2c3b23ee8a427 -Author: evomarc -Date: Wed May 8 06:50:58 2002 +0000 - - Adding the Lesson5 - how to create your own genotype - -commit b407bf5e8194c2ef8c26f1967b0a8e6814148d7c -Author: evomarc -Date: Wed May 8 06:47:50 2002 +0000 - - Added the MyStructLibEA.cpp+make_MyStruct.cpp that allow separate - compilation of representation-indenepent stuff. Modified create.sh script - and Makefile accordingly. See Lesson5 of the tutorial - -commit e2e2f39cc75fa318c9afb742da0dd680e2900d3c -Author: evomarc -Date: Wed May 8 06:44:04 2002 +0000 - - an example of how to make a new genotype within EO - see HTML doc - -commit f2e20f638ef69d87bc52b6cfb349c8ef9b47e769 -Author: evomarc -Date: Wed May 8 06:31:18 2002 +0000 - - Replacing Paradiseo(jet7).pdf with paradiseoJet7.pdf because of Unix problems - with names containing commas - -commit 5b3b5d79fab1c87164a8b2aa04205046b971a63a -Author: evomarc -Date: Wed May 8 06:14:23 2002 +0000 - - Removed the template_depth argument (since we are finally NOT going for - the fitness_trait stuff). - -commit a4883fda9baf11393028aaea7f4e89b478413efc -Author: evomarc -Date: Fri May 3 05:12:32 2002 +0000 - - Replaced the eoParameterLoader parameter by an eoParser (used everywhere now) - -commit ee5297a57399cee872b2a5c2d1e3dd0899e3c9a2 -Author: evomarc -Date: Wed May 1 04:04:15 2002 +0000 - - eoParameterLoader -> eoParser - -commit 8998caa4ff0672d545dc6bd92df1c4d47502729e -Author: evomarc -Date: Wed May 1 02:44:54 2002 +0000 - - THe code for the 1/5th mutation was completely wrong! - -commit d4da2d9f7d787bb6d60a1ec397e681c852fd337d -Author: evomarc -Date: Tue Apr 30 05:10:49 2002 +0000 - - Turned the power function to sum - was untractable with long bitstrings - -commit 9c6121604a3689f6b7d8e7d5da4f6fc12070674f -Author: evomarc -Date: Tue Apr 30 05:07:52 2002 +0000 - - Added the calls to EO::printOn and EO::readFrom in the corresponding methods - so th euser does not forget to use these before writing/reading the actual eo - -commit 8b5b42a9f8511b8e527f9ee148cbaba8285312f4 -Author: evomarc -Date: Tue Apr 30 04:56:39 2002 +0000 - - Added utils/eoUniformInit.h - -commit d6e33dbaee8dba52974cb9887575afc27cb60e6a -Author: evomarc -Date: Tue Apr 30 04:54:25 2002 +0000 - - Copied from eoRndGenerators here is eoUniformInit, same thing but in the eoInit - hierarchy. - Useful to embed into higher levels eoInit - -commit 361741b72615be4dc6348f0c21ebcc20ec3f8505 -Author: evomarc -Date: Sun Apr 28 05:04:24 2002 +0000 - - Adding SecondRealEA - -commit 5c34d8ee79ad53e78ad08c4594d431b032fbff9a -Author: evomarc -Date: Sun Apr 28 04:38:38 2002 +0000 - - Adding SecongRealEA - mainly to prepare Lesson5 about adaptive parameters - -commit 8a2432b24e354b56caa496598576ee1abff83f50 -Author: evomarc -Date: Fri Apr 26 03:17:37 2002 +0000 - - Added explanation and examples of getORcreateParam usage - -commit 25a48948535878c5af054eb31f5cedcf927f22d5 -Author: evomarc -Date: Fri Apr 26 02:39:10 2002 +0000 - - Turned the code that was testing for the existence of the size parameter - in to the call to getORcreateParam (actually, this was where this code - has been tested the first time) - -commit 1e0717859d71d197bd11e06aba9b3b7a89c13563 -Author: evomarc -Date: Fri Apr 26 02:37:40 2002 +0000 - - Added the negative argument in Ctor to say that you want number - popSize - some fixed number - -commit d40ef9a053de0fab910bd3716e19d16030fdca28 -Author: evomarc -Date: Fri Apr 26 02:28:19 2002 +0000 - - Turned the createParam into getORcreateParam so that you can more easily - define them before (e.g. from the problem at hand). - This is useful specially for vecSize as some problems have predefined values - -commit c99bce368c067f77d7888e74d2087f4b0e90b0c5 -Author: cahon -Date: Thu Apr 25 14:26:02 2002 +0000 - - *** empty log message *** - -commit 9415bfad748178e7cf9810a544b3457e28fcecd6 -Author: cahon -Date: Thu Apr 25 14:10:22 2002 +0000 - - Adding cellular E.A. - -commit bffe8b0dfd1beff41da5dc883e8093d7a7826ffa -Author: cahon -Date: Thu Apr 25 14:08:26 2002 +0000 - - A toric topology for cellular E.A. - -commit 25b3719ce7e8c3351b1f46aca6d1dcff54f38162 -Author: cahon -Date: Thu Apr 25 14:06:43 2002 +0000 - - Cellular parallel easy algorithm - -commit d5b44015ab317c026d409f563a297e72220412c0 -Author: evomarc -Date: Tue Apr 23 09:56:49 2002 +0000 - - Updated the documentation (comments) - -commit 6d7fc8c69b0078d087b70fdd79a33e9ba9c91b8e -Author: cahon -Date: Tue Apr 23 09:16:51 2002 +0000 - - Slides from Jet7, March 2002, ENSTA Paris - -commit 70a4a2add5be1ba267beee98ed6cc84f7aa53055 -Author: cahon -Date: Tue Apr 23 09:11:58 2002 +0000 - - *** empty log message *** - -commit da53e1a382837a308d098f127092dfe4c1768fbe -Author: jeggermo -Date: Fri Apr 19 22:13:15 2002 +0000 - - A faulty constructor in eoParseTree caused some problems - -commit 09761ac2fc7dd6da6d894dabb478e1ade3dc1c87 -Author: cahon -Date: Fri Apr 19 15:24:07 2002 +0000 - - Slides from Jet7, ENSTA Paris (April 2002) - -commit 43779ba380959d0acfeeb686245335049d63e30a -Author: music_dev -Date: Fri Apr 19 14:42:47 2002 +0000 - - Multithreaded version. Changed name of lib to eo_lib[d].lib - -commit cec8f9136aa87d27aec88a86ae34fe96aec163e2 -Author: evomarc -Date: Fri Apr 19 14:06:50 2002 +0000 - - Templatized apply - added a return statement - -commit 9a56356c3376e59ee0b55afc04dff823d8f1aedb -Author: evomarc -Date: Fri Apr 19 14:04:25 2002 +0000 - - Replaced floats by doubles - -commit aa0437dc11c0d920051dc56032d472ea2d67b6be -Author: jeggermo -Date: Thu Apr 18 13:56:36 2002 +0000 - - new printOn and readFrom functions - (they look more like the eoBit ones) - -commit 34d474e6f6be91c71f775353852ce224a5a5fa82 -Author: evomarc -Date: Thu Apr 18 03:23:24 2002 +0000 - - Ome explanations on how to launch the examples - -commit d1ef6b2c0060cef4bd6902ad0d9164dc5c16defb -Author: evomarc -Date: Thu Apr 18 03:22:47 2002 +0000 - - Added the README, and modified the config files to remove the 127.0.0.1 - that was misleading - -commit 521f1b14ff12ddd4f9c18764a0e4b97c3975cfcc -Author: jeggermo -Date: Mon Apr 15 14:12:19 2002 +0000 - - *** empty log message *** - -commit 34c5efdcbf1a6a6cad577493bcb6dc1f5a8b98fe -Author: jeggermo -Date: Mon Apr 15 12:56:35 2002 +0000 - - eoParseTree printOn and readFrom functions changed for - compatibility with paradisEO - - The fitness is now printed in the same way as in eoBit - -commit 21372a2d821eaba3ac549fe50f3cd04f9d6873da -Author: evomarc -Date: Fri Apr 12 16:17:02 2002 +0000 - - Changed name of target in all_lib.dsp - Added eoParetoFitness.cpp in sources of eo.dsp - -commit 42a2a4f69e92b4913ce6046d766aafaae696707d -Author: evomarc -Date: Fri Apr 12 15:13:45 2002 +0000 - - A few changes for MSVC++ compatibility - -commit 019c8cd3e3de124801cdc4c2684c2bc5b4dd5e08 -Author: evomarc -Date: Fri Apr 12 14:41:52 2002 +0000 - - Turned the specific compiler order mpiCC into a Macro - so it's easier to modify - We shall need to put this into the automatic configure one day ... - -commit a1fffff0455966a1e0ab5e361363d4a2d069e14f -Author: evomarc -Date: Fri Apr 12 14:39:58 2002 +0000 - - 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 - -commit 64ca17c66f2f155026175fbb72f6cdec893cc7b3 -Author: evomarc -Date: Fri Apr 12 14:13:08 2002 +0000 - - Adding ParadisEO Tutorial examples - -commit 2ad3cbe9da47dade4b59f4db61f94e68615041ec -Author: evomarc -Date: Fri Apr 12 13:38:08 2002 +0000 - - Added name of the Debug library - -commit 9492ebd58eb74d93eae80e57efd058b703e74f1f -Author: evomarc -Date: Tue Apr 9 08:48:44 2002 +0000 - - Modified the comments so they appear in doxygen doc (and updated them also) - -commit d84517cb53e3d39501451a3bace101bff2627100 -Author: evomarc -Date: Mon Apr 8 18:04:32 2002 +0000 - - Modified my E-mail address (the old one at Polytechnique will soon be obsolete) - -commit f3535911a2af230608d97a96e7b7d86fcd71f156 -Author: evomarc -Date: Mon Apr 8 18:03:35 2002 +0000 - - I suddenly realized that BitEA.html was NOT in the repository! - -commit 684862253982a8dc082972214235cee7a7a7b5b9 -Author: evomarc -Date: Mon Apr 8 08:50:27 2002 +0000 - - Added the eoIncrementorParam - now ALL pointers allocated in make_checkpoint - are stored somewhere (the generation counter was not) - -commit bd688656bba77f89e15424ba0394e2a93e002dce -Author: evomarc -Date: Mon Apr 8 08:42:46 2002 +0000 - - Check that size > 1 (otherwise division by 0) - -commit 9341d7c2293c079ac7c88dd73b50d7cc02c2276d -Author: evomarc -Date: Mon Apr 8 08:42:01 2002 +0000 - - Added a few "std::" before copy and ostream_iterator - -commit 65395e7d282ff1631775dfe1e6e9774fb7b38c5a -Author: evomarc -Date: Mon Apr 1 20:15:32 2002 +0000 - - After indoduction of paradisEO, eoEaseyEA was a subclass of class eoPopAlgo - and not eoAlgo. - I don't have time to investigate, so I went back to a subclass of eoAlgo. - We'll sort that out later (after EuroGP I guess). - -commit 6afc695dce3e568d1c6ca9f0cc034f429d739121 -Author: cahon -Date: Fri Mar 29 15:38:15 2002 +0000 - - *** empty log message *** - -commit aec83a00149a63f994cca3e153d7acda450c2584 -Author: cahon -Date: Fri Mar 29 15:36:04 2002 +0000 - - How to build an EA with a distributed evalaution process ? - -commit 6bb81f22787fda9ea48cad4043dfab9627379900 -Author: cahon -Date: Fri Mar 29 15:30:55 2002 +0000 - - How to build an homo/heterogenous island model of EAs ? - -commit d31c5942c4904697926e977da859b81abf78d161 -Author: cahon -Date: Fri Mar 29 15:16:11 2002 +0000 - - *** empty log message *** - -commit 6fd042962d27abfe6a9a431961d9d26630acb8da -Author: cahon -Date: Fri Mar 29 15:10:04 2002 +0000 - - For any sending message - -commit 37d09fbccd9ef1eb3c6ebd1506fd11bf60cf78ed -Author: cahon -Date: Fri Mar 29 15:05:35 2002 +0000 - - The local communication layer - -commit 694a908a61a445ee4312371249492dd3546fe769 -Author: cahon -Date: Fri Mar 29 15:04:49 2002 +0000 - - The global communication layer - -commit 59b6246f76a43b0ab41fa4b0d3f3773a4195ee08 -Author: cahon -Date: Fri Mar 29 14:59:58 2002 +0000 - - An evaluator which sequentially values individuals making the pop. - -commit 972fbb5d5875f5434522ec35cfa311b212025be2 -Author: cahon -Date: Fri Mar 29 14:57:30 2002 +0000 - - The slave evaluator node - -commit 67039066e251a7347dbe3d79b428ff17e4a59ca7 -Author: cahon -Date: Fri Mar 29 14:56:18 2002 +0000 - - The master dispatcher evaluator - -commit 828770b8701877316a15a720b170e8ab086d1796 -Author: cahon -Date: Fri Mar 29 14:54:52 2002 +0000 - - An EA with a distributed evaluation process - -commit 6667499e62332775475775f40a6bec6c0ab8ce8d -Author: cahon -Date: Fri Mar 29 14:50:11 2002 +0000 - - Each island is connected from/to only one neighbour - -commit 9796e56c13f49224fd92d8423452fdb68656b62e -Author: cahon -Date: Fri Mar 29 14:49:04 2002 +0000 - - Each island id connected to the whole considered islands - -commit 8ee9c80e3f528f47f4f299b8969a474a8d776417 -Author: cahon -Date: Fri Mar 29 14:47:13 2002 +0000 - - A checkpoint to send/receive pop. to/from others islands - -commit 47b36ea06e85ca91281893e9ad7fc47eb1f7496e -Author: cahon -Date: Fri Mar 29 14:45:00 2002 +0000 - - The island EA model - -commit 5e74a52bce2d6bc692f8c6d470e010f5a896a9a0 -Author: cahon -Date: Fri Mar 29 14:41:01 2002 +0000 - - A continuator which periodically returns false - -commit b6dcf911b72a3f0e1b5c0c5e724f8eba23fda3c4 -Author: cahon -Date: Fri Mar 29 14:38:36 2002 +0000 - - A tool to apply a process to any incoming EO ... - -commit f87e19bf0062bf937044e3a8ed8c571277b23734 -Author: cahon -Date: Fri Mar 29 10:34:16 2002 +0000 - - *** empty log message *** - -commit 0de7f7aefdc9a6f4f5fe8fa24bb1d129a19778df -Author: cahon -Date: Fri Mar 29 10:26:36 2002 +0000 - - *** empty log message *** - -commit e21c37d51db69014d983c4047e819dadcc43fb71 -Author: cahon -Date: Fri Mar 29 10:02:47 2002 +0000 - - The paradiseo interface - -commit e95578b3fc3f7f2ad19696667639196cc8cab149 -Author: cahon -Date: Wed Mar 27 17:31:05 2002 +0000 - - Some changes for the use in paradisEO - -commit c1d61241404f67de0f3df991440a2fa3599b8bfa -Author: cahon -Date: Wed Mar 27 17:28:04 2002 +0000 - - Defines any population-based algorithm. - -commit 5b9af91d2abfbf451411042a83fea2499b478d62 -Author: cahon -Date: Wed Mar 27 17:19:25 2002 +0000 - - Any EO with an invalid fitness should be printable ! - -commit 32f1c986309e2fda9446dfc3180fba37e9060750 -Author: evomarc -Date: Fri Mar 22 11:01:30 2002 +0000 - - Added the time counter in make_checkpoint - -commit a79eb09ea6225f9ec0d351f322fbf052849b8b7e -Author: evomarc -Date: Fri Mar 22 10:57:37 2002 +0000 - - Added the eoTimeCounter that allows to use time as a base counter - for statistics (when you compare things that are not using the same - evaluation function for instance) - -commit e1319605e69b120584ef7dc5b71ccbaada290192 -Author: evomarc -Date: Fri Mar 15 06:41:54 2002 +0000 - - Added the lonk to SourceForge in the title, and to README in the "install" section - -commit 414eafa2774e971ac92f0c34325dc9c02d11f0af -Author: evomarc -Date: Fri Mar 15 06:28:25 2002 +0000 - - The source file names had changed, some day, in doxygen-genertaed doc ... - -commit b8661ed2b620f03f62d0622c0b129a24fd223bcf -Author: evomarc -Date: Fri Mar 15 06:06:22 2002 +0000 - - Corrected a few linkgs to the documentation - Reaplced eoBin with eiBit (about time!!!) - -commit a80a25c5f57d6e014a14c00c8a53f776ca3806b8 -Author: evomarc -Date: Wed Mar 6 06:54:00 2002 +0000 - - More on parameter input (getORcreateParam explained) - -commit 5881cab5388c65eda12e24d242604b29f896e463 -Author: evomarc -Date: Wed Mar 6 06:28:27 2002 +0000 - - Added the tags to generate html nice output - -commit dcee458c27d51bf1201145ffcb089c0c23e7fde9 -Author: evomarc -Date: Wed Mar 6 06:25:40 2002 +0000 - - Added some explanations about the memory mangement (through eoFunctorStore) - -commit c7743f88eff30bb77b934bebd88f6692d6afae71 -Author: evomarc -Date: Tue Mar 5 05:46:55 2002 +0000 - - Corrected a sligth error in eoParamParam reading that resulted in making the comma - part of the stored string value - -commit 8f740ab8846ff3c663cdb14ecdf06d9fc814e30a -Author: evomarc -Date: Tue Mar 5 05:38:21 2002 +0000 - - Adding class eoParetoOneConstraintFitness, multi-valued fitness + 1 constraint - This file shoudl contain the general Pareto+contraint class - but - I'm in a big hurry. - -commit 194f6bf45ec4a6a7d97699a8761b6970761447ca -Author: evomarc -Date: Tue Mar 5 05:34:27 2002 +0000 - - Changed the reading of parameter resDir from createParam to getORcreateParam - so it can be used in other parts of hte program (it's handy to put all - disk outputs in one dir). - -commit fb09ff1ac7952c36ba081433df9e980cc31b0d7d -Author: evomarc -Date: Mon Feb 11 06:28:52 2002 +0000 - - Added file monitors for the population in the Pareto space (were ony available as - eoGnulpot1DSnapshors before) - -commit 78a8f3cd57a915764133f078f03653d06293ed07 -Author: evomarc -Date: Mon Feb 11 06:27:44 2002 +0000 - - Added a title (Gen. X) to the plot so you can follow what's going on - -commit 49dd11d2c59f125c2f54f2d3e811eec566097d13 -Author: evomarc -Date: Mon Feb 11 06:26:48 2002 +0000 - - Added the getCounter() method so subclasses have a hand on the generation nb - -commit 6546cb8c52707f55527de6ba4d5d36eac9718893 -Author: evomarc -Date: Sat Feb 9 05:01:48 2002 +0000 - - Corrected a serious bug in eoUniformMutation (double declaration of bool HasChanged) - The consequence was that if that mutation was the only operator called on some - individual, it was not invalidated, and hence its fitness not recomputed!!! - -commit 4fea57e84d478821c93f86eec644e55aaf556f39 -Author: evomarc -Date: Sat Feb 9 04:58:33 2002 +0000 - - First instances of the make_xxx_pareto, where xxx is algo, continue and checkpoint - -commit f0452128638bbd915d5c1c90e05c2de9c40e31ec -Author: evomarc -Date: Fri Feb 8 07:51:59 2002 +0000 - - Added the constructor from a string - -commit 53eac8838bdd4d82bb2be5ad3133347c63acffa8 -Author: evomarc -Date: Fri Feb 8 07:49:32 2002 +0000 - - Added the method getORcreateParam. - It has exactly the same syntax than the createParam method - but it first checks whether the param has been laready entered before creating it - -commit 5fbbe4c9e91f02da6d26b902fda2842d3eacd307 -Author: evomarc -Date: Fri Feb 8 07:48:03 2002 +0000 - - Added a constructor from a vector - mandatory in all applications - -commit 448a5189fd55cf4918b95d7104ede9c02902a0e9 -Author: evomarc -Date: Fri Feb 8 07:47:03 2002 +0000 - - Removed the const in method eoInit & atomInit() - -commit 600b08a7f66135eecec6cf602c330026a7329a3b -Author: jeggermo -Date: Mon Feb 4 14:28:00 2002 +0000 - - the gpsymreg code has been slightly altered to allow compilation using the - Intel C++ Compiler for Linux. - - Other compilers should not be affected. - - A slightly different makefile is needed - -commit 94a13c6d534f45106098b7efa6d7e6d5609f5650 -Author: jeggermo -Date: Mon Feb 4 13:16:50 2002 +0000 - - Fixed some compatibility issues with GCC 3.0.1 and the Intel C++ Compiler - for Linux v5. - -commit e4523b3080ac23213ac1369823b1c4f2455bcab4 -Author: evomarc -Date: Sat Feb 2 07:37:54 2002 +0000 - - Added warning in case number of objective is changed (and not set) - -commit 2873f0b3ea3f2319da4f034be012ae2c11812aa1 -Author: evomarc -Date: Sat Feb 2 07:36:58 2002 +0000 - - Suppressed the lt_arity fn that was added for MSVC - and now seems unnecessary - -commit 066ba2eec21e797f0084475b8c291fb39b25f25e -Author: evomarc -Date: Sat Feb 2 07:36:12 2002 +0000 - - Added warning test - -commit 839c8ab11074a271780a93a164e51f9b28aa9e1f -Author: evomarc -Date: Sat Feb 2 07:34:13 2002 +0000 - - Added newline at end of file (to suppress g+ warning) - -commit cb4112b84daf0a4f6eac5eb54adf9eecdec02e24 -Author: evomarc -Date: Sat Feb 2 07:05:31 2002 +0000 - - Added the eoVariableParetoTraits (setup number of objcetives and min/max - at run time). - -commit daed31c0881244e90926547e9b3e015bcad514e4 -Author: evomarc -Date: Sat Feb 2 06:43:46 2002 +0000 - - Moved the static variables of class eoVariableParetoTraits - into a separate .cpp file (eoParetoFitness.cpp) - and modified Makefile.am - -commit 76ff13b2e3cc2a06005a967c710cdadadad3fc2d -Author: evomarc -Date: Sat Feb 2 05:59:05 2002 +0000 - - Added default value for bool arg in testDirRes function - -commit ef0e071dc6ec800b780eee14c52df710583f6828 -Author: evomarc -Date: Sat Feb 2 05:51:31 2002 +0000 - - Removed comment after #endif (warning in gcc 1.96+) - -commit 52bc2ed4f8748b2e6146ec2def5fdefc6debe14b -Author: evomarc -Date: Thu Jan 31 17:42:03 2002 +0000 - - Added the eoVariableParetoTraits that allows to specify the number - of objectives and the max/min for each one at run-time - -commit 6f5a34a13461817e23e70ce67952104e84ca7d86 -Author: evomarc -Date: Thu Jan 31 17:32:27 2002 +0000 - - Updated the comments - -commit 6cb8e652b5ec3ea24e40007341b647905fa88624 -Author: evomarc -Date: Wed Jan 30 12:24:42 2002 +0000 - - Added Ranking (God knows why it was mnissing!) - -commit 417c79179d345c8322e3374410974d296011a00a -Author: evomarc -Date: Thu Jan 17 17:57:55 2002 +0000 - - Added the move from Release and DEbug into the lib dir - -commit 87d733dda565cc408b2ad9fe3a94535dd9302ad9 -Author: evomarc -Date: Thu Jan 17 17:54:56 2002 +0000 - - Removed the #ifdef that protected the lt_arity avaints MSVC (!!!) - -commit 6ddec3bdceb5185a5a4ff62505113e5b4042be6b -Author: evomarc -Date: Thu Jan 17 17:51:58 2002 +0000 - - apply -> apply for MSVC - -commit b51d40e24f05b0346cd1b654a57584b07c427c3d -Author: evomarc -Date: Thu Jan 17 17:51:02 2002 +0000 - - Protexted all calls to gnuplot for MSVC - -commit a427432291828766b2db1cc7d73484c1225b1146 -Author: evomarc -Date: Thu Jan 17 15:24:44 2002 +0000 - - Adding tutorial files - -commit 83978dd8af959915fcf505db79333fea95607118 -Author: evomarc -Date: Thu Jan 17 15:21:44 2002 +0000 - - New versio of dsp files - -commit 45b5edc081bdade55df8261f10c62abe08195803 -Author: maartenkeijzer -Date: Wed Jan 16 14:52:11 2002 +0000 - - Increased template depth - -commit 93cde922d705f811e43841ab2858550dbf854ce8 -Author: evomarc -Date: Thu Dec 20 18:04:52 2001 +0000 - - There was an error in the type of the first parameter of make_checkpoint and - make_algo_scalar (changed from eoParameterLOader to eoParser) - -commit bdb125afbdd38421e644738e8f4738fdb2352e4e -Author: evomarc -Date: Fri Dec 7 06:28:38 2001 +0000 - - COnverted t_eoesall to CRLF line terminators (otherwise MSDEV cannot read properly) - -commit 38f35a1c5348f9e05144894bdeff41534c8fdb4b -Author: evomarc -Date: Fri Dec 7 06:23:15 2001 +0000 - - Adding t_eoesall that somehow ahd managed to escape until now - + corrected the template test_dsp.tmpl - -commit d74ef7466188f6d40d16923533432cebbefe7eaf -Author: evomarc -Date: Fri Dec 7 06:14:11 2001 +0000 - - Adding the tutorials in MSVC project files - -commit 9f7976c29231668775d5d9782fd97da1ca254b0d -Author: evomarc -Date: Fri Dec 7 05:51:36 2001 +0000 - - Removed all references to CrtDebug blabla that were supposed to be - MSVC specific but generated an error with MSVC 6.0 - -commit aa67e7d58dd690c98c8a4ad3bd68d24a61f3d8ce -Author: evomarc -Date: Thu Dec 6 14:33:42 2001 +0000 - - Need to put the \r\n at end of all files after modifications!!! - -commit b5a4afe8faa7a3827d13d8bdd97334b007c5f8fb -Author: evomarc -Date: Thu Dec 6 14:32:00 2001 +0000 - - Removed unknown CrtDebug directives from the MSVC version - -commit bd42e7567244fcbfd0cbbc9ff0bbc0a3dd75c973 -Author: evomarc -Date: Thu Dec 6 13:12:24 2001 +0000 - - Removed unnecessary dirs, added first Lesson of tutorial - -commit 82750f22d517bf26f3eaddee27d966b50c9988b5 -Author: evomarc -Date: Thu Dec 6 11:36:39 2001 +0000 - - Removed some sources that came here nobody know's how (thanks, MSDEV) - -commit 866ef81d43a42358c018917e5daed2a5193a2171 -Author: evomarc -Date: Thu Dec 6 07:02:07 2001 +0000 - - Changed ALL names of links to class files in the documentation due to the change in - Doxygen naming convention - -commit 6dcc949ee59fd78acfd665a6483099ef37a865c9 -Author: evomarc -Date: Thu Dec 6 06:44:44 2001 +0000 - - A few corrections before the big name change - -commit de1ae17ea86a8d971ee17910c97f65ba5fc57eeb -Author: evomarc -Date: Thu Dec 6 06:38:17 2001 +0000 - - CHanged a few erroneaous comments - -commit 04ab952760dfeec8449e2d9b5c18622636e7c35e -Author: evomarc -Date: Wed Dec 5 06:54:38 2001 +0000 - - Added GNUPLOT protection for MSVC compiler - -commit 7abbf595f71c38553ef7c1816819ec7ccbe41deb -Author: jeggermo -Date: Tue Dec 4 21:15:16 2001 +0000 - - some template classes and functions which did not need - to be templates have been changed to normal classes and functions - with hard coded typed - - This might help with M$VC++ 6.0 compatibility - -commit 61ea207287a2fc42ae0bedfe5c0b24d08602e10c -Author: jeggermo -Date: Tue Dec 4 11:49:25 2001 +0000 - - a different solution for lt_arity has been implemented (this time inside the - eoParseTreeDepthInit class - -commit d491c193e2c0c3ca645ae600387c2dfc7e21f214 -Author: evomarc -Date: Mon Dec 3 16:40:32 2001 +0000 - - Renamed mastermind.cc into mastermind.cpp for MSVC - -commit 8847dc3c509c966035489258bb5a3df371a07baa -Author: evomarc -Date: Mon Dec 3 16:38:52 2001 +0000 - - Renamed main.cc into main.cpp for MSVC - -commit 08aae27088b3cf77a0c1fd287939ea72293866ec -Author: evomarc -Date: Mon Dec 3 16:35:51 2001 +0000 - - Renamed gprop.cc into gprop.cpp for MSVC - -commit ea8c9ca9c3c99fba3401994d6f59e4bcb2fe1c05 -Author: evomarc -Date: Mon Dec 3 16:28:30 2001 +0000 - - Modified the path of include eoVirus because MSVC did not find it. - Now it is assumed that src will be in the include search path, that's all. - -commit d4b20d8833c7b2de3b9592cedb025a7f533297ae -Author: evomarc -Date: Mon Dec 3 14:31:35 2001 +0000 - - MSVC didn't find (easily) the contrib/MGE dir. So now it's written in the code - and the Makefile.am does not have contrib in the include look path - -commit 2aad10d347791814b187954578016d9afc1b3584 -Author: evomarc -Date: Mon Dec 3 14:20:24 2001 +0000 - - Added partial specialization of lt_arity .. - -commit 2a1fded2541bc5a2215be3560159a275e91dacea -Author: evomarc -Date: Mon Dec 3 14:14:56 2001 +0000 - - Added the 2 fake "projects" all_lib.dsp and all_test.dsp that allow to compile - everything in 2 clics. - However, we still cannot run and watch the status output of the test executables - -commit 512d368dcf8cd4a3c8721155fcb830f7da35b06e -Author: evomarc -Date: Mon Dec 3 11:08:17 2001 +0000 - - More details to make code MSVC-compatible - -commit eaf5ea0111a9a27b8e0d6a8521b45e568592ef17 -Author: evomarc -Date: Mon Dec 3 06:59:17 2001 +0000 - - Added links to some examples in the comments - -commit 4a90509051a141272b0bd51ecb17f230ace8fde1 -Author: evomarc -Date: Mon Dec 3 06:56:43 2001 +0000 - - Removed dir win from list of subdirs (generated an error in make check) - -commit 00f1a250003100792749977aad4686b593d2779c -Author: evomarc -Date: Mon Dec 3 06:53:52 2001 +0000 - - Removed the trailing comment after #endif (Warning in MSVC) - -commit 9bda49ae057f8eee42e08555e511ae8c4ba91ca0 -Author: jeggermo -Date: Thu Nov 22 15:01:11 2001 +0000 - - Fixed a small problem with eoPointMutation. - -commit a8c554710f22e2fe4e286a745ecdc9014c12bde2 -Author: evomarc -Date: Sun Nov 18 07:18:11 2001 +0000 - - Introductory comment evolves ... - -commit 7c04fc5de1e1d7302e8f80fcfc50bed579b96eb6 -Author: evomarc -Date: Sun Nov 18 06:54:13 2001 +0000 - - Added the names of the directories where the newly created files are stored. - -commit b455d5392548b01dfbd02b8aed69f7120219d163 -Author: evomarc -Date: Sat Nov 17 08:13:55 2001 +0000 - - Now the eo.dsw can be generated automatically from - eo.org - create_all_dsp.sh (that calls create_dsp.sh) - To add a new test program, simpy add 1 line in create_all_dsp.sh - and run it. - DO NOT TOUCH eo.org !!! - -commit f52b0f6646bf22c5439c5240b3d085ab145c34df -Author: evomarc -Date: Sat Nov 17 07:58:16 2001 +0000 - - imply put all program names on one single line to ease bulding the win files - -commit 8538cc453238b5d90caa049283c323decd84e100 -Author: evomarc -Date: Sat Nov 17 07:55:39 2001 +0000 - - Bug in create_dsp when no additional library - -commit d686b37c1f94ab40a6a195a6e66ea880db385f4a -Author: evomarc -Date: Sat Nov 17 07:54:12 2001 +0000 - - Turned bonary_value into the onemax (not pow that exploded for even only - moderately small size of genome!) - Turned it into a double (it was a float) as floats are dead and should dissappear - -commit f41cd957c0b947885fffcfe58653dc40116eb75d -Author: evomarc -Date: Sat Nov 17 07:22:59 2001 +0000 - - Changes due to MSVC - -commit 8abb9242c2bef605400816f59190bbe26d1a4907 -Author: evomarc -Date: Fri Nov 16 15:06:29 2001 +0000 - - Some error for MSVC that was not even a warning for g++ (but I'm sorry - to say that MSVC is right :-) - -commit 25765640ae7ad5088e401d77a86f0908a07c3b8b -Author: evomarc -Date: Fri Nov 16 15:05:41 2001 +0000 - - Changed the filenaming to comply with MacroHard - -commit 3eefeb651ebf36535a9dd800c6632d1880273e0b -Author: evomarc -Date: Fri Nov 16 15:02:35 2001 +0000 - - Error in argments check - -commit 86fb15267685135dc8912cc0a654c178011dbb4d -Author: evomarc -Date: Fri Nov 16 14:32:07 2001 +0000 - - The file eo.org is the base project file (no file in test involved). - It is upgraded by the create.sh script - -commit dbfa9a7aaa0217eaf18ea50651251f03f1dc83ca -Author: evomarc -Date: Fri Nov 16 14:30:58 2001 +0000 - - Adding all test files for MSVC - -commit 49cc03546af7ed1581fc5a6676def5d29f8dab25 -Author: evomarc -Date: Fri Nov 16 14:01:52 2001 +0000 - - Replaced the flat definitions of ncecessary classes (eoStatxxx and eoMonitor) - with the include of the corresponding .h file. as MSVC complained! - -commit 5597f3e353e23258c6e488d3bb1ded5cb2af7757 -Author: jeggermo -Date: Thu Nov 15 22:11:31 2001 +0000 - - small change in documentation - -commit af8618a47a54a5f74a9481202ae60aa05e1bfc49 -Author: evomarc -Date: Mon Nov 12 16:27:37 2001 +0000 - - Announcing the MSVC++ compatibility revisited - -commit bd53a220a5836c74823392f3fcb13f572409d859 -Author: evomarc -Date: Mon Nov 12 15:21:40 2001 +0000 - - A few more typename conditionally removed for MSVC++ - -commit 4a39f49a741cb8813e0ccb893fe896492ea69671 -Author: evomarc -Date: Mon Nov 12 14:59:32 2001 +0000 - - Adding Jeroen :-) - -commit fd4eda8aca0ce5935262d941e311c978311fe654 -Author: evomarc -Date: Mon Nov 12 14:51:51 2001 +0000 - - A readme for the win dir ... - -commit 72fc838360f81a87299135e70c62ca8da9c99845 -Author: evomarc -Date: Mon Nov 12 14:44:01 2001 +0000 - - Create.sh mdified to also add the new dsp file into eo.dsw - -commit 19ebcbd5e36a892ce43760d321d10948dbd89008 -Author: evomarc -Date: Mon Nov 12 14:27:12 2001 +0000 - - Template file for dsp project files (to be used within create_dsp.sh) - -commit 4ad58c360edc0a506b9cdf32168bdf4cca0478a3 -Author: evomarc -Date: Mon Nov 12 14:17:58 2001 +0000 - - Some more small changes for MSVC++ compatibility - -commit 0e4df9e40408100840afd4c0a12f8e640dc60902 -Author: evomarc -Date: Sun Nov 11 06:59:42 2001 +0000 - - Adding the dsp file for t-eoReal - testing the create_dsp script. - Next step is to add them all from the test/Makefile file - -commit 6324bb5179a314c5514ee0abcff098f1d3d92bdf -Author: evomarc -Date: Sun Nov 11 06:55:12 2001 +0000 - - Create_dsp.sh is a script that will create the .dsp file from a source file - name in the test dir - -commit aad54e0648b23cee416de767b748515a24efa355 -Author: evomarc -Date: Sun Nov 11 06:43:45 2001 +0000 - - Improved the UI a lot (checking for already existing files, etc) - -commit 78ca5ab75c470c9709036556e3ff1a7b0f3db50e -Author: evomarc -Date: Sat Nov 10 14:13:21 2001 +0000 - - Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIAC - -commit a79a7d6215d0664cbf7fc04ea9cfd4bae6e062df -Author: evomarc -Date: Sat Nov 10 14:12:01 2001 +0000 - - Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIA - -commit d7c3d973c78f978bda6d5c521037216b85352951 -Author: evomarc -Date: Sat Nov 10 09:02:17 2001 +0000 - - Small modifications here and there to be MSVC++ compatible - Mainly, time.h -> ctime - definition of loop index out of loops when multiply used - no typename in declaration using template typename - -commit a5e3abd9f6319f5e60baa04231d2a4260a4e0889 -Author: evomarc -Date: Sat Nov 10 06:59:02 2001 +0000 - - Added the #pragma directive for MSVC++ in all .cpp - -commit 62686ac4063c94afd281643e12a6346531d33e4f -Author: evomarc -Date: Sat Nov 10 06:32:05 2001 +0000 - - Added the invalidate() call - that bug was not seem before, because - we always used init on newborn genotypes! - -commit c5145c839930013ed2317358c77723b4c3904f7d -Author: maartenkeijzer -Date: Thu Nov 8 11:13:19 2001 +0000 - - Cleaned up - -commit 886523dccd74d0242b5f092a365aa10e6f07a768 -Author: maartenkeijzer -Date: Thu Nov 8 10:17:52 2001 +0000 - - removed the return 1 in the main - -commit 818e6d8a14b99cf2927cdf4ce626fa01cf29d85d -Author: evomarc -Date: Thu Nov 8 07:40:27 2001 +0000 - - Adding Distribution-based base abstract classes - -commit e0ae220420f5c4734718ef2504f164d866034b06 -Author: evomarc -Date: Thu Nov 8 06:53:55 2001 +0000 - - Adding PBIL - -commit 0816b742d9ae3937f8cb27dfae74e9d3fccfae6f -Author: evomarc -Date: Thu Nov 8 06:49:38 2001 +0000 - - Adding PBIL files - simple PBIL algorithm with simple additive update rule - -commit 9b7556d81e93488dcab31808a4b621bcca35702c -Author: evomarc -Date: Thu Nov 8 06:14:59 2001 +0000 - - I have changed all calls to use an eoParser rather than an eoParameterLoader - This is required if you want to use the method getParamWithLongName that allows - one to get a value of a parameter read somewhere else. - After changing 3 calls due to that, I decided to change ALL calls within - the make_xxx functions - -commit 03045f2d587834e85bcb8d4838b7c336c7baca2b -Author: evomarc -Date: Wed Nov 7 16:25:01 2001 +0000 - - Corrected a bug in the selector and replacement tournamemt parameter reading: - if you did not give the tournament sizes, the program either crashed or went - in some endless loop. - I also simplified the reading of those eoParamPram parameters! - -commit beba7bd5c995e2e713a22f93b5dc7cbbe8f762a8 -Author: maartenkeijzer -Date: Wed Nov 7 15:23:24 2001 +0000 - - Updated makefile.am such that "make check" will run all test programs. Fixed - a number of erronuous return values that made the script fail. What's left - is let Marc clean up the mess he made with t-eoReal and t-eoRealAllESAllAgain - -commit ddb9e026cfa2b8005644ee6e20569dfceaebd6be -Author: maartenkeijzer -Date: Wed Nov 7 10:57:53 2001 +0000 - - Fixed call to inverse_stochastic inside eoDetTournament - -commit 58f5fd2f61ffb4a0ce9e8e4b89c4a74fd7509dae -Author: evomarc -Date: Mon Nov 5 16:38:52 2001 +0000 - - Added method - eoParam* getParamWithLongName(std::string _name); - so now you can get a parameter in another place than where it was defined - just by giving its name - -commit aee6584ceaeead958048172a1d12009b2eec8069 -Author: maartenkeijzer -Date: Mon Nov 5 14:28:14 2001 +0000 - - Just some comments - -commit 50fe1cb529a493434b8dd24fb0b8b86d114b034a -Author: evomarc -Date: Mon Nov 5 08:24:59 2001 +0000 - - Small error in header - -commit 2d12525bc590287e0971e286e417bf6fbc536134 -Author: jeggermo -Date: Sat Nov 3 22:10:11 2001 +0000 - - the name of the eoGpDepthInitializer class (initializer for - parse_tree's has been changed to - - eoParseTreeDepthInit but backward compatibility is maintained by - using a #define statement: - - #define eoGpDepthInitializer eoParseTreeDepthInit - - The initializer for strongly typed GP has been changed to - eoStParseTreeDepthInit - - the gpsymreg application has been changed to use the new name - -commit 4584fda53d3815a5327d99096a4af1281d3fd81b -Author: jeggermo -Date: Thu Oct 25 10:39:55 2001 +0000 - - Some changes for using EO with libstdc++V3 and gcc-3.01 - -commit 0bbe7b84cb8056eb3ce643687bc607693d7f1728 -Author: jeggermo -Date: Fri Oct 19 12:04:12 2001 +0000 - - The nameless union in node.h has been removed because not all compilers - support it. - -commit 5897d0062fcf5faad4696d7be81d10544ac4df86 -Author: evomarc -Date: Thu Oct 18 11:48:52 2001 +0000 - - Replaced pushd and popd with cd and cd .. - for Windows/Cygwin compatibility - -commit 77645540567f4f0f407cd7aa575a5826fdbb9712 -Author: jeggermo -Date: Thu Oct 18 08:52:40 2001 +0000 - - Some changes to make gpsymreg compile correctly on windows/cygwin systems - -commit af05dfacb9a430a801c0ef4dd6e36c69479dccf9 -Author: evomarc -Date: Thu Oct 18 05:30:45 2001 +0000 - - Added MAXFLOAT and MINFLOAT as it seems that Cygwin needs that ??? - -commit 95216ac671189111b51fece47cc9c73df018f746 -Author: evomarc -Date: Thu Oct 18 04:57:30 2001 +0000 - - iAdding a file config.cache as it seems that the defaults don't work - in Windows/Cygwin environement. Thanks to Sebastiao CORREIA and - Jerome JEAN-CHARLES for providing this file. - -commit f7377b0fcf393f72b7766c5302c9ccdc47b68c20 -Author: evomarc -Date: Thu Oct 18 04:37:14 2001 +0000 - - All files on one line in Makefile.am (for Windows) - -commit 26481ab36ba7cee2676555bda31d5135b77a6d26 -Author: evomarc -Date: Thu Oct 18 04:34:58 2001 +0000 - - Modified the Makefile.am in main dir, and Makefile in tutorial dir to remove - all pushd/popd as they don't exist in Windows/bash - -commit 03308af599629b3124e97ae1ef7e878f665f92b7 -Author: evomarc -Date: Wed Oct 17 17:49:54 2001 +0000 - - Corrected a few small problems - including dependencies in Makefile - thanks to Sebastiao CORREIA for pointing them out - -commit 11b3eabfca8534cfa440da8d16b7d206dd434901 -Author: evomarc -Date: Wed Oct 17 17:48:50 2001 +0000 - - Corrected a few small problems - - thanks to Sebastiao CORREIA for pointing them out - -commit f2c21bdc0b37311b86b7e10657fe95f516559fd1 -Author: evomarc -Date: Mon Oct 8 09:14:15 2001 +0000 - - Removed trailing text after #endif - causes warning on many compilers - -commit 7e885e8f8c1ef5eacb9279dc10838a7127167681 -Author: jeggermo -Date: Fri Oct 5 12:39:30 2001 +0000 - - ramped half and half initialization procedure for eoParseTree populations - added. - -commit 8f1af522a68145b552f663ebe56d3f6c92c4c5ec -Author: jeggermo -Date: Fri Oct 5 09:32:49 2001 +0000 - - Since g++ 2.95.x on our solaris server doesn't have macros to check - for infinity and NaN these checks have been removed from the source code - and a protected divided function node is now used. - -commit 30616fca424a17615f0f4b232c6ac453170ebfc9 -Author: evomarc -Date: Fri Oct 5 03:56:21 2001 +0000 - - Forgot to double also the parameter to initialize in the Ctor! - -commit f4efc65994d6fcd4afa11818c7e2fb7bedcd2237 -Author: evomarc -Date: Fri Oct 5 03:51:15 2001 +0000 - - Modified the reseed method in RNG class so two different seeds give different - sequences, after Jeroen's remark (jeggermo@liacs.nl) - -commit 653e64df090bff2953a3c0b72ae4b0f658644bf7 -Author: evomarc -Date: Fri Oct 5 03:30:12 2001 +0000 - - Commented out the oeprator() default function in base class: I find it more secure - to be warned at compile time that one function is still pure virtual - than to look for the error after a run-time-error that gives no clue - -commit 0847875339a2201e48062ab6519f67236993f969 -Author: evomarc -Date: Thu Oct 4 20:13:03 2001 +0000 - - eoMyStructEA.cpp has turned into MyStructEA.cpp - -commit f3db65795bc5f4a0a4b5eec5214315ee39d5630e -Author: evomarc -Date: Thu Oct 4 20:12:19 2001 +0000 - - Big modifications - now the init and most important the operators - are handled in separate files make_genotype_xxx and make_op_xxx - as it was done in the examples of Lesson4 - -commit c34db3eb29ccdbf5fbe05c2ed337cbaeebcf2128 -Author: evomarc -Date: Mon Sep 24 05:59:42 2001 +0000 - - Suppressed most warning (except some unused variables) if you don't modify anything - -commit 1d7b79b85ac70b3dec8dff5ec7a3d44bf20bd0ba -Author: evomarc -Date: Mon Sep 24 05:59:13 2001 +0000 - - Suppressed most warning (except some unused variables) if you don't modify anythig - -commit d0d14c3ff845145aa67cb3a2bff08039c74aa020 -Author: evomarc -Date: Sat Sep 8 05:59:17 2001 +0000 - - Removed trailing string after #endif - it generates a lot of useless warning - on some versions of g++ - -commit ed9dac2dfe39dc519e93d25907805805c245a0ff -Author: evomarc -Date: Sat Sep 8 05:42:24 2001 +0000 - - Added newline at end of file (prevents a warning) - -commit 37a138c81bee83d3cfc8754e5ced08e5b5bd9cab -Author: evomarc -Date: Sat Sep 8 05:41:19 2001 +0000 - - Added include math.h - -commit 7bbdd173078cf7acbd35c2f1075ec8767dca103a -Author: evomarc -Date: Tue Sep 4 08:35:22 2001 +0000 - - Added many template files, and totally modified the comments in most other. - This was when preparing Evonet Summer School - though it finally was not used there! - -commit f69b785b39d889a57508f503663f268b5c0bef7a -Author: evomarc -Date: Tue Sep 4 06:51:59 2001 +0000 - - Modified the className() method so that the Atom underlying operator is listed - -commit 5fb8958b2898f2893dee890bcc91f8487bf4715c -Author: evomarc -Date: Tue Sep 4 06:50:42 2001 +0000 - - Included apply.h for consistency (though in most cases it was included from eo file - -commit 861f11e1532e71ee0a9d75da9d61ff5902273867 -Author: evomarc -Date: Tue Sep 4 06:48:15 2001 +0000 - - Added a class that turns an eoInit into a generator of EOT - Also added a Ctor of variable length objects that take an eoInit. - Some day we might want to clean all that stuff ... unless we leave - the choice to the user (but then the documentation shoudl be as clear - as glass, which it is not at the moment!) - -commit c352b19799433e881f71333fa7d2fc091c6d59dc -Author: evomarc -Date: Tue Sep 4 06:45:14 2001 +0000 - - In case you are trying to assign a value to a vector of different size, - previous versions raised an exception. - Now a simple warning is written to stderr - as it might be something - you need to do. - -commit e79edcffe700ee75432647fc35a54cd0425ef410 -Author: evomarc -Date: Tue Sep 4 06:43:19 2001 +0000 - - Added make_help in checkpointing, included stdexcept in eoParam. Comments - updates ... - -commit 62dfe13c3ad1e3392f24f6226e741d575081b577 -Author: evomarc -Date: Tue Sep 4 06:41:34 2001 +0000 - - Spotted and commented (but NOT corrected :-( a bug in case the ResDir - exists and is empty - -commit 4f642f848ee297a49548cda67bcbd776bc840d9b -Author: evomarc -Date: Tue Sep 4 06:40:28 2001 +0000 - - Corrected wrong arguments for the 2D Ctor - -commit 0f9f1cc3ea03df50dfa33ba0a311b767d9a080ab -Author: evomarc -Date: Tue Sep 4 06:37:25 2001 +0000 - - Comments update - -commit bb658f550ce2470eba74d17c1c5d84340cba33ba -Author: evomarc -Date: Tue Sep 4 06:35:58 2001 +0000 - - Changed the wrong #ifdef in make_algo_scalar (+ minor comments elsewhere) - -commit af9155765609aaad5f8281694c67db94b3ac27f5 -Author: jeggermo -Date: Tue Jul 17 13:06:28 2001 +0000 - - check for the existence of isinf didn't work the way it should so - it has been removed - -commit 21e42be6d3dd284b38a4872ca2033080e7e3122c -Author: jeggermo -Date: Tue Jul 17 08:58:52 2001 +0000 - - small documentation change for eoParseTree.h. - - added a depth initializer for strongly typed genetic programming - added subtree xover for strongly typed genetic programming - added branch mutation for strongly typed genetic programming - added point mutation for strongly typed genetic programming - added hoist mutation for strongly typed genetic programming - -commit 6c969bfbce5764097698d1d8f5b9035f015682aa -Author: evomarc -Date: Wed Jul 11 06:26:11 2001 +0000 - - Suppressed the gene mutations, as they are now in eoFlOrMonOp.h - -commit 7ac99966757e2c2f6dde92f224331ced63bea9c8 -Author: evomarc -Date: Wed Jul 4 04:59:02 2001 +0000 - - Oups! - -commit 963683996d6143c4422661bfd0eed2d0187006a1 -Author: evomarc -Date: Wed Jul 4 04:44:30 2001 +0000 - - Adding eoPopEvalFunc, that handles evaluation globally: it receives - two populations, parents and offspring, and does whatever necessary. - The subclass eoPopLoopEval does the simple loop on the offspring. - - eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, - but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. - -commit 88061395f12b6b387c849103f6bdccc4c953f332 -Author: evomarc -Date: Tue Jul 3 12:56:44 2001 +0000 - - Added the eoPopEvalFunc class: gets the full parents + offspring populations - in order to evaluate them. - Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as - before (it is then encapsulated into an eoPopLoopEval that does the good - old loop on the offspring - or directly pass a full eoPopEvalFunc - - Small modification also in make_op_es -> keyword "none" is now recognized - for one of the crossover of either object variables or stdev's - -commit a611939e684885a63d7b333c6ffaec0fd8148069 -Author: jeggermo -Date: Mon Jul 2 13:31:04 2001 +0000 - - Changed the directory structure for gp - now: eoParseTree <-- the eoParseTree class - eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) - eoParseTreeOp <-- the operators (xover and mutation) - - base documentation written for: - * eoParseTree - * eoGpDepthInitializer - * eoSubtreeXOver - * eoBranchMutation - * eoPointMutation - * eoExpansionMutation - * eoCollapseSubtreeMutation - * eoHoistMutation - - I also created a group ParseTree which contains all classes related to eoParseTree - - eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp - -commit 402e34c238445f4d9d5d2c15abfb95ae93daf9fb -Author: jeggermo -Date: Mon Jul 2 11:38:27 2001 +0000 - - The constructor for the eoGpDepthInitializer has been extended with a - sort of the initializor vector containing all possible nodes. This sort - assures that the terminals are in the front of vector. Untill now this - was assumed but not checked or enforced. - -commit af726e9d9ec1d5428259028c409b746f995a204d -Author: jeggermo -Date: Mon Jul 2 08:28:40 2001 +0000 - - eoSubtreeXOver fixed - -commit 967670e2c7fe6b249d61e5c48cf0de860876a6be -Author: evomarc -Date: Sat Jun 30 05:59:26 2001 +0000 - - Added random selection - -commit 48a784d122e6a5405e85dcecce309d3eb5b9de33 -Author: evomarc -Date: Sat Jun 30 05:57:10 2001 +0000 - - Corrected a wrong comment - -commit f674fbeb1411b3f5a4adf30c650c9a667b462e3e -Author: maartenkeijzer -Date: Fri Jun 29 18:06:10 2001 +0000 - - oops, thanks jeroen - -commit 375568853aa7c9c6b01ab96261837132746ea7af -Author: jeggermo -Date: Fri Jun 29 12:15:15 2001 +0000 - - checks for the existence of finite(x) and isinf(x) built into app/gpsymreg. - Linux gcc compilers have the 'macros ??' but solaris gcc does not - -commit c7aba2f3c4a45d69d904eb5ba04856d32c06bb5e -Author: jeggermo -Date: Fri Jun 29 09:22:26 2001 +0000 - - app/gpsymreg/Makefile added to configure.in - -commit 9242c8454145d7783261c8834cb065bf5441eed9 -Author: jeggermo -Date: Thu Jun 28 15:03:53 2001 +0000 - - app/gpsymreg/Makefile added to configure.in - -commit f41c5f2ff68bb1e0b57400f687afe4dfbf104b85 -Author: jeggermo -Date: Thu Jun 28 14:39:36 2001 +0000 - - addition file for parameters for symreg gp - -commit 00c671f24c9de4b6fe453148fb7598b84c857f42 -Author: jeggermo -Date: Thu Jun 28 14:38:00 2001 +0000 - - node.h containing Tree-node classes for symreg gp - -commit f1b6eb5dd8c95b7f29ec36c1b6837c30a20e6df8 -Author: jeggermo -Date: Thu Jun 28 14:33:51 2001 +0000 - - main.cc for symreg gp - -commit 0c1ab037046bc0a9fe87de865b0de754696d8f6b -Author: jeggermo -Date: Thu Jun 28 14:26:35 2001 +0000 - - gp symbolic regression trees added - -commit 3486dfafd64f3f7207076a89eaa1f7612147b3f0 -Author: jeggermo -Date: Thu Jun 28 14:18:47 2001 +0000 - - eoGpMutate.h added containing 4 new mutation operators for eoParseTree class - -commit 9efdfa59f8b2d592866fb2c8534c68a57de591bd -Author: jeggermo -Date: Thu Jun 28 14:11:04 2001 +0000 - - Symbolic Regression GP added app-dir - -commit 840717bea8c37e356d6805b8252399019ac80002 -Author: jeggermo -Date: Thu Jun 28 14:03:59 2001 +0000 - - new Mutation operators for eoParseTree in src/gp/eoGpMutate.h - - a symbolic regression example program added to the app-dir - - configure.in and Makefile(s).am changed - -commit 164e36b184e48a8499b8b5a28ea6531ea1d657fb -Author: jeggermo -Date: Thu Jun 28 13:55:14 2001 +0000 - - Additional mutation operators for eoParseTree - - * Point Mutation - * Expansion Mutation - * Collapse Subtree Mutation - * Hoist - -commit fd61f8f475353259be22388939f44ee1c9372c14 -Author: jmerelo -Date: Thu Jun 21 12:03:17 2001 +0000 - - Updating Royal Road - -commit 49434ecc03cb33a93b6cf5ed573fbcd1737afb01 -Author: maartenkeijzer -Date: Mon Jun 11 12:37:21 2001 +0000 - - Added a check for an empty initializor - -commit 45f61a0e0b82fbd7209a9d185e5044445fd05eb3 -Author: evomarc -Date: Fri May 25 16:27:59 2001 +0000 - - Added a frequency parameter to eoPopStat (dump pop every N gen) - -commit 73157edba6b08e057a67e27f6c94be0ef372a4b6 -Author: evomarc -Date: Mon May 21 06:13:56 2001 +0000 - - Forgot to update ESEA with crossover - -commit b72a85fa1bedd11ab8c575d030b2c059a7061911 -Author: evomarc -Date: Mon May 21 04:16:26 2001 +0000 - - ? - -commit af73dfbd45ad1391db2af061d8d1bf175da99d7f -Author: evomarc -Date: Mon May 21 04:15:36 2001 +0000 - - Added libes in Makefile - -commit 91342e7080ecaea80ca8c00cf5ed483942f3bfd0 -Author: evomarc -Date: Mon May 21 04:14:36 2001 +0000 - - Modifs in es (crossover added in make_op_es). - Added a dummy selector in eoReandomSelect that does work even with invalid EOs - -commit 8b177dd6cd3d4d27631d3bcce2af0522590a4f3d -Author: evomarc -Date: Mon May 21 04:13:10 2001 +0000 - - Added the crossover in make_op_es (parameters were read, but that's all! - -commit d9ddfeeaea3cdb410888f5c13ad1f90606e122c7 -Author: evomarc -Date: Mon May 21 04:10:55 2001 +0000 - - Normalized real_value - -commit 9631c9eb118ebe607ecfaf59f166b6f52876c2e8 -Author: evomarc -Date: Sat May 19 06:15:01 2001 +0000 - - Changed name of eoEsLocalXover to eoEsStandardXover and made it an eoBinOp - Removed obsolete eoEsStdevXOver.h (see eoEsStandardXover.h above) - -commit 8e5e9d14cf56086b2e5cd329c76bed2fa6303344 -Author: evomarc -Date: Fri May 18 17:46:33 2001 +0000 - - Coreected a cut-and-paste bug :-( - -commit 422ddc6f5f2e9858615f35b075af82235220ed48 -Author: jmerelo -Date: Fri May 18 07:33:12 2001 +0000 - - Added the missing file - -commit 0286faed1b400720ad1aad8ec6f6530927964c9a -Author: evomarc -Date: Fri May 18 03:59:22 2001 +0000 - - Removed remaining debugging comment - -commit 17dc4f9d105bf0537736c9ce64c9fd50129d6056 -Author: jmerelo -Date: Thu May 17 10:08:25 2001 +0000 - - Changed MGE to the contrib dir. No need to change the prefix, I guess - -commit e32c52d332a650a692192adf1b3029dfc87eaab5 -Author: jmerelo -Date: Thu May 17 07:29:50 2001 +0000 - - Added missing files and updated old MGE files - -commit 34cb430bd7fa2185cedb4674d496b1b5b698aecd -Author: jmerelo -Date: Fri May 11 10:44:01 2001 +0000 - - Added Royal Road, MGE now work with it, small modifications to eoPopStat - -commit 88f281b6061e9d350be9adddf8bb4a459c802c52 -Author: jmerelo -Date: Thu May 10 12:16:00 2001 +0000 - - Added 'Viral' operators with test. Implements the Mobile Genetic Elements Technique - -commit b7915a4bbed0ab6b13e3d007f9ae97ba6dc7acec -Author: evomarc -Date: Tue May 8 04:44:30 2001 +0000 - - CHanged CXXFLAGS to nothing - so lib files remain of manageable size! - -commit 09388c8ed57acb42f33ece6e69ba32df3d24432b -Author: evomarc -Date: Tue May 8 04:41:51 2001 +0000 - - Bing change in eoRealBounds: it is now deriving from eoPersistent. - More important, the eoRealVectorBounds, vectorized version (a vector - has also become an eoPersistent object and now derives from an eoRealBaseVectorBounds - class. - A useful consequence (and actual motivatino) was to be able to have soem - eoValueParam with all possibilities for input - (see doc for Lesson4 in the tutorial for the syntax). - -commit 42cb1981d59f32a477bf22841adf5dc6e9a812bf -Author: evomarc -Date: Tue May 8 03:49:35 2001 +0000 - - In eoParser::readFrom, added a test to avoid reading non-parser sections - as these generally contain many -xxx that generate a reading error - when xxx is not a keyword. - This allows to use State-savec files directly as parameter files - -commit 0aa6a235ef2f495eeb5c4c2768223789c38aeb1e -Author: evomarc -Date: Mon May 7 07:13:36 2001 +0000 - - Replaced stupid eoRateParam by eoValueParam - Had to transform eoHowMany into an eoPersistent ... - -commit 5508869d00dfdba36bc8ec4fab7a6c255035eb59 -Author: evomarc -Date: Fri May 4 16:51:29 2001 +0000 - - A full working version of ES is now available in tutorial/Lesson4, - that makes full use of libes.a. - The user guide is in Lesson4 of the tutorial - programmer's guide - will come later. - Plus many small changes here and there - -commit eb25bf0ab5dc35fbbe0270765d2b05b4d81531e1 -Author: evomarc -Date: Fri May 4 16:13:37 2001 +0000 - - Removing old trash! - -commit f4d2630516f7bd973590a18ea9ce98c90e059bbd -Author: evomarc -Date: Thu May 3 17:20:27 2001 +0000 - - Corrected a problem in eoEsChromInit (it refused plain eoReal) + some - other minor modications (e.g. a dir in make_checkpoint where ALL file - will go). - -commit 1eee26598b7a43a62272a4cc92d263f5c4cdb5f6 -Author: evomarc -Date: Thu May 3 13:06:34 2001 +0000 - - Adding code to Lesson4 - -commit 7294d6acd561040fb6d165e68669c2a9ab4f5c03 -Author: evomarc -Date: Thu May 3 05:44:29 2001 +0000 - - Lesson4 advancing - -commit 4cce84280e28d0e7e2f11cd6a5a110de612f1667 -Author: evomarc -Date: Thu May 3 05:43:40 2001 +0000 - - Hange of comments and names - -commit b52ea27e2fd42ce93f813f0710ef4d349e8037c8 -Author: evomarc -Date: Wed May 2 11:13:40 2001 +0000 - - Updated main pages of doc and tutorial. Doc now points to tutorial - -commit b03e4f51068854c8359406417e5b4434b7eca88d -Author: evomarc -Date: Wed May 2 11:12:55 2001 +0000 - - Date change + info about Lesson4 in main tutorial page - -commit 6085c82229586033b8b8916c69e81e9666f1c119 -Author: evomarc -Date: Wed May 2 11:09:57 2001 +0000 - - Adding test file for ES - note that it's completely different from old - eoESFull.cp - and hence has an other name, t-eoESAll.cpp. - Old eoESFull.cp is still there (and working) but is not in the test targets - -commit 6af035d2fad40121a4f830584d580860db923aca -Author: evomarc -Date: Wed May 2 10:57:35 2001 +0000 - - Adding files in es for ES Crossovers - -commit 29b25024b78eee43c229e9c41da95151f0e8de63 -Author: evomarc -Date: Wed May 2 10:54:17 2001 +0000 - - Forgotten file ... - -commit bb19ed633bf287990d28eb57723c1266fd599d92 -Author: evomarc -Date: Wed May 2 10:53:14 2001 +0000 - - Forgotten new file - -commit 6493ef88896534ea626bba4a02c6de13a35f3fdc -Author: evomarc -Date: Wed May 2 10:50:01 2001 +0000 - - Added the new eoEsXXXover.h in Malefile.am - -commit 17484feeef9a25163b267871511af36691a84216 -Author: evomarc -Date: Wed May 2 10:47:56 2001 +0000 - - Forgotten ES files + start of tutorial Lesson4 (about make_XXX) - -commit 10064ad967107092b1b8b7e0bae1553ad84c0377 -Author: evomarc -Date: Wed May 2 10:42:32 2001 +0000 - - Adding Evolution Strategies: - src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover - src/es/make_XXX_es.h for user-input - test/t-eoEsAll.cpp to test - - However, an old bug appeared: className was not const in eoGenOp (and derived classes) - so I had to change that throughtout the hierarchy - -commit 4a152dc172b21f894efa7a34c21617c0a86df450 -Author: evomarc -Date: Tue May 1 05:00:29 2001 +0000 - - Removing make_help.cpp - -commit 5bea22e87661d0ceedaaf1ea3e7c6e658f51a0e8 -Author: evomarc -Date: Mon Apr 30 13:24:42 2001 +0000 - - Some changes in names, before too many users have to modify their code :-) - Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) - Changed the interface of make_genotype - now templatized by the EOT - and not the fitness - this is mandatory for ES genoptypes as it allows to - choose the type of gentype at run-time (from existing types, of course!) - - Also moved make_help.cpp into utils dir (otherwise you'd had to maintain - a copy into each representation dir!). - -commit d90286d890b9d871e8f1edc89d3b452adde2a12d -Author: evomarc -Date: Mon Apr 30 13:01:07 2001 +0000 - - Some changes in names, before too many users have to modify their code :-) - Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) - Changed the interface of make_genotype - now templatized by the EOT - and not the fitness - this is mandatory for ES genoptypes as it allows to - choose the type of gentype at run-time (from existing types, of course!) - - Also moved make_help.cpp into utils dir (otherwise you'd had to maintain - a copy into each representation dir!). - -commit 1c75344197eacc3066e64ec2ac7264ccecb60586 -Author: evomarc -Date: Mon Apr 30 12:26:31 2001 +0000 - - Some changes in names, before too many users have to modify their code :-) - Changed ga.h in src/ga into make_ga.h (was ambiguous with src/ga.h) - Chenged the interface of make_genotype - now templatized by the EOT - and not the fitness - this is mandatory for ES genoptypes as it allows to - choose the type of gentype at run-time (from existing types, of course!) - -commit 3f6d869b9058b4538a3cd65ef7817818156a7bf1 -Author: evomarc -Date: Mon Apr 30 09:26:37 2001 +0000 - - Changed EA basic image: - - caption changed from population-parents to parents-genitors - - quality improved (now 177Ko instead of 53 :-( - -commit 4f05bfaaf133fe8e5d966ba7e1b701815e86c150 -Author: evomarc -Date: Sun Apr 29 05:03:05 2001 +0000 - - Re-introduced the old ctors for the mutations (for backward compatibility - with the tutorial :-( - -commit 0c3f372f7bcc5810a9240f69ea7569c0ab5a4a7a -Author: evomarc -Date: Sat Apr 28 06:06:21 2001 +0000 - - Declarations for make_xxx_real.cpp files - for eoReal genotypes - Was previously es.h - now es.h is specifically for ES genotypes - -commit fc01c6862a59ba5d1d0ff8d16480953dd2e08b54 -Author: evomarc -Date: Sat Apr 28 05:53:37 2001 +0000 - - Adding first bricks of ES algorithm - make_XXX_es.cpp - -commit a7042bffee246a271b133b12424008b86c4b7264 -Author: evomarc -Date: Sat Apr 28 05:47:18 2001 +0000 - - Added bounds to the real operators in make_XXX (and hence in t-eoReal) - -commit 7b8999b2059a11bde54de8880fa9e4c25ba9ea45 -Author: evomarc -Date: Fri Apr 27 04:03:16 2001 +0000 - - Removed the -O2 from ga and es dirs - it takes waaaaaaaaaaaaay too much time - at least with g++ 2.95.3 - -commit 95bd02adbfa468f6c6b734d7b00ac4e6e6c2cc53 -Author: evomarc -Date: Thu Apr 26 15:47:37 2001 +0000 - - The declaratio file for all make_* - -commit 2d6bb7ae0c06375285e8f27c6e42ad4a6cfcac79 -Author: evomarc -Date: Thu Apr 26 15:35:30 2001 +0000 - - Removing eoRealBounds from Makefile.am - -commit b7ad190260b4afac594b703446f90ada7dc9f9de -Author: evomarc -Date: Thu Apr 26 15:31:48 2001 +0000 - - An initializer of eoReal that uses bounds - -commit 538d91c601ab16403553e5749769979bb254491e -Author: evomarc -Date: Thu Apr 26 15:27:48 2001 +0000 - - Adding all make_*_real.* - similar to ga stuff for eoReal (not ES yet) - -commit 4968d64b0541ac25fa9462e118cf3afea712e367 -Author: evomarc -Date: Thu Apr 26 15:24:53 2001 +0000 - - Doing libes.a in src/es and adding t-eoReal.cpp in test - I had to move eoRealBounds to utils dir because of global objects - Some domino consequences here and there ... - -commit 511dc266233409ee8d5a0c18cc4bd242cd45a0e8 -Author: evomarc -Date: Tue Apr 24 09:42:01 2001 +0000 - - Changed obscure comment into more detailed one - -commit ce5f9c052867eb3301aaddd08aaae61848fdd99e -Author: evomarc -Date: Tue Apr 24 05:13:10 2001 +0000 - - CLeaning up - -commit f7bdc4a07439e04f0be7d87af4e6bea62bc5976b -Author: evomarc -Date: Tue Apr 24 05:08:08 2001 +0000 - - Forgot the 2 representation dependent make_XXX.h - -commit 204fe8052be0662198d6fec0c82e5456096c6677 -Author: evomarc -Date: Tue Apr 24 05:05:09 2001 +0000 - - Adding eoEvalContinue - -commit 02db7f7e2435603ac420620d5f740168eb9a163d -Author: evomarc -Date: Tue Apr 24 05:03:54 2001 +0000 - - Cleaning up - -commit 9197e3e5c57c1e067971a62e0636eabf5c1c8252 -Author: evomarc -Date: Tue Apr 24 04:56:12 2001 +0000 - - eoEvalFuncCounter is now in a separate file - -commit 56c9464306a795a94e96d43f49c314361f0bffea -Author: evomarc -Date: Tue Apr 24 04:52:04 2001 +0000 - - The new libga - Apart from big changes in the src/ga dir, and the addition of the src/do dir - it also generated a few changes here and there, e.g. some include file still - missing. Also removed some warning from some test files. - -commit e71aea497fa62098651452db706e8824971e295a -Author: evomarc -Date: Fri Apr 13 08:57:40 2001 +0000 - - Few cosmetic modifs: - put the #define of some boolean in eoData.h - added some include that were missing (unnoticed because of include) - some checks in eoXXXTournamentSelect - -commit 51c15ed0b8f16d6cdbc9bf821fde77e77abe2904 -Author: evomarc -Date: Thu Apr 12 16:46:55 2001 +0000 - - Added eoCloneOps.h that contains ... cloning instances of eoXXXOp (all in - 1 file, sorry JJ). - Modified eo - also added a few comments there - -commit 369ef1708177ca18c49df8cc4dae4b555a91b054 -Author: evomarc -Date: Thu Apr 12 05:35:05 2001 +0000 - - Modified the default behavior of eoCountedStateSaver to save the final population. - So if you don't want any population save, don't use any eoCountedStateSaver. - -commit e3834441fdd1e02a7f42f6a80e6fc0b654825d87 -Author: evomarc -Date: Thu Apr 12 05:29:34 2001 +0000 - - Added a new boolean argument to the ctor of eoBitMutation: - you can now specify a rate-per-bit that will be normalized by the chromSize - -commit 78f6c6ef3c83da52cc88801fd4fb2ce1656bbb31 -Author: evomarc -Date: Thu Apr 12 05:28:23 2001 +0000 - - Added a few "virtual" that were missing - -commit 64990a1ac4069d6e5b32ffba960fe54685a61853 -Author: evomarc -Date: Wed Apr 11 12:01:51 2001 +0000 - - Changed all variables named howmany into combien (French for how many) - because of a silly problem on Solaris (howmany seems to be some macro???) - -commit 28c6b9a2855dd492f848a0b509fa6db24db5ee81 -Author: evomarc -Date: Wed Apr 11 04:44:39 2001 +0000 - - Modified printOn so that parameters that are not set explicitely by the user - are commented out - but still appear. Uses the (now public and pure virtual - in the base class eoParameterLoader) method isItThere. - -commit eafaa2d65e1200a5be83a3d6edc2dc101a179b87 -Author: evomarc -Date: Tue Apr 10 15:08:09 2001 +0000 - - Added the pure virtual isItThere method in base class eoParameterLoader - Also made the corresponding isItThere method in eoParser public. - This allows one to test if the user did actually input a given parameter - and thus not to write it in the output if not - as we want the output - of printOn to be "as identical as possible" to the actual user input - -commit 27691b21fdc9d9d40f2c5522c3559d3efccb79d8 -Author: evomarc -Date: Mon Apr 9 16:03:18 2001 +0000 - - eoCtrlCcontinue had a few remaining errors :-( - -commit 3d757e3243059e9a197c453f72d20bc9c8ada5d7 -Author: evomarc -Date: Mon Apr 9 15:28:24 2001 +0000 - - Modified the eoCtrlCContinue - had to create the eoCtrlCContinue.cpp - to make t-eoGA work (you should NOT have separate functions in .h files!) - I also included everything related to Ctrl C handling in #ifndef _MSC_VER - until someone tells me how to do it in MSVC - -commit bfca8ca4336a3d625c9a0e91e23a4905f6450c7d -Author: evomarc -Date: Mon Apr 9 14:20:48 2001 +0000 - - Sorry, last check in was a mistake - -commit e3745d0674f41a3884fde791c93e2d64184a4f2a -Author: evomarc -Date: Mon Apr 9 08:52:41 2001 +0000 - - Commented some ====== that resulted in error when running autogen.sh - -commit f0813c55cac3dfb1c33f100cf26a02011cc43273 -Author: evomarc -Date: Thu Apr 5 16:47:54 2001 +0000 - - Added the continue.tmpl template - and modified the html pages accordingly - (though eoCheckPoint.html is still a long way to complete). - Added some comments in all template files - and replaced - the protected by private (don't remember why these were protected!!!). - -commit ddc6650ce55437342495abe4640936ffaff4da2e -Author: evomarc -Date: Wed Apr 4 03:47:33 2001 +0000 - - Added the signal handling - see eoCtrlCContinue.h - I've disabled it in case of MSC as I don't know if this works there ... - - Also added a couple of "virtual" in the ga dir - -commit 4cb797544acca7c91057ca2a9fe46cef2a15af3a -Author: evomarc -Date: Tue Apr 3 17:14:53 2001 +0000 - - eoOperators now is in sync with the last modif of eoPopulator by Maarten! - -commit 7ec7a856e5b8ffc9b97189970da27c160dc97aa4 -Author: evomarc -Date: Tue Apr 3 17:14:08 2001 +0000 - - Modified the tempaltes to take into account - - the last modifications of the eopopulator class - - the include files (were totally missing in the old templates) - - JJ's demand for one class - one file :-) - -commit d634d95838d0cd0777e4c73732eba32aa092bd19 -Author: jmerelo -Date: Tue Apr 3 10:08:08 2001 +0000 - - In eoVector, changed printOn and readFrom to virtual - -commit 195ad728388b3e2f88f415f377325c3f2f31df1b -Author: maartenkeijzer -Date: Wed Mar 28 09:00:54 2001 +0000 - - eoParam, added specialization for eoValueParam::getValue - FDCStat and FileSnapshot: better error messageing - Scalar fitness: is now a vector of doubles - exercise3.1 added gnuplot again - - Don't know about eoCombinedContinue - -commit 434010d221a21f24d1b19573f8d78719383ccb09 -Author: evomarc -Date: Tue Mar 27 16:27:15 2001 +0000 - - Modified the names in eoPopStat! - Hoever, the way it's done now, the string gets TRUNCATED - and I dont' know why - -commit 1726a068612065ff8b742777bfc7835e35646a1d -Author: evomarc -Date: Tue Mar 27 16:02:00 2001 +0000 - - Adding Maarten's "snippet" to dump the whole pop to the screen: eoPopStat.h - Modified utils/checkpointing accordingly. - Tested in tutorial/Lesson3/exercise3.1 - BTW, the eoFileSnapShot does not work any more - I've commented it out - and will look at that later... - -commit ebca71e228614aa2b9e2334ffdba91fd47eca041 -Author: maartenkeijzer -Date: Mon Mar 26 10:09:40 2001 +0000 - - NDSorting: changed exact ranking values to make check for front easier - eoRNG: changed nothing (did some debugging) - -commit a1508b75a28e3d7c0c6175d6168665b853c6e929 -Author: maartenkeijzer -Date: Fri Mar 23 12:24:39 2001 +0000 - - added test for printing population - -commit b5bbc729579007734aaf38f82b3f514e1e3857b2 -Author: maartenkeijzer -Date: Fri Mar 23 08:54:31 2001 +0000 - - let doxygen look into this dir - -commit 65b1e9d2b6e0cf1078b4c399046c4d77d813b7a0 -Author: maartenkeijzer -Date: Fri Mar 23 08:53:48 2001 +0000 - - added - -commit d139d2df644496ce8d94de3bdb282f40bfcd68f1 -Author: maartenkeijzer -Date: Thu Mar 22 16:23:56 2001 +0000 - - updated project number - -commit efd02fa4b603e6baa0643affee906c119ddeb71c -Author: maartenkeijzer -Date: Thu Mar 22 11:22:31 2001 +0000 - - oops - -commit 94f0558d43ca9426cee7f443c64a6d0d8d1c7058 -Author: maartenkeijzer -Date: Thu Mar 22 10:51:16 2001 +0000 - - Changed the single objective shortcut calculation - -commit 0f243e4d92d856d71f80df8d7a522460223bc91f -Author: maartenkeijzer -Date: Thu Mar 22 09:00:30 2001 +0000 - - temporarily added fitness_traits to keep people up to date with this proposal - -commit 8ff63ff776a2ce01fbcb340322b456db715056e3 -Author: jmerelo -Date: Wed Mar 21 13:35:10 2001 +0000 - - Added a new xover to varlenxover - -commit d8fe00183a02c15b76995bad88fea820c367e3dd -Author: jmerelo -Date: Wed Mar 21 13:09:47 2001 +0000 - - Added a new atommutator to Variable Length, and corrected some headers which had problems - -commit 06dd2dc314f462b97224576cbcb7f09b90b632a9 -Author: jmerelo -Date: Wed Mar 21 12:10:13 2001 +0000 - - Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes - -commit 6f6ce7d81a9546a7852cef57cfc281c7d10f7438 -Author: maartenkeijzer -Date: Wed Mar 21 11:09:29 2001 +0000 - - test paretofitness class - -commit 3d82e6cddfd320b0c713ff4e88b2bd0f135b77bc -Author: maartenkeijzer -Date: Wed Mar 21 11:08:27 2001 +0000 - - Few changes in setting up the algorithms. It now gives an example of how to - write factory functions - -commit 665e20b0f8eaabb95e7fa9c64013829dfea73ce4 -Author: maartenkeijzer -Date: Wed Mar 21 10:55:22 2001 +0000 - - Changed a few things in the eoPerf2Worth classes, EO.h and eoSelectOne.h are functionally unchanged - -commit 9bbac485f99064309cb31c21f963d12a47d966db -Author: maartenkeijzer -Date: Tue Mar 20 14:34:07 2001 +0000 - - Updated eoStat.h to also "do the right thing" when confronted with pareto style fitness - -commit 11cdd38f245c13ae6f2bc8a76b4d38f4fcaa2a25 -Author: maartenkeijzer -Date: Fri Mar 16 14:19:11 2001 +0000 - - added help - -commit 3c45141ba7d7d0042a4e8375e3637b41b8eaf7dc -Author: maartenkeijzer -Date: Fri Mar 16 14:09:55 2001 +0000 - - Now look how perty t-eoPareto has become (though it doesn't do a proper mo modelling yet) - -commit 548b2ae5284abf14905b15bf831e5310f80f3781 -Author: maartenkeijzer -Date: Fri Mar 16 13:11:32 2001 +0000 - - Some bugfixing in MO optimization and added empty check: target in tutorial - -commit 2dd807ecbed7a05613594318fb6e316101518777 -Author: maartenkeijzer -Date: Fri Mar 16 12:09:36 2001 +0000 - - oops, ngens is now the nice 10 - -commit d09c216b61b1ca8f980a10342dabc3680077e139 -Author: maartenkeijzer -Date: Fri Mar 16 12:08:26 2001 +0000 - - Ok, made an eoParetoFitness class, which meant that I could roll back a few changes in EO.h (phew). - Also changed eoSelectFromWorth etc. - -commit cf8f6b5c1634d044ff026fc85f4bf773242c5f3f -Author: maartenkeijzer -Date: Fri Mar 16 11:48:32 2001 +0000 - - added - -commit d0fd97515e407df053cc5369790f9967843243dc -Author: maartenkeijzer -Date: Thu Mar 15 14:11:24 2001 +0000 - - added dist and distdir targets - -commit 67c357587381e947ccbf21824a897d4a04af7e5f -Author: maartenkeijzer -Date: Wed Mar 14 12:47:14 2001 +0000 - - Using nd-sorting now - -commit 9aa9e38090bf5ab4c34c0711a377866135c5441b -Author: maartenkeijzer -Date: Wed Mar 14 12:46:37 2001 +0000 - - First go, does not do niching yet - -commit 843d442475ad3b15e29a08f9ad012e47ae9eb090 -Author: maartenkeijzer -Date: Wed Mar 14 11:58:47 2001 +0000 - - OOPS, that was a major bug, letting non-dominating individuals dominate one another. - -commit fe89662e3c8d62794501d8aa703018c394413510 -Author: maartenkeijzer -Date: Wed Mar 14 10:14:27 2001 +0000 - - t-eoPareto now plots the evolving population and t-eoRandom check is slightly more strict - -commit 3798b665d47ee37cdb8a3a810f8c852ef653e4bb -Author: maartenkeijzer -Date: Wed Mar 14 10:13:27 2001 +0000 - - Added support for printing vector as a fitness - -commit 68904d7650273cf4e39502bf597e8f834ee25f4d -Author: maartenkeijzer -Date: Wed Mar 14 10:12:37 2001 +0000 - - Added Multi-objective fitness monitoring added support for vector > in eoParam - and made eoFileSnapshot type-safe - -commit 3449314a28b0c6d6940bc2910eee752f81da9424 -Author: maartenkeijzer -Date: Tue Mar 13 08:25:05 2001 +0000 - - Swapped linking order of utility libs - -commit b2a0349595136c8dc47408fc03b30a025b706c6a -Author: evomarc -Date: Tue Mar 13 05:25:51 2001 +0000 - - Just modified an wrong comment (after a too quick cut-and-paste) - -commit b917e54486aa70bcd29597687944d392a964152e -Author: maartenkeijzer -Date: Mon Mar 12 16:07:55 2001 +0000 - - Production of binop back to 1 - -commit 6a6b8551b06f1585e5614be63b6f1a32f535f464 -Author: maartenkeijzer -Date: Mon Mar 12 16:04:18 2001 +0000 - - Added first batch of pareto based stuff - -commit 3c19641c70772e1e1ddd07b228eae8c0297cacf2 -Author: maartenkeijzer -Date: Mon Mar 12 16:03:08 2001 +0000 - - Added pareto based stuff - -commit 4222e648297da77fb7b213c6f8a41d367aadcb83 -Author: maartenkeijzer -Date: Mon Mar 12 16:00:58 2001 +0000 - - EO: added overloaded printing of fitness (for vectors and pairs) - - Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth - -commit 492899bfb2d278932e5ad5209aeb9f45a1bc9a3c -Author: maartenkeijzer -Date: Mon Mar 12 14:27:31 2001 +0000 - - invalidating supported now - -commit ead2ac2c6268afae446bfb17d7432498f5492875 -Author: maartenkeijzer -Date: Sat Mar 10 14:02:23 2001 +0000 - - Changed the populator to be a) more efficient and b) more useable - - It is no longer derived from eoPop, it now gets a destination population. - This saves a lot of copying. The semantics has changed a little as well. It is - now an _infinite_ iterator. operator++ will *not* dispense new individuals, but - will merely stay at the end. To get a new indy, use operator*() as before. - - eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring - eoGeneralBreeder is changed to reflect the changes in eoPopulator - eoSequentialSelect now uses setup() rather than init() - -commit a27aa7112a316ef187e2249e9302534da6031a67 -Author: maartenkeijzer -Date: Fri Mar 9 14:14:53 2001 +0000 - - Test for a ssga added. - -commit 4388faec2e7a8fa0489876c674c249a46b753870 -Author: maartenkeijzer -Date: Fri Mar 9 14:13:28 2001 +0000 - - Various bugs found and resolved. - -commit 4f1802c4e992f501e444af8b6c60096f4dd13cae -Author: maartenkeijzer -Date: Thu Mar 8 13:38:41 2001 +0000 - - radically simplified the Makefile.am, but this only works for headers (no idea what the problem is with sources) - -commit 00c7a10cb0cc7330f4d089356d34555e4490396c -Author: maartenkeijzer -Date: Tue Feb 27 11:45:31 2001 +0000 - - put using eo::rng in top of file to help out gcc 2.91 - -commit 7eecd318f9231075c34cafa15f5a35fe9ca70f1a -Author: maartenkeijzer -Date: Tue Feb 27 11:44:28 2001 +0000 - - swapped order of libeo and libeoutils, gcc 2.91 did not like it - -commit ef75dbc2ee8e5890368b91abe53ef6a336eab0c5 -Author: maartenkeijzer -Date: Tue Feb 27 11:43:06 2001 +0000 - - Made dtor virtual - -commit 59a42603af32c73a2c08ace555b0e4cd5a63b4fb -Author: evomarc -Date: Tue Feb 27 05:24:24 2001 +0000 - - Still modifying eoInit ... - -commit 72b6692f9baf39e3a77cce2d6674dce13643eb8e -Author: evomarc -Date: Tue Feb 27 05:09:10 2001 +0000 - - Modified all init sequences in Lesson2 and Lesson3 - and all corresponding - files in html dir - after the return of eoRndGenerators and subsequent - modifications of eoInit - -commit a79075f67308997ddcf1a3d1000743d311cddc4f -Author: maartenkeijzer -Date: Mon Feb 19 12:23:13 2001 +0000 - - Modified eoInit so that it would use the eoRndGenerator base class. - To be able to use the primitive std::generate function, added a - set of wrappers in eoSTLFunctor.h that have the copy semantics most - STL functions expect (namely pass-by-value rather then pass-by-reference). - - Updated test/Makefile.am to also test t-eoRandom - -commit e28211188aa04766d1e4739fb305b3039f89b22c -Author: evomarc -Date: Sun Feb 18 06:41:30 2001 +0000 - - Date and version number - -commit f36f6d12658ad0429385f260a5729d757e4c445c -Author: evomarc -Date: Sun Feb 18 04:34:57 2001 +0000 - - Added the eo::rng (instead of rng) as default parameter to all calls. - Also t-eoRandom was abruptly aborting-> a min was greater than a max, and - exceptions were not being caught. - -commit 025eb736ee523bb51c27fb2c923c2aa24f7b0cf9 -Author: maartenkeijzer -Date: Sat Feb 17 10:51:31 2001 +0000 - - eoVector is back (eoFixedLength and eoVariableLength are gone) - - Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: - - eoNormalGenerator - eoUniformGenerator - eoBooleanGenerator - eoNegExpGenerator - - Note the suffix that are added to aid in determining what these classes do - -commit e0ace0794fa94b08662a5d3452ede74f6be170e3 -Author: evomarc -Date: Sat Feb 17 08:22:53 2001 +0000 - - Now takes into account the last (and last!) modification of the operator interace: - no more invalidate, but a bool returned for simple operators, and a better description - of the eoPopulator/eoOpContainer links. - -commit a403525af015525a30a95491f61d5e96b36adb95 -Author: evomarc -Date: Sat Feb 17 06:47:31 2001 +0000 - - Forgot the selector in the ctor - -commit 1662fd2a8baac63d8e5b0bcb90f8a77f35cfffdd -Author: evomarc -Date: Sat Feb 17 06:42:20 2001 +0000 - - Modified crossover and mutation to account for the new interface (bool ...) - Added the genop.tmpl, template for general op, 3 cases, growing pop, - shrinking pop through erase, thrinking pop through extra selector - -commit 83e883a1586fea464c93184d7c4752d5e4bdbaf0 -Author: evomarc -Date: Fri Feb 16 18:00:18 2001 +0000 - - Added oine star at start of comment to have Doxygen process it !!! - -commit 70d98042777680a022502411eda7d78af3de3565 -Author: maartenkeijzer -Date: Fri Feb 16 09:39:06 2001 +0000 - - works for me - -commit 7e849e2082805e6e5ba743303ec627f1dabd5804 -Author: evomarc -Date: Fri Feb 16 08:21:25 2001 +0000 - - The perf2worth major check in - 2 new important classes: eoPerf2Worth and eoSelectFromWorth - Instances of eoPerf2Worth are eoRanking and eoLinearFitScaling. - Coming soon (piece of cake now) are the niching strategies (sharing, clearing) - -commit da8b467b12c34a729664b19e45f716cbfbb2b932 -Author: evomarc -Date: Fri Feb 16 05:06:17 2001 +0000 - - Only names modifications, to comply to EO strict rules :-) - -commit 0540496021ec723d0ed639b0dd35f04811af5844 -Author: maartenkeijzer -Date: Thu Feb 15 08:31:38 2001 +0000 - - reverted the max-to-produce initializer - -commit 562b0b63e355a8bdd8a9b06f35a1679c89cde099 -Author: evomarc -Date: Thu Feb 15 05:36:28 2001 +0000 - - Changed the default values for popsize, vecsize and maxgen so - the user has a chance to see something even on Pentium 10GHz :-) - -commit 9dbb516d8bfba182ebf20e865d66c486e7816b54 -Author: evomarc -Date: Thu Feb 15 05:35:31 2001 +0000 - - Modified the comments so that all callses are documented by Doxygen - (a comment starting with // before the class definition is not taken into account) - Also updated the initial overall comment - - and waouw, doxygen generates links there, too! Cool. - -commit bf0e84fc5608717b8351f58773f3f9e83a23209a -Author: evomarc -Date: Thu Feb 15 04:47:18 2001 +0000 - - A few minor corrections (and some comments) after Maarten big commit - -commit 2ff2b66fddc425f390d50a862d80c0694896db6b -Author: maartenkeijzer -Date: Wed Feb 14 18:05:36 2001 +0000 - - updated the dsp, dsw files for the library - -commit 98a9f24879043926bc1eda68398e03a852cadf4f -Author: maartenkeijzer -Date: Wed Feb 14 18:01:30 2001 +0000 - - no need to keep these test functions here, will start new project in /test - -commit 8ce0e6bb2a83e200e290f9d8ae34e45afede0a53 -Author: maartenkeijzer -Date: Wed Feb 14 14:09:16 2001 +0000 - - Changed the return value to return what it got in - -commit 3a9b5a0e7e0299b2e0ad6a7e3947122858fd1ebd -Author: maartenkeijzer -Date: Wed Feb 14 10:35:26 2001 +0000 - - Well, what do you know, major commit. - - Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, - without invalidating fitness. Added a set of invalidators to take over - that job (see for instance eoSGA and eoSGATransform how this can transparantly used) - - Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) - - Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor - exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) - and of course changed all the operators to reflect the change (and found a few that didn't - invalidate the fitness, thus really pointing out the advantage of the current approach) - -commit 17d55ae92bb25f9fc554dd8459fc04f52947ce02 -Author: jmerelo -Date: Tue Feb 13 22:39:56 2001 +0000 - - Just playing with the CVS variables - -commit b7d071d92d731ee65e5254b6d328f6d28dd6da28 -Author: jmerelo -Date: Tue Feb 13 22:38:23 2001 +0000 - - Just playing with the CVS variables - -commit 0dd3e27e4e74a468edda4de5a17bd4fba1f77ed3 -Author: jmerelo -Date: Tue Feb 13 22:35:07 2001 +0000 - - Moved out of the 'obsolete' directory a couple of honest classes, which didn't harm anybody; activated also in Makefile.am the program that tested them - -commit 07bc61e6940f45755de8671a5aa2a061db3bf4b8 -Author: maartenkeijzer -Date: Tue Feb 13 14:43:54 2001 +0000 - - Added a bit more documentation, more to follow (I hope) - -commit 262869d0ae416a7fe67b072057cc3310d56b4346 -Author: maartenkeijzer -Date: Tue Feb 13 12:38:19 2001 +0000 - - fixed a bug: the parser now correctly parses parameters of the form - - -Pvalue - - This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply - ashamed to have created such an off-by-one error. - - Marc assumed this was wanted behaviour (so that it should read: -P=value) - I must admit that this is a logical conclusion, though it was merely a side-effect - of the error. To not force Marc to rewrite the tutorial and his way of working with - EO, I decided to make a feature out of the bug, so that now the parser will parse: - - -Pvalue - -P=value - - and of course the true and blue: - - -Parameter=value - - I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) - -commit 680229507fb7dbe798cc9a6483bac1bdf82e2496 -Author: maartenkeijzer -Date: Tue Feb 13 10:35:47 2001 +0000 - - Just an update - -commit dea8a51f7ed34f198ce7f30dee4b438c62dec0e0 -Author: maartenkeijzer -Date: Mon Feb 12 13:58:51 2001 +0000 - - Ok, updated the Makefile.am again to use the - - make check - - Command I picked up in the automake documentation (RTFM, you know) - - Tagged a lot of header functions in the GnuPlot files with 'inline', - so they can be used from more than one sourcefile. - - Ok, now the interesting news. Started a new library libga (not to be confused - with Matthew's GaLib). Here I suggest we put a fairly complete and configurable - genetic algorithm. Just to see how far we can stretch ourselves and also to have - a GA-componenent that can be used in other applications without having to rebuild - the entire thing. test/t-eoGA.cpp tests this library - -commit 9f5069b23af50c585d93e9a885267af281bad863 -Author: maartenkeijzer -Date: Sun Feb 11 16:35:21 2001 +0000 - - run_tests is expanded to run everything (but only once yet, will have - to address this later). - t-eoSymreg is build to run for just a few generations, otherwise testing - it would be an excercise in patience. - -commit 4aed1813110464356b318a58bf048f0afb637325 -Author: maartenkeijzer -Date: Sun Feb 11 16:25:03 2001 +0000 - - Removed small bug in reading outside a buffer in eoParser::readFrom - - This caused the parser to crash when a simple flag of the form program -f - was given. - -commit 27432e53777f1f812ca9443e3b8705fa1b68d769 -Author: maartenkeijzer -Date: Sun Feb 11 16:01:47 2001 +0000 - - run_tests, add your own tests here - -commit 05ed67ccd154acf5edd1c6d15544e807640e5e18 -Author: maartenkeijzer -Date: Sun Feb 11 15:58:55 2001 +0000 - - Test now is not build automatically, make test should be given explicitely, then a new script run_tests will be used to check if everything still works - -commit ed6ae447e8bd17851563dcf70b8fe563b01de60f -Author: maartenkeijzer -Date: Sun Feb 11 15:57:01 2001 +0000 - - Commented out the check for libtool, as we don't use it currently - -commit 2796319a13d52298b9bcc224857e48e302984198 -Author: evomarc -Date: Sat Feb 10 05:36:50 2001 +0000 - - Added matermind in SUBDIRS - -commit 3c2df139bd2a31e02399b99e37961ef1bfff68f8 -Author: jmerelo -Date: Fri Feb 9 16:52:06 2001 +0000 - - Minor bugs for Win quashed; fixed Win project files - -commit d58511132c25d2b32b8f510526dd049212255b87 -Author: maartenkeijzer -Date: Fri Feb 9 11:52:55 2001 +0000 - - Removed the -O2 flag from the makefile in the test directory. - Builds should go faster now. - -commit b893445d31658e5d1b7891b44ba6ab174561b9f4 -Author: evomarc -Date: Fri Feb 9 08:32:47 2001 +0000 - - Added a comment before eoPopulator class so it is documented! - -commit 5bf1d83f6a823740185748327831704b3787b540 -Author: evomarc -Date: Fri Feb 9 08:21:35 2001 +0000 - - Changed the first paragraph, added warning that it should be used on-line only - -commit 0c1036617e0dee870af3ba8c047ac14d59c9c400 -Author: evomarc -Date: Fri Feb 9 05:52:44 2001 +0000 - - Big change in eoGeneralOp interface: left out! - -commit a55603631594efd0ee7a1abbdef2a94df4abdc94 -Author: evomarc -Date: Fri Feb 9 05:46:12 2001 +0000 - - Change in Makefile - but again it should be replaced with clean Makefile.am - -commit 018db6689a1604502555033ba92b0048f834932f -Author: evomarc -Date: Fri Feb 9 05:43:06 2001 +0000 - - The big GeneraoOp interface change - in test dir - -commit 97486fba28bf355084aa7afe8fa096e06e821e18 -Author: evomarc -Date: Fri Feb 9 05:34:04 2001 +0000 - - Modified the Makefile of Lesson? to allow make all to also make the exercises - It need to be modified anyway into Makefile.am stuff - -commit 890218e270a4d31b0a59864cabed1e5a452e2c7c -Author: evomarc -Date: Fri Feb 9 05:28:33 2001 +0000 - - Removed eoEvolutionStrategy because it was based on eoGeneralOp old interface - -commit d347fa9da27e02f51b8696d78e501e295c9e6a7d -Author: evomarc -Date: Fri Feb 9 05:25:25 2001 +0000 - - Because it has not extension, I had forgotten to update the eo file itself! - Now reflects the change of eoGenOp interface and the changes of names in ga - -commit 09b669ed466517e8480feec0b82062a4046ef878 -Author: evomarc -Date: Fri Feb 9 05:21:04 2001 +0000 - - Added the GnuPlotSnapshotMonitor, the eoScalarFitnessStat and eoFDCStat in checkpointing - -commit 3b2125e060bf036c720bdfd1141da8383f8cbaac -Author: evomarc -Date: Fri Feb 9 05:10:25 2001 +0000 - - Left-out from the big change of general op interface! - -commit 415b4196711991ddd3e73e331c8f5d0eda73191c -Author: evomarc -Date: Fri Feb 9 05:09:26 2001 +0000 - - The BIG change of general operator interface - I also changed - - the eoQuadratic into eoQuad (as dicussed with Maarten) - - the eoBin into eoBit, with more appropriate names for the "binary" - operators (that can be unary!) as no one protested when I posted on - eodev list - -commit 1b681e4e0dc467260f4f8f56c537e6756210aca5 -Author: evomarc -Date: Wed Feb 7 05:15:18 2001 +0000 - - Added the missing include of eoScalarFitness - mandatory due to - explicit specialization for eoParamValue > - -commit d3525298feb143dba22c0cdd0a70f90d46ed2aa2 -Author: evomarc -Date: Wed Feb 7 05:13:33 2001 +0000 - - Added the handling of generic operators in Combined Ops - -commit b89d06386d5305db955b91a63f830e8fd4d48b08 -Author: evomarc -Date: Wed Feb 7 05:11:37 2001 +0000 - - Added the shuffle(vector) method - -commit 1c93adc43ac421074a9b28e8eb66db38b786afc2 -Author: evomarc -Date: Wed Feb 7 05:04:24 2001 +0000 - - Added selection methods - eoBestSelect always return the best individual - eoSequentialSelect a selectOne version of eoDetSelect (uses an index to - return next offspring from sorted pop) - -commit f9fed9acc1f8eec2214cb07e6344e13b10f7eeb3 -Author: evomarc -Date: Thu Feb 1 05:27:36 2001 +0000 - - Forgotten a debug print - -commit 1ace1cf8f901c64c86e57c5023dd028b2bfdfdb1 -Author: evomarc -Date: Thu Feb 1 05:17:16 2001 +0000 - - I had forgotten to add pipecom.h - Moreover, I got fed up with error due to const/non const, so I modified - PipeComSend to take a const argument. THe consequence is that it will not run - under plain C any more. - -commit 56abe665823ab92b01bc497ec376e4a3343ee5ef -Author: evomarc -Date: Wed Jan 31 18:38:39 2001 +0000 - - Added the monitoring facilities for snapshots (i.e. generating and plotting a new file - every generation) which is different from the continuous monitoring (same file/plot is - angemented every generation). - This lead to a number of modifications in many files in utils dir - - But now we can watch on-line - - fitness spreadout - - FDC plots - - multi-objective Pareto fronts (though the multi-objective sruff isn't there yet!) - -commit 097d34be395c450cac88620df7eec3cb53f2aba3 -Author: evomarc -Date: Tue Jan 30 04:53:05 2001 +0000 - - Comments added to remove undocumented classes from Doxygen documentation - -commit 2b46277eedef09dc032410f94751cf90e2b3843f -Author: evomarc -Date: Mon Jan 29 10:25:44 2001 +0000 - - Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. - The former simply set values to the boundary values in case they are out - The latter allows to short-cut all bound-checks when no need - - SOme day I will put this in utils, and have a eoRealBounds.cpp in the - pre-compiled library - -commit 0f985c627e5e8718e3f184baa0a2be5b9351c796 -Author: evomarc -Date: Sun Jan 28 07:31:34 2001 +0000 - - Modified to use eoRealBounds rather than eoEsObjectiveBounds - -commit 75dad8f8992df7cadb7b69f1bea8c2a9df205ba4 -Author: evomarc -Date: Sun Jan 28 07:27:12 2001 +0000 - - Error in src/Makefile.am - -commit 03bc482da05702af77f17dc14502fe56425cb27e -Author: evomarc -Date: Sun Jan 28 07:02:27 2001 +0000 - - Actually removed eoEsObjectiveBounds.h and evolution_strategies - -commit 8d35fad13654a080d2ce71afc8fb3ee7128274cb -Author: evomarc -Date: Sun Jan 28 07:00:41 2001 +0000 - - Added the includes ga.h and es.h - Removed the old eoEsObjectiveBounds and evolutionar_strategies from es dir - -commit 508a5b9215224542af569c95ad638ab16985cd5c -Author: evomarc -Date: Sat Jan 27 08:38:31 2001 +0000 - - Added some comments so eoRealVectorBounds is documented - -commit 9d9958d3bc673f9e0dc850dacd3fce9ec084a1cb -Author: evomarc -Date: Sat Jan 27 08:20:39 2001 +0000 - - Following the change in includes (added ga.h and es.h everywhere pfuhh) - -commit c015b82506440fe9a8b431076625ee9f78830aab -Author: evomarc -Date: Sat Jan 27 07:46:07 2001 +0000 - - Added eoGenericRealOp.h that are the exact copy of the operators of eoReaOp.h, - but in generic format. - They are used at the omoment only in eoEsStdevXOver.h that calls a crossover - on the object variables, then a crossover on teh stdev vectors! - A piece of cake :-) - -commit 72e959054419a439f0643f4be6a7dd7926e4afec -Author: evomarc -Date: Sat Jan 27 07:43:58 2001 +0000 - - I have separated the include files into - eo everything that is general to any representation - es.h everything about real representation (in es dir) - ga.h everything related to bitstring representation (in ga dir) - - To be continued by gp.h, and ... - - This has lead to some slight modifications in test file eobin and all tutorial - examples files... - - I've also added in utils eoDistance, generic functor to compute distances, - including also the generic Euclidian distance - -commit 41ff11bd7fc8368d024fcdfb76f2f1493372a3a7 -Author: evomarc -Date: Sat Jan 27 07:41:46 2001 +0000 - - I have separated the include files into - eo everything that is general to any representation - es.h everything about real representation (in es dir) - ga.h everything related to bitstring representation (in ga dir) - - To be continued by gp.h, and ... - - This has lead to some slight modifications in test file eobin and all tutorial - examples files... - -commit 8aad8f547cf832f048793c13b28cf3ae383046ca -Author: evomarc -Date: Sat Jan 27 07:33:55 2001 +0000 - - A few mistakes corrected - and some comments on the setup method - -commit c917207b5d0f03ab669c2c097f45b9fb5309505a -Author: evomarc -Date: Fri Jan 26 18:26:30 2001 +0000 - - Added the bounds to all eoRealOp operators (and to the eoNormalMutation). - The eoESObjectiveBounds should soon dissapear!! - -commit 70caa91b2259a6c73425a6689ad61bd430d9b50d -Author: evomarc -Date: Fri Jan 26 17:12:13 2001 +0000 - - Typos in comments - -commit 576249509b15c32413dd80989054bebb860dad6e -Author: evomarc -Date: Fri Jan 26 17:09:33 2001 +0000 - - Some includes were missing in eoPop and eoOp that I had not noticed before - trying to compile test/t-eoSymreg.cpp - -commit ce031f10a3a371f3687009ebfc3dc779d0e66900 -Author: evomarc -Date: Fri Jan 26 04:06:09 2001 +0000 - - Added eoRandomReduce - -commit da6685830866478789dd1252cb1b4b86fe0058bd -Author: evomarc -Date: Thu Jan 25 16:14:25 2001 +0000 - - Full t-eoSelect file, that allows to test all selectors - feature: generation of files suitable for gnuplot to see how individual spread out - -commit 42ac826f3c21037dbfbcf92a035c49207ac6dfe6 -Author: evomarc -Date: Thu Jan 25 16:13:15 2001 +0000 - - Added ranking selection (eoRankingSelect) and (linear) fitness scaling in - proportional selection (a completely different file, eoFitnessScalingSelect.h) - -commit 585c5435699b951f35df6206941725077ae6c3b7 -Author: evomarc -Date: Wed Jan 17 05:29:54 2001 +0000 - - Modified the link to EO pages so that users can download the development - version - as no example works with the current snapshot - -commit c62521648b86d69c367784ac27fc8c9ce956365c -Author: evomarc -Date: Tue Jan 16 09:49:46 2001 +0000 - - Added the shuffle method - -commit deace62e55da1111374a49cae431f5f9f834c489 -Author: evomarc -Date: Tue Jan 16 07:20:48 2001 +0000 - - Added the normal mutation - and the 1/5 mutation in FirstRealEA in Lesson2 - -commit 51f3b56fd2e7b50b9de0ac85ec89bf3efaac02d3 -Author: evomarc -Date: Tue Jan 16 07:20:02 2001 +0000 - - Added the normal and 1/5 mutations (file es/eoNormalMutation.h) - -commit 20b70de2a16de473882594ddf8095f35df153a7e -Author: evomarc -Date: Tue Jan 16 07:18:45 2001 +0000 - - Added the normal mutation - and the 1/5 mutation - -commit a8bf667774b4224e45699418a6ad35b120e8d14e -Author: evomarc -Date: Tue Jan 16 05:52:01 2001 +0000 - - Added the eoRandomReduce class - hence I also added the shuffle method - in eoPop (I had been postponing that for a long time!) which in turn required - another class of random generator (whose operator() takes an unsigned as argument) - -commit f988b42fed4c7bf818bc96f045ba95ba7e4691af -Author: evomarc -Date: Fri Jan 12 21:31:42 2001 +0000 - - Corrected some error in variable name after last changes in method append - -commit e532234d1ce73cef0b477b437d3036906e14a16f -Author: evomarc -Date: Thu Jan 11 11:02:37 2001 +0000 - - New versions of bounds for real variables. - Should supersede eoEsObjectiveBounds, whose name was misleading anyway - as this can be used in any REal-ceded GA for isntance - -commit 4b2bb7f5641799966bb1ba92491ff2d83264f4f1 -Author: evomarc -Date: Thu Jan 11 10:48:31 2001 +0000 - - GOing to the generic operators: some additions (eoGeneric*) - and some modifications in eoFixedLength and eoVariableLength. - -commit 5f925a4c12290395294f19e300f57738980ec00e -Author: evomarc -Date: Tue Jan 9 03:33:16 2001 +0000 - - Added the eoSurviveAndDie comments. - Should be complete!!! - -commit 5edbc0e98befa02aea0e2900e82fad4b3f98db69 -Author: evomarc -Date: Tue Jan 9 02:17:28 2001 +0000 - - Added the namespace in description of RNGs (and corrected a few broken links) - -commit 61a85582d53e4a35ebe6a7978f24ad2416d286ea -Author: evomarc -Date: Mon Jan 8 10:07:27 2001 +0000 - - Added the namespace eo for the global variable rng in eoRNG.cpp - Also added "using eo::rng" in eoRNG.h so nothing has to be modified. - We should gradually move to write eo::rng everywhere, and remove that using - directive to be almost full-proofed against possible name collision. - -commit 4b83dbd0f48842527f99e500223d73da8d4c3504 -Author: evomarc -Date: Mon Jan 8 09:52:15 2001 +0000 - - Added the descrition of evolution engines in eoEngine - and links to SGAI STL Web site in eoTutorial and eoProgramming - -commit c34e94b0d041f1deb86bfd00473f3a08e4b8a688 -Author: evomarc -Date: Fri Jan 5 14:42:48 2001 +0000 - - Removed a forgotten comment :-) - -commit f876356d37554853011774e4cd2e9cc4bc85fada -Author: evomarc -Date: Fri Jan 5 08:50:01 2001 +0000 - - I'm not sure about whether the sourceforge list is equivalent to the onelist list, - so I finally ut both in README! - -commit 82743acd3a49a17e3759441627fb32367f7431b0 -Author: evomarc -Date: Fri Jan 5 08:17:11 2001 +0000 - - Put the sourceforge name for the mailing list - -commit 63628141759544e2d185b58d5282415f0a7ac9a4 -Author: evomarc -Date: Fri Jan 5 07:30:34 2001 +0000 - - Updating installation ... - -commit 39521b2b687fbffa608e1c9c4db9e82ccb1ddecc -Author: evomarc -Date: Fri Jan 5 07:20:45 2001 +0000 - - Correcting my previous errors ... - -commit 222f533a9efc02eef2b1758d749710744b7f42e8 -Author: evomarc -Date: Fri Jan 5 07:10:25 2001 +0000 - - Trying to make the installation lighter, but the doc and the src - would not compile, with make doc or make src ... - -commit 8c82c8aa566b45bd02980c5e097fdae3405abbf4 -Author: evomarc -Date: Fri Jan 5 06:55:16 2001 +0000 - - Removed Lesson4 from Makefile - it is not there yet, and generates an error - -commit 1beb08c39d8debdcbc4e5df4ca2e9da56a64c73b -Author: evomarc -Date: Fri Jan 5 06:25:26 2001 +0000 - - Added a message about generating the documentation if you have doxygen - -commit 8e4513d8804b296fec394c67b9fd85adf9e79929 -Author: evomarc -Date: Fri Jan 5 06:24:53 2001 +0000 - - Removed doc from the SUBDIRS as most people don't have doxygen installed. - Now you need to type in "make doc" to generate the doc - -commit b2636604a286c4245f0dfdddbd8763863a6f7b31 -Author: evomarc -Date: Fri Jan 5 06:23:54 2001 +0000 - - Updated Makefile.am to account for the change of names in selectors - -commit b1fa5076e2e96560b488b76dec61b0368846d88a -Author: evomarc -Date: Fri Jan 5 05:48:16 2001 +0000 - - Changed the names of the exercise files to exerciseN.p - N lesson nb, p exercise nb - -commit 67ae5f5a6f6bfe44c63d91d3a9b546c9716962e4 -Author: evomarc -Date: Fri Jan 5 05:44:35 2001 +0000 - - eoHowMany is now included in utils dir - -commit a998ad0a411709f62fb1fe76f1f2f1f9d7d29a58 -Author: evomarc -Date: Fri Jan 5 05:42:08 2001 +0000 - - Checking in the name changes in selection procedures. - This impacts on many files, creating new entries in src (the old ones are moved - to obsolete dir), modifying t-eoSymreg.cpp and t-eobin.cpp in test, - as well as gprop.cc and mastermind.cc in app dir (not to mention almost all - files in tutorial:-( - -commit b6e99450281f28fcaba596e9568643e52d8e1fc6 -Author: evomarc -Date: Fri Jan 5 05:41:26 2001 +0000 - - Trying to ci eoTutorial.html (there is a sticky tag that keeps bothering me ...) - -commit c3fef2e4931ee7d3f39cb6d50b980aaa2469ad84 -Author: evomarc -Date: Thu Jan 4 15:23:14 2001 +0000 - - I had removed the wrong file!!! - -commit b685eb8048702b214f3fb0d1194097eb7d27ae28 -Author: evomarc -Date: Thu Jan 4 15:21:18 2001 +0000 - - removed redundant index.html in html dir - -commit 4d77c9116f3a8a1bc5f56d34541e19363d8ab47f -Author: evomarc -Date: Thu Jan 4 05:06:09 2001 +0000 - - Sorry: removed eoSGATransform, that is in eoSGA.h ... - -commit 2f130666258d8c0ff5323a5cd30b3f1b2dd77102 -Author: evomarc -Date: Thu Jan 4 05:00:40 2001 +0000 - - Adding the selectin and replacement procedures - -commit 647156c6a88d90d6d0c645e700094340197ebe38 -Author: evomarc -Date: Tue Jan 2 13:31:40 2001 +0000 - - Adding t-eoSelect.cpp to test selection procedures. Modified Makefile.am accordingly - -commit 3074101d1c18cb8a7fbbc2238bac92bf24154fa2 -Author: evomarc -Date: Tue Jan 2 13:27:11 2001 +0000 - - Adding eoDetSelect, deterministic batch selection, that copies the individuals - one after the other. Should shuffle them in between (TODO). - -commit 4fd2be4bfff8160fc71057b2c39efc006ec49eb7 -Author: evomarc -Date: Tue Jan 2 07:54:12 2001 +0000 - - A few deatils - -commit 52ed2ef8b6d50b9071d193042c17cf62908cbe3c -Author: evomarc -Date: Tue Jan 2 07:35:56 2001 +0000 - - Still the same !@#$$%% modif due to egcs problems ... - -commit 721e8d2cd54e6790cce23d85d7ede03a0647e530 -Author: evomarc -Date: Tue Jan 2 07:23:35 2001 +0000 - - Follow-up to the modif of SecondBitEA.cpp due to egcs... - -commit 5d8c30b2ae18c1925ad676644d267bf1dac29cbb -Author: evomarc -Date: Tue Jan 2 07:19:55 2001 +0000 - - A few details in the comments - -commit 04e429fdb1061039f25c11d4c4212f465e99500a -Author: evomarc -Date: Tue Jan 2 07:03:57 2001 +0000 - - I had to change the whole way the parameters are read, because EGCS did not - allow the nice constructs I had imagined (and compiled with g++) - - I removed the createParam method in Parser class - that was creating the parameters - on the heap. Not allowed to have a templatized method ??? - - I removed the subroutine read_param in SecondBitEA, as you need to create - permanent parameters (eoParser only holds references), and egcs did not allow - to create them by reference, i.e. in the line - eoValueParam & blablaParam(...); - - So now everything is done in the main_function, and 3 lines are needed to create - and read every paramter (sigh ...) - -commit 769b1fe31e09d8823866631ecc8fc568df33fd9b -Author: evomarc -Date: Wed Dec 27 11:37:05 2000 +0000 - - A few additions and corrections ... - -commit 0447391f7c7627675e78cdeb55a7d11b85ba1097 -Author: evomarc -Date: Tue Dec 26 10:28:27 2000 +0000 - - Modified the help message for the short name (added the missing =) - -commit d7693131a600e49ec1bd4694d93f2ec201445353 -Author: evomarc -Date: Tue Dec 26 08:33:48 2000 +0000 - - Moved eoSGATransform into a separate file and added the dynamic version - (where arguments can be passed by value or by reference). - Modified eo accordingly - -commit 5d0a03fa4ed79f66d6b6504d9a49b6f6c876f0ca -Author: evomarc -Date: Tue Dec 26 07:42:09 2000 +0000 - - Modified the include list after the big eoReplacement changes - -commit f97ab01cd4c7c71670ae1779b1d50c8eb4921b61 -Author: evomarc -Date: Fri Dec 22 15:13:54 2000 +0000 - - Had forgotten the section name of the parser.processParam call in the - definition fo the parameter. - -commit 7b1074f44e90f694bb40dcc474b3fd0fb5cef6bb -Author: evomarc -Date: Fri Dec 22 14:59:10 2000 +0000 - - Back to the 3 lines to declare a parameter and read it within the parser: - some compiler (egcs) don't like the createParam method in eoParser.h - -commit 21cd652430ac4120e44c8a277e052db485bec659 -Author: evomarc -Date: Fri Dec 22 14:56:12 2000 +0000 - - Back to the 3 lines to declare a parameter and read it within the parser: - some compiler (egcs) don't like the createParam method in eoParser.h - Also removed the reference in parameters declarations (a cut-and-paste error). - -commit af950bdc78a71f47c07ca184f294ddeca600d3b5 -Author: evomarc -Date: Thu Dec 21 06:49:41 2000 +0000 - - Augmented the functors and STL parts - but I still would appreciate - help on the STL part! - -commit d411685a5cb82a2f76919b23bbe79e3024d324d6 -Author: evomarc -Date: Thu Dec 21 05:35:01 2000 +0000 - - Removed the silly reference for all parameters (cut-and-paste error!). - But the funny thing is that my compiler did not complain ... - -commit a3555b2e8a29b48a62fd1e87433ffa012fb03a44 -Author: evomarc -Date: Tue Dec 19 22:14:29 2000 +0000 - - Updated INSTALL and README to EO-specific instructions! - -commit ed0e76350a80da4a0087f3b778e6abcb8a88f4ec -Author: evomarc -Date: Tue Dec 19 18:43:25 2000 +0000 - - Update after the change in replacements - -commit ca586fc799e816be9ff16747838166abc2c72ed0 -Author: evomarc -Date: Tue Dec 19 18:42:41 2000 +0000 - - Added t-eoRepalcement.cpp, that tests all new replacement procedures - -commit 6acdcb6d9b673cde3937d7217f793d4e44245cbf -Author: evomarc -Date: Tue Dec 19 18:41:19 2000 +0000 - - THe big eoReplacement update: - The interface for eoReplacement is now eoPop&, eoPop& - (i.e. no const) and the result must be in the first argument in the end. - - Hence it is possible to do SSGA and all intermediate replacmeent procedures - - The classes derived from eoMergeReduce.h are now in a separate file - The SSGA-like replcaement procedures are in eoReduceMerge.h - A more general replacement can be found in eoSurviveAndDie.h - (it could be made a littel more general - still open for upgrades). - - Also some accessors have been added to the eoPop (best and worse individuals) - - And include file eo has been updated - -commit 25dd305ee6d488f853763c3af6bf798b9de11d1d -Author: evomarc -Date: Tue Dec 19 18:32:09 2000 +0000 - - A few errors + local TOC at top of eoEngine - -commit 47031e82c93096396fae157338e56ae67fbd0b1d -Author: evomarc -Date: Tue Dec 19 18:18:08 2000 +0000 - - Bottom-Up/Top-Down modifs - -commit 6a0010474aa3bbadac6576ac6573d3f40eba40d1 -Author: evomarc -Date: Tue Dec 19 18:09:10 2000 +0000 - - A new util class to handle the rate/integer argument to selectors/replacement - -commit 727f190a8850e030e4cbfc2532515108f7f42fb4 -Author: evomarc -Date: Tue Dec 19 18:02:19 2000 +0000 - - Changed NoReplacement to GenerationalReplacement - -commit 2a93bba7e65e8bbeab93c8c885a93d7e7388d5a1 -Author: evomarc -Date: Tue Dec 19 10:17:39 2000 +0000 - - Changed the "to-down / bottom-up" to "algorithm-based / component-based" - Also added all replacement procedures in eoEngine.html - and the general operator interface in eoOperators.html - -commit 9c3453e876e4bad22ad19db7f21e2732abe8deae -Author: evomarc -Date: Tue Dec 19 05:31:54 2000 +0000 - - A small detail ... - -commit ba78a70aa44230abc2c481047109867fe4c7b6e8 -Author: evomarc -Date: Sun Dec 17 07:49:55 2000 +0000 - - Updated teh INSTALL and README files that were really minimal!!! - -commit 2d93e7374b2c2b568d2c01dd15991a90b25d4971 -Author: evomarc -Date: Fri Dec 15 18:09:08 2000 +0000 - - Corrected a bad link - -commit 44e715f24194292ffff38b29cb0cba5ad7a6587d -Author: evomarc -Date: Fri Dec 15 17:01:11 2000 +0000 - - deleted trash file lesson1.ps - CVS ---------------------------------------------------------------------- - -commit c18f63f7e4da2cf9cd748bf302ce7a20d1ba7cca -Author: evomarc -Date: Fri Dec 15 16:57:37 2000 +0000 - - Added utils/eoGnuplot1DMonitor.h ni the list of includes - -commit a83da72b4624a7622a28293c9def14411712ec0f -Author: gustavoromero -Date: Mon Dec 11 09:28:40 2000 +0000 - - adding .deps - -commit 3d93a07d74ddd717a7f35156ec266eaf74a9113f -Author: evomarc -Date: Fri Dec 8 15:10:13 2000 +0000 - - Adding Templates in dir tutorial, to hold some simple files that - only need to be filled by the user to code new items. - At the moment, only eoMonOp (in mutation.tmpl), and - eoBinOp and eoQuadOp (in crossover.tmpl) - -commit 00b435f19a33821496518bb3a2921fe6613166b4 -Author: evomarc -Date: Fri Dec 8 14:16:13 2000 +0000 - - Corrected a few bugs after the first "public" presentation - -commit 0d9e6b2941b96b1cef2540e8725c44e6c988e483 -Author: evomarc -Date: Thu Dec 7 09:56:00 2000 +0000 - - New base class eoUpdatable.h - for objects that need upates in eoCheckPoints - Also contains the class eoDynUpdater. They are eoUpdater, they receive an eoUpdatable - at construct time, and call their upate() method in their operator() method - -commit a4dd409033fe56a19ce28caf9d25bc101e69616f -Author: gustavoromero -Date: Tue Dec 5 13:46:21 2000 +0000 - - small change - -commit 1e3cd432d6ec4e1ba0b3aea8cdfd91b0e60dcc50 -Author: evomarc -Date: Tue Dec 5 05:27:12 2000 +0000 - - Removed trash file - -commit e0076740f809c0b3e4dd0e43874d05487889d465 -Author: evomarc -Date: Tue Dec 5 05:22:55 2000 +0000 - - Added virtual and const keywords all around - as I tried to use a derived - class for adaptive rates (see eoDynProportionalCombinedOp.h, at the moment - in the tutorial) - -commit c22047df11d887bfa302b6b371c0442325fb9e90 -Author: gustavoromero -Date: Mon Dec 4 19:26:19 2000 +0000 - - erasing comments - -commit 8ee0ae0e3a9c9549489d673f104e25f06a71bce9 -Author: gustavoromero -Date: Mon Dec 4 19:10:20 2000 +0000 - - small improvements - -commit e5ff1bf59ce1763c9ca1b39673b004c1257476bf -Author: evomarc -Date: Mon Dec 4 16:49:42 2000 +0000 - - Added normal mutation for reals, and corrected error of segment-> arithmetic - for the crossover operators - -commit c00c15145d531ffdcb6caf2c63539fa5b20afa28 -Author: evomarc -Date: Mon Dec 4 15:01:31 2000 +0000 - - omment of line apply(pop, eval) was found misleading ... - -commit b5382fce748225d03b3bc949254c84e1a478ae73 -Author: evomarc -Date: Mon Dec 4 14:55:18 2000 +0000 - - - added the #define for eo_verbose (true) and eo_no_verbose (false) - - added the eoNormMutation, simple normal mutation for simple real variables - -commit 4944881d7c2c4dadb06b88319e092ecfbc128268 -Author: evomarc -Date: Mon Dec 4 14:53:59 2000 +0000 - - - added the #define for eo_verbose (true) and eo_no_verbose (false) - - added the eoNormMutation, simple normal mutation for simple real variables - Modified Files: - src/eo src/es/eoRealOp.h tutorial/Lesson2/FirstRealEA.cpp - tutorial/Lesson3/SecondBitEA.cpp - -commit 0e62de2d1499c8cca89dd9d6eb7d1bbc78022a69 -Author: evomarc -Date: Mon Dec 4 06:58:43 2000 +0000 - - Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, - a method called lastCall is called for everything contained in that checkpoint - (stats, updaters and monitors). This can be extremely useful - - for stateSavers (see below) - - for monitoring things like rates of success of operators, where what you - are interested in is the final result only. - Added of course a virtual method lastCall that does nothing by default in classes - eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor - Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall - so you can ask that the state is saved at final population, whatever happens. - I also added the corresponding constructor to take this into account. - -commit 5c5142e59cee22c897ff72089d2d6f972c2421d8 -Author: evomarc -Date: Mon Dec 4 05:55:59 2000 +0000 - - Added a comment so Doxygen documents it - -commit f7f226bae9db69558eddfa14da45d32326c9d295 -Author: evomarc -Date: Sat Dec 2 08:35:42 2000 +0000 - - eoStdoutMonitor -> eoFileMonitor to correct an abusive cut-and-paste! - -commit d20d36a116417ced50b7d8d6fb6c0243b38b7a88 -Author: evomarc -Date: Sat Dec 2 08:29:45 2000 +0000 - - Suppressed the warning for the need to create a link - see html files log. - -commit 46d9671e0539f9b7f78ccf35e7680b3cc5f4bc5a -Author: evomarc -Date: Sat Dec 2 08:27:30 2000 +0000 - - Changed the links to the EO doc - removed the need for a (Unix) link from - tutorial/html dir to doc/ dir: it's simpler, and I was not able to do - the same thing in Windows anyway! - -commit 00e21770adb12b6dcb57ce6ceb9b3313a792612e -Author: evomarc -Date: Sat Dec 2 08:21:18 2000 +0000 - - Changed the (abstract) name for fitness from F to FitT so it matches - that of file eoFixedLength.h - it is far clearer in the documentation - diagrams this way. - -commit c829969431aa07b0cb111a96499c997fd002a09b -Author: gustavoromero -Date: Fri Dec 1 19:13:12 2000 +0000 - - initial version of mastermind - -commit 2abab21960ea162d163d71bac3b45590b8e61d8e -Author: gustavoromero -Date: Fri Dec 1 19:09:34 2000 +0000 - - adding a new terminator and a monitor - -commit 41a85aaa7db4e0c5a7e3bc4004a0bac8a614c124 -Author: evomarc -Date: Fri Dec 1 18:26:16 2000 +0000 - - Corrected the outState.regiserObject(parser) ommission (see SecondBitEA.html) - -commit b225f093e6212764c0dcfb8fb614c365220b1f4f -Author: evomarc -Date: Fri Dec 1 18:03:17 2000 +0000 - - I had dropped the parser from the outState - so I had to modify also - read_param to get it back! - -commit c1dd2dd1272de29b513be59617177d64870e60df -Author: evomarc -Date: Fri Dec 1 17:56:52 2000 +0000 - - Used spell-checker!!! - -commit 142c7d779c39943ae426ec61806eec9f0ffae5f8 -Author: gustavoromero -Date: Fri Dec 1 15:46:07 2000 +0000 - - adding a lot of includes - -commit a9468f38c993caa4ca842be83797e9993b4849dc -Author: gustavoromero -Date: Thu Nov 30 17:11:53 2000 +0000 - - small fix for uniform - -commit 9af974070af197674ed97de32628ebdddd810e3c -Author: evomarc -Date: Thu Nov 30 06:38:15 2000 +0000 - - Corrected a small bug (!): the -C=value was not processed correctly - as somebody forgot one character when counting up to ... 3 :-))) - -commit 109fc551ab40f9aff9eb62c4462efdbbe2e30e7a -Author: evomarc -Date: Thu Nov 30 06:20:20 2000 +0000 - - Reversed the priority between command-line and parameter file - -commit 2169a65f80ce059ca22393690f2bc908951c2699 -Author: evomarc -Date: Thu Nov 30 06:11:49 2000 +0000 - - Moved eoCopyElite.h to obsolete dir - was redundant with eoMerge.h - -commit 5c9bec34d671ca9167e6e7db00708493742ac125 -Author: evomarc -Date: Thu Nov 30 06:04:09 2000 +0000 - - Removed eoCopyElite.h, redundant with eoMerge.h - -commit 5b26c61445b2332d0a04d0e27cf6a0a7db8d2576 -Author: evomarc -Date: Thu Nov 30 04:44:32 2000 +0000 - - Added the tutorial SUBDIR - It works fine ... for make clean - But of course it would require some Makefile.am in each subdir of tutorial - and I am not sure I know what to put there... - -commit 15c3588ac756ed02340c4b9b25cb8e1f9976f869 -Author: gustavoromero -Date: Wed Nov 29 18:36:13 2000 +0000 - - sorry, old version was right - -commit b8d4e7faefbaa307155830cbb770f6f9c26aa665 -Author: evomarc -Date: Wed Nov 29 18:19:57 2000 +0000 - - Initial version of the tutorial. - Warning: all Makefile's are hand-made, and will only work in Linux - -commit a27dc53ef04953190471f32aa48ca6fe74a64ea6 -Author: evomarc -Date: Wed Nov 29 18:19:18 2000 +0000 - - dded teh comment about the link to be made from html to ../../doc - -commit ca843a88fca9cc44fbafaff23543939b77632bc6 -Author: evomarc -Date: Wed Nov 29 18:06:09 2000 +0000 - - Initial version of the tutorial. - Warning: the Makefil is hand-made, and only works in Linux - -commit 29b8f1153c0055f8bdc26eac171d0200e35f9ec2 -Author: evomarc -Date: Wed Nov 29 17:20:16 2000 +0000 - - An include file was missing!!! - I've inserted it in teh file actually - but if we go on with gnuplot, - it will need to be taken out again, and used in all other monitors - we will write using gnuplot (e.g. eoGnuplotWithErrorbarsMonitor, - eoGnuplotHistogramMonitor, ...). - -commit a69a19877046fb64a1333f2e011109b3ac19d8d5 -Author: evomarc -Date: Tue Nov 28 17:42:53 2000 +0000 - - Added eoProportionalCombinedOp.h - -commit 52a9c830c860bd40332ecae52e88e62824d991fb -Author: evomarc -Date: Tue Nov 28 17:41:41 2000 +0000 - - I added this very simple instance of operator proportional selector - for the tutorial - it is consistent with all other xxxCombined constructs. - However, I am not sure that Occam's razor will not make it widely used... - -commit 12c6bdf058db11c726fa57605fc93845cba8a617 -Author: evomarc -Date: Tue Nov 28 17:17:19 2000 +0000 - - Added the class eoSGATransform: I break the one file / one class rule - a lot, but both are supposed to be used mainly in the tutorial, not - in real life :-) - -commit f5174e3a4255efe146f8ff3597dc5e6b21e7b13e -Author: evomarc -Date: Tue Nov 28 15:40:39 2000 +0000 - - Added fstream in the include files - I had an error message at some point! - -commit e4b735b17f18e05baa7b3cb34f5380d4be1a1fb4 -Author: evomarc -Date: Tue Nov 28 15:35:09 2000 +0000 - - Added a comment to stdout upon termination - so we know why we stop in case - of multiple criteria - -commit 5aa258fbcb0f455a363f68a5325015ca99aef5aa -Author: evomarc -Date: Tue Nov 28 15:31:38 2000 +0000 - - Minor change of the default label - -commit 65a985631c73caf31e4fdfa48fc410fd56d0fa9c -Author: gustavoromero -Date: Tue Nov 28 13:36:29 2000 +0000 - - now works - -commit afdcdf5d07af53bf05bb7f61ca325deaee60aba6 -Author: evomarc -Date: Tue Nov 28 08:20:01 2000 +0000 - - Added a few comments so Doxygen documents all classes - -commit 622cbea0d53d13990e1274f458d9af59c6edb666 -Author: evomarc -Date: Tue Nov 28 06:58:06 2000 +0000 - - This is the first attempt to use gnuplot through a fork to plot statistics. - At the moment it is only tested for Linux! - Use with care - -commit bee8388a1eafd9a36226bbdd823bf5a49149d557 -Author: evomarc -Date: Tue Nov 28 06:46:37 2000 +0000 - - Modified the contructor: the default value for the delimiter is now " " - and I added a boolean argument to indicate whether or not we want to - overwrite an existing file with same name (default is overwrite). - Added the getFileName accessor. - -commit b39ebbed702ecf7c04a2d0076bc433823002b103 -Author: evomarc -Date: Fri Nov 24 17:45:07 2000 +0000 - - Added eoSteadyGenContinue.h, es/eoReal.h and es/eoRealOp.h - -commit d0e566fdf4da9cef637c17067d308cd733b96ee6 -Author: evomarc -Date: Fri Nov 24 17:44:21 2000 +0000 - - Very simple classes for vectors of (unbounded) real numbers. - A few straightforward operators only (BLX-0, uniform mutation). - Mostly for tutorial reasons - though it might improve in usefull classes later - -commit 2b8c04928384f235736c34cf0beea93cab621885 -Author: gustavoromero -Date: Fri Nov 24 17:43:02 2000 +0000 - - bug fix - -commit 8f9f25522300f72318a15e12081925d4a4430ee1 -Author: evomarc -Date: Fri Nov 24 17:41:39 2000 +0000 - - An eoContinue class that allows a minimum number of generations, - then stops whenever a number of generations happens without fitness - improvement. - -commit 08e6be4b66a4e712aba0c29c4b1d74d75f7a2ba9 -Author: evomarc -Date: Fri Nov 24 17:36:03 2000 +0000 - - Added a verbose mode (the default behavior) which is as before. - But when in non-verbose mode, prints only one line per generation. - -commit 0fd1336bfe949c1df223eff1436833b5418dd4f3 -Author: evomarc -Date: Fri Nov 24 17:30:37 2000 +0000 - - Turned the eoBestFitness into an eoStat (it was an eoSortedStat). - Alos added a few comments so that Doxygen documents all classes there. - -commit 3ec57ed93fe418662434ca81f48f833ebf6d2b9f -Author: evomarc -Date: Fri Nov 24 17:26:22 2000 +0000 - - Changed Maarten's 2-continuator construct into a vector of pointer, - as in all other Combined constructs in EO. - Kept the construtor with 2 eoCOntinue for backward compatibility. - Added of course the add method! - -commit 6a7102f5b620e025f0cb7399c24db5d6b94ac5da -Author: gustavoromero -Date: Fri Nov 24 12:33:44 2000 +0000 - - changing genetic operators - -commit 2b03bd6dae27cbd1e23c9b6ded75df0cada0cd09 -Author: gustavoromero -Date: Fri Nov 24 11:52:49 2000 +0000 - - fix Fitness default construction value - -commit 5ac5a72db20363b3995cd3c6c694ea88d7e764af -Author: gustavoromero -Date: Fri Nov 24 09:51:31 2000 +0000 - - adding new parameters - -commit 9a40169867694f0cc3a20242196a35cd7012bd26 -Author: gustavoromero -Date: Thu Nov 23 19:45:49 2000 +0000 - - reordering Makefile creation - -commit 7b27d430ed03ef6aadfe864043a2d9494562c27c -Author: gustavoromero -Date: Thu Nov 23 19:45:13 2000 +0000 - - adding some files - -commit 70b7f7954564215737dac41729f71637779593f9 -Author: gustavoromero -Date: Thu Nov 23 19:44:47 2000 +0000 - - initial release - -commit 0da6982d68f523fcaf0e99b521fb8e29e88d3e97 -Author: gustavoromero -Date: Thu Nov 23 19:17:24 2000 +0000 - - initial version - -commit 8a5ee316e1755741654d7b91cfbf0b02e1787e54 -Author: gustavoromero -Date: Thu Nov 23 19:15:31 2000 +0000 - - adding Makefile.in - -commit 8527bd83785d0bf9e76a996a5650c778c272f84f -Author: gustavoromero -Date: Thu Nov 23 19:14:09 2000 +0000 - - new application gprop - -commit 265be972ef282138a2290100809b3b40c72960df -Author: evomarc -Date: Fri Nov 17 17:50:08 2000 +0000 - - Made eoBestFitnessStat an eoStat, NOT an eoSortedStat - Cde VS: Committing in . - -commit 683bc2e44febd0a798f472fd9af7f20a33987faf -Author: evomarc -Date: Fri Nov 17 17:06:53 2000 +0000 - - dded the className method for eoMon, eoBin and eoQuad classes - -commit 5682f296cd478b81783be8f58393ff21a5293d38 -Author: gustavoromero -Date: Mon Nov 13 12:12:14 2000 +0000 - - fixing template type - -commit 34be1fd17438f3a900f05126429299943de1c390 -Author: gustavoromero -Date: Mon Nov 13 12:09:53 2000 +0000 - - adding evaluation in some places - -commit a1cd1fd3bf155431f135c079c7213af210e65657 -Author: gustavoromero -Date: Fri Nov 10 09:55:10 2000 +0000 - - fix warning: no newline at end of file - -commit 5af354e45557f93dd662d6c1389205cac6f5162e -Author: gustavoromero -Date: Wed Nov 8 15:15:26 2000 +0000 - - fix no newline at end of file warning - -commit 13169492160880f15d2cd007aba3d9e5a2f98955 -Author: gustavoromero -Date: Wed Nov 8 13:37:41 2000 +0000 - - choose a constructor - -commit 38838f753a0cfab0e8f583e04a0bafb01d9ac231 -Author: gustavoromero -Date: Wed Nov 8 13:26:03 2000 +0000 - - fix no newline at end of file warning - -commit f48fbcf51a17e76138a0eda1944b70251fe724ae -Author: gustavoromero -Date: Wed Nov 8 12:56:14 2000 +0000 - - adding a include for apply.h - -commit 2d5dbf6cfb88dae7d93bf4ab20e5ab478af13a23 -Author: gustavoromero -Date: Wed Nov 8 12:55:26 2000 +0000 - - fix no newline at end of file warning - -commit 9692852c9500a246186b6dd2b8d841961ad8f26e -Author: gustavoromero -Date: Wed Nov 8 12:38:13 2000 +0000 - - bug fix - -commit 558bded5c085ed246c41133fa451b4912e48d6a0 -Author: gustavoromero -Date: Tue Nov 7 19:16:42 2000 +0000 - - adding old targets - -commit 31ed49002bf30759df4b52db2a48806331355323 -Author: gustavoromero -Date: Tue Nov 7 19:13:22 2000 +0000 - - removing a warning - -commit e1d391d1ab112413603ae4d81ab3c655d1c4d597 -Author: gustavoromero -Date: Tue Nov 7 13:02:48 2000 +0000 - - adding targets - -commit 594a8e146f11f99cdfbfac8cea7972d4ade6ffce -Author: gustavoromero -Date: Mon Nov 6 12:38:54 2000 +0000 - - adding subdirectories - -commit 5bb5003a074eccfc0a68c9a7e66c4e96b656ba51 -Author: gustavoromero -Date: Mon Nov 6 12:37:58 2000 +0000 - - adding t-eoSymreg - -commit 9f8ffd7696bece1b760cf12f67b2d87fc981db29 -Author: gustavoromero -Date: Mon Nov 6 11:34:38 2000 +0000 - - adding target doc - -commit 865a0d4672267cd070db491275bd1e04464ec371 -Author: gustavoromero -Date: Mon Nov 6 11:31:10 2000 +0000 - - adding doc target to all - -commit 6fc47590cd54837d40686954fef139a8203a2205 -Author: evomarc -Date: Sun Nov 5 05:33:43 2000 +0000 - - Added constructors with 2 params _min and _max in generators - so you can now generate things in [_min, _max) instead of [0,_max) only - Modified the private data from maxim to {minim, range} accordingly. - -commit 06429540352eadaec1c9e06a2cfcd7668a82ed3f -Author: evomarc -Date: Sun Nov 5 04:50:10 2000 +0000 - - Added a default value (0.5) to method flip - -commit 4a8c1b3947ef03a1bb3b1c95fc4925f493d31275 -Author: gustavoromero -Date: Fri Nov 3 21:23:09 2000 +0000 - - initial version - -commit 6fdb214b71a76ef72c2b8db4f82e50fd92e3c6fd -Author: gustavoromero -Date: Fri Nov 3 20:03:26 2000 +0000 - - fixing autoconfiguration - -commit 01e4aa9cdc1b4d8f9045e1bef1b1a2678f930b58 -Author: evomarc -Date: Mon Oct 30 14:54:29 2000 +0000 - - Added some safety test in roulette_wheel procedures: - if total is zero, used to return iterator -1 - now returns uniform choice - -commit e3e4a0b719beab9e77f30c9497e7ea7a14298450 -Author: evomarc -Date: Mon Oct 30 14:51:57 2000 +0000 - - Fine tuning of printOn: if fitness is invalid, now prints it - -commit 08abf46576d1f99921f46726bda3e236619753fb -Author: maartenkeijzer -Date: Fri Oct 27 09:13:06 2000 +0000 - - Another attempt in adding the flush - -commit 8684e1fac1ff6434421c8215348ec4416f9504ab -Author: maartenkeijzer -Date: Fri Oct 27 09:12:31 2000 +0000 - - updated version info, added flush to stdoutmonitor and sprinkled a few typenames - in eoPop.h and eoGOpSelector.h (egcs 2.96 started complaining). - -commit 5e31ae1338ef8eb3a855b598c4b4b0aa32ed00ce -Author: evomarc -Date: Fri Oct 27 04:38:29 2000 +0000 - - added a second ctor with more didactic ordering of parameters (for tutorial) - -commit 2a0a3e074d826dd5dfcb19aaaa404de2ebbe597c -Author: evomarc -Date: Fri Oct 27 04:07:21 2000 +0000 - - Added the member function append( unsigned _popSize, eoInit& _chromInit ) - who appends _popSize members to the population using an eoInit - -commit 5e33a2e50b1d1d37f01c87626a45165b3b0769c7 -Author: evomarc -Date: Tue Oct 24 03:58:02 2000 +0000 - - dded Uniform Crossover (!) and "deterministic" bit-filp mutation - -commit 9cc1cfd1b492d84c25b63f9546d2e63da30d6c57 -Author: evomarc -Date: Tue Oct 24 03:57:10 2000 +0000 - - Added the calls to base class I/O routines in printOn and readFrom - -commit b0b0a3f9dad61acf5ec7f3d6bbd5e01e8182a294 -Author: maartenkeijzer -Date: Mon Oct 23 10:58:54 2000 +0000 - - It is using delim now - -commit f7c98d5b31e8f017cb26cc9086e9465ac98811b3 -Author: maartenkeijzer -Date: Mon Oct 9 16:13:20 2000 +0000 - - Changed functor base names and added to version - -commit 1d0794c46a0fe12684577d7d5f3a07a9da697974 -Author: maartenkeijzer -Date: Fri Oct 6 10:41:38 2000 +0000 - - Added an eoSortedStatBase for more efficient statistic calculations - - updated a few makefiles to include the html and latex docs with the - distribution. - -commit d42f16481d9c9fa74318001d41b3021e4b9f6779 -Author: maartenkeijzer -Date: Fri Oct 6 07:50:10 2000 +0000 - - Updated authors and started a README - -commit 543d5a5918ed4afeca03e0e50e03c6d16ebeeb85 -Author: maartenkeijzer -Date: Fri Oct 6 07:32:26 2000 +0000 - - Changed ostream_iterator to use AtomType rather than double. - Stupid me! - -commit 686e7f32730e1f8f3a4b2c2a10fb68072df52612 -Author: mac -Date: Fri Sep 29 10:39:19 2000 +0000 - - Updated version no. to 0.9.1 - -commit f1ec21e7244c2c8473452a68e8a3798621dfe3a1 -Author: mac -Date: Wed Sep 20 13:32:28 2000 +0000 - - Error in random_generator removed. - -commit f7c157c1549dc18536e9906d6c00d6f701cdb652 -Author: mac -Date: Sat Sep 9 13:52:16 2000 +0000 - - Changed construction order as gcc was warning - -commit fd8a2529a50b3f167347e559891fea7e327b5b15 -Author: mac -Date: Sat Sep 9 13:43:31 2000 +0000 - - eo: added some missing entries - Pop: error in nth_element_fitness - sga: error in eval - eoParseTree: oddities with gcc - checkpointing: added eoParser and eoState - eoParser: support for wrongly entered parameter names - rnd_generators: flip(0.5) -> flip(bias) in binary_generator - selectors.h: ??? - -commit fc172ef858b3b064747c2e8cff97211967524fb5 -Author: mac -Date: Wed Aug 23 14:56:04 2000 +0000 - - Added -O2 as compiler flag - -commit ca46a3651b08b8dc7b0ae010ed45d7445a8e8321 -Author: mac -Date: Wed Aug 23 13:07:51 2000 +0000 - - ok, fixed this problem with typedefs in gcc-0.92 (strange....) - -commit 40783947488490ae410b6b778cc43d34076ab8ea -Author: mac -Date: Wed Aug 23 12:52:48 2000 +0000 - - Yet another change in eoParseTree - -commit e18a48d4a141db4ca26bffc165fa8a062176f47a -Author: mac -Date: Wed Aug 23 12:50:34 2000 +0000 - - eoParseTree-- changed typedef - -commit ff108477c35aa4b83b3be14687c0ba512214b47b -Author: mac -Date: Wed Aug 23 12:03:01 2000 +0000 - - eoCounter? - eoEasyEA -- made it copyable again - eoEvalFunc -- added specialized eoEvalFuncCounter - eoEvolutionStrategy -- nothing much - eoGenContinue -- nothing - eoPop -- fixed nth_element_fitness - eoBitOp -- fixed error in xover - eoFileMonitor -- now appends always - eoParam -- worked around memory leak in MSC's strstream - eoParser -- changed -pconfig_file to @config_file - eoParser -- added messages instead of exception when required param is missing - eoStat -- added eoDistanceStat - t-eoFunctor -- don't know - -commit a7131a7f719419b1305567ee9cbd1c693a363214 -Author: mac -Date: Fri Aug 18 08:59:20 2000 +0000 - - commited - -commit be0c1996f773860df58f21c0e3111be6ba0f74ac -Author: mac -Date: Fri Aug 18 08:57:26 2000 +0000 - - Oh, right, dangling pragma - -commit 8034b9f344ea48e945fa130e625d7954e2dfdb80 -Author: mac -Date: Fri Aug 18 08:56:14 2000 +0000 - - some signed/unsigned comparisons removed - -commit 8ae796ab282011c459f5698f8dec56c7a1fad326 -Author: mac -Date: Fri Aug 18 08:44:22 2000 +0000 - - Added symbolic regression, which tests combined ops as well - -commit 04bc4ecde8960debfd16034ddf88e4b4ce4b5e88 -Author: root -Date: Tue Aug 15 21:15:36 2000 +0000 - - initial checkin - -commit 4f1bcfa292d8664d647d7dff3befc42526fff118 -Author: mac -Date: Mon Aug 14 11:18:34 2000 +0000 - - Removed a few dsp files and changed saving/loading eoPops a bit. - -commit 33803be4cddd897f930728cc41ee7c8cb2c017ab -Author: mac -Date: Thu Aug 10 16:43:39 2000 +0000 - - changed int to size_t - -commit adcb2c38b83b3c57603e05afc51f61fd39789413 -Author: mac -Date: Thu Aug 10 16:42:37 2000 +0000 - - *** empty log message *** - -commit a4009dee15c84cc3f5108f8148a51bbf2a4e8642 -Author: mac -Date: Thu Aug 10 16:41:04 2000 +0000 - - Added binary_value.h - -commit d3b83c70b004018fb6a8ddeab8b6ce3c38aceccd -Author: mac -Date: Thu Aug 10 16:36:55 2000 +0000 - - changed int compare to size_t - -commit 107c4568a07e628e2122c083c2e81ebaff73b8da -Author: mac -Date: Thu Aug 10 16:35:15 2000 +0000 - - changed int compare to size_t - -commit 173756916a50874ad03f565ede456591f75bd2c1 -Author: mac -Date: Thu Aug 10 16:34:05 2000 +0000 - - main should return int - -commit 8b63d5e58d591f53a1cf4f963b29dc88643ca5a2 -Author: mac -Date: Thu Aug 10 16:32:44 2000 +0000 - - changed int to size_t - -commit fc326c72ab1e01a89dac151dfe6740f75aba413a -Author: mac -Date: Thu Aug 10 14:33:37 2000 +0000 - - Forgot to remove enum value init - -commit 13df8199376ee0c38ee86c748044252c9d32c57b -Author: mac -Date: Thu Aug 10 14:31:19 2000 +0000 - - Still part of extreme cleanup - -commit 73461e2d761955cd29730d87c55bbde90f81aa04 -Author: mac -Date: Thu Aug 10 14:30:25 2000 +0000 - - Still part of extreme cleanup - -commit 664c1f12d917416a78395cf40f2181b651e84e96 -Author: mac -Date: Thu Aug 10 14:26:50 2000 +0000 - - Still part of extreme cleanup - -commit 410bc184881b247dffcfbc2460fad6ae57539d82 -Author: mac -Date: Thu Aug 10 14:25:45 2000 +0000 - - Still part of extreme cleanup - -commit 511d874b683a3d63f76268b8bcd0705fb49ea214 -Author: mac -Date: Thu Aug 10 14:23:19 2000 +0000 - - no - -commit 6d8e3a65043d7cf56a699c5a64d63c5ea4659ef1 -Author: mac -Date: Thu Aug 10 14:18:34 2000 +0000 - - Extreme cleanup, see src/obsolete for details - -commit 7f04d616e6e218b93340994e60fd1364209e0d8f -Author: mac -Date: Thu Aug 3 20:00:39 2000 +0000 - - Temporarily added Makefile.am to prevent errors - -commit 8dea30897d7732ddc95b2fa59f34bb73f21c62b4 -Author: mac -Date: Thu Aug 3 19:54:42 2000 +0000 - - Removed contrib dir reference - -commit d2fedcb5b99b3d958c1a7164a7fd44834dc669bf -Author: jmerelo -Date: Thu Aug 3 17:33:03 2000 +0000 - - More changes to Makefile.am - -commit 1bee1e1f81eb7a359a10476ae03daed768e643e3 -Author: jmerelo -Date: Thu Aug 3 17:30:57 2000 +0000 - - More changes to Makefile.am - -commit afd636cdbfa762c6fb4f855f18fd920f1894152d -Author: jmerelo -Date: Thu Aug 3 17:22:46 2000 +0000 - - More changes to Makefile.am - -commit a758eb1bd2e5325ee4e9c6ced3773e6b52e17fa2 -Author: jmerelo -Date: Thu Aug 3 17:15:42 2000 +0000 - - Changes mostly to Makefile.ams here and there, to be able to do a clean distribution - -commit a7e0b39cfd58f4142fdc6e028d05d464f1d42132 -Author: mac -Date: Thu Aug 3 17:11:54 2000 +0000 - - New fresh ltconfig, works on my RedHat distr and also on geneura - -commit bef10d6f9ad8ef3b8bf769ff62dbcf1782447605 -Author: mac -Date: Thu Aug 3 17:11:02 2000 +0000 - - Added a different libtool configure so it runs on more machines - -commit 8036c7fd7dfe68e9e54f5a03807854f05af62f56 -Author: jmerelo -Date: Thu Aug 3 16:37:51 2000 +0000 - - Changed some problems with Makefile.am - -commit cb952a2b7db52891e12d5a482f26e3e0d3ba7ed0 -Author: jmerelo -Date: Thu Aug 3 15:44:01 2000 +0000 - - Added missing files, and LICENSE - -commit 70ddb00b4cf2153e3aece52b1f28ed524dfe885f -Author: mac -Date: Fri Jul 28 10:26:44 2000 +0000 - - removed - -commit ee5bdda9321fd89a781edc82db6e6f3c3d47e761 -Author: mac -Date: Fri Jul 28 06:10:34 2000 +0000 - - testing if this configure is protable - -commit aa0b74ac9da2c210b613287f593f0a5a4121cb5c -Author: gustavo -Date: Tue Jul 18 11:33:56 2000 +0000 - - ignore files created by examples - -commit 01e44cf82876872de37e56750fab1580230fa1bd -Author: gustavo -Date: Tue Jul 18 11:30:39 2000 +0000 - - fix examples using binary_value - -commit b03bd951e0c65d3b2434edc205a658f24ea58747 -Author: marc -Date: Thu Jun 22 03:23:15 2000 +0000 - - The initial individuals were evaluated directly using binary_value - This resulted in the fitness NOT being set, and some abort or segmentation fault later - Only eoEvalFunc shouydl be used to evaluate individuals!!! - -commit ff52d48ccd9cc4ff8d9bffabf7bc11612a32bd67 -Author: gustavo -Date: Fri Jun 16 10:20:23 2000 +0000 - - changing version number - -commit cc7148d622d71278dda3b4240bb284990ab5fadc -Author: gustavo -Date: Fri Jun 16 09:38:43 2000 +0000 - - erasing LICENSE from test directory - -commit 34758a584dfa8d8383ef23a95a7ef231bff5199d -Author: gustavo -Date: Thu Jun 15 14:29:25 2000 +0000 - - *** empty log message *** - -commit 3bc1cb49d83516c4d351d520f5268b1bf827c25b -Author: gustavo -Date: Wed Jun 14 16:29:00 2000 +0000 - - erasing warnings - -commit 318697af40f4a49021b5400b625a54ef77c75990 -Author: mac -Date: Wed Jun 14 10:33:53 2000 +0000 - - Yet again some documentation change - -commit ff057c799abcfd2d55643f41f0b81f9884c1f52b -Author: mac -Date: Wed Jun 14 07:30:21 2000 +0000 - - Removed double reference to t-eoESFull - -commit 0533618306fefd376745ee13de97891c168d4578 -Author: mac -Date: Wed Jun 14 07:27:51 2000 +0000 - - Removed double reference to t-eoESFull - -commit 570397e89e48aee3d95e3027908a40279052b302 -Author: mac -Date: Tue Jun 13 14:31:53 2000 +0000 - - Added ownership functionality and made the thing non-copyable - -commit 49ee190e108a1258d39eceff741696b357e17b95 -Author: mac -Date: Tue Jun 13 14:31:22 2000 +0000 - - Some 'improvements' added - -commit 00780d785a3013774d9c8d97d5c9a92d871db52e -Author: mac -Date: Tue Jun 13 14:30:47 2000 +0000 - - Added an ownership function to eoState - -commit b5222c8aa5ea233b55b63643ee9ce84b1e583745 -Author: mac -Date: Tue Jun 13 10:27:10 2000 +0000 - - Changed base class eoEsBase to eoFixedLength - -commit 0219de5b614abc449f6c6c3e1438291697bf4eda -Author: mac -Date: Tue Jun 13 10:25:53 2000 +0000 - - updated documentation - -commit df56ae514560e1fbb9bec997e48d9481d7aa4467 -Author: mac -Date: Tue Jun 13 09:48:24 2000 +0000 - - Fixed typedef Type error - -commit 152d42d41ec56013d7e07cc5c18d5f7eff0f96bd -Author: mac -Date: Tue Jun 13 09:43:34 2000 +0000 - - Removed eoEsBase and created an eoFixedLength - -commit 71b0dc17716a39350ee6bb3777dea7ebce3293f7 -Author: mac -Date: Mon Jun 12 20:24:27 2000 +0000 - - Oh, right found some errors using gcc - -commit e55e3813dc442a1978170da3e9b9a39b0f0756e9 -Author: mac -Date: Mon Jun 12 20:23:20 2000 +0000 - - Oh, right found some errors - -commit 4c4ce70c0468f6fb0c490d2e15f2ff9b5fa62f9b -Author: mac -Date: Mon Jun 12 20:09:59 2000 +0000 - - New ES routines - -commit c6589b59518855a6e6843be9b235b894dd98171b -Author: mac -Date: Mon Jun 12 20:08:01 2000 +0000 - - Added a range member function to evaluate an iterator range - -commit 382557878aeccfca47221714b7ea94678c7d04a4 -Author: mac -Date: Mon Jun 12 20:07:25 2000 +0000 - - eoInit is a base class for making EO's, eoPop now has a constructor - for eoInit's - -commit c1b0a6c5034eb4cc194f114a8f8ef4c1269fcb9d -Author: mac -Date: Sat Jun 10 13:22:53 2000 +0000 - - Removed dependence on eoUniform, changed it to use rng.random or rng.uniform directly - -commit f39f1599244479063cb1483193a82e9868568b32 -Author: gustavo -Date: Fri May 26 17:18:06 2000 +0000 - - ignore t-eoExternalEO - -commit 6893a8565d621c9e50a19a60e296d3d2aa5b0615 -Author: mac -Date: Thu May 25 13:04:57 2000 +0000 - - Removed this ugly defaulting to 1 behaviour and solved it using template specialization - -commit 207698fcc878832647ad168cb9d829985a3175e0 -Author: mac -Date: Thu May 25 12:21:06 2000 +0000 - - Added dummy case general: - -commit 0363af1289e67e7f1aeaf5a3f6d052e5624fa999 -Author: gustavo -Date: Thu May 25 11:03:00 2000 +0000 - - warning hunting - -commit 9aaafc2cdb418d512c386f6ec3f5662dfcfa8c82 -Author: mac -Date: Thu May 25 07:26:13 2000 +0000 - - Oops, corrected error in ctor(istream) - -commit 69d9ee7a0f013a6458db7a6fcd89d91b412cc768 -Author: mac -Date: Thu May 25 07:23:24 2000 +0000 - - Oops, corrected error in adding t-eoExternalEO - -commit 86ae1ddbaacab65e673e1e883abb1268e2cbe45b -Author: mac -Date: Thu May 25 07:18:25 2000 +0000 - - eoExternalEO, support for using plain functions and structs in EO - -commit 9ad8767c418340987ebc343fd9b7278bf988f108 -Author: mac -Date: Thu May 25 07:17:23 2000 +0000 - - Changed default printOn to have a trailing space instead of endl - -commit e7a1922d76672a5542028cc5cd29f18ab8d685d7 -Author: mac -Date: Thu May 25 07:16:35 2000 +0000 - - Updated dsp, dsw and added t_eoExternalEO.dsp - -commit 05c4bec808fef3450eb2acce26b4d45356c716c0 -Author: mac -Date: Thu May 25 07:13:43 2000 +0000 - - Updated makefile and added t-eoExternalEO - -commit 230e1a03d1e35eda5bd0f025e1415583b4d765ea -Author: mac -Date: Thu Apr 20 11:11:58 2000 +0000 - - removed reference to rint() (what does this function do anyway? it is not ANSI and defined nowhere in eo!) - -commit 007046c134cc67322302c89a526090437d4d94de -Author: mac -Date: Thu Apr 20 11:06:02 2000 +0000 - - Added a bias function next to bind(). This function will bias the selection to select certain specific guys... - -commit 2af4074c2c7dd266f85e384502e7f11db5956ce7 -Author: mac -Date: Thu Apr 20 10:48:07 2000 +0000 - - Remove eoBinaryTerm, should not have been here in the first place - -commit 7ac73895896e9506f6cb323806aabdd880b6d7d6 -Author: gustavo -Date: Wed Apr 12 09:51:50 2000 +0000 - - adding test to test/.cvsignore - -commit e5825c4d756779604c5efc73e694aceaeefe4368 -Author: gustavo -Date: Tue Apr 11 12:18:30 2000 +0000 - - some fix - -commit 1992d60fa3e351c8cb401893833ac045699d8c45 -Author: mac -Date: Sun Apr 9 10:16:28 2000 +0000 - - getOp() should return a non-const reference - -commit 064ebabac52822ef802a9632922e130ec2c2f90a -Author: mac -Date: Sun Apr 9 10:13:27 2000 +0000 - - Changed int target to size_t target (produced warning) - -commit dd42eec50a06744f9f54a09976794efa0f0f3a05 -Author: mac -Date: Sun Apr 9 10:10:39 2000 +0000 - - eoFitTerm did not implement className - -commit f6c08c994885c34c063e498c97b849b2db7b5f0a -Author: mac -Date: Sun Apr 9 10:09:32 2000 +0000 - - eoFitTerm did not implement className - -commit 6d61aa2811d54016722c90af245eff27ccdc6217 -Author: mac -Date: Sun Apr 9 10:05:55 2000 +0000 - - Updated eoBreeder to use the even newer general operator interface - -commit 697d38b37292c3368639e21b1b93911bbb7e61bb -Author: mac -Date: Sun Apr 9 10:00:55 2000 +0000 - - Updated eoBreeder to use the even newer general operator interface - -commit 7973019d0b673238382d4adbcfe937353384fb64 -Author: mac -Date: Sun Apr 9 09:59:06 2000 +0000 - - Specialized it for bool, so that we don't get these MSVC warnings. - -commit 4654d42e30c5b167ed8578e52ce9c7245f00c4b0 -Author: mac -Date: Sun Apr 9 09:54:25 2000 +0000 - - Oops, it's a pain to get the makefiles up to date when you are working on two machines.... - -commit bd0cc50be9081f227c253b0038abd5f73e7dbf07 -Author: mac -Date: Sun Apr 9 09:50:44 2000 +0000 - - Oops, forgot to make operator() return an eoMonitor - -commit 481bfba8bf4cfe8de52fd30be98bd912ef895b27 -Author: mac -Date: Sun Apr 9 09:48:38 2000 +0000 - - Oops, forgot to make operator() return an eoMonitor - -commit f357a908bfd8de6308317eac4a814ac1af9fb10b -Author: mac -Date: Sun Apr 9 09:46:20 2000 +0000 - - Updated documentation to give proper include file in doxygen and define a module selectors - Also added a load(stream) and save(stream) to eoState - -commit 6e925bedea58bd03e63eb871a22ba56a6dc53924 -Author: mac -Date: Sun Apr 9 09:44:53 2000 +0000 - - Updated documentation to give proper include file in doxygen and define a module bitstring - -commit fee9a330b11926d09fdc18acc377e000dc27ffb7 -Author: mac -Date: Sun Apr 9 09:43:40 2000 +0000 - - Added t-eoGOpSel. - -commit ed4537545107701d2f21aff5e80179ac0e6d088c -Author: mac -Date: Sun Apr 9 09:41:29 2000 +0000 - - Changed the general operator interface to be consistent with the rest - of EO, updated some documentation. - -commit 64a5d2de5838095403f635a1a5cfd086444b94b7 -Author: mac -Date: Fri Apr 7 14:23:59 2000 +0000 - - updated Makefiles and removed a few unneeded files. note: ES files are pending - -commit 87cdfa00c4c6e50658954d166ac53db5a746a3d3 -Author: mac -Date: Fri Apr 7 09:04:50 2000 +0000 - - no message - -commit e35a59cdd610f01134533f7dd09383bc2366471e -Author: gustavo -Date: Tue Apr 4 15:22:04 2000 +0000 - - changing include style from ... to <...> - -commit b40fefb6ed177c63d597dcc31c1e239cdb82621c -Author: gustavo -Date: Tue Apr 4 11:00:18 2000 +0000 - - initial .cvsignore - -commit 64cb3f19e176563a06d7b43227229c66fa3000ef -Author: gustavo -Date: Mon Apr 3 15:52:31 2000 +0000 - - changing autonconfiguration to compile more examples and to create documentation - -commit 06dab1f9146f638867b4373a0e41b4246546292a -Author: gustavo -Date: Mon Apr 3 15:27:56 2000 +0000 - - forgeting multiOps - -commit bf3370461005dc8badc22b8d728815b9a7fb8737 -Author: gustavo -Date: Mon Apr 3 09:51:29 2000 +0000 - - too many EMPTY constructors - -commit 902d88fef66423c6dd0b75263129d593668f2293 -Author: gustavo -Date: Mon Apr 3 09:32:43 2000 +0000 - - adding & modifying .cvsignore's - -commit b5606ad11aa0c1559a8c098a36c49533a68a174e -Author: gustavo -Date: Fri Mar 31 16:23:16 2000 +0000 - - Maarten was right - -commit e6e9dbeaf43ceb9005495f1b26a6762d01d789aa -Author: gustavo -Date: Fri Mar 31 14:34:50 2000 +0000 - - Makefile.in don't need to be in cvs - -commit f07b16a5750612cf0f538966d5479c942a67579a -Author: gustavo -Date: Fri Mar 31 14:33:13 2000 +0000 - - more fix in makefiles - -commit 1fb9e6ceb7110833508088e9d8e16b76294358bf -Author: mac -Date: Fri Mar 31 10:14:15 2000 +0000 - - Added checkpointing to the makefile, but have to test it later on a Linux box - -commit 9823af7c093c63d70464e9d0ad41049e7910df74 -Author: mac -Date: Fri Mar 31 10:04:39 2000 +0000 - - Finalized Checkpointing, renamed t-testSta.... to t-eoStateAndParser - added a checkpoint tester, but did not yet update the Makefiles as - I don't have automake on my machine - -commit 9bcf9d95f89f3389a5b4dfb8674e38463c143a8d -Author: mac -Date: Fri Mar 31 10:02:18 2000 +0000 - - Finalized Checkpointing, see t-eoCheckpointing for a test - -commit 6d5d34ba1f12dc69a33d69c730e354eab0b973ea -Author: mac -Date: Fri Mar 31 10:00:22 2000 +0000 - - Added a className member - -commit c7eccdbe13ca7d0f41e0184be2780d05f5b93e28 -Author: gustavo -Date: Thu Mar 30 18:15:14 2000 +0000 - - adding const... leaving as is - -commit 28219fcc1216dab2cc2e75f855ce7a82a055ebf1 -Author: gustavo -Date: Thu Mar 30 18:02:03 2000 +0000 - - makefiles almost work - -commit 5fe751080749f42d251ef64e777a709bad20d502 -Author: gustavo -Date: Thu Mar 30 17:11:20 2000 +0000 - - fixing makefiles - -commit 1fe3a72e10223b1dff3861f30528caa6cfcea02f -Author: gustavo -Date: Thu Mar 30 14:20:25 2000 +0000 - - changing Makefile.am's to accept new subdiretory structure - -commit 5467df160c0d84900e87dc72a1cb5d9e77ed0413 -Author: mac -Date: Thu Mar 30 09:43:21 2000 +0000 - - changed erronuous classname() to className() - -commit a2457cf12615b21cee60d8c468aeb94d9c52d82c -Author: mac -Date: Thu Mar 23 14:41:12 2000 +0000 - - few minor mods - -commit f290f94301726aa3aab45c3b99aa051030cf8114 -Author: mac -Date: Wed Mar 22 18:55:12 2000 +0000 - - Adapted it for the poor stdc++ support of g++ - -commit 737779f235dc8cdb32b5ffef94f8b55ecd87465b -Author: mac -Date: Wed Mar 22 17:10:07 2000 +0000 - - no message - -commit b6c506643aec0f23046a377e0b993aaeb227bb53 -Author: mac -Date: Wed Mar 22 17:09:36 2000 +0000 - - Changed some includes for the new dir structure - -commit 6c79787c43447002f807259ed58f33cf95e31f1b -Author: mac -Date: Wed Mar 22 16:49:35 2000 +0000 - - Changed some includes for the new dir structure - -commit 340edc2420a222662c9f9bda7c5608483135c579 -Author: mac -Date: Wed Mar 22 16:47:27 2000 +0000 - - test the state and the parser - -commit 7fe8f333e783d59b9efef14a3bd7a0e6e834d6ad -Author: mac -Date: Wed Mar 22 15:39:32 2000 +0000 - - Changed readFrom, which is no longer line based - -commit 7303d62c1a0f1b348315d177da5ab9a826b14964 -Author: mac -Date: Wed Mar 22 15:38:16 2000 +0000 - - Obsolete, now present in eoOp.h - -commit 0b0c3f2fc0fb0f4a09ebebfb936269522a150d5b -Author: mac -Date: Wed Mar 22 15:14:16 2000 +0000 - - Changed a few params in the configuration file - -commit 0b35985e6d182ab18dcdee02b66581a4b593167d -Author: mac -Date: Wed Mar 22 15:00:38 2000 +0000 - - (re)moving... - -commit a5a4d65ab869242e97faae526c9765a5679114af -Author: mac -Date: Wed Mar 22 14:48:49 2000 +0000 - - (re)moving... - -commit c4f6d9272f8cfa0f8bc1bc4e49ce89db57a39482 -Author: mac -Date: Wed Mar 22 14:38:10 2000 +0000 - - Configuration file for doxygen - -commit 2e6d406d8e4d89f55df68b52feef7e68615df972 -Author: mac -Date: Wed Mar 22 14:32:37 2000 +0000 - - (re)moving... - -commit 2620c402bc51338b92767935624ffe2cbe586260 -Author: mac -Date: Wed Mar 22 14:30:57 2000 +0000 - - no message - -commit 2799347236f408e88d0547b766fc6f1cf39533ef -Author: mac -Date: Wed Mar 22 14:23:20 2000 +0000 - - moving... - -commit 5ecddc312c50bb9f5d08ddc5d1c7d0980e15d923 -Author: mac -Date: Wed Mar 22 14:21:02 2000 +0000 - - moved old files here - -commit ddb4bfb00b295547b4e1a487ff8bfc77f77a3b91 -Author: mac -Date: Wed Mar 22 14:18:39 2000 +0000 - - Moved the es files to an es directory - -commit 648c4ab6ec2fbdaae42e92a96dbc43246c20c7a9 -Author: mac -Date: Wed Mar 22 14:12:08 2000 +0000 - - no message - -commit 81751e279f600de6528679ff24930d10e7998a4c -Author: mac -Date: Wed Mar 22 14:04:03 2000 +0000 - - Added utilities directory, this contains state, parser etc. - -commit 2e35c416ce7e0ba5c515eb6b71c18878fd3a65bc -Author: mac -Date: Wed Mar 22 13:58:29 2000 +0000 - - Removed obsolete references - -commit 32541d5fe7ad3688d68be89eb97b0e2ea77bfe17 -Author: mac -Date: Wed Mar 22 13:57:57 2000 +0000 - - moved to utils - -commit f7547d6f8b2fd21e8ea5eafb1663d1c6f03ea618 -Author: mac -Date: Mon Mar 20 17:35:24 2000 +0000 - - eoSelfEval was empty - -commit d55c0a5456a9ef5b0682dd3474ade16948f5e5a9 -Author: mac -Date: Mon Mar 20 17:32:42 2000 +0000 - - Just changed a typo in the documentation - -commit 4a6202ff132e5792268f085ad7791db1db11dbd1 -Author: mac -Date: Mon Mar 20 16:13:32 2000 +0000 - - Removed some obsolete files, changed min and max in compatibility, commented the parser out of eoESFullMut and added some default initialization (please check this Marc). Why eoParser has changed is beyond me, but I am too late to uncommit. I will update a real parser very soon now. - -commit b111bf01aa7e0ddd6c496c243d82b53def8aee68 -Author: marc -Date: Mon Mar 13 10:17:12 2000 +0000 - - Put eoTerm into the eo hierarchy - it was in the air! - Added the className method - -commit 83ca890c10b427736d801e67e934332a8dbd659b -Author: marc -Date: Mon Mar 13 10:14:20 2000 +0000 - - Changed some int into unsigned to avoid Gnu warnings - -commit b4e61489c787d0730cd2efff2a1a6f188c85afc5 -Author: marc -Date: Mon Mar 13 10:10:00 2000 +0000 - - Removed extra {} in operator() - -commit f430468921edbcf49e5779e6d5af14c0dd294c8f -Author: mac -Date: Mon Mar 6 16:28:37 2000 +0000 - - Removed the call to the istream ctor, replaced it with readFrom - -commit 60857fcf3bf5691b16c04a69e4e84d1a37b1a60f -Author: mac -Date: Mon Mar 6 16:21:54 2000 +0000 - - Removed the call to the istream ctor, replaced it with readFrom - -commit 0b449f9817a1361c4709234640341a6dcfd9f4b7 -Author: mac -Date: Mon Mar 6 16:09:46 2000 +0000 - - Removed the istream ctor - -commit 64693768805169ab16e6fa179820bb116b541346 -Author: mac -Date: Mon Mar 6 16:05:47 2000 +0000 - - Fixed bug in eoGOpSelector (missing break!) - - eoOp.h: binOp's second arg is const once more - - all dsp and dsw files were touched by msvc, but did add some stuff (which - will be added to eo later) - - Hope this all works - -commit ca4e470092918f03cf16b4065c66ba9d68b96dd1 -Author: mac -Date: Mon Mar 6 15:55:44 2000 +0000 - - Upgraded parse_tree a bit... - -commit f1fd1f8e33c0df501840bd46f48ec77c8e4409fc -Author: marc -Date: Thu Mar 2 05:54:01 2000 +0000 - - Removed extra () in method virtual const EOT& operator()(const eoPop& pop) - Changed the include of eoPop.h from <> to "" - -commit 4b38c62c95b29c2d539213ad6740147ef0080e9b -Author: marc -Date: Thu Mar 2 05:48:23 2000 +0000 - - Something went wrong with past commit's. So, again - - added the virtual destructors of all classes, - to suppress g++ annoying warnings when using -Wall option - -commit 9c75e1c408c054aedc4e5293d2e3fb844a48f62a -Author: marc -Date: Tue Feb 29 05:22:32 2000 +0000 - - Modified the order of base type and private data initializations - so the g++ does not complain when using the -Wall compile option - -commit 9a4946c75c500804b9191135cee0a253028d2341 -Author: marc -Date: Tue Feb 29 05:14:40 2000 +0000 - - Warning: this comment refers to the previous commit of eoException: - The command "cvs commit" does not seem to allow to enter comments ??? - wherease the command "cvs ci" is OK. - - Here we go: - - added the virtual destructors of all classes, - to suppress g++ annoying warnings when using -Wall option - -commit b109ef46b2ea7465a6b6fc79926335e8f4353597 -Author: victor -Date: Mon Feb 21 18:21:58 2000 +0000 - - *** empty log message *** - -commit 93fcc4c04817cf5d43d890b0be8d0abf5f470172 -Author: victor -Date: Mon Feb 21 18:21:14 2000 +0000 - - A: has been fixed, ONCE MORE :-( - -commit 4777d091288959add913f3da14c6167b44ce0637 -Author: victor -Date: Mon Feb 21 18:03:31 2000 +0000 - - making the second parameter of the oprator() for binaria operators to be NON const - -commit 0d439f9f56aab9c704defb416de524354b750e1a -Author: mac -Date: Sat Feb 19 18:21:47 2000 +0000 - - Changed double linefeeds, will undo this if it doesn't work - -commit 6569496f6e92d63fe92aa8df80c7ba18909d57b7 -Author: mac -Date: Sat Feb 19 17:37:18 2000 +0000 - - Removed double line feeds - -commit 131b6a85fbff2757be7b3ad8f2af82ddbda35108 -Author: mac -Date: Sat Feb 19 16:54:09 2000 +0000 - - Hi, just a simple test, I'm sorry to do it with the real repository, - but my machine here is not Unix - -commit c3fd4eb3ee1d9322d70247afbddc84c984b5554b -Author: mac -Date: Sat Feb 19 16:32:12 2000 +0000 - - eoScalarFitness, 'envelope class' for making minimizing/maximizing fitness - -commit 589df91b4e182f15caa24214ab6fef6ae3a7e4c8 -Author: mac -Date: Sat Feb 19 16:31:01 2000 +0000 - - Example file - -commit 2443677f13edf1c59f5bafc82ded943a2dd0353e -Author: mac -Date: Sat Feb 19 16:30:42 2000 +0000 - - Moved the static eoRNG rng to an extern eoRNG - This external object is now defined in eoPersistent.cpp - - This should change... - -commit c48c1f2c1249fadb777f8043cda9ac18c84ad96c -Author: mac -Date: Sat Feb 19 16:27:38 2000 +0000 - - Added gp, example file in t-eoSymreg.cpp - -commit 88c32ee09b56ce0dd5b75ed1520b394df0c334da -Author: victor -Date: Sat Feb 19 13:14:36 2000 +0000 - - Someone was using eoAltProportionalSelect.h only he/she knows whycd src - -commit 66465c5a0927ee1a14dc45a342212e1e6fb04c02 -Author: victor -Date: Sat Feb 19 12:50:48 2000 +0000 - - A: has been fixed , ONCE MORE :-( - -commit 5b5b71b148632253445cba6ebd280b497204c423 -Author: victor -Date: Sat Feb 19 12:37:28 2000 +0000 - - Changing (ONCE MORE) eoEasyEA.h to allow 0 generation processes. - -commit 25f9229b98b82f96cb26c3e25771af16fce2f265 -Author: mac -Date: Wed Feb 16 15:17:43 2000 +0000 - - *** empty log message *** - -commit 4ebd212d143d4d48d92b77199bcbcff9f05c8045 -Author: mac -Date: Wed Feb 16 15:11:18 2000 +0000 - - *** empty log message *** - -commit 9fba2bfbb9a15dbe86a89b3637ea95d13b9e2ee7 -Author: mac -Date: Wed Feb 16 15:05:19 2000 +0000 - - Mak: Added the eoQuadratic Op and more ... (and I hate VI) - -commit 4ac185022674c439d7171f7bb8d71aa5825327ad -Author: mac -Date: Wed Feb 16 15:03:45 2000 +0000 - - *** empty log message *** - -commit cbc26ed5b26519192c0708d985db22c2bc5fac79 -Author: marc -Date: Wed Feb 16 04:40:20 2000 +0000 - - Changed all "float" to "double" - But more than that, this is a test of CVS for me - Marc - -commit 871fcc8184ea36547a47f76a29e8b449a630f156 -Author: mac -Date: Tue Feb 15 15:08:00 2000 +0000 - - just a test - -commit 4f40da85e4d422ebcc503296c660981a891c556a -Author: victor -Date: Fri Feb 11 12:05:07 2000 +0000 - - A: has been fixed :-)) - -commit 801ba49682c675f46b91d7dc402fddacdf56922b -Author: gustavo -Date: Wed Feb 9 19:50:02 2000 +0000 - - some test - -commit 7db1492943fdfdcd0f85332d4268ff2c42aaa554 -Author: jmerelo -Date: Mon Feb 7 17:16:16 2000 +0000 - - Added new files to the brew, mainly distance and new-op-interface related - -commit 472898871ced7f9c36f47afd6376e7a3fe394497 -Author: gustavo -Date: Wed Jan 26 17:48:24 2000 +0000 - - *** empty log message *** - -commit 83365de0d1dfa7b0473742cb7bfd79e82571bf9e -Author: victor -Date: Tue Jan 25 08:20:22 2000 +0000 - - A very silly error has been fixed - -commit 947ea09fa1df1818aab8f06d32e9e66d166cbb1e -Author: gustavo -Date: Mon Jan 24 21:16:54 2000 +0000 - - some reviews - -commit 96f618f88fd53aaee94b831ec9f8d657b3900ee2 -Author: gustavo -Date: Mon Jan 24 21:13:21 2000 +0000 - - some reviews - -commit 729fa74b42b62902ba2bb1409ba03e96035bb2fb -Author: victor -Date: Tue Jan 18 13:43:39 2000 +0000 - - I have change the do...while(terminator) into while(terminator){...}, because may be the termination condition is reached just atthe beginning (for instance 0 generations) - -commit 6fece409a7837b71b097b236219d6591c7acb902 -Author: victor -Date: Tue Jan 11 13:25:32 2000 +0000 - - Another little bug fixed - -commit c0e85685f80ef72fa7c51ac759ff2f52c49e1eac -Author: gustavo -Date: Tue Jan 11 12:13:18 2000 +0000 - - bug fix in eoTournament - -commit 29dc5ac0342f90295d0e25d3953fe8d1005a2a68 -Author: victor -Date: Tue Jan 4 13:04:00 2000 +0000 - - A little problem existed when the Parser tried to read a String because a \0 was inserted sometimes (no others) making imposible to add a new string to the one read and then turning the full string into a char* (understable? :-) - -commit 8eac30156619989786efcece181cb799e20c3c66 -Author: victor -Date: Tue Jan 4 10:43:06 2000 +0000 - - Changing the way parameters are shown to the user when the -h or --help flags are used - -commit 7d3e4c83f28176b7369acbbe5e16d0cff9243567 -Author: victor -Date: Tue Dec 21 13:39:42 1999 +0000 - - Minor changes in eoRNG.h - -commit bf3e77d97b0969fe779e1f9184f21b85eeda051f -Author: victor -Date: Tue Dec 21 12:12:29 1999 +0000 - - eoOpSelector has a method called getOp that HAD to return a non-constant reference to an operator; in fact it returned a CONST reference. Now, I've changed it - -commit a92af188c8712344f41559216c8c08023f5dcb6b -Author: victor -Date: Tue Dec 21 11:41:19 1999 +0000 - - Updating the selectors: they inherited from eoSelect and noew the inherite from eoBinPopOp - -commit 050df933c8014f7411ca642cb6dd919d6ed69d06 -Author: victor -Date: Tue Dec 21 09:58:45 1999 +0000 - - Minor changes in eoParser.h - -commit 5a735c3915f8eb8a8843a93d41fe64a2908a5ee3 -Author: victor -Date: Fri Dec 17 12:04:06 1999 +0000 - - Moving function InitRamdom to eoParserUtils.h - -commit d3642e4fde60773c5640a525e89f1f71bd1fdf28 -Author: jmerelo -Date: Fri Dec 17 09:19:13 1999 +0000 - - Changes - -commit de33c67f0e95db37cd6af3069186f6f3c8a38e27 -Author: victor -Date: Wed Dec 15 16:47:41 1999 +0000 - - A little mistake has been corrected - -commit df6c6008600ca5ca627f3374e5b117ebb128ebc8 -Author: victor -Date: Wed Dec 15 16:42:13 1999 +0000 - - The constants N,M and K are not declared twice when using RNG in different file of the same program - -commit 29ea368191dcffa928dd55b3cd9f3d58101ae9f8 -Author: victor -Date: Wed Dec 15 13:57:09 1999 +0000 - - I have turned into comments the Pop constructor that used Type as the type of the gene, given that an EO can have NO genes - -commit 91f5ddbdaadfd608ccad0ccfac798bc45343d841 -Author: jmerelo -Date: Mon Nov 22 09:47:32 1999 +0000 - - Added changes mainly by Marc - -commit 449ed17ff850f629ba330eaf305f62637bacb3fa -Author: jmerelo -Date: Mon Nov 15 09:26:33 1999 +0000 - - Added Marc's ES files and .dsp files for others - -commit 0d8648c0e67a395a787a3966e5000b159ca4e7b4 -Author: jmerelo -Date: Fri Oct 29 11:23:10 1999 +0000 - - Added eoParser - -commit 46b6a9e17a2254aaa2e0b620b57619145377274b -Author: jmerelo -Date: Mon Oct 25 08:25:42 1999 +0000 - - Added new RNG and test files for it - -commit 18f6c3151390a7a2589e56a2d279799664113ee6 -Author: jmerelo -Date: Tue Oct 19 11:47:15 1999 +0000 - - Small modifications - -commit ef43aaf616e8ef28a938e3e4c1475bd32607995b -Author: gustavo -Date: Fri Oct 15 13:16:50 1999 +0000 - - bug fix in eoBinBitflip - -commit bc922d38714d4ef68e070143dbd14fdd24c21294 -Author: jmerelo -Date: Fri Oct 15 11:18:52 1999 +0000 - - Changed eoBinBitFlip thanks to Jacques suggestion - -commit 0e4d27ec4d6f55678c97452077d204d325451e04 -Author: jmerelo -Date: Fri Oct 15 07:34:55 1999 +0000 - - Small changes to makefiles - -commit 661069d01cd16c36414eade4a06f9bb170d9a7f7 -Author: jmerelo -Date: Wed Oct 13 08:38:33 1999 +0000 - - Changes in configure y makefiles to account for new version and new files - -commit f92b133fd00a4fcf6988cd14a5c12d0b31d7e1db -Author: gustavo -Date: Mon Oct 11 10:20:39 1999 +0000 - - updating with new tests - -commit 387059901b003f043761a2f313c6ac03ee946bb6 -Author: gustavo -Date: Fri Oct 8 17:45:49 1999 +0000 - - adding more functions and tests for eoNonUniform - -commit 557a06ff22d8c2bf8cb22c94e625b203c7d9ddca -Author: jmerelo -Date: Fri Oct 8 11:39:58 1999 +0000 - - Two files left over added to the repo - -commit 259420d9ce40977c084df0a529277d93bb1b864a -Author: jmerelo -Date: Fri Oct 8 11:39:20 1999 +0000 - - Added a full algorithm to the new EO, with terminators, and things like that - -commit 378ee811e77f0ae494234f9daa6348ba6908d879 -Author: jmerelo -Date: Fri Oct 8 09:52:31 1999 +0000 - - Added two more files - -commit ba4ace6324a4d7071d3373325955d5bef076d324 -Author: jmerelo -Date: Fri Oct 8 09:51:40 1999 +0000 - - Changed stuff to make eoGeneration work - -commit c85363121964c48a59a84fa52c787a19ec7ec8ff -Author: jmerelo -Date: Fri Oct 8 07:40:34 1999 +0000 - - Cosmetic changes - -commit dabbcdc7b43de66f56338b4d12ecef9c624620f7 -Author: gustavo -Date: Thu Oct 7 11:39:08 1999 +0000 - - adding t-eogeneration - -commit 0133499ac3166f2e81fcb1eb47820895bac35b9a -Author: gustavo -Date: Thu Oct 7 11:38:14 1999 +0000 - - putting eoNonUniform into a separate file - -commit b5d3db43ade0189f2ef30c80405ace9d478008d1 -Author: gustavo -Date: Tue Oct 5 11:32:17 1999 +0000 - - adding eoNonUniformOperator to eoOp.h - -commit 7d7542e705852519dbec812ec2866ee730f70cae -Author: gustavo -Date: Mon Oct 4 11:17:19 1999 +0000 - - adding t-eogeneration.cpp - -commit 648fd000c10ff292733aed5adced04f51a2ff512 -Author: victor -Date: Fri Oct 1 17:00:38 1999 +0000 - - Updating Makefile.am to include eo2d.h and eo2dVector.h - -commit f395b6d93e1decc1a8cb9c74a8b9f97717c1534e -Author: victor -Date: Fri Oct 1 17:00:02 1999 +0000 - - Updating Makefile.am to compile t-eo2dVector.h - -commit 90d6310aef89f51afbe4bd4521f4ff0a34af2259 -Author: victor -Date: Fri Oct 1 16:36:04 1999 +0000 - - *** empty log message *** - -commit 7c107635b07e8ed33b221f79fe951e8a8f73deae -Author: victor -Date: Fri Oct 1 16:33:59 1999 +0000 - - All the methods have been implemented. Only three of them (asignement operator, read from and write to a stream) remain unfinished. - -commit a789371939706b82eb018d9a6f7ac62c1201b6fe -Author: victor -Date: Fri Oct 1 16:32:46 1999 +0000 - - Final (or almost) version by now. - -commit 8e4e9197ea8055f70e8db366e61ebcffe86cad2c -Author: victor -Date: Wed Sep 29 11:43:34 1999 +0000 - - Adding an interface for 2-dimensional chromosomes - -commit bed45e65a22c442032c5432fd8a7b97071246290 -Author: victor -Date: Wed Sep 29 11:41:34 1999 +0000 - - Fixing a little bug in the random generator. Variable size was used instead of _size, which is the parameter the method gets - -commit 1247f801fbeba3cf0f4d723444b3641df20e2a08 -Author: gustavo -Date: Tue Sep 28 11:56:21 1999 +0000 - - testing and debugging eoGeneration - -commit 49b35da8f920f5f8df58192fdb4adf32bd6d301f -Author: gustavo -Date: Tue Sep 28 10:26:39 1999 +0000 - - finish eoGeneration... still to be tested - -commit bc9638f53c2e7300bc09e008de2e57ef8346da28 -Author: gustavo -Date: Tue Sep 21 18:14:39 1999 +0000 - - fixing bugs in replacers and moving some code between files - -commit 265c5671bf0bded411cefe738c0a8a87daa007e1 -Author: gustavo -Date: Tue Sep 21 11:36:38 1999 +0000 - - pop need a reevaluation after breeding - -commit ad0a77bb61604058c356b8829b95c43756a53aab -Author: gustavo -Date: Mon Sep 20 18:07:35 1999 +0000 - - fixing cvsignore - -commit f3ebe8be708214e09e425324e420ac7465cb23f6 -Author: gustavo -Date: Mon Sep 20 11:48:52 1999 +0000 - - fixing tests - -commit 6daefd1ccff76994e781c6a9936928c61e72c030 -Author: jmerelo -Date: Mon Sep 20 11:37:00 1999 +0000 - - Added LICENSE - -commit 759dba7ea83f1f9e6d09e40fe98c83cbdb5bf366 -Author: jmerelo -Date: Mon Sep 20 11:35:01 1999 +0000 - - Changes to eo1d interface and bug fixes - -commit 06db0c058e48011852cca0a2af7c988825d8c6c2 -Author: gustavo -Date: Fri Sep 10 12:21:50 1999 +0000 - - *** empty log message *** - -commit b0232f9c0c810427df122be30015da0d2933286c -Author: gustavo -Date: Fri Sep 10 12:13:53 1999 +0000 - - updating eo/test/.cvsignore for new eoBin tests - -commit 8056d48505994eecbea4e8070db10ba4c311e73d -Author: gustavo -Date: Fri Sep 10 12:11:11 1999 +0000 - - *** empty log message *** - -commit 3214eead0ebef7a764e9187e4c79e99c2172d41d -Author: gustavo -Date: Fri Sep 10 12:05:57 1999 +0000 - - *** empty log message *** - -commit 0f4ff4691c8d623134e68325e2fb85985d713963 -Author: gustavo -Date: Fri Sep 10 12:03:51 1999 +0000 - - adding examples for eoBin & other stuff - -commit 50062e7c303ac84b853f498ccf8a368c93a0122e -Author: gustavo -Date: Fri Sep 10 11:48:42 1999 +0000 - - adding examples for eoBin & other stuff - -commit 9ac2220c5dd4c1dc7341ba9b8de691682e9a82b1 -Author: gustavo -Date: Fri Sep 10 11:07:46 1999 +0000 - - *** empty log message *** - -commit c1cddf3236f957069eb642653cb02e6f4a0f0933 -Author: gustavo -Date: Mon Feb 15 17:47:30 1999 +0000 - - adding eoGeneration - -commit c1481ac24f5dd5a057ac43a6f7faa10e28793d93 -Author: jmerelo -Date: Mon Feb 15 16:03:04 1999 +0000 - - New .dsp files for new test programs - -commit e3bff7d45f1d09f271fb62561d44ea3327620d35 -Author: jmerelo -Date: Mon Feb 15 16:01:35 1999 +0000 - - Compiled new stuff on VC++, changes to breeder - -commit 1eaeece266182bbcdca46bb486aeb1eb1e97d350 -Author: gustavo -Date: Mon Feb 15 11:55:59 1999 +0000 - - doing things work on VC++ - -commit 24b8b8045ac22fe59f07ef77a1c8370816ef1fdb -Author: gustavo -Date: Fri Feb 12 17:56:55 1999 +0000 - - bux fix in t-eoinsertion.cpp - -commit 9303c4b53dd49954f2445fba73afcbe542af3172 -Author: gustavo -Date: Fri Feb 12 17:43:28 1999 +0000 - - eoBreeder almost finished - -commit 11be20aefa012ef1ba82e1ca6815f5f089d3c758 -Author: jmerelo -Date: Wed Feb 10 17:14:08 1999 +0000 - - Added some files, compiled some stuff in VC++, and finished eoOpSelMason - -commit 044acb151be86f096a96fd275f87188e3695eade -Author: gustavo -Date: Wed Feb 10 17:05:16 1999 +0000 - - adding eoBreeder - -commit 9d1fdcd126ff7a70178d50c438260958b9e45d25 -Author: gustavo -Date: Wed Feb 10 13:39:48 1999 +0000 - - small bug fixes - -commit 73f37176e82a9491d3d9af8ebee95b1d39978c7f -Author: gustavo -Date: Tue Feb 9 19:06:51 1999 +0000 - - *** empty log message *** - -commit a5d27679da3b939887c012d24ae6dabe6138db82 -Author: jmerelo -Date: Tue Feb 9 18:40:00 1999 +0000 - - Changes to makefiles and other things - -commit 5318810e816a04289b506bd6e47a3bb8ac6d5e82 -Author: gustavo -Date: Tue Feb 9 18:16:42 1999 +0000 - - *** empty log message *** - -commit 9860e201f24f7663dc7b933f30aa54586aae45af -Author: jmerelo -Date: Tue Feb 9 17:31:16 1999 +0000 - - New bitOp factories and things like that - -commit a86873dcbf8424286e3672820d31358383a3f938 -Author: gustavo -Date: Tue Feb 9 17:27:22 1999 +0000 - - new replacer - -commit e721603cf2387dcc416a7ffdd73fe5a763f14ae9 -Author: jmerelo -Date: Mon Feb 8 19:15:27 1999 +0000 - - Changed monopfactory to opfactory; changes in the examples - -commit 204b0bcac835821b74f15b4b2f16a247bc62266d -Author: gustavo -Date: Mon Feb 8 18:47:07 1999 +0000 - - looking for a bug in eoInsertion - -commit 2141b13f9d1dd041e0487c3e2949e0e0e3655d32 -Author: jmerelo -Date: Mon Feb 8 16:13:26 1999 +0000 - - New files added and fixes for VC++ - -commit 6e9bdc8b2ea0798c7f8f39b3e66749e97984420d -Author: gustavo -Date: Mon Feb 8 16:11:55 1999 +0000 - - some bug fix - -commit 3d7d4a7a51098869069cc37b4a2ace453a881536 -Author: gustavo -Date: Mon Feb 8 14:15:11 1999 +0000 - - learning about autoconf: eoBin and bvector.h - -commit 93d15b9778ced0016ea7bfa79fc113c4074d0abc -Author: gustavo -Date: Mon Feb 8 12:43:52 1999 +0000 - - eoBin/eoBinOp division - -commit 46e19b13c393683679e1af8ec1eaaafb55181879 -Author: gustavo -Date: Fri Feb 5 18:25:28 1999 +0000 - - adding eoInsertion - -commit 5247c976ce6c56b5dc43e9634f8626efa1e29ad9 -Author: gustavo -Date: Fri Feb 5 16:34:00 1999 +0000 - - eoLottery finished - -commit 57e734fdf2e40561a190dabad737bb2a1cd66880 -Author: gustavo -Date: Thu Feb 4 17:38:39 1999 +0000 - - adding acconfig.h - -commit a44af3e7f462ebf52dcbbea33eccd2c270889bdc -Author: gustavo -Date: Wed Feb 3 20:42:57 1999 +0000 - - changes on eoLottery - -commit b5cb78b70f8ffd8ee61230534cd0455fa704b9b8 -Author: jmerelo -Date: Wed Feb 3 18:34:20 1999 +0000 - - Changes to eo and opsel to quash compiling bugs - -commit e20fb6c7aaa84685da5ce215b53e24ebbe082596 -Author: gustavo -Date: Wed Feb 3 17:28:07 1999 +0000 - - some changes to start, new work on eoLottery - -commit 2cafee6bc6ef57f249e90a89d8739dda968fe140 -Author: jmerelo -Date: Wed Feb 3 17:26:52 1999 +0000 - - Chenges to EO - -commit 6e9ddda69c70fd967542c554bc7df193cf6b8452 -Author: jmerelo -Date: Mon Feb 1 18:18:39 1999 +0000 - - Remove old eoObject.cpp - -commit 3fe0218a72811649a8f39ec61dc0952a6bee9063 -Author: gustavo -Date: Fri Jan 29 12:23:55 1999 +0000 From a9f382a30c5336459960939acf1342b2983184a1 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sat, 30 Oct 2010 23:30:40 +0200 Subject: [PATCH 1607/2134] fix #13: remove the use of the verbose members, replaced by the eo::log system ; functions prototypes keep their verbose parameters, but display a warning until next version --- eo/src/eoCombinedInit.h | 5 ++--- eo/src/eoGenContinue.h | 10 ++++----- eo/src/eoProportionalCombinedOp.h | 3 ++- eo/src/utils/eoData.h | 4 ---- eo/src/utils/eoOStreamMonitor.cpp | 35 +++++++++++++------------------ eo/src/utils/eoOStreamMonitor.h | 6 ++++-- eo/src/utils/eoStdoutMonitor.h | 6 +++++- 7 files changed, 32 insertions(+), 37 deletions(-) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 7acbe3795..240dd7b89 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -44,15 +44,14 @@ public: } /** The usual method to add objects to the combination - * note the _verbose parameter, that allows to print what's - * inside the combination with scaled rates */ void add(eoInit & _init, double _rate, bool _verbose=false) { + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; + initializers.push_back(&_init); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! - if (_verbose) printOn( eo::log << eo::logging ); } diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index e670cf317..3619a5204 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -42,14 +42,16 @@ public: : eoValueParam(0, "Generations", "Generations"), repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), - thisGeneration(thisGenerationPlaceHolder), verbose(true) {}; + thisGeneration(thisGenerationPlaceHolder) + {}; /// Ctor for enabling the save/load the no. of generations counted eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) : eoValueParam(0, "Generations", "Generations"), repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), - thisGeneration(_currentGen), verbose(true){}; + thisGeneration(_currentGen) + {}; /** Returns false when a certain number of generations is * reached */ @@ -60,7 +62,6 @@ public: if (thisGeneration >= repTotalGenerations) { - if (verbose) eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; return false; } @@ -97,9 +98,6 @@ private: unsigned long repTotalGenerations; unsigned long thisGenerationPlaceHolder; unsigned long& thisGeneration; - -public: - bool verbose; // allows to turn off annoying message to cout }; #endif diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 79b74111d..58dd79a41 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -176,10 +176,11 @@ virtual std::string className() const { return "eoPropCombinedQuadOp"; } // addition of a true operator virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) { + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; + ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! - if (_verbose) printOn( eo::log << eo::logging ); } diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index b5e11bac1..ea70cabec 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -33,10 +33,6 @@ //----------------------------------------------------------------------------- // some defines to make things easier to get at first sight -// tuning the amount of output using a boolean argument: -// true should always mean more output -#define eo_verbose true -#define eo_no_verbose false // to be used in selection / replacement procedures to indicate whether // the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) // or as an absolute integer (number=rate regardless of popsize). diff --git a/eo/src/utils/eoOStreamMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp index 817d9ab21..073793d82 100644 --- a/eo/src/utils/eoOStreamMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -25,38 +25,33 @@ eoMonitor& eoOStreamMonitor::operator()(void) if (firsttime) { - if (verbose) { eo::log << eo::progress << "First Generation" << std::endl; - } else { // else verbose - for (iterator it = vec.begin (); it != vec.end (); ++it) { - out << (*it)->longName (); - out << delim << std::left << std::setfill(fill) << std::setw(width); - } - out << std::endl; - } // else verbose + for (iterator it = vec.begin (); it != vec.end (); ++it) { + out << (*it)->longName (); + out << delim << std::left << std::setfill(fill) << std::setw(width); + } + out << std::endl; - firsttime = false; + firsttime = false; } // if firstime // ok, now the real saving. write out - if (verbose) { + /* TODO old verbose formatting, do we still need it? for (iterator it = vec.begin (); it != vec.end (); ++it) { // name: value out << (*it)->longName () << ": " << (*it)->getValue () << std::endl; } // for it in vec + */ - eo::log << eo::progress << "End of Generation" << std::endl; + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // value only + out << (*it)->getValue (); + out << delim << std::left << std::setfill(fill) << std::setw(width); + } // for it in vec - } else { // else verbose - for (iterator it = vec.begin (); it != vec.end (); ++it) { - // value only - out << (*it)->getValue (); - out << delim << std::left << std::setfill(fill) << std::setw(width); - } // for it in vec - - out << std::endl; - } // if verbose + out << std::endl; + eo::log << eo::progress << "End of Generation" << std::endl; return *this; } diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index d96588044..506944cdf 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -43,7 +43,10 @@ class eoOStreamMonitor : public eoMonitor { public : eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - out(_out), verbose(_verbose), delim(_delim), width(_width), fill(_fill), firsttime(true) {} + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + { + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; + } eoMonitor& operator()(void); @@ -51,7 +54,6 @@ public : private : std::ostream & out; - bool verbose; std::string delim; unsigned int width; char fill; diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 4a2083ab3..68e694c5d 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -42,7 +42,11 @@ class eoStdoutMonitor : public eoOStreamMonitor { public : eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) {} + eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) + { + + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdutMonitor constructor is deprecated and will be removed in the next release" << std::endl; + } virtual std::string className(void) const { return "eoStdoutMonitor"; } }; From 42c7dc28e1991bd2209b59417844b7251f9055f8 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 07:47:12 +0100 Subject: [PATCH 1608/2134] changelog summary for the next 1.1 release --- eo/NEWS | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index e51662cee..b47847411 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,6 +1,22 @@ * release 1.1 (not yet released) - - provide cmake build system + - provide cmake build system, remove the old autotools one + - package generation system - GCC 4.3 compatibility + - new versatile log system with several nested verbose levels + - classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files: + eo/src/eoCombinedInit.h + eo/src/eoGenContinue.h + eo/src/eoProportionalCombinedOp.h + eo/src/utils/eoData.h + eo/src/utils/eoStdoutMonitor.h + - an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations + - new monitor that can write on any ostream + - new continuator that can catch POSIX system user signals + - dual fitness class to handle feasibility of individual with guarantee that feasible fitness will always be better than unfeasible one + - feasible fitness ratio stat + - interquartile range stat + - uniform(min,max) random function + - new website, switch from CVS to GIT, and a cool logo! * release 1.0.1 (23. Jan. 2006) - Templates/ improvements @@ -18,9 +34,3 @@ - Support gcc-3.4 and gcc.4.x. - Provide full automake/autoconf/configure support. - -# Local Variables: -# coding: iso-8859-1 -# mode: text -# fill-column: 80 -# End: From 9c51b925b680b3765fe33c3eeab5cdaedb691fec Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 21:19:34 +0100 Subject: [PATCH 1609/2134] alternate function prototypes without verbose parameter --- eo/src/eoCombinedInit.h | 12 ++++++++---- eo/src/eoProportionalCombinedOp.h | 10 +++++++--- eo/src/utils/eoOStreamMonitor.h | 4 ++++ eo/src/utils/eoStdoutMonitor.h | 8 ++++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 240dd7b89..cdd4aa7db 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -43,12 +43,16 @@ public: rates.push_back(_rate); } - /** The usual method to add objects to the combination - */ void add(eoInit & _init, double _rate, bool _verbose=false) { - eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; - + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; + add( _init, _rate ); + } + + /** The usual method to add objects to the combination + */ + void add(eoInit & _init, double _rate) + { initializers.push_back(&_init); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 58dd79a41..b5b696552 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -171,13 +171,17 @@ public: rates.push_back(_rate); } -virtual std::string className() const { return "eoPropCombinedQuadOp"; } + virtual std::string className() const { return "eoPropCombinedQuadOp"; } - // addition of a true operator -virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) + virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; + add(_op,_rate); + } + // addition of a true operator + virtual void add(eoQuadOp & _op, const double _rate) + { ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 506944cdf..2984a991a 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -48,6 +48,10 @@ public : eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; } + eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + {} + eoMonitor& operator()(void); virtual std::string className(void) const { return "eoOStreamMonitor"; } diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 68e694c5d..b25e797f2 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -43,12 +43,16 @@ class eoStdoutMonitor : public eoOStreamMonitor public : eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) - { - + { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdutMonitor constructor is deprecated and will be removed in the next release" << std::endl; } + eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _delim, _width, _fill) + {} + virtual std::string className(void) const { return "eoStdoutMonitor"; } }; #endif + From fc21827eca40b191bb4f3a00e5ba0bd70630d391 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 21:36:53 +0100 Subject: [PATCH 1610/2134] remove default values for verbose parameters, so as to make deprecated wrappers unused by default --- eo/src/eoCombinedInit.h | 2 +- eo/src/eoProportionalCombinedOp.h | 2 +- eo/src/utils/eoOStreamMonitor.h | 1 + eo/src/utils/eoStdoutMonitor.h | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index cdd4aa7db..68f21970b 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -43,7 +43,7 @@ public: rates.push_back(_rate); } - void add(eoInit & _init, double _rate, bool _verbose=false) + void add(eoInit & _init, double _rate, bool _verbose) { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; add( _init, _rate ); diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index b5b696552..a03bb47b5 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -173,7 +173,7 @@ public: virtual std::string className() const { return "eoPropCombinedQuadOp"; } - virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) + virtual void add(eoQuadOp & _op, const double _rate, bool _verbose) { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; add(_op,_rate); diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 2984a991a..83e1d6040 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -34,6 +34,7 @@ Authors: #include #include +#include #include /** diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index b25e797f2..76ac1391f 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -41,7 +41,7 @@ Authors: class eoStdoutMonitor : public eoOStreamMonitor { public : - eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdutMonitor constructor is deprecated and will be removed in the next release" << std::endl; From 1f2de972a6e904291178ff4a74d2ae615b96837e Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 21:57:06 +0100 Subject: [PATCH 1611/2134] indicate cudacc branch in the changelog --- eo/NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/NEWS b/eo/NEWS index b47847411..c4fa652cd 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -16,6 +16,7 @@ - feasible fitness ratio stat - interquartile range stat - uniform(min,max) random function + - compatibility macros for compiling paradiseo with CUDACC - new website, switch from CVS to GIT, and a cool logo! * release 1.0.1 (23. Jan. 2006) From 653bc392ed853ab438247c810072629a2d06becf Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 22:57:05 +0100 Subject: [PATCH 1612/2134] fix #10: removed the moo/ directory and eoMO* classes, deprecated by the Paradiseo-MOEO project --- eo/src/moo/.cvsignore | 1 - eo/src/moo/CMakeLists.txt | 34 ---- eo/src/moo/eoEpsMOEA.h | 136 --------------- eo/src/moo/eoEpsilonArchive.h | 140 ---------------- eo/src/moo/eoFrontSorter.cpp | 146 ---------------- eo/src/moo/eoFrontSorter.h | 104 ------------ eo/src/moo/eoMOEval.h | 26 --- eo/src/moo/eoMOFitness.h | 298 --------------------------------- eo/src/moo/eoNSGA_II_Eval.cpp | 80 --------- eo/src/moo/eoNSGA_II_Eval.h | 57 ------- eo/src/moo/eoNSGA_IIa_Eval.cpp | 228 ------------------------- eo/src/moo/eoNSGA_IIa_Eval.h | 59 ------- eo/src/moo/eoNSGA_I_Eval.h | 73 -------- eo/test/t-eoEpsMOEA.cpp | 236 -------------------------- eo/test/t-eoNSGA.cpp | 228 ------------------------- 15 files changed, 1846 deletions(-) delete mode 100644 eo/src/moo/.cvsignore delete mode 100644 eo/src/moo/CMakeLists.txt delete mode 100644 eo/src/moo/eoEpsMOEA.h delete mode 100644 eo/src/moo/eoEpsilonArchive.h delete mode 100644 eo/src/moo/eoFrontSorter.cpp delete mode 100644 eo/src/moo/eoFrontSorter.h delete mode 100644 eo/src/moo/eoMOEval.h delete mode 100644 eo/src/moo/eoMOFitness.h delete mode 100644 eo/src/moo/eoNSGA_II_Eval.cpp delete mode 100644 eo/src/moo/eoNSGA_II_Eval.h delete mode 100644 eo/src/moo/eoNSGA_IIa_Eval.cpp delete mode 100644 eo/src/moo/eoNSGA_IIa_Eval.h delete mode 100644 eo/src/moo/eoNSGA_I_Eval.h delete mode 100644 eo/test/t-eoEpsMOEA.cpp delete mode 100644 eo/test/t-eoNSGA.cpp diff --git a/eo/src/moo/.cvsignore b/eo/src/moo/.cvsignore deleted file mode 100644 index 70845e08e..000000000 --- a/eo/src/moo/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/eo/src/moo/CMakeLists.txt b/eo/src/moo/CMakeLists.txt deleted file mode 100644 index 6d1c717cd..000000000 --- a/eo/src/moo/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -###################################################################################### -### 2) Define the eomoo target -###################################################################################### - -SET(EOMOO_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${EOMOO_LIB_OUTPUT_PATH}) - -SET (EOMOO_SOURCES eoFrontSorter.cpp - eoNSGA_IIa_Eval.cpp - eoNSGA_II_Eval.cpp) - - -ADD_LIBRARY(eomoo STATIC ${EOMOO_SOURCES}) -INSTALL(TARGETS eomoo ARCHIVE DESTINATION lib COMPONENT libraries) - -FILE(GLOB HDRS *.h) -INSTALL(FILES ${HDRS} DESTINATION include/eo/moo COMPONENT headers) - -###################################################################################### -### 3) Optionnal -###################################################################################### - -SET(EOMOO_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(eomoo PROPERTIES VERSION "${EOMOO_VERSION}") - -###################################################################################### - diff --git a/eo/src/moo/eoEpsMOEA.h b/eo/src/moo/eoEpsMOEA.h deleted file mode 100644 index 9ed7a855b..000000000 --- a/eo/src/moo/eoEpsMOEA.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef eoEpsMOEA_h -#define eoEpsMOEA_h - -#include -#include -#include - - -template -class eoEpsMOEA : public eoAlgo { - - public: - - eoEpsMOEA( - eoContinue& _continuator, - eoEvalFunc& _eval, - eoGenOp& _op, - const std::vector& eps, - unsigned max_archive_size = std::numeric_limits::max() - ) : continuator(_continuator), - eval (_eval), - loopEval(_eval), - popEval(loopEval), - op(_op), - archive(eps, max_archive_size) - { - } - - - void operator()(eoPop& pop) { - - eoPop offspring; - popEval(offspring, pop); - for (unsigned i = 0; i < pop.size(); ++i) pop[i].fitnessReference().setWorth(1.0); - - do { - unsigned nProcessed = 0; - - while (nProcessed < pop.size()) { - offspring.clear(); - - epsPopulator populator(archive, pop, offspring); - op(populator); - - nProcessed += offspring.size(); - popEval(pop, offspring); - - for (unsigned i = 0; i < offspring.size(); ++i) { - offspring[i].fitnessReference().setWorth(1.0); - archive(offspring[i]); - update_pop(pop, offspring[i]); - } - } - - // quite expensive to copy the entire archive time and time again, but this will make it work more seamlessly with the rest of EO - offspring.clear(); - archive.appendTo(offspring); - - } while (continuator(offspring)); // check archive - - // return archive - pop.clear(); - archive.appendTo(pop); - - } - - private : - void update_pop(eoPop& pop, const EOT& offspring) { - std::vector dominated; - - for (unsigned i = 0; i < pop.size(); ++i) { - int dom = offspring.fitness().check_dominance(pop[i].fitness()); - switch (dom) { - case 1 : // indy dominates this - dominated.push_back(i); - break; - case -1 : // is dominated, do not insert - return; - case 0: // incomparable - break; - } - } - - if (dominated.size()) { - pop[ dominated[ rng.random(dominated.size()) ] ] = offspring; - } - - // non-dominated everywhere, overwrite random one - pop[ rng.random(pop.size()) ] = offspring; - } - - class epsPopulator : public eoPopulator { - - using eoPopulator< EOT >::src; - - eoEpsilonArchive& archive; - bool fromArchive; - public: - epsPopulator(eoEpsilonArchive& arch, const eoPop& pop, eoPop& res) : eoPopulator(pop, res), archive(arch), fromArchive(true) {} - - const EOT& select() { - fromArchive = !fromArchive; - - using std::cout; - using std::endl; - - if (fromArchive && !archive.empty()) { - return archive.selectRandom(); - } - - // tournament selection on population - const EOT& eo1 = rng.choice(src); - const EOT& eo2 = rng.choice(src); - - if (eo1.fitness().dominates(eo2.fitness())) return eo1; - return eo2; // they are drawn at random, so no need to do an extra randomization step - } - - }; - - - eoContinue& continuator; - - eoEvalFunc & eval ; - eoPopLoopEval loopEval; - - eoPopEvalFunc& popEval; - - eoGenOp& op; - - eoEpsilonArchive archive; - -}; - -#endif - diff --git a/eo/src/moo/eoEpsilonArchive.h b/eo/src/moo/eoEpsilonArchive.h deleted file mode 100644 index f54da3338..000000000 --- a/eo/src/moo/eoEpsilonArchive.h +++ /dev/null @@ -1,140 +0,0 @@ -#ifndef eoEpsilonArchive_h -#define eoEpsilonArchive_h - -#include -#include - -template -class eoEpsilonArchive { - - typedef typename EOT::Fitness::fitness_traits Traits; - - struct Node { - EOT element; - std::vector discretized; - - Node(const EOT& eo) : element(eo), discretized(Traits::nObjectives()) {} - - dominance::dominance_result check(const Node& other) const { - return dominance::check_discrete(discretized, other.discretized); - } - }; - - typedef std::vector archive_t; - - archive_t archive; - std::vector inv_eps; - - unsigned max_size; - - public: - - static double direction(unsigned i) { return 1; } - static double tol() { return 1e-6; } - - - eoEpsilonArchive(const std::vector& eps_, unsigned max_size_ = std::numeric_limits::max()) : max_size(max_size_) { - inv_eps.resize(eps_.size()); - for (unsigned i = 0; i < inv_eps.size(); ++i) { - inv_eps[i] = 1.0 / eps_[i]; - } - if (inv_eps.size() != Traits::nObjectives()) throw std::logic_error("eoEpsilonArchive: need one epsilon for each objective"); - } - - bool empty() { return archive.size() == 0; } - - void operator()(const EOT& eo) { - - using std::cout; - using std::endl; - - // discretize - Node node(eo); - for (unsigned i = 0; i < eo.fitness().size(); ++i) { - double val = Traits::direction(i) * eo.fitness()[i]; - - node.discretized[i] = (long) floor(val*inv_eps[i]); - } - - using namespace dominance; - - unsigned box = archive.size(); - // update archive - - - for (unsigned i = 0; i != archive.size(); ++i) { - dominance_result result = node.check(archive[i]); //check >(node.discretized, archive[i].discretized); - - switch (result) { - case first : { // remove dominated archive member - std::swap( archive[i], archive.back()); - archive.pop_back(); - --i; - break; - } - case second : { - return; // new one does not belong in archive - } - case non_dominated : break; // both non-dominated, put in different boxes - case non_dominated_equal : { // in same box - box = i; - goto exitLoop; // break - } - } - - } - -exitLoop: - // insert - if (box >= archive.size()) { // non-dominated, new box - archive.push_back(node); - } else { // fight it out - int dom = node.element.fitness().check_dominance( archive[box].element.fitness() ); - - switch (dom) { - case 1: archive[box] = node; break; - case -1: break; - case 0: { - double d1 = 0.0; - double d2 = 0.0; - - for (unsigned i = 0; i < node.element.fitness().size(); ++i) { - double a = Traits::direction(i) * node.element.fitness()[i] * inv_eps[i]; - double b = Traits::direction(i) * archive[box].element.fitness()[i] * inv_eps[i]; - - d1 += pow( a - node.discretized[i], 2.0); - d2 += pow( b - node.discretized[i], 2.0); - } - - if (d1 > d2) { - archive[box] = node; - } - break; - } - } - } - - if (archive.size() > max_size) { - unsigned idx = rng.random(archive.size()); - if (idx != archive.size()-1) std::swap(archive[idx], archive.back()); - archive.pop_back(); - } - - } - - void appendTo(eoPop& pop) const { - for (typename archive_t::const_iterator it = archive.begin(); it != archive.end(); ++it) { - pop.push_back( it->element ); - } - } - - const EOT& selectRandom() const { - int i = rng.random(archive.size()); - return archive[i].element; - } - -}; - - -#endif - diff --git a/eo/src/moo/eoFrontSorter.cpp b/eo/src/moo/eoFrontSorter.cpp deleted file mode 100644 index d852b5599..000000000 --- a/eo/src/moo/eoFrontSorter.cpp +++ /dev/null @@ -1,146 +0,0 @@ -#include - -using namespace std; - -namespace detail { - -void one_objective(std::vector& fitness, std::vector< std::vector >& front, double tol) -{ - std::sort(fitness.begin(), fitness.end(), CompareOn(0, tol)); - - front.clear(); - front.resize(1); - front[0].push_back(fitness[0]); - for (unsigned i = 1; i < fitness.size(); ++i) { - if (fitness[i].fitness[0] < fitness[i-1].fitness[0]) { // keep clones in same front - front.push_back( std::vector() ); - } - - front.back().push_back( fitness[i] ); - } -} - - -/** - * Optimization for two objectives. Makes the algorithm run in - * complexity O(n log n) where n is the population size - */ - - -void two_objectives(std::vector& fitness, std::vector< std::vector >& front, double tol) -{ - std::sort(fitness.begin(), fitness.end(), CompareOn(0, tol)); - - front.clear(); - - std::vector front_leader; - - for (unsigned i = 0; i < fitness.size(); ++i) { - - // find front through binary search - vector::iterator it = upper_bound( front_leader.begin(), front_leader.end(), fitness[i], CompareOn(1, tol)); - - if (it == front_leader.end()) { - front_leader.push_back(fitness[i]); - front.push_back( vector(1, fitness[i]) ); - } else { - *it = fitness[i]; // new 'best of front in second dimension' - front[ it - front_leader.begin() ].push_back(fitness[i]); // add to front of nth dominated solutions - } - } -} - -bool dominates(const FitnessInfo& a, const FitnessInfo& b, double tol) { - bool better_on_one = false; - - for (unsigned i = 0; i < a.fitness.size(); ++i) { - if (fabs(a.fitness[i] - b.fitness[i]) < tol) continue; - - if (a.fitness[i] < b.fitness[i]) return false; // worse on at least one other objective - if (a.fitness[i] > b.fitness[i]) better_on_one = true; - } - - return better_on_one; -} - -void m_objectives(std::vector& fitness, std::vector< std::vector >& front, double tol) { - unsigned i; - - std::vector > S(fitness.size()); // which individuals does guy i dominate - std::vector n(fitness.size()); // how many individuals dominate guy i - - unsigned j; - for (i = 0; i < fitness.size(); ++i) - { - for (j = 0; j < fitness.size(); ++j) - { - if ( dominates(fitness[i], fitness[j], tol) ) - { // i dominates j - S[i].push_back(j); // add j to i's domination list - } - else if (dominates(fitness[j], fitness[i], tol)) - { // j dominates i, increment count for i, add i to the domination list of j - n[i]++; - } - } - } - - front.clear(); - front.resize(1); - // get the first front out - for (i = 0; i < fitness.size(); ++i) - { - if (n[i] == 0) - { - front.back().push_back( fitness[i] ); - } - } - - while (!front.back().empty()) - { - front.push_back(vector()); - vector& last_front = front[front.size()-2]; - - // Calculate which individuals are in the next front; - - for (i = 0; i < last_front.size(); ++i) - { - for (j = 0; j < S[ last_front[i].index ].size(); ++j) - { - unsigned dominated_individual = S[ last_front[i].index ][j]; - n[dominated_individual]--; // As we remove individual i -- being part of the current front -- it no longer dominates j - - if (n[dominated_individual] == 0) // it should be in the current front - { - front.back().push_back( fitness[dominated_individual] ); - } - } - } - } - - front.pop_back(); // last front is empty; -} - -void front_sorter_impl(std::vector& fitness, std::vector< std::vector >& front_indices, double tol) { - - switch (fitness[0].fitness.size()) - { - case 1: - { - one_objective(fitness, front_indices, tol); - return; - } - case 2: - { - two_objectives(fitness, front_indices, tol); - return; - } - default : - { - m_objectives(fitness, front_indices, tol); - } - } -} - -} // namespace detail - diff --git a/eo/src/moo/eoFrontSorter.h b/eo/src/moo/eoFrontSorter.h deleted file mode 100644 index 077da8807..000000000 --- a/eo/src/moo/eoFrontSorter.h +++ /dev/null @@ -1,104 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoNDSorting.h - (c) Maarten Keijzer, Marc Schoenauer, 2001 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef eoFrontSorter_h -#define eoFrontSorter_h - -#include -#include -#include -#include - -namespace detail { -// small helper structs to store the multi-objective information. To be used in the implementation - - struct FitnessInfo { - std::vector fitness; // preprocessed fitness -> all maximizing - unsigned index; // index into population - - FitnessInfo() {} - FitnessInfo(const std::vector& fitness_, unsigned index_) : fitness(fitness_), index(index_) {} - }; - - struct CompareOn { - unsigned dim; - double tol; - - CompareOn(unsigned d, double t) : dim(d), tol(t) {} - - bool operator()(const FitnessInfo& a, const FitnessInfo& b) { - return a.fitness[dim] > b.fitness[dim] && fabs(a.fitness[dim] - b.fitness[dim]) > tol; - } - - }; - - extern void front_sorter_impl(std::vector& fitness, std::vector< std::vector >& fronts, double tol); - -} // namespace detail - -/** - * Reassembles population into a set of fronts; -*/ -template -class eoFrontSorter : public eoUF< const eoPop&, const std::vector< std::vector >& > -{ - - std::vector fitness; - std::vector< std::vector > fronts; - - public : - - typedef typename EOT::Fitness::fitness_traits Traits; - - typedef std::vector< std::vector > front_t; - - const std::vector >& operator()(const eoPop& _pop) - { - fitness.resize(_pop.size()); - for (unsigned i = 0; i < _pop.size(); ++i) { - fitness[i] = detail::FitnessInfo(_pop[i].fitness().normalized(), i); - } - - detail::front_sorter_impl(fitness, fronts, Traits::tol()); - - return fronts; - } - - const std::vector >& operator()(const std::vector& _pop) - { - fitness.resize(_pop.size()); - for (unsigned i = 0; i < _pop.size(); ++i) { - fitness[i] = detail::FitnessInfo(_pop[i]->fitness().normalized(), i); - } - - detail::front_sorter_impl(fitness, fronts, Traits::tol()); - - return fronts; - } -}; - - -#endif diff --git a/eo/src/moo/eoMOEval.h b/eo/src/moo/eoMOEval.h deleted file mode 100644 index 7c0506c3c..000000000 --- a/eo/src/moo/eoMOEval.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef eoMOEval_h -#define eoMOEval_h - -#include - -template -class eoMOEval : public eoPopEvalFunc { - - protected: - eoMOEval(eoEvalFunc& eval) : default_loop(eval), pop_eval(default_loop) {} - eoMOEval(eoPopEvalFunc& ev) : default_loop(dummy_eval), pop_eval(ev) {} - - void eval(eoPop& parents, eoPop& offspring) { - pop_eval(parents, offspring); - } - - private : - - class eoDummyEval : public eoEvalFunc {public: void operator()(EOT &) {} } dummy_eval; - eoPopLoopEval default_loop; - eoPopEvalFunc& pop_eval; - -}; - - -#endif diff --git a/eo/src/moo/eoMOFitness.h b/eo/src/moo/eoMOFitness.h deleted file mode 100644 index e476e3f49..000000000 --- a/eo/src/moo/eoMOFitness.h +++ /dev/null @@ -1,298 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMOFitness.h -// (c) Maarten Keijzer and Marc Schoenauer, 2007 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: mak@dhi.dk - Marc.Schoenauer@inria.fr - */ -//----------------------------------------------------------------------------- - -#ifndef _eoMOFitness_h -#define _eoMOFitness_h - -#include -#include -#include -#include -#include - -/** - * eoMOFitnessTraits: a traits class to specify - * the number of objectives and which one are direction or not - * See test/t-eoParetoFitness for its use. - * - * If you define your own, make sure you make the functions static! -*/ -class eoMOFitnessTraits -{ - public : - - /// Number of Objectives - static unsigned nObjectives() { return 2; } - - /// by default: all are maximizing, zero will lead to ignored fitness, negative to minimization for that objective - static double direction(unsigned which) { return 1; } - - /// tolerance for dominance check (if within this tolerance objective values are considered equal) - static double tol() { return 1e-6; } - -}; - -namespace dominance { - - template - inline double worst_possible_value(unsigned objective) { - double dir = Traits::direction(objective); - if (dir == 0.) return 0.0; - if (dir < 0.) return std::numeric_limits::infinity(); - return -std::numeric_limits::infinity(); - } - - template - inline double best_possible_value(unsigned objective) { - return -worst_possible_value(objective); - } - - enum dominance_result { non_dominated_equal, first, second, non_dominated }; - - template - inline dominance_result check(const std::vector& p1, const std::vector& p2, double tolerance) { - - bool all_equal = true; - bool a_better_in_one = false; - bool b_better_in_one = false; - - for (unsigned i = 0; i < p1.size(); ++i) { - - double maxim = FitnessDirectionTraits::direction(i); - double aval = maxim * p1[i]; - double bval = maxim * p2[i]; - - if ( fabs(aval-bval) > tolerance ) { - all_equal = false; - if (aval > bval) { - a_better_in_one = true; - - } else { - b_better_in_one = true; - } - // check if we need to go on - - if (a_better_in_one && b_better_in_one) return non_dominated; - } - - } - - if (all_equal) return non_dominated_equal; - - if (a_better_in_one) return first; - // else b dominates a (check for non-dominance done above - return second; - } - - template - inline dominance_result check_discrete(const std::vector& a, const std::vector& b) { - - bool all_equal = true; - bool a_better_in_one = false; - bool b_better_in_one = false; - - for (unsigned i = 0; i < a.size(); ++i) { - - if ( a[i] != b[i] ) { - all_equal = false; - if (a[i] > b[i]) { - a_better_in_one = true; - - } else { - b_better_in_one = true; - } - // check if we need to go on - - if (a_better_in_one && b_better_in_one) return non_dominated; - } - - } - - if (all_equal) return non_dominated_equal; - - if (a_better_in_one) return first; - // else b dominates a (check for non-dominance done above - return second; - } - - template - inline dominance_result check(const std::vector& p1, const std::vector& p2) { - return check(p1, p2, FitnessTraits::tol()); - } - - - -} // namespace dominance - -/** - eoMOFitness class: std::vector of doubles with overloaded comparison operators. Comparison is done - on 'worth'. This worth needs to be set elsewhere. The template argument FitnessTraits defaults to eMOFitnessTraits, which - can be replaces at will by any other class that implements the static functions defined therein. - - Note that the comparison defines a partial order, so that - !(a < b) && !(b -class eoMOFitness : public std::vector -{ - double worth; // used for sorting and selection, by definition, bigger is better - bool worthValid; -public : - - typedef FitnessTraits fitness_traits; - - eoMOFitness() : std::vector(FitnessTraits::nObjectives()), worthValid(false) { reset(); } - - explicit eoMOFitness(double def) : std::vector(FitnessTraits::nObjectives(),def), worthValid(false) {} - - // Ctr from a std::vector - explicit eoMOFitness(std::vector & _v) : std::vector(_v), worthValid(false) {} - - virtual ~eoMOFitness() {} // in case someone wants to subclass - eoMOFitness(const eoMOFitness& org) { operator=(org); } - - eoMOFitness& operator=(const eoMOFitness& org) { - - std::vector::operator=(org); - worth = org.worth; - worthValid = org.worthValid; - - return *this; - } - - void reset() { - - for (unsigned i = 0; i < size(); ++i) { - this->operator[](i) = dominance::worst_possible_value(i); - } - } - - // Make the objective 'feasible' by setting it to the best possible value - void setFeasible(unsigned objective) { this->operator[](objective) = dominance::best_possible_value(objective); } - - void setWorth(double worth_) { - worth = worth_; - worthValid = true; - } - - double getWorth() const { - if (!worthValid) { - throw std::runtime_error("invalid worth"); - } - return worth; - } - - bool validWorth() const { return worthValid; } - void invalidateWorth() { worthValid = false; } - - /// Check on dominance: returns 0 if non-dominated, 1 if this dominates other, -1 if other dominates this - int check_dominance(const eoMOFitness& _other) const - { - dominance::dominance_result dom = dominance::check(*this, _other); - - return dom == dominance::first? 1 : (dom == dominance::second? -1 : 0); - } - - /// normalized fitness: all maximizing, removed the irrelevant ones - std::vector normalized() const { - std::vector f; - - for (unsigned j = 0; j < FitnessTraits::nObjectives(); ++j) { - if (FitnessTraits::direction(j) != 0) { - f.push_back( FitnessTraits::direction(j) * this->operator[](j)); - } - } - - return f; - } - - /// returns true if this dominates other - bool dominates(const eoMOFitness& _other) const - { - return check_dominance(_other) == 1; - } - - /// compare *not* on dominance, but on worth - bool operator<(const eoMOFitness& _other) const - { - return getWorth() < _other.getWorth(); - } - - bool operator>(const eoMOFitness& _other) const - { - return _other > *this; - } - - bool operator<=(const eoMOFitness& _other) const - { - return getWorth() <= _other.getWorth(); - } - - bool operator>=(const eoMOFitness& _other) const - { - return _other <= *this; - } - - bool operator==(const eoMOFitness& _other) const - { // check if they're all within tolerance - return getWorth() == _other.getWorth(); - } - - bool operator!=(const eoMOFitness& _other) const - { return ! operator==(_other); } - - - friend std::ostream& operator<<(std::ostream& os, const eoMOFitness& fitness) - { - for (unsigned i = 0; i < fitness.size(); ++i) - { - os << fitness[i] << ' '; - } - os << fitness.worthValid << ' ' << fitness.worth; - return os; - } - - friend std::istream& operator>>(std::istream& is, eoMOFitness& fitness) - { - fitness = eoMOFitness(); - for (unsigned i = 0; i < fitness.size(); ++i) - { - is >> fitness[i]; - } - is >> fitness.worthValid >> fitness.worth; - return is; - } - -}; - -namespace dominance { - template - inline dominance_result check(const eoMOFitness& p1, const eoMOFitness& p2) { - return check(p1, p2, FitnessTraits::tol()); - } -} - -#endif diff --git a/eo/src/moo/eoNSGA_II_Eval.cpp b/eo/src/moo/eoNSGA_II_Eval.cpp deleted file mode 100644 index 617623fb7..000000000 --- a/eo/src/moo/eoNSGA_II_Eval.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include -#include - -namespace nsga2 { - - using namespace std; - - typedef std::pair double_index_pair; - - class compare_nodes - { - public : - bool operator()(const double_index_pair& a, const double_index_pair& b) const - { - return a.first < b.first; - } - }; - - void assign_worths(const std::vector& front, unsigned rank, std::vector& worths) { - - unsigned nObjectives = front[0].fitness.size(); //traits::nObjectives(); //_pop[_cf[0]].fitness().size(); - - std::vector niche_distance(front.size()); - - for (unsigned o = 0; o < nObjectives; ++o) - { - - std::vector > performance(front.size()); - for (unsigned i =0; i < front.size(); ++i) - { - performance[i].first = front[i].fitness[o]; - performance[i].second = i; - } - - std::sort(performance.begin(), performance.end(), compare_nodes()); // a lambda operator would've been nice here - - std::vector nc(front.size(), 0.0); - - for (unsigned i = 1; i < front.size()-1; ++i) - { // and yet another level of indirection - - nc[performance[i].second] = performance[i+1].first - performance[i-1].first; - - } - - // set boundary at max_dist + 1 (so it will get chosen over all the others - //nc[performance[0].second] += 0; - nc[performance.back().second] = std::numeric_limits::infinity(); // best on objective - - for (unsigned i = 0; i < nc.size(); ++i) - { - niche_distance[i] += nc[i]; - } - } - - // now we've got niche_distances, scale them between (0, 1), making sure that infinities get maximum rank - - double max = 0; - for (unsigned i = 0; i < niche_distance.size(); ++i) { - if (niche_distance[i] != std::numeric_limits::infinity()) { - max = std::max(max, niche_distance[i]); - } - } - - for (unsigned i = 0; i < front.size(); ++i) { - double dist = niche_distance[i]; - if (dist == std::numeric_limits::infinity()) { - dist = 1.0; - } else { - dist /= (1+max); - } - - unsigned idx = front[i].index; - - worths[idx] = rank + dist; - } - - } - -} diff --git a/eo/src/moo/eoNSGA_II_Eval.h b/eo/src/moo/eoNSGA_II_Eval.h deleted file mode 100644 index 2cfbe5af2..000000000 --- a/eo/src/moo/eoNSGA_II_Eval.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef eoNSGA_II_Eval_h -#define eoNSGA_II_Eval_h - -#include -#include - -/** @brief Fast Elitist Non-Dominant Sorting Genetic Algorithm - - Adapted from Deb, Agrawal, Pratab and Meyarivan: A Fast Elitist - Non-Dominant Sorting Genetic Algorithm for MultiObjective - Optimization: NSGA-II KanGAL Report No. 200001 - -*/ - -namespace nsga2 { - void assign_worths(const std::vector& front, unsigned rank, std::vector& worths); -} - -template -class eoNSGA_II_Eval : public eoMOEval -{ - public: - - eoNSGA_II_Eval(eoEvalFunc& eval) : eoMOEval(eval) {} - eoNSGA_II_Eval(eoPopEvalFunc& eval) : eoMOEval(eval) {} - - virtual void operator()(eoPop& parents, eoPop& offspring) { - this->eval(parents, offspring); - - std::vector pop; - pop.reserve(parents.size() + offspring.size()); - for (unsigned i = 0; i < parents.size(); ++i) pop.push_back(&parents[i]); - for (unsigned i = 0; i < offspring.size(); ++i) pop.push_back(&offspring[i]); - - typename eoFrontSorter::front_t front = sorter(pop); - - // calculate worths - std::vector worths(pop.size()); - for (unsigned i = 0; i < front.size(); ++i) { - nsga2::assign_worths(front[i], front.size() - i, worths); - } - - // set worths - for (unsigned i = 0; i < pop.size(); ++i) { - pop[i]->fitnessReference().setWorth( worths[i]); - } - - } - - - eoFrontSorter sorter; - - private: - -}; - -#endif diff --git a/eo/src/moo/eoNSGA_IIa_Eval.cpp b/eo/src/moo/eoNSGA_IIa_Eval.cpp deleted file mode 100644 index 9e7f337a5..000000000 --- a/eo/src/moo/eoNSGA_IIa_Eval.cpp +++ /dev/null @@ -1,228 +0,0 @@ - -#include -#include - -namespace nsga2a { - -double calc_distance(const std::vector& f1, const std::vector& f2) { - double dist = 0; - for (unsigned i = 0; i < f1.size(); ++i) { - double d = (f1[i] - f2[i]); - dist += pow(fabs(d), 1./2); - //dist += pow(fabs(d), 2.0); - } - return dist; -} - -unsigned assign_worths(std::vector front, unsigned rank, std::vector& worths) { - - unsigned nDim = front[0].fitness.size(); - - // find boundary points - std::vector processed(nDim); - - for (unsigned i = 1; i < front.size(); ++i) { - for (unsigned dim = 0; dim < nDim; ++dim) { - if (front[i].fitness[dim] > front[processed[dim]].fitness[dim]) { - processed[dim] = i; - } - } - } - - // assign fitness to processed and store in boundaries - std::vector boundaries; - for (unsigned i = 0; i < processed.size(); ++i) { - - worths[ front[ processed[i] ].index] = rank; - - //cout << "Boundary " << i << ' ' << front[processed[i]].index << ' ' << parents[ front[ processed[i] ].index]->fitness() << endl; - - boundaries.push_back( front[ processed[i] ] ); - } - rank--; - - // clean up processed (make unique) - sort(processed.begin(), processed.end()); // swap out last first - for (unsigned i = 1; i < processed.size(); ++i) { - if (processed[i] == processed[i-1]) { - std::swap(processed[i], processed.back()); - processed.pop_back(); - --i; - } - } - // remove boundaries from front - while (processed.size()) { - unsigned idx = processed.back(); - //std::cout << idx << ' ' ; - processed.pop_back(); - std::swap(front.back(), front[idx]); - front.pop_back(); - } - //std::cout << std::endl; - - // calculate distances - std::vector distances(front.size(), std::numeric_limits::infinity()); - - unsigned selected = 0; - // select based on maximum distance to nearest processed point - for (unsigned i = 0; i < front.size(); ++i) { - - for (unsigned k = 0; k < boundaries.size(); ++k) { - double d = calc_distance( front[i].fitness, boundaries[k].fitness); - if (d < distances[i]) { - distances[i] = d; - } - } - - if (distances[i] > distances[selected]) { - selected = i; - } - } - - - while (!front.empty()) { - - detail::FitnessInfo last = front[selected]; - - std::swap(front[selected], front.back()); - front.pop_back(); - - std::swap(distances[selected], distances.back()); - distances.pop_back(); - - // set worth - worths[last.index] = rank--; - - if (front.empty()) break; - - selected = 0; - - for (unsigned i = 0; i < front.size(); ++i) { - double d = calc_distance(front[i].fitness, last.fitness); - - if (d < distances[i]) { - distances[i] = d; - } - - if (distances[i] >= distances[selected]) { - selected = i; - } - } - } - - return rank; -} - -unsigned assign_worths2(std::vector front, unsigned rank, std::vector& worths) { - - unsigned nDim = front[0].fitness.size(); - - // find boundary points - std::vector processed(nDim); - - for (unsigned i = 1; i < front.size(); ++i) { - for (unsigned dim = 0; dim < nDim; ++dim) { - if (front[i].fitness[dim] > front[processed[dim]].fitness[dim]) { - processed[dim] = i; - } - } - } - - // assign fitness to processed and store in boundaries - std::vector boundaries; - for (unsigned i = 0; i < processed.size(); ++i) { - - worths[ front[ processed[i] ].index] = rank; - - //cout << "Boundary " << i << ' ' << front[processed[i]].index << ' ' << parents[ front[ processed[i] ].index]->fitness() << endl; - - boundaries.push_back( front[ processed[i] ] ); - } - rank--; - - // clean up processed (make unique) - sort(processed.begin(), processed.end()); // swap out last first - for (unsigned i = 1; i < processed.size(); ++i) { - if (processed[i] == processed[i-1]) { - std::swap(processed[i], processed.back()); - processed.pop_back(); - --i; - } - } - // remove boundaries from front - while (processed.size()) { - unsigned idx = processed.back(); - //std::cout << idx << ' ' ; - processed.pop_back(); - std::swap(front.back(), front[idx]); - front.pop_back(); - } - //std::cout << std::endl; - - // calculate distances - std::vector< std::vector > distances(front.size(), std::vector(nDim, std::numeric_limits::infinity())); - - double bestsum = 0; - unsigned selected = 0; - // select based on maximum distance to nearest processed point - for (unsigned i = 0; i < front.size(); ++i) { - - for (unsigned k = 0; k < boundaries.size(); ++k) { - for (unsigned dim = 0; dim < nDim; ++dim) { - double d = front[i].fitness[dim] - boundaries[k].fitness[dim]; - if (d > 0 && d < distances[i][dim]) { - distances[i][dim] = d; - } - } - } - - double sum = 0; - for (unsigned dim = 0; dim < nDim; ++dim) sum += distances[i][dim]; - - if (sum > bestsum) { - selected = i; - bestsum = sum; - } - } - - - while (!front.empty()) { - - detail::FitnessInfo last = front[selected]; - - std::swap(front[selected], front.back()); - front.pop_back(); - - std::swap(distances[selected], distances.back()); - distances.pop_back(); - - // set worth - worths[last.index] = rank--; - - if (front.empty()) break; - - selected = 0; - bestsum = 0; - - for (unsigned i = 0; i < front.size(); ++i) { - double sum = 0; - for (unsigned dim = 0; dim < nDim; ++dim) { - double d = front[i].fitness[dim] - last.fitness[dim]; - if (d > 0 && d < distances[i][dim]) { - distances[i][dim] = d; - } - - sum += distances[i][dim]; - } - - if (sum > bestsum) { - selected = i; - bestsum = sum; - } - } - } - - return rank; -} - -} diff --git a/eo/src/moo/eoNSGA_IIa_Eval.h b/eo/src/moo/eoNSGA_IIa_Eval.h deleted file mode 100644 index 0b1369b43..000000000 --- a/eo/src/moo/eoNSGA_IIa_Eval.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef eoNSGA_IIa_Eval_h -#define eoNSGA_IIa_Eval_h - -#include -#include -#include - -/** @brief Fast Elitist Non-Dominant Sorting Genetic Algorithm - - Variant of the NSGA-II, where the ranking is based on a top-down distance based mechanism ( O(n^2)! ) - -*/ - -namespace nsga2a { - extern unsigned assign_worths(std::vector front, unsigned rank, std::vector& worths); -} - -template -class eoNSGA_IIa_Eval : public eoMOEval -{ - public: - - eoNSGA_IIa_Eval(eoEvalFunc& eval) : eoMOEval(eval) {} - eoNSGA_IIa_Eval(eoPopEvalFunc& eval) : eoMOEval(eval) {} - - - virtual void operator()(eoPop& parents, eoPop& offspring) { - eval(parents, offspring); - - std::vector pop; - pop.reserve(parents.size() + offspring.size()); - for (unsigned i = 0; i < parents.size(); ++i) pop.push_back(&parents[i]); - for (unsigned i = 0; i < offspring.size(); ++i) { - pop.push_back(&offspring[i]); - } - - typename eoFrontSorter::front_t front = sorter(pop); - - std::vector worths(pop.size()); - unsigned rank = pop.size(); - for (unsigned i = 0; i < front.size(); ++i) { - rank = nsga2a::assign_worths(front[i], rank, worths); - } - - for (unsigned i = 0; i < worths.size(); ++i) { - typename EOT::Fitness f = pop[i]->fitness(); - f.setWorth(worths[i]); - pop[i]->fitness(f); - } - } - - private: - - eoFrontSorter sorter; - - // implementation -}; - -#endif diff --git a/eo/src/moo/eoNSGA_I_Eval.h b/eo/src/moo/eoNSGA_I_Eval.h deleted file mode 100644 index a2f9826b5..000000000 --- a/eo/src/moo/eoNSGA_I_Eval.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef __eoNSGA_I_Eval_h_ -#define __eoNSGA_I_Eval_h_ - -#include -#include - -/** - The original Non Dominated Sorting algorithm from Srinivas and Deb -*/ -template -class eoNSGA_I_Eval : public eoMOEval -{ -public : - eoNSGA_I_Eval(double nicheWidth, eoEvalFunc& eval) : eoMOEval(eval), nicheSize(nicheWidth) {} - eoNSGA_I_Eval(double nicheWidth, eoPopEvalFunc& eval) : eoMOEval(eval), nicheSize(nicheWidth) {} - - virtual void operator()(eoPop& parents, eoPop& offspring) { - eval(parents, offspring); - - std::vector pop; - pop.reserve(parents.size() + offspring.size()); - for (unsigned i = 0; i < parents.size(); ++i) pop.push_back(&parents[i]); - for (unsigned i = 0; i < offspring.size(); ++i) pop.push_back(&offspring[i]); - - typename eoFrontSorter::front_t front = sorter(pop); - - for (unsigned i = 0; i < front.size(); ++i) { - assign_worths(front[i], front.size() - i, pop); - } - } - - private: - void assign_worths(const std::vector& front, unsigned rank, std::vector& parents) { - - for (unsigned i = 0; i < front.size(); ++i) - { // calculate whether the other points lie within the nice - double niche_count = 0; - - for (unsigned j = 0; j < front.size(); ++j) - { - if (i == j) - continue; - - double dist = 0.0; - - for (unsigned k = 0; k < front[j].fitness.size(); ++k) - { - double d = front[i].fitness[k] - front[j].fitness[k]; - dist += d*d; - } - - if (dist < nicheSize) - { - niche_count += 1.0 - pow(dist / nicheSize,2.); - } - } - - unsigned idx = front[i].index; - typename EOT::Fitness f = parents[idx]->fitness(); - f.setWorth(rank + niche_count); - parents[ idx ]->fitness(f); - } - } - - private : - - double nicheSize; - eoFrontSorter sorter; -}; - -#endif - - diff --git a/eo/test/t-eoEpsMOEA.cpp b/eo/test/t-eoEpsMOEA.cpp deleted file mode 100644 index d105c1064..000000000 --- a/eo/test/t-eoEpsMOEA.cpp +++ /dev/null @@ -1,236 +0,0 @@ - -#include - -#include -#include - -using namespace std; - -class MinimizingFitnessTraits -{ - public : - static unsigned nObjectives() { return 2; } - static double direction(unsigned) { return -1; } - static double tol() { return 1e-9; } - - static vector eps; -}; - -vector MinimizingFitnessTraits::eps(2, 0.1); - -typedef eoMOFitness fitness_type; - -const unsigned chromsize=5; -const double minval = -15; -const double maxval = 15; - -struct eoDouble : public EO -{ - double value[chromsize]; -}; - -class Mutate : public eoMonOp -{ - bool operator()(eoDouble& _eo) - { - for (unsigned i = 0; i < chromsize; ++i) - { - if (rng.flip(1./chromsize)) { - - _eo.value[i] += rng.normal() * 0.1 * _eo.value[i]; - - if (_eo.value[i] < minval) - _eo.value[i] = minval; - else if (_eo.value[i] > maxval) - _eo.value[i] = maxval; - } - } - return true; - } -}; - -class Cross : public eoBinOp { - - bool operator()(eoDouble& _eo, const eoDouble& eo2) - { - for (unsigned i = 0; i < chromsize; ++i) - { - if (rng.flip(0.5)) { - _eo.value[i] = eo2.value[i]; - } - } - return true; - } - -}; - -class Eval : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - vector x(_eo.value, _eo.value + chromsize); - fitness_type f(0.0); - - for (unsigned i = 0; i < chromsize; ++i) - { - if (i < chromsize-1) - { - f[0] += -10.0 * exp(-0.2 * sqrt(x[i]*x[i] + x[i+1]*x[i+1])); - } - - f[1] += pow(fabs(x[i]), 0.8) + 5 * pow(sin(x[i]),3.); - } - - _eo.fitness(f); - } -}; - -class Eval2 : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - vector x(_eo.value, _eo.value + chromsize); - fitness_type f; - - for (unsigned i = 0; i < chromsize; ++i) - { - f[0] += x[i] * x[i]; - } - - f[1] = - 3 * x[0] + 2 * x[1] - - x[2]/3 + 0.01*pow(x[3] - x[4], 3); - - _eo.fitness(f); - } -}; - -class Eval3 : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - double x = _eo.value[0]; - fitness_type f; - - f[0] = x * x; - double y = x-10; - f[1] = y * y; - - _eo.fitness(f); - } -}; - -class Init : public eoInit -{ - void operator()(eoDouble& _eo) - { - _eo.value[0] = rng.uniform(); - - double range = maxval - minval; - - for (unsigned i = 1; i < chromsize; ++i) - _eo.value[i] = rng.uniform() * range + minval; - _eo.invalidate(); - } -}; - -template -unsigned get_size(const eoPop& pop) { - return pop.size(); -} - -template -unsigned counter(const eoPop& pop) { - static unsigned c = 0; - return c++; -} - -// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well -void the_main(int argc, char* argv[]) -{ - Init init; - Eval eval; - Mutate mutate; - Cross cross; - - eoParser parser(argc, argv); - eoState state; - - unsigned num_gen = parser.createParam(unsigned(50), "num_gen", "number of generations to run", 'g').value(); - unsigned pop_size = parser.createParam(unsigned(100), "pop_size", "population size", 'p').value(); - - eoPop pop(pop_size, init); - - // binary tournament selection - eoDetTournamentSelect select; - - // One general operator - eoProportionalOp opsel; - opsel.add(mutate, 1.0); - opsel.add(cross, 1.0); - - unsigned long generation = 0; - eoGenContinue gen(num_gen, generation); - eoCheckPoint cp(gen); - - eoMOFitnessStat fitness0(0, "FirstObjective"); - eoMOFitnessStat fitness1(1, "SecondObjective"); - - cp.add(fitness0); - cp.add(fitness1); - - eoGnuplot1DSnapshot snapshot("pareto"); - //snapshot.with(eoGnuplot::Points(3)); - - cp.add(snapshot); - - snapshot.add(fitness0); - snapshot.add(fitness1); - - eoGnuplot1DMonitor monitor("sizemon"); - - cp.add(monitor); - - eoFuncPtrStat size(get_size); - eoFuncPtrStat counterStat(counter); - - monitor.add(counterStat); - monitor.add(size); - - cp.add(size); - cp.add(counterStat); - - // the algo - eoEpsMOEA ea(cp, eval, opsel, MinimizingFitnessTraits::eps ); - - if (parser.userNeedsHelp()) - { - parser.printHelp(std::cout); - return; - } - - ea(pop); -} - - -int main(int argc, char* argv[]) -{ - the_main(argc, argv); - return 0; - try - { - the_main(argc, argv); - } - catch (std::exception& e) - { - std::cout << "Exception thrown: " << e.what() << std::endl; - throw e; // make sure it does not pass the test - } -} - - - -// Local Variables: -// mode: C++ -// c-file-style: "Stroustrup" -// End: diff --git a/eo/test/t-eoNSGA.cpp b/eo/test/t-eoNSGA.cpp deleted file mode 100644 index 1d238618b..000000000 --- a/eo/test/t-eoNSGA.cpp +++ /dev/null @@ -1,228 +0,0 @@ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include - -using namespace std; - -class MinimizingFitnessTraits -{ - public : - static unsigned nObjectives() { return 2; } - static double direction(unsigned) { return -1; } - static double tol() { return 1e-9; } -}; - -typedef eoMOFitness fitness_type; - -const unsigned chromsize=5; -const double minval = -15; -const double maxval = 15; - -struct eoDouble : public EO -{ - double value[chromsize]; -}; - -class Mutate : public eoMonOp -{ - bool operator()(eoDouble& _eo) - { - for (unsigned i = 0; i < chromsize; ++i) - { - if (rng.flip(1./chromsize)) - _eo.value[i] += rng.normal() * 0.1 * _eo.value[i]; - - if (_eo.value[i] < minval) - _eo.value[i] = minval; - else if (_eo.value[i] > maxval) - _eo.value[i] = maxval; - } - - return true; - } -}; - -class Cross : public eoBinOp { - - bool operator()(eoDouble& _eo, const eoDouble& eo2) - { - for (unsigned i = 0; i < chromsize; ++i) - { - if (rng.flip(0.5)) { - _eo.value[i] = eo2.value[i]; - } - } - return true; - } - -}; - -class Eval : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - vector x(_eo.value, _eo.value + chromsize); - fitness_type f(0.0); - - for (unsigned i = 0; i < chromsize; ++i) - { - if (i < chromsize-1) - { - f[0] += -10.0 * exp(-0.2 * sqrt(x[i]*x[i] + x[i+1]*x[i+1])); - } - - f[1] += pow(fabs(x[i]), 0.8) + 5 * pow(sin(x[i]),3.); - } - - _eo.fitness(f); - } -}; - -class Eval2 : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - vector x(_eo.value, _eo.value + chromsize); - fitness_type f; - - for (unsigned i = 0; i < chromsize; ++i) - { - f[0] += x[i] * x[i]; - } - - f[1] = - 3 * x[0] + 2 * x[1] - - x[2]/3 + 0.01*pow(x[3] - x[4], 3); - - _eo.fitness(f); - } -}; - -class Eval3 : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - double x = _eo.value[0]; - fitness_type f; - - f[0] = x * x; - double y = x-10; - f[1] = y * y; - - _eo.fitness(f); - } -}; - -class Init : public eoInit -{ - void operator()(eoDouble& _eo) - { - _eo.value[0] = rng.uniform(); - - double range = maxval - minval; - - for (unsigned i = 1; i < chromsize; ++i) - _eo.value[i] = rng.uniform() * range + minval; - _eo.invalidate(); - } -}; - -// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well -void the_main(int argc, char* argv[]) -{ - Init init; - Eval simple_eval; - Mutate mutate; - Cross cross; - - eoParser parser(argc, argv); - eoState state; - - unsigned num_gen = parser.createParam(unsigned(50), "num_gen", "number of generations to run", 'g').value(); - unsigned pop_size = parser.createParam(unsigned(100), "pop_size", "population size", 'p').value(); - bool use_nsga1 = parser.createParam(false, "nsga1", "Use nsga 1").value(); - bool use_nsga2a = parser.createParam(false, "nsga2a", "Use nsga 2a").value(); - - eoPop pop(pop_size, init); - - // binary tournament selection - eoDetTournamentSelect select; - - // One general operator - eoProportionalOp opsel; - opsel.add(mutate, 1.0); - opsel.add(cross, 1.0); - - // the breeder - eoGeneralBreeder breeder(select, opsel); - - // replacement - eoNSGA_IIa_Eval nsga2a(simple_eval); - eoNSGA_II_Eval nsga2(simple_eval); - eoNSGA_I_Eval nsga1(0.1, simple_eval); - eoMOEval& eval = use_nsga1 ? static_cast&>(nsga1) : (use_nsga2a? static_cast&>(nsga2a) : static_cast&>(nsga2)); - - eoPlusReplacement replace; - - unsigned long generation = 0; - eoGenContinue gen(num_gen, generation); - eoCheckPoint cp(gen); - - eoMOFitnessStat fitness0(0, "FirstObjective"); - eoMOFitnessStat fitness1(1, "SecondObjective"); - - cp.add(fitness0); - cp.add(fitness1); - -#ifdef HAVE_GNUPLOT - eoGnuplot1DSnapshot snapshot("pareto"); - //snapshot.with(eoGnuplot::Points(3)); - - cp.add(snapshot); - - snapshot.add(fitness0); - snapshot.add(fitness1); -#endif - - // the algo - eoEasyEA ea(cp, eval, breeder, replace); - - if (parser.userNeedsHelp()) - { - parser.printHelp(std::cout); - return; - } - - ea(pop); -} - - -int main(int argc, char* argv[]) -{ - the_main(argc, argv); - return 0; - try - { - the_main(argc, argv); - } - catch (std::exception& e) - { - std::cout << "Exception thrown: " << e.what() << std::endl; - throw e; // make sure it does not pass the test - } -} - - - -// Local Variables: -// mode: C++ -// c-file-style: "Stroustrup" -// End: From cbea0180a8a42faec4793a4c534b8b6388718cbe Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 23:01:16 +0100 Subject: [PATCH 1613/2134] fix #10: removed MOO binaries --- eo/NEWS | 1 + eo/src/CMakeLists.txt | 1 - eo/test/CMakeLists.txt | 6 ++---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index c4fa652cd..359668933 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -17,6 +17,7 @@ - interquartile range stat - uniform(min,max) random function - compatibility macros for compiling paradiseo with CUDACC + - removed old multi-objective classes, deprecated by the Paradiseo-MOEO project - new website, switch from CVS to GIT, and a cool logo! * release 1.0.1 (23. Jan. 2006) diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index ec471597a..7a6d6f334 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -41,7 +41,6 @@ ADD_SUBDIRECTORY(do) ADD_SUBDIRECTORY(es) ADD_SUBDIRECTORY(ga) ADD_SUBDIRECTORY(gp) -ADD_SUBDIRECTORY(moo) ADD_SUBDIRECTORY(other) ADD_SUBDIRECTORY(utils) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index cc4becdb1..2c0772def 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -56,7 +56,6 @@ SET (TEST_LIST t-eoSecondsElapsedContinue t-eoRNG t-eoEasyPSO - t-eoNSGA t-eoInt t-eoInitPermutation t-eoSwapMutation @@ -67,7 +66,6 @@ SET (TEST_LIST t-eoOrderXover t-eoExtendedVelocity # t-eoFrontSorter - # t-eoEpsMOEA t-eoLogger ) @@ -84,7 +82,7 @@ IF(ENABLE_MINIMAL_CMAKE_TESTING) SET ("T_${mintest}_SOURCES" "${mintest}.cpp") ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) ADD_TEST(${mintest} ${mintest}) - TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo eomoo) + TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo) ENDFOREACH (mintest) ELSEIF(ENABLE_CMAKE_TESTING) @@ -92,7 +90,7 @@ ELSEIF(ENABLE_CMAKE_TESTING) FOREACH (test ${TEST_LIST}) ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) ADD_TEST(${test} ${test}) - TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo eomoo) + TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo) INSTALL(TARGETS ${test} RUNTIME DESTINATION share/eo/test COMPONENT test) ENDFOREACH (test) From 98189861af219758c38a306f779adf57b19eaa32 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 13:32:37 +0100 Subject: [PATCH 1614/2134] more shortcut links on the webpage, toward the chat and the trac --- website/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/index.html b/website/index.html index 1344e41cb..8851e9361 100644 --- a/website/index.html +++ b/website/index.html @@ -32,6 +32,8 @@

      8MS_IDLX_)58G5>eL@hlo1BAz8tICs zS#Po;Q?&~W&dmm+ZMv1|1Md#g^Zz8b22K5QQh}@ULXj=kc@{SkDbeCAHZDsH+u2H@IJEPubyH;Bdvf00V-EeHCl&mB zAN&H~-SmLwfjHA?XAQ=0RQj?B1MW)~u@>$9mkh;)#95RP-ICUJ^O`r0S@et}6oj$` z$e-K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9dfoD zglPH}6XWoUARA4=Xa+B22T=EY@sJ-NBHHdIN46n%E`db*pjgC#IUjj;@<0}hb_ly@ zHL(&k$@e<0aP?3*iYq=!Ah3OlGD`JEw{vq%j4uUZ(&g1uJU5bh$leihjs` zJ@Dqit@KSwYieZqY5*m zE&LYo>NK|}vqI`Eo&G}78eYT49uh2oWjeJAmaBQ0fEe*I!F2p~A~ zveeVJZ8Adt+B+je45MtsO*FxS?Y^;<-T3Mh5D21KN>oS{#Fd@t{i??3JN@SbF$78X zAnShGQ6@>WO$aihYUG!dM3u%Ns|WAp3=9ay?LK%v8LPJK7f7&)ALHqC(C2KAqJ0_C zdTgBA?%(L031s|8VYV63?M2qd!CKvodVV#gC2`&f2VIVTA-O90GA$jvWMmtX_!|_S zmNt`t=+>a~NJ)*k8cIrD2RT|$6eU8`Qq%Y3{1f;0=HGd%<$RaNMzVUoSvto7A$Yi3 z;B`(+xXSgTfhMz_;%El;WTjL5y%q9Qh!5PLeL{XbMg8+NSG;h()@X|Fm9r4}#tbW~ zb`RPR1xPl%=3FWEc9iGr*Lw+Y+hz0>AW4GJYVy43TO>FOfdVDDu5{_dc@bDnet)Q< z!u)TsHxZ@9l(`#r;KyLku@km7erC;l4*th3&BrVJBx-Q}Z!C*Gvqez3ma%ozXXjFJR{ Q1p+=&V)CMYgbf1!7XhnDZU6uP literal 0 HcmV?d00001 From 15ae721ceae936f7a9f2aa0e3473e41f21a4a181 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 9 Sep 2010 13:55:18 +0200 Subject: [PATCH 1567/2134] * added some comments --- src/doEstimatorNormalMulti.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/doEstimatorNormalMulti.h b/src/doEstimatorNormalMulti.h index e1c907b27..098eb8f59 100644 --- a/src/doEstimatorNormalMulti.h +++ b/src/doEstimatorNormalMulti.h @@ -22,14 +22,23 @@ public: CovMatrix( const eoPop< EOT >& pop ) { - unsigned int p_size = pop.size(); // population size + //------------------------------------------------------------- + // Some checks before starting to estimate covar + //------------------------------------------------------------- + unsigned int p_size = pop.size(); // population size assert(p_size > 0); unsigned int s_size = pop[0].size(); // solution size - assert(s_size > 0); + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Copy the population to an ublas matrix + //------------------------------------------------------------- + ublas::matrix< AtomType > sample( p_size, s_size ); for (unsigned int i = 0; i < p_size; ++i) @@ -40,6 +49,9 @@ public: } } + //------------------------------------------------------------- + + _varcovar.resize(s_size, s_size); @@ -52,6 +64,8 @@ public: ublas::symmetric_matrix< AtomType, ublas::lower > var = ublas::prod( ublas::trans( sample ), sample ); + // Be sure that the symmetric matrix got the good size + assert(var.size1() == s_size); assert(var.size2() == s_size); assert(var.size1() == _varcovar.size1()); @@ -60,6 +74,8 @@ public: //------------------------------------------------------------- + // TODO: to remove the comment below + // for (unsigned int i = 0; i < s_size; ++i) // { // // triangular LOWER matrix, thus j is not going further than i @@ -72,7 +88,7 @@ public: _varcovar = var / p_size; - _mean.resize(s_size); + _mean.resize(s_size); // FIXME: check if it is really used because of the assignation below // unit vector ublas::scalar_vector< AtomType > u( p_size, 1 ); From 88b2ec3d1a95e3f1d87e3ed150c4a09035e4e270 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 9 Sep 2010 22:37:50 +0200 Subject: [PATCH 1568/2134] update related softwares: + EASEA, GUIDE --- website/index.html | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/website/index.html b/website/index.html index 306078c0a..1344e41cb 100644 --- a/website/index.html +++ b/website/index.html @@ -463,15 +463,28 @@

    @@ -489,7 +491,7 @@

    Authors

    -

    EO was started by the Geneura +

    EO was started by the Geneura Team at the University of Granada, headed by Juan Julián Merelo. The -

    The developement team has then been reinforced by The developement team has then been reinforced by Maarten Keijzer, the C++ wizzard, and Marc Schoenauer. Later came Jeroen @@ -508,7 +510,6 @@ href="http://www.jochen-kuepper.de">Jochen KĂĽpper, working on infrastructure maintenance.

    -

    Links

      From 8d18cbe6888b54831f9bbb35472574f1c3d218a0 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 13:37:24 +0100 Subject: [PATCH 1615/2134] added Johann and Caner as authors on the web page --- website/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/index.html b/website/index.html index 8851e9361..da004b875 100644 --- a/website/index.html +++ b/website/index.html @@ -510,6 +510,10 @@ href="http://www.jochen-kuepper.de">Jochen KĂĽpper, working on infrastructure maintenance.

      +

      The project is now maintained by Johann Dréo, + working on it with the help of Caner Candan.

      + +

      Links

        From e131c2178e1f3d208e5a8dabc1bc7489248560c3 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 15:34:27 +0100 Subject: [PATCH 1616/2134] grouping algorithms in a module of the doc --- eo/src/eoAlgo.h | 15 ++++++++++++++- eo/src/eoCellularEasyEA.h | 3 ++- eo/src/eoEDA.h | 9 +++++---- eo/src/eoEasyEA.h | 3 ++- eo/src/eoEasyPSO.h | 8 ++++++-- eo/src/eoPSO.h | 2 ++ eo/src/eoPopAlgo.h | 17 ----------------- eo/src/eoSGA.h | 3 ++- eo/src/eoSimpleEDA.h | 4 +++- eo/src/eoSyncEasyPSO.h | 6 +++++- 10 files changed, 41 insertions(+), 29 deletions(-) delete mode 100644 eo/src/eoPopAlgo.h diff --git a/eo/src/eoAlgo.h b/eo/src/eoAlgo.h index 9e168cda2..8201d5963 100644 --- a/eo/src/eoAlgo.h +++ b/eo/src/eoAlgo.h @@ -29,11 +29,24 @@ #include /** - This is a generic class for population-transforming algorithms. There + @defgroup Algorithms Algorithms + + In EO, an algorithm is a functor that takes one or several solutions to an optimization + problem as arguments, and iteratively modify them with the help of operators. + + Generally, an EO object is built by assembling together @ref Operators in an algorithm instance, + and then calling the algorithm's operator() on an initial @ref Population. The algorithm will then + manipulate the solutions within the population to search for the problem's optimum. +*/ + +/** + This is the base class for population-transforming algorithms. There is only one operator defined, which takes a population and does stuff to it. It needn't be a complete algorithm, can be also a step of an algorithm. This class just gives a common interface to linear population-transforming algorithms. + + @ingroup Algorithms */ template< class EOT > class eoAlgo : public eoUF&, void> diff --git a/eo/src/eoCellularEasyEA.h b/eo/src/eoCellularEasyEA.h index 5369feb22..98595ae03 100644 --- a/eo/src/eoCellularEasyEA.h +++ b/eo/src/eoCellularEasyEA.h @@ -33,8 +33,9 @@ /** The abstract cellular easy algorithm. - */ + @ingroup Algorithms + */ template class eoCellularEasyEA : public eoAlgo { public : diff --git a/eo/src/eoEDA.h b/eo/src/eoEDA.h index 490af15e6..896c5a97b 100644 --- a/eo/src/eoEDA.h +++ b/eo/src/eoEDA.h @@ -30,12 +30,13 @@ #include -/** eoEDA: Estimation of Distribution Algorithm within EO - * - * The abstract class for algorithms that evolve a probability distribution +/** The abstract class for estimation of disribution algorithms. + * This design evolve a probability distribution * on the spaces of populations rather than a population * - * It IS NOT an eoAlgo, as it evolves a distribution, not a population + * It IS NOT an eoAlgo, as it evolves a distribution, not a population. + * + * @ingroup Algorithms */ template class eoEDA: public eoUF&, void> diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index b599efed8..e8497707e 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -59,6 +58,8 @@ Change (MS, July 3. 2001): Note: it looks ugly only because we wanted to authorize many different constructors. Please only look at the operator() and there shall be light + + @ingroup Algorithms */ template class eoEasyEA: public eoAlgo { diff --git a/eo/src/eoEasyPSO.h b/eo/src/eoEasyPSO.h index a73f5d17d..7cdbf339b 100644 --- a/eo/src/eoEasyPSO.h +++ b/eo/src/eoEasyPSO.h @@ -32,14 +32,18 @@ #include //----------------------------------------------------------------------------- -/** An easy-to-use particle swarm algorithm; you can use any particle, -* any flight, any topology... The main steps are : +/** An easy-to-use particle swarm algorithm. +* Use any particle, any flight, any topology... +* +* The main steps are : * (The population is expected to be already evaluated) * - for each generation and each particle pi * - evaluate the velocities * -- perform the fligth of pi * -- evaluate pi * -- update the neighborhoods +* +* @ingroup Algorithms */ template < class POT > class eoEasyPSO:public eoPSO < POT > { diff --git a/eo/src/eoPSO.h b/eo/src/eoPSO.h index fa53b93ed..16d2c9b58 100644 --- a/eo/src/eoPSO.h +++ b/eo/src/eoPSO.h @@ -34,6 +34,8 @@ is only one operator defined, which takes a population and does stuff to it. It needn't be a complete algorithm, can be also a step of an algorithm. Only used for mono-objective cases. + + @ingroup Algorithms */ template < class POT > class eoPSO:public eoAlgo < POT >{}; diff --git a/eo/src/eoPopAlgo.h b/eo/src/eoPopAlgo.h deleted file mode 100644 index 3cf40d21e..000000000 --- a/eo/src/eoPopAlgo.h +++ /dev/null @@ -1,17 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -#ifndef eoPopAlgo_h -#define eoPopAlgo_h - -#include -#include - -/** - For all "population transforming" algos ... - */ - -template class eoPopAlgo : public eoUF &, void> { - -} ; - -#endif diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index 469d6dd47..d17d743d3 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -43,8 +43,9 @@ * course an evaluation function (eoEvalFunc) and a continuator * (eoContinue) which gives the stopping criterion. Performs full * generational replacement. + * + * @ingroup Algorithms */ - template class eoSGA : public eoAlgo { diff --git a/eo/src/eoSimpleEDA.h b/eo/src/eoSimpleEDA.h index 1da9040ec..ce9d80ada 100644 --- a/eo/src/eoSimpleEDA.h +++ b/eo/src/eoSimpleEDA.h @@ -34,13 +34,15 @@ #include #include -/** eoSimpleEDA: a very simple Estimation of Distribution Algorithm +/** A very simple Estimation of Distribution Algorithm * * The algorithm that evolves a probability distribution * on the spaces of populations with the loop * generate a population from the current distribution * evaluate that population * update the distribution + * + * @ingroup Algorithms */ template class eoSimpleEDA: public eoEDA diff --git a/eo/src/eoSyncEasyPSO.h b/eo/src/eoSyncEasyPSO.h index 6c4a91f78..849e92239 100644 --- a/eo/src/eoSyncEasyPSO.h +++ b/eo/src/eoSyncEasyPSO.h @@ -34,13 +34,17 @@ //----------------------------------------------------------------------------- /** An easy-to-use synchronous particle swarm algorithm; you can use any particle, -* any flight, any topology... The main steps are : +* any flight, any topology... +* +* The main steps are : * - perform a first evaluation of the population * - for each generation * - evaluate ALL the velocities * -- perform the fligth of ALL the particles * -- evaluate ALL the particles * -- update the neighborhoods +* +* @ingroup Algorithms */ template < class POT > class eoSyncEasyPSO:public eoPSO < POT > { From 2670bd857fe5876d480b461ef95f068ea58ced79 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 18:19:37 +0100 Subject: [PATCH 1617/2134] delete the obsolete directory (still versionned in the repository if necessary) --- eo/src/obsolete/.cvsignore | 6 - eo/src/obsolete/CMakeLists.txt | 35 - eo/src/obsolete/eo1d.h | 199 ----- eo/src/obsolete/eo1dWDistance.h | 136 --- eo/src/obsolete/eo2d.h | 242 ----- eo/src/obsolete/eo2dVector.h | 334 ------- eo/src/obsolete/eoAtomBitFlip.h | 58 -- eo/src/obsolete/eoAtomCreep.h | 66 -- eo/src/obsolete/eoAtomRandom.h | 64 -- eo/src/obsolete/eoBackInserter.h | 56 -- eo/src/obsolete/eoBin.h | 89 -- eo/src/obsolete/eoBreeder.h | 116 --- eo/src/obsolete/eoCopyElite.h | 110 --- eo/src/obsolete/eoDEA.h | 46 - eo/src/obsolete/eoDetTournament.h | 69 -- eo/src/obsolete/eoDetTournamentIndiSelector.h | 58 -- eo/src/obsolete/eoDetTournamentInserter.h | 70 -- eo/src/obsolete/eoDistance.h | 63 -- eo/src/obsolete/eoDup.h | 70 -- eo/src/obsolete/eoES.h | 164 ---- eo/src/obsolete/eoESChrom.h | 164 ---- eo/src/obsolete/eoESFullChrom.h | 267 ------ eo/src/obsolete/eoESFullMut.h | 261 ------ eo/src/obsolete/eoEsObjectiveBounds.h | 81 -- eo/src/obsolete/eoEvalFuncPtrCnt.h | 62 -- eo/src/obsolete/eoEvolutionStrategy.h | 101 --- eo/src/obsolete/eoFitTerm.h | 59 -- eo/src/obsolete/eoFitness.h | 57 -- eo/src/obsolete/eoGOpBreeder.h | 62 -- eo/src/obsolete/eoGOpSelector.h | 181 ---- eo/src/obsolete/eoGenTerm.h | 68 -- eo/src/obsolete/eoGeneration.h | 85 -- eo/src/obsolete/eoGenericBinOp.h | 75 -- eo/src/obsolete/eoGenericMonOp.h | 75 -- eo/src/obsolete/eoGenericQuadOp.h | 83 -- eo/src/obsolete/eoID.h | 110 --- eo/src/obsolete/eoInclusion.h | 64 -- eo/src/obsolete/eoIndiSelector.h | 160 ---- eo/src/obsolete/eoInplaceTransform.h | 193 ---- eo/src/obsolete/eoInserter.h | 93 -- eo/src/obsolete/eoInsertion.h | 96 -- eo/src/obsolete/eoKill.h | 62 -- eo/src/obsolete/eoLottery.h | 105 --- eo/src/obsolete/eoMutation.h | 90 -- eo/src/obsolete/eoNegExp.h | 67 -- eo/src/obsolete/eoNonUniform.h | 87 -- eo/src/obsolete/eoNormal.h | 89 -- eo/src/obsolete/eoOpFactory.h | 87 -- eo/src/obsolete/eoOpSelector.h | 94 -- eo/src/obsolete/eoParser.h | 838 ------------------ eo/src/obsolete/eoParserUtils.cpp | 35 - eo/src/obsolete/eoParserUtils.h | 24 - eo/src/obsolete/eoPopOps.h | 142 --- eo/src/obsolete/eoProblem.h | 45 - eo/src/obsolete/eoProportional.h | 71 -- eo/src/obsolete/eoProportionalGOpSel.h | 51 -- eo/src/obsolete/eoProportionalOpSel.h | 158 ---- eo/src/obsolete/eoRandomBreed.h | 200 ----- eo/src/obsolete/eoRandomIndiSelector.h | 53 -- eo/src/obsolete/eoRandomSelect.h | 130 --- eo/src/obsolete/eoRank.h | 140 --- eo/src/obsolete/eoScheme.h | 360 -------- eo/src/obsolete/eoSelectRandom.h | 52 -- eo/src/obsolete/eoSequentialGOpSel.h | 55 -- eo/src/obsolete/eoSimpleDEA.h | 105 --- eo/src/obsolete/eoSteadyStateEA.h | 84 -- eo/src/obsolete/eoSteadyStateInserter.h | 53 -- eo/src/obsolete/eoSteadyStateTransform.h | 88 -- eo/src/obsolete/eoStochTournament.h | 69 -- eo/src/obsolete/eoStochTournamentInserter.h | 75 -- eo/src/obsolete/eoStringMutation.h | 77 -- eo/src/obsolete/eoTerm.h | 56 -- eo/src/obsolete/eoTournament.h | 157 ---- eo/src/obsolete/eoTranspose.h | 94 -- eo/src/obsolete/eoUniformXOver.h | 176 ---- eo/src/obsolete/eoVector.h | 170 ---- eo/src/obsolete/eoWrappedOps.h | 200 ----- eo/src/obsolete/eoXOver2.h | 107 --- eo/src/obsolete/evolution_strategies | 15 - 79 files changed, 9009 deletions(-) delete mode 100644 eo/src/obsolete/.cvsignore delete mode 100644 eo/src/obsolete/CMakeLists.txt delete mode 100644 eo/src/obsolete/eo1d.h delete mode 100644 eo/src/obsolete/eo1dWDistance.h delete mode 100644 eo/src/obsolete/eo2d.h delete mode 100644 eo/src/obsolete/eo2dVector.h delete mode 100644 eo/src/obsolete/eoAtomBitFlip.h delete mode 100644 eo/src/obsolete/eoAtomCreep.h delete mode 100644 eo/src/obsolete/eoAtomRandom.h delete mode 100644 eo/src/obsolete/eoBackInserter.h delete mode 100644 eo/src/obsolete/eoBin.h delete mode 100644 eo/src/obsolete/eoBreeder.h delete mode 100644 eo/src/obsolete/eoCopyElite.h delete mode 100644 eo/src/obsolete/eoDEA.h delete mode 100644 eo/src/obsolete/eoDetTournament.h delete mode 100644 eo/src/obsolete/eoDetTournamentIndiSelector.h delete mode 100644 eo/src/obsolete/eoDetTournamentInserter.h delete mode 100644 eo/src/obsolete/eoDistance.h delete mode 100644 eo/src/obsolete/eoDup.h delete mode 100644 eo/src/obsolete/eoES.h delete mode 100644 eo/src/obsolete/eoESChrom.h delete mode 100644 eo/src/obsolete/eoESFullChrom.h delete mode 100644 eo/src/obsolete/eoESFullMut.h delete mode 100644 eo/src/obsolete/eoEsObjectiveBounds.h delete mode 100644 eo/src/obsolete/eoEvalFuncPtrCnt.h delete mode 100644 eo/src/obsolete/eoEvolutionStrategy.h delete mode 100644 eo/src/obsolete/eoFitTerm.h delete mode 100644 eo/src/obsolete/eoFitness.h delete mode 100644 eo/src/obsolete/eoGOpBreeder.h delete mode 100644 eo/src/obsolete/eoGOpSelector.h delete mode 100644 eo/src/obsolete/eoGenTerm.h delete mode 100644 eo/src/obsolete/eoGeneration.h delete mode 100644 eo/src/obsolete/eoGenericBinOp.h delete mode 100644 eo/src/obsolete/eoGenericMonOp.h delete mode 100644 eo/src/obsolete/eoGenericQuadOp.h delete mode 100644 eo/src/obsolete/eoID.h delete mode 100644 eo/src/obsolete/eoInclusion.h delete mode 100644 eo/src/obsolete/eoIndiSelector.h delete mode 100644 eo/src/obsolete/eoInplaceTransform.h delete mode 100644 eo/src/obsolete/eoInserter.h delete mode 100644 eo/src/obsolete/eoInsertion.h delete mode 100644 eo/src/obsolete/eoKill.h delete mode 100644 eo/src/obsolete/eoLottery.h delete mode 100644 eo/src/obsolete/eoMutation.h delete mode 100644 eo/src/obsolete/eoNegExp.h delete mode 100644 eo/src/obsolete/eoNonUniform.h delete mode 100644 eo/src/obsolete/eoNormal.h delete mode 100644 eo/src/obsolete/eoOpFactory.h delete mode 100644 eo/src/obsolete/eoOpSelector.h delete mode 100644 eo/src/obsolete/eoParser.h delete mode 100644 eo/src/obsolete/eoParserUtils.cpp delete mode 100644 eo/src/obsolete/eoParserUtils.h delete mode 100644 eo/src/obsolete/eoPopOps.h delete mode 100644 eo/src/obsolete/eoProblem.h delete mode 100644 eo/src/obsolete/eoProportional.h delete mode 100644 eo/src/obsolete/eoProportionalGOpSel.h delete mode 100644 eo/src/obsolete/eoProportionalOpSel.h delete mode 100644 eo/src/obsolete/eoRandomBreed.h delete mode 100644 eo/src/obsolete/eoRandomIndiSelector.h delete mode 100644 eo/src/obsolete/eoRandomSelect.h delete mode 100644 eo/src/obsolete/eoRank.h delete mode 100644 eo/src/obsolete/eoScheme.h delete mode 100644 eo/src/obsolete/eoSelectRandom.h delete mode 100644 eo/src/obsolete/eoSequentialGOpSel.h delete mode 100644 eo/src/obsolete/eoSimpleDEA.h delete mode 100644 eo/src/obsolete/eoSteadyStateEA.h delete mode 100644 eo/src/obsolete/eoSteadyStateInserter.h delete mode 100644 eo/src/obsolete/eoSteadyStateTransform.h delete mode 100644 eo/src/obsolete/eoStochTournament.h delete mode 100644 eo/src/obsolete/eoStochTournamentInserter.h delete mode 100644 eo/src/obsolete/eoStringMutation.h delete mode 100644 eo/src/obsolete/eoTerm.h delete mode 100644 eo/src/obsolete/eoTournament.h delete mode 100644 eo/src/obsolete/eoTranspose.h delete mode 100644 eo/src/obsolete/eoUniformXOver.h delete mode 100644 eo/src/obsolete/eoVector.h delete mode 100644 eo/src/obsolete/eoWrappedOps.h delete mode 100644 eo/src/obsolete/eoXOver2.h delete mode 100644 eo/src/obsolete/evolution_strategies diff --git a/eo/src/obsolete/.cvsignore b/eo/src/obsolete/.cvsignore deleted file mode 100644 index 69fb0bd82..000000000 --- a/eo/src/obsolete/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in diff --git a/eo/src/obsolete/CMakeLists.txt b/eo/src/obsolete/CMakeLists.txt deleted file mode 100644 index 3fe15630e..000000000 --- a/eo/src/obsolete/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -###################################################################################### - - -###################################################################################### -### 2) Define the ga target -###################################################################################### - -SET(EOOBSOLETE_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${EOOBSOLETE_LIB_OUTPUT_PATH}) - -SET (EOOBSOLETE_SOURCES eoParserUtils.cpp) - - -ADD_LIBRARY(eoobsolete STATIC ${EOOBSOLETE_SOURCES}) -###################################################################################### - - - -###################################################################################### -### 3) Optionnal -###################################################################################### - -SET(EOOBSOLETE_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(eoobsolete PROPERTIES VERSION "${EOOBSOLETE_VERSION}") - -###################################################################################### - diff --git a/eo/src/obsolete/eo1d.h b/eo/src/obsolete/eo1d.h deleted file mode 100644 index 73e83ea05..000000000 --- a/eo/src/obsolete/eo1d.h +++ /dev/null @@ -1,199 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eo1d.h - Serial EO. - - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EO1D_H -#define _EO1D_H - -#include // for std::ostream - -// EO Includes -#include -#include - -using namespace std; - -/** @name eo1d class - * Randomly accesible evolvable object with one dimension, with variable - * length. Use this if you want to evolve "linear" things, like bitstrings, - * or floating-point arrays. If you don't, subclass directly from EO - * @see EO - * @author GeNeura - * @version 0.2 - */ - -//@{ -/** -@deprecated {eo1d} eo1d -\deprecated -*/ - -/** - - eo1d: Base class for "chromosomes" with a single dimension -#T# is the type it will be instantiated with; this type must have, at -least, a copy ctor, assignment operators, - - \deprecated - As eo1d provides a so-called 'fat' interface, it might be wiser to - use eoFixedLength or eoVariableLength instead, that derive from - std::vector and std::list respectively and (important) redirect the less than - comparison operator to EO rather than the STL variants. - - @see eoFixedLength eoVariableLength -*/ -template -class eo1d: public EO< fitnessT > { -public: - - /// Declaration to make it accessible from subclasses - typedef T Type; - - /** Can be used as default ctor; should be called from derived - classes. Fitness should be at birth - */ - eo1d() - :EO ( ) {}; - - /** Ctor using a random number generator and with an specified size - @param _rndGen Random number generator - @param _size lineal dimension of the eo1d - @param _ID An ID std::string, preferably unique - */ - eo1d( unsigned _size, eoRnd& _rndGen, const std::string& _ID = ""); - - /** Ctor from a std::istream. It just passes the stream to EO, subclasses should - have to implement this. - @param _is the input stream - */ - eo1d( std::istream& _is): EO(){ readFrom(is); } - - /// Copy ctor - eo1d( const eo1d& _eo ) - :EO ( _eo ) {}; - - /// Assignment operator - const eo1d& operator= ( const eo1d& _eo ) { - EO::operator = ( _eo ); - return *this; - } - - /// Needed virtual dtor - virtual ~eo1d(){}; - - /** Reads and returns a copy of the gene in position _i - This implies that T must have a copy ctor . - @param _i index of the gene, which is the minimal unit. Must be - an unsigned less than #length()# - @return what's inside the gene, with the correct type - @std::exception out_of_range if _i > size() - */ - virtual T getGene( unsigned _i ) const = 0; - - /** Overwrites the gene placed in position _i with a - * new value. This means that the assignment operator - * for T must be defined . - @param _i index - @return what's inside the gene, with the correct type - @std::exception out_of_range if _i > size() - */ - virtual void setGene( unsigned _i, const T& _value ) = 0; - - /** Inserts a gene, moving the rest to the right. If - * _i = length(), it should insert it at the end. - * Obviously, changes length - @param _i index - @param _val new value - */ - virtual void insertGene( unsigned _i, T _val ) = 0; - - /** Eliminates the gene at position _i; all the other genes will - be shifted left - @param _i index of the gene that is going to be modified. - */ - virtual void deleteGene( unsigned _i ) = 0; - - /// Returns the number of genes in the eo1d - virtual unsigned length() const = 0; - - /// @name Methods from eoObject - //@{ - /** - * Read object. Theoretically, the length is known in advance. All objects - * Should call base class - * @param _s A std::istream. - * @throw runtime_std::exception If a valid object can't be read. - */ - virtual void readFrom(std::istream& _s) { - - for ( unsigned i = 0; i < length(); i ++ ) { - T tmp; - _s >> tmp; - setGene( i, tmp ); - } - // there is no way of distinguishing fitness from the object, so - // it's skipped - } - - /** Print itself: inherited from eoObject implementation. - Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the std::ostream in which things are written*/ - virtual void printOn( std::ostream& _s ) const{ - for ( unsigned i = 0; i < length(); i ++ ) { - _s << getGene( i ) << " "; - } - } - - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eo1d";}; - - //@} - -}; - -//@} - - -// --------------- Implementations -------------------------- - -/* Ctor using a random number generator and with an specified size - @param _rndGen Random number generator - @param _size lineal dimension of the eo1d - @param _ID An ID std::string, preferably unique -*/ -template< class T, class fitnessT> -eo1d::eo1d( unsigned _size, eoRnd& _rndGen, - const std::string& _ID ) - :EO ( _ID ) { - for ( unsigned i = 0; i < _size; i ++ ) { - insertGene( i, _rndGen() ); - } -}; - - -#endif diff --git a/eo/src/obsolete/eo1dWDistance.h b/eo/src/obsolete/eo1dWDistance.h deleted file mode 100644 index 2019e95c7..000000000 --- a/eo/src/obsolete/eo1dWDistance.h +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eo1dWDistance.h - Serial EO with distances. Acts as a wrapper for normal eo1ds - - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EO1DWDISTANCE_H -#define _EO1DWDISTANCE_H - -#include // for std::ostream - -// EO Includes -#include -#include - -using namespace std; - -/** eo1dWDistance: wraps around eo1ds and adds the possibility of computing distances -around them. -*/ -template -class eo1dWDistance: - public eo1d< T,fitnessT >, - public eoDistance > { -public: - - /** Can be used as default ctor; should be called from derived - classes. Fitness should be at birth - */ - eo1dWDistance( eo1d& _eo) - :eo1d (), eoDistance< eo1d >(), innereo1d( _eo ) {}; - - /// Needed virtual dtor - virtual ~eo1dWDistance(){}; - - /** Reads and returns a copy of the gene in position _i - This implies that T must have a copy ctor . - @param _i index of the gene, which is the minimal unit. Must be - an unsigned less than #length()# - @return what's inside the gene, with the correct type - @std::exception out_of_range if _i > size() - */ - virtual T getGene( unsigned _i ) const { - return innereo1d.getGene( _i ); - }; - - /** Overwrites the gene placed in position _i with a - * new value. This means that the assignment operator - * for T must be defined . - @param _i index - @return what's inside the gene, with the correct type - @std::exception out_of_range if _i > size() - */ - virtual void setGene( unsigned _i, const T& _value ) { - innereo1d.setGene( _i, _value); - }; - - /** Inserts a gene, moving the rest to the right. If - * _i = length(), it should insert it at the end. - * Obviously, changes length - @param _i index - @param _val new value - */ - virtual void insertGene( unsigned _i, T _val ) { - innereo1d.insertGene( _i, _val); - } - - /** Eliminates the gene at position _i; all the other genes will - be shifted left - @param _i index of the gene that is going to be modified. - */ - virtual void deleteGene( unsigned _i ) { - innereo1d.deleteGene( _i ); - } - - /// Returns the number of genes in the eo1d - virtual unsigned length() const { - return innereo1d.length(); - } - - /// Returns the distance from this EO to the other - virtual double distance( const eo1d& _eo ) const { - double tmp = 0; - // Which one is shorter - unsigned len = (innereo1d.length() < _eo.length()) ? _eo.length():innereo1d.length(); - - // Compute over the whole length. If it does not exists, it counts as 0 - for ( unsigned i = 0; i < len; i ++ ) { - T val1, val2; - val1 = ( i > innereo1d.length())?0:innereo1d.getGene(i); - val2 = ( i > _eo.length() )?0:_eo.getGene(i); - double diff = val1 - val2; - tmp += diff*diff; - } - return tmp; - } - - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eo1dWDistance";}; - - //@} - -private: - ///Private ctor. Do not use - eo1dWDistance() {}; - - - eo1d& innereo1d; -}; - -//@} - - -#endif diff --git a/eo/src/obsolete/eo2d.h b/eo/src/obsolete/eo2d.h deleted file mode 100644 index c8d082197..000000000 --- a/eo/src/obsolete/eo2d.h +++ /dev/null @@ -1,242 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -/* ------------------------------------------------------------------------------ -File............: eo2d.h -Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) -Date............: 21-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) -Description.....: Implementation of a 2-dimensional chromosome. - - ================ Modif. 1 ================ - Author........: - Date..........: - Description...: - ------------------------------------------------------------------------------ -*/ -//----------------------------------------------------------------------------- -// eo2d.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EO2D_H -#define _EO2D_H - -#include // for std::ostream -#include - -// EO Includes -#include -#include - -using namespace std; - -/** @name eo2d class -* Randomly accesible evolvable object with two dimension, with -variable length each of them. -* Use this if you want to evolve "two-dimensional" things, like bit arrays, or -floating-point arrays. If you don't, subclass directly from EO -* @see EO -* @author GeNeura -* @version 0.2 -*/ - -//@{ - -/** eo2d: Base class for "chromosomes" with a double dimension -#T# is the type it will be instantiated with; this type must have, at -least, a copy ctor, assignment operators, -*/ -template -class eo2d: public EO< fitnessT > { -public: - - /// Declaration to make it accessible from subclasses - typedef T Type; - - /** Can be used as default ctor; should be called from derived - classes. Fitness should be at birth - */ - eo2d() - :EO ( ) {}; - - /** Ctor using a random number generator and with an specified size - @param _rows Initial number of rows - @param _columns Initial number of columns - @param _rndGen Random "T-type" generator - @param _ID An ID std::string, preferably unique - */ - eo2d( const unsigned _rows, - const unsigned _columns, - eoRnd& _rndGen, - const std::string& _ID = ""); - - /** Ctor from an std::istream. It just passes the stream to EO, subclasses should - have to implement this. - @param _is the input stream - */ - eo2d( std::istream& _is): EO( _is ){}; - - /// Copy ctor - eo2d( const eo2d& _eo ) - :EO ( _eo ) {}; - - /// Assignment operator - const eo2d& operator= ( const eo2d& _eo ) { - EO::operator = ( _eo ); - return *this; - } - - /// Needed virtual dtor - virtual ~eo2d(){}; - - /** Reads and returns a copy of the gene in position _r,_c.\ - This implies that T must have a copy ctor . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# - @return what's inside the gene, with the correct type - @std::exception out_of_range if _r >=numOfRows() - @std::exception out_of_range if _c >=numOfCols() - */ - virtual T getGene( const unsigned _r, - const unsigned _j ) const = 0; - - /** Overwrites the gene placed in position _r,_c with a - * new value. This means that the assignment operator - * for T must be defined . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# - @return what's inside the gene, with the correct type - @std::exception out_of_range if _r >=numOfRows() - @std::exception out_of_range if _c >=numOfCols() - */ - virtual void setGene( const unsigned _r, - const unsigned _c, - const T& _value ) = 0; - - /** Inserts a row, moving the rest to the bottom. - * If _r = numOfRows(), it insert it at the end. - * Obviously, changes number of rows. - @param _r Position where the new row will be inserted. - @param _val Vector containing the new values to be inserted. - @std::exception invalid_argument If _val has not numOfCols() components. - @std::exception out_of_range If _r is greater than numOfRows() - */ - virtual void insertRow( const unsigned _r, - const std::vector& _val ) = 0; - - /** Eliminates the row at position _r; all the other genes will - be shifted up. - @param _r Number of he row to be deleted. - @std::exception out_of_range if _r >=numOfRows() - */ - virtual void deleteRow( const unsigned _r ) = 0; - - /** Inserts a column, moving the rest to the right. - * If _c = numOfCols(), it insert it at the end. - * Obviously, changes number of cols. - @param _r Position where the new column will be inserted. - @param _val Vector containing the new values to be inserted. - @std::exception invalid_argument if _val has not numOfRows() components. - */ - virtual void insertCol( const unsigned _c, - const std::vector& _val ) = 0; - - /** Eliminates the column at position _c; all the other columns will - be shifted left. - @param _c Number of he column to be deleted. - @std::exception out_of_range if _c >=numOfCols() - */ - virtual void deleteCol( const unsigned _c ) = 0; - - /// Returns the number of rows in the eo2d - virtual unsigned numOfRows() const = 0; - - /// Returns the number of columns in the eo2d - virtual unsigned numOfCols() const = 0; - - /// @name Methods from eoObject - //@{ - /** - * Read object. Theoretically, the length is known in advance. All objects - * Should call base class - * @param _s A std::istream. - * @throw runtime_std::exception If a valid object can't be read. - */ - virtual void readFrom(std::istream& _s) { - - for ( unsigned r = 0; r < numOfRows(); ++r ) { - for ( unsigned c = 0; c < numOfCols(); ++c ) { - T tmp; - _s >> tmp; - setGene( r, c, tmp ); - } - } - // there is no way of distinguishing fitness from the object, so - // it's skipped - } - - /** Print itself: inherited from eoObject implementation. - Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the std::ostream in which things are written*/ - virtual void printOn( std::ostream& _s ) const{ - for ( unsigned r = 0; r < numOfRows(); ++r ) { - for ( unsigned c = 0; c < numOfCols(); ++c ) { - _s << getGene( r,c ) << " "; - } - } - } - - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eo2d";}; - - //@} - -}; - -//@} - - -// --------------- Implementations -------------------------- - -/** Ctor using a random number generator and with an specified size - @param _rows Initial number of rows - @param _columns Initial number of columns - @param _rndGen Random "T-type" generator - @param _ID An ID std::string, preferably unique -*/ -template< class T, class fitnessT> -eo2d::eo2d( const unsigned _rows, - const unsigned _columns, - eoRnd& _rndGen, - const std::string& _ID = "") - :EO ( _ID ) { - for ( unsigned r = 0; r < _rows; ++r ) { - for ( unsigned c = 0; c < _cols; ++c ) { - insertGene( r, c, _rndGen() ); - } - } -}; - - -#endif diff --git a/eo/src/obsolete/eo2dVector.h b/eo/src/obsolete/eo2dVector.h deleted file mode 100644 index ec5833681..000000000 --- a/eo/src/obsolete/eo2dVector.h +++ /dev/null @@ -1,334 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/* ------------------------------------------------------------------------------ -File............: eo2dVector.h -Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) -Date............: 29-Sep-1999, at Fac. of Sciences, Univ. of Granada (Spain) -Description.....: Implementation of a 2-dimensional chromosome usign STL - std::vectors. - - ================ Modif. 1 ================ - Author........: - Date..........: - Description...: - -QUEDA: Operador de asignación, lectura desde std::istream, escritura a std::ostream ------------------------------------------------------------------------------ -*/ -//----------------------------------------------------------------------------- -// eo2dVector.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eo2dVector_H -#define _eo2dVector_H - -// STL libraries -#include // For std::vector -#include -#include -#include - -#include -#include - -/** Adaptor that turns an STL std::vector of vectror into an EO - with the same gene type as the type with which - the std::vector of std::vector has been instantiated. -*/ -template -class eo2dVector: public eo2d, public std::vector< std::vector > { -public: - typedef T Type ; - - /** @name Canonical part of the objects: several ctors, copy ctor, \ - * dtor and assignment operator. - */ - //@{ - - /** Ctor. - @param _rows Number of rows. - @param _cols Number of columns. - @param _val Common initial value - */ - eo2dVector( const unsigned _rows = 0, - const unsigned _cols = 0, - T _val = T() ) - : eo2d(), std::vector< std::vector >( _rows, std::vector( _cols, _val ) ){}; - - /** Ctor using a random number generator. - @param _rows Number of rows. - @param _cols Number of columns. - @param _rnd A random "T-type" generator, which returns a random value each time it´s called. - */ - eo2dVector( const unsigned _rows, - const unsigned _cols, - eoRnd& _rnd ); - - /** Ctor from a std::istream. The T class should accept reading from a std::istream. It doesn't read fitness, - which is supposed to be dynamic and dependent on environment. - @param _is the input stream; should have all values in a single line, separated by whitespace - */ - //eo2dVector( std::istream& _is); - - - /// copy ctor - eo2dVector( const eo2dVector & _eo ) - : eo2d( _eo ), std::vector< std::vector >( _eo ){ }; - - /// Assignment operator - /* - const eo2dVector& operator =( const eo2dVector & _eo ) { - if ( this != &_eo ){ - eo2d::operator=( _eo ); - std::vector< >::operator=( _eo ); - } - return *this; - } - */ - /// dtor - virtual ~eo2dVector() {}; - - //@} - /** Reads and returns a copy of the gene in position _r,_c.\ - This implies that T must have a copy ctor . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# - @return what's inside the gene, with the correct type - @std::exception out_of_range if _r >=numOfRows() - @std::exception out_of_range if _c >=numOfCols() - */ - virtual T getGene( const unsigned _r, - const unsigned _c ) const { - if ( _r >= numOfRows() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::getGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - if ( _c >= numOfCols() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::getGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - return (*this)[_r][_c]; - }; - /** Overwrites the gene placed in position _r,_c with a - * new value. This means that the assignment operator - * for T must be defined . - @param _r Index for rows. Must be an unsigned less than #numOfRows()# - @param _c Index for columns. Must be an unsigned less than #numOfCols()# - @return what's inside the gene, with the correct type - @std::exception out_of_range if _r >=numOfRows() - @std::exception out_of_range if _c >=numOfCols() - */ - virtual void setGene( const unsigned _r, - const unsigned _c, - const T& _value ) { - if ( _r >= numOfRows() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::setGene: row out of range. " - << "It should be <" << numOfRows() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - if ( _c >= numOfCols() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::setGene: column out of range. " - << "It should be <" << numOfCols() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - (*this)[_r][_c]=_value; - }; - - - - /** Inserts a row, moving the rest to the bottom. - * If _r = numOfRows(), it insert it at the end. - * Obviously, changes number of rows. - @param _r Position where the new row will be inserted. - @param _val Vector containing the new values to be inserted. - @std::exception invalid_argument If _val has not numOfCols() components. - @std::exception out_of_range If _r is greater than numOfRows() - */ - virtual void insertRow( const unsigned _r, - const std::vector& _val ) { - // Test errors. - if ( _r > numOfRows() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::insertRow: row out of range. " - << "It should be <=" << numOfRows() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - if ( _val.size() != numOfCols() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::insertRow: " - << "Incorrect number of values to be added. " - << "It should be ==" << numOfCols() << '\0' << std::endl; - throw invalid_argument( msg.str() ); - } - - // Insert the row. - std::vector< std::vector >::iterator ite = begin()+_r; - insert( ite, _val ); - }; - - /** Eliminates the row at position _r; all the other genes will - be shifted up. - @param _r Number of he row to be deleted. - @std::exception out_of_range if _r >=numOfRows() - */ - virtual void deleteRow( const unsigned _r ) { - // Test error. - if ( _r >= numOfRows() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::deleteRow: " - << "Row out of range. " - << "It should be <" << numOfRows() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - // Delete row. - std::vector< std::vector >::iterator ite = this->begin()+_r; - this->erase( ite ); - }; - - /** Inserts a column, moving the rest to the right. - * If _c = numOfCols(), it insert it at the end. - * Obviously, changes number of cols. - @param _r Position where the new column will be inserted. - @param _val Vector containing the new values to be inserted. - @std::exception invalid_argument if _val has not numOfRows() components. - */ - virtual void insertCol( const unsigned _c, - const std::vector& _val ) { - // Test errors. - if ( _c > numOfCols() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::insertCol: " - << "Column out of range. " - << "It should be >=" << numOfCols() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - if ( _val.size() != numOfRows() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::insertCol: " - << "Incorrect number of values to be added. " - << "It should be ==" << numOfRows() << '\0' << std::endl; - throw invalid_argument( msg.str() ); - } - - // Insert column. - for( unsigned r=0; r >::iterator it1 = begin()+r; - std::vector::iterator it2 = (*it1).begin()+_c; - (*it1).insert( it2, _val[r] ); - }; - } - - /** Eliminates the column at position _c; all the other columns will - be shifted left. - @param _c Number of he column to be deleted. - @std::exception out_of_range if _c >=numOfCols() - */ - virtual void deleteCol( const unsigned _c ) { - // Test error. - if ( _c >= numOfCols() ) { - std::ostrstream msg; - msg << "ERROR in eo2dVector::deleteCol: " - << "Column out of range. " - << "It should be <" << numOfCols() << '\0' << std::endl; - throw out_of_range( msg.str() ); - } - // Delete columns. - for( unsigned r=0; r >::iterator it1 = begin()+r; - std::vector::iterator it2 = (*it1).begin()+_c; - (*it1).erase( it2 ); - } - }; - - /// Returns the number of rows in the eo2d - virtual unsigned numOfRows() const { - return size(); - }; - - /// Returns the number of columns in the eo2d - virtual unsigned numOfCols() const { - return begin()->size(); - }; - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eo2dVector";}; - //@} - -}; - - -//____________________________ Some method implementation ____________________ - -// Ctors_______________________________________________________________________ -//_____________________________________________________________________________ -template -eo2dVector::eo2dVector( const unsigned _rows, - const unsigned _cols, - eoRnd& _rnd ) - : eo2d(), std::vector< std::vector >( _rows, std::vector( _cols, T() ) ){ - for ( std::vector< std::vector >::iterator i = begin(); i != end(); ++i ) { - for( std::vector::iterator j=(*i).begin(); j!= (*i).end(); ++j ) { - *j = _rnd(); - } - } -}; - -//_____________________________________________________________________________ -/*template -eoVector::eoVector( std::istream& _is) - : eo1d(), std::vector( ){ - while (_is ) { - T tmp; - _is >> tmp; - push_back( tmp ); - } - -}; -*/ - -//_____________________________________________________________________________ -template -std::ostream& operator<<( std::ostream& _os, const eo2dVector& _eo) { - for( unsigned i=0; i<_eo.numOfRows(); ++i ) { - for( unsigned j=0; j<_eo.numOfCols(); ++j ) { - _os << _eo.getGene( i,j ) << " "; - } - _os << std::endl; - } - return _os; -}; - -#endif - diff --git a/eo/src/obsolete/eoAtomBitFlip.h b/eo/src/obsolete/eoAtomBitFlip.h deleted file mode 100644 index be1a1be5f..000000000 --- a/eo/src/obsolete/eoAtomBitFlip.h +++ /dev/null @@ -1,58 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomBitFlip.h -// Increments or decrements by one a single element -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMBITFLIP_H -#define _EOATOMBITFLIP_H - -/** Flips a single bit -*/ -template -class eoAtomBitFlip: public eoAtomMutator { -public: - - /// - eoAtomBitFlip() {}; - - /// - virtual ~eoAtomBitFlip() {}; - - /// - virtual void operator()( T& _val ) const { - _val = !val; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoAtomBitFlip";}; - //@} - -}; - - -#endif - diff --git a/eo/src/obsolete/eoAtomCreep.h b/eo/src/obsolete/eoAtomCreep.h deleted file mode 100644 index 8c293208a..000000000 --- a/eo/src/obsolete/eoAtomCreep.h +++ /dev/null @@ -1,66 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoAtomCreep.h -// Increments or decrements by one a single element -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOATOMCREEP_H -#define _EOATOMCREEP_H - -#include -#include - -/** With uniform probability, decrements or increments by one the value. - The value type must admit post increment and decrement. -*/ -template -class eoAtomCreep: public eoAtomMutator { -public: - - /// - eoAtomCreep() {}; - - /// - virtual ~eoAtomCreep() {}; - - /// - virtual void operator()( T& _val ) const { - if ( rng.flip( 0.5 ) ) { - _val++; - } else { - _val--; - } - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoAtomCreep";}; - //@} - -}; - - -#endif - diff --git a/eo/src/obsolete/eoAtomRandom.h b/eo/src/obsolete/eoAtomRandom.h deleted file mode 100644 index 1cc846ee0..000000000 --- a/eo/src/obsolete/eoAtomRandom.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoAtomRandom.h - Increments or decrements by one a single element - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOATOMRANDOM_H -#define _EOATOMRANDOM_H - -#include - -/** Modifies using a random number generator, that is entered in the ctor. - The RNG must return positive or negative numbers, whatever. -*/ -template -class eoAtomRandom: public eoAtomMutator { -public: - - /// - eoAtomRandom( eoRnd& _rng): rnd( _rng ) {}; - - /// - virtual ~eoAtomRandom() {}; - - /// Adds the value generated by the RNG to the former value - virtual void operator()( T& _val ) const { - _val += rnd(); - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoAtomRandom";}; - //@} - -private: - eoRnd& rnd; - -}; - - -#endif diff --git a/eo/src/obsolete/eoBackInserter.h b/eo/src/obsolete/eoBackInserter.h deleted file mode 100644 index 24bdad380..000000000 --- a/eo/src/obsolete/eoBackInserter.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoInserter.h - Abstract population insertion operator, which is used by the eoGeneralOps - to insert the results in the (intermediate) population. This file also - contains the definitions of a derived classes that implements a back inserter, - probably the only efficient inserter for populations of type std::vector. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoBackInserter_h -#define eoBackInserter_h - -#include - -/** -\ingroup inserters - * eoBackInserter: Interface class that enables an operator to insert - new individuals at the back of the new population. -*/ -template -class eoBackInserter : public eoPopInserter -{ - public : - - eoBackInserter(void) : eoPopInserter() {} - - eoInserter& operator()(const EOT& _eot) - { - pop().push_back(_eot); - return *this; - } - - std::string className(void) const { return "eoBackInserter"; } - -}; - -#endif diff --git a/eo/src/obsolete/eoBin.h b/eo/src/obsolete/eoBin.h deleted file mode 100644 index 86dc8e7a9..000000000 --- a/eo/src/obsolete/eoBin.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - eoBin.h - (c) GeNeura Team 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoBin_h -#define eoBin_h - -//----------------------------------------------------------------------------- - -#include // std::ostream, std::istream -#include // bind2nd -#include // std::string - -#include - -/** -\defgroup bitstring - - Various functions for a bitstring representation -*/ - -/** eoBin: implementation of binary chromosome. -\class eoBin eoBin.h ga/eoBin.h -\ingroup bitstring - * based on STL's bit_std::vector (std::vector). -*/ -template class eoBin: public eoFixedLength -{ - public: - - /** - * (Default) Constructor. - * @param size Size of the binary std::string. - */ - eoBin(unsigned size = 0, bool value = false): - eoVector(size, value) {} - - /// My class name. - std::string className() const - { - return "eoBin"; - } - - /** - * To print me on a stream. - * @param os The std::ostream. - */ - void printOn(std::ostream& os) const - { - copy(begin(), end(), std::ostream_iterator(os)); - } - - /** - * To read me from a stream. - * @param is The std::istream. - */ - void readFrom(std::istream& is) - { - std::string bits; - is >> bits; - if (is) - { - resize(bits.size()); - transform(bits.begin(), bits.end(), begin(), - bind2nd(equal_to(), '1')); - } - } -}; - -//----------------------------------------------------------------------------- - -#endif eoBin_h diff --git a/eo/src/obsolete/eoBreeder.h b/eo/src/obsolete/eoBreeder.h deleted file mode 100644 index 7d8dd9bca..000000000 --- a/eo/src/obsolete/eoBreeder.h +++ /dev/null @@ -1,116 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoBreeder.h -// Takes two populations and mixes them -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoBreeder_h -#define eoBreeder_h - -//----------------------------------------------------------------------------- - -#include // std::vector -#include -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoOpSelector - -#include - -#include -#include - -using namespace std; - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -template class eoBreeder: public eoTransform -//eoUnaryFunctor&> -{ - public: - /// Default constructor. - eoBreeder( eoOpSelector& _opSel): opSel( _opSel ) {} - - /// Destructor. - virtual ~eoBreeder() {} - - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - size_t orgsize = pop.size(); - - for (unsigned i = 0; i < pop.size(); i++) - { - eoOp* op = opSel.Op(); - switch (op->getType()) - { - case eoOp::unary: - { - eoMonOp* monop = static_cast* >(op); - (*monop)( pop[i] ); - break; - } - case eoOp::binary: - { - eoBinOp* binop = static_cast* >(op); - (*binop)(pop[i], pop[ rng.random(pop.size()) ] ); - break; - } - case eoOp::quadratic: - { - eoQuadraticOp* Qop = static_cast* >(op); - - (*Qop)(pop[i], pop[ rng.random(pop.size()) ] ); - break; - } - case eoOp::general : - { - eoGeneralOp* Gop = static_cast* >(op); - - eoRandomIndiSelector selector; - eoBackInserter inserter; - - (*Gop)(selector.bind(pop, orgsize).bias(i), inserter.bind(pop)); - break; - } - } - } - }; - - /// The class name. - std::string className() const { return "eoBreeder"; } - - private: - eoOpSelector& opSel; - -}; - -//----------------------------------------------------------------------------- - -#endif eoBreeder_h - diff --git a/eo/src/obsolete/eoCopyElite.h b/eo/src/obsolete/eoCopyElite.h deleted file mode 100644 index 19dafcff9..000000000 --- a/eo/src/obsolete/eoCopyElite.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoCopyElite.h -// Base class for elitist-merging classes -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoCopyElite_h -#define eoCopyElite_h - -//----------------------------------------------------------------------------- - -// EO includes -#include // eoPop -#include // eoCopyElite - -/** - * eoCopyElite: Base class for elitist replacement algorithms. - * Merges the old population (first argument), with the new generation - * - * Its signature is exactly - * that of the selection base eoSelect, but its purpose is to merge the - * two populations into one (the second argument). - * Note that the algorithms assume that the second argument denotes the - * next generation. -*/ - -template class eoCopyElite: public eoBinaryFunctor&, eoPop&> -{}; - -/** -Straightforward elitism class, specify the number of individuals to copy -into new geneneration -*/ -template class eoElitism : public eoCopyElite -{ - public : - eoElitism(unsigned _howmany) : howmany(_howmany) {} - - void operator()(const eoPop& _pop, eoPop& offspring) - { - if (howmany == 0) - return; - - if (howmany > _pop.size()) - throw logical_error("Elite larger than population"); - - std::vector result; - _pop.nth_element(howmany, result); - - for (int i = 0; i < result.size(); ++i) - { - offspring.push_back(*result[i]); - } - } - - private : - unsigned howmany; -}; - -/** -No elite -*/ -template class eoNoElitism : public eoElitism -{ - public : - eoNoElitism() : eoElitism(0) {} -} - -/** -Very elitist class, copies entire population into next gen -*/ -template class eoPlus : public eoCopyElite -{ - public : - void operator()(const eoPop& _pop, eoPop& offspring) - { - offspring.reserve(offspring.size() + _pop.size()); - - for (int i = 0; i < _pop.size(); ++i) - { - offspring.push_back(*result[i]); - } - } - - private : - unsigned howmany; -}; - -//----------------------------------------------------------------------------- - -#endif diff --git a/eo/src/obsolete/eoDEA.h b/eo/src/obsolete/eoDEA.h deleted file mode 100644 index bb717ae1b..000000000 --- a/eo/src/obsolete/eoDEA.h +++ /dev/null @@ -1,46 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoDEA.h -// (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoDEA_h -#define _eoDEA_h - -//----------------------------------------------------------------------------- - -#include - -/** eoDEA: Distribution Evolution Algorithm within EO - * - * The abstract class for algorithms that evolve a probability distribution - * on the spaces of populations rather than a population - * - * It IS NOT an eoAlgo, as it evolves a distribution, not a population -*/ - -template class eoDEA: public eoUF&, void> -{ -}; - -#endif - diff --git a/eo/src/obsolete/eoDetTournament.h b/eo/src/obsolete/eoDetTournament.h deleted file mode 100644 index 2bd15b9d3..000000000 --- a/eo/src/obsolete/eoDetTournament.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoDetTournament.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoDetTournament_h -#define eoDetTournament_h - -//----------------------------------------------------------------------------- - -#include // -#include // accumulate - -#include -#include -#include - -//----------------------------------------------------------------------------- -/** eoDetTournament: a selection method that selects ONE individual by - deterministic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - -template class eoDetTournament: public eoSelectOne -{ - public: - /// (Default) Constructor. - eoDetTournament(unsigned _Tsize = 2 ):eoSelectOne(), Tsize(_Tsize) { - // consistency check - if (Tsize < 2) { - std::cout << "Warning, Tournament size should be >= 2\nAdjusted\n"; - Tsize = 2; - } - } - - /// Perform deterministic tournament - virtual const EOT& operator()(const eoPop& pop) - { - return deterministic_tournament(pop, Tsize); - } - - private: - unsigned Tsize; -}; - -//----------------------------------------------------------------------------- - -#endif eoDetTournament_h - diff --git a/eo/src/obsolete/eoDetTournamentIndiSelector.h b/eo/src/obsolete/eoDetTournamentIndiSelector.h deleted file mode 100644 index 75d36c219..000000000 --- a/eo/src/obsolete/eoDetTournamentIndiSelector.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoDetTournamentIndiSelector.h - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoDetTournamentIndiSelector_h -#define eoDetTournamentIndiSelector_h - -#include "eoIndiSelector.h" -#include "utils/selectors.h" - - -/** -\ingroup selectors - * eoDetTournamentIndiSelector: selects children through a deterministic_tournament -*/ -template -class eoDetTournamentIndiSelector : public eoPopIndiSelector -{ - public : - - eoDetTournamentIndiSelector(int _tournamentSize) - : eoPopIndiSelector(), - tournamentSize(_tournamentSize) - {} - - virtual ~eoDetTournamentIndiSelector(void) {} - - const EOT& do_select(void) - { - return *deterministic_tournament(begin(), end(), tournamentSize); - } - - private : - - int tournamentSize; -}; - -#endif diff --git a/eo/src/obsolete/eoDetTournamentInserter.h b/eo/src/obsolete/eoDetTournamentInserter.h deleted file mode 100644 index 9077aece6..000000000 --- a/eo/src/obsolete/eoDetTournamentInserter.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoDetTournamentInserter.h - Concrete steady state inserter. It is initialized with a population and - inserts individuals in the population based on an inverse deterministic - tournament - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoDetTournamentInserter_h -#define eoDetTournamentInserter_h - - -#include -#include - -/** - * eoDetTournamentInserter: Uses an inverse deterministic tournament to figure - * out who gets overridden by the new individual. It resets the fitness of the - * individual. -*/ -template -class eoDetTournamentInserter : public eoSteadyStateInserter -{ -public : - - eoDetTournamentInserter(eoEvalFunc& _eval, unsigned _t_size): - eoSteadyStateInserter(_eval), - t_size(_t_size) - { - if (t_size < 2) - { // warning, error? - t_size = 2; - } - } - - eoInserter& operator()(const EOT& _eot) - { - EOT& eo = inverse_deterministic_tournament(pop(), t_size); - eo = _eot; // overwrite loser of tournament - - eval(eo); // Evaluate after insert - return *this; - } - - std::string className(void) const { return "eoDetTournamentInserter"; } - -private : - unsigned t_size; -}; - -#endif diff --git a/eo/src/obsolete/eoDistance.h b/eo/src/obsolete/eoDistance.h deleted file mode 100644 index 5f3c333e6..000000000 --- a/eo/src/obsolete/eoDistance.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoObject.h - This is the base class for most objects in EO. It basically defines an interf - face for giving names to classes. - - (c) GeNeura Team, 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ -//----------------------------------------------------------------------------- - -#ifndef EODISTANCE_H -#define EODISTANCE_H - -//----------------------------------------------------------------------------- - -using namespace std; - -//----------------------------------------------------------------------------- -// eoDistance -//----------------------------------------------------------------------------- -/** Defines an interface for measuring distances between evolving objects */ -template -class eoDistance { - public: - - /// Default Constructor. - eoDistance() {} - - /// Copy constructor. - eoDistance( const eoDistance& ) {} - - /// Virtual dtor. They are needed in virtual class hierarchies. - virtual ~eoDistance() {} - - - /** Return the distance from the object with this interface to other - object of the same type. - */ - virtual double distance( const EOT& ) const = 0; - - /// Returns classname - virtual std::string className() const { return "eoDistance"; } - -}; - -#endif EOOBJECT_H diff --git a/eo/src/obsolete/eoDup.h b/eo/src/obsolete/eoDup.h deleted file mode 100644 index 67e4a8639..000000000 --- a/eo/src/obsolete/eoDup.h +++ /dev/null @@ -1,70 +0,0 @@ -// eoDup.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoKill.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EODUP_h -#define _EODUP_h - -#include - -#include - -/// Dup or duplicate: duplicates a gene in a chromosome -template -class eoDup: public eoMonOp > { -public: - /// - eoDup( ) - : eoMonOp< EOT >( ){}; - - /// needed virtual dtor - virtual ~eoDup() {}; - - /// - virtual void operator()(eoVariableLength& _eo ) const - { - unsigned pos = rng.random(_eo.size()); - eoVariableLength::iterator it = begin(); - - while (pos--) {++it;} - - _eo.insert(it, 1, *it); - - _eo.invalidate(); - } - - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoDup";}; - //@} -}; - -#endif - diff --git a/eo/src/obsolete/eoES.h b/eo/src/obsolete/eoES.h deleted file mode 100644 index 9f4051f85..000000000 --- a/eo/src/obsolete/eoES.h +++ /dev/null @@ -1,164 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESChrom.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eoESCHROM_H -#define _eoESCHROM_H - -// STL libraries -#include // For std::vector<> -#include -#include -#include // for std::ostream - -// EO includes -#include - -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a std::vector of floating point -values plus a std::vector of sigmas, that are added to them during mutation -*/ -//@{ - -/** -\class eoESValue - -*/ -template -struct eoESValue -{ - T value; - - /** - The gene has a mutate member because this particular gaussian mutation - is paradigmatic for an evolution strategy. - */ - void mutate(double sigma, T minimum = T(), T maximum = T()) - { - value += rng.normal(0.0, sigma); - - if (minimum > value) - value = minimum; - if (value > maximum) - value = maximum; - } -}; - -/** -\class eoESGene eoESGene.h es/eoESGene.h -Each gene in an Evolution Strategies is composed of a value plus an standard -deviation, sigma, used for mutation*/ -template -struct eoESGene : public eoESValue -{ - double sigma; - - eoESGene( double _val = 0, double _sigma = 1.0 ): eoESValue( _val ), sigma( _sigma ) {}; - - /** - The gene has a mutate member because the sigma member implies - that the updating routine should use a normal distribution - */ - void mutate(T minimum, T maximum) - { - mutate(sigma, minimum, maximum); - } -}; - -/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 -bool operator < ( eoESGene _e1, eoESGene _e2 ) { - return _e1.val < _e2.val; -} - -/// Tricky operator to avoid errors in some VC++ systems -bool operator == ( eoESGene _e1, eoESGene _e2 ) { - return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; -} - -/// -std::ostream & operator << ( std::ostream& _s, const eoESGene& _e ) { - _s << _e.val << ", " << _e.sigma << " | "; - return _s; -} - -/// Dummy >> -std::istream & operator >> ( std::istream& _s, const eoESGene& _e ) { - _s >> _e.val; - _s >> _e.sigma; - return _s; -} - - -/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and -Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene -@see eoESGene -*/ -template -class eoESChrom: public eoVector { -public: - /// Basic ctor - eoESChrom( ):eoVector() {}; - - /** Ctor using a couple of random number generators - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called. - @param _rndS another one, for the sigma - */ - eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) - : eoVector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - i->val = _rnd(); - i->sigma = _rndS(); - } - }; - - /// Copy ctor - eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; - - /// Assignment operator - const eoESChrom& operator =( const eoESChrom & _eoes ) { - if ( this != &_eoes ){ - eoVector::operator=( _eoes ); - } - return *this; - } - - /// - ~eoESChrom() {}; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoESChrom";}; - //@} - -}; - -//@} -#endif - diff --git a/eo/src/obsolete/eoESChrom.h b/eo/src/obsolete/eoESChrom.h deleted file mode 100644 index 1ad0bcf41..000000000 --- a/eo/src/obsolete/eoESChrom.h +++ /dev/null @@ -1,164 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESChrom.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - -#ifndef _eoESCHROM_H -#define _eoESCHROM_H - -// STL libraries -#include // For std::vector<> -#include -#include -#include // for std::ostream - -// EO includes -#include - -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a std::vector of floating point -values plus a std::vector of sigmas, that are added to them during mutation -*/ -//@{ - -/** -\class eoESValue - -*/ -template -struct eoESValue -{ - T value; - - /** - The gene has a mutate member because this particular gaussian mutation - is paradigmatic for an evolution strategy. - */ - void mutate(double sigma, T minimum, T maximum) - { - value += rng.normal(0.0, sigma); - - if (minimum > value) - value = minimum; - if (value > maximum) - value = maximum; - } -}; - -/** -\class eoESGene eoESGene.h es/eoESGene.h -Each gene in an Evolution Strategies is composed of a value plus an standard -deviation, sigma, used for mutation*/ -template -struct eoESGene : public eoESValue -{ - double sigma; - - eoESGene( double _val = 0, double _sigma = 1.0 ): eoESValue( _val ), sigma( _sigma ) {}; - - /** - The gene has a mutate member because the sigma member implies - that the updating routine should use a normal distribution - */ - void mutate(T minimum, T maximum) - { - mutate(sigma, minimum, maximum); - } -}; - -/// Tricky operator to avoid errors in some VC++ systems, namely VC 5.0 SP3 -bool operator < ( eoESGene _e1, eoESGene _e2 ) { - return _e1.val < _e2.val; -} - -/// Tricky operator to avoid errors in some VC++ systems -bool operator == ( eoESGene _e1, eoESGene _e2 ) { - return ( _e1.val == _e2.val ) && ( _e1.sigma == _e2.sigma ) ; -} - -/// -std::ostream & operator << ( std::ostream& _s, const eoESGene& _e ) { - _s << _e.val << ", " << _e.sigma << " | "; - return _s; -} - -/// Dummy >> -std::istream & operator >> ( std::istream& _s, const eoESGene& _e ) { - _s >> _e.val; - _s >> _e.sigma; - return _s; -} - - -/** Basic chromosome for evolution strategies (ES), as defined by Rechenberg and -Schwefel. Each chromosomes is composed of "genes"; each one of then is an eoESGene -@see eoESGene -*/ -template -class eoESChrom: public eoVector { -public: - /// Basic ctor - eoESChrom( ):eoVector() {}; - - /** Ctor using a couple of random number generators - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called. - @param _rndS another one, for the sigma - */ - eoESChrom( unsigned _size, eoRnd& _rnd, eoRnd& _rndS ) - : eoVector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - i->val = _rnd(); - i->sigma = _rndS(); - } - }; - - /// Copy ctor - eoESChrom( const eoESChrom& _eoes): eoVector( _eoes ) {}; - - /// Assignment operator - const eoESChrom& operator =( const eoESChrom & _eoes ) { - if ( this != &_eoes ){ - eoVector::operator=( _eoes ); - } - return *this; - } - - /// - ~eoESChrom() {}; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoESChrom";}; - //@} - -}; - -//@} -#endif - diff --git a/eo/src/obsolete/eoESFullChrom.h b/eo/src/obsolete/eoESFullChrom.h deleted file mode 100644 index e00914b5d..000000000 --- a/eo/src/obsolete/eoESFullChrom.h +++ /dev/null @@ -1,267 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESInd.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef _EOESFULLCHROM_H -#define _EOESFULLCHROM_H - -// STL libraries -#include // For std::vector<> -#include -#include -#include // for std::ostream - -// EO includes -#include -#include -/**@name Chromosomes for evolution strategies -Each chromosome in an evolution strategies is composed of a std::vector of floating point -values plus a std::vector of sigmas, that are added to them during mutation and a std::vector of correlations -*/ -//@{ - - -/**@name individuals for evolution strategies -MS- 22/10/99 -Each individual in an evolution strategy is composed of - a std::vector of floating point values - a std::vector of std deviations - a std::vector of rotation angles (for correlated mutations) - -These individuals CANNOT BE IMPLEMENTED as std::vectors of anything - at least in the case of correlated mutations -*/ -//@{ - -template -class eoESFullChrom : public eoVector { - public: -/// constructor - eoESFullChrom( unsigned _num_genes = 1, - unsigned _num_sigma = 1, unsigned _num_correl = 0, - bool _verbose = false, - double _ObjMin = 0, double _ObjMax = 1, - double _StdDevInit = 0.3 ): - eoVector(_num_genes), - // ObjVar( _num_genes ), now an eoVector - StdDev( _num_sigma ), - CorCff( _num_correl ), - verbose( _verbose ), - ObjMin( _ObjMin ), - ObjMax(_ObjMax ), - StdDevInit( _StdDevInit ) - { // check consistency - } - - - /* And now the useful constructor: from a parser (should be in the - factory, if such a thing exists one day for eoESFullChrom - */ - eoESFullChrom(eoParser & parser) : StdDev(0), CorCff(0) { - parser.AddTitle("Description of ES individuals"); - int num_genes, num_sigma; - bool correlated_mutations; - try { - num_genes = parser.getInt("-Io", "--NbObjVar", "2", - "Number of Object Variables" ); - num_sigma = parser.getInt("-Is", "--NbSigma", "1", - "Number of Standard Deviations" ); - correlated_mutations = parser.getBool("-Ic", "--Correlated", - "Correlated mutation?" ); - ObjMin = parser.getFloat("-Im", "--min", "0", - "Minimum value for object variables" ); - ObjMax = parser.getFloat("-IM", "--max", "1", - "Maximum value for object variables" ); - StdDevInit = parser.getFloat("-II", "--SigmaInit", "0.3", - "Initial value for std. dev. (scaled by range)" ); - verbose = parser.getBool("-Iv", "--verbose", - "Verbose std::listing of ES individuals (mutation parameters"); - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - - // consistency tests - if (! num_sigma) { // no std dev??? EXCEPTION - throw invalid_argument( "No standard deviation: choose another representation please" ); - } - if (num_sigma > num_genes) { - std::cout << "WARNING, Number of Standard Deviations > Number of Object Variables\nAdjusted!\n"; - num_sigma = num_genes; - // modify the Param value - so .status is OK - std::ostrstream sloc; - sloc << num_genes; - parser.setParamValue("--NbSigma", sloc.str()); - } - // adjust the sizes!!! - resize(num_genes); - if (num_sigma) - StdDev.resize(num_sigma); - if (correlated_mutations) { - if (num_sigma < num_genes) { - std::cout << "WARNING less Std Dev. than number of variables + Correlated mutations\n"; - std::cout << "Though possible, this is a strange setting" << std::endl; - } - // nb of rotation angles: N*(N-1)/2 (in general!) - CorCff.resize ( (2*num_genes - num_sigma)*(num_sigma - 1) / 2 ); - } - }; - - - /// Operator = - const eoESFullChrom& operator = ( const eoESFullChrom& _eo ) { - if ( this != &_eo ) { - // Change EO part - eoVector::operator = (_eo); - - // Change this part - // ObjVar = _eo.ObjVar; - StdDev = _eo.StdDev; - CorCff = _eo.CorCff; - verbose = _eo.verbose; - ObjMin = _eo.ObjMin; - ObjMax = _eo.ObjMax; - StdDevInit = _eo.StdDevInit; - } - return *this; - } - - /// destructor - virtual ~eoESFullChrom() {} - - /// - double getStdDev( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading StdDev"); - return StdDev[ _i ]; - } - - /// - void setStdDev( unsigned _i, double _val ) { - if ( _i < length() ) { - StdDev[_i] = _val; - } else - throw out_of_range( "out_of_range when writing StdDev"); - } - - /// - double getCorCff( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading CorCff"); - return CorCff[ _i ]; - } - - /// - void setCorCff( unsigned _i, double _val ) { - if ( _i < length() ) { - CorCff[_i] = _val; - } else - throw out_of_range( "out_of_range when writing CorCff"); - } - - /// - void insertGene( unsigned _i, double _val ) { - throw FixedLengthChromosome(); - }; - - /// - void deleteGene( unsigned _i ) { - throw FixedLengthChromosome(); - }; - - /// - unsigned length() const { return size();}/* formerly ObjVar.size() */ - unsigned StdDevLength() const { return StdDev.size();} - unsigned CorCffLength() const { return CorCff.size();} - - - /** Print itself: inherited from eoObject implementation. - Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the std::ostream in which things are written*/ - virtual void printOn( std::ostream& _s ) const{ - copy( begin(), end(), std::ostream_iterator( _s, " ") ); - // The formatting instructinos shoudl be left to the caller - // _s << "\n"; - if (verbose) { - _s << "\n\tStd Dev. " ; - copy( StdDev.begin(), StdDev.end(), std::ostream_iterator( _s, " ") ); - if (CorCff.size()) { - _s << "\n\t"; - copy( CorCff.begin(), CorCff.end(), std::ostream_iterator( _s, " ") ); - } - } - }; - - /** This std::exception should be thrown when trying to insert or delete a gene - in a fixed length chromosome - */ - class FixedLengthChromosome : public std::exception { - - public: - /** - * Constructor - */ - FixedLengthChromosome() - : std::exception() { }; - - ~FixedLengthChromosome() {}; - }; - - // accessors - double getObjMin() const {return ObjMin;} - double getObjMax() const {return ObjMax;} - double getStdDevInit () const {return StdDevInit;} - - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoESFullChrom";}; - -private: - // std::vector ObjVar; /* object variable std::vector */ -// or shoudl the class be subclass of EOVector ??? - - std::vector StdDev; /* standard deviation std::vector */ - std::vector CorCff; /* correlation coefficient std::vector */ - - bool verbose; /* Print std deviations or not */ - - /** the range is used for mutation AND random initialization, - * while the StdDevInit is used only for random initialization - * this in a little inconsistent! - */ - double ObjMin, ObjMax; /* Range for Object variables */ - double StdDevInit; /* Initial value of Standard Deviations */ - -}; - - - - -#endif - - diff --git a/eo/src/obsolete/eoESFullMut.h b/eo/src/obsolete/eoESFullMut.h deleted file mode 100644 index 9d967c7af..000000000 --- a/eo/src/obsolete/eoESFullMut.h +++ /dev/null @@ -1,261 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoESMute.h : ES mutation -// (c) Maarten Keijzer 2000 & GeNeura Team, 1998 for the EO part -// Th. Baeck 1994 and EEAAX 1999 for the ES part -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - marc.schoenauer@polytechnique.fr - http://eeaax.cmap.polytchnique.fr/ - */ -//----------------------------------------------------------------------------- - - -#ifndef _EOESMUT_H -#define _EOESMUT_H - -#include -#include -#include // for exp - -#include -#include -#include - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795 -#endif - -/** ES-style mutation in the large: Obviously, valid only for eoES* - - It is currently valid for three types of ES chromosomes: - - eoEsSimple: only 1 std deviation - eoEsStdev: as many standard deviations as object variables - eoEsFull: The whole guacemole: correlations, stdevs and object variables - - Each of these three variant has it's own operator() in eoEsMutate -*/ - -template -class eoESMutate: public eoMonOp< EOT > { -public: - - typedef EOT::Fitness FitT; - - /** Initialization - parameters: - - @param _init proxy class for initializating the three parameters eoEsMutate needs - @param _bounds the bounds for the objective variables - */ - eoESMutate(eoESMutationInit& _init, eoESObjectiveBounds& _bounds) : bounds(_bounds) - { - unsigned size = bounds.chromSize(); - - if (eoEsInfo::single_stdev) - { - TauLcl = _init.TauLcl(); - TauLcl /= sqrt((double) size); - } - else - { - TauLcl = _init.TauLcl(); - TauGlb = _init.TauGlb(); - - // renormalization - TauLcl /= sqrt( 2.0 * sqrt( (double)size ) ); - TauGlb /= sqrt( 2.0 * ( (double) size ) ); - - if (eoEsInfo::has_correlation) - { // Correlated Mutations - TauBeta = _init.TauBeta(); - } - } - } - - /// needed virtual dtor - virtual ~eoESMutate() {}; - - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoESMutate";}; - - /** - Mutate eoEsSimple - */ - virtual void operator()( eoEsSimple& _eo) const - { - _eo.stdev *= exp(TauLcl * rng.normal()); - - if (_eo.stdev < eoEsInfo::stdev_eps) - _eo.stdev = eoEsInfo::stdev_eps; - - // now apply to all - - for (unsigned i = 0; i < _eo.size(); ++i) - { - _eo[i] += _eo.stdev * rng.normal(); - } - - keepInBounds(_eo); - } - - /// mutations - standard and correlated - // ========= - /* - * Standard mutation of object variables and standard - * deviations in ESs. - * If there are fewer different standard deviations available - * than the dimension of the objective function requires, the - * last standard deviation is responsible for ALL remaining - * object variables. - * Schwefel 1977: Numerische Optimierung von Computer-Modellen - * mittels der Evolutionsstrategie, pp. 165 ff. - */ - - virtual void operator()( eoESStdev& _eo ) const - { - double global = exp(TauGlb * rng.normal()); - for (unsigned i = 0; i < _eo.size(); i++) - { - double stdev = _eo.stdevs[i]; - stdev *= global * exp(TauLcl * rng.normal()); - - if (stdev < eoEsInfo::stdev_eps) - stdev = eoEsInfo::stdev_eps; - - _eo.stdevs[i] = stdev; - _eo[i] += stdev * rng.normal(); - } - - keepInBounds(_eo); - } - - /* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ - - // Code from Thomas Baeck - - virtual void operator()( eoEsFull & _eo ) const - { - - /* - * First: mutate standard deviations (as above). - */ - - double global = exp(TauGlb * rng.normal()); - for (unsigned i = 0; i < _eo.size(); i++) - { - double stdev = _eo.stdevs[i]; - stdev *= global * exp(TauLcl * rng.normal()); - - if (stdev < eoEsInfo::stdev_eps) - stdev = eoEsInfo::stdev_eps; - - _eo.stdevs[i] = stdev; - } - - - /* - * Mutate rotation angles. - */ - - for (i = 0; i < _eo.correlations.size(); i++) - { - _eo.correlations[i] += TauBeta * rng.normal(); - if ( fabs(_eo.correlations[i]) > M_PI ) - { - _eo.correlations[i] -= M_PI * (int) (_eo.correlations[i]/M_PI) ; - } - } - - /* - * Perform correlated mutations. - */ - unsigned i,k; - - std::vector VarStp(_eo.size()); - for (i = 0; i < _eo.size(); i++) - VarStp[i] = _eo.stdevs[i] * rng.normal(); - - unsigned nq = _eo.correlations.size() - 1; - - for (k = 0; k < _eo.size()-1; k++) - { - n1 = _eo.size() - k - 1; - n2 = _eo.size() - 1; - - for (i = 0; i < k; i++) - { - d1 = VarStp[n1]; - d2 = VarStp[n2]; - S = sin( _eo.correlations[nq] ); - C = cos( _eo.correlations[nq] ); - VarStp[n2] = d1 * S + d2 * C; - VarStp[n1] = d1 * C - d2 * S; - n2--; - nq--; - } - } - - for (i = 0; i < _eo.size(); i++) - _eo[i] += VarStp[i]; - - keepInBounds(_eo); - } - - void keepInBounds(EOT& _eo) const - { - for (unsigned i = 0; i < _eo.size(); ++i) - { - if (_eo[i] < bounds.minimum(i)) - _eo[i] = bounds.minimum(i); - else if (_eo[i] > bounds.maximum(i)) - _eo[i] = bounds.maximum(i); - } - } - - private : - // the data - //========= - double TauLcl; /* Local factor for mutation of std deviations */ - double TauGlb; /* Global factor for mutation of std deviations */ - double TauBeta; /* Factor for mutation of correlation parameters */ - - eoESObjectiveBounds& bounds; -}; - -/* - * Correlated mutations in ESs, according to the following - * sources: - * H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80 - * p. 43, 1980 - * G. Rudolph: Globale Optimierung mit parallelen Evolutions- - * strategien, Diploma Thesis, University of Dortmund, 1990 - */ - -#endif - diff --git a/eo/src/obsolete/eoEsObjectiveBounds.h b/eo/src/obsolete/eoEsObjectiveBounds.h deleted file mode 100644 index 4a25aa30b..000000000 --- a/eo/src/obsolete/eoEsObjectiveBounds.h +++ /dev/null @@ -1,81 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEsObjectiveBounds.h -// (c) Maarten Keijzer 2000, GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoEsObjectiveBounds_h -#define _eoEsObjectiveBounds_h - -/** -\defgroup EvolutionStrategies - - Various classes for the initialization and mutation of real valued std::vectors. - - Supports simple mutations and various more adaptable mutations, including - correlated mutations. - -*/ - - -/** -\class eoEsObjectiveBounds eoEsObjectiveBounds.h es/eoEsObjectiveBounds.h -\ingroup EvolutionStrategies - - Defines the minima and maxima of the object variables. Needed by eoEsChromInit - and eoEsMutate - - @see eoEsChromInit eoEsMutate -*/ -class eoEsObjectiveBounds -{ - public : - - /** - Objective bounds for a global minimum and maximum - */ - eoEsObjectiveBounds(int _nGenes, double _min, double _max) : repMinimum(_nGenes), repMaximum(_nGenes) - { - std::fill(repMinimum.begin(), repMinimum.end(), _min); - std::fill(repMaximum.begin(), repMaximum.end(), _max); - } - - /** - Objective bounds for a per gene minimum and maximum - */ - eoEsObjectiveBounds(const std::vector& _min, const std::vector& _max) - : repMinimum(_min), repMaximum(_max) {} - - typedef double doubleype; - - double minimum(size_t i) { return repMinimum[i]; } - double maximum(size_t i) { return repMaximum[i]; } - - unsigned chromSize(void) const { return repMinimum.size(); } - - private : - std::vector repMinimum; - std::vector repMaximum; -}; - -#endif diff --git a/eo/src/obsolete/eoEvalFuncPtrCnt.h b/eo/src/obsolete/eoEvalFuncPtrCnt.h deleted file mode 100644 index ffa998590..000000000 --- a/eo/src/obsolete/eoEvalFuncPtrCnt.h +++ /dev/null @@ -1,62 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoEvalFuncPtrCnt.h - Same as eoEvalFuncPtr, but counts the number of evaluations - - (c) GeNeura Team, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOEVALFUNCPTRCNT_H -#define EOEVALFUNCPTRCNT_H - -#include - -/** EOEvalFuncCntPtr: This class - * takes an existing function pointer and converts it into a evaluation - * function class. That way, old style C or C++ functions can be adapted to EO - * function classes. - */ -template< class EOT > -struct eoEvalFuncPtrCnt: public eoEvalFuncPtr { - - /** Applies the function to the chromosome and sets the fitness of the - Chrom. Thus, the evaluation function need not be worried about that. - @param _eval pointer to the evaluation function, takes a EOT as an - argument and returns the fitness - @return the evaluated fitness for that object. - */ - eoEvalFuncPtrCnt( EOFitT (* _eval)( const EOT& ) ) - : eoEvalFuncPtr( _eval ), numOfEvaluations( 0 ) {}; - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) const { - eoEvalFuncPtr::operator()( _eo ); - numOfEvaluations++; - }; - - /// - unsigned getNumOfEvaluations() const { return numOfEvaluations; }; - -private: - mutable unsigned numOfEvaluations; -}; - -#endif diff --git a/eo/src/obsolete/eoEvolutionStrategy.h b/eo/src/obsolete/eoEvolutionStrategy.h deleted file mode 100644 index b863ae8a4..000000000 --- a/eo/src/obsolete/eoEvolutionStrategy.h +++ /dev/null @@ -1,101 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoEvolutionStrategy.h -// (c) Maarten Keijzer 2000, GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoEvolutionStrategy_h -#define _eoEvolutionStrategy_h - -//----------------------------------------------------------------------------- - -#include -#include -/** eoEvolutionStrategy: -*/ - -template -class eoEvolutionStrategy: public eoAlgo -{ - public: - struct plus_strategy{}; - struct comma_strategy{}; - - eoEvolutionStrategy( - eoContinue& _continuator, - eoEvalFunc& _eval, - eoGOpSelector& _opSel, - float _lambdaRate, - comma_strategy) - : selectPerc(randomSelect, _lambdaRate), - transform(_opSel), - easyEA(_continuator, _eval, selectPerc, transform, noElitism, truncate) - {} - - eoEvolutionStrategy( - eoContinue& _continuator, - eoEvalFunc& _eval, - eoGOpSelector& _opSel, - float _lambdaRate, - plus_strategy) - : selectPerc(randomSelect, _lambdaRate), - transform(_opSel), - easyEA(_continuator, _eval, selectPerc, transform, plus, truncate) - {} - - - /// Apply a few generation of evolution to the population. - virtual void operator()(eoPop& _pop) - { - easyEA(_pop); - } - - private: - - eoPlus plus; - eoNoElitism noElitism; - eoTruncate truncate; - eoRandomSelect randomSelect; - eoSelectPerc selectPerc; - eoInplaceTransform2 transform; - - /// easyEA is contained rather than a base because of member initialization order! - eoEasyEA easyEA; -}; - -template -eoEvolutionStrategy make_es(eoContinue& _continuator, - eoEvalFunc& _eval, - eoGOpSelector& _opSel, - float _lambdaRate, - bool _comma) - -{ - if (_comma) - return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::comma_strategy()); - //else - return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::plus_strategy()); -} - -//----------------------------------------------------------------------------- - -#endif eoSelectTransformReduce_h - diff --git a/eo/src/obsolete/eoFitTerm.h b/eo/src/obsolete/eoFitTerm.h deleted file mode 100644 index 4dded6092..000000000 --- a/eo/src/obsolete/eoFitTerm.h +++ /dev/null @@ -1,59 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenTerm.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOFITTERM_H -#define _EOFITTERM_H - -#include - - -/** -Fitness continuation: - - Continues until the maximum fitness level is reached. -*/ -template< class EOT> -class eoFitContinue: public eoContinue { -public: - - /// Define Fitness - typedef typename EOT::Fitness FitnessType; - - /// Ctor - eoFitContinue( const FitnessType _maximum) - : eoContinuator (), maximum( _maximum ) {}; - - /** Returns false when a fitness criterium is - * reached, assumes sorted population */ - virtual bool operator() ( const eoPop& _vEO ) - { - return (bestFitness < maximum); - } - -private: - FitnessType maximum; -}; - -#endif - diff --git a/eo/src/obsolete/eoFitness.h b/eo/src/obsolete/eoFitness.h deleted file mode 100644 index c1e03fc33..000000000 --- a/eo/src/obsolete/eoFitness.h +++ /dev/null @@ -1,57 +0,0 @@ -// eoFitness.h -//----------------------------------------------------------------------------- -// eoFitness.cpp -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOFITNESS_H -#define EOFITNESS_H - -//----------------------------------------------------------------------------- -/** -\deprecated This class will dissapear in time, use eoScalarFitness instead -*/ -class eoFitness: public eoPersistent -{ - public: - virtual operator float() const = 0; - - virtual bool operator<(const eoFitness& other) const = 0; - - virtual bool operator>(const eoFitness& other) const - { - return !(*this < other || *this == other); - } - - virtual bool operator==(const eoFitness& other) const - { - return !(other < *this || *this < other); - } - - virtual bool operator!=(const eoFitness& other) const - { - return other < *this || *this < other; - } -}; - -//----------------------------------------------------------------------------- - -#endif EOFITNESS_H - diff --git a/eo/src/obsolete/eoGOpBreeder.h b/eo/src/obsolete/eoGOpBreeder.h deleted file mode 100644 index 0b8c76f65..000000000 --- a/eo/src/obsolete/eoGOpBreeder.h +++ /dev/null @@ -1,62 +0,0 @@ -//----------------------------------------------------------------------------- -// eoBreeder.h -//----------------------------------------------------------------------------- - -#ifndef eoGopBreeder_h -#define eoGopBreeder_h - -//----------------------------------------------------------------------------- - -/***************************************************************************** - * eoBreeder: transforms a population using genetic operators. * - * For every operator there is a rated to be applyed. * - *****************************************************************************/ - -#include -#include -#include -#include -#include - -/** - Base class for breeders using generalized operators, I'm not sure if we - will maintain the generalized operators in their current form, so - it might change. -*/ -template -class eoGOpBreeder: public eoUF&, void> -{ - public: - /// Default constructor. - eoGOpBreeder( eoGOpSelector& _opSel, - eoSelectOneIndiSelector& _selector) - : opSel( _opSel ), selector(_selector) - {} - - /** - * Enlarges the population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& _pop) - { - unsigned size = _pop.size(); - - for (unsigned i = 0; i < size; i++) - { // and the one liner - opSel.selectOp()(selector.bind(_pop,size).bias(i), inserter.bind(_pop)); - } - } - - /// The class name. - std::string className() const { return "eoGOpBreeder"; } - - private: - eoGOpSelector& opSel; - eoSelectOneIndiSelector& selector; - - // the inserter can be local as there's no point in changing it from the outside - eoBackInserter inserter; -}; - -#endif eoBreeder_h - diff --git a/eo/src/obsolete/eoGOpSelector.h b/eo/src/obsolete/eoGOpSelector.h deleted file mode 100644 index 279d709b7..000000000 --- a/eo/src/obsolete/eoGOpSelector.h +++ /dev/null @@ -1,181 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoGOpSelector.h - Base class for generalized (n-inputs, n-outputs) operator selectors. - Includes code and variables that contain operators and rates. - Also included eoProportionalGOpSelector and eoSequentialGOpSelector, that offer - a few concrete implementations. - - (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoGOpSelector_h -#define eoGOpSelector_h - -//----------------------------------------------------------------------------- - -#include -#include "eoOpSelector.h" -#include "eoWrappedOps.h" // for eoCombinedOp -#include - -using namespace std; - -/** Base class for alternative selectors, which use the generalized operator - interface. eoGOpBreeders expects this class */ -template -class eoGOpSelector: public eoOpSelector, public std::vector*> -{ -public: - - typedef eoOpSelector::ID ID; - - /// Dtor - virtual ~eoGOpSelector() { - for ( std::list< eoGeneralOp* >::iterator i= ownOpList.begin(); - i != ownOpList.end(); i++ ) { - delete *i; - } - } - - /* - Add any kind of operator to the operator mix, - @param _op operator, one of eoMonOp, eoBinOp, eoQuadraticOp or eoGeneralOp - @param _rate the rate at which it should be applied, it should be a probability - - */ - virtual ID addOp( eoOp& _op, float _rate ); - // implementation can be found below - - /** Retrieve the operator using its integer handle - @param _id The id number. Should be a valid id, or an std::exception - will be thrown - @return a reference of the operator corresponding to that id. - */ - virtual eoOp& getOp( ID _id ) - { - return *operator[](_id); - } - - /// - virtual void deleteOp( ID _id ); - // implemented below - - /// - virtual eoOp* Op() - { - return &selectOp(); - } - - /// Select an operator from the operators present here - virtual eoGeneralOp& selectOp() = 0; - - /// - virtual std::string className() const { return "eoGOpSelector"; }; - - /// - void printOn(std::ostream& _os) const {} - // _os << className().c_str() << std::endl; - // for ( unsigned i=0; i!= rates.size(); i++ ) { - // _os << *(operator[](i)) << "\t" << rates[i] << std::endl; - // } - //} - - - const std::vector& getRates(void) const { return rates; } - -private : - std::vector rates; - std::list< eoGeneralOp* > ownOpList; -}; - -/* Implementation of longish functions defined above */ - -template -inline eoOpSelector::ID eoGOpSelector::addOp( eoOp& _op, - float _arg ) -{ - eoGeneralOp* op; - - if (_op.getType() == eoOp::general) - { - op = static_cast*>(&_op); - } - else - { - // if it's not a general op, it's a "old" op; create a wrapped op from it - // and keep it on a std::list to delete them afterwards - // will use auto_ptr when they're readily available - - switch(_op.getType()) - { - case eoOp::unary : - op= new eoWrappedMonOp(static_cast&>(_op)); - break; - case eoOp::binary : - op = new eoWrappedBinOp(static_cast&>(_op)); - break; - case eoOp::quadratic : - op = new eoWrappedQuadraticOp(static_cast&>(_op)); - break; - case eoOp::general : break; // cannot happen, but gcc issued a warning - } - ownOpList.push_back( op ); - } - - // Now 'op' is a general operator, either because '_op' was one or - // because we wrapped it in an appropriate wrapper in the code above. - - typename eoGOpSelector::iterator result = find(begin(), end(), (eoGeneralOp*) 0); // search for nullpointer - - if (result == end()) - { - push_back(op); - rates.push_back(_arg); - return size(); - } - // else - - *result = op; - ID id = result - begin(); - rates[id] = _arg; - return id; -} - -template -inline void eoGOpSelector::deleteOp( ID _id ) -{ - eoGeneralOp* op = operator[](_id); - - operator[](_id) = 0; - rates[_id] = 0.0; - - // check opstd::list and clear it there too. - - std::list< eoGeneralOp* >::iterator it = find(ownOpList.begin(), ownOpList.end(), op); - - if(it != ownOpList.end()) - { - ownOpList.erase(it); - } -} - -#endif eoGOpSelector_h - diff --git a/eo/src/obsolete/eoGenTerm.h b/eo/src/obsolete/eoGenTerm.h deleted file mode 100644 index 615ab90b2..000000000 --- a/eo/src/obsolete/eoGenTerm.h +++ /dev/null @@ -1,68 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenTerm.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOGENTERM_H -#define _EOGENTERM_H - -#include - -/** Generational continuator: continues until a number of generations is reached -*/ -template< class EOT> -class eoGenContinue: public eoContinue { -public: - - /// Ctors/dtors - eoGenContinue( unsigned _totalGens) - : repTotalGenerations( _totalGens ), - thisGeneration(0){}; - - /** Returns false when a certain number of generations is - * reached */ - virtual bool operator() ( const eoPop& _vEO ) { - thisGeneration++; - // std::cout << " [" << thisGeneration << "] "; - return (thisGeneration < repTotalGenerations) ; // for the postincrement - } - - /** Sets the number of generations to reach - and sets the current generation to 0 (the begin)*/ - virtual void totalGenerations( unsigned _tg ) { - repTotalGenerations = _tg; - // thisGeneration = 0; - }; - - /** Returns the number of generations to reach*/ - virtual unsigned totalGenerations( ) { - return repTotalGenerations; - }; - - std::string className(void) const { return "eoGenTerm"; } - -private: - unsigned repTotalGenerations, thisGeneration; -}; - -#endif - diff --git a/eo/src/obsolete/eoGeneration.h b/eo/src/obsolete/eoGeneration.h deleted file mode 100644 index 282de928b..000000000 --- a/eo/src/obsolete/eoGeneration.h +++ /dev/null @@ -1,85 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoOp.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoGeneration_h -#define eoGeneration_h - -//----------------------------------------------------------------------------- -#include // eoPop -#include -#include // eoSelect, eoTranform, eoMerge - -//----------------------------------------------------------------------------- - -/** eoGeneration - * Single step of a evolutionary algorithm. Applies selection, then genetic - * operators, replaces using a replacement policy, and finally evaluates the - * new ones */ -template class eoGeneration: public eoAlgo -{ - public: - /// Constructor. - eoGeneration(eoSelect& _select, - eoBreeder& _breeder, - eoBinPopOp& _replace, - eoEvalFunc& _evaluator): - select(_select), transform(_transform), - replace(_replace), evaluator( _evaluator) {}; - - /// Copy Constructor. - eoGeneration(eoGeneration& _gen): - select(_gen.select), transform(_gen.transform), - replace(_gen.replace), evaluator( _gen.evaluator ) {}; - - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - eoPop breeders; - try { - select(pop, breeders); - transform(breeders); - eoPop::iterator i; - // Can't use foreach here since foreach takes the - // parameter by reference - for ( i = breeders.begin(); i != breeders.end(); i++) - evaluator(*i); - replace(breeders, pop); - } catch ( std::exception& e ) { - throw std::runtime_error( e.what() ); - } - } - - /// Class name. - std::string className() const { return "eoGeneration"; } - - private: - eoBinPopOp& select; - eoMonPopOp& transform; - eoBinPopOp& replace; - eoEvalFunc& evaluator; -}; - -//----------------------------------------------------------------------------- - -#endif eoGeneration_h diff --git a/eo/src/obsolete/eoGenericBinOp.h b/eo/src/obsolete/eoGenericBinOp.h deleted file mode 100644 index 7c06546a6..000000000 --- a/eo/src/obsolete/eoGenericBinOp.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenericBinOp.h -// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoGenericBinOp_h -#define _eoGenericBinOp_h - -#include - -/** Contains base classes for generic binary operators for eoFixedLength - and eoVariableLength (They also derive from the eoOp) as well as - the corresponding converters to actual Ops. -*/ - -/** eoGenericBinOp is the generic binary operator: -it takes two arguments, modifies the first one, and returns a boolean -indicating if the argument has actually been modified -*/ - -template -class eoGenericBinOp: public eoOp, public eoBF -{ -public: - /// Ctor - eoGenericBinOp() - : eoOp( eoOp::binary ) {}; - virtual std::string className() const {return "eoGenericBinOp";}; -}; - -/** Converter from eoGenericBinOp to eoBinOp - the only thinig to do is to transform the boolean into invalidation -*/ - -template -class eoGeneric2TrueBinOp: public eoBinOp -{ -public: - /// Ctor - eoGeneric2TrueBinOp(eoGenericBinOp & _binOp) - : binOp( _binOp ) {}; - virtual std::string className() const {return "eoGeneric2TrueBinOp";} - - virtual void operator()(EOT & _eo1, const EOT & _eo2) - { - if (binOp(_eo1, _eo2)) - _eo1.invalidate(); - } - - private: - eoGenericBinOp & binOp; -}; - -#endif diff --git a/eo/src/obsolete/eoGenericMonOp.h b/eo/src/obsolete/eoGenericMonOp.h deleted file mode 100644 index f090d1fa5..000000000 --- a/eo/src/obsolete/eoGenericMonOp.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenericMonOp.h -// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoGenericMonOp_h -#define _eoGenericMonOp_h - -#include - -/** Contains base classes for generic operators for eoFixedLength - and eoVariableLength (They also derive from the eoOp) as well as - the corresponding converters to actual Ops. -*/ - -/** eoGenericMonOp is the generic unary operator: -it takes one argument, and returns a boolean indicating if the argument -has been modified -*/ - -template -class eoGenericMonOp: public eoOp, public eoUF -{ -public: - /// Ctor - eoGenericMonOp() - : eoOp( eoOp::unary ) {}; - virtual std::string className() const {return "eoGenericMonOp";}; -}; - -/** COnverter from eoGenericMonOp to eoMonOp - the only thinig to do is to transform the boolean into invalidation -*/ - -template -class eoGeneric2TrueMonOp: public eoMonOp -{ -public: - /// Ctor - eoGeneric2TrueMonOp(eoGenericMonOp & _monOp) - : monOp( _monOp ) {}; - virtual std::string className() const {return "eoGeneric2trueMonOp";} - - virtual void operator()(EOT & _eo) - { - if (monOp(_eo)) - _eo.invalidate(); - } - - private: - eoGenericMonOp & monOp; -}; - -#endif diff --git a/eo/src/obsolete/eoGenericQuadOp.h b/eo/src/obsolete/eoGenericQuadOp.h deleted file mode 100644 index 35455cfbd..000000000 --- a/eo/src/obsolete/eoGenericQuadOp.h +++ /dev/null @@ -1,83 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoGenericQuadOp.h -// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoGenericQuadOp_h -#define _eoGenericQuadOp_h - -#include - -/** Contains base classes for generic quadratic operators for eoFixedLength - and eoVariableLength (They also derive from the eoOp) as well as - the corresponding converters to actual Ops. -*/ - -/** eoGenericQuadOp is the generic quadratic operator: -it takes two arguments, modifies the first one, and returns a boolean -indicating if the arguments have actually been modified - -WARNING: even if only 1 argument is modified, it should return true, - and both fitnesses will be invalidated. It is assumed that - quadratic operators do some exchange of genetic material, so - if one is modified, the other is, too! -*/ - -template -class eoGenericQuadOp: public eoOp, public eoBF -{ -public: - /// Ctor - eoGenericQuadOp() - : eoOp( eoOp::quadratic ) {}; - virtual std::string className() const {return "eoGenericQuadOp";}; -}; - -/** Converter from eoGenericQuadOp to eoQuadOp - the only thinig to do is to transform the boolean into invalidation -*/ - -template -class eoGeneric2TrueQuadOp: public eoQuadOp -{ -public: - /// Ctor - eoGeneric2TrueQuadOp(eoGenericQuadOp & _quadOp) - : quadOp( _quadOp ) {}; - virtual std::string className() const {return "eoGeneric2TrueQuadOp";} - - virtual void operator()(EOT & _eo1, EOT & _eo2) - { - if (quadOp(_eo1, _eo2)) - { - _eo1.invalidate(); - _eo2.invalidate(); - } - } - - private: - eoGenericQuadOp & quadOp; -}; - -#endif diff --git a/eo/src/obsolete/eoID.h b/eo/src/obsolete/eoID.h deleted file mode 100644 index 5763b11ba..000000000 --- a/eo/src/obsolete/eoID.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoID.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOID_H -#define EOID_H - -//----------------------------------------------------------------------------- - -#include // std::istream, std::ostream -#include // for std::string - -using namespace std; - -//----------------------------------------------------------------------------- -// eoID -//----------------------------------------------------------------------------- - -/** eoID is a template class that adds an ID to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor -and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, -printOn, readFrom, that is why we don´t subclass eoObject to avoid multiple inheritance.\\ -IDs can be used to count objects of a a kind, or track them, or whatever. -@see eoObject -*/ -template -class eoID: public Object -{ - public: - /// Main ctor from an already built Object. - eoID( const Object& _o): Object( _o ), thisID(globalID++) {}; - - /// Copy constructor. - eoID( const eoID& _id): Object( _id ), thisID(globalID++ ) {}; - - /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoID() {}; - - - ///returns the age of the object - unsigned long ID() const {return thisID;} - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Return the class id. This should be redefined in each class; but - it's got code as an example of implementation. Only "leaf" classes - can be non-virtual. - */ - virtual std::string className() const { return std::string("[eoID]")+Object::className(); }; - - /** - * Read object. - * @param _is A std::istream. - * @throw runtime_std::exception If a valid object can't be read. - */ - virtual void readFrom(std::istream& _is) { - Object::readFrom( _is ); - _is >> thisID; - } - - - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A std::ostream. - */ - virtual void printOn(std::ostream& _os) const{ - Object::printOn( _os ); - _os << thisID; - } -//@} - - private: - - /** Default Constructor. \\ - It´s private so that it is not used anywhere; the right way of using this object - is to create an Object and passing it to an aged by means of the copy ctor; that way - it´s turned into an Aged object*/ - eoID(): Object(), thisID( globalID++ ) {}; - - unsigned long thisID; - static unsigned long globalID; -}; - -template< class Object> -unsigned long eoID< Object >::globalID = 0; - -#endif EOID_H - diff --git a/eo/src/obsolete/eoInclusion.h b/eo/src/obsolete/eoInclusion.h deleted file mode 100644 index 5e752a15a..000000000 --- a/eo/src/obsolete/eoInclusion.h +++ /dev/null @@ -1,64 +0,0 @@ -//----------------------------------------------------------------------------- -// eoInclusion.h -//----------------------------------------------------------------------------- - -#ifndef eoInclusion_h -#define eoInclusion_h - -//----------------------------------------------------------------------------- - -#include - -// EO includes -#include -#include - -/***************************************************************************** - * eoInclusion: A replacement algorithm. * - * Creates a new population by selecting the best individuals from the * - * breeders and original populations * - *****************************************************************************/ - -template class eoInclusion: public eoMerge -{ - public: - /// (Default) Constructor. - eoInclusion(const float& _rate = 1.0): eoMerge( _rate ) {} - - /// Ctor from std::istream - eoInclusion( std::istream& _is): eoBinPopOp( _is ) {}; - - /// Dtor - virtual ~eoInclusion() {}; - - /** - * Creates a new population based on breeders and original populations. - * @param breeders The population of breeders. - * @param pop The original population. - */ - void operator()(eoPop& breeders, eoPop& pop) - { - unsigned target = min(static_cast(pop.size() * rate()), - pop.size() + breeders.size()); - - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); - partial_sort(pop.begin(), pop.begin() + target, pop.end(), - greater()); - pop.erase(pop.begin() + target, pop.end()); - } - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn inherited from eoMerge */ - - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual std::string className() const {return "eoInclusion";}; - //@} -}; - -//----------------------------------------------------------------------------- - -#endif eoInclusion_h diff --git a/eo/src/obsolete/eoIndiSelector.h b/eo/src/obsolete/eoIndiSelector.h deleted file mode 100644 index ea4fc34c0..000000000 --- a/eo/src/obsolete/eoIndiSelector.h +++ /dev/null @@ -1,160 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoIndiSelector.h - Abstract selection operator, which is used by the eoGeneralOps - to obtain individuals from a source population. It also gives a - direct descended eoPopIndiSelector that can be used to - initialize objects with an eoPop. For most uses use eoPopIndividualSelector - rather than eoIndividualSelector to derive from. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoIndiSelector_h -#define eoIndiSelector_h - -#include - -/** - * eoIndividualSelector: This class defines the interface. This - * interface is used by the eoGeneralOp to get new individuals - * from a pop, a subpop or a remote pop - * for convenience when implementing an nary operator a size() and operator[] - * need to be implemented. -*/ - -template -class eoIndiSelector : public eoF -{ -public : - - eoIndiSelector() {} - - virtual ~eoIndiSelector(void) {} - - /** - return the number of individuals that can be selected by an nary operator (through operator[] below) - */ - virtual size_t size(void) const = 0; - - /** - return the specified individual, the size_t argument should be between 0 and eoIndiSelector::size() - */ - virtual const EOT& operator[](size_t i) const = 0; -}; - - -#include - -/** - * eoSelectOneAdaptor: Adaptor class for dispensing individuals. - - It produces the eoIndiSelector interface and an eoSelectOne implementation - This class can then be used for general operators - - various useful things can be done with this class: - you can specify how many of the population can ever be dispensed to the - operators, but you can also specify a preference to the first guy being - dispensed. This is useful if you want to perform the operator on a specific - individual. - - @see eoSelectOne, eoIndiSelector -*/ -template -class eoSelectOneIndiSelector : public eoIndiSelector -{ - public : - eoSelectOneIndiSelector(eoSelectOne& _select) : pop(0), last(0), firstChoice(-1), secondChoice(-1), select(_select) {} - - struct eoUnitializedException{}; - - /** Initialization function, binds the population to the selector, can also - be used to specify an optional end - */ - eoSelectOneIndiSelector& bind(const eoPop& _pop, int _end = -1) - { - pop = &_pop; - last = _end; - - if (last < 0 || last > (int) pop->size()) - { - last = pop->size(); - } - - select.setup(*pop); - - return *this; - } - - /** Bias function to bias the selection function to select specific individuals - first before applying a selection algorithm defined in derived classes - */ - eoSelectOneIndiSelector& bias(int _first, int _second = -1) - { - firstChoice = _first; - secondChoice = _second; - return *this; - } - - - size_t size(void) const { valid(); return last; } - const EOT& operator[](size_t _i) const { valid(); return pop->operator[](_i); } - - eoPop::const_iterator begin(void) const { valid(); return pop->begin(); } - eoPop::const_iterator end(void) const { valid(); return pop->end(); } - - /// operator() does the work. Note that it is not virtual. It calls do_select that needs to be implemented by the derived classes - const EOT& operator()(void) - { - valid(); - if (firstChoice < 0 || firstChoice >= last) - { - // see if we have a second choice - if (secondChoice < 0 || secondChoice >= last) - { - return select(*pop); // let the embedded selector figure out what to do - } - - const EOT& result = pop->operator[](secondChoice); - secondChoice = -1; - return result; - } - - const EOT& result = pop->operator[](firstChoice); - firstChoice = -1; - return result; - } - - private : - - void valid(void) const - { - if (pop == 0) - throw eoUnitializedException(); - } - - const eoPop* pop; // need a pointer as this the pop argument can be re-instated - int last; - int firstChoice; - int secondChoice; - eoSelectOne& select; -}; - -#endif diff --git a/eo/src/obsolete/eoInplaceTransform.h b/eo/src/obsolete/eoInplaceTransform.h deleted file mode 100644 index a2785506b..000000000 --- a/eo/src/obsolete/eoInplaceTransform.h +++ /dev/null @@ -1,193 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoInplaceTransform.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoInplaceTransform_h -#define eoInplaceTransform_h - -//----------------------------------------------------------------------------- - -#include // std::vector -#include -#include // eoOp, eoMonOp, eoBinOp -#include // eoPop -#include // eoOpSelector -#include -#include -#include - -/***************************************************************************** - * eoInplaceTransform1: transforms a population using genetic operators. * - * It does it in an SGA like manner - *****************************************************************************/ -template class eoInplaceTransform1 : public eoTransform -{ - public: - - /// Default constructor. - eoInplaceTransform1( eoOpSelector& _opSel): opSel( _opSel ), select(defaultSelect) {} - eoInplaceTransform1( eoOpSelector& _opSel, eoSelectOne& _select) - : opSel(_opSel), select(_select) {} - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - // copy the guys in a newpop - // because otherwise eoSelectRandom might select freshly created individuals - eoPop newpop; - newpop.reserve(pop.size()); - - // Set up general op helper classes - eoSelectOneIndiSelector inplace(select); - eoBackInserter inserter; - - // set up selection routine - select.setup(pop); - - for (unsigned i = 0; i < pop.size(); i++) - { - eoOp* op = opSel.Op(); - - switch (op->getType()) - { - case eoOp::unary: - { - eoMonOp* monop = static_cast* >(op); - newpop.push_back(pop[i]); - (*monop)( newpop.back() ); - break; - } - case eoOp::binary: - { - eoBinOp* binop = static_cast* >(op); - newpop.push_back(pop[i]); - (*binop)(newpop[i], select(pop)); - break; - } - case eoOp::quadratic: - { - - eoQuadraticOp* Qop = static_cast* >(op); - - newpop.push_back(pop[i]); - Chrom& indy1 = newpop.back(); - - if (++i == pop.size()) - newpop.push_back(select(pop)); - else - newpop.push_back(pop[i]); - - (*Qop)(indy1, newpop.back() ); - break; - } - case eoOp::general : - { - eoGeneralOp* Gop = static_cast* >(op); - - inplace.bind(pop); - inplace.bias(i,i + 1); - - inserter.bind(newpop); - unsigned orgsize = newpop.size(); - (*Gop)(inplace, inserter); - unsigned diff = newpop.size() - orgsize; - i = i + (diff-1); - break; - } - } - pop.swap(newpop); // overwrite existing pop - } - }; - - private: - eoOpSelector& opSel; - eoRandomSelect defaultSelect; - eoSelectOne& select; - -}; - -#include - -/***************************************************************************** - * eoInplaceTransform2: transforms a population using general genetic operators. * - * It does it in an SGA like manner - *****************************************************************************/ -template class eoInplaceTransform2 : public eoTransform -{ - public: - - /// Default constructor. - eoInplaceTransform2( eoGOpSelector& _opSel): opSel( _opSel ), select(defaultSelect) {} - eoInplaceTransform2( eoGOpSelector& _opSel, eoSelectOne& _select) - : opSel(_opSel), select(_select) {} - /** - * Transforms a population. - * @param pop The population to be transformed. - */ - void operator()(eoPop& pop) - { - // copy the guys in a newpop - // because otherwise eoSelectRandom might select freshly created individuals - eoPop newpop; - newpop.reserve(pop.size()); - - // Set up general op helper classes - eoSelectOneIndiSelector inplace(select); - eoBackInserter inserter; - - // set up selection routine - select.setup(pop); - - for (unsigned i = 0; i < pop.size(); i++) - { - eoGeneralOp& Gop = opSel.selectOp(); - - inplace.bind(pop); - inplace.bias(i,i + 1); - - inserter.bind(newpop); - unsigned orgsize = newpop.size(); - Gop(inplace, inserter); - - // see how many have been inserted and add that to i (minus one ofcourse) - unsigned diff = newpop.size() - orgsize; - i = i + (diff-1); - } - - pop.swap(newpop); // overwrite existing pop - } - - private: - eoGOpSelector& opSel; - eoRandomSelect defaultSelect; - eoSelectOne& select; - -}; - - -//----------------------------------------------------------------------------- - -#endif eoBreeder_h - diff --git a/eo/src/obsolete/eoInserter.h b/eo/src/obsolete/eoInserter.h deleted file mode 100644 index f498cd610..000000000 --- a/eo/src/obsolete/eoInserter.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoInserter.h - Abstract population insertion operator, which is used by the eoGeneralOps - to insert the results in the (intermediate) population. It also contains - a direct descended eoPopInserter that defines a convenient inbetween class - for working with eoPop. The user will most likely derive from eoPopInserter - rather than eoInserter. - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoInserter_h -#define eoInserter_h - -#include -#include - - /** - * eoInserter: Interface class that enables an operator to insert - new individuals into the (intermediate) population for example. -*/ -template -class eoInserter : public eoUF&> -{ - public : - virtual ~eoInserter() {} - - struct eoInserterException{}; -}; - -/** - * eoPopInserter: In-between class that defines an initialization - * of the eoIndividualInserter. -*/ -template -class eoPopInserter : public eoInserter -{ - public : - - eoPopInserter(void) : eoInserter(), thePop(0) {} - - /// Binds the population to this class. This is an initialization routine used by breeders - eoInserter& bind(eoPop& _pop) - { - thePop = &_pop; - return *this; - } - - protected : - - eoPop& pop(void) const { valid(); return *thePop; } - - private : - - void valid(void) const - { - if (thePop == 0) - throw eoInserterException(); - } - - // Need a pointer as the inserter should be able to bind to different populations. - // This is caused by the 'one template parameter only' convention in EO. - - eoPop* thePop; - - // If eoGOpBreeder could be templatized over the inserter and the selector, - // the pop could be a ref as this class could be created every time it is applied - // and subsequently would get the population through the constructor - -}; - - - -#endif - diff --git a/eo/src/obsolete/eoInsertion.h b/eo/src/obsolete/eoInsertion.h deleted file mode 100644 index 26774f67f..000000000 --- a/eo/src/obsolete/eoInsertion.h +++ /dev/null @@ -1,96 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoInsertion.h -// Inserts new members into the population -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoInsertion_h -#define eoInsertion_h - -//----------------------------------------------------------------------------- - -#include - -// EO includes -#include // eoPop -#include // eoMerge - -/****************************************************************************** - * eoInsertion: A replacement algorithm. - * Creates a new population with all the breeders and the best individuals - * from the original population. - *****************************************************************************/ - -template class eoInsertion: public eoBinaryFunctor&, const eoPop&> -{ - public: - /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge( _rate ) {} - - /// Ctor from std::istream - eoInsertion( std::istream& _is): eoBinPopOp( _is ) {}; - - /// Dtor - virtual ~eoInsertion() {}; - - /** - * Creates a new population based on breeders and original populations. - * @param breeders The population of breeders. Should be sorted to work correctly - * @param pop The original population. - */ - void operator()( eoPop& _breeders, const eoPop& _pop) - { - unsigned target = static_cast((_pop.size() * rate())); - - _pop.swap(_breeders); - - if (target < _pop.size()) - { - partial_sort(_pop.begin(), _pop.begin() + target, _pop.end(), - greater()); - _pop.erase(_pop.begin() + target, _pop.end()); - } - else - { - target = min(target - _pop.size(), _breeders.size()); - partial_sort(_breeders.begin(), _breeders.begin() + target, - _breeders.end(), greater()); - copy(_breeders.begin(), _breeders.begin() + target, - back_insert_iterator >(_pop)); - } - }; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn inherited from eoMerge */ - - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual std::string className() const {return "eoInsertion";}; - //@} - -}; - -//----------------------------------------------------------------------------- - -#endif eoInsertion_h diff --git a/eo/src/obsolete/eoKill.h b/eo/src/obsolete/eoKill.h deleted file mode 100644 index e7ec85a57..000000000 --- a/eo/src/obsolete/eoKill.h +++ /dev/null @@ -1,62 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoKill.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOKILL_h -#define _EOKILL_h - -#include - -#include - -/// Kill eliminates a gen in a chromosome -template -class eoKill: public eoMonOp { -public: - /// - eoKill( ) - : eoMonOp< EOT >(){}; - - /// needed virtual dtor - virtual ~eoKill() {}; - - /// - virtual void operator()( EOT& _eo ) const - { - unsigned pos = rng.random(_eo.length()); - _eo.deleteGene( pos ); - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoKill";}; - //@} -}; - -#endif - diff --git a/eo/src/obsolete/eoLottery.h b/eo/src/obsolete/eoLottery.h deleted file mode 100644 index 39ca87230..000000000 --- a/eo/src/obsolete/eoLottery.h +++ /dev/null @@ -1,105 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoLottery.h -// Implements the lottery procedure for selection -// (c) GeNeura Team, 1998 - Marc Schoenauer, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoLottery_h -#define eoLottery_h - -//----------------------------------------------------------------------------- - -#include // std::logic_error -#include // sum_fitness -#include - -// #include // -// #include // accumulate -// #include // eoPop eoSelect MINFLOAT - - -//----------------------------------------------------------------------------- -/** eoLottery: a selection method. Puts into the output a group of individuals - selected using lottery; individuals with higher probability will have more - chances of being selected. - Requires EOT::Fitness to be float castable -*/ -//----------------------------------------------------------------------------- - -template class eoLottery: public eoBinaryFunctor&, eoPop& > -{ - public: - /// (Default) Constructor. - eoLottery(const float& _rate = 1.0): eoBinPopOp(), rate_(_rate) - { - if (minimizing_fitness()) - { - throw std::logic_error("eoLottery: minimizing fitness"); - } - } - - /** actually selects individuals from pop and pushes them back them into breeders - * until breeders has the right size: rate*pop.size() - * BUT what happens if breeders is already too big? - * Too big for what? - */ - void operator()(const eoPop& pop, eoPop& breeders) - { - size_t 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); - } - catch (eoNegativeFitnessException&) - { // say where it occured... - throw eoNegativeFitnessException(*this); - } - */ - - double total = sum_fitness (pop); - - // selection of chromosomes - while (breeders.size() < target) - { - breeders.push_back(roulette_wheel(pop, total)); - } - } - - double rate(void) const { return rate_; } - - private: - double rate_; // selection rate -}; - -//----------------------------------------------------------------------------- - -#endif eoLottery_h - diff --git a/eo/src/obsolete/eoMutation.h b/eo/src/obsolete/eoMutation.h deleted file mode 100644 index f3225fffb..000000000 --- a/eo/src/obsolete/eoMutation.h +++ /dev/null @@ -1,90 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMutation.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- -#ifndef _EOMUTATION_H -#define _EOMUTATION_H - -#include -// EO includes -#include - -/** Generic Mutation of an EO. - This is a virtual class, just to establish the interface for the ctor. - Mutation is usually type-specific -*/ - -template -class eoMutation: public eoMonOp { -public: - - /// - eoMutation(const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate) {}; - - /// - virtual ~eoMutation() {}; - - /// - virtual void operator()( EOT& _eo ) const { - typename EOT::iterator i; - for ( i = _eo.begin(); i != _eo.end(); i ++ ) - applyAt( _eo, *i ); - } - - /// To print me on a stream. - /// @param os The std::ostream. - void printOn(std::ostream& os) const { - os << rate ; - } - - /// To read me from a stream. - /// @param is The std::istream. - void readFrom(std::istream& is) { - is >> rate ; - } - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoMutation";}; - //@} - -protected: - double rate; - -private: -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO. It is empty, so each descent class must define it. - virtual void applyAt( EOT& _eo, unsigned _i ) const = 0 ; -}; - - -#endif - diff --git a/eo/src/obsolete/eoNegExp.h b/eo/src/obsolete/eoNegExp.h deleted file mode 100644 index 3d6be5e28..000000000 --- a/eo/src/obsolete/eoNegExp.h +++ /dev/null @@ -1,67 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - ------------------------------------------------------------------------------ - eoNegExp.h - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EONEGEXP_H -#define _EONEGEXP_H - -//----------------------------------------------------------------------------- - -#include - -#include // for base class -#include // for base class - -//----------------------------------------------------------------------------- -// Class eoNegExp -//----------------------------------------------------------------------------- - -/// Generates random numbers using a negative exponential distribution -template -class eoNegExp: public eoRnd -{ - public: - /** - * Default constructor. - * @param _mean Distribution mean - */ - eoNegExp(T _mean): eoRnd(), mean(_mean) {}; - - /** - * Copy constructor. - * @param _rnd the copyee - */ - eoNegExp( const eoNegExp& _rnd): eoRnd( _rnd), mean(_rnd.mean) {}; - - /// Returns an uniform dandom number over the interval [min, max). - virtual T operator()() { - return T( -mean*log((double)rng.rand() / rng.rand_max())); } - - private: - T mean; -}; - -//----------------------------------------------------------------------------- - -#endif - diff --git a/eo/src/obsolete/eoNonUniform.h b/eo/src/obsolete/eoNonUniform.h deleted file mode 100644 index b5065d21d..000000000 --- a/eo/src/obsolete/eoNonUniform.h +++ /dev/null @@ -1,87 +0,0 @@ -//----------------------------------------------------------------------------- -// eoNonUniform.h -//----------------------------------------------------------------------------- - -#ifndef EONONUNIFORM_H -#define EONONUNIFORM_H - -//----------------------------------------------------------------------------- - -#include // pow - -//----------------------------------------------------------------------------- -// eoNonUniform -//----------------------------------------------------------------------------- - -class eoNonUniform -{ -public: - eoNonUniform(const unsigned _num_step): - step_value(0), num_step_value(_num_step) {} - - void reset() { step_value = 0; } - - const unsigned& step() const { return step_value; } - const unsigned& num_step() const { return num_step_value; } - - operator int() const { return step_value < num_step_value; } - - void operator++() { ++step_value; } - void operator++(int) { ++step_value; } - -private: - unsigned step_value, num_step_value; -}; - -//----------------------------------------------------------------------------- -// eoLinear -//----------------------------------------------------------------------------- - -class eoLinear -{ -public: - eoLinear(const double _first, - const double _last, - const eoNonUniform& _non_uniform): - first(_first), - diff((_last - _first) / (_non_uniform.num_step() - 1)), - non_uniform(_non_uniform) {} - - double operator()() const - { - return first + diff * non_uniform.step(); - } - -private: - double first, diff; - const eoNonUniform& non_uniform; -}; - -//----------------------------------------------------------------------------- -// eoNegExp2 -//----------------------------------------------------------------------------- - -class eoNegExp2 -{ - public: - eoNegExp2(const double _r, - const double _b, - const eoNonUniform& _non_uniform): - r(_r), b(_b), - non_uniform(_non_uniform) {} - - double operator()() const - { - return 1.0 - pow(r, pow(1.0 - (double)non_uniform.step() / - non_uniform.num_step(), b)); - } - - private: - double r, b; - const eoNonUniform& non_uniform; -}; - -//----------------------------------------------------------------------------- - -#endif NON_UNIFORM_HH - diff --git a/eo/src/obsolete/eoNormal.h b/eo/src/obsolete/eoNormal.h deleted file mode 100644 index 09a75d7f5..000000000 --- a/eo/src/obsolete/eoNormal.h +++ /dev/null @@ -1,89 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoNormal.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EONORMAL_H -#define _EONORMAL_H - -//----------------------------------------------------------------------------- - -#include -#include // for base class -#include // for random number generator - -//----------------------------------------------------------------------------- -// Class eoNormal -//----------------------------------------------------------------------------- - -/// Generates random number using a normal distribution -template -class eoNormal: public eoRnd -{ - public: - /** - * Default constructor. - * @param _mean Dsitribution mean - * @param _sd Standard Deviation - */ - eoNormal(T _mean, T _sd) - : eoRnd(), mean(_mean), sd(_sd), phase(false) {} - - /** - * Copy constructor. - * @param _rnd the other one - */ - eoNormal( const eoNormal& _rnd ) - : eoRnd( _rnd), mean(_rnd.mean), sd(_rnd.sd), phase(false) {} - - /** Returns an uniform random number over the interval [min, max). - @return an uniform random number over the interval [min, max). - */ - virtual T operator()() { - if (phase) { // Already have one stored up. - phase = false; - return T ( (sqRatio * q * sd) + mean ); - } - - double p, v; - do { - p = ((double)rng.rand() / rng.rand_max())*2-1; - q = ((double)rng.rand() / rng.rand_max())*2-1; - v = p*p + q*q; - } while(v > 1.0 || v <0.25); - - sqRatio = sqrt(-2*log((double)rand() / rng.rand_max()) / v); - phase = true; - return T( (sqRatio * p * sd) + mean ); - }; - - private: - T mean; - T sd; - bool phase; - double sqRatio, q; -}; - -//----------------------------------------------------------------------------- - -#endif - diff --git a/eo/src/obsolete/eoOpFactory.h b/eo/src/obsolete/eoOpFactory.h deleted file mode 100644 index 2d835d999..000000000 --- a/eo/src/obsolete/eoOpFactory.h +++ /dev/null @@ -1,87 +0,0 @@ -// eoOpFactory.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoMonOpFactory.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOOPFACTORY_H -#define _EOOPFACTORY_H - -#include -#include -#include -#include -#include - -//----------------------------------------------------------------------------- - -/** EO Factory. An instance of the factory class to create monary operators. -@see eoSelect*/ -template< class EOT> -class eoOpFactory: public eoFactory< eoOp > { - -public: - - /// @name ctors and dtors - //{@ - /// constructor - eoOpFactory( ) {} - - /// destructor - virtual ~eoOpFactory() {} - //@} - - /** Another factory method: creates an object from an std::istream, reading from - it whatever is needed to create the object. Usually, the format for the std::istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - If there are problems, an std::exception is raised; it should be caught at the - upper level, because it might be something for that level - @param _is an stream from where a single line will be read - @throw runtime_std::exception if the object type is not known - */ - virtual eoOp* make(std::istream& _is) { - eoOp * opPtr = NULL; - std::string objectTypeStr; - _is >> objectTypeStr; - if ( objectTypeStr == "eoDup") { - opPtr = new eoDup(); - } - if ( objectTypeStr == "eoKill" ) { - opPtr = new eoKill( ); - } - if ( objectTypeStr == "eoTranspose" ) { - opPtr = new eoTranspose( ); - } - if ( objectTypeStr == "eoXOver2" ) { - opPtr = new eoXOver2( ); - } - if ( !opPtr ) { - throw objectTypeStr; - } - return opPtr; - }; - - -}; - - -#endif _EOOPFACTORY_H diff --git a/eo/src/obsolete/eoOpSelector.h b/eo/src/obsolete/eoOpSelector.h deleted file mode 100644 index d15f620c9..000000000 --- a/eo/src/obsolete/eoOpSelector.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoOpSelector.h - Base class for operator selectors, which return 1 operator according - to some criterium - - (c) GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -//----------------------------------------------------------------------------- - -#ifndef EOOPSELECTOR_H -#define EOOPSELECTOR_H - -//----------------------------------------------------------------------------- - -#include // std::runtime_error - -#include -#include -#include - -//----------------------------------------------------------------------------- -/** An operator selector is an object that contains a set of EO operators, -and selects one based on whatever criteria. It will be used in the breeder objects.\\ -This class is basically a generic interface for operator selection -*/ -template -class eoOpSelector: public eoObject, public eoPrintable -{ -public: - - // Need virtual destructor for derived classes - virtual ~eoOpSelector() {} - - /// type of IDs assigned to each operators, used to handle them - typedef unsigned ID; - - /** add an operator to the operator set - @param _op a genetic operator, that will be applied in some way - @param _arg the operator rate, usually, or any other argument to the operator - @return an ID that will be used to identify the operator - */ - virtual ID addOp( eoOp& _op, float _arg ) = 0; - - /** Gets a non-const reference to an operator, so that it can be changed, - modified or whatever - @param _id a previously assigned ID - @throw runtime_std::exception if the ID does not exist*/ - virtual eoOp& getOp( ID _id ) = 0; - - /** Remove an operator from the operator set - @param _id a previously assigned ID - @throw runtime_std::exception if the ID does not exist - */ - virtual void deleteOp( ID _id ) = 0; - - /// Returns a genetic operator according to the established criteria - virtual eoOp* Op() = 0; - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - @return the class name as a std::string - */ - virtual std::string className() const { return "eoOpSelector"; }; - - /** - * Read object and print objects are left for subclasses to define. - */ - //@} -}; - -//----------------------------------------------------------------------------- - -#endif EO_H diff --git a/eo/src/obsolete/eoParser.h b/eo/src/obsolete/eoParser.h deleted file mode 100644 index fb837370f..000000000 --- a/eo/src/obsolete/eoParser.h +++ /dev/null @@ -1,838 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -/* eoParser.h - some classes to parser either the command line or a parameter file - - (c) Marc Schoenauer and Geneura team, 1999 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _PARSER_H -#define _PARSER_H - -#include // for strcasecmp ... maybe there's a c++ way of doing it? - // Yep there is, but needs either a simple functor for the equal function - // or a hand-rolled std::string template class (this isn't that horrible as - // it sounds, it just means a new std::string_traits class with two changed - // function definitions. (Maarten) -#ifdef _MSC_VER -#define strcasecmp(a,b) _strnicmp(a,b,strlen(a)) -#endif - -// STL includes -#include -#include -#include -#include -#include -#include - -// include for std::exceptions -#include // std::logic_error - -//----------------------------------------------------------------------------- -// Class Param -//----------------------------------------------------------------------------- - -/** - * A param repesents an argument that can be passed to a program in the command line - */ -class Param { -public: - - /** - * Type of params - */ - enum valueType { INT, UL, FLOAT, STRING, BOOL, ARRAY, TITLE }; - - /** - * Construct an Param. - * @param _shortName Short name of the argument - * @param _longName Long name of the argument - * @param _default The default value - * @param _valueType Type of the parameter ("integer","unsigned long", "float","char", "bool" and so on) - * @param _description Description of the parameter. What is useful for. - * @param _required If it is a necessary parameter or not - */ - Param (std::string _shortName="-h", std::string _longName="--help", - std::string _default = "", valueType _valType= STRING, - std::string _description="Shows this help", - bool _required=false ) - : repShortName(_shortName), repLongName(_longName), - repDescription(_description ), repEnv(""), repDefault(_default), - repValue(_default), repValType( _valType), - repRequired( _required), repChanged(false) { - - const char *c = repLongName.c_str(); - for(unsigned i=0; i getArray (const std::string& _shortName, const std::string& _longName, - const std::string& _default = "", - const std::string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::ARRAY, _description, _required ); - parse( param ); - params.push_back( param ); - - istrstream is(param.value().c_str()); - std::vector retValue; - std::string tmpStr; - - is >> tmpStr; - while(is){ - retValue.push_back(tmpStr); - is >> tmpStr; - } - return retValue; - }; - - /** - * Gets the int value of a param given the full description of the parameter - * @param see above - * @std::exception BadType if the param's value isn't a correct int - */ - - int getInt (const std::string& _shortName, const std::string& _longName, - const std::string& _default = "", - const std::string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::INT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - int retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the unsigned lon value of a param given ... - * @param see above - * @std::exception BadType if the param's value isn't a correct unsigned long - */ - - int getUnsignedLong (const std::string& _shortName, const std::string& _longName, - const std::string& _default = "", - const std::string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::UL, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - unsigned long retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - /** - * Gets the float value of a param given the description of the parameter - * @param see above - * @std::exception BadType if the param's value isn't a correct int - */ - - float getFloat (const std::string& _shortName, const std::string& _longName, - const std::string& _default = "", - const std::string& _description="", bool _required=false) { - Param param ( _shortName, _longName, _default, Param::FLOAT, _description, _required ); - parse( param ); - params.push_back( param ); - - // now gets the value - istrstream is( param.value().c_str()); - float retValue; - is >> retValue; - - if (!is) { - throw Parser::BadType(param.longName().c_str(), param.value().c_str(), "float"); - return 0; - } else { - return retValue; - } - }; - - - std::string parse_std::string (std::istream & _is) { - std::string paramValue; - _is >> paramValue; - //if the first character of the std::string or array is not a " => just one word or array-element. - if( paramValue[0] != '\"' ) - return paramValue; - - if( paramValue[1] == '\"' ) // the empty std::string - return "" ; - - //else => read until the next " (the end of the std::string). - const char *c = paramValue.c_str(); - std::string tmpStr = c+1;// skip the " - if (tmpStr[tmpStr.length()-1] == '\"') { // one word only - //tmpStr[tmpStr.length()-1] = '\0'; - tmpStr.erase( &tmpStr[tmpStr.length()-1] ); - return tmpStr; - } - - bool stop = false; - while (_is && !stop) { - _is >> paramValue; - // test last character of paramValue for " - if (paramValue[paramValue.length()-1] == '\"') { - paramValue.erase( ¶mValue[paramValue.length()-1] ); - //paramValue[paramValue.length()-1] = '\0'; - stop = true; - } - tmpStr = tmpStr + " " + paramValue ; - } - return tmpStr; - }; - - - void parse (Param & param) { - int i; - std::string tmpStr, ReadStr, FirstWord; - - // FIRST: look if the associated environment variables have any value, to use them. - if( getenv( param.environment().c_str() ) ) { - //std::cout <<"\t\t ENV param: ,"<shortName()<<", ,"<environment().c_str())<> tmpStr; - if ( ( !strcmp(tmpStr.c_str(), param.shortName().c_str()) ) || - ( !strcasecmp(tmpStr.c_str(), param.longName().c_str()) ) - ) { // found the keyword - - Param::valueType tmp = param.valType(); - switch ( tmp ) { - case Param::TITLE: - std::cerr << "Error, we should not be there" << std::endl; - exit(1); - break; - case Param::BOOL : - param.value("true" ); - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - is >> tmpStr; - param.value(tmpStr); - break; - - case Param::STRING: - tmpStr = parse_std::string(is); - param.value(tmpStr); - break; - - case Param::ARRAY: - ReadStr = parse_std::string(is); - if ( ReadStr != "<" ) { // no "<" ">" --> a single std::string in the array - param.value(ReadStr); - break; - } - // read next word - and keep it in case of <> mismatch - FirstWord = parse_std::string(is); - // test for empty array - if (FirstWord == ">") { - param.value(""); - break; - } - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_std::string(is); - while ( is && (ReadStr != ">") ) { - tmpStr = tmpStr + " " + ReadStr; - ReadStr = parse_std::string(is); - } - - if (!is) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique std::string - } - else - param.value(tmpStr); - break; - } - } - } - } - - - // LAST (highest priority) parse the command line arguments - for (i=1 ; i" --> a single std::string in the array - param.value(ReadStr); - }else{ - // read next word - and keep it in case of <> mismatch - FirstWord = parse_argv[i++]; - - // test for empty array - if (FirstWord == ">") { - param.value(""); - }else{ - // else, read all words until ">" - tmpStr = FirstWord; - ReadStr = parse_argv[i++]; - while ( (i=parse_argc) && (ReadStr != ">") ) { // there was a "<" without the corresponding ">" - throw Parser::BadArrayParam( param.longName(), FirstWord ); - param.value(FirstWord); // assume unique std::string - }else{ - param.value(tmpStr); - } - } - } - } - } - break; - } - - //MS after trying all possibilities, and if the value has not changed - // though the parameter was required, protest! - if (param.required() && !param.changed()) - throw Parser::MissingReqParam(param.shortName()); - - }; - - /** - * Sets a new value for a param given its short name or its long name. - * @param _name One of the names of the param. - * @param _value Value to be assigned. - * @std::exception UnknownArg if the param doesn't exist - * @std::exception MissingVal if the param hasn't got a value - */ - Param::valueType setParamValue (const std::string& _name, const char* _value){ - std::vector::iterator pos; - - for (pos=params.begin() ; pos!=params.end() ; pos++) - if (pos->shortName()==_name || pos->longName()==_name) - break; - - // if found ... - if (pos!=params.end()) { - switch ( pos->valType() ) { - case Param::TITLE: - std::cerr << "Error, we should not be there" << std::endl; - exit(1); - break; - case Param::BOOL : - pos->value("true"); - break; - case Param::ARRAY : - case Param::INT: - case Param::UL: - case Param::FLOAT: - case Param::STRING: - if (_value != NULL){ - pos->value(_value); - }else{ - throw Parser::MissingVal(_name); - return Param::BOOL; - } - break; - } // switch - - return pos->valType(); - - }else{ - throw Parser::UnknownArg(_name); - return Param::BOOL; - } - }; - - /// the output method - generate the .status file (unless other name is given) - friend std::ostream & operator<< ( std::ostream & os, Parser & _parser ) - { - std::vector::iterator p; - //print every param with its value - for ( p=_parser.params.begin(); p!=_parser.params.end(); p++ ) { - switch ( p->valType() ) { - case Param::BOOL : - if( p->value() == (std::string) "true") - os << p->longName(); - else - os << "#" << p->longName() ; // so the name of the bool is commented out - break; - - case Param::INT: - case Param::UL: - case Param::FLOAT: - os << p->longName()<<" "<value(); - break; - - case Param::ARRAY : - os << p->longName() << " < " << p->value().c_str() << " >" ; - break; - case Param::STRING: - os << p->longName()<<" \""<value().c_str()<<"\" "; - break; - case Param::TITLE: - os << std::endl; // Title is in the description below - break; - } // switch - os << "\t #" << p->shortName() << " : " << p->description(); - if (p->valType() != Param::TITLE) - os << " [" << p->defValue() << "]" ; - os << std::endl; - } - return os; - }; - - /** - * Prints out the std::list of parameters in the output file (if specified) - */ - void outputParam(std::string _OutputFile="") - { - if (_OutputFile == "") { - _OutputFile = parse_argv[0]; - _OutputFile += ".status"; - } - - std::ofstream os(_OutputFile.c_str()); - os << "Parameters used by \"" << programName << "\" (" - << programDescription << ")" << std::endl << std::endl; - os << *this; - }; - - /** - * Prints an automatic help in the standard output using the information - * provided by parameters - */ - void printHelp() { - std::vector::iterator p; - // unsigned i; - - // print program name and description - std::cout << this->programName <<": "<valType() != Param::TITLE ) { - // if( p->valType() != Param::BOOL ){ - // std::cout << ( (!p->required())?"[":""); - // std::cout <shortName()<<" value"<required())?"]":"")<<" "; - // }else{ - // std::cout << "["<shortName()<<"] "; - // } - // } // for p - std::cout << "Where:"<valType() != Param::TITLE ) { - // Victor: 04-Jan-2000 - // Modified because the - and -- prefixes are not needed. - /* - std::cout << "-" << p->shortName() - <<", --"<longName()<<":\t" - <description()<shortName() - <<", " << p->longName()<<":\t" - <description()<valType() ) { - case Param::INT: std::cout <<"Integer"; break; - case Param::UL: std::cout <<"Unsigned Long Integer"; break; - case Param::FLOAT: std::cout <<"Float"; break; - case Param::STRING: std::cout <<"String"; break; - case Param::ARRAY: std::cout <<"An array of std::strings, enclosed within < >"; break; - case Param::BOOL: std::cout << "Flag"; break; - case Param::TITLE: break; - } // switch - if(p->valType() == Param::BOOL) - std::cout << ") True if present" << std::endl; - else - std::cout<<") "<<( (p->required())?"Required":"Optional" )<<". By default: "<defValue()<description() << std::endl; - } - } // for p - std::cout << std::endl; - }; - - /** - * This class managges unknown argument std::exceptions. - */ - class UnknownArg : public std::logic_error { - public: - - /** - * Constructor - * @param _arg std::string to be shown when the std::exception occurs - */ - UnknownArg( const std::string& _arg): std::logic_error( "Invalid argument: "+_arg ) { }; - }; - - /** - * This class managges bad param types. - */ - class BadType : public std::logic_error { - public: - - /** - * Constructor - * @param _param The param - * @param _value The value of the param - */ - BadType(const std::string& _param, const std::string& _value, const std::string& _correctType) - : std::logic_error("The value '" + _value + "' assigned to the argument " + _param + " isn't a correct "+_correctType) { }; - }; - - /** - * This class managges std::exceptions produced when there isn't a value for a parameter. - */ - class MissingVal : public std::logic_error { - public: - - /** - * Constructor - * @param _param The param - */ - MissingVal(const std::string& _param) : std::logic_error("Missing value for parameter " + _param) {}; - }; - - /** - * This class managges std::exceptions produced when the user forgot a required parameter. - */ - class MissingReqParam : public std::logic_error { - public: - - /** - * Constructor - * @param _shortName The param's short name - */ - MissingReqParam(const std::string& _shortName) : std::logic_error("Missing required parameter " + _shortName) {}; - }; - - /** - * This class managges std::exceptions du to < without a > in array value - */ - class BadArrayParam : public std::logic_error { - public: - - /** - * Constructor - * @param _param The param - * @param _first_word The first word read after the "<" - */ - BadArrayParam(const std::string& _param, const std::string &_first_word) : - std::logic_error("Array parameter " + _param + ": No matching > (" + _first_word - + "... )") {}; - }; - - void createParamFile( std::ostream& _os ) { - std::vector::iterator p; - for ( p=params.begin(); p!=params.end(); p++ ) { - switch( p->valType() ) { - case Param::TITLE: - _os << std::endl << "# -- "; - break; - case Param::BOOL: - _os << ((p->value()=="true" )?"":"#") - << p->longName(); - break; - case Param::STRING: - _os << p->longName()<<"\t\""<value()<<"\""; - break; - case Param::ARRAY: - _os << p->longName()<<"\t< "<value()<<" >"; - break; - default: - _os << p->longName()<<"\t"<value(); - break; - } // switch - _os << "\t #" << p->description() << std::endl; - } - } -private: - std::vector params; - std::string programName; - std::string programDescription; - int parse_argc; - char **parse_argv; - std::string InputFileName; - -}; - - - - -#endif diff --git a/eo/src/obsolete/eoParserUtils.cpp b/eo/src/obsolete/eoParserUtils.cpp deleted file mode 100644 index dea8ed096..000000000 --- a/eo/src/obsolete/eoParserUtils.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// See eoParserUtils.h - -#include -#include -/// Reproducible random seed - -// For the Mersenne-Twister used in EO, the entire rng needs to be saved - -//---------------------------------- -void InitRandom( Parser & parser) { -//---------------------------------- - unsigned long _seed; - try { - _seed = parser.getUnsignedLong("-S", "--seed", "0", - "Seed for Random number generator" ); - } - catch (logic_error & e) - { - cout << e.what() << endl; - parser.printHelp(); - exit(1); - } - - if (_seed == 0) { // use clock to get a "random" seed - _seed = (unsigned long)( time( 0 ) ); - ostrstream s; - 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. - rng.reseed(_seed); - - return; -} - diff --git a/eo/src/obsolete/eoParserUtils.h b/eo/src/obsolete/eoParserUtils.h deleted file mode 100644 index 742c4b58c..000000000 --- a/eo/src/obsolete/eoParserUtils.h +++ /dev/null @@ -1,24 +0,0 @@ -/*------------------------------------------------------- -File..........: eoParserUtils.h -Author........: Geneura Team, Marc Shoenauer - (this file: Victor Rivas, vrivas@ujaen.es) -Date..........: 17-Dec-1999 -Description...: Some useful things that use eoParser. -Modifications.: -------------------- 1 ------------------- - Author.......: - Date.........: - Description..: -*/ - -#ifndef EO_PARSER_UTILS -#define EO_PARSER_UTILS - -#include "../utils/eoRNG.h" -#include "eoParser.h" -/// Reproducible random seed - -//---------------------------------- -void InitRandom( Parser & parser); -//---------------------------------- -#endif diff --git a/eo/src/obsolete/eoPopOps.h b/eo/src/obsolete/eoPopOps.h deleted file mode 100644 index bd1dbf687..000000000 --- a/eo/src/obsolete/eoPopOps.h +++ /dev/null @@ -1,142 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoPopOps.h - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOPOPOPS_H -#define _EOPOPOPS_H - -using namespace std; - -/** -@author Geneura Team -@version 0.0 - -@version 0.1 : -MS- 22/10/99 - added the added the derived class eoSelectOne for which you only have - to define the selection of 1 individual - (e.g. for tournament, age selection in SSGA, ...) - added at the BASE level (after all it's themost frequen case) - the pure virtual operator that selects one single individual: - EOT eoSelect::operator ( const eoPop& _parents, - const EOT& _first = 0) - added the optional second parameter to transform::operator() -*/ - -//----------------------------------------------------------------------------- -#include - -//----------------------------------------------------------------------------- -/** eoTransform is a class that transforms or does something on a population. - */ -template -class eoMonPopOp: public eoObject{ - - public: - /** ctor */ - eoMonPopOp() {}; - - /// Dtor - virtual ~eoMonPopOp(){}; - - /// Pure virtual transformation function. Does something on the population - virtual void operator () ( eoPop& _pop ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual std::string className() const {return "eoMonPopOp";}; - //@} - -}; - -//----------------------------------------------------------------------------- - -/** eoSelect usually takes elements from one population, with or without transformation, and transfers them to the other population */ -template -class eoBinPopOp: public eoObject{ - - public: - /** ctor - */ - eoBinPopOp() {}; - - /// Dtor - virtual ~eoBinPopOp(){}; - - /** Pure virtual transformation function. Extracts something from the parents, - and transfers it to the siblings - @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; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual std::string className() const {return "eoBinPopOp";}; - //@} - -}; - -//----------------------------------------------------------------------------- - -/** eoSelectone selects only one element from a whole population. Usually used to - select mates*/ -template -class eoSelectOne: public eoObject{ - - public: - /** ctor - */ - eoSelectOne() {}; - - /// Dtor - virtual ~eoSelectOne(){}; - - /** Pure virtual transformation function. Extracts something from the parents, - and transfers it to the siblings - @param _parents the initial generation. Will be kept constant - @param _siblings the created offspring. Will be usually an empty population - */ - virtual const EOT& operator () ( const eoPop& _parents ) = 0; - - /** @name Methods from eoObject */ - //@{ - /** readFrom and printOn are not overriden - */ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual std::string className() const {return "eoSelectOne";}; - //@} - -}; -#endif diff --git a/eo/src/obsolete/eoProblem.h b/eo/src/obsolete/eoProblem.h deleted file mode 100644 index 5c219123e..000000000 --- a/eo/src/obsolete/eoProblem.h +++ /dev/null @@ -1,45 +0,0 @@ -//----------------------------------------------------------------------------- - -// eoProblem.h - -// (c) GeNeura Team 1998 - -/* - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPROBLEM_H -#define EOPROBLEM_H - -//----------------------------------------------------------------------------- - -template class Problem -{ - public: - typedef T Chrom; - typedef typename T::Gene Gene; - typedef typename T::Fitness Fitness; - - virtual Fitness operator()(const Chrom& chrom) = 0; -}; - -//----------------------------------------------------------------------------- - -#endif EOPROBLEM_H - diff --git a/eo/src/obsolete/eoProportional.h b/eo/src/obsolete/eoProportional.h deleted file mode 100644 index 7116e7863..000000000 --- a/eo/src/obsolete/eoProportional.h +++ /dev/null @@ -1,71 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoProportional.h -// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef eoProportional_h -#define eoProportional_h - -//----------------------------------------------------------------------------- - -#include -#include -#include - -//----------------------------------------------------------------------------- -/** eoProportional: select an individual proportional to her stored fitness - value - -*/ -//----------------------------------------------------------------------------- - -template class eoProportional: public eoSelectOne -{ -public: - /// Sanity check - eoProportional(const eoPop& pop = eoPop()): - total((pop.size() == 0) ? -1.0 : sum_fitness(pop)) - { - if (minimizing_fitness()) - throw std::logic_error("eoProportional: minimizing fitness"); - } - - void setup(const eoPop& _pop) - { - total = sum_fitness(_pop); - } - - /** do the selection, call roulette_wheel. - */ - const EOT& operator()(const eoPop& _pop) - { - return roulette_wheel(_pop, total) ; - } - -private : - typename EOT::Fitness total; -}; - -#endif - diff --git a/eo/src/obsolete/eoProportionalGOpSel.h b/eo/src/obsolete/eoProportionalGOpSel.h deleted file mode 100644 index a52bac60f..000000000 --- a/eo/src/obsolete/eoProportionalGOpSel.h +++ /dev/null @@ -1,51 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoProportionalGOpSel.h - Proportional operator selector, selects operators proportionally to its rate - - (c) Maarten Keijzer, GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoProportionalGOpSel_h -#define eoProportionalGOpSel_h - -//----------------------------------------------------------------------------- - -#include // eoOpSelector - -template -class eoProportionalGOpSel : public eoGOpSelector -{ -public : - eoProportionalGOpSel() : eoGOpSelector() {} - - /** Returns the operator proportionally selected */ - virtual eoGeneralOp& selectOp() - { - unsigned what = rng.roulette_wheel(getRates()); - return *operator[](what); - } - - /// - virtual std::string className() const { return "eoGOpSelector"; }; - -}; - -#endif eoProportionalGOpSel_h diff --git a/eo/src/obsolete/eoProportionalOpSel.h b/eo/src/obsolete/eoProportionalOpSel.h deleted file mode 100644 index 72c17dc2c..000000000 --- a/eo/src/obsolete/eoProportionalOpSel.h +++ /dev/null @@ -1,158 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - - -//----------------------------------------------------------------------------- - -// eoProportionalOpSel.h - -// (c) GeNeura Team 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EOPROPORTIONALOPSEL_H -#define EOPROPORTIONALOPSEL_H - -//----------------------------------------------------------------------------- - -#include // std::runtime_error -#include // greater -#include - -// Includes from EO -#include -#include -#include - -//----------------------------------------------------------------------------- -/** This class selects operators according to probability. All operator percentages -should add up to one; if not, an std::exception will be raised.\\ -Operators are represented as std::pairs (proportion,operator) -*/ -template -class eoProportionalOpSel: public eoOpSelector, - public multimap*,greater > -{ -public: - - typedef multimap*,greater > MMF; - - /// default ctor - eoProportionalOpSel() - : eoOpSelector(), MMF(), opID(1) {}; - - /// virtual dtor - virtual ~eoProportionalOpSel() {}; - - /** Gets a non-const reference to an operator, so that it can be changed, - modified or whatever - @param _id a previously assigned ID - @throw std::runtime_error if the ID does not exist*/ - - virtual eoOp& getOp( ID _id ) { - MMF::iterator i=begin(); - ID j = 1; - while ( (i++!=end()) && (j++ != _id) ); - if ( i == end() ) - throw std::runtime_error( "No such id in eoProportionalOpSel::op\n" ); - return *(i->second); - //return i->second; - } - - /** add an operator to the operator set - @param _op a genetic operator, that will be applied in some way - @param _arg an argument to the operator, usually operator rate - @return an ID that will be used to identify the operator - */ - virtual ID addOp( eoOp& _op, float _arg ) { - insert( MMF::value_type( _arg,& _op ) ); - return opID++; - } - - /** Remove an operator from the operator set - @param _id a previously assigned ID - @throw std::runtime_error if the ID does not exist - */ - virtual void deleteOp( ID _id ) { - unsigned j; - MMF::iterator i; - for ( i=begin(), j=1; i!=end(); i++,j++ ) { - if( j == _id ) - erase( i ); - return; - } - if ( i == end() ) - throw std::runtime_error( "No such id in eoProportionalOpSel::op\n" ); - }; - - /// Returns a genetic operator according to the established criteria - virtual eoOp* Op() { - // Check that all add up to one - float acc = 0; - MMF::iterator i; - unsigned j; - for ( i=begin(), j=1; i!=end(); i++,j++ ) { - acc +=i->first; - } - if ( acc != 1.0 ) - throw std::runtime_error( "Operator rates added up different from 1.0" ); - - // If here, operators ordered by rate and no problem - float aRnd = rng.uniform(); - i=begin(); - acc = 0; - do { - acc += i->first; - } while ( (acc <= aRnd ) && (i++!=end() ) ); - if ( i == end() ) - throw std::runtime_error( "Operator not found in eoProportionalOpSelector" ); - return i->second; - //return i->second; - } - - /// Methods inherited from eoObject - //@{ - - /** Return the class id. - @return the class name as a std::string - */ - virtual std::string className() const { return "eoProportionalOpSel"; }; - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - it can be reimplemented anywhere. Instance from base classes are processed in - base classes, so you don´t have to worry about, for instance, fitness. - @param _s the std::ostream in which things are written*/ - virtual void printOn( std::ostream& _s ) const{ - _s << className().c_str() << std::endl; - for ( MMF::const_iterator i=begin(); i!=end(); i++ ) { - _s << i->first << "\t" << *(i->second )<< std::endl; - } - } - - - //@} - - private: - ID opID; - }; - - //----------------------------------------------------------------------------- - -#endif EO_H - diff --git a/eo/src/obsolete/eoRandomBreed.h b/eo/src/obsolete/eoRandomBreed.h deleted file mode 100644 index 61b76e08d..000000000 --- a/eo/src/obsolete/eoRandomBreed.h +++ /dev/null @@ -1,200 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoRandomBreed.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EORANDOMBREED_H -#define _EORANDOMBREED_H - -#include - -/** Takes those on the selection std::list and creates a std::list of new individuals - * Destroys the genetic pool */ -template -class EORandomBreed: public EOBreeder{ -public: - - typedef std::vector< EOOp * > vecOpT; - - /// Ctor - EORandomBreed():vecOp() {}; - - /** Copy ctor - * Needs a copy ctor for the EO operators */ - EORandomBreed( const EORandomBreed& _rndBreeder) - :vecOp() { - copy( _rndBreeder.vecOp.begin(), _rndBreeder.vecOp.end(), - vecOp.begin() ); - }; - - /// Dtor - virtual ~EORandomBreed() {}; - - /// Adds a genetic operator to the Breeder with a rate - virtual void addOp( EOOp* _eop ) { - vecOp.push_back( _eop); - }; - - /// Takes the operator pointed to from the operator std::list - virtual void deleteOp( const EOOp* _eop); - - /** Takes the genetic pool, and returns next generation, destroying the - * genetic pool container - * Non-const because it might order the operator std::vector. In this case, - * it mates all members of the population randomly */ - virtual void operator() ( EOPop< EOT >& _ptVeo ); - -// I don´t like this, but I need it for the RandomBreedLog -protected: - vecOpT vecOp; - -}; - - -//_________________________ IMPLEMENTATIONS _____________________________ - -template< class EOT> -void EORandomBreed::deleteOp( const EOOp* _eop) { - vecOpT::iterator i; - for ( i = vecOp.begin(); i != vecOp.end(); i++ ) { - if ( *i == _eop ) { - vecOp.erase( i ); - } - } -} - -//________________________________________________________________________ -template -void EORandomBreed::operator() ( EOPop< EOT >& _ptVeo ) { - - unsigned select= _ptVeo.size(); // New population same size than old - sort( vecOp.begin(), vecOp.end(), SortEOpPt() ); - - unsigned i; - float totalPriority = 0; - for ( i = 0; i < vecOp.size(); i ++ ) { - totalPriority += vecOp[i]->Priority(); - } - - unsigned inLen = _ptVeo.size(); // size of in subPop - for ( i = 0; i < select; i ++ ) { - // Create an alias of a random input EO with copy ctor - EOT& newEO = _ptVeo[ i ]; - - // Choose operator - float randomDraw = totalPriority *(rand() % 1000) /1000.0; - vecOpT::const_iterator j; - float accumulated = 0; - for ( j = vecOp.begin(); - ( j != vecOp.end() ) && ( accumulated < randomDraw); - j ++ ) { - accumulated+= (*j)->Priority(); // the priority - } - - if ( j != vecOp.begin() ) - j--; // previous one - EOOp* thisOp = *j; - - if (thisOp->readArity() == unary ) { - MonOp* mopPt = dynamic_cast< MonOp* > ( thisOp ); - (*mopPt)( newEO ); - } else { - unsigned chosenMatch = rand() % inLen; - BinOp* bopPt = dynamic_cast< BinOp* > ( thisOp ); - (*bopPt)( newEO, _ptVeo[chosenMatch] ); - } - - } -} - -#include // For factory - -/** Exactly as RandomBreed, except that uses factories*/ -template -class EORandomBreedLog: public EORandomBreed{ -public: - - typedef std::vector< EOOp * > vecOpT; - - /// Ctor - EORandomBreedLog( EOFactory & _eof ):EORandomBreed(), factory( _eof ) {}; - - /** Copy ctor - * Needs a copy ctor for the EO operators */ - EORandomBreedLog( const EORandomBreedLog& _rndBreeder) - :EORandomBreed( _rndBreeder ), factory( _rndBreeder.factory) {}; - - /// Dtor - virtual ~EORandomBreedLog() {}; - - /** Takes the genetic pool, and returns next generation, destroying the - * genetic pool container - * Non-const because it might order the operator std::vector. In this case, it mates - * all population randomly */ - virtual void operator() ( EOPop< EOT >& _ptVeo ) { - - unsigned select= _ptVeo.size(); // New population same size than old - sort( vecOp.begin(), vecOp.end(), SortEOpPt() ); - - unsigned i; - float totalPriority = 0; - for ( i = 0; i < vecOp.size(); i ++ ) { - totalPriority += vecOp[i]->Priority(); - } - - unsigned inLen = _ptVeo.size(); // size of in subPop - for ( i = 0; i < select; i ++ ) { - // Create a copy of a random input EO with copy ctor - EOT* newEO = factory.make( _ptVeo[ i ] ); - - // Choose operator - float randomDraw = totalPriority *(rand() % 1000) /1000.0; - vecOpT::const_iterator j; - float accumulated = 0; - for ( j = vecOp.begin(); - ( j != vecOp.end() ) && ( accumulated < randomDraw); - j ++ ) { - accumulated+= (*j)->Priority(); // the priority - } - - if ( j != vecOp.begin() ) - j--; // previous one - EOOp* thisOp = *j; - - if (thisOp->readArity() == unary ) { - MonOp* mopPt = dynamic_cast< MonOp* > ( thisOp ); - (*mopPt)( *newEO ); - } else { - unsigned chosenMatch = rand() % inLen; - BinOp* bopPt = dynamic_cast< BinOp* > ( thisOp ); - (*bopPt)( *newEO, _ptVeo[chosenMatch] ); - } - - } - - }; -private: - EOFactory& factory; - -}; - -#endif diff --git a/eo/src/obsolete/eoRandomIndiSelector.h b/eo/src/obsolete/eoRandomIndiSelector.h deleted file mode 100644 index 990c6c4ad..000000000 --- a/eo/src/obsolete/eoRandomIndiSelector.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoRandomIndiSelector.h - Selects individuals at random. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoRandomIndiSelector_h -#define eoRandomIndiSelector_h - -#include - -/** -\ingroup selectors - * eoRandomSelector: just selects a random child -*/ -template -class eoRandomIndiSelector : public eoPopIndiSelector -{ - public : - - eoRandomIndiSelector(void) : eoPopIndiSelector() {} - virtual ~eoRandomIndiSelector(void) {} - - /// very complex function that returns just an individual - const EOT& do_select(void) - { - return operator[](rng.random(size())); - } - -}; - -#endif - - diff --git a/eo/src/obsolete/eoRandomSelect.h b/eo/src/obsolete/eoRandomSelect.h deleted file mode 100644 index 26faa9eae..000000000 --- a/eo/src/obsolete/eoRandomSelect.h +++ /dev/null @@ -1,130 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - - -//----------------------------------------------------------------------------- -// eoRandomSelect.h - -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef EORANDOMSELECT_H -#define EORANDOMSELECT_H - -//----------------------------------------------------------------------------- - -#include -#include // for accumulate - -#include - -#include -#include - -//----------------------------------------------------------------------------- - -/** - * eoRandomSelect: an selection operator, which selects randomly a percentage - - of the initial population. - */ -template class eoRandomSelect: public eoBinPopOp -{ - public: - /// - eoRandomSelect(const float& _percent = 0.4): - eoBinPopOp(), repRate(_percent) {}; - - /// - virtual ~eoRandomSelect() {}; - - /// Takes a percentage of the population randomly, and transfers it to siblings - virtual void operator() ( eoPop& _parents, eoPop& _siblings ) { - // generates random numbers - unsigned num_chroms = (unsigned)(repRate * _parents.size()); - - // selection of chromosomes - do { - _siblings.push_back(_parents[rng.random(_parents.size())]); - } while (_siblings.size() < num_chroms); - } - - - - /// @name Methods from eoObject - - //@{ - - /** - - * Read object. Reads the percentage - - * Should call base class, just in case. - - * @param _s A std::istream. - - */ - - virtual void readFrom(std::istream& _s) { - - _s >> repRate; - - } - - - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - - it can be reimplemented anywhere. Instance from base classes are processed in - - base classes, so you don´t have to worry about, for instance, fitness. - - @param _s the std::ostream in which things are written*/ - - virtual void printOn( std::ostream& _s ) const{ - - _s << repRate; - - } - - - - /** Inherited from eoObject - - @see eoObject - - */ - - std::string className() const {return "eoRandomSelect";}; - - - - //@} - - - - - private: - float repRate; -}; - -//----------------------------------------------------------------------------- - -#endif EOGSRANDOMSELECT_H diff --git a/eo/src/obsolete/eoRank.h b/eo/src/obsolete/eoRank.h deleted file mode 100644 index 588fb1dab..000000000 --- a/eo/src/obsolete/eoRank.h +++ /dev/null @@ -1,140 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - - -//----------------------------------------------------------------------------- - -// eoRank.h - -// (c) GeNeura Team 1999 - -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - - -#ifndef _eoRank_H - -#define _eoRank_H - - -#include - -#include - - -/** - * Takes those on the selection std::list and creates a std::list of new individuals - * Destroys the genetic pool. There's no requisite on EOT, other than the - * genetic operators can be instantiated with it, so it fully depstd::ends on - * the genetic operators used. If generic genetic operators are used, then - * EOT must be an EO - */ - -template -class eoRank: public eoSelect, public eoObject, public eoPrintable -{ - public: - - /// Ctor - eoRank( unsigned _newPopSize, eoOpSelector& _opSelector) - :eoSelect(), opSelector( _opSelector ), repNewPopSize( _newPopSize ) {}; - - /// Dtor - virtual ~eoRank() {}; - - /** Takes the genetic pool, and returns next generation, destroying the - * genetic pool container - * Non-const because it might order the operator std::vector*/ - virtual void operator() ( const eoPop< EOT >& _ptVeo, - - eoPop< EOT >& _siblings ) const { - - unsigned inLen = _ptVeo.size(); // size of subPop - if ( !inLen ) - throw std::runtime_error( "zero population in eoRank"); - - for ( unsigned i = 0; i < repNewPopSize; i ++ ) { - // Create a copy of a random input EO with copy ctor. The members of the - // population will be selected by rank, with a certain probability of - // being selected several times if the new population is bigger than the - // old - - EOT newEO = _ptVeo[ i%inLen ]; - - // Choose operator - - const eoOp& thisOp = opSelector.Op(); - if ( thisOp.readArity() == unary ) { - const eoMonOp& mopPt = dynamic_cast< const eoMonOp& > ( thisOp ); - mopPt( newEO ); - } else { - const eoBinOp& bopPt = dynamic_cast< const eoBinOp& > ( thisOp ); - - EOT mate = _ptVeo[ rng.random(inLen) ]; - bopPt( newEO, mate ); - } - - - _siblings.push_back( newEO ); - } - }; - - /** This is a _new_ function, non defined in the parent class - * It´s used to set the selection rate */ - void select( unsigned _select ) { - repNewPopSize = _select; - } - - - - - /// Methods inherited from eoObject - - //@{ - - - - /** Return the class id. - - @return the class name as a std::string - - */ - - virtual std::string className() const { return "eoRank"; }; - - virtual void printOn( std::ostream& _s ) const - { - _s << repNewPopSize; - }; - - - - - - //@} - - -private: - eoOpSelector & opSelector; - unsigned repNewPopSize; - -}; - -#endif diff --git a/eo/src/obsolete/eoScheme.h b/eo/src/obsolete/eoScheme.h deleted file mode 100644 index a66695b0f..000000000 --- a/eo/src/obsolete/eoScheme.h +++ /dev/null @@ -1,360 +0,0 @@ -// eoScheme.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoScheme.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOSCHEME_H -#define _EOSCHEME_H - -using namespace std; - -/** -@author Geneura Team -- EEAAX 99 -@version 0.0 - Evolution scheme - - - It seems to me that some important conceptual object is missing - (and God knows I hate turning everything into objects! - - So here is the evolution scheme: - - regroups selection (nb of offspring to generate AND selection method - and replacement (from parents + offspring) - - allows to include elitism, eugenism of the worst, ... more easily - - a generation is then simply an evolution scheme and some operators - and a full algo is a generation + a termination condition - - this is mainly a container class -*/ - -//----------------------------------------------------------------------------- - -#include -#include "eoStochTournament.h" -#include "eoDetTournament.h" -#include "eoLottery.h" -#include "eoUniformSelect.h" -#include "eoInclusion.h" -#include "eoESReplace.h" -#include "eoEPTournament.h" - -/** eoScheme is a class that does more sophisticated evolution that eoEasyEA - */ -template -class eoScheme: public eoAlgo{ - - public: - - // Dtor - virtual ~eoScheme() {}; - - // copy ctor is impossible because of pointers to pure virual types. - // any idea???? --- leave the default copy ctor -- JJ - - /** the Parser-based constructor - these switch cases could be turned into as many subclasses - - but how do you return the subclass to the caller of the constructor??? - */ - eoScheme(Parser & parser) { - // read the popsize - parser.AddTitle("Description of evolution"); - std::string Evol; - std::string SelectString; - // temporary - float rate_offspring; - - try { - Evol = parser.getString("-EE", "--evolution", "GGA", - "Evolution scheme (GGA, SSGA, ESPlus, ESComma, EP, General)" ); - popsize = parser.getInt("-EP", "--population", "10", - "Population size" ); - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - // now the big switch - if (! strcasecmp(Evol.c_str(), "GGA") ) { - // GGA parameters: popsize, selection method (and its parameters) - nb_offspring = 0; - rate_offspring = 1.0; // generational replacement: #offspring=popsize - try { - // parser.AddTitle("GGA Parameters"); - SelectString = parser.getString("-ES", "--selection", "Tournament", - "Selection method (Roulette, tournament)" ); - if (! strcasecmp(SelectString.c_str(), "roulette") ) { - ptselect = new eoLottery (); - ptselect_mate = new eoLottery (); - } - if (! strcasecmp(SelectString.c_str(), "tournament") ) { - float rate = parser.getFloat("-Et", "--TselectSize", "2", - "Tournament size or rate" ); - if (rate < 0.5) - throw out_of_range("Invalid tournament rate"); - else if ( rate < 1 ) { // binary stochastic tournament - ptselect = new eoStochTournament(rate); - ptselect_mate = new eoStochTournament(rate); - } else { // determeinistic tournament of size (int)rate - ptselect = new eoDetTournament((int)rate); - ptselect_mate = new eoDetTournament((int)rate); - } - } - // end choice of selection - ptreplace = new eoInclusion(); - // put here the choice of elitism - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - } // end of GGA - - // SSGA - standard, one offspring only at the moment - if (! strcasecmp(Evol.c_str(), "SSGA") ) { - // SSGA parameters: popsize, selection tournament size - // the replacement is limited to repace_worst, though - // it could be easy to add the anti-tournament replacement method - nb_offspring = 1; - // NOTE: of course it's a bit of a waste to use the standard loop - // for one single offspring ... - try { - // parser.AddTitle("SSGA Parameters"); - float _rate = parser.getFloat("-ET", "--TSelectSize", "2", - "Selection tournament size" ); - if ( _rate < 1 ) { // binary stochastic tournament - ptselect = new eoStochTournament(_rate); - ptselect_mate = new eoStochTournament(_rate); - } else { // determeinistic tournament of size (int)rate - ptselect = new eoDetTournament((int)_rate); - ptselect_mate = new eoDetTournament((int)_rate); - } - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - // end choice of selection - ptreplace = new eoInclusion(); - // put here the choice of elitism - } // end of SSGA - - if (! strcasecmp(Evol.c_str(), "ESPlus") ) { - // ES evolution parameters: lambda = _nb_offspring - - try { - // parser.AddTitle("ES Scheme parameters"); - nb_offspring = parser.getInt("-EL", "--lambda", "50", - "Lambda" ); - ptselect = new eoUniformSelect(); - ptselect_mate = new eoUniformSelect(); - ptreplace = new eoESPlus(); - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - } // end of ESPlus - - if (! strcasecmp(Evol.c_str(), "ESComma") ) { - // ES evolution parameters: lambda = _nb_offspring - - try { - // parser.AddTitle("ES Scheme parameters"); - nb_offspring = parser.getInt("-EL", "--lambda", "50", - "Lambda" ); - ptselect = new eoUniformSelect(); - ptselect_mate = new eoUniformSelect(); - ptreplace = new eoESComma(); - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - } // end of ESCOmma - - if (! strcasecmp(Evol.c_str(), "EP") ) { - // EP evoltion scheme: only the EP-tournament replacement size is neede - - try { - // parser.AddTitle("EP Scheme parameters"); - nb_offspring = popsize; - ptselect = new eoCopySelect; /* no selection */ - ptselect_mate = new eoUniformSelect(); - /* What, crossover in EP :-) */ - unsigned tsize = parser.getInt("-ET", "--TournamentSize", "6", - "Size of stocahstic replacement tournament" ); - ptreplace = new eoEPTournament(tsize); - } - catch (std::exception & e) - { - std::cout << e.what() << std::endl; - parser.printHelp(); - exit(1); - } - } // end of EP - - - // everyting is read: now the consistency checks and other preliminary steps - nb_offspring = (nb_offspring ? nb_offspring : - (int) (rate_offspring * popsize) ); - if (!nb_offspring) - nb_offspring = 1; /* al least one offspring */ - - } - - - // accessors - unsigned PopSize(){return popsize;} - unsigned NbOffspring(){return nb_offspring ;} - eoSelect* PtSelect(){return ptselect;} - eoSelect* PtSelectMate(){return ptselect_mate;} - eoMerge* PtMerge() {return ptreplace;} - // NOTE: need pointers otherwise you have many warnings when initializing - - /** @name Methods from eoObject */ - //@{ - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - std::string className() const {return "eoScheme";}; - //@} - private: - unsigned popsize; /* but should it be here ??? */ - unsigned nb_offspring; /* to generate through selection+operators */ - - // these are provisional for later use - - // float rate_offspring; /* or rate */ - // unsigned nb_survive; /* the best guys that are transmitted anyway */ - // float rate_survive; /* or rate */ - // unsigned nb_die; /* the worst guys that do not enev enter selection */ - // float rate_die; /* or rate */ - - eoSelect * ptselect; - eoSelect* ptselect_mate; - eoMerge* ptreplace; - bool elitism; /* put back old best in the new population if necessary */ -}; -/* examples: - for most populat schemes, nb_survive = nb_die = 0 - in GGA and EP, nb_offspring = pop.size() - in ES, nb_offspring = lambda - in SSGA, nb_offspring = 1 (usually) - - elitism can be used anywhere - though stupid in ES, EP and SSGA who are - estd::list by definition -*/ - -#endif _EOSCHEME_H - -/* - ///////////////////////////////// - /// Applies one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - // Determine the number of offspring to create - // either prescribed, or given as a rate - unsigned nb_off_local = (nb_offspring ? nb_offspring : - (int) rint (rate_offspring * pop.size()) ); - nb_off_local = (nb_off_local ? nb_off_local : 1); // in case it is rounded to 0! - - // the worst die immediately - unsigned nb_die_local = (nb_die ? nb_die : - (int) rint (rate_die * pop.size()) ); - // and the best will survive without selection - unsigned nb_survive_local = (nb_survive ? nb_survive : - (int) rint (rate_survive * pop.size()) ); - - // before selection, erase the one to die - // sort old pop - just in case! - sort(pop.begin(), pop.end(), greater()); - Fitness oldBest = pop[0].fitness(); // store for elitism - eoPop fertilepop = pop; - if (nb_die_local) - erase(fertilepop.end()-nb_die_local, fertilepop.end()); - - eoPop offspring; // = select(fertilepop, nb_off_local); - select(fertilepop, offspring, nb_off_local); - - // now apply the operators to offspring - for (unsigned i=0; i* op = seqselop.Op(&id); - while (op) { // NULL if no more operator - EOT mate; - if (op->readArity() == binary) // can eventually be skipped - mate = select_mate(pop, tmp); // though useless ig mutation - else - mate = tmp; // assumed: mate will not be used! - std::cout << op->className() << " for offspring " << i << std::endl; - tmp = (*op)( tmp, mate, pop ); - op = seqselop.Op(&id); - } - offspring[i]=tmp; //* where it belongs - } - - eoPop::iterator i; - // Can't use foreach here since foreach takes the - // parameter by reference - for ( i = offspring.begin(); i != offspring.end(); i++) - evaluator(*i); - - //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // not exact - later!!! - // -MS- - - // first, copy the ones that need to survive - // assumed: pop is still sorted! - eoPop finalPop; - // and the best survive without selection - if (nb_survive_local) { - finalPop.resize(nb_survive_local); - copy( finalPop.begin(), fertilepop.begin(), - fertilepop.begin()+nb_survive_local ); - } - - // now call the replacement method - replace(finalPop, tmpPop); - - // handle elitlism - sort(finalPop.begin(), finalPop.end(), greater()); - if (elitism) { - if ( finalPop[0].fitness() < oldBest ) // best fitness has decreased! - copy(finalPop.end()-1, pop[0]); - } - // return finalPop; - } -*/ diff --git a/eo/src/obsolete/eoSelectRandom.h b/eo/src/obsolete/eoSelectRandom.h deleted file mode 100644 index 84ea72f81..000000000 --- a/eo/src/obsolete/eoSelectRandom.h +++ /dev/null @@ -1,52 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSelectRandom.h -// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef eoSelectRandom_h -#define eoSelectRandom_h - -//----------------------------------------------------------------------------- - -#include -#include - -//----------------------------------------------------------------------------- -/** eoSelectRandom: a selection method that selects ONE individual randomly - -MS- 22/10/99 */ -//----------------------------------------------------------------------------- - -template class eoSelectRandom: public eoSelectOne -{ - public: - - /// not a big deal!!! - virtual const EOT& operator()(const eoPop& pop) - { - return pop[rng.random(pop.size())] ; - } -}; - -#endif eoSelectRandom_h - diff --git a/eo/src/obsolete/eoSequentialGOpSel.h b/eo/src/obsolete/eoSequentialGOpSel.h deleted file mode 100644 index 63acac43b..000000000 --- a/eo/src/obsolete/eoSequentialGOpSel.h +++ /dev/null @@ -1,55 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoSequentialGOpSel.h - Sequential Generalized Operator Selector. - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com), GeNeura Team 1998, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -#ifndef eoSequentialGOpSel_h -#define eoSequentialGOpSel_h - -//----------------------------------------------------------------------------- - -#include -/** eoSequentialGOpSel: return a sequence of - operations to be applied one after the other. The order of the - operators is significant. If for instance you first add a - quadratic operator and then a mutation operator, - - @see eoGeneralOp, eoCombinedOp -*/ -template -class eoSequentialGOpSel : public eoGOpSelector -{ -public : - - virtual eoGeneralOp& selectOp() - { - return combined.bind(*this, getRates()); - } - -private : - - eoCombinedOp combined; -}; - -#endif - diff --git a/eo/src/obsolete/eoSimpleDEA.h b/eo/src/obsolete/eoSimpleDEA.h deleted file mode 100644 index 3eef44c79..000000000 --- a/eo/src/obsolete/eoSimpleDEA.h +++ /dev/null @@ -1,105 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSimpleDEA.h -// (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _eoSimpleDEA_h -#define _eoSimpleDEA_h - -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include - -/** eoSimpleDEA: a very simple Distribution Evolution Algorithm - * - * The algorithm that evolves a probability distribution - * on the spaces of populations with the loop - * generate a population from the current distribution - * evaluate that population - * update the distribution -*/ - -template class eoSimpleDEA: public eoDEA -{ - public: - - /** Ctor from an eoDistribUpdater - * ... plus an eoEval and eoContinue of course - */ - eoSimpleDEA(eoDistribUpdater& _update, - eoEvalFunc& _eval, - unsigned _popSize, - eoContinue& _continuator - ) : - update(_update), - eval(_eval), - popSize(_popSize), - continuator(_continuator) - {} - - /** The algorithm: - * generate pop from distrib, - * evaluate pop, - * update distrib - */ - virtual void operator()(eoDistribution& _distrib) - { - eoPop pop(popSize, _distrib); - do - { - try - { - apply(_distrib, pop); // re-init. of _pop from distrib - - apply(eval, pop); // eval of current population - - update(_distrib, pop); // updates distrib from _pop - - } - catch (std::exception& e) - { - std::string s = e.what(); - s.append( " in eoSimpleDEA"); - throw std::runtime_error( s ); - } - } while ( continuator( pop ) ); - } - - private: - eoDistribUpdater & update; - - eoEvalFunc& eval; - - unsigned popSize; - - eoContinue& continuator; -}; - -//----------------------------------------------------------------------------- - -#endif - diff --git a/eo/src/obsolete/eoSteadyStateEA.h b/eo/src/obsolete/eoSteadyStateEA.h deleted file mode 100644 index caa9ebedd..000000000 --- a/eo/src/obsolete/eoSteadyStateEA.h +++ /dev/null @@ -1,84 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSteadyStateEA.h -// (c) GeNeura Team, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _eoSteadyStateEA_h -#define _eoSteadyStateEA_h - -//----------------------------------------------------------------------------- - -#include -#include - -/** EOSteadyStateEA: - An easy-to-use evolutionary algorithm, just supply - a general operator selector, a selector for choosing the ones - to reproduce and an eoSteadyStateInserter that takes care of evaluating - and inserter the guy/girl in the steady state population. -*/ -template class eoSteadyStateEA: public eoAlgo -{ - public: - /// Constructor. - eoSteadyStateEA( - eoGOpSelector& _opSelector, - eoSelectOne& _selector, - eoSteadyStateInserter& _inserter, - eoContinue& _continuator, - unsigned _steps = 0 ) - : step(_opSelector, _selector, _inserter, _steps), - continuator( _continuator) - {}; - - /// Constructor from an already created generation - eoSteadyStateEA(eoSteadyStateTransform& _gen, - eoContinue& _continuator): - step(_gen), - continuator( _continuator){}; - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) { - do { - try - { - step(pop); - } - catch (std::exception& e) - { - std::string s = e.what(); - s.append( " in eoSteadyStateEA "); - throw std::runtime_error( s ); - } - } while ( continuator( pop ) ); - - } - - private: - eoSteadyStateTransform step; - eoContinue& continuator; -}; - -//----------------------------------------------------------------------------- - -#endif eoEasyEA_h - diff --git a/eo/src/obsolete/eoSteadyStateInserter.h b/eo/src/obsolete/eoSteadyStateInserter.h deleted file mode 100644 index 57fd187e4..000000000 --- a/eo/src/obsolete/eoSteadyStateInserter.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoSteadyStateInserter.h - Still abstract population insertion operator that is initialized with - and eoEvalFunc object to be able to evaluate individuals before inserting - them. - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoSteadyStateInserter_h -#define eoSteadyStateInserter_h - - -#include -#include - -/** - * eoSteadyStateInserter: Interface class that enables an operator to update - * a population with a new individual... it contains an eoEvalFunc derived object to - * make sure that every individual is evaluated before it is inserted -*/ -template -class eoSteadyStateInserter : public eoPopInserter -{ -public : - eoSteadyStateInserter(eoEvalFunc& _eval): - eoPopInserter(), - eval(_eval) {} - -protected : - eoEvalFunc& eval; -}; - - -#endif diff --git a/eo/src/obsolete/eoSteadyStateTransform.h b/eo/src/obsolete/eoSteadyStateTransform.h deleted file mode 100644 index 890920a77..000000000 --- a/eo/src/obsolete/eoSteadyStateTransform.h +++ /dev/null @@ -1,88 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoSteadyStateTransform.h -// (c) Maarten Keijzer 2000, GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef eoSteadyStateTransform_h -#define eoSteadyStateTransform_h - -//----------------------------------------------------------------------------- - -#include // eoPop -#include - -#include -#include -#include - -//----------------------------------------------------------------------------- - -/** eoSteadyStateTransform - * Single step of a steady state evolutionary algorithm. - * Proceeds by updating one individual at a time, by first selecting parents, - * creating one or more children and subsequently overwrite (a) bad individual(s) -*/ -template class eoSteadyStateTransform: public eoTransform -{ - public: - /// Constructor. - eoSteadyStateTransform( - eoGOpSelector& _opSelector, - eoSelectOne& _selector, - eoSteadyStateInserter& _inserter, - unsigned _steps = 0) : - opSelector(_opSelector), - selector(_selector), - inserter(_inserter) , - steps(_steps) {}; - - - /// Apply one generation of evolution to the population. - virtual void operator()(eoPop& pop) - { - unsigned nSteps = steps; - if (nSteps == 0) - { - nSteps = pop.size(); // make a 'generation equivalent' - } - - for (unsigned i = 0; i < nSteps; ++i) - { - selector.bind(pop); - inserter.bind(pop); - - opSelector.selectOp()(selector, inserter); - } - - } - - private: - eoGOpSelector& opSelector; - eoSelectOneIndiSelector selector; - eoSteadyStateInserter& inserter; - unsigned steps; -}; - -//----------------------------------------------------------------------------- - -#endif eoGeneration_h - diff --git a/eo/src/obsolete/eoStochTournament.h b/eo/src/obsolete/eoStochTournament.h deleted file mode 100644 index 5569ce624..000000000 --- a/eo/src/obsolete/eoStochTournament.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoStochTournament.h -// (c) GeNeura Team, 1998 - EEAAX 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - */ -//----------------------------------------------------------------------------- - -#ifndef eoStochTournament_h -#define eoStochTournament_h - -//----------------------------------------------------------------------------- - -#include -#include // accumulate -#include // eoSelectOne -#include // stochastic_tournament - -//----------------------------------------------------------------------------- -/** eoStochTournament: a selection method that selects ONE individual by - binary stochastic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - -template class eoStochTournament: public eoSelectOne -{ - public: - - /// - eoStochTournament(float _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) - { - // consistency check - if (Trate < 0.5) { - std::cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; - Trate = 0.55; - } - } - - /** Perform the stochastic tournament */ - virtual const EOT& operator()(const eoPop& pop) - { - return stochastic_tournament(pop, Trate); - } - -private: - float Trate; -}; - -//----------------------------------------------------------------------------- - -#endif eoDetTournament_h - diff --git a/eo/src/obsolete/eoStochTournamentInserter.h b/eo/src/obsolete/eoStochTournamentInserter.h deleted file mode 100644 index 3856aeccb..000000000 --- a/eo/src/obsolete/eoStochTournamentInserter.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoStochTournamentInserter.h - Concrete steady state inserter. It is initialized with a population and - inserts individuals in the population based on an inverse stochastic - tournament - - (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -#ifndef eoStochTournamentInserter_h -#define eoStochTournamentInserter_h - - -#include -#include - -/** -\ingroup inserters - * eoStochTournamentInserter: Uses an inverse stochastic tournament to figure - * out who gets overridden by the new individual. It resets the fitness of the - * individual. -*/ -template -class eoStochTournamentInserter : public eoSteadyStateInserter -{ -public : - - eoStochTournamentInserter(eoEvalFunc& _eval, double _t_rate): - eoSteadyStateInserter(_eval), t_rate(_t_rate) - { - if (t_rate < 0.5) - { // warning, error? - t_rate = 0.55; - } - - if (t_rate >= 1.0) - { - t_rate = 0.99; // 1.0 would mean deterministic tournament - } - } - - eoInserter& operator()(const EOT& _eot) - { - EOT& eo = inverse_stochastic_tournament(pop(), t_rate); - eo = _eot; // overwrite loser of tournament - - eo.invalidate(); - return *this; - } - - std::string className(void) const { return "eoStochTournamentInserter"; } - -private : - double t_rate; -}; - -#endif diff --git a/eo/src/obsolete/eoStringMutation.h b/eo/src/obsolete/eoStringMutation.h deleted file mode 100644 index 1612da4a9..000000000 --- a/eo/src/obsolete/eoStringMutation.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoStringMutation.h -// (c) GeNeura Team, 1999 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOSTRINGMUTATION_H -#define _EOSRTINGMUTATION_H - -#include -// EO includes -#include -#include -#include - -/** Mutation of an eoString. - The eoString's genes are changed by adding or substracting 1 to -*/ - -template -class eoStringMutation: public eoMutation { - public: - - /// - eoStringMutation(const double _rate=0.0) : eoMutation< EOT >(_rate) {}; - - /// - virtual ~eoStringMutation() {}; - - /** @name Methods from eoObject - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoStringMutation";}; - //@} - - - private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO. It increments or decrements the value of that gene by one. - virtual void applyAt( EOT& _eo, unsigned _i ) const { - if( rate < uniform() ) { - _eo.gene(_i) += ( rng.flip(0.5))? (1) : (-1) ; - } - } - -}; - -//----------------------------------------------------------------------------- - -#endif diff --git a/eo/src/obsolete/eoTerm.h b/eo/src/obsolete/eoTerm.h deleted file mode 100644 index 198cb939b..000000000 --- a/eo/src/obsolete/eoTerm.h +++ /dev/null @@ -1,56 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoTerm.h -// (c) GeNeura Team, 1999, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOTERM_H -#define _EOTERM_H - -//#include - -// forward definition for fast(er) compilation -template class eoPop; - - -/** Termination condition for the genetic algorithm - * Takes the population as input, returns true for continue, - * false for termination (although this begs the question why this - * terminator is not called a continuator) - * - */ -template< class EOT> -class eoTerm : public eoObject { -public: - - /// Ctors/dtors - virtual ~eoTerm() {}; - - /** Returns false if the training has to stop, true if it - continues \\ - It is non-const since it might change the internal state - of the object, for instance, updating local data. - */ - virtual bool operator() ( const eoPop< EOT >& _pop ) = 0 ; -}; - -#endif - diff --git a/eo/src/obsolete/eoTournament.h b/eo/src/obsolete/eoTournament.h deleted file mode 100644 index 01dc4619e..000000000 --- a/eo/src/obsolete/eoTournament.h +++ /dev/null @@ -1,157 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - - -//----------------------------------------------------------------------------- - -// eoTournament.h - -// (c) GeNeura Team, 1998 - -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - - - -#ifndef _EOGSTOURN_H -#define _EOGSTOURN_H - - -//----------------------------------------------------------------------------- - - -#include -#include - - -//----------------------------------------------------------------------------- - - -/** Selects those who are going to reproduce using Tournament selection: - - a subset of the population of size tournamentSize is chosen, - - and the best is selected for the new population . -@author JJ Merelo, 1998 -*/ -template -class eoTournament:public eoBinPopOp{ -public: - - /// Proportion of guys that are going to be eliminated - eoTournament( float _perc, unsigned _tSize): - eoBinPopOp(), perc( _perc), repTournamentSize(_tSize){}; - - /// Virtual dtor - ~eoTournament(){}; - - /// Set tourn size - void tournamentSize( unsigned _size ) { repTournamentSize = _size; }; - - /** - * Selects from the initial pop using tournament selection, and copies it - - * to the other population. - */ - virtual void operator() ( eoPop& _vEO, eoPop& _aVEO) { - - unsigned thisSize = _vEO.size(); - - // Build std::vector - for ( unsigned j = 0; j < thisSize*perc; j ++ ) { - // Randomly select a tournamentSize set, and choose the best - eoPop veoTournament; - - for ( unsigned k = 0; k < repTournamentSize; k++ ) { - unsigned chosen = rng.random(thisSize); - EOT newEO = _vEO[chosen]; - veoTournament.push_back( newEO ); - } - - eoPop::const_iterator best = std::max_element(veoTournament.begin(), - veoTournament.end()); - if (best == veoTournament.end()) { - throw std::runtime_error("error in void eoTournament::operator(eoPop&, eoPop&)"); - } - - // The best individual is chosen for the new population - _aVEO.push_back( *best ); - } - }; - - - /// @name Methods from eoObject - - //@{ - - /** - - * Read object. Reads the percentage - - * Should call base class, just in case. - - * @param _s A std::istream. - - */ - - virtual void readFrom(std::istream& _s) { - - _s >> perc >> repTournamentSize; - - } - - - - /** Print itself: inherited from eoObject implementation. Declared virtual so that - - it can be reimplemented anywhere. Instance from base classes are processed in - - base classes, so you don´t have to worry about, for instance, fitness. - - @param _s the std::ostream in which things are written*/ - - virtual void printOn( std::ostream& _s ) const{ - - _s << perc << std::endl << repTournamentSize << std::endl; - - } - - - - /** Inherited from eoObject - - @see eoObject - - */ - - std::string className() const {return "eoTournament";}; - - - - //@} - - - private: - - float perc; - unsigned repTournamentSize; - -}; - -#endif diff --git a/eo/src/obsolete/eoTranspose.h b/eo/src/obsolete/eoTranspose.h deleted file mode 100644 index 51671830a..000000000 --- a/eo/src/obsolete/eoTranspose.h +++ /dev/null @@ -1,94 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoTranspose.h -// (c) GeNeura Team, 1998 Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOTRANSPOSE_h -#define _EOTRANSPOSE_h - -#include -#include - -#include -#include -#include -#include -/** -Transposition operator: interchanges the position of two genes -of an EO. -*/ -template -class eoTranspose: public eoMonOp -{ -public: - - // Specialization for a std::vector - void operator()(eoFixedLength& _eo ) - { - unsigned pos1 = rng.random(_eo.size()), - pos2 = rng.random(_eo.size()); - - if (pos1 != pos2) - swap(_eo[pos1], _eo[pos2]); - - if (_eo[pos1] != _eo[pos2]) - _eo.invalidate(); - } - - // Specialization for a std::list - void operator()(eoVariableLength& _eo ) - { - unsigned pos1 = rng.random(_eo.size()), - pos2 = rng.random(_eo.size()); - - if (pos1 == pos2) - return; - - if (pos1 > pos2) - swap(pos1,pos2); - - pos2 -= pos1; - - typename EOT::iterator it1 = _eo.begin(); - - while (pos1--) {it1++;} - - typename EOT::iterator it2 = it1; - - while (pos2--) {it2++;} - - swap(*it1, *it2); - - if (*it1 != *it2) - _eo.invalidate(); - } - - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoTranspose";}; - //@} - -}; - -#endif - diff --git a/eo/src/obsolete/eoUniformXOver.h b/eo/src/obsolete/eoUniformXOver.h deleted file mode 100644 index 76623a0ec..000000000 --- a/eo/src/obsolete/eoUniformXOver.h +++ /dev/null @@ -1,176 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - - -//----------------------------------------------------------------------------- - -// eoUniformXOver.h - -// (c) GeNeura Team, 1998 - -/* - - This library is free software; you can redistribute it and/or - - modify it under the terms of the GNU Lesser General Public - - License as published by the Free Software Foundation; either - - version 2 of the License, or (at your option) any later version. - - - - This library is distributed in the hope that it will be useful, - - but WITHOUT ANY WARRANTY; without even the implied warranty of - - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - - Lesser General Public License for more details. - - - - You should have received a copy of the GNU Lesser General Public - - License along with this library; if not, write to the Free Software - - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - - */ - -//----------------------------------------------------------------------------- - - - -#ifndef _EOUNIFORMXOVER_h - -#define _EOUNIFORMXOVER_h - - - - - -// for swap - -#if defined( __BORLANDC__ ) - -#include - -#else - -#include - -#endif - - - -// EO includes - -#include - -#include - - - -//----------------------------------------------------------------------------- - -/** - - * EOUniformCrossover: operator for binary chromosomes - - * implementation of uniform crossover for EO - - * swaps ranges of bits between the parents - - */ - -//----------------------------------------------------------------------------- - - - -template - -class eoUniformXOver: public eoQuadraticOp< EOT > - -{ - - public: - - - - /// - - eoUniformXOver( float _rate = 0.5 ): - - eoQuadraticOp< EOT > ( ), rate( _rate ) { - - if (rate < 0 || rate > 1) - - std::runtime_error("UxOver --> invalid rate"); - - } - - - - - - /// - - void operator() ( EOT& chrom1, EOT& chrom2 ) const { - - unsigned end = min(chrom1.length(),chrom2.length()) - 1; - - // select bits to change - - // aply changes - - for (unsigned bit = 0; bit < end; bit++) - - if (rng.flip(rate)) - - swap(chrom1[ bit], chrom2[ bit]); - - } - - - - /** @name Methods from eoObject - - readFrom and printOn are directly inherited from eoOp - - */ - - //@{ - - /** Inherited from eoObject - - @see eoObject - - */ - - std::string className() const {return "eoUniformXOver";}; - - //@} - - - -private: - - float rate; /// rate of uniform crossover - -}; - - - -//----------------------------------------------------------------------------- - - - - - -#endif - diff --git a/eo/src/obsolete/eoVector.h b/eo/src/obsolete/eoVector.h deleted file mode 100644 index 315683f57..000000000 --- a/eo/src/obsolete/eoVector.h +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoVector.h - Turns an STL std::vector into an EO - (c) GeNeura Team, 1998 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es -*/ - -//----------------------------------------------------------------------------- - -#ifndef _eoVector_H -#define _eoVector_H - -// STL libraries -#include // For std::vector -#include -#include - -#include -#include - -/** Adaptor that turns an STL std::vector into an EO - with the same gene type as the type with which - the std::vector has been instantiated -*/ -template -class eoVector: public eo1d, public std::vector { -public: - typedef T Type ; - - /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator - //@{ - - /** Ctor. - @param _size Lineal length of the object - @param _val Common initial value - */ - eoVector( unsigned _size = 0, T _val = 0) - : eo1d(), std::vector( _size, _val ){ }; - - /** Ctor using a random number generator - @param _size Lineal length of the object - @param _rnd a random number generator, which returns a random value each time it´s called - */ - eoVector( unsigned _size, eoRnd& _rnd ); - - /** Ctor from a std::istream. The T class should accept reading from a std::istream. It doesn't read fitness, -which is supposed to be dynamic and dependent on environment. - @param _is the input stream; should have all values in a single line, separated by whitespace - */ - eoVector( std::istream& _is); - - - /// copy ctor - eoVector( const eoVector & _eo ) - : eo1d( _eo ), std::vector( _eo ){ }; - - /// Assignment operator - const eoVector& operator =( const eoVector & _eo ) { - if ( this != &_eo ){ - eo1d::operator=( _eo ); - std::vector::operator=( _eo ); - } - return *this; - } - - /// dtor - virtual ~eoVector() {}; - - //@} - - /** methods that implement the eo1d protocol - @std::exception out_of_range if _i is larger than EO´s size - */ - virtual T getGene( unsigned _i ) const { - if ( _i >= length() ) - throw out_of_range( "out_of_range when reading gene"); - return (*this)[_i]; - }; - - /** methods that implement the eo1d protocol - @std::exception out_of_range if _i is larger than EO´s size - */ - virtual void setGene( unsigned _i, const T& _value ) { - if ( _i >= size() ) - throw out_of_range( "out_of_range when writing a gene"); - (*this)[_i] = _value; - }; - - /** methods that implement the eo1d protocol - @std::exception out_of_range if _i is larger than EO´s size - */ - virtual void insertGene( unsigned _i, T _val ) { - if (_i <= size() ) { - std::vector::iterator i = begin()+_i; - insert( i, _val ); - } else { - throw out_of_range( "out_of_range when inserting a gene"); - } - }; - - /** Eliminates the gene at position _i - @std::exception out_of_range if _i is larger than EO´s size - */ - virtual void deleteGene( unsigned _i ) { - if (_i < this->size() ) { - std::vector::iterator i = this->begin()+_i; - this->erase( i ); - } else { - throw out_of_range( "out_of_range when deleting a gene"); - }; - }; - - /// methods that implement the EO protocol - virtual unsigned length() const { return this->size(); }; - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoVector";}; - //@} - -}; - - -//____________________________ Some method implementation _______________________ - -// Ctors______________________________________________________________________________ -//____________________________________________________________________________________ -template -eoVector::eoVector( unsigned _size, eoRnd& _rnd ) - : eo1d(), std::vector( _size ){ - for ( iterator i = begin(); i != end(); i ++ ) { - *i = _rnd(); - } -}; - -//____________________________________________________________________________________ -template -eoVector::eoVector( std::istream& _is) - : eo1d(), std::vector( ){ - while (_is ) { - T tmp; - _is >> tmp; - push_back( tmp ); - } - -}; - -#endif diff --git a/eo/src/obsolete/eoWrappedOps.h b/eo/src/obsolete/eoWrappedOps.h deleted file mode 100644 index 805bb29e7..000000000 --- a/eo/src/obsolete/eoWrappedOps.h +++ /dev/null @@ -1,200 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoWrappedOps.h - Derived from the General genetic operator, which can be used to wrap any unary or binary - operator. File also contains the eoCombinedOp, needed by the eoSequentialGOpSelector - - (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ - -//----------------------------------------------------------------------------- - -#ifndef eoWrappedOps_h -#define eoWrappedOps_h - -//----------------------------------------------------------------------------- - -#include // eoOp, eoMonOp, eoBinOp -#include - -using namespace std; - -/// Wraps monary operators -template -class eoWrappedMonOp : public eoGeneralOp -{ -public : - /// - eoWrappedMonOp(eoMonOp& _op) : eoGeneralOp(), op(_op) {}; - - /// - virtual ~eoWrappedMonOp() {} - - /// Instantiates the abstract method - void operator()( eoIndiSelector& _in, - eoInserter& _out) - { - EOT result = _in(); - op( result ); - _out(result); - } - -private : - eoMonOp& op; -}; - - -/// Wraps binary operators -template -class eoWrappedBinOp : public eoGeneralOp -{ -public : - /// - eoWrappedBinOp(eoBinOp& _op) : eoGeneralOp(), op(_op) {} - - /// - virtual ~eoWrappedBinOp() {} - - /// Instantiates the abstract method. EOT should have copy ctor. - void operator()(eoIndiSelector& _in, - eoInserter& _out) - { - EOT out1 = _in(); - const EOT& out2 = _in(); - op(out1, out2); - _out(out1); - } - -private : - eoBinOp& op; -}; - -/// Wraps Quadratic operators -template -class eoWrappedQuadraticOp : public eoGeneralOp -{ -public : - /// - eoWrappedQuadraticOp(eoQuadraticOp& _op) : eoGeneralOp(), op(_op) {} - - /// - virtual ~eoWrappedQuadraticOp() {} - - /// Instantiates the abstract method. EOT should have copy ctor. - void operator()(eoIndiSelector& _in, - eoInserter& _out) - { - EOT out1 = _in(); - EOT out2 = _in(); - op(out1, out2); - _out(out1)(out2); - } - -private : - eoQuadraticOp& op; -}; - -#include - -template -class eoCombinedOp : public eoGeneralOp -{ - public : - eoCombinedOp& bind(const std::vector*>& _ops, const std::vector& _rates) - { - ops = &_ops; - rates = &_rates; - return *this; - } - - class eoDelayedSelector : public eoIndiSelector - { - public : - eoDelayedSelector(eoIndiSelector& _select, const eoPop& _pop) : select(_select), pop(_pop), it(pop.begin()) {} - - unsigned size() const { return select.size();} - const EOT& operator[](size_t i) const { return select[i]; } - - /// will first dispense all previously selected individuals before returning new ones - const EOT& operator()(void) - { - if (it == pop.end()) - { - return select(); - } - // else - return *it++; - } - - eoPop::const_iterator get_it(void) const { return it; } - private : - eoIndiSelector& select; - const eoPop& pop; - eoPop::const_iterator it; - }; - - /** Applies all ops in the combined op - It first applies the - */ - void operator()( eoIndiSelector& _in, - eoInserter& _out ) - { - eoPop intermediate; - eoPop next; - unsigned i; - - for (i = 0; i < ops->size(); ++i) - { - eoDelayedSelector delay(_in, intermediate); - inserter.bind(next); - - unsigned counter = 0; - - // apply operators until we have as many outputs as inputs - do - { - if (rng.flip(rates->operator[](i))) // should this flip be here? - (*ops->operator[](i))(delay, inserter); - - counter++; - if (counter > 1000) - { - throw std::logic_error("eoCombinedOp: no termination after 1000 tries, did you forget to insert individuals in your eoGeneralOp?"); - } - } - while (next.size() < intermediate.size()); - - intermediate.swap(next); - next.resize(0); - } - - // after last swap, results can be found in intermediate - for (i = 0; i < intermediate.size(); ++i) - _out(intermediate[i]); - } - - private : - const std::vector*>* ops; - const std::vector* rates; - eoBackInserter inserter; -}; - -#endif - diff --git a/eo/src/obsolete/eoXOver2.h b/eo/src/obsolete/eoXOver2.h deleted file mode 100644 index d1f538526..000000000 --- a/eo/src/obsolete/eoXOver2.h +++ /dev/null @@ -1,107 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoXOver2.h -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ -//----------------------------------------------------------------------------- - -#ifndef _EOXOVER2_h -#define _EOXOVER2_h - - -// for swap -#if defined( __BORLANDC__ ) -#include -#else -#include -#endif - -// EO includes -#include -#include - -/** 2-point crossover: takes the genes in the central section of two EOs -and interchanges it -*/ -template -class eoXOver2: public eoQuadraticOp { -public: - /// - eoXOver2() - : eoQuadraticOp< EOT >(){}; - - /// - virtual ~eoXOver2() {}; - - /// - virtual void operator()( EOT& _eo1, - EOT& _eo2 ) const { - unsigned len1 = _eo1.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - - unsigned pos1 = rng.random(len), pos2 = rng.random(len) ; - - applyAt( _eo1, _eo2, pos1, pos2 ); - - } - - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eoOp - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - std::string className() const {return "eoXOver2";}; - //@} - -private: - -#ifdef _MSC_VER - typedef EOT::Type Type; -#else - typedef typename EOT::Type Type; -#endif - - /// applies operator to one gene in the EO - virtual void applyAt( EOT& _eo, EOT& _eo2, - unsigned _i, unsigned _j = 0) const { - - if ( _j < _i ) - swap( _i, _j ); - - unsigned len1 = _eo.length(), len2 = _eo2.length(), - len= (len1 > len2)?len2:len1; - - if ( (_j > len) || (_i> len ) ) - throw std::runtime_error( "xOver2: applying xOver past boundaries"); - - for ( unsigned i = _i; i < _j; i++ ) { - Type tmp = _eo.gene( i ); - _eo.gene( i ) = _eo2.gene( i ); - _eo2.gene( i ) = tmp ; - } - - } - -}; - -#endif - diff --git a/eo/src/obsolete/evolution_strategies b/eo/src/obsolete/evolution_strategies deleted file mode 100644 index d1c729ba9..000000000 --- a/eo/src/obsolete/evolution_strategies +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _eoEs_h -#define _eoEs_h - -#include -#include -#include -#include - -#include -#include - -#include - - -#endif From 044d1223bb638c63869c5ccaebd6951d8da530bd Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 18:20:56 +0100 Subject: [PATCH 1618/2134] Create more doxygen groups for base classes, clean some doc --- eo/src/EO.h | 29 +++++++++++++++++++++++------ eo/src/eoCombinedInit.h | 3 ++- eo/src/eoInit.h | 10 +++++++++- eo/src/eoInitializer.h | 9 +++++++-- eo/src/eoObject.h | 9 +++++---- eo/src/eoOp.h | 23 ++++++++++++++++------- eo/src/eoParticleBestInit.h | 8 +++++++- eo/src/eoParticleFullInitializer.h | 7 ++++++- eo/src/eoPersistent.h | 18 ++++++------------ eo/src/eoPrintable.h | 14 ++++++++------ eo/src/eoSwapMutation.h | 2 ++ eo/src/eoVector.h | 8 ++++++++ eo/src/eoVectorParticle.h | 7 +++++++ eo/src/eoVelocityInit.h | 8 ++++++++ 14 files changed, 114 insertions(+), 41 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index 07dfb77dc..7d8f5f551 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -31,15 +31,30 @@ #include // eoObject #include // eoPersistent -//----------------------------------------------------------------------------- -/** EO is a base class for evolvable objects, that is, the subjects of +/** + @defgroup Core Core components + + This are the base classes from which useful objects inherits. + + @{ + */ + +/** EO is the base class for objects with a fitness. + + Those evolvable objects are the subjects of evolution. EOs have only got a fitness, which at the same time needs to be only an object with the operation less than (<) defined. Fitness says how good is the object; evolution or change of these objects is left to the - genetic operators. A fitness less than another means a worse fitness, in + genetic operators. + + A fitness less than another means a worse fitness, in whatever the context; thus, fitness is always maximized; although it can - be minimized with a proper definition of the < operator. The fitness - object must have, besides an void ctor, a copy ctor. + be minimized with a proper definition of the < operator. + + A fitness can be invalid if undefined, trying to read an invalid fitness will raise an error. + @ref Operators that effectively modify EO objects must invalidate them. + + The fitness object must have, besides an void ctor, a copy ctor. */ template class EO: public eoObject, public eoPersistent { @@ -150,6 +165,8 @@ private: bool invalidFitness; // true if the value of fitness is invalid }; -//----------------------------------------------------------------------------- #endif + +/** @} */ + diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 68f21970b..67fa02306 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -29,8 +29,9 @@ /** Combined INIT: a proportional recombination of eoInit objects -*/ + @ingroup Initializators +*/ template< class EOT> class eoCombinedInit: public eoInit { public: diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index 87d38fee1..f787b9335 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -34,6 +34,14 @@ #include #include // for shuffle method + +/** + @defgroup Initializators Initialization operators + @ingroup Operators + + Initializators are operators that creates initial individuals and populations. +*/ +/** @{*/ /** Base (name) class for Initialization of chromosomes, used in a population contructor. It is derived from eoMonOp, so it can be used @@ -41,7 +49,6 @@ @see eoPop */ - template class eoInit : public eoUF { @@ -202,3 +209,4 @@ class eoInitAdaptor : public eoMonOp }; #endif +/** @}*/ diff --git a/eo/src/eoInitializer.h b/eo/src/eoInitializer.h index 63fbd6454..d31908943 100644 --- a/eo/src/eoInitializer.h +++ b/eo/src/eoInitializer.h @@ -33,8 +33,13 @@ #include #include +/** + @addtogroup Initializators + @{ + */ -/* + +/** * Abstract class for initialization of algorithm PSO */ template class eoInitializerBase : public eoFunctorBase @@ -137,5 +142,5 @@ class eoDummy : public eoUF }; #endif - +/** @} */ diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 7f6039053..2e59f1905 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -33,16 +33,16 @@ #include -//----------------------------------------------------------------------------- -// eoObject -//----------------------------------------------------------------------------- -/** +/* eoObject used to be the base class for the whole hierarchy, but this has changed. eoObject is used to define a name (#className#) that is used when loading or saving the state. Previously, this object also defined a print and read interface, but it´s been moved to eoPrintable and eoPersistent. +*/ + +/** Defines a name (#className#), used when loading or saving a state. It is recommended that you only derive from eoObject in concrete classes. Some parts of EO do not implement this yet, but that will change in the future. @@ -51,6 +51,7 @@ framework that is only needed when the classes have state that changes at runtim @see eoPersistent eoPrintable, eoState + @ingroup Core */ class eoObject { diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 81c7c9d61..f4277463d 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -30,14 +30,13 @@ #include #include /** -\defgroup Operators -Genetic Operators are used for various purposes -*/ +@defgroup Operators Operators -/** @name Genetic operators +in EO, an operator is any functors that modifies objects and inherits from an eoOp. -What is a genetic algorithm without genetic operators? -There is a genetic operator hierarchy, with eoOp as father and +Typically, a mutation is an operator that modifies an individual, and an algorithm is an operator that modifies a population. + +In EO, there is a genetic operator hierarchy, with eoOp as father and eoMonOp (monary or unary operator), eoBinOp and eoQuadOp (binary operators) and eoGenOp (any number of inputs and outputs, see eoGenOp.h) as subclasses. @@ -53,9 +52,19 @@ how to build them from a description in a file. @version 0.9 @see eoGenOp.h eoOpFactory */ - //@{ +/** +@defgroup Variators Variation operators +Variators are operators that modify individuals. + +@defgroup Selectors Selection operators +Selectors are operators that select a subset of a population. + +@defgroup Replacors Replacement operators +Replacors are operators that replace a subset of a population by another set of individuals. +*/ + /** Abstract data types for EO operators. Genetic operators act on chromosomes, changing them. The type to use them on is problem specific. If your genotype diff --git a/eo/src/eoParticleBestInit.h b/eo/src/eoParticleBestInit.h index b847f7162..dd6a6a823 100644 --- a/eo/src/eoParticleBestInit.h +++ b/eo/src/eoParticleBestInit.h @@ -30,9 +30,13 @@ //----------------------------------------------------------------------------- /** - * Abstract class for particle best position initialization. + @addtogroup Initializators + @{ */ +/** + * Abstract class for particle best position initialization. + */ template < class POT > class eoParticleBestInit:public eoUF < POT &, void > { public: @@ -75,3 +79,5 @@ public: #endif /*_EOPARTICLEBESTINIT_H */ +/** @} */ + diff --git a/eo/src/eoParticleFullInitializer.h b/eo/src/eoParticleFullInitializer.h index d800db5b4..8ec414dfe 100644 --- a/eo/src/eoParticleFullInitializer.h +++ b/eo/src/eoParticleFullInitializer.h @@ -33,6 +33,11 @@ #include #include +/** + @addtogroup Initializators + @{ + */ + /* * Abstract class for initialization of algorithm PSO @@ -145,5 +150,5 @@ template class eoParticleInitializer : public eoInitializerBase // std::istream, std::ostream #include // para std::string -//----------------------------------------------------------------------------- #include "eoPrintable.h" -//----------------------------------------------------------------------------- -// eoPersistent -//----------------------------------------------------------------------------- +/** + @addtogroup Core + @{ +*/ + /** An persistent object that knows how to write (through functions inherited from #eoPrintable#) and read itself @@ -64,9 +58,9 @@ class eoPersistent: public eoPrintable }; -//----------------------------------------------------------------------------- ///Standard input for all objects in the EO hierarchy std::istream & operator >> ( std::istream& _is, eoPersistent& _o ); #endif +/** @} */ diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index 256383dc6..4326f09ad 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -30,15 +30,17 @@ #include // std::istream, std::ostream #include // para std::string -//----------------------------------------------------------------------------- -// eoPrintable -//----------------------------------------------------------------------------- +/* +This functionality was separated from eoObject, since it makes no sense to print +some objects (for instance, a #eoFactory# or a random number generator. +*/ + /** Base class for objects that can print themselves (#printOn#). Besides, this file defines the standard output for all the objects; -if the objects define printOn there's no need to define #operator <<#.\\ -This functionality was separated from eoObject, since it makes no sense to print -some objects (for instance, a #eoFactory# or a random number generator. +if the objects define printOn there's no need to define #operator <<#. + + @ingroup Core */ class eoPrintable { diff --git a/eo/src/eoSwapMutation.h b/eo/src/eoSwapMutation.h index 0eda64162..aab729b2e 100644 --- a/eo/src/eoSwapMutation.h +++ b/eo/src/eoSwapMutation.h @@ -34,6 +34,8 @@ /** * Swap two components of a chromosome. + * + * @ingroup Variators */ template class eoSwapMutation: public eoMonOp { diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index ce85391f6..8600b62d4 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -28,6 +28,12 @@ Old contact: todos@geneura.ugr.es, http://geneura.ugr.es #include #include + +/** + @addtogroup Core + @{ +*/ + /** Base class for fixed length chromosomes It just derives from EO and std::vector and redirects the smaller than @@ -35,6 +41,7 @@ operator to EO (fitness based comparison). GeneType must have the following methods: void ctor (needed for the std::vector<>), copy ctor, + */ template class eoVector : public EO, public std::vector @@ -143,6 +150,7 @@ bool operator>(const eoVector& _eo1, const eoVector + +/** + @addtogroup Core + @{ +*/ + /** * Main class for particle representation of particle swarm optimization. The positions, velocities and the best positions * associated to the particle are stored as vectors. Inheriting from PO and std::vector, @@ -146,3 +152,4 @@ public: }; #endif /*_EOVECTORPARTICLE_H*/ +/** @} */ diff --git a/eo/src/eoVelocityInit.h b/eo/src/eoVelocityInit.h index a8000d6db..4a096f4c6 100644 --- a/eo/src/eoVelocityInit.h +++ b/eo/src/eoVelocityInit.h @@ -32,6 +32,11 @@ #include #include +/** + @addtogroup Initializators + @{ + */ + /** Abstract class for velocities initilization of particle swarm optimization.*/ template < class POT > class eoVelocityInit:public eoInit < POT > { @@ -137,3 +142,6 @@ private: }; #endif /*EOVELOCITYINIT_H */ + +/** @} */ + From 91c169770193e877c2d24a0c82d4b3d3d2975be0 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 22:08:37 +0100 Subject: [PATCH 1619/2134] more explanations in doc main page, remove HTML markup, remove deprecated link pages --- eo/doc/index.h | 109 ++++++++++++++++++------------------------------- 1 file changed, 40 insertions(+), 69 deletions(-) diff --git a/eo/doc/index.h b/eo/doc/index.h index 35de836cf..079397a44 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -2,87 +2,58 @@ @section intro Introduction -EO is a templates-based, ANSI-C++ compliant evolutionary computation library. It -contains classes for almost any kind of evolutionary computation you might come + %EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast. + +It contains classes for almost any kind of evolutionary computation you might come up to - at least for the ones we could think of. It is component-based, so that if you don't find the class you need in it, it is very easy to subclass existing abstract or concrete classes. +Designing an algorithm with %EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks. + +If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution). + +If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in %EO. @section tutorial Tutorial -The best place to learn about the features and approaches of EO is to look at +The best place to learn about the features and approaches of %EO is to look at the tutorial. - -@section install Installation - -The installation procedure of the package is detailed in the README file in the top-directory of the source-tree. - - - @section design Overall Design -For an introduction to the design of EO you can look at the slides from a talk -at EA 2001 or the corresponding article in Lecture Notes In -Computer Science 2310, Selected Papers from the 5th European -Conference on Artificial Evolution. +%EO is a framework. It is oriented toward facilitating the design of adhoc evolutionary algorithms. +It is not (at the moment) a complete library of algorithms ready to use on canonical problems. + +If you have a well-known problem and want to solve it as soon as possible, try another software. +If you have a real problem and want to build the best evolutionary algorithm to solve it, you've made +the good choice. + +Bascially, %EO manipulate "individuals" with a "fitness", that is objects +encoding a solution to a given optimization problem, associated with +the quality of this solution. The fitness is defined in the %EO class, +but the representation of a solution cannot be as generic. Thus, %EO +massively use templates, so that you will not be limited by interfaces +when using your own representation. + +Once you have a representation, you will build your own evolutionary algorithm +by assembling @ref Operators in @ref Algorithms. +In %EO, most of the objects are functors, that is classes with an operator(), that you +can call just as if they were classical functions. For example, an algorithm is a +functor, that manipulate a population of individuals, it will be implemented as a functor, +with a member like: operator()(eoPop). Once called on a given population, it will +search for the optimum of a given problem. + +Generally, operators are instanciated once and then binded in an algorithm by reference. +Thus, you can easily build you own algorithm by trying several combination of operators. + +For an more detailled introduction to the design of %EO you can look at the +slides from a talk at EA 2001 or at the corresponding +article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th European Conference on Artificial Evolution: + - http://portal.acm.org/citation.cfm?id=727742 + - http://eodev.sourceforge.net/eo/doc/LeCreusot.pdf + - http://eodev.sourceforge.net/eo/doc/EO_EA2001.pdf */ - - -/** @page webpages Related webpages - -- EO homepage -- EO Tutorial. -- SourceForge project page -- README -- NEWS -*/ - - - -/** @page Related Projects - -

        ParadisEO

        - -ParadisEO is a project that -extends EO for the flexible design of single solution-based metaheuristics, -metaheuristics for multi objective optimization as well as hybrid, parallel and distributed -metaheuristics. -*/ - - - -/** An old TODO list for EO, this could be updated... - -@todo (old) Provide a way to easily manipulate the algorithm in runtime, be it from -grafically or text; expand command-line capabities? - -@todo (old) Provide a graphical interface for Windows, in VC++ or BBuilder. - -@todo (old) Create more examples of the objects of which there is only one instance: -algorithms, evaluators. Try to adapt most well-know algorithms to EO - -@todo (old) Integrate the gTK interface seamlessly in the library. - -@todo Complete documentation. - -@todo (for release 1.1) Update README, INSTALL, ... for cmake based build system. -*/ - - - -// Local Variables: -// coding: iso-8859-1 -// mode: C++ -// c-file-offsets: ((c . 0)) -// c-file-style: "Stroustrup" -// fill-column: 80 -// End: From 4310aaf5cc059bcf301e4e709866f336a3de3fcc Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 22:09:40 +0100 Subject: [PATCH 1620/2134] =?UTF-8?q?replace=20TODO=20comments=20by=20@?= =?UTF-8?q?=C5=A7odo=20doxygen=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/eoFlOrBinOp.h | 2 +- eo/src/eoFlOrQuadOp.h | 2 +- eo/src/eoSTLFunctor.h | 2 +- eo/src/eoVariableLengthCrossover.h | 2 +- eo/src/es/eoCMABreed.h | 2 +- eo/src/es/eoCMAInit.h | 2 +- eo/src/gp/parse_tree.h | 4 ++-- eo/src/utils/eoFileSnapshot.h | 2 +- eo/src/utils/eoOStreamMonitor.cpp | 3 ++- eo/src/utils/eoParser.cpp | 4 ++-- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/eo/src/eoFlOrBinOp.h b/eo/src/eoFlOrBinOp.h index 124ca4fd4..2dda394d4 100644 --- a/eo/src/eoFlOrBinOp.h +++ b/eo/src/eoFlOrBinOp.h @@ -109,7 +109,7 @@ public : } bool changed = false; - for ( unsigned i = 0; i < k; i++ ) // TODO: check that we don't do twice the same + for ( unsigned i = 0; i < k; i++ ) //! @todo check that we don't do twice the same { unsigned where = eo::rng.random(_eo1.size()); bool changedHere = op( _eo1[where], _eo2[where] ); diff --git a/eo/src/eoFlOrQuadOp.h b/eo/src/eoFlOrQuadOp.h index 1ad873c48..0e4b9a465 100644 --- a/eo/src/eoFlOrQuadOp.h +++ b/eo/src/eoFlOrQuadOp.h @@ -101,7 +101,7 @@ public : } bool changed = false; - for ( unsigned i = 0; i < k; i++ ) // TODO: check that we don't do twice the same + for ( unsigned i = 0; i < k; i++ ) //! @todo check that we don't do twice the same { unsigned where = eo::rng.random(_eo1.size()); bool changedHere = op( _eo1[where], _eo2[where] ); diff --git a/eo/src/eoSTLFunctor.h b/eo/src/eoSTLFunctor.h index 74c206036..ca8b9233e 100644 --- a/eo/src/eoSTLFunctor.h +++ b/eo/src/eoSTLFunctor.h @@ -113,6 +113,6 @@ class eoSTLBF : public std::binary_function eoBF& f; }; -// TODO: put automated wrappers here... +//! @todo: put automated wrappers here... #endif diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index ff86c60f6..9d604ea87 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -251,7 +251,7 @@ public : } while ( ( (tmp1.size()Max) || (tmp2.size()>Max) ) && (index<10000) ); - // FIXME bad hardcoded limit, should use an algorithm that guarantee a correct size in a finite number of tries + //! @todo FIXME bad hardcoded limit, should use an algorithm that guarantee a correct size in a finite number of tries if (index >= 10000) { eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; diff --git a/eo/src/es/eoCMABreed.h b/eo/src/es/eoCMABreed.h index 1c998c426..d55ab2610 100644 --- a/eo/src/es/eoCMABreed.h +++ b/eo/src/es/eoCMABreed.h @@ -31,7 +31,7 @@ #include -/// TODO, handle bounds +/// @todo handle bounds template class eoCMABreed : public eoBreed< eoVector > { diff --git a/eo/src/es/eoCMAInit.h b/eo/src/es/eoCMAInit.h index b605cd990..bce9e5baf 100644 --- a/eo/src/es/eoCMAInit.h +++ b/eo/src/es/eoCMAInit.h @@ -32,7 +32,7 @@ #include #include -/// TODO, handle bounds +/// @todo handle bounds template class eoCMAInit : public eoInit< eoVector > { diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index ba4a38614..0e85b576f 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -181,9 +181,9 @@ template class parse_tree class subtree { -/* +/** a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) - TODO: use the std::allocator interface + @todo use the std::allocator interface */ #if (defined(__GNUC__) || defined(_MSC_VER)) && !(defined(_MT) || defined(MACOSX) || defined(__APPLE__)) // not multithreaded (or MACOSX - J. Eggermont) diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 7392c70a4..c9e58c746 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -43,7 +43,7 @@ Assumes that the parameters that are passed to the monitor A dir is created and one file per snapshot is created there - so you can later generate a movie! -TODO: The counter is handled internally, but this should be changed +@todo The counter is handled internally, but this should be changed so that you can pass e.g. an evalcounter (minor) I failed to templatize everything so that it can handle eoParam > diff --git a/eo/src/utils/eoOStreamMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp index 073793d82..f47096d01 100644 --- a/eo/src/utils/eoOStreamMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -37,7 +37,8 @@ eoMonitor& eoOStreamMonitor::operator()(void) } // if firstime // ok, now the real saving. write out - /* TODO old verbose formatting, do we still need it? + //! @todo old verbose formatting, do we still need it? + /* for (iterator it = vec.begin (); it != vec.end (); ++it) { // name: value out << (*it)->longName () << ": " << (*it)->getValue () << std::endl; diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index baefc48fa..f6c81f14a 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -164,7 +164,7 @@ pair eoParser::getValue(eoParam& _param) const result.first = true; return result; } - // else (TODO: check environment, just long names) + //! @todo check environment, just long names return result; } @@ -210,7 +210,7 @@ void eoParser::readFrom(istream& is) string value; if (equalLocation == str.end()) - { // TODO: it should be the next string + { //! @todo it should be the next string value = ""; } else From 8b9aea4a0b84169aefdc191470a9ff31ab457f8f Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 1 Nov 2010 23:08:58 +0100 Subject: [PATCH 1621/2134] more doc groups, cleaner modules hierarchy --- eo/src/PO.h | 2 ++ eo/src/eoBreed.h | 4 ++++ eo/src/eoOp.h | 5 ++++- eo/src/eoProportionalCombinedOp.h | 18 ++++++++++++++++-- eo/src/eoVector.h | 8 +++++++- eo/src/eoVectorParticle.h | 2 +- eo/src/ga/eoBit.h | 4 +++- eo/src/gp/eoParseTree.h | 3 ++- eo/src/gp/eoStParseTreeDepthInit.h | 2 ++ eo/src/utils/eoRealBounds.h | 4 +++- 10 files changed, 44 insertions(+), 8 deletions(-) diff --git a/eo/src/PO.h b/eo/src/PO.h index 1b15ef030..1cb4f50a4 100644 --- a/eo/src/PO.h +++ b/eo/src/PO.h @@ -35,6 +35,8 @@ defined. A best fitness also belongs to the particle.Fitness says how good is the particle for a current iteration whereas the best fitness can be saved for many iterations. + + @ingroup Core */ template < class F > class PO:public EO < F > { diff --git a/eo/src/eoBreed.h b/eo/src/eoBreed.h index c62cb213d..0b00ec584 100644 --- a/eo/src/eoBreed.h +++ b/eo/src/eoBreed.h @@ -41,6 +41,8 @@ eoBreed derived class rather than relying on a seperate select and transform function. @see eoSelect, eoTransform, eoSelectTransform + +@ingroup Combination */ template class eoBreed : public eoBF&, eoPop&, void> @@ -52,6 +54,8 @@ class eoBreed : public eoBF&, eoPop&, void> Special breeder that is just an application of an embedded select, followed by an embedded transform + +@ingroup Combination */ template class eoSelectTransform : public eoBreed diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index f4277463d..f263ef69f 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -30,7 +30,7 @@ #include #include /** -@defgroup Operators Operators +@defgroup Operators Evolutionary Operators in EO, an operator is any functors that modifies objects and inherits from an eoOp. @@ -59,9 +59,12 @@ how to build them from a description in a file. Variators are operators that modify individuals. @defgroup Selectors Selection operators + Selectors are operators that select a subset of a population. + @defgroup Replacors Replacement operators + Replacors are operators that replace a subset of a population by another set of individuals. */ diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index a03bb47b5..892c9b47c 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -30,13 +30,26 @@ #include #include #include + /** -\defgroup PropCombinedOperators -Combination of same-type Genetic Operators - Proportional choice +\defgroup Utilities Utilities + +Classes that may help you write elegant code. +*/ + +/** +@defgroup Combination Operators combination + +Classes that permits to combine several operators in a single one. + +@ingroup Utilities +@{ */ /** @name PropCombined Genetic operators +Combination of same-type Genetic Operators. + This files contains the classes eoPropCombinedXXXOp (XXX in {Mon, Bin, Quad}) that allow to use more than a single operator of a specific class into an algorithm, chosing by a roulette wheel based on user-defined rates @@ -214,3 +227,4 @@ std::vector rates; // for General Ops, it's another story - see eoOpContainer #endif +/** @} */ diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 8600b62d4..c11b8be66 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -30,7 +30,13 @@ Old contact: todos@geneura.ugr.es, http://geneura.ugr.es /** - @addtogroup Core + @defgroup Representations Representations + + Solution to a given optimization problem are using a given representation, and are called individuals. + + Some of the most classical representations are proposed, but you can create your own one, providing + that it inherits from the EO base class. It will be used as a template parameter in almost all operators. + @{ */ diff --git a/eo/src/eoVectorParticle.h b/eo/src/eoVectorParticle.h index 3173eed61..31d9c9816 100644 --- a/eo/src/eoVectorParticle.h +++ b/eo/src/eoVectorParticle.h @@ -29,7 +29,7 @@ /** - @addtogroup Core + @addtogroup Representations @{ */ diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 989f32100..758d1ee73 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -42,9 +42,11 @@ #include "eoVector.h" -/** @defgroup bitstring +/** @defgroup bitstring Bit strings Various functions for a bitstring representation + +@ingroup Representations */ /** Implementation of bitstring chromosome. diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index ca8530d67..cb5f32afa 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -40,8 +40,9 @@ using namespace gp_parse_tree; /** @defgroup ParseTree Various functions for tree-based Genetic Programming -*/ +@ingroup Representations +*/ /** Implementation of parse-tree for genetic programming diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index 5aeee4e9c..feb17be94 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -51,6 +51,8 @@ using namespace gp_parse_tree; \li int type(int child) which returns the required type for child 0, 1 or 2 Pruning strongly typed trees is not possible at the moment. + + \ingroup Representations */ /** eoStParseTreeDepthInit : the initializer class for strongly typed tree-based genetic programming diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index d67f4450d..83a6489a0 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -31,7 +31,9 @@ #include /** -\defgroup EvolutionStrategies +\defgroup EvolutionStrategies Continuous vector + +@ingroup Representations */ From 2773de7dda5b0c9ecb41923fd5cc678cd8e7cf09 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 2 Nov 2010 16:57:13 +0100 Subject: [PATCH 1622/2134] evolutionary algorithm diagram with lego blocks, fancier --- website/Evolutionary_algorithm.png | Bin 23716 -> 37131 bytes website/Evolutionary_algorithm.svg | 2189 +++++++++++++++++++++++++--- 2 files changed, 2006 insertions(+), 183 deletions(-) diff --git a/website/Evolutionary_algorithm.png b/website/Evolutionary_algorithm.png index fdf88c936c5f74f8626659b0f25817997e16b535..c6eb6b4e8b6643876fe42669880f824e69159131 100644 GIT binary patch literal 37131 zcmX_HV|XP^(>}4CjqPksY}@w9#tERf{ zyQ-@rloTY9;PK!A005G-l$Z(t07m=uJOm5sG{PhyoMI7X!YH#M^Zs=qRaCdiSu(Y#wHa2uHWw3WL&%EHn0{}<> z(qh7D9$9DE?pZ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C<+fYrV;BaHe)le}xq2%9{P+ue zvVL2rKT0X^ePAf6`(+{Kf(s!8UC?`|?xU#grI@K>e+%?jGOcedna^GKKgkDcKjX=# ze#Ps5dXLGuW4Utbc=mj8kgtvu@XGJsB70CeilU$>3PABsFhS7nwm>0Vbg^yg&S%jbqA_L7c9aGpBVXj(qDRByT z6?g^JT@Y?#1br7F=z_>X^CSUxW3IC~iT>*rYz96BUISL6x&vXhN6-%tf-Z<$OmV*+ zbFqlIKy-Kw>NX|7=><8~p}HHxY>%LyAp~8}H!vqF&A=4*`M}`t8q{HSV+!~hU{}O0 znJ4HM2tgP0O*Bt7FadKpy74U~IgA#aUQA;*u&ZUe8`WJEMwQfuNtzUqiwK0)gO?LkPM+AQ1EugrExq0zp6F{{shAb~=!H RTAly^002ovPDHLkV1i~rAjALw diff --git a/website/Evolutionary_algorithm.svg b/website/Evolutionary_algorithm.svg index 489f4424b..3da5964a2 100644 --- a/website/Evolutionary_algorithm.svg +++ b/website/Evolutionary_algorithm.svg @@ -1,28 +1,51 @@ - + version="1.0" + inkscape:export-filename="Evolutionary_algorithm.png" + inkscape:export-xdpi="43.47168" + inkscape:export-ydpi="43.47168" + sodipodi:docbase="/home/nojhan/travail/code/eodev/eodev/website"> + + + + + + + + @@ -60,7 +83,7 @@ style="overflow:visible"> @@ -74,7 +97,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + inkscape:window-maximized="1" + height="430px" + width="650px" /> - image/svg+xml Evolutionary Computation 2007-04-02 - + Johann "nojhan" Dréo - + i: initialization, f(X): evaluation, ?: stopping criterion, Se: selection, Cr: cross-over, Mu: mutation, Re: replacement, X*: optimu + + + + + + + + + + + + image/svg+xml + + Evolving Object + 2010-11-02 + + + nojhan + + + en-GB + An evolutionary algorithmas seen from the evolving objects framework: an interative algorithm that manipulates individuals with the help of operators. Implementing an algorithm consists in assembling operator instances, just as building something with Lego blocks. + +In green are the operators that are ready to use within EO, in yellow the operators that you may need to implement and in red the evaluator, that you should implement. @@ -215,188 +931,1295 @@ inkscape:groupmode="layer" transform="translate(0,-170)"> + style="fill:url(#linearGradient19046);fill-opacity:1;fill-rule:evenodd;stroke:#87aade;stroke-width:0.53694427;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 115.77497,527.63826 L 83.71875,532.17188 L 95.712466,562.23201 C 170.97302,605.84478 209.28691,646.08025 225.1875,762.6875 L 264.8125,757.3125 C 247.22079,628.30343 195.76724,573.99302 115.77497,527.63826 z " + id="path10284" + transform="matrix(-0.5767409,-0.3854301,-0.3342159,0.6651186,859.59462,55.131222)" + sodipodi:nodetypes="cccccc" /> + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#c4d6ef;fill-opacity:1;stroke:#87aade;stroke-width:0.49999997;marker:none;stroke-miterlimit:4;stroke-dasharray:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:aakar" + d="M 463.67639,218.6984 C 362.72274,194.13793 260.44433,256.38889 235.88386,357.34252 C 211.32339,458.29618 273.58173,560.54423 374.53538,585.1047 C 472.08269,608.83646 570.83161,551.53774 599.54173,456.56847 L 570.68756,478.16081 L 562.23204,441.53008 C 540.91857,518.78855 462.42422,565.31997 383.99096,546.23836 C 304.04223,526.78806 255.2999,446.74683 274.75019,366.79811 C 294.20049,286.84937 374.27208,238.11444 454.22081,257.56474 C 522.88324,274.26924 568.50751,335.68224 567.69752,403.33325 L 586.57322,432.46342 L 607.60347,406.08597 C 609.50839,319.55888 551.12318,239.97286 463.67639,218.6984 z " + id="path10296" + sodipodi:nodetypes="csscccssscccc" + transform="matrix(0.758252,0.126464,0.126464,-0.758252,-1.5536995,630.15328)" /> - Best solution + transform="matrix(0.7616981,0.1037061,0.1037061,-0.7616981,-1.5371625,648.7236)" + sodipodi:nodetypes="csscccssscccc" + id="path10294" + d="M 463.67639,218.6984 C 362.72274,194.13793 260.44433,256.38889 235.88386,357.34252 C 211.32339,458.29618 273.58173,560.54423 374.53538,585.1047 C 472.08269,608.83646 570.83161,551.53774 599.54173,456.56847 L 570.68756,478.16081 L 562.23204,441.53008 C 540.91857,518.78855 462.42422,565.31997 383.99096,546.23836 C 304.04223,526.78806 255.2999,446.74683 274.75019,366.79811 C 294.20049,286.84937 374.27208,238.11444 454.22081,257.56474 C 522.88324,274.26924 568.50751,335.68224 567.69752,403.33325 L 586.57322,432.46342 L 607.60347,406.08597 C 609.50839,319.55888 551.12318,239.97286 463.67639,218.6984 z " + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#d0def2;fill-opacity:1;stroke:#87aade;stroke-width:0.49999997;marker:none;stroke-miterlimit:4;stroke-dasharray:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:aakar" /> + + - + id="g6759" + transform="matrix(0.7687256,0,0,0.7687256,351.0073,174.00838)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Variation - - - - Stop. criteria? - - - - Initialization - - - - Evaluation - + id="g6879" + transform="matrix(0.7687256,0,0,0.7687256,508.4577,-21.249628)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Replacement + id="tspan6965" + y="190" + x="-251" + sodipodi:role="line">Variation - + id="g6999" + transform="matrix(0.7687256,0,0,0.7687256,689.89822,35.648343)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Selection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stop. criteria? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Replacement + Parents + style="font-size:13.83706093px;font-style:oblique;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:FreeSans" + id="text7359" + sodipodi:linespacing="125%">Best solution Genitors + style="font-size:13.83705997px;font-style:oblique;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:FreeSans" + id="text7363" + sodipodi:linespacing="125%">Parents Offsprings + style="font-size:13.83706093px;font-style:oblique;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:FreeSans" + id="text7367" + sodipodi:linespacing="125%">Genitors + Offsprings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Initialization + + + + + From 284b048dcc283d587c20d312149c994817313934 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 2 Nov 2010 17:23:27 +0100 Subject: [PATCH 1623/2134] readable size for the evolutionry algorithm diagram --- website/Evolutionary_algorithm.png | Bin 37131 -> 59854 bytes website/Evolutionary_algorithm.svg | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/Evolutionary_algorithm.png b/website/Evolutionary_algorithm.png index c6eb6b4e8b6643876fe42669880f824e69159131..4d26f56019146516ae0b6cd8444fe5337ee93172 100644 GIT binary patch literal 59854 zcmV*QKwrO!P)!Qs8__0?|M_j=p*+TC`mD1$9rv>ibN0)!dDBnb&5WKLD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G(V5&$r@)_*1@6UG#&OMqD= zvvA*r`|#F>Z{g$SkFl(F8QyMs8?C*q@R$0rymmSI!hLWsj*LJ}7Xt=jVysnE#N7ct zu(Qjw5Q=WOMkO}V!OK@*dBvs~QoOd!b zQ<&@dC@YnT`nJ)wbHr(c0`Jty@+z95##8Yx1X)X&J7|iYa3hB4iWDbu-J&e+8RQ3dH}^F+?6_@5YN}(Im|P5) zB9&t{@7-KjRakYu-Dbbf$v78(+w&(YQo5ldl8l@b6>(2*w0C#I$%eg0>yMgkolGtp zOp&^P{PeS*-t2Sv9F3B|uvaqL%>w5pW70(^Wjm0J=Gmj}! zGr&Df_Y{}=%IjGhd%wfxxa#c3#uF(?mE>3|_8Fhz_p}eS@7TI(>(L8mv5CpdVT#lY z^XS1x*LxhE2kf-{cFIE8&lahqoJ_`3@sDDu*q&3NQ#-b;+14@B_L`VnXiSm1NO)lX z17#(ik_TCx-Bj!-?u-bLJ;w)+zxUd@*8($bn~BLx^8coX?kcyAEu{be002ovPDHLk FV1k&zOPBxv diff --git a/website/Evolutionary_algorithm.svg b/website/Evolutionary_algorithm.svg index 3da5964a2..92fa3d4b1 100644 --- a/website/Evolutionary_algorithm.svg +++ b/website/Evolutionary_algorithm.svg @@ -19,8 +19,8 @@ inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.0" inkscape:export-filename="Evolutionary_algorithm.png" - inkscape:export-xdpi="43.47168" - inkscape:export-ydpi="43.47168" + inkscape:export-xdpi="65.20752" + inkscape:export-ydpi="65.20752" sodipodi:docbase="/home/nojhan/travail/code/eodev/eodev/website"> From 8e70cbea01f3229fa04bcac8b29b32b99bfc2934 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 5 Nov 2010 11:26:04 +0100 Subject: [PATCH 1624/2134] grouping classes in documentation --- eo/src/apply.h | 2 ++ eo/src/eoBinaryFlight.h | 2 ++ eo/src/eoBitParticle.h | 2 ++ eo/src/eoCloneOps.h | 4 ++++ eo/src/eoCombinedContinue.h | 3 ++- eo/src/eoConstrictedVariableWeightVelocity.h | 2 ++ eo/src/eoConstrictedVelocity.h | 2 ++ eo/src/eoContinue.h | 11 +++++++++++ eo/src/eoCounter.h | 2 ++ eo/src/eoCtrlCContinue.h | 7 ++++++- eo/src/eoDetSelect.h | 2 ++ eo/src/eoDetTournamentSelect.h | 6 +++--- eo/src/eoDistribUpdater.h | 2 +- eo/src/eoDistribution.h | 2 ++ eo/src/eoDualFitness.h | 7 ++++++- eo/src/eoEvalContinue.h | 2 ++ eo/src/eoEvalCounterThrowException.h | 2 ++ eo/src/eoEvalFunc.h | 12 +++++++++--- eo/src/eoEvalFuncCounter.h | 5 +++-- eo/src/eoEvalFuncCounterBounder.h | 17 ++++++++++++++--- eo/src/eoEvalFuncPtr.h | 2 ++ eo/src/eoEvalTimeThrowException.h | 7 +++++++ eo/src/eoExceptions.h | 4 ++++ eo/src/eoExtendedVelocity.h | 2 ++ eo/src/eoFactory.h | 5 ++++- eo/src/eoFitContinue.h | 9 ++++----- eo/src/eoFitnessScalingSelect.h | 2 ++ eo/src/eoFixedInertiaWeightedVelocity.h | 2 ++ eo/src/eoFlOrBinOp.h | 5 +++++ eo/src/eoFlOrMonOp.h | 5 +++++ eo/src/eoFlOrQuadOp.h | 5 +++++ eo/src/eoFlight.h | 3 ++- eo/src/eoFunctor.h | 5 +++++ eo/src/eoFunctorStore.h | 2 ++ eo/src/eoG3Replacement.h | 2 +- eo/src/eoGaussRealWeightUp.h | 2 ++ eo/src/eoGenContinue.h | 2 ++ eo/src/eoGenOp.h | 3 +++ eo/src/eoGeneralBreeder.h | 2 ++ 39 files changed, 140 insertions(+), 23 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 54cf162ee..0eb3484e5 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -31,6 +31,8 @@ /** Applies a unary function to a std::vector of things. + + @ingroup Utilities */ template void apply(eoUF& _proc, std::vector& _pop) diff --git a/eo/src/eoBinaryFlight.h b/eo/src/eoBinaryFlight.h index 425959e0f..9672bd3f3 100644 --- a/eo/src/eoBinaryFlight.h +++ b/eo/src/eoBinaryFlight.h @@ -34,6 +34,8 @@ /** Abstract class for binary flight of particle swarms. Positions are updated but are expected to be binary. * A function must be used to decide, according to continuous velocities, of the * new positions (0,1 ... ?) + * + * @ingroup Core */ template < class POT > class eoBinaryFlight:public eoFlight < POT >{}; diff --git a/eo/src/eoBitParticle.h b/eo/src/eoBitParticle.h index 9e21b541a..87f98aa1b 100644 --- a/eo/src/eoBitParticle.h +++ b/eo/src/eoBitParticle.h @@ -31,6 +31,8 @@ /** eoBitParticle: Implementation of a bit-coded particle (swarm optimization). * Positions and best positions are 0 or 1 but the velocity is a vector of double. + * + * @ingroup Bitstring */ template < class FitT> class eoBitParticle: public eoVectorParticle diff --git a/eo/src/eoCloneOps.h b/eo/src/eoCloneOps.h index 4af49c626..bdb9f0417 100644 --- a/eo/src/eoCloneOps.h +++ b/eo/src/eoCloneOps.h @@ -35,6 +35,9 @@ * within the eoGenOp framework * eoMonCloneOp will probably be useful as the copy operator * eoBinCloneOp will certainly never been used - but let's be complete :-) + * + * @addtogroup Core + * @{ */ /** @@ -76,4 +79,5 @@ virtual bool operator()(EOT& , EOT& ) {return false;} }; #endif +/** @} */ diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index ec644521d..2788f415b 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -36,8 +36,9 @@ and allow to easily handle more than 2 continuators 02/2003 Ramón Casero Cańas - added the removeLast() method -*/ +@ingroup Combination +*/ template< class EOT> class eoCombinedContinue: public eoContinue { public: diff --git a/eo/src/eoConstrictedVariableWeightVelocity.h b/eo/src/eoConstrictedVariableWeightVelocity.h index 76a000ff7..64139ea59 100644 --- a/eo/src/eoConstrictedVariableWeightVelocity.h +++ b/eo/src/eoConstrictedVariableWeightVelocity.h @@ -39,6 +39,8 @@ * At step t: v(t+1)= K * ( w*v(t) + c1*r1* (xbest(t)-x(t)) + c2*r2* (gbest(t) - x(t))) * w is updated each time the velocity performer is called and K is fixed * (ci given and Ri chosen at random in [0;1]). +* +* @ingroup Variators */ template < class POT > class eoConstrictedVariableWeightVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoConstrictedVelocity.h b/eo/src/eoConstrictedVelocity.h index ba3eb4f6e..d71e29b05 100644 --- a/eo/src/eoConstrictedVelocity.h +++ b/eo/src/eoConstrictedVelocity.h @@ -40,6 +40,8 @@ * C is fixed for all the particles and all the generations. * Default C = 2 * k / abs(2 - P - sqrt (P*(P-4))) * (ci and C given;P=c1*r1 + c2*r2 ; Ri chosen at random * in [0;1]) +* +* @ingroup Variators */ template < class POT > class eoConstrictedVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoContinue.h b/eo/src/eoContinue.h index 692d01f39..c49e8c952 100644 --- a/eo/src/eoContinue.h +++ b/eo/src/eoContinue.h @@ -29,9 +29,20 @@ #include #include +/** @defgroup Continuators Stopping criteria + * + * A stopping criterion is called a "continue". This is a functor that is called at each generation end + * and that return true if one should stop the search. + * + * @ingroup Utilities + */ + /** Termination condition for the genetic algorithm * Takes the population as input, returns true for continue, * false for termination + * + * @ingroup Continuators + * @ingroup Core */ template< class EOT> class eoContinue : public eoUF&, bool>, public eoPersistent diff --git a/eo/src/eoCounter.h b/eo/src/eoCounter.h index 05e08b21a..cb0b57cff 100644 --- a/eo/src/eoCounter.h +++ b/eo/src/eoCounter.h @@ -36,6 +36,8 @@ use this class instead of it. It is derived from eoValueParam so you can add it to a monitor. + + @ingroup Utilities */ template class eoProcedureCounter : public Procedure, public eoValueParam diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 797e294a9..b102a18ea 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -33,6 +33,11 @@ #include #include +/** + * @addtogroup Continuators + * @{ + */ + extern bool arret_demande, existCtrlCContinue; extern void signal_handler( int sig ); @@ -78,5 +83,5 @@ public: #endif +/** @} */ - // of MSVC comment-out diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index 9f7cb8781..2ad6cde05 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -35,6 +35,8 @@ //----------------------------------------------------------------------------- /** eoDetSelect selects many individuals determinisctically + * + * @ingroup Selectors */ template class eoDetSelect : public eoSelect diff --git a/eo/src/eoDetTournamentSelect.h b/eo/src/eoDetTournamentSelect.h index 7042a3394..81bbaba1d 100644 --- a/eo/src/eoDetTournamentSelect.h +++ b/eo/src/eoDetTournamentSelect.h @@ -36,12 +36,12 @@ #include #include -//----------------------------------------------------------------------------- /** eoDetTournamentSelect: a selection method that selects ONE individual by deterministic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- + -MS- 24/10/99 + @ingroup Selectors + */ template class eoDetTournamentSelect: public eoSelectOne { public: diff --git a/eo/src/eoDistribUpdater.h b/eo/src/eoDistribUpdater.h index 1749994fe..6166e7333 100644 --- a/eo/src/eoDistribUpdater.h +++ b/eo/src/eoDistribUpdater.h @@ -37,8 +37,8 @@ * * It takes one distribution and updates it according to one population * + * @ingroup Core */ - template class eoDistribUpdater : public eoBF &, eoPop &, void> diff --git a/eo/src/eoDistribution.h b/eo/src/eoDistribution.h index 9facd9160..1f38ab949 100644 --- a/eo/src/eoDistribution.h +++ b/eo/src/eoDistribution.h @@ -39,6 +39,8 @@ * * The instances will probably be eoValueParam of some kind * see eoPBILDistrib.h + * + * @ingroup Core */ template diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 946f95c6c..0ab99413f 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -30,7 +30,11 @@ Authors: #include #include // for std::pair -//! A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. +/** @addtogroup Evaluation + * @{ + */ + +//! A fitness class that permits to compare feasible and unfeasible individuals and guaranties that a feasible individual will always be better than an unfeasible one. /** * Use this class as fitness if you have some kind of individuals * that must be always considered as better than others while having the same fitness type. @@ -232,5 +236,6 @@ typedef eoDualFitness > eoMinimizingDualFitness; template< class EOT> bool eoIsFeasible ( const EOT & sol ) { return sol.fitness().is_feasible(); } +/** @} */ #endif // _eoDualFitness_h_ diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index c8af79fe3..05ac2f0a2 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -31,6 +31,8 @@ /** * Continues until a number of evaluations has been made + * + * @ingroup Continuators */ template< class EOT> class eoEvalContinue: public eoContinue diff --git a/eo/src/eoEvalCounterThrowException.h b/eo/src/eoEvalCounterThrowException.h index bf19e73ee..133d3afb8 100644 --- a/eo/src/eoEvalCounterThrowException.h +++ b/eo/src/eoEvalCounterThrowException.h @@ -41,6 +41,8 @@ The class first call the evaluation function, then check the number of times it has been called. If the maximum number of evaluation has been reached, it throw an eoMaxEvalException. You can catch this exception from your main function, so as to stop everything properly. + +@ingroup Evaluation */ template < typename EOT > class eoEvalCounterThrowException : public eoEvalFuncCounter< EOT > diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 3dfaeba07..275c5185b 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -27,17 +27,23 @@ #include +/** @defgroup Evaluation Evaluation + * @ingroup Operators + */ + /** Evaluate: takes one EO and sets its "fitness" property - * returning this fitness also. That is why EOT is passed by - * non-const reference: it must be altered within evaluate.\\ + returning this fitness also. That is why EOT is passed by + non-const reference: it must be altered within evaluate.\\ The requirements on the types with which this class is to be instantiated with are null, or else, they depend on the particular class it's going to be applied to; EO does not impose any requirement on it. If you subclass this abstract class, and use it to evaluate an EO, the requirements on this EO will depend on the evaluator. - */ + @ingroup Evaluation + @ingroup Core + */ template class eoEvalFunc : public eoUF { public : diff --git a/eo/src/eoEvalFuncCounter.h b/eo/src/eoEvalFuncCounter.h index b8532e2a4..55973d068 100644 --- a/eo/src/eoEvalFuncCounter.h +++ b/eo/src/eoEvalFuncCounter.h @@ -31,8 +31,9 @@ #include /** -Counts the number of evaluations actually performed, thus checks first -if it has to evaluate.. etc. +Counts the number of evaluations actually performed. + +@ingroup Evaluation */ template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam { diff --git a/eo/src/eoEvalFuncCounterBounder.h b/eo/src/eoEvalFuncCounterBounder.h index d9d83c18a..68c9770cc 100644 --- a/eo/src/eoEvalFuncCounterBounder.h +++ b/eo/src/eoEvalFuncCounterBounder.h @@ -4,6 +4,13 @@ #include #include +/** @addtogroup Evaluation + * @{ + */ + +/** The exception raised by eoEvalFuncCounterBounder + * when the maximum number of allowed evaluations is reached. + */ class eoEvalFuncCounterBounderException : public std::exception { public: @@ -20,9 +27,12 @@ private: unsigned long _threshold; }; -/** -Counts the number of evaluations actually performed, thus checks first -if it has to evaluate.. etc. +/** Counts the number of evaluations actually performed and throw an eoEvalFuncCounterBounderException + * when the maximum number of allowed evaluations is reached. + * + * This eval counter permits to stop a search during a generation, without waiting for a continue to be + * checked at the end of the loop. Useful if you have 10 individuals and 10 generations, + * but want to stop after 95 evaluations. */ template < typename EOT > class eoEvalFuncCounterBounder : public eoEvalFuncCounter< EOT > @@ -53,4 +63,5 @@ private : unsigned long _threshold; }; +/** @} */ #endif diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index fd98e4e34..d493b9b04 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -34,6 +34,8 @@ * takes an existing function pointer and converts it into a evaluation * function class. That way, old style C or C++ functions can be adapted to EO * function classes. + * + * @ingroup Evaluation */ #ifdef _MSC_VER template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& > diff --git a/eo/src/eoEvalTimeThrowException.h b/eo/src/eoEvalTimeThrowException.h index 3b0bc14f5..752fafba0 100644 --- a/eo/src/eoEvalTimeThrowException.h +++ b/eo/src/eoEvalTimeThrowException.h @@ -25,6 +25,13 @@ Johann DrĂ©o #include +/** Check at each evaluation if a given tie contract has been reached. + * + * Throw an eoMaxTimeException if the given max time has been reached. + * Usefull if you want to end the search independently of generations. + * + * @ingroup Evaluation + */ template< class EOT > class eoEvalTimeThrowException : public eoEvalFuncCounter< EOT > { diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index 3e595c068..bcccee2af 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -35,6 +35,8 @@ class eoMaxException : public std::exception {}; An error that signals that a maximum elapsed time has been reached. Thrown by @see eoEvalTimeThrowException + +@ingroup Evaluation */ class eoMaxTimeException : public eoMaxException { @@ -58,6 +60,8 @@ private: An error that signals that a maximum number of evaluations has been reached. Thrown by @see eoEvalEvalThrowException + +@ingroup Evaluation */ class eoMaxEvalException : public eoMaxException { diff --git a/eo/src/eoExtendedVelocity.h b/eo/src/eoExtendedVelocity.h index 1a39c2ce8..687a11a8a 100644 --- a/eo/src/eoExtendedVelocity.h +++ b/eo/src/eoExtendedVelocity.h @@ -39,6 +39,8 @@ * At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) * It includes both a "topology" best and a global best in the social knowledge. Each topology * provides a method to retrieve the global best <=> the best of all the neighborhood the topology contains. +* +* @ingroup Variators */ template < class POT > class eoExtendedVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoFactory.h b/eo/src/eoFactory.h index 13864f030..7e02d1245 100644 --- a/eo/src/eoFactory.h +++ b/eo/src/eoFactory.h @@ -37,7 +37,10 @@ or whatever; but the instance class should be the parent class from which all th object that are going to be created descend. This class basically defines an interface, as usual. The base factory class for each hierarchy should be redefined every time a new object is added to the hierarchy, which is not too good, but in any case, some code would -have to be modified*/ +have to be modified + +@ingroup Utilities +*/ template class eoFactory: public eoObject { diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index 8cf1c9f37..964014516 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -29,13 +29,12 @@ #include /** -Fitness continuation: +Continues until the optimum fitness level is reached. - Continues until the optimum fitness level is reached. +All types which derive from eoScalarFitness is able to compare well via the operator override ( <, >, <=, ...) + + @ingroup Continuators */ - -//! all types which derive from eoScalarFitness is able to compare well via the operator override ( <, >, <=, ...) - template< class EOT> class eoFitContinue: public eoContinue { public: diff --git a/eo/src/eoFitnessScalingSelect.h b/eo/src/eoFitnessScalingSelect.h index 0b3ec273a..7ea61607f 100644 --- a/eo/src/eoFitnessScalingSelect.h +++ b/eo/src/eoFitnessScalingSelect.h @@ -35,6 +35,8 @@ /** eoFitnessScalingSelect: select an individual proportional to the * linearly scaled fitness that is computed by the private * eoLinearFitScaling object + * + * @ingroup Selectors */ template class eoFitnessScalingSelect: public eoRouletteWorthSelect diff --git a/eo/src/eoFixedInertiaWeightedVelocity.h b/eo/src/eoFixedInertiaWeightedVelocity.h index 6d748d189..26848a59e 100644 --- a/eo/src/eoFixedInertiaWeightedVelocity.h +++ b/eo/src/eoFixedInertiaWeightedVelocity.h @@ -38,6 +38,8 @@ * At step t+1 : v(t+1)= w * v(t) + c1*r1 * (xbest(t)-x(t)) + c2*r2 * (gbest(t) - x(t)) * w is fixed for all the particles and all the generations. * (ci and w given; Ri chosen at random * in [0;1]) +* +* @ingroup Variators */ template < class POT > class eoFixedInertiaWeightedVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoFlOrBinOp.h b/eo/src/eoFlOrBinOp.h index 2dda394d4..dd1ff6179 100644 --- a/eo/src/eoFlOrBinOp.h +++ b/eo/src/eoFlOrBinOp.h @@ -29,6 +29,10 @@ #include #include +/** @addtogroup Variators + * @{ + */ + /** Generic eoBinOps on fixed length genotypes. * Contains exchange crossovers (1pt and uniform) * and crossovers that applies an Atom crossover @@ -215,5 +219,6 @@ public : }; +/** @} */ #endif diff --git a/eo/src/eoFlOrMonOp.h b/eo/src/eoFlOrMonOp.h index ae6f7d744..102acc11c 100644 --- a/eo/src/eoFlOrMonOp.h +++ b/eo/src/eoFlOrMonOp.h @@ -30,6 +30,10 @@ #include #include +/** @addtogroup Variators + * @{ + */ + /** Base classes for generic mutations on fixed length chromosomes. * Contains 2 classes that both use an atomic mutation * eoFlOrAllMutation applies the atom mutation to all components with given rate @@ -114,5 +118,6 @@ private: eoMonOp & atomMutation; // the atom mutation }; +/** @} */ #endif diff --git a/eo/src/eoFlOrQuadOp.h b/eo/src/eoFlOrQuadOp.h index 0e4b9a465..f9c0373c2 100644 --- a/eo/src/eoFlOrQuadOp.h +++ b/eo/src/eoFlOrQuadOp.h @@ -29,6 +29,10 @@ #include #include +/** @addtogroup Variators + * @{ + */ + /** Generic eoQuadOps on fixed length genotypes. * Contains exchange crossovers (1pt and uniform) * and crossovers that applies an Atom crossover @@ -209,5 +213,6 @@ public : }; +/** @} */ #endif diff --git a/eo/src/eoFlight.h b/eo/src/eoFlight.h index 18b550f9d..9af813a24 100644 --- a/eo/src/eoFlight.h +++ b/eo/src/eoFlight.h @@ -32,8 +32,9 @@ /** Abstract class for particle swarm optimization flight. * All the flights must derivated from eoFlight. +* +* @ingroup Variators */ - template < class POT > class eoFlight:public eoUF < POT &, void > { public: diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 4e905c795..7b14d55fd 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -29,6 +29,10 @@ #include +/** @ddtogroup Core + * @{ + */ + /** Base class for functors to get a nice hierarchy diagram That's actually quite an understatement as it does quite a bit more than @@ -173,5 +177,6 @@ eoFunctorBase::binary_function_tag functor_category(const eoBF&) return eoFunctorBase::binary_function_tag(); } +/** @} */ #endif diff --git a/eo/src/eoFunctorStore.h b/eo/src/eoFunctorStore.h index 18e15ae4e..c609637b4 100644 --- a/eo/src/eoFunctorStore.h +++ b/eo/src/eoFunctorStore.h @@ -35,6 +35,8 @@ class eoFunctorBase; eoFunctorStore is a class that stores functors that are allocated on the heap. This class can be used in factories to store allocated memory for dynamically created functors. + + @ingroup Utilities */ class eoFunctorStore { diff --git a/eo/src/eoG3Replacement.h b/eo/src/eoG3Replacement.h index 7e7950f78..aab7866fe 100644 --- a/eo/src/eoG3Replacement.h +++ b/eo/src/eoG3Replacement.h @@ -44,8 +44,8 @@ eoG3Replacement is an eoReplacement: - select best N of this merged population - put them back into parent population +@ingroup Replacors */ - template class eoG3Replacement : public eoReplacement { diff --git a/eo/src/eoGaussRealWeightUp.h b/eo/src/eoGaussRealWeightUp.h index bffcb62d0..0da27b349 100644 --- a/eo/src/eoGaussRealWeightUp.h +++ b/eo/src/eoGaussRealWeightUp.h @@ -34,6 +34,8 @@ /** * Update an inertia weight by assigning it a Gaussian randomized value * (used for the velocity in particle swarm optimization). + * + * @ingroup Variators */ class eoGaussRealWeightUp:public eoWeightUpdater { diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 3619a5204..4dbdd206c 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -31,6 +31,8 @@ /** Generational continuator: continues until a number of generations is reached + + @ingroup Continuators */ template< class EOT> class eoGenContinue: public eoContinue, public eoValueParam diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index f2bea9c58..e39649058 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -38,6 +38,9 @@ thanks to the friend class eoPopulator @author Maarten Keijzer @version 0.0 + +@ingroup Core +@ingroup Variators */ //@{ diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index db46ab90a..34d9220d1 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -41,6 +41,8 @@ /** Base class for breeders using generalized operators. + + @ingroup Combination */ template class eoGeneralBreeder: public eoBreed From 44d1ab1bc2e68af5b69538ad6ee95f690e2c232c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 5 Nov 2010 14:28:28 +0100 Subject: [PATCH 1625/2134] name of variables in english ; use the eo::log instead of cerr ; doc grouping --- eo/src/eoCtrlCContinue.cpp | 14 +++++++++++--- eo/src/eoCtrlCContinue.h | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/eo/src/eoCtrlCContinue.cpp b/eo/src/eoCtrlCContinue.cpp index cf6146e66..0e04422a5 100644 --- a/eo/src/eoCtrlCContinue.cpp +++ b/eo/src/eoCtrlCContinue.cpp @@ -28,11 +28,18 @@ #pragma warning(disable:4786) #endif +#include + #include #include +/** + * @addtogroup Continuators + * @{ + */ + // --- Global variables - but don't know what else to do - MS --- -bool arret_demande = false; +bool ask_for_stop = false; bool existCtrlCContinue = false; // @@ -46,9 +53,10 @@ void signal_handler( int sig ) #ifdef SIGQUIT signal( SIGINT, SIG_IGN ); signal( SIGQUIT, SIG_IGN ); - std::cerr << "Ctrl C entered ... closing down" << std::endl ; - arret_demande = true; + eo::log << eo::logging << "Ctrl C entered ... closing down" << std::endl ; + ask_for_stop = true; #endif #endif } +/** @} */ diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index b102a18ea..9b1aac0f7 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -38,7 +38,7 @@ * @{ */ -extern bool arret_demande, existCtrlCContinue; +extern bool ask_for_stop, existCtrlCContinue; extern void signal_handler( int sig ); @@ -73,7 +73,7 @@ public: virtual bool operator() ( const eoPop& _vEO ) { (void)_vEO; - if (arret_demande) + if (ask_for_stop) return false; return true; } From f478817c6e6c44f3214b528b6491bd7a94b3fdc1 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 5 Nov 2010 15:59:35 +0100 Subject: [PATCH 1626/2134] grouping classes in documentation --- eo/src/eoInt.h | 2 + eo/src/eoIntegerVelocity.h | 2 + eo/src/eoInvalidateOps.h | 2 + eo/src/eoLinearDecreasingWeightUp.h | 2 + eo/src/eoLinearFitScaling.h | 2 + eo/src/eoLinearTopology.h | 2 + eo/src/eoMGGReplacement.h | 1 + eo/src/eoMerge.h | 7 ++ eo/src/eoMergeReduce.h | 4 + eo/src/eoNeighborhood.h | 2 + eo/src/eoOneToOneBreeder.h | 6 +- eo/src/eoOp.h | 1 + eo/src/eoOpContainer.h | 4 + eo/src/eoOpSelMason.h | 9 +- eo/src/eoOrderXover.h | 2 + eo/src/eoPerf2Worth.h | 10 +- eo/src/eoPeriodicContinue.h | 29 ++--- eo/src/eoPersistent.cpp | 1 - eo/src/eoPop.h | 6 +- eo/src/eoPopEvalFunc.h | 6 + eo/src/eoPopulator.h | 6 +- eo/src/eoPropGAGenOp.h | 6 +- eo/src/eoProportionalSelect.h | 6 +- eo/src/eoRandomRealWeightUp.h | 2 + eo/src/eoRandomSelect.h | 22 ++-- eo/src/eoRanking.h | 2 + eo/src/eoRankingSelect.h | 3 +- eo/src/eoRealBoundModifier.h | 14 ++- eo/src/eoRealParticle.h | 2 + eo/src/eoReduce.h | 15 ++- eo/src/eoReduceMerge.h | 4 + eo/src/eoReduceMergeReduce.h | 2 +- eo/src/eoReduceSplit.h | 5 + eo/src/eoReplacement.h | 20 ++-- eo/src/eoRingTopology.h | 2 + eo/src/eoSGAGenOp.h | 8 +- eo/src/eoSGATransform.h | 6 +- eo/src/eoSIGContinue.h | 5 + eo/src/eoSTLFunctor.h | 6 + eo/src/eoScalarFitness.h | 5 + eo/src/eoSecondsElapsedContinue.h | 3 + eo/src/eoSelect.h | 3 + eo/src/eoSelectFactory.h | 126 +++++++++++---------- eo/src/eoSelectFromWorth.h | 8 ++ eo/src/eoSelectMany.h | 2 + eo/src/eoSelectNumber.h | 2 + eo/src/eoSelectOne.h | 2 + eo/src/eoSelectPerc.h | 2 + eo/src/eoSequentialSelect.h | 4 + eo/src/eoSharing.h | 8 +- eo/src/eoSharingSelect.h | 1 + eo/src/eoShiftMutation.h | 2 + eo/src/eoSigBinaryFlight.h | 2 + eo/src/eoSocialNeighborhood.h | 12 +- eo/src/eoStandardFlight.h | 2 + eo/src/eoStandardVelocity.h | 2 + eo/src/eoStarTopology.h | 2 + eo/src/eoSteadyFitContinue.h | 2 + eo/src/eoStochTournamentSelect.h | 13 +-- eo/src/eoStochasticUniversalSelect.h | 5 +- eo/src/eoSurviveAndDie.h | 6 + eo/src/eoTimeContinue.h | 2 + eo/src/eoTopology.h | 3 + eo/src/eoTransform.h | 6 +- eo/src/eoTruncSelect.h | 2 + eo/src/eoTruncatedSelectMany.h | 2 + eo/src/eoTruncatedSelectOne.h | 1 + eo/src/eoTwoOptMutation.h | 2 + eo/src/eoVariableInertiaWeightedVelocity.h | 3 + eo/src/eoVariableLengthCrossover.h | 8 +- eo/src/eoVariableLengthMutation.h | 7 +- eo/src/eoVelocity.h | 2 + eo/src/eoWeightUpdater.h | 2 + 73 files changed, 326 insertions(+), 164 deletions(-) diff --git a/eo/src/eoInt.h b/eo/src/eoInt.h index 2742edaa1..e4f350795 100644 --- a/eo/src/eoInt.h +++ b/eo/src/eoInt.h @@ -33,6 +33,8 @@ /** eoInt: implementation of simple integer-valued chromosome. * based on eoVector class + * + * @ingroup Representations */ template class eoInt: public eoVector { diff --git a/eo/src/eoIntegerVelocity.h b/eo/src/eoIntegerVelocity.h index 76f7161a3..1802dab5b 100644 --- a/eo/src/eoIntegerVelocity.h +++ b/eo/src/eoIntegerVelocity.h @@ -40,6 +40,8 @@ * At step t: v(t+1)= c1 * v(t) + c2 * r2 * ( xbest(t)-x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) * v(t) is an INT for any time step * (ci given and Ri chosen at random in [0;1]). +* +* @ingroup Variators */ template < class POT > class eoIntegerVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h index 4643c7270..aa5a18532 100644 --- a/eo/src/eoInvalidateOps.h +++ b/eo/src/eoInvalidateOps.h @@ -29,6 +29,8 @@ #include +/** @addtogroup Utilities + /** One of the invalidator operators. Use this one as a 'hat' on an operator that is defined to work on a generic datatype. This functor will then check diff --git a/eo/src/eoLinearDecreasingWeightUp.h b/eo/src/eoLinearDecreasingWeightUp.h index eb1af0bec..87f489423 100644 --- a/eo/src/eoLinearDecreasingWeightUp.h +++ b/eo/src/eoLinearDecreasingWeightUp.h @@ -37,6 +37,8 @@ * Nt is the total number of generations/event * w(0) is the initial weight * w(Nt) is the last inertia weight + * + * @ingroup Variators */ template class eoLinearDecreasingWeightUp:public eoWeightUpdater { diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h index e5f4c8192..75598c934 100644 --- a/eo/src/eoLinearFitScaling.h +++ b/eo/src/eoLinearFitScaling.h @@ -38,6 +38,8 @@ * truncate negative values to 0 - * * to be used within an eoSelectFromWorth object + * + * @ingroup Selectors */ template class eoLinearFitScaling : public eoPerf2Worth // false: do not cache fitness diff --git a/eo/src/eoLinearTopology.h b/eo/src/eoLinearTopology.h index 4c61bf00d..99457b674 100644 --- a/eo/src/eoLinearTopology.h +++ b/eo/src/eoLinearTopology.h @@ -37,6 +37,8 @@ * One of the local best strategies for particle swarm optimization. Each particle has a fixed number of neighbours, ans * the neighborhood is social. * The topology is never modified during the flight. + * + * @ingroup Selectors */ template < class POT > class eoLinearTopology:public eoTopology < POT > diff --git a/eo/src/eoMGGReplacement.h b/eo/src/eoMGGReplacement.h index 55eaaa54b..a625e1e85 100644 --- a/eo/src/eoMGGReplacement.h +++ b/eo/src/eoMGGReplacement.h @@ -44,6 +44,7 @@ eoMGGReplacement is an eoReplacement: - select best N-1 of this merged population (detTournament only at the moment) - put them back into parent population +@ingroup Replacors */ template diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 0e359ae53..1e2b2bf45 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -43,6 +43,9 @@ * two populations into one (the second argument). * Note that the algorithms assume that the second argument denotes the * next generation. + * + * @ingroup Core + * @ingroup Replacors */ template class eoMerge: public eoBF&, eoPop&, void> @@ -51,6 +54,8 @@ template class eoMerge: public eoBF&, eoPop class eoElitism : public eoMerge { @@ -103,6 +108,7 @@ private : /** No elite +@ingroup Replacors */ template class eoNoElitism : public eoElitism { @@ -112,6 +118,7 @@ template class eoNoElitism : public eoElitism /** Very elitist class, copies entire population into next gen +@ingroup Replacors */ template class eoPlus : public eoMerge { diff --git a/eo/src/eoMergeReduce.h b/eo/src/eoMergeReduce.h index f0c6a1b5a..b4c717528 100644 --- a/eo/src/eoMergeReduce.h +++ b/eo/src/eoMergeReduce.h @@ -45,6 +45,7 @@ Replacement strategies that combine en eoMerge and an eoReduce. /** eoMergeReduce: abstract replacement strategy that is just an application of an embedded merge, followed by an embedded reduce +@ingroup Replacors */ template class eoMergeReduce : public eoReplacement @@ -68,6 +69,7 @@ class eoMergeReduce : public eoReplacement /** ES type of replacement strategy: first add parents to population, then truncate +@ingroup Replacors */ template class eoPlusReplacement : public eoMergeReduce @@ -82,6 +84,7 @@ class eoPlusReplacement : public eoMergeReduce /** ES type of replacement strategy: ignore parents, truncate offspring +@ingroup Replacors */ template class eoCommaReplacement : public eoMergeReduce @@ -97,6 +100,7 @@ class eoCommaReplacement : public eoMergeReduce /** EP type of replacement strategy: first add parents to population, then truncate using EP tournament +@ingroup Replacors */ template class eoEPReplacement : public eoMergeReduce diff --git a/eo/src/eoNeighborhood.h b/eo/src/eoNeighborhood.h index 79857838c..fa0edd3f8 100644 --- a/eo/src/eoNeighborhood.h +++ b/eo/src/eoNeighborhood.h @@ -29,6 +29,8 @@ /** * Abstract class for neighborboods. Used for particle swarm optimization * topology strategies. Can be social or physical. + * + * @ingroup Selectors */ template < class POT > class eoNeighborhood { diff --git a/eo/src/eoOneToOneBreeder.h b/eo/src/eoOneToOneBreeder.h index cd18edd19..4036377ce 100644 --- a/eo/src/eoOneToOneBreeder.h +++ b/eo/src/eoOneToOneBreeder.h @@ -38,15 +38,15 @@ #include #include -/***************************************************************************** - * eoOneToOneBreeder: transforms a population using +/** eoOneToOneBreeder: transforms a population using * - an operator that MODIFIES only one parent from the populator * (though it can use any number aside) and thus generates ONE offspring) * - a local replacement between the parent and its offspring * * Typically, Differential Evolution (Storn and Price 94) and Deb et al's * G3 can be built on this - **************************************************************************** + * + * @ingroup Combination */ template class eoOneToOneBreeder: public eoBreed diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index f263ef69f..849a6da04 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -29,6 +29,7 @@ #include #include #include + /** @defgroup Operators Evolutionary Operators diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 6a31ced9e..70252a49d 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -37,6 +37,8 @@ * the differnet instances of eoOpContainer: * an ***absolute*** probability in the sequential version, and * a ***relative*** weight in the proportional version + * + * @ingroup Combination */ template class eoOpContainer : public eoGenOp @@ -83,6 +85,8 @@ class eoOpContainer : public eoGenOp * note the mark, rewind, unmark cycle * here operators are repeatedly applied on the same individual(s) * not all too elegant, but it sort of works... + * + * @ingroup Combination */ template class eoSequentialOp : public eoOpContainer diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 6c1d80924..02f927771 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -20,21 +20,20 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es */ -//----------------------------------------------------------------------------- #ifndef _EOOPSELMASON_H #define _EOOPSELMASON_H -//----------------------------------------------------------------------------- -#include #include // for eoFactory and eoOpFactory #include -//----------------------------------------------------------------------------- /** EO Mason, or builder, for operator selectors. A builder must allocate memory -to the objects it builds, and then deallocate it when it gets out of scope*/ +to the objects it builds, and then deallocate it when it gets out of scope + +@ingroup Utilities +*/ template class eoOpSelMason: public eoFactory > { diff --git a/eo/src/eoOrderXover.h b/eo/src/eoOrderXover.h index 3d0e89393..211af69b5 100644 --- a/eo/src/eoOrderXover.h +++ b/eo/src/eoOrderXover.h @@ -20,6 +20,8 @@ * p1 : [1|2,4,3|6,5] and p2 : [4|5,3,1|6,2] generate two children: * c1 = [2,4,3,6,5,1] 2,4,3 taken from p1 and 6,5,1 from p2 * c2 = [5,3,1,6,2,4] 5,3,1 taken from p2 and 6,2,4 from p1 + * + * @ingroup Variators */ template class eoOrderXover: public eoQuadOp { diff --git a/eo/src/eoPerf2Worth.h b/eo/src/eoPerf2Worth.h index 35d2f28e3..9f1746ecf 100644 --- a/eo/src/eoPerf2Worth.h +++ b/eo/src/eoPerf2Worth.h @@ -38,6 +38,9 @@ /** @brief Base class to transform raw fitnesses into fitness for selection @see eoSelectFromWorth + +@ingroup Selectors +@ingroup Utilities */ template class eoPerf2Worth : public eoUF&, void>, public eoValueParam > @@ -106,6 +109,8 @@ public: /** Perf2Worth with fitness cache +@ingroup Selectors +@ingroup Utilities */ template class eoPerf2WorthCached : public eoPerf2Worth @@ -225,7 +230,10 @@ public: -/** A dummy perf2worth, just in case you need it */ +/** A dummy perf2worth, just in case you need it +@ingroup Selectors +@ingroup Utilities +*/ template class eoNoPerf2Worth : public eoPerf2Worth { diff --git a/eo/src/eoPeriodicContinue.h b/eo/src/eoPeriodicContinue.h index 7b47af6ea..c96391c85 100644 --- a/eo/src/eoPeriodicContinue.h +++ b/eo/src/eoPeriodicContinue.h @@ -1,7 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -// "eoFreqContinue.h" - // (c) OPAC Team, LIFL, Feb. 2006 /* This library is free software; you can redistribute it and/or @@ -27,16 +25,25 @@ #include #include +/** A continue that becomes true periodically. + */ template class eoPeriodicContinue: public eoContinue { public: /** Constructor. The period is given in parameter. */ - eoPeriodicContinue (unsigned __period, unsigned __init_counter = 0); + eoPeriodicContinue (unsigned __period, unsigned __init_counter = 0) : + period (__period), counter (__init_counter) + {} + /** It returns 'true' only if the current number of generations modulo the period doen't equal to zero. */ - bool operator () (const eoPop & pop); + bool operator () (const eoPop & pop) + { + return ((++ counter) % period) != 0 ; + } + private: @@ -45,19 +52,5 @@ private: unsigned counter; }; - -template -eoPeriodicContinue :: eoPeriodicContinue (unsigned __period, unsigned __init_counter - ) : period (__period), - counter (__init_counter) { - -} - -template -bool eoPeriodicContinue :: operator () (const eoPop & __pop) { - - return ((++ counter) % period) != 0 ; -} - #endif diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 253c5803b..63e906ca7 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -7,7 +7,6 @@ //Implementation of these objects -//----------------------------------------------------------------------------- std::istream & operator >> ( std::istream& _is, eoPersistent& _o ) { _o.readFrom(_is); diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index b2d58fac6..7eb726c56 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -48,8 +48,9 @@ * and eoInit derived object. in the ctor. * EOT must also have a copy ctor, since temporaries are created and then * passed to the eoInit object + * + * @ingroup Core */ - template class eoPop: public std::vector, public eoObject, public eoPersistent { @@ -333,9 +334,6 @@ public: for (unsigned i=0; ioperator[](i).invalidate(); } - - protected: - }; #endif diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index e03279225..9f5fca594 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -44,6 +44,8 @@ * * Basic parallelization (synchronous standard evolution engine): * call the slaves and wait for the results + * + * @ingroup Evaluation */ template class eoPopEvalFunc : public eoBF & , eoPop &, void> @@ -55,6 +57,8 @@ class eoPopEvalFunc : public eoBF & , eoPop &, void> /** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies * a private eoEvalFunc to all offspring + * + * @ingroup Evaluation */ template class eoPopLoopEval : public eoPopEvalFunc { @@ -79,6 +83,8 @@ private: /** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies * a private eoEvalFunc to all offspring AND ALL PARENTS * as the fitness is supposed here to vary + * + * @ingroup Evaluation */ template class eoTimeVaryingLoopEval : public eoPopEvalFunc { diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index 34b4f2360..eaf8f8410 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -33,7 +33,11 @@ It is an eoPop but also behaves like an eoPop::iterator as far as operator* and operator++ are concerned - See eoGenOp and eoOpContainer + @see eoGenOp + @see eoOpContainer + + @ingroup Core + @ingroup Utilities */ template class eoPopulator diff --git a/eo/src/eoPropGAGenOp.h b/eo/src/eoPropGAGenOp.h index e4305e29c..44ccc7a53 100644 --- a/eo/src/eoPropGAGenOp.h +++ b/eo/src/eoPropGAGenOp.h @@ -33,11 +33,13 @@ // class eoSGAGenOp /////////////////////////////////////////////////////////////////////////////// -/** *************************************************************************** +/** * eoPropGAGenOp (for Simple GA, but Proportional) * choice between Crossover, mutation or cloining * with respect to given relatve weights - *****************************************************************************/ + * + * @ingroup Combination + */ template class eoPropGAGenOp : public eoGenOp { diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index 8c01b7503..c5a895ff4 100644 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -33,15 +33,15 @@ #include #include #include -//----------------------------------------------------------------------------- + /** eoProportionalSelect: select an individual proportional to her stored fitness value Changed the algorithm to make use of a cumulative array of fitness scores, This changes the algorithm from O(n) per call to O(log n) per call. (MK) -*/ -//----------------------------------------------------------------------------- + @ingroup Selectors +*/ template class eoProportionalSelect: public eoSelectOne { public: diff --git a/eo/src/eoRandomRealWeightUp.h b/eo/src/eoRandomRealWeightUp.h index ff7db7553..b929504c1 100644 --- a/eo/src/eoRandomRealWeightUp.h +++ b/eo/src/eoRandomRealWeightUp.h @@ -34,6 +34,8 @@ * Update an inertia weight by assigning it an (uniform) random value. * The weight is a basic feature to evaluate the velocity of a particle in * swarm optimization. + * + * @ingroup Variators */ class eoRandomRealWeightUp:public eoWeightUpdater { diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 6569207b7..6d99f17ed 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -22,12 +22,10 @@ Marc.Schoenauer@polytechnique.fr mak@dhi.dk */ -//----------------------------------------------------------------------------- #ifndef eoRandomSelect_h #define eoRandomSelect_h -//----------------------------------------------------------------------------- /** This file contains straightforward selectors: * eoRandomSelect returns an individual uniformly selected * eoBestSelect always return the best individual @@ -37,10 +35,10 @@ #include #include -//----------------------------------------------------------------------------- -/** eoRandomSelect: a selection method that selects ONE individual randomly */ -//----------------------------------------------------------------------------- - +/** eoRandomSelect: a selection method that selects ONE individual randomly + * + * @ingroup Selectors + */ template class eoRandomSelect: public eoSelectOne { public: @@ -52,11 +50,11 @@ template class eoRandomSelect: public eoSelectOne } }; -//----------------------------------------------------------------------------- /** eoBestSelect: a selection method that always return the best - * (mainly for testing purposes) */ -//----------------------------------------------------------------------------- - + * (mainly for testing purposes) + * + * @ingroup Selectors + */ template class eoBestSelect: public eoSelectOne { public: @@ -68,13 +66,11 @@ template class eoBestSelect: public eoSelectOne } }; -//----------------------------------------------------------------------------- /** eoNoSelect: returns all individual in order WITHOUT USING FITNESS!!! * looping back to the beginning when exhasuted * + * @ingroup Selectors */ -//----------------------------------------------------------------------------- - template class eoNoSelect: public eoSelectOne { public: diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index def90dd81..ec8120064 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -33,6 +33,8 @@ * COmputes the ranked fitness: fitnesses range in [m,M] * with m=2-pressure/popSize and M=pressure/popSize. * in between, the progression depstd::ends on exponent (linear if 1). + * + * @ingroup Selectors */ template class eoRanking : public eoPerf2Worth // false: do not cache fitness diff --git a/eo/src/eoRankingSelect.h b/eo/src/eoRankingSelect.h index fd5619a94..465dca564 100644 --- a/eo/src/eoRankingSelect.h +++ b/eo/src/eoRankingSelect.h @@ -35,8 +35,9 @@ * is an eoRouletteWorthSelect, i.e. a selector using a std::vector of worthes * rather than the raw fitness (see eoSelectFromWorth.h) * uses an internal eoRanking object which is an eoPerf2Worth + * + * @ingroup Selectors */ - template class eoRankingSelect: public eoRouletteWorthSelect { diff --git a/eo/src/eoRealBoundModifier.h b/eo/src/eoRealBoundModifier.h index d9fa099e6..e9d21c4c3 100644 --- a/eo/src/eoRealBoundModifier.h +++ b/eo/src/eoRealBoundModifier.h @@ -20,25 +20,33 @@ Contact: thomas.legrand@lifl.fr */ -//----------------------------------------------------------------------------- #ifndef EOREALBOUNDMODIFIER_H #define EOREALBOUNDMODIFIER_H -//----------------------------------------------------------------------------- #include #include -//----------------------------------------------------------------------------- + +/** @defgroup Bounds Bounds management + * + * Bounds are a set of utilities that permits to manage ranges of existence + * for variables. For example to restrain vectors or parameters to a given domain. + * + * @ingroup Utilities + */ /** * Abstract class for eoRealVectorBounds modifier. * Used to modify the bounds included into the eoRealVectorBounds object. + * + * @ingroup Bounds */ class eoRealBoundModifier: public eoBF < eoRealBaseVectorBounds &,unsigned,void > {}; /** * An eoRealBoundModifier that modify nothing ! + * @ingroup Bounds */ class eoDummyRealBoundModifier: public eoRealBoundModifier { diff --git a/eo/src/eoRealParticle.h b/eo/src/eoRealParticle.h index 96642c23b..14326558c 100644 --- a/eo/src/eoRealParticle.h +++ b/eo/src/eoRealParticle.h @@ -31,6 +31,8 @@ /** eoRealParticle: Implementation of a real-coded particle for * particle swarm optimization. Positions, velocities and best positions are real-coded. + * + * @ingroup Real */ template < class FitT> class eoRealParticle: public eoVectorParticle diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 9d5ff97b4..8783c59f5 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -40,12 +40,15 @@ At the moment, limited to truncation - with 2 different methods, one that sorts the whole population, and one that repeatidely kills the worst. Ideally, we should be able to choose at run-time!!! -*/ + @ingroup Replacors +*/ template class eoReduce: public eoBF&, unsigned, void> {}; -/** truncation method using sort */ +/** truncation method using sort + @ingroup Replacors + */ template class eoTruncate : public eoReduce { void operator()(eoPop& _newgen, unsigned _newsize) @@ -60,7 +63,9 @@ template class eoTruncate : public eoReduce } }; -/** random truncation */ +/** random truncation + @ingroup Replacors + * */ template class eoRandomReduce : public eoReduce { void operator()(eoPop& _newgen, unsigned _newsize) @@ -79,6 +84,7 @@ template class eoRandomReduce : public eoReduce /** EP truncation method (some global stochastic tournament + sort) Softer selective pressure than pure truncate + @ingroup Replacors */ template class eoEPReduce : public eoReduce { @@ -162,6 +168,7 @@ private: /** a truncate class that does not sort, but repeatidely kills the worse. To be used in SSGA-like replacements (e.g. see eoSSGAWorseReplacement) + @ingroup Replacors */ template class eoLinearTruncate : public eoReduce @@ -183,6 +190,7 @@ class eoLinearTruncate : public eoReduce /** a truncate class based on a repeated deterministic (reverse!) tournament To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) + @ingroup Replacors */ template class eoDetTournamentTruncate : public eoReduce @@ -231,6 +239,7 @@ private: /** a truncate class based on a repeated deterministic (reverse!) tournament To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) + @ingroup Replacors */ template class eoStochTournamentTruncate : public eoReduce diff --git a/eo/src/eoReduceMerge.h b/eo/src/eoReduceMerge.h index 52088cd00..03e025ac6 100644 --- a/eo/src/eoReduceMerge.h +++ b/eo/src/eoReduceMerge.h @@ -37,6 +37,9 @@ #include //----------------------------------------------------------------------------- +/** @addtogroup Replacors + * @{ + */ /** eoReduceMerge: Replacement strategies that start by reducing the parents, @@ -116,4 +119,5 @@ class eoSSGAStochTournamentReplacement : public eoReduceMerge eoPlus plus; }; +/** @} */ #endif diff --git a/eo/src/eoReduceMergeReduce.h b/eo/src/eoReduceMergeReduce.h index 05854ea76..41629267a 100644 --- a/eo/src/eoReduceMergeReduce.h +++ b/eo/src/eoReduceMergeReduce.h @@ -43,8 +43,8 @@ eoReduceMergeReduce is an eoReplacement: - merges reduced populations - reduces resulting merged pop if necessary + @ingroup Replacors */ - template class eoReduceMergeReduce : public eoReplacement { diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index 915de4741..758f48bde 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -35,6 +35,10 @@ #include // eoReduce #include +/** @addtogroup Replacors + * @{ + */ + /** * eoReduceSplit: reduce the pop to the specified size * AND eventually returns the eliminated guys @@ -320,4 +324,5 @@ private: //----------------------------------------------------------------------------- +/** @} */ #endif diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index ca2caa0e5..972aa61a4 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -37,12 +37,6 @@ //----------------------------------------------------------------------------- /** -eoReplacement: the base class for all replacement functors. - -NOTE: 2 eoPop as arguments -the resulting population should be in the first argument (replace -parents by offspring)! The second argument can contain any rubbish - --- The eoMergeReduce, combination of eoMerge and eoReduce, can be found in file eoMergeReduce.h @@ -69,16 +63,22 @@ MS 12/12/2000 */ +/** The base class for all replacement functors. -//@{ +NOTE: two eoPop as arguments +the resulting population should be in the first argument (replace +parents by offspring)! The second argument can contain any rubbish -/// + @ingroup Replacors + */ template class eoReplacement : public eoBF&, eoPop&, void> {}; /** generational replacement == swap populations + + @ingroup Replacors */ template class eoGenerationalReplacement : public eoReplacement @@ -97,6 +97,8 @@ Copies in the new pop the best individual from the old pop, AFTER normal replacement, if the best of the new pop is worse than the best of the old pop. Removes the worse individual from the new pop. This could be changed by adding a selector there... + + @ingroup Replacors */ template class eoWeakElitistReplacement : public eoReplacement @@ -123,6 +125,4 @@ private: eoReplacement & replace; }; -//@} - #endif diff --git a/eo/src/eoRingTopology.h b/eo/src/eoRingTopology.h index bd5ba7b52..352a6e2aa 100644 --- a/eo/src/eoRingTopology.h +++ b/eo/src/eoRingTopology.h @@ -39,6 +39,8 @@ * The neighborhoods are built using a ring based on each particle's indice and * do not change for all the time steps. Only the best particle in each neighborhood is * potentially updated thanks to the "updateNeighborhood" method. + * + * @ingroup Selectors */ template < class POT > class eoRingTopology:public eoTopology { diff --git a/eo/src/eoSGAGenOp.h b/eo/src/eoSGAGenOp.h index a6533f072..922a46ca9 100644 --- a/eo/src/eoSGAGenOp.h +++ b/eo/src/eoSGAGenOp.h @@ -33,14 +33,16 @@ // class eoSGAGenOp /////////////////////////////////////////////////////////////////////////////// -/** *************************************************************************** +/** * eoSGAGenOp (for Simple GA) mimicks the usual crossover with proba pCross + * mutation with proba pMut inside an eoGeneralOp * It does it exactly as class eoSGATransform, i.e. only accepts * quadratic crossover and unary mutation * It was introduced for didactic reasons, but seems to be popular :-) - *****************************************************************************/ -template + * + * @ingroup Combination + */ + template class eoSGAGenOp : public eoGenOp { public: diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index e1e9c82f5..3707862f8 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -41,6 +41,8 @@ * It does it exactly as class eoSGA, i.e. only accepts * quadratic crossover and unary mutation * It is here mainly for tutorial reasons + * + * @ingroup Combination */ template class eoSGATransform : public eoTransform { @@ -94,7 +96,9 @@ template class eoSGATransform : public eoTransform * i.e. the operators probabilities can be passed as an eoValueParam, * and hence can be modified from outside * It is here mainly for tutorial reasons - *****************************************************************************/ + * + * @ingroup Combination +*/ template class eoDynSGATransform : public eoTransform { public: diff --git a/eo/src/eoSIGContinue.h b/eo/src/eoSIGContinue.h index 2320ebd12..36546fb0a 100644 --- a/eo/src/eoSIGContinue.h +++ b/eo/src/eoSIGContinue.h @@ -35,6 +35,10 @@ #include #include +/** @addtogroup Continuators + * @{ + */ + extern bool existSIGContinue; extern bool call_func; @@ -84,6 +88,7 @@ private: sighandler_t _fct; }; +/** @} */ #endif diff --git a/eo/src/eoSTLFunctor.h b/eo/src/eoSTLFunctor.h index ca8b9233e..c21f161c6 100644 --- a/eo/src/eoSTLFunctor.h +++ b/eo/src/eoSTLFunctor.h @@ -29,6 +29,10 @@ #include "eoFunctor.h" +/** @addtogroup Utilities + * @{ + */ + /** Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the copy semantics the STL functions usually require (i.e. they can be passed @@ -115,4 +119,6 @@ class eoSTLBF : public std::binary_function //! @todo: put automated wrappers here... +/** @} */ #endif + diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 26bad2737..906c8c8e5 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -29,6 +29,10 @@ #include #include +/** @addtogroup Evaluation + * @{ + */ + /** * eoScalarFitness >: * Wraps a scalar fitness values such as a double or int, with the option of @@ -107,4 +111,5 @@ std::istream& operator>>(std::istream& is, eoScalarFitness& f) return is; } +/** @} */ #endif diff --git a/eo/src/eoSecondsElapsedContinue.h b/eo/src/eoSecondsElapsedContinue.h index 08bb991ca..819f7ab5c 100644 --- a/eo/src/eoSecondsElapsedContinue.h +++ b/eo/src/eoSecondsElapsedContinue.h @@ -26,8 +26,11 @@ #define _eoSecondsElapsedContinue_h #include + /** Timed continuator: continues until a number of seconds is used + + @ingroup Continuators */ template< class EOT> class eoSecondsElapsedContinue: public eoContinue diff --git a/eo/src/eoSelect.h b/eo/src/eoSelect.h index 90bfd7dc9..ea5c8592b 100644 --- a/eo/src/eoSelect.h +++ b/eo/src/eoSelect.h @@ -35,6 +35,9 @@ eoSelect selects a number of individuals from the first argument and puts it in the second. To emphasize that it should not try to enlarge the population, the second argument is an eoPopRange, a simple struct that holds a begin and end iterator to the population + +@ingroup Core +@ingroup Selectors */ template class eoSelect : public eoBF&, eoPop&, void> diff --git a/eo/src/eoSelectFactory.h b/eo/src/eoSelectFactory.h index d94a0fa0f..59d2306ac 100644 --- a/eo/src/eoSelectFactory.h +++ b/eo/src/eoSelectFactory.h @@ -1,8 +1,8 @@ // eoSelectFactory.h -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- -// EOFactory.h +// EOFactory.h // (c) GeNeura Team, 1998 /* This library is free software; you can redistribute it and/or @@ -25,65 +25,69 @@ #ifndef _EOSELECTFACTORY_H #define _EOSELECTFACTORY_H - -#include -#include -#include + +#include +#include +#include //----------------------------------------------------------------------------- - -/** EO Factory.An instance of the factory class to create selectors, that is, -eoSelect objects -@see eoSelect*/ -template< class EOT> -class eoSelectFactory: public eoFactory > { - -public: - - /// @name ctors and dtors - //{@ - /// constructor - eoSelectFactory( ) {} - - /// destructor - virtual ~eoSelectFactory() {} - //@} - - /** Another factory methods: creates an object from an std::istream, reading from - it whatever is needed to create the object. Usually, the format for the std::istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - */ - virtual eoSelect* make(std::istream& _is) { - eoSelect * selectPtr; - std::string objectTypeStr; - _is >> objectTypeStr; - // All selectors have a rate, the proportion of the original population - float rate; - _is >> rate; - if ( objectTypeStr == "eoTournament") { - // another parameter is necessary - unsigned tSize; - _is >> tSize; - selectPtr = new eoTournament( rate, tSize ); - } else { - if ( objectTypeStr == "eoRandomSelect" ) { - selectPtr = new eoRandomSelect( rate ); - } else { - throw std::runtime_error( "Incorrect selector type" ); - } - } - return selectPtr; - } - - ///@name eoObject methods - //@{ - void printOn( std::ostream& _os ) const {}; - void readFrom( std::istream& _is ){}; - - /** className is inherited */ - //@} - -}; - + +/** EO Factory.An instance of the factory class to create selectors, that is, +eoSelect objects + +@see eoSelect +@ingroup Selectors +@ingroup Utilities +*/ +template< class EOT> +class eoSelectFactory: public eoFactory > { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoSelectFactory( ) {} + + /// destructor + virtual ~eoSelectFactory() {} + //@} + + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual eoSelect* make(std::istream& _is) { + eoSelect * selectPtr; + std::string objectTypeStr; + _is >> objectTypeStr; + // All selectors have a rate, the proportion of the original population + float rate; + _is >> rate; + if ( objectTypeStr == "eoTournament") { + // another parameter is necessary + unsigned tSize; + _is >> tSize; + selectPtr = new eoTournament( rate, tSize ); + } else { + if ( objectTypeStr == "eoRandomSelect" ) { + selectPtr = new eoRandomSelect( rate ); + } else { + throw std::runtime_error( "Incorrect selector type" ); + } + } + return selectPtr; + } + + ///@name eoObject methods + //@{ + void printOn( std::ostream& _os ) const {}; + void readFrom( std::istream& _is ){}; + + /** className is inherited */ + //@} + +}; + #endif diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index 4577b822a..e338ea316 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -46,6 +46,8 @@ techniques where it is a std::pair of doubles ... It has to have a < operator it you want to call an existing selector (see selector.h) - but of course you can write the whole thing ... + +@ingroup Selectors */ template class eoSelectFromWorth : public eoSelectOne @@ -86,6 +88,8 @@ protected: /** An instance of eoSelectPerf2Worth that does selection from the Worthes * using a ... determinisitic tournament, yes! + +@ingroup Selectors */ template class eoDetTournamentWorthSelect : public eoSelectFromWorth @@ -123,6 +127,8 @@ private: /** An instance of eoSelectPerf2Worth that does selection from the Worthes * using a ... stochastic tournament, yes! + +@ingroup Selectors */ template class eoStochTournamentWorthSelect : public eoSelectFromWorth @@ -162,6 +168,8 @@ private: /** An instance of eoSelectPerf2Worth that does selection from the Worthes * using a ... roulette wheel selection, yes! + +@ingroup Selectors */ template class eoRouletteWorthSelect : public eoSelectFromWorth diff --git a/eo/src/eoSelectMany.h b/eo/src/eoSelectMany.h index 74bbeee0d..310a918b9 100644 --- a/eo/src/eoSelectMany.h +++ b/eo/src/eoSelectMany.h @@ -40,6 +40,8 @@ It will use an eoHowMnay to determine the number of guys to select, and push them to the back of the destination population. + +@ingroup Selectors */ template class eoSelectMany : public eoSelect diff --git a/eo/src/eoSelectNumber.h b/eo/src/eoSelectNumber.h index 2b5d2a8cd..52cee6622 100644 --- a/eo/src/eoSelectNumber.h +++ b/eo/src/eoSelectNumber.h @@ -37,6 +37,8 @@ It will select a fixed number of individuals and pushes them to the back of the destination population. + +@ingroup Selectors */ template class eoSelectNumber : public eoSelect diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index dc8a3b1c6..690fbca64 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -36,6 +36,8 @@ of eoSelectOne. @see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional + +@ingroup Selectors */ #if defined(_MSC_VER) && (_MSC_VER < 1300) template diff --git a/eo/src/eoSelectPerc.h b/eo/src/eoSelectPerc.h index c0991d72b..d4aacfdad 100644 --- a/eo/src/eoSelectPerc.h +++ b/eo/src/eoSelectPerc.h @@ -37,6 +37,8 @@ It will select floor(rate*pop.size()) individuals and pushes them to the back of the destination population. + +@ingroup Selectors */ template class eoSelectPerc : public eoSelect diff --git a/eo/src/eoSequentialSelect.h b/eo/src/eoSequentialSelect.h index 9cbfbc401..a30c9248e 100644 --- a/eo/src/eoSequentialSelect.h +++ b/eo/src/eoSequentialSelect.h @@ -48,6 +48,8 @@ worse, or in random order. It is the eoSelectOne equivalent of eoDetSelect - though eoDetSelect always returns individuals from best to worst + +@ingroup Selectors */ template class eoSequentialSelect: public eoSelectOne { @@ -93,6 +95,8 @@ for G3 evolution engine, see Deb, Anad and Joshi, CEC 2002 As eoSequentialSelect, it is an eoSelectOne to be used within the eoEaseyEA algo, but conceptually it should be a global eoSelect, as it selects a bunch of guys in one go (done in the setup function now) + +@ingroup Selectors */ template class eoEliteSequentialSelect: public eoSelectOne { diff --git a/eo/src/eoSharing.h b/eo/src/eoSharing.h index ff2e203b3..b2a58653a 100644 --- a/eo/src/eoSharing.h +++ b/eo/src/eoSharing.h @@ -33,8 +33,11 @@ * Goldberg and Richardson's basic sharing */ -/** A helper class for Sharing - to hold distances */ - class dMatrix : public std::vector +/** A helper class for Sharing - to hold distances + * + * @ingroup Selectors + * */ +class dMatrix : public std::vector { public: // Ctor : sets size @@ -74,6 +77,7 @@ * Goldberg and Richardson's basic sharing * see eoSharingSelect for how to use it * and test/t-eoSharing.cpp for a sample use of both + * @ingroup Selectors */ template class eoSharing : public eoPerf2Worth diff --git a/eo/src/eoSharingSelect.h b/eo/src/eoSharingSelect.h index 40825c971..9fdbfd144 100644 --- a/eo/src/eoSharingSelect.h +++ b/eo/src/eoSharingSelect.h @@ -37,6 +37,7 @@ * rather than the raw fitness (see eoSelectFromWorth.h) * It uses an internal eoSharing object which is * an eoPerf2Worth + * @ingroup Selectors */ template diff --git a/eo/src/eoShiftMutation.h b/eo/src/eoShiftMutation.h index 612cf4d48..9f472360a 100644 --- a/eo/src/eoShiftMutation.h +++ b/eo/src/eoShiftMutation.h @@ -34,6 +34,8 @@ /** * Shift two components of a chromosome. + * + * @ingroup Variators */ template class eoShiftMutation: public eoMonOp { diff --git a/eo/src/eoSigBinaryFlight.h b/eo/src/eoSigBinaryFlight.h index 5bf56e2f7..a172484a3 100644 --- a/eo/src/eoSigBinaryFlight.h +++ b/eo/src/eoSigBinaryFlight.h @@ -39,6 +39,8 @@ * Pi=1 * else * Pi=0 + * + * @ingroup Variators */ template < class POT > class eoSigBinaryFlight:public eoBinaryFlight < POT > { diff --git a/eo/src/eoSocialNeighborhood.h b/eo/src/eoSocialNeighborhood.h index 3c4aae45c..cb8dd9f92 100644 --- a/eo/src/eoSocialNeighborhood.h +++ b/eo/src/eoSocialNeighborhood.h @@ -33,6 +33,8 @@ * Derivated from eoNeighborhood. Just takes relationships into account. * The neighborhood is defined as a list of indices corresponding to particles. * Also contains ONE particle considered as the best of the neighborhood. + * + * @ingroup Selectors */ template < class POT > class eoSocialNeighborhood : public eoNeighborhood { @@ -122,13 +124,3 @@ protected: #endif /* EOSOCIALNEIGHBORHOOD_H_ */ - - - - - - - - - - diff --git a/eo/src/eoStandardFlight.h b/eo/src/eoStandardFlight.h index 3d41c59d3..0c8008be1 100644 --- a/eo/src/eoStandardFlight.h +++ b/eo/src/eoStandardFlight.h @@ -34,6 +34,8 @@ /** Standard flight for particle swarm optimization. Derivated from abstract eoFlight, * just adds the velocities to the current position of the particle * and invalidates its fitness + * + * @ingroup Variators */ template < class POT > class eoStandardFlight:public eoFlight < POT > { diff --git a/eo/src/eoStandardVelocity.h b/eo/src/eoStandardVelocity.h index 73b425739..a66f13d80 100644 --- a/eo/src/eoStandardVelocity.h +++ b/eo/src/eoStandardVelocity.h @@ -40,6 +40,8 @@ * At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) * lbest depends on the topology evolved, when using eoStarTopology, lbest corresponds to the * global. Otherwise, lbest is a "local best", i.e the best in a neighborhood. +* +* @ingroup Variators */ template < class POT > class eoStandardVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoStarTopology.h b/eo/src/eoStarTopology.h index db1c6f7b5..ed6ec8ec2 100644 --- a/eo/src/eoStarTopology.h +++ b/eo/src/eoStarTopology.h @@ -36,6 +36,8 @@ * Topology dedicated to "globest best" strategy for particle swarm optimization. * All the particles of the swarm belong to the same and only social neighborhood. * The global best is stored and updated using the eoSocialNeighborhood. +* +* @ingroup Selectors */ template < class POT > class eoStarTopology:public eoTopology { diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index ef78aa127..2422ec1fc 100644 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -31,6 +31,8 @@ /** A continuator: does a minimum number of generations, then stops whenever a given number of generations takes place without improvement + + @ingroup Continuators */ template< class EOT> class eoSteadyFitContinue: public eoContinue diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h index 69f0376ee..952041e1b 100644 --- a/eo/src/eoStochTournamentSelect.h +++ b/eo/src/eoStochTournamentSelect.h @@ -21,24 +21,21 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr */ -//----------------------------------------------------------------------------- #ifndef eoStochTournamentSelect_h #define eoStochTournamentSelect_h -//----------------------------------------------------------------------------- - #include #include // accumulate #include // eoSelectOne #include // stochastic_tournament -//----------------------------------------------------------------------------- /** eoStochTournamentSelect: a selection method that selects ONE individual by binary stochastic tournament - -MS- 24/10/99 */ -//----------------------------------------------------------------------------- - + -MS- 24/10/99 + + @ingroup Selectors + */ template class eoStochTournamentSelect: public eoSelectOne { public: @@ -67,7 +64,5 @@ private: double Trate; }; -//----------------------------------------------------------------------------- - #endif diff --git a/eo/src/eoStochasticUniversalSelect.h b/eo/src/eoStochasticUniversalSelect.h index 09864057f..cd0c19738 100644 --- a/eo/src/eoStochasticUniversalSelect.h +++ b/eo/src/eoStochasticUniversalSelect.h @@ -34,13 +34,12 @@ #include #include -//----------------------------------------------------------------------------- /** eoStochasticUniversalSelect: select an individual proportional to her stored fitness value, but in contrast with eoStochasticUniversalSelect, get rid of most finite sampling effects by doing all selections in one go, using a single random number. -*/ -//----------------------------------------------------------------------------- + @ingroup Selectors +*/ template class eoStochasticUniversalSelect: public eoSelectOne { public: diff --git a/eo/src/eoSurviveAndDie.h b/eo/src/eoSurviveAndDie.h index f99d646c4..81e2e310c 100644 --- a/eo/src/eoSurviveAndDie.h +++ b/eo/src/eoSurviveAndDie.h @@ -46,6 +46,10 @@ removes them from the first pop argument eoDeterministicSaDReplacement */ +/** @addtogroup Replacors + * @{ + */ + /** eoSurviveAndDie A pure abstract class, to store the howmany's */ @@ -187,5 +191,7 @@ private : }; +/** @} */ #endif + diff --git a/eo/src/eoTimeContinue.h b/eo/src/eoTimeContinue.h index 47f94b671..d49f5ea56 100644 --- a/eo/src/eoTimeContinue.h +++ b/eo/src/eoTimeContinue.h @@ -32,6 +32,8 @@ /** * Termination condition until a running time is reached. + * + * @ingroup Continuators */ template < class EOT > class eoTimeContinue: public eoContinue diff --git a/eo/src/eoTopology.h b/eo/src/eoTopology.h index 531f1fe9d..24bfe8515 100644 --- a/eo/src/eoTopology.h +++ b/eo/src/eoTopology.h @@ -35,6 +35,9 @@ * Defines the interface of a swarm topology. Can be static (usually the case for the social topologies) * or dynamic. It's the same interface for both social and physical topologies. ("social" topology means * social-neighborhood-based toplogy and so on ...) + * + * @ingroup Selectors + * @ingroup Core */ template < class POT > class eoTopology:public eoPop < POT > { diff --git a/eo/src/eoTransform.h b/eo/src/eoTransform.h index 40bc81383..67dd712ae 100644 --- a/eo/src/eoTransform.h +++ b/eo/src/eoTransform.h @@ -31,8 +31,10 @@ //----------------------------------------------------------------------------- /** -eoTransform transforms a population by applying genetic operators on -it. +eoTransform transforms a population by applying genetic operators on it. + +@ingroup Combination +@ingroup Core */ template class eoTransform : public eoUF&, void> diff --git a/eo/src/eoTruncSelect.h b/eo/src/eoTruncSelect.h index 0c64e1622..8f75e2153 100644 --- a/eo/src/eoTruncSelect.h +++ b/eo/src/eoTruncSelect.h @@ -38,6 +38,8 @@ * using eoSelectOne as it's mechanism. * Therefore eoSelectMany needs an eoSelectOne in its ctor * It will use an eoHowMnay to determine the number of guys to keep, + * + * @ingroup Selectors */ template class eoTruncSelect : public eoSelect diff --git a/eo/src/eoTruncatedSelectMany.h b/eo/src/eoTruncatedSelectMany.h index 9cad8dbc4..5e999459d 100644 --- a/eo/src/eoTruncatedSelectMany.h +++ b/eo/src/eoTruncatedSelectMany.h @@ -48,6 +48,8 @@ However, the same result can be obtained by embedding an eoTruncatedSelectOne into an eoSelectMany ... + + @ingroup Selectors */ template class eoTruncatedSelectMany : public eoSelect diff --git a/eo/src/eoTruncatedSelectOne.h b/eo/src/eoTruncatedSelectOne.h index b65739c41..b515cf493 100644 --- a/eo/src/eoTruncatedSelectOne.h +++ b/eo/src/eoTruncatedSelectOne.h @@ -40,6 +40,7 @@ It will perform selection only from the top guys in the population. + @ingroup Selectors */ template class eoTruncatedSelectOne : public eoSelectOne diff --git a/eo/src/eoTwoOptMutation.h b/eo/src/eoTwoOptMutation.h index edeeb2f2e..2cba79e32 100644 --- a/eo/src/eoTwoOptMutation.h +++ b/eo/src/eoTwoOptMutation.h @@ -32,6 +32,8 @@ mak@dhi.dk /** * Especially designed for combinatorial problem such as the TSP. +* +* @ingroup Variators */ template class eoTwoOptMutation: public eoMonOp { diff --git a/eo/src/eoVariableInertiaWeightedVelocity.h b/eo/src/eoVariableInertiaWeightedVelocity.h index e00fb3163..9d039ee6b 100644 --- a/eo/src/eoVariableInertiaWeightedVelocity.h +++ b/eo/src/eoVariableInertiaWeightedVelocity.h @@ -39,6 +39,9 @@ * At step t: v(t+1)= w*v(t) + c1*r1* ( xbest(t)-x(t) ) + c2*r2* ( gbest(t) - x(t) ) * w is updated each time the velocity performer is called. * (ci given and Ri chosen at random in [0;1]). +* +* @ingroup Core +* @ingroup Variators */ template < class POT > class eoVariableInertiaWeightedVelocity:public eoVelocity < POT > { diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 9d604ea87..5ad6de051 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -36,6 +36,10 @@ Basically, they exchange genes - we need some matching information to apply atom crossover */ +/** @addtogroup Variators + * @{ + */ + /** A helper class for choosing which genes to exchange */ template class eoAtomExchange : public eoBF @@ -344,6 +348,6 @@ private: double rate; }; - - +/** @} */ #endif + diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 585fc3767..6845ce0c0 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -39,6 +39,9 @@ Hence they are in file eoFlOr MonOp.h file (FixedLengthOrdered mutations) */ +/* @addtogroup Variators + * @{ + */ /** Addition of a gene Is inserted at a random position - so can be applied to both @@ -153,6 +156,6 @@ private: eoGeneDelChooser & chooser; }; - - +/** @} */ #endif + diff --git a/eo/src/eoVelocity.h b/eo/src/eoVelocity.h index 3e01efdb1..5d4bdcd23 100644 --- a/eo/src/eoVelocity.h +++ b/eo/src/eoVelocity.h @@ -35,6 +35,8 @@ /** * Abstract class for velocities calculation (particle swarm optimization). * All the velocities must derivated from eoVelocity. + * + * @ingroup Variators */ template < class POT > class eoVelocity:public eoBF < POT &,unsigned , void > { diff --git a/eo/src/eoWeightUpdater.h b/eo/src/eoWeightUpdater.h index 6adfd5f49..656190163 100644 --- a/eo/src/eoWeightUpdater.h +++ b/eo/src/eoWeightUpdater.h @@ -32,6 +32,8 @@ /** * Abstract class for (inertia) weight updater (particle swarm optimization). * Used inside classes extending eoVelocity. + * + * @ingroup Core */ template < class WeightType > class eoWeightUpdater: public eoUF < WeightType &, void > {}; From 2104f5b7e938c801edc4f257df02c267c70908bb Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 5 Nov 2010 22:46:15 +0100 Subject: [PATCH 1627/2134] and finally... still more grouping in documentation. --- eo/src/do/make_algo_easea.h | 4 +++- eo/src/do/make_algo_scalar.h | 4 ++-- eo/src/do/make_checkpoint.h | 2 ++ eo/src/do/make_checkpoint_FDC.h | 3 +++ eo/src/do/make_checkpoint_assembled.h | 6 +++++- eo/src/do/make_continue.h | 8 +++++++- eo/src/do/make_general_replacement.h | 5 ++++- eo/src/do/make_pop.h | 14 +++++++++++--- eo/src/do/make_run.h | 3 ++- eo/src/eoScalarFitnessAssembled.h | 7 +++++-- eo/src/es/eoEsChromInit.h | 3 ++- eo/src/es/eoEsFull.h | 2 +- eo/src/es/eoEsGlobalXover.h | 5 ++++- eo/src/es/eoEsMutate.h | 3 ++- eo/src/es/eoEsMutationInit.h | 3 ++- eo/src/es/eoEsSimple.h | 2 +- eo/src/es/eoEsStandardXover.h | 3 +++ eo/src/es/eoEsStdev.h | 4 ++-- eo/src/es/eoNormalMutation.h | 12 +++++++++--- eo/src/es/eoReal.h | 2 ++ eo/src/es/eoRealAtomXover.h | 6 ++++++ eo/src/es/eoRealInitBounded.h | 3 +++ eo/src/es/eoRealOp.h | 21 +++++++++++++++------ eo/src/es/eoSBXcross.h | 4 ++++ eo/src/es/make_es.h | 10 ++++++++++ eo/src/es/make_genotype_real.h | 5 +++++ eo/src/es/make_op.h | 5 +++++ eo/src/es/make_op_es.h | 5 +++++ eo/src/es/make_op_real.h | 5 +++++ eo/src/es/make_real.h | 5 +++++ eo/src/es/matrices.h | 4 ++++ eo/src/ga/eoBitOp.h | 2 ++ eo/src/ga/eoBitOpFactory.h | 5 ++++- eo/src/ga/eoBoolFlip.h | 3 +++ eo/src/ga/eoPBILAdditive.h | 1 - eo/src/ga/make_ga.h | 5 +++++ eo/src/ga/make_genotype_ga.h | 4 +++- eo/src/ga/make_op.h | 3 +++ eo/src/other/eoExternalEO.h | 11 ++++++++--- eo/src/other/eoExternalOpFunctions.h | 10 ++++++++++ eo/src/other/eoString.h | 6 +++++- eo/src/utils/eoAssembledFitnessStat.h | 5 +++++ eo/src/utils/eoCheckPoint.h | 16 ++++++++++++++++ eo/src/utils/eoDistance.h | 8 +++++++- eo/src/utils/eoFDCStat.h | 8 +++++++- eo/src/utils/eoFeasibleRatioStat.h | 5 ++++- eo/src/utils/eoFileMonitor.h | 2 ++ eo/src/utils/eoFileSnapshot.h | 3 ++- eo/src/utils/eoFuncPtrStat.h | 10 ++++++++++ eo/src/utils/eoGnuplot.h | 2 ++ eo/src/utils/eoGnuplot1DMonitor.h | 2 ++ eo/src/utils/eoGnuplot1DSnapshot.h | 2 ++ eo/src/utils/eoHowMany.h | 12 +++++++----- eo/src/utils/eoIntBounds.h | 26 +++++++++++++++++++++++--- eo/src/utils/eoLogger.h | 11 ++++++++++- eo/src/utils/eoMonitor.h | 21 ++++++++++++++++----- eo/src/utils/eoOStreamMonitor.h | 4 ++-- eo/src/utils/eoParam.h | 16 ++++++++++++++-- eo/src/utils/eoParser.h | 4 ++++ eo/src/utils/eoParserLogger.h | 3 +++ eo/src/utils/eoPopStat.h | 4 ++++ eo/src/utils/eoRNG.h | 17 +++++++++++------ eo/src/utils/eoRealBounds.h | 18 +++++++++++++++--- eo/src/utils/eoRealVectorBounds.h | 12 ++++++++++-- eo/src/utils/eoRndGenerators.h | 7 +++++++ eo/src/utils/eoScalarFitnessStat.h | 2 ++ eo/src/utils/eoStat.h | 18 ++++++++++++++++++ eo/src/utils/eoState.h | 1 + eo/src/utils/eoStdoutMonitor.h | 2 ++ eo/src/utils/eoTimeCounter.h | 2 ++ eo/src/utils/eoTimedMonitor.h | 2 ++ eo/src/utils/eoUniformInit.h | 7 +++++++ eo/src/utils/eoUpdatable.h | 8 ++++++++ eo/src/utils/eoUpdater.h | 10 ++++++++++ eo/src/utils/rnd_generators.h | 5 +++++ eo/src/utils/selectors.h | 4 +++- 76 files changed, 427 insertions(+), 70 deletions(-) diff --git a/eo/src/do/make_algo_easea.h b/eo/src/do/make_algo_easea.h index 84818e6c4..a6522ef9f 100644 --- a/eo/src/do/make_algo_easea.h +++ b/eo/src/do/make_algo_easea.h @@ -68,8 +68,10 @@ * * This is why the template is the complete EOT even though only the fitness * is actually templatized here + * + * + * @ingroup Builders */ - template eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalFunc& _popeval, eoContinue& _continue, eoGenOp& _op) { diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 7dfebe3a0..1a207626f 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -73,9 +73,9 @@ * * This is why the template is the complete EOT even though only the fitness * is actually templatized here + * + * @ingroup Builders */ - - template eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op, eoDistance * _dist = NULL) { diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 99aca2bf1..37cf5d0a4 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -69,6 +69,8 @@ bool testDirRes(std::string _dirName, bool _erase); * * CHANGE (March 2008): now receiving an eoValueParam instead of an eoEvalFuncCounter. This function is just interested * in the value of the parameter calculated on the evaluation function, not in the actual function itself!! + * + * @ingroup Builders */ template eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValueParam& _eval, eoContinue& _continue) diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h index 80686c936..1c2ec493c 100644 --- a/eo/src/do/make_checkpoint_FDC.h +++ b/eo/src/do/make_checkpoint_FDC.h @@ -41,6 +41,9 @@ bool testDirRes(std::string _dirName, bool _erase); /////////////////// The checkpoint and other I/O ////////////// +/** + * @ingroup Builders + */ template eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h index 96518f610..656b13769 100644 --- a/eo/src/do/make_checkpoint_assembled.h +++ b/eo/src/do/make_checkpoint_assembled.h @@ -49,7 +49,11 @@ bool testDirRes(std::string _dirName, bool _erase); /////////////////// The checkpoint and other I/O ////////////// -/** Of course, Fitness needs to be an eoScalarFitnessAssembled!!! */ +/** Of course, Fitness needs to be an eoScalarFitnessAssembled!!! + * + * + * @ingroup Builders + * */ template eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index a45dcd0a7..628624386 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -49,6 +49,9 @@ It can then be instantiated, and compiled on its own for a given EOType /////////////////// the stopping criterion //////////////// + /** + * @ingroup Builders + */ template eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) { @@ -59,7 +62,10 @@ eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_comb return _combined; } - +/** + * + * @ingroup Builders + */ template eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) { diff --git a/eo/src/do/make_general_replacement.h b/eo/src/do/make_general_replacement.h index dfefb649b..4f1f52e86 100644 --- a/eo/src/do/make_general_replacement.h +++ b/eo/src/do/make_general_replacement.h @@ -39,6 +39,8 @@ /** a helper function that decodes a parameter read by the parser into an * eoReduce & (allocates the pointer and stores it into an eoState) + * + * @ingroup Builders */ template eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) @@ -129,8 +131,9 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) * eoHowMany _surviveOffspring number of offspring after offspring recuction * eoParamParamType & _reduceOffspringType how the offspring are reduced * eoParamParamType & _reduceFinalType how the final population is reduced to initial population size + * + * @ingroup Builders */ - template eoReplacement & make_general_replacement( eoParser& _parser, eoState& _state, diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 0fe927a56..76242cab1 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -34,17 +34,25 @@ #include #include +/** @defgroup Builders Automatic builders + * + * Automatic builders are functions that automagically builds most commons instances for you. + * + * All the options you needs are set in the command-line parser. + * Those functions all start with the "do_make_" prefix. + * + * @ingroup Utilities + */ -///////////////////////////////// INIT POP /////////////////////////////// /** * Templatized version of parser-based construct of the population * + other initializations that are NOT representation-dependent. * * It must then be instantiated, and compiled on its own for a given EOType * (see e.g. ga.h and ga.pp in dir ga) + * + * @ingroup Builders */ - - template eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _init) { diff --git a/eo/src/do/make_run.h b/eo/src/do/make_run.h index 64e3fa333..7e1e2889e 100644 --- a/eo/src/do/make_run.h +++ b/eo/src/do/make_run.h @@ -34,8 +34,9 @@ * A trivial function - only here to allow instanciation with a give EOType * and separate compilation - see in ga dir, make_run_ga * + * + * @ingroup Builders */ - template void do_run(eoAlgo& _algo, eoPop& _pop) { diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 9eb42a6c2..c0d69f5ab 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -36,6 +36,10 @@ #include #include +/** @addtogroup Evaluation + * @{ + */ + //! Defines properties of eoScalarFitnessAssembled. /*! Properties that are hold in this traits class: - std::vector to hold descriptions of the different fitness terms @@ -270,7 +274,6 @@ std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled /** -\ingroup EvolutionStrategies +\ingroup Real The most complex evolutionary strategy representation. Co-evolving mutation rates and correlated mutations. diff --git a/eo/src/es/eoEsGlobalXover.h b/eo/src/es/eoEsGlobalXover.h index eb2b43308..8261dd618 100644 --- a/eo/src/es/eoEsGlobalXover.h +++ b/eo/src/es/eoEsGlobalXover.h @@ -36,9 +36,12 @@ // needs a selector - here random #include -/** Gloabl crossover operator for ES genotypes. +/** Global crossover operator for ES genotypes. * Uses some Atom crossovers to handle both the object variables * and the mutation strategy parameters + * + * @ingroup Real + * @ingroup Variators */ template class eoEsGlobalXover: public eoGenOp diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 180b0f8ae..6ae09ef2c 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -45,7 +45,8 @@ /** ES-style mutation in the large -@ingroup EvolutionStrategies +@ingroup Real +@ingroup Variators Obviously, valid only for eoES*. It is currently valid for three types of ES chromosomes: diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index 43240362f..0d4db55e2 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -31,7 +31,8 @@ /** Initialize Mutation operator -@ingroup EvolutionStrategies +@ingroup Real +@ingroup Variators Proxy class that is used for initializing the mutation operator. It provides an interface between eoEsMutate and the abstract parameterLoader. It also provides diff --git a/eo/src/es/eoEsSimple.h b/eo/src/es/eoEsSimple.h index 60c62c53d..ac93ab4b6 100644 --- a/eo/src/es/eoEsSimple.h +++ b/eo/src/es/eoEsSimple.h @@ -30,7 +30,7 @@ Contact: http://eodev.sourceforge.net /** Simple Evolution Strategy -@ingroup EvolutionStrategies +@ingroup Real One of the more simple evolution strategies, sporting just a single stdeviation for the entire chromosome. For more advanced versions see also eoEsStdev diff --git a/eo/src/es/eoEsStandardXover.h b/eo/src/es/eoEsStandardXover.h index b4cc11533..56d59be8b 100644 --- a/eo/src/es/eoEsStandardXover.h +++ b/eo/src/es/eoEsStandardXover.h @@ -41,6 +41,9 @@ * and the mutation strategy parameters * It is an eoBinOp and has to be wrapped into an eoGenOp before being used * like the global version + * + * @ingroup Real + * @ingroup Variators */ template class eoEsStandardXover: public eoBinOp diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index 1fdd39c8a..b8910512c 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -28,10 +28,10 @@ Contact: http://eodev.sourceforge.net /** Evolutionary Strategy with a standard deviation per parameter -@ingroup EvolutionStrategies - Evolutionary strategie style representation, supporting co-evolving standard deviations. + +@ingroup Real */ template class eoEsStdev : public eoVector diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index ba807b24b..b547bece9 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -43,8 +43,10 @@ * As for the bounds, the values are here folded back into the bounds. * The other possiblity would be to iterate until we fall inside the bounds - * but this sometimes takes a long time!!! + * + * @ingroup Real + * @ingroup Variators */ - template class eoNormalVecMutation: public eoMonOp { public: @@ -111,8 +113,10 @@ private: * As for the bounds, the values are here folded back into the bounds. * The other possiblity would be to iterate until we fall inside the bounds - * but this sometimes takes a long time!!! + * + * @ingroup Real + * @ingroup Variators */ - template class eoNormalMutation : public eoMonOp { @@ -172,8 +176,10 @@ private: * and write the update() method! * here the 1 fifth rule: count the proportion of successful mutations, and * increase sigma if more than threshold (1/5 !) + * + * @ingroup Real + * @ingroup Variators */ - template class eoOneFifthMutation : public eoNormalMutation, public eoUpdatable { diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index 516395f15..5674e8aef 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -33,6 +33,8 @@ /** eoReal: implementation of simple real-valued chromosome. * based on eoVector class + * + * @ingroup Real */ template class eoReal: public eoVector { diff --git a/eo/src/es/eoRealAtomXover.h b/eo/src/es/eoRealAtomXover.h index 9380b443a..c55287349 100644 --- a/eo/src/es/eoRealAtomXover.h +++ b/eo/src/es/eoRealAtomXover.h @@ -37,6 +37,9 @@ /** Discrete crossover == exchange of values + * + * @ingroup Real + * @ingroup Variators */ class eoDoubleExchange: public eoBinOp { @@ -67,6 +70,9 @@ public: /** Intermediate crossover == linear combination + * + * @ingroup Real + * @ingroup Variators */ class eoDoubleIntermediate: public eoBinOp { diff --git a/eo/src/es/eoRealInitBounded.h b/eo/src/es/eoRealInitBounded.h index b0f98ba6f..d74c76980 100644 --- a/eo/src/es/eoRealInitBounded.h +++ b/eo/src/es/eoRealInitBounded.h @@ -35,6 +35,9 @@ /** Simple initialization for any EOT that derives from std::vector * uniformly in some bounds + * + * @ingroup Real + * @ingroup Variators */ template class eoRealInitBounded : public eoInit diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 6fabf2f2a..891633839 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -39,7 +39,9 @@ by uniform choice with range epsilon with probability p_change per variable \class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + * + * @ingroup Real + * @ingroup Variators */ template class eoUniformMutation: public eoMonOp @@ -138,7 +140,9 @@ private: /** eoDetUniformMutation --> changes exactly k values of the std::vector by uniform choice with range epsilon \class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + * + * @ingroup Real + * @ingroup Variators */ template class eoDetUniformMutation: public eoMonOp @@ -241,7 +245,9 @@ private: /** eoSegmentCrossover --> uniform choice in segment == arithmetical with same value along all coordinates \class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + * + * @ingroup Real + * @ingroup Variators */ template class eoSegmentCrossover: public eoQuadOp @@ -331,9 +337,10 @@ protected: /** eoHypercubeCrossover --> uniform choice in hypercube == arithmetical with different values for each coordinate \class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + * + * @ingroup Real + * @ingroup Variators */ - template class eoHypercubeCrossover: public eoQuadOp { public: @@ -451,7 +458,9 @@ protected: /** eoRealUxOver --> Uniform crossover, also termed intermediate crossover \class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h -\ingroup parameteric + * + * @ingroup Real + * @ingroup Variators */ template class eoRealUXover: public eoQuadOp diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h index 34fa47944..5498edaf4 100644 --- a/eo/src/es/eoSBXcross.h +++ b/eo/src/es/eoSBXcross.h @@ -32,6 +32,10 @@ +/** +* @ingroup Real +* @ingroup Variators +*/ template class eoSBXCrossover: public eoQuadOp { public: diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index 3212f3916..94fea64a9 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -62,6 +62,14 @@ // without self-adaptation #include +/** @addtogroup Builders + * @{ + */ + +/** @addtogroup Real + * @{ + */ + //Representation dependent - rewrite everything anew for each representation ////////////////////////// // the genotypes @@ -143,4 +151,6 @@ void run_ea(eoAlgo >& _ga, eoPop & do_make_genotype(eoParser& _parser, eoState& _state, EOT) return *init; } +/** @} */ #endif // EO_make_genotype_h diff --git a/eo/src/es/make_op.h b/eo/src/es/make_op.h index a19dc4b00..0bcda4f73 100644 --- a/eo/src/es/make_op.h +++ b/eo/src/es/make_op.h @@ -45,6 +45,10 @@ #include +/** @addtogroup Builders + * @{ + */ + /* * This function builds the operators that will be applied to the eoReal * @@ -291,4 +295,5 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit +/** @addtogroup Builders + * @{ + */ + /* * This function builds the operators that will be applied to the eoReal * @@ -187,6 +191,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< #endif // EO_make_op_h +/** @} */ // Local Variables: // coding: iso-8859-1 diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 64f378837..2792e6380 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -45,6 +45,10 @@ #include +/** @addtogroup Builders + * @{ + */ + /* * This function builds the operators that will be applied to the eoReal * @@ -281,4 +285,5 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< // that's it! return op; } +/** @} */ #endif diff --git a/eo/src/es/make_real.h b/eo/src/es/make_real.h index 594934ddf..bb356fc71 100644 --- a/eo/src/es/make_real.h +++ b/eo/src/es/make_real.h @@ -60,6 +60,10 @@ //Representation dependent - rewrite everything anew for each representation ////////////////////////// + +/** @addtogroup Builders + * @{ + */ // the genotypes eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); @@ -99,4 +103,5 @@ void run_ea(eoAlgo >& _ga, eoPop +/** @ingroup Utilities + */ class lower_triangular_matrix { unsigned n; @@ -21,6 +23,8 @@ class lower_triangular_matrix { std::vector::const_iterator operator[](unsigned i) const { return data.begin() + i*(i+1)/2; } }; +/** @ingroup Utilities + */ class square_matrix { unsigned n; std::vector data; diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index ee597e640..a1484ff19 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -39,6 +39,8 @@ /** eoBitFlip --> changes 1 bit \class eoBitBitFlip eoBitOp.h ga/eoBitOp.h \ingroup bitstring + +@ingroup Variators */ template class eoOneBitFlip: public eoMonOp diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h index 27394aef6..b16900e75 100644 --- a/eo/src/ga/eoBitOpFactory.h +++ b/eo/src/ga/eoBitOpFactory.h @@ -34,7 +34,10 @@ /** EO Factory. An instance of the factory class to create operators that act on bitstring chromosomes. Only those chromosomes can instantiate the operators that are created here -@see eoSelect*/ +@see eoSelect + +@ingroup Variators +*/ template< class EOT> class eoBitOpFactory: public eoFactory { diff --git a/eo/src/ga/eoBoolFlip.h b/eo/src/ga/eoBoolFlip.h index cf226ebac..be9d252b1 100644 --- a/eo/src/ga/eoBoolFlip.h +++ b/eo/src/ga/eoBoolFlip.h @@ -28,6 +28,9 @@ #include /** a simple boolean mutation - to be used in generic eoOp's + * + @ingroup bitstring + @ingroup Variators */ class eoBoolFlip : public eoMonOp { public: diff --git a/eo/src/ga/eoPBILAdditive.h b/eo/src/ga/eoPBILAdditive.h index bea4c5062..dd360337b 100644 --- a/eo/src/ga/eoPBILAdditive.h +++ b/eo/src/ga/eoPBILAdditive.h @@ -41,7 +41,6 @@ * here the same formula is applied, with some of the best individuals * and for some of the worst individuals (with different learning rates) */ - template class eoPBILAdditive : public eoDistribUpdater { diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index ee75b8134..6ce8a07ad 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -52,6 +52,10 @@ //Representation dependent - rewrite everything anew for each representation ////////////////////////// +/** @addtogroup Builders + * @{ + */ + // the genotypes eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); @@ -91,4 +95,5 @@ void run_ea(eoAlgo >& _ga, eoPop eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 85af41ffb..338557b58 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -63,6 +63,9 @@ * EOT myEO; * _init(myEO); * and myEO is then an ACTUAL object + * + * @ingroup bitstring + * @ingroup Builders */ template diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 9be61020b..219cf716d 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -33,8 +33,9 @@ * to be inserted in EO. This struct or class can be of any * form, the only thing this class does is attach a fitness * value to it and makes it the appropriate type (derives it from EO). + * + * @ingroup Utilities */ - template class eoExternalEO : public EO, virtual public External { @@ -74,7 +75,9 @@ public : }; -/// To remove ambiguities between EO and External, streaming operators are defined yet again +/** To remove ambiguities between EO and External, streaming operators are defined yet again + * @ingroup Utilities + */ template std::ostream& operator<<(std::ostream& os, const eoExternalEO& eo) { @@ -82,7 +85,9 @@ std::ostream& operator<<(std::ostream& os, const eoExternalEO& eo) return os; } -/// To remove ambiguities between EO and External, streaming operators are defined yet again +/** To remove ambiguities between EO and External, streaming operators are defined yet again + * @ingroup Utilities + */ template std::istream& operator>>(std::istream& is, eoExternalEO& eo) { diff --git a/eo/src/other/eoExternalOpFunctions.h b/eo/src/other/eoExternalOpFunctions.h index a96991e71..d86b49c45 100644 --- a/eo/src/other/eoExternalOpFunctions.h +++ b/eo/src/other/eoExternalOpFunctions.h @@ -40,6 +40,8 @@ External func(); Where External is the user defined struct or class + + @ingroup Utilities */ template > class eoExternalInit : public eoInit @@ -68,6 +70,8 @@ private : Fit func(External&); Where External is the user defined struct or class and Fit the fitness type + +@ingroup Utilities */ template > class eoExternalEvalFunc : public eoEvalFunc @@ -96,6 +100,8 @@ class eoExternalEvalFunc : public eoEvalFunc Where External is the user defined struct or class. The function should return true when it changed something, false otherwise + + @ingroup Utilities */ template > @@ -123,6 +129,8 @@ class eoExternalMonOp : public eoMonOp Where External is the user defined struct or class The function should return true when it changed something, false otherwise + + @ingroup Utilities */ template > class eoExternalBinOp : public eoBinOp @@ -149,6 +157,8 @@ class eoExternalBinOp : public eoBinOp Where External is the user defined struct or class The function should return true when it changed something, false otherwise + + @ingroup Utilities */ template > class eoExternalQuadOp : public eoQuadOp diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index e2aee7584..bc1cf88d4 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -37,7 +37,11 @@ // eoString //----------------------------------------------------------------------------- -/** Adaptor that turns an STL std::string into an EO */ +/** Adaptor that turns an STL std::string into an EO + + @ingroup Representations + @ingroup Utilities + */ template class eoString: public EO, public std::string { diff --git a/eo/src/utils/eoAssembledFitnessStat.h b/eo/src/utils/eoAssembledFitnessStat.h index 5dd96c674..44586932b 100644 --- a/eo/src/utils/eoAssembledFitnessStat.h +++ b/eo/src/utils/eoAssembledFitnessStat.h @@ -36,6 +36,10 @@ #include #include +/** @addtogroup Stats + * @{ + */ + /** Average fitness values of a population, where the fitness is of type eoScalarAssembledFitness. Specify in the constructor, @@ -109,4 +113,5 @@ private: unsigned whichFitnessTerm; }; +/** @} */ #endif diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index d2c1cadc4..775c00fbe 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -32,6 +32,21 @@ #include #include +/** @defgroup Checkpoints Checkpointing + * + * Checkpoints are supposed to be called perodically (for instance at each generation) and + * will call every functors you put in them. + * + * Use them with eoStats, eoUpdater and eoMonitor to get statistics at each generation. + * + * @see eoStats + * @see eoMonitor + * @see eoUpdater + * + * @ingroup Utilities + * + * @{ + */ /** eoCheckPoint is a container class. It contains std::vectors of (pointers to) @@ -161,4 +176,5 @@ std::string eoCheckPoint::allClassNames() const return s; } +/** @} */ #endif diff --git a/eo/src/utils/eoDistance.h b/eo/src/utils/eoDistance.h index 26ef0ea6f..1a7c9edd6 100644 --- a/eo/src/utils/eoDistance.h +++ b/eo/src/utils/eoDistance.h @@ -27,9 +27,14 @@ #define _eoDistance_H #include + +/** @addtogroup Stats + * @{ + * */ + /** This is a generic class for distance functors: - takes 2 things ane returns a double + takes 2 things and returns a double */ template< class EOT > class eoDistance : public eoBF @@ -94,5 +99,6 @@ public: }; +/** @} */ #endif diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h index 0d2dda730..a604533f9 100644 --- a/eo/src/utils/eoFDCStat.h +++ b/eo/src/utils/eoFDCStat.h @@ -32,8 +32,12 @@ #include /** - The FDC computation - stores the values into eoValueParam + The Fitness Distance Correlation computation. + + Stores the values into eoValueParam so they can be snapshot by some eoGnuplotSnapshot ... + +@ingroup Stats */ template class eoFDCStat : public eoStat @@ -106,6 +110,8 @@ private: * As I failed to have FDC stat as an eoStat, this is the trick * to put the 2 eoParam > into a monitor * This class does nothing else. + +@ingroup Stats */ template class eoFDCFileSnapshot : public eoFileSnapshot // is an eoMonitor diff --git a/eo/src/utils/eoFeasibleRatioStat.h b/eo/src/utils/eoFeasibleRatioStat.h index 1092e9036..8d669dbec 100644 --- a/eo/src/utils/eoFeasibleRatioStat.h +++ b/eo/src/utils/eoFeasibleRatioStat.h @@ -34,7 +34,10 @@ Authors: #include "eoStat.h" -//! Ratio of the number of individuals with a feasible dual fitness in the population (@see eoDualFitness) +/** Ratio of the number of individuals with a feasible dual fitness in the population (@see eoDualFitness) + * + * @ingroup Stats + */ template class eoFeasibleRatioStat : public eoStat< EOT, double > { diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 45d5b0fcd..9a4a0f1e5 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -34,12 +34,14 @@ #include "utils/eoMonitor.h" #include "eoObject.h" + /** Prints statistics to file Modified the default behavior, so that it erases existing files. Can be modified in the ctor. @version MS 25/11/00 +@ingroup Monitors */ class eoFileMonitor : public eoMonitor { diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index c9e58c746..b5d5142b7 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -48,8 +48,9 @@ so that you can pass e.g. an evalcounter (minor) I failed to templatize everything so that it can handle eoParam > for any type T, simply calling their getValue method ... -*/ +@ingroup Monitors +*/ class eoFileSnapshot : public eoMonitor { public : diff --git a/eo/src/utils/eoFuncPtrStat.h b/eo/src/utils/eoFuncPtrStat.h index 04675ac73..f1acc2f8d 100644 --- a/eo/src/utils/eoFuncPtrStat.h +++ b/eo/src/utils/eoFuncPtrStat.h @@ -1,9 +1,16 @@ + #ifndef eoFuncPtrStat_h #define eoFuncPtrStat_h #include #include +/** Wrapper to turn any stand-alone function and into an eoStat. + * + * The function should take an eoPop as argument. + * + * @ingroup Stats + */ template class eoFuncPtrStat : public eoStat { @@ -25,6 +32,9 @@ private: func_t func; }; +/** + * @ingroup Stats + */ template eoFuncPtrStat& makeFuncPtrStat( T (*func)(const eoPop&), eoFunctorStore& store, std::string description = "func") { return store.storeFunctor( diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index e057900a5..37e6419b7 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -34,6 +34,8 @@ calls to plots what is already written by some eoMonitor into a file @author Marc Schoenauer @version 0.0 (2001) + +@ingroup Monitors */ class eoGnuplot { diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 523e875c5..e32e22275 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -43,6 +43,8 @@ eoGnuplot1DMonitor plots stats through gnuplot Assumes that the same file is appened every so and so, and replots it everytime + +@ingroup Monitors */ class eoGnuplot1DMonitor : public eoFileMonitor, public eoGnuplot { diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index f004a56e4..05015b642 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -47,6 +47,8 @@ This class plots through gnuplot the eoStat given as argument Assumes that the same file is re-written every so and so, and plots it from scratch everytime it's called + +@ingroup Monitors */ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot { diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index ffa420d02..947a0013e 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -29,6 +29,11 @@ Contact: http://eodev.sourceforge.net #ifndef eoHowMany_h #define eoHowMany_h +#include + +#include + + /** A helper class, to determine a number of individuals from another one * Typically, is used in selection / replacement procedures, e.g. * the number of offspring from the number of parents, or @@ -65,12 +70,9 @@ Contact: http://eodev.sourceforge.net * eoG3Repalcement) * * It is an eoPersistent because we need to be able to use eoParamValue + * + * @ingroup Core */ - -#include - -#include - class eoHowMany : public eoPersistent { public: diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h index 074c08363..6f801d9d2 100644 --- a/eo/src/utils/eoIntBounds.h +++ b/eo/src/utils/eoIntBounds.h @@ -31,14 +31,15 @@ #include /** -\defgroup EvolutionStrategies +\defgroup Real */ /** \class eoIntBounds eoIntBounds.h es/eoIntBounds.h -\ingroup EvolutionStrategies +\ingroup Real +\ingroup Bounds Defines bound classes for real numbers. @@ -149,6 +150,9 @@ public: }; /** A default class for unbounded variables + * + * @ingroup Real + * @ingroup Bounds */ class eoIntNoBounds : public eoIntBounds { @@ -221,11 +225,18 @@ public: }; -// one object for all - see eoIntBounds.cpp +/** one object for all - see eoIntBounds.cpp + * + * @ingroup Real + * @ingroup Bounds + */ extern eoIntNoBounds eoDummyIntNoBounds; /** * fully bounded eoIntBound == interval + * + * @ingroup Real + * @ingroup Bounds */ class eoIntInterval : public eoIntBounds { @@ -349,6 +360,9 @@ private : /** * an eoIntBound bounded from below only + * + * @ingroup Real + * @ingroup Bounds */ class eoIntBelowBound : public eoIntBounds { @@ -453,6 +467,9 @@ private : /** An eoIntBound bounded from above only + * + * @ingroup Real + * @ingroup Bounds */ class eoIntAboveBound : public eoIntBounds { @@ -560,6 +577,9 @@ private : /** A class that encapsulate all possible eoIntBounds. * Mandatory in order to read through the parser + * + * @ingroup Real + * @ingroup Bounds */ class eoGeneralIntBounds : public eoIntBounds { diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index c92616984..9789ee6b5 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -25,8 +25,12 @@ Caner Candan */ -/** Here's an example explaning how to use eoLogger: +/** @defgroup Logging Logging + Global logger for EO. + + Here's an example explaning how to use eoLogger: +\code #include #include #include @@ -77,7 +81,9 @@ Caner Candan return 0; } +\endcode +@{ */ #ifndef eoLogger_h @@ -249,4 +255,7 @@ namespace eo extern eoLogger log; } + +/** @} */ + #endif // !eoLogger_h diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index a41c9fd39..e02900f21 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -1,7 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -//----------------------------------------------------------------------------- -// eoMonitor.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 /* This library is free software; you can redistribute it and/or @@ -21,10 +19,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk -CVS Info: $Date: 2010-03-18 12:44:45 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.13 2010-03-18 12:44:45 paradiseo Exp $ $Author: paradiseo $ - */ -//----------------------------------------------------------------------------- #ifndef _eoMonitor_h #define _eoMonitor_h @@ -34,6 +29,20 @@ CVS Info: $Date: 2010-03-18 12:44:45 $ $Header: /home/nojhan/dev/eodev/eodev_cvs #include #include +/** @defgroup Monitors Monitoring + * + * Monitors take a set of value parameters (eoValueParam) objects and + * output them on a given stream, file, pipe, etc. + * + * They can be called from within an eoCheckPoint, to print different values + * of parameters or of eoStat at each generation. + * + * @see eoCheckPoint + * @see eoStat + * @ingroup Utilities + */ + + class eoParam; template class eoCheckPoint; @@ -43,6 +52,8 @@ template class eoCheckPoint; Derived classes will then implement the operator()(void) which will stream or pipe the current values of the parameters to wherever you want it streamed or piped to. + + @ingroup Monitors */ class eoMonitor : public eoF { diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 83e1d6040..70d85bf7d 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -25,8 +25,6 @@ Authors: Johann DrĂ©o */ - - #ifndef _eoOStreamMonitor_h_ #define _eoOStreamMonitor_h_ @@ -39,6 +37,8 @@ Authors: /** Prints statistics to stdout + + @ingroup Monitors */ class eoOStreamMonitor : public eoMonitor { diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index de1e11c23..29608a18e 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -35,6 +35,15 @@ #include #include +/** @defgroup Parameters Parameters management + * + * A parameter is basically an object that stores a value and that can read/print it from/on streams. + * + * It is mainly used for command-line options (see eoParser) and eoStat. + * + * @ingroup Utilities + * @{ + */ /** eoParam: Base class for monitoring and parsing parameters @@ -126,8 +135,9 @@ private: /** eoValueParam: templatized derivation of eoParam. Can be used to contain - any scalar value type. It makes use of std::strstream to get and set values. This - should be changed to std::stringstream when that class is available in g++. + any scalar value type. It makes use of std::strstream to get and set values. + + @todo This should be changed to std::stringstream when that class is available in g++. Note also that there is a template specialization for std::pair and for std::vector. These stream their contents delimited with whitespace. @@ -458,4 +468,6 @@ public: std::ostream & operator<<(std::ostream & _os, const eoParamParamType & _rate); std::istream & operator>>(std::istream & _is, eoParamParamType & _rate); +/** @} */ #endif + diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index eabd32614..1c3415043 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -36,6 +36,8 @@ Contact: http://eodev.sourceforge.net eoParameterLoader is an abstract class that can be used as a base for your own parameter loading and saving. The command line parser eoParser is derived from this class. + +@ingroup Parameters */ class eoParameterLoader { @@ -96,6 +98,8 @@ private : eoParser: command line parser and configuration file reader This class is persistent, so it can be stored and reloaded to restore parameter settings. + + @ingroup Parameters */ class eoParser : public eoParameterLoader, public eoObject, public eoPersistent { diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h index 55801105f..20f67652b 100644 --- a/eo/src/utils/eoParserLogger.h +++ b/eo/src/utils/eoParserLogger.h @@ -29,6 +29,9 @@ Authors: /** * A parser that use the advanced logging system (@see eoLogger) + * + * @ingroup Parameters + * @ingroup Logging */ class eoParserLogger : public eoParser { diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 65bdf44e6..86c5dc047 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -46,6 +46,8 @@ This is the plain version - see eoPopString for the Sorted version Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there. + +@ingroup Stats */ template class eoPopStat : public eoStat @@ -91,6 +93,8 @@ This is the Sorted version - see eoPopString for the plain version Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there. + +@ingroup Stats */ template class eoSortedPopStat : public eoSortedStat diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 99de37298..ad1e3aa18 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -25,14 +25,18 @@ Old contact information: todos@geneura.ugr.es, http://geneura.ugr.es #ifndef EO_RANDOM_NUMBER_GENERATOR #define EO_RANDOM_NUMBER_GENERATOR -// uint32_t is an unsigned integer type capable of holding 32 bits. -// -// In the applicatione here exactly 32 are used. -// 64 bits might be better on an Alpha or other 64 bit systems with GCC at high -// optimization levels so feel free to try your options and see what's best for -// you. +/** @addtogroup Random + * @{ + * */ # if (defined _MSC_VER) +/** uint32_t is an unsigned integer type capable of holding 32 bits. + + In the applicatione here exactly 32 are used. + 64 bits might be better on an Alpha or other 64 bit systems with GCC at high + optimization levels so feel free to try your options and see what's best for + you. +*/ typedef unsigned long uint32_t; #else #if (! defined __sun) @@ -444,6 +448,7 @@ namespace eo } using eo::rng; +/** @} */ diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 83a6489a0..0f0b230db 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -31,7 +31,7 @@ #include /** -\defgroup EvolutionStrategies Continuous vector +\defgroup Real Continuous vector @ingroup Representations @@ -40,7 +40,7 @@ /** \class eoRealBounds eoRealBounds.h es/eoRealBounds.h -\ingroup EvolutionStrategies +\ingroup Real Defines bound classes for real numbers. @@ -73,6 +73,8 @@ eoRealAboveBound the half-bounded interval (-infinity, max] THis file also contains the declaration of *the* global object that is the unbounded bound + +@ingroup Bounds */ class eoRealBounds : public eoPersistent { @@ -131,6 +133,8 @@ public: }; /** A default class for unbounded variables + +@ingroup Bounds */ class eoRealNoBounds : public eoRealBounds { @@ -196,11 +200,15 @@ public: }; -// one object for all - see eoRealBounds.cpp +/** one object for all - see eoRealBounds.cpp +@ingroup Bounds +*/ extern eoRealNoBounds eoDummyRealNoBounds; /** * fully bounded eoRealBound == interval + +@ingroup Bounds */ class eoRealInterval : public eoRealBounds { @@ -319,6 +327,8 @@ private : /** * an eoRealBound bounded from below only + +@ingroup Bounds */ class eoRealBelowBound : public eoRealBounds { @@ -518,6 +528,8 @@ private : /** A class that encapsulate all possible eoIntBounds. * Mandatory in order to read through the parser + +@ingroup Bounds */ class eoGeneralRealBounds : public eoRealBounds { diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index 7cdbcb613..56c194194 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -32,7 +32,7 @@ #include /** -\defgroup EvolutionStrategies +\defgroup Real */ @@ -54,6 +54,8 @@ eoRealBaseVectorBounds, base class that handles all useful functions eoRealVectorBounds which derives from the preceding *and* eoPersistent and also has a mechanism for memory handling of the pointers it has to allocate + +@ingroup Bounds */ class eoRealBaseVectorBounds : public std::vector { @@ -226,6 +228,8 @@ public: //////////////////////////////////////////////////////////////////// /** Now a derived class, for parser reading * It holds some of the bounds (and destroy them when dying) + +@ingroup Bounds */ class eoRealVectorBounds : public eoRealBaseVectorBounds, public eoPersistent { @@ -350,6 +354,8 @@ private:// WARNING: there is no reason for both std::vector below /** the dummy unbounded eoRealVectorBounds: usefull if you don't need bounds! * everything is inlined. * Warning: we do need this class, and not only a std::vector + +@ingroup Bounds */ class eoRealVectorNoBounds: public eoRealVectorBounds { @@ -422,6 +428,8 @@ public: -// one object for all - see eoRealBounds.cpp +/** one object for all - see eoRealBounds.cpp +@ingroup Bounds +*/ extern eoRealVectorNoBounds eoDummyVectorNoBounds; #endif diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index e851bb027..96ec9c0c7 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -33,6 +33,12 @@ #include #include +/** @defgroup Random Random number generation + * + * @ingroup Utilities + * @{ + */ + using eo::rng; /** @@ -146,4 +152,5 @@ template class eoNegExpGenerator : public eoRndGenerator eoRng& negexp; }; +/** @} */ #endif diff --git a/eo/src/utils/eoScalarFitnessStat.h b/eo/src/utils/eoScalarFitnessStat.h index b7c820d33..f472722a9 100644 --- a/eo/src/utils/eoScalarFitnessStat.h +++ b/eo/src/utils/eoScalarFitnessStat.h @@ -32,6 +32,8 @@ /** The fitnesses of a whole population, as a std::vector + + @ingroup Stats */ template class eoScalarFitnessStat : public eoSortedStat > diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 6897bfb54..70dafa2e3 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -41,6 +41,22 @@ Contact: http://eodev.sourceforge.net #include #include +/** @defgroup Stats Statistic computation + * + * Compute various statistics on a population. + * + * Objects of those classes are generally called by an eoCheckPoint + * to compute statistics about the population at a given generation. + * As they inherit from eoValueParam, they can be printed drectly, + * for instance by an eoMonitor. + * + * @see eoCheckPoint + * @see eoMonitor + * + * @ingroup Utilities + * @{ + */ + /** Base class for all statistics that need to be calculated over the (unsorted) population @@ -485,4 +501,6 @@ public: virtual std::string className(void) const { return "eoInterquartileRangeStat"; } }; +/** @} */ #endif + diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index 42fb30006..a32dfefe8 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -50,6 +50,7 @@ class eoPersistent; derived classes are not saved or loaded. To govern the creation of functors, command-line parameters (which can be stored) are needed. + @ingroup Utilities */ class eoState : public eoFunctorStore { diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 76ac1391f..91fcc11cc 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -37,6 +37,8 @@ Authors: /** Prints statistics to stdout + + @ingroup Monitors */ class eoStdoutMonitor : public eoOStreamMonitor { diff --git a/eo/src/utils/eoTimeCounter.h b/eo/src/utils/eoTimeCounter.h index bfd16c56e..27a103da4 100644 --- a/eo/src/utils/eoTimeCounter.h +++ b/eo/src/utils/eoTimeCounter.h @@ -34,6 +34,8 @@ /** An eoStat that simply gives the user time since first generation It has to be tempatized by EOT because it must be an eoStat + + @group Stats */ class eoTimeCounter : public eoUpdater, public eoValueParam { diff --git a/eo/src/utils/eoTimedMonitor.h b/eo/src/utils/eoTimedMonitor.h index 3c264c306..aa660a794 100644 --- a/eo/src/utils/eoTimedMonitor.h +++ b/eo/src/utils/eoTimedMonitor.h @@ -36,6 +36,8 @@ /** Holds a collection of monitors and only fires them when a time limit has been reached + + @ingroup Monitors */ class eoTimedMonitor : public eoMonitor { diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h index 7960339f7..005b7f7ec 100644 --- a/eo/src/utils/eoUniformInit.h +++ b/eo/src/utils/eoUniformInit.h @@ -44,6 +44,11 @@ #include "eoRealBounds.h" #include + +/** @addtogroup Initializators + * @{ + */ + using eo::rng; /** @@ -58,6 +63,7 @@ using eo::rng; either in [0, _max) if only 1 value (_max) is given (or none, as _max defaults to 1.0) or in [_min,_max) if 2 values are given (_min, _max) + */ template class eoUniformInit : public eoInit { @@ -152,4 +158,5 @@ template class eoNegExpInit : public eoInit eoRng& negexp; }; +/** @} */ #endif diff --git a/eo/src/utils/eoUpdatable.h b/eo/src/utils/eoUpdatable.h index 7c53143ca..4c029c540 100644 --- a/eo/src/utils/eoUpdatable.h +++ b/eo/src/utils/eoUpdatable.h @@ -32,6 +32,8 @@ /** eoUpdatable is a generic class for adding updatation to an existing class Just says it has an update() method + + @ingroup Utilities */ class eoUpdatable { @@ -47,6 +49,8 @@ public: /** A base class to actually update an eoUpdatable object + + @ingroup Utilities */ class eoDynUpdater : public eoUpdater {public : @@ -63,6 +67,8 @@ private: /** An eoUpdater to update an eoUpdatable object every given time interval + + @ingroup Utilities */ class eoTimedDynUpdate : public eoDynUpdater { @@ -89,6 +95,8 @@ private : /** An eoUpdater to update an eoUpdatable object every given tic + + @ingroup Utilities */ class eoCountedDynUpdate : public eoDynUpdater { diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index 23374475a..ab8ae4250 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -37,6 +37,8 @@ template class eoCheckPoint; /** eoUpdater is a generic procudere for updating whatever you want. Yet again an empty name + + @ingroup Utilities */ class eoUpdater : public eoF { @@ -50,6 +52,8 @@ public: /** an eoUpdater that simply increments a counter + + @ingroup Utilities */ template class eoIncrementor : public eoUpdater @@ -71,6 +75,8 @@ private: /** an eoUpdater that is an eoValueParam (and thus OWNS its counter) * Mandatory for generation counter in make_checkpoint + + @ingroup Utilities */ template class eoIncrementorParam : public eoUpdater, public eoValueParam @@ -105,6 +111,8 @@ private: /** an eoUpdater that saves a state every given time interval + + @ingroup Utilities */ class eoTimedStateSaver : public eoUpdater { @@ -128,6 +136,8 @@ private : /** an eoUpdater that saves a state every given generations + + @ingroup Utilities */ class eoCountedStateSaver : public eoUpdater { diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index a85283211..d71caf803 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -34,6 +34,10 @@ #include "eoRNG.h" #include +/** @addtogroup Random + * @{ + */ + /** The class uniform_generator can be used in the STL generate function to easily generate random floats and doubles @@ -165,4 +169,5 @@ template class negexp_generator eoRng& negexp; }; +/** @} */ #endif diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index e2ab6cf69..d1765b999 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -43,7 +43,8 @@ #include "eoRNG.h" #include /** -\defgroup selectors +@addtogroup Selectors +@{ */ template @@ -334,5 +335,6 @@ EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); } +/** @} */ #endif From 63c0ae91ed2c87f389c90a8941e04b637c0a3160 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 6 Nov 2010 09:19:17 +0100 Subject: [PATCH 1628/2134] small fixes in the doc --- eo/src/es/make_es.h | 4 ---- eo/src/utils/eoIntBounds.h | 6 ------ eo/src/utils/eoLogger.h | 1 + eo/src/utils/eoRealBounds.h | 2 +- eo/src/utils/eoRealVectorBounds.h | 6 ------ eo/src/utils/eoStat.h | 2 +- 6 files changed, 3 insertions(+), 18 deletions(-) diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index 94fea64a9..27bfe4f60 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -66,10 +66,6 @@ * @{ */ -/** @addtogroup Real - * @{ - */ - //Representation dependent - rewrite everything anew for each representation ////////////////////////// // the genotypes diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h index 6f801d9d2..cd200b3d2 100644 --- a/eo/src/utils/eoIntBounds.h +++ b/eo/src/utils/eoIntBounds.h @@ -30,12 +30,6 @@ #include // std::exceptions! #include -/** -\defgroup Real - -*/ - - /** \class eoIntBounds eoIntBounds.h es/eoIntBounds.h \ingroup Real diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 9789ee6b5..5d66f376a 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -26,6 +26,7 @@ Caner Candan */ /** @defgroup Logging Logging + * @ingroup Utilities Global logger for EO. diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 0f0b230db..480df4bbc 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -31,7 +31,7 @@ #include /** -\defgroup Real Continuous vector +\defgroup Real Vector of reals @ingroup Representations diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index 56c194194..c5e26b07c 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -31,12 +31,6 @@ #include #include -/** -\defgroup Real - -*/ - - /** Vector type for bounds (see eoRealBounds.h for scalar types) ------------ diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 70dafa2e3..d72a86e64 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -41,7 +41,7 @@ Contact: http://eodev.sourceforge.net #include #include -/** @defgroup Stats Statistic computation +/** @defgroup Stats Statistics computation * * Compute various statistics on a population. * From 91aec790af18a0b9e6bbabdb9214f658e6de9b9e Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sat, 6 Nov 2010 17:24:00 +0100 Subject: [PATCH 1629/2134] removing obsolete win directory, we now se CMake that can generate VC++ project files by itself --- eo/win/.cvsignore | 7 - eo/win/ChangeLog | 20 - eo/win/EO/eo.vcproj | 426 -------------------- eo/win/ES/es.vcproj | 813 -------------------------------------- eo/win/GA/ga.vcproj | 511 ------------------------ eo/win/README | 15 - eo/win/UTILS/utils.vcproj | 619 ----------------------------- eo/win/eo.sln | 65 --- eo/win/lib/Readme | 4 - 9 files changed, 2480 deletions(-) delete mode 100644 eo/win/.cvsignore delete mode 100644 eo/win/ChangeLog delete mode 100755 eo/win/EO/eo.vcproj delete mode 100755 eo/win/ES/es.vcproj delete mode 100755 eo/win/GA/ga.vcproj delete mode 100644 eo/win/README delete mode 100755 eo/win/UTILS/utils.vcproj delete mode 100755 eo/win/eo.sln delete mode 100644 eo/win/lib/Readme diff --git a/eo/win/.cvsignore b/eo/win/.cvsignore deleted file mode 100644 index 880de1a77..000000000 --- a/eo/win/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in -eo.dsw diff --git a/eo/win/ChangeLog b/eo/win/ChangeLog deleted file mode 100644 index 95a4da8ae..000000000 --- a/eo/win/ChangeLog +++ /dev/null @@ -1,20 +0,0 @@ -2006-12-18 Jochen Küpper - - * Makefile.am (EXTRA_DIST): Add README's - -2006-12-17 Jochen Küpper - - * README: Added this file. - - * general: Removed all old unnecessary files. - -2006-12-05 Jochen Küpper - - * win/Makefile.am (EXTRA_DIST): Add new MSVC project files to distribution. - - - * Local Variables: - * coding: iso-8859-1 - * mode: flyspell - * fill-column: 80 - * End: diff --git a/eo/win/EO/eo.vcproj b/eo/win/EO/eo.vcproj deleted file mode 100755 index f2bd1114d..000000000 --- a/eo/win/EO/eo.vcproj +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eo/win/ES/es.vcproj b/eo/win/ES/es.vcproj deleted file mode 100755 index aa636e7b5..000000000 --- a/eo/win/ES/es.vcproj +++ /dev/null @@ -1,813 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eo/win/GA/ga.vcproj b/eo/win/GA/ga.vcproj deleted file mode 100755 index 178294e2c..000000000 --- a/eo/win/GA/ga.vcproj +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eo/win/README b/eo/win/README deleted file mode 100644 index 6938363bd..000000000 --- a/eo/win/README +++ /dev/null @@ -1,15 +0,0 @@ -This directory contains the project files for Microsoft Visual C++ - -For Visual Studio 2003 (and 2005) you can go to the eo\win (this) -directory and open the eo.sln file. It allows for the compilation of 4 -lib files (which will be placed in eo\win\lib\release and eo\win\lib\debug). -At the moment there are no project/solution files to compile the test -programs (eo\test) or applications (eo\app). - -The library files correspond to the .a files under Unix/Linux. -eo.lib -> libeo.a -eoes.lib -> libes.a -eoga.lib -> libga.a -eoutils.lib -> libeoutils.a - -The debug versions of the files are named eod.lib, eoesd.lib, eogad.lib and eoutilsd.lib. diff --git a/eo/win/UTILS/utils.vcproj b/eo/win/UTILS/utils.vcproj deleted file mode 100755 index 13a94b08f..000000000 --- a/eo/win/UTILS/utils.vcproj +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eo/win/eo.sln b/eo/win/eo.sln deleted file mode 100755 index e9d73dcd1..000000000 --- a/eo/win/eo.sln +++ /dev/null @@ -1,65 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eo", "EO\eo.vcproj", "{50FA97D2-8D62-4E60-8876-685F11CBE089}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "es", "ES\es.vcproj", "{50C03071-FB68-4EF6-887C-FC326BAFE1C2}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ga", "GA\ga.vcproj", "{E6A79395-4154-4F3A-B86B-4193C945A857}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utils", "UTILS\utils.vcproj", "{F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - DebugDLL = DebugDLL - Release = Release - ReleaseDLL = ReleaseDLL - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {50FA97D2-8D62-4E60-8876-685F11CBE089}.Debug.ActiveCfg = Debug|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.Debug.Build.0 = Debug|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.DebugDLL.ActiveCfg = DebugDLL|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.DebugDLL.Build.0 = DebugDLL|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.Release.ActiveCfg = Release|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.Release.Build.0 = Release|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.ReleaseDLL.ActiveCfg = ReleaseDLL|Win32 - {50FA97D2-8D62-4E60-8876-685F11CBE089}.ReleaseDLL.Build.0 = ReleaseDLL|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.Debug.ActiveCfg = Debug|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.Debug.Build.0 = Debug|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.DebugDLL.ActiveCfg = DebugDLL|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.DebugDLL.Build.0 = DebugDLL|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.Release.ActiveCfg = Release|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.Release.Build.0 = Release|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.ReleaseDLL.ActiveCfg = ReleaseDLL|Win32 - {50C03071-FB68-4EF6-887C-FC326BAFE1C2}.ReleaseDLL.Build.0 = ReleaseDLL|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.Debug.ActiveCfg = Debug|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.Debug.Build.0 = Debug|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.DebugDLL.ActiveCfg = DebugDLL|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.DebugDLL.Build.0 = DebugDLL|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.Release.ActiveCfg = Release|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.Release.Build.0 = Release|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.ReleaseDLL.ActiveCfg = ReleaseDLL|Win32 - {E6A79395-4154-4F3A-B86B-4193C945A857}.ReleaseDLL.Build.0 = ReleaseDLL|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.Debug.ActiveCfg = Debug|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.Debug.Build.0 = Debug|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.DebugDLL.ActiveCfg = DebugDLL|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.DebugDLL.Build.0 = DebugDLL|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.Release.ActiveCfg = Release|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.Release.Build.0 = Release|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.ReleaseDLL.ActiveCfg = ReleaseDLL|Win32 - {F3B95BA2-DFA4-41A0-8E51-E04D36725AD5}.ReleaseDLL.Build.0 = ReleaseDLL|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/eo/win/lib/Readme b/eo/win/lib/Readme deleted file mode 100644 index fa83fc6cc..000000000 --- a/eo/win/lib/Readme +++ /dev/null @@ -1,4 +0,0 @@ -Here will be copied the eo libraries. - -xx.lib are Release versions and in the Release directory -xxd.lib are Debug versions and in the Debug directory \ No newline at end of file From f3eeb9aaa6d153f822925ad200eb4022cbca5de1 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sat, 6 Nov 2010 17:31:39 +0100 Subject: [PATCH 1630/2134] do not documentify: test, tutorial, contrib and app, that are not part of the framework by itself --- eo/doc/eo.cfg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/doc/eo.cfg.cmake b/eo/doc/eo.cfg.cmake index 35ce7680c..362102bbc 100644 --- a/eo/doc/eo.cfg.cmake +++ b/eo/doc/eo.cfg.cmake @@ -600,7 +600,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = @CMAKE_SOURCE_DIR@/src/obsolete +EXCLUDE = @CMAKE_SOURCE_DIR@/src/obsolete @CMAKE_SOURCE_DIR@/test @CMAKE_SOURCE_DIR@/tutorial @CMAKE_SOURCE_DIR@/contrib @CMAKE_SOURCE_DIR@/app # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded From c1eef3420c9f44f778f32e93cf70e9aef2538156 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 7 Nov 2010 11:19:33 +0100 Subject: [PATCH 1631/2134] in the doc's main page: brief section first with a link to the modules list --- eo/doc/index.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/eo/doc/index.h b/eo/doc/index.h index 079397a44..f71a7c1f9 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -1,5 +1,14 @@ /** @mainpage Welcome to Evolving Objects +@section shortcuts In one word + +The best place to learn about the features and approaches of %EO with the help of examples is to look at +the tutorial. + +Once you have understand the @ref design of %EO, you could search for advanced features by browsing the modules page. + + @section intro Introduction %EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast. @@ -16,11 +25,6 @@ If you have a classical problem for which available code exists (for example if If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in %EO. -@section tutorial Tutorial - -The best place to learn about the features and approaches of %EO is to look at -the tutorial. - @section design Overall Design From c4c27907ed689764bf21846617db9e385bc81a1c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 7 Nov 2010 23:09:35 +0100 Subject: [PATCH 1632/2134] remove unused test binaries, some code formating --- eo/test/t-eo.cpp | 16 ++++------------ eo/test/t-eoCheckpointing.cpp | 9 --------- eo/test/t-eoEasyEA.cpp | 9 --------- eo/test/t-eoEasyPSO.cpp | 1 - eo/test/t-eoFunctor.cpp | 2 +- eo/test/t-eoLogger.cpp | 12 ++++++------ 6 files changed, 11 insertions(+), 38 deletions(-) diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp index 2e4cf4e72..22fcb5beb 100644 --- a/eo/test/t-eo.cpp +++ b/eo/test/t-eo.cpp @@ -1,23 +1,15 @@ -//----------------------------------------------------------------------------- -// t-eo.cpp -//----------------------------------------------------------------------------- - -#include // EO - -//----------------------------------------------------------------------------- +#include typedef EO Chrom; -//----------------------------------------------------------------------------- int main() { Chrom chrom1, chrom2; + // EO objects can be printed with stream operators std::cout << "chrom1 = " << chrom1 << std::endl - << "chrom2 = " << chrom2 << std::endl; - - + << "chrom2 = " << chrom2 << std::endl; + return 0; } -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 11d5d5932..5562ccb0d 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -1,4 +1,3 @@ -//----------------------------------------------------------------------------- // to avoid long name warnings #ifdef _MSC_VER @@ -7,19 +6,12 @@ #include // runtime_error -//----------------------------------------------------------------------------- -// tt.cpp: -// -//----------------------------------------------------------------------------- - - // general #include // Random number generators #include #include #include #include -//----------------------------------------------------------------------------- // include package checkpointing #include @@ -36,7 +28,6 @@ public : eoDummyPop(int s = 2) { resize(s); } }; -//----------------------------------------------------------------------------- int the_main(int argc, char **argv) { // ok, we have a command line parser and a state diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index 1b201cfad..afda23620 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -1,7 +1,3 @@ -//----------------------------------------------------------------------------- -// t-eoEasyEA.cpp -//----------------------------------------------------------------------------- - #ifndef __GNUG__ // to avoid long name warnings #pragma warning(disable:4786) @@ -11,12 +7,8 @@ #include "binary_value.h" -//----------------------------------------------------------------------------- - typedef eoBin Chrom; -//----------------------------------------------------------------------------- - main() { const unsigned POP_SIZE = 8, CHROM_SIZE = 16; @@ -81,4 +73,3 @@ main() return 0; } -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoEasyPSO.cpp b/eo/test/t-eoEasyPSO.cpp index 168900939..96e5b004b 100644 --- a/eo/test/t-eoEasyPSO.cpp +++ b/eo/test/t-eoEasyPSO.cpp @@ -101,4 +101,3 @@ int main() return 0; } -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoFunctor.cpp b/eo/test/t-eoFunctor.cpp index 27ccf995d..b0bf5249f 100644 --- a/eo/test/t-eoFunctor.cpp +++ b/eo/test/t-eoFunctor.cpp @@ -46,4 +46,4 @@ int main(void) eo.push_back(2); return 1; -} \ No newline at end of file +} diff --git a/eo/test/t-eoLogger.cpp b/eo/test/t-eoLogger.cpp index e306fb9d3..c087e2a22 100644 --- a/eo/test/t-eoLogger.cpp +++ b/eo/test/t-eoLogger.cpp @@ -27,26 +27,26 @@ int main(int ac, char** av) eo::log << eo::warnings; - eo::log << "We are written on the default defined standard output" << std::endl; + eo::log << "We are writing on the default output stream" << std::endl; eo::log << eo::file("test.txt") << "In FILE" << std::endl; - eo::log << std::cout << "In COUT" << std::endl; + eo::log << std::cout << "on COUT" << std::endl; eo::log << eo::setlevel("errors"); eo::log << eo::setlevel(eo::errors); - eo::log << eo::quiet << "1) Must be in quiet mode" << std::endl; + eo::log << eo::quiet << "1) in quiet mode" << std::endl; - eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) Must be in warnings mode" << std::endl; + eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) in warnings mode" << std::endl; eo::log << eo::setlevel(eo::logging); eo::log << eo::errors; - eo::log << "3) Must be in errors mode"; + eo::log << "3) in errors mode"; eo::log << std::endl; eo::log << eo::debug << 4 << ')' - << " Must be in debug mode\n"; + << "4) in debug mode\n"; return 0; } From bd236ee67fb90554d010ac241fe9eed11f162c49 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 7 Nov 2010 23:12:28 +0100 Subject: [PATCH 1633/2134] add tests interfaces as examples in the doc ; remove unused test binaries ; some code formating --- eo/doc/eo.cfg.cmake | 2 +- eo/doc/index.h | 1 - eo/src/EO.h | 2 + eo/src/do/make_algo_scalar.h | 2 + eo/src/eoEasyEA.h | 8 +- eo/src/eoEasyPSO.h | 5 +- eo/src/eoExtendedVelocity.h | 12 +- eo/src/eoFunctor.h | 2 + eo/src/eoGenOp.h | 2 + eo/src/eoInit.h | 2 + eo/src/eoInt.h | 2 + eo/src/eoOp.h | 6 + eo/src/eoOrderXover.h | 2 + eo/src/eoProportionalSelect.h | 2 + eo/src/eoRingTopology.h | 2 + eo/src/eoScalarFitness.h | 3 + eo/src/eoScalarFitnessAssembled.h | 6 + eo/src/eoSecondsElapsedContinue.h | 2 + eo/src/eoSelectOne.h | 2 + eo/src/eoSharingSelect.h | 2 + eo/src/eoShiftMutation.h | 2 + eo/src/eoStochasticUniversalSelect.h | 2 + eo/src/eoSwapMutation.h | 2 + eo/src/eoSyncEasyPSO.h | 2 + eo/src/eoTwoOptMutation.h | 2 + eo/src/eoVariableInertiaWeightedVelocity.h | 2 +- eo/src/eoVariableLengthMutation.h | 8 +- eo/src/eoVector.h | 6 +- eo/src/eoVectorParticle.h | 6 +- eo/src/es/eoReal.h | 2 + eo/src/ga/eoBit.h | 5 +- eo/src/gp/eoParseTree.h | 5 + eo/src/gp/parse_tree.h | 17 +- eo/src/other/eoExternalEO.h | 2 + eo/src/utils/eoCheckPoint.h | 5 +- eo/src/utils/eoLogger.h | 2 + eo/src/utils/eoRNG.h | 2 + eo/src/utils/eoRealBounds.h | 6 + eo/src/utils/eoRndGenerators.h | 4 + eo/src/utils/eoStat.h | 2 + eo/src/utils/eoState.h | 2 + eo/test/t-eoAtomOps.cpp | 66 ----- eo/test/t-eoBaseFunctions.cpp | 26 -- eo/test/t-eoESOps.cpp | 116 --------- eo/test/t-eoGOpSel.cpp | 131 ---------- eo/test/t-eoNonUniform.cpp | 31 --- eo/test/t-eoPareto.cpp | 274 --------------------- eo/test/t-eoParetoFitness.cpp | 196 --------------- eo/test/t-eobreeder.cpp | 87 ------- eo/test/t-eogeneration.cpp | 145 ----------- eo/test/t-eoinclusion.cpp | 97 -------- eo/test/t-eoinsertion.cpp | 108 -------- eo/test/t-eolottery.cpp | 54 ---- eo/test/t-eoproblem.cpp | 55 ----- 54 files changed, 129 insertions(+), 1410 deletions(-) delete mode 100644 eo/test/t-eoAtomOps.cpp delete mode 100644 eo/test/t-eoBaseFunctions.cpp delete mode 100644 eo/test/t-eoESOps.cpp delete mode 100644 eo/test/t-eoGOpSel.cpp delete mode 100644 eo/test/t-eoNonUniform.cpp delete mode 100644 eo/test/t-eoPareto.cpp delete mode 100644 eo/test/t-eoParetoFitness.cpp delete mode 100644 eo/test/t-eobreeder.cpp delete mode 100644 eo/test/t-eogeneration.cpp delete mode 100644 eo/test/t-eoinclusion.cpp delete mode 100644 eo/test/t-eoinsertion.cpp delete mode 100644 eo/test/t-eolottery.cpp delete mode 100644 eo/test/t-eoproblem.cpp diff --git a/eo/doc/eo.cfg.cmake b/eo/doc/eo.cfg.cmake index 362102bbc..f030f3b37 100644 --- a/eo/doc/eo.cfg.cmake +++ b/eo/doc/eo.cfg.cmake @@ -628,7 +628,7 @@ EXCLUDE_SYMBOLS = # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/test # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff --git a/eo/doc/index.h b/eo/doc/index.h index f71a7c1f9..7d7921fe0 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -60,4 +60,3 @@ article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th - http://eodev.sourceforge.net/eo/doc/LeCreusot.pdf - http://eodev.sourceforge.net/eo/doc/EO_EA2001.pdf */ - diff --git a/eo/src/EO.h b/eo/src/EO.h index 7d8f5f551..2c43b2c8f 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -55,6 +55,8 @@ @ref Operators that effectively modify EO objects must invalidate them. The fitness object must have, besides an void ctor, a copy ctor. + + @example t-eo.cpp */ template class EO: public eoObject, public eoPersistent { diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 1a207626f..5a63eb9d2 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -307,5 +307,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // that's it! return *algo; } +/** @example t-eoGA.cpp + */ #endif diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index e8497707e..4fc6d6e79 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -273,9 +273,11 @@ template class eoEasyEA: public eoAlgo // Friend classes friend class eoIslandsEasyEA ; friend class eoDistEvalEasyEA ; - }; - -//----------------------------------------------------------------------------- +}; +/** +@example t-eoEasyEA.cpp +Example of a test program building an EA algorithm. +*/ #endif diff --git a/eo/src/eoEasyPSO.h b/eo/src/eoEasyPSO.h index 7cdbf339b..bcfc891a5 100644 --- a/eo/src/eoEasyPSO.h +++ b/eo/src/eoEasyPSO.h @@ -188,6 +188,9 @@ protected: }dummyInit; }; - +/** + * @example t-eoEasyPSO.cpp + * Example of a test program building a PSO algorithm. + */ #endif /*_EOEASYPSO_H*/ diff --git a/eo/src/eoExtendedVelocity.h b/eo/src/eoExtendedVelocity.h index 687a11a8a..5aec4c216 100644 --- a/eo/src/eoExtendedVelocity.h +++ b/eo/src/eoExtendedVelocity.h @@ -35,7 +35,9 @@ //----------------------------------------------------------------------------- -/** Extended velocity performer for particle swarm optimization. Derivated from abstract eoVelocity, +/** Extended velocity performer for particle swarm optimization. + * + * Derivated from abstract eoVelocity, * At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) * It includes both a "topology" best and a global best in the social knowledge. Each topology * provides a method to retrieve the global best <=> the best of all the neighborhood the topology contains. @@ -60,7 +62,7 @@ public: * @param _c3 - Learning factor used for the global best * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoExtendedVelocity (eoTopology < POT > & _topology, @@ -204,7 +206,9 @@ protected: // If the bound modifier doesn't need to be used, use the dummy instance eoDummyRealBoundModifier dummyModifier; }; - - +/** @todo this example does not appear in the doc for an unknown reason + * @example t-eoExtendedVelocity.cpp + * Example of a test program using this class: +*/ #endif /*eoExtendedVelocity_H */ diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 7b14d55fd..17cbaca56 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -60,6 +60,8 @@ public : /// tag to identify a binary function in compile time function selection @see functor_category struct binary_function_tag {}; }; +/** @example t-eoFunctop.cpp + */ /** Basic Function. Derive from this class when defining diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index e39649058..86d4ebbda 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -81,6 +81,8 @@ class eoGenOp : public eoOp, public eoUF &, void> */ virtual void apply(eoPopulator& _pop) = 0; }; +/** @example t-eoGenOp.cpp + */ /** Wrapper for eoMonOp */ diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index f787b9335..bfa616c22 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -183,6 +183,8 @@ class eoInitPermutation: public eoInit unsigned startFrom; UF_random_generator gen; }; +/** @example t-eoInitPermutation.cpp + */ /** diff --git a/eo/src/eoInt.h b/eo/src/eoInt.h index e4f350795..d3eb496cc 100644 --- a/eo/src/eoInt.h +++ b/eo/src/eoInt.h @@ -54,6 +54,8 @@ template class eoInt: public eoVector } }; +/** @example t-eoInt.cpp + */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 849a6da04..bd9fe4e16 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -63,10 +63,16 @@ Variators are operators that modify individuals. Selectors are operators that select a subset of a population. +Example: +@include t-eoSelect.cpp + @defgroup Replacors Replacement operators Replacors are operators that replace a subset of a population by another set of individuals. + +Here is an example with several replacement operators: +@include t-eoReplacement.cpp */ /** Abstract data types for EO operators. diff --git a/eo/src/eoOrderXover.h b/eo/src/eoOrderXover.h index 211af69b5..234d4311c 100644 --- a/eo/src/eoOrderXover.h +++ b/eo/src/eoOrderXover.h @@ -84,5 +84,7 @@ template class eoOrderXover: public eoQuadOp } }; +/** @example t-eoOrderXover.cpp + */ #endif diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index c5a895ff4..bd7880488 100644 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -81,5 +81,7 @@ private : typedef std::vector FitVec; FitVec cumulative; }; +/** @example t-eoRoulette.cpp + */ #endif diff --git a/eo/src/eoRingTopology.h b/eo/src/eoRingTopology.h index 352a6e2aa..8d74a83a1 100644 --- a/eo/src/eoRingTopology.h +++ b/eo/src/eoRingTopology.h @@ -188,5 +188,7 @@ protected: unsigned neighborhoodSize; bool isSetup; }; +/** @example t-eoRingTopology.cpp + */ #endif /*EORINGTOPOLOGY_H_*/ diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index 906c8c8e5..aa8d57a15 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -79,6 +79,9 @@ class eoScalarFitness private : ScalarType value; }; +/** @example t-eofitness.cpp + * + */ /** Typedefs for fitness comparison, Maximizing Fitness compares with less, diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index c0d69f5ab..f84a805d9 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -77,6 +77,8 @@ public: private: static std::vector TermDescriptions; }; +/** @example t-eoFitnessAssembled.cpp + */ //! Implements fitness as std::vector, storing all values that might occur during fitness assembly /*! Properties: @@ -237,6 +239,10 @@ public: bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } }; +/** + * @example t-eoFitnessAssembledEA.cpp +*/ + /** Typedefs for fitness comparison, Maximizing Fitness compares with less, diff --git a/eo/src/eoSecondsElapsedContinue.h b/eo/src/eoSecondsElapsedContinue.h index 819f7ab5c..4a9d677f2 100644 --- a/eo/src/eoSecondsElapsedContinue.h +++ b/eo/src/eoSecondsElapsedContinue.h @@ -64,6 +64,8 @@ public: } }; +/** @example t-eoSecondsElapsedContinue.cpp + */ #endif diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index 690fbca64..f4cde80c2 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -53,6 +53,8 @@ class eoSelectOne : public eoUF&, const EOT&> (void)_pop; } }; +/** @example t-eoSelectOne.cpp + */ #endif diff --git a/eo/src/eoSharingSelect.h b/eo/src/eoSharingSelect.h index 9fdbfd144..75daa0ae8 100644 --- a/eo/src/eoSharingSelect.h +++ b/eo/src/eoSharingSelect.h @@ -53,5 +53,7 @@ public: private : eoSharing sharing; // derived from eoPerf2Worth }; +/** @example t-eoSharing.cpp + */ #endif diff --git a/eo/src/eoShiftMutation.h b/eo/src/eoShiftMutation.h index 9f472360a..cacb9b3d0 100644 --- a/eo/src/eoShiftMutation.h +++ b/eo/src/eoShiftMutation.h @@ -83,6 +83,8 @@ template class eoShiftMutation: public eoMonOp } }; +/** @example t-eoShiftMutation.cpp + */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoStochasticUniversalSelect.h b/eo/src/eoStochasticUniversalSelect.h index cd0c19738..003c70124 100644 --- a/eo/src/eoStochasticUniversalSelect.h +++ b/eo/src/eoStochasticUniversalSelect.h @@ -104,5 +104,7 @@ private : typedef std::vector IndexVec; IndexVec indices; }; +/** @example t-eoRoulette.cpp + */ #endif diff --git a/eo/src/eoSwapMutation.h b/eo/src/eoSwapMutation.h index aab729b2e..63169a9bd 100644 --- a/eo/src/eoSwapMutation.h +++ b/eo/src/eoSwapMutation.h @@ -75,6 +75,8 @@ template class eoSwapMutation: public eoMonOp private: unsigned int howManySwaps; }; +/** @example t-eoSwapMutation.cpp + */ //----------------------------------------------------------------------------- #endif diff --git a/eo/src/eoSyncEasyPSO.h b/eo/src/eoSyncEasyPSO.h index 849e92239..aa1c9130c 100644 --- a/eo/src/eoSyncEasyPSO.h +++ b/eo/src/eoSyncEasyPSO.h @@ -253,6 +253,8 @@ private: }dummyInit; }; +/** @example t-eoSyncEasyPSO.cpp + */ #endif /*_EOSYNCEASYPSO_H*/ diff --git a/eo/src/eoTwoOptMutation.h b/eo/src/eoTwoOptMutation.h index 2cba79e32..49b199a0e 100644 --- a/eo/src/eoTwoOptMutation.h +++ b/eo/src/eoTwoOptMutation.h @@ -69,6 +69,8 @@ public: } }; +/** @example t-eoTwoOptMutation.cpp + */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoVariableInertiaWeightedVelocity.h b/eo/src/eoVariableInertiaWeightedVelocity.h index 9d039ee6b..d281b39d8 100644 --- a/eo/src/eoVariableInertiaWeightedVelocity.h +++ b/eo/src/eoVariableInertiaWeightedVelocity.h @@ -60,7 +60,7 @@ public: * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoVariableInertiaWeightedVelocity (eoTopology < POT > & _topology, diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index 6845ce0c0..aad778bae 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -56,7 +56,7 @@ public : /** default ctor - * @param nMax max number of atoms + * @param _nMax max number of atoms * @param _atomInit an Atom initializer */ eoVlAddMutation(unsigned _nMax, eoInit & _atomInit) : @@ -118,15 +118,15 @@ public : /** ctor with an external gene chooser - * @param nMin min number of atoms to leave in the individual - * @param _geneChooser an eoGeneCHooser to choose which one to delete + * @param _nMin min number of atoms to leave in the individual + * @param _chooser an eoGeneCHooser to choose which one to delete */ eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : nMin(_nMin), uChooser(), chooser(_chooser) {} /** ctor with uniform gene chooser - the default - * @param nMin min number of atoms to leave in the individual + * @param _nMin min number of atoms to leave in the individual */ eoVlDelMutation(unsigned _nMin) : nMin(_nMin), uChooser(), chooser(uChooser) {} diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index c11b8be66..0e1b6d915 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -66,8 +66,8 @@ public: /** default constructor - @param size Length of vector (default is 0) - @param value Initial value of all elements (default is default value of type GeneType) + @param _size Length of vector (default is 0) + @param _value Initial value of all elements (default is default value of type GeneType) */ eoVector(unsigned _size = 0, GeneType _value = GeneType()) : EO(), std::vector(_size, _value) @@ -129,6 +129,8 @@ public: } } }; +/** @example t-eoVector.cpp + */ /** Less than diff --git a/eo/src/eoVectorParticle.h b/eo/src/eoVectorParticle.h index 31d9c9816..4736639a0 100644 --- a/eo/src/eoVectorParticle.h +++ b/eo/src/eoVectorParticle.h @@ -66,9 +66,9 @@ public: /** Default constructor. * @param _size Length of the tree vectors (we expect the same size), default is 0 - * @param position - * @param velocity - * @param bestPositions + * @param _position + * @param _velocity + * @param _bestPositions */ eoVectorParticle (unsigned _size = 0,PositionType _position = PositionType (), VelocityType _velocity = VelocityType (), PositionType _bestPositions = PositionType ()):PO < FitT > (),std::vector < PositionType > (_size, _position), bestPositions (_size, _bestPositions), velocities (_size, _velocity) diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index 5674e8aef..8c079c5fc 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -54,6 +54,8 @@ template class eoReal: public eoVector } }; +/** @example t-eoReal.cpp + */ //----------------------------------------------------------------------------- diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 758d1ee73..cf12e9e59 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -44,7 +44,10 @@ /** @defgroup bitstring Bit strings -Various functions for a bitstring representation +Various functions for a bitstring representation. + +Example of a complete test program that use various bitstrings operators: +@include t-eobin.cpp @ingroup Representations */ diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index cb5f32afa..0c74d4663 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -41,6 +41,9 @@ using namespace gp_parse_tree; Various functions for tree-based Genetic Programming +Example: +@include t-eoSymreg.cpp + @ingroup Representations */ @@ -166,6 +169,8 @@ public: */ } }; +/** @example t-eoSymreg.cpp + */ // friend function to print eoParseTree template diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index 0e85b576f..8437c0c76 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -22,8 +22,9 @@ class Node (your node in the tree) must have the following implemented: ****** Arity ****** - + \code int arity(void) const + \endcode Note: the default constructor of a Node should provide a Node with arity 0! @@ -36,7 +37,9 @@ is the simplest evaluation, it will call + \code RetVal Node::operator()(RetVal, subtree::const_iterator) + \endcode (Unfortunately the first RetVal argument is mandatory (although you might not need it. This is because MSVC does not support member template @@ -50,7 +53,9 @@ will call: + \code RetVal Node::operator()(RetVal, subtree<... , It values) + \endcode where It is whatever type you desire (most of the time this will be a std::vector containing the values of your @@ -60,7 +65,9 @@ will call: + \code RetVal Node::operator()(RetVal, subtree<... , It values, It2 moreValues) + \endcode although I do not see the immediate use of this, however... @@ -68,7 +75,9 @@ that calls: + \code RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) + \endcode can be useful for implementing adfs. @@ -77,8 +86,10 @@ arguments open so that different ways of evaluation remain possible. Implement the simplest eval as: + \code template RetVal operator()(RetVal dummy, It begin) const + \endcode ****** Internal Structure ****** @@ -144,7 +155,9 @@ or from an std::istream: - copy(std::istream_iterator(my_stream), std::istream_iterator(), back_inserter(tree)); +\code + copy(std::istream_iterator(my_stream), std::istream_iterator(), back_inserter(tree)); +\endcode Note that the back_inserter must be used as there is no resize member in the parse_tree. back_inserter will use diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 219cf716d..4440b428f 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -74,6 +74,8 @@ public : } }; +/** @example t-eoExternalEO.cpp + */ /** To remove ambiguities between EO and External, streaming operators are defined yet again * @ingroup Utilities diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index 775c00fbe..d6df8b781 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -39,10 +39,13 @@ * * Use them with eoStats, eoUpdater and eoMonitor to get statistics at each generation. * - * @see eoStats + * @see eoStat * @see eoMonitor * @see eoUpdater * + * Example of a test program using checkpointing: + * @include t-eoCheckpointing.cpp + * * @ingroup Utilities * * @{ diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 5d66f376a..c5ca7e3d1 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -247,6 +247,8 @@ private: */ std::map< std::ostream*, int > _standard_io_streams; }; +/** @example t-eoLogger.cpp + */ namespace eo { diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index ad1e3aa18..3cad9fcce 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -438,6 +438,8 @@ private: */ eoRng& operator=(const eoRng&); }; +/** @example t-eoRNG.cpp + */ diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index 480df4bbc..c8761978a 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -33,6 +33,12 @@ /** \defgroup Real Vector of reals +Set of classes related to continuous black-box optimization problems. + +Here are several examples of test programs using eoReal, eoEsSimple, eoEsStdev or eoEsFull to build an Evoution Strategies algorithm: +@include t-eoESAll.cpp +@include t-eoESFull.cpp + @ingroup Representations */ diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index 96ec9c0c7..16b03ec40 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -88,12 +88,16 @@ template class eoUniformGenerator : public eoRndGenerator for ints and unsigneds */ T operator()(void) { return minim+static_cast(uniform.uniform(range)); } + /** @example t-eoUniform.cpp + */ private : T minim; T range; eoRng& uniform; }; +/** @example t-eoRandom.cpp + */ /// Specialization for bool, does an unbiased coin flip diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index d72a86e64..d00657d84 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -407,6 +407,8 @@ private : } }; +/** @example t-eoSSGA.cpp + */ template class eoDistanceStat : public eoStat diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index a32dfefe8..53c3a83d5 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -132,5 +132,7 @@ private : eoState& operator=(const eoState&); }; +/** @example t-eoStateAndParser.cpp + */ #endif diff --git a/eo/test/t-eoAtomOps.cpp b/eo/test/t-eoAtomOps.cpp deleted file mode 100644 index d1c70de74..000000000 --- a/eo/test/t-eoAtomOps.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - t-eoAtomOps.cpp - Program that tests the atomic operator classes - - (c) GeNeura Team, 1999 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - -*/ - -//-----------------------------------------------------------------------------// - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include - -using namespace std; - -// Operators we are going to test -#include -#include -#include -#include - -// Several EOs -#include - -// RNGs -#include - -main(int argc, char *argv[]) { - eoString aString("123456"); - eoAtomCreep creeper; - eoAtomMutation< eoString > mutator( creeper, 0.5 ); - - eoNegExp charNE( 2 ); - eoAtomRandom randomer( charNE ); - eoAtomMutation< eoString > mutator2 ( randomer, 0.5 ); - - std::cout << "Before aString " << aString << std::endl; - mutator( aString); - std::cout << " after mutator " << aString << std::endl; - mutator2( aString); - std::cout << " after mutator2 " << aString << std::endl;; - return 0; // to avoid VC++ complaints -} - diff --git a/eo/test/t-eoBaseFunctions.cpp b/eo/test/t-eoBaseFunctions.cpp deleted file mode 100644 index 6f6745ac7..000000000 --- a/eo/test/t-eoBaseFunctions.cpp +++ /dev/null @@ -1,26 +0,0 @@ - -#include - -#include - -using namespace std; - -struct eo1 : public eoF -{ - void operator()(void) {} -}; - -struct eo2 : public eoF -{ - int operator()(void) { return 1; } -}; - -int main() -{ - eo1 _1; _1(); - eo2 _2; - int i = _2(); - - std::cout << i << '\n'; - return i; -} diff --git a/eo/test/t-eoESOps.cpp b/eo/test/t-eoESOps.cpp deleted file mode 100644 index d583ada6d..000000000 --- a/eo/test/t-eoESOps.cpp +++ /dev/null @@ -1,116 +0,0 @@ -// Program to test several EO-ES features - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include -#include - -using namespace std; - -// general -#include // though contained in all others! -// evolution specific -#include -//#include -//#include -// representation specific - -#include // though contained in following -//#include -#include -//#include -// this fitness -#include "real_value.h" // the sphere fitness - -// Now the main -/////////////// -typedef eoESFullChrom Ind; - -main(int argc, char *argv[]) { - unsigned mu, lambda; - bool comma; - - // Create the command-line parser - Parser parser( argc, argv, "Basic EA for vector with adaptive mutations"); - - //reproducible random seed - thanks, Maarten - InitRandom(parser); - - // a first Ind, reading its parameters from the parser - // will be used later to inialize the whole population - Ind FirstEO(parser); - - // Evaluation - // here we should call some parser-based constructor, - // as many evaluation function need parameters - // and also have some preliminary stuffs to do - eoEvalFuncPtr eval( real_value ); - - // recombination and mutation operators, reading their parameters from the parser - eoESMutate MyMut(parser, - FirstEO.StdDevLength(), FirstEO.size(), - FirstEO.CorCffLength() ); - - std::cout << "First EO " << FirstEO << std::endl; - MyMut(FirstEO); - std::cout << "First EO mutated" << FirstEO << std::endl; - - /* - // Evolution and population parameters - eoScheme the_scheme(parser); - - // recombination and mutation operators, reading their parameters from the parser - eoESReco MyReco(parser, FirstEO); - eoESMutate MyMut(parser, FirstEO); - - // termination conditions read by the parser - eoTermVector the_terms(parser); - - // Initialization of the population - // shoudl be called using the parser, in case you want to read from file(s) - eoESRandomize randomize; // an eoESInd randomnizer - eoPop pop(the_scheme.PopSize(), FirstEO, randomize); - // eval(pop); // shoudl we call it from inside the constructor??? - - // ALL parmeters have been read: write them out - // Writing the parameters on arv[0].status - // but of course this can be modified - see the example parser.cpp - parser.outputParam(); - // except the help parameter??? - if( parser.getBool("-h" , "--help" , "Shows this help")) { - parser.printHelp(); - exit(1); - } - - unsigned i, iind; - - - std::cout << "Initial population: \n" << std::endl; - for (i = 0; i < pop.size(); ++i) { - eval(pop[i]); - std::cout << pop[i].fitness() << "\t" << pop[i] << std::endl; - } - - // the Operators - eoSequentialOpHolder seqholder; - // seqholder.addOp(MyReco, 1.0); - seqholder.addOp(MyMut, 1.0); - - // One generation - eoEvolStep evol_scheme(the_scheme, seqholder, eval); - - // the algorithm: - eoFullEA ea(evol_scheme, the_terms); - - ea(pop); - - std::cout << "Final population: \n" << std::endl; - for (i = 0; i < pop.size(); ++i) - std::cout << pop[i].fitness() << "\t" << pop[i] << std::endl; - return 0; - */ -} - diff --git a/eo/test/t-eoGOpSel.cpp b/eo/test/t-eoGOpSel.cpp deleted file mode 100644 index 2606bab69..000000000 --- a/eo/test/t-eoGOpSel.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - t-eoGOpSel.cpp - Testing proportional operator selectors - - (c) Maarten Keijzer and GeNeura Team, 2000 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - -*/ - -//-----------------------------------------------------------------------------// - -#ifndef __GNUG__ -// to avoid long name warnings -#pragma warning(disable:4786) -#endif // __GNUG__ - -#include - -#include // eoBin, eoPop, eoBreeder -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -// Fitness evaluation -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -main() -{ - rng.reseed(42); // reproducible random seed - - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - unsigned i; - - eoBinRandom random; - eoPop pop; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - chrom.fitness(binary_value(chrom)); - pop.push_back(chrom); - } - - std::cout << "population:" << std::endl; - for (i = 0; i < pop.size(); ++i) - std::cout << pop[i] << " " << pop[i].fitness() << std::endl; - - eoBinBitFlip bitflip; - eoBinCrossover xover; - - eoEvalFuncPtr eval(binary_value); - - //Create the proportional operator selector and add the - // two operators creatd above to it. - - eoProportionalGOpSel propSel; - eoSequentialGOpSel seqSel; - - propSel.addOp(bitflip, 0.5); - propSel.addOp(xover, 0.5); - - // seqSel selects operator in sequence, creating a combined operator - // add a bitflip, an xover and another bitflip - seqSel.addOp(bitflip, 0.25); - seqSel.addOp(xover, 0.5); - seqSel.addOp(bitflip, 0.25); - - - eoRandomIndiSelector selector1; - eoDetTournamentIndiSelector selector2(2); - - eoBackInserter inserter1; - eoDetTournamentInserter inserter2(eval, 2); - eoStochTournamentInserter inserter3(eval, 0.9f); - - eoGOpBreeder breeder1(propSel, selector1); - eoGOpBreeder breeder2(seqSel, selector1); - eoGOpBreeder breeder3(propSel, selector2); - eoGOpBreeder breeder4(seqSel, selector2); - - // test the breeders - - breeder1(pop); - breeder2(pop); - breeder3(pop); - breeder4(pop); - - eoState state; - - state.registerObject(pop); - - state.save(std::std::cout); - - return 0; -} - -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoNonUniform.cpp b/eo/test/t-eoNonUniform.cpp deleted file mode 100644 index 3a59bc8c2..000000000 --- a/eo/test/t-eoNonUniform.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//----------------------------------------------------------------------------- -// t-eoNonUniform.cc -//----------------------------------------------------------------------------- - -#include -#include - -//----------------------------------------------------------------------------- - -main() -{ - eoNonUniform nu(1000); - - std::cout << "----------------------------------------------------------" << std::endl - << "nu.step() = " << nu.step() - << "\t nu.num_step() = " << nu.num_step() << std::endl - << "----------------------------------------------------------" << std::endl; - - eoLinear l1(0, 1, nu), l2(1, 0, nu); - eoNegExp2 n1(0.1, 8, nu), n2(0.75, 3, nu); - - for (; nu; ++nu) - { - std::cout << nu.step() - << "\t" << l1() << "\t" << l2() - << "\t" << n1() << "\t" << n2() - << std::endl; - } -} - -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp deleted file mode 100644 index 559b661e9..000000000 --- a/eo/test/t-eoPareto.cpp +++ /dev/null @@ -1,274 +0,0 @@ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -//#include -#include -#include - -using namespace std; - -// Look: overloading the maximization without overhead (thing can be inlined) -class MinimizingFitnessTraits : public eoParetoFitnessTraits -{ - public : - static bool maximizing(int) { return false; } -}; - -typedef eoParetoFitness fitness_type; - -const unsigned chromsize=5; -const double minval = -15; -const double maxval = 15; - -struct eoDouble : public EO -{ - double value[chromsize]; -}; - -class Mutate : public eoMonOp -{ - bool operator()(eoDouble& _eo) - { - for (unsigned i = 0; i < chromsize; ++i) - { - if (rng.flip(1./chromsize)) - _eo.value[i] += rng.normal() * 0.1 * _eo.value[i]; - - if (_eo.value[i] < minval) - _eo.value[i] = minval; - else if (_eo.value[i] > maxval) - _eo.value[i] = maxval; - } - - return true; - } -}; - -class Eval : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - vector x(_eo.value, _eo.value + chromsize); - fitness_type f; - - for (unsigned i = 0; i < chromsize; ++i) - { - if (i < chromsize-1) - { - f[0] += -10.0 * exp(-0.2 * sqrt(x[i]*x[i] + x[i+1]*x[i+1])); - } - - f[1] += pow(fabs(x[i]), 0.8) + 5 * pow(sin(x[i]),3.); - } - - _eo.fitness(f); - } -}; - -class Eval2 : public eoEvalFunc -{ - void operator()(eoDouble& _eo) - { - vector x(_eo.value, _eo.value + chromsize); - fitness_type f; - - for (unsigned i = 0; i < chromsize; ++i) - { - f[0] += x[i] * x[i]; - } - - f[1] = - 3 * x[0] + 2 * x[1] - - x[2]/3 + 0.01*pow(x[3] - x[4], 3); - - _eo.fitness(f); - } -}; - -class Init : public eoInit -{ - void operator()(eoDouble& _eo) - { - _eo.value[0] = rng.uniform(); - - double range = maxval - minval; - - for (unsigned i = 1; i < chromsize; ++i) - _eo.value[i] = rng.uniform() * range + minval; - _eo.invalidate(); - } -}; - -/** @brief An elitist non-dominated sorted replacement scheme. - -Trying out an elitist non-dominated sorted replacement scheme. -*/ -template -class eoNDPlusReplacement : public eoReplacement -{ -public: - - // using eoNDPlusReplacement< EOT, WorthT >::first; - - eoNDPlusReplacement(eoPerf2Worth& _perf2worth) - : perf2worth(_perf2worth) - {} - - struct WorthPair : public pair - { - bool operator<(const WorthPair& other) const - { return other.first < this->first; } - }; - - - void operator()(eoPop& _parents, eoPop& _offspring) - { - unsigned sz = _parents.size(); - _parents.reserve(_parents.size() + _offspring.size()); - std::copy(_offspring.begin(), _offspring.end(), back_inserter(_parents)); - - // calculate worths - perf2worth(_parents); - perf2worth.sort_pop(_parents); - perf2worth.resize(_parents, sz); - - _offspring.clear(); - } - -private : - eoPerf2Worth& perf2worth; -}; - -template -eoPerf2Worth& make_perf2worth(eoParser& parser, eoState& state) -{ - - unsigned what = parser.createParam(unsigned(1), "perf2worth", "worth mapping indicator : \n\t \ - 0: non_dominated sorting \n\t\ - 1: non_dominated sorting 2 \n\t\ - 2: simple ranking \n\t", 'w').value(); - - switch (what) - { - case 1 : return state.storeFunctor(new eoNDSorting_II()); - case 2 : - { - eoDominanceMap& dominance = state.storeFunctor(new eoDominanceMap); - return state.storeFunctor(new eoParetoRanking(dominance)); - } - } - //default - - if (what > 2) - { - std::cout << "Warning, need an integer < 3 for perf2worth" << std::endl; - // should actually set parser flag, but I don't care - } - - return state.storeFunctor(new eoNDSorting_I(0.5)); -} - -template -eoSelectOne& make_selector(eoParser& parser, eoState& state, eoPerf2Worth& perf2worth) -{ - unsigned tournamentsize = parser.createParam(unsigned(2), "tournament_size", "Tournament Size", 't').value(); - double stochtour = parser.createParam(unsigned(0.95), "tournament_prob", "Probability in stochastic tournament").value(); - - switch (parser.createParam(unsigned(0), "selector", "Which selector (too lazy to explain: use the source)", 's').value()) - { - case 1 : return state.storeFunctor(new eoStochTournamentWorthSelect(perf2worth, stochtour)); - case 2 : return state.storeFunctor(new eoRouletteWorthSelect(perf2worth)); - case 3 : return state.storeFunctor(new eoRandomSelect); - } - // default - - return state.storeFunctor(new eoDetTournamentWorthSelect(perf2worth, tournamentsize)); -} - -// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well -void the_main(int argc, char* argv[]) -{ - Init init; - Eval eval; - Mutate mutate; - - eoParser parser(argc, argv); - eoState state; - - unsigned num_gen = parser.createParam(unsigned(50), "num_gen", "number of generations to run", 'g').value(); - unsigned pop_size = parser.createParam(unsigned(100), "pop_size", "population size", 'p').value(); - eoPop pop(pop_size, init); - - // Look, a factory function - eoPerf2Worth& perf2worth = make_perf2worth(parser, state); - - // Look: another factory function, now for selection - eoSelectOne& select = make_selector(parser, state, perf2worth); - - // One general operator - eoProportionalOp opsel; - opsel.add(mutate, 1.0); - - // the breeder - eoGeneralBreeder breeder(select, opsel); - - // replacement - eoNDPlusReplacement replace(perf2worth); - - unsigned long generation = 0; - eoGenContinue gen(num_gen, generation); - eoCheckPoint cp(gen); - - eoMOFitnessStat fitness0(0, "FirstObjective"); - eoMOFitnessStat fitness1(1, "SecondObjective"); - - cp.add(fitness0); - cp.add(fitness1); - -#ifdef HAVE_GNUPLOT - eoGnuplot1DSnapshot snapshot("pareto"); - //snapshot.with(eoGnuplot::Points(3)); - - cp.add(snapshot); - - snapshot.add(fitness0); - snapshot.add(fitness1); -#endif - - // the algo - eoEasyEA ea(cp, eval, breeder, replace); - - if (parser.userNeedsHelp()) - { - parser.printHelp(std::cout); - return; - } - - apply(eval, pop); - ea(pop); -} - - -int main(int argc, char* argv[]) -{ - try - { - the_main(argc, argv); - } - catch (std::exception& e) - { - std::cout << "Exception thrown: " << e.what() << std::endl; - throw e; // make sure it does not pass the test - } -} - - - -// Local Variables: -// mode: C++ -// c-file-style: "Stroustrup" -// End: diff --git a/eo/test/t-eoParetoFitness.cpp b/eo/test/t-eoParetoFitness.cpp deleted file mode 100644 index bd5d0d2bd..000000000 --- a/eo/test/t-eoParetoFitness.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// t-eoParetoFitness.cpp -// (c) Maarten Keijzer -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: mak@dhi.dk - -30/01/02 - MS - Added the eoVariableParetoTraits - and the compare Fn - */ -//----------------------------------------------------------------------------- - -#include -#include - -#include "eoParetoFitness.h" - -using namespace std; - -/** test program for Pareto Fitness */ - -class MinimizingTraits : public eoParetoFitnessTraits -{ -public : - - static bool maximizing(int) { return false; } -}; - -template -void compare(F & _eo1, F & _eo2) -{ - if (_eo1.dominates(_eo2)) - std::cout << _eo1 << " dominates " << _eo2 << std::endl; - else if (_eo2.dominates(_eo1)) - std::cout << _eo2 << " dominates " << _eo1 << std::endl; - else - std::cout << "None of " << _eo1 << " and " << _eo2 << "dominates the other" << std::endl; - return; -} - -int main() -{ - typedef eoParetoFitness<> MaxFitness; - typedef eoParetoFitness MinFitness; - - typedef eoParetoFitness VarFitness; - - try{ - - MaxFitness f0; - f0[0] = 0.0; - f0[1] = 1.0; - - MaxFitness f1; - f1[0] = 1.0; - f1[1] = 0.0; - - MaxFitness f2; - f2[0] = 0.0; - f2[1] = 0.5; - - // now f0 should dominate f2; - - if (!f0.dominates(f2)) - { - std::cout << f2 << " not dominated by " << f0; - throw; - } - - // f0 and f1 should not dominate each other - - if (f0.dominates(f1) || f1.dominates(f0)) - { - std::cout << f0 << " and " << f1 << " dominate"; - throw; - } - - if (! (f0 == f0)) - { - std::cout << "f0 == f0 failed" << std::endl; - throw; - } - - // test ctors and such - MaxFitness f3 = f0; - f3[0] += 1e-9; - - // test tolerance - assert(f3 == f0); - - MinFitness m0; - MinFitness m1; - MinFitness m2; - MinFitness m3; - - m0[0] = 0.0; - m0[1] = 1.0; - - m1[0] = 1.0; - m1[1] = 0.0; - - m2[0] = 0.0; - m2[1] = 0.5; - - m3[0] = 0.5; - m3[1] = 0.5; - - //m2 should dominate m0 - assert(m2.dominates(m0)); - - assert(!m1.dominates(m0)); - assert(!m0.dominates(m1)); - assert(!m0.dominates(m2)); // (m2 < m0)); - assert(m2.dominates(m3)); //m3 < m2); - assert(!m3.dominates(m2)); // (m2 < m3)); - assert(m2.dominates(m3)); //m2 > m3); - - - ////////////////////////////////////////// - // now the run-time set-able number of objectives - //////////////////////////////////////////// - - std::cout << "On y va" << std::endl; - - - // setup fitness WARNING do not try to allocate any EO before that (runtime error) - vector b(2, true); - b[0]=true; - b[1]=false; - VarFitness::setUp(2, b); - std::cout << "\nMAXimizing on Obj 0 and MINimizing on Obj 1\n"; - - VarFitness mv0; - VarFitness mv1; - VarFitness mv2; - VarFitness mv3; - - mv0[0] = 0.0; - mv0[1] = 1.0; - - mv1[0] = 1.0; - mv1[1] = 0.0; - - mv2[0] = 0.0; - mv2[1] = 0.5; - - mv3[0] = 0.5; - mv3[1] = 0.5; - - compare (mv0,mv1); - compare (mv0,mv2); - compare (mv0,mv3); - compare (mv1,mv2); - compare (mv1,mv3); - compare (mv2,mv3); - - std::cout << "\nChanging now the min <-> max\n"; - b[0]=false; - b[1]=true; - VarFitness::setUp(2, b); - std::cout << "\nMINimizing on Obj 0 and MAXimizing on Obj 1\n"; - compare (mv0,mv1); - compare (mv0,mv2); - compare (mv0,mv3); - compare (mv1,mv2); - compare (mv1,mv3); - compare (mv2,mv3); - - std::cout << "\nTesting WARNING\n"; - b.resize(3); - b[0]=false; - b[1]=true; - b[2]=true; - VarFitness::setUp(3, b); - - } - catch(std::exception& e) - { - std::cout << e.what() << std::endl; - } - -} diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp deleted file mode 100644 index 3127bd4e3..000000000 --- a/eo/test/t-eobreeder.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// t-eobreeder.cpp -// This program test the breeder object -// (c) GeNeura Team, 1998 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - -*/ -//----------------------------------------------------------------------------- - -#ifndef __GNUG__ -// to avoid long name warnings -#pragma warning(disable:4786) -#endif // __GNUG__ - -#include // eoBin, eoPop, eoBreeder -#include -#include -#include -#include - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - unsigned i; - - eoBinRandom random; - eoPop pop; - - BinaryValue eval; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - eval(chrom); - pop.push_back(chrom); - } - - std::cout << "population:" << std::endl; - for (i = 0; i < pop.size(); ++i) - std::cout << pop[i] << " " << pop[i].fitness() << std::endl; - - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoProportionalOpSel propSel; - eoBreeder breeder( propSel ); - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - breeder(pop); - - // reevaluation of fitness - for_each(pop.begin(), pop.end(), BinaryValue()); - - std::cout << "new population:" << std::endl; - for (i = 0; i < pop.size(); ++i) - std::cout << pop[i] << " " << pop[i].fitness() << std::endl; - - return 0; -} - -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eogeneration.cpp b/eo/test/t-eogeneration.cpp deleted file mode 100644 index 43cc9c8e9..000000000 --- a/eo/test/t-eogeneration.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - t-eogeneration.cpp - Testing the eoGeneration classes, and classes related to it - - (c) GeNeura Team, 1999, 2000 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - -*/ - -//-----------------------------------------------------------------------------// - - -// to avoid long name warnings -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - -#include -#include - -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 16; - unsigned i; - - eoBinRandom random; - eoPop pop; - - // Evaluation - eoEvalFuncPtr eval( binary_value ); - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - eval(chrom); - pop.push_back(chrom); - } - - std::cout << "population:" << std::endl; - for (i = 0; i < pop.size(); ++i) - std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - - - // selection - eoLottery lottery; - - // breeder - eoBinBitFlip bitflip; - eoBinCrossover xover; - eoProportionalOpSel propSel; - eoBreeder breeder( propSel ); - propSel.addOp(bitflip, 0.25); - propSel.addOp(xover, 0.75); - - // replacement - eoInclusion inclusion; - - - - // GA generation - eoGeneration generation(lottery, breeder, inclusion, eval); - - // evolution - unsigned g = 0; - do { - try - { - generation(pop); - } - catch (std::exception& e) - { - std::cout << "exception: " << e.what() << std::endl;; - exit(EXIT_FAILURE); - } - - std::cout << "pop[" << ++g << "]" << std::endl; - for (i = 0; i < pop.size(); ++i) - std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - - } while (pop[0].fitness() < pow(2.0, CHROM_SIZE) - 1); - - // Try again, with a "counted" evaluation function - // GA generation - // Evaluation - eoEvalFuncPtrCnt eval2( binary_value ); - eoPop pop2; - - for (i = 0; i < POP_SIZE; ++i) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - eval2(chrom); - pop2.push_back(chrom); - } - eoGeneration generation2(lottery, breeder, inclusion, eval2); - - // evolution - do { - try - { - generation2(pop2); - } - catch (std::exception& e) - { - std::cout << "exception: " << e.what() << std::endl;; - exit(EXIT_FAILURE); - } - - std::cout << "pop[" << ++g << "]" << std::endl; - for (i = 0; i < pop2.size(); ++i) - std::cout << "\t" << pop2[i] << " " << pop[i].fitness() << std::endl; - - } while (pop2[0].fitness() < pow(2.0, CHROM_SIZE) - 1); - - std::cout << "Number of evaluations " << eval2.getNumOfEvaluations() << std::endl; - return 0; -} - -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoinclusion.cpp b/eo/test/t-eoinclusion.cpp deleted file mode 100644 index 217f2eff0..000000000 --- a/eo/test/t-eoinclusion.cpp +++ /dev/null @@ -1,97 +0,0 @@ -//----------------------------------------------------------------------------- -// t-eoinclusion.cpp -//----------------------------------------------------------------------------- - -#include -#include -#include - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -#include "binary_value.h" - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned CHROM_SIZE = 4; - - eoBinRandom random; - BinaryValue eval; - - for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) - { - eoPop pop; - unsigned i; - for ( i = 0; i < POP_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - eval(chrom); - pop.push_back(chrom); - } - - for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) - { - eoPop pop2, pop3, pop4, pop5; - - for (i = 0; i < POP2_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - eval(chrom); - pop2.push_back(chrom); - } - - std::cout << "--------------------------------------------------" << std::endl - << "breeders \tpop" << std::endl - << "--------------------------------------------------" << std::endl; - for (i = 0; i < max(pop.size(), pop2.size()); i++) - { - if (pop.size() > i) - std::cout << pop[i] << " " << pop[i].fitness() << " \t"; - else - std::cout << "\t\t"; - if (pop2.size() > i) - std::cout << pop2[i] << " " << pop2[i].fitness(); - std::cout << std::endl; - } - - eoInclusion inclusion(0.75); - pop3 = pop2; - inclusion(pop, pop3); - - eoInclusion inclusion2; - pop4 = pop2; - inclusion2(pop, pop4); - - eoInclusion inclusion3(1.5); - pop5 = pop2; - inclusion3(pop, pop5); - - std::cout << std::endl - << "0.75 \t\t1.0 \t\t1.5" << std::endl - << "---- \t\t--- \t\t---" << std::endl; - for (i = 0; i < pop5.size(); i++) - { - if (pop3.size() > i) - std::cout << pop3[i] << " " << pop3[i].fitness() << " \t"; - else - std::cout << " \t\t"; - if (pop4.size() > i) - std::cout << pop4[i] << " " << pop4[i].fitness() << " \t"; - else - std::cout << " \t\t"; - if (pop5.size() > i) - std::cout << pop5[i] << " " << pop5[i].fitness(); - std::cout << std::endl; - } - } - } - - return 0; -} - -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoinsertion.cpp b/eo/test/t-eoinsertion.cpp deleted file mode 100644 index 051ca8211..000000000 --- a/eo/test/t-eoinsertion.cpp +++ /dev/null @@ -1,108 +0,0 @@ -//----------------------------------------------------------------------------- -// t-eoinsertion.cpp -//----------------------------------------------------------------------------- - -#include // eoBin, eoPop, eoInsertion - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -//----------------------------------------------------------------------------- - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, chrom.size() - i - 1); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned CHROM_SIZE = 4; - unsigned i; - - eoBinRandom random; - - for (unsigned POP_SIZE = 4; POP_SIZE <=6; POP_SIZE++) - { - eoPop pop; - - for (i = 0; i < POP_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - for (unsigned POP2_SIZE = 4; POP2_SIZE <=6; POP2_SIZE++) - { - eoPop pop2, pop3, pop4, pop5, popx; - - for (i = 0; i < POP2_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop2.push_back(chrom); - } - - std::cout << "--------------------------------------------------" << std::endl - << "breeders \tpop" << std::endl - << "--------------------------------------------------" << std::endl; - for (i = 0; i < max(pop.size(), pop2.size()); i++) - { - if (pop.size() > i) - std::cout << pop[i] << " " << pop[i].fitness() << " \t"; - else - std::cout << "\t\t"; - if (pop2.size() > i) - std::cout << pop2[i] << " " << pop2[i].fitness(); - std::cout << std::endl; - } - - eoInsertion insertion(0.75); - popx = pop; - pop3 = pop2; - insertion(popx, pop3); - - eoInsertion insertion2; - popx = pop; - pop4 = pop2; - insertion2(popx, pop4); - - eoInsertion insertion3(1.5); - popx = pop; - pop5 = pop2; - insertion3(popx, pop5); - - std::cout << std::endl - << "0.75 \t\t1.0 \t\t1.5" << std::endl - << "---- \t\t--- \t\t---" << std::endl; - for (i = 0; i < pop5.size(); i++) - { - if (pop3.size() > i) - std::cout << pop3[i] << " " << pop3[i].fitness() << " \t"; - else - std::cout << " \t\t"; - if (pop4.size() > i) - std::cout << pop4[i] << " " << pop4[i].fitness() << " \t"; - else - std::cout << " \t\t"; - if (pop5.size() > i) - std::cout << pop5[i] << " " << pop5[i].fitness(); - std::cout << std::endl; - } - } - } - - return 0; -} - -//----------------------------------------------------------------------------- - diff --git a/eo/test/t-eolottery.cpp b/eo/test/t-eolottery.cpp deleted file mode 100644 index e03926380..000000000 --- a/eo/test/t-eolottery.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//----------------------------------------------------------------------------- -// t-eolottery.cpp -//----------------------------------------------------------------------------- - -#include // eoBin, eoPop, eoLottery - -//----------------------------------------------------------------------------- - -typedef eoBin Chrom; - -void binary_value(Chrom& chrom) -{ - float sum = 0; - for (unsigned i = 0; i < chrom.size(); i++) - if (chrom[i]) - sum += pow(2, i); - chrom.fitness(sum); -} - -//----------------------------------------------------------------------------- - -main() -{ - const unsigned POP_SIZE = 8, CHROM_SIZE = 4; - - eoPop pop, pop2; - eoBinRandom random; - unsigned i; - - for (i = 0; i < POP_SIZE; i++) - { - Chrom chrom(CHROM_SIZE); - random(chrom); - binary_value(chrom); - pop.push_back(chrom); - } - - std::cout << "original population:" << std::endl; - sort(pop.begin(), pop.end()); - for (i = 0; i < pop.size(); i++) - std::cout << pop[i] << " " << pop[i].fitness() << std::endl; - - eoLottery lottery; - lottery(pop, pop2); - - std::cout << "selected by lottery population:" << std::endl; - sort(pop2.begin(), pop2.end()); - for (i = 0; i < pop2.size(); i++) - std::cout << pop2[i] << " " << pop2[i].fitness() << std::endl; - - return 0; -} - -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoproblem.cpp b/eo/test/t-eoproblem.cpp deleted file mode 100644 index 066efb62f..000000000 --- a/eo/test/t-eoproblem.cpp +++ /dev/null @@ -1,55 +0,0 @@ -//----------------------------------------------------------------------------- -// t-eoproblem.cpp -// (c) GeNeura Team 1998 -//----------------------------------------------------------------------------- - -#include // time -#include // fabs -#include // std::cout -#include // eoVector, eoProblem - -//----------------------------------------------------------------------------- - -typedef eoVector Chrom; - -//----------------------------------------------------------------------------- - -std::ostream& operator<<(std::ostream& os, const Chrom& chrom) -{ - copy(chrom.begin(), chrom.end(), std::ostream_iterator(os)); - return os; -} - -//----------------------------------------------------------------------------- - -class Easy//: public eoProblem -{ -public: - static const unsigned size; - - float operator()(const Chrom& chrom) - { - return 1.0 / (fabs(chrom[0]) + 1.0); - } -}; -const unsigned Easy::size = 1; - -//----------------------------------------------------------------------------- - -int main() -{ - Easy easy; - Chrom chrom(Easy::size); - - srand(time(0)); - - chrom[0] = ((float)rand()) / ((float)RAND_MAX); - chrom.fitness(easy(chrom)); - - std::cout << "chrom = " << chrom << std::endl - << "chrom.fitness() = " << chrom.fitness() << std::endl; - - return 0; -} - -//----------------------------------------------------------------------------- From 4cebad979d25d56863919816a98e4cb36ca72952 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 7 Nov 2010 23:16:45 +0100 Subject: [PATCH 1634/2134] remove multi-objective stuff, deprecated by ParadisEO-PEO --- eo/src/CMakeLists.txt | 1 - eo/src/do/make_algo_pareto.h | 203 ----------------------- eo/src/do/make_checkpoint_pareto.h | 248 ----------------------------- eo/src/do/make_continue_pareto.h | 108 ------------- eo/src/eo | 1 - eo/src/eoDominanceMap.h | 162 ------------------- eo/src/eoParetoConstraintFitness.h | 229 -------------------------- eo/src/eoParetoFitness.cpp | 38 ----- eo/src/eoParetoFitness.h | 235 --------------------------- eo/src/eoParetoRanking.h | 71 --------- eo/src/utils/eoStat.h | 54 ------- 11 files changed, 1350 deletions(-) delete mode 100644 eo/src/do/make_algo_pareto.h delete mode 100644 eo/src/do/make_checkpoint_pareto.h delete mode 100644 eo/src/do/make_continue_pareto.h delete mode 100644 eo/src/eoDominanceMap.h delete mode 100644 eo/src/eoParetoConstraintFitness.h delete mode 100644 eo/src/eoParetoFitness.cpp delete mode 100644 eo/src/eoParetoFitness.h delete mode 100644 eo/src/eoParetoRanking.h diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index 7a6d6f334..70e2c7551 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -15,7 +15,6 @@ SET (EO_SOURCES eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp - eoParetoFitness.cpp eoScalarFitnessAssembled.cpp eoSIGContinue.cpp) diff --git a/eo/src/do/make_algo_pareto.h b/eo/src/do/make_algo_pareto.h deleted file mode 100644 index 6231e4fee..000000000 --- a/eo/src/do/make_algo_pareto.h +++ /dev/null @@ -1,203 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// make_algo_pareto.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2002 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _make_algo_pareto_h -#define _make_algo_pareto_h - -#include "utils/eoData.h" // for eo_is_a_rate -// everything tha's needed for the algorithms - SCALAR fitness - -// Selection -// the eoSelectOne's -#include "eoSelectFromWorth.h" -#include "eoNDSorting.h" - -// Breeders -#include "eoGeneralBreeder.h" - -// Replacement - at the moment limited to eoNDPlusReplacement, locally defined -#include "eoReplacement.h" - -template -class eoNDPlusReplacement : public eoReplacement -{ -public: - eoNDPlusReplacement(eoPerf2Worth& _perf2worth) : perf2worth(_perf2worth) {} - - struct WorthPair : public std::pair - { - bool operator<(const WorthPair& other) const { return other.first < this->first; } - }; - - void operator()(eoPop& _parents, eoPop& _offspring) - { - unsigned sz = _parents.size(); - _parents.reserve(_parents.size() + _offspring.size()); - copy(_offspring.begin(), _offspring.end(), back_inserter(_parents)); - - // calculate worths - perf2worth(_parents); - perf2worth.sort_pop(_parents); - perf2worth.resize(_parents, sz); - - _offspring.clear(); - } - -private : - eoPerf2Worth& perf2worth; -}; - - -// Algorithm (only this one needed) -#include "eoEasyEA.h" - - // also need the parser and param includes -#include "utils/eoParser.h" -#include "utils/eoState.h" - - -/* - * This function builds the algorithm (i.e. selection and replacement) - * from existing continue (or checkpoint) and operators - * - * It uses a parser (to get user parameters) and a state (to store the memory) - * the last argument is an individual, needed for 2 reasons - * it disambiguates the call after instanciations - * some operator might need some private information about the indis - * - * This is why the template is the complete EOT even though only the fitness - * is actually templatized here -*/ - -template -eoAlgo & do_make_algo_pareto(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) -{ - // the selection - std::string & selStr = _parser.createParam(std::string("NSGA-II"), "selCrit", "Pareto Selection Criterion: NSGA, NSGA-II, ParetoRanking", 'S', "Evolution Engine").value(); - double nicheSize = _parser.createParam(1.0, "nicheSize", "Size of niche for NSGA-I", '\0', "Evolution Engine").value(); - eoPerf2Worth *p2w; - if ( (selStr == std::string("NSGA")) || (selStr == std::string("NSGA-I") ) ) - p2w = new eoNDSorting_I(nicheSize); - else if (selStr == std::string("NSGA-II")) - p2w = new eoNDSorting_II(); - else if (selStr == std::string("ParetoRanking")) - { - eoDominanceMap& dominance = _state.storeFunctor(new eoDominanceMap); - p2w = new eoParetoRanking(dominance); - } - - _state.storeFunctor(p2w); - - // now the selector (from p2w) - cut-and-pasted from make_algo_scalar! - // only all classes are now ...FromWorth ... - // only the ranking is not re-implemented (yet?) - eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, DetTour(T), StochTour(t) or Random", 'S', "Evolution Engine"); - - eoParamParamType & ppSelect = selectionParam.value(); // std::pair > - - eoSelectOne* select ; - if (ppSelect.first == std::string("DetTour")) - { - unsigned detSize; - - if (!ppSelect.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; - detSize = 2; - // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("2")); - } - else // parameter passed by user as DetTour(T) - detSize = atoi(ppSelect.second[0].c_str()); - select = new eoDetTournamentWorthSelect(*p2w, detSize); - } - else if (ppSelect.first == std::string("StochTour")) - { - double p; - if (!ppSelect.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; - p = 1; - // put back p in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("1")); - } - else // parameter passed by user as DetTour(T) - p = atof(ppSelect.second[0].c_str()); - - select = new eoStochTournamentWorthSelect(*p2w, p); - } -// else if (ppSelect.first == std::string("Sequential")) // one after the other -// { -// bool b; -// if (ppSelect.second.size() == 0) // no argument -> default = ordered -// { -// b=true; -// // put back in parameter for consistency (and status file) -// ppSelect.second.push_back(std::string("ordered")); -// } -// else -// b = !(ppSelect.second[0] == std::string("unordered")); -// select = new eoSequentialWorthSelect(b); -// } - else if (ppSelect.first == std::string("Roulette")) // no argument (yet) - { - select = new eoRouletteWorthSelect(*p2w); - } - else if (ppSelect.first == std::string("Random")) // no argument, no perf2Worth - { - select = new eoRandomSelect; - } - else - { - std::string stmp = std::string("Invalid selection: ") + ppSelect.first; - throw std::runtime_error(stmp.c_str()); - } - - _state.storeFunctor(select); - - - // the number of offspring - eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); - - // the replacement - // actually limited to eoNDPlusReplacement - eoReplacement & replace = _state.storeFunctor( - new eoNDPlusReplacement(*p2w) - ); - - // the general breeder - eoGeneralBreeder *breed = - new eoGeneralBreeder(*select, _op, offspringRateParam.value()); - _state.storeFunctor(breed); - - // now the eoEasyEA - eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, replace); - _state.storeFunctor(algo); - // that's it! - return *algo; -} - -#endif diff --git a/eo/src/do/make_checkpoint_pareto.h b/eo/src/do/make_checkpoint_pareto.h deleted file mode 100644 index 50b7253ef..000000000 --- a/eo/src/do/make_checkpoint_pareto.h +++ /dev/null @@ -1,248 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// make_checkpoint_pareto.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _make_checkpoint_pareto_h -#define _make_checkpoint_pareto_h - -#include -#include -#include - -#include "EO.h" -#include "eoParetoFitness.h" -#include "eoEvalFuncCounter.h" -#include "utils/checkpointing" -#include "utils/selectors.h" - -// at the moment, in utils/make_help.cpp -// this should become some eoUtils.cpp with corresponding eoUtils.h -bool testDirRes(std::string _dirName, bool _erase); -/////////////////// The checkpoint and other I/O ////////////// - -/** Of course, Fitness needs to be an eoParetoFitness!!! - */ -template -eoCheckPoint& do_make_checkpoint_pareto(eoParser& _parser, eoState& _state, - eoEvalFuncCounter& _eval, eoContinue& _continue) -{ - // first, create a checkpoint from the eoContinue - and store in _state - eoCheckPoint & checkpoint = _state.storeFunctor(new eoCheckPoint(_continue)); - - /////// get number of obectives from Fitness - not very elegant - typedef typename EOT::Fitness Fit; - Fit fit; - unsigned nObj = fit.size(); - - /////////////////// - // Counters - ////////////////// - // is nb Eval to be used as counter? - bool useEval = _parser.getORcreateParam(true, "useEval", - "Use nb of eval. as counter (vs nb of gen.)", - '\0', "Output").value(); - - // Create anyway a generation-counter parameter WARNING: not stored anywhere!!! - eoValueParam *generationCounter = new eoValueParam(0, "Gen."); - // Create an incrementor (sub-class of eoUpdater). - eoIncrementor & increment = - _state.storeFunctor(new eoIncrementor(generationCounter->value()) ); - // Add it to the checkpoint, - checkpoint.add(increment); - - // dir for DISK output - std::string & dirName = _parser.getORcreateParam(std::string("Res"), "resDir", - "Directory to store DISK outputs", - '\0', "Output - Disk").value(); - // shoudl we empty it if exists - eoValueParam& eraseParam = _parser.getORcreateParam(true, "eraseDir", - "erase files in dirName if any", - '\0', "Output - Disk"); - bool dirOK = false; // not tested yet - - ///////////////////////////////////////// - // now some statistics on the population: - ///////////////////////////////////////// - /** - * existing stats for Pareto as of today, Jan. 31. 2002 - * - * eoSortedPopStat : whole population - type std::string (!!) - */ - - eoValueParam& fPlotParam - = _parser.getORcreateParam(eoParamParamType("1(0,1)"), "frontFileFrequency", - "File save frequency in objective spaces (std::pairs of comma-separated objectives " \ - "in 1 single parentheses std::pair)", - '\0', "Output - Disk"); - - bool boolGnuplot = _parser.getORcreateParam(false, "plotFront", - "Objective plots (requires corresponding files " \ - "- see frontFileFrequency", - '\0', "Output - Graphical").value(); - - eoParamParamType & fPlot = fPlotParam.value(); // std::pair > - unsigned frequency = atoi(fPlot.first.c_str()); - if (frequency) // something to plot - { - unsigned nbPlot = fPlot.second.size(); - if ( nbPlot % 2 ) // odd! - throw std::runtime_error("Odd number of front description in make_checkpoint_pareto"); - - // only create the necessary stats - std::vector bStat(nObj, false); // track of who's already there - std::vector* > theStats(nObj); - - // first create the stats - for (unsigned i=0; i* fStat; - if (!bStat[obj1]) { // not already there: create it - std::ostringstream os; - os << "Obj. " << obj1 << std::ends; - fStat = new eoMOFitnessStat(obj1, os.str().c_str()); - _state.storeFunctor(fStat); - bStat[obj1]=true; - theStats[obj1]=fStat; - checkpoint.add(*fStat); - } - if (!bStat[obj2]) { // not already there: create it - std::ostringstream os; - os << "Obj. " << obj2 << std::ends; - fStat = new eoMOFitnessStat(obj2, os.str().c_str()); - _state.storeFunctor(fStat); - bStat[obj2]=true; - theStats[obj2]=fStat; - checkpoint.add(*fStat); - } - - // then the fileSnapshots - std::ostringstream os; - os << "Front." << obj1 << "." << obj2 << "." << std::ends; - eoFileSnapshot& snapshot = _state.storeFunctor( - new eoFileSnapshot(dirName, frequency, os.str().c_str())); - checkpoint.add(snapshot); - - snapshot.add(*theStats[obj1]); - snapshot.add(*theStats[obj2]); - - // and create the gnuplotter from the fileSnapshot - if(boolGnuplot) - { - eoGnuplot1DSnapshot & plotSnapshot = _state.storeFunctor(new - eoGnuplot1DSnapshot(snapshot)); - plotSnapshot.setPointSize(3); - checkpoint.add(plotSnapshot); - } - } - } - // Dump of the whole population - //----------------------------- - bool printPop = _parser.getORcreateParam(false, "printPop", - "Print sorted pop. every gen.", - '\0', "Output").value(); - eoSortedPopStat * popStat; - if ( printPop ) // we do want pop dump - { - std::cout << "On cree printpop\n"; - popStat = & _state.storeFunctor(new eoSortedPopStat); - // add it to the checkpoint - checkpoint.add(*popStat); - } - - /////////////// - // The monitors - /////////////// - // do we want an eoStdoutMonitor? - bool needStdoutMonitor = printPop ; // only this one at the moment - - // The Stdout monitor will print parameters to the screen ... - if ( needStdoutMonitor ) - { - eoStdoutMonitor & monitor = _state.storeFunctor(new eoStdoutMonitor(false)); - - // when called by the checkpoint (i.e. at every generation) - checkpoint.add(monitor); - - // the monitor will output a series of parameters: add them - monitor.add(*generationCounter); - if (useEval) // we want nb of evaluations - monitor.add(_eval); - if ( printPop) - monitor.add(*popStat); - } - - - ////////////////////////////////// - // State savers - ////////////////////////////// - - // feed the state to state savers - // save state every N generation - eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); - - if (_parser.isItThere(saveFrequencyParam)) - { - // first make sure dirName is OK - if (! dirOK ) - dirOK = testDirRes(dirName, eraseParam.value()); // TRUE - - unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); -#ifdef _MSVC - std::string stmp = dirName + "\generations"; -#else - std::string stmp = dirName + "/generations"; -#endif - eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); - _state.storeFunctor(stateSaver1); - checkpoint.add(*stateSaver1); - } - - // save state every T seconds - eoValueParam& saveTimeIntervalParam - = _parser.getORcreateParam(unsigned(0), "saveTimeInterval", - "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); - if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) - { - // first make sure dirName is OK - if (! dirOK ) - dirOK = testDirRes(dirName, eraseParam.value()); // TRUE - -#ifdef _MSVC - std::string stmp = dirName + "\time"; -#else - std::string stmp = dirName + "/time"; -#endif - eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); - _state.storeFunctor(stateSaver2); - checkpoint.add(*stateSaver2); - } - - // and that's it for the (control and) output - return checkpoint; -} - -#endif diff --git a/eo/src/do/make_continue_pareto.h b/eo/src/do/make_continue_pareto.h deleted file mode 100644 index 364f60574..000000000 --- a/eo/src/do/make_continue_pareto.h +++ /dev/null @@ -1,108 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// make_continue_pareto.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _make_continue_pareto_h -#define _make_continue_pareto_h - -/* -Contains the templatized version of parser-based choice of stopping criterion -for Pareto optimization (e.g. no "... without improvement" criterion -It can then be instantiated, and compiled on its own for a given EOType -(see e.g. in dir ga, ga.cpp) -*/ - -// Continuators - all include eoContinue.h -#include -#include -#include -#include -#ifndef _MSC_VER -#include // CtrlC handling (using 2 global variables!) -#endif - - // also need the parser and param includes -#include -#include - - -/////////////////// helper function //////////////// -template -eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) -{ - if (_combined) // already exists - _combined->add(*_cont); - else - _combined = new eoCombinedContinue(*_cont); - return _combined; -} - -///////////// The make_continue function -template -eoContinue & do_make_continue_pareto(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) -{ - //////////// Stopping criterion /////////////////// - // the combined continue - to be filled - eoCombinedContinue *continuator = NULL; - - // for each possible criterion, check if wanted, otherwise do nothing - - // First the eoGenContinue - need a default value so you can run blind - // but we also need to be able to avoid it <--> 0 - eoValueParam& maxGenParam = _parser.createParam(unsigned(100), "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); - - if (maxGenParam.value()) // positive: -> define and store - { - eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); - _state.storeFunctor(genCont); - // and "add" to combined - continuator = make_combinedContinue(continuator, genCont); - } - -#ifndef _MSC_VER - // the CtrlC interception (Linux only I'm afraid) - eoCtrlCContinue *ctrlCCont; - eoValueParam& ctrlCParam = _parser.createParam(true, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); - if (_parser.isItThere(ctrlCParam)) - { - ctrlCCont = new eoCtrlCContinue; - // store - _state.storeFunctor(ctrlCCont); - // add to combinedContinue - continuator = make_combinedContinue(continuator, ctrlCCont); - } -#endif - - // now check that there is at least one! - if (!continuator) - throw std::runtime_error("You MUST provide a stopping criterion"); - // OK, it's there: store in the eoState - _state.storeFunctor(continuator); - - // and return - return *continuator; -} - -#endif diff --git a/eo/src/eo b/eo/src/eo index 61868d16e..cf18f3ea0 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -127,7 +127,6 @@ #include // Perf2Worth stuff - includes eoSelectFromWorth.h -#include #include diff --git a/eo/src/eoDominanceMap.h b/eo/src/eoDominanceMap.h deleted file mode 100644 index ead931963..000000000 --- a/eo/src/eoDominanceMap.h +++ /dev/null @@ -1,162 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoDominanceMap.h - (c) Maarten Keijzer, Marc Schoenauer, 2001 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef eoDominanceMap_h -#define eoDominanceMap_h - -#include -#include - -/** - eoDominanceMap, utility class to calculate and maintain a map (std::vector >) of pareto dominance statistics. - - It is set up such that - - if map[i][j] == true - then i dominates j - - The dominance map can be used to perform pareto ranking (eoParetoRanking) or non dominated sorting. - For the latter, the remove() member function might come in handy. - - \todo make it an eoStat? -*/ -template -class eoDominanceMap : public eoUF&, void>, public std::vector > -{ -public: - - /** Clears the map */ - void clear() { - std::vector >::clear(); - fitness.clear(); - } - - /** - Update or create the dominance map - */ - void operator()(const eoPop& _pop) - { - setup(_pop); - return; - } - - /** - Removes the domination info for a given individual, thus nothing dominates it and it dominates nothing. - */ - void remove(unsigned i) - { - for (unsigned j = 0; j < size(); ++j) - { - operator[](i)[j] = false; // clear row - operator[](j)[i] = false; // clear col - } - } - - /** - Create domination matrix from scratch. Complexity O(N^2) - */ - void setup(const eoPop& _pop) - { - fitness.resize(_pop.size()); - resize(_pop.size()); - - for (unsigned i = 0; i < _pop.size(); ++i) - { - fitness[i] = _pop[i].fitness(); - operator[](i).resize(_pop.size(), false); - - for (unsigned j = 0; j < i; ++j) - { - if (_pop[i].fitness().dominates(_pop[j].fitness())) - { - operator[](i)[j] = true; - operator[](j)[i] = false; - } - else if (_pop[j].fitness().dominates(_pop[i].fitness())) - { - operator[](i)[j] = false; - operator[](j)[i] = true; - } - else - { - operator[](i)[j] = false; - operator[](j)[i] = false; - } - } - } - } - - /** - For all elements, returns the no. of elements that dominate the element - Thus: lower is better (and 0 is the front). - It returns a std::vector cuz that - makes subsequent manipulation that much easier - */ - std::vector sum_dominators() const - { - std::vector result(size(), 0.0); - - for (unsigned i = 0; i < size(); ++i) - { - for (unsigned j = 0; j < size(); ++j) - { - if (operator[](i)[j]) // i dominates j - result[j]++; - } - } - - return result; - } - - /** - For all elements, returns the number of elements that the element dominates - Thus: higher is better - It returns a std::vector cuz that - makes subsequent manipulation that much easier - */ - std::vector sum_dominants() const - { - std::vector result(size(), 0.0); - - for (unsigned i = 0; i < size(); ++i) - { - for (unsigned j = 0; j < size(); ++j) - { - if (operator[](i)[j]) // i dominates j - result[i]++; - } - } - - return result; - } - - private : - - - std::vector fitness; -}; - -#endif diff --git a/eo/src/eoParetoConstraintFitness.h b/eo/src/eoParetoConstraintFitness.h deleted file mode 100644 index c33417ad4..000000000 --- a/eo/src/eoParetoConstraintFitness.h +++ /dev/null @@ -1,229 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoParetoConstraintFitness.h -// (c) Maarten Keijzer and Marc Schoenauer, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: mkeijzer@cs.vu.nl - Marc.Schoenauer@inria.fr - */ -//----------------------------------------------------------------------------- - -#ifndef _eoParetoConstraintFitness_h -#define _eoParetoConstraintFitness_h - -#include -#include -#include -#include - -#include - -/** - eoParetoOneConstraintFitness class: - std::vector of doubles + constraint value - - Comparison (dominance) is done - on pareto dominance for 2 feasible individuals, - one feasible individual always wins over an infeasible - on constraint violations for 2 infeasible individuals - - The template argument FitnessTraits defaults to - eoParetoFitnessTraits, which can be replaces at will by any other - class that implements the static functions defined therein. - - Note that the domninance defines a partial order, so that - !dominates(a,b) && !domaintes(b,a) does not neccessarily imply that (a==b) - The other way around does hold. - - However, be careful that the comparison operators do define a total order - based on considering first objective, then in case of tie, second objective, etc - - NOTE: in a hurry, I did not want to make it derive from eoParetoFitness - (used cut-and-paste instead!) : I know it might be a good idea, but I'm - not sure I see why at the moment (any hint someone?) -*/ -template -class eoParetoOneConstraintFitness : public std::vector -{ -private: - // this class implements only 1 inequality constraint - // (must ponder a bit for generality without huge overload) - double constraintValue; // inequality cstr - must be negative - -public : - typedef FitnessTraits fitness_traits; - - eoParetoOneConstraintFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} - - // Ctr from a std::vector (size nObjectives+1) - eoParetoOneConstraintFitness(std::vector & _v) : - std::vector(_v) - { -#ifndef NDEBUG - if (_v.size() != fitness_traits::nObjectives()+1) - throw std::runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from std::vector"); -#endif - constraintValue = _v[fitness_traits::nObjectives()]; - resize(fitness_traits::nObjectives()); - } - - // Ctr from a std::vector and a value - eoParetoOneConstraintFitness(std::vector & _v, double _c) : - std::vector(_v), constraintValue(_c) - { -#ifndef NDEBUG - if (_v.size() != fitness_traits::nObjectives()) - throw std::runtime_error("Size error in Ctor of eoParetoOneConstraintFitness from std::vector and value"); -#endif - } - - - /** access to the traits characteristics (so you don't have to write - * a lot of typedef's around - */ - static void setUp(unsigned _n, std::vector & _b) {FitnessTraits::setUp(_n, _b);} - static bool maximizing(unsigned _i) { return FitnessTraits::maximizing(_i);} - - bool feasible() const { return constraintValue<=0;} - double violation() const { return (feasible()?0.0:constraintValue);} - double ConstraintValue() const {return constraintValue;} - void ConstraintValue(double _c) {constraintValue=_c;} - - /// Partial order based on Pareto-dominance - //bool operator<(const eoParetoFitness& _other) const - bool dominates(const eoParetoOneConstraintFitness& _other) const - { - bool dom = false; - - double tol = FitnessTraits::tol(); - const std::vector& performance = *this; - const std::vector& otherperformance = _other; - - if (feasible() && _other.feasible()) - // here both are feasible: do the "standard" domination - for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) - { - bool maxim = FitnessTraits::maximizing(i); - double aval = maxim? performance[i] : -performance[i]; - double bval = maxim? otherperformance[i] : -otherperformance[i]; - - if (fabs(aval - bval) > tol) - { - if (aval < bval) - { - return false; // cannot dominate - } - // else aval < bval - dom = true; // for the moment: goto next objective - } - //else they're equal in this objective, goto next - } - else - { // one at least is not feasible - if (feasible()) - return true; // feasible wins - else if (_other.feasible()) - return false; // feasible wins - return (violation()<_other.violation()); // smallest violation wins - } - - return dom; - } - - /// compare *not* on dominance, but on the first, then the second, etc - bool operator<(const eoParetoOneConstraintFitness& _other) const - { - double tol = FitnessTraits::tol(); - const std::vector& performance = *this; - const std::vector& otherperformance = _other; - for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) - { - bool maxim = FitnessTraits::maximizing(i); - double aval = maxim? performance[i] : -performance[i]; - double bval = maxim? otherperformance[i] : -otherperformance[i]; - - if (fabs(aval-bval) > tol) - { - if (aval < bval) - return true; - - return false; - } - } - - return false; - } - - bool operator>(const eoParetoOneConstraintFitness& _other) const - { - return _other < *this; - } - - bool operator<=(const eoParetoOneConstraintFitness& _other) const - { - return operator==(_other) || operator<(_other); - } - - bool operator>=(const eoParetoOneConstraintFitness& _other) const - { - return _other <= *this; - } - - bool operator==(const eoParetoOneConstraintFitness& _other) const - { // check if they're all within tolerance - for (unsigned i = 0; i < size(); ++i) - { - if (fabs(operator[](i) - _other[i]) > FitnessTraits::tol()) - { - return false; - } - } - return true; - } - - bool operator!=(const eoParetoOneConstraintFitness& _other) const - { return ! operator==(_other); } - -}; - -template -std::ostream& operator<<(std::ostream& os, const eoParetoOneConstraintFitness& fitness) -{ - for (unsigned i = 0; i < fitness.size(); ++i) - { - os << fitness[i] << ' '; - } - os << fitness.ConstraintValue() << " " ; - return os; -} - -template -std::istream& operator>>(std::istream& is, eoParetoOneConstraintFitness& fitness) -{ - fitness = eoParetoOneConstraintFitness(); - for (unsigned i = 0; i < fitness.size(); ++i) - { - is >> fitness[i]; - } - double r; - is >> r; - fitness.ConstraintValue(r); - return is; -} - -#endif diff --git a/eo/src/eoParetoFitness.cpp b/eo/src/eoParetoFitness.cpp deleted file mode 100644 index 6de72db7c..000000000 --- a/eo/src/eoParetoFitness.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoPareto.cpp -// (c) EEAAX,1996-GeNeura Team,1998-Maarten Keijzer,2000-Marc Schoenauer 2002 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mak@dhi.dk -*/ -//----------------------------------------------------------------------------- -#ifdef _MSC_VER -// to avoid long name warnings -#pragma warning(disable:4786) -#endif - -#include "eoParetoFitness.h" - - -// need to allocate the static variables of class eoVariableParetoTraits -unsigned eoVariableParetoTraits::nObj; -std::vector eoVariableParetoTraits::bObj; - - diff --git a/eo/src/eoParetoFitness.h b/eo/src/eoParetoFitness.h deleted file mode 100644 index 445949374..000000000 --- a/eo/src/eoParetoFitness.h +++ /dev/null @@ -1,235 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoParetoFitness.h -// (c) Maarten Keijzer and Marc Schoenauer, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: mak@dhi.dk - Marc.Schoenauer@inria.fr - */ -//----------------------------------------------------------------------------- - -#ifndef _eoParetoFitness_h -#define _eoParetoFitness_h - -#include -#include -#include -#include -#include - -/** - * eoFitnessTraits: a traits class to specify - * the number of objectives and which one are maximizing or not - * See test/t-eoParetoFitness for its use. - * - * If you define your own, make sure you make the functions static! -*/ -class eoParetoFitnessTraits -{ - public : - - static unsigned nObjectives() { return 2; } - static double tol() { return 1e-6; } - static bool maximizing(int which) { (void)which; return true; } // by default: all are maximizing -}; - -/** - * eoVariableParetoTraits : an eoParetoFitnessTraits whose characteristics - * can be set at run-time (nb objectives and min/max's) - * Why bother? For didactical purposes (and EASEA implementation :-) - */ -class eoVariableParetoTraits : public eoParetoFitnessTraits -{ -public : - /** setting the static stuff */ - static void setUp(unsigned _n, std::vector & _b) - { - // possible problems - if ( nObj && (nObj != _n) ) // was already set to a different value - { - eo::log << eo::warnings; - eo::log << "WARNING\n"; - eo::log << "WARNING : you are changing the number of objectives\n"; - eo::log << "WARNING : Make sure all existing objects are destroyed\n"; - eo::log << "WARNING\n"; - } - nObj=_n; - bObj=_b; - if (nObj != bObj.size()) - throw std::runtime_error("Number of objectives and min/max size don't match in VariableParetoTraits::setup"); - } - - /** the accessors */ - static unsigned nObjectives() - { -#ifndef NDEBUG - if (!nObj) - throw std::runtime_error("Number of objectives not assigned in VariableParetoTraits"); -#endif - return nObj; - } - static bool maximizing(unsigned _i) - { -#ifndef NDEBUG - if (_i >= bObj.size()) - throw std::runtime_error("Wrong index in VariableParetoTraits"); -#endif - return bObj[_i]; - } -private: - static unsigned nObj; - static std::vector bObj; -}; - -/** - eoParetoFitness class: std::vector of doubles with overloaded comparison operators. Comparison is done - on pareto dominance. The template argument FitnessTraits defaults to eoParetoFitnessTraits, which - can be replaces at will by any other class that implements the static functions defined therein. - - Note that the comparison defines a partial order, so that - !(a < b) && !(b -class eoParetoFitness : public std::vector -{ -public : - - typedef FitnessTraits fitness_traits; - - eoParetoFitness(void) : std::vector(FitnessTraits::nObjectives(),0.0) {} - - // Ctr from a std::vector - eoParetoFitness(std::vector & _v) : std::vector(_v) {} - - - /** access to the traits characteristics (so you don't have to write - * a lot of typedef's around - */ - static void setUp(unsigned _n, std::vector & _b) {FitnessTraits::setUp(_n, _b);} - static bool maximizing(unsigned _i) { return FitnessTraits::maximizing(_i);} - - /// Partial order based on Pareto-dominance - //bool operator<(const eoParetoFitness& _other) const - bool dominates(const eoParetoFitness& _other) const - { - bool dom = false; - - double tol = FitnessTraits::tol(); - const std::vector& performance = *this; - const std::vector& otherperformance = _other; - - for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) - { - bool maxim = FitnessTraits::maximizing(i); - double aval = maxim? performance[i] : -performance[i]; - double bval = maxim? otherperformance[i] : -otherperformance[i]; - - if (fabs(aval - bval) > tol) - { - if (aval < bval) - { - return false; // cannot dominate - } - // else aval < bval - dom = true; // for the moment: goto next objective - } - //else they're equal in this objective, goto next - } - - return dom; - } - - /// compare *not* on dominance, but on the first, then the second, etc - bool operator<(const eoParetoFitness& _other) const - { - double tol = FitnessTraits::tol(); - const std::vector& performance = *this; - const std::vector& otherperformance = _other; - for (unsigned i = 0; i < FitnessTraits::nObjectives(); ++i) - { - bool maxim = FitnessTraits::maximizing(i); - double aval = maxim? performance[i] : -performance[i]; - double bval = maxim? otherperformance[i] : -otherperformance[i]; - - if (fabs(aval-bval) > tol) - { - if (aval < bval) - return true; - - return false; - } - } - - return false; - } - - bool operator>(const eoParetoFitness& _other) const - { - return _other < *this; - } - - bool operator<=(const eoParetoFitness& _other) const - { - return operator==(_other) || operator<(_other); - } - - bool operator>=(const eoParetoFitness& _other) const - { - return _other <= *this; - } - - bool operator==(const eoParetoFitness& _other) const - { // check if they're all within tolerance - for (unsigned i = 0; i < size(); ++i) - { - if (fabs(operator[](i) - _other[i]) > FitnessTraits::tol()) - { - return false; - } - } - return true; - } - - bool operator!=(const eoParetoFitness& _other) const - { return ! operator==(_other); } - -}; - -template -std::ostream& operator<<(std::ostream& os, const eoParetoFitness& fitness) -{ - for (unsigned i = 0; i < fitness.size(); ++i) - { - os << fitness[i] << ' '; - } - return os; -} - -template -std::istream& operator>>(std::istream& is, eoParetoFitness& fitness) -{ - fitness = eoParetoFitness(); - for (unsigned i = 0; i < fitness.size(); ++i) - { - is >> fitness[i]; - } - return is; -} - -#endif diff --git a/eo/src/eoParetoRanking.h b/eo/src/eoParetoRanking.h deleted file mode 100644 index cd54ff002..000000000 --- a/eo/src/eoParetoRanking.h +++ /dev/null @@ -1,71 +0,0 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - ----------------------------------------------------------------------------- - eoParetoRanking.h - (c) Maarten Keijzer, Marc Schoenauer, 2001 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef eoParetoRanking_h -#define eoParetoRanking_h - -#include -#include - -/** - Straightforward pareto ranking. Every individual gets a rank according to the number - of elements it dominates. Note that without niching, this technique will usually not - find the whole front of non-dominated solutions, but will quite likely converge - on a single spot on the front. -*/ -template -class eoParetoRanking : public eoPerf2WorthCached -{ -public: - - using eoPerf2WorthCached::value; - - eoParetoRanking(eoDominanceMap& _dominanceMap) - : eoPerf2WorthCached(), dominanceMap(_dominanceMap) - {} - - void calculate_worths(const eoPop& _pop) - { - dominanceMap(_pop); - value() = dominanceMap.sum_dominators(); // get rank: 0 means part of current front - - // calculate maximum - double maxim = *std::max_element(value().begin(), value().end()); - - // higher is better, so invert the value - for (unsigned i = 0; i < value().size(); ++i) - { - value()[i] = maxim - value()[i]; - } - - } - - private : - - eoDominanceMap& dominanceMap; -}; - -#endif diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index d00657d84..d27520b13 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -37,7 +37,6 @@ Contact: http://eodev.sourceforge.net #include #include #include -#include #include #include @@ -131,7 +130,6 @@ public : Average fitness of a population. Fitness can be: - double - eoMinimizingFitness or eoMaximizingFitness - - eoParetoFitness: The average of each objective is evaluated. ( For eoScalarFitnessAssembled user eoAssembledFitnessStat classes.) @@ -166,24 +164,6 @@ public : private : - // Specialization for pareto fitness - template - void doit(const eoPop& _pop, eoParetoFitness) - { - value().clear(); - value().resize(_pop[0].fitness().size(), 0.0); - - for (unsigned o = 0; o < value().size(); ++o) - { - for (unsigned i = 0; i < _pop.size(); ++i) - { - value()[o] += _pop[i].fitness()[o]; - } - - value()[o] /= _pop.size(); - } - } - // Default behavior template void doit(const eoPop& _pop, T) @@ -280,25 +260,6 @@ private : bool maxim; }; - // Specialization for eoParetoFitness - template - void doit(const eoPop& _pop, eoParetoFitness) - { - typedef typename EOT::Fitness::fitness_traits traits; - - value().resize(traits::nObjectives()); - - // copy of pointers, what the heck - std::vector tmp_pop = _pop; - - for (unsigned o = 0; o < value().size(); ++o) - { - typename std::vector::iterator nth = tmp_pop.begin() + whichElement; - std::nth_element(tmp_pop.begin(), nth, tmp_pop.end(), CmpFitness(o, traits::maximizing(o))); - value()[o] = (*nth)->fitness()[o]; - } - } - // for everything else template void doit(const std::vector& _pop, T) @@ -337,7 +298,6 @@ public : Best fitness of a population. Fitness can be: - double - eoMinimizingFitness or eoMaximizingFitness - - eoParetoFitness: ( For eoScalarFitnessAssembled look at eoAssembledFitnessStat ) */ @@ -385,20 +345,6 @@ private : bool maxim; }; - // Specialization for pareto fitness - template - void doit(const eoPop& _pop, eoParetoFitness) - { - typedef typename EOT::Fitness::fitness_traits traits; - value().resize(traits::nObjectives()); - - for (unsigned o = 0; o < traits::nObjectives(); ++o) - { - typename eoPop::const_iterator it = std::max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o))); - value()[o] = it->fitness()[o]; - } - } - // default template void doit(const eoPop& _pop, T) From b7009822a5bfbbe73a735c43fb2c66f49feebd89 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 7 Nov 2010 23:43:58 +0100 Subject: [PATCH 1635/2134] fix some doxygen warnings --- eo/src/eoAlgo.h | 2 +- eo/src/eoConstrictedVariableWeightVelocity.h | 2 +- eo/src/eoConstrictedVelocity.h | 2 +- eo/src/eoFunctor.h | 2 +- eo/src/eoSelectOne.h | 2 +- eo/src/ga/eoBit.h | 1 + eo/src/ga/eoBitOp.h | 3 ++- eo/src/utils/eoIntBounds.h | 18 +++++++++--------- eo/src/utils/eoParam.h | 2 +- eo/src/utils/eoRealBounds.h | 16 ++++++++-------- 10 files changed, 26 insertions(+), 24 deletions(-) diff --git a/eo/src/eoAlgo.h b/eo/src/eoAlgo.h index 8201d5963..494b7b76c 100644 --- a/eo/src/eoAlgo.h +++ b/eo/src/eoAlgo.h @@ -35,7 +35,7 @@ problem as arguments, and iteratively modify them with the help of operators. Generally, an EO object is built by assembling together @ref Operators in an algorithm instance, - and then calling the algorithm's operator() on an initial @ref Population. The algorithm will then + and then calling the algorithm's operator() on an initial population (an eoPop). The algorithm will then manipulate the solutions within the population to search for the problem's optimum. */ diff --git a/eo/src/eoConstrictedVariableWeightVelocity.h b/eo/src/eoConstrictedVariableWeightVelocity.h index 64139ea59..fd0dc13b6 100644 --- a/eo/src/eoConstrictedVariableWeightVelocity.h +++ b/eo/src/eoConstrictedVariableWeightVelocity.h @@ -60,7 +60,7 @@ public: * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoConstrictedVariableWeightVelocity (eoTopology < POT > & _topology, diff --git a/eo/src/eoConstrictedVelocity.h b/eo/src/eoConstrictedVelocity.h index d71e29b05..bd68f0425 100644 --- a/eo/src/eoConstrictedVelocity.h +++ b/eo/src/eoConstrictedVelocity.h @@ -60,7 +60,7 @@ public: * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoConstrictedVelocity (eoTopology < POT > & _topology, diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 17cbaca56..50c136642 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -60,7 +60,7 @@ public : /// tag to identify a binary function in compile time function selection @see functor_category struct binary_function_tag {}; }; -/** @example t-eoFunctop.cpp +/** @example t-eoFunctor.cpp */ /** diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index f4cde80c2..3b27a4e3a 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -53,7 +53,7 @@ class eoSelectOne : public eoUF&, const EOT&> (void)_pop; } }; -/** @example t-eoSelectOne.cpp +/** @example t-selectOne.cpp */ diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index cf12e9e59..7f91b886e 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -71,6 +71,7 @@ public: /** * (Default) Constructor. * @param size Size of the binary std::string. + * @param value Default value. */ eoBit(unsigned size = 0, bool value = false): eoVector(size, value) {} diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index a1484ff19..21205a3d6 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -109,6 +109,7 @@ template class eoBitMutation: public eoMonOp /** * (Default) Constructor. * @param _rate Rate of mutation. + * @param _normalize use rate/chrom.size if true */ eoBitMutation(const double& _rate = 0.01, bool _normalize=false): rate(_rate), normalize(_normalize) {} @@ -289,7 +290,7 @@ template class eoUBitXover: public eoQuadOp * Uniform crossover for binary chromosomes. * @param chrom1 The first chromosome. * @param chrom2 The first chromosome. - * @std::runtime_error if sizes don't match + * std::runtime_error if sizes don't match */ bool operator()(Chrom& chrom1, Chrom& chrom2) { diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h index cd200b3d2..807751da4 100644 --- a/eo/src/utils/eoIntBounds.h +++ b/eo/src/utils/eoIntBounds.h @@ -120,21 +120,21 @@ public: } /** get minimum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual long int minimum() const = 0 ; /** get maximum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual long int maximum() const = 0 ; /** get range - * @std::exception if unbounded + * std::exception if unbounded */ virtual long int range() const = 0; /** random generator of uniform numbers in bounds * uses same naming convention than eo::rng - * @std::exception if unbounded + * std::exception if unbounded */ virtual double uniform(eoRng & _rng = eo::rng) const = 0; virtual long int random(eoRng & _rng = eo::rng) const = 0; @@ -672,25 +672,25 @@ public: virtual void truncate(double & _x) const {return repBound->truncate(_x);} /** get minimum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual long int minimum() const {return repBound->minimum();} /** get maximum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual long int maximum() const {return repBound->maximum();} /** get range - * @std::exception if unbounded + * std::exception if unbounded */ virtual long int range() const {return repBound->range();} /** random generator of uniform doubles in bounds - * @std::exception if unbounded + * std::exception if unbounded */ virtual double uniform(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->uniform();} /** random generator of uniform ints in bounds - * @std::exception if unbounded + * std::exception if unbounded */ virtual long int random(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->random();} diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 29608a18e..1eb97b306 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -155,7 +155,7 @@ public : * @param _defaultValue The default value * @param _longName Long name of the argument * @param _description Description of the parameter. What is useful for. - * @param _shortName Short name of the argument (Optional) + * @param _shortHand Short name of the argument (Optional) * @param _required If it is a necessary parameter or not */ eoValueParam(ValueType _defaultValue, diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index c8761978a..f79aac044 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -117,20 +117,20 @@ public: virtual void truncate(double &) const = 0; /** get minimum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual double minimum() const = 0 ; /** get maximum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual double maximum() const = 0 ; /** get range - * @std::exception if unbounded + * std::exception if unbounded */ virtual double range() const = 0; /** random generator of uniform numbers in bounds - * @std::exception if unbounded + * std::exception if unbounded */ virtual double uniform(eoRng & _rng = eo::rng) const = 0; @@ -634,20 +634,20 @@ public: virtual void truncate(double & _x) const {return repBound->truncate(_x);} /** get minimum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual double minimum() const {return repBound->minimum();} /** get maximum value - * @std::exception if does not exist + * std::exception if does not exist */ virtual double maximum() const {return repBound->maximum();} /** get range - * @std::exception if unbounded + * std::exception if unbounded */ virtual double range() const {return repBound->range();} /** random generator of uniform numbers in bounds - * @std::exception if unbounded + * std::exception if unbounded */ virtual double uniform(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->uniform();} From 706a631abd4dc905fbf1abf18adc88fcdea5a592 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 8 Nov 2010 18:27:19 +0100 Subject: [PATCH 1636/2134] deactivate gpsymreg that uses the now unsuported multi-objective feature --- eo/app/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/app/CMakeLists.txt b/eo/app/CMakeLists.txt index 55116b43d..b57cce223 100644 --- a/eo/app/CMakeLists.txt +++ b/eo/app/CMakeLists.txt @@ -3,6 +3,6 @@ ###################################################################################### ADD_SUBDIRECTORY(gprop) -ADD_SUBDIRECTORY(gpsymreg) +#ADD_SUBDIRECTORY(gpsymreg) ADD_SUBDIRECTORY(mastermind) ###################################################################################### From f4351c0c1118f7e5a35f10d0656091c05ae7d5b0 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 8 Nov 2010 18:27:58 +0100 Subject: [PATCH 1637/2134] check for self assignement in copy operator of eoDualFitness --- eo/src/eoDualFitness.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 0ab99413f..3fb9c0a37 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -104,14 +104,6 @@ public: return _is_feasible; } - //! Copy operator - eoDualFitness& operator=(const eoDualFitness& other) - { - _value = other._value; - _is_feasible = other._is_feasible; - return *this; - } - //! Copy operator from a std::pair eoDualFitness& operator=(const std::pair& v) { @@ -119,6 +111,18 @@ public: _is_feasible = v.second; return *this; } + + //! Copy operator from another eoDualFitness + template + eoDualFitness & operator=(const eoDualFitness& other ) + { + if (this != &other) { + this->_value = other._value; + this->_is_feasible = other._is_feasible; + } + return *this; + } + //! Comparison that separate feasible individuals from unfeasible ones. Feasible are always better /*! @@ -155,6 +159,7 @@ public: //! Greater or equal: if the other is not greater than me bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + public: //! Add a given fitness to the current one From cf5533c1b288ceb94caacc13eee3f7952369ae88 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 8 Nov 2010 18:29:25 +0100 Subject: [PATCH 1638/2134] new eoAerageSizeStat class --- eo/NEWS | 1 + eo/src/utils/eoStat.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/eo/NEWS b/eo/NEWS index 359668933..50e256087 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -15,6 +15,7 @@ - dual fitness class to handle feasibility of individual with guarantee that feasible fitness will always be better than unfeasible one - feasible fitness ratio stat - interquartile range stat + - average size of individuals stat - uniform(min,max) random function - compatibility macros for compiling paradiseo with CUDACC - removed old multi-objective classes, deprecated by the Paradiseo-MOEO project diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index d27520b13..b4e8c4592 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -423,6 +423,7 @@ public : }; */ + //! A robust measure of dispersion (also called midspread or middle fifty) that is the difference between the third and the first quartile. template class eoInterquartileRangeStat : public eoStat< EOT, typename EOT::Fitness > @@ -449,6 +450,41 @@ public: virtual std::string className(void) const { return "eoInterquartileRangeStat"; } }; + +/** Compute the average size of indivudals over the population + * + * Obviously, will work only on representations that implement the (standard) "size()" method, + * like any STL container. + */ +template +class eoAverageSizeStat : public eoStat< EOT, double> +{ +public: + + using eoStat::value; + + eoAverageSizeStat( std::string description = "Av.Size" ) : + eoStat( 0.0, description ) {} // 0 by default + + virtual void operator()( const eoPop & pop ) + { + size_t pop_size = pop.size(); + + std::vector sizes; + sizes.reserve(pop_size); + + for( unsigned int i=0, s = pop_size; i(sum) / static_cast(pop_size); + } + + virtual std::string className(void) const { return "eoAverageSizeStat"; } +}; + /** @} */ #endif From 22224ad793315136253f9e2d22aec3cb0e34dd77 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 8 Nov 2010 22:58:37 +0100 Subject: [PATCH 1639/2134] default log output to debug for the ostream monitor ; better documentation --- eo/src/utils/eoOStreamMonitor.cpp | 4 ++-- eo/src/utils/eoOStreamMonitor.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoOStreamMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp index f47096d01..3a29dd685 100644 --- a/eo/src/utils/eoOStreamMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -25,7 +25,7 @@ eoMonitor& eoOStreamMonitor::operator()(void) if (firsttime) { - eo::log << eo::progress << "First Generation" << std::endl; + eo::log << eo::debug << "First Generation" << std::endl; for (iterator it = vec.begin (); it != vec.end (); ++it) { out << (*it)->longName (); @@ -52,7 +52,7 @@ eoMonitor& eoOStreamMonitor::operator()(void) } // for it in vec out << std::endl; - eo::log << eo::progress << "End of Generation" << std::endl; + eo::log << eo::debug << "End of Generation" << std::endl; return *this; } diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 70d85bf7d..8f44677cb 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -36,7 +36,9 @@ Authors: #include /** - Prints statistics to stdout + Prints statistics to a given ostream. + + You can pass any instance of an ostream to the constructor, like, for example, std::clog. @ingroup Monitors */ From faaf13194f5f0851a1ee2189a09522e55d9e33d6 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 9 Nov 2010 11:44:28 +0100 Subject: [PATCH 1640/2134] fix most of the doxygen warnings --- eo/src/eoContinue.h | 6 ++++++ eo/src/eoFixedInertiaWeightedVelocity.h | 2 +- eo/src/eoGenContinue.h | 6 ++++++ eo/src/eoInit.h | 2 +- eo/src/eoInitializer.h | 2 ++ eo/src/eoInt.h | 1 + eo/src/eoIntegerVelocity.h | 3 ++- eo/src/eoLinearTopology.h | 2 +- eo/src/eoOneToOneBreeder.h | 1 - eo/src/eoOpSelMason.h | 2 +- eo/src/eoOrderXover.h | 2 ++ eo/src/eoParticleFullInitializer.h | 2 ++ eo/src/eoPop.h | 4 ++-- eo/src/eoPrintable.h | 2 +- eo/src/eoReduceMerge.h | 7 ++++--- eo/src/eoRingTopology.h | 2 -- eo/src/eoSGATransform.h | 4 ++-- eo/src/eoSecondsElapsedContinue.h | 6 ++++++ eo/src/eoSharingSelect.h | 3 ++- eo/src/eoShiftMutation.h | 2 +- eo/src/eoSimpleEDA.h | 4 ++-- eo/src/eoStandardVelocity.h | 2 +- eo/src/eoStarTopology.h | 2 -- eo/src/eoTruncatedSelectOne.h | 4 ++-- eo/src/eoTwoOptMutation.h | 2 +- eo/src/es/eoEsChromInit.h | 2 +- eo/src/es/eoEsGlobalXover.h | 2 +- eo/src/es/eoEsMutationInit.h | 4 ++-- eo/src/es/eoNormalMutation.h | 4 ++-- eo/src/es/eoReal.h | 1 + eo/src/es/eoRealOp.h | 16 ++++++++-------- eo/src/es/eoSBXcross.h | 2 +- eo/src/gp/eoParseTreeDepthInit.h | 2 +- eo/src/gp/eoParseTreeOp.h | 2 +- eo/src/gp/eoStParseTreeDepthInit.h | 5 +++-- eo/src/gp/eoStParseTreeOp.h | 2 +- eo/src/utils/eoFileMonitor.h | 1 + eo/src/utils/eoGnuplot.h | 2 +- eo/src/utils/eoHowMany.h | 2 +- eo/src/utils/eoParser.h | 10 ++++++++-- eo/src/utils/eoRealVectorBounds.h | 2 +- eo/src/utils/eoTimeCounter.h | 2 +- 42 files changed, 84 insertions(+), 52 deletions(-) diff --git a/eo/src/eoContinue.h b/eo/src/eoContinue.h index c49e8c952..983215129 100644 --- a/eo/src/eoContinue.h +++ b/eo/src/eoContinue.h @@ -50,11 +50,17 @@ class eoContinue : public eoUF&, bool>, public eoPersistent public: virtual std::string className(void) const { return "eoContinue"; } + /** Read from a stream + * @param __is istream to read from + */ void readFrom (std :: istream & __is) { (void)__is; /* It should be implemented by subclasses ! */ } + /** Print on a stream + * @param __os ostream to print on + */ void printOn (std :: ostream & __os) const { (void)__os; /* It should be implemented by subclasses ! */ diff --git a/eo/src/eoFixedInertiaWeightedVelocity.h b/eo/src/eoFixedInertiaWeightedVelocity.h index 26848a59e..b19d36a9c 100644 --- a/eo/src/eoFixedInertiaWeightedVelocity.h +++ b/eo/src/eoFixedInertiaWeightedVelocity.h @@ -58,7 +58,7 @@ public: * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoFixedInertiaWeightedVelocity (eoTopology < POT > & _topology, diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 4dbdd206c..053824147 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -86,11 +86,17 @@ public: virtual std::string className(void) const { return "eoGenContinue"; } + /** Read from a stream + * @param __is the istream to read from + */ void readFrom (std :: istream & __is) { __is >> thisGeneration; /* Loading the number of generations counted */ } + /** Print on a stream + * @param __os the ostream to print on + */ void printOn (std :: ostream & __os) const { __os << thisGeneration << std :: endl; /* Saving the number of generations counted */ diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index bfa616c22..c751b4a21 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -191,7 +191,7 @@ class eoInitPermutation: public eoInit eoInitAdaptor changes the place in the hierarchy from eoInit to eoMonOp. This is mainly a type conversion, nothing else - . + @see eoInit, eoMonOp */ template diff --git a/eo/src/eoInitializer.h b/eo/src/eoInitializer.h index d31908943..26cb61de4 100644 --- a/eo/src/eoInitializer.h +++ b/eo/src/eoInitializer.h @@ -66,6 +66,7 @@ public: //! @param _proc Evaluation function //! @param _initVelo Initialization of the velocity //! @param _initBest Initialization of the best + //! @param _topology the topology to use //! @param _pop Population eoInitializer( eoUF& _proc, @@ -80,6 +81,7 @@ public: //! @param _proc Evaluation function //! @param _initVelo Initialization of the velocity //! @param _initBest Initialization of the best + //! @param _topology the topology to use //! @param _pop Population eoInitializer( eoPopEvalFunc & _proc, diff --git a/eo/src/eoInt.h b/eo/src/eoInt.h index d3eb496cc..bc16728db 100644 --- a/eo/src/eoInt.h +++ b/eo/src/eoInt.h @@ -43,6 +43,7 @@ template class eoInt: public eoVector /** * (Default) Constructor. * @param size Size of the std::vector + * @param value fill the vector with this value */ eoInt(unsigned size = 0, int value = 0): eoVector(size, value) {} diff --git a/eo/src/eoIntegerVelocity.h b/eo/src/eoIntegerVelocity.h index 1802dab5b..190db1b01 100644 --- a/eo/src/eoIntegerVelocity.h +++ b/eo/src/eoIntegerVelocity.h @@ -60,7 +60,7 @@ public: * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoIntegerVelocity (eoTopology < POT > & _topology, @@ -104,6 +104,7 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology the topology to use * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType diff --git a/eo/src/eoLinearTopology.h b/eo/src/eoLinearTopology.h index 99457b674..b7c724167 100644 --- a/eo/src/eoLinearTopology.h +++ b/eo/src/eoLinearTopology.h @@ -48,7 +48,7 @@ public: /** * Build the topology made of _neighborhoodSize neighborhoods. - * @param _neighborhoods - The size of each neighborhood. + * @param _neighborhoodSize - The size of each neighborhood. */ eoLinearTopology (unsigned _neighborhoodSize):neighborhoodSize (_neighborhoodSize),isSetup(false){} diff --git a/eo/src/eoOneToOneBreeder.h b/eo/src/eoOneToOneBreeder.h index 4036377ce..2e593333f 100644 --- a/eo/src/eoOneToOneBreeder.h +++ b/eo/src/eoOneToOneBreeder.h @@ -55,7 +55,6 @@ class eoOneToOneBreeder: public eoBreed /** Ctor: * @param _op a general operator (must MODIFY only ONE parent) * @param _eval an eoEvalFunc to evaluate the offspring - * @param _select a selectoOne, to be used for all selections [sequential] * @param _pReplace probability that the best of parent/offspring wins [1] * @param _howMany eoHowMany offpsring to generate [100%] */ diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 02f927771..791b26077 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -59,7 +59,7 @@ public: Stores all operators built in a database (#allocMap#), so that somebody can destroy them later. The Mason is in charge or destroying the operators, since the built object can´t do it itself. The objects built must be destroyed - from outside, using the #destroy# method + from outside, using the "destroy" method */ virtual eoOpSelector* make(std::istream& _is) { diff --git a/eo/src/eoOrderXover.h b/eo/src/eoOrderXover.h index 234d4311c..0c98990dd 100644 --- a/eo/src/eoOrderXover.h +++ b/eo/src/eoOrderXover.h @@ -58,6 +58,8 @@ template class eoOrderXover: public eoQuadOp * @param _chrom2 The second parent chromosome. * @param _child The result chromosome. * @param _direction The direction of the OrderXover (left: -1 or right: 1) + * @param _cut1 index of the first cut + * @param _cut2 index of the second cut */ void cross(Chrom& _chrom1, Chrom& _chrom2, Chrom& _child, char _direction, unsigned _cut1, unsigned _cut2){ diff --git a/eo/src/eoParticleFullInitializer.h b/eo/src/eoParticleFullInitializer.h index 8ec414dfe..5a03bd6ff 100644 --- a/eo/src/eoParticleFullInitializer.h +++ b/eo/src/eoParticleFullInitializer.h @@ -66,6 +66,7 @@ template class eoParticleInitializer : public eoInitializerBase & _proc, @@ -80,6 +81,7 @@ template class eoParticleInitializer : public eoInitializerBase & _proc, diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 7eb726c56..5c63fb404 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -87,10 +87,10 @@ public: } }; - /** appstd::ends random guys at end of pop. + /** appends random guys at end of pop. Can be used to initialize it pop is empty - @param _popSize total population size + @param _newPopSize total population size @param _chromInit Initialization routine, produces EO's, needs to be an eoInit */ void append( unsigned _newPopSize, eoInit& _chromInit ) diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index 4326f09ad..9d4190473 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -38,7 +38,7 @@ some objects (for instance, a #eoFactory# or a random number generator. /** Base class for objects that can print themselves (#printOn#). Besides, this file defines the standard output for all the objects; -if the objects define printOn there's no need to define #operator <<#. +if the objects define printOn there's no need to define "operator<<". @ingroup Core */ diff --git a/eo/src/eoReduceMerge.h b/eo/src/eoReduceMerge.h index 03e025ac6..2e6530185 100644 --- a/eo/src/eoReduceMerge.h +++ b/eo/src/eoReduceMerge.h @@ -48,10 +48,11 @@ eoReduceMerge: Replacement strategies that start by reducing the parents, This is the way to do SSGA: the offspring gets inserted in the population even if it is worse than anybody else. -@classes: eoReduceMerge, eoSSGAWorseReplacement, - eoSSGADetTournamentReplacement, eoSSGAStochTournamentReplacement +@see eoReduceMerge +@see eoSSGAWorseReplacement +@see eoSSGADetTournamentReplacement +@see eoSSGAStochTournamentReplacement */ - template class eoReduceMerge : public eoReplacement { diff --git a/eo/src/eoRingTopology.h b/eo/src/eoRingTopology.h index 8d74a83a1..74705ac1e 100644 --- a/eo/src/eoRingTopology.h +++ b/eo/src/eoRingTopology.h @@ -142,8 +142,6 @@ public: /** * Print the structure of the topology on the standard output. - * @param - * @return */ void printOn() { diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 3707862f8..57d5ea81b 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -59,7 +59,7 @@ template class eoSGATransform : public eoTransform /** * Transforms a population. - * @param pop The population to be transformed. + * @param _pop The population to be transformed. */ void operator()(eoPop& _pop) { @@ -124,7 +124,7 @@ template class eoDynSGATransform : public eoTransform /** * Transforms a population. - * @param pop The population to be transformed. + * @param _pop The population to be transformed. */ void operator()(eoPop& _pop) { diff --git a/eo/src/eoSecondsElapsedContinue.h b/eo/src/eoSecondsElapsedContinue.h index 4a9d677f2..ec1486d16 100644 --- a/eo/src/eoSecondsElapsedContinue.h +++ b/eo/src/eoSecondsElapsedContinue.h @@ -53,11 +53,17 @@ public: virtual std::string className(void) const { return "eoSecondsElapsedContinue"; } + /** REad from a stream + * @param __is the ostream to read from + */ void readFrom (std :: istream & __is) { __is >> start >> seconds; } + /** Print on a stream + * @param __os the ostream to print on + */ void printOn (std :: ostream & __os) const { __os << start << ' ' << seconds << std :: endl; diff --git a/eo/src/eoSharingSelect.h b/eo/src/eoSharingSelect.h index 75daa0ae8..d9b56568a 100644 --- a/eo/src/eoSharingSelect.h +++ b/eo/src/eoSharingSelect.h @@ -45,7 +45,8 @@ class eoSharingSelect: public eoRouletteWorthSelect { public: /** Ctor: - * @param _s the sigma_share + * @param _sigma the sigma_share + * @param _dist the distance object to use */ eoSharingSelect(double _sigma, eoDistance & _dist): eoRouletteWorthSelect(sharing), sharing(_sigma, _dist) {} diff --git a/eo/src/eoShiftMutation.h b/eo/src/eoShiftMutation.h index cacb9b3d0..d1a132686 100644 --- a/eo/src/eoShiftMutation.h +++ b/eo/src/eoShiftMutation.h @@ -53,7 +53,7 @@ template class eoShiftMutation: public eoMonOp /** * Shift two components of the given eoosome. - * @param eo The cromosome which is going to be changed. + * @param _eo The cromosome which is going to be changed. */ bool operator()(EOT& _eo) { diff --git a/eo/src/eoSimpleEDA.h b/eo/src/eoSimpleEDA.h index ce9d80ada..c2a75672e 100644 --- a/eo/src/eoSimpleEDA.h +++ b/eo/src/eoSimpleEDA.h @@ -49,8 +49,8 @@ template class eoSimpleEDA: public eoEDA { public: - /** Ctor from an eoDistribUpdater - * ... plus an eoEval and eoContinue of course + /** Ctor from an eoDistribUpdater, + * plus an eoEval and eoContinue of course. */ eoSimpleEDA(eoDistribUpdater& _update, eoEvalFunc& _eval, diff --git a/eo/src/eoStandardVelocity.h b/eo/src/eoStandardVelocity.h index a66f13d80..e2b6deb1a 100644 --- a/eo/src/eoStandardVelocity.h +++ b/eo/src/eoStandardVelocity.h @@ -60,7 +60,7 @@ public: * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? - * @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoStandardVelocity (eoTopology < POT > & _topology, diff --git a/eo/src/eoStarTopology.h b/eo/src/eoStarTopology.h index ed6ec8ec2..d491800cd 100644 --- a/eo/src/eoStarTopology.h +++ b/eo/src/eoStarTopology.h @@ -122,8 +122,6 @@ public: /** * Print the structure of the topology on the standard output. - * @param - * @return */ void printOn() { diff --git a/eo/src/eoTruncatedSelectOne.h b/eo/src/eoTruncatedSelectOne.h index b515cf493..c0fed2031 100644 --- a/eo/src/eoTruncatedSelectOne.h +++ b/eo/src/eoTruncatedSelectOne.h @@ -93,8 +93,8 @@ public: /** The implementation selects an individual from the fertile pop - @param _source the source population - @param _dest the selected guy + @param _pop the source population + @return the selected guy */ const EOT& operator()(const eoPop& _pop) { diff --git a/eo/src/eoTwoOptMutation.h b/eo/src/eoTwoOptMutation.h index 49b199a0e..054f223ea 100644 --- a/eo/src/eoTwoOptMutation.h +++ b/eo/src/eoTwoOptMutation.h @@ -49,7 +49,7 @@ public: /** * - * @param eo The cromosome which is going to be changed. + * @param _eo The cromosome which is going to be changed. */ bool operator()(EOT& _eo) { // generate two different indices diff --git a/eo/src/es/eoEsChromInit.h b/eo/src/es/eoEsChromInit.h index 28976a0a7..c5382890b 100644 --- a/eo/src/es/eoEsChromInit.h +++ b/eo/src/es/eoEsChromInit.h @@ -107,7 +107,7 @@ public: Specify individual initial sigmas for each variable. @param _bounds bounds for uniform initialization - @param _sigma initial value for the stddev + @param _vecSigma initial value for the stddev */ eoEsChromInit(eoRealVectorBounds& _bounds, const std::vector& _vecSigma) : eoRealInitBounded(_bounds), uniqueSigma(_vecSigma[0]), vecSigma(_vecSigma) diff --git a/eo/src/es/eoEsGlobalXover.h b/eo/src/es/eoEsGlobalXover.h index 8261dd618..bac4ae27c 100644 --- a/eo/src/es/eoEsGlobalXover.h +++ b/eo/src/es/eoEsGlobalXover.h @@ -65,7 +65,7 @@ public: * modifies one parents in the populator * using 2 new parents for each component! * - * @param _pop a POPULATOR (not a simple population) + * @param _plop a POPULATOR (not a simple population) */ void apply(eoPopulator& _plop) { diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index 0d4db55e2..6ee74c2a7 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -52,7 +52,7 @@ public : /** Constructor @param _parser Parser to read parameters from. - @param _section Parser section for \tau-parameters. + @param _section Parser section for \f$\tau\f$-parameters. */ eoEsMutationInit(eoParser& _parser, std::string _section="ES mutation parameters" ) : @@ -62,7 +62,7 @@ public : /** Virtual destructor */ virtual ~eoEsMutationInit() {} - /** local \tau */ + /** local tau */ double TauLcl(void) { if (TauLclParam == 0) diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index b547bece9..174472440 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -192,11 +192,11 @@ public: /** * (Default) Constructor. * - * @param eval the evaluation function, needed to recompute the fitmess + * @param _eval the evaluation function, needed to recompute the fitmess * @param _sigmaInit the initial value for uniform mutation * @param _windowSize the size of the window for statistics - * @param _threshold the threshold (the 1/5 - 0.2) * @param _updateFactor multiplicative update factor for sigma + * @param _threshold the threshold (the 1/5 - 0.2) */ eoOneFifthMutation(eoEvalFunc & _eval, double & _sigmaInit, unsigned _windowSize = 10, double _updateFactor=0.83, diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index 8c079c5fc..925d4a3a7 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -43,6 +43,7 @@ template class eoReal: public eoVector /** * (Default) Constructor. * @param size Size of the std::vector + * @param value fill the vector with this value */ eoReal(unsigned size = 0, double value = 0.0): eoVector(size, value) {} diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 891633839..ab4d47e06 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -153,7 +153,7 @@ template class eoDetUniformMutation: public eoMonOp * it's there mostly for backward compatibility * * @param _epsilon the range for uniform nutation - * @param number of coordinate to modify + * @param _no number of coordinate to modify */ eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): homogeneous(true), bounds(eoDummyVectorNoBounds), @@ -163,7 +163,7 @@ template class eoDetUniformMutation: public eoMonOp * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds * @param _epsilon the range for uniform nutation (to be scaled if necessary) - * @param number of coordinate to modify + * @param _no number of coordinate to modify */ eoDetUniformMutation(eoRealVectorBounds & _bounds, const double& _epsilon, const unsigned& _no = 1): @@ -180,7 +180,7 @@ template class eoDetUniformMutation: public eoMonOp * Constructor with bounds and full std::vector of epsilon * @param _bounds an eoRealVectorBounds that contains the bounds * @param _epsilon the VECTOR of ranges for uniform mutation - * @param number of coordinate to modify + * @param _no number of coordinates to modify */ eoDetUniformMutation(eoRealVectorBounds & _bounds, const std::vector& _epsilon, @@ -257,7 +257,7 @@ template class eoSegmentCrossover: public eoQuadOp * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alpha the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive @@ -268,7 +268,7 @@ template class eoSegmentCrossover: public eoQuadOp /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alpha the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive @@ -348,7 +348,7 @@ template class eoHypercubeCrossover: public eoQuadOp * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alpha the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive @@ -363,7 +363,7 @@ template class eoHypercubeCrossover: public eoQuadOp /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _alpha the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive @@ -483,7 +483,7 @@ template class eoRealUXover: public eoQuadOp * Uniform crossover for real std::vectors * @param _eo1 The first parent * @param _eo2 The second parent - * @std::runtime_error if sizes don't match + * @exception std::runtime_error if sizes don't match */ bool operator()(EOT& _eo1, EOT& _eo2) { diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h index 5498edaf4..e80e6c789 100644 --- a/eo/src/es/eoSBXcross.h +++ b/eo/src/es/eoSBXcross.h @@ -54,7 +54,7 @@ template class eoSBXCrossover: public eoQuadOp /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _alphaMin the amount of exploration OUTSIDE the parents + * @param _eta the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index 2f41c2fb9..687c83f2f 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -61,7 +61,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > /** * Constructor - * @parm _max_depth The maximum depth of a tree + * @param _max_depth The maximum depth of a tree * @param _initializor A std::vector containing the possible nodes * @param _grow False results in a full tree, True result is a randomly grown tree * @param _ramped_half_and_half True results in Ramped Half and Half Initialization diff --git a/eo/src/gp/eoParseTreeOp.h b/eo/src/gp/eoParseTreeOp.h index 1cc91a733..58824eea9 100644 --- a/eo/src/gp/eoParseTreeOp.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -338,9 +338,9 @@ class eoHoistMutation: public eoMonOp< eoParseTree > public: typedef eoParseTree EoType; + /** * Constructor - * @param none */ eoHoistMutation() : eoMonOp() diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index feb17be94..43c4c2a2f 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -69,8 +69,9 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > /** * Constructor - * @parm _max_depth The maximum depth of a tree - * @param _initializor A std::vector containing the possible nodes + * @param _max_depth The maximum depth of a tree + * @param _node A std::vector containing the possible nodes + * @param _return_type (JD_2010-11-09: don't know the use of this parameter, maybe to force implicit template instanciation?) * @param _grow False results in a full tree, True result is a randomly grown tree */ eoStParseTreeDepthInit( diff --git a/eo/src/gp/eoStParseTreeOp.h b/eo/src/gp/eoStParseTreeOp.h index 860e1a7c8..eb0d10230 100644 --- a/eo/src/gp/eoStParseTreeOp.h +++ b/eo/src/gp/eoStParseTreeOp.h @@ -203,7 +203,7 @@ public: /** * Constructor - * @param _initializor The std::vector of Nodes given to the eoGpDepthInitializer + * @param _node The std::vector of Nodes given to the eoGpDepthInitializer */ eoStPointMutation( std::vector& _node) : eoMonOp() diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 9a4a0f1e5..b89fd1e6d 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -55,6 +55,7 @@ public : * @param _delim delimiter string to use between each item of the registered vector (e.g. of eoStats) * @param _keep_existing if true, overwrite any existing file with the same name prior to any output * @param _header print the header (with the descriptions of registered eoStats) at the beginning of the file (WARNING: true will discards header printing) + * @param _overwrite if true, overwrite the existing file */ eoFileMonitor( std::string _filename, diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 37e6419b7..783d44ccb 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -44,7 +44,7 @@ public: /** Open pipe to Gnuplot. @param _title Title for gnuplot window. - @param _extra Extra parameters to gnuplot (default ). + @param _extra Extra parameters to gnuplot (default to none: ""). */ eoGnuplot(std::string _title, std::string _extra = std::string("")); diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 947a0013e..2f02216ed 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -77,7 +77,7 @@ class eoHowMany : public eoPersistent { public: /** Original Ctor from direct rate + bool - @param rate the rate, OR the integer to store, depending on 2nd arg. + @param _rate the rate, OR the integer to store, depending on 2nd arg. @param _interpret_as_rate to tell whether the rate actually is a rate */ eoHowMany(double _rate = 0.0, bool _interpret_as_rate = true): diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 1c3415043..bb8e5811a 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -64,7 +64,7 @@ public : * @param _defaultValue The default value * @param _longName Long name of the argument * @param _description Description of the parameter. What is useful for. - * @param _shortName Short name of the argument (Optional) + * @param _shortHand Short name of the argument (Optional) * @param _section Name of the section where the parameter belongs * @param _required If it is a necessary parameter or not */ @@ -128,8 +128,14 @@ public: */ void processParam(eoParam& param, std::string section = ""); + /** Read from a stream + * @param is the input stream + */ void readFrom(std::istream& is); + /** Pint on a stream + * @param os the output stream + */ void printOn(std::ostream& os) const; /// className for readibility @@ -207,7 +213,7 @@ public: @param _defaultValue Default value. @param _longName Long name of the argument. @param _description Description of the parameter. - @param _shortName Short name of the argument (Optional) + @param _shortHand Short name of the argument (Optional) @param _section Name of the section where the parameter belongs. @param _required Is the parameter mandatory? @return Corresponding parameter. diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index c5e26b07c..5e3a460f8 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -305,7 +305,7 @@ public: /** * Read object from a std::string - * @param _is A std::istream. + * @param _s A std::istream. */ virtual void readFrom(std::string _s) ; diff --git a/eo/src/utils/eoTimeCounter.h b/eo/src/utils/eoTimeCounter.h index 27a103da4..5774844b7 100644 --- a/eo/src/utils/eoTimeCounter.h +++ b/eo/src/utils/eoTimeCounter.h @@ -35,7 +35,7 @@ An eoStat that simply gives the user time since first generation It has to be tempatized by EOT because it must be an eoStat - @group Stats + @ingroup Stats */ class eoTimeCounter : public eoUpdater, public eoValueParam { From e5397f69a64698671d553aad21a0c68a42b837cd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 10 Nov 2010 11:18:57 +0100 Subject: [PATCH 1641/2134] there was a warning from compiler related to a comment syntax in eoInvalidateOps.h --- eo/src/eoInvalidateOps.h | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h index aa5a18532..ecc470abd 100644 --- a/eo/src/eoInvalidateOps.h +++ b/eo/src/eoInvalidateOps.h @@ -31,7 +31,6 @@ /** @addtogroup Utilities -/** One of the invalidator operators. Use this one as a 'hat' on an operator that is defined to work on a generic datatype. This functor will then check the return type of the operator and invalidate the fitness of the individual. From a22e642b091656cd0f0c3270c4a968f5461aa360 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 14 Nov 2010 15:07:50 +0100 Subject: [PATCH 1642/2134] a test binary for eoInterquartileRangeStat --- eo/test/CMakeLists.txt | 4 +-- eo/test/t-eoIQRStat.cpp | 69 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 eo/test/t-eoIQRStat.cpp diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 2c0772def..4f194681e 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -25,8 +25,6 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ###################################################################################### SET (TEST_LIST - t-eoParetoFitness - t-eoPareto t-eofitness t-eoRandom t-eobin @@ -65,8 +63,8 @@ SET (TEST_LIST t-eoSyncEasyPSO t-eoOrderXover t-eoExtendedVelocity - # t-eoFrontSorter t-eoLogger + t-eoIQRStat ) diff --git a/eo/test/t-eoIQRStat.cpp b/eo/test/t-eoIQRStat.cpp new file mode 100644 index 000000000..60bcff8fe --- /dev/null +++ b/eo/test/t-eoIQRStat.cpp @@ -0,0 +1,69 @@ + +#include +#include +#include + +#include "real_value.h" + +typedef eoReal realVec; + +double test( eoPop& pop, double target_value ) +{ + eoEvalFuncPtr&> eval( real_value ); + + eoPopLoopEval pop_eval(eval); + + pop_eval(pop,pop); + + eoInterquartileRangeStat iqr_stat(0.0, "IQR"); + + iqr_stat( pop ); + + std::cout << iqr_stat.longName() << "=" << iqr_stat.value() << " should be " << target_value << std::endl; + + return iqr_stat.value(); +} + +int main() +{ + eoPop pop; + + // fixed test + realVec sol1(2,-1); + realVec sol2(2,-1); + realVec sol3(2,1); + realVec sol4(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + // on the sphere function everyone has the same fitness of 1 + if( test(pop, 0) != 0 ) { + exit(1); + } + + pop.erase(pop.begin(),pop.end()); + + // fixed test + sol1 = realVec(2,0); + sol2 = realVec(2,0); + sol3 = realVec(2,1); + sol4 = realVec(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + if( test(pop, 1) != 1 ) { + exit(1); + } + + // test on a random normal distribution + eoNormalGenerator normal(1,rng); + eoInitFixedLength init_N(2, normal); + pop = eoPop( 1000000, init_N ); + double iqr = test(pop, 1.09); + if( iqr < 1.08 || iqr > 1.11 ) { + exit(1); + } +} + From 4e36150ee8d4d176849d84efe65cc434880945b6 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 14 Nov 2010 15:11:46 +0100 Subject: [PATCH 1643/2134] eoInterquartileRangeStat example link to t-eoIQRStat --- eo/src/utils/eoStat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index b4e8c4592..e308b8a9d 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -449,7 +449,8 @@ public: virtual std::string className(void) const { return "eoInterquartileRangeStat"; } }; - +/** @example t-eoIQRStat.cpp + */ /** Compute the average size of indivudals over the population * From 04f12b770e3c7889adebea3bef6dbba1b59fe3c1 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 14 Nov 2010 15:24:35 +0100 Subject: [PATCH 1644/2134] supress some doxygen warnings about \classes --- eo/src/eoFunctor.h | 2 +- eo/src/eoMergeReduce.h | 6 +++--- eo/src/eoReplacement.h | 6 +++--- eo/src/eoSurviveAndDie.h | 5 +++-- eo/src/utils/eoUniformInit.h | 9 ++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 50c136642..e782328a3 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -29,7 +29,7 @@ #include -/** @ddtogroup Core +/** @addtogroup Core * @{ */ diff --git a/eo/src/eoMergeReduce.h b/eo/src/eoMergeReduce.h index b4c717528..8524f1d81 100644 --- a/eo/src/eoMergeReduce.h +++ b/eo/src/eoMergeReduce.h @@ -37,9 +37,9 @@ /** Replacement strategies that combine en eoMerge and an eoReduce. -@classes: eoMergeReduce, the base (pure abstract) class - eoPlusReplacement the ES plus strategy - eoCommaReplacement the ES comma strategy +@class eoMergeReduce, the base (pure abstract) class +@class eoPlusReplacement the ES plus strategy +@class eoCommaReplacement the ES comma strategy */ /** diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index 972aa61a4..2c2d89844 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -57,9 +57,9 @@ MS 12/12/2000 @see eoMerge, eoReduce, eoMergeReduce, eoReduceMerge -@classes eoReplacement, base (pure abstract) class - eoGenerationalReplacement, as it says ... - eoWeakElitistReplacement a wrapper to add elitism +@class eoReplacement, base (pure abstract) class +@class eoGenerationalReplacement, as it says ... +@class eoWeakElitistReplacement a wrapper to add elitism */ diff --git a/eo/src/eoSurviveAndDie.h b/eo/src/eoSurviveAndDie.h index 81e2e310c..3650a5365 100644 --- a/eo/src/eoSurviveAndDie.h +++ b/eo/src/eoSurviveAndDie.h @@ -42,8 +42,9 @@ kills the ones that are to die, puts the ones that are to survive into the second argument removes them from the first pop argument -@classes: eoSurviveAndDie, eoDeterministicSurviveAndDie, - eoDeterministicSaDReplacement +@class eoSurviveAndDie +@class eoDeterministicSurviveAndDie, +@class eoDeterministicSaDReplacement */ /** @addtogroup Replacors diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h index 005b7f7ec..fa1b874dc 100644 --- a/eo/src/utils/eoUniformInit.h +++ b/eo/src/utils/eoUniformInit.h @@ -29,11 +29,10 @@ * eoRndGenerators, we might as well have these directly written without * overhead -@classes: - eoUniformInit uniform initialization for doubles, floats, ints, ... - eoBooleanInit biased init for booleans - eoNormalInit normal intialization for doubles and floats - eoNegExpInit negative exponential distributions " +@class eoUniformInit uniform initialization for doubles, floats, ints, ... +@class eoBooleanInit biased init for booleans +@class eoNormalInit normal intialization for doubles and floats +@class eoNegExpInit negative exponential distributions " */ #ifndef eoUniformInit_h From 327d9363af883d42885068a2420f166e65f1604d Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 15 Nov 2010 09:12:10 +0100 Subject: [PATCH 1645/2134] @todo: add an init method for continuators? --- eo/src/eoGenContinue.h | 5 ++++- eo/src/eoSteadyFitContinue.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 053824147..fac89d5dc 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -71,7 +71,10 @@ public: } /** Sets the number of generations to reach - and sets the current generation to 0 (the begin)*/ + and sets the current generation to 0 (the begin) + + @todo replace this by an "init" method + */ virtual void totalGenerations( unsigned long _tg ) { repTotalGenerations = _tg; thisGeneration = 0; diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index 2422ec1fc..7e5c8e21f 100644 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -83,7 +83,10 @@ public: } /** Sets the parameters (minimum nb of gen. + steady nb of gen.) - and sets the current generation to 0 (the begin)*/ + and sets the current generation to 0 (the begin) + + @todo replace thi by an init method ? + */ virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) { repMinGenerations = _mg; repSteadyGenerations = _sg; From fb8a8d79fddc5a1036f4cb851944b648c50003fa Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 15 Nov 2010 09:13:39 +0100 Subject: [PATCH 1646/2134] verify that pop is not empty before attempting to compute the IQR --- eo/src/utils/eoStat.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index b4e8c4592..b7b912785 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -38,7 +38,7 @@ Contact: http://eodev.sourceforge.net #include #include #include -#include +//#include /** @defgroup Stats Statistics computation * @@ -435,16 +435,21 @@ public: virtual void operator()( const eoPop & _pop ) { - eoPop pop = _pop; + if( _pop.size() == 0 ) { + // how to implement value() = 0 ? - unsigned int quartile = pop.size()/4; - std::nth_element( pop.begin(), pop.begin()+quartile*1, pop.end() ); - typename EOT::Fitness Q1 = pop[quartile].fitness(); - - std::nth_element( pop.begin(), pop.begin()+quartile*3, pop.end() ); - typename EOT::Fitness Q3 = pop[quartile*3].fitness(); + } else { + eoPop pop = _pop; - value() = Q1 - Q3; + unsigned int quartile = pop.size()/4; + std::nth_element( pop.begin(), pop.begin()+quartile*1, pop.end() ); + typename EOT::Fitness Q1 = pop[quartile].fitness(); + + std::nth_element( pop.begin(), pop.begin()+quartile*3, pop.end() ); + typename EOT::Fitness Q3 = pop[quartile*3].fitness(); + + value() = Q1 - Q3; + } } virtual std::string className(void) const { return "eoInterquartileRangeStat"; } From 3d4d73a622f7a10b690bfc726daa2cd92fbc3249 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 15 Nov 2010 09:30:37 +0100 Subject: [PATCH 1647/2134] eoDualStatSwitch, a wrapper for computing stats on feasible and unfeasible individuals, separately --- eo/src/eoDualFitness.h | 68 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 3fb9c0a37..a758be051 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -29,6 +29,10 @@ Authors: #include #include #include // for std::pair +#include + +#include +#include /** @addtogroup Evaluation * @{ @@ -63,7 +67,7 @@ Authors: template class eoDualFitness { -private: +protected: //! Scalar type of the fitness (generally a double) BaseType _value; @@ -241,6 +245,68 @@ typedef eoDualFitness > eoMinimizingDualFitness; template< class EOT> bool eoIsFeasible ( const EOT & sol ) { return sol.fitness().is_feasible(); } + +/** Embed two eoStat and call the first one on the feasible individuals and + * the second one on the unfeasible ones, merge the two resulting value in + * a string, separated by a given marker. + */ +//template +template +class eoDualStatSwitch : public eoStat< EOT, std::string > +{ +public: + using eoStat::value; + +// eoDualStatSwitch( eoStat & stat_feasible, eoStat & stat_unfeasible, std::string sep=" " ) : + eoDualStatSwitch( EOSTAT & stat_feasible, EOSTAT & stat_unfeasible, std::string sep=" " ) : + _stat_feasible(stat_feasible), + _stat_unfeasible(stat_unfeasible), + _sep(sep), + eoStat( + "?"+sep+"?", + stat_feasible.longName()+sep+stat_unfeasible.longName() + ) + { } + + virtual void operator()( const eoPop & pop ) + { + eoPop pop_feasible; + pop_feasible.reserve(pop.size()); + + eoPop pop_unfeasible; + pop_unfeasible.reserve(pop.size()); + + for( typename eoPop::const_iterator ieot=pop.begin(), iend=pop.end(); ieot!=iend; ++ieot ) { + /* + if( ieot->invalid() ) { + eo::log << eo::errors << "ERROR: trying to access to an invalid fitness" << std::endl; + } + */ + if( ieot->fitness().is_feasible() ) { + pop_feasible.push_back( *ieot ); + } else { + pop_unfeasible.push_back( *ieot ); + } + } + + _stat_feasible( pop_feasible ); + _stat_unfeasible( pop_unfeasible ); + + std::ostringstream out; + out << _stat_feasible.value() << _sep << _stat_unfeasible.value(); + + value() = out.str(); + } + +protected: +// eoStat & _stat_feasible; +// eoStat & _stat_unfeasible; + EOSTAT & _stat_feasible; + EOSTAT & _stat_unfeasible; + + std::string _sep; +}; + /** @} */ #endif // _eoDualFitness_h_ From 8ecef39168b9e1979c1d8c58bd7b20b46e79c062 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 17 Nov 2010 11:41:43 +0100 Subject: [PATCH 1648/2134] fixed unistd.h portability issue --- eo/src/utils/eoLogger.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index a0aa36e51..a729d0cf3 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -26,7 +26,12 @@ Authors: */ +#ifdef _INTERIX +#include +#else // _INTERIX #include +#endif // ! _INTERIX + #include #include #include // used to define EOF From 979a1863784c53eed4ba4288e83c80832f89d3a2 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 17 Nov 2010 11:47:49 +0100 Subject: [PATCH 1649/2134] unit test for eoParser added --- eo/test/t-eoParser.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 eo/test/t-eoParser.cpp diff --git a/eo/test/t-eoParser.cpp b/eo/test/t-eoParser.cpp new file mode 100644 index 000000000..1fd6c7fdb --- /dev/null +++ b/eo/test/t-eoParser.cpp @@ -0,0 +1,31 @@ +#include +#include + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + unsigned int alpha1 = parser.createParam(10, "alpha1", "Alpha parameter").value(); + unsigned int alpha2 = parser.createParam(10, "alpha2", "Alpha parameter").value(); + unsigned int alpha3 = parser.createParam(10, "alpha3", "Alpha parameter").value(); + unsigned int alpha4 = parser.createParam(10, "alpha4", "Alpha parameter").value(); + unsigned int alpha5 = parser.createParam(10, "alpha5", "Alpha parameter").value(); + unsigned int alpha6 = parser.createParam(10, "alpha6", "Alpha parameter").value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_help(parser); + + std::cout << "alpha1: " << alpha1 << std::endl; + std::cout << "alpha2: " << alpha2 << std::endl; + std::cout << "alpha3: " << alpha3 << std::endl; + std::cout << "alpha4: " << alpha4 << std::endl; + std::cout << "alpha5: " << alpha5 << std::endl; + std::cout << "alpha6: " << alpha6 << std::endl; + + return 0; +} From ad1ec3669de3a0657d5a49e274b42ad18cf457be Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 17 Nov 2010 14:43:18 +0100 Subject: [PATCH 1650/2134] functor operator applying to population in parallel --- eo/CMakeLists.txt | 6 ++++++ eo/doc/index.h | 4 ++-- eo/src/apply.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index eea4df299..07becc2ba 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -44,6 +44,12 @@ ENABLE_LANGUAGE(C) ### 2) Include required modules / configuration files ##################################################################################### +FIND_PACKAGE(OpenMP REQUIRED) +IF(OPENMP_FOUND) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_C_FLAGS}") +ENDIF() + INCLUDE(CMakeBackwardCompatibilityCXX) INCLUDE(FindDoxygen) diff --git a/eo/doc/index.h b/eo/doc/index.h index 7d7921fe0..2fad16e2f 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -51,9 +51,9 @@ with a member like: operator()(eoPop). Once called on a given population, i search for the optimum of a given problem. Generally, operators are instanciated once and then binded in an algorithm by reference. -Thus, you can easily build you own algorithm by trying several combination of operators. +Thus, you can easily build your own algorithm by trying several combination of operators. -For an more detailled introduction to the design of %EO you can look at the +For a more detailled introduction to the design of %EO you can look at the slides from a talk at EA 2001 or at the corresponding article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th European Conference on Artificial Evolution: - http://portal.acm.org/citation.cfm?id=727742 diff --git a/eo/src/apply.h b/eo/src/apply.h index 0eb3484e5..049983fe4 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -37,8 +37,10 @@ template void apply(eoUF& _proc, std::vector& _pop) { +#pragma omp parallel for default(none) shared(_proc, _pop) for (unsigned i = 0; i < _pop.size(); ++i) { +#pragma omp critical _proc(_pop[i]); } } From ebaf81ae8d6a5cd944cbd6630369e62b3a4609d4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 17 Nov 2010 17:27:55 +0100 Subject: [PATCH 1651/2134] added a apply.h variant for parallel execution --- eo/src/apply.h | 2 -- eo/src/omp_apply.h | 51 +++++++++++++++++++++++++++++++++++ eo/test/CMakeLists.txt | 1 + eo/test/t-openmp.cpp | 61 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 eo/src/omp_apply.h create mode 100644 eo/test/t-openmp.cpp diff --git a/eo/src/apply.h b/eo/src/apply.h index 049983fe4..0eb3484e5 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -37,10 +37,8 @@ template void apply(eoUF& _proc, std::vector& _pop) { -#pragma omp parallel for default(none) shared(_proc, _pop) for (unsigned i = 0; i < _pop.size(); ++i) { -#pragma omp critical _proc(_pop[i]); } } diff --git a/eo/src/omp_apply.h b/eo/src/omp_apply.h new file mode 100644 index 000000000..bbdc4065b --- /dev/null +++ b/eo/src/omp_apply.h @@ -0,0 +1,51 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoApply.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _omp_apply_h +#define _omp_apply_h + +#include +#include + +/** + Applies a unary function to a std::vector of things. + + This is a variant of apply which is called in parallel + thanks to OpenMP. + + @ingroup Utilities +*/ +template +void omp_apply(eoUF& _proc, std::vector& _pop) +{ +#pragma omp parallel for default(none) shared(_proc, _pop) + for (unsigned i = 0; i < _pop.size(); ++i) + { + //#pragma omp critical + _proc(_pop[i]); + } +} + +#endif diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 4f194681e..fe28b21f5 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -65,6 +65,7 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat + t-openmp ) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp new file mode 100644 index 000000000..d098ac35f --- /dev/null +++ b/eo/test/t-openmp.cpp @@ -0,0 +1,61 @@ +//----------------------------------------------------------------------------- +// t-openmp.cpp +//----------------------------------------------------------------------------- + +#include +#include + +#include +#include + +#include +#include + +#include + +#include "real_value.h" + +//----------------------------------------------------------------------------- + +typedef eoReal< eoMinimizingFitness > EOT; + +//----------------------------------------------------------------------------- + +int main(int ac, char** av) +{ + eoParserLogger parser(ac, av); + eoState state; + + eoRealInitBounded& init = make_genotype( parser, state, EOT() ); + eoPop< EOT >& pop = make_pop( parser, state, init ); + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); + eoEvalFuncCounter eval( mainEval ); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_help(parser); + make_verbose(parser); + + double ts1 = omp_get_wtime(); + apply< EOT >( eval, pop ); + //sleep(1); + double ts2 = omp_get_wtime(); + + eoPop< EOT >& pop2 = make_pop( parser, state, init ); + + double tp1 = omp_get_wtime(); + omp_apply< EOT >( eval, pop2 ); + //sleep(1); + double tp2 = omp_get_wtime(); + + eo::log << "Ts = " << ts2 - ts1 << std::endl; + eo::log << "Tp = " << tp2 - tp1 << std::endl; + + return 0; +} + +//----------------------------------------------------------------------------- From fe231cd7013dc087ab27710062b986e954f851ac Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 18 Nov 2010 10:47:29 +0100 Subject: [PATCH 1652/2134] forgot to add t-eoParser in test/CMakeLists.txt --- eo/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 4f194681e..7dd931c60 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -65,6 +65,7 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat + t-eoParser ) From 52b527409481092a95bca84551cce56f8fd591c9 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 18 Nov 2010 10:49:24 +0100 Subject: [PATCH 1653/2134] added some new scripts to specialize building and a build script for visual studio 2008 --- eo/build_gcc_linux_tutorial | 7 +++++++ eo/build_gcc_linux_unittest | 7 +++++++ eo/build_vs2008_release.bat | 5 +++++ eo/tutorial/CMakeLists.txt | 16 ++++++++++------ 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100755 eo/build_gcc_linux_tutorial create mode 100755 eo/build_gcc_linux_unittest create mode 100644 eo/build_vs2008_release.bat diff --git a/eo/build_gcc_linux_tutorial b/eo/build_gcc_linux_tutorial new file mode 100755 index 000000000..f4168fd30 --- /dev/null +++ b/eo/build_gcc_linux_tutorial @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir release +cd release +cmake -DENABLE_EO_TUTORIAL=1 .. +make +cd .. diff --git a/eo/build_gcc_linux_unittest b/eo/build_gcc_linux_unittest new file mode 100755 index 000000000..36220ba00 --- /dev/null +++ b/eo/build_gcc_linux_unittest @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir debug +cd debug +cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CMAKE_TESTING=1 .. +make +cd .. diff --git a/eo/build_vs2008_release.bat b/eo/build_vs2008_release.bat new file mode 100644 index 000000000..13513c147 --- /dev/null +++ b/eo/build_vs2008_release.bat @@ -0,0 +1,5 @@ +mkdir release +cd release +cmake -G "Visual Studio 9 2008" .. +cd .. +pause diff --git a/eo/tutorial/CMakeLists.txt b/eo/tutorial/CMakeLists.txt index 4573f0b4d..6462b5a58 100644 --- a/eo/tutorial/CMakeLists.txt +++ b/eo/tutorial/CMakeLists.txt @@ -2,11 +2,15 @@ ### 1) Where must cmake go now ? ###################################################################################### -ADD_SUBDIRECTORY(Lesson1) -ADD_SUBDIRECTORY(Lesson2) -ADD_SUBDIRECTORY(Lesson3) -ADD_SUBDIRECTORY(Lesson4) -ADD_SUBDIRECTORY(Lesson5) -ADD_SUBDIRECTORY(Lesson6) +IF(ENABLE_EO_TUTORIAL) + + ADD_SUBDIRECTORY(Lesson1) + ADD_SUBDIRECTORY(Lesson2) + ADD_SUBDIRECTORY(Lesson3) + ADD_SUBDIRECTORY(Lesson4) + ADD_SUBDIRECTORY(Lesson5) + ADD_SUBDIRECTORY(Lesson6) + +ENDIF() ###################################################################################### From 790153f6aa9cbb0381941f352ecc3c8f845abbde Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 19 Nov 2010 11:48:42 +0100 Subject: [PATCH 1654/2134] openmp test updated --- eo/test/t-openmp.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index d098ac35f..0e5f72388 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -28,6 +28,7 @@ int main(int ac, char** av) eoRealInitBounded& init = make_genotype( parser, state, EOT() ); eoPop< EOT >& pop = make_pop( parser, state, init ); + eoPop< EOT >& pop2 = make_pop( parser, state, init ); eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); eoEvalFuncCounter eval( mainEval ); @@ -45,8 +46,6 @@ int main(int ac, char** av) //sleep(1); double ts2 = omp_get_wtime(); - eoPop< EOT >& pop2 = make_pop( parser, state, init ); - double tp1 = omp_get_wtime(); omp_apply< EOT >( eval, pop2 ); //sleep(1); From ea0bd040c1c4eaff99e5ae1ccf48a607420472e2 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 19 Nov 2010 11:50:51 +0100 Subject: [PATCH 1655/2134] changed pkg-config file creation process --- eo/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index eea4df299..7217df60d 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -57,7 +57,7 @@ INCLUDE(ConfigureChecks.cmake) INCLUDE(Dart OPTIONNAL) # now create config headers -configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) +CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) # Set a special flag if the environment is windows (should do the same in a config.g file) IF (WIN32) @@ -113,7 +113,11 @@ ADD_SUBDIRECTORY(tutorial) ### 6) Install pkg-config config file for EO ###################################################################################### -INSTALL(FILES eo.pc DESTINATION lib/pkgconfig COMPONENT headers) +SET(PCPREFIX "/usr") +SET(PCFLAGS "-leoutils -leo -les -lga -lcma -lgcov") +SET(PCINCLUDEDIR "eo") +CONFIGURE_FILE(pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/eo.pc) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/eo.pc DESTINATION lib/pkgconfig COMPONENT headers) ###################################################################################### From 651ba9f89911045aa02cc08b3f3e89695a04411e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 19 Nov 2010 11:54:45 +0100 Subject: [PATCH 1656/2134] new pkg-config file --- eo/eo.pc | 12 ------------ eo/pc.cmake | 6 ++++++ eo/src/do/make_pop.h | 8 ++++---- 3 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 eo/eo.pc create mode 100644 eo/pc.cmake diff --git a/eo/eo.pc b/eo/eo.pc deleted file mode 100644 index d15d1081b..000000000 --- a/eo/eo.pc +++ /dev/null @@ -1,12 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include/eo - -Name: Evolving Object -Description: Evolving Object -Version: 1.02-cvs1 -Libs: -L${libdir} -leoutils -leo -les -lga -lcma -leomoo -lgcov -Cflags: -I${includedir} diff --git a/eo/pc.cmake b/eo/pc.cmake new file mode 100644 index 000000000..ad3c17ef2 --- /dev/null +++ b/eo/pc.cmake @@ -0,0 +1,6 @@ +# Package Information for pkg-config +Name: @PACKAGE_NAME@ +Description: @PACKAGE_NAME@ +Version: @PROJECT_VERSION@ +Libs: -L@PCPREFIX@/lib @PCFLAGS@ +Cflags: -I@PCPREFIX@/include/@PCINCLUDEDIR@ diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 76242cab1..191ab0652 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -57,17 +57,17 @@ template eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _init) { // random seed - eoValueParam& seedParam = _parser.createParam(uint32_t(0), "seed", "Random number seed", 'S'); + eoValueParam& seedParam = _parser.getORcreateParam(uint32_t(0), "seed", "Random number seed", 'S'); if (seedParam.value() == 0) seedParam.value() = time(0); - eoValueParam& popSize = _parser.createParam(unsigned(20), "popSize", "Population Size", 'P', "Evolution Engine"); + eoValueParam& popSize = _parser.getORcreateParam(unsigned(20), "popSize", "Population Size", 'P', "Evolution Engine"); // Either load or initialize // create an empty pop and let the state handle the memory eoPop& pop = _state.takeOwnership(eoPop()); - eoValueParam& loadNameParam = _parser.createParam(std::string(""), "Load","A save file to restart from",'L', "Persistence" ); - eoValueParam & recomputeFitnessParam = _parser.createParam(false, "recomputeFitness", "Recompute the fitness after re-loading the pop.?", 'r', "Persistence" ); + eoValueParam& loadNameParam = _parser.getORcreateParam(std::string(""), "Load","A save file to restart from",'L', "Persistence" ); + eoValueParam & recomputeFitnessParam = _parser.getORcreateParam(false, "recomputeFitness", "Recompute the fitness after re-loading the pop.?", 'r', "Persistence" ); if (loadNameParam.value() != "") // something to load { From 6912ea41b62eb188663de0f1be98596229030222 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 19 Nov 2010 21:02:35 +0100 Subject: [PATCH 1657/2134] added a method to get the value of a dual fitness --- eo/src/eoDualFitness.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index a758be051..337520575 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -108,6 +108,11 @@ public: return _is_feasible; } + inline BaseType value() const + { + return _value; + } + //! Copy operator from a std::pair eoDualFitness& operator=(const std::pair& v) { From e8a083f47590cc3cdc0d144ef83d9fd6b4e786c1 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 19 Nov 2010 21:03:07 +0100 Subject: [PATCH 1658/2134] add t-eoDualFitness to CMake --- eo/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 4f194681e..9bf42f167 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -65,6 +65,7 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat + t-eoDualFitness ) From dab81d17c8c661d253bce52615f079b10f115a9c Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 19 Nov 2010 21:08:18 +0100 Subject: [PATCH 1659/2134] test binary for dual fitness --- eo/test/t-eoDualFitness.cpp | 90 +++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 eo/test/t-eoDualFitness.cpp diff --git a/eo/test/t-eoDualFitness.cpp b/eo/test/t-eoDualFitness.cpp new file mode 100644 index 000000000..90b35ed7e --- /dev/null +++ b/eo/test/t-eoDualFitness.cpp @@ -0,0 +1,90 @@ + +#include + +#include +#include +#include + +typedef eoVector,double> DualVector; + +template +class DualSphere : public eoEvalFunc +{ +public: + virtual void operator()( EOT & x ) + { + if( x.invalid() ) { return; } + + double sum = 0; + int sign = 1; + for( unsigned int i=0, s=x.size(); i0 ? true : false ) ); + } +}; + + +double test( eoPop& pop, double target_value ) +{ + DualSphere eval; + + eoPopLoopEval pop_eval(eval); + + pop_eval(pop,pop); + + eoInterquartileRangeStat iqr_stat( std::make_pair(0.0,false), "IQR" ); + + iqr_stat( pop ); + + std::cout << iqr_stat.longName() << "=" << iqr_stat.value() << " should be " << target_value << std::endl; + + return iqr_stat.value().value(); +} + + +int main() +{ + eoPop pop; + + // fixed test + DualVector sol1(2,-1); + DualVector sol2(2,-1); + DualVector sol3(2,1); + DualVector sol4(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + // on the sphere function everyone has the same fitness of 1 + if( test(pop, 0) != 0 ) { + exit(1); + } + + pop.erase(pop.begin(),pop.end()); + + // fixed test + sol1 = DualVector(2,0); + sol2 = DualVector(2,0); + sol3 = DualVector(2,1); + sol4 = DualVector(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + if( test(pop, 1) != 1 ) { + exit(1); + } + + // test on a random normal distribution + eoNormalGenerator normal(1,rng); + eoInitFixedLength init_N(2, normal); + pop = eoPop( 1000000, init_N ); + double iqr = test(pop, 1.09); + if( iqr < 1.08 || iqr > 1.11 ) { + exit(1); + } +} + From 6625cd247bb2015dbffd58af59a9224d90e6dc5c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 20 Nov 2010 01:01:45 +0100 Subject: [PATCH 1660/2134] openmp testing up-to-date --- eo/test/CMakeLists.txt | 12 ++++++ eo/test/boxplot.py | 10 +++++ eo/test/t-openmp.cpp | 89 ++++++++++++++++++++++++++++++++++-------- 3 files changed, 95 insertions(+), 16 deletions(-) create mode 100755 eo/test/boxplot.py diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index fe28b21f5..8d7956bab 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -93,6 +93,18 @@ ELSEIF(ENABLE_CMAKE_TESTING) INSTALL(TARGETS ${test} RUNTIME DESTINATION share/eo/test COMPONENT test) ENDFOREACH (test) + SET(RESOURCES + boxplot.py + ) + + FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${CMAKE_CURRENT_BINARY_DIR}/${file} + ) + ENDFOREACH(file) + ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) ###################################################################################### diff --git a/eo/test/boxplot.py b/eo/test/boxplot.py new file mode 100755 index 000000000..0590e4e97 --- /dev/null +++ b/eo/test/boxplot.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +from pylab import * +import sys + +DEFAULT_RESULTS_NAME = 'results.txt' + +if __name__ == '__main__': + boxplot( [ [ float(value) for value in line.split() ] for line in open( DEFAULT_RESULTS_NAME if len(sys.argv) < 2 else sys.argv[1] ).readlines() ] ) + show() diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 0e5f72388..4ccc54ad6 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -2,6 +2,10 @@ // t-openmp.cpp //----------------------------------------------------------------------------- +#include +#include +#include + #include #include @@ -24,13 +28,21 @@ typedef eoReal< eoMinimizingFitness > EOT; int main(int ac, char** av) { eoParserLogger parser(ac, av); - eoState state; - eoRealInitBounded& init = make_genotype( parser, state, EOT() ); - eoPop< EOT >& pop = make_pop( parser, state, init ); - eoPop< EOT >& pop2 = make_pop( parser, state, init ); - eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); - eoEvalFuncCounter eval( mainEval ); + unsigned int popMin = parser.getORcreateParam((unsigned int)1, "popMin", "Population Min", 'p', "Evolution Engine").value(); + unsigned int popMax = parser.getORcreateParam((unsigned int)100, "popMax", "Population Max", 'P', "Evolution Engine").value(); + + unsigned int dimMin = parser.getORcreateParam((unsigned int)1, "dimMin", "Dimension Min", 'd', "Evolution Engine").value(); + unsigned int dimMax = parser.getORcreateParam((unsigned int)100, "dimMax", "Dimension Max", 'D', "Evolution Engine").value(); + + unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); + + std::string resultsFileName = parser.getORcreateParam(std::string("results.txt"), "resultsFileName", "Results file name", 0, "Evolution Engine").value(); + + double threshold = parser.getORcreateParam((double)3.0, "threshold", "Threshold of max speedup", 0, "Evolution Engine").value(); + + uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); + if (seedParam == 0) { seedParam = time(0); } if (parser.userNeedsHelp()) { @@ -41,18 +53,63 @@ int main(int ac, char** av) make_help(parser); make_verbose(parser); - double ts1 = omp_get_wtime(); - apply< EOT >( eval, pop ); - //sleep(1); - double ts2 = omp_get_wtime(); + rng.reseed( seedParam ); - double tp1 = omp_get_wtime(); - omp_apply< EOT >( eval, pop2 ); - //sleep(1); - double tp2 = omp_get_wtime(); + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); + eoEvalFuncCounter eval( mainEval ); - eo::log << "Ts = " << ts2 - ts1 << std::endl; - eo::log << "Tp = " << tp2 - tp1 << std::endl; + eoUniformGenerator< double > gen(-5, 5); + + std::ostringstream ss; + ss << resultsFileName << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-t" << threshold << "-s" << seedParam; + std::ofstream resultsFile( ss.str().c_str() ); + + for ( size_t p = popMin; p <= popMax; ++p ) + { + for ( size_t d = dimMin; d <= dimMax; ++d ) + { + eo::log << eo::logging << p << 'x' << d << std::endl; + + for ( size_t r = 0; r < nRun; ++r ) + { + eoInitFixedLength< EOT > init( d, gen ); + + double Ts; + double Tp; + + // sequential scope + { + eoPop< EOT > pop( p, init ); + double t1 = omp_get_wtime(); + apply< EOT >(eval, pop); + double t2 = omp_get_wtime(); + Ts = t2 - t1; + } + + // parallel scope + { + eoPop< EOT > pop( p, init ); + double t1 = omp_get_wtime(); + omp_apply< EOT >(eval, pop); + double t2 = omp_get_wtime(); + Tp = t2 - t1; + } + + if ( ( Ts / Tp ) > threshold ) { continue; } + + resultsFile << Ts / Tp << ' '; + + eo::log << eo::debug; + eo::log << "Ts = " << Ts << std::endl; + eo::log << "Tp = " << Tp << std::endl; + eo::log << "S_p = " << Ts / Tp << std::endl; + } // end of runs + + resultsFile << std::endl; + + } // end of dimension + + } // end of population return 0; } From eb9937ee0c668d515ce88512cd146dcf5d079062 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 20 Nov 2010 01:57:30 +0100 Subject: [PATCH 1661/2134] added stepping parameters --- eo/test/boxplot.py | 3 ++- eo/test/t-openmp.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/test/boxplot.py b/eo/test/boxplot.py index 0590e4e97..581fef0c3 100755 --- a/eo/test/boxplot.py +++ b/eo/test/boxplot.py @@ -7,4 +7,5 @@ DEFAULT_RESULTS_NAME = 'results.txt' if __name__ == '__main__': boxplot( [ [ float(value) for value in line.split() ] for line in open( DEFAULT_RESULTS_NAME if len(sys.argv) < 2 else sys.argv[1] ).readlines() ] ) - show() + #show() + savefig( sys.argv[1] + ".png" ) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 4ccc54ad6..89082b8d8 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -30,9 +30,11 @@ int main(int ac, char** av) eoParserLogger parser(ac, av); unsigned int popMin = parser.getORcreateParam((unsigned int)1, "popMin", "Population Min", 'p', "Evolution Engine").value(); + unsigned int popStep = parser.getORcreateParam((unsigned int)1, "popStep", "Population Step", 0, "Evolution Engine").value(); unsigned int popMax = parser.getORcreateParam((unsigned int)100, "popMax", "Population Max", 'P', "Evolution Engine").value(); unsigned int dimMin = parser.getORcreateParam((unsigned int)1, "dimMin", "Dimension Min", 'd', "Evolution Engine").value(); + unsigned int dimStep = parser.getORcreateParam((unsigned int)1, "dimStep", "Dimension Step", 0, "Evolution Engine").value(); unsigned int dimMax = parser.getORcreateParam((unsigned int)100, "dimMax", "Dimension Max", 'D', "Evolution Engine").value(); unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); @@ -64,9 +66,9 @@ int main(int ac, char** av) ss << resultsFileName << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-t" << threshold << "-s" << seedParam; std::ofstream resultsFile( ss.str().c_str() ); - for ( size_t p = popMin; p <= popMax; ++p ) + for ( size_t p = popMin; p <= popMax; p += popStep ) { - for ( size_t d = dimMin; d <= dimMax; ++d ) + for ( size_t d = dimMin; d <= dimMax; d += dimStep ) { eo::log << eo::logging << p << 'x' << d << std::endl; From cb8e6ab1c3eee099f073f719dc59d45220e5dafa Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 14:07:47 +0100 Subject: [PATCH 1662/2134] added efficienty computation --- eo/test/boxplot.py | 15 +++++++++------ eo/test/t-openmp.cpp | 27 ++++++++++++++++++++------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/eo/test/boxplot.py b/eo/test/boxplot.py index 581fef0c3..2b5141af6 100755 --- a/eo/test/boxplot.py +++ b/eo/test/boxplot.py @@ -1,11 +1,14 @@ #!/usr/bin/env python -from pylab import * +import pylab import sys -DEFAULT_RESULTS_NAME = 'results.txt' - if __name__ == '__main__': - boxplot( [ [ float(value) for value in line.split() ] for line in open( DEFAULT_RESULTS_NAME if len(sys.argv) < 2 else sys.argv[1] ).readlines() ] ) - #show() - savefig( sys.argv[1] + ".png" ) + if len(sys.argv) < 3: + print 'Usage: boxplot.py [Results files, ...] [output file in .png]' + sys.exit() + + for i in range(1, len(sys.argv) - 1): + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + pylab.savefig( sys.argv[ len(sys.argv) - 1 ] ) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 89082b8d8..c4b885702 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -39,10 +39,11 @@ int main(int ac, char** av) unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); - std::string resultsFileName = parser.getORcreateParam(std::string("results.txt"), "resultsFileName", "Results file name", 0, "Evolution Engine").value(); - double threshold = parser.getORcreateParam((double)3.0, "threshold", "Threshold of max speedup", 0, "Evolution Engine").value(); + std::string speedupFileName = parser.getORcreateParam(std::string("speedup"), "speedupFileName", "Speedup file name", 0, "Results").value(); + std::string efficiencyFileName = parser.getORcreateParam(std::string("efficiency"), "efficiencyFileName", "Efficiency file name", 0, "Results").value(); + uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); if (seedParam == 0) { seedParam = time(0); } @@ -62,9 +63,18 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); - std::ostringstream ss; - ss << resultsFileName << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-t" << threshold << "-s" << seedParam; - std::ofstream resultsFile( ss.str().c_str() ); + std::ostringstream params; + params << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-t" << threshold << "-s" << seedParam; + std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); + std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); + + size_t nbtask = 1; +#pragma omp parallel + { + nbtask = omp_get_num_threads(); + } + + eo::log << eo::logging << "Nb task: " << nbtask << std::endl; for ( size_t p = popMin; p <= popMax; p += popStep ) { @@ -99,15 +109,18 @@ int main(int ac, char** av) if ( ( Ts / Tp ) > threshold ) { continue; } - resultsFile << Ts / Tp << ' '; + speedupFile << Ts / Tp << ' '; + efficiencyFile << Ts / ( nbtask * Tp ); eo::log << eo::debug; eo::log << "Ts = " << Ts << std::endl; eo::log << "Tp = " << Tp << std::endl; eo::log << "S_p = " << Ts / Tp << std::endl; + eo::log << "E_p = " << Ts / ( nbtask * Tp ) << std::endl; } // end of runs - resultsFile << std::endl; + speedupFile << std::endl; + efficiencyFile << std::endl; } // end of dimension From 78b4da4c319754fe4c9447168ec1621646adc1a4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 14:47:55 +0100 Subject: [PATCH 1663/2134] remove threshold parameter and move from static schedule to dynamic --- eo/src/omp_apply.h | 2 +- eo/test/t-openmp.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/eo/src/omp_apply.h b/eo/src/omp_apply.h index bbdc4065b..b899b5e1a 100644 --- a/eo/src/omp_apply.h +++ b/eo/src/omp_apply.h @@ -40,7 +40,7 @@ template void omp_apply(eoUF& _proc, std::vector& _pop) { -#pragma omp parallel for default(none) shared(_proc, _pop) +#pragma omp parallel for default(none) shared(_proc, _pop) schedule(dynamic) for (unsigned i = 0; i < _pop.size(); ++i) { //#pragma omp critical diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index c4b885702..7cf7ac8e8 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -39,8 +39,6 @@ int main(int ac, char** av) unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); - double threshold = parser.getORcreateParam((double)3.0, "threshold", "Threshold of max speedup", 0, "Evolution Engine").value(); - std::string speedupFileName = parser.getORcreateParam(std::string("speedup"), "speedupFileName", "Speedup file name", 0, "Results").value(); std::string efficiencyFileName = parser.getORcreateParam(std::string("efficiency"), "efficiencyFileName", "Efficiency file name", 0, "Results").value(); @@ -64,7 +62,7 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); std::ostringstream params; - params << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-t" << threshold << "-s" << seedParam; + params << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); @@ -107,10 +105,10 @@ int main(int ac, char** av) Tp = t2 - t1; } - if ( ( Ts / Tp ) > threshold ) { continue; } + if ( ( Ts / Tp ) > nbtask ) { continue; } speedupFile << Ts / Tp << ' '; - efficiencyFile << Ts / ( nbtask * Tp ); + efficiencyFile << Ts / ( nbtask * Tp ) << ' '; eo::log << eo::debug; eo::log << "Ts = " << Ts << std::endl; From c9843c3cfadb45654d9c4940ecd996b2a3b1c9ed Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 17:33:11 +0100 Subject: [PATCH 1664/2134] removed omp_apply.h and added to apply.h, added dynamicity computation --- eo/src/apply.h | 31 +++++++++++++++++++++++++++ eo/src/omp_apply.h | 51 -------------------------------------------- eo/test/t-openmp.cpp | 32 ++++++++++++++++++++++----- 3 files changed, 58 insertions(+), 56 deletions(-) delete mode 100644 eo/src/omp_apply.h diff --git a/eo/src/apply.h b/eo/src/apply.h index 0eb3484e5..2cd977b08 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -43,4 +43,35 @@ void apply(eoUF& _proc, std::vector& _pop) } } +/** + This is a variant of apply which is called in parallel + thanks to OpenMP. + + @ingroup Utilities +*/ +template +void omp_apply(eoUF& _proc, std::vector& _pop) +{ +#pragma omp parallel for default(none) shared(_proc, _pop) + for (unsigned i = 0; i < _pop.size(); ++i) + { + _proc(_pop[i]); + } +} + +/** + And now we are using the dynamic scheduling. + + @ingroup Utilities +*/ +template +void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) +{ +#pragma omp parallel for default(none) shared(_proc, _pop) schedule(dynamic) + for (unsigned i = 0; i < _pop.size(); ++i) + { + _proc(_pop[i]); + } +} + #endif diff --git a/eo/src/omp_apply.h b/eo/src/omp_apply.h deleted file mode 100644 index b899b5e1a..000000000 --- a/eo/src/omp_apply.h +++ /dev/null @@ -1,51 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// eoApply.h -// (c) Maarten Keijzer 2000 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - mak@dhi.dk - */ -//----------------------------------------------------------------------------- - -#ifndef _omp_apply_h -#define _omp_apply_h - -#include -#include - -/** - Applies a unary function to a std::vector of things. - - This is a variant of apply which is called in parallel - thanks to OpenMP. - - @ingroup Utilities -*/ -template -void omp_apply(eoUF& _proc, std::vector& _pop) -{ -#pragma omp parallel for default(none) shared(_proc, _pop) schedule(dynamic) - for (unsigned i = 0; i < _pop.size(); ++i) - { - //#pragma omp critical - _proc(_pop[i]); - } -} - -#endif diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 7cf7ac8e8..c4e3ac035 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -41,6 +41,7 @@ int main(int ac, char** av) std::string speedupFileName = parser.getORcreateParam(std::string("speedup"), "speedupFileName", "Speedup file name", 0, "Results").value(); std::string efficiencyFileName = parser.getORcreateParam(std::string("efficiency"), "efficiencyFileName", "Efficiency file name", 0, "Results").value(); + std::string dynamicityFileName = parser.getORcreateParam(std::string("dynamicity"), "dynamicityFileName", "Dynamicity file name", 0, "Results").value(); uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); if (seedParam == 0) { seedParam = time(0); } @@ -65,6 +66,7 @@ int main(int ac, char** av) params << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); + std::ofstream dynamicityFile( std::string( dynamicityFileName + params.str() ).c_str() ); size_t nbtask = 1; #pragma omp parallel @@ -86,6 +88,7 @@ int main(int ac, char** av) double Ts; double Tp; + double Tpd; // sequential scope { @@ -105,20 +108,39 @@ int main(int ac, char** av) Tp = t2 - t1; } - if ( ( Ts / Tp ) > nbtask ) { continue; } + // parallel scope dynamic + { + eoPop< EOT > pop( p, init ); + double t1 = omp_get_wtime(); + omp_dynamic_apply< EOT >(eval, pop); + double t2 = omp_get_wtime(); + Tpd = t2 - t1; + } - speedupFile << Ts / Tp << ' '; - efficiencyFile << Ts / ( nbtask * Tp ) << ' '; + double speedup = Ts / Tp; + + if ( speedup > nbtask ) { continue; } + + double efficiency = speedup / nbtask; + + double dynamicity = Tp / Tpd; + + speedupFile << speedup << ' '; + efficiencyFile << efficiency << ' '; + dynamicityFile << dynamicity << ' '; eo::log << eo::debug; eo::log << "Ts = " << Ts << std::endl; eo::log << "Tp = " << Tp << std::endl; - eo::log << "S_p = " << Ts / Tp << std::endl; - eo::log << "E_p = " << Ts / ( nbtask * Tp ) << std::endl; + eo::log << "Tpd = " << Tpd << std::endl; + eo::log << "S_p = " << speedup << std::endl; + eo::log << "E_p = " << efficiency << std::endl; + eo::log << "D_p = " << dynamicity << std::endl; } // end of runs speedupFile << std::endl; efficiencyFile << std::endl; + dynamicityFile << std::endl; } // end of dimension From 849a5ec670cd0707abc7b4ca90592444d07b559d Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 17:35:06 +0100 Subject: [PATCH 1665/2134] created two boxplot script files one to generate image the other to display with matplotlab --- eo/test/CMakeLists.txt | 1 + eo/test/boxplot.py | 8 ++++---- eo/test/boxplot_to_png.py | 14 ++++++++++++++ eo/test/t-openmp.cpp | 1 - 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100755 eo/test/boxplot_to_png.py diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 8d7956bab..07dbee08a 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -95,6 +95,7 @@ ELSEIF(ENABLE_CMAKE_TESTING) SET(RESOURCES boxplot.py + boxplot_to_png.py ) FOREACH(file ${RESOURCES}) diff --git a/eo/test/boxplot.py b/eo/test/boxplot.py index 2b5141af6..39a65944a 100755 --- a/eo/test/boxplot.py +++ b/eo/test/boxplot.py @@ -4,11 +4,11 @@ import pylab import sys if __name__ == '__main__': - if len(sys.argv) < 3: - print 'Usage: boxplot.py [Results files, ...] [output file in .png]' + if len(sys.argv) < 2: + print 'Usage: boxplot.py [Results files, ...]' sys.exit() - for i in range(1, len(sys.argv) - 1): + for i in range(1, len(sys.argv)): pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) - pylab.savefig( sys.argv[ len(sys.argv) - 1 ] ) + pylab.show() diff --git a/eo/test/boxplot_to_png.py b/eo/test/boxplot_to_png.py new file mode 100755 index 000000000..2b5141af6 --- /dev/null +++ b/eo/test/boxplot_to_png.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import pylab +import sys + +if __name__ == '__main__': + if len(sys.argv) < 3: + print 'Usage: boxplot.py [Results files, ...] [output file in .png]' + sys.exit() + + for i in range(1, len(sys.argv) - 1): + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + pylab.savefig( sys.argv[ len(sys.argv) - 1 ] ) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index c4e3ac035..f1ddffe81 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -13,7 +13,6 @@ #include #include -#include #include From 50d91c3ab6bf4aecc88834d3e74e47b7c2e19064 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 17:37:44 +0100 Subject: [PATCH 1666/2134] added popStep and dimStep value on the result filename --- eo/test/t-openmp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index f1ddffe81..d7a418a57 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -62,7 +62,9 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); std::ostringstream params; - params << "-p" << popMin << "-P" << popMax << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; + params << "--popStep" << popStep << "-p" << popMin << "-P" << popMax + << "--dimStep" << dimStep << "-d" << dimMin << "-D" << dimMax + << "-r" << nRun << "-s" << seedParam; std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); std::ofstream dynamicityFile( std::string( dynamicityFileName + params.str() ).c_str() ); From bb0efdc0671f7bcff39d4b7326f9240ba2ce35f3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 17:43:52 +0100 Subject: [PATCH 1667/2134] popStep and dimStep replaced by pS and dS on the results filename --- eo/test/t-openmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index d7a418a57..31aeeca0e 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -62,8 +62,8 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); std::ostringstream params; - params << "--popStep" << popStep << "-p" << popMin << "-P" << popMax - << "--dimStep" << dimStep << "-d" << dimMin << "-D" << dimMax + params << "--pS" << popStep << "-p" << popMin << "-P" << popMax + << "--dS" << dimStep << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); From 4059e16b1e9db445872bd11cf2e2d62b5d5a4bcc Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 18:08:58 +0100 Subject: [PATCH 1668/2134] updated to D_p = T_Dp / T_p and avoid all D_p higher than the number of tasks used --- eo/test/t-openmp.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 31aeeca0e..8b09bfad1 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -124,19 +124,24 @@ int main(int ac, char** av) double efficiency = speedup / nbtask; - double dynamicity = Tp / Tpd; - speedupFile << speedup << ' '; efficiencyFile << efficiency << ' '; - dynamicityFile << dynamicity << ' '; eo::log << eo::debug; eo::log << "Ts = " << Ts << std::endl; eo::log << "Tp = " << Tp << std::endl; - eo::log << "Tpd = " << Tpd << std::endl; eo::log << "S_p = " << speedup << std::endl; eo::log << "E_p = " << efficiency << std::endl; + + double dynamicity = Tpd / Tp; + + if ( dynamicity > nbtask ) { continue; } + + eo::log << "Tpd = " << Tpd << std::endl; eo::log << "D_p = " << dynamicity << std::endl; + + dynamicityFile << dynamicity << ' '; + } // end of runs speedupFile << std::endl; From cfac1f8a7ea396fb4b2d64055763ec6ec5917633 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 18:20:38 +0100 Subject: [PATCH 1669/2134] remode two - on results filename --- eo/test/t-openmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 8b09bfad1..97d5f9691 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -62,8 +62,8 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); std::ostringstream params; - params << "--pS" << popStep << "-p" << popMin << "-P" << popMax - << "--dS" << dimStep << "-d" << dimMin << "-D" << dimMax + params << "-pS" << popStep << "-p" << popMin << "-P" << popMax + << "-dS" << dimStep << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); From 4a8efc6ca6ca90a7c97b36216d151ea0b84cf930 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 22 Nov 2010 19:16:09 +0100 Subject: [PATCH 1670/2134] updated Dp = Tp / TDp --- eo/test/t-openmp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 97d5f9691..932da257a 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -133,7 +133,7 @@ int main(int ac, char** av) eo::log << "S_p = " << speedup << std::endl; eo::log << "E_p = " << efficiency << std::endl; - double dynamicity = Tpd / Tp; + double dynamicity = Tp / Tpd; if ( dynamicity > nbtask ) { continue; } From 69434a5bc2f1b7b10dbd46c7c7ca38d7da81230c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 27 Nov 2010 16:19:51 +0100 Subject: [PATCH 1671/2134] added prefix parameter on t-openmp --- eo/test/t-openmp.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 932da257a..cb21f4456 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -38,6 +38,8 @@ int main(int ac, char** av) unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); + std::string fileNamesPrefix = parser.getORcreateParam(std::string("notitle"), "fileNamesPrefix", "Prefix of all results files name", 'H', "Results").value(); + std::string speedupFileName = parser.getORcreateParam(std::string("speedup"), "speedupFileName", "Speedup file name", 0, "Results").value(); std::string efficiencyFileName = parser.getORcreateParam(std::string("efficiency"), "efficiencyFileName", "Efficiency file name", 0, "Results").value(); std::string dynamicityFileName = parser.getORcreateParam(std::string("dynamicity"), "dynamicityFileName", "Dynamicity file name", 0, "Results").value(); @@ -65,9 +67,9 @@ int main(int ac, char** av) params << "-pS" << popStep << "-p" << popMin << "-P" << popMax << "-dS" << dimStep << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; - std::ofstream speedupFile( std::string( speedupFileName + params.str() ).c_str() ); - std::ofstream efficiencyFile( std::string( efficiencyFileName + params.str() ).c_str() ); - std::ofstream dynamicityFile( std::string( dynamicityFileName + params.str() ).c_str() ); + std::ofstream speedupFile( std::string( fileNamesPrefix + "_" + speedupFileName + params.str() ).c_str() ); + std::ofstream efficiencyFile( std::string( fileNamesPrefix + "_" + efficiencyFileName + params.str() ).c_str() ); + std::ofstream dynamicityFile( std::string( fileNamesPrefix + "_" + dynamicityFileName + params.str() ).c_str() ); size_t nbtask = 1; #pragma omp parallel From 2141719076021c89407a7b3520312d61c1fe6316 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 27 Nov 2010 21:24:07 +0100 Subject: [PATCH 1672/2134] added t-openmp.py --- eo/test/CMakeLists.txt | 2 + eo/test/boxplot.py | 1 + eo/test/boxplot_to_pdf.py | 15 +++++++ eo/test/boxplot_to_png.py | 5 ++- eo/test/t-openmp.cpp | 8 ++-- eo/test/t-openmp.py | 91 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+), 6 deletions(-) create mode 100755 eo/test/boxplot_to_pdf.py create mode 100755 eo/test/t-openmp.py diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 07dbee08a..220063504 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -96,6 +96,8 @@ ELSEIF(ENABLE_CMAKE_TESTING) SET(RESOURCES boxplot.py boxplot_to_png.py + boxplot_to_pdf.py + t-openmp.py ) FOREACH(file ${RESOURCES}) diff --git a/eo/test/boxplot.py b/eo/test/boxplot.py index 39a65944a..bf6e84b5d 100755 --- a/eo/test/boxplot.py +++ b/eo/test/boxplot.py @@ -11,4 +11,5 @@ if __name__ == '__main__': for i in range(1, len(sys.argv)): pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + pylab.xlabel('iterations') pylab.show() diff --git a/eo/test/boxplot_to_pdf.py b/eo/test/boxplot_to_pdf.py new file mode 100755 index 000000000..f29edeb21 --- /dev/null +++ b/eo/test/boxplot_to_pdf.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import pylab +import sys + +if __name__ == '__main__': + if len(sys.argv) < 3: + print 'Usage: boxplot_to_pdf.py [Results files, ...] [output file in .pdf]' + sys.exit() + + for i in range(1, len(sys.argv) - 1): + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + pylab.xlabel('iterations') + pylab.savefig( sys.argv[ len(sys.argv) - 1 ], format='pdf', transparent=True ) diff --git a/eo/test/boxplot_to_png.py b/eo/test/boxplot_to_png.py index 2b5141af6..17fb35bc9 100755 --- a/eo/test/boxplot_to_png.py +++ b/eo/test/boxplot_to_png.py @@ -5,10 +5,11 @@ import sys if __name__ == '__main__': if len(sys.argv) < 3: - print 'Usage: boxplot.py [Results files, ...] [output file in .png]' + print 'Usage: boxplot_to_png.py [Results files, ...] [output file in .png]' sys.exit() for i in range(1, len(sys.argv) - 1): pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) - pylab.savefig( sys.argv[ len(sys.argv) - 1 ] ) + pylab.xlabel('iterations') + pylab.savefig( sys.argv[ len(sys.argv) - 1 ], format='png', transparent=True, papertype='a0' ) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index cb21f4456..297662b62 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -38,7 +38,7 @@ int main(int ac, char** av) unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); - std::string fileNamesPrefix = parser.getORcreateParam(std::string("notitle"), "fileNamesPrefix", "Prefix of all results files name", 'H', "Results").value(); + std::string fileNamesPrefix = parser.getORcreateParam(std::string(""), "fileNamesPrefix", "Prefix of all results files name", 'H', "Results").value(); std::string speedupFileName = parser.getORcreateParam(std::string("speedup"), "speedupFileName", "Speedup file name", 0, "Results").value(); std::string efficiencyFileName = parser.getORcreateParam(std::string("efficiency"), "efficiencyFileName", "Efficiency file name", 0, "Results").value(); @@ -67,9 +67,9 @@ int main(int ac, char** av) params << "-pS" << popStep << "-p" << popMin << "-P" << popMax << "-dS" << dimStep << "-d" << dimMin << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; - std::ofstream speedupFile( std::string( fileNamesPrefix + "_" + speedupFileName + params.str() ).c_str() ); - std::ofstream efficiencyFile( std::string( fileNamesPrefix + "_" + efficiencyFileName + params.str() ).c_str() ); - std::ofstream dynamicityFile( std::string( fileNamesPrefix + "_" + dynamicityFileName + params.str() ).c_str() ); + std::ofstream speedupFile( std::string( fileNamesPrefix + speedupFileName + params.str() ).c_str() ); + std::ofstream efficiencyFile( std::string( fileNamesPrefix + efficiencyFileName + params.str() ).c_str() ); + std::ofstream dynamicityFile( std::string( fileNamesPrefix + dynamicityFileName + params.str() ).c_str() ); size_t nbtask = 1; #pragma omp parallel diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py new file mode 100755 index 000000000..3982d682e --- /dev/null +++ b/eo/test/t-openmp.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +import pylab +import optparse, logging, sys, os +from datetime import datetime + +LEVELS = {'debug': logging.DEBUG, + 'info': logging.INFO, + 'warning': logging.WARNING, + 'error': logging.ERROR, + 'critical': logging.CRITICAL} + +LOG_DEFAULT_FILENAME='notitle.log' + +OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s' + +def parser(parser=optparse.OptionParser()): + # general parameters + parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='warning', help='set a verbose level') + parser.add_option('-f', '--file', help='give an input project filename', default='') + parser.add_option('-o', '--output', help='give an output filename for logging', default=LOG_DEFAULT_FILENAME) + # general parameters ends + + parser.add_option('-p', '--popMin', default=1) + parser.add_option('', '--popStep', default=1) + parser.add_option('-P', '--popMax', default=100) + parser.add_option('-d', '--dimMin', default=1) + parser.add_option('', '--dimStep', default=1) + parser.add_option('-D', '--dimMax', default=100) + parser.add_option('-r', '--nRun', default=100) + parser.add_option('-s', '--seed', default=-1) + + topic = str(datetime.today()) + for char in [' ', ':', '-', '.']: topic = topic.replace(char, '_') + parser.add_option('-t', '--topic', default='openmp_' + topic + '/') + + options, args = parser.parse_args() + + logger(options.verbose, options.output) + + return options + +def logger(level_name, filename=LOG_DEFAULT_FILENAME): + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + filename=filename, filemode='a' + ) + + console = logging.StreamHandler() + console.setLevel(LEVELS.get(level_name, logging.NOTSET)) + console.setFormatter(logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')) + logging.getLogger('').addHandler(console) + +options = parser() + +def execute_openmp( p, ps, P, d, ds, D, r, s, v=options.verbose ): + cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, options.topic) + logging.debug( cmd ) + #os.system( cmd ) + +def main(): + # creates first the new topic repository + #os.mkdir( options.topic ) + + # (1) EA in time O(1) + + # (1.1) speedup measure Sp, Ep for P & D + + # (1.1.1) measure for all combinaisons of P n D + execute_openmp( 1, 10, 100, 1, 10, 100, 100, options.seed ) + + # (1.1.1) measure for all combinaisons of P n D + execute_openmp( 1, 10, 100, 1, 10, 100, 100, options.seed ) + + + # pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + # pylab.xlabel('iterations') + # pylab.savefig( sys.argv[ len(sys.argv) - 1 ], format='pdf', transparent=True ) + + # (2) EA in time O(1) + + +# when executed, just run main(): +if __name__ == '__main__': + logging.debug('### plotting started ###') + + main() + + logging.debug('### plotting ended ###') From 9dcbb94ffbce37cec79e3eb1d0efc192ed7f332a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 27 Nov 2010 21:27:41 +0100 Subject: [PATCH 1673/2134] changed output results name --- eo/test/t-openmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 297662b62..db6b4cfc0 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -64,8 +64,8 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); std::ostringstream params; - params << "-pS" << popStep << "-p" << popMin << "-P" << popMax - << "-dS" << dimStep << "-d" << dimMin << "-D" << dimMax + params << "-p" << popMin << "-pS" << popStep << "-P" << popMax + << "-d" << dimMin << "-dS" << dimStep << "-D" << dimMax << "-r" << nRun << "-s" << seedParam; std::ofstream speedupFile( std::string( fileNamesPrefix + speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( fileNamesPrefix + efficiencyFileName + params.str() ).c_str() ); From 20fd5b206f446cd69c2df729bac5c158e847d2d1 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 27 Nov 2010 23:07:11 +0100 Subject: [PATCH 1674/2134] t-openmp.py released --- eo/test/t-openmp.cpp | 6 ++-- eo/test/t-openmp.py | 69 +++++++++++++++++++++++++++----------------- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index db6b4cfc0..4771c541d 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -64,9 +64,9 @@ int main(int ac, char** av) eoUniformGenerator< double > gen(-5, 5); std::ostringstream params; - params << "-p" << popMin << "-pS" << popStep << "-P" << popMax - << "-d" << dimMin << "-dS" << dimStep << "-D" << dimMax - << "-r" << nRun << "-s" << seedParam; + params << "_p" << popMin << "_pS" << popStep << "_P" << popMax + << "_d" << dimMin << "_dS" << dimStep << "_D" << dimMax + << "_r" << nRun << "_s" << seedParam; std::ofstream speedupFile( std::string( fileNamesPrefix + speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( fileNamesPrefix + efficiencyFileName + params.str() ).c_str() ); std::ofstream dynamicityFile( std::string( fileNamesPrefix + dynamicityFileName + params.str() ).c_str() ); diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 3982d682e..2b7c6842a 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -14,25 +14,21 @@ LOG_DEFAULT_FILENAME='notitle.log' OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s' +RESULT_FILE_FORMAT='%s%s_p%d_pS%d_P%d_d%d_dS%d_D%d_r%d_s%d' + def parser(parser=optparse.OptionParser()): # general parameters - parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='warning', help='set a verbose level') + parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='info', help='set a verbose level') parser.add_option('-f', '--file', help='give an input project filename', default='') parser.add_option('-o', '--output', help='give an output filename for logging', default=LOG_DEFAULT_FILENAME) # general parameters ends - parser.add_option('-p', '--popMin', default=1) - parser.add_option('', '--popStep', default=1) - parser.add_option('-P', '--popMax', default=100) - parser.add_option('-d', '--dimMin', default=1) - parser.add_option('', '--dimStep', default=1) - parser.add_option('-D', '--dimMax', default=100) parser.add_option('-r', '--nRun', default=100) - parser.add_option('-s', '--seed', default=-1) + parser.add_option('-s', '--seed', default=1) topic = str(datetime.today()) for char in [' ', ':', '-', '.']: topic = topic.replace(char, '_') - parser.add_option('-t', '--topic', default='openmp_' + topic + '/') + parser.add_option('-t', '--topic', default='openmp_measures_' + topic + '/') options, args = parser.parse_args() @@ -54,33 +50,54 @@ def logger(level_name, filename=LOG_DEFAULT_FILENAME): options = parser() -def execute_openmp( p, ps, P, d, ds, D, r, s, v=options.verbose ): - cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, options.topic) +def get_boxplot_data( filename ): + try: + f = open( filename ) + return [ [ float(value) for value in line.split() ] for line in f.readlines() ] + except: + raise ValueError('got an issue during the reading of file %s' % filename) + +def non_zero( value ): return value if value > 0 else 1 + +def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ): + pwd = options.topic + name + '_' + cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd) logging.debug( cmd ) - #os.system( cmd ) + os.system( cmd ) + + for cur in ['speedup', 'efficiency', 'dynamicity']: + filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) + pylab.boxplot( get_boxplot_data( filename ) ) + iters = ( non_zero( P - p ) / ps ) * ( non_zero( D - d ) / ds ) + pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) + pylab.ylabel('%s - %s' % (cur, name)) + pylab.savefig( filename + '.pdf', format='pdf' ) + pylab.savefig( filename + '.png', format='png' ) + pylab.cla() + pylab.clf() def main(): - # creates first the new topic repository - #os.mkdir( options.topic ) + logging.info('creates first the new topic repository %s', options.topic) + os.mkdir( options.topic ) - # (1) EA in time O(1) + logging.info('do all tests with r = %d and a common seed value = %d' % (options.nRun, options.seed)) - # (1.1) speedup measure Sp, Ep for P & D + logging.info('EA in time O(1) and O(n) - speedup measure Sp, Ep and Dp for P & D') - # (1.1.1) measure for all combinaisons of P n D - execute_openmp( 1, 10, 100, 1, 10, 100, 100, options.seed ) + logging.info('(1) measure for all combinaisons of P n D') + do_measure( '1', 1, 10, 101, 1, 10, 101 ) - # (1.1.1) measure for all combinaisons of P n D - execute_openmp( 1, 10, 100, 1, 10, 100, 100, options.seed ) + logging.info('(2) measure for P \in [1, 100[ with D fixed to 1000') + do_measure( '2', 1, 1, 101, 1000, 1, 1000 ) + logging.info('(3) measure for P \in [1, 1000[ with ps = 10 and D fixed to 1000') + do_measure( '3', 1, 10, 1001, 1000, 1, 1000 ) - # pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) - - # pylab.xlabel('iterations') - # pylab.savefig( sys.argv[ len(sys.argv) - 1 ], format='pdf', transparent=True ) - - # (2) EA in time O(1) + logging.info('(4) measure for D \in [1, 100[ with P fixed to 1000') + do_measure( '4', 1000, 1, 1000, 1, 1, 101 ) + logging.info('(5) measure for D \in [1, 1000[ with ds = 10 and P fixed to 1000') + do_measure( '5', 1000, 1, 1000, 1, 10, 1001 ) # when executed, just run main(): if __name__ == '__main__': From 6907b262e1d96f0513c7eae2f0787b0228ac3a85 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 27 Nov 2010 23:22:54 +0100 Subject: [PATCH 1675/2134] onlyexec and onlyprint parameters added on openmp script --- eo/test/t-openmp.py | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 2b7c6842a..aa3af6868 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -23,12 +23,15 @@ def parser(parser=optparse.OptionParser()): parser.add_option('-o', '--output', help='give an output filename for logging', default=LOG_DEFAULT_FILENAME) # general parameters ends - parser.add_option('-r', '--nRun', default=100) - parser.add_option('-s', '--seed', default=1) + parser.add_option('-r', '--nRun', default=100, help='how many times you would compute each iteration ?') + parser.add_option('-s', '--seed', default=1, help='give here a seed value') topic = str(datetime.today()) for char in [' ', ':', '-', '.']: topic = topic.replace(char, '_') - parser.add_option('-t', '--topic', default='openmp_measures_' + topic + '/') + parser.add_option('-t', '--topic', default='openmp_measures_' + topic + '/', help='give here a topic name used to create the folder') + + parser.add_option('-E', '--onlyexecute', action='store_true', dest='onlyexecute', default=False, help='used this option if you only want to execute measures without generating images') + parser.add_option('-X', '--onlyprint', action='store_true', dest='onlyprint', default=False, help='used this option if you only want to generate images without executing measures, dont forget to set the good path in using --topic with a "/" at the end') options, args = parser.parse_args() @@ -63,22 +66,25 @@ def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='log pwd = options.topic + name + '_' cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd) logging.debug( cmd ) - os.system( cmd ) + if not options.onlyprint: + os.system( cmd ) - for cur in ['speedup', 'efficiency', 'dynamicity']: - filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) - pylab.boxplot( get_boxplot_data( filename ) ) - iters = ( non_zero( P - p ) / ps ) * ( non_zero( D - d ) / ds ) - pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) - pylab.ylabel('%s - %s' % (cur, name)) - pylab.savefig( filename + '.pdf', format='pdf' ) - pylab.savefig( filename + '.png', format='png' ) - pylab.cla() - pylab.clf() + if not options.onlyexecute: + for cur in ['speedup', 'efficiency', 'dynamicity']: + filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) + pylab.boxplot( get_boxplot_data( filename ) ) + iters = ( non_zero( P - p ) / ps ) * ( non_zero( D - d ) / ds ) + pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) + pylab.ylabel('%s - %s' % (cur, name)) + pylab.savefig( filename + '.pdf', format='pdf' ) + pylab.savefig( filename + '.png', format='png' ) + pylab.cla() + pylab.clf() def main(): - logging.info('creates first the new topic repository %s', options.topic) - os.mkdir( options.topic ) + if not options.onlyprint: + logging.info('creates first the new topic repository %s', options.topic) + os.mkdir( options.topic ) logging.info('do all tests with r = %d and a common seed value = %d' % (options.nRun, options.seed)) From bb2934fd09d9baeae476804599f4cc871d40c028 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 27 Nov 2010 23:26:16 +0100 Subject: [PATCH 1676/2134] onlyexec and onlyprint parameters added on openmp script --- eo/test/t-openmp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index aa3af6868..54338a444 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import pylab import optparse, logging, sys, os from datetime import datetime @@ -53,6 +52,9 @@ def logger(level_name, filename=LOG_DEFAULT_FILENAME): options = parser() +if not options.onlyexecute: + import pylab + def get_boxplot_data( filename ): try: f = open( filename ) From 1aa9db18f3c13a70bfd0a67050946de6ae152bdd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 00:12:08 +0100 Subject: [PATCH 1677/2134] added n processus and fixed bound parameters --- eo/test/t-openmp.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 54338a444..2f7ac80f0 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -24,6 +24,8 @@ def parser(parser=optparse.OptionParser()): parser.add_option('-r', '--nRun', default=100, help='how many times you would compute each iteration ?') parser.add_option('-s', '--seed', default=1, help='give here a seed value') + parser.add_option('-n', '--nProc', default=1, help='give a number of processus, this value is multiplied by the measures bounds') + parser.add_option('-F', '--fixedBound', default=1000, help='give the fixed bound value common for all measures') topic = str(datetime.today()) for char in [' ', ':', '-', '.']: topic = topic.replace(char, '_') @@ -92,20 +94,23 @@ def main(): logging.info('EA in time O(1) and O(n) - speedup measure Sp, Ep and Dp for P & D') + n = options.nProc + F = options.fixedBound + logging.info('(1) measure for all combinaisons of P n D') - do_measure( '1', 1, 10, 101, 1, 10, 101 ) + do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n ) - logging.info('(2) measure for P \in [1, 100[ with D fixed to 1000') - do_measure( '2', 1, 1, 101, 1000, 1, 1000 ) + logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F)) + do_measure( '2', 1*n, 1*n, 101*n, F, 1, F ) - logging.info('(3) measure for P \in [1, 1000[ with ps = 10 and D fixed to 1000') - do_measure( '3', 1, 10, 1001, 1000, 1, 1000 ) + logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F ) - logging.info('(4) measure for D \in [1, 100[ with P fixed to 1000') - do_measure( '4', 1000, 1, 1000, 1, 1, 101 ) + logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F)) + do_measure( '4', F, 1, F, 1*n, 1*n, 101*n ) - logging.info('(5) measure for D \in [1, 1000[ with ds = 10 and P fixed to 1000') - do_measure( '5', 1000, 1, 1000, 1, 10, 1001 ) + logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n ) # when executed, just run main(): if __name__ == '__main__': From c7a34a6a5ef2b857361c59914700430c20060cea Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 00:19:46 +0100 Subject: [PATCH 1678/2134] added n processus and fixed bound parameters --- eo/test/t-openmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 2f7ac80f0..330fe666a 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -94,7 +94,7 @@ def main(): logging.info('EA in time O(1) and O(n) - speedup measure Sp, Ep and Dp for P & D') - n = options.nProc + n = int(options.nProc) F = options.fixedBound logging.info('(1) measure for all combinaisons of P n D') From d6b566b538651508b8ac4ea1edc3c967af80a68e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 03:24:02 +0100 Subject: [PATCH 1679/2134] added variable time measure --- eo/test/t-openmp.cpp | 141 ++++++++++++++++++++++++++----------------- 1 file changed, 86 insertions(+), 55 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 4771c541d..10c73ce05 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -24,6 +24,66 @@ typedef eoReal< eoMinimizingFitness > EOT; //----------------------------------------------------------------------------- +double variable_time_function(const std::vector&) +{ + ::srand( ::time( NULL ) ); + ::usleep( 10 * ( rand() / RAND_MAX ) ); + return 0.0; +} + +double measure_apply( size_t p, + void (*fct)(eoUF&, std::vector&), + eoInitFixedLength< EOT >& init, + eoEvalFuncCounter< EOT >& eval ) +{ + eoPop< EOT > pop( p, init ); + double t1 = omp_get_wtime(); + fct( eval, pop ); + double t2 = omp_get_wtime(); + return t2 - t1; +} + +void measure( size_t p, + eoInitFixedLength< EOT >& init, + eoEvalFuncCounter< EOT >& eval, + std::ofstream& speedupFile, + std::ofstream& efficiencyFile, + std::ofstream& dynamicityFile, + size_t nbtask ) +{ + // sequential scope + double Ts = measure_apply( p, apply< EOT >, init, eval ); + // parallel scope + double Tp = measure_apply( p, omp_apply< EOT >, init, eval ); + // parallel scope dynamic + double Tpd = measure_apply( p, omp_dynamic_apply< EOT >, init, eval ); + + double speedup = Ts / Tp; + + if ( speedup > nbtask ) { return; } + + double efficiency = speedup / nbtask; + + speedupFile << speedup << ' '; + efficiencyFile << efficiency << ' '; + + eo::log << eo::debug; + eo::log << "Ts = " << Ts << std::endl; + eo::log << "Tp = " << Tp << std::endl; + eo::log << "S_p = " << speedup << std::endl; + eo::log << "E_p = " << efficiency << std::endl; + + double dynamicity = Tp / Tpd; + + if ( dynamicity > nbtask ) { return; } + + eo::log << "Tpd = " << Tpd << std::endl; + eo::log << "D_p = " << dynamicity << std::endl; + + dynamicityFile << dynamicity << ' '; +} + + int main(int ac, char** av) { eoParserLogger parser(ac, av); @@ -47,6 +107,9 @@ int main(int ac, char** av) uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); if (seedParam == 0) { seedParam = time(0); } + unsigned int measureConstTime = parser.getORcreateParam((unsigned int)1, "measureConstTime", "Toggle measure of constant time", 'm', "Results").value(); + unsigned int measureVarTime = parser.getORcreateParam((unsigned int)1, "measureVarTime", "Toggle measure of variable time", 'M', "Results").value(); + if (parser.userNeedsHelp()) { parser.printHelp(std::cout); @@ -59,7 +122,10 @@ int main(int ac, char** av) rng.reseed( seedParam ); eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); - eoEvalFuncCounter eval( mainEval ); + eoEvalFuncCounter< EOT > eval( mainEval ); + + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval_variable( variable_time_function ); + eoEvalFuncCounter< EOT > eval_variable( mainEval_variable ); eoUniformGenerator< double > gen(-5, 5); @@ -67,10 +133,15 @@ int main(int ac, char** av) params << "_p" << popMin << "_pS" << popStep << "_P" << popMax << "_d" << dimMin << "_dS" << dimStep << "_D" << dimMax << "_r" << nRun << "_s" << seedParam; + std::ofstream speedupFile( std::string( fileNamesPrefix + speedupFileName + params.str() ).c_str() ); std::ofstream efficiencyFile( std::string( fileNamesPrefix + efficiencyFileName + params.str() ).c_str() ); std::ofstream dynamicityFile( std::string( fileNamesPrefix + dynamicityFileName + params.str() ).c_str() ); + std::ofstream speedupFile_variable( std::string( fileNamesPrefix + "variable_" + speedupFileName + params.str() ).c_str() ); + std::ofstream efficiencyFile_variable( std::string( fileNamesPrefix + "variable_" + efficiencyFileName + params.str() ).c_str() ); + std::ofstream dynamicityFile_variable( std::string( fileNamesPrefix + "variable_" + dynamicityFileName + params.str() ).c_str() ); + size_t nbtask = 1; #pragma omp parallel { @@ -89,67 +160,27 @@ int main(int ac, char** av) { eoInitFixedLength< EOT > init( d, gen ); - double Ts; - double Tp; - double Tpd; - - // sequential scope - { - eoPop< EOT > pop( p, init ); - double t1 = omp_get_wtime(); - apply< EOT >(eval, pop); - double t2 = omp_get_wtime(); - Ts = t2 - t1; - } - - // parallel scope - { - eoPop< EOT > pop( p, init ); - double t1 = omp_get_wtime(); - omp_apply< EOT >(eval, pop); - double t2 = omp_get_wtime(); - Tp = t2 - t1; - } - - // parallel scope dynamic - { - eoPop< EOT > pop( p, init ); - double t1 = omp_get_wtime(); - omp_dynamic_apply< EOT >(eval, pop); - double t2 = omp_get_wtime(); - Tpd = t2 - t1; - } - - double speedup = Ts / Tp; - - if ( speedup > nbtask ) { continue; } - - double efficiency = speedup / nbtask; - - speedupFile << speedup << ' '; - efficiencyFile << efficiency << ' '; - - eo::log << eo::debug; - eo::log << "Ts = " << Ts << std::endl; - eo::log << "Tp = " << Tp << std::endl; - eo::log << "S_p = " << speedup << std::endl; - eo::log << "E_p = " << efficiency << std::endl; - - double dynamicity = Tp / Tpd; - - if ( dynamicity > nbtask ) { continue; } - - eo::log << "Tpd = " << Tpd << std::endl; - eo::log << "D_p = " << dynamicity << std::endl; - - dynamicityFile << dynamicity << ' '; + // for constant time measure + if ( measureConstTime == 1 ) + { + measure( p, init, eval, speedupFile, efficiencyFile, dynamicityFile, nbtask ); + } + // for variable time measure + if ( measureVarTime == 1 ) + { + measure( p, init, eval_variable, speedupFile_variable, efficiencyFile_variable, dynamicityFile_variable, nbtask ); + } } // end of runs speedupFile << std::endl; efficiencyFile << std::endl; dynamicityFile << std::endl; + speedupFile_variable << std::endl; + efficiencyFile_variable << std::endl; + dynamicityFile_variable << std::endl; + } // end of dimension } // end of population From 13bb5efa43c31de2818c85845e255d6e3c12acd6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 03:32:53 +0100 Subject: [PATCH 1680/2134] added variable time measure --- eo/test/t-openmp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 330fe666a..0fb091f51 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -11,7 +11,7 @@ LEVELS = {'debug': logging.DEBUG, LOG_DEFAULT_FILENAME='notitle.log' -OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s' +OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s -m=%d -M=%d' RESULT_FILE_FORMAT='%s%s_p%d_pS%d_P%d_d%d_dS%d_D%d_r%d_s%d' @@ -34,6 +34,9 @@ def parser(parser=optparse.OptionParser()): parser.add_option('-E', '--onlyexecute', action='store_true', dest='onlyexecute', default=False, help='used this option if you only want to execute measures without generating images') parser.add_option('-X', '--onlyprint', action='store_true', dest='onlyprint', default=False, help='used this option if you only want to generate images without executing measures, dont forget to set the good path in using --topic with a "/" at the end') + parser.add_option('-m', '--measureConstTime', default=1, help='Toggle measure of constant time') + parser.add_option('-M', '--measureVarTime', default=1, help='Toggle measure of variable time') + options, args = parser.parse_args() logger(options.verbose, options.output) @@ -68,7 +71,7 @@ def non_zero( value ): return value if value > 0 else 1 def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ): pwd = options.topic + name + '_' - cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd) + cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd, options.measureConstTime, options.measureVarTime) logging.debug( cmd ) if not options.onlyprint: os.system( cmd ) From a7024e784c7520fce4ea901e6ea3bf8f54010bfd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 03:35:21 +0100 Subject: [PATCH 1681/2134] added variable time measure --- eo/test/t-openmp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 0fb091f51..c9f104be2 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -71,7 +71,8 @@ def non_zero( value ): return value if value > 0 else 1 def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ): pwd = options.topic + name + '_' - cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd, options.measureConstTime, options.measureVarTime) + cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd, + int(options.measureConstTime), int(options.measureVarTime)) logging.debug( cmd ) if not options.onlyprint: os.system( cmd ) From 61ab540d8a96d32f0c9a76b02daf8e822cdf7907 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 03:41:09 +0100 Subject: [PATCH 1682/2134] update --- eo/test/t-openmp.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 10c73ce05..54d2e7107 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -173,13 +173,19 @@ int main(int ac, char** av) } } // end of runs - speedupFile << std::endl; - efficiencyFile << std::endl; - dynamicityFile << std::endl; + if ( measureConstTime == 1 ) + { + speedupFile << std::endl; + efficiencyFile << std::endl; + dynamicityFile << std::endl; + } - speedupFile_variable << std::endl; - efficiencyFile_variable << std::endl; - dynamicityFile_variable << std::endl; + if ( measureVarTime == 1 ) + { + speedupFile_variable << std::endl; + efficiencyFile_variable << std::endl; + dynamicityFile_variable << std::endl; + } } // end of dimension From e3c3d156283a462eb8fa4cb4c7ec1f4e999ef527 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 13:36:25 +0100 Subject: [PATCH 1683/2134] using rdtsc for rng seed with mersenne twister --- eo/test/t-openmp.cpp | 6 ++++-- eo/test/t-openmp.py | 32 +++++++++++++++++++------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 54d2e7107..69e9022ed 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -24,10 +24,12 @@ typedef eoReal< eoMinimizingFitness > EOT; //----------------------------------------------------------------------------- +inline uint32_t get_rdtsc() { __asm__ ("xor %eax, %eax; cpuid; rdtsc"); } + double variable_time_function(const std::vector&) { - ::srand( ::time( NULL ) ); - ::usleep( 10 * ( rand() / RAND_MAX ) ); + eoRng myrng( get_rdtsc() ); + ::usleep( myrng.random( 10 ) ); return 0.0; } diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index c9f104be2..1b166ae6a 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -67,27 +67,33 @@ def get_boxplot_data( filename ): except: raise ValueError('got an issue during the reading of file %s' % filename) -def non_zero( value ): return value if value > 0 else 1 - def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ): pwd = options.topic + name + '_' cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd, - int(options.measureConstTime), int(options.measureVarTime)) + int(options.measureConstTime), + int(options.measureVarTime)) logging.debug( cmd ) if not options.onlyprint: os.system( cmd ) if not options.onlyexecute: - for cur in ['speedup', 'efficiency', 'dynamicity']: - filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) - pylab.boxplot( get_boxplot_data( filename ) ) - iters = ( non_zero( P - p ) / ps ) * ( non_zero( D - d ) / ds ) - pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) - pylab.ylabel('%s - %s' % (cur, name)) - pylab.savefig( filename + '.pdf', format='pdf' ) - pylab.savefig( filename + '.png', format='png' ) - pylab.cla() - pylab.clf() + def generate( filenames ): + for cur in filenames: + filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) + pylab.boxplot( get_boxplot_data( filename ) ) + nonzero = lambda x: x if x > 0 else 1 + iters = ( nonzero( P - p ) / ps ) * ( nonzero( D - d ) / ds ) + pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) + pylab.ylabel('%s - %s' % (cur, name)) + pylab.savefig( filename + '.pdf', format='pdf' ) + pylab.savefig( filename + '.png', format='png' ) + pylab.cla() + pylab.clf() + + if int(options.measureConstTime) == 1: + generate( ['speedup', 'efficiency', 'dynamicity'] ) + if int(options.measureVarTime) == 1: + generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] ) def main(): if not options.onlyprint: From 16a77fadd956d24acda56f77de477e8f4568fcde Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 28 Nov 2010 14:21:26 +0100 Subject: [PATCH 1684/2134] now we can select which measures we want --- eo/test/t-openmp.cpp | 4 +-- eo/test/t-openmp.py | 59 +++++++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 69e9022ed..325cb653a 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -109,8 +109,8 @@ int main(int ac, char** av) uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); if (seedParam == 0) { seedParam = time(0); } - unsigned int measureConstTime = parser.getORcreateParam((unsigned int)1, "measureConstTime", "Toggle measure of constant time", 'm', "Results").value(); - unsigned int measureVarTime = parser.getORcreateParam((unsigned int)1, "measureVarTime", "Toggle measure of variable time", 'M', "Results").value(); + unsigned int measureConstTime = parser.getORcreateParam((unsigned int)1, "measureConstTime", "Toggle measure of constant time", 'C', "Results").value(); + unsigned int measureVarTime = parser.getORcreateParam((unsigned int)1, "measureVarTime", "Toggle measure of variable time", 'V', "Results").value(); if (parser.userNeedsHelp()) { diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index 1b166ae6a..ab43bb930 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -11,8 +11,6 @@ LEVELS = {'debug': logging.DEBUG, LOG_DEFAULT_FILENAME='notitle.log' -OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s -m=%d -M=%d' - RESULT_FILE_FORMAT='%s%s_p%d_pS%d_P%d_d%d_dS%d_D%d_r%d_s%d' def parser(parser=optparse.OptionParser()): @@ -22,20 +20,22 @@ def parser(parser=optparse.OptionParser()): parser.add_option('-o', '--output', help='give an output filename for logging', default=LOG_DEFAULT_FILENAME) # general parameters ends - parser.add_option('-r', '--nRun', default=100, help='how many times you would compute each iteration ?') - parser.add_option('-s', '--seed', default=1, help='give here a seed value') - parser.add_option('-n', '--nProc', default=1, help='give a number of processus, this value is multiplied by the measures bounds') - parser.add_option('-F', '--fixedBound', default=1000, help='give the fixed bound value common for all measures') + parser.add_option('-r', '--nRun', type='int', default=100, help='how many times you would compute each iteration ?') + parser.add_option('-s', '--seed', type='int', default=1, help='give here a seed value') + parser.add_option('-n', '--nProc', type='int', default=1, help='give a number of processus, this value is multiplied by the measures bounds') + parser.add_option('-F', '--fixedBound', type='int', default=1000, help='give the fixed bound value common for all measures') topic = str(datetime.today()) for char in [' ', ':', '-', '.']: topic = topic.replace(char, '_') parser.add_option('-t', '--topic', default='openmp_measures_' + topic + '/', help='give here a topic name used to create the folder') - parser.add_option('-E', '--onlyexecute', action='store_true', dest='onlyexecute', default=False, help='used this option if you only want to execute measures without generating images') - parser.add_option('-X', '--onlyprint', action='store_true', dest='onlyprint', default=False, help='used this option if you only want to generate images without executing measures, dont forget to set the good path in using --topic with a "/" at the end') + parser.add_option('-E', '--onlyexecute', action='store_true', default=False, help='used this option if you only want to execute measures without generating images') + parser.add_option('-X', '--onlyprint', action='store_true', default=False, help='used this option if you only want to generate images without executing measures, dont forget to set the good path in using --topic with a "/" at the end') - parser.add_option('-m', '--measureConstTime', default=1, help='Toggle measure of constant time') - parser.add_option('-M', '--measureVarTime', default=1, help='Toggle measure of variable time') + parser.add_option('-C', '--onlyConstTime', action='store_true', default=False, help='only measures constant time problem') + parser.add_option('-V', '--onlyVarTime', action='store_true', default=False, help='only measures variable time problem') + + parser.add_option('-m', '--measure', action='append', type='int', help='select all measure you want to produce, by default all are produced') options, args = parser.parse_args() @@ -68,11 +68,13 @@ def get_boxplot_data( filename ): raise ValueError('got an issue during the reading of file %s' % filename) def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ): + OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s -C=%d -V=%d' + pwd = options.topic + name + '_' cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd, - int(options.measureConstTime), - int(options.measureVarTime)) - logging.debug( cmd ) + 0 if options.onlyVarTime else 1, + 0 if options.onlyConstTime else 1) + logging.info( cmd ) if not options.onlyprint: os.system( cmd ) @@ -90,9 +92,9 @@ def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='log pylab.cla() pylab.clf() - if int(options.measureConstTime) == 1: + if not options.onlyVarTime: generate( ['speedup', 'efficiency', 'dynamicity'] ) - if int(options.measureVarTime) == 1: + if not options.onlyConstTime: generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] ) def main(): @@ -104,23 +106,28 @@ def main(): logging.info('EA in time O(1) and O(n) - speedup measure Sp, Ep and Dp for P & D') - n = int(options.nProc) + n = options.nProc F = options.fixedBound - logging.info('(1) measure for all combinaisons of P n D') - do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n ) + if options.measure is None or 1 in options.measure: + logging.info('(1) measure for all combinaisons of P n D') + do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n ) - logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F)) - do_measure( '2', 1*n, 1*n, 101*n, F, 1, F ) + if options.measure is None or 2 in options.measure: + logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F)) + do_measure( '2', 1*n, 1*n, 101*n, F, 1, F ) - logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F)) - do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F ) + if options.measure is None or 3 in options.measure: + logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F ) - logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F)) - do_measure( '4', F, 1, F, 1*n, 1*n, 101*n ) + if options.measure is None or 4 in options.measure: + logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F)) + do_measure( '4', F, 1, F, 1*n, 1*n, 101*n ) - logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F)) - do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n ) + if options.measure is None or 5 in options.measure: + logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n ) # when executed, just run main(): if __name__ == '__main__': From efb22a6eda37275252ab84a676d32a61ca768649 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 14 Dec 2010 15:27:26 +0100 Subject: [PATCH 1685/2134] add the parser/logger to the general header --- eo/src/eo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eo b/eo/src/eo index cf18f3ea0..7c988f1c9 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -198,6 +198,8 @@ #include #include +#include + //----------------------------------------------------------------------------- #endif From 5697f6d699dbd1658c0a1c8f235e4f9c446c7490 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Dec 2010 15:50:26 +0100 Subject: [PATCH 1686/2134] evaluator that throw an exception if a maximum CPU user time has been reached, for POSIX systems --- eo/NEWS | 5 ++- eo/src/eo | 1 + eo/src/eoEvalUserTimeThrowException.h | 61 +++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 eo/src/eoEvalUserTimeThrowException.h diff --git a/eo/NEWS b/eo/NEWS index 50e256087..0f067e003 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,4 +1,7 @@ -* release 1.1 (not yet released) +* current + - evaluators that throw an exception if a maximum time has en reached (wallclock and CPU user time for POSIX systems), independently of the number of generations + +* release 1.1 - provide cmake build system, remove the old autotools one - package generation system - GCC 4.3 compatibility diff --git a/eo/src/eo b/eo/src/eo index 7c988f1c9..89ed7da98 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -77,6 +77,7 @@ #include #include #include +#include // Continuators - all include eoContinue.h #include diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h new file mode 100644 index 000000000..d47c064ae --- /dev/null +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -0,0 +1,61 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann DrĂ©o +*/ + +#include +#include + +#include + +/** Check at each evaluation if a given CPU user time contract has been reached. + * + * Throw an eoMaxTimeException if the given max time has been reached. + * Usefull if you want to end the search independently of generations. + * This class uses (almost-)POSIX headers. + * It uses a computation of the user time used on the CPU. For a wallclock time measure, see eoEvalTimeThrowException + * + * @ingroup Evaluation + */ +template< class EOT > +class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > +{ +public: + eoEvalUserTimeThrowException( eoEvalFunc & func, long max ) : _max(max), eoEvalFuncCounter( func, "CPU-user") {} + + virtual void operator() ( EOT & eo ) + { + if( eo.invalid() ) { + + getrusage(RUSAGE_SELF,&_usage); + + if( _usage.ru_utime.tv_sec >= _max ) { + throw eoMaxTimeException( _usage.ru_utime.tv_sec ); + } else { + func(eo); + } + } + } + +protected: + long _max; + struct rusage _usage; +}; From c1841fa9b6a9783914656216b5fe4a87f640402d Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Dec 2010 15:51:28 +0100 Subject: [PATCH 1687/2134] set the version to 1.1.1-edge --- eo/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 7217df60d..ca2f8580a 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -15,11 +15,11 @@ INCLUDE(eo-conf.cmake OPTIONAL) PROJECT(EO) SET(PROJECT_VERSION_MAJOR 1) -SET(PROJECT_VERSION_MINOR 02) +SET(PROJECT_VERSION_MINOR 1) SET(PROJECT_VERSION_PATCH 1) SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" CACHE STRING "Package version" FORCE) -SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" CACHE STRING "Global version" FORCE) -SET(VERSION "1.02" CACHE STRING "Global version" FORCE) +#SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" CACHE STRING "Global version" FORCE) +SET(VERSION "1.1.1-edge" CACHE STRING "Global version" FORCE) SET(GLOBAL_VERSION "${VERSION}") SET(PACKAGE_BUGREPORT "eodev-help@sourceforge.net" CACHE STRING "Package bug report" FORCE) From 0784db8659602a423f687d2d3fd96cf860565129 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 17 Dec 2010 10:39:42 +0100 Subject: [PATCH 1688/2134] eoMaxTimeException is not used only for wallclock time, set a more general message --- eo/src/eoExceptions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index bcccee2af..9760efc61 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -46,7 +46,7 @@ public: virtual const char* what() const throw() { std::ostringstream ss; - ss << "STOP in eoMaxTimeException: the maximum number of wallclock seconds has been reached (" << _elapsed << ")."; + ss << "STOP in eoMaxTimeException: the maximum number of allowed seconds has been reached (" << _elapsed << ")."; return ss.str().c_str(); } From 128588b3e206eaac30b034bbda161de2a879320e Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 17 Dec 2010 11:25:58 +0100 Subject: [PATCH 1689/2134] Add a value(ValueType) method for ValueParam, to directly change the value using the templatized type. Use two intermediate streamstring conversions. --- eo/src/utils/eoParam.h | 46 +++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 1eb97b306..868507cf7 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -169,32 +169,46 @@ public : eoParam::defValue(getValue()); } - /** Parameter value + /** Get a reference on the parameter value @return parameter value */ - ValueType& value() - { return repValue; } + ValueType& value() { return repValue; } - /** Parameter value + /** Get a const reference on the parameter value @overload @return parameter value */ - const ValueType& value() const - { return repValue; } + const ValueType& value() const { return repValue; } + /** Change the parameter value + */ + void value( ValueType val ) + { + // convert to string + std::ostringstream os; + os << val; + + // convert to ValueType + std::istringstream is( os.str() ); + is >> repValue; + } + + + /** Get the string representation of the value + */ std::string getValue(void) const - { - std::ostringstream os; - os << repValue; - return os.str(); - } + { + std::ostringstream os; + os << repValue; + return os.str(); + } - /** @brief Set value according to the speciied string + /** @brief Set the value according to the speciied string For scalar types the textual represenation is typically quite straigtforward. @@ -208,10 +222,10 @@ public : @param _value Textual representation of the new value */ void setValue(const std::string& _value) - { - std::istringstream is(_value); - is >> repValue; - } + { + std::istringstream is(_value); + is >> repValue; + } protected: From db4ece5f1144aee1bb1119da0798f76b02fcc026 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Dec 2010 10:25:13 +0100 Subject: [PATCH 1690/2134] * doc: solved some mistakes --- eo/doc/index.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/doc/index.h b/eo/doc/index.h index 7d7921fe0..52a5758cf 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -43,17 +43,17 @@ massively use templates, so that you will not be limited by interfaces when using your own representation. Once you have a representation, you will build your own evolutionary algorithm -by assembling @ref Operators in @ref Algorithms. +by assembling @ref Operators in @ref Algorithms. In %EO, most of the objects are functors, that is classes with an operator(), that you -can call just as if they were classical functions. For example, an algorithm is a -functor, that manipulate a population of individuals, it will be implemented as a functor, +can call just as if they were classical functions. For example, an algorithm is a +functor, that manipulate a population of individuals, it will be implemented as a functor, with a member like: operator()(eoPop). Once called on a given population, it will search for the optimum of a given problem. Generally, operators are instanciated once and then binded in an algorithm by reference. -Thus, you can easily build you own algorithm by trying several combination of operators. +Thus, you can easily build your own algorithm by trying several combination of operators. -For an more detailled introduction to the design of %EO you can look at the +For a more detailled introduction to the design of %EO you can look at the slides from a talk at EA 2001 or at the corresponding article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th European Conference on Artificial Evolution: - http://portal.acm.org/citation.cfm?id=727742 From 1e177e17f922e4493533d3b3fce558cae9c26864 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Dec 2010 13:40:49 +0100 Subject: [PATCH 1691/2134] * package dependancies changed --- eo/Packaging.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/Packaging.cmake b/eo/Packaging.cmake index c9e2d44b1..de81fadc3 100644 --- a/eo/Packaging.cmake +++ b/eo/Packaging.cmake @@ -67,7 +67,7 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${ ### 4) Set up debian packaging information ###################################################################################### -SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, libxml2, libmpich2-1.2") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, g++") SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") From 71d3ee7b5bf15aa1c4f61142c25b71f85a0a3b2f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Dec 2010 17:24:34 +0100 Subject: [PATCH 1692/2134] added install_symlink script --- eo/install_symlink.py.cmake | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 eo/install_symlink.py.cmake diff --git a/eo/install_symlink.py.cmake b/eo/install_symlink.py.cmake new file mode 100755 index 000000000..274470577 --- /dev/null +++ b/eo/install_symlink.py.cmake @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +#NAME = "@PROJECT_NAME@" +NAME = "eo" +SOURCE = "@CMAKE_SOURCE_DIR@" +BINARY = "@CMAKE_BINARY_DIR@" +PREFIX = "/usr" + +LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"] + +import os, sys + +def isroot(): + if os.getuid() != 0: + print '[WARNING] you have to be root' + return False + return True + +def uninstall(): + # remove libraries' symlink + for lib in LIBRARIES: + os.remove( "%s/lib/%s" % (PREFIX, lib) ) + + # remove headers' symlink + os.remove( "%s/include/%s" % (PREFIX,NAME) ) + + # remove doc's symlink + os.remove( "%s/share/%s/doc" % (PREFIX, NAME) ) + + # remove share directory + os.rmdir( "%s/share/%s" % (PREFIX, NAME) ) + + # remove pkgconfig's symlink + os.remove( "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME) ) + + print 'All symlinks have been removed.' + +def install(): + # create symlink for libraries + for lib in LIBRARIES: + os.symlink( "%s/lib/%s" % (BINARY, lib), "%s/lib/%s" % (PREFIX, lib) ) + + # create symlink for headers + os.symlink( "%s/src" % SOURCE, "%s/include/%s" % (PREFIX,NAME) ) + + # create share directory + os.mkdir( "%s/share/%s" % (PREFIX, NAME) ) + + # create symlink for doc + os.symlink( "%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME) ) + + # create symlink for pkgconfig + os.symlink( "%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME) ) + + print 'All symlinks have been installed.' + +if __name__ == '__main__': + if not isroot(): + sys.exit() + + if len(sys.argv) < 2: + print 'Usage: %s [install|uninstall]' % sys.argv[0] + sys.exit() + + if sys.argv[1] == 'install': install() + elif sys.argv[1] == 'uninstall': uninstall() From f5db4b56dc06bb348912a72ba18888c56892c33e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Dec 2010 17:25:40 +0100 Subject: [PATCH 1693/2134] changed cmakelists.txt to generate install symlink script --- eo/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index ca2f8580a..891c0251e 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -59,6 +59,9 @@ INCLUDE(Dart OPTIONNAL) # now create config headers CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) +# now create config install_symlink script file +CONFIGURE_FILE(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py) + # Set a special flag if the environment is windows (should do the same in a config.g file) IF (WIN32) ADD_DEFINITIONS(-D_WINDOWS=1) From 6e2041d58a0bc82f4999003c3e29f837fe68dde0 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Dec 2010 18:23:45 +0100 Subject: [PATCH 1694/2134] * now symlink script more generic --- eo/install_symlink.py.cmake | 52 ++++++++++++++----------------------- 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/eo/install_symlink.py.cmake b/eo/install_symlink.py.cmake index 274470577..0a867f4b0 100755 --- a/eo/install_symlink.py.cmake +++ b/eo/install_symlink.py.cmake @@ -6,7 +6,16 @@ SOURCE = "@CMAKE_SOURCE_DIR@" BINARY = "@CMAKE_BINARY_DIR@" PREFIX = "/usr" +DATA = { + 'dirs': [ "%s/share/%s" % (PREFIX, NAME) ], + 'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)), + ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), + ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), + ] + } + LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"] +DATA['links'] += [ ("%s/lib/%s" % (BINARY, lib), "%s/lib/%s" % (PREFIX, lib)) for lib in LIBRARIES ] import os, sys @@ -17,50 +26,27 @@ def isroot(): return True def uninstall(): - # remove libraries' symlink - for lib in LIBRARIES: - os.remove( "%s/lib/%s" % (PREFIX, lib) ) - - # remove headers' symlink - os.remove( "%s/include/%s" % (PREFIX,NAME) ) - - # remove doc's symlink - os.remove( "%s/share/%s/doc" % (PREFIX, NAME) ) - - # remove share directory - os.rmdir( "%s/share/%s" % (PREFIX, NAME) ) - - # remove pkgconfig's symlink - os.remove( "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME) ) - + for dummy, link in DATA['links']: os.remove(link) + for dirname in DATA['dirs']: os.rmdir(dirname) print 'All symlinks have been removed.' def install(): - # create symlink for libraries - for lib in LIBRARIES: - os.symlink( "%s/lib/%s" % (BINARY, lib), "%s/lib/%s" % (PREFIX, lib) ) - - # create symlink for headers - os.symlink( "%s/src" % SOURCE, "%s/include/%s" % (PREFIX,NAME) ) - - # create share directory - os.mkdir( "%s/share/%s" % (PREFIX, NAME) ) - - # create symlink for doc - os.symlink( "%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME) ) - - # create symlink for pkgconfig - os.symlink( "%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME) ) - + for dirname in DATA['dirs']: os.mkdir(dirname) + for src, dst in DATA['links']: os.symlink(src, dst) print 'All symlinks have been installed.' +def data(): + from pprint import pprint + pprint(DATA, width=200) + if __name__ == '__main__': if not isroot(): sys.exit() if len(sys.argv) < 2: - print 'Usage: %s [install|uninstall]' % sys.argv[0] + print 'Usage: %s [install|uninstall|data]' % sys.argv[0] sys.exit() if sys.argv[1] == 'install': install() elif sys.argv[1] == 'uninstall': uninstall() + elif sys.argv[1] == 'data': data() From 13cf3dbc1431c3e78d09ab7e165a5999b9815d99 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 22 Dec 2010 18:25:44 +0100 Subject: [PATCH 1695/2134] missing include of the eoLogger header --- eo/src/eoMerge.h | 1 + eo/src/eoReduce.h | 1 + 2 files changed, 2 insertions(+) diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 1e2b2bf45..01ada3f90 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -33,6 +33,7 @@ // EO includes #include // eoPop #include // eoMerge +#include /** * eoMerge: Base class for elitist replacement algorithms. diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 8783c59f5..7b51d586a 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -34,6 +34,7 @@ #include // eoPop #include // eoReduce #include +#include /** * eoReduce: .reduce the new generation to the specified size From 9e93f5248116a2e1e49925649d5326be4bbf2155 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 22 Dec 2010 18:29:30 +0100 Subject: [PATCH 1696/2134] const parameter + intermediate reused variable --- eo/src/eoEvalUserTimeThrowException.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index d47c064ae..57678d888 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -39,7 +39,7 @@ template< class EOT > class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > { public: - eoEvalUserTimeThrowException( eoEvalFunc & func, long max ) : _max(max), eoEvalFuncCounter( func, "CPU-user") {} + eoEvalUserTimeThrowException( eoEvalFunc & func, const long max ) : _max(max), eoEvalFuncCounter( func, "CPU-user") {} virtual void operator() ( EOT & eo ) { @@ -47,8 +47,9 @@ public: getrusage(RUSAGE_SELF,&_usage); - if( _usage.ru_utime.tv_sec >= _max ) { - throw eoMaxTimeException( _usage.ru_utime.tv_sec ); + long current = _usage.ru_utime.tv_sec; + if( current >= _max ) { + throw eoMaxTimeException( current ); } else { func(eo); } @@ -56,6 +57,6 @@ public: } protected: - long _max; + const long _max; struct rusage _usage; }; From 5fe07abc6c51db4802ebd507d86ceb73ab7c1bb6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 23 Dec 2010 12:22:29 +0100 Subject: [PATCH 1697/2134] + add the value() method in eoParam used by dae --- eo/src/utils/eoParam.h | 46 +++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 1eb97b306..868507cf7 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -169,32 +169,46 @@ public : eoParam::defValue(getValue()); } - /** Parameter value + /** Get a reference on the parameter value @return parameter value */ - ValueType& value() - { return repValue; } + ValueType& value() { return repValue; } - /** Parameter value + /** Get a const reference on the parameter value @overload @return parameter value */ - const ValueType& value() const - { return repValue; } + const ValueType& value() const { return repValue; } + /** Change the parameter value + */ + void value( ValueType val ) + { + // convert to string + std::ostringstream os; + os << val; + + // convert to ValueType + std::istringstream is( os.str() ); + is >> repValue; + } + + + /** Get the string representation of the value + */ std::string getValue(void) const - { - std::ostringstream os; - os << repValue; - return os.str(); - } + { + std::ostringstream os; + os << repValue; + return os.str(); + } - /** @brief Set value according to the speciied string + /** @brief Set the value according to the speciied string For scalar types the textual represenation is typically quite straigtforward. @@ -208,10 +222,10 @@ public : @param _value Textual representation of the new value */ void setValue(const std::string& _value) - { - std::istringstream is(_value); - is >> repValue; - } + { + std::istringstream is(_value); + is >> repValue; + } protected: From 821c22e1d5a78c92f1879c3fcf8b886bafa610c4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 23 Dec 2010 14:31:34 +0100 Subject: [PATCH 1698/2134] fixed a mistake in cflags setting about openmp flags --- eo/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 7bdcdba49..6999bd364 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -46,8 +46,8 @@ ENABLE_LANGUAGE(C) FIND_PACKAGE(OpenMP REQUIRED) IF(OPENMP_FOUND) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_CXX_FLAGS}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_C_FLAGS}") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ENDIF() INCLUDE(CMakeBackwardCompatibilityCXX) From 4c561f9cecc220ccb3fb5c7958bb50d580c76d74 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 20 Jan 2011 19:07:41 +0100 Subject: [PATCH 1699/2134] - removed t-eoDualFitness from test/CMakeLists.txt because it fails --- eo/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 8536ee0c8..f4ed98543 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -65,7 +65,7 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat - t-eoDualFitness + #t-eoDualFitness t-eoParser ) From f5ead806f6fe5c18222bffa564622fd7639e0d75 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 14 Dec 2010 15:27:26 +0100 Subject: [PATCH 1700/2134] add the parser/logger to the general header --- eo/src/eo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eo b/eo/src/eo index cf18f3ea0..7c988f1c9 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -198,6 +198,8 @@ #include #include +#include + //----------------------------------------------------------------------------- #endif From 60bc4b3b96220222105e3606a732724be14eeb9e Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Dec 2010 15:50:26 +0100 Subject: [PATCH 1701/2134] evaluator that throw an exception if a maximum CPU user time has been reached, for POSIX systems --- eo/NEWS | 5 ++- eo/src/eo | 1 + eo/src/eoEvalUserTimeThrowException.h | 61 +++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 eo/src/eoEvalUserTimeThrowException.h diff --git a/eo/NEWS b/eo/NEWS index 50e256087..0f067e003 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,4 +1,7 @@ -* release 1.1 (not yet released) +* current + - evaluators that throw an exception if a maximum time has en reached (wallclock and CPU user time for POSIX systems), independently of the number of generations + +* release 1.1 - provide cmake build system, remove the old autotools one - package generation system - GCC 4.3 compatibility diff --git a/eo/src/eo b/eo/src/eo index 7c988f1c9..89ed7da98 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -77,6 +77,7 @@ #include #include #include +#include // Continuators - all include eoContinue.h #include diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h new file mode 100644 index 000000000..d47c064ae --- /dev/null +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -0,0 +1,61 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann DrĂ©o +*/ + +#include +#include + +#include + +/** Check at each evaluation if a given CPU user time contract has been reached. + * + * Throw an eoMaxTimeException if the given max time has been reached. + * Usefull if you want to end the search independently of generations. + * This class uses (almost-)POSIX headers. + * It uses a computation of the user time used on the CPU. For a wallclock time measure, see eoEvalTimeThrowException + * + * @ingroup Evaluation + */ +template< class EOT > +class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > +{ +public: + eoEvalUserTimeThrowException( eoEvalFunc & func, long max ) : _max(max), eoEvalFuncCounter( func, "CPU-user") {} + + virtual void operator() ( EOT & eo ) + { + if( eo.invalid() ) { + + getrusage(RUSAGE_SELF,&_usage); + + if( _usage.ru_utime.tv_sec >= _max ) { + throw eoMaxTimeException( _usage.ru_utime.tv_sec ); + } else { + func(eo); + } + } + } + +protected: + long _max; + struct rusage _usage; +}; From fbc212f80d2a49f45cc35ab7f9f890dbdc1815d1 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 16 Dec 2010 15:51:28 +0100 Subject: [PATCH 1702/2134] set the version to 1.1.1-edge --- eo/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 6999bd364..548f1b548 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -15,11 +15,11 @@ INCLUDE(eo-conf.cmake OPTIONAL) PROJECT(EO) SET(PROJECT_VERSION_MAJOR 1) -SET(PROJECT_VERSION_MINOR 02) +SET(PROJECT_VERSION_MINOR 1) SET(PROJECT_VERSION_PATCH 1) SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" CACHE STRING "Package version" FORCE) -SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" CACHE STRING "Global version" FORCE) -SET(VERSION "1.02" CACHE STRING "Global version" FORCE) +#SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" CACHE STRING "Global version" FORCE) +SET(VERSION "1.1.1-edge" CACHE STRING "Global version" FORCE) SET(GLOBAL_VERSION "${VERSION}") SET(PACKAGE_BUGREPORT "eodev-help@sourceforge.net" CACHE STRING "Package bug report" FORCE) From 07c22771cf03de2d97a01f6aaa9e02a1053df2db Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 23 Dec 2010 18:09:25 +0100 Subject: [PATCH 1703/2134] + now you are able to enable or not parallelization with the option --parallelize-loops=1|0 --- eo/src/apply.h | 14 +++++++++----- eo/src/utils/eoParser.cpp | 7 +++++++ eo/src/utils/eoParser.h | 6 ++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 2cd977b08..41d96adba 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -26,6 +26,7 @@ #ifndef _apply_h #define _apply_h +#include #include #include @@ -37,7 +38,8 @@ template void apply(eoUF& _proc, std::vector& _pop) { - for (unsigned i = 0; i < _pop.size(); ++i) + size_t size = _pop.size(); + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } @@ -52,8 +54,9 @@ void apply(eoUF& _proc, std::vector& _pop) template void omp_apply(eoUF& _proc, std::vector& _pop) { -#pragma omp parallel for default(none) shared(_proc, _pop) - for (unsigned i = 0; i < _pop.size(); ++i) + size_t size = _pop.size(); +#pragma omp parallel for if(eo::parallelizeLoopParam.value()) //default(none) shared(_proc, _pop, size) + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } @@ -67,8 +70,9 @@ void omp_apply(eoUF& _proc, std::vector& _pop) template void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) { -#pragma omp parallel for default(none) shared(_proc, _pop) schedule(dynamic) - for (unsigned i = 0; i < _pop.size(); ++i) + size_t size = _pop.size(); +#pragma omp parallel for if(eo::parallelizeLoopParam.value()) schedule(dynamic) //default(none) shared(_proc, _pop, size) + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index f6c81f14a..f7c2aac4c 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -61,6 +61,9 @@ eoParameterLoader::~eoParameterLoader() } } +//multithreading +eoValueParam eo::parallelizeLoopParam = eoValueParam(false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0'); +//multithreading ends eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : @@ -99,6 +102,10 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, readFrom(stream); processParam(needHelp); processParam(stopOnUnknownParam); + + //multithreading + processParam(eo::parallelizeLoopParam); + //multithreading ends } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index bb8e5811a..073d1a3e3 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -93,6 +93,12 @@ private : }; +//multithreading +namespace eo +{ + extern eoValueParam parallelizeLoopParam; +} +//multithreading ends /** eoParser: command line parser and configuration file reader From 64f36841be3bd8811f243c2be30be39194adde41 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 23 Dec 2010 23:03:02 +0100 Subject: [PATCH 1704/2134] added measure into apply function --- eo/src/apply.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eo/src/apply.h b/eo/src/apply.h index 41d96adba..deb13da86 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -29,6 +29,7 @@ #include #include #include +#include /** Applies a unary function to a std::vector of things. @@ -38,11 +39,18 @@ template void apply(eoUF& _proc, std::vector& _pop) { + double t1 = omp_get_wtime(); + size_t size = _pop.size(); +#pragma omp parallel for if(eo::parallelizeLoopParam.value()) //default(none) shared(_proc, _pop, size) for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + + double t2 = omp_get_wtime(); + + eo::log << eo::logging << "### apply called cost: " << t2 - t1 << std::endl; } /** From 40817a09312b3b65b3c7d05b961a9e79258a9093 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 26 Dec 2010 19:09:08 +0100 Subject: [PATCH 1705/2134] * changed apply.h to use new parallelization s parameters --- eo/src/apply.h | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index deb13da86..d8bc9796d 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -26,7 +26,7 @@ #ifndef _apply_h #define _apply_h -#include +#include #include #include #include @@ -39,14 +39,22 @@ template void apply(eoUF& _proc, std::vector& _pop) { + size_t size = _pop.size(); + double t1 = omp_get_wtime(); - size_t size = _pop.size(); -#pragma omp parallel for if(eo::parallelizeLoopParam.value()) //default(none) shared(_proc, _pop, size) - for (size_t i = 0; i < size; ++i) - { - _proc(_pop[i]); - } + if (!eo::parallel.isDynamic()) + { +#pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size) + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + } + else + { +#pragma omp parallel for schedule(dynamic) if(eo::parallel.isEnabled()) + //doesnot work with gcc 4.1.2 + //default(none) shared(_proc, _pop, size) + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + } double t2 = omp_get_wtime(); @@ -63,7 +71,9 @@ template void omp_apply(eoUF& _proc, std::vector& _pop) { size_t size = _pop.size(); -#pragma omp parallel for if(eo::parallelizeLoopParam.value()) //default(none) shared(_proc, _pop, size) +#pragma omp parallel for if(eo::parallel.isEnabled()) + //doesnot work with gcc 4.1.2 + //default(none) shared(_proc, _pop, size) for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); @@ -79,7 +89,9 @@ template void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) { size_t size = _pop.size(); -#pragma omp parallel for if(eo::parallelizeLoopParam.value()) schedule(dynamic) //default(none) shared(_proc, _pop, size) +#pragma omp parallel for if(eo::parallel.isEnabled()) schedule(dynamic) + //doesnot work with gcc 4.1.2 + //default(none) shared(_proc, _pop, size) for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); From 63d28c1c791ff11187e3a13ea4b74df325197060 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 26 Dec 2010 19:11:00 +0100 Subject: [PATCH 1706/2134] + created new eoParallel class with a global variable eo::parallel in order to store all parameters tied to parallelization and to access from anywhere --- eo/src/utils/eoParallel.cpp | 55 ++++++++++++++++++++++++++ eo/src/utils/eoParallel.h | 77 +++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 eo/src/utils/eoParallel.cpp create mode 100644 eo/src/utils/eoParallel.h diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp new file mode 100644 index 000000000..d85855921 --- /dev/null +++ b/eo/src/utils/eoParallel.cpp @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* + +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + Caner Candan + +*/ + +#include "eoParallel.h" + +eoParallel::eoParallel() + : _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), + _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), + _prefix( "results", "parallelize-prefix", "Enable dynamic memory shared parallelization", '\0' ) +{} + +std::string eoParallel::className() const +{ + return "eoParallel"; +} + +void eoParallel::_createParameters( eoParser& parser ) +{ + std::string section("Parallelization"); + + parser.processParam( _isEnabled, section ); + parser.processParam( _isDynamic, section ); + parser.processParam( _prefix, section ); +} + +void make_parallel(eoParser& parser) +{ + eo::parallel._createParameters( parser ); +} + +eoParallel eo::parallel; diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h new file mode 100644 index 000000000..397bb5f0d --- /dev/null +++ b/eo/src/utils/eoParallel.h @@ -0,0 +1,77 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Caner Candan + +*/ + +/** @defgroup Parallel Parallel + * @ingroup Utilities +@{ +*/ + +#ifndef eoParallel_h +#define eoParallel_h + +#include "eoObject.h" +#include "eoParser.h" + +/** + * eoParallel + * Class providing parameters for parallelization + * Use of a global variable eo::parallel to easily use the parallelization parameters anywhere + */ +class eoParallel : public eoObject +{ +public: + eoParallel(); + + virtual std::string className() const; + + inline bool isEnabled() { return _isEnabled.value(); } + inline bool isDynamic() { return _isDynamic.value(); } + inline std::string prefix() { return _prefix.value(); } + + friend void make_parallel(eoParser&); + +private: + void _createParameters( eoParser& ); + +private: + eoValueParam _isEnabled; + eoValueParam _isDynamic; + eoValueParam _prefix; +}; + +void make_parallel(eoParser&); + +namespace eo +{ + /** + * parallel is an external global variable defined in order to use where ever you want the parallel parameters + */ + extern eoParallel parallel; +} + +/** @} */ + +#endif // !eoParallel_h From b7379050bc79037a09ffe4ea6dbb5accb5565864 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 26 Dec 2010 19:12:20 +0100 Subject: [PATCH 1707/2134] * updated cmakelists.txt to compile new eoParallel class --- eo/src/utils/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/CMakeLists.txt b/eo/src/utils/CMakeLists.txt index ec70053b5..94f994d2b 100644 --- a/eo/src/utils/CMakeLists.txt +++ b/eo/src/utils/CMakeLists.txt @@ -27,7 +27,8 @@ SET (EOUTILS_SOURCES eoData.cpp make_help.cpp pipecom.cpp eoLogger.cpp - eoParserLogger.cpp) + eoParserLogger.cpp + eoParallel.cpp) ADD_LIBRARY(eoutils STATIC ${EOUTILS_SOURCES}) From 85fdbe6aba82b0c8d3ff90856dcb3c19a9513efd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 26 Dec 2010 19:13:43 +0100 Subject: [PATCH 1708/2134] - removed old parallelization parameters from the old-style from eoParser class --- eo/src/utils/eoParser.cpp | 8 -------- eo/src/utils/eoParser.h | 7 ------- 2 files changed, 15 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index f7c2aac4c..23970023d 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -61,10 +61,6 @@ eoParameterLoader::~eoParameterLoader() } } -//multithreading -eoValueParam eo::parallelizeLoopParam = eoValueParam(false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0'); -//multithreading ends - eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : programName(_argv[0]), @@ -102,10 +98,6 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, readFrom(stream); processParam(needHelp); processParam(stopOnUnknownParam); - - //multithreading - processParam(eo::parallelizeLoopParam); - //multithreading ends } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 073d1a3e3..adce90173 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -93,13 +93,6 @@ private : }; -//multithreading -namespace eo -{ - extern eoValueParam parallelizeLoopParam; -} -//multithreading ends - /** eoParser: command line parser and configuration file reader This class is persistent, so it can be stored and reloaded to restore From 7b87e4107215dfe33a518e391f47658984d6cf86 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 26 Dec 2010 19:19:20 +0100 Subject: [PATCH 1709/2134] * added eoParallel header inclusion to eo --- eo/src/eo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eo b/eo/src/eo index 89ed7da98..14dc831cd 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -201,6 +201,8 @@ #include +#include + //----------------------------------------------------------------------------- #endif From 16e6e7f3b7c7c0371ce02bf72af7eb4efd8dd945 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Dec 2010 16:41:14 +0100 Subject: [PATCH 1710/2134] * apply.h: now results stored to a filename defined with parallelization parameters --- eo/src/apply.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index d8bc9796d..cb46c11d7 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -58,7 +58,8 @@ void apply(eoUF& _proc, std::vector& _pop) double t2 = omp_get_wtime(); - eo::log << eo::logging << "### apply called cost: " << t2 - t1 << std::endl; + eoLogger log; + log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; } /** From 388d81b1ff7737f95aaa3f4ef8f001a0cd90d53b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Dec 2010 16:42:53 +0100 Subject: [PATCH 1711/2134] * updated eoParallel class in order to define the result filename according to the parallelization mode --- eo/src/utils/eoParallel.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index d85855921..ddfec8fb6 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -44,7 +44,35 @@ void eoParallel::_createParameters( eoParser& parser ) parser.processParam( _isEnabled, section ); parser.processParam( _isDynamic, section ); + + std::string default_value( _prefix.defValue() ); + + if ( _isEnabled.value() ) + { + if ( _isDynamic.value() ) + { + default_value += "_dynamic.out"; + } + else + { + default_value += "_parallel.out"; + } + } + else + { + default_value += "_sequential.out"; + } + + _prefix.defValue( default_value ); + + std::cout << "defvalue: " << _prefix.defValue() << std::endl; + parser.processParam( _prefix, section ); + + std::cout << "value: " << parser.getParamWithLongName("parallelize-prefix")->getValue() << std::endl; + + std::cout << "defvalue: " << _prefix.defValue() << std::endl; + } void make_parallel(eoParser& parser) From bd88da01f769cdec3278955f61039ba6d3d1ffe6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Dec 2010 16:43:44 +0100 Subject: [PATCH 1712/2134] + added a test file for eoParallel class --- eo/test/CMakeLists.txt | 1 + eo/test/t-eoParallel.cpp | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 eo/test/t-eoParallel.cpp diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 220063504..436c4503c 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -65,6 +65,7 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat + t-eoParallel t-openmp ) diff --git a/eo/test/t-eoParallel.cpp b/eo/test/t-eoParallel.cpp new file mode 100644 index 000000000..055f45987 --- /dev/null +++ b/eo/test/t-eoParallel.cpp @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------- +// t-eoParallel.cpp +//----------------------------------------------------------------------------- + +#include +#include +//#include +#include "real_value.h" + +//----------------------------------------------------------------------------- + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + unsigned int popSize = parser.getORcreateParam((unsigned int)100, "popSize", "Population Size", 'P', "Evolution Engine").value(); + unsigned int dimSize = parser.getORcreateParam((unsigned int)10, "dimSize", "Dimension Size", 'd', "Evolution Engine").value(); + + uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); + if (seedParam == 0) { seedParam = time(0); } + + make_parallel(parser); + make_help(parser); + + rng.reseed( seedParam ); + + eoUniformGenerator< double > gen(-5, 5); + eoInitFixedLength< EOT > init( dimSize, gen ); + + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); + eoEvalFuncCounter< EOT > eval( mainEval ); + + eoPop< EOT > pop( popSize, init ); + + //apply< EOT >( eval, pop ); + eoPopLoopEval< EOT > popEval( eval ); + popEval( pop, pop ); + + eo::log << eo::quiet << "DONE!" << std::endl; + + return 0; +} + +//----------------------------------------------------------------------------- From 2013d57fe8bfd397388846079e32f2eb0aff0f3c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Dec 2010 22:54:10 +0100 Subject: [PATCH 1713/2134] fixed an issue in eoParallel class --- eo/src/utils/eoParallel.cpp | 30 ++++++++++++------------------ eo/src/utils/eoParallel.h | 7 ++++--- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index ddfec8fb6..d3fd2d665 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -38,41 +38,35 @@ std::string eoParallel::className() const return "eoParallel"; } -void eoParallel::_createParameters( eoParser& parser ) +std::string eoParallel::prefix() const { - std::string section("Parallelization"); - - parser.processParam( _isEnabled, section ); - parser.processParam( _isDynamic, section ); - - std::string default_value( _prefix.defValue() ); + std::string value( _prefix.value() ); if ( _isEnabled.value() ) { if ( _isDynamic.value() ) { - default_value += "_dynamic.out"; + value += "_dynamic.out"; } else { - default_value += "_parallel.out"; + value += "_parallel.out"; } } else { - default_value += "_sequential.out"; + value += "_sequential.out"; } - _prefix.defValue( default_value ); - - std::cout << "defvalue: " << _prefix.defValue() << std::endl; + return value; +} +void eoParallel::_createParameters( eoParser& parser ) +{ + std::string section("Parallelization"); + parser.processParam( _isEnabled, section ); + parser.processParam( _isDynamic, section ); parser.processParam( _prefix, section ); - - std::cout << "value: " << parser.getParamWithLongName("parallelize-prefix")->getValue() << std::endl; - - std::cout << "defvalue: " << _prefix.defValue() << std::endl; - } void make_parallel(eoParser& parser) diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 397bb5f0d..4e13f8b31 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -47,9 +47,10 @@ public: virtual std::string className() const; - inline bool isEnabled() { return _isEnabled.value(); } - inline bool isDynamic() { return _isDynamic.value(); } - inline std::string prefix() { return _prefix.value(); } + inline bool isEnabled() const { return _isEnabled.value(); } + inline bool isDynamic() const { return _isDynamic.value(); } + + std::string prefix() const; friend void make_parallel(eoParser&); From 6ecfab080248c30a5cad2be2e5581341a7ab7a95 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 5 Jan 2011 16:07:08 +0100 Subject: [PATCH 1714/2134] * --parallelize-prefix parameter description --- eo/src/utils/eoParallel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index d3fd2d665..3ab25e7f5 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -30,7 +30,7 @@ Authors: eoParallel::eoParallel() : _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), - _prefix( "results", "parallelize-prefix", "Enable dynamic memory shared parallelization", '\0' ) + _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ) {} std::string eoParallel::className() const From 7357e2a54f31efacc692ee79c05290df91ea93d4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 6 Jan 2011 09:16:01 +0100 Subject: [PATCH 1715/2134] * a little update tu be compatible with gnuplot --- eo/src/apply.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index cb46c11d7..175ce51d5 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -59,7 +59,7 @@ void apply(eoUF& _proc, std::vector& _pop) double t2 = omp_get_wtime(); eoLogger log; - log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; + log << eo::file(eo::parallel.prefix()) << t2 - t1 << std::endl; } /** From 914842253657988a126e2a866833c6666e585e3f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 26 Jan 2011 18:09:37 +0100 Subject: [PATCH 1716/2134] * doc: solved some mistakes Conflicts: eo/doc/index.h --- eo/doc/index.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/doc/index.h b/eo/doc/index.h index 2fad16e2f..52a5758cf 100644 --- a/eo/doc/index.h +++ b/eo/doc/index.h @@ -43,17 +43,17 @@ massively use templates, so that you will not be limited by interfaces when using your own representation. Once you have a representation, you will build your own evolutionary algorithm -by assembling @ref Operators in @ref Algorithms. +by assembling @ref Operators in @ref Algorithms. In %EO, most of the objects are functors, that is classes with an operator(), that you -can call just as if they were classical functions. For example, an algorithm is a -functor, that manipulate a population of individuals, it will be implemented as a functor, +can call just as if they were classical functions. For example, an algorithm is a +functor, that manipulate a population of individuals, it will be implemented as a functor, with a member like: operator()(eoPop). Once called on a given population, it will search for the optimum of a given problem. Generally, operators are instanciated once and then binded in an algorithm by reference. Thus, you can easily build your own algorithm by trying several combination of operators. -For a more detailled introduction to the design of %EO you can look at the +For a more detailled introduction to the design of %EO you can look at the slides from a talk at EA 2001 or at the corresponding article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th European Conference on Artificial Evolution: - http://portal.acm.org/citation.cfm?id=727742 From df01e1790e785467bb5aa25e1888b2941bc4c662 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 22 Dec 2010 13:40:49 +0100 Subject: [PATCH 1717/2134] * package dependancies changed --- eo/Packaging.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/Packaging.cmake b/eo/Packaging.cmake index c9e2d44b1..de81fadc3 100644 --- a/eo/Packaging.cmake +++ b/eo/Packaging.cmake @@ -67,7 +67,7 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${ ### 4) Set up debian packaging information ###################################################################################### -SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, libxml2, libmpich2-1.2") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, g++") SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") From 9f8521f0862fdce26c2e434b4ec89026ae980047 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 23 Dec 2010 12:22:29 +0100 Subject: [PATCH 1718/2134] + add the value() method in eoParam used by dae --- eo/src/utils/eoParam.h | 46 +++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 1eb97b306..868507cf7 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -169,32 +169,46 @@ public : eoParam::defValue(getValue()); } - /** Parameter value + /** Get a reference on the parameter value @return parameter value */ - ValueType& value() - { return repValue; } + ValueType& value() { return repValue; } - /** Parameter value + /** Get a const reference on the parameter value @overload @return parameter value */ - const ValueType& value() const - { return repValue; } + const ValueType& value() const { return repValue; } + /** Change the parameter value + */ + void value( ValueType val ) + { + // convert to string + std::ostringstream os; + os << val; + + // convert to ValueType + std::istringstream is( os.str() ); + is >> repValue; + } + + + /** Get the string representation of the value + */ std::string getValue(void) const - { - std::ostringstream os; - os << repValue; - return os.str(); - } + { + std::ostringstream os; + os << repValue; + return os.str(); + } - /** @brief Set value according to the speciied string + /** @brief Set the value according to the speciied string For scalar types the textual represenation is typically quite straigtforward. @@ -208,10 +222,10 @@ public : @param _value Textual representation of the new value */ void setValue(const std::string& _value) - { - std::istringstream is(_value); - is >> repValue; - } + { + std::istringstream is(_value); + is >> repValue; + } protected: From aa214e78553d9178ec754e8b22703fb333936b42 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 26 Jan 2011 18:10:34 +0100 Subject: [PATCH 1719/2134] - removed t-eoDualFitness from test/CMakeLists.txt because it fails Conflicts: eo/test/CMakeLists.txt --- eo/test/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 436c4503c..4e68b02ad 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -67,6 +67,8 @@ SET (TEST_LIST t-eoIQRStat t-eoParallel t-openmp + #t-eoDualFitness + t-eoParser ) From 007c29e7361fd50b611d84b05bf637a92c5e1bc1 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:25:22 +0100 Subject: [PATCH 1720/2134] add the parser/logger to the general header Conflicts: eo/src/eo --- eo/src/eo | 2 -- 1 file changed, 2 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 14dc831cd..18e91d601 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -203,8 +203,6 @@ #include -//----------------------------------------------------------------------------- - #endif // Local Variables: From ecd8f7ec0336e2e22185796d9eb29b26063bce4b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:29:09 +0100 Subject: [PATCH 1721/2134] + now you are able to enable or not parallelization with the option --parallelize-loops=1|0 Conflicts: eo/src/apply.h eo/src/utils/eoParser.cpp eo/src/utils/eoParser.h --- eo/src/apply.h | 1 + eo/src/utils/eoParser.cpp | 4 ++++ eo/src/utils/eoParser.h | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 175ce51d5..bba8adc86 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -27,6 +27,7 @@ #define _apply_h #include +#include #include #include #include diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 23970023d..34726c811 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -98,6 +98,10 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, readFrom(stream); processParam(needHelp); processParam(stopOnUnknownParam); + + //multithreading + processParam(eo::parallelizeLoopParam); + //multithreading ends } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index adce90173..a96ec1be2 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -92,7 +92,6 @@ private : std::vector ownedParams; }; - /** eoParser: command line parser and configuration file reader This class is persistent, so it can be stored and reloaded to restore From a3dda50b8fc25f6e9dc0ac77ee4aa371e0d8e73a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:30:40 +0100 Subject: [PATCH 1722/2134] added measure into apply function Conflicts: eo/src/apply.h --- eo/src/apply.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index bba8adc86..9e112cdc3 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -40,9 +40,8 @@ template void apply(eoUF& _proc, std::vector& _pop) { - size_t size = _pop.size(); - double t1 = omp_get_wtime(); + size_t size = _pop.size(); if (!eo::parallel.isDynamic()) { From 48115ee2f00843dc25c11dbd88fb7fa7841a51a2 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:31:28 +0100 Subject: [PATCH 1723/2134] * changed apply.h to use new parallelization s parameters Conflicts: eo/src/apply.h --- eo/src/apply.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 9e112cdc3..bba8adc86 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -40,9 +40,10 @@ template void apply(eoUF& _proc, std::vector& _pop) { - double t1 = omp_get_wtime(); size_t size = _pop.size(); + double t1 = omp_get_wtime(); + if (!eo::parallel.isDynamic()) { #pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size) From 5f67e0e151687a7ab1091a1fe4160aa1118758db Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:35:49 +0100 Subject: [PATCH 1724/2134] - removed old parallelization parameters from the old-style from eoParser class Conflicts: eo/src/utils/eoParser.h --- eo/src/utils/eoParser.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 34726c811..23970023d 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -98,10 +98,6 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, readFrom(stream); processParam(needHelp); processParam(stopOnUnknownParam); - - //multithreading - processParam(eo::parallelizeLoopParam); - //multithreading ends } From 03600594c4275d5cf62f2d2fab7212e79c28e2ca Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Dec 2010 16:42:53 +0100 Subject: [PATCH 1725/2134] * updated eoParallel class in order to define the result filename according to the parallelization mode --- eo/src/utils/eoParallel.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index 3ab25e7f5..c590c7ade 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -66,7 +66,35 @@ void eoParallel::_createParameters( eoParser& parser ) std::string section("Parallelization"); parser.processParam( _isEnabled, section ); parser.processParam( _isDynamic, section ); + + std::string default_value( _prefix.defValue() ); + + if ( _isEnabled.value() ) + { + if ( _isDynamic.value() ) + { + default_value += "_dynamic.out"; + } + else + { + default_value += "_parallel.out"; + } + } + else + { + default_value += "_sequential.out"; + } + + _prefix.defValue( default_value ); + + std::cout << "defvalue: " << _prefix.defValue() << std::endl; + parser.processParam( _prefix, section ); + + std::cout << "value: " << parser.getParamWithLongName("parallelize-prefix")->getValue() << std::endl; + + std::cout << "defvalue: " << _prefix.defValue() << std::endl; + } void make_parallel(eoParser& parser) From c8ecdb4beecf740a39352051d5312157acee3c3b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:39:15 +0100 Subject: [PATCH 1726/2134] fixed an issue in eoParallel class Conflicts: eo/src/utils/eoParallel.cpp --- eo/src/utils/eoParallel.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index c590c7ade..3ab25e7f5 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -66,35 +66,7 @@ void eoParallel::_createParameters( eoParser& parser ) std::string section("Parallelization"); parser.processParam( _isEnabled, section ); parser.processParam( _isDynamic, section ); - - std::string default_value( _prefix.defValue() ); - - if ( _isEnabled.value() ) - { - if ( _isDynamic.value() ) - { - default_value += "_dynamic.out"; - } - else - { - default_value += "_parallel.out"; - } - } - else - { - default_value += "_sequential.out"; - } - - _prefix.defValue( default_value ); - - std::cout << "defvalue: " << _prefix.defValue() << std::endl; - parser.processParam( _prefix, section ); - - std::cout << "value: " << parser.getParamWithLongName("parallelize-prefix")->getValue() << std::endl; - - std::cout << "defvalue: " << _prefix.defValue() << std::endl; - } void make_parallel(eoParser& parser) From 3d06d4a42a6dae784e11eaaad07efc3fb3499e3f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 10:43:13 +0100 Subject: [PATCH 1727/2134] + eoParallel: nthreads option * apply.h: mangled the openmp code with pre-processing conditions --- eo/src/apply.h | 12 +++++++++++- eo/src/utils/eoParallel.cpp | 12 +++++++----- eo/src/utils/eoParallel.h | 6 ++++-- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index bba8adc86..63044c385 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -40,6 +40,10 @@ template void apply(eoUF& _proc, std::vector& _pop) { +#ifdef _OPENMP + + omp_set_num_threads(eo::parallel.nthreads()); + size_t size = _pop.size(); double t1 = omp_get_wtime(); @@ -60,7 +64,13 @@ void apply(eoUF& _proc, std::vector& _pop) double t2 = omp_get_wtime(); eoLogger log; - log << eo::file(eo::parallel.prefix()) << t2 - t1 << std::endl; + log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; + +#else // _OPENMP + + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + +#endif // !_OPENMP } /** diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index 3ab25e7f5..e267ce7f1 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -21,16 +21,17 @@ Contact: http://eodev.sourceforge.net Authors: - Caner Candan +Caner Candan */ #include "eoParallel.h" -eoParallel::eoParallel() - : _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), - _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), - _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ) +eoParallel::eoParallel() : + _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), + _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), + _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ), + _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ) {} std::string eoParallel::className() const @@ -67,6 +68,7 @@ void eoParallel::_createParameters( eoParser& parser ) parser.processParam( _isEnabled, section ); parser.processParam( _isDynamic, section ); parser.processParam( _prefix, section ); + parser.processParam( _nthreads, section ); } void make_parallel(eoParser& parser) diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 4e13f8b31..2ce9ea478 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -26,7 +26,7 @@ Caner Candan /** @defgroup Parallel Parallel * @ingroup Utilities -@{ + @{ */ #ifndef eoParallel_h @@ -52,6 +52,8 @@ public: std::string prefix() const; + inline unsigned int nthreads() const { return _nthreads.value(); } + friend void make_parallel(eoParser&); private: @@ -65,7 +67,7 @@ private: void make_parallel(eoParser&); -namespace eo +namespace eo { /** * parallel is an external global variable defined in order to use where ever you want the parallel parameters From d618ab07dfb2e98f8c798a3569b8dd976584b496 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 27 Jan 2011 11:23:23 +0100 Subject: [PATCH 1728/2134] rename everything from 'do' to 'edo' --- AUTHORS | 36 ++ CMakeLists.txt | 10 +- COPYING | 503 +++++++++++++++++- README | 8 +- application/CMakeLists.txt | 2 +- application/eda/CMakeLists.txt | 6 +- application/eda/main.cpp | 51 +- application/eda_sa/CMakeLists.txt | 6 +- application/eda_sa/main.cpp | 26 +- build_gcc_linux_debug | 2 +- build_gcc_linux_release | 2 +- do.pc | 12 - doc/CMakeLists.txt | 2 +- edo.pc | 12 + src/CMakeLists.txt | 4 +- src/do | 59 -- src/do.cpp | 8 - src/doAlgo.h | 23 - src/doBounder.h | 34 -- src/doBounderBound.h | 42 -- src/doBounderNo.h | 20 - src/doBounderRng.h | 42 -- src/doBounderUniform.h | 35 -- src/doContinue.h | 41 -- src/doDistrib.h | 23 - src/doEstimator.h | 23 - src/doEstimatorNormalMono.h | 77 --- src/doEstimatorUniform.h | 51 -- src/doModifier.h | 20 - src/doModifierDispersion.h | 23 - src/doModifierMass.h | 24 - src/doNormalMono.h | 38 -- src/doNormalMonoCenter.h | 26 - src/doNormalMultiCenter.h | 28 - src/doSampler.h | 75 --- src/doSamplerNormalMono.h | 71 --- src/doSamplerUniform.h | 76 --- src/doUniform.h | 23 - src/doUniformCenter.h | 35 -- src/doVectorBounds.h | 36 -- src/edo | 79 +++ src/edo.cpp | 28 + src/edoAlgo.h | 44 ++ src/edoBounder.h | 54 ++ src/edoBounderBound.h | 62 +++ src/edoBounderNo.h | 40 ++ src/edoBounderRng.h | 63 +++ src/edoBounderUniform.h | 55 ++ src/edoContinue.h | 61 +++ src/edoDistrib.h | 43 ++ src/{doEDA.h => edoEDA.h} | 66 ++- src/{doEDASA.h => edoEDASA.h} | 66 ++- src/edoEstimator.h | 43 ++ src/edoEstimatorNormalMono.h | 97 ++++ ...ormalMulti.h => edoEstimatorNormalMulti.h} | 45 +- src/edoEstimatorUniform.h | 71 +++ src/edoModifier.h | 41 ++ src/edoModifierDispersion.h | 43 ++ src/edoModifierMass.h | 45 ++ src/edoNormalMono.h | 58 ++ src/edoNormalMonoCenter.h | 47 ++ src/{doNormalMulti.h => edoNormalMulti.h} | 12 +- src/edoNormalMultiCenter.h | 48 ++ src/edoSampler.h | 95 ++++ src/edoSamplerNormalMono.h | 91 ++++ ...rNormalMulti.h => edoSamplerNormalMulti.h} | 59 +- src/edoSamplerUniform.h | 96 ++++ src/edoUniform.h | 43 ++ src/edoUniformCenter.h | 55 ++ src/edoVectorBounds.h | 56 ++ src/utils/CMakeLists.txt | 6 +- src/utils/doFileSnapshot.h | 74 --- src/utils/doHyperVolume.h | 32 -- src/utils/doPopStat.h | 75 --- src/utils/doStat.h | 54 -- src/utils/doStatNormalMono.h | 35 -- src/utils/doStatNormalMulti.h | 48 -- src/utils/doStatUniform.h | 35 -- src/utils/{doCheckPoint.h => edoCheckPoint.h} | 52 +- ...doFileSnapshot.cpp => edoFileSnapshot.cpp} | 61 ++- src/utils/edoFileSnapshot.h | 79 +++ src/utils/edoHyperVolume.h | 52 ++ src/utils/edoPopStat.h | 70 +++ src/utils/edoStat.h | 74 +++ src/utils/edoStatNormalMono.h | 55 ++ src/utils/edoStatNormalMulti.h | 68 +++ src/utils/edoStatUniform.h | 55 ++ test/CMakeLists.txt | 6 +- test/t-bounderno.cpp | 31 +- test/t-continue.cpp | 33 +- ...ulti.cpp => t-edoEstimatorNormalMulti.cpp} | 53 +- test/t-mean-distance.cpp | 42 +- test/t-uniform.cpp | 31 +- test/test_cov_parameters.py | 2 +- 94 files changed, 2933 insertions(+), 1531 deletions(-) create mode 100644 AUTHORS delete mode 100644 do.pc create mode 100644 edo.pc delete mode 100644 src/do delete mode 100644 src/do.cpp delete mode 100644 src/doAlgo.h delete mode 100644 src/doBounder.h delete mode 100644 src/doBounderBound.h delete mode 100644 src/doBounderNo.h delete mode 100644 src/doBounderRng.h delete mode 100644 src/doBounderUniform.h delete mode 100644 src/doContinue.h delete mode 100644 src/doDistrib.h delete mode 100644 src/doEstimator.h delete mode 100644 src/doEstimatorNormalMono.h delete mode 100644 src/doEstimatorUniform.h delete mode 100644 src/doModifier.h delete mode 100644 src/doModifierDispersion.h delete mode 100644 src/doModifierMass.h delete mode 100644 src/doNormalMono.h delete mode 100644 src/doNormalMonoCenter.h delete mode 100644 src/doNormalMultiCenter.h delete mode 100644 src/doSampler.h delete mode 100644 src/doSamplerNormalMono.h delete mode 100644 src/doSamplerUniform.h delete mode 100644 src/doUniform.h delete mode 100644 src/doUniformCenter.h delete mode 100644 src/doVectorBounds.h create mode 100644 src/edo create mode 100644 src/edo.cpp create mode 100644 src/edoAlgo.h create mode 100644 src/edoBounder.h create mode 100644 src/edoBounderBound.h create mode 100644 src/edoBounderNo.h create mode 100644 src/edoBounderRng.h create mode 100644 src/edoBounderUniform.h create mode 100644 src/edoContinue.h create mode 100644 src/edoDistrib.h rename src/{doEDA.h => edoEDA.h} (79%) rename src/{doEDASA.h => edoEDASA.h} (79%) create mode 100644 src/edoEstimator.h create mode 100644 src/edoEstimatorNormalMono.h rename src/{doEstimatorNormalMulti.h => edoEstimatorNormalMulti.h} (68%) create mode 100644 src/edoEstimatorUniform.h create mode 100644 src/edoModifier.h create mode 100644 src/edoModifierDispersion.h create mode 100644 src/edoModifierMass.h create mode 100644 src/edoNormalMono.h create mode 100644 src/edoNormalMonoCenter.h rename src/{doNormalMulti.h => edoNormalMulti.h} (86%) create mode 100644 src/edoNormalMultiCenter.h create mode 100644 src/edoSampler.h create mode 100644 src/edoSamplerNormalMono.h rename src/{doSamplerNormalMulti.h => edoSamplerNormalMulti.h} (67%) create mode 100644 src/edoSamplerUniform.h create mode 100644 src/edoUniform.h create mode 100644 src/edoUniformCenter.h create mode 100644 src/edoVectorBounds.h delete mode 100644 src/utils/doFileSnapshot.h delete mode 100644 src/utils/doHyperVolume.h delete mode 100644 src/utils/doPopStat.h delete mode 100644 src/utils/doStat.h delete mode 100644 src/utils/doStatNormalMono.h delete mode 100644 src/utils/doStatNormalMulti.h delete mode 100644 src/utils/doStatUniform.h rename src/utils/{doCheckPoint.h => edoCheckPoint.h} (57%) rename src/utils/{doFileSnapshot.cpp => edoFileSnapshot.cpp} (57%) create mode 100644 src/utils/edoFileSnapshot.h create mode 100644 src/utils/edoHyperVolume.h create mode 100644 src/utils/edoPopStat.h create mode 100644 src/utils/edoStat.h create mode 100644 src/utils/edoStatNormalMono.h create mode 100644 src/utils/edoStatNormalMulti.h create mode 100644 src/utils/edoStatUniform.h rename test/{t-doEstimatorNormalMulti.cpp => t-edoEstimatorNormalMulti.cpp} (78%) diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..550b46c09 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,36 @@ + +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group + +Authors: + +N:Johann DrĂ©o +P:nojhan +E:johann.dreo@thalesgroup.com +D:2010-07-01 +C:original design and code + +N:Caner Candan +P: +E:caner.candan@thalesgroup.com +D:2010-07-01 +C:original design and code + +As of 2011-01-25, Thales SA disclaims all copyright interest in the Evolving Distribution Objects (EDO) framework. diff --git a/CMakeLists.txt b/CMakeLists.txt index 31da2b9c8..868c456be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ # Checks cmake version compatibility CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(DO) +PROJECT(EDO) SET(PROJECT_VERSION_MAJOR 1) SET(PROJECT_VERSION_MINOR 0) @@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES( ${EO_INCLUDE_DIRS} ${MO_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - /Dev/ometah-0.3/common + # /Dev/ometah-0.3/common ) ###################################################################################### @@ -92,8 +92,8 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}) -ADD_LIBRARY(do STATIC ${SAMPLE_SRCS}) -INSTALL(TARGETS do ARCHIVE DESTINATION lib COMPONENT libraries) +ADD_LIBRARY(edo STATIC ${SAMPLE_SRCS}) +INSTALL(TARGETS edo ARCHIVE DESTINATION lib COMPONENT libraries) ###################################################################################### @@ -102,7 +102,7 @@ INSTALL(TARGETS do ARCHIVE DESTINATION lib COMPONENT libraries) ### 8) Install pkg-config config file for EO ###################################################################################### -INSTALL(FILES do.pc DESTINATION lib/pkgconfig COMPONENT headers) +INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers) ###################################################################################### diff --git a/COPYING b/COPYING index 8862bf50f..4362b4915 100644 --- a/COPYING +++ b/COPYING @@ -1 +1,502 @@ -(c) Thales group, 2010 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/README b/README index f58d9d3c6..5b814b15d 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This package contains the source code for DO. +This package contains the source code for EDO. # Step 1 - Configuration ------------------------ @@ -19,7 +19,7 @@ Note for windows users: if you don't use VisualStudio 9, enter the name of your # Step 3 - Compilation ---------------------- -In the do/build/ directory: +In the edo/build/ directory: (Unix) > make (Windows) Open the VisualStudio solution and compile it, compile also the target install. You can refer to this tutorial if you don't know how to compile a solution: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial @@ -29,7 +29,7 @@ You can refer to this tutorial if you don't know how to compile a solution: http --------------------- A toy example is given to test the components. You can run these tests as following. To define problem-related components for your own problem, please refer to the tutorials available on the website : http://paradiseo.gforge.inria.fr/. -In the do/build/ directory: +In the edo/build/ directory: (Unix) > ctest Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial @@ -46,7 +46,7 @@ Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/i The API-documentation is available in doc/html/index.html -# Things to keep in mind when using DO +# Things to keep in mind when using EDO ---------------------------------------- * By default, the EO random generator's seed is initialized by the number of seconds since the epoch (with time(0)). It is available in the status file dumped at each execution. Please, keep in mind that if you start two run at the same second without modifying the seed, you will get exactly the same results. diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 24b57198d..eea3dcb90 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -9,6 +9,6 @@ INCLUDE_DIRECTORIES( ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(eda_sa) ADD_SUBDIRECTORY(eda) -ADD_SUBDIRECTORY(sa) +#ADD_SUBDIRECTORY(sa) ###################################################################################### diff --git a/application/eda/CMakeLists.txt b/application/eda/CMakeLists.txt index 41d61ce04..2f1a52a57 100644 --- a/application/eda/CMakeLists.txt +++ b/application/eda/CMakeLists.txt @@ -15,13 +15,13 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${DO_BINARY_DIR}/${file} + ${EDO_BINARY_DIR}/${file} ) ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) -SET(EXECUTABLE_OUTPUT_PATH ${DO_BINARY_DIR}) +SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/application/eda/main.cpp b/application/eda/main.cpp index 3e8e0fae4..8fc663fd1 100644 --- a/application/eda/main.cpp +++ b/application/eda/main.cpp @@ -1,3 +1,30 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + #include #include @@ -11,14 +38,14 @@ #include #include -#include +#include #include "Rosenbrock.h" #include "Sphere.h" typedef eoReal EOT; -typedef doNormalMulti< EOT > Distrib; +typedef edoNormalMulti< EOT > Distrib; int main(int ac, char** av) @@ -45,13 +72,13 @@ int main(int ac, char** av) eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); state.storeFunctor(selector); - doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); eoSelectOne< EOT >* selectone = new eoDetTournamentSelect< EOT >( 2 ); state.storeFunctor(selectone); - doModifierMass< Distrib >* modifier = new doNormalMultiCenter< EOT >(); + edoModifierMass< Distrib >* modifier = new edoNormalMultiCenter< EOT >(); state.storeFunctor(modifier); eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); @@ -100,7 +127,7 @@ int main(int ac, char** av) // This is used by doSampler. //----------------------------------------------------------------------------- - doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); state.storeFunctor(bounder); @@ -112,7 +139,7 @@ int main(int ac, char** av) // Prepare sampler class with a specific distribution //----------------------------------------------------------------------------- - doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); //----------------------------------------------------------------------------- @@ -166,10 +193,10 @@ int main(int ac, char** av) // distribution output //----------------------------------------------------------------------------- - doDummyContinue< Distrib >* dummy_continue = new doDummyContinue< Distrib >(); + edoDummyContinue< Distrib >* dummy_continue = new edoDummyContinue< Distrib >(); state.storeFunctor(dummy_continue); - doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); + edoCheckPoint< Distrib >* distribution_continue = new edoCheckPoint< Distrib >( *dummy_continue ); state.storeFunctor(distribution_continue); //----------------------------------------------------------------------------- @@ -216,11 +243,11 @@ int main(int ac, char** av) // removing as doFileSnapshot does within ctor. //----------------------------------------------------------------------------- - doPopStat< EOT >* popStat = new doPopStat; + edoPopStat< EOT >* popStat = new edoPopStat; state.storeFunctor(popStat); pop_continue.add(*popStat); - doFileSnapshot* fileSnapshot = new doFileSnapshot("EDA_ResPop"); + edoFileSnapshot* fileSnapshot = new edoFileSnapshot("EDA_ResPop"); state.storeFunctor(fileSnapshot); fileSnapshot->add(*popStat); pop_continue.add(*fileSnapshot); @@ -232,7 +259,7 @@ int main(int ac, char** av) // distribution output (after helper) //----------------------------------------------------------------------------- - doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >(); state.storeFunctor(distrib_stat); distribution_continue->add( *distrib_stat ); @@ -254,7 +281,7 @@ int main(int ac, char** av) // EDA algorithm configuration //----------------------------------------------------------------------------- - doAlgo< Distrib >* algo = new doEDA< Distrib > + edoAlgo< Distrib >* algo = new edoEDA< Distrib > (*selector, *estimator, *selectone, *modifier, *sampler, pop_continue, *distribution_continue, eval, diff --git a/application/eda_sa/CMakeLists.txt b/application/eda_sa/CMakeLists.txt index f92e105f2..39a9a5464 100644 --- a/application/eda_sa/CMakeLists.txt +++ b/application/eda_sa/CMakeLists.txt @@ -15,13 +15,13 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${DO_BINARY_DIR}/${file} + ${EDO_BINARY_DIR}/${file} ) ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) -SET(EXECUTABLE_OUTPUT_PATH ${DO_BINARY_DIR}) +SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/application/eda_sa/main.cpp b/application/eda_sa/main.cpp index 2d72ad832..8ee173e30 100644 --- a/application/eda_sa/main.cpp +++ b/application/eda_sa/main.cpp @@ -11,14 +11,14 @@ #include #include -#include +#include #include "Rosenbrock.h" #include "Sphere.h" typedef eoReal EOT; -typedef doNormalMulti< EOT > Distrib; +typedef edoNormalMulti< EOT > Distrib; int main(int ac, char** av) @@ -45,13 +45,13 @@ int main(int ac, char** av) eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); state.storeFunctor(selector); - doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); eoSelectOne< EOT >* selectone = new eoDetTournamentSelect< EOT >( 2 ); state.storeFunctor(selectone); - doModifierMass< Distrib >* modifier = new doNormalMultiCenter< EOT >(); + edoModifierMass< Distrib >* modifier = new edoNormalMultiCenter< EOT >(); state.storeFunctor(modifier); eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); @@ -100,7 +100,7 @@ int main(int ac, char** av) // This is used by doSampler. //----------------------------------------------------------------------------- - doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); state.storeFunctor(bounder); @@ -112,7 +112,7 @@ int main(int ac, char** av) // Prepare sampler class with a specific distribution //----------------------------------------------------------------------------- - doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); //----------------------------------------------------------------------------- @@ -166,10 +166,10 @@ int main(int ac, char** av) // distribution output //----------------------------------------------------------------------------- - doDummyContinue< Distrib >* dummy_continue = new doDummyContinue< Distrib >(); + edoDummyContinue< Distrib >* dummy_continue = new edoDummyContinue< Distrib >(); state.storeFunctor(dummy_continue); - doCheckPoint< Distrib >* distribution_continue = new doCheckPoint< Distrib >( *dummy_continue ); + edoCheckPoint< Distrib >* distribution_continue = new edoCheckPoint< Distrib >( *dummy_continue ); state.storeFunctor(distribution_continue); //----------------------------------------------------------------------------- @@ -213,14 +213,14 @@ int main(int ac, char** av) // population output (after helper) // // FIXME: theses objects are instanciate there in order to avoid a folder - // removing as doFileSnapshot does within ctor. + // removing as edoFileSnapshot does within ctor. //----------------------------------------------------------------------------- - doPopStat< EOT >* popStat = new doPopStat; + edoPopStat< EOT >* popStat = new edoPopStat; state.storeFunctor(popStat); pop_continue.add(*popStat); - doFileSnapshot* fileSnapshot = new doFileSnapshot("EDASA_ResPop"); + edoFileSnapshot* fileSnapshot = new edoFileSnapshot("EDASA_ResPop"); state.storeFunctor(fileSnapshot); fileSnapshot->add(*popStat); pop_continue.add(*fileSnapshot); @@ -232,7 +232,7 @@ int main(int ac, char** av) // distribution output (after helper) //----------------------------------------------------------------------------- - doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >(); state.storeFunctor(distrib_stat); distribution_continue->add( *distrib_stat ); @@ -254,7 +254,7 @@ int main(int ac, char** av) // EDASA algorithm configuration //----------------------------------------------------------------------------- - doAlgo< Distrib >* algo = new doEDASA< Distrib > + edoAlgo< Distrib >* algo = new edoEDASA< Distrib > (*selector, *estimator, *selectone, *modifier, *sampler, pop_continue, *distribution_continue, eval, *sa_continue, *cooling_schedule, diff --git a/build_gcc_linux_debug b/build_gcc_linux_debug index da385fdb8..144a5298a 100755 --- a/build_gcc_linux_debug +++ b/build_gcc_linux_debug @@ -1,6 +1,6 @@ #!/usr/bin/env sh -mkdir debug +mkdir -p debug cd debug cmake -DCMAKE_BUILD_TYPE=Debug .. make diff --git a/build_gcc_linux_release b/build_gcc_linux_release index 78a66c551..fb220d044 100755 --- a/build_gcc_linux_release +++ b/build_gcc_linux_release @@ -1,6 +1,6 @@ #!/usr/bin/env sh -mkdir release +mkdir -p release cd release cmake .. make diff --git a/do.pc b/do.pc deleted file mode 100644 index b207747db..000000000 --- a/do.pc +++ /dev/null @@ -1,12 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include/do - -Name: Distribution Object -Description: Distribution Object -Version: 1.0 -Libs: -L${libdir} -ldo -ldoutils -Cflags: -I${includedir} diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 056f3f2fc..6c7b15937 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -22,7 +22,7 @@ IF (DOXYGEN_FOUND) INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DESTINATION share/do COMPONENT libraries + DESTINATION share/edo COMPONENT libraries PATTERN "CMakeFiles" EXCLUDE PATTERN "cmake_install.cmake" EXCLUDE PATTERN "Makefile" EXCLUDE diff --git a/edo.pc b/edo.pc new file mode 100644 index 000000000..a70434383 --- /dev/null +++ b/edo.pc @@ -0,0 +1,12 @@ +# Package Information for pkg-config + +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/edo + +Name: Evolving Distribution Objects +Description: Evolving Distribution Objects +Version: 1.0 +Libs: -L${libdir} -ledo -ledoutils +Cflags: -I${includedir} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f4cdbfae1..6b2176f56 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,8 +2,8 @@ ### 1) Set all needed source files for the project ###################################################################################### -FILE(GLOB HDRS *.h do) -INSTALL(FILES ${HDRS} DESTINATION include/do COMPONENT headers) +FILE(GLOB HDRS *.h edo) +INSTALL(FILES ${HDRS} DESTINATION include/edo COMPONENT headers) FILE(GLOB SOURCES *.cpp) diff --git a/src/do b/src/do deleted file mode 100644 index ff2b3e674..000000000 --- a/src/do +++ /dev/null @@ -1,59 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _do_ -#define _do_ - -#include "doAlgo.h" -#include "doEDASA.h" -#include "doEDA.h" - -#include "doDistrib.h" -#include "doUniform.h" -#include "doNormalMono.h" -#include "doNormalMulti.h" - -#include "doEstimator.h" -#include "doEstimatorUniform.h" -#include "doEstimatorNormalMono.h" -#include "doEstimatorNormalMulti.h" - -#include "doModifier.h" -#include "doModifierDispersion.h" -#include "doModifierMass.h" -#include "doUniformCenter.h" -#include "doNormalMonoCenter.h" -#include "doNormalMultiCenter.h" - -#include "doSampler.h" -#include "doSamplerUniform.h" -#include "doSamplerNormalMono.h" -#include "doSamplerNormalMulti.h" - -#include "doVectorBounds.h" - -#include "doBounder.h" -#include "doBounderNo.h" -#include "doBounderBound.h" -#include "doBounderRng.h" - -#include "doContinue.h" -#include "utils/doCheckPoint.h" - -#include "utils/doStat.h" -#include "utils/doStatUniform.h" -#include "utils/doStatNormalMono.h" -#include "utils/doStatNormalMulti.h" - -#include "utils/doFileSnapshot.h" -#include "utils/doPopStat.h" - -#endif // !_do_ - -// Local Variables: -// mode: C++ -// End: diff --git a/src/do.cpp b/src/do.cpp deleted file mode 100644 index 082374a40..000000000 --- a/src/do.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#include "do" diff --git a/src/doAlgo.h b/src/doAlgo.h deleted file mode 100644 index 0f260d933..000000000 --- a/src/doAlgo.h +++ /dev/null @@ -1,23 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doAlgo_h -#define _doAlgo_h - -#include - -template < typename D > -class doAlgo : public eoAlgo< typename D::EOType > -{ - //! Alias for the type - typedef typename D::EOType EOT; - -public: - virtual ~doAlgo(){} -}; - -#endif // !_doAlgo_h diff --git a/src/doBounder.h b/src/doBounder.h deleted file mode 100644 index 44240246e..000000000 --- a/src/doBounder.h +++ /dev/null @@ -1,34 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doBounder_h -#define _doBounder_h - -#include - -template < typename EOT > -class doBounder : public eoUF< EOT&, void > -{ -public: - doBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) - : _min(min), _max(max) - { - assert(_min.size() > 0); - assert(_min.size() == _max.size()); - } - - // virtual void operator()( EOT& ) = 0 (provided by eoUF< A1, R >) - - EOT& min(){return _min;} - EOT& max(){return _max;} - -private: - EOT _min; - EOT _max; -}; - -#endif // !_doBounder_h diff --git a/src/doBounderBound.h b/src/doBounderBound.h deleted file mode 100644 index cff765b8e..000000000 --- a/src/doBounderBound.h +++ /dev/null @@ -1,42 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doBounderBound_h -#define _doBounderBound_h - -#include "doBounder.h" - -template < typename EOT > -class doBounderBound : public doBounder< EOT > -{ -public: - doBounderBound( EOT min, EOT max ) - : doBounder< EOT >( min, max ) - {} - - void operator()( EOT& x ) - { - unsigned int size = x.size(); - assert(size > 0); - - for (unsigned int d = 0; d < size; ++d) // browse all dimensions - { - if (x[d] < this->min()[d]) - { - x[d] = this->min()[d]; - continue; - } - - if (x[d] > this->max()[d]) - { - x[d] = this->max()[d]; - } - } - } -}; - -#endif // !_doBounderBound_h diff --git a/src/doBounderNo.h b/src/doBounderNo.h deleted file mode 100644 index 0ca883bc7..000000000 --- a/src/doBounderNo.h +++ /dev/null @@ -1,20 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doBounderNo_h -#define _doBounderNo_h - -#include "doBounder.h" - -template < typename EOT > -class doBounderNo : public doBounder< EOT > -{ -public: - void operator()( EOT& ) {} -}; - -#endif // !_doBounderNo_h diff --git a/src/doBounderRng.h b/src/doBounderRng.h deleted file mode 100644 index 52b95bcac..000000000 --- a/src/doBounderRng.h +++ /dev/null @@ -1,42 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doBounderRng_h -#define _doBounderRng_h - -#include "doBounder.h" - -template < typename EOT > -class doBounderRng : public doBounder< EOT > -{ -public: - doBounderRng( EOT min, EOT max, eoRndGenerator< double > & rng ) - : doBounder< EOT >( min, max ), _rng(rng) - {} - - void operator()( EOT& x ) - { - unsigned int size = x.size(); - assert(size > 0); - - for (unsigned int d = 0; d < size; ++d) // browse all dimensions - { - - // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. - - if (x[d] < this->min()[d] || x[d] > this->max()[d]) - { - x[d] = _rng(); - } - } - } - -private: - eoRndGenerator< double> & _rng; -}; - -#endif // !_doBounderRng_h diff --git a/src/doBounderUniform.h b/src/doBounderUniform.h deleted file mode 100644 index 9fac7dac3..000000000 --- a/src/doBounderUniform.h +++ /dev/null @@ -1,35 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo -*/ - -#ifndef _doBounderUniform_h -#define _doBounderUniform_h - -#include "doBounder.h" - -template < typename EOT > -class doBounderUniform : public doBounder< EOT > -{ -public: - doBounderUniform( EOT min, EOT max ) - : doBounder< EOT >( min, max ) - {} - - void operator()( EOT& sol ) - { - unsigned int size = sol.size(); - assert(size > 0); - - for (unsigned int d = 0; d < size; ++d) { - - if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { - // use EO's global "rng" - sol[d] = rng.uniform( this->min()[d], this->max()[d] ); - } - } // for d in size - } -}; - -#endif // !_doBounderUniform_h diff --git a/src/doContinue.h b/src/doContinue.h deleted file mode 100644 index 64f1d4831..000000000 --- a/src/doContinue.h +++ /dev/null @@ -1,41 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doContinue_h -#define _doContinue_h - -#include -#include - -//! doContinue< EOT > classe fitted to Distribution Object library - -template < typename D > -class doContinue : public eoUF< const D&, bool >, public eoPersistent -{ -public: - virtual std::string className(void) const { return "doContinue"; } - - void readFrom(std::istream&) - { - /* It should be implemented by subclasses ! */ - } - - void printOn(std::ostream&) const - { - /* It should be implemented by subclasses ! */ - } -}; - -template < typename D > -class doDummyContinue : public doContinue< D > -{ - bool operator()(const D&){ return true; } - - virtual std::string className() const { return "doDummyContinue"; } -}; - -#endif // !_doContinue_h diff --git a/src/doDistrib.h b/src/doDistrib.h deleted file mode 100644 index f150e8e0e..000000000 --- a/src/doDistrib.h +++ /dev/null @@ -1,23 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doDistrib_h -#define _doDistrib_h - -#include - -template < typename EOT > -class doDistrib : public eoFunctorBase -{ -public: - //! Alias for the type - typedef EOT EOType; - - virtual ~doDistrib(){} -}; - -#endif // !_doDistrib_h diff --git a/src/doEstimator.h b/src/doEstimator.h deleted file mode 100644 index 956bed78b..000000000 --- a/src/doEstimator.h +++ /dev/null @@ -1,23 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doEstimator_h -#define _doEstimator_h - -#include -#include - -template < typename D > -class doEstimator : public eoUF< eoPop< typename D::EOType >&, D > -{ -public: - typedef typename D::EOType EOType; - - // virtual D operator() ( eoPop< EOT >& )=0 (provided by eoUF< A1, R >) -}; - -#endif // !_doEstimator_h diff --git a/src/doEstimatorNormalMono.h b/src/doEstimatorNormalMono.h deleted file mode 100644 index fb9c1f2fd..000000000 --- a/src/doEstimatorNormalMono.h +++ /dev/null @@ -1,77 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doEstimatorNormalMono_h -#define _doEstimatorNormalMono_h - -#include "doEstimator.h" -#include "doNormalMono.h" - -template < typename EOT > -class doEstimatorNormalMono : public doEstimator< doNormalMono< EOT > > -{ -public: - typedef typename EOT::AtomType AtomType; - - class Variance - { - public: - Variance() : _sumvar(0){} - - void update(AtomType v) - { - _n++; - - AtomType d = v - _mean; - - _mean += 1 / _n * d; - _sumvar += (_n - 1) / _n * d * d; - } - - AtomType get_mean() const {return _mean;} - AtomType get_var() const {return _sumvar / (_n - 1);} - AtomType get_std() const {return sqrt( get_var() );} - - private: - AtomType _n; - AtomType _mean; - AtomType _sumvar; - }; - -public: - doNormalMono< EOT > operator()(eoPop& pop) - { - unsigned int popsize = pop.size(); - assert(popsize > 0); - - unsigned int dimsize = pop[0].size(); - assert(dimsize > 0); - - std::vector< Variance > var( dimsize ); - - for (unsigned int i = 0; i < popsize; ++i) - { - for (unsigned int d = 0; d < dimsize; ++d) - { - var[d].update( pop[i][d] ); - } - } - - EOT mean( dimsize ); - EOT variance( dimsize ); - - for (unsigned int d = 0; d < dimsize; ++d) - { - mean[d] = var[d].get_mean(); - variance[d] = var[d].get_var(); - } - - return doNormalMono< EOT >( mean, variance ); - } -}; - -#endif // !_doEstimatorNormalMono_h diff --git a/src/doEstimatorUniform.h b/src/doEstimatorUniform.h deleted file mode 100644 index ca361ce00..000000000 --- a/src/doEstimatorUniform.h +++ /dev/null @@ -1,51 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doEstimatorUniform_h -#define _doEstimatorUniform_h - -#include "doEstimator.h" -#include "doUniform.h" - -// TODO: calcule de la moyenne + covariance dans une classe derivee - -template < typename EOT > -class doEstimatorUniform : public doEstimator< doUniform< EOT > > -{ -public: - doUniform< EOT > operator()(eoPop& pop) - { - unsigned int size = pop.size(); - - assert(size > 0); - - EOT min = pop[0]; - EOT max = pop[0]; - - for (unsigned int i = 1; i < size; ++i) - { - unsigned int size = pop[i].size(); - - assert(size > 0); - - // possibilitĂ© d'utiliser std::min_element et std::max_element mais exige 2 pass au lieu d'1. - - for (unsigned int d = 0; d < size; ++d) - { - if (pop[i][d] < min[d]) - min[d] = pop[i][d]; - - if (pop[i][d] > max[d]) - max[d] = pop[i][d]; - } - } - - return doUniform< EOT >(min, max); - } -}; - -#endif // !_doEstimatorUniform_h diff --git a/src/doModifier.h b/src/doModifier.h deleted file mode 100644 index b36106c98..000000000 --- a/src/doModifier.h +++ /dev/null @@ -1,20 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doModifier_h -#define _doModifier_h - -template < typename D > -class doModifier -{ -public: - virtual ~doModifier(){} - - typedef typename D::EOType EOType; -}; - -#endif // !_doModifier_h diff --git a/src/doModifierDispersion.h b/src/doModifierDispersion.h deleted file mode 100644 index 4d5e42c46..000000000 --- a/src/doModifierDispersion.h +++ /dev/null @@ -1,23 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doModifierDispersion_h -#define _doModifierDispersion_h - -#include -#include - -#include "doModifier.h" - -template < typename D > -class doModifierDispersion : public doModifier< D >, public eoBF< D&, eoPop< typename D::EOType >&, void > -{ -public: - // virtual void operator() ( D&, eoPop< D::EOType >& )=0 (provided by eoBF< A1, A2, R >) -}; - -#endif // !_doModifierDispersion_h diff --git a/src/doModifierMass.h b/src/doModifierMass.h deleted file mode 100644 index 4f5df5c0a..000000000 --- a/src/doModifierMass.h +++ /dev/null @@ -1,24 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doModifierMass_h -#define _doModifierMass_h - -#include - -#include "doModifier.h" - -template < typename D > -class doModifierMass : public doModifier< D >, public eoBF< D&, typename D::EOType&, void > -{ -public: - //typedef typename D::EOType::AtomType AtomType; // does not work !!! - - // virtual void operator() ( D&, D::EOType& )=0 (provided by eoBF< A1, A2, R >) -}; - -#endif // !_doModifierMass_h diff --git a/src/doNormalMono.h b/src/doNormalMono.h deleted file mode 100644 index fa8f8e6f4..000000000 --- a/src/doNormalMono.h +++ /dev/null @@ -1,38 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doNormalMono_h -#define _doNormalMono_h - -#include "doDistrib.h" - -template < typename EOT > -class doNormalMono : public doDistrib< EOT > -{ -public: - doNormalMono( const EOT& mean, const EOT& variance ) - : _mean(mean), _variance(variance) - { - assert(_mean.size() > 0); - assert(_mean.size() == _variance.size()); - } - - unsigned int size() - { - assert(_mean.size() == _variance.size()); - return _mean.size(); - } - - EOT mean(){return _mean;} - EOT variance(){return _variance;} - -private: - EOT _mean; - EOT _variance; -}; - -#endif // !_doNormalMono_h diff --git a/src/doNormalMonoCenter.h b/src/doNormalMonoCenter.h deleted file mode 100644 index 7786d347c..000000000 --- a/src/doNormalMonoCenter.h +++ /dev/null @@ -1,26 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doNormalMonoCenter_h -#define _doNormalMonoCenter_h - -#include "doModifierMass.h" -#include "doNormalMono.h" - -template < typename EOT > -class doNormalMonoCenter : public doModifierMass< doNormalMono< EOT > > -{ -public: - typedef typename EOT::AtomType AtomType; - - void operator() ( doNormalMono< EOT >& distrib, EOT& mass ) - { - distrib.mean() = mass; - } -}; - -#endif // !_doNormalMonoCenter_h diff --git a/src/doNormalMultiCenter.h b/src/doNormalMultiCenter.h deleted file mode 100644 index bf52ecf13..000000000 --- a/src/doNormalMultiCenter.h +++ /dev/null @@ -1,28 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doNormalMultiCenter_h -#define _doNormalMultiCenter_h - -#include "doModifierMass.h" -#include "doNormalMulti.h" - -template < typename EOT > -class doNormalMultiCenter : public doModifierMass< doNormalMulti< EOT > > -{ -public: - typedef typename EOT::AtomType AtomType; - - void operator() ( doNormalMulti< EOT >& distrib, EOT& mass ) - { - ublas::vector< AtomType > mean( distrib.size() ); - std::copy( mass.begin(), mass.end(), mean.begin() ); - distrib.mean() = mean; - } -}; - -#endif // !_doNormalMultiCenter_h diff --git a/src/doSampler.h b/src/doSampler.h deleted file mode 100644 index 0d69223c4..000000000 --- a/src/doSampler.h +++ /dev/null @@ -1,75 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doSampler_h -#define _doSampler_h - -#include - -#include "doBounder.h" -#include "doBounderNo.h" - -template < typename D > -class doSampler : public eoUF< D&, typename D::EOType > -{ -public: - typedef typename D::EOType EOType; - - doSampler(doBounder< EOType > & bounder) - : /*_dummy_bounder(),*/ _bounder(bounder) - {} - - /* - doSampler() - : _dummy_bounder(), _bounder( _dummy_bounder ) - {} - */ - - // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) - - virtual EOType sample( D& ) = 0; - - EOType operator()( D& distrib ) - { - unsigned int size = distrib.size(); - assert(size > 0); - - - //------------------------------------------------------------- - // Point we want to sample to get higher a set of points - // (coordinates in n dimension) - // x = {x1, x2, ..., xn} - // the sample method is implemented in the derivated class - //------------------------------------------------------------- - - EOType solution(sample(distrib)); - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Now we are bounding the distribution thanks to min and max - // parameters. - //------------------------------------------------------------- - - _bounder(solution); - - //------------------------------------------------------------- - - - return solution; - } - -private: - //doBounderNo _dummy_bounder; - - //! Bounder functor - doBounder< EOType > & _bounder; - -}; - -#endif // !_doSampler_h diff --git a/src/doSamplerNormalMono.h b/src/doSamplerNormalMono.h deleted file mode 100644 index b790ee6b0..000000000 --- a/src/doSamplerNormalMono.h +++ /dev/null @@ -1,71 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doSamplerNormalMono_h -#define _doSamplerNormalMono_h - -#include - -#include "doSampler.h" -#include "doNormalMono.h" -#include "doBounder.h" - -/** - * doSamplerNormalMono - * This class uses the NormalMono distribution parameters (bounds) to return - * a random position used for population sampling. - */ -template < typename EOT > -class doSamplerNormalMono : public doSampler< doNormalMono< EOT > > -{ -public: - typedef typename EOT::AtomType AtomType; - - doSamplerNormalMono( doBounder< EOT > & bounder ) - : doSampler< doNormalMono< EOT > >( bounder ) - {} - - EOT sample( doNormalMono< EOT >& distrib ) - { - unsigned int size = distrib.size(); - assert(size > 0); - - - //------------------------------------------------------------- - // Point we want to sample to get higher a set of points - // (coordinates in n dimension) - // x = {x1, x2, ..., xn} - //------------------------------------------------------------- - - EOT solution; - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Sampling all dimensions - //------------------------------------------------------------- - - for (unsigned int i = 0; i < size; ++i) - { - AtomType mean = distrib.mean()[i]; - AtomType variance = distrib.variance()[i]; - AtomType random = rng.normal(mean, variance); - - assert(variance >= 0); - - solution.push_back(random); - } - - //------------------------------------------------------------- - - - return solution; - } -}; - -#endif // !_doSamplerNormalMono_h diff --git a/src/doSamplerUniform.h b/src/doSamplerUniform.h deleted file mode 100644 index 6f79c1387..000000000 --- a/src/doSamplerUniform.h +++ /dev/null @@ -1,76 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doSamplerUniform_h -#define _doSamplerUniform_h - -#include - -#include "doSampler.h" -#include "doUniform.h" - -/** - * doSamplerUniform - * This class uses the Uniform distribution parameters (bounds) to return - * a random position used for population sampling. - */ -template < typename EOT, class D=doUniform > // FIXME: D template name is there really used ?!? -class doSamplerUniform : public doSampler< doUniform< EOT > > -{ -public: - typedef D Distrib; - - doSamplerUniform(doBounder< EOT > & bounder) - : doSampler< doUniform >(bounder) // FIXME: Why D is not used here ? - {} - - /* - doSamplerUniform() - : doSampler< doUniform >() - {} - */ - - EOT sample( doUniform< EOT >& distrib ) - { - unsigned int size = distrib.size(); - assert(size > 0); - - - //------------------------------------------------------------- - // Point we want to sample to get higher a set of points - // (coordinates in n dimension) - // x = {x1, x2, ..., xn} - //------------------------------------------------------------- - - EOT solution; - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Sampling all dimensions - //------------------------------------------------------------- - - for (unsigned int i = 0; i < size; ++i) - { - double min = distrib.min()[i]; - double max = distrib.max()[i]; - double random = rng.uniform(min, max); - - assert(min <= random && random <= max); - - solution.push_back(random); - } - - //------------------------------------------------------------- - - - return solution; - } -}; - -#endif // !_doSamplerUniform_h diff --git a/src/doUniform.h b/src/doUniform.h deleted file mode 100644 index 624fec1fa..000000000 --- a/src/doUniform.h +++ /dev/null @@ -1,23 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doUniform_h -#define _doUniform_h - -#include "doDistrib.h" -#include "doVectorBounds.h" - -template < typename EOT > -class doUniform : public doDistrib< EOT >, public doVectorBounds< EOT > -{ -public: - doUniform(EOT min, EOT max) - : doVectorBounds< EOT >(min, max) - {} -}; - -#endif // !_doUniform_h diff --git a/src/doUniformCenter.h b/src/doUniformCenter.h deleted file mode 100644 index 8b0016bc6..000000000 --- a/src/doUniformCenter.h +++ /dev/null @@ -1,35 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doUniformCenter_h -#define _doUniformCenter_h - -#include "doModifierMass.h" -#include "doUniform.h" - -template < typename EOT > -class doUniformCenter : public doModifierMass< doUniform< EOT > > -{ -public: - typedef typename EOT::AtomType AtomType; - - void operator() ( doUniform< EOT >& distrib, EOT& mass ) - { - for (unsigned int i = 0, n = mass.size(); i < n; ++i) - { - AtomType& min = distrib.min()[i]; - AtomType& max = distrib.max()[i]; - - AtomType range = (max - min) / 2; - - min = mass[i] - range; - max = mass[i] + range; - } - } -}; - -#endif // !_doUniformCenter_h diff --git a/src/doVectorBounds.h b/src/doVectorBounds.h deleted file mode 100644 index 4e23d4863..000000000 --- a/src/doVectorBounds.h +++ /dev/null @@ -1,36 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doVectorBounds_h -#define _doVectorBounds_h - -template < typename EOT > -class doVectorBounds -{ -public: - doVectorBounds(EOT min, EOT max) - : _min(min), _max(max) - { - assert(_min.size() > 0); - assert(_min.size() == _max.size()); - } - - EOT min(){return _min;} - EOT max(){return _max;} - - unsigned int size() - { - assert(_min.size() == _max.size()); - return _min.size(); - } - -private: - EOT _min; - EOT _max; -}; - -#endif // !_doVectorBounds_h diff --git a/src/edo b/src/edo new file mode 100644 index 000000000..54f20284e --- /dev/null +++ b/src/edo @@ -0,0 +1,79 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edo_ +#define _edo_ + +#include "edoAlgo.h" +#include "edoEDASA.h" +#include "edoEDA.h" + +#include "edoDistrib.h" +#include "edoUniform.h" +#include "edoNormalMono.h" +#include "edoNormalMulti.h" + +#include "edoEstimator.h" +#include "edoEstimatorUniform.h" +#include "edoEstimatorNormalMono.h" +#include "edoEstimatorNormalMulti.h" + +#include "edoModifier.h" +#include "edoModifierDispersion.h" +#include "edoModifierMass.h" +#include "edoUniformCenter.h" +#include "edoNormalMonoCenter.h" +#include "edoNormalMultiCenter.h" + +#include "edoSampler.h" +#include "edoSamplerUniform.h" +#include "edoSamplerNormalMono.h" +#include "edoSamplerNormalMulti.h" + +#include "edoVectorBounds.h" + +#include "edoBounder.h" +#include "edoBounderNo.h" +#include "edoBounderBound.h" +#include "edoBounderRng.h" + +#include "edoContinue.h" +#include "utils/edoCheckPoint.h" + +#include "utils/edoStat.h" +#include "utils/edoStatUniform.h" +#include "utils/edoStatNormalMono.h" +#include "utils/edoStatNormalMulti.h" + +#include "utils/edoFileSnapshot.h" +#include "utils/edoPopStat.h" + +#endif // !_edo_ + +// Local Variables: +// mode: C++ +// End: diff --git a/src/edo.cpp b/src/edo.cpp new file mode 100644 index 000000000..ff2bd2f93 --- /dev/null +++ b/src/edo.cpp @@ -0,0 +1,28 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Caner Candan +*/ + +#include "edo" + diff --git a/src/edoAlgo.h b/src/edoAlgo.h new file mode 100644 index 000000000..249e42dde --- /dev/null +++ b/src/edoAlgo.h @@ -0,0 +1,44 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + + +#ifndef _edoAlgo_h +#define _edoAlgo_h + +#include + +template < typename D > +class edoAlgo : public eoAlgo< typename D::EOType > +{ + //! Alias for the type + typedef typename D::EOType EOT; + +public: + virtual ~edoAlgo(){} +}; + +#endif // !_edoAlgo_h diff --git a/src/edoBounder.h b/src/edoBounder.h new file mode 100644 index 000000000..98bfc1a84 --- /dev/null +++ b/src/edoBounder.h @@ -0,0 +1,54 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoBounder_h +#define _edoBounder_h + +#include + +template < typename EOT > +class edoBounder : public eoUF< EOT&, void > +{ +public: + edoBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) + : _min(min), _max(max) + { + assert(_min.size() > 0); + assert(_min.size() == _max.size()); + } + + // virtual void operator()( EOT& ) = 0 (provided by eoUF< A1, R >) + + EOT& min(){return _min;} + EOT& max(){return _max;} + +private: + EOT _min; + EOT _max; +}; + +#endif // !_edoBounder_h diff --git a/src/edoBounderBound.h b/src/edoBounderBound.h new file mode 100644 index 000000000..8d5e52be8 --- /dev/null +++ b/src/edoBounderBound.h @@ -0,0 +1,62 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoBounderBound_h +#define _edoBounderBound_h + +#include "edoBounder.h" + +template < typename EOT > +class edoBounderBound : public edoBounder< EOT > +{ +public: + edoBounderBound( EOT min, EOT max ) + : edoBounder< EOT >( min, max ) + {} + + void operator()( EOT& x ) + { + unsigned int size = x.size(); + assert(size > 0); + + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { + if (x[d] < this->min()[d]) + { + x[d] = this->min()[d]; + continue; + } + + if (x[d] > this->max()[d]) + { + x[d] = this->max()[d]; + } + } + } +}; + +#endif // !_edoBounderBound_h diff --git a/src/edoBounderNo.h b/src/edoBounderNo.h new file mode 100644 index 000000000..27d65e6c7 --- /dev/null +++ b/src/edoBounderNo.h @@ -0,0 +1,40 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoBounderNo_h +#define _edoBounderNo_h + +#include "edoBounder.h" + +template < typename EOT > +class edoBounderNo : public edoBounder< EOT > +{ +public: + void operator()( EOT& ) {} +}; + +#endif // !_edoBounderNo_h diff --git a/src/edoBounderRng.h b/src/edoBounderRng.h new file mode 100644 index 000000000..e1e3617f5 --- /dev/null +++ b/src/edoBounderRng.h @@ -0,0 +1,63 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoBounderRng_h +#define _edoBounderRng_h + +#include "edoBounder.h" + +template < typename EOT > +class edoBounderRng : public edoBounder< EOT > +{ +public: + edoBounderRng( EOT min, EOT max, eoRndGenerator< double > & rng ) + : edoBounder< EOT >( min, max ), _rng(rng) + {} + + void operator()( EOT& x ) + { + unsigned int size = x.size(); + assert(size > 0); + + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { + + // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. + + if (x[d] < this->min()[d] || x[d] > this->max()[d]) + { + x[d] = _rng(); + } + } + } + +private: + eoRndGenerator< double> & _rng; +}; + +#endif // !_edoBounderRng_h + diff --git a/src/edoBounderUniform.h b/src/edoBounderUniform.h new file mode 100644 index 000000000..fef1674da --- /dev/null +++ b/src/edoBounderUniform.h @@ -0,0 +1,55 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o +*/ + +#ifndef _edoBounderUniform_h +#define _edoBounderUniform_h + +#include "edoBounder.h" + +template < typename EOT > +class edoBounderUniform : public edoBounder< EOT > +{ +public: + edoBounderUniform( EOT min, EOT max ) + : edoBounder< EOT >( min, max ) + {} + + void operator()( EOT& sol ) + { + unsigned int size = sol.size(); + assert(size > 0); + + for (unsigned int d = 0; d < size; ++d) { + + if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { + // use EO's global "rng" + sol[d] = rng.uniform( this->min()[d], this->max()[d] ); + } + } // for d in size + } +}; + +#endif // !_edoBounderUniform_h diff --git a/src/edoContinue.h b/src/edoContinue.h new file mode 100644 index 000000000..2f7dff5a6 --- /dev/null +++ b/src/edoContinue.h @@ -0,0 +1,61 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _doContinue_h +#define _doContinue_h + +#include +#include + +//! edoContinue< EOT > classe fitted to Distribution Object library + +template < typename D > +class edoContinue : public eoUF< const D&, bool >, public eoPersistent +{ +public: + virtual std::string className(void) const { return "edoContinue"; } + + void readFrom(std::istream&) + { + /* It should be implemented by subclasses ! */ + } + + void printOn(std::ostream&) const + { + /* It should be implemented by subclasses ! */ + } +}; + +template < typename D > +class edoDummyContinue : public edoContinue< D > +{ + bool operator()(const D&){ return true; } + + virtual std::string className() const { return "edoDummyContinue"; } +}; + +#endif // !_edoContinue_h diff --git a/src/edoDistrib.h b/src/edoDistrib.h new file mode 100644 index 000000000..29ff500df --- /dev/null +++ b/src/edoDistrib.h @@ -0,0 +1,43 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoDistrib_h +#define _edoDistrib_h + +#include + +template < typename EOT > +class edoDistrib : public eoFunctorBase +{ +public: + //! Alias for the type + typedef EOT EOType; + + virtual ~edoDistrib(){} +}; + +#endif // !_edoDistrib_h diff --git a/src/doEDA.h b/src/edoEDA.h similarity index 79% rename from src/doEDA.h rename to src/edoEDA.h index 6873e5da4..dde0bb3ad 100644 --- a/src/doEDA.h +++ b/src/edoEDA.h @@ -1,26 +1,46 @@ -// (c) Thales group, 2010 /* - Authors: - Johann Dreo - Caner Candan +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan */ -#ifndef _doEDA_h -#define _doEDA_h +#ifndef _edoEDA_h +#define _edoEDA_h #include #include #include -#include "doAlgo.h" -#include "doEstimator.h" -#include "doModifierMass.h" -#include "doSampler.h" -#include "doContinue.h" +#include "edoAlgo.h" +#include "edoEstimator.h" +#include "edoModifierMass.h" +#include "edoSampler.h" +#include "edoContinue.h" template < typename D > -class doEDA : public doAlgo< D > +class edoEDA : public edoAlgo< D > { public: //! Alias for the type EOT @@ -34,7 +54,7 @@ public: public: - //! doEDA constructor + //! edoEDA constructor /*! All the boxes used by a EDASA need to be given. @@ -51,13 +71,13 @@ public: \param initial_temperature The initial temperature. \param replacor Population replacor */ - doEDA (eoSelect< EOT > & selector, - doEstimator< D > & estimator, + edoEDA (eoSelect< EOT > & selector, + edoEstimator< D > & estimator, eoSelectOne< EOT > & selectone, - doModifierMass< D > & modifier, - doSampler< D > & sampler, + edoModifierMass< D > & modifier, + edoSampler< D > & sampler, eoContinue< EOT > & pop_continue, - doContinue< D > & distribution_continue, + edoContinue< D > & distribution_continue, eoEvalFunc < EOT > & evaluation, //moContinuator< moDummyNeighbor > & sa_continue, //moCoolingSchedule & cooling_schedule, @@ -216,22 +236,22 @@ private: eoSelect < EOT > & _selector; //! A EOT estimator. It is going to estimate distribution parameters. - doEstimator< D > & _estimator; + edoEstimator< D > & _estimator; //! SelectOne eoSelectOne< EOT > & _selectone; //! A D modifier - doModifierMass< D > & _modifier; + edoModifierMass< D > & _modifier; //! A D sampler - doSampler< D > & _sampler; + edoSampler< D > & _sampler; //! A EOT population continuator eoContinue < EOT > & _pop_continue; //! A D continuator - doContinue < D > & _distribution_continue; + edoContinue < D > & _distribution_continue; //! A full evaluation function. eoEvalFunc < EOT > & _evaluation; @@ -249,4 +269,4 @@ private: eoReplacement < EOT > & _replacor; }; -#endif // !_doEDA_h +#endif // !_edoEDA_h diff --git a/src/doEDASA.h b/src/edoEDASA.h similarity index 79% rename from src/doEDASA.h rename to src/edoEDASA.h index c6fb4927d..b77daa079 100644 --- a/src/doEDASA.h +++ b/src/edoEDASA.h @@ -1,26 +1,46 @@ -// (c) Thales group, 2010 /* - Authors: - Johann Dreo - Caner Candan +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan */ -#ifndef _doEDASA_h -#define _doEDASA_h +#ifndef _edoEDASA_h +#define _edoEDASA_h #include #include #include -#include "doAlgo.h" -#include "doEstimator.h" -#include "doModifierMass.h" -#include "doSampler.h" -#include "doContinue.h" +#include "edoAlgo.h" +#include "edoEstimator.h" +#include "edoModifierMass.h" +#include "edoSampler.h" +#include "edoContinue.h" template < typename D > -class doEDASA : public doAlgo< D > +class edoEDASA : public edoAlgo< D > { public: //! Alias for the type EOT @@ -34,7 +54,7 @@ public: public: - //! doEDASA constructor + //! edoEDASA constructor /*! All the boxes used by a EDASA need to be given. @@ -51,13 +71,13 @@ public: \param initial_temperature The initial temperature. \param replacor Population replacor */ - doEDASA (eoSelect< EOT > & selector, - doEstimator< D > & estimator, + edoEDASA (eoSelect< EOT > & selector, + edoEstimator< D > & estimator, eoSelectOne< EOT > & selectone, - doModifierMass< D > & modifier, - doSampler< D > & sampler, + edoModifierMass< D > & modifier, + edoSampler< D > & sampler, eoContinue< EOT > & pop_continue, - doContinue< D > & distribution_continue, + edoContinue< D > & distribution_continue, eoEvalFunc < EOT > & evaluation, moContinuator< moDummyNeighbor > & sa_continue, moCoolingSchedule & cooling_schedule, @@ -214,22 +234,22 @@ private: eoSelect < EOT > & _selector; //! A EOT estimator. It is going to estimate distribution parameters. - doEstimator< D > & _estimator; + edoEstimator< D > & _estimator; //! SelectOne eoSelectOne< EOT > & _selectone; //! A D modifier - doModifierMass< D > & _modifier; + edoModifierMass< D > & _modifier; //! A D sampler - doSampler< D > & _sampler; + edoSampler< D > & _sampler; //! A EOT population continuator eoContinue < EOT > & _pop_continue; //! A D continuator - doContinue < D > & _distribution_continue; + edoContinue < D > & _distribution_continue; //! A full evaluation function. eoEvalFunc < EOT > & _evaluation; @@ -247,4 +267,4 @@ private: eoReplacement < EOT > & _replacor; }; -#endif // !_doEDASA_h +#endif // !_edoEDASA_h diff --git a/src/edoEstimator.h b/src/edoEstimator.h new file mode 100644 index 000000000..6a2be7a33 --- /dev/null +++ b/src/edoEstimator.h @@ -0,0 +1,43 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoEstimator_h +#define _edoEstimator_h + +#include +#include + +template < typename D > +class edoEstimator : public eoUF< eoPop< typename D::EOType >&, D > +{ +public: + typedef typename D::EOType EOType; + + // virtual D operator() ( eoPop< EOT >& )=0 (provided by eoUF< A1, R >) +}; + +#endif // !_edoEstimator_h diff --git a/src/edoEstimatorNormalMono.h b/src/edoEstimatorNormalMono.h new file mode 100644 index 000000000..1ef61ab71 --- /dev/null +++ b/src/edoEstimatorNormalMono.h @@ -0,0 +1,97 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoEstimatorNormalMono_h +#define _edoEstimatorNormalMono_h + +#include "edoEstimator.h" +#include "edoNormalMono.h" + +template < typename EOT > +class edoEstimatorNormalMono : public edoEstimator< edoNormalMono< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + class Variance + { + public: + Variance() : _sumvar(0){} + + void update(AtomType v) + { + _n++; + + AtomType d = v - _mean; + + _mean += 1 / _n * d; + _sumvar += (_n - 1) / _n * d * d; + } + + AtomType get_mean() const {return _mean;} + AtomType get_var() const {return _sumvar / (_n - 1);} + AtomType get_std() const {return sqrt( get_var() );} + + private: + AtomType _n; + AtomType _mean; + AtomType _sumvar; + }; + +public: + edoNormalMono< EOT > operator()(eoPop& pop) + { + unsigned int popsize = pop.size(); + assert(popsize > 0); + + unsigned int dimsize = pop[0].size(); + assert(dimsize > 0); + + std::vector< Variance > var( dimsize ); + + for (unsigned int i = 0; i < popsize; ++i) + { + for (unsigned int d = 0; d < dimsize; ++d) + { + var[d].update( pop[i][d] ); + } + } + + EOT mean( dimsize ); + EOT variance( dimsize ); + + for (unsigned int d = 0; d < dimsize; ++d) + { + mean[d] = var[d].get_mean(); + variance[d] = var[d].get_var(); + } + + return edoNormalMono< EOT >( mean, variance ); + } +}; + +#endif // !_edoEstimatorNormalMono_h diff --git a/src/doEstimatorNormalMulti.h b/src/edoEstimatorNormalMulti.h similarity index 68% rename from src/doEstimatorNormalMulti.h rename to src/edoEstimatorNormalMulti.h index 286c752f2..f06fadd86 100644 --- a/src/doEstimatorNormalMulti.h +++ b/src/edoEstimatorNormalMulti.h @@ -1,18 +1,39 @@ -// (c) Thales group, 2010 /* - Authors: - Johann Dreo - Caner Candan +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan */ -#ifndef _doEstimatorNormalMulti_h -#define _doEstimatorNormalMulti_h -#include "doEstimator.h" -#include "doNormalMulti.h" +#ifndef _edoEstimatorNormalMulti_h +#define _edoEstimatorNormalMulti_h + +#include "edoEstimator.h" +#include "edoNormalMulti.h" template < typename EOT > -class doEstimatorNormalMulti : public doEstimator< doNormalMulti< EOT > > +class edoEstimatorNormalMulti : public edoEstimator< edoNormalMulti< EOT > > { public: class CovMatrix @@ -112,7 +133,7 @@ public: public: typedef typename EOT::AtomType AtomType; - doNormalMulti< EOT > operator()(eoPop& pop) + edoNormalMulti< EOT > operator()(eoPop& pop) { unsigned int popsize = pop.size(); assert(popsize > 0); @@ -122,8 +143,8 @@ public: CovMatrix cov( pop ); - return doNormalMulti< EOT >( cov.get_mean(), cov.get_varcovar() ); + return edoNormalMulti< EOT >( cov.get_mean(), cov.get_varcovar() ); } }; -#endif // !_doEstimatorNormalMulti_h +#endif // !_edoEstimatorNormalMulti_h diff --git a/src/edoEstimatorUniform.h b/src/edoEstimatorUniform.h new file mode 100644 index 000000000..7c5779fff --- /dev/null +++ b/src/edoEstimatorUniform.h @@ -0,0 +1,71 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoEstimatorUniform_h +#define _edoEstimatorUniform_h + +#include "edoEstimator.h" +#include "edoUniform.h" + +// TODO: calcule de la moyenne + covariance dans une classe derivee + +template < typename EOT > +class edoEstimatorUniform : public edoEstimator< edoUniform< EOT > > +{ +public: + edoUniform< EOT > operator()(eoPop& pop) + { + unsigned int size = pop.size(); + + assert(size > 0); + + EOT min = pop[0]; + EOT max = pop[0]; + + for (unsigned int i = 1; i < size; ++i) + { + unsigned int size = pop[i].size(); + + assert(size > 0); + + // possibilitĂ© d'utiliser std::min_element et std::max_element mais exige 2 pass au lieu d'1. + + for (unsigned int d = 0; d < size; ++d) + { + if (pop[i][d] < min[d]) + min[d] = pop[i][d]; + + if (pop[i][d] > max[d]) + max[d] = pop[i][d]; + } + } + + return edoUniform< EOT >(min, max); + } +}; + +#endif // !_edoEstimatorUniform_h diff --git a/src/edoModifier.h b/src/edoModifier.h new file mode 100644 index 000000000..5aac0bb51 --- /dev/null +++ b/src/edoModifier.h @@ -0,0 +1,41 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoModifier_h +#define _edoModifier_h + +template < typename D > +class edoModifier +{ +public: + virtual ~edoModifier(){} + + typedef typename D::EOType EOType; +}; + +#endif // !_edoModifier_h + diff --git a/src/edoModifierDispersion.h b/src/edoModifierDispersion.h new file mode 100644 index 000000000..81a6b5415 --- /dev/null +++ b/src/edoModifierDispersion.h @@ -0,0 +1,43 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoModifierDispersion_h +#define _edoModifierDispersion_h + +#include +#include + +#include "edoModifier.h" + +template < typename D > +class edoModifierDispersion : public edoModifier< D >, public eoBF< D&, eoPop< typename D::EOType >&, void > +{ +public: + // virtual void operator() ( D&, eoPop< D::EOType >& )=0 (provided by eoBF< A1, A2, R >) +}; + +#endif // !_edoModifierDispersion_h diff --git a/src/edoModifierMass.h b/src/edoModifierMass.h new file mode 100644 index 000000000..fee69d2db --- /dev/null +++ b/src/edoModifierMass.h @@ -0,0 +1,45 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoModifierMass_h +#define _edoModifierMass_h + +#include + +#include "edoModifier.h" + +template < typename D > +class edoModifierMass : public edoModifier< D >, public eoBF< D&, typename D::EOType&, void > +{ +public: + //typedef typename D::EOType::AtomType AtomType; // does not work !!! + + // virtual void operator() ( D&, D::EOType& )=0 (provided by eoBF< A1, A2, R >) +}; + +#endif // !_edoModifierMass_h + diff --git a/src/edoNormalMono.h b/src/edoNormalMono.h new file mode 100644 index 000000000..0850386cf --- /dev/null +++ b/src/edoNormalMono.h @@ -0,0 +1,58 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoNormalMono_h +#define _edoNormalMono_h + +#include "edoDistrib.h" + +template < typename EOT > +class edoNormalMono : public edoDistrib< EOT > +{ +public: + edoNormalMono( const EOT& mean, const EOT& variance ) + : _mean(mean), _variance(variance) + { + assert(_mean.size() > 0); + assert(_mean.size() == _variance.size()); + } + + unsigned int size() + { + assert(_mean.size() == _variance.size()); + return _mean.size(); + } + + EOT mean(){return _mean;} + EOT variance(){return _variance;} + +private: + EOT _mean; + EOT _variance; +}; + +#endif // !_edoNormalMono_h diff --git a/src/edoNormalMonoCenter.h b/src/edoNormalMonoCenter.h new file mode 100644 index 000000000..8bd990a72 --- /dev/null +++ b/src/edoNormalMonoCenter.h @@ -0,0 +1,47 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoNormalMonoCenter_h +#define _edoNormalMonoCenter_h + +#include "edoModifierMass.h" +#include "edoNormalMono.h" + +template < typename EOT > +class edoNormalMonoCenter : public edoModifierMass< edoNormalMono< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + void operator() ( edoNormalMono< EOT >& distrib, EOT& mass ) + { + distrib.mean() = mass; + } +}; + +#endif // !_edoNormalMonoCenter_h + diff --git a/src/doNormalMulti.h b/src/edoNormalMulti.h similarity index 86% rename from src/doNormalMulti.h rename to src/edoNormalMulti.h index 1b3e3f16c..54f695b1b 100644 --- a/src/doNormalMulti.h +++ b/src/edoNormalMulti.h @@ -5,23 +5,23 @@ Caner Candan */ -#ifndef _doNormalMulti_h -#define _doNormalMulti_h +#ifndef _edoNormalMulti_h +#define _edoNormalMulti_h #include #include -#include "doDistrib.h" +#include "edoDistrib.h" namespace ublas = boost::numeric::ublas; template < typename EOT > -class doNormalMulti : public doDistrib< EOT > +class edoNormalMulti : public edoDistrib< EOT > { public: typedef typename EOT::AtomType AtomType; - doNormalMulti + edoNormalMulti ( const ublas::vector< AtomType >& mean, const ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar @@ -48,4 +48,4 @@ private: ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar; }; -#endif // !_doNormalMulti_h +#endif // !_edoNormalMulti_h diff --git a/src/edoNormalMultiCenter.h b/src/edoNormalMultiCenter.h new file mode 100644 index 000000000..e59c5634a --- /dev/null +++ b/src/edoNormalMultiCenter.h @@ -0,0 +1,48 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoNormalMultiCenter_h +#define _edoNormalMultiCenter_h + +#include "edoModifierMass.h" +#include "edoNormalMulti.h" + +template < typename EOT > +class edoNormalMultiCenter : public edoModifierMass< edoNormalMulti< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + void operator() ( edoNormalMulti< EOT >& distrib, EOT& mass ) + { + ublas::vector< AtomType > mean( distrib.size() ); + std::copy( mass.begin(), mass.end(), mean.begin() ); + distrib.mean() = mean; + } +}; + +#endif // !_edoNormalMultiCenter_h diff --git a/src/edoSampler.h b/src/edoSampler.h new file mode 100644 index 000000000..efd776492 --- /dev/null +++ b/src/edoSampler.h @@ -0,0 +1,95 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoSampler_h +#define _edoSampler_h + +#include + +#include "edoBounder.h" +#include "edoBounderNo.h" + +template < typename D > +class edoSampler : public eoUF< D&, typename D::EOType > +{ +public: + typedef typename D::EOType EOType; + + edoSampler(edoBounder< EOType > & bounder) + : /*_dummy_bounder(),*/ _bounder(bounder) + {} + + /* + edoSampler() + : _dummy_bounder(), _bounder( _dummy_bounder ) + {} + */ + + // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) + + virtual EOType sample( D& ) = 0; + + EOType operator()( D& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + + //------------------------------------------------------------- + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + // the sample method is implemented in the derivated class + //------------------------------------------------------------- + + EOType solution(sample(distrib)); + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Now we are bounding the distribution thanks to min and max + // parameters. + //------------------------------------------------------------- + + _bounder(solution); + + //------------------------------------------------------------- + + + return solution; + } + +private: + //edoBounderNo _dummy_bounder; + + //! Bounder functor + edoBounder< EOType > & _bounder; + +}; + +#endif // !_edoSampler_h diff --git a/src/edoSamplerNormalMono.h b/src/edoSamplerNormalMono.h new file mode 100644 index 000000000..d628ba2fb --- /dev/null +++ b/src/edoSamplerNormalMono.h @@ -0,0 +1,91 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoSamplerNormalMono_h +#define _edoSamplerNormalMono_h + +#include + +#include "edoSampler.h" +#include "edoNormalMono.h" +#include "edoBounder.h" + +/** + * edoSamplerNormalMono + * This class uses the NormalMono distribution parameters (bounds) to return + * a random position used for population sampling. + */ +template < typename EOT > +class edoSamplerNormalMono : public edoSampler< edoNormalMono< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + edoSamplerNormalMono( edoBounder< EOT > & bounder ) + : edoSampler< edoNormalMono< EOT > >( bounder ) + {} + + EOT sample( edoNormalMono< EOT >& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + + //------------------------------------------------------------- + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + //------------------------------------------------------------- + + EOT solution; + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Sampling all dimensions + //------------------------------------------------------------- + + for (unsigned int i = 0; i < size; ++i) + { + AtomType mean = distrib.mean()[i]; + AtomType variance = distrib.variance()[i]; + AtomType random = rng.normal(mean, variance); + + assert(variance >= 0); + + solution.push_back(random); + } + + //------------------------------------------------------------- + + + return solution; + } +}; + +#endif // !_edoSamplerNormalMono_h diff --git a/src/doSamplerNormalMulti.h b/src/edoSamplerNormalMulti.h similarity index 67% rename from src/doSamplerNormalMulti.h rename to src/edoSamplerNormalMulti.h index 2378634a5..c1ce57453 100644 --- a/src/doSamplerNormalMulti.h +++ b/src/edoSamplerNormalMulti.h @@ -1,30 +1,39 @@ -// (c) Thales group, 2010 /* - Authors: - Johann Dreo - Caner Candan +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan */ -#ifndef _doSamplerNormalMulti_h -#define _doSamplerNormalMulti_h +#ifndef _edoSamplerNormalMulti_h +#define _edoSamplerNormalMulti_h -#include -#include +#include #include +#include -#include - -#include "doSampler.h" -#include "doNormalMulti.h" -#include "doBounder.h" - -/** - * doSamplerNormalMulti - * This class uses the Normal distribution parameters (bounds) to return - * a random position used for population sampling. - */ -template < typename EOT > -class doSamplerNormalMulti : public doSampler< doNormalMulti< EOT > > +template< class EOT > +class edoSamplerNormalMulti : public edoSampler< edoNormalMulti< EOT > > { public: typedef typename EOT::AtomType AtomType; @@ -96,11 +105,11 @@ public: ublas::symmetric_matrix< AtomType, ublas::lower > _L; }; - doSamplerNormalMulti( doBounder< EOT > & bounder ) - : doSampler< doNormalMulti< EOT > >( bounder ) + edoSamplerNormalMulti( edoBounder< EOT > & bounder ) + : edoSampler< edoNormalMulti< EOT > >( bounder ) {} - EOT sample( doNormalMulti< EOT >& distrib ) + EOT sample( edoNormalMulti< EOT >& distrib ) { unsigned int size = distrib.size(); @@ -162,4 +171,4 @@ public: } }; -#endif // !_doSamplerNormalMulti_h +#endif // !_edoSamplerNormalMulti_h diff --git a/src/edoSamplerUniform.h b/src/edoSamplerUniform.h new file mode 100644 index 000000000..a7b4c316d --- /dev/null +++ b/src/edoSamplerUniform.h @@ -0,0 +1,96 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoSamplerUniform_h +#define _edoSamplerUniform_h + +#include + +#include "edoSampler.h" +#include "edoUniform.h" + +/** + * edoSamplerUniform + * This class uses the Uniform distribution parameters (bounds) to return + * a random position used for population sampling. + */ +template < typename EOT, class D=edoUniform > // FIXME: D template name is there really used ?!? +class edoSamplerUniform : public edoSampler< edoUniform< EOT > > +{ +public: + typedef D Distrib; + + edoSamplerUniform(edoBounder< EOT > & bounder) + : edoSampler< edoUniform >(bounder) // FIXME: Why D is not used here ? + {} + + /* + edoSamplerUniform() + : edoSampler< edoUniform >() + {} + */ + + EOT sample( edoUniform< EOT >& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + + //------------------------------------------------------------- + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + //------------------------------------------------------------- + + EOT solution; + + //------------------------------------------------------------- + + + //------------------------------------------------------------- + // Sampling all dimensions + //------------------------------------------------------------- + + for (unsigned int i = 0; i < size; ++i) + { + double min = distrib.min()[i]; + double max = distrib.max()[i]; + double random = rng.uniform(min, max); + + assert(min <= random && random <= max); + + solution.push_back(random); + } + + //------------------------------------------------------------- + + + return solution; + } +}; + +#endif // !_edoSamplerUniform_h diff --git a/src/edoUniform.h b/src/edoUniform.h new file mode 100644 index 000000000..93d3b5372 --- /dev/null +++ b/src/edoUniform.h @@ -0,0 +1,43 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoUniform_h +#define _edoUniform_h + +#include "edoDistrib.h" +#include "edoVectorBounds.h" + +template < typename EOT > +class edoUniform : public edoDistrib< EOT >, public edoVectorBounds< EOT > +{ +public: + edoUniform(EOT min, EOT max) + : edoVectorBounds< EOT >(min, max) + {} +}; + +#endif // !_edoUniform_h diff --git a/src/edoUniformCenter.h b/src/edoUniformCenter.h new file mode 100644 index 000000000..8284439b1 --- /dev/null +++ b/src/edoUniformCenter.h @@ -0,0 +1,55 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoUniformCenter_h +#define _edoUniformCenter_h + +#include "edoModifierMass.h" +#include "edoUniform.h" + +template < typename EOT > +class edoUniformCenter : public edoModifierMass< edoUniform< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + void operator() ( edoUniform< EOT >& distrib, EOT& mass ) + { + for (unsigned int i = 0, n = mass.size(); i < n; ++i) + { + AtomType& min = distrib.min()[i]; + AtomType& max = distrib.max()[i]; + + AtomType range = (max - min) / 2; + + min = mass[i] - range; + max = mass[i] + range; + } + } +}; + +#endif // !_edoUniformCenter_h diff --git a/src/edoVectorBounds.h b/src/edoVectorBounds.h new file mode 100644 index 000000000..3c00995f0 --- /dev/null +++ b/src/edoVectorBounds.h @@ -0,0 +1,56 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoVectorBounds_h +#define _edoVectorBounds_h + +template < typename EOT > +class edoVectorBounds +{ +public: + edoVectorBounds(EOT min, EOT max) + : _min(min), _max(max) + { + assert(_min.size() > 0); + assert(_min.size() == _max.size()); + } + + EOT min(){return _min;} + EOT max(){return _max;} + + unsigned int size() + { + assert(_min.size() == _max.size()); + return _min.size(); + } + +private: + EOT _min; + EOT _max; +}; + +#endif // !_edoVectorBounds_h diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 48a655194..490adc1a0 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -5,10 +5,10 @@ FILE(GLOB SOURCES *.cpp) SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) -ADD_LIBRARY(doutils ${SOURCES}) -INSTALL(TARGETS doutils ARCHIVE DESTINATION lib COMPONENT libraries) +ADD_LIBRARY(edoutils ${SOURCES}) +INSTALL(TARGETS edoutils ARCHIVE DESTINATION lib COMPONENT libraries) FILE(GLOB HDRS *.h utils) -INSTALL(FILES ${HDRS} DESTINATION include/do/utils COMPONENT headers) +INSTALL(FILES ${HDRS} DESTINATION include/edo/utils COMPONENT headers) ###################################################################################### diff --git a/src/utils/doFileSnapshot.h b/src/utils/doFileSnapshot.h deleted file mode 100644 index ea0ffeb63..000000000 --- a/src/utils/doFileSnapshot.h +++ /dev/null @@ -1,74 +0,0 @@ -//----------------------------------------------------------------------------- -// doFileSnapshot.h -// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - Johann Dreo - Caner Candan - */ -//----------------------------------------------------------------------------- - -#ifndef _doFileSnapshot_h -#define _doFileSnapshot_h - -#include -#include -#include - -#include "utils/eoMonitor.h" - -class doFileSnapshot : public eoMonitor -{ -public: - - doFileSnapshot(std::string dirname, - unsigned int frequency = 1, - std::string filename = "gen", - std::string delim = " ", - unsigned int counter = 0, - bool rmFiles = true, - bool saveFilenames = true); - - virtual ~doFileSnapshot(); - - virtual bool hasChanged() {return _boolChanged;} - virtual std::string getDirName() { return _dirname; } - virtual unsigned int getCounter() { return _counter; } - virtual const std::string baseFileName() { return _filename;} - std::string getFileName() {return _currentFileName;} - - void setCurrentFileName(); - - virtual eoMonitor& operator()(void); - - virtual eoMonitor& operator()(std::ostream& os); - -private : - std::string _dirname; - unsigned int _frequency; - std::string _filename; - std::string _delim; - std::string _currentFileName; - unsigned int _counter; - bool _saveFilenames; - std::ofstream* _descOfFiles; - bool _boolChanged; -}; - -#endif // !_doFileSnapshot diff --git a/src/utils/doHyperVolume.h b/src/utils/doHyperVolume.h deleted file mode 100644 index 2a1be37fb..000000000 --- a/src/utils/doHyperVolume.h +++ /dev/null @@ -1,32 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doHyperVolume_h -#define _doHyperVolume_h - -template < typename EOT > -class doHyperVolume -{ -public: - typedef typename EOT::AtomType AtomType; - - doHyperVolume() : _hv(1) {} - - void update(AtomType v) - { - _hv *= ::sqrt( v ); - - assert( _hv <= std::numeric_limits< AtomType >::max() ); - } - - AtomType get_hypervolume() const { return _hv; } - -protected: - AtomType _hv; -}; - -#endif // !_doHyperVolume_h diff --git a/src/utils/doPopStat.h b/src/utils/doPopStat.h deleted file mode 100644 index a3ae45753..000000000 --- a/src/utils/doPopStat.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -//----------------------------------------------------------------------------- -// doPopStat.h -// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - Johann Dreo - Caner Candan - */ -//----------------------------------------------------------------------------- - -/** WARNING: this file contains 2 classes: - -eoPopString and eoSortedPopString - -that transform the population into a std::string -that can be used to dump to the screen -*/ - -#ifndef _doPopStat_h -#define _doPopStat_h - -#include - - -/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. -This snippet is a workaround: -This class will "print" a whole population into a std::string - that you can later -send to any stream -This is the plain version - see eoPopString for the Sorted version - -Note: this Stat should probably be used only within eoStdOutMonitor, and not -inside an eoFileMonitor, as the eoState construct will work much better there. -*/ -template -class doPopStat : public eoStat -{ -public: - - using eoStat::value; - - /** default Ctor, void std::string by default, as it appears - on the description line once at beginning of evolution. and - is meaningless there. _howMany defaults to 0, that is, the whole - population*/ - doPopStat(std::string _desc ="") - : eoStat("", _desc) {} - - /** Fills the value() of the eoParam with the dump of the population. */ - void operator()(const eoPop& _pop) - { - std::ostringstream os; - os << _pop; - value() = os.str(); - } -}; - -#endif // !_doPopStat_h diff --git a/src/utils/doStat.h b/src/utils/doStat.h deleted file mode 100644 index 5a6056a9f..000000000 --- a/src/utils/doStat.h +++ /dev/null @@ -1,54 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doStat_h -#define _doStat_h - -#include - -template < typename D > -class doStatBase : public eoUF< const D&, void > -{ -public: - // virtual void operator()( const D& ) = 0 (provided by eoUF< A1, R >) - - virtual void lastCall( const D& ) {} - virtual std::string className() const { return "doStatBase"; } -}; - -template < typename D > class doCheckPoint; - -template < typename D, typename T > -class doStat : public eoValueParam< T >, public doStatBase< D > -{ -public: - doStat(T value, std::string description) - : eoValueParam< T >(value, description) - {} - - virtual std::string className(void) const { return "doStat"; } - - doStat< D, T >& addTo(doCheckPoint< D >& cp) { cp.add(*this); return *this; } - - // TODO: doStat< D, T >& addTo(eoMonitor& mon) { mon.add(*this); return *this; } -}; - - -//! A parent class for any kind of distribution to dump parameter to std::string type - -template < typename D > -class doDistribStat : public doStat< D, std::string > -{ -public: - using doStat< D, std::string >::value; - - doDistribStat(std::string desc) - : doStat< D, std::string >("", desc) - {} -}; - -#endif // !_doStat_h diff --git a/src/utils/doStatNormalMono.h b/src/utils/doStatNormalMono.h deleted file mode 100644 index 1eab0d53d..000000000 --- a/src/utils/doStatNormalMono.h +++ /dev/null @@ -1,35 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doStatNormalMono_h -#define _doStatNormalMono_h - -#include "doStat.h" -#include "doNormalMono.h" - -template < typename EOT > -class doStatNormalMono : public doDistribStat< doNormalMono< EOT > > -{ -public: - using doDistribStat< doNormalMono< EOT > >::value; - - doStatNormalMono( std::string desc = "" ) - : doDistribStat< doNormalMono< EOT > >( desc ) - {} - - void operator()( const doNormalMono< EOT >& distrib ) - { - value() = "\n# ====== mono normal distribution dump =====\n"; - - std::ostringstream os; - os << distrib.mean() << " " << distrib.variance() << std::endl; - - value() += os.str(); - } -}; - -#endif // !_doStatNormalMono_h diff --git a/src/utils/doStatNormalMulti.h b/src/utils/doStatNormalMulti.h deleted file mode 100644 index d433e40e2..000000000 --- a/src/utils/doStatNormalMulti.h +++ /dev/null @@ -1,48 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doStatNormalMulti_h -#define _doStatNormalMulti_h - -#include - -#include "doStat.h" -#include "doNormalMulti.h" - -template < typename EOT > -class doStatNormalMulti : public doDistribStat< doNormalMulti< EOT > > -{ -public: - typedef typename EOT::AtomType AtomType; - - using doDistribStat< doNormalMulti< EOT > >::value; - - doStatNormalMulti( std::string desc = "" ) - : doDistribStat< doNormalMulti< EOT > >( desc ) - {} - - void operator()( const doNormalMulti< EOT >& distrib ) - { - value() = "\n# ====== multi normal distribution dump =====\n"; - - std::ostringstream os; - - os << distrib.mean() << " " << distrib.varcovar() << std::endl; - - // ublas::vector< AtomType > mean = distrib.mean(); - // std::copy(mean.begin(), mean.end(), std::ostream_iterator< std::string >( os, " " )); - - // ublas::symmetric_matrix< AtomType, ublas::lower > varcovar = distrib.varcovar(); - // std::copy(varcovar.begin(), varcovar.end(), std::ostream_iterator< std::string >( os, " " )); - - // os << std::endl; - - value() += os.str(); - } -}; - -#endif // !_doStatNormalMulti_h diff --git a/src/utils/doStatUniform.h b/src/utils/doStatUniform.h deleted file mode 100644 index 808750f7f..000000000 --- a/src/utils/doStatUniform.h +++ /dev/null @@ -1,35 +0,0 @@ -// (c) Thales group, 2010 -/* - Authors: - Johann Dreo - Caner Candan -*/ - -#ifndef _doStatUniform_h -#define _doStatUniform_h - -#include "doStat.h" -#include "doUniform.h" - -template < typename EOT > -class doStatUniform : public doDistribStat< doUniform< EOT > > -{ -public: - using doDistribStat< doUniform< EOT > >::value; - - doStatUniform( std::string desc = "" ) - : doDistribStat< doUniform< EOT > >( desc ) - {} - - void operator()( const doUniform< EOT >& distrib ) - { - value() = "\n# ====== uniform distribution dump =====\n"; - - std::ostringstream os; - os << distrib.min() << " " << distrib.max() << std::endl; - - value() += os.str(); - } -}; - -#endif // !_doStatUniform_h diff --git a/src/utils/doCheckPoint.h b/src/utils/edoCheckPoint.h similarity index 57% rename from src/utils/doCheckPoint.h rename to src/utils/edoCheckPoint.h index d424e1843..90ba72e66 100644 --- a/src/utils/doCheckPoint.h +++ b/src/utils/edoCheckPoint.h @@ -1,28 +1,48 @@ -// (c) Thales group, 2010 /* - Authors: - Johann Dreo - Caner Candan +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan */ -#ifndef _doCheckPoint_h -#define _doCheckPoint_h +#ifndef _edoCheckPoint_h +#define _edoCheckPoint_h #include #include -#include "doContinue.h" -#include "doStat.h" +#include "edoContinue.h" +#include "edoStat.h" //! eoCheckPoint< EOT > classe fitted to Distribution Object library template < typename D > -class doCheckPoint : public doContinue< D > +class edoCheckPoint : public edoContinue< D > { public: typedef typename D::EOType EOType; - doCheckPoint(doContinue< D >& _cont) + edoCheckPoint(edoContinue< D >& _cont) { _continuators.push_back( &_cont ); } @@ -74,12 +94,12 @@ public: return bContinue; } - void add(doContinue< D >& cont) { _continuators.push_back( &cont ); } - void add(doStatBase< D >& stat) { _stats.push_back( &stat ); } + void add(edoContinue< D >& cont) { _continuators.push_back( &cont ); } + void add(edoStatBase< D >& stat) { _stats.push_back( &stat ); } void add(eoMonitor& mon) { _monitors.push_back( &mon ); } void add(eoUpdater& upd) { _updaters.push_back( &upd ); } - virtual std::string className(void) const { return "doCheckPoint"; } + virtual std::string className(void) const { return "edoCheckPoint"; } std::string allClassNames() const { @@ -117,10 +137,10 @@ public: } private: - std::vector< doContinue< D >* > _continuators; - std::vector< doStatBase< D >* > _stats; + std::vector< edoContinue< D >* > _continuators; + std::vector< edoStatBase< D >* > _stats; std::vector< eoMonitor* > _monitors; std::vector< eoUpdater* > _updaters; }; -#endif // !_doCheckPoint_h +#endif // !_edoCheckPoint_h diff --git a/src/utils/doFileSnapshot.cpp b/src/utils/edoFileSnapshot.cpp similarity index 57% rename from src/utils/doFileSnapshot.cpp rename to src/utils/edoFileSnapshot.cpp index 268cfe82e..40f1db689 100644 --- a/src/utils/doFileSnapshot.cpp +++ b/src/utils/edoFileSnapshot.cpp @@ -1,28 +1,33 @@ -//----------------------------------------------------------------------------- -// doFileSnapshot.cpp -// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 /* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk - Johann Dreo - Caner Candan - */ -//----------------------------------------------------------------------------- +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +Copyright (C) 2010 Thales group +*/ +/* +Authors: + todos@geneura.ugr.es + Marc Schoenauer + Martin Keijzer + Johann DrĂ©o + Caner Candan +*/ #include @@ -30,11 +35,11 @@ #include #include -#include +#include #include #include -doFileSnapshot::doFileSnapshot(std::string dirname, +edoFileSnapshot::edoFileSnapshot(std::string dirname, unsigned int frequency /*= 1*/, std::string filename /*= "gen"*/, std::string delim /*= " "*/, @@ -79,19 +84,19 @@ doFileSnapshot::doFileSnapshot(std::string dirname, } -doFileSnapshot::~doFileSnapshot() +edoFileSnapshot::~edoFileSnapshot() { delete _descOfFiles; } -void doFileSnapshot::setCurrentFileName() +void edoFileSnapshot::setCurrentFileName() { std::ostringstream oscount; oscount << _counter; _currentFileName = _dirname + "/" + _filename + oscount.str(); } -eoMonitor& doFileSnapshot::operator()(void) +eoMonitor& edoFileSnapshot::operator()(void) { if (_counter % _frequency) { @@ -107,7 +112,7 @@ eoMonitor& doFileSnapshot::operator()(void) if (!os) { - std::string str = "doFileSnapshot: Could not open " + _currentFileName; + std::string str = "edoFileSnapshot: Could not open " + _currentFileName; throw std::runtime_error(str); } @@ -119,7 +124,7 @@ eoMonitor& doFileSnapshot::operator()(void) return operator()(os); } -eoMonitor& doFileSnapshot::operator()(std::ostream& os) +eoMonitor& edoFileSnapshot::operator()(std::ostream& os) { iterator it = vec.begin(); diff --git a/src/utils/edoFileSnapshot.h b/src/utils/edoFileSnapshot.h new file mode 100644 index 000000000..43e6f0885 --- /dev/null +++ b/src/utils/edoFileSnapshot.h @@ -0,0 +1,79 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +Copyright (C) 2010 Thales group +*/ +/* +Authors: + todos@geneura.ugr.es + Marc Schoenauer + Martin Keijzer + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoFileSnapshot_h +#define _edoFileSnapshot_h + +#include +#include +#include + +#include "utils/eoMonitor.h" + +class edoFileSnapshot : public eoMonitor +{ +public: + + edoFileSnapshot(std::string dirname, + unsigned int frequency = 1, + std::string filename = "gen", + std::string delim = " ", + unsigned int counter = 0, + bool rmFiles = true, + bool saveFilenames = true); + + virtual ~edoFileSnapshot(); + + virtual bool hasChanged() {return _boolChanged;} + virtual std::string getDirName() { return _dirname; } + virtual unsigned int getCounter() { return _counter; } + virtual const std::string baseFileName() { return _filename;} + std::string getFileName() {return _currentFileName;} + + void setCurrentFileName(); + + virtual eoMonitor& operator()(void); + + virtual eoMonitor& operator()(std::ostream& os); + +private : + std::string _dirname; + unsigned int _frequency; + std::string _filename; + std::string _delim; + std::string _currentFileName; + unsigned int _counter; + bool _saveFilenames; + std::ofstream* _descOfFiles; + bool _boolChanged; +}; + +#endif // !_edoFileSnapshot diff --git a/src/utils/edoHyperVolume.h b/src/utils/edoHyperVolume.h new file mode 100644 index 000000000..a1bf4e594 --- /dev/null +++ b/src/utils/edoHyperVolume.h @@ -0,0 +1,52 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoHyperVolume_h +#define _edoHyperVolume_h + +template < typename EOT > +class edoHyperVolume +{ +public: + typedef typename EOT::AtomType AtomType; + + edoHyperVolume() : _hv(1) {} + + void update(AtomType v) + { + _hv *= ::sqrt( v ); + + assert( _hv <= std::numeric_limits< AtomType >::max() ); + } + + AtomType get_hypervolume() const { return _hv; } + +protected: + AtomType _hv; +}; + +#endif // !_edoHyperVolume_h diff --git a/src/utils/edoPopStat.h b/src/utils/edoPopStat.h new file mode 100644 index 000000000..c8df5f969 --- /dev/null +++ b/src/utils/edoPopStat.h @@ -0,0 +1,70 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +Copyright (C) 2010 Thales group +*/ +/* +Authors: + todos@geneura.ugr.es + Marc Schoenauer + Martin Keijzer + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoPopStat_h +#define _edoPopStat_h + +#include + + +/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. +This snippet is a workaround: +This class will "print" a whole population into a std::string - that you can later +send to any stream +This is the plain version - see eoPopString for the Sorted version + +Note: this Stat should probably be used only within eoStdOutMonitor, and not +inside an eoFileMonitor, as the eoState construct will work much better there. +*/ +template +class edoPopStat : public eoStat +{ +public: + + using eoStat::value; + + /** default Ctor, void std::string by default, as it appears + on the description line once at beginning of evolution. and + is meaningless there. _howMany defaults to 0, that is, the whole + population*/ + edoPopStat(std::string _desc ="") + : eoStat("", _desc) {} + + /** Fills the value() of the eoParam with the dump of the population. */ + void operator()(const eoPop& _pop) + { + std::ostringstream os; + os << _pop; + value() = os.str(); + } +}; + +#endif // !_edoPopStat_h diff --git a/src/utils/edoStat.h b/src/utils/edoStat.h new file mode 100644 index 000000000..24dce9c49 --- /dev/null +++ b/src/utils/edoStat.h @@ -0,0 +1,74 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoStat_h +#define _edoStat_h + +#include + +template < typename D > +class edoStatBase : public eoUF< const D&, void > +{ +public: + // virtual void operator()( const D& ) = 0 (provided by eoUF< A1, R >) + + virtual void lastCall( const D& ) {} + virtual std::string className() const { return "edoStatBase"; } +}; + +template < typename D > class edoCheckPoint; + +template < typename D, typename T > +class edoStat : public eoValueParam< T >, public edoStatBase< D > +{ +public: + edoStat(T value, std::string description) + : eoValueParam< T >(value, description) + {} + + virtual std::string className(void) const { return "edoStat"; } + + edoStat< D, T >& addTo(edoCheckPoint< D >& cp) { cp.add(*this); return *this; } + + // TODO: edoStat< D, T >& addTo(eoMonitor& mon) { mon.add(*this); return *this; } +}; + + +//! A parent class for any kind of distribution to dump parameter to std::string type + +template < typename D > +class edoDistribStat : public edoStat< D, std::string > +{ +public: + using edoStat< D, std::string >::value; + + edoDistribStat(std::string desc) + : edoStat< D, std::string >("", desc) + {} +}; + +#endif // !_edoStat_h diff --git a/src/utils/edoStatNormalMono.h b/src/utils/edoStatNormalMono.h new file mode 100644 index 000000000..8cb28553c --- /dev/null +++ b/src/utils/edoStatNormalMono.h @@ -0,0 +1,55 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoStatNormalMono_h +#define _edoStatNormalMono_h + +#include "edoStat.h" +#include "edoNormalMono.h" + +template < typename EOT > +class edoStatNormalMono : public edoDistribStat< edoNormalMono< EOT > > +{ +public: + using edoDistribStat< edoNormalMono< EOT > >::value; + + edoStatNormalMono( std::string desc = "" ) + : edoDistribStat< edoNormalMono< EOT > >( desc ) + {} + + void operator()( const edoNormalMono< EOT >& distrib ) + { + value() = "\n# ====== mono normal distribution dump =====\n"; + + std::ostringstream os; + os << distrib.mean() << " " << distrib.variance() << std::endl; + + value() += os.str(); + } +}; + +#endif // !_edoStatNormalMono_h diff --git a/src/utils/edoStatNormalMulti.h b/src/utils/edoStatNormalMulti.h new file mode 100644 index 000000000..74adb0baf --- /dev/null +++ b/src/utils/edoStatNormalMulti.h @@ -0,0 +1,68 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoStatNormalMulti_h +#define _edoStatNormalMulti_h + +#include + +#include "edoStat.h" +#include "edoNormalMulti.h" + +template < typename EOT > +class edoStatNormalMulti : public edoDistribStat< edoNormalMulti< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + using edoDistribStat< edoNormalMulti< EOT > >::value; + + edoStatNormalMulti( std::string desc = "" ) + : edoDistribStat< edoNormalMulti< EOT > >( desc ) + {} + + void operator()( const edoNormalMulti< EOT >& distrib ) + { + value() = "\n# ====== multi normal distribution dump =====\n"; + + std::ostringstream os; + + os << distrib.mean() << " " << distrib.varcovar() << std::endl; + + // ublas::vector< AtomType > mean = distrib.mean(); + // std::copy(mean.begin(), mean.end(), std::ostream_iterator< std::string >( os, " " )); + + // ublas::symmetric_matrix< AtomType, ublas::lower > varcovar = distrib.varcovar(); + // std::copy(varcovar.begin(), varcovar.end(), std::ostream_iterator< std::string >( os, " " )); + + // os << std::endl; + + value() += os.str(); + } +}; + +#endif // !_edoStatNormalMulti_h diff --git a/src/utils/edoStatUniform.h b/src/utils/edoStatUniform.h new file mode 100644 index 000000000..ab75e66be --- /dev/null +++ b/src/utils/edoStatUniform.h @@ -0,0 +1,55 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#ifndef _edoStatUniform_h +#define _edoStatUniform_h + +#include "edoStat.h" +#include "edoUniform.h" + +template < typename EOT > +class edoStatUniform : public edoDistribStat< edoUniform< EOT > > +{ +public: + using edoDistribStat< edoUniform< EOT > >::value; + + edoStatUniform( std::string desc = "" ) + : edoDistribStat< edoUniform< EOT > >( desc ) + {} + + void operator()( const edoUniform< EOT >& distrib ) + { + value() = "\n# ====== uniform distribution dump =====\n"; + + std::ostringstream os; + os << distrib.min() << " " << distrib.max() << std::endl; + + value() += os.str(); + } +}; + +#endif // !_edoStatUniform_h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 74ad84ac6..aea8eaee2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -33,7 +33,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common) SET(SOURCES - t-doEstimatorNormalMulti + t-edoEstimatorNormalMulti t-mean-distance t-bounderno t-uniform @@ -43,8 +43,8 @@ SET(SOURCES FOREACH(current ${SOURCES}) ADD_EXECUTABLE(${current} ${current}.cpp) ADD_TEST(${current} ${current}) - TARGET_LINK_LIBRARIES(${current} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) - INSTALL(TARGETS ${current} RUNTIME DESTINATION share/do/test COMPONENT test) + TARGET_LINK_LIBRARIES(${current} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) + INSTALL(TARGETS ${current} RUNTIME DESTINATION share/edo/test COMPONENT test) ENDFOREACH() ###################################################################################### diff --git a/test/t-bounderno.cpp b/test/t-bounderno.cpp index 0898520b4..3f7a189b1 100644 --- a/test/t-bounderno.cpp +++ b/test/t-bounderno.cpp @@ -1,5 +1,32 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + #include -#include +#include #include "Rosenbrock.h" @@ -7,7 +34,7 @@ typedef eoReal< eoMinimizingFitness > EOT; int main(void) { - doBounderNo< EOT > bounder; + edoBounderNo< EOT > bounder; return 0; } diff --git a/test/t-continue.cpp b/test/t-continue.cpp index 5cae79ff3..7206a0c35 100644 --- a/test/t-continue.cpp +++ b/test/t-continue.cpp @@ -1,16 +1,43 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + #include -#include +#include #include "Rosenbrock.h" typedef eoReal< eoMinimizingFitness > EOT; -typedef doUniform< EOT > Distrib; +typedef edoUniform< EOT > Distrib; int main(void) { eoState state; - doContinue< Distrib >* continuator = new doDummyContinue< Distrib >(); + edoContinue< Distrib >* continuator = new edoDummyContinue< Distrib >(); state.storeFunctor(continuator); return 0; diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-edoEstimatorNormalMulti.cpp similarity index 78% rename from test/t-doEstimatorNormalMulti.cpp rename to test/t-edoEstimatorNormalMulti.cpp index 71b07e2a5..23324eef3 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-edoEstimatorNormalMulti.cpp @@ -1,3 +1,30 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + #include #include @@ -7,13 +34,13 @@ #include #include -#include +#include #include "Rosenbrock.h" #include "Sphere.h" typedef eoReal< eoMinimizingFitness > EOT; -typedef doNormalMulti< EOT > Distrib; +typedef edoNormalMulti< EOT > Distrib; typedef EOT::AtomType AtomType; int main(int ac, char** av) @@ -37,7 +64,7 @@ int main(int ac, char** av) AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value(); std::ostringstream ss; - ss << p_size << "_" << fixed << setprecision(1) + ss << p_size << "_" << std::fixed << std::setprecision(1) << mean_value << "_" << covar1_value << "_" << covar2_value << "_" << covar3_value << "_gen"; std::string gen_filename = ss.str(); @@ -101,18 +128,18 @@ int main(int ac, char** av) // (3a) distribution output preparation //----------------------------------------------------------------------------- - doDummyContinue< Distrib >* distrib_dummy_continue = new doDummyContinue< Distrib >(); + edoDummyContinue< Distrib >* distrib_dummy_continue = new edoDummyContinue< Distrib >(); state.storeFunctor(distrib_dummy_continue); - doCheckPoint< Distrib >* distrib_continue = new doCheckPoint< Distrib >( *distrib_dummy_continue ); + edoCheckPoint< Distrib >* distrib_continue = new edoCheckPoint< Distrib >( *distrib_dummy_continue ); state.storeFunctor(distrib_continue); - doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >(); + edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >(); state.storeFunctor(distrib_stat); distrib_continue->add( *distrib_stat ); - doFileSnapshot* distrib_file_snapshot = new doFileSnapshot( "TestResDistrib", 1, gen_filename ); + edoFileSnapshot* distrib_file_snapshot = new edoFileSnapshot( "TestResDistrib", 1, gen_filename ); state.storeFunctor(distrib_file_snapshot); distrib_file_snapshot->add(*distrib_stat); distrib_continue->add(*distrib_file_snapshot); @@ -131,10 +158,10 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- // Prepare bounder class to set bounds of sampling. - // This is used by doSampler. + // This is used by edoSampler. //----------------------------------------------------------------------------- - doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); state.storeFunctor(bounder); @@ -146,7 +173,7 @@ int main(int ac, char** av) // Prepare sampler class with a specific distribution //----------------------------------------------------------------------------- - doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); //----------------------------------------------------------------------------- @@ -177,11 +204,11 @@ int main(int ac, char** av) eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( *pop_cont ); state.storeFunctor(pop_continue); - doPopStat< EOT >* pop_stat = new doPopStat; + edoPopStat< EOT >* pop_stat = new edoPopStat; state.storeFunctor(pop_stat); pop_continue->add(*pop_stat); - doFileSnapshot* pop_file_snapshot = new doFileSnapshot( "TestResPop", 1, gen_filename ); + edoFileSnapshot* pop_file_snapshot = new edoFileSnapshot( "TestResPop", 1, gen_filename ); state.storeFunctor(pop_file_snapshot); pop_file_snapshot->add(*pop_stat); pop_continue->add(*pop_file_snapshot); @@ -195,7 +222,7 @@ int main(int ac, char** av) // (6) estimation phase //----------------------------------------------------------------------------- - doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); distrib = (*estimator)( pop ); diff --git a/test/t-mean-distance.cpp b/test/t-mean-distance.cpp index 46173883f..40a95c994 100644 --- a/test/t-mean-distance.cpp +++ b/test/t-mean-distance.cpp @@ -1,3 +1,30 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + #include #include @@ -11,13 +38,16 @@ #include #include -#include +#include + +#include +#include #include "Rosenbrock.h" #include "Sphere.h" typedef eoReal< eoMinimizingFitness > EOT; -typedef doNormalMulti< EOT > Distrib; +typedef edoNormalMulti< EOT > Distrib; typedef EOT::AtomType AtomType; int main(int ac, char** av) @@ -121,10 +151,10 @@ int main(int ac, char** av) //----------------------------------------------------------------------------- // Prepare bounder class to set bounds of sampling. - // This is used by doSampler. + // This is used by edoSampler. //----------------------------------------------------------------------------- - doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5), + edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); state.storeFunctor(bounder); @@ -136,7 +166,7 @@ int main(int ac, char** av) // Prepare sampler class with a specific distribution //----------------------------------------------------------------------------- - doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder ); + edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); //----------------------------------------------------------------------------- @@ -161,7 +191,7 @@ int main(int ac, char** av) // (6) estimation phase //----------------------------------------------------------------------------- - doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >(); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); distrib = (*estimator)( pop ); diff --git a/test/t-uniform.cpp b/test/t-uniform.cpp index d7aedfea6..ec01ec7a5 100644 --- a/test/t-uniform.cpp +++ b/test/t-uniform.cpp @@ -1,5 +1,32 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + #include -#include +#include #include "Rosenbrock.h" @@ -9,7 +36,7 @@ int main(void) { eoState state; - doUniform< EOT >* distrib = new doUniform< EOT >( EOT(3, -1), EOT(3, 1) ); + edoUniform< EOT >* distrib = new edoUniform< EOT >( EOT(3, -1), EOT(3, 1) ); state.storeFunctor(distrib); return 0; diff --git a/test/test_cov_parameters.py b/test/test_cov_parameters.py index f9199a9e4..7a90f1670 100755 --- a/test/test_cov_parameters.py +++ b/test/test_cov_parameters.py @@ -2,7 +2,7 @@ PSIZE = 10000 MEAN = 0 -CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1" +CMD = "./test/t-edoEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1" from os import system from numpy import arange From cbb1771dd6e610a49bc5c164eb8e48a6979537bb Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 27 Jan 2011 11:58:21 +0100 Subject: [PATCH 1729/2134] move edo stuff, that was in the wriong place after the merge, in the edo directory --- AUTHORS => edo/AUTHORS | 0 CMakeLists.txt => edo/CMakeLists.txt | 0 COPYING => edo/COPYING | 0 Packaging.cmake => edo/Packaging.cmake | 0 README => edo/README | 0 {application => edo/application}/CMakeLists.txt | 0 {application => edo/application}/common/CMakeLists.txt | 0 {application => edo/application}/common/Rosenbrock.h | 0 {application => edo/application}/common/Sphere.h | 0 {application => edo/application}/common/boxplot_eda_n_edasa.py | 0 {application => edo/application}/common/ggobi.py | 0 {application => edo/application}/common/gplot.py | 0 {application => edo/application}/eda/CMakeLists.txt | 0 {application => edo/application}/eda/eda.param | 0 {application => edo/application}/eda/main.cpp | 0 {application => edo/application}/eda_sa/CMakeLists.txt | 0 {application => edo/application}/eda_sa/eda_sa.param | 0 {application => edo/application}/eda_sa/main.cpp | 0 build_gcc_linux_debug => edo/build_gcc_linux_debug | 0 build_gcc_linux_release => edo/build_gcc_linux_release | 0 distclean => edo/distclean | 0 {doc => edo/doc}/CMakeLists.txt | 0 {doc => edo/doc}/doxyfile.cmake | 0 {doc => edo/doc}/index.h | 0 edo.pc => edo/edo.pc | 0 package_deb => edo/package_deb | 0 package_rpm => edo/package_rpm | 0 {src => edo/src}/CMakeLists.txt | 0 {src => edo/src}/TODO | 0 {src => edo/src}/edo | 0 {src => edo/src}/edo.cpp | 0 {src => edo/src}/edoAlgo.h | 0 {src => edo/src}/edoBounder.h | 0 {src => edo/src}/edoBounderBound.h | 0 {src => edo/src}/edoBounderNo.h | 0 {src => edo/src}/edoBounderRng.h | 0 {src => edo/src}/edoBounderUniform.h | 0 {src => edo/src}/edoContinue.h | 0 {src => edo/src}/edoDistrib.h | 0 {src => edo/src}/edoEDA.h | 0 {src => edo/src}/edoEDASA.h | 0 {src => edo/src}/edoEstimator.h | 0 {src => edo/src}/edoEstimatorNormalMono.h | 0 {src => edo/src}/edoEstimatorNormalMulti.h | 0 {src => edo/src}/edoEstimatorUniform.h | 0 {src => edo/src}/edoModifier.h | 0 {src => edo/src}/edoModifierDispersion.h | 0 {src => edo/src}/edoModifierMass.h | 0 {src => edo/src}/edoNormalMono.h | 0 {src => edo/src}/edoNormalMonoCenter.h | 0 {src => edo/src}/edoNormalMulti.h | 0 {src => edo/src}/edoNormalMultiCenter.h | 0 {src => edo/src}/edoSampler.h | 0 {src => edo/src}/edoSamplerNormalMono.h | 0 {src => edo/src}/edoSamplerNormalMulti.h | 0 {src => edo/src}/edoSamplerUniform.h | 0 {src => edo/src}/edoUniform.h | 0 {src => edo/src}/edoUniformCenter.h | 0 {src => edo/src}/edoVectorBounds.h | 0 {src => edo/src}/utils/CMakeLists.txt | 0 {src => edo/src}/utils/edoCheckPoint.h | 0 {src => edo/src}/utils/edoFileSnapshot.cpp | 0 {src => edo/src}/utils/edoFileSnapshot.h | 0 {src => edo/src}/utils/edoHyperVolume.h | 0 {src => edo/src}/utils/edoPopStat.h | 0 {src => edo/src}/utils/edoStat.h | 0 {src => edo/src}/utils/edoStatNormalMono.h | 0 {src => edo/src}/utils/edoStatNormalMulti.h | 0 {src => edo/src}/utils/edoStatUniform.h | 0 {test => edo/test}/CMakeLists.txt | 0 {test => edo/test}/boxplot.py | 0 {test => edo/test}/t-bounderno.cpp | 0 {test => edo/test}/t-continue.cpp | 0 {test => edo/test}/t-edoEstimatorNormalMulti.cpp | 0 {test => edo/test}/t-mean-distance.cpp | 0 {test => edo/test}/t-uniform.cpp | 0 {test => edo/test}/test_cov_parameters.py | 0 77 files changed, 0 insertions(+), 0 deletions(-) rename AUTHORS => edo/AUTHORS (100%) rename CMakeLists.txt => edo/CMakeLists.txt (100%) rename COPYING => edo/COPYING (100%) rename Packaging.cmake => edo/Packaging.cmake (100%) rename README => edo/README (100%) rename {application => edo/application}/CMakeLists.txt (100%) rename {application => edo/application}/common/CMakeLists.txt (100%) rename {application => edo/application}/common/Rosenbrock.h (100%) rename {application => edo/application}/common/Sphere.h (100%) rename {application => edo/application}/common/boxplot_eda_n_edasa.py (100%) rename {application => edo/application}/common/ggobi.py (100%) rename {application => edo/application}/common/gplot.py (100%) rename {application => edo/application}/eda/CMakeLists.txt (100%) rename {application => edo/application}/eda/eda.param (100%) rename {application => edo/application}/eda/main.cpp (100%) rename {application => edo/application}/eda_sa/CMakeLists.txt (100%) rename {application => edo/application}/eda_sa/eda_sa.param (100%) rename {application => edo/application}/eda_sa/main.cpp (100%) rename build_gcc_linux_debug => edo/build_gcc_linux_debug (100%) rename build_gcc_linux_release => edo/build_gcc_linux_release (100%) rename distclean => edo/distclean (100%) rename {doc => edo/doc}/CMakeLists.txt (100%) rename {doc => edo/doc}/doxyfile.cmake (100%) rename {doc => edo/doc}/index.h (100%) rename edo.pc => edo/edo.pc (100%) rename package_deb => edo/package_deb (100%) rename package_rpm => edo/package_rpm (100%) rename {src => edo/src}/CMakeLists.txt (100%) rename {src => edo/src}/TODO (100%) rename {src => edo/src}/edo (100%) rename {src => edo/src}/edo.cpp (100%) rename {src => edo/src}/edoAlgo.h (100%) rename {src => edo/src}/edoBounder.h (100%) rename {src => edo/src}/edoBounderBound.h (100%) rename {src => edo/src}/edoBounderNo.h (100%) rename {src => edo/src}/edoBounderRng.h (100%) rename {src => edo/src}/edoBounderUniform.h (100%) rename {src => edo/src}/edoContinue.h (100%) rename {src => edo/src}/edoDistrib.h (100%) rename {src => edo/src}/edoEDA.h (100%) rename {src => edo/src}/edoEDASA.h (100%) rename {src => edo/src}/edoEstimator.h (100%) rename {src => edo/src}/edoEstimatorNormalMono.h (100%) rename {src => edo/src}/edoEstimatorNormalMulti.h (100%) rename {src => edo/src}/edoEstimatorUniform.h (100%) rename {src => edo/src}/edoModifier.h (100%) rename {src => edo/src}/edoModifierDispersion.h (100%) rename {src => edo/src}/edoModifierMass.h (100%) rename {src => edo/src}/edoNormalMono.h (100%) rename {src => edo/src}/edoNormalMonoCenter.h (100%) rename {src => edo/src}/edoNormalMulti.h (100%) rename {src => edo/src}/edoNormalMultiCenter.h (100%) rename {src => edo/src}/edoSampler.h (100%) rename {src => edo/src}/edoSamplerNormalMono.h (100%) rename {src => edo/src}/edoSamplerNormalMulti.h (100%) rename {src => edo/src}/edoSamplerUniform.h (100%) rename {src => edo/src}/edoUniform.h (100%) rename {src => edo/src}/edoUniformCenter.h (100%) rename {src => edo/src}/edoVectorBounds.h (100%) rename {src => edo/src}/utils/CMakeLists.txt (100%) rename {src => edo/src}/utils/edoCheckPoint.h (100%) rename {src => edo/src}/utils/edoFileSnapshot.cpp (100%) rename {src => edo/src}/utils/edoFileSnapshot.h (100%) rename {src => edo/src}/utils/edoHyperVolume.h (100%) rename {src => edo/src}/utils/edoPopStat.h (100%) rename {src => edo/src}/utils/edoStat.h (100%) rename {src => edo/src}/utils/edoStatNormalMono.h (100%) rename {src => edo/src}/utils/edoStatNormalMulti.h (100%) rename {src => edo/src}/utils/edoStatUniform.h (100%) rename {test => edo/test}/CMakeLists.txt (100%) rename {test => edo/test}/boxplot.py (100%) rename {test => edo/test}/t-bounderno.cpp (100%) rename {test => edo/test}/t-continue.cpp (100%) rename {test => edo/test}/t-edoEstimatorNormalMulti.cpp (100%) rename {test => edo/test}/t-mean-distance.cpp (100%) rename {test => edo/test}/t-uniform.cpp (100%) rename {test => edo/test}/test_cov_parameters.py (100%) diff --git a/AUTHORS b/edo/AUTHORS similarity index 100% rename from AUTHORS rename to edo/AUTHORS diff --git a/CMakeLists.txt b/edo/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to edo/CMakeLists.txt diff --git a/COPYING b/edo/COPYING similarity index 100% rename from COPYING rename to edo/COPYING diff --git a/Packaging.cmake b/edo/Packaging.cmake similarity index 100% rename from Packaging.cmake rename to edo/Packaging.cmake diff --git a/README b/edo/README similarity index 100% rename from README rename to edo/README diff --git a/application/CMakeLists.txt b/edo/application/CMakeLists.txt similarity index 100% rename from application/CMakeLists.txt rename to edo/application/CMakeLists.txt diff --git a/application/common/CMakeLists.txt b/edo/application/common/CMakeLists.txt similarity index 100% rename from application/common/CMakeLists.txt rename to edo/application/common/CMakeLists.txt diff --git a/application/common/Rosenbrock.h b/edo/application/common/Rosenbrock.h similarity index 100% rename from application/common/Rosenbrock.h rename to edo/application/common/Rosenbrock.h diff --git a/application/common/Sphere.h b/edo/application/common/Sphere.h similarity index 100% rename from application/common/Sphere.h rename to edo/application/common/Sphere.h diff --git a/application/common/boxplot_eda_n_edasa.py b/edo/application/common/boxplot_eda_n_edasa.py similarity index 100% rename from application/common/boxplot_eda_n_edasa.py rename to edo/application/common/boxplot_eda_n_edasa.py diff --git a/application/common/ggobi.py b/edo/application/common/ggobi.py similarity index 100% rename from application/common/ggobi.py rename to edo/application/common/ggobi.py diff --git a/application/common/gplot.py b/edo/application/common/gplot.py similarity index 100% rename from application/common/gplot.py rename to edo/application/common/gplot.py diff --git a/application/eda/CMakeLists.txt b/edo/application/eda/CMakeLists.txt similarity index 100% rename from application/eda/CMakeLists.txt rename to edo/application/eda/CMakeLists.txt diff --git a/application/eda/eda.param b/edo/application/eda/eda.param similarity index 100% rename from application/eda/eda.param rename to edo/application/eda/eda.param diff --git a/application/eda/main.cpp b/edo/application/eda/main.cpp similarity index 100% rename from application/eda/main.cpp rename to edo/application/eda/main.cpp diff --git a/application/eda_sa/CMakeLists.txt b/edo/application/eda_sa/CMakeLists.txt similarity index 100% rename from application/eda_sa/CMakeLists.txt rename to edo/application/eda_sa/CMakeLists.txt diff --git a/application/eda_sa/eda_sa.param b/edo/application/eda_sa/eda_sa.param similarity index 100% rename from application/eda_sa/eda_sa.param rename to edo/application/eda_sa/eda_sa.param diff --git a/application/eda_sa/main.cpp b/edo/application/eda_sa/main.cpp similarity index 100% rename from application/eda_sa/main.cpp rename to edo/application/eda_sa/main.cpp diff --git a/build_gcc_linux_debug b/edo/build_gcc_linux_debug similarity index 100% rename from build_gcc_linux_debug rename to edo/build_gcc_linux_debug diff --git a/build_gcc_linux_release b/edo/build_gcc_linux_release similarity index 100% rename from build_gcc_linux_release rename to edo/build_gcc_linux_release diff --git a/distclean b/edo/distclean similarity index 100% rename from distclean rename to edo/distclean diff --git a/doc/CMakeLists.txt b/edo/doc/CMakeLists.txt similarity index 100% rename from doc/CMakeLists.txt rename to edo/doc/CMakeLists.txt diff --git a/doc/doxyfile.cmake b/edo/doc/doxyfile.cmake similarity index 100% rename from doc/doxyfile.cmake rename to edo/doc/doxyfile.cmake diff --git a/doc/index.h b/edo/doc/index.h similarity index 100% rename from doc/index.h rename to edo/doc/index.h diff --git a/edo.pc b/edo/edo.pc similarity index 100% rename from edo.pc rename to edo/edo.pc diff --git a/package_deb b/edo/package_deb similarity index 100% rename from package_deb rename to edo/package_deb diff --git a/package_rpm b/edo/package_rpm similarity index 100% rename from package_rpm rename to edo/package_rpm diff --git a/src/CMakeLists.txt b/edo/src/CMakeLists.txt similarity index 100% rename from src/CMakeLists.txt rename to edo/src/CMakeLists.txt diff --git a/src/TODO b/edo/src/TODO similarity index 100% rename from src/TODO rename to edo/src/TODO diff --git a/src/edo b/edo/src/edo similarity index 100% rename from src/edo rename to edo/src/edo diff --git a/src/edo.cpp b/edo/src/edo.cpp similarity index 100% rename from src/edo.cpp rename to edo/src/edo.cpp diff --git a/src/edoAlgo.h b/edo/src/edoAlgo.h similarity index 100% rename from src/edoAlgo.h rename to edo/src/edoAlgo.h diff --git a/src/edoBounder.h b/edo/src/edoBounder.h similarity index 100% rename from src/edoBounder.h rename to edo/src/edoBounder.h diff --git a/src/edoBounderBound.h b/edo/src/edoBounderBound.h similarity index 100% rename from src/edoBounderBound.h rename to edo/src/edoBounderBound.h diff --git a/src/edoBounderNo.h b/edo/src/edoBounderNo.h similarity index 100% rename from src/edoBounderNo.h rename to edo/src/edoBounderNo.h diff --git a/src/edoBounderRng.h b/edo/src/edoBounderRng.h similarity index 100% rename from src/edoBounderRng.h rename to edo/src/edoBounderRng.h diff --git a/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h similarity index 100% rename from src/edoBounderUniform.h rename to edo/src/edoBounderUniform.h diff --git a/src/edoContinue.h b/edo/src/edoContinue.h similarity index 100% rename from src/edoContinue.h rename to edo/src/edoContinue.h diff --git a/src/edoDistrib.h b/edo/src/edoDistrib.h similarity index 100% rename from src/edoDistrib.h rename to edo/src/edoDistrib.h diff --git a/src/edoEDA.h b/edo/src/edoEDA.h similarity index 100% rename from src/edoEDA.h rename to edo/src/edoEDA.h diff --git a/src/edoEDASA.h b/edo/src/edoEDASA.h similarity index 100% rename from src/edoEDASA.h rename to edo/src/edoEDASA.h diff --git a/src/edoEstimator.h b/edo/src/edoEstimator.h similarity index 100% rename from src/edoEstimator.h rename to edo/src/edoEstimator.h diff --git a/src/edoEstimatorNormalMono.h b/edo/src/edoEstimatorNormalMono.h similarity index 100% rename from src/edoEstimatorNormalMono.h rename to edo/src/edoEstimatorNormalMono.h diff --git a/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h similarity index 100% rename from src/edoEstimatorNormalMulti.h rename to edo/src/edoEstimatorNormalMulti.h diff --git a/src/edoEstimatorUniform.h b/edo/src/edoEstimatorUniform.h similarity index 100% rename from src/edoEstimatorUniform.h rename to edo/src/edoEstimatorUniform.h diff --git a/src/edoModifier.h b/edo/src/edoModifier.h similarity index 100% rename from src/edoModifier.h rename to edo/src/edoModifier.h diff --git a/src/edoModifierDispersion.h b/edo/src/edoModifierDispersion.h similarity index 100% rename from src/edoModifierDispersion.h rename to edo/src/edoModifierDispersion.h diff --git a/src/edoModifierMass.h b/edo/src/edoModifierMass.h similarity index 100% rename from src/edoModifierMass.h rename to edo/src/edoModifierMass.h diff --git a/src/edoNormalMono.h b/edo/src/edoNormalMono.h similarity index 100% rename from src/edoNormalMono.h rename to edo/src/edoNormalMono.h diff --git a/src/edoNormalMonoCenter.h b/edo/src/edoNormalMonoCenter.h similarity index 100% rename from src/edoNormalMonoCenter.h rename to edo/src/edoNormalMonoCenter.h diff --git a/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h similarity index 100% rename from src/edoNormalMulti.h rename to edo/src/edoNormalMulti.h diff --git a/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h similarity index 100% rename from src/edoNormalMultiCenter.h rename to edo/src/edoNormalMultiCenter.h diff --git a/src/edoSampler.h b/edo/src/edoSampler.h similarity index 100% rename from src/edoSampler.h rename to edo/src/edoSampler.h diff --git a/src/edoSamplerNormalMono.h b/edo/src/edoSamplerNormalMono.h similarity index 100% rename from src/edoSamplerNormalMono.h rename to edo/src/edoSamplerNormalMono.h diff --git a/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h similarity index 100% rename from src/edoSamplerNormalMulti.h rename to edo/src/edoSamplerNormalMulti.h diff --git a/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h similarity index 100% rename from src/edoSamplerUniform.h rename to edo/src/edoSamplerUniform.h diff --git a/src/edoUniform.h b/edo/src/edoUniform.h similarity index 100% rename from src/edoUniform.h rename to edo/src/edoUniform.h diff --git a/src/edoUniformCenter.h b/edo/src/edoUniformCenter.h similarity index 100% rename from src/edoUniformCenter.h rename to edo/src/edoUniformCenter.h diff --git a/src/edoVectorBounds.h b/edo/src/edoVectorBounds.h similarity index 100% rename from src/edoVectorBounds.h rename to edo/src/edoVectorBounds.h diff --git a/src/utils/CMakeLists.txt b/edo/src/utils/CMakeLists.txt similarity index 100% rename from src/utils/CMakeLists.txt rename to edo/src/utils/CMakeLists.txt diff --git a/src/utils/edoCheckPoint.h b/edo/src/utils/edoCheckPoint.h similarity index 100% rename from src/utils/edoCheckPoint.h rename to edo/src/utils/edoCheckPoint.h diff --git a/src/utils/edoFileSnapshot.cpp b/edo/src/utils/edoFileSnapshot.cpp similarity index 100% rename from src/utils/edoFileSnapshot.cpp rename to edo/src/utils/edoFileSnapshot.cpp diff --git a/src/utils/edoFileSnapshot.h b/edo/src/utils/edoFileSnapshot.h similarity index 100% rename from src/utils/edoFileSnapshot.h rename to edo/src/utils/edoFileSnapshot.h diff --git a/src/utils/edoHyperVolume.h b/edo/src/utils/edoHyperVolume.h similarity index 100% rename from src/utils/edoHyperVolume.h rename to edo/src/utils/edoHyperVolume.h diff --git a/src/utils/edoPopStat.h b/edo/src/utils/edoPopStat.h similarity index 100% rename from src/utils/edoPopStat.h rename to edo/src/utils/edoPopStat.h diff --git a/src/utils/edoStat.h b/edo/src/utils/edoStat.h similarity index 100% rename from src/utils/edoStat.h rename to edo/src/utils/edoStat.h diff --git a/src/utils/edoStatNormalMono.h b/edo/src/utils/edoStatNormalMono.h similarity index 100% rename from src/utils/edoStatNormalMono.h rename to edo/src/utils/edoStatNormalMono.h diff --git a/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h similarity index 100% rename from src/utils/edoStatNormalMulti.h rename to edo/src/utils/edoStatNormalMulti.h diff --git a/src/utils/edoStatUniform.h b/edo/src/utils/edoStatUniform.h similarity index 100% rename from src/utils/edoStatUniform.h rename to edo/src/utils/edoStatUniform.h diff --git a/test/CMakeLists.txt b/edo/test/CMakeLists.txt similarity index 100% rename from test/CMakeLists.txt rename to edo/test/CMakeLists.txt diff --git a/test/boxplot.py b/edo/test/boxplot.py similarity index 100% rename from test/boxplot.py rename to edo/test/boxplot.py diff --git a/test/t-bounderno.cpp b/edo/test/t-bounderno.cpp similarity index 100% rename from test/t-bounderno.cpp rename to edo/test/t-bounderno.cpp diff --git a/test/t-continue.cpp b/edo/test/t-continue.cpp similarity index 100% rename from test/t-continue.cpp rename to edo/test/t-continue.cpp diff --git a/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp similarity index 100% rename from test/t-edoEstimatorNormalMulti.cpp rename to edo/test/t-edoEstimatorNormalMulti.cpp diff --git a/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp similarity index 100% rename from test/t-mean-distance.cpp rename to edo/test/t-mean-distance.cpp diff --git a/test/t-uniform.cpp b/edo/test/t-uniform.cpp similarity index 100% rename from test/t-uniform.cpp rename to edo/test/t-uniform.cpp diff --git a/test/test_cov_parameters.py b/edo/test/test_cov_parameters.py similarity index 100% rename from test/test_cov_parameters.py rename to edo/test/test_cov_parameters.py From 89320c179fac084666e37e305cd2172a058c439e Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 27 Jan 2011 11:59:14 +0100 Subject: [PATCH 1730/2134] a very simple script to create snapshot of the current head --- archive_current.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 archive_current.sh diff --git a/archive_current.sh b/archive_current.sh new file mode 100755 index 000000000..c1bfe3778 --- /dev/null +++ b/archive_current.sh @@ -0,0 +1,3 @@ +today=`date --iso-8601` +git archive --format zip master > eo_${today}.zip + From db4eda2de527dcc026d1080990c4c294c24d506a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 14:41:17 +0100 Subject: [PATCH 1731/2134] * eoParallel: added a missing attribute --- eo/src/utils/eoParallel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 2ce9ea478..79cedfda6 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -63,6 +63,7 @@ private: eoValueParam _isEnabled; eoValueParam _isDynamic; eoValueParam _prefix; + eoValueParam _nthreads; }; void make_parallel(eoParser&); From 36fe44b898d97507db127279999fafecd746d3c7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 27 Jan 2011 17:50:11 +0100 Subject: [PATCH 1732/2134] * removed some warnings --- eo/src/eoDualFitness.h | 8 ++++---- eo/src/eoEvalUserTimeThrowException.h | 2 +- eo/src/eoPopEvalFunc.h | 3 ++- eo/src/utils/eoOStreamMonitor.h | 1 + eo/test/CMakeLists.txt | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 337520575..4cd34c6ad 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -264,13 +264,13 @@ public: // eoDualStatSwitch( eoStat & stat_feasible, eoStat & stat_unfeasible, std::string sep=" " ) : eoDualStatSwitch( EOSTAT & stat_feasible, EOSTAT & stat_unfeasible, std::string sep=" " ) : - _stat_feasible(stat_feasible), - _stat_unfeasible(stat_unfeasible), - _sep(sep), eoStat( "?"+sep+"?", stat_feasible.longName()+sep+stat_unfeasible.longName() - ) + ), + _stat_feasible(stat_feasible), + _stat_unfeasible(stat_unfeasible), + _sep(sep) { } virtual void operator()( const eoPop & pop ) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index 57678d888..c237c09b4 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -39,7 +39,7 @@ template< class EOT > class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > { public: - eoEvalUserTimeThrowException( eoEvalFunc & func, const long max ) : _max(max), eoEvalFuncCounter( func, "CPU-user") {} + eoEvalUserTimeThrowException( eoEvalFunc & func, const long max ) : eoEvalFuncCounter( func, "CPU-user"), _max(max) {} virtual void operator() ( EOT & eo ) { diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index 9f5fca594..2753e957f 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -69,7 +69,8 @@ public: /** Do the job: simple loop over the offspring */ void operator()(eoPop & _parents, eoPop & _offspring) { - apply(eval, _offspring); + (void)_parents; + apply(eval, _offspring); } private: diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 8f44677cb..7436f6ef8 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -48,6 +48,7 @@ public : eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) { + (void)_verbose; eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; } diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 8536ee0c8..f4ed98543 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -65,7 +65,7 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat - t-eoDualFitness + #t-eoDualFitness t-eoParser ) From 61faa6363ba2376ecf202031c356d77a829023e6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 28 Jan 2011 11:11:20 +0100 Subject: [PATCH 1733/2134] * a little update in building script files --- eo/build_gcc_linux_debug | 2 +- eo/build_gcc_linux_release | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/build_gcc_linux_debug b/eo/build_gcc_linux_debug index da385fdb8..144a5298a 100755 --- a/eo/build_gcc_linux_debug +++ b/eo/build_gcc_linux_debug @@ -1,6 +1,6 @@ #!/usr/bin/env sh -mkdir debug +mkdir -p debug cd debug cmake -DCMAKE_BUILD_TYPE=Debug .. make diff --git a/eo/build_gcc_linux_release b/eo/build_gcc_linux_release index 78a66c551..fb220d044 100755 --- a/eo/build_gcc_linux_release +++ b/eo/build_gcc_linux_release @@ -1,6 +1,6 @@ #!/usr/bin/env sh -mkdir release +mkdir -p release cd release cmake .. make From 54e2a8b91e4cad695d5090101de48d97615f7594 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 28 Jan 2011 14:38:50 +0100 Subject: [PATCH 1734/2134] * apply.h: size variable missing without openmp --- eo/CMakeLists.txt | 2 +- eo/src/apply.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 548f1b548..3a5fe04ba 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -106,7 +106,7 @@ ENDIF (ENABLE_CMAKE_TESTING) ### 5) Where must cmake go now ? ###################################################################################### -ADD_SUBDIRECTORY(app) +#ADD_SUBDIRECTORY(app) ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(test) diff --git a/eo/src/apply.h b/eo/src/apply.h index 63044c385..ba6d2f9a6 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -40,12 +40,12 @@ template void apply(eoUF& _proc, std::vector& _pop) { + size_t size = _pop.size(); + #ifdef _OPENMP omp_set_num_threads(eo::parallel.nthreads()); - size_t size = _pop.size(); - double t1 = omp_get_wtime(); if (!eo::parallel.isDynamic()) From 2044d92eff240d90e7b86eff662bfda5319f48d9 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 2 Feb 2011 23:50:58 +0100 Subject: [PATCH 1735/2134] * eoParallel: added the call to omp_set_num_threads to define the number of threads with parameters --- eo/src/apply.h | 2 -- eo/src/utils/eoParallel.cpp | 12 ++++++++++++ eo/test/t-eoParallel.cpp | 10 ++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index ba6d2f9a6..024dd8963 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -44,8 +44,6 @@ void apply(eoUF& _proc, std::vector& _pop) #ifdef _OPENMP - omp_set_num_threads(eo::parallel.nthreads()); - double t1 = omp_get_wtime(); if (!eo::parallel.isDynamic()) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index e267ce7f1..fdc047ac1 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -25,6 +25,8 @@ Caner Candan */ +#include + #include "eoParallel.h" eoParallel::eoParallel() : @@ -74,6 +76,16 @@ void eoParallel::_createParameters( eoParser& parser ) void make_parallel(eoParser& parser) { eo::parallel._createParameters( parser ); + +#ifdef _OPENMP + if ( eo::parallel.isEnabled() ) + { + if ( eo::parallel.nthreads() > 0 ) + { + omp_set_num_threads( eo::parallel.nthreads() ); + } + } +#endif // !_OPENMP } eoParallel eo::parallel; diff --git a/eo/test/t-eoParallel.cpp b/eo/test/t-eoParallel.cpp index 055f45987..72d4f264a 100644 --- a/eo/test/t-eoParallel.cpp +++ b/eo/test/t-eoParallel.cpp @@ -2,6 +2,8 @@ // t-eoParallel.cpp //----------------------------------------------------------------------------- +#include + #include #include //#include @@ -40,6 +42,14 @@ int main(int ac, char** av) eo::log << eo::quiet << "DONE!" << std::endl; +#pragma omp parallel + { + if ( 0 == omp_get_thread_num() ) + { + eo::log << "num of threads: " << omp_get_num_threads() << std::endl; + } + } + return 0; } From 85d02cbdb304760704bfe5905b277808e0e81ab7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 4 Feb 2011 16:28:24 +0100 Subject: [PATCH 1736/2134] * eoParallel: added the parameter enableResults --- eo/src/apply.h | 7 +++++-- eo/src/utils/eoParallel.cpp | 4 +++- eo/src/utils/eoParallel.h | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 024dd8963..5c683671d 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -61,8 +61,11 @@ void apply(eoUF& _proc, std::vector& _pop) double t2 = omp_get_wtime(); - eoLogger log; - log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; + if ( eo::parallel.enableResults() ) + { + eoLogger log; + log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; + } #else // _OPENMP diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index fdc047ac1..e58585ef9 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -33,7 +33,8 @@ eoParallel::eoParallel() : _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ), - _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ) + _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ), + _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ) {} std::string eoParallel::className() const @@ -71,6 +72,7 @@ void eoParallel::_createParameters( eoParser& parser ) parser.processParam( _isDynamic, section ); parser.processParam( _prefix, section ); parser.processParam( _nthreads, section ); + parser.processParam( _enableResults, section ); } void make_parallel(eoParser& parser) diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 79cedfda6..54b428213 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -54,6 +54,8 @@ public: inline unsigned int nthreads() const { return _nthreads.value(); } + inline bool enableResults() const { return _enableResults.value(); } + friend void make_parallel(eoParser&); private: @@ -64,6 +66,7 @@ private: eoValueParam _isDynamic; eoValueParam _prefix; eoValueParam _nthreads; + eoValueParam _enableResults; }; void make_parallel(eoParser&); From 7add23931b0365a65ed0c732785bb2109e1496af Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 4 Feb 2011 16:29:27 +0100 Subject: [PATCH 1737/2134] * t-openmpy.*: added a header --- eo/test/t-openmp.cpp | 26 ++++++++++++++++++++++++++ eo/test/t-openmp.py | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index 325cb653a..cd3450805 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -1,3 +1,29 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Caner Candan + +*/ + //----------------------------------------------------------------------------- // t-openmp.cpp //----------------------------------------------------------------------------- diff --git a/eo/test/t-openmp.py b/eo/test/t-openmp.py index ab43bb930..5cd9e1314 100755 --- a/eo/test/t-openmp.py +++ b/eo/test/t-openmp.py @@ -1,5 +1,28 @@ #!/usr/bin/env python +# +# (c) Thales group, 2010 +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; +# version 2 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Contact: http://eodev.sourceforge.net +# +# Authors: +# Caner Candan +# + import optparse, logging, sys, os from datetime import datetime From 9e95eefb529881feec57253db87cc51164860022 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 8 Feb 2011 10:59:00 +0100 Subject: [PATCH 1738/2134] * eoParallel: added the both parameters enable_results and do_measure --- eo/src/apply.h | 10 +++++++--- eo/src/utils/eoParallel.cpp | 26 ++++++++++++++++++++++++-- eo/src/utils/eoParallel.h | 4 ++++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 5c683671d..33b354fcd 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -44,7 +44,12 @@ void apply(eoUF& _proc, std::vector& _pop) #ifdef _OPENMP - double t1 = omp_get_wtime(); + double t1 = 0; + + if ( eo::parallel.enableResults() ) + { + t1 = omp_get_wtime(); + } if (!eo::parallel.isDynamic()) { @@ -59,10 +64,9 @@ void apply(eoUF& _proc, std::vector& _pop) for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } } - double t2 = omp_get_wtime(); - if ( eo::parallel.enableResults() ) { + double t2 = omp_get_wtime(); eoLogger log; log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; } diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index e58585ef9..e0ce63aab 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -28,14 +28,30 @@ Caner Candan #include #include "eoParallel.h" +#include "eoLogger.h" eoParallel::eoParallel() : _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ), _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ), - _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ) -{} + _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ), + _doMeasure( false, "parallelize-do-measure", "Do some measures during execution", '\0' ), + _t_start(0) +{ +} + +eoParallel::~eoParallel() +{ +#ifdef _OPENMP + if ( doMeasure() ) + { + double _t_end = omp_get_wtime(); + eoLogger log; + log << eo::file("measure_" + prefix()) << _t_end - _t_start << std::endl; + } +#endif // !_OPENMP +} std::string eoParallel::className() const { @@ -73,6 +89,7 @@ void eoParallel::_createParameters( eoParser& parser ) parser.processParam( _prefix, section ); parser.processParam( _nthreads, section ); parser.processParam( _enableResults, section ); + parser.processParam( _doMeasure, section ); } void make_parallel(eoParser& parser) @@ -87,6 +104,11 @@ void make_parallel(eoParser& parser) omp_set_num_threads( eo::parallel.nthreads() ); } } + + if ( eo::parallel.doMeasure() ) + { + eo::parallel._t_start = omp_get_wtime(); + } #endif // !_OPENMP } diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 54b428213..3f22f6c43 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -44,6 +44,7 @@ class eoParallel : public eoObject { public: eoParallel(); + ~eoParallel(); virtual std::string className() const; @@ -55,6 +56,7 @@ public: inline unsigned int nthreads() const { return _nthreads.value(); } inline bool enableResults() const { return _enableResults.value(); } + inline bool doMeasure() const { return _doMeasure.value(); } friend void make_parallel(eoParser&); @@ -67,6 +69,8 @@ private: eoValueParam _prefix; eoValueParam _nthreads; eoValueParam _enableResults; + eoValueParam _doMeasure; + double _t_start; }; void make_parallel(eoParser&); From 1d568a5abdf967e19b2a8e1ef2220cba1ea90a5d Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 24 Feb 2011 10:32:13 +0100 Subject: [PATCH 1739/2134] * application/common/cmakelists.txt: fixed issues with copy of files --- edo/application/common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/application/common/CMakeLists.txt b/edo/application/common/CMakeLists.txt index d16353f59..14c3509e3 100644 --- a/edo/application/common/CMakeLists.txt +++ b/edo/application/common/CMakeLists.txt @@ -10,6 +10,6 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${DO_BINARY_DIR}/${file} + ${EDO_BINARY_DIR}/${file} ) ENDFOREACH(file) From d1426b4bce43dc6c562398b264432e39c2bdabde Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 24 Feb 2011 11:09:51 +0100 Subject: [PATCH 1740/2134] * fixed issues on the code to be compatible with last version of boost --- edo/src/edoEstimatorNormalMulti.h | 2 +- edo/src/edoSamplerNormalMulti.h | 2 +- edo/test/t-mean-distance.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index f06fadd86..8b4b7abb6 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -73,7 +73,7 @@ public: //------------------------------------------------------------- - _varcovar.resize(s_size, s_size); + _varcovar.resize(s_size); //------------------------------------------------------------- diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index c1ce57453..889c2e54f 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -53,7 +53,7 @@ public: assert( Vl == Vc ); - _L.resize(Vl, Vc); + _L.resize(Vl); unsigned int i,j,k; diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index 40a95c994..6f3b84f6c 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -41,7 +41,7 @@ Authors: #include #include -#include +#include #include "Rosenbrock.h" #include "Sphere.h" From aa23cec2a04fe81857758af0cb1b4a3310844c1e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 24 Feb 2011 11:10:47 +0100 Subject: [PATCH 1741/2134] + added install.cmake to configure dependancies paths --- edo/CMakeLists.txt | 35 +++++++++++++++++++++++------------ edo/install.cmake-dist | 20 ++++++++++++++++++++ 2 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 edo/install.cmake-dist diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 868c456be..563437043 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -1,5 +1,14 @@ +############################################################################ +########## +### 1) If you want to set your own variables in install.cmake and avoid the cmd line ###################################################################################### -### 1) Set the application properties + +INCLUDE(install.cmake OPTIONAL) + +###################################################################################### + +###################################################################################### +### 2) Project properties ###################################################################################### # Checks cmake version compatibility @@ -16,15 +25,12 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT ###################################################################################### -### 2) Include useful features +### 3) Include useful features ###################################################################################### INCLUDE(FindDoxygen) INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(EO eo REQUIRED) -PKG_CHECK_MODULES(MO mo REQUIRED) - FIND_PACKAGE(Boost 1.33.0) INCLUDE_DIRECTORIES( @@ -34,11 +40,16 @@ INCLUDE_DIRECTORIES( # /Dev/ometah-0.3/common ) +LINK_DIRECTORIES( + ${EO_LIBRARY_DIRS} + ${MO_LIBRARY_DIRS} + ) + ###################################################################################### ###################################################################################### -### 3) Include header files path +### 4) Include header files path ###################################################################################### INCLUDE_DIRECTORIES( @@ -49,7 +60,7 @@ INCLUDE_DIRECTORIES( ###################################################################################### -### 4) Set compiler definitions +### 5) Set compiler definitions ###################################################################################### IF(UNIX) @@ -63,7 +74,7 @@ ENDIF() ###################################################################################### -### 5) Prepare some variables for CMAKE usage +### 6) Prepare some variables for CMAKE usage ###################################################################################### SET(SAMPLE_SRCS) @@ -72,7 +83,7 @@ SET(SAMPLE_SRCS) ###################################################################################### -### 6) Now where we go ? +### 7) Now where we go ? ###################################################################################### ADD_SUBDIRECTORY(src) @@ -85,7 +96,7 @@ ADD_SUBDIRECTORY(doc) ###################################################################################### -### 7) Create executable, link libraries and prepare target +### 8) Create executable, link libraries and prepare target ###################################################################################### SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) @@ -99,7 +110,7 @@ INSTALL(TARGETS edo ARCHIVE DESTINATION lib COMPONENT libraries) ###################################################################################### -### 8) Install pkg-config config file for EO +### 9) Install pkg-config config file for EO ###################################################################################### INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers) @@ -108,7 +119,7 @@ INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers) ###################################################################################### -### 9) Include packaging +### 10) Include packaging ###################################################################################### INCLUDE(Packaging.cmake) diff --git a/edo/install.cmake-dist b/edo/install.cmake-dist new file mode 100644 index 000000000..bd07be7c8 --- /dev/null +++ b/edo/install.cmake-dist @@ -0,0 +1,20 @@ +# Variables to set + +# directory we need to build project +SET(EO_DIR "<>" CACHE PATH "EO directory" FORCE) +SET(MO_DIR "<>" CACHE PATH "MO directory" FORCE) + +# automagically set parameters, do not edit + +SET(EO_INCLUDE_DIRS "${EO_DIR}/src" CACHE PATH "EO include directory" FORCE) +SET(EO_LIBRARY_DIRS "${EO_DIR}/release/lib" CACHE PATH "EO library directory" FORCE) +SET(EO_LIBRARIES "eoutils eo es ga cma gcov") + +SET(MO_INCLUDE_DIRS "${MO_DIR}/src" CACHE PATH "MO include directory" FORCE) +SET(MO_LIBRARY_DIRS "${MO_DIR}/release/lib" CACHE PATH "MO library directory" FORCE) +SET(MO_LIBRARIES "mo") + +# ... or rather use pkg-config (dont forget to comment the code above) + +#PKG_CHECK_MODULES(EO eo REQUIRED) +#PKG_CHECK_MODULES(MO mo REQUIRED) From 90863fd0613cfc0c06c8be635824c4b2f8b1323b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 8 Mar 2011 00:08:18 +0100 Subject: [PATCH 1742/2134] * disabled app/gprop temporary because of the incompatibility with gcc version higher than 4.5.1 --- eo/app/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/app/CMakeLists.txt b/eo/app/CMakeLists.txt index b57cce223..d13aac522 100644 --- a/eo/app/CMakeLists.txt +++ b/eo/app/CMakeLists.txt @@ -2,7 +2,7 @@ ### 1) Where must cmake go now ? ###################################################################################### -ADD_SUBDIRECTORY(gprop) +#ADD_SUBDIRECTORY(gprop) #ADD_SUBDIRECTORY(gpsymreg) ADD_SUBDIRECTORY(mastermind) ###################################################################################### From 8f6e4b253d52d2cfc31e2a82b2da5a2f7f5ca2c7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 14 Mar 2011 17:29:20 +0100 Subject: [PATCH 1743/2134] * pipecom: added an argument to printf generating a warning --- eo/src/utils/pipecom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/pipecom.cpp b/eo/src/utils/pipecom.cpp index d11989ecd..46ad5489f 100644 --- a/eo/src/utils/pipecom.cpp +++ b/eo/src/utils/pipecom.cpp @@ -109,7 +109,7 @@ int PipeComSend( PCom *to, const char *line ) int nb = 0; if( ! Check(to ) ) return nb; - nb = fprintf( to->fWrit, line ); + nb = fprintf( to->fWrit, line, 0 ); fflush( to->fWrit ); return nb; } From 81491c6fdb3d9b08a98805d8c53723c5299ecd59 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 15 Mar 2011 16:39:46 +0100 Subject: [PATCH 1744/2134] * eoLogger: forgot to close opened file --- eo/src/utils/eoLogger.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index a729d0cf3..ff6f84070 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -67,7 +67,9 @@ eoLogger::eoLogger() } eoLogger::~eoLogger() -{} +{ + if (_fd > 2) { ::close(_fd); } +} std::string eoLogger::className() const { From 131b09ca183cba254e07e5e6dc4e16742c612dc8 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 15 Mar 2011 18:05:45 +0100 Subject: [PATCH 1745/2134] * edoSampler: sampler method protected --- edo/src/edoSampler.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edo/src/edoSampler.h b/edo/src/edoSampler.h index efd776492..4a0d9244b 100644 --- a/edo/src/edoSampler.h +++ b/edo/src/edoSampler.h @@ -51,8 +51,6 @@ public: // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) - virtual EOType sample( D& ) = 0; - EOType operator()( D& distrib ) { unsigned int size = distrib.size(); @@ -84,6 +82,10 @@ public: return solution; } +protected: + + virtual EOType sample( D& ) = 0; + private: //edoBounderNo _dummy_bounder; From 3a409a789e55f997c3489c4c30dc796cb6881760 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 23 Mar 2011 17:34:35 +0100 Subject: [PATCH 1746/2134] * eoEasyEA: moved offspring into attributes space in order to avoid memory reallocation when we restart --- eo/src/eoEasyEA.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 4fc6d6e79..c058c2338 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -81,6 +81,25 @@ template class eoEasyEA: public eoAlgo replace(_replace) {} + /** Ctor taking a breed and merge, an overload of ctor to define an offspring size */ + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoBreed& _breed, + eoReplacement& _replace, + unsigned _offspringSize + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace) + { + offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. + } + /* eoEasyEA(eoContinue & _continuator, eoPopEvalFunc & _pop_eval, @@ -191,7 +210,7 @@ template class eoEasyEA: public eoAlgo /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { - eoPop offspring, empty_pop; + eoPop empty_pop; popEval(empty_pop, _pop); // A first eval of pop. @@ -270,6 +289,8 @@ template class eoEasyEA: public eoAlgo eoMergeReduce mergeReduce; eoReplacement& replace; + eoPop offspring; + // Friend classes friend class eoIslandsEasyEA ; friend class eoDistEvalEasyEA ; From b0844ae27b6ad4a3c51403ced3d0a5ac223e9cf6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 24 Mar 2011 12:52:27 +0100 Subject: [PATCH 1747/2134] * switched eoGenOp::apply method from protected to public in order to be visible from eoSequentialOp --- eo/src/eoGenOp.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index 86d4ebbda..c304ec641 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -66,17 +66,17 @@ class eoGenOp : public eoOp, public eoUF &, void> /** Max production is used to reserve space for all elements that are used by the operator, not setting it properly can result in a crash */ - virtual unsigned max_production(void) = 0; + virtual unsigned max_production(void) = 0; + + virtual std::string className() const = 0; - virtual std::string className() const = 0; void operator()(eoPopulator& _pop) { - _pop.reserve(max_production()); - apply(_pop); + _pop.reserve( max_production() ); + apply(_pop); } - - protected : + //protected : /** the function that will do the work */ virtual void apply(eoPopulator& _pop) = 0; From d8bbe055ca33f5c5305cd20086b96228ce3ecc66 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 30 Mar 2011 15:50:19 +0200 Subject: [PATCH 1748/2134] * eoEasyEA: pop reserve at each call to algo --- eo/src/eoEasyEA.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index c058c2338..2ca8d37e3 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -210,6 +210,8 @@ template class eoEasyEA: public eoAlgo /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { + _pop.reserve(offspring.capacity()); + eoPop empty_pop; popEval(empty_pop, _pop); // A first eval of pop. From f9848393668cb2e6192bf18ff3e7421690081dcd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 30 Mar 2011 15:52:23 +0200 Subject: [PATCH 1749/2134] * eoOpContainer: call to eoGenOp::apply instead of operator() to avoid calling reserve --- eo/src/eoOpContainer.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 70252a49d..d295f0cec 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -100,6 +100,8 @@ public: void apply(eoPopulator& _pop) { + _pop.reserve( this->max_production() ); + position_type pos = _pop.tellp(); for (size_t i = 0; i < rates.size(); ++i) { _pop.seekp(pos); @@ -108,7 +110,11 @@ public: // try // { // apply it to all the guys in the todo std::list - (*ops[i])(_pop); + + //(*ops[i])(_pop); + + ops[i]->apply(_pop); + // } // check for out of individuals and do nothing with that... // catch(eoPopulator::OutOfIndividuals&) From 211de53623f0820152998b2bda2de5a914436019 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 4 May 2011 17:28:46 +0200 Subject: [PATCH 1750/2134] * eoReduceSplit.h: bad syntax in using eo::log --- eo/src/eoReduceSplit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index 758f48bde..db1190328 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -270,7 +270,7 @@ public: { if (t_rate <= 0.5) { - eo::log << eo:warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl; + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl; t_rate = 0.51; } if (t_rate > 1) From 688003e559fa40adc9c3e53b68ffdc0956839c32 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 4 May 2011 17:29:45 +0200 Subject: [PATCH 1751/2134] * pyeo: updated pyeo in order to make it works --- eo/src/pyeo/CMakeLists.txt | 35 +++++++++++++++++++++------------- eo/src/pyeo/Makefile | 4 ++-- eo/src/pyeo/pickle.h | 6 +++--- eo/src/pyeo/random_numbers.cpp | 2 +- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/eo/src/pyeo/CMakeLists.txt b/eo/src/pyeo/CMakeLists.txt index 6e23de10e..22909f02b 100644 --- a/eo/src/pyeo/CMakeLists.txt +++ b/eo/src/pyeo/CMakeLists.txt @@ -16,13 +16,19 @@ # ---------------------------------------------------------------------------- # change this to your local boost-path -SET(BOOST_PATH "C:/development/libs/os/boost/boost_1_33_1") - +# SET(BOOST_PATH "C:/development/libs/os/boost/boost_1_33_1") # ---------------------------------------------------------------------------- +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + PROJECT(PyEO) +FIND_PACKAGE(Boost 1.42 COMPONENTS program_options python) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + # python IF(APPLE) @@ -38,10 +44,10 @@ IF(APPLE) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) # boost - SET(BOOST_INC ${BOOST_PATH}) - INCLUDE_DIRECTORIES(${BOOST_INC}) - SET(BOOST_LIBRARY ${BOOST_PATH}/libs/python/build/bin-stage/) - SET(BOOSTPYTHON_LIBRARY ${BOOST_LIBRARY}/boost_python) + # SET(BOOST_INC ${BOOST_PATH}) + # INCLUDE_DIRECTORIES(${BOOST_INC}) + # SET(BOOST_LIBRARY ${BOOST_PATH}/libs/python/build/bin-stage/) + # SET(BOOSTPYTHON_LIBRARY ${BOOST_LIBRARY}/boost_python) # osx internal find_library(APPLE_CARBON Carbon) @@ -54,10 +60,10 @@ ELSE(APPLE) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) # boost - SET(BOOST_INC ${BOOST_PATH}) - INCLUDE_DIRECTORIES(${BOOST_INC}) - SET(BOOST_LIBRARY ${BOOST_PATH}/libs/python/build/bin-stage/) - SET(BOOSTPYTHON_LIBRARY ${BOOST_LIBRARY}/boost_python) + # SET(BOOST_INC ${BOOST_PATH}) + # INCLUDE_DIRECTORIES(${BOOST_INC}) + # SET(BOOST_LIBRARY ${BOOST_PATH}/libs/python/build/bin-stage/) + # SET(BOOSTPYTHON_LIBRARY ${BOOST_LIBRARY}/boost_python) ENDIF(APPLE) @@ -84,8 +90,11 @@ ENDIF(WIN32 AND NOT CYGWIN) # add the libs if(APPLE) - target_link_libraries(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${BOOSTPYTHON_LIBRARY} ) + target_link_libraries(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${Boost_LIBRARIES} + #${BOOSTPYTHON_LIBRARY} + ) else(APPLE) - target_link_libraries(PyEO ${PYTHON_LIBRARY} ${BOOSTPYTHON_LIBRARY} ) + target_link_libraries(PyEO ${PYTHON_LIBRARY} ${Boost_LIBRARIES} + #${BOOSTPYTHON_LIBRARY} + ) endif(APPLE) - diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index ca2d762b1..6953249c3 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -10,7 +10,7 @@ CPPFLAGS = -Wall -O2 #-g #-O2 LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -INC=-I/usr/include/python2.4 -I.. -I../.. -ftemplate-depth-50 +INC=-I/usr/include/python2.6 -I.. -I../.. -ftemplate-depth-50 OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ random_numbers.o geneticOps.o selectOne.o continuators.o\ @@ -26,7 +26,7 @@ clean: rm PyEO/*.so *.o test/*.pyc PyEO/PyEO.so: $(OBJECTS) - $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.4 ${LIB} -shared #-lstlport + $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.6 ${LIB} -shared #-lstlport eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index 203993644..ee2706fbe 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -21,9 +21,9 @@ #ifndef PICKLE_H #define PICKLE_h -#ifndef WIN32 -#include -#endif +// #ifndef WIN32 +// #include +// #endif #include #include diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp index 7b6a483ad..aa9e4febb 100644 --- a/eo/src/pyeo/random_numbers.cpp +++ b/eo/src/pyeo/random_numbers.cpp @@ -99,7 +99,7 @@ void random_numbers() .def("rand", &eoRng::rand) .def("rand_max", &eoRng::rand_max) .def("reseed", &eoRng::reseed) - .def("uniform", &eoRng::uniform) + // .def("uniform", &eoRng::uniform) .def("normal", normal) .def("negexp", &eoRng::negexp) .def("to_string", rng_to_string) From 4f70128ab7a6858503ff852eeeaf80d5052bb47a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 15 Mar 2011 16:39:46 +0100 Subject: [PATCH 1752/2134] * eoLogger: forgot to close opened file --- eo/src/utils/eoLogger.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index a729d0cf3..ff6f84070 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -67,7 +67,9 @@ eoLogger::eoLogger() } eoLogger::~eoLogger() -{} +{ + if (_fd > 2) { ::close(_fd); } +} std::string eoLogger::className() const { From 7dcc7b62dd2cc836e7e5a64998eefb51e6c213f8 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 15 Mar 2011 18:05:45 +0100 Subject: [PATCH 1753/2134] * edoSampler: sampler method protected --- edo/src/edoSampler.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edo/src/edoSampler.h b/edo/src/edoSampler.h index efd776492..4a0d9244b 100644 --- a/edo/src/edoSampler.h +++ b/edo/src/edoSampler.h @@ -51,8 +51,6 @@ public: // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) - virtual EOType sample( D& ) = 0; - EOType operator()( D& distrib ) { unsigned int size = distrib.size(); @@ -84,6 +82,10 @@ public: return solution; } +protected: + + virtual EOType sample( D& ) = 0; + private: //edoBounderNo _dummy_bounder; From 8bec56f469c0acc7ad5cdf6414ea41121cded7b6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 5 May 2011 11:47:30 +0200 Subject: [PATCH 1754/2134] * pyeo cmake config file --- eo/src/pyeo/CMakeLists.txt | 91 ++++++++++++++------------------------ 1 file changed, 33 insertions(+), 58 deletions(-) diff --git a/eo/src/pyeo/CMakeLists.txt b/eo/src/pyeo/CMakeLists.txt index 22909f02b..b08bf459a 100644 --- a/eo/src/pyeo/CMakeLists.txt +++ b/eo/src/pyeo/CMakeLists.txt @@ -3,98 +3,73 @@ # PyEO - cmake version # # -------------------------------------------------------------------------- -# +# # Hochschule fuer Gestaltung und Kunst Zuerich # Studienberreich Interaction Design # http://interaction.hgkz.ch -# +# # -------------------------------------------------------------------------- -# +# # prog: max rheiner;xohm@users.sourceforge.net # date: 7/27/2007 (m/d/y) # # ---------------------------------------------------------------------------- -# change this to your local boost-path -# SET(BOOST_PATH "C:/development/libs/os/boost/boost_1_33_1") - -# ---------------------------------------------------------------------------- - CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(PyEO) FIND_PACKAGE(Boost 1.42 COMPONENTS program_options python) +FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) + LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) # python IF(APPLE) - - # python - # osx can have several version of python, on dif places -# SET(PYTHON /Library/Frameworks/Python.framework/Versions/) -# SET(PYTHON_VERSION 2.4) -# SET(PYTHON_INCLUDE_PATH "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "") -# SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") -# SET(PYTHON_LIBRARIES ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "") -# SET(PYTHON_DEBUG_LIBRARIES ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "") - FIND_PACKAGE(PythonLibs) - INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) - - # boost - # SET(BOOST_INC ${BOOST_PATH}) - # INCLUDE_DIRECTORIES(${BOOST_INC}) - # SET(BOOST_LIBRARY ${BOOST_PATH}/libs/python/build/bin-stage/) - # SET(BOOSTPYTHON_LIBRARY ${BOOST_LIBRARY}/boost_python) - - # osx internal - find_library(APPLE_CARBON Carbon) - -ELSE(APPLE) - # windows/unix - - # python - FIND_PACKAGE(PythonLibs) - INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) - - # boost - # SET(BOOST_INC ${BOOST_PATH}) - # INCLUDE_DIRECTORIES(${BOOST_INC}) - # SET(BOOST_LIBRARY ${BOOST_PATH}/libs/python/build/bin-stage/) - # SET(BOOSTPYTHON_LIBRARY ${BOOST_LIBRARY}/boost_python) - + # osx internal + FIND_LIBRARY(APPLE_CARBON Carbon) ENDIF(APPLE) -# includes +# includes INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(../) # source SET(PYEO_SRCS -../eoFunctorStore.cpp -PyEO.cpp abstract1.cpp algos.cpp random_numbers.cpp geneticOps.cpp selectOne.cpp continuators.cpp -reduce.cpp replacement.cpp selectors.cpp breeders.cpp mergers.cpp valueParam.cpp -perf2worth.cpp monitors.cpp statistics.cpp -) + ../eoFunctorStore.cpp + PyEO.cpp + abstract1.cpp + algos.cpp + random_numbers.cpp + geneticOps.cpp + selectOne.cpp + continuators.cpp + reduce.cpp + replacement.cpp + selectors.cpp + breeders.cpp + mergers.cpp + valueParam.cpp + perf2worth.cpp + monitors.cpp + statistics.cpp + ) # shared library ADD_LIBRARY(PyEO MODULE ${PYEO_SRCS}) # python 2.5 must have pyd IF(WIN32 AND NOT CYGWIN) - SET_TARGET_PROPERTIES(PyEO PROPERTIES SUFFIX ".pyd") + SET_TARGET_PROPERTIES(PyEO PROPERTIES SUFFIX ".pyd") ENDIF(WIN32 AND NOT CYGWIN) # add the libs -if(APPLE) - target_link_libraries(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${Boost_LIBRARIES} - #${BOOSTPYTHON_LIBRARY} - ) -else(APPLE) - target_link_libraries(PyEO ${PYTHON_LIBRARY} ${Boost_LIBRARIES} - #${BOOSTPYTHON_LIBRARY} - ) -endif(APPLE) +IF(APPLE) + TARGET_LINK_LIBRARIES(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${Boost_LIBRARIES}) +ELSE(APPLE) + TARGET_LINK_LIBRARIES(PyEO ${PYTHON_LIBRARY} ${Boost_LIBRARIES}) +ENDIF(APPLE) From 62157e28eec9ee00df91f929d6b9ba645c28b6fa Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 5 May 2011 16:53:02 +0200 Subject: [PATCH 1755/2134] * pyeo/CMakeLists.txt: auto find cpp files --- eo/src/pyeo/CMakeLists.txt | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/eo/src/pyeo/CMakeLists.txt b/eo/src/pyeo/CMakeLists.txt index b08bf459a..626d02012 100644 --- a/eo/src/pyeo/CMakeLists.txt +++ b/eo/src/pyeo/CMakeLists.txt @@ -19,7 +19,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(PyEO) -FIND_PACKAGE(Boost 1.42 COMPONENTS program_options python) +FIND_PACKAGE(Boost 1.42 COMPONENTS python) FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) @@ -39,28 +39,15 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(../) # source -SET(PYEO_SRCS +FILE(GLOB SOURCES *.cpp) + +SET(EO_SOURCES ../eoFunctorStore.cpp - PyEO.cpp - abstract1.cpp - algos.cpp - random_numbers.cpp - geneticOps.cpp - selectOne.cpp - continuators.cpp - reduce.cpp - replacement.cpp - selectors.cpp - breeders.cpp - mergers.cpp - valueParam.cpp - perf2worth.cpp - monitors.cpp - statistics.cpp + ../utils/eoLogger.cpp ) # shared library -ADD_LIBRARY(PyEO MODULE ${PYEO_SRCS}) +ADD_LIBRARY(PyEO MODULE ${SOURCES} ${EO_SOURCES}) # python 2.5 must have pyd IF(WIN32 AND NOT CYGWIN) From 8457e39efe75c910841c696a5bdb18b65d679dfb Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 5 May 2011 16:53:31 +0200 Subject: [PATCH 1756/2134] * pyeo/PyEO.cpp: renamed module name --- eo/src/pyeo/PyEO.cpp | 142 +++++++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/eo/src/pyeo/PyEO.cpp b/eo/src/pyeo/PyEO.cpp index 40d36310a..7c3f1b93f 100644 --- a/eo/src/pyeo/PyEO.cpp +++ b/eo/src/pyeo/PyEO.cpp @@ -23,7 +23,6 @@ #include "PyEO.h" #include - using namespace std; //using namespace boost::python; @@ -35,28 +34,28 @@ bool PyFitness::dominates(const PyFitness& oth) const bool dom = false; for (unsigned i = 0; i < nObjectives(); ++i) - { - int objective = objective_info[i]; - - if (objective == 0) // ignore - continue; - - bool maxim = objective > 0; - - double aval = maxim? (*this)[i] : -(*this)[i]; - double bval = maxim? oth[i] : -oth[i]; - - if (fabs(aval - bval) > tol()) - { - if (aval < bval) { - return false; // cannot dominate + int objective = objective_info[i]; + + if (objective == 0) // ignore + continue; + + bool maxim = objective > 0; + + double aval = maxim? (*this)[i] : -(*this)[i]; + double bval = maxim? oth[i] : -oth[i]; + + if (fabs(aval - bval) > tol()) + { + if (aval < bval) + { + return false; // cannot dominate + } + // else aval < bval + dom = true; // for the moment: goto next objective + } + //else they're equal in this objective, goto next } - // else aval < bval - dom = true; // for the moment: goto next objective - } - //else they're equal in this objective, goto next - } return dom; } @@ -76,22 +75,22 @@ struct pyPop_pickle_suite : boost::python::pickle_suite { static boost::python::tuple getstate(const eoPop& _pop) { - boost::python::list entries; - for (unsigned i = 0; i != _pop.size(); ++i) - entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); + boost::python::list entries; + for (unsigned i = 0; i != _pop.size(); ++i) + entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); - return boost::python::make_tuple(boost::python::object(_pop.size()), entries); + return boost::python::make_tuple(boost::python::object(_pop.size()), entries); } static void setstate( eoPop& _pop, boost::python::tuple pickled) { - int sz = boost::python::extract(pickled[0]); - boost::python::list entries = boost::python::list(pickled[1]); - _pop.resize(sz); - for (unsigned i = 0; i != _pop.size(); ++i) - { - PyEO_pickle_suite::setstate(_pop[i], boost::python::tuple(entries[i]) ); - } + int sz = boost::python::extract(pickled[0]); + boost::python::list entries = boost::python::list(pickled[1]); + _pop.resize(sz); + for (unsigned i = 0; i != _pop.size(); ++i) + { + PyEO_pickle_suite::setstate(_pop[i], boost::python::tuple(entries[i]) ); + } } }; @@ -109,21 +108,21 @@ void pop_shuffle(eoPop& pop) { pop.shuffle(); } void translate_index_error(index_error const& e) { - PyErr_SetString(PyExc_IndexError, e.what.c_str()); + PyErr_SetString(PyExc_IndexError, e.what.c_str()); } PyEO& pop_getitem(eoPop& pop, boost::python::object key) { boost::python::extract x(key); if (!x.check()) - throw index_error("Slicing not allowed"); + throw index_error("Slicing not allowed"); int i = x(); if (static_cast(i) >= pop.size()) - { - throw index_error("Index out of bounds"); - } + { + throw index_error("Index out of bounds"); + } return pop[i]; } @@ -131,14 +130,14 @@ void pop_setitem(eoPop& pop, boost::python::object key, PyEO& value) { boost::python::extract x(key); if (!x.check()) - throw index_error("Slicing not allowed"); + throw index_error("Slicing not allowed"); int i = x(); if (static_cast(i) >= pop.size()) - { - throw index_error("Index out of bounds"); - } + { + throw index_error("Index out of bounds"); + } pop[i] = value; } @@ -163,35 +162,35 @@ extern void perf2worth(); extern void monitors(); extern void statistics(); -BOOST_PYTHON_MODULE(PyEO) +BOOST_PYTHON_MODULE(libPyEO) { using namespace boost::python; boost::python::register_exception_translator(&translate_index_error); boost::python::class_("EO") - .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) - .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) - .def_pickle(PyEO_pickle_suite()) - .def("invalidate", &PyEO::invalidate) - .def("invalid", &PyEO::invalid) - .def("__str__", &PyEO::to_string) - ; + .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) + .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) + .def_pickle(PyEO_pickle_suite()) + .def("invalidate", &PyEO::invalidate) + .def("invalid", &PyEO::invalid) + .def("__str__", &PyEO::to_string) + ; boost::python::class_ >("eoPop", init<>() ) - .def( init< unsigned, eoInit& >()[with_custodian_and_ward<1,3>()] ) - .def("append", &eoPop::append, "docstring?") - .def("__str__", to_string >) - .def("__len__", pop_size) - .def("sort", pop_sort ) - .def("shuffle", pop_shuffle) - .def("__getitem__", pop_getitem, return_internal_reference<>() ) - .def("__setitem__", pop_setitem) - .def("best", &eoPop::best_element, return_internal_reference<>() ) - .def("push_back", pop_push_back) - .def("resize", pop_resize) - .def_pickle(pyPop_pickle_suite()) - ; + .def( init< unsigned, eoInit& >()[with_custodian_and_ward<1,3>()] ) + .def("append", &eoPop::append, "docstring?") + .def("__str__", to_string >) + .def("__len__", pop_size) + .def("sort", pop_sort ) + .def("shuffle", pop_shuffle) + .def("__getitem__", pop_getitem, return_internal_reference<>() ) + .def("__setitem__", pop_setitem) + .def("best", &eoPop::best_element, return_internal_reference<>() ) + .def("push_back", pop_push_back) + .def("resize", pop_resize) + .def_pickle(pyPop_pickle_suite()) + ; // Other definitions in different compilation units, @@ -215,17 +214,18 @@ BOOST_PYTHON_MODULE(PyEO) // The traits class class_("PyFitness"); - def("nObjectives", &PyFitness::nObjectives); - def("tol", &PyFitness::tol); - def("maximizing", &PyFitness::maximizing); - def("setObjectivesSize", &PyFitness::setObjectivesSize); - def("setObjectivesValue", &PyFitness::setObjectivesValue); - def("dominates", dominates); + def("nObjectives", &PyFitness::nObjectives); + def("tol", &PyFitness::tol); + def("maximizing", &PyFitness::maximizing); + def("setObjectivesSize", &PyFitness::setObjectivesSize); + def("setObjectivesValue", &PyFitness::setObjectivesValue); + def("dominates", dominates); } // to avoid having to build with libeo.a -ostream & operator << ( ostream& _os, const eoPrintable& _o ) { - _o.printOn(_os); - return _os; +ostream & operator << ( ostream& _os, const eoPrintable& _o ) +{ + _o.printOn(_os); + return _os; }; From 56c6edab045702927394e17f4d4b377e00d0a581 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 5 May 2011 16:54:00 +0200 Subject: [PATCH 1757/2134] * indentations + whitespace cleanup --- eo/src/CMakeLists.txt | 17 +- eo/src/EO.h | 43 +- eo/src/PO.h | 12 +- eo/src/do/Readme | 6 +- eo/src/do/make_algo_easea.h | 188 ++++---- eo/src/do/make_algo_scalar.h | 182 +++---- eo/src/do/make_checkpoint.h | 179 ++++--- eo/src/do/make_checkpoint_FDC.h | 184 +++---- eo/src/do/make_checkpoint_assembled.h | 4 +- eo/src/do/make_continue.h | 64 +-- eo/src/do/make_general_replacement.h | 66 +-- eo/src/do/make_pop.h | 20 +- eo/src/do/make_run.h | 2 +- eo/src/eoCellularEasyEA.h | 132 ++--- eo/src/eoCloneOps.h | 11 +- eo/src/eoCombinedContinue.h | 7 +- eo/src/eoCombinedInit.h | 9 +- eo/src/eoConstrictedVariableWeightVelocity.h | 37 +- eo/src/eoConstrictedVelocity.h | 35 +- eo/src/eoContinue.h | 11 +- eo/src/eoCounter.h | 66 +-- eo/src/eoCtrlCContinue.cpp | 12 +- eo/src/eoCtrlCContinue.h | 19 +- eo/src/eoDetSelect.h | 32 +- eo/src/eoDetTournamentSelect.h | 17 +- eo/src/eoDistribUpdater.h | 6 +- eo/src/eoDistribution.h | 6 +- eo/src/eoDualFitness.h | 53 +-- eo/src/eoEDA.h | 7 +- eo/src/eoEasyEA.h | 11 +- eo/src/eoEasyPSO.h | 56 +-- eo/src/eoEvalContinue.h | 24 +- eo/src/eoEvalCounterThrowException.h | 11 +- eo/src/eoEvalFunc.h | 8 +- eo/src/eoEvalFuncCounter.h | 6 +- eo/src/eoEvalFuncCounterBounder.h | 22 +- eo/src/eoEvalFuncPtr.h | 11 +- eo/src/eoEvalTimeThrowException.h | 4 +- eo/src/eoEvalUserTimeThrowException.h | 4 +- eo/src/eoExceptions.h | 4 +- eo/src/eoExtendedVelocity.h | 63 ++- eo/src/eoFactory.h | 46 +- eo/src/eoFitContinue.h | 18 +- eo/src/eoFitnessScalingSelect.h | 15 +- eo/src/eoFixedInertiaWeightedVelocity.h | 25 +- eo/src/eoFlOrBinOp.h | 52 +- eo/src/eoFlOrMonOp.h | 22 +- eo/src/eoFlOrQuadOp.h | 54 +-- eo/src/eoFunctor.h | 26 +- eo/src/eoG3Replacement.h | 30 +- eo/src/eoGaussRealWeightUp.h | 2 +- eo/src/eoGenContinue.h | 73 ++- eo/src/eoGenOp.h | 16 +- eo/src/eoGeneralBreeder.h | 17 +- eo/src/eoInit.h | 28 +- eo/src/eoInitializer.h | 11 +- eo/src/eoInt.h | 2 +- eo/src/eoIntegerVelocity.h | 53 +-- eo/src/eoInvalidateOps.h | 2 +- eo/src/eoLinearTopology.h | 64 ++- eo/src/eoMGGReplacement.h | 36 +- eo/src/eoMerge.h | 42 +- eo/src/eoMergeReduce.h | 12 +- eo/src/eoNDSorting.h | 234 ++++----- eo/src/eoNeighborhood.h | 15 +- eo/src/eoObject.h | 21 +- eo/src/eoOneToOneBreeder.h | 61 ++- eo/src/eoOp.h | 10 +- eo/src/eoOpContainer.h | 9 +- eo/src/eoOpSelMason.h | 116 ++--- eo/src/eoOrderXover.h | 114 ++--- eo/src/eoParticleBestInit.h | 5 +- eo/src/eoParticleFullInitializer.h | 45 +- eo/src/eoPeriodicContinue.h | 23 +- eo/src/eoPersistent.cpp | 2 +- eo/src/eoPersistent.h | 6 +- eo/src/eoPop.h | 151 +++--- eo/src/eoPopEvalFunc.h | 19 +- eo/src/eoPopulator.h | 1 - eo/src/eoPrintable.cpp | 7 +- eo/src/eoPrintable.h | 7 +- eo/src/eoPropGAGenOp.h | 22 +- eo/src/eoProportionalCombinedOp.h | 20 +- eo/src/eoProportionalSelect.h | 28 +- eo/src/eoRandomRealWeightUp.h | 2 +- eo/src/eoRandomSelect.h | 3 +- eo/src/eoRanking.h | 52 +- eo/src/eoRankingSelect.h | 10 +- eo/src/eoRealBoundModifier.h | 30 +- eo/src/eoReduce.h | 184 +++---- eo/src/eoReduceMerge.h | 40 +- eo/src/eoReduceMergeReduce.h | 100 ++-- eo/src/eoReduceSplit.h | 102 ++-- eo/src/eoReplacement.h | 32 +- eo/src/eoRingTopology.h | 86 ++-- eo/src/eoSGA.h | 38 +- eo/src/eoSGAGenOp.h | 24 +- eo/src/eoSGATransform.h | 88 ++-- eo/src/eoSIGContinue.cpp | 16 +- eo/src/eoSIGContinue.h | 18 +- eo/src/eoSTLFunctor.h | 3 +- eo/src/eoScalarFitness.h | 4 +- eo/src/eoScalarFitnessAssembled.cpp | 13 +- eo/src/eoScalarFitnessAssembled.h | 13 +- eo/src/eoSecondsElapsedContinue.h | 19 +- eo/src/eoSelect.h | 6 +- eo/src/eoSelectFactory.h | 86 ++-- eo/src/eoSelectFromWorth.h | 7 +- eo/src/eoSelectMany.h | 20 +- eo/src/eoSelectNumber.h | 16 +- eo/src/eoSelectOne.h | 6 +- eo/src/eoSelectPerc.h | 18 +- eo/src/eoSequentialSelect.h | 12 +- eo/src/eoSharing.h | 56 +-- eo/src/eoSharingSelect.h | 16 +- eo/src/eoShiftMutation.h | 35 +- eo/src/eoSigBinaryFlight.h | 20 +- eo/src/eoSimpleEDA.h | 37 +- eo/src/eoSocialNeighborhood.h | 3 +- eo/src/eoStandardFlight.h | 2 +- eo/src/eoStandardVelocity.h | 47 +- eo/src/eoStarTopology.h | 26 +- eo/src/eoSteadyFitContinue.h | 59 ++- eo/src/eoStochTournamentSelect.h | 17 +- eo/src/eoStochasticUniversalSelect.h | 20 +- eo/src/eoSurviveAndDie.h | 105 ++-- eo/src/eoSwapMutation.h | 41 +- eo/src/eoSyncEasyPSO.h | 68 +-- eo/src/eoTopology.h | 14 +- eo/src/eoTransform.h | 6 +- eo/src/eoTruncSelect.h | 18 +- eo/src/eoTruncatedSelectMany.h | 62 +-- eo/src/eoTruncatedSelectOne.h | 48 +- eo/src/eoVariableInertiaWeightedVelocity.h | 33 +- eo/src/eoVariableLengthCrossover.h | 157 +++--- eo/src/eoVariableLengthMutation.h | 7 +- eo/src/eoVector.h | 4 +- eo/src/eoVectorParticle.h | 18 +- eo/src/eoVelocity.h | 5 +- eo/src/eoVelocityInit.h | 3 +- eo/src/eoWeightUpdater.h | 2 +- eo/src/es.h | 8 +- eo/src/es/CMAParams.cpp | 189 ++++---- eo/src/es/CMAParams.h | 25 +- eo/src/es/CMAState.cpp | 477 +++++++++---------- eo/src/es/CMAState.h | 43 +- eo/src/es/eig.cpp | 207 ++++---- eo/src/es/eig.h | 12 +- eo/src/es/eoCMABreed.h | 56 +-- eo/src/es/eoCMAInit.h | 12 +- eo/src/es/eoEsGlobalXover.h | 36 +- eo/src/es/eoEsMutate.h | 4 +- eo/src/es/eoEsMutationInit.h | 2 +- eo/src/es/eoEsStandardXover.h | 20 +- eo/src/es/eoNormalMutation.h | 81 ++-- eo/src/es/eoReal.h | 2 +- eo/src/es/eoRealAtomXover.h | 30 +- eo/src/es/eoRealInitBounded.h | 13 +- eo/src/es/eoRealOp.h | 332 ++++++------- eo/src/es/eoSBXcross.h | 66 ++- eo/src/es/make_algo_scalar_es.cpp | 13 +- eo/src/es/make_algo_scalar_real.cpp | 7 +- eo/src/es/make_checkpoint_es.cpp | 22 +- eo/src/es/make_checkpoint_real.cpp | 12 +- eo/src/es/make_continue_es.cpp | 14 +- eo/src/es/make_continue_real.cpp | 8 +- eo/src/es/make_es.h | 22 +- eo/src/es/make_genotype_real.h | 2 +- eo/src/es/make_op.h | 28 +- eo/src/es/make_op_es.cpp | 7 +- eo/src/es/make_op_es.h | 6 +- eo/src/es/make_op_real.cpp | 6 +- eo/src/es/make_op_real.h | 8 +- eo/src/es/make_pop_es.cpp | 14 +- eo/src/es/make_pop_real.cpp | 8 +- eo/src/es/make_real.h | 16 +- eo/src/es/make_run_es.cpp | 13 +- eo/src/es/make_run_real.cpp | 7 +- eo/src/es/matrices.h | 17 +- eo/src/ga.h | 4 +- eo/src/ga/Readme | 7 +- eo/src/ga/eoBit.h | 8 +- eo/src/ga/eoBitOp.h | 105 ++-- eo/src/ga/eoBitOpFactory.h | 227 +++++---- eo/src/ga/eoBoolFlip.h | 4 +- eo/src/ga/eoPBILAdditive.h | 56 +-- eo/src/ga/eoPBILDistrib.h | 28 +- eo/src/ga/eoPBILOrg.h | 16 +- eo/src/ga/make_PBILdistrib.h | 14 +- eo/src/ga/make_PBILupdate.h | 8 +- eo/src/ga/make_algo_scalar_ga.cpp | 9 +- eo/src/ga/make_checkpoint_ga.cpp | 14 +- eo/src/ga/make_continue_ga.cpp | 10 +- eo/src/ga/make_ga.h | 8 +- eo/src/ga/make_genotype_ga.cpp | 8 +- eo/src/ga/make_genotype_ga.h | 16 +- eo/src/ga/make_op.h | 36 +- eo/src/ga/make_op_ga.cpp | 9 +- eo/src/ga/make_pop_ga.cpp | 8 +- eo/src/ga/make_run_ga.cpp | 9 +- eo/src/gp/eoParseTree.h | 28 +- eo/src/gp/eoParseTreeDepthInit.h | 216 ++++----- eo/src/gp/eoParseTreeOp.h | 214 ++++----- eo/src/gp/eoStParseTreeDepthInit.h | 178 +++---- eo/src/gp/eoStParseTreeOp.h | 218 ++++----- eo/src/gp/node_pool.h | 36 +- eo/src/gp/parse_tree.h | 424 ++++++++--------- eo/src/other/eoString.h | 5 +- eo/src/pyeo/Makefile | 30 +- eo/src/pyeo/Makefile.rpm | 6 +- eo/src/pyeo/PyEO.h | 142 +++--- eo/src/pyeo/PyEO/__init__.py | 104 ++-- eo/src/pyeo/abstract1.cpp | 24 +- eo/src/pyeo/algos.cpp | 160 ++++--- eo/src/pyeo/breeders.cpp | 30 +- eo/src/pyeo/continuators.cpp | 70 +-- eo/src/pyeo/def_abstract_functor.h | 170 +++---- eo/src/pyeo/geneticOps.cpp | 116 ++--- eo/src/pyeo/mergers.cpp | 7 +- eo/src/pyeo/monitors.cpp | 65 ++- eo/src/pyeo/perf2worth.cpp | 63 +-- eo/src/pyeo/pickle.h | 21 +- eo/src/pyeo/random_numbers.cpp | 58 +-- eo/src/pyeo/reduce.cpp | 6 +- eo/src/pyeo/replacement.cpp | 24 +- eo/src/pyeo/selectOne.cpp | 43 +- eo/src/pyeo/selectors.cpp | 5 +- eo/src/pyeo/statistics.cpp | 18 +- eo/src/pyeo/test/maxone.py | 77 ++- eo/src/pyeo/test/test_breeders.py | 9 +- eo/src/pyeo/test/test_mo.py | 62 +-- eo/src/pyeo/test/test_pickling.py | 35 +- eo/src/pyeo/test/test_populator.py | 30 +- eo/src/pyeo/test/test_reduce.py | 10 +- eo/src/pyeo/test/test_selectone.py | 74 ++- eo/src/pyeo/test/test_sga.py | 61 +-- eo/src/pyeo/test/test_transform.py | 81 ++-- eo/src/pyeo/valueParam.cpp | 43 +- eo/src/pyeo/valueParam.h | 32 +- eo/src/utils/ChangeLog | 40 +- eo/src/utils/compatibility.h | 18 +- eo/src/utils/eoCheckPoint.h | 44 +- eo/src/utils/eoData.h | 1 - eo/src/utils/eoDistance.h | 30 +- eo/src/utils/eoFDCStat.h | 39 +- eo/src/utils/eoFeasibleRatioStat.h | 10 +- eo/src/utils/eoFileMonitor.cpp | 21 +- eo/src/utils/eoFileMonitor.h | 24 +- eo/src/utils/eoFileSnapshot.h | 54 +-- eo/src/utils/eoFuncPtrStat.h | 8 +- eo/src/utils/eoGnuplot1DSnapshot.h | 4 +- eo/src/utils/eoHowMany.h | 2 +- eo/src/utils/eoIntBounds.cpp | 40 +- eo/src/utils/eoIntBounds.h | 170 +++---- eo/src/utils/eoLogger.cpp | 40 +- eo/src/utils/eoLogger.h | 46 +- eo/src/utils/eoMOFitnessStat.h | 2 +- eo/src/utils/eoMonitor.h | 4 +- eo/src/utils/eoOStreamMonitor.cpp | 2 +- eo/src/utils/eoOStreamMonitor.h | 14 +- eo/src/utils/eoParallel.cpp | 54 +-- eo/src/utils/eoParam.h | 13 +- eo/src/utils/eoParser.cpp | 79 ++- eo/src/utils/eoParser.h | 2 +- eo/src/utils/eoParserLogger.cpp | 20 +- eo/src/utils/eoParserLogger.h | 10 +- eo/src/utils/eoPopStat.h | 14 +- eo/src/utils/eoRNG.cpp | 1 - eo/src/utils/eoRNG.h | 2 +- eo/src/utils/eoRealBounds.cpp | 94 ++-- eo/src/utils/eoRealBounds.h | 166 +++---- eo/src/utils/eoRealVectorBounds.h | 118 ++--- eo/src/utils/eoScalarFitnessStat.h | 8 +- eo/src/utils/eoStat.h | 17 +- eo/src/utils/eoState.cpp | 27 +- eo/src/utils/eoStdoutMonitor.h | 15 +- eo/src/utils/eoTimeCounter.h | 18 +- eo/src/utils/eoTimedMonitor.h | 32 +- eo/src/utils/eoUniformInit.h | 18 +- eo/src/utils/eoUpdatable.h | 20 +- eo/src/utils/eoUpdater.cpp | 6 +- eo/src/utils/eoUpdater.h | 8 +- eo/src/utils/make_help.cpp | 2 +- eo/src/utils/pipecom.cpp | 86 ++-- eo/src/utils/selectors.h | 14 +- 285 files changed, 5968 insertions(+), 6123 deletions(-) diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index 70e2c7551..97b748665 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -11,14 +11,15 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(EO_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH}) -SET (EO_SOURCES eoFunctorStore.cpp - eoPersistent.cpp - eoPrintable.cpp - eoCtrlCContinue.cpp - eoScalarFitnessAssembled.cpp - eoSIGContinue.cpp) +SET(EO_SOURCES + eoFunctorStore.cpp + eoPersistent.cpp + eoPrintable.cpp + eoCtrlCContinue.cpp + eoScalarFitnessAssembled.cpp + eoSIGContinue.cpp + ) - ADD_LIBRARY(eo STATIC ${EO_SOURCES}) INSTALL(TARGETS eo ARCHIVE DESTINATION lib COMPONENT libraries) @@ -42,6 +43,6 @@ ADD_SUBDIRECTORY(ga) ADD_SUBDIRECTORY(gp) ADD_SUBDIRECTORY(other) ADD_SUBDIRECTORY(utils) +ADD_SUBDIRECTORY(pyeo) ###################################################################################### - diff --git a/eo/src/EO.h b/eo/src/EO.h index 2c43b2c8f..f904559d4 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -40,17 +40,17 @@ */ /** EO is the base class for objects with a fitness. - + Those evolvable objects are the subjects of evolution. EOs have only got a fitness, which at the same time needs to be only an object with the operation less than (<) defined. Fitness says how good is the object; evolution or change of these objects is left to the - genetic operators. - + genetic operators. + A fitness less than another means a worse fitness, in whatever the context; thus, fitness is always maximized; although it can - be minimized with a proper definition of the < operator. - + be minimized with a proper definition of the < operator. + A fitness can be invalid if undefined, trying to read an invalid fitness will raise an error. @ref Operators that effectively modify EO objects must invalidate them. @@ -123,23 +123,23 @@ public: * @throw runtime_std::exception If a valid object can't be read. */ virtual void readFrom(std::istream& _is) { - + // the new version of the reafFrom function. - // It can distinguish between valid and invalid fitness values. + // It can distinguish between valid and invalid fitness values. std::string fitness_str; int pos = _is.tellg(); - _is >> fitness_str; + _is >> fitness_str; - if (fitness_str == "INVALID") - { - invalidFitness = true; - } - else - { - invalidFitness = false; - _is.seekg(pos); // rewind - _is >> repFitness; - } + if (fitness_str == "INVALID") + { + invalidFitness = true; + } + else + { + invalidFitness = false; + _is.seekg(pos); // rewind + _is >> repFitness; + } } /** @@ -151,13 +151,13 @@ public: // the latest version of the code. Very similar to the old code if (invalid()) { - _os << "INVALID "; + _os << "INVALID "; } else { - _os << repFitness << ' '; + _os << repFitness << ' '; } - + } //@} @@ -171,4 +171,3 @@ private: #endif /** @} */ - diff --git a/eo/src/PO.h b/eo/src/PO.h index 1cb4f50a4..0c246135e 100644 --- a/eo/src/PO.h +++ b/eo/src/PO.h @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // PO.h // (c) OPAC 2007 @@ -43,11 +43,11 @@ template < class F > class PO:public EO < F > public: - #if defined(__CUDACC__) - typedef typename EO < F >::Fitness Fitness; - #else - typedef typename PO::Fitness Fitness; - #endif + #if defined(__CUDACC__) + typedef typename EO < F >::Fitness Fitness; + #else + typedef typename PO::Fitness Fitness; + #endif /** Default constructor. Fitness must have a ctor which takes 0 as a value. Best fitness mush also have the same constructor. diff --git a/eo/src/do/Readme b/eo/src/do/Readme index cd3e5acd5..0b3ccd8ac 100644 --- a/eo/src/do/Readme +++ b/eo/src/do/Readme @@ -9,11 +9,11 @@ the functions here for eoBit AND eoBit and in EO test dir the t-eoGA.cpp file that is a sample program that uses the whole facility. -All make_XXX.h file define some parser-based constructions of basic +All make_XXX.h file define some parser-based constructions of basic Evolutionary Algorithms components, using state-based memory management (see in src/utils dir, or read the tutorial). -In this src/do dir, the following ***representation indedendent*** code +In this src/do dir, the following ***representation indedendent*** code is defined make_algo_scalar.h The selection/replacement for scalar fitnesses @@ -23,7 +23,7 @@ make_pop.h Init of the population (from an EOT initializer) make_run.h Run the algorithm See also (NOW MOVED TO util DIR, as it was useful everywhere) -make_help.cpp Help on demand (+ status file) +make_help.cpp Help on demand (+ status file) Note: ----- diff --git a/eo/src/do/make_algo_easea.h b/eo/src/do/make_algo_easea.h index a6522ef9f..c432c1e82 100644 --- a/eo/src/do/make_algo_easea.h +++ b/eo/src/do/make_algo_easea.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_algo_easea.h // (c) Marc Schoenauer and Pierre Collet, 2002 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -81,18 +81,18 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF eoParamParamType & ppSelect = selectionParam.value(); // std::pair > eoSelectOne* select ; - if (ppSelect.first == std::string("DetTour")) + if (ppSelect.first == std::string("DetTour")) { unsigned detSize; if (!ppSelect.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; - detSize = 2; - // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("2")); + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("2")); } - else // parameter passed by user as DetTour(T) + else // parameter passed by user as DetTour(T) detSize = atoi(ppSelect.second[0].c_str()); select = new eoDetTournamentSelect(detSize); } @@ -100,57 +100,57 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF { double p; if (!ppSelect.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; - p = 1; - // put back p in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("1")); - } - else // parameter passed by user as DetTour(T) - p = atof(ppSelect.second[0].c_str()); - + { + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + select = new eoStochTournamentSelect(p); } else if (ppSelect.first == std::string("Ranking")) { double p,e; if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent - { - p = atof(ppSelect.second[0].c_str()); - e = atof(ppSelect.second[1].c_str()); - } - else if (ppSelect.second.size()==1) // 1 parameter: pressure - { - std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; - e = 1; - ppSelect.second.push_back(std::string("1")); - p = atof(ppSelect.second[0].c_str()); - } + { + p = atof(ppSelect.second[0].c_str()); + e = atof(ppSelect.second[1].c_str()); + } + else if (ppSelect.second.size()==1) // 1 parameter: pressure + { + std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; + e = 1; + ppSelect.second.push_back(std::string("1")); + p = atof(ppSelect.second[0].c_str()); + } else // no parameters ... or garbage - { - std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; - p=2; - e=1; - // put back in parameter for consistency (and status file) - ppSelect.second.resize(2); // just in case - ppSelect.second[0] = (std::string("2")); - ppSelect.second[1] = (std::string("1")); - } + { + std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; + p=2; + e=1; + // put back in parameter for consistency (and status file) + ppSelect.second.resize(2); // just in case + ppSelect.second[0] = (std::string("2")); + ppSelect.second[1] = (std::string("1")); + } // check for authorized values // pressure in (0,1] if ( (p<=1) || (p>2) ) - { - std::cerr << "WARNING, selective pressure must be in (1,2] in Ranking, using 2\n"; - p=2; - ppSelect.second[0] = (std::string("2")); - } + { + std::cerr << "WARNING, selective pressure must be in (1,2] in Ranking, using 2\n"; + p=2; + ppSelect.second[0] = (std::string("2")); + } // exponent >0 if (e<=0) - { - std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; - e=1; - ppSelect.second[1] = (std::string("1")); - } + { + std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + e=1; + ppSelect.second[1] = (std::string("1")); + } // now we're OK eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); select = new eoRouletteWorthSelect(p2w); @@ -159,13 +159,13 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF { bool b; if (ppSelect.second.size() == 0) // no argument -> default = ordered - { - b=true; - // put back in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("ordered")); - } + { + b=true; + // put back in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("ordered")); + } else - b = !(ppSelect.second[0] == std::string("unordered")); + b = !(ppSelect.second[0] == std::string("unordered")); select = new eoSequentialSelect(b); } else if (ppSelect.first == std::string("EliteSequential")) // Best first, one after the other in random order afterwards @@ -188,7 +188,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF _state.storeFunctor(select); - // the number of offspring + // the number of offspring eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); ///////////////////////////////////////////////////// @@ -196,7 +196,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF ///////////////////////////////////////////////////// /** Replacement type - high level: predefined replacements - * ESComma : + * ESComma : * elite = 0 * surviveParents=0 (no reduce) * surviveOffspring=100% (no reduce) @@ -208,8 +208,8 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF * GGA : generational GA - idem ESComma except for * offspringRate = 100% * all reducers are unused - * - * SSGA(T/t) : Steady-State GA + * + * SSGA(T/t) : Steady-State GA * surviveParents = 1.0 - offspringRate * reduceFinal = DetTour(T>1) ou StochTour(0.5 & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF // the tournament size if (!replacementParam.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to MGG replacement, using 2" << std::endl; - tSize = 2; - // put back 2 in parameter for consistency (and status file) - replacementParam.second.push_back(std::string("2")); + std::cerr << "WARNING, no parameter passed to MGG replacement, using 2" << std::endl; + tSize = 2; + // put back 2 in parameter for consistency (and status file) + replacementParam.second.push_back(std::string("2")); } else { - t = atof(replacementParam.second[0].c_str()); - if (t>=2) - { // build the appropriate deafult value - tSize = unsigned(t); - } - else - { - throw std::runtime_error("Sorry, only deterministic tournament available at the moment"); - } + t = atof(replacementParam.second[0].c_str()); + if (t>=2) + { // build the appropriate deafult value + tSize = unsigned(t); + } + else + { + throw std::runtime_error("Sorry, only deterministic tournament available at the moment"); + } } - ptReplace = new eoMGGReplacement(-surviveParents, tSize); + ptReplace = new eoMGGReplacement(-surviveParents, tSize); _state.storeFunctor(ptReplace); } else { // until the end of what was the only loop/switch - + // the default deafult values eoHowMany elite (0.0); bool strongElitism (false); @@ -283,12 +283,12 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF // ---------- General if (replacementParam.first == std::string("General")) { - ; // defaults OK + ; // defaults OK } // ---------- ESComma else if (replacementParam.first == std::string("ESComma")) { - ; // OK too + ; // OK too } // ---------- ESPlus else if (replacementParam.first == std::string("ESPlus")) @@ -298,16 +298,16 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF // ---------- Generational else if (replacementParam.first == std::string("Generational")) { - ; // OK too (we should check nb of offspring) + ; // OK too (we should check nb of offspring) } // ---------- EP else if (replacementParam.first == std::string("EP")) { if (!replacementParam.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to EP replacement, using 6" << std::endl; - // put back 6 in parameter for consistency (and status file) - replacementParam.second.push_back(std::string("6")); + std::cerr << "WARNING, no parameter passed to EP replacement, using 6" << std::endl; + // put back 6 in parameter for consistency (and status file) + replacementParam.second.push_back(std::string("6")); } // by coincidence, the syntax for the EP reducer is the same than here: reduceFinalType = replacementParam; @@ -318,28 +318,28 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF { if (!replacementParam.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to SSGA replacement, using 2" << std::endl; - // put back 2 in parameter for consistency (and status file) - replacementParam.second.push_back(std::string("2")); - reduceParentType = eoParamParamType(std::string("DetTour(2)")); + std::cerr << "WARNING, no parameter passed to SSGA replacement, using 2" << std::endl; + // put back 2 in parameter for consistency (and status file) + replacementParam.second.push_back(std::string("2")); + reduceParentType = eoParamParamType(std::string("DetTour(2)")); } else { - t = atof(replacementParam.second[0].c_str()); - if (t>=2) - { // build the appropriate deafult value - reduceParentType = eoParamParamType(std::string("DetTour(") + replacementParam.second[0].c_str() + ")"); - } - else // check for [0.5,1] will be made in make_general_replacement - { // build the appropriate deafult value - reduceParentType = eoParamParamType(std::string("StochTour(") + replacementParam.second[0].c_str() + ")"); - } + t = atof(replacementParam.second[0].c_str()); + if (t>=2) + { // build the appropriate deafult value + reduceParentType = eoParamParamType(std::string("DetTour(") + replacementParam.second[0].c_str() + ")"); + } + else // check for [0.5,1] will be made in make_general_replacement + { // build the appropriate deafult value + reduceParentType = eoParamParamType(std::string("StochTour(") + replacementParam.second[0].c_str() + ")"); + } } - // + // surviveParents = eoHowMany(-1); surviveOffspring = eoHowMany(1); } - else // no replacement recognized + else // no replacement recognized { throw std::runtime_error("Invalid replacement type " + replacementParam.first); } @@ -353,7 +353,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF /////////////////////////////// // the general breeder /////////////////////////////// - eoGeneralBreeder *breed = + eoGeneralBreeder *breed = new eoGeneralBreeder(*select, _op, offspringRateParam.value()); _state.storeFunctor(breed); @@ -381,7 +381,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalF template eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) { - do_make_algo_scalar( _parser, _state, *(new eoPopLoopEval(_eval)), _continue, _op); + do_make_algo_scalar( _parser, _state, *(new eoPopLoopEval(_eval)), _continue, _op); } diff --git a/eo/src/do/make_algo_scalar.h b/eo/src/do/make_algo_scalar.h index 5a63eb9d2..52df8f4f4 100644 --- a/eo/src/do/make_algo_scalar.h +++ b/eo/src/do/make_algo_scalar.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_algo_scalar.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -84,42 +84,42 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc if (_dist == NULL) comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e) or Sequential(ordered/unordered)"; else - comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e), Sharing(sigma_share) or Sequential(ordered/unordered)"; + comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e), Sharing(sigma_share) or Sequential(ordered/unordered)"; eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", comment, 'S', "Evolution Engine"); eoParamParamType & ppSelect = selectionParam.value(); // std::pair > eoSelectOne* select ; - if (ppSelect.first == std::string("DetTour")) + if (ppSelect.first == std::string("DetTour")) { unsigned detSize; if (!ppSelect.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; - detSize = 2; - // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("2")); + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("2")); } - else // parameter passed by user as DetTour(T) + else // parameter passed by user as DetTour(T) detSize = atoi(ppSelect.second[0].c_str()); select = new eoDetTournamentSelect(detSize); } - else if (ppSelect.first == std::string("Sharing")) + else if (ppSelect.first == std::string("Sharing")) { double nicheSize; if (!ppSelect.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to Sharing, using 0.5" << std::endl; - nicheSize = 0.5; - // put back 2 in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("0.5")); + std::cerr << "WARNING, no parameter passed to Sharing, using 0.5" << std::endl; + nicheSize = 0.5; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("0.5")); } - else // parameter passed by user as DetTour(T) + else // parameter passed by user as DetTour(T) nicheSize = atof(ppSelect.second[0].c_str()); - if (_dist == NULL) // no distance + if (_dist == NULL) // no distance throw std::runtime_error("You didn't specify a distance when calling make_algo_scalar and using sharing"); select = new eoSharingSelect(nicheSize, *_dist); } @@ -127,57 +127,57 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc { double p; if (!ppSelect.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; - p = 1; - // put back p in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("1")); - } - else // parameter passed by user as DetTour(T) - p = atof(ppSelect.second[0].c_str()); - + { + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + select = new eoStochTournamentSelect(p); } else if (ppSelect.first == std::string("Ranking")) { double p,e; if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent - { - p = atof(ppSelect.second[0].c_str()); - e = atof(ppSelect.second[1].c_str()); - } - else if (ppSelect.second.size()==1) // 1 parameter: pressure - { - std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; - e = 1; - ppSelect.second.push_back(std::string("1")); - p = atof(ppSelect.second[0].c_str()); - } + { + p = atof(ppSelect.second[0].c_str()); + e = atof(ppSelect.second[1].c_str()); + } + else if (ppSelect.second.size()==1) // 1 parameter: pressure + { + std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; + e = 1; + ppSelect.second.push_back(std::string("1")); + p = atof(ppSelect.second[0].c_str()); + } else // no parameters ... or garbage - { - std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; - p=2; - e=1; - // put back in parameter for consistency (and status file) - ppSelect.second.resize(2); // just in case - ppSelect.second[0] = (std::string("2")); - ppSelect.second[1] = (std::string("1")); - } + { + std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; + p=2; + e=1; + // put back in parameter for consistency (and status file) + ppSelect.second.resize(2); // just in case + ppSelect.second[0] = (std::string("2")); + ppSelect.second[1] = (std::string("1")); + } // check for authorized values // pressure in (0,1] if ( (p<=1) || (p>2) ) - { - std::cerr << "WARNING, selective pressure must be in (0,1] in Ranking, using 2\n"; - p=2; - ppSelect.second[0] = (std::string("2")); - } + { + std::cerr << "WARNING, selective pressure must be in (0,1] in Ranking, using 2\n"; + p=2; + ppSelect.second[0] = (std::string("2")); + } // exponent >0 if (e<=0) - { - std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; - e=1; - ppSelect.second[1] = (std::string("1")); - } + { + std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + e=1; + ppSelect.second[1] = (std::string("1")); + } // now we're OK eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); select = new eoRouletteWorthSelect(p2w); @@ -186,13 +186,13 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc { bool b; if (ppSelect.second.size() == 0) // no argument -> default = ordered - { - b=true; - // put back in parameter for consistency (and status file) - ppSelect.second.push_back(std::string("ordered")); - } + { + b=true; + // put back in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("ordered")); + } else - b = !(ppSelect.second[0] == std::string("unordered")); + b = !(ppSelect.second[0] == std::string("unordered")); select = new eoSequentialSelect(b); } else if (ppSelect.first == std::string("Roulette")) // no argument (yet) @@ -211,7 +211,7 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc _state.storeFunctor(select); - // the number of offspring + // the number of offspring eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); // the replacement @@ -231,16 +231,16 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc else if (ppReplace.first == std::string("EPTour")) { unsigned detSize; - + if (!ppReplace.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to EPTour, using 6" << std::endl; - detSize = 6; - // put back in parameter for consistency (and status file) - ppReplace.second.push_back(std::string("6")); - } - else // parameter passed by user as EPTour(T) - detSize = atoi(ppSelect.second[0].c_str()); + { + std::cerr << "WARNING, no parameter passed to EPTour, using 6" << std::endl; + detSize = 6; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(std::string("6")); + } + else // parameter passed by user as EPTour(T) + detSize = atoi(ppSelect.second[0].c_str()); replace = new eoEPReplacement(detSize); } @@ -251,32 +251,32 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc else if (ppReplace.first == std::string("SSGADet")) { unsigned detSize; - + if (!ppReplace.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to SSGADet, using 2" << std::endl; - detSize = 2; - // put back in parameter for consistency (and status file) - ppReplace.second.push_back(std::string("2")); - } - else // parameter passed by user as SSGADet(T) - detSize = atoi(ppSelect.second[0].c_str()); - + { + std::cerr << "WARNING, no parameter passed to SSGADet, using 2" << std::endl; + detSize = 2; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(std::string("2")); + } + else // parameter passed by user as SSGADet(T) + detSize = atoi(ppSelect.second[0].c_str()); + replace = new eoSSGADetTournamentReplacement(detSize); } else if (ppReplace.first == std::string("SSGAStoch")) { double p; if (!ppReplace.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to SSGAStoch, using 1" << std::endl; - p = 1; - // put back in parameter for consistency (and status file) - ppReplace.second.push_back(std::string("1")); - } - else // parameter passed by user as SSGADet(T) - p = atof(ppSelect.second[0].c_str()); - + { + std::cerr << "WARNING, no parameter passed to SSGAStoch, using 1" << std::endl; + p = 1; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(std::string("1")); + } + else // parameter passed by user as SSGADet(T) + p = atof(ppSelect.second[0].c_str()); + replace = new eoSSGAStochTournamentReplacement(p); } else @@ -294,10 +294,10 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc eoReplacement *replaceTmp = replace; replace = new eoWeakElitistReplacement(*replaceTmp); _state.storeFunctor(replace); - } + } // the general breeder - eoGeneralBreeder *breed = + eoGeneralBreeder *breed = new eoGeneralBreeder(*select, _op, offspringRateParam.value()); _state.storeFunctor(breed); diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 37cf5d0a4..7958ed5b0 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -129,7 +129,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); - bool dirOK = false; // not tested yet + bool dirOK = false; // not tested yet @@ -179,15 +179,15 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { - bestStat = new eoBestFitnessStat; + bestStat = new eoBestFitnessStat; - // store it + // store it - _state.storeFunctor(bestStat); + _state.storeFunctor(bestStat); - // add it to the checkpoint + // add it to the checkpoint - checkpoint->add(*bestStat); + checkpoint->add(*bestStat); } @@ -203,15 +203,15 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { - averageStat = new eoAverageStat; + averageStat = new eoAverageStat; - // store it + // store it - _state.storeFunctor(averageStat); + _state.storeFunctor(averageStat); - // add it to the checkpoint + // add it to the checkpoint - checkpoint->add(*averageStat); + checkpoint->add(*averageStat); } @@ -223,19 +223,19 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu eoSecondMomentStats *secondStat = NULL; - if ( printBestParam.value() || fileBestParam.value() ) // we need it for screen output or file output + if ( printBestParam.value() || fileBestParam.value() ) // we need it for screen output or file output { - secondStat = new eoSecondMomentStats; + secondStat = new eoSecondMomentStats; - // store it + // store it - _state.storeFunctor(secondStat); + _state.storeFunctor(secondStat); - // add it to the checkpoint + // add it to the checkpoint - checkpoint->add(*secondStat); + checkpoint->add(*secondStat); } @@ -255,15 +255,15 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { - popStat = new eoSortedPopStat; + popStat = new eoSortedPopStat; - // store it + // store it - _state.storeFunctor(popStat); + _state.storeFunctor(popStat); - // add it to the checkpoint + // add it to the checkpoint - checkpoint->add(*popStat); + checkpoint->add(*popStat); } @@ -287,7 +287,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu bool needStdoutMonitor = printBestParam.value() - || printPopParam.value() ; + || printPopParam.value() ; @@ -297,53 +297,53 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { - eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); - _state.storeFunctor(monitor); + _state.storeFunctor(monitor); - // when called by the checkpoint (i.e. at every generation) + // when called by the checkpoint (i.e. at every generation) - checkpoint->add(*monitor); + checkpoint->add(*monitor); - // the monitor will output a series of parameters: add them + // the monitor will output a series of parameters: add them - monitor->add(*generationCounter); + monitor->add(*generationCounter); - if (useEvalParam.value()) // we want nb of evaluations + if (useEvalParam.value()) // we want nb of evaluations - monitor->add(_eval); + monitor->add(_eval); - if (useTimeParam.value()) // we want time + if (useTimeParam.value()) // we want time - { + { - tCounter = new eoTimeCounter; + tCounter = new eoTimeCounter; - _state.storeFunctor(tCounter); + _state.storeFunctor(tCounter); - checkpoint->add(*tCounter); + checkpoint->add(*tCounter); - monitor->add(*tCounter); + monitor->add(*tCounter); - } + } - if (printBestParam.value()) + if (printBestParam.value()) - { + { - monitor->add(*bestStat); + monitor->add(*bestStat); - monitor->add(*secondStat); + monitor->add(*secondStat); - } + } - if ( printPopParam.value()) + if ( printPopParam.value()) - monitor->add(*popStat); + monitor->add(*popStat); } @@ -353,9 +353,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu if ( ( fileBestParam.value() || plotBestParam.value() || - plotHistogramParam.value() ) + plotHistogramParam.value() ) - && !dirOK ) // just in case we add something before + && !dirOK ) // just in case we add something before dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE @@ -367,41 +367,41 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu #ifdef _MSVC - std::string stmp = dirNameParam.value() + "\best.xg"; + std::string stmp = dirNameParam.value() + "\best.xg"; #else - std::string stmp = dirNameParam.value() + "/best.xg"; + std::string stmp = dirNameParam.value() + "/best.xg"; #endif - eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); - // save and give to checkpoint + // save and give to checkpoint - _state.storeFunctor(fileMonitor); + _state.storeFunctor(fileMonitor); - checkpoint->add(*fileMonitor); + checkpoint->add(*fileMonitor); - // and feed with some statistics + // and feed with some statistics - fileMonitor->add(*generationCounter); + fileMonitor->add(*generationCounter); - fileMonitor->add(_eval); + fileMonitor->add(_eval); - if (tCounter) // we want the time as well + if (tCounter) // we want the time as well - { + { - // std::cout << "On met timecounter\n"; + // std::cout << "On met timecounter\n"; - fileMonitor->add(*tCounter); + fileMonitor->add(*tCounter); - } + } - fileMonitor->add(*bestStat); + fileMonitor->add(*bestStat); - fileMonitor->add(*secondStat); + fileMonitor->add(*secondStat); } @@ -413,33 +413,33 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { - std::string stmp = dirNameParam.value() + "/gnu_best.xg"; + std::string stmp = dirNameParam.value() + "/gnu_best.xg"; - eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); - // save and give to checkpoint + // save and give to checkpoint - _state.storeFunctor(gnuMonitor); + _state.storeFunctor(gnuMonitor); - checkpoint->add(*gnuMonitor); + checkpoint->add(*gnuMonitor); - // and feed with some statistics + // and feed with some statistics - if (useEvalParam.value()) // do we want eval as X coordinate + if (useEvalParam.value()) // do we want eval as X coordinate - gnuMonitor->add(_eval); + gnuMonitor->add(_eval); - else if (tCounter) // or time? + else if (tCounter) // or time? - gnuMonitor->add(*tCounter); + gnuMonitor->add(*tCounter); - else // default: generation + else // default: generation - gnuMonitor->add(*generationCounter); + gnuMonitor->add(*generationCounter); - gnuMonitor->add(*bestStat); + gnuMonitor->add(*bestStat); - gnuMonitor->add(*averageStat); + gnuMonitor->add(*averageStat); } @@ -451,25 +451,25 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { - eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; - _state.storeFunctor(fitStat); + _state.storeFunctor(fitStat); - checkpoint->add(*fitStat); + checkpoint->add(*fitStat); - // a gnuplot-based monitor for snapshots: needs a dir name + // a gnuplot-based monitor for snapshots: needs a dir name - eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); - _state.storeFunctor(fitSnapshot); + _state.storeFunctor(fitSnapshot); - // add any stat that is a std::vector to it + // add any stat that is a std::vector to it - fitSnapshot->add(*fitStat); + fitSnapshot->add(*fitStat); - // and of course add it to the checkpoint + // and of course add it to the checkpoint - checkpoint->add(*fitSnapshot); + checkpoint->add(*fitSnapshot); } @@ -499,7 +499,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu if (! dirOK ) - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE @@ -537,7 +537,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu if (! dirOK ) - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE @@ -570,4 +570,3 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu #endif - diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h index 1c2ec493c..33c7f7206 100644 --- a/eo/src/do/make_checkpoint_FDC.h +++ b/eo/src/do/make_checkpoint_FDC.h @@ -70,7 +70,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoValueParam& dirNameParam = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); // shoudl we empty it if exists eoValueParam& eraseParam = _parser.createParam(false, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); - bool dirOK = false; // not tested yet + bool dirOK = false; // not tested yet ///////////////////////////////////////// // now some statistics on the population: @@ -98,11 +98,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) // we need the bestStat for at least one of the 3 above { - bestStat = new eoBestFitnessStat; - // store it - _state.storeFunctor(bestStat); - // add it to the checkpoint - checkpoint->add(*bestStat); + bestStat = new eoBestFitnessStat; + // store it + _state.storeFunctor(bestStat); + // add it to the checkpoint + checkpoint->add(*bestStat); } // Average fitness alone @@ -110,11 +110,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoAverageStat *averageStat = NULL; // do we need averageStat? if ( plotBestParam.value() ) // we need it for gnuplot output { - averageStat = new eoAverageStat; - // store it - _state.storeFunctor(averageStat); - // add it to the checkpoint - checkpoint->add(*averageStat); + averageStat = new eoAverageStat; + // store it + _state.storeFunctor(averageStat); + // add it to the checkpoint + checkpoint->add(*averageStat); } // Second moment stats: average and stdev @@ -122,11 +122,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoSecondMomentStats *secondStat = NULL; if ( printBestParam.value() ) // we need it for sreen output { - secondStat = new eoSecondMomentStats; - // store it - _state.storeFunctor(secondStat); - // add it to the checkpoint - checkpoint->add(*secondStat); + secondStat = new eoSecondMomentStats; + // store it + _state.storeFunctor(secondStat); + // add it to the checkpoint + checkpoint->add(*secondStat); } @@ -136,11 +136,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); if ( printPopParam.value() ) // we do want pop dump { - popStat = new eoSortedPopStat("Dump of whole population"); - // store it - _state.storeFunctor(popStat); - // add it to the checkpoint - checkpoint->add(*popStat); + popStat = new eoSortedPopStat("Dump of whole population"); + // store it + _state.storeFunctor(popStat); + // add it to the checkpoint + checkpoint->add(*popStat); } @@ -152,14 +152,14 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval eoFDCStat *fdcStat = NULL; if ( printFDCParam.value() || plotFDCParam.value() ) // we need FDCStat { - // need first an object to compute the distances - here Hamming dist. - eoQuadDistance *dist = new eoQuadDistance; - _state.storeFunctor(dist); - fdcStat = new eoFDCStat(*dist); - // storeFunctor it - _state.storeFunctor(fdcStat); - // add it to the checkpoint - checkpoint->add(*fdcStat); + // need first an object to compute the distances - here Hamming dist. + eoQuadDistance *dist = new eoQuadDistance; + _state.storeFunctor(dist); + fdcStat = new eoFDCStat(*dist); + // storeFunctor it + _state.storeFunctor(fdcStat); + // add it to the checkpoint + checkpoint->add(*fdcStat); } // do we wnat some histogram of fitnesses snpashots? @@ -170,95 +170,95 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval /////////////// // do we want an eoStdoutMonitor? bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() - || printPopParam.value() ; + || printPopParam.value() ; // The Stdout monitor will print parameters to the screen ... if ( needStdoutMonitor ) { - eoStdoutMonitor *monitor = new eoStdoutMonitor(false); - _state.storeFunctor(monitor); + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); - // when called by the checkpoint (i.e. at every generation) - checkpoint->add(*monitor); + // when called by the checkpoint (i.e. at every generation) + checkpoint->add(*monitor); - // the monitor will output a series of parameters: add them - monitor->add(*generationCounter); - if (useEvalParam.value()) // we want nb of evaluations - monitor->add(_eval); - if (printBestParam.value()) - { - monitor->add(*bestStat); - monitor->add(*secondStat); - } - if (printFDCParam.value()) - monitor->add(*fdcStat); - if ( printPopParam.value()) - monitor->add(*popStat); + // the monitor will output a series of parameters: add them + monitor->add(*generationCounter); + if (useEvalParam.value()) // we want nb of evaluations + monitor->add(_eval); + if (printBestParam.value()) + { + monitor->add(*bestStat); + monitor->add(*secondStat); + } + if (printFDCParam.value()) + monitor->add(*fdcStat); + if ( printPopParam.value()) + monitor->add(*popStat); } // first handle the dir test - if we need at least one file if ( ( fileBestParam.value() || plotBestParam.value() || - plotFDCParam.value() || plotHistogramParam.value() ) - && !dirOK ) // just in case we add something before + plotFDCParam.value() || plotHistogramParam.value() ) + && !dirOK ) // just in case we add something before dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE if (fileBestParam.value()) // A file monitor for best & secondMoment { - std::string stmp = dirNameParam.value() + "/best.xg"; - eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); - // save and give to checkpoint - _state.storeFunctor(fileMonitor); - checkpoint->add(*fileMonitor); - // and feed with some statistics - fileMonitor->add(*generationCounter); - fileMonitor->add(_eval); - fileMonitor->add(*bestStat); - fileMonitor->add(*secondStat); + std::string stmp = dirNameParam.value() + "/best.xg"; + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); + // save and give to checkpoint + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + // and feed with some statistics + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + fileMonitor->add(*bestStat); + fileMonitor->add(*secondStat); } if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average { - std::string stmp = dirNameParam.value() + "_gnu_best.xg"; - eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); - // save and give to checkpoint - _state.storeFunctor(gnuMonitor); - checkpoint->add(*gnuMonitor); - // and feed with some statistics - if (useEvalParam.value()) - gnuMonitor->add(_eval); - else - gnuMonitor->add(*generationCounter); - gnuMonitor->add(*bestStat); - gnuMonitor->add(*averageStat); + std::string stmp = dirNameParam.value() + "_gnu_best.xg"; + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); + // save and give to checkpoint + _state.storeFunctor(gnuMonitor); + checkpoint->add(*gnuMonitor); + // and feed with some statistics + if (useEvalParam.value()) + gnuMonitor->add(_eval); + else + gnuMonitor->add(*generationCounter); + gnuMonitor->add(*bestStat); + gnuMonitor->add(*averageStat); } if (plotFDCParam.value()) // a specific plot monitor for FDC { - // first into a file (it adds everything ti itself - eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat, dirNameParam.value()); - _state.storeFunctor(fdcFileSnapshot); - // then to a Gnuplot monitor - eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); - _state.storeFunctor(fdcGnuplot); + // first into a file (it adds everything ti itself + eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat, dirNameParam.value()); + _state.storeFunctor(fdcFileSnapshot); + // then to a Gnuplot monitor + eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); + _state.storeFunctor(fdcGnuplot); - // and of course add them to the checkPoint - checkpoint->add(*fdcFileSnapshot); - checkpoint->add(*fdcGnuplot); + // and of course add them to the checkPoint + checkpoint->add(*fdcFileSnapshot); + checkpoint->add(*fdcGnuplot); } // historgram? if (plotHistogramParam.value()) // want to see how the fitness is spread? { - eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; - _state.storeFunctor(fitStat); - checkpoint->add(*fitStat); - // a gnuplot-based monitor for snapshots: needs a dir name - eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); - _state.storeFunctor(fitSnapshot); - // add any stat that is a std::vector to it - fitSnapshot->add(*fitStat); - // and of course add it to the checkpoint - checkpoint->add(*fitSnapshot); + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); + _state.storeFunctor(fitSnapshot); + // add any stat that is a std::vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); } ////////////////////////////////// @@ -273,7 +273,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval { // first make sure dirName is OK if (! dirOK ) - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); std::string stmp = dirNameParam.value() + "/generations"; @@ -288,7 +288,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval { // first make sure dirName is OK if (! dirOK ) - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE std::string stmp = dirNameParam.value() + "/time"; eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h index 656b13769..26463fab3 100644 --- a/eo/src/do/make_checkpoint_assembled.h +++ b/eo/src/do/make_checkpoint_assembled.h @@ -49,7 +49,7 @@ bool testDirRes(std::string _dirName, bool _erase); /////////////////// The checkpoint and other I/O ////////////// -/** Of course, Fitness needs to be an eoScalarFitnessAssembled!!! +/** Of course, Fitness needs to be an eoScalarFitnessAssembled!!! * * * @ingroup Builders @@ -153,7 +153,7 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta _state.storeFunctor(fitStat); checkpoint->add(*fitStat); #ifdef HAVE_GNUPLOT - // a gnuplot-based monitor for snapshots: needs a dir name + // a gnuplot-based monitor for snapshots: needs a dir name eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirName); _state.storeFunctor(fitSnapshot); // add any stat that is a vector to it diff --git a/eo/src/do/make_continue.h b/eo/src/do/make_continue.h index 628624386..27b4e9450 100644 --- a/eo/src/do/make_continue.h +++ b/eo/src/do/make_continue.h @@ -55,7 +55,7 @@ It can then be instantiated, and compiled on its own for a given EOType template eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) { - if (_combined) // already exists + if (_combined) // already exists _combined->add(*_cont); else _combined = new eoCombinedContinue(*_cont); @@ -81,10 +81,10 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu if (maxGenParam.value()) // positive: -> define and store { - eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); - _state.storeFunctor(genCont); - // and "add" to combined - continuator = make_combinedContinue(continuator, genCont); + eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); + _state.storeFunctor(genCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, genCont); } // the steadyGen continue - only if user imput @@ -92,12 +92,12 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); if (_parser.isItThere(steadyGenParam)) { - eoSteadyFitContinue *steadyCont = new eoSteadyFitContinue - (minGenParam.value(), steadyGenParam.value()); - // store - _state.storeFunctor(steadyCont); - // add to combinedContinue - continuator = make_combinedContinue(continuator, steadyCont); + eoSteadyFitContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); } // Same thing with Eval - but here default value is 0 @@ -108,10 +108,10 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu if (maxEvalParam.value()) // positive: -> define and store { - eoEvalContinue *evalCont = new eoEvalContinue(_eval, maxEvalParam.value()); - _state.storeFunctor(evalCont); - // and "add" to combined - continuator = make_combinedContinue(continuator, evalCont); + eoEvalContinue *evalCont = new eoEvalContinue(_eval, maxEvalParam.value()); + _state.storeFunctor(evalCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, evalCont); } /* // the steadyEval continue - only if user imput @@ -119,12 +119,12 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); if (_parser.isItThere(steadyGenParam)) { - eoSteadyGenContinue *steadyCont = new eoSteadyFitContinue - (minGenParam.value(), steadyGenParam.value()); - // store - _state.storeFunctor(steadyCont); - // add to combinedContinue - continuator = make_combinedContinue(continuator, steadyCont); + eoSteadyGenContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); } */ // the target fitness @@ -132,12 +132,12 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu eoValueParam& targetFitnessParam = _parser.createParam(double(0.0), "targetFitness", "Stop when fitness reaches",'T', "Stopping criterion"); if (_parser.isItThere(targetFitnessParam)) { - fitCont = new eoFitContinue - (targetFitnessParam.value()); - // store - _state.storeFunctor(fitCont); - // add to combinedContinue - continuator = make_combinedContinue(continuator, fitCont); + fitCont = new eoFitContinue + (targetFitnessParam.value()); + // store + _state.storeFunctor(fitCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, fitCont); } #ifndef _MSC_VER @@ -146,11 +146,11 @@ eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu eoValueParam& ctrlCParam = _parser.createParam(false, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); if (ctrlCParam.value()) { - ctrlCCont = new eoCtrlCContinue; - // store - _state.storeFunctor(ctrlCCont); - // add to combinedContinue - continuator = make_combinedContinue(continuator, ctrlCCont); + ctrlCCont = new eoCtrlCContinue; + // store + _state.storeFunctor(ctrlCCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, ctrlCCont); } #endif diff --git a/eo/src/do/make_general_replacement.h b/eo/src/do/make_general_replacement.h index 4f1f52e86..1d42345c8 100644 --- a/eo/src/do/make_general_replacement.h +++ b/eo/src/do/make_general_replacement.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_general_replacement.h // (c) Marc Schoenauer and Pierre Collet, 2002 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -49,8 +49,8 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) eoReduce * ptReduce; // ---------- Deterministic - if ( (_ppReduce.first == std::string("Deterministic")) || - (_ppReduce.first == std::string("Sequential")) + if ( (_ppReduce.first == std::string("Deterministic")) || + (_ppReduce.first == std::string("Sequential")) ) { ptReduce = new eoTruncate; @@ -65,7 +65,7 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) // put back 6 in parameter for consistency (and status file) _ppReduce.second.push_back(std::string("6")); } - else // parameter passed by user as EP(T) + else // parameter passed by user as EP(T) detSize = atoi(_ppReduce.second[0].c_str()); ptReduce = new eoEPReduce(detSize); } @@ -74,12 +74,12 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) { if (!_ppReduce.second.size()) // no parameter added { - std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; - detSize = 2; - // put back 2 in parameter for consistency (and status file) - _ppReduce.second.push_back(std::string("2")); + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + _ppReduce.second.push_back(std::string("2")); } - else // parameter passed by user as DetTour(T) + else // parameter passed by user as DetTour(T) detSize = atoi(_ppReduce.second[0].c_str()); ptReduce = new eoDetTournamentTruncate(detSize); } @@ -87,24 +87,24 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) { double p; if (!_ppReduce.second.size()) // no parameter added - { - std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; - p = 1; - // put back p in parameter for consistency (and status file) - _ppReduce.second.push_back(std::string("1")); - } - else // parameter passed by user as DetTour(T) - { - p = atof(_ppReduce.second[0].c_str()); - if ( (p<=0.5) || (p>1) ) - throw std::runtime_error("Stochastic tournament size should be in [0.5,1]"); - } - + { + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; + p = 1; + // put back p in parameter for consistency (and status file) + _ppReduce.second.push_back(std::string("1")); + } + else // parameter passed by user as DetTour(T) + { + p = atof(_ppReduce.second[0].c_str()); + if ( (p<=0.5) || (p>1) ) + throw std::runtime_error("Stochastic tournament size should be in [0.5,1]"); + } + ptReduce = new eoStochTournamentTruncate(p); } - else if ( (_ppReduce.first == std::string("Uniform")) || - (_ppReduce.first == std::string("Random")) - ) + else if ( (_ppReduce.first == std::string("Uniform")) || + (_ppReduce.first == std::string("Random")) + ) { ptReduce = new eoRandomReduce; } @@ -117,10 +117,10 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) return (*ptReduce); } -/** Helper function that creates a replacement from the class - * eoReduceMergeReduce using 6 parameters +/** Helper function that creates a replacement from the class + * eoReduceMergeReduce using 6 parameters * (after the usual eoState and eoParser) - * + * * eoHowMany _elite the number of elite parents (0 = no elitism) * see below * bool _strongElitism if elite > 0, std::string elitism or weak elitism @@ -136,15 +136,15 @@ eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) */ template eoReplacement & make_general_replacement( - eoParser& _parser, eoState& _state, - eoHowMany _elite = eoHowMany(0), + eoParser& _parser, eoState& _state, + eoHowMany _elite = eoHowMany(0), bool _strongElitism = false, eoHowMany _surviveParents = eoHowMany(0.0), eoParamParamType & _reduceParentType = eoParamParamType("Deterministic"), eoHowMany _surviveOffspring = eoHowMany(1.0), eoParamParamType & _reduceOffspringType = eoParamParamType("Deterministic"), eoParamParamType & _reduceFinalType = eoParamParamType("Deterministic") - ) + ) { ///////////////////////////////////////////////////// // the replacement @@ -157,14 +157,14 @@ eoReplacement & make_general_replacement( // reduce the parents eoHowMany surviveParents = _parser.createParam(_surviveParents, "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); - + eoParamParamType & reduceParentType = _parser.createParam(_reduceParentType, "reduceParents", "Parents reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); eoReduce & reduceParent = decode_reduce(reduceParentType, _state); // reduce the offspring eoHowMany surviveOffspring = _parser.createParam(_surviveOffspring, "surviveOffspring", "Nb of surviving offspring (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); - + eoParamParamType & reduceOffspringType = _parser.createParam(_reduceOffspringType, "reduceOffspring", "Offspring reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); eoReduce & reduceOffspring = decode_reduce(reduceOffspringType, _state); diff --git a/eo/src/do/make_pop.h b/eo/src/do/make_pop.h index 191ab0652..c2a1d1a84 100644 --- a/eo/src/do/make_pop.h +++ b/eo/src/do/make_pop.h @@ -59,7 +59,7 @@ eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _ini // random seed eoValueParam& seedParam = _parser.getORcreateParam(uint32_t(0), "seed", "Random number seed", 'S'); if (seedParam.value() == 0) - seedParam.value() = time(0); + seedParam.value() = time(0); eoValueParam& popSize = _parser.getORcreateParam(unsigned(20), "popSize", "Population Size", 'P', "Evolution Engine"); // Either load or initialize @@ -82,17 +82,17 @@ eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _ini // the fitness is read in the file: // do only evaluate the pop if the fitness has changed if (recomputeFitnessParam.value()) - { - for (unsigned i=0; i popSize.value()) - { - std::cerr << "WARNING, Load file contained too many individuals. Only the best will be retained" << std::endl; - pop.resize(popSize.value()); - } + { + std::cerr << "WARNING, Load file contained too many individuals. Only the best will be retained" << std::endl; + pop.resize(popSize.value()); + } } else // nothing loaded from a file { diff --git a/eo/src/do/make_run.h b/eo/src/do/make_run.h index 7e1e2889e..485cb8700 100644 --- a/eo/src/do/make_run.h +++ b/eo/src/do/make_run.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_run.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/eo/src/eoCellularEasyEA.h b/eo/src/eoCellularEasyEA.h index 98595ae03..fbf3085fc 100644 --- a/eo/src/eoCellularEasyEA.h +++ b/eo/src/eoCellularEasyEA.h @@ -8,16 +8,16 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: cahon@lifl.fr */ @@ -32,26 +32,26 @@ #include /** - The abstract cellular easy algorithm. + The abstract cellular easy algorithm. @ingroup Algorithms */ template class eoCellularEasyEA : public eoAlgo { - + public : - + /** Two constructors */ eoCellularEasyEA (eoContinue & _cont, // Stop. criterion - eoEvalFunc & _eval, // Evaluation function - eoSelectOne & _sel_neigh, // To choose a partner - eoBinOp & _cross, // Cross-over operator - eoMonOp & _mut, // Mutation operator - eoSelectOne & _sel_repl /* Which to keep between the new - child and the old individual ? */ - ) : + eoEvalFunc & _eval, // Evaluation function + eoSelectOne & _sel_neigh, // To choose a partner + eoBinOp & _cross, // Cross-over operator + eoMonOp & _mut, // Mutation operator + eoSelectOne & _sel_repl /* Which to keep between the new + child and the old individual ? */ + ) : cont (_cont), eval (_eval), popEval (_eval), @@ -60,18 +60,18 @@ public : mut (_mut), sel_child (eoSelectFirstOne ()), sel_repl (_sel_repl) { - + } - + eoCellularEasyEA (eoContinue & _cont, - eoEvalFunc & _eval, - eoSelectOne & _sel_neigh, - eoQuadOp & _cross, - eoMonOp & _mut, - eoSelectOne & _sel_child, /* To choose one from - the both children */ - eoSelectOne & _sel_repl - ) : + eoEvalFunc & _eval, + eoSelectOne & _sel_neigh, + eoQuadOp & _cross, + eoMonOp & _mut, + eoSelectOne & _sel_child, /* To choose one from + the both children */ + eoSelectOne & _sel_repl + ) : cont (_cont), eval (_eval), popEval (_eval), @@ -80,7 +80,7 @@ public : mut (_mut), sel_child (_sel_child), sel_repl (_sel_repl) { - + } /** @@ -88,55 +88,55 @@ public : */ void operator () (eoPop & pop) { - + do { - + for (unsigned i = 0 ; i < pop.size () ; i ++) { - - // Who are neighbouring to the current individual ? - eoPop neigh = neighbours (pop, i) ; - - // To select a partner - EOT part, old_sol = pop [i] ; - part = sel_neigh (neigh) ; - // To perform cross-over - cross (pop [i], part) ; + // Who are neighbouring to the current individual ? + eoPop neigh = neighbours (pop, i) ; - // To perform mutation - mut (pop [i]) ; - mut (part) ; - - pop [i].invalidate () ; - part.invalidate () ; - eval (pop [i]) ; - eval (part) ; + // To select a partner + EOT part, old_sol = pop [i] ; + part = sel_neigh (neigh) ; - // To choose one of the two children ... - eoPop pop_loc ; - pop_loc.push_back (pop [i]) ; - pop_loc.push_back (part) ; + // To perform cross-over + cross (pop [i], part) ; - pop [i] = sel_child (pop_loc) ; + // To perform mutation + mut (pop [i]) ; + mut (part) ; - // To choose only one between the new made child and the old individual - pop_loc.clear () ; - pop_loc.push_back (pop [i]) ; - - pop_loc.push_back (old_sol) ; - - pop [i] = sel_repl (pop_loc) ; + pop [i].invalidate () ; + part.invalidate () ; + eval (pop [i]) ; + eval (part) ; + + // To choose one of the two children ... + eoPop pop_loc ; + pop_loc.push_back (pop [i]) ; + pop_loc.push_back (part) ; + + pop [i] = sel_child (pop_loc) ; + + // To choose only one between the new made child and the old individual + pop_loc.clear () ; + pop_loc.push_back (pop [i]) ; + + pop_loc.push_back (old_sol) ; + + pop [i] = sel_repl (pop_loc) ; } - + } while (cont (pop)) ; } protected : - + virtual eoPop neighbours (const eoPop & pop, int rank) = 0 ; private : - + eoContinue & cont ; eoEvalFunc & eval ; eoPopLoopEval popEval ; @@ -145,18 +145,18 @@ private : eoMonOp & mut ; eoSelectOne & sel_child ; eoSelectOne & sel_repl ; - + class eoSelectFirstOne : public eoSelectOne { - + public : - + const EOT & operator () (const eoPop & pop) { - - return pop [0] ; + + return pop [0] ; } - - } ; - + + } ; + } ; #endif diff --git a/eo/src/eoCloneOps.h b/eo/src/eoCloneOps.h index bdb9f0417..e53cbd749 100644 --- a/eo/src/eoCloneOps.h +++ b/eo/src/eoCloneOps.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoCloneOps.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - CVS Info: $Date: 2003-02-27 19:26:09 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoCloneOps.h,v 1.2 2003-02-27 19:26:09 okoenig Exp $ $Author: okoenig $ + CVS Info: $Date: 2003-02-27 19:26:09 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoCloneOps.h,v 1.2 2003-02-27 19:26:09 okoenig Exp $ $Author: okoenig $ */ //----------------------------------------------------------------------------- @@ -29,9 +29,9 @@ /** * The different null-variation operators (i.e. they do nothing) - * - * eoQuadCloneOp at least is useful to emulate the standard - * crossover(pCross) + mutation(pMut) + * + * eoQuadCloneOp at least is useful to emulate the standard + * crossover(pCross) + mutation(pMut) * within the eoGenOp framework * eoMonCloneOp will probably be useful as the copy operator * eoBinCloneOp will certainly never been used - but let's be complete :-) @@ -80,4 +80,3 @@ virtual bool operator()(EOT& , EOT& ) {return false;} #endif /** @} */ - diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index 2788f415b..4dac4d69e 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoCombinedContinue.h // (c) Maarten Keijzer, GeNeura Team, 1999, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #include -/** +/** Combined continuators - logical AND: Continues until one of the embedded continuators says halt! @@ -35,7 +35,7 @@ to be consistent with other Combined constructs and allow to easily handle more than 2 continuators -02/2003 Ramón Casero Cańas - added the removeLast() method +02/2003 Ramón Casero Cańas - added the removeLast() method @ingroup Combination */ @@ -90,4 +90,3 @@ private: }; #endif - diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 67fa02306..d41122d85 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoCombinedInit.h // (c) Maarten Keijzer, GeNeura Team, Marc Schoenauer 2004 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #include -/** +/** Combined INIT: a proportional recombination of eoInit objects @ingroup Initializators @@ -49,7 +49,7 @@ public: eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; add( _init, _rate ); } - + /** The usual method to add objects to the combination */ void add(eoInit & _init, double _rate) @@ -78,7 +78,7 @@ public: virtual void operator() ( EOT & _eo ) { unsigned what = rng.roulette_wheel(rates); // choose one op - (*initializers[what])(_eo); // apply it + (*initializers[what])(_eo); // apply it return; } @@ -90,4 +90,3 @@ std::vector rates; }; #endif - diff --git a/eo/src/eoConstrictedVariableWeightVelocity.h b/eo/src/eoConstrictedVariableWeightVelocity.h index fd0dc13b6..9e96d7ef3 100644 --- a/eo/src/eoConstrictedVariableWeightVelocity.h +++ b/eo/src/eoConstrictedVariableWeightVelocity.h @@ -56,9 +56,9 @@ public: * @param _topology - The topology to get the global/local/other best * @param _coeff - The constriction coefficient * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng @@ -85,9 +85,9 @@ public: * @param _topology - The topology to get the global/local/other best * @param _coeff - The constriction coefficient * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -112,8 +112,8 @@ public: * @param _topology - The topology to get the global/local/other best* * @param _coeff - The constriction coefficient * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoConstrictedVariableWeightVelocity (eoTopology < POT > & _topology, @@ -134,7 +134,7 @@ public: /** * Evaluate the new velocities of the given particle. Need an indice to identify the particle - * into the topology. Steps are : + * into the topology. Steps are : * - evaluate r1 and r2, the customed learning factors * - adjust the size of the bounds (even if dummy) * - update the weight with the weightUpdater (use the dummy updater if there's no updater provided) @@ -189,22 +189,21 @@ public: protected: eoTopology < POT > & topology; - + const VelocityType & coeff; // the fixed constriction coefficient - eoWeightUpdater & weightUpdater; // the updater used to make the weight evoluate - - const VelocityType & c1; // learning factor 1 - const VelocityType & c2; // learning factor 2 - + eoWeightUpdater & weightUpdater; // the updater used to make the weight evoluate + + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 + eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. eoRealBoundModifier & bndsModifier; - + VelocityType weight; - eoRng & gen; // the random generator - + eoRng & gen; // the random generator + // If the bound modifier doesn't need to be used, use the dummy instance eoDummyRealBoundModifier dummyModifier; }; #endif /*EOCONSTRICTEDVARIABLEWEIGHTVELOCITY_H*/ - diff --git a/eo/src/eoConstrictedVelocity.h b/eo/src/eoConstrictedVelocity.h index bd68f0425..45f6e03d6 100644 --- a/eo/src/eoConstrictedVelocity.h +++ b/eo/src/eoConstrictedVelocity.h @@ -56,9 +56,9 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology to get the global/local/other best * @param _coeff - The constriction coefficient - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng @@ -82,9 +82,9 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology to get the global/local/other best * @param _coeff - The constriction coefficient - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -106,8 +106,8 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity * @param _topology - The topology to get the global/local/other best * @param _coeff - The constriction coefficient - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoConstrictedVelocity (eoTopology < POT > & _topology, @@ -126,7 +126,7 @@ public: /** * Evaluate the new velocities of the given particle. Need an indice to identify the particle - * into the topology. Steps are : + * into the topology. Steps are : * - evaluate r1 and r2, the customed learning factors * - adjust the size of the bounds (even if dummy) * - modify the bounds with the bounds modifier (use the dummy modifier if there's no modifier provided) @@ -173,20 +173,20 @@ public: topology.updateNeighborhood(_po,_indice); } - //! eoTopology getTopology + //! eoTopology getTopology //! @return topology - eoTopology & getTopology () - { - return topology; - } + eoTopology & getTopology () + { + return topology; + } protected: eoTopology < POT > & topology; - const VelocityType & c1; // learning factor 1 - const VelocityType & c2; // learning factor 2 + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 const VelocityType & coeff; // the fixed constriction coefficient - eoRng & gen; // the random generator + eoRng & gen; // the random generator eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. eoRealBoundModifier & bndsModifier; @@ -197,4 +197,3 @@ protected: #endif /*EOCONSTRICTEDVELOCITY_H */ - diff --git a/eo/src/eoContinue.h b/eo/src/eoContinue.h index 983215129..dbbf24805 100644 --- a/eo/src/eoContinue.h +++ b/eo/src/eoContinue.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoContinue.h // (c) Maarten Keijzer, Geneura Team, 1999, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,7 +31,7 @@ /** @defgroup Continuators Stopping criteria * - * A stopping criterion is called a "continue". This is a functor that is called at each generation end + * A stopping criterion is called a "continue". This is a functor that is called at each generation end * and that return true if one should stop the search. * * @ingroup Utilities @@ -39,13 +39,13 @@ /** Termination condition for the genetic algorithm * Takes the population as input, returns true for continue, - * false for termination + * false for termination * * @ingroup Continuators * @ingroup Core */ template< class EOT> -class eoContinue : public eoUF&, bool>, public eoPersistent +class eoContinue : public eoUF&, bool>, public eoPersistent { public: virtual std::string className(void) const { return "eoContinue"; } @@ -57,7 +57,7 @@ public: (void)__is; /* It should be implemented by subclasses ! */ } - + /** Print on a stream * @param __os ostream to print on */ @@ -68,4 +68,3 @@ public: }; #endif - diff --git a/eo/src/eoCounter.h b/eo/src/eoCounter.h index cb0b57cff..afd7fd2ee 100644 --- a/eo/src/eoCounter.h +++ b/eo/src/eoCounter.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoCounter.h // (c) Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,9 +31,9 @@ #include /** - Generic counter class that counts the number of times - a procedure is used. Add a procedure through its ctor and - use this class instead of it. + Generic counter class that counts the number of times + a procedure is used. Add a procedure through its ctor and + use this class instead of it. It is derived from eoValueParam so you can add it to a monitor. @@ -44,21 +44,21 @@ class eoProcedureCounter : public Procedure, public eoValueParam { public: - eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter") + eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter") : eoValueParam(0, _name), proc(_proc) {} /** Calls the embedded function and increments the counter - + Note for MSVC users, if this code does not compile, you are quite likely trying to count a function that has a non-void return type. Don't look at us, look at the MSVC builders. Code like "return void;" is perfectly legal according to the ANSI standard, but the guys at - Microsoft didn't get to implementing it yet. - + Microsoft didn't get to implementing it yet. + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. Given that in EO most functors return void, it was chosen to support void. - But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite capable of compiling return void; type of code. We'll try to change the signature then. You happy GNU (and other compiler) users will not have a problem with this.. @@ -79,39 +79,39 @@ class eoProcedureCounter : public Procedure, public eoValueParam }; /** - Generic counter class that counts the number of times - a unary function is used. Add a unary function through its ctor and - use this class instead of it. - + Generic counter class that counts the number of times + a unary function is used. Add a unary function through its ctor and + use this class instead of it. + It is derived from eoValueParam so you can add it to a monitor. - Example: suppose you have an eoEvalFunc called myeval, to count the + Example: suppose you have an eoEvalFunc called myeval, to count the number of evaluations, just define: eoUnaryFunctorCounter evalCounter(myeval); - and use evalCounter now instead of myeval. + and use evalCounter now instead of myeval. */ template class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam { public: - eoUnaryFunctorCounter(UnaryFunctor& _func, std::string _name = "uf_counter") + eoUnaryFunctorCounter(UnaryFunctor& _func, std::string _name = "uf_counter") : eoValueParam(0, _name), func(_func) {} - + /** Calls the embedded function and increments the counter - + Note for MSVC users, if this code does not compile, you are quite likely trying to count a function that has a non-void return type. Don't look at us, look at the MSVC builders. Code like "return void;" is perfectly legal according to the ANSI standard, but the guys at - Microsoft didn't get to implementing it yet. - + Microsoft didn't get to implementing it yet. + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. Given that in EO most functors return void, it was chosen to support void. - But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite capable of compiling return void; type of code. We'll try to change the signature then. You happy GNU (and other compiler) users will not have a problem with this. @@ -133,10 +133,10 @@ class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam { public: - eoBinaryFunctorCounter(BinaryFunctor& _func, std::string _name = "proc_counter") + eoBinaryFunctorCounter(BinaryFunctor& _func, std::string _name = "proc_counter") : eoValueParam(0, _name), func(_func) {} /** Calls the embedded function and increments the counter - + Note for MSVC users, if this code does not compile, you are quite likely trying to count a function that has a non-void return type. Don't look at us, look at the MSVC builders. Code like "return void;" is perfectly legal according to the ANSI standard, but the guys at - Microsoft didn't get to implementing it yet. - + Microsoft didn't get to implementing it yet. + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. Given that in EO most functors return void, it was chosen to support void. - But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite capable of compiling return void; type of code. We'll try to change the signature then. - + You happy GNU (and other compiler) users will not have a problem with this. */ typename BinaryFunctor::result_type operator() - (typename BinaryFunctor::first_argument_type _arg1, + (typename BinaryFunctor::first_argument_type _arg1, typename BinaryFunctor::second_argument_type _arg2) { value()++; @@ -185,7 +185,7 @@ class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam), by simply stating: diff --git a/eo/src/eoCtrlCContinue.cpp b/eo/src/eoCtrlCContinue.cpp index 0e04422a5..b7ee7fea3 100644 --- a/eo/src/eoCtrlCContinue.cpp +++ b/eo/src/eoCtrlCContinue.cpp @@ -1,23 +1,23 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoCtrlCContinue.cpp -// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk @@ -26,7 +26,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #include diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 9b1aac0f7..9bbcf9c09 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -1,23 +1,23 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoCtrlCContinue.h -// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk @@ -50,14 +50,14 @@ template< class EOT> class eoCtrlCContinue: public eoContinue { public: - + /// Ctor : installs the signal handler eoCtrlCContinue() { // First checks that no other eoCtrlCContinue does exist if (existCtrlCContinue) throw std::runtime_error("A signal handler for Ctrl C is already defined!\n"); - + #ifndef _WINDOWS #ifdef SIGQUIT signal( SIGINT, signal_handler ); @@ -65,9 +65,9 @@ public: existCtrlCContinue = true; #endif #endif - + } - + /** Returns false when Ctrl C has been typed in * reached */ virtual bool operator() ( const eoPop& _vEO ) @@ -84,4 +84,3 @@ public: #endif /** @} */ - diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index 2ad6cde05..4a0858b6a 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoDetSelect.h + eoDetSelect.h (c) Marc Schoenauer, Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -48,7 +48,7 @@ class eoDetSelect : public eoSelect /** @param _source the source population - @param _dest the resulting population (size of this population is + @param _dest the resulting population (size of this population is given by the HowMany data It empties the destination and adds the selection into it) */ @@ -58,32 +58,32 @@ class eoDetSelect : public eoSelect size_t target = howMany(pSize); if ( target == 0 ) - { - eo::log << eo::warnings << "Call to a eoHowMany instance returns 0 (target=" << target << ") it will be replaced by 1 to continue." << std::endl; - target = 1; - } + { + eo::log << eo::warnings << "Call to a eoHowMany instance returns 0 (target=" << target << ") it will be replaced by 1 to continue." << std::endl; + target = 1; + } _dest.resize(target); unsigned remain = target % pSize; unsigned entireCopy = target / pSize; typename eoPop::iterator it = _dest.begin(); - + if (target >= pSize) { - for (unsigned i=0; i // +#include // #include // accumulate #include @@ -37,7 +37,7 @@ #include /** eoDetTournamentSelect: a selection method that selects ONE individual by - deterministic tournament + deterministic tournament -MS- 24/10/99 @ingroup Selectors @@ -45,7 +45,7 @@ template class eoDetTournamentSelect: public eoSelectOne { public: - /* (Default) Constructor - + /* (Default) Constructor - @param _tSize tournament size */ eoDetTournamentSelect(unsigned _tSize = 2 ):eoSelectOne(), tSize(_tSize) { @@ -55,15 +55,15 @@ template class eoDetTournamentSelect: public eoSelectOne tSize = 2; } } - - /* Perform deterministic tournament calling the appropriate fn + + /* Perform deterministic tournament calling the appropriate fn see selectors.h */ - virtual const EOT& operator()(const eoPop& _pop) + virtual const EOT& operator()(const eoPop& _pop) { return deterministic_tournament(_pop, tSize); } - + private: unsigned tSize; }; @@ -71,4 +71,3 @@ template class eoDetTournamentSelect: public eoSelectOne //----------------------------------------------------------------------------- #endif - diff --git a/eo/src/eoDistribUpdater.h b/eo/src/eoDistribUpdater.h index 6166e7333..79b22814a 100644 --- a/eo/src/eoDistribUpdater.h +++ b/eo/src/eoDistribUpdater.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoDistribUpdater.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -32,7 +32,7 @@ #include /** - * Base class for Distribution Evolution Algorithms within EO: + * Base class for Distribution Evolution Algorithms within EO: * the update rule of distribution * * It takes one distribution and updates it according to one population @@ -40,7 +40,7 @@ * @ingroup Core */ template -class eoDistribUpdater : +class eoDistribUpdater : public eoBF &, eoPop &, void> { public: diff --git a/eo/src/eoDistribution.h b/eo/src/eoDistribution.h index 1f38ab949..6ca90fe42 100644 --- a/eo/src/eoDistribution.h +++ b/eo/src/eoDistribution.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoDistribution.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -44,8 +44,8 @@ */ template -class eoDistribution : public eoInit, - public eoPersistent, public eoObject +class eoDistribution : public eoInit, + public eoPersistent, public eoObject { public: virtual void operator()(EOT &) = 0; // DO NOT FORGET TO INVALIDATE the EOT diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 4cd34c6ad..4803361fe 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -4,7 +4,7 @@ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; version 2 + License as published by the Free Software Foundation; version 2 of the License. This library is distributed in the hope that it will be useful, @@ -40,7 +40,7 @@ Authors: //! A fitness class that permits to compare feasible and unfeasible individuals and guaranties that a feasible individual will always be better than an unfeasible one. /** - * Use this class as fitness if you have some kind of individuals + * Use this class as fitness if you have some kind of individuals * that must be always considered as better than others while having the same fitness type. * * Wraps a scalar fitness _values such as a double or int, with the option of @@ -52,7 +52,7 @@ Authors: * * When changing the fitness, you can use: * individual.fitness( std::make_pair( fitness, feasibility ) ); - * + * * Be aware that, when printing or reading an eDualFitness instance on a iostream, * friend IO classes use a space separator. * @@ -80,19 +80,19 @@ public: /*! * Unfeasible by default */ - eoDualFitness() : - _value(), - _is_feasible(false) + eoDualFitness() : + _value(), + _is_feasible(false) {} //! Copy constructor eoDualFitness(const eoDualFitness& other) : _value(other._value), - _is_feasible(other._is_feasible) + _is_feasible(other._is_feasible) {} //! Constructor from explicit value/feasibility - eoDualFitness(const BaseType& v, const bool& is_feasible) : + eoDualFitness(const BaseType& v, const bool& is_feasible) : _value(v), _is_feasible(is_feasible) {} @@ -118,15 +118,15 @@ public: { _value = v.first; _is_feasible = v.second; - return *this; + return *this; } - + //! Copy operator from another eoDualFitness template eoDualFitness & operator=(const eoDualFitness& other ) { if (this != &other) { - this->_value = other._value; + this->_value = other._value; this->_is_feasible = other._is_feasible; } return *this; @@ -135,12 +135,12 @@ public: //! Comparison that separate feasible individuals from unfeasible ones. Feasible are always better /*! - * Use less as a default comparison operator + * Use less as a default comparison operator * (see the "Compare" template of the class to change this behaviour, * @see eoMinimizingDualFitness for an example). */ bool operator<(const eoDualFitness& other) const - { + { // am I better (less, by default) than the other ? // if I'm feasible and the other is not @@ -152,7 +152,7 @@ public: // yes, a feasible fitness is always better than an unfeasible one return true; - } else { + } else { // the two fitness are of the same type // lets rely on the comparator return Compare()(_value, other._value); @@ -168,7 +168,7 @@ public: //! Greater or equal: if the other is not greater than me bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } - + public: //! Add a given fitness to the current one @@ -199,7 +199,7 @@ public: // Add this fitness's value to that other, and return a _new_ instance with the result. template - eoDualFitness operator+(const eoDualFitness & that) + eoDualFitness operator+(const eoDualFitness & that) { eoDualFitness from( *this ); return from += that; @@ -207,7 +207,7 @@ public: // Add this fitness's value to that other, and return a _new_ instance with the result. template - eoDualFitness operator-(const eoDualFitness & that) + eoDualFitness operator-(const eoDualFitness & that) { eoDualFitness from( *this ); return from -= that; @@ -224,7 +224,7 @@ public: //! Read an eoDualFitness instance as a pair of numbers, separated by a space template - friend + friend std::istream& operator>>(std::istream& is, eoDualFitness& f) { F value; @@ -265,11 +265,11 @@ public: // eoDualStatSwitch( eoStat & stat_feasible, eoStat & stat_unfeasible, std::string sep=" " ) : eoDualStatSwitch( EOSTAT & stat_feasible, EOSTAT & stat_unfeasible, std::string sep=" " ) : eoStat( - "?"+sep+"?", - stat_feasible.longName()+sep+stat_unfeasible.longName() - ), - _stat_feasible(stat_feasible), - _stat_unfeasible(stat_unfeasible), + "?"+sep+"?", + stat_feasible.longName()+sep+stat_unfeasible.longName() + ), + _stat_feasible(stat_feasible), + _stat_unfeasible(stat_unfeasible), _sep(sep) { } @@ -277,7 +277,7 @@ public: { eoPop pop_feasible; pop_feasible.reserve(pop.size()); - + eoPop pop_unfeasible; pop_unfeasible.reserve(pop.size()); @@ -296,7 +296,7 @@ public: _stat_feasible( pop_feasible ); _stat_unfeasible( pop_unfeasible ); - + std::ostringstream out; out << _stat_feasible.value() << _sep << _stat_unfeasible.value(); @@ -311,7 +311,6 @@ protected: std::string _sep; }; - + /** @} */ #endif // _eoDualFitness_h_ - diff --git a/eo/src/eoEDA.h b/eo/src/eoEDA.h index 896c5a97b..553b751f3 100644 --- a/eo/src/eoEDA.h +++ b/eo/src/eoEDA.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoEDA.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,8 +30,8 @@ #include -/** The abstract class for estimation of disribution algorithms. - * This design evolve a probability distribution +/** The abstract class for estimation of disribution algorithms. + * This design evolve a probability distribution * on the spaces of populations rather than a population * * It IS NOT an eoAlgo, as it evolves a distribution, not a population. @@ -44,4 +44,3 @@ template class eoEDA: public eoUF&, void> }; #endif - diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 2ca8d37e3..eb7739699 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -97,7 +97,7 @@ template class eoEasyEA: public eoAlgo mergeReduce(dummyMerge, dummyReduce), replace(_replace) { - offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. + offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. } /* @@ -135,8 +135,8 @@ template class eoEasyEA: public eoAlgo {} - /// Ctor eoSelect, eoTransform, eoReplacement and an eoPopEval - eoEasyEA( + /// Ctor eoSelect, eoTransform, eoReplacement and an eoPopEval + eoEasyEA( eoContinue& _continuator, eoPopEvalFunc& _eval, eoSelect& _select, @@ -185,7 +185,7 @@ template class eoEasyEA: public eoAlgo mergeReduce(dummyMerge, dummyReduce), replace(_replace) {} - + /// Ctor eoSelect, eoTransform, eoMerge and eoReduce. eoEasyEA( eoContinue& _continuator, @@ -291,7 +291,7 @@ template class eoEasyEA: public eoAlgo eoMergeReduce mergeReduce; eoReplacement& replace; - eoPop offspring; + eoPop offspring; // Friend classes friend class eoIslandsEasyEA ; @@ -303,4 +303,3 @@ Example of a test program building an EA algorithm. */ #endif - diff --git a/eo/src/eoEasyPSO.h b/eo/src/eoEasyPSO.h index bcfc891a5..da071bc02 100644 --- a/eo/src/eoEasyPSO.h +++ b/eo/src/eoEasyPSO.h @@ -32,16 +32,16 @@ #include //----------------------------------------------------------------------------- -/** An easy-to-use particle swarm algorithm. -* Use any particle, any flight, any topology... +/** An easy-to-use particle swarm algorithm. +* Use any particle, any flight, any topology... * * The main steps are : -* (The population is expected to be already evaluated) -* - for each generation and each particle pi -* - evaluate the velocities -* -- perform the fligth of pi -* -- evaluate pi -* -- update the neighborhoods +* (The population is expected to be already evaluated) +* - for each generation and each particle pi +* - evaluate the velocities +* -- perform the fligth of pi +* -- evaluate pi +* -- update the neighborhoods * * @ingroup Algorithms */ @@ -54,7 +54,7 @@ public: * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system * @param _eval - An eoEvalFunc: the evaluation performer * @param _velocity - An eoVelocity that defines how to compute the velocities - * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * @param _flight - An eoFlight that defines how to make the particle flying: that means how * to modify the positions according to the velocities */ eoEasyPSO ( @@ -90,11 +90,11 @@ public: {} - /* Constructor without eoInitializerBase. Assume the initialization is done before running the algorithm + /* Constructor without eoInitializerBase. Assume the initialization is done before running the algorithm * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system * @param _eval - An eoEvalFunc: the evaluation performer * @param _velocity - An eoVelocity that defines how to compute the velocities - * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * @param _flight - An eoFlight that defines how to make the particle flying: that means how * to modify the positions according to the velocities */ eoEasyPSO ( @@ -125,7 +125,7 @@ public: velocity (_velocity), flight (dummyFlight) {} - + /// Apply a few iteration of flight to the population (=swarm). virtual void operator () (eoPop < POT > &_pop) { @@ -171,22 +171,22 @@ protected: eoVelocity < POT > &velocity; eoFlight < POT > &flight; - // if the flight does not need to be used, use the dummy flight instance - class eoDummyFlight:public eoFlight < POT > - { - public: - eoDummyFlight () {} - void operator () (POT & _po) {} - }dummyFlight; - - // if the initializer does not need to be used, use the dummy one instead - class eoDummyInitializer:public eoInitializerBase < POT > - { - public: - eoDummyInitializer () {} - void operator () (POT & _po) {} - }dummyInit; - + // if the flight does not need to be used, use the dummy flight instance + class eoDummyFlight:public eoFlight < POT > + { + public: + eoDummyFlight () {} + void operator () (POT & _po) {} + }dummyFlight; + + // if the initializer does not need to be used, use the dummy one instead + class eoDummyInitializer:public eoInitializerBase < POT > + { + public: + eoDummyInitializer () {} + void operator () (POT & _po) {} + }dummyInit; + }; /** * @example t-eoEasyPSO.cpp diff --git a/eo/src/eoEvalContinue.h b/eo/src/eoEvalContinue.h index 05ac2f0a2..ef74e0758 100644 --- a/eo/src/eoEvalContinue.h +++ b/eo/src/eoEvalContinue.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoEvalContinue.h // (c) GeNeura Team, 1999, Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -29,7 +29,7 @@ #include #include -/** +/** * Continues until a number of evaluations has been made * * @ingroup Continuators @@ -38,28 +38,28 @@ template< class EOT> class eoEvalContinue: public eoContinue { public: - /// Ctor + /// Ctor eoEvalContinue( eoEvalFuncCounter & _eval, unsigned long _totalEval) - : eval(_eval), repTotalEvaluations( _totalEval ) {}; - + : eval(_eval), repTotalEvaluations( _totalEval ) {}; + /** Returns false when a certain number of evaluations has been done */ virtual bool operator() ( const eoPop& _vEO ) { (void)_vEO; - if (eval.value() >= repTotalEvaluations) + if (eval.value() >= repTotalEvaluations) { eo::log << eo::progress << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]" << std::endl; - return false; + return false; } return true; } - + /** Returns the number of generations to reach*/ - virtual unsigned long totalEvaluations( ) - { - return repTotalEvaluations; + virtual unsigned long totalEvaluations( ) + { + return repTotalEvaluations; }; - + virtual std::string className(void) const { return "eoEvalContinue"; } private: eoEvalFuncCounter & eval; diff --git a/eo/src/eoEvalCounterThrowException.h b/eo/src/eoEvalCounterThrowException.h index 133d3afb8..4eb4fccc4 100644 --- a/eo/src/eoEvalCounterThrowException.h +++ b/eo/src/eoEvalCounterThrowException.h @@ -1,4 +1,4 @@ -/* +/* (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ Contact: http://eodev.sourceforge.net -Authors: +Authors: Johann DrĂ©o Caner Candan @@ -49,7 +49,7 @@ class eoEvalCounterThrowException : public eoEvalFuncCounter< EOT > { public : eoEvalCounterThrowException( eoEvalFunc& func, unsigned long max_evals, std::string name = "Eval. ") - : eoEvalFuncCounter< EOT >( func, name ), _threshold( max_evals ) + : eoEvalFuncCounter< EOT >( func, name ), _threshold( max_evals ) {} using eoEvalFuncCounter< EOT >::value; @@ -60,8 +60,8 @@ public : // bypass already evaluated individuals if (eo.invalid()) { - // increment the value of the self parameter - // (eoEvalFuncCounter inherits from @see eoValueParam) + // increment the value of the self parameter + // (eoEvalFuncCounter inherits from @see eoValueParam) value()++; // if we have reached the maximum @@ -84,4 +84,3 @@ private : }; #endif // __eoEvalCounterThrowException_h__ - diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 275c5185b..b05b667b2 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoEvalFunc.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -37,8 +37,8 @@ The requirements on the types with which this class is to be instantiated with are null, or else, they depend on the particular - class it's going to be applied to; EO does not impose any requirement - on it. If you subclass this abstract class, and use it to evaluate an + class it's going to be applied to; EO does not impose any requirement + on it. If you subclass this abstract class, and use it to evaluate an EO, the requirements on this EO will depend on the evaluator. @ingroup Evaluation @@ -49,7 +49,7 @@ template class eoEvalFunc : public eoUF public : typedef EOT EOType; - typedef typename EOT::Fitness EOFitT; + typedef typename EOT::Fitness EOFitT; }; #endif diff --git a/eo/src/eoEvalFuncCounter.h b/eo/src/eoEvalFuncCounter.h index 55973d068..a63821d61 100644 --- a/eo/src/eoEvalFuncCounter.h +++ b/eo/src/eoEvalFuncCounter.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoEvalFuncCounter.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,7 +30,7 @@ #include #include -/** +/** Counts the number of evaluations actually performed. @ingroup Evaluation @@ -38,7 +38,7 @@ Counts the number of evaluations actually performed. template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam { public : - eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") + eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") : eoValueParam(0, _name), func(_func) {} virtual void operator()(EOT& _eo) diff --git a/eo/src/eoEvalFuncCounterBounder.h b/eo/src/eoEvalFuncCounterBounder.h index 68c9770cc..1c8a29b15 100644 --- a/eo/src/eoEvalFuncCounterBounder.h +++ b/eo/src/eoEvalFuncCounterBounder.h @@ -8,7 +8,7 @@ * @{ */ -/** The exception raised by eoEvalFuncCounterBounder +/** The exception raised by eoEvalFuncCounterBounder * when the maximum number of allowed evaluations is reached. */ class eoEvalFuncCounterBounderException : public std::exception @@ -18,9 +18,9 @@ public: const char* what() const throw() { - std::ostringstream ss; - ss << "STOP in eoEvalFuncCounterBounderException: the maximum number of evaluation has been reached (" << _threshold << ")."; - return ss.str().c_str(); + std::ostringstream ss; + ss << "STOP in eoEvalFuncCounterBounderException: the maximum number of evaluation has been reached (" << _threshold << ")."; + return ss.str().c_str(); } private: @@ -31,7 +31,7 @@ private: * when the maximum number of allowed evaluations is reached. * * This eval counter permits to stop a search during a generation, without waiting for a continue to be - * checked at the end of the loop. Useful if you have 10 individuals and 10 generations, + * checked at the end of the loop. Useful if you have 10 individuals and 10 generations, * but want to stop after 95 evaluations. */ template < typename EOT > @@ -39,21 +39,21 @@ class eoEvalFuncCounterBounder : public eoEvalFuncCounter< EOT > { public : eoEvalFuncCounterBounder(eoEvalFunc& func, unsigned long threshold, std::string name = "Eval. ") - : eoEvalFuncCounter< EOT >( func, name ), _threshold( threshold ) + : eoEvalFuncCounter< EOT >( func, name ), _threshold( threshold ) {} using eoEvalFuncCounter< EOT >::value; virtual void operator()(EOT& eo) { - if (eo.invalid()) + if (eo.invalid()) { value()++; - if (_threshold > 0 && value() >= _threshold) - { - throw eoEvalFuncCounterBounderException(_threshold); - } + if (_threshold > 0 && value() >= _threshold) + { + throw eoEvalFuncCounterBounderException(_threshold); + } func(eo); } diff --git a/eo/src/eoEvalFuncPtr.h b/eo/src/eoEvalFuncPtr.h index d493b9b04..f4952c212 100644 --- a/eo/src/eoEvalFuncPtr.h +++ b/eo/src/eoEvalFuncPtr.h @@ -6,7 +6,7 @@ evaluation object (c) GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -52,17 +52,16 @@ struct eoEvalFuncPtr: public eoEvalFunc { */ eoEvalFuncPtr( FitT (* _eval)( FunctionArg ) ) : eoEvalFunc(), evalFunc( _eval ) {}; - - /// Effectively applies the evaluation function to an EO - virtual void operator() ( EOT & _eo ) + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) { if (_eo.invalid()) _eo.fitness((*evalFunc)( _eo )); }; - + private: FitT (* evalFunc )( FunctionArg ); }; #endif - diff --git a/eo/src/eoEvalTimeThrowException.h b/eo/src/eoEvalTimeThrowException.h index 752fafba0..be0e149a2 100644 --- a/eo/src/eoEvalTimeThrowException.h +++ b/eo/src/eoEvalTimeThrowException.h @@ -1,4 +1,4 @@ -/* +/* (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ Contact: http://eodev.sourceforge.net -Authors: +Authors: Johann DrĂ©o */ diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index c237c09b4..5d1f4c8a0 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -1,4 +1,4 @@ -/* +/* (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ Contact: http://eodev.sourceforge.net -Authors: +Authors: Johann DrĂ©o */ diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index 9760efc61..3b888436f 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -1,4 +1,4 @@ -/* +/* (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ Contact: http://eodev.sourceforge.net -Authors: +Authors: Johann DrĂ©o */ diff --git a/eo/src/eoExtendedVelocity.h b/eo/src/eoExtendedVelocity.h index 5aec4c216..e7667204c 100644 --- a/eo/src/eoExtendedVelocity.h +++ b/eo/src/eoExtendedVelocity.h @@ -35,7 +35,7 @@ //----------------------------------------------------------------------------- -/** Extended velocity performer for particle swarm optimization. +/** Extended velocity performer for particle swarm optimization. * * Derivated from abstract eoVelocity, * At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) @@ -57,16 +57,16 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology * @param _w - The weight factor. - * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType * @param _c2 - Learning factor used for the local best - * @param _c3 - Learning factor used for the global best - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c3 - Learning factor used for the global best + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoExtendedVelocity (eoTopology < POT > & _topology, - const VelocityType & _w, + const VelocityType & _w, const VelocityType & _c1, const VelocityType & _c2, const VelocityType & _c3, @@ -86,10 +86,10 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology * @param _w - The weight factor. - * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType + * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType * @param _c3 - Learning factor used for the global best - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -113,8 +113,8 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity * @param _topology - The topology * @param _w - The weight factor. - * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType + * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType * @param _c3 - Learning factor used for the global best * @param _gen - The eo random generator, default=rng */ @@ -145,25 +145,25 @@ public: { VelocityType r1; VelocityType r2; - VelocityType r3; - + VelocityType r3; + VelocityType newVelocity; // cast the learning factors to VelocityType r1 = (VelocityType) rng.uniform (1) * c1; r2 = (VelocityType) rng.uniform (1) * c2; - r3 = (VelocityType) rng.uniform (1) * c3; - + r3 = (VelocityType) rng.uniform (1) * c3; + // need to resize the bounds even if there are dummy because of "isBounded" call bounds.adjust_size(_po.size()); // assign the new velocities for (unsigned j = 0; j < _po.size (); j++) { - newVelocity= omega * _po.velocities[j] - + r1 * (_po.bestPositions[j] - _po[j]) - + r2 * (topology.best (_indice)[j] - _po[j]) - + r3 * (topology.globalBest()[j] - _po[j]); + newVelocity= omega * _po.velocities[j] + + r1 * (_po.bestPositions[j] - _po[j]) + + r2 * (topology.best (_indice)[j] - _po[j]) + + r3 * (topology.globalBest()[j] - _po[j]); /* check bounds */ if (bounds.isMinBounded(j)) @@ -182,27 +182,27 @@ public: { topology.updateNeighborhood(_po,_indice); } - + //! eoTopology getTopology //! @return topology - eoTopology & getTopology () - { - return topology; - } + eoTopology & getTopology () + { + return topology; + } protected: eoTopology < POT > & topology; - const VelocityType & omega; // social/cognitive coefficient + const VelocityType & omega; // social/cognitive coefficient const VelocityType & c1; - const VelocityType & c2; // social/cognitive coefficient - const VelocityType & c3; // social/cognitive coefficient - - eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. - eoRealBoundModifier & bndsModifier; + const VelocityType & c2; // social/cognitive coefficient + const VelocityType & c3; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator - eoRng & gen; // the random generator - // If the bound modifier doesn't need to be used, use the dummy instance eoDummyRealBoundModifier dummyModifier; }; @@ -211,4 +211,3 @@ protected: * Example of a test program using this class: */ #endif /*eoExtendedVelocity_H */ - diff --git a/eo/src/eoFactory.h b/eo/src/eoFactory.h index 7e02d1245..73a8faf1b 100644 --- a/eo/src/eoFactory.h +++ b/eo/src/eoFactory.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFactory.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -43,32 +43,32 @@ have to be modified */ template class eoFactory: public eoObject { - + public: - - /// @name ctors and dtors - //{@ - /// constructor - eoFactory( ) {} - - /// destructor - virtual ~eoFactory() {} - //@} - /** Another factory methods: creates an object from an std::istream, reading from - it whatever is needed to create the object. Usually, the format for the std::istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - */ - virtual EOClass* make(std::istream& _is) = 0; + /// @name ctors and dtors + //{@ + /// constructor + eoFactory( ) {} - ///@name eoObject methods - //@{ - /** Return the class id */ - virtual std::string className() const { return "eoFactory"; } + /// destructor + virtual ~eoFactory() {} + //@} + + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual EOClass* make(std::istream& _is) = 0; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual std::string className() const { return "eoFactory"; } + + /** Read and print are left without implementation */ + //@} - /** Read and print are left without implementation */ - //@} - }; diff --git a/eo/src/eoFitContinue.h b/eo/src/eoFitContinue.h index 964014516..2db88f80b 100644 --- a/eo/src/eoFitContinue.h +++ b/eo/src/eoFitContinue.h @@ -49,15 +49,15 @@ public: /** Returns false when a fitness criterium is reached. Assumes pop is not sorted! */ virtual bool operator() ( const eoPop& _pop ) { - //FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); - FitnessType bestCurrentFitness = _pop.best_element().fitness(); - if (bestCurrentFitness >= optimum) - { - eo::log << eo::logging << "STOP in eoFitContinue: Best fitness has reached " << - bestCurrentFitness << "\n"; - return false; - } - return true; + //FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); + FitnessType bestCurrentFitness = _pop.best_element().fitness(); + if (bestCurrentFitness >= optimum) + { + eo::log << eo::logging << "STOP in eoFitContinue: Best fitness has reached " << + bestCurrentFitness << "\n"; + return false; + } + return true; } virtual std::string className(void) const { return "eoFitContinue"; } diff --git a/eo/src/eoFitnessScalingSelect.h b/eo/src/eoFitnessScalingSelect.h index 7ea61607f..c17532019 100644 --- a/eo/src/eoFitnessScalingSelect.h +++ b/eo/src/eoFitnessScalingSelect.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFitnessScalingSelect.h // (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -32,25 +32,24 @@ #include #include -/** eoFitnessScalingSelect: select an individual proportional to the +/** eoFitnessScalingSelect: select an individual proportional to the * linearly scaled fitness that is computed by the private * eoLinearFitScaling object * * @ingroup Selectors */ -template -class eoFitnessScalingSelect: public eoRouletteWorthSelect +template +class eoFitnessScalingSelect: public eoRouletteWorthSelect { public: /** Ctor: * @param _p the selective pressure, should be in [1,2] (2 is the default) */ - eoFitnessScalingSelect(double _p = 2.0): + eoFitnessScalingSelect(double _p = 2.0): eoRouletteWorthSelect(scaling), scaling(_p) {} private : - eoLinearFitScaling scaling; // derived from eoPerf2Worth + eoLinearFitScaling scaling; // derived from eoPerf2Worth }; -#endif - +#endif diff --git a/eo/src/eoFixedInertiaWeightedVelocity.h b/eo/src/eoFixedInertiaWeightedVelocity.h index b19d36a9c..291c85a09 100644 --- a/eo/src/eoFixedInertiaWeightedVelocity.h +++ b/eo/src/eoFixedInertiaWeightedVelocity.h @@ -54,9 +54,9 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology to get the global/local/other best * @param _weight - The weight with type VelocityType - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng @@ -80,9 +80,9 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology to get the global/local/other best * @param _weight - The weight with type VelocityType - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -104,8 +104,8 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity * @param _topology - The topology to get the global/local/other best * @param _weight - The weight with type VelocityType - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoFixedInertiaWeightedVelocity (eoTopology < POT > & _topology, @@ -124,7 +124,7 @@ public: /** * Evaluate the new velocities of the given particle. Need an indice to identify the particle - * into the topology. Steps are : + * into the topology. Steps are : * - evaluate r1 and r2, the customed learning factors * - adjust the size of the bounds (even if dummy) * - modify the bounds with the bounds modifier (use the dummy modifier if there's no modifier provided) @@ -175,10 +175,10 @@ public: protected: eoTopology < POT > & topology; - const VelocityType & c1; // learning factor 1 - const VelocityType & c2; // learning factor 2 + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 const VelocityType & weight; // the fixed weight - eoRng & gen; // the random generator + eoRng & gen; // the random generator eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. eoRealBoundModifier & bndsModifier; @@ -189,4 +189,3 @@ protected: #endif /*EOFIXEDINERTIAWEIGHTEDVELOCITY_H */ - diff --git a/eo/src/eoFlOrBinOp.h b/eo/src/eoFlOrBinOp.h index dd1ff6179..bcdc9c5c1 100644 --- a/eo/src/eoFlOrBinOp.h +++ b/eo/src/eoFlOrBinOp.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFlOrBinOp.h // (c) Marc Schoenauer - Maarten Keijzer 2000-2003 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,11 +35,11 @@ /** Generic eoBinOps on fixed length genotypes. * Contains exchange crossovers (1pt and uniform) - * and crossovers that applies an Atom crossover + * and crossovers that applies an Atom crossover * to all components with given rate, or * to a fixed prescribed nb of components * - * Example: the standard bitstring 1-point and uniform crossovers + * Example: the standard bitstring 1-point and uniform crossovers * could be implemented as resp. eoFlOr1ptBinOp and eoFlOrUniformBinOp */ @@ -65,14 +65,14 @@ public : { if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool changed = false; for ( unsigned i = 0; i < _eo1.size(); i++ ) { if ( rng.flip( rate ) ) { - bool changedHere = op( _eo1[i], _eo2[i] ); - changed |= changedHere; + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; } } return changed; @@ -108,16 +108,16 @@ public : { if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool changed = false; for ( unsigned i = 0; i < k; i++ ) //! @todo check that we don't do twice the same { - unsigned where = eo::rng.random(_eo1.size()); - bool changedHere = op( _eo1[where], _eo2[where] ); - changed |= changedHere; + unsigned where = eo::rng.random(_eo1.size()); + bool changedHere = op( _eo1[where], _eo2[where] ); + changed |= changedHere; } return changed; } @@ -154,17 +154,17 @@ public : Atom tmp; if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool hasChanged = false; for (unsigned i=0; i<_eo1.size(); i++) { - if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) - { - _eo1[i] = _eo2[i]; - hasChanged = true; - } + if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) + { + _eo1[i] = _eo2[i]; + hasChanged = true; + } } return hasChanged; } @@ -198,18 +198,18 @@ public : Atom tmp; if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool hasChanged = false; unsigned where = eo::rng.random(_eo1.size()-1); for (unsigned i=where+1; i<_eo1.size(); i++) { - if ( (_eo1[i]!=_eo2[i]) ) - { - _eo1[i] = _eo2[i]; - hasChanged = true; - } + if ( (_eo1[i]!=_eo2[i]) ) + { + _eo1[i] = _eo2[i]; + hasChanged = true; + } } return hasChanged; } diff --git a/eo/src/eoFlOrMonOp.h b/eo/src/eoFlOrMonOp.h index 102acc11c..63dae9cba 100644 --- a/eo/src/eoFlOrMonOp.h +++ b/eo/src/eoFlOrMonOp.h @@ -39,7 +39,7 @@ * eoFlOrAllMutation applies the atom mutation to all components with given rate * eoFlOrKMutation applies the atom mutation to a fixed nb of components * - * Remark: the standard bit-flip mutation is an eoFlOrAllMutation + * Remark: the standard bit-flip mutation is an eoFlOrAllMutation * with atom mutation == bitflipping */ @@ -62,21 +62,21 @@ public : bool modified=false; for (unsigned i=0; i<_eo.size(); i++) if (eo::rng.flip(rate)) - if (atomMutation(_eo[i])) - modified = true; + if (atomMutation(_eo[i])) + modified = true; return modified; } /** inherited className() */ - virtual std::string className() const - { + virtual std::string className() const + { return "eoFlOrAllMutation(" + atomMutation.className() + ")"; } private: eoMonOp & atomMutation; // the atom mutation - double rate; // the mutation rate PER ATOM + double rate; // the mutation rate PER ATOM }; /** Applies an atomic mutation to a fixed @@ -100,21 +100,21 @@ public : bool modified=false; for (unsigned k=0; k & atomMutation; // the atom mutation }; diff --git a/eo/src/eoFlOrQuadOp.h b/eo/src/eoFlOrQuadOp.h index f9c0373c2..91618aa53 100644 --- a/eo/src/eoFlOrQuadOp.h +++ b/eo/src/eoFlOrQuadOp.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFlOrQuadOp.h // (c) Marc Schoenauer - Maarten Keijzer 2000-2003 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,7 +35,7 @@ /** Generic eoQuadOps on fixed length genotypes. * Contains exchange crossovers (1pt and uniform) - * and crossovers that applies an Atom crossover + * and crossovers that applies an Atom crossover * to all components with given rate, or * to a fixed prescribed nb of components */ @@ -63,8 +63,8 @@ public : bool changed = false; for ( unsigned i = 0; i < _eo1.size(); i++ ) { if ( rng.flip( rate ) ) { - bool changedHere = op( _eo1[i], _eo2[i] ); - changed |= changedHere; + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; } } return changed; @@ -100,16 +100,16 @@ public : { if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool changed = false; for ( unsigned i = 0; i < k; i++ ) //! @todo check that we don't do twice the same { - unsigned where = eo::rng.random(_eo1.size()); - bool changedHere = op( _eo1[where], _eo2[where] ); - changed |= changedHere; + unsigned where = eo::rng.random(_eo1.size()); + bool changedHere = op( _eo1[where], _eo2[where] ); + changed |= changedHere; } return changed; } @@ -145,19 +145,19 @@ public : Atom tmp; if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool hasChanged = false; for (unsigned i=0; i<_eo1.size(); i++) { - if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) - { - tmp = _eo1[i]; - _eo1[i] = _eo2[i]; - _eo2[i] = tmp; - hasChanged = true; - } + if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) + { + tmp = _eo1[i]; + _eo1[i] = _eo2[i]; + _eo2[i] = tmp; + hasChanged = true; + } } return hasChanged; } @@ -190,20 +190,20 @@ public : Atom tmp; if (_eo1.size() != _eo2.size()) { - string s = "Operand size don't match in " + className(); - throw runtime_error(s); + string s = "Operand size don't match in " + className(); + throw runtime_error(s); } bool hasChanged = false; unsigned where = eo::rng.random(_eo1.size()-1); for (unsigned i=where+1; i<_eo1.size(); i++) { - if ( (_eo1[i]!=_eo2[i]) ) - { - tmp = _eo1[i]; - _eo1[i] = _eo2[i]; - _eo2[i] = tmp; - hasChanged = true; - } + if ( (_eo1[i]!=_eo2[i]) ) + { + tmp = _eo1[i]; + _eo1[i] = _eo2[i]; + _eo2[i] = tmp; + hasChanged = true; + } } return hasChanged; } diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index e782328a3..465f0bc46 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoFunctor.h // (c) Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -20,7 +20,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es mak@dhi.dk - CVS Info: $Date: 2004-12-01 09:22:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.7 2004-12-01 09:22:48 evomarc Exp $ $Author: evomarc $ + CVS Info: $Date: 2004-12-01 09:22:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.7 2004-12-01 09:22:48 evomarc Exp $ $Author: evomarc $ */ //----------------------------------------------------------------------------- @@ -87,12 +87,12 @@ public : /// tag to identify a procedure in compile time function selection @see functor_category static eoFunctorBase::procedure_tag functor_category() { - return eoFunctorBase::procedure_tag(); + return eoFunctorBase::procedure_tag(); } }; /** - Overloaded function that can help in the compile time detection + Overloaded function that can help in the compile time detection of the type of functor we are dealing with @see eoCounter, make_counter @@ -103,8 +103,8 @@ eoFunctorBase::procedure_tag functor_category(const eoF&) return eoFunctorBase::procedure_tag(); } -/** - Basic Unary Functor. Derive from this class when defining +/** + Basic Unary Functor. Derive from this class when defining any unary function. First template argument is the first_argument_type, second result_type. Argument and result types can be any type including void for @@ -124,12 +124,12 @@ public : /// tag to identify a procedure in compile time function selection @see functor_category static eoFunctorBase::unary_function_tag functor_category() { - return eoFunctorBase::unary_function_tag(); + return eoFunctorBase::unary_function_tag(); } }; /** - Overloaded function that can help in the compile time detection + Overloaded function that can help in the compile time detection of the type of functor we are dealing with @see eoCounter, make_counter */ @@ -140,8 +140,8 @@ eoFunctorBase::unary_function_tag functor_category(const eoUF&) } -/** - Basic Binary Functor. Derive from this class when defining +/** + Basic Binary Functor. Derive from this class when defining any binary function. First template argument is result_type, second is first_argument_type, third is second_argument_type. Argument and result types can be any type including void for @@ -153,7 +153,7 @@ class eoBF : public eoFunctorBase, public std::binary_function public : /// virtual dtor here so there is no need to define it in derived classes virtual ~eoBF() {} - + //typedef R result_type; //typedef A1 first_argument_type; //typedef A2 second_argument_type; @@ -164,12 +164,12 @@ public : /// tag to identify a procedure in compile time function selection @see functor_category static eoFunctorBase::binary_function_tag functor_category() { - return eoFunctorBase::binary_function_tag(); + return eoFunctorBase::binary_function_tag(); } }; /** - Overloaded function that can help in the compile time detection + Overloaded function that can help in the compile time detection of the type of functor we are dealing with @see eoCounter, make_counter */ diff --git a/eo/src/eoG3Replacement.h b/eo/src/eoG3Replacement.h index aab7866fe..a235244f8 100644 --- a/eo/src/eoG3Replacement.h +++ b/eo/src/eoG3Replacement.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoG3Replacement.h + eoG3Replacement.h (c) Maarten Keijzer, Marc Schoenauer, 2002 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -52,34 +52,34 @@ class eoG3Replacement : public eoReplacement public: eoG3Replacement(eoHowMany _howManyEliminatedParents = eoHowMany(2, false)) : // split truncates the parents and returns eliminated parents - split(_howManyEliminatedParents, true), + split(_howManyEliminatedParents, true), // reduce truncates the offpsring and does not return eliminated guys - reduce(-_howManyEliminatedParents, false) + reduce(-_howManyEliminatedParents, false) {} - + void operator()(eoPop & _parents, eoPop & _offspring) { eoPop temp; split(_parents, temp); unsigned toKeep = temp.size(); // how many to keep from merged populations // merge temp into offspring - plus(temp, _offspring); // add temp to _offspring (a little inconsistent!) - + plus(temp, _offspring); // add temp to _offspring (a little inconsistent!) + // reduce merged - reduce(_offspring, temp); // temp dummy arg. will not be modified + reduce(_offspring, temp); // temp dummy arg. will not be modified // minimla check: if (_offspring.size() != toKeep) - { - std::cerr << "Les tailles " << _offspring.size() << " " << toKeep << std::endl; - throw std::runtime_error("eoG3Replacement: wrong number of remaining offspring"); - } + { + std::cerr << "Les tailles " << _offspring.size() << " " << toKeep << std::endl; + throw std::runtime_error("eoG3Replacement: wrong number of remaining offspring"); + } // and put back into _parents - plus(_offspring, _parents); + plus(_offspring, _parents); } private: - eoLinearTruncateSplit split; // few parents to truncate -> linear - eoTruncateSplit reduce; // supposedly many offspring to truncate + eoLinearTruncateSplit split; // few parents to truncate -> linear + eoTruncateSplit reduce; // supposedly many offspring to truncate eoPlus plus; }; diff --git a/eo/src/eoGaussRealWeightUp.h b/eo/src/eoGaussRealWeightUp.h index 0da27b349..47edc321b 100644 --- a/eo/src/eoGaussRealWeightUp.h +++ b/eo/src/eoGaussRealWeightUp.h @@ -32,7 +32,7 @@ /** - * Update an inertia weight by assigning it a Gaussian randomized value + * Update an inertia weight by assigning it a Gaussian randomized value * (used for the velocity in particle swarm optimization). * * @ingroup Variators diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index fac89d5dc..0d01bb0a1 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoGenContinue.h // (c) GeNeura Team, 1999 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -29,7 +29,7 @@ #include #include -/** +/** Generational continuator: continues until a number of generations is reached @ingroup Continuators @@ -41,68 +41,68 @@ public: /// Ctor for setting a eoGenContinue( unsigned long _totalGens) - : eoValueParam(0, "Generations", "Generations"), - repTotalGenerations( _totalGens ), - thisGenerationPlaceHolder(0), - thisGeneration(thisGenerationPlaceHolder) + : eoValueParam(0, "Generations", "Generations"), + repTotalGenerations( _totalGens ), + thisGenerationPlaceHolder(0), + thisGeneration(thisGenerationPlaceHolder) {}; - + /// Ctor for enabling the save/load the no. of generations counted eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) - : eoValueParam(0, "Generations", "Generations"), - repTotalGenerations( _totalGens ), - thisGenerationPlaceHolder(0), - thisGeneration(_currentGen) + : eoValueParam(0, "Generations", "Generations"), + repTotalGenerations( _totalGens ), + thisGenerationPlaceHolder(0), + thisGeneration(_currentGen) {}; - + /** Returns false when a certain number of generations is - * reached */ + * reached */ virtual bool operator() ( const eoPop& _vEO ) { (void)_vEO; thisGeneration++; value() = thisGeneration; - - if (thisGeneration >= repTotalGenerations) + + if (thisGeneration >= repTotalGenerations) { - eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; - return false; + eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; + return false; } return true; } - - /** Sets the number of generations to reach - and sets the current generation to 0 (the begin) - - @todo replace this by an "init" method + + /** Sets the number of generations to reach + and sets the current generation to 0 (the begin) + + @todo replace this by an "init" method */ - virtual void totalGenerations( unsigned long _tg ) { - repTotalGenerations = _tg; - thisGeneration = 0; - }; - + virtual void totalGenerations( unsigned long _tg ) { + repTotalGenerations = _tg; + thisGeneration = 0; + }; + /** Returns the number of generations to reach*/ - virtual unsigned long totalGenerations( ) - { - return repTotalGenerations; + virtual unsigned long totalGenerations( ) + { + return repTotalGenerations; }; - - + + virtual std::string className(void) const { return "eoGenContinue"; } /** Read from a stream * @param __is the istream to read from */ void readFrom (std :: istream & __is) { - + __is >> thisGeneration; /* Loading the number of generations counted */ } - + /** Print on a stream * @param __os the ostream to print on */ void printOn (std :: ostream & __os) const { - - __os << thisGeneration << std :: endl; /* Saving the number of generations counted */ + + __os << thisGeneration << std :: endl; /* Saving the number of generations counted */ } private: @@ -112,4 +112,3 @@ private: }; #endif - diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index c304ec641..f0d70c7ba 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -53,7 +53,7 @@ the original population, is an instantiation of the next population and has often a selection function embedded in it to select new individuals. Note that the actual work is performed in the apply function. -AND that the apply function is responsible for invalidating +AND that the apply function is responsible for invalidating the object if necessary */ template @@ -72,8 +72,8 @@ class eoGenOp : public eoOp, public eoUF &, void> void operator()(eoPopulator& _pop) { - _pop.reserve( max_production() ); - apply(_pop); + _pop.reserve( max_production() ); + apply(_pop); } //protected : @@ -114,10 +114,10 @@ class eoBinGenOp : public eoGenOp public: eoBinGenOp(eoBinOp& _op) : op(_op) {} - unsigned max_production(void) { return 1; } + unsigned max_production(void) { return 1; } /** do the work: get 2 individuals from the population, modifies - only one (it's a eoBinOp) + only one (it's a eoBinOp) */ void apply(eoPopulator& _pop) { @@ -169,9 +169,9 @@ class eoQuadGenOp : public eoGenOp void apply(eoPopulator& _pop) { EOT& a = *_pop; - EOT& b = *++_pop; - - + EOT& b = *++_pop; + + if(op(a, b)) { a.invalidate(); diff --git a/eo/src/eoGeneralBreeder.h b/eo/src/eoGeneralBreeder.h index 34d9220d1..dc598ba7e 100644 --- a/eo/src/eoGeneralBreeder.h +++ b/eo/src/eoGeneralBreeder.h @@ -1,9 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoGeneralBreeder.h +// eoGeneralBreeder.h // (c) Maarten Keijzer and Marc Schoenauer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -58,7 +58,7 @@ class eoGeneralBreeder: public eoBreed eoGeneralBreeder( eoSelectOne& _select, eoGenOp& _op, - double _rate=1.0, + double _rate=1.0, bool _interpret_as_rate = true) : select( _select ), op(_op), howMany(_rate, _interpret_as_rate) {} @@ -71,7 +71,7 @@ class eoGeneralBreeder: public eoBreed eoGeneralBreeder( eoSelectOne& _select, eoGenOp& _op, - eoHowMany _howMany ) : + eoHowMany _howMany ) : select( _select ), op(_op), howMany(_howMany) {} /** The breeder: simply calls the genOp on a selective populator! @@ -87,10 +87,10 @@ class eoGeneralBreeder: public eoBreed eoSelectivePopulator it(_parents, _offspring, select); while (_offspring.size() < target) - { - op(it); - ++it; - } + { + op(it); + ++it; + } _offspring.resize(target); // you might have generated a few more } @@ -105,4 +105,3 @@ class eoGeneralBreeder: public eoBreed }; #endif - diff --git a/eo/src/eoInit.h b/eo/src/eoInit.h index c751b4a21..7b460d94b 100644 --- a/eo/src/eoInit.h +++ b/eo/src/eoInit.h @@ -43,24 +43,24 @@ */ /** @{*/ /** - Base (name) class for Initialization of chromosomes, used in a population - contructor. It is derived from eoMonOp, so it can be used + Base (name) class for Initialization of chromosomes, used in a population + contructor. It is derived from eoMonOp, so it can be used inside the algorithm as well. - @see eoPop + @see eoPop */ template class eoInit : public eoUF { public: - /** className: Mandatory because of eoCombinedInit. + /** className: Mandatory because of eoCombinedInit. SHould be pure virtual, but then we should go over the whole * code to write the method for all derived classes ... MS 16/7/04 */ virtual std::string className(void) const { return "eoInit"; } }; -/** turning an eoInit into a generator +/** turning an eoInit into a generator * probably we should only use genrators - and suppress eoInit ??? * MS - July 2001 */ @@ -115,13 +115,13 @@ template class eoInitVariableLength: public eoInit { public: -typedef typename EOT::AtomType AtomType; +typedef typename EOT::AtomType AtomType; // /** Ctor from a generator */ // eoInitVariableLength(unsigned _minSize, unsigned _maxSize, eoF & _generator = Gen()) -// : offset(_minSize), extent(_maxSize - _minSize), -// repGenerator( eoInitGenerator(*(new eoInit)) ), -// generator(_generator) +// : offset(_minSize), extent(_maxSize - _minSize), +// repGenerator( eoInitGenerator(*(new eoInit)) ), +// generator(_generator) // { // if (_minSize >= _maxSize) // throw std::logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); @@ -170,11 +170,11 @@ class eoInitPermutation: public eoInit virtual void operator()(EOT& chrom) { - chrom.resize(chromSize); + chrom.resize(chromSize); for(unsigned idx=0;idx eoInitAdaptor changes the place in the hierarchy from eoInit to eoMonOp. This is mainly a type conversion, nothing else - + @see eoInit, eoMonOp */ template diff --git a/eo/src/eoInitializer.h b/eo/src/eoInitializer.h index 26cb61de4..506fcf734 100644 --- a/eo/src/eoInitializer.h +++ b/eo/src/eoInitializer.h @@ -54,9 +54,9 @@ public : }; /** - Base (name) class for Initialization of algorithm PSO + Base (name) class for Initialization of algorithm PSO - @see eoInitializerBase eoUF apply + @see eoInitializerBase eoUF apply */ template class eoInitializer : public eoInitializerBase { @@ -115,9 +115,9 @@ public: private : /* - @param proc First evaluation - @param initVelo Initialization of the velocity - @param initBest Initialization of the best + @param proc First evaluation + @param initVelo Initialization of the velocity + @param initBest Initialization of the best */ eoUF& proc; eoVelocityInit < POT > & initVelo; @@ -145,4 +145,3 @@ class eoDummy : public eoUF #endif /** @} */ - diff --git a/eo/src/eoInt.h b/eo/src/eoInt.h index bc16728db..41c877247 100644 --- a/eo/src/eoInt.h +++ b/eo/src/eoInt.h @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: thomas.legrand@lifl.fr - todos@geneura.ugr.es, http://geneura.ugr.es + todos@geneura.ugr.es, http://geneura.ugr.es mkeijzer@dhi.dk */ diff --git a/eo/src/eoIntegerVelocity.h b/eo/src/eoIntegerVelocity.h index 190db1b01..b00b17bf3 100644 --- a/eo/src/eoIntegerVelocity.h +++ b/eo/src/eoIntegerVelocity.h @@ -55,16 +55,16 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology to get the global/local/other best - * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoIntegerVelocity (eoTopology < POT > & _topology, - const VelocityType & _c1, + const VelocityType & _c1, const VelocityType & _c2, const VelocityType & _c3, eoRealVectorBounds & _bounds, @@ -81,10 +81,10 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology to get the global/local/other best - * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -105,9 +105,9 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity * @param _topology the topology to use - * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoIntegerVelocity (eoTopology < POT > & _topology, @@ -116,7 +116,7 @@ public: const VelocityType & _c3, eoRng & _gen = rng): topology(_topology), - c1 (_c1), + c1 (_c1), c2 (_c2), c3 (_c3), bounds(*(new eoRealVectorNoBounds(0))), @@ -167,30 +167,29 @@ public: { topology.updateNeighborhood(_po,_indice); } - + //! eoTopology getTopology //! @return topology - eoTopology & getTopology () - { - return topology; - } + eoTopology & getTopology () + { + return topology; + } protected: eoTopology < POT > & topology; - const VelocityType & c1; // social/cognitive coefficient - const VelocityType & c2; // social/cognitive coefficient - const VelocityType & c3; // social/cognitive coefficient - - eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. - eoRealBoundModifier & bndsModifier; + const VelocityType & c1; // social/cognitive coefficient + const VelocityType & c2; // social/cognitive coefficient + const VelocityType & c3; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator - eoRng & gen; // the random generator - // If the bound modifier doesn't need to be used, use the dummy instance eoDummyRealBoundModifier dummyModifier; }; #endif /*EOINTEGERVELOCITY_H */ - diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h index ecc470abd..97dd39f55 100644 --- a/eo/src/eoInvalidateOps.h +++ b/eo/src/eoInvalidateOps.h @@ -57,7 +57,7 @@ class eoInvalidateMonOp : public eoMonOp return true; } - return false; + return false; } private: diff --git a/eo/src/eoLinearTopology.h b/eo/src/eoLinearTopology.h index b7c724167..813e99b93 100644 --- a/eo/src/eoLinearTopology.h +++ b/eo/src/eoLinearTopology.h @@ -48,7 +48,7 @@ public: /** * Build the topology made of _neighborhoodSize neighborhoods. - * @param _neighborhoodSize - The size of each neighborhood. + * @param _neighborhoodSize - The size of each neighborhood. */ eoLinearTopology (unsigned _neighborhoodSize):neighborhoodSize (_neighborhoodSize),isSetup(false){} @@ -119,7 +119,7 @@ public: */ unsigned retrieveNeighborhoodByIndice(unsigned _indice) { - unsigned i=0; + unsigned i=0; for (i=0;i< neighborhoods.size();i++) { if (neighborhoods[i].contains(_indice)) @@ -131,7 +131,7 @@ public: } /** - * Update the neighborhood: update the particle's best fitness and the best particle + * Update the neighborhood: update the particle's best fitness and the best particle * of the corresponding neighborhood. */ void updateNeighborhood(POT & _po,unsigned _indice) @@ -139,9 +139,9 @@ public: // update the best fitness of the particle if (_po.fitness() > _po.best()) { - _po.best(_po.fitness()); - for(unsigned i=0;i<_po.size();i++) - _po.bestPositions[i]=_po[i]; + _po.best(_po.fitness()); + for(unsigned i=0;i<_po.size();i++) + _po.bestPositions[i]=_po[i]; } // update the best in its neighborhood @@ -166,27 +166,27 @@ public: /* - * Return the global best of the topology - */ - virtual POT & globalBest() + * Return the global best of the topology + */ + virtual POT & globalBest() { - POT gBest,tmp; - unsigned indGlobalBest=0; - if(neighborhoods.size()==1) - return neighborhoods[0].best(); - - gBest=neighborhoods[0].best(); - for(unsigned i=1;i > neighborhoods; + std::vector > neighborhoods; unsigned neighborhoodSize; // the size of each neighborhood - + bool isSetup; }; #endif /*EOLINEARTOPOLOGY_H_ */ - - - - - - - - diff --git a/eo/src/eoMGGReplacement.h b/eo/src/eoMGGReplacement.h index a625e1e85..e2eebbfa5 100644 --- a/eo/src/eoMGGReplacement.h +++ b/eo/src/eoMGGReplacement.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoMGGReplacement.h + eoMGGReplacement.h (c) Maarten Keijzer, Marc Schoenauer, 2002 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -52,18 +52,18 @@ class eoMGGReplacement : public eoReplacement { public: eoMGGReplacement(eoHowMany _howManyEliminatedParents = eoHowMany(2, false), - unsigned _tSize=2) : + unsigned _tSize=2) : // split truncates the parents and returns eliminated parents - split(_howManyEliminatedParents, true), + split(_howManyEliminatedParents, true), tSize(_tSize) { if (tSize < 2) - { + { eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2" << std::endl; - tSize = 2; + tSize = 2; } } - + void operator()(eoPop & _parents, eoPop & _offspring) { eoPop temp; @@ -71,7 +71,7 @@ public: unsigned toKeep = temp.size(); // how many to keep from merged populations // minimal check if (toKeep < 2) - throw std::runtime_error("Not enough parents killed in eoMGGReplacement"); + throw std::runtime_error("Not enough parents killed in eoMGGReplacement"); // select best offspring typename eoPop::iterator it = _offspring.it_best_element(); @@ -82,21 +82,21 @@ public: // merge temp into offspring plus(temp, _offspring); - + // repeatedly add selected offspring to parents for (unsigned i=0; i split; // few parents to truncate -> linear + eoLinearTruncateSplit split; // few parents to truncate -> linear eoPlus plus; unsigned int tSize; }; diff --git a/eo/src/eoMerge.h b/eo/src/eoMerge.h index 01ada3f90..31da70f08 100644 --- a/eo/src/eoMerge.h +++ b/eo/src/eoMerge.h @@ -4,7 +4,7 @@ // eoMerge.h // Base class for elitist-merging classes // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -36,13 +36,13 @@ #include /** - * eoMerge: Base class for elitist replacement algorithms. + * eoMerge: Base class for elitist replacement algorithms. * Merges the old population (first argument), with the new generation * * Its signature is exactly - * that of the selection base eoSelect, but its purpose is to merge the + * that of the selection base eoSelect, but its purpose is to merge the * two populations into one (the second argument). - * Note that the algorithms assume that the second argument denotes the + * Note that the algorithms assume that the second argument denotes the * next generation. * * @ingroup Core @@ -55,7 +55,7 @@ template class eoMerge: public eoBF&, eoPop class eoElitism : public eoMerge @@ -66,42 +66,42 @@ public : { if (_interpret_as_rate) { - if ( (_rate<0) || (_rate>1) ) - throw std::logic_error("eoElitism: rate shoud be in [0,1]"); - rate = _rate; + if ( (_rate<0) || (_rate>1) ) + throw std::logic_error("eoElitism: rate shoud be in [0,1]"); + rate = _rate; } else { - if (_rate<0) - throw std::logic_error("Negative number of offspring in eoElitism!"); - combien = (unsigned int)_rate; - if (combien != _rate) - eo::log << eo::warnings << "Warning: Number of guys to merge in eoElitism was rounded" << std::endl; + if (_rate<0) + throw std::logic_error("Negative number of offspring in eoElitism!"); + combien = (unsigned int)_rate; + if (combien != _rate) + eo::log << eo::warnings << "Warning: Number of guys to merge in eoElitism was rounded" << std::endl; } } - + void operator()(const eoPop& _pop, eoPop& _offspring) { if ((combien == 0) && (rate == 0.0)) return; unsigned combienLocal; - if (combien == 0) // rate is specified + if (combien == 0) // rate is specified combienLocal = (unsigned int) (rate * _pop.size()); else combienLocal = combien; - + if (combienLocal > _pop.size()) throw std::logic_error("Elite larger than population"); - + std::vector result; _pop.nth_element(combienLocal, result); - + for (size_t i = 0; i < result.size(); ++i) { - _offspring.push_back(*result[i]); + _offspring.push_back(*result[i]); } } - + private : double rate; unsigned combien; @@ -139,4 +139,4 @@ template class eoPlus : public eoMerge //----------------------------------------------------------------------------- -#endif +#endif diff --git a/eo/src/eoMergeReduce.h b/eo/src/eoMergeReduce.h index 8524f1d81..b3cb5b990 100644 --- a/eo/src/eoMergeReduce.h +++ b/eo/src/eoMergeReduce.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoMergeReduce.h + eoMergeReduce.h (c) Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -34,7 +34,7 @@ #include #include //----------------------------------------------------------------------------- -/** +/** Replacement strategies that combine en eoMerge and an eoReduce. @class eoMergeReduce, the base (pure abstract) class @@ -43,7 +43,7 @@ Replacement strategies that combine en eoMerge and an eoReduce. */ /** -eoMergeReduce: abstract replacement strategy that is just an application of +eoMergeReduce: abstract replacement strategy that is just an application of an embedded merge, followed by an embedded reduce @ingroup Replacors */ @@ -59,7 +59,7 @@ class eoMergeReduce : public eoReplacement { merge(_parents, _offspring); // parents untouched, result in offspring reduce(_offspring, _parents.size()); - _parents.swap(_offspring); + _parents.swap(_offspring); } private : @@ -98,7 +98,7 @@ class eoCommaReplacement : public eoMergeReduce }; /** -EP type of replacement strategy: first add parents to population, +EP type of replacement strategy: first add parents to population, then truncate using EP tournament @ingroup Replacors */ diff --git a/eo/src/eoNDSorting.h b/eo/src/eoNDSorting.h index b0710b6ea..6ab86c177 100644 --- a/eo/src/eoNDSorting.h +++ b/eo/src/eoNDSorting.h @@ -61,35 +61,35 @@ class eoNDSorting : public eoPerf2WorthCached void calculate_worths(const eoPop& _pop) { - // resize the worths beforehand - value().resize(_pop.size()); + // resize the worths beforehand + value().resize(_pop.size()); - typedef typename EOT::Fitness::fitness_traits traits; + typedef typename EOT::Fitness::fitness_traits traits; - switch (traits::nObjectives()) - { - case 1: - { - one_objective(_pop); - return; - } - case 2: - { - two_objectives(_pop); - return; - } - default : - { - m_objectives(_pop); - } - } + switch (traits::nObjectives()) + { + case 1: + { + one_objective(_pop); + return; + } + case 2: + { + two_objectives(_pop); + return; + } + default : + { + m_objectives(_pop); + } + } } private : /** used in fast nondominated sorting - DummyEO is just a storage place for fitnesses and - to store the original index + DummyEO is just a storage place for fitnesses and + to store the original index */ class DummyEO : public EO { @@ -98,8 +98,8 @@ private : void one_objective(const eoPop& _pop) { - unsigned i; - std::vector tmp_pop; + unsigned i; + std::vector tmp_pop; tmp_pop.resize(_pop.size()); // copy pop to dummy population (only need the fitnesses) @@ -109,14 +109,14 @@ private : tmp_pop[i].index = i; } - std::sort(tmp_pop.begin(), tmp_pop.end(), std::greater()); + std::sort(tmp_pop.begin(), tmp_pop.end(), std::greater()); for (i = 0; i < _pop.size(); ++i) { value()[tmp_pop[i].index] = _pop.size() - i; // set rank } - // no point in calculcating niche penalty, as every distinct fitness value has a distinct rank + // no point in calculcating niche penalty, as every distinct fitness value has a distinct rank } /** @@ -139,134 +139,134 @@ private : void two_objectives(const eoPop& _pop) { - unsigned i; - typedef typename EOT::Fitness::fitness_traits traits; - assert(traits::nObjectives() == 2); + unsigned i; + typedef typename EOT::Fitness::fitness_traits traits; + assert(traits::nObjectives() == 2); - std::vector sort1(_pop.size()); // index into population sorted on first objective + std::vector sort1(_pop.size()); // index into population sorted on first objective - for (i = 0; i < _pop.size(); ++i) - { - sort1[i] = i; - } + for (i = 0; i < _pop.size(); ++i) + { + sort1[i] = i; + } - std::sort(sort1.begin(), sort1.end(), Sorter(_pop)); + std::sort(sort1.begin(), sort1.end(), Sorter(_pop)); - // Ok, now the meat of the algorithm + // Ok, now the meat of the algorithm - unsigned last_front = 0; + unsigned last_front = 0; - double max1 = -1e+20; - for (i = 0; i < _pop.size(); ++i) - { - max1 = std::max(max1, _pop[i].fitness()[1]); - } + double max1 = -1e+20; + for (i = 0; i < _pop.size(); ++i) + { + max1 = std::max(max1, _pop[i].fitness()[1]); + } - max1 = max1 + 1.0; // add a bit to it so that it is a real upperbound + max1 = max1 + 1.0; // add a bit to it so that it is a real upperbound - unsigned prev_front = 0; - std::vector d; - d.resize(_pop.size(), max1); // initialize with the value max1 everywhere + unsigned prev_front = 0; + std::vector d; + d.resize(_pop.size(), max1); // initialize with the value max1 everywhere - std::vector > fronts(_pop.size()); // to store indices into the front + std::vector > fronts(_pop.size()); // to store indices into the front - for (i = 0; i < _pop.size(); ++i) - { - unsigned index = sort1[i]; + for (i = 0; i < _pop.size(); ++i) + { + unsigned index = sort1[i]; - // check for clones and delete them - if (i > 0) - { - unsigned prev = sort1[i-1]; - if ( _pop[index].fitness() == _pop[prev].fitness()) - { // it's a clone, give it the worst rank! + // check for clones and delete them + if (i > 0) + { + unsigned prev = sort1[i-1]; + if ( _pop[index].fitness() == _pop[prev].fitness()) + { // it's a clone, give it the worst rank! - if (nasty_declone_flag_that_only_is_implemented_for_two_objectives) - //declone - fronts.back().push_back(index); - else // assign it the rank of the previous - fronts[prev_front].push_back(index); - continue; - } - } + if (nasty_declone_flag_that_only_is_implemented_for_two_objectives) + //declone + fronts.back().push_back(index); + else // assign it the rank of the previous + fronts[prev_front].push_back(index); + continue; + } + } - double value2 = _pop[index].fitness()[1]; + double value2 = _pop[index].fitness()[1]; - if (traits::maximizing(1)) - value2 = max1 - value2; + if (traits::maximizing(1)) + value2 = max1 - value2; - // perform binary search using std::upper_bound, a log n operation for each member - std::vector::iterator it = - std::upper_bound(d.begin(), d.begin() + last_front, value2); + // perform binary search using std::upper_bound, a log n operation for each member + std::vector::iterator it = + std::upper_bound(d.begin(), d.begin() + last_front, value2); - unsigned front = unsigned(it - d.begin()); - if (front == last_front) ++last_front; + unsigned front = unsigned(it - d.begin()); + if (front == last_front) ++last_front; - assert(it != d.end()); + assert(it != d.end()); - *it = value2; //update d - fronts[front].push_back(index); // add it to the front + *it = value2; //update d + fronts[front].push_back(index); // add it to the front - prev_front = front; - } + prev_front = front; + } - // ok, and finally the niche penalty + // ok, and finally the niche penalty - for (i = 0; i < fronts.size(); ++i) - { - if (fronts[i].size() == 0) continue; + for (i = 0; i < fronts.size(); ++i) + { + if (fronts[i].size() == 0) continue; - // Now we have the indices to the current front in current_front, do the niching - std::vector niche_count = niche_penalty(fronts[i], _pop); + // Now we have the indices to the current front in current_front, do the niching + std::vector niche_count = niche_penalty(fronts[i], _pop); - // Check whether the derived class was nice - if (niche_count.size() != fronts[i].size()) - { - throw std::logic_error("eoNDSorting: niche and front should have the same size"); - } + // Check whether the derived class was nice + if (niche_count.size() != fronts[i].size()) + { + throw std::logic_error("eoNDSorting: niche and front should have the same size"); + } - double max_niche = *std::max_element(niche_count.begin(), niche_count.end()); + double max_niche = *std::max_element(niche_count.begin(), niche_count.end()); - for (unsigned j = 0; j < fronts[i].size(); ++j) - { - value()[fronts[i][j]] = i + niche_count[j] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next - } + for (unsigned j = 0; j < fronts[i].size(); ++j) + { + value()[fronts[i][j]] = i + niche_count[j] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next + } - } + } - // invert ranks to obtain a 'bigger is better' score - rank_to_worth(); + // invert ranks to obtain a 'bigger is better' score + rank_to_worth(); } class Sorter { - public: - Sorter(const eoPop& _pop) : pop(_pop) {} + public: + Sorter(const eoPop& _pop) : pop(_pop) {} - bool operator()(unsigned i, unsigned j) const - { - typedef typename EOT::Fitness::fitness_traits traits; + bool operator()(unsigned i, unsigned j) const + { + typedef typename EOT::Fitness::fitness_traits traits; - double diff = pop[i].fitness()[0] - pop[j].fitness()[0]; + double diff = pop[i].fitness()[0] - pop[j].fitness()[0]; - if (fabs(diff) < traits::tol()) - { - diff = pop[i].fitness()[1] - pop[j].fitness()[1]; + if (fabs(diff) < traits::tol()) + { + diff = pop[i].fitness()[1] - pop[j].fitness()[1]; - if (fabs(diff) < traits::tol()) - return false; + if (fabs(diff) < traits::tol()) + return false; - if (traits::maximizing(1)) - return diff > 0.; - return diff < 0.; - } + if (traits::maximizing(1)) + return diff > 0.; + return diff < 0.; + } - if (traits::maximizing(0)) - return diff > 0.; - return diff < 0.; - } + if (traits::maximizing(0)) + return diff > 0.; + return diff < 0.; + } - const eoPop& pop; + const eoPop& pop; }; void m_objectives(const eoPop& _pop) @@ -485,7 +485,7 @@ class eoNDSorting_II : public eoNDSorting for (i = 0; i < nc.size(); ++i) { - niche_count[i] += (max_dist + 1 - nc[i]); + niche_count[i] += (max_dist + 1 - nc[i]); } } diff --git a/eo/src/eoNeighborhood.h b/eo/src/eoNeighborhood.h index fa0edd3f8..804dc1075 100644 --- a/eo/src/eoNeighborhood.h +++ b/eo/src/eoNeighborhood.h @@ -47,22 +47,11 @@ public: virtual POT & best()=0; virtual void best(POT _particle)=0; - + /// Virtual dtor - virtual ~eoNeighborhood() {}; + virtual ~eoNeighborhood() {}; }; #endif /* EONEIGHBORHOOD_H_ */ - - - - - - - - - - - diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 2e59f1905..bac2f4737 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoObject.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -34,9 +34,9 @@ #include /* -eoObject used to be the base class for the whole hierarchy, but this has -changed. eoObject is used to define a name (#className#) -that is used when loading or saving the state. +eoObject used to be the base class for the whole hierarchy, but this has +changed. eoObject is used to define a name (#className#) +that is used when loading or saving the state. Previously, this object also defined a print and read interface, but it´s been moved to eoPrintable and eoPersistent. @@ -58,19 +58,18 @@ class eoObject public: /// Virtual dtor. They are needed in virtual class hierarchies. virtual ~eoObject() {} - - /** Return the class id. This should be redefined in each class. + + /** Return the class id. This should be redefined in each class. Only "leaf" classes can be non-virtual. - Maarten: removed the default implementation as this proved to - be too error-prone: I found several classes that had a typo in + Maarten: removed the default implementation as this proved to + be too error-prone: I found several classes that had a typo in className (like classname), which would print eoObject instead of - their own. Having it pure will force the implementor to provide a + their own. Having it pure will force the implementor to provide a name. */ - virtual std::string className() const = 0; + virtual std::string className() const = 0; }; #endif - diff --git a/eo/src/eoOneToOneBreeder.h b/eo/src/eoOneToOneBreeder.h index 2e593333f..a4c18c0b4 100644 --- a/eo/src/eoOneToOneBreeder.h +++ b/eo/src/eoOneToOneBreeder.h @@ -1,9 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoOneToOneBreeder.h +// eoOneToOneBreeder.h // (c) Maarten Keijzer and Marc Schoenauer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -38,12 +38,12 @@ #include #include -/** eoOneToOneBreeder: transforms a population using +/** eoOneToOneBreeder: transforms a population using * - an operator that MODIFIES only one parent from the populator * (though it can use any number aside) and thus generates ONE offspring) * - a local replacement between the parent and its offspring * - * Typically, Differential Evolution (Storn and Price 94) and Deb et al's + * Typically, Differential Evolution (Storn and Price 94) and Deb et al's * G3 can be built on this * * @ingroup Combination @@ -54,16 +54,16 @@ class eoOneToOneBreeder: public eoBreed public: /** Ctor: * @param _op a general operator (must MODIFY only ONE parent) - * @param _eval an eoEvalFunc to evaluate the offspring + * @param _eval an eoEvalFunc to evaluate the offspring * @param _pReplace probability that the best of parent/offspring wins [1] * @param _howMany eoHowMany offpsring to generate [100%] */ eoOneToOneBreeder( eoGenOp& _op, - eoEvalFunc & _eval, - double _pReplace = 1.0, - eoHowMany _howMany = eoHowMany(1.0) ) : - op(_op), eval(_eval), select( false ), + eoEvalFunc & _eval, + double _pReplace = 1.0, + eoHowMany _howMany = eoHowMany(1.0) ) : + op(_op), eval(_eval), select( false ), pReplace(_pReplace), howMany(_howMany) {} @@ -77,34 +77,34 @@ class eoOneToOneBreeder: public eoBreed void operator()(const eoPop& _parents, eoPop& _offspring) { unsigned target = howMany(_parents.size()); - + _offspring.clear(); eoSelectivePopulator popit(_parents, _offspring, select); - + for (unsigned iParent=0; iParent leOffspring) // old parent better than offspring - if (rng.uniform() < pReplace) // if probability - leOffspring = theParent; // replace - // finally, go to next guy to handle - ++popit; - } + // do the tournament between parent and offspring + eval(leOffspring); // first need to evaluate the offspring + if (theParent > leOffspring) // old parent better than offspring + if (rng.uniform() < pReplace) // if probability + leOffspring = theParent; // replace + // finally, go to next guy to handle + ++popit; + } } /// The class name. @@ -119,4 +119,3 @@ class eoOneToOneBreeder: public eoBreed }; #endif - diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index bd9fe4e16..b6ad783c2 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoOp.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - CVS Info: $Date: 2004-08-10 17:19:46 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.29 2004-08-10 17:19:46 jmerelo Exp $ $Author: jmerelo $ + CVS Info: $Date: 2004-08-10 17:19:46 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.29 2004-08-10 17:19:46 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -171,13 +171,13 @@ public: */ bool operator()(EOT & _eo1, const EOT & _eo2) { - EOT eoTmp = _eo2; // a copy that can be modified + EOT eoTmp = _eo2; // a copy that can be modified // if the embedded eoQuadOp is not symmetrical, // the result might be biased - hence the flip ... if (eo::rng.flip(0.5)) - return quadOp(_eo1, eoTmp); // both are modified - that's all + return quadOp(_eo1, eoTmp); // both are modified - that's all else - return quadOp(eoTmp, _eo1); // both are modified - that's all + return quadOp(eoTmp, _eo1); // both are modified - that's all } private: diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index d295f0cec..e1f43bdf6 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -100,7 +100,7 @@ public: void apply(eoPopulator& _pop) { - _pop.reserve( this->max_production() ); + _pop.reserve( this->max_production() ); position_type pos = _pop.tellp(); for (size_t i = 0; i < rates.size(); ++i) { @@ -118,10 +118,10 @@ public: // } // check for out of individuals and do nothing with that... // catch(eoPopulator::OutOfIndividuals&) - // { + // { // std::cout << "Warning: not enough individuals to handle\n"; // return ; - // } + // } } if (!_pop.exhausted()) @@ -156,7 +156,7 @@ public: try { (*ops[i])(_pop); - ++_pop; + ++_pop; } catch( typename eoPopulator::OutOfIndividuals&) {} @@ -166,4 +166,3 @@ public: #endif - diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 791b26077..577b5b56f 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoOpSelMason.h // (c) GeNeura Team, 1999 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -36,72 +36,72 @@ to the objects it builds, and then deallocate it when it gets out of scope */ template class eoOpSelMason: public eoFactory > { - + public: - typedef std::vector* > vOpP; - typedef map*, vOpP > MEV; + typedef std::vector* > vOpP; + typedef map*, vOpP > MEV; - /// @name ctors and dtors - //{@ - /// constructor - eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; - - /// destructor - virtual ~eoOpSelMason() {}; - //@} + /// @name ctors and dtors + //{@ + /// constructor + eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; - /** Factory methods: creates an object from an std::istream, reading from - it whatever is needed to create the object. The format is - opSelClassName\\ - rate 1 operator1\\ - rate 2 operator2\\ - ...\\ - Stores all operators built in a database (#allocMap#), so that somebody - can destroy them later. The Mason is in charge or destroying the operators, - since the built object can´t do it itself. The objects built must be destroyed - from outside, using the "destroy" method - */ - virtual eoOpSelector* make(std::istream& _is) { + /// destructor + virtual ~eoOpSelMason() {}; + //@} - std::string opSelName; - _is >> opSelName; - eoOpSelector* opSelectorP; - // Build the operator selector - if ( opSelName == "eoProportionalOpSel" ) { - opSelectorP = new eoProportionalOpSel(); - } + /** Factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. The format is + opSelClassName\\ + rate 1 operator1\\ + rate 2 operator2\\ + ...\\ + Stores all operators built in a database (#allocMap#), so that somebody + can destroy them later. The Mason is in charge or destroying the operators, + since the built object can´t do it itself. The objects built must be destroyed + from outside, using the "destroy" method + */ + virtual eoOpSelector* make(std::istream& _is) { - // Temp std::vector for storing pointers - vOpP tmpPVec; - // read operator rate and name - while ( _is ) { - float rate; - _is >> rate; - if ( _is ) { - eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line - // Add the operators to the selector, don´t pay attention to the IDs - opSelectorP->addOp( *op, rate ); - // Keep it in the store, to destroy later - tmpPVec.push_back( op ); - } // if - } // while + std::string opSelName; + _is >> opSelName; + eoOpSelector* opSelectorP; + // Build the operator selector + if ( opSelName == "eoProportionalOpSel" ) { + opSelectorP = new eoProportionalOpSel(); + } - // Put it in the map - allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); - - return opSelectorP; - }; + // Temp std::vector for storing pointers + vOpP tmpPVec; + // read operator rate and name + while ( _is ) { + float rate; + _is >> rate; + if ( _is ) { + eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line + // Add the operators to the selector, don´t pay attention to the IDs + opSelectorP->addOp( *op, rate ); + // Keep it in the store, to destroy later + tmpPVec.push_back( op ); + } // if + } // while - ///@name eoObject methods - //@{ - /** Return the class id */ - virtual std::string className() const { return "eoOpSelMason"; } + // Put it in the map + allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); + + return opSelectorP; + }; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual std::string className() const { return "eoOpSelMason"; } + + //@} - //@} - private: - map*,std::vector* > > allocMap; - eoOpFactory& operatorFactory; + map*,std::vector* > > allocMap; + eoOpFactory& operatorFactory; }; diff --git a/eo/src/eoOrderXover.h b/eo/src/eoOrderXover.h index 0c98990dd..daaf52e0c 100644 --- a/eo/src/eoOrderXover.h +++ b/eo/src/eoOrderXover.h @@ -10,7 +10,7 @@ #include #include -#include +#include /** * apply orderXover on two chromosomes. @@ -26,65 +26,65 @@ template class eoOrderXover: public eoQuadOp { public: - /// The class name. - virtual std::string className() const { return "eoOrderXover"; } + /// The class name. + virtual std::string className() const { return "eoOrderXover"; } + + /** + * @return true if the chromosome has changed + * @param _chrom1 The first chromosome which will be crossed with chrom2. + * @param _chrom2 The second chromosome which will be crossed with chrom1. + */ + bool operator()(Chrom& _chrom1, Chrom& _chrom2){ + + char direction=eo::rng.flip()? 1 : -1; + unsigned cut2= 1 + eo::rng.random(_chrom1.size()); + unsigned cut1= eo::rng.random(cut2); + Chrom tmp1= _chrom1; + Chrom tmp2= _chrom2; + + cross(tmp1, tmp2, _chrom1, direction, cut1, cut2); + cross(tmp2, tmp1, _chrom2, direction, cut1, cut2); + + _chrom1.invalidate(); + _chrom2.invalidate(); + + return true; + } - /** - * @return true if the chromosome has changed - * @param _chrom1 The first chromosome which will be crossed with chrom2. - * @param _chrom2 The second chromosome which will be crossed with chrom1. - */ - bool operator()(Chrom& _chrom1, Chrom& _chrom2){ - - char direction=eo::rng.flip()? 1 : -1; - unsigned cut2= 1 + eo::rng.random(_chrom1.size()); - unsigned cut1= eo::rng.random(cut2); - Chrom tmp1= _chrom1; - Chrom tmp2= _chrom2; - - cross(tmp1, tmp2, _chrom1, direction, cut1, cut2); - cross(tmp2, tmp1, _chrom2, direction, cut1, cut2); - - _chrom1.invalidate(); - _chrom2.invalidate(); - - return true; - } - private: - - /** - * @param _chrom1 The first parent chromosome. - * @param _chrom2 The second parent chromosome. - * @param _child The result chromosome. - * @param _direction The direction of the OrderXover (left: -1 or right: 1) - * @param _cut1 index of the first cut - * @param _cut2 index of the second cut - */ - void cross(Chrom& _chrom1, Chrom& _chrom2, Chrom& _child, char _direction, unsigned _cut1, unsigned _cut2){ - - unsigned size, id=0, from=0; - size= _chrom1.size(); - std::vector verif(size, false); - - for(unsigned i= _cut1; i<_cut2; i++){ - _child[id++]= _chrom1[i]; - verif[_chrom1[i] % size] = true; - } - - while(_chrom2[from] != _child[_cut2 - 1]) - from++; - - for(unsigned i=0; i verif(size, false); + + for(unsigned i= _cut1; i<_cut2; i++){ + _child[id++]= _chrom1[i]; + verif[_chrom1[i] % size] = true; + } + + while(_chrom2[from] != _child[_cut2 - 1]) + from++; + + for(unsigned i=0; i class eoInitializerBase : public eoFunctorBase }; /** - Base (name) class for Initialization of algorithm PSO + Base (name) class for Initialization of algorithm PSO - @see eoInitializerBase eoUF apply + @see eoInitializerBase eoUF apply */ template class eoParticleInitializer : public eoInitializerBase { @@ -99,34 +99,34 @@ template class eoParticleInitializer : public eoInitializerBase empty_pop; - - // evaluates using either the "sequential" evaluator ... - apply(proc, pop); - - // ... or the parallel one - procPara(empty_pop, pop); - - // no matter what is the eval operator, initializes the velocities and the particle's best + eoPop empty_pop; + + // evaluates using either the "sequential" evaluator ... + apply(proc, pop); + + // ... or the parallel one + procPara(empty_pop, pop); + + // no matter what is the eval operator, initializes the velocities and the particle's best apply < POT > (initVelo, pop); apply < POT > (initBest, pop); - + // finally setup the topology. We have now all we need to do so. - topology.setup(pop); + topology.setup(pop); } private : /* - @param proc First evaluation - @param initVelo Initialization of the velocity - @param initBest Initialization of the best - + @param proc First evaluation + @param initVelo Initialization of the velocity + @param initBest Initialization of the best + */ eoPop < POT > & pop; eoUF& proc; @@ -146,11 +146,10 @@ template class eoParticleInitializer : public eoInitializerBase class eoPeriodicContinue: public eoContinue { public: - - /** Constructor. The period is given in parameter. */ - eoPeriodicContinue (unsigned __period, unsigned __init_counter = 0) : - period (__period), counter (__init_counter) + + /** Constructor. The period is given in parameter. */ + eoPeriodicContinue (unsigned __period, unsigned __init_counter = 0) : + period (__period), counter (__init_counter) {} /** It returns 'true' only if the current number of generations modulo - the period doen't equal to zero. */ + the period doen't equal to zero. */ bool operator () (const eoPop & pop) { return ((++ counter) % period) != 0 ; } - + private: unsigned period; - + unsigned counter; }; #endif - diff --git a/eo/src/eoPersistent.cpp b/eo/src/eoPersistent.cpp index 63e906ca7..c1334ebc4 100644 --- a/eo/src/eoPersistent.cpp +++ b/eo/src/eoPersistent.cpp @@ -1,7 +1,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #include diff --git a/eo/src/eoPersistent.h b/eo/src/eoPersistent.h index 7c2f609e4..ed3f581ec 100644 --- a/eo/src/eoPersistent.h +++ b/eo/src/eoPersistent.h @@ -6,7 +6,7 @@ // eoPersistent.h // (c) GeNeura Team, 1999 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -48,14 +48,14 @@ class eoPersistent: public eoPrintable public: /// Virtual dtor. They are needed in virtual class hierarchies. virtual ~eoPersistent() {} - + /** * Read object. * @param _is A std::istream. * @throw runtime_std::exception If a valid object can't be read. */ virtual void readFrom(std::istream& _is) = 0; - + }; ///Standard input for all objects in the EO hierarchy diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 5c63fb404..3ea53f466 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -1,9 +1,9 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- -// eoPop.h +// eoPop.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -36,16 +36,16 @@ #include #include // for shuffle method -/** A std::vector of EO object, to be used in all algorithms +/** A std::vector of EO object, to be used in all algorithms * (selectors, operators, replacements, ...). * * We have no idea if a population can be * some other thing that a std::vector, but if somebody thinks of it, this concrete - * implementation can be moved to "generic" and an abstract Population + * implementation can be moved to "generic" and an abstract Population * interface be provided. * - * The template can be instantiated with anything that accepts a "size" - * and eoInit derived object. in the ctor. + * The template can be instantiated with anything that accepts a "size" + * and eoInit derived object. in the ctor. * EOT must also have a copy ctor, since temporaries are created and then * passed to the eoInit object * @@ -55,62 +55,62 @@ template class eoPop: public std::vector, public eoObject, public eoPersistent { public: - + using std::vector::size; using std::vector::resize; using std::vector::operator[]; using std::vector::begin; using std::vector::end; - + typedef typename EOT::Fitness Fitness; #if defined(__CUDACC__) typedef typename std::vector::iterator iterator; typedef typename std::vector::const_iterator const_iterator; #endif - /** Default ctor. Creates empty pop - */ - eoPop() : std::vector(), eoObject(), eoPersistent() {}; - - /** Ctor for the initialization of chromosomes - - @param _popSize total population size - @param _chromInit Initialization routine, produces EO's, needs to be an eoInit - */ + /** Default ctor. Creates empty pop + */ + eoPop() : std::vector(), eoObject(), eoPersistent() {}; + + /** Ctor for the initialization of chromosomes + + @param _popSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + */ eoPop( unsigned _popSize, eoInit& _chromInit ) - :std::vector() + :std::vector() { resize(_popSize); - for ( unsigned i = 0; i < _popSize; i++ ) + for ( unsigned i = 0; i < _popSize; i++ ) { - _chromInit(operator[](i)); - } - }; + _chromInit(operator[](i)); + } + }; - /** appends random guys at end of pop. - Can be used to initialize it pop is empty - - @param _newPopSize total population size - @param _chromInit Initialization routine, produces EO's, needs to be an eoInit - */ + /** appends random guys at end of pop. + Can be used to initialize it pop is empty + + @param _newPopSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + */ void append( unsigned _newPopSize, eoInit& _chromInit ) { unsigned oldSize = size(); if (_newPopSize < oldSize) - { - throw std::runtime_error("New size smaller than old size in pop.append"); - return; - } + { + throw std::runtime_error("New size smaller than old size in pop.append"); + return; + } if (_newPopSize == oldSize) - return; - resize(_newPopSize); // adjust the size + return; + resize(_newPopSize); // adjust the size for ( unsigned i = oldSize; i < _newPopSize; i++ ) - { - _chromInit(operator[](i)); - } + { + _chromInit(operator[](i)); + } }; - - + + /** Ctor from an std::istream; reads the population from a stream, each element should be in different lines @param _is the stream @@ -118,9 +118,9 @@ public: eoPop( std::istream& _is ) :std::vector() { readFrom( _is ); } - + /** Empty Dtor */ - virtual ~eoPop() {} + virtual ~eoPop() {} /// helper struct for getting a pointer @@ -130,16 +130,16 @@ public: bool operator()(const EOT* a, const EOT* b) const { return b->operator<(*a); } }; - /// helper struct for comparing (EA or PSO) - struct Cmp2 - { - bool operator()(const EOT & a,const EOT & b) const - { - return b.operator<(a); - } - }; - - + /// helper struct for comparing (EA or PSO) + struct Cmp2 + { + bool operator()(const EOT & a,const EOT & b) const + { + return b.operator<(a); + } + }; + + /** sort the population. Use this member to sort in order @@ -185,10 +185,10 @@ public: #if defined(__CUDACC__) eoPop::iterator it_best_element() { - eoPop:: iterator it = std::max_element(begin(), end()); + eoPop:: iterator it = std::max_element(begin(), end()); #else - typename eoPop::iterator it_best_element() { - typename eoPop::iterator it = std::max_element(begin(), end()); + typename eoPop::iterator it_best_element() { + typename eoPop::iterator it = std::max_element(begin(), end()); #endif return it; } @@ -199,7 +199,7 @@ public: #if defined(__CUDACC__) eoPop::const_iterator it = std::max_element(begin(), end()); #else - typename eoPop::const_iterator it = std::max_element(begin(), end()); + typename eoPop::const_iterator it = std::max_element(begin(), end()); #endif return (*it); } @@ -210,7 +210,7 @@ public: #if defined(__CUDACC__) eoPop::const_iterator it = std::min_element(begin(), end()); #else - typename eoPop::const_iterator it = std::min_element(begin(), end()); + typename eoPop::const_iterator it = std::min_element(begin(), end()); #endif return (*it); } @@ -221,9 +221,9 @@ public: { eoPop::iterator it = std::min_element(begin(), end()); #else - typename eoPop::iterator it_worse_element() + typename eoPop::iterator it_worse_element() { - typename eoPop::iterator it = std::min_element(begin(), end()); + typename eoPop::iterator it = std::min_element(begin(), end()); #endif return it; } @@ -232,25 +232,25 @@ public: slightly faster algorithm than sort to find all individuals that are better than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. */ -#if defined(__CUDACC__) +#if defined(__CUDACC__) eoPop::iterator nth_element(int nth) { eoPop::iterator it = begin() + nth; #else - typename eoPop::iterator nth_element(int nth) + typename eoPop::iterator nth_element(int nth) { - typename eoPop::iterator it = begin() + nth; + typename eoPop::iterator it = begin() + nth; #endif std::nth_element(begin(), it, end(), std::greater()); return it; } struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; - + /** returns the fitness of the nth element */ Fitness nth_element_fitness(int which) const { // probably not the fastest way to do this, but what the heck - + std::vector fitness(size()); std::transform(begin(), end(), fitness.begin(), GetFitness()); @@ -259,15 +259,15 @@ public: return *it; } - /** const nth_element function, returns pointers to sorted individuals - * up the the nth + /** const nth_element function, returns pointers to sorted individuals + * up the the nth */ void nth_element(int which, std::vector& result) const { result.resize(size()); std::transform(begin(), end(), result.begin(), Ref()); - + typename std::vector::iterator it = result.begin() + which; std::nth_element(result.begin(), it, result.end(), Cmp()); @@ -278,28 +278,28 @@ public: { std::swap(static_cast& >(*this), static_cast& >(other)); } - + /** * Prints sorted pop but does NOT modify it! * - * @param _os A std::ostream. + * @param _os A std::ostream. */ - virtual void sortedPrintOn(std::ostream& _os) const + virtual void sortedPrintOn(std::ostream& _os) const { std::vector result; sort(result); _os << size() << '\n'; for (unsigned i = 0; i < size(); ++i) { - _os << *result[i] << std::endl; + _os << *result[i] << std::endl; } } /** * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A std::ostream. + * @param _os A std::ostream. */ - virtual void printOn(std::ostream& _os) const + virtual void printOn(std::ostream& _os) const { _os << size() << '\n'; std::copy( begin(), end(), std::ostream_iterator( _os, "\n") ); @@ -309,16 +309,16 @@ public: //@{ /** * Read object. The EOT class must have a ctor from a stream; - * @param _is A std::istream. + * @param _is A std::istream. */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { size_t sz; _is >> sz; resize(sz); - for (size_t i = 0; i < sz; ++i) { + for (size_t i = 0; i < sz; ++i) { operator[](i).readFrom( _is ); } } @@ -337,4 +337,3 @@ public: }; #endif - diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index 2753e957f..aba74d9ab 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -5,7 +5,7 @@ Abstract class for global evaluation of the population (c) GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,32 +30,32 @@ #include #include -/** eoPopEvalFunc: This abstract class is for GLOBAL evaluators +/** eoPopEvalFunc: This abstract class is for GLOBAL evaluators * of a population after variation. * It takes 2 populations (typically the parents and the offspring) * and is suppposed to evaluate them alltogether * - * Basic use: apply an embedded eoEvalFunc to the offspring + * Basic use: apply an embedded eoEvalFunc to the offspring * - * Time-varying fitness: apply the embedded eoEvalFunc to both + * Time-varying fitness: apply the embedded eoEvalFunc to both * offspring and parents * * Advanced uses: Co-evolution or "parisian" approach, or ... * - * Basic parallelization (synchronous standard evolution engine): + * Basic parallelization (synchronous standard evolution engine): * call the slaves and wait for the results * * @ingroup Evaluation */ template -class eoPopEvalFunc : public eoBF & , eoPop &, void> +class eoPopEvalFunc : public eoBF & , eoPop &, void> {}; ///////////////////////////////////////////////////////////// // eoPopLoopEval ///////////////////////////////////////////////////////////// -/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies +/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies * a private eoEvalFunc to all offspring * * @ingroup Evaluation @@ -81,9 +81,9 @@ private: // eoTimeVaryingLoopEval ///////////////////////////////////////////////////////////// -/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies +/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies * a private eoEvalFunc to all offspring AND ALL PARENTS - * as the fitness is supposed here to vary + * as the fitness is supposed here to vary * * @ingroup Evaluation */ @@ -105,4 +105,3 @@ private: }; #endif - diff --git a/eo/src/eoPopulator.h b/eo/src/eoPopulator.h index eaf8f8410..104aafe5e 100644 --- a/eo/src/eoPopulator.h +++ b/eo/src/eoPopulator.h @@ -209,4 +209,3 @@ private: }; #endif - diff --git a/eo/src/eoPrintable.cpp b/eo/src/eoPrintable.cpp index a68536a5f..ec6e32462 100644 --- a/eo/src/eoPrintable.cpp +++ b/eo/src/eoPrintable.cpp @@ -1,7 +1,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif //----------------------------------------------------------------------------- // eoPrintable.cpp @@ -14,9 +14,8 @@ //----------------------------------------------------------------------------- std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ) { - _o.printOn(_os); - return _os; + _o.printOn(_os); + return _os; } //----------------------------------------------------------------------------- - diff --git a/eo/src/eoPrintable.h b/eo/src/eoPrintable.h index 9d4190473..1f2404a89 100644 --- a/eo/src/eoPrintable.h +++ b/eo/src/eoPrintable.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoPrintable.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -37,7 +37,7 @@ some objects (for instance, a #eoFactory# or a random number generator. /** Base class for objects that can print themselves -(#printOn#). Besides, this file defines the standard output for all the objects; +(#printOn#). Besides, this file defines the standard output for all the objects; if the objects define printOn there's no need to define "operator<<". @ingroup Core @@ -47,7 +47,7 @@ class eoPrintable public: /// Virtual dtor. They are needed in virtual class hierarchies. virtual ~eoPrintable() {} - + /** * Write object. It's called printOn since it prints the object on a stream. * @param _os A std::ostream. @@ -60,4 +60,3 @@ class eoPrintable std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ); #endif - diff --git a/eo/src/eoPropGAGenOp.h b/eo/src/eoPropGAGenOp.h index 44ccc7a53..5d2fd79cd 100644 --- a/eo/src/eoPropGAGenOp.h +++ b/eo/src/eoPropGAGenOp.h @@ -33,36 +33,36 @@ // class eoSGAGenOp /////////////////////////////////////////////////////////////////////////////// -/** - * eoPropGAGenOp (for Simple GA, but Proportional) - * choice between Crossover, mutation or cloining +/** + * eoPropGAGenOp (for Simple GA, but Proportional) + * choice between Crossover, mutation or cloining * with respect to given relatve weights * * @ingroup Combination */ -template +template class eoPropGAGenOp : public eoGenOp { public: - - /** Ctor from + + /** Ctor from * * weight of clone * * crossover (with weight) * * mutation (with weight) */ - eoPropGAGenOp(double _wClone, eoQuadOp& _cross, double _wCross, - eoMonOp& _mut, double _wMut) + eoPropGAGenOp(double _wClone, eoQuadOp& _cross, double _wCross, + eoMonOp& _mut, double _wMut) : wClone(_wClone), cross(_cross), wCross(_wCross), - mut(_mut), - wMut(_wMut) + mut(_mut), + wMut(_wMut) { propOp.add(cross, wCross); // the crossover - with weight wCross propOp.add(mut, wMut); // mutation with weight wMut propOp.add(monClone, wClone); } - + /** do the job: delegate to op */ virtual void apply(eoPopulator& _pop) { diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 892c9b47c..123c634b0 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // eoCombinedOp.h // (c) GeNeura Team, 1998, Marc Schoenauer, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -105,7 +105,7 @@ public: virtual bool operator()(EOT & _indi) { unsigned what = rng.roulette_wheel(rates); // choose one op - return (*ops[what])(_indi); // apply it + return (*ops[what])(_indi); // apply it } protected: std::vector*> ops; @@ -139,20 +139,20 @@ virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) // compute the relative rates in percent - to warn the user! if (_verbose) { - double total = 0; - unsigned i; - for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %" << std::endl; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %" << std::endl; } } virtual void operator()(EOT & _indi1, const EOT & _indi2) { unsigned what = rng.roulette_wheel(rates); // choose one op index - return (*ops[what])(_indi1, _indi2); // apply it + return (*ops[what])(_indi1, _indi2); // apply it } private: std::vector*> ops; @@ -216,7 +216,7 @@ public: virtual bool operator()(EOT & _indi1, EOT & _indi2) { unsigned what = rng.roulette_wheel(rates); // choose one op index - return (*ops[what])(_indi1, _indi2); // apply it + return (*ops[what])(_indi1, _indi2); // apply it } private: std::vector*> ops; diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index bd7880488..daa4428df 100644 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoProportionalSelect.h // (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,18 +35,18 @@ #include /** eoProportionalSelect: select an individual proportional to her stored fitness - value - - Changed the algorithm to make use of a cumulative array of fitness scores, + value + + Changed the algorithm to make use of a cumulative array of fitness scores, This changes the algorithm from O(n) per call to O(log n) per call. (MK) @ingroup Selectors */ -template class eoProportionalSelect: public eoSelectOne +template class eoProportionalSelect: public eoSelectOne { public: /// Sanity check - eoProportionalSelect(const eoPop& pop = eoPop()) + eoProportionalSelect(const eoPop& pop = eoPop()) { if (minimizing_fitness()) throw std::logic_error("eoProportionalSelect: minimizing fitness"); @@ -55,23 +55,23 @@ public: void setup(const eoPop& _pop) { if (_pop.size() == 0) return; - + cumulative.resize(_pop.size()); cumulative[0] = _pop[0].fitness(); - for (unsigned i = 1; i < _pop.size(); ++i) + for (unsigned i = 1; i < _pop.size(); ++i) { - cumulative[i] = _pop[i].fitness() + cumulative[i-1]; + cumulative[i] = _pop[i].fitness() + cumulative[i-1]; } } - - /** do the selection, + + /** do the selection, */ - const EOT& operator()(const eoPop& _pop) + const EOT& operator()(const eoPop& _pop) { if (cumulative.size() == 0) setup(_pop); - - double fortune = rng.uniform() * cumulative.back(); + + double fortune = rng.uniform() * cumulative.back(); typename FitVec::iterator result = std::upper_bound(cumulative.begin(), cumulative.end(), fortune); return _pop[result - cumulative.begin()]; } diff --git a/eo/src/eoRandomRealWeightUp.h b/eo/src/eoRandomRealWeightUp.h index b929504c1..81521b512 100644 --- a/eo/src/eoRandomRealWeightUp.h +++ b/eo/src/eoRandomRealWeightUp.h @@ -31,7 +31,7 @@ //----------------------------------------------------------------------------- /** - * Update an inertia weight by assigning it an (uniform) random value. + * Update an inertia weight by assigning it an (uniform) random value. * The weight is a basic feature to evaluate the velocity of a particle in * swarm optimization. * diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index 6d99f17ed..065f050f9 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -35,7 +35,7 @@ #include #include -/** eoRandomSelect: a selection method that selects ONE individual randomly +/** eoRandomSelect: a selection method that selects ONE individual randomly * * @ingroup Selectors */ @@ -91,4 +91,3 @@ private: }; #endif - diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index ec8120064..5e7342911 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -55,10 +55,10 @@ public: { typename eoPop::const_iterator it; for (it=_pop.begin(); it<_pop.end(); it++) - { - if (_eo == &(*it)) - return it-_pop.begin(); - } + { + if (_eo == &(*it)) + return it-_pop.begin(); + } throw std::runtime_error("Not found in eoLinearRanking"); } @@ -74,33 +74,33 @@ public: unsigned int pSizeMinusOne = pSize-1; if (pSize <= 1) - throw std::runtime_error("Cannot do ranking with population of size <= 1"); + throw std::runtime_error("Cannot do ranking with population of size <= 1"); // value() refers to the std::vector of worthes (we're in an eoParamvalue) value().resize(pSize); double beta = (2-pressure)/pSize; - if (exponent == 1.0) // no need for exponetial then - { - double alpha = (2*pressure-2)/(pSize*pSizeMinusOne); - for (unsigned i=0; i 1/[P(P-1)/2] - } - } - else // exponent != 1 - { - double gamma = (2*pressure-2)/pSize; - for (unsigned i=0; i 1/[P(P-1)/2] + } + } + else // exponent != 1 + { + double gamma = (2*pressure-2)/pSize; + for (unsigned i=0; i -class eoRankingSelect: public eoRouletteWorthSelect +template +class eoRankingSelect: public eoRouletteWorthSelect { public: /** Ctor: * @param _p the selective pressure, should be in [1,2] (2 is the default) * @param _e exponent (1 == linear) */ - eoRankingSelect(double _p = 2.0, double _e=1.0): + eoRankingSelect(double _p = 2.0, double _e=1.0): eoRouletteWorthSelect(ranking), ranking(_p, _e) {} private : - eoRanking ranking; // derived from eoPerf2Worth + eoRanking ranking; // derived from eoPerf2Worth }; #endif diff --git a/eo/src/eoRealBoundModifier.h b/eo/src/eoRealBoundModifier.h index e9d21c4c3..9a9e032bc 100644 --- a/eo/src/eoRealBoundModifier.h +++ b/eo/src/eoRealBoundModifier.h @@ -56,8 +56,8 @@ public: void operator() (eoRealBaseVectorBounds & _bnds,unsigned _i) { - (void)_bnds; - (void)_i; + (void)_bnds; + (void)_i; } }; @@ -70,26 +70,26 @@ public: * - t, the current iteration, is given with an eoValueParam * - Nt is the stopping criteria <=> the total number of iterations * - alpha a coefficient - * + * */ class eoExpDecayingBoundModifier: public eoRealBoundModifier { public: - - /** - * Constructor - * @param _stopCriteria - The total number of iterations - * @param _alpha - * @param _genCounter - An eoValueParam that gives the current iteration - */ + + /** + * Constructor + * @param _stopCriteria - The total number of iterations + * @param _alpha + * @param _genCounter - An eoValueParam that gives the current iteration + */ eoExpDecayingBoundModifier (unsigned _stopCriteria, double _alpha, eoValueParam & _genCounter): - stopCriteria(_stopCriteria), - alpha(_alpha), - genCounter(_genCounter){} - - + stopCriteria(_stopCriteria), + alpha(_alpha), + genCounter(_genCounter){} + + void operator() (eoRealBaseVectorBounds & _bnds,unsigned _i) { double newMaxBound=(1-pow((double)genCounter.value()/stopCriteria,alpha))*_bnds.maximum(_i); diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 7b51d586a..7cca61993 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -4,7 +4,7 @@ // eoReduce.h // Base class for population-merging classes // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -39,7 +39,7 @@ /** * eoReduce: .reduce the new generation to the specified size At the moment, limited to truncation - with 2 different methods, - one that sorts the whole population, and one that repeatidely kills + one that sorts the whole population, and one that repeatidely kills the worst. Ideally, we should be able to choose at run-time!!! @ingroup Replacors @@ -47,7 +47,7 @@ template class eoReduce: public eoBF&, unsigned, void> {}; -/** truncation method using sort +/** truncation method using sort @ingroup Replacors */ template class eoTruncate : public eoReduce @@ -56,15 +56,15 @@ template class eoTruncate : public eoReduce { if (_newgen.size() == _newsize) return; - if (_newgen.size() < _newsize) - throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); - + if (_newgen.size() < _newsize) + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); + _newgen.sort(); _newgen.resize(_newsize); } }; -/** random truncation +/** random truncation @ingroup Replacors * */ template class eoRandomReduce : public eoReduce @@ -73,16 +73,16 @@ template class eoRandomReduce : public eoReduce { if (_newgen.size() == _newsize) return; - if (_newgen.size() < _newsize) - throw std::logic_error("eoRandomReduce: Cannot truncate to a larger size!\n"); + if (_newgen.size() < _newsize) + throw std::logic_error("eoRandomReduce: Cannot truncate to a larger size!\n"); - // shuffle the population, then trucate - _newgen.shuffle(); - _newgen.resize(_newsize); + // shuffle the population, then trucate + _newgen.shuffle(); + _newgen.resize(_newsize); } }; -/** +/** EP truncation method (some global stochastic tournament + sort) Softer selective pressure than pure truncate @ingroup Replacors @@ -90,15 +90,15 @@ Softer selective pressure than pure truncate template class eoEPReduce : public eoReduce { public: -typedef typename EOT::Fitness Fitness; +typedef typename EOT::Fitness Fitness; eoEPReduce(unsigned _t_size ): t_size(_t_size) { if (t_size < 2) - { + { eo::log << eo::warnings << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; - t_size = 2; + t_size = 2; } } @@ -108,60 +108,60 @@ typedef typename EOT::Fitness Fitness; typedef std::pair::iterator> EPpair; struct Cmp { bool operator()(const EPpair a, const EPpair b) const - { + { if (b.first == a.first) - return (*b.second < *a.second); - return b.first < a.first; + return (*b.second < *a.second); + return b.first < a.first; } }; - - + + void operator()(eoPop& _newgen, unsigned _newsize) { unsigned int presentSize = _newgen.size(); - + if (presentSize == _newsize) return; - if (presentSize < _newsize) - throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); - std::vector scores(presentSize); - for (unsigned i=0; i competitor.fitness()) - scores[i].first += 1; - else if (fit == competitor.fitness()) - scores[i].first += 0.5; - } - } + if (presentSize < _newsize) + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); + std::vector scores(presentSize); + for (unsigned i=0; i competitor.fitness()) + scores[i].first += 1; + else if (fit == competitor.fitness()) + scores[i].first += 0.5; + } + } - // now we have the scores - typename std::vector::iterator it = scores.begin() + _newsize; + // now we have the scores + typename std::vector::iterator it = scores.begin() + _newsize; std::nth_element(scores.begin(), it, scores.end(), Cmp()); - // sort(scores.begin(), scores.end(), Cmp()); - unsigned j; -// std::cout << "Les scores apres tri\n"; -// for (j=0; j tmPop; - for (j=0; j<_newsize; j++) - { - tmPop.push_back(*scores[j].second); - } - _newgen.swap(tmPop); - // erase does not work, but I'm sure there is a way in STL to mark - // and later delete all inside a std::vector ?????? - // this would avoid all copies here + // sort(scores.begin(), scores.end(), Cmp()); + unsigned j; +// std::cout << "Les scores apres tri\n"; +// for (j=0; j tmPop; + for (j=0; j<_newsize; j++) + { + tmPop.push_back(*scores[j].second); + } + _newgen.swap(tmPop); + // erase does not work, but I'm sure there is a way in STL to mark + // and later delete all inside a std::vector ?????? + // this would avoid all copies here -// it = scores.begin() + _newsize; -// while (it < scores.end()) -// _newgen.erase(it->second); +// it = scores.begin() + _newsize; +// while (it < scores.end()) +// _newgen.erase(it->second); } private: unsigned t_size; @@ -171,7 +171,7 @@ private: To be used in SSGA-like replacements (e.g. see eoSSGAWorseReplacement) @ingroup Replacors */ -template +template class eoLinearTruncate : public eoReduce { void operator()(eoPop& _newgen, unsigned _newsize) @@ -183,8 +183,8 @@ class eoLinearTruncate : public eoReduce throw std::logic_error("eoLinearTruncate: Cannot truncate to a larger size!\n"); for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); - _newgen.erase(it); + typename eoPop::iterator it = _newgen.it_worse_element(); + _newgen.erase(it); } } }; @@ -193,7 +193,7 @@ class eoLinearTruncate : public eoReduce To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) @ingroup Replacors */ -template +template class eoDetTournamentTruncate : public eoReduce { public: @@ -201,9 +201,9 @@ public: t_size(_t_size) { if (t_size < 2) - { + { eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncate adjusted to 2" << std::endl; - t_size = 2; + t_size = 2; } } @@ -212,8 +212,8 @@ public: unsigned oldSize = _newgen.size(); if (_newsize == 0) { - _newgen.resize(0); - return; + _newgen.resize(0); + return; } if (oldSize == _newsize) return; @@ -223,15 +223,15 @@ public: // Now OK to erase some losers for (unsigned i=0; i(_newgen, t_size); - //OLDCODE _newgen.erase(&eo); - - // Jeroen Eggermont stdc++v3 patch - // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T - // Because eo already contained a fuction using eoPop::iterator's we will use the following - - _newgen.erase( inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size) ); - + //OLDCODE EOT & eo = inverse_deterministic_tournament(_newgen, t_size); + //OLDCODE _newgen.erase(&eo); + + // Jeroen Eggermont stdc++v3 patch + // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T + // Because eo already contained a fuction using eoPop::iterator's we will use the following + + _newgen.erase( inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size) ); + } } private: @@ -242,7 +242,7 @@ private: To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) @ingroup Replacors */ -template +template class eoStochTournamentTruncate : public eoReduce { public: @@ -250,14 +250,14 @@ public: t_rate(_t_rate) { if (t_rate <= 0.5) - { + { eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51" << std::endl; - t_rate = 0.51; + t_rate = 0.51; } if (t_rate > 1) { eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncate adjusted to 1" << std::endl; - t_rate = 1; + t_rate = 1; } } @@ -266,8 +266,8 @@ public: unsigned oldSize = _newgen.size(); if (_newsize == 0) { - _newgen.resize(0); - return; + _newgen.resize(0); + return; } if (oldSize == _newsize) return; @@ -276,16 +276,16 @@ public: // Now OK to erase some losers for (unsigned i=0; i(_newgen, t_rate); - //OLDCODE _newgen.erase(&eo); - - // Jeroen Eggermont stdc++v3 patch - // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T - // Because eo already contained a fuction using eoPop::iterator's we will use the following - - _newgen.erase( inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate) ); - - + //OLDCODE EOT & eo = inverse_stochastic_tournament(_newgen, t_rate); + //OLDCODE _newgen.erase(&eo); + + // Jeroen Eggermont stdc++v3 patch + // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T + // Because eo already contained a fuction using eoPop::iterator's we will use the following + + _newgen.erase( inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate) ); + + } } diff --git a/eo/src/eoReduceMerge.h b/eo/src/eoReduceMerge.h index 2e6530185..02933b404 100644 --- a/eo/src/eoReduceMerge.h +++ b/eo/src/eoReduceMerge.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoReduceMerge.h + eoReduceMerge.h (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -41,8 +41,8 @@ * @{ */ -/** -eoReduceMerge: Replacement strategies that start by reducing the parents, +/** +eoReduceMerge: Replacement strategies that start by reducing the parents, then merge with the offspring This is the way to do SSGA: the offspring gets inserted in the population @@ -63,10 +63,10 @@ class eoReduceMerge : public eoReplacement void operator()(eoPop& _parents, eoPop& _offspring) { - if (_parents.size() < _offspring.size()) - throw std::logic_error("eoReduceMerge: More offspring than parents!\n"); - reduce(_parents, _parents.size() - _offspring.size()); - merge(_offspring, _parents); + if (_parents.size() < _offspring.size()) + throw std::logic_error("eoReduceMerge: More offspring than parents!\n"); + reduce(_parents, _parents.size() - _offspring.size()); + merge(_offspring, _parents); } private : @@ -74,10 +74,10 @@ class eoReduceMerge : public eoReplacement eoMerge& merge; }; -/** +/** SSGA replace worst. Is an eoReduceMerge. */ -template +template class eoSSGAWorseReplacement : public eoReduceMerge { public : @@ -88,15 +88,15 @@ class eoSSGAWorseReplacement : public eoReduceMerge eoPlus plus; }; -/** +/** SSGA deterministic tournament replacement. Is an eoReduceMerge. */ -template +template class eoSSGADetTournamentReplacement : public eoReduceMerge { public : - eoSSGADetTournamentReplacement(unsigned _t_size) : - eoReduceMerge(truncate, plus), truncate(_t_size) {} + eoSSGADetTournamentReplacement(unsigned _t_size) : + eoReduceMerge(truncate, plus), truncate(_t_size) {} private : eoDetTournamentTruncate truncate; @@ -104,16 +104,16 @@ class eoSSGADetTournamentReplacement : public eoReduceMerge }; /** SSGA stochastic tournament replacement. Is an eoReduceMerge. -It much cleaner to insert directly the offspring in the parent population, -but it is NOT equivalent in case of more than 1 offspring as already -replaced could be removed , which is not possible in the eoReduceMerge +It much cleaner to insert directly the offspring in the parent population, +but it is NOT equivalent in case of more than 1 offspring as already +replaced could be removed , which is not possible in the eoReduceMerge So what the heck ! */ -template +template class eoSSGAStochTournamentReplacement : public eoReduceMerge { public : - eoSSGAStochTournamentReplacement(double _t_rate) : - eoReduceMerge(truncate, plus), truncate(_t_rate) {} + eoSSGAStochTournamentReplacement(double _t_rate) : + eoReduceMerge(truncate, plus), truncate(_t_rate) {} private : eoStochTournamentTruncate truncate; diff --git a/eo/src/eoReduceMergeReduce.h b/eo/src/eoReduceMergeReduce.h index 41629267a..17721f733 100644 --- a/eo/src/eoReduceMergeReduce.h +++ b/eo/src/eoReduceMergeReduce.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoReduceMergeReduce.h + eoReduceMergeReduce.h (c) Maarten Keijzer, Marc Schoenauer, 2002 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -49,13 +49,13 @@ template class eoReduceMergeReduce : public eoReplacement { public: - eoReduceMergeReduce(eoHowMany _howManyElite, - bool _strongElitism, - eoHowMany _howManyReducedParents, - eoReduce & _reduceParents, - eoHowMany _howManyReducedOffspring, - eoReduce & _reduceOffspring, - eoReduce & _reduceFinal) : + eoReduceMergeReduce(eoHowMany _howManyElite, + bool _strongElitism, + eoHowMany _howManyReducedParents, + eoReduce & _reduceParents, + eoHowMany _howManyReducedOffspring, + eoReduce & _reduceOffspring, + eoReduce & _reduceFinal) : howManyElite(_howManyElite), strongElitism(_strongElitism), howManyReducedParents(_howManyReducedParents), @@ -64,7 +64,7 @@ public: reduceOffspring(_reduceOffspring), reduceFinal(_reduceFinal) {} - + void operator()(eoPop & _parents, eoPop & _offspring) { eoPop temp; @@ -72,66 +72,66 @@ public: unsigned int offSize = _offspring.size(); unsigned int elite = howManyElite(finalPopSize); - if (elite) // some parents MUST be saved somewhere - { - temp.resize(elite); - _parents.nth_element(elite); - std::copy(_parents.begin(), _parents.begin()+elite, temp.begin()); - _parents.erase(_parents.begin(), _parents.begin()+elite); - } + if (elite) // some parents MUST be saved somewhere + { + temp.resize(elite); + _parents.nth_element(elite); + std::copy(_parents.begin(), _parents.begin()+elite, temp.begin()); + _parents.erase(_parents.begin(), _parents.begin()+elite); + } // the reduce steps. First the parents unsigned reducedParentSize = howManyReducedParents(_parents.size()); if (!reducedParentSize) - _parents.clear(); + _parents.clear(); else if (reducedParentSize != _parents.size()) - reduceParents(_parents, reducedParentSize); + reduceParents(_parents, reducedParentSize); // then the offspring unsigned reducedOffspringSize = howManyReducedOffspring(offSize); if (!reducedOffspringSize) - throw std::runtime_error("No offspring left after reduction!"); + throw std::runtime_error("No offspring left after reduction!"); if (reducedOffspringSize != offSize) // need reduction - reduceOffspring(_offspring, reducedOffspringSize); + reduceOffspring(_offspring, reducedOffspringSize); // now merge reduced populations _parents.resize(reducedParentSize + _offspring.size()); - std::copy(_offspring.begin(), _offspring.end(), - _parents.begin()+reducedParentSize); + std::copy(_offspring.begin(), _offspring.end(), + _parents.begin()+reducedParentSize); // reduce the resulting population // size depstd::ends on elitism if (elite && strongElitism) - { - if (_parents.size() != finalPopSize-elite) - reduceFinal(_parents, finalPopSize-elite); - // and put back the elite - unsigned oldPSize = _parents.size(); - _parents.resize(_parents.size()+elite); - std::copy(temp.begin(), temp.end(), _parents.begin()+oldPSize); - } - else - { // only reduce final pop to right size - if (_parents.size() != finalPopSize) - reduceFinal(_parents, finalPopSize); - if (elite) // then treat weak elitism - { - unsigned toSave = 0; - _parents.sort(); - EOT & eoLimit = _parents[elite-1]; - unsigned index=0; - while ( (temp[index++] > eoLimit) && (index < temp.size()) ) - toSave++; - if (toSave) - for (unsigned i=0; i eoLimit) && (index < temp.size()) ) + toSave++; + if (toSave) + for (unsigned i=0; i weak estd::listism + eoHowMany howManyElite; // if 0, no elitism at all + bool strongElitism; // if false -> weak estd::listism eoHowMany howManyReducedParents; // if 0, no parent in final replacement eoHowMany howManyReducedOffspring; // if 0, std::runtime_error // the reducers diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index db1190328..ce22d0275 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -4,7 +4,7 @@ // eoReduceSplit.h // Base class for population-reducing classes - retaining the poor losers // (c) GeNeura Team, 1998, Marc Schoenauer, 2002 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -47,16 +47,16 @@ template class eoReduceSplit: public eoBF&, eoPop &, {}; /** deterministic truncation method using sort */ -template +template class eoTruncateSplit : public eoReduceSplit { public: - /** Ctor: must provide amount of reduction, + /** Ctor: must provide amount of reduction, and whether or not you need to return the eliminated guys */ eoTruncateSplit(eoHowMany _howMany, bool _returnEliminated = false): howMany(_howMany), returnEliminated(_returnEliminated) {} - + /** do the jonb */ void operator()(eoPop& _newgen, eoPop & _eliminated) { @@ -67,13 +67,13 @@ public: unsigned newsize = popSize - eliminated; if (newsize < 0) throw std::logic_error("eoTruncateSplit: Cannot truncate to a larger size!\n"); - + _newgen.nth_element(newsize); // save poor losers if necessary if (returnEliminated) for (unsigned i=0; i +template class eoLinearTruncateSplit : public eoReduceSplit { public: - /** Ctor: must provide amount of reduction, + /** Ctor: must provide amount of reduction, and whether or not you need to return the eliminated guys */ eoLinearTruncateSplit(eoHowMany _howMany, bool _returnEliminated = false): howMany(_howMany), returnEliminated(_returnEliminated) {} - + /** do the job */ void operator()(eoPop& _newgen, eoPop & _eliminated) { @@ -111,10 +111,10 @@ public: _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); - if (returnEliminated) - _eliminated.push_back(*it); - _newgen.erase(it); + typename eoPop::iterator it = _newgen.it_worse_element(); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); } } @@ -124,16 +124,16 @@ private: }; /** random truncation - batch version */ -template +template class eoRandomSplit : public eoReduceSplit { public: - /** Ctor: must provide amount of reduction, + /** Ctor: must provide amount of reduction, and whether or not you need to return the eliminated guys */ eoRandomSplit(eoHowMany _howMany, bool _returnEliminated = false): howMany(_howMany), returnEliminated(_returnEliminated) {} - + /** do the job */ void operator()(eoPop& _newgen, eoPop & _eliminated) { @@ -150,7 +150,7 @@ public: // save poor losers if necessary if (returnEliminated) for (unsigned i=0; i +template class eoLinearRandomSplit : public eoReduceSplit { public: - /** Ctor: must provide amount of reduction, + /** Ctor: must provide amount of reduction, and whether or not you need to return the eliminated guys */ eoLinearRandomSplit(eoHowMany _howMany, bool _returnEliminated = false): howMany(_howMany), returnEliminated(_returnEliminated) {} - + /** do the job */ void operator()(eoPop& _newgen, eoPop & _eliminated) { @@ -187,11 +187,11 @@ public: _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i::iterator it = _newgen.begin()+loser; - if (returnEliminated) - _eliminated.push_back(*it); - _newgen.erase(it); + unsigned loser=random(_newgen.size()); + typename eoPop::iterator it = _newgen.begin()+loser; + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); } return ; } @@ -205,22 +205,22 @@ private: /** a ReduceSplit class based on a repeated deterministic (reverse!) tournament To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) */ -template +template class eoDetTournamentTruncateSplit : public eoReduceSplit { public: - /** Ctor: must provide amount of reduction, + /** Ctor: must provide amount of reduction, and whether or not you need to return the eliminated guys */ - eoDetTournamentTruncateSplit(unsigned _t_size, eoHowMany _howMany, - bool _returnEliminated = false): - t_size(_t_size), howMany(_howMany), - returnEliminated(_returnEliminated) + eoDetTournamentTruncateSplit(unsigned _t_size, eoHowMany _howMany, + bool _returnEliminated = false): + t_size(_t_size), howMany(_howMany), + returnEliminated(_returnEliminated) { if (t_size < 2) - { + { eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2" << std::endl; - t_size = 2; + t_size = 2; } } @@ -240,10 +240,10 @@ public: _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i::iterator it = inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size); - if (returnEliminated) - _eliminated.push_back(*it); - _newgen.erase(it); + typename eoPop::iterator it = inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); } } @@ -256,27 +256,27 @@ private: /** a ReduceSplit class based on a repeated deterministic (reverse!) tournament To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) */ -template +template class eoStochTournamentTruncateSplit : public eoReduce { public: - /** Ctor: must provide amount of reduction, + /** Ctor: must provide amount of reduction, and whether or not you need to return the eliminated guys */ - eoStochTournamentTruncateSplit(double _t_rate, eoHowMany _howMany, - bool _returnEliminated = false): - t_rate(_t_rate), howMany(_howMany), - returnEliminated(_returnEliminated) + eoStochTournamentTruncateSplit(double _t_rate, eoHowMany _howMany, + bool _returnEliminated = false): + t_rate(_t_rate), howMany(_howMany), + returnEliminated(_returnEliminated) { if (t_rate <= 0.5) - { + { eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl; - t_rate = 0.51; + t_rate = 0.51; } if (t_rate > 1) { eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1" << std::endl; - t_rate = 1; + t_rate = 1; } } @@ -285,7 +285,7 @@ public: //BUG??? void operator()(eoPop& _newgen, unsigned _newsize) { /* old version - if (!_eliminated.size()) // nothing to do + if (!_eliminated.size()) // nothing to do return; unsigned oldSize = _newgen.size(); unsigned newSize = oldSize - _eliminated.size(); @@ -308,10 +308,10 @@ end of old version */ _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? for (unsigned i=0; i<_eliminated.size(); i++) { - typename eoPop::iterator it = inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate); - if (returnEliminated) - _eliminated.push_back(*it); - _newgen.erase(it); + typename eoPop::iterator it = inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); } } diff --git a/eo/src/eoReplacement.h b/eo/src/eoReplacement.h index 2c2d89844..033d441cb 100644 --- a/eo/src/eoReplacement.h +++ b/eo/src/eoReplacement.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoReplacement.h + eoReplacement.h (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -36,9 +36,9 @@ #include //----------------------------------------------------------------------------- -/** +/** --- -The eoMergeReduce, combination of eoMerge and eoReduce, can be found +The eoMergeReduce, combination of eoMerge and eoReduce, can be found in file eoMergeReduce.h The eoReduceMergeReduce that reduces the parents and the offspring, @@ -47,15 +47,15 @@ population, can be found in eoReduceMergeReduce.h LOG --- -Removed the const before first argument: though it makes too many classes -with the same interface, it allows to minimize the number of actual copies +Removed the const before first argument: though it makes too many classes +with the same interface, it allows to minimize the number of actual copies by choosing the right destination I also removed the enforced "swap" in the eoEasyAlgo and hence the generational -replacement gets a class of its own that only does the swap (instead of the +replacement gets a class of its own that only does the swap (instead of the eoNoReplacement that did nothing, relying on the algo to swap popualtions). MS 12/12/2000 - @see eoMerge, eoReduce, eoMergeReduce, eoReduceMerge + @see eoMerge, eoReduce, eoMergeReduce, eoReduceMerge @class eoReplacement, base (pure abstract) class @class eoGenerationalReplacement, as it says ... @@ -67,7 +67,7 @@ MS 12/12/2000 NOTE: two eoPop as arguments the resulting population should be in the first argument (replace -parents by offspring)! The second argument can contain any rubbish +parents by offspring)! The second argument can contain any rubbish @ingroup Replacors */ @@ -91,10 +91,10 @@ class eoGenerationalReplacement : public eoReplacement } }; -/** -eoWeakElitistReplacement: a wrapper for other replacement procedures. -Copies in the new pop the best individual from the old pop, -AFTER normal replacement, if the best of the new pop is worse than the best +/** +eoWeakElitistReplacement: a wrapper for other replacement procedures. +Copies in the new pop the best individual from the old pop, +AFTER normal replacement, if the best of the new pop is worse than the best of the old pop. Removes the worse individual from the new pop. This could be changed by adding a selector there... @@ -114,11 +114,11 @@ public : void operator()(eoPop& _pop, eoPop& _offspring) { const EOT oldChamp = _pop.best_element(); - replace(_pop, _offspring); // "normal" replacement, parents are the new + replace(_pop, _offspring); // "normal" replacement, parents are the new if (_pop.best_element() < oldChamp) // need to do something { - typename eoPop::iterator itPoorGuy = _pop.it_worse_element(); - (*itPoorGuy) = oldChamp; + typename eoPop::iterator itPoorGuy = _pop.it_worse_element(); + (*itPoorGuy) = oldChamp; } } private: diff --git a/eo/src/eoRingTopology.h b/eo/src/eoRingTopology.h index 74705ac1e..6bad13cd7 100644 --- a/eo/src/eoRingTopology.h +++ b/eo/src/eoRingTopology.h @@ -3,10 +3,10 @@ //----------------------------------------------------------------------------- // eoRingTopology.h // (c) INRIA Futurs DOLPHIN 2007 -/* +/* Clive Canape - Thomas Legrand - + Thomas Legrand + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -48,7 +48,7 @@ template < class POT > class eoRingTopology:public eoTopology public: /** - * The only Ctor. + * The only Ctor. * @param _neighborhoodSize - The size of each neighborhood. */ eoRingTopology (unsigned _neighborhoodSize):neighborhoodSize (_neighborhoodSize),isSetup(false){} @@ -68,16 +68,16 @@ public: int k = neighborhoodSize/2; for (unsigned i=0;i < _pop.size();i++) { - eoSocialNeighborhood currentNghd; - currentNghd.best(_pop[i]); - for (unsigned j=0; j < neighborhoodSize; j++) - { - currentNghd.put((_pop.size()+i-k+j)%_pop.size()); - if(_pop[(_pop.size()+i-k+j)%_pop.size()].fitness() > currentNghd.best().fitness()) + eoSocialNeighborhood currentNghd; + currentNghd.best(_pop[i]); + for (unsigned j=0; j < neighborhoodSize; j++) + { + currentNghd.put((_pop.size()+i-k+j)%_pop.size()); + if(_pop[(_pop.size()+i-k+j)%_pop.size()].fitness() > currentNghd.best().fitness()) currentNghd.best(_pop[(_pop.size()+i-k+j)%_pop.size()]); } - neighborhoods.push_back(currentNghd); - } + neighborhoods.push_back(currentNghd); + } isSetup=true; } else @@ -90,7 +90,7 @@ public: */ } } - + /** * Retrieves the neighboorhood of a particle. * @return _indice - The particle indice (in the population) @@ -109,20 +109,20 @@ public: */ void updateNeighborhood(POT & _po,unsigned _indice) { - //this->printOn();exit(0); + //this->printOn();exit(0); // update the best fitness of the particle if (_po.fitness() > _po.best()) { _po.best(_po.fitness()); for(unsigned i=0;i<_po.size();i++) - _po.bestPositions[i]=_po[i]; + _po.bestPositions[i]=_po[i]; } // update the global best if the given particle is "better" for (unsigned i=-neighborhoodSize+1; i < neighborhoodSize; i++) - { - unsigned indi = (_po.size()+_indice+i)%_po.size(); - if (_po.fitness() > neighborhoods[indi].best().fitness()) - neighborhoods[indi].best(_po); + { + unsigned indi = (_po.size()+_indice+i)%_po.size(); + if (_po.fitness() > neighborhoods[indi].best().fitness()) + neighborhoods[indi].best(_po); } } @@ -132,9 +132,9 @@ public: * @param _indice - The indice of a particle in the population * @return POT & - The best particle in the neighborhood of the particle whose indice is _indice */ - POT & best (unsigned _indice) + POT & best (unsigned _indice) { - unsigned theGoodNhbd= retrieveNeighborhoodByIndice(_indice); + unsigned theGoodNhbd= retrieveNeighborhoodByIndice(_indice); return (neighborhoods[theGoodNhbd].best()); } @@ -155,35 +155,35 @@ public: std::cout << "}" << std::endl; } } - + /* - * Return the global best of the topology - */ - virtual POT & globalBest() + * Return the global best of the topology + */ + virtual POT & globalBest() { - POT gBest,tmp; - unsigned indGlobalBest=0; - if(neighborhoods.size()==1) - return neighborhoods[0].best(); - - gBest=neighborhoods[0].best(); - for(unsigned i=1;i > neighborhoods; - unsigned neighborhoodSize; + unsigned neighborhoodSize; bool isSetup; }; /** @example t-eoRingTopology.cpp diff --git a/eo/src/eoSGA.h b/eo/src/eoSGA.h index d17d743d3..b31dff04e 100644 --- a/eo/src/eoSGA.h +++ b/eo/src/eoSGA.h @@ -58,7 +58,7 @@ public : eoQuadOp& _cross, float _crate, eoMonOp& _mutate, float _mrate, eoEvalFunc& _eval, - eoContinue& _cont) + eoContinue& _cont) : cont(_cont), mutate(_mutate), mutationRate(_mrate), @@ -73,34 +73,34 @@ public : do { - select(_pop, offspring); + select(_pop, offspring); - unsigned i; + unsigned i; - for (i=0; i<_pop.size()/2; i++) - { - if ( rng.flip(crossoverRate) ) - { - // this crossover generates 2 offspring from two parents - if (cross(offspring[2*i], offspring[2*i+1])) + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverRate) ) + { + // this crossover generates 2 offspring from two parents + if (cross(offspring[2*i], offspring[2*i+1])) { offspring[2*i].invalidate(); offspring[2*i+1].invalidate(); } } - } + } - for (i=0; i < offspring.size(); i++) - { - if (rng.flip(mutationRate) ) - { - if (mutate(offspring[i])) + for (i=0; i < offspring.size(); i++) + { + if (rng.flip(mutationRate) ) + { + if (mutate(offspring[i])) offspring[i].invalidate(); - } - } + } + } - _pop.swap(offspring); - apply(eval, _pop); + _pop.swap(offspring); + apply(eval, _pop); } while (cont(_pop)); } diff --git a/eo/src/eoSGAGenOp.h b/eo/src/eoSGAGenOp.h index 922a46ca9..f08b2104e 100644 --- a/eo/src/eoSGAGenOp.h +++ b/eo/src/eoSGAGenOp.h @@ -33,40 +33,40 @@ // class eoSGAGenOp /////////////////////////////////////////////////////////////////////////////// -/** - * eoSGAGenOp (for Simple GA) mimicks the usual crossover with proba pCross + +/** + * eoSGAGenOp (for Simple GA) mimicks the usual crossover with proba pCross + * mutation with proba pMut inside an eoGeneralOp - * It does it exactly as class eoSGATransform, i.e. only accepts + * It does it exactly as class eoSGATransform, i.e. only accepts * quadratic crossover and unary mutation * It was introduced for didactic reasons, but seems to be popular :-) * * @ingroup Combination */ - template + template class eoSGAGenOp : public eoGenOp { public: - + /** Ctor from crossover (with proba) and mutation (with proba) * Builds the sequential op that first applies a proportional choice * between the crossover and nothing (cloning), then the mutation */ - eoSGAGenOp(eoQuadOp& _cross, double _pCross, - eoMonOp& _mut, double _pMut) + eoSGAGenOp(eoQuadOp& _cross, double _pCross, + eoMonOp& _mut, double _pMut) : cross(_cross), pCross(_pCross), - mut(_mut), - pMut(_pMut) + mut(_mut), + pMut(_pMut) { // the crossover - with probability pCross propOp.add(cross, pCross); // crossover, with proba pcross propOp.add(quadClone, 1-pCross); // nothing, with proba 1-pcross - + // now the sequential - op.add(propOp, 1.0); // always do combined crossover + op.add(propOp, 1.0); // always do combined crossover op.add(mut, pMut); // then mutation, with proba pmut } - + /** do the job: delegate to op */ virtual void apply(eoPopulator& _pop) { diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index 57d5ea81b..55b5e5eda 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -38,7 +38,7 @@ #include /** eoSGATransform: transforms a population using genetic operators. - * It does it exactly as class eoSGA, i.e. only accepts + * It does it exactly as class eoSGA, i.e. only accepts * quadratic crossover and unary mutation * It is here mainly for tutorial reasons * @@ -47,13 +47,13 @@ template class eoSGATransform : public eoTransform { public: - + /// Default constructor. - eoSGATransform(eoQuadOp& _cross, double _cProba, - eoMonOp& _mutate, double _mProba) + eoSGATransform(eoQuadOp& _cross, double _cProba, + eoMonOp& _mutate, double _mProba) : cross(_cross), crossoverProba(_cProba), - mutate(_mutate), + mutate(_mutate), mutationProba(_mProba) {} @@ -61,29 +61,29 @@ template class eoSGATransform : public eoTransform * Transforms a population. * @param _pop The population to be transformed. */ - void operator()(eoPop& _pop) + void operator()(eoPop& _pop) { unsigned i; - - for (i=0; i<_pop.size()/2; i++) + + for (i=0; i<_pop.size()/2; i++) { - if ( rng.flip(crossoverProba) ) - { - // this crossover generates 2 offspring from two parents - cross(_pop[2*i], _pop[2*i+1]); - } + if ( rng.flip(crossoverProba) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } } - for (i=0; i < _pop.size(); i++) + for (i=0; i < _pop.size(); i++) { - if (rng.flip(mutationProba) ) - { - mutate(_pop[i]); - } - + if (rng.flip(mutationProba) ) + { + mutate(_pop[i]); + } + } }; - + private: eoInvalidateQuadOp cross; double crossoverProba; @@ -93,7 +93,7 @@ template class eoSGATransform : public eoTransform /** eoDynSGATransform: transforms a population using genetic operators. * It is the Dynamic version of the above eoSGATransform - * i.e. the operators probabilities can be passed as an eoValueParam, + * i.e. the operators probabilities can be passed as an eoValueParam, * and hence can be modified from outside * It is here mainly for tutorial reasons * @@ -102,23 +102,23 @@ template class eoSGATransform : public eoTransform template class eoDynSGATransform : public eoTransform { public: - + /// Default constructor - receives values - eoDynSGATransform(eoQuadOp& _cross, double _cProba, - eoMonOp& _mutate, double _mProba) + eoDynSGATransform(eoQuadOp& _cross, double _cProba, + eoMonOp& _mutate, double _mProba) : cross(_cross), crossoverProbaHolder(_cProba), crossoverProba(crossoverProbaHolder), - mutate(_mutate), + mutate(_mutate), mutationProbaHolder(_mProba), mutationProba(mutationProbaHolder) {} /// This constructor receives pointers // these will usually be some eoValueParam.value() // hence the ...Holder data will bever be used in this case - eoDynSGATransform(eoQuadOp& _cross, double* _cProbaRef, - eoMonOp& _mutate, double* _mProbaRef) + eoDynSGATransform(eoQuadOp& _cross, double* _cProbaRef, + eoMonOp& _mutate, double* _mProbaRef) : cross(_cross), crossoverProbaHolder(0), crossoverProba(*_cProbaRef), - mutate(_mutate), + mutate(_mutate), mutationProbaHolder(0), mutationProba(*_mProbaRef) {} @@ -126,34 +126,34 @@ template class eoDynSGATransform : public eoTransform * Transforms a population. * @param _pop The population to be transformed. */ - void operator()(eoPop& _pop) + void operator()(eoPop& _pop) { unsigned i; - - for (i=0; i<_pop.size()/2; i++) + + for (i=0; i<_pop.size()/2; i++) { - if ( rng.flip(crossoverProba) ) - { - // this crossover generates 2 offspring from two parents - cross(_pop[2*i], _pop[2*i+1]); - } + if ( rng.flip(crossoverProba) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } } - for (i=0; i < _pop.size(); i++) + for (i=0; i < _pop.size(); i++) { - if (rng.flip(mutationProba) ) - { - mutate(_pop[i]); - } - + if (rng.flip(mutationProba) ) + { + mutate(_pop[i]); + } + } }; // accessors - mainly for EASEA - double & PCrossHandle() { return crossoverProba;} + double & PCrossHandle() { return crossoverProba;} double & PMutHandle() { return mutationProba;} private: - // difference with eoSGATransform: the operator probabilities + // difference with eoSGATransform: the operator probabilities // they can be passed by reference or by value. // hence we need here to use a reference, and to eventually store a value eoInvalidateQuadOp cross; diff --git a/eo/src/eoSIGContinue.cpp b/eo/src/eoSIGContinue.cpp index 4bc4ca249..2f126ea91 100644 --- a/eo/src/eoSIGContinue.cpp +++ b/eo/src/eoSIGContinue.cpp @@ -1,34 +1,34 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoSIGContinue.cpp -// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - Johann DrĂ©o - Caner Candan + Johann DrĂ©o + Caner Candan */ //----------------------------------------------------------------------------- #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #include #include diff --git a/eo/src/eoSIGContinue.h b/eo/src/eoSIGContinue.h index 36546fb0a..d7db55d33 100644 --- a/eo/src/eoSIGContinue.h +++ b/eo/src/eoSIGContinue.h @@ -1,28 +1,28 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoSIGContinue.h -// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 /* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - Johann DrĂ©o - Caner Candan + Johann DrĂ©o + Caner Candan */ //----------------------------------------------------------------------------- // the same thing can probably be done in MS environement, but I hoave no way @@ -75,8 +75,8 @@ public: { if (call_func) { - _fct(_sig); - call_func = false; + _fct(_sig); + call_func = false; } return true; diff --git a/eo/src/eoSTLFunctor.h b/eo/src/eoSTLFunctor.h index c21f161c6..04f96f9ca 100644 --- a/eo/src/eoSTLFunctor.h +++ b/eo/src/eoSTLFunctor.h @@ -29,7 +29,7 @@ #include "eoFunctor.h" -/** @addtogroup Utilities +/** @addtogroup Utilities * @{ */ @@ -121,4 +121,3 @@ class eoSTLBF : public std::binary_function /** @} */ #endif - diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index aa8d57a15..f3a3a4bba 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -63,8 +63,8 @@ class eoScalarFitness bool operator<(const eoScalarFitness& other) const { return Compare()(value, other.value); } - /// Comparison, using less by default - // needed for MSVC 8 (MSVC 2005) added by J.Eggermont 20-11-2006 + /// Comparison, using less by default + // needed for MSVC 8 (MSVC 2005) added by J.Eggermont 20-11-2006 bool operator<(const ScalarType& other) const { return Compare()(value, other); } diff --git a/eo/src/eoScalarFitnessAssembled.cpp b/eo/src/eoScalarFitnessAssembled.cpp index a30289abc..58f7615fa 100644 --- a/eo/src/eoScalarFitnessAssembled.cpp +++ b/eo/src/eoScalarFitnessAssembled.cpp @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoScalarFitnessAssembled.cpp // Marc Wintermantel & Oliver Koenig @@ -11,16 +11,16 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@inria.fr mak@dhi.dk @@ -29,13 +29,10 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #include "eoScalarFitnessAssembled.h" // need to allocate the static variables of class eoScalarFitnessAssembledTraits std::vector eoScalarFitnessAssembledTraits::TermDescriptions; - - - diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index f84a805d9..95168ec64 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -110,8 +110,8 @@ public: {} eoScalarFitnessAssembled( size_type _n, - const ScalarType& _val, - const std::string& _descr="Unnamed variable" ) + const ScalarType& _val, + const std::string& _descr="Unnamed variable" ) : baseVector(_n, _val), feasible(true), failed(false), msg("") { @@ -225,10 +225,10 @@ public: //! Comparison with ScalarTypes. Explicit definition needed to compile with VS 8.0 bool operator<(ScalarType x) const{ - eoScalarFitnessAssembled ScalarFitness(x); - return this->operator<(ScalarFitness); + eoScalarFitnessAssembled ScalarFitness(x); + return this->operator<(ScalarFitness); } - + // implementation of the other operators bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } @@ -239,7 +239,7 @@ public: bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } }; -/** +/** * @example t-eoFitnessAssembledEA.cpp */ @@ -282,4 +282,3 @@ std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled -/** +/** Timed continuator: continues until a number of seconds is used @ingroup Continuators @@ -44,29 +44,29 @@ public: virtual bool operator() ( const eoPop& _vEO ) { time_t now = time(0); time_t diff = now - start; - + if (diff >= seconds) return false; // stop return true; } - + virtual std::string className(void) const { return "eoSecondsElapsedContinue"; } /** REad from a stream * @param __is the ostream to read from */ void readFrom (std :: istream & __is) { - - __is >> start >> seconds; + + __is >> start >> seconds; } - + /** Print on a stream * @param __os the ostream to print on */ void printOn (std :: ostream & __os) const { - - __os << start << ' ' << seconds << std :: endl; + + __os << start << ' ' << seconds << std :: endl; } }; @@ -74,4 +74,3 @@ public: */ #endif - diff --git a/eo/src/eoSelect.h b/eo/src/eoSelect.h index ea5c8592b..aae338434 100644 --- a/eo/src/eoSelect.h +++ b/eo/src/eoSelect.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoSelect.h + eoSelect.h (c) Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,7 +30,7 @@ #include //----------------------------------------------------------------------------- -/** +/** eoSelect selects a number of individuals from the first argument and puts it in the second. To emphasize that it should not try to enlarge the population, the second argument is an eoPopRange, a simple struct diff --git a/eo/src/eoSelectFactory.h b/eo/src/eoSelectFactory.h index 59d2306ac..9dc19dabf 100644 --- a/eo/src/eoSelectFactory.h +++ b/eo/src/eoSelectFactory.h @@ -4,7 +4,7 @@ //----------------------------------------------------------------------------- // EOFactory.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -41,52 +41,52 @@ eoSelect objects */ template< class EOT> class eoSelectFactory: public eoFactory > { - + public: - - /// @name ctors and dtors - //{@ - /// constructor - eoSelectFactory( ) {} - - /// destructor - virtual ~eoSelectFactory() {} - //@} - /** Another factory methods: creates an object from an std::istream, reading from - it whatever is needed to create the object. Usually, the format for the std::istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - */ - virtual eoSelect* make(std::istream& _is) { - eoSelect * selectPtr; - std::string objectTypeStr; - _is >> objectTypeStr; - // All selectors have a rate, the proportion of the original population - float rate; - _is >> rate; - if ( objectTypeStr == "eoTournament") { - // another parameter is necessary - unsigned tSize; - _is >> tSize; - selectPtr = new eoTournament( rate, tSize ); - } else { - if ( objectTypeStr == "eoRandomSelect" ) { - selectPtr = new eoRandomSelect( rate ); - } else { - throw std::runtime_error( "Incorrect selector type" ); - } - } - return selectPtr; - } + /// @name ctors and dtors + //{@ + /// constructor + eoSelectFactory( ) {} - ///@name eoObject methods - //@{ - void printOn( std::ostream& _os ) const {}; - void readFrom( std::istream& _is ){}; + /// destructor + virtual ~eoSelectFactory() {} + //@} + + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual eoSelect* make(std::istream& _is) { + eoSelect * selectPtr; + std::string objectTypeStr; + _is >> objectTypeStr; + // All selectors have a rate, the proportion of the original population + float rate; + _is >> rate; + if ( objectTypeStr == "eoTournament") { + // another parameter is necessary + unsigned tSize; + _is >> tSize; + selectPtr = new eoTournament( rate, tSize ); + } else { + if ( objectTypeStr == "eoRandomSelect" ) { + selectPtr = new eoRandomSelect( rate ); + } else { + throw std::runtime_error( "Incorrect selector type" ); + } + } + return selectPtr; + } + + ///@name eoObject methods + //@{ + void printOn( std::ostream& _os ) const {}; + void readFrom( std::istream& _is ){}; + + /** className is inherited */ + //@} - /** className is inherited */ - //@} - }; diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index e338ea316..a2fd5ed26 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -194,7 +194,7 @@ public: eoSelectFromWorth::setup(_pop); total = 0.0; for (worthIterator it = perf2Worth.value().begin(); - it& _pop) { // cout << "On affiche les worths\n"; // for (unsigned i=0; - // i //----------------------------------------------------------------------------- -/** eoSelectMany selects many individuals using eoSelectOne as it's +/** eoSelectMany selects many individuals using eoSelectOne as it's mechanism. Therefore eoSelectMany needs an eoSelectOne in its ctor It will use an eoHowMnay to determine the number of guys to select, @@ -48,12 +48,12 @@ class eoSelectMany : public eoSelect { public: /// init - eoSelectMany(eoSelectOne& _select, - double _rate, bool _interpret_as_rate = true) + eoSelectMany(eoSelectOne& _select, + double _rate, bool _interpret_as_rate = true) : select(_select), howMany(_rate, _interpret_as_rate) {} // Ctor with eoHowMany - eoSelectMany(eoSelectOne& _select, eoHowMany _howMany) + eoSelectMany(eoSelectOne& _select, eoHowMany _howMany) : select(_select), howMany(_howMany) {} /** @@ -65,15 +65,15 @@ class eoSelectMany : public eoSelect virtual void operator()(const eoPop& _source, eoPop& _dest) { unsigned target = howMany(_source.size()); - + _dest.resize(target); - + select.setup(_source); - + for (size_t i = 0; i < _dest.size(); ++i) _dest[i] = select(_source); } - + private : eoSelectOne& select; eoHowMany howMany; diff --git a/eo/src/eoSelectNumber.h b/eo/src/eoSelectNumber.h index 52cee6622..f6f094ef2 100644 --- a/eo/src/eoSelectNumber.h +++ b/eo/src/eoSelectNumber.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoSelectNumber.h + eoSelectNumber.h (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -32,7 +32,7 @@ #include //----------------------------------------------------------------------------- -/** eoSelectNumber selects many individuals using eoSelectOne as it's +/** eoSelectNumber selects many individuals using eoSelectOne as it's mechanism. Therefore eoSelectNumber needs an eoSelectOne in its ctor It will select a fixed number of individuals and pushes them to @@ -45,7 +45,7 @@ class eoSelectNumber : public eoSelect { public: /// init - eoSelectNumber(eoSelectOne& _select, unsigned _nb_to_select = 1) + eoSelectNumber(eoSelectOne& _select, unsigned _nb_to_select = 1) : select(_select), nb_to_select(_nb_to_select) {} /** @@ -57,15 +57,15 @@ class eoSelectNumber : public eoSelect virtual void operator()(const eoPop& _source, eoPop& _dest) { size_t target = static_cast(nb_to_select); - + _dest.resize(target); - + select.setup(_source); - + for (size_t i = 0; i < _dest.size(); ++i) _dest[i] = select(_source); } - + private : eoSelectOne& select; unsigned nb_to_select; diff --git a/eo/src/eoSelectOne.h b/eo/src/eoSelectOne.h index 3b27a4e3a..5afdd1404 100644 --- a/eo/src/eoSelectOne.h +++ b/eo/src/eoSelectOne.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoSelectOne.h + eoSelectOne.h (c) Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -50,7 +50,7 @@ class eoSelectOne : public eoUF&, const EOT&> /// virtual function to setup some population stats (for instance eoProportional can benefit greatly from this) virtual void setup(const eoPop& _pop) { - (void)_pop; + (void)_pop; } }; /** @example t-selectOne.cpp diff --git a/eo/src/eoSelectPerc.h b/eo/src/eoSelectPerc.h index d4aacfdad..131a3d591 100644 --- a/eo/src/eoSelectPerc.h +++ b/eo/src/eoSelectPerc.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoSelectPerc.h + eoSelectPerc.h (c) Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -32,7 +32,7 @@ #include //----------------------------------------------------------------------------- -/** eoSelectPerc selects many individuals using eoSelectOne as it's +/** eoSelectPerc selects many individuals using eoSelectOne as it's mechanism. Therefore eoSelectPerc needs an eoSelectOne in its ctor It will select floor(rate*pop.size()) individuals and pushes them to @@ -45,11 +45,11 @@ class eoSelectPerc : public eoSelect { public: /// init - eoSelectPerc(eoSelectOne& _select, float _rate = 1.0) + eoSelectPerc(eoSelectOne& _select, float _rate = 1.0) : select(_select), rate(_rate) {} /** - The implementation selects a percentage + The implementation selects a percentage @param _source the source population @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) @@ -57,15 +57,15 @@ class eoSelectPerc : public eoSelect virtual void operator()(const eoPop& _source, eoPop& _dest) { size_t target = static_cast(floor(rate * _source.size())); - + _dest.resize(target); - + select.setup(_source); - + for (size_t i = 0; i < _dest.size(); ++i) _dest[i] = select(_source); } - + private : eoSelectOne& select; float rate; diff --git a/eo/src/eoSequentialSelect.h b/eo/src/eoSequentialSelect.h index a30c9248e..1a1f02e4e 100644 --- a/eo/src/eoSequentialSelect.h +++ b/eo/src/eoSequentialSelect.h @@ -58,13 +58,13 @@ template class eoSequentialSelect: public eoSelectOne not very elegant, maybe ... */ eoSequentialSelect(bool _ordered = true) - : ordered(_ordered), current(std::numeric_limits::max()) {} + : ordered(_ordered), current(std::numeric_limits::max()) {} void setup(const eoPop& _pop) { eoPters.resize(_pop.size()); if (ordered) // probably we could have a marker to avoid re-sorting - _pop.sort(eoPters); + _pop.sort(eoPters); else _pop.shuffle(eoPters); current=0; @@ -118,10 +118,10 @@ template class eoEliteSequentialSelect: public eoSelectOne throw std::runtime_error("Trying eoEliteSequentialSelect with only one individual!"); for (unsigned i=1; i<_pop.size(); i++) if (*eoPters[i]>*best) - { - ibest = i; - best = eoPters[ibest]; - } + { + ibest = i; + best = eoPters[ibest]; + } // and put it upfront const EOT *ptmp = eoPters[0]; eoPters[0]=best; diff --git a/eo/src/eoSharing.h b/eo/src/eoSharing.h index b2a58653a..170a03b9e 100644 --- a/eo/src/eoSharing.h +++ b/eo/src/eoSharing.h @@ -33,7 +33,7 @@ * Goldberg and Richardson's basic sharing */ -/** A helper class for Sharing - to hold distances +/** A helper class for Sharing - to hold distances * * @ingroup Selectors * */ @@ -60,16 +60,16 @@ class dMatrix : public std::vector { unsigned index=0; for (unsigned i=0; ioperator[](index++) << " " ; - _os << std::endl; - } + { + for (unsigned j=0; joperator[](index++) << " " ; + _os << std::endl; + } _os << std::endl; } private: - unsigned rSize; // row size (== number of columns!) + unsigned rSize; // row size (== number of columns!) }; @@ -89,8 +89,8 @@ public: /* Ctor requires a distance - cannot have a default distance! */ eoSharing(double _nicheSize, eoDistance & _dist) : eoPerf2Worth("Sharing"), - nicheSize(_nicheSize), - dist(_dist) + nicheSize(_nicheSize), + dist(_dist) {} /** Computes shared fitnesses @@ -98,33 +98,33 @@ public: void operator()(const eoPop& _pop) { unsigned i, j, - pSize=_pop.size(); + pSize=_pop.size(); if (pSize <= 1) - throw std::runtime_error("Apptempt to do sharing with population of size 1"); + throw std::runtime_error("Apptempt to do sharing with population of size 1"); value().resize(pSize); - std::vector sim(pSize); // to hold the similarities + std::vector sim(pSize); // to hold the similarities dMatrix distMatrix(pSize); // to hold the distances // compute the similarities (wrong name for distMatrix, I know) distMatrix(0,0)=1; for (i=1; inicheSize ? 0 : 1-(d/nicheSize) ); - } - } + { + distMatrix(i,i)=1; + for (j=0; jnicheSize ? 0 : 1-(d/nicheSize) ); + } + } for (i=0; i & dist; // specific distance + eoDistance & dist; // specific distance }; diff --git a/eo/src/eoSharingSelect.h b/eo/src/eoSharingSelect.h index d9b56568a..0754cdd08 100644 --- a/eo/src/eoSharingSelect.h +++ b/eo/src/eoSharingSelect.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoSharingSelect.h // (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,28 +31,28 @@ #include #include -/** eoSharingSelect: select an individual by roulette wheel - * on its SHARED fitness. It is an eoRouletteWorthSelect, +/** eoSharingSelect: select an individual by roulette wheel + * on its SHARED fitness. It is an eoRouletteWorthSelect, * i.e. a selector using a std::vector of worthes * rather than the raw fitness (see eoSelectFromWorth.h) - * It uses an internal eoSharing object which is + * It uses an internal eoSharing object which is * an eoPerf2Worth * @ingroup Selectors */ -template -class eoSharingSelect: public eoRouletteWorthSelect +template +class eoSharingSelect: public eoRouletteWorthSelect { public: /** Ctor: * @param _sigma the sigma_share * @param _dist the distance object to use */ - eoSharingSelect(double _sigma, eoDistance & _dist): + eoSharingSelect(double _sigma, eoDistance & _dist): eoRouletteWorthSelect(sharing), sharing(_sigma, _dist) {} private : - eoSharing sharing; // derived from eoPerf2Worth + eoSharing sharing; // derived from eoPerf2Worth }; /** @example t-eoSharing.cpp */ diff --git a/eo/src/eoShiftMutation.h b/eo/src/eoShiftMutation.h index d1a132686..a9b71d665 100644 --- a/eo/src/eoShiftMutation.h +++ b/eo/src/eoShiftMutation.h @@ -4,7 +4,7 @@ // eoShiftMutation.h // (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 // (c) INRIA Futurs - Dolphin Team - Thomas Legrand 2007 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - thomas.legrand@lifl.fr + thomas.legrand@lifl.fr Marc.Schoenauer@polytechnique.fr mak@dhi.dk */ @@ -40,13 +40,13 @@ template class eoShiftMutation: public eoMonOp { public: - + typedef typename EOT::AtomType GeneType; - + /// CTor eoShiftMutation(){} - - + + /// The class name. virtual std::string className() const { return "eoShiftMutation"; } @@ -57,36 +57,35 @@ template class eoShiftMutation: public eoMonOp */ bool operator()(EOT& _eo) { - - unsigned i, j, from, to; + + unsigned i, j, from, to; GeneType tmp; - + // generate two different indices i=eo::rng.random(_eo.size()); - do j = eo::rng.random(_eo.size()); while (i == j); - + do j = eo::rng.random(_eo.size()); while (i == j); + // indexes from=std::min(i,j); to=std::max(i,j); // keep the first component to change - tmp=_eo[to]; - + tmp=_eo[to]; + // shift for(unsigned int k=to ; k > from ; k--) - _eo[k]=_eo[k-1]; - + _eo[k]=_eo[k-1]; + // shift the first component _eo[from]=tmp; return true; } - + }; /** @example t-eoShiftMutation.cpp - */ + */ //----------------------------------------------------------------------------- #endif - diff --git a/eo/src/eoSigBinaryFlight.h b/eo/src/eoSigBinaryFlight.h index a172484a3..dccf2e5f6 100644 --- a/eo/src/eoSigBinaryFlight.h +++ b/eo/src/eoSigBinaryFlight.h @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: thomas.legrand@lifl.fr - clive.canape@inria.fr + clive.canape@inria.fr */ //----------------------------------------------------------------------------- @@ -33,14 +33,14 @@ /** - * Binary flight for particle swarm optimization based on the sigmoid function. Velocities are expected to be "double" + * Binary flight for particle swarm optimization based on the sigmoid function. Velocities are expected to be "double" * Consider Pi to be the i-th position of a particle and Vi to be the i-th velocity of the same particle : - * if rand[0;1] < sig(Vi) (Vi <=> double) - * Pi=1 - * else - * Pi=0 + * if rand[0;1] < sig(Vi) (Vi <=> double) + * Pi=1 + * else + * Pi=0 * - * @ingroup Variators + * @ingroup Variators */ template < class POT > class eoSigBinaryFlight:public eoBinaryFlight < POT > { @@ -65,7 +65,7 @@ public: /** * Apply the sigmoid binary flight to a particle. - * + * */ void operator () (POT & _po) { @@ -85,8 +85,8 @@ public: } private : - unsigned slope; - + unsigned slope; + }; diff --git a/eo/src/eoSimpleEDA.h b/eo/src/eoSimpleEDA.h index c2a75672e..afbf152f0 100644 --- a/eo/src/eoSimpleEDA.h +++ b/eo/src/eoSimpleEDA.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoSimpleEDA.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,8 +35,8 @@ #include /** A very simple Estimation of Distribution Algorithm - * - * The algorithm that evolves a probability distribution + * + * The algorithm that evolves a probability distribution * on the spaces of populations with the loop * generate a population from the current distribution * evaluate that population @@ -53,19 +53,19 @@ template class eoSimpleEDA: public eoEDA * plus an eoEval and eoContinue of course. */ eoSimpleEDA(eoDistribUpdater& _update, - eoEvalFunc& _eval, - unsigned _popSize, - eoContinue& _continuator - ) : + eoEvalFunc& _eval, + unsigned _popSize, + eoContinue& _continuator + ) : update(_update), eval(_eval), popSize(_popSize), continuator(_continuator) {} - /** The algorithm: - * generate pop from distrib, - * evaluate pop, + /** The algorithm: + * generate pop from distrib, + * evaluate pop, * update distrib */ virtual void operator()(eoDistribution& _distrib) @@ -75,18 +75,18 @@ template class eoSimpleEDA: public eoEDA { try { - apply(_distrib, pop); // re-init. of _pop from distrib + apply(_distrib, pop); // re-init. of _pop from distrib - apply(eval, pop); // eval of current population + apply(eval, pop); // eval of current population + + update(_distrib, pop); // updates distrib from _pop - update(_distrib, pop); // updates distrib from _pop - } catch (std::exception& e) { - std::string s = e.what(); - s.append( " in eoSimpleEDA"); - throw std::runtime_error( s ); + std::string s = e.what(); + s.append( " in eoSimpleEDA"); + throw std::runtime_error( s ); } } while ( continuator( pop ) ); } @@ -95,7 +95,7 @@ template class eoSimpleEDA: public eoEDA eoDistribUpdater & update; eoEvalFunc& eval; - + unsigned popSize; eoContinue& continuator; @@ -104,4 +104,3 @@ template class eoSimpleEDA: public eoEDA //----------------------------------------------------------------------------- #endif - diff --git a/eo/src/eoSocialNeighborhood.h b/eo/src/eoSocialNeighborhood.h index cb8dd9f92..944031f9d 100644 --- a/eo/src/eoSocialNeighborhood.h +++ b/eo/src/eoSocialNeighborhood.h @@ -52,7 +52,7 @@ public: } /** - * Return true if the neighborhood contains the indice (= that means "contains the + * Return true if the neighborhood contains the indice (= that means "contains the * particle whose indice is _oneIndice") * @param _oneIndice - The indice of the particle in its population. */ @@ -123,4 +123,3 @@ protected: #endif /* EOSOCIALNEIGHBORHOOD_H_ */ - diff --git a/eo/src/eoStandardFlight.h b/eo/src/eoStandardFlight.h index 0c8008be1..228839eb7 100644 --- a/eo/src/eoStandardFlight.h +++ b/eo/src/eoStandardFlight.h @@ -49,7 +49,7 @@ public: /** Constructor without bounds. - * + * */ eoStandardFlight ():bnds (*(new eoRealVectorNoBounds(0))){} diff --git a/eo/src/eoStandardVelocity.h b/eo/src/eoStandardVelocity.h index e2b6deb1a..62abd487b 100644 --- a/eo/src/eoStandardVelocity.h +++ b/eo/src/eoStandardVelocity.h @@ -38,7 +38,7 @@ /** Standard velocity performer for particle swarm optimization. Derivated from abstract eoVelocity, * At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) -* lbest depends on the topology evolved, when using eoStarTopology, lbest corresponds to the +* lbest depends on the topology evolved, when using eoStarTopology, lbest corresponds to the * global. Otherwise, lbest is a "local best", i.e the best in a neighborhood. * * @ingroup Variators @@ -56,15 +56,15 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology to get the global/local/other best * @param _w - The weight factor. - * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng */ eoStandardVelocity (eoTopology < POT > & _topology, - const VelocityType & _w, + const VelocityType & _w, const VelocityType & _c1, const VelocityType & _c2, eoRealVectorBounds & _bounds, @@ -82,9 +82,9 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology to get the global/local/other best * @param _w - The weight factor. - * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -106,8 +106,8 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity * @param _topology - The topology to get the global/local/other best * @param _w - The weight factor. - * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoStandardVelocity (eoTopology < POT > & _topology, @@ -167,30 +167,29 @@ public: { topology.updateNeighborhood(_po,_indice); } - + //! eoTopology getTopology //! @return topology - eoTopology & getTopology () - { - return topology; - } + eoTopology & getTopology () + { + return topology; + } protected: eoTopology < POT > & topology; - const VelocityType & omega; // social/cognitive coefficient - const VelocityType & c1; // social/cognitive coefficient - const VelocityType & c2; // social/cognitive coefficient - - eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. - eoRealBoundModifier & bndsModifier; + const VelocityType & omega; // social/cognitive coefficient + const VelocityType & c1; // social/cognitive coefficient + const VelocityType & c2; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator - eoRng & gen; // the random generator - // If the bound modifier doesn't need to be used, use the dummy instance eoDummyRealBoundModifier dummyModifier; }; #endif /*EOSTANDARDVELOCITY_H */ - diff --git a/eo/src/eoStarTopology.h b/eo/src/eoStarTopology.h index d491800cd..02df64a98 100644 --- a/eo/src/eoStarTopology.h +++ b/eo/src/eoStarTopology.h @@ -91,9 +91,9 @@ public: // update the best fitness of the particle if (_po.fitness() > _po.best()) { - _po.best(_po.fitness()); - for(unsigned i=0;i<_po.size();i++) - _po.bestPositions[i]=_po[i]; + _po.best(_po.fitness()); + for(unsigned i=0;i<_po.size();i++) + _po.bestPositions[i]=_po[i]; } // update the global best if the given particle is "better" if (_po.fitness() > neighborhood.best().fitness()) @@ -109,14 +109,14 @@ public: * @return POT & - The best particle in the neighborhood of the particle whose indice is _indice */ POT & best (unsigned _indice) {return (neighborhood.best());} - + /* - * Return the global best of the topology - */ - - virtual POT & globalBest(const eoPop& _pop) + * Return the global best of the topology + */ + + virtual POT & globalBest(const eoPop& _pop) { - return neighborhood.best(); + return neighborhood.best(); } @@ -139,11 +139,3 @@ protected: }; #endif /*EOSTARTOPOLOGY_H_ */ - - - - - - - - diff --git a/eo/src/eoSteadyFitContinue.h b/eo/src/eoSteadyFitContinue.h index 7e5c8e21f..229d93bc1 100644 --- a/eo/src/eoSteadyFitContinue.h +++ b/eo/src/eoSteadyFitContinue.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoSteadyFitContinue.h // (c) GeNeura Team, 1999, Marc Schoenauer, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -28,9 +28,9 @@ #include #include -/** +/** A continuator: does a minimum number of generations, then - stops whenever a given number of generations takes place without improvement + stops whenever a given number of generations takes place without improvement @ingroup Continuators */ @@ -45,10 +45,10 @@ public: : repMinGenerations( _minGens ), repSteadyGenerations( _steadyGens), steadyState(false), thisGenerationPlaceHolder(0), thisGeneration(thisGenerationPlaceHolder){}; - + /// Ctor for enabling the save/load the no. of generations counted eoSteadyFitContinue( unsigned long _minGens, unsigned long _steadyGen, - unsigned long& _currentGen) + unsigned long& _currentGen) : repMinGenerations( _minGens ), repSteadyGenerations( _steadyGen), steadyState(_currentGen>_minGens), thisGenerationPlaceHolder(0), thisGeneration(_currentGen){}; @@ -57,54 +57,54 @@ public: * reached withtout improvement */ virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; - + Fitness bestCurrentFitness = _vEO.nth_element_fitness(0); - if (steadyState) { // already after MinGenenerations + if (steadyState) { // already after MinGenenerations if (bestCurrentFitness > bestSoFar) { - bestSoFar = bestCurrentFitness; - lastImprovement = thisGeneration; + bestSoFar = bestCurrentFitness; + lastImprovement = thisGeneration; } else { - if (thisGeneration - lastImprovement > repSteadyGenerations) { - eo::log << eo::progress << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations - << " generations without improvement\n"; - return false; - } - } - } else { // not yet in steady state + if (thisGeneration - lastImprovement > repSteadyGenerations) { + eo::log << eo::progress << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations + << " generations without improvement\n"; + return false; + } + } + } else { // not yet in steady state if (thisGeneration > repMinGenerations) { // go to steady state - steadyState = true; - bestSoFar = bestCurrentFitness; - lastImprovement = thisGeneration; + steadyState = true; + bestSoFar = bestCurrentFitness; + lastImprovement = thisGeneration; eo::log << eo::progress << "eoSteadyFitContinue: Done the minimum number of generations\n"; } } return true; } - /** Sets the parameters (minimum nb of gen. + steady nb of gen.) + /** Sets the parameters (minimum nb of gen. + steady nb of gen.) and sets the current generation to 0 (the begin) - + @todo replace thi by an init method ? */ - virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) { - repMinGenerations = _mg; + virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) { + repMinGenerations = _mg; repSteadyGenerations = _sg; reset(); }; - /// Resets the state after it's been reached + /// Resets the state after it's been reached virtual void reset () { steadyState=false; thisGeneration = 0; } /** accessors*/ - virtual unsigned long minGenerations( ) - { return repMinGenerations; }; - virtual unsigned long steadyGenerations( ) - { return repSteadyGenerations; }; - + virtual unsigned long minGenerations( ) + { return repMinGenerations; }; + virtual unsigned long steadyGenerations( ) + { return repSteadyGenerations; }; + virtual std::string className(void) const { return "eoSteadyFitContinue"; } private: unsigned long repMinGenerations; @@ -117,4 +117,3 @@ private: }; #endif - diff --git a/eo/src/eoStochTournamentSelect.h b/eo/src/eoStochTournamentSelect.h index 952041e1b..650041296 100644 --- a/eo/src/eoStochTournamentSelect.h +++ b/eo/src/eoStochTournamentSelect.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoStochTournamentSelect.h // (c) GeNeura Team, 1998 - EEAAX 1999 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,9 +31,9 @@ #include // stochastic_tournament /** eoStochTournamentSelect: a selection method that selects ONE individual by - binary stochastic tournament - -MS- 24/10/99 - + binary stochastic tournament + -MS- 24/10/99 + @ingroup Selectors */ template class eoStochTournamentSelect: public eoSelectOne @@ -41,7 +41,7 @@ template class eoStochTournamentSelect: public eoSelectOne public: /// - eoStochTournamentSelect(double _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) + eoStochTournamentSelect(double _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) { // consistency checks if (Trate < 0.5) { @@ -53,16 +53,15 @@ template class eoStochTournamentSelect: public eoSelectOne Trate = 1; } } - + /** Perform the stochastic tournament */ - virtual const EOT& operator()(const eoPop& pop) + virtual const EOT& operator()(const eoPop& pop) { return stochastic_tournament(pop, Trate); } - + private: double Trate; }; #endif - diff --git a/eo/src/eoStochasticUniversalSelect.h b/eo/src/eoStochasticUniversalSelect.h index 003c70124..fb1669ecc 100644 --- a/eo/src/eoStochasticUniversalSelect.h +++ b/eo/src/eoStochasticUniversalSelect.h @@ -59,7 +59,7 @@ public: cumulative[0] = _pop[0].fitness(); for (unsigned i = 1; i < _pop.size(); ++i) { - cumulative[i] = _pop[i].fitness() + cumulative[i-1]; + cumulative[i] = _pop[i].fitness() + cumulative[i-1]; } indices.reserve(_pop.size()); @@ -72,19 +72,19 @@ public: while (indices.size() < _pop.size()) { - while (cumulative[i] < fortune) {i++;} // linear search is good enough as we average one step each time + while (cumulative[i] < fortune) {i++;} // linear search is good enough as we average one step each time - indices.push_back(i); - fortune += step; - if (fortune >= cumulative.back()) { // start at the beginning - fortune -= cumulative.back(); - i = 0; - } + indices.push_back(i); + fortune += step; + if (fortune >= cumulative.back()) { // start at the beginning + fortune -= cumulative.back(); + i = 0; + } } // shuffle for (int i = indices.size() - 1; i > 0; --i) { - int j = rng.random(i+1); - std::swap(indices[i], indices[j]); + int j = rng.random(i+1); + std::swap(indices[i], indices[j]); } } diff --git a/eo/src/eoSurviveAndDie.h b/eo/src/eoSurviveAndDie.h index 3650a5365..63cf22197 100644 --- a/eo/src/eoSurviveAndDie.h +++ b/eo/src/eoSurviveAndDie.h @@ -59,8 +59,8 @@ class eoSurviveAndDie : public eoBF &, eoPop &, void> { public: eoSurviveAndDie(double _survive, double _die, bool _interpret_as_rate = true): - howmanySurvive(_survive, _interpret_as_rate), - howmanyDie(_die, _interpret_as_rate) + howmanySurvive(_survive, _interpret_as_rate), + howmanyDie(_die, _interpret_as_rate) {} protected: @@ -90,33 +90,33 @@ public: void operator()(eoPop & _pop, eoPop & _luckyGuys) { - unsigned pSize = _pop.size(); - unsigned nbSurvive = howmanySurvive(pSize); - // first, save the best into _luckyGuys - if (nbSurvive) - { - _pop.nth_element(nbSurvive); - // copy best - _luckyGuys.resize(nbSurvive); - std::copy(_pop.begin(), _pop.begin()+nbSurvive, _luckyGuys.begin()); - // erase them from pop - _pop.erase(_pop.begin(), _pop.begin()+nbSurvive); - } - unsigned nbRemaining = _pop.size(); + unsigned pSize = _pop.size(); + unsigned nbSurvive = howmanySurvive(pSize); + // first, save the best into _luckyGuys + if (nbSurvive) + { + _pop.nth_element(nbSurvive); + // copy best + _luckyGuys.resize(nbSurvive); + std::copy(_pop.begin(), _pop.begin()+nbSurvive, _luckyGuys.begin()); + // erase them from pop + _pop.erase(_pop.begin(), _pop.begin()+nbSurvive); + } + unsigned nbRemaining = _pop.size(); - // carefull, we can have a rate of 1 if we want to kill all remaining - unsigned nbDie = std::min(howmanyDie(pSize), pSize-nbSurvive); - if (nbDie > nbRemaining) - throw std::logic_error("eoDeterministicSurviveAndDie: Too many to kill!\n"); + // carefull, we can have a rate of 1 if we want to kill all remaining + unsigned nbDie = std::min(howmanyDie(pSize), pSize-nbSurvive); + if (nbDie > nbRemaining) + throw std::logic_error("eoDeterministicSurviveAndDie: Too many to kill!\n"); - if (!nbDie) - { - return; - } - // else - // kill the worse nbDie - _pop.nth_element(nbRemaining-nbDie); - _pop.resize(nbRemaining-nbDie); + if (!nbDie) + { + return; + } + // else + // kill the worse nbDie + _pop.nth_element(nbRemaining-nbDie); + _pop.resize(nbRemaining-nbDie); } }; @@ -139,45 +139,45 @@ class eoDeterministicSaDReplacement : public eoReplacement public: /** Constructor with reduce */ eoDeterministicSaDReplacement(eoReduce& _reduceGlobal, - double _surviveParents, double _dieParents=0, - double _surviveOffspring=0, double _dieOffspring=0, - bool _interpret_as_rate = true ) : - reduceGlobal(_reduceGlobal), - sAdParents(_surviveParents, _dieParents, _interpret_as_rate), - sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) + double _surviveParents, double _dieParents=0, + double _surviveOffspring=0, double _dieOffspring=0, + bool _interpret_as_rate = true ) : + reduceGlobal(_reduceGlobal), + sAdParents(_surviveParents, _dieParents, _interpret_as_rate), + sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) {} /** Constructor with default truncate used as reduce */ eoDeterministicSaDReplacement( - double _surviveParents, double _dieParents=0, - double _surviveOffspring=0, double _dieOffspring=0, - bool _interpret_as_rate = true ) : - reduceGlobal(truncate), - sAdParents(_surviveParents, _dieParents, _interpret_as_rate), - sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) + double _surviveParents, double _dieParents=0, + double _surviveOffspring=0, double _dieOffspring=0, + bool _interpret_as_rate = true ) : + reduceGlobal(truncate), + sAdParents(_surviveParents, _dieParents, _interpret_as_rate), + sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) {} void operator()(eoPop& _parents, eoPop& _offspring) { - unsigned pSize = _parents.size(); // target number of individuals + unsigned pSize = _parents.size(); // target number of individuals - eoPop luckyParents; // to hold the absolute survivors - sAdParents(_parents, luckyParents); + eoPop luckyParents; // to hold the absolute survivors + sAdParents(_parents, luckyParents); - eoPop luckyOffspring; // to hold the absolute survivors - sAdOffspring(_offspring, luckyOffspring); + eoPop luckyOffspring; // to hold the absolute survivors + sAdOffspring(_offspring, luckyOffspring); - unsigned survivorSize = luckyOffspring.size() + luckyParents.size(); - if (survivorSize > pSize) - throw std::logic_error("eoGeneralReplacement: More survivors than parents!\n"); + unsigned survivorSize = luckyOffspring.size() + luckyParents.size(); + if (survivorSize > pSize) + throw std::logic_error("eoGeneralReplacement: More survivors than parents!\n"); - plus(_parents, _offspring); // all that remain in _offspring + plus(_parents, _offspring); // all that remain in _offspring - reduceGlobal(_offspring, pSize - survivorSize); - plus(luckyParents, _offspring); - plus(luckyOffspring, _offspring); + reduceGlobal(_offspring, pSize - survivorSize); + plus(luckyParents, _offspring); + plus(luckyOffspring, _offspring); - _parents.swap(_offspring); + _parents.swap(_offspring); } @@ -195,4 +195,3 @@ private : /** @} */ #endif - diff --git a/eo/src/eoSwapMutation.h b/eo/src/eoSwapMutation.h index 63169a9bd..58d3cf604 100644 --- a/eo/src/eoSwapMutation.h +++ b/eo/src/eoSwapMutation.h @@ -4,7 +4,7 @@ // eoSwapMutation.h // (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 // (c) INRIA Futurs - Dolphin Team - Thomas Legrand 2007 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - thomas.legrand@lifl.fr + thomas.legrand@lifl.fr Marc.Schoenauer@polytechnique.fr mak@dhi.dk */ @@ -40,15 +40,15 @@ template class eoSwapMutation: public eoMonOp { public: - + /// CTor - eoSwapMutation(const unsigned _howManySwaps=1): howManySwaps(_howManySwaps) + eoSwapMutation(const unsigned _howManySwaps=1): howManySwaps(_howManySwaps) { - // consistency check - if(howManySwaps < 1) - throw std::runtime_error("Invalid number of swaps in eoSwapMutation"); + // consistency check + if(howManySwaps < 1) + throw std::runtime_error("Invalid number of swaps in eoSwapMutation"); } - + /// The class name. virtual std::string className() const { return "eoSwapMutation"; } @@ -58,26 +58,25 @@ template class eoSwapMutation: public eoMonOp */ bool operator()(Chrom& chrom) { - unsigned i, j; - - for(unsigned int swap = 0; swap < howManySwaps; swap++) + unsigned i, j; + + for(unsigned int swap = 0; swap < howManySwaps; swap++) { - // generate two different indices - i=eo::rng.random(chrom.size()); - do j = eo::rng.random(chrom.size()); while (i == j); - - // swap - std::swap(chrom[i],chrom[j]); - } + // generate two different indices + i=eo::rng.random(chrom.size()); + do j = eo::rng.random(chrom.size()); while (i == j); + + // swap + std::swap(chrom[i],chrom[j]); + } return true; } - + private: - unsigned int howManySwaps; + unsigned int howManySwaps; }; /** @example t-eoSwapMutation.cpp */ //----------------------------------------------------------------------------- #endif - diff --git a/eo/src/eoSyncEasyPSO.h b/eo/src/eoSyncEasyPSO.h index aa1c9130c..f05f15f62 100644 --- a/eo/src/eoSyncEasyPSO.h +++ b/eo/src/eoSyncEasyPSO.h @@ -34,15 +34,15 @@ //----------------------------------------------------------------------------- /** An easy-to-use synchronous particle swarm algorithm; you can use any particle, -* any flight, any topology... +* any flight, any topology... * * The main steps are : -* - perform a first evaluation of the population -* - for each generation -* - evaluate ALL the velocities -* -- perform the fligth of ALL the particles -* -- evaluate ALL the particles -* -- update the neighborhoods +* - perform a first evaluation of the population +* - for each generation +* - evaluate ALL the velocities +* -- perform the fligth of ALL the particles +* -- evaluate ALL the particles +* -- update the neighborhoods * * @ingroup Algorithms */ @@ -55,7 +55,7 @@ public: * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system * @param _eval - An eoEvalFunc: the evaluation performer * @param _velocity - An eoVelocity that defines how to compute the velocities - * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * @param _flight - An eoFlight that defines how to make the particle flying: that means how * to modify the positions according to the velocities */ eoSyncEasyPSO ( @@ -117,11 +117,11 @@ public: {} - /** Another constructor without initializer + /** Another constructor without initializer * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system * @param _eval - An eoEvalFunc: the evaluation performer * @param _velocity - An eoVelocity that defines how to compute the velocities - * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * @param _flight - An eoFlight that defines how to make the particle flying: that means how * to modify the positions according to the velocities */ eoSyncEasyPSO ( @@ -176,7 +176,7 @@ public: velocity (_velocity), flight (_flight) {} - + /// Apply a few iteration of flight to the population (=swarm). virtual void operator () (eoPop < POT > &_pop) { @@ -185,7 +185,7 @@ public: { // initializes the topology, velocity, best particle(s) init(); - + // just to use a loop eval eoPop empty_pop; @@ -229,29 +229,29 @@ private: eoFlight < POT > &flight; // if the eval does not need to be used, use the dummy eval instance - class eoDummyEval : public eoEvalFunc - { - public: - void operator()(POT &) - {} - } - dummyEval; + class eoDummyEval : public eoEvalFunc + { + public: + void operator()(POT &) + {} + } + dummyEval; + + class eoDummyFlight:public eoFlight < POT > + { + public: + eoDummyFlight () {} + void operator () (POT & _po) {} + }dummyFlight; + + // if the initializer does not need to be used, use the dummy one instead + class eoDummyInitializer:public eoInitializerBase < POT > + { + public: + eoDummyInitializer () {} + void operator () (POT & _po) {} + }dummyInit; - class eoDummyFlight:public eoFlight < POT > - { - public: - eoDummyFlight () {} - void operator () (POT & _po) {} - }dummyFlight; - - // if the initializer does not need to be used, use the dummy one instead - class eoDummyInitializer:public eoInitializerBase < POT > - { - public: - eoDummyInitializer () {} - void operator () (POT & _po) {} - }dummyInit; - }; /** @example t-eoSyncEasyPSO.cpp */ diff --git a/eo/src/eoTopology.h b/eo/src/eoTopology.h index 24bfe8515..a12bf43dc 100644 --- a/eo/src/eoTopology.h +++ b/eo/src/eoTopology.h @@ -70,9 +70,9 @@ public: virtual POT & best (unsigned ) = 0; - /* - * Return the global best of the topology - */ + /* + * Return the global best of the topology + */ virtual POT & globalBest() = 0; @@ -84,11 +84,3 @@ public: #endif /*EOTOPOLOGY_H_ */ - - - - - - - - diff --git a/eo/src/eoTransform.h b/eo/src/eoTransform.h index 67dd712ae..f8823382a 100644 --- a/eo/src/eoTransform.h +++ b/eo/src/eoTransform.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoTransform.h + eoTransform.h (c) Maarten Keijzer, GeNeura Team, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -30,7 +30,7 @@ #include //----------------------------------------------------------------------------- -/** +/** eoTransform transforms a population by applying genetic operators on it. @ingroup Combination diff --git a/eo/src/eoTruncSelect.h b/eo/src/eoTruncSelect.h index 8f75e2153..e46b39bc3 100644 --- a/eo/src/eoTruncSelect.h +++ b/eo/src/eoTruncSelect.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoTruncSelect.h + eoTruncSelect.h (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,7 +35,7 @@ //----------------------------------------------------------------------------- /** eoTruncSelect selects individuals after truncating the population - * using eoSelectOne as it's mechanism. + * using eoSelectOne as it's mechanism. * Therefore eoSelectMany needs an eoSelectOne in its ctor * It will use an eoHowMnay to determine the number of guys to keep, * @@ -46,9 +46,9 @@ class eoTruncSelect : public eoSelect { public: /** Ctor: from an eoSelect (and an eoMany to tell how many are kept for selectino */ - eoTruncSelect(eoSelectOne& _select, eoHowMany _howMany) + eoTruncSelect(eoSelectOne& _select, eoHowMany _howMany) : select(_select), howMany(_howMany) {} - + /** The implementation repeatidly selects an individual @@ -58,15 +58,15 @@ class eoTruncSelect : public eoSelect virtual void operator()(const eoPop& _source, eoPop& _dest) { unsigned target = howMany(_source.size()); - + _dest.resize(target); - + select.setup(_source); - + for (size_t i = 0; i < _dest.size(); ++i) _dest[i] = select(_source); } - + private : eoSelectOne& select; eoHowMany howMany; diff --git a/eo/src/eoTruncatedSelectMany.h b/eo/src/eoTruncatedSelectMany.h index 5e999459d..1b3bad726 100644 --- a/eo/src/eoTruncatedSelectMany.h +++ b/eo/src/eoTruncatedSelectMany.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoTruncatedSelectMany.h + eoTruncatedSelectMany.h (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,7 +35,7 @@ #include //----------------------------------------------------------------------------- -/** eoTruncatedSelectMany selects many individuals using eoSelectOne as it's +/** eoTruncatedSelectMany selects many individuals using eoSelectOne as it's mechanism. Therefore eoSelectMany needs an eoSelectOne in its ctor It will use an eoHowMnay to determine the number of guys to select, @@ -43,10 +43,10 @@ And it will only perform selection from the top guys in the population. - It is NOT a special case of eoSelectMany because it needs to SORT + It is NOT a special case of eoSelectMany because it needs to SORT the population to discard the worst guys before doing the selection - However, the same result can be obtained by embedding an + However, the same result can be obtained by embedding an eoTruncatedSelectOne into an eoSelectMany ... @ingroup Selectors @@ -56,19 +56,19 @@ class eoTruncatedSelectMany : public eoSelect { public: /// Ctor - eoTruncatedSelectMany(eoSelectOne& _select, - double _rateGenitors, double _rateFertile, - bool _interpret_as_rateG = true, - bool _interpret_as_rateF = true) - : select(_select), - howManyGenitors(_rateGenitors, _interpret_as_rateG), - howManyFertile(_rateFertile, _interpret_as_rateF) {} + eoTruncatedSelectMany(eoSelectOne& _select, + double _rateGenitors, double _rateFertile, + bool _interpret_as_rateG = true, + bool _interpret_as_rateF = true) + : select(_select), + howManyGenitors(_rateGenitors, _interpret_as_rateG), + howManyFertile(_rateFertile, _interpret_as_rateF) {} // Ctor with eoHowManys - eoTruncatedSelectMany(eoSelectOne& _select, - eoHowMany _howManyGenitors, eoHowMany _howManyFertile) + eoTruncatedSelectMany(eoSelectOne& _select, + eoHowMany _howManyGenitors, eoHowMany _howManyFertile) : select(_select), howManyGenitors(_howManyGenitors), - howManyFertile(_howManyFertile) {} + howManyFertile(_howManyFertile) {} /** The implementation repeatidly selects an individual @@ -87,33 +87,33 @@ class eoTruncatedSelectMany : public eoSelect //revert to standard selection (see eoSelectMany) if no truncation if (nbFertile == _source.size()) { - select.setup(_source); - - for (size_t i = 0; i < _dest.size(); ++i) - _dest[i] = select(_source); + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); } else { // at the moment, brute force (rush rush, no good) // what we would need otherwise is a std::vector class // and selectors that act on such a thing - eoPop tmpPop = _source; // hum hum, could be a pain in the ass + eoPop tmpPop = _source; // hum hum, could be a pain in the ass - tmpPop.sort(); // maybe we could only do partial sort? - tmpPop.resize(nbFertile); // only the best guys here now - tmpPop.shuffle(); // as some selectors are order-sensitive + tmpPop.sort(); // maybe we could only do partial sort? + tmpPop.resize(nbFertile); // only the best guys here now + tmpPop.shuffle(); // as some selectors are order-sensitive - select.setup(tmpPop); - - for (size_t i = 0; i < _dest.size(); ++i) - _dest[i] = select(tmpPop); + select.setup(tmpPop); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(tmpPop); } } - + private : - eoSelectOne& select; // selector for one guy - eoHowMany howManyGenitors; // number of guys to select - eoHowMany howManyFertile; // number of fertile guys + eoSelectOne& select; // selector for one guy + eoHowMany howManyGenitors; // number of guys to select + eoHowMany howManyFertile; // number of fertile guys }; #endif diff --git a/eo/src/eoTruncatedSelectOne.h b/eo/src/eoTruncatedSelectOne.h index c0fed2031..e86cce81d 100644 --- a/eo/src/eoTruncatedSelectOne.h +++ b/eo/src/eoTruncatedSelectOne.h @@ -1,9 +1,9 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- ----------------------------------------------------------------------------- - eoTruncatedSelectOne.h + eoTruncatedSelectOne.h (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -35,7 +35,7 @@ #include //----------------------------------------------------------------------------- -/** eoTruncatedSelectOne selects one individual using eoSelectOne as it's +/** eoTruncatedSelectOne selects one individual using eoSelectOne as it's mechanism. Therefore eoTruncatedSelectOne needs an eoSelectOne in its ctor It will perform selection only from the top guys in the population. @@ -47,17 +47,17 @@ class eoTruncatedSelectOne : public eoSelectOne { public: /** Ctor from rate and bool */ - eoTruncatedSelectOne(eoSelectOne& _select, - double _rateFertile, - bool _interpret_as_rateF = true) - : select(_select), + eoTruncatedSelectOne(eoSelectOne& _select, + double _rateFertile, + bool _interpret_as_rateF = true) + : select(_select), howManyFertile(_rateFertile, _interpret_as_rateF), tmpPop(), actualPop(tmpPop) {} /** Ctor with eoHowMany */ - eoTruncatedSelectOne(eoSelectOne& _select, - eoHowMany _howManyFertile) + eoTruncatedSelectOne(eoSelectOne& _select, + eoHowMany _howManyFertile) : select(_select), howManyFertile(_howManyFertile), tmpPop(), actualPop(tmpPop) {} @@ -69,19 +69,19 @@ public: unsigned fertile = howManyFertile(_source.size()); if (fertile == _source.size()) // noting to do, all are fertile { - actualPop = _source; + actualPop = _source; } else { - // copy only best ferile to actualPop - tmpPop.resize(fertile); - std::vector result; - _source.nth_element(fertile, result); - for (unsigned i=0; i result; + _source.nth_element(fertile, result); + for (unsigned i=0; i& _pop) + const EOT& operator()(const eoPop& _pop) { return select(actualPop); } private : - eoSelectOne& select; // selector for one guy - eoHowMany howManyFertile; // number of fertile guys - eoPop tmpPop; // intermediate population - fertile guys - eoPop & actualPop; // to avoid copies when 100% fertility + eoSelectOne& select; // selector for one guy + eoHowMany howManyFertile; // number of fertile guys + eoPop tmpPop; // intermediate population - fertile guys + eoPop & actualPop; // to avoid copies when 100% fertility }; #endif diff --git a/eo/src/eoVariableInertiaWeightedVelocity.h b/eo/src/eoVariableInertiaWeightedVelocity.h index d281b39d8..a926feee8 100644 --- a/eo/src/eoVariableInertiaWeightedVelocity.h +++ b/eo/src/eoVariableInertiaWeightedVelocity.h @@ -56,9 +56,9 @@ public: /** Full constructor: Bounds and bound modifier required * @param _topology - The topology to get the global/local/other best * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). * @param _gen - The eo random generator, default=rng @@ -82,9 +82,9 @@ public: /** Constructor: No bound updater required <-> fixed bounds * @param _topology - The topology to get the global/local/other best * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType - * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? * @param _gen - The eo random generator, default=rng */ @@ -106,8 +106,8 @@ public: /** Constructor: Neither bounds nor bound updater required <-> free velocity * @param _topology - The topology to get the global/local/other best * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight - * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType - * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType * @param _gen - The eo random generator, default=rng */ eoVariableInertiaWeightedVelocity (eoTopology < POT > & _topology, @@ -126,7 +126,7 @@ public: /** * Evaluate the new velocities of the given particle. Need an indice to identify the particle - * into the topology. Steps are : + * into the topology. Steps are : * - evaluate r1 and r2, the customed learning factors * - adjust the size of the bounds (even if dummy) * - update the weight with the weightUpdater (use the dummy updater if there's no updater provided) @@ -181,19 +181,18 @@ public: protected: eoTopology < POT > & topology; - eoWeightUpdater & weightUpdater; // the updater used to make the weight evoluate - const VelocityType & c1; // learning factor 1 - const VelocityType & c2; // learning factor 2 - - eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. + eoWeightUpdater & weightUpdater; // the updater used to make the weight evoluate + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 + + eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. eoRealBoundModifier & bndsModifier; - + VelocityType weight; - eoRng & gen; // the random generator + eoRng & gen; // the random generator // If the bound modifier doesn't need to be used, use the dummy instance eoDummyRealBoundModifier dummyModifier; }; #endif /*EOVARIABLEINERTIAWEIGHTEDVELOCITY_H*/ - diff --git a/eo/src/eoVariableLengthCrossover.h b/eo/src/eoVariableLengthCrossover.h index 5ad6de051..510fc9b03 100644 --- a/eo/src/eoVariableLengthCrossover.h +++ b/eo/src/eoVariableLengthCrossover.h @@ -66,7 +66,7 @@ public: { mask.resize(_size1 + _size2); for (unsigned i=0; i<_size1+_size2; i++) - mask[i]=eo::rng.flip(rate); + mask[i]=eo::rng.flip(rate); } /** the operator() simply returns the mask booleans in turn */ @@ -98,12 +98,12 @@ public : /** default ctor: requires bounds on number of genes + a rate */ eoVlAtomExchangeQuadOp(unsigned _Min, unsigned _Max, - eoAtomExchange& _atomExchange): + eoAtomExchange& _atomExchange): Min(_Min), Max(_Max), atomExchange(_atomExchange) {} bool operator()(EOT & _eo1, EOT & _eo2) { - EOT tmp1, tmp2; // empty individuals + EOT tmp1, tmp2; // empty individuals unsigned index=0; // main loop: until sizes are OK, do only simulated exchange unsigned i, i1, i2; @@ -113,47 +113,47 @@ public : // simulate crossover i1=i2=0; for (i=0; i<_eo1.size(); i++) - { - if (atomExchange(i, _eo1[i])) - i1++; - else - i2++; - } + { + if (atomExchange(i, _eo1[i])) + i1++; + else + i2++; + } for (i=0; i<_eo2.size(); i++) - { - if (atomExchange(i, _eo2[i])) - i2++; - else - i1++; - } + { + if (atomExchange(i, _eo2[i])) + i2++; + else + i1++; + } index++; } while ( ( (i1Max) || (i2>Max) ) - && (index<10000) ); + (i1>Max) || (i2>Max) ) + && (index<10000) ); if (index >= 10000) { eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; - return false; + return false; } // here we know we have the right sizes: do the actual exchange for (i=0; i<_eo1.size(); i++) - { - if (atomExchange(i, _eo1[i])) - tmp1.push_back(_eo1[i]); - else - tmp2.push_back(_eo1[i]); - } + { + if (atomExchange(i, _eo1[i])) + tmp1.push_back(_eo1[i]); + else + tmp2.push_back(_eo1[i]); + } for (i=0; i<_eo2.size(); i++) - { - if (atomExchange(i, _eo2[i])) - tmp2.push_back(_eo2[i]); - else - tmp1.push_back(_eo2[i]); - } + { + if (atomExchange(i, _eo2[i])) + tmp2.push_back(_eo2[i]); + else + tmp1.push_back(_eo2[i]); + } // and put everything back in place _eo1.swap(tmp1); _eo2.swap(tmp2); - return true; // should we test that? Yes, but no time now + return true; // should we test that? Yes, but no time now } /** the inherited className */ @@ -190,11 +190,11 @@ public : bool changed = false; for ( unsigned i = 0; i < minsize; i ++ ) { if ( rng.flip( rate ) ) { - bool changedHere = op( _eo1[i], _eo2[i] ); - changed |= changedHere; + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; } } - return changed; // should we test that? Yes, but no time now + return changed; // should we test that? Yes, but no time now } virtual std::string className() const @@ -237,34 +237,34 @@ public : unsigned index=0; do { for (i=0; i<_eo1.size(); i++) - { - if (eo::rng.flip(rate)) - tmp1.push_back(_eo1[i]); - else - tmp2.push_back(_eo1[i]); - // here we should look for _eo1[i] inside _eo2 and erase it if found! - } + { + if (eo::rng.flip(rate)) + tmp1.push_back(_eo1[i]); + else + tmp2.push_back(_eo1[i]); + // here we should look for _eo1[i] inside _eo2 and erase it if found! + } for (i=0; i<_eo2.size(); i++) - { - if (eo::rng.flip(rate)) - tmp1.push_back(_eo2[i]); - else - tmp2.push_back(_eo2[i]); - } + { + if (eo::rng.flip(rate)) + tmp1.push_back(_eo2[i]); + else + tmp2.push_back(_eo2[i]); + } index++; } while ( ( (tmp1.size()Max) || (tmp2.size()>Max) ) - && (index<10000) ); + (tmp1.size()>Max) || (tmp2.size()>Max) ) + && (index<10000) ); //! @todo FIXME bad hardcoded limit, should use an algorithm that guarantee a correct size in a finite number of tries if (index >= 10000) { eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; - return false; + return false; } _eo1.swap(tmp1); _eo2.swap(tmp2); - return true; // should we test that? + return true; // should we test that? } private: unsigned Min, Max; @@ -300,47 +300,47 @@ public : unsigned index=0; do { for (i=0; i<_eo1.size(); i++) - { - if (eo::rng.flip(rate)) - { - tmp1.push_back(_eo1[i]); - tmpIsTwo = false; - } - else - tmpIsOne=false; - // we should look for _eo1[i] inside _eo2 and erase it there if found! - } + { + if (eo::rng.flip(rate)) + { + tmp1.push_back(_eo1[i]); + tmpIsTwo = false; + } + else + tmpIsOne=false; + // we should look for _eo1[i] inside _eo2 and erase it there if found! + } for (i=0; i<_eo2.size(); i++) - { - if (! eo::rng.flip(rate)) - { - tmp1.push_back(_eo2[i]); - tmpIsOne = false; - } - else - tmpIsTwo = false; - } + { + if (! eo::rng.flip(rate)) + { + tmp1.push_back(_eo2[i]); + tmpIsOne = false; + } + else + tmpIsTwo = false; + } index++; } while ( ( (tmp1.size()Max) ) - && (index<10000) ); + && (index<10000) ); // this while condition is not optimal, as it may take some time, see the FIXME above if (index >= 10000) { eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; - return false; + return false; } _eo1.swap(tmp1); if (tmpIsTwo) { - // _eo1.fitness(_eo2.fitness()); NO FITNESS EXISTS HERE! - return false; + // _eo1.fitness(_eo2.fitness()); NO FITNESS EXISTS HERE! + return false; } - if (tmpIsOne) // already has the right fitness - { // WRONG: NO FITNESS EXISTS HERE! - return false; + if (tmpIsOne) // already has the right fitness + { // WRONG: NO FITNESS EXISTS HERE! + return false; } - return true; // there were some modifications... + return true; // there were some modifications... } private: @@ -350,4 +350,3 @@ private: /** @} */ #endif - diff --git a/eo/src/eoVariableLengthMutation.h b/eo/src/eoVariableLengthMutation.h index aad778bae..542541d70 100644 --- a/eo/src/eoVariableLengthMutation.h +++ b/eo/src/eoVariableLengthMutation.h @@ -66,7 +66,7 @@ public : bool operator()(EOT & _eo) { if (_eo.size() >= nMax) - return false; // unmodifed + return false; // unmodifed AtomType atom; atomInit(atom); unsigned pos = rng.random(_eo.size()+1); @@ -100,7 +100,7 @@ public: eoUniformGeneChooser(){} unsigned operator()(EOT & _eo) { - return eo::rng.random(_eo.size()); + return eo::rng.random(_eo.size()); } virtual std::string className() const { return "eoUniformGeneChooser"; } }; @@ -137,7 +137,7 @@ public : bool operator()(EOT & _eo) { if (_eo.size() <= nMin) - return false; // unmodifed + return false; // unmodifed unsigned pos = chooser(_eo); _eo.erase(_eo.begin()+pos); return true; @@ -158,4 +158,3 @@ private: /** @} */ #endif - diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index 0e1b6d915..fce05d117 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -82,9 +82,9 @@ public: // with the copy Ctor void value(const std::vector& _v) { - if (_v.size() != size()) // safety check + if (_v.size() != size()) // safety check { - if (size()) // NOT an initial empty std::vector + if (size()) // NOT an initial empty std::vector eo::log << eo::warnings << "Warning: Changing size in eoVector assignation" << std::endl; resize(_v.size()); } diff --git a/eo/src/eoVectorParticle.h b/eo/src/eoVectorParticle.h index 4736639a0..25cfcc9fa 100644 --- a/eo/src/eoVectorParticle.h +++ b/eo/src/eoVectorParticle.h @@ -124,14 +124,14 @@ public: { velocities.resize (_size); } - + /// to avoid conflicts between EA and PSO bool operator<(const eoVectorParticle& _eo) const { - if (_eo.best() > this->best()) - return true; - else - return false; + if (_eo.best() > this->best()) + return true; + else + return false; } /** @@ -139,10 +139,10 @@ public: */ virtual void printOn(std::ostream& os) const { - PO::printOn(os); - os << ' '; - os << size() << ' '; - std::copy(bestPositions.begin(), bestPositions.end(), std::ostream_iterator(os, " ")); + PO::printOn(os); + os << ' '; + os << size() << ' '; + std::copy(bestPositions.begin(), bestPositions.end(), std::ostream_iterator(os, " ")); } /* public attributes */ diff --git a/eo/src/eoVelocity.h b/eo/src/eoVelocity.h index 5d4bdcd23..753c6af21 100644 --- a/eo/src/eoVelocity.h +++ b/eo/src/eoVelocity.h @@ -71,11 +71,10 @@ public: } } - - + + virtual eoTopology & getTopology () = 0; }; #endif /*EOVELOCITY_H_H */ - diff --git a/eo/src/eoVelocityInit.h b/eo/src/eoVelocityInit.h index 4a096f4c6..8c57a6891 100644 --- a/eo/src/eoVelocityInit.h +++ b/eo/src/eoVelocityInit.h @@ -64,7 +64,7 @@ public: init (p); return (p); } - + private: eoVelocityInit < POT > &init; }; @@ -144,4 +144,3 @@ private: #endif /*EOVELOCITYINIT_H */ /** @} */ - diff --git a/eo/src/eoWeightUpdater.h b/eo/src/eoWeightUpdater.h index 656190163..d4970eca4 100644 --- a/eo/src/eoWeightUpdater.h +++ b/eo/src/eoWeightUpdater.h @@ -30,7 +30,7 @@ //----------------------------------------------------------------------------- /** - * Abstract class for (inertia) weight updater (particle swarm optimization). + * Abstract class for (inertia) weight updater (particle swarm optimization). * Used inside classes extending eoVelocity. * * @ingroup Core diff --git a/eo/src/es.h b/eo/src/es.h index 17545f3e0..d5dffc2f3 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // es.h // (c) GeNeura Team 1998 - Maarten Keijzer 2000 - Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -20,21 +20,21 @@ Contact: Marc.Schoenauer@polytechnique.fr mak@dhi.dk - todos@geneura.ugr.es, http://geneura.ugr.es + todos@geneura.ugr.es, http://geneura.ugr.es */ //----------------------------------------------------------------------------- #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #ifndef _es_h #define _es_h // contains the include specific to real representations, i.e. in src/es dir //----------------------------------------------------------------------------- - + // the genotypes - from plain std::vector to full correlated mutation #include #include diff --git a/eo/src/es/CMAParams.cpp b/eo/src/es/CMAParams.cpp index 1ded097db..131edb72f 100644 --- a/eo/src/es/CMAParams.cpp +++ b/eo/src/es/CMAParams.cpp @@ -1,4 +1,3 @@ - /* * C++ification of Nikolaus Hansen's original C-source code for the * CMA-ES @@ -7,7 +6,7 @@ * the LGPL. Original copyright of Nikolaus Hansen can be found below * * - * + * */ /* --------------------------------------------------------- */ @@ -30,7 +29,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * */ /* --- Changes : --- * 03/03/21: argument const double *rgFunVal of @@ -54,138 +53,138 @@ using namespace std; namespace eo { CMAParams::CMAParams(eoParser& parser, unsigned dimensionality) { - + string section = "CMA parameters"; - + n = parser.createParam(dimensionality, "dimensionality", "Dimensionality (N) of the problem", 'N', section, dimensionality == 0).value(); - + maxgen = parser.createParam( - 1000, - "max-gen", - "Maximum number of generations that the system will run (needed for damping)", - 'M', - section).value(); - - + 1000, + "max-gen", + "Maximum number of generations that the system will run (needed for damping)", + 'M', + section).value(); + + if (n == 0) { - return; + return; } - + defaults(n, maxgen); - + /* handle lambda */ lambda = parser.createParam( - lambda, - "lambda", - "Number of offspring", - 'l', - section).value(); + lambda, + "lambda", + "Number of offspring", + 'l', + section).value(); if (lambda < 2) { - lambda = 4+(int)(3*log((double) n)); - cerr << "Too small lambda specified, setting it to " << lambda << endl; + lambda = 4+(int)(3*log((double) n)); + cerr << "Too small lambda specified, setting it to " << lambda << endl; } - + /* handle mu */ mu = parser.createParam( - mu, - "mu", - "Population size", - 'm', - section).value(); + mu, + "mu", + "Population size", + 'm', + section).value(); if (mu >= lambda) { - mu = lambda/2; - cerr << "Mu set larger/equal to lambda, setting it to " << mu << endl; + mu = lambda/2; + cerr << "Mu set larger/equal to lambda, setting it to " << mu << endl; } - + /* handle selection weights */ - + int weight_type = parser.createParam( - 0, - "weighting", - "Weighting scheme (for 'selection'): 0 = logarithmic, 1 = equal, 2 = linear", - 'w', - section).value(); + 0, + "weighting", + "Weighting scheme (for 'selection'): 0 = logarithmic, 1 = equal, 2 = linear", + 'w', + section).value(); switch (weight_type) { - case 1: - { - for (unsigned i = 0; i < weights.size(); ++i) { - weights[i] = mu - i; - } - } - case 2: - { - weights = 1.; - } - default : - { - for (unsigned i = 0; i < weights.size(); ++i) { - weights[i] = log(mu+1.)-log(i+1.); - } - } - + case 1: + { + for (unsigned i = 0; i < weights.size(); ++i) { + weights[i] = mu - i; + } + } + case 2: + { + weights = 1.; + } + default : + { + for (unsigned i = 0; i < weights.size(); ++i) { + weights[i] = log(mu+1.)-log(i+1.); + } + } + } /* Normalize weights and set mu_eff */ double sumw = weights.sum(); mueff = sumw * sumw / (weights * weights).sum(); weights /= sumw; - + /* most of the rest depends on mu_eff, so needs to be set again */ - + /* set the others using Nikolaus logic. If you want to tweak, you can parameterize over these defaults */ mucov = mueff; ccumsig = (mueff + 2.) / (n + mueff + 3.); ccumcov = 4. / (n + 4); - + double t1 = 2. / ((n+1.4142)*(n+1.4142)); double t2 = (2.*mucov-1.) / ((n+2.)*(n+2.)+mucov); t2 = (t2 > 1) ? 1 : t2; t2 = (1./mucov) * t1 + (1.-1./mucov) * t2; - + ccov = t2; damp = 1 + std::max(0.3,(1.-(double)n/(double)maxgen)) - * (1+2*std::max(0.,sqrt((mueff-1.)/(n+1.))-1)) /* limit sigma increase */ - / ccumsig; - + * (1+2*std::max(0.,sqrt((mueff-1.)/(n+1.))-1)) /* limit sigma increase */ + / ccumsig; + vector mins(1,0.0); mins = parser.createParam( - mins, - "min-stdev", - "Array of minimum stdevs, last one will apply for all remaining axes", - 0, - section).value(); - + mins, + "min-stdev", + "Array of minimum stdevs, last one will apply for all remaining axes", + 0, + section).value(); + if (mins.size() > n) mins.resize(n); if (mins.size()) { - minStdevs = mins.back(); - for (unsigned i = 0; i < mins.size(); ++i) { - minStdevs[i] = mins[i]; - } + minStdevs = mins.back(); + for (unsigned i = 0; i < mins.size(); ++i) { + minStdevs[i] = mins[i]; + } } - + vector inits(1,0.3); inits = parser.createParam( - inits, - "init-stdev", - "Array of initial stdevs, last one will apply for all remaining axes", - 0, - section).value(); - + inits, + "init-stdev", + "Array of initial stdevs, last one will apply for all remaining axes", + 0, + section).value(); + if (inits.size() > n) inits.resize(n); if (inits.size()) { - initialStdevs = inits.back(); - for (unsigned i = 0; i < inits.size(); ++i) { - initialStdevs[i] = inits[i]; - } + initialStdevs = inits.back(); + for (unsigned i = 0; i < inits.size(); ++i) { + initialStdevs[i] = inits[i]; + } } - + } void CMAParams::defaults(unsigned n_, unsigned maxgen_) { @@ -194,39 +193,39 @@ void CMAParams::defaults(unsigned n_, unsigned maxgen_) { lambda = 4+(int)(3*log((double) n)); mu = lambda / 2; - + weights.resize(mu); - + for (unsigned i = 0; i < weights.size(); ++i) { - weights[i] = log(mu+1.)-log(i+1.); + weights[i] = log(mu+1.)-log(i+1.); } - + /* Normalize weights and set mu_eff */ double sumw = weights.sum(); mueff = sumw * sumw / (weights * weights).sum(); weights /= sumw; - + mucov = mueff; ccumsig *= (mueff + 2.) / (n + mueff + 3.); ccumcov = 4. / (n + 4); - + double t1 = 2. / ((n+1.4142)*(n+1.4142)); double t2 = (2.*mucov-1.) / ((n+2.)*(n+2.)+mucov); t2 = (t2 > 1) ? 1 : t2; t2 = (1./mucov) * t1 + (1.-1./mucov) * t2; - + ccov = t2; damp = 1 + std::max(0.3,(1.-(double)n/maxgen)) - * (1+2*std::max(0.,sqrt((mueff-1.)/(n+1.))-1)) /* limit sigma increase */ - / ccumsig; + * (1+2*std::max(0.,sqrt((mueff-1.)/(n+1.))-1)) /* limit sigma increase */ + / ccumsig; minStdevs.resize(n); minStdevs = 0.0; - + initialStdevs.resize(n); initialStdevs = 0.3; - + } diff --git a/eo/src/es/CMAParams.h b/eo/src/es/CMAParams.h index f59d6c929..905869040 100644 --- a/eo/src/es/CMAParams.h +++ b/eo/src/es/CMAParams.h @@ -1,12 +1,12 @@ /* * C++ification of Nikolaus Hansen's original C-source code for the - * CMA-ES. + * CMA-ES. * * Copyright (C) 1996, 2003, Nikolaus Hansen - * (C) 2005, Maarten Keijzer + * (C) 2005, Maarten Keijzer + * + * License: LGPL * - * License: LGPL - * */ #ifndef CMAPARAMS_H__ @@ -18,25 +18,25 @@ class eoParser; namespace eo { class CMAParams { - + public: - + CMAParams() { /* Call this and all values need to be set by hand */ } CMAParams(eoParser& parser, unsigned dimensionality = 0); // 0 dimensionality -> user needs to set it - + void defaults(unsigned n_, unsigned maxgen_); /* apply all defaults using n and maxgen */ - + unsigned n; unsigned maxgen; - + unsigned lambda; /* -> mu */ unsigned mu; /* -> weights, lambda */ - + std::valarray weights; /* <- mu, -> mueff -> mucov -> ccov */ double mueff; /* <- weights */ - + double mucov; - + double damp; /* <- ccumsig, maxeval, lambda */ double ccumsig; /* -> damp, <- N */ double ccumcov; @@ -49,4 +49,3 @@ class CMAParams { } // namespace eo #endif - diff --git a/eo/src/es/CMAState.cpp b/eo/src/es/CMAState.cpp index f44fdf5d7..328552434 100644 --- a/eo/src/es/CMAState.cpp +++ b/eo/src/es/CMAState.cpp @@ -10,11 +10,11 @@ * algorithm: * * - Numerical issues are now treated 'before' going into the eigenvector decomposition - * (this was done out of convenience) + * (this was done out of convenience) * - dMaxSignifiKond (smallest x such that x == x + 1.0) replaced by - * numeric_limits::epsilon() (smallest x such that 1.0 != 1.0 + x) - * - * + * numeric_limits::epsilon() (smallest x such that 1.0 != 1.0 + x) + * + * */ /* --------------------------------------------------------- */ @@ -37,7 +37,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * */ /* --- Changes : --- * 03/03/21: argument const double *rgFunVal of @@ -66,289 +66,289 @@ using namespace std; namespace eo { - + struct CMAStateImpl { - + CMAParams p; - + lower_triangular_matrix C; // Covariance matrix square_matrix B; // Eigen vectors (in columns) valarray d; // eigen values (diagonal matrix) valarray pc; // Evolution path valarray ps; // Evolution path for stepsize; - + vector mean; // current mean to sample around double sigma; // global step size - + unsigned gen; vector fitnessHistory; - - + + CMAStateImpl(const CMAParams& params_, const vector& m, double sigma_) : - p(params_), - C(p.n), B(p.n), d(p.n), pc(p.n), ps(p.n), mean(m), sigma(sigma_), - gen(0), fitnessHistory(3) + p(params_), + C(p.n), B(p.n), d(p.n), pc(p.n), ps(p.n), mean(m), sigma(sigma_), + gen(0), fitnessHistory(3) { - double trace = (p.initialStdevs * p.initialStdevs).sum(); - /* Initialize covariance structure */ - for (unsigned i = 0; i < p.n; ++i) - { - B[i][i] = 1.; - d[i] = p.initialStdevs[i] * sqrt(p.n / trace); - C[i][i] = d[i] * d[i]; - pc[i] = 0.; - ps[i] = 0.; - } - + double trace = (p.initialStdevs * p.initialStdevs).sum(); + /* Initialize covariance structure */ + for (unsigned i = 0; i < p.n; ++i) + { + B[i][i] = 1.; + d[i] = p.initialStdevs[i] * sqrt(p.n / trace); + C[i][i] = d[i] * d[i]; + pc[i] = 0.; + ps[i] = 0.; + } + } void sample(vector& v) { - unsigned n = p.n; - v.resize(n); - - vector tmp(n); - for (unsigned i = 0; i < n; ++i) - tmp[i] = d[i] * rng.normal(); - - /* add mutation (sigma * B * (D*z)) */ - for (unsigned i = 0; i < n; ++i) { - double sum = 0; - for (unsigned j = 0; j < n; ++j) { - sum += B[i][j] * tmp[j]; - } - v[i] = mean[i] + sigma * sum; - } + unsigned n = p.n; + v.resize(n); + + vector tmp(n); + for (unsigned i = 0; i < n; ++i) + tmp[i] = d[i] * rng.normal(); + + /* add mutation (sigma * B * (D*z)) */ + for (unsigned i = 0; i < n; ++i) { + double sum = 0; + for (unsigned j = 0; j < n; ++j) { + sum += B[i][j] * tmp[j]; + } + v[i] = mean[i] + sigma * sum; + } } - + void reestimate(const vector* >& pop, double muBest, double muWorst) { - - assert(pop.size() == p.mu); - - unsigned n = p.n; - fitnessHistory[gen % fitnessHistory.size()] = muBest; // needed for divergence check - - vector oldmean = mean; - valarray BDz(n); - - /* calculate xmean and rgBDz~N(0,C) */ - for (unsigned i = 0; i < n; ++i) { - mean[i] = 0.; - for (unsigned j = 0; j < pop.size(); ++j) { - mean[i] += p.weights[j] * (*pop[j])[i]; - } - BDz[i] = sqrt(p.mueff)*(mean[i] - oldmean[i])/sigma; - } + assert(pop.size() == p.mu); - vector tmp(n); - /* calculate z := D^(-1) * B^(-1) * rgBDz into rgdTmp */ - for (unsigned i = 0; i < n; ++i) { - double sum = 0.0; - for (unsigned j = 0; j < n; ++j) { - sum += B[j][i] * BDz[j]; - } - tmp[i] = sum / d[i]; - } + unsigned n = p.n; - /* cumulation for sigma (ps) using B*z */ - for (unsigned i = 0; i < n; ++i) { - double sum = 0.0; - for (unsigned j = 0; j < n; ++j) - sum += B[i][j] * tmp[j]; - - ps[i] = (1. - p.ccumsig) * ps[i] + sqrt(p.ccumsig * (2. - p.ccumsig)) * sum; - } + fitnessHistory[gen % fitnessHistory.size()] = muBest; // needed for divergence check - /* calculate norm(ps)^2 */ - double psxps = (ps * ps).sum(); + vector oldmean = mean; + valarray BDz(n); - - double chiN = sqrt((double) p.n) * (1. - 1./(4.*p.n) + 1./(21.*p.n*p.n)); - /* cumulation for covariance matrix (pc) using B*D*z~N(0,C) */ - double hsig = sqrt(psxps) / sqrt(1. - pow(1.-p.ccumsig, 2.*gen)) / chiN < 1.5 + 1./(p.n-0.5); - - pc = (1. - p.ccumcov) * pc + hsig * sqrt(p.ccumcov * (2. - p.ccumcov)) * BDz; - - /* stop initial phase (MK, this was not reachable in the org code, deleted) */ + /* calculate xmean and rgBDz~N(0,C) */ + for (unsigned i = 0; i < n; ++i) { + mean[i] = 0.; + for (unsigned j = 0; j < pop.size(); ++j) { + mean[i] += p.weights[j] * (*pop[j])[i]; + } + BDz[i] = sqrt(p.mueff)*(mean[i] - oldmean[i])/sigma; + } - /* remove momentum in ps, if ps is large and fitness is getting worse */ + vector tmp(n); + /* calculate z := D^(-1) * B^(-1) * rgBDz into rgdTmp */ + for (unsigned i = 0; i < n; ++i) { + double sum = 0.0; + for (unsigned j = 0; j < n; ++j) { + sum += B[j][i] * BDz[j]; + } + tmp[i] = sum / d[i]; + } - if (gen >= fitnessHistory.size()) { + /* cumulation for sigma (ps) using B*z */ + for (unsigned i = 0; i < n; ++i) { + double sum = 0.0; + for (unsigned j = 0; j < n; ++j) + sum += B[i][j] * tmp[j]; - // find direction from muBest and muWorst (muBest == muWorst handled seperately - double direction = muBest < muWorst? -1.0 : 1.0; - - unsigned now = gen % fitnessHistory.size(); - unsigned prev = (gen-1) % fitnessHistory.size(); - unsigned prevprev = (gen-2) % fitnessHistory.size(); + ps[i] = (1. - p.ccumsig) * ps[i] + sqrt(p.ccumsig * (2. - p.ccumsig)) * sum; + } - bool fitnessWorsens = (muBest == muWorst) || // <- increase norm also when population has converged (this deviates from Hansen's scheme) - ( (direction * fitnessHistory[now] < direction * fitnessHistory[prev]) - && - (direction * fitnessHistory[now] < direction * fitnessHistory[prevprev])); - - if(psxps/p.n > 1.5 + 10.*sqrt(2./p.n) && fitnessWorsens) { - double tfac = sqrt((1 + std::max(0., log(psxps/p.n))) * p.n / psxps); - ps *= tfac; - psxps *= tfac*tfac; - } - } + /* calculate norm(ps)^2 */ + double psxps = (ps * ps).sum(); - /* update of C */ - /* Adapt_C(t); not used anymore */ - if (p.ccov != 0.) { - //flgEigensysIsUptodate = 0; - /* update covariance matrix */ - for (unsigned i = 0; i < n; ++i) { - vector::iterator c_row = C[i]; - for (unsigned j = 0; j <= i; ++j) { - c_row[j] = - (1 - p.ccov) * c_row[j] - + - p.ccov * (1./p.mucov) * pc[i] * pc[j] - + - (1-hsig) * p.ccumcov * (2. - p.ccumcov) * c_row[j]; - - /*C[i][j] = (1 - p.ccov) * C[i][j] - + sp.ccov * (1./sp.mucov) - * (rgpc[i] * rgpc[j] - + (1-hsig)*sp.ccumcov*(2.-sp.ccumcov) * C[i][j]); */ - for (unsigned k = 0; k < p.mu; ++k) { /* additional rank mu update */ - c_row[j] += p.ccov * (1-1./p.mucov) * p.weights[k] - * ( (*pop[k])[i] - oldmean[i]) - * ( (*pop[k])[j] - oldmean[j]) - / sigma / sigma; - - // * (rgrgx[index[k]][i] - rgxold[i]) - // * (rgrgx[index[k]][j] - rgxold[j]) - // / sigma / sigma; - } - } - } - } + double chiN = sqrt((double) p.n) * (1. - 1./(4.*p.n) + 1./(21.*p.n*p.n)); + /* cumulation for covariance matrix (pc) using B*D*z~N(0,C) */ + double hsig = sqrt(psxps) / sqrt(1. - pow(1.-p.ccumsig, 2.*gen)) / chiN < 1.5 + 1./(p.n-0.5); - /* update of sigma */ - sigma *= exp(((sqrt(psxps)/chiN)-1.)/p.damp); - /* calculate eigensystem, must be done by caller */ - //cmaes_UpdateEigensystem(0); + pc = (1. - p.ccumcov) * pc + hsig * sqrt(p.ccumcov * (2. - p.ccumcov)) * BDz; - - /* treat minimal standard deviations and numeric problems - * Note that in contrast with the original code, some numerical issues are treated *before* we - * go into the eigenvalue calculation */ - - treatNumericalIssues(muBest, muWorst); + /* stop initial phase (MK, this was not reachable in the org code, deleted) */ - gen++; // increase generation + /* remove momentum in ps, if ps is large and fitness is getting worse */ + + if (gen >= fitnessHistory.size()) { + + // find direction from muBest and muWorst (muBest == muWorst handled seperately + double direction = muBest < muWorst? -1.0 : 1.0; + + unsigned now = gen % fitnessHistory.size(); + unsigned prev = (gen-1) % fitnessHistory.size(); + unsigned prevprev = (gen-2) % fitnessHistory.size(); + + bool fitnessWorsens = (muBest == muWorst) || // <- increase norm also when population has converged (this deviates from Hansen's scheme) + ( (direction * fitnessHistory[now] < direction * fitnessHistory[prev]) + && + (direction * fitnessHistory[now] < direction * fitnessHistory[prevprev])); + + if(psxps/p.n > 1.5 + 10.*sqrt(2./p.n) && fitnessWorsens) { + double tfac = sqrt((1 + std::max(0., log(psxps/p.n))) * p.n / psxps); + ps *= tfac; + psxps *= tfac*tfac; + } + } + + /* update of C */ + /* Adapt_C(t); not used anymore */ + if (p.ccov != 0.) { + //flgEigensysIsUptodate = 0; + + /* update covariance matrix */ + for (unsigned i = 0; i < n; ++i) { + vector::iterator c_row = C[i]; + for (unsigned j = 0; j <= i; ++j) { + c_row[j] = + (1 - p.ccov) * c_row[j] + + + p.ccov * (1./p.mucov) * pc[i] * pc[j] + + + (1-hsig) * p.ccumcov * (2. - p.ccumcov) * c_row[j]; + + /*C[i][j] = (1 - p.ccov) * C[i][j] + + sp.ccov * (1./sp.mucov) + * (rgpc[i] * rgpc[j] + + (1-hsig)*sp.ccumcov*(2.-sp.ccumcov) * C[i][j]); */ + for (unsigned k = 0; k < p.mu; ++k) { /* additional rank mu update */ + c_row[j] += p.ccov * (1-1./p.mucov) * p.weights[k] + * ( (*pop[k])[i] - oldmean[i]) + * ( (*pop[k])[j] - oldmean[j]) + / sigma / sigma; + + // * (rgrgx[index[k]][i] - rgxold[i]) + // * (rgrgx[index[k]][j] - rgxold[j]) + // / sigma / sigma; + } + } + } + } + + /* update of sigma */ + sigma *= exp(((sqrt(psxps)/chiN)-1.)/p.damp); + /* calculate eigensystem, must be done by caller */ + //cmaes_UpdateEigensystem(0); + + + /* treat minimal standard deviations and numeric problems + * Note that in contrast with the original code, some numerical issues are treated *before* we + * go into the eigenvalue calculation */ + + treatNumericalIssues(muBest, muWorst); + + gen++; // increase generation } void treatNumericalIssues(double best, double worst) { - - /* treat stdevs */ - for (unsigned i = 0; i < p.n; ++i) { - if (sigma * sqrt(C[i][i]) < p.minStdevs[i]) { - // increase stdev - sigma *= exp(0.05+1./p.damp); - break; - } - } - - /* treat convergence */ - if (best == worst) { - sigma *= exp(0.2 + 1./p.damp); - } - - /* Jede Hauptachse i testen, ob x == x + 0.1 * sigma * rgD[i] * B[i] */ - /* Test if all the means are not numerically out of whack with our coordinate system*/ - for (unsigned axis = 0; axis < p.n; ++axis) { - double fac = 0.1 * sigma * d[axis]; - unsigned coord; - for (coord = 0; coord < p.n; ++coord) { - if (mean[coord] != mean[coord] + fac * B[coord][axis]) { - break; - } - } - if (coord == p.n) { // means are way too big (little) for numerical accuraccy. Start rocking the craddle a bit more - sigma *= exp(0.2+1./p.damp); - } - - } - - /* Testen ob eine Komponente des Objektparameters festhaengt */ - /* Correct issues with scale between objective values and covariances */ - bool theresAnIssue = false; + /* treat stdevs */ + for (unsigned i = 0; i < p.n; ++i) { + if (sigma * sqrt(C[i][i]) < p.minStdevs[i]) { + // increase stdev + sigma *= exp(0.05+1./p.damp); + break; + } + } - for (unsigned i = 0; i < p.n; ++i) { - if (mean[i] == mean[i] + 0.2 * sigma * sqrt(C[i][i])) { - C[i][i] *= (1. + p.ccov); - theresAnIssue = true; - } - } + /* treat convergence */ + if (best == worst) { + sigma *= exp(0.2 + 1./p.damp); + } - if (theresAnIssue) { - sigma *= exp(0.05 + 1./p.damp); - } + /* Jede Hauptachse i testen, ob x == x + 0.1 * sigma * rgD[i] * B[i] */ + /* Test if all the means are not numerically out of whack with our coordinate system*/ + for (unsigned axis = 0; axis < p.n; ++axis) { + double fac = 0.1 * sigma * d[axis]; + unsigned coord; + for (coord = 0; coord < p.n; ++coord) { + if (mean[coord] != mean[coord] + fac * B[coord][axis]) { + break; + } + } + + if (coord == p.n) { // means are way too big (little) for numerical accuraccy. Start rocking the craddle a bit more + sigma *= exp(0.2+1./p.damp); + } + + } + + /* Testen ob eine Komponente des Objektparameters festhaengt */ + /* Correct issues with scale between objective values and covariances */ + bool theresAnIssue = false; + + for (unsigned i = 0; i < p.n; ++i) { + if (mean[i] == mean[i] + 0.2 * sigma * sqrt(C[i][i])) { + C[i][i] *= (1. + p.ccov); + theresAnIssue = true; + } + } + + if (theresAnIssue) { + sigma *= exp(0.05 + 1./p.damp); + } } - + bool updateEigenSystem(unsigned max_tries, unsigned max_iters) { - if (max_iters==0) max_iters = 30 * p.n; - - static double lastGoodMinimumEigenValue = 1.0; - - /* Try to get a valid calculation */ - for (unsigned tries = 0; tries < max_tries; ++tries) { - - unsigned iters = eig( p.n, C, d, B, max_iters); - if (iters < max_iters) - { // all is well - - /* find largest/smallest eigenvalues */ - double minEV = d.min(); - double maxEV = d.max(); + if (max_iters==0) max_iters = 30 * p.n; - /* (MK Original comment was) :Limit Condition of C to dMaxSignifKond+1 - * replaced dMaxSignifKond with 1./numeric_limits::epsilon() - * */ - if (maxEV * numeric_limits::epsilon() > minEV) { - double tmp = maxEV * numeric_limits::epsilon() - minEV; - minEV += tmp; - for (unsigned i=0;i::epsilon() + * */ + if (maxEV * numeric_limits::epsilon() > minEV) { + double tmp = maxEV * numeric_limits::epsilon() - minEV; + minEV += tmp; + for (unsigned i=0;i& initial_point, const double initial_sigma) +CMAState::CMAState(const CMAParams& params, const std::vector& initial_point, const double initial_sigma) : pimpl(new CMAStateImpl(params, initial_point, initial_sigma)) {} CMAState::~CMAState() { delete pimpl; } @@ -362,4 +362,3 @@ bool CMAState::updateEigenSystem(unsigned max_tries, unsigned max_iters) { retur } // namespace eo - diff --git a/eo/src/es/CMAState.h b/eo/src/es/CMAState.h index 505a31b71..85a80c52c 100644 --- a/eo/src/es/CMAState.h +++ b/eo/src/es/CMAState.h @@ -1,13 +1,12 @@ - /* * C++ification of Nikolaus Hansen's original C-source code for the - * CMA-ES. + * CMA-ES. * * Copyright (C) 1996, 2003, Nikolaus Hansen - * (C) 2005, Maarten Keijzer + * (C) 2005, Maarten Keijzer * * License: LGPL (see source file) - * + * */ #ifndef CMASTATE_H_ @@ -17,14 +16,14 @@ #include namespace eo { - + class CMAStateImpl; class CMAParams; class CMAState { - + CMAStateImpl* pimpl; /* pointer to implementation, hidden in source file */ - + public: CMAState(const CMAParams&, const std::vector& initial_point, const double initial_sigma = 1.0); @@ -35,34 +34,34 @@ class CMAState { /** * sample a vector from the distribution * - * If the sample is not to your liking (i.e., not within bounds) - * you can do one of two things: + * If the sample is not to your liking (i.e., not within bounds) + * you can do one of two things: * - * a) Call sample again - * b) multiply the entire vector with a number between -1 and 1 - * - * Do not modify the sample in any other way as this will invalidate the - * internal consistency of the system. + * a) Call sample again + * b) multiply the entire vector with a number between -1 and 1 * - * A final approach is to copy the sample and modify the copy externally (in the evaluation function) - * and possibly add a penalty depending on the size of the modification. + * Do not modify the sample in any other way as this will invalidate the + * internal consistency of the system. + * + * A final approach is to copy the sample and modify the copy externally (in the evaluation function) + * and possibly add a penalty depending on the size of the modification. * */ void sample(std::vector& v) const; - + /** * Reestimate covariance matrix and other internal parameters * Does NOT update the eigen system (call that seperately) * * Needs a population of mu individuals, sorted on fitness, plus * - * muBest: the best fitness in the population + * muBest: the best fitness in the population * muWorst: the worst fitness in the population */ - + void reestimate(const std::vector* >& sorted_population, double muBest, double muWorst); - - /** + + /** * call this function after reestimate in order to update the eigen system * It is a seperate call to allow the user to periodically skip this expensive step * @@ -71,7 +70,7 @@ class CMAState { * If after max_tries still no numerically sound eigen system is constructed, * the function returns false */ - bool updateEigenSystem(unsigned max_tries = 1, unsigned max_iters = 0); + bool updateEigenSystem(unsigned max_tries = 1, unsigned max_iters = 0); }; } // namespace eo diff --git a/eo/src/es/eig.cpp b/eo/src/es/eig.cpp index 29998bcbb..d7ddd41da 100644 --- a/eo/src/es/eig.cpp +++ b/eo/src/es/eig.cpp @@ -1,4 +1,3 @@ - /* * C++ification of Nikolaus Hansen's original C-source code for the * CMA-ES. These are the eigenvector calculations @@ -8,7 +7,7 @@ * * This algorithm is held almost completely intact. Some other datatypes are used, * but hardly any code has changed - * + * */ /* --------------------------------------------------------- */ @@ -31,7 +30,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * */ /* --- Changes : --- * 03/03/21: argument const double *rgFunVal of @@ -49,21 +48,21 @@ using namespace std; /* ========================================================= */ -/* +/* Householder Transformation einer symmetrischen Matrix auf tridiagonale Form. -> n : Dimension -> ma : symmetrische nxn-Matrix - <- ma : Transformationsmatrix (ist orthogonal): + <- ma : Transformationsmatrix (ist orthogonal): Tridiag.-Matrix == <-ma * ->ma * (<-ma)^t <- diag : Diagonale der resultierenden Tridiagonalmatrix <- neben[0..n-1] : Nebendiagonale (==1..n-1) der res. Tridiagonalmatrix */ -static void +static void Householder( int N, square_matrix& ma, valarray& diag, double* neben) { - double epsilon; + double epsilon; int i, j, k; double h, sum, tmp, tmp2; @@ -82,34 +81,34 @@ Householder( int N, square_matrix& ma, valarray& diag, double* neben) else { for(k = i-1, sum = 0.0; k >= 0; --k) - { /* i-te Zeile von i-1 bis links normieren */ + { /* i-te Zeile von i-1 bis links normieren */ ma[i][k] /= epsilon; - sum += ma[i][k]*ma[i][k]; - } - tmp = (ma[i][i-1] > 0) ? -sqrt(sum) : sqrt(sum); - neben[i] = epsilon*tmp; - h = sum - ma[i][i-1]*tmp; - ma[i][i-1] -= tmp; - for (j = 0, sum = 0.0; j < i; ++j) - { - ma[j][i] = ma[i][j]/h; - tmp = 0.0; - for (k = j; k >= 0; --k) - tmp += ma[j][k]*ma[i][k]; - for (k = j+1; k < i; ++k) - tmp += ma[k][j]*ma[i][k]; - neben[j] = tmp/h; - sum += neben[j] * ma[i][j]; - } /* for j */ - sum /= 2.*h; - for (j = 0; j < i; ++j) - { - neben[j] -= ma[i][j]*sum; - tmp = ma[i][j]; - tmp2 = neben[j]; - for (k = j; k >= 0; --k) - ma[j][k] -= (tmp*neben[k] + tmp2*ma[i][k]); - } /* for j */ + sum += ma[i][k]*ma[i][k]; + } + tmp = (ma[i][i-1] > 0) ? -sqrt(sum) : sqrt(sum); + neben[i] = epsilon*tmp; + h = sum - ma[i][i-1]*tmp; + ma[i][i-1] -= tmp; + for (j = 0, sum = 0.0; j < i; ++j) + { + ma[j][i] = ma[i][j]/h; + tmp = 0.0; + for (k = j; k >= 0; --k) + tmp += ma[j][k]*ma[i][k]; + for (k = j+1; k < i; ++k) + tmp += ma[k][j]*ma[i][k]; + neben[j] = tmp/h; + sum += neben[j] * ma[i][j]; + } /* for j */ + sum /= 2.*h; + for (j = 0; j < i; ++j) + { + neben[j] -= ma[i][j]*sum; + tmp = ma[i][j]; + tmp2 = neben[j]; + for (k = j; k >= 0; --k) + ma[j][k] -= (tmp*neben[k] + tmp2*ma[i][k]); + } /* for j */ } /* else epsilon */ } /* else i == 1 */ diag[i] = h; @@ -117,16 +116,16 @@ Householder( int N, square_matrix& ma, valarray& diag, double* neben) diag[0] = 0.0; neben[0] = 0.0; - + for (i = 0; i < N; ++i) { if(diag[i] != 0.0) for (j = 0; j < i; ++j) { - for (k = i-1, tmp = 0.0; k >= 0; --k) - tmp += ma[i][k] * ma[k][j]; + for (k = i-1, tmp = 0.0; k >= 0; --k) + tmp += ma[i][k] * ma[k][j]; for (k = i-1; k >= 0; --k) - ma[k][j] -= tmp*ma[k][i]; + ma[k][j] -= tmp*ma[k][i]; } /* for j */ diag[i] = ma[i][i]; ma[i][i] = 1.0; @@ -137,21 +136,21 @@ Householder( int N, square_matrix& ma, valarray& diag, double* neben) /* QL-Algorithmus mit implizitem Shift, zur Berechnung von Eigenwerten - und -vektoren einer symmetrischen Tridiagonalmatrix. - -> n : Dimension. - -> diag : Diagonale der Tridiagonalmatrix. + und -vektoren einer symmetrischen Tridiagonalmatrix. + -> n : Dimension. + -> diag : Diagonale der Tridiagonalmatrix. -> neben[0..n-1] : Nebendiagonale (==0..n-2), n-1. Eintrag beliebig - -> mq : Matrix output von Householder() - -> maxIt : maximale Zahl der Iterationen + -> mq : Matrix output von Householder() + -> maxIt : maximale Zahl der Iterationen <- diag : Eigenwerte <- neben : Garbage <- mq : k-te Spalte ist normalisierter Eigenvektor zu diag[k] */ -static int -QLalgo( int N, valarray& diag, square_matrix& mq, - int maxIter, double* neben) +static int +QLalgo( int N, valarray& diag, square_matrix& mq, + int maxIter, double* neben) { int i, j, k, kp1, l; double tmp, diff, cneben, c1, c2, p; @@ -163,77 +162,77 @@ QLalgo( int N, valarray& diag, square_matrix& mq, { for (j = i; j < N-1; ++j) { - tmp = fabs(diag[j]) + fabs(diag[j+1]); - if (fabs(neben[j]) + tmp == tmp) - break; + tmp = fabs(diag[j]) + fabs(diag[j+1]); + if (fabs(neben[j]) + tmp == tmp) + break; } if (j != i) { - if (++iter > maxIter) return maxIter-1; - diff = (diag[i+1]-diag[i])/neben[i]/2.0; - if (diff >= 0) - diff = diag[j] - diag[i] + - neben[i] / (diff + sqrt(diff * diff + 1.0)); - else - diff = diag[j] - diag[i] + - neben[i] / (diff - sqrt(diff * diff + 1.0)); - c2 = c1 = 1.0; - p = 0.0; - for (k = j-1; k >= i; --k) - { - kp1 = k + 1; - tmp = c2 * neben[k]; - cneben = c1 * neben[k]; - if (fabs(tmp) >= fabs(diff)) - { - c1 = diff / tmp; - c2 = 1. / sqrt(c1*c1 + 1.0); - neben[kp1] = tmp / c2; - c1 *= c2; - } - else - { - c2 = tmp / diff; - c1 = 1. / sqrt(c2*c2 + 1.0); - neben[kp1] = diff / c1; - c2 *= c1; - } /* else */ - tmp = (diag[k] - diag[kp1] + p) * c2 + 2.0 * c1 * cneben; - diag[kp1] += tmp * c2 - p; - p = tmp * c2; - diff = tmp * c1 - cneben; - for (l = N-1; l >= 0; --l) /* TF-Matrix Q */ - { - tmp = mq[l][kp1]; - mq[l][kp1] = c2 * mq[l][k] + c1 * tmp; - mq[l][k] = c1 * mq[l][k] - c2 * tmp; - } /* for l */ - } /* for k */ - diag[i] -= p; - neben[i] = diff; - neben[j] = 0.0; + if (++iter > maxIter) return maxIter-1; + diff = (diag[i+1]-diag[i])/neben[i]/2.0; + if (diff >= 0) + diff = diag[j] - diag[i] + + neben[i] / (diff + sqrt(diff * diff + 1.0)); + else + diff = diag[j] - diag[i] + + neben[i] / (diff - sqrt(diff * diff + 1.0)); + c2 = c1 = 1.0; + p = 0.0; + for (k = j-1; k >= i; --k) + { + kp1 = k + 1; + tmp = c2 * neben[k]; + cneben = c1 * neben[k]; + if (fabs(tmp) >= fabs(diff)) + { + c1 = diff / tmp; + c2 = 1. / sqrt(c1*c1 + 1.0); + neben[kp1] = tmp / c2; + c1 *= c2; + } + else + { + c2 = tmp / diff; + c1 = 1. / sqrt(c2*c2 + 1.0); + neben[kp1] = diff / c1; + c2 *= c1; + } /* else */ + tmp = (diag[k] - diag[kp1] + p) * c2 + 2.0 * c1 * cneben; + diag[kp1] += tmp * c2 - p; + p = tmp * c2; + diff = tmp * c1 - cneben; + for (l = N-1; l >= 0; --l) /* TF-Matrix Q */ + { + tmp = mq[l][kp1]; + mq[l][kp1] = c2 * mq[l][k] + c1 * tmp; + mq[l][k] = c1 * mq[l][k] - c2 * tmp; + } /* for l */ + } /* for k */ + diag[i] -= p; + neben[i] = diff; + neben[j] = 0.0; } /* if */ } while (j != i); return iter; } /* QLalgo() */ /* ========================================================= */ -/* - Calculating eigenvalues and vectors. - Input: +/* + Calculating eigenvalues and vectors. + Input: N: dimension. C: lower_triangular NxN-matrix. - niter: number of maximal iterations for QL-Algorithm. - rgtmp: N+1-dimensional vector for temporal use. - Output: + niter: number of maximal iterations for QL-Algorithm. + rgtmp: N+1-dimensional vector for temporal use. + Output: diag: N eigenvalues. Q: Columns are normalized eigenvectors. return: number of iterations in QL-Algorithm. */ namespace eo { -int -eig( int N, const lower_triangular_matrix& C, valarray& diag, square_matrix& Q, +int +eig( int N, const lower_triangular_matrix& C, valarray& diag, square_matrix& Q, int niter) { int ret; @@ -245,15 +244,15 @@ eig( int N, const lower_triangular_matrix& C, valarray& diag, square_ma { vector::const_iterator row = C[i]; for (j = 0; j <= i; ++j) - Q[i][j] = Q[j][i] = row[j]; + Q[i][j] = Q[j][i] = row[j]; } - + double* rgtmp = new double[N+1]; Householder( N, Q, diag, rgtmp); ret = QLalgo( N, diag, Q, niter, rgtmp+1); delete [] rgtmp; - + return ret; -} +} } // namespace eo diff --git a/eo/src/es/eig.h b/eo/src/es/eig.h index 02aa36e0d..65d9c53d2 100644 --- a/eo/src/es/eig.h +++ b/eo/src/es/eig.h @@ -6,18 +6,18 @@ namespace eo { /* ========================================================= */ -/* - Calculating eigenvalues and vectors. - Input: +/* + Calculating eigenvalues and vectors. + Input: N: dimension. C: lower_triangular NxN-matrix. - niter: number of maximal iterations for QL-Algorithm. - Output: + niter: number of maximal iterations for QL-Algorithm. + Output: diag: N eigenvalues. Q: Columns are normalized eigenvectors. return: number of iterations in QL-Algorithm. */ -extern int eig( int N, const lower_triangular_matrix& C, std::valarray& diag, square_matrix& Q, +extern int eig( int N, const lower_triangular_matrix& C, std::valarray& diag, square_matrix& Q, int niter = 0); } // namespace eo diff --git a/eo/src/es/eoCMABreed.h b/eo/src/es/eoCMABreed.h index d55ab2610..450654a7f 100644 --- a/eo/src/es/eoCMABreed.h +++ b/eo/src/es/eoCMABreed.h @@ -34,43 +34,43 @@ /// @todo handle bounds template class eoCMABreed : public eoBreed< eoVector > { - + eo::CMAState& state; unsigned lambda; - + typedef eoVector EOT; - + public: eoCMABreed(eo::CMAState& state_, unsigned lambda_) : state(state_), lambda(lambda_) {} - + void operator()(const eoPop& parents, eoPop& offspring) { - - // two temporary arrays of pointers to store the sorted population - std::vector sorted(parents.size()); - + + // two temporary arrays of pointers to store the sorted population + std::vector sorted(parents.size()); + // mu stores population as vector (instead of eoPop) std::vector* > mu(parents.size()); - - parents.sort(sorted); - for (unsigned i = 0; i < sorted.size(); ++i) { - mu[i] = static_cast< const std::vector* >( sorted[i] ); - } - - // learn - state.reestimate(mu, sorted[0]->fitness(), sorted.back()->fitness()); - - if (!state.updateEigenSystem(10)) { - std::cerr << "No good eigensystem found" << std::endl; - } - - // generate - offspring.resize(lambda); - for (unsigned i = 0; i < lambda; ++i) { - state.sample( static_cast< std::vector& >( offspring[i] )); - offspring[i].invalidate(); - } - + parents.sort(sorted); + for (unsigned i = 0; i < sorted.size(); ++i) { + mu[i] = static_cast< const std::vector* >( sorted[i] ); + } + + // learn + state.reestimate(mu, sorted[0]->fitness(), sorted.back()->fitness()); + + if (!state.updateEigenSystem(10)) { + std::cerr << "No good eigensystem found" << std::endl; + } + + // generate + offspring.resize(lambda); + + for (unsigned i = 0; i < lambda; ++i) { + state.sample( static_cast< std::vector& >( offspring[i] )); + offspring[i].invalidate(); + } + } }; diff --git a/eo/src/es/eoCMAInit.h b/eo/src/es/eoCMAInit.h index bce9e5baf..2fdb967e0 100644 --- a/eo/src/es/eoCMAInit.h +++ b/eo/src/es/eoCMAInit.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; fill-column: 80; -*- //----------------------------------------------------------------------------- -// eoCMAInit +// eoCMAInit // (c) Maarten Keijzer 2005 /* This library is free software; you can redistribute it and/or @@ -35,18 +35,18 @@ /// @todo handle bounds template class eoCMAInit : public eoInit< eoVector > { - + const eo::CMAState& state; typedef eoVector EOT; - + public: eoCMAInit(const eo::CMAState& state_) : state(state_) {} - + void operator()(EOT& v) { - state.sample(static_cast& >(v)); - v.invalidate(); + state.sample(static_cast& >(v)); + v.invalidate(); } }; diff --git a/eo/src/es/eoEsGlobalXover.h b/eo/src/es/eoEsGlobalXover.h index bac4ae27c..5be4b5061 100644 --- a/eo/src/es/eoEsGlobalXover.h +++ b/eo/src/es/eoEsGlobalXover.h @@ -75,12 +75,12 @@ public: // first, the object variables for (unsigned i=0; i used by _plop to get parents - const EOT& realParent1 = sel(_plop.source()); - const EOT& realParent2 = sel(_plop.source()); - parent[i] = realParent1[i]; - crossObj(parent[i], realParent2[i]); // apply eoBinOp + // get extra parents - use private selector + // _plop.source() is the eoPop used by _plop to get parents + const EOT& realParent1 = sel(_plop.source()); + const EOT& realParent2 = sel(_plop.source()); + parent[i] = realParent1[i]; + crossObj(parent[i], realParent2[i]); // apply eoBinOp } // then the self-adaptation parameters cross_self_adapt(parent, _plop.source()); @@ -110,10 +110,10 @@ private: { for (unsigned i=0; i<_parent.size(); i++) { - const EOT& realParent1 = sel(_pop); - const EOT& realParent2 = sel(_pop); - _parent.stdevs[i] = realParent1.stdevs[i]; - crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdevs[i] = realParent1.stdevs[i]; + crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp } } @@ -127,18 +127,18 @@ private: // the StDev for (i=0; i<_parent.size(); i++) { - const EOT& realParent1 = sel(_pop); - const EOT& realParent2 = sel(_pop); - _parent.stdevs[i] = realParent1.stdevs[i]; - crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdevs[i] = realParent1.stdevs[i]; + crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp } // the roataion angles for (i=0; i<_parent.correlations.size(); i++) { - const EOT& realParent1 = sel(_pop); - const EOT& realParent2 = sel(_pop); - _parent.correlations[i] = realParent1.correlations[i]; - crossMut(_parent.correlations[i], realParent2.correlations[i]); // apply eoBinOp + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.correlations[i] = realParent1.correlations[i]; + crossMut(_parent.correlations[i], realParent2.correlations[i]); // apply eoBinOp } } diff --git a/eo/src/es/eoEsMutate.h b/eo/src/es/eoEsMutate.h index 6ae09ef2c..fd1152685 100644 --- a/eo/src/es/eoEsMutate.h +++ b/eo/src/es/eoEsMutate.h @@ -99,7 +99,7 @@ public: { _eo.stdev *= exp(TauLcl * rng.normal()); if (_eo.stdev < stdev_eps) - _eo.stdev = stdev_eps; + _eo.stdev = stdev_eps; // now apply to all for (unsigned i = 0; i < _eo.size(); ++i) { @@ -218,7 +218,7 @@ public: unsigned size = bounds.size(); TauLcl = _init.TauLcl(); TauLcl /= sqrt(2*(double) size); - std::cout << "Init: tau local " << TauLcl << std::endl; + std::cout << "Init: tau local " << TauLcl << std::endl; } diff --git a/eo/src/es/eoEsMutationInit.h b/eo/src/es/eoEsMutationInit.h index 6ee74c2a7..987de86bd 100644 --- a/eo/src/es/eoEsMutationInit.h +++ b/eo/src/es/eoEsMutationInit.h @@ -55,7 +55,7 @@ public : @param _section Parser section for \f$\tau\f$-parameters. */ eoEsMutationInit(eoParser& _parser, - std::string _section="ES mutation parameters" ) : + std::string _section="ES mutation parameters" ) : parser(_parser), repSection(_section), TauLclParam(0), TauGlbParam(0), TauBetaParam(0) {} diff --git a/eo/src/es/eoEsStandardXover.h b/eo/src/es/eoEsStandardXover.h index 56d59be8b..34739693c 100644 --- a/eo/src/es/eoEsStandardXover.h +++ b/eo/src/es/eoEsStandardXover.h @@ -1,4 +1,4 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoEsLocalXover.h : ES global crossover @@ -8,16 +8,16 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ */ //----------------------------------------------------------------------------- @@ -45,7 +45,7 @@ * @ingroup Real * @ingroup Variators */ -template +template class eoEsStandardXover: public eoBinOp { public: @@ -70,13 +70,13 @@ public: // first, the object variables for (unsigned i=0; i<_eo1.size(); i++) { - bLoc |= crossObj(_eo1[i], _eo2[i]); // apply eoBinOp + bLoc |= crossObj(_eo1[i], _eo2[i]); // apply eoBinOp } // then the self-adaptation parameters bLoc |= cross_self_adapt(_eo1, _eo2); return bLoc; } - + private: // the method to cross slef-adaptation parameters: need to specialize @@ -91,7 +91,7 @@ private: bool bLoc=false; for (unsigned i=0; i<_parent1.size(); i++) { - bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp } return bLoc; } @@ -103,12 +103,12 @@ private: // the StDev for (i=0; i<_parent1.size(); i++) { - bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp } // the roataion angles for (i=0; i<_parent1.correlations.size(); i++) { - bLoc |= crossMut(_parent1.correlations[i], _parent2.correlations[i]); // apply eoBinOp + bLoc |= crossMut(_parent1.correlations[i], _parent2.correlations[i]); // apply eoBinOp } return bLoc; diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 174472440..96dcf54c2 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -69,13 +69,13 @@ template class eoNormalVecMutation: public eoMonOp * for each component, the sigma is scaled to the range of the bound, if bounded */ eoNormalVecMutation(eoRealVectorBounds & _bounds, - double _sigma, const double& _p_change = 1.0): + double _sigma, const double& _p_change = 1.0): sigma(_bounds.size(), _sigma), bounds(_bounds), p_change(_p_change) { // scale to the range - if any for (unsigned i=0; i class eoNormalVecMutation: public eoMonOp { bool hasChanged=false; for (unsigned lieu=0; lieu<_eo.size(); lieu++) - { - if (rng.flip(p_change)) - { - _eo[lieu] += sigma[lieu]*rng.normal(); - bounds.foldsInBounds(lieu, _eo[lieu]); - hasChanged = true; - } - } + { + if (rng.flip(p_change)) + { + _eo[lieu] += sigma[lieu]*rng.normal(); + bounds.foldsInBounds(lieu, _eo[lieu]); + hasChanged = true; + } + } return hasChanged; } @@ -138,7 +138,7 @@ public: * @param _p_change the probability to change a given coordinate */ eoNormalMutation(eoRealVectorBounds & _bounds, - double _sigma, const double& _p_change = 1.0): + double _sigma, const double& _p_change = 1.0): sigma(_sigma), bounds(_bounds), p_change(_p_change) {} /** The class name */ @@ -152,14 +152,14 @@ public: { bool hasChanged=false; for (unsigned lieu=0; lieu<_eo.size(); lieu++) - { - if (rng.flip(p_change)) - { - _eo[lieu] += sigma*rng.normal(); - bounds.foldsInBounds(lieu, _eo[lieu]); - hasChanged = true; - } - } + { + if (rng.flip(p_change)) + { + _eo[lieu] += sigma*rng.normal(); + bounds.foldsInBounds(lieu, _eo[lieu]); + hasChanged = true; + } + } return hasChanged; } @@ -199,8 +199,8 @@ public: * @param _threshold the threshold (the 1/5 - 0.2) */ eoOneFifthMutation(eoEvalFunc & _eval, double & _sigmaInit, - unsigned _windowSize = 10, double _updateFactor=0.83, - double _threshold=0.2): + unsigned _windowSize = 10, double _updateFactor=0.83, + double _threshold=0.2): eoNormalMutation(_sigmaInit), eval(_eval), threshold(_threshold), updateFactor(_updateFactor), nbMut(_windowSize, 0), nbSuccess(_windowSize, 0), genIndex(0) @@ -221,21 +221,21 @@ public: */ bool operator()(EOT & _eo) { - if (_eo.invalid()) // due to some crossover??? - eval(_eo); + if (_eo.invalid()) // due to some crossover??? + eval(_eo); Fitness oldFitness = _eo.fitness(); // save old fitness // call standard operator - then count the successes if (eoNormalMutation::operator()(_eo)) // _eo has been modified - { - _eo.invalidate(); // don't forget!!! - nbMut[genIndex]++; - eval(_eo); // compute fitness of offspring + { + _eo.invalidate(); // don't forget!!! + nbMut[genIndex]++; + eval(_eo); // compute fitness of offspring - if (_eo.fitness() > oldFitness) - nbSuccess[genIndex]++; // update counter - } - return false; // because eval has reset the validity flag + if (_eo.fitness() > oldFitness) + nbSuccess[genIndex]++; // update counter + } + return false; // because eval has reset the validity flag } /** the method that will be called every generation @@ -248,18 +248,18 @@ public: // compute the average stats over the time window for ( unsigned i=0; i threshold) { - Sigma() /= updateFactor; // increase sigma + Sigma() /= updateFactor; // increase sigma } else { - Sigma() *= updateFactor; // decrease sigma + Sigma() *= updateFactor; // decrease sigma } genIndex = (genIndex+1) % nbMut.size() ; nbMut[genIndex] = nbSuccess[genIndex] = 0; @@ -268,15 +268,14 @@ public: private: eoEvalFunc & eval; - double threshold; // 1/5 ! - double updateFactor ; // the multiplicative factor - std::vector nbMut; // total number of mutations per gen - std::vector nbSuccess; // number of successful mutations per gen - unsigned genIndex ; // current index in std::vectors (circular) + double threshold; // 1/5 ! + double updateFactor ; // the multiplicative factor + std::vector nbMut; // total number of mutations per gen + std::vector nbSuccess; // number of successful mutations per gen + unsigned genIndex ; // current index in std::vectors (circular) }; //----------------------------------------------------------------------------- //@} #endif - diff --git a/eo/src/es/eoReal.h b/eo/src/es/eoReal.h index 925d4a3a7..ff1908a0c 100644 --- a/eo/src/es/eoReal.h +++ b/eo/src/es/eoReal.h @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: Marc.Schoenauer@polytechnique.fr - todos@geneura.ugr.es, http://geneura.ugr.es + todos@geneura.ugr.es, http://geneura.ugr.es mkeijzer@dhi.dk */ diff --git a/eo/src/es/eoRealAtomXover.h b/eo/src/es/eoRealAtomXover.h index c55287349..4d4244dd2 100644 --- a/eo/src/es/eoRealAtomXover.h +++ b/eo/src/es/eoRealAtomXover.h @@ -1,4 +1,4 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoRealAtomXover.h : helper classes for std::vector crossover @@ -8,16 +8,16 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ */ //----------------------------------------------------------------------------- @@ -35,7 +35,7 @@ #include -/** +/** Discrete crossover == exchange of values * * @ingroup Real @@ -55,20 +55,20 @@ public: /** Exchanges or not the values */ - bool operator()(double& r1, const double& r2) + bool operator()(double& r1, const double& r2) { if (eo::rng.flip()) - if (r1 != r2) // if r1 == r2 you must return false - { - r1 = r2; - return true; - } + if (r1 != r2) // if r1 == r2 you must return false + { + r1 = r2; + return true; + } return false; } - + }; -/** +/** Intermediate crossover == linear combination * * @ingroup Real @@ -88,13 +88,13 @@ public: /** Linear combination of both parents */ - bool operator()(double& r1, const double& r2) + bool operator()(double& r1, const double& r2) { double alpha = eo::rng.uniform(); r1 = alpha * r2 + (1-alpha) * r1; return true; } - + }; #endif diff --git a/eo/src/es/eoRealInitBounded.h b/eo/src/es/eoRealInitBounded.h index d74c76980..6488dd056 100644 --- a/eo/src/es/eoRealInitBounded.h +++ b/eo/src/es/eoRealInitBounded.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoRealInitBounded.h // (c) EEAAX 2000 - Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -33,8 +33,8 @@ #include #include -/** Simple initialization for any EOT that derives from std::vector - * uniformly in some bounds +/** Simple initialization for any EOT that derives from std::vector + * uniformly in some bounds * * @ingroup Real * @ingroup Variators @@ -44,7 +44,7 @@ class eoRealInitBounded : public eoInit { public: /** Ctor - from eoRealVectorBounds */ - eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) + eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) { if (!bounds.isBounded()) throw std::runtime_error("Needs bounded bounds to initialize a std::vector"); @@ -54,7 +54,7 @@ class eoRealInitBounded : public eoInit virtual void operator()(EOT & _eo) { bounds.uniform(_eo); // resizes, and fills uniformly in bounds - _eo.invalidate(); // was MISSING!!!! + _eo.invalidate(); // was MISSING!!!! } /** accessor to the bounds */ @@ -67,5 +67,4 @@ class eoRealInitBounded : public eoInit //----------------------------------------------------------------------------- //@} -#endif - +#endif diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index ab4d47e06..c8c6471a5 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -66,14 +66,14 @@ template class eoUniformMutation: public eoMonOp * @param _p_change the one probability to change all coordinates */ eoUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const double& _p_change = 1.0): + const double& _epsilon, const double& _p_change = 1.0): homogeneous(false), bounds(_bounds), epsilon(_bounds.size(), _epsilon), p_change(_bounds.size(), _p_change) { // scale to the range - if any for (unsigned i=0; i class eoUniformMutation: public eoMonOp * @param _p_change the VECTOR of probabilities for each coordinates */ eoUniformMutation(eoRealVectorBounds & _bounds, - const std::vector& _epsilon, - const std::vector& _p_change): + const std::vector& _epsilon, + const std::vector& _p_change): homogeneous(false), bounds(_bounds), epsilon(_epsilon), p_change(_p_change) {} @@ -98,43 +98,43 @@ template class eoUniformMutation: public eoMonOp bool operator()(EOT& _eo) { bool hasChanged=false; - if (homogeneous) // implies no bounds object - for (unsigned lieu=0; lieu<_eo.size(); lieu++) - { - if (rng.flip(p_change[0])) - { - _eo[lieu] += 2*epsilon[0]*rng.uniform()-epsilon[0]; - hasChanged = true; - } - } + if (homogeneous) // implies no bounds object + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + { + if (rng.flip(p_change[0])) + { + _eo[lieu] += 2*epsilon[0]*rng.uniform()-epsilon[0]; + hasChanged = true; + } + } else - { - // sanity check ? - if (_eo.size() != bounds.size()) - throw std::runtime_error("Invalid size of indi in eoUniformMutation"); + { + // sanity check ? + if (_eo.size() != bounds.size()) + throw std::runtime_error("Invalid size of indi in eoUniformMutation"); - for (unsigned lieu=0; lieu<_eo.size(); lieu++) - if (rng.flip(p_change[lieu])) - { - // check the bounds - double emin = _eo[lieu]-epsilon[lieu]; - double emax = _eo[lieu]+epsilon[lieu]; - if (bounds.isMinBounded(lieu)) - emin = std::max(bounds.minimum(lieu), emin); - if (bounds.isMaxBounded(lieu)) - emax = std::min(bounds.maximum(lieu), emax); - _eo[lieu] = emin + (emax-emin)*rng.uniform(); - hasChanged = true; - } - } + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + if (rng.flip(p_change[lieu])) + { + // check the bounds + double emin = _eo[lieu]-epsilon[lieu]; + double emax = _eo[lieu]+epsilon[lieu]; + if (bounds.isMinBounded(lieu)) + emin = std::max(bounds.minimum(lieu), emin); + if (bounds.isMaxBounded(lieu)) + emax = std::min(bounds.maximum(lieu), emax); + _eo[lieu] = emin + (emax-emin)*rng.uniform(); + hasChanged = true; + } + } return hasChanged; } private: bool homogeneous; // == no bounds passed in the ctor eoRealVectorBounds & bounds; - std::vector epsilon; // the ranges for mutation - std::vector p_change; // the proba that each variable is modified + std::vector epsilon; // the ranges for mutation + std::vector p_change; // the proba that each variable is modified }; /** eoDetUniformMutation --> changes exactly k values of the std::vector @@ -166,14 +166,14 @@ template class eoDetUniformMutation: public eoMonOp * @param _no number of coordinate to modify */ eoDetUniformMutation(eoRealVectorBounds & _bounds, - const double& _epsilon, const unsigned& _no = 1): + const double& _epsilon, const unsigned& _no = 1): homogeneous(false), bounds(_bounds), epsilon(_bounds.size(), _epsilon), no(_no) { // scale to the range - if any for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp * @param _no number of coordinates to modify */ eoDetUniformMutation(eoRealVectorBounds & _bounds, - const std::vector& _epsilon, - const unsigned& _no = 1): + const std::vector& _epsilon, + const unsigned& _no = 1): homogeneous(false), bounds(_bounds), epsilon(_epsilon), no(_no) { // scale to the range - if any for (unsigned i=0; i class eoDetUniformMutation: public eoMonOp bool operator()(EOT& _eo) { if (homogeneous) - for (unsigned i=0; i epsilon; // the ranges of mutation + std::vector epsilon; // the ranges of mutation unsigned no; }; @@ -274,7 +274,7 @@ template class eoSegmentCrossover: public eoQuadOp * Must be positive */ eoSegmentCrossover(eoRealVectorBounds & _bounds, - const double& _alpha = 0.0) : + const double& _alpha = 0.0) : bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} /// The class name. @@ -291,47 +291,47 @@ template class eoSegmentCrossover: public eoQuadOp double r1, r2, fact; double alphaMin = -alpha; double alphaMax = 1+alpha; - if (alpha == 0.0) // no check to perform - fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) - else // look for the bounds for fact - { - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - if (r1 != r2) { // otherwise you'll get NAN's - double rmin = std::min(r1, r2); - double rmax = std::max(r1, r2); - double length = rmax - rmin; - if (bounds.isMinBounded(i)) - { - alphaMin = std::max(alphaMin, (bounds.minimum(i)-rmin)/length); - alphaMax = std::min(alphaMax, (rmax-bounds.minimum(i))/length); - } - if (bounds.isMaxBounded(i)) - { - alphaMax = std::min(alphaMax, (bounds.maximum(i)-rmin)/length); - alphaMin = std::max(alphaMin, (rmax-bounds.maximum(i))/length); - } - } - } - fact = alphaMin + (alphaMax-alphaMin)*rng.uniform(); - } + if (alpha == 0.0) // no check to perform + fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) + else // look for the bounds for fact + { + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise you'll get NAN's + double rmin = std::min(r1, r2); + double rmax = std::max(r1, r2); + double length = rmax - rmin; + if (bounds.isMinBounded(i)) + { + alphaMin = std::max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMax = std::min(alphaMax, (rmax-bounds.minimum(i))/length); + } + if (bounds.isMaxBounded(i)) + { + alphaMax = std::min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMin = std::max(alphaMin, (rmax-bounds.maximum(i))/length); + } + } + } + fact = alphaMin + (alphaMax-alphaMin)*rng.uniform(); + } for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - _eo1[i] = fact * r1 + (1-fact) * r2; - _eo2[i] = (1-fact) * r1 + fact * r2; - } - return true; // shoudl test if fact was 0 or 1 :-))) + { + r1=_eo1[i]; + r2=_eo2[i]; + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + } + return true; // shoudl test if fact was 0 or 1 :-))) } protected: eoRealVectorBounds & bounds; double alpha; - double range; // == 1+2*alpha + double range; // == 1+2*alpha }; /** eoHypercubeCrossover --> uniform choice in hypercube @@ -369,7 +369,7 @@ template class eoHypercubeCrossover: public eoQuadOp * Must be positive */ eoHypercubeCrossover(eoRealVectorBounds & _bounds, - const double& _alpha = 0.0): + const double& _alpha = 0.0): bounds(_bounds), alpha(_alpha), range(1+2*_alpha) { if (_alpha < 0) @@ -389,62 +389,62 @@ template class eoHypercubeCrossover: public eoQuadOp bool hasChanged = false; unsigned i; double r1, r2, fact; - if (alpha == 0.0) // no check to perform - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - if (r1 != r2) { // otherwise do nothing - fact = rng.uniform(range); // in [0,1) - _eo1[i] = fact * r1 + (1-fact) * r2; - _eo2[i] = (1-fact) * r1 + fact * r2; - hasChanged = true; // forget (im)possible alpha=0 - } - } - else // check the bounds - // do not try to get a bound on the linear factor, but rather - // on the object variables themselves - for (i=0; i<_eo1.size(); i++) - { - r1=_eo1[i]; - r2=_eo2[i]; - if (r1 != r2) { // otherwise do nothing - double rmin = std::min(r1, r2); - double rmax = std::max(r1, r2); + if (alpha == 0.0) // no check to perform + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise do nothing + fact = rng.uniform(range); // in [0,1) + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + hasChanged = true; // forget (im)possible alpha=0 + } + } + else // check the bounds + // do not try to get a bound on the linear factor, but rather + // on the object variables themselves + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise do nothing + double rmin = std::min(r1, r2); + double rmax = std::max(r1, r2); - // compute min and max for object variables - double objMin = -alpha * rmax + (1+alpha) * rmin; - double objMax = -alpha * rmin + (1+alpha) * rmax; + // compute min and max for object variables + double objMin = -alpha * rmax + (1+alpha) * rmin; + double objMax = -alpha * rmin + (1+alpha) * rmax; - // first find the limits on the alpha's - if (bounds.isMinBounded(i)) - { - objMin = std::max(objMin, bounds.minimum(i)); - } - if (bounds.isMaxBounded(i)) - { - objMax = std::min(objMax, bounds.maximum(i)); - } - // then draw variables - double median = (objMin+objMax)/2.0; // uniform within bounds - // double median = (rmin+rmax)/2.0; // Bounce on bounds - double valMin = objMin + (median-objMin)*rng.uniform(); - double valMax = median + (objMax-median)*rng.uniform(); - // don't always put large value in _eo1 - or what? - if (rng.flip(0.5)) - { - _eo1[i] = valMin; - _eo2[i] = valMax; - } - else - { - _eo1[i] = valMax; - _eo2[i] = valMin; - } - // seomthing has changed - hasChanged = true; // forget (im)possible alpha=0 - } - } + // first find the limits on the alpha's + if (bounds.isMinBounded(i)) + { + objMin = std::max(objMin, bounds.minimum(i)); + } + if (bounds.isMaxBounded(i)) + { + objMax = std::min(objMax, bounds.maximum(i)); + } + // then draw variables + double median = (objMin+objMax)/2.0; // uniform within bounds + // double median = (rmin+rmax)/2.0; // Bounce on bounds + double valMin = objMin + (median-objMin)*rng.uniform(); + double valMax = median + (objMax-median)*rng.uniform(); + // don't always put large value in _eo1 - or what? + if (rng.flip(0.5)) + { + _eo1[i] = valMin; + _eo2[i] = valMax; + } + else + { + _eo1[i] = valMax; + _eo2[i] = valMin; + } + // seomthing has changed + hasChanged = true; // forget (im)possible alpha=0 + } + } return hasChanged; } @@ -452,7 +452,7 @@ template class eoHypercubeCrossover: public eoQuadOp protected: eoRealVectorBounds & bounds; double alpha; - double range; // == 1+2*alphaMin + double range; // == 1+2*alphaMin }; @@ -473,7 +473,7 @@ template class eoRealUXover: public eoQuadOp eoRealUXover(const float& _preference = 0.5): preference(_preference) { if ( (_preference <= 0.0) || (_preference >= 1.0) ) - std::runtime_error("UxOver --> invalid preference"); + std::runtime_error("UxOver --> invalid preference"); } /// The class name. @@ -488,19 +488,19 @@ template class eoRealUXover: public eoQuadOp bool operator()(EOT& _eo1, EOT& _eo2) { if ( _eo1.size() != _eo2.size()) - std::runtime_error("UxOver --> chromosomes sizes don't match" ); + std::runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i<_eo1.size(); i++) - { - if (rng.flip(preference)) - if (_eo1[i] != _eo2[i]) - { - double tmp = _eo1[i]; - _eo1[i]=_eo2[i]; - _eo2[i] = tmp; - changed = true; - } - } + { + if (rng.flip(preference)) + if (_eo1[i] != _eo2[i]) + { + double tmp = _eo1[i]; + _eo1[i]=_eo2[i]; + _eo2[i] = tmp; + changed = true; + } + } return changed; } private: diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h index e80e6c789..40f8ac360 100644 --- a/eo/src/es/eoSBXcross.h +++ b/eo/src/es/eoSBXcross.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoSBXcross.h // (c) Maarten Keijzer 2000 - Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -43,7 +43,7 @@ template class eoSBXCrossover: public eoQuadOp * (Default) Constructor. * The bounds are initialized with the global object that says: no bounds. * - * + * */ eoSBXCrossover(const double& _eta = 1.0) : bounds(eoDummyVectorNoBounds), eta(_eta), range(1) {} @@ -54,7 +54,7 @@ template class eoSBXCrossover: public eoQuadOp /** * Constructor with bounds * @param _bounds an eoRealVectorBounds that contains the bounds - * @param _eta the amount of exploration OUTSIDE the parents + * @param _eta the amount of exploration OUTSIDE the parents * as in BLX-alpha notation (Eshelman and Schaffer) * 0 == contractive application * Must be positive @@ -62,8 +62,8 @@ template class eoSBXCrossover: public eoQuadOp - eoSBXCrossover(eoRealVectorBounds & _bounds, - const double& _eta = 1.0) : + eoSBXCrossover(eoRealVectorBounds & _bounds, + const double& _eta = 1.0) : bounds(_bounds), eta(_eta), range(1) {} /////////////////////////////////////////////// @@ -76,14 +76,14 @@ template class eoSBXCrossover: public eoQuadOp * eta, the SBX parameter */ - eoSBXCrossover(eoParser & _parser) : + eoSBXCrossover(eoParser & _parser) : // First, decide whether the objective variables are bounded // Warning, must be the same keywords than other possible objectBounds elsewhere bounds (_parser.getORcreateParam(eoDummyVectorNoBounds, "objectBounds", "Bounds for variables", 'B', "Variation Operators").value()) , // then get eta value eta (_parser.getORcreateParam(1.0, "eta", "SBX eta parameter", '\0', "Variation Operators").value()) , range(1) {} - + /// The class name. virtual std::string className() const { return "eoSBXCrossover"; } @@ -91,47 +91,45 @@ template class eoSBXCrossover: public eoQuadOp /***************************************** * SBX crossover - modifies both parents * * @param _eo1 The first parent * - * @param _eo2 The first parent * + * @param _eo2 The first parent * *****************************************/ bool operator()(EOT& _eo1, EOT& _eo2) { unsigned i; double r1, r2, beta; - for (i=0; i<_eo1.size(); i++) - { + for (i=0; i<_eo1.size(); i++) + { double u = rng.uniform(range) ; - if ( u <= 0.5 ) - beta = exp( (1/(eta+1))*log(2*u)); + if ( u <= 0.5 ) + beta = exp( (1/(eta+1))*log(2*u)); else - beta = exp((1/(eta+1))*log(1/(2*(1-u)))); - - - - r1=_eo1[i]; - r2=_eo2[i]; - _eo1[i] =0.5*((1+beta)*r1+(1-beta)*r2); - _eo2[i] =0.5*((1-beta)*r1+(1+beta)*r2); - - - if(!(bounds.isInBounds(i,_eo1[i]))) - bounds.foldsInBounds(i,_eo1[i]); - if(!(bounds.isInBounds(i,_eo2[i]))) - bounds.foldsInBounds(i,_eo2[i]); + beta = exp((1/(eta+1))*log(1/(2*(1-u)))); - } - return true; - } - - + r1=_eo1[i]; + r2=_eo2[i]; + _eo1[i] =0.5*((1+beta)*r1+(1-beta)*r2); + _eo2[i] =0.5*((1-beta)*r1+(1+beta)*r2); + + + if(!(bounds.isInBounds(i,_eo1[i]))) + bounds.foldsInBounds(i,_eo1[i]); + if(!(bounds.isInBounds(i,_eo2[i]))) + bounds.foldsInBounds(i,_eo2[i]); + + + + } + return true; + } + + protected: eoRealVectorBounds & bounds; double eta; - double range; // == 1 + double range; // == 1 }; - - diff --git a/eo/src/es/make_algo_scalar_es.cpp b/eo/src/es/make_algo_scalar_es.cpp index fa35cb36e..47585a78c 100644 --- a/eo/src/es/make_algo_scalar_es.cpp +++ b/eo/src/es/make_algo_scalar_es.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_algo_scalar_es.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns * of the library for evolution of ***eoEs genotypes*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/es.h * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir */ @@ -43,9 +43,9 @@ // The templatized code #include // the instanciating EOType(s) -#include // one Sigma per individual -#include // one sigmal per object variable -#include // full correlation matrix per indi +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi /// The following function merely call the templatized do_* functions above @@ -82,4 +82,3 @@ eoAlgo >& make_algo_scalar(eoParser& _parser, eoS { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } - diff --git a/eo/src/es/make_algo_scalar_real.cpp b/eo/src/es/make_algo_scalar_real.cpp index 91b5ccd13..1a1796bed 100644 --- a/eo/src/es/make_algo_scalar_real.cpp +++ b/eo/src/es/make_algo_scalar_real.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_algo_scalar_real.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns * of the library for evolution of ***eoReal*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir */ @@ -58,4 +58,3 @@ eoAlgo >& make_algo_scalar(eoParser& _parser, eoSta { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } - diff --git a/eo/src/es/make_checkpoint_es.cpp b/eo/src/es/make_checkpoint_es.cpp index dea658dcb..12bc78605 100644 --- a/eo/src/es/make_checkpoint_es.cpp +++ b/eo/src/es/make_checkpoint_es.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_checkpoint_es.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns * of the library for evolution of ***ES genotypes*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/es.h * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir */ @@ -43,11 +43,11 @@ // The templatized code #include // the instanciating EOType(s) -#include // one Sigma per individual -#include // one sigmal per object variable -#include // full correlation matrix per indi +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi -/// The following function merely call the templatized do_* functions +/// The following function merely call the templatized do_* functions // checkpoint ///////////// @@ -55,7 +55,7 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _ { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } @@ -65,7 +65,7 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _s { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } @@ -75,9 +75,7 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _st { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } - - diff --git a/eo/src/es/make_checkpoint_real.cpp b/eo/src/es/make_checkpoint_real.cpp index 1995d78c1..a1cf6d4f3 100644 --- a/eo/src/es/make_checkpoint_real.cpp +++ b/eo/src/es/make_checkpoint_real.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_checkpoint_real.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns * of the library for evolution of ***eoReal*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir */ @@ -45,7 +45,7 @@ // the instanciating EOType #include -/// The following function merely call the templatized do_* functions +/// The following function merely call the templatized do_* functions // checkpoint ///////////// @@ -53,9 +53,7 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _stat { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } - - diff --git a/eo/src/es/make_continue_es.cpp b/eo/src/es/make_continue_es.cpp index ca9d4fee3..e50167959 100644 --- a/eo/src/es/make_continue_es.cpp +++ b/eo/src/es/make_continue_es.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_continue_es.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns * of the library for evolution of ***ES genotypes*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/es.h * while the TEMPLATIZED code is define in make_continue.h in the src/do dir */ @@ -43,9 +43,9 @@ // The templatized code #include // the instanciating EOType(s) -#include // one Sigma per individual -#include // one sigmal per object variable -#include // full correlation matrix per indi +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi /// The following function merely call the templatized do_* functions @@ -79,5 +79,3 @@ eoContinue >& make_continue(eoParser& _parser, eoS { return do_make_continue(_parser, _state, _eval); } - - diff --git a/eo/src/es/make_continue_real.cpp b/eo/src/es/make_continue_real.cpp index 868e8eeca..060852172 100644 --- a/eo/src/es/make_continue_real.cpp +++ b/eo/src/es/make_continue_real.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_continue_real.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns * of the library for evolution of ***REAL vectors*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_continue.h in the src/do dir */ @@ -57,5 +57,3 @@ eoContinue >& make_continue(eoParser& _parser, eoSta { return do_make_continue(_parser, _state, _eval); } - - diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index 27bfe4f60..46a4e23f6 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // es.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -24,20 +24,20 @@ */ //----------------------------------------------------------------------------- -/** This file contains all ***INSTANCIATED*** declarations of all components +/** This file contains all ***INSTANCIATED*** declarations of all components * of the library for ***ES-like gnptype*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * - * The corresponding ***INSTANCIATED*** definitions are contained in - * the different .cpp files in the src/es dir, + * The corresponding ***INSTANCIATED*** definitions are contained in + * the different .cpp files in the src/es dir, * while the TEMPLATIZED code is define in the different make_XXX.h files - * either in hte src/do dir for representation independant functions, + * either in hte src/do dir for representation independant functions, * or in the src/es dir for representation dependent stuff. * - * See also real.h for the similar declarations of eoReal genotypes + * See also real.h for the similar declarations of eoReal genotypes * i.e. ***without*** mutation parameters attached to individuals * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -54,9 +54,9 @@ #include #include -#include // one Sigma per individual -#include // one sigmal per object variable -#include // full correlation matrix per indi +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi // include all similar declaration for eoReal - i.e. real-valued genotyes // without self-adaptation @@ -68,7 +68,7 @@ //Representation dependent - rewrite everything anew for each representation ////////////////////////// -// the genotypes +// the genotypes eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo); eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo); diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index 7977bbf90..6ab62967f 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -84,7 +84,7 @@ eoEsChromInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) eoValueParam& sigmaParam = _parser.getORcreateParam(std::string("0.3"), "sigmaInit", "Initial value for Sigmas (with a '%' -> scaled by the range of each variable)", - 's', "Genotype Initialization"); + 's', "Genotype Initialization"); // check for % bool to_scale = false; size_t pos = sigmaParam.value().find('%'); diff --git a/eo/src/es/make_op.h b/eo/src/es/make_op.h index 0bcda4f73..1c7fe50e7 100644 --- a/eo/src/es/make_op.h +++ b/eo/src/es/make_op.h @@ -97,23 +97,23 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit v; std::vector::iterator it; for (it=ppBounds.second.begin(); itc_str()); - double r; - is >> r; - v.push_back(r); - } + { + istrstream is(it->c_str()); + double r; + is >> r; + v.push_back(r); + } // now create the eoRealVectorBounds object if (v.size() == 2) // a min and a max for all variables - ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); - else // no time now - throw std::runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw std::runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); // we need to give ownership of this pointer to somebody /////////// end of temporary code } - else // no param for bounds was given + else // no param for bounds was given ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds - // as it does not have any dimension + // as it does not have any dimension // this is a temporary version(!), // while Maarten codes the full tree-structured general operator input @@ -185,7 +185,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit(*ptQuad, segmentRateParam.value()); - // arithmetic crossover + // arithmetic crossover ptQuad = new eoArithmeticCrossover(*ptBounds); _state.storeFunctor(ptQuad); ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); @@ -258,7 +258,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit(*ptMon, uniformMutRateParam.value()); - // mutate exactly 1 component (uniformly) per individual + // mutate exactly 1 component (uniformly) per individual ptMon = new eoDetUniformMutation(*ptBounds, epsilonParam.value()); _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); @@ -289,7 +289,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit *op = new eoSequentialOp; _state.storeFunctor(op); - op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross op->add(*ptCombinedMonOp, pMutParam.value()); // that's it! diff --git a/eo/src/es/make_op_es.cpp b/eo/src/es/make_op_es.cpp index 7f4635992..4dfbacf34 100644 --- a/eo/src/es/make_op_es.cpp +++ b/eo/src/es/make_op_es.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_op_real.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns * of the library for ***eoReal*** evolution inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in es.h in src/es dir * while the TEMPLATIZED code is define in make_op.h in the es dir * @@ -77,4 +77,3 @@ eoGenOp >& make_op(eoParser& _parser, eoState& _s { return do_make_op(_parser, _state, _init); } - diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h index 0d93e060f..00a3373f9 100644 --- a/eo/src/es/make_op_es.h +++ b/eo/src/es/make_op_es.h @@ -154,10 +154,10 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< if (crossTypeParam.value() == std::string("global")) ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); else if (crossTypeParam.value() == std::string("standard")) - { // using a standard eoBinOp, but wrap it into an eoGenOp + { // using a standard eoBinOp, but wrap it into an eoGenOp eoBinOp & crossTmp = _state.storeFunctor( - new eoEsStandardXover(*ptObjAtomCross, *ptStdevAtomCross) - ); + new eoEsStandardXover(*ptObjAtomCross, *ptStdevAtomCross) + ); ptCross = new eoBinGenOp(crossTmp); } else throw std::runtime_error("Invalide Object variable crossover type"); diff --git a/eo/src/es/make_op_real.cpp b/eo/src/es/make_op_real.cpp index 19435831f..b429cd411 100644 --- a/eo/src/es/make_op_real.cpp +++ b/eo/src/es/make_op_real.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_op_real.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns * of the library for ***eoReal*** evolution inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in es.h in src/es dir * while the TEMPLATIZED code is define in make_op.h in the es dir * diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 2792e6380..19a8b16b6 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -168,12 +168,12 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< _state.storeFunctor(ptQuad); ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); - // hypercube crossover + // hypercube crossover ptQuad = new eoHypercubeCrossover(boundsParam.value(), alphaParam.value()); _state.storeFunctor(ptQuad); ptCombinedQuadOp->add(*ptQuad, hypercubeRateParam.value()); - // uniform crossover + // uniform crossover ptQuad = new eoRealUXover(); _state.storeFunctor(ptQuad); ptCombinedQuadOp->add(*ptQuad, uxoverRateParam.value()); @@ -249,7 +249,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< // create the CombinedMonOp ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); - // mutate exactly 1 component (uniformly) per individual + // mutate exactly 1 component (uniformly) per individual ptMon = new eoDetUniformMutation(boundsParam.value(), epsilonParam.value()); _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); @@ -279,7 +279,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< // now the sequential eoSequentialOp & op = _state.storeFunctor(new eoSequentialOp); - op.add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op.add(*cross, 1.0); // always crossover (but clone with prob 1-pCross op.add(*ptCombinedMonOp, pMutParam.value()); // that's it! diff --git a/eo/src/es/make_pop_es.cpp b/eo/src/es/make_pop_es.cpp index 4f77e2f58..4f72e3441 100644 --- a/eo/src/es/make_pop_es.cpp +++ b/eo/src/es/make_pop_es.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_pop_es.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns * of the library for evolution of ***ES genotypes*** indis inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/es.h * while the TEMPLATIZED code is define in make_pop.h in the src/do dir */ @@ -43,9 +43,9 @@ // The templatized code #include // the instanciating EOType(s) -#include // one Sigma per individual -#include // one sigmal per object variable -#include // full correlation matrix per indi +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi /// The following function merely call the templatized do_* functions above @@ -82,5 +82,3 @@ eoPop >& make_pop(eoParser& _parser, eoState& _st { return do_make_pop(_parser, _state, _init); } - - diff --git a/eo/src/es/make_pop_real.cpp b/eo/src/es/make_pop_real.cpp index eaa75baab..968e7251e 100644 --- a/eo/src/es/make_pop_real.cpp +++ b/eo/src/es/make_pop_real.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_pop_real.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns * of the library for evolution of ***eoReal*** indis inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/real.h * while the TEMPLATIZED code is define in make_pop.h in the src/do dir */ @@ -58,5 +58,3 @@ eoPop >& make_pop(eoParser& _parser, eoState& _stat { return do_make_pop(_parser, _state, _init); } - - diff --git a/eo/src/es/make_real.h b/eo/src/es/make_real.h index bb356fc71..bc04ba1f1 100644 --- a/eo/src/es/make_real.h +++ b/eo/src/es/make_real.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // real.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -24,20 +24,20 @@ */ //----------------------------------------------------------------------------- -/** This file contains all ***INSTANCIATED*** declarations of all components +/** This file contains all ***INSTANCIATED*** declarations of all components * of the library for ***std::vector*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * - * The corresponding ***INSTANCIATED*** definitions are contained in - * the different .cpp files in the src/es dir, + * The corresponding ***INSTANCIATED*** definitions are contained in + * the different .cpp files in the src/es dir, * while the TEMPLATIZED code is define in the different make_XXX.h files - * either in hte src/do dir for representation independant functions, + * either in hte src/do dir for representation independant functions, * or in the src/es dir for representation dependent stuff. * - * See also es.h for the similar declarations of ES-like genotypes + * See also es.h for the similar declarations of ES-like genotypes * i.e. ***with*** mutation parameters attached to individuals * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -64,7 +64,7 @@ /** @addtogroup Builders * @{ */ -// the genotypes +// the genotypes eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); diff --git a/eo/src/es/make_run_es.cpp b/eo/src/es/make_run_es.cpp index 77a45a086..59912a7f8 100644 --- a/eo/src/es/make_run_es.cpp +++ b/eo/src/es/make_run_es.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_run_es.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains ***INSTANCIATED DEFINITIONS*** of run funs * of the library for evolution of ***ES genotypes*** inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/es/es.h * while the TEMPLATIZED code is define in make_run.h in the src/do dir */ @@ -43,9 +43,9 @@ // The templatized code #include // the instanciating EOType(s) -#include // one Sigma per individual -#include // one sigmal per object variable -#include // full correlation matrix per indi +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi // the instanciating fitnesses #include @@ -84,4 +84,3 @@ void run_ea(eoAlgo >& _ga, eoPop >& _ga, eoPop::iterator operator[](unsigned i) { return data.begin() + i * (i+1) / 2; } std::vector::const_iterator operator[](unsigned i) const { return data.begin() + i*(i+1)/2; } }; @@ -32,15 +32,14 @@ class square_matrix { public: square_matrix(unsigned n_ = 0) : n(n_), data(n * n) {}; - + void resize(unsigned n_) { - n = n_; - data.resize(n*n); + n = n_; + data.resize(n*n); } - + std::vector::iterator operator[](unsigned i) { return data.begin() + i * n; } std::vector::const_iterator operator[](unsigned i) const { return data.begin() + i*n; } }; #endif - diff --git a/eo/src/ga.h b/eo/src/ga.h index 87cc0e34c..6abb0181a 100644 --- a/eo/src/ga.h +++ b/eo/src/ga.h @@ -1,7 +1,7 @@ //----------------------------------------------------------------------------- // ga.h // (c) GeNeura Team 1998 - 2000, Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -24,7 +24,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #ifndef _ga_h #define _ga_h diff --git a/eo/src/ga/Readme b/eo/src/ga/Readme index 69d7d4660..3d9b8663f 100644 --- a/eo/src/ga/Readme +++ b/eo/src/ga/Readme @@ -1,11 +1,11 @@ This directory contains: -- some standard EO source files, named eoXXXXX, that define objects +- some standard EO source files, named eoXXXXX, that define objects for the eoBit representation (bitstrings). - some make_XXX.cpp files that are instanciations for EO bitstrings -(eoBit AND eoBit) of the tempatized code -that is defined in the EO src/do dir. +(eoBit AND eoBit) of the tempatized code +that is defined in the EO src/do dir. This MK's trick allows to actually compile all these bits in a library (eolibga.a) and to only recompile the bits you need for your own (bitstring!) application. @@ -18,4 +18,3 @@ that constructs the EOType initializer (make_genotype.h) and the one that buils up the operators (make_op.h). MS, April 23, 2001CVS - diff --git a/eo/src/ga/eoBit.h b/eo/src/ga/eoBit.h index 7f91b886e..c1bc9c75e 100644 --- a/eo/src/ga/eoBit.h +++ b/eo/src/ga/eoBit.h @@ -106,11 +106,11 @@ public: std::string bits; is >> bits; if (is) - { - resize(bits.size()); - std::transform(bits.begin(), bits.end(), begin(), + { + resize(bits.size()); + std::transform(bits.begin(), bits.end(), begin(), std::bind2nd(std::equal_to(), '1')); - } + } } }; diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 21205a3d6..3e3f4fa54 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -87,10 +87,10 @@ template class eoDetBitFlip: public eoMonOp { // does not check for duplicate: if someone volunteers .... for (unsigned k=0; k class eoBitMutation: public eoMonOp double actualRate = (normalize ? rate/chrom.size() : rate); bool changed_something = false; for (unsigned i = 0; i < chrom.size(); i++) - if (eo::rng.flip(actualRate)) + if (eo::rng.flip(actualRate)) { - chrom[i] = !chrom[i]; + chrom[i] = !chrom[i]; changed_something = true; } @@ -137,7 +137,7 @@ template class eoBitMutation: public eoMonOp private: double rate; - bool normalize; // divide rate by chromSize + bool normalize; // divide rate by chromSize }; @@ -187,16 +187,16 @@ template class eoBitNext: public eoMonOp bool operator()(Chrom& chrom) { for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - continue; - } - else - { - chrom[i] = 1; - break; - } + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } return true; } @@ -221,16 +221,16 @@ template class eoBitPrev: public eoMonOp bool operator()(Chrom& chrom) { for (int i = chrom.size() - 1; i >= 0; i--) - if (chrom[i]) - { - chrom[i] = 0; - break; - } - else - { - chrom[i] = 1; - continue; - } + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } return true; } @@ -281,7 +281,7 @@ template class eoUBitXover: public eoQuadOp eoUBitXover(const float& _preference = 0.5): preference(_preference) { if ( (_preference <= 0.0) || (_preference >= 1.0) ) - std::runtime_error("UxOver --> invalid preference"); + std::runtime_error("UxOver --> invalid preference"); } /// The class name. virtual std::string className() const { return "eoUBitXover"; } @@ -295,18 +295,18 @@ template class eoUBitXover: public eoQuadOp bool operator()(Chrom& chrom1, Chrom& chrom2) { if ( chrom1.size() != chrom2.size()) - std::runtime_error("UxOver --> chromosomes sizes don't match" ); + std::runtime_error("UxOver --> chromosomes sizes don't match" ); bool changed = false; for (unsigned int i=0; i class eoBitGxOver: public eoQuadOp gene_size(_gene_size), num_points(_num_points) { if (gene_size < 1) - std::runtime_error("GxOver --> invalid gene size"); + std::runtime_error("GxOver --> invalid gene size"); if (num_points < 1) - std::runtime_error("GxOver --> invalid number of points"); + std::runtime_error("GxOver --> invalid number of points"); } /// The class name @@ -412,22 +412,22 @@ template class eoBitGxOver: public eoQuadOp // selects genes to swap do { - unsigned bit = eo::rng.random(max_genes); - if (points[bit]) - continue; - else - { - points[bit] = true; - cut_genes--; - } + unsigned bit = eo::rng.random(max_genes); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } } while (cut_genes); // swaps genes for (unsigned i = 0; i < points.size(); i++) - if (points[i]) - std::swap_ranges(chrom1.begin() + i * gene_size, - chrom1.begin() + i * gene_size + gene_size, - chrom2.begin() + i * gene_size); + if (points[i]) + std::swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); return true; } @@ -442,4 +442,3 @@ template class eoBitGxOver: public eoQuadOp //----------------------------------------------------------------------------- //@} #endif - diff --git a/eo/src/ga/eoBitOpFactory.h b/eo/src/ga/eoBitOpFactory.h index b16900e75..6511f9375 100644 --- a/eo/src/ga/eoBitOpFactory.h +++ b/eo/src/ga/eoBitOpFactory.h @@ -4,7 +4,7 @@ //----------------------------------------------------------------------------- // eoOpFactory.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -39,135 +39,134 @@ that are created here @ingroup Variators */ template< class EOT> -class eoBitOpFactory: public eoFactory +class eoBitOpFactory: public eoFactory { - + public: - - /// @name ctors and dtors - //{@ - /// constructor - eoBitOpFactory( ) {}; - - /// destructor - virtual ~eoBitOpFactory() {}; - //@} - /** Another factory method: creates an object from an std::istream, reading from - it whatever is needed to create the object. Usually, the format for the std::istream will be\\ - objectType parameter1 parameter2 ... parametern\\ - If there are problems, an std::exception is raised; it should be caught at the - upper level, because it might be something for that level\\ - At the same time, it catches std::exceptions thrown at a lower level, which will - indicate that whatever is in the stream is for this method to process - @param _is an stream from where a single line will be read - @throw runtime_std::exception if the object type is not known - */ - virtual eoOp* make(std::istream& _is) + /// @name ctors and dtors + //{@ + /// constructor + eoBitOpFactory( ) {}; + + /// destructor + virtual ~eoBitOpFactory() {}; + //@} + + /** Another factory method: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + If there are problems, an std::exception is raised; it should be caught at the + upper level, because it might be something for that level\\ + At the same time, it catches std::exceptions thrown at a lower level, which will + indicate that whatever is in the stream is for this method to process + @param _is an stream from where a single line will be read + @throw runtime_std::exception if the object type is not known + */ + virtual eoOp* make(std::istream& _is) { - eoOp * opPtr = NULL; - try { - opPtr = eoFactory::make( _is ); - } catch ( const std::string& objectTypeStr ) { - if ( objectTypeStr == "eoBinBitFlip" ) { - opPtr = new eoOneBitFlip( ); - } - // handles old operator names as well as new ones - if ( objectTypeStr == "eoOneBitFlip" ) { - opPtr = new eoOneBitFlip( ); - } + eoOp * opPtr = NULL; + try { + opPtr = eoFactory::make( _is ); + } catch ( const std::string& objectTypeStr ) { + if ( objectTypeStr == "eoBinBitFlip" ) { + opPtr = new eoOneBitFlip( ); + } + // handles old operator names as well as new ones + if ( objectTypeStr == "eoOneBitFlip" ) { + opPtr = new eoOneBitFlip( ); + } - // Standard BitFilp Mutation - if ( objectTypeStr == "eoBinMutation" ) { - float rate; - _is >> rate; - opPtr = new eoBitMutation( rate ); - } - if ( objectTypeStr == "eoBitMutation" ) { - float rate; - _is >> rate; - opPtr = new eoBitMutation( rate ); - } + // Standard BitFilp Mutation + if ( objectTypeStr == "eoBinMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBitMutation( rate ); + } + if ( objectTypeStr == "eoBitMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBitMutation( rate ); + } - // Bit inversion - if ( objectTypeStr == "eoBinInversion" ) { - opPtr = new eoBitInversion( ); - } - if ( objectTypeStr == "eoBitInversion" ) { - opPtr = new eoBitInversion( ); - } + // Bit inversion + if ( objectTypeStr == "eoBinInversion" ) { + opPtr = new eoBitInversion( ); + } + if ( objectTypeStr == "eoBitInversion" ) { + opPtr = new eoBitInversion( ); + } - // Next binary value - if ( objectTypeStr == "eoBinNext" ) { - opPtr = new eoBitNext( ); - } - if ( objectTypeStr == "eoBitNext" ) { - opPtr = new eoBitNext( ); - } + // Next binary value + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBitNext( ); + } + if ( objectTypeStr == "eoBitNext" ) { + opPtr = new eoBitNext( ); + } - // Previous binary value - if ( objectTypeStr == "eoBinPrev" ) { - opPtr = new eoBitPrev( ); - } - if ( objectTypeStr == "eoBitPrev" ) { - opPtr = new eoBitPrev( ); - } + // Previous binary value + if ( objectTypeStr == "eoBinPrev" ) { + opPtr = new eoBitPrev( ); + } + if ( objectTypeStr == "eoBitPrev" ) { + opPtr = new eoBitPrev( ); + } - // 1 point Xover - if ( objectTypeStr == "eoBinCrossover" ) { - opPtr = new eo1PtBitXover( ); - } - if ( objectTypeStr == "eo1PtBitXover" ) { - opPtr = new eo1PtBitXover( ); - } + // 1 point Xover + if ( objectTypeStr == "eoBinCrossover" ) { + opPtr = new eo1PtBitXover( ); + } + if ( objectTypeStr == "eo1PtBitXover" ) { + opPtr = new eo1PtBitXover( ); + } - // Npts Xover - if ( objectTypeStr == "eoBinNxOver" ) { - unsigned nPoints; - _is >> nPoints; - opPtr = new eoNPtsBitXover( nPoints ); - } - if ( objectTypeStr == "eoNPtsBitXover" ) { - unsigned nPoints; - _is >> nPoints; - opPtr = new eoNPtsBitXover( nPoints ); - } + // Npts Xover + if ( objectTypeStr == "eoBinNxOver" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoNPtsBitXover( nPoints ); + } + if ( objectTypeStr == "eoNPtsBitXover" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoNPtsBitXover( nPoints ); + } - // Gene Xover (obsolete) - if ( objectTypeStr == "eoBinGxOver" ) { - unsigned geneSize, nPoints; - _is >> geneSize >> nPoints; - opPtr = new eoBitGxOver( geneSize, nPoints ); - } - if ( objectTypeStr == "eoBitGxOver" ) { - unsigned geneSize, nPoints; - _is >> geneSize >> nPoints; - opPtr = new eoBitGxOver( geneSize, nPoints ); - } + // Gene Xover (obsolete) + if ( objectTypeStr == "eoBinGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBitGxOver( geneSize, nPoints ); + } + if ( objectTypeStr == "eoBitGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBitGxOver( geneSize, nPoints ); + } - // Uniform Xover - if ( objectTypeStr == "eoBinUxOver" ) { - float rate; - _is >> rate; - opPtr = new eoUBitXover( rate ); - } - if ( objectTypeStr == "eoUBitXover" ) { - float rate; - _is >> rate; - opPtr = new eoUBitXover( rate ); - } + // Uniform Xover + if ( objectTypeStr == "eoBinUxOver" ) { + float rate; + _is >> rate; + opPtr = new eoUBitXover( rate ); + } + if ( objectTypeStr == "eoUBitXover" ) { + float rate; + _is >> rate; + opPtr = new eoUBitXover( rate ); + } - // nothing read! - if ( !opPtr ) { // to be caught by the upper level - throw objectTypeStr; - } - } - return opPtr; - }; + // nothing read! + if ( !opPtr ) { // to be caught by the upper level + throw objectTypeStr; + } + } + return opPtr; + }; }; #endif - diff --git a/eo/src/ga/eoBoolFlip.h b/eo/src/ga/eoBoolFlip.h index be9d252b1..47c43ee06 100644 --- a/eo/src/ga/eoBoolFlip.h +++ b/eo/src/ga/eoBoolFlip.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoBoolFlip.h // (c) Marc Schoenauer, 2003 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -33,7 +33,7 @@ @ingroup Variators */ class eoBoolFlip : public eoMonOp { -public: +public: /** simply flips the boolean argument */ bool operator()(bool & _b) { diff --git a/eo/src/ga/eoPBILAdditive.h b/eo/src/ga/eoPBILAdditive.h index dd360337b..e57a05a2b 100644 --- a/eo/src/ga/eoPBILAdditive.h +++ b/eo/src/ga/eoPBILAdditive.h @@ -49,8 +49,8 @@ public: * using the default values is equivalent to using eoPBILOrg */ eoPBILAdditive(double _LRBest, unsigned _nbBest = 1, - double _tolerance=0.0, - double _LRWorst = 0.0, unsigned _nbWorst = 0 ) : + double _tolerance=0.0, + double _LRWorst = 0.0, unsigned _nbWorst = 0 ) : maxBound(1.0-_tolerance), minBound(_tolerance), LR(0.0), nbBest(_nbBest), nbWorst(_nbWorst) { @@ -59,18 +59,18 @@ public: if (_nbBest) { - lrb = _LRBest/_nbBest; - LR += _LRBest; + lrb = _LRBest/_nbBest; + LR += _LRBest; } else - lrb=0.0; // just in case + lrb=0.0; // just in case if (_nbWorst) { - lrw = _LRWorst/_nbWorst; - LR += _LRWorst; + lrw = _LRWorst/_nbWorst; + LR += _LRWorst; } else - lrw=0.0; // just in case + lrw=0.0; // just in case } /** Update the distribution from the current population */ @@ -82,29 +82,29 @@ public: unsigned i, popSize=_pop.size(); std::vector result; - _pop.sort(result); // is it necessary to sort the whole population? - // but I'm soooooooo lazy !!! + _pop.sort(result); // is it necessary to sort the whole population? + // but I'm soooooooo lazy !!! for (unsigned g=0; g=popSize-nbWorst; i--) - { - const EOT & best = (*result[i]); - if ( !best[g] ) // if 0, increase proba - p[g] += lrw; - } - // stay in [0,1] (possibly strictly due to tolerance) - p[g] = std::min(maxBound, p[g]); - p[g] = std::max(minBound, p[g]); + p[g] *= (1-LR); // relaxation + if (nbBest) // update from some of the best + for (i=0; i=popSize-nbWorst; i--) + { + const EOT & best = (*result[i]); + if ( !best[g] ) // if 0, increase proba + p[g] += lrw; + } + // stay in [0,1] (possibly strictly due to tolerance) + p[g] = std::min(maxBound, p[g]); + p[g] = std::max(minBound, p[g]); } } diff --git a/eo/src/ga/eoPBILDistrib.h b/eo/src/ga/eoPBILDistrib.h index 91720acb3..56556ba05 100644 --- a/eo/src/ga/eoPBILDistrib.h +++ b/eo/src/ga/eoPBILDistrib.h @@ -28,26 +28,26 @@ #include /** - * Distribution Class for PBIL algorithm + * Distribution Class for PBIL algorithm * (Population-Based Incremental Learning, Baluja and Caruana 96) * * It encodes a univariate distribution on the space of bitstrings, * i.e. one probability for each bit to be one * - * It is an eoValueParam > : + * It is an eoValueParam > : * the std::vector stores the probabilities that each bit is 1 * * It is still pure virtual, as the update method needs to be specified */ template -class eoPBILDistrib : public eoDistribution, - public eoValueParam > +class eoPBILDistrib : public eoDistribution, + public eoValueParam > { public: /** Ctor with size of genomes, and update parameters */ eoPBILDistrib(unsigned _genomeSize) : - eoDistribution(), + eoDistribution(), eoValueParam >(std::vector(_genomeSize, 0.5), "Distribution"), genomeSize(_genomeSize) {} @@ -55,10 +55,10 @@ public: /** the randomizer of indis */ virtual void operator()(EOT & _eo) { - _eo.resize(genomeSize); // just in case + _eo.resize(genomeSize); // just in case for (unsigned i=0; i> sz; - + value().resize(sz); unsigned i; - + for (i = 0; i < sz; ++i) { - double atom; - is >> atom; - value()[i] = atom; + double atom; + is >> atom; + value()[i] = atom; } } diff --git a/eo/src/ga/eoPBILOrg.h b/eo/src/ga/eoPBILOrg.h index 80bf2d09c..45b95c843 100644 --- a/eo/src/ga/eoPBILOrg.h +++ b/eo/src/ga/eoPBILOrg.h @@ -58,15 +58,15 @@ public: for (unsigned g=0; g // for time(0) for random seeding +#include // for time(0) for random seeding #include #include #include @@ -51,21 +51,21 @@ eoPBILDistrib & do_make_PBILdistrib(eoParser & _parser, eoState& _state, E // First the random seed eoValueParam& seedParam = _parser.createParam(uint32_t(0), "seed", "Random number seed", 'S'); if (seedParam.value() == 0) - seedParam.value() = time(0); + seedParam.value() = time(0); // chromosome size: unsigned theSize; // but it might have been already read in the definition fo the performance eoParam* ptParam = _parser.getParamWithLongName(std::string("chromSize")); - if (!ptParam) // not already defined: read it here + if (!ptParam) // not already defined: read it here { - theSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); + theSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); } - else // it was read before, get its value + else // it was read before, get its value { - eoValueParam* ptChromSize = dynamic_cast*>(ptParam); - theSize = ptChromSize->value(); + eoValueParam* ptChromSize = dynamic_cast*>(ptParam); + theSize = ptChromSize->value(); } eoPBILDistrib * ptDistrib = new eoPBILDistrib(theSize); diff --git a/eo/src/ga/make_PBILupdate.h b/eo/src/ga/make_PBILupdate.h index 9b4ffd83c..a8572136d 100644 --- a/eo/src/ga/make_PBILupdate.h +++ b/eo/src/ga/make_PBILupdate.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_PBILupdate.h // (c) Marc Schoenauer, Maarten Keijzer, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -47,7 +47,7 @@ template eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, EOT) { - // ast the moment, a single update rule is available + // ast the moment, a single update rule is available // but at some point we'll have to choose among different rules std::string UType = _parser.createParam(std::string("PBIL"), "updateRule", "Type of update rule (only PBIL additive at the moment)", 'U', "Algorithm").value(); @@ -59,7 +59,7 @@ eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, double tolerance = _parser.createParam(0.0, "tolerance", "Keeping away from 0 and 1", 't', "Algorithm").value(); // a pointer to choose among several possible types - eoDistribUpdater * ptUpdate; + eoDistribUpdater * ptUpdate; if (UType == std::string("PBIL")) { @@ -72,7 +72,7 @@ eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, throw std::runtime_error("Only PBIL additive update rule available at the moment"); // done: don't forget to store the allocated pointers - _state.storeFunctor(ptUpdate); + _state.storeFunctor(ptUpdate); return *ptUpdate; } diff --git a/eo/src/ga/make_algo_scalar_ga.cpp b/eo/src/ga/make_algo_scalar_ga.cpp index aa9b2e051..631e6dadf 100644 --- a/eo/src/ga/make_algo_scalar_ga.cpp +++ b/eo/src/ga/make_algo_scalar_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_algo_scalar_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of pop. init. * of the library for ***BISTRING*** evolution inside EO. @@ -35,11 +35,11 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in src/ga/ga.h * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -61,4 +61,3 @@ eoAlgo >& make_algo_scalar(eoParser& _parser, eoStat { return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); } - diff --git a/eo/src/ga/make_checkpoint_ga.cpp b/eo/src/ga/make_checkpoint_ga.cpp index f7da6d4a8..eecc40caa 100644 --- a/eo/src/ga/make_checkpoint_ga.cpp +++ b/eo/src/ga/make_checkpoint_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_checkpoint_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. @@ -35,11 +35,11 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in make_checkpoint_ga.h * while the TEMPLATIZED code is define in make_checkpoint.h in the do dir * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -48,7 +48,7 @@ // the instanciating EOType #include -/// The following function merely call the templatized do_* functions +/// The following function merely call the templatized do_* functions // checkpoint ///////////// @@ -56,9 +56,7 @@ eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } - - diff --git a/eo/src/ga/make_continue_ga.cpp b/eo/src/ga/make_continue_ga.cpp index e2dbb35a8..1b25a0c85 100644 --- a/eo/src/ga/make_continue_ga.cpp +++ b/eo/src/ga/make_continue_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_continue_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. @@ -35,11 +35,11 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in ga.h * while the TEMPLATIZED code is define in make_contninue.h in the src/do dir * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -60,5 +60,3 @@ eoContinue >& make_continue(eoParser& _parser, eoStat { return do_make_continue(_parser, _state, _eval); } - - diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index 6ce8a07ad..ce594903f 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // ga.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -24,14 +24,14 @@ */ //----------------------------------------------------------------------------- -/** This file contains all ***INSTANCIATED*** declarations of all components +/** This file contains all ***INSTANCIATED*** declarations of all components * of the library for ***BISTRING*** evolution inside EO. * It should be included in the file that calls any of the corresponding fns * * The corresponding ***INSTANCIATED*** definitions are contained in ga.cpp * while the TEMPLATIZED code is define in the different makeXXX.h files * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -56,7 +56,7 @@ * @{ */ -// the genotypes +// the genotypes eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); diff --git a/eo/src/ga/make_genotype_ga.cpp b/eo/src/ga/make_genotype_ga.cpp index 873093dce..4f9e69ef1 100644 --- a/eo/src/ga/make_genotype_ga.cpp +++ b/eo/src/ga/make_genotype_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_genotype_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. @@ -35,8 +35,8 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained - * in ga.h in src/ga dir + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in ga.h in src/ga dir * while the TEMPLATIZED code is define in make_genotype_ga.h */ diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index 159b85cdd..ea1b20054 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_genotype.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -36,24 +36,24 @@ /////////////////// the bitstring //////////////// /* - * This fuction does the initialization of what's needed for a particular + * This fuction does the initialization of what's needed for a particular * genotype (here, bitstrings). - * It could be here tempatied only on the fitness, as it can be used to evolve + * It could be here tempatied only on the fitness, as it can be used to evolve * bitstrings with any fitness. - * However, for consistency reasons, it was finally chosen, as in - * the rest of EO, to templatize by the full EOT, as this eventually + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually * allows to choose the type of genotype at run time (see in es dir) * * It is instanciated in ga/ga.cpp - and incorporated in the ga/libga.a * - * It returns an eoInit > tha can later be used to initialize + * It returns an eoInit > tha can later be used to initialize * the population (see make_pop.h). * * It uses a parser (to get user parameters) and a state (to store the memory) * the last argument is to disambiguate the call upon different instanciations. * - * WARNING: that last argument will generally be the result of calling - * the default ctor of EOT, resulting in most cases in an EOT + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT * that is ***not properly initialized*** * * @ingroup bitstring diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 338557b58..8c46549f1 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_op.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -57,9 +57,9 @@ * This is why the template is the complete EOT even though only the fitness * is actually templatized here: the following only applies to bitstrings * - * Note : the last parameter is an eoInit: if some operator needs some info + * Note : the last parameter is an eoInit: if some operator needs some info * about the gneotypes, the init has it all (e.g. bounds, ...) - * Simply do + * Simply do * EOT myEO; * _init(myEO); * and myEO is then an ACTUAL object @@ -78,12 +78,12 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init eoValueParam& operatorParam = _parser.createParam(std::string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); if (operatorParam.value() != std::string("SGA")) - throw std::runtime_error("Only SGA-like operator available right now\n"); + throw std::runtime_error("Only SGA-like operator available right now\n"); - // now we read Pcross and Pmut, + // now we read Pcross and Pmut, // the relative weights for all crossovers -> proportional choice // the relative weights for all mutations -> proportional choice - // and create the eoGenOp that is exactly + // and create the eoGenOp that is exactly // crossover with pcross + mutation with pmut eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); @@ -118,10 +118,10 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init bool bCross = true; if (onePointRateParam.value()+twoPointsRateParam.value()+uRateParam.value()==0) { - std::cerr << "Warning: no crossover" << std::endl; - bCross = false; + std::cerr << "Warning: no crossover" << std::endl; + bCross = false; } - + // Create the CombinedQuadOp eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; eoQuadOp *ptQuad = NULL; @@ -129,12 +129,12 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init ptQuad = new eo1PtBitXover; _state.storeFunctor(ptQuad); ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, onePointRateParam.value()); - + // uniform crossover for bitstring ptQuad = new eoUBitXover; _state.storeFunctor(ptQuad); ptCombinedQuadOp->add(*ptQuad, uRateParam.value()); - + // 2-points xover ptQuad = new eoNPtsBitXover; _state.storeFunctor(ptQuad); @@ -155,7 +155,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init // minimum check if ( (bitFlipRateParam.value() < 0) ) throw std::runtime_error("Invalid bitFlipRate"); - + eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Variation Operators" ); // minimum check if ( (oneBitRateParam.value() < 0) ) @@ -165,10 +165,10 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init bool bMut = true; if (bitFlipRateParam.value()+oneBitRateParam.value()==0) { - std::cerr << "Warning: no mutation" << std::endl; - bMut = false; + std::cerr << "Warning: no mutation" << std::endl; + bMut = false; } - + // Create the CombinedMonOp eoPropCombinedMonOp *ptCombinedMonOp = NULL; eoMonOp *ptMon = NULL; @@ -180,7 +180,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, bitFlipRateParam.value()); // mutate exactly 1 bit per individual - ptMon = new eoDetBitFlip; + ptMon = new eoDetBitFlip; _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, oneBitRateParam.value()); @@ -190,7 +190,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init // to simulate SGA (crossover with proba pCross + mutation with proba pMut // we must construct // a sequential combination of - // with proba 1, a proportional combination of + // with proba 1, a proportional combination of // a QuadCopy and our crossover // with proba pMut, our mutation @@ -205,7 +205,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init // now the sequential eoSequentialOp *op = new eoSequentialOp; _state.storeFunctor(op); - op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross op->add(*ptCombinedMonOp, pMutParam.value()); // that's it! diff --git a/eo/src/ga/make_op_ga.cpp b/eo/src/ga/make_op_ga.cpp index 8bed5a66a..e3a53d651 100644 --- a/eo/src/ga/make_op_ga.cpp +++ b/eo/src/ga/make_op_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_op_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. @@ -35,11 +35,11 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in make_op_ga.h * while the TEMPLATIZED code is define in make_op.h in the ga dir * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -59,4 +59,3 @@ eoGenOp >& make_op(eoParser& _parser, eoState& _stat { return do_make_op(_parser, _state, _init); } - diff --git a/eo/src/ga/make_pop_ga.cpp b/eo/src/ga/make_pop_ga.cpp index 2ab0b5cde..319279793 100644 --- a/eo/src/ga/make_pop_ga.cpp +++ b/eo/src/ga/make_pop_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_pop_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of population init * of the library for ***BISTRING*** evolution inside EO. @@ -35,7 +35,7 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in ga/make_ga.h * while the TEMPLATIZED code is define in make_pop.h in the src/do dir * @@ -59,5 +59,3 @@ eoPop >& make_pop(eoParser& _parser, eoState& _state { return do_make_pop(_parser, _state, _init); } - - diff --git a/eo/src/ga/make_run_ga.cpp b/eo/src/ga/make_run_ga.cpp index afdab3d9a..d64d2b025 100644 --- a/eo/src/ga/make_run_ga.cpp +++ b/eo/src/ga/make_run_ga.cpp @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_run_ga.cpp // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif /** This file contains all ***INSTANCIATED DEFINITIONS*** of operators * of the library for ***BISTRING*** evolution inside EO. @@ -35,11 +35,11 @@ * Compiling this file allows one to generate part of the library (i.e. object * files that you just need to link with your own main and fitness code). * - * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in make_run_ga.h * while the TEMPLATIZED code is define in make_run.h in the do dir * - * Unlike most EO .h files, it does not (and should not) contain any code, + * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations */ @@ -63,4 +63,3 @@ void run_ea(eoAlgo >& _ga, eoPop::printOn(os); + EO::printOn(os); os << ' '; os << size() << ' '; @@ -133,13 +133,13 @@ public: { - EO::readFrom(is); + EO::readFrom(is); unsigned sz; is >> sz; - std::vector v(sz); + std::vector v(sz); unsigned i; @@ -149,24 +149,24 @@ public: is >> node; v[i] = node; } - parse_tree tmp(v.begin(), v.end()); - swap(tmp); + parse_tree tmp(v.begin(), v.end()); + swap(tmp); - /* - * old code which caused problems for paradisEO - * - * this can be removed once it has proved itself - EO::readFrom(is); + /* + * old code which caused problems for paradisEO + * + * this can be removed once it has proved itself + EO::readFrom(is); - // even older code - FType fit; + // even older code + FType fit; is >> fit; fitness(fit); std::copy(std::istream_iterator(is), std::istream_iterator(), back_inserter(*this)); - */ + */ } }; /** @example t-eoSymreg.cpp diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index 687c83f2f..18dc55b91 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoParseTreeDepthInit.h : initializor for eoParseTree class // (c) Maarten Keijzer 2000 Jeroen Eggermont 2002 @@ -8,20 +8,20 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - mak@dhi.dk - jeggermo@liacs.nl - + mak@dhi.dk + jeggermo@liacs.nl + */ //----------------------------------------------------------------------------- @@ -48,17 +48,17 @@ template class eoParseTreeDepthInit : public eoInit< eoParseTree > { protected: - // a binary predicate for sorting - // hopefully this will work with M$VC++ 6.0 - struct lt_arity:public std::binary_function - { - bool operator()(const Node &_node1, const Node &_node2) { return (_node1.arity() < _node2.arity());}; - }; + // a binary predicate for sorting + // hopefully this will work with M$VC++ 6.0 + struct lt_arity:public std::binary_function + { + bool operator()(const Node &_node1, const Node &_node2) { return (_node1.arity() < _node2.arity());}; + }; public : typedef eoParseTree EoType; - + /** * Constructor * @param _max_depth The maximum depth of a tree @@ -66,18 +66,18 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > * @param _grow False results in a full tree, True result is a randomly grown tree * @param _ramped_half_and_half True results in Ramped Half and Half Initialization */ - eoParseTreeDepthInit( + eoParseTreeDepthInit( unsigned _max_depth, - const std::vector& _initializor, + const std::vector& _initializor, bool _grow = true, - bool _ramped_half_and_half = false) + bool _ramped_half_and_half = false) : eoInit(), - max_depth(_max_depth), - initializor(_initializor), - grow(_grow), - ramped_half_and_half(_ramped_half_and_half), - current_depth(_max_depth) + max_depth(_max_depth), + initializor(_initializor), + grow(_grow), + ramped_half_and_half(_ramped_half_and_half), + current_depth(_max_depth) { if(initializor.empty()) { @@ -88,82 +88,82 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > stable_sort(initializor.begin(), initializor.end(), lt_arity()); } /// My class name - virtual std::string className() const { return "eoParseTreeDepthInit"; }; + virtual std::string className() const { return "eoParseTreeDepthInit"; }; /**initialize a tree * @param _tree : the tree to be initialized */ void operator()(EoType& _tree) - { + { std::list sequence; generate(sequence, current_depth); parse_tree tmp(sequence.begin(), sequence.end()); _tree.swap(tmp); - - if(ramped_half_and_half) - { - if(grow) - { - if (current_depth > 2) - current_depth--; - else - current_depth = max_depth; - } - // change the grow method from 'grow' to 'full' or from 'full' to 'grow' - grow = !grow; - }; - - } + + if(ramped_half_and_half) + { + if(grow) + { + if (current_depth > 2) + current_depth--; + else + current_depth = max_depth; + } + // change the grow method from 'grow' to 'full' or from 'full' to 'grow' + grow = !grow; + }; + + } private : void generate(std::list& sequence, int the_max, int last_terminal = -1) { - if (last_terminal == -1) - { // check where the last terminal in the sequence resides + if (last_terminal == -1) + { // check where the last terminal in the sequence resides typename std::vector::iterator it; - for (it = initializor.begin(); it != initializor.end(); ++it) - { - if (it->arity() > 0) - break; - } - - last_terminal = it - initializor.begin(); - } + for (it = initializor.begin(); it != initializor.end(); ++it) + { + if (it->arity() > 0) + break; + } - if (the_max == 1) - { // generate terminals only - typename std::vector::iterator it = initializor.begin() + rng.random(last_terminal); - it->randomize(); - sequence.push_front(*it); - return; - } - - typename std::vector::iterator what_it; + last_terminal = it - initializor.begin(); + } - if (grow) - { - what_it = initializor.begin() + rng.random(initializor.size()); - } - else // full - { - what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); - } + if (the_max == 1) + { // generate terminals only + typename std::vector::iterator it = initializor.begin() + rng.random(last_terminal); + it->randomize(); + sequence.push_front(*it); + return; + } + + typename std::vector::iterator what_it; + + if (grow) + { + what_it = initializor.begin() + rng.random(initializor.size()); + } + else // full + { + what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); + } what_it->randomize(); - sequence.push_front(*what_it); + sequence.push_front(*what_it); - for (int i = 0; i < what_it->arity(); ++i) - generate(sequence, the_max - 1, last_terminal); + for (int i = 0; i < what_it->arity(); ++i) + generate(sequence, the_max - 1, last_terminal); } - unsigned max_depth; - std::vector initializor; - bool grow; - bool ramped_half_and_half; - unsigned current_depth; + unsigned max_depth; + std::vector initializor; + bool grow; + bool ramped_half_and_half; + unsigned current_depth; }; /** @@ -172,46 +172,46 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > * @param population_size the size of the population to be created * @param init_max_depth the initial maximum tree depth * @param initializor A std::vector containing the possible nodes - + \ingroup ParseTree */ template void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned int population_size, unsigned int init_max_depth, std::vector &initializor) { - typedef eoParseTree EoType; - typedef eoPop< EoType > Pop; - - unsigned int M = init_max_depth - 1; - unsigned int part_pop_size = population_size / (2*M); - unsigned int m=0; + typedef eoParseTree EoType; + typedef eoPop< EoType > Pop; - std::cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << std::endl; - std::cerr << " This function is now obsolete and might be removed in the future so you should"<< std::endl; - std::cerr << " update your code to use: " << std::endl << std::endl; - std::cerr << " eoParseTreeDepthInit( _max_depth, _initializer, bool _grow, bool _ramped_half_and_half)" << std::endl << std::endl; - - pop.clear(); - - // initialize with Depth's (D) -> 2 - for(m=init_max_depth; m >= 2; m--) - { - eoParseTreeDepthInit grow_initializer(m, initializor, true); - Pop grow(part_pop_size, grow_initializer); - pop.insert(pop.begin(), grow.begin(), grow.end()); - - eoParseTreeDepthInit full_initializer(m, initializor, false); - Pop full(part_pop_size, full_initializer); - pop.insert(pop.begin(), full.begin(), full.end()); - } - - bool g = true; - while (pop.size() < population_size) - { - eoParseTreeDepthInit initializer(init_max_depth, initializor, g); - Pop p(1, initializer); - pop.insert(pop.begin(), p.begin(), p.end()); - g= !g; - } + unsigned int M = init_max_depth - 1; + unsigned int part_pop_size = population_size / (2*M); + unsigned int m=0; + + std::cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << std::endl; + std::cerr << " This function is now obsolete and might be removed in the future so you should"<< std::endl; + std::cerr << " update your code to use: " << std::endl << std::endl; + std::cerr << " eoParseTreeDepthInit( _max_depth, _initializer, bool _grow, bool _ramped_half_and_half)" << std::endl << std::endl; + + pop.clear(); + + // initialize with Depth's (D) -> 2 + for(m=init_max_depth; m >= 2; m--) + { + eoParseTreeDepthInit grow_initializer(m, initializor, true); + Pop grow(part_pop_size, grow_initializer); + pop.insert(pop.begin(), grow.begin(), grow.end()); + + eoParseTreeDepthInit full_initializer(m, initializor, false); + Pop full(part_pop_size, full_initializer); + pop.insert(pop.begin(), full.begin(), full.end()); + } + + bool g = true; + while (pop.size() < population_size) + { + eoParseTreeDepthInit initializer(init_max_depth, initializor, g); + Pop p(1, initializer); + pop.insert(pop.begin(), p.begin(), p.end()); + g= !g; + } } diff --git a/eo/src/gp/eoParseTreeOp.h b/eo/src/gp/eoParseTreeOp.h index 58824eea9..0b623f3d8 100644 --- a/eo/src/gp/eoParseTreeOp.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoParseTreeOp.h : crossover and mutation operator for the eoParseTree class // (c) Maarten Keijzer 2000 for eoSubtreeXOver, eoBranchMutation @@ -10,18 +10,18 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - mak@dhi.dk + mak@dhi.dk jeggermo@liacs.nl */ //----------------------------------------------------------------------------- @@ -34,8 +34,8 @@ #include -/** eoSubtreeXOver --> subtree xover -\class eoSubtreeXOver eoParseTreeOp.h gp/eoParseTreeOp.h +/** eoSubtreeXOver --> subtree xover +\class eoSubtreeXOver eoParseTreeOp.h gp/eoParseTreeOp.h \ingroup ParseTree */ template @@ -63,23 +63,23 @@ public: */ bool operator()(EoType & _eo1, EoType & _eo2 ) { - int i = rng.random(_eo1.size()); - int j = rng.random(_eo2.size()); + int i = rng.random(_eo1.size()); + int j = rng.random(_eo2.size()); - typename parse_tree::subtree tmp = _eo1[i]; - _eo1[i] = _eo2[j]; // insert subtree - _eo2[j] = tmp; + typename parse_tree::subtree tmp = _eo1[i]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j] = tmp; + + _eo1.pruneTree(max_length); + _eo2.pruneTree(max_length); - _eo1.pruneTree(max_length); - _eo2.pruneTree(max_length); - return true; } private: unsigned max_length; }; -/** eoBranchMutation --> replace a subtree with a randomly created subtree +/** eoBranchMutation --> replace a subtree with a randomly created subtree \class eoBranchMutation eoParseTreeOp.h gp/eoParseTreeOp.h \ingroup ParseTree */ @@ -97,29 +97,29 @@ public: eoBranchMutation(eoInit& _init, unsigned _max_length) : eoMonOp(), max_length(_max_length), initializer(_init) {}; - + /// the class name virtual std::string className() const { return "eoBranchMutation"; }; /// Dtor virtual ~eoBranchMutation() {}; - + /** * Mutate an individual * @param _eo1 The individual that is to be changed */ bool operator()(EoType& _eo1 ) { - int i = rng.random(_eo1.size()); + int i = rng.random(_eo1.size()); EoType eo2; initializer(eo2); - int j = rng.random(eo2.size()); + int j = rng.random(eo2.size()); - _eo1[i] = eo2[j]; // insert subtree + _eo1[i] = eo2[j]; // insert subtree - _eo1.pruneTree(max_length); + _eo1.pruneTree(max_length); return true; } @@ -130,7 +130,7 @@ private : eoInit& initializer; }; -// Additional Mutation operators from +// Additional Mutation operators from // TITLE:"Genetic Programming~An Introduction" // AUTHORS: Banzhaf, Nordin, Keller, Francone // ISBN: 3-920993-58-6 @@ -138,8 +138,8 @@ private : // // For the eoParseTree class -/** eoPointMutation --> replace a Node with a Node of the same arity -\class eoPointMutation eoParseTreeOp.h gp/eoParseTreeOp.h +/** eoPointMutation --> replace a Node with a Node of the same arity +\class eoPointMutation eoParseTreeOp.h gp/eoParseTreeOp.h \ingroup ParseTree */ @@ -157,7 +157,7 @@ public: eoPointMutation( std::vector& _initializor) : eoMonOp(), initializor(_initializor) {}; - + /// the class name virtual std::string className() const { return "eoPointMutation"; }; @@ -170,32 +170,32 @@ public: */ bool operator()(EoType& _eo1 ) { - // select a random node i that is to be mutated - int i = rng.random(_eo1.size()); - // request the arity of the node that is to be replaced - int arity = _eo1[i].arity(); - - int j=0; - - do - { - j = rng.random(initializor.size()); - - }while ((initializor[j].arity() != arity)); - - _eo1[i] = initializor[j]; - - - - return true; + // select a random node i that is to be mutated + int i = rng.random(_eo1.size()); + // request the arity of the node that is to be replaced + int arity = _eo1[i].arity(); + + int j=0; + + do + { + j = rng.random(initializor.size()); + + }while ((initializor[j].arity() != arity)); + + _eo1[i] = initializor[j]; + + + + return true; } private : - std::vector& initializor; + std::vector& initializor; }; -/** eoExpansionMutation --> replace a terminal with a randomly created subtree +/** eoExpansionMutation --> replace a terminal with a randomly created subtree \class eoExpansionMutation eoParseTreeOp.h gp/eoParseTreeOp.h \ingroup ParseTree */ @@ -206,7 +206,7 @@ class eoExpansionMutation: public eoMonOp< eoParseTree > public: typedef eoParseTree EoType; - + /** * Constructor * @param _init An instantiation of eoGpDepthInitializer @@ -215,7 +215,7 @@ public: eoExpansionMutation(eoInit& _init, unsigned _max_length) : eoMonOp(), max_length(_max_length), initializer(_init) {}; - + /// The class name virtual std::string className() const { return "eoExpansionMutation"; }; @@ -227,33 +227,33 @@ public: */ bool operator()(EoType& _eo1 ) { - int i = rng.random(_eo1.size()); - // look for a terminal + int i = rng.random(_eo1.size()); + // look for a terminal while (_eo1[i].arity() != 0) - { - i= rng.random(_eo1.size()); - }; - - // create a new tree to - EoType eo2; - // make sure we get a tree with more than just a terminal - do - { - initializer(eo2); - }while(eo2.size() == 1); - - int j = rng.random(eo2.size()); - // make sure we select a subtree (and not a terminal) - while((eo2[j].arity() == 0)) - { - j = rng.random(eo2.size()); - }; - + { + i= rng.random(_eo1.size()); + }; - _eo1[i] = eo2[j]; // insert subtree + // create a new tree to + EoType eo2; + // make sure we get a tree with more than just a terminal + do + { + initializer(eo2); + }while(eo2.size() == 1); + + int j = rng.random(eo2.size()); + // make sure we select a subtree (and not a terminal) + while((eo2[j].arity() == 0)) + { + j = rng.random(eo2.size()); + }; + + + _eo1[i] = eo2[j]; // insert subtree + + _eo1.pruneTree(max_length); - _eo1.pruneTree(max_length); - return true; } @@ -294,29 +294,29 @@ public: */ bool operator()(EoType& _eo1 ) { - int i = rng.random(_eo1.size()); - // look for a subtree + int i = rng.random(_eo1.size()); + // look for a subtree while ((_eo1[i].arity() == 0) && (_eo1.size() > 1)) - { - i= rng.random(_eo1.size()); - }; - - // create a new tree to - EoType eo2; - initializer(eo2); - - int j = rng.random(eo2.size()); - // make sure we select a subtree (and not a terminal) - while(eo2[j].arity() != 0) - { - j = rng.random(eo2.size()); - }; + { + i= rng.random(_eo1.size()); + }; + + // create a new tree to + EoType eo2; + initializer(eo2); + + int j = rng.random(eo2.size()); + // make sure we select a subtree (and not a terminal) + while(eo2[j].arity() != 0) + { + j = rng.random(eo2.size()); + }; + + _eo1[i] = eo2[j]; // insert subtree + + // we don't have to prune because the subtree is always smaller + _eo1.pruneTree(max_length); - _eo1[i] = eo2[j]; // insert subtree - - // we don't have to prune because the subtree is always smaller - _eo1.pruneTree(max_length); - return true; } @@ -327,11 +327,11 @@ private : }; -/** eoHoistMutation --> replace the individual with one of its subtree's +/** eoHoistMutation --> replace the individual with one of its subtree's \class eoHoistMutation eoParseTreeOp.h gp/eoParseTreeOp.h \ingroup ParseTree */ - + template class eoHoistMutation: public eoMonOp< eoParseTree > { @@ -345,7 +345,7 @@ public: eoHoistMutation() : eoMonOp() {}; - + /// The class name virtual std::string className() const { return "eoHoistMutation"; }; @@ -357,17 +357,17 @@ public: */ bool operator()(EoType& _eo1 ) { - - - // select a hoist point - int i = rng.random(_eo1.size()); - // and create a new tree - EoType eo2(_eo1[i]); - - // we don't have to prune because the new tree is always smaller - //_eo1.pruneTree(max_length); - - _eo1 = eo2; + + + // select a hoist point + int i = rng.random(_eo1.size()); + // and create a new tree + EoType eo2(_eo1[i]); + + // we don't have to prune because the new tree is always smaller + //_eo1.pruneTree(max_length); + + _eo1 = eo2; return true; } diff --git a/eo/src/gp/eoStParseTreeDepthInit.h b/eo/src/gp/eoStParseTreeDepthInit.h index 43c4c2a2f..37b178873 100644 --- a/eo/src/gp/eoStParseTreeDepthInit.h +++ b/eo/src/gp/eoStParseTreeDepthInit.h @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoStParseTreeDepthInit.h : initializor strongly type GP // (c) Jeroen Eggermont 2001 @@ -8,19 +8,19 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - jeggermo@liacs.nl - + jeggermo@liacs.nl + */ //----------------------------------------------------------------------------- @@ -49,7 +49,7 @@ using namespace gp_parse_tree; individual but now each node class must have two additional functions. \li int type(void) which returns the return type of the node \li int type(int child) which returns the required type for child 0, 1 or 2 - + Pruning strongly typed trees is not possible at the moment. \ingroup Representations @@ -66,7 +66,7 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > public : typedef eoParseTree EoType; - + /** * Constructor * @param _max_depth The maximum depth of a tree @@ -74,121 +74,121 @@ class eoStParseTreeDepthInit : public eoInit< eoParseTree > * @param _return_type (JD_2010-11-09: don't know the use of this parameter, maybe to force implicit template instanciation?) * @param _grow False results in a full tree, True result is a randomly grown tree */ - eoStParseTreeDepthInit( + eoStParseTreeDepthInit( unsigned _max_depth, - const std::vector& _node, - const int& _return_type, + const std::vector& _node, + const int& _return_type, bool _grow = true) : eoInit(), - max_depth(_max_depth), - return_type(_return_type), - grow(_grow) + max_depth(_max_depth), + return_type(_return_type), + grow(_grow) { if(_node.empty()) { throw std::logic_error("eoStParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); } - - + + unsigned int i=0; int arity=0; int type=0; std::vector node_vector; for(i=0; i < _node.size(); i++) { - arity = _node[i].arity(); - type = _node[i].type(); - if(arity==0) - { - node_vector = node[type][TERMINAL]; - node_vector.push_back(_node[i]); - node[type][TERMINAL]= node_vector; - } - else - //if (arity != 0) // non-terminal - { - node_vector = node[type][NONTERMINAL]; - node_vector.push_back(_node[i]); - node[type][NONTERMINAL] = node_vector; - } - node_vector = node[type][ALL]; - node_vector.push_back(_node[i]); - node[type][ALL] = node_vector; - + arity = _node[i].arity(); + type = _node[i].type(); + if(arity==0) + { + node_vector = node[type][TERMINAL]; + node_vector.push_back(_node[i]); + node[type][TERMINAL]= node_vector; + } + else + //if (arity != 0) // non-terminal + { + node_vector = node[type][NONTERMINAL]; + node_vector.push_back(_node[i]); + node[type][NONTERMINAL] = node_vector; + } + node_vector = node[type][ALL]; + node_vector.push_back(_node[i]); + node[type][ALL] = node_vector; + } - + } /// My class name - virtual std::string className() const { return "eoStParseTreeDepthInit"; }; + virtual std::string className() const { return "eoStParseTreeDepthInit"; }; /**initialize a tree * @param _tree : the tree to be initialized */ void operator()(EoType& _tree) - { - std::list sequence; - bool good_tree = false; - do - { - sequence.clear(); - good_tree = generate(sequence, max_depth, return_type); - }while (!good_tree); + { + std::list sequence; + bool good_tree = false; + do + { + sequence.clear(); + good_tree = generate(sequence, max_depth, return_type); + }while (!good_tree); - parse_tree tmp(sequence.begin(), sequence.end()); - _tree.swap(tmp); - } + parse_tree tmp(sequence.begin(), sequence.end()); + _tree.swap(tmp); + } private : bool generate(std::list& sequence, int the_max, int request_type) { - - int selected=0; - bool ok = true; - - if (the_max == 1) - { // generate terminals only - if( node[request_type][TERMINAL].empty() ) // no possible terminal node of this type - return false; // we have an invalid tree - else - { - selected = rng.random((node[request_type][TERMINAL]).size()); - sequence.push_front(node[request_type][TERMINAL][selected]); - return true; - } - - } - - int arity=0; - if (grow) - { - selected = rng.random((node[request_type][ALL]).size()); - arity = node[request_type][ALL][selected].arity(); - sequence.push_front(node[request_type][ALL][selected]); - for (int i = 0; i < arity; ++i) - ok &= generate(sequence, the_max - 1, node[request_type][ALL][selected].type(i)); - } - else // full - { - selected = rng.random((node[request_type][NONTERMINAL]).size()); - arity = node[request_type][NONTERMINAL][selected].arity(); - sequence.push_front(node[request_type][NONTERMINAL][selected]); - for (int i = 0; i < arity; ++i) - ok &=generate(sequence, the_max - 1, node[request_type][NONTERMINAL][selected].type(i)); - } - - return ok; - + + int selected=0; + bool ok = true; + + if (the_max == 1) + { // generate terminals only + if( node[request_type][TERMINAL].empty() ) // no possible terminal node of this type + return false; // we have an invalid tree + else + { + selected = rng.random((node[request_type][TERMINAL]).size()); + sequence.push_front(node[request_type][TERMINAL][selected]); + return true; + } + + } + + int arity=0; + if (grow) + { + selected = rng.random((node[request_type][ALL]).size()); + arity = node[request_type][ALL][selected].arity(); + sequence.push_front(node[request_type][ALL][selected]); + for (int i = 0; i < arity; ++i) + ok &= generate(sequence, the_max - 1, node[request_type][ALL][selected].type(i)); + } + else // full + { + selected = rng.random((node[request_type][NONTERMINAL]).size()); + arity = node[request_type][NONTERMINAL][selected].arity(); + sequence.push_front(node[request_type][NONTERMINAL][selected]); + for (int i = 0; i < arity; ++i) + ok &=generate(sequence, the_max - 1, node[request_type][NONTERMINAL][selected].type(i)); + } + + return ok; + } - - unsigned max_depth; - std::map < int, std::map < int, std::vector > > node; + + unsigned max_depth; + std::map < int, std::map < int, std::vector > > node; int return_type; - bool grow; + bool grow; }; #endif diff --git a/eo/src/gp/eoStParseTreeOp.h b/eo/src/gp/eoStParseTreeOp.h index eb0d10230..88020448d 100644 --- a/eo/src/gp/eoStParseTreeOp.h +++ b/eo/src/gp/eoStParseTreeOp.h @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // eoStParseTreeOp.h : crossover and mutation operators for the strongly typed GP // (c) Jeroen Eggermont 2001 for other mutation operators @@ -9,18 +9,18 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - mak@dhi.dk + mak@dhi.dk jeggermo@liacs.nl */ //----------------------------------------------------------------------------- @@ -40,17 +40,17 @@ template void get_possible_nodes(const EOT &_eo, std::vector &possible_nodes, const int type) { - int n=0; - possible_nodes.clear(); - // collect the possible crossover points in _eo (nodes with the same type) - for(n=0; n < _eo.size(); n++) - if (type == _eo[n]->type()) - possible_nodes.push_back(n); -} + int n=0; + possible_nodes.clear(); + // collect the possible crossover points in _eo (nodes with the same type) + for(n=0; n < _eo.size(); n++) + if (type == _eo[n]->type()) + possible_nodes.push_back(n); +} /** eoStSubtreeXOver --> subtree xover for strongly typed tree-based genetic programming -\class eoStSubtreeXOver eoStParseTreeOp.h gp/eoStParseTreeOp.h +\class eoStSubtreeXOver eoStParseTreeOp.h gp/eoStParseTreeOp.h \ingroup StParseTree */ template @@ -78,54 +78,54 @@ public: */ bool operator()(EoType & _eo1, EoType & _eo2 ) { - int i = 0; - std::vector nodes; - int n = 0; - int type = 0; - int j = 0; - std::set test; - do - { - do // select a random node in _eo1 as crossover point, and check if we didn't try it already - { - i = rng.random(_eo1.size()); - }while(test.count(i) > 0); - - test.insert(i); - - type = _eo1[i]->type(); - - get_possible_nodes(_eo2, nodes, type); - - }while(nodes.empty() && (test.size() < _eo1.size())); - - if (nodes.empty()) // we failed to select a crossover point but tried all points (test.size() == _eo1.size()). - return true; // should this be false ?? + int i = 0; + std::vector nodes; + int n = 0; + int type = 0; + int j = 0; + std::set test; + do + { + do // select a random node in _eo1 as crossover point, and check if we didn't try it already + { + i = rng.random(_eo1.size()); + }while(test.count(i) > 0); - // we did find at least one possible crossover point in _eo2 - - n = rng.random(nodes.size()); - j = nodes[n]; - + test.insert(i); - - typename eoParseTree::subtree tmp = _eo1[i]; - _eo1[i] = _eo2[j]; // insert subtree - _eo2[j] = tmp; + type = _eo1[i]->type(); - // we can't prune anymore - /* + get_possible_nodes(_eo2, nodes, type); + + }while(nodes.empty() && (test.size() < _eo1.size())); + + if (nodes.empty()) // we failed to select a crossover point but tried all points (test.size() == _eo1.size()). + return true; // should this be false ?? + + // we did find at least one possible crossover point in _eo2 + + n = rng.random(nodes.size()); + j = nodes[n]; + + + + typename eoParseTree::subtree tmp = _eo1[i]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j] = tmp; + + // we can't prune anymore + /* _eo1.pruneTree(max_length); _eo2.pruneTree(max_length); - */ - - return true; + */ + + return true; } private: unsigned max_length; }; -/** eoStBranchMutation --> replace a strongly typed subtree with a randomly created strongly typed subtree +/** eoStBranchMutation --> replace a strongly typed subtree with a randomly created strongly typed subtree \class eoStBranchMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h \ingroup StParseTree */ @@ -143,42 +143,42 @@ public: eoStBranchMutation(eoInit& _init, unsigned _max_length) : eoMonOp(), max_length(_max_length), initializer(_init) {}; - + /// the class name virtual std::string className() const { return "eoStBranchMutation"; }; /// Dtor virtual ~eoStBranchMutation() {}; - + /** * Mutate an individual * @param _eo1 The individual that is to be changed */ bool operator()(EoType& _eo1 ) { - int i = rng.random(_eo1.size()); - std::vector nodes; - int type = _eo1[i]->type(); - int j=0; - int n=0; + int i = rng.random(_eo1.size()); + std::vector nodes; + int type = _eo1[i]->type(); + int j=0; + int n=0; - EoType eo2; - - do - { - initializer(eo2); - get_possible_nodes(eo2, nodes, type); - }while (nodes.empty()); + EoType eo2; - n = rng.random(nodes.size()); - j = nodes[n]; - - _eo1[i] = eo2[j]; // insert subtree - - // no more pruning - /* - _eo1.pruneTree(max_length); - */ + do + { + initializer(eo2); + get_possible_nodes(eo2, nodes, type); + }while (nodes.empty()); + + n = rng.random(nodes.size()); + j = nodes[n]; + + _eo1[i] = eo2[j]; // insert subtree + + // no more pruning + /* + _eo1.pruneTree(max_length); + */ return true; } @@ -208,22 +208,22 @@ public: eoStPointMutation( std::vector& _node) : eoMonOp() { - unsigned int i=0; + unsigned int i=0; int arity=0; int type=0; std::vector node_vector; for(i=0; i < _node.size(); i++) { - arity = _node[i].arity(); - type = _node[i].type(); - - node_vector = node[type][arity]; - node_vector.push_back(_node[i]); - node[type][arity]= node_vector; - + arity = _node[i].arity(); + type = _node[i].type(); + + node_vector = node[type][arity]; + node_vector.push_back(_node[i]); + node[type][arity]= node_vector; + }; }; - + /// the class name virtual std::string className() const { return "eoStPointMutation"; }; @@ -236,24 +236,24 @@ public: */ bool operator()(EoType& _eo1 ) { - // select a random node i that is to be mutated - int i = rng.random(_eo1.size()); - int arity = _eo1[i].arity(); - int type = _eo1[i]->type(); - int j = rng.random(node[type][arity].size()); + // select a random node i that is to be mutated + int i = rng.random(_eo1.size()); + int arity = _eo1[i].arity(); + int type = _eo1[i]->type(); + int j = rng.random(node[type][arity].size()); - - _eo1[i] = node[type][arity][j]; - return true; + + _eo1[i] = node[type][arity][j]; + return true; } private : - - std::map < int, std::map < int, std::vector > > node; + + std::map < int, std::map < int, std::vector > > node; }; - - /** eoStHoistMutation --> replace the individual with one of its strongly typed subtree's + + /** eoStHoistMutation --> replace the individual with one of its strongly typed subtree's \class eoStHoistMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h \ingroup StParseTree */ @@ -271,13 +271,13 @@ public: eoStHoistMutation(eoInit& _init, unsigned _max_length) : eoMonOp(), max_length(_max_length), initializer(_init) {}; - + /// the class name virtual std::string className() const { return "eoStHoistMutation"; }; /// Dtor virtual ~eoStHoistMutation() {}; - + /** * Mutate an individual * @param _eo1 The individual that is to be changed @@ -285,19 +285,19 @@ public: bool operator()(EoType& _eo1 ) { - std::vector nodes; - // get the type of the current tree - int type = _eo1[ _eo1.size() - 1 ]->type(); + std::vector nodes; + // get the type of the current tree + int type = _eo1[ _eo1.size() - 1 ]->type(); - get_possible_nodes(_eo1, nodes, type); - - // select a subtree-node to replace the current tree - int n = rng.random(nodes.size()); - int i = nodes[n]; - - EoType eo2(_eo1[i]); - - _eo1 = eo2; + get_possible_nodes(_eo1, nodes, type); + + // select a subtree-node to replace the current tree + int n = rng.random(nodes.size()); + int i = nodes[n]; + + EoType eo2(_eo1[i]); + + _eo1 = eo2; return true; } diff --git a/eo/src/gp/node_pool.h b/eo/src/gp/node_pool.h index e3b41b8ac..8935e7e2e 100644 --- a/eo/src/gp/node_pool.h +++ b/eo/src/gp/node_pool.h @@ -1,13 +1,13 @@ /** * Pool allocator for the subtree and parse tree classes (homebrew and not compliant to ANSI allocator requirements) - * (c) copyright Maarten Keijzer 1999, 2000 + * (c) copyright Maarten Keijzer 1999, 2000 - * Permission to copy, use, modify, sell and distribute this software is granted provided + * Permission to copy, use, modify, sell and distribute this software is granted provided * this copyright notice appears in all copies. This software is provided "as is" without * express or implied warranty, and with no claim as to its suitability for * any purpose. - + * Permission to modify the code and to distribute modified code is granted, * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. @@ -21,7 +21,7 @@ class MemPool { public : - + MemPool(unsigned int sz) : esize(sz(p)->next = + reinterpret_cast(p)->next = reinterpret_cast(p + esize); } - + reinterpret_cast(last)->next = 0; head = reinterpret_cast(start); } @@ -91,15 +91,15 @@ template class Node_alloc { public : - - T* allocate(void) + + T* allocate(void) { T* t = static_cast(mem.allocate()); t = new (t) T; return t; } - - T* construct(const T& org) + + T* construct(const T& org) { T* t = static_cast(mem.allocate()); t = new (t) T(org); @@ -117,7 +117,7 @@ private : }; -template +template class Standard_alloc { public : @@ -130,7 +130,7 @@ public : return new T [arity]; } - + T* construct(size_t arity, T* org) { if (arity == 0) @@ -154,7 +154,7 @@ public : }; -template +template class Standard_Node_alloc { public : @@ -270,19 +270,19 @@ public : switch(arity) { case 0: return; - case 3 : + case 3 : { t[2].~T(); t[1].~T(); t[0].~T(); mem3.deallocate(static_cast(t)); return; } - case 2 : + case 2 : { t[1].~T(); t[0].~T(); mem2.deallocate(static_cast(t)); return; } - case 1 : + case 1 : { t[0].~T(); mem1.deallocate(static_cast(t)); @@ -295,7 +295,7 @@ public : } } } - + private : static MemPool mem1; diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index 8437c0c76..84ec04d35 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -23,22 +23,22 @@ ****** Arity ****** \code - int arity(void) const + int arity(void) const \endcode - Note: the default constructor of a Node should provide a - Node with arity 0! + Note: the default constructor of a Node should provide a + Node with arity 0! ****** Evaluation ****** A parse_tree is evaluated through one of it's apply() members: - 1) parse_tree::apply(RetVal) + 1) parse_tree::apply(RetVal) - is the simplest evaluation, it will call + is the simplest evaluation, it will call \code - RetVal Node::operator()(RetVal, subtree::const_iterator) + RetVal Node::operator()(RetVal, subtree::const_iterator) \endcode (Unfortunately the first RetVal argument is mandatory (although you @@ -49,7 +49,7 @@ error. That is why you have to call tree.apply(double()) instead.) - 2) parse_tree::apply(RetVal v, It values) + 2) parse_tree::apply(RetVal v, It values) will call: @@ -58,10 +58,10 @@ \endcode where It is whatever type you desire (most of the time - this will be a std::vector containing the values of your - variables); + this will be a std::vector containing the values of your + variables); - 3) parse_tree::apply(RetVal, It values, It2 moreValues) + 3) parse_tree::apply(RetVal, It values, It2 moreValues) will call: @@ -69,26 +69,26 @@ RetVal Node::operator()(RetVal, subtree<... , It values, It2 moreValues) \endcode - although I do not see the immediate use of this, however... + although I do not see the immediate use of this, however... - 4) parse_tree::apply(RetVal, It values, It2 args, It3 adfs) + 4) parse_tree::apply(RetVal, It values, It2 args, It3 adfs) - that calls: + that calls: \code RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) \endcode - can be useful for implementing adfs. + can be useful for implementing adfs. - In general it is a good idea to leave the specifics of the - arguments open so that different ways of evaluation remain - possible. Implement the simplest eval as: + In general it is a good idea to leave the specifics of the + arguments open so that different ways of evaluation remain + possible. Implement the simplest eval as: \code - template - RetVal operator()(RetVal dummy, It begin) const + template + RetVal operator()(RetVal dummy, It begin) const \endcode ****** Internal Structure ****** @@ -99,10 +99,10 @@ The nodes are stored in a tree like : - node4 - / \ - node3 node2 - / \ + node4 + / \ + node3 node2 + / \ node1 node0 where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) @@ -129,9 +129,9 @@ will not crash and result in a tree structured as: - node4 - / \ - node3 node0 + node4 + / \ + node3 node0 Note that the rank numbers no longer specify their place in the tree: @@ -212,10 +212,10 @@ public : typedef subtree* iterator; typedef const subtree* const_iterator; - /* Constructors, assignments */ + /* Constructors, assignments */ subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - {} + {} subtree(const subtree& s) : content(node_allocator.allocate()), args(0), @@ -228,7 +228,7 @@ public : } subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) - { copy(t); } + { copy(t); } template subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) @@ -239,57 +239,57 @@ public : virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } subtree& operator=(const subtree& s) - { - if (s.get_root() == get_root()) + { + if (s.get_root() == get_root()) { // from the same tree, maybe a child. Don't take any chances subtree anotherS = s; return copy(anotherS); } - copy(s); + copy(s); updateAfterInsert(); return *this; - } + } subtree& operator=(const T& t) { copy(t); updateAfterInsert(); return *this; } - /* Access to the nodes */ + /* Access to the nodes */ T& operator*(void) { return *content; } const T& operator*(void) const { return *content; } T* operator->(void) { return content; } const T* operator->(void) const { return content; } - /* Equality, inequality check, Node needs to implement operator== */ + /* Equality, inequality check, Node needs to implement operator== */ - bool operator==(const subtree& other) const - { - if (! (*content == *other.content)) - return false; + bool operator==(const subtree& other) const + { + if (! (*content == *other.content)) + return false; - for (int i = 0; i < arity(); i++) - { - if (!(args[i] == other.args[i])) - return false; - } + for (int i = 0; i < arity(); i++) + { + if (!(args[i] == other.args[i])) + return false; + } - return true; - } + return true; + } - bool operator !=(const subtree& other) const - { - return !operator==(other); - } + bool operator !=(const subtree& other) const + { + return !operator==(other); + } - /* Arity */ + /* Arity */ int arity(void) const { return content->arity(); } - /* Evaluation with an increasing amount of user defined arguments */ - template - void apply(RetVal& v) const { (*content)(v, begin()); } + /* Evaluation with an increasing amount of user defined arguments */ + template + void apply(RetVal& v) const { (*content)(v, begin()); } - template - void apply(RetVal& v, It values) const + template + void apply(RetVal& v, It values) const { (*content)(v, begin(), values); } @@ -302,12 +302,12 @@ public : /* template - void apply(RetVal& v, It values, It2 moreValues) const - { (*content)(v, begin(), values, moreValues); } + void apply(RetVal& v, It values, It2 moreValues) const + { (*content)(v, begin(), values, moreValues); } - template - void apply(RetVal& v, It values, It2 moreValues, It3 evenMoreValues) const - { (*content)(v, begin(), values, moreValues, evenMoreValues); } + template + void apply(RetVal& v, It values, It2 moreValues, It3 evenMoreValues) const + { (*content)(v, begin(), values, moreValues, evenMoreValues); } */ template @@ -338,7 +338,7 @@ public : } } - /* Iterators */ + /* Iterators */ iterator begin(void) { return args; } const_iterator begin(void) const { return args; } @@ -346,10 +346,10 @@ public : iterator end(void) { return args + arity(); } const_iterator end(void) const { return args + arity(); } - subtree& operator[](int i) { return *(begin() + i); } - const subtree& operator[](int i) const { return *(begin() + i); } + subtree& operator[](int i) { return *(begin() + i); } + const subtree& operator[](int i) const { return *(begin() + i); } - /* Some statistics */ + /* Some statistics */ size_t size(void) const { return _size; } @@ -370,11 +370,11 @@ public : subtree* get_parent(void) { return parent; } const subtree* get_parent(void) const { return parent; } - void clear(void) - { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } + void clear(void) + { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } - void swap(subtree& y) - { + void swap(subtree& y) + { do_the_swap(content, y.content); do_the_swap(args, y.args); @@ -386,12 +386,12 @@ public : do_the_swap(_cumulative_size, y._cumulative_size); do_the_swap(_depth, y._depth); do_the_swap(_size, y._size); - updateAfterInsert(); - } + updateAfterInsert(); + } protected : - virtual void updateAfterInsert(void) + virtual void updateAfterInsert(void) { _depth = 0; _size = 1; @@ -419,7 +419,7 @@ private : // else for (int i = arity() - 1; i >= 0; --i) - { + { if (which < args[i]._cumulative_size) return args[i].imp_select_cumulative(which); which -= args[i]._cumulative_size; @@ -434,7 +434,7 @@ private : return *this; for (int i = arity() - 1; i >= 0; --i) - { + { unsigned c_size = args[i].size(); if (which < c_size) return args[i].imp_get_node(which); @@ -454,34 +454,34 @@ private : } subtree& copy(const subtree& s) { - int old_arity = arity(); + int old_arity = arity(); - int new_arity = s.arity(); + int new_arity = s.arity(); - if (new_arity != old_arity) - { - tree_allocator.deallocate(args, old_arity); + if (new_arity != old_arity) + { + tree_allocator.deallocate(args, old_arity); args = tree_allocator.allocate(new_arity); - } + } - switch(new_arity) - { - case 3 : args[2].copy(s.args[2]); args[2].parent = this; // no break! - case 2 : args[1].copy(s.args[1]); args[1].parent = this; - case 1 : args[0].copy(s.args[0]); args[0].parent = this; - case 0 : break; - default : - { - for (int i = 0; i < new_arity; ++i) - { - args[i].copy(s.args[i]); + switch(new_arity) + { + case 3 : args[2].copy(s.args[2]); args[2].parent = this; // no break! + case 2 : args[1].copy(s.args[1]); args[1].parent = this; + case 1 : args[0].copy(s.args[0]); args[0].parent = this; + case 0 : break; + default : + { + for (int i = 0; i < new_arity; ++i) + { + args[i].copy(s.args[i]); args[i].parent = this; - } - } - } + } + } + } - *content = *s.content; + *content = *s.content; _size = s._size; _depth = s._depth; _cumulative_size = s._cumulative_size; @@ -493,66 +493,66 @@ private : { int oldArity = arity(); - if (content != &t) + if (content != &t) *content = t; - else - oldArity = -1; + else + oldArity = -1; - int ar = arity(); + int ar = arity(); - if (ar != oldArity) - { + if (ar != oldArity) + { if (oldArity != -1) - tree_allocator.deallocate(args, oldArity); + tree_allocator.deallocate(args, oldArity); args = tree_allocator.allocate(ar); //if (ar > 0) - // args = new subtree [ar]; - //else - // args = 0; - } + // args = new subtree [ar]; + //else + // args = 0; + } adopt(); updateAfterInsert(); - return *this; + return *this; } - void disown(void) - { - switch(arity()) - { - case 3 : args[2].parent = 0; // no break! - case 2 : args[1].parent = 0; - case 1 : args[0].parent = 0; break; - case 0 : break; - default : - { - for (iterator it = begin(); it != end(); ++it) - { - it->parent = 0; - } - } - } + void disown(void) + { + switch(arity()) + { + case 3 : args[2].parent = 0; // no break! + case 2 : args[1].parent = 0; + case 1 : args[0].parent = 0; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = 0; + } + } + } - } + } void adopt(void) { - switch(arity()) - { - case 3 : args[2].parent = this; // no break! - case 2 : args[1].parent = this; - case 1 : args[0].parent = this; break; - case 0 : break; - default : - { - for (iterator it = begin(); it != end(); ++it) - { - it->parent = this; - } - } - } + switch(arity()) + { + case 3 : args[2].parent = this; // no break! + case 2 : args[1].parent = this; + case 1 : args[0].parent = this; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = this; + } + } + } } template @@ -581,7 +581,7 @@ private : subtree* args; subtree* parent; - size_t _cumulative_size; + size_t _cumulative_size; size_t _depth; size_t _size; }; @@ -590,7 +590,7 @@ private : typedef T value_type; - /* Constructors and Assignments */ + /* Constructors and Assignments */ parse_tree(void) : _root(), pushed() {} parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } @@ -602,33 +602,33 @@ private : virtual ~parse_tree(void) {} parse_tree& operator=(const parse_tree& org) { return copy(org); } - parse_tree& operator=(const subtree& sub) - { return copy(sub); } + parse_tree& operator=(const subtree& sub) + { return copy(sub); } - /* Equality and inequality */ + /* Equality and inequality */ - bool operator==(const parse_tree& other) const - { return _root == other._root; } + bool operator==(const parse_tree& other) const + { return _root == other._root; } - bool operator !=(const parse_tree& other) const - { return !operator==(other); } + bool operator !=(const parse_tree& other) const + { return !operator==(other); } - /* Simple tree statistics */ + /* Simple tree statistics */ size_t size(void) const { return _root.size(); } - size_t depth(void) const { return _root.depth(); } + size_t depth(void) const { return _root.depth(); } void clear(void) { _root.clear(); pushed.resize(0); } - /* Evaluation (application), with an increasing number of user defined arguments */ + /* Evaluation (application), with an increasing number of user defined arguments */ - template - void apply(RetVal& v) const - { _root.apply(v); } + template + void apply(RetVal& v) const + { _root.apply(v); } - template - void apply(RetVal& v, It varValues) const - { _root.apply(v, varValues); } + template + void apply(RetVal& v, It varValues) const + { _root.apply(v, varValues); } template void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) @@ -636,13 +636,13 @@ private : _root.apply_mem_func(v, misc, f); } - //template - // void apply(RetVal& v, It varValues, It2 moreValues) const - // { _root.apply(v, varValues, moreValues); } + //template + // void apply(RetVal& v, It varValues, It2 moreValues) const + // { _root.apply(v, varValues, moreValues); } - //template - // void apply(RetVal& v, It varValues, It2 moreValues, It3 evenMoreValues) const - // { _root.apply(v, varValues, moreValues, evenMoreValues); } + //template + // void apply(RetVal& v, It varValues, It2 moreValues, It3 evenMoreValues) const + // { _root.apply(v, varValues, moreValues, evenMoreValues); } template void find_nodes(std::vector& result, Pred& p) @@ -656,14 +656,14 @@ private : _root.find_nodes(p); } - /* Customized Swap */ - void swap(parse_tree& other) - { - do_the_swap(pushed, other.pushed); - _root.swap(other._root); - } + /* Customized Swap */ + void swap(parse_tree& other) + { + do_the_swap(pushed, other.pushed); + _root.swap(other._root); + } - /* Definitions of the iterators */ + /* Definitions of the iterators */ class base_iterator { @@ -680,19 +680,19 @@ private : bool operator!=(const base_iterator& org) const { return !operator==(org); } - base_iterator operator+(size_t n) const - { - base_iterator tmp = *this; + base_iterator operator+(size_t n) const + { + base_iterator tmp = *this; - for(;n != 0; --n) - { - ++tmp; - } + for(;n != 0; --n) + { + ++tmp; + } - return tmp; - } + return tmp; + } - base_iterator& operator++(void) + base_iterator& operator++(void) { subtree* parent = node->get_parent(); @@ -702,7 +702,7 @@ private : return *this; } // else - typename subtree::iterator it; + typename subtree::iterator it; for (it = parent->begin(); it != parent->end(); ++it) { if (node == &(*it)) @@ -801,7 +801,7 @@ private : return *this; } // else - typename subtree::const_iterator it; + typename subtree::const_iterator it; for (it = parent->begin(); it != parent->end(); ++it) { @@ -856,35 +856,35 @@ private : using base_const_iterator::node; - typedef std::forward_iterator_tag iterator_category; - typedef const T value_type; - typedef size_t distance_type; - typedef size_t difference_type; - typedef const T* pointer; - typedef const T& reference; + typedef std::forward_iterator_tag iterator_category; + typedef const T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const T* pointer; + typedef const T& reference; embedded_const_iterator() : base_const_iterator() {} embedded_const_iterator(const subtree* n): base_const_iterator(n) {} embedded_const_iterator& operator=(const embedded_const_iterator& org) { base_const_iterator::operator=(org); return *this; } - embedded_const_iterator operator+(size_t n) const - { - embedded_const_iterator tmp = *this; + embedded_const_iterator operator+(size_t n) const + { + embedded_const_iterator tmp = *this; - for(;n != 0; --n) - { - ++tmp; - } + for(;n != 0; --n) + { + ++tmp; + } - return tmp; - } + return tmp; + } const T& operator*(void) const { return **node; } const T* operator->(void) const { return node->operator->(); } }; - /* Iterator access */ + /* Iterator access */ iterator begin(void) { return iterator(&operator[](0)); } const_iterator begin(void) const { return const_iterator(&operator[](0)); } @@ -899,32 +899,32 @@ private : bool empty(void) const { return size() == 0; } bool valid(void) const { return pushed.empty(); } - /* push_back */ + /* push_back */ - void push_back(const parse_tree& tree) - { - if (!empty()) - pushed.push_back(_root); + void push_back(const parse_tree& tree) + { + if (!empty()) + pushed.push_back(_root); - _root = tree.back(); - } + _root = tree.back(); + } void push_back(const T& t) { if (!empty()) pushed.push_back(_root); - _root = t; + _root = t; for (typename subtree::iterator it = _root.begin(); it != _root.end(); it++) { - *it = pushed.back(); + *it = pushed.back(); pushed.pop_back(); } } - /* Access to subtrees */ + /* Access to subtrees */ subtree& back(void) { return _root; } const subtree& back(void) const { return _root; } @@ -954,7 +954,7 @@ private : return *this; } - parse_tree& copy(const subtree& sub) + parse_tree& copy(const subtree& sub) { _root = sub; pushed.resize(0); return *this; } subtree _root; @@ -970,25 +970,25 @@ namespace std template inline std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::embedded_iterator) { - return std::forward_iterator_tag(); + return std::forward_iterator_tag(); } template inline ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::embedded_iterator) { - return 0; + return 0; } template inline std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::iterator) { - return std::forward_iterator_tag(); + return std::forward_iterator_tag(); } template inline ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::iterator) { - return 0; + return 0; } /* Put customized swaps also in std... diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index bc1cf88d4..3071d1ee6 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -37,8 +37,8 @@ // eoString //----------------------------------------------------------------------------- -/** Adaptor that turns an STL std::string into an EO - +/** Adaptor that turns an STL std::string into an EO + @ingroup Representations @ingroup Utilities */ @@ -82,4 +82,3 @@ public: }; #endif - diff --git a/eo/src/pyeo/Makefile b/eo/src/pyeo/Makefile index 6953249c3..61c4f89f4 100644 --- a/eo/src/pyeo/Makefile +++ b/eo/src/pyeo/Makefile @@ -1,37 +1,35 @@ # Note for however is foolish enough to attempt to build this thing # -# You need: +# You need: # Python 2.2 # Boost.Python v2 # -CXX = g++ +CXX = g++ CPPFLAGS = -Wall -O2 #-g #-O2 -LDFLAGS = +LDFLAGS = COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -INC=-I/usr/include/python2.6 -I.. -I../.. -ftemplate-depth-50 +LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) +INC=-I/usr/include/python2.6 -I.. -I../.. -ftemplate-depth-50 OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ - random_numbers.o geneticOps.o selectOne.o continuators.o\ - reduce.o replacement.o selectors.o breeders.o\ - mergers.o valueParam.o perf2worth.o monitors.o\ - statistics.o + random_numbers.o geneticOps.o selectOne.o continuators.o\ + reduce.o replacement.o selectors.o breeders.o\ + mergers.o valueParam.o perf2worth.o monitors.o\ + statistics.o LIB=../libeo.a ../utils/libeoutils.a all: PyEO/PyEO.so clean: - rm PyEO/*.so *.o test/*.pyc + rm PyEO/*.so *.o test/*.pyc PyEO/PyEO.so: $(OBJECTS) - $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.6 ${LIB} -shared #-lstlport + $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.6 ${LIB} -shared #-lstlport eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp - $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) - -%.o:%.cpp PyEO.h def_abstract_functor.h - $(COMPILE) $< $(INC) - + $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) +%.o:%.cpp PyEO.h def_abstract_functor.h + $(COMPILE) $< $(INC) diff --git a/eo/src/pyeo/Makefile.rpm b/eo/src/pyeo/Makefile.rpm index dccf30eed..4db4bccac 100644 --- a/eo/src/pyeo/Makefile.rpm +++ b/eo/src/pyeo/Makefile.rpm @@ -5,7 +5,7 @@ CXXFLAGS = #-g #-DNDEBUG CPPFLAGS = -Wall -O2 LDFLAGS = -L/usr/lib/python2.2/config/ COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) +LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) INC=-I/usr/include/python2.2 -I/usr/include/stlport -I.. -ftemplate-depth-50 OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ @@ -25,7 +25,5 @@ PyEO.so: $(OBJECTS) eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) -%.o:%.cpp PyEO.h def_abstract_functor.h +%.o:%.cpp PyEO.h def_abstract_functor.h $(COMPILE) $< $(INC) - - diff --git a/eo/src/pyeo/PyEO.h b/eo/src/pyeo/PyEO.h index 6cf3c003c..188b7f8da 100644 --- a/eo/src/pyeo/PyEO.h +++ b/eo/src/pyeo/PyEO.h @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -21,112 +21,113 @@ #ifndef PYEO_H #define PYEO_H - #include #include #include #include #include -struct index_error : public std::exception { - index_error(std::string w) : what(w) {}; + +struct index_error : public std::exception +{ + index_error(std::string w) : what(w) {}; virtual ~index_error() throw() {} - std::string what; + std::string what; }; class PyFitness : public boost::python::object { - public : - +public : + typedef PyFitness fitness_traits; // it's its own traits class :-) - + PyFitness() : boost::python::object() {} - + template PyFitness(const T& o) : boost::python::object(o) {} - + static unsigned nObjectives() { return objective_info.size(); } static double tol() { return 1e-6; } static bool maximizing(int which) { return objective_info[which] > 0; } - + static void setObjectivesSize(int sz) { objective_info.resize(sz, 0); } static void setObjectivesValue(unsigned which, int value) { - if (which >= objective_info.size()) - { - throw index_error("Too few elements allocated, resize objectives first"); - } + if (which >= objective_info.size()) + { + throw index_error("Too few elements allocated, resize objectives first"); + } - objective_info[which] = value; + objective_info[which] = value; } - + static std::vector objective_info; - + bool dominates(const PyFitness& oth) const; - - double operator[](int i) const - { - boost::python::extract x(object::operator[](i)); - - if (!x.check()) - throw std::runtime_error("PyFitness: does not contain doubles"); - return x(); - } - - bool operator<(const PyFitness& other) const - { - if (objective_info.size() == 0) - { - const object& self = *this; - const object& oth = other; - return self < oth; - } - // otherwise use objective_info - - for (unsigned i = 0; i < objective_info.size(); ++i) - { - double a = objective_info[i] * operator[](i); - double b = objective_info[i] * other[i]; - if ( fabs(a - b) > tol()) - { - if (a < b) - return true; - return false; - } - } + double operator[](int i) const + { + boost::python::extract x(object::operator[](i)); - return false; + if (!x.check()) + throw std::runtime_error("PyFitness: does not contain doubles"); + return x(); } - - bool operator>(const PyFitness& other) const - { - return other.operator<(*this); + + bool operator<(const PyFitness& other) const + { + if (objective_info.size() == 0) + { + const object& self = *this; + const object& oth = other; + return self < oth; + } + // otherwise use objective_info + + for (unsigned i = 0; i < objective_info.size(); ++i) + { + double a = objective_info[i] * operator[](i); + double b = objective_info[i] * other[i]; + + if ( fabs(a - b) > tol()) + { + if (a < b) + return true; + return false; + } + } + + return false; } - + + bool operator>(const PyFitness& other) const + { + return other.operator<(*this); + } + void printOn(std::ostream& os) const { const boost::python::object& o = *this; boost::python::api::operator<<(os,o); } friend std::ostream& operator<<(std::ostream& os, const PyFitness& p) { p.printOn(os); return os; } friend std::istream& operator>>(std::istream& is, PyFitness& p) { boost::python::object o; is >> o; p = o; return is; } }; struct PyEO : public EO< PyFitness > -{ +{ typedef PyFitness Fitness; - + boost::python::object getFitness() const { return invalid()? Fitness(): fitness(); } void setFitness(boost::python::object f) { if (f == Fitness()) invalidate(); else fitness(f); } boost::python::object getGenome() const { return genome; } void setGenome(boost::python::object g) { genome = g; } boost::python::object genome; - + std::string to_string() const { - std::string result; - result += boost::python::extract(boost::python::str(getFitness())); - result += ' '; - result += boost::python::extract(boost::python::str(genome)); - return result; + std::string result; + result += boost::python::extract(boost::python::str(getFitness())); + result += ' '; + result += boost::python::extract(boost::python::str(genome)); + return result; } bool operator<(const PyEO& other) const { return EO::operator<(other); } @@ -139,17 +140,16 @@ std::ostream& operator<<(std::ostream& os, const PyEO& _eo); struct PyEO_pickle_suite : boost::python::pickle_suite { typedef PyEO::Fitness Fitness; - - static - boost::python::tuple getstate(const PyEO& _eo) + + static boost::python::tuple getstate(const PyEO& _eo) { - return boost::python::make_tuple(_eo.getFitness(), _eo.genome); + return boost::python::make_tuple(_eo.getFitness(), _eo.genome); } - static - void setstate(PyEO& _eo, boost::python::tuple pickled) + + static void setstate(PyEO& _eo, boost::python::tuple pickled) { - _eo.setFitness( Fitness(pickled[0]) ); - _eo.genome = pickled[1]; + _eo.setFitness( Fitness(pickled[0]) ); + _eo.genome = pickled[1]; } }; diff --git a/eo/src/pyeo/PyEO/__init__.py b/eo/src/pyeo/PyEO/__init__.py index cc6795425..2818319b6 100644 --- a/eo/src/pyeo/PyEO/__init__.py +++ b/eo/src/pyeo/PyEO/__init__.py @@ -1,4 +1,3 @@ - from PyEO import * try: @@ -8,80 +7,77 @@ except ImportError: else: class eoGnuplot1DMonitor(eoMonitor): - def __init__(self): - eoMonitor.__init__(self) - self.values = [] - self.indices = [] - self.g = Gnuplot.Gnuplot() - self.g.reset(); - - - def handleParam(self, i, param): - param = float(param) + def __init__(self): + eoMonitor.__init__(self) + self.values = [] + self.indices = [] + self.g = Gnuplot.Gnuplot() + self.g.reset(); - while len(self.values) <= i: - self.values.append( [] ) + def handleParam(self, i, param): + param = float(param) - self.values[i].append(param) - - def __call__(self): - - l = len(self) + while len(self.values) <= i: + self.values.append( [] ) - if l > 3 or l == 0: - print 'Can only handle 1 to 3 params currently' - - i = 0 - for param in self: - self.handleParam(i,param) - i += 1 - - self.indices.append( len(self.indices) ) + self.values[i].append(param) + + def __call__(self): + l = len(self) + + if l > 3 or l == 0: + print 'Can only handle 1 to 3 params currently' + + i = 0 + for param in self: + self.handleParam(i,param) + i += 1 + + self.indices.append( len(self.indices) ) - data1 = Gnuplot.Data(self.indices, self.values[0], with = 'lines') - - if l == 1: - self.g.plot(data1) - else: - data2 = Gnuplot.Data(self.indices, self.values[1], with = 'lines') + data1 = Gnuplot.Data(self.indices, self.values[0], with = 'lines') - if l == 2: - self.g.plot(data1, data2) - else: - data3 = Gnuplot.Data(self.indices, self.values[2], with = 'lines') + if l == 1: + self.g.plot(data1) + else: + data2 = Gnuplot.Data(self.indices, self.values[1], with = 'lines') - self.g.plot(data1, data2, data3) + if l == 2: + self.g.plot(data1, data2) + else: + data3 = Gnuplot.Data(self.indices, self.values[2], with = 'lines') + + self.g.plot(data1, data2, data3) def SeperatedVolumeMonitor(eoMonitor): def __init__(self, file): - eoMonitor.__init__(self) - self.file = file - self.initialized = None; + eoMonitor.__init__(self) + self.file = file + self.initialized = None; def __call__(self): - pass + pass class eoStat(eoStatBase, eoValueParam): def __init__(self): - eoStatBase.__init__(self) - eoValueParam.__init__(self) - + eoStatBase.__init__(self) + eoValueParam.__init__(self) + class eoSortedStat(eoSortedStatBase, eoValueParam): def __init__(self): - eoSortedStatBase.__init__(self) - eoValueParam.__init__(self) + eoSortedStatBase.__init__(self) + eoValueParam.__init__(self) class eoAverageStat(eoStat): def __call__(self, pop): - sum = 0.0; - for indy in pop: - sum += indy.fitness + sum = 0.0; + for indy in pop: + sum += indy.fitness - sum /= len(pop) - self.object = sum + sum /= len(pop) + self.object = sum class eoBestFitnessStat(eoSortedStat): - def __call__(self, pop): - self.object = pop[0].fitness + self.object = pop[0].fitness diff --git a/eo/src/pyeo/abstract1.cpp b/eo/src/pyeo/abstract1.cpp index e8e847772..43c0dadb9 100644 --- a/eo/src/pyeo/abstract1.cpp +++ b/eo/src/pyeo/abstract1.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -34,13 +34,19 @@ void abstract1() /* Abstract Classes: overrideble from python */ def_abstract_functor >("eoEvalFunc"); def_abstract_functor >("eoInit"); - + def_abstract_functor >("eoTransform"); - - class_, bases > >("eoSGATransform", - init< eoQuadOp&, double, - eoMonOp&, double>()) - .def("__call__", &eoSGATransform::operator()); - + + class_, bases > > + ("eoSGATransform", + init< + eoQuadOp&, + double, + eoMonOp&, + double + >() + ) + .def("__call__", &eoSGATransform::operator()); + def_abstract_functor >("eoPopEvalFunc"); -} +} diff --git a/eo/src/pyeo/algos.cpp b/eo/src/pyeo/algos.cpp index 12feaf196..caa2fcd33 100644 --- a/eo/src/pyeo/algos.cpp +++ b/eo/src/pyeo/algos.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -31,76 +31,96 @@ using namespace boost::python; void algos() { def_abstract_functor >("eoAlgo"); - + /* Algorithms */ - class_, bases >, boost::noncopyable>("eoSGA", - init&, - eoQuadOp&, float, - eoMonOp&, float, - eoEvalFunc&, - eoContinue&>() - [ - with_custodian_and_ward<1,2, - with_custodian_and_ward<1,3, - with_custodian_and_ward<1,5, - with_custodian_and_ward<1,7, - with_custodian_and_ward<1,8> - > - > - > - >() - ]) - .def("__call__", &eoSGA::operator()) - ; - - class_, bases > >("eoEasyEA", - init< - eoContinue&, - eoEvalFunc&, - eoBreed&, - eoReplacement& >() ) - .def( init< - eoContinue&, - eoPopEvalFunc&, - eoBreed&, - eoReplacement&>() ) - .def( init< - eoContinue&, - eoEvalFunc&, - eoBreed&, - eoMerge&, - eoReduce& >() ) - .def( init< - eoContinue&, - eoEvalFunc&, - eoSelect&, - eoTransform&, - eoReplacement&>()) - .def( init< - eoContinue&, - eoEvalFunc&, - eoSelect&, - eoTransform&, - eoMerge&, - eoReduce&>()) - .def("__call__", &eoEasyEA::operator()) - ; - + class_, bases >, boost::noncopyable> + ("eoSGA", + init< + eoSelectOne&, + eoQuadOp&, + float, + eoMonOp&, + float, + eoEvalFunc&, + eoContinue& + >() + [ + with_custodian_and_ward<1,2, + with_custodian_and_ward<1,3, + with_custodian_and_ward<1,5, + with_custodian_and_ward<1,7, + with_custodian_and_ward<1,8> + > + > + > + >() + ] + ) + .def("__call__", &eoSGA::operator()) + ; + + class_, bases > > + ("eoEasyEA", + init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoReplacement& + >() + ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoReplacement&, + unsigned + >() ) + .def( init< + eoContinue&, + eoPopEvalFunc&, + eoBreed&, + eoReplacement& + >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoMerge&, + eoReduce& + >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoSelect&, + eoTransform&, + eoReplacement& + >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoSelect&, + eoTransform&, + eoMerge&, + eoReduce& + >() ) + .def("__call__", &eoEasyEA::operator()) + ; + /* - class_, bases< eoAlgo > >("eoCellularEasyEA", - init< eoContinue&, - eoEvalFunc&, - eoSelectOne&, - eoBinOp&, - eoMonOp&, - eoSelectOne&>()) - .def( - init< eoContinue&, - eoEvalFunc&, - eoSelectOne&, - eoQuadOp&, - eoMonOp&, - eoSelectOne&>()) - ; + class_, bases< eoAlgo > >("eoCellularEasyEA", + init< eoContinue&, + eoEvalFunc&, + eoSelectOne&, + eoBinOp&, + eoMonOp&, + eoSelectOne&>()) + .def( + init< eoContinue&, + eoEvalFunc&, + eoSelectOne&, + eoQuadOp&, + eoMonOp&, + eoSelectOne&>()) + ; */ } diff --git a/eo/src/pyeo/breeders.cpp b/eo/src/pyeo/breeders.cpp index 30cf0994c..c66b6bccd 100644 --- a/eo/src/pyeo/breeders.cpp +++ b/eo/src/pyeo/breeders.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -27,9 +27,19 @@ using namespace boost::python; -#define DEF3(x, i1, i2) class_, bases > >(#x, \ - init()[with_custodian_and_ward<1,2,with_custodian_and_ward<1,3> >()])\ - .def("__call__", &eoBreed::operator()) +#define DEF3(x, i1, i2) \ + class_, bases > > \ + (#x, \ + init() \ + [ \ + with_custodian_and_ward<1,2, \ + with_custodian_and_ward<1,3 \ + > \ + > \ + () \ + ] \ + ) \ + .def("__call__", &eoBreed::operator()) void breeders() { @@ -38,14 +48,12 @@ void breeders() DEF3(eoSelectTransform, eoSelect&, eoTransform&); DEF3(eoGeneralBreeder, eoSelectOne&, eoGenOp&) - .def( init&, eoGenOp&, double>()[WC2]) - .def( init&, eoGenOp&, double, bool>()[WC2] ) - .def( init&, eoGenOp&, eoHowMany>() ); + .def( init&, eoGenOp&, double>()[WC2]) + .def( init&, eoGenOp&, double, bool>()[WC2] ) + .def( init&, eoGenOp&, eoHowMany>() ); DEF3(eoOneToOneBreeder, eoGenOp&, eoEvalFunc&) - .def( init&, eoEvalFunc&, double>()[WC2] ) - .def( init&, eoEvalFunc&, double, eoHowMany>()[WC2] ); - + .def( init&, eoEvalFunc&, double>()[WC2] ) + .def( init&, eoEvalFunc&, double, eoHowMany>()[WC2] ); } - diff --git a/eo/src/pyeo/continuators.cpp b/eo/src/pyeo/continuators.cpp index 4f1a76c50..d31613d2c 100644 --- a/eo/src/pyeo/continuators.cpp +++ b/eo/src/pyeo/continuators.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -40,28 +40,34 @@ void add_checkpoint(); void continuators() { /* Counters, wrappers etc */ - - class_, bases > >("eoEvalFuncCounter", - init< eoEvalFunc&, std::string>()) - .def("__call__", &eoEvalFuncCounter::operator()) - ; + + class_, bases > > + ("eoEvalFuncCounter", + init< eoEvalFunc&, std::string>() + ) + .def("__call__", &eoEvalFuncCounter::operator()) + ; /* Continuators */ - def_abstract_functor >("eoContinue"); - - class_, bases >, boost::noncopyable >("eoGenContinue", init() ) - .def("__call__", &eoGenContinue::operator()) - ; - - class_, bases > >("eoCombinedContinue", init&>()[WC1]) - .def( init&, eoContinue& >()[WC2] ) - .def("add", &eoCombinedContinue::add, WC1) - .def("__call__", &eoCombinedContinue::operator()) - ; - - class_, bases > >("eoEvalContinue", - init&, unsigned long>()[WC1]) - .def("__call__", &eoEvalContinue::operator()) - ; + def_abstract_functor >("eoContinue"); + + class_, bases >, boost::noncopyable > + ("eoGenContinue", init() ) + .def("__call__", &eoGenContinue::operator()) + ; + + class_, bases > > + ("eoCombinedContinue", init&>()[WC1]) + .def( init&, eoContinue& >()[WC2] ) + .def("add", &eoCombinedContinue::add, WC1) + .def("__call__", &eoCombinedContinue::operator()) + ; + + class_, bases > > + ("eoEvalContinue", + init&, unsigned long>()[WC1] + ) + .def("__call__", &eoEvalContinue::operator()) + ; DEF2(eoFitContinue, object); // object is the fitness type @@ -77,14 +83,14 @@ void addSortedStat(eoCheckPoint& c, eoSortedStatBase& s) { c.add(s); void add_checkpoint() { - class_, bases< eoContinue > >("eoCheckPoint", - - init&> ()[with_custodian_and_ward<1,2>()] - ) - .def("add", addContinue, with_custodian_and_ward<1,2>() ) - .def("add", addMonitor, with_custodian_and_ward<1,2>() ) - .def("add", addStat, with_custodian_and_ward<1,2>()) - .def("add", addSortedStat, with_custodian_and_ward<1,2>()) - .def("__call__", &eoCheckPoint::operator()) - ; + class_, bases< eoContinue > > + ("eoCheckPoint", + init&> ()[with_custodian_and_ward<1,2>()] + ) + .def("add", addContinue, with_custodian_and_ward<1,2>() ) + .def("add", addMonitor, with_custodian_and_ward<1,2>() ) + .def("add", addStat, with_custodian_and_ward<1,2>()) + .def("add", addSortedStat, with_custodian_and_ward<1,2>()) + .def("__call__", &eoCheckPoint::operator()) + ; } diff --git a/eo/src/pyeo/def_abstract_functor.h b/eo/src/pyeo/def_abstract_functor.h index 7324dc481..4c3101dfd 100644 --- a/eo/src/pyeo/def_abstract_functor.h +++ b/eo/src/pyeo/def_abstract_functor.h @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -23,104 +23,104 @@ #include -// DEFINES for call +// DEFINES for call #define WC1 boost::python::with_custodian_and_ward<1,2>() #define WC2 boost::python::with_custodian_and_ward<1,2, with_custodian_and_ward<1,3> >() namespace eoutils { -using namespace boost::python; - -template -class ProcWrapper : public Proc -{ - public: - PyObject* self; - ProcWrapper(PyObject* s) : self(s) {} + using namespace boost::python; - typename Proc::result_type operator()(void) + template + class ProcWrapper : public Proc { - return boost::python::call_method(self, "__call__"); - } -}; - -template -void make_abstract_functor(std::string name, typename eoFunctorBase::procedure_tag) -{ - typedef ProcWrapper Wrapper; - boost::python::class_(name.c_str(), boost::python::init<>() ) - .def("__call__", &Wrapper::operator()); -} - -template -void make_abstract_functor_ref(std::string name, typename eoFunctorBase::procedure_tag) -{ - typedef ProcWrapper Wrapper; - boost::python::class_(name.c_str(), boost::python::init<>() ) - .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>()); -} - -template -class UnaryWrapper : public Unary -{ public: - PyObject* self; - UnaryWrapper(PyObject* s) : self(s) {} + PyObject* self; + ProcWrapper(PyObject* s) : self(s) {} - typename Unary::result_type operator()(typename Unary::argument_type a) - { - return boost::python::call_method(self, "__call__", boost::ref(a) ); - } -}; + typename Proc::result_type operator()(void) + { + return boost::python::call_method(self, "__call__"); + } + }; -template -void make_abstract_functor(std::string name, typename eoFunctorBase::unary_function_tag) -{ - typedef UnaryWrapper Wrapper; - - boost::python::class_(name.c_str(), boost::python::init<>() ) - .def("__call__", &Wrapper::operator()) - ; -} - -template -void make_abstract_functor_ref(std::string name, typename eoFunctorBase::unary_function_tag) -{ - typedef UnaryWrapper Wrapper; - - boost::python::class_(name.c_str(), boost::python::init<>() ) - .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ) - ; -} - -template -class BinaryWrapper : public Binary -{ - public: - PyObject* self; - BinaryWrapper(PyObject* s) : self(s) {} - typename Binary::result_type operator()(typename Binary::first_argument_type a1, typename Binary::second_argument_type a2) + template + void make_abstract_functor(std::string name, typename eoFunctorBase::procedure_tag) { - return boost::python::call_method< - typename Binary::result_type>(self, "__call__", boost::ref(a1), boost::ref(a2) ); + typedef ProcWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()); } -}; -template -void make_abstract_functor(std::string name, typename eoFunctorBase::binary_function_tag) -{ - typedef BinaryWrapper Wrapper; - boost::python::class_(name.c_str(), boost::python::init<>() ) - .def("__call__", &Wrapper::operator()); -} + template + void make_abstract_functor_ref(std::string name, typename eoFunctorBase::procedure_tag) + { + typedef ProcWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>()); + } -template -void make_abstract_functor_ref(std::string name, typename eoFunctorBase::binary_function_tag) -{ - typedef BinaryWrapper Wrapper; - boost::python::class_(name.c_str(), boost::python::init<>() ) - .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ); -} + template + class UnaryWrapper : public Unary + { + public: + PyObject* self; + UnaryWrapper(PyObject* s) : self(s) {} + + typename Unary::result_type operator()(typename Unary::argument_type a) + { + return boost::python::call_method(self, "__call__", boost::ref(a) ); + } + }; + + template + void make_abstract_functor(std::string name, typename eoFunctorBase::unary_function_tag) + { + typedef UnaryWrapper Wrapper; + + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()) + ; + } + + template + void make_abstract_functor_ref(std::string name, typename eoFunctorBase::unary_function_tag) + { + typedef UnaryWrapper Wrapper; + + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ) + ; + } + + template + class BinaryWrapper : public Binary + { + public: + PyObject* self; + BinaryWrapper(PyObject* s) : self(s) {} + typename Binary::result_type operator()(typename Binary::first_argument_type a1, typename Binary::second_argument_type a2) + { + return boost::python::call_method< + typename Binary::result_type>(self, "__call__", boost::ref(a1), boost::ref(a2) ); + } + }; + + template + void make_abstract_functor(std::string name, typename eoFunctorBase::binary_function_tag) + { + typedef BinaryWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()); + } + + template + void make_abstract_functor_ref(std::string name, typename eoFunctorBase::binary_function_tag) + { + typedef BinaryWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ); + } }// namespace eoutils diff --git a/eo/src/pyeo/geneticOps.cpp b/eo/src/pyeo/geneticOps.cpp index 2665837b2..40617680e 100644 --- a/eo/src/pyeo/geneticOps.cpp +++ b/eo/src/pyeo/geneticOps.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -31,22 +31,22 @@ using namespace boost::python; class GenOpWrapper : public eoGenOp { - public: +public: PyObject* self; GenOpWrapper(PyObject* p) : self(p) {} unsigned max_production(void) { - return call_method(self,"max_production"); + return call_method(self,"max_production"); } std::string className() const { - return "GenOpDerivative"; // never saw the use of className anyway + return "GenOpDerivative"; // never saw the use of className anyway } - + void apply(eoPopulator& populator ) { - boost::python::call_method(self,"apply", boost::ref( populator ) ); + boost::python::call_method(self,"apply", boost::ref( populator ) ); } }; @@ -54,15 +54,15 @@ class PopulatorWrapper : public eoPopulator { public: PyObject* self; - PopulatorWrapper(PyObject* p, const eoPop& src, eoPop& dest) - : eoPopulator(src, dest), self(p) - { - //throw std::runtime_error("abstract base class"); - } - + PopulatorWrapper(PyObject* p, const eoPop& src, eoPop& dest) + : eoPopulator(src, dest), self(p) + { + //throw std::runtime_error("abstract base class"); + } + const PyEO& select() { - return call_method(self,"select"); + return call_method(self,"select"); } }; @@ -94,62 +94,62 @@ public: void geneticOps() { class_, PopulatorWrapper, boost::noncopyable> - ("eoPopulator", init&, eoPop&>() ) - .def("select", &PopulatorWrapper::select, return_internal_reference<>() ) - .def("get", &eoPopulator::operator*, return_internal_reference<>() ) - .def("next", &eoPopulator::operator++, return_internal_reference<>() ) - .def("insert", &eoPopulator::insert) - .def("reserve", &eoPopulator::reserve) - .def("source", &eoPopulator::source, return_internal_reference<>() ) - .def("offspring", &eoPopulator::offspring, return_internal_reference<>() ) - .def("tellp", &eoPopulator::tellp) - .def("seekp", &eoPopulator::seekp) - .def("exhausted", &eoPopulator::exhausted) - ; + ("eoPopulator", init&, eoPop&>() ) + .def("select", &PopulatorWrapper::select, return_internal_reference<>() ) + .def("get", &eoPopulator::operator*, return_internal_reference<>() ) + .def("next", &eoPopulator::operator++, return_internal_reference<>() ) + .def("insert", &eoPopulator::insert) + .def("reserve", &eoPopulator::reserve) + .def("source", &eoPopulator::source, return_internal_reference<>() ) + .def("offspring", &eoPopulator::offspring, return_internal_reference<>() ) + .def("tellp", &eoPopulator::tellp) + .def("seekp", &eoPopulator::seekp) + .def("exhausted", &eoPopulator::exhausted) + ; class_, bases > > - ("eoSeqPopulator", init&, eoPop&>() ) - .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) - ; - + ("eoSeqPopulator", init&, eoPop&>() ) + .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) + ; + class_, bases > > - ("eoSelectivePopulator", init&, eoPop&, eoSelectOne& >() ) - .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) - ; + ("eoSelectivePopulator", init&, eoPop&, eoSelectOne& >() ) + .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) + ; enum_::OpType>("OpType") - .value("unary", eoOp::unary) - .value("binary", eoOp::binary) - .value("quadratic", eoOp::quadratic) - .value("general", eoOp::general) - ; - + .value("unary", eoOp::unary) + .value("binary", eoOp::binary) + .value("quadratic", eoOp::quadratic) + .value("general", eoOp::general) + ; + class_ >("eoOp", init::OpType>()) - .def("getType", &eoOp::getType); - + .def("getType", &eoOp::getType); + class_, MonOpWrapper, bases >, boost::noncopyable>("eoMonOp", init<>()) - .def("__call__", &MonOpWrapper::operator(), "an example docstring"); + .def("__call__", &MonOpWrapper::operator(), "an example docstring"); class_, BinOpWrapper, bases >, boost::noncopyable>("eoBinOp", init<>()) - .def("__call__", &BinOpWrapper::operator()); + .def("__call__", &BinOpWrapper::operator()); class_, QuadOpWrapper, bases >, boost::noncopyable>("eoQuadOp", init<>()) - .def("__call__", &QuadOpWrapper::operator()); - + .def("__call__", &QuadOpWrapper::operator()); + class_, GenOpWrapper, bases >, boost::noncopyable>("eoGenOp", init<>()) - .def("max_production", &GenOpWrapper::max_production) - .def("className", &GenOpWrapper::className) - .def("apply", &GenOpWrapper::apply) - .def("__call__", &eoGenOp::operator()) - ; - + .def("max_production", &GenOpWrapper::max_production) + .def("className", &GenOpWrapper::className) + .def("apply", &GenOpWrapper::apply) + .def("__call__", &eoGenOp::operator()) + ; + class_, bases >, boost::noncopyable>("eoSequentialOp", init<>()) - .def("add", &eoSequentialOp::add, WC1) - .def("apply", &eoSequentialOp::apply) - ; - + .def("add", &eoSequentialOp::add, WC1) + .def("apply", &eoSequentialOp::apply) + ; + class_, bases >, boost::noncopyable>("eoProportionalOp", init<>()) - .def("add", &eoProportionalOp::add, WC1) - .def("apply", &eoProportionalOp::apply) - ; - + .def("add", &eoProportionalOp::add, WC1) + .def("apply", &eoProportionalOp::apply) + ; + /* Cloning */ class_, bases > >("eoMonCloneOp").def("__call__", &eoMonCloneOp::operator()); class_, bases > >("eoBinCloneOp").def("__call__", &eoBinCloneOp::operator()); diff --git a/eo/src/pyeo/mergers.cpp b/eo/src/pyeo/mergers.cpp index fd2b34110..f41af0490 100644 --- a/eo/src/pyeo/mergers.cpp +++ b/eo/src/pyeo/mergers.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -31,11 +31,10 @@ using namespace boost::python; void mergers() { def_abstract_functor >("eoMerge"); - + DEF2(eoElitism, double) - .def( init() ); + .def( init() ); DEF(eoNoElitism); DEF(eoPlus); } - diff --git a/eo/src/pyeo/monitors.cpp b/eo/src/pyeo/monitors.cpp index 8215128d7..02d011d89 100644 --- a/eo/src/pyeo/monitors.cpp +++ b/eo/src/pyeo/monitors.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -26,47 +26,46 @@ using namespace boost::python; class MonitorWrapper : public eoMonitor { - public: - PyObject* self; - list objects; - - MonitorWrapper(PyObject* p) :self(p) {} +public: + PyObject* self; + list objects; - eoMonitor& operator()() - { - call_method(self, "__call__"); - return *this; - } + MonitorWrapper(PyObject* p) :self(p) {} - std::string getString(int i) - { - if (static_cast(i) >= vec.size()) - { - throw index_error("Index out of bounds"); - } - - return vec[i]->getValue(); - } + eoMonitor& operator()() + { + call_method(self, "__call__"); + return *this; + } - unsigned size() { return vec.size(); } + std::string getString(int i) + { + if (static_cast(i) >= vec.size()) + { + throw index_error("Index out of bounds"); + } + + return vec[i]->getValue(); + } + + unsigned size() { return vec.size(); } }; void monitors() { - /** - * Change of interface: I encountered some difficulties with + /** + * Change of interface: I encountered some difficulties with * transferring eoParams from and to Python, so now we can * only get at the strings contained in the eoParams. * sorry */ - - class_("eoMonitor", init<>()) - .def("lastCall", &eoMonitor::lastCall) - .def("add", &eoMonitor::add) - .def("__call__", &MonitorWrapper::operator(), return_internal_reference<1>() ) - .def("__getitem__", &MonitorWrapper::getString, - "Returns the string value of the indexed Parameter") - .def("__len__", &MonitorWrapper::size) - ; -} + class_("eoMonitor", init<>()) + .def("lastCall", &eoMonitor::lastCall) + .def("add", &eoMonitor::add) + .def("__call__", &MonitorWrapper::operator(), return_internal_reference<1>() ) + .def("__getitem__", &MonitorWrapper::getString, + "Returns the string value of the indexed Parameter") + .def("__len__", &MonitorWrapper::size) + ; +} diff --git a/eo/src/pyeo/perf2worth.cpp b/eo/src/pyeo/perf2worth.cpp index 3ca13996d..a257b0cd9 100644 --- a/eo/src/pyeo/perf2worth.cpp +++ b/eo/src/pyeo/perf2worth.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -17,6 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #include #include "PyEO.h" @@ -30,19 +31,18 @@ struct Perf2WorthWrapper : public eoPerf2Worth void operator()( const eoPop& pop) { - call_method(self, "__call__", boost::ref(pop)); + call_method(self, "__call__", boost::ref(pop)); } - }; numeric::array get_worths(eoPerf2Worth& p) { std::vector& worths = p.value(); list result; - + for (unsigned i = 0; i < worths.size(); ++i) - result.append(worths[i]); - + result.append(worths[i]); + return numeric::array(result); } @@ -53,36 +53,37 @@ struct CachedPerf2WorthWrapper : public eoPerf2WorthCached void calculate_worths(const eoPop& pop) { - call_method(self, "calculate_worths", boost::ref(pop)); + call_method(self, "calculate_worths", boost::ref(pop)); } }; -void perf2worth() +void perf2worth() { //numeric::array::set_module_and_type("Numeric", "ArrayType"); - - class_< - eoPerf2Worth, - Perf2WorthWrapper, - bases< eoValueParam > >, - boost::noncopyable>("eoPerf2Worth", init<>()) - - .def("__call__", &Perf2WorthWrapper::operator()) - .def("sort_pop", &eoPerf2Worth::sort_pop) - //.def("value", get_worths) - ; - class_, CachedPerf2WorthWrapper, bases >, boost::noncopyable> - ("eoPerf2WorthCached", init<>()) - .def("__call__", &eoPerf2WorthCached::operator()) - .def("calculate_worths", &CachedPerf2WorthWrapper::calculate_worths) - ; - + class_, + Perf2WorthWrapper, + bases< eoValueParam > >, + boost::noncopyable>("eoPerf2Worth", init<>()) + + .def("__call__", &Perf2WorthWrapper::operator()) + .def("sort_pop", &eoPerf2Worth::sort_pop) + //.def("value", get_worths) + ; + + class_, + CachedPerf2WorthWrapper, + bases >, + boost::noncopyable>("eoPerf2WorthCached", init<>()) + + .def("__call__", &eoPerf2WorthCached::operator()) + .def("calculate_worths", &CachedPerf2WorthWrapper::calculate_worths) + ; + //class_, bases > >("eoNoPerf2Worth") -// .def("__call__", &eoNoPerf2Worth::operator()); - - class_, bases > >("eoNDSorting_II") - .def("calculate_worths", &eoNDSorting_II::calculate_worths); + // .def("__call__", &eoNoPerf2Worth::operator()); + + class_, + bases > >("eoNDSorting_II") + .def("calculate_worths", &eoNDSorting_II::calculate_worths); } - - diff --git a/eo/src/pyeo/pickle.h b/eo/src/pyeo/pickle.h index ee2706fbe..0e30654a9 100644 --- a/eo/src/pyeo/pickle.h +++ b/eo/src/pyeo/pickle.h @@ -29,32 +29,31 @@ #include /** Implements pickle support for eoPersistent derivatives */ - template struct T_pickle_suite : boost::python::pickle_suite { static std::string print_to_string(const T& t) { - std::ostringstream os; - t.printOn(os); - os << std::ends; - return os.str(); + std::ostringstream os; + t.printOn(os); + os << std::ends; + return os.str(); } static boost::python::tuple getstate(const T& t) { - std::string s = print_to_string(t); - return boost::python::make_tuple( boost::python::str(s)); + std::string s = print_to_string(t); + return boost::python::make_tuple( boost::python::str(s)); } static void setstate(T& t, boost::python::tuple pickled) { - std::string s = boost::python::extract(pickled[0]); - std::istringstream is(s); - t.readFrom(is); + std::string s = boost::python::extract(pickled[0]); + std::istringstream is(s); + t.readFrom(is); } }; @@ -65,7 +64,7 @@ template boost::python::class_& pickle(boost::python::class_& c) { return c.def_pickle(T_pickle_suite()) - .def("__str__", T_pickle_suite::print_to_string); + .def("__str__", T_pickle_suite::print_to_string); } #endif diff --git a/eo/src/pyeo/random_numbers.cpp b/eo/src/pyeo/random_numbers.cpp index aa9e4febb..c9047385d 100644 --- a/eo/src/pyeo/random_numbers.cpp +++ b/eo/src/pyeo/random_numbers.cpp @@ -61,52 +61,52 @@ struct RNG_pickle_suite : boost::python::pickle_suite static boost::python::tuple getstate(const eoRng& _rng) { - return boost::python::make_tuple(str(rng_to_string(_rng))); + return boost::python::make_tuple(str(rng_to_string(_rng))); } static void setstate(eoRng& _rng, boost::python::tuple pickled) { - std::string state = extract(pickled[0]); - rng_from_string(_rng, state); + std::string state = extract(pickled[0]); + rng_from_string(_rng, state); } }; int spin(eoRng& _rng, numeric::array values, double total) { - if (total == 0.0) - { - unsigned sz = len(values); - for (unsigned i = 0; i < sz; ++i) - { - total += extract(values[i]); //extract? - } - } + if (total == 0.0) + { + unsigned sz = len(values); + for (unsigned i = 0; i < sz; ++i) + { + total += extract(values[i]); //extract? + } + } - double chance = _rng.uniform() * total; + double chance = _rng.uniform() * total; - int i = 0; - while (chance >= 0.0) - chance -= extract(values[i++]); + int i = 0; + while (chance >= 0.0) + chance -= extract(values[i++]); - return --i; + return --i; } void random_numbers() { class_("eoRng", init()) - .def("flip", &eoRng::flip) - .def("random", &eoRng::random) - .def("rand", &eoRng::rand) - .def("rand_max", &eoRng::rand_max) - .def("reseed", &eoRng::reseed) - // .def("uniform", &eoRng::uniform) - .def("normal", normal) - .def("negexp", &eoRng::negexp) - .def("to_string", rng_to_string) - .def("from_string", rng_from_string) - .def("roulette_wheel", spin) - .def_pickle(RNG_pickle_suite()) - ; + .def("flip", &eoRng::flip) + .def("random", &eoRng::random) + .def("rand", &eoRng::rand) + .def("rand_max", &eoRng::rand_max) + .def("reseed", &eoRng::reseed) + // .def("uniform", &eoRng::uniform) + .def("normal", normal) + .def("negexp", &eoRng::negexp) + .def("to_string", rng_to_string) + .def("from_string", rng_from_string) + .def("roulette_wheel", spin) + .def_pickle(RNG_pickle_suite()) + ; def("rng", get_rng, return_value_policy()); } diff --git a/eo/src/pyeo/reduce.cpp b/eo/src/pyeo/reduce.cpp index a23c15cd5..6c9b78c64 100644 --- a/eo/src/pyeo/reduce.cpp +++ b/eo/src/pyeo/reduce.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -27,7 +27,7 @@ using namespace boost::python; // unfortunately have to define it specially class eoReduceWrapper : public eoReduce { - public: +public: PyObject* self; eoReduceWrapper(PyObject* s) : self(s) {} void operator()(eoPop& pop, unsigned i) @@ -38,7 +38,6 @@ class eoReduceWrapper : public eoReduce void reduce() { - // ref trick in def_abstract_functor does not work for unsigned int :-( class_, eoReduceWrapper, boost::noncopyable>("eoReduce", init<>()) .def("__call__", &eoReduceWrapper::operator()); @@ -62,4 +61,3 @@ void reduce() .def("__call__", &eoReduce::operator()) ; } - diff --git a/eo/src/pyeo/replacement.cpp b/eo/src/pyeo/replacement.cpp index 9867a113f..eb1bc5d70 100644 --- a/eo/src/pyeo/replacement.cpp +++ b/eo/src/pyeo/replacement.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -31,8 +31,9 @@ using namespace boost::python; #define DEF(x) class_, bases > >(#x).def("__call__", &eoReplacement::operator()) #define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) -#define DEF3(x, i1, i2) class_, bases > >(#x, \ - init() [WC2])\ +#define DEF3(x, i1, i2) class_, bases > > \ + (#x, \ + init() [WC2]) \ .def("__call__", &eoReplacement::operator()) void replacement() @@ -40,12 +41,12 @@ void replacement() def_abstract_functor >("eoReplacement"); // eoReplacement.h - DEF(eoGenerationalReplacement); - - class_, bases > > + DEF(eoGenerationalReplacement); + + class_, bases > > ("eoWeakElitistReplacement", init< eoReplacement& >()[WC1]); - + // eoMergeReduce.h DEF3(eoMergeReduce, eoMerge&, eoReduce& ); DEF(eoPlusReplacement); @@ -60,13 +61,12 @@ void replacement() // eoReduceMergeReduce.h //class_, bases > >("eoReplacement", -// init&, -// eoHowMany, eoReduce&, eoReduce&>()) -// .def("__call__", &eoReplacement::operator()); - + // init&, + // eoHowMany, eoReduce&, eoReduce&>()) + // .def("__call__", &eoReplacement::operator()); + //eoMGGReplacement DEF(eoMGGReplacement) .def( init() ) .def( init() ); } - diff --git a/eo/src/pyeo/selectOne.cpp b/eo/src/pyeo/selectOne.cpp index 554a6e36a..5a28fcff3 100644 --- a/eo/src/pyeo/selectOne.cpp +++ b/eo/src/pyeo/selectOne.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -33,10 +33,10 @@ using namespace boost::python; class eoSelectOneWrapper : public eoSelectOne { - public: +public: PyObject* self; eoSelectOneWrapper(PyObject* p) : self(p) {} - const PyEO& operator()(const eoPop& pop) + const PyEO& operator()(const eoPop& pop) { return boost::python::call_method< const PyEO& >(self, "__call__", boost::ref(pop)); } @@ -57,7 +57,7 @@ void add_select(std::string name, Init init) .def("__call__", &Select::operator(), return_internal_reference<>() ) ; } - + template void add_select(std::string name, Init1 init1, Init2 init2) { @@ -70,38 +70,39 @@ void add_select(std::string name, Init1 init1, Init2 init2) void selectOne() { /* Concrete classes */ - + pickle(class_("eoHowMany", init<>()) - .def( init() ) - .def( init() ) - .def( init() ) - .def("__call__", &eoHowMany::operator()) - .def("__neg__", &eoHowMany::operator-) - ); - + .def( init() ) + .def( init() ) + .def( init() ) + .def("__call__", &eoHowMany::operator()) + .def("__neg__", &eoHowMany::operator-) + ); + class_, eoSelectOneWrapper, boost::noncopyable>("eoSelectOne", init<>()) .def("__call__", &eoSelectOneWrapper::operator(), return_internal_reference<>() ) .def("setup", &eoSelectOne::setup); - + /* SelectOne derived classes */ - + add_select >("eoDetTournamentSelect", init<>(), init() ); add_select >("eoStochTournamentSelect", init<>(), init() ); - add_select >("eoTruncatedSelectOne", - init&, double>()[WC1], init&, eoHowMany >()[WC1] ); - + add_select >("eoTruncatedSelectOne", + init&, double>()[WC1], + init&, eoHowMany >()[WC1] + ); + // eoProportionalSelect is not feasible to implement at this point as fitness is not recognizable as a float // use eoDetTournament instead: with a t-size of 2 it is equivalent to eoProportional with linear scaling //add_select >("eoProportionalSelect", init&>() ); - + add_select >("eoRandomSelect"); add_select >("eoBestSelect"); add_select >("eoNoSelect"); - + add_select >("eoSequentialSelect", init<>(), init()); add_select >("eoEliteSequentialSelect"); /* * eoSelectFromWorth.h:class eoSelectFromWorth : public eoSelectOne - - */ + */ } diff --git a/eo/src/pyeo/selectors.cpp b/eo/src/pyeo/selectors.cpp index ba8d405d6..7c8f4096a 100644 --- a/eo/src/pyeo/selectors.cpp +++ b/eo/src/pyeo/selectors.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -53,9 +53,8 @@ void selectors() DEF3(eoTruncSelect, eoSelectOne&, eoHowMany); class_, bases > >("eoTruncatedSelectMany", - init&, double, double>()[WC1]) + init&, double, double>()[WC1]) .def(init&, double, double, bool> ()[WC1]) .def(init&, double, double, bool, bool> ()[WC1]) .def(init&, eoHowMany, eoHowMany> ()[WC1]); - } diff --git a/eo/src/pyeo/statistics.cpp b/eo/src/pyeo/statistics.cpp index 9c436ba52..fbad92694 100644 --- a/eo/src/pyeo/statistics.cpp +++ b/eo/src/pyeo/statistics.cpp @@ -5,9 +5,9 @@ using namespace boost::python; -class StatBaseWrapper : public eoStatBase +class StatBaseWrapper : public eoStatBase { - public: +public: PyObject* self; StatBaseWrapper(PyObject* p) : self(p) {} @@ -17,9 +17,9 @@ class StatBaseWrapper : public eoStatBase } }; -class SortedStatBaseWrapper : public eoSortedStatBase +class SortedStatBaseWrapper : public eoSortedStatBase { - public: +public: PyObject* self; SortedStatBaseWrapper(PyObject* p) : self(p) {} @@ -31,13 +31,13 @@ class SortedStatBaseWrapper : public eoSortedStatBase typedef std::vector eoPopView; -const PyEO& popview_getitem(const std::vector& pop, int it) -{ +const PyEO& popview_getitem(const std::vector& pop, int it) +{ unsigned item = unsigned(it); if (item > pop.size()) throw index_error("too much"); - - return *pop[item]; + + return *pop[item]; } void statistics() @@ -52,7 +52,7 @@ void statistics() .def("__getitem__", popview_getitem, return_internal_reference<>() ) .def("__len__", &eoPopView::size) ; - + class_, SortedStatBaseWrapper, boost::noncopyable> ("eoSortedStatBase", init<>()) .def("lastCall", &eoSortedStatBase::lastCall) diff --git a/eo/src/pyeo/test/maxone.py b/eo/src/pyeo/test/maxone.py index c2b6a0cf9..3544d4988 100644 --- a/eo/src/pyeo/test/maxone.py +++ b/eo/src/pyeo/test/maxone.py @@ -1,4 +1,3 @@ - import sys sys.path.append('..') @@ -10,47 +9,47 @@ from copy import copy class MinimFit(float): def __cmp__(self, other): - if other == None: # I seem to be getting None's, don't know why - return 1 - return float.__cmp__(other, self) - + if other == None: # I seem to be getting None's, don't know why + return 1 + return float.__cmp__(other, self) + class EvalFunc(eoEvalFunc): def __call__(self, eo): - eo.fitness = reduce(lambda x,y: x+y, eo.genome, 0) - + eo.fitness = reduce(lambda x,y: x+y, eo.genome, 0) + class MinEvalFunc(eoEvalFunc): def __call__(self, eo): - f = reduce(lambda x,y: x+y, eo.genome, 0 ) - eo.fitness = MinimFit(f) + f = reduce(lambda x,y: x+y, eo.genome, 0 ) + eo.fitness = MinimFit(f) class Init(eoInit): def __init__(self, genome_length = 10): - eoInit.__init__(self) - self.length = genome_length + eoInit.__init__(self) + self.length = genome_length def __call__(self, eo): - eo.genome = [rng().flip(0.5) for x in range(self.length)] - + eo.genome = [rng().flip(0.5) for x in range(self.length)] + class Mutate(eoMonOp): def __call__(self, eo): - eo.genome = copy(eo.genome) + eo.genome = copy(eo.genome) - prob = 1. / len(eo.genome) - for i in range(len(eo.genome)): - if rng().flip(0.5): - eo.genome[i] = 1-eo.genome[i]; - return 1 + prob = 1. / len(eo.genome) + for i in range(len(eo.genome)): + if rng().flip(0.5): + eo.genome[i] = 1-eo.genome[i]; + return 1 class Crossover(eoQuadOp): def __call__(self, eo1, eo2): - eo1.genome = copy(eo1.genome); - eo2.genome = copy(eo2.genome); + eo1.genome = copy(eo1.genome); + eo2.genome = copy(eo2.genome); - point = rng().random( len(eo1.genome) ); + point = rng().random( len(eo1.genome) ); - eo1.genome[:point] = eo2.genome[:point]; - eo2.genome[point:] = eo1.genome[point:]; - - return 1 + eo1.genome[:point] = eo2.genome[:point]; + eo2.genome[point:] = eo1.genome[point:]; + + return 1 evaluate = EvalFunc() init = Init(3) @@ -58,34 +57,32 @@ mutate = Mutate() xover = Crossover() if __name__ == '__main__': - + eo = EO() eo1 = EO() - + init(eo1) init(eo) evaluate(eo) print eo - + for i in range(10): - xover(eo, eo1) - mutate(eo) - - evaluate(eo) - print eo, eo1 - + xover(eo, eo1) + mutate(eo) + + evaluate(eo) + print eo, eo1 + print print print - + pop = eoPop(1, init) - + pop[0] = eo; mutate(pop[0]) pop[0].invalidate() evaluate(pop[0]) - - print pop[0], eo - + print pop[0], eo diff --git a/eo/src/pyeo/test/test_breeders.py b/eo/src/pyeo/test/test_breeders.py index 5d3fc7601..c23d47873 100644 --- a/eo/src/pyeo/test/test_breeders.py +++ b/eo/src/pyeo/test/test_breeders.py @@ -1,18 +1,16 @@ from maxone import * import unittest - + class TestBreeders(unittest.TestCase): - def runtest(self, breed): - pop = eoPop(50, Init(20)) evaluate = EvalFunc() - print 'HERE' + print 'HERE' for indy in pop: evaluate(indy) newpop = eoPop(); breed(pop,newpop) - + print pop.best() for indy in newpop: evaluate(indy) print newpop.best() @@ -28,6 +26,5 @@ class TestBreeders(unittest.TestCase): def suite(): return unittest.makeSuite(TestSGA,'test') - if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_mo.py b/eo/src/pyeo/test/test_mo.py index ac8472903..5a7a79a41 100644 --- a/eo/src/pyeo/test/test_mo.py +++ b/eo/src/pyeo/test/test_mo.py @@ -2,35 +2,33 @@ from maxone import * from math import exp import unittest - class MyInit(eoInit): def __call__(self, eo): eo.genome = [rng().normal(), rng().normal(), rng().normal()]; class MyMutate(eoMonOp): def __call__(self, eo): - std = 0.05 eo.genome = copy(eo.genome) - + eo.genome[0] += rng().normal() * std eo.genome[1] += rng().normal() * std - eo.genome[2] += rng().normal() * std + eo.genome[2] += rng().normal() * std return 1 class AnEval(eoEvalFunc): def __init__(self): eoEvalFunc.__init__(self) - + setObjectivesSize(2); setObjectivesValue(0,1); setObjectivesValue(1,1); - + def __call__(self, eo): x = abs(eo.genome[0]) y = abs(eo.genome[1]) z = abs(eo.genome[2]) - + eo.fitness = [ x / (x+y+z), y /(x+y+z) ] import Gnuplot @@ -47,71 +45,65 @@ def do_plot(pop): l2.append(indy.fitness[1]) d = Gnuplot.Data(l1,l2, with = 'points') - + d2 = Gnuplot.Data([0,1],[1,0], with='lines') - + g.plot(d,d2) - - class NSGA_II(eoAlgo): def __init__(self, ngens): - self.cont = eoGenContinue(ngens); - + self.selectOne = eoDetTournamentSelect(2); self.evaluate = AnEval() self.mutate = MyMutate() self.init = MyInit() - + self.seq = eoProportionalOp() self.seq.add(self.mutate, 1.0) - + self.perf2worth = eoNDSorting_II() - + def __call__(self, pop): - sz = len(pop) i = 0 while self.cont(pop): - newpop = eoPop() + newpop = eoPop() populator = eoSelectivePopulator(pop, newpop, self.selectOne); while len(newpop) < sz: self.seq(populator) - - for indy in newpop: + + for indy in newpop: self.evaluate(indy) pop.push_back(indy) self.perf2worth(pop) self.perf2worth.sort_pop(pop) - + #print pop[0].fitness, pop[0].genome pop.resize(sz) - + #worth = self.perf2worth.getValue() #print worth[0], worth[sz-1] - + i += 1 if i%100 == 0: - pass + pass do_plot(pop) - + worths = self.perf2worth.getValue() - + w0 = int(worths[0]-0.001) - + for i in range(len(pop)): if worths[i] <= w0: break; print pop[i].genome print pop[i].fitness - - + class TestNSGA_II(unittest.TestCase): - def testIndividuals(self): setObjectivesSize(2); setObjectivesValue(0,1); @@ -133,12 +125,12 @@ class TestNSGA_II(unittest.TestCase): self.failUnlessEqual(dominates(eo1, eo2), 1) self.failUnlessEqual(dominates(eo2, eo1), 0) self.failUnlessEqual(dominates(eo2, eo2), 0) - + def testNDSorting(self): setObjectivesSize(2); setObjectivesValue(0,-1) setObjectivesValue(1,-1); - + pop = eoPop() pop.resize(6) @@ -157,20 +149,18 @@ class TestNSGA_II(unittest.TestCase): for indy in pop: print indy.fitness - worths = srt.getValue() print worths print type(worths) def testNSGA_II(self): - evaluate = AnEval(); pop = eoPop(25, MyInit()) for indy in pop: evaluate(indy) - + nsga = NSGA_II(50) nsga(pop) - + if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_pickling.py b/eo/src/pyeo/test/test_pickling.py index 161668bb3..81b3b9f5f 100644 --- a/eo/src/pyeo/test/test_pickling.py +++ b/eo/src/pyeo/test/test_pickling.py @@ -5,9 +5,7 @@ import tempfile import os class TestPickling(unittest.TestCase): - def do_pickle(self, object): - filename = tempfile.mktemp() file = open(filename, 'wb') pickler = cPickle.Pickler(file) @@ -15,9 +13,9 @@ class TestPickling(unittest.TestCase): pickler.dump(object); del pickler file.close() - + file = open(filename) - + unpickler = cPickle.Unpickler(file) object2 = unpickler.load() @@ -29,15 +27,13 @@ class TestPickling(unittest.TestCase): return object2 def testInvalidEO(self): - eo = EO(); eo.genome = [1,2,3]; - + eo2 = self.do_pickle(eo) self.failUnlessEqual( str(eo), str(eo2) ) def testValidEO(self): - eo = EO(); eo.genome = [1,2,3]; eo.fitness = 10 @@ -45,19 +41,17 @@ class TestPickling(unittest.TestCase): eo2 = self.do_pickle(eo) self.failUnlessEqual( str(eo), str(eo2) ) - + def testPop(self): - pop = eoPop(40, init) - for indy in pop: + for indy in pop: evaluate(indy) pop2 = self.do_pickle(pop) - + self.failUnlessEqual( str(pop), str(pop2) ) def testHowMany(self): - howmany = eoHowMany(0.8); howmany2 = self.do_pickle(howmany) @@ -65,36 +59,33 @@ class TestPickling(unittest.TestCase): self.failUnlessEqual( str(howmany), str(howmany) ) def testRNG(self): - for i in range(10): rng().rand() - + rng2 = self.do_pickle(rng()) - + for i in range(100): a = rng().rand() b = rng2.rand() self.failUnlessEqual(a,b) def vParam(self,v): - v2 = self.do_pickle(v); self.failUnlessEqual(v.value, v2.value) - + def testValueParam(self): import Numeric - - self.vParam(eoValueParamInt(42,'int')) + + self.vParam(eoValueParamInt(42,'int')) self.vParam(eoValueParamFloat(4.2,'float')) - + v = eoValueParamVec() v.value = Numeric.arange(10) - self.vParam(v) + self.vParam(v) v = eoValueParamPair() v.value = (0.3,0.5) self.vParam(v) - if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_populator.py b/eo/src/pyeo/test/test_populator.py index a6743fda4..12335956a 100644 --- a/eo/src/pyeo/test/test_populator.py +++ b/eo/src/pyeo/test/test_populator.py @@ -20,36 +20,34 @@ class Xover(Crossover): return Crossover.__call__(self, eo1, eo2) class TestPopulator(unittest.TestCase): - def make_pop(self): pop = eoPop(20, init) for indy in pop: evaluate(indy) return pop - + def test_sequential(self): pop = self.make_pop() populator = eoSeqPopulator(pop, pop) - + print populator.get() print populator.get() - + def test_selective(self): sel = eoDetTournamentSelect(2) pop = self.make_pop() populator = eoSelectivePopulator(pop, pop, sel) - + print populator.get() print populator.get() def runOpContainer(self, opcontainer): - mutate = Mut() xover = Xover() - + print 'making seq' seq = opcontainer() - + print "xovertype", xover.getType() print "mutationtype", mutate.getType() @@ -58,29 +56,27 @@ class TestPopulator(unittest.TestCase): pop = self.make_pop(); offspring = eoPop() - + sel = eoDetTournamentSelect(2) - + print "making populator" populator = eoSelectivePopulator(pop, offspring, sel) print 'made' - + for i in xrange(1000): seq(populator) - + print mutate.cnt print xover.cnt def test_sequentialOp(self): - print '*'*20, "SequentialOp", '*'*20 + print '*'*20, "SequentialOp", '*'*20 self.runOpContainer(eoSequentialOp) - + def test_proportionalOp(self): - print '*'*20, "ProportionalOp", '*'*20 + print '*'*20, "ProportionalOp", '*'*20 self.runOpContainer(eoProportionalOp) - - if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_reduce.py b/eo/src/pyeo/test/test_reduce.py index 2ca99dc5b..3e279168a 100644 --- a/eo/src/pyeo/test/test_reduce.py +++ b/eo/src/pyeo/test/test_reduce.py @@ -2,11 +2,10 @@ from maxone import * import unittest class TestReduce(unittest.TestCase): - def run_test(self, ReduceClass, Arg = None): pop = eoPop(10, init) for indy in pop: evaluate(indy) - + if Arg: red = ReduceClass(Arg) else: @@ -14,8 +13,8 @@ class TestReduce(unittest.TestCase): red(pop, 5); - self.failUnlessEqual( len(pop), 5) - + self.failUnlessEqual( len(pop), 5) + def test_eoTruncate(self): self.run_test(eoTruncate) def test_eoRandomeReduce(self): @@ -28,7 +27,6 @@ class TestReduce(unittest.TestCase): self.run_test(eoDetTournamentTruncate, 2) def test_eoStochTournamentTruncate(self): self.run_test(eoStochTournamentTruncate, 0.9) - - + if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_selectone.py b/eo/src/pyeo/test/test_selectone.py index 1a25bc7fe..f71913b98 100644 --- a/eo/src/pyeo/test/test_selectone.py +++ b/eo/src/pyeo/test/test_selectone.py @@ -3,64 +3,60 @@ import unittest class Init(eoInit): def __call__(self, eo): - pass + pass class TestSGA(unittest.TestCase): - def __init__(self, a): - unittest.TestCase.__init__(self, a) - self.pop = eoPop(4, Init()) + unittest.TestCase.__init__(self, a) + self.pop = eoPop(4, Init()) + + for i in range(len(self.pop)): + self.pop[i].fitness = i; - for i in range(len(self.pop)): - self.pop[i].fitness = i; - def do_test(self, selectOne): - - print '*'*20, "Testing", str(selectOne.__class__), '*'*20 - selection = [0. for i in range(len(self.pop))] + print '*'*20, "Testing", str(selectOne.__class__), '*'*20 + selection = [0. for i in range(len(self.pop))] + + nTries = 500 + for i in range(nTries): + selection[ selectOne(self.pop).fitness ] += 1 + + for i in range(len(self.pop)): + print i, selection[i], selection[i] / nTries + + return selection, nTries - nTries = 500 - for i in range(nTries): - selection[ selectOne(self.pop).fitness ] += 1 - - for i in range(len(self.pop)): - print i, selection[i], selection[i] / nTries - - return selection, nTries - def test_eoDetTournamenSelect(self): - - selectOne = eoDetTournamentSelect(2) - self.do_test(selectOne) - + selectOne = eoDetTournamentSelect(2) + self.do_test(selectOne) + def test_eoRandomSelect(self): - selectOne = eoRandomSelect() - self.do_test(selectOne) + selectOne = eoRandomSelect() + self.do_test(selectOne) def test_eoBestSelect(self): - selectOne = eoBestSelect() - (sel, nTries) = self.do_test(selectOne) + selectOne = eoBestSelect() + (sel, nTries) = self.do_test(selectOne) - self.failUnlessEqual(sel[0], 0); - self.failUnlessEqual(sel[-1], nTries); + self.failUnlessEqual(sel[0], 0); + self.failUnlessEqual(sel[-1], nTries); def test_eoNoSelect(self): - selectOne = eoNoSelect() - self.do_test(selectOne) + selectOne = eoNoSelect() + self.do_test(selectOne) def test_eoStochTournament(self): - selectOne = eoStochTournamentSelect(0.75) - self.do_test(selectOne) + selectOne = eoStochTournamentSelect(0.75) + self.do_test(selectOne) def test_eoSequentialSelect(self): - selectOne = eoSequentialSelect(); - self.do_test(selectOne) - + selectOne = eoSequentialSelect(); + self.do_test(selectOne) + def test_eoEliteSequentialSelect(self): - selectOne = eoEliteSequentialSelect(); - self.do_test(selectOne) - + selectOne = eoEliteSequentialSelect(); + self.do_test(selectOne) if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_sga.py b/eo/src/pyeo/test/test_sga.py index b84afe752..5f6d1c22a 100644 --- a/eo/src/pyeo/test/test_sga.py +++ b/eo/src/pyeo/test/test_sga.py @@ -2,43 +2,44 @@ from maxone import * import unittest class TestSGA(unittest.TestCase): - def dotestSGA(self, evaluate): - init = Init(20) - mutate = Mutate() - xover = Crossover() + init = Init(20) + mutate = Mutate() + xover = Crossover() - pop = eoPop(50, init) - for indy in pop: evaluate(indy) + pop = eoPop(50, init) + for indy in pop: evaluate(indy) - select = eoDetTournamentSelect(3); - cont1 = eoGenContinue(20); - - cont = eoCheckPoint(cont1) - - mon = eoGnuplot1DMonitor() - - avg = eoAverageStat() - bst = eoBestFitnessStat() - mon.add(avg) - mon.add(bst) - - # add it to the checkpoint - cont.add(avg) - #cont.add(mon) - cont.add(bst) - - sga = eoSGA(select, xover, 0.6, mutate, 0.4, evaluate, cont); + select = eoDetTournamentSelect(3); + cont1 = eoGenContinue(20); - sga(pop) + cont = eoCheckPoint(cont1) + + mon = eoGnuplot1DMonitor() + + avg = eoAverageStat() + bst = eoBestFitnessStat() + mon.add(avg) + mon.add(bst) + + # add it to the checkpoint + cont.add(avg) + #cont.add(mon) + cont.add(bst) + + sga = eoSGA(select, xover, 0.6, mutate, 0.4, evaluate, cont); + + sga(pop) + + print pop.best() - print pop.best() def testSGA_Max(self): - evaluate = EvalFunc() - self.dotestSGA(evaluate) + evaluate = EvalFunc() + self.dotestSGA(evaluate) + def testSGA_Min(self): - evaluate = MinEvalFunc() - self.dotestSGA(evaluate) + evaluate = MinEvalFunc() + self.dotestSGA(evaluate) if __name__=='__main__': unittest.main() diff --git a/eo/src/pyeo/test/test_transform.py b/eo/src/pyeo/test/test_transform.py index 67d892e68..fb70de3ee 100644 --- a/eo/src/pyeo/test/test_transform.py +++ b/eo/src/pyeo/test/test_transform.py @@ -1,61 +1,62 @@ """Test script for the eoSGATranform class""" from copy import deepcopy -from PyEO import * +from PyEO import * from maxone import * pop = eoPop() + for i in range(10): - eo = EO() - init(eo) - evaluate(eo) - pop.push_back(eo) + eo = EO() + init(eo) + evaluate(eo) + pop.push_back(eo) transform = eoSGATransform(xover, 0.8, mutate, 0.2) def test1(pop, transform): - pop = deepcopy(pop) - print "test 1" - print "Initial population:" - print pop + pop = deepcopy(pop) + print "test 1" + print "Initial population:" + print pop - transform(pop) + transform(pop) - print "GM pop:" - print pop + print "GM pop:" + print pop def test2(pop, transform): - pop = deepcopy(pop) + pop = deepcopy(pop) - print "test 2" - print "Initial population" - print pop + print "test 2" + print "Initial population" + print pop - checkpoint = eoCheckPoint(eoGenContinue(50)) - select = eoSelectNumber(eoDetTournamentSelect(3), 10) - replace = eoGenerationalReplacement() - - algo = eoEasyEA(checkpoint, evaluate, select, transform, replace) - algo(pop) + checkpoint = eoCheckPoint(eoGenContinue(50)) + select = eoSelectNumber(eoDetTournamentSelect(3), 10) + replace = eoGenerationalReplacement() - print "Evoluated pop:" - print pop + algo = eoEasyEA(checkpoint, evaluate, select, transform, replace) + algo(pop) + + print "Evoluated pop:" + print pop if __name__ == "__main__": - try: - test1(pop, transform) - except: - import sys - print - print "Caught an exception:" - print sys.exc_type, sys.exc_value - print + try: + test1(pop, transform) + except: + import sys + print + print "Caught an exception:" + print sys.exc_type, sys.exc_value + print - try: - test2(pop, transform) - except: - import sys - print - print "Caught an exception:" - print sys.exc_type, sys.exc_value - print + try: + test2(pop, transform) + except: + import sys + print + print "Caught an exception:" + print sys.exc_type, sys.exc_value + print diff --git a/eo/src/pyeo/valueParam.cpp b/eo/src/pyeo/valueParam.cpp index 606251802..59ed1a472 100644 --- a/eo/src/pyeo/valueParam.cpp +++ b/eo/src/pyeo/valueParam.cpp @@ -1,6 +1,6 @@ /* PyEO - + Copyright (C) 2003 Maarten Keijzer This program is free software; you can redistribute it and/or modify @@ -33,13 +33,12 @@ public: PyObject* self; ParamWrapper(PyObject* p) : self(p) {} ParamWrapper(PyObject* p, - std::string a, - std::string b, - std::string c, - char d, - bool e) : eoParam(a,b,c,d,e), self(p) {} + std::string a, + std::string b, + std::string c, + char d, + bool e) : eoParam(a,b,c,d,e), self(p) {} - std::string getValue() const { return call_method(self, "getValueAsString"); @@ -49,7 +48,6 @@ public: { call_method(self, "setValueAsString", s); } - }; template @@ -63,7 +61,7 @@ struct ValueParam_pickle_suite : boost::python::pickle_suite str def(_param.defValue()); str l(_param.longName()); object s(_param.shortName()); - object r(_param.required()); + object r(_param.required()); return make_tuple(v,d,def,l,s,r); } static @@ -90,31 +88,31 @@ void setv(eoValueParam& v, U val) { v.value() = val; } template <> numeric::array getv< std::vector, numeric::array > - (const eoValueParam< std::vector >& param) +(const eoValueParam< std::vector >& param) { const std::vector& v = param.value(); list result; for (unsigned i =0; i < v.size(); ++i) result.append(v[i]); - + return numeric::array(result); } template <> void setv< std::vector, numeric::array > - (eoValueParam< std::vector >& param, numeric::array val) +(eoValueParam< std::vector >& param, numeric::array val) { std::vector& v = param.value(); v.resize( boost::python::len(val) ); for (unsigned i = 0; i < v.size(); ++i) - { - extract x(val[i]); - if (!x.check()) - throw std::runtime_error("double expected"); - - v[i] = x(); - } + { + extract x(val[i]); + if (!x.check()) + throw std::runtime_error("double expected"); + + v[i] = x(); + } } template <> @@ -126,7 +124,7 @@ tuple getv, tuple > template <> void setv< std::pair, tuple > - (eoValueParam< std::pair >& p, tuple val) +(eoValueParam< std::pair >& p, tuple val) { extract first(val[0]); extract second(val[1]); @@ -145,7 +143,7 @@ void define_valueParam(std::string prefix) { std::string name = "eoValueParam"; name += prefix; - + class_, bases >(name.c_str(), init<>()) .def(init()) .def(init()) @@ -173,7 +171,7 @@ void valueParam() .def("shortName", &eoParam::shortName) .def("required", &eoParam::required) ; - + define_valueParam("Int"); define_valueParam("Float"); define_valueParam, numeric::array >("Vec"); @@ -191,4 +189,3 @@ void valueParam() .add_property("object", &ValueParam::getObj, &ValueParam::setObj) ; } - diff --git a/eo/src/pyeo/valueParam.h b/eo/src/pyeo/valueParam.h index 783f2fc13..940a43518 100644 --- a/eo/src/pyeo/valueParam.h +++ b/eo/src/pyeo/valueParam.h @@ -7,23 +7,22 @@ class ValueParam : public eoParam // ValueParam containing python object { boost::python::object obj; - - public: - - ValueParam() : eoParam(), obj() {} - - ValueParam(boost::python::object o, - std::string longName, - std::string d = "No Description", - char s = 0, - bool r = false) : eoParam(longName, "", d, s, r) - { - std::cerr << "HI" << std::endl; - obj = o; - eoParam::defValue(getValue()); - } - +public: + + ValueParam() : eoParam(), obj() {} + + ValueParam(boost::python::object o, + std::string longName, + std::string d = "No Description", + char s = 0, + bool r = false) : eoParam(longName, "", d, s, r) + { + std::cerr << "HI" << std::endl; + obj = o; + eoParam::defValue(getValue()); + } + std::string getValue() const { boost::python::str s = boost::python::str(obj); @@ -37,7 +36,6 @@ class ValueParam : public eoParam // ValueParam containing python object boost::python::object getObj() const { return obj;} void setObj(boost::python::object o) { obj = o; } - }; #endif diff --git a/eo/src/utils/ChangeLog b/eo/src/utils/ChangeLog index a661c0cf9..dac74c49c 100644 --- a/eo/src/utils/ChangeLog +++ b/eo/src/utils/ChangeLog @@ -1,42 +1,42 @@ 2007-08-22 Jochen Küpper - * eoRNG.h (eoRng::random): Add comment on truncation as standard way of - floating point to integer conversion. + * eoRNG.h (eoRng::random): Add comment on truncation as standard way of + floating point to integer conversion. 2006-12-04 Jochen Küpper - * eoRNG.h (eoRng::normal(stdev)): Revert erroneous change. + * eoRNG.h (eoRng::normal(stdev)): Revert erroneous change. 2006-12-02 Jochen Küpper - * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. + * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. - * eoRNG.h: Cleanup docs and document /all/ members. + * eoRNG.h: Cleanup docs and document /all/ members. - * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. 2006-12-01 Jochen Küpper - * eoRNG.cpp: Use C++ style cast. + * eoRNG.cpp: Use C++ style cast. - * Makefile.am: Add missing header for distribution. + * Makefile.am: Add missing header for distribution. 2006-11-30 Jochen Küpper - * eoRNG.h: Generally include + * eoRNG.h: Generally include 2006-11-16 Jochen Küpper - * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else - clause around ptParam (found or not). + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else + clause around ptParam (found or not). - * eoParam.h (eoValueParam::setValue): Document. - (eoValueParam >::setValue): Allow delimiters ',' and - ';'. A plain ' ' does not work, as it is not correctly read by - eoParser::readFrom. + * eoParam.h (eoValueParam::setValue): Document. + (eoValueParam >::setValue): Allow delimiters ',' and + ';'. A plain ' ' does not work, as it is not correctly read by + eoParser::readFrom. - * Local Variables: - * coding: iso-8859-1 - * mode: flyspell - * fill-column: 80 - * End: + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/eo/src/utils/compatibility.h b/eo/src/utils/compatibility.h index af20a7920..937ab8a03 100644 --- a/eo/src/utils/compatibility.h +++ b/eo/src/utils/compatibility.h @@ -2,12 +2,12 @@ ----------------------------------------------------------------------------- compatibility.h - File to store some compiler specific stuff in. Currently handles, or + File to store some compiler specific stuff in. Currently handles, or least tries to handle the min() max() problems when using MSVC (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -33,15 +33,15 @@ #ifdef __GNUC__ #if __GNUC__ < 3 - // check for stdlibc++v3 which does have ios_base - #ifndef _CPP_BITS_IOSBASE_H - typedef ios ios_base; // not currently defined in GCC - #endif + // check for stdlibc++v3 which does have ios_base + #ifndef _CPP_BITS_IOSBASE_H + typedef ios ios_base; // not currently defined in GCC + #endif #endif #endif #if defined(_MSC_VER) && (_MSC_VER < 1300) -/* +/* Maarten: added this code here because Mirkosoft has the nasty habit of #define min and max in stdlib.h (and windows.h) I'm trying to undo this horrible macro magic (microsoft yet macrohard) @@ -67,7 +67,7 @@ namespace std // else return b; } - + template const T& max(const T& a, const T& b) { if(a > b) @@ -79,4 +79,4 @@ namespace std #endif // _MSC_VER -#endif +#endif diff --git a/eo/src/utils/eoCheckPoint.h b/eo/src/utils/eoCheckPoint.h index d6df8b781..ea562e8bf 100644 --- a/eo/src/utils/eoCheckPoint.h +++ b/eo/src/utils/eoCheckPoint.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoCheckPoint.h // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -52,12 +52,12 @@ */ /** eoCheckPoint is a container class. - It contains std::vectors of (pointers to) + It contains std::vectors of (pointers to) eoContinue (modif. MS July 16. 2002) eoStats, eoUpdater and eoMonitor - it is an eoContinue, so its operator() will be called every generation - + it is an eoContinue, so its operator() will be called every generation - and will return the contained-combined-eoContinue result - but before that it will call in turn every single + but before that it will call in turn every single {statistics, updaters, monitors} that it has been given, and after that, if stopping, all lastCall methods of the above. */ @@ -66,7 +66,7 @@ class eoCheckPoint : public eoContinue { public : - eoCheckPoint(eoContinue& _cont) + eoCheckPoint(eoContinue& _cont) { continuators.push_back(&_cont); } @@ -118,31 +118,31 @@ bool eoCheckPoint::operator()(const eoPop& _pop) bool bContinue = true; for (i = 0; i < continuators.size(); ++i) - if ( !(*continuators[i])(_pop) ) - bContinue = false; + if ( !(*continuators[i])(_pop) ) + bContinue = false; - if (! bContinue) // we're going to stop: lastCall, gentlemen + if (! bContinue) // we're going to stop: lastCall, gentlemen { - if (!sorted.empty()) - { - for (i = 0; i < sorted.size(); ++i) - { - sorted[i]->lastCall(sorted_pop); - } - } - for (i = 0; i < stats.size(); ++i) - stats[i]->lastCall(_pop); + if (!sorted.empty()) + { + for (i = 0; i < sorted.size(); ++i) + { + sorted[i]->lastCall(sorted_pop); + } + } + for (i = 0; i < stats.size(); ++i) + stats[i]->lastCall(_pop); - for (i = 0; i < updaters.size(); ++i) - updaters[i]->lastCall(); + for (i = 0; i < updaters.size(); ++i) + updaters[i]->lastCall(); - for (i = 0; i < monitors.size(); ++i) - monitors[i]->lastCall(); + for (i = 0; i < monitors.size(); ++i) + monitors[i]->lastCall(); } return bContinue; } -/** returns a string with all className() +/** returns a string with all className() * of data separated with "\n" (for debugging) */ template diff --git a/eo/src/utils/eoData.h b/eo/src/utils/eoData.h index ea70cabec..876b00955 100644 --- a/eo/src/utils/eoData.h +++ b/eo/src/utils/eoData.h @@ -45,4 +45,3 @@ #define eo_is_an_integer false #endif - diff --git a/eo/src/utils/eoDistance.h b/eo/src/utils/eoDistance.h index 1a7c9edd6..b26f249d6 100644 --- a/eo/src/utils/eoDistance.h +++ b/eo/src/utils/eoDistance.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoDistance.h // (c) GeNeura Team, 1998, Marc Schoenauer 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -28,11 +28,11 @@ #include -/** @addtogroup Stats +/** @addtogroup Stats * @{ * */ -/** +/** This is a generic class for distance functors: takes 2 things and returns a double */ @@ -41,8 +41,8 @@ class eoDistance : public eoBF {}; -/** - This is a generic class for Euclidain distance (L2 norm) computation: +/** + This is a generic class for Euclidain distance (L2 norm) computation: assumes the 2 things are std::vectors of something that is double-castable */ template< class EOT > @@ -54,16 +54,16 @@ public: double sum=0.0; for (unsigned i=0; i<_v1.size(); i++) { - double r = static_cast (_v1[i]) - static_cast (_v2[i]); - sum += r*r; + double r = static_cast (_v1[i]) - static_cast (_v2[i]); + sum += r*r; } return sqrt(sum); } }; -/** - This is a generic class for L1 distance computation: - assumes the 2 things are std::vectors of something +/** + This is a generic class for L1 distance computation: + assumes the 2 things are std::vectors of something that is double-castable For bitstrings, this is the Hamming distance */ @@ -76,15 +76,15 @@ public: double sum=0.0; for (unsigned i=0; i<_v1.size(); i++) { - double r = static_cast (_v1[i]) - static_cast (_v2[i]); - sum += fabs(r); + double r = static_cast (_v1[i]) - static_cast (_v2[i]); + sum += fabs(r); } return sum; } }; -/* this distance measures the difference in fitness - * I am not sure it can be of any use, though ... +/* this distance measures the difference in fitness + * I am not sure it can be of any use, though ... * except for some testing */ template< class EOT > @@ -100,5 +100,5 @@ public: /** @} */ - + #endif diff --git a/eo/src/utils/eoFDCStat.h b/eo/src/utils/eoFDCStat.h index a604533f9..1d2050b78 100644 --- a/eo/src/utils/eoFDCStat.h +++ b/eo/src/utils/eoFDCStat.h @@ -33,7 +33,7 @@ /** The Fitness Distance Correlation computation. - + Stores the values into eoValueParam so they can be snapshot by some eoGnuplotSnapshot ... @@ -53,7 +53,7 @@ public: /** Ctor with the optimum */ eoFDCStat(eoDistance & _dist, EOT & _theBest, - std::string _description = "FDC") : + std::string _description = "FDC") : eoStat(0, _description), dist(_dist), theBest(_theBest), boolOpt(true) {} @@ -63,30 +63,30 @@ public: virtual void operator()(const eoPop& _pop) { unsigned i; - if (!boolOpt) // take the local best - theBest = _pop.best_element(); + if (!boolOpt) // take the local best + theBest = _pop.best_element(); unsigned int pSize = _pop.size(); distToBest.value().resize(pSize); fitnesses.value().resize(pSize); double sumFit = 0.0, sumDist = 0.0; for (i=0; i & dist; EOT theBest; - bool boolOpt; // whether the best is known or not + bool boolOpt; // whether the best is known or not eoValueParam > distToBest; eoValueParam > fitnesses; }; @@ -119,12 +119,12 @@ class eoFDCFileSnapshot : public eoFileSnapshot // is an eoMonitor public: /** Ctor: in addition to the parameters of the ctor of an eoFileSnapshot we need here an eoFDCStat. The 2 std::vectors (distances to optimum - and fitnesses) are added to the monitor so they can be processed + and fitnesses) are added to the monitor so they can be processed later to a file - and eventually by gnuplot */ eoFDCFileSnapshot(eoFDCStat & _FDCstat, - std::string _dirname = "tmpFDC", unsigned _frequency = 1, - std::string _filename = "FDC", std::string _delim = " "): + std::string _dirname = "tmpFDC", unsigned _frequency = 1, + std::string _filename = "FDC", std::string _delim = " "): eoFileSnapshot(_dirname, _frequency, _filename, _delim), FDCstat(_FDCstat) { @@ -142,4 +142,3 @@ private: }; #endif - diff --git a/eo/src/utils/eoFeasibleRatioStat.h b/eo/src/utils/eoFeasibleRatioStat.h index 8d669dbec..cbbe17386 100644 --- a/eo/src/utils/eoFeasibleRatioStat.h +++ b/eo/src/utils/eoFeasibleRatioStat.h @@ -1,11 +1,10 @@ - /* (c) 2010 Thales group This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; version 2 + License as published by the Free Software Foundation; version 2 of the License. This library is distributed in the hope that it will be useful, @@ -46,11 +45,11 @@ public: eoFeasibleRatioStat( std::string description = "FeasibleRatio" ) : eoStat( 0.0, description ) {} - virtual void operator()( const eoPop & pop ) + virtual void operator()( const eoPop & pop ) { #ifndef NDEBUG assert( pop.size() > 0 ); - + double count = static_cast( std::count_if( pop.begin(), pop.end(), eoIsFeasible ) ); double size = static_cast( pop.size() ); double ratio = count/size; @@ -60,9 +59,8 @@ public: value() = static_cast( std::count_if( pop.begin(), pop.end(), eoIsFeasible ) ) / static_cast( pop.size() ); #endif } - + virtual std::string className(void) const { return "eoFeasibleRatioStat"; } }; #endif // _eoFeasibleRatioStat_h_ - diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index cd5cbab65..3cc96deb1 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -1,7 +1,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #include #include @@ -32,21 +32,21 @@ void eoFileMonitor::printHeader(std::ostream& os) void eoFileMonitor::printHeader() { // create file - ofstream os(filename.c_str()); + ofstream os(filename.c_str()); if (!os) { string str = "eoFileMonitor could not open: " + filename; throw runtime_error(str); } - + printHeader(os); } eoMonitor& eoFileMonitor::operator()(void) { - ofstream os(filename.c_str(), - overwrite ? + ofstream os(filename.c_str(), + overwrite ? ios_base::out|ios_base::trunc // truncate : ios_base::out|ios_base::app // append @@ -58,7 +58,7 @@ eoMonitor& eoFileMonitor::operator()(void) throw runtime_error(str); } - if ( + if ( header // we want to write headers && firstcall // we do not want to write headers twice && !keep // if we append to an existing file, headers are useless @@ -67,17 +67,17 @@ eoMonitor& eoFileMonitor::operator()(void) printHeader(); firstcall = false; } - + return operator()(os); } eoMonitor& eoFileMonitor::operator()(std::ostream& os) { - + iterator it = vec.begin(); - + os << (*it)->getValue(); - + for(++it; it != vec.end(); ++it) { os << delim.c_str() << (*it)->getValue(); @@ -87,4 +87,3 @@ eoMonitor& eoFileMonitor::operator()(std::ostream& os) return *this; } - diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index b89fd1e6d..9438d25c3 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -58,16 +58,16 @@ public : * @param _overwrite if true, overwrite the existing file */ eoFileMonitor( - std::string _filename, - std::string _delim = " ", - bool _keep_existing = false, + std::string _filename, + std::string _delim = " ", + bool _keep_existing = false, bool _header = false, bool _overwrite = false ) - : filename(_filename), - delim(_delim), - keep(_keep_existing), - header(_header), + : filename(_filename), + delim(_delim), + keep(_keep_existing), + header(_header), firstcall(true), overwrite(_overwrite) { @@ -84,7 +84,7 @@ public : //! Called first, try to open the file in append mode and write the header if asked virtual eoMonitor& operator()(void); - /*! Main call, normally called at each generation. + /*! Main call, normally called at each generation. Write the content of the registered vector into the file, each item being separated by delim */ virtual eoMonitor& operator()(std::ostream& os); @@ -104,13 +104,13 @@ private : //! delimiter to use between each write std::string delim; - + //! should we append or create a new file - bool keep; - + bool keep; + //! printing header at begin of file? bool header; - + //! flag to avoid calling twice operator()(void) bool firstcall; diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index b5d5142b7..cdd2e36cc 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -58,7 +58,7 @@ public : typedef eoValueParam > vDoubleParam; eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, std::string _filename = "gen", - std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true): + std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true): dirname(_dirname), frequency(_frequency), filename(_filename), delim(_delim), counter(_counter), boolChanged(true) { @@ -71,11 +71,11 @@ public : // now make sure there is a dir without any genXXX file in it if (res) // no dir present { - s = std::string("mkdir ")+dirname; + s = std::string("mkdir ")+dirname; } else if (!res && _rmFiles) { - s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; + s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; } else s = " "; @@ -111,9 +111,9 @@ public : { if (counter % frequency) { - boolChanged = false; // subclass with gnuplot will do nothing - counter++; - return (*this); + boolChanged = false; // subclass with gnuplot will do nothing + counter++; + return (*this); } counter++; boolChanged = true; @@ -137,35 +137,35 @@ public : static_cast >* >(vec[0]); const std::vector v = ptParam->value(); - if (vec.size() == 1) // only one std::vector: -> add number in front + if (vec.size() == 1) // only one std::vector: -> add number in front { - for (unsigned k=0; k > vv(vec.size()); - vv[0]=v; - for (unsigned i=1; i >* >(vec[1]); - vv[i] = ptParam->value(); - if (vv[i].size() != v.size()) - throw std::runtime_error("Dimension error in eoSnapshotMonitor"); - } - for (unsigned k=0; k > vv(vec.size()); + vv[0]=v; + for (unsigned i=1; i >* >(vec[1]); + vv[i] = ptParam->value(); + if (vv[i].size() != v.size()) + throw std::runtime_error("Dimension error in eoSnapshotMonitor"); + } + for (unsigned k=0; k(T(), _description), func(f) {} - + using eoStat::value; - + void operator()(const eoPop& pop) { value() = func(pop); } @@ -32,7 +31,7 @@ private: func_t func; }; -/** +/** * @ingroup Stats */ template @@ -43,4 +42,3 @@ eoFuncPtrStat& makeFuncPtrStat( T (*func)(const eoPop&), eoFunctorS } #endif - diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index 05015b642..38c5af745 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -64,8 +64,8 @@ class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot // Ctor eoGnuplot1DSnapshot(std::string _dirname, eoRealVectorBounds & _bounds, - unsigned _frequency = 1, std::string _filename = "gen", - std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true ) : + unsigned _frequency = 1, std::string _filename = "gen", + std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true ) : eoFileSnapshot(_dirname, _frequency, _filename, _delim, _counter, _rmFiles), eoGnuplot(_filename,"set data style points"), pointSize(5) diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 2f02216ed..1105f3b73 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -123,7 +123,7 @@ public: if (count == 0) { unsigned int res = static_cast( std::ceil( rate * _size ) ); - + if( res == 0 ) { eo::log << eo::warnings << "Call to a eoHowMany instance returns 0 (rate=" << rate << ", size=" << _size << ")" << std::endl; } diff --git a/eo/src/utils/eoIntBounds.cpp b/eo/src/utils/eoIntBounds.cpp index 59350240b..11cd942d2 100644 --- a/eo/src/utils/eoIntBounds.cpp +++ b/eo/src/utils/eoIntBounds.cpp @@ -60,12 +60,12 @@ eoIntBounds* eoGeneralIntBounds::getBoundsFromString(std::string _value) std::string sMinBounds = sBounds.substr(0,posDelim); if ( (sMinBounds != std::string("-inf")) && - (sMinBounds != std::string("-infinity")) - ) - { - minBounded = true; - minBound = read_int(sMinBounds); - } + (sMinBounds != std::string("-infinity")) + ) + { + minBounded = true; + minBound = read_int(sMinBounds); + } // max bound size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); @@ -73,26 +73,26 @@ eoIntBounds* eoGeneralIntBounds::getBoundsFromString(std::string _value) std::string sMaxBounds = sBounds.substr(posEndDelim); if ( (sMaxBounds != std::string("+inf")) && - (sMaxBounds != std::string("+infinity")) - ) - { - maxBounded = true; - maxBound = read_int(sMaxBounds); - } + (sMaxBounds != std::string("+infinity")) + ) + { + maxBounded = true; + maxBound = read_int(sMaxBounds); + } // now create the embedded eoIntBounds object eoIntBounds * locBound; if (minBounded && maxBounded) - { - if (maxBound <= minBound) - throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); - locBound = new eoIntInterval(minBound, maxBound); - } + { + if (maxBound <= minBound) + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + locBound = new eoIntInterval(minBound, maxBound); + } else if (!minBounded && !maxBounded) // no bound at all - locBound = new eoIntNoBounds; + locBound = new eoIntNoBounds; else if (!minBounded && maxBounded) - locBound = new eoIntAboveBound(maxBound); + locBound = new eoIntAboveBound(maxBound); else if (minBounded && !maxBounded) - locBound = new eoIntBelowBound(minBound); + locBound = new eoIntBelowBound(minBound); return locBound; } diff --git a/eo/src/utils/eoIntBounds.h b/eo/src/utils/eoIntBounds.h index 807751da4..2127c92f7 100644 --- a/eo/src/utils/eoIntBounds.h +++ b/eo/src/utils/eoIntBounds.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoIntBounds.h // (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifndef _eoIntBounds_h #define _eoIntBounds_h -#include // std::exceptions! +#include // std::exceptions! #include /** @@ -42,24 +42,24 @@ Scalar type: Basic class is eoIntBounds, a pure virtual. The following pure virtual methods are to be used in mutations: -- void foldsInBounds(long int &) that folds any value that falls out of +- void foldsInBounds(long int &) that folds any value that falls out of the bounds back into the bounds, by bouncing on the limit (if any) -- bool isInBounds(long int) that simply says whether or not the argument +- bool isInBounds(long int) that simply says whether or not the argument is in the bounds - void truncate(long int &) that set the argument to the bound value it it exceeds it -So mutation can choose -- iterate trying until they fall in bounds, +So mutation can choose +- iterate trying until they fall in bounds, - only try once and "restd::pair" by using the foldsInBounds method - only try once and restd::pair using the truncate method (will create a huge bias toward the bound if the soluiton is not far from the bounds) -There is also a uniform() method that generates a uniform value +There is also a uniform() method that generates a uniform value (if possible, i.e. if bounded) in the interval. -Derived class are -eoIntInterval that holds a minimum and maximum value, +Derived class are +eoIntInterval that holds a minimum and maximum value, eoIntNoBounds the "unbounded bounds" (-infinity, +infinity) eoIntBelowBound the half-bounded interval [min, +infinity) eoIntAboveBound the half-bounded interval (-infinity, max] @@ -68,7 +68,7 @@ THis file also contains the declaration of *the* global object that is the unbounded bound */ class eoIntBounds : public eoPersistent -{ +{ public: virtual ~eoIntBounds(){} @@ -97,7 +97,7 @@ public: */ virtual void foldsInBounds(double &) const = 0; - /** foldsInBounds for ints: + /** foldsInBounds for ints: * call the method for double and convert back */ virtual void foldsInBounds(long int & i) const { @@ -112,24 +112,24 @@ public: /** truncate for ints: call the method for double and convert back */ - virtual void truncate(long int & i) const + virtual void truncate(long int & i) const { double r = double(i); truncate(r); i = (long int)(r); } - /** get minimum value + /** get minimum value * std::exception if does not exist - */ + */ virtual long int minimum() const = 0 ; /** get maximum value * std::exception if does not exist - */ + */ virtual long int maximum() const = 0 ; /** get range * std::exception if unbounded - */ + */ virtual long int range() const = 0; /** random generator of uniform numbers in bounds @@ -165,11 +165,11 @@ public: { throw std::logic_error("Trying to get minimum of unbounded eoIntBounds"); } - virtual long int maximum() const + virtual long int maximum() const { throw std::logic_error("Trying to get maximum of unbounded eoIntBounds"); } - virtual long int range() const + virtual long int range() const { throw std::logic_error("Trying to get range of unbounded eoIntBounds"); } @@ -212,7 +212,7 @@ public: } /** for memory managements - ugly */ - virtual eoIntBounds * dup() const + virtual eoIntBounds * dup() const { return new eoIntNoBounds(*this); } @@ -236,18 +236,18 @@ class eoIntInterval : public eoIntBounds { public : virtual ~eoIntInterval(){} - - /** + + /** Simple bounds = minimum and maximum (allowed) */ - eoIntInterval(long int _min=0, long int _max=1) : - repMinimum(_min), repMaximum(_max), repRange(_max-_min) + eoIntInterval(long int _min=0, long int _max=1) : + repMinimum(_min), repMaximum(_max), repRange(_max-_min) { if (repRange<=0) throw std::logic_error("Void range in eoIntBounds"); } - // accessors + // accessors virtual long int minimum() const { return repMinimum; } virtual long int maximum() const { return repMaximum; } virtual long int range() const { return repRange; } @@ -258,18 +258,18 @@ public : virtual bool isMinBounded(void) const {return true;} virtual bool isMaxBounded(void) const {return true;} - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { return repMinimum + _rng.uniform(repRange); - } + } - virtual long int random(eoRng & _rng = eo::rng) const + virtual long int random(eoRng & _rng = eo::rng) const { return repMinimum + _rng.random(repRange); - } + } // says if a given double is within the bounds - virtual bool isInBounds(double _r) const + virtual bool isInBounds(double _r) const { if (_r < repMinimum) return false; @@ -279,36 +279,36 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) const + virtual void foldsInBounds(double & _r) const { long iloc; double dlargloc = 2 * range() ; if (fabs(_r) > 1.0E9) // iloc too large! { - _r = uniform(); - return; + _r = uniform(); + return; } if ( (_r > maximum()) ) { - iloc = (long) ( (_r-minimum()) / dlargloc ) ; - _r -= dlargloc * iloc ; - if ( _r > maximum() ) - _r = 2*maximum() - _r ; + iloc = (long) ( (_r-minimum()) / dlargloc ) ; + _r -= dlargloc * iloc ; + if ( _r > maximum() ) + _r = 2*maximum() - _r ; } - - if (_r < minimum()) + + if (_r < minimum()) { - iloc = (long) ( (maximum()-_r) / dlargloc ) ; - _r += dlargloc * iloc ; - if (_r < minimum()) - _r = 2*minimum() - _r ; + iloc = (long) ( (maximum()-_r) / dlargloc ) ; + _r += dlargloc * iloc ; + if (_r < minimum()) + _r = 2*minimum() - _r ; } - } + } // truncates to the bounds - virtual void truncate(double & _r) const + virtual void truncate(double & _r) const { if (_r < repMinimum) _r = repMinimum; @@ -341,7 +341,7 @@ public : } /** for memory managements - ugly */ - virtual eoIntBounds * dup() const + virtual eoIntBounds * dup() const { return new eoIntInterval(*this); } @@ -349,7 +349,7 @@ public : private : long int repMinimum; long int repMaximum; - long int repRange; // to minimize operations ??? + long int repRange; // to minimize operations ??? }; /** @@ -361,22 +361,22 @@ private : class eoIntBelowBound : public eoIntBounds { public : - virtual ~eoIntBelowBound(){} - /** + virtual ~eoIntBelowBound(){} + /** Simple bounds = minimum */ - eoIntBelowBound(long int _min=0) : + eoIntBelowBound(long int _min=0) : repMinimum(_min) {} - // accessors + // accessors virtual long int minimum() const { return repMinimum; } - virtual long int maximum() const + virtual long int maximum() const { throw std::logic_error("Trying to get maximum of eoIntBelowBound"); } - virtual long int range() const + virtual long int range() const { throw std::logic_error("Trying to get range of eoIntBelowBound"); } @@ -402,7 +402,7 @@ public : virtual bool isMaxBounded(void) const {return false;} // says if a given double is within the bounds - virtual bool isInBounds(double _r) const + virtual bool isInBounds(double _r) const { if (_r < repMinimum) return false; @@ -410,16 +410,16 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) const + virtual void foldsInBounds(double & _r) const { // easy as a pie: symmetry w.r.t. minimum - if (_r < repMinimum) // nothing to do otherwise + if (_r < repMinimum) // nothing to do otherwise _r = 2*repMinimum - _r; return ; - } + } // truncates to the bounds - virtual void truncate(double & _r) const + virtual void truncate(double & _r) const { if (_r < repMinimum) _r = repMinimum; @@ -450,7 +450,7 @@ public : } /** for memory managements - ugly */ - virtual eoIntBounds * dup() const + virtual eoIntBounds * dup() const { return new eoIntBelowBound(*this); } @@ -469,22 +469,22 @@ class eoIntAboveBound : public eoIntBounds { public : virtual ~eoIntAboveBound(){} - - /** + + /** Simple bounds = minimum */ - eoIntAboveBound(long int _max=0) : + eoIntAboveBound(long int _max=0) : repMaximum(_max) {} - // accessors + // accessors virtual long int maximum() const { return repMaximum; } - virtual long int minimum() const + virtual long int minimum() const { throw std::logic_error("Trying to get minimum of eoIntAboveBound"); } - virtual long int range() const + virtual long int range() const { throw std::logic_error("Trying to get range of eoIntAboveBound"); } @@ -510,7 +510,7 @@ public : virtual bool isMaxBounded(void) const {return true;} // says if a given double is within the bounds - virtual bool isInBounds(double _r) const + virtual bool isInBounds(double _r) const { if (_r > repMaximum) return false; @@ -518,16 +518,16 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) const + virtual void foldsInBounds(double & _r) const { // easy as a pie: symmetry w.r.t. maximum - if (_r > repMaximum) // nothing to do otherwise + if (_r > repMaximum) // nothing to do otherwise _r = 2*repMaximum - _r; return ; - } + } // truncates to the bounds - virtual void truncate(double & _r) const + virtual void truncate(double & _r) const { if (_r > repMaximum) _r = repMaximum; @@ -558,7 +558,7 @@ public : } /** for memory managements - ugly */ - virtual eoIntBounds * dup() const + virtual eoIntBounds * dup() const { return new eoIntAboveBound(*this); } @@ -598,13 +598,13 @@ public: if (maxBounded) maximum = bb.maximum(); if (minBounded && maxBounded) - repBound = new eoIntInterval(minimum, maximum); + repBound = new eoIntInterval(minimum, maximum); else if (!minBounded && !maxBounded) // no bound at all - repBound = new eoIntNoBounds; + repBound = new eoIntNoBounds; else if (!minBounded && maxBounded) - repBound = new eoIntAboveBound(maximum); + repBound = new eoIntAboveBound(maximum); else if (minBounded && !maxBounded) - repBound = new eoIntBelowBound(minimum); + repBound = new eoIntBelowBound(minimum); } eoGeneralIntBounds& operator=(const eoGeneralIntBounds& _b) @@ -624,13 +624,13 @@ public: delete repBound; // now reallocate if (minBounded && maxBounded) - repBound = new eoIntInterval(minimum, maximum); + repBound = new eoIntInterval(minimum, maximum); else if (!minBounded && !maxBounded) // no bound at all - repBound = new eoIntNoBounds; + repBound = new eoIntNoBounds; else if (!minBounded && maxBounded) - repBound = new eoIntAboveBound(maximum); + repBound = new eoIntAboveBound(maximum); else if (minBounded && !maxBounded) - repBound = new eoIntBelowBound(minimum); + repBound = new eoIntBelowBound(minimum); return (*this); } @@ -671,17 +671,17 @@ public: */ virtual void truncate(double & _x) const {return repBound->truncate(_x);} - /** get minimum value + /** get minimum value * std::exception if does not exist - */ + */ virtual long int minimum() const {return repBound->minimum();} /** get maximum value * std::exception if does not exist - */ + */ virtual long int maximum() const {return repBound->maximum();} /** get range * std::exception if unbounded - */ + */ virtual long int range() const {return repBound->range();} /** random generator of uniform doubles in bounds @@ -698,9 +698,9 @@ public: virtual eoIntBounds * dup() const {return repBound->dup();} /** for efficiency, it's better to use the embedded boud directly */ - const eoIntBounds & theBounds() const { return *repBound;} + const eoIntBounds & theBounds() const { return *repBound;} - /** don't forget the printOn method - + /** don't forget the printOn method - * again that of the embedded bound */ virtual void printOn(std::ostream& _os) const @@ -709,7 +709,7 @@ public: } /** no readFrom ??? Have to check that later */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { std::string s; _is >> s; diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index ff6f84070..b3002f46a 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/* - +/* + (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ Contact: http://eodev.sourceforge.net -Authors: +Authors: Johann DrĂ©o Caner Candan @@ -87,10 +87,10 @@ void eoLogger::printLevels() const std::cout << "Available verbose levels:" << std::endl; for (std::vector::const_iterator it = _sortedLevels.begin(), end = _sortedLevels.end(); - it != end; ++it) - { - std::cout << "\t" << *it << std::endl; - } + it != end; ++it) + { + std::cout << "\t" << *it << std::endl; + } ::exit(0); } @@ -116,15 +116,15 @@ eoLogger& operator<<(eoLogger& l, eo::setlevel v) eoLogger& operator<<(eoLogger& l, std::ostream& os) { if (l._standard_io_streams.find(&os) != l._standard_io_streams.end()) - { - l._fd = l._standard_io_streams[&os]; - } + { + l._fd = l._standard_io_streams[&os]; + } return l; } eoLogger::outbuf::outbuf(const int& fd, - const eo::Levels& contexlvl, - const eo::Levels& selectedlvl) + const eo::Levels& contexlvl, + const eo::Levels& selectedlvl) : _fd(fd), _contextLevel(contexlvl), _selectedLevel(selectedlvl) {} @@ -132,11 +132,11 @@ int eoLogger::outbuf::overflow(int_type c) { if (_selectedLevel >= _contextLevel) { - if (_fd >= 0 && c != EOF) - { - ssize_t num; - num = ::write(_fd, &c, 1); - } + if (_fd >= 0 && c != EOF) + { + ssize_t num; + num = ::write(_fd, &c, 1); + } } return c; } @@ -144,14 +144,14 @@ int eoLogger::outbuf::overflow(int_type c) namespace eo { file::file(const std::string f) - : _f(f) + : _f(f) {} setlevel::setlevel(const std::string v) - : _v(v), _lvl((Levels)-1) + : _v(v), _lvl((Levels)-1) {} setlevel::setlevel(const Levels lvl) - : _v(std::string("")), _lvl(lvl) + : _v(std::string("")), _lvl(lvl) {} } diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index c5ca7e3d1..11b0cbeef 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -1,6 +1,6 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/* +/* (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -19,7 +19,7 @@ Contact: http://eodev.sourceforge.net -Authors: +Authors: Johann DrĂ©o Caner Candan @@ -106,12 +106,12 @@ namespace eo * /!\ If you want to add a level dont forget to add it at the implementation of the class eoLogger in the ctor */ enum Levels {quiet = 0, - errors, - warnings, - progress, - logging, - debug, - xdebug}; + errors, + warnings, + progress, + logging, + debug, + xdebug}; /** * file @@ -119,8 +119,8 @@ namespace eo */ struct file { - file(const std::string f); - const std::string _f; + file(const std::string f); + const std::string _f; }; /** @@ -129,10 +129,10 @@ namespace eo */ struct setlevel { - setlevel(const std::string v); - setlevel(const Levels lvl); - const std::string _v; - const Levels _lvl; + setlevel(const std::string v); + setlevel(const Levels lvl); + const std::string _v; + const Levels _lvl; }; } @@ -142,7 +142,7 @@ namespace eo * Use of a global variable eo::log to easily use the logger like std::cout */ class eoLogger : public eoObject, - public std::ostream + public std::ostream { public: eoLogger(); @@ -159,7 +159,7 @@ public: * if( eo::log.getLevelSelected() >= eo::progress ) {...} */ eo::Levels getLevelSelected() const { return _selectedLevel; } - + /*! Returns the current level of the context * the one given when you output message with the logger */ @@ -176,15 +176,15 @@ private: class outbuf : public std::streambuf { public: - outbuf(const int& fd, - const eo::Levels& contexlvl, - const eo::Levels& selectedlvl); + outbuf(const int& fd, + const eo::Levels& contexlvl, + const eo::Levels& selectedlvl); protected: - virtual int overflow(int_type c); + virtual int overflow(int_type c); private: - const int& _fd; - const eo::Levels& _contextLevel; - const eo::Levels& _selectedLevel; + const int& _fd; + const eo::Levels& _contextLevel; + const eo::Levels& _selectedLevel; }; private: diff --git a/eo/src/utils/eoMOFitnessStat.h b/eo/src/utils/eoMOFitnessStat.h index 641021399..8e1b2d3fd 100644 --- a/eo/src/utils/eoMOFitnessStat.h +++ b/eo/src/utils/eoMOFitnessStat.h @@ -85,7 +85,7 @@ public: } } private: - unsigned int objective; // The objective we're storing + unsigned int objective; // The objective we're storing }; #endif diff --git a/eo/src/utils/eoMonitor.h b/eo/src/utils/eoMonitor.h index e02900f21..1c92e9c00 100644 --- a/eo/src/utils/eoMonitor.h +++ b/eo/src/utils/eoMonitor.h @@ -1,7 +1,7 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -31,7 +31,7 @@ /** @defgroup Monitors Monitoring * - * Monitors take a set of value parameters (eoValueParam) objects and + * Monitors take a set of value parameters (eoValueParam) objects and * output them on a given stream, file, pipe, etc. * * They can be called from within an eoCheckPoint, to print different values diff --git a/eo/src/utils/eoOStreamMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp index 3a29dd685..3365301e9 100644 --- a/eo/src/utils/eoOStreamMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -1,7 +1,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #include #include diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 7436f6ef8..b09a11b53 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -1,4 +1,3 @@ - /* (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 @@ -22,7 +21,7 @@ Authors: todos@geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk - Johann DrĂ©o + Johann DrĂ©o */ #ifndef _eoOStreamMonitor_h_ @@ -45,15 +44,15 @@ Authors: class eoOStreamMonitor : public eoMonitor { public : - eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) { - (void)_verbose; + (void)_verbose; eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; } - eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) {} eoMonitor& operator()(void); @@ -69,4 +68,3 @@ private : }; #endif // _eoOStreamMonitor_h_ - diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index e0ce63aab..d9d09c38b 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -45,11 +45,11 @@ eoParallel::~eoParallel() { #ifdef _OPENMP if ( doMeasure() ) - { - double _t_end = omp_get_wtime(); - eoLogger log; - log << eo::file("measure_" + prefix()) << _t_end - _t_start << std::endl; - } + { + double _t_end = omp_get_wtime(); + eoLogger log; + log << eo::file("measure_" + prefix()) << _t_end - _t_start << std::endl; + } #endif // !_OPENMP } @@ -63,20 +63,20 @@ std::string eoParallel::prefix() const std::string value( _prefix.value() ); if ( _isEnabled.value() ) - { - if ( _isDynamic.value() ) - { - value += "_dynamic.out"; - } - else - { - value += "_parallel.out"; - } - } + { + if ( _isDynamic.value() ) + { + value += "_dynamic.out"; + } + else + { + value += "_parallel.out"; + } + } else - { - value += "_sequential.out"; - } + { + value += "_sequential.out"; + } return value; } @@ -98,17 +98,17 @@ void make_parallel(eoParser& parser) #ifdef _OPENMP if ( eo::parallel.isEnabled() ) - { - if ( eo::parallel.nthreads() > 0 ) - { - omp_set_num_threads( eo::parallel.nthreads() ); - } - } + { + if ( eo::parallel.nthreads() > 0 ) + { + omp_set_num_threads( eo::parallel.nthreads() ); + } + } if ( eo::parallel.doMeasure() ) - { - eo::parallel._t_start = omp_get_wtime(); - } + { + eo::parallel._t_start = omp_get_wtime(); + } #endif // !_OPENMP } diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 868507cf7..948092c93 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -135,8 +135,8 @@ private: /** eoValueParam: templatized derivation of eoParam. Can be used to contain - any scalar value type. It makes use of std::strstream to get and set values. - + any scalar value type. It makes use of std::strstream to get and set values. + @todo This should be changed to std::stringstream when that class is available in g++. Note also that there is a template specialization for std::pair and @@ -186,7 +186,7 @@ public : /** Change the parameter value */ - void value( ValueType val ) + void value( ValueType val ) { // convert to string std::ostringstream os; @@ -431,7 +431,7 @@ public: // Here, we do have args _os << "("; - if (narg == 1) // 1 arg only + if (narg == 1) // 1 arg only { _os << second[0] << ")" ; return _os; @@ -453,9 +453,9 @@ public: void readFrom(std::string & _value) { - second.resize(0); // just in case + second.resize(0); // just in case size_t pos = _value.find('('); - if (pos >= _value.size()) // no arguments + if (pos >= _value.size()) // no arguments { first = _value; return; @@ -484,4 +484,3 @@ std::istream & operator>>(std::istream & _is, eoParamParamType & _rate); /** @} */ #endif - diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 23970023d..7150882a1 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -74,19 +74,19 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, unsigned i; for (i = 1; i < _argc; ++i) { - if(_argv[i][0] == '@') + if(_argv[i][0] == '@') { // read response file - char *pts = _argv[i]+1; // yes a char*, sorry :-) - ifstream ifs (pts); - ifs.peek(); // check if it exists - if (!ifs) + char *pts = _argv[i]+1; // yes a char*, sorry :-) + ifstream ifs (pts); + ifs.peek(); // check if it exists + if (!ifs) { - string msg = string("Could not open response file: ") + pts; - throw runtime_error(msg); + string msg = string("Could not open response file: ") + pts; + throw runtime_error(msg); } - // read - will be overwritten by command-line - readFrom(ifs); - break; // stop reading command line args for '@' + // read - will be overwritten by command-line + readFrom(ifs); + break; // stop reading command line args for '@' } } // now read arguments on command-line @@ -188,59 +188,59 @@ void eoParser::readFrom(istream& is) processing = (str.find(string("Parser"))= 3) value = string(str.begin() + 3, str.end()); - } + } else - { + { value = string(str.begin() + 2, str.end()); - } - } + } + } shortNameMap[str[1]] = value; - } - } - } + } + } + } } updateParameters(); @@ -268,8 +268,8 @@ void eoParser::printOn(ostream& os) const eoParam* param = p->second; - if (!isItThere(*param)) // comment out the ones not set by the user - os << "# "; + if (!isItThere(*param)) // comment out the ones not set by the user + os << "# "; string str = "--" + param->longName() + "=" + param->getValue(); @@ -329,12 +329,12 @@ void eoParser::printHelp(ostream& os) } if (p->second->shortName()) - os << "-" << p->second->shortName() << ", "; + os << "-" << p->second->shortName() << ", "; os << "--" <second->longName() <<":\t" - << p->second->description() ; + << p->second->description() ; - os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); + os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); os <<". By default: "<second->defValue() << '\n'; } // for p @@ -377,7 +377,7 @@ bool eoParser::userNeedsHelp(void) // search for unknown short names for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) - { + { char entry = sIt->first; MultiMapType::const_iterator it; @@ -403,7 +403,7 @@ bool eoParser::userNeedsHelp(void) string msg = "Use -h or --help to get help about available parameters"; messages.push_back( msg ); } - + } // if stopOnUnknownParam return needHelp.value() || !messages.empty(); @@ -421,4 +421,3 @@ istream & operator>>(istream & _is, eoParamParamType & _rate) _rate.readFrom(_is); return _is; } - diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index a96ec1be2..0088ff4f1 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -119,7 +119,7 @@ public: * @param _shortHand Single charachter shorthand for specifying the configuration file */ eoParser ( unsigned _argc, char **_argv , std::string _programDescription = "", - std::string _lFileParamName = "param-file", char _shortHand = 'p'); + std::string _lFileParamName = "param-file", char _shortHand = 'p'); /** Processes the parameter and puts it in the appropriate section for readability diff --git a/eo/src/utils/eoParserLogger.cpp b/eo/src/utils/eoParserLogger.cpp index 21b67f6c6..df70589ac 100644 --- a/eo/src/utils/eoParserLogger.cpp +++ b/eo/src/utils/eoParserLogger.cpp @@ -25,10 +25,10 @@ Caner Candan #include "eoParserLogger.h" eoParserLogger::eoParserLogger(unsigned _argc, char** _argv, - std::string _programDescription /*= ""*/ - , - std::string _lFileParamName /*= "param-file"*/, - char _shortHand /*= 'p'*/) + std::string _programDescription /*= ""*/ + , + std::string _lFileParamName /*= "param-file"*/, + char _shortHand /*= 'p'*/) : eoParser(_argc, _argv, _programDescription, _lFileParamName, _shortHand), _verbose("quiet", "verbose", "Set the verbose level", 'v'), _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), @@ -50,9 +50,9 @@ eoParserLogger::eoParserLogger(unsigned _argc, char** _argv, //------------------------------------------------------------------ if ( ! _output.value().empty() ) - { - eo::log << eo::file( _output.value() ); - } + { + eo::log << eo::file( _output.value() ); + } //------------------------------------------------------------------ @@ -62,9 +62,9 @@ eoParserLogger::eoParserLogger(unsigned _argc, char** _argv, //------------------------------------------------------------------ if ( _printVerboseLevels.value() ) - { - eo::log.printLevels(); - } + { + eo::log.printLevels(); + } //------------------------------------------------------------------ diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h index 20f67652b..48cb53ec5 100644 --- a/eo/src/utils/eoParserLogger.h +++ b/eo/src/utils/eoParserLogger.h @@ -17,8 +17,8 @@ Contact: http://eodev.sourceforge.net Authors: - Johann DrĂ©o - Caner Candan + Johann DrĂ©o + Caner Candan */ #ifndef EO_PARSER_LOGGER_H @@ -37,9 +37,9 @@ class eoParserLogger : public eoParser { public: eoParserLogger(unsigned _argc, char** _argv, - std::string _programDescription = "", - std::string _lFileParamName = "param-file", - char _shortHand = 'p'); + std::string _programDescription = "", + std::string _lFileParamName = "param-file", + char _shortHand = 'p'); ~eoParserLogger(); private: diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 86c5dc047..f3f091a6e 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -59,9 +59,9 @@ public: /** default Ctor, void std::string by default, as it appears on the description line once at beginning of evolution. and is meaningless there. _howMany defaults to 0, that is, the whole - population*/ + population*/ eoPopStat(unsigned _howMany = 0, std::string _desc ="") - : eoStat("", _desc), combien( _howMany) {} + : eoStat("", _desc), combien( _howMany) {} /** Fills the value() of the eoParam with the dump of the population. Adds a \n before so it does not get mixed up with the rest of the stats @@ -119,15 +119,15 @@ public: */ void operator()(const std::vector& _pop) { - value() = ""; // empty + value() = ""; // empty unsigned howMany=combien?combien:_pop.size(); for (unsigned i = 0; i < howMany; ++i) { - std::ostringstream os; - os << *_pop[i] << std::endl; + std::ostringstream os; + os << *_pop[i] << std::endl; - // paranoid: - value() += os.str(); + // paranoid: + value() += os.str(); } } private: diff --git a/eo/src/utils/eoRNG.cpp b/eo/src/utils/eoRNG.cpp index 79a53d302..b538499f1 100644 --- a/eo/src/utils/eoRNG.cpp +++ b/eo/src/utils/eoRNG.cpp @@ -16,4 +16,3 @@ namespace eo // global random number generator object eoRng rng(static_cast(time(0))); } - diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 3cad9fcce..9885eff58 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -25,7 +25,7 @@ Old contact information: todos@geneura.ugr.es, http://geneura.ugr.es #ifndef EO_RANDOM_NUMBER_GENERATOR #define EO_RANDOM_NUMBER_GENERATOR -/** @addtogroup Random +/** @addtogroup Random * @{ * */ diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index 1667f644f..89dcb3584 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -78,7 +78,7 @@ void eoRealVectorBounds::readFrom(std::string _value) if (ownedBounds.size()>0) for (unsigned i = 0; i < ownedBounds.size(); ++i) { - delete ownedBounds[i]; + delete ownedBounds[i]; } ownedBounds.resize(0); factor.resize(0); @@ -89,29 +89,29 @@ void eoRealVectorBounds::readFrom(std::string _value) while (_value.size()>0) { if (!remove_leading(_value, delim)) // only delimiters were left - break; + break; // look for opening char size_t posDeb = _value.find_first_of("[("); if (posDeb >= _value.size()) // nothing left to read (though probably a syntax error there) - { - break; - } + { + break; + } // ending char std::string closeChar = (_value[posDeb] == '(' ? std::string(")") : std::string("]") ); size_t posFin = _value.find_first_of(std::string(closeChar)); if (posFin >= _value.size()) - throw std::runtime_error("Syntax error when reading bounds"); + throw std::runtime_error("Syntax error when reading bounds"); // y a-t-il un nbre devant unsigned count = 1; if (posDeb > 0) // something before opening - { - std::string sCount = _value.substr(0, posDeb); - count = read_int(sCount); - if (count <= 0) - throw std::runtime_error("Syntax error when reading bounds"); - } + { + std::string sCount = _value.substr(0, posDeb); + count = read_int(sCount); + if (count <= 0) + throw std::runtime_error("Syntax error when reading bounds"); + } // the bounds std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); @@ -121,7 +121,7 @@ void eoRealVectorBounds::readFrom(std::string _value) remove_leading(sBounds, delim); size_t posDelim = sBounds.find_first_of(delim); if (posDelim >= sBounds.size()) - throw std::runtime_error("Syntax error when reading bounds"); + throw std::runtime_error("Syntax error when reading bounds"); bool minBounded=false, maxBounded=false; double minBound=0, maxBound=0; @@ -129,38 +129,38 @@ void eoRealVectorBounds::readFrom(std::string _value) // min bound std::string sMinBounds = sBounds.substr(0,posDelim); if (sMinBounds != std::string("-inf")) - { - minBounded = true; - minBound = read_double(sMinBounds); - } + { + minBounded = true; + minBound = read_double(sMinBounds); + } // max bound size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); std::string sMaxBounds = sBounds.substr(posEndDelim); if (sMaxBounds != std::string("+inf")) - { - maxBounded = true; - maxBound = read_double(sMaxBounds); - } + { + maxBounded = true; + maxBound = read_double(sMaxBounds); + } // now create the eoRealBounds objects eoRealBounds *ptBounds; if (minBounded && maxBounded) - ptBounds = new eoRealInterval(minBound, maxBound); + ptBounds = new eoRealInterval(minBound, maxBound); else if (!minBounded && !maxBounded) // no bound at all - ptBounds = new eoRealNoBounds; + ptBounds = new eoRealNoBounds; else if (!minBounded && maxBounded) - ptBounds = new eoRealAboveBound(maxBound); + ptBounds = new eoRealAboveBound(maxBound); else if (minBounded && !maxBounded) - ptBounds = new eoRealBelowBound(minBound); + ptBounds = new eoRealBelowBound(minBound); // store it for memory management ownedBounds.push_back(ptBounds); // push the count factor.push_back(count); // and add count of it to the actual bounds for (unsigned i=0; i 1 already!) factor[factor.size()-1] += missing; } @@ -221,12 +221,12 @@ eoRealBounds* eoGeneralRealBounds::getBoundsFromString(std::string _value) std::string sMinBounds = sBounds.substr(0,posDelim); if ( (sMinBounds != std::string("-inf")) && - (sMinBounds != std::string("-infinity")) - ) - { - minBounded = true; - minBound = read_double(sMinBounds); - } + (sMinBounds != std::string("-infinity")) + ) + { + minBounded = true; + minBound = read_double(sMinBounds); + } // max bound size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); @@ -234,26 +234,26 @@ eoRealBounds* eoGeneralRealBounds::getBoundsFromString(std::string _value) std::string sMaxBounds = sBounds.substr(posEndDelim); if ( (sMaxBounds != std::string("+inf")) && - (sMaxBounds != std::string("+infinity")) - ) - { - maxBounded = true; - maxBound = read_double(sMaxBounds); - } + (sMaxBounds != std::string("+infinity")) + ) + { + maxBounded = true; + maxBound = read_double(sMaxBounds); + } // now create the embedded eoRealBounds object eoRealBounds * locBound; if (minBounded && maxBounded) - { - if (maxBound <= minBound) - throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); - locBound = new eoRealInterval(minBound, maxBound); - } + { + if (maxBound <= minBound) + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + locBound = new eoRealInterval(minBound, maxBound); + } else if (!minBounded && !maxBounded) // no bound at all - locBound = new eoRealNoBounds; + locBound = new eoRealNoBounds; else if (!minBounded && maxBounded) - locBound = new eoRealAboveBound(maxBound); + locBound = new eoRealAboveBound(maxBound); else if (minBounded && !maxBounded) - locBound = new eoRealBelowBound(minBound); + locBound = new eoRealBelowBound(minBound); return locBound; } diff --git a/eo/src/utils/eoRealBounds.h b/eo/src/utils/eoRealBounds.h index f79aac044..47c061005 100644 --- a/eo/src/utils/eoRealBounds.h +++ b/eo/src/utils/eoRealBounds.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoRealBounds.h // (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,7 +27,7 @@ #ifndef _eoRealBounds_h #define _eoRealBounds_h -#include // std::exceptions! +#include // std::exceptions! #include /** @@ -55,24 +55,24 @@ Scalar type: Basic class is eoRealBounds, a pure virtual. The following pure virtual methods are to be used in mutations: -- void foldsInBounds(double &) that folds any value that falls out of +- void foldsInBounds(double &) that folds any value that falls out of the bounds back into the bounds, by bouncing on the limit (if any) -- bool isInBounds(double) that simply says whether or not the argument +- bool isInBounds(double) that simply says whether or not the argument is in the bounds - void truncate(double &) that set the argument to the bound value it it exceeds it -So mutation can choose -- iterate trying until they fall in bounds, +So mutation can choose +- iterate trying until they fall in bounds, - only try once and "restd::pair" by using the foldsInBounds method - only try once and restd::pair using the truncate method (will create a huge bias toward the bound if the soluiton is not far from the bounds) -There is also a uniform() method that generates a uniform value +There is also a uniform() method that generates a uniform value (if possible, i.e. if bounded) in the interval. -Derived class are -eoRealInterval that holds a minimum and maximum value, +Derived class are +eoRealInterval that holds a minimum and maximum value, eoRealNoBounds the "unbounded bounds" (-infinity, +infinity) eoRealBelowBound the half-bounded interval [min, +infinity) eoRealAboveBound the half-bounded interval (-infinity, max] @@ -83,7 +83,7 @@ is the unbounded bound @ingroup Bounds */ class eoRealBounds : public eoPersistent -{ +{ public: virtual ~eoRealBounds(){} @@ -116,17 +116,17 @@ public: */ virtual void truncate(double &) const = 0; - /** get minimum value + /** get minimum value * std::exception if does not exist - */ + */ virtual double minimum() const = 0 ; /** get maximum value * std::exception if does not exist - */ + */ virtual double maximum() const = 0 ; /** get range * std::exception if unbounded - */ + */ virtual double range() const = 0; /** random generator of uniform numbers in bounds @@ -159,16 +159,16 @@ public: { throw std::logic_error("Trying to get minimum of unbounded eoRealBounds"); } - virtual double maximum() const + virtual double maximum() const { throw std::logic_error("Trying to get maximum of unbounded eoRealBounds"); } - virtual double range() const + virtual double range() const { throw std::logic_error("Trying to get range of unbounded eoRealBounds"); } - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { (void)_rng; @@ -199,7 +199,7 @@ public: } /** for memory managements - ugly */ - virtual eoRealBounds * dup() const + virtual eoRealBounds * dup() const { return new eoRealNoBounds(*this); } @@ -220,18 +220,18 @@ class eoRealInterval : public eoRealBounds { public : virtual ~eoRealInterval(){} - - /** + + /** Simple bounds = minimum and maximum (allowed) */ - eoRealInterval(double _min=0, double _max=1) : - repMinimum(_min), repMaximum(_max), repRange(_max-_min) + eoRealInterval(double _min=0, double _max=1) : + repMinimum(_min), repMaximum(_max), repRange(_max-_min) { if (repRange<=0) throw std::logic_error("Void range in eoRealBounds"); } - // accessors + // accessors virtual double minimum() const { return repMinimum; } virtual double maximum() const { return repMaximum; } virtual double range() const { return repRange; } @@ -242,13 +242,13 @@ public : virtual bool isMinBounded(void) const {return true;} virtual bool isMaxBounded(void) const {return true;} - virtual double uniform(eoRng & _rng = eo::rng) const + virtual double uniform(eoRng & _rng = eo::rng) const { return repMinimum + _rng.uniform(repRange); - } + } // says if a given double is within the bounds - virtual bool isInBounds(double _r) const + virtual bool isInBounds(double _r) const { if (_r < repMinimum) return false; @@ -258,36 +258,36 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) const + virtual void foldsInBounds(double & _r) const { long iloc; double dlargloc = 2 * range() ; if (fabs(_r) > 1.0E9) // iloc too large! { - _r = uniform(); - return; + _r = uniform(); + return; } if ( (_r > maximum()) ) { - iloc = (long) ( (_r-minimum()) / dlargloc ) ; - _r -= dlargloc * iloc ; - if ( _r > maximum() ) - _r = 2*maximum() - _r ; + iloc = (long) ( (_r-minimum()) / dlargloc ) ; + _r -= dlargloc * iloc ; + if ( _r > maximum() ) + _r = 2*maximum() - _r ; } - - if (_r < minimum()) + + if (_r < minimum()) { - iloc = (long) ( (maximum()-_r) / dlargloc ) ; - _r += dlargloc * iloc ; - if (_r < minimum()) - _r = 2*minimum() - _r ; + iloc = (long) ( (maximum()-_r) / dlargloc ) ; + _r += dlargloc * iloc ; + if (_r < minimum()) + _r = 2*minimum() - _r ; } - } + } // truncates to the bounds - virtual void truncate(double & _r) const + virtual void truncate(double & _r) const { if (_r < repMinimum) _r = repMinimum; @@ -320,7 +320,7 @@ public : } /** for memory managements - ugly */ - virtual eoRealBounds * dup() const + virtual eoRealBounds * dup() const { return new eoRealInterval(*this); } @@ -328,7 +328,7 @@ public : private : double repMinimum; double repMaximum; - double repRange; // to minimize operations ??? + double repRange; // to minimize operations ??? }; /** @@ -339,22 +339,22 @@ private : class eoRealBelowBound : public eoRealBounds { public : - virtual ~eoRealBelowBound(){} - /** + virtual ~eoRealBelowBound(){} + /** Simple bounds = minimum */ - eoRealBelowBound(double _min=0) : + eoRealBelowBound(double _min=0) : repMinimum(_min) {} - // accessors + // accessors virtual double minimum() const { return repMinimum; } - virtual double maximum() const + virtual double maximum() const { throw std::logic_error("Trying to get maximum of eoRealBelowBound"); } - virtual double range() const + virtual double range() const { throw std::logic_error("Trying to get range of eoRealBelowBound"); } @@ -374,7 +374,7 @@ public : virtual bool isMaxBounded(void) const {return false;} // says if a given double is within the bounds - virtual bool isInBounds(double _r) const + virtual bool isInBounds(double _r) const { if (_r < repMinimum) return false; @@ -382,16 +382,16 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) const + virtual void foldsInBounds(double & _r) const { // easy as a pie: symmetry w.r.t. minimum - if (_r < repMinimum) // nothing to do otherwise + if (_r < repMinimum) // nothing to do otherwise _r = 2*repMinimum - _r; return ; - } + } // truncates to the bounds - virtual void truncate(double & _r) const + virtual void truncate(double & _r) const { if (_r < repMinimum) _r = repMinimum; @@ -405,7 +405,7 @@ public : * but reading should not be done here, because of bound problems * see eoRealVectorBounds */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { (void)_is; @@ -422,7 +422,7 @@ public : } /** for memory managements - ugly */ - virtual eoRealBounds * dup() const + virtual eoRealBounds * dup() const { return new eoRealBelowBound(*this); } @@ -438,22 +438,22 @@ class eoRealAboveBound : public eoRealBounds { public : virtual ~eoRealAboveBound(){} - - /** + + /** Simple bounds = minimum */ - eoRealAboveBound(double _max=0) : + eoRealAboveBound(double _max=0) : repMaximum(_max) {} - // accessors + // accessors virtual double maximum() const { return repMaximum; } - virtual double minimum() const + virtual double minimum() const { throw std::logic_error("Trying to get minimum of eoRealAboveBound"); } - virtual double range() const + virtual double range() const { throw std::logic_error("Trying to get range of eoRealAboveBound"); } @@ -473,7 +473,7 @@ public : virtual bool isMaxBounded(void) const {return true;} // says if a given double is within the bounds - virtual bool isInBounds(double _r) const + virtual bool isInBounds(double _r) const { if (_r > repMaximum) return false; @@ -481,16 +481,16 @@ public : } // folds a value into bounds - virtual void foldsInBounds(double & _r) const + virtual void foldsInBounds(double & _r) const { // easy as a pie: symmetry w.r.t. maximum - if (_r > repMaximum) // nothing to do otherwise + if (_r > repMaximum) // nothing to do otherwise _r = 2*repMaximum - _r; return ; - } + } // truncates to the bounds - virtual void truncate(double & _r) const + virtual void truncate(double & _r) const { if (_r > repMaximum) _r = repMaximum; @@ -521,7 +521,7 @@ public : } /** for memory managements - ugly */ - virtual eoRealBounds * dup() const + virtual eoRealBounds * dup() const { return new eoRealAboveBound(*this); } @@ -560,13 +560,13 @@ public: if (maxBounded) maximum = bb.maximum(); if (minBounded && maxBounded) - repBound = new eoRealInterval(minimum, maximum); + repBound = new eoRealInterval(minimum, maximum); else if (!minBounded && !maxBounded) // no bound at all - repBound = new eoRealNoBounds; + repBound = new eoRealNoBounds; else if (!minBounded && maxBounded) - repBound = new eoRealAboveBound(maximum); + repBound = new eoRealAboveBound(maximum); else if (minBounded && !maxBounded) - repBound = new eoRealBelowBound(minimum); + repBound = new eoRealBelowBound(minimum); } eoGeneralRealBounds& operator=(const eoGeneralRealBounds& _b) @@ -586,13 +586,13 @@ public: delete repBound; // now reallocate if (minBounded && maxBounded) - repBound = new eoRealInterval(minimum, maximum); + repBound = new eoRealInterval(minimum, maximum); else if (!minBounded && !maxBounded) // no bound at all - repBound = new eoRealNoBounds; + repBound = new eoRealNoBounds; else if (!minBounded && maxBounded) - repBound = new eoRealAboveBound(maximum); + repBound = new eoRealAboveBound(maximum); else if (minBounded && !maxBounded) - repBound = new eoRealBelowBound(minimum); + repBound = new eoRealBelowBound(minimum); return (*this); } @@ -633,17 +633,17 @@ public: */ virtual void truncate(double & _x) const {return repBound->truncate(_x);} - /** get minimum value + /** get minimum value * std::exception if does not exist - */ + */ virtual double minimum() const {return repBound->minimum();} /** get maximum value * std::exception if does not exist - */ + */ virtual double maximum() const {return repBound->maximum();} /** get range * std::exception if unbounded - */ + */ virtual double range() const {return repBound->range();} /** random generator of uniform numbers in bounds @@ -655,9 +655,9 @@ public: virtual eoRealBounds * dup() const {return repBound->dup();} /** for efficiency, it's better to use the embedded boud directly */ - const eoRealBounds & theBounds() const { return *repBound;} + const eoRealBounds & theBounds() const { return *repBound;} - /** don't forget the printOn method - + /** don't forget the printOn method - * again that of the embedded bound */ virtual void printOn(std::ostream& _os) const @@ -666,7 +666,7 @@ public: } /** no readFrom ??? Have to check that later */ - virtual void readFrom(std::istream& _is) + virtual void readFrom(std::istream& _is) { std::string s; _is >> s; diff --git a/eo/src/utils/eoRealVectorBounds.h b/eo/src/utils/eoRealVectorBounds.h index 5e3a460f8..56feff345 100644 --- a/eo/src/utils/eoRealVectorBounds.h +++ b/eo/src/utils/eoRealVectorBounds.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoRealVectorBounds.h // (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,93 +27,93 @@ #ifndef _eoRealVectorBounds_h #define _eoRealVectorBounds_h -#include // std::exceptions! +#include // std::exceptions! #include #include /** Vector type for bounds (see eoRealBounds.h for scalar types) ------------ -Class eoRealVectorBounds implements the std::vectorized version: +Class eoRealVectorBounds implements the std::vectorized version: it is basically a std::vector of eoRealBounds * and forwards all request to the elements of the std::vector. -This file also contains the global variables and eoDummyVectorNoBounds +This file also contains the global variables and eoDummyVectorNoBounds that are used as defaults in ctors (i.e. when no bounds are given, it is assumed unbounded values) -THe 2 main classes defined here are +THe 2 main classes defined here are eoRealBaseVectorBounds, base class that handles all useful functions eoRealVectorBounds which derives from the preceding *and* eoPersistent - and also has a mechanism for memory handling of the pointers + and also has a mechanism for memory handling of the pointers it has to allocate @ingroup Bounds */ class eoRealBaseVectorBounds : public std::vector -{ +{ public: // virtual desctructor (to avoid warning?) virtual ~eoRealBaseVectorBounds(){} - /** Default Ctor. + /** Default Ctor. */ eoRealBaseVectorBounds() : std::vector(0) {} /** Ctor: same bounds for everybody, given as an eoRealBounds */ - eoRealBaseVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + eoRealBaseVectorBounds(unsigned _dim, eoRealBounds & _bounds) : std::vector(_dim, &_bounds) {} - + /** Ctor, particular case of dim-2 */ - eoRealBaseVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + eoRealBaseVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : std::vector(0) { - push_back( &_xbounds); - push_back( &_ybounds); + push_back( &_xbounds); + push_back( &_ybounds); } - + /** test: is i_th component bounded */ - virtual bool isBounded(unsigned _i) - { + virtual bool isBounded(unsigned _i) + { return (*this)[_i]->isBounded(); } - + /** test: bounded iff all are bounded */ - virtual bool isBounded(void) + virtual bool isBounded(void) { for (unsigned i=0; iisBounded()) - return false; + return false; return true; } /** Self-test: true iff i_th component has no bounds at all */ - virtual bool hasNoBoundAtAll(unsigned _i) - { + virtual bool hasNoBoundAtAll(unsigned _i) + { return (*this)[_i]->hasNoBoundAtAll(); } - + /** Self-test: true iff all components have no bound at all */ - virtual bool hasNoBoundAtAll(void) + virtual bool hasNoBoundAtAll(void) { for (unsigned i=0; ihasNoBoundAtAll()) - return false; + return false; return true; } - virtual bool isMinBounded(unsigned _i) + virtual bool isMinBounded(unsigned _i) { return (*this)[_i]->isMinBounded();} ; - virtual bool isMaxBounded(unsigned _i) + virtual bool isMaxBounded(unsigned _i) { return (*this)[_i]->isMaxBounded();} ; /** Folds a real value back into the bounds - i_th component @@ -130,7 +130,7 @@ public: for (unsigned i=0; ifoldsInBounds(_v[i]); - } + } } /** Truncates a real value to the bounds - i_th component @@ -147,7 +147,7 @@ public: for (unsigned i=0; itruncate(_v[i]); - } + } } /** test: is i_th component within the bounds? @@ -161,7 +161,7 @@ public: { for (unsigned i=0; iprintOn(_os); - _os << ";"; + operator[](i)->printOn(_os); + _os << ";"; } } }; @@ -234,19 +234,19 @@ public: /** Ctor: same bounds for everybody, given as an eoRealBounds */ - eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : eoRealBaseVectorBounds(_dim, _bounds), factor(1,_dim), ownedBounds(0) {} - + /** Ctor, particular case of dim-2 */ - eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : eoRealBaseVectorBounds(_xbounds, _ybounds), factor(2,1), ownedBounds(0) {} - + /** Simple bounds = minimum and maximum (allowed) */ - eoRealVectorBounds(unsigned _dim, double _min, double _max) : + eoRealVectorBounds(unsigned _dim, double _min, double _max) : eoRealBaseVectorBounds(), factor(1, _dim), ownedBounds(0) { if (_max-_min<=0) @@ -261,7 +261,7 @@ public: /** Ctor: different bounds for different variables, std::vectors of double */ - eoRealVectorBounds(std::vector _min, std::vector _max) : + eoRealVectorBounds(std::vector _min, std::vector _max) : factor(_min.size(), 1), ownedBounds(0) { if (_max.size() != _min.size()) @@ -270,9 +270,9 @@ public: eoRealBounds *ptBounds; for (unsigned i=0; i<_min.size(); i++) { - ptBounds = new eoRealInterval(_min[i], _max[i]); - ownedBounds.push_back(ptBounds); - push_back(ptBounds); + ptBounds = new eoRealInterval(_min[i], _max[i]); + ownedBounds.push_back(ptBounds); + push_back(ptBounds); } } @@ -320,26 +320,26 @@ public: unsigned int index=factor[0]; if (factor.size()>1) for (unsigned i=1; i 1) - _os << factor[i]; - operator[](index)->printOn(_os); - index += factor[i]; - } + { + _os << ";"; + if (factor[i] > 1) + _os << factor[i]; + operator[](index)->printOn(_os); + index += factor[i]; + } } /** Eventually increases the size by duplicating last bound */ void adjust_size(unsigned _dim); - /** need to rewrite copy ctor and assignement operator + /** need to rewrite copy ctor and assignement operator * because of ownedBounds */ eoRealVectorBounds(const eoRealVectorBounds &); -private:// WARNING: there is no reason for both std::vector below +private:// WARNING: there is no reason for both std::vector below //to be synchronized in any manner - std::vector factor; // std::list of nb of "grouped" bounds - std::vector ownedBounds; + std::vector factor; // std::list of nb of "grouped" bounds + std::vector ownedBounds; // keep this one private eoRealVectorBounds& operator=(const eoRealVectorBounds&); }; @@ -352,19 +352,19 @@ private:// WARNING: there is no reason for both std::vector below @ingroup Bounds */ class eoRealVectorNoBounds: public eoRealVectorBounds -{ +{ public: // virtual desctructor (to avoid warning?) virtual ~eoRealVectorNoBounds(){} - /** + /** * Ctor: nothing to do, but beware of dimension: call base class ctor */ - eoRealVectorNoBounds(unsigned _dim) : + eoRealVectorNoBounds(unsigned _dim) : eoRealVectorBounds( (_dim?_dim:1), eoDummyRealNoBounds) {} - + virtual bool isBounded(unsigned) {return false;} virtual bool isBounded(void) {return false;} @@ -383,7 +383,7 @@ public: virtual bool isInBounds(unsigned, double) {return true;} virtual bool isInBounds(std::vector) {return true;} - // accessors + // accessors virtual double minimum(unsigned) { throw std::logic_error("Trying to get minimum of eoRealVectorNoBounds"); @@ -397,7 +397,7 @@ public: throw std::logic_error("Trying to get range of eoRealVectorNoBounds"); } - virtual double averageRange() + virtual double averageRange() { throw std::logic_error("Trying to get average range of eoRealVectorNoBounds"); } diff --git a/eo/src/utils/eoScalarFitnessStat.h b/eo/src/utils/eoScalarFitnessStat.h index f472722a9..e56e46822 100644 --- a/eo/src/utils/eoScalarFitnessStat.h +++ b/eo/src/utils/eoScalarFitnessStat.h @@ -52,10 +52,10 @@ public: { value().resize(_popPters.size()); for (unsigned i=0; i<_popPters.size(); i++) - { - value()[i] = _popPters[i]->fitness(); - range.truncate(value()[i]); - } + { + value()[i] = _popPters[i]->fitness(); + range.truncate(value()[i]); + } } private : diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 8529f1ce1..916bcf439 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -44,7 +44,7 @@ Contact: http://eodev.sourceforge.net * * Compute various statistics on a population. * - * Objects of those classes are generally called by an eoCheckPoint + * Objects of those classes are generally called by an eoCheckPoint * to compute statistics about the population at a given generation. * As they inherit from eoValueParam, they can be printed drectly, * for instance by an eoMonitor. @@ -433,7 +433,7 @@ public: eoInterquartileRangeStat( typename EOT::Fitness start, std::string description = "IQR" ) : eoStat( start, description ) {} - virtual void operator()( const eoPop & _pop ) + virtual void operator()( const eoPop & _pop ) { if( _pop.size() == 0 ) { // how to implement value() = 0 ? @@ -444,14 +444,14 @@ public: unsigned int quartile = pop.size()/4; std::nth_element( pop.begin(), pop.begin()+quartile*1, pop.end() ); typename EOT::Fitness Q1 = pop[quartile].fitness(); - + std::nth_element( pop.begin(), pop.begin()+quartile*3, pop.end() ); typename EOT::Fitness Q3 = pop[quartile*3].fitness(); value() = Q1 - Q3; } } - + virtual std::string className(void) const { return "eoInterquartileRangeStat"; } }; /** @example t-eoIQRStat.cpp @@ -459,7 +459,7 @@ public: /** Compute the average size of indivudals over the population * - * Obviously, will work only on representations that implement the (standard) "size()" method, + * Obviously, will work only on representations that implement the (standard) "size()" method, * like any STL container. */ template @@ -469,10 +469,10 @@ public: using eoStat::value; - eoAverageSizeStat( std::string description = "Av.Size" ) : + eoAverageSizeStat( std::string description = "Av.Size" ) : eoStat( 0.0, description ) {} // 0 by default - virtual void operator()( const eoPop & pop ) + virtual void operator()( const eoPop & pop ) { size_t pop_size = pop.size(); @@ -487,10 +487,9 @@ public: value() = static_cast(sum) / static_cast(pop_size); } - + virtual std::string className(void) const { return "eoAverageSizeStat"; } }; /** @} */ #endif - diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index c5997fe19..d9d06d99e 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -123,24 +123,24 @@ void eoState::load(std::istream& is) while (getline(is, str)) { - if (is.eof()) - throw runtime_error("No section in load file"); - if (is_section(str, name)) - break; + if (is.eof()) + throw runtime_error("No section in load file"); + if (is_section(str, name)) + break; removeComment(str, getCommentString()); fullstring += str + "\n"; } - istringstream the_stream(fullstring); + istringstream the_stream(fullstring); object->readFrom(the_stream); } } - else // if (is_section(str, name)) - what if file empty - { - getline(is, str); // try next line! - // if (is.eof()) - // throw runtime_error("No section in load file"); - } + else // if (is_section(str, name)) - what if file empty + { + getline(is, str); // try next line! + // if (is.eof()) + // throw runtime_error("No section in load file"); + } } } @@ -172,7 +172,7 @@ string eoState::createObjectName(eoObject* obj) { if (obj == 0) { - ostringstream os; + ostringstream os; os << objectMap.size(); return os.str(); } @@ -184,7 +184,7 @@ string eoState::createObjectName(eoObject* obj) unsigned count = 1; while (it != objectMap.end()) { - ostringstream os; + ostringstream os; os << obj->className().c_str() << count++; name = os.str(); it = objectMap.find(name); @@ -192,4 +192,3 @@ string eoState::createObjectName(eoObject* obj) return name; } - diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 91fcc11cc..a1979b5d7 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -1,6 +1,6 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- -/* +/* (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 (c) Thales group, 2010 This library is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Authors: todos@geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk - Johann DrĂ©o + Johann DrĂ©o */ #ifndef _eoStdoutMonitor_h @@ -43,18 +43,17 @@ Authors: class eoStdoutMonitor : public eoOStreamMonitor { public : - eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) - { + eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) + { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdutMonitor constructor is deprecated and will be removed in the next release" << std::endl; } - eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - eoOStreamMonitor( std::cout, _delim, _width, _fill) + eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _delim, _width, _fill) {} virtual std::string className(void) const { return "eoStdoutMonitor"; } }; #endif - diff --git a/eo/src/utils/eoTimeCounter.h b/eo/src/utils/eoTimeCounter.h index 5774844b7..623714156 100644 --- a/eo/src/utils/eoTimeCounter.h +++ b/eo/src/utils/eoTimeCounter.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoTimeCounter.h // (c) Marc Schoenauer, Maarten Keijzer, and GeNeura Team, 2002 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -40,30 +40,30 @@ class eoTimeCounter : public eoUpdater, public eoValueParam { public: - eoTimeCounter() : eoValueParam(0.0, "Time") // : firstTime(true) + eoTimeCounter() : eoValueParam(0.0, "Time") // : firstTime(true) { start = time(NULL); } - - /** simply stores the time spent in process in its value() */ + + /** simply stores the time spent in process in its value() */ virtual void operator()() { // ask for system time utime = clock(); - + // if (firstTime) /* first generation */ // { - // firstTime=false; - // firstUtime = tmsStruct.tms_utime; + // firstTime=false; + // firstUtime = tmsStruct.tms_utime; // } // store elapsed user time // value(tmsStruct.tms_utime - firstUtime); // value()=double(utime)/CLOCKS_PER_SEC; double seconds_elapsed = time(NULL) - start; - + value() = (seconds_elapsed > 2140) ? seconds_elapsed : double(utime)/CLOCKS_PER_SEC; } - + private: // bool firstTime; // clock_t firstUtime; diff --git a/eo/src/utils/eoTimedMonitor.h b/eo/src/utils/eoTimedMonitor.h index aa660a794..a06ae6cce 100644 --- a/eo/src/utils/eoTimedMonitor.h +++ b/eo/src/utils/eoTimedMonitor.h @@ -51,25 +51,25 @@ public: eoTimedMonitor(unsigned seconds_) : last_tick(0), seconds(seconds_) {} eoMonitor& operator()(void) { - bool monitor = false; - if (last_tick == 0) { - monitor = true; - last_tick = clock(); - } + bool monitor = false; + if (last_tick == 0) { + monitor = true; + last_tick = clock(); + } - clock_t tick = clock(); + clock_t tick = clock(); - if ( (unsigned)(tick-last_tick) >= seconds * CLOCKS_PER_SEC) { - monitor = true; - } + if ( (unsigned)(tick-last_tick) >= seconds * CLOCKS_PER_SEC) { + monitor = true; + } - if (monitor) { - for (unsigned i = 0; i < monitors.size(); ++i) { - (*monitors[i])(); - } - last_tick = clock(); - } - return *this; + if (monitor) { + for (unsigned i = 0; i < monitors.size(); ++i) { + (*monitors[i])(); + } + last_tick = clock(); + } + return *this; } void add(eoMonitor& mon) { monitors.push_back(&mon); } diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h index fa1b874dc..cede61b73 100644 --- a/eo/src/utils/eoUniformInit.h +++ b/eo/src/utils/eoUniformInit.h @@ -24,8 +24,8 @@ */ //----------------------------------------------------------------------------- -/** Copied from the eoRndGenerators to have objects deriving from eoInit - * As the whole initialization mechanism in EO is based on eoInit rather than +/** Copied from the eoRndGenerators to have objects deriving from eoInit + * As the whole initialization mechanism in EO is based on eoInit rather than * eoRndGenerators, we might as well have these directly written without * overhead @@ -69,14 +69,14 @@ template class eoUniformInit : public eoInit public : /** Ctor with only a max bound */ eoUniformInit(T _max = T(1.0), eoRng& _rng = rng) : - minim(T(0.0)), range(_max), uniform(_rng) + minim(T(0.0)), range(_max), uniform(_rng) {} - + /** Ctor with an eoRealBound */ eoUniformInit(eoRealBounds & _bound, eoRng& _rng = rng) : minim(_bound.minimum()), range(_bound.range()), uniform(_rng) {} - + /** Ctor with explicit min and max */ eoUniformInit(T _min, T _max, eoRng& _rng = rng) : minim(_min), range(_max-_min), uniform(_rng) @@ -84,14 +84,14 @@ template class eoUniformInit : public eoInit if (_min>_max) throw std::logic_error("Min is greater than Max in uniform_generator"); } - + /** Generates the number, uses a static_cast to get the right behaviour for ints and unsigneds */ - void operator()(T & _t) - { - _t = minim+static_cast(uniform.uniform(range)); + void operator()(T & _t) + { + _t = minim+static_cast(uniform.uniform(range)); } private : diff --git a/eo/src/utils/eoUpdatable.h b/eo/src/utils/eoUpdatable.h index 4c029c540..202ef962c 100644 --- a/eo/src/utils/eoUpdatable.h +++ b/eo/src/utils/eoUpdatable.h @@ -79,13 +79,13 @@ public : void operator()(void) { - time_t now = time(0); + time_t now = time(0); - if (now >= last_time + interval) - { - last_time = now; - eoDynUpdater::operator() (); - } + if (now >= last_time + interval) + { + last_time = now; + eoDynUpdater::operator() (); + } } private : const time_t interval; @@ -106,10 +106,10 @@ public : void operator()(void) { - if (++counter % interval == 0) - { - eoDynUpdater::operator() (); - } + if (++counter % interval == 0) + { + eoDynUpdater::operator() (); + } } private : const unsigned interval; diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp index fa6ca109c..dd6a38960 100644 --- a/eo/src/utils/eoUpdater.cpp +++ b/eo/src/utils/eoUpdater.cpp @@ -20,7 +20,7 @@ void eoTimedStateSaver::operator()(void) if (now >= last_time + interval) { last_time = now; - ostringstream os; + ostringstream os; os << prefix << (now - first_time) << '.' << extension; state.save(os.str()); } @@ -28,7 +28,7 @@ void eoTimedStateSaver::operator()(void) void eoCountedStateSaver::doItNow(void) { - ostringstream os; + ostringstream os; os << prefix << counter << '.' << extension; state.save(os.str()); } @@ -44,5 +44,3 @@ void eoCountedStateSaver::lastCall(void) if (saveOnLastCall) doItNow(); } - - diff --git a/eo/src/utils/eoUpdater.h b/eo/src/utils/eoUpdater.h index ab8ae4250..072b9a9bb 100644 --- a/eo/src/utils/eoUpdater.h +++ b/eo/src/utils/eoUpdater.h @@ -45,8 +45,8 @@ class eoUpdater : public eoF public: virtual void lastCall() {} virtual std::string className(void) const { return "eoUpdater"; } - - template + + template eoUpdater& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } }; @@ -149,8 +149,8 @@ public : eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav", unsigned _counter = 0) : state(_state), interval(_interval), counter(_counter), - saveOnLastCall(true), - prefix(_prefix), extension(_extension) {} + saveOnLastCall(true), + prefix(_prefix), extension(_extension) {} virtual void lastCall(void); void operator()(void); diff --git a/eo/src/utils/make_help.cpp b/eo/src/utils/make_help.cpp index a9aa74f97..a7ab040cd 100644 --- a/eo/src/utils/make_help.cpp +++ b/eo/src/utils/make_help.cpp @@ -95,7 +95,7 @@ bool testDirRes(std::string _dirName, bool _erase=true) return true; } // else - if (_erase) // OK to erase + if (_erase) // OK to erase { s = string("/bin/rm ")+ _dirName + "/*"; int res = system(s.c_str()); diff --git a/eo/src/utils/pipecom.cpp b/eo/src/utils/pipecom.cpp index 46ad5489f..a175112f9 100644 --- a/eo/src/utils/pipecom.cpp +++ b/eo/src/utils/pipecom.cpp @@ -29,14 +29,14 @@ int Check( PCom *com ) { if( ! com ) { - fprintf( stderr, "PipeCom: Null pointer.\n" ); - fflush( stderr ); - return 0; + fprintf( stderr, "PipeCom: Null pointer.\n" ); + fflush( stderr ); + return 0; } if( kill( com->pid, 0 ) != 0 ) { - fprintf( stderr, "PipeCom: process doesn't exists.\n" ); - fflush( stderr ); - return 0; + fprintf( stderr, "PipeCom: process doesn't exists.\n" ); + fflush( stderr ); + return 0; } return 1; } @@ -59,46 +59,46 @@ PCom * PipeComOpenArgv( char *prog, char *argv[] ) PCom * ret = NULL; if( pipe( toFils ) < 0 ) { - perror( "PipeComOpen: Creating pipes" ); - return ret; + perror( "PipeComOpen: Creating pipes" ); + return ret; } if( pipe( toPere ) < 0 ) { - perror( "PipeComOpen: Creating pipes" ); - return ret; + perror( "PipeComOpen: Creating pipes" ); + return ret; } switch( (sonPid = vfork()) ) { case -1: - perror("PipeComOpen: fork failed" ); - return ret; - break; + perror("PipeComOpen: fork failed" ); + return ret; + break; case 0: - /* --- Here's the son --- */ - /* --- replace old stdin --- */ - if( dup2( toFils[0], fileno(stdin) ) < 0 ) { - perror( "PipeComOpen(son): could not connect" ); - exit( -1 ); - /* --- AVOIR: kill my father --- */ - } - if( dup2( toPere[1], fileno(stdout) ) < 0 ) { - perror( "PipeComOpen(son): could not connect" ); - exit( -1 ); - } - if( execvp( prog, argv ) < 0 ) { - perror( prog ); - perror( "PipeComOpen: can't exec" ); - exit(1); - } - break; + /* --- Here's the son --- */ + /* --- replace old stdin --- */ + if( dup2( toFils[0], fileno(stdin) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + /* --- AVOIR: kill my father --- */ + } + if( dup2( toPere[1], fileno(stdout) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + } + if( execvp( prog, argv ) < 0 ) { + perror( prog ); + perror( "PipeComOpen: can't exec" ); + exit(1); + } + break; default: - ret = (PCom *) malloc( sizeof(PCom) ); - if( ! ret ) - return NULL; + ret = (PCom *) malloc( sizeof(PCom) ); + if( ! ret ) + return NULL; - ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); - ret->fRead = (FILE *)fdopen( toPere[0], "r" ); - ret->pid = sonPid; + ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); + ret->fRead = (FILE *)fdopen( toPere[0], "r" ); + ret->pid = sonPid; } return ret; } @@ -108,7 +108,7 @@ int PipeComSend( PCom *to, const char *line ) { int nb = 0; if( ! Check(to ) ) - return nb; + return nb; nb = fprintf( to->fWrit, line, 0 ); fflush( to->fWrit ); return nb; @@ -119,7 +119,7 @@ int PipeComSendn( PCom *to, const char *data, int n ) { int nb = 0; if( ! Check(to) ) - return nb; + return nb; nb = fwrite( data, 1, n, to->fWrit ); fflush( to->fWrit ); @@ -130,14 +130,14 @@ int PipeComSendn( PCom *to, const char *data, int n ) int PipeComReceive( PCom *from, char *data, int max ) { if( ! Check(from) ) - return 0; + return 0; if( ! data ) { fprintf( stderr, "PipeComReceive: Invalid data pointer\n" ); fflush( stderr ); return 0; } if( fgets( data, max, from->fRead ) ) - return strlen(data); + return strlen(data); return 0; } @@ -146,7 +146,7 @@ int PipeComReceive( PCom *from, char *data, int max ) int PipeComClose( PCom *to ) { if( ! Check(to) ) - return 0; + return 0; fclose( to->fRead ); fclose( to->fWrit ); free( to ); @@ -159,8 +159,8 @@ int PipeComWaitFor( PCom *from, char *what ) { char buffer[256]; do { - if( ! PipeComReceive( from, buffer, 256 ) ) - return 0; + if( ! PipeComReceive( from, buffer, 256 ) ) + return 0; } while( strcmp( buffer, what ) ); return 1; } diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index d1765b999..37df7997b 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -146,14 +146,14 @@ It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) double roulette = _gen.uniform(total); - if (roulette == 0.0) // covers the case where total==0.0 + if (roulette == 0.0) // covers the case where total==0.0 return _begin + _gen.random(_end - _begin); // uniform choice It i = _begin; while (roulette > 0.0) { - roulette -= static_cast(*(i++)); + roulette -= static_cast(*(i++)); } return --i; @@ -164,14 +164,14 @@ const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rn { double roulette = _gen.uniform(total); - if (roulette == 0.0) // covers the case where total==0.0 + if (roulette == 0.0) // covers the case where total==0.0 return _pop[_gen.random(_pop.size())]; // uniform choice typename eoPop::const_iterator i = _pop.begin(); while (roulette > 0.0) { - roulette -= static_cast((i++)->fitness()); + roulette -= static_cast((i++)->fitness()); } return *--i; @@ -182,14 +182,14 @@ EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) { float roulette = _gen.uniform(total); - if (roulette == 0.0) // covers the case where total==0.0 + if (roulette == 0.0) // covers the case where total==0.0 return _pop[_gen.random(_pop.size())]; // uniform choice typename eoPop::iterator i = _pop.begin(); while (roulette > 0.0) { - roulette -= static_cast((i++)->fitness()); + roulette -= static_cast((i++)->fitness()); } return *--i; @@ -205,7 +205,7 @@ It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = It competitor = _begin + _gen.random(_end - _begin); if (*best < *competitor) - { + { best = competitor; } } From 70e60a50d2c1adcf0140d97ac9def6fe4307b59e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 5 May 2011 17:15:10 +0200 Subject: [PATCH 1758/2134] * whitespace cleanup --- edo/AUTHORS | 5 +- edo/COPYING | 14 +- edo/application/eda/main.cpp | 4 +- edo/src/edo | 4 +- edo/src/edo.cpp | 5 +- edo/src/edoAlgo.h | 4 +- edo/src/edoBounder.h | 4 +- edo/src/edoBounderBound.h | 4 +- edo/src/edoBounderNo.h | 4 +- edo/src/edoBounderRng.h | 5 +- edo/src/edoBounderUniform.h | 20 +- edo/src/edoContinue.h | 4 +- edo/src/edoDistrib.h | 4 +- edo/src/edoEDA.h | 6 +- edo/src/edoEDASA.h | 6 +- edo/src/edoEstimator.h | 4 +- edo/src/edoEstimatorNormalMono.h | 4 +- edo/src/edoEstimatorNormalMulti.h | 4 +- edo/src/edoEstimatorUniform.h | 4 +- edo/src/edoModifier.h | 5 +- edo/src/edoModifierDispersion.h | 4 +- edo/src/edoModifierMass.h | 5 +- edo/src/edoNormalMono.h | 4 +- edo/src/edoNormalMonoCenter.h | 5 +- edo/src/edoNormalMulti.h | 4 +- edo/src/edoNormalMultiCenter.h | 4 +- edo/src/edoSampler.h | 4 +- edo/src/edoSamplerNormalMono.h | 6 +- edo/src/edoSamplerNormalMulti.h | 4 +- edo/src/edoSamplerUniform.h | 4 +- edo/src/edoUniform.h | 4 +- edo/src/edoUniformCenter.h | 4 +- edo/src/edoVectorBounds.h | 4 +- edo/src/utils/edoCheckPoint.h | 4 +- edo/src/utils/edoFileSnapshot.cpp | 4 +- edo/src/utils/edoFileSnapshot.h | 4 +- edo/src/utils/edoHyperVolume.h | 4 +- edo/src/utils/edoPopStat.h | 4 +- edo/src/utils/edoStat.h | 4 +- edo/src/utils/edoStatNormalMono.h | 4 +- edo/src/utils/edoStatNormalMulti.h | 4 +- edo/src/utils/edoStatUniform.h | 4 +- edo/test/t-bounderno.cpp | 4 +- edo/test/t-continue.cpp | 4 +- edo/test/t-edoEstimatorNormalMulti.cpp | 4 +- edo/test/t-mean-distance.cpp | 4 +- edo/test/t-uniform.cpp | 4 +- edo/test/test_cov_parameters.py | 12 +- eo/CHANGELOG | 226 +++---- eo/COPYING | 4 +- eo/ConfigureChecks.cmake | 26 +- eo/INSTALL | 1 - eo/LICENSE | 6 +- eo/NEWS | 13 +- eo/README | 23 +- eo/app/gprop/CMakeLists.txt | 11 +- eo/app/gprop/gprop.h | 8 +- eo/app/gprop/l2.h | 42 +- eo/app/gprop/mlp.h | 68 +- eo/app/gprop/mse.h | 36 +- eo/app/gprop/qp.h | 88 +-- eo/app/gprop/vecop.h | 11 +- eo/app/gpsymreg/CMakeLists.txt | 5 +- eo/app/gpsymreg/fitness.h | 3 +- eo/app/gpsymreg/main.cpp | 17 +- eo/app/gpsymreg/node.h | 100 +-- eo/app/gpsymreg/parameters.h | 42 +- eo/app/mastermind/CMakeLists.txt | 5 +- eo/app/mastermind/mastermind.cpp | 4 +- eo/config.guess | 170 ++--- eo/config.h.cmake | 2 - eo/contrib/MGE/eoInitVirus.h | 12 +- eo/contrib/boost/config.hpp | 17 +- eo/contrib/boost/config/abi_prefix.hpp | 2 +- eo/contrib/boost/config/abi_suffix.hpp | 4 +- eo/contrib/boost/config/auto_link.hpp | 28 +- eo/contrib/boost/limits.hpp | 13 +- eo/contrib/eoAged.h | 13 +- eo/contrib/eoDrawable.h | 56 +- eo/install_symlink.py.cmake | 16 +- eo/test/ChangeLog | 10 +- eo/test/RoyalRoad.h | 4 +- eo/test/binary_value.h | 2 +- eo/test/boxplot.py | 6 +- eo/test/fitness_traits.cpp | 6 +- eo/test/real_value.h | 7 +- eo/test/run_tests | 2 +- eo/test/t-eo.cpp | 5 +- eo/test/t-eo2dVector.cc | 8 +- eo/test/t-eoCMAES.cpp | 4 - eo/test/t-eoCheckpointing.cpp | 37 +- eo/test/t-eoDualFitness.cpp | 24 +- eo/test/t-eoESAll.cpp | 32 +- eo/test/t-eoESFull.cpp | 24 +- eo/test/t-eoEasyEA.cpp | 17 +- eo/test/t-eoEasyPSO.cpp | 33 +- eo/test/t-eoExtendedVelocity.cpp | 4 +- eo/test/t-eoExternalEO.cpp | 22 +- eo/test/t-eoFitnessAssembled.cpp | 27 +- eo/test/t-eoFitnessAssembledEA.cpp | 38 +- eo/test/t-eoFunctor.cpp | 3 +- eo/test/t-eoGA.cpp | 2 +- eo/test/t-eoGenOp.cpp | 26 +- eo/test/t-eoIQRStat.cpp | 8 +- eo/test/t-eoInitPermutation.cpp | 14 +- eo/test/t-eoOrderXover.cpp | 16 +- eo/test/t-eoPBIL.cpp | 8 +- eo/test/t-eoRNG.cpp | 16 +- eo/test/t-eoReal.cpp | 6 +- eo/test/t-eoReplacement.cpp | 16 +- eo/test/t-eoRingTopology.cpp | 12 +- eo/test/t-eoRoulette.cpp | 16 +- eo/test/t-eoSecondsElapsedContinue.cpp | 3 - eo/test/t-eoSelect.cpp | 12 +- eo/test/t-eoSharing.cpp | 6 +- eo/test/t-eoShiftMutation.cpp | 14 +- eo/test/t-eoStateAndParser.cpp | 24 +- eo/test/t-eoSwapMutation.cpp | 16 +- eo/test/t-eoSymreg.cpp | 100 +-- eo/test/t-eoSyncEasyPSO.cpp | 32 +- eo/test/t-eoTwoOptMutation.cpp | 14 +- eo/test/t-eoUniform.cpp | 2 +- eo/test/t-eoVirus.cpp | 3 +- eo/test/t-eobin.cpp | 4 +- eo/test/t-eofitness.cpp | 19 +- eo/test/t-openmp.py | 84 +-- eo/test/t-selectOne.cpp | 10 +- eo/tutorial/Lesson1/CMakeLists.txt | 12 +- eo/tutorial/Lesson1/FirstBitGA.cpp | 14 +- eo/tutorial/Lesson1/FirstRealGA.cpp | 14 +- eo/tutorial/Lesson1/Makefile.simple | 6 +- eo/tutorial/Lesson1/exercise1.3.cpp | 6 +- eo/tutorial/Lesson2/CMakeLists.txt | 12 +- eo/tutorial/Lesson2/FirstBitEA.cpp | 4 +- eo/tutorial/Lesson2/FirstRealEA.cpp | 6 +- eo/tutorial/Lesson2/Makefile.simple | 8 +- eo/tutorial/Lesson2/binary_value.h | 3 +- eo/tutorial/Lesson2/exercise2.3.cpp | 6 +- eo/tutorial/Lesson2/real_value.h | 7 +- eo/tutorial/Lesson3/CMakeLists.txt | 13 +- eo/tutorial/Lesson3/Makefile.simple | 8 +- eo/tutorial/Lesson3/SecondBitEA.cpp | 8 +- eo/tutorial/Lesson3/SecondRealEA.cpp | 8 +- eo/tutorial/Lesson3/binary_value.h | 3 +- eo/tutorial/Lesson3/exercise3.1.cpp | 10 +- eo/tutorial/Lesson3/real_value.h | 7 +- eo/tutorial/Lesson4/BitEA.cpp | 10 +- eo/tutorial/Lesson4/CMakeLists.txt | 17 +- eo/tutorial/Lesson4/ESEA.cpp | 28 +- eo/tutorial/Lesson4/ESEA.param | 3 +- eo/tutorial/Lesson4/Makefile.simple | 12 +- eo/tutorial/Lesson4/RealEA.cpp | 6 +- eo/tutorial/Lesson4/RealEA.param | 3 +- eo/tutorial/Lesson4/binary_value.h | 2 +- eo/tutorial/Lesson4/real_value.h | 7 +- eo/tutorial/Lesson5/CMakeLists.txt | 10 +- eo/tutorial/Lesson5/Makefile.simple | 10 +- eo/tutorial/Lesson5/OneMaxEA.cpp | 22 +- eo/tutorial/Lesson5/OneMaxLibEA.cpp | 22 +- eo/tutorial/Lesson5/eoOneMax.h | 17 +- eo/tutorial/Lesson5/eoOneMaxEvalFunc.h | 12 +- eo/tutorial/Lesson5/eoOneMaxInit.h | 7 +- eo/tutorial/Lesson5/eoOneMaxMutation.h | 32 +- eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h | 32 +- eo/tutorial/Lesson5/make_OneMax.cpp | 17 +- eo/tutorial/Lesson5/make_genotype_OneMax.h | 20 +- eo/tutorial/Lesson5/make_op_OneMax.h | 44 +- eo/tutorial/Lesson6/BinaryPSO.cpp | 38 +- eo/tutorial/Lesson6/CMakeLists.txt | 11 +- eo/tutorial/Lesson6/Makefile.simple | 10 +- eo/tutorial/Lesson6/RealPSO.cpp | 42 +- eo/tutorial/Makefile.simple | 12 +- eo/tutorial/README | 9 +- eo/tutorial/Templates/CMakeLists.txt.src-tmpl | 13 +- eo/tutorial/Templates/CMakeLists.txt.top-tmpl | 18 +- eo/tutorial/Templates/ChangeLog | 4 +- eo/tutorial/Templates/EO.tpl | 4 +- eo/tutorial/Templates/MyStructLibEA.cpp | 22 +- eo/tutorial/Templates/README | 6 +- eo/tutorial/Templates/README.manual | 36 +- eo/tutorial/Templates/binCrossover.tmpl | 14 +- eo/tutorial/Templates/configure.ac.tmpl | 6 +- eo/tutorial/Templates/continue.tmpl | 9 +- eo/tutorial/Templates/createEOproject.sh | 4 +- eo/tutorial/Templates/eoMyStruct.tmpl | 25 +- eo/tutorial/Templates/evalFunc.tmpl | 12 +- eo/tutorial/Templates/init.tmpl | 7 +- .../lessOffspringExternalSelectorGenOp.tmpl | 18 +- .../lessOffspringSameSelectorGenOp.tmpl | 10 +- eo/tutorial/Templates/make_MyStruct.cpp | 1 - .../Templates/make_genotype_MyStruct.h | 20 +- eo/tutorial/Templates/make_op_MyStruct.h | 44 +- eo/tutorial/Templates/moreOffspringGenOp.tmpl | 18 +- eo/tutorial/Templates/stat.tmpl | 3 +- website/index.html | 602 +++++++++--------- 195 files changed, 1752 insertions(+), 1862 deletions(-) diff --git a/edo/AUTHORS b/edo/AUTHORS index 550b46c09..d66d82bf8 100644 --- a/edo/AUTHORS +++ b/edo/AUTHORS @@ -1,6 +1,5 @@ - -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/COPYING b/edo/COPYING index 4362b4915..d4537832c 100644 --- a/edo/COPYING +++ b/edo/COPYING @@ -1,5 +1,5 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -10,7 +10,7 @@ as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a former contains code derived from the library, whereas the latter must be combined with the library in order to run. - GNU LESSER GENERAL PUBLIC LICENSE + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other @@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. @@ -455,9 +455,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Libraries + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index 8fc663fd1..ceb64fb3d 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edo b/edo/src/edo index 54f20284e..1a6a2c682 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edo.cpp b/edo/src/edo.cpp index ff2bd2f93..aab9c37b4 100644 --- a/edo/src/edo.cpp +++ b/edo/src/edo.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -25,4 +25,3 @@ Authors: */ #include "edo" - diff --git a/edo/src/edoAlgo.h b/edo/src/edoAlgo.h index 249e42dde..464cb55ee 100644 --- a/edo/src/edoAlgo.h +++ b/edo/src/edoAlgo.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoBounder.h b/edo/src/edoBounder.h index 98bfc1a84..3341db5c3 100644 --- a/edo/src/edoBounder.h +++ b/edo/src/edoBounder.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoBounderBound.h b/edo/src/edoBounderBound.h index 8d5e52be8..106748a37 100644 --- a/edo/src/edoBounderBound.h +++ b/edo/src/edoBounderBound.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoBounderNo.h b/edo/src/edoBounderNo.h index 27d65e6c7..c1a98e710 100644 --- a/edo/src/edoBounderNo.h +++ b/edo/src/edoBounderNo.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoBounderRng.h b/edo/src/edoBounderRng.h index e1e3617f5..8c7bb3ef1 100644 --- a/edo/src/edoBounderRng.h +++ b/edo/src/edoBounderRng.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -60,4 +60,3 @@ private: }; #endif // !_edoBounderRng_h - diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index fef1674da..3af5579f0 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -39,16 +39,16 @@ public: void operator()( EOT& sol ) { - unsigned int size = sol.size(); - assert(size > 0); + unsigned int size = sol.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) { + for (unsigned int d = 0; d < size; ++d) { - if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { - // use EO's global "rng" - sol[d] = rng.uniform( this->min()[d], this->max()[d] ); - } - } // for d in size + if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { + // use EO's global "rng" + sol[d] = rng.uniform( this->min()[d], this->max()[d] ); + } + } // for d in size } }; diff --git a/edo/src/edoContinue.h b/edo/src/edoContinue.h index 2f7dff5a6..14b89e614 100644 --- a/edo/src/edoContinue.h +++ b/edo/src/edoContinue.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoDistrib.h b/edo/src/edoDistrib.h index 29ff500df..5ce9ce06f 100644 --- a/edo/src/edoDistrib.h +++ b/edo/src/edoDistrib.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index dde0bb3ad..21f95f52a 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -108,7 +108,7 @@ public: */ void operator ()(eoPop< EOT > & pop) { - assert(pop.size() > 0); + assert(pop.size() > 0); //double temperature = _initial_temperature; diff --git a/edo/src/edoEDASA.h b/edo/src/edoEDASA.h index b77daa079..99da07cdc 100644 --- a/edo/src/edoEDASA.h +++ b/edo/src/edoEDASA.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -108,7 +108,7 @@ public: */ void operator ()(eoPop< EOT > & pop) { - assert(pop.size() > 0); + assert(pop.size() > 0); double temperature = _initial_temperature; diff --git a/edo/src/edoEstimator.h b/edo/src/edoEstimator.h index 6a2be7a33..c68069eeb 100644 --- a/edo/src/edoEstimator.h +++ b/edo/src/edoEstimator.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoEstimatorNormalMono.h b/edo/src/edoEstimatorNormalMono.h index 1ef61ab71..970368552 100644 --- a/edo/src/edoEstimatorNormalMono.h +++ b/edo/src/edoEstimatorNormalMono.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 8b4b7abb6..6d5eb0bab 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoEstimatorUniform.h b/edo/src/edoEstimatorUniform.h index 7c5779fff..8b61c7bde 100644 --- a/edo/src/edoEstimatorUniform.h +++ b/edo/src/edoEstimatorUniform.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoModifier.h b/edo/src/edoModifier.h index 5aac0bb51..91f7fbe2b 100644 --- a/edo/src/edoModifier.h +++ b/edo/src/edoModifier.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -38,4 +38,3 @@ public: }; #endif // !_edoModifier_h - diff --git a/edo/src/edoModifierDispersion.h b/edo/src/edoModifierDispersion.h index 81a6b5415..0d890cbe9 100644 --- a/edo/src/edoModifierDispersion.h +++ b/edo/src/edoModifierDispersion.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoModifierMass.h b/edo/src/edoModifierMass.h index fee69d2db..414918c79 100644 --- a/edo/src/edoModifierMass.h +++ b/edo/src/edoModifierMass.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -42,4 +42,3 @@ public: }; #endif // !_edoModifierMass_h - diff --git a/edo/src/edoNormalMono.h b/edo/src/edoNormalMono.h index 0850386cf..34c71450a 100644 --- a/edo/src/edoNormalMono.h +++ b/edo/src/edoNormalMono.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoNormalMonoCenter.h b/edo/src/edoNormalMonoCenter.h index 8bd990a72..ac6e75f36 100644 --- a/edo/src/edoNormalMonoCenter.h +++ b/edo/src/edoNormalMonoCenter.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -44,4 +44,3 @@ public: }; #endif // !_edoNormalMonoCenter_h - diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index 54f695b1b..9a602e731 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -1,8 +1,8 @@ // (c) Thales group, 2010 /* Authors: - Johann Dreo - Caner Candan + Johann Dreo + Caner Candan */ #ifndef _edoNormalMulti_h diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index e59c5634a..c929ac569 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoSampler.h b/edo/src/edoSampler.h index 4a0d9244b..212e861c3 100644 --- a/edo/src/edoSampler.h +++ b/edo/src/edoSampler.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoSamplerNormalMono.h b/edo/src/edoSamplerNormalMono.h index d628ba2fb..b52ad2836 100644 --- a/edo/src/edoSamplerNormalMono.h +++ b/edo/src/edoSamplerNormalMono.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or @@ -74,7 +74,7 @@ public: { AtomType mean = distrib.mean()[i]; AtomType variance = distrib.variance()[i]; - AtomType random = rng.normal(mean, variance); + AtomType random = rng.normal(mean, variance); assert(variance >= 0); diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 889c2e54f..2aa599503 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h index a7b4c316d..dbb8f4124 100644 --- a/edo/src/edoSamplerUniform.h +++ b/edo/src/edoSamplerUniform.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoUniform.h b/edo/src/edoUniform.h index 93d3b5372..01cf3cb30 100644 --- a/edo/src/edoUniform.h +++ b/edo/src/edoUniform.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoUniformCenter.h b/edo/src/edoUniformCenter.h index 8284439b1..22ce95164 100644 --- a/edo/src/edoUniformCenter.h +++ b/edo/src/edoUniformCenter.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/edoVectorBounds.h b/edo/src/edoVectorBounds.h index 3c00995f0..c72a10c2c 100644 --- a/edo/src/edoVectorBounds.h +++ b/edo/src/edoVectorBounds.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoCheckPoint.h b/edo/src/utils/edoCheckPoint.h index 90ba72e66..5ba25ac1b 100644 --- a/edo/src/utils/edoCheckPoint.h +++ b/edo/src/utils/edoCheckPoint.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoFileSnapshot.cpp b/edo/src/utils/edoFileSnapshot.cpp index 40f1db689..1860ac0f1 100644 --- a/edo/src/utils/edoFileSnapshot.cpp +++ b/edo/src/utils/edoFileSnapshot.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoFileSnapshot.h b/edo/src/utils/edoFileSnapshot.h index 43e6f0885..17d042636 100644 --- a/edo/src/utils/edoFileSnapshot.h +++ b/edo/src/utils/edoFileSnapshot.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoHyperVolume.h b/edo/src/utils/edoHyperVolume.h index a1bf4e594..85bcf0339 100644 --- a/edo/src/utils/edoHyperVolume.h +++ b/edo/src/utils/edoHyperVolume.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoPopStat.h b/edo/src/utils/edoPopStat.h index c8df5f969..4d5c9f10c 100644 --- a/edo/src/utils/edoPopStat.h +++ b/edo/src/utils/edoPopStat.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoStat.h b/edo/src/utils/edoStat.h index 24dce9c49..de5b4d2d2 100644 --- a/edo/src/utils/edoStat.h +++ b/edo/src/utils/edoStat.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoStatNormalMono.h b/edo/src/utils/edoStatNormalMono.h index 8cb28553c..b16b3ae58 100644 --- a/edo/src/utils/edoStatNormalMono.h +++ b/edo/src/utils/edoStatNormalMono.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index 74adb0baf..68af07357 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/src/utils/edoStatUniform.h b/edo/src/utils/edoStatUniform.h index ab75e66be..8ccb93be5 100644 --- a/edo/src/utils/edoStatUniform.h +++ b/edo/src/utils/edoStatUniform.h @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/test/t-bounderno.cpp b/edo/test/t-bounderno.cpp index 3f7a189b1..ac294ce7d 100644 --- a/edo/test/t-bounderno.cpp +++ b/edo/test/t-bounderno.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/test/t-continue.cpp b/edo/test/t-continue.cpp index 7206a0c35..2f2bd3247 100644 --- a/edo/test/t-continue.cpp +++ b/edo/test/t-continue.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp index 23324eef3..431f6f985 100644 --- a/edo/test/t-edoEstimatorNormalMulti.cpp +++ b/edo/test/t-edoEstimatorNormalMulti.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index 6f3b84f6c..a69bc8f1d 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/test/t-uniform.cpp b/edo/test/t-uniform.cpp index ec01ec7a5..228ce5e22 100644 --- a/edo/test/t-uniform.cpp +++ b/edo/test/t-uniform.cpp @@ -1,6 +1,6 @@ /* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your own estimation of distribution algorithms. This library is free software; you can redistribute it and/or diff --git a/edo/test/test_cov_parameters.py b/edo/test/test_cov_parameters.py index 7a90f1670..30688ca45 100755 --- a/edo/test/test_cov_parameters.py +++ b/edo/test/test_cov_parameters.py @@ -10,9 +10,9 @@ from numpy import arange if __name__ == '__main__': for p1 in list(arange(0.1, 1.1, 0.1)): - for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)): - for p3 in list(arange(0.1, 1.1, 0.1)): - gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) - cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen ) - print cmd - system( cmd ) + for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)): + for p3 in list(arange(0.1, 1.1, 0.1)): + gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) + cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen ) + print cmd + system( cmd ) diff --git a/eo/CHANGELOG b/eo/CHANGELOG index 09c7a2e60..56e4df4b1 100644 --- a/eo/CHANGELOG +++ b/eo/CHANGELOG @@ -1274,11 +1274,11 @@ Date: Thu Feb 22 08:27:32 2007 +0000 * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly uninitialized variables. - + * README.tmpl: Hint to regular Templates/README for details. - + * README: Add documentation for adding new source-files. - + * Makefile.am.src-tmpl (noinst_HEADERS): Add (MyStruct_SOURCES): Move header files from here to the new noinst_HEADERS variable. @@ -1315,7 +1315,7 @@ Date: Sun Jan 14 18:56:31 2007 +0000 for automake finding the scripts of eo itself if we run it in a embedded subdirectory. (COPYING, INSTALL): create. - + * README: State more explicitly what a "complete installation" means. Give build-instructions for moved directories. @@ -1359,9 +1359,9 @@ Author: kuepper Date: Mon Dec 18 11:17:55 2006 +0000 * TODO.html, README.html: Remove these old files. - + * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. - + * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 Author: kuepper @@ -1373,7 +1373,7 @@ Author: kuepper Date: Sun Dec 17 22:59:53 2006 +0000 * README: Better links to Templates/ - + * configure.in: Bump version to 1.0-beta2. Author: kuepper @@ -1402,11 +1402,11 @@ Date: Sat Dec 16 21:55:03 2006 +0000 * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use correct names for includes. - + * README.manual: This is a copy of the old README. - + * README: Describe the new way and setup of creating a new EO project. - + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: * configure.ac.tmpl: New files to create a standalone EO project from templates. @@ -1435,7 +1435,7 @@ Author: kuepper Date: Mon Dec 4 22:27:41 2006 +0000 * Makefile.am: Add t-eoRNG - + * t-eoRNG.cpp: Start test for random number generator. Author: kuepper @@ -1472,11 +1472,11 @@ Author: kuepper Date: Sun Dec 3 10:41:54 2006 +0000 * mainpage.html: update, add link to Niko Hansen's comparison - + * README: Add more specific note about tutorial. - + * configure.in: Bump version to 1.0-beta1 - + * tutorial/Makefile.am: Add all necessary files, including html and Templates to distribution. @@ -1517,13 +1517,13 @@ Author: kuepper Date: Sat Dec 2 10:18:57 2006 +0000 * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. - + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. - + * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this results in escape-codes (^@) to be printed at runtime and is not necessary anyway. - + * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to avoid compiler warnings. @@ -1531,7 +1531,7 @@ Author: kuepper Date: Sat Dec 2 09:39:13 2006 +0000 * eoRNG.h: Cleanup docs and document /all/ members. - + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. Author: kuepper @@ -1548,9 +1548,9 @@ Author: kuepper Date: Fri Dec 1 20:08:51 2006 +0000 * Makefile.am: Update for release-distribution. - + * Makefile.am: Add missing CMA header for distribution. - + * Makefile.am: Add missing header for distribution. Author: kuepper @@ -1603,7 +1603,7 @@ Author: kuepper Date: Thu Nov 16 12:52:46 2006 +0000 * configure.in (AC_DEBUG): add test - + * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, or NDEBUG according to its value. @@ -1613,10 +1613,10 @@ Date: Thu Nov 16 12:35:46 2006 +0000 * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise always use vecSigmaInit with default all values of sigmaInit. - + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else clause around ptParam (found or not). - + * eoParam.h (eoValueParam::setValue): Document. (eoValueParam >::setValue): Allow delimiters ',' and ';'. A plain ' ' does not work, as it is not correctly read by @@ -1973,9 +1973,9 @@ Date: Sun Oct 2 21:42:08 2005 +0000 - add a user-option for gnuplot-support - separate gnuplot-code into declaration and implementation, so we can define at EO-build-time whether to use it or not. - + Adopt code and Makefiles to above changes. - + Some minor fixes. Author: kuepper @@ -2311,7 +2311,7 @@ Date: Thu Dec 23 15:29:07 2004 +0000 Adjust code to perform to C++ standard according to gcc-3.4 interpretation... (Have not compiled/checked/changed paradisEO.) - + That is, the current code compiles with gcc-3.4 and the checks (besides t-MGE1bit) all pass. @@ -2362,7 +2362,7 @@ Date: Fri Nov 5 08:57:34 2004 +0000 easily read as a parameter) - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h Note that there is no equivalent to eoRealVectorBounds for vector of integers - + In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h The first one was already there by chance, through eoUniformInit.h @@ -2569,13 +2569,13 @@ Author: kuepper Date: Fri Sep 17 16:53:31 2004 +0000 Updated build-prcess to be completely under automake control. - + For the tutorial the old Makefiles are saved as Makefile.simple in all the respective directories. - + Use generated config.h instead of command-line passing of preprocessor flags. - + Updated support files from current automake. Author: kuepper @@ -3300,7 +3300,7 @@ Date: Sun Jan 5 16:31:50 2003 +0000 Added pyeo. Some changes needed to be made for include files and the like in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) - + eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. Author: maartenkeijzer @@ -3398,7 +3398,7 @@ Date: Wed Sep 18 12:40:46 2002 +0000 A new readFrom & printOn function for EO.h Now it CAN handle VALID/INVALID fitnesses. - + The problems are over at last Author: cahon @@ -3592,7 +3592,7 @@ Date: Mon Jun 17 04:13:45 2002 +0000 Adding the truncation selectors. 2 versions: eoTruncatedSelectOne is an eoSelectOne, and - eoTruncatedSelectMany works like an eoSelectMany (but is NOT) + eoTruncatedSelectMany works like an eoSelectMany (but is NOT) Author: jeggermo Date: Mon Jun 10 14:10:35 2002 +0000 @@ -3609,7 +3609,7 @@ Date: Mon May 13 11:31:32 2002 +0000 EO::printOn has been changed so that the printOn function will always print a valid fitness value even if the fitness is invalid - + Jeroen Author: jeggermo @@ -3827,7 +3827,7 @@ Date: Mon Apr 15 12:56:35 2002 +0000 eoParseTree printOn and readFrom functions changed for compatibility with paradisEO - + The fitness is now printed in the same way as in eoBit Author: evomarc @@ -4138,9 +4138,9 @@ Date: Mon Feb 4 14:28:00 2002 +0000 the gpsymreg code has been slightly altered to allow compilation using the Intel C++ Compiler for Linux. - + Other compilers should not be affected. - + A slightly different makefile is needed Author: jeggermo @@ -4317,7 +4317,7 @@ Date: Tue Dec 4 21:15:16 2001 +0000 some template classes and functions which did not need to be templates have been changed to normal classes and functions with hard coded typed - + This might help with M$VC++ 6.0 compatibility Author: jeggermo @@ -4537,8 +4537,8 @@ Date: Sat Nov 10 09:02:17 2001 +0000 Small modifications here and there to be MSVC++ compatible Mainly, time.h -> ctime - definition of loop index out of loops when multiply used - no typename in declaration using template typename + definition of loop index out of loops when multiply used + no typename in declaration using template typename Author: evomarc Date: Sat Nov 10 06:59:02 2001 +0000 @@ -4628,15 +4628,15 @@ Date: Sat Nov 3 22:10:11 2001 +0000 the name of the eoGpDepthInitializer class (initializer for parse_tree's has been changed to - + eoParseTreeDepthInit but backward compatibility is maintained by using a #define statement: - + #define eoGpDepthInitializer eoParseTreeDepthInit - + The initializer for strongly typed GP has been changed to eoStParseTreeDepthInit - + the gpsymreg application has been changed to use the new name Author: jeggermo @@ -4839,7 +4839,7 @@ Author: jeggermo Date: Tue Jul 17 08:58:52 2001 +0000 small documentation change for eoParseTree.h. - + added a depth initializer for strongly typed genetic programming added subtree xover for strongly typed genetic programming added branch mutation for strongly typed genetic programming @@ -4862,7 +4862,7 @@ Date: Wed Jul 4 04:44:30 2001 +0000 Adding eoPopEvalFunc, that handles evaluation globally: it receives two populations, parents and offspring, and does whatever necessary. The subclass eoPopLoopEval does the simple loop on the offspring. - + eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. @@ -4874,7 +4874,7 @@ Date: Tue Jul 3 12:56:44 2001 +0000 Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as before (it is then encapsulated into an eoPopLoopEval that does the good old loop on the offspring - or directly pass a full eoPopEvalFunc - + Small modification also in make_op_es -> keyword "none" is now recognized for one of the crossover of either object variables or stdev's @@ -4883,9 +4883,9 @@ Date: Mon Jul 2 13:31:04 2001 +0000 Changed the directory structure for gp now: eoParseTree <-- the eoParseTree class - eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) - eoParseTreeOp <-- the operators (xover and mutation) - + eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) + eoParseTreeOp <-- the operators (xover and mutation) + base documentation written for: * eoParseTree * eoGpDepthInitializer @@ -4895,9 +4895,9 @@ Date: Mon Jul 2 13:31:04 2001 +0000 * eoExpansionMutation * eoCollapseSubtreeMutation * eoHoistMutation - + I also created a group ParseTree which contains all classes related to eoParseTree - + eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp Author: jeggermo @@ -4978,16 +4978,16 @@ Author: jeggermo Date: Thu Jun 28 14:03:59 2001 +0000 new Mutation operators for eoParseTree in src/gp/eoGpMutate.h - + a symbolic regression example program added to the app-dir - + configure.in and Makefile(s).am changed Author: jeggermo Date: Thu Jun 28 13:55:14 2001 +0000 Additional mutation operators for eoParseTree - + * Point Mutation * Expansion Mutation * Collapse Subtree Mutation @@ -5195,7 +5195,7 @@ Date: Wed May 2 10:42:32 2001 +0000 src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover src/es/make_XXX_es.h for user-input test/t-eoEsAll.cpp to test - + However, an old bug appeared: className was not const in eoGenOp (and derived classes) so I had to change that throughtout the hierarchy @@ -5212,7 +5212,7 @@ Date: Mon Apr 30 13:24:42 2001 +0000 Changed the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) - + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain a copy into each representation dir!). @@ -5224,7 +5224,7 @@ Date: Mon Apr 30 13:01:07 2001 +0000 Changed the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) - + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain a copy into each representation dir!). @@ -5427,7 +5427,7 @@ Date: Wed Apr 4 03:47:33 2001 +0000 Added the signal handling - see eoCtrlCContinue.h I've disabled it in case of MSC as I don't know if this works there ... - + Also added a couple of "virtual" in the ga dir Author: evomarc @@ -5455,7 +5455,7 @@ Date: Wed Mar 28 09:00:54 2001 +0000 FDCStat and FileSnapshot: better error messageing Scalar fitness: is now a vector of doubles exercise3.1 added gnuplot again - + Don't know about eoCombinedContinue Author: evomarc @@ -5646,7 +5646,7 @@ Author: maartenkeijzer Date: Mon Mar 12 16:00:58 2001 +0000 EO: added overloaded printing of fitness (for vectors and pairs) - + Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth Author: maartenkeijzer @@ -5658,12 +5658,12 @@ Author: maartenkeijzer Date: Sat Mar 10 14:02:23 2001 +0000 Changed the populator to be a) more efficient and b) more useable - + It is no longer derived from eoPop, it now gets a destination population. This saves a lot of copying. The semantics has changed a little as well. It is now an _infinite_ iterator. operator++ will *not* dispense new individuals, but will merely stay at the end. To get a new indy, use operator*() as before. - + eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring eoGeneralBreeder is changed to reflect the changes in eoPopulator eoSequentialSelect now uses setup() rather than init() @@ -5717,7 +5717,7 @@ Date: Mon Feb 19 12:23:13 2001 +0000 To be able to use the primitive std::generate function, added a set of wrappers in eoSTLFunctor.h that have the copy semantics most STL functions expect (namely pass-by-value rather then pass-by-reference). - + Updated test/Makefile.am to also test t-eoRandom Author: evomarc @@ -5736,14 +5736,14 @@ Author: maartenkeijzer Date: Sat Feb 17 10:51:31 2001 +0000 eoVector is back (eoFixedLength and eoVariableLength are gone) - + Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: - + eoNormalGenerator eoUniformGenerator eoBooleanGenerator eoNegExpGenerator - + Note the suffix that are added to aid in determining what these classes do Author: evomarc @@ -5829,13 +5829,13 @@ Date: Wed Feb 14 14:09:16 2001 +0000 Author: maartenkeijzer Date: Wed Feb 14 10:35:26 2001 +0000 - + Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, without invalidating fitness. Added a set of invalidators to take over that job (see for instance eoSGA and eoSGATransform how this can transparantly used) - + Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) - + Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) and of course changed all the operators to reflect the change (and found a few that didn't @@ -5865,24 +5865,24 @@ Author: maartenkeijzer Date: Tue Feb 13 12:38:19 2001 +0000 fixed a bug: the parser now correctly parses parameters of the form - + -Pvalue - + This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply ashamed to have created such an off-by-one error. - + Marc assumed this was wanted behaviour (so that it should read: -P=value) I must admit that this is a logical conclusion, though it was merely a side-effect of the error. To not force Marc to rewrite the tutorial and his way of working with EO, I decided to make a feature out of the bug, so that now the parser will parse: - + -Pvalue -P=value - + and of course the true and blue: - + -Parameter=value - + I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) Author: maartenkeijzer @@ -5894,14 +5894,14 @@ Author: maartenkeijzer Date: Mon Feb 12 13:58:51 2001 +0000 Ok, updated the Makefile.am again to use the - + make check - + Command I picked up in the automake documentation (RTFM, you know) - + Tagged a lot of header functions in the GnuPlot files with 'inline', so they can be used from more than one sourcefile. - + Ok, now the interesting news. Started a new library libga (not to be confused with Matthew's GaLib). Here I suggest we put a fairly complete and configurable genetic algorithm. Just to see how far we can stretch ourselves and also to have @@ -5920,7 +5920,7 @@ Author: maartenkeijzer Date: Sun Feb 11 16:25:03 2001 +0000 Removed small bug in reading outside a buffer in eoParser::readFrom - + This caused the parser to crash when a simple flag of the form program -f was given. @@ -6014,8 +6014,8 @@ Date: Fri Feb 9 05:09:26 2001 +0000 I also changed - the eoQuadratic into eoQuad (as dicussed with Maarten) - the eoBin into eoBit, with more appropriate names for the "binary" - operators (that can be unary!) as no one protested when I posted on - eodev list + operators (that can be unary!) as no one protested when I posted on + eodev list Author: evomarc Date: Wed Feb 7 05:15:18 2001 +0000 @@ -6039,7 +6039,7 @@ Date: Wed Feb 7 05:04:24 2001 +0000 Added selection methods eoBestSelect always return the best individual eoSequentialSelect a selectOne version of eoDetSelect (uses an index to - return next offspring from sorted pop) + return next offspring from sorted pop) Author: evomarc Date: Thu Feb 1 05:27:36 2001 +0000 @@ -6061,7 +6061,7 @@ Date: Wed Jan 31 18:38:39 2001 +0000 every generation) which is different from the continuous monitoring (same file/plot is angemented every generation). This lead to a number of modifications in many files in utils dir - + But now we can watch on-line - fitness spreadout - FDC plots @@ -6078,7 +6078,7 @@ Date: Mon Jan 29 10:25:44 2001 +0000 Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. The former simply set values to the boundary values in case they are out The latter allows to short-cut all bound-checks when no need - + SOme day I will put this in utils, and have a eoRealBounds.cpp in the pre-compiled library @@ -6129,12 +6129,12 @@ Date: Sat Jan 27 07:43:58 2001 +0000 eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) - + To be continued by gp.h, and ... - + This has lead to some slight modifications in test file eobin and all tutorial examples files... - + I've also added in utils eoDistance, generic functor to compute distances, including also the generic Euclidian distance @@ -6145,9 +6145,9 @@ Date: Sat Jan 27 07:41:46 2001 +0000 eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) - + To be continued by gp.h, and ... - + This has lead to some slight modifications in test file eobin and all tutorial examples files... @@ -6405,7 +6405,7 @@ Date: Tue Jan 2 07:03:57 2001 +0000 permanent parameters (eoParser only holds references), and egcs did not allow to create them by reference, i.e. in the line eoValueParam & blablaParam(...); - + So now everything is done in the main_function, and 3 lines are needed to create and read every paramter (sigh ...) @@ -6483,16 +6483,16 @@ Date: Tue Dec 19 18:41:19 2000 +0000 THe big eoReplacement update: The interface for eoReplacement is now eoPop&, eoPop& (i.e. no const) and the result must be in the first argument in the end. - + Hence it is possible to do SSGA and all intermediate replacmeent procedures - + The classes derived from eoMergeReduce.h are now in a separate file The SSGA-like replcaement procedures are in eoReduceMerge.h A more general replacement can be found in eoSurviveAndDie.h (it could be made a littel more general - still open for upgrades). - + Also some accessors have been added to the eoPop (best and worse individuals) - + And include file eo has been updated Author: evomarc @@ -6630,16 +6630,16 @@ Author: evomarc Date: Mon Dec 4 06:58:43 2000 +0000 Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, - a method called lastCall is called for everything contained in that checkpoint - (stats, updaters and monitors). This can be extremely useful - - for stateSavers (see below) - - for monitoring things like rates of success of operators, where what you - are interested in is the final result only. + a method called lastCall is called for everything contained in that checkpoint + (stats, updaters and monitors). This can be extremely useful + - for stateSavers (see below) + - for monitoring things like rates of success of operators, where what you + are interested in is the final result only. Added of course a virtual method lastCall that does nothing by default in classes - eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor + eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall - so you can ask that the state is saved at final population, whatever happens. - I also added the corresponding constructor to take this into account. + so you can ask that the state is saved at final population, whatever happens. + I also added the corresponding constructor to take this into account. Author: evomarc Date: Mon Dec 4 05:55:59 2000 +0000 @@ -6822,8 +6822,8 @@ Author: evomarc Date: Tue Nov 28 06:46:37 2000 +0000 Modified the contructor: the default value for the delimiter is now " " - and I added a boolean argument to indicate whether or not we want to - overwrite an existing file with same name (default is overwrite). + and I added a boolean argument to indicate whether or not we want to + overwrite an existing file with same name (default is overwrite). Added the getFileName accessor. Author: evomarc @@ -7085,7 +7085,7 @@ Author: maartenkeijzer Date: Fri Oct 6 10:41:38 2000 +0000 Added an eoSortedStatBase for more efficient statistic calculations - + updated a few makefiles to include the html and latex docs with the distribution. @@ -7844,12 +7844,12 @@ Author: mac Date: Mon Mar 6 16:05:47 2000 +0000 Fixed bug in eoGOpSelector (missing break!) - + eoOp.h: binOp's second arg is const once more - + all dsp and dsw files were touched by msvc, but did add some stuff (which will be added to eo later) - + Hope this all works Author: mac @@ -7879,7 +7879,7 @@ Author: marc Date: Tue Feb 29 05:14:40 2000 +0000 wherease the command "cvs ci" is OK. - + Here we go: - added the virtual destructors of all classes, to suppress g++ annoying warnings when using -Wall option @@ -7930,7 +7930,7 @@ Date: Sat Feb 19 16:30:42 2000 +0000 Moved the static eoRNG rng to an extern eoRNG This external object is now defined in eoPersistent.cpp - + This should change... Author: mac diff --git a/eo/COPYING b/eo/COPYING index 2bb5b6e51..b8df7fd44 100644 --- a/eo/COPYING +++ b/eo/COPYING @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an @@ -457,7 +457,7 @@ DAMAGES. END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Libraries + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that diff --git a/eo/ConfigureChecks.cmake b/eo/ConfigureChecks.cmake index a8ef34aa0..ee687fdf3 100644 --- a/eo/ConfigureChecks.cmake +++ b/eo/ConfigureChecks.cmake @@ -1,4 +1,3 @@ - # NOTE: only add something here if it is really needed by EO include(CheckIncludeFile) @@ -7,17 +6,17 @@ include(CheckSymbolExists) include(CheckFunctionExists) include(CheckLibraryExists) -check_library_exists(m cos "cos in libm" HAVE_LIBM) +check_library_exists(m cos "cos in libm" HAVE_LIBM) -check_include_files(cmath.h "cmath.h" HAVE_CMATH_H) -check_include_files(stdio.h "stdio.h" HAVE_STDIO_H) -check_include_files(stdlib.h "stdlib.h" HAVE_STDLIB_H) -check_include_files(string.h "string.h" HAVE_STRING_H) -check_include_files(strings.h "strings.h" HAVE_STRINGS_H) -check_include_files(malloc.h "malloc.h" HAVE_MALLOC_H) -check_include_files(limits.h "limits.h" HAVE_LIMITS_H) -check_include_files(unistd.h "unistd.h" HAVE_UNISTD_H) -check_include_files(stdint.h "stdint.h" HAVE_STDINT_H) +check_include_files(cmath.h "cmath.h" HAVE_CMATH_H) +check_include_files(stdio.h "stdio.h" HAVE_STDIO_H) +check_include_files(stdlib.h "stdlib.h" HAVE_STDLIB_H) +check_include_files(string.h "string.h" HAVE_STRING_H) +check_include_files(strings.h "strings.h" HAVE_STRINGS_H) +check_include_files(malloc.h "malloc.h" HAVE_MALLOC_H) +check_include_files(limits.h "limits.h" HAVE_LIMITS_H) +check_include_files(unistd.h "unistd.h" HAVE_UNISTD_H) +check_include_files(stdint.h "stdint.h" HAVE_STDINT_H) # Use check_symbol_exists to check for symbols in a reliable @@ -27,7 +26,4 @@ check_include_files(stdint.h "stdint.h" HAVE_STDINT_H) # specific order. Refer to the man page for each symbol for which a # check is to be added to get the proper set of headers. Example : -#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE) - - - +#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE) diff --git a/eo/INSTALL b/eo/INSTALL index 6336b026e..89a456253 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -233,4 +233,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/eo/LICENSE b/eo/LICENSE index 223ede7de..b8df7fd44 100644 --- a/eo/LICENSE +++ b/eo/LICENSE @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an @@ -457,7 +457,7 @@ DAMAGES. END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Libraries + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that @@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names: Ty Coon, President of Vice That's all there is to it! - - diff --git a/eo/NEWS b/eo/NEWS index 0f067e003..92beb69aa 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -7,11 +7,11 @@ - GCC 4.3 compatibility - new versatile log system with several nested verbose levels - classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files: - eo/src/eoCombinedInit.h - eo/src/eoGenContinue.h - eo/src/eoProportionalCombinedOp.h - eo/src/utils/eoData.h - eo/src/utils/eoStdoutMonitor.h + eo/src/eoCombinedInit.h + eo/src/eoGenContinue.h + eo/src/eoProportionalCombinedOp.h + eo/src/utils/eoData.h + eo/src/utils/eoStdoutMonitor.h - an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations - new monitor that can write on any ostream - new continuator that can catch POSIX system user signals @@ -33,10 +33,9 @@ - Add Microsoft Visual C++ project support files (for Visual Studio 2003 and 2005) - Upgrade Teamplates/ script to create a complete standalone EO project (using autotools) - Remove support for pre-standard C++ compiler (i.e. gcc-2.x), which allows to - clean up the code considerably. + clean up the code considerably. Assume availability of sstream and limits. * release 0.9.3z.1 (1. Oct. 2005) - Support gcc-3.4 and gcc.4.x. - Provide full automake/autoconf/configure support. - diff --git a/eo/README b/eo/README index 0ce229362..98cf75e11 100644 --- a/eo/README +++ b/eo/README @@ -1,8 +1,7 @@ - - EO README FILE + EO README FILE ======================================================================= - check latest news at http://eodev.sourceforge.net/ + check latest news at http://eodev.sourceforge.net/ ======================================================================= Welcome to EO, the Evolving Objects library. @@ -14,7 +13,7 @@ In case of any problem, please e-mail us at eodev-help@lists.sourceforge.net, eodev@egroups.com To get started, take a look at the tutorial, starting with - ./tutorial/html/eoTutorial.html + ./tutorial/html/eoTutorial.html The easiest way to start programming a new genome with all EO evolution engines handy is to create a new standalone EO project from @@ -23,11 +22,11 @@ an introduction;) ================================================================== - BUILDING EO + BUILDING EO ================================================================== The basic installation procedure goes the following: -Go to your build-directory and run +Go to your build-directory and run $(SRCDIR)/configure make make check @@ -50,7 +49,7 @@ specific about EO. =================================================================== - DIRECTORY STRUCTURE + DIRECTORY STRUCTURE =================================================================== After unpacking the archive file, you should end up with the following structure: @@ -63,7 +62,7 @@ structure: | | | +- ga bistring-genotypes source files | | - | +- es real-valued-genotypes source files + | +- es real-valued-genotypes source files | | | +- gp Genetic Programming source files | | @@ -74,9 +73,9 @@ structure: +-- tutorial TUTORIAL dir (indeed :-) | | | +- html all html files - start by browsing index.html - | | + | | | +- LessonX for X=1, 2, 3, ... : example of increasing complexity - | + | | | +-- doc DOCUMENTATION dir (generated by Doxygen) @@ -93,7 +92,7 @@ structure: | +-- app APPLICATIONS - one dir per separate application | | - | +- gprop GA/backpropagation for neural nets + | +- gprop GA/backpropagation for neural nets | | | +- mastermind the wellknown MasterMind game | @@ -103,7 +102,7 @@ structure: =================================================================== - NOTES + NOTES =================================================================== If you extracted a fresh snapshot from the cvs-repository, remember to run diff --git a/eo/app/gprop/CMakeLists.txt b/eo/app/gprop/CMakeLists.txt index e19df9bd8..e37af2e5f 100644 --- a/eo/app/gprop/CMakeLists.txt +++ b/eo/app/gprop/CMakeLists.txt @@ -18,15 +18,14 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) SET (GPROP_SOURCES gprop.cpp) # especially for Visual Studio -IF(NOT WIN32 OR CYGWIN) - ADD_EXECUTABLE(gprop ${GPROP_SOURCES}) +IF(NOT WIN32 OR CYGWIN) + ADD_EXECUTABLE(gprop ${GPROP_SOURCES}) ADD_DEPENDENCIES(gprop eo eoutils) - - TARGET_LINK_LIBRARIES(gprop eo eoutils) - + + TARGET_LINK_LIBRARIES(gprop eo eoutils) + SET(GPROP_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(gprop PROPERTIES VERSION "${GPROP_VERSION}") ENDIF(NOT WIN32 OR CYGWIN) ###################################################################################### - diff --git a/eo/app/gprop/gprop.h b/eo/app/gprop/gprop.h index 989041863..db67c1885 100644 --- a/eo/app/gprop/gprop.h +++ b/eo/app/gprop/gprop.h @@ -207,12 +207,12 @@ int correct(const mlp::net& net, const mlp::set& set) unsigned partial = 0; for (unsigned i = 0; i < s->output.size(); ++i) - if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) || - (s->output[i] > 0.5 && net(s->input)[i] > 0.5)) - ++partial; + if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) || + (s->output[i] > 0.5 && net(s->input)[i] > 0.5)) + ++partial; if (partial == s->output.size()) - ++sum; + ++sum; } return sum; diff --git a/eo/app/gprop/l2.h b/eo/app/gprop/l2.h index 011c66109..cff4a67c3 100644 --- a/eo/app/gprop/l2.h +++ b/eo/app/gprop/l2.h @@ -29,7 +29,7 @@ namespace l2 //--------------------------------------------------------------------------- // error //--------------------------------------------------------------------------- - + real error(const mlp::net& net, const set& ts) { real error_ = 0.0; @@ -37,12 +37,12 @@ namespace l2 for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) { vector out = net(s->input); - + for (unsigned i = 0; i < out.size(); ++i) { real target = s->output[i]; real value = out[i]; - error_ -= target * log(value + min_real) + + error_ -= target * log(value + min_real) + (1.0 - target) * log(1.0 - value + min_real); } } @@ -53,25 +53,25 @@ namespace l2 //------------------------------------------------------------------------- // l2 //------------------------------------------------------------------------- - + class net: public qp::net { public: net(mlp::net& n): qp::net(n) {} - + real error(const set& ts) { real error_ = 0; - + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) { forward(s->input); error_ -= backward(s->input, s->output); } - + return error_; } - + private: real backward(const vector& input, const vector& output) { @@ -84,7 +84,7 @@ namespace l2 { neuron& n = (*current_layer)[j]; real out = output[j]; - n.ndelta += n.delta = (out - n.out) / + n.ndelta += n.delta = (out - n.out) / (n.out * (1.0 - n.out) + min_real) * n.out * (1.0 - n.out); if (size() == 1) // monolayer @@ -92,21 +92,21 @@ namespace l2 else // multilayer for (unsigned k = 0; k < n.dxo.size(); ++k) n.dxo[k] += n.delta * (*backward_layer)[k].out; - - error_ += out * log(n.out + min_real) + + + error_ += out * log(n.out + min_real) + (1.0 - out) * log(1.0 - n.out + min_real); } - + // hidden layers while (++current_layer != rend()) { reverse_iterator forward_layer = current_layer - 1; - reverse_iterator backward_layer = current_layer + 1; - + reverse_iterator backward_layer = current_layer + 1; + for (unsigned j = 0; j < current_layer->size(); ++j) { neuron& n = (*current_layer)[j]; - real sum = 0; + real sum = 0; for (unsigned k = 0; k < forward_layer->size(); ++k) { neuron& nf = (*forward_layer)[k]; @@ -114,7 +114,7 @@ namespace l2 } n.delta = n.out * (1.0 - n.out) * sum; n.ndelta += n.delta; - + if (backward_layer == rend()) // first hidden layer n.dxo += n.delta * input; else // rest of hidden layers @@ -122,19 +122,19 @@ namespace l2 n.dxo[k] += n.delta * (*backward_layer)[k].out; } } - + return error_; } }; - + //--------------------------------------------------------------------------- - + } // namespace l2 //----------------------------------------------------------------------------- #endif // l2_h -// Local Variables: -// mode:C++ +// Local Variables: +// mode:C++ // End: diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index dbd12bda2..c7c612826 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -45,7 +45,7 @@ namespace std { istream& operator>>(istream& is, mlp::vector& v) { for (mlp::vector::iterator vi = v.begin() ; vi != v.end() ; vi++) { - is >> *vi; + is >> *vi; } return is; } @@ -133,15 +133,15 @@ namespace mlp #ifdef HAVE_LIBYAML_CPP YAML_SERIALIZABLE_AUTO(neuron) void emit_yaml(YAML::Emitter&out) const { - out << YAML::BeginMap; - out << YAML::Key << "Class" << YAML::Value << "mlp::neuron"; - YAML_EMIT_MEMBER(out,bias); - YAML_EMIT_MEMBER(out,weight); - out << YAML::EndMap; + out << YAML::BeginMap; + out << YAML::Key << "Class" << YAML::Value << "mlp::neuron"; + YAML_EMIT_MEMBER(out,bias); + YAML_EMIT_MEMBER(out,weight); + out << YAML::EndMap; } void load_yaml(const YAML::Node& node) { - YAML_LOAD_MEMBER(node, bias); - YAML_LOAD_MEMBER(node, weight); + YAML_LOAD_MEMBER(node, bias); + YAML_LOAD_MEMBER(node, weight); } #endif }; @@ -213,17 +213,17 @@ namespace mlp { } #ifdef HAVE_LIBYAML_CPP friend ostream& operator<<(YAML::Emitter& e, const layer &l) { - e << ((std::vector)l); + e << ((std::vector)l); } friend void operator>>(const YAML::Node& n, layer &l) { - // These temporary variable shenanegins are necessary because - // the compiler gets very confused about which template operator>> - // function to use. - // The following does not work: n >> l; - // So we use a temporary variable thusly: - std::vector *obviously_a_vector = &l; - n >> *obviously_a_vector; + // These temporary variable shenanegins are necessary because + // the compiler gets very confused about which template operator>> + // function to use. + // The following does not work: n >> l; + // So we use a temporary variable thusly: + std::vector *obviously_a_vector = &l; + n >> *obviously_a_vector; } #endif @@ -243,7 +243,7 @@ namespace std { istream& operator>>(istream& is, mlp::layer& l) { for (mlp::layer::iterator li = l.begin() ; li != l.end() ; li++) { - is >> *li; + is >> *li; } return is; } @@ -277,15 +277,15 @@ namespace mlp { #ifdef HAVE_LIBYAML_CPP YAML_SERIALIZABLE_AUTO(net) void emit_members(YAML::Emitter&out) const { - const std::vector* me_as_layer_vector = this; - out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector; + const std::vector* me_as_layer_vector = this; + out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector; } void load_members(const YAML::Node& node) { - std::vector* me_as_layer_vector = this; - node["layers"] >> *me_as_layer_vector; + std::vector* me_as_layer_vector = this; + node["layers"] >> *me_as_layer_vector; } - #endif // HAVE_LIBYAML_CPP + #endif // HAVE_LIBYAML_CPP /** Virtual destructor */ virtual ~net() {}; @@ -303,14 +303,14 @@ namespace mlp { is >> layer_size; layer_sizes.push_back(layer_size); } - unsigned check_outputs; + unsigned check_outputs; is >> check_outputs; assert (check_outputs == num_outputs); init (num_inputs,num_outputs,layer_sizes); - // skip forward to pass up opening '<' char - char c=' '; - while (c!='<' && !is.eof()) { is >> c;} - for (iterator l =begin() ; l != end(); l++) { + // skip forward to pass up opening '<' char + char c=' '; + while (c!='<' && !is.eof()) { is >> c;} + for (iterator l =begin() ; l != end(); l++) { is >> *l; } do { is >> c; } while (c == ' ' && !is.eof()); @@ -351,15 +351,15 @@ namespace mlp { } void save(ostream &os) const { - // Save the number of inputs, number of outputs, and number of hidden layers + // Save the number of inputs, number of outputs, and number of hidden layers os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n"; - for(const_iterator l = begin(); l != end(); ++l) + for(const_iterator l = begin(); l != end(); ++l) os << l->size() << " "; - os << "\n"; - os << "< "; - for(const_iterator l = begin(); l != end(); ++l) + os << "\n"; + os << "< "; + for(const_iterator l = begin(); l != end(); ++l) os << *l << " "; - os << ">\n"; + os << ">\n"; } @@ -454,7 +454,7 @@ namespace mlp { void load(istream &is) { unsigned input_size, output_size; - is >> input_size >> output_size; + is >> input_size >> output_size; sample samp(input_size, output_size);; while (is >> samp) { push_back(samp); } } diff --git a/eo/app/gprop/mse.h b/eo/app/gprop/mse.h index 841a88e3e..3fb62fa09 100644 --- a/eo/app/gprop/mse.h +++ b/eo/app/gprop/mse.h @@ -28,7 +28,7 @@ namespace mse //--------------------------------------------------------------------------- // error //--------------------------------------------------------------------------- - + real error(const mlp::net& net, const set& ts) { real error_ = 0.0; @@ -36,7 +36,7 @@ namespace mse for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) { vector out = net(s->input); - + for (unsigned i = 0; i < out.size(); ++i) { real diff = s->output[i] - out[i]; @@ -49,26 +49,26 @@ namespace mse //------------------------------------------------------------------------- // mse //------------------------------------------------------------------------- - + class net: public qp::net { public: net(mlp::net& n): qp::net(n) {} - + real error(const set& ts) { real error_ = 0; - + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) { forward(s->input); error_ += backward(s->input, s->output); } error_ /= ts.size(); - + return error_; } - + private: real backward(const vector& input, const vector& output) { @@ -89,22 +89,22 @@ namespace mse else // multilayer for (unsigned k = 0; k < n.dxo.size(); ++k) n.dxo[k] += n.delta * (*backward_layer)[k].out; - + error_ += diff * diff; } - + // hidden layers while (++current_layer != rend()) { reverse_iterator forward_layer = current_layer - 1; reverse_iterator backward_layer = current_layer + 1; - + for (unsigned j = 0; j < current_layer->size(); ++j) { - + neuron& n = (*current_layer)[j]; real sum = 0; - + for (unsigned k = 0; k < forward_layer->size(); ++k) { neuron& nf = (*forward_layer)[k]; @@ -113,8 +113,8 @@ namespace mse n.delta = n.out * (1.0 - n.out) * sum; n.ndelta += n.delta; - - + + if (backward_layer == rend()) // first hidden layer n.dxo += n.delta * input; else // rest of hidden layers @@ -122,19 +122,19 @@ namespace mse n.dxo[k] += n.delta * (*backward_layer)[k].out; } } - + return error_; } }; //--------------------------------------------------------------------------- - + } // namespace mse //----------------------------------------------------------------------------- #endif // mse_h -// Local Variables: -// mode:C++ +// Local Variables: +// mode:C++ // End: diff --git a/eo/app/gprop/qp.h b/eo/app/gprop/qp.h index 068d13820..fb9836759 100644 --- a/eo/app/gprop/qp.h +++ b/eo/app/gprop/qp.h @@ -41,55 +41,55 @@ namespace qp const real backtrack_step = 0.5; const real me_floor = 0.0001; const real mw_floor = 0.0001; - + //--------------------------------------------------------------------------- // neuron //--------------------------------------------------------------------------- - + struct neuron { mlp::neuron* n; real out, delta, ndelta, dbias1, dbias2; vector dweight1, dweight2, dxo; - - neuron(mlp::neuron& _n): - n(&_n), out(0), delta(0), ndelta(0), dbias1(0), dbias2(0), - dweight1(n->weight.size(), 0), - dweight2(n->weight.size(), 0), + + neuron(mlp::neuron& _n): + n(&_n), out(0), delta(0), ndelta(0), dbias1(0), dbias2(0), + dweight1(n->weight.size(), 0), + dweight2(n->weight.size(), 0), dxo(n->weight.size(), 0) {} - + void reset() { // underlaying neuron n->reset(); - + // addons out = delta = ndelta = dbias1 = dbias2 = 0; fill(dweight1.begin(), dweight1.end(), 0); fill(dweight2.begin(), dweight2.end(), 0); fill(dxo.begin(), dxo.end(), 0); } - + real operator()(const vector& input) { - return out = mlp::sigmoid(n->bias + dbias1 + + return out = mlp::sigmoid(n->bias + dbias1 + (n->weight + dweight1) * input); } }; - + std::ostream& operator<<(std::ostream& os, const neuron& n) { - return os << *n.n << " " << n.out << " " << n.delta << " " - << n.ndelta << " " << n.dbias1 << " " << n.dbias2 << " " + return os << *n.n << " " << n.out << " " << n.delta << " " + << n.ndelta << " " << n.dbias1 << " " << n.dbias2 << " " << n.dweight1 << " " << n.dweight2 << " " << n.dxo; } - - + + //--------------------------------------------------------------------------- // layer //--------------------------------------------------------------------------- - + class layer: public std::vector { public: @@ -102,16 +102,16 @@ namespace qp void reset() { for(iterator n = begin(); n != end(); ++n) - n->reset(); + n->reset(); } vector operator()(const vector& input) { vector output(size()); - + for(unsigned i = 0; i < output.size(); ++i) - output[i] = (*this)[i](input); - + output[i] = (*this)[i](input); + return output; } }; @@ -120,10 +120,10 @@ namespace qp //--------------------------------------------------------------------------- // net //--------------------------------------------------------------------------- - + class net: public std::vector { - public: + public: net(mlp::net& n) //: std::vector(n.begin(), n.end()) { reset(); } { for (mlp::net::iterator l = n.begin(); l != n.end(); ++l) @@ -135,27 +135,27 @@ namespace qp void reset() { for(iterator l = begin(); l != end(); ++l) - l->reset(); + l->reset(); } - - real train(const set& ts, - unsigned epochs, - real target_error, + + real train(const set& ts, + unsigned epochs, + real target_error, real tolerance, - real eta = eta_default, - real momentum = alpha_default, + real eta = eta_default, + real momentum = alpha_default, real lambda = lambda_default) { real error_ = max_real; - + while (epochs-- && error_ > target_error) { real last_error = error_; - + init_delta(); error_ = error(ts); - + if (error_ < last_error + tolerance) { coeff_adapt(eta, momentum, lambda); @@ -170,10 +170,10 @@ namespace qp error_ = last_error; } } - + return error_; } - + virtual real error(const set& ts) = 0; // protected: @@ -185,7 +185,7 @@ namespace qp input.swap(tmp); } } - + // private: void init_delta() { @@ -193,11 +193,11 @@ namespace qp for (layer::iterator n = l->begin(); n != l->end(); ++n) fill(n->dxo.begin(), n->dxo.end(), n->ndelta = 0.0); } - + void coeff_adapt(real& eta, real& momentum, real& lambda) { real me = 0, mw = 0, ew = 0; - + for (iterator l = begin(); l != end(); ++l) for (layer::iterator n = l->begin(); n != l->end(); ++n) { @@ -205,7 +205,7 @@ namespace qp mw += n->dweight1 * n->dweight1; ew += n->dxo * n->dweight1; } - + me = std::max(static_cast(sqrt(me)), me_floor); mw = std::max(static_cast(sqrt(mw)), mw_floor); eta *= (1.0 + 0.5 * ew / ( me * mw)); @@ -213,11 +213,11 @@ namespace qp lambda = lambda0 * me / mw; momentum = eta * lambda; #ifdef DEBUG - std::cout << me << " \t" << mw << " \t" << ew << " \t" + std::cout << me << " \t" << mw << " \t" << ew << " \t" << eta << " \t" << momentum << " \t" << lambda << std::endl; #endif // DEBUG } - + void weight_update(unsigned size, bool fire, real eta, real momentum) { for (iterator l = begin(); l != end(); ++l) @@ -239,13 +239,13 @@ namespace qp }; //--------------------------------------------------------------------------- - + } // namespace qp //----------------------------------------------------------------------------- #endif // qp_h -// Local Variables: -// mode:C++ +// Local Variables: +// mode:C++ // End: diff --git a/eo/app/gprop/vecop.h b/eo/app/gprop/vecop.h index 2654f2b1c..dd4a23a8a 100644 --- a/eo/app/gprop/vecop.h +++ b/eo/app/gprop/vecop.h @@ -160,14 +160,14 @@ template std::ostream& operator<<(std::ostream& os, const std::vector(os, " ")); os << v.back(); - } + } return os << '>'; } template std::istream& operator>>(std::istream& is, std::vector& v) { v.clear(); - + char c; is >> c; if (!is || c != '<') @@ -186,7 +186,7 @@ template std::istream& operator>>(std::istream& is, std::vector& v) } } while (is && c != '>'); } - + return is; } @@ -194,11 +194,11 @@ template std::istream& operator>>(std::istream& is, std::vector& v) // euclidean_distance //----------------------------------------------------------------------------- -template T euclidean_distance(const std::vector& v1, +template T euclidean_distance(const std::vector& v1, const std::vector& v2) { T sum = 0, tmp; - + for (unsigned i = 0; i < v1.size(); ++i) { tmp = v1[i] - v2[i]; @@ -211,4 +211,3 @@ template T euclidean_distance(const std::vector& v1, //----------------------------------------------------------------------------- #endif - diff --git a/eo/app/gpsymreg/CMakeLists.txt b/eo/app/gpsymreg/CMakeLists.txt index 45b561e16..1bb258678 100644 --- a/eo/app/gpsymreg/CMakeLists.txt +++ b/eo/app/gpsymreg/CMakeLists.txt @@ -18,8 +18,8 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) SET (GPSYMREG_SOURCES main.cpp) # no matter what is the OS, hopefully -ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES}) - +ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES}) + ADD_DEPENDENCIES(gpsymreg eo eoutils) ###################################################################################### @@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}") TARGET_LINK_LIBRARIES(gpsymreg eo eoutils) ###################################################################################### - diff --git a/eo/app/gpsymreg/fitness.h b/eo/app/gpsymreg/fitness.h index 90047cc71..d4fdb5056 100644 --- a/eo/app/gpsymreg/fitness.h +++ b/eo/app/gpsymreg/fitness.h @@ -14,7 +14,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - jeggermo@liacs.nl + jeggermo@liacs.nl */ #ifndef _FITNESS_FUNCTION_H @@ -225,4 +225,3 @@ class RegFitness: public eoEvalFunc< eoParseTree > }; #endif - diff --git a/eo/app/gpsymreg/main.cpp b/eo/app/gpsymreg/main.cpp index 98823e345..6d3318ff6 100644 --- a/eo/app/gpsymreg/main.cpp +++ b/eo/app/gpsymreg/main.cpp @@ -30,7 +30,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es - jeggermo@liacs.nl + jeggermo@liacs.nl */ @@ -146,25 +146,25 @@ int main(int argc, char *argv[]) // the parameters are passed on as well - RegFitness eval(generationCounter, initSequence, parameter); + RegFitness eval(generationCounter, initSequence, parameter); // Depth Initializor, set for Ramped Half and Half Initialization - eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence, true, true); + eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence, true, true); // create the initial population - Pop pop(parameter.population_size, initializer); + Pop pop(parameter.population_size, initializer); // and evaluate the individuals - apply(eval, pop); + apply(eval, pop); @@ -335,10 +335,3 @@ int main(int argc, char *argv[]) } - - - - - - - diff --git a/eo/app/gpsymreg/node.h b/eo/app/gpsymreg/node.h index 85aa4479e..02b0279b1 100644 --- a/eo/app/gpsymreg/node.h +++ b/eo/app/gpsymreg/node.h @@ -3,18 +3,18 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - jeggermo@liacs.nl + jeggermo@liacs.nl */ #ifndef _NODE_H @@ -33,13 +33,13 @@ using namespace std; /* A new Operation and Node class for even more flexibility. Improvements over the t-eoSymreg code are: - + * No hardcoded functions or operators. The Operation and Node class below allow you to specify your own unary and binary functions as well as binary operators (like +,-,*,/). Moreover you can detemine if you want to allow primitve subroutines with either one or two arguments. - - If a Node has a subroutine Operation it will take evaluate the first + + If a Node has a subroutine Operation it will take evaluate the first (and possible second) child branch and use them as input variables for the remaining second (or third) child branch. */ @@ -47,20 +47,20 @@ using namespace std; typedef enum {Variable, UFunction, BFunction, BOperator, Const} Type; -typedef double (*BinaryFunction)(const double,const double); +typedef double (*BinaryFunction)(const double,const double); typedef double (*UnaryFunction)(const double); struct Operation { public: - + typedef unsigned int VariableID; typedef string Label; - + // if your compiler allows you to have nameless unions you can make this a // union by removing the //'s below - + //union //{ UnaryFunction uFunction; @@ -68,34 +68,34 @@ struct Operation VariableID id; double constant; //}; - - - + + + Label label; Type type; - + // the default constructor results in a constant with value 0 Operation() : constant(0), label("0"), type(Const){}; // two possible constructors for Unary Functions Operation(UnaryFunction _uf, Label _label): uFunction(_uf), label(_label), type(UFunction) {}; Operation(Label _label, UnaryFunction _uf): uFunction(_uf), label(_label), type(UFunction) {}; - + // Watch out there are two constructors using pointers two binary functions: // Binary Function (printed as label(subtree0,subtree1) (e.g. pow(x,y)) // Binary Operator (printed as (subtree0 label subtree1) (e.g. x^y) // The difference is purely cosmetic. - + // If you specify the label before the function pointer -> Binary Function Operation(Label _label, BinaryFunction _bf): bFunction(_bf), label(_label), type(BFunction) {}; // If you specify the function pointer before the label -> Binary Operator Operation(BinaryFunction _bf, Label _label): bFunction(_bf), label(_label), type(BOperator) {}; - + // A constructor for variables Operation(VariableID _id, Label _label): id(_id), label(_label), type(Variable) {}; // A constructor for constants Operation(double _constant, Label _label): constant(_constant), label(_label), type(Const) {}; - - + + Operation(const Operation &_op) { switch(_op.type) @@ -110,7 +110,7 @@ struct Operation label = _op.label; }; virtual ~Operation(){}; - + }; @@ -118,14 +118,14 @@ class Node { private: Operation op; - + public: - + Node(void): op(Operation()){}; Node(Operation &_op) : op(_op){}; virtual ~Node(void) {} - - int arity(void) const + + int arity(void) const { switch(op.type) { @@ -134,53 +134,53 @@ class Node case BFunction: return 2; case BOperator: return 2; case Const: return 0; - } - return 0; + } + return 0; } - + void randomize(void) {} - + template void operator()(double& result, Children args, vector &var) const { double result0; double result1; - - + + switch(op.type) { case Variable: result = var[op.id%var.size()]; //%var.size() used in the case of Subroutines and as a security measure break; case UFunction: args[0].apply(result0, var); - result = op.uFunction(result0); + result = op.uFunction(result0); break; - case BFunction: + case BFunction: case BOperator: args[0].apply(result0, var); - args[1].apply(result1, var); + args[1].apply(result1, var); result = op.bFunction(result0,result1); break; case Const: result = op.constant; - break; - + break; + } - + } - + template void operator()(string& result, Children args) const { - + string subtree0; string subtree1; string subtree2; - + switch(op.type) { - - case Variable: + + case Variable: case Const: result += op.label; break; - + case UFunction: result += op.label; result += "("; args[0].apply(subtree0); @@ -195,7 +195,7 @@ class Node args[1].apply(subtree1); result += subtree1; result += ")"; - break; + break; case BOperator: result += "("; args[0].apply(subtree0); result += subtree0; @@ -204,16 +204,16 @@ class Node result += subtree1; result += ")"; break; - default: result += "ERROR in Node::operator(string,...) \n"; break; + default: result += "ERROR in Node::operator(string,...) \n"; break; } } - + Operation getOp(void) const {return op;} - + }; - - + + @@ -230,7 +230,7 @@ class Node std::ostream& operator<<(std::ostream& os, const Node& eot) { Operation op(eot.getOp()); - + os << (eot.getOp()).label; return os; } diff --git a/eo/app/gpsymreg/parameters.h b/eo/app/gpsymreg/parameters.h index 4cd23ec09..ed9a02577 100644 --- a/eo/app/gpsymreg/parameters.h +++ b/eo/app/gpsymreg/parameters.h @@ -3,18 +3,18 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - jeggermo@liacs.nl + jeggermo@liacs.nl */ #ifndef _PARAMETERS_FUNCTION_H @@ -28,7 +28,7 @@ using namespace std; struct Parameters{ unsigned int nGenerations; // -G - unsigned population_size; // -P + unsigned population_size; // -P unsigned offspring_size; // -O unsigned int MaxSize; // -S unsigned int InitMaxDepth; // -D @@ -41,72 +41,72 @@ struct Parameters{ Parameters(int argc, char **argv) { eoParser parser(argc,argv); - + // generations eoValueParam paramGenerations(1, "generations", "Generations", 'G', false); parser.processParam( paramGenerations ); nGenerations = paramGenerations.value(); cerr << "nGenerations= " << nGenerations << endl; - + // populationsize eoValueParam paramPopulationSize(10, "populationsize", "PopulationSize", 'P', false); parser.processParam( paramPopulationSize ); population_size = paramPopulationSize.value(); cerr << "population_size= " << population_size << endl; - + // offspringsize eoValueParam paramOffspringSize(population_size, "offspringsize", "OffspringSize", 'O', false); parser.processParam( paramOffspringSize ); offspring_size = paramOffspringSize.value(); cerr << "offspring_size= " << offspring_size << endl; - + // maxsize eoValueParam paramMaxSize(15, "maxsize", "MaxSize", 'S', false); parser.processParam( paramMaxSize ); MaxSize = paramMaxSize.value(); cerr << "MaxSize= " << MaxSize << endl; - + // initialmaxdepth eoValueParam paramInitialMaxDepth(4, "initialmaxdepth", "InitialMaxDepth", 'D', false); parser.processParam( paramInitialMaxDepth ); InitMaxDepth = paramInitialMaxDepth.value(); cerr << "InitMaxDepth= " << InitMaxDepth << endl; - + // randomseed eoValueParam paramRandomSeed(1, "randomseed", "Random Seed", 'R', false); parser.processParam( paramRandomSeed ); randomseed = paramRandomSeed.value(); cerr << "randomseed= " << randomseed << endl; - - + + // crossover-rate eoValueParam paramXover(0.75, "crossoverrate", "crossover rate", 'x', false); parser.processParam(paramXover ); xover_rate = paramXover.value(); cerr << "xover_rate= " << xover_rate << endl; - + //mutation-rate eoValueParam paramMutation(0.25, "mutationrate", "mutation rate", 'm', false); parser.processParam(paramMutation ); mutation_rate = paramMutation.value(); cerr << "mutation_rate= " << mutation_rate << endl; - + //tournament size eoValueParam paramTournamentSize(5, "tournamentsize", "tournament size", 't', false); parser.processParam(paramTournamentSize ); tournamentsize = paramTournamentSize.value(); cerr << "Tournament Size= " << tournamentsize << endl; - - + + if (parser.userNeedsHelp()) { - parser.printHelp(cout); - exit(1); + parser.printHelp(cout); + exit(1); } }; - + ~Parameters(){}; -}; +}; #endif diff --git a/eo/app/mastermind/CMakeLists.txt b/eo/app/mastermind/CMakeLists.txt index d07e97415..6fde0887c 100644 --- a/eo/app/mastermind/CMakeLists.txt +++ b/eo/app/mastermind/CMakeLists.txt @@ -18,8 +18,8 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) SET (MASTERMIND_SOURCES mastermind.cpp) # no matter what is the OS, hopefully -ADD_EXECUTABLE(mastermind ${MASTERMIND_SOURCES}) - +ADD_EXECUTABLE(mastermind ${MASTERMIND_SOURCES}) + ADD_DEPENDENCIES(mastermind eo eoutils) ###################################################################################### @@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(mastermind PROPERTIES VERSION "${MASTERMIND_VERSION}") TARGET_LINK_LIBRARIES(mastermind eo eoutils) ###################################################################################### - diff --git a/eo/app/mastermind/mastermind.cpp b/eo/app/mastermind/mastermind.cpp index 9a2ed163e..c17889913 100644 --- a/eo/app/mastermind/mastermind.cpp +++ b/eo/app/mastermind/mastermind.cpp @@ -51,8 +51,8 @@ int main(int argc, char** argv) } catch (exception& e) { - cerr << argv[0] << ": " << e.what() << endl; - exit(EXIT_FAILURE); + cerr << argv[0] << ": " << e.what() << endl; + exit(EXIT_FAILURE); } return 0; diff --git a/eo/config.guess b/eo/config.guess index 9b9789b1a..2784e1b25 100755 --- a/eo/config.guess +++ b/eo/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2004-03-03' +timestamp='2011-05-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -186,7 +186,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -270,7 +270,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -342,7 +342,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo i370-ibm-openedition exit 0 ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -419,23 +419,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -504,8 +504,8 @@ EOF echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -614,52 +614,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -739,22 +739,22 @@ EOF exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; @@ -778,14 +778,14 @@ EOF exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -919,7 +919,7 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} @@ -961,7 +961,7 @@ EOF s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_targets" in + case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" ;; @@ -1013,11 +1013,11 @@ EOF echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) @@ -1076,10 +1076,10 @@ EOF exit 0 ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp - exit 0 ;; + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; @@ -1114,8 +1114,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -1149,9 +1149,9 @@ EOF fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; + # says + echo i586-unisys-sysv4 + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1173,11 +1173,11 @@ EOF exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; @@ -1262,7 +1262,7 @@ EOF echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` @@ -1289,11 +1289,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/eo/config.h.cmake b/eo/config.h.cmake index 81699c23c..24568be10 100644 --- a/eo/config.h.cmake +++ b/eo/config.h.cmake @@ -71,5 +71,3 @@ /* Define to `unsigned int' if does not define. */ #cmakedefine size_t - - diff --git a/eo/contrib/MGE/eoInitVirus.h b/eo/contrib/MGE/eoInitVirus.h index 082339c81..f4cb53072 100644 --- a/eo/contrib/MGE/eoInitVirus.h +++ b/eo/contrib/MGE/eoInitVirus.h @@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mak@dhi.dk + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk */ //----------------------------------------------------------------------------- @@ -43,7 +43,7 @@ public: eoInitVirus(unsigned _combien, eoRndGenerator& _generator ) : combien(_combien), generator(_generator) {} - + virtual void operator()( eoVirus& chrom) { chrom.resize(combien); @@ -54,7 +54,7 @@ public: } chrom.invalidate(); } - + private : unsigned combien; /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics @@ -68,7 +68,7 @@ public: eoInitVirus1bit(unsigned _combien, eoRndGenerator& _generator ) : combien(_combien), generator(_generator) {} - + virtual void operator()( eoVirus& chrom) { chrom.resize(combien); @@ -77,7 +77,7 @@ public: chrom.virusBitSet(0, true ); chrom.invalidate(); } - + private : unsigned combien; /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics diff --git a/eo/contrib/boost/config.hpp b/eo/contrib/boost/config.hpp index 055a27855..176b4391c 100644 --- a/eo/contrib/boost/config.hpp +++ b/eo/contrib/boost/config.hpp @@ -1,8 +1,8 @@ // Boost config.hpp configuration header file ------------------------------// -// (C) Copyright John Maddock 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -57,14 +57,3 @@ #include #endif // BOOST_CONFIG_HPP - - - - - - - - - - - diff --git a/eo/contrib/boost/config/abi_prefix.hpp b/eo/contrib/boost/config/abi_prefix.hpp index 1733dc036..a1d93a2a5 100644 --- a/eo/contrib/boost/config/abi_prefix.hpp +++ b/eo/contrib/boost/config/abi_prefix.hpp @@ -1,7 +1,7 @@ // abi_prefix header -------------------------------------------------------// // © Copyright John Maddock 2003 - + // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). diff --git a/eo/contrib/boost/config/abi_suffix.hpp b/eo/contrib/boost/config/abi_suffix.hpp index 6339da631..f9eb493d9 100644 --- a/eo/contrib/boost/config/abi_suffix.hpp +++ b/eo/contrib/boost/config/abi_suffix.hpp @@ -1,7 +1,7 @@ // abi_sufffix header -------------------------------------------------------// // © Copyright John Maddock 2003 - + // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). @@ -19,5 +19,3 @@ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif - - diff --git a/eo/contrib/boost/config/auto_link.hpp b/eo/contrib/boost/config/auto_link.hpp index 0c36f7b0f..8a3c2e194 100644 --- a/eo/contrib/boost/config/auto_link.hpp +++ b/eo/contrib/boost/config/auto_link.hpp @@ -18,13 +18,13 @@ USAGE: Before including this header you must define one or more of define the following macros: BOOST_LIB_NAME: Required: A string containing the basename of the library, - for example boost_regex. + for example boost_regex. BOOST_LIB_TOOLSET: Optional: the base name of the toolset. BOOST_DYN_LINK: Optional: when set link to dll rather than static library. BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name - of the library selected (useful for debugging). + of the library selected (useful for debugging). BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, - rather than a mangled-name version. + rather than a mangled-name version. These macros will be undef'ed at the end of the header, further this header has no include guards - so be sure to include it only once from your library! @@ -56,13 +56,13 @@ BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, - contains one or more of the following letters after - a hiphen: + contains one or more of the following letters after + a hiphen: - s static runtime (dynamic if not present). - d debug build (release if not present). - g debug/diagnostic runtime (release if not present). - p STLPort Build. + s static runtime (dynamic if not present). + d debug build (release if not present). + g debug/diagnostic runtime (release if not present). + p STLPort Build. BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. @@ -342,13 +342,3 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. #if defined(BOOST_AUTO_LINK_NOMANGLE) # undef BOOST_AUTO_LINK_NOMANGLE #endif - - - - - - - - - - diff --git a/eo/contrib/boost/limits.hpp b/eo/contrib/boost/limits.hpp index f468dbce7..856072085 100644 --- a/eo/contrib/boost/limits.hpp +++ b/eo/contrib/boost/limits.hpp @@ -1,5 +1,4 @@ - -// (C) Copyright John maddock 1999. +// (C) Copyright John maddock 1999. // (C) David Abrahams 2002. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -33,7 +32,7 @@ namespace std { template<> - class numeric_limits + class numeric_limits { public: @@ -82,11 +81,11 @@ namespace std BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); - + }; template<> - class numeric_limits + class numeric_limits { public: @@ -135,9 +134,9 @@ namespace std BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); - + }; } -#endif +#endif #endif diff --git a/eo/contrib/eoAged.h b/eo/contrib/eoAged.h index c4c02fc3f..0fa525ae8 100644 --- a/eo/contrib/eoAged.h +++ b/eo/contrib/eoAged.h @@ -4,7 +4,7 @@ //----------------------------------------------------------------------------- // eoAge.h // (c) GeNeura Team, 1998 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -38,7 +38,7 @@ using namespace std; //----------------------------------------------------------------------------- /** eoAge is a template class that adds an age to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor +Requisites for template instantiation are that the object must admit a default ctor and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, printOn, readFrom. @see eoObject @@ -55,7 +55,7 @@ class eoAged: public Object /// Virtual dtor. They are needed in virtual class hierarchies virtual ~eoAged() {}; - + ///returns the age of the object unsigned long Age() const {return age;} @@ -67,7 +67,7 @@ class eoAged: public Object readFrom and printOn are directly inherited from eo1d */ //@{ - /** Return the class id. This should be redefined in each class; but + /** Return the class id. This should be redefined in each class; but it's got code as an example of implementation. Only "leaf" classes can be non-virtual. */ @@ -83,7 +83,7 @@ class eoAged: public Object _is >> age; } - + /** * Write object. It's called printOn since it prints the object _on_ a stream. * @param _os A ostream. @@ -93,7 +93,7 @@ class eoAged: public Object _os << age; } //@} - + private: /** Default Constructor. \\ @@ -106,4 +106,3 @@ class eoAged: public Object }; #endif EOAGE_H - diff --git a/eo/contrib/eoDrawable.h b/eo/contrib/eoDrawable.h index 221bf2c1e..a614042f0 100644 --- a/eo/contrib/eoDrawable.h +++ b/eo/contrib/eoDrawable.h @@ -1,9 +1,9 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + //----------------------------------------------------------------------------- -// eoDrawable.h +// eoDrawable.h // (c) GeNeura Team, 1999 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,38 +27,38 @@ //----------------------------------------------------------------------------- -using namespace std; +using namespace std; //----------------------------------------------------------------------------- // eoDrawable //----------------------------------------------------------------------------- - -/** eoDrawable is a template class that adds a drawing interface to an object.\\ -Requisites for template instantiation are that the object must admit a default ctor -and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, -eoDrawables can be drawn on any two-dimensional surface; it can be added to any -object with above characteristics. -@see eoObject -*/ + +/** eoDrawable is a template class that adds a drawing interface to an object. +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +eoDrawables can be drawn on any two-dimensional surface; it can be added to any +object with above characteristics. +@see eoObject +*/ template class eoDrawable { public: - /// Main ctor from an already built Object. - eoDrawable( const Object& _o): Object( _o ){}; + /// Main ctor from an already built Object. + eoDrawable( const Object& _o): Object( _o ){}; /// Copy constructor. - eoDrawable( const eoDrawable& _d): Object( _d ){}; - - /// Virtual dtor. They are needed in virtual class hierarchies - virtual ~eoDrawable() {}; - - - /**Draws the object. It must be redefined in any subclass, it´s impossible - to have a general drawing method - @param _x, _y coorinates */ - virtual void draw( unsigned _x, unsigned _y) = 0; - -}; + eoDrawable( const eoDrawable& _d): Object( _d ){}; -#endif EODRAWABLE_H + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoDrawable() {}; + + + /**Draws the object. It must be redefined in any subclass, it´s impossible + to have a general drawing method + @param _x, _y coorinates */ + virtual void draw( unsigned _x, unsigned _y) = 0; + +}; + +#endif //! EODRAWABLE_H diff --git a/eo/install_symlink.py.cmake b/eo/install_symlink.py.cmake index 0a867f4b0..145d67a14 100755 --- a/eo/install_symlink.py.cmake +++ b/eo/install_symlink.py.cmake @@ -9,9 +9,9 @@ PREFIX = "/usr" DATA = { 'dirs': [ "%s/share/%s" % (PREFIX, NAME) ], 'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)), - ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), - ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), - ] + ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), + ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), + ] } LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"] @@ -21,8 +21,8 @@ import os, sys def isroot(): if os.getuid() != 0: - print '[WARNING] you have to be root' - return False + print '[WARNING] you have to be root' + return False return True def uninstall(): @@ -41,11 +41,11 @@ def data(): if __name__ == '__main__': if not isroot(): - sys.exit() + sys.exit() if len(sys.argv) < 2: - print 'Usage: %s [install|uninstall|data]' % sys.argv[0] - sys.exit() + print 'Usage: %s [install|uninstall|data]' % sys.argv[0] + sys.exit() if sys.argv[1] == 'install': install() elif sys.argv[1] == 'uninstall': uninstall() diff --git a/eo/test/ChangeLog b/eo/test/ChangeLog index 0167b10a5..747025387 100644 --- a/eo/test/ChangeLog +++ b/eo/test/ChangeLog @@ -14,12 +14,12 @@ * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to avoid compiler warnings. - - + + 2006-07-02 Thomas Legrand * test/t-eoEasyPSO.cpp: added PSO test - + * test/Makefile.am: added PSO test @@ -28,9 +28,9 @@ * test/t-eoSyncEasyPSO.cpp: added synchronous PSO test * test/t-eoEasyPSO.cpp: customized PSO test (initialization) * test/Makefile.am: added synchronous PSO test - + * Local Variables: * coding: iso-8859-1 * mode: flyspell * fill-column: 80 - * End: \ No newline at end of file + * End: diff --git a/eo/test/RoyalRoad.h b/eo/test/RoyalRoad.h index b49e4741b..5592f3cd5 100644 --- a/eo/test/RoyalRoad.h +++ b/eo/test/RoyalRoad.h @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr + Marc.Schoenauer@polytechnique.fr CVS Info: $Date: 2001-06-21 12:03:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.3 2001-06-21 12:03:17 jmerelo Exp $ $Author: jmerelo $ */ @@ -51,7 +51,7 @@ class RoyalRoad: public eoEvalFunc { _eo.fitness( fitness ); } }; - + private: unsigned div; diff --git a/eo/test/binary_value.h b/eo/test/binary_value.h index 793e9de62..59dc4cc3c 100644 --- a/eo/test/binary_value.h +++ b/eo/test/binary_value.h @@ -4,7 +4,7 @@ /** Just the simple function that takes binary value of a chromosome and sets the fitnes. - @param _chrom A binary chromosome + @param _chrom A binary chromosome */ template double binary_value(const Chrom& _chrom) diff --git a/eo/test/boxplot.py b/eo/test/boxplot.py index bf6e84b5d..20273c18f 100755 --- a/eo/test/boxplot.py +++ b/eo/test/boxplot.py @@ -5,11 +5,11 @@ import sys if __name__ == '__main__': if len(sys.argv) < 2: - print 'Usage: boxplot.py [Results files, ...]' - sys.exit() + print 'Usage: boxplot.py [Results files, ...]' + sys.exit() for i in range(1, len(sys.argv)): - pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) pylab.xlabel('iterations') pylab.show() diff --git a/eo/test/fitness_traits.cpp b/eo/test/fitness_traits.cpp index 19edb27a4..4af0e34bb 100644 --- a/eo/test/fitness_traits.cpp +++ b/eo/test/fitness_traits.cpp @@ -101,7 +101,7 @@ struct fitness_traits< pair > /* end fitness_traits.h */ -/* EO.h +/* EO.h The Fitness template argument is there for backward compatibility reasons @@ -236,7 +236,7 @@ public : { if (!fitness_traits::needs_mapping) { - throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined"); + throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined"); } (*p2w)(*this); @@ -429,5 +429,3 @@ int main() std::cout << e.what() << std::endl; } } - - diff --git a/eo/test/real_value.h b/eo/test/real_value.h index 8bedd6b9d..8b58d3175 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -2,8 +2,8 @@ //----------------------------------------------------------------------------- -/** Just a simple function that takes an eoEsBase and sets the fitnes - to sphere +/** Just a simple function that takes an eoEsBase and sets the fitnes + to sphere @param _ind vector */ @@ -14,6 +14,3 @@ double real_value(const std::vector& _ind) sum += _ind[i] * _ind[i]; return sum/_ind.size(); } - - - diff --git a/eo/test/run_tests b/eo/test/run_tests index ebaec0af7..22b9644ac 100755 --- a/eo/test/run_tests +++ b/eo/test/run_tests @@ -1,7 +1,7 @@ #!/bin/sh echo "Testing -h" -./t-eoCheckpointing -h +./t-eoCheckpointing -h echo "Finished" diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp index 22fcb5beb..f2c0e177b 100644 --- a/eo/test/t-eo.cpp +++ b/eo/test/t-eo.cpp @@ -8,8 +8,7 @@ int main() // EO objects can be printed with stream operators std::cout << "chrom1 = " << chrom1 << std::endl - << "chrom2 = " << chrom2 << std::endl; - + << "chrom2 = " << chrom2 << std::endl; + return 0; } - diff --git a/eo/test/t-eo2dVector.cc b/eo/test/t-eo2dVector.cc index bce0e82be..0288fdc50 100644 --- a/eo/test/t-eo2dVector.cc +++ b/eo/test/t-eo2dVector.cc @@ -37,14 +37,14 @@ main() C c1( 5,6,1 ); cout << "Default constructor with values: " << endl << c1 << endl; - + } { eoUniform aleat( 1,10 ); C c1( 5,6, aleat ); cout << "Random constructor: " << endl << c1 << endl; - + } { C c1( 3,4,1 ), c2( c1 ); @@ -111,12 +111,12 @@ main() cout << "Number of Columns: " << endl << c1.numOfCols() << endl; } - + { cout << "Class Name: " << endl << c1.className() << endl; } - + cout << "-----------------------------------------------------" << endl << "Catching exceptions: " << endl diff --git a/eo/test/t-eoCMAES.cpp b/eo/test/t-eoCMAES.cpp index 912d51280..07b59509a 100644 --- a/eo/test/t-eoCMAES.cpp +++ b/eo/test/t-eoCMAES.cpp @@ -1,4 +1,3 @@ - #include #include @@ -123,6 +122,3 @@ int main(int argc, char* argv[]) { cout << "Fitness achieved = " << pop[0].fitness() << endl; cout << "Function evaluations = " << evals.value() << endl; } - - - diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 5562ccb0d..134b05cc4 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -1,4 +1,3 @@ - // to avoid long name warnings #ifdef _MSC_VER #pragma warning(disable:4786) @@ -113,38 +112,38 @@ int the_main(int argc, char **argv) if (parser.userNeedsHelp()) { - parser.printHelp(std::cout); - return 0; + parser.printHelp(std::cout); + return 0; } // Either load or initialize if (load_name.value() != "") { - state.load(load_name.value()); // load the rest + state.load(load_name.value()); // load the rest } else { - // else + // else - // initialize rng and population + // initialize rng and population - rng.reseed(seed.value()); + rng.reseed(seed.value()); - pop.resize(2); + pop.resize(2); - pop[0].fitness(1); - pop[1].fitness(2); + pop[0].fitness(1); + pop[1].fitness(2); } while(checkpoint(pop)) { - pop[0].fitness(pop[0].fitness() + 1); + pop[0].fitness(pop[0].fitness() + 1); - time_t now = time(0); + time_t now = time(0); - while (time(0) == now) {} // wait a second to test timed saver + while (time(0) == now) {} // wait a second to test timed saver - std::cout << "gen " << generationCounter.value() << std::endl; + std::cout << "gen " << generationCounter.value() << std::endl; } // run the algorithm @@ -152,9 +151,9 @@ int the_main(int argc, char **argv) // Save when needed if (save_name.value() != "") { - std::string file_name = save_name.value(); - save_name.value() = ""; // so that it does not appear in the parser section of the state file - state.save(file_name); + std::string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); } return 1; @@ -164,11 +163,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + the_main(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoDualFitness.cpp b/eo/test/t-eoDualFitness.cpp index 90b35ed7e..6b8fd6e17 100644 --- a/eo/test/t-eoDualFitness.cpp +++ b/eo/test/t-eoDualFitness.cpp @@ -1,4 +1,3 @@ - #include #include @@ -13,16 +12,16 @@ class DualSphere : public eoEvalFunc public: virtual void operator()( EOT & x ) { - if( x.invalid() ) { return; } + if( x.invalid() ) { return; } - double sum = 0; - int sign = 1; - for( unsigned int i=0, s=x.size(); i0 ? true : false ) ); + x.fitness( std::make_pair( sum, sign>0 ? true : false ) ); } }; @@ -60,7 +59,7 @@ int main() pop.push_back( sol4 ); // on the sphere function everyone has the same fitness of 1 if( test(pop, 0) != 0 ) { - exit(1); + exit(1); } pop.erase(pop.begin(),pop.end()); @@ -75,7 +74,7 @@ int main() pop.push_back( sol3 ); pop.push_back( sol4 ); if( test(pop, 1) != 1 ) { - exit(1); + exit(1); } // test on a random normal distribution @@ -84,7 +83,6 @@ int main() pop = eoPop( 1000000, init_N ); double iqr = test(pop, 1.09); if( iqr < 1.08 || iqr > 1.11 ) { - exit(1); + exit(1); } } - diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index 079494042..3a77b6292 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -37,34 +37,34 @@ int main_function(int argc, char *argv[]) eoParser parser(argc, argv); // for user-parameter reading eoState state; // keeps all things allocated eoValueParam& simpleParam = parser.getORcreateParam(true, "Isotropic", - "Isotropic self-adaptive mutation", - 'i', "ES mutation"); + "Isotropic self-adaptive mutation", + 'i', "ES mutation"); eoValueParam& stdevsParam = parser.getORcreateParam(false, "Stdev", - "One self-adaptive stDev per variable", - 's', "ES mutation"); + "One self-adaptive stDev per variable", + 's', "ES mutation"); eoValueParam& corrParam = parser.getORcreateParam(false, "Correl", - "Use correlated mutations", - 'c', "ES mutation"); + "Use correlated mutations", + 'c', "ES mutation"); // Run the appropriate algorithm if (simpleParam.value() == false) { - std::cout << "Using eoReal" << std::endl; - runAlgorithm(eoReal(), parser, state); + std::cout << "Using eoReal" << std::endl; + runAlgorithm(eoReal(), parser, state); } else if (stdevsParam.value() == false) { - std::cout << "Using eoEsSimple" << std::endl; - runAlgorithm(eoEsSimple(), parser, state); + std::cout << "Using eoEsSimple" << std::endl; + runAlgorithm(eoEsSimple(), parser, state); } else if (corrParam.value() == false) { - std::cout << "Using eoEsStdev" << std::endl; - runAlgorithm(eoEsStdev(), parser, state); + std::cout << "Using eoEsStdev" << std::endl; + runAlgorithm(eoEsStdev(), parser, state); } else { - std::cout << "Using eoEsFull" << std::endl; - runAlgorithm(eoEsFull(), parser, state); + std::cout << "Using eoEsFull" << std::endl; + runAlgorithm(eoEsFull(), parser, state); } return 0; } @@ -83,11 +83,11 @@ int main(int argc, char **argv) #endif try { - main_function(argc, argv); + main_function(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << '\n'; + std::cout << "Exception: " << e.what() << '\n'; } } diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 7a217b586..7c5e84d99 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -34,7 +34,7 @@ int main_function(int argc, char *argv[]) // Define Parameters and load them eoValueParam& seed = parser.createParam(static_cast(time(0)), - "seed", "Random number seed"); + "seed", "Random number seed"); eoValueParam& load_name = parser.createParam(string(), "Load","Load a state file",'L'); eoValueParam& save_name = parser.createParam(string(), "Save","Saves a state file",'S'); eoValueParam& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's'); @@ -62,23 +62,23 @@ int main_function(int argc, char *argv[]) // Run the appropriate algorithm if (stdevs.value() == false && corr.value() == false) { - runAlgorithm(eoEsSimple() ,parser, state, bounds, load_name); + runAlgorithm(eoEsSimple() ,parser, state, bounds, load_name); } else if (corr.value() == true) { - runAlgorithm(eoEsFull(),parser, state, bounds, load_name); + runAlgorithm(eoEsFull(),parser, state, bounds, load_name); } else { - runAlgorithm(eoEsStdev(), parser, state, bounds, load_name); + runAlgorithm(eoEsStdev(), parser, state, bounds, load_name); } // and save if (!save_name.value().empty()) { - string file_name = save_name.value(); - save_name.value() = ""; // so that it does not appear in the parser section of the state file - state.save(file_name); + string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); } return 0; @@ -98,11 +98,11 @@ int main(int argc, char **argv) try { - main_function(argc, argv); + main_function(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << '\n'; + std::cout << "Exception: " << e.what() << '\n'; } return 1; @@ -120,7 +120,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _ if (lambda_rate.value() < 1.0f) { - throw logic_error("lambda_rate must be larger than 1 in a comma strategy"); + throw logic_error("lambda_rate must be larger than 1 in a comma strategy"); } // Initialization @@ -137,8 +137,8 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _ } else { - // evaluate initial population - apply(eval, pop); + // evaluate initial population + apply(eval, pop); } // Ok, time to set up the algorithm diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index afda23620..ba3035d22 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -16,12 +16,12 @@ main() // a chromosome randomizer eoBinRandom random; -// the populations: - eoPop pop; +// the populations: + eoPop pop; // Evaluation eoEvalFuncPtr eval( binary_value ); - + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); @@ -29,12 +29,12 @@ main() eval(chrom); pop.push_back(chrom); } - + std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - + // selection eoLottery lottery; @@ -45,7 +45,7 @@ main() eoBreeder breeder( propSel ); propSel.addOp(bitflip, 0.25); propSel.addOp(xover, 0.75); - + // replacement eoInclusion inclusion; @@ -65,11 +65,10 @@ main() std::cout << "exception: " << e.what() << std::endl;; exit(EXIT_FAILURE); } - + std::cout << "pop" << std::endl; for (i = 0; i < pop.size(); ++i) std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - + return 0; } - diff --git a/eo/test/t-eoEasyPSO.cpp b/eo/test/t-eoEasyPSO.cpp index 96e5b004b..af290e13f 100644 --- a/eo/test/t-eoEasyPSO.cpp +++ b/eo/test/t-eoEasyPSO.cpp @@ -19,7 +19,7 @@ double real_value (const Particle & _particle) { double sum = 0; for (unsigned i = 0; i < _particle.size ()-1; i++) - sum += pow(_particle[i],2); + sum += pow(_particle[i],2); return (sum); } @@ -50,15 +50,15 @@ int main() // perform position initialization pop.append (POP_SIZE, random); - + // topology eoLinearTopology topology(NEIGHBORHOOD_SIZE); // the full initializer eoInitializer init(eval,veloRandom,localInit,topology,pop); init(); - - + + // bounds eoRealVectorBounds bnds(VEC_SIZE,-1.5,1.5); @@ -71,33 +71,32 @@ int main() // Terminators eoGenContinue genCont1 (50); eoGenContinue genCont2 (50); - + // PS flight eoEasyPSO pso1(genCont1, eval, velocity, flight); eoEasyPSO pso2(init,genCont2, eval, velocity, flight); - + // flight try { - pso1(pop); - std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl; + pso1(pop); + std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl; for (i = 0; i < pop.size(); ++i) - std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - - pso2(pop); - std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + pso2(pop); + std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl; for (i = 0; i < pop.size(); ++i) - std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; } catch (std::exception& e) { - std::cout << "exception: " << e.what() << std::endl;; - exit(EXIT_FAILURE); + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); } - + return 0; } - diff --git a/eo/test/t-eoExtendedVelocity.cpp b/eo/test/t-eoExtendedVelocity.cpp index c42fb4c61..3fca3f30c 100644 --- a/eo/test/t-eoExtendedVelocity.cpp +++ b/eo/test/t-eoExtendedVelocity.cpp @@ -66,11 +66,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl; + std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl; } return EXIT_SUCCESS; } diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index aae169857..8246863f6 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -4,7 +4,7 @@ #endif #include -#include // runtime_error +#include // runtime_error #include #include @@ -61,9 +61,9 @@ bool UserDefMutate(UserDefStruct& a) a = RandomStruct(); // just for testing if (rng.flip(0.1f)) - a.d = UserDefStruct::test; + a.d = UserDefStruct::test; else - a.d = UserDefStruct::another; + a.d = UserDefStruct::another; return true; } @@ -72,13 +72,13 @@ bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) std::cout << "UserDefBinCrossover\n"; if (rng.flip(0.5)) - a.a = b.a; + a.a = b.a; if (rng.flip(0.5)) - a.b = b.b; + a.b = b.b; if (rng.flip(0.5)) - a.c = b.c; + a.c = b.c; if (rng.flip(0.5)) - a.d = b.d; + a.d = b.d; return true; } @@ -86,13 +86,13 @@ bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) { std::cout << "UserDefQuadCrossover\n"; if (rng.flip(0.5)) - swap(a.a, b.a); + swap(a.a, b.a); if (rng.flip(0.5)) - swap(a.b, b.b); + swap(a.b, b.b); if (rng.flip(0.5)) - swap(a.c, b.c); + swap(a.c, b.c); if (rng.flip(0.5)) - swap(a.d, b.d); + swap(a.d, b.d); return true; } diff --git a/eo/test/t-eoFitnessAssembled.cpp b/eo/test/t-eoFitnessAssembled.cpp index 5a492aedf..018d739a4 100644 --- a/eo/test/t-eoFitnessAssembled.cpp +++ b/eo/test/t-eoFitnessAssembled.cpp @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // t-eoFitnessAssembled.cpp // Marc Wintermantel & Oliver Koenig @@ -11,19 +11,19 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mak@dhi.dk + Marc.Schoenauer@inria.fr + mak@dhi.dk */ //----------------------------------------------------------------------------- #include @@ -32,7 +32,7 @@ #include "eoScalarFitnessAssembled.h" void test_eoScalarFitnessAssembledClass(){ - + // Create instances eoAssembledMinimizingFitness A,B,C(5, 1.3, "C value"); @@ -53,9 +53,9 @@ void test_eoScalarFitnessAssembledClass(){ std::cout << "C= " << C << std::endl; std::cout << "Printing values and descriptions: " << std::endl; std::cout << "A: "; A.printAll( std::cout ); std::cout << std::endl; - std::cout << "B: "; B.printAll( std::cout ); std::cout << std::endl; + std::cout << "B: "; B.printAll( std::cout ); std::cout << std::endl; std::cout << "C: "; C.printAll( std::cout ); std::cout << std::endl; - + A.resize(8, 100.3, "A resized"); std::cout << "Resized A: "; A.printAll( std::cout ); std::cout << std::endl; @@ -68,7 +68,7 @@ void test_eoScalarFitnessAssembledClass(){ F=A; G= 7.5; std::cout << "F = A : " << F << "\t G = 7.5 : " << G << std::endl; - + // Comparing... std::cout << "AB: " << (A>B) << std::endl; @@ -80,15 +80,15 @@ void test_eoScalarFitnessAssembledClass(){ int main(){ - + std::cout << "-----------------------------------" << std::endl; std::cout << "START t-eoFitnessAssembled" << std::endl; try{ // Test the fitness class itself test_eoScalarFitnessAssembledClass(); - - + + } catch(std::exception& e){ @@ -102,4 +102,3 @@ int main(){ return 0; } - diff --git a/eo/test/t-eoFitnessAssembledEA.cpp b/eo/test/t-eoFitnessAssembledEA.cpp index 6369ac579..e04535673 100644 --- a/eo/test/t-eoFitnessAssembledEA.cpp +++ b/eo/test/t-eoFitnessAssembledEA.cpp @@ -1,5 +1,5 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + //----------------------------------------------------------------------------- // t-eoFitnessAssembledEA.cpp // Marc Wintermantel & Oliver Koenig @@ -11,19 +11,19 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mak@dhi.dk + Marc.Schoenauer@inria.fr + mak@dhi.dk */ //----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H @@ -41,7 +41,7 @@ #include // Definition of representation #include // Uniformly initializes real vector in bounds #include // Initialization of a genotype -#include // Base class for fitness evaluation +#include // Base class for fitness evaluation #include // Variation operators using standard Real operators #include // The fitness class typedef eoReal Indi; @@ -51,7 +51,7 @@ typedef eoReal Indi; #include // The stopping criterion #include // Outputs (stats, population dumps, ...) #include // Evolution engine (selection and replacement) -#include // simple call to the algo.stays there for consistency reasons +#include // simple call to the algo.stays there for consistency reasons // Define a fitness class template @@ -59,9 +59,9 @@ class eoAssembledEvalFunc : public eoEvalFunc{ public: // Constructor defining number and descriptions of fitness terms eoAssembledEvalFunc() { - + // Define a temporary fitness object to have access to its static traits - typename EOT::Fitness tmpfit(3, 0.0); + typename EOT::Fitness tmpfit(3, 0.0); tmpfit.setDescription(0,"Fitness"); tmpfit.setDescription(1,"Some Value"); tmpfit.setDescription(2,"Other Value"); @@ -70,27 +70,27 @@ public: void operator()(EOT& _eo){ - // Define temporary fitness object + // Define temporary fitness object // (automatically gets initialized with size given in constructor) typename EOT::Fitness tmpfit; - + // Eval some dummy fitness double sum1=0.0, sum2=0.0; for (unsigned i=0; i < _eo.size(); ++i){ sum1 += _eo[i]*_eo[i]; sum2 += fabs(_eo[i]) + fabs(_eo[i]); } - + // Store some fitness terms tmpfit[1]= sum1; tmpfit[2]= sum2; - + // Store the fitness tmpfit = (sum1 + sum2)/_eo.size(); // Pass it _eo.fitness( tmpfit ); - + } }; @@ -99,14 +99,14 @@ void make_help(eoParser & _parser); // now use all of the above, + representation dependent things int main(int argc, char* argv[]){ - + std::cout << "-----------------------------------" << std::endl; std::cout << "START t-eoFitnessAssembledEA" << std::endl; try{ // Parser & State - eoParser parser(argc, argv); // for user-parameter reading + eoParser parser(argc, argv); // for user-parameter reading eoState state; // keeps all things allocated //// @@ -120,7 +120,7 @@ int main(int argc, char* argv[]){ // The genotype eoRealInitBounded& init = do_make_genotype(parser, state, Indi() ); - + // The variation operators eoGenOp& op = do_make_op(parser, state, init); @@ -158,7 +158,7 @@ int main(int argc, char* argv[]){ std::cout << "Final Population\n"; pop.sortedPrintOn(std::cout); std::cout << std::endl; - + } catch(std::exception& e) { diff --git a/eo/test/t-eoFunctor.cpp b/eo/test/t-eoFunctor.cpp index b0bf5249f..f309eebcf 100644 --- a/eo/test/t-eoFunctor.cpp +++ b/eo/test/t-eoFunctor.cpp @@ -1,4 +1,3 @@ - #include #include @@ -13,7 +12,7 @@ class Tester : public eoInit public : void operator()(int& i) { - i=1; + i=1; } }; diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index effac3b03..fafed297d 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -21,7 +21,7 @@ int main(int argc, char* argv[]) ///// FIRST, problem or representation dependent stuff ////////////////////////////////////////////////////// - // The evaluation fn - encapsulated into an eval counter for output + // The evaluation fn - encapsulated into an eval counter for output eoEvalFuncPtr mainEval( binary_value ); eoEvalFuncCounter eval(mainEval); diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index 910474f96..c959a3bb9 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: mkeijzer@dhi.dk - Marc.Schoenauer@polytechnique.fr + Marc.Schoenauer@polytechnique.fr */ //----------------------------------------------------------------------------- @@ -38,10 +38,10 @@ struct Dummy : public EO Dummy(std::string _s="") : s(_s) {} void printOn(std::ostream & _os) const - { - EO::printOn(_os); - _os << " - " << s ; - } + { + EO::printOn(_os); + _os << " - " << s ; + } std::string s; }; @@ -179,9 +179,9 @@ void init(eoPop & _pop, unsigned _pSize) for (unsigned i=0; i<_pSize; i++) { std::ostringstream os; - os << i; - _pop[i] = Dummy(os.str()); - _pop[i].fitness(i); + os << i; + _pop[i] = Dummy(os.str()); + _pop[i].fitness(i); } } @@ -190,7 +190,7 @@ int the_main(int argc, char **argv) { eoParser parser(argc, argv); eoValueParam parentSizeParam( - parser.createParam(unsigned(10), "parentSize", "Parent size",'P')); + parser.createParam(unsigned(10), "parentSize", "Parent size",'P')); pSize = parentSizeParam.value(); // global variable eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); @@ -201,8 +201,8 @@ int the_main(int argc, char **argv) // i.e. in case you need parameters somewhere else, postpone these if (parser.userNeedsHelp()) { - parser.printHelp(std::cout); - exit(1); + parser.printHelp(std::cout); + exit(1); } ////////////////////////////////// define operators @@ -379,11 +379,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + the_main(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoIQRStat.cpp b/eo/test/t-eoIQRStat.cpp index 60bcff8fe..e49dc38d4 100644 --- a/eo/test/t-eoIQRStat.cpp +++ b/eo/test/t-eoIQRStat.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -39,7 +38,7 @@ int main() pop.push_back( sol4 ); // on the sphere function everyone has the same fitness of 1 if( test(pop, 0) != 0 ) { - exit(1); + exit(1); } pop.erase(pop.begin(),pop.end()); @@ -54,7 +53,7 @@ int main() pop.push_back( sol3 ); pop.push_back( sol4 ); if( test(pop, 1) != 1 ) { - exit(1); + exit(1); } // test on a random normal distribution @@ -63,7 +62,6 @@ int main() pop = eoPop( 1000000, init_N ); double iqr = test(pop, 1.09); if( iqr < 1.08 || iqr > 1.11 ) { - exit(1); + exit(1); } } - diff --git a/eo/test/t-eoInitPermutation.cpp b/eo/test/t-eoInitPermutation.cpp index 4090128be..e4a683b15 100644 --- a/eo/test/t-eoInitPermutation.cpp +++ b/eo/test/t-eoInitPermutation.cpp @@ -32,9 +32,9 @@ bool check_permutation(const Chrom & _chrom) std::cout << " Error: Wrong permutation !" << std::endl; std::string s; s.append( " Wrong permutation in t-eoInitPermutation"); - throw std::runtime_error( s ); + throw std::runtime_error( s ); } - return true; + return true; } int main() @@ -44,13 +44,13 @@ int main() // a chromosome randomizer eoInitPermutation random(CHROM_SIZE); - - // the population: + + // the population: eoPop pop; - + // Evaluation eoEvalFuncPtr eval( real_value ); - + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); @@ -61,7 +61,7 @@ int main() check_permutation(chrom); pop.push_back(chrom); } - + return 0; } diff --git a/eo/test/t-eoOrderXover.cpp b/eo/test/t-eoOrderXover.cpp index f44b8c69d..32e44dad9 100644 --- a/eo/test/t-eoOrderXover.cpp +++ b/eo/test/t-eoOrderXover.cpp @@ -38,13 +38,13 @@ int main() // a chromosome randomizer eoInitPermutation random(CHROM_SIZE); - - // the population: + + // the population: eoPop pop; - + // Evaluation //eoEvalFuncPtr eval( real_value ); - + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); @@ -52,18 +52,18 @@ int main() //eval(chrom); pop.push_back(chrom); } - + // a shift mutation eoOrderXover cross; - + for (i = 0; i < POP_SIZE; ++i) std::cout << " Initial chromosome nďż˝" << i << " : " << pop[i] << "..." << std::endl; cross(pop[0],pop[1]); cross(pop[1],pop[2]); - + for (i = 0; i < POP_SIZE; ++i) { - std::cout << " Initial chromosome nďż˝" << i << " becomes : " << pop[i] << " after orderXover" << std::endl; + std::cout << " Initial chromosome nďż˝" << i << " becomes : " << pop[i] << " after orderXover" << std::endl; check_permutation(pop[i]); } return 0; diff --git a/eo/test/t-eoPBIL.cpp b/eo/test/t-eoPBIL.cpp index adba787f9..1d2654b83 100644 --- a/eo/test/t-eoPBIL.cpp +++ b/eo/test/t-eoPBIL.cpp @@ -98,14 +98,14 @@ int main(int argc, char* argv[]) // now create the snapshot monitor eoValueParam& plotDistribParam = parser.getORcreateParam(false, "plotDistrib", - "Plot Distribution", '\0', - "Output - Graphical"); + "Plot Distribution", '\0', + "Output - Graphical"); if (plotDistribParam.value()) { #ifdef HAVE_GNUPLOT unsigned frequency=1; // frequency of plots updates eoGnuplot1DSnapshot *distribSnapshot = new eoGnuplot1DSnapshot(ptDirNameParam->value(), - frequency, "distrib"); + frequency, "distrib"); state.storeFunctor(distribSnapshot); // add the distribution (it is an eoValueParam >) distribSnapshot->add(distrib); @@ -117,7 +117,7 @@ int main(int argc, char* argv[]) // the algorithm: EDA // don't know where else to put the population size! unsigned popSize = parser.getORcreateParam(unsigned(100), "popSize", - "Population Size", 'P', "Algorithm").value(); + "Population Size", 'P', "Algorithm").value(); eoSimpleEDA eda(update, eval, popSize, checkpoint); ///// End of construction of the algorith diff --git a/eo/test/t-eoRNG.cpp b/eo/test/t-eoRNG.cpp index 4ff941705..1ece31a06 100644 --- a/eo/test/t-eoRNG.cpp +++ b/eo/test/t-eoRNG.cpp @@ -24,21 +24,21 @@ int main() double sigma(5.); double sum(0.); for(size_t i=0; i sigma / 0.68) { - cerr << "Normal distribution seems out of bounds; " - << "rerun to make sure it wasn't a statistical outlier" << endl; - return -1; + cerr << "Normal distribution seems out of bounds; " + << "rerun to make sure it wasn't a statistical outlier" << endl; + return -1; } sum = 0.; for(size_t i=0; i sigma / 0.68) { - cerr << "Normal distribution seems out of bounds; " - << "rerun to make sure it wasn't a statistical outlier" << endl; - return -1; + cerr << "Normal distribution seems out of bounds; " + << "rerun to make sure it wasn't a statistical outlier" << endl; + return -1; } return 0; } diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index 851e19829..163b0ea86 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) ///// FIRST, problem or representation dependent stuff ////////////////////////////////////////////////////// - // The evaluation fn - encapsulated into an eval counter for output - eoEvalFuncPtr&> - mainEval( real_value ); + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index a0f024060..fc44543d8 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -5,10 +5,10 @@ #pragma warning(disable:4786) #endif -#include // runtime_error +#include // runtime_error //----------------------------------------------------------------------------- -// tt.cpp: +// tt.cpp: // //----------------------------------------------------------------------------- @@ -37,7 +37,7 @@ public : //----------------------------------------------------------------------------- int the_main(int argc, char **argv) -{ +{ eoParser parser(argc, argv); eoValueParam parentSizeParam(10, "parentSize", "Parent size",'P'); parser.processParam( parentSizeParam ); @@ -73,13 +73,13 @@ int the_main(int argc, char **argv) if (parser.userNeedsHelp()) { - parser.printHelp(std::cout); - exit(1); + parser.printHelp(std::cout); + exit(1); } unsigned i; - std::cout << "Testing the replacements\nParents SIze = " << pSize + std::cout << "Testing the replacements\nParents SIze = " << pSize << " and offspring size = " << oSize << std::endl; rng.reseed(42); @@ -213,11 +213,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + the_main(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoRingTopology.cpp b/eo/test/t-eoRingTopology.cpp index e7d7488da..de2824c26 100644 --- a/eo/test/t-eoRingTopology.cpp +++ b/eo/test/t-eoRingTopology.cpp @@ -19,15 +19,15 @@ double f (const Indi & _indi) int main_function(int argc, char **argv) { //Parameters - const unsigned int VEC_SIZE = 2; - const unsigned int POP_SIZE = 10; - const unsigned int NEIGHBORHOOD_SIZE= 3; + const unsigned int VEC_SIZE = 2; + const unsigned int POP_SIZE = 10; + const unsigned int NEIGHBORHOOD_SIZE= 3; rng.reseed (33); eoEvalFuncPtr plainEval(f); eoEvalFuncCounter < Indi > eval (plainEval); eoUniformGenerator < double >uGen (0., 5.); - eoInitFixedLength < Indi > random (VEC_SIZE, uGen); + eoInitFixedLength < Indi > random (VEC_SIZE, uGen); eoUniformGenerator < double >sGen (-1., 1.); eoVelocityInitFixedLength < Indi > veloRandom (VEC_SIZE, sGen); eoFirstIsBestInit < Indi > localInit; @@ -57,11 +57,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << " in t-eoRingTopology" << std::endl; + std::cout << "Exception: " << e.what() << " in t-eoRingTopology" << std::endl; } } diff --git a/eo/test/t-eoRoulette.cpp b/eo/test/t-eoRoulette.cpp index 5c350122c..d6f63b8ad 100644 --- a/eo/test/t-eoRoulette.cpp +++ b/eo/test/t-eoRoulette.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -29,22 +28,22 @@ int test_select() } Select select; - + unsigned ndraws = 10000; - + for (unsigned i = 0; i < ndraws; ++i) { const TestEO& eo = select(pop); - + counts[eo.index]++; } cout << "Threshold = " << 1./sqrt(double(ndraws)) << endl; - + for (unsigned i = 0; i < 4; ++i) { cout << counts[i]/ndraws << ' '; - + double c = counts[i]/ndraws; if (fabs(c - probs[i]) > 1./sqrt((double)ndraws)) { @@ -52,7 +51,7 @@ int test_select() return 1; } } - + cout << endl; return 0; } @@ -62,7 +61,6 @@ int main() rng.reseed(44); if (test_select >()) return 1; - + return test_select >(); } - diff --git a/eo/test/t-eoSecondsElapsedContinue.cpp b/eo/test/t-eoSecondsElapsedContinue.cpp index e6e59a61d..d6124c22e 100644 --- a/eo/test/t-eoSecondsElapsedContinue.cpp +++ b/eo/test/t-eoSecondsElapsedContinue.cpp @@ -1,4 +1,3 @@ - #ifdef HAVE_CONFIG_H #include #endif @@ -29,5 +28,3 @@ int main() { return 0; } - - diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index d62e5ade1..23d76c48c 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -121,8 +121,8 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to if (parser.userNeedsHelp()) { - parser.printHelp(std::cout); - exit(0); + parser.printHelp(std::cout); + exit(0); } // hard-coded directory name ... @@ -155,7 +155,7 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to // random seed eoValueParam& seedParam = parser.createParam(uint32_t(0), "seed", - "Random number seed", 'S'); + "Random number seed", 'S'); if (seedParam.value() == 0) seedParam.value() = time(0); rng.reseed(seedParam.value()); @@ -212,11 +212,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + the_main(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; - return 1; + std::cout << "Exception: " << e.what() << std::endl; + return 1; } } diff --git a/eo/test/t-eoSharing.cpp b/eo/test/t-eoSharing.cpp index a68820bed..86721b098 100644 --- a/eo/test/t-eoSharing.cpp +++ b/eo/test/t-eoSharing.cpp @@ -230,11 +230,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + the_main(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; - return 1; + std::cout << "Exception: " << e.what() << std::endl; + return 1; } } diff --git a/eo/test/t-eoShiftMutation.cpp b/eo/test/t-eoShiftMutation.cpp index afc277496..15c4e6b92 100644 --- a/eo/test/t-eoShiftMutation.cpp +++ b/eo/test/t-eoShiftMutation.cpp @@ -47,13 +47,13 @@ int main() // a chromosome randomizer eoInitPermutation random(CHROM_SIZE); - - // the population: + + // the population: eoPop pop; - + // Evaluation eoEvalFuncPtr eval( real_value ); - + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); @@ -61,10 +61,10 @@ int main() eval(chrom); pop.push_back(chrom); } - + // a shift mutation eoShiftMutation shift; - + for (i = 0; i < POP_SIZE; ++i) { std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; @@ -72,7 +72,7 @@ int main() std::cout << " ... becomes : " << pop[i] << " after shift mutation" << std::endl; check_permutation(pop[i]); } - + return 0; } diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index 80551279c..a851cb595 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -89,22 +89,22 @@ int the_main(int argc, char **argv) if (parser.userNeedsHelp()) { - parser.printHelp(std::cout); - return 0; + parser.printHelp(std::cout); + return 0; } // Either load or initialize if (load_name.value() != "") { - state.load(load_name.value()); // load the rest + state.load(load_name.value()); // load the rest } else { - // else + // else - // initialize rng and population + // initialize rng and population - rng.reseed(seed.value()); + rng.reseed(seed.value()); } // run the algorithm @@ -112,13 +112,13 @@ int the_main(int argc, char **argv) // Save when needed if (save_name.value() != "") { - std::string file_name = save_name.value(); - save_name.value() = ""; // so that it does not appear in the parser section of the state file - state.save(file_name); + std::string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); } for (int i = 0; i < 100; ++i) - rng.rand(); + rng.rand(); std::cout << "a random number is " << rng.random(1024) << std::endl;; @@ -129,11 +129,11 @@ int main(int argc, char **argv) { try { - the_main(argc, argv); + the_main(argc, argv); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << std::endl; + std::cout << "Exception: " << e.what() << std::endl; } } diff --git a/eo/test/t-eoSwapMutation.cpp b/eo/test/t-eoSwapMutation.cpp index f2c33789e..3099d7075 100644 --- a/eo/test/t-eoSwapMutation.cpp +++ b/eo/test/t-eoSwapMutation.cpp @@ -48,13 +48,13 @@ int main() // a chromosome randomizer eoInitPermutation random(CHROM_SIZE); - - // the population: + + // the population: eoPop pop; - + // Evaluation eoEvalFuncPtr eval( real_value ); - + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); @@ -62,11 +62,11 @@ int main() eval(chrom); pop.push_back(chrom); } - - + + // a swap mutation eoSwapMutation swap; - + for (i = 0; i < POP_SIZE; ++i) { std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; @@ -74,7 +74,7 @@ int main() std::cout << " ... becomes : " << pop[i] << " after swap mutation" << std::endl; check_permutation(pop[i]); } - + return 0; } diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index f9aebd064..d332789ba 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -23,57 +23,57 @@ public : // arity function, need this function! int arity() const { return op == X? 0 : 2; } - void randomize() {} + void randomize() {} // evaluation function, single case, using first argument to give value of variable template void operator()(double& result, Children args, double var) const { - double r1(0.), r2(0.); - if (arity() == 2) - { - args[0].apply(r1, var); - args[1].apply(r2, var); - } - switch (op) - { - case Plus : result = r1 + r2; break; - case Min : result = r1 - r2; break; - case Mult : result = r1 * r2; break; - case PDiv : { - if (r2 == 0.0) - // protection a la Koza, realistic implementations - // should maybe throw an exception - result = 1.0; - else - result = r1 / r2; - break; - } - case X : result = var; break; - } + double r1(0.), r2(0.); + if (arity() == 2) + { + args[0].apply(r1, var); + args[1].apply(r2, var); + } + switch (op) + { + case Plus : result = r1 + r2; break; + case Min : result = r1 - r2; break; + case Mult : result = r1 * r2; break; + case PDiv : { + if (r2 == 0.0) + // protection a la Koza, realistic implementations + // should maybe throw an exception + result = 1.0; + else + result = r1 / r2; + break; + } + case X : result = var; break; + } } /// 'Pretty' print to ostream function template - void operator()(string& result, Children args) const + void operator()(string& result, Children args) const { - static const string lb = "("; - static const string rb = ")"; - char opStr[4] = " "; - opStr[1] = op; + static const string lb = "("; + static const string rb = ")"; + char opStr[4] = " "; + opStr[1] = op; if (arity() == 0) { - result = "x"; - return; - } - // else - string r1; - args[0].apply(r1); - result = lb + r1; - result += opStr; - args[1].apply(r1); - result += r1 + rb; + result = "x"; + return; + } + // else + string r1; + args[0].apply(r1); + result = lb + r1; + result += opStr; + args[1].apply(r1); + result += r1 + rb; } Operator getOp() const { return op; } @@ -99,7 +99,7 @@ static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNod // template <> // bool lt_arity(const SymregNode &node1, const SymregNode &node2) // { -// return (node1.arity() < node2.arity()); +// return (node1.arity() < node2.arity()); // } // #endif @@ -166,16 +166,16 @@ public : vector outputs; outputs.resize(inputs.size()); - double fitness = 0.0; + double fitness = 0.0; for (unsigned i = 0; i < inputs.size(); ++i) - { + { _eo.apply(outputs[i], inputs[i]); - fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); - } + fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); + } - fitness /= (double) target.size(); - fitness = sqrt(fitness); + fitness /= (double) target.size(); + fitness = sqrt(fitness); if (fitness > 1e+20) fitness = 1e+20; @@ -197,11 +197,11 @@ void print_best(eoPop& pop) for (unsigned i = 1; i < pop.size(); ++i) { - if (best < pop[i].fitness()) - { - best = pop[i].fitness(); - index = i; - } + if (best < pop[i].fitness()) + { + best = pop[i].fitness(); + index = i; + } } std::cout << "\t"; diff --git a/eo/test/t-eoSyncEasyPSO.cpp b/eo/test/t-eoSyncEasyPSO.cpp index f9acba24c..68d9838bd 100644 --- a/eo/test/t-eoSyncEasyPSO.cpp +++ b/eo/test/t-eoSyncEasyPSO.cpp @@ -19,7 +19,7 @@ double real_value (const Particle & _particle) { double sum = 0; for (unsigned i = 0; i < _particle.size ()-1; i++) - sum += pow(_particle[i],2); + sum += pow(_particle[i],2); return (sum); } @@ -50,15 +50,15 @@ int main() // perform position initialization pop.append (POP_SIZE, random); - + // topology eoLinearTopology topology(NEIGHBORHOOD_SIZE); // the full initializer eoInitializer init(eval,veloRandom,localInit,topology,pop); init(); - - + + // bounds eoRealVectorBounds bnds(VEC_SIZE,-1.5,1.5); @@ -71,32 +71,32 @@ int main() // Terminators eoGenContinue genCont1 (50); eoGenContinue genCont2 (50); - + // PS flight eoSyncEasyPSO pso1(genCont1, eval, velocity, flight); eoSyncEasyPSO pso2(init,genCont2, eval, velocity, flight); - + // flight try { - pso1(pop); - std::cout << "FINAL POPULATION AFTER SYNC PSO n°1:" << std::endl; + pso1(pop); + std::cout << "FINAL POPULATION AFTER SYNC PSO n°1:" << std::endl; for (i = 0; i < pop.size(); ++i) - std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; - - pso2(pop); - std::cout << "FINAL POPULATION AFTER SYNC PSO n°2:" << std::endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + pso2(pop); + std::cout << "FINAL POPULATION AFTER SYNC PSO n°2:" << std::endl; for (i = 0; i < pop.size(); ++i) - std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; } catch (std::exception& e) { - std::cout << "exception: " << e.what() << std::endl;; - exit(EXIT_FAILURE); + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); } - + return 0; } diff --git a/eo/test/t-eoTwoOptMutation.cpp b/eo/test/t-eoTwoOptMutation.cpp index 95e713a6c..60ef89a15 100644 --- a/eo/test/t-eoTwoOptMutation.cpp +++ b/eo/test/t-eoTwoOptMutation.cpp @@ -48,13 +48,13 @@ int main() // a chromosome randomizer eoInitPermutation random(CHROM_SIZE); - - // the population: + + // the population: eoPop pop; - + // Evaluation eoEvalFuncPtr eval( real_value ); - + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); @@ -62,10 +62,10 @@ int main() eval(chrom); pop.push_back(chrom); } - + // a twoOpt mutation eoTwoOptMutation twoOpt; - + for (i = 0; i < POP_SIZE; ++i) { std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; @@ -73,7 +73,7 @@ int main() std::cout << " ... becomes : " << pop[i] << " after twoOpt mutation" << std::endl; check_permutation(pop[i]); } - + return 0; } diff --git a/eo/test/t-eoUniform.cpp b/eo/test/t-eoUniform.cpp index 04c23e5ca..c4f188d48 100644 --- a/eo/test/t-eoUniform.cpp +++ b/eo/test/t-eoUniform.cpp @@ -16,7 +16,7 @@ main() { for ( unsigned i = 0; i < 100; i ++) { std::cout << u1() << "\t" << u2() << "\t" << u3() << std::endl; } - + } //----------------------------------------------------------------------------- diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp index 347a78963..8ecdf207e 100644 --- a/eo/test/t-eoVirus.cpp +++ b/eo/test/t-eoVirus.cpp @@ -67,11 +67,10 @@ int main() // Chrom Transmision std::cout << "Chrom transmission--------" << std::endl; - VirusTransmission vt; + VirusTransmission vt; vt( chrom2, chrom ); std::cout << chrom2 << std::endl; return 0; } - diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 7c27e001f..d857dd822 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -208,11 +208,11 @@ int main() try { - main_function(); + main_function(); } catch(std::exception& e) { - std::cout << "Exception: " << e.what() << '\n'; + std::cout << "Exception: " << e.what() << '\n'; } } diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index 1999e9fd5..1cc55e65a 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -18,11 +18,11 @@ int test_fitness(Fitness a, Fitness b) { // srand(time(0)); -// Fitness a = aval; //static_cast(rand()) / RAND_MAX; +// Fitness a = aval; //static_cast(rand()) / RAND_MAX; // Fitness b = bval; //static_cast(rand()) / RAND_MAX; std::cout.precision(2); - + unsigned repeat = 2; while (repeat--) { @@ -32,25 +32,25 @@ int test_fitness(Fitness a, Fitness b) std::cout << a << " < " << b << " is true" << std::endl; else std::cout << a << " < " << b << " is false" < "; if (a > b) std::cout << a << " > " << b << " is true" << std::endl; else std::cout << a << " > " << b << " is false" < 0 else 1 - iters = ( nonzero( P - p ) / ps ) * ( nonzero( D - d ) / ds ) - pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) - pylab.ylabel('%s - %s' % (cur, name)) - pylab.savefig( filename + '.pdf', format='pdf' ) - pylab.savefig( filename + '.png', format='png' ) - pylab.cla() - pylab.clf() + def generate( filenames ): + for cur in filenames: + filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) + pylab.boxplot( get_boxplot_data( filename ) ) + nonzero = lambda x: x if x > 0 else 1 + iters = ( nonzero( P - p ) / ps ) * ( nonzero( D - d ) / ds ) + pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) + pylab.ylabel('%s - %s' % (cur, name)) + pylab.savefig( filename + '.pdf', format='pdf' ) + pylab.savefig( filename + '.png', format='png' ) + pylab.cla() + pylab.clf() - if not options.onlyVarTime: - generate( ['speedup', 'efficiency', 'dynamicity'] ) - if not options.onlyConstTime: - generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] ) + if not options.onlyVarTime: + generate( ['speedup', 'efficiency', 'dynamicity'] ) + if not options.onlyConstTime: + generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] ) def main(): if not options.onlyprint: - logging.info('creates first the new topic repository %s', options.topic) - os.mkdir( options.topic ) + logging.info('creates first the new topic repository %s', options.topic) + os.mkdir( options.topic ) logging.info('do all tests with r = %d and a common seed value = %d' % (options.nRun, options.seed)) @@ -133,24 +133,24 @@ def main(): F = options.fixedBound if options.measure is None or 1 in options.measure: - logging.info('(1) measure for all combinaisons of P n D') - do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n ) + logging.info('(1) measure for all combinaisons of P n D') + do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n ) if options.measure is None or 2 in options.measure: - logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F)) - do_measure( '2', 1*n, 1*n, 101*n, F, 1, F ) + logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F)) + do_measure( '2', 1*n, 1*n, 101*n, F, 1, F ) if options.measure is None or 3 in options.measure: - logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F)) - do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F ) + logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F ) if options.measure is None or 4 in options.measure: - logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F)) - do_measure( '4', F, 1, F, 1*n, 1*n, 101*n ) + logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F)) + do_measure( '4', F, 1, F, 1*n, 1*n, 101*n ) if options.measure is None or 5 in options.measure: - logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F)) - do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n ) + logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n ) # when executed, just run main(): if __name__ == '__main__': diff --git a/eo/test/t-selectOne.cpp b/eo/test/t-selectOne.cpp index e401188eb..0647d5d23 100644 --- a/eo/test/t-selectOne.cpp +++ b/eo/test/t-selectOne.cpp @@ -3,8 +3,8 @@ //----------------------------------------------------------------------------- // t-selectOne.cpp // This program test the breeder object -// (c) GeNeura Team, 1998 -/* +// (c) GeNeura Team, 1998 +/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - + */ //----------------------------------------------------------------------------- @@ -52,7 +52,7 @@ main() unsigned i; eoBinRandom random; - eoPop pop; + eoPop pop; // Create the population for (i = 0; i < POP_SIZE; ++i) { @@ -61,7 +61,7 @@ main() BinaryValue()(chrom); pop.push_back(chrom); } - + // print population std::cout << "population:" << std::endl; for (i = 0; i < pop.size(); ++i) diff --git a/eo/tutorial/Lesson1/CMakeLists.txt b/eo/tutorial/Lesson1/CMakeLists.txt index 614b8421a..72862e036 100644 --- a/eo/tutorial/Lesson1/CMakeLists.txt +++ b/eo/tutorial/Lesson1/CMakeLists.txt @@ -10,23 +10,23 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### ### 3) Define your targets ###################################################################################### # no matter what is the OS, hopefully -ADD_EXECUTABLE(FirstBitGA FirstBitGA.cpp) -ADD_EXECUTABLE(FirstRealGA FirstRealGA.cpp) -ADD_EXECUTABLE(exercise1.3 exercise1.3.cpp) +ADD_EXECUTABLE(FirstBitGA FirstBitGA.cpp) +ADD_EXECUTABLE(FirstRealGA FirstRealGA.cpp) +ADD_EXECUTABLE(exercise1.3 exercise1.3.cpp) ADD_DEPENDENCIES(FirstBitGA ga eo eoutils) ADD_DEPENDENCIES(FirstRealGA ga eo eoutils) diff --git a/eo/tutorial/Lesson1/FirstBitGA.cpp b/eo/tutorial/Lesson1/FirstBitGA.cpp index ac53607ae..cc187a81e 100644 --- a/eo/tutorial/Lesson1/FirstBitGA.cpp +++ b/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -78,10 +78,10 @@ void main_function(int argc, char **argv) { Indi v; // void individual, to be filled for (unsigned ivar=0; ivar gga(select, xover, CROSS_RATE, mutation, MUT_RATE, - eval, continuator); + eval, continuator); // Apply algo to pop - that's it! gga(pop); @@ -156,11 +156,11 @@ int main(int argc, char **argv) try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson1/FirstRealGA.cpp b/eo/tutorial/Lesson1/FirstRealGA.cpp index 09db59e61..074c5ae86 100644 --- a/eo/tutorial/Lesson1/FirstRealGA.cpp +++ b/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -78,10 +78,10 @@ void main_function(int argc, char **argv) { Indi v; // void individual, to be filled for (unsigned ivar=0; ivar gga(select, xover, CROSS_RATE, mutation, MUT_RATE, - eval, continuator); + eval, continuator); // Apply algo to pop - that's it! gga(pop); @@ -151,11 +151,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson1/Makefile.simple b/eo/tutorial/Lesson1/Makefile.simple index 093ca8525..cca13043b 100644 --- a/eo/tutorial/Lesson1/Makefile.simple +++ b/eo/tutorial/Lesson1/Makefile.simple @@ -5,11 +5,11 @@ DIR_EO = ../../src .SUFFIXES: .cpp # Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, +# However, if you are using this Makefile within xemacs, # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a .cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp @@ -21,5 +21,5 @@ lesson1 : $(firstGA) all : $(ALL) -clean : +clean : @/bin/rm $(ALL) *.o *~ diff --git a/eo/tutorial/Lesson1/exercise1.3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp index abd62a0b9..89965d511 100644 --- a/eo/tutorial/Lesson1/exercise1.3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -18,7 +18,7 @@ //----------------------------------------------------------------------------- // Include the corresponding file -#include // bitstring representation & operators +#include // bitstring representation & operators // define your individuals typedef eoBit Indi; // A bitstring with fitness double @@ -151,11 +151,11 @@ int main(int argc, char **argv) try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson2/CMakeLists.txt b/eo/tutorial/Lesson2/CMakeLists.txt index db3e0e98c..23669155e 100644 --- a/eo/tutorial/Lesson2/CMakeLists.txt +++ b/eo/tutorial/Lesson2/CMakeLists.txt @@ -10,23 +10,23 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### ### 3) Define your targets ###################################################################################### # no matter what is the OS, hopefully -ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp) -ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp) -ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp) +ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp) +ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp) +ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp) ###################################################################################### ### 4) Optionnal diff --git a/eo/tutorial/Lesson2/FirstBitEA.cpp b/eo/tutorial/Lesson2/FirstBitEA.cpp index 13da78957..fd508a55c 100644 --- a/eo/tutorial/Lesson2/FirstBitEA.cpp +++ b/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -182,11 +182,11 @@ int main(int argc, char **argv) try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson2/FirstRealEA.cpp b/eo/tutorial/Lesson2/FirstRealEA.cpp index 8901c3818..6c259b3bf 100644 --- a/eo/tutorial/Lesson2/FirstRealEA.cpp +++ b/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -52,7 +52,7 @@ void main_function(int argc, char **argv) const float P_MUT = 0.5; // mutation probability const double EPSILON = 0.01; // range for real uniform mutation - double SIGMA = 0.3; // std dev. for normal mutation + double SIGMA = 0.3; // std dev. for normal mutation // some parameters for chosing among different operators const double hypercubeRate = 0.5; // relative weight for hypercube Xover const double segmentRate = 0.5; // relative weight for segment Xover @@ -181,11 +181,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson2/Makefile.simple b/eo/tutorial/Lesson2/Makefile.simple index 1aec17105..d5cba2250 100644 --- a/eo/tutorial/Lesson2/Makefile.simple +++ b/eo/tutorial/Lesson2/Makefile.simple @@ -1,5 +1,5 @@ ### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf +# Unlike other Makefiles in EO, it is not using the automake/autoconf # so that it stays easy to understant (you are in the tutorial, remember!) # MS, Oct. 2002 @@ -10,11 +10,11 @@ DIR_EO = ../../src .SUFFIXES: .cpp # Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, +# However, if you are using this Makefile within xemacs, # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a .cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp @@ -26,7 +26,7 @@ lesson2 : $(firstEA) all : $(ALL) -clean : +clean : @/bin/rm $(ALL) *.o *~ FirstRealEA : real_value.h diff --git a/eo/tutorial/Lesson2/binary_value.h b/eo/tutorial/Lesson2/binary_value.h index f2f5d6ca1..66d2823ec 100644 --- a/eo/tutorial/Lesson2/binary_value.h +++ b/eo/tutorial/Lesson2/binary_value.h @@ -4,7 +4,7 @@ /** Just a simple function that takes binary value of a chromosome and sets the fitnes. - @param _chrom A binary chromosome + @param _chrom A binary chromosome */ // INIT double binary_value(const std::vector& _chrom) @@ -14,4 +14,3 @@ double binary_value(const std::vector& _chrom) sum += _chrom[i]; return sum; } - diff --git a/eo/tutorial/Lesson2/exercise2.3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp index dc39e5d9f..c1b51aa00 100644 --- a/eo/tutorial/Lesson2/exercise2.3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -20,7 +20,7 @@ // REPRESENTATION //----------------------------------------------------------------------------- // Include the corresponding file -#include // bitstring representation & operators +#include // bitstring representation & operators // define your individuals typedef eoBit Indi; // A bitstring with fitness double @@ -186,11 +186,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson2/real_value.h b/eo/tutorial/Lesson2/real_value.h index cc32e633f..866e2941a 100644 --- a/eo/tutorial/Lesson2/real_value.h +++ b/eo/tutorial/Lesson2/real_value.h @@ -1,8 +1,8 @@ #include //----------------------------------------------------------------------------- -/** Just a simple function that takes an vector and sets the fitnes +/** Just a simple function that takes an vector and sets the fitnes to the sphere function. Please use doubles not float!!! - @param _ind A floatingpoint vector + @param _ind A floatingpoint vector */ // INIT @@ -15,6 +15,3 @@ double real_value(const std::vector& _ind) } return -sum; } - - - diff --git a/eo/tutorial/Lesson3/CMakeLists.txt b/eo/tutorial/Lesson3/CMakeLists.txt index b3e7c0a78..a59f4a63f 100644 --- a/eo/tutorial/Lesson3/CMakeLists.txt +++ b/eo/tutorial/Lesson3/CMakeLists.txt @@ -10,23 +10,23 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### ### 3) Define your targets ###################################################################################### # no matter what is the OS, hopefully -ADD_EXECUTABLE(SecondBitEA SecondBitEA.cpp) -ADD_EXECUTABLE(SecondRealEA SecondRealEA.cpp) -ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp) +ADD_EXECUTABLE(SecondBitEA SecondBitEA.cpp) +ADD_EXECUTABLE(SecondRealEA SecondRealEA.cpp) +ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp) ADD_DEPENDENCIES(SecondBitEA ga eoutils eo) ADD_DEPENDENCIES(SecondRealEA ga eoutils eo) @@ -62,4 +62,3 @@ INSTALL(TARGETS SecondRealEA RUNTIME DESTINATION share/eo/examples/Lesson3 COMPO INSTALL(TARGETS exercise3.1 RUNTIME DESTINATION share/eo/examples/Lesson3 COMPONENT examples) ###################################################################################### - diff --git a/eo/tutorial/Lesson3/Makefile.simple b/eo/tutorial/Lesson3/Makefile.simple index 186791f26..3e63424da 100644 --- a/eo/tutorial/Lesson3/Makefile.simple +++ b/eo/tutorial/Lesson3/Makefile.simple @@ -1,5 +1,5 @@ ### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf +# Unlike other Makefiles in EO, it is not using the automake/autoconf # so that it stays easy to understant (you are in the tutorial, remember!) # MS, Oct. 2002 @@ -10,11 +10,11 @@ DIR_EO = ../../src .SUFFIXES: .cpp # Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, +# However, if you are using this Makefile within xemacs, # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a .cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp @@ -29,5 +29,5 @@ all : $(ALL) SecondBitEA : binary_value.h SecondRealEA : real_value.h -clean : +clean : @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson3/SecondBitEA.cpp b/eo/tutorial/Lesson3/SecondBitEA.cpp index 0507bc5c3..92e181284 100644 --- a/eo/tutorial/Lesson3/SecondBitEA.cpp +++ b/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -126,8 +126,8 @@ void main_function(int argc, char **argv) // i.e. in case you need parameters somewhere else, postpone these if (parser.userNeedsHelp()) { - parser.printHelp(cout); - exit(1); + parser.printHelp(cout); + exit(1); } if (statusParam.value() != "") { @@ -337,11 +337,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson3/SecondRealEA.cpp b/eo/tutorial/Lesson3/SecondRealEA.cpp index 2ae69fd81..b5ca0c800 100644 --- a/eo/tutorial/Lesson3/SecondRealEA.cpp +++ b/eo/tutorial/Lesson3/SecondRealEA.cpp @@ -104,8 +104,8 @@ void main_function(int argc, char **argv) // i.e. in case you need parameters somewhere else, postpone these if (parser.userNeedsHelp()) { - parser.printHelp(cout); - exit(1); + parser.printHelp(cout); + exit(1); } if (statusName != "") { @@ -318,11 +318,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson3/binary_value.h b/eo/tutorial/Lesson3/binary_value.h index f2f5d6ca1..66d2823ec 100644 --- a/eo/tutorial/Lesson3/binary_value.h +++ b/eo/tutorial/Lesson3/binary_value.h @@ -4,7 +4,7 @@ /** Just a simple function that takes binary value of a chromosome and sets the fitnes. - @param _chrom A binary chromosome + @param _chrom A binary chromosome */ // INIT double binary_value(const std::vector& _chrom) @@ -14,4 +14,3 @@ double binary_value(const std::vector& _chrom) sum += _chrom[i]; return sum; } - diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp index 50531e094..f21e5930e 100644 --- a/eo/tutorial/Lesson3/exercise3.1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -24,7 +24,7 @@ // REPRESENTATION //----------------------------------------------------------------------------- // Include the corresponding file -#include // bitstring representation & operators +#include // bitstring representation & operators // define your genotype and fitness types typedef eoBit Indi; @@ -126,8 +126,8 @@ void main_function(int argc, char **argv) // i.e. in case you need parameters somewhere else, postpone these if (parser.userNeedsHelp()) { - parser.printHelp(cout); - exit(1); + parser.printHelp(cout); + exit(1); } if (statusParam.value() != "") { @@ -393,11 +393,11 @@ int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson3/real_value.h b/eo/tutorial/Lesson3/real_value.h index 7fe002b63..525bf393f 100644 --- a/eo/tutorial/Lesson3/real_value.h +++ b/eo/tutorial/Lesson3/real_value.h @@ -1,8 +1,8 @@ #include //----------------------------------------------------------------------------- -/** Just a simple function that takes an vector and sets the fitnes +/** Just a simple function that takes an vector and sets the fitnes to the sphere function. Please use doubles not float!!! - @param _ind A floatingpoint vector + @param _ind A floatingpoint vector */ // INIT @@ -15,6 +15,3 @@ double real_value(const std::vector& _ind) } return sum; } - - - diff --git a/eo/tutorial/Lesson4/BitEA.cpp b/eo/tutorial/Lesson4/BitEA.cpp index fd6f1fbda..97a6cc435 100644 --- a/eo/tutorial/Lesson4/BitEA.cpp +++ b/eo/tutorial/Lesson4/BitEA.cpp @@ -10,7 +10,7 @@ using namespace std; int main(int argc, char* argv[]) -{ +{ try { @@ -29,7 +29,7 @@ int main(int argc, char* argv[]) ////////////////////////////////////////////////////// // EVAL - // The evaluation fn - encapsulated into an eval counter for output + // The evaluation fn - encapsulated into an eval counter for output eoEvalFuncPtr mainEval( binary_value ); eoEvalFuncCounter eval(mainEval); @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) eoInit& init = make_genotype(parser, state, EOT()); // if you want to do sharing, you'll need a distance. - // here Hamming distance + // here Hamming distance eoHammingDistance dist; // OPERATORS @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) // evaluate intial population AFTER help and status in case it takes time apply(eval, pop); // STOP - // print it out (sort witout modifying) + // print it out (sort witout modifying) cout << "Initial Population\n"; pop.sortedPrintOn(cout); cout << endl; @@ -82,7 +82,7 @@ int main(int argc, char* argv[]) // GENERATION run_ea(ga, pop); // run the ga // STOP - // print it out (sort witout modifying) + // print it out (sort witout modifying) cout << "Final Population\n"; pop.sortedPrintOn(cout); cout << endl; diff --git a/eo/tutorial/Lesson4/CMakeLists.txt b/eo/tutorial/Lesson4/CMakeLists.txt index 20e0cde43..739fed1bb 100644 --- a/eo/tutorial/Lesson4/CMakeLists.txt +++ b/eo/tutorial/Lesson4/CMakeLists.txt @@ -21,7 +21,7 @@ EXECUTE_PROCESS( # COMMAND ${CMAKE_COMMAND} # ARGS -E copy_if_different # ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param -# ${EO_BINARY_DIR}/tutorial/Lesson4) +# ${EO_BINARY_DIR}/tutorial/Lesson4) #ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param) #ADD_CUSTOM_COMMAND( # TARGET param @@ -29,7 +29,7 @@ EXECUTE_PROCESS( # COMMAND ${CMAKE_COMMAND} # ARGS -E copy_if_different # ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param -# ${EO_BINARY_DIR}/tutorial/Lesson4) +# ${EO_BINARY_DIR}/tutorial/Lesson4) ###################################################################################### ### 1) Include the sources @@ -44,23 +44,23 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### ### 3) Define your targets ###################################################################################### # no matter what is the OS, hopefully -ADD_EXECUTABLE(BitEA BitEA.cpp) -ADD_EXECUTABLE(RealEA RealEA.cpp) -ADD_EXECUTABLE(ESEA ESEA.cpp) +ADD_EXECUTABLE(BitEA BitEA.cpp) +ADD_EXECUTABLE(RealEA RealEA.cpp) +ADD_EXECUTABLE(ESEA ESEA.cpp) #ADD_DEPENDENCIES(BitEA es ga eo eoutils) #ADD_DEPENDENCIES(RealEA es ga eo eoutils) @@ -96,4 +96,3 @@ INSTALL(TARGETS RealEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT e INSTALL(TARGETS ESEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT examples) ###################################################################################### - diff --git a/eo/tutorial/Lesson4/ESEA.cpp b/eo/tutorial/Lesson4/ESEA.cpp index 1c1bd30cf..6a2b51a23 100644 --- a/eo/tutorial/Lesson4/ESEA.cpp +++ b/eo/tutorial/Lesson4/ESEA.cpp @@ -20,14 +20,14 @@ using namespace std; #include "real_value.h" // the sphere fitness -// Now the main -/////////////// +// Now the main +/////////////// typedef eoMinimizingFitness FitT; template void runAlgorithm(EOT, eoParser& _parser, eoState& _state); - -int main_function(int argc, char *argv[]) + +int main_function(int argc, char *argv[]) { // Create the command-line parser eoParser parser(argc, argv); // for user-parameter reading @@ -55,33 +55,33 @@ int main_function(int argc, char *argv[]) cout << "Using eoEsStdev" << endl; runAlgorithm(eoEsStdev(), parser, state); } - else + else { cout << "Using eoEsFull" << endl; runAlgorithm(eoEsFull(), parser, state); } - return 0; + return 0; } // A main that catches the exceptions - + int main(int argc, char **argv) { try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } - + return 1; } /** The templatized main (sort of) - * quite similar to the main of other genotypes + * quite similar to the main of other genotypes * (e.g. t-eoReal and t-eoGA in test dir) */ template @@ -92,9 +92,9 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state) ///// FIRST, problem or representation dependent stuff ////////////////////////////////////////////////////// - // The evaluation fn - encapsulated into an eval counter for output - eoEvalFuncPtr&> - mainEval( real_value ); + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer diff --git a/eo/tutorial/Lesson4/ESEA.param b/eo/tutorial/Lesson4/ESEA.param index 06df5c738..b5dc6d016 100644 --- a/eo/tutorial/Lesson4/ESEA.param +++ b/eo/tutorial/Lesson4/ESEA.param @@ -1,4 +1,3 @@ - ###### General ###### # --help=0 # -h : Prints this message # --stopOnUnknownParam=1 # Stop if unkown param entered @@ -17,7 +16,7 @@ --weakElitism=0 # -w : Old best parent replaces new worst offspring *if necessary* ###### Genotype Initialization ###### -# --vecSize=10 # -n : The number of variables +# --vecSize=10 # -n : The number of variables # --initBounds=10[-1,1] # -B : Bounds for initialization (MUST be bounded) --sigmaInit=0.3% # -s : Initial value for Sigmas (with a '%' -> scaled by the range of each variable) diff --git a/eo/tutorial/Lesson4/Makefile.simple b/eo/tutorial/Lesson4/Makefile.simple index 75bd41dd4..72c02565e 100644 --- a/eo/tutorial/Lesson4/Makefile.simple +++ b/eo/tutorial/Lesson4/Makefile.simple @@ -1,5 +1,5 @@ ### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf +# Unlike other Makefiles in EO, it is not using the automake/autoconf # so that it stays easy to understant (you are in the tutorial, remember!) # MS, Oct. 2002 @@ -10,11 +10,11 @@ DIR_EO = ../../src .SUFFIXES: .cpp # Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, +# However, if you are using this Makefile within xemacs, # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a .cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp @@ -22,12 +22,12 @@ ALL = BitEA RealEA ESEA all : $(ALL) -BitEA : BitEA.o ; - $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/ga/libga.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +BitEA : BitEA.o ; + $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/ga/libga.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a RealEA : RealEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a ESEA : ESEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -clean : +clean : @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson4/RealEA.cpp b/eo/tutorial/Lesson4/RealEA.cpp index 8002136c0..1775b12b7 100644 --- a/eo/tutorial/Lesson4/RealEA.cpp +++ b/eo/tutorial/Lesson4/RealEA.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) ///// FIRST, problem or representation dependent stuff ////////////////////////////////////////////////////// - // The evaluation fn - encapsulated into an eval counter for output - eoEvalFuncPtr&> - mainEval( real_value ); + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); eoEvalFuncCounter eval(mainEval); // the genotype - through a genotype initializer diff --git a/eo/tutorial/Lesson4/RealEA.param b/eo/tutorial/Lesson4/RealEA.param index dba2db343..d1f8cfc4e 100644 --- a/eo/tutorial/Lesson4/RealEA.param +++ b/eo/tutorial/Lesson4/RealEA.param @@ -1,4 +1,3 @@ - ###### General ###### # --help=0 # -h : Prints this message # --stopOnUnknownParam=1 # Stop if unkown param entered @@ -12,7 +11,7 @@ --weakElitism=0 # -w : Old best parent replaces new worst offspring *if necessary* ###### Genotype Initialization ###### -# --vecSize=10 # -n : The number of variables +# --vecSize=10 # -n : The number of variables # --initBounds=10[-1,1] # -B : Bounds for initialization (MUST be bounded) --sigmaInit=0.3% # -s : Initial value for Sigmas (with a '%' -> scaled by the range of each variable) diff --git a/eo/tutorial/Lesson4/binary_value.h b/eo/tutorial/Lesson4/binary_value.h index 188835fca..f8dd5891d 100644 --- a/eo/tutorial/Lesson4/binary_value.h +++ b/eo/tutorial/Lesson4/binary_value.h @@ -4,7 +4,7 @@ /** Just a simple function that takes binary value of a chromosome and sets the fitnes. - @param _chrom A binary chromosome + @param _chrom A binary chromosome */ template double binary_value(const Chrom& _chrom) diff --git a/eo/tutorial/Lesson4/real_value.h b/eo/tutorial/Lesson4/real_value.h index 8f3a0df59..f8ef3e589 100644 --- a/eo/tutorial/Lesson4/real_value.h +++ b/eo/tutorial/Lesson4/real_value.h @@ -2,8 +2,8 @@ //----------------------------------------------------------------------------- -/** Just a simple function that takes an eoEsBase and sets the fitnes - to sphere +/** Just a simple function that takes an eoEsBase and sets the fitnes + to sphere @param _ind vector */ @@ -14,6 +14,3 @@ double real_value(const std::vector& _ind) sum += _ind[i] * _ind[i]; return sqrt(sum); } - - - diff --git a/eo/tutorial/Lesson5/CMakeLists.txt b/eo/tutorial/Lesson5/CMakeLists.txt index 224552e3f..72852d046 100644 --- a/eo/tutorial/Lesson5/CMakeLists.txt +++ b/eo/tutorial/Lesson5/CMakeLists.txt @@ -9,22 +9,22 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### ### 3) Define your targets ###################################################################################### # no matter what is the OS, hopefully -ADD_EXECUTABLE(OneMaxEA OneMaxEA.cpp) -ADD_EXECUTABLE(OneMaxLibEA OneMaxLibEA.cpp make_OneMax.cpp) +ADD_EXECUTABLE(OneMaxEA OneMaxEA.cpp) +ADD_EXECUTABLE(OneMaxLibEA OneMaxLibEA.cpp make_OneMax.cpp) ADD_DEPENDENCIES(OneMaxEA es ga eo eoutils) ADD_DEPENDENCIES(OneMaxLibEA es ga eo eoutils) diff --git a/eo/tutorial/Lesson5/Makefile.simple b/eo/tutorial/Lesson5/Makefile.simple index bb865c104..ace0df586 100644 --- a/eo/tutorial/Lesson5/Makefile.simple +++ b/eo/tutorial/Lesson5/Makefile.simple @@ -1,5 +1,5 @@ ### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf +# Unlike other Makefiles in EO, it is not using the automake/autoconf # so that it stays easy to understant (you are in the tutorial, remember!) # MS, Oct. 2002 @@ -10,11 +10,11 @@ DIR_EO = ../../src .SUFFIXES: .cpp # Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, +# However, if you are using this Makefile within xemacs, # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a .cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp @@ -39,7 +39,7 @@ LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a ALL = OneMaxEA OneMaxLibEA OneMaxEA : OneMaxEA.o - $(CXX) -g -o $@ OneMaxEA.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm + $(CXX) -g -o $@ OneMaxEA.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm OneMaxLibEA : OneMaxLibEA.o make_OneMax.o $(CXX) -g -o $@ OneMaxLibEA.o make_OneMax.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm @@ -53,4 +53,4 @@ clean : ; /bin/rm *.o $(ALL) ########## local dependencies OneMaxEA.o : $(COMMON_SOURCES) OneMaxEA.cpp OneMaxLibEA.o : $(COMMON_SOURCES) OneMaxLibEA.cpp -make_OneMax.o : make_OneMax.cpp eoOneMax.h +make_OneMax.o : make_OneMax.cpp eoOneMax.h diff --git a/eo/tutorial/Lesson5/OneMaxEA.cpp b/eo/tutorial/Lesson5/OneMaxEA.cpp index 1f3470f33..14a0f4c5e 100644 --- a/eo/tutorial/Lesson5/OneMaxEA.cpp +++ b/eo/tutorial/Lesson5/OneMaxEA.cpp @@ -17,7 +17,7 @@ main file BitEA in tutorial/Lesson4 dir. Or you can wait until we do it :-) */ -// Miscilaneous include and declaration +// Miscilaneous include and declaration #include using namespace std; @@ -29,17 +29,17 @@ using namespace std; // include here whatever specific files for your representation // Basically, this should include at least the following -/** definition of representation: +/** definition of representation: * class eoOneMax MUST derive from EO for some fitness */ #include "eoOneMax.h" -/** definition of initilizqtion: +/** definition of initilizqtion: * class eoOneMaxInit MUST derive from eoInit */ #include "eoOneMaxInit.h" -/** definition of evaluation: +/** definition of evaluation: * class eoOneMaxEvalFunc MUST derive from eoEvalFunc * and should test for validity before doing any computation * see tutorial/Templates/evalFunc.tmpl @@ -51,19 +51,19 @@ using namespace std; //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* // START fitness type: double or eoMaximizingFitness if you are maximizing // eoMinimizingFitness if you are minimizing -typedef eoMaximizingFitness MyFitT ; // type of fitness +typedef eoMaximizingFitness MyFitT ; // type of fitness // END fitness type //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* // Then define your EO objects using that fitness type -typedef eoOneMax Indi; // ***MUST*** derive from EO +typedef eoOneMax Indi; // ***MUST*** derive from EO // create an initializer #include "make_genotype_OneMax.h" eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) { return do_make_genotype(_parser, _state, _eo); -} +} // and the variation operaotrs #include "make_op_OneMax.h" @@ -75,7 +75,7 @@ eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) // Use existing modules to define representation independent routines // These are parser-based definitions of objects -// how to initialize the population +// how to initialize the population // it IS representation independent if an eoInit is given #include eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) @@ -92,7 +92,7 @@ eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCo // outputs (stats, population dumps, ...) #include -eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } @@ -104,7 +104,7 @@ eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc // the instanciating fitnesses @@ -141,7 +141,7 @@ int main(int argc, char* argv[]) eoGenOp& op = make_op(parser, state, init); - //// Now the representation-independent things + //// Now the representation-independent things // // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT // unless you want to add specific statistics to the checkpoint diff --git a/eo/tutorial/Lesson5/OneMaxLibEA.cpp b/eo/tutorial/Lesson5/OneMaxLibEA.cpp index 42d25f923..febcca445 100644 --- a/eo/tutorial/Lesson5/OneMaxLibEA.cpp +++ b/eo/tutorial/Lesson5/OneMaxLibEA.cpp @@ -8,11 +8,11 @@ Template for creating a new representation in EO ================================================ This is the template main file for compiling after creating a -library. +library. See make_OneMax.cpp file. */ -// Miscilaneous include and declaration +// Miscilaneous include and declaration #include using namespace std; @@ -24,17 +24,17 @@ using namespace std; // include here whatever specific files for your representation // Basically, this should include at least the following -/** definition of representation: +/** definition of representation: * class eoOneMax MUST derive from EO for some fitness */ #include "eoOneMax.h" -/** definition of initilizqtion: +/** definition of initilizqtion: * class eoOneMaxInit MUST derive from eoInit */ #include "eoOneMaxInit.h" -/** definition of evaluation: +/** definition of evaluation: * class eoOneMaxEvalFunc MUST derive from eoEvalFunc * and should test for validity before doing any computation * see tutorial/Templates/evalFunc.tmpl @@ -46,12 +46,12 @@ using namespace std; // // START fitness type: double or eoMaximizingFitness if you are maximizing // eoMinimizingFitness if you are minimizing -typedef eoMinimizingFitness MyFitT ; // type of fitness +typedef eoMinimizingFitness MyFitT ; // type of fitness // END fitness type // // Then define your EO objects using that fitness type -typedef eoOneMax Indi; // ***MUST*** derive from EO +typedef eoOneMax Indi; // ***MUST*** derive from EO // create an initializer - done here and NOT in make_OneMax.cpp // because it is NOT representation independent @@ -59,7 +59,7 @@ typedef eoOneMax Indi; // ***MUST*** derive from EO eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) { return do_make_genotype(_parser, _state, _eo); -} +} // same thing for the variation operaotrs #include "make_op_OneMax.h" @@ -70,7 +70,7 @@ eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) // The representation independent routines are simply declared here -// how to initialize the population +// how to initialize the population // it IS representation independent if an eoInit is given eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init); @@ -83,7 +83,7 @@ eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFu // evolution engine (selection and replacement) eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op); -// simple call to the algo. stays there for consistency reasons +// simple call to the algo. stays there for consistency reasons // no template for that one void run_ea(eoAlgo& _ga, eoPop& _pop); @@ -115,7 +115,7 @@ int main(int argc, char* argv[]) eoGenOp& op = make_op(parser, state, init); - //// Now the representation-independent things + //// Now the representation-independent things // // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT // unless you want to add specific statistics to the checkpoint diff --git a/eo/tutorial/Lesson5/eoOneMax.h b/eo/tutorial/Lesson5/eoOneMax.h index a85bb89f7..e78b90505 100644 --- a/eo/tutorial/Lesson5/eoOneMax.h +++ b/eo/tutorial/Lesson5/eoOneMax.h @@ -11,7 +11,7 @@ Template for creating a new representation in EO #ifndef _eoOneMax_h #define _eoOneMax_h -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen @@ -20,7 +20,7 @@ Template for creating a new representation in EO * like eoVector for instance, if you handle a vector of something.... * If you create a structure from scratch, - * the only thing you need to provide are + * the only thing you need to provide are * a default constructor * IO routines printOn and readFrom * @@ -31,11 +31,11 @@ template< class FitT> class eoOneMax: public EO { public: /** Ctor: you MUST provide a default ctor. - * though such individuals will generally be processed + * though such individuals will generally be processed * by some eoInit object */ - eoOneMax() - { + eoOneMax() + { // START Code of default Ctor of an eoOneMax object // END Code of default Ctor of an eoOneMax object } @@ -54,7 +54,7 @@ public: // First write the fitness EO::printOn(_os); _os << ' '; - // START Code of default output + // START Code of default output /** HINTS * in EO we systematically write the sizes of things before the things @@ -66,7 +66,7 @@ public: // END Code of default output } - /** reading... + /** reading... * of course, your readFrom must be able to read what printOn writes!!! */ void readFrom(istream& _is) @@ -87,7 +87,7 @@ public: bool bTmp; _is >> bTmp; b[i] = bTmp; - } + } // END Code of input } @@ -108,4 +108,3 @@ private: // put all data here }; #endif - diff --git a/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h b/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h index b7f187462..e9c31d793 100644 --- a/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h +++ b/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h @@ -1,13 +1,13 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + The above line is usefulin Emacs-like editors */ - + /* Template for evaluator in EO, a functor that computes the fitness of an EO ========================================================================== */ - + #ifndef _eoOneMaxEvalFunc_h #define _eoOneMaxEvalFunc_h @@ -18,7 +18,7 @@ Template for evaluator in EO, a functor that computes the fitness of an EO // include the base definition of eoEvalFunc #include "eoEvalFunc.h" -/** +/** Always write a comment in this format before class definition if you want the class to be documented by Doxygen */ @@ -29,7 +29,7 @@ public: /// Ctor - no requirement // START eventually add or modify the anyVariable argument eoOneMaxEvalFunc() - // eoOneMaxEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) + // eoOneMaxEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument { // START Code of Ctor of an eoOneMaxEvalFunc object @@ -39,7 +39,7 @@ public: /** Actually compute the fitness * * @param EOT & _eo the EO object to evaluate - * it should stay templatized to be usable + * it should stay templatized to be usable * with any fitness type */ void operator()(EOT & _eo) diff --git a/eo/tutorial/Lesson5/eoOneMaxInit.h b/eo/tutorial/Lesson5/eoOneMaxInit.h index 7d97ae7b2..3622aa672 100644 --- a/eo/tutorial/Lesson5/eoOneMaxInit.h +++ b/eo/tutorial/Lesson5/eoOneMaxInit.h @@ -14,12 +14,12 @@ Template for EO objects initialization in EO // include the base definition of eoInit #include -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * * There is NO ASSUMPTION on the class GenoypeT. - * In particular, it does not need to derive from EO (e.g. to initialize + * In particular, it does not need to derive from EO (e.g. to initialize * atoms of an eoVector you will need an eoInit) */ template @@ -28,7 +28,7 @@ public: /// Ctor - no requirement // START eventually add or modify the anyVariable argument // eoOneMaxInit() - eoOneMaxInit( unsigned _vecSize) : vecSize(_vecSize) + eoOneMaxInit( unsigned _vecSize) : vecSize(_vecSize) // END eventually add or modify the anyVariable argument { // START Code of Ctor of an eoOneMaxInit object @@ -60,4 +60,3 @@ private: }; #endif - diff --git a/eo/tutorial/Lesson5/eoOneMaxMutation.h b/eo/tutorial/Lesson5/eoOneMaxMutation.h index 50e93109d..42a840fea 100644 --- a/eo/tutorial/Lesson5/eoOneMaxMutation.h +++ b/eo/tutorial/Lesson5/eoOneMaxMutation.h @@ -32,10 +32,10 @@ public: eoOneMaxMutation() // eoOneMaxMutation( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument - { - // START Code of Ctor of an eoOneMaxEvalFunc object - // END Code of Ctor of an eoOneMaxEvalFunc object - } + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } /// The class name. Used to display statistics string className() const { return "eoOneMaxMutation"; } @@ -45,19 +45,19 @@ public: * @param _genotype The parent genotype (will be modified) */ bool operator()(GenotypeT & _genotype) - { - bool isModified(true); - // START code for mutation of the _genotype object + { + bool isModified(true); + // START code for mutation of the _genotype object - /** Requirement - * if (_genotype has been modified) - * isModified = true; - * else - * isModified = false; - */ - return isModified; - // END code for mutation of the _genotype object - } + /** Requirement + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; + */ + return isModified; + // END code for mutation of the _genotype object + } private: // START Private data of an eoOneMaxMutation object diff --git a/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h b/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h index 5a201bd08..b10942157 100644 --- a/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h +++ b/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h @@ -33,10 +33,10 @@ public: eoOneMaxQuadCrossover() // eoOneMaxQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument - { - // START Code of Ctor of an eoOneMaxEvalFunc object - // END Code of Ctor of an eoOneMaxEvalFunc object - } + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } /// The class name. Used to display statistics string className() const { return "eoOneMaxQuadCrossover"; } @@ -47,19 +47,19 @@ public: * @param _genotype2 The second parent */ bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) - { - bool oneAtLeastIsModified(true); - // START code for crossover of _genotype1 and _genotype2 objects + { + bool oneAtLeastIsModified(true); + // START code for crossover of _genotype1 and _genotype2 objects - /** Requirement - * if (at least one genotype has been modified) // no way to distinguish - * oneAtLeastIsModified = true; - * else - * oneAtLeastIsModified = false; - */ - return oneAtLeastIsModified; - // END code for crossover of _genotype1 and _genotype2 objects - } + /** Requirement + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; + */ + return oneAtLeastIsModified; + // END code for crossover of _genotype1 and _genotype2 objects + } private: // START Private data of an eoOneMaxQuadCrossover object diff --git a/eo/tutorial/Lesson5/make_OneMax.cpp b/eo/tutorial/Lesson5/make_OneMax.cpp index 29fa78e6d..7c2c05ee6 100644 --- a/eo/tutorial/Lesson5/make_OneMax.cpp +++ b/eo/tutorial/Lesson5/make_OneMax.cpp @@ -17,7 +17,7 @@ and src/es (for real vectors). */ -// Miscilaneous include and declaration +// Miscilaneous include and declaration #include using namespace std; @@ -29,7 +29,7 @@ using namespace std; // include here whatever specific files for your representation // Basically, this should include at least the following -/** definition of representation: +/** definition of representation: * class eoOneMax MUST derive from EO for some fitness */ #include "eoOneMax.h" @@ -43,12 +43,12 @@ using namespace std; // eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoOneMax _eo) // { // return do_make_genotype(_parser, _state, _eo); -// } +// } // eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoOneMax _eo) // { // return do_make_genotype(_parser, _state, _eo); -// } +// } // same thing for the variation operaotrs //--------------------------------------- @@ -65,7 +65,7 @@ using namespace std; // The following modules use ***representation independent*** routines -// how to initialize the population +// how to initialize the population // it IS representation independent if an eoInit is given #include eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) @@ -92,12 +92,12 @@ eoContinue >& make_continue(eoParser& _parser, eoS // outputs (stats, population dumps, ...) #include -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } -eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) { return do_make_checkpoint(_parser, _state, _eval, _continue); } @@ -114,7 +114,7 @@ eoAlgo >& make_algo_scalar(eoParser& _parser, eoS return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); } -// simple call to the algo. stays there for consistency reasons +// simple call to the algo. stays there for consistency reasons // no template for that one #include void run_ea(eoAlgo >& _ga, eoPop >& _pop) @@ -126,4 +126,3 @@ void run_ea(eoAlgo >& _ga, eoPop * - * It could be here tempatized only on the fitness, as it can be used + * It could be here tempatized only on the fitness, as it can be used * to evolve structures with any fitness. - * However, for consistency reasons, it was finally chosen, as in - * the rest of EO, to templatize by the full EOT, as this eventually + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually * allows to choose the type of genotype at run time (see in es dir) * - * It returns an eoInit that can later be used to initialize + * It returns an eoInit that can later be used to initialize * the population (see make_pop.h). * * It uses a parser (to get user parameters) and a state (to store the memory) * the last argument is to disambiguate the call upon different instanciations. * - * WARNING: that last argument will generally be the result of calling - * the default ctor of EOT, resulting in most cases in an EOT + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT * that is ***not properly initialized*** */ template eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) { - // read any useful parameter here from the parser + // read any useful parameter here from the parser // the param itself will belong to the parser (as far as memory is concerned) // paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value(); diff --git a/eo/tutorial/Lesson5/make_op_OneMax.h b/eo/tutorial/Lesson5/make_op_OneMax.h index d19c89301..e157720fa 100644 --- a/eo/tutorial/Lesson5/make_op_OneMax.h +++ b/eo/tutorial/Lesson5/make_op_OneMax.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_op_OneMax.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- @@ -35,14 +35,14 @@ // combinations of simple eoOps (eoMonOp and eoQuadOp) #include -/** definition of mutation: +/** definition of mutation: * class eoOneMaxMonop MUST derive from eoMonOp */ #include "eoOneMaxMutation.h" -/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): * class eoOneMaxBinCrossover MUST derive from eoBinOp - * OR + * OR * class eoOneMaxQuadCrossover MUST derive from eoQuadOp */ // #include "eoOneMaxBinOp.h" @@ -61,9 +61,9 @@ * This function builds the operators that will be applied to the eoOneMax * * It uses a parser (to get user parameters), a state (to store the memory) - * the last parameter is an eoInit: if some operator needs some info + * the last parameter is an eoInit: if some operator needs some info * about the genotypes, the init has it all (e.g. bounds, ...) - * Simply do + * Simply do * EOT myEO; * _init(myEO); * and myEO is then an ACTUAL object @@ -85,7 +85,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit2) only - no time for the eoBinOp case // you can have more than one - combined in a proportional way - + // first, define the crossover objects and read their rates from the parser - - // A first crossover + + // A first crossover eoQuadOp *cross = new eoOneMaxQuadCrossover /* (varType _anyVariable) */; // store in the state _state.storeFunctor(cross); @@ -106,21 +106,21 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit *propXover = + eoPropCombinedQuadOp *propXover = new eoPropCombinedQuadOp(*cross, cross1Rate); // and of course stor it in the state _state.storeFunctor(propXover); - // Optional: A second(and third, and ...) crossover + // Optional: A second(and third, and ...) crossover // of course you must create the corresponding classes // and all ***MUST*** derive from eoQuadOp /* Uncomment if necessary - and replicate as many time as you need - cross = new eoOneMaxSecondCrossover(varType _anyVariable); + cross = new eoOneMaxSecondCrossover(varType _anyVariable); _state.storeFunctor(cross); - double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); - propXover.add(*cross, cross2Rate); + double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(*cross, cross2Rate); */ // if you want some gentle output, the last one shoudl be like // propXover.add(*cross, crossXXXRate, true); @@ -130,12 +130,12 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit *mut = new eoOneMaxMutation/* (varType _anyVariable) */; _state.storeFunctor(mut); // its relative rate in the combination @@ -151,8 +151,8 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit(varType _anyVariable); _state.storeFunctor(mut); - double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); - propMutation.add(*mut, mut2Rate); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); */ // if you want some gentle output, the last one shoudl be like // propMutation.add(*mut, mutXXXRate, true); @@ -170,7 +170,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit swarm + // population <=> swarm eoPop pop; /// EVALUATION @@ -78,8 +78,8 @@ void main_function(int argc, char **argv) ////////////// // ring topology eoRingTopology topology(NEIGHBORHOOD_SIZE); - - + + ///////////////////// // INITIALIZATION //////////////////// @@ -87,7 +87,7 @@ void main_function(int argc, char **argv) eoUniformGenerator uGen; eoInitFixedLength < Particle > random (VEC_SIZE, uGen); pop.append (POP_SIZE, random); - + // velocities initialization component eoUniformGenerator < double >sGen (VELOCITY_INIT_MIN, VELOCITY_INIT_MAX); eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); @@ -101,23 +101,23 @@ void main_function(int argc, char **argv) // - the first best positions of each particle // - setups the topology eoInitializer fullInit(eval,veloRandom,localInit,topology,pop); - + // Full initialization here to be able to print the initial population // Else: give the "init" component in the eoEasyPSO constructor fullInit(); - + ///////////// // OUTPUT //////////// // sort pop before printing it! pop.sort(); - + // Print (sorted) the initial population (raw printout) cout << "INITIAL POPULATION:" << endl; for (unsigned i = 0; i < pop.size(); ++i) - cout << "\t best fit=" << pop[i] << endl; + cout << "\t best fit=" << pop[i] << endl; + - /////////////// /// VELOCITY ////////////// @@ -148,7 +148,7 @@ void main_function(int argc, char **argv) //////////////////////////////////////// // standard PSO requires // stopping criteria, evaluation,velocity, flight - + eoEasyPSO pso(genCont, eval, velocity, flight); // Apply the algo to the swarm - that's it! @@ -159,7 +159,7 @@ void main_function(int argc, char **argv) pop.sort(); cout << "FINAL POPULATION:" << endl; for (unsigned i = 0; i < pop.size(); ++i) - cout << "\t best fit=" << pop[i] << endl; + cout << "\t best fit=" << pop[i] << endl; } @@ -167,14 +167,14 @@ void main_function(int argc, char **argv) // A main that catches the exceptions int main(int argc, char **argv) -{ +{ try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Lesson6/CMakeLists.txt b/eo/tutorial/Lesson6/CMakeLists.txt index b1e414537..8cc0b1010 100644 --- a/eo/tutorial/Lesson6/CMakeLists.txt +++ b/eo/tutorial/Lesson6/CMakeLists.txt @@ -8,21 +8,21 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### ### 3) Define your targets ###################################################################################### -ADD_EXECUTABLE(BinaryPSO BinaryPSO.cpp) -ADD_EXECUTABLE(RealPSO RealPSO.cpp) +ADD_EXECUTABLE(BinaryPSO BinaryPSO.cpp) +ADD_EXECUTABLE(RealPSO RealPSO.cpp) ###################################################################################### ### 4) Optionnal @@ -49,4 +49,3 @@ INSTALL(TARGETS BinaryPSO RUNTIME DESTINATION share/eo/examples/Lesson6 COMPONEN INSTALL(TARGETS RealPSO RUNTIME DESTINATION share/eo/examples/Lesson6 COMPONENT examples) ###################################################################################### - diff --git a/eo/tutorial/Lesson6/Makefile.simple b/eo/tutorial/Lesson6/Makefile.simple index d9b5b64f2..5cdc5a466 100644 --- a/eo/tutorial/Lesson6/Makefile.simple +++ b/eo/tutorial/Lesson6/Makefile.simple @@ -1,5 +1,5 @@ ### This Makefile is part of the tutorial of the EO library -# Unlike other Makefiles in EO, it is not using the automake/autoconf +# Unlike other Makefiles in EO, it is not using the automake/autoconf # so that it stays easy to understant (you are in the tutorial, remember!) # MS, Oct. 2002 @@ -10,12 +10,12 @@ DIR_EO = ../../src .SUFFIXES: .cpp # Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ -# However, if you are using this Makefile within xemacs, +# However, if you are using this Makefile within xemacs, # and have problems with the interpretation of the output (and its colors) # then you should use c++ instead (make CXX=c++ will do) -.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp -#$(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp +#$(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a .cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp @@ -27,5 +27,5 @@ lesson6 : $(PSO) all : $(ALL) -clean : +clean : @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/eo/tutorial/Lesson6/RealPSO.cpp b/eo/tutorial/Lesson6/RealPSO.cpp index 77d1167c8..23f67100f 100644 --- a/eo/tutorial/Lesson6/RealPSO.cpp +++ b/eo/tutorial/Lesson6/RealPSO.cpp @@ -27,7 +27,7 @@ FitT real_value (const Particle & _particle) { double sum = 0; for (unsigned i = 0; i < _particle.size(); i++) - sum += pow(_particle[i],2); + sum += pow(_particle[i],2); return (sqrt(sum)); } @@ -38,21 +38,21 @@ void main_function(int argc, char **argv) // PARAMETRES // all parameters are hard-coded! const unsigned int SEED = 42; // seed for random number generator - + const unsigned int MAX_GEN=100; const unsigned int VEC_SIZE = 2; const unsigned int POP_SIZE = 20; const unsigned int NEIGHBORHOOD_SIZE= 5; - + const double POS_INIT_MIN= -2; const double POS_INIT_MAX= 2; - + const double VELOCITY_INIT_MIN= -1; const double VELOCITY_INIT_MAX= 1; - + const double VELOCITY_MIN= -1.5; const double VELOCITY_MAX= 1.5; - + const double INERTIA= 1; const double LEARNING_FACTOR1= 1.7; const double LEARNING_FACTOR2= 2.3; @@ -64,9 +64,9 @@ void main_function(int argc, char **argv) // you'll aways get the same result, NOT a random run rng.reseed(SEED); - + /// SWARM - // population <=> swarm + // population <=> swarm eoPop pop; /// EVALUATION @@ -79,8 +79,8 @@ void main_function(int argc, char **argv) ////////////// // linear topology eoLinearTopology topology(NEIGHBORHOOD_SIZE); - - + + ///////////////////// // INITIALIZATION //////////////////// @@ -88,7 +88,7 @@ void main_function(int argc, char **argv) eoUniformGenerator < double >uGen (POS_INIT_MIN, POS_INIT_MAX); eoInitFixedLength < Particle > random (VEC_SIZE, uGen); pop.append (POP_SIZE, random); - + // velocities initialization component eoUniformGenerator < double >sGen (VELOCITY_INIT_MIN, VELOCITY_INIT_MAX); eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); @@ -102,23 +102,23 @@ void main_function(int argc, char **argv) // - the first best positions of each particle // - setups the topology eoInitializer fullInit(eval,veloRandom,localInit,topology,pop); - + // Full initialization here to be able to print the initial population // Else: give the "init" component in the eoEasyPSO constructor fullInit(); - + ///////////// // OUTPUT //////////// // sort pop before printing it! pop.sort(); - + // Print (sorted) the initial population (raw printout) cout << "INITIAL POPULATION:" << endl; for (unsigned i = 0; i < pop.size(); ++i) - cout << "\t best fit=" << pop[i] << endl; + cout << "\t best fit=" << pop[i] << endl; + - /////////////// /// VELOCITY ////////////// @@ -149,7 +149,7 @@ void main_function(int argc, char **argv) //////////////////////////////////////// // standard PSO requires // stopping criteria, evaluation,velocity, flight - + eoEasyPSO pso(genCont, eval, velocity, flight); // Apply the algo to the swarm - that's it! @@ -160,7 +160,7 @@ void main_function(int argc, char **argv) pop.sort(); cout << "FINAL POPULATION:" << endl; for (unsigned i = 0; i < pop.size(); ++i) - cout << "\t best fit=" << pop[i] << endl; + cout << "\t best fit=" << pop[i] << endl; } @@ -168,14 +168,14 @@ void main_function(int argc, char **argv) // A main that catches the exceptions int main(int argc, char **argv) -{ +{ try { - main_function(argc, argv); + main_function(argc, argv); } catch(exception& e) { - cout << "Exception: " << e.what() << '\n'; + cout << "Exception: " << e.what() << '\n'; } return 1; diff --git a/eo/tutorial/Makefile.simple b/eo/tutorial/Makefile.simple index 5b5d54b2e..b82ca27fe 100644 --- a/eo/tutorial/Makefile.simple +++ b/eo/tutorial/Makefile.simple @@ -3,22 +3,22 @@ SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 all: for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done -lesson1 : +lesson1 : cd Lesson1; make -lesson2 : +lesson2 : cd Lesson2; make -lesson3 : +lesson3 : cd Lesson3; make -lesson4 : +lesson4 : cd Lesson4; make -lesson5 : +lesson5 : cd Lesson5; make -lesson6 : +lesson6 : cd Lesson6; make #empty dist and distdir to let top-level 'make' do its job diff --git a/eo/tutorial/README b/eo/tutorial/README index aecd143e2..e9d994100 100644 --- a/eo/tutorial/README +++ b/eo/tutorial/README @@ -2,12 +2,11 @@ Eo Tutorial - corresponding to EO version 0.9.1+ To start the tutorial, read index.html in your favorite browser. -Many things are missing, including many solutions for the exercises, +Many things are missing, including many solutions for the exercises, the introduction to EC and most of the Component-based pages. -More important, all examples of this tutorial have only been tested -on a Linux computer, and the Makefile will not work with MS-Windows +More important, all examples of this tutorial have only been tested +on a Linux computer, and the Makefile will not work with MS-Windows systems. Any help is welcome! -Be patient ... +Be patient ... evoMarc - diff --git a/eo/tutorial/Templates/CMakeLists.txt.src-tmpl b/eo/tutorial/Templates/CMakeLists.txt.src-tmpl index 833fa2b41..ee23cd0d4 100755 --- a/eo/tutorial/Templates/CMakeLists.txt.src-tmpl +++ b/eo/tutorial/Templates/CMakeLists.txt.src-tmpl @@ -1,5 +1,3 @@ - - ###################################################################################### ### 1) Include the sources ###################################################################################### @@ -16,14 +14,14 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/do) ### 2) Specify where CMake can find the libraries ###################################################################################### -IF(NOT WIN32 OR CYGWIN) +IF(NOT WIN32 OR CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio -IF(WIN32 AND NOT CYGWIN) +IF(WIN32 AND NOT CYGWIN) LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) -ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### @@ -33,7 +31,7 @@ ENDIF(WIN32 AND NOT CYGWIN) ### 3) Define your targets ###################################################################################### -ADD_EXECUTABLE(MyStructEA MyStructEA.cpp) +ADD_EXECUTABLE(MyStructEA MyStructEA.cpp) ###################################################################################### @@ -42,7 +40,6 @@ ADD_EXECUTABLE(MyStructEA MyStructEA.cpp) ### 4) Link the librairies for the targets ###################################################################################### -TARGET_LINK_LIBRARIES(MyStructEA eo eoutils ga es) +TARGET_LINK_LIBRARIES(MyStructEA eo eoutils ga es) ###################################################################################### - diff --git a/eo/tutorial/Templates/CMakeLists.txt.top-tmpl b/eo/tutorial/Templates/CMakeLists.txt.top-tmpl index e169d2351..c653b6815 100755 --- a/eo/tutorial/Templates/CMakeLists.txt.top-tmpl +++ b/eo/tutorial/Templates/CMakeLists.txt.top-tmpl @@ -1,7 +1,5 @@ - - ###################################################################################### -### 1) Main project config +### 1) Main project config ###################################################################################### # set the project name @@ -19,16 +17,16 @@ ENABLE_LANGUAGE(CXX) IF(NOT EO_SOURCE_DIR) SET( EO_SOURCE_DIR - EO_SRC_DIR CACHE STRING - "EO source directory" - FORCE) + EO_SRC_DIR CACHE STRING + "EO source directory" + FORCE) ENDIF(NOT EO_SOURCE_DIR) IF(NOT EO_BINARY_DIR) - SET( EO_BINARY_DIR - EO_BIN_DIR CACHE STRING - "EO binary directory" - FORCE) + SET( EO_BINARY_DIR + EO_BIN_DIR CACHE STRING + "EO binary directory" + FORCE) ENDIF(NOT EO_BINARY_DIR) ###################################################################################### diff --git a/eo/tutorial/Templates/ChangeLog b/eo/tutorial/Templates/ChangeLog index ffecdd095..2ede582ea 100644 --- a/eo/tutorial/Templates/ChangeLog +++ b/eo/tutorial/Templates/ChangeLog @@ -35,12 +35,12 @@ * README.manual: This is a copy of the old README. * README: Describe the new way and setup of creating a new EO project. - + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: * configure.ac.tmpl: New files to create a standalone EO project from templates. - + * Local Variables: * coding: iso-8859-1 * mode: flyspell diff --git a/eo/tutorial/Templates/EO.tpl b/eo/tutorial/Templates/EO.tpl index 342681bca..959ad56a8 100644 --- a/eo/tutorial/Templates/EO.tpl +++ b/eo/tutorial/Templates/EO.tpl @@ -370,8 +370,8 @@ public: void printOn(ostream& os) const { // First write the fitness - EO::printOn(os); - os << ' '; + EO::printOn(os); + os << ' '; // START Code of default output /** HINTS diff --git a/eo/tutorial/Templates/MyStructLibEA.cpp b/eo/tutorial/Templates/MyStructLibEA.cpp index 24fed341d..54e9f2ff9 100644 --- a/eo/tutorial/Templates/MyStructLibEA.cpp +++ b/eo/tutorial/Templates/MyStructLibEA.cpp @@ -8,11 +8,11 @@ Template for creating a new representation in EO ================================================ This is the template main file for compiling after creating a -"library", i.e. putting everything but the fitness in a separate file +"library", i.e. putting everything but the fitness in a separate file (make_MyStruct.cpp) and compiling it once and for all. */ -// Miscilaneous include and declaration +// Miscilaneous include and declaration #include using namespace std; @@ -24,17 +24,17 @@ using namespace std; // include here whatever specific files for your representation // Basically, this should include at least the following -/** definition of representation: +/** definition of representation: * class eoMyStruct MUST derive from EO for some fitness */ #include "eoMyStruct.h" -/** definition of initilizqtion: +/** definition of initilizqtion: * class eoMyStructInit MUST derive from eoInit */ #include "eoMyStructInit.h" -/** definition of evaluation: +/** definition of evaluation: * class eoMyStructEvalFunc MUST derive from eoEvalFunc * and should test for validity before doing any computation * see tutorial/Templates/evalFunc.tmpl @@ -46,12 +46,12 @@ using namespace std; // // START fitness type: double or eoMaximizingFitness if you are maximizing // eoMinimizingFitness if you are minimizing -typedef eoMinimizingFitness MyFitT ; // type of fitness +typedef eoMinimizingFitness MyFitT ; // type of fitness // END fitness type // // Then define your EO objects using that fitness type -typedef eoMyStruct Indi; // ***MUST*** derive from EO +typedef eoMyStruct Indi; // ***MUST*** derive from EO // create an initializer - done here and NOT in make_MyStruct.cpp // because it is NOT representation independent @@ -59,7 +59,7 @@ typedef eoMyStruct Indi; // ***MUST*** derive from EO eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) { return do_make_genotype(_parser, _state, _eo); -} +} // same thing for the variation operaotrs #include "make_op_MyStruct.h" @@ -70,7 +70,7 @@ eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) // The representation independent routines are simply declared here -// how to initialize the population +// how to initialize the population // it IS representation independent if an eoInit is given eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init); @@ -83,7 +83,7 @@ eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFu // evolution engine (selection and replacement) eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op); -// simple call to the algo. stays there for consistency reasons +// simple call to the algo. stays there for consistency reasons // no template for that one void run_ea(eoAlgo& _ga, eoPop& _pop); @@ -115,7 +115,7 @@ int main(int argc, char* argv[]) eoGenOp& op = make_op(parser, state, init); - //// Now the representation-independent things + //// Now the representation-independent things // // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT // unless you want to add specific statistics to the checkpoint diff --git a/eo/tutorial/Templates/README b/eo/tutorial/Templates/README index 9ab2d6a72..33d9438e5 100644 --- a/eo/tutorial/Templates/README +++ b/eo/tutorial/Templates/README @@ -19,10 +19,10 @@ When running bash, use this: You can freely move the created project around. However, whenever you change the location of the source- or build-directories, you need to -run +run touch configure.ac && autoreconf -in the source-directory and - make +in the source-directory and + make in the build-directory (which might or might not be the same for you). diff --git a/eo/tutorial/Templates/README.manual b/eo/tutorial/Templates/README.manual index 2683707c5..38693d83b 100644 --- a/eo/tutorial/Templates/README.manual +++ b/eo/tutorial/Templates/README.manual @@ -5,7 +5,7 @@ However, see there first for the creation of new projects. ======================================================================== This directory contains sample files that should make it easy to -create an EO algorithm to evolve any type of structure +create an EO algorithm to evolve any type of structure (EO comes with two examples, bitstrings and vector of real variables, so you'll need this as soon as you want to evolve something else). @@ -13,7 +13,7 @@ At the moment, only algorithms involving a scalar fitness (double) are implemented (see test dir for Pareto optimization of multiple- objective fitness - or be patient :-) -This file will help you to build the same algorithm than the ones +This file will help you to build the same algorithm than the ones in the Lesson4 of the tutorial, but with YOUR genotype instead of bitstrings or vector. More details in Lesson5 of the tutorial. @@ -30,7 +30,7 @@ mutation and the computation of its fitness. The helper script * create.sh * will create for you the files you need from the samples in tutorial/Templates dir, and all you'll have to do is to include the actual code where indicated in those files (between -keywords START and END). +keywords START and END). First, let's choose a name: let's call the new EO class eoAppli. All newly created classes will be named eoAppliXXX (in the file @@ -41,24 +41,24 @@ eoAppliXXX) 2- create the directory for your application (let's assume you call it APPLICATION): type in - mkdir APPLICATION + mkdir APPLICATION -3- go to the Templates dir +3- go to the Templates dir - cd Templates + cd Templates -and run the helper script create.sh with the following arguments +and run the helper script create.sh with the following arguments - ./create.sh Appli ../APPLICATION + ./create.sh Appli ../APPLICATION -4- cd to the APPLICATION dir (cd ../APPLICATION). +4- cd to the APPLICATION dir (cd ../APPLICATION). You should see there the following files: AppliEA.cpp the main file, includes all other, to be compiled Makefile with default target eoAppliEA eoAppli.h class eoAppli, FitT = template fitness eoAppliEvalFunc.h class for the computation of fotness eoAppliInit.h class for genotype initlialization - eoAppliMutation.h class for mutation + eoAppliMutation.h class for mutation eoAppliQuadCrossover.h class for (quadratic) crossover make_genotype_Appli.h helper function that create the initializer make_op_Appli.h helper function that creates the variatin operators @@ -78,11 +78,11 @@ HINT: look for keywords START and END and modify code in between. 6- Compile eoAppliEA.cpp. If your APPLICATION dir is in the tutorial dir, you don't need to modify Makefile. Just type in - % make + % make 7- Run the resulting program: - % eoAppliEA + % eoAppliEA The default output is one line per generation with the generation number, the number of evaluations performed, the best and average @@ -93,7 +93,7 @@ The algorithm stops by default after 100 generations. e.g. eoAppliEA.param, edit eoAppliEA.param (uncomment the lines you want to become active), and run - % eoAppliEA @eoAppliEA.param + % eoAppliEA @eoAppliEA.param (see the Lesson 5 of the tutorial for more details now). @@ -121,19 +121,19 @@ To add another operator, you have to create another class by mimicking what has been done for the first operator. For instance, let's suppose you want to create another mutation. -* duplicate the code for eoAppliMutation class +* duplicate the code for eoAppliMutation class * in the second version, change the class name (eoAppliMutation) into another name (let's say eoAppliBetterMutation) - you must change the name in the class declaration, in the constructor and in the className() method. * in the new eoAppliBetterMutation class, change the code for the operator() - and eventually the code for the constructor. -* in the make_op_Appli.h file, in the mutation section, uncomment the -lines +* in the make_op_Appli.h file, in the mutation section, uncomment the +lines mut = new eoAppliSecondMutation(varType _anyVariable); _state.storeFunctor(mut); - double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); - propMutation.add(*mut, mut2Rate); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); and change the name of the class from eoAppliSecondMutation to your name eoAppliBetterMutation (you can also change the keyword from diff --git a/eo/tutorial/Templates/binCrossover.tmpl b/eo/tutorial/Templates/binCrossover.tmpl index 5adabe688..c3f44c5af 100644 --- a/eo/tutorial/Templates/binCrossover.tmpl +++ b/eo/tutorial/Templates/binCrossover.tmpl @@ -7,8 +7,8 @@ The above line is useful in Emacs-like editors Template for simple binary crossover operators ============================================== -Binary crossover operators modify the first genotype only, -based on the second +Binary crossover operators modify the first genotype only, +based on the second */ #ifndef eoMyStructBinCrossover_H @@ -16,14 +16,14 @@ based on the second #include -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * * THere is NO ASSUMPTION on the class GenoypeT. * In particular, it does not need to derive from EO */ -template +template class eoMyStructBinCrossover: public eoBinOp { public: @@ -31,8 +31,8 @@ public: * Ctor - no requirement */ // START eventually add or modify the anyVariable argument - eoMyStructBinCrossover() - // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) + eoMyStructBinCrossover() + // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument { // START Code of Ctor of an eoMyStructEvalFunc object @@ -47,7 +47,7 @@ public: * @param _genotype1 The first genotype * @param _genotype2 The second genotype - const */ - bool operator()(GenotypeT & _genotype1, const GenotypeT & _genotype2) + bool operator()(GenotypeT & _genotype1, const GenotypeT & _genotype2) { // START code for crossover of _genotype1 and _genotype2 objects diff --git a/eo/tutorial/Templates/configure.ac.tmpl b/eo/tutorial/Templates/configure.ac.tmpl index cc52cebda..8c09bf41a 100644 --- a/eo/tutorial/Templates/configure.ac.tmpl +++ b/eo/tutorial/Templates/configure.ac.tmpl @@ -21,11 +21,11 @@ AC_CHECK_HEADERS([eo], [], [AC_ERROR(Evolving Objects headers are required)]) dnl Checks for libraries. AC_LANG(C++) AC_CHECK_LIB([eoutils], [main], [], - AC_MSG_ERROR([Evolving Objects utility library is required.])) + AC_MSG_ERROR([Evolving Objects utility library is required.])) AC_CHECK_LIB([eo], [main], [], - AC_MSG_ERROR([Evolving Objects library is required.])) + AC_MSG_ERROR([Evolving Objects library is required.])) AC_CHECK_LIB([es], [main], [], - AC_MSG_ERROR([EO Evolutionary strategies library is required.])) + AC_MSG_ERROR([EO Evolutionary strategies library is required.])) dnl Checks for library functions. diff --git a/eo/tutorial/Templates/continue.tmpl b/eo/tutorial/Templates/continue.tmpl index 2ec5a7be8..bfcee4d34 100644 --- a/eo/tutorial/Templates/continue.tmpl +++ b/eo/tutorial/Templates/continue.tmpl @@ -14,11 +14,11 @@ Template for continuator in EO, i.e. stopping conditions for EO algorithms // include the base definition of eoContinue #include -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * - * ATTENTION, class EOT *must* derive from EO, as operator() will + * ATTENTION, class EOT *must* derive from EO, as operator() will * be called with an eoPop */ template< class EOT> @@ -29,7 +29,7 @@ public: */ // START eventually add or modify the anyVariable argument eoMyStructContinue() - // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) + // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument { // START Code of Ctor of an eoMyStructEvalFunc object @@ -41,7 +41,7 @@ public: * * @param _pop an eoPop */ - virtual bool operator() ( const eoPop& _pop ) + virtual bool operator() ( const eoPop& _pop ) { bool stopCondition ; // to store the stopping condition // START Code of computation of stopping condition @@ -62,4 +62,3 @@ private: }; #endif - diff --git a/eo/tutorial/Templates/createEOproject.sh b/eo/tutorial/Templates/createEOproject.sh index 579153403..9f932f909 100755 --- a/eo/tutorial/Templates/createEOproject.sh +++ b/eo/tutorial/Templates/createEOproject.sh @@ -12,7 +12,7 @@ endif if ($#argv < 1) then echo "Usage: $0 ApplicationName [TargetDirName]" - echo " This will create ../TargetDirName if necessary (default dir name = ApplicationName)," + echo " This will create ../TargetDirName if necessary (default dir name = ApplicationName)," echo " and will also put all the files there that are strictly necessary to compile and run" echo " your application." exit @@ -94,7 +94,7 @@ echo "Start building the new project" #cd $TargetDir #aclocal || exit #autoheader || exit -#automake --add-missing --copy --gnu || exit +#automake --add-missing --copy --gnu || exit # !!!!! uncompatible option: --force-missing for the latest version of automake diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl index ddf4e0089..f68def2a8 100644 --- a/eo/tutorial/Templates/eoMyStruct.tmpl +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -14,11 +14,11 @@ Mandatory: However, if you are using dynamic memory, there are 2 places to allocate it: the default constructor (if possible?), or, more in the EO spirit, the eoInit object, that you will need to write anyway -(template file init.tmpl). +(template file init.tmpl). But remember that a COPY CONSTRUCTOR will be used in many places in EO, so make sure that the default copy constructor works, or, even better, -do write your own if in doubt. +do write your own if in doubt. And of course write the corresponding destructor! */ @@ -26,7 +26,7 @@ And of course write the corresponding destructor! #ifndef _eoMyStruct_h #define _eoMyStruct_h -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen @@ -35,7 +35,7 @@ And of course write the corresponding destructor! * like eoVector for instance, if you handle a vector of something.... * If you create a structure from scratch, - * the only thing you need to provide are + * the only thing you need to provide are * a default constructor * IO routines printOn and readFrom * @@ -46,11 +46,11 @@ template< class FitT> class eoMyStruct: public EO { public: /** Ctor: you MUST provide a default ctor. - * though such individuals will generally be processed + * though such individuals will generally be processed * by some eoInit object */ - eoMyStruct() - { + eoMyStruct() + { // START Code of default Ctor of an eoMyStruct object // END Code of default Ctor of an eoMyStruct object } @@ -60,11 +60,11 @@ public: * If this is the case, uncomment and fill the following */ /* - eoMyStruct(const eoMyStruct &) - { + eoMyStruct(const eoMyStruct &) + { // START Code of copy Ctor of an eoMyStruct object // END Code of copy Ctor of an eoMyStruct object - } + } */ @@ -82,7 +82,7 @@ public: // First write the fitness EO::printOn(os); os << ' '; - // START Code of default output + // START Code of default output /** HINTS * in EO we systematically write the sizes of things before the things @@ -92,7 +92,7 @@ public: // END Code of default output } - /** reading... + /** reading... * of course, your readFrom must be able to read what printOn writes!!! */ void readFrom(istream& is) @@ -115,4 +115,3 @@ private: // put all data here }; #endif - diff --git a/eo/tutorial/Templates/evalFunc.tmpl b/eo/tutorial/Templates/evalFunc.tmpl index b8c9f1ed7..34eae4c43 100644 --- a/eo/tutorial/Templates/evalFunc.tmpl +++ b/eo/tutorial/Templates/evalFunc.tmpl @@ -1,13 +1,13 @@ /** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - + The above line is usefulin Emacs-like editors */ - + /* Template for evaluator in EO, a functor that computes the fitness of an EO ========================================================================== */ - + #ifndef _eoMyStructEvalFunc_h #define _eoMyStructEvalFunc_h @@ -18,7 +18,7 @@ Template for evaluator in EO, a functor that computes the fitness of an EO // include the base definition of eoEvalFunc #include "eoEvalFunc.h" -/** +/** Always write a comment in this format before class definition if you want the class to be documented by Doxygen */ @@ -29,7 +29,7 @@ public: /// Ctor - no requirement // START eventually add or modify the anyVariable argument eoMyStructEvalFunc() - // eoMyStructEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) + // eoMyStructEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument { // START Code of Ctor of an eoMyStructEvalFunc object @@ -39,7 +39,7 @@ public: /** Actually compute the fitness * * @param EOT & _eo the EO object to evaluate - * it should stay templatized to be usable + * it should stay templatized to be usable * with any fitness type */ void operator()(EOT & _eo) diff --git a/eo/tutorial/Templates/init.tmpl b/eo/tutorial/Templates/init.tmpl index f3c0fbd94..d49e52ef4 100644 --- a/eo/tutorial/Templates/init.tmpl +++ b/eo/tutorial/Templates/init.tmpl @@ -14,12 +14,12 @@ Template for EO objects initialization in EO // include the base definition of eoInit #include -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * * There is NO ASSUMPTION on the class GenoypeT. - * In particular, it does not need to derive from EO (e.g. to initialize + * In particular, it does not need to derive from EO (e.g. to initialize * atoms of an eoVector you will need an eoInit) */ template @@ -28,7 +28,7 @@ public: /// Ctor - no requirement // START eventually add or modify the anyVariable argument eoMyStructInit() - // eoMyStructInit( varType _anyVariable) : anyVariable(_anyVariable) + // eoMyStructInit( varType _anyVariable) : anyVariable(_anyVariable) // END eventually add or modify the anyVariable argument { // START Code of Ctor of an eoMyStructInit object @@ -55,4 +55,3 @@ private: }; #endif - diff --git a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl index 9a0c3c426..fea5a2a67 100644 --- a/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl +++ b/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl @@ -10,7 +10,7 @@ i.e. that takes any number of parents and generates any number of offspring a GenOp that creates less offspring than there are parents -Second version, get parents using an external eoSelectOne +Second version, get parents using an external eoSelectOne */ #ifndef eoLessOffspringExternalSelectorGenOp_H @@ -18,21 +18,21 @@ Second version, get parents using an external eoSelectOne #include -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * - * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * ATTENTION, class EOT *must* derive from EO, as method invalidate() * must be called if the genotypes of the indis is modified */ -template +template class eoLessOffspringExternalSelectorGenOp: public eoGenOp { public: /** * (Default) Constructor. */ - eoLessOffspringExternalSelectorGenOp(eoSelectOne & _sel, paramType _anyParameter) : + eoLessOffspringExternalSelectorGenOp(eoSelectOne & _sel, paramType _anyParameter) : sel(_sel), anyParameter(_anyParameter) {} /// The class name. Used to display statistics @@ -58,11 +58,11 @@ public: // get extra parents - use private selector // _plop.source() is the eoPop used by _plop to get parents // WARNING: you are not allowed to modify them (mandatory "const") - const EOT& parentN+1 = sel(_plop.source()); - ... - const EOT& parentN+K = sel(_plop.source()); + const EOT& parentN+1 = sel(_plop.source()); + ... + const EOT& parentN+K = sel(_plop.source()); - // modify (in place) the "true" parents + // modify (in place) the "true" parents // (i.e. parent1, ..., parentsN) ... diff --git a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl index c0790f93c..8fdd8ff66 100644 --- a/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl +++ b/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl @@ -18,21 +18,21 @@ First version, get parents from populator using the imbedded select() method #include -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * - * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * ATTENTION, class EOT *must* derive from EO, as method invalidate() * must be called if the genotypes of the indis is modified */ -template +template class eoLessOffspringSameSelectorGenOp: public eoGenOp { public: /** * (Default) Constructor. */ - eoLessOffspringSameSelectorGenOp(paramType _anyParameter) : + eoLessOffspringSameSelectorGenOp(paramType _anyParameter) : anyParameter(_anyParameter) {} /// The class name. Used to display statistics @@ -42,7 +42,7 @@ public: unsigned max_production(void) { return NbLeftParents; } /** - * eoLesOffspringSameSelectorGenOp operator - + * eoLesOffspringSameSelectorGenOp operator - * gets extra parents from the populator * * @param _pop a POPULATOR (not a simple population) diff --git a/eo/tutorial/Templates/make_MyStruct.cpp b/eo/tutorial/Templates/make_MyStruct.cpp index cf4804ce3..aaf183c91 100644 --- a/eo/tutorial/Templates/make_MyStruct.cpp +++ b/eo/tutorial/Templates/make_MyStruct.cpp @@ -126,4 +126,3 @@ void run_ea(eoAlgo >& _ga, eoPop * - * It could be here tempatized only on the fitness, as it can be used + * It could be here tempatized only on the fitness, as it can be used * to evolve structures with any fitness. - * However, for consistency reasons, it was finally chosen, as in - * the rest of EO, to templatize by the full EOT, as this eventually + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually * allows to choose the type of genotype at run time (see in es dir) * - * It returns an eoInit that can later be used to initialize + * It returns an eoInit that can later be used to initialize * the population (see make_pop.h). * * It uses a parser (to get user parameters) and a state (to store the memory) * the last argument is to disambiguate the call upon different instanciations. * - * WARNING: that last argument will generally be the result of calling - * the default ctor of EOT, resulting in most cases in an EOT + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT * that is ***not properly initialized*** */ template eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { - // read any useful parameter here from the parser + // read any useful parameter here from the parser // the param itself will belong to the parser (as far as memory is concerned) // paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value(); diff --git a/eo/tutorial/Templates/make_op_MyStruct.h b/eo/tutorial/Templates/make_op_MyStruct.h index 8b43d17bb..d857e8958 100644 --- a/eo/tutorial/Templates/make_op_MyStruct.h +++ b/eo/tutorial/Templates/make_op_MyStruct.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // make_op_MyStruct.h // (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk */ //----------------------------------------------------------------------------- @@ -35,14 +35,14 @@ // combinations of simple eoOps (eoMonOp and eoQuadOp) #include -/** definition of mutation: +/** definition of mutation: * class eoMyStructMonop MUST derive from eoMonOp */ #include "eoMyStructMutation.h" -/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): * class eoMyStructBinCrossover MUST derive from eoBinOp - * OR + * OR * class eoMyStructQuadCrossover MUST derive from eoQuadOp */ // #include "eoMyStructBinOp.h" @@ -61,9 +61,9 @@ * This function builds the operators that will be applied to the eoMyStruct * * It uses a parser (to get user parameters), a state (to store the memory) - * the last parameter is an eoInit: if some operator needs some info + * the last parameter is an eoInit: if some operator needs some info * about the genotypes, the init has it all (e.g. bounds, ...) - * Simply do + * Simply do * EOT myEO; * _init(myEO); * and myEO is then an ACTUAL object @@ -85,7 +85,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit2) only - no time for the eoBinOp case // you can have more than one - combined in a proportional way - + // first, define the crossover objects and read their rates from the parser - - // A first crossover + + // A first crossover eoQuadOp *cross = new eoMyStructQuadCrossover /* (varType _anyVariable) */; // store in the state _state.storeFunctor(cross); @@ -106,21 +106,21 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit *propXover = + eoPropCombinedQuadOp *propXover = new eoPropCombinedQuadOp(*cross, cross1Rate); // and of course stor it in the state _state.storeFunctor(propXover); - // Optional: A second(and third, and ...) crossover + // Optional: A second(and third, and ...) crossover // of course you must create the corresponding classes // and all ***MUST*** derive from eoQuadOp /* Uncomment if necessary - and replicate as many time as you need - cross = new eoMyStructSecondCrossover(varType _anyVariable); + cross = new eoMyStructSecondCrossover(varType _anyVariable); _state.storeFunctor(cross); - double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); - propXover.add(*cross, cross2Rate); + double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(*cross, cross2Rate); */ // if you want some gentle output, the last one shoudl be like // propXover.add(*cross, crossXXXRate, true); @@ -130,12 +130,12 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit *mut = new eoMyStructMutation/* (varType _anyVariable) */; _state.storeFunctor(mut); // its relative rate in the combination @@ -151,8 +151,8 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit(varType _anyVariable); _state.storeFunctor(mut); - double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); - propMutation.add(*mut, mut2Rate); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); */ // if you want some gentle output, the last one shoudl be like // propMutation.add(*mut, mutXXXRate, true); @@ -170,7 +170,7 @@ eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit -/** +/** * Always write a comment in this format before class definition * if you want the class to be documented by Doxygen * - * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * ATTENTION, class EOT *must* derive from EO, as method invalidate() * must be called if the genotypes of the indis is modified */ -template +template class eoMoreOffspringGenOp: public eoGenOp { public: /** * (Default) Constructor. */ - eoMoreOffspringGenOp(paramType _anyParameter) : + eoMoreOffspringGenOp(paramType _anyParameter) : anyParameter(_anyParameter) {} /// The class name. Used to display statistics @@ -52,16 +52,16 @@ public: ++_plop; // advance once for each selected parents ... EOT& parentN = *_plop; // select the last parent - // don't advance after the last one: _plop always - // points to the last that has already been treated + // don't advance after the last one: _plop always + // points to the last that has already been treated // apply operator to the parents (modifying them AND generating - // new individuals ofs1, ofs2, ..., ofsN + // new individuals ofs1, ofs2, ..., ofsN ++_plop; // advance before each insertion _plop.insert(ofs1); ... ++_plop; // advance before each insertion - _plop.insert(ofsN); + _plop.insert(ofsN); // oh right, and invalidate fitnesses of modified parents parent1.invalidate(); diff --git a/eo/tutorial/Templates/stat.tmpl b/eo/tutorial/Templates/stat.tmpl index c53602da1..9f807d24d 100644 --- a/eo/tutorial/Templates/stat.tmpl +++ b/eo/tutorial/Templates/stat.tmpl @@ -46,7 +46,7 @@ public : } void operator()(const eoPop& _pop){ - double tmpStat(0.); + double tmpStat(0.); // START Code for computing the statistics - in tmpStat // tmpStat = blablabla // END Code for computing the statistics @@ -61,4 +61,3 @@ private : }; #endif - diff --git a/website/index.html b/website/index.html index da004b875..e72daad44 100644 --- a/website/index.html +++ b/website/index.html @@ -22,57 +22,57 @@

        Evolving Objects logo @@ -140,7 +140,7 @@
        We have lost all the mailing-list subscriptions in a crash, please subscribe again on the eodev-main subscription page.
        -

        Evolutionary algorithms forms a family of algorithms inspired by the theory of evolution, that solve various problems. +

        Evolutionary algorithms forms a family of algorithms inspired by the theory of evolution, that solve various problems. They evolve a set of solutions to a given problem, in order to produce the best results. These are stochastic algorithms, because they iteratively use random processes. The vast majority of these methods are used to solve optimization problems, and may be also called "metaheuristics". @@ -179,10 +179,10 @@

        Component-based framework

        -

        Designing an algorithm with EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks.

        -

        If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution).

        -

        If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in EO.

        -

        +

        Designing an algorithm with EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks.

        +

        If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution).

        +

        If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in EO.

        +

        Main Features

        @@ -190,134 +190,134 @@ - - - - + + + +
        Examples of problems that you can solve with the help of EO:
        - -
        - -
        - -
        Examples of problems that you can solve with the help of EO:
        + +
        + +
        + +
          -
        • Flexible design that permits to easily create virtually any algorithm
        • -
        • Solution representation for continuous and combinatorial problems: -
            -
          • binary-strings,
          • -
          • permutations,
          • -
          • vectors,
          • -
          • easily write your own,
          • -
          • …
          • -
          -
        • -
        • Several algorithm paradigms: -
            -
          • evolution strategies,
          • -
          • genetic algorithms,
          • -
          • estimation of distribution,
          • -
          • particle swarm optimization
          • -
          • …
          • -
          -
        • -
        • Many selection and replacement operators: -
            -
          • rank-based,
          • -
          • deterministic or stochastic tournaments,
          • -
          • roulette,
          • -
          • elitism,
          • -
          • …
          • -
          -
        • -
        • Ready-to-use variations operators: -
            -
          • uniform initializer, -
          • gaussian mutation, -
          • subtree crossover, -
          • …
          • -
          -
        • -
        • Easy combination of several operators: -
            -
          • proportional combination,
          • -
          • sequential call,
          • -
          • …
          • -
          -
        • -
        • Portable and human-readable parameter files
        • -
        • Suspend and load population from files
        • -
        • Versatile checkpointing and logging: -
            -
          • graphical display,
          • -
          • file dump,
          • -
          • various statistics,
          • -
          • signal catching,
          • -
          • …
          • -
          -
        • -
        • Mersenne Twister random number generator (and various distributions)
        • -
        • No useless computation (sparing fitness call, functor-based calls)
        • -
        • Fast running speed, thanks to C++
        • -
        • And more!
        • +
        • Flexible design that permits to easily create virtually any algorithm
        • +
        • Solution representation for continuous and combinatorial problems: +
            +
          • binary-strings,
          • +
          • permutations,
          • +
          • vectors,
          • +
          • easily write your own,
          • +
          • …
          • +
          +
        • +
        • Several algorithm paradigms: +
            +
          • evolution strategies,
          • +
          • genetic algorithms,
          • +
          • estimation of distribution,
          • +
          • particle swarm optimization
          • +
          • …
          • +
          +
        • +
        • Many selection and replacement operators: +
            +
          • rank-based,
          • +
          • deterministic or stochastic tournaments,
          • +
          • roulette,
          • +
          • elitism,
          • +
          • …
          • +
          +
        • +
        • Ready-to-use variations operators: +
            +
          • uniform initializer, +
          • gaussian mutation, +
          • subtree crossover, +
          • …
          • +
          +
        • +
        • Easy combination of several operators: +
            +
          • proportional combination,
          • +
          • sequential call,
          • +
          • …
          • +
          +
        • +
        • Portable and human-readable parameter files
        • +
        • Suspend and load population from files
        • +
        • Versatile checkpointing and logging: +
            +
          • graphical display,
          • +
          • file dump,
          • +
          • various statistics,
          • +
          • signal catching,
          • +
          • …
          • +
          +
        • +
        • Mersenne Twister random number generator (and various distributions)
        • +
        • No useless computation (sparing fitness call, functor-based calls)
        • +
        • Fast running speed, thanks to C++
        • +
        • And more!

        Portability

        -

        EO should work on Windows and any Un*x-like operating system with a - standard-conforming C++ development system.

        +

        EO should work on Windows and any Un*x-like operating system with a + standard-conforming C++ development system.

        -

        Recent versions of EO have been tested on the following platforms: -

        - -
          -
        • Linux x86 with GCC 3.x and 4.x
        • -
        • Linux x86_64 with GCC 3.x and GCC 4.x
        • -
        • MacOS X/Darwin PowerPC with GCC 3.x
        • -
        • MacOS X/Darwin x86 with GCC 4.x
        • -
        • Microsoft Windows using Cygwin's GCC 3.x (cygming special). -
        • Microsoft Windows using Visual Studio 2003/2005; projects files - are provided.
        • -
        • Solaris SPARC with GCC 3.x
        • -
        • Solaris x86 with GCC 3.x
        • -
        +

        Recent versions of EO have been tested on the following platforms: +

        -

        Recent versions of EO uses the CMake portable build system, that permits to easily generate a build chain for your environment.

        +
          +
        • Linux x86 with GCC 3.x and 4.x
        • +
        • Linux x86_64 with GCC 3.x and GCC 4.x
        • +
        • MacOS X/Darwin PowerPC with GCC 3.x
        • +
        • MacOS X/Darwin x86 with GCC 4.x
        • +
        • Microsoft Windows using Cygwin's GCC 3.x (cygming special). +
        • Microsoft Windows using Visual Studio 2003/2005; projects files + are provided.
        • +
        • Solaris SPARC with GCC 3.x
        • +
        • Solaris x86 with GCC 3.x
        • +
        -

        If you have tested EO on a system not listed here, please let - us know.

        +

        Recent versions of EO uses the CMake portable build system, that permits to easily generate a build chain for your environment.

        + +

        If you have tested EO on a system not listed here, please let + us know.

        + +

        If you are working on a system with an older C++ compiler there + is a good chance that eo-0.9.3z.1 works. It is tested on Linux + with gcc-2.9x and several systems (IRIX, Solaris) with egcs.

        -

        If you are working on a system with an older C++ compiler there - is a good chance that eo-0.9.3z.1 works. It is tested on Linux - with gcc-2.9x and several systems (IRIX, Solaris) with egcs.

        -

        Presentations

        - -

        A functional and "philosophical" overview of EO was presented at EA'01 conference. - You can download the paper - or the - slides, or browse them right here:

        - + +

        A functional and "philosophical" overview of EO was presented at EA'01 conference. + You can download the paper + or the + slides, or browse them right here:

        + -

        You can also read this - PowerPoint presentation, that shows the EO philosophy. - It includes a Visual Basic macro for evolving objects in Visual Basic - for Applications.

        +

        You can also read this + PowerPoint presentation, that shows the EO philosophy. + It includes a Visual Basic macro for evolving objects in Visual Basic + for Applications.

        + +

        EO is described in the following scientific article:
        +

        M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, + "Evolving + objects: A general purpose evolutionary computation + library", Artificial Evolution, 2310, 829--888 (2002).
        +

        -

        EO is described in the following scientific article:
        -

        M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, - "Evolving - objects: A general purpose evolutionary computation - library", Artificial Evolution, 2310, 829--888 (2002).
        -

        -

        @Article{Keijzer2001,
        @@ -340,187 +340,187 @@

        - -

        Here is a list of some known publications that used EO:

        -
        From 3786ba8296a09aa0d99faa34ed82ebcad8fcbe84 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 6 May 2011 11:14:39 +0200 Subject: [PATCH 1759/2134] * apply: needed eoLogger header file inclusion --- eo/src/apply.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/apply.h b/eo/src/apply.h index 33b354fcd..4c09e6852 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include From ceeee7c41ecd36d731efeac709185091651e70be Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 6 May 2011 16:01:28 +0200 Subject: [PATCH 1760/2134] * pyeo --- eo/src/pyeo/CMakeLists.txt | 10 +++++----- eo/src/pyeo/test/maxone.py | 2 +- eo/src/pyeo/test/run_tests.sh | 2 -- eo/src/pyeo/test/test_transform.py | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/eo/src/pyeo/CMakeLists.txt b/eo/src/pyeo/CMakeLists.txt index 626d02012..ab0e0c1e6 100644 --- a/eo/src/pyeo/CMakeLists.txt +++ b/eo/src/pyeo/CMakeLists.txt @@ -27,23 +27,23 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) -# python IF(APPLE) # osx internal FIND_LIBRARY(APPLE_CARBON Carbon) ENDIF(APPLE) - # includes INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(../) +#INCLUDE_DIRECTORIES(../) # source FILE(GLOB SOURCES *.cpp) +# EO dependencies SET(EO_SOURCES - ../eoFunctorStore.cpp - ../utils/eoLogger.cpp + ${EO_SOURCE_DIR}/src/eoFunctorStore.cpp + ${EO_SOURCE_DIR}/src/utils/eoLogger.cpp + ${EO_SOURCE_DIR}/src/utils/eoParallel.cpp ) # shared library diff --git a/eo/src/pyeo/test/maxone.py b/eo/src/pyeo/test/maxone.py index 3544d4988..0c4bbd012 100644 --- a/eo/src/pyeo/test/maxone.py +++ b/eo/src/pyeo/test/maxone.py @@ -2,7 +2,7 @@ import sys sys.path.append('..') print 'importing pyeo' -from PyEO import * +from libPyEO import * print 'done' from copy import copy diff --git a/eo/src/pyeo/test/run_tests.sh b/eo/src/pyeo/test/run_tests.sh index f3901050c..b06c61b05 100755 --- a/eo/src/pyeo/test/run_tests.sh +++ b/eo/src/pyeo/test/run_tests.sh @@ -5,5 +5,3 @@ do python $i > /dev/null done - - diff --git a/eo/src/pyeo/test/test_transform.py b/eo/src/pyeo/test/test_transform.py index fb70de3ee..7359342e5 100644 --- a/eo/src/pyeo/test/test_transform.py +++ b/eo/src/pyeo/test/test_transform.py @@ -1,7 +1,7 @@ """Test script for the eoSGATranform class""" from copy import deepcopy -from PyEO import * +from libPyEO import * from maxone import * pop = eoPop() From bfc1d153eb8b15f10ec8ae7050a2cf8964fdd0dd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 9 May 2011 17:20:33 +0200 Subject: [PATCH 1761/2134] + build_gcc_linux_stl_parallel --- eo/build_gcc_linux_stl_parallel | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 eo/build_gcc_linux_stl_parallel diff --git a/eo/build_gcc_linux_stl_parallel b/eo/build_gcc_linux_stl_parallel new file mode 100755 index 000000000..7208c2f5a --- /dev/null +++ b/eo/build_gcc_linux_stl_parallel @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p release +cd release +cmake -D_GLIBCXX_PARALLEL=1 .. +make +cd .. From aa6d1407c28e743bcc034df236d65de1abfffd56 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 9 May 2011 17:21:16 +0200 Subject: [PATCH 1762/2134] * build_gcc_linux_unittest --- eo/build_gcc_linux_unittest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/build_gcc_linux_unittest b/eo/build_gcc_linux_unittest index 36220ba00..c23049e80 100755 --- a/eo/build_gcc_linux_unittest +++ b/eo/build_gcc_linux_unittest @@ -1,6 +1,6 @@ #!/usr/bin/env sh -mkdir debug +mkdir -p debug cd debug cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CMAKE_TESTING=1 .. make From 6dc49743b2500794121ed4615b4d1ff94862ff30 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 9 May 2011 17:21:18 +0200 Subject: [PATCH 1763/2134] + build_gcc_linux_pyeo --- eo/build_gcc_linux_pyeo | 7 +++++++ eo/src/CMakeLists.txt | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 eo/build_gcc_linux_pyeo diff --git a/eo/build_gcc_linux_pyeo b/eo/build_gcc_linux_pyeo new file mode 100755 index 000000000..ec4927878 --- /dev/null +++ b/eo/build_gcc_linux_pyeo @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p release +cd release +cmake -DENABLE_PYEO=1 .. +make +cd .. diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index 97b748665..c03bc509a 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -43,6 +43,9 @@ ADD_SUBDIRECTORY(ga) ADD_SUBDIRECTORY(gp) ADD_SUBDIRECTORY(other) ADD_SUBDIRECTORY(utils) -ADD_SUBDIRECTORY(pyeo) + +IF(ENABLE_PYEO) + ADD_SUBDIRECTORY(pyeo) +ENDIF(ENABLE_PYEO) ###################################################################################### From eb78a06f9aca615495256a2540cc959a6f5752c0 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 May 2011 00:31:18 +0200 Subject: [PATCH 1764/2134] updated build instructions --- eo/INSTALL | 275 ++++++++++++----------------------------------------- eo/README | 33 ++----- 2 files changed, 69 insertions(+), 239 deletions(-) diff --git a/eo/INSTALL b/eo/INSTALL index 89a456253..25f56d4a3 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -1,235 +1,86 @@ - ----------------------------------------- -| WARNING THOSE INSTRUCTIONA ARE OUTDATED | - ----------------------------------------- - -Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. Basic Installation ================== - These are generic installation instructions. +The simplest way to compile the libraries or the provided softwares is to run +one of the script beginnig with "build_". Each script permits to build different +parts of the framework, with different options. - First, you need to generate a configure script using autoconf. - To do this, run the shell script sh ./autogen.sh. +To compile EO you will need CMake and a compiler for your system. - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). +So far the available scripts for posix systems using g++ are the following: + * build_gcc_linux_release : the most usefull script, build the core libraries in release mode + * build_gcc_linux_debug : build the core libraries with debugging informations in the binaries + * build_gcc_linux_tutorial : build the core libraries and the tutorials + * build_gcc_linux_unittest : build the core libraries and the tests executables + * build_gcc_linux_stl_parallel : build the core libraries enabling STL parallel algorithms (like sorting) + * build_gcc_linux_pyeo : build the core libraries and the python module + * distclean : remove the "release/" and "debug/" directories where the build scripts put the binaries - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) +For Windows systems using Visual Studio: + * build_vs2008_release.bat + You may need to adapt the ID to your version of Visual Studio, edit + the "Visual Studio 9 2008" string accordingly. - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. +The libraries are in the "release/lib/" or "debug/lib/" directories. - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. Compilers and Options ===================== - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. +The build scripts are really simple, take a look at them to see how to use the +build system. - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: +Basically, the steps are: + 0. remove any old build directory that's on the way: + rm -rf build/ + 1. create a directory in which to put build files: + mkdir build/ + 2. go in this directory: + cd build/ + 3. call cmake with the options you want, using the "-D" option and passing the + EO directory as an argument, for example: + cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CMAKE_TESTING =1 .. + 4. now type your favorite "make" command, like: + make -j # use several processors at once when possible + 5. enjoy: + ./debug/test/t-eofitness - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix +Some of the available options are: + * CMAKE_BUILD_TYPE : + * "Debug" : embed debugging informations in the binaries) or + * "Release" : no debugging info and some optimizations (the default) + * ENABLE_EO_TUTORIAL : build the tutorial ("no" by default) + * ENABLE_CMAKE_TESTING : build the tests executables ("no" by default) + * ENABLE_PYEO : build the python module ("no" by default) - *Note Defining Variables::, for more details. +You can pass generic options to the compiler, like: + * _GLIBCXX_PARALLEL : use the parallel version of the STL -Compiling For Multiple Architectures -==================================== - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +Installation using packages +=========================== - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. +To construct a dummy template of the EO package you will need CPack. Be warned +that those do not guarantee correct dependencies and version management. -Installation Names +Use the "package_*" scripts: + * package_deb : for debian-like systems + * package_rpm : for red-hat-like systems + +Or go through the following steps: + 1. go in the build directory where your binaries are: + cd build/ + 2. call CPack specifying the desired package system: + cpack -G DEB + 3. install the package: + sudo apt-get install EO-1.1.1-Linux.deb + + +Basic installation ================== - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +To install the framework system-wide, copy the "eo/" directory somewhere in your +path. The "lib/" directory should be reachable for the linker and the "src/" +directory must be in the compiler include path. - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. diff --git a/eo/README b/eo/README index 98cf75e11..d4268be0f 100644 --- a/eo/README +++ b/eo/README @@ -10,7 +10,7 @@ The latest news about EO can be found on the sourceforge repository at http://eodev.sourceforge.net/ In case of any problem, please e-mail us at - eodev-help@lists.sourceforge.net, eodev@egroups.com + eodev-main@lists.sourceforge.net To get started, take a look at the tutorial, starting with ./tutorial/html/eoTutorial.html @@ -18,7 +18,7 @@ To get started, take a look at the tutorial, starting with The easiest way to start programming a new genome with all EO evolution engines handy is to create a new standalone EO project from the tutorial/Templates/ directory. Read Lesson 5 of the tutorial for -an introduction;) +an introduction ;) ================================================================== @@ -26,27 +26,15 @@ an introduction;) ================================================================== The basic installation procedure goes the following: -Go to your build-directory and run - $(SRCDIR)/configure - make - make check - make install -where $(SRCDIR) is the top-level source directory of EO, i.e. where -the sources where unpacked. +Go to the "eo/" and run one of the "build_*" script.  -Run "$(SRCDIR)/configure --help" for possible options. You can specify -to not build example applications, the tutorial, or to build the -ParadisEO tutorial. You may also change the installation directory -that way. +Using the "build_gcc_linux_release" script is generally what you want. The +binaries are then located in the "release/" directory. Now you should probably go to the tutorial and start learning about EO features and programming. - -In case of problems, you can read the INSTALL file - but remember this -is a standard installation file from GNU and that it contains nothing -specific about EO. - +In case of problems or if you want advanced options, you can read the INSTALL file. =================================================================== DIRECTORY STRUCTURE @@ -99,12 +87,3 @@ structure: | +-- win WINDOWS dir: project files for MS/VC5+ - - -=================================================================== - NOTES -=================================================================== -If you extracted a fresh snapshot from the cvs-repository, remember -to run - ./autogen.sh -in the source-directory before building the libraries. From bdc0b0fa9eacbd9c70c51c4d51e29de91d64fd60 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 10 May 2011 10:34:35 +0200 Subject: [PATCH 1765/2134] - removed useless .cvsignore files since we are using git now --- eo/.cvsignore | 25 ------------------------- eo/app/.cvsignore | 2 -- eo/app/gprop/.cvsignore | 4 ---- eo/app/gpsymreg/.cvsignore | 3 --- eo/app/mastermind/.cvsignore | 4 ---- eo/contrib/.cvsignore | 2 -- eo/doc/.cvsignore | 6 ------ eo/src/.cvsignore | 6 ------ eo/src/do/.cvsignore | 2 -- eo/src/es/.cvsignore | 8 -------- eo/src/ga/.cvsignore | 7 ------- eo/src/gp/.cvsignore | 6 ------ eo/src/other/.cvsignore | 6 ------ eo/src/utils/.cvsignore | 7 ------- eo/test/.cvsignore | 30 ------------------------------ eo/tutorial/.cvsignore | 2 -- eo/tutorial/Lesson1/.cvsignore | 6 ------ eo/tutorial/Lesson2/.cvsignore | 6 ------ eo/tutorial/Lesson3/.cvsignore | 3 --- eo/tutorial/Lesson4/.cvsignore | 3 --- eo/tutorial/Lesson5/.cvsignore | 3 --- eo/tutorial/Lesson6/.cvsignore | 1 - eo/tutorial/Templates/.cvsignore | 2 -- eo/tutorial/html/.cvsignore | 2 -- eo/tutorial/pdf/.cvsignore | 2 -- 25 files changed, 148 deletions(-) delete mode 100644 eo/.cvsignore delete mode 100644 eo/app/.cvsignore delete mode 100644 eo/app/gprop/.cvsignore delete mode 100644 eo/app/gpsymreg/.cvsignore delete mode 100644 eo/app/mastermind/.cvsignore delete mode 100644 eo/contrib/.cvsignore delete mode 100644 eo/doc/.cvsignore delete mode 100644 eo/src/.cvsignore delete mode 100644 eo/src/do/.cvsignore delete mode 100644 eo/src/es/.cvsignore delete mode 100644 eo/src/ga/.cvsignore delete mode 100644 eo/src/gp/.cvsignore delete mode 100644 eo/src/other/.cvsignore delete mode 100644 eo/src/utils/.cvsignore delete mode 100644 eo/test/.cvsignore delete mode 100644 eo/tutorial/.cvsignore delete mode 100644 eo/tutorial/Lesson1/.cvsignore delete mode 100644 eo/tutorial/Lesson2/.cvsignore delete mode 100644 eo/tutorial/Lesson3/.cvsignore delete mode 100644 eo/tutorial/Lesson4/.cvsignore delete mode 100644 eo/tutorial/Lesson5/.cvsignore delete mode 100644 eo/tutorial/Lesson6/.cvsignore delete mode 100644 eo/tutorial/Templates/.cvsignore delete mode 100644 eo/tutorial/html/.cvsignore delete mode 100644 eo/tutorial/pdf/.cvsignore diff --git a/eo/.cvsignore b/eo/.cvsignore deleted file mode 100644 index 3e34ecb4c..000000000 --- a/eo/.cvsignore +++ /dev/null @@ -1,25 +0,0 @@ -*.la -*.lo -.deps -.libs -Makefile -Makefile.in -aclocal.m4 -autom4te.cache -build* -confdefs.h -config.cache -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -depcomp -install-sh -libtool -missing -mkinstalldirs -stamp-h -stamp-h.in diff --git a/eo/app/.cvsignore b/eo/app/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/app/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/eo/app/gprop/.cvsignore b/eo/app/gprop/.cvsignore deleted file mode 100644 index 8bf1bd921..000000000 --- a/eo/app/gprop/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile.in -Makefile -gprop -.deps diff --git a/eo/app/gpsymreg/.cvsignore b/eo/app/gpsymreg/.cvsignore deleted file mode 100644 index 236f1048d..000000000 --- a/eo/app/gpsymreg/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -.deps -Makefile diff --git a/eo/app/mastermind/.cvsignore b/eo/app/mastermind/.cvsignore deleted file mode 100644 index 2b85cb056..000000000 --- a/eo/app/mastermind/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile.in -Makefile -mastermind -.deps diff --git a/eo/contrib/.cvsignore b/eo/contrib/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/contrib/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/eo/doc/.cvsignore b/eo/doc/.cvsignore deleted file mode 100644 index 23d7e990f..000000000 --- a/eo/doc/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -eo.doxytag -html -latex -man diff --git a/eo/src/.cvsignore b/eo/src/.cvsignore deleted file mode 100644 index 69fb0bd82..000000000 --- a/eo/src/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in diff --git a/eo/src/do/.cvsignore b/eo/src/do/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/src/do/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/eo/src/es/.cvsignore b/eo/src/es/.cvsignore deleted file mode 100644 index 022447b47..000000000 --- a/eo/src/es/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in -libcma.a -libes.a diff --git a/eo/src/ga/.cvsignore b/eo/src/ga/.cvsignore deleted file mode 100644 index ffea8dd07..000000000 --- a/eo/src/ga/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in -libga.a diff --git a/eo/src/gp/.cvsignore b/eo/src/gp/.cvsignore deleted file mode 100644 index 69fb0bd82..000000000 --- a/eo/src/gp/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in diff --git a/eo/src/other/.cvsignore b/eo/src/other/.cvsignore deleted file mode 100644 index 69fb0bd82..000000000 --- a/eo/src/other/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in diff --git a/eo/src/utils/.cvsignore b/eo/src/utils/.cvsignore deleted file mode 100644 index f4f7c5b38..000000000 --- a/eo/src/utils/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.lo -*.la -.deps -.libs -Makefile -Makefile.in -libeoutils.a diff --git a/eo/test/.cvsignore b/eo/test/.cvsignore deleted file mode 100644 index a69f8865c..000000000 --- a/eo/test/.cvsignore +++ /dev/null @@ -1,30 +0,0 @@ -*.o -*.csv -*.sav -*.status -.deps -Makefile -Makefile.in -t-eo -t-eobin -t-eobreeder -t-eofitness -t-eoinclusion -t-eoinsertion -t-eolottery -t-eoproblem -t-eogeneration -t-eoNonUniform -t-eo2dVector -t-eoEasyEA -t-eoUniform -t-eoRandom -t-eoCheckpointing -t-eoVector -t-eoAtomOps -t-selectOne -t-eoStateAndParser -t-eoGOpSel -t-eoExternalEO -t-eoESFull -t-eoSymreg diff --git a/eo/tutorial/.cvsignore b/eo/tutorial/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/tutorial/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/eo/tutorial/Lesson1/.cvsignore b/eo/tutorial/Lesson1/.cvsignore deleted file mode 100644 index 58e05e18f..000000000 --- a/eo/tutorial/Lesson1/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile.in -.deps -FirstBitGA -Makefile -exercise1.3 -FirstRealGA diff --git a/eo/tutorial/Lesson2/.cvsignore b/eo/tutorial/Lesson2/.cvsignore deleted file mode 100644 index 7c39fd82b..000000000 --- a/eo/tutorial/Lesson2/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile.in -.deps -FirstBitEA -FirstRealEA -exercise2.3 -Makefile diff --git a/eo/tutorial/Lesson3/.cvsignore b/eo/tutorial/Lesson3/.cvsignore deleted file mode 100644 index 236f1048d..000000000 --- a/eo/tutorial/Lesson3/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -.deps -Makefile diff --git a/eo/tutorial/Lesson4/.cvsignore b/eo/tutorial/Lesson4/.cvsignore deleted file mode 100644 index 236f1048d..000000000 --- a/eo/tutorial/Lesson4/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -.deps -Makefile diff --git a/eo/tutorial/Lesson5/.cvsignore b/eo/tutorial/Lesson5/.cvsignore deleted file mode 100644 index 236f1048d..000000000 --- a/eo/tutorial/Lesson5/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -.deps -Makefile diff --git a/eo/tutorial/Lesson6/.cvsignore b/eo/tutorial/Lesson6/.cvsignore deleted file mode 100644 index 70845e08e..000000000 --- a/eo/tutorial/Lesson6/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/eo/tutorial/Templates/.cvsignore b/eo/tutorial/Templates/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/tutorial/Templates/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/eo/tutorial/html/.cvsignore b/eo/tutorial/html/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/tutorial/html/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/eo/tutorial/pdf/.cvsignore b/eo/tutorial/pdf/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/eo/tutorial/pdf/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile From cf82efd94df9539ced9fa62543a905ba0d55d4fa Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 10 May 2011 11:44:53 +0200 Subject: [PATCH 1766/2134] * ConfigureChecks.cmake: issue fixed --- eo/CMakeLists.txt | 4 +++- eo/ConfigureChecks.cmake | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 35b98d16f..fa789d4d6 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -58,7 +58,9 @@ INCLUDE(FindGnuplot) INCLUDE(CheckLibraryExists) -INCLUDE(ConfigureChecks.cmake) +IF(UNIX) + INCLUDE(ConfigureChecks.cmake) +ENDIF(UNIX) INCLUDE(Dart OPTIONNAL) diff --git a/eo/ConfigureChecks.cmake b/eo/ConfigureChecks.cmake index ee687fdf3..5fabc9c38 100644 --- a/eo/ConfigureChecks.cmake +++ b/eo/ConfigureChecks.cmake @@ -1,22 +1,22 @@ # NOTE: only add something here if it is really needed by EO -include(CheckIncludeFile) -include(CheckIncludeFiles) -include(CheckSymbolExists) -include(CheckFunctionExists) -include(CheckLibraryExists) +INCLUDE(CheckIncludeFile) +INCLUDE(CheckIncludeFiles) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckFunctionExists) +INCLUDE(CheckLibraryExists) -check_library_exists(m cos "cos in libm" HAVE_LIBM) +CHECK_LIBRARY_EXISTS(m cos "/usr/lib" HAVE_LIBM) -check_include_files(cmath.h "cmath.h" HAVE_CMATH_H) -check_include_files(stdio.h "stdio.h" HAVE_STDIO_H) -check_include_files(stdlib.h "stdlib.h" HAVE_STDLIB_H) -check_include_files(string.h "string.h" HAVE_STRING_H) -check_include_files(strings.h "strings.h" HAVE_STRINGS_H) -check_include_files(malloc.h "malloc.h" HAVE_MALLOC_H) -check_include_files(limits.h "limits.h" HAVE_LIMITS_H) -check_include_files(unistd.h "unistd.h" HAVE_UNISTD_H) -check_include_files(stdint.h "stdint.h" HAVE_STDINT_H) +CHECK_INCLUDE_FILES(math.h "math.h" HAVE_MATH_H) +CHECK_INCLUDE_FILES(stdio.h "stdio.h" HAVE_STDIO_H) +CHECK_INCLUDE_FILES(stdlib.h "stdlib.h" HAVE_STDLIB_H) +CHECK_INCLUDE_FILES(string.h "string.h" HAVE_STRING_H) +CHECK_INCLUDE_FILES(strings.h "strings.h" HAVE_STRINGS_H) +CHECK_INCLUDE_FILES(malloc.h "malloc.h" HAVE_MALLOC_H) +CHECK_INCLUDE_FILES(limits.h "limits.h" HAVE_LIMITS_H) +CHECK_INCLUDE_FILES(unistd.h "unistd.h" HAVE_UNISTD_H) +CHECK_INCLUDE_FILES(stdint.h "stdint.h" HAVE_STDINT_H) # Use check_symbol_exists to check for symbols in a reliable @@ -26,4 +26,4 @@ check_include_files(stdint.h "stdint.h" HAVE_STDINT_H) # specific order. Refer to the man page for each symbol for which a # check is to be added to get the proper set of headers. Example : -#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE) +#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE) From a67a69d1f23d74e292e2598f69888f742f537ae4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 10 May 2011 11:45:37 +0200 Subject: [PATCH 1767/2134] - old eclipse files --- eo/.cproject | 221 ------- eo/.project | 82 --- eo/config.guess | 1466 ----------------------------------------------- 3 files changed, 1769 deletions(-) delete mode 100644 eo/.cproject delete mode 100644 eo/.project delete mode 100755 eo/config.guess diff --git a/eo/.cproject b/eo/.cproject deleted file mode 100644 index b6834b52e..000000000 --- a/eo/.cproject +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -make - -Lesson1 -true -true -true - - - - - - - - - diff --git a/eo/.project b/eo/.project deleted file mode 100644 index 995b188c0..000000000 --- a/eo/.project +++ /dev/null @@ -1,82 +0,0 @@ - - - eo - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - ?name? - - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/eo} - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/eo/config.guess b/eo/config.guess deleted file mode 100755 index 2784e1b25..000000000 --- a/eo/config.guess +++ /dev/null @@ -1,1466 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -timestamp='2011-05-05' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "${UNAME_MACHINE}" in - i?86) - test -z "$VENDOR" && VENDOR=pc - ;; - *) - test -z "$VENDOR" && VENDOR=unknown - ;; -esac -test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pegasos:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; - macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - # GNU/KFreeBSD systems have a "k" prefix to indicate we are using - # FreeBSD's kernel, but not the complete OS. - case ${LIBC} in gnu) kernel_only='k' ;; esac - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux - exit 0 ;; - cris:Linux:*:*) - echo cris-axis-linux - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 - ;; - ppc:Linux:*:*) - echo powerpc-${VENDOR}-linux - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-${VENDOR}-linux - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-${VENDOR}-linux ;; - PA8*) echo hppa2.0-${VENDOR}-linux ;; - *) echo hppa-${VENDOR}-linux ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-${VENDOR}-linux - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-${VENDOR}-linux - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-${VENDOR}-linuxaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linuxoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit 0 ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: From 51a33fe3422cd6f4d4ebed2547db47a6f76761ec Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 10 May 2011 15:33:42 +0200 Subject: [PATCH 1768/2134] * NEWS --- eo/NEWS | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index 92beb69aa..21787204b 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,7 +1,13 @@ -* current - - evaluators that throw an exception if a maximum time has en reached (wallclock and CPU user time for POSIX systems), independently of the number of generations +* release 1.3 (10. May. 2011) + - fixed the incremental allocation issue troubling the variation operators which take a long time execution for the big population sizes. + - new class eoParallel enabling parallelization in EO using OpenMP. At this time, it only concerns the evaluation functions, for advanced details go to the file test/t-eoParallel.cpp. The default parallelization mode is off, to switch on, see the parameters prefixed by --parallelize-*. + - pyeo compatible with the last version of Boost and Python libraries + - script installing EO manually in using symbolic links -* release 1.1 +* release 1.2 (16. Dec. 2010) + - evaluators that throw an exception if a maximum time has been reached (wallclock and CPU user time for POSIX systems), independently of the number of generations + +* release 1.1 (8. Nov. 2010) - provide cmake build system, remove the old autotools one - package generation system - GCC 4.3 compatibility From e728665c8b92e74471eb294bd45679aea8868d32 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 May 2011 15:59:40 +0200 Subject: [PATCH 1769/2134] small corrections --- eo/NEWS | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index 21787204b..f07f9975d 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,11 +1,14 @@ -* release 1.3 (10. May. 2011) - - fixed the incremental allocation issue troubling the variation operators which take a long time execution for the big population sizes. - - new class eoParallel enabling parallelization in EO using OpenMP. At this time, it only concerns the evaluation functions, for advanced details go to the file test/t-eoParallel.cpp. The default parallelization mode is off, to switch on, see the parameters prefixed by --parallelize-*. +* release 1.2 (10. May. 2011) + - fixed the incremental allocation issue in the variation operator which were + taking too much time for big population sizes + - new class eoParallel enabling parallelization in EO using OpenMP. At this + time, it only concerns the evaluation operator, for advanced details go to + the file test/t-eoParallel.cpp. The default parallelization mode is off, to + switch it on, see the parameters prefixed by --parallelize-* - pyeo compatible with the last version of Boost and Python libraries - script installing EO manually in using symbolic links - -* release 1.2 (16. Dec. 2010) - - evaluators that throw an exception if a maximum time has been reached (wallclock and CPU user time for POSIX systems), independently of the number of generations + - evaluators that throw an exception if a maximum time has been reached + (wallclock and CPU user time for POSIX systems), independently of the number of generations * release 1.1 (8. Nov. 2010) - provide cmake build system, remove the old autotools one From 65d966ba8c3a255235aef6f606fdd65c4810cdf3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 10 May 2011 16:32:08 +0200 Subject: [PATCH 1770/2134] * CHANGELOG --- eo/CHANGELOG | 1664 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 1551 insertions(+), 113 deletions(-) diff --git a/eo/CHANGELOG b/eo/CHANGELOG index 56e4df4b1..8a518c2f8 100644 --- a/eo/CHANGELOG +++ b/eo/CHANGELOG @@ -1,3 +1,1026 @@ +Author: Caner Candan +Date: Tue May 10 15:33:42 2011 +0200 + + * NEWS + +Author: Caner Candan +Date: Tue May 10 11:45:37 2011 +0200 + + - old eclipse files + +Author: Caner Candan +Date: Tue May 10 11:44:53 2011 +0200 + + * ConfigureChecks.cmake: issue fixed + +Author: Caner Candan +Date: Tue May 10 10:34:35 2011 +0200 + + - removed useless .cvsignore files since we are using git now + +Author: nojhan +Date: Tue May 10 00:31:18 2011 +0200 + + updated build instructions + +Author: Caner Candan +Date: Mon May 9 17:21:18 2011 +0200 + + + build_gcc_linux_pyeo + +Author: Caner Candan +Date: Mon May 9 17:21:16 2011 +0200 + + * build_gcc_linux_unittest + +Author: Caner Candan +Date: Mon May 9 17:20:33 2011 +0200 + + + build_gcc_linux_stl_parallel + +Author: Caner Candan +Date: Fri May 6 16:01:28 2011 +0200 + + * pyeo + +Author: Caner Candan +Date: Fri May 6 11:14:39 2011 +0200 + + * apply: needed eoLogger header file inclusion + +Author: Caner Candan +Date: Thu May 5 17:15:10 2011 +0200 + + * whitespace cleanup + +Author: Caner Candan +Date: Thu May 5 16:54:00 2011 +0200 + + * indentations + whitespace cleanup + +Author: Caner Candan +Date: Thu May 5 16:53:31 2011 +0200 + + * pyeo/PyEO.cpp: renamed module name + +Author: Caner Candan +Date: Thu May 5 16:53:02 2011 +0200 + + * pyeo/CMakeLists.txt: auto find cpp files + +Author: Caner Candan +Date: Thu May 5 11:47:30 2011 +0200 + + * pyeo cmake config file + +Merge: 7dcc7b6 f984839 +Author: Caner Candan +Date: Wed May 4 17:57:54 2011 +0200 + + Merge branch 'openmp' + +Author: Caner Candan +Date: Tue Mar 15 18:05:45 2011 +0100 + + * edoSampler: sampler method protected + +Author: Caner Candan +Date: Tue Mar 15 16:39:46 2011 +0100 + + * eoLogger: forgot to close opened file + +Author: Caner Candan +Date: Wed May 4 17:29:45 2011 +0200 + + * pyeo: updated pyeo in order to make it works + +Author: Caner Candan +Date: Wed May 4 17:28:46 2011 +0200 + + * eoReduceSplit.h: bad syntax in using eo::log + +Author: Caner Candan +Date: Wed Mar 30 15:52:23 2011 +0200 + + * eoOpContainer: call to eoGenOp::apply instead of operator() to avoid calling reserve + +Author: Caner Candan +Date: Wed Mar 30 15:50:19 2011 +0200 + + * eoEasyEA: pop reserve at each call to algo + +Author: Caner Candan +Date: Thu Mar 24 12:52:27 2011 +0100 + + * switched eoGenOp::apply method from protected to public in order to be visible from eoSequentialOp + +Author: Caner Candan +Date: Wed Mar 23 17:34:35 2011 +0100 + + * eoEasyEA: moved offspring into attributes space in order to avoid memory reallocation when we restart + +Merge: 007aae6 bc30b2c +Author: Caner Candan +Date: Fri Mar 18 11:20:09 2011 +0100 + + Merge branch 'master' into openmp + +Merge: aa23cec 8f6e4b2 +Author: Caner Candan +Date: Fri Mar 18 11:10:59 2011 +0100 + + Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev + +Merge: e7b6b17 16c2e9d +Author: Caner Candan +Date: Fri Mar 18 11:10:14 2011 +0100 + + Merge branch 'openmp' of ssh://localhost:9001/gitroot/eodev/eodev into openmp + +Merge: 9597010 8f6e4b2 +Author: Caner Candan +Date: Mon Mar 14 17:30:46 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Mon Mar 14 17:29:20 2011 +0100 + + * pipecom: added an argument to printf generating a warning + +Merge: cbc44d4 9e95eef +Author: Caner Candan +Date: Tue Mar 8 00:20:37 2011 +0100 + + Merge branch 'openmp' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev into openmp + +Merge: 2044d92 90863fd +Author: Caner Candan +Date: Tue Mar 8 00:19:46 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Tue Mar 8 00:08:18 2011 +0100 + + * disabled app/gprop temporary because of the incompatibility with gcc version higher than 4.5.1 + +Merge: 9e95eef aa23cec +Author: Caner Candan +Date: Thu Feb 24 14:29:29 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Thu Feb 24 11:10:47 2011 +0100 + + + added install.cmake to configure dependancies paths + +Author: Caner Candan +Date: Thu Feb 24 11:09:51 2011 +0100 + + * fixed issues on the code to be compatible with last version of boost + +Author: Caner Candan +Date: Thu Feb 24 10:32:13 2011 +0100 + + * application/common/cmakelists.txt: fixed issues with copy of files + +Author: Caner Candan +Date: Tue Feb 8 10:59:00 2011 +0100 + + * eoParallel: added the both parameters enable_results and do_measure + +Author: Caner Candan +Date: Fri Feb 4 16:29:27 2011 +0100 + + * t-openmpy.*: added a header + +Author: Caner Candan +Date: Fri Feb 4 16:28:24 2011 +0100 + + * eoParallel: added the parameter enableResults + +Merge: a733983 2044d92 +Author: Caner Candan +Date: Fri Feb 4 14:10:10 2011 +0100 + + Merge branch 'openmp' of ssh://localhost:9001/gitroot/eodev/eodev into openmp + +Merge: 77a92ff 61faa63 +Author: Caner Candan +Date: Fri Feb 4 14:09:12 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Wed Feb 2 23:50:58 2011 +0100 + + * eoParallel: added the call to omp_set_num_threads to define the number of threads with parameters + +Merge: 54e2a8b 61faa63 +Author: Caner Candan +Date: Fri Jan 28 15:27:24 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Fri Jan 28 14:38:50 2011 +0100 + + * apply.h: size variable missing without openmp + +Author: Caner Candan +Date: Fri Jan 28 11:11:20 2011 +0100 + + * a little update in building script files + +Merge: 4c561f9 36fe44b +Author: Caner Candan +Date: Fri Jan 28 10:43:23 2011 +0100 + + Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev + +Author: Caner Candan +Date: Thu Jan 27 17:50:11 2011 +0100 + + * removed some warnings + +Merge: db4eda2 9635901 +Author: Caner Candan +Date: Thu Jan 27 14:41:42 2011 +0100 + + Merge branch 'openmp' of ssh://localhost:9001/gitroot/eodev/eodev into openmp + +Author: Caner Candan +Date: Thu Jan 27 14:41:17 2011 +0100 + + * eoParallel: added a missing attribute + +Merge: 4c561f9 32a183e +Author: Caner Candan +Date: Thu Jan 27 13:53:42 2011 +0100 + + Merge branch 'openmp' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev into openmp + + Conflicts: + eo/test/CMakeLists.txt + +Author: Johann Dreo +Date: Thu Jan 27 11:59:14 2011 +0100 + + a very simple script to create snapshot of the current head + +Author: Johann Dreo +Date: Thu Jan 27 11:58:21 2011 +0100 + + move edo stuff, that was in the wriong place after the merge, in the edo directory + +Merge: e6ee096 d618ab0 +Author: Johann Dreo +Date: Thu Jan 27 11:36:55 2011 +0100 + + Merge branch 'edo' + +Merge: 12f4f24 8c4b160 +Author: Johann Dreo +Date: Thu Jan 27 11:32:21 2011 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Thu Jan 27 11:23:23 2011 +0100 + + rename everything from 'do' to 'edo' + +Merge: 6e2041d 5fe07ab +Author: Caner Candan +Date: Thu Jan 27 10:49:41 2011 +0100 + + Merge branch 'master' into symlink + +Merge: 3d06d4a 5fe07ab +Author: Caner Candan +Date: Thu Jan 27 10:45:07 2011 +0100 + + Merge branch 'master' into openmp + + Conflicts: + eo/src/eo + +Author: Caner Candan +Date: Thu Jan 27 10:43:13 2011 +0100 + + + eoParallel: nthreads option * apply.h: mangled the openmp code with pre-processing conditions + +Author: Caner Candan +Date: Thu Jan 27 10:39:15 2011 +0100 + + fixed an issue in eoParallel class + + Conflicts: + + eo/src/utils/eoParallel.cpp + +Author: Caner Candan +Date: Tue Dec 28 16:42:53 2010 +0100 + + * updated eoParallel class in order to define the result filename according to the parallelization mode + +Author: Caner Candan +Date: Thu Jan 27 10:35:49 2011 +0100 + + - removed old parallelization parameters from the old-style from eoParser class + + Conflicts: + + eo/src/utils/eoParser.h + +Author: Caner Candan +Date: Thu Jan 27 10:31:28 2011 +0100 + + * changed apply.h to use new parallelization s parameters + + Conflicts: + + eo/src/apply.h + +Author: Caner Candan +Date: Thu Jan 27 10:30:40 2011 +0100 + + added measure into apply function + + Conflicts: + + eo/src/apply.h + +Author: Caner Candan +Date: Thu Jan 27 10:29:09 2011 +0100 + + + now you are able to enable or not parallelization with the option --parallelize-loops=1|0 + + Conflicts: + + eo/src/apply.h + eo/src/utils/eoParser.cpp + eo/src/utils/eoParser.h + +Author: Caner Candan +Date: Thu Jan 27 10:25:22 2011 +0100 + + add the parser/logger to the general header + + Conflicts: + + eo/src/eo + +Author: Caner Candan +Date: Wed Jan 26 18:10:34 2011 +0100 + + - removed t-eoDualFitness from test/CMakeLists.txt because it fails + + Conflicts: + + eo/test/CMakeLists.txt + +Author: Caner Candan +Date: Thu Dec 23 12:22:29 2010 +0100 + + + add the value() method in eoParam used by dae + +Author: Caner Candan +Date: Wed Dec 22 13:40:49 2010 +0100 + + * package dependancies changed + +Author: Caner Candan +Date: Wed Jan 26 18:09:37 2011 +0100 + + * doc: solved some mistakes + + Conflicts: + + eo/doc/index.h + +Author: Caner Candan +Date: Thu Jan 6 09:16:01 2011 +0100 + + * a little update tu be compatible with gnuplot + +Author: Caner Candan +Date: Wed Jan 5 16:07:08 2011 +0100 + + * --parallelize-prefix parameter description + +Author: Caner Candan +Date: Tue Dec 28 22:54:10 2010 +0100 + + fixed an issue in eoParallel class + +Author: Caner Candan +Date: Tue Dec 28 16:43:44 2010 +0100 + + + added a test file for eoParallel class + +Author: Caner Candan +Date: Tue Dec 28 16:42:53 2010 +0100 + + * updated eoParallel class in order to define the result filename according to the parallelization mode + +Author: Caner Candan +Date: Tue Dec 28 16:41:14 2010 +0100 + + * apply.h: now results stored to a filename defined with parallelization parameters + +Author: Caner Candan +Date: Sun Dec 26 19:19:20 2010 +0100 + + * added eoParallel header inclusion to eo + +Author: Caner Candan +Date: Sun Dec 26 19:13:43 2010 +0100 + + - removed old parallelization parameters from the old-style from eoParser class + +Author: Caner Candan +Date: Sun Dec 26 19:12:20 2010 +0100 + + * updated cmakelists.txt to compile new eoParallel class + +Author: Caner Candan +Date: Sun Dec 26 19:11:00 2010 +0100 + + + created new eoParallel class with a global variable eo::parallel in order to store all parameters tied to parallelization and to access from anywhere + +Author: Caner Candan +Date: Sun Dec 26 19:09:08 2010 +0100 + + * changed apply.h to use new parallelization s parameters + +Author: Caner Candan +Date: Thu Dec 23 23:03:02 2010 +0100 + + added measure into apply function + +Author: Caner Candan +Date: Thu Dec 23 18:09:25 2010 +0100 + + + now you are able to enable or not parallelization with the option --parallelize-loops=1|0 + +Author: Johann Dreo +Date: Thu Dec 16 15:51:28 2010 +0100 + + set the version to 1.1.1-edge + +Author: Johann Dreo +Date: Thu Dec 16 15:50:26 2010 +0100 + + evaluator that throw an exception if a maximum CPU user time has been reached, for POSIX systems + +Author: Johann Dreo +Date: Tue Dec 14 15:27:26 2010 +0100 + + add the parser/logger to the general header + +Merge: df57a10 5fe07ab +Author: Johann Dreo +Date: Wed Jan 26 16:31:55 2011 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Caner Candan +Date: Thu Jan 20 19:07:41 2011 +0100 + + - removed t-eoDualFitness from test/CMakeLists.txt because it fails + +Merge: 9e93f52 1e177e1 +Author: Johann Dreo +Date: Tue Jan 4 10:42:20 2011 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Caner Candan +Date: Thu Dec 23 14:31:34 2010 +0100 + + fixed a mistake in cflags setting about openmp flags + +Author: Caner Candan +Date: Thu Dec 23 12:22:29 2010 +0100 + + + add the value() method in eoParam used by dae + +Author: Johann Dreo +Date: Wed Dec 22 18:29:30 2010 +0100 + + const parameter + intermediate reused variable + +Author: Johann Dreo +Date: Wed Dec 22 18:25:44 2010 +0100 + + missing include of the eoLogger header + +Author: Caner Candan +Date: Wed Dec 22 18:23:45 2010 +0100 + + * now symlink script more generic + +Author: Caner Candan +Date: Wed Dec 22 17:25:40 2010 +0100 + + changed cmakelists.txt to generate install symlink script + +Author: Caner Candan +Date: Wed Dec 22 17:24:34 2010 +0100 + + added install_symlink script + +Author: Caner Candan +Date: Wed Dec 22 13:40:49 2010 +0100 + + * package dependancies changed + +Author: Caner Candan +Date: Wed Dec 22 10:25:13 2010 +0100 + + * doc: solved some mistakes + +Author: Johann Dreo +Date: Fri Dec 17 11:25:58 2010 +0100 + + Add a value(ValueType) method for ValueParam, to directly change the value using the templatized type. Use two intermediate streamstring conversions. + +Author: Johann Dreo +Date: Fri Dec 17 10:39:42 2010 +0100 + + eoMaxTimeException is not used only for wallclock time, set a more general message + +Author: Johann Dreo +Date: Thu Dec 16 15:51:28 2010 +0100 + + set the version to 1.1.1-edge + +Author: Johann Dreo +Date: Thu Dec 16 15:50:26 2010 +0100 + + evaluator that throw an exception if a maximum CPU user time has been reached, for POSIX systems + +Author: Johann Dreo +Date: Tue Dec 14 15:27:26 2010 +0100 + + add the parser/logger to the general header + +Author: Caner Candan +Date: Sun Nov 28 14:21:26 2010 +0100 + + now we can select which measures we want + +Author: Caner Candan +Date: Sun Nov 28 13:36:25 2010 +0100 + + using rdtsc for rng seed with mersenne twister + +Author: Caner Candan +Date: Sun Nov 28 03:41:09 2010 +0100 + + update + +Author: Caner Candan +Date: Sun Nov 28 03:35:21 2010 +0100 + + added variable time measure + +Author: Caner Candan +Date: Sun Nov 28 03:32:53 2010 +0100 + + added variable time measure + +Author: Caner Candan +Date: Sun Nov 28 03:24:02 2010 +0100 + + added variable time measure + +Author: Caner Candan +Date: Sun Nov 28 00:19:46 2010 +0100 + + added n processus and fixed bound parameters + +Author: Caner Candan +Date: Sun Nov 28 00:12:08 2010 +0100 + + added n processus and fixed bound parameters + +Author: Caner Candan +Date: Sat Nov 27 23:26:16 2010 +0100 + + onlyexec and onlyprint parameters added on openmp script + +Author: Caner Candan +Date: Sat Nov 27 23:22:54 2010 +0100 + + onlyexec and onlyprint parameters added on openmp script + +Author: Caner Candan +Date: Sat Nov 27 23:07:11 2010 +0100 + + t-openmp.py released + +Author: Caner Candan +Date: Sat Nov 27 21:27:41 2010 +0100 + + changed output results name + +Author: Caner Candan +Date: Sat Nov 27 21:24:07 2010 +0100 + + added t-openmp.py + +Author: Caner Candan +Date: Sat Nov 27 16:19:51 2010 +0100 + + added prefix parameter on t-openmp + +Author: Caner Candan +Date: Mon Nov 22 19:16:09 2010 +0100 + + updated Dp = Tp / TDp + +Author: Caner Candan +Date: Mon Nov 22 18:20:38 2010 +0100 + + remode two - on results filename + +Author: Caner Candan +Date: Mon Nov 22 18:08:58 2010 +0100 + + updated to D_p = T_Dp / T_p and avoid all D_p higher than the number of tasks used + +Author: Caner Candan +Date: Mon Nov 22 17:43:52 2010 +0100 + + popStep and dimStep replaced by pS and dS on the results filename + +Author: Caner Candan +Date: Mon Nov 22 17:37:44 2010 +0100 + + added popStep and dimStep value on the result filename + +Author: Caner Candan +Date: Mon Nov 22 17:35:06 2010 +0100 + + created two boxplot script files one to generate image the other to display with matplotlab + +Author: Caner Candan +Date: Mon Nov 22 17:33:11 2010 +0100 + + removed omp_apply.h and added to apply.h, added dynamicity computation + +Author: Caner Candan +Date: Mon Nov 22 14:47:55 2010 +0100 + + remove threshold parameter and move from static schedule to dynamic + +Author: Caner Candan +Date: Mon Nov 22 14:07:47 2010 +0100 + + added efficienty computation + +Author: Caner Candan +Date: Sat Nov 20 01:57:30 2010 +0100 + + added stepping parameters + +Merge: dab81d1 6625cd2 +Author: Caner Candan +Date: Sat Nov 20 01:08:22 2010 +0100 + + uptodate + +Author: Caner Candan +Date: Sat Nov 20 01:01:45 2010 +0100 + + openmp testing up-to-date + +Author: nojhan +Date: Fri Nov 19 21:08:18 2010 +0100 + + test binary for dual fitness + +Merge: e8a083f 651ba9f +Author: nojhan +Date: Fri Nov 19 21:07:05 2010 +0100 + + Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev + + Conflicts: + eo/test/CMakeLists.txt + +Author: nojhan +Date: Fri Nov 19 21:03:07 2010 +0100 + + add t-eoDualFitness to CMake + +Author: nojhan +Date: Fri Nov 19 21:02:35 2010 +0100 + + added a method to get the value of a dual fitness + +Author: Caner Candan +Date: Fri Nov 19 11:54:45 2010 +0100 + + new pkg-config file + +Author: Caner Candan +Date: Fri Nov 19 11:50:51 2010 +0100 + + changed pkg-config file creation process + +Author: Caner Candan +Date: Fri Nov 19 11:48:42 2010 +0100 + + openmp test updated + +Author: Caner Candan +Date: Thu Nov 18 10:49:24 2010 +0100 + + added some new scripts to specialize building and a build script for visual studio 2008 + +Author: Caner Candan +Date: Thu Nov 18 10:47:29 2010 +0100 + + forgot to add t-eoParser in test/CMakeLists.txt + +Author: Caner Candan +Date: Wed Nov 17 17:27:55 2010 +0100 + + added a apply.h variant for parallel execution + +Author: Caner Candan +Date: Wed Nov 17 14:43:18 2010 +0100 + + functor operator applying to population in parallel + +Merge: 979a186 8ecef39 +Author: Caner Candan +Date: Wed Nov 17 11:54:07 2010 +0100 + + Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev + +Author: Caner Candan +Date: Wed Nov 17 11:47:49 2010 +0100 + + unit test for eoParser added + +Author: Caner Candan +Date: Wed Nov 17 11:41:43 2010 +0100 + + fixed unistd.h portability issue + +Author: Johann Dreo +Date: Mon Nov 15 09:30:37 2010 +0100 + + eoDualStatSwitch, a wrapper for computing stats on feasible and unfeasible individuals, separately + +Merge: fb8a8d7 04f12b7 +Author: Johann Dreo +Date: Mon Nov 15 09:14:00 2010 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Mon Nov 15 09:13:39 2010 +0100 + + verify that pop is not empty before attempting to compute the IQR + +Author: Johann Dreo +Date: Mon Nov 15 09:12:10 2010 +0100 + + @todo: add an init method for continuators? + +Author: nojhan +Date: Sun Nov 14 15:24:35 2010 +0100 + + supress some doxygen warnings about \classes + +Author: nojhan +Date: Sun Nov 14 15:11:46 2010 +0100 + + eoInterquartileRangeStat example link to t-eoIQRStat + +Author: nojhan +Date: Sun Nov 14 15:07:50 2010 +0100 + + a test binary for eoInterquartileRangeStat + +Author: Caner Candan +Date: Wed Nov 10 11:18:57 2010 +0100 + + there was a warning from compiler related to a comment syntax in eoInvalidateOps.h + +Author: Johann Dreo +Date: Tue Nov 9 11:44:28 2010 +0100 + + fix most of the doxygen warnings + +Author: Johann Dreo +Date: Mon Nov 8 22:58:37 2010 +0100 + + default log output to debug for the ostream monitor ; better documentation + +Author: Johann Dreo +Date: Mon Nov 8 18:29:25 2010 +0100 + + new eoAerageSizeStat class + +Author: Johann Dreo +Date: Mon Nov 8 18:27:58 2010 +0100 + + check for self assignement in copy operator of eoDualFitness + +Author: Johann Dreo +Date: Mon Nov 8 18:27:19 2010 +0100 + + deactivate gpsymreg that uses the now unsuported multi-objective feature + +Author: Johann Dreo +Date: Sun Nov 7 23:43:58 2010 +0100 + + fix some doxygen warnings + +Author: Johann Dreo +Date: Sun Nov 7 23:16:45 2010 +0100 + + remove multi-objective stuff, deprecated by ParadisEO-PEO + +Author: Johann Dreo +Date: Sun Nov 7 23:12:28 2010 +0100 + + add tests interfaces as examples in the doc ; remove unused test binaries ; some code formating + +Author: Johann Dreo +Date: Sun Nov 7 23:09:35 2010 +0100 + + remove unused test binaries, some code formating + +Author: Johann Dreo +Date: Sun Nov 7 11:19:33 2010 +0100 + + in the doc's main page: brief section first with a link to the modules list + +Author: Johann Dreo +Date: Sat Nov 6 17:31:39 2010 +0100 + + do not documentify: test, tutorial, contrib and app, that are not part of the framework by itself + +Author: Johann Dreo +Date: Sat Nov 6 17:24:00 2010 +0100 + + removing obsolete win directory, we now se CMake that can generate VC++ project files by itself + +Author: nojhan +Date: Sat Nov 6 09:19:17 2010 +0100 + + small fixes in the doc + +Author: Johann Dreo +Date: Fri Nov 5 22:46:15 2010 +0100 + + and finally... still more grouping in documentation. + +Author: Johann Dreo +Date: Fri Nov 5 15:59:35 2010 +0100 + + grouping classes in documentation + +Author: Johann Dreo +Date: Fri Nov 5 14:28:28 2010 +0100 + + name of variables in english ; use the eo::log instead of cerr ; doc grouping + +Author: Johann Dreo +Date: Fri Nov 5 11:26:04 2010 +0100 + + grouping classes in documentation + +Author: Johann Dreo +Date: Tue Nov 2 17:23:27 2010 +0100 + + readable size for the evolutionry algorithm diagram + +Author: Johann Dreo +Date: Tue Nov 2 16:57:13 2010 +0100 + + evolutionary algorithm diagram with lego blocks, fancier + +Author: Johann Dreo +Date: Mon Nov 1 23:08:58 2010 +0100 + + more doc groups, cleaner modules hierarchy + +Author: Johann Dreo +Date: Mon Nov 1 22:09:40 2010 +0100 + + replace TODO comments by @ŧodo doxygen command + +Author: Johann Dreo +Date: Mon Nov 1 22:08:37 2010 +0100 + + more explanations in doc main page, remove HTML markup, remove deprecated link pages + +Author: Johann Dreo +Date: Mon Nov 1 18:20:56 2010 +0100 + + Create more doxygen groups for base classes, clean some doc + +Author: Johann Dreo +Date: Mon Nov 1 18:19:37 2010 +0100 + + delete the obsolete directory (still versionned in the repository if necessary) + +Author: Johann Dreo +Date: Mon Nov 1 15:34:27 2010 +0100 + + grouping algorithms in a module of the doc + +Author: Johann Dreo +Date: Mon Nov 1 13:37:24 2010 +0100 + + added Johann and Caner as authors on the web page + +Author: Johann Dreo +Date: Mon Nov 1 13:32:37 2010 +0100 + + more shortcut links on the webpage, toward the chat and the trac + +Author: Johann Dreo +Date: Sun Oct 31 23:01:16 2010 +0100 + + fix #10: removed MOO binaries + +Author: Johann Dreo +Date: Sun Oct 31 22:57:05 2010 +0100 + + fix #10: removed the moo/ directory and eoMO* classes, deprecated by the Paradiseo-MOEO project + +Author: Johann Dreo +Date: Sun Oct 31 21:57:06 2010 +0100 + + indicate cudacc branch in the changelog + +Merge: fc21827 66b4dfd +Author: Johann Dreo +Date: Sun Oct 31 21:50:15 2010 +0100 + + Merge branch 'cudacc' + +Author: Johann Dreo +Date: Sun Oct 31 21:36:53 2010 +0100 + + remove default values for verbose parameters, so as to make deprecated wrappers unused by default + +Author: Johann Dreo +Date: Sun Oct 31 21:19:34 2010 +0100 + + alternate function prototypes without verbose parameter + +Author: Johann Dreo +Date: Sun Oct 31 07:47:12 2010 +0100 + + changelog summary for the next 1.1 release + +Author: Johann Dreo +Date: Sat Oct 30 23:30:40 2010 +0200 + + fix #13: remove the use of the verbose members, replaced by the eo::log system ; functions prototypes keep their verbose parameters, but display a warning until next version + +Author: Johann Dreo +Date: Tue Oct 26 13:48:47 2010 +0200 + + file not at the right place + +Author: Johann Dreo +Date: Tue Oct 26 13:37:15 2010 +0200 + + replace the changelog with the (cleaned) git log, more up-to-date + +Author: Johann Dreo +Date: Tue Oct 26 13:35:08 2010 +0200 + + renamed in CHANGELOG + +Author: Johann Dreo +Date: Tue Oct 26 13:34:19 2010 +0200 + + warning: not up-to-date + +Author: Johann Dreo +Date: Tue Oct 26 13:32:55 2010 +0200 + + added Johann and Caner as authors + +Author: Johann Dreo +Date: Tue Oct 26 13:32:43 2010 +0200 + + replace the changelog with the (cleaned) git log, more up-to-date + Author: Johann Dreo Date: Tue Oct 26 10:51:48 2010 +0200 @@ -18,11 +1041,31 @@ Date: Fri Oct 22 10:07:09 2010 +0200 Arithmetic operators (note: priority to unfeasibility) +Author: Caner Candan +Date: Tue Oct 12 10:09:56 2010 +0200 + + I have fixed some bugs and added some tests for doDistrib classes + Author: Johann Dreo Date: Wed Sep 29 22:52:30 2010 +0200 using eo::log instead of std::cout +Author: Caner Candan +Date: Tue Sep 28 10:38:38 2010 +0200 + + there was an issue on doBounderNo class tied to the default values of the ctor of mother class doBounder: fixed + +Author: Caner Candan +Date: Wed Sep 22 19:25:37 2010 +0200 + + * eda n eda_sa: bug fixed, while we were using -h the result folder was removed + +Author: Caner Candan +Date: Wed Sep 22 14:38:15 2010 +0200 + + + eda algo: same algo than eda-sa without sa, + plotting scripts and problem functions moved to application/common + Author: Johann Dreo Date: Tue Sep 21 17:53:48 2010 +0200 @@ -33,6 +1076,21 @@ Date: Tue Sep 21 17:52:59 2010 +0200 typo variable name +Author: Caner Candan +Date: Tue Sep 21 15:12:19 2010 +0200 + + + boxplot.py: script to generate graphic with boxplot to illustrate distances between theorical and visual means for each population value + +Author: Caner Candan +Date: Tue Sep 21 15:08:38 2010 +0200 + + + t-mean-distance: program to generate distance value between the theorical and visual means + +Author: Johann Dreo +Date: Mon Sep 20 13:35:51 2010 +0200 + + typofix declaration types in macro + Author: Johann Dreo Date: Mon Sep 20 11:32:55 2010 +0200 @@ -94,11 +1152,115 @@ Date: Wed Sep 15 22:28:29 2010 +0200 doc comments +Merge: 26ac5ca 86b7538 +Author: Caner Candan +Date: Tue Sep 14 14:18:14 2010 +0200 + + Merge branch 'master' of 188.165.44.48:do + +Author: Caner Candan +Date: Tue Sep 14 13:19:43 2010 +0200 + + bugfixed from ublas::vector assignement ctor for old version of boost + +Author: Caner Candan +Date: Mon Sep 13 06:17:44 2010 +0200 + + - screenshots + +Merge: 0f4e43c 6a613bc +Author: Caner Candan +Date: Sat Sep 11 00:21:02 2010 +0200 + + Merge branch 'mo-1.3' of candan.fr:do into mo-1.3 + +Author: Caner Candan +Date: Fri Sep 10 23:21:31 2010 +0200 + + t-doEstimatorNormalMulti: display means and distance + +Author: Caner Candan +Date: Fri Sep 10 17:04:02 2010 +0200 + + * bugfixed on test_cov_parameters + +Author: Caner Candan +Date: Fri Sep 10 15:52:54 2010 +0200 + + replaced generated prefix name in result folder + +Author: Caner Candan +Date: Fri Sep 10 15:48:16 2010 +0200 + + + test_cov_parameters.py: script to execute the estimator testor (t-EstimatorNormalMulti) in using all combinaison parameters values for 2-D cov-matrix + +Author: Caner Candan +Date: Fri Sep 10 01:09:16 2010 +0200 + + + test/t-doEstimatorNormalMulti + Author: nojhan Date: Thu Sep 9 22:37:50 2010 +0200 update related softwares: + EASEA, GUIDE +Merge: 15ae721 86b0828 +Author: Caner Candan +Date: Thu Sep 9 13:55:59 2010 +0200 + + Merge branch 'mo-1.3' of git:do into mo-1.3 + +Author: Caner Candan +Date: Thu Sep 9 13:55:18 2010 +0200 + + * added some comments + +Author: Caner Candan +Date: Thu Sep 9 11:53:14 2010 +0200 + + + new screenshot with parameters -P=10000 -d=10 + +Author: Caner Candan +Date: Thu Sep 9 11:24:35 2010 +0200 + + * some updates on gplot.py to have a better display + screenshots from gnuplot + +Author: Caner Candan +Date: Thu Sep 9 08:03:01 2010 +0200 + + * README + +Author: Caner Candan +Date: Thu Sep 9 07:59:50 2010 +0200 + + buxfixed on CMakeLists.txt regarding copying failures + +Author: Caner Candan +Date: Thu Sep 9 07:58:05 2010 +0200 + + renamed scripts filenames + +Author: Caner Candan +Date: Thu Sep 9 07:56:15 2010 +0200 + + * added some features in plot.py plotting script + +Merge: 2e43f47 56680e8 +Author: Johann Dreo +Date: Wed Sep 8 12:15:08 2010 +0200 + + Merge branch 'mo-1.3' of git:do into mo-1.3 + +Author: Johann Dreo +Date: Wed Sep 8 12:14:15 2010 +0200 + + bounder on uniform distribution that can handle different bounds on several dimensions + +Author: Caner CANDAN +Date: Tue Sep 7 15:36:16 2010 +0200 + + * fixed bad using of method moNeighbor< EOT >::init( EOT& ) + Author: Johann Dreo Date: Mon Sep 6 12:05:13 2010 +0200 @@ -109,6 +1271,16 @@ Date: Mon Sep 6 11:20:00 2010 +0200 use eo::log instead of cout +Author: Johann Dreo +Date: Mon Sep 6 10:43:34 2010 +0200 + + no more dummy bounder + +Author: Johann Dreo +Date: Mon Sep 6 10:43:07 2010 +0200 + + constructors for passing the bounder to super class + Author: Johann Dreo Date: Mon Sep 6 00:04:37 2010 +0200 @@ -124,6 +1296,21 @@ Date: Sun Sep 5 23:42:58 2010 +0200 use eo::log instead of cout +Author: Johann Dreo +Date: Sat Sep 4 23:07:37 2010 +0200 + + some MO types replacement + +Author: Johann Dreo +Date: Fri Sep 3 18:32:27 2010 +0200 + + switch to new MO 1.3 classes and interface + +Author: Johann Dreo +Date: Fri Sep 3 15:55:28 2010 +0200 + + Patch from Karima.Boufaras@inria.fr: compilation wth CUDACC + Author: nojhan Date: Fri Sep 3 09:19:23 2010 +0200 @@ -155,11 +1342,27 @@ Date: Wed Sep 1 12:01:42 2010 +0200 eo::log: added the parameter -o in order to define a log file + removed some warning messages at compile time +Merge: 25bb766 13b9b62 +Author: Caner Candan +Date: Wed Sep 1 10:33:42 2010 +0200 + + Merge branch 'master' of ssh://localhost:8007/do + +Author: Caner Candan +Date: Tue Aug 31 19:29:05 2010 +0200 + + added temporary population sorting + Author: Caner Candan Date: Tue Aug 31 19:26:51 2010 +0200 * added some useful comments in eoLogger class +Author: Caner Candan +Date: Tue Aug 31 17:16:48 2010 +0200 + + * main.cpp: removed useless comments * src/do: added some lines to make detectable language file * doEDASA.h: added some comments + Author: Caner Candan Date: Tue Aug 31 16:39:21 2010 +0200 @@ -266,11 +1469,72 @@ Date: Mon Aug 30 22:42:42 2010 +0200 no ; at the end of the line +Author: Caner Candan +Date: Mon Aug 30 16:20:55 2010 +0200 + + fixed a bug with using of replacor, it didnt reduce the fitness + Author: nojhan Date: Sat Aug 28 12:30:37 2010 +0200 openhatch button, supposed to facilitate the involvement of new contributors +Merge: 74b23dd 799a8f0 +Author: Caner Candan +Date: Thu Aug 26 19:54:05 2010 +0200 + + Merge branch 'master' of candan.fr:do + +Author: Caner Candan +Date: Thu Aug 26 19:31:30 2010 +0200 + + ... + +Author: Caner Candan +Date: Wed Aug 25 19:15:32 2010 +0200 + + * removed rho parameter and replaced it by popsize + +Author: Caner Candan +Date: Tue Aug 24 18:40:49 2010 +0200 + + + script to plot on ggobi + +Author: Caner Candan +Date: Tue Aug 24 11:23:55 2010 +0200 + + * LICENSE + +Author: Caner Candan +Date: Tue Aug 24 11:22:06 2010 +0200 + + * fixed remove command issue + +Author: Caner Candan +Date: Tue Aug 24 11:19:31 2010 +0200 + + * pkg-config updated + cmake file + +Author: Caner Candan +Date: Tue Aug 24 10:26:36 2010 +0200 + + + lib utils + +Author: Caner Candan +Date: Mon Aug 23 18:03:44 2010 +0200 + + + multiplot with gnuplot + +Author: Caner Candan +Date: Mon Aug 23 16:14:02 2010 +0200 + + a C header include missed + +Author: Caner Candan +Date: Mon Aug 23 15:56:58 2010 +0200 + + + plot populations by generation - removed dump from doEDASA + Author: nojhan Date: Thu Aug 19 22:04:01 2010 +0200 @@ -286,6 +1550,31 @@ Date: Thu Aug 19 20:38:19 2010 +0200 bugfix #2054922: using base_const_iterator::node; +Author: Caner Candan +Date: Wed Aug 18 19:13:38 2010 +0200 + + added a FIXME + +Author: Caner Candan +Date: Wed Aug 18 18:39:58 2010 +0200 + + * cma-sa name has been replace by eda-sa in the project + +Author: Caner Candan +Date: Wed Aug 18 18:24:16 2010 +0200 + + - useless comments and files removed + +Author: Caner Candan +Date: Wed Aug 18 18:23:01 2010 +0200 + + - useless comments and files removed + +Author: Caner Candan +Date: Wed Aug 18 18:22:28 2010 +0200 + + - useless comments and files removed + Author: Caner CANDAN Date: Wed Aug 18 17:30:11 2010 +0200 @@ -301,12 +1590,22 @@ Date: Wed Aug 18 17:06:16 2010 +0200 + cpack configuration in order to generate packaging files, to make it easier use the script package_deb and package_rpm +Author: Caner Candan +Date: Wed Aug 18 13:37:17 2010 +0200 + + - some useless comments + authors in files header + Merge: 0a37f66 6ec3fc5 Author: Caner CANDAN Date: Wed Aug 18 12:16:13 2010 +0200 Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev +Author: Caner Candan +Date: Tue Aug 17 17:44:53 2010 +0200 + + bug fixed + Author: Johann Dreo Date: Tue Aug 17 15:11:18 2010 +0200 @@ -332,17 +1631,76 @@ Date: Tue Aug 17 14:56:33 2010 +0200 use eo::log ; warning when returns 0 +Author: Caner Candan +Date: Mon Aug 16 15:38:39 2010 +0200 + + issue to fix + +Author: Caner Candan +Date: Mon Aug 16 11:45:43 2010 +0200 + + added L(i,i) = sqrt( abs(V(i,i) - sum) ) but the issue still exists + +Author: Caner Candan +Date: Mon Aug 16 11:30:06 2010 +0200 + + * added the eo features Continue/CheckOut/Stat to DO in order to dump distribution parameters and to have compatibility with eoMonitor/eoUpdater classes + +Author: Caner Candan +Date: Mon Aug 16 07:52:30 2010 +0200 + + +Author: Caner Candan +Date: Fri Aug 6 10:24:45 2010 +0200 + + added doNormalMono + +Author: Caner Candan +Date: Fri Aug 6 10:19:50 2010 +0200 + + replace doNormal by doNormalMulti + +Merge: f66efcb 36ec42d +Author: Caner Candan +Date: Fri Aug 6 09:50:58 2010 +0200 + + merge + Merge: 9f4c073 68a03aa Author: Caner CANDAN Date: Wed Aug 4 14:10:57 2010 +0200 Merge branch 'yaml_load_and_save' of ssh://localhost:9001/gitroot/eodev/eodev +Author: Caner Candan +Date: Wed Aug 4 14:05:42 2010 +0200 + + * changed some comments sentences + Author: Caner CANDAN Date: Wed Aug 4 13:47:51 2010 +0200 + feature eoSIGContinue: Continuator can catch user signals + feature eoLogger: flexible logging system for eo +Author: Caner Candan +Date: Wed Aug 4 13:05:28 2010 +0200 + + +Author: Caner Candan +Date: Tue Aug 3 18:54:41 2010 +0200 + + * cholesky + +Author: Caner Candan +Date: Tue Aug 3 10:35:25 2010 +0200 + + - doDistribParams + +Author: Caner Candan +Date: Tue Aug 3 10:26:15 2010 +0200 + + + some useful files added + Author: Johann Dreo Date: Mon Aug 2 17:07:32 2010 +0200 @@ -393,6 +1751,86 @@ Date: Thu Jul 29 14:28:05 2010 +0200 no more CVSROOT +Author: Caner Candan +Date: Thu Jul 29 11:22:10 2010 +0200 + + * doc installable + +Author: Caner Candan +Date: Fri Jul 23 13:34:42 2010 +0200 + + + added some useful files + +Author: Caner Candan +Date: Fri Jul 23 13:24:09 2010 +0200 + + + TODO + doStats.cpp + +Author: Caner Candan +Date: Fri Jul 23 13:18:30 2010 +0200 + + * some cleaner updates + +Author: Caner Candan +Date: Tue Jul 13 13:20:07 2010 +0200 + + * doStats * doEstimatorNormal: replaced use of Variance by CoMatrix + +Author: Caner Candan +Date: Tue Jul 6 15:43:15 2010 +0200 + + ... + +Author: Caner Candan +Date: Tue Jul 6 11:25:02 2010 +0200 + + + do.pc + +Author: Caner Candan +Date: Tue Jul 6 10:15:47 2010 +0200 + + * fixed some packaging issues + +Author: Caner Candan +Date: Tue Jul 6 01:31:44 2010 +0200 + + cpack works + +Author: Caner Candan +Date: Tue Jul 6 01:27:14 2010 +0200 + + config cmake + +Author: Caner Candan +Date: Mon Jul 5 20:39:41 2010 +0200 + + + test + +Author: Caner Candan +Date: Mon Jul 5 20:31:30 2010 +0200 + + ... + +Author: Caner Candan +Date: Mon Jul 5 19:42:34 2010 +0200 + + + packaging + cmake files + +Author: Caner Candan +Date: Mon Jul 5 19:06:34 2010 +0200 + + + cma_sa application + +Author: Caner Candan +Date: Mon Jul 5 19:04:35 2010 +0200 + + + do files + +Author: Caner Candan +Date: Mon Jul 5 18:54:55 2010 +0200 + + ... + Author: paradiseo Date: Tue Jun 22 09:31:58 2010 +0000 @@ -1274,11 +2712,11 @@ Date: Thu Feb 22 08:27:32 2007 +0000 * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly uninitialized variables. - + * README.tmpl: Hint to regular Templates/README for details. - + * README: Add documentation for adding new source-files. - + * Makefile.am.src-tmpl (noinst_HEADERS): Add (MyStruct_SOURCES): Move header files from here to the new noinst_HEADERS variable. @@ -1315,7 +2753,7 @@ Date: Sun Jan 14 18:56:31 2007 +0000 for automake finding the scripts of eo itself if we run it in a embedded subdirectory. (COPYING, INSTALL): create. - + * README: State more explicitly what a "complete installation" means. Give build-instructions for moved directories. @@ -1359,9 +2797,9 @@ Author: kuepper Date: Mon Dec 18 11:17:55 2006 +0000 * TODO.html, README.html: Remove these old files. - + * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. - + * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 Author: kuepper @@ -1373,7 +2811,7 @@ Author: kuepper Date: Sun Dec 17 22:59:53 2006 +0000 * README: Better links to Templates/ - + * configure.in: Bump version to 1.0-beta2. Author: kuepper @@ -1402,11 +2840,11 @@ Date: Sat Dec 16 21:55:03 2006 +0000 * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use correct names for includes. - + * README.manual: This is a copy of the old README. - + * README: Describe the new way and setup of creating a new EO project. - + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: * configure.ac.tmpl: New files to create a standalone EO project from templates. @@ -1435,7 +2873,7 @@ Author: kuepper Date: Mon Dec 4 22:27:41 2006 +0000 * Makefile.am: Add t-eoRNG - + * t-eoRNG.cpp: Start test for random number generator. Author: kuepper @@ -1472,11 +2910,11 @@ Author: kuepper Date: Sun Dec 3 10:41:54 2006 +0000 * mainpage.html: update, add link to Niko Hansen's comparison - + * README: Add more specific note about tutorial. - + * configure.in: Bump version to 1.0-beta1 - + * tutorial/Makefile.am: Add all necessary files, including html and Templates to distribution. @@ -1517,13 +2955,13 @@ Author: kuepper Date: Sat Dec 2 10:18:57 2006 +0000 * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. - + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. - + * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this results in escape-codes (^@) to be printed at runtime and is not necessary anyway. - + * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to avoid compiler warnings. @@ -1531,7 +2969,7 @@ Author: kuepper Date: Sat Dec 2 09:39:13 2006 +0000 * eoRNG.h: Cleanup docs and document /all/ members. - + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. Author: kuepper @@ -1548,9 +2986,9 @@ Author: kuepper Date: Fri Dec 1 20:08:51 2006 +0000 * Makefile.am: Update for release-distribution. - + * Makefile.am: Add missing CMA header for distribution. - + * Makefile.am: Add missing header for distribution. Author: kuepper @@ -1603,7 +3041,7 @@ Author: kuepper Date: Thu Nov 16 12:52:46 2006 +0000 * configure.in (AC_DEBUG): add test - + * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, or NDEBUG according to its value. @@ -1613,10 +3051,10 @@ Date: Thu Nov 16 12:35:46 2006 +0000 * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise always use vecSigmaInit with default all values of sigmaInit. - + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else clause around ptParam (found or not). - + * eoParam.h (eoValueParam::setValue): Document. (eoValueParam >::setValue): Allow delimiters ',' and ';'. A plain ' ' does not work, as it is not correctly read by @@ -1973,9 +3411,9 @@ Date: Sun Oct 2 21:42:08 2005 +0000 - add a user-option for gnuplot-support - separate gnuplot-code into declaration and implementation, so we can define at EO-build-time whether to use it or not. - + Adopt code and Makefiles to above changes. - + Some minor fixes. Author: kuepper @@ -2311,7 +3749,7 @@ Date: Thu Dec 23 15:29:07 2004 +0000 Adjust code to perform to C++ standard according to gcc-3.4 interpretation... (Have not compiled/checked/changed paradisEO.) - + That is, the current code compiles with gcc-3.4 and the checks (besides t-MGE1bit) all pass. @@ -2362,7 +3800,7 @@ Date: Fri Nov 5 08:57:34 2004 +0000 easily read as a parameter) - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h Note that there is no equivalent to eoRealVectorBounds for vector of integers - + In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h The first one was already there by chance, through eoUniformInit.h @@ -2569,13 +4007,13 @@ Author: kuepper Date: Fri Sep 17 16:53:31 2004 +0000 Updated build-prcess to be completely under automake control. - + For the tutorial the old Makefiles are saved as Makefile.simple in all the respective directories. - + Use generated config.h instead of command-line passing of preprocessor flags. - + Updated support files from current automake. Author: kuepper @@ -3300,7 +4738,7 @@ Date: Sun Jan 5 16:31:50 2003 +0000 Added pyeo. Some changes needed to be made for include files and the like in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) - + eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. Author: maartenkeijzer @@ -3398,7 +4836,7 @@ Date: Wed Sep 18 12:40:46 2002 +0000 A new readFrom & printOn function for EO.h Now it CAN handle VALID/INVALID fitnesses. - + The problems are over at last Author: cahon @@ -3592,7 +5030,7 @@ Date: Mon Jun 17 04:13:45 2002 +0000 Adding the truncation selectors. 2 versions: eoTruncatedSelectOne is an eoSelectOne, and - eoTruncatedSelectMany works like an eoSelectMany (but is NOT) + eoTruncatedSelectMany works like an eoSelectMany (but is NOT) Author: jeggermo Date: Mon Jun 10 14:10:35 2002 +0000 @@ -3609,7 +5047,7 @@ Date: Mon May 13 11:31:32 2002 +0000 EO::printOn has been changed so that the printOn function will always print a valid fitness value even if the fitness is invalid - + Jeroen Author: jeggermo @@ -3827,7 +5265,7 @@ Date: Mon Apr 15 12:56:35 2002 +0000 eoParseTree printOn and readFrom functions changed for compatibility with paradisEO - + The fitness is now printed in the same way as in eoBit Author: evomarc @@ -4138,9 +5576,9 @@ Date: Mon Feb 4 14:28:00 2002 +0000 the gpsymreg code has been slightly altered to allow compilation using the Intel C++ Compiler for Linux. - + Other compilers should not be affected. - + A slightly different makefile is needed Author: jeggermo @@ -4317,7 +5755,7 @@ Date: Tue Dec 4 21:15:16 2001 +0000 some template classes and functions which did not need to be templates have been changed to normal classes and functions with hard coded typed - + This might help with M$VC++ 6.0 compatibility Author: jeggermo @@ -4537,8 +5975,8 @@ Date: Sat Nov 10 09:02:17 2001 +0000 Small modifications here and there to be MSVC++ compatible Mainly, time.h -> ctime - definition of loop index out of loops when multiply used - no typename in declaration using template typename + definition of loop index out of loops when multiply used + no typename in declaration using template typename Author: evomarc Date: Sat Nov 10 06:59:02 2001 +0000 @@ -4628,15 +6066,15 @@ Date: Sat Nov 3 22:10:11 2001 +0000 the name of the eoGpDepthInitializer class (initializer for parse_tree's has been changed to - + eoParseTreeDepthInit but backward compatibility is maintained by using a #define statement: - + #define eoGpDepthInitializer eoParseTreeDepthInit - + The initializer for strongly typed GP has been changed to eoStParseTreeDepthInit - + the gpsymreg application has been changed to use the new name Author: jeggermo @@ -4839,7 +6277,7 @@ Author: jeggermo Date: Tue Jul 17 08:58:52 2001 +0000 small documentation change for eoParseTree.h. - + added a depth initializer for strongly typed genetic programming added subtree xover for strongly typed genetic programming added branch mutation for strongly typed genetic programming @@ -4862,7 +6300,7 @@ Date: Wed Jul 4 04:44:30 2001 +0000 Adding eoPopEvalFunc, that handles evaluation globally: it receives two populations, parents and offspring, and does whatever necessary. The subclass eoPopLoopEval does the simple loop on the offspring. - + eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. @@ -4874,7 +6312,7 @@ Date: Tue Jul 3 12:56:44 2001 +0000 Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as before (it is then encapsulated into an eoPopLoopEval that does the good old loop on the offspring - or directly pass a full eoPopEvalFunc - + Small modification also in make_op_es -> keyword "none" is now recognized for one of the crossover of either object variables or stdev's @@ -4883,9 +6321,9 @@ Date: Mon Jul 2 13:31:04 2001 +0000 Changed the directory structure for gp now: eoParseTree <-- the eoParseTree class - eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) - eoParseTreeOp <-- the operators (xover and mutation) - + eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) + eoParseTreeOp <-- the operators (xover and mutation) + base documentation written for: * eoParseTree * eoGpDepthInitializer @@ -4895,9 +6333,9 @@ Date: Mon Jul 2 13:31:04 2001 +0000 * eoExpansionMutation * eoCollapseSubtreeMutation * eoHoistMutation - + I also created a group ParseTree which contains all classes related to eoParseTree - + eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp Author: jeggermo @@ -4978,16 +6416,16 @@ Author: jeggermo Date: Thu Jun 28 14:03:59 2001 +0000 new Mutation operators for eoParseTree in src/gp/eoGpMutate.h - + a symbolic regression example program added to the app-dir - + configure.in and Makefile(s).am changed Author: jeggermo Date: Thu Jun 28 13:55:14 2001 +0000 Additional mutation operators for eoParseTree - + * Point Mutation * Expansion Mutation * Collapse Subtree Mutation @@ -5195,7 +6633,7 @@ Date: Wed May 2 10:42:32 2001 +0000 src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover src/es/make_XXX_es.h for user-input test/t-eoEsAll.cpp to test - + However, an old bug appeared: className was not const in eoGenOp (and derived classes) so I had to change that throughtout the hierarchy @@ -5212,7 +6650,7 @@ Date: Mon Apr 30 13:24:42 2001 +0000 Changed the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) - + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain a copy into each representation dir!). @@ -5224,7 +6662,7 @@ Date: Mon Apr 30 13:01:07 2001 +0000 Changed the interface of make_genotype - now templatized by the EOT and not the fitness - this is mandatory for ES genoptypes as it allows to choose the type of gentype at run-time (from existing types, of course!) - + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain a copy into each representation dir!). @@ -5427,7 +6865,7 @@ Date: Wed Apr 4 03:47:33 2001 +0000 Added the signal handling - see eoCtrlCContinue.h I've disabled it in case of MSC as I don't know if this works there ... - + Also added a couple of "virtual" in the ga dir Author: evomarc @@ -5455,7 +6893,7 @@ Date: Wed Mar 28 09:00:54 2001 +0000 FDCStat and FileSnapshot: better error messageing Scalar fitness: is now a vector of doubles exercise3.1 added gnuplot again - + Don't know about eoCombinedContinue Author: evomarc @@ -5646,7 +7084,7 @@ Author: maartenkeijzer Date: Mon Mar 12 16:00:58 2001 +0000 EO: added overloaded printing of fitness (for vectors and pairs) - + Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth Author: maartenkeijzer @@ -5658,12 +7096,12 @@ Author: maartenkeijzer Date: Sat Mar 10 14:02:23 2001 +0000 Changed the populator to be a) more efficient and b) more useable - + It is no longer derived from eoPop, it now gets a destination population. This saves a lot of copying. The semantics has changed a little as well. It is now an _infinite_ iterator. operator++ will *not* dispense new individuals, but will merely stay at the end. To get a new indy, use operator*() as before. - + eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring eoGeneralBreeder is changed to reflect the changes in eoPopulator eoSequentialSelect now uses setup() rather than init() @@ -5717,7 +7155,7 @@ Date: Mon Feb 19 12:23:13 2001 +0000 To be able to use the primitive std::generate function, added a set of wrappers in eoSTLFunctor.h that have the copy semantics most STL functions expect (namely pass-by-value rather then pass-by-reference). - + Updated test/Makefile.am to also test t-eoRandom Author: evomarc @@ -5736,14 +7174,14 @@ Author: maartenkeijzer Date: Sat Feb 17 10:51:31 2001 +0000 eoVector is back (eoFixedLength and eoVariableLength are gone) - + Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: - + eoNormalGenerator eoUniformGenerator eoBooleanGenerator eoNegExpGenerator - + Note the suffix that are added to aid in determining what these classes do Author: evomarc @@ -5829,13 +7267,13 @@ Date: Wed Feb 14 14:09:16 2001 +0000 Author: maartenkeijzer Date: Wed Feb 14 10:35:26 2001 +0000 - + Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, without invalidating fitness. Added a set of invalidators to take over that job (see for instance eoSGA and eoSGATransform how this can transparantly used) - + Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) - + Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) and of course changed all the operators to reflect the change (and found a few that didn't @@ -5865,24 +7303,24 @@ Author: maartenkeijzer Date: Tue Feb 13 12:38:19 2001 +0000 fixed a bug: the parser now correctly parses parameters of the form - + -Pvalue - + This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply ashamed to have created such an off-by-one error. - + Marc assumed this was wanted behaviour (so that it should read: -P=value) I must admit that this is a logical conclusion, though it was merely a side-effect of the error. To not force Marc to rewrite the tutorial and his way of working with EO, I decided to make a feature out of the bug, so that now the parser will parse: - + -Pvalue -P=value - + and of course the true and blue: - + -Parameter=value - + I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) Author: maartenkeijzer @@ -5894,14 +7332,14 @@ Author: maartenkeijzer Date: Mon Feb 12 13:58:51 2001 +0000 Ok, updated the Makefile.am again to use the - + make check - + Command I picked up in the automake documentation (RTFM, you know) - + Tagged a lot of header functions in the GnuPlot files with 'inline', so they can be used from more than one sourcefile. - + Ok, now the interesting news. Started a new library libga (not to be confused with Matthew's GaLib). Here I suggest we put a fairly complete and configurable genetic algorithm. Just to see how far we can stretch ourselves and also to have @@ -5920,7 +7358,7 @@ Author: maartenkeijzer Date: Sun Feb 11 16:25:03 2001 +0000 Removed small bug in reading outside a buffer in eoParser::readFrom - + This caused the parser to crash when a simple flag of the form program -f was given. @@ -6014,8 +7452,8 @@ Date: Fri Feb 9 05:09:26 2001 +0000 I also changed - the eoQuadratic into eoQuad (as dicussed with Maarten) - the eoBin into eoBit, with more appropriate names for the "binary" - operators (that can be unary!) as no one protested when I posted on - eodev list + operators (that can be unary!) as no one protested when I posted on + eodev list Author: evomarc Date: Wed Feb 7 05:15:18 2001 +0000 @@ -6039,7 +7477,7 @@ Date: Wed Feb 7 05:04:24 2001 +0000 Added selection methods eoBestSelect always return the best individual eoSequentialSelect a selectOne version of eoDetSelect (uses an index to - return next offspring from sorted pop) + return next offspring from sorted pop) Author: evomarc Date: Thu Feb 1 05:27:36 2001 +0000 @@ -6061,7 +7499,7 @@ Date: Wed Jan 31 18:38:39 2001 +0000 every generation) which is different from the continuous monitoring (same file/plot is angemented every generation). This lead to a number of modifications in many files in utils dir - + But now we can watch on-line - fitness spreadout - FDC plots @@ -6078,7 +7516,7 @@ Date: Mon Jan 29 10:25:44 2001 +0000 Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. The former simply set values to the boundary values in case they are out The latter allows to short-cut all bound-checks when no need - + SOme day I will put this in utils, and have a eoRealBounds.cpp in the pre-compiled library @@ -6129,12 +7567,12 @@ Date: Sat Jan 27 07:43:58 2001 +0000 eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) - + To be continued by gp.h, and ... - + This has lead to some slight modifications in test file eobin and all tutorial examples files... - + I've also added in utils eoDistance, generic functor to compute distances, including also the generic Euclidian distance @@ -6145,9 +7583,9 @@ Date: Sat Jan 27 07:41:46 2001 +0000 eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) - + To be continued by gp.h, and ... - + This has lead to some slight modifications in test file eobin and all tutorial examples files... @@ -6405,7 +7843,7 @@ Date: Tue Jan 2 07:03:57 2001 +0000 permanent parameters (eoParser only holds references), and egcs did not allow to create them by reference, i.e. in the line eoValueParam & blablaParam(...); - + So now everything is done in the main_function, and 3 lines are needed to create and read every paramter (sigh ...) @@ -6483,16 +7921,16 @@ Date: Tue Dec 19 18:41:19 2000 +0000 THe big eoReplacement update: The interface for eoReplacement is now eoPop&, eoPop& (i.e. no const) and the result must be in the first argument in the end. - + Hence it is possible to do SSGA and all intermediate replacmeent procedures - + The classes derived from eoMergeReduce.h are now in a separate file The SSGA-like replcaement procedures are in eoReduceMerge.h A more general replacement can be found in eoSurviveAndDie.h (it could be made a littel more general - still open for upgrades). - + Also some accessors have been added to the eoPop (best and worse individuals) - + And include file eo has been updated Author: evomarc @@ -6630,16 +8068,16 @@ Author: evomarc Date: Mon Dec 4 06:58:43 2000 +0000 Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, - a method called lastCall is called for everything contained in that checkpoint - (stats, updaters and monitors). This can be extremely useful - - for stateSavers (see below) - - for monitoring things like rates of success of operators, where what you - are interested in is the final result only. + a method called lastCall is called for everything contained in that checkpoint + (stats, updaters and monitors). This can be extremely useful + - for stateSavers (see below) + - for monitoring things like rates of success of operators, where what you + are interested in is the final result only. Added of course a virtual method lastCall that does nothing by default in classes - eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor + eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall - so you can ask that the state is saved at final population, whatever happens. - I also added the corresponding constructor to take this into account. + so you can ask that the state is saved at final population, whatever happens. + I also added the corresponding constructor to take this into account. Author: evomarc Date: Mon Dec 4 05:55:59 2000 +0000 @@ -6822,8 +8260,8 @@ Author: evomarc Date: Tue Nov 28 06:46:37 2000 +0000 Modified the contructor: the default value for the delimiter is now " " - and I added a boolean argument to indicate whether or not we want to - overwrite an existing file with same name (default is overwrite). + and I added a boolean argument to indicate whether or not we want to + overwrite an existing file with same name (default is overwrite). Added the getFileName accessor. Author: evomarc @@ -7085,7 +8523,7 @@ Author: maartenkeijzer Date: Fri Oct 6 10:41:38 2000 +0000 Added an eoSortedStatBase for more efficient statistic calculations - + updated a few makefiles to include the html and latex docs with the distribution. @@ -7844,12 +9282,12 @@ Author: mac Date: Mon Mar 6 16:05:47 2000 +0000 Fixed bug in eoGOpSelector (missing break!) - + eoOp.h: binOp's second arg is const once more - + all dsp and dsw files were touched by msvc, but did add some stuff (which will be added to eo later) - + Hope this all works Author: mac @@ -7879,7 +9317,7 @@ Author: marc Date: Tue Feb 29 05:14:40 2000 +0000 wherease the command "cvs ci" is OK. - + Here we go: - added the virtual destructors of all classes, to suppress g++ annoying warnings when using -Wall option @@ -7930,7 +9368,7 @@ Date: Sat Feb 19 16:30:42 2000 +0000 Moved the static eoRNG rng to an extern eoRNG This external object is now defined in eoPersistent.cpp - + This should change... Author: mac From 23043a0b562ef9dc99f9c4b0fde3a340d0f3595d Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 May 2011 23:08:23 +0200 Subject: [PATCH 1771/2134] updated release protocol --- eo/CMakeLists.txt | 9 ++++----- eo/ForRelease | 20 +++++++------------- eo/eo-conf.cmake | 7 +++++++ 3 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 eo/eo-conf.cmake diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index fa789d4d6..52840cf64 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -14,12 +14,11 @@ INCLUDE(eo-conf.cmake OPTIONAL) # set the project name and other variables PROJECT(EO) -SET(PROJECT_VERSION_MAJOR 1) -SET(PROJECT_VERSION_MINOR 1) -SET(PROJECT_VERSION_PATCH 1) +#SET(PROJECT_VERSION_MAJOR 1) +#SET(PROJECT_VERSION_MINOR 1) +#SET(PROJECT_VERSION_PATCH 1) SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" CACHE STRING "Package version" FORCE) -#SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" CACHE STRING "Global version" FORCE) -SET(VERSION "1.1.1-edge" CACHE STRING "Global version" FORCE) +SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}${PROJECT_VERSION_MISC}" CACHE STRING "Global version" FORCE) SET(GLOBAL_VERSION "${VERSION}") SET(PACKAGE_BUGREPORT "eodev-help@sourceforge.net" CACHE STRING "Package bug report" FORCE) diff --git a/eo/ForRelease b/eo/ForRelease index bd09cf4f7..621ee19cc 100644 --- a/eo/ForRelease +++ b/eo/ForRelease @@ -1,19 +1,13 @@ -In order to create a new release from the current cvs sources perform the +In order to create a new release from the current repository, perform the following steps: -- Set version number in configure.in and doc/eo.cfg +- Create a branch named "eo_x.y.z" +- Set version number in eo-conf.cmake - Check/update NEWS file, set release date and version in NEWS. -- Run `make check && make dist` -- Test distribution (unpack, configure, make check) -- Tag released code in cvs, in order to allow a branch to be created at that - version if the necessity will arise later -- Put distribution files at SourceForge +- use the "archive_current.sh" script to create the source archive +- Build the packages +- Put source archive and packages files at SourceForge - Post news on SourceForge project-page - Send announcement to mailing lists -- Bump version number to next x.y.z-cvs in configure.in and doc/eo.cfg +- Bump version number to next "x.y.z-edge" in eo-conf.cmake -# Local Variables: -# coding: iso-8859-1 -# mode: text -# fill-column: 80 -# End: diff --git a/eo/eo-conf.cmake b/eo/eo-conf.cmake new file mode 100644 index 000000000..417c6b43d --- /dev/null +++ b/eo/eo-conf.cmake @@ -0,0 +1,7 @@ + +# Current version +SET(PROJECT_VERSION_MAJOR 1) +SET(PROJECT_VERSION_MINOR 2) +SET(PROJECT_VERSION_PATCH 0) +SET(PROJECT_VERSION_MISC "-edge") + From 772ad873d00487b9e1d4746e3829d1252ef1cff9 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 May 2011 23:38:56 +0200 Subject: [PATCH 1772/2134] next version is 1.3.0 --- eo/eo-conf.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/eo-conf.cmake b/eo/eo-conf.cmake index 417c6b43d..e8f285cbd 100644 --- a/eo/eo-conf.cmake +++ b/eo/eo-conf.cmake @@ -1,7 +1,7 @@ # Current version SET(PROJECT_VERSION_MAJOR 1) -SET(PROJECT_VERSION_MINOR 2) +SET(PROJECT_VERSION_MINOR 3) SET(PROJECT_VERSION_PATCH 0) SET(PROJECT_VERSION_MISC "-edge") From 10ef92ed601bc66db4c5392dcaa6df608ccc6567 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 12:00:08 +0200 Subject: [PATCH 1773/2134] * eoParserLogger.h: added editor parameters header --- eo/src/utils/eoParserLogger.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h index 48cb53ec5..5486fe138 100644 --- a/eo/src/utils/eoParserLogger.h +++ b/eo/src/utils/eoParserLogger.h @@ -1,3 +1,5 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + /* (c) Thales group, 2010 @@ -17,7 +19,7 @@ Contact: http://eodev.sourceforge.net Authors: - Johann DrĂ©o + Johann Dréo Caner Candan */ From e103f4f29e88ee6000c7610d8603c3f3fd4fe51d Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 12:06:54 +0200 Subject: [PATCH 1774/2134] * eoLogger.h: indentation --- eo/src/utils/eoLogger.h | 63 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 11b0cbeef..c9b850600 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -40,7 +40,7 @@ Caner Candan { // We are declaring first an overload of eoParser class using Logger // component. - eoParserLogger parser(ac, av); + eoParserLogger parser(ac, av); // This call is important to allow -v parameter to change user level. make_verbose(parser); @@ -98,7 +98,7 @@ Caner Candan # include "eoObject.h" -namespace eo +namespace eo { /** * Levels contents all the available levels in eoLogger @@ -117,7 +117,7 @@ namespace eo * file * this structure combined with the friend operator<< below is an easy way to select a file as output. */ - struct file + struct file { file(const std::string f); const std::string _f; @@ -127,7 +127,7 @@ namespace eo * setlevel * this structure combined with the friend operator<< below is an easy way to set a verbose level. */ - struct setlevel + struct setlevel { setlevel(const std::string v); setlevel(const Levels lvl); @@ -141,14 +141,14 @@ namespace eo * Class providing a verbose management through EO * Use of a global variable eo::log to easily use the logger like std::cout */ -class eoLogger : public eoObject, - public std::ostream +class eoLogger : public eoObject, + public std::ostream { public: eoLogger(); ~eoLogger(); - virtual std::string className() const; + virtual std::string className() const; //! Print the available levels on the standard output void printLevels() const; @@ -158,107 +158,104 @@ public: * Use this function if you want to be able to compare selected levels to a given one, like: * if( eo::log.getLevelSelected() >= eo::progress ) {...} */ - eo::Levels getLevelSelected() const { return _selectedLevel; } + inline eo::Levels getLevelSelected() const { return _selectedLevel; } /*! Returns the current level of the context * the one given when you output message with the logger */ - eo::Levels getLevelContext() const { return _contextLevel; } + inline eo::Levels getLevelContext() const { return _contextLevel; } protected: - void addLevel(std::string name, eo::Levels level); + void addLevel(std::string name, eo::Levels level); private: /** * outbuf * this class inherits from std::streambuf which is used by eoLogger to write the buffer in an output stream */ - class outbuf : public std::streambuf + class outbuf : public std::streambuf { public: - outbuf(const int& fd, - const eo::Levels& contexlvl, - const eo::Levels& selectedlvl); + outbuf(const int& fd, const eo::Levels& contexlvl, const eo::Levels& selectedlvl); protected: - virtual int overflow(int_type c); + virtual int overflow(int_type c); private: - const int& _fd; - const eo::Levels& _contextLevel; - const eo::Levels& _selectedLevel; + const int& _fd; + const eo::Levels& _contextLevel; + const eo::Levels& _selectedLevel; }; private: /** * MapLevel is the type used by the map member _levels. */ - typedef std::map MapLevel; + typedef std::map MapLevel; public: /** * operator<< used there to set a verbose mode. */ - friend eoLogger& operator<<(eoLogger&, const eo::Levels); + friend eoLogger& operator<<(eoLogger&, const eo::Levels); /** * operator<< used there to set a filename through the class file. */ - friend eoLogger& operator<<(eoLogger&, eo::file); + friend eoLogger& operator<<(eoLogger&, eo::file); /** * operator<< used there to set a verbose level through the class setlevel. */ - friend eoLogger& operator<<(eoLogger&, eo::setlevel); + friend eoLogger& operator<<(eoLogger&, eo::setlevel); /** * operator<< used there to be able to use std::cout to say that we wish to redirect back the buffer to a standard output. */ - friend eoLogger& operator<<(eoLogger&, std::ostream&); + friend eoLogger& operator<<(eoLogger&, std::ostream&); private: /** * _selectedLevel is the member storing verbose level setted by the user thanks to operator() */ - eo::Levels _selectedLevel; - eo::Levels _contextLevel; + eo::Levels _selectedLevel; + eo::Levels _contextLevel; /** * _fd in storing the file descriptor at this place we can disable easily the buffer in * changing the value at -1. It is used by operator <<. */ - int _fd; + int _fd; /** * _obuf std::ostream mandates to use a buffer. _obuf is a outbuf inheriting of std::streambuf. */ - outbuf _obuf; + outbuf _obuf; /** * _levels contains all the existing level order by position */ - MapLevel _levels; + MapLevel _levels; /** * _levelsOrder is just a list to keep the order of levels */ - std::vector _sortedLevels; + std::vector _sortedLevels; /** * _standard_io_streams */ - std::map< std::ostream*, int > _standard_io_streams; + std::map< std::ostream*, int > _standard_io_streams; }; /** @example t-eoLogger.cpp */ -namespace eo +namespace eo { /** * log is an external global variable defined to easily use a same way than std::cout to write a log. */ - extern eoLogger log; + extern eoLogger log; } - /** @} */ #endif // !eoLogger_h From 7d9151e2f4a2b9120861aed6f4e0e48ec06cc746 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 14:47:35 +0200 Subject: [PATCH 1775/2134] ticker #11 fixed: Merge eoParser and eoParserLogger --- eo/src/utils/CMakeLists.txt | 36 +++++++------- eo/src/utils/eoLogger.cpp | 85 ++++++++++++++++++++++++++------- eo/src/utils/eoLogger.h | 27 +++++++---- eo/src/utils/eoParserLogger.cpp | 80 ------------------------------- eo/src/utils/eoParserLogger.h | 64 ------------------------- 5 files changed, 103 insertions(+), 189 deletions(-) delete mode 100644 eo/src/utils/eoParserLogger.cpp delete mode 100644 eo/src/utils/eoParserLogger.h diff --git a/eo/src/utils/CMakeLists.txt b/eo/src/utils/CMakeLists.txt index 94f994d2b..010c6d418 100644 --- a/eo/src/utils/CMakeLists.txt +++ b/eo/src/utils/CMakeLists.txt @@ -12,24 +12,24 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(EOUTILS_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${EOUTILS_LIB_OUTPUT_PATH}) -SET (EOUTILS_SOURCES eoData.cpp - eoFileMonitor.cpp - eoGnuplot.cpp - eoGnuplot1DMonitor.cpp - eoGnuplot1DSnapshot.cpp - eoIntBounds.cpp - eoParser.cpp - eoRealBounds.cpp - eoRNG.cpp - eoState.cpp - eoOStreamMonitor.cpp - eoUpdater.cpp - make_help.cpp - pipecom.cpp - eoLogger.cpp - eoParserLogger.cpp - eoParallel.cpp) - +SET(EOUTILS_SOURCES + eoData.cpp + eoFileMonitor.cpp + eoGnuplot.cpp + eoGnuplot1DMonitor.cpp + eoGnuplot1DSnapshot.cpp + eoIntBounds.cpp + eoParser.cpp + eoRealBounds.cpp + eoRNG.cpp + eoState.cpp + eoOStreamMonitor.cpp + eoUpdater.cpp + make_help.cpp + pipecom.cpp + eoLogger.cpp + eoParallel.cpp + ) ADD_LIBRARY(eoutils STATIC ${EOUTILS_SOURCES}) INSTALL(TARGETS eoutils ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index b3002f46a..1a486459d 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -37,19 +37,20 @@ Authors: #include // used to define EOF #include -#include -#include -#include -#include #include "eoLogger.h" -eoLogger eo::log; +eoLogger::eoLogger() : + std::ostream(&_obuf), -eoLogger::eoLogger() - : std::ostream(&_obuf), - _selectedLevel(eo::progress), _contextLevel(eo::quiet), - _fd(2), _obuf(_fd, _contextLevel, _selectedLevel) + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) { _standard_io_streams[&std::cout] = 1; _standard_io_streams[&std::clog] = 2; @@ -71,18 +72,56 @@ eoLogger::~eoLogger() if (_fd > 2) { ::close(_fd); } } -std::string eoLogger::className() const +void eoLogger::_createParameters( eoParser& parser ) +{ + //------------------------------------------------------------------ + // we are saying to eoParser to create the parameters created above. + //------------------------------------------------------------------ + + std::string section("Logger"); + parser.processParam(_verbose, section); + parser.processParam(_printVerboseLevels, section); + parser.processParam(_output, section); + + //------------------------------------------------------------------ + + + //------------------------------------------------------------------ + // we're gonna redirect the log to the given filename if -o is used. + //------------------------------------------------------------------ + + if ( ! _output.value().empty() ) + { + eo::log << eo::file( _output.value() ); + } + + //------------------------------------------------------------------ + + + //------------------------------------------------------------------ + // // we're gonna print the list of levels if -l parameter is used. + //------------------------------------------------------------------ + + if ( _printVerboseLevels.value() ) + { + eo::log.printLevels(); + } + + //------------------------------------------------------------------ +} + +std::string eoLogger::className() const { return ("eoLogger"); } -void eoLogger::addLevel(std::string name, eo::Levels level) +void eoLogger::addLevel(std::string name, eo::Levels level) { _levels[name] = level; _sortedLevels.push_back(name); } -void eoLogger::printLevels() const +void eoLogger::printLevels() const { std::cout << "Available verbose levels:" << std::endl; @@ -95,25 +134,25 @@ void eoLogger::printLevels() const ::exit(0); } -eoLogger& operator<<(eoLogger& l, const eo::Levels lvl) +eoLogger& operator<<(eoLogger& l, const eo::Levels lvl) { l._contextLevel = lvl; return l; } -eoLogger& operator<<(eoLogger& l, eo::file f) +eoLogger& operator<<(eoLogger& l, eo::file f) { l._fd = ::open(f._f.c_str(), O_WRONLY | O_APPEND | O_CREAT, 0644); return l; } -eoLogger& operator<<(eoLogger& l, eo::setlevel v) +eoLogger& operator<<(eoLogger& l, eo::setlevel v) { l._selectedLevel = (v._lvl < 0 ? l._levels[v._v] : v._lvl); return l; } -eoLogger& operator<<(eoLogger& l, std::ostream& os) +eoLogger& operator<<(eoLogger& l, std::ostream& os) { if (l._standard_io_streams.find(&os) != l._standard_io_streams.end()) { @@ -128,7 +167,7 @@ eoLogger::outbuf::outbuf(const int& fd, : _fd(fd), _contextLevel(contexlvl), _selectedLevel(selectedlvl) {} -int eoLogger::outbuf::overflow(int_type c) +int eoLogger::outbuf::overflow(int_type c) { if (_selectedLevel >= _contextLevel) { @@ -141,7 +180,7 @@ int eoLogger::outbuf::overflow(int_type c) return c; } -namespace eo +namespace eo { file::file(const std::string f) : _f(f) @@ -155,3 +194,13 @@ namespace eo : _v(std::string("")), _lvl(lvl) {} } + +//! make_verbose gets level of verbose and sets it in eoLogger +void make_verbose(eoParser& parser) +{ + eo::log._createParameters( parser ); + + eo::log << eo::setlevel(eo::log._verbose.value()); +} + +eoLogger eo::log; diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index c9b850600..9e13e9654 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -34,13 +34,13 @@ Caner Candan \code #include #include - #include + #include int main(int ac, char** av) { // We are declaring first an overload of eoParser class using Logger // component. - eoParserLogger parser(ac, av); + eoParser parser(ac, av); // This call is important to allow -v parameter to change user level. make_verbose(parser); @@ -88,15 +88,15 @@ Caner Candan */ #ifndef eoLogger_h -# define eoLogger_h +#define eoLogger_h -# include -# include -# include -# include - -# include "eoObject.h" +#include +#include +#include +#include +#include "eoObject.h" +#include "eoParser.h" namespace eo { @@ -168,6 +168,9 @@ public: protected: void addLevel(std::string name, eo::Levels level); +private: + void _createParameters( eoParser& ); + private: /** * outbuf @@ -213,6 +216,12 @@ public: friend eoLogger& operator<<(eoLogger&, std::ostream&); private: + friend void make_verbose(eoParser&); + + eoValueParam _verbose; + eoValueParam _printVerboseLevels; + eoValueParam _output; + /** * _selectedLevel is the member storing verbose level setted by the user thanks to operator() */ diff --git a/eo/src/utils/eoParserLogger.cpp b/eo/src/utils/eoParserLogger.cpp deleted file mode 100644 index df70589ac..000000000 --- a/eo/src/utils/eoParserLogger.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - -(c) Thales group, 2010 - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation; version 2 of the license. - - This library is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this library; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Contact: http://eodev.sourceforge.net - -Authors: -Johann Dreo -Caner Candan - -*/ - -#include "eoParserLogger.h" - -eoParserLogger::eoParserLogger(unsigned _argc, char** _argv, - std::string _programDescription /*= ""*/ - , - std::string _lFileParamName /*= "param-file"*/, - char _shortHand /*= 'p'*/) - : eoParser(_argc, _argv, _programDescription, _lFileParamName, _shortHand), - _verbose("quiet", "verbose", "Set the verbose level", 'v'), - _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), - _output("", "output", "Redirect a standard output to a file", 'o') -{ - //------------------------------------------------------------------ - // we are saying to eoParser to create the parameters created above. - //------------------------------------------------------------------ - - processParam(_verbose); - processParam(_printVerboseLevels); - processParam(_output); - - //------------------------------------------------------------------ - - - //------------------------------------------------------------------ - // we're gonna redirect the log to the given filename if -o is used. - //------------------------------------------------------------------ - - if ( ! _output.value().empty() ) - { - eo::log << eo::file( _output.value() ); - } - - //------------------------------------------------------------------ - - - //------------------------------------------------------------------ - // // we're gonna print the list of levels if -l parameter is used. - //------------------------------------------------------------------ - - if ( _printVerboseLevels.value() ) - { - eo::log.printLevels(); - } - - //------------------------------------------------------------------ - -} - -eoParserLogger::~eoParserLogger() -{} - -//! make_verbose gets level of verbose and sets it in eoLogger -void make_verbose(eoParserLogger& _parser) -{ - eo::log << eo::setlevel(_parser._verbose.value()); -} diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h deleted file mode 100644 index 5486fe138..000000000 --- a/eo/src/utils/eoParserLogger.h +++ /dev/null @@ -1,64 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -/* - -(c) Thales group, 2010 - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation; version 2 of the license. - - This library is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this library; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Contact: http://eodev.sourceforge.net - -Authors: - Johann Dréo - Caner Candan -*/ - -#ifndef EO_PARSER_LOGGER_H -#define EO_PARSER_LOGGER_H - -#include "eoParser.h" -#include "eoLogger.h" - -/** - * A parser that use the advanced logging system (@see eoLogger) - * - * @ingroup Parameters - * @ingroup Logging - */ -class eoParserLogger : public eoParser -{ -public: - eoParserLogger(unsigned _argc, char** _argv, - std::string _programDescription = "", - std::string _lFileParamName = "param-file", - char _shortHand = 'p'); - ~eoParserLogger(); - -private: - friend void make_verbose(eoParserLogger&); - eoValueParam _verbose; - eoValueParam _printVerboseLevels; - eoValueParam _output; -}; - -void make_verbose(eoParserLogger&); - -#endif // !EO_PARSER_LOGGER_H - -// Local Variables: -// coding: iso-8859-1 -// mode: C++ -// c-file-offsets: ((c . 0)) -// c-file-style: "Stroustrup" -// fill-column: 80 -// End: From e2c833e23ecf434422db74b8eeed437e40b21bb2 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 14:49:42 +0200 Subject: [PATCH 1776/2134] * eoLogger: replaced _INTERIX by _WIN32 in order to use io.h header --- eo/src/utils/eoLogger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index 1a486459d..1dfcc2ea9 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -26,11 +26,11 @@ Authors: */ -#ifdef _INTERIX +#ifdef _WIN32 #include -#else // _INTERIX +#else // _WIN32 #include -#endif // ! _INTERIX +#endif // ! _WIN32 #include #include From f27b5149eea8d20b6a5ea6f9ef60916216d1145c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 14:52:24 +0200 Subject: [PATCH 1777/2134] a small update on build tutorial script file --- eo/build_gcc_linux_tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/build_gcc_linux_tutorial b/eo/build_gcc_linux_tutorial index f4168fd30..2908e875a 100755 --- a/eo/build_gcc_linux_tutorial +++ b/eo/build_gcc_linux_tutorial @@ -1,6 +1,6 @@ #!/usr/bin/env sh -mkdir release +mkdir -p release cd release cmake -DENABLE_EO_TUTORIAL=1 .. make From 83413762477b45c21817f2f80163392b6311c828 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 14:56:47 +0200 Subject: [PATCH 1778/2134] * eoLogger: replaced ssize_t to size_t fixing compatibility issue on Windows --- eo/src/utils/eoLogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index 1dfcc2ea9..391076126 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -173,7 +173,7 @@ int eoLogger::outbuf::overflow(int_type c) { if (_fd >= 0 && c != EOF) { - ssize_t num; + size_t num; num = ::write(_fd, &c, 1); } } From e8f6c5f21b51f51ba73f57ac2197078205fd9d1b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 15:28:41 +0200 Subject: [PATCH 1779/2134] * indentation, whitespace cleanup --- eo/src/apply.h | 8 ++++---- eo/src/es/CMakeLists.txt | 42 +++++++++++++++++++++------------------- eo/src/ga/CMakeLists.txt | 18 ++++++++--------- eo/src/gp/CMakeLists.txt | 1 - 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 4c09e6852..23a52245b 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -3,7 +3,7 @@ //----------------------------------------------------------------------------- // eoApply.h // (c) Maarten Keijzer 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - mak@dhi.dk + mak@dhi.dk */ //----------------------------------------------------------------------------- @@ -94,7 +94,7 @@ void omp_apply(eoUF& _proc, std::vector& _pop) //default(none) shared(_proc, _pop, size) for (size_t i = 0; i < size; ++i) { - _proc(_pop[i]); + _proc(_pop[i]); } } @@ -112,7 +112,7 @@ void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) //default(none) shared(_proc, _pop, size) for (size_t i = 0; i < size; ++i) { - _proc(_pop[i]); + _proc(_pop[i]); } } diff --git a/eo/src/es/CMakeLists.txt b/eo/src/es/CMakeLists.txt index e7b249016..9b0524130 100644 --- a/eo/src/es/CMakeLists.txt +++ b/eo/src/es/CMakeLists.txt @@ -14,26 +14,29 @@ SET(CMA_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${ES_LIB_OUTPUT_PATH}) # the same output for the two libs -SET (ES_SOURCES make_algo_scalar_es.cpp - make_algo_scalar_real.cpp - make_checkpoint_es.cpp - make_checkpoint_real.cpp - make_continue_es.cpp - make_continue_real.cpp - make_genotype_es.cpp - make_genotype_real.cpp - make_op_es.cpp - make_op_real.cpp - make_pop_es.cpp - make_pop_real.cpp - make_run_es.cpp - make_run_real.cpp) - -SET (CMA_SOURCES eig.cpp - CMAState.cpp - CMAParams.cpp) +SET(ES_SOURCES + make_algo_scalar_es.cpp + make_algo_scalar_real.cpp + make_checkpoint_es.cpp + make_checkpoint_real.cpp + make_continue_es.cpp + make_continue_real.cpp + make_genotype_es.cpp + make_genotype_real.cpp + make_op_es.cpp + make_op_real.cpp + make_pop_es.cpp + make_pop_real.cpp + make_run_es.cpp + make_run_real.cpp + ) + +SET(CMA_SOURCES + eig.cpp + CMAState.cpp + CMAParams.cpp + ) - ADD_LIBRARY(es STATIC ${ES_SOURCES}) INSTALL(TARGETS es ARCHIVE DESTINATION lib COMPONENT libraries) @@ -54,4 +57,3 @@ SET(CMA_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(cma PROPERTIES VERSION "${CMA_VERSION}") ###################################################################################### - diff --git a/eo/src/ga/CMakeLists.txt b/eo/src/ga/CMakeLists.txt index 7d048b6cf..a463735c1 100644 --- a/eo/src/ga/CMakeLists.txt +++ b/eo/src/ga/CMakeLists.txt @@ -12,14 +12,15 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(GA_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${GA_LIB_OUTPUT_PATH}) -SET (GA_SOURCES make_algo_scalar_ga.cpp - make_checkpoint_ga.cpp - make_continue_ga.cpp - make_genotype_ga.cpp - make_op_ga.cpp - make_pop_ga.cpp - make_run_ga.cpp) - +SET(GA_SOURCES + make_algo_scalar_ga.cpp + make_checkpoint_ga.cpp + make_continue_ga.cpp + make_genotype_ga.cpp + make_op_ga.cpp + make_pop_ga.cpp + make_run_ga.cpp + ) ADD_LIBRARY(ga STATIC ${GA_SOURCES}) INSTALL(TARGETS ga ARCHIVE DESTINATION lib COMPONENT libraries) @@ -35,4 +36,3 @@ SET(GA_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(ga PROPERTIES VERSION "${GA_VERSION}") ###################################################################################### - diff --git a/eo/src/gp/CMakeLists.txt b/eo/src/gp/CMakeLists.txt index c0ae8aff7..44195d5f6 100644 --- a/eo/src/gp/CMakeLists.txt +++ b/eo/src/gp/CMakeLists.txt @@ -1,3 +1,2 @@ FILE(GLOB HDRS *.h) INSTALL(FILES ${HDRS} DESTINATION include/eo/gp COMPONENT headers) - From 25f675bac2c9a9affe10c43abb406fd22c046341 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 11 May 2011 15:29:29 +0200 Subject: [PATCH 1780/2134] * eoLogger: last issues fixed --- eo/src/eo | 41 ++++++++++++++++++++--------------------- eo/src/utils/eoLogger.h | 11 +++++------ eo/test/t-eoLogger.cpp | 8 ++------ eo/test/t-openmp.cpp | 5 +---- 4 files changed, 28 insertions(+), 37 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index 18e91d601..8cebd23a0 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -1,7 +1,7 @@ //----------------------------------------------------------------------------- // eo // (c) GeNeura Team 1998 - 2000 -/* +/* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -23,7 +23,7 @@ #ifdef _MSC_VER // to avoid long name warnings #pragma warning(disable:4786) -#endif +#endif #ifndef _eo_ #define _eo_ @@ -62,7 +62,7 @@ // combinations of simple eoOps (eoMonOp and eoQuadOp) #include // didactic (mimics SGA-like variation into an eoGenOp) -// calls crossover and mutation sequentially, +// calls crossover and mutation sequentially, // with their respective mutation rates #include // its dual: crossover, mutation (and copy) - proportional choice @@ -100,7 +100,7 @@ #include #include #include -// Embedding truncation selection +// Embedding truncation selection #include // the batch selection - from an eoSelectOne @@ -165,45 +165,44 @@ // velocities #include #include -#include -#include +#include +#include #include #include #include -#include +#include // flights #include -#include +#include #include -#include -#include +#include +#include // topologies #include #include #include #include -#include -#include - -// PS algorithms -#include -#include -#include +#include +#include + +// PS algorithms +#include +#include +#include // utils #include #include #include #include -#include - -#include +#include +#include #include -#endif +#endif // Local Variables: // mode: C++ diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 9e13e9654..50369d35c 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -32,14 +32,11 @@ Caner Candan Here's an example explaning how to use eoLogger: \code - #include - #include - #include + #include int main(int ac, char** av) { - // We are declaring first an overload of eoParser class using Logger - // component. + // We are declaring the usual eoParser class eoParser parser(ac, av); // This call is important to allow -v parameter to change user level. @@ -216,7 +213,7 @@ public: friend eoLogger& operator<<(eoLogger&, std::ostream&); private: - friend void make_verbose(eoParser&); + friend void make_verbose(eoParser&); eoValueParam _verbose; eoValueParam _printVerboseLevels; @@ -257,6 +254,8 @@ private: /** @example t-eoLogger.cpp */ +void make_verbose(eoParser&); + namespace eo { /** diff --git a/eo/test/t-eoLogger.cpp b/eo/test/t-eoLogger.cpp index c087e2a22..198a88720 100644 --- a/eo/test/t-eoLogger.cpp +++ b/eo/test/t-eoLogger.cpp @@ -2,17 +2,13 @@ // t-eoLogger.cpp //----------------------------------------------------------------------------- -#include -#include -#include - #include //----------------------------------------------------------------------------- -int main(int ac, char** av) +int main(int ac, char** av) { - eoParserLogger parser(ac, av); + eoParser parser(ac, av); if (parser.userNeedsHelp()) { diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index cd3450805..a1d680876 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -32,9 +32,6 @@ Caner Candan #include #include -#include -#include - #include #include @@ -114,7 +111,7 @@ void measure( size_t p, int main(int ac, char** av) { - eoParserLogger parser(ac, av); + eoParser parser(ac, av); unsigned int popMin = parser.getORcreateParam((unsigned int)1, "popMin", "Population Min", 'p', "Evolution Engine").value(); unsigned int popStep = parser.getORcreateParam((unsigned int)1, "popStep", "Population Step", 0, "Evolution Engine").value(); From 31386576664d9184165e43090274acdfbf75f66d Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 11 May 2011 21:59:29 +0200 Subject: [PATCH 1781/2134] remove the ML warning ; add a download button --- website/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/index.html b/website/index.html index e72daad44..14417b32d 100644 --- a/website/index.html +++ b/website/index.html @@ -138,7 +138,9 @@

        EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast.

        +

        Evolutionary algorithms forms a family of algorithms inspired by the theory of evolution, that solve various problems. They evolve a set of solutions to a given problem, in order to produce the best results. @@ -175,6 +177,9 @@

        If you need immediate support or have any question, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

        + + +

        Features ⤒

        Component-based framework

        @@ -184,7 +189,6 @@

        If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in EO.

        -

        Main Features

        From be87159dc040fa57a7dc03c72bdd6351299d39f3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 12 May 2011 10:15:18 +0200 Subject: [PATCH 1782/2134] * eoDualFitness: overrided the operator equal in order to compare equality between two dual fitness --- eo/src/eoDualFitness.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 4803361fe..3b7fda0dc 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -132,7 +132,6 @@ public: return *this; } - //! Comparison that separate feasible individuals from unfeasible ones. Feasible are always better /*! * Use less as a default comparison operator @@ -160,14 +159,16 @@ public: } //! Greater: if the other is lesser than me - bool operator>( const eoDualFitness& other ) const { return other < *this; } + bool operator>( const eoDualFitness& other ) const { return other < *this; } //! Less or equal: if the other is not lesser than me - bool operator<=( const eoDualFitness& other ) const { return !(other < *this); } + bool operator<=( const eoDualFitness& other ) const { return !(other < *this); } //! Greater or equal: if the other is not greater than me - bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + //! Equal: if the other is equal to me + bool operator==(const eoDualFitness& other) const { return ( _is_feasible == other._is_feasible ) && ( _value == other._value ); } public: From 65b62e9015547783c9a04ca8559905e44d69f9db Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 12 May 2011 10:39:36 +0200 Subject: [PATCH 1783/2134] + utils/eoParserLogger.h: added deprecated class with a warning message --- eo/src/utils/eoParserLogger.h | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 eo/src/utils/eoParserLogger.h diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h new file mode 100644 index 000000000..de6f06e6a --- /dev/null +++ b/eo/src/utils/eoParserLogger.h @@ -0,0 +1,36 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Caner Candan + +*/ + +#ifndef EO_PARSER_LOGGER_H +#define EO_PARSER_LOGGER_H + +#include "eoParser.h" + +#warning "[eoParserLogger] is deprecated" + +typedef eoParser eoParserLogger; + +#endif // !EO_PARSER_LOGGER_H From 41b73f7834cf31a8722c5f72167a311891ed535d Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 13 May 2011 11:37:49 +0200 Subject: [PATCH 1784/2134] * eoEasyEA: reserving same size allocation for parents and offspring in order to forcast the swapping in replacement operator --- eo/src/eoEasyEA.h | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index eb7739699..2c7c5474c 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -78,7 +78,8 @@ template class eoEasyEA: public eoAlgo selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(dummyMerge, dummyReduce), - replace(_replace) + replace(_replace), + isFirstCall(true) {} /** Ctor taking a breed and merge, an overload of ctor to define an offspring size */ @@ -95,7 +96,8 @@ template class eoEasyEA: public eoAlgo selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(dummyMerge, dummyReduce), - replace(_replace) + replace(_replace), + isFirstCall(true) { offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. } @@ -113,7 +115,9 @@ template class eoEasyEA: public eoAlgo selectTransform (dummySelect, dummyTransform), breed (_breed), mergeReduce (dummyMerge, dummyReduce), - replace (_replace) { + replace (_replace), + isFirstCall(true) + { } */ @@ -131,7 +135,8 @@ template class eoEasyEA: public eoAlgo selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(dummyMerge, dummyReduce), - replace(_replace) + replace(_replace), + isFirstCall(true) {} @@ -149,7 +154,8 @@ template class eoEasyEA: public eoAlgo selectTransform(_select, _transform), breed(selectTransform), mergeReduce(dummyMerge, dummyReduce), - replace(_replace) + replace(_replace), + isFirstCall(true) {} /// Ctor eoBreed, eoMerge and eoReduce. @@ -166,7 +172,8 @@ template class eoEasyEA: public eoAlgo selectTransform(dummySelect, dummyTransform), breed(_breed), mergeReduce(_merge, _reduce), - replace(mergeReduce) + replace(mergeReduce), + isFirstCall(true) {} /// Ctor eoSelect, eoTransform, and eoReplacement @@ -183,7 +190,8 @@ template class eoEasyEA: public eoAlgo selectTransform(_select, _transform), breed(selectTransform), mergeReduce(dummyMerge, dummyReduce), - replace(_replace) + replace(_replace), + isFirstCall(true) {} /// Ctor eoSelect, eoTransform, eoMerge and eoReduce. @@ -201,7 +209,8 @@ template class eoEasyEA: public eoAlgo selectTransform(_select, _transform), breed(selectTransform), mergeReduce(_merge, _reduce), - replace(mergeReduce) + replace(mergeReduce), + isFirstCall(true) {} @@ -210,7 +219,13 @@ template class eoEasyEA: public eoAlgo /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { - _pop.reserve(offspring.capacity()); + if (isFirstCall) + { + size_t total_capacity = _pop.capacity() + offspring.capacity(); + _pop.reserve(total_capacity); + offspring.reserve(total_capacity); + isFirstCall = false; + } eoPop empty_pop; @@ -293,6 +308,8 @@ template class eoEasyEA: public eoAlgo eoPop offspring; + bool isFirstCall; + // Friend classes friend class eoIslandsEasyEA ; friend class eoDistEvalEasyEA ; From cdd2a0dc5fbeab02b5621f1b7b78b5d4fe4445c4 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 13 May 2011 11:53:47 +0200 Subject: [PATCH 1785/2134] * eoEPReduce: moved the vector tmPop in attribute in order to keep memory capacity and avoir allocation/deallocation at each call to this function --- eo/src/eoReduce.h | 110 +++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 51 deletions(-) diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 7cca61993..7f0c17729 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -90,81 +90,87 @@ Softer selective pressure than pure truncate template class eoEPReduce : public eoReduce { public: -typedef typename EOT::Fitness Fitness; + typedef typename EOT::Fitness Fitness; - eoEPReduce(unsigned _t_size ): - t_size(_t_size) - { - if (t_size < 2) - { - eo::log << eo::warnings << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; - t_size = 2; - } - } - - /// helper struct for comparing on std::pairs - // compares the scores - // uses the fitness if scores are equals ???? - typedef std::pair::iterator> EPpair; - struct Cmp { - bool operator()(const EPpair a, const EPpair b) const + eoEPReduce(unsigned _t_size ): + t_size(_t_size) { - if (b.first == a.first) - return (*b.second < *a.second); - return b.first < a.first; + if (t_size < 2) + { + eo::log << eo::warnings << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; + t_size = 2; + } } - }; + + /// helper struct for comparing on std::pairs + // compares the scores + // uses the fitness if scores are equals ???? + typedef std::pair::iterator> EPpair; + struct Cmp { + bool operator()(const EPpair a, const EPpair b) const + { + if (b.first == a.first) + return (*b.second < *a.second); + return b.first < a.first; + } + }; - void operator()(eoPop& _newgen, unsigned _newsize) - { - unsigned int presentSize = _newgen.size(); + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned int presentSize = _newgen.size(); - if (presentSize == _newsize) + if (presentSize == _newsize) return; if (presentSize < _newsize) - throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); std::vector scores(presentSize); for (unsigned i=0; i competitor.fitness()) - scores[i].first += 1; - else if (fit == competitor.fitness()) - scores[i].first += 0.5; - } - } + { + scores[i].second = _newgen.begin()+i; + Fitness fit = _newgen[i].fitness(); + for (unsigned itourn = 0; itourn < t_size; ++itourn) + { + const EOT & competitor = _newgen[rng.random(presentSize)]; + if (fit > competitor.fitness()) + scores[i].first += 1; + else if (fit == competitor.fitness()) + scores[i].first += 0.5; + } + } // now we have the scores typename std::vector::iterator it = scores.begin() + _newsize; std::nth_element(scores.begin(), it, scores.end(), Cmp()); // sort(scores.begin(), scores.end(), Cmp()); unsigned j; -// std::cout << "Les scores apres tri\n"; -// for (j=0; j tmPop; + // std::cout << "Les scores apres tri\n"; + // for (j=0; jsecond); + // it = scores.begin() + _newsize; + // while (it < scores.end()) + // _newgen.erase(it->second); } private: - unsigned t_size; + unsigned t_size; + eoPop tmPop; }; /** a truncate class that does not sort, but repeatidely kills the worse. @@ -220,7 +226,9 @@ public: if (oldSize < _newsize) throw std::logic_error("eoDetTournamentTruncate: Cannot truncate to a larger size!\n"); + // Now OK to erase some losers + std::cout << "oldSize - _newsize: " << oldSize - _newsize << std::endl; for (unsigned i=0; i(_newgen, t_size); From dd20cdb26c6101ffcb241884cf0fb532d37f9074 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 17 May 2011 15:47:11 +0200 Subject: [PATCH 1786/2134] install libpyeo.so in the packages, too --- eo/src/pyeo/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/pyeo/CMakeLists.txt b/eo/src/pyeo/CMakeLists.txt index ab0e0c1e6..760283a85 100644 --- a/eo/src/pyeo/CMakeLists.txt +++ b/eo/src/pyeo/CMakeLists.txt @@ -48,6 +48,7 @@ SET(EO_SOURCES # shared library ADD_LIBRARY(PyEO MODULE ${SOURCES} ${EO_SOURCES}) +INSTALL(TARGETS PyEO LIBRARY DESTINATION lib COMPONENT libraries) # python 2.5 must have pyd IF(WIN32 AND NOT CYGWIN) From efcbcdfc21313cc8093f14cf9e118d7d133c0d96 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 17 May 2011 15:59:57 +0200 Subject: [PATCH 1787/2134] same name prefix for the source archive than for the packages --- archive_current.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive_current.sh b/archive_current.sh index c1bfe3778..ff710c59e 100755 --- a/archive_current.sh +++ b/archive_current.sh @@ -1,3 +1,3 @@ today=`date --iso-8601` -git archive --format zip master > eo_${today}.zip +git archive --format zip master > EO-${today}.zip From 334f8c8da01d0d876172806bd513d2975edade4c Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 17 May 2011 16:10:37 +0200 Subject: [PATCH 1788/2134] pick updated news from the 1.2.0 branch and prepare the next version --- eo/NEWS | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index f07f9975d..f4625d6c3 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,5 +1,7 @@ -* release 1.2 (10. May. 2011) - - fixed the incremental allocation issue in the variation operator which were +* current version + +* release 1.2 (16. May. 2011) + - fixed the incremental allocation issue in variation operators which were taking too much time for big population sizes - new class eoParallel enabling parallelization in EO using OpenMP. At this time, it only concerns the evaluation operator, for advanced details go to @@ -9,6 +11,8 @@ - script installing EO manually in using symbolic links - evaluators that throw an exception if a maximum time has been reached (wallclock and CPU user time for POSIX systems), independently of the number of generations + - merged parser and parser-logger + - some bugfixes for windows systems * release 1.1 (8. Nov. 2010) - provide cmake build system, remove the old autotools one From 7fcc10e08fe31d88293c43e8f4447ed507f9e5a6 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 17 May 2011 16:57:17 +0200 Subject: [PATCH 1789/2134] reminders about where to announce stable versions --- eo/ForRelease | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/eo/ForRelease b/eo/ForRelease index 621ee19cc..290cfcb29 100644 --- a/eo/ForRelease +++ b/eo/ForRelease @@ -1,7 +1,7 @@ In order to create a new release from the current repository, perform the following steps: -- Create a branch named "eo_x.y.z" +- If necessary, create a branch named "eo_x.y.z" - Set version number in eo-conf.cmake - Check/update NEWS file, set release date and version in NEWS. - use the "archive_current.sh" script to create the source archive @@ -11,3 +11,35 @@ following steps: - Send announcement to mailing lists - Bump version number to next "x.y.z-edge" in eo-conf.cmake + +When reaching stable versions: +- prepare a message with the following template: + -----8<----- + A new version of the "Evolving Objects" framework is available. + + EO is a template-based, C++ evolutionary computation library which + helps you to write your own stochastic optimization algorithms + insanely fast. + + Learn more about EO on the official website: + http://eodev.sourceforge.net/ + + You will find the release x.y.z at the following address: + https://sourceforge.net/projects/eodev/files/eo/ + + Here is a summary of the change log: + - XXXXX + - and more… + + Do not hesitate to submit the bugs you will face: + https://sourceforge.net/apps/trac/eodev/wiki/WikiStart + + Happy evolutionary hacking. + -----8<----- +- Post the message to: + - EO news https://sourceforge.net/news/?group_id=9775 + - EO mailing list: eodev-main@lists.sourceforge.net + - ParadisEO mailing list: paradiseo-users@lists.gforge.inria.fr + - EC-digest maling list: ec-digest-l@listserv.gmu.edu + - JET mailing list: jet@inria.fr + From 6a03405806719f52276a9d6eb5f6aaad02ba5b1b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 19 May 2011 11:57:23 +0200 Subject: [PATCH 1790/2134] + package_nsis, in order to create package on windows --- eo/package_nsis.bat | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 eo/package_nsis.bat diff --git a/eo/package_nsis.bat b/eo/package_nsis.bat new file mode 100644 index 000000000..d372c4340 --- /dev/null +++ b/eo/package_nsis.bat @@ -0,0 +1,4 @@ +cd release +cpack -G NSIS +cd .. +pause From 626d4bdbadbc318a6834bf29cf5ff8876d63f463 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 26 May 2011 14:09:42 +0200 Subject: [PATCH 1791/2134] * INSTALL --- eo/INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/INSTALL b/eo/INSTALL index 25f56d4a3..6264e4cea 100644 --- a/eo/INSTALL +++ b/eo/INSTALL @@ -74,7 +74,7 @@ Or go through the following steps: 2. call CPack specifying the desired package system: cpack -G DEB 3. install the package: - sudo apt-get install EO-1.1.1-Linux.deb + sudo dpkg -i EO-1.1.1-Linux.deb Basic installation From 9d3c1cd070109ccef01f18edce89e38de440028c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 26 May 2011 14:10:00 +0200 Subject: [PATCH 1792/2134] * index.html: added a link to FAQ --- website/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/website/index.html b/website/index.html index 14417b32d..3aed1543e 100644 --- a/website/index.html +++ b/website/index.html @@ -30,6 +30,7 @@
        • Download
        • Tutorial
        • +
        • FAQ
        • API documentation
        • Project page
        • Chat with us
        • From b6fd3d1dcf12ff42aef08fb03e47322732b28cf6 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 14 Jun 2011 14:45:50 +0200 Subject: [PATCH 1793/2134] the OpenMP library should not be required for the build --- eo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 52840cf64..5b8840017 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -43,7 +43,7 @@ ENABLE_LANGUAGE(C) ### 2) Include required modules / configuration files ##################################################################################### -FIND_PACKAGE(OpenMP REQUIRED) +FIND_PACKAGE(OpenMP) IF(OPENMP_FOUND) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") From e8e2b6da34309f5ddbedc54c89df10796938a75c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 17 Jun 2011 14:26:54 +0200 Subject: [PATCH 1794/2134] * apply.h: disabled useless functions --- eo/src/apply.h | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 23a52245b..f685f8d3b 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -85,35 +85,35 @@ void apply(eoUF& _proc, std::vector& _pop) @ingroup Utilities */ -template -void omp_apply(eoUF& _proc, std::vector& _pop) -{ - size_t size = _pop.size(); -#pragma omp parallel for if(eo::parallel.isEnabled()) - //doesnot work with gcc 4.1.2 - //default(none) shared(_proc, _pop, size) - for (size_t i = 0; i < size; ++i) - { - _proc(_pop[i]); - } -} +// template +// void omp_apply(eoUF& _proc, std::vector& _pop) +// { +// size_t size = _pop.size(); +// #pragma omp parallel for if(eo::parallel.isEnabled()) +// //doesnot work with gcc 4.1.2 +// //default(none) shared(_proc, _pop, size) +// for (size_t i = 0; i < size; ++i) +// { +// _proc(_pop[i]); +// } +// } /** And now we are using the dynamic scheduling. @ingroup Utilities */ -template -void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) -{ - size_t size = _pop.size(); -#pragma omp parallel for if(eo::parallel.isEnabled()) schedule(dynamic) - //doesnot work with gcc 4.1.2 - //default(none) shared(_proc, _pop, size) - for (size_t i = 0; i < size; ++i) - { - _proc(_pop[i]); - } -} +// template +// void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) +// { +// size_t size = _pop.size(); +// #pragma omp parallel for if(eo::parallel.isEnabled()) schedule(dynamic) +// //doesnot work with gcc 4.1.2 +// //default(none) shared(_proc, _pop, size) +// for (size_t i = 0; i < size; ++i) +// { +// _proc(_pop[i]); +// } +// } #endif From 367ad7fbe5811422a44870a0c5df8b2fb8c0eb3e Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 1 Jul 2011 10:37:13 +0200 Subject: [PATCH 1795/2134] beautify the output of sections when help is called: upper case names and line padding --- eo/src/utils/eoParser.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 7150882a1..4bab23f23 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -49,7 +50,22 @@ std::ostream& printSectionHeader(std::ostream& os, std::string section) if (section == "") section = "General"; - os << '\n' << setw(10) << "###### " << setw(20) << section << setw(10) << " ######\n"; + // convert each character to upper case + std::transform( section.begin(), section.end(), section.begin(), ::toupper); + + // the formating with setfill would not permits to add this extra space as + // one more call to stream operator, thus it is inserted here + section += ' '; + + // pretty print so as to print the section, followed by as many # as + // necessary to fill the line until 80 characters + os << std::endl + << "### " + << std::left + << std::setfill('#') + << std::setw(80) // TODO do not hard code the width of the line + << section + << std::endl; return os; } @@ -334,8 +350,8 @@ void eoParser::printHelp(ostream& os) os << "--" <second->longName() <<":\t" << p->second->description() ; - os << "\n" << setw(20) << ( (p->second->required())?"Required":"Optional" ); - os <<". By default: "<second->defValue() << '\n'; + os << " (" << ( (p->second->required())?"Required":"Optional" ); + os <<", default: "<< p->second->defValue() << ')' << std::endl; } // for p os << "\n@param_file \t defines a file where the parameters are stored\n"; From 0ce639e13a14377e94ee05a7ac7adaa08eb1a733 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 1 Jul 2011 10:52:44 +0200 Subject: [PATCH 1796/2134] beautify the output of sections: no caps in parenthesis and space before colon --- eo/src/utils/eoParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 4bab23f23..97c4b3d5a 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -347,10 +347,10 @@ void eoParser::printHelp(ostream& os) if (p->second->shortName()) os << "-" << p->second->shortName() << ", "; - os << "--" <second->longName() <<":\t" + os << "--" <second->longName() <<" :\t" << p->second->description() ; - os << " (" << ( (p->second->required())?"Required":"Optional" ); + os << " (" << ( (p->second->required())?"required":"optional" ); os <<", default: "<< p->second->defValue() << ')' << std::endl; } // for p From 8567bc5d28cc66b40e3cc6e45a35a5c1abba2010 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jul 2011 11:10:25 +0200 Subject: [PATCH 1797/2134] * eoLogger: overidded ctor in order to define a file to dump --- eo/src/utils/eoLogger.cpp | 50 +++++++++++++++++++++++++++------------ eo/src/utils/eoLogger.h | 19 +++++++++++++++ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index 391076126..e478ba093 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -21,8 +21,8 @@ Contact: http://eodev.sourceforge.net Authors: - Johann DrĂ©o - Caner Candan +Johann DrĂ©o +Caner Candan */ @@ -40,17 +40,7 @@ Authors: #include "eoLogger.h" -eoLogger::eoLogger() : - std::ostream(&_obuf), - - _verbose("quiet", "verbose", "Set the verbose level", 'v'), - _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), - _output("", "output", "Redirect a standard output to a file", 'o'), - - _selectedLevel(eo::progress), - _contextLevel(eo::quiet), - _fd(2), - _obuf(_fd, _contextLevel, _selectedLevel) +void eoLogger::_init() { _standard_io_streams[&std::cout] = 1; _standard_io_streams[&std::clog] = 2; @@ -67,6 +57,37 @@ eoLogger::eoLogger() : addLevel("xdebug", eo::xdebug); } +eoLogger::eoLogger() : + std::ostream(&_obuf), + + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) +{ + _init(); +} + +eoLogger::eoLogger(eo::file file) : + std::ostream(&_obuf), + + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) +{ + _init(); + *this << file; +} + eoLogger::~eoLogger() { if (_fd > 2) { ::close(_fd); } @@ -99,7 +120,7 @@ void eoLogger::_createParameters( eoParser& parser ) //------------------------------------------------------------------ - // // we're gonna print the list of levels if -l parameter is used. + // we're gonna print the list of levels if -l parameter is used. //------------------------------------------------------------------ if ( _printVerboseLevels.value() ) @@ -195,7 +216,6 @@ namespace eo {} } -//! make_verbose gets level of verbose and sets it in eoLogger void make_verbose(eoParser& parser) { eo::log._createParameters( parser ); diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 50369d35c..e5faf8f34 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -142,12 +142,20 @@ class eoLogger : public eoObject, public std::ostream { public: + //! default ctor eoLogger(); + + //! overidded ctor in order to instanciate a logger with a file define in parameter + eoLogger(eo::file file); + + //! dtor ~eoLogger(); + //! common function for all eo objects virtual std::string className() const; //! Print the available levels on the standard output + //! enablable with the option -l void printLevels() const; /*! Returns the selected levels, that is the one asked by the user @@ -163,11 +171,16 @@ public: inline eo::Levels getLevelContext() const { return _contextLevel; } protected: + //! in order to add a level of verbosity void addLevel(std::string name, eo::Levels level); private: + //! used by the function make_verbose in order to add options to specify the verbose level void _createParameters( eoParser& ); + //! used by the set of ctors to initiate some useful variables + void _init(); + private: /** * outbuf @@ -195,21 +208,26 @@ public: /** * operator<< used there to set a verbose mode. */ + //! in order to use stream style to define the context verbose level where the following logs will be saved friend eoLogger& operator<<(eoLogger&, const eo::Levels); /** * operator<< used there to set a filename through the class file. */ + //! in order to use stream style to define a file to dump instead the standart output friend eoLogger& operator<<(eoLogger&, eo::file); /** * operator<< used there to set a verbose level through the class setlevel. */ + //! in order to use stream style to define manually the verbose level instead using options friend eoLogger& operator<<(eoLogger&, eo::setlevel); /** * operator<< used there to be able to use std::cout to say that we wish to redirect back the buffer to a standard output. */ + //! in order to use stream style to go back to a standart output defined by STL + //! and to get retro-compatibility friend eoLogger& operator<<(eoLogger&, std::ostream&); private: @@ -254,6 +272,7 @@ private: /** @example t-eoLogger.cpp */ +//! make_verbose gets level of verbose and sets it in eoLogger void make_verbose(eoParser&); namespace eo From d47c3345969fdf364cfaf24acee503f5f2a566f3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 26 Jul 2011 13:33:34 +0200 Subject: [PATCH 1798/2134] * eo website W3C compliant + integrated mini-jappix to connect to XMPP from website --- website/index.html | 713 +++++++++++++++++++++++---------------------- 1 file changed, 361 insertions(+), 352 deletions(-) diff --git a/website/index.html b/website/index.html index 3aed1543e..b3154a83c 100644 --- a/website/index.html +++ b/website/index.html @@ -1,33 +1,44 @@ + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - - - - - + + + + + + + - Evolving Objects (EO): Evolutionary Computation Framework - + Evolving Objects (EO): Evolutionary Computation Framework - + + -
          - Evolving Objects logo -
        -
    -
    + + -
    +
    -

    Evolving Objects (EO): an Evolutionary Computation Framework

    +

    Evolving Objects (EO): an Evolutionary Computation Framework

    -

    EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast.

    +

    EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast.

    - + -

    Evolutionary algorithms forms a family of algorithms inspired by the theory of evolution, that solve various problems. - They evolve a set of solutions to a given problem, in order to produce the best results. - These are stochastic algorithms, because they iteratively use random processes. - The vast majority of these methods are used to solve optimization problems, and may be also called "metaheuristics". - They are also ranked among computational intelligence methods, a domain close to artificial intelligence. -

    +

    Evolutionary algorithms forms a family of algorithms inspired by the theory of evolution, that solve various problems. + They evolve a set of solutions to a given problem, in order to produce the best results. + These are stochastic algorithms, because they iteratively use random processes. + The vast majority of these methods are used to solve optimization problems, and may be also called "metaheuristics". + They are also ranked among computational intelligence methods, a domain close to artificial intelligence. +

    -

    With the help of EO, you can easily design evolutionary algorithms that will find solutions to virtually all kind of hard optimization problems, from continuous to combinatorial ones.

    +

    With the help of EO, you can easily design evolutionary algorithms that will find solutions to virtually all kind of hard optimization problems, from continuous to combinatorial ones.

    -

    If you want to know how to help us to improve EO, the easiest way is to click on the following button: +

    If you want to know how to help us to improve EO, the easiest way is to click on the following button: - - - - - +

    + + + +
    - + - + - -
    -
    -

    + + +
    +
    +

    -

    If you need immediate support or have any question, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

    +

    If you need immediate support or have any question, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

    - + -

    Features ⤒

    +

    Features ⤒

    -

    Component-based framework

    +

    Component-based framework

    -

    Designing an algorithm with EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks.

    -

    If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution).

    -

    If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in EO.

    -

    +

    Designing an algorithm with EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks.

    +

    If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution).

    +

    If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in EO.

    +

    -

    Main Features

    +

    Main Features

    - + - +
    -
    Examples of problems that you can solve with the help of EO:
    @@ -205,345 +217,342 @@
    + -
      +
      • Flexible design that permits to easily create virtually any algorithm
      • Solution representation for continuous and combinatorial problems: -
          -
        • binary-strings,
        • -
        • permutations,
        • -
        • vectors,
        • -
        • easily write your own,
        • -
        • …
        • -
        +
          +
        • binary-strings,
        • +
        • permutations,
        • +
        • vectors,
        • +
        • easily write your own,
        • +
        • …
        • +
      • Several algorithm paradigms: -
          -
        • evolution strategies,
        • -
        • genetic algorithms,
        • -
        • estimation of distribution,
        • -
        • particle swarm optimization
        • -
        • …
        • -
        +
          +
        • evolution strategies,
        • +
        • genetic algorithms,
        • +
        • estimation of distribution,
        • +
        • particle swarm optimization
        • +
        • …
        • +
      • Many selection and replacement operators: -
          -
        • rank-based,
        • -
        • deterministic or stochastic tournaments,
        • -
        • roulette,
        • -
        • elitism,
        • -
        • …
        • -
        +
          +
        • rank-based,
        • +
        • deterministic or stochastic tournaments,
        • +
        • roulette,
        • +
        • elitism,
        • +
        • …
        • +
      • Ready-to-use variations operators: -
          -
        • uniform initializer, -
        • gaussian mutation, -
        • subtree crossover, -
        • …
        • -
        +
          +
        • uniform initializer,
        • +
        • gaussian mutation,
        • +
        • subtree crossover,
        • +
        • …
        • +
      • Easy combination of several operators: -
          -
        • proportional combination,
        • -
        • sequential call,
        • -
        • …
        • -
        +
          +
        • proportional combination,
        • +
        • sequential call,
        • +
        • …
        • +
      • Portable and human-readable parameter files
      • Suspend and load population from files
      • Versatile checkpointing and logging: -
          -
        • graphical display,
        • -
        • file dump,
        • -
        • various statistics,
        • -
        • signal catching,
        • -
        • …
        • -
        +
          +
        • graphical display,
        • +
        • file dump,
        • +
        • various statistics,
        • +
        • signal catching,
        • +
        • …
        • +
      • Mersenne Twister random number generator (and various distributions)
      • No useless computation (sparing fitness call, functor-based calls)
      • Fast running speed, thanks to C++
      • And more!
      • -
      +
    -

    Portability

    -

    EO should work on Windows and any Un*x-like operating system with a +

    Portability

    +

    EO should work on Windows and any Un*x-like operating system with a standard-conforming C++ development system.

    -

    Recent versions of EO have been tested on the following platforms: -

    +

    Recent versions of EO have been tested on the following platforms: +

    -
      -
    • Linux x86 with GCC 3.x and 4.x
    • -
    • Linux x86_64 with GCC 3.x and GCC 4.x
    • -
    • MacOS X/Darwin PowerPC with GCC 3.x
    • -
    • MacOS X/Darwin x86 with GCC 4.x
    • -
    • Microsoft Windows using Cygwin's GCC 3.x (cygming special). -
    • Microsoft Windows using Visual Studio 2003/2005; projects files +
        +
      • Linux x86 with GCC 3.x and 4.x
      • +
      • Linux x86_64 with GCC 3.x and GCC 4.x
      • +
      • MacOS X/Darwin PowerPC with GCC 3.x
      • +
      • MacOS X/Darwin x86 with GCC 4.x
      • +
      • Microsoft Windows using Cygwin's GCC 3.x (cygming special).
      • +
      • Microsoft Windows using Visual Studio 2003/2005; projects files are provided.
      • -
      • Solaris SPARC with GCC 3.x
      • -
      • Solaris x86 with GCC 3.x
      • -
      +
    • Solaris SPARC with GCC 3.x
    • +
    • Solaris x86 with GCC 3.x
    • +
    -

    Recent versions of EO uses the CMake portable build system, that permits to easily generate a build chain for your environment.

    +

    Recent versions of EO uses the CMake portable build system, that permits to easily generate a build chain for your environment.

    -

    If you have tested EO on a system not listed here, please let - us know.

    +

    If you have tested EO on a system not listed here, please let + us know.

    -

    If you are working on a system with an older C++ compiler there +

    If you are working on a system with an older C++ compiler there is a good chance that eo-0.9.3z.1 works. It is tested on Linux with gcc-2.9x and several systems (IRIX, Solaris) with egcs.

    -

    Presentations

    +

    Presentations

    -

    A functional and "philosophical" overview of EO was presented at EA'01 conference. - You can download the paper +

    A functional and "philosophical" overview of EO was presented at EA'01 conference. + You can download the paper or the - slides, or browse them right here:

    + slides, or browse them right here:

    - + -

    You can also read this - PowerPoint presentation, that shows the EO philosophy. +

    You can also read this + PowerPoint presentation, that shows the EO philosophy. It includes a Visual Basic macro for evolving objects in Visual Basic for Applications.

    -

    EO is described in the following scientific article:
    -

    M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, - "Evolving +

    EO is described in the following scientific article:
    +

    M. Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer, + "Evolving objects: A general purpose evolutionary computation library", Artificial Evolution, 2310, 829--888 (2002).
    -

    +

    -

    - -@Article{Keijzer2001,
    -  title =     "Evolving Objects: A General Purpose Evolutionary Computation Library ",
    -  author =    "Maarten Keijzer and J. J. Merelo and G. Romero and M. Schoenauer",
    -  journal =   "Artificial Evolution",
    -  year =      "2002",
    -  volume =    "2310",
    -  pages =     "829--888",
    -  keywords =  "genetic algorithms, genetic programming, evolutionary computation, metaheuristic, computational intelligence, optimization",
    -  URL =       "http://www.lri.fr/~marc/EO/EO-EA01.ps.gz",
    -  size =      "12 pages",
    -  abstract =  "This paper presents the evolving objects library
    -                 (EOlib), an object-oriented framework for evolutionary
    -                 computation (EC) that aims to provide a flexible set of
    -                 classes to build EC applications. EOlib design
    -                 objective is to be able to evolve any object in which
    -                 fitness makes sense.",
    -}
    -
    -
    -

    +

    + + @Article{Keijzer2001,
    +   title =     "Evolving Objects: A General Purpose Evolutionary Computation Library ",
    +   author =    "Maarten Keijzer and J. J. Merelo and G. Romero and M. Schoenauer",
    +   journal =   "Artificial Evolution",
    +   year =      "2002",
    +   volume =    "2310",
    +   pages =     "829--888",
    +   keywords =  "genetic algorithms, genetic programming, evolutionary computation, metaheuristic, computational intelligence, optimization",
    +   URL =       "http://www.lri.fr/~marc/EO/EO-EA01.ps.gz",
    +   size =      "12 pages",
    +   abstract =  "This paper presents the evolving objects library
    +                  (EOlib), an object-oriented framework for evolutionary
    +                  computation (EC) that aims to provide a flexible set of
    +                  classes to build EC applications. EOlib design
    +                  objective is to be able to evolve any object in which
    +                  fitness makes sense.",
    + }
    +
    +
    +

    -

    Here is a list of some known publications that used EO:

    -
    +
    - - - + + + - + From d39cafe6d6f484cddecb76e4b8e50ccdb63d7b04 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 26 Jul 2011 13:35:01 +0200 Subject: [PATCH 1799/2134] * lightblue.css: indented --- website/lightblue.css | 72 +++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/website/lightblue.css b/website/lightblue.css index e96546fb7..b6802a0e7 100644 --- a/website/lightblue.css +++ b/website/lightblue.css @@ -1,14 +1,14 @@ -/*************************************************************************** -* * -* contented3 - An open source xhtml/css website template by Contented * -* Designs. You're free to modify it and use it for any purpose without * -* cost or obligation. We'd prefer that you leave the link to our website * -* in the footer but it's not required. * -* * -* If you have comments or questions, please contact us at * -* http://www.ContentedDesigns.com. Thanks! * -* * -***************************************************************************/ +/**************************************************************************** + * * + * contented3 - An open source xhtml/css website template by Contented * + * Designs. You're free to modify it and use it for any purpose without * + * cost or obligation. We'd prefer that you leave the link to our website * + * in the footer but it's not required. * + * * + * If you have comments or questions, please contact us at * + * http://www.ContentedDesigns.com. Thanks! * + * * + ***************************************************************************/ * { padding:0px; @@ -111,18 +111,18 @@ table { } a { - color: #3366CC; - /*background-color: #FFFFFF;*/ - font-weight: normal; - text-decoration: none; + color: #3366CC; + /*background-color: #FFFFFF;*/ + font-weight: normal; + text-decoration: none; outline:none; } a:hover { - color: #0033CC; - /*background-color: #FFFFFF;*/ - font-weight: normal; - text-decoration: underline; + color: #0033CC; + /*background-color: #FFFFFF;*/ + font-weight: normal; + text-decoration: underline; } @@ -133,12 +133,12 @@ a:hover { } #title { - color:#3366CC; - /*background-color:#FFFFFF;*/ - font-size:3em; - font-weight:bold; - margin:0px 0px 10px 0px; - float:left; + color:#3366CC; + /*background-color:#FFFFFF;*/ + font-size:3em; + font-weight:bold; + margin:0px 0px 10px 0px; + float:left; } #slogan { @@ -170,7 +170,7 @@ ul#menu { margin: 0; padding: 0; list-style: none; - /*width:650px;*/ +/*width:650px;*/ } ul#menu li { @@ -201,7 +201,7 @@ ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } padding:1em; margin:1em; /*width:650px; - float:left;*/ + float:left;*/ clear:left; } @@ -217,16 +217,16 @@ ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } } #foot a { - color:#3366CC; - background-color:#FFFFFF; - text-decoration: none; + color:#3366CC; + background-color:#FFFFFF; + text-decoration: none; } #foot a:hover { - color:#0033CC; - background-color:#FFFFFF; - font-weight: normal; - text-decoration: underline; + color:#0033CC; + background-color:#FFFFFF; + font-weight: normal; + text-decoration: underline; } #copyright { @@ -248,10 +248,10 @@ ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } font-weight:bold; } - .table_form_label { +.table_form_label { text-align:right; padding-right:1em; - } +} .table_form_submit { text-align:center; From 18fb39be7647e720651f77e22df6b8806091854d Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 26 Jul 2011 17:45:31 +0200 Subject: [PATCH 1800/2134] add ML as favorite contact medium, download button before help --- website/index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/index.html b/website/index.html index 3aed1543e..39b2185f0 100644 --- a/website/index.html +++ b/website/index.html @@ -33,7 +33,8 @@
  • FAQ
  • API documentation
  • Project page
  • -
  • Chat with us
  • +
  • Contact us
  • +
  • Submit a bug
  • see also ParadisEO
  • @@ -152,6 +153,13 @@

    With the help of EO, you can easily design evolutionary algorithms that will find solutions to virtually all kind of hard optimization problems, from continuous to combinatorial ones.

    + + +

    If you need immediate support or have any question, the best way to get + answers is to subscribe to the mailing list and send your email to eodev-main@lists.sourceforge.net

    + +

    Alternatively, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

    +

    If you want to know how to help us to improve EO, the easiest way is to click on the following button:

    @@ -176,9 +184,7 @@

    -

    If you need immediate support or have any question, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

    -

    Features ⤒

    From 61aa1807dc7788b47c3096d98378356f5bd878b8 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 26 Jul 2011 17:53:52 +0200 Subject: [PATCH 1801/2134] diagram of EO+ParadisEO --- website/EO_star.svg | 2647 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2647 insertions(+) create mode 100644 website/EO_star.svg diff --git a/website/EO_star.svg b/website/EO_star.svg new file mode 100644 index 000000000..30bf3699a --- /dev/null +++ b/website/EO_star.svg @@ -0,0 +1,2647 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + 2007-04-02 + + + Johann "nojhan" Dréo + + + i: initialization, f(X): evaluation, ?: stopping criterion, Se: selection, Cr: cross-over, Mu: mutation, Re: replacement, X*: optimu + + + + + + + + + + + + image/svg+xml + + Evolving Object + 2010-11-02 + + + nojhan + + + en-GB + + An evolutionary algorithmas seen from the evolving objects framework: an interative algorithm that manipulates individuals with the help of operators. Implementing an algorithm consists in assembling operator instances, just as building something with Lego blocks. + +In green are the operators that are ready to use within EO, in yellow the operators that you may need to implement and in red the evaluator, that you should implement. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EDO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MOEO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PSO + + + + From 0a9aa989f20aef4b3260559d8344ab7f0afb8993 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 27 Jul 2011 14:40:57 +0200 Subject: [PATCH 1802/2134] comment a script that conflicts with on-page chat system --- website/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/index.html b/website/index.html index 502f20aa7..15ccabe54 100644 --- a/website/index.html +++ b/website/index.html @@ -190,7 +190,7 @@ #openhatch-wannahelp-button:focus { outline-color:-moz-use-text-color; outline-style:none; outline-width:medium; } - +

    From cb40049867948d34701bbe8b95b8ec9187af4516 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 27 Jul 2011 14:44:17 +0200 Subject: [PATCH 1803/2134] add a reference to the on-page webchat --- website/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/index.html b/website/index.html index 15ccabe54..5f6aaecac 100644 --- a/website/index.html +++ b/website/index.html @@ -169,7 +169,7 @@

    If you need immediate support or have any question, the best way to get answers is to subscribe to the mailing list and send your email to eodev-main@lists.sourceforge.net

    -

    Alternatively, you can join us on the official chatroom. Just go on our webchat interface and enter your nick. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org MUC with your favorite client.

    +

    Alternatively, you can join us on the official chatroom. If your browser supports it, you can simply click on the button on the bottom of the current webpage and enter your nick. Else, you can try our webchat interface. If you already have an XMPP account (Jabber or Google Talk, for example), you can directly connect to the eo@chat.jabberfr.org multi-user chatroom with your favorite client.

    If you want to know how to help us to improve EO, the easiest way is to click on the following button: From 9ff69a8fca95829f0d6cdbea4ef48ead24581112 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 23 Aug 2011 18:39:28 +0200 Subject: [PATCH 1804/2134] * edo: fixed deprecated eoParserLogger warning message --- edo/application/eda/main.cpp | 5 +---- edo/application/eda_sa/main.cpp | 5 +---- edo/test/t-edoEstimatorNormalMulti.cpp | 5 +---- edo/test/t-mean-distance.cpp | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index ceb64fb3d..4208580e5 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -28,9 +28,6 @@ Authors: #include #include -#include -#include - #include #include @@ -50,7 +47,7 @@ typedef edoNormalMulti< EOT > Distrib; int main(int ac, char** av) { - eoParserLogger parser(ac, av); + eoParser parser(ac, av); // Letters used by the following declarations: // a d i p t diff --git a/edo/application/eda_sa/main.cpp b/edo/application/eda_sa/main.cpp index 8ee173e30..eac52e182 100644 --- a/edo/application/eda_sa/main.cpp +++ b/edo/application/eda_sa/main.cpp @@ -1,9 +1,6 @@ #include #include -#include -#include - #include #include @@ -23,7 +20,7 @@ typedef edoNormalMulti< EOT > Distrib; int main(int ac, char** av) { - eoParserLogger parser(ac, av); + eoParser parser(ac, av); // Letters used by the following declarations: // a d i p t diff --git a/edo/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp index 431f6f985..91d932962 100644 --- a/edo/test/t-edoEstimatorNormalMulti.cpp +++ b/edo/test/t-edoEstimatorNormalMulti.cpp @@ -31,9 +31,6 @@ Authors: #include #include -#include -#include - #include #include "Rosenbrock.h" @@ -49,7 +46,7 @@ int main(int ac, char** av) // (0) parser + eo routines //----------------------------------------------------- - eoParserLogger parser(ac, av); + eoParser parser(ac, av); std::string section("Algorithm parameters"); diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index a69bc8f1d..8e62c378a 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -35,9 +35,6 @@ Authors: #include #include -#include -#include - #include #include @@ -56,7 +53,7 @@ int main(int ac, char** av) // (0) parser + eo routines //----------------------------------------------------- - eoParserLogger parser(ac, av); + eoParser parser(ac, av); std::string section("Algorithm parameters"); From 59343bf45e9c610014e2f40ed2d0925364e8b243 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 23 Aug 2011 18:59:28 +0200 Subject: [PATCH 1805/2134] * edo: added comments to generate all inheritance of classes in doxygen --- edo/src/edoAlgo.h | 2 ++ edo/src/edoBounder.h | 2 ++ edo/src/edoBounderBound.h | 2 ++ edo/src/edoBounderNo.h | 2 ++ edo/src/edoBounderRng.h | 2 ++ edo/src/edoBounderUniform.h | 2 ++ edo/src/edoContinue.h | 2 +- edo/src/edoDistrib.h | 2 ++ edo/src/edoEDA.h | 2 ++ edo/src/edoEDASA.h | 2 ++ edo/src/edoEstimator.h | 2 ++ edo/src/edoEstimatorNormalMono.h | 2 ++ edo/src/edoEstimatorNormalMulti.h | 2 ++ edo/src/edoEstimatorUniform.h | 2 ++ edo/src/edoModifier.h | 2 ++ edo/src/edoModifierDispersion.h | 2 ++ edo/src/edoModifierMass.h | 2 ++ edo/src/edoNormalMono.h | 2 ++ edo/src/edoNormalMonoCenter.h | 2 ++ edo/src/edoNormalMulti.h | 2 ++ edo/src/edoNormalMultiCenter.h | 2 ++ edo/src/edoSampler.h | 2 ++ edo/src/edoSamplerNormalMulti.h | 2 ++ edo/src/edoUniform.h | 2 ++ edo/src/edoUniformCenter.h | 2 ++ edo/src/edoVectorBounds.h | 2 ++ edo/src/utils/edoFileSnapshot.h | 2 ++ edo/src/utils/edoHyperVolume.h | 2 ++ edo/src/utils/edoStat.h | 2 ++ edo/src/utils/edoStatNormalMono.h | 2 ++ edo/src/utils/edoStatNormalMulti.h | 2 ++ edo/src/utils/edoStatUniform.h | 2 ++ 32 files changed, 63 insertions(+), 1 deletion(-) diff --git a/edo/src/edoAlgo.h b/edo/src/edoAlgo.h index 464cb55ee..db0c7fe52 100644 --- a/edo/src/edoAlgo.h +++ b/edo/src/edoAlgo.h @@ -31,6 +31,8 @@ Authors: #include +//! edoAlgo< D > + template < typename D > class edoAlgo : public eoAlgo< typename D::EOType > { diff --git a/edo/src/edoBounder.h b/edo/src/edoBounder.h index 3341db5c3..0ab5f275c 100644 --- a/edo/src/edoBounder.h +++ b/edo/src/edoBounder.h @@ -30,6 +30,8 @@ Authors: #include +//! edoBounder< EOT > + template < typename EOT > class edoBounder : public eoUF< EOT&, void > { diff --git a/edo/src/edoBounderBound.h b/edo/src/edoBounderBound.h index 106748a37..31a4e5867 100644 --- a/edo/src/edoBounderBound.h +++ b/edo/src/edoBounderBound.h @@ -30,6 +30,8 @@ Authors: #include "edoBounder.h" +//! edoBounderBound< EOT > + template < typename EOT > class edoBounderBound : public edoBounder< EOT > { diff --git a/edo/src/edoBounderNo.h b/edo/src/edoBounderNo.h index c1a98e710..f0e45454b 100644 --- a/edo/src/edoBounderNo.h +++ b/edo/src/edoBounderNo.h @@ -30,6 +30,8 @@ Authors: #include "edoBounder.h" +//! edoBounderNo< EOT > + template < typename EOT > class edoBounderNo : public edoBounder< EOT > { diff --git a/edo/src/edoBounderRng.h b/edo/src/edoBounderRng.h index 8c7bb3ef1..2501a212c 100644 --- a/edo/src/edoBounderRng.h +++ b/edo/src/edoBounderRng.h @@ -30,6 +30,8 @@ Authors: #include "edoBounder.h" +//! edoBounderRng< EOT > + template < typename EOT > class edoBounderRng : public edoBounder< EOT > { diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index 3af5579f0..6501a481d 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -29,6 +29,8 @@ Authors: #include "edoBounder.h" +//! edoBounderUniform< EOT > + template < typename EOT > class edoBounderUniform : public edoBounder< EOT > { diff --git a/edo/src/edoContinue.h b/edo/src/edoContinue.h index 14b89e614..4f6806638 100644 --- a/edo/src/edoContinue.h +++ b/edo/src/edoContinue.h @@ -31,7 +31,7 @@ Authors: #include #include -//! edoContinue< EOT > classe fitted to Distribution Object library +//! edoContinue< D > class fitted to Distribution Object library template < typename D > class edoContinue : public eoUF< const D&, bool >, public eoPersistent diff --git a/edo/src/edoDistrib.h b/edo/src/edoDistrib.h index 5ce9ce06f..a6712a4b6 100644 --- a/edo/src/edoDistrib.h +++ b/edo/src/edoDistrib.h @@ -30,6 +30,8 @@ Authors: #include +//! edoDistrib< EOT > + template < typename EOT > class edoDistrib : public eoFunctorBase { diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index 21f95f52a..51028efc9 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -39,6 +39,8 @@ Authors: #include "edoSampler.h" #include "edoContinue.h" +//! edoEDA< D > + template < typename D > class edoEDA : public edoAlgo< D > { diff --git a/edo/src/edoEDASA.h b/edo/src/edoEDASA.h index 99da07cdc..1d47c57d8 100644 --- a/edo/src/edoEDASA.h +++ b/edo/src/edoEDASA.h @@ -39,6 +39,8 @@ Authors: #include "edoSampler.h" #include "edoContinue.h" +//! edoEDASA< D > + template < typename D > class edoEDASA : public edoAlgo< D > { diff --git a/edo/src/edoEstimator.h b/edo/src/edoEstimator.h index c68069eeb..ea70e4962 100644 --- a/edo/src/edoEstimator.h +++ b/edo/src/edoEstimator.h @@ -31,6 +31,8 @@ Authors: #include #include +//! edoEstimator< D > + template < typename D > class edoEstimator : public eoUF< eoPop< typename D::EOType >&, D > { diff --git a/edo/src/edoEstimatorNormalMono.h b/edo/src/edoEstimatorNormalMono.h index 970368552..6a42114b5 100644 --- a/edo/src/edoEstimatorNormalMono.h +++ b/edo/src/edoEstimatorNormalMono.h @@ -31,6 +31,8 @@ Authors: #include "edoEstimator.h" #include "edoNormalMono.h" +//! edoEstimatorNormalMono< EOT > + template < typename EOT > class edoEstimatorNormalMono : public edoEstimator< edoNormalMono< EOT > > { diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 6d5eb0bab..cfd979fe4 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -32,6 +32,8 @@ Authors: #include "edoEstimator.h" #include "edoNormalMulti.h" +//! edoEstimatorNormalMulti< EOT > + template < typename EOT > class edoEstimatorNormalMulti : public edoEstimator< edoNormalMulti< EOT > > { diff --git a/edo/src/edoEstimatorUniform.h b/edo/src/edoEstimatorUniform.h index 8b61c7bde..4f24bcba6 100644 --- a/edo/src/edoEstimatorUniform.h +++ b/edo/src/edoEstimatorUniform.h @@ -33,6 +33,8 @@ Authors: // TODO: calcule de la moyenne + covariance dans une classe derivee +//! edoEstimatorUniform + template < typename EOT > class edoEstimatorUniform : public edoEstimator< edoUniform< EOT > > { diff --git a/edo/src/edoModifier.h b/edo/src/edoModifier.h index 91f7fbe2b..12687aa81 100644 --- a/edo/src/edoModifier.h +++ b/edo/src/edoModifier.h @@ -28,6 +28,8 @@ Authors: #ifndef _edoModifier_h #define _edoModifier_h +//! edoModifier< D > + template < typename D > class edoModifier { diff --git a/edo/src/edoModifierDispersion.h b/edo/src/edoModifierDispersion.h index 0d890cbe9..a4a6e9ea6 100644 --- a/edo/src/edoModifierDispersion.h +++ b/edo/src/edoModifierDispersion.h @@ -33,6 +33,8 @@ Authors: #include "edoModifier.h" +//! edoModifierDispersion< D > + template < typename D > class edoModifierDispersion : public edoModifier< D >, public eoBF< D&, eoPop< typename D::EOType >&, void > { diff --git a/edo/src/edoModifierMass.h b/edo/src/edoModifierMass.h index 414918c79..db9ddcbf9 100644 --- a/edo/src/edoModifierMass.h +++ b/edo/src/edoModifierMass.h @@ -32,6 +32,8 @@ Authors: #include "edoModifier.h" +//! edoModifierMass< D > + template < typename D > class edoModifierMass : public edoModifier< D >, public eoBF< D&, typename D::EOType&, void > { diff --git a/edo/src/edoNormalMono.h b/edo/src/edoNormalMono.h index 34c71450a..4b015d120 100644 --- a/edo/src/edoNormalMono.h +++ b/edo/src/edoNormalMono.h @@ -30,6 +30,8 @@ Authors: #include "edoDistrib.h" +//! edoNormalMono< EOT > + template < typename EOT > class edoNormalMono : public edoDistrib< EOT > { diff --git a/edo/src/edoNormalMonoCenter.h b/edo/src/edoNormalMonoCenter.h index ac6e75f36..4b415dc02 100644 --- a/edo/src/edoNormalMonoCenter.h +++ b/edo/src/edoNormalMonoCenter.h @@ -31,6 +31,8 @@ Authors: #include "edoModifierMass.h" #include "edoNormalMono.h" +//! edoNormalMonoCenter< EOT > + template < typename EOT > class edoNormalMonoCenter : public edoModifierMass< edoNormalMono< EOT > > { diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index 9a602e731..463f0bc8d 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -15,6 +15,8 @@ namespace ublas = boost::numeric::ublas; +//! edoNormalMulti< EOT > + template < typename EOT > class edoNormalMulti : public edoDistrib< EOT > { diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index c929ac569..199ded47a 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -31,6 +31,8 @@ Authors: #include "edoModifierMass.h" #include "edoNormalMulti.h" +//! edoNormalMultiCenter< EOT > + template < typename EOT > class edoNormalMultiCenter : public edoModifierMass< edoNormalMulti< EOT > > { diff --git a/edo/src/edoSampler.h b/edo/src/edoSampler.h index 212e861c3..3e4dd0bde 100644 --- a/edo/src/edoSampler.h +++ b/edo/src/edoSampler.h @@ -33,6 +33,8 @@ Authors: #include "edoBounder.h" #include "edoBounderNo.h" +//! edoSampler< D > + template < typename D > class edoSampler : public eoUF< D&, typename D::EOType > { diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 2aa599503..2601ea77e 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -32,6 +32,8 @@ Authors: #include #include +//! edoSamplerNormalMulti< EOT > + template< class EOT > class edoSamplerNormalMulti : public edoSampler< edoNormalMulti< EOT > > { diff --git a/edo/src/edoUniform.h b/edo/src/edoUniform.h index 01cf3cb30..37bf065b8 100644 --- a/edo/src/edoUniform.h +++ b/edo/src/edoUniform.h @@ -31,6 +31,8 @@ Authors: #include "edoDistrib.h" #include "edoVectorBounds.h" +//! edoUniform< EOT > + template < typename EOT > class edoUniform : public edoDistrib< EOT >, public edoVectorBounds< EOT > { diff --git a/edo/src/edoUniformCenter.h b/edo/src/edoUniformCenter.h index 22ce95164..473be4b4e 100644 --- a/edo/src/edoUniformCenter.h +++ b/edo/src/edoUniformCenter.h @@ -31,6 +31,8 @@ Authors: #include "edoModifierMass.h" #include "edoUniform.h" +//! edoUniformCenter< EOT > + template < typename EOT > class edoUniformCenter : public edoModifierMass< edoUniform< EOT > > { diff --git a/edo/src/edoVectorBounds.h b/edo/src/edoVectorBounds.h index c72a10c2c..635132cd4 100644 --- a/edo/src/edoVectorBounds.h +++ b/edo/src/edoVectorBounds.h @@ -28,6 +28,8 @@ Authors: #ifndef _edoVectorBounds_h #define _edoVectorBounds_h +//! edoVectorBounds< EOT > + template < typename EOT > class edoVectorBounds { diff --git a/edo/src/utils/edoFileSnapshot.h b/edo/src/utils/edoFileSnapshot.h index 17d042636..7f157f321 100644 --- a/edo/src/utils/edoFileSnapshot.h +++ b/edo/src/utils/edoFileSnapshot.h @@ -38,6 +38,8 @@ Authors: #include "utils/eoMonitor.h" +//! edoFileSnapshot + class edoFileSnapshot : public eoMonitor { public: diff --git a/edo/src/utils/edoHyperVolume.h b/edo/src/utils/edoHyperVolume.h index 85bcf0339..2ef73708b 100644 --- a/edo/src/utils/edoHyperVolume.h +++ b/edo/src/utils/edoHyperVolume.h @@ -28,6 +28,8 @@ Authors: #ifndef _edoHyperVolume_h #define _edoHyperVolume_h +//! edoHyperVolume + template < typename EOT > class edoHyperVolume { diff --git a/edo/src/utils/edoStat.h b/edo/src/utils/edoStat.h index de5b4d2d2..233101323 100644 --- a/edo/src/utils/edoStat.h +++ b/edo/src/utils/edoStat.h @@ -30,6 +30,8 @@ Authors: #include +//! edoStatBase< D > + template < typename D > class edoStatBase : public eoUF< const D&, void > { diff --git a/edo/src/utils/edoStatNormalMono.h b/edo/src/utils/edoStatNormalMono.h index b16b3ae58..87705a0b0 100644 --- a/edo/src/utils/edoStatNormalMono.h +++ b/edo/src/utils/edoStatNormalMono.h @@ -31,6 +31,8 @@ Authors: #include "edoStat.h" #include "edoNormalMono.h" +//! edoStatNormalMono< EOT > + template < typename EOT > class edoStatNormalMono : public edoDistribStat< edoNormalMono< EOT > > { diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index 68af07357..3a653edc5 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -33,6 +33,8 @@ Authors: #include "edoStat.h" #include "edoNormalMulti.h" +//! edoStatNormalMulti< EOT > + template < typename EOT > class edoStatNormalMulti : public edoDistribStat< edoNormalMulti< EOT > > { diff --git a/edo/src/utils/edoStatUniform.h b/edo/src/utils/edoStatUniform.h index 8ccb93be5..c0fa79352 100644 --- a/edo/src/utils/edoStatUniform.h +++ b/edo/src/utils/edoStatUniform.h @@ -31,6 +31,8 @@ Authors: #include "edoStat.h" #include "edoUniform.h" +//! edoStatUniform< EOT > + template < typename EOT > class edoStatUniform : public edoDistribStat< edoUniform< EOT > > { From 6e87948a01258b210ca2fede9aa96f2cada6b01b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 4 Sep 2011 17:19:03 +0200 Subject: [PATCH 1806/2134] * edoEDASA: indentation --- edo/src/edoEDASA.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/edo/src/edoEDASA.h b/edo/src/edoEDASA.h index 1d47c57d8..b2f0fe708 100644 --- a/edo/src/edoEDASA.h +++ b/edo/src/edoEDASA.h @@ -74,18 +74,18 @@ public: \param replacor Population replacor */ edoEDASA (eoSelect< EOT > & selector, - edoEstimator< D > & estimator, - eoSelectOne< EOT > & selectone, - edoModifierMass< D > & modifier, - edoSampler< D > & sampler, - eoContinue< EOT > & pop_continue, - edoContinue< D > & distribution_continue, - eoEvalFunc < EOT > & evaluation, - moContinuator< moDummyNeighbor > & sa_continue, - moCoolingSchedule & cooling_schedule, - double initial_temperature, - eoReplacement< EOT > & replacor - ) + edoEstimator< D > & estimator, + eoSelectOne< EOT > & selectone, + edoModifierMass< D > & modifier, + edoSampler< D > & sampler, + eoContinue< EOT > & pop_continue, + edoContinue< D > & distribution_continue, + eoEvalFunc < EOT > & evaluation, + moContinuator< moDummyNeighbor > & sa_continue, + moCoolingSchedule & cooling_schedule, + double initial_temperature, + eoReplacement< EOT > & replacor + ) : _selector(selector), _estimator(estimator), _selectone(selectone), From b6ca088c83e60ea1b3698ef3bc731d32e6c571ef Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 12 Sep 2011 14:38:28 +0200 Subject: [PATCH 1807/2134] eoParserLogger deprecated in favor of eoParser --- edo/application/eda_sa/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/application/eda_sa/main.cpp b/edo/application/eda_sa/main.cpp index 8ee173e30..e2d883fab 100644 --- a/edo/application/eda_sa/main.cpp +++ b/edo/application/eda_sa/main.cpp @@ -23,7 +23,7 @@ typedef edoNormalMulti< EOT > Distrib; int main(int ac, char** av) { - eoParserLogger parser(ac, av); + eoParser parser(ac, av); // Letters used by the following declarations: // a d i p t From 81539429a8d1bfea1e3244630e746ababfe3e056 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 12 Sep 2011 14:39:34 +0200 Subject: [PATCH 1808/2134] EO & EDO docs --- website/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/index.html b/website/index.html index 5f6aaecac..09481644c 100644 --- a/website/index.html +++ b/website/index.html @@ -42,7 +42,8 @@

  • Download
  • Tutorial
  • FAQ
  • -
  • API documentation
  • +
  • EO documentation
  • +
  • EDO documentation
  • Project page
  • Contact us
  • From fed4a99df0a8bf8ff899daaf3827e7a0ecaa73df Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 12 Sep 2011 14:40:27 +0200 Subject: [PATCH 1809/2134] +# Empty source files, because we want to build a library --- edo/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 563437043..91dc5f273 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -77,6 +77,7 @@ ENDIF() ### 6) Prepare some variables for CMAKE usage ###################################################################################### +# Empty source files, because we want to build a library SET(SAMPLE_SRCS) ###################################################################################### From 7f6c591a6bc693090411f6a31ff87979fba76ff4 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 12 Sep 2011 16:05:18 +0200 Subject: [PATCH 1810/2134] dox for bounders --- edo/src/edoBounder.h | 13 ++++++++----- edo/src/edoBounderBound.h | 6 ++++-- edo/src/edoBounderNo.h | 6 ++++-- edo/src/edoBounderRng.h | 7 +++++-- edo/src/edoBounderUniform.h | 7 +++++-- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/edo/src/edoBounder.h b/edo/src/edoBounder.h index 0ab5f275c..8291cffc4 100644 --- a/edo/src/edoBounder.h +++ b/edo/src/edoBounder.h @@ -30,17 +30,20 @@ Authors: #include -//! edoBounder< EOT > - +/** The interface of a set of classes that modifies a solution so as to respect + * a given set of bounds (typically an hypercube). + * + * @ingroup Bounders + */ template < typename EOT > class edoBounder : public eoUF< EOT&, void > { public: edoBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) - : _min(min), _max(max) + : _min(min), _max(max) { - assert(_min.size() > 0); - assert(_min.size() == _max.size()); + assert(_min.size() > 0); + assert(_min.size() == _max.size()); } // virtual void operator()( EOT& ) = 0 (provided by eoUF< A1, R >) diff --git a/edo/src/edoBounderBound.h b/edo/src/edoBounderBound.h index 31a4e5867..88865a52e 100644 --- a/edo/src/edoBounderBound.h +++ b/edo/src/edoBounderBound.h @@ -30,8 +30,10 @@ Authors: #include "edoBounder.h" -//! edoBounderBound< EOT > - +/** A bounder that correct an incorrect variable by setting it to the min/max + * + * @ingroup Bounders + */ template < typename EOT > class edoBounderBound : public edoBounder< EOT > { diff --git a/edo/src/edoBounderNo.h b/edo/src/edoBounderNo.h index f0e45454b..31b4b499d 100644 --- a/edo/src/edoBounderNo.h +++ b/edo/src/edoBounderNo.h @@ -30,8 +30,10 @@ Authors: #include "edoBounder.h" -//! edoBounderNo< EOT > - +/** A bounder that does nothing. + * + * @ingroup Bounders + */ template < typename EOT > class edoBounderNo : public edoBounder< EOT > { diff --git a/edo/src/edoBounderRng.h b/edo/src/edoBounderRng.h index 2501a212c..2db937a29 100644 --- a/edo/src/edoBounderRng.h +++ b/edo/src/edoBounderRng.h @@ -30,8 +30,11 @@ Authors: #include "edoBounder.h" -//! edoBounderRng< EOT > - +/** A bounder that randomly draw new values for variables going out bounds, + * using an eoRng to do so. + * + * @ingroup Bounders + */ template < typename EOT > class edoBounderRng : public edoBounder< EOT > { diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index 6501a481d..886221a7f 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -29,8 +29,11 @@ Authors: #include "edoBounder.h" -//! edoBounderUniform< EOT > - +/** A bounder that randomly draw new values for variables going out bounds, + * in a given uniform distribution. + * + * @ingroup Bounders + */ template < typename EOT > class edoBounderUniform : public edoBounder< EOT > { From 0a04059f108eb8a2712428df61a2a332c7386adf Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 12 Sep 2011 16:44:08 +0200 Subject: [PATCH 1811/2134] space-ification of the tab indents --- edo/src/edoBounderBound.h | 30 +++++++++++++++--------------- edo/src/edoBounderRng.h | 22 +++++++++++----------- edo/src/edoBounderUniform.h | 18 +++++++++--------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/edo/src/edoBounderBound.h b/edo/src/edoBounderBound.h index 88865a52e..3c6646242 100644 --- a/edo/src/edoBounderBound.h +++ b/edo/src/edoBounderBound.h @@ -39,27 +39,27 @@ class edoBounderBound : public edoBounder< EOT > { public: edoBounderBound( EOT min, EOT max ) - : edoBounder< EOT >( min, max ) + : edoBounder< EOT >( min, max ) {} void operator()( EOT& x ) { - unsigned int size = x.size(); - assert(size > 0); + unsigned int size = x.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) // browse all dimensions - { - if (x[d] < this->min()[d]) - { - x[d] = this->min()[d]; - continue; - } + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { + if (x[d] < this->min()[d]) + { + x[d] = this->min()[d]; + continue; + } - if (x[d] > this->max()[d]) - { - x[d] = this->max()[d]; - } - } + if (x[d] > this->max()[d]) + { + x[d] = this->max()[d]; + } + } } }; diff --git a/edo/src/edoBounderRng.h b/edo/src/edoBounderRng.h index 2db937a29..7b909ccac 100644 --- a/edo/src/edoBounderRng.h +++ b/edo/src/edoBounderRng.h @@ -40,24 +40,24 @@ class edoBounderRng : public edoBounder< EOT > { public: edoBounderRng( EOT min, EOT max, eoRndGenerator< double > & rng ) - : edoBounder< EOT >( min, max ), _rng(rng) + : edoBounder< EOT >( min, max ), _rng(rng) {} void operator()( EOT& x ) { - unsigned int size = x.size(); - assert(size > 0); + unsigned int size = x.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) // browse all dimensions - { + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { - // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. + // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. - if (x[d] < this->min()[d] || x[d] > this->max()[d]) - { - x[d] = _rng(); - } - } + if (x[d] < this->min()[d] || x[d] > this->max()[d]) + { + x[d] = _rng(); + } + } } private: diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index 886221a7f..a285c8bc0 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -39,21 +39,21 @@ class edoBounderUniform : public edoBounder< EOT > { public: edoBounderUniform( EOT min, EOT max ) - : edoBounder< EOT >( min, max ) + : edoBounder< EOT >( min, max ) {} void operator()( EOT& sol ) { - unsigned int size = sol.size(); - assert(size > 0); + unsigned int size = sol.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) { + for (unsigned int d = 0; d < size; ++d) { - if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { - // use EO's global "rng" - sol[d] = rng.uniform( this->min()[d], this->max()[d] ); - } - } // for d in size + if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { + // use EO's global "rng" + sol[d] = rng.uniform( this->min()[d], this->max()[d] ); + } + } // for d in size } }; From 37390e64dc984bc714dc1ba9b5b81a5bd6f73a09 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 13 Sep 2011 09:30:17 +0200 Subject: [PATCH 1812/2134] CMake > 2.8 is needed, because of the FindOpenMP feature --- eo/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 5b8840017..d7ef8558a 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -1,3 +1,4 @@ + ###################################################################################### ### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line ###################################################################################### @@ -14,6 +15,9 @@ INCLUDE(eo-conf.cmake OPTIONAL) # set the project name and other variables PROJECT(EO) +# CMake > 2.8 is needed, because of the FindOpenMP feature +cmake_minimum_required(VERSION 2.8) + #SET(PROJECT_VERSION_MAJOR 1) #SET(PROJECT_VERSION_MINOR 1) #SET(PROJECT_VERSION_PATCH 1) @@ -26,9 +30,6 @@ SET(PACKAGE_NAME "Evolving Objects" CACHE STRING "Package name" FORCE) SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}"CACHE STRING "Package string full name" FORCE) SET(PACKAGE_TARNAME "eo" CACHE STRING "Package tar name" FORCE) -# check cmake version compatibility -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - # regular expression checking INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") From c63e5f919f787fddd90d69e68143c1dbc2514461 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 13 Sep 2011 16:53:30 +0200 Subject: [PATCH 1813/2134] update the edoEDA to a simple EDA --- edo/application/eda/main.cpp | 187 +++++---------------------- edo/src/edoAlgo.h | 9 +- edo/src/edoEDA.h | 236 +++++++++-------------------------- 3 files changed, 96 insertions(+), 336 deletions(-) diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index 4208580e5..250e6bf1e 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -52,32 +52,19 @@ int main(int ac, char** av) // Letters used by the following declarations: // a d i p t - std::string section("Algorithm parameters"); - - // FIXME: default value to check - //double initial_temperature = parser.createParam((double)10e5, "temperature", "Initial temperature", 'i', section).value(); // i + std::string section("Algorithm parameters"); eoState state; - - //----------------------------------------------------------------------------- // Instantiate all needed parameters for EDA algorithm - //----------------------------------------------------------------------------- - double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); state.storeFunctor(selector); - edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); - eoSelectOne< EOT >* selectone = new eoDetTournamentSelect< EOT >( 2 ); - state.storeFunctor(selectone); - - edoModifierMass< Distrib >* modifier = new edoNormalMultiCenter< EOT >(); - state.storeFunctor(modifier); - eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); state.storeFunctor(plainEval); @@ -87,159 +74,65 @@ int main(int ac, char** av) eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); state.storeFunctor(gen); - unsigned int dimension_size = parser.createParam((unsigned int)10, "dimension-size", "Dimension size", 'd', section).value(); // d eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( dimension_size, *gen ); state.storeFunctor(init); - //----------------------------------------------------------------------------- - - //----------------------------------------------------------------------------- // (1) Population init and sampler - //----------------------------------------------------------------------------- - // Generation of population from do_make_pop (creates parameters, manages persistance and so on...) // ... and creates the parameters: L P r S - - // this first sampler creates a uniform distribution independently from our distribution (it does not use doUniform). - + // this first sampler creates a uniform distribution independently from our distribution (it does not use edoUniform). eoPop< EOT >& pop = do_make_pop(parser, state, *init); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (2) First evaluation before starting the research algorithm - //----------------------------------------------------------------------------- - apply(eval, pop); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // Prepare bounder class to set bounds of sampling. - // This is used by doSampler. - //----------------------------------------------------------------------------- - - edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), - EOT(pop[0].size(), 5), - *gen); + // This is used by edoSampler. + edoBounder< EOT >* bounder = + new edoBounderRng< EOT >( EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); // FIXME do not use hard-coded bounds state.storeFunctor(bounder); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // Prepare sampler class with a specific distribution - //----------------------------------------------------------------------------- - edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // Metropolis sample parameters - //----------------------------------------------------------------------------- - - //unsigned int popSize = parser.getORcreateParam((unsigned int)20, "popSize", "Population Size", 'P', "Evolution Engine").value(); - - //moContinuator< moDummyNeighbor >* sa_continue = new moIterContinuator< moDummyNeighbor >( popSize ); - //state.storeFunctor(sa_continue); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- - // SA parameters - //----------------------------------------------------------------------------- - - //double threshold_temperature = parser.createParam((double)0.1, "threshold", "Minimal temperature at which stop", 't', section).value(); // t - //double alpha = parser.createParam((double)0.1, "alpha", "Temperature decrease rate", 'a', section).value(); // a - - //moCoolingSchedule* cooling_schedule = new moSimpleCoolingSchedule(initial_temperature, alpha, 0, threshold_temperature); - //state.storeFunctor(cooling_schedule); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- + // stopping criteria // ... and creates the parameter letters: C E g G s T - //----------------------------------------------------------------------------- - eoContinue< EOT >& eo_continue = do_make_continue(parser, state, eval); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- + // population output - //----------------------------------------------------------------------------- - eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- + // distribution output - //----------------------------------------------------------------------------- - edoDummyContinue< Distrib >* dummy_continue = new edoDummyContinue< Distrib >(); state.storeFunctor(dummy_continue); edoCheckPoint< Distrib >* distribution_continue = new edoCheckPoint< Distrib >( *dummy_continue ); state.storeFunctor(distribution_continue); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // eoEPRemplacement causes the using of the current and previous // sample for sampling. - //----------------------------------------------------------------------------- - eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); - - // Below, use eoGenerationalReplacement to sample only on the current sample - - //eoReplacement< EOT >* replacor = new eoGenerationalReplacement< EOT >(); // FIXME: to define the size - state.storeFunctor(replacor); - - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- + // Some stuff to display helper when we are using -h option - //----------------------------------------------------------------------------- - if (parser.userNeedsHelp()) - { - parser.printHelp(std::cout); - exit(1); - } + { + parser.printHelp(std::cout); + exit(1); + } // Help + Verbose routines - make_verbose(parser); make_help(parser); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // population output (after helper) // - // FIXME: theses objects are instanciate there in order to avoid a folder - // removing as doFileSnapshot does within ctor. - //----------------------------------------------------------------------------- - + // FIXME: theses objects are instanciated there in order to avoid a folder + // removing as edoFileSnapshot does within ctor. edoPopStat< EOT >* popStat = new edoPopStat; state.storeFunctor(popStat); pop_continue.add(*popStat); @@ -249,13 +142,7 @@ int main(int ac, char** av) fileSnapshot->add(*popStat); pop_continue.add(*fileSnapshot); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // distribution output (after helper) - //----------------------------------------------------------------------------- - edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >(); state.storeFunctor(distrib_stat); @@ -271,42 +158,24 @@ int main(int ac, char** av) file_monitor->add(*distrib_stat); distribution_continue->add( *file_monitor ); - //----------------------------------------------------------------------------- + eoPopLoopEval popEval( eval ); - - //----------------------------------------------------------------------------- // EDA algorithm configuration - //----------------------------------------------------------------------------- - edoAlgo< Distrib >* algo = new edoEDA< Distrib > - (*selector, *estimator, *selectone, *modifier, *sampler, - pop_continue, *distribution_continue, - eval, - //*sa_continue, *cooling_schedule, initial_temperature, - *replacor); + (*selector, *estimator, *sampler, + pop_continue, *distribution_continue, + popEval, *replacor); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // Beginning of the algorithm call - //----------------------------------------------------------------------------- + try { + do_run(*algo, pop); - try - { - do_run(*algo, pop); - } - catch (eoEvalFuncCounterBounderException& e) - { - eo::log << eo::warnings << "warning: " << e.what() << std::endl; - } - catch (std::exception& e) - { - eo::log << eo::errors << "error: " << e.what() << std::endl; - exit(EXIT_FAILURE); - } - - //----------------------------------------------------------------------------- + } catch (eoEvalFuncCounterBounderException& e) { + eo::log << eo::warnings << "warning: " << e.what() << std::endl; + } catch (std::exception& e) { + eo::log << eo::errors << "error: " << e.what() << std::endl; + exit(EXIT_FAILURE); + } return 0; } diff --git a/edo/src/edoAlgo.h b/edo/src/edoAlgo.h index db0c7fe52..b91a5c2ab 100644 --- a/edo/src/edoAlgo.h +++ b/edo/src/edoAlgo.h @@ -31,14 +31,19 @@ Authors: #include -//! edoAlgo< D > - +/** An EDO algorithm difffers from a canonical EO algorithm because it is + * templatized on a Distribution rather than just an EOT. + * + * Derivating from an eoAlgo, it should define an operator()( EOT sol ) + */ template < typename D > class edoAlgo : public eoAlgo< typename D::EOType > { //! Alias for the type typedef typename D::EOType EOT; + // virtual R operator()(A1) = 0; (defined in eoUF) + public: virtual ~edoAlgo(){} }; diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index 51028efc9..d70cd27f8 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -58,179 +58,80 @@ public: //! edoEDA constructor /*! - All the boxes used by a EDASA need to be given. + Takes algo operators, all are mandatory - \param selector Population Selector - \param estimator Distribution Estimator - \param selectone SelectOne - \param modifier Distribution Modifier - \param sampler Distribution Sampler - \param pop_continue Population Continuator - \param distribution_continue Distribution Continuator - \param evaluation Evaluation function. - \param sa_continue Stopping criterion. - \param cooling_schedule Cooling schedule, describes how the temperature is modified. - \param initial_temperature The initial temperature. - \param replacor Population replacor + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param pop_continuator Stopping criterion based on the population features + \param distribution_continuator Stopping criterion based on the distribution features + \param evaluation Evaluate a population + \param replacor Replace old solutions by new ones */ - edoEDA (eoSelect< EOT > & selector, - edoEstimator< D > & estimator, - eoSelectOne< EOT > & selectone, - edoModifierMass< D > & modifier, - edoSampler< D > & sampler, - eoContinue< EOT > & pop_continue, - edoContinue< D > & distribution_continue, - eoEvalFunc < EOT > & evaluation, - //moContinuator< moDummyNeighbor > & sa_continue, - //moCoolingSchedule & cooling_schedule, - //double initial_temperature, - eoReplacement< EOT > & replacor - ) - : _selector(selector), - _estimator(estimator), - _selectone(selectone), - _modifier(modifier), - _sampler(sampler), - _pop_continue(pop_continue), - _distribution_continue(distribution_continue), - _evaluation(evaluation), - //_sa_continue(sa_continue), - //_cooling_schedule(cooling_schedule), - //_initial_temperature(initial_temperature), - _replacor(replacor) - + edoEDA ( + eoSelect< EOT > & selector, + edoEstimator< D > & estimator, + edoSampler< D > & sampler, + eoContinue< EOT > & pop_continuator, + edoContinue< D > & distribution_continuator, + eoPopEvalFunc < EOT > & evaluator, + eoReplacement< EOT > & replacor + ) + : _selector(selector), + _estimator(estimator), + _sampler(sampler), + _pop_continuator(pop_continuator), + _distribution_continuator(distribution_continuator), + _evaluator(evaluator), + _replacor(replacor) {} - //! function that launches the EDASA algorithm. - /*! - As a moTS or a moHC, the EDASA can be used for HYBRIDATION in an evolutionary algorithm. - - \param pop A population to improve. - \return TRUE. + /** A basic EDA algorithm that iterates over: + * selection, estimation, sampling, bounding, evaluation, replacement + * + * \param pop the population of candidate solutions + * \return void */ void operator ()(eoPop< EOT > & pop) { - assert(pop.size() > 0); + assert(pop.size() > 0); - //double temperature = _initial_temperature; + eoPop< EOT > current_pop; + eoPop< EOT > selected_pop; - eoPop< EOT > current_pop; + // FIXME one must instanciate a first distrib here because there is no empty constructor, see if it is possible to instanciate Distributions without parameters + D distrib = _estimator(pop); - eoPop< EOT > selected_pop; + // Evaluating a first time the candidate solutions + // The first pop is not supposed to be evaluated (@see eoPopLoopEval). + _evaluator( current_pop, pop ); + do { + // (1) Selection of the best points in the population + //selected_pop.clear(); // FIXME is it necessary to clear? + _selector(pop, selected_pop); + assert( selected_pop.size() > 0 ); + // TODO: utiliser selected_pop ou pop ??? - //------------------------------------------------------------- - // Estimating a first time the distribution parameter thanks - // to population. - //------------------------------------------------------------- + // (2) Estimation of the distribution parameters + distrib = _estimator(selected_pop); - D distrib = _estimator(pop); + // (3) sampling + // The sampler produces feasible solutions (@see edoSampler that + // encapsulate an edoBounder) + current_pop.clear(); + for( unsigned int i = 0; i < pop.size(); ++i ) { + current_pop.push_back( _sampler(distrib) ); + } - double size = distrib.size(); - assert(size > 0); + // (4) Evaluate new solutions + _evaluator( pop, current_pop ); - //------------------------------------------------------------- + // (5) Replace old solutions by new ones + _replacor(pop, current_pop); // e.g. copy current_pop in pop - - do - { - //------------------------------------------------------------- - // (3) Selection of the best points in the population - //------------------------------------------------------------- - - selected_pop.clear(); - - _selector(pop, selected_pop); - - assert( selected_pop.size() > 0 ); - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // (4) Estimation of the distribution parameters - //------------------------------------------------------------- - - distrib = _estimator(selected_pop); - - //------------------------------------------------------------- - - - // TODO: utiliser selected_pop ou pop ??? - - assert(selected_pop.size() > 0); - - - //------------------------------------------------------------- - // Init of a variable contening a point with the bestest fitnesses - //------------------------------------------------------------- - - EOT current_solution = _selectone(selected_pop); - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Fit the current solution with the distribution parameters (bounds) - //------------------------------------------------------------- - - // FIXME: si besoin de modifier la dispersion de la distribution - // _modifier_dispersion(distribution, selected_pop); - _modifier(distrib, current_solution); - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Evaluating a first time the current solution - //------------------------------------------------------------- - - _evaluation( current_solution ); - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Building of the sampler in current_pop - //------------------------------------------------------------- - - //_sa_continue.init( current_solution ); - - current_pop.clear(); - - for ( unsigned int i = 0; i < pop.size(); ++i ) - //do - { - EOT candidate_solution = _sampler(distrib); - _evaluation( candidate_solution ); - - // TODO: verifier le critere d'acceptation - if ( candidate_solution.fitness() < current_solution.fitness() - // || rng.uniform() < exp( ::fabs(candidate_solution.fitness() - current_solution.fitness()) / temperature ) - ) - { - current_pop.push_back(candidate_solution); - current_solution = candidate_solution; - } - } - //while ( _sa_continue( current_solution) ); - - //------------------------------------------------------------- - - - _replacor(pop, current_pop); // copy current_pop in pop - - pop.sort(); - - //if ( ! _cooling_schedule( temperature ) ){ eo::log << eo::debug << "_cooling_schedule" << std::endl; break; } - - if ( ! _distribution_continue( distrib ) ){ eo::log << eo::debug << "_distribution_continue" << std::endl; break; } - - if ( ! _pop_continue( pop ) ){ eo::log << eo::debug << "_pop_continue" << std::endl; break; } - - } - while ( 1 ); - } + } while( _distribution_continuator( distrib ) && _pop_continuator( pop ) ); + } // operator() private: @@ -240,32 +141,17 @@ private: //! A EOT estimator. It is going to estimate distribution parameters. edoEstimator< D > & _estimator; - //! SelectOne - eoSelectOne< EOT > & _selectone; - - //! A D modifier - edoModifierMass< D > & _modifier; - //! A D sampler edoSampler< D > & _sampler; //! A EOT population continuator - eoContinue < EOT > & _pop_continue; + eoContinue < EOT > & _pop_continuator; //! A D continuator - edoContinue < D > & _distribution_continue; + edoContinue < D > & _distribution_continuator; //! A full evaluation function. - eoEvalFunc < EOT > & _evaluation; - - //! Stopping criterion before temperature update - //moContinuator< moDummyNeighbor > & _sa_continue; - - //! The cooling schedule - //moCoolingSchedule & _cooling_schedule; - - //! Initial temperature - //double _initial_temperature; + eoPopEvalFunc < EOT > & _evaluator; //! A EOT replacor eoReplacement < EOT > & _replacor; From 61ad00acbc77fb3a5ef48ae24a5a89bee8200352 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 13 Sep 2011 16:54:04 +0200 Subject: [PATCH 1814/2134] bugfix: would not link to EO libraries --- edo/install.cmake-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/install.cmake-dist b/edo/install.cmake-dist index bd07be7c8..99d4166ba 100644 --- a/edo/install.cmake-dist +++ b/edo/install.cmake-dist @@ -8,7 +8,7 @@ SET(MO_DIR "<>" CACHE PATH "MO directory" FORCE) SET(EO_INCLUDE_DIRS "${EO_DIR}/src" CACHE PATH "EO include directory" FORCE) SET(EO_LIBRARY_DIRS "${EO_DIR}/release/lib" CACHE PATH "EO library directory" FORCE) -SET(EO_LIBRARIES "eoutils eo es ga cma gcov") +SET(EO_LIBRARIES eoutils eo es ga cma gcov) # do not use quotes around this list or it will fail SET(MO_INCLUDE_DIRS "${MO_DIR}/src" CACHE PATH "MO include directory" FORCE) SET(MO_LIBRARY_DIRS "${MO_DIR}/release/lib" CACHE PATH "MO library directory" FORCE) From 6489e6f4e2d46272cfe38cbd298e4f503a4f12cd Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 14 Sep 2011 10:59:28 +0200 Subject: [PATCH 1815/2134] there is no MO library, only headers --- edo/CMakeLists.txt | 1 - edo/application/eda/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 91dc5f273..ab4333ef6 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -42,7 +42,6 @@ INCLUDE_DIRECTORIES( LINK_DIRECTORIES( ${EO_LIBRARY_DIRS} - ${MO_LIBRARY_DIRS} ) ###################################################################################### diff --git a/edo/application/eda/CMakeLists.txt b/edo/application/eda/CMakeLists.txt index 2f1a52a57..2dfe5774c 100644 --- a/edo/application/eda/CMakeLists.txt +++ b/edo/application/eda/CMakeLists.txt @@ -24,4 +24,4 @@ FILE(GLOB SOURCES *.cpp) SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES}) From d6ccadd18e2cc93a6c1f92489c321f29ff7d852d Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 14 Sep 2011 16:28:39 +0200 Subject: [PATCH 1816/2134] doc update --- edo/src/edoBounder.h | 6 +++--- edo/src/edoBounderBound.h | 2 +- edo/src/edoBounderNo.h | 2 +- edo/src/edoBounderRng.h | 2 +- edo/src/edoBounderUniform.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/edo/src/edoBounder.h b/edo/src/edoBounder.h index 8291cffc4..471e47f9d 100644 --- a/edo/src/edoBounder.h +++ b/edo/src/edoBounder.h @@ -28,15 +28,15 @@ Authors: #ifndef _edoBounder_h #define _edoBounder_h -#include +#include /** The interface of a set of classes that modifies a solution so as to respect * a given set of bounds (typically an hypercube). * - * @ingroup Bounders + * @ingroup Repairers */ template < typename EOT > -class edoBounder : public eoUF< EOT&, void > +class edoBounder : public edoRepairer< EOT > { public: edoBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) diff --git a/edo/src/edoBounderBound.h b/edo/src/edoBounderBound.h index 3c6646242..36ad53144 100644 --- a/edo/src/edoBounderBound.h +++ b/edo/src/edoBounderBound.h @@ -32,7 +32,7 @@ Authors: /** A bounder that correct an incorrect variable by setting it to the min/max * - * @ingroup Bounders + * @ingroup Repairers */ template < typename EOT > class edoBounderBound : public edoBounder< EOT > diff --git a/edo/src/edoBounderNo.h b/edo/src/edoBounderNo.h index 31b4b499d..33416d56d 100644 --- a/edo/src/edoBounderNo.h +++ b/edo/src/edoBounderNo.h @@ -32,7 +32,7 @@ Authors: /** A bounder that does nothing. * - * @ingroup Bounders + * @ingroup Repairers */ template < typename EOT > class edoBounderNo : public edoBounder< EOT > diff --git a/edo/src/edoBounderRng.h b/edo/src/edoBounderRng.h index 7b909ccac..bfe6cb712 100644 --- a/edo/src/edoBounderRng.h +++ b/edo/src/edoBounderRng.h @@ -33,7 +33,7 @@ Authors: /** A bounder that randomly draw new values for variables going out bounds, * using an eoRng to do so. * - * @ingroup Bounders + * @ingroup Repairers */ template < typename EOT > class edoBounderRng : public edoBounder< EOT > diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index a285c8bc0..7637d8336 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -32,7 +32,7 @@ Authors: /** A bounder that randomly draw new values for variables going out bounds, * in a given uniform distribution. * - * @ingroup Bounders + * @ingroup Repairers */ template < typename EOT > class edoBounderUniform : public edoBounder< EOT > From e4399683ddf67bcef11a2aba1c04a306e505a242 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 14 Sep 2011 16:30:45 +0200 Subject: [PATCH 1817/2134] Repairer operator more generic than Bounder, example with a Repairer that rounds values, a Dispatcher to call several Repairer on partial solutions --- edo/src/edo | 3 + edo/src/edoRepairer.h | 47 ++++++++++++++ edo/src/edoRepairerDispatcher.h | 110 ++++++++++++++++++++++++++++++++ edo/src/edoRepairerRound.h | 68 ++++++++++++++++++++ edo/test/CMakeLists.txt | 1 + edo/test/t-dispatcher-round.cpp | 62 ++++++++++++++++++ 6 files changed, 291 insertions(+) create mode 100644 edo/src/edoRepairer.h create mode 100644 edo/src/edoRepairerDispatcher.h create mode 100644 edo/src/edoRepairerRound.h create mode 100644 edo/test/t-dispatcher-round.cpp diff --git a/edo/src/edo b/edo/src/edo index 1a6a2c682..b19d19d97 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -56,6 +56,9 @@ Authors: #include "edoVectorBounds.h" +#include "edoRepairer.h" +#include "edoRepairerDispatcher.h" +#include "edoRepairerRound.h" #include "edoBounder.h" #include "edoBounderNo.h" #include "edoBounderBound.h" diff --git a/edo/src/edoRepairer.h b/edo/src/edoRepairer.h new file mode 100644 index 000000000..8ea2366ab --- /dev/null +++ b/edo/src/edoRepairer.h @@ -0,0 +1,47 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2011 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoRepairer_h +#define _edoRepairer_h + +#include + +/** The interface of a set of classes that modifies an unfeasible candidate + * solution so as to respect a given set of constraints and thus make a feasible + * solution. + * + * @ingroup Repairers + */ +template < typename EOT > +class edoRepairer : public eoUF< EOT&, void > +{ +public: + // virtual void operator()( EOT& ) = 0 (provided by eoUF< A1, R >) + virtual void operator()( EOT& ) {} +}; + +#endif // !_edoRepairer_h diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h new file mode 100644 index 000000000..6824d1159 --- /dev/null +++ b/edo/src/edoRepairerDispatcher.h @@ -0,0 +1,110 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2011 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoRepairerDispatcher_h +#define _edoRepairerDispatcher_h + +#include +#include +#include + +#include "edoRepairer.h" + +/** Repair a candidate solution by sequentially applying several repairers on + * subparts of the solution (subparts being defined by the corresponding set + * of indexes). + * + * Only work on EOT that implements the "push_back( EOT::AtomType )" and + * "operator[](uint)" and "at(uint)" methods. + * + * Expects _addresses_ of the repairer operators. + * + * @example t-dispatcher-round.cpp + * + * @ingroup Repairers + */ + +template < typename EOT > +class edoRepairerDispatcher + : public eoUF< EOT&, void >, + std::vector< + std::pair< std::set< unsigned int >, edoRepairer< EOT >* > + > +{ +public: + //! Empty constructor + edoRepairerDispatcher() : + std::vector< + std::pair< std::set< unsigned int >, edoRepairer< EOT >* > + >() + {} + + //! Constructor with a single index set and repairer operator + edoRepairerDispatcher( std::set idx, edoRepairer* op ) : + std::vector< + std::pair< std::set< unsigned int >, edoRepairer< EOT >* > + >() + { + this->add( idx, op ); + } + + //! Add more indexes set and their corresponding repairer operator address to the list + void add( std::set idx, edoRepairer* op ) + { + this->push_back( std::make_pair(idx, op) ); + } + + //! Repair a solution by calling several repair operator on subset of indexes + virtual void operator()( EOT& sol ) + { + // i is an iterator that points on a pair + for( typename edoRepairerDispatcher::iterator i = this->begin(); i != this->end(); ++i ) { + // a partial copy of the sol + EOT partsol; + + // j is an iterator that points on an uint + for( std::set< unsigned int >::iterator j = i->first.begin(); j != i->first.end(); ++j ) { + partsol.push_back( sol.at(*j) ); + } // for j + + // apply the repairer on the partial copy + // the repairer is a functor, thus second is callable + (*(i->second))( partsol ); + + { // copy back the repaired partial solution to sol + // browse partsol with uint k, and the idx set with an iterator (std::set is an associative tab) + unsigned int k=0; + for( std::set< unsigned int >::iterator j = i->first.begin(); j != i->first.end(); ++j ) { + sol[ *j ] = partsol[ k ]; + k++; + } // for j + } // context for k + } // for i + } +}; + +#endif // !_edoRepairerDispatcher_h diff --git a/edo/src/edoRepairerRound.h b/edo/src/edoRepairerRound.h new file mode 100644 index 000000000..032169424 --- /dev/null +++ b/edo/src/edoRepairerRound.h @@ -0,0 +1,68 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2011 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoRepairerRound_h +#define _edoRepairerRound_h + +#include + +#include "edoRepairer.h" + +/** + * + * @ingroup Repairers + */ +template < typename EOT > +class edoRepairerFloor : public edoRepairer +{ +public: + virtual void operator()( EOT& sol ) + { + for( unsigned int i=0; i < sol.size(); ++i ) { + sol[i] = floor( sol[i] ); + } + } +}; + +/** + * + * @ingroup Repairers + */ +template < typename EOT > +class edoRepairerCeil : public edoRepairer +{ +public: + virtual void operator()( EOT& sol ) + { + for( unsigned int i=0; i < sol.size(); ++i ) { + sol[i] = ceil( sol[i] ); + } + } +}; + + +#endif // !_edoRepairerRound_h diff --git a/edo/test/CMakeLists.txt b/edo/test/CMakeLists.txt index aea8eaee2..acdabc7b7 100644 --- a/edo/test/CMakeLists.txt +++ b/edo/test/CMakeLists.txt @@ -38,6 +38,7 @@ SET(SOURCES t-bounderno t-uniform t-continue + t-dispatcher-round ) FOREACH(current ${SOURCES}) diff --git a/edo/test/t-dispatcher-round.cpp b/edo/test/t-dispatcher-round.cpp new file mode 100644 index 000000000..245a2e2cb --- /dev/null +++ b/edo/test/t-dispatcher-round.cpp @@ -0,0 +1,62 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#include +#include +#include + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(void) +{ + EOT sol; + sol.push_back(1.1); + sol.push_back(1.1); + sol.push_back(3.9); + sol.push_back(3.9); + // we expect {1,2,3,4} + + edoRepairer* rep1 = new edoRepairerFloor(); + edoRepairer* rep2 = new edoRepairerCeil(); + + std::set indexes1; + indexes1.insert(0); + indexes1.insert(2); + + std::set indexes2; + indexes2.insert(1); + indexes2.insert(3); + + edoRepairerDispatcher repare( indexes1, rep1 ); + repare.add( indexes2, rep2 ); + + repare(sol); + + std::cout << sol << std::endl; + + return 0; +} From c7d060efc04d9dd7889f2f08f4869c3ffd7f7d67 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Sep 2011 17:23:23 +0200 Subject: [PATCH 1818/2134] constructors parameters in the correct order, a constructor without an edoContinue --- edo/src/edoEDA.h | 75 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index d70cd27f8..f2f21294e 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -60,32 +60,61 @@ public: /*! Takes algo operators, all are mandatory + \param evaluation Evaluate a population \param selector Selection of the best candidate solutions in the population \param estimator Estimation of the distribution parameters \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features \param distribution_continuator Stopping criterion based on the distribution features - \param evaluation Evaluate a population - \param replacor Replace old solutions by new ones */ edoEDA ( - eoSelect< EOT > & selector, - edoEstimator< D > & estimator, - edoSampler< D > & sampler, - eoContinue< EOT > & pop_continuator, - edoContinue< D > & distribution_continuator, - eoPopEvalFunc < EOT > & evaluator, - eoReplacement< EOT > & replacor - ) - : _selector(selector), - _estimator(estimator), - _sampler(sampler), - _pop_continuator(pop_continuator), - _distribution_continuator(distribution_continuator), - _evaluator(evaluator), - _replacor(replacor) + eoPopEvalFunc < EOT > & evaluator, + eoSelect< EOT > & selector, + edoEstimator< D > & estimator, + edoSampler< D > & sampler, + eoReplacement< EOT > & replacor, + eoContinue< EOT > & pop_continuator, + edoContinue< D > & distribution_continuator + ) : + _evaluator(evaluator), + _selector(selector), + _estimator(estimator), + _sampler(sampler), + _replacor(replacor), + _pop_continuator(pop_continuator), + _distribution_continuator(distribution_continuator) {} + //! edoEDA constructor without an edoContinue + /*! + Takes algo operators, all are mandatory + + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + */ + edoEDA ( + eoPopEvalFunc < EOT > & evaluator, + eoSelect< EOT > & selector, + edoEstimator< D > & estimator, + edoSampler< D > & sampler, + eoReplacement< EOT > & replacor, + eoContinue< EOT > & pop_continuator + ) : + _evaluator(evaluator), + _selector(selector), + _estimator(estimator), + _sampler(sampler), + _replacor(replacor), + _pop_continuator(pop_continuator), + _distribution_continuator( edoDummyContinue() ) + {} + + /** A basic EDA algorithm that iterates over: * selection, estimation, sampling, bounding, evaluation, replacement * @@ -135,6 +164,9 @@ public: private: + //! A full evaluation function. + eoPopEvalFunc < EOT > & _evaluator; + //! A EOT selector eoSelect < EOT > & _selector; @@ -144,17 +176,14 @@ private: //! A D sampler edoSampler< D > & _sampler; + //! A EOT replacor + eoReplacement < EOT > & _replacor; + //! A EOT population continuator eoContinue < EOT > & _pop_continuator; //! A D continuator edoContinue < D > & _distribution_continuator; - - //! A full evaluation function. - eoPopEvalFunc < EOT > & _evaluator; - - //! A EOT replacor - eoReplacement < EOT > & _replacor; }; #endif // !_edoEDA_h From 37a2c68b690ed1a609c2728bab3af5f6cc07bea0 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Sep 2011 17:27:46 +0200 Subject: [PATCH 1819/2134] code formating --- edo/src/edoSampler.h | 53 ++++------- edo/src/edoSamplerNormalMono.h | 51 ++++------ edo/src/edoSamplerNormalMulti.h | 160 ++++++++++++++++---------------- edo/src/edoSamplerUniform.h | 56 ++++------- 4 files changed, 135 insertions(+), 185 deletions(-) diff --git a/edo/src/edoSampler.h b/edo/src/edoSampler.h index 3e4dd0bde..bb0f8b6d0 100644 --- a/edo/src/edoSampler.h +++ b/edo/src/edoSampler.h @@ -30,7 +30,7 @@ Authors: #include -#include "edoBounder.h" +#include "edoRepairer.h" #include "edoBounderNo.h" //! edoSampler< D > @@ -41,47 +41,34 @@ class edoSampler : public eoUF< D&, typename D::EOType > public: typedef typename D::EOType EOType; - edoSampler(edoBounder< EOType > & bounder) - : /*_dummy_bounder(),*/ _bounder(bounder) + edoSampler(edoRepairer< EOType > & repairer) + : _dummy_repairer(), _repairer(repairer) {} - /* + edoSampler() - : _dummy_bounder(), _bounder( _dummy_bounder ) + : _dummy_repairer(), _repairer( _dummy_repairer ) {} - */ + // virtual EOType operator()( D& ) = 0 (provided by eoUF< A1, R >) EOType operator()( D& distrib ) { - unsigned int size = distrib.size(); - assert(size > 0); + unsigned int size = distrib.size(); + assert(size > 0); + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + // the sample method is implemented in the derivated class + EOType solution(sample(distrib)); - //------------------------------------------------------------- - // Point we want to sample to get higher a set of points - // (coordinates in n dimension) - // x = {x1, x2, ..., xn} - // the sample method is implemented in the derivated class - //------------------------------------------------------------- + // Now we are bounding the distribution thanks to min and max + // parameters. + _repairer(solution); - EOType solution(sample(distrib)); - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Now we are bounding the distribution thanks to min and max - // parameters. - //------------------------------------------------------------- - - _bounder(solution); - - //------------------------------------------------------------- - - - return solution; + return solution; } protected: @@ -89,10 +76,10 @@ protected: virtual EOType sample( D& ) = 0; private: - //edoBounderNo _dummy_bounder; + edoBounderNo _dummy_repairer; - //! Bounder functor - edoBounder< EOType > & _bounder; + //! repairer functor + edoRepairer< EOType > & _repairer; }; diff --git a/edo/src/edoSamplerNormalMono.h b/edo/src/edoSamplerNormalMono.h index b52ad2836..5233e9c89 100644 --- a/edo/src/edoSamplerNormalMono.h +++ b/edo/src/edoSamplerNormalMono.h @@ -45,46 +45,31 @@ class edoSamplerNormalMono : public edoSampler< edoNormalMono< EOT > > public: typedef typename EOT::AtomType AtomType; - edoSamplerNormalMono( edoBounder< EOT > & bounder ) - : edoSampler< edoNormalMono< EOT > >( bounder ) - {} + edoSamplerNormalMono( edoRepairer & repairer ) : edoSampler( repairer) {} EOT sample( edoNormalMono< EOT >& distrib ) { - unsigned int size = distrib.size(); - assert(size > 0); + unsigned int size = distrib.size(); + assert(size > 0); + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + EOT solution; + + // Sampling all dimensions + for (unsigned int i = 0; i < size; ++i) + { + AtomType mean = distrib.mean()[i]; + AtomType variance = distrib.variance()[i]; + AtomType random = rng.normal(mean, variance); - //------------------------------------------------------------- - // Point we want to sample to get higher a set of points - // (coordinates in n dimension) - // x = {x1, x2, ..., xn} - //------------------------------------------------------------- + assert(variance >= 0); - EOT solution; + solution.push_back(random); + } - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Sampling all dimensions - //------------------------------------------------------------- - - for (unsigned int i = 0; i < size; ++i) - { - AtomType mean = distrib.mean()[i]; - AtomType variance = distrib.variance()[i]; - AtomType random = rng.normal(mean, variance); - - assert(variance >= 0); - - solution.push_back(random); - } - - //------------------------------------------------------------- - - - return solution; + return solution; } }; diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 2601ea77e..a73a266de 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -40,136 +40,138 @@ class edoSamplerNormalMulti : public edoSampler< edoNormalMulti< EOT > > public: typedef typename EOT::AtomType AtomType; + edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler( repairer) {} + class Cholesky { public: - Cholesky( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) - { - unsigned int Vl = V.size1(); + Cholesky( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) + { + unsigned int Vl = V.size1(); - assert(Vl > 0); + assert(Vl > 0); - unsigned int Vc = V.size2(); + unsigned int Vc = V.size2(); - assert(Vc > 0); + assert(Vc > 0); - assert( Vl == Vc ); + assert( Vl == Vc ); - _L.resize(Vl); + _L.resize(Vl); - unsigned int i,j,k; + unsigned int i,j,k; - // first column - i=0; + // first column + i=0; - // diagonal - j=0; - _L(0, 0) = sqrt( V(0, 0) ); + // diagonal + j=0; + _L(0, 0) = sqrt( V(0, 0) ); - // end of the column - for ( j = 1; j < Vc; ++j ) - { - _L(j, 0) = V(0, j) / _L(0, 0); - } + // end of the column + for ( j = 1; j < Vc; ++j ) + { + _L(j, 0) = V(0, j) / _L(0, 0); + } - // end of the matrix - for ( i = 1; i < Vl; ++i ) // each column - { + // end of the matrix + for ( i = 1; i < Vl; ++i ) // each column + { - // diagonal - double sum = 0.0; + // diagonal + double sum = 0.0; - for ( k = 0; k < i; ++k) - { - sum += _L(i, k) * _L(i, k); - } + for ( k = 0; k < i; ++k) + { + sum += _L(i, k) * _L(i, k); + } - _L(i,i) = sqrt( fabs( V(i,i) - sum) ); + _L(i,i) = sqrt( fabs( V(i,i) - sum) ); - for ( j = i + 1; j < Vl; ++j ) // rows - { - // one element - sum = 0.0; + for ( j = i + 1; j < Vl; ++j ) // rows + { + // one element + sum = 0.0; - for ( k = 0; k < i; ++k ) - { - sum += _L(j, k) * _L(i, k); - } + for ( k = 0; k < i; ++k ) + { + sum += _L(j, k) * _L(i, k); + } - _L(j, i) = (V(j, i) - sum) / _L(i, i); - } - } - } + _L(j, i) = (V(j, i) - sum) / _L(i, i); + } + } + } - const ublas::symmetric_matrix< AtomType, ublas::lower >& get_L() const {return _L;} + const ublas::symmetric_matrix< AtomType, ublas::lower >& get_L() const {return _L;} private: - ublas::symmetric_matrix< AtomType, ublas::lower > _L; + ublas::symmetric_matrix< AtomType, ublas::lower > _L; }; edoSamplerNormalMulti( edoBounder< EOT > & bounder ) - : edoSampler< edoNormalMulti< EOT > >( bounder ) + : edoSampler< edoNormalMulti< EOT > >( bounder ) {} EOT sample( edoNormalMulti< EOT >& distrib ) { - unsigned int size = distrib.size(); + unsigned int size = distrib.size(); - assert(size > 0); + assert(size > 0); - //------------------------------------------------------------- - // Cholesky factorisation gererating matrix L from covariance - // matrix V. - // We must use cholesky.get_L() to get the resulting matrix. - // - // L = cholesky decomposition of varcovar - //------------------------------------------------------------- + //------------------------------------------------------------- + // Cholesky factorisation gererating matrix L from covariance + // matrix V. + // We must use cholesky.get_L() to get the resulting matrix. + // + // L = cholesky decomposition of varcovar + //------------------------------------------------------------- - Cholesky cholesky( distrib.varcovar() ); - ublas::symmetric_matrix< AtomType, ublas::lower > L = cholesky.get_L(); + Cholesky cholesky( distrib.varcovar() ); + ublas::symmetric_matrix< AtomType, ublas::lower > L = cholesky.get_L(); - //------------------------------------------------------------- + //------------------------------------------------------------- - //------------------------------------------------------------- - // T = vector of size elements drawn in N(0,1) rng.normal(1.0) - //------------------------------------------------------------- + //------------------------------------------------------------- + // T = vector of size elements drawn in N(0,1) rng.normal(1.0) + //------------------------------------------------------------- - ublas::vector< AtomType > T( size ); + ublas::vector< AtomType > T( size ); - for ( unsigned int i = 0; i < size; ++i ) - { - T( i ) = rng.normal( 1.0 ); - } + for ( unsigned int i = 0; i < size; ++i ) + { + T( i ) = rng.normal( 1.0 ); + } - //------------------------------------------------------------- + //------------------------------------------------------------- - //------------------------------------------------------------- - // LT = prod( L, T ) - //------------------------------------------------------------- + //------------------------------------------------------------- + // LT = prod( L, T ) + //------------------------------------------------------------- - ublas::vector< AtomType > LT = ublas::prod( L, T ); + ublas::vector< AtomType > LT = ublas::prod( L, T ); - //------------------------------------------------------------- + //------------------------------------------------------------- - //------------------------------------------------------------- - // solution = means + LT - //------------------------------------------------------------- + //------------------------------------------------------------- + // solution = means + LT + //------------------------------------------------------------- - ublas::vector< AtomType > mean = distrib.mean(); + ublas::vector< AtomType > mean = distrib.mean(); - ublas::vector< AtomType > ublas_solution = mean + LT; + ublas::vector< AtomType > ublas_solution = mean + LT; - EOT solution( size ); + EOT solution( size ); - std::copy( ublas_solution.begin(), ublas_solution.end(), solution.begin() ); + std::copy( ublas_solution.begin(), ublas_solution.end(), solution.begin() ); - //------------------------------------------------------------- + //------------------------------------------------------------- - return solution; + return solution; } }; diff --git a/edo/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h index dbb8f4124..8506ee545 100644 --- a/edo/src/edoSamplerUniform.h +++ b/edo/src/edoSamplerUniform.h @@ -44,52 +44,28 @@ class edoSamplerUniform : public edoSampler< edoUniform< EOT > > public: typedef D Distrib; - edoSamplerUniform(edoBounder< EOT > & bounder) - : edoSampler< edoUniform >(bounder) // FIXME: Why D is not used here ? - {} - - /* - edoSamplerUniform() - : edoSampler< edoUniform >() - {} - */ + edoSamplerUniform( edoRepairer & repairer ) : edoSampler( repairer) {} EOT sample( edoUniform< EOT >& distrib ) { - unsigned int size = distrib.size(); - assert(size > 0); + unsigned int size = distrib.size(); + assert(size > 0); + // Point we want to sample to get higher a set of points + // (coordinates in n dimension) + // x = {x1, x2, ..., xn} + EOT solution; - //------------------------------------------------------------- - // Point we want to sample to get higher a set of points - // (coordinates in n dimension) - // x = {x1, x2, ..., xn} - //------------------------------------------------------------- + // Sampling all dimensions + for (unsigned int i = 0; i < size; ++i) + { + double min = distrib.min()[i]; + double max = distrib.max()[i]; + double random = rng.uniform(min, max); + solution.push_back(random); + } - EOT solution; - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Sampling all dimensions - //------------------------------------------------------------- - - for (unsigned int i = 0; i < size; ++i) - { - double min = distrib.min()[i]; - double max = distrib.max()[i]; - double random = rng.uniform(min, max); - - assert(min <= random && random <= max); - - solution.push_back(random); - } - - //------------------------------------------------------------- - - - return solution; + return solution; } }; From 2bc68f94a6f0123c014643b28f0f25661666442a Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Sep 2011 17:34:57 +0200 Subject: [PATCH 1820/2134] add edoBounderUniform.h --- edo/src/edo | 1 + 1 file changed, 1 insertion(+) diff --git a/edo/src/edo b/edo/src/edo index b19d19d97..69f13f116 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -63,6 +63,7 @@ Authors: #include "edoBounderNo.h" #include "edoBounderBound.h" #include "edoBounderRng.h" +#include "edoBounderUniform.h" #include "edoContinue.h" #include "utils/edoCheckPoint.h" From c1d49d7bd20298d40abf679e6f53f01b039511d2 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Sep 2011 17:44:55 +0200 Subject: [PATCH 1821/2134] use default typename for distrib, correct constructor superclass init --- edo/src/edoSamplerNormalMono.h | 6 +++--- edo/src/edoSamplerNormalMulti.h | 6 +++--- edo/src/edoSamplerUniform.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/edo/src/edoSamplerNormalMono.h b/edo/src/edoSamplerNormalMono.h index 5233e9c89..b3162f92f 100644 --- a/edo/src/edoSamplerNormalMono.h +++ b/edo/src/edoSamplerNormalMono.h @@ -39,13 +39,13 @@ Authors: * This class uses the NormalMono distribution parameters (bounds) to return * a random position used for population sampling. */ -template < typename EOT > -class edoSamplerNormalMono : public edoSampler< edoNormalMono< EOT > > +template < typename EOT, typename D = edoNormalMono< EOT > > +class edoSamplerNormalMono : public edoSampler< D > { public: typedef typename EOT::AtomType AtomType; - edoSamplerNormalMono( edoRepairer & repairer ) : edoSampler( repairer) {} + edoSamplerNormalMono( edoRepairer & repairer ) : edoSampler< D >( repairer) {} EOT sample( edoNormalMono< EOT >& distrib ) { diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index a73a266de..7c08d22b5 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -34,13 +34,13 @@ Authors: //! edoSamplerNormalMulti< EOT > -template< class EOT > -class edoSamplerNormalMulti : public edoSampler< edoNormalMulti< EOT > > +template< class EOT, typename D = edoNormalMulti< EOT > > +class edoSamplerNormalMulti : public edoSampler< D > { public: typedef typename EOT::AtomType AtomType; - edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler( repairer) {} + edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler< D >( repairer) {} class Cholesky { diff --git a/edo/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h index 8506ee545..44a59ea87 100644 --- a/edo/src/edoSamplerUniform.h +++ b/edo/src/edoSamplerUniform.h @@ -38,13 +38,13 @@ Authors: * This class uses the Uniform distribution parameters (bounds) to return * a random position used for population sampling. */ -template < typename EOT, class D=edoUniform > // FIXME: D template name is there really used ?!? -class edoSamplerUniform : public edoSampler< edoUniform< EOT > > +template < typename EOT, class D = edoUniform > +class edoSamplerUniform : public edoSampler< D > { public: typedef D Distrib; - edoSamplerUniform( edoRepairer & repairer ) : edoSampler( repairer) {} + edoSamplerUniform( edoRepairer & repairer ) : edoSampler< D >( repairer) {} EOT sample( edoUniform< EOT >& distrib ) { From 6fb123f2be6f7cc45d1e1c432bbf4caf0a36017d Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Sep 2011 17:47:24 +0200 Subject: [PATCH 1822/2134] dispatcher inherits from repairer and not from UF --- edo/src/edoRepairerDispatcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 6824d1159..3f873ec7c 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -50,7 +50,7 @@ Authors: template < typename EOT > class edoRepairerDispatcher - : public eoUF< EOT&, void >, + : public edoRepairer, std::vector< std::pair< std::set< unsigned int >, edoRepairer< EOT >* > > From 54224807f57645a5c739f0750253c3061214bde7 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 22 Sep 2011 11:53:59 +0200 Subject: [PATCH 1823/2134] constructor for EDA without a needed edoContinue --- edo/src/edoEDA.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index f2f21294e..f94e828f5 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -83,6 +83,7 @@ public: _sampler(sampler), _replacor(replacor), _pop_continuator(pop_continuator), + _dummy_continue(), _distribution_continuator(distribution_continuator) {} @@ -111,7 +112,8 @@ public: _sampler(sampler), _replacor(replacor), _pop_continuator(pop_continuator), - _distribution_continuator( edoDummyContinue() ) + _dummy_continue(), + _distribution_continuator( _dummy_continue ) {} @@ -182,8 +184,12 @@ private: //! A EOT population continuator eoContinue < EOT > & _pop_continuator; + //! A D continuator that always return true + edoDummyContinue _dummy_continue; + //! A D continuator edoContinue < D > & _distribution_continuator; + }; #endif // !_edoEDA_h From 90e67e46d2fbb4adfac37ed18d2773c0b8cae32a Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 22 Sep 2011 11:55:10 +0200 Subject: [PATCH 1824/2134] indent --- edo/src/edoEstimatorNormalMono.h | 68 ++++++++++++++++---------------- edo/src/edoUniform.h | 2 +- edo/src/edoVectorBounds.h | 10 ++--- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/edo/src/edoEstimatorNormalMono.h b/edo/src/edoEstimatorNormalMono.h index 6a42114b5..c5ddade40 100644 --- a/edo/src/edoEstimatorNormalMono.h +++ b/edo/src/edoEstimatorNormalMono.h @@ -42,57 +42,57 @@ public: class Variance { public: - Variance() : _sumvar(0){} + Variance() : _sumvar(0){} - void update(AtomType v) - { - _n++; + void update(AtomType v) + { + _n++; - AtomType d = v - _mean; + AtomType d = v - _mean; - _mean += 1 / _n * d; - _sumvar += (_n - 1) / _n * d * d; - } + _mean += 1 / _n * d; + _sumvar += (_n - 1) / _n * d * d; + } - AtomType get_mean() const {return _mean;} - AtomType get_var() const {return _sumvar / (_n - 1);} - AtomType get_std() const {return sqrt( get_var() );} + AtomType get_mean() const {return _mean;} + AtomType get_var() const {return _sumvar / (_n - 1);} + AtomType get_std() const {return sqrt( get_var() );} private: - AtomType _n; - AtomType _mean; - AtomType _sumvar; + AtomType _n; + AtomType _mean; + AtomType _sumvar; }; public: edoNormalMono< EOT > operator()(eoPop& pop) { - unsigned int popsize = pop.size(); - assert(popsize > 0); + unsigned int popsize = pop.size(); + assert(popsize > 0); - unsigned int dimsize = pop[0].size(); - assert(dimsize > 0); + unsigned int dimsize = pop[0].size(); + assert(dimsize > 0); - std::vector< Variance > var( dimsize ); + std::vector< Variance > var( dimsize ); - for (unsigned int i = 0; i < popsize; ++i) - { - for (unsigned int d = 0; d < dimsize; ++d) - { - var[d].update( pop[i][d] ); - } - } + for (unsigned int i = 0; i < popsize; ++i) + { + for (unsigned int d = 0; d < dimsize; ++d) + { + var[d].update( pop[i][d] ); + } + } - EOT mean( dimsize ); - EOT variance( dimsize ); + EOT mean( dimsize ); + EOT variance( dimsize ); - for (unsigned int d = 0; d < dimsize; ++d) - { - mean[d] = var[d].get_mean(); - variance[d] = var[d].get_var(); - } + for (unsigned int d = 0; d < dimsize; ++d) + { + mean[d] = var[d].get_mean(); + variance[d] = var[d].get_var(); + } - return edoNormalMono< EOT >( mean, variance ); + return edoNormalMono< EOT >( mean, variance ); } }; diff --git a/edo/src/edoUniform.h b/edo/src/edoUniform.h index 37bf065b8..3317e1afe 100644 --- a/edo/src/edoUniform.h +++ b/edo/src/edoUniform.h @@ -38,7 +38,7 @@ class edoUniform : public edoDistrib< EOT >, public edoVectorBounds< EOT > { public: edoUniform(EOT min, EOT max) - : edoVectorBounds< EOT >(min, max) + : edoVectorBounds< EOT >(min, max) {} }; diff --git a/edo/src/edoVectorBounds.h b/edo/src/edoVectorBounds.h index 635132cd4..4fc64aa68 100644 --- a/edo/src/edoVectorBounds.h +++ b/edo/src/edoVectorBounds.h @@ -35,10 +35,10 @@ class edoVectorBounds { public: edoVectorBounds(EOT min, EOT max) - : _min(min), _max(max) + : _min(min), _max(max) { - assert(_min.size() > 0); - assert(_min.size() == _max.size()); + assert(_min.size() > 0); + assert(_min.size() == _max.size()); } EOT min(){return _min;} @@ -46,8 +46,8 @@ public: unsigned int size() { - assert(_min.size() == _max.size()); - return _min.size(); + assert(_min.size() == _max.size()); + return _min.size(); } private: From e7791bb4dfc1539263bddf6258b4fb6c19e164f8 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 22 Sep 2011 11:56:26 +0200 Subject: [PATCH 1825/2134] separate empty/parametrized constructors in Bounder --- edo/src/edoBounder.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/edo/src/edoBounder.h b/edo/src/edoBounder.h index 471e47f9d..8f418aa8d 100644 --- a/edo/src/edoBounder.h +++ b/edo/src/edoBounder.h @@ -39,7 +39,11 @@ template < typename EOT > class edoBounder : public edoRepairer< EOT > { public: - edoBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) + edoBounder() + {} + + + edoBounder( EOT min/* = EOT(1, 0)*/, EOT max/* = EOT(1, 1)*/ ) : _min(min), _max(max) { assert(_min.size() > 0); From 712098a5cd7448812b9b243563ab10101642cb27 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 22 Sep 2011 11:57:31 +0200 Subject: [PATCH 1826/2134] more asserts in RepairerDispatcher and BounderUniform --- edo/src/edoBounderUniform.h | 10 +++++++--- edo/src/edoRepairerDispatcher.h | 17 +++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index 7637d8336..c90317c7a 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -40,13 +40,17 @@ class edoBounderUniform : public edoBounder< EOT > public: edoBounderUniform( EOT min, EOT max ) : edoBounder< EOT >( min, max ) - {} + { + } void operator()( EOT& sol ) { - unsigned int size = sol.size(); - assert(size > 0); + assert( this->min().size() > 0 ); + assert( this->max().size() > 0 ); + assert( sol.size() > 0); + + unsigned int size = sol.size(); for (unsigned int d = 0; d < size; ++d) { if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 3f873ec7c..96c07da5d 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -75,35 +75,40 @@ public: //! Add more indexes set and their corresponding repairer operator address to the list void add( std::set idx, edoRepairer* op ) { + assert( idx.size() > 0 ); + assert( op != NULL ); + this->push_back( std::make_pair(idx, op) ); } //! Repair a solution by calling several repair operator on subset of indexes virtual void operator()( EOT& sol ) { - // i is an iterator that points on a pair - for( typename edoRepairerDispatcher::iterator i = this->begin(); i != this->end(); ++i ) { + // ipair is an iterator that points on a pair + for( typename edoRepairerDispatcher::iterator ipair = this->begin(); ipair != this->end(); ++ipair ) { // a partial copy of the sol EOT partsol; // j is an iterator that points on an uint - for( std::set< unsigned int >::iterator j = i->first.begin(); j != i->first.end(); ++j ) { + for( std::set< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { partsol.push_back( sol.at(*j) ); } // for j + assert( partsol.size() > 0 ); + // apply the repairer on the partial copy // the repairer is a functor, thus second is callable - (*(i->second))( partsol ); + (*(ipair->second))( partsol ); { // copy back the repaired partial solution to sol // browse partsol with uint k, and the idx set with an iterator (std::set is an associative tab) unsigned int k=0; - for( std::set< unsigned int >::iterator j = i->first.begin(); j != i->first.end(); ++j ) { + for( std::set< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { sol[ *j ] = partsol[ k ]; k++; } // for j } // context for k - } // for i + } // for ipair } }; From 1c4cdae6636fcd193e6e6d809236d3ef218a70ad Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 2 Oct 2011 15:44:51 +0200 Subject: [PATCH 1827/2134] use the logger to print warnings --- eo/src/utils/eoParser.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 97c4b3d5a..135402927 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -35,16 +35,11 @@ #include #include - #include +#include using namespace std; -void eoWarning(std::string str) -{ - cout << str << '\n'; -} - std::ostream& printSectionHeader(std::ostream& os, std::string section) { if (section == "") @@ -117,7 +112,6 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, } - eoParam * eoParser::getParamWithLongName(const std::string& _name) const { typedef std::multimap MultiMapType; @@ -130,7 +124,6 @@ eoParam * eoParser::getParamWithLongName(const std::string& _name) const } - void eoParser::processParam(eoParam& param, std::string section) { // this param enters the parser: add the prefix to the long name @@ -214,7 +207,7 @@ void eoParser::readFrom(istream& is) { if (str.size() < 2) { - eoWarning("Missing parameter"); + eo::log << eo::warnings << "Missing parameter" << std::endl; needHelp.value() = true; return; } From ae919bc7123dae7c421f978df2813c5594834843 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 2 Oct 2011 22:22:18 +0200 Subject: [PATCH 1828/2134] shortcut to get a param value --- eo/src/utils/eoParser.cpp | 6 ++++++ eo/src/utils/eoParser.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 135402927..e97a2a2e7 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -112,6 +112,12 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, } +std::string eoParser::get( const std::string & name) const +{ + return getParamWithLongName( name )->getValue(); +} + + eoParam * eoParser::getParamWithLongName(const std::string& _name) const { typedef std::multimap MultiMapType; diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 0088ff4f1..48b18e915 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -156,6 +156,10 @@ public: virtual bool isItThere(eoParam& _param) const { return getValue(_param).first; } + + std::string get( const std::string & name) const; + + /** * get a handle on a param from its longName * From 59448b9635a1cb4e0dcc659c69935a0193cb7d7e Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 4 Oct 2011 21:43:53 +0200 Subject: [PATCH 1829/2134] more doc on the parser format --- eo/src/utils/eoParser.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 48b18e915..e65f7566e 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -97,6 +97,11 @@ private : This class is persistent, so it can be stored and reloaded to restore parameter settings. + Parameters can be read from argv, strings or streams, and must be specified + using the following convention: --name=value or -n=value + + You should not use space as a separator between the parameter and its value. + @ingroup Parameters */ class eoParser : public eoParameterLoader, public eoObject, public eoPersistent From 277a77c8a1009c65fac69368f455e8a187cb167e Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 6 Oct 2011 16:40:45 +0200 Subject: [PATCH 1830/2134] size_t -> std::size_t + header --- eo/src/eoFunctorStore.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/eoFunctorStore.cpp b/eo/src/eoFunctorStore.cpp index cb8d1a574..43cd778cd 100644 --- a/eo/src/eoFunctorStore.cpp +++ b/eo/src/eoFunctorStore.cpp @@ -3,6 +3,8 @@ #pragma warning(disable:4786) #endif +#include + #include #include @@ -10,7 +12,7 @@ /// clears the memory eoFunctorStore::~eoFunctorStore() { - for(size_t i = 0; i < vec.size(); ++i) { + for( std::size_t i = 0; i < vec.size(); ++i) { delete vec[i]; } } From 0f6aa0581bb7792a6cf93886bb53f0d10e9a979d Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 7 Oct 2011 15:12:14 +0200 Subject: [PATCH 1831/2134] conditionnal compilation to __UNIX__ with warning on other systems --- eo/src/eoEvalUserTimeThrowException.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index 5d1f4c8a0..0da39e57e 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -21,6 +21,13 @@ Authors: Johann DrĂ©o */ +#ifndef __UNIX__ +#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX systems (defining 'rusage' in 'sys/resource.h'), contributions for other systems are welcomed." +#else + +#ifndef __EOEVALUSERTIMETHROWEXCEPTION_H__ +#define __EOEVALUSERTIMETHROWEXCEPTION_H__ + #include #include @@ -60,3 +67,6 @@ protected: const long _max; struct rusage _usage; }; + +#endif // __EOEVALUSERTIMETHROWEXCEPTION_H__ +#endif // __UNIX__ From 5c7f3835f2036f021459d03514b0aa75082bea93 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 10 Oct 2011 21:11:03 +0200 Subject: [PATCH 1832/2134] be sure that we fill the line with space when saving the status file --- eo/src/utils/eoParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index e97a2a2e7..fc1068b32 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -289,7 +289,7 @@ void eoParser::printOn(ostream& os) const string str = "--" + param->longName() + "=" + param->getValue(); os.setf(ios_base::left, ios_base::adjustfield); - os << setw(40) << str; + os << setfill(' ') << setw(40) << str; os << setw(0) << " # "; if (param->shortName()) From ea17fb07ad325843b682656c86a3c39fd3330948 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 10 Oct 2011 21:15:19 +0200 Subject: [PATCH 1833/2134] useless assert --- edo/src/edoSamplerUniform.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/edo/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h index 44a59ea87..396a0d08f 100644 --- a/edo/src/edoSamplerUniform.h +++ b/edo/src/edoSamplerUniform.h @@ -58,12 +58,15 @@ public: // Sampling all dimensions for (unsigned int i = 0; i < size; ++i) - { + { double min = distrib.min()[i]; double max = distrib.max()[i]; double random = rng.uniform(min, max); + + assert( min < random && random < max); + solution.push_back(random); - } + } return solution; } From edc38e53943e62be2c07934e3d572286b1859a80 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 10 Oct 2011 22:20:39 +0200 Subject: [PATCH 1834/2134] it's __unix__, not __UNIX__ --- eo/src/eoEvalUserTimeThrowException.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index 0da39e57e..87e47ac54 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -21,7 +21,7 @@ Authors: Johann DrĂ©o */ -#ifndef __UNIX__ +#ifndef __unix__ #warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX systems (defining 'rusage' in 'sys/resource.h'), contributions for other systems are welcomed." #else From 0ec2cb51b033be85dd414b6d5c56fd525caddcb1 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 11 Oct 2011 18:46:26 +0200 Subject: [PATCH 1835/2134] more explanations about eoScalarFitness --- eo/src/eoScalarFitness.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/eo/src/eoScalarFitness.h b/eo/src/eoScalarFitness.h index f3a3a4bba..31a9dbffe 100644 --- a/eo/src/eoScalarFitness.h +++ b/eo/src/eoScalarFitness.h @@ -34,11 +34,16 @@ */ /** - * eoScalarFitness >: * Wraps a scalar fitness values such as a double or int, with the option of * maximizing (using less) or minimizing (using greater) - - * It overrides operator<() to use the Compare template argument + * + * It overrides operator<() to use the Compare template argument. Thus, if you + * need to compare if an indiv1 is "better" than an indiv2, you can use: + * if( indiv1 > indiv2 ) { + * // indiv1 is better + * } else { + * // indiv2 is better + * } * * Suitable constructors and assignments and casts are defined to work * with this quantity as if it were a ScalarType. @@ -57,6 +62,13 @@ class eoScalarFitness eoScalarFitness& operator=(const ScalarType& v) { value = v; return *this; } + /** Conversion operator: it permits to use a fitness instance as its scalar + * type, if needed. For example, this is possible: + * eoScalarFitness > fit; + * double val = 1.0; + * fit = val; + * val = fit; + */ operator ScalarType(void) const { return value; } /// Comparison, using less by default @@ -83,13 +95,13 @@ class eoScalarFitness * */ + /** Typedefs for fitness comparison, Maximizing Fitness compares with less, and minimizing fitness compares with greater. This because we want ordinary fitness values (doubles) to be equivalent with Maximizing Fitness, and comparing with less is the default behaviour. */ - #if defined(__CUDACC__) typedef eoScalarFitness > eoMaximizingFitness; typedef eoScalarFitness > eoMinimizingFitness; From 99d1a08e7c0d417f1a2898fd4cc2463813953e18 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 14 Oct 2011 10:34:33 +0200 Subject: [PATCH 1836/2134] repairer dispatcher may be used with an unordered vector of indexes, thus we use a vector and not a set --- edo/src/edoRepairerDispatcher.h | 17 ++++++++--------- edo/test/t-dispatcher-round.cpp | 12 ++++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 96c07da5d..5c4aa7d8a 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -29,7 +29,6 @@ Authors: #define _edoRepairerDispatcher_h #include -#include #include #include "edoRepairer.h" @@ -52,28 +51,28 @@ template < typename EOT > class edoRepairerDispatcher : public edoRepairer, std::vector< - std::pair< std::set< unsigned int >, edoRepairer< EOT >* > + std::pair< std::vector< unsigned int >, edoRepairer< EOT >* > > { public: //! Empty constructor edoRepairerDispatcher() : std::vector< - std::pair< std::set< unsigned int >, edoRepairer< EOT >* > + std::pair< std::vector< unsigned int >, edoRepairer< EOT >* > >() {} //! Constructor with a single index set and repairer operator - edoRepairerDispatcher( std::set idx, edoRepairer* op ) : + edoRepairerDispatcher( std::vector idx, edoRepairer* op ) : std::vector< - std::pair< std::set< unsigned int >, edoRepairer< EOT >* > + std::pair< std::vector< unsigned int >, edoRepairer< EOT >* > >() { this->add( idx, op ); } //! Add more indexes set and their corresponding repairer operator address to the list - void add( std::set idx, edoRepairer* op ) + void add( std::vector idx, edoRepairer* op ) { assert( idx.size() > 0 ); assert( op != NULL ); @@ -90,7 +89,7 @@ public: EOT partsol; // j is an iterator that points on an uint - for( std::set< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { + for( std::vector< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { partsol.push_back( sol.at(*j) ); } // for j @@ -101,9 +100,9 @@ public: (*(ipair->second))( partsol ); { // copy back the repaired partial solution to sol - // browse partsol with uint k, and the idx set with an iterator (std::set is an associative tab) + // browse partsol with uint k, and the idx set with an iterator (std::vector is an associative tab) unsigned int k=0; - for( std::set< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { + for( std::vector< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { sol[ *j ] = partsol[ k ]; k++; } // for j diff --git a/edo/test/t-dispatcher-round.cpp b/edo/test/t-dispatcher-round.cpp index 245a2e2cb..89fc16449 100644 --- a/edo/test/t-dispatcher-round.cpp +++ b/edo/test/t-dispatcher-round.cpp @@ -43,13 +43,13 @@ int main(void) edoRepairer* rep1 = new edoRepairerFloor(); edoRepairer* rep2 = new edoRepairerCeil(); - std::set indexes1; - indexes1.insert(0); - indexes1.insert(2); + std::vector indexes1; + indexes1.push_back(0); + indexes1.push_back(2); - std::set indexes2; - indexes2.insert(1); - indexes2.insert(3); + std::vector indexes2; + indexes2.push_back(1); + indexes2.push_back(3); edoRepairerDispatcher repare( indexes1, rep1 ); repare.add( indexes2, rep2 ); From ea98e9b3f4f2254f221c9536961104ecc18066c4 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 17 Oct 2011 14:42:25 +0200 Subject: [PATCH 1837/2134] bugfix assert was too restrictive in the uniform sampler, when min==max, the number drawn can be <= max --- edo/src/edoSamplerUniform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h index 396a0d08f..6821e8fa2 100644 --- a/edo/src/edoSamplerUniform.h +++ b/edo/src/edoSamplerUniform.h @@ -63,7 +63,7 @@ public: double max = distrib.max()[i]; double random = rng.uniform(min, max); - assert( min < random && random < max); + assert( min == random && random == max || min <= random && random < max); // random in [ min, max [ solution.push_back(random); } From c0ba29d4a3d52060e7a785b5f0a0ebfa60a19c1e Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 19 Oct 2011 11:32:20 +0200 Subject: [PATCH 1838/2134] explicit parenthesis for the assert in edoSamplerUniform --- edo/src/edoSamplerUniform.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/edo/src/edoSamplerUniform.h b/edo/src/edoSamplerUniform.h index 6821e8fa2..4edf4323d 100644 --- a/edo/src/edoSamplerUniform.h +++ b/edo/src/edoSamplerUniform.h @@ -37,6 +37,12 @@ Authors: * edoSamplerUniform * This class uses the Uniform distribution parameters (bounds) to return * a random position used for population sampling. + * + * Returns a random number in [min,max[ for each variable defined by the given + * distribution. + * + * Note: if the distribution given at call defines a min==max for one of the + * variable, the result will be the same number. */ template < typename EOT, class D = edoUniform > class edoSamplerUniform : public edoSampler< D > @@ -63,7 +69,7 @@ public: double max = distrib.max()[i]; double random = rng.uniform(min, max); - assert( min == random && random == max || min <= random && random < max); // random in [ min, max [ + assert( ( min == random && random == max ) || ( min <= random && random < max) ); // random in [ min, max [ solution.push_back(random); } From e2c680e847e1ca84bc92f72988c21a9c23c1edf6 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 25 Oct 2011 20:33:20 +0200 Subject: [PATCH 1839/2134] + FindEO.cmake --- eo/cmake/modules/FindEO.cmake | 100 ++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 eo/cmake/modules/FindEO.cmake diff --git a/eo/cmake/modules/FindEO.cmake b/eo/cmake/modules/FindEO.cmake new file mode 100644 index 000000000..0ca6a0178 --- /dev/null +++ b/eo/cmake/modules/FindEO.cmake @@ -0,0 +1,100 @@ +# File: FindEO.cmake +# CMAKE commands to actually use the EO library +# Version: 0.0.1 +# +# The following variables are filled out: +# - EO_INCLUDE_DIR +# - EO_LIBRARY_DIR +# - EO_LIBRARIES +# - EO_FOUND +# +# Here are the components: +# - PyEO +# - es +# - ga +# - cma +# +# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components. +# + +# Default enabled components +SET(EO_LIBRARIES_TO_FIND eo eoutils) + +# Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules +IF(EO_FIND_COMPONENTS) + FOREACH(component ${EO_FIND_COMPONENTS}) + STRING(TOUPPER ${component} _COMPONENT) + SET(EO_USE_${_COMPONENT} 1) + ENDFOREACH(component) + + # To make sure we don't use PyEO, ES, GA, CMA when not in COMPONENTS + IF(NOT EO_USE_PYEO) + SET(EO_DONT_USE_PYEO 1) + ELSE(NOT EO_USE_PYEO) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO) + ENDIF(NOT EO_USE_PYEO) + + IF(NOT EO_USE_ES) + SET(EO_DONT_USE_ES 1) + ELSE(NOT EO_USE_ES) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es) + ENDIF(NOT EO_USE_ES) + + IF(NOT EO_USE_GA) + SET(EO_DONT_USE_GA 1) + ELSE(NOT EO_USE_GA) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} ga) + ENDIF(NOT EO_USE_GA) + + IF(NOT EO_USE_CMA) + SET(EO_DONT_USE_CMA 1) + ELSE(NOT EO_USE_CMA) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma) + ENDIF(NOT EO_USE_CMA) +ENDIF(EO_FIND_COMPONENTS) + +IF(NOT EO_INCLUDE_DIR) + FIND_PATH( + EO_INCLUDE_DIR + EO.h + PATHS + /usr/include/eo + /usr/local/include/eo + ) +ENDIF(NOT EO_INCLUDE_DIR) + +IF(NOT EO_LIBRARY_DIR) + FIND_PATH( + EO_LIBRARY_DIR + libeo.a + PATHS + /usr/lib + /usr/local/lib + ) +ENDIF(NOT EO_LIBRARY_DIR) + +IF(NOT EO_LIBRARIES) + SET(EO_LIBRARIES) + FOREACH(component ${EO_LIBRARIES_TO_FIND}) + FIND_LIBRARY( + EO_${component}_LIBRARY + NAMES ${component} + PATHS + /usr/lib + /usr/local/lib + ) + IF(EO_${component}_LIBRARY) + SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY}) + ELSE(EO_${component}_LIBRARY) + MESSAGE(FATAL_ERROR "${component} component not found.") + ENDIF(EO_${component}_LIBRARY) + ENDFOREACH(component) +ENDIF(NOT EO_LIBRARIES) + +IF(EO_INCLUDE_DIR AND EO_LIBRARY_DIR AND EO_LIBRARIES) + SET(EO_FOUND 1) + MARK_AS_ADVANCED(EO_FOUND) + MARK_AS_ADVANCED(EO_INCLUDE_DIR) + MARK_AS_ADVANCED(EO_LIBRARY_DIR) + MARK_AS_ADVANCED(EO_LIBRARIES) +ENDIF(EO_INCLUDE_DIR AND EO_LIBRARY_DIR AND EO_LIBRARIES) From 825b1f42738f9ed93f44f02e6302248369e70784 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 26 Oct 2011 10:07:01 +0200 Subject: [PATCH 1840/2134] * FindEO: made compatible with pkgconfig finder --- eo/cmake/modules/FindEO.cmake | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/eo/cmake/modules/FindEO.cmake b/eo/cmake/modules/FindEO.cmake index 0ca6a0178..8bf3ac130 100644 --- a/eo/cmake/modules/FindEO.cmake +++ b/eo/cmake/modules/FindEO.cmake @@ -3,8 +3,8 @@ # Version: 0.0.1 # # The following variables are filled out: -# - EO_INCLUDE_DIR -# - EO_LIBRARY_DIR +# - EO_INCLUDE_DIRS +# - EO_LIBRARY_DIRS # - EO_LIBRARIES # - EO_FOUND # @@ -53,25 +53,25 @@ IF(EO_FIND_COMPONENTS) ENDIF(NOT EO_USE_CMA) ENDIF(EO_FIND_COMPONENTS) -IF(NOT EO_INCLUDE_DIR) +IF(NOT EO_INCLUDE_DIRS) FIND_PATH( - EO_INCLUDE_DIR + EO_INCLUDE_DIRS EO.h PATHS /usr/include/eo /usr/local/include/eo ) -ENDIF(NOT EO_INCLUDE_DIR) +ENDIF(NOT EO_INCLUDE_DIRS) -IF(NOT EO_LIBRARY_DIR) +IF(NOT EO_LIBRARY_DIRS) FIND_PATH( - EO_LIBRARY_DIR + EO_LIBRARY_DIRS libeo.a PATHS /usr/lib /usr/local/lib ) -ENDIF(NOT EO_LIBRARY_DIR) +ENDIF(NOT EO_LIBRARY_DIRS) IF(NOT EO_LIBRARIES) SET(EO_LIBRARIES) @@ -91,10 +91,10 @@ IF(NOT EO_LIBRARIES) ENDFOREACH(component) ENDIF(NOT EO_LIBRARIES) -IF(EO_INCLUDE_DIR AND EO_LIBRARY_DIR AND EO_LIBRARIES) +IF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES) SET(EO_FOUND 1) MARK_AS_ADVANCED(EO_FOUND) - MARK_AS_ADVANCED(EO_INCLUDE_DIR) - MARK_AS_ADVANCED(EO_LIBRARY_DIR) + MARK_AS_ADVANCED(EO_INCLUDE_DIRS) + MARK_AS_ADVANCED(EO_LIBRARY_DIRS) MARK_AS_ADVANCED(EO_LIBRARIES) -ENDIF(EO_INCLUDE_DIR AND EO_LIBRARY_DIR AND EO_LIBRARIES) +ENDIF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES) From b41e4536c759c2b67ef9d86713b9c03d65c9bb46 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 26 Oct 2011 10:19:09 +0200 Subject: [PATCH 1841/2134] * changed cmake config file in order to user FindEO but still works with install.cmake manual config way, disabled application building since there is an issue when compiling --- edo/CMakeLists.txt | 7 ++++++- edo/install.cmake-dist | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index ab4333ef6..10b1fbe23 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -28,11 +28,16 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT ### 3) Include useful features ###################################################################################### +# include useful features for cmake +SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) + INCLUDE(FindDoxygen) INCLUDE(FindPkgConfig) FIND_PACKAGE(Boost 1.33.0) +FIND_PACKAGE(EO) + INCLUDE_DIRECTORIES( ${EO_INCLUDE_DIRS} ${MO_INCLUDE_DIRS} @@ -87,7 +92,7 @@ SET(SAMPLE_SRCS) ###################################################################################### ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(application) +#ADD_SUBDIRECTORY(application) ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(doc) diff --git a/edo/install.cmake-dist b/edo/install.cmake-dist index 99d4166ba..b4f532113 100644 --- a/edo/install.cmake-dist +++ b/edo/install.cmake-dist @@ -12,7 +12,7 @@ SET(EO_LIBRARIES eoutils eo es ga cma gcov) # do not use quotes around this list SET(MO_INCLUDE_DIRS "${MO_DIR}/src" CACHE PATH "MO include directory" FORCE) SET(MO_LIBRARY_DIRS "${MO_DIR}/release/lib" CACHE PATH "MO library directory" FORCE) -SET(MO_LIBRARIES "mo") +#SET(MO_LIBRARIES "mo") # no library is generated when building MO # ... or rather use pkg-config (dont forget to comment the code above) From be9eb35559d21f2e81df0d38096d645d2d47e3b9 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 26 Oct 2011 10:20:48 +0200 Subject: [PATCH 1842/2134] + added FIndEO in edo --- edo/cmake/modules/FindEO.cmake | 100 +++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 edo/cmake/modules/FindEO.cmake diff --git a/edo/cmake/modules/FindEO.cmake b/edo/cmake/modules/FindEO.cmake new file mode 100644 index 000000000..8bf3ac130 --- /dev/null +++ b/edo/cmake/modules/FindEO.cmake @@ -0,0 +1,100 @@ +# File: FindEO.cmake +# CMAKE commands to actually use the EO library +# Version: 0.0.1 +# +# The following variables are filled out: +# - EO_INCLUDE_DIRS +# - EO_LIBRARY_DIRS +# - EO_LIBRARIES +# - EO_FOUND +# +# Here are the components: +# - PyEO +# - es +# - ga +# - cma +# +# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components. +# + +# Default enabled components +SET(EO_LIBRARIES_TO_FIND eo eoutils) + +# Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules +IF(EO_FIND_COMPONENTS) + FOREACH(component ${EO_FIND_COMPONENTS}) + STRING(TOUPPER ${component} _COMPONENT) + SET(EO_USE_${_COMPONENT} 1) + ENDFOREACH(component) + + # To make sure we don't use PyEO, ES, GA, CMA when not in COMPONENTS + IF(NOT EO_USE_PYEO) + SET(EO_DONT_USE_PYEO 1) + ELSE(NOT EO_USE_PYEO) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO) + ENDIF(NOT EO_USE_PYEO) + + IF(NOT EO_USE_ES) + SET(EO_DONT_USE_ES 1) + ELSE(NOT EO_USE_ES) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es) + ENDIF(NOT EO_USE_ES) + + IF(NOT EO_USE_GA) + SET(EO_DONT_USE_GA 1) + ELSE(NOT EO_USE_GA) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} ga) + ENDIF(NOT EO_USE_GA) + + IF(NOT EO_USE_CMA) + SET(EO_DONT_USE_CMA 1) + ELSE(NOT EO_USE_CMA) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma) + ENDIF(NOT EO_USE_CMA) +ENDIF(EO_FIND_COMPONENTS) + +IF(NOT EO_INCLUDE_DIRS) + FIND_PATH( + EO_INCLUDE_DIRS + EO.h + PATHS + /usr/include/eo + /usr/local/include/eo + ) +ENDIF(NOT EO_INCLUDE_DIRS) + +IF(NOT EO_LIBRARY_DIRS) + FIND_PATH( + EO_LIBRARY_DIRS + libeo.a + PATHS + /usr/lib + /usr/local/lib + ) +ENDIF(NOT EO_LIBRARY_DIRS) + +IF(NOT EO_LIBRARIES) + SET(EO_LIBRARIES) + FOREACH(component ${EO_LIBRARIES_TO_FIND}) + FIND_LIBRARY( + EO_${component}_LIBRARY + NAMES ${component} + PATHS + /usr/lib + /usr/local/lib + ) + IF(EO_${component}_LIBRARY) + SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY}) + ELSE(EO_${component}_LIBRARY) + MESSAGE(FATAL_ERROR "${component} component not found.") + ENDIF(EO_${component}_LIBRARY) + ENDFOREACH(component) +ENDIF(NOT EO_LIBRARIES) + +IF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES) + SET(EO_FOUND 1) + MARK_AS_ADVANCED(EO_FOUND) + MARK_AS_ADVANCED(EO_INCLUDE_DIRS) + MARK_AS_ADVANCED(EO_LIBRARY_DIRS) + MARK_AS_ADVANCED(EO_LIBRARIES) +ENDIF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES) From 7acaa0beab5af4e5d739625c8cbe2db24adb8972 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 26 Oct 2011 15:35:04 +0200 Subject: [PATCH 1843/2134] more doc about the repairer dispatcher --- edo/src/edoRepairerDispatcher.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 5c4aa7d8a..4a20693ba 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -38,23 +38,31 @@ Authors: * of indexes). * * Only work on EOT that implements the "push_back( EOT::AtomType )" and - * "operator[](uint)" and "at(uint)" methods. + * "operator[](uint)" and "at(uint)" methods (i.e. random access containers). * * Expects _addresses_ of the repairer operators. * + * Use the second template type if you want a different container to store + * indexes. You can use any iterable. For example, you may want to use a set if + * you need to be sure that indexes are use only once: + * edoRepairerDispatcher > rpd; + * std::set idx(1,1); + * idx.insert(2); + * rpd.add( idx, &repairer ); + * * @example t-dispatcher-round.cpp * * @ingroup Repairers */ - -template < typename EOT > +template < typename EOT, typename ICT = std::vector > class edoRepairerDispatcher : public edoRepairer, std::vector< - std::pair< std::vector< unsigned int >, edoRepairer< EOT >* > + std::pair< ICT, edoRepairer< EOT >* > > { public: + //! Empty constructor edoRepairerDispatcher() : std::vector< @@ -63,7 +71,7 @@ public: {} //! Constructor with a single index set and repairer operator - edoRepairerDispatcher( std::vector idx, edoRepairer* op ) : + edoRepairerDispatcher( IndexContainer idx, edoRepairer* op ) : std::vector< std::pair< std::vector< unsigned int >, edoRepairer< EOT >* > >() @@ -72,7 +80,7 @@ public: } //! Add more indexes set and their corresponding repairer operator address to the list - void add( std::vector idx, edoRepairer* op ) + void add( IndexContainer idx, edoRepairer* op ) { assert( idx.size() > 0 ); assert( op != NULL ); From e6b1c63fde7e22c3eb7a8e9f4b9d3fc7a02d8b0e Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 28 Oct 2011 16:50:15 +0200 Subject: [PATCH 1844/2134] assert there is less indexes than items in the whole solution given to the repairer dispatcher ; comment useless debug code --- edo/src/edoRepairerDispatcher.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 5c4aa7d8a..5dffb3f95 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -83,15 +83,27 @@ public: //! Repair a solution by calling several repair operator on subset of indexes virtual void operator()( EOT& sol ) { - // ipair is an iterator that points on a pair +// std::cout << "in dispatcher, sol = " << sol << std::endl; + + // ipair is an iterator that points on a pair of for( typename edoRepairerDispatcher::iterator ipair = this->begin(); ipair != this->end(); ++ipair ) { + + assert( ipair->first.size() <= sol.size() ); // assert there is less indexes than items in the whole solution + // a partial copy of the sol EOT partsol; +// std::cout << "\tusing indexes = "; // j is an iterator that points on an uint for( std::vector< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { + +// std::cout << *j << " "; +// std::cout.flush(); + partsol.push_back( sol.at(*j) ); } // for j +// std::cout << std::endl; +// std::cout << "\tpartial sol = " << partsol << std::endl; assert( partsol.size() > 0 ); From d002dccadf1a2d97ca93702fbae7d3828506479d Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 3 Nov 2011 10:54:07 +0100 Subject: [PATCH 1845/2134] cleaner debug code for uniform bounder --- edo/src/edoBounderUniform.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index c90317c7a..f5ea97c7d 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -49,6 +49,10 @@ public: assert( this->max().size() > 0 ); assert( sol.size() > 0); + assert( sol.size() == this->min().size() ); + + eo::log << eo::debug << "BounderUniform: from sol = " << sol; + eo::log.flush(); unsigned int size = sol.size(); for (unsigned int d = 0; d < size; ++d) { @@ -58,6 +62,8 @@ public: sol[d] = rng.uniform( this->min()[d], this->max()[d] ); } } // for d in size + + eo::log << eo::debug << "\tto sol = " << sol << std::endl; } }; From 03b69f181919ba60fef1c22194ce729e3c47eea0 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 3 Nov 2011 11:13:32 +0100 Subject: [PATCH 1846/2134] compilfix: correct template name for dispatcher's indexes --- edo/src/edoRepairerDispatcher.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 0ee65a78e..b198a14a8 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -71,7 +71,7 @@ public: {} //! Constructor with a single index set and repairer operator - edoRepairerDispatcher( IndexContainer idx, edoRepairer* op ) : + edoRepairerDispatcher( ICT idx, edoRepairer* op ) : std::vector< std::pair< std::vector< unsigned int >, edoRepairer< EOT >* > >() @@ -80,7 +80,7 @@ public: } //! Add more indexes set and their corresponding repairer operator address to the list - void add( IndexContainer idx, edoRepairer* op ) + void add( ICT idx, edoRepairer* op ) { assert( idx.size() > 0 ); assert( op != NULL ); From 979f33b72154ff041ce0eec6535bd01acf5eccef Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 7 Nov 2011 15:44:36 +0100 Subject: [PATCH 1847/2134] ditaa text diagram explaining how the repairer dispatcher works --- edo/src/edoRepairerDispatcher.h | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index b198a14a8..90ee79246 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -50,6 +50,44 @@ Authors: * idx.insert(2); * rpd.add( idx, &repairer ); * + * A diagram trying to visually explain how it works: + \ditaa + + | + /-\ | /------------\ + | +---|---+ Dispatcher | + | | v | | + | |+-----+| --------------------------------+ + | || x_0 || +-+-+-+ | +------------\ | /-\ + | |+-----+| |2|3|5+*----*-* Repairer A +---|---+ | + | || x_1 || +-+-+-+ | | | | v | | + | |+-----+| | | | |+-----+| | + | || x_2 || | | | || x_2 || | + | |+-----+| | | | |+-----+| | + | || x_3 || | | | || x_3 || | + | |+-----+| | | | |+-----+| | + | || x_4 || | | | || x_5 || | + | |+-----+| | | | |+-----+| | + | || x_5 || | | | | | | | + | |+-----+| | | | +---|---+ | + | || x_6 || | | \------------/ | \-/ + | |+-----+| <-------------------------------+ + | || x_7 || | | + | |+-----+| +-+-+ | | + | || x_8 || |2|3+*------+ + | |+-----+| +-+-+ | + | || x_9 || | + | |+-----+| +-+-+ | +------------\ /-\ + | | | | |1|5+*--------* Repairer B +-------+ | + | | | | +-+-+ | | | | | + | | | | | | | | | + | | | | | | +-------+ | + | +---|---+ | \------------/ \-/ + \-/ | \------------/ + v + + \endditaa + * @example t-dispatcher-round.cpp * * @ingroup Repairers From 4d45970767f0ccb6a0773b14f2f1c29fe15ba317 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 8 Nov 2011 17:55:01 +0100 Subject: [PATCH 1848/2134] refactored vectors repairers that are using a function in a more generic way, added a binary function wrapper for vectors repairers, with the modulus function as an example --- edo/src/edo | 1 + edo/src/edoRepairerApply.h | 98 ++++++++++++++++++++++++++++++++++ edo/src/edoRepairerModulo.h | 47 ++++++++++++++++ edo/src/edoRepairerRound.h | 28 ++++------ edo/test/CMakeLists.txt | 1 + edo/test/t-repairer-modulo.cpp | 55 +++++++++++++++++++ 6 files changed, 213 insertions(+), 17 deletions(-) create mode 100644 edo/src/edoRepairerApply.h create mode 100644 edo/src/edoRepairerModulo.h create mode 100644 edo/test/t-repairer-modulo.cpp diff --git a/edo/src/edo b/edo/src/edo index 69f13f116..c03acd35d 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -59,6 +59,7 @@ Authors: #include "edoRepairer.h" #include "edoRepairerDispatcher.h" #include "edoRepairerRound.h" +#include "edoRepairerModulo.h" #include "edoBounder.h" #include "edoBounderNo.h" #include "edoBounderBound.h" diff --git a/edo/src/edoRepairerApply.h b/edo/src/edoRepairerApply.h new file mode 100644 index 000000000..fbadacdad --- /dev/null +++ b/edo/src/edoRepairerApply.h @@ -0,0 +1,98 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2011 Thales group +*/ +/* +Authors: + Johann DrĂ©o +*/ + +#ifndef _edoRepairerApply_h +#define _edoRepairerApply_h + +#include + +#include "edoRepairer.h" + + +template < typename EOT, typename F = typename EOT::AtomType(typename EOT::AtomType) > +class edoRepairerApply : public edoRepairer +{ +public: + edoRepairerApply( F function ) : _function(function) {} + +protected: + F * _function; +}; + + +/** Apply an arbitrary unary function as a repairer on each item of the solution + * + * By default, the signature of the expected function is "EOT::AtomType(EOT::AtomType)" + * + * @ingroup Repairers + */ +template < typename EOT, typename F = typename EOT::AtomType(typename EOT::AtomType)> +class edoRepairerApplyUnary : public edoRepairerApply +{ +public: + edoRepairerApplyUnary( F function ) : edoRepairerApply(function) {} + + virtual void operator()( EOT& sol ) + { + std::transform( sol.begin(), sol.end(), sol.begin(), *(this->_function) ); + } +}; + + +/** Apply an arbitrary binary function as a repairer on each item of the solution, + * the second argument of the function being fixed and given at instanciation. + * + * @see edoRepairerApplyUnary + * + * @ingroup Repairers + */ +template < typename EOT, typename F = typename EOT::AtomType(typename EOT::AtomType, typename EOT::AtomType)> +class edoRepairerApplyBinary : public edoRepairerApply +{ +public: + typedef typename EOT::AtomType ArgType; + + edoRepairerApplyBinary( + F function, + ArgType arg + ) : edoRepairerApply(function), _arg(arg) {} + + virtual void operator()( EOT& sol ) + { + // call the binary function on each item + // TODO find a way to use std::transform here? Or would it be too bloated? + for(typename EOT::iterator it = sol.begin(); it != sol.end(); ++it ) { + *it = (*(this->_function))( *it, _arg ); + } + } + +protected: + ArgType _arg; +}; + + +#endif // !_edoRepairerApply_h + diff --git a/edo/src/edoRepairerModulo.h b/edo/src/edoRepairerModulo.h new file mode 100644 index 000000000..213673334 --- /dev/null +++ b/edo/src/edoRepairerModulo.h @@ -0,0 +1,47 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2011 Thales group +*/ +/* +Authors: + Johann DrĂ©o +*/ + +#ifndef _edoRepairerModulo_h +#define _edoRepairerModulo_h + +#include + +#include "edoRepairerApply.h" + +/** + * + * @ingroup Repairers + */ +template < typename EOT > +class edoRepairerModulo: public edoRepairerApplyBinary +{ +public: + edoRepairerModulo( double denominator ) : edoRepairerApplyBinary( std::fmod, denominator ) {} +}; + + +#endif // !_edoRepairerModulo_h + diff --git a/edo/src/edoRepairerRound.h b/edo/src/edoRepairerRound.h index 032169424..21dd1caec 100644 --- a/edo/src/edoRepairerRound.h +++ b/edo/src/edoRepairerRound.h @@ -30,38 +30,32 @@ Authors: #include -#include "edoRepairer.h" +#include "edoRepairerApply.h" -/** +/** A repairer that calls "floor" on each items of a solution + * + * Just a proxy to "edoRepairerApplyUnary rep( std::floor);" * * @ingroup Repairers */ template < typename EOT > -class edoRepairerFloor : public edoRepairer +class edoRepairerFloor : public edoRepairerApplyUnary { public: - virtual void operator()( EOT& sol ) - { - for( unsigned int i=0; i < sol.size(); ++i ) { - sol[i] = floor( sol[i] ); - } - } + edoRepairerFloor() : edoRepairerApplyUnary( std::floor ) {} }; -/** +/** A repairer that calls "ceil" on each items of a solution + * + * @see edoRepairerFloor * * @ingroup Repairers */ template < typename EOT > -class edoRepairerCeil : public edoRepairer +class edoRepairerCeil : public edoRepairerApplyUnary { public: - virtual void operator()( EOT& sol ) - { - for( unsigned int i=0; i < sol.size(); ++i ) { - sol[i] = ceil( sol[i] ); - } - } + edoRepairerCeil() : edoRepairerApplyUnary( std::ceil ) {} }; diff --git a/edo/test/CMakeLists.txt b/edo/test/CMakeLists.txt index acdabc7b7..61fdd68f1 100644 --- a/edo/test/CMakeLists.txt +++ b/edo/test/CMakeLists.txt @@ -39,6 +39,7 @@ SET(SOURCES t-uniform t-continue t-dispatcher-round + t-repairer-modulo ) FOREACH(current ${SOURCES}) diff --git a/edo/test/t-repairer-modulo.cpp b/edo/test/t-repairer-modulo.cpp new file mode 100644 index 000000000..7a495f318 --- /dev/null +++ b/edo/test/t-repairer-modulo.cpp @@ -0,0 +1,55 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o +*/ + +#define _USE_MATH_DEFINES +#include + +#include +#include +#include + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(void) +{ + EOT sol; + sol.push_back( M_PI * 1 ); + sol.push_back( M_PI * 2 ); + sol.push_back( M_PI * 3 ); + sol.push_back( M_PI * 4 ); + sol.push_back( M_PI * 4 + M_PI / 2 ); + sol.push_back( M_PI * 5 + M_PI / 2 ); + // we expect {pi,0,pi,0,pi/2,pi+pi/2} + std::cout << "expect: INVALID 4 3.14159 0 3.14159 0 1.5708 4.71239" << std::endl; + + edoRepairer* repare = new edoRepairerModulo( 2 * M_PI ); // modulo 2pi + + (*repare)(sol); + + std::cout << sol << std::endl; + + return 0; +} From 0e9d9f8c81c4c9fe2e99a61293125989c53886c8 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 8 Nov 2011 18:40:28 +0100 Subject: [PATCH 1849/2134] added a symetric round repairer around 0.5, plus a rounding at a given precision --- edo/src/edoRepairerRound.h | 43 +++++++++++++++++++++++++++++++++ edo/test/t-dispatcher-round.cpp | 21 +++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/edo/src/edoRepairerRound.h b/edo/src/edoRepairerRound.h index 21dd1caec..dc05716d7 100644 --- a/edo/src/edoRepairerRound.h +++ b/edo/src/edoRepairerRound.h @@ -32,6 +32,7 @@ Authors: #include "edoRepairerApply.h" + /** A repairer that calls "floor" on each items of a solution * * Just a proxy to "edoRepairerApplyUnary rep( std::floor);" @@ -45,6 +46,7 @@ public: edoRepairerFloor() : edoRepairerApplyUnary( std::floor ) {} }; + /** A repairer that calls "ceil" on each items of a solution * * @see edoRepairerFloor @@ -59,4 +61,45 @@ public: }; +// FIXME find a way to put this function as a member of edoRepairerRoundDecimals +template< typename ArgType > +ArgType edoRound( ArgType val, ArgType prec = 1.0 ) +{ + return (val > 0.0) ? + floor(val * prec + 0.5) / prec : + ceil(val * prec - 0.5) / prec ; +} + +/** A repairer that round values at a given a precision. + * + * e.g. if prec=10, 8.06 will be rounded to 8.1 + * + * @see edoRepairerFloor + * @see edoRepairerCeil + * + * @ingroup Repairers + */ +template < typename EOT > +class edoRepairerRoundDecimals : public edoRepairerApplyBinary +{ +public: + typedef typename EOT::AtomType ArgType; + + edoRepairerRoundDecimals( ArgType prec ) : edoRepairerApplyBinary( edoRound, prec ) {} +}; + + +/** A repairer that do a rounding around val+0.5 + * + * @see edoRepairerRoundDecimals + * + * @ingroup Repairers + */ +template < typename EOT > +class edoRepairerRound : public edoRepairerRoundDecimals +{ +public: + edoRepairerRound() : edoRepairerRoundDecimals( 1.0 ) {} +}; + #endif // !_edoRepairerRound_h diff --git a/edo/test/t-dispatcher-round.cpp b/edo/test/t-dispatcher-round.cpp index 89fc16449..cfcd9261c 100644 --- a/edo/test/t-dispatcher-round.cpp +++ b/edo/test/t-dispatcher-round.cpp @@ -38,10 +38,18 @@ int main(void) sol.push_back(1.1); sol.push_back(3.9); sol.push_back(3.9); - // we expect {1,2,3,4} + sol.push_back(5.4); + sol.push_back(5.6); + sol.push_back(7.011); + sol.push_back(8.09); + sol.push_back(8.21); + + std::cout << "expect: INVALID 9 1 2 3 4 5 6 7 8.1 8.2" << std::endl; edoRepairer* rep1 = new edoRepairerFloor(); edoRepairer* rep2 = new edoRepairerCeil(); + edoRepairer* rep3 = new edoRepairerRound(); + edoRepairer* rep4 = new edoRepairerRoundDecimals( 10 ); std::vector indexes1; indexes1.push_back(0); @@ -51,8 +59,19 @@ int main(void) indexes2.push_back(1); indexes2.push_back(3); + std::vector indexes3; + indexes3.push_back(4); + indexes3.push_back(5); + + std::vector indexes4; + indexes4.push_back(6); + indexes4.push_back(7); + indexes4.push_back(8); + edoRepairerDispatcher repare( indexes1, rep1 ); repare.add( indexes2, rep2 ); + repare.add( indexes3, rep3 ); + repare.add( indexes4, rep4 ); repare(sol); From 391c9e9e221ee2febba37c51befc39517d734e62 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 9 Nov 2011 10:15:21 +0100 Subject: [PATCH 1850/2134] use decimals instead of tens --- edo/src/edoRepairerRound.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/edo/src/edoRepairerRound.h b/edo/src/edoRepairerRound.h index dc05716d7..c370a03c3 100644 --- a/edo/src/edoRepairerRound.h +++ b/edo/src/edoRepairerRound.h @@ -72,7 +72,7 @@ ArgType edoRound( ArgType val, ArgType prec = 1.0 ) /** A repairer that round values at a given a precision. * - * e.g. if prec=10, 8.06 will be rounded to 8.1 + * e.g. if prec=0.1, 8.06 will be rounded to 8.1 * * @see edoRepairerFloor * @see edoRepairerCeil @@ -85,7 +85,8 @@ class edoRepairerRoundDecimals : public edoRepairerApplyBinary public: typedef typename EOT::AtomType ArgType; - edoRepairerRoundDecimals( ArgType prec ) : edoRepairerApplyBinary( edoRound, prec ) {} + //! Generally speaking, we expect decimals being <= 1, but it can work for higher values + edoRepairerRoundDecimals( ArgType decimals ) : edoRepairerApplyBinary( edoRound, 1 / decimals ) {} }; From 96dc505f92919639eee28c4b855603c6b7acb993 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 9 Nov 2011 10:35:41 +0100 Subject: [PATCH 1851/2134] bugfix: invalidate the individual after having repaired it --- edo/src/edoRepairerApply.h | 2 ++ edo/src/edoRepairerDispatcher.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/edo/src/edoRepairerApply.h b/edo/src/edoRepairerApply.h index fbadacdad..ca46f3441 100644 --- a/edo/src/edoRepairerApply.h +++ b/edo/src/edoRepairerApply.h @@ -58,6 +58,7 @@ public: virtual void operator()( EOT& sol ) { std::transform( sol.begin(), sol.end(), sol.begin(), *(this->_function) ); + sol.invalidate(); } }; @@ -87,6 +88,7 @@ public: for(typename EOT::iterator it = sol.begin(); it != sol.end(); ++it ) { *it = (*(this->_function))( *it, _arg ); } + sol.invalidate(); } protected: diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 90ee79246..117e8dfbf 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -166,6 +166,8 @@ public: } // for j } // context for k } // for ipair + + sol.invalidate(); } }; From 1af6715ddc3e3fb48eee3846d55979a77890ecec Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 9 Nov 2011 11:38:40 +0100 Subject: [PATCH 1852/2134] BUGFIX: should use the standard deviation when sampling a mono-normal law, because it have the same scale than the mean --- edo/src/edoSamplerNormalMono.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/edo/src/edoSamplerNormalMono.h b/edo/src/edoSamplerNormalMono.h index b3162f92f..b9340b179 100644 --- a/edo/src/edoSamplerNormalMono.h +++ b/edo/src/edoSamplerNormalMono.h @@ -28,6 +28,8 @@ Authors: #ifndef _edoSamplerNormalMono_h #define _edoSamplerNormalMono_h +#include + #include #include "edoSampler.h" @@ -47,27 +49,25 @@ public: edoSamplerNormalMono( edoRepairer & repairer ) : edoSampler< D >( repairer) {} - EOT sample( edoNormalMono< EOT >& distrib ) + EOT sample( edoNormalMono& distrib ) { unsigned int size = distrib.size(); assert(size > 0); - // Point we want to sample to get higher a set of points + // The point we want to draw // (coordinates in n dimension) // x = {x1, x2, ..., xn} EOT solution; // Sampling all dimensions - for (unsigned int i = 0; i < size; ++i) - { + for (unsigned int i = 0; i < size; ++i) { AtomType mean = distrib.mean()[i]; AtomType variance = distrib.variance()[i]; - AtomType random = rng.normal(mean, variance); - - assert(variance >= 0); + // should use the standard deviation, which have the same scale than the mean + AtomType random = rng.normal(mean, sqrt(variance) ); solution.push_back(random); - } + } return solution; } From 9fe6995df16e0c5f231b33051893102950557665 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 9 Nov 2011 15:48:07 +0100 Subject: [PATCH 1853/2134] refactoring of the cholesky decomposition --- edo/src/edoSamplerNormalMulti.h | 160 ++++++++++++++++++-------------- 1 file changed, 90 insertions(+), 70 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 7c08d22b5..e5e73a011 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -28,12 +28,19 @@ Authors: #ifndef _edoSamplerNormalMulti_h #define _edoSamplerNormalMulti_h +#include + #include #include #include -//! edoSamplerNormalMulti< EOT > - +/** Sample points in a multi-normal law defined by a mean vector and a covariance matrix. + * + * Given M the mean vector and V the covariance matrix, of order n: + * - draw a vector T in N(0,I) (i.e. each value is drawn in a normal law with mean=0 an stddev=1) + * - compute the Cholesky decomposition L of V (i.e. such as V=LL*) + * - return X = M + LT + */ template< class EOT, typename D = edoNormalMulti< EOT > > class edoSamplerNormalMulti : public edoSampler< D > { @@ -42,135 +49,148 @@ public: edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler< D >( repairer) {} + /** Cholesky decomposition, given a matrix V, return a matrix L + * such as V = L Lt (Lt being the conjugate transpose of L). + * + * Need a symmetric and positive definite matrix as an input, which + * should be the case of a non-ill-conditionned covariance matrix. + * Thus, expect a (lower) triangular matrix. + */ class Cholesky { - public: - Cholesky( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) - { - unsigned int Vl = V.size1(); + private: + //! The decomposition is a (lower) symetric matrix, just like the covariance matrix + ublas::symmetric_matrix< AtomType, ublas::lower > _L; + public: + //! The decomposition of the covariance matrix + const ublas::symmetric_matrix< AtomType, ublas::lower >& decomposition() const {return _L;} + + /** Computation is made at instanciation and then cached in a member variable, + * use decomposition() to get the result. + */ + Cholesky( const ublas::symmetric_matrix< AtomType, ublas::lower >& V ) + { + factorize( V ); + } + + /** Assert that the covariance matrix have the required properties and returns its dimension. + * + * Note: if compiled with NDEBUG, will not assert anything and just return the dimension. + */ + unsigned assert_properties( const ublas::symmetric_matrix< AtomType, ublas::lower >& V ) + { + unsigned int Vl = V.size1(); // number of lines assert(Vl > 0); - unsigned int Vc = V.size2(); - + unsigned int Vc = V.size2(); // number of columns assert(Vc > 0); - assert( Vl == Vc ); + // FIXME assert definite semi-positive + + // the result goes in _L _L.resize(Vl); - unsigned int i,j,k; + return Vl; + } - // first column - i=0; + /** This standard algorithm makes use of square root and is thus subject + * to round-off errors if the covariance matrix is very ill-conditioned. + */ + void factorize( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) + { + unsigned int N = assert_properties( V ); - // diagonal - j=0; + unsigned int i=0, j=0, k; _L(0, 0) = sqrt( V(0, 0) ); // end of the column - for ( j = 1; j < Vc; ++j ) - { + for ( j = 1; j < N; ++j ) { _L(j, 0) = V(0, j) / _L(0, 0); } // end of the matrix - for ( i = 1; i < Vl; ++i ) // each column - { - + for ( i = 1; i < N; ++i ) { // each column // diagonal double sum = 0.0; - - for ( k = 0; k < i; ++k) - { + for ( k = 0; k < i; ++k) { sum += _L(i, k) * _L(i, k); } - _L(i,i) = sqrt( fabs( V(i,i) - sum) ); + // round-off errors may appear here + assert( V(i,i) - sum >= 0 ); + _L(i,i) = sqrt( V(i,i) - sum ); + //_L(i,i) = sqrt( fabs( V(i,i) - sum) ); - for ( j = i + 1; j < Vl; ++j ) // rows - { + for ( j = i + 1; j < N; ++j ) { // rows // one element sum = 0.0; - - for ( k = 0; k < i; ++k ) - { + for ( k = 0; k < i; ++k ) { sum += _L(j, k) * _L(i, k); } _L(j, i) = (V(j, i) - sum) / _L(i, i); - } - } + + } // for j in ]i,N[ + } // for i in [1,N[ } - const ublas::symmetric_matrix< AtomType, ublas::lower >& get_L() const {return _L;} - private: - ublas::symmetric_matrix< AtomType, ublas::lower > _L; - }; + /** This alternative algorithm does not use square root BUT the covariance + * matrix must be invertible. + * + * Computes L and D such as V = L D Lt + */ + /* + void factorize_robust( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) + { + unsigned int N = assert_properties( V ); + + unsigned int i, j, k; + ublas::symmetric_matrix< AtomType, ublas::lower > D = ublas::zero_matrix(N); + _L(0, 0) = sqrt( V(0, 0) ); + + } + */ + + + }; // class Cholesky + edoSamplerNormalMulti( edoBounder< EOT > & bounder ) : edoSampler< edoNormalMulti< EOT > >( bounder ) {} + EOT sample( edoNormalMulti< EOT >& distrib ) { unsigned int size = distrib.size(); - assert(size > 0); - - //------------------------------------------------------------- // Cholesky factorisation gererating matrix L from covariance // matrix V. - // We must use cholesky.get_L() to get the resulting matrix. + // We must use cholesky.decomposition() to get the resulting matrix. // // L = cholesky decomposition of varcovar - //------------------------------------------------------------- - Cholesky cholesky( distrib.varcovar() ); - ublas::symmetric_matrix< AtomType, ublas::lower > L = cholesky.get_L(); + ublas::symmetric_matrix< AtomType, ublas::lower > L = cholesky.decomposition(); - //------------------------------------------------------------- - - - //------------------------------------------------------------- // T = vector of size elements drawn in N(0,1) rng.normal(1.0) - //------------------------------------------------------------- - ublas::vector< AtomType > T( size ); + for ( unsigned int i = 0; i < size; ++i ) { + T( i ) = rng.normal(); + } - for ( unsigned int i = 0; i < size; ++i ) - { - T( i ) = rng.normal( 1.0 ); - } - - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // LT = prod( L, T ) - //------------------------------------------------------------- - + // LT = L * T ublas::vector< AtomType > LT = ublas::prod( L, T ); - //------------------------------------------------------------- - - - //------------------------------------------------------------- // solution = means + LT - //------------------------------------------------------------- - ublas::vector< AtomType > mean = distrib.mean(); - ublas::vector< AtomType > ublas_solution = mean + LT; - EOT solution( size ); - std::copy( ublas_solution.begin(), ublas_solution.end(), solution.begin() ); - //------------------------------------------------------------- - return solution; } }; From b04a66aaea662391b090cc2d4a985bf455ccf168 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 9 Nov 2011 15:49:04 +0100 Subject: [PATCH 1854/2134] Note: normal rng use the Marsaglia polar method --- eo/src/utils/eoRNG.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 9885eff58..984e76271 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -216,6 +216,7 @@ public : /** Gaussian deviate Zero mean Gaussian deviate with standard deviation 1. + Note: Use the Marsaglia polar method. @return Random Gaussian deviate */ From fb82958253b11e40811f6aacecee216e13714e07 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 10 Nov 2011 11:48:14 +0100 Subject: [PATCH 1855/2134] more refactorization of the multi-normal sampler, now you can choose among two Cholesky factorization methods --- edo/src/edoSamplerNormalMulti.h | 140 ++++++++++++++++++++++++++++---- 1 file changed, 123 insertions(+), 17 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index e5e73a011..1bff937b1 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -53,52 +53,115 @@ public: * such as V = L Lt (Lt being the conjugate transpose of L). * * Need a symmetric and positive definite matrix as an input, which - * should be the case of a non-ill-conditionned covariance matrix. + * should be the case of a non-ill-conditionned covariance matrix. * Thus, expect a (lower) triangular matrix. */ class Cholesky { - private: - //! The decomposition is a (lower) symetric matrix, just like the covariance matrix - ublas::symmetric_matrix< AtomType, ublas::lower > _L; - public: - //! The decomposition of the covariance matrix - const ublas::symmetric_matrix< AtomType, ublas::lower >& decomposition() const {return _L;} + typedef ublas::symmetric_matrix< AtomType, ublas::lower > MatrixType; + + enum Method { + //! use the standard algorithm, with square root @see factorize + standard, + //! use the algorithm using absolute value within the square root @see factorize_abs + absolute, + //! use the robust algorithm, without square root + //robust + }; + Method _use; + + + /** Instanciate without computing anything, you are responsible of + * calling the algorithm and getting the result with operator() + * */ + Cholesky( Cholesky::Method use = standard ) : _use(use) {} + /** Computation is made at instanciation and then cached in a member variable, * use decomposition() to get the result. + * + * Use the standard unstable method by default. */ - Cholesky( const ublas::symmetric_matrix< AtomType, ublas::lower >& V ) + Cholesky(const MatrixType& V, Cholesky::Method use = standard ) : _use(use) + { + factsorize( V ); + } + + + /** Compute the factorization and return the result + */ + const MatrixType& operator()( const MatrixType& V ) { factorize( V ); + return decomposition(); } + //! The decomposition of the covariance matrix + const MatrixType & decomposition() const {return _L;} + + protected: + + //! The decomposition is a (lower) symetric matrix, just like the covariance matrix + MatrixType _L; + + /** Assert that the covariance matrix have the required properties and returns its dimension. * * Note: if compiled with NDEBUG, will not assert anything and just return the dimension. */ - unsigned assert_properties( const ublas::symmetric_matrix< AtomType, ublas::lower >& V ) + unsigned assert_properties( const MatrixType& V ) { unsigned int Vl = V.size1(); // number of lines + + // the result goes in _L + _L.resize(Vl); + +#ifndef NDEBUG assert(Vl > 0); unsigned int Vc = V.size2(); // number of columns assert(Vc > 0); assert( Vl == Vc ); - // FIXME assert definite semi-positive + // partial assert that V is semi-positive definite + // assert that all diagonal elements are positives + for( unsigned int i=0; i < Vl; ++i ) { + assert( V(i,i) > 0 ); + } - // the result goes in _L - _L.resize(Vl); + /* FIXME what is the more efficient way to check semi-positive definite? Candidates are: + * perform the cholesky factorization + * check if all eigenvalues are positives + * check if all of the leading principal minors are positive + * + */ +#endif return Vl; } + + /** Actually performs the factorization with the method given at + * instanciation. Results are cached in _L. + */ + void factorize( const MatrixType& V ) + { + if( _use == standard ) { + factorize_std( V ); + } else if( _use == absolute ) { + factorize_abs( V ); + } + } + + /** This standard algorithm makes use of square root and is thus subject * to round-off errors if the covariance matrix is very ill-conditioned. + * + * When compiled in debug mode and called on ill-conditionned matrix, + * will raise an assert before calling the square root on a negative number. */ - void factorize( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) + void factorize_std( const MatrixType& V) { unsigned int N = assert_properties( V ); @@ -137,24 +200,67 @@ public: } + /** This standard algorithm makes use of square root but do not fail + * if the covariance matrix is very ill-conditioned. + * Here, we propagate the error by using the absolute value before + * computing the square root. + * + * Be aware that this increase round-off errors, this is just a ugly + * hack to avoid crash. + */ + void factorize_abs( const MatrixType & V) + { + unsigned int N = assert_properties( V ); + + unsigned int i=0, j=0, k; + _L(0, 0) = sqrt( V(0, 0) ); + + // end of the column + for ( j = 1; j < N; ++j ) { + _L(j, 0) = V(0, j) / _L(0, 0); + } + + // end of the matrix + for ( i = 1; i < N; ++i ) { // each column + // diagonal + double sum = 0.0; + for ( k = 0; k < i; ++k) { + sum += _L(i, k) * _L(i, k); + } + + _L(i,i) = sqrt( fabs( V(i,i) - sum) ); + + for ( j = i + 1; j < N; ++j ) { // rows + // one element + sum = 0.0; + for ( k = 0; k < i; ++k ) { + sum += _L(j, k) * _L(i, k); + } + + _L(j, i) = (V(j, i) - sum) / _L(i, i); + + } // for j in ]i,N[ + } // for i in [1,N[ + } + /** This alternative algorithm does not use square root BUT the covariance * matrix must be invertible. * * Computes L and D such as V = L D Lt */ /* - void factorize_robust( const ublas::symmetric_matrix< AtomType, ublas::lower >& V) + void factorize_robust( const MatrixType& V) { unsigned int N = assert_properties( V ); unsigned int i, j, k; ublas::symmetric_matrix< AtomType, ublas::lower > D = ublas::zero_matrix(N); + _L(0, 0) = sqrt( V(0, 0) ); } */ - }; // class Cholesky @@ -173,8 +279,8 @@ public: // We must use cholesky.decomposition() to get the resulting matrix. // // L = cholesky decomposition of varcovar - Cholesky cholesky( distrib.varcovar() ); - ublas::symmetric_matrix< AtomType, ublas::lower > L = cholesky.decomposition(); + Cholesky cholesky( Cholesky::absolute ); + const typename Cholesky::MatrixType& L = cholesky( distrib.varcovar() ); // T = vector of size elements drawn in N(0,1) rng.normal(1.0) ublas::vector< AtomType > T( size ); From ce7f59d408b79c6b48eb7adbcb827cf54a528213 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 10 Nov 2011 14:07:58 +0100 Subject: [PATCH 1856/2134] pass the Cholesky method from the multi-normal sampler to the decomposition sub-class --- edo/src/edoSamplerNormalMulti.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 1bff937b1..5f87152cf 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -47,7 +47,6 @@ class edoSamplerNormalMulti : public edoSampler< D > public: typedef typename EOT::AtomType AtomType; - edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler< D >( repairer) {} /** Cholesky decomposition, given a matrix V, return a matrix L * such as V = L Lt (Lt being the conjugate transpose of L). @@ -264,8 +263,8 @@ public: }; // class Cholesky - edoSamplerNormalMulti( edoBounder< EOT > & bounder ) - : edoSampler< edoNormalMulti< EOT > >( bounder ) + edoSamplerNormalMulti( edoRepairer & repairer, typename Cholesky::Method use = Cholesky::absolute ) + : edoSampler< D >( repairer), _cholesky(use) {} @@ -279,8 +278,7 @@ public: // We must use cholesky.decomposition() to get the resulting matrix. // // L = cholesky decomposition of varcovar - Cholesky cholesky( Cholesky::absolute ); - const typename Cholesky::MatrixType& L = cholesky( distrib.varcovar() ); + const typename Cholesky::MatrixType& L = _cholesky( distrib.varcovar() ); // T = vector of size elements drawn in N(0,1) rng.normal(1.0) ublas::vector< AtomType > T( size ); @@ -299,6 +297,9 @@ public: return solution; } + +protected: + Cholesky _cholesky; }; #endif // !_edoSamplerNormalMulti_h From b9b3c486f95b80f27d0591f3dea4790dc85072bb Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 10 Nov 2011 15:56:59 +0100 Subject: [PATCH 1857/2134] first attempt at implementing a robust cholesky --- edo/src/edoSamplerNormalMulti.h | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 5f87152cf..5e5910fb9 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -66,7 +66,7 @@ public: //! use the algorithm using absolute value within the square root @see factorize_abs absolute, //! use the robust algorithm, without square root - //robust + robust }; Method _use; @@ -150,6 +150,8 @@ public: factorize_std( V ); } else if( _use == absolute ) { factorize_abs( V ); + } else if( _use == robust ) { + factorize_robust( V ); } } @@ -183,7 +185,6 @@ public: // round-off errors may appear here assert( V(i,i) - sum >= 0 ); _L(i,i) = sqrt( V(i,i) - sum ); - //_L(i,i) = sqrt( fabs( V(i,i) - sum) ); for ( j = i + 1; j < N; ++j ) { // rows // one element @@ -247,18 +248,37 @@ public: * * Computes L and D such as V = L D Lt */ - /* void factorize_robust( const MatrixType& V) { unsigned int N = assert_properties( V ); unsigned int i, j, k; - ublas::symmetric_matrix< AtomType, ublas::lower > D = ublas::zero_matrix(N); + //MatrixType D = ublas::zero_matrix(N); + std::vector _D(N,0); - _L(0, 0) = sqrt( V(0, 0) ); + _D[0] = V(0,0); + _L(0, 0) = 1; + //_L(1,0) = 1/D[0] * V(1,0); + for( j=0; j Date: Sat, 12 Nov 2011 14:24:54 +0100 Subject: [PATCH 1858/2134] more pertinent names for cholesky factorization functions --- edo/src/edoSamplerNormalMulti.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 5e5910fb9..c16c77ef3 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -61,11 +61,11 @@ public: typedef ublas::symmetric_matrix< AtomType, ublas::lower > MatrixType; enum Method { - //! use the standard algorithm, with square root @see factorize + //! use the standard algorithm, with square root @see factorize_LLT standard, - //! use the algorithm using absolute value within the square root @see factorize_abs + //! use the algorithm using absolute value within the square root @see factorize_LLT_abs absolute, - //! use the robust algorithm, without square root + //! use the robust algorithm, without square root @see factorize_LDLT robust }; Method _use; @@ -147,11 +147,11 @@ public: void factorize( const MatrixType& V ) { if( _use == standard ) { - factorize_std( V ); + factorize_LLT( V ); } else if( _use == absolute ) { - factorize_abs( V ); + factorize_LLT_abs( V ); } else if( _use == robust ) { - factorize_robust( V ); + factorize_LDLT( V ); } } @@ -162,7 +162,7 @@ public: * When compiled in debug mode and called on ill-conditionned matrix, * will raise an assert before calling the square root on a negative number. */ - void factorize_std( const MatrixType& V) + void factorize_LLT( const MatrixType& V) { unsigned int N = assert_properties( V ); @@ -208,7 +208,7 @@ public: * Be aware that this increase round-off errors, this is just a ugly * hack to avoid crash. */ - void factorize_abs( const MatrixType & V) + void factorize_LLT_abs( const MatrixType & V) { unsigned int N = assert_properties( V ); @@ -248,7 +248,7 @@ public: * * Computes L and D such as V = L D Lt */ - void factorize_robust( const MatrixType& V) + void factorize_LDLT( const MatrixType& V) { unsigned int N = assert_properties( V ); From b2b1a964235ea9d15e3b547660ce0a38eb88ddda Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 12 Nov 2011 15:52:18 +0100 Subject: [PATCH 1859/2134] working robust cholesky factorization, with test binary --- edo/src/edoSamplerNormalMulti.h | 48 +++++++++------- edo/test/CMakeLists.txt | 1 + edo/test/t-cholesky.cpp | 97 +++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 20 deletions(-) create mode 100644 edo/test/t-cholesky.cpp diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index c16c77ef3..997b29c60 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -84,7 +84,7 @@ public: */ Cholesky(const MatrixType& V, Cholesky::Method use = standard ) : _use(use) { - factsorize( V ); + factorize( V ); } @@ -99,10 +99,19 @@ public: //! The decomposition of the covariance matrix const MatrixType & decomposition() const {return _L;} + /** When your using the LDLT robust decomposition (by passing the "robust" + * option to the constructor, @see factorize_LDTL), this is the diagonal + * matrix part. + */ + const MatrixType & diagonal() const {return _D;} + protected: //! The decomposition is a (lower) symetric matrix, just like the covariance matrix MatrixType _L; + + //! The diagonal matrix when using the LDLT factorization + MatrixType _D; /** Assert that the covariance matrix have the required properties and returns its dimension. @@ -243,37 +252,36 @@ public: } // for i in [1,N[ } - /** This alternative algorithm does not use square root BUT the covariance - * matrix must be invertible. + + /** This alternative algorithm do not use square root. * * Computes L and D such as V = L D Lt */ void factorize_LDLT( const MatrixType& V) { - unsigned int N = assert_properties( V ); + // use "int" everywhere, because of the "j-1" operation + int N = assert_properties( V ); + // example of an invertible matrix whose decomposition is undefined + assert( V(0,0) != 0 ); - unsigned int i, j, k; - //MatrixType D = ublas::zero_matrix(N); - std::vector _D(N,0); + _D = ublas::zero_matrix(N,N); + _D(0,0) = V(0,0); + + for( int j=0; j +*/ + +#include +#include +#include + +#include +#include +#include + +typedef eoReal< eoMinimizingFitness > EOT; +typedef edoNormalMulti EOD; + +std::ostream& operator<< (std::ostream& out, const ublas::symmetric_matrix< double, ublas::lower >& mat ) +{ + for( unsigned int i=0; i::Cholesky::MatrixType MatrixType; + + // a variance-covariance matrix of size N*N + MatrixType V(N,N); + + // random covariance matrix + for( unsigned int i=0; i 0 + for( unsigned int j=i+1; j::Cholesky LLT( edoSamplerNormalMulti::Cholesky::standard ); + edoSamplerNormalMulti::Cholesky LLTa( edoSamplerNormalMulti::Cholesky::absolute ); + edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); + + MatrixType L0 = LLT(V); + std::cout << "LLT" << std::endl << L0 << std::endl; + MatrixType V0 = ublas::prod( L0, ublas::trans(L0) ); + std::cout << "LLT covar" << std::endl << V0 << std::endl; + std::cout << "-----------------------------------------------------------" << std::endl; + + MatrixType L1 = LLTa(V); + std::cout << "LLT abs" << std::endl << L1 << std::endl; + MatrixType V1 = ublas::prod( L1, ublas::trans(L1) ); + std::cout << "LLT covar" << std::endl << V1 << std::endl; + std::cout << "-----------------------------------------------------------" << std::endl; + + MatrixType L2 = LDLT(V); + MatrixType D2 = LDLT.diagonal(); + std::cout << "LDLT" << std::endl << L2 << std::endl; + // ublas do not allow nested products, we should use a temporary matrix, + // thus the inline instanciation of a MatrixType + // see: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS + MatrixType V2 = ublas::prod( MatrixType(ublas::prod( L2, D2 )), ublas::trans(L2) ); + std::cout << "LDLT covar" << std::endl << V2 << std::endl; + std::cout << "-----------------------------------------------------------" << std::endl; + +} From e0f691c148672406b1f5d58dfb392065d79aab44 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 12 Nov 2011 20:13:18 +0100 Subject: [PATCH 1860/2134] the complete robust cholesky factorization -- bugfix in LDLT: return the factorization LD^1/2 instead of L, thus no needs of accessors on D --- edo/src/edoSamplerNormalMulti.h | 54 +++++++++++++++++++-------------- edo/test/t-cholesky.cpp | 8 ++--- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 997b29c60..e2852447e 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -41,8 +41,8 @@ Authors: * - compute the Cholesky decomposition L of V (i.e. such as V=LL*) * - return X = M + LT */ -template< class EOT, typename D = edoNormalMulti< EOT > > -class edoSamplerNormalMulti : public edoSampler< D > +template< class EOT, typename EOD = edoNormalMulti< EOT > > +class edoSamplerNormalMulti : public edoSampler< EOD > { public: typedef typename EOT::AtomType AtomType; @@ -97,23 +97,16 @@ public: } //! The decomposition of the covariance matrix - const MatrixType & decomposition() const {return _L;} - - /** When your using the LDLT robust decomposition (by passing the "robust" - * option to the constructor, @see factorize_LDTL), this is the diagonal - * matrix part. - */ - const MatrixType & diagonal() const {return _D;} + const MatrixType & decomposition() const + { + return _L; + } protected: //! The decomposition is a (lower) symetric matrix, just like the covariance matrix MatrixType _L; - //! The diagonal matrix when using the LDLT factorization - MatrixType _D; - - /** Assert that the covariance matrix have the required properties and returns its dimension. * * Note: if compiled with NDEBUG, will not assert anything and just return the dimension. @@ -222,6 +215,7 @@ public: unsigned int N = assert_properties( V ); unsigned int i=0, j=0, k; + _L(0, 0) = sqrt( V(0, 0) ); // end of the column @@ -264,27 +258,41 @@ public: // example of an invertible matrix whose decomposition is undefined assert( V(0,0) != 0 ); - _D = ublas::zero_matrix(N,N); - _D(0,0) = V(0,0); + MatrixType L(N,N); + MatrixType D = ublas::zero_matrix(N,N); + D(0,0) = V(0,0); for( int j=0; j & repairer, typename Cholesky::Method use = Cholesky::absolute ) - : edoSampler< D >( repairer), _cholesky(use) + : edoSampler< EOD >( repairer), _cholesky(use) {} - EOT sample( edoNormalMulti< EOT >& distrib ) + EOT sample( EOD& distrib ) { unsigned int size = distrib.size(); assert(size > 0); diff --git a/edo/test/t-cholesky.cpp b/edo/test/t-cholesky.cpp index 11bcaa466..c06fd7269 100644 --- a/edo/test/t-cholesky.cpp +++ b/edo/test/t-cholesky.cpp @@ -85,12 +85,8 @@ int main(int argc, char** argv) std::cout << "-----------------------------------------------------------" << std::endl; MatrixType L2 = LDLT(V); - MatrixType D2 = LDLT.diagonal(); - std::cout << "LDLT" << std::endl << L2 << std::endl; - // ublas do not allow nested products, we should use a temporary matrix, - // thus the inline instanciation of a MatrixType - // see: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS - MatrixType V2 = ublas::prod( MatrixType(ublas::prod( L2, D2 )), ublas::trans(L2) ); + std::cout << "LDLT: L" << std::endl << L2 << std::endl; + MatrixType V2 = ublas::prod( L2, ublas::trans(L2) ); std::cout << "LDLT covar" << std::endl << V2 << std::endl; std::cout << "-----------------------------------------------------------" << std::endl; From fe2cebc0e871dbe35d84e696754195f81ea9384e Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 12 Nov 2011 23:44:31 +0100 Subject: [PATCH 1861/2134] BUGFIX: factorized matrix are not symetric, cholesky factorization should process different types for covariance and decomposition + better format output for cholesky test --- edo/src/edoSamplerNormalMulti.h | 58 ++++++++--------- edo/test/t-cholesky.cpp | 106 ++++++++++++++++++++++++-------- 2 files changed, 110 insertions(+), 54 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index e2852447e..35200c79f 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -49,7 +49,7 @@ public: /** Cholesky decomposition, given a matrix V, return a matrix L - * such as V = L Lt (Lt being the conjugate transpose of L). + * such as V = L L^T (L^T being the transposed of L). * * Need a symmetric and positive definite matrix as an input, which * should be the case of a non-ill-conditionned covariance matrix. @@ -58,7 +58,8 @@ public: class Cholesky { public: - typedef ublas::symmetric_matrix< AtomType, ublas::lower > MatrixType; + typedef ublas::symmetric_matrix< AtomType, ublas::lower > CovarMat; + typedef ublas::matrix< AtomType > FactorMat; enum Method { //! use the standard algorithm, with square root @see factorize_LLT @@ -82,7 +83,8 @@ public: * * Use the standard unstable method by default. */ - Cholesky(const MatrixType& V, Cholesky::Method use = standard ) : _use(use) + Cholesky(const CovarMat& V, Cholesky::Method use = standard ) : + _use(use), _L(ublas::zero_matrix(V.size1(),V.size2())) { factorize( V ); } @@ -90,14 +92,14 @@ public: /** Compute the factorization and return the result */ - const MatrixType& operator()( const MatrixType& V ) + const FactorMat& operator()( const CovarMat& V ) { factorize( V ); return decomposition(); } //! The decomposition of the covariance matrix - const MatrixType & decomposition() const + const FactorMat & decomposition() const { return _L; } @@ -105,18 +107,18 @@ public: protected: //! The decomposition is a (lower) symetric matrix, just like the covariance matrix - MatrixType _L; + FactorMat _L; /** Assert that the covariance matrix have the required properties and returns its dimension. * * Note: if compiled with NDEBUG, will not assert anything and just return the dimension. */ - unsigned assert_properties( const MatrixType& V ) + unsigned assert_properties( const CovarMat& V ) { unsigned int Vl = V.size1(); // number of lines // the result goes in _L - _L.resize(Vl); + _L = ublas::zero_matrix(Vl,Vl); #ifndef NDEBUG assert(Vl > 0); @@ -135,7 +137,6 @@ public: * perform the cholesky factorization * check if all eigenvalues are positives * check if all of the leading principal minors are positive - * */ #endif @@ -146,7 +147,7 @@ public: /** Actually performs the factorization with the method given at * instanciation. Results are cached in _L. */ - void factorize( const MatrixType& V ) + void factorize( const CovarMat& V ) { if( _use == standard ) { factorize_LLT( V ); @@ -161,10 +162,12 @@ public: /** This standard algorithm makes use of square root and is thus subject * to round-off errors if the covariance matrix is very ill-conditioned. * + * Compute L such that V = L L^T + * * When compiled in debug mode and called on ill-conditionned matrix, * will raise an assert before calling the square root on a negative number. */ - void factorize_LLT( const MatrixType& V) + void factorize_LLT( const CovarMat& V) { unsigned int N = assert_properties( V ); @@ -210,7 +213,7 @@ public: * Be aware that this increase round-off errors, this is just a ugly * hack to avoid crash. */ - void factorize_LLT_abs( const MatrixType & V) + void factorize_LLT_abs( const CovarMat & V) { unsigned int N = assert_properties( V ); @@ -247,19 +250,21 @@ public: } - /** This alternative algorithm do not use square root. + /** This alternative algorithm do not use square root in an inner loop, + * but only for some diagonal elements of the matrix D. * - * Computes L and D such as V = L D Lt + * Computes L and D such as V = L D L^T. + * The factorized matrix is (L D^1/2), because V = (L D^1/2) (L D^1/2)^T */ - void factorize_LDLT( const MatrixType& V) + void factorize_LDLT( const CovarMat& V) { // use "int" everywhere, because of the "j-1" operation int N = assert_properties( V ); // example of an invertible matrix whose decomposition is undefined assert( V(0,0) != 0 ); - MatrixType L(N,N); - MatrixType D = ublas::zero_matrix(N,N); + FactorMat L = ublas::zero_matrix(N,N); + FactorMat D = ublas::zero_matrix(N,N); D(0,0) = V(0,0); for( int j=0; j 0); - // Cholesky factorisation gererating matrix L from covariance - // matrix V. - // We must use cholesky.decomposition() to get the resulting matrix. - // // L = cholesky decomposition of varcovar - const typename Cholesky::MatrixType& L = _cholesky( distrib.varcovar() ); + const typename Cholesky::FactorMat& L = _cholesky( distrib.varcovar() ); - // T = vector of size elements drawn in N(0,1) rng.normal(1.0) + // T = vector of size elements drawn in N(0,1) ublas::vector< AtomType > T( size ); for ( unsigned int i = 0; i < size; ++i ) { T( i ) = rng.normal(); diff --git a/edo/test/t-cholesky.cpp b/edo/test/t-cholesky.cpp index c06fd7269..5716d8480 100644 --- a/edo/test/t-cholesky.cpp +++ b/edo/test/t-cholesky.cpp @@ -28,6 +28,9 @@ Authors: #include #include #include +#include +#include +#include #include #include @@ -36,26 +39,73 @@ Authors: typedef eoReal< eoMinimizingFitness > EOT; typedef edoNormalMulti EOD; -std::ostream& operator<< (std::ostream& out, const ublas::symmetric_matrix< double, ublas::lower >& mat ) + +void setformat( std::ostream& out ) { + out << std::right; + out << std::setfill(' '); + out << std::setw( 5 + std::numeric_limits::digits10); + out << std::setprecision(std::numeric_limits::digits10); + out << std::setiosflags(std::ios_base::showpoint); +} + + +template +std::string format(const MT& mat ) +{ + std::ostringstream out; + setformat(out); + for( unsigned int i=0; i +T round( T val, T prec = 1.0 ) +{ + return (val > 0.0) ? + floor(val * prec + 0.5) / prec : + ceil(val * prec - 0.5) / prec ; +} + + +template +bool equal( const MT& M1, const MT& M2, double prec /* = 1/std::numeric_limits::digits10 ???*/ ) +{ + if( M1.size1() != M2.size1() || M1.size2() != M2.size2() ) { + return false; + } + + for( unsigned int i=0; i::Cholesky LLT( edoSamplerNormalMulti::Cholesky::standard ); + FactorMat L0 = LLT(V); + std::cout << "LLT" << std::endl << format(L0) << std::endl; + CovarMat V0 = ublas::prod( L0, ublas::trans(L0) ); + std::cout << "LLT covar" << std::endl << format(V0) << std::endl; + assert( equal(V0,V,precision) ); + std::cout << linesep << std::endl; + edoSamplerNormalMulti::Cholesky LLTa( edoSamplerNormalMulti::Cholesky::absolute ); - edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); - - MatrixType L0 = LLT(V); - std::cout << "LLT" << std::endl << L0 << std::endl; - MatrixType V0 = ublas::prod( L0, ublas::trans(L0) ); - std::cout << "LLT covar" << std::endl << V0 << std::endl; - std::cout << "-----------------------------------------------------------" << std::endl; - - MatrixType L1 = LLTa(V); - std::cout << "LLT abs" << std::endl << L1 << std::endl; - MatrixType V1 = ublas::prod( L1, ublas::trans(L1) ); - std::cout << "LLT covar" << std::endl << V1 << std::endl; - std::cout << "-----------------------------------------------------------" << std::endl; + FactorMat L1 = LLTa(V); + std::cout << "LLT abs" << std::endl << format(L1) << std::endl; + CovarMat V1 = ublas::prod( L1, ublas::trans(L1) ); + std::cout << "LLT covar" << std::endl << format(V1) << std::endl; + assert( equal(V1,V,precision) ); + std::cout << linesep << std::endl; - MatrixType L2 = LDLT(V); - std::cout << "LDLT: L" << std::endl << L2 << std::endl; - MatrixType V2 = ublas::prod( L2, ublas::trans(L2) ); - std::cout << "LDLT covar" << std::endl << V2 << std::endl; - std::cout << "-----------------------------------------------------------" << std::endl; + edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); + FactorMat L2 = LDLT(V); + std::cout << "LDLT" << std::endl << format(L2) << std::endl; + CovarMat V2 = ublas::prod( L2, ublas::trans(L2) ); + std::cout << "LDLT covar" << std::endl << format(V2) << std::endl; + assert( equal(V2,V,precision) ); + std::cout << linesep << std::endl; } From 17ce8a90e3d503a55874cd09d25dd4f2b03996ca Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 12 Nov 2011 23:53:23 +0100 Subject: [PATCH 1862/2134] cholesky test can take matrix size and precision arguments --- edo/test/t-cholesky.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/edo/test/t-cholesky.cpp b/edo/test/t-cholesky.cpp index 5716d8480..3b9ab5f8e 100644 --- a/edo/test/t-cholesky.cpp +++ b/edo/test/t-cholesky.cpp @@ -99,7 +99,16 @@ bool equal( const MT& M1, const MT& M2, double prec /* = 1/std::numeric_limits= 2 ) { + N = std::atof(argv[1]); + } + if( argc >= 3 ) { + precision = std::atof(argv[2]); + } typedef edoSamplerNormalMulti::Cholesky::CovarMat CovarMat; typedef edoSamplerNormalMulti::Cholesky::FactorMat FactorMat; @@ -115,9 +124,13 @@ int main(int argc, char** argv) } } - double precision = 1e-15; - setformat(std::cout); + std::cout << "usage: t-cholesky [N] [precision]" << std::endl; + std::cout << "N = " << N << std::endl; + std::cout << "precision = " << precision << std::endl; std::string linesep = "--------------------------------------------------------------------------------------------"; + std::cout << linesep << std::endl; + + setformat(std::cout); std::cout << "Covariance matrix" << std::endl << format(V) << std::endl; std::cout << linesep << std::endl; From 06100a6b57d8d1526c4044083fba8eaf67f62f64 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 13 Nov 2011 21:40:39 +0100 Subject: [PATCH 1863/2134] test binary now computes average errors of the differents cholesky factorization methods over random covariance matrices --- edo/src/edoSamplerNormalMulti.h | 4 + edo/test/t-cholesky.cpp | 172 +++++++++++++++++++++++--------- 2 files changed, 131 insertions(+), 45 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 35200c79f..e2ce880c8 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -58,7 +58,11 @@ public: class Cholesky { public: + //! The covariance-matrix is symetric typedef ublas::symmetric_matrix< AtomType, ublas::lower > CovarMat; + + //! The factorization matrix is triangular + // FIXME check if triangular types behaviour is like having 0 typedef ublas::matrix< AtomType > FactorMat; enum Method { diff --git a/edo/test/t-cholesky.cpp b/edo/test/t-cholesky.cpp index 3b9ab5f8e..06a93aeed 100644 --- a/edo/test/t-cholesky.cpp +++ b/edo/test/t-cholesky.cpp @@ -25,12 +25,13 @@ Authors: Johann DrĂ©o */ -#include +//#include #include #include #include #include #include +#include #include #include @@ -97,66 +98,147 @@ bool equal( const MT& M1, const MT& M2, double prec /* = 1/std::numeric_limits +MT error( const MT& M1, const MT& M2 ) +{ + assert( M1.size1() == M2.size1() && M1.size1() == M2.size2() ); + + MT Err = ublas::zero_matrix(M1.size1(),M1.size2()); + + for( unsigned int i=0; i +double trigsum( const MT& M ) +{ + double sum; + for( unsigned int i=0; i +double sum( const T& c ) +{ + return std::accumulate(c.begin(), c.end(), 0); +} + + int main(int argc, char** argv) { + srand(time(0)); - unsigned int N = 4; - double precision = 1e-15; + unsigned int N = 4; // size of matrix + unsigned int R = 1000; // nb of repetitions if( argc >= 2 ) { - N = std::atof(argv[1]); + N = std::atoi(argv[1]); } if( argc >= 3 ) { - precision = std::atof(argv[2]); + R = std::atoi(argv[2]); } + std::cout << "Usage: t-cholesky [matrix size] [repetitions]" << std::endl; + std::cout << "matrix size = " << N << std::endl; + std::cout << "repetitions = " << R << std::endl; + typedef edoSamplerNormalMulti::Cholesky::CovarMat CovarMat; typedef edoSamplerNormalMulti::Cholesky::FactorMat FactorMat; - // a variance-covariance matrix of size N*N - CovarMat V(N,N); + edoSamplerNormalMulti::Cholesky LLT( edoSamplerNormalMulti::Cholesky::standard ); + edoSamplerNormalMulti::Cholesky LLTa( edoSamplerNormalMulti::Cholesky::absolute ); + edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); - // random covariance matrix - for( unsigned int i=0; i 0 - for( unsigned int j=i+1; j s0,s1,s2; + for( unsigned int n=0; n= 0 + for( unsigned int j=i+1; j::Cholesky LLT( edoSamplerNormalMulti::Cholesky::standard ); - FactorMat L0 = LLT(V); - std::cout << "LLT" << std::endl << format(L0) << std::endl; - CovarMat V0 = ublas::prod( L0, ublas::trans(L0) ); - std::cout << "LLT covar" << std::endl << format(V0) << std::endl; - assert( equal(V0,V,precision) ); - std::cout << linesep << std::endl; - - edoSamplerNormalMulti::Cholesky LLTa( edoSamplerNormalMulti::Cholesky::absolute ); - FactorMat L1 = LLTa(V); - std::cout << "LLT abs" << std::endl << format(L1) << std::endl; - CovarMat V1 = ublas::prod( L1, ublas::trans(L1) ); - std::cout << "LLT covar" << std::endl << format(V1) << std::endl; - assert( equal(V1,V,precision) ); - std::cout << linesep << std::endl; - - edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); - FactorMat L2 = LDLT(V); - std::cout << "LDLT" << std::endl << format(L2) << std::endl; - CovarMat V2 = ublas::prod( L2, ublas::trans(L2) ); - std::cout << "LDLT covar" << std::endl << format(V2) << std::endl; - assert( equal(V2,V,precision) ); - std::cout << linesep << std::endl; +// double precision = 1e-15; +// if( argc >= 4 ) { +// precision = std::atof(argv[3]); +// } +// std::cout << "precision = " << precision << std::endl; +// std::cout << "usage: t-cholesky [N] [precision]" << std::endl; +// std::cout << "N = " << N << std::endl; +// std::cout << "precision = " << precision << std::endl; +// std::string linesep = "--------------------------------------------------------------------------------------------"; +// std::cout << linesep << std::endl; +// +// setformat(std::cout); +// +// std::cout << "Covariance matrix" << std::endl << format(V) << std::endl; +// std::cout << linesep << std::endl; +// +// edoSamplerNormalMulti::Cholesky LLT( edoSamplerNormalMulti::Cholesky::standard ); +// FactorMat L0 = LLT(V); +// CovarMat V0 = ublas::prod( L0, ublas::trans(L0) ); +// CovarMat E0 = error(V,V0); +// std::cout << "LLT" << std::endl << format(E0) << std::endl; +// std::cout << trigsum(E0) << std::endl; +// std::cout << "LLT" << std::endl << format(L0) << std::endl; +// std::cout << "LLT covar" << std::endl << format(V0) << std::endl; +// assert( equal(V0,V,precision) ); +// std::cout << linesep << std::endl; +// +// edoSamplerNormalMulti::Cholesky LLTa( edoSamplerNormalMulti::Cholesky::absolute ); +// FactorMat L1 = LLTa(V); +// CovarMat V1 = ublas::prod( L1, ublas::trans(L1) ); +// CovarMat E1 = error(V,V1); +// std::cout << "LLT abs" << std::endl << format(E1) << std::endl; +// std::cout << trigsum(E1) << std::endl; +// std::cout << "LLT abs" << std::endl << format(L1) << std::endl; +// std::cout << "LLT covar" << std::endl << format(V1) << std::endl; +// assert( equal(V1,V,precision) ); +// std::cout << linesep << std::endl; +// +// edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); +// FactorMat L2 = LDLT(V); +// CovarMat V2 = ublas::prod( L2, ublas::trans(L2) ); +// CovarMat E2 = error(V,V2); +// std::cout << "LDLT" << std::endl << format(E2) << std::endl; +// std::cout << trigsum(E2) << std::endl; +// std::cout << "LDLT" << std::endl << format(L2) << std::endl; +// std::cout << "LDLT covar" << std::endl << format(V2) << std::endl; +// assert( equal(V2,V,precision) ); +// std::cout << linesep << std::endl; } From 9decda0c6a5bd09019d396b1faac9660c7d65eee Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 15 Nov 2011 17:10:46 +0100 Subject: [PATCH 1864/2134] cholesky factorization with rounding to zero --- edo/src/edoSamplerNormalMulti.h | 52 +++++++++++++++++++++++++++++++++ edo/test/t-cholesky.cpp | 12 ++++++-- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index e2ce880c8..6099ed95b 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -70,6 +70,8 @@ public: standard, //! use the algorithm using absolute value within the square root @see factorize_LLT_abs absolute, + //! use the method that set negative square roots to zero @see factorize_LLT_zero + zeroing, //! use the robust algorithm, without square root @see factorize_LDLT robust }; @@ -157,6 +159,8 @@ public: factorize_LLT( V ); } else if( _use == absolute ) { factorize_LLT_abs( V ); + } else if( _use == zeroing ) { + factorize_LLT_zero( V ); } else if( _use == robust ) { factorize_LDLT( V ); } @@ -254,6 +258,54 @@ public: } + /** This standard algorithm makes use of square root but do not fail + * if the covariance matrix is very ill-conditioned. + * Here, if the diagonal difference ir negative, we set it to zero. + * + * Be aware that this increase round-off errors, this is just a ugly + * hack to avoid crash. + */ + void factorize_LLT_zero( const CovarMat & V) + { + unsigned int N = assert_properties( V ); + + unsigned int i=0, j=0, k; + + _L(0, 0) = sqrt( V(0, 0) ); + + // end of the column + for ( j = 1; j < N; ++j ) { + _L(j, 0) = V(0, j) / _L(0, 0); + } + + // end of the matrix + for ( i = 1; i < N; ++i ) { // each column + // diagonal + double sum = 0.0; + for ( k = 0; k < i; ++k) { + sum += _L(i, k) * _L(i, k); + } + + if( V(i,i) - sum >= 0 ) { + _L(i,i) = sqrt( V(i,i) - sum); + } else { + _L(i,i) = 0; + } + + for ( j = i + 1; j < N; ++j ) { // rows + // one element + sum = 0.0; + for ( k = 0; k < i; ++k ) { + sum += _L(j, k) * _L(i, k); + } + + _L(j, i) = (V(j, i) - sum) / _L(i, i); + + } // for j in ]i,N[ + } // for i in [1,N[ + } + + /** This alternative algorithm do not use square root in an inner loop, * but only for some diagonal elements of the matrix D. * diff --git a/edo/test/t-cholesky.cpp b/edo/test/t-cholesky.cpp index 06a93aeed..b141e6e48 100644 --- a/edo/test/t-cholesky.cpp +++ b/edo/test/t-cholesky.cpp @@ -158,9 +158,10 @@ int main(int argc, char** argv) edoSamplerNormalMulti::Cholesky LLT( edoSamplerNormalMulti::Cholesky::standard ); edoSamplerNormalMulti::Cholesky LLTa( edoSamplerNormalMulti::Cholesky::absolute ); + edoSamplerNormalMulti::Cholesky LLTz( edoSamplerNormalMulti::Cholesky::zeroing ); edoSamplerNormalMulti::Cholesky LDLT( edoSamplerNormalMulti::Cholesky::robust ); - std::vector s0,s1,s2; + std::vector s0,s1,s2,s3; for( unsigned int n=0; n= 4 ) { From e09bb5551bd6160ba0fed79a150f2da13d8e958b Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 17 Nov 2011 13:40:26 +0100 Subject: [PATCH 1865/2134] assert that the decimals parameters of the round repairer is <= 1.0 --- edo/src/edoRepairerRound.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/edo/src/edoRepairerRound.h b/edo/src/edoRepairerRound.h index c370a03c3..a882021cc 100644 --- a/edo/src/edoRepairerRound.h +++ b/edo/src/edoRepairerRound.h @@ -86,7 +86,11 @@ public: typedef typename EOT::AtomType ArgType; //! Generally speaking, we expect decimals being <= 1, but it can work for higher values - edoRepairerRoundDecimals( ArgType decimals ) : edoRepairerApplyBinary( edoRound, 1 / decimals ) {} + edoRepairerRoundDecimals( ArgType decimals ) : edoRepairerApplyBinary( edoRound, 1 / decimals ) + { + assert( decimals <= 1.0 ); + assert( 1/decimals >= 1.0 ); + } }; From 164a81a10caeba5ed1964cd817b1761108d91e11 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 17 Nov 2011 13:41:32 +0100 Subject: [PATCH 1866/2134] output pretty formated matrix in debug mode in the multi-normal sampler --- edo/src/edoSamplerNormalMulti.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 6099ed95b..dc3519ebc 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -29,6 +29,7 @@ Authors: #define _edoSamplerNormalMulti_h #include +#include #include #include @@ -110,6 +111,22 @@ public: return _L; } + template + std::string format(const MT& mat ) + { + std::ostringstream out; + + for( unsigned int i=0; i(Vl,Vl); + eo::log << eo::debug << std::endl << "Covariance matrix:" << format( V ) << std::endl; + #ifndef NDEBUG assert(Vl > 0); @@ -164,6 +183,8 @@ public: } else if( _use == robust ) { factorize_LDLT( V ); } + + eo::log << eo::debug << std::endl << "Decomposed matrix:" << format( _L ) << std::endl; } @@ -289,7 +310,7 @@ public: if( V(i,i) - sum >= 0 ) { _L(i,i) = sqrt( V(i,i) - sum); } else { - _L(i,i) = 0; + _L(i,i) = std::numeric_limits::epsilon(); } for ( j = i + 1; j < N; ++j ) { // rows From ccd77037ec2c202592ecda2e03648633da35f9a7 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 29 Nov 2011 15:06:19 +0100 Subject: [PATCH 1867/2134] bugfix: IQR should not be negative (oups :-) --- eo/src/utils/eoStat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 916bcf439..32c3bf9f6 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -448,7 +448,7 @@ public: std::nth_element( pop.begin(), pop.begin()+quartile*3, pop.end() ); typename EOT::Fitness Q3 = pop[quartile*3].fitness(); - value() = Q1 - Q3; + value() = Q3 - Q1; } } From e77b27257937c559c223c9bbd1c9b51f006335db Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 1 Dec 2011 10:20:17 +0100 Subject: [PATCH 1868/2134] bad doc string for eoSIGContinue --- eo/src/eoSIGContinue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoSIGContinue.h b/eo/src/eoSIGContinue.h index d7db55d33..2199b49ef 100644 --- a/eo/src/eoSIGContinue.h +++ b/eo/src/eoSIGContinue.h @@ -48,7 +48,7 @@ void set_bool(int) } /** - Ctrl C handling: this eoContinue tells whether the user pressed Ctrl C + A continuator that stops if a given signal is received during the execution */ template< class EOT> class eoSIGContinue: public eoContinue From 5115deb7dd255d4a7443732aad0e8a6dc209acc4 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 12 Dec 2011 22:22:04 +0100 Subject: [PATCH 1869/2134] an eoStat that simply count generations --- eo/src/utils/checkpointing | 1 + eo/src/utils/eoGenCounter.h | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 eo/src/utils/eoGenCounter.h diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index dea1432c9..5d49e5890 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -17,6 +17,7 @@ #include #include #include +#include // and make_help - any better suggestion to include it? void make_help(eoParser & _parser); diff --git a/eo/src/utils/eoGenCounter.h b/eo/src/utils/eoGenCounter.h new file mode 100644 index 000000000..a06949c21 --- /dev/null +++ b/eo/src/utils/eoGenCounter.h @@ -0,0 +1,46 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c) Thales group 2011 + + Author: johann.dreo@thalesgroup.com + */ + +#ifndef _eoGenCounter_h +#define _eoGenCounter_h + +#include +#include + +/** + An eoStat that simply gives the current generation index + + @ingroup Stats +*/ +class eoGenCounter : public eoUpdater, public eoValueParam +{ +public: + eoGenCounter( unsigned int start = 0, std::string label = "Gen" ) : eoValueParam(start, label), _nb(start) {} + + virtual void operator()() + { + value() = _nb++; + } + +private: + unsigned int _nb; +}; + +#endif From 3b66f04fd6f896053a6817788a96545953dd7dec Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 14 Dec 2011 15:49:27 +0100 Subject: [PATCH 1870/2134] refactoring Cholesky decomposition in several classes --- edo/src/utils/edoCholesky.h | 280 ++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 edo/src/utils/edoCholesky.h diff --git a/edo/src/utils/edoCholesky.h b/edo/src/utils/edoCholesky.h new file mode 100644 index 000000000..ea0c2bca1 --- /dev/null +++ b/edo/src/utils/edoCholesky.h @@ -0,0 +1,280 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +namespace cholesky { + +/** Cholesky decomposition, given a matrix V, return a matrix L + * such as V = L L^T (L^T being the transposed of L). + * + * Need a symmetric and positive definite matrix as an input, which + * should be the case of a non-ill-conditionned covariance matrix. + * Thus, expect a (lower) triangular matrix. + */ +template< typename T > +class CholeskyBase +{ +public: + //! The covariance-matrix is symetric + typedef ublas::symmetric_matrix< T, ublas::lower > CovarMat; + + //! The factorization matrix is triangular + // FIXME check if triangular types behaviour is like having 0 + typedef ublas::matrix< T > FactorMat; + + /** Instanciate without computing anything, you are responsible of + * calling the algorithm and getting the result with operator() + * */ + Cholesky( size_t s1 = 1, size_t s2 = 1 ) : + _L(ublas::zero_matrix(s1,s2)) + {} + + /** Computation is made at instanciation and then cached in a member variable, + * use decomposition() to get the result. + */ + Cholesky(const CovarMat& V) : + _L(ublas::zero_matrix(V.size1(),V.size2())) + { + (*this)( V ); + } + + /** Compute the factorization and cache the result */ + virtual void operator()( const CovarMat& V ) = 0; + + /** Compute the factorization and return the result */ + virtual const FactorMat& operator()( const CovarMat& V ) + { + (*this)( V ); + return decomposition(); + } + + //! The decomposition of the covariance matrix + const FactorMat & decomposition() const + { + return _L; + } + +protected: + + /** Assert that the covariance matrix have the required properties and returns its dimension. + * + * Note: if compiled with NDEBUG, will not assert anything and just return the dimension. + */ + unsigned assert_properties( const CovarMat& V ) + { + unsigned int Vl = V.size1(); // number of lines + + // the result goes in _L + _L = ublas::zero_matrix(Vl,Vl); + +#ifndef NDEBUG + assert(Vl > 0); + + unsigned int Vc = V.size2(); // number of columns + assert(Vc > 0); + assert( Vl == Vc ); + + // partial assert that V is semi-positive definite + // assert that all diagonal elements are positives + for( unsigned int i=0; i < Vl; ++i ) { + assert( V(i,i) > 0 ); + } + + /* FIXME what is the more efficient way to check semi-positive definite? Candidates are: + * perform the cholesky factorization + * check if all eigenvalues are positives + * check if all of the leading principal minors are positive + */ +#endif + + return Vl; + } + + //! The decomposition is a (lower) symetric matrix, just like the covariance matrix + FactorMat _L; +}; + + +/** This standard algorithm makes use of square root and is thus subject + * to round-off errors if the covariance matrix is very ill-conditioned. + * + * Compute L such that V = L L^T + * + * When compiled in debug mode and called on ill-conditionned matrix, + * will raise an assert before calling the square root on a negative number. + */ +template< typename T > +class CholeskyLLT : public CholeskyBase +{ + virtual void operator()( const CovarMat& V ) + { + unsigned int N = assert_properties( V ); + + unsigned int i=0, j=0, k; + _L(0, 0) = sqrt( V(0, 0) ); + + // end of the column + for ( j = 1; j < N; ++j ) { + _L(j, 0) = V(0, j) / _L(0, 0); + } + + // end of the matrix + for ( i = 1; i < N; ++i ) { // each column + // diagonal + double sum = 0.0; + for ( k = 0; k < i; ++k) { + sum += _L(i, k) * _L(i, k); + } + + _L(i,i) = L_i_i( V, i, sum ); + + for ( j = i + 1; j < N; ++j ) { // rows + // one element + sum = 0.0; + for ( k = 0; k < i; ++k ) { + sum += _L(j, k) * _L(i, k); + } + + _L(j, i) = (V(j, i) - sum) / _L(i, i); + + } // for j in ]i,N[ + } // for i in [1,N[ + } + + inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const + { + // round-off errors may appear here + assert( V(i,i) - sum >= 0 ); + return sqrt( V(i,i) - sum ); + } +}; + + + +/** This standard algorithm makes use of square root but do not fail + * if the covariance matrix is very ill-conditioned. + * Here, we propagate the error by using the absolute value before + * computing the square root. + * + * Be aware that this increase round-off errors, this is just a ugly + * hack to avoid crash. + */ +template< typename T > +class CholeskyLLTabs : public CholeskyLLT +{ + inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const + { + /***** ugly hack *****/ + return sqrt( fabs( V(i,i) - sum) ); + } +}; + + +/** This standard algorithm makes use of square root but do not fail + * if the covariance matrix is very ill-conditioned. + * Here, if the diagonal difference ir negative, we set it to zero. + * + * Be aware that this increase round-off errors, this is just a ugly + * hack to avoid crash. + */ +template< typename T > +class CholeskyLLTzero : public CholeskyLLT +{ + inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const + { + T Lii; + if( V(i,i) - sum >= 0 ) { + Lii = sqrt( V(i,i) - sum); + } else { + /***** ugly hack *****/ + Lii = 0; + } + return Lii; + } +}; + + +/** This alternative algorithm do not use square root in an inner loop, + * but only for some diagonal elements of the matrix D. + * + * Computes L and D such as V = L D L^T. + * The factorized matrix is (L D^1/2), because V = (L D^1/2) (L D^1/2)^T + */ +template< typename T > +class CholeskyLDLT : public CholeskyBase +{ + virtual void operator()( const CovarMat& V ) + { + // use "int" everywhere, because of the "j-1" operation + int N = assert_properties( V ); + // example of an invertible matrix whose decomposition is undefined + assert( V(0,0) != 0 ); + + FactorMat L = ublas::zero_matrix(N,N); + FactorMat D = ublas::zero_matrix(N,N); + D(0,0) = V(0,0); + + for( int j=0; j Date: Wed, 14 Dec 2011 15:53:57 +0100 Subject: [PATCH 1871/2134] beautifying code for Cholesky classes --- edo/src/utils/edoCholesky.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/edo/src/utils/edoCholesky.h b/edo/src/utils/edoCholesky.h index ea0c2bca1..be17f5fcd 100644 --- a/edo/src/utils/edoCholesky.h +++ b/edo/src/utils/edoCholesky.h @@ -129,6 +129,7 @@ protected: template< typename T > class CholeskyLLT : public CholeskyBase { +public: virtual void operator()( const CovarMat& V ) { unsigned int N = assert_properties( V ); @@ -164,6 +165,8 @@ class CholeskyLLT : public CholeskyBase } // for i in [1,N[ } + + /** The step of the standard LLT algorithm where round off errors may appear */ inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const { // round-off errors may appear here @@ -173,7 +176,6 @@ class CholeskyLLT : public CholeskyBase }; - /** This standard algorithm makes use of square root but do not fail * if the covariance matrix is very ill-conditioned. * Here, we propagate the error by using the absolute value before @@ -185,6 +187,7 @@ class CholeskyLLT : public CholeskyBase template< typename T > class CholeskyLLTabs : public CholeskyLLT { +public: inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const { /***** ugly hack *****/ @@ -203,6 +206,7 @@ class CholeskyLLTabs : public CholeskyLLT template< typename T > class CholeskyLLTzero : public CholeskyLLT { +public: inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const { T Lii; @@ -226,6 +230,7 @@ class CholeskyLLTzero : public CholeskyLLT template< typename T > class CholeskyLDLT : public CholeskyBase { +public: virtual void operator()( const CovarMat& V ) { // use "int" everywhere, because of the "j-1" operation @@ -256,24 +261,24 @@ class CholeskyLDLT : public CholeskyBase } // for i in rows } // for j in columns - _L = compute_L( L, D ); + _L = root( L, D ); } - inline FactorMat compute_L( FactorMat& L, FactorMat& D ) + inline FactorMat root( FactorMat& L, FactorMat& D ) { // now compute the final symetric matrix: _L = L D^1/2 // remember that V = ( L D^1/2) ( L D^1/2)^T // fortunately, the square root of a diagonal matrix is the square // root of all its elements - FactorMat D12 = D; + FactorMat sqrt_D = D; for(int i=0; i Date: Fri, 23 Dec 2011 16:05:05 +0100 Subject: [PATCH 1872/2134] cholesky classes are now in separate files --- edo/src/edoSamplerNormalMulti.h | 310 -------------------------------- 1 file changed, 310 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 6099ed95b..a017d493a 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -48,316 +48,6 @@ public: typedef typename EOT::AtomType AtomType; - /** Cholesky decomposition, given a matrix V, return a matrix L - * such as V = L L^T (L^T being the transposed of L). - * - * Need a symmetric and positive definite matrix as an input, which - * should be the case of a non-ill-conditionned covariance matrix. - * Thus, expect a (lower) triangular matrix. - */ - class Cholesky - { - public: - //! The covariance-matrix is symetric - typedef ublas::symmetric_matrix< AtomType, ublas::lower > CovarMat; - - //! The factorization matrix is triangular - // FIXME check if triangular types behaviour is like having 0 - typedef ublas::matrix< AtomType > FactorMat; - - enum Method { - //! use the standard algorithm, with square root @see factorize_LLT - standard, - //! use the algorithm using absolute value within the square root @see factorize_LLT_abs - absolute, - //! use the method that set negative square roots to zero @see factorize_LLT_zero - zeroing, - //! use the robust algorithm, without square root @see factorize_LDLT - robust - }; - Method _use; - - - /** Instanciate without computing anything, you are responsible of - * calling the algorithm and getting the result with operator() - * */ - Cholesky( Cholesky::Method use = standard ) : _use(use) {} - - - /** Computation is made at instanciation and then cached in a member variable, - * use decomposition() to get the result. - * - * Use the standard unstable method by default. - */ - Cholesky(const CovarMat& V, Cholesky::Method use = standard ) : - _use(use), _L(ublas::zero_matrix(V.size1(),V.size2())) - { - factorize( V ); - } - - - /** Compute the factorization and return the result - */ - const FactorMat& operator()( const CovarMat& V ) - { - factorize( V ); - return decomposition(); - } - - //! The decomposition of the covariance matrix - const FactorMat & decomposition() const - { - return _L; - } - - protected: - - //! The decomposition is a (lower) symetric matrix, just like the covariance matrix - FactorMat _L; - - /** Assert that the covariance matrix have the required properties and returns its dimension. - * - * Note: if compiled with NDEBUG, will not assert anything and just return the dimension. - */ - unsigned assert_properties( const CovarMat& V ) - { - unsigned int Vl = V.size1(); // number of lines - - // the result goes in _L - _L = ublas::zero_matrix(Vl,Vl); - -#ifndef NDEBUG - assert(Vl > 0); - - unsigned int Vc = V.size2(); // number of columns - assert(Vc > 0); - assert( Vl == Vc ); - - // partial assert that V is semi-positive definite - // assert that all diagonal elements are positives - for( unsigned int i=0; i < Vl; ++i ) { - assert( V(i,i) > 0 ); - } - - /* FIXME what is the more efficient way to check semi-positive definite? Candidates are: - * perform the cholesky factorization - * check if all eigenvalues are positives - * check if all of the leading principal minors are positive - */ -#endif - - return Vl; - } - - - /** Actually performs the factorization with the method given at - * instanciation. Results are cached in _L. - */ - void factorize( const CovarMat& V ) - { - if( _use == standard ) { - factorize_LLT( V ); - } else if( _use == absolute ) { - factorize_LLT_abs( V ); - } else if( _use == zeroing ) { - factorize_LLT_zero( V ); - } else if( _use == robust ) { - factorize_LDLT( V ); - } - } - - - /** This standard algorithm makes use of square root and is thus subject - * to round-off errors if the covariance matrix is very ill-conditioned. - * - * Compute L such that V = L L^T - * - * When compiled in debug mode and called on ill-conditionned matrix, - * will raise an assert before calling the square root on a negative number. - */ - void factorize_LLT( const CovarMat& V) - { - unsigned int N = assert_properties( V ); - - unsigned int i=0, j=0, k; - _L(0, 0) = sqrt( V(0, 0) ); - - // end of the column - for ( j = 1; j < N; ++j ) { - _L(j, 0) = V(0, j) / _L(0, 0); - } - - // end of the matrix - for ( i = 1; i < N; ++i ) { // each column - // diagonal - double sum = 0.0; - for ( k = 0; k < i; ++k) { - sum += _L(i, k) * _L(i, k); - } - - // round-off errors may appear here - assert( V(i,i) - sum >= 0 ); - _L(i,i) = sqrt( V(i,i) - sum ); - - for ( j = i + 1; j < N; ++j ) { // rows - // one element - sum = 0.0; - for ( k = 0; k < i; ++k ) { - sum += _L(j, k) * _L(i, k); - } - - _L(j, i) = (V(j, i) - sum) / _L(i, i); - - } // for j in ]i,N[ - } // for i in [1,N[ - } - - - /** This standard algorithm makes use of square root but do not fail - * if the covariance matrix is very ill-conditioned. - * Here, we propagate the error by using the absolute value before - * computing the square root. - * - * Be aware that this increase round-off errors, this is just a ugly - * hack to avoid crash. - */ - void factorize_LLT_abs( const CovarMat & V) - { - unsigned int N = assert_properties( V ); - - unsigned int i=0, j=0, k; - - _L(0, 0) = sqrt( V(0, 0) ); - - // end of the column - for ( j = 1; j < N; ++j ) { - _L(j, 0) = V(0, j) / _L(0, 0); - } - - // end of the matrix - for ( i = 1; i < N; ++i ) { // each column - // diagonal - double sum = 0.0; - for ( k = 0; k < i; ++k) { - sum += _L(i, k) * _L(i, k); - } - - _L(i,i) = sqrt( fabs( V(i,i) - sum) ); - - for ( j = i + 1; j < N; ++j ) { // rows - // one element - sum = 0.0; - for ( k = 0; k < i; ++k ) { - sum += _L(j, k) * _L(i, k); - } - - _L(j, i) = (V(j, i) - sum) / _L(i, i); - - } // for j in ]i,N[ - } // for i in [1,N[ - } - - - /** This standard algorithm makes use of square root but do not fail - * if the covariance matrix is very ill-conditioned. - * Here, if the diagonal difference ir negative, we set it to zero. - * - * Be aware that this increase round-off errors, this is just a ugly - * hack to avoid crash. - */ - void factorize_LLT_zero( const CovarMat & V) - { - unsigned int N = assert_properties( V ); - - unsigned int i=0, j=0, k; - - _L(0, 0) = sqrt( V(0, 0) ); - - // end of the column - for ( j = 1; j < N; ++j ) { - _L(j, 0) = V(0, j) / _L(0, 0); - } - - // end of the matrix - for ( i = 1; i < N; ++i ) { // each column - // diagonal - double sum = 0.0; - for ( k = 0; k < i; ++k) { - sum += _L(i, k) * _L(i, k); - } - - if( V(i,i) - sum >= 0 ) { - _L(i,i) = sqrt( V(i,i) - sum); - } else { - _L(i,i) = 0; - } - - for ( j = i + 1; j < N; ++j ) { // rows - // one element - sum = 0.0; - for ( k = 0; k < i; ++k ) { - sum += _L(j, k) * _L(i, k); - } - - _L(j, i) = (V(j, i) - sum) / _L(i, i); - - } // for j in ]i,N[ - } // for i in [1,N[ - } - - - /** This alternative algorithm do not use square root in an inner loop, - * but only for some diagonal elements of the matrix D. - * - * Computes L and D such as V = L D L^T. - * The factorized matrix is (L D^1/2), because V = (L D^1/2) (L D^1/2)^T - */ - void factorize_LDLT( const CovarMat& V) - { - // use "int" everywhere, because of the "j-1" operation - int N = assert_properties( V ); - // example of an invertible matrix whose decomposition is undefined - assert( V(0,0) != 0 ); - - FactorMat L = ublas::zero_matrix(N,N); - FactorMat D = ublas::zero_matrix(N,N); - D(0,0) = V(0,0); - - for( int j=0; j & repairer, typename Cholesky::Method use = Cholesky::absolute ) : edoSampler< EOD >( repairer), _cholesky(use) From 4805f72a806a48b79fe115586ab4e2c51f454c6f Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 23 Dec 2011 16:31:35 +0100 Subject: [PATCH 1873/2134] use the new cholesky api in edoSamplerNormalMulti --- edo/src/edoSamplerNormalMulti.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index e05166859..b7e73c754 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -32,6 +32,7 @@ Authors: #include #include +#include #include #include @@ -48,8 +49,8 @@ class edoSamplerNormalMulti : public edoSampler< EOD > public: typedef typename EOT::AtomType AtomType; - edoSamplerNormalMulti( edoRepairer & repairer, typename Cholesky::Method use = Cholesky::absolute ) - : edoSampler< EOD >( repairer), _cholesky(use) + edoSamplerNormalMulti( edoRepairer & repairer ) + : edoSampler< EOD >( repairer) {} @@ -59,7 +60,7 @@ public: assert(size > 0); // L = cholesky decomposition of varcovar - const typename Cholesky::FactorMat& L = _cholesky( distrib.varcovar() ); + const typename cholesky::CholeskyBase::FactorMat& L = _cholesky( distrib.varcovar() ); // T = vector of size elements drawn in N(0,1) ublas::vector< AtomType > T( size ); @@ -80,7 +81,7 @@ public: } protected: - Cholesky _cholesky; + cholesky::CholeskyLLT _cholesky; }; #endif // !_edoSamplerNormalMulti_h From ebf33d81772c384c5db93a0bbf4df7fedd1af53c Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 23 Dec 2011 16:50:51 +0100 Subject: [PATCH 1874/2134] bugfixes concerning the mew api --- edo/src/utils/edoCholesky.h | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/edo/src/utils/edoCholesky.h b/edo/src/utils/edoCholesky.h index be17f5fcd..e0437d009 100644 --- a/edo/src/utils/edoCholesky.h +++ b/edo/src/utils/edoCholesky.h @@ -48,26 +48,26 @@ public: /** Instanciate without computing anything, you are responsible of * calling the algorithm and getting the result with operator() * */ - Cholesky( size_t s1 = 1, size_t s2 = 1 ) : + CholeskyBase( size_t s1 = 1, size_t s2 = 1 ) : _L(ublas::zero_matrix(s1,s2)) {} /** Computation is made at instanciation and then cached in a member variable, * use decomposition() to get the result. */ - Cholesky(const CovarMat& V) : + CholeskyBase(const CovarMat& V) : _L(ublas::zero_matrix(V.size1(),V.size2())) { (*this)( V ); } /** Compute the factorization and cache the result */ - virtual void operator()( const CovarMat& V ) = 0; + virtual void factorize( const CovarMat& V ) = 0; /** Compute the factorization and return the result */ virtual const FactorMat& operator()( const CovarMat& V ) { - (*this)( V ); + this->factorize( V ); return decomposition(); } @@ -130,16 +130,16 @@ template< typename T > class CholeskyLLT : public CholeskyBase { public: - virtual void operator()( const CovarMat& V ) + virtual void factorize( const typename CholeskyBase::CovarMat& V ) { unsigned int N = assert_properties( V ); unsigned int i=0, j=0, k; - _L(0, 0) = sqrt( V(0, 0) ); + this->_L(0, 0) = sqrt( V(0, 0) ); // end of the column for ( j = 1; j < N; ++j ) { - _L(j, 0) = V(0, j) / _L(0, 0); + this->_L(j, 0) = V(0, j) / this->_L(0, 0); } // end of the matrix @@ -147,19 +147,19 @@ public: // diagonal double sum = 0.0; for ( k = 0; k < i; ++k) { - sum += _L(i, k) * _L(i, k); + sum += this->_L(i, k) * this->_L(i, k); } - _L(i,i) = L_i_i( V, i, sum ); + this->_L(i,i) = L_i_i( V, i, sum ); for ( j = i + 1; j < N; ++j ) { // rows // one element sum = 0.0; for ( k = 0; k < i; ++k ) { - sum += _L(j, k) * _L(i, k); + sum += this->_L(j, k) * this->_L(i, k); } - _L(j, i) = (V(j, i) - sum) / _L(i, i); + this->_L(j, i) = (V(j, i) - sum) / this->_L(i, i); } // for j in ]i,N[ } // for i in [1,N[ @@ -167,7 +167,7 @@ public: /** The step of the standard LLT algorithm where round off errors may appear */ - inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const + inline virtual T L_i_i( const typename CholeskyBase::CovarMat& V, const unsigned int& i, const double& sum ) const { // round-off errors may appear here assert( V(i,i) - sum >= 0 ); @@ -188,7 +188,7 @@ template< typename T > class CholeskyLLTabs : public CholeskyLLT { public: - inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const + inline virtual T L_i_i( const typename CholeskyBase::CovarMat& V, const unsigned int& i, const double& sum ) const { /***** ugly hack *****/ return sqrt( fabs( V(i,i) - sum) ); @@ -207,7 +207,7 @@ template< typename T > class CholeskyLLTzero : public CholeskyLLT { public: - inline virtual L_i_i( const CovarMat& V, const unsigned int& i, const double& sum ) const + inline virtual T L_i_i( const typename CholeskyBase::CovarMat& V, const unsigned int& i, const double& sum ) const { T Lii; if( V(i,i) - sum >= 0 ) { @@ -231,15 +231,15 @@ template< typename T > class CholeskyLDLT : public CholeskyBase { public: - virtual void operator()( const CovarMat& V ) + virtual void factorize( const typename CholeskyBase::CovarMat& V ) { // use "int" everywhere, because of the "j-1" operation int N = assert_properties( V ); // example of an invertible matrix whose decomposition is undefined assert( V(0,0) != 0 ); - FactorMat L = ublas::zero_matrix(N,N); - FactorMat D = ublas::zero_matrix(N,N); + typename CholeskyBase::FactorMat L = ublas::zero_matrix(N,N); + typename CholeskyBase::FactorMat D = ublas::zero_matrix(N,N); D(0,0) = V(0,0); for( int j=0; j_L = root( L, D ); } - inline FactorMat root( FactorMat& L, FactorMat& D ) + inline typename CholeskyBase::FactorMat root( typename CholeskyBase::FactorMat& L, typename CholeskyBase::FactorMat& D ) { - // now compute the final symetric matrix: _L = L D^1/2 + // now compute the final symetric matrix: this->_L = L D^1/2 // remember that V = ( L D^1/2) ( L D^1/2)^T // fortunately, the square root of a diagonal matrix is the square // root of all its elements - FactorMat sqrt_D = D; - for(int i=0; i::FactorMat sqrt_D = D; + for( int i=0; i < D.size1(); ++i) { sqrt_D(i,i) = sqrt(D(i,i)); } - // the factorization is thus _L*D^1/2 + // the factorization is thus this->_L*D^1/2 return ublas::prod( L, sqrt_D ); } }; From d10325d1ad38fb324f073b1ae7c94485362a92d9 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 12 Jan 2012 16:49:50 +0100 Subject: [PATCH 1875/2134] bypass repairer calls if the index list is empty in the dispatcher --- edo/src/edoRepairerDispatcher.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 117e8dfbf..1bf9cb39e 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -131,6 +131,7 @@ public: { // std::cout << "in dispatcher, sol = " << sol << std::endl; + // iterate over { indexe, repairer } // ipair is an iterator that points on a pair of for( typename edoRepairerDispatcher::iterator ipair = this->begin(); ipair != this->end(); ++ipair ) { @@ -140,6 +141,8 @@ public: EOT partsol; // std::cout << "\tusing indexes = "; +// + // iterate over indexes // j is an iterator that points on an uint for( std::vector< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) { @@ -151,6 +154,9 @@ public: // std::cout << std::endl; // std::cout << "\tpartial sol = " << partsol << std::endl; + if( partsol.size() == 0 ) { + continue; + } assert( partsol.size() > 0 ); // apply the repairer on the partial copy From 10a5712594cc74d5089feb3b3907613642508b8f Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 12 Jan 2012 17:47:55 +0100 Subject: [PATCH 1876/2134] replace the assert on empty index in the dispatcher by a warning --- edo/src/edoRepairerDispatcher.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/edo/src/edoRepairerDispatcher.h b/edo/src/edoRepairerDispatcher.h index 1bf9cb39e..b2c0777b5 100644 --- a/edo/src/edoRepairerDispatcher.h +++ b/edo/src/edoRepairerDispatcher.h @@ -120,7 +120,10 @@ public: //! Add more indexes set and their corresponding repairer operator address to the list void add( ICT idx, edoRepairer* op ) { - assert( idx.size() > 0 ); + //assert( idx.size() > 0 ); +#ifndef NDEBUG + eo::log << eo::warnings << "A repairer is added to the dispatcher while having an empty index list, nothing will be repaired" << std::endl; +#endif assert( op != NULL ); this->push_back( std::make_pair(idx, op) ); From cd185109295190bf162cc43c9ec5403e1bd1ff0f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 19 Jan 2012 02:34:36 +0100 Subject: [PATCH 1877/2134] + PKGBUILD for archlinux based packaging systems --- eo/PKGBUILD.cmake | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 eo/PKGBUILD.cmake diff --git a/eo/PKGBUILD.cmake b/eo/PKGBUILD.cmake new file mode 100644 index 000000000..44f0b3687 --- /dev/null +++ b/eo/PKGBUILD.cmake @@ -0,0 +1,23 @@ +# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $ +# Maintainer: Caner Candan +pkgname=libeo +pkgver=@PROJECT_VERSION@ +pkgrel=1 +pkgdesc="Evolving Objects is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast." +url="" +arch=('i686' 'x86_64') +license=('LGPL') +depends=() +makedepends=('make' 'cmake') +conflicts=() +replaces=() +backup=() +install= +source=($pkgname-$pkgver.tar.gz) +md5sums=() +build() { + cd $startdir/src/$pkgname-$pkgver + cmake -DCMAKE_INSTALL_PREFIX=/usr . + make || return 1 + make DESTDIR=$startdir/pkg install +} From 58a450afbc0677a3f5a818e5c5940922b06593bd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 19 Jan 2012 02:35:01 +0100 Subject: [PATCH 1878/2134] * cmake modified: PKGBUILD for archlinux based packaging systems --- eo/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index d7ef8558a..3cab6563e 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -70,6 +70,9 @@ CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) # now create config install_symlink script file CONFIGURE_FILE(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py) +# now create PKGBUILD file for archlinux package manager +CONFIGURE_FILE(PKGBUILD.cmake ${CMAKE_CURRENT_BINARY_DIR}/PKGBUILD) + # Set a special flag if the environment is windows (should do the same in a config.g file) IF (WIN32) ADD_DEFINITIONS(-D_WINDOWS=1) From 426c3584be9d69901e344446253e73912c8d9b71 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 10 Feb 2012 10:01:15 +0100 Subject: [PATCH 1879/2134] remove warning about unused variable 'size' in edoSampler --- edo/src/edoSampler.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/edo/src/edoSampler.h b/edo/src/edoSampler.h index bb0f8b6d0..745eac684 100644 --- a/edo/src/edoSampler.h +++ b/edo/src/edoSampler.h @@ -55,8 +55,7 @@ public: EOType operator()( D& distrib ) { - unsigned int size = distrib.size(); - assert(size > 0); + assert( distrib.size() > 0 ); // Point we want to sample to get higher a set of points // (coordinates in n dimension) From a6c8b9733c0e0659e7c112ceb98c8cf2414f7654 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 6 Mar 2012 21:55:54 +0100 Subject: [PATCH 1880/2134] =?UTF-8?q?*=20doc:=C2=A0badly=20named=20name=20?= =?UTF-8?q?of=20eoOneBitFlip,=20added=20eoBooleanGenerator=20in=20bitstrin?= =?UTF-8?q?g=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/ga/eoBitOp.h | 4 ++-- eo/src/utils/eoRndGenerators.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 3e3f4fa54..d1247020b 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -36,8 +36,8 @@ #include -/** eoBitFlip --> changes 1 bit -\class eoBitBitFlip eoBitOp.h ga/eoBitOp.h +/** eoOneBitFlip --> changes 1 bit +\class eoOneBitFlip eoBitOp.h ga/eoBitOp.h \ingroup bitstring @ingroup Variators diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index 16b03ec40..62e62ccff 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -110,6 +110,7 @@ inline bool eoUniformGenerator::operator()(void) /** The class eoBooleanGenerator can be used in the STL generate function to easily generate random booleans with a specified bias + \ingroup bitstring */ class eoBooleanGenerator : public eoRndGenerator { From ba5fe01ca013d91b63742033f934ba13b269bd79 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Mar 2012 14:37:31 +0100 Subject: [PATCH 1881/2134] implicit conversion operator to the base scalar type for eoDualFitness (but is it a good idea?) --- eo/src/eoDualFitness.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 3b7fda0dc..674fe075c 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -103,6 +103,17 @@ public: _is_feasible(dual.second) {} + // FIXME is it a good idea to include implicit conversion here? + /** Conversion operator: it permits to use a fitness instance as its scalar + * type, if needed. For example, this is possible: + * eoDualFitness > fit; + * double val = 1.0; + * fit = val; + * val = fit; + */ + operator BaseType(void) const { return _value; } + + inline bool is_feasible() const { return _is_feasible; From 7e7a47c9bad5448ffab4409fb90dd43f0b1875a3 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Mar 2012 18:14:04 +0100 Subject: [PATCH 1882/2134] added a getParam method to the eoParser, that raise an exception if the parameter has not been declared --- eo/src/utils/eoParser.cpp | 9 +++++++++ eo/src/utils/eoParser.h | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index fc1068b32..6ddcdb63d 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -129,6 +129,15 @@ eoParam * eoParser::getParamWithLongName(const std::string& _name) const return 0; } +eoParam * getParam(const std::string& _name) const +{ + eoParam * p = getParamWithLongName( _name ); + if( p == NULL ) { + throw eoMissingParamException(_name ); + } else { + return p; + } +} void eoParser::processParam(eoParam& param, std::string section) { diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index e65f7566e..1ba463179 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -176,6 +176,12 @@ public: eoParam * getParamWithLongName(const std::string& _name) const; + /** + * Get a handle on a param from its long name + * If not found, raise an eoMissingParamException + */ + eoParam * getParam(const std::string& _name) const; + /** Get or create parameter From 0808c52bf8f41bfeb127fb82a902dee88ec046af Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Mar 2012 18:15:23 +0100 Subject: [PATCH 1883/2134] removed a (funny but wontfix notabug) old comment in eoParser --- eo/src/utils/eoParser.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 1ba463179..b0f4c8886 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -188,9 +188,6 @@ public: It seems finally that the easiest use of the above method is through the following, whose interface is similar to that of the widely-used createParam. - - For some (probably very stupid) reason, I failed to put it in the - .cpp. Any hint??? */ template eoValueParam& getORcreateParam(ValueType _defaultValue, From a1aec6a5bedfed0ee168944a325ee13dcafcab6d Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Mar 2012 18:16:07 +0100 Subject: [PATCH 1884/2134] added the declaration of the exception used by eoParser::getParam --- eo/src/eoExceptions.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index 3b888436f..0066d985b 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -55,7 +55,6 @@ private: }; - /*! An error that signals that a maximum number of evaluations has been reached. @@ -80,4 +79,26 @@ private: }; +/*! + * An error that signals a missing parameter + * + * Thrown by eoParser::getParam + * + * @ingroup Parameters + */ +class eoMissingParamException : public std::exception +{ +public: + eoMissingParamException(std::string name) : _name(name){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "The command parameter " << _name << " has not been declared"; + return ss.str().c_str(); + } + +private: + std::string _name; +}; #endif // __eoExceptions_h__ From b89a216d2d272b4dea5729f23a3438f8d406483e Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Mar 2012 18:16:57 +0100 Subject: [PATCH 1885/2134] added a pragma warning along with the eo::log one in eoProportionalCombinedOp --- eo/src/eoProportionalCombinedOp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 123c634b0..4fea77e52 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -188,6 +188,7 @@ public: virtual void add(eoQuadOp & _op, const double _rate, bool _verbose) { +#pragma message "The use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; add(_op,_rate); } From 8be94d95cfd6ca551f8f4da967cebeb31851da93 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 16 Mar 2012 10:28:25 +0100 Subject: [PATCH 1886/2134] throwing destructor to avoid looser throw specifier error within gcc --- eo/src/eoExceptions.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index 0066d985b..d38b6cb1e 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -98,6 +98,8 @@ public: return ss.str().c_str(); } + ~eoMissingParamException() throw() {} + private: std::string _name; }; From 47447c47650d55102c11464b5ce532dcabdce0d9 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 26 Mar 2012 18:15:45 +0200 Subject: [PATCH 1887/2134] inherit eoCombinedContinue from std::vector, instead of having it as a member, so that we can easily manipulate continuators themselves --- eo/src/eoCombinedContinue.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index 4dac4d69e..5226e28dd 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -19,6 +19,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es +Authors : + todos@geneura.ugr.es + Marc Schoenauer + Ramón Casero Cańas + Johann Dréo */ //----------------------------------------------------------------------------- @@ -40,7 +45,7 @@ @ingroup Combination */ template< class EOT> -class eoCombinedContinue: public eoContinue { +class eoCombinedContinue: public eoContinue, public std::vector* > { public: /// Define Fitness @@ -48,45 +53,45 @@ public: /// Ctor, make sure that at least on continuator is present eoCombinedContinue( eoContinue& _cont) - : eoContinue () + : eoContinue(), std::vector* >(1, &_cont) { - continuators.push_back(&_cont); } /// Ctor - for historical reasons ... should disspear some day eoCombinedContinue( eoContinue& _cont1, eoContinue& _cont2) - : eoContinue () + : eoContinue(), std::vector* >() { - continuators.push_back(&_cont1); - continuators.push_back(&_cont2); +#pragma message "The double continuators constructor of eocombinedContinue is deprecated and will be removed in the next release." + + this->push_back(&_cont1); + this->push_back(&_cont2); } void add(eoContinue & _cont) { - continuators.push_back(&_cont); + this->push_back(&_cont); } - ///////////// RAMON'S CODE /////////////// void removeLast(void) { - continuators.pop_back(); +#pragma message "The removeLast method of eocombinedContinue is deprecated and will be removed in the next release, use pop_back instead." + this->pop_back(); } - ///////////// RAMON'S CODE (end) /////////////// /** Returns false when one of the embedded continuators say so (logical and) */ virtual bool operator() ( const eoPop& _pop ) { - for (unsigned i = 0; i < continuators.size(); ++i) - if ( !(*continuators[i])(_pop) ) return false; + for (unsigned i = 0; i < this->size(); ++i) + if ( ! (*this->at(i))(_pop) ) return false; return true; } virtual std::string className(void) const { return "eoCombinedContinue"; } -private: - std::vector*> continuators; +//private: +// std::vector*> continuators; }; #endif From 1bc2c5cc461127995e444463179fcf211db3f085 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 26 Mar 2012 18:18:45 +0200 Subject: [PATCH 1888/2134] added the 'value' method to eoParser, so as to permits a direct access to the value stored within the eovalueParam corresponding to a given param name --- eo/src/utils/eoParser.cpp | 13 +++++++++---- eo/src/utils/eoParser.h | 31 +++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 6ddcdb63d..7489cf658 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -18,9 +18,12 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@inria.fr - mkeijzer@dhi.dk +Contact: http://eodev.sourceforge.net +Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann DrĂ©o */ //----------------------------------------------------------------------------- @@ -37,6 +40,8 @@ #include #include #include +#include + using namespace std; @@ -129,7 +134,7 @@ eoParam * eoParser::getParamWithLongName(const std::string& _name) const return 0; } -eoParam * getParam(const std::string& _name) const +eoParam * eoParser::getParam(const std::string& _name) const { eoParam * p = getParamWithLongName( _name ); if( p == NULL ) { diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index b0f4c8886..b33f956e2 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -1,4 +1,4 @@ -/* (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* (c) Marc Schoenauer, Maarten Keijzer, GeNeura Team, Thales group This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free @@ -14,9 +14,11 @@ with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: http://eodev.sourceforge.net - todos@geneura.ugr.es, http://geneura.ugr.es - Marc.Schoenauer@polytechnique.fr - mkeijzer@dhi.dk +Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann DrĂ©o */ @@ -183,6 +185,27 @@ public: eoParam * getParam(const std::string& _name) const; + /** + * Get the value of a param from its long name + * If not found, raise an eoMissingParamException + * + * Remember to specify the expected return type with a templated call: + * unsigned int popSize = eoparser.value("popSize"); + */ + template + ValueType value(const std::string& _name) const + { + eoParam* param = getParam(_name); + + eoValueParam* vparam( + dynamic_cast< eoValueParam* >(param) + ); + + return vparam->value(); + } + + + /** Get or create parameter It seems finally that the easiest use of the above method is From 8c121bdafb95bd3102f297e97211c587e2cdea16 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 31 Mar 2012 17:48:55 +0200 Subject: [PATCH 1889/2134] added an new exception to handle cases where a wrong template is given to eoParser::valueOf --- eo/src/eoExceptions.h | 26 ++++++++++++++++++++++++++ eo/src/utils/eoParser.cpp | 1 - eo/src/utils/eoParser.h | 18 +++++++++++++----- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index d38b6cb1e..4d56ddb95 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -103,4 +103,30 @@ public: private: std::string _name; }; + +/*! + * An error that signals a bad parameter type + * + * Thrown by eoParser::valueOf + * + * @ingroup Parameters + */ +class eoWrongParamTypeException : public std::exception +{ +public: + eoWrongParamTypeException(std::string name) : _name(name){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "You asked for the parameter " << _name << " but it has not been declared under this type"; + return ss.str().c_str(); + } + + ~eoWrongParamTypeException() throw() {} + +private: + std::string _name; +}; + #endif // __eoExceptions_h__ diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 7489cf658..cc306bf73 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -40,7 +40,6 @@ Authors: #include #include #include -#include using namespace std; diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index b33f956e2..be680ab0c 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -32,6 +32,7 @@ Authors: #include "eoParam.h" #include "eoObject.h" #include "eoPersistent.h" +#include "eoExceptions.h" /** Parameter saving and loading @@ -191,17 +192,24 @@ public: * * Remember to specify the expected return type with a templated call: * unsigned int popSize = eoparser.value("popSize"); + * + * If the template type is not the good one, an eoWrongParamTypeException is raised. */ template - ValueType value(const std::string& _name) const + ValueType valueOf(const std::string& _name) const { eoParam* param = getParam(_name); - eoValueParam* vparam( - dynamic_cast< eoValueParam* >(param) - ); + // Note: eoParam is the polymorphic base class of eoValueParam, thus we can do a dynamix cast + eoValueParam* vparam = dynamic_cast< eoValueParam* >(param); - return vparam->value(); + if( vparam == NULL ) { + // if the dynamic cast has failed, chances are that ValueType + // is not the same than the one used at declaration. + throw eoWrongParamTypeException( _name ); + } else { + return vparam->value(); + } } From 28fedd3c517bdc1a87a44372acf46b3e77b1949d Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 31 Mar 2012 17:49:41 +0200 Subject: [PATCH 1890/2134] added a deprecated pragma message to eoOStreamMonitor --- eo/src/utils/eoOStreamMonitor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index b09a11b53..cb4c476a8 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -49,6 +49,7 @@ public : { (void)_verbose; eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; +#pragma message "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" } eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : From aa9fc586b65391c0bdd45d8b77f88ecb3bacc1bd Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 1 Apr 2012 11:59:43 +0200 Subject: [PATCH 1891/2134] assert pop size is not null in elements accessors --- eo/src/eoPop.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 3ea53f466..9c4c6bac5 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -185,10 +185,12 @@ public: #if defined(__CUDACC__) eoPop::iterator it_best_element() { - eoPop:: iterator it = std::max_element(begin(), end()); + eoPop:: iterator it = std::max_element(begin(), end()); #else - typename eoPop::iterator it_best_element() { - typename eoPop::iterator it = std::max_element(begin(), end()); + typename eoPop::iterator it_best_element() + { + assert( this->size() > 0 ); + typename eoPop::iterator it = std::max_element(begin(), end()); #endif return it; } @@ -199,7 +201,7 @@ public: #if defined(__CUDACC__) eoPop::const_iterator it = std::max_element(begin(), end()); #else - typename eoPop::const_iterator it = std::max_element(begin(), end()); + typename eoPop::const_iterator it = std::max_element(begin(), end()); #endif return (*it); } @@ -210,6 +212,7 @@ public: #if defined(__CUDACC__) eoPop::const_iterator it = std::min_element(begin(), end()); #else + assert( this->size() > 0 ); typename eoPop::const_iterator it = std::min_element(begin(), end()); #endif return (*it); @@ -223,6 +226,7 @@ public: #else typename eoPop::iterator it_worse_element() { + assert( this->size() > 0 ); typename eoPop::iterator it = std::min_element(begin(), end()); #endif return it; @@ -239,6 +243,7 @@ public: #else typename eoPop::iterator nth_element(int nth) { + assert( this->size() > 0 ); typename eoPop::iterator it = begin() + nth; #endif std::nth_element(begin(), it, end(), std::greater()); @@ -265,6 +270,7 @@ public: void nth_element(int which, std::vector& result) const { + assert( this->size() > 0 ); result.resize(size()); std::transform(begin(), end(), result.begin(), Ref()); From ca8948486f4b465754390889d2ce2e12fb994326 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 1 Apr 2012 12:09:17 +0200 Subject: [PATCH 1892/2134] cleaning the indentation and formating of eoPop.h, added the authors --- eo/src/eoPop.h | 487 ++++++++++++++++++++++++++----------------------- 1 file changed, 260 insertions(+), 227 deletions(-) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 9c4c6bac5..068498aa9 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -4,26 +4,35 @@ // eoPop.h // (c) GeNeura Team, 1998 /* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ +Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + jmerelo + gustavoromero + mac + maartenkeijzer + kuepper + okoenig + evomarc + Johann DrĂ©o +*/ //----------------------------------------------------------------------------- -#ifndef _EOPOP_H -#define _EOPOP_H +#ifndef _EOPOP_H_ +#define _EOPOP_H_ #include #include @@ -54,18 +63,18 @@ template class eoPop: public std::vector, public eoObject, public eoPersistent { -public: + public: - using std::vector::size; - using std::vector::resize; - using std::vector::operator[]; - using std::vector::begin; - using std::vector::end; + using std::vector::size; + using std::vector::resize; + using std::vector::operator[]; + using std::vector::begin; + using std::vector::end; - typedef typename EOT::Fitness Fitness; + typedef typename EOT::Fitness Fitness; #if defined(__CUDACC__) - typedef typename std::vector::iterator iterator; - typedef typename std::vector::const_iterator const_iterator; + typedef typename std::vector::iterator iterator; + typedef typename std::vector::const_iterator const_iterator; #endif /** Default ctor. Creates empty pop @@ -74,272 +83,296 @@ public: /** Ctor for the initialization of chromosomes - @param _popSize total population size - @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + @param _popSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit */ - eoPop( unsigned _popSize, eoInit& _chromInit ) - :std::vector() - { - resize(_popSize); - for ( unsigned i = 0; i < _popSize; i++ ) - { + eoPop( unsigned _popSize, eoInit& _chromInit ) + : std::vector() + { + resize(_popSize); + for ( unsigned i = 0; i < _popSize; i++ ) + { _chromInit(operator[](i)); - } - }; + } + } /** appends random guys at end of pop. - Can be used to initialize it pop is empty + Can be used to initialize it pop is empty - @param _newPopSize total population size - @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + @param _newPopSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit */ - void append( unsigned _newPopSize, eoInit& _chromInit ) - { - unsigned oldSize = size(); - if (_newPopSize < oldSize) + void append( unsigned _newPopSize, eoInit& _chromInit ) { - throw std::runtime_error("New size smaller than old size in pop.append"); - return; + unsigned oldSize = size(); + if (_newPopSize < oldSize) + { + throw std::runtime_error("New size smaller than old size in pop.append"); + return; + } + if (_newPopSize == oldSize) + return; + resize(_newPopSize); // adjust the size + for ( unsigned i = oldSize; i < _newPopSize; i++ ) + { + _chromInit(operator[](i)); + } } - if (_newPopSize == oldSize) - return; - resize(_newPopSize); // adjust the size - for ( unsigned i = oldSize; i < _newPopSize; i++ ) + + + /** Ctor from an std::istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( std::istream& _is ) :std::vector() { - _chromInit(operator[](i)); + readFrom( _is ); } - }; - /** Ctor from an std::istream; reads the population from a stream, - each element should be in different lines - @param _is the stream - */ - eoPop( std::istream& _is ) :std::vector() { - readFrom( _is ); - } - - /** Empty Dtor */ + /** Empty Dtor */ virtual ~eoPop() {} - /// helper struct for getting a pointer - struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; - /// helper struct for comparing on pointers - struct Cmp { - bool operator()(const EOT* a, const EOT* b) const + /// helper struct for getting a pointer + struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; + + /// helper struct for comparing on pointers + struct Cmp { + bool operator()(const EOT* a, const EOT* b) const { return b->operator<(*a); } - }; - /// helper struct for comparing (EA or PSO) - struct Cmp2 - { - bool operator()(const EOT & a,const EOT & b) const + }; + + /// helper struct for comparing (EA or PSO) + struct Cmp2 { + bool operator()(const EOT & a,const EOT & b) const + { return b.operator<(a); + } + }; + + + /** + sort the population. Use this member to sort in order + of descending Fitness, so the first individual is the best! + */ + void sort(void) + { + std::sort(begin(), end(), Cmp2()); } - }; + /** creates a std::vector pointing to the individuals in descending order */ + void sort(std::vector& result) const + { + result.resize(size()); - /** - sort the population. Use this member to sort in order - of descending Fitness, so the first individual is the best! - */ - void sort(void) - { - std::sort(begin(), end(), Cmp2()); - } + std::transform(begin(), end(), result.begin(), Ref()); - /** creates a std::vector pointing to the individuals in descending order */ - void sort(std::vector& result) const - { - result.resize(size()); + std::sort(result.begin(), result.end(), Cmp()); + } - std::transform(begin(), end(), result.begin(), Ref()); - std::sort(result.begin(), result.end(), Cmp()); - } + /** + shuffle the population. Use this member to put the population + in random order + */ + void shuffle(void) + { + UF_random_generator gen; + std::random_shuffle(begin(), end(), gen); + } - /** - shuffle the population. Use this member to put the population - in random order - */ - void shuffle(void) - { - UF_random_generator gen; - std::random_shuffle(begin(), end(), gen); - } - /** creates a std::vector pointing to the individuals in random order */ - void shuffle(std::vector& result) const - { - result.resize(size()); + /** creates a std::vector pointing to the individuals in random order */ + void shuffle(std::vector& result) const + { + result.resize(size()); - std::transform(begin(), end(), result.begin(), Ref()); + std::transform(begin(), end(), result.begin(), Ref()); - UF_random_generator gen; - std::random_shuffle(result.begin(), result.end(), gen); - } + UF_random_generator gen; + std::random_shuffle(result.begin(), result.end(), gen); + } - /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ + + /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ #if defined(__CUDACC__) - eoPop::iterator it_best_element() - { - eoPop:: iterator it = std::max_element(begin(), end()); + eoPop::iterator it_best_element() + { + eoPop:: iterator it = std::max_element(begin(), end()); #else - typename eoPop::iterator it_best_element() - { - assert( this->size() > 0 ); - typename eoPop::iterator it = std::max_element(begin(), end()); + typename eoPop::iterator it_best_element() + { + assert( this->size() > 0 ); + typename eoPop::iterator it = std::max_element(begin(), end()); #endif - return it; - } + return it; + } - /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ - const EOT & best_element() const - { + + /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ + const EOT & best_element() const + { #if defined(__CUDACC__) - eoPop::const_iterator it = std::max_element(begin(), end()); + eoPop::const_iterator it = std::max_element(begin(), end()); #else - typename eoPop::const_iterator it = std::max_element(begin(), end()); + typename eoPop::const_iterator it = std::max_element(begin(), end()); #endif - return (*it); - } + return (*it); + } - /** returns a const reference to the worse individual DOES NOT MOVE ANYBODY */ - const EOT & worse_element() const - { + + /** returns a const reference to the worse individual DOES NOT MOVE ANYBODY */ + const EOT & worse_element() const + { #if defined(__CUDACC__) - eoPop::const_iterator it = std::min_element(begin(), end()); + eoPop::const_iterator it = std::min_element(begin(), end()); #else - assert( this->size() > 0 ); - typename eoPop::const_iterator it = std::min_element(begin(), end()); + assert( this->size() > 0 ); + typename eoPop::const_iterator it = std::min_element(begin(), end()); #endif - return (*it); - } + return (*it); + } - /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ + + /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ #if defined(__CUDACC__) - eoPop::iterator it_worse_element() - { - eoPop::iterator it = std::min_element(begin(), end()); + eoPop::iterator it_worse_element() + { + eoPop::iterator it = std::min_element(begin(), end()); #else - typename eoPop::iterator it_worse_element() - { - assert( this->size() > 0 ); - typename eoPop::iterator it = std::min_element(begin(), end()); + typename eoPop::iterator it_worse_element() + { + assert( this->size() > 0 ); + typename eoPop::iterator it = std::min_element(begin(), end()); #endif - return it; - } + return it; + } - /** - slightly faster algorithm than sort to find all individuals that are better - than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. - */ + + /** + slightly faster algorithm than sort to find all individuals that are better + than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. + */ #if defined(__CUDACC__) - eoPop::iterator nth_element(int nth) - { - eoPop::iterator it = begin() + nth; + eoPop::iterator nth_element(int nth) + { + eoPop::iterator it = begin() + nth; #else - typename eoPop::iterator nth_element(int nth) - { - assert( this->size() > 0 ); - typename eoPop::iterator it = begin() + nth; + typename eoPop::iterator nth_element(int nth) + { + assert( this->size() > 0 ); + typename eoPop::iterator it = begin() + nth; #endif - std::nth_element(begin(), it, end(), std::greater()); - return it; - } + std::nth_element(begin(), it, end(), std::greater()); + return it; + } - struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; - /** returns the fitness of the nth element */ - Fitness nth_element_fitness(int which) const - { // probably not the fastest way to do this, but what the heck + struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; - std::vector fitness(size()); - std::transform(begin(), end(), fitness.begin(), GetFitness()); - typename std::vector::iterator it = fitness.begin() + which; - std::nth_element(fitness.begin(), it, fitness.end(), std::greater()); - return *it; - } + /** returns the fitness of the nth element */ + Fitness nth_element_fitness(int which) const + { // probably not the fastest way to do this, but what the heck - /** const nth_element function, returns pointers to sorted individuals - * up the the nth - */ - void nth_element(int which, std::vector& result) const - { + std::vector fitness(size()); + std::transform(begin(), end(), fitness.begin(), GetFitness()); - assert( this->size() > 0 ); - result.resize(size()); - std::transform(begin(), end(), result.begin(), Ref()); + typename std::vector::iterator it = fitness.begin() + which; + std::nth_element(fitness.begin(), it, fitness.end(), std::greater()); + return *it; + } - typename std::vector::iterator it = result.begin() + which; - std::nth_element(result.begin(), it, result.end(), Cmp()); - } + /** const nth_element function, returns pointers to sorted individuals + * up the the nth + */ + void nth_element(int which, std::vector& result) const + { - /** does STL swap with other pop */ - void swap(eoPop& other) - { - std::swap(static_cast& >(*this), static_cast& >(other)); - } + assert( this->size() > 0 ); + result.resize(size()); + std::transform(begin(), end(), result.begin(), Ref()); - /** - * Prints sorted pop but does NOT modify it! - * - * @param _os A std::ostream. - */ - virtual void sortedPrintOn(std::ostream& _os) const - { - std::vector result; - sort(result); - _os << size() << '\n'; - for (unsigned i = 0; i < size(); ++i) - { - _os << *result[i] << std::endl; - } - } + typename std::vector::iterator it = result.begin() + which; - /** - * Write object. It's called printOn since it prints the object _on_ a stream. - * @param _os A std::ostream. - */ - virtual void printOn(std::ostream& _os) const - { - _os << size() << '\n'; - std::copy( begin(), end(), std::ostream_iterator( _os, "\n") ); - } + std::nth_element(result.begin(), it, result.end(), Cmp()); + } - /** @name Methods from eoObject */ - //@{ - /** - * Read object. The EOT class must have a ctor from a stream; - * @param _is A std::istream. - */ - virtual void readFrom(std::istream& _is) - { - size_t sz; - _is >> sz; - resize(sz); + /** does STL swap with other pop */ + void swap(eoPop& other) + { + std::swap(static_cast& >(*this), static_cast& >(other)); + } - for (size_t i = 0; i < sz; ++i) { - operator[](i).readFrom( _is ); - } - } - /** Inherited from eoObject. Returns the class name. - @see eoObject - */ - virtual std::string className() const {return "eoPop";}; - //@} + /** + * Prints sorted pop but does NOT modify it! + * + * @param _os A std::ostream. + */ + virtual void sortedPrintOn(std::ostream& _os) const + { + std::vector result; + sort(result); + _os << size() << '\n'; + for (unsigned i = 0; i < size(); ++i) + { + _os << *result[i] << std::endl; + } + } - virtual void invalidate() - { - for (unsigned i=0; ioperator[](i).invalidate(); - } -}; -#endif + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << size() << '\n'; + std::copy( begin(), end(), std::ostream_iterator( _os, "\n") ); + } + + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + * @param _is A std::istream. + */ + virtual void readFrom(std::istream& _is) + { + size_t sz; + _is >> sz; + + resize(sz); + + for (size_t i = 0; i < sz; ++i) { + operator[](i).readFrom( _is ); + } + } + + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual std::string className() const {return "eoPop";}; + //@} + + + /** Invalidate the whole population + */ + virtual void invalidate() + { + for (unsigned i=0; ioperator[](i).invalidate(); + } + +}; // class eoPop + +#endif // _EOPOP_H_ + From 65dfa4cf2be90abcf937250cc7c660b2a8cdcac8 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 1 Apr 2012 12:13:05 +0200 Subject: [PATCH 1893/2134] bugfix include assert.h in eoPop.h --- eo/src/eoPop.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 068498aa9..9220e3c66 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -38,6 +38,7 @@ Authors: #include #include // needed for GCC 3.2 #include +#include // EO includes #include // for eoInit From 854c65f58241eb7572b4643ef47363a1947a3973 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 3 Apr 2012 15:41:07 +0200 Subject: [PATCH 1894/2134] eoFunctor: protected member and security warning in debug mode when storing the same pointer several times --- eo/src/eoFunctorStore.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eo/src/eoFunctorStore.h b/eo/src/eoFunctorStore.h index c609637b4..051daf2ae 100644 --- a/eo/src/eoFunctorStore.h +++ b/eo/src/eoFunctorStore.h @@ -28,6 +28,9 @@ #define _eoFunctorStore_h #include +#include + +#include "utils/eoLogger.h" class eoFunctorBase; @@ -52,6 +55,13 @@ public: template Functor& storeFunctor(Functor* r) { +#ifndef NDEBUG + unsigned int existing = std::count( vec.begin(), vec.end(), r ); + if( existing > 0 ) { + eo::log << eo::warnings << "WARNING: you asked eoFunctorStore to store the functor " << r << " " + << existing + 1 << " times, a segmentation fault may occur in the destructor." << std::endl; + } +#endif // If the compiler complains about the following line, // check if you really are giving it a pointer to an // eoFunctorBase derived object @@ -67,6 +77,7 @@ private : /** no assignment allowed */ eoFunctorStore operator=(const eoFunctorStore&); +protected: std::vector vec; }; From f7b9db1358746b0872db05013fdb2a2d76ae64f4 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 16 Apr 2012 11:28:47 +0200 Subject: [PATCH 1895/2134] generilaze the output of an eoState : now you can change the format, comes with defaults formatting (latex and json) --- eo/src/utils/eoState.cpp | 62 ++++++++++++++++++++++++------- eo/src/utils/eoState.h | 79 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 127 insertions(+), 14 deletions(-) diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index d9d06d99e..c6d385001 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -18,7 +18,7 @@ using namespace std; -void removeComment(string& str, string comment) +void eoState::removeComment(string& str, string comment) { string::size_type pos = str.find(comment); @@ -28,21 +28,23 @@ void removeComment(string& str, string comment) } } -bool is_section(const string& str, string& name) +bool eoState::is_section(const string& str, string& name) { - string::size_type pos = str.find("\\section{"); + string::size_type pos = str.find(_tag_section_so); if (pos == string::npos) return false; //else - string::size_type end = str.find("}"); + string::size_type end = str.find(_tag_section_sc); if (end == string::npos) return false; // else - name = str.substr(pos + 9, end-9); + // affect name, passed by reference + // Note: substr( start, count ) + name = str.substr( pos + _tag_section_so.size(), end - _tag_section_so.size() ); return true; } @@ -84,6 +86,7 @@ void eoState::load(const string& _filename) load(is); } +// FIXME implement parsing and loading of other formats void eoState::load(std::istream& is) { string str; @@ -158,16 +161,49 @@ void eoState::save(const string& filename) const save(os); } -void eoState::save(std::ostream& os) const -{ // saves in order of insertion - for (vector::const_iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) - { - os << "\\section{" << (*it)->first << "}\n"; - (*it)->second->printOn(os); - os << '\n'; - } +//void eoState::save(std::ostream& os) const +//{ // saves in order of insertion +// for (vector::const_iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) +// { +// os << "\\section{" << (*it)->first << "}\n"; +// (*it)->second->printOn(os); +// os << '\n'; +// } +//} + +void eoState::saveSection( std::ostream& os, vector::const_iterator it) const +{ + os << _tag_section_so << (*it)->first << _tag_section_sc; + + os << _tag_content_s; + (*it)->second->printOn(os); + os << _tag_content_e; + + os << _tag_section_e; } + +void eoState::save(std::ostream& os) const +{ + os << _tag_state_so << _tag_state_name << _tag_state_sc; + + // save the first section + assert( creationOrder.size() > 0 ); + // saves in order of insertion + vector::const_iterator it = creationOrder.begin(); + saveSection(os,it); + it++; + + while( it != creationOrder.end() ) { + // add a separator only before [1,n] elements + os << _tag_section_sep; + saveSection(os, it); + it++; + } + os << _tag_state_e; +} + + string eoState::createObjectName(eoObject* obj) { if (obj == 0) diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index 53c3a83d5..1655e2e20 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -56,10 +56,50 @@ class eoState : public eoFunctorStore { public : - eoState(void) {} + eoState(std::string name="") : + _tag_state_so(""), + _tag_state_name(name), + _tag_state_sc(""), + _tag_section_so("\\section{"), + _tag_section_sc("}\n"), + _tag_content_s(""), + _tag_content_e(""), + _tag_section_sep(""), + _tag_section_e("\n"), + _tag_state_e("") + {} ~eoState(void); + void formatLatex(std::string name) + { + _tag_state_so = ""; + _tag_state_name = name; + _tag_state_sc = ""; + _tag_section_so = "\\section{"; + _tag_section_sc = "}\n"; + _tag_content_s = ""; + _tag_content_e = ""; + _tag_section_sep = ""; + _tag_section_e = "\n"; + _tag_state_e = ""; + } + + void formatJSON(std::string name) + { + _tag_state_so = "{ \""; + _tag_state_name = name; + _tag_state_sc = "\":\n"; + _tag_section_so = "\t{ \""; + _tag_section_sc = "\":\n"; + _tag_content_s = "\""; + _tag_content_e = "\""; + _tag_section_sep = ",\n"; + _tag_section_e = "\t}\n"; + _tag_state_e = "}\n"; + } + + /** * Object registration function, note that it does not take ownership! */ @@ -131,6 +171,43 @@ private : eoState(const eoState&); eoState& operator=(const eoState&); + /* \@{ + * s=start, e=end + * o=open, c=close + * + * { "my_state": + * { + * "section_pop":"…", + * "section_rng":"…" + * } + * } + * + * // JSON LATEX (default) + */ + std::string _tag_state_so; // { " + std::string _tag_state_name; // my_state + std::string _tag_state_sc; // ": + + std::string _tag_section_so; // { " \\section{ + std::string _tag_section_sc; // ": }\n + + std::string _tag_content_s; // " + std::string _tag_content_e; // " + + std::string _tag_section_sep;// , + + std::string _tag_section_e; // } \n + + std::string _tag_state_e; // } + /** \@} */ + + void removeComment( std::string& str, std::string comment); + + bool is_section(const std::string& str, std::string& name); + +protected: + void saveSection( std::ostream& os, std::vector::const_iterator it) const; + }; /** @example t-eoStateAndParser.cpp */ From 0d5bf295cb6e8bf1e163220e097eb19f54fe17bc Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 1 May 2012 20:49:29 +0200 Subject: [PATCH 1896/2134] * commented unused function params --- eo/src/eoInitializer.h | 2 +- eo/src/eoPeriodicContinue.h | 2 +- eo/src/eoProportionalSelect.h | 2 +- eo/src/eoSyncEasyPSO.h | 2 +- eo/src/eoVelocity.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/src/eoInitializer.h b/eo/src/eoInitializer.h index 506fcf734..9e5cd5caf 100644 --- a/eo/src/eoInitializer.h +++ b/eo/src/eoInitializer.h @@ -129,7 +129,7 @@ private : class eoDummyEval : public eoPopEvalFunc { public: - void operator()(eoPop &,eoPop &_pop) + void operator()(eoPop &,eoPop &/*_pop*/) {} } dummyEval; diff --git a/eo/src/eoPeriodicContinue.h b/eo/src/eoPeriodicContinue.h index a6f968e9d..1a3f9d0de 100644 --- a/eo/src/eoPeriodicContinue.h +++ b/eo/src/eoPeriodicContinue.h @@ -39,7 +39,7 @@ public: /** It returns 'true' only if the current number of generations modulo the period doen't equal to zero. */ - bool operator () (const eoPop & pop) + bool operator () (const eoPop & /*pop*/) { return ((++ counter) % period) != 0 ; } diff --git a/eo/src/eoProportionalSelect.h b/eo/src/eoProportionalSelect.h index daa4428df..ec1243cee 100644 --- a/eo/src/eoProportionalSelect.h +++ b/eo/src/eoProportionalSelect.h @@ -46,7 +46,7 @@ template class eoProportionalSelect: public eoSelectOne { public: /// Sanity check - eoProportionalSelect(const eoPop& pop = eoPop()) + eoProportionalSelect(const eoPop& /*pop*/ = eoPop()) { if (minimizing_fitness()) throw std::logic_error("eoProportionalSelect: minimizing fitness"); diff --git a/eo/src/eoSyncEasyPSO.h b/eo/src/eoSyncEasyPSO.h index f05f15f62..a3b4f36e7 100644 --- a/eo/src/eoSyncEasyPSO.h +++ b/eo/src/eoSyncEasyPSO.h @@ -241,7 +241,7 @@ private: { public: eoDummyFlight () {} - void operator () (POT & _po) {} + void operator () (POT & /*_po*/) {} }dummyFlight; // if the initializer does not need to be used, use the dummy one instead diff --git a/eo/src/eoVelocity.h b/eo/src/eoVelocity.h index 753c6af21..5bbdb7c5b 100644 --- a/eo/src/eoVelocity.h +++ b/eo/src/eoVelocity.h @@ -57,7 +57,7 @@ public: /** * Update the neighborhood of the given particle. */ - virtual void updateNeighborhood(POT & ,unsigned _indice){} + virtual void updateNeighborhood(POT & ,unsigned /*_indice*/){} /** From cd94be695709ea26caa8dc47f34346017b053ee9 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 1 May 2012 20:59:45 +0200 Subject: [PATCH 1897/2134] * fixed gcc 4.7 errors: ambigious calls to super class methods --- eo/src/eoFlight.h | 2 +- eo/src/eoParticleBestInit.h | 2 +- eo/src/eoSelectFromWorth.h | 2 +- eo/src/eoVelocity.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eo/src/eoFlight.h b/eo/src/eoFlight.h index 9af813a24..4c46d8e94 100644 --- a/eo/src/eoFlight.h +++ b/eo/src/eoFlight.h @@ -46,7 +46,7 @@ public: { for (unsigned i = 0; i < _pop.size (); i++) { - operator ()(_pop[i]); + this->operator ()(_pop[i]); } } diff --git a/eo/src/eoParticleBestInit.h b/eo/src/eoParticleBestInit.h index 050fbc9c2..b203c8246 100644 --- a/eo/src/eoParticleBestInit.h +++ b/eo/src/eoParticleBestInit.h @@ -46,7 +46,7 @@ public: { for (unsigned i = 0; i < _pop.size (); i++) { - operator ()(_pop[i]); + this->operator ()(_pop[i]); } } diff --git a/eo/src/eoSelectFromWorth.h b/eo/src/eoSelectFromWorth.h index a2fd5ed26..342be9da7 100644 --- a/eo/src/eoSelectFromWorth.h +++ b/eo/src/eoSelectFromWorth.h @@ -217,7 +217,7 @@ public: #ifndef NDEBUG // check whether the stuff is still in sync - check_sync(index, _pop[index]); + this->check_sync(index, _pop[index]); #endif return _pop[index]; diff --git a/eo/src/eoVelocity.h b/eo/src/eoVelocity.h index 5bbdb7c5b..e388078c1 100644 --- a/eo/src/eoVelocity.h +++ b/eo/src/eoVelocity.h @@ -49,7 +49,7 @@ public: { for (unsigned i = 0; i < _pop.size (); i++) { - operator ()(_pop[i],i); + this->operator ()(_pop[i],i); } } From 851d1278f52e7e944511d8eb78418add93b24adb Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 9 May 2012 11:45:56 +0200 Subject: [PATCH 1898/2134] missing assert.h header in eoState --- eo/src/utils/eoState.h | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/src/utils/eoState.h b/eo/src/utils/eoState.h index 1655e2e20..256dcd965 100644 --- a/eo/src/utils/eoState.h +++ b/eo/src/utils/eoState.h @@ -31,6 +31,7 @@ #include #include #include +#include #include From 0d92a48d8969196c258de4317eaa834d55016f04 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 01:05:27 +0200 Subject: [PATCH 1899/2134] + added eoFunctorStat class --- eo/src/utils/eoFuncPtrStat.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/eo/src/utils/eoFuncPtrStat.h b/eo/src/utils/eoFuncPtrStat.h index 316b7f42c..c77281577 100644 --- a/eo/src/utils/eoFuncPtrStat.h +++ b/eo/src/utils/eoFuncPtrStat.h @@ -4,6 +4,8 @@ #include #include + + /** Wrapper to turn any stand-alone function and into an eoStat. * * The function should take an eoPop as argument. @@ -41,4 +43,38 @@ eoFuncPtrStat& makeFuncPtrStat( T (*func)(const eoPop&), eoFunctorS ); } +/** Wrapper to turn any stand-alone function and into an eoStat. + * + * The function should take an eoPop as argument. + * + * @ingroup Stats + */ +template +class eoFunctorStat : public eoStat +{ +public : + eoFunctorStat(eoUF< const eoPop&, T >& f, std::string _description = "functor") + : eoStat(T(), _description), func(f) + {} + + using eoStat::value; + + void operator()(const eoPop& pop) { + value() = func(pop); + } + +private: + eoUF< const eoPop&, T >& func; +}; + +/** + * @ingroup Stats + */ +template +eoFunctorStat& makeFunctorStat( eoUF< const eoPop&, T >& func, eoFunctorStore& store, std::string description = "func") { + return store.storeFunctor( + new eoFunctorStat( func, description) + ); +} + #endif From 138706d1253a0f954a9e29649acecee8f7e854ab Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 01:06:38 +0200 Subject: [PATCH 1900/2134] * checkpoint main header file: just added license and multi-inclusion protection --- eo/src/utils/checkpointing | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 5d49e5890..7e3c34a68 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -1,3 +1,29 @@ +/* + ----------------------------------------------------------------------------- + checkpointing + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef _CHECKPOINTING_ +#define _CHECKPOINTING_ + #include #include #include @@ -21,3 +47,9 @@ // and make_help - any better suggestion to include it? void make_help(eoParser & _parser); + +#endif // !_CHECKPOINTING_ + +// Local Variables: +// mode: C++ +// End: From 44d80d002009eef7a20f2ee1c3cd44d997a86fb2 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 01:08:26 +0200 Subject: [PATCH 1901/2134] * eoBitOp.h: added eoDetSingleBitFlip class --- eo/src/ga/eoBitOp.h | 58 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index d1247020b..15d77434d 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -56,7 +56,7 @@ template class eoOneBitFlip: public eoMonOp bool operator()(Chrom& chrom) { unsigned i = eo::rng.random(chrom.size()); - chrom[i] = (chrom[i]) ? false : true; + chrom[i] = !chrom[i]; return true; } }; @@ -85,11 +85,11 @@ template class eoDetBitFlip: public eoMonOp */ bool operator()(Chrom& chrom) { - // does not check for duplicate: if someone volunteers .... + // for duplicate checking see eoDetSingleBitFlip for (unsigned k=0; k class eoDetBitFlip: public eoMonOp }; +/** eoDetSingleBitFlip --> changes exactly k bits with checking for duplicate +\class eoDetSingleBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoDetSingleBitFlip: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _num_bit The number of bits to change + * default is one - equivalent to eoOneBitFlip then + */ + eoDetSingleBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} + + /// The class name. + virtual std::string className() const { return "eoDetSingleBitFlip"; } + + /** + * Change num_bit bits. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(Chrom& chrom) + { + std::vector< unsigned > selected; + + // check for duplicate + for (unsigned k=0; k classical mutation \class eoBitMutation eoBitOp.h ga/eoBitOp.h \ingroup bitstring From 6051ccb27490c936218bedf3905c4e8b0ef4491b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 01:50:16 +0200 Subject: [PATCH 1902/2134] edoNormalMulti.h: added missing license header --- edo/src/edoNormalMulti.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index 463f0bc8d..be0e7d00a 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -1,4 +1,24 @@ -// (c) Thales group, 2010 +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ /* Authors: Johann Dreo From 461edcf3cf277c7d0744bb081a7295af0b23077b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 15:30:13 +0200 Subject: [PATCH 1903/2134] * eoReduceSplit.h: useless comparaision fixed since it was: unsigned < 0 --- eo/src/eoReduceSplit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoReduceSplit.h b/eo/src/eoReduceSplit.h index ce22d0275..4b21aa25e 100644 --- a/eo/src/eoReduceSplit.h +++ b/eo/src/eoReduceSplit.h @@ -104,7 +104,7 @@ public: unsigned eliminated = howMany(popSize); if (!eliminated) // nothing to do return ; - unsigned newsize = popSize - eliminated; + long newsize = static_cast(popSize) - static_cast(eliminated); if (newsize < 0) throw std::logic_error("eoLinearTruncateSplit: Cannot truncate to a larger size!\n"); From a183a1c6d1de14dd67c45a873fc8385b2e82ce9a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 15:30:41 +0200 Subject: [PATCH 1904/2134] * make_op.h, eoLogger.cpp: disabled not used variables. should I remove them ? --- eo/src/ga/make_op.h | 8 ++++---- eo/src/utils/eoLogger.cpp | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 8c46549f1..045148eca 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -115,11 +115,11 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init throw std::runtime_error("Invalid uRate"); // minimum check - bool bCross = true; + // bool bCross = true; // not used ? if (onePointRateParam.value()+twoPointsRateParam.value()+uRateParam.value()==0) { std::cerr << "Warning: no crossover" << std::endl; - bCross = false; + // bCross = false; } // Create the CombinedQuadOp @@ -162,11 +162,11 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init throw std::runtime_error("Invalid oneBitRate"); // minimum check - bool bMut = true; + // bool bMut = true; // not used ? if (bitFlipRateParam.value()+oneBitRateParam.value()==0) { std::cerr << "Warning: no mutation" << std::endl; - bMut = false; + // bMut = false; } // Create the CombinedMonOp diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index e478ba093..f052d7955 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -194,8 +194,7 @@ int eoLogger::outbuf::overflow(int_type c) { if (_fd >= 0 && c != EOF) { - size_t num; - num = ::write(_fd, &c, 1); + ::write(_fd, &c, 1); } } return c; From 0cfab9208b4786bab9be46968adc40e8dc83a775 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 14 Jun 2012 15:31:23 +0200 Subject: [PATCH 1905/2134] * install_symlink.py.cmake compatible with python3 --- eo/install_symlink.py.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eo/install_symlink.py.cmake b/eo/install_symlink.py.cmake index 145d67a14..fd71d68b5 100755 --- a/eo/install_symlink.py.cmake +++ b/eo/install_symlink.py.cmake @@ -9,8 +9,8 @@ PREFIX = "/usr" DATA = { 'dirs': [ "%s/share/%s" % (PREFIX, NAME) ], 'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)), - ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), - ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), + ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), + ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), ] } @@ -21,19 +21,19 @@ import os, sys def isroot(): if os.getuid() != 0: - print '[WARNING] you have to be root' - return False + print('[WARNING] you have to be root') + return False return True def uninstall(): for dummy, link in DATA['links']: os.remove(link) for dirname in DATA['dirs']: os.rmdir(dirname) - print 'All symlinks have been removed.' + print('All symlinks have been removed.') def install(): for dirname in DATA['dirs']: os.mkdir(dirname) for src, dst in DATA['links']: os.symlink(src, dst) - print 'All symlinks have been installed.' + print('All symlinks have been installed.') def data(): from pprint import pprint @@ -41,11 +41,11 @@ def data(): if __name__ == '__main__': if not isroot(): - sys.exit() + sys.exit() if len(sys.argv) < 2: - print 'Usage: %s [install|uninstall|data]' % sys.argv[0] - sys.exit() + print(('Usage: %s [install|uninstall|data]' % sys.argv[0])) + sys.exit() if sys.argv[1] == 'install': install() elif sys.argv[1] == 'uninstall': uninstall() From 0bd33fe6921edba91d6fd98e3521653695e12e29 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 15 Jun 2012 10:56:59 +0200 Subject: [PATCH 1906/2134] Serialization of EO user objects. --- eo/src/CMakeLists.txt | 1 + eo/src/eo | 3 + eo/src/serial/Array.cpp | 38 ++++++++ eo/src/serial/Array.h | 149 +++++++++++++++++++++++++++++++ eo/src/serial/CMakeLists.txt | 35 ++++++++ eo/src/serial/Entity.h | 34 +++++++ eo/src/serial/Object.cpp | 40 +++++++++ eo/src/serial/Object.h | 67 ++++++++++++++ eo/src/serial/Parser.cpp | 153 ++++++++++++++++++++++++++++++++ eo/src/serial/Parser.h | 78 ++++++++++++++++ eo/src/serial/Serializable.h | 44 +++++++++ eo/src/serial/String.cpp | 11 +++ eo/src/serial/String.h | 79 +++++++++++++++++ eo/src/serial/Utils.h | 167 +++++++++++++++++++++++++++++++++++ eo/src/serial/eoSerial.h | 12 +++ eo/src/serial/json_example | 8 ++ 16 files changed, 919 insertions(+) create mode 100644 eo/src/serial/Array.cpp create mode 100644 eo/src/serial/Array.h create mode 100644 eo/src/serial/CMakeLists.txt create mode 100644 eo/src/serial/Entity.h create mode 100644 eo/src/serial/Object.cpp create mode 100644 eo/src/serial/Object.h create mode 100644 eo/src/serial/Parser.cpp create mode 100644 eo/src/serial/Parser.h create mode 100644 eo/src/serial/Serializable.h create mode 100644 eo/src/serial/String.cpp create mode 100644 eo/src/serial/String.h create mode 100644 eo/src/serial/Utils.h create mode 100644 eo/src/serial/eoSerial.h create mode 100644 eo/src/serial/json_example diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index c03bc509a..b6a8c2308 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -43,6 +43,7 @@ ADD_SUBDIRECTORY(ga) ADD_SUBDIRECTORY(gp) ADD_SUBDIRECTORY(other) ADD_SUBDIRECTORY(utils) +ADD_SUBDIRECTORY(serial) IF(ENABLE_PYEO) ADD_SUBDIRECTORY(pyeo) diff --git a/eo/src/eo b/eo/src/eo index 8cebd23a0..23df6ee5f 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -141,6 +141,9 @@ #include // includes eoRealBounds.h #include // no eoIntVectorBounds +// Serialization stuff +#include + // aliens #include #include diff --git a/eo/src/serial/Array.cpp b/eo/src/serial/Array.cpp new file mode 100644 index 000000000..f70b00e83 --- /dev/null +++ b/eo/src/serial/Array.cpp @@ -0,0 +1,38 @@ +# include "Array.h" + +namespace eoserial +{ + +std::ostream& Array::print( std::ostream& out ) const +{ + out << "["; + bool first = true; + for (ArrayChildren::const_iterator it = begin(), + end = this->end(); + it != end; + ++it) + { + if ( first ) + { + first = false; + } else { + out << ", "; + } + (*it)->print( out ); + } + out << "]\n"; + return out; +} + +Array::~Array() +{ + for (ArrayChildren::iterator it = begin(), + end = this->end(); + it != end; + ++it) + { + delete *it; + } +} + +} // namespace eoserial diff --git a/eo/src/serial/Array.h b/eo/src/serial/Array.h new file mode 100644 index 000000000..69231980c --- /dev/null +++ b/eo/src/serial/Array.h @@ -0,0 +1,149 @@ +# ifndef __EOSERIAL_ARRAY_H__ +# define __EOSERIAL_ARRAY_H__ + +# include +# include + +# include "Entity.h" +# include "Serializable.h" + +# include "Object.h" +# include "String.h" + +namespace eoserial +{ + +// Forward declaration for below declarations. +class Array; + +/* + * Declarations of functions present in Utils.h + * These are put here to avoid instead of including the file Utils.h, which would + * cause a circular inclusion. + */ +template< class T > +void unpack( const Array & array, unsigned int index, T & value ); + +void unpackObject( const Array & array, unsigned int index, Persistent & value ); + +template< class Container, template class UnpackAlgorithm > +void unpackArray( const Array & array, unsigned int index, Container & container ); + +/** + * @brief Represents a JSON array. + * + * Wrapper for an array, so as to be used as a JSON object. + */ +class Array : public eoserial::Entity, public std::vector< eoserial::Entity* > +{ +protected: + typedef std::vector< eoserial::Entity* > ArrayChildren; + +public: + /** + * @brief Adds the serializable object as a JSON object. + * @param obj Object which implemnets JsonSerializable. + */ + void push_back( const eoserial::Printable* obj ) + { + ArrayChildren::push_back( obj->pack() ); + } + + /** + * @brief Proxy for vector::push_back. + */ + void push_back( eoserial::Entity* json ) + { + ArrayChildren::push_back( json ); + } + + /** + * @brief Prints the JSON array into the given stream. + * @param out The stream + */ + virtual std::ostream& print( std::ostream& out ) const; + + /** + * @brief Dtor + */ + ~Array(); + + /* + * The following parts allows the user to automatically deserialize an eoserial::Array into a + * standard container, by giving the algorithm which will be used to deserialize contained entities. + */ + + /** + * @brief Functor which determines how to retrieve the real value contained in a eoserial::Entity at + * a given place. + * + * It will be applied for each contained variable in the array. + */ + template + struct BaseAlgorithm + { + /** + * @brief Main operator. + * + * @param array The eoserial::Array from which we're reading. + * @param i The index of the contained value. + * @param container The standard (STL) container in which we'll push back the read value. + */ + virtual void operator()( const eoserial::Array& array, unsigned int i, Container & container ) const = 0; + }; + + /** + * @brief BaseAlgorithm for retrieving primitive variables. + * + * This one should be used to retrieve primitive (and types which implement operator>>) variables, for instance + * int, double, std::string, etc... + */ + template + struct UnpackAlgorithm : public BaseAlgorithm + { + void operator()( const eoserial::Array& array, unsigned int i, C & container ) const + { + typename C::value_type t; + unpack( array, i, t ); + container.push_back( t ); + } + }; + + /** + * @brief BaseAlgorithm for retrieving eoserial::Persistent objects. + * + * This one should be used to retrieve objects which implement eoserial::Persistent. + */ + template + struct UnpackObjectAlgorithm : public BaseAlgorithm + { + void operator()( const eoserial::Array& array, unsigned int i, C & container ) const + { + typename C::value_type t; + unpackObject( array, i, t ); + container.push_back( t ); + } + }; + + /** + * @brief General algorithm for array deserialization. + * + * Applies the BaseAlgorithm to each contained variable in the eoserial::Array. + */ + template class UnpackAlgorithm> + inline void deserialize( Container & array ) + { + UnpackAlgorithm< Container > algo; + for( unsigned int i = 0, size = this->size(); + i < size; + ++i) + { + algo( *this, i, array ); + } + } +}; + +} // namespace eoserial + +# endif // __EOSERIAL_ARRAY_H__ + diff --git a/eo/src/serial/CMakeLists.txt b/eo/src/serial/CMakeLists.txt new file mode 100644 index 000000000..5358b30a4 --- /dev/null +++ b/eo/src/serial/CMakeLists.txt @@ -0,0 +1,35 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Define the eoserial target +###################################################################################### + +SET(EOSERIAL_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(LIBRARY_OUTPUT_PATH ${EOSERIAL_LIB_OUTPUT_PATH}) + +SET(EOSERIAL_SOURCES + Array.cpp + Object.cpp + Parser.cpp + String.cpp + ) + +ADD_LIBRARY(eoserial STATIC ${EOSERIAL_SOURCES}) +INSTALL(TARGETS eoserial ARCHIVE DESTINATION lib COMPONENT libraries) + +FILE(GLOB HDRS *.h) +INSTALL(FILES ${HDRS} DESTINATION include/eo/serial COMPONENT headers) + +###################################################################################### +### 3) Optionnal +###################################################################################### + +SET(EOSERIAL_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(eoserial PROPERTIES VERSION "${EOSERIAL_VERSION}") + +###################################################################################### diff --git a/eo/src/serial/Entity.h b/eo/src/serial/Entity.h new file mode 100644 index 000000000..df10002df --- /dev/null +++ b/eo/src/serial/Entity.h @@ -0,0 +1,34 @@ +# ifndef __EOSERIAL_ENTITY_H__ +# define __EOSERIAL_ENTITY_H__ + +# include +# include + +namespace eoserial +{ + +/** + * @brief JSON entity + * + * This class represents a JSON entity, which can be JSON objects, + * strings or arrays. It is the base class for the JSON hierarchy. + */ +class Entity +{ +public: + + /** + * Virtual dtor (base class). + */ + virtual ~Entity() { /* empty */ } + + /** + * @brief Prints the content of a JSON object into a stream. + * @param out The stream in which we're printing. + */ + virtual std::ostream& print( std::ostream& out ) const = 0; +}; + +} // namespace eoserial + +# endif // __ENTITY_H__ diff --git a/eo/src/serial/Object.cpp b/eo/src/serial/Object.cpp new file mode 100644 index 000000000..3e557a126 --- /dev/null +++ b/eo/src/serial/Object.cpp @@ -0,0 +1,40 @@ +# include "Object.h" + +using namespace eoserial; + +namespace eoserial +{ + +std::ostream& Object::print( std::ostream& out ) const +{ + out << '{'; + bool first = true; + for(JsonValues::const_iterator it = begin(), end = this->end(); + it != end; + ++it) + { + if ( first ) + { + first = false; + } else { + out << ", "; + } + + out << '"' << it->first << "\":"; // key + it->second->print( out ); // value + } + out << "}\n"; + return out; +} + +Object::~Object() +{ + for(JsonValues::iterator it = begin(), end = this->end(); + it != end; + ++it) + { + delete it->second; + } +} + +} // namespace eoserial diff --git a/eo/src/serial/Object.h b/eo/src/serial/Object.h new file mode 100644 index 000000000..367692527 --- /dev/null +++ b/eo/src/serial/Object.h @@ -0,0 +1,67 @@ +# ifndef __EOSERIAL_OBJECT_H__ +# define __EOSERIAL_OBJECT_H__ + +# include +# include +# include + +# include "Entity.h" +# include "Serializable.h" + +namespace eoserial +{ + +/** + * @brief JSON Object + * + * This class represents a JSON object, which is basically a dictionnary + * of keys (strings) and values (JSON entities). + */ +class Object : public eoserial::Entity, public std::map< std::string, eoserial::Entity* > +{ +public: + typedef std::map JsonValues; + + /** + * @brief Adds a pair into the JSON object. + * @param key The key associated with the eoserial object + * @param eoserial The JSON object as created with framework. + */ + void add( const std::string& key, eoserial::Entity* json ) + { + (*this)[ key ] = json; + } + + /** + * @brief Adds a pair into the JSON object. + * @param key The key associated with the eoserial object + * @param obj A JSON-serializable object + */ + void add( const std::string& key, const eoserial::Printable* obj ) + { + (*this)[ key ] = obj->pack(); + } + + /** + * @brief Deserializes a Serializable class instance from this JSON object. + * @param obj The object we want to rebuild. + */ + void deserialize( eoserial::Persistent & obj ) + { + obj.unpack( this ); + } + + /** + * @brief Dtor + */ + ~Object(); + + /** + * @brief Prints the content of a JSON object into a stream. + */ + virtual std::ostream& print( std::ostream& out ) const; +}; + +} // namespace eoserial +# endif // __EOSERIAL_OBJECT_H__ + diff --git a/eo/src/serial/Parser.cpp b/eo/src/serial/Parser.cpp new file mode 100644 index 000000000..c7822d292 --- /dev/null +++ b/eo/src/serial/Parser.cpp @@ -0,0 +1,153 @@ +# include +# include +# include +# include + +# include "Parser.h" + +# include "Array.h" +# include "Object.h" +# include "String.h" + +// in debug mode only +// # define DEBUG(x) std::cout << x << std::endl; +# define DEBUG(x) + +using namespace eoserial; + +namespace eoserial +{ + +/** + * @brief Parses a string contained between double quotes. + * + * Strings can contain escaped double quotes. + * @param str The string we're parsing. + * @param pos The index of current position in parsed string. + * This index will be updated so as to allow the parser to + * continue. + */ +static std::string parseString(const std::string& str, size_t & pos) +{ + // example : "hello" + // example 2 : "\"world\"" + // for hello: + // firstQuote == 0, secondQuote == 6 + // sub string should be from firstQuote+1 to secondQuote-1 + // so its size should be (secondQuote-1 -(firstQuote+1) + 1) + std::string value; + size_t firstQuote = str.find( '"', pos ); + size_t secondQuote; + + /* instead of just seeking the second quote, we need to ensure + // that there is no escaped quote before this one. + // actually this is harder than that. Using backslashes + // to escape double quotes mean that backslashes have to be + // escaped to. + // example : "text\\" to symbolize : text\ + // example : "text\\\" to symbolize : text\" + // In fact, we should find if number of backslashes is odd; in this case, + // the double quotes are escaped and we should find the next one. + */ + int backslashesCount; + do { + ++pos; + secondQuote = str.find( '"', pos ); + size_t i = secondQuote - 1; + + // Find the backslashes + backslashesCount = 0; + while ( str[ i ] == '\\' ) + { + --i; + ++backslashesCount; + } + pos = secondQuote; + } while( backslashesCount % 2 == 1 ); + + value = str.substr( firstQuote+1, secondQuote-firstQuote-1 ); + pos = secondQuote + 1; + return value; +} + +/** + * @brief Moves the given index pos to the next character which is + * neither a coma, a space nor a new line. + * + * @param str The string in which we want to ignores those characters. + * @param pos The index of current position in parsed string. + */ +static void ignoreChars(const std::string& str, size_t & pos) +{ + // ignore white spaces and comas + for (char current = str[ pos ]; + current == ',' || current == ' ' || current == '\n'; + current = str[ ++pos ]); +} + +String* Parser::parseJsonString(const std::string & str, size_t & pos) +{ + return new String( parseString( str, pos ) ); +} + +Object* Parser::parse(const std::string & str) +{ + size_t initial(0); // we begin at position 0 + return static_cast( parseRight(str, initial) ); +} + +Entity* Parser::parseRight(const std::string & str, size_t & pos) +{ + Entity* value = 0; + + if ( str[ pos ] == '{' ) + { + // next one is an object + DEBUG("We read an object.") + Object* obj = new Object; + pos += 1; + while( pos < str.size() && str[ pos ] != '}' ) + { + parseLeft( str, pos, obj ); + ignoreChars( str, pos ); + } + DEBUG("We just finished to read an object ! ") + pos += 1; // we're on the }, go to the next char + value = obj; + } + else if ( str[ pos ] == '"' ) + { + // next one is a string + DEBUG("We read a string") + value = parseJsonString( str, pos ); + } + else if ( str[ pos ] == '[' ) + { + // next one is an array + DEBUG("We read an array") + Array* array = new Array; + pos += 1; + while( pos < str.size() && str[ pos ] != ']' ) + { + Entity* child = parseRight( str, pos ); + if ( child ) + array->push_back( child ); + } + DEBUG("We've finished to read our array.") + pos += 1; // we're on the ], go to the next char + value = array; + } + ignoreChars( str, pos ); + return value; +} + +void Parser::parseLeft(const std::string & str, size_t & pos, Object* eoserial) +{ + std::string key = parseString(str, pos); + ++pos; // the colon + DEBUG("We've read the key ") + (*eoserial)[ key ] = parseRight( str, pos ); +} + +} // namespace eoserial + diff --git a/eo/src/serial/Parser.h b/eo/src/serial/Parser.h new file mode 100644 index 000000000..f0a94ee21 --- /dev/null +++ b/eo/src/serial/Parser.h @@ -0,0 +1,78 @@ +# ifndef __EOSERIAL_PARSER_H__ +# define __EOSERIAL_PARSER_H__ + +# include "Entity.h" +# include "String.h" +# include "Object.h" + +/** + * This file contains a tiny JSON parser used in DAE. This parser just handles + * a subset of JSON grammar, with the following restrictions : + * - all strings must be surrounded by double quotes. + * - everything which is not an object or an array is considered to be a string + * (even integers, booleans,...). + * - no syntax check is done. We trust the programmer and he has to ensure that + * every JSON string he produces is valid. + * + * @author Benjamin BOUVIER + */ + +namespace eoserial +{ + +/** + * @brief Parser from a JSON source. + * + * This parser does just retrieve values and does NOT check the structure of + * the input. This implies that if the input is not correct, the result is undefined + * and can result to a failure on execution. + */ +class Parser +{ + public: + + /** + * @brief Parses the given string and returns the JSON object read. + */ + static eoserial::Object* parse(const std::string & str); + + protected: + + /** + * @brief Parses the right part of a JSON object as a string. + * + * The right part of an object can be a string (for instance : + * "key":"value"), a JSON array (for instance: "key":["1"]) or + * another JSON object (for instance: "key":{"another_key":"value"}). + * + * The right parts are found after keys (which are parsed by parseLeft) + * and in arrays. + * + * @param str The string we're parsing. + * @param pos The index of the current position in the string. + * @return The JSON object matching the right part. + */ + static eoserial::Entity* parseRight(const std::string & str, size_t & pos); + + /** + * @brief Parses the left value of a key-value pair, which is the key. + * + * @param str The string we're parsing. + * @param pos The index of the current position in the string. + * @param eoserial The current JSON object for which we're adding a key-value pair. + */ + static void parseLeft(const std::string & str, size_t & pos, eoserial::Object* json); + + /** + * @brief Retrieves a string in a JSON content. + * + * @param str The string we're parsing. + * @param pos The index of the current position of parsing, + * which will be updated. + */ + static eoserial::String* parseJsonString(const std::string & str, size_t & pos); +}; + +} // namespace eoserial + +# endif // __EOSERIAL_PARSER_H__ diff --git a/eo/src/serial/Serializable.h b/eo/src/serial/Serializable.h new file mode 100644 index 000000000..482a918a8 --- /dev/null +++ b/eo/src/serial/Serializable.h @@ -0,0 +1,44 @@ +# ifndef __EOSERIAL_SERIALIZABLE_H__ +# define __EOSERIAL_SERIALIZABLE_H__ + +# include + +namespace eoserial +{ + +class Object; // to avoid recursive inclusion with JsonObject + +/** + * @brief Interface showing that object can be written to a eoserial type + * (currently JSON). + */ +class Printable +{ +public: + /** + * @brief Serializes the object to JSON format. + * @return A JSON object created with new. + */ + virtual eoserial::Object* pack() const = 0; +}; + +/** + * @brief Interface showing that object can be eoserialized (written and read + * from an input). + * + * Note : Persistent objects should have a default non-arguments constructor. + */ +class Persistent : public Printable +{ + public: + /** + * @brief Loads class fields from a JSON object. + * @param json A JSON object. Programmer doesn't have to delete it, it + * is automatically done. + */ + virtual void unpack(const eoserial::Object* json) = 0; +}; + +} // namespace eoserial + +# endif // __EOSERIAL_SERIALIZABLE_H__ diff --git a/eo/src/serial/String.cpp b/eo/src/serial/String.cpp new file mode 100644 index 000000000..deba05a06 --- /dev/null +++ b/eo/src/serial/String.cpp @@ -0,0 +1,11 @@ +# include "String.h" + +namespace eoserial +{ + std::ostream& String::print( std::ostream& out ) const + { + out << '"' << *this << '"'; + return out; + } +} // namespace eoserial + diff --git a/eo/src/serial/String.h b/eo/src/serial/String.h new file mode 100644 index 000000000..43a2cffa8 --- /dev/null +++ b/eo/src/serial/String.h @@ -0,0 +1,79 @@ +# ifndef __EOSERIAL_STRING_H__ +# define __EOSERIAL_STRING_H__ + +# include +# include + +# include "Entity.h" + +namespace eoserial +{ + +/** + * @brief JSON String + * + * Wrapper for string, so as to be used as a JSON object. + */ +class String : public eoserial::Entity, public std::string +{ + public: + + /** + * @brief Default ctor. + * @param str The string we want to wrap. + */ + String( const std::string& str ) : std::string( str ) {} + + /** + * @brief Ctor used only on parsing. + */ + String( ) {} + + /** + * @brief Prints out the string. + */ + virtual std::ostream& print( std::ostream& out ) const; + + /** + * @brief Deserializes the current String into a given primitive type value. + * @param value The value in which we're writing. + */ + template + inline void deserialize( T & value ); + + protected: + // Copy and reaffectation are forbidden + explicit String( const String& _ ); + String& operator=( const String& _ ); +}; + +/** + * @brief Casts a eoserial::String into a primitive value, or in a type which at + * least overload operator>>. + * + * @param value A reference to the variable we're writing into. + * + * It's not necessary to specify the variable type, which can be infered by compiler when + * invoking. + */ +template +inline void String::deserialize( T & value ) +{ + std::stringstream ss; + ss << *this; + ss >> value; +} + +/** + * @brief Specialization for strings, which don't need to be converted through + * a stringstream. + */ +template<> +inline void String::deserialize( std::string & value ) +{ + value = *this; +} + +} // namespace eoserial + +# endif // __EOSERIAL_STRING_H__ diff --git a/eo/src/serial/Utils.h b/eo/src/serial/Utils.h new file mode 100644 index 000000000..70fd2f75a --- /dev/null +++ b/eo/src/serial/Utils.h @@ -0,0 +1,167 @@ +# ifndef __EOSERIAL_UTILS_H__ +# define __EOSERIAL_UTILS_H__ + +# include "Array.h" +# include "Object.h" +# include "String.h" + +namespace eoserial +{ + /***************************** + * DESERIALIZATION FUNCTIONS * + ***************************** + These functions are useful for casting eoserial::objects into simple, primitive + variables or into class instance which implement eoserial::Persistent. + + The model is always quite the same : + - the first argument is the containing object (which is a eoserial::Entity, + an object or an array) + - the second argument is the key or index, + - the last argument is the value in which we're writing. + */ + + template< class T > + inline void unpack( const Object & obj, const std::string & key, T & value ) + { + static_cast( obj.find( key )->second )->deserialize( value ); + } + + inline void unpackObject( const Object & obj, const std::string & key, Persistent & value ) + { + static_cast( obj.find( key )->second )->deserialize( value ); + } + + template< class Container, template class UnpackAlgorithm > + inline void unpackArray( const Object & obj, const std::string & key, Container & array ) + { + static_cast( obj.find( key )->second )->deserialize< Container, UnpackAlgorithm >( array ); + } + + template< class T > + inline void unpack( const Array & array, unsigned int index, T & value ) + { + static_cast( array[ index ] )->deserialize( value ); + } + + inline void unpackObject( const Array & array, unsigned int index, Persistent & value ) + { + static_cast( array[ index ] )->deserialize( value ); + } + + template< class Container, template class UnpackAlgorithm > + inline void unpackArray( const Array & array, unsigned int index, Container & container ) + { + static_cast( array[ index ] )->deserialize< Container, UnpackAlgorithm >( container ); + } + + /******************************* + *** SERIALIZATION FUNCTIONS *** + ******************************* + These functions are useful for casting classic objects and + eoserial::Persistent objects into eoserial entities which + can be manipulated by the framework. + */ + + /** + * @brief Casts a value of a stream-serializable type (i.e, which implements + * operator <<) into a JsonString. + * + * This is used when serializing the objects : all primitives types should be + * converted into strings to get more easily manipulated. + * + * @param value The value we're converting. + * @return JsonString wrapper for the value. + */ + template + String* make( const T & value ) + { + std::stringstream ss; + ss << value; + return new String( ss.str() ); + } + + /** + * @brief Specialization for strings : no need to convert as they're still + * usable as strings. + */ + template<> + inline String* make( const std::string & value ) + { + return new String( value ); + } + + /* + * These functions are useful for automatically serializing STL containers into + * eoserial arrays which could be used by the framework. + **/ + + /** + * @brief Functor which explains how to push the value into the eoserial::Array. + */ + template< class T > + struct PushAlgorithm + { + /** + * @brief Main operator. + * + * @param array The eoserial::array in which we're writing. + * @param value The variable we are writing. + */ + virtual void operator()( Array & array, const T & value ) = 0; + }; + + /** + * @brief Push algorithm for primitive variables. + * + * This one should be used when inserting primitive (and types which implement + * operator<<) variables. + */ + template< class T > + struct MakeAlgorithm : public PushAlgorithm + { + void operator()( Array & array, const T & value ) + { + array.push_back( make( value ) ); + } + }; + + /** + * @brief Push algorithm for eoserial::Persistent variables. + */ + template< class T > + struct SerializablePushAlgorithm : public PushAlgorithm + { + void operator()( Array & array, const T & obj ) + { + // obj address is not saved into array.push_back. + array.push_back( &obj ); + } + }; + + /** + * @brief Casts a STL container (vector or list, for instance) + * into a eoserial::Array. + * + * @Ăľaram PushAlgorithm The algorithm used for inserting new element in the eoserial::Array. + * This algorithm is directly called, so it is its own charge to invoke push_back on the + * eoserial::Array. + */ + template< class Container, template class PushAlgorithm > + Array* makeArray( const Container & array ) + { + Array* returned_array = new Array; + typedef typename Container::const_iterator iterator; + typedef typename Container::value_type Type; + PushAlgorithm< Type > algo; + for ( + iterator it = array.begin(), end = array.end(); + it != end; + ++it) + { + algo( *returned_array, *it ); + } + return returned_array; + } +} // namespace eoserial + +# endif //__EOSERIAL_UTILS_H__ diff --git a/eo/src/serial/eoSerial.h b/eo/src/serial/eoSerial.h new file mode 100644 index 000000000..a10f6c014 --- /dev/null +++ b/eo/src/serial/eoSerial.h @@ -0,0 +1,12 @@ +# ifndef __EOSERIAL_HEADERS__ +# define __EOSERIAL_HEADERS__ + +# include "Object.h" +# include "Serializable.h" +# include "Array.h" +# include "Object.h" +# include "String.h" +# include "Parser.h" +# include "Utils.h" + +# endif // __EOSERIAL_HEADERS__ diff --git a/eo/src/serial/json_example b/eo/src/serial/json_example new file mode 100644 index 000000000..7ecb3edda --- /dev/null +++ b/eo/src/serial/json_example @@ -0,0 +1,8 @@ +{"a":"b", +"obj": + {"obj_a":"obj_}b","subobj_a": + {"subk":"subv"} + }, +"c":"d", +"array":["1","2",{"\"array\"_obj\"":"array_ov]"}, ["3"], "4"] +} From abc18a653df6812102fa8ffaf84dfb4bc3c50fbc Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 15 Jun 2012 11:01:28 +0200 Subject: [PATCH 1907/2134] Added a gitignore for compiled files --- eo/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 eo/.gitignore diff --git a/eo/.gitignore b/eo/.gitignore new file mode 100644 index 000000000..977910719 --- /dev/null +++ b/eo/.gitignore @@ -0,0 +1,3 @@ +*.swp +debug/ +release/ From 2851cad471681833eb0d8ca392fe3e2fa5b9d4be Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 15 Jun 2012 17:07:29 +0200 Subject: [PATCH 1908/2134] Configure eo-conf.cmake to enable or disable MPI use. --- eo/eo-conf.cmake | 7 +++++++ eo/src/CMakeLists.txt | 29 ++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/eo/eo-conf.cmake b/eo/eo-conf.cmake index e8f285cbd..2c115cfef 100644 --- a/eo/eo-conf.cmake +++ b/eo/eo-conf.cmake @@ -5,3 +5,10 @@ SET(PROJECT_VERSION_MINOR 3) SET(PROJECT_VERSION_PATCH 0) SET(PROJECT_VERSION_MISC "-edge") +# If you plan to use MPI, precise here where are the static libraries from +# openmpi and boost::mpi. + +SET(WITH_MPI FALSE CACHE BOOL "Use mpi ?" FORCE) +SET(MPI_DIR "put root directory of openmpi here" CACHE PATH "OpenMPI directory" FORCE) +SET(BOOST_DIR "put root directory of boost here" CACHE PATH "Boost directory" FORCE) + diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index b6a8c2308..f674da4ec 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -5,7 +5,30 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### -### 2) Define the eo target +### 2) Optionnal: add MPI and Boost MPI dependencies. +###################################################################################### + +IF(WITH_MPI) + MESSAGE("[EO] Compilation with MPI and BoostMPI.") + + SET(CMAKE_CXX_COMPILER "${MPI_DIR}/bin/mpicxx") + + # headers location + INCLUDE_DIRECTORIES(${MPI_DIR}/include) + INCLUDE_DIRECTORIES(${BOOST_DIR}/include) + + # lib location + LINK_DIRECTORIES(${MPI_DIR}/lib) + LINK_DIRECTORIES(${BOOST_DIR}/lib) + + # for conditional compilation in code + ADD_DEFINITIONS(-DWITH_MPI) + + LINK_LIBRARIES(boost_mpi boost_serialization) +ENDIF() + +###################################################################################### +### 3) Define the eo target ###################################################################################### SET(EO_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) @@ -27,14 +50,14 @@ FILE(GLOB HDRS *.h eo) INSTALL(FILES ${HDRS} DESTINATION include/eo COMPONENT headers) ###################################################################################### -### 3) Optionnal: define your target(s)'s version: no effect for windows +### 4) Optionnal: define your target(s)'s version: no effect for windows ###################################################################################### SET(EO_VERSION ${GLOBAL_VERSION}) SET_TARGET_PROPERTIES(eo PROPERTIES VERSION "${EO_VERSION}") ###################################################################################### -### 4) Where must cmake go now ? +### 5) Where must cmake go now ? ###################################################################################### ADD_SUBDIRECTORY(do) From 699a6c18585a7e5da34c96be22098ad3391a58cd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 17 Jun 2012 14:21:55 +0200 Subject: [PATCH 1909/2134] =?UTF-8?q?*=C2=A0eo/src/pyeo/test/run=5Ftests.s?= =?UTF-8?q?h:=20removed=20ambigious=20use=20of=20python=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/pyeo/test/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/pyeo/test/run_tests.sh b/eo/src/pyeo/test/run_tests.sh index b06c61b05..8a2ebca13 100755 --- a/eo/src/pyeo/test/run_tests.sh +++ b/eo/src/pyeo/test/run_tests.sh @@ -2,6 +2,6 @@ for i in *.py do - python $i > /dev/null + python2 $i > /dev/null done From 6637535020b607aed9fb27e5649b08b703bd441e Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 17 Jun 2012 20:59:21 +0200 Subject: [PATCH 1910/2134] * cmakelists.txt: minimum version checker --- eo/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index c10ac3c5e..63de5b229 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -1,3 +1,4 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ###################################################################################### ### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line From f962a7942bc6e8c3c48ab2abff8dfb60a063f88a Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sun, 17 Jun 2012 21:01:16 +0200 Subject: [PATCH 1911/2134] * we can now disable deprecated messages --- eo/eo-conf.cmake | 1 + eo/src/eoCombinedContinue.h | 5 +++++ eo/src/eoProportionalCombinedOp.h | 3 +++ eo/src/utils/eoOStreamMonitor.h | 5 +++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eo/eo-conf.cmake b/eo/eo-conf.cmake index e8f285cbd..9d3d5c3a8 100644 --- a/eo/eo-conf.cmake +++ b/eo/eo-conf.cmake @@ -5,3 +5,4 @@ SET(PROJECT_VERSION_MINOR 3) SET(PROJECT_VERSION_PATCH 0) SET(PROJECT_VERSION_MISC "-edge") +# ADD_DEFINITIONS(-DDEPRECATED_MESSAGES) # disable warning deprecated function messages diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index 5226e28dd..dfb70f67b 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -61,7 +61,9 @@ public: eoCombinedContinue( eoContinue& _cont1, eoContinue& _cont2) : eoContinue(), std::vector* >() { +#ifndef DEPRECATED_MESSAGES #pragma message "The double continuators constructor of eocombinedContinue is deprecated and will be removed in the next release." +#endif // !DEPRECATED_MESSAGES this->push_back(&_cont1); this->push_back(&_cont2); @@ -74,7 +76,10 @@ public: void removeLast(void) { +#ifndef DEPRECATED_MESSAGES #pragma message "The removeLast method of eocombinedContinue is deprecated and will be removed in the next release, use pop_back instead." +#endif // !DEPRECATED_MESSAGES + this->pop_back(); } diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 4fea77e52..60c478903 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -188,8 +188,11 @@ public: virtual void add(eoQuadOp & _op, const double _rate, bool _verbose) { +#ifndef DEPRECATED_MESSAGES #pragma message "The use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; +#endif // !DEPRECATED_MESSAGES + add(_op,_rate); } diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index cb4c476a8..b941b05f2 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -44,12 +44,13 @@ Authors: class eoOStreamMonitor : public eoMonitor { public : - eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::ostream & _out, bool /*_verbose*/=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) { - (void)_verbose; +#ifndef DEPRECATED_MESSAGES eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; #pragma message "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" +#endif // !DEPRECATED_MESSAGES } eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : From bc7f662b59375e7a1a5bca1edd9efabd9e3a035f Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 18 Jun 2012 14:18:22 +0200 Subject: [PATCH 1912/2134] Added rules to ignore CMake generated directories and Makefile --- eo/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/.gitignore b/eo/.gitignore index 977910719..2bfc9fc77 100644 --- a/eo/.gitignore +++ b/eo/.gitignore @@ -1,3 +1,5 @@ *.swp debug/ release/ +*CMakeFiles* +*Makefile From 04f972475cf2dffbb6c77b40efb5e60be0fb5f5d Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 18 Jun 2012 14:20:06 +0200 Subject: [PATCH 1913/2134] First version of generic MPI parallelization --- eo/src/eoParallelApply.h | 49 ++++++ eo/src/eompi.h | 289 +++++++++++++++++++++++++++++++ eo/test/t-eoMpiParallelApply.cpp | 59 +++++++ 3 files changed, 397 insertions(+) create mode 100644 eo/src/eoParallelApply.h create mode 100644 eo/src/eompi.h create mode 100644 eo/test/t-eoMpiParallelApply.cpp diff --git a/eo/src/eoParallelApply.h b/eo/src/eoParallelApply.h new file mode 100644 index 000000000..6a7c6eaad --- /dev/null +++ b/eo/src/eoParallelApply.h @@ -0,0 +1,49 @@ +# ifndef __EO_PARALLEL_APPLY_H__ +# define __EO_PARALLEL_APPLY_H__ + +# include "eompi.h" + +# include +# include + +template< typename EOT > +class ParallelApply : public MpiJob< EOT > +{ + public: + + ParallelApply( eoUF & _proc, std::vector& _pop ) : + MpiJob( _pop ), + func( _proc ) + { + // empty + } + + virtual void sendTask( int wrkRank, int index ) + { + MpiJob::comm.send( wrkRank, 1, MpiJob::data[ index ] ); + } + + virtual void handleResponse( int wrkRank, int index ) + { + MpiJob::comm.recv( wrkRank, 1, MpiJob::data[ index ] ); + } + + virtual void processTask( ) + { + EOT ind; + cout << "Receiving individual." << endl; + MpiJob::comm.recv( 0, 1, ind ); + cout << "Applying function." << endl; + func( ind ); + cout << "Sending result." << endl; + MpiJob::comm.send( 0, 1, ind ); + cout << "Leaving processTask" << endl; + } + + protected: + eoUF& func; +}; + +# endif // __EO_PARALLEL_APPLY_H__ + + diff --git a/eo/src/eompi.h b/eo/src/eompi.h new file mode 100644 index 000000000..82d1a585b --- /dev/null +++ b/eo/src/eompi.h @@ -0,0 +1,289 @@ +# ifndef __EO_MPI_H__ +# define __EO_MPI_H__ + +# include +# include + +# include +namespace mpi = boost::mpi; + +# include +using namespace std; +// TODO TODOB comment! + +namespace EoMpi +{ + namespace Channel + { + const int Commands = 0; + } + + namespace Message + { + const int Continue = 0; + const int Finish = 1; + } +} + +class MpiNode; + +class MpiNodeStore +{ + public: + + static void instance( MpiNode* _instance ) + { + singleton = _instance; + } + + static MpiNode* instance() + { + return singleton; + } + + protected: + + static MpiNode* singleton; +}; + +MpiNode* MpiNodeStore::singleton; + +class MpiNode +{ +protected: + mpi::environment& env; + mpi::communicator& _comm; + + int rank; + int size; + + int argc; + char** argv; + +public: + MpiNode( mpi::environment& _env, mpi::communicator& __comm ) : + env(_env), + _comm(__comm), + rank(__comm.rank()), + size(__comm.size()) + { + // empty + } + + virtual ~MpiNode() + { + // empty + } + + mpi::communicator& comm() + { + return _comm; + } +}; + +struct AssignmentAlgorithm +{ + virtual int get( ) = 0; + virtual void size( int s ) = 0; + virtual int size( ) = 0; + virtual void confirm( int wrkRank ) = 0; +}; + +struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm +{ + public: + virtual int get( ) + { + int assignee = -1; + if (! availableWrk.empty() ) + { + assignee = availableWrk.back(); + availableWrk.pop_back(); + } + return assignee; + } +; + void size( int s ) + { + for( int i = 1; i < s ; ++i ) + { + availableWrk.push_back( i ); + } + } + + int size() + { + return availableWrk.size(); + } + + void confirm( int rank ) + { + availableWrk.push_back( rank ); + } + + protected: + std::vector< int > availableWrk; +}; + +template< typename EOT > +class MpiJob +{ + public: + + MpiJob( std::vector< EOT > & _data ) : + data( _data ), + comm( MpiNodeStore::instance()->comm() ) + { + // empty + } + + // master + virtual void sendTask( int wrkRank, int index ) = 0; + virtual void handleResponse( int wrkRank, int index ) = 0; + // worker + virtual void processTask( ) = 0; + + void master( AssignmentAlgorithm & assignmentAlgorithm ) + { + for( int i = 0, size = data.size(); + i < size; + ++i) + { + cout << "Beginning loop for i = " << i << endl; + int assignee = assignmentAlgorithm.get( ); + cout << "Assignee : " << assignee << endl; + while( assignee <= 0 ) + { + cout << "Waitin' for node..." << endl; + mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); + int wrkRank = status.source(); + cout << "Node " << wrkRank << " just terminated." << endl; + handleResponse( wrkRank, assignedTasks[ wrkRank ] ); + assignmentAlgorithm.confirm( wrkRank ); + assignee = assignmentAlgorithm.get( ); + } + cout << "Assignee found : " << assignee << endl; + assignedTasks[ assignee ] = i; + comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); + sendTask( assignee, i ); + } + + // frees all the idle workers + int idle; + vector idles; + while ( ( idle = assignmentAlgorithm.get( ) ) > 0 ) + { + comm.send( idle, EoMpi::Channel::Commands, EoMpi::Message::Finish ); + idles.push_back( idle ); + } + for (int i = 0; i < idles.size(); ++i) + { + assignmentAlgorithm.confirm( idles[i] ); + } + + // wait for all responses + int wrkNb = comm.size() - 1; + while( assignmentAlgorithm.size() != wrkNb ) + { + mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); + int wrkRank = status.source(); + handleResponse( wrkRank, assignedTasks[ wrkRank ] ); + comm.send( wrkRank, EoMpi::Channel::Commands, EoMpi::Message::Finish ); + assignmentAlgorithm.confirm( wrkRank ); + } + } + + void worker( ) + { + int order; + while( true ) + { + comm.recv( 0, EoMpi::Channel::Commands, order ); + if ( order == EoMpi::Message::Finish ) + { + return; + } else + { + processTask( ); + } + } + } + +protected: + + std::vector & data; + std::map< int /* worker rank */, int /* index in vector */> assignedTasks; + + mpi::communicator& comm; +}; + +class MasterNode : public MpiNode +{ +public: + MasterNode( int _argc, char** _argv, + mpi::environment& _env, + mpi::communicator& _comm + ) : + MpiNode(_env, _comm ) + { + // empty + } + + void setAssignmentAlgorithm( AssignmentAlgorithm* assignmentAlgo ) + { + _assignmentAlgo = assignmentAlgo; + _assignmentAlgo->size( _comm.size() ); + } + + template< typename EOT > + void run( MpiJob< EOT > & job ) + { + job.master( *_assignmentAlgo ); + } + +protected: + AssignmentAlgorithm* _assignmentAlgo; +}; + +class WorkerNode : public MpiNode +{ + public: + + WorkerNode( + int _argc, char** _argv, + mpi::environment& _env, + mpi::communicator& _comm ) : + MpiNode( _env, _comm ) + { + // empty + } + + template< typename EOT > + void run( MpiJob & job ) + { + job.worker( ); + } +}; + +class MpiSingletonFactory +{ + public: + + static void init( int argc, char** argv ) + { + MpiNode* singleton; + //mpi::environment* env = new mpi::environment ( argc, argv ); + //mpi::communicator* world = new mpi::communicator; // TODO clean + static mpi::environment env( argc, argv ); + static mpi::communicator world; + if ( world.rank() == 0 ) + { + singleton = new MasterNode( argc, argv, env, world ); + } else + { + singleton = new WorkerNode( argc, argv, env, world ); + } + MpiNodeStore::instance( singleton ); + } +}; +# endif // __EO_MPI_H__ diff --git a/eo/test/t-eoMpiParallelApply.cpp b/eo/test/t-eoMpiParallelApply.cpp new file mode 100644 index 000000000..77583420e --- /dev/null +++ b/eo/test/t-eoMpiParallelApply.cpp @@ -0,0 +1,59 @@ +# include +# include +# include + +# include +using namespace std; + +struct plusOne : public eoUF< int&, void > +{ + void operator() ( int & x ) + { + ++x; + } +}; + +int main(int argc, char** argv) +{ + DynamicAssignmentAlgorithm algo; + cout << "Appel Ă  init... " << endl; + MpiSingletonFactory::init( argc, argv ); + + cout << "CrĂ©ation des donnĂ©es... " << endl; + vector v; + + v.push_back(1); + v.push_back(3); + v.push_back(3); + v.push_back(7); + v.push_back(42); + + plusOne plusOneInstance; + + cout << "CrĂ©ation du job..." << endl; + ParallelApply job( plusOneInstance, v ); + + cout << "CrĂ©ation de l'instance..." << endl; + MpiNode* instance = MpiNodeStore::instance(); + if( dynamic_cast( instance ) != 0 ) + { + cout << "[Master] Algorithme d'assignation" << endl; + static_cast( instance )->setAssignmentAlgorithm( &algo ); + cout << "[Master] Lancement." << endl; + static_cast( instance )->run( job ); + + for (int i = 0; i < v.size(); ++i ) + { + cout << v[i] << endl; + } + } else if ( dynamic_cast( instance ) != 0 ) + { + cout << "[Worker] Lancement." << endl; + static_cast( instance )->run( job ); + } else + { + cout << "Nothing to be done;" << endl; + } + + return 0; +} From bd959cb3efa62e76b38aa3da84e4d8d107226e09 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 18 Jun 2012 15:22:47 +0200 Subject: [PATCH 1914/2134] First parallel evaluation with MPI. Look at t-eoMpiParallel.cpp --- eo/src/apply.h | 52 +++++++++++------ eo/test/t-eoMpiParallel.cpp | 111 ++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 16 deletions(-) create mode 100644 eo/test/t-eoMpiParallel.cpp diff --git a/eo/src/apply.h b/eo/src/apply.h index f685f8d3b..39a365057 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -33,6 +33,11 @@ #include #include +# ifdef WITH_MPI +# include +# include +# endif // WITH_MPI + /** Applies a unary function to a std::vector of things. @@ -48,33 +53,48 @@ void apply(eoUF& _proc, std::vector& _pop) double t1 = 0; if ( eo::parallel.enableResults() ) - { - t1 = omp_get_wtime(); - } + { + t1 = omp_get_wtime(); + } if (!eo::parallel.isDynamic()) - { + { #pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size) - for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } - } + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + } else - { + { #pragma omp parallel for schedule(dynamic) if(eo::parallel.isEnabled()) - //doesnot work with gcc 4.1.2 - //default(none) shared(_proc, _pop, size) - for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } - } + //doesnot work with gcc 4.1.2 + //default(none) shared(_proc, _pop, size) + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + } if ( eo::parallel.enableResults() ) - { - double t2 = omp_get_wtime(); - eoLogger log; - log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; - } + { + double t2 = omp_get_wtime(); + eoLogger log; + log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; + } #else // _OPENMP +#ifdef WITH_MPI + ParallelApply job( _proc, _pop ); + MasterNode* master = dynamic_cast( MpiNodeStore::instance() ); + if ( master ) + { + DynamicAssignmentAlgorithm algo; + master->setAssignmentAlgorithm( &algo ); + master->run( job ); + } else + { + WorkerNode* wrk = dynamic_cast( MpiNodeStore::instance() ); + wrk->run( job ); + } +#else // !_MPI for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } +#endif #endif // !_OPENMP } diff --git a/eo/test/t-eoMpiParallel.cpp b/eo/test/t-eoMpiParallel.cpp new file mode 100644 index 000000000..5529b8e2c --- /dev/null +++ b/eo/test/t-eoMpiParallel.cpp @@ -0,0 +1,111 @@ +//----------------------------------------------------------------------------- +// t-eoMpiParallel.cpp +//----------------------------------------------------------------------------- + +#include +#include +//#include +#include "real_value.h" + +#include + +//----------------------------------------------------------------------------- + +class eoRealSerializable : public eoReal< eoMinimizingFitness >, public eoserial::Persistent +{ + public: + + eoRealSerializable(unsigned size = 0, double value = 0.0): + eoReal(size, value) {} + + eoserial::Object* pack() const + { + eoserial::Object* obj = new eoserial::Object; + obj->add( "array", + eoserial::makeArray< vector, eoserial::MakeAlgorithm > + ( *this ) + ); + return obj; + } + + void unpack( const eoserial::Object* obj ) + { + eoserial::unpackArray< vector, eoserial::Array::UnpackAlgorithm > + ( *obj, "array", *this ); + } + + // Gives access to boost serialization + friend class boost::serialization::access; + + /** + * Serializes the decomposition in a boost archive (useful for boost::mpi) + */ + template + void save( Archive & ar, const unsigned int version ) const + { + std::stringstream ss; + printOn( ss ); + std::string asStr = ss.str(); + ar & asStr; + + (void) version; // avoid compilation warning + } + + /** + * Deserializes the decomposition from a boost archive (useful for boost:mpi) + */ + template + void load( Archive & ar, const unsigned int version ) + { + std::string asStr; + ar & asStr; + std::stringstream ss; + ss << asStr; + readFrom( ss ); + + (void) version; // avoid compilation warning + } + + // Indicates that boost save and load operations are not the same. + BOOST_SERIALIZATION_SPLIT_MEMBER() + +}; + +typedef eoRealSerializable EOT; + +int main(int ac, char** av) +{ + MpiSingletonFactory::init( ac, av ); + + eoParser parser(ac, av); + + unsigned int popSize = parser.getORcreateParam((unsigned int)100, "popSize", "Population Size", 'P', "Evolution Engine").value(); + unsigned int dimSize = parser.getORcreateParam((unsigned int)10, "dimSize", "Dimension Size", 'd', "Evolution Engine").value(); + + uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); + if (seedParam == 0) { seedParam = time(0); } + + make_parallel(parser); + make_help(parser); + + rng.reseed( seedParam ); + + eoUniformGenerator< double > gen(-5, 5); + eoInitFixedLength< EOT > init( dimSize, gen ); + + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); + eoEvalFuncCounter< EOT > eval( mainEval ); + + eoPop< EOT > pop( popSize, init ); + + eo::log << "Size of population : " << popSize << std::endl; + + eoPopLoopEval< EOT > popEval( eval ); + popEval( pop, pop ); + + eo::log << eo::quiet << "DONE!" << std::endl; + + return 0; +} + +//----------------------------------------------------------------------------- From fed65c4f082bc508820a3f432c573d16684af78c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 18 Jun 2012 17:02:41 +0200 Subject: [PATCH 1915/2134] Added eoParallelPopEvalFunc and allow compilation of full library. --- eo/src/CMakeLists.txt | 1 + eo/src/apply.h | 15 ++++++++++----- eo/src/eoPopEvalFunc.h | 20 ++++++++++++++++++++ eo/src/eompi.cpp | 4 ++++ eo/src/eompi.h | 2 -- 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 eo/src/eompi.cpp diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index f674da4ec..3d46be7ad 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -41,6 +41,7 @@ SET(EO_SOURCES eoCtrlCContinue.cpp eoScalarFitnessAssembled.cpp eoSIGContinue.cpp + eompi.cpp ) ADD_LIBRARY(eo STATIC ${EO_SOURCES}) diff --git a/eo/src/apply.h b/eo/src/apply.h index 39a365057..c01ac5740 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -79,8 +79,17 @@ void apply(eoUF& _proc, std::vector& _pop) #else // _OPENMP + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + +#endif // !_OPENMP +} + #ifdef WITH_MPI +template +void parallelApply(eoUF& _proc, std::vector& _pop) +{ ParallelApply job( _proc, _pop ); + MasterNode* master = dynamic_cast( MpiNodeStore::instance() ); if ( master ) { @@ -92,12 +101,8 @@ void apply(eoUF& _proc, std::vector& _pop) WorkerNode* wrk = dynamic_cast( MpiNodeStore::instance() ); wrk->run( job ); } -#else // !_MPI - for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } -#endif - -#endif // !_OPENMP } +#endif /** This is a variant of apply which is called in parallel diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index aba74d9ab..cbd38b21c 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -77,6 +77,26 @@ private: eoEvalFunc & eval; }; +#ifdef WITH_MPI +// TODO TODOB commenter +template +class eoParallelPopLoopEval : public eoPopEvalFunc { +public: + /** Ctor: set value of embedded eoEvalFunc */ + eoParallelPopLoopEval(eoEvalFunc & _eval) : eval(_eval) {} + + /** Do the job: simple loop over the offspring */ + void operator()(eoPop & _parents, eoPop & _offspring) + { + (void)_parents; + parallelApply(eval, _offspring); + } + +private: + eoEvalFunc & eval; +}; +#endif + ///////////////////////////////////////////////////////////// // eoTimeVaryingLoopEval ///////////////////////////////////////////////////////////// diff --git a/eo/src/eompi.cpp b/eo/src/eompi.cpp new file mode 100644 index 000000000..eff6bc39d --- /dev/null +++ b/eo/src/eompi.cpp @@ -0,0 +1,4 @@ +# include "eompi.h" + +MpiNode* MpiNodeStore::singleton; + diff --git a/eo/src/eompi.h b/eo/src/eompi.h index 82d1a585b..9abcbb0f2 100644 --- a/eo/src/eompi.h +++ b/eo/src/eompi.h @@ -46,8 +46,6 @@ class MpiNodeStore static MpiNode* singleton; }; -MpiNode* MpiNodeStore::singleton; - class MpiNode { protected: From 6ac423bf22c4e68014edcd6cabc1af3218321e46 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 20 Jun 2012 11:46:18 +0200 Subject: [PATCH 1916/2134] Adding eoEasyEA constructor allowing to precise which eoPopEvalFunc should be used --- eo/src/eoEasyEA.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 2c7c5474c..4d74932f7 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -102,6 +102,33 @@ template class eoEasyEA: public eoAlgo offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. } + /** + * @brief Ctor allowing to specify which pop eval function we're going to use. + * + * Ctor taking a breed and merge, an overload of ctor to define an offspring size, and + * the pop eval function used. This allows to precise if we would like to use the + * parallel evaluation, for instance. + */ + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoPopEvalFunc& _pop_eval, + eoBreed& _breed, + eoReplacement& _replace, + unsigned _offspringSize + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(_pop_eval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace), + isFirstCall(true) + { + offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. + } + /* eoEasyEA(eoContinue & _continuator, eoPopEvalFunc & _pop_eval, @@ -219,6 +246,8 @@ template class eoEasyEA: public eoAlgo /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { + + eo::log << "[EasyEA] Call to operator()" << std::endl; if (isFirstCall) { size_t total_capacity = _pop.capacity() + offspring.capacity(); @@ -227,22 +256,33 @@ template class eoEasyEA: public eoAlgo isFirstCall = false; } + // TODO TODOB delete all log traces + std::cout << "[EasyEA] After is first call." << std::endl; + eoPop empty_pop; + std::cout << "[EasyEA] After empty_pop." << std::endl; popEval(empty_pop, _pop); // A first eval of pop. + std::cout << "[EasyEA] After pop_eval." << std::endl; do { try { + std::cout << "[EasyEA] Beginning try." << std::endl; unsigned pSize = _pop.size(); + std::cout << "[EasyEA] psize determinated." << std::endl; offspring.clear(); // new offspring + std::cout << "[EasyEA] offspring cleared." << std::endl; breed(_pop, offspring); + std::cout << "[EasyEA] After breed, evaluating pop." << std::endl; popEval(_pop, offspring); // eval of parents + offspring if necessary + std::cout << "[EasyEA] After evaluation, replacing pop." << std::endl; replace(_pop, offspring); // after replace, the new pop. is in _pop + std::cout << "[EasyEA] After replacing, continuator." << std::endl; if (pSize > _pop.size()) throw std::runtime_error("Population shrinking!"); From fd2facb14e06440d53034766f162086831fa17f1 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 15:03:41 +0200 Subject: [PATCH 1917/2134] Moved mpi related files into mpi/ and compiling it as an extern library. --- eo/src/CMakeLists.txt | 5 +++-- eo/src/apply.h | 4 ++-- eo/src/mpi/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++ eo/src/{ => mpi}/eoParallelApply.h | 4 ---- eo/src/{ => mpi}/eompi.cpp | 0 eo/src/{ => mpi}/eompi.h | 0 eo/test/t-eoMpiParallelApply.cpp | 4 ++-- 7 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 eo/src/mpi/CMakeLists.txt rename eo/src/{ => mpi}/eoParallelApply.h (83%) rename eo/src/{ => mpi}/eompi.cpp (100%) rename eo/src/{ => mpi}/eompi.h (100%) diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index 3d46be7ad..caeb673ad 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### -### 2) Optionnal: add MPI and Boost MPI dependencies. +### 2) Optional: add MPI and Boost MPI dependencies. ###################################################################################### IF(WITH_MPI) @@ -25,6 +25,8 @@ IF(WITH_MPI) ADD_DEFINITIONS(-DWITH_MPI) LINK_LIBRARIES(boost_mpi boost_serialization) + + ADD_SUBDIRECTORY(mpi) ENDIF() ###################################################################################### @@ -41,7 +43,6 @@ SET(EO_SOURCES eoCtrlCContinue.cpp eoScalarFitnessAssembled.cpp eoSIGContinue.cpp - eompi.cpp ) ADD_LIBRARY(eo STATIC ${EO_SOURCES}) diff --git a/eo/src/apply.h b/eo/src/apply.h index c01ac5740..d2006fe04 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -34,8 +34,8 @@ #include # ifdef WITH_MPI -# include -# include +# include +# include # endif // WITH_MPI /** diff --git a/eo/src/mpi/CMakeLists.txt b/eo/src/mpi/CMakeLists.txt new file mode 100644 index 000000000..c770acd13 --- /dev/null +++ b/eo/src/mpi/CMakeLists.txt @@ -0,0 +1,32 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Define the eompi target +###################################################################################### + +SET(EOMPI_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH}) + +SET(EOMPI_SOURCES + eompi.cpp + ) + +ADD_LIBRARY(eompi STATIC ${EOMPI_SOURCES}) +INSTALL(TARGETS eompi ARCHIVE DESTINATION lib COMPONENT libraries) + +FILE(GLOB HDRS *.h) +INSTALL(FILES ${HDRS} DESTINATION include/eo/mpi COMPONENT headers) + +###################################################################################### +### 3) Optionnal +###################################################################################### + +SET(EOMPI_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(eompi PROPERTIES VERSION "${EOMPI_VERSION}") + +###################################################################################### diff --git a/eo/src/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h similarity index 83% rename from eo/src/eoParallelApply.h rename to eo/src/mpi/eoParallelApply.h index 6a7c6eaad..528d0cb29 100644 --- a/eo/src/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -31,13 +31,9 @@ class ParallelApply : public MpiJob< EOT > virtual void processTask( ) { EOT ind; - cout << "Receiving individual." << endl; MpiJob::comm.recv( 0, 1, ind ); - cout << "Applying function." << endl; func( ind ); - cout << "Sending result." << endl; MpiJob::comm.send( 0, 1, ind ); - cout << "Leaving processTask" << endl; } protected: diff --git a/eo/src/eompi.cpp b/eo/src/mpi/eompi.cpp similarity index 100% rename from eo/src/eompi.cpp rename to eo/src/mpi/eompi.cpp diff --git a/eo/src/eompi.h b/eo/src/mpi/eompi.h similarity index 100% rename from eo/src/eompi.h rename to eo/src/mpi/eompi.h diff --git a/eo/test/t-eoMpiParallelApply.cpp b/eo/test/t-eoMpiParallelApply.cpp index 77583420e..c20cc94fb 100644 --- a/eo/test/t-eoMpiParallelApply.cpp +++ b/eo/test/t-eoMpiParallelApply.cpp @@ -1,5 +1,5 @@ -# include -# include +# include +# include # include # include From d0a00a5216a1028c71d4c1f3b4e71d9733177823 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 15:05:32 +0200 Subject: [PATCH 1918/2134] Don't force user to compile with OpenMP. --- eo/CMakeLists.txt | 10 ++++++---- eo/eo-conf.cmake | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index c10ac3c5e..78cab0a56 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -44,10 +44,12 @@ ENABLE_LANGUAGE(C) ### 2) Include required modules / configuration files ##################################################################################### -FIND_PACKAGE(OpenMP) -IF(OPENMP_FOUND) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +IF(WITH_OMP) + FIND_PACKAGE(OpenMP) + IF(OPENMP_FOUND) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + ENDIF() ENDIF() INCLUDE(CMakeBackwardCompatibilityCXX) diff --git a/eo/eo-conf.cmake b/eo/eo-conf.cmake index 2c115cfef..1f5ee8150 100644 --- a/eo/eo-conf.cmake +++ b/eo/eo-conf.cmake @@ -5,10 +5,13 @@ SET(PROJECT_VERSION_MINOR 3) SET(PROJECT_VERSION_PATCH 0) SET(PROJECT_VERSION_MISC "-edge") +# If you plan to use OpenMP, put the following boolean to true : +SET(WITH_OMP FALSE CACHE BOOL "Use OpenMP ?" FORCE) + # If you plan to use MPI, precise here where are the static libraries from # openmpi and boost::mpi. SET(WITH_MPI FALSE CACHE BOOL "Use mpi ?" FORCE) -SET(MPI_DIR "put root directory of openmpi here" CACHE PATH "OpenMPI directory" FORCE) -SET(BOOST_DIR "put root directory of boost here" CACHE PATH "Boost directory" FORCE) +SET(MPI_DIR "/mpi/directory" CACHE PATH "OpenMPI directory" FORCE) +SET(BOOST_DIR "/boost/directory" CACHE PATH "Boost directory" FORCE) From 122d0debf098b9c36cc8f4f70bcbd555153a660c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 16:10:51 +0200 Subject: [PATCH 1919/2134] eoMpi API is simpler and allows to have multiple roles for a given node. --- eo/src/mpi/assignmentAlgorithm.h | 49 ++++++++ eo/src/mpi/eoParallelApply.h | 4 +- eo/src/mpi/eompi.cpp | 3 +- eo/src/mpi/eompi.h | 196 +++++++------------------------ eo/test/t-eoMpiParallelApply.cpp | 19 ++- 5 files changed, 112 insertions(+), 159 deletions(-) create mode 100644 eo/src/mpi/assignmentAlgorithm.h diff --git a/eo/src/mpi/assignmentAlgorithm.h b/eo/src/mpi/assignmentAlgorithm.h new file mode 100644 index 000000000..bd635c23f --- /dev/null +++ b/eo/src/mpi/assignmentAlgorithm.h @@ -0,0 +1,49 @@ +# ifndef __ASSIGNMENT_ALGORITHM_H__ +# define __ASSIGNMENT_ALGORITHM_H__ + +struct AssignmentAlgorithm +{ + virtual int get( ) = 0; + virtual int size( ) = 0; + virtual void confirm( int wrkRank ) = 0; +}; + +struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm +{ + public: + DynamicAssignmentAlgorithm( int offset, int size ) + { + for( int i = 0; offset + i < size; ++i) + { + availableWrk.push_back( offset + i ); + } + } + + virtual int get( ) + { + int assignee = -1; + if (! availableWrk.empty() ) + { + assignee = availableWrk.back(); + availableWrk.pop_back(); + } + return assignee; + } + + int size() + { + return availableWrk.size(); + } + + void confirm( int rank ) + { + availableWrk.push_back( rank ); + } + + protected: + std::vector< int > availableWrk; +}; + + + +# endif // __ASSIGNMENT_ALGORITHM_H__ diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 528d0cb29..80958e411 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -11,8 +11,8 @@ class ParallelApply : public MpiJob< EOT > { public: - ParallelApply( eoUF & _proc, std::vector& _pop ) : - MpiJob( _pop ), + ParallelApply( eoUF & _proc, std::vector& _pop, AssignmentAlgorithm & algo ) : + MpiJob( _pop, algo ), func( _proc ) { // empty diff --git a/eo/src/mpi/eompi.cpp b/eo/src/mpi/eompi.cpp index eff6bc39d..6429a31c5 100644 --- a/eo/src/mpi/eompi.cpp +++ b/eo/src/mpi/eompi.cpp @@ -1,4 +1,5 @@ # include "eompi.h" -MpiNode* MpiNodeStore::singleton; +// MpiNode* MpiNodeStore::singleton; +mpi::communicator MpiNode::_comm; diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index 9abcbb0f2..3b04441d0 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -7,6 +7,8 @@ # include namespace mpi = boost::mpi; +# include "assignmentAlgorithm.h" + # include using namespace std; // TODO TODOB comment! @@ -25,102 +27,22 @@ namespace EoMpi } } -class MpiNode; - -class MpiNodeStore +class MpiNode { public: - static void instance( MpiNode* _instance ) + static void init( int argc, char** argv ) { - singleton = _instance; + static mpi::environment env( argc, argv ); } - static MpiNode* instance() - { - return singleton; - } - - protected: - - static MpiNode* singleton; -}; - -class MpiNode -{ -protected: - mpi::environment& env; - mpi::communicator& _comm; - - int rank; - int size; - - int argc; - char** argv; - -public: - MpiNode( mpi::environment& _env, mpi::communicator& __comm ) : - env(_env), - _comm(__comm), - rank(__comm.rank()), - size(__comm.size()) - { - // empty - } - - virtual ~MpiNode() - { - // empty - } - - mpi::communicator& comm() + static mpi::communicator& comm() { return _comm; } -}; - -struct AssignmentAlgorithm -{ - virtual int get( ) = 0; - virtual void size( int s ) = 0; - virtual int size( ) = 0; - virtual void confirm( int wrkRank ) = 0; -}; - -struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm -{ - public: - virtual int get( ) - { - int assignee = -1; - if (! availableWrk.empty() ) - { - assignee = availableWrk.back(); - availableWrk.pop_back(); - } - return assignee; - } -; - void size( int s ) - { - for( int i = 1; i < s ; ++i ) - { - availableWrk.push_back( i ); - } - } - - int size() - { - return availableWrk.size(); - } - - void confirm( int rank ) - { - availableWrk.push_back( rank ); - } protected: - std::vector< int > availableWrk; + static mpi::communicator _comm; }; template< typename EOT > @@ -128,9 +50,10 @@ class MpiJob { public: - MpiJob( std::vector< EOT > & _data ) : + MpiJob( std::vector< EOT > & _data, AssignmentAlgorithm& algo ) : data( _data ), - comm( MpiNodeStore::instance()->comm() ) + comm( MpiNode::comm() ), + assignmentAlgo( algo ) { // empty } @@ -141,14 +64,14 @@ class MpiJob // worker virtual void processTask( ) = 0; - void master( AssignmentAlgorithm & assignmentAlgorithm ) + void master( ) { for( int i = 0, size = data.size(); i < size; ++i) { cout << "Beginning loop for i = " << i << endl; - int assignee = assignmentAlgorithm.get( ); + int assignee = assignmentAlgo.get( ); cout << "Assignee : " << assignee << endl; while( assignee <= 0 ) { @@ -157,8 +80,8 @@ class MpiJob int wrkRank = status.source(); cout << "Node " << wrkRank << " just terminated." << endl; handleResponse( wrkRank, assignedTasks[ wrkRank ] ); - assignmentAlgorithm.confirm( wrkRank ); - assignee = assignmentAlgorithm.get( ); + assignmentAlgo.confirm( wrkRank ); + assignee = assignmentAlgo.get( ); } cout << "Assignee found : " << assignee << endl; assignedTasks[ assignee ] = i; @@ -169,25 +92,25 @@ class MpiJob // frees all the idle workers int idle; vector idles; - while ( ( idle = assignmentAlgorithm.get( ) ) > 0 ) + while ( ( idle = assignmentAlgo.get( ) ) > 0 ) { comm.send( idle, EoMpi::Channel::Commands, EoMpi::Message::Finish ); idles.push_back( idle ); } for (int i = 0; i < idles.size(); ++i) { - assignmentAlgorithm.confirm( idles[i] ); + assignmentAlgo.confirm( idles[i] ); } // wait for all responses int wrkNb = comm.size() - 1; - while( assignmentAlgorithm.size() != wrkNb ) + while( assignmentAlgo.size() != wrkNb ) { mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); int wrkRank = status.source(); handleResponse( wrkRank, assignedTasks[ wrkRank ] ); comm.send( wrkRank, EoMpi::Channel::Commands, EoMpi::Message::Finish ); - assignmentAlgorithm.confirm( wrkRank ); + assignmentAlgo.confirm( wrkRank ); } } @@ -211,77 +134,44 @@ protected: std::vector & data; std::map< int /* worker rank */, int /* index in vector */> assignedTasks; - + AssignmentAlgorithm& assignmentAlgo; mpi::communicator& comm; }; -class MasterNode : public MpiNode -{ -public: - MasterNode( int _argc, char** _argv, - mpi::environment& _env, - mpi::communicator& _comm - ) : - MpiNode(_env, _comm ) - { - // empty - } - - void setAssignmentAlgorithm( AssignmentAlgorithm* assignmentAlgo ) - { - _assignmentAlgo = assignmentAlgo; - _assignmentAlgo->size( _comm.size() ); - } - - template< typename EOT > - void run( MpiJob< EOT > & job ) - { - job.master( *_assignmentAlgo ); - } - -protected: - AssignmentAlgorithm* _assignmentAlgo; -}; - -class WorkerNode : public MpiNode +template< class EOT > +class Role { public: - - WorkerNode( - int _argc, char** _argv, - mpi::environment& _env, - mpi::communicator& _comm ) : - MpiNode( _env, _comm ) + Role( MpiJob & job, bool master ) : + _job( job ), + _master( master ) { // empty } - template< typename EOT > - void run( MpiJob & job ) + bool master() { - job.worker( ); + return _master; } -}; -class MpiSingletonFactory -{ - public: - - static void init( int argc, char** argv ) - { - MpiNode* singleton; - //mpi::environment* env = new mpi::environment ( argc, argv ); - //mpi::communicator* world = new mpi::communicator; // TODO clean - static mpi::environment env( argc, argv ); - static mpi::communicator world; - if ( world.rank() == 0 ) + virtual void run( ) { - singleton = new MasterNode( argc, argv, env, world ); - } else - { - singleton = new WorkerNode( argc, argv, env, world ); + if( _master ) + { + _job.master( ); + } else + { + _job.worker( ); + } } - MpiNodeStore::instance( singleton ); - } + + virtual ~Role() + { + // empty + } + + protected: + bool _master; + MpiJob & _job; }; # endif // __EO_MPI_H__ diff --git a/eo/test/t-eoMpiParallelApply.cpp b/eo/test/t-eoMpiParallelApply.cpp index c20cc94fb..ab559815c 100644 --- a/eo/test/t-eoMpiParallelApply.cpp +++ b/eo/test/t-eoMpiParallelApply.cpp @@ -1,5 +1,6 @@ # include # include + # include # include @@ -15,9 +16,9 @@ struct plusOne : public eoUF< int&, void > int main(int argc, char** argv) { - DynamicAssignmentAlgorithm algo; cout << "Appel Ă  init... " << endl; - MpiSingletonFactory::init( argc, argv ); + MpiNode::init( argc, argv ); + DynamicAssignmentAlgorithm algo( 1, MpiNode::comm().size() ); cout << "CrĂ©ation des donnĂ©es... " << endl; vector v; @@ -31,8 +32,19 @@ int main(int argc, char** argv) plusOne plusOneInstance; cout << "CrĂ©ation du job..." << endl; - ParallelApply job( plusOneInstance, v ); + ParallelApply job( plusOneInstance, v, algo ); + Role node( job, MpiNode::comm().rank() == 0 ); + node.run(); + if( node.master() ) + { + for(int i = 0; i < v.size(); ++i) + { + cout << v[i] << ' '; + } + cout << endl; + } + /* cout << "CrĂ©ation de l'instance..." << endl; MpiNode* instance = MpiNodeStore::instance(); if( dynamic_cast( instance ) != 0 ) @@ -54,6 +66,7 @@ int main(int argc, char** argv) { cout << "Nothing to be done;" << endl; } + */ return 0; } From 9275fbedad695cf716d4b1c49f77e45de65eac87 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 17:20:24 +0200 Subject: [PATCH 1920/2134] Making mpi tests dir --- eo/test/{t-eoMpiParallelApply.cpp => mpi/parallelApply.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename eo/test/{t-eoMpiParallelApply.cpp => mpi/parallelApply.cpp} (100%) diff --git a/eo/test/t-eoMpiParallelApply.cpp b/eo/test/mpi/parallelApply.cpp similarity index 100% rename from eo/test/t-eoMpiParallelApply.cpp rename to eo/test/mpi/parallelApply.cpp From 2aa312e43d168f6d25cde3fe3ea1a4135d4ff55a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 17:21:13 +0200 Subject: [PATCH 1921/2134] Allowing more than one master. --- eo/src/mpi/assignmentAlgorithm.h | 2 +- eo/src/mpi/eoParallelApply.h | 15 ++++++----- eo/src/mpi/eompi.h | 46 +++++++++++++++++++++----------- 3 files changed, 40 insertions(+), 23 deletions(-) diff --git a/eo/src/mpi/assignmentAlgorithm.h b/eo/src/mpi/assignmentAlgorithm.h index bd635c23f..89b97c062 100644 --- a/eo/src/mpi/assignmentAlgorithm.h +++ b/eo/src/mpi/assignmentAlgorithm.h @@ -13,7 +13,7 @@ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm public: DynamicAssignmentAlgorithm( int offset, int size ) { - for( int i = 0; offset + i < size; ++i) + for( int i = 0; offset + i <= size; ++i) { availableWrk.push_back( offset + i ); } diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 80958e411..990f8fadb 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -10,9 +10,12 @@ template< typename EOT > class ParallelApply : public MpiJob< EOT > { public: + using MpiJob::comm; + using MpiJob::data; + using MpiJob::_masterRank; - ParallelApply( eoUF & _proc, std::vector& _pop, AssignmentAlgorithm & algo ) : - MpiJob( _pop, algo ), + ParallelApply( eoUF & _proc, std::vector& _pop, AssignmentAlgorithm & algo, int _masterRank ) : + MpiJob( _pop, algo, _masterRank ), func( _proc ) { // empty @@ -20,20 +23,20 @@ class ParallelApply : public MpiJob< EOT > virtual void sendTask( int wrkRank, int index ) { - MpiJob::comm.send( wrkRank, 1, MpiJob::data[ index ] ); + comm.send( wrkRank, 1, data[ index ] ); } virtual void handleResponse( int wrkRank, int index ) { - MpiJob::comm.recv( wrkRank, 1, MpiJob::data[ index ] ); + comm.recv( wrkRank, 1, data[ index ] ); } virtual void processTask( ) { EOT ind; - MpiJob::comm.recv( 0, 1, ind ); + comm.recv( _masterRank, 1, ind ); func( ind ); - MpiJob::comm.send( 0, 1, ind ); + comm.send( _masterRank, 1, ind ); } protected: diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index 3b04441d0..df041db5c 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -50,10 +50,11 @@ class MpiJob { public: - MpiJob( std::vector< EOT > & _data, AssignmentAlgorithm& algo ) : + MpiJob( std::vector< EOT > & _data, AssignmentAlgorithm& algo, int masterRank ) : data( _data ), comm( MpiNode::comm() ), - assignmentAlgo( algo ) + assignmentAlgo( algo ), + _masterRank( masterRank ) { // empty } @@ -66,29 +67,33 @@ class MpiJob void master( ) { + int totalWorkers = assignmentAlgo.size(); + cout << "[M] Have " << totalWorkers << " workers." << endl; + for( int i = 0, size = data.size(); i < size; ++i) { - cout << "Beginning loop for i = " << i << endl; + cout << "[M] Beginning loop for i = " << i << endl; int assignee = assignmentAlgo.get( ); - cout << "Assignee : " << assignee << endl; + cout << "[M] Assignee : " << assignee << endl; while( assignee <= 0 ) { - cout << "Waitin' for node..." << endl; + cout << "[M] Waitin' for node..." << endl; mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); int wrkRank = status.source(); - cout << "Node " << wrkRank << " just terminated." << endl; + cout << "[M] Node " << wrkRank << " just terminated." << endl; handleResponse( wrkRank, assignedTasks[ wrkRank ] ); assignmentAlgo.confirm( wrkRank ); assignee = assignmentAlgo.get( ); } - cout << "Assignee found : " << assignee << endl; + cout << "[M] Assignee found : " << assignee << endl; assignedTasks[ assignee ] = i; comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); sendTask( assignee, i ); } + cout << "[M] Frees all the idle." << endl; // frees all the idle workers int idle; vector idles; @@ -102,9 +107,9 @@ class MpiJob assignmentAlgo.confirm( idles[i] ); } + cout << "[M] Waits for all responses." << endl; // wait for all responses - int wrkNb = comm.size() - 1; - while( assignmentAlgo.size() != wrkNb ) + while( assignmentAlgo.size() != totalWorkers ) { mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); int wrkRank = status.source(); @@ -112,6 +117,8 @@ class MpiJob comm.send( wrkRank, EoMpi::Channel::Commands, EoMpi::Message::Finish ); assignmentAlgo.confirm( wrkRank ); } + + cout << "[M] Leaving master task." << endl; } void worker( ) @@ -119,34 +126,41 @@ class MpiJob int order; while( true ) { - comm.recv( 0, EoMpi::Channel::Commands, order ); + cout << "[W] Waiting for an order..." << std::endl; + comm.recv( _masterRank, EoMpi::Channel::Commands, order ); if ( order == EoMpi::Message::Finish ) { return; } else { + cout << "[W] Processing task..." << std::endl; processTask( ); } } } + int masterRank() + { + return _masterRank; + } + protected: std::vector & data; std::map< int /* worker rank */, int /* index in vector */> assignedTasks; AssignmentAlgorithm& assignmentAlgo; mpi::communicator& comm; + int _masterRank; }; template< class EOT > class Role { public: - Role( MpiJob & job, bool master ) : - _job( job ), - _master( master ) + Role( MpiJob & job ) : + _job( job ) { - // empty + _master = job.masterRank() == MpiNode::comm().rank(); } bool master() @@ -156,7 +170,7 @@ class Role virtual void run( ) { - if( _master ) + if( MpiNode::comm().rank() == _job.masterRank() ) { _job.master( ); } else @@ -171,7 +185,7 @@ class Role } protected: - bool _master; MpiJob & _job; + bool _master; }; # endif // __EO_MPI_H__ From 92bd4eec1b1d1d5731d88481c004289020702b53 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 17:22:28 +0200 Subject: [PATCH 1922/2134] Adding tests for multiple roles and updating parallel apply. --- eo/test/mpi/multipleRoles.cpp | 91 +++++++++++++++++++++++++++++++++++ eo/test/mpi/parallelApply.cpp | 6 +-- 2 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 eo/test/mpi/multipleRoles.cpp diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp new file mode 100644 index 000000000..bd91245b2 --- /dev/null +++ b/eo/test/mpi/multipleRoles.cpp @@ -0,0 +1,91 @@ +# include +# include + +# include + +# include + +# include +using namespace std; + +// Role map +// 0 : general master +// 1 : worker of general job, master of subjob +// 2 and more : workers of subjob + +struct plusOne : public eoUF< int&, void > +{ + void operator() ( int & x ) + { + cout << "Subjob is being applied." << endl; + ++x; + } +}; + +void subtask( vector& v ) +{ + DynamicAssignmentAlgorithm algo( 2, MpiNode::comm().size()-1 ); + plusOne plusOneInstance; + ParallelApply job( plusOneInstance, v, algo, 1 ); + Role node( job ); + node.run(); +} + +struct transmit : public eoUF< vector&, void > +{ + void operator() ( vector& v ) + { + cout << "Into the master subjob..." << endl; + subtask( v ); + } +}; + +int main(int argc, char** argv) +{ + MpiNode::init( argc, argv ); + vector v; + + v.push_back(1); + v.push_back(3); + v.push_back(3); + v.push_back(7); + v.push_back(42); + + transmit transmitInstance; + + vector< vector > metaV; + metaV.push_back( v ); + + switch( MpiNode::comm().rank() ) + { + case 0: + case 1: + { + // only one node is assigned to subjob mastering + DynamicAssignmentAlgorithm algo( 1, 1 ); + ParallelApply< vector > job( transmitInstance, metaV, algo, 0 ); + Role< vector > node( job ); + node.run(); + if( node.master() ) + { + v = metaV[0]; + cout << "Results : " << endl; + for(int i = 0; i < v.size(); ++i) + { + cout << v[i] << ' '; + } + cout << endl; + } + } + break; + + default: + { + // all the other nodes are sub workers + subtask( v ); + } + break; + } + + return 0; +} diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index ab559815c..82686bf74 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -18,7 +18,7 @@ int main(int argc, char** argv) { cout << "Appel Ă  init... " << endl; MpiNode::init( argc, argv ); - DynamicAssignmentAlgorithm algo( 1, MpiNode::comm().size() ); + DynamicAssignmentAlgorithm algo( 1, MpiNode::comm().size()-1 ); cout << "CrĂ©ation des donnĂ©es... " << endl; vector v; @@ -32,8 +32,8 @@ int main(int argc, char** argv) plusOne plusOneInstance; cout << "CrĂ©ation du job..." << endl; - ParallelApply job( plusOneInstance, v, algo ); - Role node( job, MpiNode::comm().rank() == 0 ); + ParallelApply job( plusOneInstance, v, algo, 0 ); + Role node( job ); node.run(); if( node.master() ) From 3c8e902155017f66366f3f58874521ab0ff9919b Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 17:23:25 +0200 Subject: [PATCH 1923/2134] Removing useless comments in parallelApply. --- eo/test/mpi/parallelApply.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 82686bf74..605f39112 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -44,29 +44,6 @@ int main(int argc, char** argv) } cout << endl; } - /* - cout << "CrĂ©ation de l'instance..." << endl; - MpiNode* instance = MpiNodeStore::instance(); - if( dynamic_cast( instance ) != 0 ) - { - cout << "[Master] Algorithme d'assignation" << endl; - static_cast( instance )->setAssignmentAlgorithm( &algo ); - cout << "[Master] Lancement." << endl; - static_cast( instance )->run( job ); - - for (int i = 0; i < v.size(); ++i ) - { - cout << v[i] << endl; - } - } else if ( dynamic_cast( instance ) != 0 ) - { - cout << "[Worker] Lancement." << endl; - static_cast( instance )->run( job ); - } else - { - cout << "Nothing to be done;" << endl; - } - */ return 0; } From 33e062d1665972eb13a94abb5c442b53ed209b52 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 17:31:07 +0200 Subject: [PATCH 1924/2134] Simplified master condition. --- eo/src/mpi/eompi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index df041db5c..cbb66a464 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -170,7 +170,7 @@ class Role virtual void run( ) { - if( MpiNode::comm().rank() == _job.masterRank() ) + if( _master ) { _job.master( ); } else From 28ab2004ea59b1a3683c5d4bde28d4ff761862d9 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 21 Jun 2012 18:26:56 +0200 Subject: [PATCH 1925/2134] MpiJob now just deal with loop logic, not with handled data. Handled data is now handled by the MpiJob subclasses. Tests updated. --- eo/src/mpi/eoParallelApply.h | 49 ++++++++++++++++++++++++------ eo/src/mpi/eompi.h | 57 ++++++++++++++++++++++++++--------- eo/test/mpi/multipleRoles.cpp | 4 +-- eo/test/mpi/parallelApply.cpp | 2 +- 4 files changed, 84 insertions(+), 28 deletions(-) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 990f8fadb..86e2b04a5 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -7,28 +7,53 @@ # include template< typename EOT > -class ParallelApply : public MpiJob< EOT > +struct ParallelApplyContinuator : public BaseContinuator +{ + ParallelApplyContinuator( int index, int size ) + { + _index = index; + _size = size; + } + + void index( int i ) { _index = i; } + + bool operator()() + { + return _index < _size; + } + +private: + int _index; + int _size; +}; + +template< typename EOT > +class ParallelApply : public MpiJob { public: - using MpiJob::comm; - using MpiJob::data; - using MpiJob::_masterRank; ParallelApply( eoUF & _proc, std::vector& _pop, AssignmentAlgorithm & algo, int _masterRank ) : - MpiJob( _pop, algo, _masterRank ), - func( _proc ) + MpiJob( algo, + new ParallelApplyContinuator( 0, _pop.size() ), + _masterRank ), + func( _proc ), + index( 0 ), + data( _pop ) { - // empty + pa_continuator = static_cast*>( _continuator ); } - virtual void sendTask( int wrkRank, int index ) + virtual void sendTask( int wrkRank ) { + assignedTasks[ wrkRank ] = index; comm.send( wrkRank, 1, data[ index ] ); + ++index; + pa_continuator->index( index ); } - virtual void handleResponse( int wrkRank, int index ) + virtual void handleResponse( int wrkRank ) { - comm.recv( wrkRank, 1, data[ index ] ); + comm.recv( wrkRank, 1, data[ assignedTasks[ wrkRank ] ] ); } virtual void processTask( ) @@ -40,7 +65,11 @@ class ParallelApply : public MpiJob< EOT > } protected: + vector & data; eoUF& func; + int index; + ParallelApplyContinuator * pa_continuator; + std::map< int /* worker rank */, int /* index in vector */> assignedTasks; }; # endif // __EO_PARALLEL_APPLY_H__ diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index cbb66a464..8bc25d313 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -45,23 +45,33 @@ class MpiNode static mpi::communicator _comm; }; -template< typename EOT > +struct BaseContinuator +{ + virtual bool operator()() = 0; +}; + +// template< typename EOT > class MpiJob { public: - MpiJob( std::vector< EOT > & _data, AssignmentAlgorithm& algo, int masterRank ) : - data( _data ), - comm( MpiNode::comm() ), + MpiJob( AssignmentAlgorithm& algo, BaseContinuator* c, int masterRank ) : assignmentAlgo( algo ), - _masterRank( masterRank ) + comm( MpiNode::comm() ), + _masterRank( masterRank ), + _continuator( c ) { // empty } + ~MpiJob() + { + delete _continuator; + } + // master - virtual void sendTask( int wrkRank, int index ) = 0; - virtual void handleResponse( int wrkRank, int index ) = 0; + virtual void sendTask( int wrkRank ) = 0; + virtual void handleResponse( int wrkRank ) = 0; // worker virtual void processTask( ) = 0; @@ -70,6 +80,25 @@ class MpiJob int totalWorkers = assignmentAlgo.size(); cout << "[M] Have " << totalWorkers << " workers." << endl; + while( (*_continuator)() ) + { + int assignee = assignmentAlgo.get( ); + cout << "[M] Assignee : " << assignee << endl; + while( assignee <= 0 ) + { + cout << "[M] Waitin' for node..." << endl; + mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); + int wrkRank = status.source(); + cout << "[M] Node " << wrkRank << " just terminated." << endl; + handleResponse( wrkRank ); + assignmentAlgo.confirm( wrkRank ); + assignee = assignmentAlgo.get( ); + } + comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); + sendTask( assignee ); + } + + /* for( int i = 0, size = data.size(); i < size; ++i) @@ -92,6 +121,7 @@ class MpiJob comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); sendTask( assignee, i ); } + */ cout << "[M] Frees all the idle." << endl; // frees all the idle workers @@ -102,7 +132,7 @@ class MpiJob comm.send( idle, EoMpi::Channel::Commands, EoMpi::Message::Finish ); idles.push_back( idle ); } - for (int i = 0; i < idles.size(); ++i) + for (unsigned int i = 0; i < idles.size(); ++i) { assignmentAlgo.confirm( idles[i] ); } @@ -113,7 +143,7 @@ class MpiJob { mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); int wrkRank = status.source(); - handleResponse( wrkRank, assignedTasks[ wrkRank ] ); + handleResponse( wrkRank ); comm.send( wrkRank, EoMpi::Channel::Commands, EoMpi::Message::Finish ); assignmentAlgo.confirm( wrkRank ); } @@ -145,19 +175,16 @@ class MpiJob } protected: - - std::vector & data; - std::map< int /* worker rank */, int /* index in vector */> assignedTasks; AssignmentAlgorithm& assignmentAlgo; + BaseContinuator* _continuator; mpi::communicator& comm; int _masterRank; }; -template< class EOT > class Role { public: - Role( MpiJob & job ) : + Role( MpiJob & job ) : _job( job ) { _master = job.masterRank() == MpiNode::comm().rank(); @@ -185,7 +212,7 @@ class Role } protected: - MpiJob & _job; + MpiJob & _job; bool _master; }; # endif // __EO_MPI_H__ diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index bd91245b2..c300fdbb1 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -27,7 +27,7 @@ void subtask( vector& v ) DynamicAssignmentAlgorithm algo( 2, MpiNode::comm().size()-1 ); plusOne plusOneInstance; ParallelApply job( plusOneInstance, v, algo, 1 ); - Role node( job ); + Role node( job ); node.run(); } @@ -64,7 +64,7 @@ int main(int argc, char** argv) // only one node is assigned to subjob mastering DynamicAssignmentAlgorithm algo( 1, 1 ); ParallelApply< vector > job( transmitInstance, metaV, algo, 0 ); - Role< vector > node( job ); + Role node( job ); node.run(); if( node.master() ) { diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 605f39112..dd11f7b3a 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) cout << "CrĂ©ation du job..." << endl; ParallelApply job( plusOneInstance, v, algo, 0 ); - Role node( job ); + Role node( job ); node.run(); if( node.master() ) From fb871382e09377870bf7d387a3bf13c116f34327 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 12:09:19 +0200 Subject: [PATCH 1926/2134] Removed useless continuator functor, replaced with a virtual method into MpiJob. --- eo/src/mpi/eoParallelApply.h | 36 ++++++++--------------------- eo/src/mpi/eompi.h | 45 ++++-------------------------------- 2 files changed, 13 insertions(+), 68 deletions(-) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 86e2b04a5..cf964521a 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -6,41 +6,19 @@ # include # include -template< typename EOT > -struct ParallelApplyContinuator : public BaseContinuator -{ - ParallelApplyContinuator( int index, int size ) - { - _index = index; - _size = size; - } - - void index( int i ) { _index = i; } - - bool operator()() - { - return _index < _size; - } - -private: - int _index; - int _size; -}; - template< typename EOT > class ParallelApply : public MpiJob { public: ParallelApply( eoUF & _proc, std::vector& _pop, AssignmentAlgorithm & algo, int _masterRank ) : - MpiJob( algo, - new ParallelApplyContinuator( 0, _pop.size() ), - _masterRank ), + MpiJob( algo, _masterRank ), func( _proc ), index( 0 ), + size( _pop.size() ), data( _pop ) { - pa_continuator = static_cast*>( _continuator ); + // empty } virtual void sendTask( int wrkRank ) @@ -48,7 +26,6 @@ class ParallelApply : public MpiJob assignedTasks[ wrkRank ] = index; comm.send( wrkRank, 1, data[ index ] ); ++index; - pa_continuator->index( index ); } virtual void handleResponse( int wrkRank ) @@ -64,11 +41,16 @@ class ParallelApply : public MpiJob comm.send( _masterRank, 1, ind ); } + bool isFinished() + { + return index = size; + } + protected: vector & data; eoUF& func; int index; - ParallelApplyContinuator * pa_continuator; + int size; std::map< int /* worker rank */, int /* index in vector */> assignedTasks; }; diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index 8bc25d313..f043c162b 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -45,31 +45,20 @@ class MpiNode static mpi::communicator _comm; }; -struct BaseContinuator -{ - virtual bool operator()() = 0; -}; - -// template< typename EOT > class MpiJob { public: - MpiJob( AssignmentAlgorithm& algo, BaseContinuator* c, int masterRank ) : + MpiJob( AssignmentAlgorithm& algo, int masterRank ) : assignmentAlgo( algo ), comm( MpiNode::comm() ), - _masterRank( masterRank ), - _continuator( c ) + _masterRank( masterRank ) { // empty } - ~MpiJob() - { - delete _continuator; - } - // master + virtual bool isFinished() = 0; virtual void sendTask( int wrkRank ) = 0; virtual void handleResponse( int wrkRank ) = 0; // worker @@ -80,7 +69,7 @@ class MpiJob int totalWorkers = assignmentAlgo.size(); cout << "[M] Have " << totalWorkers << " workers." << endl; - while( (*_continuator)() ) + while( ! isFinished() ) { int assignee = assignmentAlgo.get( ); cout << "[M] Assignee : " << assignee << endl; @@ -98,31 +87,6 @@ class MpiJob sendTask( assignee ); } - /* - for( int i = 0, size = data.size(); - i < size; - ++i) - { - cout << "[M] Beginning loop for i = " << i << endl; - int assignee = assignmentAlgo.get( ); - cout << "[M] Assignee : " << assignee << endl; - while( assignee <= 0 ) - { - cout << "[M] Waitin' for node..." << endl; - mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); - int wrkRank = status.source(); - cout << "[M] Node " << wrkRank << " just terminated." << endl; - handleResponse( wrkRank, assignedTasks[ wrkRank ] ); - assignmentAlgo.confirm( wrkRank ); - assignee = assignmentAlgo.get( ); - } - cout << "[M] Assignee found : " << assignee << endl; - assignedTasks[ assignee ] = i; - comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); - sendTask( assignee, i ); - } - */ - cout << "[M] Frees all the idle." << endl; // frees all the idle workers int idle; @@ -176,7 +140,6 @@ class MpiJob protected: AssignmentAlgorithm& assignmentAlgo; - BaseContinuator* _continuator; mpi::communicator& comm; int _masterRank; }; From da9eb9ce7b417b737722f07fdb9dbd8cbcc9e338 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 14:24:23 +0200 Subject: [PATCH 1927/2134] Merged MpiJob and Role, using eoLogger instead of cout. --- eo/src/mpi/eoParallelApply.h | 8 ++-- eo/src/mpi/eompi.h | 85 ++++++++++++----------------------- eo/test/mpi/parallelApply.cpp | 10 ++--- 3 files changed, 38 insertions(+), 65 deletions(-) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index cf964521a..0c4f1e6e4 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -36,18 +36,18 @@ class ParallelApply : public MpiJob virtual void processTask( ) { EOT ind; - comm.recv( _masterRank, 1, ind ); + comm.recv( masterRank, 1, ind ); func( ind ); - comm.send( _masterRank, 1, ind ); + comm.send( masterRank, 1, ind ); } bool isFinished() { - return index = size; + return index == size; } protected: - vector & data; + std::vector & data; eoUF& func; int index; int size; diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index f043c162b..58ddf1311 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -7,10 +7,9 @@ # include namespace mpi = boost::mpi; -# include "assignmentAlgorithm.h" +# include -# include -using namespace std; +# include "assignmentAlgorithm.h" // TODO TODOB comment! namespace EoMpi @@ -49,12 +48,12 @@ class MpiJob { public: - MpiJob( AssignmentAlgorithm& algo, int masterRank ) : - assignmentAlgo( algo ), + MpiJob( AssignmentAlgorithm& _algo, int _masterRank ) : + assignmentAlgo( _algo ), comm( MpiNode::comm() ), - _masterRank( masterRank ) + masterRank( _masterRank ) { - // empty + _isMaster = MpiNode::comm().rank() == _masterRank; } // master @@ -67,18 +66,19 @@ class MpiJob void master( ) { int totalWorkers = assignmentAlgo.size(); - cout << "[M] Have " << totalWorkers << " workers." << endl; + eo::log << eo::debug; + eo::log << "[M] Have " << totalWorkers << " workers." << std::endl; while( ! isFinished() ) { int assignee = assignmentAlgo.get( ); - cout << "[M] Assignee : " << assignee << endl; + eo::log << "[M] Assignee : " << assignee << std::endl; while( assignee <= 0 ) { - cout << "[M] Waitin' for node..." << endl; + eo::log << "[M] Waitin' for node..." << std::endl; mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); int wrkRank = status.source(); - cout << "[M] Node " << wrkRank << " just terminated." << endl; + eo::log << "[M] Node " << wrkRank << " just terminated." << std::endl; handleResponse( wrkRank ); assignmentAlgo.confirm( wrkRank ); assignee = assignmentAlgo.get( ); @@ -87,10 +87,10 @@ class MpiJob sendTask( assignee ); } - cout << "[M] Frees all the idle." << endl; + eo::log << "[M] Frees all the idle." << std::endl; // frees all the idle workers int idle; - vector idles; + std::vector idles; while ( ( idle = assignmentAlgo.get( ) ) > 0 ) { comm.send( idle, EoMpi::Channel::Commands, EoMpi::Message::Finish ); @@ -101,7 +101,7 @@ class MpiJob assignmentAlgo.confirm( idles[i] ); } - cout << "[M] Waits for all responses." << endl; + eo::log << "[M] Waits for all responses." << std::endl; // wait for all responses while( assignmentAlgo.size() != totalWorkers ) { @@ -112,70 +112,43 @@ class MpiJob assignmentAlgo.confirm( wrkRank ); } - cout << "[M] Leaving master task." << endl; + eo::log << "[M] Leaving master task." << std::endl; } void worker( ) { int order; + eo::log << eo::debug; while( true ) { - cout << "[W] Waiting for an order..." << std::endl; - comm.recv( _masterRank, EoMpi::Channel::Commands, order ); + eo::log << "[W] Waiting for an order..." << std::endl; + comm.recv( masterRank, EoMpi::Channel::Commands, order ); if ( order == EoMpi::Message::Finish ) { return; } else { - cout << "[W] Processing task..." << std::endl; + eo::log << "[W] Processing task..." << std::endl; processTask( ); } } } - int masterRank() + void run( ) { - return _masterRank; + ( _isMaster ) ? master( ) : worker( ); + } + + bool isMaster( ) + { + return _isMaster; } protected: AssignmentAlgorithm& assignmentAlgo; mpi::communicator& comm; - int _masterRank; -}; - -class Role -{ - public: - Role( MpiJob & job ) : - _job( job ) - { - _master = job.masterRank() == MpiNode::comm().rank(); - } - - bool master() - { - return _master; - } - - virtual void run( ) - { - if( _master ) - { - _job.master( ); - } else - { - _job.worker( ); - } - } - - virtual ~Role() - { - // empty - } - - protected: - MpiJob & _job; - bool _master; + int masterRank; + bool _isMaster; }; # endif // __EO_MPI_H__ + diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index dd11f7b3a..0fa65f28d 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -16,9 +16,10 @@ struct plusOne : public eoUF< int&, void > int main(int argc, char** argv) { + eo::log << eo::setlevel( eo::debug ); cout << "Appel Ă  init... " << endl; MpiNode::init( argc, argv ); - DynamicAssignmentAlgorithm algo( 1, MpiNode::comm().size()-1 ); + DynamicAssignmentAlgorithm assign( 1, MpiNode::comm().size()-1 ); cout << "CrĂ©ation des donnĂ©es... " << endl; vector v; @@ -32,11 +33,10 @@ int main(int argc, char** argv) plusOne plusOneInstance; cout << "CrĂ©ation du job..." << endl; - ParallelApply job( plusOneInstance, v, algo, 0 ); - Role node( job ); - node.run(); + ParallelApply job( plusOneInstance, v, assign, 0 ); + job.run(); - if( node.master() ) + if( job.isMaster() ) { for(int i = 0; i < v.size(); ++i) { From 5c85bbdeded5fa7ce8cedf189a6e87b155d99591 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jun 2012 15:35:16 +0200 Subject: [PATCH 1928/2134] * eoStdoutMonitor.h: warning message should be disabled --- eo/src/utils/eoStdoutMonitor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index a1979b5d7..07c5a02f6 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -46,7 +46,9 @@ public : eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) { - eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdutMonitor constructor is deprecated and will be removed in the next release" << std::endl; +#ifndef DEPRECATED_MESSAGES + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdoutMonitor constructor is deprecated and will be removed in the next release" << std::endl; +#endif // !DEPRECATED_MESSAGES } eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : From 4d2931b810f3e3d2a1eda952018f5d5a7671ddfd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jun 2012 15:35:54 +0200 Subject: [PATCH 1929/2134] * eoCtrlCContinue.h: signal c++ header file --- eo/src/eoCtrlCContinue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoCtrlCContinue.h b/eo/src/eoCtrlCContinue.h index 9bbcf9c09..e239f7367 100644 --- a/eo/src/eoCtrlCContinue.h +++ b/eo/src/eoCtrlCContinue.h @@ -30,7 +30,7 @@ #ifndef eoCtrlCContinue_h #define eoCtrlCContinue_h -#include +#include #include /** From ba45bac06c6ad0c598b4ea770f345936e72aec5c Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jun 2012 15:36:19 +0200 Subject: [PATCH 1930/2134] * make_continue_ga.cpp: typo --- eo/src/ga/make_continue_ga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/ga/make_continue_ga.cpp b/eo/src/ga/make_continue_ga.cpp index 1b25a0c85..fb4662c32 100644 --- a/eo/src/ga/make_continue_ga.cpp +++ b/eo/src/ga/make_continue_ga.cpp @@ -37,7 +37,7 @@ * * The corresponding ***INSTANCIATED DECLARATIONS*** are contained * in ga.h - * while the TEMPLATIZED code is define in make_contninue.h in the src/do dir + * while the TEMPLATIZED code is define in make_continue.h in the src/do dir * * Unlike most EO .h files, it does not (and should not) contain any code, * just declarations From afc0bb6f9ba1cc1f22db9c3f0fa4b53e9c0e1846 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jun 2012 15:37:51 +0200 Subject: [PATCH 1931/2134] + eoSignal: to handle signal with eoCheckpoint instances --- eo/src/utils/CMakeLists.txt | 1 + eo/src/utils/eoSignal.cpp | 36 ++++++++++++++ eo/src/utils/eoSignal.h | 96 +++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 eo/src/utils/eoSignal.cpp create mode 100644 eo/src/utils/eoSignal.h diff --git a/eo/src/utils/CMakeLists.txt b/eo/src/utils/CMakeLists.txt index 010c6d418..5224f6520 100644 --- a/eo/src/utils/CMakeLists.txt +++ b/eo/src/utils/CMakeLists.txt @@ -29,6 +29,7 @@ SET(EOUTILS_SOURCES pipecom.cpp eoLogger.cpp eoParallel.cpp + eoSignal.cpp ) ADD_LIBRARY(eoutils STATIC ${EOUTILS_SOURCES}) diff --git a/eo/src/utils/eoSignal.cpp b/eo/src/utils/eoSignal.cpp new file mode 100644 index 000000000..745d21bd3 --- /dev/null +++ b/eo/src/utils/eoSignal.cpp @@ -0,0 +1,36 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/** + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: http://eodev.sourceforge.net + + Autors: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + Caner.Candan@univ-angers.fr +*/ + +#include + +/** + * @addtogroup Continuators + * @{ + */ + +// --- Global variables - but don't know what else to do - MS --- +std::map< int, bool > signals_called; + +/** @} */ diff --git a/eo/src/utils/eoSignal.h b/eo/src/utils/eoSignal.h new file mode 100644 index 000000000..7eeafe3ce --- /dev/null +++ b/eo/src/utils/eoSignal.h @@ -0,0 +1,96 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/** + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: http://eodev.sourceforge.net + + Authors: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + Caner.Candan@univ-angers.fr +*/ + +#ifndef _eoSignal_h +#define _eoSignal_h + +#include +#include +#include + +#include +#include + +/** + * @addtogroup Continuators + * @{ + */ + +extern std::map< int, bool > signals_called; + +/** eoSignal inherits from eoCheckPoint including signals handling (see signal(7)) + * + * @ingroup Utilities + */ +template +class eoSignal : public eoCheckPoint +{ +public : + + eoSignal( int sig = SIGINT ) : eoCheckPoint( _dummyContinue ), _sig( sig ) + { + ::signals_called[_sig] = false; + ::signal( _sig, handler ); + } + + eoSignal( eoContinue& _cont, int sig = SIGINT ) : eoCheckPoint( _cont ), _sig( sig ) + { + ::signals_called[_sig] = false; + ::signal( _sig, handler ); + } + + bool operator()( const eoPop& _pop ) + { + bool& called = ::signals_called[_sig]; + if ( called ) + { + eo::log << eo::logging << "Signal granted…" << std::endl ; + called = false; + return this->eoCheckPoint::operator()( _pop ); + } + return true; + } + + virtual std::string className(void) const { return "eoSignal"; } + + static void handler( int sig ) + { + ::signals_called[sig] = true; + eo::log << eo::logging << "Signal wished…" << std::endl ; + } + +private: + class DummyContinue : public eoContinue + { + public: + bool operator() ( const eoPop& ) { return true; } + } _dummyContinue; + + int _sig; +}; + +/** @} */ + +#endif // !_eoSignal_h From cf5317f6144eb046dad4f50d6730e1545956832e Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 16:13:08 +0200 Subject: [PATCH 1932/2134] Static assignement algorithm --- eo/src/mpi/assignmentAlgorithm.h | 102 +++++++++++++++++++++++++++++-- eo/src/mpi/eompi.h | 23 +++---- 2 files changed, 106 insertions(+), 19 deletions(-) diff --git a/eo/src/mpi/assignmentAlgorithm.h b/eo/src/mpi/assignmentAlgorithm.h index 89b97c062..06d3ec493 100644 --- a/eo/src/mpi/assignmentAlgorithm.h +++ b/eo/src/mpi/assignmentAlgorithm.h @@ -1,21 +1,24 @@ # ifndef __ASSIGNMENT_ALGORITHM_H__ # define __ASSIGNMENT_ALGORITHM_H__ +# include + struct AssignmentAlgorithm { virtual int get( ) = 0; - virtual int size( ) = 0; + virtual int availableWorkers( ) = 0; virtual void confirm( int wrkRank ) = 0; + virtual std::vector idles( ) = 0; }; struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm { public: - DynamicAssignmentAlgorithm( int offset, int size ) + DynamicAssignmentAlgorithm( int first, int last ) { - for( int i = 0; offset + i <= size; ++i) + for( int i = first; i <= last; ++i) { - availableWrk.push_back( offset + i ); + availableWrk.push_back( i ); } } @@ -30,7 +33,7 @@ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm return assignee; } - int size() + int availableWorkers() { return availableWrk.size(); } @@ -40,10 +43,99 @@ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm availableWrk.push_back( rank ); } + std::vector idles( ) + { + return availableWrk; + } + protected: std::vector< int > availableWrk; }; +struct StaticAssignmentAlgorithm : public AssignmentAlgorithm +{ + public: + StaticAssignmentAlgorithm( int first, int last, int runs ) + { + unsigned int nbWorkers = last - first + 1; + freeWorkers = nbWorkers; + offset = first; + attributions.reserve( nbWorkers ); + busy.resize( nbWorkers, false ); + // Let be the euclidean division of runs by nbWorkers : + // runs == q * nbWorkers + r, 0 <= r < nbWorkers + // This one liner affects q requests to each worker + for (unsigned int i = 0; i < nbWorkers; attributions[i++] = runs / nbWorkers) ; + // The first line computes r and the one liner affects the remaining + // r requests to workers, in ascending order + unsigned int diff = runs - (runs / nbWorkers) * nbWorkers; + for (unsigned int i = 0; i < diff; ++attributions[i++]); + } + + int get( ) + { + int assignee = -1; + for( unsigned i = 0; i < busy.size(); ++i ) + { + if( !busy[i] && attributions[i] > 0 ) + { + busy[i] = true; + --freeWorkers; + assignee = realRank( i ); + break; + } + } + return assignee; + } + + int availableWorkers( ) + { + return freeWorkers; + } + + std::vector idles() + { + std::vector ret; + for(unsigned int i = 0; i < busy.size(); ++i) + { + if( !busy[i] ) + { + eo::log << "Idle : " << realRank(i) << + " / attributions : " << attributions[i] << std::endl; + ret.push_back( realRank(i) ); + } + } + afterIdle = true; + return ret; + } + + void confirm( int rank ) + { + int i = attributionsIndex( rank ); + --attributions[ i ]; + busy[ i ] = false; + ++freeWorkers; + } + + private: + int attributionsIndex( int rank ) + { + return rank - offset; + } + + int realRank( int index ) + { + return index + offset; + } + + std::vector attributions; + std::vector busy; + + bool afterIdle; + int runs; + int offset; + unsigned int freeWorkers; +}; # endif // __ASSIGNMENT_ALGORITHM_H__ diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index 58ddf1311..44cdbb1a5 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -65,14 +65,13 @@ class MpiJob void master( ) { - int totalWorkers = assignmentAlgo.size(); + int totalWorkers = assignmentAlgo.availableWorkers(); eo::log << eo::debug; eo::log << "[M] Have " << totalWorkers << " workers." << std::endl; while( ! isFinished() ) { int assignee = assignmentAlgo.get( ); - eo::log << "[M] Assignee : " << assignee << std::endl; while( assignee <= 0 ) { eo::log << "[M] Waitin' for node..." << std::endl; @@ -83,27 +82,22 @@ class MpiJob assignmentAlgo.confirm( wrkRank ); assignee = assignmentAlgo.get( ); } + eo::log << "[M] Assignee : " << assignee << std::endl; comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); sendTask( assignee ); } eo::log << "[M] Frees all the idle." << std::endl; // frees all the idle workers - int idle; - std::vector idles; - while ( ( idle = assignmentAlgo.get( ) ) > 0 ) + std::vector idles = assignmentAlgo.idles(); + for(unsigned int i = 0; i < idles.size(); ++i) { - comm.send( idle, EoMpi::Channel::Commands, EoMpi::Message::Finish ); - idles.push_back( idle ); - } - for (unsigned int i = 0; i < idles.size(); ++i) - { - assignmentAlgo.confirm( idles[i] ); + comm.send( idles[i], EoMpi::Channel::Commands, EoMpi::Message::Finish ); } eo::log << "[M] Waits for all responses." << std::endl; // wait for all responses - while( assignmentAlgo.size() != totalWorkers ) + while( assignmentAlgo.availableWorkers() != totalWorkers ) { mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); int wrkRank = status.source(); @@ -121,14 +115,15 @@ class MpiJob eo::log << eo::debug; while( true ) { - eo::log << "[W] Waiting for an order..." << std::endl; + eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; comm.recv( masterRank, EoMpi::Channel::Commands, order ); if ( order == EoMpi::Message::Finish ) { + eo::log << "[W" << comm.rank() << "] Leaving worker task." << std::endl; return; } else { - eo::log << "[W] Processing task..." << std::endl; + eo::log << "[W" << comm.rank() << "] Processing task..." << std::endl; processTask( ); } } From aec5236eb1069b7091e6b684113a3452f1425008 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 16:14:27 +0200 Subject: [PATCH 1933/2134] Updated tests: multipleRoles compiles again and parallelApply tries all kinds of assignments algorithms. --- eo/test/mpi/multipleRoles.cpp | 10 +++--- eo/test/mpi/parallelApply.cpp | 58 ++++++++++++++++++++++++++--------- 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index c300fdbb1..a45dec420 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -27,8 +27,7 @@ void subtask( vector& v ) DynamicAssignmentAlgorithm algo( 2, MpiNode::comm().size()-1 ); plusOne plusOneInstance; ParallelApply job( plusOneInstance, v, algo, 1 ); - Role node( job ); - node.run(); + job.run(); } struct transmit : public eoUF< vector&, void > @@ -37,7 +36,7 @@ struct transmit : public eoUF< vector&, void > { cout << "Into the master subjob..." << endl; subtask( v ); - } + } }; int main(int argc, char** argv) @@ -64,9 +63,8 @@ int main(int argc, char** argv) // only one node is assigned to subjob mastering DynamicAssignmentAlgorithm algo( 1, 1 ); ParallelApply< vector > job( transmitInstance, metaV, algo, 0 ); - Role node( job ); - node.run(); - if( node.master() ) + job.run(); + if( job.isMaster() ) { v = metaV[0]; cout << "Results : " << endl; diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 0fa65f28d..278ffd063 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -14,16 +14,18 @@ struct plusOne : public eoUF< int&, void > } }; +struct Test +{ + AssignmentAlgorithm * assign; + string description; +}; + int main(int argc, char** argv) { - eo::log << eo::setlevel( eo::debug ); - cout << "Appel Ă  init... " << endl; + // eo::log << eo::setlevel( eo::debug ); MpiNode::init( argc, argv ); - DynamicAssignmentAlgorithm assign( 1, MpiNode::comm().size()-1 ); - cout << "CrĂ©ation des donnĂ©es... " << endl; vector v; - v.push_back(1); v.push_back(3); v.push_back(3); @@ -32,18 +34,44 @@ int main(int argc, char** argv) plusOne plusOneInstance; - cout << "CrĂ©ation du job..." << endl; - ParallelApply job( plusOneInstance, v, assign, 0 ); - job.run(); + vector< Test > tests; - if( job.isMaster() ) + Test tStatic; + tStatic.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size() ); + tStatic.description = "Correct static assignment."; + tests.push_back( tStatic ); + + Test tStaticOverload; + tStaticOverload.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size()+100 ); + tStaticOverload.description = "Static assignment with too many runs."; + tests.push_back( tStaticOverload ); + + Test tDynamic; + tDynamic.assign = new DynamicAssignmentAlgorithm( 1, MpiNode::comm().size()-1 ); + tDynamic.description = "Dynamic assignment."; + tests.push_back( tDynamic ); + + for( unsigned int i = 0; i < tests.size(); ++i ) { - for(int i = 0; i < v.size(); ++i) - { - cout << v[i] << ' '; - } - cout << endl; - } + ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0 ); + if( job.isMaster() ) + { + cout << "Test : " << tests[i].description << endl; + } + + job.run(); + + if( job.isMaster() ) + { + for(int i = 0; i < v.size(); ++i) + { + cout << v[i] << ' '; + } + cout << endl; + } + + delete tests[i].assign; + } return 0; } From 48a90633127584bf6c5df5f44c8a299c58a9b3e3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jun 2012 16:55:40 +0200 Subject: [PATCH 1934/2134] * make_checkpoint.h: too much empty lines removed --- eo/src/do/make_checkpoint.h | 571 ++++++++++-------------------------- 1 file changed, 157 insertions(+), 414 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 7958ed5b0..74145d844 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -1,45 +1,32 @@ // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - - //----------------------------------------------------------------------------- - // make_checkpoint.h - // (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 - /* - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact: todos@geneura.ugr.es, http://geneura.ugr.es - - Marc.Schoenauer@polytechnique.fr - - mkeijzer@dhi.dk - - */ + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk +*/ //----------------------------------------------------------------------------- - - #ifndef _make_checkpoint_h - #define _make_checkpoint_h - #ifdef HAVE_CONFIG_H #include #endif @@ -52,521 +39,277 @@ #include #include - - // at the moment, in utils/make_help.cpp - // this should become some eoUtils.cpp with corresponding eoUtils.h - bool testDirRes(std::string _dirName, bool _erase); - /////////////////// The checkpoint and other I/O ////////////// - - - /** * * CHANGE (March 2008): now receiving an eoValueParam instead of an eoEvalFuncCounter. This function is just interested * in the value of the parameter calculated on the evaluation function, not in the actual function itself!! * * @ingroup Builders -*/ + */ template eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValueParam& _eval, eoContinue& _continue) { + // first, create a checkpoint from the eoContinue + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); - // first, create a checkpoint from the eoContinue - eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + _state.storeFunctor(checkpoint); - _state.storeFunctor(checkpoint); + /////////////////// + // Counters + ////////////////// + // is nb Eval to be used as counter? + eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); + eoValueParam& useTimeParam = _parser.createParam(true, "useTime", "Display time (s) every generation", '\0', "Output"); + // if we want the time, we need an eoTimeCounter + eoTimeCounter * tCounter = NULL; + // Create anyway a generation-counter + // Recent change (03/2002): it is now an eoIncrementorParam, both + // a parameter AND updater so you can store it into the eoState + eoIncrementorParam *generationCounter = new eoIncrementorParam("Gen."); - /////////////////// - - // Counters - - ////////////////// - - // is nb Eval to be used as counter? - - eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); - - eoValueParam& useTimeParam = _parser.createParam(true, "useTime", "Display time (s) every generation", '\0', "Output"); - - - - // if we want the time, we need an eoTimeCounter - - eoTimeCounter * tCounter = NULL; - - - - // Create anyway a generation-counter - - // Recent change (03/2002): it is now an eoIncrementorParam, both - - // a parameter AND updater so you can store it into the eoState - - eoIncrementorParam *generationCounter = new eoIncrementorParam("Gen."); - - // store it in the state - - _state.storeFunctor(generationCounter); - - // And add it to the checkpoint, - - checkpoint->add(*generationCounter); - + // store it in the state + _state.storeFunctor(generationCounter); + // And add it to the checkpoint, + checkpoint->add(*generationCounter); // dir for DISK output - eoValueParam& dirNameParam = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); // shoudl we empty it if exists - eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); bool dirOK = false; // not tested yet - - ///////////////////////////////////////// - // now some statistics on the population: - ///////////////////////////////////////// /** - * existing stats as of today, April 10. 2001 - * - * eoBestFitnessStat : best value in pop - type EOT::Fitness - * eoAverageStat : average value in pop - type EOT::Fitness - * eoSecondMomentStat: average + stdev - type std::pair - * eoSortedPopStat : whole population - type std::string (!!) - * eoScalarFitnessStat: the fitnesses - type std::vector - */ - - // Best fitness in population - //--------------------------- - eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); - eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output - Graphical"); - eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); - - eoBestFitnessStat *bestStat = NULL; - if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) - - // we need the bestStat for at least one of the 3 above - - { - - bestStat = new eoBestFitnessStat; - - // store it - - _state.storeFunctor(bestStat); - - // add it to the checkpoint - - checkpoint->add(*bestStat); - - } - - + // we need the bestStat for at least one of the 3 above + { + bestStat = new eoBestFitnessStat; + // store it + _state.storeFunctor(bestStat); + // add it to the checkpoint + checkpoint->add(*bestStat); + } // Average fitness alone - //---------------------- - eoAverageStat *averageStat = NULL; // do we need averageStat? - if ( plotBestParam.value() ) // we need it for gnuplot output - - { - - averageStat = new eoAverageStat; - - // store it - - _state.storeFunctor(averageStat); - - // add it to the checkpoint - - checkpoint->add(*averageStat); - - } - - + { + averageStat = new eoAverageStat; + // store it + _state.storeFunctor(averageStat); + // add it to the checkpoint + checkpoint->add(*averageStat); + } // Second moment stats: average and stdev - //--------------------------------------- - eoSecondMomentStats *secondStat = NULL; - - if ( printBestParam.value() || fileBestParam.value() ) // we need it for screen output or file output - - { - - secondStat = new eoSecondMomentStats; - - // store it - - _state.storeFunctor(secondStat); - - // add it to the checkpoint - - checkpoint->add(*secondStat); - - } - - - - + if ( printBestParam.value() || fileBestParam.value() ) // we need it for screen output or file output + { + secondStat = new eoSecondMomentStats; + // store it + _state.storeFunctor(secondStat); + // add it to the checkpoint + checkpoint->add(*secondStat); + } // Dump of the whole population - //----------------------------- - eoSortedPopStat *popStat = NULL; - eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); if ( printPopParam.value() ) // we do want pop dump - - { - - popStat = new eoSortedPopStat; - - // store it - - _state.storeFunctor(popStat); - - // add it to the checkpoint - - checkpoint->add(*popStat); - - } - - - - + { + popStat = new eoSortedPopStat; + // store it + _state.storeFunctor(popStat); + // add it to the checkpoint + checkpoint->add(*popStat); + } // do we wnat some histogram of fitnesses snpashots? - eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); - - /////////////// - // The monitors - /////////////// // do we want an eoStdoutMonitor? - bool needStdoutMonitor = printBestParam.value() - || printPopParam.value() ; - - // The Stdout monitor will print parameters to the screen ... - if ( needStdoutMonitor ) + { + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); - { + // when called by the checkpoint (i.e. at every generation) + checkpoint->add(*monitor); - eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + // the monitor will output a series of parameters: add them + monitor->add(*generationCounter); - _state.storeFunctor(monitor); - - - - // when called by the checkpoint (i.e. at every generation) - - checkpoint->add(*monitor); - - - - // the monitor will output a series of parameters: add them - - monitor->add(*generationCounter); - - if (useEvalParam.value()) // we want nb of evaluations - - monitor->add(_eval); - - if (useTimeParam.value()) // we want time - - { - - tCounter = new eoTimeCounter; - - _state.storeFunctor(tCounter); - - checkpoint->add(*tCounter); - - monitor->add(*tCounter); - - } - - if (printBestParam.value()) - - { - - monitor->add(*bestStat); - - monitor->add(*secondStat); - - } - - if ( printPopParam.value()) - - monitor->add(*popStat); - - } + if (useEvalParam.value()) // we want nb of evaluations + monitor->add(_eval); + if (useTimeParam.value()) // we want time + { + tCounter = new eoTimeCounter; + _state.storeFunctor(tCounter); + checkpoint->add(*tCounter); + monitor->add(*tCounter); + } + if (printBestParam.value()) + { + monitor->add(*bestStat); + monitor->add(*secondStat); + } + if ( printPopParam.value()) + monitor->add(*popStat); + } // first handle the dir test - if we need at least one file - if ( ( fileBestParam.value() || plotBestParam.value() || - plotHistogramParam.value() ) - && !dirOK ) // just in case we add something before - - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE - - + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE if (fileBestParam.value()) // A file monitor for best & secondMoment - - { - + { #ifdef _MSVC - - std::string stmp = dirNameParam.value() + "\best.xg"; - + std::string stmp = dirNameParam.value() + "\best.xg"; #else - - std::string stmp = dirNameParam.value() + "/best.xg"; - + std::string stmp = dirNameParam.value() + "/best.xg"; #endif - - eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); - - // save and give to checkpoint - - _state.storeFunctor(fileMonitor); - - checkpoint->add(*fileMonitor); - - // and feed with some statistics - - fileMonitor->add(*generationCounter); - - fileMonitor->add(_eval); - - if (tCounter) // we want the time as well - - { - - // std::cout << "On met timecounter\n"; - - fileMonitor->add(*tCounter); - - } - - fileMonitor->add(*bestStat); - - fileMonitor->add(*secondStat); - - } - - + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); + // save and give to checkpoint + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + // and feed with some statistics + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + if (tCounter) // we want the time as well + { + // std::cout << "On met timecounter\n"; + fileMonitor->add(*tCounter); + } + fileMonitor->add(*bestStat); + fileMonitor->add(*secondStat); + } #if defined(HAVE_GNUPLOT) - if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average - - { - - std::string stmp = dirNameParam.value() + "/gnu_best.xg"; - - eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); - - // save and give to checkpoint - - _state.storeFunctor(gnuMonitor); - - checkpoint->add(*gnuMonitor); - - // and feed with some statistics - - if (useEvalParam.value()) // do we want eval as X coordinate - - gnuMonitor->add(_eval); - - else if (tCounter) // or time? - - gnuMonitor->add(*tCounter); - - else // default: generation - - gnuMonitor->add(*generationCounter); - - gnuMonitor->add(*bestStat); - - gnuMonitor->add(*averageStat); - - } - - + { + std::string stmp = dirNameParam.value() + "/gnu_best.xg"; + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); + // save and give to checkpoint + _state.storeFunctor(gnuMonitor); + checkpoint->add(*gnuMonitor); + // and feed with some statistics + if (useEvalParam.value()) // do we want eval as X coordinate + gnuMonitor->add(_eval); + else if (tCounter) // or time? + gnuMonitor->add(*tCounter); + else // default: generation + gnuMonitor->add(*generationCounter); + gnuMonitor->add(*bestStat); + gnuMonitor->add(*averageStat); + } // historgram? - if (plotHistogramParam.value()) // want to see how the fitness is spread? - - { - - eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; - - _state.storeFunctor(fitStat); - - checkpoint->add(*fitStat); - - // a gnuplot-based monitor for snapshots: needs a dir name - - eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); - - _state.storeFunctor(fitSnapshot); - - // add any stat that is a std::vector to it - - fitSnapshot->add(*fitStat); - - // and of course add it to the checkpoint - - checkpoint->add(*fitSnapshot); - - } + { + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); + _state.storeFunctor(fitSnapshot); + // add any stat that is a std::vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + } #endif ////////////////////////////////// - // State savers - ////////////////////////////// - - // feed the state to state savers - // save state every N generation - eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); - - if (_parser.isItThere(saveFrequencyParam)) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE - { - - // first make sure dirName is OK - - if (! dirOK ) - - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE - - - - unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); - + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); #ifdef _MSVC - - std::string stmp = dirNameParam.value() + "\generations"; - + std::string stmp = dirNameParam.value() + "\generations"; #else - - std::string stmp = dirNameParam.value() + "/generations"; - + std::string stmp = dirNameParam.value() + "/generations"; #endif - - eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); - - _state.storeFunctor(stateSaver1); - - checkpoint->add(*stateSaver1); - - } - - + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } // save state every T seconds - eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); - if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) - - { - - // first make sure dirName is OK - - if (! dirOK ) - - dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE - - + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE #ifdef _MSVC - - std::string stmp = dirNameParam.value() + "\time"; - + std::string stmp = dirNameParam.value() + "\time"; #else - - std::string stmp = dirNameParam.value() + "/time"; - + std::string stmp = dirNameParam.value() + "/time"; #endif - - eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); - - _state.storeFunctor(stateSaver2); - - checkpoint->add(*stateSaver2); - - } - - + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); + _state.storeFunctor(stateSaver2); + checkpoint->add(*stateSaver2); + } // and that's it for the (control and) output - return *checkpoint; - } - - #endif From 5bfcf4cd2c727b583dca36375b5866a130fc9b1d Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 17:28:31 +0200 Subject: [PATCH 1935/2134] Moving MpiNode into MpiNode.h --- eo/src/mpi/MpiNode.h | 25 +++++++++++++++++++++++++ eo/src/mpi/eompi.h | 24 +----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 eo/src/mpi/MpiNode.h diff --git a/eo/src/mpi/MpiNode.h b/eo/src/mpi/MpiNode.h new file mode 100644 index 000000000..10804ce01 --- /dev/null +++ b/eo/src/mpi/MpiNode.h @@ -0,0 +1,25 @@ +# ifndef __MPI_NODE_H__ +# define __MPI_NODE_H__ + +# include +namespace mpi = boost::mpi; + +class MpiNode +{ + public: + + static void init( int argc, char** argv ) + { + static mpi::environment env( argc, argv ); + } + + static mpi::communicator& comm() + { + return _comm; + } + + protected: + static mpi::communicator _comm; +}; + +# endif // __MPI_NODE_H__ diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h index 44cdbb1a5..3b51e7a3a 100644 --- a/eo/src/mpi/eompi.h +++ b/eo/src/mpi/eompi.h @@ -3,12 +3,9 @@ # include # include - -# include -namespace mpi = boost::mpi; - # include +# include "MpiNode.h" # include "assignmentAlgorithm.h" // TODO TODOB comment! @@ -25,25 +22,6 @@ namespace EoMpi const int Finish = 1; } } - -class MpiNode -{ - public: - - static void init( int argc, char** argv ) - { - static mpi::environment env( argc, argv ); - } - - static mpi::communicator& comm() - { - return _comm; - } - - protected: - static mpi::communicator _comm; -}; - class MpiJob { public: From f3cb5eec20229df974865bcccd0dd004d613961b Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 17:31:46 +0200 Subject: [PATCH 1936/2134] More constructors for assignment algorithms: by interval, by unique worker, by vector of ranks, or whole world. --- eo/src/mpi/assignmentAlgorithm.h | 93 ++++++++++++++++++++++++-------- eo/test/mpi/multipleRoles.cpp | 2 +- eo/test/mpi/parallelApply.cpp | 80 +++++++++++++++++++++++---- 3 files changed, 142 insertions(+), 33 deletions(-) diff --git a/eo/src/mpi/assignmentAlgorithm.h b/eo/src/mpi/assignmentAlgorithm.h index 06d3ec493..58fc09c0e 100644 --- a/eo/src/mpi/assignmentAlgorithm.h +++ b/eo/src/mpi/assignmentAlgorithm.h @@ -2,7 +2,7 @@ # define __ASSIGNMENT_ALGORITHM_H__ # include - +# include "MpiNode.h" struct AssignmentAlgorithm { virtual int get( ) = 0; @@ -14,6 +14,25 @@ struct AssignmentAlgorithm struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm { public: + + DynamicAssignmentAlgorithm( ) + { + for(int i = 1; i < MpiNode::comm().size(); ++i) + { + availableWrk.push_back( i ); + } + } + + DynamicAssignmentAlgorithm( int unique ) + { + availableWrk.push_back( unique ); + } + + DynamicAssignmentAlgorithm( const std::vector & workers ) + { + availableWrk = workers; + } + DynamicAssignmentAlgorithm( int first, int last ) { for( int i = first; i <= last; ++i) @@ -55,11 +74,43 @@ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm struct StaticAssignmentAlgorithm : public AssignmentAlgorithm { public: + StaticAssignmentAlgorithm( std::vector& workers, int runs ) + { + init( workers, runs ); + } + StaticAssignmentAlgorithm( int first, int last, int runs ) { - unsigned int nbWorkers = last - first + 1; + std::vector workers; + for(int i = first; i <= last; ++i) + { + workers.push_back( i ); + } + init( workers, runs ); + } + + StaticAssignmentAlgorithm( int runs ) + { + std::vector workers; + for(int i = 1; i < MpiNode::comm().size(); ++i) + { + workers.push_back( i ); + } + init( workers, runs ); + } + + StaticAssignmentAlgorithm( int unique, int runs ) + { + std::vector workers; + workers.push_back( unique ); + init( workers, runs ); + } + +private: + void init( std::vector & workers, int runs ) + { + unsigned int nbWorkers = workers.size(); freeWorkers = nbWorkers; - offset = first; attributions.reserve( nbWorkers ); busy.resize( nbWorkers, false ); @@ -71,8 +122,11 @@ struct StaticAssignmentAlgorithm : public AssignmentAlgorithm // r requests to workers, in ascending order unsigned int diff = runs - (runs / nbWorkers) * nbWorkers; for (unsigned int i = 0; i < diff; ++attributions[i++]); + + realRank = workers; } +public: int get( ) { int assignee = -1; @@ -82,7 +136,7 @@ struct StaticAssignmentAlgorithm : public AssignmentAlgorithm { busy[i] = true; --freeWorkers; - assignee = realRank( i ); + assignee = realRank[ i ]; break; } } @@ -101,40 +155,35 @@ struct StaticAssignmentAlgorithm : public AssignmentAlgorithm { if( !busy[i] ) { - eo::log << "Idle : " << realRank(i) << + eo::log << "Idle : " << realRank[i] << " / attributions : " << attributions[i] << std::endl; - ret.push_back( realRank(i) ); + ret.push_back( realRank[i] ); } } - afterIdle = true; return ret; } void confirm( int rank ) { - int i = attributionsIndex( rank ); + int i = -1; + for( int j = 0; j < realRank.size(); ++j ) + { + if( realRank[j] == rank ) + { + i = j; + break; + } + } + --attributions[ i ]; busy[ i ] = false; ++freeWorkers; } private: - int attributionsIndex( int rank ) - { - return rank - offset; - } - - int realRank( int index ) - { - return index + offset; - } - std::vector attributions; + std::vector realRank; std::vector busy; - - bool afterIdle; - int runs; - int offset; unsigned int freeWorkers; }; diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index a45dec420..a374def50 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -61,7 +61,7 @@ int main(int argc, char** argv) case 1: { // only one node is assigned to subjob mastering - DynamicAssignmentAlgorithm algo( 1, 1 ); + DynamicAssignmentAlgorithm algo( 1 ); ParallelApply< vector > job( transmitInstance, metaV, algo, 0 ); job.run(); if( job.isMaster() ) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 278ffd063..3fd77dc1e 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -18,8 +18,10 @@ struct Test { AssignmentAlgorithm * assign; string description; + int requiredNodesNumber; // nb : chosen nodes ranks must be sequential }; +// These tests require at least 3 processes to be launched. int main(int argc, char** argv) { // eo::log << eo::setlevel( eo::debug ); @@ -32,24 +34,71 @@ int main(int argc, char** argv) v.push_back(7); v.push_back(42); + int offset = 0; + vector originalV = v; + plusOne plusOneInstance; vector< Test > tests; + + const int ALL = MpiNode::comm().size(); - Test tStatic; - tStatic.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size() ); - tStatic.description = "Correct static assignment."; - tests.push_back( tStatic ); + Test tIntervalStatic; + tIntervalStatic.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size() ); + tIntervalStatic.description = "Correct static assignment with interval."; + tIntervalStatic.requiredNodesNumber = ALL; + tests.push_back( tIntervalStatic ); + + Test tWorldStatic; + tWorldStatic.assign = new StaticAssignmentAlgorithm( v.size() ); + tWorldStatic.description = "Correct static assignment with whole world as workers."; + tWorldStatic.requiredNodesNumber = ALL; + tests.push_back( tWorldStatic ); Test tStaticOverload; - tStaticOverload.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size()+100 ); + tStaticOverload.assign = new StaticAssignmentAlgorithm( v.size()+100 ); tStaticOverload.description = "Static assignment with too many runs."; + tStaticOverload.requiredNodesNumber = ALL; tests.push_back( tStaticOverload ); - Test tDynamic; - tDynamic.assign = new DynamicAssignmentAlgorithm( 1, MpiNode::comm().size()-1 ); - tDynamic.description = "Dynamic assignment."; - tests.push_back( tDynamic ); + Test tUniqueStatic; + tUniqueStatic.assign = new StaticAssignmentAlgorithm( 1, v.size() ); + tUniqueStatic.description = "Correct static assignment with unique worker."; + tUniqueStatic.requiredNodesNumber = 2; + tests.push_back( tUniqueStatic ); + + Test tVectorStatic; + vector workers; + workers.push_back( 1 ); + workers.push_back( 2 ); + tVectorStatic.assign = new StaticAssignmentAlgorithm( workers, v.size() ); + tVectorStatic.description = "Correct static assignment with precise workers specified."; + tVectorStatic.requiredNodesNumber = 3; + tests.push_back( tVectorStatic ); + + Test tIntervalDynamic; + tIntervalDynamic.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size() ); + tIntervalDynamic.description = "Correct static assignment with interval."; + tIntervalDynamic.requiredNodesNumber = ALL; + tests.push_back( tIntervalDynamic ); + + Test tUniqueDynamic; + tUniqueDynamic.assign = new StaticAssignmentAlgorithm( 1, v.size() ); + tUniqueDynamic.description = "Correct static assignment with unique worker."; + tUniqueDynamic.requiredNodesNumber = 2; + tests.push_back( tUniqueDynamic ); + + Test tVectorDynamic; + tVectorDynamic.assign = new StaticAssignmentAlgorithm( workers, v.size() ); + tVectorDynamic.description = "Correct static assignment with precise workers specified."; + tVectorDynamic.requiredNodesNumber = tVectorStatic.requiredNodesNumber; + tests.push_back( tVectorDynamic ); + + Test tWorldDynamic; + tWorldDynamic.assign = new StaticAssignmentAlgorithm( v.size() ); + tWorldDynamic.description = "Correct static assignment with whole world as workers."; + tWorldDynamic.requiredNodesNumber = ALL; + tests.push_back( tWorldDynamic ); for( unsigned int i = 0; i < tests.size(); ++i ) { @@ -60,17 +109,28 @@ int main(int argc, char** argv) cout << "Test : " << tests[i].description << endl; } - job.run(); + if( MpiNode::comm().rank() < tests[i].requiredNodesNumber ) + { + job.run(); + } if( job.isMaster() ) { + ++offset; for(int i = 0; i < v.size(); ++i) { cout << v[i] << ' '; + if( originalV[i] + offset != v[i] ) + { + cout << " <-- ERROR at this point." << endl; + exit( EXIT_FAILURE ); + } } cout << endl; } + MpiNode::comm().barrier(); + delete tests[i].assign; } return 0; From ac13550faa7511e874c57acd83963620b130cef6 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 17:40:00 +0200 Subject: [PATCH 1937/2134] REST_OF_THE_WORLD constant in assignmentAlgorithm. --- eo/src/mpi/assignmentAlgorithm.h | 17 +++++++++++++++++ eo/test/mpi/multipleRoles.cpp | 2 +- eo/test/mpi/parallelApply.cpp | 12 ++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/eo/src/mpi/assignmentAlgorithm.h b/eo/src/mpi/assignmentAlgorithm.h index 58fc09c0e..a27e8289a 100644 --- a/eo/src/mpi/assignmentAlgorithm.h +++ b/eo/src/mpi/assignmentAlgorithm.h @@ -3,6 +3,12 @@ # include # include "MpiNode.h" + +namespace eo +{ + const int REST_OF_THE_WORLD = -1; +} + struct AssignmentAlgorithm { virtual int get( ) = 0; @@ -35,6 +41,11 @@ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm DynamicAssignmentAlgorithm( int first, int last ) { + if( last == eo::REST_OF_THE_WORLD ) + { + last = MpiNode::comm().size() - 1; + } + for( int i = first; i <= last; ++i) { availableWrk.push_back( i ); @@ -82,6 +93,12 @@ struct StaticAssignmentAlgorithm : public AssignmentAlgorithm StaticAssignmentAlgorithm( int first, int last, int runs ) { std::vector workers; + + if( last == eo::REST_OF_THE_WORLD ) + { + last = MpiNode::comm().size() - 1; + } + for(int i = first; i <= last; ++i) { workers.push_back( i ); diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index a374def50..6fa930d1d 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -24,7 +24,7 @@ struct plusOne : public eoUF< int&, void > void subtask( vector& v ) { - DynamicAssignmentAlgorithm algo( 2, MpiNode::comm().size()-1 ); + DynamicAssignmentAlgorithm algo( 2, eo::REST_OF_THE_WORLD ); plusOne plusOneInstance; ParallelApply job( plusOneInstance, v, algo, 1 ); job.run(); diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 3fd77dc1e..5a6b64f2c 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -44,7 +44,7 @@ int main(int argc, char** argv) const int ALL = MpiNode::comm().size(); Test tIntervalStatic; - tIntervalStatic.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size() ); + tIntervalStatic.assign = new StaticAssignmentAlgorithm( 1, eo::REST_OF_THE_WORLD, v.size() ); tIntervalStatic.description = "Correct static assignment with interval."; tIntervalStatic.requiredNodesNumber = ALL; tests.push_back( tIntervalStatic ); @@ -77,26 +77,26 @@ int main(int argc, char** argv) tests.push_back( tVectorStatic ); Test tIntervalDynamic; - tIntervalDynamic.assign = new StaticAssignmentAlgorithm( 1, MpiNode::comm().size()-1, v.size() ); - tIntervalDynamic.description = "Correct static assignment with interval."; + tIntervalDynamic.assign = new StaticAssignmentAlgorithm( 1, eo::REST_OF_THE_WORLD, v.size() ); + tIntervalDynamic.description = "Dynamic assignment with interval."; tIntervalDynamic.requiredNodesNumber = ALL; tests.push_back( tIntervalDynamic ); Test tUniqueDynamic; tUniqueDynamic.assign = new StaticAssignmentAlgorithm( 1, v.size() ); - tUniqueDynamic.description = "Correct static assignment with unique worker."; + tUniqueDynamic.description = "Dynamic assignment with unique worker."; tUniqueDynamic.requiredNodesNumber = 2; tests.push_back( tUniqueDynamic ); Test tVectorDynamic; tVectorDynamic.assign = new StaticAssignmentAlgorithm( workers, v.size() ); - tVectorDynamic.description = "Correct static assignment with precise workers specified."; + tVectorDynamic.description = "Dynamic assignment with precise workers specified."; tVectorDynamic.requiredNodesNumber = tVectorStatic.requiredNodesNumber; tests.push_back( tVectorDynamic ); Test tWorldDynamic; tWorldDynamic.assign = new StaticAssignmentAlgorithm( v.size() ); - tWorldDynamic.description = "Correct static assignment with whole world as workers."; + tWorldDynamic.description = "Dynamic assignment with whole world as workers."; tWorldDynamic.requiredNodesNumber = ALL; tests.push_back( tWorldDynamic ); From 46b3f77d9c8687bcf016fd91c45514a55763fd96 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Fri, 22 Jun 2012 17:41:46 +0200 Subject: [PATCH 1938/2134] * make_checkpoint.h: added --monitor_with_CtrlC option in order to monitor only when Ctrl-C is pressed --- eo/src/do/make_checkpoint.h | 44 ++++++++++++++++++++++++++++++++++--- eo/src/utils/checkpointing | 1 + eo/src/utils/eoSignal.h | 10 +++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 74145d844..8e5295115 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -59,6 +59,24 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu _state.storeFunctor(checkpoint); + //////////////////// + // Signal monitoring + //////////////////// + +#ifndef _MSC_VER + // the CtrlC monitoring interception + eoSignal *mon_ctrlCCont; + eoValueParam& mon_ctrlCParam = _parser.createParam(false, "monitor-with-CtrlC", "Monitor current generation upon Ctrl C",0, "Stopping criterion"); + if (mon_ctrlCParam.value()) + { + mon_ctrlCCont = new eoSignal; + // store + _state.storeFunctor(mon_ctrlCCont); + // add to checkpoint + checkpoint->add(*mon_ctrlCCont); + } +#endif + /////////////////// // Counters ////////////////// @@ -117,18 +135,24 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu _state.storeFunctor(bestStat); // add it to the checkpoint checkpoint->add(*bestStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*bestStat); } // Average fitness alone //---------------------- eoAverageStat *averageStat = NULL; // do we need averageStat? - if ( plotBestParam.value() ) // we need it for gnuplot output + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) // we need it for gnuplot output { averageStat = new eoAverageStat; // store it _state.storeFunctor(averageStat); // add it to the checkpoint checkpoint->add(*averageStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*averageStat); } // Second moment stats: average and stdev @@ -141,6 +165,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu _state.storeFunctor(secondStat); // add it to the checkpoint checkpoint->add(*secondStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*secondStat); } // Dump of the whole population @@ -155,6 +182,9 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu _state.storeFunctor(popStat); // add it to the checkpoint checkpoint->add(*popStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*popStat); } // do we wnat some histogram of fitnesses snpashots? @@ -175,7 +205,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu _state.storeFunctor(monitor); // when called by the checkpoint (i.e. at every generation) - checkpoint->add(*monitor); + // check if monitoring with signal + if ( ! mon_ctrlCParam.value() ) + checkpoint->add(*monitor); + else + mon_ctrlCCont->add(*monitor); // the monitor will output a series of parameters: add them monitor->add(*generationCounter); @@ -186,7 +220,11 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu { tCounter = new eoTimeCounter; _state.storeFunctor(tCounter); - checkpoint->add(*tCounter); + // check if monitoring with signal + if ( ! mon_ctrlCParam.value() ) + checkpoint->add(*tCounter); + else + mon_ctrlCCont->add(*tCounter); monitor->add(*tCounter); } diff --git a/eo/src/utils/checkpointing b/eo/src/utils/checkpointing index 7e3c34a68..f7fd0e55b 100644 --- a/eo/src/utils/checkpointing +++ b/eo/src/utils/checkpointing @@ -36,6 +36,7 @@ #include #endif #include +#include #include #include #include diff --git a/eo/src/utils/eoSignal.h b/eo/src/utils/eoSignal.h index 7eeafe3ce..9a89cb196 100644 --- a/eo/src/utils/eoSignal.h +++ b/eo/src/utils/eoSignal.h @@ -52,13 +52,23 @@ public : eoSignal( int sig = SIGINT ) : eoCheckPoint( _dummyContinue ), _sig( sig ) { ::signals_called[_sig] = false; + +#ifndef _WINDOWS +#ifdef SIGQUIT ::signal( _sig, handler ); +#endif // !SIGQUIT +#endif // !_WINDOWS } eoSignal( eoContinue& _cont, int sig = SIGINT ) : eoCheckPoint( _cont ), _sig( sig ) { ::signals_called[_sig] = false; + +#ifndef _WINDOWS +#ifdef SIGQUIT ::signal( _sig, handler ); +#endif // !SIGQUIT +#endif // !_WINDOWS } bool operator()( const eoPop& _pop ) From 5bf03dec2b090abb25fbeb78faad469570e5c2f3 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 22 Jun 2012 17:56:08 +0200 Subject: [PATCH 1939/2134] Multiple roles demo has now 2 sub masters. Needs to be launched with at least 7 nodes. --- eo/test/mpi/multipleRoles.cpp | 44 +++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index 6fa930d1d..d855c9989 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -13,34 +13,42 @@ using namespace std; // 1 : worker of general job, master of subjob // 2 and more : workers of subjob -struct plusOne : public eoUF< int&, void > +struct SubWork: public eoUF< int&, void > { void operator() ( int & x ) { - cout << "Subjob is being applied." << endl; + cout << "Subwork phase." << endl; ++x; } }; -void subtask( vector& v ) +void subtask( vector& v, int rank ) { - DynamicAssignmentAlgorithm algo( 2, eo::REST_OF_THE_WORLD ); - plusOne plusOneInstance; - ParallelApply job( plusOneInstance, v, algo, 1 ); + vector workers; + workers.push_back( rank + 2 ); + workers.push_back( rank + 4 ); + DynamicAssignmentAlgorithm algo( workers ); + SubWork sw; + ParallelApply job( sw, v, algo, rank ); job.run(); } -struct transmit : public eoUF< vector&, void > +struct Work: public eoUF< vector&, void > { void operator() ( vector& v ) { - cout << "Into the master subjob..." << endl; - subtask( v ); + cout << "Work phase..." << endl; + subtask( v, MpiNode::comm().rank() ); + for( int i = 0; i < v.size(); ++i ) + { + v[i] *= 2; + } } }; int main(int argc, char** argv) { + // eo::log << eo::setlevel( eo::debug ); MpiNode::init( argc, argv ); vector v; @@ -50,19 +58,19 @@ int main(int argc, char** argv) v.push_back(7); v.push_back(42); - transmit transmitInstance; - vector< vector > metaV; metaV.push_back( v ); + metaV.push_back( v ); switch( MpiNode::comm().rank() ) { case 0: case 1: + case 2: { - // only one node is assigned to subjob mastering - DynamicAssignmentAlgorithm algo( 1 ); - ParallelApply< vector > job( transmitInstance, metaV, algo, 0 ); + Work w; + DynamicAssignmentAlgorithm algo( 1, 2 ); + ParallelApply< vector > job( w, metaV, algo, 0 ); job.run(); if( job.isMaster() ) { @@ -80,7 +88,13 @@ int main(int argc, char** argv) default: { // all the other nodes are sub workers - subtask( v ); + int rank = MpiNode::comm().rank(); + if ( rank == 3 or rank == 5 ) + { + subtask( v, 1 ); + } else { + subtask( v, 2 ); + } } break; } From d44a696e2168a98e4430f49bde0aa33d24113fd7 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Sat, 23 Jun 2012 13:39:17 +0200 Subject: [PATCH 1940/2134] * fixed regression with gcc 4.7 --- eo/src/eoScalarFitnessAssembled.h | 2 +- eo/src/gp/eoParseTree.h | 4 ++-- eo/test/CMakeLists.txt | 2 +- eo/test/t-openmp.cpp | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 95168ec64..50e9038de 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -212,7 +212,7 @@ public: //! Print term values and descriptions void printAll(std::ostream& os) const { for (size_type i=0; i < size(); ++i ) - os << FitnessTraits::getDescription(i) << " = " << operator[](i) << " "; + os << FitnessTraits::getDescription(i) << " = " << this->operator[](i) << " "; } //! Comparison, using less by default diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 11ec105ec..88737d919 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -94,7 +94,7 @@ public: while (size() > _size) { - back() = operator[](size()-2); + back() = this->operator[](size()-2); } } @@ -150,7 +150,7 @@ public: v[i] = node; } parse_tree tmp(v.begin(), v.end()); - swap(tmp); + this->swap(tmp); /* * old code which caused problems for paradisEO diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 4e68b02ad..c4fcc8db5 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -66,7 +66,7 @@ SET (TEST_LIST t-eoLogger t-eoIQRStat t-eoParallel - t-openmp + #t-openmp # does not work anymore since functions used in this test were removed from EO #t-eoDualFitness t-eoParser ) diff --git a/eo/test/t-openmp.cpp b/eo/test/t-openmp.cpp index a1d680876..d2f4cf3b5 100644 --- a/eo/test/t-openmp.cpp +++ b/eo/test/t-openmp.cpp @@ -39,6 +39,8 @@ Caner Candan #include +#include + #include "real_value.h" //----------------------------------------------------------------------------- From 1809120d34faddda61aa99949f3c541ca3fba13b Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 25 Jun 2012 02:17:32 +0200 Subject: [PATCH 1941/2134] =?UTF-8?q?*=20ga/make=5Fga:=C2=A0eoBooleanGener?= =?UTF-8?q?ation=20is=20now=20settable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/ga/make_ga.h | 4 ++-- eo/src/ga/make_genotype_ga.cpp | 8 ++++---- eo/src/ga/make_genotype_ga.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index ce594903f..206094881 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -57,8 +57,8 @@ */ // the genotypes -eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); - eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo); +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias=0.5); + eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias=0.5); // the operators eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init); diff --git a/eo/src/ga/make_genotype_ga.cpp b/eo/src/ga/make_genotype_ga.cpp index 4f9e69ef1..3344a8d87 100644 --- a/eo/src/ga/make_genotype_ga.cpp +++ b/eo/src/ga/make_genotype_ga.cpp @@ -45,11 +45,11 @@ /// The following function merely call the templatized do_* functions above -eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo) +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias) { - return do_make_genotype(_parser, _state, _eo); + return do_make_genotype(_parser, _state, _eo, _bias); } -eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo) +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias) { - return do_make_genotype(_parser, _state, _eo); + return do_make_genotype(_parser, _state, _eo, _bias); } diff --git a/eo/src/ga/make_genotype_ga.h b/eo/src/ga/make_genotype_ga.h index ea1b20054..fad4f7563 100644 --- a/eo/src/ga/make_genotype_ga.h +++ b/eo/src/ga/make_genotype_ga.h @@ -60,7 +60,7 @@ * @ingroup Builders */ template -eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) +eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT, float _bias=0.5) { // for bitstring, only thing needed is the size // but it might have been already read in the definition fo the performance @@ -68,7 +68,7 @@ eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) // Then we can built a bitstring random initializer // based on boolean_generator class (see utils/rnd_generator.h) - eoBooleanGenerator * gen = new eoBooleanGenerator; + eoBooleanGenerator * gen = new eoBooleanGenerator(_bias); _state.storeFunctor(gen); eoInitFixedLength* init = new eoInitFixedLength(theSize, *gen); // store in state From 29e31fb6df78f7eb79614547a3876e8510edc6b0 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Mon, 25 Jun 2012 02:18:15 +0200 Subject: [PATCH 1942/2134] =?UTF-8?q?*=20ga/make=5Fop:=C2=A0added=20kbit?= =?UTF-8?q?=20flip=20mutation,=20disabled=20by=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo/src/ga/make_op.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index 045148eca..2035a4f85 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -156,11 +156,23 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init if ( (bitFlipRateParam.value() < 0) ) throw std::runtime_error("Invalid bitFlipRate"); + // oneBitFlip eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Variation Operators" ); // minimum check if ( (oneBitRateParam.value() < 0) ) throw std::runtime_error("Invalid oneBitRate"); + // kBitFlip + eoValueParam & kBitParam = _parser.createParam((unsigned)1, "kBit", "Number of bit for deterministic k bit-flip mutation", 0, "Variation Operators" ); + // minimum check + if ( ! kBitParam.value() ) + throw std::runtime_error("Invalid kBit"); + + eoValueParam & kBitRateParam = _parser.createParam(0.0, "kBitRate", "Relative rate for deterministic k bit-flip mutation", 0, "Variation Operators" ); + // minimum check + if ( (kBitRateParam.value() < 0) ) + throw std::runtime_error("Invalid kBitRate"); + // minimum check // bool bMut = true; // not used ? if (bitFlipRateParam.value()+oneBitRateParam.value()==0) @@ -184,6 +196,11 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, oneBitRateParam.value()); + // mutate exactly k bit per individual + ptMon = new eoDetBitFlip(kBitParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, kBitRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); // now build the eoGenOp: From 66c7b1f12d49cf123b1c60cbc0f977c387a44d7a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 11:44:14 +0200 Subject: [PATCH 1943/2134] Using real dynamic assignments for tests. --- eo/test/mpi/parallelApply.cpp | 94 ++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 5a6b64f2c..d95771210 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -24,7 +24,8 @@ struct Test // These tests require at least 3 processes to be launched. int main(int argc, char** argv) { - // eo::log << eo::setlevel( eo::debug ); + eo::log << eo::setlevel( eo::debug ); + bool launchOnlyOne = true; MpiNode::init( argc, argv ); vector v; @@ -49,60 +50,63 @@ int main(int argc, char** argv) tIntervalStatic.requiredNodesNumber = ALL; tests.push_back( tIntervalStatic ); - Test tWorldStatic; - tWorldStatic.assign = new StaticAssignmentAlgorithm( v.size() ); - tWorldStatic.description = "Correct static assignment with whole world as workers."; - tWorldStatic.requiredNodesNumber = ALL; - tests.push_back( tWorldStatic ); + if( !launchOnlyOne ) + { + Test tWorldStatic; + tWorldStatic.assign = new StaticAssignmentAlgorithm( v.size() ); + tWorldStatic.description = "Correct static assignment with whole world as workers."; + tWorldStatic.requiredNodesNumber = ALL; + tests.push_back( tWorldStatic ); - Test tStaticOverload; - tStaticOverload.assign = new StaticAssignmentAlgorithm( v.size()+100 ); - tStaticOverload.description = "Static assignment with too many runs."; - tStaticOverload.requiredNodesNumber = ALL; - tests.push_back( tStaticOverload ); + Test tStaticOverload; + tStaticOverload.assign = new StaticAssignmentAlgorithm( v.size()+100 ); + tStaticOverload.description = "Static assignment with too many runs."; + tStaticOverload.requiredNodesNumber = ALL; + tests.push_back( tStaticOverload ); - Test tUniqueStatic; - tUniqueStatic.assign = new StaticAssignmentAlgorithm( 1, v.size() ); - tUniqueStatic.description = "Correct static assignment with unique worker."; - tUniqueStatic.requiredNodesNumber = 2; - tests.push_back( tUniqueStatic ); + Test tUniqueStatic; + tUniqueStatic.assign = new StaticAssignmentAlgorithm( 1, v.size() ); + tUniqueStatic.description = "Correct static assignment with unique worker."; + tUniqueStatic.requiredNodesNumber = 2; + tests.push_back( tUniqueStatic ); - Test tVectorStatic; - vector workers; - workers.push_back( 1 ); - workers.push_back( 2 ); - tVectorStatic.assign = new StaticAssignmentAlgorithm( workers, v.size() ); - tVectorStatic.description = "Correct static assignment with precise workers specified."; - tVectorStatic.requiredNodesNumber = 3; - tests.push_back( tVectorStatic ); + Test tVectorStatic; + vector workers; + workers.push_back( 1 ); + workers.push_back( 2 ); + tVectorStatic.assign = new StaticAssignmentAlgorithm( workers, v.size() ); + tVectorStatic.description = "Correct static assignment with precise workers specified."; + tVectorStatic.requiredNodesNumber = 3; + tests.push_back( tVectorStatic ); - Test tIntervalDynamic; - tIntervalDynamic.assign = new StaticAssignmentAlgorithm( 1, eo::REST_OF_THE_WORLD, v.size() ); - tIntervalDynamic.description = "Dynamic assignment with interval."; - tIntervalDynamic.requiredNodesNumber = ALL; - tests.push_back( tIntervalDynamic ); + Test tIntervalDynamic; + tIntervalDynamic.assign = new DynamicAssignmentAlgorithm( 1, eo::REST_OF_THE_WORLD ); + tIntervalDynamic.description = "Dynamic assignment with interval."; + tIntervalDynamic.requiredNodesNumber = ALL; + tests.push_back( tIntervalDynamic ); - Test tUniqueDynamic; - tUniqueDynamic.assign = new StaticAssignmentAlgorithm( 1, v.size() ); - tUniqueDynamic.description = "Dynamic assignment with unique worker."; - tUniqueDynamic.requiredNodesNumber = 2; - tests.push_back( tUniqueDynamic ); + Test tUniqueDynamic; + tUniqueDynamic.assign = new DynamicAssignmentAlgorithm( 1 ); + tUniqueDynamic.description = "Dynamic assignment with unique worker."; + tUniqueDynamic.requiredNodesNumber = 2; + tests.push_back( tUniqueDynamic ); - Test tVectorDynamic; - tVectorDynamic.assign = new StaticAssignmentAlgorithm( workers, v.size() ); - tVectorDynamic.description = "Dynamic assignment with precise workers specified."; - tVectorDynamic.requiredNodesNumber = tVectorStatic.requiredNodesNumber; - tests.push_back( tVectorDynamic ); + Test tVectorDynamic; + tVectorDynamic.assign = new DynamicAssignmentAlgorithm( workers ); + tVectorDynamic.description = "Dynamic assignment with precise workers specified."; + tVectorDynamic.requiredNodesNumber = tVectorStatic.requiredNodesNumber; + tests.push_back( tVectorDynamic ); - Test tWorldDynamic; - tWorldDynamic.assign = new StaticAssignmentAlgorithm( v.size() ); - tWorldDynamic.description = "Dynamic assignment with whole world as workers."; - tWorldDynamic.requiredNodesNumber = ALL; - tests.push_back( tWorldDynamic ); + Test tWorldDynamic; + tWorldDynamic.assign = new DynamicAssignmentAlgorithm; + tWorldDynamic.description = "Dynamic assignment with whole world as workers."; + tWorldDynamic.requiredNodesNumber = ALL; + tests.push_back( tWorldDynamic ); + } for( unsigned int i = 0; i < tests.size(); ++i ) { - ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0 ); + ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, 3 ); if( job.isMaster() ) { From f4d8b43f7d15e923acdc59eb7e64590757e2a421 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 13:41:48 +0200 Subject: [PATCH 1944/2134] ParallelApply can now handle many data at a time. --- eo/src/mpi/eoParallelApply.h | 64 ++++++++++++++++++++++++++++------- eo/test/mpi/multipleRoles.cpp | 4 +-- eo/test/mpi/parallelApply.cpp | 5 +-- 3 files changed, 57 insertions(+), 16 deletions(-) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 0c4f1e6e4..e401fda69 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -6,39 +6,76 @@ # include # include + template< typename EOT > class ParallelApply : public MpiJob { + private: + struct ParallelApplyAssignment + { + int index; + int size; + }; public: - ParallelApply( eoUF & _proc, std::vector& _pop, AssignmentAlgorithm & algo, int _masterRank ) : + ParallelApply( + eoUF & _proc, + std::vector& _pop, + AssignmentAlgorithm & algo, + int _masterRank, + int _packetSize = 1 + ) : MpiJob( algo, _masterRank ), func( _proc ), index( 0 ), size( _pop.size() ), - data( _pop ) + data( _pop ), + packetSize( _packetSize ) { - // empty + tempArray = new EOT[ packetSize ]; + } + + ~ParallelApply() + { + delete [] tempArray; } virtual void sendTask( int wrkRank ) { - assignedTasks[ wrkRank ] = index; - comm.send( wrkRank, 1, data[ index ] ); - ++index; + int futureIndex; + + if( index + packetSize < size ) + { + futureIndex = index + packetSize; + } else { + futureIndex = size; + } + + int sentSize = futureIndex - index ; + comm.send( wrkRank, 1, sentSize ); + + assignedTasks[ wrkRank ].index = index; + assignedTasks[ wrkRank ].size = sentSize; + + comm.send( wrkRank, 1, &data[ index ] , sentSize ); + index = futureIndex; } virtual void handleResponse( int wrkRank ) { - comm.recv( wrkRank, 1, data[ assignedTasks[ wrkRank ] ] ); + comm.recv( wrkRank, 1, &data[ assignedTasks[wrkRank].index ], assignedTasks[wrkRank].size ); } virtual void processTask( ) { - EOT ind; - comm.recv( masterRank, 1, ind ); - func( ind ); - comm.send( masterRank, 1, ind ); + int recvSize; + comm.recv( masterRank, 1, recvSize ); + comm.recv( masterRank, 1, tempArray, recvSize ); + for( int i = 0; i < recvSize ; ++i ) + { + func( tempArray[ i ] ); + } + comm.send( masterRank, 1, tempArray, recvSize ); } bool isFinished() @@ -51,7 +88,10 @@ class ParallelApply : public MpiJob eoUF& func; int index; int size; - std::map< int /* worker rank */, int /* index in vector */> assignedTasks; + std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; + + int packetSize; + EOT* tempArray; }; # endif // __EO_PARALLEL_APPLY_H__ diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index d855c9989..ab8020732 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -10,8 +10,8 @@ using namespace std; // Role map // 0 : general master -// 1 : worker of general job, master of subjob -// 2 and more : workers of subjob +// 1, 2 : worker of general job, master of subjob +// 3 to 7 : workers of subjob struct SubWork: public eoUF< int&, void > { diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index d95771210..69b01e485 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -24,8 +24,9 @@ struct Test // These tests require at least 3 processes to be launched. int main(int argc, char** argv) { - eo::log << eo::setlevel( eo::debug ); - bool launchOnlyOne = true; + // eo::log << eo::setlevel( eo::debug ); + bool launchOnlyOne = false; // Set this to true if you wanna launch only the first test. + MpiNode::init( argc, argv ); vector v; From 2cc112c33ba46c6f2976337532087143ece5c3a7 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 13:50:22 +0200 Subject: [PATCH 1945/2134] Throwing exception when packet size is negative. --- eo/src/mpi/eoParallelApply.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index e401fda69..064396daa 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -6,7 +6,6 @@ # include # include - template< typename EOT > class ParallelApply : public MpiJob { @@ -32,6 +31,10 @@ class ParallelApply : public MpiJob data( _pop ), packetSize( _packetSize ) { + if ( _packetSize <= 0 ) + { + throw std::runtime_error("Packet size should not be negative."); + } tempArray = new EOT[ packetSize ]; } From d9c7ef0300903898b09c1b8f873dc6bba1c532dc Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 13:51:49 +0200 Subject: [PATCH 1946/2134] Parallel apply test is done on a big table. --- eo/test/mpi/parallelApply.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 69b01e485..143e73500 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -30,12 +30,11 @@ int main(int argc, char** argv) MpiNode::init( argc, argv ); vector v; - v.push_back(1); - v.push_back(3); - v.push_back(3); - v.push_back(7); - v.push_back(42); - + for( int i = 0; i < 1000; ++i ) + { + v.push_back( rand() ); + } + int offset = 0; vector originalV = v; @@ -140,3 +139,4 @@ int main(int argc, char** argv) } return 0; } + From b9a2246f82c00f91d8af5d2ff0d0f80c09b1eca6 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 13:53:34 +0200 Subject: [PATCH 1947/2134] Generating time based seed for random generator --- eo/test/mpi/parallelApply.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 143e73500..46130b80a 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -29,6 +29,7 @@ int main(int argc, char** argv) MpiNode::init( argc, argv ); + srand( time(0) ); vector v; for( int i = 0; i < 1000; ++i ) { From b291e56e03c60dd04d16808fbbf513cd4c9916af Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 14:11:44 +0200 Subject: [PATCH 1948/2134] Putting everything in namespace eo::mpi --- eo/src/mpi/CMakeLists.txt | 2 +- eo/src/mpi/MpiNode.h | 25 ---- eo/src/mpi/assignmentAlgorithm.h | 207 -------------------------- eo/src/mpi/eoMpi.cpp | 11 ++ eo/src/mpi/eoMpi.h | 132 ++++++++++++++++ eo/src/mpi/eoMpiAssignmentAlgorithm.h | 207 ++++++++++++++++++++++++++ eo/src/mpi/eoMpiNode.h | 31 ++++ eo/src/mpi/eoParallelApply.h | 183 ++++++++++++----------- eo/src/mpi/eompi.cpp | 5 - eo/src/mpi/eompi.h | 127 ---------------- eo/test/mpi/multipleRoles.cpp | 12 +- eo/test/mpi/parallelApply.cpp | 16 +- 12 files changed, 492 insertions(+), 466 deletions(-) delete mode 100644 eo/src/mpi/MpiNode.h delete mode 100644 eo/src/mpi/assignmentAlgorithm.h create mode 100644 eo/src/mpi/eoMpi.cpp create mode 100644 eo/src/mpi/eoMpi.h create mode 100644 eo/src/mpi/eoMpiAssignmentAlgorithm.h create mode 100644 eo/src/mpi/eoMpiNode.h delete mode 100644 eo/src/mpi/eompi.cpp delete mode 100644 eo/src/mpi/eompi.h diff --git a/eo/src/mpi/CMakeLists.txt b/eo/src/mpi/CMakeLists.txt index c770acd13..0e22e47e0 100644 --- a/eo/src/mpi/CMakeLists.txt +++ b/eo/src/mpi/CMakeLists.txt @@ -13,7 +13,7 @@ SET(EOMPI_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH}) SET(EOMPI_SOURCES - eompi.cpp + eoMpi.cpp ) ADD_LIBRARY(eompi STATIC ${EOMPI_SOURCES}) diff --git a/eo/src/mpi/MpiNode.h b/eo/src/mpi/MpiNode.h deleted file mode 100644 index 10804ce01..000000000 --- a/eo/src/mpi/MpiNode.h +++ /dev/null @@ -1,25 +0,0 @@ -# ifndef __MPI_NODE_H__ -# define __MPI_NODE_H__ - -# include -namespace mpi = boost::mpi; - -class MpiNode -{ - public: - - static void init( int argc, char** argv ) - { - static mpi::environment env( argc, argv ); - } - - static mpi::communicator& comm() - { - return _comm; - } - - protected: - static mpi::communicator _comm; -}; - -# endif // __MPI_NODE_H__ diff --git a/eo/src/mpi/assignmentAlgorithm.h b/eo/src/mpi/assignmentAlgorithm.h deleted file mode 100644 index a27e8289a..000000000 --- a/eo/src/mpi/assignmentAlgorithm.h +++ /dev/null @@ -1,207 +0,0 @@ -# ifndef __ASSIGNMENT_ALGORITHM_H__ -# define __ASSIGNMENT_ALGORITHM_H__ - -# include -# include "MpiNode.h" - -namespace eo -{ - const int REST_OF_THE_WORLD = -1; -} - -struct AssignmentAlgorithm -{ - virtual int get( ) = 0; - virtual int availableWorkers( ) = 0; - virtual void confirm( int wrkRank ) = 0; - virtual std::vector idles( ) = 0; -}; - -struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm -{ - public: - - DynamicAssignmentAlgorithm( ) - { - for(int i = 1; i < MpiNode::comm().size(); ++i) - { - availableWrk.push_back( i ); - } - } - - DynamicAssignmentAlgorithm( int unique ) - { - availableWrk.push_back( unique ); - } - - DynamicAssignmentAlgorithm( const std::vector & workers ) - { - availableWrk = workers; - } - - DynamicAssignmentAlgorithm( int first, int last ) - { - if( last == eo::REST_OF_THE_WORLD ) - { - last = MpiNode::comm().size() - 1; - } - - for( int i = first; i <= last; ++i) - { - availableWrk.push_back( i ); - } - } - - virtual int get( ) - { - int assignee = -1; - if (! availableWrk.empty() ) - { - assignee = availableWrk.back(); - availableWrk.pop_back(); - } - return assignee; - } - - int availableWorkers() - { - return availableWrk.size(); - } - - void confirm( int rank ) - { - availableWrk.push_back( rank ); - } - - std::vector idles( ) - { - return availableWrk; - } - - protected: - std::vector< int > availableWrk; -}; - -struct StaticAssignmentAlgorithm : public AssignmentAlgorithm -{ - public: - StaticAssignmentAlgorithm( std::vector& workers, int runs ) - { - init( workers, runs ); - } - - StaticAssignmentAlgorithm( int first, int last, int runs ) - { - std::vector workers; - - if( last == eo::REST_OF_THE_WORLD ) - { - last = MpiNode::comm().size() - 1; - } - - for(int i = first; i <= last; ++i) - { - workers.push_back( i ); - } - init( workers, runs ); - } - - StaticAssignmentAlgorithm( int runs ) - { - std::vector workers; - for(int i = 1; i < MpiNode::comm().size(); ++i) - { - workers.push_back( i ); - } - init( workers, runs ); - } - - StaticAssignmentAlgorithm( int unique, int runs ) - { - std::vector workers; - workers.push_back( unique ); - init( workers, runs ); - } - -private: - void init( std::vector & workers, int runs ) - { - unsigned int nbWorkers = workers.size(); - freeWorkers = nbWorkers; - attributions.reserve( nbWorkers ); - busy.resize( nbWorkers, false ); - - // Let be the euclidean division of runs by nbWorkers : - // runs == q * nbWorkers + r, 0 <= r < nbWorkers - // This one liner affects q requests to each worker - for (unsigned int i = 0; i < nbWorkers; attributions[i++] = runs / nbWorkers) ; - // The first line computes r and the one liner affects the remaining - // r requests to workers, in ascending order - unsigned int diff = runs - (runs / nbWorkers) * nbWorkers; - for (unsigned int i = 0; i < diff; ++attributions[i++]); - - realRank = workers; - } - -public: - int get( ) - { - int assignee = -1; - for( unsigned i = 0; i < busy.size(); ++i ) - { - if( !busy[i] && attributions[i] > 0 ) - { - busy[i] = true; - --freeWorkers; - assignee = realRank[ i ]; - break; - } - } - return assignee; - } - - int availableWorkers( ) - { - return freeWorkers; - } - - std::vector idles() - { - std::vector ret; - for(unsigned int i = 0; i < busy.size(); ++i) - { - if( !busy[i] ) - { - eo::log << "Idle : " << realRank[i] << - " / attributions : " << attributions[i] << std::endl; - ret.push_back( realRank[i] ); - } - } - return ret; - } - - void confirm( int rank ) - { - int i = -1; - for( int j = 0; j < realRank.size(); ++j ) - { - if( realRank[j] == rank ) - { - i = j; - break; - } - } - - --attributions[ i ]; - busy[ i ] = false; - ++freeWorkers; - } - - private: - std::vector attributions; - std::vector realRank; - std::vector busy; - unsigned int freeWorkers; -}; - -# endif // __ASSIGNMENT_ALGORITHM_H__ diff --git a/eo/src/mpi/eoMpi.cpp b/eo/src/mpi/eoMpi.cpp new file mode 100644 index 000000000..f6e3b3c52 --- /dev/null +++ b/eo/src/mpi/eoMpi.cpp @@ -0,0 +1,11 @@ +# include "eoMpi.h" + +// MpiNode* MpiNodeStore::singleton; +namespace eo +{ + namespace mpi + { + bmpi::communicator Node::_comm; + } +} + diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h new file mode 100644 index 000000000..86ad55ab3 --- /dev/null +++ b/eo/src/mpi/eoMpi.h @@ -0,0 +1,132 @@ +# ifndef __EO_MPI_H__ +# define __EO_MPI_H__ + +# include +# include +# include + +# include "eoMpiNode.h" +# include "eoMpiAssignmentAlgorithm.h" +// TODO TODOB comment! + +namespace eo +{ + namespace mpi + { + namespace Channel + { + const int Commands = 0; + } + + namespace Message + { + const int Continue = 0; + const int Finish = 1; + } + + class Job + { + public: + + Job( AssignmentAlgorithm& _algo, int _masterRank ) : + assignmentAlgo( _algo ), + comm( Node::comm() ), + masterRank( _masterRank ) + { + _isMaster = Node::comm().rank() == _masterRank; + } + + // master + virtual bool isFinished() = 0; + virtual void sendTask( int wrkRank ) = 0; + virtual void handleResponse( int wrkRank ) = 0; + // worker + virtual void processTask( ) = 0; + + void master( ) + { + int totalWorkers = assignmentAlgo.availableWorkers(); + eo::log << eo::debug; + eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl; + + while( ! isFinished() ) + { + int assignee = assignmentAlgo.get( ); + while( assignee <= 0 ) + { + eo::log << "[M" << comm.rank() << "] Waitin' for node..." << std::endl; + bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); + int wrkRank = status.source(); + eo::log << "[M" << comm.rank() << "] Node " << wrkRank << " just terminated." << std::endl; + handleResponse( wrkRank ); + assignmentAlgo.confirm( wrkRank ); + assignee = assignmentAlgo.get( ); + } + eo::log << "[M" << comm.rank() << "] Assignee : " << assignee << std::endl; + comm.send( assignee, Channel::Commands, Message::Continue ); + sendTask( assignee ); + } + + eo::log << "[M" << comm.rank() << "] Frees all the idle." << std::endl; + // frees all the idle workers + std::vector idles = assignmentAlgo.idles(); + for(unsigned int i = 0; i < idles.size(); ++i) + { + comm.send( idles[i], Channel::Commands, Message::Finish ); + } + + eo::log << "[M" << comm.rank() << "] Waits for all responses." << std::endl; + // wait for all responses + while( assignmentAlgo.availableWorkers() != totalWorkers ) + { + bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); + int wrkRank = status.source(); + handleResponse( wrkRank ); + comm.send( wrkRank, Channel::Commands, Message::Finish ); + assignmentAlgo.confirm( wrkRank ); + } + + eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; + } + + void worker( ) + { + int order; + eo::log << eo::debug; + while( true ) + { + eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; + comm.recv( masterRank, Channel::Commands, order ); + if ( order == Message::Finish ) + { + eo::log << "[W" << comm.rank() << "] Leaving worker task." << std::endl; + return; + } else + { + eo::log << "[W" << comm.rank() << "] Processing task..." << std::endl; + processTask( ); + } + } + } + + void run( ) + { + ( _isMaster ) ? master( ) : worker( ); + } + + bool isMaster( ) + { + return _isMaster; + } + + protected: + AssignmentAlgorithm& assignmentAlgo; + bmpi::communicator& comm; + int masterRank; + bool _isMaster; + }; + } +} + +# endif // __EO_MPI_H__ + diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h new file mode 100644 index 000000000..aa162d951 --- /dev/null +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -0,0 +1,207 @@ +# ifndef __MPI_ASSIGNMENT_ALGORITHM_H__ +# define __MPI_ASSIGNMENT_ALGORITHM_H__ + +# include +# include "eoMpiNode.h" + +namespace eo +{ + namespace mpi + { + const int REST_OF_THE_WORLD = -1; + + struct AssignmentAlgorithm + { + virtual int get( ) = 0; + virtual int availableWorkers( ) = 0; + virtual void confirm( int wrkRank ) = 0; + virtual std::vector idles( ) = 0; + }; + + struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm + { + public: + + DynamicAssignmentAlgorithm( ) + { + for(int i = 1; i < Node::comm().size(); ++i) + { + availableWrk.push_back( i ); + } + } + + DynamicAssignmentAlgorithm( int unique ) + { + availableWrk.push_back( unique ); + } + + DynamicAssignmentAlgorithm( const std::vector & workers ) + { + availableWrk = workers; + } + + DynamicAssignmentAlgorithm( int first, int last ) + { + if( last == REST_OF_THE_WORLD ) + { + last = Node::comm().size() - 1; + } + + for( int i = first; i <= last; ++i) + { + availableWrk.push_back( i ); + } + } + + virtual int get( ) + { + int assignee = -1; + if (! availableWrk.empty() ) + { + assignee = availableWrk.back(); + availableWrk.pop_back(); + } + return assignee; + } + + int availableWorkers() + { + return availableWrk.size(); + } + + void confirm( int rank ) + { + availableWrk.push_back( rank ); + } + + std::vector idles( ) + { + return availableWrk; + } + + protected: + std::vector< int > availableWrk; + }; + + struct StaticAssignmentAlgorithm : public AssignmentAlgorithm + { + public: + StaticAssignmentAlgorithm( std::vector& workers, int runs ) + { + init( workers, runs ); + } + + StaticAssignmentAlgorithm( int first, int last, int runs ) + { + std::vector workers; + + if( last == REST_OF_THE_WORLD ) + { + last = Node::comm().size() - 1; + } + + for(int i = first; i <= last; ++i) + { + workers.push_back( i ); + } + init( workers, runs ); + } + + StaticAssignmentAlgorithm( int runs ) + { + std::vector workers; + for(int i = 1; i < Node::comm().size(); ++i) + { + workers.push_back( i ); + } + init( workers, runs ); + } + + StaticAssignmentAlgorithm( int unique, int runs ) + { + std::vector workers; + workers.push_back( unique ); + init( workers, runs ); + } + + private: + void init( std::vector & workers, int runs ) + { + unsigned int nbWorkers = workers.size(); + freeWorkers = nbWorkers; + attributions.reserve( nbWorkers ); + busy.resize( nbWorkers, false ); + + // Let be the euclidean division of runs by nbWorkers : + // runs == q * nbWorkers + r, 0 <= r < nbWorkers + // This one liner affects q requests to each worker + for (unsigned int i = 0; i < nbWorkers; attributions[i++] = runs / nbWorkers) ; + // The first line computes r and the one liner affects the remaining + // r requests to workers, in ascending order + unsigned int diff = runs - (runs / nbWorkers) * nbWorkers; + for (unsigned int i = 0; i < diff; ++attributions[i++]); + + realRank = workers; + } + + public: + int get( ) + { + int assignee = -1; + for( unsigned i = 0; i < busy.size(); ++i ) + { + if( !busy[i] && attributions[i] > 0 ) + { + busy[i] = true; + --freeWorkers; + assignee = realRank[ i ]; + break; + } + } + return assignee; + } + + int availableWorkers( ) + { + return freeWorkers; + } + + std::vector idles() + { + std::vector ret; + for(unsigned int i = 0; i < busy.size(); ++i) + { + if( !busy[i] ) + { + ret.push_back( realRank[i] ); + } + } + return ret; + } + + void confirm( int rank ) + { + int i = -1; + for( unsigned int j = 0; j < realRank.size(); ++j ) + { + if( realRank[j] == rank ) + { + i = j; + break; + } + } + + --attributions[ i ]; + busy[ i ] = false; + ++freeWorkers; + } + + private: + std::vector attributions; + std::vector realRank; + std::vector busy; + unsigned int freeWorkers; + }; + } +} +# endif // __MPI_ASSIGNMENT_ALGORITHM_H__ diff --git a/eo/src/mpi/eoMpiNode.h b/eo/src/mpi/eoMpiNode.h new file mode 100644 index 000000000..9f1ea7b53 --- /dev/null +++ b/eo/src/mpi/eoMpiNode.h @@ -0,0 +1,31 @@ +# ifndef __MPI_NODE_H__ +# define __MPI_NODE_H__ + +# include +namespace bmpi = boost::mpi; + +namespace eo +{ + namespace mpi + { + class Node + { + public: + + static void init( int argc, char** argv ) + { + static bmpi::environment env( argc, argv ); + } + + static bmpi::communicator& comm() + { + return _comm; + } + + protected: + static bmpi::communicator _comm; + }; + } +} +# endif // __MPI_NODE_H__ + diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 064396daa..1e9d4c1de 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -1,102 +1,107 @@ # ifndef __EO_PARALLEL_APPLY_H__ # define __EO_PARALLEL_APPLY_H__ -# include "eompi.h" +# include "eoMpi.h" # include # include -template< typename EOT > -class ParallelApply : public MpiJob +namespace eo { - private: - struct ParallelApplyAssignment + namespace mpi + { + template< typename EOT > + class ParallelApply : public Job { - int index; - int size; + private: + struct ParallelApplyAssignment + { + int index; + int size; + }; + public: + + ParallelApply( + eoUF & _proc, + std::vector& _pop, + AssignmentAlgorithm & algo, + int _masterRank, + int _packetSize = 1 + ) : + Job( algo, _masterRank ), + func( _proc ), + index( 0 ), + size( _pop.size() ), + data( _pop ), + packetSize( _packetSize ) + { + if ( _packetSize <= 0 ) + { + throw std::runtime_error("Packet size should not be negative."); + } + tempArray = new EOT[ packetSize ]; + } + + ~ParallelApply() + { + delete [] tempArray; + } + + virtual void sendTask( int wrkRank ) + { + int futureIndex; + + if( index + packetSize < size ) + { + futureIndex = index + packetSize; + } else { + futureIndex = size; + } + + int sentSize = futureIndex - index ; + comm.send( wrkRank, 1, sentSize ); + + assignedTasks[ wrkRank ].index = index; + assignedTasks[ wrkRank ].size = sentSize; + + comm.send( wrkRank, 1, &data[ index ] , sentSize ); + index = futureIndex; + } + + virtual void handleResponse( int wrkRank ) + { + comm.recv( wrkRank, 1, &data[ assignedTasks[wrkRank].index ], assignedTasks[wrkRank].size ); + } + + virtual void processTask( ) + { + int recvSize; + comm.recv( masterRank, 1, recvSize ); + comm.recv( masterRank, 1, tempArray, recvSize ); + for( int i = 0; i < recvSize ; ++i ) + { + func( tempArray[ i ] ); + } + comm.send( masterRank, 1, tempArray, recvSize ); + } + + bool isFinished() + { + return index == size; + } + + protected: + std::vector & data; + eoUF& func; + int index; + int size; + std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; + + int packetSize; + EOT* tempArray; }; - public: - - ParallelApply( - eoUF & _proc, - std::vector& _pop, - AssignmentAlgorithm & algo, - int _masterRank, - int _packetSize = 1 - ) : - MpiJob( algo, _masterRank ), - func( _proc ), - index( 0 ), - size( _pop.size() ), - data( _pop ), - packetSize( _packetSize ) - { - if ( _packetSize <= 0 ) - { - throw std::runtime_error("Packet size should not be negative."); - } - tempArray = new EOT[ packetSize ]; - } - - ~ParallelApply() - { - delete [] tempArray; - } - - virtual void sendTask( int wrkRank ) - { - int futureIndex; - - if( index + packetSize < size ) - { - futureIndex = index + packetSize; - } else { - futureIndex = size; - } - - int sentSize = futureIndex - index ; - comm.send( wrkRank, 1, sentSize ); - - assignedTasks[ wrkRank ].index = index; - assignedTasks[ wrkRank ].size = sentSize; - - comm.send( wrkRank, 1, &data[ index ] , sentSize ); - index = futureIndex; - } - - virtual void handleResponse( int wrkRank ) - { - comm.recv( wrkRank, 1, &data[ assignedTasks[wrkRank].index ], assignedTasks[wrkRank].size ); - } - - virtual void processTask( ) - { - int recvSize; - comm.recv( masterRank, 1, recvSize ); - comm.recv( masterRank, 1, tempArray, recvSize ); - for( int i = 0; i < recvSize ; ++i ) - { - func( tempArray[ i ] ); - } - comm.send( masterRank, 1, tempArray, recvSize ); - } - - bool isFinished() - { - return index == size; - } - - protected: - std::vector & data; - eoUF& func; - int index; - int size; - std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; - - int packetSize; - EOT* tempArray; -}; - + } +} # endif // __EO_PARALLEL_APPLY_H__ diff --git a/eo/src/mpi/eompi.cpp b/eo/src/mpi/eompi.cpp deleted file mode 100644 index 6429a31c5..000000000 --- a/eo/src/mpi/eompi.cpp +++ /dev/null @@ -1,5 +0,0 @@ -# include "eompi.h" - -// MpiNode* MpiNodeStore::singleton; -mpi::communicator MpiNode::_comm; - diff --git a/eo/src/mpi/eompi.h b/eo/src/mpi/eompi.h deleted file mode 100644 index 3b51e7a3a..000000000 --- a/eo/src/mpi/eompi.h +++ /dev/null @@ -1,127 +0,0 @@ -# ifndef __EO_MPI_H__ -# define __EO_MPI_H__ - -# include -# include -# include - -# include "MpiNode.h" -# include "assignmentAlgorithm.h" -// TODO TODOB comment! - -namespace EoMpi -{ - namespace Channel - { - const int Commands = 0; - } - - namespace Message - { - const int Continue = 0; - const int Finish = 1; - } -} -class MpiJob -{ - public: - - MpiJob( AssignmentAlgorithm& _algo, int _masterRank ) : - assignmentAlgo( _algo ), - comm( MpiNode::comm() ), - masterRank( _masterRank ) - { - _isMaster = MpiNode::comm().rank() == _masterRank; - } - - // master - virtual bool isFinished() = 0; - virtual void sendTask( int wrkRank ) = 0; - virtual void handleResponse( int wrkRank ) = 0; - // worker - virtual void processTask( ) = 0; - - void master( ) - { - int totalWorkers = assignmentAlgo.availableWorkers(); - eo::log << eo::debug; - eo::log << "[M] Have " << totalWorkers << " workers." << std::endl; - - while( ! isFinished() ) - { - int assignee = assignmentAlgo.get( ); - while( assignee <= 0 ) - { - eo::log << "[M] Waitin' for node..." << std::endl; - mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); - int wrkRank = status.source(); - eo::log << "[M] Node " << wrkRank << " just terminated." << std::endl; - handleResponse( wrkRank ); - assignmentAlgo.confirm( wrkRank ); - assignee = assignmentAlgo.get( ); - } - eo::log << "[M] Assignee : " << assignee << std::endl; - comm.send( assignee, EoMpi::Channel::Commands, EoMpi::Message::Continue ); - sendTask( assignee ); - } - - eo::log << "[M] Frees all the idle." << std::endl; - // frees all the idle workers - std::vector idles = assignmentAlgo.idles(); - for(unsigned int i = 0; i < idles.size(); ++i) - { - comm.send( idles[i], EoMpi::Channel::Commands, EoMpi::Message::Finish ); - } - - eo::log << "[M] Waits for all responses." << std::endl; - // wait for all responses - while( assignmentAlgo.availableWorkers() != totalWorkers ) - { - mpi::status status = comm.probe( mpi::any_source, mpi::any_tag ); - int wrkRank = status.source(); - handleResponse( wrkRank ); - comm.send( wrkRank, EoMpi::Channel::Commands, EoMpi::Message::Finish ); - assignmentAlgo.confirm( wrkRank ); - } - - eo::log << "[M] Leaving master task." << std::endl; - } - - void worker( ) - { - int order; - eo::log << eo::debug; - while( true ) - { - eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; - comm.recv( masterRank, EoMpi::Channel::Commands, order ); - if ( order == EoMpi::Message::Finish ) - { - eo::log << "[W" << comm.rank() << "] Leaving worker task." << std::endl; - return; - } else - { - eo::log << "[W" << comm.rank() << "] Processing task..." << std::endl; - processTask( ); - } - } - } - - void run( ) - { - ( _isMaster ) ? master( ) : worker( ); - } - - bool isMaster( ) - { - return _isMaster; - } - -protected: - AssignmentAlgorithm& assignmentAlgo; - mpi::communicator& comm; - int masterRank; - bool _isMaster; -}; -# endif // __EO_MPI_H__ - diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index ab8020732..5b829c890 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -1,4 +1,4 @@ -# include +# include # include # include @@ -8,6 +8,8 @@ # include using namespace std; +using namespace eo::mpi; + // Role map // 0 : general master // 1, 2 : worker of general job, master of subjob @@ -38,7 +40,7 @@ struct Work: public eoUF< vector&, void > void operator() ( vector& v ) { cout << "Work phase..." << endl; - subtask( v, MpiNode::comm().rank() ); + subtask( v, Node::comm().rank() ); for( int i = 0; i < v.size(); ++i ) { v[i] *= 2; @@ -49,7 +51,7 @@ struct Work: public eoUF< vector&, void > int main(int argc, char** argv) { // eo::log << eo::setlevel( eo::debug ); - MpiNode::init( argc, argv ); + Node::init( argc, argv ); vector v; v.push_back(1); @@ -62,7 +64,7 @@ int main(int argc, char** argv) metaV.push_back( v ); metaV.push_back( v ); - switch( MpiNode::comm().rank() ) + switch( Node::comm().rank() ) { case 0: case 1: @@ -88,7 +90,7 @@ int main(int argc, char** argv) default: { // all the other nodes are sub workers - int rank = MpiNode::comm().rank(); + int rank = Node::comm().rank(); if ( rank == 3 or rank == 5 ) { subtask( v, 1 ); diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 46130b80a..82f4e0e70 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -1,4 +1,4 @@ -# include +# include # include # include @@ -6,6 +6,8 @@ # include using namespace std; +using namespace eo::mpi; + struct plusOne : public eoUF< int&, void > { void operator() ( int & x ) @@ -27,7 +29,7 @@ int main(int argc, char** argv) // eo::log << eo::setlevel( eo::debug ); bool launchOnlyOne = false; // Set this to true if you wanna launch only the first test. - MpiNode::init( argc, argv ); + Node::init( argc, argv ); srand( time(0) ); vector v; @@ -43,10 +45,10 @@ int main(int argc, char** argv) vector< Test > tests; - const int ALL = MpiNode::comm().size(); + const int ALL = Node::comm().size(); Test tIntervalStatic; - tIntervalStatic.assign = new StaticAssignmentAlgorithm( 1, eo::REST_OF_THE_WORLD, v.size() ); + tIntervalStatic.assign = new StaticAssignmentAlgorithm( 1, REST_OF_THE_WORLD, v.size() ); tIntervalStatic.description = "Correct static assignment with interval."; tIntervalStatic.requiredNodesNumber = ALL; tests.push_back( tIntervalStatic ); @@ -81,7 +83,7 @@ int main(int argc, char** argv) tests.push_back( tVectorStatic ); Test tIntervalDynamic; - tIntervalDynamic.assign = new DynamicAssignmentAlgorithm( 1, eo::REST_OF_THE_WORLD ); + tIntervalDynamic.assign = new DynamicAssignmentAlgorithm( 1, REST_OF_THE_WORLD ); tIntervalDynamic.description = "Dynamic assignment with interval."; tIntervalDynamic.requiredNodesNumber = ALL; tests.push_back( tIntervalDynamic ); @@ -114,7 +116,7 @@ int main(int argc, char** argv) cout << "Test : " << tests[i].description << endl; } - if( MpiNode::comm().rank() < tests[i].requiredNodesNumber ) + if( Node::comm().rank() < tests[i].requiredNodesNumber ) { job.run(); } @@ -134,7 +136,7 @@ int main(int argc, char** argv) cout << endl; } - MpiNode::comm().barrier(); + Node::comm().barrier(); delete tests[i].assign; } From de2df9de810a71b918ca57ad8335a85a951ed1db Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 14:18:04 +0200 Subject: [PATCH 1949/2134] Preprocessor conditions for debug print --- eo/src/mpi/eoMpi.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 86ad55ab3..b12233c50 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -46,28 +46,38 @@ namespace eo void master( ) { int totalWorkers = assignmentAlgo.availableWorkers(); +# ifndef NDEBUG eo::log << eo::debug; eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl; +# endif while( ! isFinished() ) { int assignee = assignmentAlgo.get( ); while( assignee <= 0 ) { +# ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Waitin' for node..." << std::endl; +# endif bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); int wrkRank = status.source(); +# ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Node " << wrkRank << " just terminated." << std::endl; +# endif handleResponse( wrkRank ); assignmentAlgo.confirm( wrkRank ); assignee = assignmentAlgo.get( ); } +# ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Assignee : " << assignee << std::endl; +# endif comm.send( assignee, Channel::Commands, Message::Continue ); sendTask( assignee ); } +# ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Frees all the idle." << std::endl; +# endif // frees all the idle workers std::vector idles = assignmentAlgo.idles(); for(unsigned int i = 0; i < idles.size(); ++i) @@ -75,7 +85,9 @@ namespace eo comm.send( idles[i], Channel::Commands, Message::Finish ); } +# ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Waits for all responses." << std::endl; +# endif // wait for all responses while( assignmentAlgo.availableWorkers() != totalWorkers ) { @@ -86,24 +98,34 @@ namespace eo assignmentAlgo.confirm( wrkRank ); } +# ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; +# endif } void worker( ) { int order; +# ifndef NDEBUG eo::log << eo::debug; +# endif while( true ) { +# ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; +# endif comm.recv( masterRank, Channel::Commands, order ); if ( order == Message::Finish ) { +# ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Leaving worker task." << std::endl; +# endif return; } else { +# ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Processing task..." << std::endl; +# endif processTask( ); } } From fc68c3b81ef59944a8f2fd94db083f2cab0ca543 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 25 Jun 2012 14:55:15 +0200 Subject: [PATCH 1950/2134] eoPopEvalFunc updated for parallel evaluation. --- eo/src/apply.h | 24 +++++++------------ eo/src/eoPopEvalFunc.h | 20 ++++++++++++++-- eo/test/{t-eoMpiParallel.cpp => mpi/eval.cpp} | 18 ++++++++++---- 3 files changed, 41 insertions(+), 21 deletions(-) rename eo/test/{t-eoMpiParallel.cpp => mpi/eval.cpp} (90%) diff --git a/eo/src/apply.h b/eo/src/apply.h index d2006fe04..c3c0365c3 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -34,7 +34,7 @@ #include # ifdef WITH_MPI -# include +# include # include # endif // WITH_MPI @@ -86,21 +86,15 @@ void apply(eoUF& _proc, std::vector& _pop) #ifdef WITH_MPI template -void parallelApply(eoUF& _proc, std::vector& _pop) +void parallelApply( + eoUF& _proc, + std::vector& _pop, + eo::mpi::AssignmentAlgorithm& _algo, + int _masterRank, + int _packetSize) { - ParallelApply job( _proc, _pop ); - - MasterNode* master = dynamic_cast( MpiNodeStore::instance() ); - if ( master ) - { - DynamicAssignmentAlgorithm algo; - master->setAssignmentAlgorithm( &algo ); - master->run( job ); - } else - { - WorkerNode* wrk = dynamic_cast( MpiNodeStore::instance() ); - wrk->run( job ); - } + eo::mpi::ParallelApply job( _proc, _pop, _algo, _masterRank, _packetSize ); + job.run(); } #endif diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index cbd38b21c..8885ef11d 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -83,17 +83,33 @@ template class eoParallelPopLoopEval : public eoPopEvalFunc { public: /** Ctor: set value of embedded eoEvalFunc */ - eoParallelPopLoopEval(eoEvalFunc & _eval) : eval(_eval) {} + eoParallelPopLoopEval( + eoEvalFunc & _eval, + eo::mpi::AssignmentAlgorithm& _assignAlgo, + int _masterRank, + int _packetSize = 1 + ) : + eval(_eval), + assignAlgo( _assignAlgo ), + masterRank( _masterRank ), + packetSize( _packetSize ) + { + // empty + } /** Do the job: simple loop over the offspring */ void operator()(eoPop & _parents, eoPop & _offspring) { (void)_parents; - parallelApply(eval, _offspring); + parallelApply(eval, _offspring, assignAlgo, masterRank, packetSize); } private: eoEvalFunc & eval; + + eo::mpi::AssignmentAlgorithm & assignAlgo; + int masterRank; + int packetSize; }; #endif diff --git a/eo/test/t-eoMpiParallel.cpp b/eo/test/mpi/eval.cpp similarity index 90% rename from eo/test/t-eoMpiParallel.cpp rename to eo/test/mpi/eval.cpp index 5529b8e2c..7e15ac6f3 100644 --- a/eo/test/t-eoMpiParallel.cpp +++ b/eo/test/mpi/eval.cpp @@ -3,12 +3,19 @@ //----------------------------------------------------------------------------- #include +#include + #include -//#include -#include "real_value.h" +// #include +#include "../real_value.h" + +#include #include +#include +using namespace std; + //----------------------------------------------------------------------------- class eoRealSerializable : public eoReal< eoMinimizingFitness >, public eoserial::Persistent @@ -75,7 +82,7 @@ typedef eoRealSerializable EOT; int main(int ac, char** av) { - MpiSingletonFactory::init( ac, av ); + eo::mpi::Node::init( ac, av ); eoParser parser(ac, av); @@ -100,7 +107,10 @@ int main(int ac, char** av) eo::log << "Size of population : " << popSize << std::endl; - eoPopLoopEval< EOT > popEval( eval ); + eo::log << eo::setlevel( eo::debug ); + + eo::mpi::DynamicAssignmentAlgorithm assign; + eoParallelPopLoopEval< EOT > popEval( eval, assign, 0, 3 ); popEval( pop, pop ); eo::log << eo::quiet << "DONE!" << std::endl; From 7b399aa1ddfe72566c89bb5276f29705c6c2b9b7 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 26 Jun 2012 17:53:32 +0200 Subject: [PATCH 1951/2134] Putting time conditions into eo::mpi::Job and MultiParallelApply, which doesn't prefigure about number of workers evaluations. --- eo/src/apply.h | 7 ++--- eo/src/eoPopEvalFunc.h | 9 ++++--- eo/src/mpi/eoMpi.h | 34 ++++++++++++++++++++--- eo/src/mpi/eoMultiParallelApply.h | 45 +++++++++++++++++++++++++++++++ eo/src/mpi/eoParallelApply.h | 12 ++++++--- eo/src/mpi/eoTerminateJob.h | 42 +++++++++++++++++++++++++++++ 6 files changed, 136 insertions(+), 13 deletions(-) create mode 100644 eo/src/mpi/eoMultiParallelApply.h create mode 100644 eo/src/mpi/eoTerminateJob.h diff --git a/eo/src/apply.h b/eo/src/apply.h index c3c0365c3..7e59c21b8 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -35,7 +35,7 @@ # ifdef WITH_MPI # include -# include +# include # endif // WITH_MPI /** @@ -91,9 +91,10 @@ void parallelApply( std::vector& _pop, eo::mpi::AssignmentAlgorithm& _algo, int _masterRank, - int _packetSize) + int _packetSize, + int _maxTime) { - eo::mpi::ParallelApply job( _proc, _pop, _algo, _masterRank, _packetSize ); + eo::mpi::MultiParallelApply job( _proc, _pop, _algo, _masterRank, _packetSize, _maxTime ); job.run(); } #endif diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index 8885ef11d..77473eb15 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -87,12 +87,14 @@ public: eoEvalFunc & _eval, eo::mpi::AssignmentAlgorithm& _assignAlgo, int _masterRank, - int _packetSize = 1 + int _packetSize = 1, + int _maxTime = 0 ) : eval(_eval), assignAlgo( _assignAlgo ), masterRank( _masterRank ), - packetSize( _packetSize ) + packetSize( _packetSize ), + maxTime( _maxTime ) { // empty } @@ -101,7 +103,7 @@ public: void operator()(eoPop & _parents, eoPop & _offspring) { (void)_parents; - parallelApply(eval, _offspring, assignAlgo, masterRank, packetSize); + parallelApply(eval, _offspring, assignAlgo, masterRank, packetSize, maxTime); } private: @@ -110,6 +112,7 @@ private: eo::mpi::AssignmentAlgorithm & assignAlgo; int masterRank; int packetSize; + int maxTime; }; #endif diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index b12233c50..480bfbcbc 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -3,10 +3,15 @@ # include # include +# include +# include + # include +# include # include "eoMpiNode.h" # include "eoMpiAssignmentAlgorithm.h" + // TODO TODOB comment! namespace eo @@ -28,10 +33,11 @@ namespace eo { public: - Job( AssignmentAlgorithm& _algo, int _masterRank ) : + Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) : assignmentAlgo( _algo ), comm( Node::comm() ), - masterRank( _masterRank ) + masterRank( _masterRank ), + _maxTime( maxTime ) { _isMaster = Node::comm().rank() == _masterRank; } @@ -43,6 +49,8 @@ namespace eo // worker virtual void processTask( ) = 0; + protected: + void master( ) { int totalWorkers = assignmentAlgo.availableWorkers(); @@ -50,9 +58,18 @@ namespace eo eo::log << eo::debug; eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl; # endif - + bool timeStopped = false; while( ! isFinished() ) { + // Time restrictions + getrusage( RUSAGE_SELF , &_usage ); + _current = _usage.ru_utime.tv_sec + _usage.ru_stime.tv_sec; + if( _maxTime > 0 && _current > _maxTime ) + { + timeStopped = true; + break; + } + int assignee = assignmentAlgo.get( ); while( assignee <= 0 ) { @@ -71,6 +88,7 @@ namespace eo # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Assignee : " << assignee << std::endl; # endif + comm.send( assignee, Channel::Commands, Message::Continue ); sendTask( assignee ); } @@ -101,6 +119,10 @@ namespace eo # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; # endif + if( timeStopped ) + { + throw eoMaxTimeException( _current ); + } } void worker( ) @@ -131,6 +153,8 @@ namespace eo } } + public: + void run( ) { ( _isMaster ) ? master( ) : worker( ); @@ -146,6 +170,10 @@ namespace eo bmpi::communicator& comm; int masterRank; bool _isMaster; + + struct rusage _usage; + long _current; + const long _maxTime; }; } } diff --git a/eo/src/mpi/eoMultiParallelApply.h b/eo/src/mpi/eoMultiParallelApply.h new file mode 100644 index 000000000..f3df801d0 --- /dev/null +++ b/eo/src/mpi/eoMultiParallelApply.h @@ -0,0 +1,45 @@ + +# ifndef __EO_MULTI_PARALLEL_APPLY_H__ +# define __EO_MULTI_PARALLEL_APPLY_H__ + +# include "eoParallelApply.h" + +namespace eo +{ + namespace mpi + { + template< typename EOT > + class MultiParallelApply : public ParallelApply + { + public: + + // using ParallelApply::comm; + using ParallelApply::masterRank; + + MultiParallelApply( + eoUF & _proc, + std::vector& _pop, + AssignmentAlgorithm & algo, + int _masterRank, + int _packetSize = 1, + long _maxTime = 0 + ) : + ParallelApply( _proc, _pop, algo, _masterRank, _packetSize, _maxTime ) + { + // empty + } + + virtual void processTask( ) + { + int order = Message::Continue; + while( order != Message::Finish ) + { + ParallelApply::processTask( ); + ParallelApply::comm.recv( masterRank, Channel::Commands, order ); + } + } + }; + } +} +# endif // __EO_PARALLEL_APPLY_H__ + diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 1e9d4c1de..af0666cc6 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -26,9 +26,10 @@ namespace eo std::vector& _pop, AssignmentAlgorithm & algo, int _masterRank, - int _packetSize = 1 + int _packetSize = 1, + long _maxTime = 0 ) : - Job( algo, _masterRank ), + Job( algo, _masterRank, _maxTime ), func( _proc ), index( 0 ), size( _pop.size() ), @@ -42,7 +43,7 @@ namespace eo tempArray = new EOT[ packetSize ]; } - ~ParallelApply() + virtual ~ParallelApply() { delete [] tempArray; } @@ -59,8 +60,11 @@ namespace eo } int sentSize = futureIndex - index ; + comm.send( wrkRank, 1, sentSize ); + eo::log << eo::progress << "Evaluating individual " << index << std::endl; + assignedTasks[ wrkRank ].index = index; assignedTasks[ wrkRank ].size = sentSize; @@ -85,7 +89,7 @@ namespace eo comm.send( masterRank, 1, tempArray, recvSize ); } - bool isFinished() + virtual bool isFinished() { return index == size; } diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h new file mode 100644 index 000000000..4cb182255 --- /dev/null +++ b/eo/src/mpi/eoTerminateJob.h @@ -0,0 +1,42 @@ +# ifndef __EO_TERMINATE_H__ +# define __EO_TERMINATE_H__ + +# include "eoMpi.h" + +namespace eo +{ + namespace mpi + { + class TerminateJob : public Job + { + public: + TerminateJob( AssignmentAlgorithm& algo, int _ ) + : Job( algo, _ ) + { + // empty + } + + void sendTask( int wrkRank ) + { + // empty + } + + void handleResponse( int wrkRank ) + { + // empty + } + + void processTask( ) + { + // empty + } + + bool isFinished() + { + return true; + } + }; + } +} + +# endif // __EO_TERMINATE_H__ From 2861fc98de4f4fd6d2bbd508f62ac96594fa5d8e Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 27 Jun 2012 15:09:12 +0200 Subject: [PATCH 1952/2134] Mesuring time with eoTimer. --- eo/src/mpi/eoMpi.cpp | 1 + eo/src/mpi/eoMpi.h | 13 ++++ eo/src/mpi/eoParallelApply.h | 2 + eo/src/utils/eoTimer.h | 145 +++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+) create mode 100644 eo/src/utils/eoTimer.h diff --git a/eo/src/mpi/eoMpi.cpp b/eo/src/mpi/eoMpi.cpp index f6e3b3c52..9ffc84bda 100644 --- a/eo/src/mpi/eoMpi.cpp +++ b/eo/src/mpi/eoMpi.cpp @@ -6,6 +6,7 @@ namespace eo namespace mpi { bmpi::communicator Node::_comm; + eoTimerStat timerStat; } } diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 480bfbcbc..a516b442a 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -7,6 +7,7 @@ # include # include +# include # include # include "eoMpiNode.h" @@ -18,6 +19,8 @@ namespace eo { namespace mpi { + extern eoTimerStat timerStat; + namespace Channel { const int Commands = 0; @@ -70,6 +73,7 @@ namespace eo break; } + timerStat.start("master_wait_for_assignee"); int assignee = assignmentAlgo.get( ); while( assignee <= 0 ) { @@ -85,28 +89,34 @@ namespace eo assignmentAlgo.confirm( wrkRank ); assignee = assignmentAlgo.get( ); } + timerStat.stop("master_wait_for_assignee"); # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Assignee : " << assignee << std::endl; # endif + timerStat.start("master_wait_for_send"); comm.send( assignee, Channel::Commands, Message::Continue ); sendTask( assignee ); + timerStat.stop("master_wait_for_send"); } # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Frees all the idle." << std::endl; # endif // frees all the idle workers + timerStat.start("master_wait_for_idles"); std::vector idles = assignmentAlgo.idles(); for(unsigned int i = 0; i < idles.size(); ++i) { comm.send( idles[i], Channel::Commands, Message::Finish ); } + timerStat.stop("master_wait_for_idles"); # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Waits for all responses." << std::endl; # endif // wait for all responses + timerStat.start("master_wait_for_all_responses"); while( assignmentAlgo.availableWorkers() != totalWorkers ) { bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); @@ -115,6 +125,7 @@ namespace eo comm.send( wrkRank, Channel::Commands, Message::Finish ); assignmentAlgo.confirm( wrkRank ); } + timerStat.stop("master_wait_for_all_responses"); # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; @@ -136,7 +147,9 @@ namespace eo # ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; # endif + timerStat.start("worker_wait_for_order"); comm.recv( masterRank, Channel::Commands, order ); + timerStat.stop("worker_wait_for_order"); if ( order == Message::Finish ) { # ifndef NDEBUG diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index af0666cc6..b89da73e4 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -82,10 +82,12 @@ namespace eo int recvSize; comm.recv( masterRank, 1, recvSize ); comm.recv( masterRank, 1, tempArray, recvSize ); + timerStat.start("worker_processes"); for( int i = 0; i < recvSize ; ++i ) { func( tempArray[ i ] ); } + timerStat.stop("worker_processes"); comm.send( masterRank, 1, tempArray, recvSize ); } diff --git a/eo/src/utils/eoTimer.h b/eo/src/utils/eoTimer.h new file mode 100644 index 000000000..c97ab5d35 --- /dev/null +++ b/eo/src/utils/eoTimer.h @@ -0,0 +1,145 @@ +# ifndef __TIMER_H__ +# define __TIMER_H__ + +# include +# include + +# include +# include + +# ifdef WITH_MPI +# include +# include +# include +# endif + +// TODO TODOB commenter +class eoTimer +{ + public: + + eoTimer() + { + restart(); + } + + void restart() + { + uuremainder = 0; + usremainder = 0; + wc_start = time(NULL); + getrusage( RUSAGE_SELF, &_start ); + } + + long int usertime() + { + struct rusage _now; + getrusage( RUSAGE_SELF, &_now ); + long int result = _now.ru_utime.tv_sec - _start.ru_utime.tv_sec; + if( _now.ru_utime.tv_sec == _start.ru_utime.tv_sec ) + { + uuremainder += _now.ru_utime.tv_usec - _start.ru_utime.tv_usec; + if( uuremainder > 1000000) + { + ++result; + uuremainder = 0; + } + } + return result; + } + + long int systime() + { + struct rusage _now; + getrusage( RUSAGE_SELF, &_now ); + long int result = _now.ru_stime.tv_sec - _start.ru_stime.tv_sec; + if( _now.ru_stime.tv_sec == _start.ru_stime.tv_sec ) + { + usremainder += _now.ru_stime.tv_usec - _start.ru_stime.tv_usec; + if( usremainder > 1000000) + { + ++result; + usremainder = 0; + } + } + return result; + } + + double wallclock() + { + return std::difftime( std::time(NULL) , wc_start ); + } + + protected: + struct rusage _start; + long int uuremainder; + long int usremainder; + time_t wc_start; +}; + +class eoTimerStat +{ + public: + + struct Stat + { + std::vector utime; + std::vector stime; + std::vector wtime; +#ifdef WITH_MPI + // Gives access to boost serialization + friend class boost::serialization::access; + + /** + * Serializes the statistique in a boost archive (useful for boost::mpi) + */ + template + void serialize( Archive & ar, const unsigned int version ) + { + ar & utime & stime & wtime; + (void) version; // avoid compilation warning + } +# endif + }; + +#ifdef WITH_MPI + // Gives access to boost serialization + friend class boost::serialization::access; + + /** + * Serializes the map of statistics in a boost archive (useful for boost::mpi) + */ + template + void serialize( Archive & ar, const unsigned int version ) + { + ar & _stats; + (void) version; // avoid compilation warning + } +# endif + + void start( const std::string & key ) + { + _timers[ key ].restart(); + } + + void stop( const std::string& key ) + { + Stat & s = _stats[ key ]; + eoTimer & t = _timers[ key ]; + s.utime.push_back( t.usertime() ); + s.stime.push_back( t.systime() ); + s.wtime.push_back( t.wallclock() ); + } + + std::map< std::string, Stat > stats() + { + return _stats; + } + + protected: + std::map< std::string, Stat > _stats; + std::map< std::string, eoTimer > _timers; +}; + +# endif // __TIMER_H__ + From 4675abaa24becca1c6f5d2bdecf2dbf9a72f8b20 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 29 Jun 2012 18:19:55 +0200 Subject: [PATCH 1953/2134] Implementation test of functional configurable job --- eo/src/mpi/eoMpi.h | 67 ++++++++- eo/src/mpi/eoParallelApply.h | 262 ++++++++++++++++++++++++----------- 2 files changed, 245 insertions(+), 84 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index a516b442a..6d22a1bf2 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -8,6 +8,7 @@ # include # include +# include # include # include "eoMpiNode.h" @@ -32,28 +33,84 @@ namespace eo const int Finish = 1; } + template + struct SharedDataFunction + { + void data( Data & _d ) { d = _d; } + + protected: + Data d; + }; + + template + struct SendTaskFunction : public eoUF, public SharedDataFunction + { + virtual ~SendTaskFunction() {} + }; + + template + struct HandleResponseFunction : public eoUF, public SharedDataFunction + { + virtual ~HandleResponseFunction() {} + }; + + template + struct ProcessTaskFunction : public eoF, public SharedDataFunction + { + virtual ~ProcessTaskFunction() {} + }; + + template + struct IsFinishedFunction : public eoF, public SharedDataFunction + { + virtual ~IsFinishedFunction() {} + }; + + template + struct JobStore + { + virtual SendTaskFunction & sendTask() = 0; + virtual HandleResponseFunction & handleResponse() = 0; + virtual ProcessTaskFunction & processTask() = 0; + virtual IsFinishedFunction & isFinished() = 0; + }; + + template class Job { public: - Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) : + Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore store ) : + // Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) : assignmentAlgo( _algo ), comm( Node::comm() ), + // _maxTime( maxTime ), masterRank( _masterRank ), - _maxTime( maxTime ) + // Functors + sendTask( store.sendTask() ), + handleResponse( store.handleResponse() ), + processTask( store.processTask() ), + isFinished( store.isFinished() ) { _isMaster = Node::comm().rank() == _masterRank; } + /* // master virtual bool isFinished() = 0; virtual void sendTask( int wrkRank ) = 0; virtual void handleResponse( int wrkRank ) = 0; // worker virtual void processTask( ) = 0; + */ protected: + SendTaskFunction & sendTask; + HandleResponseFunction & handleResponse; + ProcessTaskFunction & processTask; + IsFinishedFunction & isFinished; + void master( ) { int totalWorkers = assignmentAlgo.availableWorkers(); @@ -65,6 +122,7 @@ namespace eo while( ! isFinished() ) { // Time restrictions + /* getrusage( RUSAGE_SELF , &_usage ); _current = _usage.ru_utime.tv_sec + _usage.ru_stime.tv_sec; if( _maxTime > 0 && _current > _maxTime ) @@ -72,6 +130,7 @@ namespace eo timeStopped = true; break; } + */ timerStat.start("master_wait_for_assignee"); int assignee = assignmentAlgo.get( ); @@ -130,10 +189,12 @@ namespace eo # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; # endif + /* if( timeStopped ) { throw eoMaxTimeException( _current ); } + */ } void worker( ) @@ -186,7 +247,7 @@ namespace eo struct rusage _usage; long _current; - const long _maxTime; + // const long _maxTime; }; } } diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index b89da73e4..6ec78c800 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -10,15 +10,177 @@ namespace eo { namespace mpi { - template< typename EOT > - class ParallelApply : public Job + struct ParallelApplyAssignment { - private: - struct ParallelApplyAssignment + int index; + int size; + }; + + template + struct ParallelApplyData + { + ParallelApplyData() {} + + ParallelApplyData( + eoUF & _proc, + std::vector& _pop, + int _masterRank, + int _packetSize + ) : + func( _proc ), + data( _pop ), + index( 0 ), + size( _pop.size() ), + packetSize( _packetSize ), + // job + masterRank( _masterRank ), + comm( Node::comm() ) + { + tempArray = new EOT[ _packetSize ]; + } + + ~ParallelApplyData() + { + delete [] tempArray; + } + + std::vector & data; + eoUF & func; + int index; + int size; + std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; + + int packetSize; + EOT* tempArray; + + int masterRank; + bmpi::communicator& comm; + }; + + template + struct SendTaskParallelApply : public SendTaskFunction< Data > + { + SendTaskParallelApply( Data & _d ) + { + data( _d ); + } + + using SharedDataFunction< Data >::d; + + // futureIndex, index, packetSize, size, comm, assignedTasks, data + void operator()(int wrkRank) + { + int futureIndex; + + if( d.index + d.packetSize < d.size ) { - int index; - int size; - }; + futureIndex = d.index + d.packetSize; + } else { + futureIndex = d.size; + } + + int sentSize = futureIndex - d.index ; + + d.comm.send( wrkRank, 1, sentSize ); + + eo::log << eo::progress << "Evaluating individual " << d.index << std::endl; + + d.assignedTasks[ wrkRank ].index = d.index; + d.assignedTasks[ wrkRank ].size = sentSize; + + d.comm.send( wrkRank, 1, & (d.data[ index ]) , sentSize ); + d.index = futureIndex; + } + }; + + template + struct HandleResponseParallelApply : public HandleResponseFunction< Data > + { + HandleResponseParallelApply( Data & _d ) + { + data( _d ); + } + + using SharedDataFunction< Data >::d; + void operator()(int wrkRank) + { + d.comm.recv( wrkRank, 1, & (d.data[ d.assignedTasks[wrkRank].index ] ), d.assignedTasks[wrkRank].size ); + } + }; + + template + struct ProcessTaskParallelApply : public ProcessTaskFunction< Data > + { + ProcessTaskParallelApply( Data & _d ) + { + data( _d ); + } + + using SharedDataFunction< Data >::d; + void operator()() + { + int recvSize; + d.comm.recv( d.masterRank, 1, recvSize ); + d.comm.recv( d.masterRank, 1, d.tempArray, recvSize ); + timerStat.start("worker_processes"); + for( int i = 0; i < recvSize ; ++i ) + { + d.func( d.tempArray[ i ] ); + } + timerStat.stop("worker_processes"); + d.comm.send( d.masterRank, 1, d.tempArray, recvSize ); + } + }; + + template + struct IsFinishedParallelApply : public IsFinishedFunction< Data > + { + IsFinishedParallelApply( Data & _d ) + { + data( _d ); + } + + using SharedDataFunction< Data >::d; + bool operator()() + { + return d.index == d.size; + } + }; + + template< typename Data > + struct ParallelApplyStore : public JobStore< Data > + { + ParallelApplyStore( Data & data ) + { + stpa = new SendTaskParallelApply< Data >( data ); + hrpa = new HandleResponseParallelApply< Data >( data ); + ptpa = new ProcessTaskParallelApply< Data >( data ); + ispa = new IsFinishedParallelApply< Data >( data ); + } + + ~ParallelApplyStore() + { + delete stpa; + delete hrpa; + delete ptpa; + delete ispa; + } + + SendTaskFunction< Data > & sendTask() { return *stpa; } + HandleResponseFunction< Data > & handleResponse() { return *hrpa; } + ProcessTaskFunction< Data > & processTask() { return *ptpa; } + IsFinishedFunction< Data > & isFinished() { return *ispa; } + + protected: + SendTaskParallelApply< Data >* stpa; + HandleResponseParallelApply< Data >* hrpa; + ProcessTaskParallelApply< Data >* ptpa; + IsFinishedParallelApply< Data >* ispa; + }; + + template< typename EOT > + class ParallelApply : public Job< ParallelApplyData > + { public: ParallelApply( @@ -26,85 +188,23 @@ namespace eo std::vector& _pop, AssignmentAlgorithm & algo, int _masterRank, - int _packetSize = 1, - long _maxTime = 0 + // long _maxTime = 0, + int _packetSize = 1 ) : - Job( algo, _masterRank, _maxTime ), - func( _proc ), - index( 0 ), - size( _pop.size() ), - data( _pop ), - packetSize( _packetSize ) + + Job< ParallelApplyData >( algo, _masterRank, ParallelApplyStore< ParallelApplyData >( sharedData ) ), + // Job( algo, _masterRank, _maxTime ), + sharedData( _proc, _pop, _masterRank, _packetSize ) + + { + if ( _packetSize <= 0 ) { - if ( _packetSize <= 0 ) - { - throw std::runtime_error("Packet size should not be negative."); - } - tempArray = new EOT[ packetSize ]; - } - - virtual ~ParallelApply() - { - delete [] tempArray; - } - - virtual void sendTask( int wrkRank ) - { - int futureIndex; - - if( index + packetSize < size ) - { - futureIndex = index + packetSize; - } else { - futureIndex = size; - } - - int sentSize = futureIndex - index ; - - comm.send( wrkRank, 1, sentSize ); - - eo::log << eo::progress << "Evaluating individual " << index << std::endl; - - assignedTasks[ wrkRank ].index = index; - assignedTasks[ wrkRank ].size = sentSize; - - comm.send( wrkRank, 1, &data[ index ] , sentSize ); - index = futureIndex; - } - - virtual void handleResponse( int wrkRank ) - { - comm.recv( wrkRank, 1, &data[ assignedTasks[wrkRank].index ], assignedTasks[wrkRank].size ); - } - - virtual void processTask( ) - { - int recvSize; - comm.recv( masterRank, 1, recvSize ); - comm.recv( masterRank, 1, tempArray, recvSize ); - timerStat.start("worker_processes"); - for( int i = 0; i < recvSize ; ++i ) - { - func( tempArray[ i ] ); - } - timerStat.stop("worker_processes"); - comm.send( masterRank, 1, tempArray, recvSize ); - } - - virtual bool isFinished() - { - return index == size; + throw std::runtime_error("Packet size should not be negative."); } + } protected: - std::vector & data; - eoUF& func; - int index; - int size; - std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; - - int packetSize; - EOT* tempArray; + ParallelApplyData sharedData; }; } } From d05cbfd60dc2cbe104434168c7ed9730ed50c028 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 2 Jul 2012 11:56:41 +0200 Subject: [PATCH 1954/2134] First version of functional job --- eo/src/mpi/eoMpi.h | 46 +++---- eo/src/mpi/eoParallelApply.h | 232 +++++++++++++++++----------------- eo/test/mpi/parallelApply.cpp | 7 +- 3 files changed, 140 insertions(+), 145 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 6d22a1bf2..433e4c272 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -33,54 +33,42 @@ namespace eo const int Finish = 1; } - template - struct SharedDataFunction - { - void data( Data & _d ) { d = _d; } - - protected: - Data d; - }; - - template - struct SendTaskFunction : public eoUF, public SharedDataFunction + class SendTaskFunction : public eoUF { + public: virtual ~SendTaskFunction() {} }; - template - struct HandleResponseFunction : public eoUF, public SharedDataFunction + class HandleResponseFunction : public eoUF { + public: virtual ~HandleResponseFunction() {} }; - template - struct ProcessTaskFunction : public eoF, public SharedDataFunction + class ProcessTaskFunction : public eoF { + public: virtual ~ProcessTaskFunction() {} }; - template - struct IsFinishedFunction : public eoF, public SharedDataFunction + class IsFinishedFunction : public eoF { + public: virtual ~IsFinishedFunction() {} }; - template struct JobStore { - virtual SendTaskFunction & sendTask() = 0; - virtual HandleResponseFunction & handleResponse() = 0; - virtual ProcessTaskFunction & processTask() = 0; - virtual IsFinishedFunction & isFinished() = 0; + virtual SendTaskFunction & sendTask() const = 0; + virtual HandleResponseFunction & handleResponse() const = 0; + virtual ProcessTaskFunction & processTask() const = 0; + virtual IsFinishedFunction & isFinished() const = 0; }; - template class Job { public: - - Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore store ) : + Job( AssignmentAlgorithm& _algo, int _masterRank, const JobStore & store ) : // Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) : assignmentAlgo( _algo ), comm( Node::comm() ), @@ -106,10 +94,10 @@ namespace eo protected: - SendTaskFunction & sendTask; - HandleResponseFunction & handleResponse; - ProcessTaskFunction & processTask; - IsFinishedFunction & isFinished; + SendTaskFunction & sendTask; + HandleResponseFunction & handleResponse; + ProcessTaskFunction & processTask; + IsFinishedFunction & isFinished; void master( ) { diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 6ec78c800..9cc7bb5f6 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -17,145 +17,178 @@ namespace eo }; template - struct ParallelApplyData - { - ParallelApplyData() {} + class SendTaskParallelApply; - ParallelApplyData( - eoUF & _proc, - std::vector& _pop, - int _masterRank, - int _packetSize - ) : - func( _proc ), - data( _pop ), - index( 0 ), - size( _pop.size() ), - packetSize( _packetSize ), - // job - masterRank( _masterRank ), - comm( Node::comm() ) + template + class HandleResponseParallelApply; + + template + class ProcessTaskParallelApply; + + template + class IsFinishedParallelApply; + + template + class ParallelApply; + + template< class EOT > + class BaseParallelApply + { + public: + void owner(ParallelApply * job) { - tempArray = new EOT[ _packetSize ]; + j = job; } - ~ParallelApplyData() - { - delete [] tempArray; - } + protected: + ParallelApply * j; + }; + + template< typename EOT > + class ParallelApply : public Job + { + friend class SendTaskParallelApply; + friend class HandleResponseParallelApply; + friend class ProcessTaskParallelApply; + friend class IsFinishedParallelApply; + + public: + + ParallelApply( + eoUF & _proc, + std::vector& _pop, + AssignmentAlgorithm & algo, + int _masterRank, + const JobStore& store, + // long _maxTime = 0, + int _packetSize = 1 + ) : + Job( algo, _masterRank, store ), + // Job( algo, _masterRank, _maxTime ), + func( _proc ), + data( _pop ), + packetSize( _packetSize ), + index( 0 ), + size( _pop.size() ) + { + if ( _packetSize <= 0 ) + { + throw std::runtime_error("Packet size should not be negative."); + } + tempArray = new EOT [ _packetSize ]; + + dynamic_cast< BaseParallelApply& >( sendTask ).owner( this ); + dynamic_cast< BaseParallelApply& >( handleResponse ).owner( this ); + dynamic_cast< BaseParallelApply& >( processTask ).owner( this ); + dynamic_cast< BaseParallelApply& >( isFinished ).owner( this ); + } + + ~ParallelApply() + { + delete [] tempArray; + } + + protected: std::vector & data; eoUF & func; int index; int size; std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; - int packetSize; EOT* tempArray; - int masterRank; - bmpi::communicator& comm; + // bmpi::communicator& comm; }; - template - struct SendTaskParallelApply : public SendTaskFunction< Data > + template< class EOT > + class SendTaskParallelApply : public SendTaskFunction, public BaseParallelApply { - SendTaskParallelApply( Data & _d ) - { - data( _d ); - } - - using SharedDataFunction< Data >::d; + public: + using BaseParallelApply::j; // futureIndex, index, packetSize, size, comm, assignedTasks, data void operator()(int wrkRank) { int futureIndex; - if( d.index + d.packetSize < d.size ) + if( j->index + j->packetSize < j->size ) { - futureIndex = d.index + d.packetSize; + futureIndex = j->index + j->packetSize; } else { - futureIndex = d.size; + futureIndex = j->size; } - int sentSize = futureIndex - d.index ; + int sentSize = futureIndex - j->index ; - d.comm.send( wrkRank, 1, sentSize ); + j->comm.send( wrkRank, 1, sentSize ); - eo::log << eo::progress << "Evaluating individual " << d.index << std::endl; + eo::log << eo::progress << "Evaluating individual " << j->index << std::endl; - d.assignedTasks[ wrkRank ].index = d.index; - d.assignedTasks[ wrkRank ].size = sentSize; + j->assignedTasks[ wrkRank ].index = j->index; + j->assignedTasks[ wrkRank ].size = sentSize; - d.comm.send( wrkRank, 1, & (d.data[ index ]) , sentSize ); - d.index = futureIndex; + j->comm.send( wrkRank, 1, & ( (j->data)[ j->index ] ) , sentSize ); + j->index = futureIndex; } }; - template - struct HandleResponseParallelApply : public HandleResponseFunction< Data > + template< class EOT > + class HandleResponseParallelApply : public HandleResponseFunction, public BaseParallelApply { - HandleResponseParallelApply( Data & _d ) - { - data( _d ); - } + public: + using BaseParallelApply::j; - using SharedDataFunction< Data >::d; void operator()(int wrkRank) { - d.comm.recv( wrkRank, 1, & (d.data[ d.assignedTasks[wrkRank].index ] ), d.assignedTasks[wrkRank].size ); + j->comm.recv( wrkRank, 1, & (j->data[ j->assignedTasks[wrkRank].index ] ), j->assignedTasks[wrkRank].size ); } }; - template - struct ProcessTaskParallelApply : public ProcessTaskFunction< Data > + template< class EOT > + class ProcessTaskParallelApply : public ProcessTaskFunction, public BaseParallelApply { - ProcessTaskParallelApply( Data & _d ) - { - data( _d ); - } + public: + using BaseParallelApply::j; - using SharedDataFunction< Data >::d; void operator()() { int recvSize; - d.comm.recv( d.masterRank, 1, recvSize ); - d.comm.recv( d.masterRank, 1, d.tempArray, recvSize ); + + j->comm.recv( j->masterRank, 1, recvSize ); + j->comm.recv( j->masterRank, 1, j->tempArray, recvSize ); timerStat.start("worker_processes"); for( int i = 0; i < recvSize ; ++i ) { - d.func( d.tempArray[ i ] ); + j->func( j->tempArray[ i ] ); } timerStat.stop("worker_processes"); - d.comm.send( d.masterRank, 1, d.tempArray, recvSize ); + j->comm.send( j->masterRank, 1, j->tempArray, recvSize ); } }; - template - struct IsFinishedParallelApply : public IsFinishedFunction< Data > + template< class EOT > + class IsFinishedParallelApply : public IsFinishedFunction, public BaseParallelApply { - IsFinishedParallelApply( Data & _d ) - { - data( _d ); - } + public: + + using BaseParallelApply::j; - using SharedDataFunction< Data >::d; bool operator()() { - return d.index == d.size; + return j->index == j->size; } }; - template< typename Data > - struct ParallelApplyStore : public JobStore< Data > + template< class EOT > + struct ParallelApplyStore : public JobStore { - ParallelApplyStore( Data & data ) + ParallelApplyStore() { - stpa = new SendTaskParallelApply< Data >( data ); - hrpa = new HandleResponseParallelApply< Data >( data ); - ptpa = new ProcessTaskParallelApply< Data >( data ); - ispa = new IsFinishedParallelApply< Data >( data ); + stpa = new SendTaskParallelApply; + hrpa = new HandleResponseParallelApply; + ptpa = new ProcessTaskParallelApply; + ispa = new IsFinishedParallelApply; } ~ParallelApplyStore() @@ -166,45 +199,16 @@ namespace eo delete ispa; } - SendTaskFunction< Data > & sendTask() { return *stpa; } - HandleResponseFunction< Data > & handleResponse() { return *hrpa; } - ProcessTaskFunction< Data > & processTask() { return *ptpa; } - IsFinishedFunction< Data > & isFinished() { return *ispa; } + SendTaskFunction& sendTask() const { return *stpa; } + HandleResponseFunction& handleResponse() const { return *hrpa; } + ProcessTaskFunction& processTask() const { return *ptpa; } + IsFinishedFunction& isFinished() const { return *ispa; } protected: - SendTaskParallelApply< Data >* stpa; - HandleResponseParallelApply< Data >* hrpa; - ProcessTaskParallelApply< Data >* ptpa; - IsFinishedParallelApply< Data >* ispa; - }; - - template< typename EOT > - class ParallelApply : public Job< ParallelApplyData > - { - public: - - ParallelApply( - eoUF & _proc, - std::vector& _pop, - AssignmentAlgorithm & algo, - int _masterRank, - // long _maxTime = 0, - int _packetSize = 1 - ) : - - Job< ParallelApplyData >( algo, _masterRank, ParallelApplyStore< ParallelApplyData >( sharedData ) ), - // Job( algo, _masterRank, _maxTime ), - sharedData( _proc, _pop, _masterRank, _packetSize ) - - { - if ( _packetSize <= 0 ) - { - throw std::runtime_error("Packet size should not be negative."); - } - } - - protected: - ParallelApplyData sharedData; + SendTaskParallelApply* stpa; + HandleResponseParallelApply* hrpa; + ProcessTaskParallelApply* ptpa; + IsFinishedParallelApply* ispa; }; } } diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 82f4e0e70..18aadd549 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -27,7 +27,8 @@ struct Test int main(int argc, char** argv) { // eo::log << eo::setlevel( eo::debug ); - bool launchOnlyOne = false; // Set this to true if you wanna launch only the first test. + eo::log << eo::setlevel( eo::quiet ); + bool launchOnlyOne = false ; // Set this to true if you wanna launch only the first test. Node::init( argc, argv ); @@ -44,6 +45,8 @@ int main(int argc, char** argv) plusOne plusOneInstance; vector< Test > tests; + + ParallelApplyStore store; const int ALL = Node::comm().size(); @@ -109,7 +112,7 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { - ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, 3 ); + ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 ); if( job.isMaster() ) { From ff61676fb7ac5e17e625202732bde8773173ba48 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 2 Jul 2012 17:53:02 +0200 Subject: [PATCH 1955/2134] Cleaner version of functional parallel job. --- eo/src/mpi/eoMpi.h | 80 +++++++++++++--- eo/src/mpi/eoParallelApply.h | 173 ++++++++++++++++------------------ eo/test/mpi/parallelApply.cpp | 8 +- 3 files changed, 154 insertions(+), 107 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 433e4c272..9ad2bd7bf 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -33,42 +33,91 @@ namespace eo const int Finish = 1; } - class SendTaskFunction : public eoUF + template< typename JobData, typename Wrapped > + struct SharedDataFunction + { + SharedDataFunction( Wrapped * w ) + { + wrapped = w; + } + + void data( JobData* _d ) + { + d = _d; + } + + protected: + JobData* d; + Wrapped* wrapped; + }; + + template< typename JobData > + struct SendTaskFunction : public eoUF, public SharedDataFunction< JobData, SendTaskFunction > { public: + + SendTaskFunction( SendTaskFunction* w = 0 ) : SharedDataFunction >( w ) + { + // empty + } + virtual ~SendTaskFunction() {} }; - class HandleResponseFunction : public eoUF + template< typename JobData > + struct HandleResponseFunction : public eoUF, public SharedDataFunction< JobData, HandleResponseFunction > { public: + + HandleResponseFunction( HandleResponseFunction* w = 0 ) : SharedDataFunction >( w ) + { + // empty + } + virtual ~HandleResponseFunction() {} }; - class ProcessTaskFunction : public eoF + template< typename JobData > + struct ProcessTaskFunction : public eoF, public SharedDataFunction< JobData, ProcessTaskFunction > { public: + + ProcessTaskFunction( ProcessTaskFunction* w = 0 ) : SharedDataFunction >( w ) + { + // empty + } + virtual ~ProcessTaskFunction() {} }; - class IsFinishedFunction : public eoF + template< typename JobData > + struct IsFinishedFunction : public eoF, public SharedDataFunction< JobData, IsFinishedFunction > { public: + + IsFinishedFunction( IsFinishedFunction* w = 0 ) : SharedDataFunction >( w ) + { + // empty + } + virtual ~IsFinishedFunction() {} }; + template< typename JobData > struct JobStore { - virtual SendTaskFunction & sendTask() const = 0; - virtual HandleResponseFunction & handleResponse() const = 0; - virtual ProcessTaskFunction & processTask() const = 0; - virtual IsFinishedFunction & isFinished() const = 0; + virtual SendTaskFunction & sendTask() const = 0; + virtual HandleResponseFunction & handleResponse() const = 0; + virtual ProcessTaskFunction & processTask() const = 0; + virtual IsFinishedFunction & isFinished() const = 0; + virtual JobData* data() = 0; }; + template< class JobData > class Job { public: - Job( AssignmentAlgorithm& _algo, int _masterRank, const JobStore & store ) : + Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore & store ) : // Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) : assignmentAlgo( _algo ), comm( Node::comm() ), @@ -81,6 +130,11 @@ namespace eo isFinished( store.isFinished() ) { _isMaster = Node::comm().rank() == _masterRank; + + sendTask.data( store.data() ); + handleResponse.data( store.data() ); + processTask.data( store.data() ); + isFinished.data( store.data() ); } /* @@ -94,10 +148,10 @@ namespace eo protected: - SendTaskFunction & sendTask; - HandleResponseFunction & handleResponse; - ProcessTaskFunction & processTask; - IsFinishedFunction & isFinished; + SendTaskFunction & sendTask; + HandleResponseFunction & handleResponse; + ProcessTaskFunction & processTask; + IsFinishedFunction & isFinished; void master( ) { diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 9cc7bb5f6..bc85d4387 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -17,79 +17,29 @@ namespace eo }; template - class SendTaskParallelApply; - - template - class HandleResponseParallelApply; - - template - class ProcessTaskParallelApply; - - template - class IsFinishedParallelApply; - - template - class ParallelApply; - - template< class EOT > - class BaseParallelApply + struct JobData { - public: - void owner(ParallelApply * job) - { - j = job; - } - - protected: - ParallelApply * j; - }; - - template< typename EOT > - class ParallelApply : public Job - { - friend class SendTaskParallelApply; - friend class HandleResponseParallelApply; - friend class ProcessTaskParallelApply; - friend class IsFinishedParallelApply; - - public: - - ParallelApply( + JobData( eoUF & _proc, std::vector& _pop, - AssignmentAlgorithm & algo, int _masterRank, - const JobStore& store, // long _maxTime = 0, - int _packetSize = 1 - ) : - Job( algo, _masterRank, store ), - // Job( algo, _masterRank, _maxTime ), - func( _proc ), - data( _pop ), - packetSize( _packetSize ), - index( 0 ), - size( _pop.size() ) + int _packetSize + ) : + data( _pop ), func( _proc ), index( 0 ), size( _pop.size() ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) { if ( _packetSize <= 0 ) { throw std::runtime_error("Packet size should not be negative."); } - tempArray = new EOT [ _packetSize ]; - - dynamic_cast< BaseParallelApply& >( sendTask ).owner( this ); - dynamic_cast< BaseParallelApply& >( handleResponse ).owner( this ); - dynamic_cast< BaseParallelApply& >( processTask ).owner( this ); - dynamic_cast< BaseParallelApply& >( isFinished ).owner( this ); + tempArray = new EOT[ _packetSize ]; } - ~ParallelApply() + ~JobData() { delete [] tempArray; } - protected: - std::vector & data; eoUF & func; int index; @@ -98,92 +48,131 @@ namespace eo int packetSize; EOT* tempArray; - // bmpi::communicator& comm; + int masterRank; + bmpi::communicator& comm; }; - template< class EOT > - class SendTaskParallelApply : public SendTaskFunction, public BaseParallelApply + /* + template< typename EOT > + class ParallelApply : public Job< JobData > { public: - using BaseParallelApply::j; + + ParallelApply( + // eoUF & _proc, + // std::vector& _pop, + AssignmentAlgorithm & algo, + int _masterRank, + const JobStore< JobData >& store + // long _maxTime = 0, + // int _packetSize = 1 + ) : + Job( algo, _masterRank, store ) + // Job( algo, _masterRank, _maxTime ), + func( _proc ), + data( _pop ), + packetSize( _packetSize ), + index( 0 ), + size( _pop.size() ) + { + // empty + } + + protected: + + // bmpi::communicator& comm; + }; + */ + + template< class EOT > + class SendTaskParallelApply : public SendTaskFunction< JobData > + { + public: + using SendTaskFunction< JobData >::d; // futureIndex, index, packetSize, size, comm, assignedTasks, data void operator()(int wrkRank) { int futureIndex; - if( j->index + j->packetSize < j->size ) + if( d->index + d->packetSize < d->size ) { - futureIndex = j->index + j->packetSize; + futureIndex = d->index + d->packetSize; } else { - futureIndex = j->size; + futureIndex = d->size; } - int sentSize = futureIndex - j->index ; + int sentSize = futureIndex - d->index ; - j->comm.send( wrkRank, 1, sentSize ); + d->comm.send( wrkRank, 1, sentSize ); - eo::log << eo::progress << "Evaluating individual " << j->index << std::endl; + eo::log << eo::progress << "Evaluating individual " << d->index << std::endl; - j->assignedTasks[ wrkRank ].index = j->index; - j->assignedTasks[ wrkRank ].size = sentSize; + d->assignedTasks[ wrkRank ].index = d->index; + d->assignedTasks[ wrkRank ].size = sentSize; - j->comm.send( wrkRank, 1, & ( (j->data)[ j->index ] ) , sentSize ); - j->index = futureIndex; + d->comm.send( wrkRank, 1, & ( (d->data)[ d->index ] ) , sentSize ); + d->index = futureIndex; } }; template< class EOT > - class HandleResponseParallelApply : public HandleResponseFunction, public BaseParallelApply + class HandleResponseParallelApply : public HandleResponseFunction< JobData > { public: - using BaseParallelApply::j; + using HandleResponseFunction< JobData >::d; void operator()(int wrkRank) { - j->comm.recv( wrkRank, 1, & (j->data[ j->assignedTasks[wrkRank].index ] ), j->assignedTasks[wrkRank].size ); + d->comm.recv( wrkRank, 1, & (d->data[ d->assignedTasks[wrkRank].index ] ), d->assignedTasks[wrkRank].size ); } }; template< class EOT > - class ProcessTaskParallelApply : public ProcessTaskFunction, public BaseParallelApply + class ProcessTaskParallelApply : public ProcessTaskFunction< JobData > { public: - using BaseParallelApply::j; + using ProcessTaskFunction< JobData >::d; void operator()() { int recvSize; - j->comm.recv( j->masterRank, 1, recvSize ); - j->comm.recv( j->masterRank, 1, j->tempArray, recvSize ); + d->comm.recv( d->masterRank, 1, recvSize ); + d->comm.recv( d->masterRank, 1, d->tempArray, recvSize ); timerStat.start("worker_processes"); for( int i = 0; i < recvSize ; ++i ) { - j->func( j->tempArray[ i ] ); + d->func( d->tempArray[ i ] ); } timerStat.stop("worker_processes"); - j->comm.send( j->masterRank, 1, j->tempArray, recvSize ); + d->comm.send( d->masterRank, 1, d->tempArray, recvSize ); } }; template< class EOT > - class IsFinishedParallelApply : public IsFinishedFunction, public BaseParallelApply + class IsFinishedParallelApply : public IsFinishedFunction< JobData > { public: - - using BaseParallelApply::j; + using IsFinishedFunction< JobData >::d; bool operator()() { - return j->index == j->size; + return d->index == d->size; } }; template< class EOT > - struct ParallelApplyStore : public JobStore + struct ParallelApplyStore : public JobStore< JobData > { - ParallelApplyStore() + ParallelApplyStore( + eoUF & _proc, + std::vector& _pop, + int _masterRank, + // long _maxTime = 0, + int _packetSize = 1 + ) + : j( _proc, _pop, _masterRank, _packetSize ) { stpa = new SendTaskParallelApply; hrpa = new HandleResponseParallelApply; @@ -199,16 +188,20 @@ namespace eo delete ispa; } - SendTaskFunction& sendTask() const { return *stpa; } - HandleResponseFunction& handleResponse() const { return *hrpa; } - ProcessTaskFunction& processTask() const { return *ptpa; } - IsFinishedFunction& isFinished() const { return *ispa; } + SendTaskFunction< JobData >& sendTask() const { return *stpa; } + HandleResponseFunction< JobData >& handleResponse() const { return *hrpa; } + ProcessTaskFunction< JobData >& processTask() const { return *ptpa; } + IsFinishedFunction< JobData >& isFinished() const { return *ispa; } + + JobData* data() { return &j; } protected: SendTaskParallelApply* stpa; HandleResponseParallelApply* hrpa; ProcessTaskParallelApply* ptpa; IsFinishedParallelApply* ispa; + + JobData j; }; } } diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 18aadd549..4e3313342 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -38,7 +38,7 @@ int main(int argc, char** argv) { v.push_back( rand() ); } - + int offset = 0; vector originalV = v; @@ -46,8 +46,6 @@ int main(int argc, char** argv) vector< Test > tests; - ParallelApplyStore store; - const int ALL = Node::comm().size(); Test tIntervalStatic; @@ -112,7 +110,9 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { - ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 ); + // ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 ); + ParallelApplyStore< int > store( plusOneInstance, v, 0, 3 ); + Job< JobData > job( *(tests[i].assign), 0, store ); if( job.isMaster() ) { From 6bb2ccfbd6be0bbb1e2c736dd116d757f767e82d Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 3 Jul 2012 13:57:20 +0200 Subject: [PATCH 1956/2134] Steps of MpiJob are now functors which can be wrapped (using decorator pattern). --- eo/src/mpi/eoMpi.h | 4 ++ eo/src/mpi/eoParallelApply.h | 112 +++++++++++++++++++--------------- eo/test/mpi/parallelApply.cpp | 3 +- eo/test/mpi/wrapper.cpp | 89 +++++++++++++++++++++++++++ 4 files changed, 158 insertions(+), 50 deletions(-) create mode 100644 eo/test/mpi/wrapper.cpp diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 9ad2bd7bf..940f41292 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -44,6 +44,10 @@ namespace eo void data( JobData* _d ) { d = _d; + if( wrapped ) + { + wrapped->data( _d ); + } } protected: diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index bc85d4387..94549fc31 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -17,14 +17,14 @@ namespace eo }; template - struct JobData + struct ParallelApplyData { - JobData( + ParallelApplyData( eoUF & _proc, std::vector& _pop, int _masterRank, // long _maxTime = 0, - int _packetSize + int _packetSize // FIXME = 1 ? ) : data( _pop ), func( _proc ), index( 0 ), size( _pop.size() ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) { @@ -35,7 +35,7 @@ namespace eo tempArray = new EOT[ _packetSize ]; } - ~JobData() + ~ParallelApplyData() { delete [] tempArray; } @@ -52,43 +52,16 @@ namespace eo bmpi::communicator& comm; }; - /* - template< typename EOT > - class ParallelApply : public Job< JobData > + template< class EOT > + class SendTaskParallelApply : public SendTaskFunction< ParallelApplyData > { public: + using SendTaskFunction< ParallelApplyData >::d; - ParallelApply( - // eoUF & _proc, - // std::vector& _pop, - AssignmentAlgorithm & algo, - int _masterRank, - const JobStore< JobData >& store - // long _maxTime = 0, - // int _packetSize = 1 - ) : - Job( algo, _masterRank, store ) - // Job( algo, _masterRank, _maxTime ), - func( _proc ), - data( _pop ), - packetSize( _packetSize ), - index( 0 ), - size( _pop.size() ) + SendTaskParallelApply( SendTaskParallelApply * w = 0 ) : SendTaskFunction< ParallelApplyData >( w ) { // empty } - - protected: - - // bmpi::communicator& comm; - }; - */ - - template< class EOT > - class SendTaskParallelApply : public SendTaskFunction< JobData > - { - public: - using SendTaskFunction< JobData >::d; // futureIndex, index, packetSize, size, comm, assignedTasks, data void operator()(int wrkRank) @@ -117,10 +90,15 @@ namespace eo }; template< class EOT > - class HandleResponseParallelApply : public HandleResponseFunction< JobData > + class HandleResponseParallelApply : public HandleResponseFunction< ParallelApplyData > { public: - using HandleResponseFunction< JobData >::d; + using HandleResponseFunction< ParallelApplyData >::d; + + HandleResponseParallelApply( HandleResponseParallelApply * w = 0 ) : HandleResponseFunction< ParallelApplyData >( w ) + { + // empty + } void operator()(int wrkRank) { @@ -129,10 +107,15 @@ namespace eo }; template< class EOT > - class ProcessTaskParallelApply : public ProcessTaskFunction< JobData > + class ProcessTaskParallelApply : public ProcessTaskFunction< ParallelApplyData > { public: - using ProcessTaskFunction< JobData >::d; + using ProcessTaskFunction< ParallelApplyData >::d; + + ProcessTaskParallelApply( ProcessTaskParallelApply * w = 0 ) : ProcessTaskFunction< ParallelApplyData >( w ) + { + // empty + } void operator()() { @@ -151,10 +134,15 @@ namespace eo }; template< class EOT > - class IsFinishedParallelApply : public IsFinishedFunction< JobData > + class IsFinishedParallelApply : public IsFinishedFunction< ParallelApplyData > { public: - using IsFinishedFunction< JobData >::d; + using IsFinishedFunction< ParallelApplyData >::d; + + IsFinishedParallelApply( IsFinishedParallelApply * w = 0 ) : IsFinishedFunction< ParallelApplyData >( w ) + { + // empty + } bool operator()() { @@ -163,7 +151,7 @@ namespace eo }; template< class EOT > - struct ParallelApplyStore : public JobStore< JobData > + struct ParallelApplyStore : public JobStore< ParallelApplyData > { ParallelApplyStore( eoUF & _proc, @@ -172,7 +160,7 @@ namespace eo // long _maxTime = 0, int _packetSize = 1 ) - : j( _proc, _pop, _masterRank, _packetSize ) + : _data( _proc, _pop, _masterRank, _packetSize ) { stpa = new SendTaskParallelApply; hrpa = new HandleResponseParallelApply; @@ -188,20 +176,46 @@ namespace eo delete ispa; } - SendTaskFunction< JobData >& sendTask() const { return *stpa; } - HandleResponseFunction< JobData >& handleResponse() const { return *hrpa; } - ProcessTaskFunction< JobData >& processTask() const { return *ptpa; } - IsFinishedFunction< JobData >& isFinished() const { return *ispa; } + SendTaskParallelApply< EOT >& sendTask() const { return *stpa; } + HandleResponseParallelApply< EOT >& handleResponse() const { return *hrpa; } + ProcessTaskParallelApply< EOT > & processTask() const { return *ptpa; } + IsFinishedParallelApply< EOT >& isFinished() const { return *ispa; } - JobData* data() { return &j; } + void sendTask( SendTaskParallelApply< EOT >* _stpa ) { stpa = _stpa; } + void handleResponse( HandleResponseParallelApply< EOT >* _hrpa ) { hrpa = _hrpa; } + void processTask( ProcessTaskParallelApply< EOT >* _ptpa ) { ptpa = _ptpa; } + void isFinished( IsFinishedParallelApply< EOT >* _ispa ) { ispa = _ispa; } + + ParallelApplyData* data() { return &_data; } protected: + // TODO commenter : Utiliser des pointeurs pour Ă©viter d'Ă©craser les fonctions wrappĂ©es SendTaskParallelApply* stpa; HandleResponseParallelApply* hrpa; ProcessTaskParallelApply* ptpa; IsFinishedParallelApply* ispa; - JobData j; + ParallelApplyData _data; + }; + + template< typename EOT > + class ParallelApply : public Job< ParallelApplyData > + { + public: + + ParallelApply( + AssignmentAlgorithm & algo, + int _masterRank, + ParallelApplyStore & store + ) : + Job< ParallelApplyData >( algo, _masterRank, store ) + { + // empty + } + + protected: + + // bmpi::communicator& comm; }; } } diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 4e3313342..75b515e93 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -112,7 +112,8 @@ int main(int argc, char** argv) { // ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 ); ParallelApplyStore< int > store( plusOneInstance, v, 0, 3 ); - Job< JobData > job( *(tests[i].assign), 0, store ); + // Job< JobData > job( *(tests[i].assign), 0, store ); + ParallelApply< int > job( *(tests[i].assign), 0, store ); if( job.isMaster() ) { diff --git a/eo/test/mpi/wrapper.cpp b/eo/test/mpi/wrapper.cpp new file mode 100644 index 000000000..c653d5f86 --- /dev/null +++ b/eo/test/mpi/wrapper.cpp @@ -0,0 +1,89 @@ +# include +# include + +# include + +# include +using namespace std; + +using namespace eo::mpi; + +struct plusOne : public eoUF< int&, void > +{ + void operator() ( int & x ) + { + ++x; + } +}; + +template< class EOT > +struct ShowWrappedResult : public IsFinishedParallelApply +{ + using IsFinishedParallelApply::wrapped; + + ShowWrappedResult ( IsFinishedParallelApply * w ) : IsFinishedParallelApply( w ), times( 0 ) + { + // empty + } + + bool operator()() + { + bool wrappedValue = wrapped->operator()(); // (*wrapped)(); + cout << times << ") Wrapped function would say that it is " << ( wrappedValue ? "":"not ") << "finished" << std::endl; + ++times; + return wrappedValue; + } + + private: + int times; +}; + +// These tests require at least 3 processes to be launched. +int main(int argc, char** argv) +{ + // eo::log << eo::setlevel( eo::debug ); + eo::log << eo::setlevel( eo::quiet ); + + Node::init( argc, argv ); + + srand( time(0) ); + vector v; + for( int i = 0; i < 1000; ++i ) + { + v.push_back( rand() ); + } + + int offset = 0; + vector originalV = v; + + plusOne plusOneInstance; + + StaticAssignmentAlgorithm assign( v.size() ); + + ParallelApplyStore< int > store( plusOneInstance, v, 0, 1 ); + IsFinishedParallelApply< int >& wrapped = store.isFinished(); + ShowWrappedResult< int >* wrapper = new ShowWrappedResult( &wrapped ); + store.isFinished( wrapper ); + + // Job< ParallelApplyData > job( assign, 0, store ); + ParallelApply job( assign, 0, store ); + job.run(); + + if( job.isMaster() ) + { + ++offset; + for(int i = 0; i < v.size(); ++i) + { + cout << v[i] << ' '; + if( originalV[i] + offset != v[i] ) + { + cout << " <-- ERROR at this point." << endl; + exit( EXIT_FAILURE ); + } + } + cout << endl; + } + + return 0; +} + From 63f12c4e1ce3bfc325527013fbee9eaae751a504 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 3 Jul 2012 14:48:47 +0200 Subject: [PATCH 1957/2134] JobStore has now getters, setters and wrappers methods. --- eo/src/mpi/eoMpi.h | 101 ++++++++++++++++++++++++++++------- eo/src/mpi/eoParallelApply.h | 51 +++++++----------- eo/test/mpi/wrapper.cpp | 13 +++-- 3 files changed, 108 insertions(+), 57 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 940f41292..7dafe1289 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -25,6 +25,7 @@ namespace eo namespace Channel { const int Commands = 0; + const int Messages = 1; } namespace Message @@ -33,26 +34,32 @@ namespace eo const int Finish = 1; } + template< typename JobData, typename Wrapped > struct SharedDataFunction { - SharedDataFunction( Wrapped * w ) + SharedDataFunction( Wrapped * w = 0 ) : _wrapped( w ) { - wrapped = w; + // empty + } + + void wrapped( Wrapped * w ) + { + _wrapped = w; } void data( JobData* _d ) { d = _d; - if( wrapped ) + if( _wrapped ) { - wrapped->data( _d ); + _wrapped->data( _d ); } } protected: JobData* d; - Wrapped* wrapped; + Wrapped* _wrapped; }; template< typename JobData > @@ -110,11 +117,78 @@ namespace eo template< typename JobData > struct JobStore { - virtual SendTaskFunction & sendTask() const = 0; - virtual HandleResponseFunction & handleResponse() const = 0; - virtual ProcessTaskFunction & processTask() const = 0; - virtual IsFinishedFunction & isFinished() const = 0; + JobStore( + SendTaskFunction* stf, + HandleResponseFunction* hrf, + ProcessTaskFunction* ptf, + IsFinishedFunction* iff + ) : + _stf( stf ), _hrf( hrf ), _ptf( ptf ), _iff( iff ) + { + // empty + } + + JobStore() + { + // empty + } + + SendTaskFunction & sendTask() { return *_stf; } + HandleResponseFunction & handleResponse() { return *_hrf; } + ProcessTaskFunction & processTask() { return *_ptf; } + IsFinishedFunction & isFinished() { return *_iff; } + + void sendTask( SendTaskFunction* stf ) { _stf = stf; } + void handleResponse( HandleResponseFunction* hrf ) { _hrf = hrf; } + void processTask( ProcessTaskFunction* ptf ) { _ptf = ptf; } + void isFinished( IsFinishedFunction* iff ) { _iff = iff; } + + void wrapSendTask( SendTaskFunction* stf ) + { + if( stf ) + { + stf->wrapped( _stf ); + _stf = stf; + } + } + + void wrapHandleResponse( HandleResponseFunction* hrf ) + { + if( hrf ) + { + hrf->wrapped( _hrf ); + _hrf = hrf; + } + } + + void wrapProcessTask( ProcessTaskFunction* ptf ) + { + if( ptf ) + { + ptf->wrapped( _ptf ); + _ptf = ptf; + } + } + + void wrapIsFinished( IsFinishedFunction* iff ) + { + if( iff ) + { + iff->wrapped( _iff ); + _iff = iff; + } + } + + // TODO commenter : laissĂ© Ă  la couche d'en dessous car impossible d'initialiser une donnĂ©e membre d'une classe mère depuis une classe fille. virtual JobData* data() = 0; + + protected: + + // TODO commenter : Utiliser des pointeurs pour Ă©viter d'Ă©craser les fonctions wrappĂ©es + SendTaskFunction< JobData >* _stf; + HandleResponseFunction< JobData >* _hrf; + ProcessTaskFunction< JobData >* _ptf; + IsFinishedFunction< JobData >* _iff; }; template< class JobData > @@ -141,15 +215,6 @@ namespace eo isFinished.data( store.data() ); } - /* - // master - virtual bool isFinished() = 0; - virtual void sendTask( int wrkRank ) = 0; - virtual void handleResponse( int wrkRank ) = 0; - // worker - virtual void processTask( ) = 0; - */ - protected: SendTaskFunction & sendTask; diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 94549fc31..1487da9fb 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -153,6 +153,11 @@ namespace eo template< class EOT > struct ParallelApplyStore : public JobStore< ParallelApplyData > { + using JobStore< ParallelApplyData >::_stf; + using JobStore< ParallelApplyData >::_hrf; + using JobStore< ParallelApplyData >::_ptf; + using JobStore< ParallelApplyData >::_iff; + ParallelApplyStore( eoUF & _proc, std::vector& _pop, @@ -162,42 +167,28 @@ namespace eo ) : _data( _proc, _pop, _masterRank, _packetSize ) { - stpa = new SendTaskParallelApply; - hrpa = new HandleResponseParallelApply; - ptpa = new ProcessTaskParallelApply; - ispa = new IsFinishedParallelApply; + _stf = new SendTaskParallelApply; + _hrf = new HandleResponseParallelApply; + _ptf = new ProcessTaskParallelApply; + _iff = new IsFinishedParallelApply; } - ~ParallelApplyStore() - { - delete stpa; - delete hrpa; - delete ptpa; - delete ispa; - } - - SendTaskParallelApply< EOT >& sendTask() const { return *stpa; } - HandleResponseParallelApply< EOT >& handleResponse() const { return *hrpa; } - ProcessTaskParallelApply< EOT > & processTask() const { return *ptpa; } - IsFinishedParallelApply< EOT >& isFinished() const { return *ispa; } - - void sendTask( SendTaskParallelApply< EOT >* _stpa ) { stpa = _stpa; } - void handleResponse( HandleResponseParallelApply< EOT >* _hrpa ) { hrpa = _hrpa; } - void processTask( ProcessTaskParallelApply< EOT >* _ptpa ) { ptpa = _ptpa; } - void isFinished( IsFinishedParallelApply< EOT >* _ispa ) { ispa = _ispa; } - ParallelApplyData* data() { return &_data; } - protected: - // TODO commenter : Utiliser des pointeurs pour Ă©viter d'Ă©craser les fonctions wrappĂ©es - SendTaskParallelApply* stpa; - HandleResponseParallelApply* hrpa; - ProcessTaskParallelApply* ptpa; - IsFinishedParallelApply* ispa; + ~ParallelApplyStore() + { + delete _stf; + delete _hrf; + delete _ptf; + delete _iff; + } + protected: ParallelApplyData _data; }; + // TODO commentaire : impossible de faire un typedef sur un template sans passer + // par un traits => complique la tâche de l'utilisateur pour rien. template< typename EOT > class ParallelApply : public Job< ParallelApplyData > { @@ -212,10 +203,6 @@ namespace eo { // empty } - - protected: - - // bmpi::communicator& comm; }; } } diff --git a/eo/test/mpi/wrapper.cpp b/eo/test/mpi/wrapper.cpp index c653d5f86..e2bf25d62 100644 --- a/eo/test/mpi/wrapper.cpp +++ b/eo/test/mpi/wrapper.cpp @@ -19,16 +19,16 @@ struct plusOne : public eoUF< int&, void > template< class EOT > struct ShowWrappedResult : public IsFinishedParallelApply { - using IsFinishedParallelApply::wrapped; + using IsFinishedParallelApply::_wrapped; - ShowWrappedResult ( IsFinishedParallelApply * w ) : IsFinishedParallelApply( w ), times( 0 ) + ShowWrappedResult ( IsFinishedParallelApply * w = 0 ) : IsFinishedParallelApply( w ), times( 0 ) { // empty } bool operator()() { - bool wrappedValue = wrapped->operator()(); // (*wrapped)(); + bool wrappedValue = _wrapped->operator()(); // (*_wrapped)(); cout << times << ") Wrapped function would say that it is " << ( wrappedValue ? "":"not ") << "finished" << std::endl; ++times; return wrappedValue; @@ -61,12 +61,11 @@ int main(int argc, char** argv) StaticAssignmentAlgorithm assign( v.size() ); ParallelApplyStore< int > store( plusOneInstance, v, 0, 1 ); - IsFinishedParallelApply< int >& wrapped = store.isFinished(); - ShowWrappedResult< int >* wrapper = new ShowWrappedResult( &wrapped ); - store.isFinished( wrapper ); + store.wrapIsFinished( new ShowWrappedResult ); - // Job< ParallelApplyData > job( assign, 0, store ); ParallelApply job( assign, 0, store ); + // Equivalent to: + // Job< ParallelApplyData > job( assign, 0, store ); job.run(); if( job.isMaster() ) From 564cc3bccdd57f5af2487c575c0c4809a208e62f Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 3 Jul 2012 14:51:34 +0200 Subject: [PATCH 1958/2134] Using eo::mpi::DEFAULT_MASTER instead of raw constants. --- eo/src/mpi/eoMpi.h | 1 + eo/test/mpi/parallelApply.cpp | 6 +++--- eo/test/mpi/wrapper.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 7dafe1289..8a4e86b63 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -34,6 +34,7 @@ namespace eo const int Finish = 1; } + const int DEFAULT_MASTER = 0; template< typename JobData, typename Wrapped > struct SharedDataFunction diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 75b515e93..7ccbf3d9c 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -111,9 +111,9 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { // ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 ); - ParallelApplyStore< int > store( plusOneInstance, v, 0, 3 ); - // Job< JobData > job( *(tests[i].assign), 0, store ); - ParallelApply< int > job( *(tests[i].assign), 0, store ); + ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 3 ); + // Job< JobData > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); + ParallelApply< int > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); if( job.isMaster() ) { diff --git a/eo/test/mpi/wrapper.cpp b/eo/test/mpi/wrapper.cpp index e2bf25d62..d8b72c98e 100644 --- a/eo/test/mpi/wrapper.cpp +++ b/eo/test/mpi/wrapper.cpp @@ -60,10 +60,10 @@ int main(int argc, char** argv) StaticAssignmentAlgorithm assign( v.size() ); - ParallelApplyStore< int > store( plusOneInstance, v, 0, 1 ); + ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 1 ); store.wrapIsFinished( new ShowWrappedResult ); - ParallelApply job( assign, 0, store ); + ParallelApply job( assign, eo::mpi::DEFAULT_MASTER, store ); // Equivalent to: // Job< ParallelApplyData > job( assign, 0, store ); job.run(); From 1d3790a0e466c193d8c74ac46af76f68671dc1c0 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 3 Jul 2012 15:07:27 +0200 Subject: [PATCH 1959/2134] Updating multiple roles test. --- eo/test/mpi/multipleRoles.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index 5b829c890..ce10f6214 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -31,7 +31,9 @@ void subtask( vector& v, int rank ) workers.push_back( rank + 4 ); DynamicAssignmentAlgorithm algo( workers ); SubWork sw; - ParallelApply job( sw, v, algo, rank ); + + ParallelApplyStore store( sw, v, rank ); + ParallelApply job( algo, rank, store ); job.run(); } @@ -72,7 +74,8 @@ int main(int argc, char** argv) { Work w; DynamicAssignmentAlgorithm algo( 1, 2 ); - ParallelApply< vector > job( w, metaV, algo, 0 ); + ParallelApplyStore< vector > store( w, metaV, 0 ); + ParallelApply< vector > job( algo, 0, store ); job.run(); if( job.isMaster() ) { From 24c29db6f3f8caeabbda8cf5c893e3788738b93e Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 3 Jul 2012 15:53:19 +0200 Subject: [PATCH 1960/2134] Using again parallel apply into eoPopEvalFunc::eoParallelPopEvalFunc. --- eo/src/apply.h | 4 +- eo/src/eoPopEvalFunc.h | 9 ++++ eo/src/mpi/eoMultiParallelApply.h | 52 ++++++++++++----------- eo/src/mpi/eoParallelApply.h | 21 ++++++---- eo/src/mpi/eoTerminateJob.h | 68 +++++++++++++++++++++++++++++++ eo/test/mpi/eval.cpp | 5 ++- eo/test/mpi/parallelApply.cpp | 1 - 7 files changed, 125 insertions(+), 35 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 7e59c21b8..86fc8927d 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -36,6 +36,7 @@ # ifdef WITH_MPI # include # include +# include # endif // WITH_MPI /** @@ -94,7 +95,8 @@ void parallelApply( int _packetSize, int _maxTime) { - eo::mpi::MultiParallelApply job( _proc, _pop, _algo, _masterRank, _packetSize, _maxTime ); + eo::mpi::ParallelEvalStore store( _proc, _pop, _masterRank, _packetSize ); + eo::mpi::ParallelApply job( _algo, _masterRank, store ); job.run(); } #endif diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index 77473eb15..1b7b447fe 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -99,6 +99,15 @@ public: // empty } + ~eoParallelPopLoopEval() + { + if( eo::mpi::Node::comm().rank() == masterRank ) + { + eo::mpi::EmptyJob job( assignAlgo, masterRank ); + job.run(); + } + } + /** Do the job: simple loop over the offspring */ void operator()(eoPop & _parents, eoPop & _offspring) { diff --git a/eo/src/mpi/eoMultiParallelApply.h b/eo/src/mpi/eoMultiParallelApply.h index f3df801d0..121e0b749 100644 --- a/eo/src/mpi/eoMultiParallelApply.h +++ b/eo/src/mpi/eoMultiParallelApply.h @@ -1,4 +1,3 @@ - # ifndef __EO_MULTI_PARALLEL_APPLY_H__ # define __EO_MULTI_PARALLEL_APPLY_H__ @@ -8,36 +7,41 @@ namespace eo { namespace mpi { - template< typename EOT > - class MultiParallelApply : public ParallelApply + template< class EOT > + class ProcessTaskParallelEval : public ProcessTaskParallelApply { public: - // using ParallelApply::comm; - using ParallelApply::masterRank; + using ProcessTaskParallelApply::_wrapped; + using ProcessTaskParallelApply::d; - MultiParallelApply( - eoUF & _proc, - std::vector& _pop, - AssignmentAlgorithm & algo, - int _masterRank, - int _packetSize = 1, - long _maxTime = 0 - ) : - ParallelApply( _proc, _pop, algo, _masterRank, _packetSize, _maxTime ) + void operator()() + { + int order = Message::Continue; + while( order != Message::Finish ) { - // empty + _wrapped->operator()(); + d->comm.recv( d->masterRank, Channel::Commands, order ); } + } + }; - virtual void processTask( ) - { - int order = Message::Continue; - while( order != Message::Finish ) - { - ParallelApply::processTask( ); - ParallelApply::comm.recv( masterRank, Channel::Commands, order ); - } - } + template< class EOT > + struct ParallelEvalStore : public ParallelApplyStore< EOT > + { + using ParallelApplyStore::wrapProcessTask; + + ParallelEvalStore( + eoUF & _proc, + std::vector& _pop, + int _masterRank, + // long _maxTime = 0, + int _packetSize = 1 + ) : + ParallelApplyStore< EOT >( _proc, _pop, _masterRank, _packetSize ) + { + wrapProcessTask( new ProcessTaskParallelEval ); + } }; } } diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 1487da9fb..f195965ae 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -24,7 +24,7 @@ namespace eo std::vector& _pop, int _masterRank, // long _maxTime = 0, - int _packetSize // FIXME = 1 ? + int _packetSize ) : data( _pop ), func( _proc ), index( 0 ), size( _pop.size() ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) { @@ -163,14 +163,19 @@ namespace eo std::vector& _pop, int _masterRank, // long _maxTime = 0, - int _packetSize = 1 - ) - : _data( _proc, _pop, _masterRank, _packetSize ) + int _packetSize = 1, + // JobStore functors + SendTaskParallelApply * stpa = new SendTaskParallelApply, + HandleResponseParallelApply* hrpa = new HandleResponseParallelApply, + ProcessTaskParallelApply* ptpa = new ProcessTaskParallelApply, + IsFinishedParallelApply* ifpa = new IsFinishedParallelApply + ) : + _data( _proc, _pop, _masterRank, _packetSize ) { - _stf = new SendTaskParallelApply; - _hrf = new HandleResponseParallelApply; - _ptf = new ProcessTaskParallelApply; - _iff = new IsFinishedParallelApply; + _stf = stpa; + _hrf = hrpa; + _ptf = ptpa; + _iff = ifpa; } ParallelApplyData* data() { return &_data; } diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index 4cb182255..6c63cb697 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -7,6 +7,73 @@ namespace eo { namespace mpi { + struct DummySendTaskFunction : public SendTaskFunction + { + void operator()( int _ ) + { + } + }; + + struct DummyHandleResponseFunction : public HandleResponseFunction + { + void operator()( int _ ) + { + } + }; + + struct DummyProcessTaskFunction : public ProcessTaskFunction + { + void operator()() + { + // nothing! + } + }; + + struct DummyIsFinishedFunction : public IsFinishedFunction + { + bool operator()() + { + return true; + } + }; + + struct DummyJobStore : public JobStore + { + using JobStore::_stf; + using JobStore::_hrf; + using JobStore::_ptf; + using JobStore::_iff; + + DummyJobStore() + { + _stf = new DummySendTaskFunction; + _hrf = new DummyHandleResponseFunction; + _ptf = new DummyProcessTaskFunction; + _iff = new DummyIsFinishedFunction; + } + + ~DummyJobStore() + { + delete _stf; + delete _hrf; + delete _ptf; + delete _iff; + } + + void* data() { return 0; } + }; + + struct EmptyJob : public Job + { + EmptyJob( AssignmentAlgorithm& algo, int masterRank ) : + Job( algo, masterRank, *(new DummyJobStore) ) + // FIXME memory leak => will be corrected by using const correctness + { + // empty + } + }; + + /* class TerminateJob : public Job { public: @@ -36,6 +103,7 @@ namespace eo return true; } }; + */ } } diff --git a/eo/test/mpi/eval.cpp b/eo/test/mpi/eval.cpp index 7e15ac6f3..7d8666cb1 100644 --- a/eo/test/mpi/eval.cpp +++ b/eo/test/mpi/eval.cpp @@ -11,6 +11,8 @@ #include +#include + #include #include @@ -83,6 +85,7 @@ typedef eoRealSerializable EOT; int main(int ac, char** av) { eo::mpi::Node::init( ac, av ); + eo::log << eo::setlevel( eo::debug ); eoParser parser(ac, av); @@ -110,7 +113,7 @@ int main(int ac, char** av) eo::log << eo::setlevel( eo::debug ); eo::mpi::DynamicAssignmentAlgorithm assign; - eoParallelPopLoopEval< EOT > popEval( eval, assign, 0, 3 ); + eoParallelPopLoopEval< EOT > popEval( eval, assign, eo::mpi::DEFAULT_MASTER, 3 ); popEval( pop, pop ); eo::log << eo::quiet << "DONE!" << std::endl; diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index 7ccbf3d9c..d562ef0ec 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -110,7 +110,6 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { - // ParallelApply job( plusOneInstance, v, *(tests[i].assign), 0, store, 3 ); ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 3 ); // Job< JobData > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); ParallelApply< int > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); From 603268b053dafbe0c545486f2354b1970d683a79 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 4 Jul 2012 10:53:57 +0200 Subject: [PATCH 1961/2134] Added store management to eoPopEvalFunc. --- eo/src/apply.h | 8 +-- eo/src/eoPopEvalFunc.h | 100 ++++++++++++++++++------------ eo/src/mpi/eoMultiParallelApply.h | 14 ++++- eo/src/mpi/eoParallelApply.h | 12 +++- eo/test/mpi/eval.cpp | 66 +++++++++++++++++--- 5 files changed, 143 insertions(+), 57 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 86fc8927d..df3c43e1c 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -88,15 +88,13 @@ void apply(eoUF& _proc, std::vector& _pop) #ifdef WITH_MPI template void parallelApply( - eoUF& _proc, std::vector& _pop, eo::mpi::AssignmentAlgorithm& _algo, int _masterRank, - int _packetSize, - int _maxTime) + eo::mpi::ParallelEvalStore & _store ) { - eo::mpi::ParallelEvalStore store( _proc, _pop, _masterRank, _packetSize ); - eo::mpi::ParallelApply job( _algo, _masterRank, store ); + _store.data( _pop ); + eo::mpi::ParallelApply job( _algo, _masterRank, _store ); job.run(); } #endif diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index 1b7b447fe..ce4dc5cf6 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -80,48 +80,72 @@ private: #ifdef WITH_MPI // TODO TODOB commenter template -class eoParallelPopLoopEval : public eoPopEvalFunc { -public: - /** Ctor: set value of embedded eoEvalFunc */ - eoParallelPopLoopEval( - eoEvalFunc & _eval, - eo::mpi::AssignmentAlgorithm& _assignAlgo, - int _masterRank, - int _packetSize = 1, - int _maxTime = 0 - ) : - eval(_eval), - assignAlgo( _assignAlgo ), - masterRank( _masterRank ), - packetSize( _packetSize ), - maxTime( _maxTime ) - { - // empty - } +class eoParallelPopLoopEval : public eoPopEvalFunc +{ + public: + /** Ctor: set value of embedded eoEvalFunc */ + eoParallelPopLoopEval( + eoEvalFunc & _eval, + eo::mpi::AssignmentAlgorithm& _assignAlgo, + int _masterRank, + int _packetSize = 1 + ) : + eval(_eval), + assignAlgo( _assignAlgo ), + masterRank( _masterRank ), + packetSize( _packetSize ), + needToDeleteStore( true ) + { + store = new eo::mpi::ParallelEvalStore( _eval, _masterRank, _packetSize ); + } - ~eoParallelPopLoopEval() - { - if( eo::mpi::Node::comm().rank() == masterRank ) - { - eo::mpi::EmptyJob job( assignAlgo, masterRank ); - job.run(); - } - } + eoParallelPopLoopEval( + eoEvalFunc & _eval, + eo::mpi::AssignmentAlgorithm& _assignAlgo, + eo::mpi::ParallelEvalStore* _store, + int _masterRank, + int _packetSize = 1 + ) : + eval(_eval), + assignAlgo( _assignAlgo ), + masterRank( _masterRank ), + packetSize( _packetSize ), + needToDeleteStore( false ), + store( _store ) + { + // empty + } - /** Do the job: simple loop over the offspring */ - void operator()(eoPop & _parents, eoPop & _offspring) - { - (void)_parents; - parallelApply(eval, _offspring, assignAlgo, masterRank, packetSize, maxTime); - } + ~eoParallelPopLoopEval() + { + if( eo::mpi::Node::comm().rank() == masterRank ) + { + eo::mpi::EmptyJob job( assignAlgo, masterRank ); + job.run(); + } -private: - eoEvalFunc & eval; + if( needToDeleteStore ) + { + delete store; + } + } - eo::mpi::AssignmentAlgorithm & assignAlgo; - int masterRank; - int packetSize; - int maxTime; + /** Do the job: simple loop over the offspring */ + void operator()(eoPop & _parents, eoPop & _offspring) + { + (void)_parents; + parallelApply(_offspring, assignAlgo, masterRank, *store); + } + + private: + eoEvalFunc & eval; + + eo::mpi::AssignmentAlgorithm & assignAlgo; + eo::mpi::ParallelEvalStore* store; + int masterRank; + int packetSize; + + bool needToDeleteStore; }; #endif diff --git a/eo/src/mpi/eoMultiParallelApply.h b/eo/src/mpi/eoMultiParallelApply.h index 121e0b749..85b1689e6 100644 --- a/eo/src/mpi/eoMultiParallelApply.h +++ b/eo/src/mpi/eoMultiParallelApply.h @@ -24,6 +24,11 @@ namespace eo d->comm.recv( d->masterRank, Channel::Commands, order ); } } + + ~ProcessTaskParallelEval() + { + delete _wrapped; + } }; template< class EOT > @@ -33,15 +38,20 @@ namespace eo ParallelEvalStore( eoUF & _proc, - std::vector& _pop, int _masterRank, // long _maxTime = 0, int _packetSize = 1 ) : - ParallelApplyStore< EOT >( _proc, _pop, _masterRank, _packetSize ) + ParallelApplyStore< EOT >( _proc, *( new std::vector ), _masterRank, _packetSize ) + // FIXME memory leak because of vector ==> use const correctness { wrapProcessTask( new ProcessTaskParallelEval ); } + + void data( std::vector& _pop ) + { + ParallelApplyStore::_data.init( _pop ); + } }; } } diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index f195965ae..faedc7b38 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -21,7 +21,7 @@ namespace eo { ParallelApplyData( eoUF & _proc, - std::vector& _pop, + std::vector & _pop, int _masterRank, // long _maxTime = 0, int _packetSize @@ -35,6 +35,14 @@ namespace eo tempArray = new EOT[ _packetSize ]; } + void init( std::vector& _pop ) + { + index = 0; + size = _pop.size(); + data = _pop; + assignedTasks.clear(); + } + ~ParallelApplyData() { delete [] tempArray; @@ -180,7 +188,7 @@ namespace eo ParallelApplyData* data() { return &_data; } - ~ParallelApplyStore() + virtual ~ParallelApplyStore() { delete _stf; delete _hrf; diff --git a/eo/test/mpi/eval.cpp b/eo/test/mpi/eval.cpp index 7d8666cb1..06fa8ad33 100644 --- a/eo/test/mpi/eval.cpp +++ b/eo/test/mpi/eval.cpp @@ -82,10 +82,40 @@ class eoRealSerializable : public eoReal< eoMinimizingFitness >, public eoserial typedef eoRealSerializable EOT; +struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply +{ + CatBestAnswers() + { + best.fitness( 1000000000. ); + } + + using eo::mpi::HandleResponseParallelApply::_wrapped; + using eo::mpi::HandleResponseParallelApply::d; + + void operator()(int wrkRank) + { + int index = d->assignedTasks[wrkRank].index; + int size = d->assignedTasks[wrkRank].size; + (*_wrapped)( wrkRank ); + for(int i = index; i < index+size; ++i) + { + if( best.fitness() < d->data[ i ].fitness() ) + { + eo::log << eo::quiet << "Better solution found:" << d->data[i].fitness() << std::endl; + best = d->data[ i ]; + } + } + } + + protected: + + EOT best; +}; + int main(int ac, char** av) { eo::mpi::Node::init( ac, av ); - eo::log << eo::setlevel( eo::debug ); + eo::log << eo::setlevel( eo::quiet ); eoParser parser(ac, av); @@ -106,17 +136,33 @@ int main(int ac, char** av) eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); eoEvalFuncCounter< EOT > eval( mainEval ); - eoPop< EOT > pop( popSize, init ); - - eo::log << "Size of population : " << popSize << std::endl; - - eo::log << eo::setlevel( eo::debug ); - + int rank = eo::mpi::Node::comm().rank(); eo::mpi::DynamicAssignmentAlgorithm assign; - eoParallelPopLoopEval< EOT > popEval( eval, assign, eo::mpi::DEFAULT_MASTER, 3 ); - popEval( pop, pop ); + if( rank == eo::mpi::DEFAULT_MASTER ) + { + eoPop< EOT > pop( popSize, init ); - eo::log << eo::quiet << "DONE!" << std::endl; + eo::log << "Size of population : " << popSize << std::endl; + + eo::mpi::ParallelEvalStore< EOT > store( eval, eo::mpi::DEFAULT_MASTER ); + store.wrapHandleResponse( new CatBestAnswers ); + + eoParallelPopLoopEval< EOT > popEval( eval, assign, &store, eo::mpi::DEFAULT_MASTER, 3 ); + eo::log << eo::quiet << "Before first evaluation." << std::endl; + popEval( pop, pop ); + eo::log << eo::quiet << "After first evaluation." << std::endl; + + pop = eoPop< EOT >( popSize, init ); + popEval( pop, pop ); + eo::log << eo::quiet << "After second evaluation." << std::endl; + + eo::log << eo::quiet << "DONE!" << std::endl; + } else + { + eoPop< EOT > pop( popSize, init ); + eoParallelPopLoopEval< EOT > popEval( eval, assign, eo::mpi::DEFAULT_MASTER, 3 ); + popEval( pop, pop ); + } return 0; } From 581b24af186c12ed9e4c46062d81c1028f3e6e5c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 4 Jul 2012 13:24:10 +0200 Subject: [PATCH 1962/2134] Bugfix: a reference can't be reinitialized. Different vectors weren't recopied after evaluation. --- eo/src/mpi/eoParallelApply.h | 16 ++++++++++------ eo/test/mpi/eval.cpp | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index faedc7b38..a02254716 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -26,7 +26,7 @@ namespace eo // long _maxTime = 0, int _packetSize ) : - data( _pop ), func( _proc ), index( 0 ), size( _pop.size() ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) + _data( &_pop ), func( _proc ), index( 0 ), size( _pop.size() ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) { if ( _packetSize <= 0 ) { @@ -39,7 +39,7 @@ namespace eo { index = 0; size = _pop.size(); - data = _pop; + _data = &_pop; assignedTasks.clear(); } @@ -48,7 +48,12 @@ namespace eo delete [] tempArray; } - std::vector & data; + std::vector& data() + { + return *_data; + } + + std::vector * _data; eoUF & func; int index; int size; @@ -71,7 +76,6 @@ namespace eo // empty } - // futureIndex, index, packetSize, size, comm, assignedTasks, data void operator()(int wrkRank) { int futureIndex; @@ -92,7 +96,7 @@ namespace eo d->assignedTasks[ wrkRank ].index = d->index; d->assignedTasks[ wrkRank ].size = sentSize; - d->comm.send( wrkRank, 1, & ( (d->data)[ d->index ] ) , sentSize ); + d->comm.send( wrkRank, 1, & ( (d->data())[ d->index ] ) , sentSize ); d->index = futureIndex; } }; @@ -110,7 +114,7 @@ namespace eo void operator()(int wrkRank) { - d->comm.recv( wrkRank, 1, & (d->data[ d->assignedTasks[wrkRank].index ] ), d->assignedTasks[wrkRank].size ); + d->comm.recv( wrkRank, 1, & (d->data()[ d->assignedTasks[wrkRank].index ] ), d->assignedTasks[wrkRank].size ); } }; diff --git a/eo/test/mpi/eval.cpp b/eo/test/mpi/eval.cpp index 06fa8ad33..312c9d657 100644 --- a/eo/test/mpi/eval.cpp +++ b/eo/test/mpi/eval.cpp @@ -99,10 +99,10 @@ struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply (*_wrapped)( wrkRank ); for(int i = index; i < index+size; ++i) { - if( best.fitness() < d->data[ i ].fitness() ) + if( best.fitness() < d->data()[ i ].fitness() ) { - eo::log << eo::quiet << "Better solution found:" << d->data[i].fitness() << std::endl; - best = d->data[ i ]; + eo::log << eo::quiet << "Better solution found:" << d->data()[i].fitness() << std::endl; + best = d->data()[ i ]; } } } From 8753787725c603fa7de939e794a351617f2b7ae6 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 5 Jul 2012 18:16:49 +0200 Subject: [PATCH 1963/2134] Cleaning code (useless comments, suppressing warnings, etc...) --- eo/src/mpi/eoMpi.h | 21 --------------------- eo/src/mpi/eoTerminateJob.h | 2 ++ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 8a4e86b63..5f430be29 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -197,10 +197,8 @@ namespace eo { public: Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore & store ) : - // Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) : assignmentAlgo( _algo ), comm( Node::comm() ), - // _maxTime( maxTime ), masterRank( _masterRank ), // Functors sendTask( store.sendTask() ), @@ -230,20 +228,8 @@ namespace eo eo::log << eo::debug; eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl; # endif - bool timeStopped = false; while( ! isFinished() ) { - // Time restrictions - /* - getrusage( RUSAGE_SELF , &_usage ); - _current = _usage.ru_utime.tv_sec + _usage.ru_stime.tv_sec; - if( _maxTime > 0 && _current > _maxTime ) - { - timeStopped = true; - break; - } - */ - timerStat.start("master_wait_for_assignee"); int assignee = assignmentAlgo.get( ); while( assignee <= 0 ) @@ -301,12 +287,6 @@ namespace eo # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; # endif - /* - if( timeStopped ) - { - throw eoMaxTimeException( _current ); - } - */ } void worker( ) @@ -359,7 +339,6 @@ namespace eo struct rusage _usage; long _current; - // const long _maxTime; }; } } diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index 6c63cb697..25e63eb76 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -11,6 +11,7 @@ namespace eo { void operator()( int _ ) { + ++_; } }; @@ -18,6 +19,7 @@ namespace eo { void operator()( int _ ) { + ++_; } }; From 23acd1a6331d5b3e46cdca1634a13cbed821f346 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 6 Jul 2012 10:06:34 +0200 Subject: [PATCH 1964/2134] Catching exceptions and sending them back in eoMpi loop. --- eo/src/mpi/eoMpi.h | 135 ++++++++++++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 50 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 5f430be29..a2dcebf71 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -221,6 +221,63 @@ namespace eo ProcessTaskFunction & processTask; IsFinishedFunction & isFinished; + struct FinallyBlock + { + FinallyBlock( + int _totalWorkers, + AssignmentAlgorithm& _algo, + Job< JobData > & _that + ) : + totalWorkers( _totalWorkers ), + assignmentAlgo( _algo ), + comm( Node::comm() ), + that( _that ) + { + // empty + } + + ~FinallyBlock() + { +# ifndef NDEBUG + eo::log << "[M" << comm.rank() << "] Frees all the idle." << std::endl; +# endif + // frees all the idle workers + timerStat.start("master_wait_for_idles"); + std::vector idles = assignmentAlgo.idles(); + for(unsigned int i = 0; i < idles.size(); ++i) + { + comm.send( idles[i], Channel::Commands, Message::Finish ); + } + timerStat.stop("master_wait_for_idles"); + +# ifndef NDEBUG + eo::log << "[M" << comm.rank() << "] Waits for all responses." << std::endl; +# endif + // wait for all responses + timerStat.start("master_wait_for_all_responses"); + while( assignmentAlgo.availableWorkers() != totalWorkers ) + { + bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); + int wrkRank = status.source(); + that.handleResponse( wrkRank ); + comm.send( wrkRank, Channel::Commands, Message::Finish ); + assignmentAlgo.confirm( wrkRank ); + } + timerStat.stop("master_wait_for_all_responses"); + +# ifndef NDEBUG + eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; +# endif + } + + protected: + + int totalWorkers; + bmpi::communicator & comm; + Job< JobData > & that; + AssignmentAlgorithm& assignmentAlgo; + }; + void master( ) { int totalWorkers = assignmentAlgo.availableWorkers(); @@ -228,65 +285,43 @@ namespace eo eo::log << eo::debug; eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl; # endif - while( ! isFinished() ) - { - timerStat.start("master_wait_for_assignee"); - int assignee = assignmentAlgo.get( ); - while( assignee <= 0 ) + try { + FinallyBlock finally( totalWorkers, assignmentAlgo, *this ); + while( ! isFinished() ) { + timerStat.start("master_wait_for_assignee"); + int assignee = assignmentAlgo.get( ); + while( assignee <= 0 ) + { # ifndef NDEBUG - eo::log << "[M" << comm.rank() << "] Waitin' for node..." << std::endl; + eo::log << "[M" << comm.rank() << "] Waitin' for node..." << std::endl; # endif - bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); - int wrkRank = status.source(); + bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); + int wrkRank = status.source(); # ifndef NDEBUG - eo::log << "[M" << comm.rank() << "] Node " << wrkRank << " just terminated." << std::endl; + eo::log << "[M" << comm.rank() << "] Node " << wrkRank << " just terminated." << std::endl; # endif - handleResponse( wrkRank ); - assignmentAlgo.confirm( wrkRank ); - assignee = assignmentAlgo.get( ); + handleResponse( wrkRank ); + assignmentAlgo.confirm( wrkRank ); + assignee = assignmentAlgo.get( ); + } + timerStat.stop("master_wait_for_assignee"); +# ifndef NDEBUG + eo::log << "[M" << comm.rank() << "] Assignee : " << assignee << std::endl; +# endif + + timerStat.start("master_wait_for_send"); + comm.send( assignee, Channel::Commands, Message::Continue ); + sendTask( assignee ); + timerStat.stop("master_wait_for_send"); } - timerStat.stop("master_wait_for_assignee"); -# ifndef NDEBUG - eo::log << "[M" << comm.rank() << "] Assignee : " << assignee << std::endl; -# endif - - timerStat.start("master_wait_for_send"); - comm.send( assignee, Channel::Commands, Message::Continue ); - sendTask( assignee ); - timerStat.stop("master_wait_for_send"); - } - -# ifndef NDEBUG - eo::log << "[M" << comm.rank() << "] Frees all the idle." << std::endl; -# endif - // frees all the idle workers - timerStat.start("master_wait_for_idles"); - std::vector idles = assignmentAlgo.idles(); - for(unsigned int i = 0; i < idles.size(); ++i) + } catch( const std::exception & e ) { - comm.send( idles[i], Channel::Commands, Message::Finish ); + std::string s = e.what(); + s.append( " in eoMpi loop"); + throw std::runtime_error( s ); } - timerStat.stop("master_wait_for_idles"); -# ifndef NDEBUG - eo::log << "[M" << comm.rank() << "] Waits for all responses." << std::endl; -# endif - // wait for all responses - timerStat.start("master_wait_for_all_responses"); - while( assignmentAlgo.availableWorkers() != totalWorkers ) - { - bmpi::status status = comm.probe( bmpi::any_source, bmpi::any_tag ); - int wrkRank = status.source(); - handleResponse( wrkRank ); - comm.send( wrkRank, Channel::Commands, Message::Finish ); - assignmentAlgo.confirm( wrkRank ); - } - timerStat.stop("master_wait_for_all_responses"); - -# ifndef NDEBUG - eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; -# endif } void worker( ) From 79c7a263a355f906cfd87a247e0d973475c72bca Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 6 Jul 2012 16:44:06 +0200 Subject: [PATCH 1965/2134] Static assignment algorithm works with parallel eval now. --- eo/src/apply.h | 1 + eo/src/mpi/eoMpiAssignmentAlgorithm.h | 14 +++++++++++++- eo/src/mpi/eoTerminateJob.h | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index df3c43e1c..7845c14ec 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -94,6 +94,7 @@ void parallelApply( eo::mpi::ParallelEvalStore & _store ) { _store.data( _pop ); + _algo.reinit( _pop.size() ); eo::mpi::ParallelApply job( _algo, _masterRank, _store ); job.run(); } diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h index aa162d951..c3d24a196 100644 --- a/eo/src/mpi/eoMpiAssignmentAlgorithm.h +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -16,6 +16,7 @@ namespace eo virtual int availableWorkers( ) = 0; virtual void confirm( int wrkRank ) = 0; virtual std::vector idles( ) = 0; + virtual void reinit( int runs ) = 0; }; struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm @@ -79,6 +80,12 @@ namespace eo return availableWrk; } + void reinit( int _ ) + { + ++_; + // nothing to do + } + protected: std::vector< int > availableWrk; }; @@ -181,7 +188,7 @@ namespace eo void confirm( int rank ) { - int i = -1; + int i = -1; // i is the real index in table for( unsigned int j = 0; j < realRank.size(); ++j ) { if( realRank[j] == rank ) @@ -196,6 +203,11 @@ namespace eo ++freeWorkers; } + void reinit( int runs ) + { + init( realRank, runs ); + } + private: std::vector attributions; std::vector realRank; diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index 25e63eb76..d85aeeb05 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -73,6 +73,15 @@ namespace eo { // empty } + + ~EmptyJob() + { + std::vector< int > idles = assignmentAlgo.idles(); + for(unsigned i = 0, size = idles.size(); i < size; ++i) + { + comm.send( idles[i], Channel::Commands, Message::Kill ); + } + } }; /* From 04f6367bacdc13553ad5e78cf678ecd2d6763c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20K=C3=BCpper?= Date: Fri, 6 Jul 2012 19:46:30 +0200 Subject: [PATCH 1966/2134] make install script robust to file creation errors --- eo/install_symlink.py.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/eo/install_symlink.py.cmake b/eo/install_symlink.py.cmake index fd71d68b5..382c0b9f6 100755 --- a/eo/install_symlink.py.cmake +++ b/eo/install_symlink.py.cmake @@ -31,8 +31,16 @@ def uninstall(): print('All symlinks have been removed.') def install(): - for dirname in DATA['dirs']: os.mkdir(dirname) - for src, dst in DATA['links']: os.symlink(src, dst) + for dirname in DATA['dirs']: + try: + os.makedirs(dirname) + except(os.error): + pass + for src, dst in DATA['links']: + try: + os.symlink(src, dst) + except: + pass print('All symlinks have been installed.') def data(): From b01c7ac0f02d26f1349662fae6d06801a272fccc Mon Sep 17 00:00:00 2001 From: Joost Date: Fri, 6 Jul 2012 20:14:27 +0200 Subject: [PATCH 1967/2134] include omp.h only if _OPENMP is defined --- eo/src/apply.h | 3 +++ eo/src/utils/eoParallel.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/eo/src/apply.h b/eo/src/apply.h index f685f8d3b..01256e059 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -31,7 +31,10 @@ #include #include #include + +#ifdef _OPENMP #include +#endif /** Applies a unary function to a std::vector of things. diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index d9d09c38b..f8e3c745c 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -25,7 +25,9 @@ Caner Candan */ +#ifdef _OPENMP #include +#endif #include "eoParallel.h" #include "eoLogger.h" From 5827444774136f42c5f3d27a05270ffc56f258a0 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 6 Jul 2012 19:59:14 +0200 Subject: [PATCH 1968/2134] Comment out deprecated stuff and fix corresponding tests This may break your code if you did not pay attention to warnings in the previous release, the old code is still here in case you want to understand what's going on. --- eo/src/do/make_checkpoint.h | 2 +- eo/src/do/make_checkpoint_FDC.h | 2 +- eo/src/do/make_checkpoint_assembled.h | 2 +- eo/src/eoCombinedContinue.h | 4 +++ eo/src/eoCombinedInit.h | 2 ++ eo/src/eoProportionalCombinedOp.h | 4 ++- eo/src/utils/eoOStreamMonitor.cpp | 1 + eo/src/utils/eoOStreamMonitor.h | 5 +++- eo/src/utils/eoParserLogger.h | 36 --------------------------- eo/src/utils/eoRNG.h | 6 +++-- eo/src/utils/eoStdoutMonitor.h | 2 ++ eo/test/t-MGE-control.cpp | 3 ++- eo/test/t-MGE.cpp | 3 ++- eo/test/t-MGE1bit.cpp | 3 ++- eo/test/t-eobin.cpp | 3 ++- 15 files changed, 31 insertions(+), 47 deletions(-) delete mode 100644 eo/src/utils/eoParserLogger.h diff --git a/eo/src/do/make_checkpoint.h b/eo/src/do/make_checkpoint.h index 8e5295115..cc0746ddb 100644 --- a/eo/src/do/make_checkpoint.h +++ b/eo/src/do/make_checkpoint.h @@ -201,7 +201,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu // The Stdout monitor will print parameters to the screen ... if ( needStdoutMonitor ) { - eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/); _state.storeFunctor(monitor); // when called by the checkpoint (i.e. at every generation) diff --git a/eo/src/do/make_checkpoint_FDC.h b/eo/src/do/make_checkpoint_FDC.h index 33c7f7206..f241667f7 100644 --- a/eo/src/do/make_checkpoint_FDC.h +++ b/eo/src/do/make_checkpoint_FDC.h @@ -175,7 +175,7 @@ eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval // The Stdout monitor will print parameters to the screen ... if ( needStdoutMonitor ) { - eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/); _state.storeFunctor(monitor); // when called by the checkpoint (i.e. at every generation) diff --git a/eo/src/do/make_checkpoint_assembled.h b/eo/src/do/make_checkpoint_assembled.h index 26463fab3..27d050ada 100644 --- a/eo/src/do/make_checkpoint_assembled.h +++ b/eo/src/do/make_checkpoint_assembled.h @@ -129,7 +129,7 @@ eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta // STDOUT // ------ - eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/); _state.storeFunctor(monitor); checkpoint->add(*monitor); monitor->add(*generationCounter); diff --git a/eo/src/eoCombinedContinue.h b/eo/src/eoCombinedContinue.h index dfb70f67b..5162ffaa9 100644 --- a/eo/src/eoCombinedContinue.h +++ b/eo/src/eoCombinedContinue.h @@ -57,6 +57,7 @@ public: { } + /* FIXME remove in next release /// Ctor - for historical reasons ... should disspear some day eoCombinedContinue( eoContinue& _cont1, eoContinue& _cont2) : eoContinue(), std::vector* >() @@ -68,12 +69,14 @@ public: this->push_back(&_cont1); this->push_back(&_cont2); } + */ void add(eoContinue & _cont) { this->push_back(&_cont); } + /* FIXME remove in next release void removeLast(void) { #ifndef DEPRECATED_MESSAGES @@ -82,6 +85,7 @@ public: this->pop_back(); } + */ /** Returns false when one of the embedded continuators say so (logical and) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index d41122d85..cc93620d3 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -44,11 +44,13 @@ public: rates.push_back(_rate); } + /* FIXME remove in next release void add(eoInit & _init, double _rate, bool _verbose) { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; add( _init, _rate ); } + */ /** The usual method to add objects to the combination */ diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 60c478903..823ac79c9 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -186,6 +186,7 @@ public: virtual std::string className() const { return "eoPropCombinedQuadOp"; } + /* FIXME remove in next release virtual void add(eoQuadOp & _op, const double _rate, bool _verbose) { #ifndef DEPRECATED_MESSAGES @@ -195,6 +196,7 @@ public: add(_op,_rate); } + */ // addition of a true operator virtual void add(eoQuadOp & _op, const double _rate) @@ -202,7 +204,7 @@ public: ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! - printOn( eo::log << eo::logging ); + printOn( eo::log << eo::logging ); } // outputs the operators and percentages diff --git a/eo/src/utils/eoOStreamMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp index 3365301e9..6836f337e 100644 --- a/eo/src/utils/eoOStreamMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -37,6 +37,7 @@ eoMonitor& eoOStreamMonitor::operator()(void) } // if firstime // ok, now the real saving. write out + // FIXME deprecated, remove in next release //! @todo old verbose formatting, do we still need it? /* for (iterator it = vec.begin (); it != vec.end (); ++it) { diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index b941b05f2..982c954f9 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -44,14 +44,17 @@ Authors: class eoOStreamMonitor : public eoMonitor { public : - eoOStreamMonitor( std::ostream & _out, bool /*_verbose*/=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + /* FIXME remove in next release + eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) { #ifndef DEPRECATED_MESSAGES eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; #pragma message "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" #endif // !DEPRECATED_MESSAGES + } + */ eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) diff --git a/eo/src/utils/eoParserLogger.h b/eo/src/utils/eoParserLogger.h deleted file mode 100644 index de6f06e6a..000000000 --- a/eo/src/utils/eoParserLogger.h +++ /dev/null @@ -1,36 +0,0 @@ -// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- - -/* -(c) Thales group, 2010 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; - version 2 of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Contact: http://eodev.sourceforge.net - -Authors: -Caner Candan - -*/ - -#ifndef EO_PARSER_LOGGER_H -#define EO_PARSER_LOGGER_H - -#include "eoParser.h" - -#warning "[eoParserLogger] is deprecated" - -typedef eoParser eoParserLogger; - -#endif // !EO_PARSER_LOGGER_H diff --git a/eo/src/utils/eoRNG.h b/eo/src/utils/eoRNG.h index 984e76271..78223c35a 100644 --- a/eo/src/utils/eoRNG.h +++ b/eo/src/utils/eoRNG.h @@ -150,7 +150,8 @@ public : initialize(2*s); } - /** Re-initializes the Random Number Generator + /* FIXME remove in next release + ** Re-initializes the Random Number Generator This is the traditional seeding procedure. This version is deprecated and only provided for compatibility with old code. In new projects you should @@ -159,11 +160,12 @@ public : @see reseed for details on usage of the seeding value. @version old version (deprecated) - */ + * void oldReseed(uint32_t s) { initialize(s); } + */ /** Random number from unifom distribution diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 07c5a02f6..d886aed3a 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -43,6 +43,7 @@ Authors: class eoStdoutMonitor : public eoOStreamMonitor { public : + /* FIXME remove in next release eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) { @@ -50,6 +51,7 @@ public : eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdoutMonitor constructor is deprecated and will be removed in the next release" << std::endl; #endif // !DEPRECATED_MESSAGES } + */ eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : eoOStreamMonitor( std::cout, _delim, _width, _fill) diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index 240dd3688..d2d4d224d 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -69,7 +69,8 @@ int main() // Terminators eoGenContinue continuator1(10); eoFitContinue continuator2(CHROM_SIZE); - eoCombinedContinue continuator(continuator1, continuator2); + eoCombinedContinue continuator(continuator1); + continuator.add( continuator2 ); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; checkpoint.add(monitor); diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index a122b5e70..275847e18 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -73,7 +73,8 @@ int main() // Terminators eoGenContinue continuator1(10); eoFitContinue continuator2(CHROM_SIZE); - eoCombinedContinue continuator(continuator1, continuator2); + eoCombinedContinue continuator(continuator1); + continuator.add( continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; checkpoint.add(monitor); diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp index 842f5cd77..6ef1c874c 100644 --- a/eo/test/t-MGE1bit.cpp +++ b/eo/test/t-MGE1bit.cpp @@ -72,7 +72,8 @@ int main() // Terminators eoGenContinue continuator1(10); eoFitContinue continuator2(CHROM_SIZE); - eoCombinedContinue continuator(continuator1, continuator2); + eoCombinedContinue continuator(continuator1); + continuator.add(continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; checkpoint.add(monitor); diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index d857dd822..2a36d0ee1 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -139,7 +139,8 @@ void main_function() eoGenContinue continuator1(50); eoFitContinue continuator2(65535.f); - eoCombinedContinue continuator(continuator1, continuator2); + eoCombinedContinue continuator(continuator1); + continuator.add( continuator2); eoCheckPoint checkpoint(continuator); From 51632cf856da7bc9c2a16d4c1beedc54c9c9c790 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 6 Jul 2012 21:40:28 +0200 Subject: [PATCH 1969/2134] add an assert to check if parents size <= offspring size when using eoCommaReplacement This may be more explicit than the exception thrown in eoTruncate. --- eo/src/eoMergeReduce.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eo/src/eoMergeReduce.h b/eo/src/eoMergeReduce.h index b3cb5b990..6a2618d9d 100644 --- a/eo/src/eoMergeReduce.h +++ b/eo/src/eoMergeReduce.h @@ -55,7 +55,7 @@ class eoMergeReduce : public eoReplacement merge(_merge), reduce(_reduce) {} - void operator()(eoPop& _parents, eoPop& _offspring) + virtual void operator()(eoPop& _parents, eoPop& _offspring) { merge(_parents, _offspring); // parents untouched, result in offspring reduce(_offspring, _parents.size()); @@ -92,6 +92,14 @@ class eoCommaReplacement : public eoMergeReduce public : eoCommaReplacement() : eoMergeReduce(no_elite, truncate) {} + virtual void operator()(eoPop& _parents, eoPop& _offspring) + { + // There must be more offsprings than parents, or else an exception will be raised + assert( _offspring.size() >= _parents.size() ); + + eoMergeReduce::operator()( _parents, _offspring ); + } + private : eoNoElitism no_elite; eoTruncate truncate; From da4a7489f3fe6d37670ee9b5cb6c95b1626e3a29 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 11:29:48 +0200 Subject: [PATCH 1970/2134] bugfix build: build applications, correct prototype for EDA --- edo/CMakeLists.txt | 2 +- edo/application/eda/main.cpp | 5 ++--- edo/test/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 10b1fbe23..c17988058 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -92,7 +92,7 @@ SET(SAMPLE_SRCS) ###################################################################################### ADD_SUBDIRECTORY(src) -#ADD_SUBDIRECTORY(application) +ADD_SUBDIRECTORY(application) ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(doc) diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index 250e6bf1e..cd6b3ed44 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -162,9 +162,8 @@ int main(int ac, char** av) // EDA algorithm configuration edoAlgo< Distrib >* algo = new edoEDA< Distrib > - (*selector, *estimator, *sampler, - pop_continue, *distribution_continue, - popEval, *replacor); + (popEval, *selector, *estimator, *sampler, *replacor, + pop_continue, *distribution_continue ); // Beginning of the algorithm call try { diff --git a/edo/test/CMakeLists.txt b/edo/test/CMakeLists.txt index 1ceea4f3b..7a3129a1d 100644 --- a/edo/test/CMakeLists.txt +++ b/edo/test/CMakeLists.txt @@ -33,7 +33,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common) SET(SOURCES - t-cholesky + #t-cholesky t-edoEstimatorNormalMulti t-mean-distance t-bounderno From 2d19ff4e6d596a788bad41bec0bbf3d8f393b556 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 11:31:34 +0200 Subject: [PATCH 1971/2134] prepare CMA-ES from the EDA example --- edo/application/CMakeLists.txt | 2 +- edo/application/cmaes/CMakeLists.txt | 28 +++++ edo/application/cmaes/main.cpp | 181 +++++++++++++++++++++++++++ 3 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 edo/application/cmaes/CMakeLists.txt create mode 100644 edo/application/cmaes/main.cpp diff --git a/edo/application/CMakeLists.txt b/edo/application/CMakeLists.txt index eea3dcb90..a2e972c4e 100644 --- a/edo/application/CMakeLists.txt +++ b/edo/application/CMakeLists.txt @@ -9,6 +9,6 @@ INCLUDE_DIRECTORIES( ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(eda_sa) ADD_SUBDIRECTORY(eda) -#ADD_SUBDIRECTORY(sa) +ADD_SUBDIRECTORY(cmaes) ###################################################################################### diff --git a/edo/application/cmaes/CMakeLists.txt b/edo/application/cmaes/CMakeLists.txt new file mode 100644 index 000000000..e74bbf47e --- /dev/null +++ b/edo/application/cmaes/CMakeLists.txt @@ -0,0 +1,28 @@ +PROJECT(cma-es) + +FIND_PACKAGE(Boost 1.33.0) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + +SET(RESOURCES + ${PROJECT_NAME}.param + ) + +FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${EDO_BINARY_DIR}/${file} + ) +ENDFOREACH(file) + +FILE(GLOB SOURCES *.cpp) + +SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) + +ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES}) + diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp new file mode 100644 index 000000000..18c3f093f --- /dev/null +++ b/edo/application/cmaes/main.cpp @@ -0,0 +1,181 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Caner Candan +*/ + +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include "Rosenbrock.h" +#include "Sphere.h" + + +typedef eoReal EOT; +typedef edoNormalMulti< EOT > Distrib; + + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + // Letters used by the following declarations: + // a d i p t + + std::string section("Algorithm parameters"); + + eoState state; + + // Instantiate all needed parameters for EDA algorithm + double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R + + eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); + state.storeFunctor(selector); + + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); + state.storeFunctor(estimator); + + eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); + state.storeFunctor(plainEval); + + unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E + eoEvalFuncCounterBounder< EOT > eval(*plainEval, max_eval); + + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + state.storeFunctor(gen); + + unsigned int dimension_size = parser.createParam((unsigned int)10, "dimension-size", "Dimension size", 'd', section).value(); // d + + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( dimension_size, *gen ); + state.storeFunctor(init); + + + // (1) Population init and sampler + // Generation of population from do_make_pop (creates parameters, manages persistance and so on...) + // ... and creates the parameters: L P r S + // this first sampler creates a uniform distribution independently from our distribution (it does not use edoUniform). + eoPop< EOT >& pop = do_make_pop(parser, state, *init); + + // (2) First evaluation before starting the research algorithm + apply(eval, pop); + + // Prepare bounder class to set bounds of sampling. + // This is used by edoSampler. + edoBounder< EOT >* bounder = + new edoBounderRng< EOT >( EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); // FIXME do not use hard-coded bounds + state.storeFunctor(bounder); + + // Prepare sampler class with a specific distribution + edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); + state.storeFunctor(sampler); + + // stopping criteria + // ... and creates the parameter letters: C E g G s T + eoContinue< EOT >& eo_continue = do_make_continue(parser, state, eval); + + // population output + eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); + + // distribution output + edoDummyContinue< Distrib >* dummy_continue = new edoDummyContinue< Distrib >(); + state.storeFunctor(dummy_continue); + + edoCheckPoint< Distrib >* distribution_continue = new edoCheckPoint< Distrib >( *dummy_continue ); + state.storeFunctor(distribution_continue); + + // eoEPRemplacement causes the using of the current and previous + // sample for sampling. + eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); + state.storeFunctor(replacor); + + // Some stuff to display helper when we are using -h option + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + // Help + Verbose routines + make_verbose(parser); + make_help(parser); + + // population output (after helper) + // + // FIXME: theses objects are instanciated there in order to avoid a folder + // removing as edoFileSnapshot does within ctor. + edoPopStat< EOT >* popStat = new edoPopStat; + state.storeFunctor(popStat); + pop_continue.add(*popStat); + + edoFileSnapshot* fileSnapshot = new edoFileSnapshot("EDA_ResPop"); + state.storeFunctor(fileSnapshot); + fileSnapshot->add(*popStat); + pop_continue.add(*fileSnapshot); + + // distribution output (after helper) + edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >(); + state.storeFunctor(distrib_stat); + + distribution_continue->add( *distrib_stat ); + + // eoMonitor* stdout_monitor = new eoStdoutMonitor(); + // state.storeFunctor(stdout_monitor); + // stdout_monitor->add(*distrib_stat); + // distribution_continue->add( *stdout_monitor ); + + eoFileMonitor* file_monitor = new eoFileMonitor("eda_distribution_bounds.txt"); + state.storeFunctor(file_monitor); + file_monitor->add(*distrib_stat); + distribution_continue->add( *file_monitor ); + + eoPopLoopEval popEval( eval ); + + // EDA algorithm configuration + edoAlgo< Distrib >* algo = new edoEDA< Distrib > + (popEval, *selector, *estimator, *sampler, *replacor, + pop_continue, *distribution_continue ); + + + // Beginning of the algorithm call + try { + do_run(*algo, pop); + + } catch (eoEvalFuncCounterBounderException& e) { + eo::log << eo::warnings << "warning: " << e.what() << std::endl; + + } catch (std::exception& e) { + eo::log << eo::errors << "error: " << e.what() << std::endl; + exit(EXIT_FAILURE); + } + return 0; +} From 766ac33c5af0917b8d86fdd45256911097707154 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 16:26:19 +0200 Subject: [PATCH 1972/2134] conditional build scripts with boost xor eigen --- edo/CMakeLists.txt | 46 +++++++++++++++++++++++----- edo/application/cmaes/CMakeLists.txt | 18 ++++++++--- edo/application/cmaes/t-eigen.cpp | 15 +++++++++ edo/build_gcc_linux_debug | 2 +- edo/build_gcc_linux_eigen_debug | 7 +++++ edo/src/edoEstimatorNormalMulti.h | 8 +++++ edo/src/edoNormalMulti.h | 12 +++++++- edo/src/edoNormalMultiCenter.h | 10 ++++++ edo/src/edoSamplerNormalMulti.h | 10 ++++++ edo/src/utils/edoCholesky.h | 10 ++++++ edo/src/utils/edoStatNormalMulti.h | 10 ++++++ 11 files changed, 134 insertions(+), 14 deletions(-) create mode 100644 edo/application/cmaes/t-eigen.cpp create mode 100755 edo/build_gcc_linux_eigen_debug diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index c17988058..796a9e1b0 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -29,25 +29,57 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT ###################################################################################### # include useful features for cmake -SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) +SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/cmake/modules) + INCLUDE(FindDoxygen) INCLUDE(FindPkgConfig) -FIND_PACKAGE(Boost 1.33.0) +IF( WITH_BOOST AND WITH_EIGEN ) + MESSAGE( "ERROR: You have to choose between Boost:ublas and Eigen, you cannot compile with both libraries" ) + SET(IS_FATAL 1) +ELSEIF( NOT WITH_BOOST AND NOT WITH_EIGEN ) + #MESSAGE( "WARNING: Boost:ublas and Eigen are both deactivated, some features may lack." ) + # FIXME ideally, we would have a minimal implementation with STL vectors… + MESSAGE( "FIXME: Boost:ublas and Eigen are both deactivated, too much features will lack, you should choose one." ) + SET(IS_FATAL 1) +ENDIF() + +IF(WITH_BOOST) + FIND_PACKAGE(Boost 1.33.0) + IF( Boost_FOUND ) + INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ) + ADD_DEFINITIONS( -DWITH_BOOST ) + ELSE() + MESSAGE( "ERROR: You asked for Boost:ublas but it has nost been found." ) + SET(IS_FATAL 1) + ENDIF() +ELSEIF( WITH_EIGEN ) + # FIXME FindEigen3.cmake does not work + #find_package(Eigen3) + #include_directories(EIGEN3_INCLUDE_DIR) + SET( EIGEN3_FOUND 1) + SET( EIGEN3_INCLUDE_DIR "/usr/include/eigen3/" ) + + IF( EIGEN3_FOUND ) + INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} ) + ADD_DEFINITIONS( -DWITH_EIGEN ) + ELSE() + MESSAGE( "ERROR: You asked for Eigen but it has nost been found." ) + SET(IS_FATAL 1) + ENDIF() +ENDIF() FIND_PACKAGE(EO) INCLUDE_DIRECTORIES( ${EO_INCLUDE_DIRS} ${MO_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - # /Dev/ometah-0.3/common - ) +) LINK_DIRECTORIES( ${EO_LIBRARY_DIRS} - ) +) ###################################################################################### @@ -58,7 +90,7 @@ LINK_DIRECTORIES( INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/src - ) +) ###################################################################################### diff --git a/edo/application/cmaes/CMakeLists.txt b/edo/application/cmaes/CMakeLists.txt index e74bbf47e..627611493 100644 --- a/edo/application/cmaes/CMakeLists.txt +++ b/edo/application/cmaes/CMakeLists.txt @@ -1,12 +1,17 @@ -PROJECT(cma-es) +PROJECT(cmaes) -FIND_PACKAGE(Boost 1.33.0) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +#find_package(Eigen3 REQUIRED) +#include_directories(EIGEN3_INCLUDE_DIR) +INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} ) +MESSAGE( "MESSAGE:" ${EIGEN3_INCLUDE_DIR} ) +#FIND_PACKAGE(Boost 1.33.0) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + SET(RESOURCES ${PROJECT_NAME}.param ) @@ -19,10 +24,13 @@ FOREACH(file ${RESOURCES}) ) ENDFOREACH(file) -FILE(GLOB SOURCES *.cpp) +#FILE(GLOB SOURCES *.cpp) SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) -ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) +ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES}) +IF( WITH_EIGEN ) + ADD_EXECUTABLE(t-eigen t-eigen.cpp) +ENDIF() diff --git a/edo/application/cmaes/t-eigen.cpp b/edo/application/cmaes/t-eigen.cpp new file mode 100644 index 000000000..6064714ab --- /dev/null +++ b/edo/application/cmaes/t-eigen.cpp @@ -0,0 +1,15 @@ +#include +#include + +using Eigen::MatrixXd; + +int main() +{ + MatrixXd m(2,2); + m(0,0) = 3; + m(1,0) = 2.5; + m(0,1) = -1; + m(1,1) = m(1,0) + m(0,1); + std::cout << m << std::endl; +} + diff --git a/edo/build_gcc_linux_debug b/edo/build_gcc_linux_debug index 144a5298a..74b2b6d29 100755 --- a/edo/build_gcc_linux_debug +++ b/edo/build_gcc_linux_debug @@ -2,6 +2,6 @@ mkdir -p debug cd debug -cmake -DCMAKE_BUILD_TYPE=Debug .. +cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_BOOST=1 .. make cd .. diff --git a/edo/build_gcc_linux_eigen_debug b/edo/build_gcc_linux_eigen_debug new file mode 100755 index 000000000..ea754f9bd --- /dev/null +++ b/edo/build_gcc_linux_eigen_debug @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p debug +cd debug +cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_EIGEN=1 .. +make +cd .. diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index cfd979fe4..48aa4e962 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -29,9 +29,11 @@ Authors: #ifndef _edoEstimatorNormalMulti_h #define _edoEstimatorNormalMulti_h + #include "edoEstimator.h" #include "edoNormalMulti.h" +#ifdef WITH_BOOST //! edoEstimatorNormalMulti< EOT > template < typename EOT > @@ -149,4 +151,10 @@ public: } }; +#else +#ifdef WITH_EIGEN + +#endif // WITH_EIGEN +#endif // WITH_BOOST + #endif // !_edoEstimatorNormalMulti_h diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index be0e7d00a..5ddd6c8e7 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -28,10 +28,13 @@ Copyright (C) 2010 Thales group #ifndef _edoNormalMulti_h #define _edoNormalMulti_h +#include "edoDistrib.h" + +#ifdef WITH_BOOST + #include #include -#include "edoDistrib.h" namespace ublas = boost::numeric::ublas; @@ -70,4 +73,11 @@ private: ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar; }; + +#else +#ifdef WITH_EIGEN + +#endif // WITH_EIGEN +#endif // WITH_BOOST + #endif // !_edoNormalMulti_h diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index 199ded47a..548a7d060 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -31,6 +31,9 @@ Authors: #include "edoModifierMass.h" #include "edoNormalMulti.h" + +#ifdef WITH_BOOST + //! edoNormalMultiCenter< EOT > template < typename EOT > @@ -47,4 +50,11 @@ public: } }; +#else +#ifdef WITH_EIGEN + +#endif // WITH_EIGEN +#endif // WITH_BOOST + + #endif // !_edoNormalMultiCenter_h diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index b7e73c754..5a2bbdf84 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -32,6 +32,9 @@ Authors: #include #include + +#ifdef WITH_BOOST + #include #include #include @@ -84,4 +87,11 @@ protected: cholesky::CholeskyLLT _cholesky; }; +#else +#ifdef WITH_EIGEN + +#endif // WITH_EIGEN +#endif // WITH_BOOST + + #endif // !_edoSamplerNormalMulti_h diff --git a/edo/src/utils/edoCholesky.h b/edo/src/utils/edoCholesky.h index e0437d009..fad067507 100644 --- a/edo/src/utils/edoCholesky.h +++ b/edo/src/utils/edoCholesky.h @@ -27,6 +27,9 @@ Authors: namespace cholesky { + +#ifdef WITH_BOOST + /** Cholesky decomposition, given a matrix V, return a matrix L * such as V = L L^T (L^T being the transposed of L). * @@ -282,4 +285,11 @@ public: } }; +#else +#ifdef WITH_EIGEN + +#endif // WITH_EIGEN +#endif // WITH_BOOST + + } // namespace cholesky diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index 3a653edc5..32d975edc 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -33,6 +33,9 @@ Authors: #include "edoStat.h" #include "edoNormalMulti.h" + +#ifdef WITH_BOOST + //! edoStatNormalMulti< EOT > template < typename EOT > @@ -67,4 +70,11 @@ public: } }; +#else +#ifdef WITH_EIGEN + +#endif // WITH_EIGEN +#endif // WITH_BOOST + + #endif // !_edoStatNormalMulti_h From 3eefe9cd25b2cfe788f9563847f553b670ced6d8 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 18:46:48 +0200 Subject: [PATCH 1973/2134] deactivate eda_sa for the moment --- edo/application/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/application/CMakeLists.txt b/edo/application/CMakeLists.txt index a2e972c4e..c03fa57de 100644 --- a/edo/application/CMakeLists.txt +++ b/edo/application/CMakeLists.txt @@ -7,7 +7,7 @@ INCLUDE_DIRECTORIES( ) ADD_SUBDIRECTORY(common) -ADD_SUBDIRECTORY(eda_sa) +#ADD_SUBDIRECTORY(eda_sa) ADD_SUBDIRECTORY(eda) ADD_SUBDIRECTORY(cmaes) From f3e1562a14fc374880e95c25b5a6d5d9c41bd8c7 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 18:47:35 +0200 Subject: [PATCH 1974/2134] add the Eigen library implementations of normal distributions computations --- edo/src/edoEstimatorNormalMulti.h | 222 ++++++++++++++++++++--------- edo/src/edoNormalMulti.h | 57 ++++++-- edo/src/edoNormalMultiCenter.h | 21 ++- edo/src/edoSamplerNormalMulti.h | 67 ++++++++- edo/src/utils/edoStatNormalMulti.h | 40 +++--- 5 files changed, 301 insertions(+), 106 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 48aa4e962..76d535da4 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -34,8 +34,8 @@ Authors: #include "edoNormalMulti.h" #ifdef WITH_BOOST -//! edoEstimatorNormalMulti< EOT > +//! edoEstimatorNormalMulti< EOT > template < typename EOT > class edoEstimatorNormalMulti : public edoEstimator< edoNormalMulti< EOT > > { @@ -43,95 +43,95 @@ public: class CovMatrix { public: - typedef typename EOT::AtomType AtomType; + typedef typename EOT::AtomType AtomType; - CovMatrix( const eoPop< EOT >& pop ) - { - //------------------------------------------------------------- - // Some checks before starting to estimate covar - //------------------------------------------------------------- + CovMatrix( const eoPop< EOT >& pop ) + { + //------------------------------------------------------------- + // Some checks before starting to estimate covar + //------------------------------------------------------------- - unsigned int p_size = pop.size(); // population size - assert(p_size > 0); + unsigned int p_size = pop.size(); // population size + assert(p_size > 0); - unsigned int s_size = pop[0].size(); // solution size - assert(s_size > 0); + unsigned int s_size = pop[0].size(); // solution size + assert(s_size > 0); - //------------------------------------------------------------- + //------------------------------------------------------------- - //------------------------------------------------------------- - // Copy the population to an ublas matrix - //------------------------------------------------------------- + //------------------------------------------------------------- + // Copy the population to an ublas matrix + //------------------------------------------------------------- - ublas::matrix< AtomType > sample( p_size, s_size ); + ublas::matrix< AtomType > sample( p_size, s_size ); - for (unsigned int i = 0; i < p_size; ++i) - { - for (unsigned int j = 0; j < s_size; ++j) - { - sample(i, j) = pop[i][j]; - } - } + for (unsigned int i = 0; i < p_size; ++i) + { + for (unsigned int j = 0; j < s_size; ++j) + { + sample(i, j) = pop[i][j]; + } + } - //------------------------------------------------------------- + //------------------------------------------------------------- - _varcovar.resize(s_size); + _varcovar.resize(s_size); - //------------------------------------------------------------- - // variance-covariance matrix are symmetric (and semi-definite - // positive), thus a triangular storage is sufficient - // - // variance-covariance matrix computation : transpose(A) * A - //------------------------------------------------------------- + //------------------------------------------------------------- + // variance-covariance matrix are symmetric (and semi-definite + // positive), thus a triangular storage is sufficient + // + // variance-covariance matrix computation : transpose(A) * A + //------------------------------------------------------------- - ublas::symmetric_matrix< AtomType, ublas::lower > var = ublas::prod( ublas::trans( sample ), sample ); + ublas::symmetric_matrix< AtomType, ublas::lower > var = ublas::prod( ublas::trans( sample ), sample ); - // Be sure that the symmetric matrix got the good size + // Be sure that the symmetric matrix got the good size - assert(var.size1() == s_size); - assert(var.size2() == s_size); - assert(var.size1() == _varcovar.size1()); - assert(var.size2() == _varcovar.size2()); + assert(var.size1() == s_size); + assert(var.size2() == s_size); + assert(var.size1() == _varcovar.size1()); + assert(var.size2() == _varcovar.size2()); - //------------------------------------------------------------- + //------------------------------------------------------------- - // TODO: to remove the comment below + // TODO: to remove the comment below - // for (unsigned int i = 0; i < s_size; ++i) - // { - // // triangular LOWER matrix, thus j is not going further than i - // for (unsigned int j = 0; j <= i; ++j) - // { - // // we want a reducted covariance matrix - // _varcovar(i, j) = var(i, j) / p_size; - // } - // } + // for (unsigned int i = 0; i < s_size; ++i) + // { + // // triangular LOWER matrix, thus j is not going further than i + // for (unsigned int j = 0; j <= i; ++j) + // { + // // we want a reducted covariance matrix + // _varcovar(i, j) = var(i, j) / p_size; + // } + // } - _varcovar = var / p_size; + _varcovar = var / p_size; - _mean.resize(s_size); // FIXME: check if it is really used because of the assignation below + _mean.resize(s_size); // FIXME: check if it is really used because of the assignation below - // unit vector - ublas::scalar_vector< AtomType > u( p_size, 1 ); + // unit vector + ublas::scalar_vector< AtomType > u( p_size, 1 ); - // sum over columns - _mean = ublas::prod( ublas::trans( sample ), u ); + // sum over columns + _mean = ublas::prod( ublas::trans( sample ), u ); - // division by n - _mean /= p_size; - } + // division by n + _mean /= p_size; + } - const ublas::symmetric_matrix< AtomType, ublas::lower >& get_varcovar() const {return _varcovar;} + const ublas::symmetric_matrix< AtomType, ublas::lower >& get_varcovar() const {return _varcovar;} - const ublas::vector< AtomType >& get_mean() const {return _mean;} + const ublas::vector< AtomType >& get_mean() const {return _mean;} private: - ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar; - ublas::vector< AtomType > _mean; + ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar; + ublas::vector< AtomType > _mean; }; public: @@ -139,21 +139,109 @@ public: edoNormalMulti< EOT > operator()(eoPop& pop) { - unsigned int popsize = pop.size(); - assert(popsize > 0); + unsigned int popsize = pop.size(); + assert(popsize > 0); - unsigned int dimsize = pop[0].size(); - assert(dimsize > 0); + unsigned int dimsize = pop[0].size(); + assert(dimsize > 0); - CovMatrix cov( pop ); + CovMatrix cov( pop ); - return edoNormalMulti< EOT >( cov.get_mean(), cov.get_varcovar() ); + return edoNormalMulti< EOT >( cov.get_mean(), cov.get_varcovar() ); } }; #else #ifdef WITH_EIGEN +//! edoEstimatorNormalMulti< EOT > +template < typename EOT > +class edoEstimatorNormalMulti : public edoEstimator< edoNormalMulti< EOT > > +{ +public: + class CovMatrix + { + public: + typedef typename EOT::AtomType AtomType; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + + CovMatrix( const eoPop< EOT >& pop ) + { + // Some checks before starting to estimate covar + unsigned int p_size = pop.size(); // population size + assert(p_size > 0); + unsigned int s_size = pop[0].size(); // solution size + assert(s_size > 0); + + // Copy the population to an ublas matrix + //ublas::matrix< AtomType > sample( p_size, s_size ); + Matrix sample( p_size, s_size ); + + for (unsigned int i = 0; i < p_size; ++i) { + for (unsigned int j = 0; j < s_size; ++j) { + sample(i, j) = pop[i][j]; + } + } + + // _varcovar.resize(s_size); + + // variance-covariance matrix are symmetric, thus a triangular storage is sufficient + // variance-covariance matrix computation : transpose(A) * A + //ublas::symmetric_matrix< AtomType, ublas::lower > var = ublas::prod( ublas::trans( sample ), sample ); + Matrix var = sample.transpose() * sample; + + // Be sure that the symmetric matrix got the good size + assert(var.innerSize() == s_size); + assert(var.outerSize() == s_size); + assert(var.innerSize() == _varcovar.innerSize()); + assert(var.outerSize() == _varcovar.outerSize()); + + _varcovar = var / p_size; + + // _mean.resize(s_size); // FIXME: check if it is really used because of the assignation below + + // unit vector + // ublas::scalar_vector< AtomType > u( p_size, 1 ); + Vector u( p_size, 1); + + // sum over columns + // _mean = ublas::prod( ublas::trans( sample ), u ); + _mean = sample.transpose() * u; + + // division by n + _mean /= p_size; + } + + // const ublas::symmetric_matrix< AtomType, ublas::lower >& get_varcovar() const {return _varcovar;} + const Matrix& get_varcovar() const {return _varcovar;} + + // const ublas::vector< AtomType >& get_mean() const {return _mean;} + const Vector& get_mean() const {return _mean;} + + private: + // ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar; + Matrix _varcovar; + // ublas::vector< AtomType > _mean; + Vector _mean; + }; + +public: + typedef typename EOT::AtomType AtomType; + + edoNormalMulti< EOT > operator()(eoPop& pop) + { + unsigned int popsize = pop.size(); + assert(popsize > 0); + + unsigned int dimsize = pop[0].size(); + assert(dimsize > 0); + + CovMatrix cov( pop ); + + return edoNormalMulti< EOT >( cov.get_mean(), cov.get_varcovar() ); + } +}; #endif // WITH_EIGEN #endif // WITH_BOOST diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index 5ddd6c8e7..d5f76871f 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -21,8 +21,8 @@ Copyright (C) 2010 Thales group */ /* Authors: - Johann Dreo - Caner Candan + Johann Dreo + Caner Candan */ #ifndef _edoNormalMulti_h @@ -39,7 +39,6 @@ Copyright (C) 2010 Thales group namespace ublas = boost::numeric::ublas; //! edoNormalMulti< EOT > - template < typename EOT > class edoNormalMulti : public edoDistrib< EOT > { @@ -51,18 +50,18 @@ public: const ublas::vector< AtomType >& mean, const ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar ) - : _mean(mean), _varcovar(varcovar) + : _mean(mean), _varcovar(varcovar) { - assert(_mean.size() > 0); - assert(_mean.size() == _varcovar.size1()); - assert(_mean.size() == _varcovar.size2()); + assert(_mean.size() > 0); + assert(_mean.size() == _varcovar.size1()); + assert(_mean.size() == _varcovar.size2()); } unsigned int size() { - assert(_mean.size() == _varcovar.size1()); - assert(_mean.size() == _varcovar.size2()); - return _mean.size(); + assert(_mean.size() == _varcovar.size1()); + assert(_mean.size() == _varcovar.size2()); + return _mean.size(); } ublas::vector< AtomType > mean() const {return _mean;} @@ -77,6 +76,44 @@ private: #else #ifdef WITH_EIGEN +#include + +template < typename EOT > +class edoNormalMulti : public edoDistrib< EOT > +{ +public: + typedef typename EOT::AtomType AtomType; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; // Note: by default, Eigen is column-major + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + + edoNormalMulti( + const Vector & mean, + const Matrix & varcovar + ) + : _mean(mean), _varcovar(varcovar) + { + assert(_mean.innerSize() > 0); + assert(_mean.innerSize() == _varcovar.innerSize()); + assert(_mean.innerSize() == _varcovar.outerSize()); + } + + unsigned int size() + { + assert(_mean.innerSize() == _varcovar.innerSize()); + assert(_mean.innerSize() == _varcovar.outerSize()); + return _mean.innerSize(); + } + + Vector mean() const {return _mean;} + Matrix varcovar() const {return _varcovar;} + +private: + Vector _mean; + Matrix _varcovar; +}; + + + #endif // WITH_EIGEN #endif // WITH_BOOST diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index 548a7d060..8dac84613 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -31,7 +31,6 @@ Authors: #include "edoModifierMass.h" #include "edoNormalMulti.h" - #ifdef WITH_BOOST //! edoNormalMultiCenter< EOT > @@ -44,15 +43,29 @@ public: void operator() ( edoNormalMulti< EOT >& distrib, EOT& mass ) { - ublas::vector< AtomType > mean( distrib.size() ); - std::copy( mass.begin(), mass.end(), mean.begin() ); - distrib.mean() = mean; + ublas::vector< AtomType > mean( distrib.size() ); + std::copy( mass.begin(), mass.end(), mean.begin() ); + distrib.mean() = mean; } }; #else #ifdef WITH_EIGEN +template < typename EOT > +class edoNormalMultiCenter : public edoModifierMass< edoNormalMulti< EOT > > +{ +public: + typedef typename EOT::AtomType AtomType; + + void operator() ( edoNormalMulti< EOT >& distrib, EOT& mass ) + { + assert( distrib.size() == mass.innerSize() ); + Eigen::Matrix< AtomType, Eigen::Dynamic, 1 > mean( mass ); + distrib.mean() = mean; + } +}; + #endif // WITH_EIGEN #endif // WITH_BOOST diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 5a2bbdf84..5b067a14a 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -33,12 +33,6 @@ Authors: #include -#ifdef WITH_BOOST - -#include -#include -#include - /** Sample points in a multi-normal law defined by a mean vector and a covariance matrix. * * Given M the mean vector and V the covariance matrix, of order n: @@ -46,6 +40,13 @@ Authors: * - compute the Cholesky decomposition L of V (i.e. such as V=LL*) * - return X = M + LT */ + +#ifdef WITH_BOOST + +#include +#include +#include + template< class EOT, typename EOD = edoNormalMulti< EOT > > class edoSamplerNormalMulti : public edoSampler< EOD > { @@ -90,6 +91,60 @@ protected: #else #ifdef WITH_EIGEN +template< class EOT, typename EOD = edoNormalMulti< EOT > > +class edoSamplerNormalMulti : public edoSampler< EOD > +{ +public: + typedef typename EOT::AtomType AtomType; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + + edoSamplerNormalMulti( edoRepairer & repairer ) + : edoSampler< EOD >( repairer) + {} + + + EOT sample( EOD& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + // L = cholesky decomposition of varcovar + + // Computes L and D such as V = L D L^T + Eigen::LDLT cholesky( distrib.varcovar() ); + Matrix L0 = cholesky.matrixL(); + Eigen::Diagonal D = cholesky.vectorD(); + + // now compute the final symetric matrix: this->_L = L D^1/2 + // remember that V = ( L D^1/2) ( L D^1/2)^T + // fortunately, the square root of a diagonal matrix is the square + // root of all its elements + Eigen::Diagonal sqrtD = D.cwiseSqrt(); + + Matrix L = L0 * D; + + + // T = vector of size elements drawn in N(0,1) + Vector T( size ); + for ( unsigned int i = 0; i < size; ++i ) { + T( i ) = rng.normal(); + } + + // LT = L * T + Vector LT = L * T; + + // solution = means + LT + Vector mean = distrib.mean(); + Vector typed_solution = mean + LT; + EOT solution( size ); + for( unsigned int i = 0; i < mean.innerSize(); i++ ) { + solution.push_back( typed_solution(i) ); + } + + return solution; + } +}; #endif // WITH_EIGEN #endif // WITH_BOOST diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index 32d975edc..de917f6c9 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -28,16 +28,24 @@ Authors: #ifndef _edoStatNormalMulti_h #define _edoStatNormalMulti_h -#include +#include #include "edoStat.h" #include "edoNormalMulti.h" - #ifdef WITH_BOOST -//! edoStatNormalMulti< EOT > +#include +#else +#ifdef WITH_EIGEN + + // include nothing + +#endif // WITH_EIGEN +#endif // WITH_BOOST + +//! edoStatNormalMulti< EOT > template < typename EOT > class edoStatNormalMulti : public edoDistribStat< edoNormalMulti< EOT > > { @@ -47,34 +55,28 @@ public: using edoDistribStat< edoNormalMulti< EOT > >::value; edoStatNormalMulti( std::string desc = "" ) - : edoDistribStat< edoNormalMulti< EOT > >( desc ) + : edoDistribStat< edoNormalMulti< EOT > >( desc ) {} void operator()( const edoNormalMulti< EOT >& distrib ) { - value() = "\n# ====== multi normal distribution dump =====\n"; + value() = "\n# ====== multi normal distribution dump =====\n"; - std::ostringstream os; + std::ostringstream os; - os << distrib.mean() << " " << distrib.varcovar() << std::endl; + os << distrib.mean() << " " << distrib.varcovar() << std::endl; - // ublas::vector< AtomType > mean = distrib.mean(); - // std::copy(mean.begin(), mean.end(), std::ostream_iterator< std::string >( os, " " )); + // ublas::vector< AtomType > mean = distrib.mean(); + // std::copy(mean.begin(), mean.end(), std::ostream_iterator< std::string >( os, " " )); - // ublas::symmetric_matrix< AtomType, ublas::lower > varcovar = distrib.varcovar(); - // std::copy(varcovar.begin(), varcovar.end(), std::ostream_iterator< std::string >( os, " " )); + // ublas::symmetric_matrix< AtomType, ublas::lower > varcovar = distrib.varcovar(); + // std::copy(varcovar.begin(), varcovar.end(), std::ostream_iterator< std::string >( os, " " )); - // os << std::endl; + // os << std::endl; - value() += os.str(); + value() += os.str(); } }; -#else -#ifdef WITH_EIGEN - -#endif // WITH_EIGEN -#endif // WITH_BOOST - #endif // !_edoStatNormalMulti_h From 661ef08e4430849b0c8a83e6ee005efbda3f95bf Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 22:36:41 +0200 Subject: [PATCH 1975/2134] working multi-normal sampler with eigen Diagonal matrix are intermediate type, implicit conversion to matrix is needed. --- edo/src/edoSamplerNormalMulti.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 5b067a14a..b0a43d1a6 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -109,21 +109,19 @@ public: unsigned int size = distrib.size(); assert(size > 0); - // L = cholesky decomposition of varcovar + // LsD = cholesky decomposition of varcovar // Computes L and D such as V = L D L^T Eigen::LDLT cholesky( distrib.varcovar() ); - Matrix L0 = cholesky.matrixL(); - Eigen::Diagonal D = cholesky.vectorD(); + Matrix L = cholesky.matrixL(); + Matrix D = cholesky.vectorD(); - // now compute the final symetric matrix: this->_L = L D^1/2 + // now compute the final symetric matrix: LsD = L D^1/2 // remember that V = ( L D^1/2) ( L D^1/2)^T // fortunately, the square root of a diagonal matrix is the square // root of all its elements - Eigen::Diagonal sqrtD = D.cwiseSqrt(); - - Matrix L = L0 * D; - + Matrix sqrtD = D.cwiseSqrt(); + Matrix LsD = L * sqrtD; // T = vector of size elements drawn in N(0,1) Vector T( size ); @@ -131,12 +129,14 @@ public: T( i ) = rng.normal(); } - // LT = L * T - Vector LT = L * T; + // LDT = (L D^1/2) * T + Vector LDT = LsD * T; - // solution = means + LT + // solution = means + LDT Vector mean = distrib.mean(); - Vector typed_solution = mean + LT; + Vector typed_solution = mean + LDT; + + // copy in the EOT structure (more probably a vector) EOT solution( size ); for( unsigned int i = 0; i < mean.innerSize(); i++ ) { solution.push_back( typed_solution(i) ); From f0564c233e707163993f641079f97eb13b59fc75 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 22:37:40 +0200 Subject: [PATCH 1976/2134] test support for Eigen implementations --- edo/test/t-edoEstimatorNormalMulti.cpp | 149 +++++----------- edo/test/t-mean-distance.cpp | 224 +++++++++++++------------ 2 files changed, 158 insertions(+), 215 deletions(-) diff --git a/edo/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp index 91d932962..c62f6dfab 100644 --- a/edo/test/t-edoEstimatorNormalMulti.cpp +++ b/edo/test/t-edoEstimatorNormalMulti.cpp @@ -40,22 +40,29 @@ typedef eoReal< eoMinimizingFitness > EOT; typedef edoNormalMulti< EOT > Distrib; typedef EOT::AtomType AtomType; +#ifdef WITH_BOOST +#include +#include + typedef ublas::vector< AtomType > Vector; + typedef ublas::symmetric_matrix< AtomType, ublas::lower > Matrix; +#else +#ifdef WITH_EIGEN +#include + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; +#endif +#endif + int main(int ac, char** av) { - //----------------------------------------------------- // (0) parser + eo routines - //----------------------------------------------------- - eoParser parser(ac, av); - std::string section("Algorithm parameters"); - - unsigned int p_size = parser.createParam((unsigned int)100, "popSize", "Population Size", 'P', section).value(); // P - - unsigned int s_size = parser.createParam((unsigned int)2, "dimension-size", "Dimension size", 'd', section).value(); // d - - AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m + std::string section("Algorithm parameters"); + unsigned int p_size = parser.createParam((unsigned int)100, "popSize", "Population Size", 'P', section).value(); // P + unsigned int s_size = parser.createParam((unsigned int)2, "dimension-size", "Dimension size", 'd', section).value(); // d + AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m AtomType covar1_value = parser.createParam((AtomType)1.0, "covar1", "Covar value 1", '1', section).value(); AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value(); @@ -66,29 +73,20 @@ int main(int ac, char** av) << covar3_value << "_gen"; std::string gen_filename = ss.str(); - if (parser.userNeedsHelp()) - { - parser.printHelp(std::cout); - exit(1); - } + if( parser.userNeedsHelp() ) { + parser.printHelp(std::cout); + exit(1); + } make_verbose(parser); make_help(parser); - assert(p_size > 0); assert(s_size > 0); - eoState state; - //----------------------------------------------------- - - - //----------------------------------------------------- // (1) Population init and sampler - //----------------------------------------------------- - eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); state.storeFunctor(gen); @@ -99,18 +97,14 @@ int main(int ac, char** av) // fill population thanks to eoInit instance eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); - //----------------------------------------------------- - - - //----------------------------------------------------------------------------- // (2) distribution initial parameters - //----------------------------------------------------------------------------- + Vector mean( s_size ); - ublas::vector< AtomType > mean( s_size ); + for (unsigned int i = 0; i < s_size; ++i) { + mean( i ) = mean_value; + } - for (unsigned int i = 0; i < s_size; ++i) { mean( i ) = mean_value; } - - ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); + Matrix varcovar( s_size, s_size ); varcovar( 0, 0 ) = covar1_value; varcovar( 0, 1 ) = covar2_value; @@ -118,13 +112,7 @@ int main(int ac, char** av) Distrib distrib( mean, varcovar ); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (3a) distribution output preparation - //----------------------------------------------------------------------------- - edoDummyContinue< Distrib >* distrib_dummy_continue = new edoDummyContinue< Distrib >(); state.storeFunctor(distrib_dummy_continue); @@ -141,60 +129,29 @@ int main(int ac, char** av) distrib_file_snapshot->add(*distrib_stat); distrib_continue->add(*distrib_file_snapshot); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (3b) distribution output - //----------------------------------------------------------------------------- - (*distrib_continue)( distrib ); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // Prepare bounder class to set bounds of sampling. // This is used by edoSampler. - //----------------------------------------------------------------------------- - - edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), - EOT(pop[0].size(), 5), - *gen); + edoBounder< EOT >* bounder = new edoBounderRng< EOT >( + EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen + ); state.storeFunctor(bounder); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // Prepare sampler class with a specific distribution - //----------------------------------------------------------------------------- - edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); state.storeFunctor(sampler); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (4) sampling phase - //----------------------------------------------------------------------------- - pop.clear(); - for (unsigned int i = 0; i < p_size; ++i) - { - EOT candidate_solution = (*sampler)( distrib ); - pop.push_back( candidate_solution ); - } + for( unsigned int i = 0; i < p_size; ++i ) { + EOT candidate_solution = (*sampler)( distrib ); + pop.push_back( candidate_solution ); + } - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (5) population output - //----------------------------------------------------------------------------- - eoContinue< EOT >* pop_cont = new eoGenContinue< EOT >( 2 ); // never reached fitness state.storeFunctor(pop_cont); @@ -212,53 +169,31 @@ int main(int ac, char** av) (*pop_continue)( pop ); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (6) estimation phase - //----------------------------------------------------------------------------- - edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); state.storeFunctor(estimator); distrib = (*estimator)( pop ); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (7) distribution output - //----------------------------------------------------------------------------- - (*distrib_continue)( distrib ); - //----------------------------------------------------------------------------- - - - //----------------------------------------------------------------------------- // (8) euclidianne distance estimation - //----------------------------------------------------------------------------- - - ublas::vector< AtomType > new_mean = distrib.mean(); - ublas::symmetric_matrix< AtomType, ublas::lower > new_varcovar = distrib.varcovar(); + Vector new_mean = distrib.mean(); + Matrix new_varcovar = distrib.varcovar(); AtomType distance = 0; - - for ( unsigned int d = 0; d < s_size; ++d ) - { - distance += pow( mean[ d ] - new_mean[ d ], 2 ); - } + for( unsigned int d = 0; d < s_size; ++d ) { + distance += pow( mean[ d ] - new_mean[ d ], 2 ); + } distance = sqrt( distance ); eo::log << eo::logging - << "mean: " << mean << std::endl - << "new mean: " << new_mean << std::endl - << "distance: " << distance << std::endl - ; - - //----------------------------------------------------------------------------- + << "mean: " << mean << std::endl + << "new mean: " << new_mean << std::endl + << "distance: " << distance << std::endl + ; return 0; } diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index 8e62c378a..d119c1a94 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -37,8 +37,6 @@ Authors: #include -#include -#include #include "Rosenbrock.h" #include "Sphere.h" @@ -47,15 +45,25 @@ typedef eoReal< eoMinimizingFitness > EOT; typedef edoNormalMulti< EOT > Distrib; typedef EOT::AtomType AtomType; +#ifdef WITH_BOOST +#include +#include + typedef ublas::vector< AtomType > Vector; + typedef ublas::symmetric_matrix< AtomType, ublas::lower > Matrix; +#else +#ifdef WITH_EIGEN +#include + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; +#endif +#endif + int main(int ac, char** av) { - //----------------------------------------------------- // (0) parser + eo routines - //----------------------------------------------------- - eoParser parser(ac, av); - std::string section("Algorithm parameters"); + std::string section("Algorithm parameters"); unsigned int r_max = parser.createParam((unsigned int)100, "run-number", "Number of run", 'r', section).value(); // r unsigned int p_min = parser.createParam((unsigned int)10, "population-min", "Population min", 'p', section).value(); // p @@ -72,15 +80,15 @@ int main(int ac, char** av) std::string files_description = parser.createParam((std::string)"files_description.txt", "files-description", "Files description", 'F', section).value(); // F if (parser.userNeedsHelp()) - { - parser.printHelp(std::cout); - exit(1); - } + { + parser.printHelp(std::cout); + exit(1); + } make_verbose(parser); make_help(parser); - //----------------------------------------------------- + assert(r_max >= 1); assert(s_size >= 2); @@ -90,139 +98,139 @@ int main(int ac, char** av) ::mkdir( results_directory.c_str(), 0755 ); for ( unsigned int p_size = p_min; p_size <= p_max; p_size += p_step ) - { - assert(p_size >= p_min); + { + assert(p_size >= p_min); - std::ostringstream desc_file; - desc_file << results_directory << "/" << files_description; + std::ostringstream desc_file; + desc_file << results_directory << "/" << files_description; - std::ostringstream cur_file; - cur_file << results_directory << "/pop_" << p_size << ".txt"; + std::ostringstream cur_file; + cur_file << results_directory << "/pop_" << p_size << ".txt"; - eo::log << eo::file( desc_file.str() ) << cur_file.str().c_str() << std::endl; + eo::log << eo::file( desc_file.str() ) << cur_file.str().c_str() << std::endl; - eo::log << eo::file( cur_file.str() ); + eo::log << eo::file( cur_file.str() ); - eo::log << eo::logging << "run_number p_size s_size mean(0) mean(1) new-mean(0) new-mean(1) distance" << std::endl; + eo::log << eo::logging << "run_number p_size s_size mean(0) mean(1) new-mean(0) new-mean(1) distance" << std::endl; - eo::log << eo::quiet; + eo::log << eo::quiet; - for ( unsigned int r = 1; r <= r_max; ++r) - { + for ( unsigned int r = 1; r <= r_max; ++r) + { - eoState state; + eoState state; - //----------------------------------------------------- - // (1) Population init and sampler - //----------------------------------------------------- - eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); - state.storeFunctor(gen); - - eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( s_size, *gen ); - state.storeFunctor(init); - - // create an empty pop and let the state handle the memory - // fill population thanks to eoInit instance - eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); - - //----------------------------------------------------- + // (1) Population init and sampler - //----------------------------------------------------------------------------- - // (2) distribution initial parameters - //----------------------------------------------------------------------------- + eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); + state.storeFunctor(gen); - ublas::vector< AtomType > mean( s_size, mean_value ); - ublas::symmetric_matrix< AtomType, ublas::lower > varcovar( s_size, s_size ); + eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( s_size, *gen ); + state.storeFunctor(init); - varcovar( 0, 0 ) = covar1_value; - varcovar( 0, 1 ) = covar2_value; - varcovar( 1, 1 ) = covar3_value; - - Distrib distrib( mean, varcovar ); - - //----------------------------------------------------------------------------- + // create an empty pop and let the state handle the memory + // fill population thanks to eoInit instance + eoPop< EOT >& pop = state.takeOwnership( eoPop< EOT >( p_size, *init ) ); - //----------------------------------------------------------------------------- - // Prepare bounder class to set bounds of sampling. - // This is used by edoSampler. - //----------------------------------------------------------------------------- - - edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), - EOT(pop[0].size(), 5), - *gen); - state.storeFunctor(bounder); - - //----------------------------------------------------------------------------- - //----------------------------------------------------------------------------- - // Prepare sampler class with a specific distribution - //----------------------------------------------------------------------------- - edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); - state.storeFunctor(sampler); - - //----------------------------------------------------------------------------- + // (2) distribution initial parameters - //----------------------------------------------------------------------------- - // (4) sampling phase - //----------------------------------------------------------------------------- + Vector mean( s_size, mean_value ); + Matrix varcovar( s_size, s_size ); - pop.clear(); + varcovar( 0, 0 ) = covar1_value; + varcovar( 0, 1 ) = covar2_value; + varcovar( 1, 1 ) = covar3_value; - for (unsigned int i = 0; i < p_size; ++i) - { - EOT candidate_solution = (*sampler)( distrib ); - pop.push_back( candidate_solution ); - } - - //----------------------------------------------------------------------------- + Distrib distrib( mean, varcovar ); - //----------------------------------------------------------------------------- - // (6) estimation phase - //----------------------------------------------------------------------------- - - edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); - state.storeFunctor(estimator); - - distrib = (*estimator)( pop ); - - //----------------------------------------------------------------------------- - //----------------------------------------------------------------------------- - // (8) euclidianne distance estimation - //----------------------------------------------------------------------------- - ublas::vector< AtomType > new_mean = distrib.mean(); - ublas::symmetric_matrix< AtomType, ublas::lower > new_varcovar = distrib.varcovar(); + // Prepare bounder class to set bounds of sampling. + // This is used by edoSampler. - AtomType distance = 0; - for ( unsigned int d = 0; d < s_size; ++d ) - { - distance += pow( mean[ d ] - new_mean[ d ], 2 ); - } + edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5), + EOT(pop[0].size(), 5), + *gen); + state.storeFunctor(bounder); - distance = sqrt( distance ); - eo::log << r << " " << p_size << " " << s_size << " " - << mean(0) << " " << mean(1) << " " - << new_mean(0) << " " << new_mean(1) << " " - << distance << std::endl - ; - //----------------------------------------------------------------------------- - } - } + // Prepare sampler class with a specific distribution + + + edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); + state.storeFunctor(sampler); + + + + + + // (4) sampling phase + + + pop.clear(); + + for (unsigned int i = 0; i < p_size; ++i) + { + EOT candidate_solution = (*sampler)( distrib ); + pop.push_back( candidate_solution ); + } + + + + + + // (6) estimation phase + + + edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); + state.storeFunctor(estimator); + + distrib = (*estimator)( pop ); + + + + + + // (8) euclidianne distance estimation + + + Vector new_mean = distrib.mean(); + Matrix new_varcovar = distrib.varcovar(); + + AtomType distance = 0; + + for ( unsigned int d = 0; d < s_size; ++d ) + { + distance += pow( mean[ d ] - new_mean[ d ], 2 ); + } + + distance = sqrt( distance ); + + eo::log << r << " " << p_size << " " << s_size << " " + << mean(0) << " " << mean(1) << " " + << new_mean(0) << " " << new_mean(1) << " " + << distance << std::endl + ; + + + + } + + } return 0; } From f8bae6109524d2466783cbb850a6d69d641a4db9 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 9 Jul 2012 22:58:55 +0200 Subject: [PATCH 1977/2134] use row major everywhere with Eigen --- edo/src/edoEstimatorNormalMulti.h | 6 ++++-- edo/src/edoNormalMulti.h | 4 ++-- edo/src/edoNormalMultiCenter.h | 4 +++- edo/src/edoSamplerNormalMulti.h | 6 ++++-- edo/test/t-edoEstimatorNormalMulti.cpp | 6 ++++-- edo/test/t-mean-distance.cpp | 6 ++++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 76d535da4..f5666b8f5 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -163,8 +163,10 @@ public: { public: typedef typename EOT::AtomType AtomType; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + // typedef typename edoNormalMulti::Vector Vector; + // typedef typename edoNormalMulti::Matrix Matrix; + typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; CovMatrix( const eoPop< EOT >& pop ) { diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index d5f76871f..1f34bc838 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -83,8 +83,8 @@ class edoNormalMulti : public edoDistrib< EOT > { public: typedef typename EOT::AtomType AtomType; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; // Note: by default, Eigen is column-major - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; edoNormalMulti( const Vector & mean, diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index 8dac84613..07d5e3d37 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -57,11 +57,13 @@ class edoNormalMultiCenter : public edoModifierMass< edoNormalMulti< EOT > > { public: typedef typename EOT::AtomType AtomType; + // typedef typename edoNormalMulti::Vector Vector; + typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; void operator() ( edoNormalMulti< EOT >& distrib, EOT& mass ) { assert( distrib.size() == mass.innerSize() ); - Eigen::Matrix< AtomType, Eigen::Dynamic, 1 > mean( mass ); + Vector mean( mass ); distrib.mean() = mean; } }; diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index b0a43d1a6..702d05aff 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -96,8 +96,10 @@ class edoSamplerNormalMulti : public edoSampler< EOD > { public: typedef typename EOT::AtomType AtomType; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + // typedef typename edoNormalMulti::Vector Vector; + // typedef typename edoNormalMulti::Matrix Matrix; + typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler< EOD >( repairer) diff --git a/edo/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp index c62f6dfab..e1fd88712 100644 --- a/edo/test/t-edoEstimatorNormalMulti.cpp +++ b/edo/test/t-edoEstimatorNormalMulti.cpp @@ -48,8 +48,10 @@ typedef EOT::AtomType AtomType; #else #ifdef WITH_EIGEN #include - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + // typedef typename edoNormalMulti::Vector Vector; + // typedef typename edoNormalMulti::Matrix Matrix; + typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; #endif #endif diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index d119c1a94..45448e82c 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -53,8 +53,10 @@ typedef EOT::AtomType AtomType; #else #ifdef WITH_EIGEN #include - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + // typedef typename edoNormalMulti::Vector Vector; + // typedef typename edoNormalMulti::Matrix Matrix; + typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; #endif #endif From c0be5c9700be2e9333be1feed66d526148c29c20 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 Jul 2012 12:02:40 +0200 Subject: [PATCH 1978/2134] no need of a eigen test --- edo/application/cmaes/CMakeLists.txt | 3 --- edo/application/cmaes/t-eigen.cpp | 15 --------------- 2 files changed, 18 deletions(-) delete mode 100644 edo/application/cmaes/t-eigen.cpp diff --git a/edo/application/cmaes/CMakeLists.txt b/edo/application/cmaes/CMakeLists.txt index 627611493..ade261ac7 100644 --- a/edo/application/cmaes/CMakeLists.txt +++ b/edo/application/cmaes/CMakeLists.txt @@ -31,6 +31,3 @@ SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES}) -IF( WITH_EIGEN ) - ADD_EXECUTABLE(t-eigen t-eigen.cpp) -ENDIF() diff --git a/edo/application/cmaes/t-eigen.cpp b/edo/application/cmaes/t-eigen.cpp deleted file mode 100644 index 6064714ab..000000000 --- a/edo/application/cmaes/t-eigen.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -using Eigen::MatrixXd; - -int main() -{ - MatrixXd m(2,2); - m(0,0) = 3; - m(1,0) = 2.5; - m(0,1) = -1; - m(1,1) = m(1,0) + m(0,1); - std::cout << m << std::endl; -} - From 2c0638aa8f788c499fdd6958a7ccc2a5496e5d4f Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 Jul 2012 12:04:25 +0200 Subject: [PATCH 1979/2134] correct template typedef for NormalMulti* classes --- edo/src/edoEstimatorNormalMulti.h | 10 ++++------ edo/src/edoNormalMultiCenter.h | 7 +++---- edo/src/edoSamplerNormalMulti.h | 9 ++++----- edo/test/t-mean-distance.cpp | 15 ++++++++++----- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index f5666b8f5..1ce893ba6 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -155,18 +155,16 @@ public: #ifdef WITH_EIGEN //! edoEstimatorNormalMulti< EOT > -template < typename EOT > -class edoEstimatorNormalMulti : public edoEstimator< edoNormalMulti< EOT > > +template < typename EOT, typename EOD = edoNormalMulti > +class edoEstimatorNormalMulti : public edoEstimator< EOD > { public: class CovMatrix { public: typedef typename EOT::AtomType AtomType; - // typedef typename edoNormalMulti::Vector Vector; - // typedef typename edoNormalMulti::Matrix Matrix; - typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; + typedef typename EOD::Vector Vector; + typedef typename EOD::Matrix Matrix; CovMatrix( const eoPop< EOT >& pop ) { diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index 07d5e3d37..034a581af 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -52,13 +52,12 @@ public: #else #ifdef WITH_EIGEN -template < typename EOT > -class edoNormalMultiCenter : public edoModifierMass< edoNormalMulti< EOT > > +template < typename EOT, typename EOD = edoNormalMulti< EOT > > +class edoNormalMultiCenter : public edoModifierMass { public: typedef typename EOT::AtomType AtomType; - // typedef typename edoNormalMulti::Vector Vector; - typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; + typedef typename EOD::Vector Vector; void operator() ( edoNormalMulti< EOT >& distrib, EOT& mass ) { diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 702d05aff..74db66121 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -96,10 +96,9 @@ class edoSamplerNormalMulti : public edoSampler< EOD > { public: typedef typename EOT::AtomType AtomType; - // typedef typename edoNormalMulti::Vector Vector; - // typedef typename edoNormalMulti::Matrix Matrix; - typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; + + typedef typename EOD::Vector Vector; + typedef typename EOD::Matrix Matrix; edoSamplerNormalMulti( edoRepairer & repairer ) : edoSampler< EOD >( repairer) @@ -116,7 +115,7 @@ public: // Computes L and D such as V = L D L^T Eigen::LDLT cholesky( distrib.varcovar() ); Matrix L = cholesky.matrixL(); - Matrix D = cholesky.vectorD(); + Matrix D = cholesky.vectorD().asDiagonal(); // now compute the final symetric matrix: LsD = L D^1/2 // remember that V = ( L D^1/2) ( L D^1/2)^T diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index 45448e82c..ae6de0eb3 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -43,7 +43,7 @@ Authors: typedef eoReal< eoMinimizingFitness > EOT; typedef edoNormalMulti< EOT > Distrib; -typedef EOT::AtomType AtomType; +typedef typename EOT::AtomType AtomType; #ifdef WITH_BOOST #include @@ -53,10 +53,8 @@ typedef EOT::AtomType AtomType; #else #ifdef WITH_EIGEN #include - // typedef typename edoNormalMulti::Vector Vector; - // typedef typename edoNormalMulti::Matrix Matrix; - typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; + typedef typename edoNormalMulti::Vector Vector; + typedef typename edoNormalMulti::Matrix Matrix; #endif #endif @@ -144,7 +142,14 @@ int main(int ac, char** av) // (2) distribution initial parameters +#ifdef WITH_BOOST Vector mean( s_size, mean_value ); +#else +#ifdef WITH_EIGEN + Vector mean( s_size ); + mean = Vector::Constant( s_size, mean_value); +#endif +#endif Matrix varcovar( s_size, s_size ); varcovar( 0, 0 ) = covar1_value; From f405973736c3a48c02dba4d8f3dbb06be6162f18 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 Jul 2012 14:07:34 +0200 Subject: [PATCH 1980/2134] use Eigen defaults column major store order --- edo/src/edoNormalMulti.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index 1f34bc838..db36810a0 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -83,8 +83,8 @@ class edoNormalMulti : public edoDistrib< EOT > { public: typedef typename EOT::AtomType AtomType; - typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; edoNormalMulti( const Vector & mean, From b0cbdf41ba20586cc15cbc5881c26474750ed4a9 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 Jul 2012 14:09:10 +0200 Subject: [PATCH 1981/2134] correct vector initialization within Eigen implemetation; delete useless asserts --- edo/src/edoEstimatorNormalMulti.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 1ce893ba6..735304276 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -194,16 +194,19 @@ public: // Be sure that the symmetric matrix got the good size assert(var.innerSize() == s_size); assert(var.outerSize() == s_size); - assert(var.innerSize() == _varcovar.innerSize()); - assert(var.outerSize() == _varcovar.outerSize()); _varcovar = var / p_size; + // assert(var.innerSize() == _varcovar.innerSize()); + // assert(var.outerSize() == _varcovar.outerSize()); + + // _mean.resize(s_size); // FIXME: check if it is really used because of the assignation below // unit vector // ublas::scalar_vector< AtomType > u( p_size, 1 ); - Vector u( p_size, 1); + Vector u( p_size); + u = Vector::Constant(p_size, 1); // sum over columns // _mean = ublas::prod( ublas::trans( sample ), u ); From 487a76c86375f8e0b8ade3935594c9416a133c86 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 Jul 2012 14:09:57 +0200 Subject: [PATCH 1982/2134] use types from the distribution --- edo/test/t-edoEstimatorNormalMulti.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/edo/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp index e1fd88712..114f8fa17 100644 --- a/edo/test/t-edoEstimatorNormalMulti.cpp +++ b/edo/test/t-edoEstimatorNormalMulti.cpp @@ -48,10 +48,8 @@ typedef EOT::AtomType AtomType; #else #ifdef WITH_EIGEN #include - // typedef typename edoNormalMulti::Vector Vector; - // typedef typename edoNormalMulti::Matrix Matrix; - typedef Eigen::Matrix< AtomType, 1, Eigen::Dynamic, Eigen::RowMajor> Vector; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; + typedef typename edoNormalMulti::Vector Vector; + typedef typename edoNormalMulti::Matrix Matrix; #endif #endif From 012d81f7e09b864bd571539046da08ea877e9d46 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 10 Jul 2012 14:11:22 +0200 Subject: [PATCH 1983/2134] clean old useless comments --- edo/src/edoEstimatorNormalMulti.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 735304276..311df2b22 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -175,7 +175,6 @@ public: assert(s_size > 0); // Copy the population to an ublas matrix - //ublas::matrix< AtomType > sample( p_size, s_size ); Matrix sample( p_size, s_size ); for (unsigned int i = 0; i < p_size; ++i) { @@ -184,11 +183,8 @@ public: } } - // _varcovar.resize(s_size); - // variance-covariance matrix are symmetric, thus a triangular storage is sufficient // variance-covariance matrix computation : transpose(A) * A - //ublas::symmetric_matrix< AtomType, ublas::lower > var = ublas::prod( ublas::trans( sample ), sample ); Matrix var = sample.transpose() * sample; // Be sure that the symmetric matrix got the good size @@ -197,35 +193,23 @@ public: _varcovar = var / p_size; - // assert(var.innerSize() == _varcovar.innerSize()); - // assert(var.outerSize() == _varcovar.outerSize()); - - - // _mean.resize(s_size); // FIXME: check if it is really used because of the assignation below - // unit vector - // ublas::scalar_vector< AtomType > u( p_size, 1 ); Vector u( p_size); u = Vector::Constant(p_size, 1); // sum over columns - // _mean = ublas::prod( ublas::trans( sample ), u ); _mean = sample.transpose() * u; // division by n _mean /= p_size; } - // const ublas::symmetric_matrix< AtomType, ublas::lower >& get_varcovar() const {return _varcovar;} const Matrix& get_varcovar() const {return _varcovar;} - // const ublas::vector< AtomType >& get_mean() const {return _mean;} const Vector& get_mean() const {return _mean;} private: - // ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar; Matrix _varcovar; - // ublas::vector< AtomType > _mean; Vector _mean; }; From ad89e280f929200188911a87f18a364775217f88 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 10 Jul 2012 14:46:12 +0200 Subject: [PATCH 1984/2134] Serialization: using maximum precision when converting double to string. --- eo/src/serial/String.h | 2 ++ eo/src/serial/Utils.h | 1 + 2 files changed, 3 insertions(+) diff --git a/eo/src/serial/String.h b/eo/src/serial/String.h index 43a2cffa8..6d81937f3 100644 --- a/eo/src/serial/String.h +++ b/eo/src/serial/String.h @@ -3,6 +3,7 @@ # include # include +# include # include "Entity.h" @@ -60,6 +61,7 @@ template inline void String::deserialize( T & value ) { std::stringstream ss; + ss.precision(std::numeric_limits::digits10 + 1); ss << *this; ss >> value; } diff --git a/eo/src/serial/Utils.h b/eo/src/serial/Utils.h index 70fd2f75a..f40c08d92 100644 --- a/eo/src/serial/Utils.h +++ b/eo/src/serial/Utils.h @@ -76,6 +76,7 @@ namespace eoserial String* make( const T & value ) { std::stringstream ss; + ss.precision(std::numeric_limits::digits10 + 1); ss << value; return new String( ss.str() ); } From 606eef08d8eb19e6d78f98d02c127d2e72cd0fb8 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 10 Jul 2012 14:48:46 +0200 Subject: [PATCH 1985/2134] Difference between termination messages Kill (stops the worker) and Terminate (waits for another task). --- eo/src/mpi/eoMpi.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index a2dcebf71..0281c9d59 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -31,7 +31,8 @@ namespace eo namespace Message { const int Continue = 0; - const int Finish = 1; + const int Finish = 1; // TODO commentaire : diffĂ©rence entre finir une tâche et arrĂŞter le worker Ă  expliciter. + const int Kill = 2; } const int DEFAULT_MASTER = 0; @@ -239,6 +240,7 @@ namespace eo ~FinallyBlock() { # ifndef NDEBUG + eo::log << eo::debug; eo::log << "[M" << comm.rank() << "] Frees all the idle." << std::endl; # endif // frees all the idle workers @@ -264,7 +266,6 @@ namespace eo assignmentAlgo.confirm( wrkRank ); } timerStat.stop("master_wait_for_all_responses"); - # ifndef NDEBUG eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; # endif @@ -321,7 +322,6 @@ namespace eo s.append( " in eoMpi loop"); throw std::runtime_error( s ); } - } void worker( ) @@ -330,27 +330,32 @@ namespace eo # ifndef NDEBUG eo::log << eo::debug; # endif + timerStat.start("worker_wait_for_order"); + comm.recv( masterRank, Channel::Commands, order ); + timerStat.stop("worker_wait_for_order"); + while( true ) { # ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; # endif - timerStat.start("worker_wait_for_order"); - comm.recv( masterRank, Channel::Commands, order ); - timerStat.stop("worker_wait_for_order"); - if ( order == Message::Finish ) + if ( order == Message::Kill ) { # ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Leaving worker task." << std::endl; # endif return; - } else + } else if( order == Message::Continue ) { # ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Processing task..." << std::endl; # endif processTask( ); } + + timerStat.start("worker_wait_for_order"); + comm.recv( masterRank, Channel::Commands, order ); + timerStat.stop("worker_wait_for_order"); } } From c663ad923083281714dfec3ad70127d22147a6fb Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 10 Jul 2012 15:18:31 +0200 Subject: [PATCH 1986/2134] move parser makers to show all help and use explicit dimension_size in bounder init app/eda --- edo/application/eda/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index cd6b3ed44..075057186 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -26,7 +26,7 @@ Authors: */ #include -#include +// #include #include @@ -92,7 +92,7 @@ int main(int ac, char** av) // Prepare bounder class to set bounds of sampling. // This is used by edoSampler. edoBounder< EOT >* bounder = - new edoBounderRng< EOT >( EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); // FIXME do not use hard-coded bounds + new edoBounderRng< EOT >( EOT(dimension_size, -5), EOT(dimension_size, 5), *gen); // FIXME do not use hard-coded bounds state.storeFunctor(bounder); // Prepare sampler class with a specific distribution @@ -117,7 +117,11 @@ int main(int ac, char** av) // sample for sampling. eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); state.storeFunctor(replacor); - + + // Help + Verbose routines + make_verbose(parser); + make_help(parser); + // Some stuff to display helper when we are using -h option if (parser.userNeedsHelp()) { @@ -125,10 +129,6 @@ int main(int ac, char** av) exit(1); } - // Help + Verbose routines - make_verbose(parser); - make_help(parser); - // population output (after helper) // // FIXME: theses objects are instanciated there in order to avoid a folder From 6cdf848f2625771f4e6eb1f93b3e258dfac903e0 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 10 Jul 2012 15:19:55 +0200 Subject: [PATCH 1987/2134] BUGFIX end solution initialization in the Normal Eigen sampler ; much more asserts --- edo/src/edoEstimatorNormalMulti.h | 15 +++++++++++---- edo/src/edoNormalMultiCenter.h | 5 ++++- edo/src/edoSamplerNormalMulti.h | 22 +++++++++++++++++++++- edo/src/utils/edoStatNormalMulti.h | 2 +- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 311df2b22..873968961 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -202,6 +202,8 @@ public: // division by n _mean /= p_size; + + assert(_mean.innerSize()==2); } const Matrix& get_varcovar() const {return _varcovar;} @@ -218,14 +220,19 @@ public: edoNormalMulti< EOT > operator()(eoPop& pop) { - unsigned int popsize = pop.size(); - assert(popsize > 0); + unsigned int p_size = pop.size(); + assert(p_size > 0); - unsigned int dimsize = pop[0].size(); - assert(dimsize > 0); + unsigned int s_size = pop[0].size(); + assert(s_size > 0); CovMatrix cov( pop ); + assert( cov.get_mean().innerSize() == s_size ); + assert( cov.get_mean().outerSize() == 1 ); + assert( cov.get_varcovar().innerSize() == s_size ); + assert( cov.get_varcovar().outerSize() == s_size ); + return edoNormalMulti< EOT >( cov.get_mean(), cov.get_varcovar() ); } }; diff --git a/edo/src/edoNormalMultiCenter.h b/edo/src/edoNormalMultiCenter.h index 034a581af..de6cb26fa 100644 --- a/edo/src/edoNormalMultiCenter.h +++ b/edo/src/edoNormalMultiCenter.h @@ -62,7 +62,10 @@ public: void operator() ( edoNormalMulti< EOT >& distrib, EOT& mass ) { assert( distrib.size() == mass.innerSize() ); - Vector mean( mass ); + Vector mean( distrib.size() ); + for( unsigned int i=0; i < distrib.size(); i++ ) { + mean(i) = mass[i]; + } distrib.mean() = mean; } }; diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 74db66121..6420f0408 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -115,33 +115,53 @@ public: // Computes L and D such as V = L D L^T Eigen::LDLT cholesky( distrib.varcovar() ); Matrix L = cholesky.matrixL(); + assert(L.innerSize() == size); + assert(L.outerSize() == size); + Matrix D = cholesky.vectorD().asDiagonal(); + assert(D.innerSize() == size); + assert(D.outerSize() == size); // now compute the final symetric matrix: LsD = L D^1/2 // remember that V = ( L D^1/2) ( L D^1/2)^T // fortunately, the square root of a diagonal matrix is the square // root of all its elements Matrix sqrtD = D.cwiseSqrt(); + assert(sqrtD.innerSize() == size); + assert(sqrtD.outerSize() == size); + Matrix LsD = L * sqrtD; + assert(LsD.innerSize() == size); + assert(LsD.outerSize() == size); // T = vector of size elements drawn in N(0,1) Vector T( size ); for ( unsigned int i = 0; i < size; ++i ) { T( i ) = rng.normal(); } + assert(T.innerSize() == size); + assert(T.outerSize() == 1); // LDT = (L D^1/2) * T Vector LDT = LsD * T; + assert(LDT.innerSize() == size); + assert(LDT.outerSize() == 1); // solution = means + LDT Vector mean = distrib.mean(); + assert(mean.innerSize() == size); + assert(mean.outerSize() == 1); + Vector typed_solution = mean + LDT; + assert(typed_solution.innerSize() == size); + assert(typed_solution.outerSize() == 1); // copy in the EOT structure (more probably a vector) EOT solution( size ); for( unsigned int i = 0; i < mean.innerSize(); i++ ) { - solution.push_back( typed_solution(i) ); + solution[i]= typed_solution(i); } + assert( solution.size() == size ); return solution; } diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index de917f6c9..bc5066ac7 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -64,7 +64,7 @@ public: std::ostringstream os; - os << distrib.mean() << " " << distrib.varcovar() << std::endl; + os << distrib.mean() << std::endl << std::endl << distrib.varcovar() << std::endl; // ublas::vector< AtomType > mean = distrib.mean(); // std::copy(mean.begin(), mean.end(), std::ostream_iterator< std::string >( os, " " )); From 4d6f59fae8953274c6237d493fc475d87f620c79 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 10 Jul 2012 15:25:14 +0200 Subject: [PATCH 1988/2134] set EDO version number to 0.1 --- edo/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 796a9e1b0..9a07cd619 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -16,8 +16,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(EDO) -SET(PROJECT_VERSION_MAJOR 1) -SET(PROJECT_VERSION_MINOR 0) +SET(PROJECT_VERSION_MAJOR 0) +SET(PROJECT_VERSION_MINOR 1) SET(PROJECT_VERSION_PATCH 0) SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") From 76228adc8969f2013578919d5c117416ed982438 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 10 Jul 2012 15:35:40 +0200 Subject: [PATCH 1989/2134] the readme talks about eda rather than eda_sa, less simple --- edo/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edo/README b/edo/README index 5b814b15d..4217a844e 100644 --- a/edo/README +++ b/edo/README @@ -33,11 +33,11 @@ In the edo/build/ directory: (Unix) > ctest Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial -In the directory "application", there are several directory such as eda_sa which instantiate EDA-SA solver. +In the directory "application", there are several directory such as eda which instantiate EDA solver. -(Unix) After compilation you can run the binary "build/eda_sa" and see results. Parameters can be modified from command line. +(Unix) After compilation you can run the binary "build/eda" and see results. Parameters can be modified from command line. -(Windows) Add argument "eda_sa.param" and execute the corresponding algorithms. +(Windows) Add argument "eda.param" and execute the corresponding algorithms. Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial From 144eb30bf9ca6f7e2c19af203fcb6f167261e42b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 10 Jul 2012 15:36:02 +0200 Subject: [PATCH 1990/2134] NEWS file for EDO --- edo/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 edo/NEWS diff --git a/edo/NEWS b/edo/NEWS new file mode 100644 index 000000000..caed81408 --- /dev/null +++ b/edo/NEWS @@ -0,0 +1,8 @@ +* current release + - alternative implementation of the multi-normal operators using the Eigen3 library + +* release 0.0 (2011-09-15) + - basic design for estimation of distribution algorithms and, more generally for randomized search heuristics + - continuous EDA example + - EDA using multi-normal distribution, implementation using the boost::ublas library + From 76c4f19829096b0f3f7985980952357df9158493 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 10 Jul 2012 15:38:36 +0200 Subject: [PATCH 1991/2134] Separating parameters of store's default constructor of job parameters in eoParallelPopEval. --- eo/src/eoPopEvalFunc.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index ce4dc5cf6..a728baa8f 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -85,31 +85,28 @@ class eoParallelPopLoopEval : public eoPopEvalFunc public: /** Ctor: set value of embedded eoEvalFunc */ eoParallelPopLoopEval( - eoEvalFunc & _eval, + // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, int _masterRank, + // Default parameters for store + eoEvalFunc & _eval, int _packetSize = 1 ) : - eval(_eval), assignAlgo( _assignAlgo ), masterRank( _masterRank ), - packetSize( _packetSize ), needToDeleteStore( true ) { store = new eo::mpi::ParallelEvalStore( _eval, _masterRank, _packetSize ); } eoParallelPopLoopEval( - eoEvalFunc & _eval, + // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, - eo::mpi::ParallelEvalStore* _store, int _masterRank, - int _packetSize = 1 + eo::mpi::ParallelEvalStore* _store ) : - eval(_eval), assignAlgo( _assignAlgo ), masterRank( _masterRank ), - packetSize( _packetSize ), needToDeleteStore( false ), store( _store ) { @@ -131,20 +128,17 @@ class eoParallelPopLoopEval : public eoPopEvalFunc } /** Do the job: simple loop over the offspring */ - void operator()(eoPop & _parents, eoPop & _offspring) + void operator()( eoPop & _parents, eoPop & _offspring ) { (void)_parents; parallelApply(_offspring, assignAlgo, masterRank, *store); } private: - eoEvalFunc & eval; - eo::mpi::AssignmentAlgorithm & assignAlgo; - eo::mpi::ParallelEvalStore* store; int masterRank; - int packetSize; + eo::mpi::ParallelEvalStore* store; bool needToDeleteStore; }; #endif From 394c9fc7cd7dbaf70e9f6cfbc6fd0437497e6d4a Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 10 Jul 2012 15:38:55 +0200 Subject: [PATCH 1992/2134] oups, forgot to remove a stupid debug assertion --- edo/src/edoEstimatorNormalMulti.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index 873968961..41eb78f5e 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -202,8 +202,6 @@ public: // division by n _mean /= p_size; - - assert(_mean.innerSize()==2); } const Matrix& get_varcovar() const {return _varcovar;} From 6600f1db51388626e52dc73fd37a18adc083ecf5 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 10 Jul 2012 16:08:35 +0200 Subject: [PATCH 1993/2134] Suppressed some warnings at compilation. --- eo/src/eoPopEvalFunc.h | 4 ++-- eo/src/mpi/eoMpi.h | 38 +++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index a728baa8f..d37eebafa 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -107,8 +107,8 @@ class eoParallelPopLoopEval : public eoPopEvalFunc ) : assignAlgo( _assignAlgo ), masterRank( _masterRank ), - needToDeleteStore( false ), - store( _store ) + store( _store ), + needToDeleteStore( false ) { // empty } diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 0281c9d59..0ef80c120 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -197,10 +197,13 @@ namespace eo class Job { public: - Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore & store ) : + Job( AssignmentAlgorithm& _algo, + int _masterRank, + JobStore & store + ) : assignmentAlgo( _algo ), - comm( Node::comm() ), masterRank( _masterRank ), + comm( Node::comm() ), // Functors sendTask( store.sendTask() ), handleResponse( store.handleResponse() ), @@ -217,11 +220,6 @@ namespace eo protected: - SendTaskFunction & sendTask; - HandleResponseFunction & handleResponse; - ProcessTaskFunction & processTask; - IsFinishedFunction & isFinished; - struct FinallyBlock { FinallyBlock( @@ -231,8 +229,9 @@ namespace eo ) : totalWorkers( _totalWorkers ), assignmentAlgo( _algo ), - comm( Node::comm() ), - that( _that ) + that( _that ), + // global field + comm( Node::comm() ) { // empty } @@ -274,9 +273,10 @@ namespace eo protected: int totalWorkers; - bmpi::communicator & comm; - Job< JobData > & that; AssignmentAlgorithm& assignmentAlgo; + Job< JobData > & that; + + bmpi::communicator & comm; }; void master( ) @@ -372,13 +372,17 @@ namespace eo } protected: - AssignmentAlgorithm& assignmentAlgo; - bmpi::communicator& comm; - int masterRank; - bool _isMaster; - struct rusage _usage; - long _current; + AssignmentAlgorithm& assignmentAlgo; + int masterRank; + bmpi::communicator& comm; + + SendTaskFunction & sendTask; + HandleResponseFunction & handleResponse; + ProcessTaskFunction & processTask; + IsFinishedFunction & isFinished; + + bool _isMaster; }; } } From 008f2571b2f4e2571c13a0bf9bd6a6b5663145dd Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 10 Jul 2012 17:32:18 +0200 Subject: [PATCH 1994/2134] MultiJob and OneShotJob allow to choose job's way of termination (Kill for multi, Finish for one shot). --- eo/src/mpi/eoMpi.h | 34 +++++++++++++++++++++++++++++++++- eo/src/mpi/eoParallelApply.h | 4 ++-- eo/src/mpi/eoTerminateJob.h | 4 ++-- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 0ef80c120..8521d5c30 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -199,10 +199,12 @@ namespace eo public: Job( AssignmentAlgorithm& _algo, int _masterRank, + int _workerStopCondition, JobStore & store ) : assignmentAlgo( _algo ), masterRank( _masterRank ), + workerStopCondition( _workerStopCondition ), comm( Node::comm() ), // Functors sendTask( store.sendTask() ), @@ -339,7 +341,7 @@ namespace eo # ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Waiting for an order..." << std::endl; # endif - if ( order == Message::Kill ) + if ( order == workerStopCondition ) { # ifndef NDEBUG eo::log << "[W" << comm.rank() << "] Leaving worker task." << std::endl; @@ -375,6 +377,7 @@ namespace eo AssignmentAlgorithm& assignmentAlgo; int masterRank; + const int workerStopCondition; bmpi::communicator& comm; SendTaskFunction & sendTask; @@ -383,6 +386,35 @@ namespace eo IsFinishedFunction & isFinished; bool _isMaster; + + }; + + template< class JobData > + class OneShotJob : public Job< JobData > + { + // TODO commentaire : ce job s'arrĂŞte sur message terminate + public: + OneShotJob( AssignmentAlgorithm& algo, + int masterRank, + JobStore & store ) + : Job( algo, masterRank, Message::Finish, store ) + { + // empty + } + }; + + template< class JobData > + class MultiJob : public Job< JobData > + { + public: + // TODO commentaire : ce job s'arrĂŞte sur message kill + MultiJob ( AssignmentAlgorithm& algo, + int masterRank, + JobStore & store ) + : Job( algo, masterRank, Message::Kill, store ) + { + // empty + } }; } } diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index a02254716..4ef588303 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -207,7 +207,7 @@ namespace eo // TODO commentaire : impossible de faire un typedef sur un template sans passer // par un traits => complique la tâche de l'utilisateur pour rien. template< typename EOT > - class ParallelApply : public Job< ParallelApplyData > + class ParallelApply : public MultiJob< ParallelApplyData > { public: @@ -216,7 +216,7 @@ namespace eo int _masterRank, ParallelApplyStore & store ) : - Job< ParallelApplyData >( algo, _masterRank, store ) + MultiJob< ParallelApplyData >( algo, _masterRank, store ) { // empty } diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index d85aeeb05..bda085a02 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -65,10 +65,10 @@ namespace eo void* data() { return 0; } }; - struct EmptyJob : public Job + struct EmptyJob : public OneShotJob { EmptyJob( AssignmentAlgorithm& algo, int masterRank ) : - Job( algo, masterRank, *(new DummyJobStore) ) + OneShotJob( algo, masterRank, *(new DummyJobStore) ) // FIXME memory leak => will be corrected by using const correctness { // empty From 472b86bc6856bc3a33e172ae862fef0d82385d2f Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 10 Jul 2012 17:34:18 +0200 Subject: [PATCH 1995/2134] MPI job functors have to be created with new, so as to be deleted by delete, because of Composite / Decorator pattern. --- eo/src/mpi/eoMpi.h | 13 +++++++++++- eo/src/mpi/eoParallelApply.h | 4 ---- eo/src/mpi/eoTerminateJob.h | 40 ------------------------------------ 3 files changed, 12 insertions(+), 45 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 8521d5c30..c277ddd07 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -119,6 +119,7 @@ namespace eo template< typename JobData > struct JobStore { + // TODO commentaire: ces pointeurs devraient ĂŞtre allouĂ©s avec new pour Ă©viter segfault on quit. JobStore( SendTaskFunction* stf, HandleResponseFunction* hrf, @@ -135,6 +136,16 @@ namespace eo // empty } + ~JobStore() + { + // TODO commentaire: Composition Pattern => dĂ©lĂ©gation de la destruction => destruction homogène => new + // et delete partout. + delete _stf; + delete _hrf; + delete _ptf; + delete _iff; + } + SendTaskFunction & sendTask() { return *_stf; } HandleResponseFunction & handleResponse() { return *_hrf; } ProcessTaskFunction & processTask() { return *_ptf; } @@ -377,7 +388,7 @@ namespace eo AssignmentAlgorithm& assignmentAlgo; int masterRank; - const int workerStopCondition; + const int workerStopCondition; // TODO commentaire: message signifiant l'arrĂŞt pour un worker bmpi::communicator& comm; SendTaskFunction & sendTask; diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 4ef588303..d93b5b818 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -194,10 +194,6 @@ namespace eo virtual ~ParallelApplyStore() { - delete _stf; - delete _hrf; - delete _ptf; - delete _iff; } protected: diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index bda085a02..4dc9f421b 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -54,14 +54,6 @@ namespace eo _iff = new DummyIsFinishedFunction; } - ~DummyJobStore() - { - delete _stf; - delete _hrf; - delete _ptf; - delete _iff; - } - void* data() { return 0; } }; @@ -83,38 +75,6 @@ namespace eo } } }; - - /* - class TerminateJob : public Job - { - public: - TerminateJob( AssignmentAlgorithm& algo, int _ ) - : Job( algo, _ ) - { - // empty - } - - void sendTask( int wrkRank ) - { - // empty - } - - void handleResponse( int wrkRank ) - { - // empty - } - - void processTask( ) - { - // empty - } - - bool isFinished() - { - return true; - } - }; - */ } } From d805800731a0a9dc985071a9731dcbc7c669a2b8 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 11 Jul 2012 10:03:53 +0200 Subject: [PATCH 1996/2134] Added packet size to parallel parser and default argument to static assignment. --- eo/src/mpi/eoMpiAssignmentAlgorithm.h | 3 ++- eo/src/utils/eoParallel.cpp | 2 ++ eo/src/utils/eoParallel.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h index c3d24a196..0630a6f7a 100644 --- a/eo/src/mpi/eoMpiAssignmentAlgorithm.h +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -114,13 +114,14 @@ namespace eo init( workers, runs ); } - StaticAssignmentAlgorithm( int runs ) + StaticAssignmentAlgorithm( int runs = 0 ) { std::vector workers; for(int i = 1; i < Node::comm().size(); ++i) { workers.push_back( i ); } + init( workers, runs ); } diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index d9d09c38b..418651984 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -37,6 +37,7 @@ eoParallel::eoParallel() : _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ), _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ), _doMeasure( false, "parallelize-do-measure", "Do some measures during execution", '\0' ), + _packetSize( 1U, "parallelize-packet-size", "Number of elements which should be sent at a time during a parallel evaluation based on message passing.", '\0'), _t_start(0) { } @@ -90,6 +91,7 @@ void eoParallel::_createParameters( eoParser& parser ) parser.processParam( _nthreads, section ); parser.processParam( _enableResults, section ); parser.processParam( _doMeasure, section ); + parser.processParam( _packetSize, section ); } void make_parallel(eoParser& parser) diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 3f22f6c43..3aae8e430 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -54,6 +54,7 @@ public: std::string prefix() const; inline unsigned int nthreads() const { return _nthreads.value(); } + inline unsigned int packetSize() const { return _packetSize.value(); } inline bool enableResults() const { return _enableResults.value(); } inline bool doMeasure() const { return _doMeasure.value(); } @@ -68,6 +69,7 @@ private: eoValueParam _isDynamic; eoValueParam _prefix; eoValueParam _nthreads; + eoValueParam _packetSize; eoValueParam _enableResults; eoValueParam _doMeasure; double _t_start; From 108c0bcf35e9e480ef9b0bb8843ad99270c15ccf Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 11 Jul 2012 10:41:48 +0200 Subject: [PATCH 1997/2134] Automatic deleting functors, only if necessary. --- eo/src/mpi/eoMpi.h | 25 +++++++++++----- eo/src/mpi/eoMultiParallelApply.h | 2 -- eo/src/mpi/eoParallelApply.h | 49 ++++++++++++++++++++++++------- eo/src/mpi/eoTerminateJob.h | 4 +++ 4 files changed, 60 insertions(+), 20 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index c277ddd07..fc419b13d 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -40,11 +40,19 @@ namespace eo template< typename JobData, typename Wrapped > struct SharedDataFunction { - SharedDataFunction( Wrapped * w = 0 ) : _wrapped( w ) + SharedDataFunction( Wrapped * w = 0 ) : _wrapped( w ), _needDelete( false ) { // empty } + virtual ~SharedDataFunction() + { + if( _wrapped && _wrapped->needDelete() ) + { + delete _wrapped; + } + } + void wrapped( Wrapped * w ) { _wrapped = w; @@ -59,9 +67,13 @@ namespace eo } } + bool needDelete() { return _needDelete; } + void needDelete( bool b ) { _needDelete = b; } + protected: JobData* d; Wrapped* _wrapped; + bool _needDelete; }; template< typename JobData > @@ -119,7 +131,6 @@ namespace eo template< typename JobData > struct JobStore { - // TODO commentaire: ces pointeurs devraient ĂŞtre allouĂ©s avec new pour Ă©viter segfault on quit. JobStore( SendTaskFunction* stf, HandleResponseFunction* hrf, @@ -138,12 +149,10 @@ namespace eo ~JobStore() { - // TODO commentaire: Composition Pattern => dĂ©lĂ©gation de la destruction => destruction homogène => new - // et delete partout. - delete _stf; - delete _hrf; - delete _ptf; - delete _iff; + if( _stf->needDelete() ) delete _stf; + if( _hrf->needDelete() ) delete _hrf; + if( _ptf->needDelete() ) delete _ptf; + if( _iff->needDelete() ) delete _iff; } SendTaskFunction & sendTask() { return *_stf; } diff --git a/eo/src/mpi/eoMultiParallelApply.h b/eo/src/mpi/eoMultiParallelApply.h index 85b1689e6..f4fe47b51 100644 --- a/eo/src/mpi/eoMultiParallelApply.h +++ b/eo/src/mpi/eoMultiParallelApply.h @@ -27,7 +27,6 @@ namespace eo ~ProcessTaskParallelEval() { - delete _wrapped; } }; @@ -39,7 +38,6 @@ namespace eo ParallelEvalStore( eoUF & _proc, int _masterRank, - // long _maxTime = 0, int _packetSize = 1 ) : ParallelApplyStore< EOT >( _proc, *( new std::vector ), _masterRank, _packetSize ) diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index d93b5b818..9598b952f 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -21,17 +21,23 @@ namespace eo { ParallelApplyData( eoUF & _proc, - std::vector & _pop, int _masterRank, // long _maxTime = 0, - int _packetSize + int _packetSize, + std::vector * _pop = 0 ) : - _data( &_pop ), func( _proc ), index( 0 ), size( _pop.size() ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) + _data( _pop ), func( _proc ), index( 0 ), packetSize( _packetSize ), masterRank( _masterRank ), comm( Node::comm() ) { if ( _packetSize <= 0 ) { throw std::runtime_error("Packet size should not be negative."); } + + if( _pop ) + { + size = _pop->size(); + } + tempArray = new EOT[ _packetSize ]; } @@ -172,18 +178,36 @@ namespace eo ParallelApplyStore( eoUF & _proc, - std::vector& _pop, int _masterRank, - // long _maxTime = 0, int _packetSize = 1, // JobStore functors - SendTaskParallelApply * stpa = new SendTaskParallelApply, - HandleResponseParallelApply* hrpa = new HandleResponseParallelApply, - ProcessTaskParallelApply* ptpa = new ProcessTaskParallelApply, - IsFinishedParallelApply* ifpa = new IsFinishedParallelApply + SendTaskParallelApply * stpa = 0, + HandleResponseParallelApply* hrpa = 0, + ProcessTaskParallelApply* ptpa = 0, + IsFinishedParallelApply* ifpa = 0 ) : - _data( _proc, _pop, _masterRank, _packetSize ) + _data( _proc, _masterRank, _packetSize ) { + if( stpa == 0 ) { + stpa = new SendTaskParallelApply; + stpa->needDelete( true ); + } + + if( hrpa == 0 ) { + hrpa = new HandleResponseParallelApply; + hrpa->needDelete( true ); + } + + if( ptpa == 0 ) { + ptpa = new ProcessTaskParallelApply; + ptpa->needDelete( true ); + } + + if( ifpa == 0 ) { + ifpa = new IsFinishedParallelApply; + ifpa->needDelete( true ); + } + _stf = stpa; _hrf = hrpa; _ptf = ptpa; @@ -192,6 +216,11 @@ namespace eo ParallelApplyData* data() { return &_data; } + void data( std::vector& _pop ) + { + _data.init( _pop ); + } + virtual ~ParallelApplyStore() { } diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index 4dc9f421b..ed45ca052 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -49,9 +49,13 @@ namespace eo DummyJobStore() { _stf = new DummySendTaskFunction; + _stf->needDelete( true ); _hrf = new DummyHandleResponseFunction; + _hrf->needDelete( true ); _ptf = new DummyProcessTaskFunction; + _ptf->needDelete( true ); _iff = new DummyIsFinishedFunction; + _iff->needDelete( true ); } void* data() { return 0; } From 414e011296c1c73d9d40ed3a4a3a64067a7a3e73 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 11 Jul 2012 10:42:35 +0200 Subject: [PATCH 1998/2134] Using ParallelApplyJob instead of MultiParallelApplyJob in eoPopEvalFunc. --- eo/src/apply.h | 2 +- eo/src/eoPopEvalFunc.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index 7845c14ec..b13c434e4 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -91,7 +91,7 @@ void parallelApply( std::vector& _pop, eo::mpi::AssignmentAlgorithm& _algo, int _masterRank, - eo::mpi::ParallelEvalStore & _store ) + eo::mpi::ParallelApplyStore & _store ) { _store.data( _pop ); _algo.reinit( _pop.size() ); diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index d37eebafa..c811e3a57 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -96,14 +96,15 @@ class eoParallelPopLoopEval : public eoPopEvalFunc masterRank( _masterRank ), needToDeleteStore( true ) { - store = new eo::mpi::ParallelEvalStore( _eval, _masterRank, _packetSize ); + // FIXME memory leak because of new. + store = new eo::mpi::ParallelApplyStore( _eval, _masterRank, _packetSize ); } eoParallelPopLoopEval( // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, int _masterRank, - eo::mpi::ParallelEvalStore* _store + eo::mpi::ParallelApplyStore* _store ) : assignAlgo( _assignAlgo ), masterRank( _masterRank ), @@ -138,7 +139,7 @@ class eoParallelPopLoopEval : public eoPopEvalFunc eo::mpi::AssignmentAlgorithm & assignAlgo; int masterRank; - eo::mpi::ParallelEvalStore* store; + eo::mpi::ParallelApplyStore* store; bool needToDeleteStore; }; #endif From 4ab5b2fd8983eb24be122ac009e46bc9a6876cf7 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 11 Jul 2012 11:41:10 +0200 Subject: [PATCH 1999/2134] Taking time measures only if parallel.doMeasure() is true. --- eo/src/utils/eoTimer.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/eo/src/utils/eoTimer.h b/eo/src/utils/eoTimer.h index c97ab5d35..8aa09c51b 100644 --- a/eo/src/utils/eoTimer.h +++ b/eo/src/utils/eoTimer.h @@ -7,6 +7,8 @@ # include # include +# include "utils/eoParallel.h" + # ifdef WITH_MPI # include # include @@ -119,16 +121,22 @@ class eoTimerStat void start( const std::string & key ) { - _timers[ key ].restart(); + if( eo::parallel.doMeasure() ) + { + _timers[ key ].restart(); + } } void stop( const std::string& key ) { - Stat & s = _stats[ key ]; - eoTimer & t = _timers[ key ]; - s.utime.push_back( t.usertime() ); - s.stime.push_back( t.systime() ); - s.wtime.push_back( t.wallclock() ); + if( eo::parallel.doMeasure() ) + { + Stat & s = _stats[ key ]; + eoTimer & t = _timers[ key ]; + s.utime.push_back( t.usertime() ); + s.stime.push_back( t.systime() ); + s.wtime.push_back( t.wallclock() ); + } } std::map< std::string, Stat > stats() From 12560899ae6b9546b43297bc64039baae706631a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 11 Jul 2012 12:00:36 +0200 Subject: [PATCH 2000/2134] Updating MPI tests. --- eo/test/mpi/eval.cpp | 8 +++----- eo/test/mpi/multipleRoles.cpp | 9 +++++++-- eo/test/mpi/parallelApply.cpp | 6 ++++-- eo/test/mpi/wrapper.cpp | 5 ++++- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/eo/test/mpi/eval.cpp b/eo/test/mpi/eval.cpp index 312c9d657..72fca7558 100644 --- a/eo/test/mpi/eval.cpp +++ b/eo/test/mpi/eval.cpp @@ -11,8 +11,6 @@ #include -#include - #include #include @@ -144,10 +142,10 @@ int main(int ac, char** av) eo::log << "Size of population : " << popSize << std::endl; - eo::mpi::ParallelEvalStore< EOT > store( eval, eo::mpi::DEFAULT_MASTER ); + eo::mpi::ParallelApplyStore< EOT > store( eval, eo::mpi::DEFAULT_MASTER ); store.wrapHandleResponse( new CatBestAnswers ); - eoParallelPopLoopEval< EOT > popEval( eval, assign, &store, eo::mpi::DEFAULT_MASTER, 3 ); + eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, &store ); eo::log << eo::quiet << "Before first evaluation." << std::endl; popEval( pop, pop ); eo::log << eo::quiet << "After first evaluation." << std::endl; @@ -160,7 +158,7 @@ int main(int ac, char** av) } else { eoPop< EOT > pop( popSize, init ); - eoParallelPopLoopEval< EOT > popEval( eval, assign, eo::mpi::DEFAULT_MASTER, 3 ); + eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, eval ); popEval( pop, pop ); } diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index ce10f6214..232a61105 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -1,5 +1,6 @@ # include # include +# include # include @@ -32,9 +33,11 @@ void subtask( vector& v, int rank ) DynamicAssignmentAlgorithm algo( workers ); SubWork sw; - ParallelApplyStore store( sw, v, rank ); + ParallelApplyStore store( sw, rank ); + store.data( v ); ParallelApply job( algo, rank, store ); job.run(); + EmptyJob stop( algo, rank ); } struct Work: public eoUF< vector&, void > @@ -74,11 +77,13 @@ int main(int argc, char** argv) { Work w; DynamicAssignmentAlgorithm algo( 1, 2 ); - ParallelApplyStore< vector > store( w, metaV, 0 ); + ParallelApplyStore< vector > store( w, 0 ); + store.data( metaV ); ParallelApply< vector > job( algo, 0, store ); job.run(); if( job.isMaster() ) { + EmptyJob stop( algo, 0 ); v = metaV[0]; cout << "Results : " << endl; for(int i = 0; i < v.size(); ++i) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index d562ef0ec..26b0b30ea 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -1,5 +1,6 @@ # include # include +# include # include @@ -110,8 +111,8 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { - ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 3 ); - // Job< JobData > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); + ParallelApplyStore< int > store( plusOneInstance, eo::mpi::DEFAULT_MASTER, 3 ); + store.data( v ); ParallelApply< int > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); if( job.isMaster() ) @@ -126,6 +127,7 @@ int main(int argc, char** argv) if( job.isMaster() ) { + EmptyJob stop( *(tests[i].assign), eo::mpi::DEFAULT_MASTER ); ++offset; for(int i = 0; i < v.size(); ++i) { diff --git a/eo/test/mpi/wrapper.cpp b/eo/test/mpi/wrapper.cpp index d8b72c98e..527c7cc6d 100644 --- a/eo/test/mpi/wrapper.cpp +++ b/eo/test/mpi/wrapper.cpp @@ -1,5 +1,6 @@ # include # include +# include # include @@ -60,13 +61,15 @@ int main(int argc, char** argv) StaticAssignmentAlgorithm assign( v.size() ); - ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 1 ); + ParallelApplyStore< int > store( plusOneInstance, eo::mpi::DEFAULT_MASTER, 1 ); + store.data( v ); store.wrapIsFinished( new ShowWrappedResult ); ParallelApply job( assign, eo::mpi::DEFAULT_MASTER, store ); // Equivalent to: // Job< ParallelApplyData > job( assign, 0, store ); job.run(); + EmptyJob stop( assign, eo::mpi::DEFAULT_MASTER ); if( job.isMaster() ) { From 6b5288f195305457be81544e5a4694280dcd5108 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 11 Jul 2012 13:44:43 +0200 Subject: [PATCH 2001/2134] build with boost by default --- edo/build_gcc_linux_release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/build_gcc_linux_release b/edo/build_gcc_linux_release index fb220d044..12e06bd01 100755 --- a/edo/build_gcc_linux_release +++ b/edo/build_gcc_linux_release @@ -2,6 +2,6 @@ mkdir -p release cd release -cmake .. +cmake -DWITH_BOOST=1 .. make cd .. From 8f736191c049b484e0f647a31776e232233ae99b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 11 Jul 2012 13:45:56 +0200 Subject: [PATCH 2002/2134] correct relative include path for edoStatNormalMulti --- edo/src/utils/edoStatNormalMulti.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index bc5066ac7..0de29700e 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -31,7 +31,7 @@ Authors: #include #include "edoStat.h" -#include "edoNormalMulti.h" +#include "../edoNormalMulti.h" #ifdef WITH_BOOST From 877937f7fc85b09dcf6ecf8baea0c35724eb8001 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 11 Jul 2012 13:49:23 +0200 Subject: [PATCH 2003/2134] adaptive distribution for cmaes --- edo/src/edoNormalAdaptive.h | 91 +++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 edo/src/edoNormalAdaptive.h diff --git a/edo/src/edoNormalAdaptive.h b/edo/src/edoNormalAdaptive.h new file mode 100644 index 000000000..499af91f5 --- /dev/null +++ b/edo/src/edoNormalAdaptive.h @@ -0,0 +1,91 @@ + +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann Dreo + Pierre SavĂ©ant +*/ + +#ifndef _edoNormalAdaptive_h +#define _edoNormalAdaptive_h + +#include "edoDistrib.h" + +#ifdef WITH_EIGEN + +#include + +template < typename EOT > +class edoNormalAdaptive : public edoDistrib< EOT > +{ +public: + typedef typename EOT::AtomType AtomType; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + + edoNormalAdaptive( unsigned int dim ) : + _mean( Vector::Zero(dim) ), + _C( Matrix::Identity(dim,dim) ), + _B( Matrix::Identity(dim,dim) ), + _D( Vector::Constant( dim, 1) ), + _sigma(1.0), + _p_c( Vector::Zero(dim) ), + _p_s( Vector::Zero(dim) ) + { + assert( dim > 0); + } + + unsigned int size() + { + return _mean.innerSize(); + } + + Vector mean() const {return _mean;} + Matrix covar() const {return _covar;} + Matrix coord_sys() const {return _B;} + Vector scaling() const {return _D;} + double sigma() const {return _sigma;} + Vector path_covar() const {return _p_c;} + Vector path_sigma() const {return _p_s;} + + void mean( Vector m ) { _mean = m; } + void covar( Matrix c ) { _C = c; } + void coord_sys( Matrix b ) { _B = b; } + void scaling( Vector d ) { _D = d; } + void sigma( double s ) { _sigma = s; } + void path_covar( Vector p ) { _path_covar = p; } + void path_sigma( Vector p ) { _path_sigma = p; } + +private: + Vector _mean; // + Matrix _C; // covariance matrix + Matrix _B; // eigen vectors / coordinates system + Vector _D; // eigen values / scaling + double _sigma; // + Vector _p_c; // evolution path for C + Vector _p_s; // evolution path for sigma +}; + +#endif // WITH_EIGEN + +#endif // !_edoNormalAdaptive_h From fc66eb4fd77afe9d286f1b3f97ff229cfc6e53fa Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 11 Jul 2012 13:49:37 +0200 Subject: [PATCH 2004/2134] adaptive sampler for cmaes --- edo/src/edoSamplerNormalAdaptive.h | 87 ++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 edo/src/edoSamplerNormalAdaptive.h diff --git a/edo/src/edoSamplerNormalAdaptive.h b/edo/src/edoSamplerNormalAdaptive.h new file mode 100644 index 000000000..193044f0b --- /dev/null +++ b/edo/src/edoSamplerNormalAdaptive.h @@ -0,0 +1,87 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoSamplerNormalAdaptive_h +#define _edoSamplerNormalAdaptive_h + +#include +#include + +#include + +/** Sample points in a multi-normal law defined by a mean vector and a covariance matrix. + * + * Given M the mean vector and V the covariance matrix, of order n: + * - draw a vector T in N(0,I) (i.e. each value is drawn in a normal law with mean=0 an stddev=1) + * - compute the Cholesky decomposition L of V (i.e. such as V=LL*) + * - return X = M + LT + */ +#ifdef WITH_EIGEN + +template< class EOT, typename EOD = edoNormalAdaptive< EOT > > +class edoSamplerNormalAdaptive : public edoSampler< EOD > +{ +public: + typedef typename EOT::AtomType AtomType; + + typedef typename EOD::Vector Vector; + typedef typename EOD::Matrix Matrix; + + edoSamplerNormalAdaptive( edoRepairer & repairer ) + : edoSampler< EOD >( repairer) + {} + + + EOT sample( EOD& distrib ) + { + unsigned int size = distrib.size(); + assert(size > 0); + + // T = vector of size elements drawn in N(0,1) + Vector T( size ); + for ( unsigned int i = 0; i < size; ++i ) { + T( i ) = rng.normal(); + } + assert(T.innerSize() == size); + assert(T.outerSize() == 1); + + //Vector t_sol = distrib.mean() + distrib.sigma() * distrib.coord_sys() * distrib.scaling() * T; + Vector sol = distrib.mean() + distrib.sigma() + * distrib.coord_sys().dot( distrib.scaling().dot( T ) ); + + // copy in the EOT structure (more probably a vector) + EOT solution( size ); + for( unsigned int i = 0; i < size; i++ ) { + solution[i]= sol(i); + } + + return solution; + } +}; +#endif // WITH_EIGEN + +#endif // !_edoSamplerNormalAdaptive_h From 546f24295ea1249afca51cafe09a5d11c03069f0 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 12 Jul 2012 11:25:07 +0200 Subject: [PATCH 2005/2134] use adaptive operators to implement CMA-ES --- edo/application/cmaes/main.cpp | 64 +++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index 18c3f093f..7e73d49dc 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -41,8 +41,8 @@ Authors: #include "Sphere.h" -typedef eoReal EOT; -typedef edoNormalMulti< EOT > Distrib; +typedef eoReal RealVec; +typedef edoNormalAdaptive< RealVec > Distrib; int main(int ac, char** av) @@ -59,24 +59,32 @@ int main(int ac, char** av) // Instantiate all needed parameters for EDA algorithm double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R - eoSelect< EOT >* selector = new eoDetSelect< EOT >( selection_rate ); + unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E + + unsigned int dim = parser.createParam((unsigned int)10, "dimension-size", "Dimension size", 'd', section).value(); // d + + + double mu = dim / 2; + + + edoNormalAdaptive distribution(dim); + + eoSelect< RealVec >* selector = new eoDetSelect< RealVec >( selection_rate ); state.storeFunctor(selector); - edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >(); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalAdaptive( distribution, mu ); state.storeFunctor(estimator); - eoEvalFunc< EOT >* plainEval = new Rosenbrock< EOT >(); + eoEvalFunc< RealVec >* plainEval = new Rosenbrock< RealVec >(); state.storeFunctor(plainEval); - unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E - eoEvalFuncCounterBounder< EOT > eval(*plainEval, max_eval); + eoEvalFuncCounterBounder< RealVec > eval(*plainEval, max_eval); eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); state.storeFunctor(gen); - unsigned int dimension_size = parser.createParam((unsigned int)10, "dimension-size", "Dimension size", 'd', section).value(); // d - eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( dimension_size, *gen ); + eoInitFixedLength< RealVec >* init = new eoInitFixedLength< RealVec >( dim, *gen ); state.storeFunctor(init); @@ -84,28 +92,28 @@ int main(int ac, char** av) // Generation of population from do_make_pop (creates parameters, manages persistance and so on...) // ... and creates the parameters: L P r S // this first sampler creates a uniform distribution independently from our distribution (it does not use edoUniform). - eoPop< EOT >& pop = do_make_pop(parser, state, *init); + eoPop< RealVec >& pop = do_make_pop(parser, state, *init); // (2) First evaluation before starting the research algorithm apply(eval, pop); // Prepare bounder class to set bounds of sampling. // This is used by edoSampler. - edoBounder< EOT >* bounder = - new edoBounderRng< EOT >( EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); // FIXME do not use hard-coded bounds + edoBounder< RealVec >* bounder = + new edoBounderRng< RealVec >( RealVec(dim, -5), RealVec(dim, 5), *gen); // FIXME do not use hard-coded bounds state.storeFunctor(bounder); // Prepare sampler class with a specific distribution - edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder ); + edoSampler< Distrib >* sampler = new edoSamplerNormalAdaptive< RealVec >( *bounder ); state.storeFunctor(sampler); - + // stopping criteria // ... and creates the parameter letters: C E g G s T - eoContinue< EOT >& eo_continue = do_make_continue(parser, state, eval); - + eoContinue< RealVec >& eo_continue = do_make_continue(parser, state, eval); + // population output - eoCheckPoint< EOT >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); - + eoCheckPoint< RealVec >& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue); + // distribution output edoDummyContinue< Distrib >* dummy_continue = new edoDummyContinue< Distrib >(); state.storeFunctor(dummy_continue); @@ -115,9 +123,9 @@ int main(int ac, char** av) // eoEPRemplacement causes the using of the current and previous // sample for sampling. - eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); + eoReplacement< RealVec >* replacor = new eoEPReplacement< RealVec >(pop.size()); state.storeFunctor(replacor); - + // Some stuff to display helper when we are using -h option if (parser.userNeedsHelp()) { @@ -133,7 +141,7 @@ int main(int ac, char** av) // // FIXME: theses objects are instanciated there in order to avoid a folder // removing as edoFileSnapshot does within ctor. - edoPopStat< EOT >* popStat = new edoPopStat; + edoPopStat< RealVec >* popStat = new edoPopStat; state.storeFunctor(popStat); pop_continue.add(*popStat); @@ -143,10 +151,10 @@ int main(int ac, char** av) pop_continue.add(*fileSnapshot); // distribution output (after helper) - edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >(); - state.storeFunctor(distrib_stat); + // edoDistribStat< Distrib >* distrib_stat = new edoStatNormalAdaptive< RealVec >(); + // state.storeFunctor(distrib_stat); - distribution_continue->add( *distrib_stat ); + // distribution_continue->add( *distrib_stat ); // eoMonitor* stdout_monitor = new eoStdoutMonitor(); // state.storeFunctor(stdout_monitor); @@ -155,14 +163,14 @@ int main(int ac, char** av) eoFileMonitor* file_monitor = new eoFileMonitor("eda_distribution_bounds.txt"); state.storeFunctor(file_monitor); - file_monitor->add(*distrib_stat); + // file_monitor->add(*distrib_stat); distribution_continue->add( *file_monitor ); - eoPopLoopEval popEval( eval ); + eoPopLoopEval popEval( eval ); // EDA algorithm configuration - edoAlgo< Distrib >* algo = new edoEDA< Distrib > - (popEval, *selector, *estimator, *sampler, *replacor, + edoAlgo< Distrib >* algo = new edoCMAES< Distrib > + (distribution, popEval, *selector, *estimator, *sampler, *replacor, pop_continue, *distribution_continue ); From defa972e097fb4fac08c8d9ed9db2d696790e09d Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 12 Jul 2012 11:25:34 +0200 Subject: [PATCH 2006/2134] typedef EOT -> EOType --- edo/src/edoAlgo.h | 2 +- edo/src/edoEDA.h | 44 +++++++++++++++++++-------------------- edo/src/edoEDASA.h | 52 +++++++++++++++++++++++----------------------- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/edo/src/edoAlgo.h b/edo/src/edoAlgo.h index b91a5c2ab..88ed3d63a 100644 --- a/edo/src/edoAlgo.h +++ b/edo/src/edoAlgo.h @@ -40,7 +40,7 @@ template < typename D > class edoAlgo : public eoAlgo< typename D::EOType > { //! Alias for the type - typedef typename D::EOType EOT; + typedef typename D::EOType EOType; // virtual R operator()(A1) = 0; (defined in eoUF) diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index f94e828f5..3e02ce64d 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -46,13 +46,13 @@ class edoEDA : public edoAlgo< D > { public: //! Alias for the type EOT - typedef typename D::EOType EOT; + typedef typename D::EOType EOType; //! Alias for the atom type - typedef typename EOT::AtomType AtomType; + typedef typename EOType::AtomType AtomType; //! Alias for the fitness - typedef typename EOT::Fitness Fitness; + typedef typename EOType::Fitness Fitness; public: @@ -69,12 +69,12 @@ public: \param distribution_continuator Stopping criterion based on the distribution features */ edoEDA ( - eoPopEvalFunc < EOT > & evaluator, - eoSelect< EOT > & selector, + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, edoEstimator< D > & estimator, edoSampler< D > & sampler, - eoReplacement< EOT > & replacor, - eoContinue< EOT > & pop_continuator, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator, edoContinue< D > & distribution_continuator ) : _evaluator(evaluator), @@ -99,12 +99,12 @@ public: \param pop_continuator Stopping criterion based on the population features */ edoEDA ( - eoPopEvalFunc < EOT > & evaluator, - eoSelect< EOT > & selector, + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, edoEstimator< D > & estimator, edoSampler< D > & sampler, - eoReplacement< EOT > & replacor, - eoContinue< EOT > & pop_continuator + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator ) : _evaluator(evaluator), _selector(selector), @@ -123,12 +123,12 @@ public: * \param pop the population of candidate solutions * \return void */ - void operator ()(eoPop< EOT > & pop) + void operator ()(eoPop< EOType > & pop) { assert(pop.size() > 0); - eoPop< EOT > current_pop; - eoPop< EOT > selected_pop; + eoPop< EOType > current_pop; + eoPop< EOType > selected_pop; // FIXME one must instanciate a first distrib here because there is no empty constructor, see if it is possible to instanciate Distributions without parameters D distrib = _estimator(pop); @@ -167,22 +167,22 @@ public: private: //! A full evaluation function. - eoPopEvalFunc < EOT > & _evaluator; + eoPopEvalFunc < EOType > & _evaluator; - //! A EOT selector - eoSelect < EOT > & _selector; + //! A EOType selector + eoSelect < EOType > & _selector; - //! A EOT estimator. It is going to estimate distribution parameters. + //! A EOType estimator. It is going to estimate distribution parameters. edoEstimator< D > & _estimator; //! A D sampler edoSampler< D > & _sampler; - //! A EOT replacor - eoReplacement < EOT > & _replacor; + //! A EOType replacor + eoReplacement < EOType > & _replacor; - //! A EOT population continuator - eoContinue < EOT > & _pop_continuator; + //! A EOType population continuator + eoContinue < EOType > & _pop_continuator; //! A D continuator that always return true edoDummyContinue _dummy_continue; diff --git a/edo/src/edoEDASA.h b/edo/src/edoEDASA.h index b2f0fe708..82880b3cb 100644 --- a/edo/src/edoEDASA.h +++ b/edo/src/edoEDASA.h @@ -46,13 +46,13 @@ class edoEDASA : public edoAlgo< D > { public: //! Alias for the type EOT - typedef typename D::EOType EOT; + typedef typename D::EOType EOType; //! Alias for the atom type - typedef typename EOT::AtomType AtomType; + typedef typename EOType::AtomType AtomType; //! Alias for the fitness - typedef typename EOT::Fitness Fitness; + typedef typename EOType::Fitness Fitness; public: @@ -73,18 +73,18 @@ public: \param initial_temperature The initial temperature. \param replacor Population replacor */ - edoEDASA (eoSelect< EOT > & selector, + edoEDASA (eoSelect< EOType > & selector, edoEstimator< D > & estimator, - eoSelectOne< EOT > & selectone, + eoSelectOne< EOType > & selectone, edoModifierMass< D > & modifier, edoSampler< D > & sampler, - eoContinue< EOT > & pop_continue, + eoContinue< EOType > & pop_continue, edoContinue< D > & distribution_continue, - eoEvalFunc < EOT > & evaluation, - moContinuator< moDummyNeighbor > & sa_continue, - moCoolingSchedule & cooling_schedule, + eoEvalFunc < EOType > & evaluation, + moContinuator< moDummyNeighbor > & sa_continue, + moCoolingSchedule & cooling_schedule, double initial_temperature, - eoReplacement< EOT > & replacor + eoReplacement< EOType > & replacor ) : _selector(selector), _estimator(estimator), @@ -108,15 +108,15 @@ public: \param pop A population to improve. \return TRUE. */ - void operator ()(eoPop< EOT > & pop) + void operator ()(eoPop< EOType > & pop) { assert(pop.size() > 0); double temperature = _initial_temperature; - eoPop< EOT > current_pop; + eoPop< EOType > current_pop; - eoPop< EOT > selected_pop; + eoPop< EOType > selected_pop; //------------------------------------------------------------- @@ -165,7 +165,7 @@ public: // Init of a variable contening a point with the bestest fitnesses //------------------------------------------------------------- - EOT current_solution = _selectone(selected_pop); + EOType current_solution = _selectone(selected_pop); //------------------------------------------------------------- @@ -200,7 +200,7 @@ public: do { - EOT candidate_solution = _sampler(distrib); + EOType candidate_solution = _sampler(distrib); _evaluation( candidate_solution ); // TODO: verifier le critere d'acceptation @@ -232,14 +232,14 @@ public: private: - //! A EOT selector - eoSelect < EOT > & _selector; + //! A EOType selector + eoSelect < EOType > & _selector; - //! A EOT estimator. It is going to estimate distribution parameters. + //! A EOType estimator. It is going to estimate distribution parameters. edoEstimator< D > & _estimator; //! SelectOne - eoSelectOne< EOT > & _selectone; + eoSelectOne< EOType > & _selectone; //! A D modifier edoModifierMass< D > & _modifier; @@ -247,26 +247,26 @@ private: //! A D sampler edoSampler< D > & _sampler; - //! A EOT population continuator - eoContinue < EOT > & _pop_continue; + //! A EOType population continuator + eoContinue < EOType > & _pop_continue; //! A D continuator edoContinue < D > & _distribution_continue; //! A full evaluation function. - eoEvalFunc < EOT > & _evaluation; + eoEvalFunc < EOType > & _evaluation; //! Stopping criterion before temperature update - moContinuator< moDummyNeighbor > & _sa_continue; + moContinuator< moDummyNeighbor > & _sa_continue; //! The cooling schedule - moCoolingSchedule & _cooling_schedule; + moCoolingSchedule & _cooling_schedule; //! Initial temperature double _initial_temperature; - //! A EOT replacor - eoReplacement < EOT > & _replacor; + //! A EOType replacor + eoReplacement < EOType > & _replacor; }; #endif // !_edoEDASA_h From 4b4e6d065c44ade55326e4e307130533e554329b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 12 Jul 2012 11:26:21 +0200 Subject: [PATCH 2007/2134] include adaptive operators ; deactivate EDASA --- edo/src/edo | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/edo/src/edo b/edo/src/edo index c03acd35d..d7506224d 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -29,18 +29,22 @@ Authors: #define _edo_ #include "edoAlgo.h" -#include "edoEDASA.h" +//#include "edoEDASA.h" #include "edoEDA.h" +#include "edoCMAES.h" #include "edoDistrib.h" #include "edoUniform.h" #include "edoNormalMono.h" #include "edoNormalMulti.h" +#include "edoNormalAdaptive.h" #include "edoEstimator.h" #include "edoEstimatorUniform.h" #include "edoEstimatorNormalMono.h" #include "edoEstimatorNormalMulti.h" +#include "edoEstimatorAdaptive.h" +#include "edoEstimatorNormalAdaptive.h" #include "edoModifier.h" #include "edoModifierDispersion.h" @@ -53,6 +57,7 @@ Authors: #include "edoSamplerUniform.h" #include "edoSamplerNormalMono.h" #include "edoSamplerNormalMulti.h" +#include "edoSamplerNormalAdaptive.h" #include "edoVectorBounds.h" From c3e4f13ffd1143690598277ac1794a58857a9377 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 12 Jul 2012 11:27:10 +0200 Subject: [PATCH 2008/2134] =?UTF-8?q?template<=20class=E2=80=A6=20to=20tem?= =?UTF-8?q?plate<=20typename=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- edo/src/edoSamplerNormalMulti.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index 6420f0408..1f9fe990d 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -47,7 +47,7 @@ Authors: #include #include -template< class EOT, typename EOD = edoNormalMulti< EOT > > +template< typename EOT, typename EOD = edoNormalMulti< EOT > > class edoSamplerNormalMulti : public edoSampler< EOD > { public: @@ -91,7 +91,7 @@ protected: #else #ifdef WITH_EIGEN -template< class EOT, typename EOD = edoNormalMulti< EOT > > +template< typename EOT, typename EOD = edoNormalMulti< EOT > > class edoSamplerNormalMulti : public edoSampler< EOD > { public: From 16f97144b3b7879323ebebd341bf926acc43d751 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 12 Jul 2012 11:27:41 +0200 Subject: [PATCH 2009/2134] adaptive operators that compiles (but still not work) --- edo/src/edoEstimatorNormalAdaptive.h | 237 +++++++++++++++++++++++++++ edo/src/edoNormalAdaptive.h | 34 +++- edo/src/edoSamplerNormalAdaptive.h | 6 +- 3 files changed, 271 insertions(+), 6 deletions(-) create mode 100644 edo/src/edoEstimatorNormalAdaptive.h diff --git a/edo/src/edoEstimatorNormalAdaptive.h b/edo/src/edoEstimatorNormalAdaptive.h new file mode 100644 index 000000000..0e5a7b028 --- /dev/null +++ b/edo/src/edoEstimatorNormalAdaptive.h @@ -0,0 +1,237 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + + +#ifndef _edoEstimatorNormalAdaptive_h +#define _edoEstimatorNormalAdaptive_h + +#ifdef WITH_EIGEN + +#include + +#include + +#include "edoNormalAdaptive.h" +#include "edoEstimatorAdaptive.h" + + +//! edoEstimatorNormalMulti< EOT > +template< typename EOT, typename EOD = edoNormalAdaptive > +class edoEstimatorNormalAdaptive : public edoEstimatorAdaptive< EOD > +{ +public: + typedef typename EOT::AtomType AtomType; + typedef typename EOD::Vector Vector; + typedef typename EOD::Matrix Matrix; + + edoEstimatorNormalAdaptive( EOD& distrib, unsigned int mu ) : + edoEstimatorAdaptive( distrib ), + _mu(mu), + _calls(0), + _eigeneval(0) + {} + +private: + Eigen::VectorXd edoCMAESweights( unsigned int pop_size ) + { + // compute recombination weights + Eigen::VectorXd weights( pop_size ); + double sum_w = 0; + for( unsigned int i = 0; i < _mu; ++i ) { + double w_i = log( _mu + 0.5 ) - log( i + 1 ); + weights(i) = w_i; + sum_w += w_i; + } + // normalization of weights + weights /= sum_w; + + return weights; + } + +public: + void resetCalls() + { + _calls = 0; + } + + // update the distribution reference this->distribution() + edoNormalAdaptive operator()( eoPop& pop ) + { + + /********************************************************************** + * INITIALIZATION + *********************************************************************/ + + unsigned int N = pop[0].size(); // FIXME expliciter la dimension du pb ? + unsigned int lambda = pop.size(); + + // number of calls to the operator == number of generations + _calls++; + // number of "evaluations" until now + unsigned int counteval = _calls * lambda; + + // Here, if we are in canonical CMA-ES, + // pop is supposed to be the mu ranked better solutions, + // as the rank mu selection is supposed to have occured. + Matrix arx( pop.size(), N ); + + // copy the pop (most probably a vector of vectors) in a Eigen3 matrix + for( unsigned int i = 0; i < lambda; ++i ) { + for( unsigned int d = 0; d < N; ++d ) { + arx(i,d) = pop[i][d]; + } // dimensions + } // individuals + + // muXone array for weighted recombination + Eigen::VectorXd weights = edoCMAESweights( N ); + + // FIXME exposer les constantes dans l'interface + + // variance-effectiveness of sum w_i x_i + double mueff = pow(weights.sum(), 2) / (weights.array().square()).sum(); + + // time constant for cumulation for C + double cc = (4+mueff/N) / (N+4 + 2*mueff/N); + + // t-const for cumulation for sigma control + double cs = (mueff+2) / (N+mueff+5); + + // learning rate for rank-one update of C + double c1 = 2 / (pow(N+1.3,2)+mueff); + + // and for rank-mu update + double cmu = 2 * (mueff-2+1/mueff) / ( pow(N+2,2)+mueff); + + // damping for sigma + double damps = 1 + 2*std::max(0.0, sqrt((mueff-1)/(N+1))-1) + cs; + + + // shortcut to the referenced distribution + EOD& d = this->distribution(); + + // C^-1/2 + Matrix invsqrtC = + d.coord_sys() * d.scaling().asDiagonal().inverse() + * d.coord_sys().transpose(); + + // expectation of ||N(0,I)|| == norm(randn(N,1)) + double chiN = sqrt(N)*(1-1/(4*N)+1/(21*pow(N,2))); + + + /********************************************************************** + * WEIGHTED MEAN + *********************************************************************/ + + // compute weighted mean into xmean + Vector xold = d.mean(); + d.mean( arx * weights ); + Vector xmean = d.mean(); + + + /********************************************************************** + * CUMULATION: UPDATE EVOLUTION PATHS + *********************************************************************/ + + // cumulation for sigma + d.path_sigma( + (1.0-cs)*d.path_sigma() + sqrt(cs*(2.0-cs)*mueff)*invsqrtC*(xmean-xold)/d.sigma() + ); + + // sign of h + double hsig; + if( d.path_sigma().norm()/sqrt(1.0-pow((1.0-cs),(2.0*counteval/lambda)))/chiN + < 1.4 + 2.0/(N+1.0) + ) { + hsig = 1.0; + } else { + hsig = 0.0; + } + + // cumulation for the covariance matrix + d.path_covar( + (1.0-cc)*d.path_covar() + hsig*sqrt(cc*(2.0-cc)*mueff)*(xmean-xold) / d.sigma() + ); + + Matrix artmp = (1.0/d.sigma()) * arx - xold.rowwise().replicate(_mu); + + + /********************************************************************** + * COVARIANCE MATRIX ADAPTATION + *********************************************************************/ + + d.covar( + (1-c1-cmu) * d.covar() // regard old matrix + + c1 * (d.path_covar()*d.path_covar().transpose() // plus rank one update + + (1-hsig) * cc*(2-cc) * d.covar()) // minor correction if hsig==0 + + cmu * artmp * weights.asDiagonal() * artmp.transpose() // plus rank mu update + ); + + // Adapt step size sigma + d.sigma( d.sigma() * exp((cs/damps)*(d.path_sigma().norm()/chiN - 1)) ); + + + + /********************************************************************** + * DECOMPOSITION OF THE COVARIANCE MATRIX + *********************************************************************/ + + // Decomposition of C into B*diag(D.^2)*B' (diagonalization) + if( counteval - _eigeneval > lambda/(c1+cmu)/N/10 ) { // to achieve O(N^2) + _eigeneval = counteval; + + // enforce symmetry of the covariance matrix + Matrix C = d.covar(); + // FIXME edoEstimatorNormalAdaptive.h:213:44: erreur: expected primary-expression before â€)’ token + // copy the upper part in the lower one + //C.triangularView() = C.adjoint(); + // Matrix CS = C.triangularView() + C.triangularView().transpose(); + d.covar( C ); + + Eigen::SelfAdjointEigenSolver eigensolver( d.covar() ); // FIXME use JacobiSVD? + d.coord_sys( eigensolver.eigenvectors() ); + Matrix D = eigensolver.eigenvalues().asDiagonal(); + + // from variance to standard deviations + D.cwiseSqrt(); + d.scaling( D ); + } + + return d; + } // operator() + +protected: + + unsigned int _mu; + unsigned int _calls; + unsigned int _eigeneval; + + + // EOD & distribution() inherited from edoEstimatorAdaptive +}; +#endif // WITH_EIGEN + +#endif // !_edoEstimatorNormalAdaptive_h diff --git a/edo/src/edoNormalAdaptive.h b/edo/src/edoNormalAdaptive.h index 499af91f5..9ceb6b9fc 100644 --- a/edo/src/edoNormalAdaptive.h +++ b/edo/src/edoNormalAdaptive.h @@ -39,6 +39,7 @@ template < typename EOT > class edoNormalAdaptive : public edoDistrib< EOT > { public: + //typedef EOT EOType; typedef typename EOT::AtomType AtomType; typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; @@ -55,13 +56,40 @@ public: assert( dim > 0); } + edoNormalAdaptive( unsigned int dim, + Vector mean, + Matrix C, + Matrix B, + Vector D, + double sigma, + Vector p_c, + Vector p_s + ) : + _mean( mean ), + _C( C ), + _B( B ), + _D( D ), + _sigma(sigma), + _p_c( p_c ), + _p_s( p_s ) + { + assert( dim > 0); + assert( _mean.innerSize() == dim ); + assert( _C.innerSize() == dim && _C.outerSize() == dim ); + assert( _B.innerSize() == dim && _B.outerSize() == dim ); + assert( _D.innerSize() == dim ); + assert( _sigma != 0.0 ); + assert( _p_c.innerSize() == dim ); + assert( _p_s.innerSize() == dim ); + } + unsigned int size() { return _mean.innerSize(); } Vector mean() const {return _mean;} - Matrix covar() const {return _covar;} + Matrix covar() const {return _C;} Matrix coord_sys() const {return _B;} Vector scaling() const {return _D;} double sigma() const {return _sigma;} @@ -73,8 +101,8 @@ public: void coord_sys( Matrix b ) { _B = b; } void scaling( Vector d ) { _D = d; } void sigma( double s ) { _sigma = s; } - void path_covar( Vector p ) { _path_covar = p; } - void path_sigma( Vector p ) { _path_sigma = p; } + void path_covar( Vector p ) { _p_c = p; } + void path_sigma( Vector p ) { _p_s = p; } private: Vector _mean; // diff --git a/edo/src/edoSamplerNormalAdaptive.h b/edo/src/edoSamplerNormalAdaptive.h index 193044f0b..edf531eff 100644 --- a/edo/src/edoSamplerNormalAdaptive.h +++ b/edo/src/edoSamplerNormalAdaptive.h @@ -69,9 +69,9 @@ public: assert(T.innerSize() == size); assert(T.outerSize() == 1); - //Vector t_sol = distrib.mean() + distrib.sigma() * distrib.coord_sys() * distrib.scaling() * T; - Vector sol = distrib.mean() + distrib.sigma() - * distrib.coord_sys().dot( distrib.scaling().dot( T ) ); + Vector sol = distrib.mean() + distrib.sigma() * distrib.coord_sys() * (distrib.scaling().dot(T) ); + /*Vector sol = distrib.mean() + distrib.sigma() + * distrib.coord_sys().dot( distrib.scaling().dot( T ) );*/ // copy in the EOT structure (more probably a vector) EOT solution( size ); From 60fff427fedb40afd6009a84441ce52ad9ad42a7 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 12 Jul 2012 13:56:54 +0200 Subject: [PATCH 2010/2134] Documentation of serialization, utils/eoTimer and eoPopEvalFunc. --- eo/src/apply.h | 21 --- eo/src/eoEasyEA.h | 70 ++++----- eo/src/eoPopEvalFunc.h | 81 ++++++++++- eo/src/serial/Array.cpp | 70 +++++---- eo/src/serial/Array.h | 267 +++++++++++++++++++---------------- eo/src/serial/Entity.h | 39 ++++- eo/src/serial/Object.cpp | 74 ++++++---- eo/src/serial/Object.h | 111 +++++++++------ eo/src/serial/Parser.cpp | 24 +++- eo/src/serial/Parser.h | 25 ++++ eo/src/serial/Serializable.h | 80 +++++++---- eo/src/serial/String.cpp | 21 +++ eo/src/serial/String.h | 140 ++++++++++-------- eo/src/serial/Utils.h | 25 +++- eo/src/serial/eoSerial.h | 21 +++ eo/src/utils/eoParallel.cpp | 4 +- eo/src/utils/eoParallel.h | 3 +- eo/src/utils/eoTimer.h | 198 ++++++++++++++++++++++---- 18 files changed, 856 insertions(+), 418 deletions(-) diff --git a/eo/src/apply.h b/eo/src/apply.h index b13c434e4..939e62bde 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -33,12 +33,6 @@ #include #include -# ifdef WITH_MPI -# include -# include -# include -# endif // WITH_MPI - /** Applies a unary function to a std::vector of things. @@ -85,21 +79,6 @@ void apply(eoUF& _proc, std::vector& _pop) #endif // !_OPENMP } -#ifdef WITH_MPI -template -void parallelApply( - std::vector& _pop, - eo::mpi::AssignmentAlgorithm& _algo, - int _masterRank, - eo::mpi::ParallelApplyStore & _store ) -{ - _store.data( _pop ); - _algo.reinit( _pop.size() ); - eo::mpi::ParallelApply job( _algo, _masterRank, _store ); - job.run(); -} -#endif - /** This is a variant of apply which is called in parallel thanks to OpenMP. diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 4d74932f7..4d9c7b6da 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -37,8 +37,6 @@ #include #include - - template class eoIslandsEasyEA ; template class eoDistEvalEasyEA ; @@ -106,7 +104,7 @@ template class eoEasyEA: public eoAlgo * @brief Ctor allowing to specify which pop eval function we're going to use. * * Ctor taking a breed and merge, an overload of ctor to define an offspring size, and - * the pop eval function used. This allows to precise if we would like to use the + * the pop eval function used. This allows to precise if we would like to use the * parallel evaluation, for instance. */ eoEasyEA( @@ -247,57 +245,43 @@ template class eoEasyEA: public eoAlgo virtual void operator()(eoPop& _pop) { - eo::log << "[EasyEA] Call to operator()" << std::endl; - if (isFirstCall) - { - size_t total_capacity = _pop.capacity() + offspring.capacity(); - _pop.reserve(total_capacity); - offspring.reserve(total_capacity); - isFirstCall = false; - } - - // TODO TODOB delete all log traces - std::cout << "[EasyEA] After is first call." << std::endl; - - eoPop empty_pop; - std::cout << "[EasyEA] After empty_pop." << std::endl; - - popEval(empty_pop, _pop); // A first eval of pop. - std::cout << "[EasyEA] After pop_eval." << std::endl; - - do + if (isFirstCall) { - try + size_t total_capacity = _pop.capacity() + offspring.capacity(); + _pop.reserve(total_capacity); + offspring.reserve(total_capacity); + isFirstCall = false; + } + + eoPop empty_pop; + + do + { + try { - std::cout << "[EasyEA] Beginning try." << std::endl; - unsigned pSize = _pop.size(); - std::cout << "[EasyEA] psize determinated." << std::endl; - offspring.clear(); // new offspring - std::cout << "[EasyEA] offspring cleared." << std::endl; + unsigned pSize = _pop.size(); - breed(_pop, offspring); + offspring.clear(); // new offspring - std::cout << "[EasyEA] After breed, evaluating pop." << std::endl; - popEval(_pop, offspring); // eval of parents + offspring if necessary + breed(_pop, offspring); - std::cout << "[EasyEA] After evaluation, replacing pop." << std::endl; - replace(_pop, offspring); // after replace, the new pop. is in _pop - std::cout << "[EasyEA] After replacing, continuator." << std::endl; + popEval(_pop, offspring); // eval of parents + offspring if necessary - if (pSize > _pop.size()) - throw std::runtime_error("Population shrinking!"); - else if (pSize < _pop.size()) - throw std::runtime_error("Population growing!"); + replace(_pop, offspring); // after replace, the new pop. is in _pop + if (pSize > _pop.size()) + throw std::runtime_error("Population shrinking!"); + else if (pSize < _pop.size()) + throw std::runtime_error("Population growing!"); } - catch (std::exception& e) + catch (std::exception& e) { - std::string s = e.what(); - s.append( " in eoEasyEA"); - throw std::runtime_error( s ); + std::string s = e.what(); + s.append( " in eoEasyEA"); + throw std::runtime_error( s ); } } - while ( continuator( _pop ) ); + while ( continuator( _pop ) ); } protected : diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index c811e3a57..2cc868076 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -30,6 +30,13 @@ #include #include +# ifdef WITH_MPI +#include +#include +#include +#include +# endif // WITH_MPI + /** eoPopEvalFunc: This abstract class is for GLOBAL evaluators * of a population after variation. * It takes 2 populations (typically the parents and the offspring) @@ -78,12 +85,43 @@ private: }; #ifdef WITH_MPI -// TODO TODOB commenter +/** + * @brief Evaluator of a population of EOT which uses parallelization to evaluate individuals. + * + * This class implements an instance of eoPopEvalFunc that applies a private eoEvalFunc to + * all offspring, but in a parallel way. The original process becomes the central host from a network ("master"), and + * other machines disponible in the MPI network ("slaves") are used as evaluators. Population to evaluate is splitted in + * little packets of individuals, which are sent to the evaluators, that process the effective call to eval. Once all + * the individuals have been evaluated, they are returned to the master. The whole process is entirely invisible to the + * eyes of the user, who just has to launch a certain number of processes in MPI so as to have a result. + * + * The eoEvalFunc is no more directly given, but it is stored in the eo::mpi::ParallelApplyStore, which can be + * instanciated if no one is given at construction. + * + * The use of this class requires the user to have called the eo::mpi::Node::init function, at the beginning of its + * program. + * + * @ingroup Evaluation Parallel + * + * @author Benjamin Bouvier + */ template class eoParallelPopLoopEval : public eoPopEvalFunc { public: - /** Ctor: set value of embedded eoEvalFunc */ + /** + * @brief Constructor which creates the job store for the user. + * + * This constructor is the simplest to use, as it creates the store used by the parallel job, for the user. + * The user just precises the scheduling algorithm, the rank of the master and then gives its eval function and + * the size of a packet (how many individuals should be in a single message to evaluator). + * + * @param _assignAlgo The scheduling algorithm used to give orders to evaluators. + * @param _masterRank The MPI rank of the master. + * @param _eval The evaluation functor used to evaluate each individual in the population. + * @param _packetSize The number of individuals to send in one message to evaluator, and which are evaluated at + * a time. + */ eoParallelPopLoopEval( // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, @@ -94,12 +132,21 @@ class eoParallelPopLoopEval : public eoPopEvalFunc ) : assignAlgo( _assignAlgo ), masterRank( _masterRank ), - needToDeleteStore( true ) + needToDeleteStore( true ) // we used new, we'll have to use delete (RAII) { - // FIXME memory leak because of new. store = new eo::mpi::ParallelApplyStore( _eval, _masterRank, _packetSize ); } + /** + * @brief Constructor which allows the user to customize its job store. + * + * This constructor allows the user to customize the store, for instance by adding wrappers and other + * functionnalities, before using it for the parallelized evaluation. + * + * @param _assignAlgo The scheduling algorithm used to give orders to evaluators. + * @param _masterRank The MPI rank of the master. + * @param _store Pointer to a parallel eval store given by the user. + */ eoParallelPopLoopEval( // Job parameters eo::mpi::AssignmentAlgorithm& _assignAlgo, @@ -109,37 +156,57 @@ class eoParallelPopLoopEval : public eoPopEvalFunc assignAlgo( _assignAlgo ), masterRank( _masterRank ), store( _store ), - needToDeleteStore( false ) + needToDeleteStore( false ) // we haven't used new for creating store, we don't care if we have to delete it (RAII). { // empty } + /** + * @brief Default destructor. Sends a message to all evaluators indicating that the global loop (eoEasyEA, for + * instance) is over. + */ ~eoParallelPopLoopEval() { + // Only the master has to send the termination message if( eo::mpi::Node::comm().rank() == masterRank ) { eo::mpi::EmptyJob job( assignAlgo, masterRank ); job.run(); } + // RAII if( needToDeleteStore ) { delete store; } } - /** Do the job: simple loop over the offspring */ + /** + * @brief Parallel implementation of the operator(). + * + * @param _parents Population of parents (ignored). + * @param _offspring Population of children, which will be evaluated. + */ void operator()( eoPop & _parents, eoPop & _offspring ) { (void)_parents; - parallelApply(_offspring, assignAlgo, masterRank, *store); + // Reinits the store and the scheduling algorithm + store->data( _offspring ); + assignAlgo.reinit( _offspring.size() ); + // Effectively launches the job. + eo::mpi::ParallelApply job( assignAlgo, masterRank, *store ); + job.run(); } private: + // Scheduling algorithm eo::mpi::AssignmentAlgorithm & assignAlgo; + // Master MPI rank int masterRank; + // Store eo::mpi::ParallelApplyStore* store; + // Do we have to delete the store by ourselves ? bool needToDeleteStore; }; #endif diff --git a/eo/src/serial/Array.cpp b/eo/src/serial/Array.cpp index f70b00e83..180aad16b 100644 --- a/eo/src/serial/Array.cpp +++ b/eo/src/serial/Array.cpp @@ -1,38 +1,58 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # include "Array.h" namespace eoserial { - -std::ostream& Array::print( std::ostream& out ) const -{ - out << "["; - bool first = true; - for (ArrayChildren::const_iterator it = begin(), - end = this->end(); - it != end; - ++it) + std::ostream& Array::print( std::ostream& out ) const { - if ( first ) + out << "["; + bool first = true; + for (ArrayChildren::const_iterator it = begin(), + end = this->end(); + it != end; + ++it) { - first = false; - } else { - out << ", "; + if ( first ) + { + first = false; + } else { + out << ", "; + } + (*it)->print( out ); } - (*it)->print( out ); + out << "]\n"; + return out; } - out << "]\n"; - return out; -} -Array::~Array() -{ - for (ArrayChildren::iterator it = begin(), - end = this->end(); - it != end; - ++it) + Array::~Array() { - delete *it; + for (ArrayChildren::iterator it = begin(), + end = this->end(); + it != end; + ++it) + { + delete *it; + } } -} } // namespace eoserial diff --git a/eo/src/serial/Array.h b/eo/src/serial/Array.h index 69231980c..d453add99 100644 --- a/eo/src/serial/Array.h +++ b/eo/src/serial/Array.h @@ -1,148 +1,169 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_ARRAY_H__ # define __EOSERIAL_ARRAY_H__ # include -# include # include "Entity.h" # include "Serializable.h" - # include "Object.h" -# include "String.h" namespace eoserial { -// Forward declaration for below declarations. -class Array; - -/* - * Declarations of functions present in Utils.h - * These are put here to avoid instead of including the file Utils.h, which would - * cause a circular inclusion. - */ -template< class T > -void unpack( const Array & array, unsigned int index, T & value ); - -void unpackObject( const Array & array, unsigned int index, Persistent & value ); - -template< class Container, template class UnpackAlgorithm > -void unpackArray( const Array & array, unsigned int index, Container & container ); - -/** - * @brief Represents a JSON array. - * - * Wrapper for an array, so as to be used as a JSON object. - */ -class Array : public eoserial::Entity, public std::vector< eoserial::Entity* > -{ -protected: - typedef std::vector< eoserial::Entity* > ArrayChildren; - -public: - /** - * @brief Adds the serializable object as a JSON object. - * @param obj Object which implemnets JsonSerializable. - */ - void push_back( const eoserial::Printable* obj ) - { - ArrayChildren::push_back( obj->pack() ); - } - - /** - * @brief Proxy for vector::push_back. - */ - void push_back( eoserial::Entity* json ) - { - ArrayChildren::push_back( json ); - } - - /** - * @brief Prints the JSON array into the given stream. - * @param out The stream - */ - virtual std::ostream& print( std::ostream& out ) const; - - /** - * @brief Dtor - */ - ~Array(); + // Forward declaration for below declarations. + class Array; /* - * The following parts allows the user to automatically deserialize an eoserial::Array into a - * standard container, by giving the algorithm which will be used to deserialize contained entities. + * Declarations of functions present in Utils.h + * These are put here to avoid instead of including the file Utils.h, which would + * cause a circular inclusion. */ + template< class T > + void unpack( const Array & array, unsigned int index, T & value ); + + void unpackObject( const Array & array, unsigned int index, Persistent & value ); + + template< class Container, template class UnpackAlgorithm > + void unpackArray( const Array & array, unsigned int index, Container & container ); + /** - * @brief Functor which determines how to retrieve the real value contained in a eoserial::Entity at - * a given place. + * @brief Represents a JSON array. * - * It will be applied for each contained variable in the array. + * Wrapper for an array, so as to be used as a JSON object. + * + * @ingroup Serialization */ - template - struct BaseAlgorithm + class Array : public eoserial::Entity, public std::vector< eoserial::Entity* > { - /** - * @brief Main operator. - * - * @param array The eoserial::Array from which we're reading. - * @param i The index of the contained value. - * @param container The standard (STL) container in which we'll push back the read value. - */ - virtual void operator()( const eoserial::Array& array, unsigned int i, Container & container ) const = 0; + protected: + typedef std::vector< eoserial::Entity* > ArrayChildren; + + public: + /** + * @brief Adds the serializable object as a JSON object. + * @param obj Object which implemnets JsonSerializable. + */ + void push_back( const eoserial::Printable* obj ) + { + ArrayChildren::push_back( obj->pack() ); + } + + /** + * @brief Proxy for vector::push_back. + */ + void push_back( eoserial::Entity* json ) + { + ArrayChildren::push_back( json ); + } + + /** + * @brief Prints the JSON array into the given stream. + * @param out The stream + */ + virtual std::ostream& print( std::ostream& out ) const; + + /** + * @brief Dtor + */ + ~Array(); + + /* + * The following parts allows the user to automatically deserialize an eoserial::Array into a + * standard container, by giving the algorithm which will be used to deserialize contained entities. + */ + + /** + * @brief Functor which determines how to retrieve the real value contained in a eoserial::Entity at + * a given place. + * + * It will be applied for each contained variable in the array. + */ + template + struct BaseAlgorithm + { + /** + * @brief Main operator. + * + * @param array The eoserial::Array from which we're reading. + * @param i The index of the contained value. + * @param container The standard (STL) container in which we'll push back the read value. + */ + virtual void operator()( const eoserial::Array& array, unsigned int i, Container & container ) const = 0; + }; + + /** + * @brief BaseAlgorithm for retrieving primitive variables. + * + * This one should be used to retrieve primitive (and types which implement operator>>) variables, for instance + * int, double, std::string, etc... + */ + template + struct UnpackAlgorithm : public BaseAlgorithm + { + void operator()( const eoserial::Array& array, unsigned int i, C & container ) const + { + typename C::value_type t; + unpack( array, i, t ); + container.push_back( t ); + } + }; + + /** + * @brief BaseAlgorithm for retrieving eoserial::Persistent objects. + * + * This one should be used to retrieve objects which implement eoserial::Persistent. + */ + template + struct UnpackObjectAlgorithm : public BaseAlgorithm + { + void operator()( const eoserial::Array& array, unsigned int i, C & container ) const + { + typename C::value_type t; + unpackObject( array, i, t ); + container.push_back( t ); + } + }; + + /** + * @brief General algorithm for array deserialization. + * + * Applies the BaseAlgorithm to each contained variable in the eoserial::Array. + */ + template class UnpackAlgorithm> + inline void deserialize( Container & array ) + { + UnpackAlgorithm< Container > algo; + for( unsigned int i = 0, size = this->size(); + i < size; + ++i) + { + algo( *this, i, array ); + } + } }; - /** - * @brief BaseAlgorithm for retrieving primitive variables. - * - * This one should be used to retrieve primitive (and types which implement operator>>) variables, for instance - * int, double, std::string, etc... - */ - template - struct UnpackAlgorithm : public BaseAlgorithm - { - void operator()( const eoserial::Array& array, unsigned int i, C & container ) const - { - typename C::value_type t; - unpack( array, i, t ); - container.push_back( t ); - } - }; - - /** - * @brief BaseAlgorithm for retrieving eoserial::Persistent objects. - * - * This one should be used to retrieve objects which implement eoserial::Persistent. - */ - template - struct UnpackObjectAlgorithm : public BaseAlgorithm - { - void operator()( const eoserial::Array& array, unsigned int i, C & container ) const - { - typename C::value_type t; - unpackObject( array, i, t ); - container.push_back( t ); - } - }; - - /** - * @brief General algorithm for array deserialization. - * - * Applies the BaseAlgorithm to each contained variable in the eoserial::Array. - */ - template class UnpackAlgorithm> - inline void deserialize( Container & array ) - { - UnpackAlgorithm< Container > algo; - for( unsigned int i = 0, size = this->size(); - i < size; - ++i) - { - algo( *this, i, array ); - } - } -}; - } // namespace eoserial # endif // __EOSERIAL_ARRAY_H__ diff --git a/eo/src/serial/Entity.h b/eo/src/serial/Entity.h index df10002df..6fec34858 100644 --- a/eo/src/serial/Entity.h +++ b/eo/src/serial/Entity.h @@ -1,9 +1,42 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_ENTITY_H__ # define __EOSERIAL_ENTITY_H__ -# include -# include +# include // ostream +/** + * @brief Contains all the necessary entities to serialize eo objects into JSON objects. + * + * Allows serialization from user objects into JSON objects, if they implement the interface + * eoserial::Serializable or eoserial::Persistent. The following user objects can be serialized: + * - primitive types (int, std::string, ...), in particular every type that can be written into a + * std::stringstream. + * - objects which implement eoserial::Serializable. + * - array of serializable things (primitive or serializable objects). + * + * @ingroup Utilities + * @defgroup Serialization Serialization helpers + */ namespace eoserial { @@ -12,6 +45,8 @@ namespace eoserial * * This class represents a JSON entity, which can be JSON objects, * strings or arrays. It is the base class for the JSON hierarchy. + * + * @ingroup Serialization */ class Entity { diff --git a/eo/src/serial/Object.cpp b/eo/src/serial/Object.cpp index 3e557a126..dd859052e 100644 --- a/eo/src/serial/Object.cpp +++ b/eo/src/serial/Object.cpp @@ -1,40 +1,60 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # include "Object.h" using namespace eoserial; namespace eoserial { - -std::ostream& Object::print( std::ostream& out ) const -{ - out << '{'; - bool first = true; - for(JsonValues::const_iterator it = begin(), end = this->end(); - it != end; - ++it) + std::ostream& Object::print( std::ostream& out ) const { - if ( first ) + out << '{'; + bool first = true; + for(JsonValues::const_iterator it = begin(), end = this->end(); + it != end; + ++it) { - first = false; - } else { - out << ", "; - } + if ( first ) + { + first = false; + } else { + out << ", "; + } - out << '"' << it->first << "\":"; // key - it->second->print( out ); // value + out << '"' << it->first << "\":"; // key + it->second->print( out ); // value + } + out << "}\n"; + return out; + } + + Object::~Object() + { + for(JsonValues::iterator it = begin(), end = this->end(); + it != end; + ++it) + { + delete it->second; } - out << "}\n"; - return out; -} - -Object::~Object() -{ - for(JsonValues::iterator it = begin(), end = this->end(); - it != end; - ++it) - { - delete it->second; } -} } // namespace eoserial diff --git a/eo/src/serial/Object.h b/eo/src/serial/Object.h index 367692527..20fbdbf7e 100644 --- a/eo/src/serial/Object.h +++ b/eo/src/serial/Object.h @@ -1,66 +1,87 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_OBJECT_H__ # define __EOSERIAL_OBJECT_H__ # include # include -# include # include "Entity.h" # include "Serializable.h" namespace eoserial { - -/** - * @brief JSON Object - * - * This class represents a JSON object, which is basically a dictionnary - * of keys (strings) and values (JSON entities). - */ -class Object : public eoserial::Entity, public std::map< std::string, eoserial::Entity* > -{ -public: - typedef std::map JsonValues; - /** - * @brief Adds a pair into the JSON object. - * @param key The key associated with the eoserial object - * @param eoserial The JSON object as created with framework. + * @brief JSON Object + * + * This class represents a JSON object, which is basically a dictionnary + * of keys (strings) and values (JSON entities). + * + * @ingroup Serialization */ - void add( const std::string& key, eoserial::Entity* json ) + class Object : public eoserial::Entity, public std::map< std::string, eoserial::Entity* > { - (*this)[ key ] = json; - } + public: + typedef std::map JsonValues; - /** - * @brief Adds a pair into the JSON object. - * @param key The key associated with the eoserial object - * @param obj A JSON-serializable object - */ - void add( const std::string& key, const eoserial::Printable* obj ) - { - (*this)[ key ] = obj->pack(); - } + /** + * @brief Adds a pair into the JSON object. + * @param key The key associated with the eoserial object + * @param eoserial The JSON object as created with framework. + */ + void add( const std::string& key, eoserial::Entity* json ) + { + (*this)[ key ] = json; + } - /** - * @brief Deserializes a Serializable class instance from this JSON object. - * @param obj The object we want to rebuild. - */ - void deserialize( eoserial::Persistent & obj ) - { - obj.unpack( this ); - } + /** + * @brief Adds a pair into the JSON object. + * @param key The key associated with the eoserial object + * @param obj A JSON-serializable object + */ + void add( const std::string& key, const eoserial::Printable* obj ) + { + (*this)[ key ] = obj->pack(); + } - /** - * @brief Dtor - */ - ~Object(); + /** + * @brief Deserializes a Serializable class instance from this JSON object. + * @param obj The object we want to rebuild. + */ + void deserialize( eoserial::Persistent & obj ) + { + obj.unpack( this ); + } - /** - * @brief Prints the content of a JSON object into a stream. - */ - virtual std::ostream& print( std::ostream& out ) const; -}; + /** + * @brief Dtor + */ + ~Object(); + + /** + * @brief Prints the content of a JSON object into a stream. + */ + virtual std::ostream& print( std::ostream& out ) const; + }; } // namespace eoserial # endif // __EOSERIAL_OBJECT_H__ diff --git a/eo/src/serial/Parser.cpp b/eo/src/serial/Parser.cpp index c7822d292..258174c86 100644 --- a/eo/src/serial/Parser.cpp +++ b/eo/src/serial/Parser.cpp @@ -1,7 +1,25 @@ -# include +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # include -# include -# include # include "Parser.h" diff --git a/eo/src/serial/Parser.h b/eo/src/serial/Parser.h index f0a94ee21..5bcdc5979 100644 --- a/eo/src/serial/Parser.h +++ b/eo/src/serial/Parser.h @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_PARSER_H__ # define __EOSERIAL_PARSER_H__ @@ -6,6 +27,8 @@ # include "Object.h" /** + * @file Parser.h + * * This file contains a tiny JSON parser used in DAE. This parser just handles * a subset of JSON grammar, with the following restrictions : * - all strings must be surrounded by double quotes. @@ -26,6 +49,8 @@ namespace eoserial * This parser does just retrieve values and does NOT check the structure of * the input. This implies that if the input is not correct, the result is undefined * and can result to a failure on execution. + * + * @ingroup Serialization */ class Parser { diff --git a/eo/src/serial/Serializable.h b/eo/src/serial/Serializable.h index 482a918a8..715e9c973 100644 --- a/eo/src/serial/Serializable.h +++ b/eo/src/serial/Serializable.h @@ -1,43 +1,65 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_SERIALIZABLE_H__ # define __EOSERIAL_SERIALIZABLE_H__ -# include - namespace eoserial { + class Object; // to avoid recursive inclusion with JsonObject -class Object; // to avoid recursive inclusion with JsonObject - -/** - * @brief Interface showing that object can be written to a eoserial type - * (currently JSON). - */ -class Printable -{ -public: /** - * @brief Serializes the object to JSON format. - * @return A JSON object created with new. + * @brief Interface showing that object can be written to a eoserial type + * (currently JSON). + * + * @ingroup Serialization */ - virtual eoserial::Object* pack() const = 0; -}; + class Printable + { + public: + /** + * @brief Serializes the object to JSON format. + * @return A JSON object created with new. + */ + virtual eoserial::Object* pack() const = 0; + }; -/** - * @brief Interface showing that object can be eoserialized (written and read - * from an input). - * - * Note : Persistent objects should have a default non-arguments constructor. - */ -class Persistent : public Printable -{ - public: /** - * @brief Loads class fields from a JSON object. - * @param json A JSON object. Programmer doesn't have to delete it, it - * is automatically done. + * @brief Interface showing that object can be eoserialized (written and read + * from an input). + * + * Note : Persistent objects should have a default non-arguments constructor. + * + * @ingroup Serialization */ - virtual void unpack(const eoserial::Object* json) = 0; -}; + class Persistent : public Printable + { + public: + /** + * @brief Loads class fields from a JSON object. + * @param json A JSON object. Programmer doesn't have to delete it, it + * is automatically done. + */ + virtual void unpack(const eoserial::Object* json) = 0; + }; } // namespace eoserial diff --git a/eo/src/serial/String.cpp b/eo/src/serial/String.cpp index deba05a06..c50882786 100644 --- a/eo/src/serial/String.cpp +++ b/eo/src/serial/String.cpp @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # include "String.h" namespace eoserial diff --git a/eo/src/serial/String.h b/eo/src/serial/String.h index 6d81937f3..526cab365 100644 --- a/eo/src/serial/String.h +++ b/eo/src/serial/String.h @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_STRING_H__ # define __EOSERIAL_STRING_H__ @@ -9,72 +30,73 @@ namespace eoserial { + /** + * @brief JSON String + * + * Wrapper for string, so as to be used as a JSON object. + * + * @ingroup Serialization + */ + class String : public eoserial::Entity, public std::string + { + public: -/** - * @brief JSON String - * - * Wrapper for string, so as to be used as a JSON object. - */ -class String : public eoserial::Entity, public std::string -{ - public: + /** + * @brief Default ctor. + * @param str The string we want to wrap. + */ + String( const std::string& str ) : std::string( str ) {} - /** - * @brief Default ctor. - * @param str The string we want to wrap. - */ - String( const std::string& str ) : std::string( str ) {} + /** + * @brief Ctor used only when parsing. + */ + String( ) {} - /** - * @brief Ctor used only on parsing. - */ - String( ) {} + /** + * @brief Prints out the string. + */ + virtual std::ostream& print( std::ostream& out ) const; - /** - * @brief Prints out the string. - */ - virtual std::ostream& print( std::ostream& out ) const; + /** + * @brief Deserializes the current String into a given primitive type value. + * @param value The value in which we're writing. + */ + template + inline void deserialize( T & value ); - /** - * @brief Deserializes the current String into a given primitive type value. - * @param value The value in which we're writing. - */ - template - inline void deserialize( T & value ); + protected: + // Copy and reaffectation are forbidden + explicit String( const String& _ ); + String& operator=( const String& _ ); + }; - protected: - // Copy and reaffectation are forbidden - explicit String( const String& _ ); - String& operator=( const String& _ ); -}; + /** + * @brief Casts a eoserial::String into a primitive value, or in a type which at + * least overload operator>>. + * + * @param value A reference to the variable we're writing into. + * + * It's not necessary to specify the variable type, which can be infered by compiler when + * invoking. + */ + template + inline void String::deserialize( T & value ) + { + std::stringstream ss; + ss.precision(std::numeric_limits::digits10 + 1); + ss << *this; + ss >> value; + } -/** - * @brief Casts a eoserial::String into a primitive value, or in a type which at - * least overload operator>>. - * - * @param value A reference to the variable we're writing into. - * - * It's not necessary to specify the variable type, which can be infered by compiler when - * invoking. - */ -template -inline void String::deserialize( T & value ) -{ - std::stringstream ss; - ss.precision(std::numeric_limits::digits10 + 1); - ss << *this; - ss >> value; -} - -/** - * @brief Specialization for strings, which don't need to be converted through - * a stringstream. - */ -template<> -inline void String::deserialize( std::string & value ) -{ - value = *this; -} + /** + * @brief Specialization for strings, which don't need to be converted through + * a stringstream. + */ + template<> + inline void String::deserialize( std::string & value ) + { + value = *this; + } } // namespace eoserial diff --git a/eo/src/serial/Utils.h b/eo/src/serial/Utils.h index f40c08d92..33172a747 100644 --- a/eo/src/serial/Utils.h +++ b/eo/src/serial/Utils.h @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_UTILS_H__ # define __EOSERIAL_UTILS_H__ @@ -7,7 +28,7 @@ namespace eoserial { - /***************************** + /* *************************** * DESERIALIZATION FUNCTIONS * ***************************** These functions are useful for casting eoserial::objects into simple, primitive @@ -54,7 +75,7 @@ namespace eoserial static_cast( array[ index ] )->deserialize< Container, UnpackAlgorithm >( container ); } - /******************************* + /* ***************************** *** SERIALIZATION FUNCTIONS *** ******************************* These functions are useful for casting classic objects and diff --git a/eo/src/serial/eoSerial.h b/eo/src/serial/eoSerial.h index a10f6c014..55a116f0c 100644 --- a/eo/src/serial/eoSerial.h +++ b/eo/src/serial/eoSerial.h @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EOSERIAL_HEADERS__ # define __EOSERIAL_HEADERS__ diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index 418651984..fc57910c8 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -21,7 +21,7 @@ Contact: http://eodev.sourceforge.net Authors: -Caner Candan + Caner Candan */ @@ -37,7 +37,7 @@ eoParallel::eoParallel() : _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ), _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ), _doMeasure( false, "parallelize-do-measure", "Do some measures during execution", '\0' ), - _packetSize( 1U, "parallelize-packet-size", "Number of elements which should be sent at a time during a parallel evaluation based on message passing.", '\0'), + _packetSize( 1U, "parallelize-packet-size", "Number of elements which should be sent in a single message during a parallel evaluation based on message passing.", '\0'), _t_start(0) { } diff --git a/eo/src/utils/eoParallel.h b/eo/src/utils/eoParallel.h index 3aae8e430..b812fecc9 100644 --- a/eo/src/utils/eoParallel.h +++ b/eo/src/utils/eoParallel.h @@ -20,8 +20,7 @@ Contact: http://eodev.sourceforge.net Authors: -Caner Candan - + Caner Candan */ /** @defgroup Parallel Parallel diff --git a/eo/src/utils/eoTimer.h b/eo/src/utils/eoTimer.h index 8aa09c51b..edecce62a 100644 --- a/eo/src/utils/eoTimer.h +++ b/eo/src/utils/eoTimer.h @@ -1,38 +1,84 @@ -# ifndef __TIMER_H__ -# define __TIMER_H__ +/* +(c) Thales group, 2012 -# include -# include + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. -# include -# include + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. -# include "utils/eoParallel.h" + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ +# ifndef __EO_TIMER_H__ +# define __EO_TIMER_H__ + +# include // time() +# include // rusage() + +# include // std::vector +# include // std::map + +# include "utils/eoParallel.h" // eo::parallel # ifdef WITH_MPI +// For serialization purposes # include # include # include # endif -// TODO TODOB commenter +/** + * @brief Timer allowing to measure time between a start point and a stop point. + * + * This timer allows the user to measure user time, system time and wallclock time + * between two points. Basically, user time is time spent in developer code ; system + * time is time spent during the IO wait and system calls ; wallclock is the difference + * of time we could observe by measuring time with a watch. + * + * @ingroup Utilities + */ class eoTimer { public: + /** + * @brief Default ctor. Begins all the timers. + */ eoTimer() - { - restart(); - } - - void restart() { uuremainder = 0; usremainder = 0; + restart(); + } + + /** + * @brief Restarts all the timers and launch the measure. + */ + void restart() + { wc_start = time(NULL); getrusage( RUSAGE_SELF, &_start ); } + /** + * @brief Measures the user time spent since the last restart(). + * + * If the number of elapsed seconds is zero, the spent milliseconds are + * added to a remainder. If the remainder exceeds one second, it is + * added to the number of elapsed seconds. + * + * @return Number of seconds elapsed in user space. + */ long int usertime() { struct rusage _now; @@ -44,12 +90,21 @@ class eoTimer if( uuremainder > 1000000) { ++result; - uuremainder = 0; + uuremainder -= 1000000; } } return result; } + /** + * @brief Measures the system time spent since the last restart(). + * + * If the number of elapsed seconds is zero, the spent milliseconds are + * added to a remainder. If the remainder exceeds one second, it is + * added to the number of elapsed seconds. + * + * @return Number of seconds elapsed in system (kernel) space. + */ long int systime() { struct rusage _now; @@ -61,28 +116,90 @@ class eoTimer if( usremainder > 1000000) { ++result; - usremainder = 0; + usremainder -= 1000000; } } return result; } + /** + * @brief Measures the wallclock time spent since the last restart(). + * + * @return Number of seconds elapsed, as a double. + */ double wallclock() { return std::difftime( std::time(NULL) , wc_start ); } protected: + // Structure used to measure user and system time. struct rusage _start; + // Remainder (in milliseconds) for user time. long int uuremainder; + // Remainder (in milliseconds) for system time. long int usremainder; + // Structure used to measure wallclock time. time_t wc_start; }; +/** + * @brief Registers a group of statistics, each statistic corresponding to user, system and wallclock times distribution. + * + * This class helps the user to measure time in different parts of an application. A name is associated to a statistic, + * on each call to start() and stop() for this name, a new number is added to the statistic, for each of the three + * measured times. + * + * The statistics are only registered if the option "--parallelized-do-measure" is set to true, which can be checked + * thanks to global object eo::parallel. + * + * This shows how the eoTimerStat can be used : + * @code + * eoTimerStat timerStat; + * timerStat.start("first_point"); + * for( int i = 0; i < 1000; ++i ) + * { + * timerStat.start("single_computation"); + * single_computation( i ); + * timerStat.stop("single_computation"); + * } + * // After this loop, timerStat contains a statistic of key "single_computation" which contains 1000 measures for + * // each type of time. + * timerStat.stop("first_point"); + * // After this line, timerStat contains another statistic of key "first_point" which counted the duration of the + * // whole loop. + * + * int singleComputationUsertimeMean = 0; + * for( int i = 0; i < 1000; ++i ) + * { + * singleComputationUsertimeMean += timerStat.stats()["single_computation"].utime[i]; + * } + * std::cout << "Mean of user time spent in single computation: " << singleComputationUsertimeMean / 1000. << std::endl; + * @endcode + * + * When using MPI, these statistics can be readily be serialized, so as to be sent over a network, for instance. + * + * Implementation details: this eoTimerStat is in fact a map of strings (key) / Stat (value). Stat is an internal + * structure directly defined in the class, which contains three vectors modeling the distributions of the different + * types of elapsed times. Another map of strings (key) / eoTimer (value) allows to effectively retrieve the different + * times. The struct Stat will be exposed to client, which will use its members ; however, + * the client doesn't have anything to do directly with the timer, that's why the two maps are splitted. + * + * @ingroup Utilities + */ class eoTimerStat { public: + /** + * @brief Statistic related to a key (name). + * + * This structure is the value in the map saved in the eoTimerStat. It contains the statistic bound to a key, + * which are the user time distribution, the system time distribution and the wallclock time distribution, as + * std::vector s. + * + * It can readily be serialized with boost when compiling with mpi. + */ struct Stat { std::vector utime; @@ -93,25 +210,27 @@ class eoTimerStat friend class boost::serialization::access; /** - * Serializes the statistique in a boost archive (useful for boost::mpi) + * Serializes the single statistic in a boost archive (useful for boost::mpi). + * Just serializes the 3 vectors. */ template - void serialize( Archive & ar, const unsigned int version ) - { - ar & utime & stime & wtime; - (void) version; // avoid compilation warning - } + void serialize( Archive & ar, const unsigned int version ) + { + ar & utime & stime & wtime; + (void) version; // avoid compilation warning + } # endif }; #ifdef WITH_MPI - // Gives access to boost serialization - friend class boost::serialization::access; + // Gives access to boost serialization + friend class boost::serialization::access; - /** - * Serializes the map of statistics in a boost archive (useful for boost::mpi) - */ - template + /** + * Serializes the timerStat object in a boost archive (useful for boost::mpi). + * Just serializes the map. + */ + template void serialize( Archive & ar, const unsigned int version ) { ar & _stats; @@ -119,6 +238,14 @@ class eoTimerStat } # endif + /** + * @brief Starts a new measure for the given key. + * + * This is only performed if parallel.doMeasure() is true, which is equivalent to the fact that + * parser found "--parallel-do-measure=1" in command line args. + * + * @param key The key of the statistic. + */ void start( const std::string & key ) { if( eo::parallel.doMeasure() ) @@ -127,6 +254,16 @@ class eoTimerStat } } + /** + * @brief Stops the mesure for the given key and saves the elapsed times. + * + * Must follow a call of start with the same key. + * + * This is only performed if parallel.doMeasure() is true, which is equivalent to the fact that + * parser found "--parallel-do-measure=1" in command line args. + * + * @param key The key of the statistic. + */ void stop( const std::string& key ) { if( eo::parallel.doMeasure() ) @@ -139,13 +276,18 @@ class eoTimerStat } } - std::map< std::string, Stat > stats() + /** + * @brief Getter for the statistics map. + */ + std::map< std::string, Stat >& stats() { return _stats; } protected: + // Statistics map: links a key (string) to a statistic. std::map< std::string, Stat > _stats; + // Timers map: links a key to its timer. std::map< std::string, eoTimer > _timers; }; From d711369f12b65969cfb8ad2478996c849922bc4a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 12 Jul 2012 14:17:51 +0200 Subject: [PATCH 2011/2134] Correctly handling remainders when using eoTimer. --- eo/src/utils/eoTimer.h | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/eo/src/utils/eoTimer.h b/eo/src/utils/eoTimer.h index edecce62a..211313778 100644 --- a/eo/src/utils/eoTimer.h +++ b/eo/src/utils/eoTimer.h @@ -83,15 +83,22 @@ class eoTimer { struct rusage _now; getrusage( RUSAGE_SELF, &_now ); + long int result = _now.ru_utime.tv_sec - _start.ru_utime.tv_sec; - if( _now.ru_utime.tv_sec == _start.ru_utime.tv_sec ) + long int remainder = _now.ru_utime.tv_usec - _start.ru_utime.tv_usec; + if( remainder >= 0 ) { - uuremainder += _now.ru_utime.tv_usec - _start.ru_utime.tv_usec; - if( uuremainder > 1000000) - { - ++result; - uuremainder -= 1000000; - } + uuremainder += remainder; + } else + { + uuremainder += ( 1000000 - remainder ); + --result; + } + + if( uuremainder >= 1000000 ) + { + uuremainder -= 1000000; + ++result; } return result; } @@ -109,15 +116,22 @@ class eoTimer { struct rusage _now; getrusage( RUSAGE_SELF, &_now ); + long int result = _now.ru_stime.tv_sec - _start.ru_stime.tv_sec; - if( _now.ru_stime.tv_sec == _start.ru_stime.tv_sec ) + long int remainder = _now.ru_stime.tv_usec - _start.ru_stime.tv_usec; + if( remainder >= 0 ) { - usremainder += _now.ru_stime.tv_usec - _start.ru_stime.tv_usec; - if( usremainder > 1000000) - { - ++result; - usremainder -= 1000000; - } + usremainder += remainder; + } else + { + usremainder += ( 1000000 - remainder ); + --result; + } + + if( usremainder >= 1000000 ) + { + usremainder -= 1000000; + ++result; } return result; } From f963a15fbe23ad8e3cb4c279ac0f557ddbe70e83 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 12 Jul 2012 19:15:07 +0200 Subject: [PATCH 2012/2134] Fixing assignment algorithm, who gave too many assignments by worker. Now, when using static assignment, the optimal size of packet (so as each worker has to process only one packet of data) is sent. --- eo/src/eoPopEvalFunc.h | 10 +++++++++- eo/src/mpi/eoMpiAssignmentAlgorithm.h | 3 +++ eo/src/mpi/eoParallelApply.h | 14 ++++---------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index 2cc868076..b96e8cac9 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -35,6 +35,9 @@ #include #include #include +#include + +#include // ceil # endif // WITH_MPI /** eoPopEvalFunc: This abstract class is for GLOBAL evaluators @@ -192,7 +195,12 @@ class eoParallelPopLoopEval : public eoPopEvalFunc (void)_parents; // Reinits the store and the scheduling algorithm store->data( _offspring ); - assignAlgo.reinit( _offspring.size() ); + // For static scheduling, it's mandatory to reinit attributions + int nbWorkers = assignAlgo.availableWorkers(); + assignAlgo.reinit( nbWorkers ); + if( ! eo::parallel.isDynamic() ) { + store->data()->packetSize = ceil( static_cast( _offspring.size() ) / nbWorkers ); + } // Effectively launches the job. eo::mpi::ParallelApply job( assignAlgo, masterRank, *store ); job.run(); diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h index 0630a6f7a..85177ea08 100644 --- a/eo/src/mpi/eoMpiAssignmentAlgorithm.h +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -137,7 +137,10 @@ namespace eo { unsigned int nbWorkers = workers.size(); freeWorkers = nbWorkers; + + attributions.clear(); attributions.reserve( nbWorkers ); + busy.clear(); busy.resize( nbWorkers, false ); // Let be the euclidean division of runs by nbWorkers : diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 9598b952f..d0435cead 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -37,8 +37,6 @@ namespace eo { size = _pop->size(); } - - tempArray = new EOT[ _packetSize ]; } void init( std::vector& _pop ) @@ -49,11 +47,6 @@ namespace eo assignedTasks.clear(); } - ~ParallelApplyData() - { - delete [] tempArray; - } - std::vector& data() { return *_data; @@ -65,7 +58,7 @@ namespace eo int size; std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; int packetSize; - EOT* tempArray; + std::vector tempArray; int masterRank; bmpi::communicator& comm; @@ -140,14 +133,15 @@ namespace eo int recvSize; d->comm.recv( d->masterRank, 1, recvSize ); - d->comm.recv( d->masterRank, 1, d->tempArray, recvSize ); + d->tempArray.resize( recvSize ); + d->comm.recv( d->masterRank, 1, & d->tempArray[0] , recvSize ); timerStat.start("worker_processes"); for( int i = 0; i < recvSize ; ++i ) { d->func( d->tempArray[ i ] ); } timerStat.stop("worker_processes"); - d->comm.send( d->masterRank, 1, d->tempArray, recvSize ); + d->comm.send( d->masterRank, 1, & d->tempArray[0], recvSize ); } }; From e7a48b8afb7b617c1f074e14492e98abca1c0745 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 12 Jul 2012 19:15:52 +0200 Subject: [PATCH 2013/2134] Using dynamic scheduling by default --- eo/src/utils/eoParallel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/utils/eoParallel.cpp b/eo/src/utils/eoParallel.cpp index fc57910c8..b47d3f82a 100644 --- a/eo/src/utils/eoParallel.cpp +++ b/eo/src/utils/eoParallel.cpp @@ -32,7 +32,7 @@ Authors: eoParallel::eoParallel() : _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), - _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), + _isDynamic( true, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ), _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ), _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ), From 1eac497c4d4233e992d4dfb603e9845d5b7f8310 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 13 Jul 2012 11:54:21 +0200 Subject: [PATCH 2014/2134] Documentating eoMpi.h --- eo/src/mpi/eoMpi.h | 390 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 371 insertions(+), 19 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index fc419b13d..d4e0349e3 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -1,10 +1,28 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EO_MPI_H__ # define __EO_MPI_H__ -# include -# include -# include -# include +# include // std::vector # include # include @@ -14,37 +32,196 @@ # include "eoMpiNode.h" # include "eoMpiAssignmentAlgorithm.h" -// TODO TODOB comment! - namespace eo { + /** + * @ingroup Parallel + * @defgroup MPI Message Passing Interface parallelization + */ + + /** + * @brief MPI parallelization helpers for EO. + * + * This namespace contains parallelization functions which help to parallelize computations in EO. It is based on a + * generic algorithm, which is then customized with functors, corresponding to the algorithm main steps. These + * computations are centralized, i.e there is one central host whose role is to handle the steps of the algorithm ; + * we call it the "master". The other hosts just have to perform a "dummy" computation, which may be any kind of + * processing ; we call them, the "slaves", or less pejoratively, the "workers". Workers can communicate to each + * other, but they receive their orders from the Master and send him back some results. A worker can also be the + * master of a different parallelization process, as soon as it is a part of its work. Machines of the network, also + * called hosts, are identified by an unique number: their rank. At any time during the execution of the program, + * all the hosts know the total number of hosts. + * + * A parallelized Job is a set of tasks which are independant (i.e can be executed in random order without + * modifiying the result) and take a data input and compute a data output to be sent to the Master. The data can be + * of any type, however they have to be serialized to be sent over a network. It is sufficient that they can be + * serialized through boost. + * + * @todo For serialization purposes, don't depend upon boost. It would be easy to use only eoserial and send strings + * via mpi. + * + * The main steps of the algorithm are the following: + * - For the master: + * - Have we done with the treatment we are doing ? + * - If this is the case, we can quit. + * - Otherwise, send an input data to some available worker. + * - If there's no available worker, wait for a worker to be free. + * - When receiving the response, handle it (eventually compute something on the output data, store it...). + * - Go back to the first step. + * - For the worker, it is even easier: + * - Wait for an order. + * - If there's nothing to do, just quit. + * - Otherwise, eventually retrieve data and do the work. + * - Go back to the first step. + * + * There is of course some network adjustements to do and precisions to give there, but the main ideas are present. As the + * job is fully centralized, this is the master who tells the workers when to quit and when to work. + * + * The idea behind these MPI helpers is to be the most generic possible. If we look back at the steps of the + * algorithm, we found that the steps can be splitted into 2 parts: the first consists in the steps of any + * parallelization algorithm and the other consists in the specific parts of the algorithm. Ideally, the user should + * just have to implement the specific parts of the algorithm. We identified these parts to be: + * - For the master: + * - What does mean to have terminated ? There are only two alternatives, in our binary world: either it is + * terminated, or it is not. Hence we only need a function returning a boolean to know if we're done with the + * computation : we'll call it IsFinished. + * - What do we have to do when we send a task ? We don't have any a priori on the form of the sent data, or + * the number of sent data. Moreover, as the tasks are all independant, we don't care of who will do the + * computation, as soon as it's done. Knowing the rank of the worker will be sufficient to send him data. We + * have identified another function, taking a single argument which is the rank of the worker: we'll call it + * SendTask. + * - What do we have to do when we receive a response from a worker ? One more time, we don't know which form + * or structure can have the receive data, only the user can know. Also we let the user the charge to retrieve + * the data ; he just has to know from who the master will retrieve the data. Here is another function, taking + * a rank (the sender's one) as a function argument : this will be HandleResponse. + * - For the worker: + * - What is the processing ? It can have any nature. We just need to be sure that a data is sent back to the + * master, but it seems difficult to check that: it will be the role of the user to assert that data is sent by + * the worker at the end of an execution. We've got identified our last function: ProcessTask. + * + * In term of implementation, it would be annoying to have only abstract classes with these 4 methods to implement. It + * would mean that if you want to alter just one of these 4 functions, you have to implement a new sub class, with a + * new constructor which could have the same signature. Besides, this fashion doesn't allow you to add dynamic + * functionalities, using the design pattern Decorator for instance, without implement a class for each type of + * decoration you want to add. For these reasons, we decided to transform function into functors ; the user can then + * wrap the existing, basic comportments into more sophisticated computations, whenever he wants, and without the + * notion of order. We retrieve here the power of extension given by the design pattern Decorator. + * + * Our 4 functors could have a big amount of data in common (see eoParallelApply to have an idea). + * So as to make it easy for the user to implement these 4 functors, we consider that these functors + * have to share a common data structure. This data structure is referenced (as a pointer) in the 4 functors, so the + * user doesn't need to pass a lot of parameters to each functor constructor. + * + * There are two kinds of jobs: + * - The job which are launched a fixed and well known amount of times, i.e both master and workers know how many + * times they will be launched. They are "one shot jobs". + * - The job which are launched an unknown amount of times, for instance embedded in a while loop for which we don't + * know the amount of repetitions (typically, eoEasyEA loop is a good example, as we don't know the continuator + * condition). They are called "multi job". + * As the master tells the workers to quit, we have to differentiate these two kinds of jobs. When the job is of the + * kind "multi job", the workers would have to perform a while(true) loop so as to receive the orders ; but even if + * the master tells them to quit, they would begin another job and wait for another order, while the master would + * have quit: this would cause a deadlock and workers processes would be blocked, waiting for an order. + */ namespace mpi { + /** + * @brief A timer which allows user to generate statistics about computation times. + */ extern eoTimerStat timerStat; + /** + * @brief Tags used in MPI messages for framework communication + * + * These tags are used for framework communication and fits "channels", so as to differentiate when we're + * sending an order to a worker (Commands) or data (Messages). They are not reserved by the framework and can be + * used by the user, but he is not bound to. + */ namespace Channel { const int Commands = 0; const int Messages = 1; } + /** + * @brief Simple orders used by the framework. + * + * These orders are sent by the master to the workers, to indicate to them if they should receive another task + * to do (Continue), if an one shot job is done (Finish) or if a multi job is done (Kill). + */ namespace Message { const int Continue = 0; - const int Finish = 1; // TODO commentaire : diffĂ©rence entre finir une tâche et arrĂŞter le worker Ă  expliciter. + const int Finish = 1; const int Kill = 2; } + /** + * @brief If the job only has one master, the user can use this constant, so as not to worry with integer ids. + */ const int DEFAULT_MASTER = 0; + /** + * @brief Base class for the 4 algorithm functors. + * + * This class can embed a data (JobData) and a wrapper, so as to make all the 4 functors wrappable. + * We can add a wrapper at initialization or at any time when executing the program. + * + * According to RAII, the boolean needDelete helps to know if we have to use the operator delete on the wrapper + * or not. Hence, if any functor is wrapped, user has just to put this boolean to true, to indicate to wrapper + * that it should call delete. This allows to mix wrapper initialized in the heap (with new) or in the stack. + * + * @param JobData a Data type, which can have any form. It can a struct, a single int, anything. + * + * @param Wrapped the type of the functor, which will be stored as a pointer under the name _wrapped. + * This allows to wrap directly the functor in functors of the same type + * here, instead of dealing with SharedDataFunction* that we would have to cast all the time. + * Doing also allows to handle the wrapped functor as the functor we're writing, when coding the wrappers, + * instead of doing some static_cast. For instance, if there are 2 functors subclasses, fA and fB, fA + * implementing doFa() and fB implementing doFb(), we could have the following code: + * @code + * struct fA_wrapper + * { + * // some code + * void doFa() + * { + * _wrapped->doFa(); + * std::cout << "I'm a fA wrapper!" << std::endl; + * // if we didn't have the second template parameter, but a SharedDataFunction, we would have to do this: + * static_cast(_wrapped)->doFa(); + * // do other things (it's a wrapper) + * } + * }; + * + * struct fB_wrapper + * { + * // some code + * void doFb() + * { + * _wrapped->doFb(); // and not: static_cast(_wrapped)->doFb(); + * } + * }; + * @endcode + * This makes the code easier to write for the user. + */ template< typename JobData, typename Wrapped > struct SharedDataFunction { + /** + * @brief Default constructor. + * + * The user is not bound to give a wrapped functor. + */ SharedDataFunction( Wrapped * w = 0 ) : _wrapped( w ), _needDelete( false ) { // empty } + /** + * @brief Destructor. + * + * Calls delete on the wrapped function, only if necessary. + */ virtual ~SharedDataFunction() { if( _wrapped && _wrapped->needDelete() ) @@ -53,11 +230,21 @@ namespace eo } } + /** + * @brief Setter for the wrapped function. + * + * It doesn't do anything on the current wrapped function, like deleting it. + */ void wrapped( Wrapped * w ) { _wrapped = w; } + /** + * @brief Setter for the data present in the functor. + * + * Calls the setter on the functor and on the wrapped functors, in a Composite pattern fashion. + */ void data( JobData* _d ) { d = _d; @@ -67,15 +254,29 @@ namespace eo } } + /** + * @brief Returns true if we need to use operator delete on this wrapper, false otherwise. + **/ bool needDelete() { return _needDelete; } void needDelete( bool b ) { _needDelete = b; } protected: JobData* d; - Wrapped* _wrapped; + Wrapped* _wrapped; // Pointer and not a reference so as to be set at any time and to avoid affectation bool _needDelete; }; + /** + * @brief Functor (master side) used to send a task to the worker. + * + * The user doesn't have to know which worker will receive a task, so we just indicate to master the rank of the + * worker. The data used for computation have to be explicitly sent by the master to the worker, with indicated + * rank. Once this functor has been called, the worker is considered busy until it sends a return message to the + * master. + * + * This is a functor implementing void operator()(int), and also a shared data function, containing wrapper on its + * own type. + */ template< typename JobData > struct SendTaskFunction : public eoUF, public SharedDataFunction< JobData, SendTaskFunction > { @@ -86,9 +287,19 @@ namespace eo // empty } - virtual ~SendTaskFunction() {} + virtual ~SendTaskFunction() {} // for inherited classes }; + /** + * @brief Functor (master side) used to indicate what to do when receiving a response. + * + * The master calls this function as soon as it receives some data, in some channel. Thanks to MPI, we retrieve + * the rank of the data's sender. This functor is then called with this rank. There is no memoization of a link + * between sent data and rank, so the user has to implement it, if he needs it. + * + * This is a functor implementing void operator()(int), and also a shared data function, containing wrapper on + * its own type. + */ template< typename JobData > struct HandleResponseFunction : public eoUF, public SharedDataFunction< JobData, HandleResponseFunction > { @@ -99,9 +310,21 @@ namespace eo // empty } - virtual ~HandleResponseFunction() {} + virtual ~HandleResponseFunction() {} // for inherited classes }; + /** + * @brief Functor (worker side) implementing the processing to do. + * + * This is where the real computation happen. + * Whenever the master sends the command "Continue" to workers, which indicates the worker will receive a task, + * the worker calls this functor. The user has to explicitly retrieve the data, handle it and transmit it, + * processed, back to the master. If the worker does not send any data back to the master, the latter will + * consider the worker isn't done and a deadlock could occur. + * + * This is a functor implementing void operator()(), and also a shared data function, containing wrapper on its + * own type. + */ template< typename JobData > struct ProcessTaskFunction : public eoF, public SharedDataFunction< JobData, ProcessTaskFunction > { @@ -112,9 +335,19 @@ namespace eo // empty } - virtual ~ProcessTaskFunction() {} + virtual ~ProcessTaskFunction() {} // for inherited classes }; + /** + * @brief Functor (master side) indicating whether the job is done or not. + * + * The master loops on this functor to know when to stop. When this functor returns true, the master will wait + * for the last responses and properly stops the job. Whenever this functor returns false, the master will send + * tasks, until this functor returns true. + * + * This is a functor implementing bool operator()(), and also a shared function, containing wrapper on its own + * type. + */ template< typename JobData > struct IsFinishedFunction : public eoF, public SharedDataFunction< JobData, IsFinishedFunction > { @@ -125,12 +358,31 @@ namespace eo // empty } - virtual ~IsFinishedFunction() {} + virtual ~IsFinishedFunction() {} // for inherited classes }; + /** + * @brief Contains all the required data and the functors to launch a job. + * + * Splitting the functors and data from the job in itself allows to use the same functors and data for multiples + * instances of the same job. You define your store once and can use it a lot of times during your program. If + * the store was included in the job, you'd have to give again all the functors and all the datas to each + * invokation of the job. + * + * Job store contains the 4 functors (pointers, so as to be able to wrap them ; references couldn't have + * permitted that) described above and the JobData used by all these functors. It contains + * also helpers to easily wrap the functors, getters and setters on all of them. + * + * The user has to implement data(), which is the getter for retrieving JobData. We don't have any idea of who + * owns the data, moreover it is impossible to initialize it in this generic JobStore, as we don't know its + * form. As a matter of fact, the user has to define this in the JobStore subclasses. + */ template< typename JobData > struct JobStore { + /** + * @brief Default ctor with the 4 functors. + */ JobStore( SendTaskFunction* stf, HandleResponseFunction* hrf, @@ -142,11 +394,22 @@ namespace eo // empty } + /** + * @brief Empty ctor, useful for not forcing users to call the other constructor. + * + * When using this constructor, the user have to care about the 4 functors pointers, otherwise null pointer + * segfaults have to be expected. + */ JobStore() { // empty } + /** + * @brief Default destructor. + * + * JobStore is the highest layer which calls needDelete on its functors. + */ ~JobStore() { if( _stf->needDelete() ) delete _stf; @@ -155,16 +418,21 @@ namespace eo if( _iff->needDelete() ) delete _iff; } + // Getters SendTaskFunction & sendTask() { return *_stf; } HandleResponseFunction & handleResponse() { return *_hrf; } ProcessTaskFunction & processTask() { return *_ptf; } IsFinishedFunction & isFinished() { return *_iff; } + // Setters void sendTask( SendTaskFunction* stf ) { _stf = stf; } void handleResponse( HandleResponseFunction* hrf ) { _hrf = hrf; } void processTask( ProcessTaskFunction* ptf ) { _ptf = ptf; } void isFinished( IsFinishedFunction* iff ) { _iff = iff; } + /** + * @brief Helpers for wrapping send task functor. + */ void wrapSendTask( SendTaskFunction* stf ) { if( stf ) @@ -174,6 +442,9 @@ namespace eo } } + /** + * @brief Helpers for wrapping handle response functor. + */ void wrapHandleResponse( HandleResponseFunction* hrf ) { if( hrf ) @@ -183,6 +454,9 @@ namespace eo } } + /** + * @brief Helpers for wrapping process task functor. + */ void wrapProcessTask( ProcessTaskFunction* ptf ) { if( ptf ) @@ -192,6 +466,9 @@ namespace eo } } + /** + * @brief Helpers for wrapping is finished functor. + */ void wrapIsFinished( IsFinishedFunction* iff ) { if( iff ) @@ -201,22 +478,48 @@ namespace eo } } - // TODO commenter : laissĂ© Ă  la couche d'en dessous car impossible d'initialiser une donnĂ©e membre d'une classe mère depuis une classe fille. virtual JobData* data() = 0; protected: - // TODO commenter : Utiliser des pointeurs pour Ă©viter d'Ă©craser les fonctions wrappĂ©es SendTaskFunction< JobData >* _stf; HandleResponseFunction< JobData >* _hrf; ProcessTaskFunction< JobData >* _ptf; IsFinishedFunction< JobData >* _iff; }; + /** + * @brief Class implementing the centralized job algorithm. + * + * This class handles all the job algorithm. With its store and its assignment (scheduling) algorithm, it + * executes the general algorithm described above, adding some networking, so as to make the global process + * work. It initializes all the functors with the data, then launches the main loop, indicating to workers when + * they will have to work and when they will finish, by sending them a termination message (integer that can be + * customized). As the algorithm is centralized, it is also mandatory to indicate what is the MPI rank of the + * master process, hence the workers will know from who they should receive their commands. + * + * Any of the 3 master functors can launch exception, it will be catched and rethrown as a std::runtime_exception + * to the higher layers. + */ template< class JobData > class Job { public: + /** + * @brief Main constructor for Job. + * + * @param _algo The used assignment (scheduling) algorithm. It has to be initialized, with its maximum + * possible number of workers (some workers referenced in this algorithm shouldn't be busy). See + * AssignmentAlgorithm for more details. + * + * @param _masterRank The MPI rank of the master. + * @param _workerStopCondition Number of the message which will cause the workers to terminate. It could + * be one of the constants defined in eo::mpi::Commands, or any other integer. The user has to be sure + * that a message containing this integer will be sent to each worker on the Commands channel, otherwise + * deadlock will happen. Master sends Finish messages at the end of a simple job, but as a job can + * happen multiples times (multi job), workers don't have to really finish on these messages but on + * another message. This is here where you can configurate it. See also OneShotJob and MultiJob. + */ Job( AssignmentAlgorithm& _algo, int _masterRank, int _workerStopCondition, @@ -242,6 +545,16 @@ namespace eo protected: + /** + * @brief Finally block of the main algorithm + * + * Herb Sutter's trick for having a finally block, in a try/catch section: invoke a class at the + * beginning of the try, its destructor will be called in every cases. + * + * This implements the end of the master algorithm: + * - sends to all available workers that they are free, + * - waits for last responses, handles them and sends termination messages to last workers. + */ struct FinallyBlock { FinallyBlock( @@ -301,6 +614,15 @@ namespace eo bmpi::communicator & comm; }; + /** + * @brief Master part of the job. + * + * Launches the parallelized job algorithm : while there is something to do (! IsFinished ), get a + * worker who will be the assignee ; if no worker is available, wait for a response, handle it and reask + * for an assignee. Then send the command and the task. + * Once there is no more to do (IsFinished), indicate to all available workers that they're free, wait + * for all the responses and send termination messages (see also FinallyBlock). + */ void master( ) { int totalWorkers = assignmentAlgo.availableWorkers(); @@ -346,6 +668,12 @@ namespace eo } } + /** + * @brief Worker part of the algorithm. + * + * The algorithm is more much simpler: wait for an order; if it's termination message, leave. Otherwise, + * prepare to work. + */ void worker( ) { int order; @@ -383,11 +711,18 @@ namespace eo public: + /** + * @brief Launches the job algorithm, according to the role of the host (roles are deduced from the + * master rank indicated in the constructor). + */ void run( ) { ( _isMaster ) ? master( ) : worker( ); } + /** + * @brief Returns true if the current host is the master, false otherwise. + */ bool isMaster( ) { return _isMaster; @@ -397,7 +732,7 @@ namespace eo AssignmentAlgorithm& assignmentAlgo; int masterRank; - const int workerStopCondition; // TODO commentaire: message signifiant l'arrĂŞt pour un worker + const int workerStopCondition; bmpi::communicator& comm; SendTaskFunction & sendTask; @@ -406,13 +741,20 @@ namespace eo IsFinishedFunction & isFinished; bool _isMaster; - }; + /** + * @brief Job that will be launched only once. + * + * As explained in eo::mpi documentation, jobs can happen either a well known amount of times or an unknown + * amount of times. This class implements the general case when the job is launched a well known amount of + * times. The job will be terminated on both sides (master and worker) once the master would have said it. + * + * It uses the message Message::Finish as the termination message. + */ template< class JobData > class OneShotJob : public Job< JobData > { - // TODO commentaire : ce job s'arrĂŞte sur message terminate public: OneShotJob( AssignmentAlgorithm& algo, int masterRank, @@ -423,11 +765,22 @@ namespace eo } }; + /** + * @brief Job that will be launched an unknown amount of times, in worker side. + * + * As explained in eo::mpi documentation, jobs can happen either a well known amount of times or an unknown + * amount of times. This class implements the general case when the job is launched an unknown amount of times, for + * instance in a while loop. The master will run many jobs (or the same job many times), but the workers will + * launch it only once. + * + * It uses the message Message::Kill as the termination message. This message can be launched with an EmptyJob, + * launched only by the master. If no Message::Kill is sent on the Channels::Commands, the worker will wait + * forever, which will cause a deadlock. + */ template< class JobData > class MultiJob : public Job< JobData > { public: - // TODO commentaire : ce job s'arrĂŞte sur message kill MultiJob ( AssignmentAlgorithm& algo, int masterRank, JobStore & store ) @@ -438,6 +791,5 @@ namespace eo }; } } - # endif // __EO_MPI_H__ From 5e76ba30b076b805bcde5f03c941478d2e5b88a1 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 13 Jul 2012 14:31:29 +0200 Subject: [PATCH 2015/2134] mDocumentation of eo::mpi classes. --- eo/src/mpi/eoMpi.cpp | 1 - eo/src/mpi/eoMpi.h | 5 + eo/src/mpi/eoMpiAssignmentAlgorithm.h | 172 +++++++++++++++++++++++++- eo/src/mpi/eoMpiNode.h | 40 ++++++ eo/src/mpi/eoParallelApply.h | 149 ++++++++++++++++++++-- eo/src/mpi/eoTerminateJob.h | 56 ++++++++- 6 files changed, 409 insertions(+), 14 deletions(-) diff --git a/eo/src/mpi/eoMpi.cpp b/eo/src/mpi/eoMpi.cpp index 9ffc84bda..ab7543284 100644 --- a/eo/src/mpi/eoMpi.cpp +++ b/eo/src/mpi/eoMpi.cpp @@ -1,6 +1,5 @@ # include "eoMpi.h" -// MpiNode* MpiNodeStore::singleton; namespace eo { namespace mpi diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index d4e0349e3..230399040 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -37,6 +37,7 @@ namespace eo /** * @ingroup Parallel * @defgroup MPI Message Passing Interface parallelization + * @{ */ /** @@ -790,6 +791,10 @@ namespace eo } }; } + + /** + * @} + */ } # endif // __EO_MPI_H__ diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h index 85177ea08..d42ec723d 100644 --- a/eo/src/mpi/eoMpiAssignmentAlgorithm.h +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -1,28 +1,118 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __MPI_ASSIGNMENT_ALGORITHM_H__ # define __MPI_ASSIGNMENT_ALGORITHM_H__ -# include +# include // std::vector # include "eoMpiNode.h" namespace eo { namespace mpi { + /** + * @brief Constant indicating to use all the resting available workers, in assignment algorithms constructor + * using an interval. + */ const int REST_OF_THE_WORLD = -1; + /** + * @brief Contains informations on the available workers and allows to find assignees for jobs. + * + * Available workers are workers who aren't processing anything. When they've received an order, workers switch + * from the state "available" to the state "busy", and the master has to wait for their response for considering + * them available again. + * + * @ingroup Parallel + */ struct AssignmentAlgorithm { + /** + * @brief Gets the rank of an available worker, so as to send it a task. + * + * @return The MPI rank of an available worker, or -1 if there is no available worker. + */ virtual int get( ) = 0; + + /** + * @brief Gets the number of total available workers. + * + * Before the first call, it is equal to the total number of present workers, as specified in the + * specific assignment algorithm constructor. It allows the Job class to know when all the responses have + * been received, by comparing this number to the total number of workers. + * + * @return Integer indicating how many workers are available. + */ virtual int availableWorkers( ) = 0; + + /** + * @brief Reinject the worker of indicated rank in the available state. + * + * @param wrkRank The MPI rank of the worker who has finished its job. + */ virtual void confirm( int wrkRank ) = 0; + + /** + * @brief Indicates who are the workers which do nothing. + * + * At the end of the algorithm, the master has to warn all the workers that it's done. All the workers mean, + * the workers which are currently processing data, and the other ones who could be waiting : the idles. + * This function indicates to the master which worker aren't doing anything. + * + * @param A std::vector containing all the MPI ranks of the idles workers. + */ virtual std::vector idles( ) = 0; + + /** + * @brief Reinitializes the assignment algorithm with the right number of runs. + * + * In fact, this is only useful for static assignment algorithm, which has to be reinitialized every time + * it's used, in the case of a Multi Job. It's the user's responsability to call this function. + * + * @todo Not really clean. Find a better way to do it. + */ virtual void reinit( int runs ) = 0; }; + /** + * @brief Assignment (scheduling) algorithm which handles workers in a queue. + * + * With this assignment algorithm, workers are put in a queue and may be called an unlimited number of times. + * Whenever a worker returns, it is added to the queue, and it becomes available for the next call to get(). + * The available workers are all located in the queue at any time, so the number of available workers is + * directly equal to the size of the queue. + * + * This kind of assignment is adapted for tasks whose execution time is stochastic or unknown, but without any + * warranty to be faster than other assignments. + * + * @ingroup Parallel + */ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm { public: + /** + * @brief Uses all the hosts whose rank is higher to 1, inclusive, as workers. + */ DynamicAssignmentAlgorithm( ) { for(int i = 1; i < Node::comm().size(); ++i) @@ -31,16 +121,33 @@ namespace eo } } + /** + * @brief Uses the unique host with given rank as a worker. + * + * @param unique MPI rank of the unique worker. + */ DynamicAssignmentAlgorithm( int unique ) { availableWrk.push_back( unique ); } + /** + * @brief Uses the workers whose ranks are present in the argument as workers. + * + * @param workers std::vector containing MPI ranks of workers. + */ DynamicAssignmentAlgorithm( const std::vector & workers ) { availableWrk = workers; } + /** + * @brief Uses a range of ranks as workers. + * + * @param first The first worker to be included (inclusive) + * @param last The last worker to be included (inclusive). If last == eo::mpi::REST_OF_THE_WORLD, all + * hosts whose rank is higher than first are taken. + */ DynamicAssignmentAlgorithm( int first, int last ) { if( last == REST_OF_THE_WORLD ) @@ -90,14 +197,43 @@ namespace eo std::vector< int > availableWrk; }; + /** + * @brief Assignment algorithm which gives to each worker a precise number of tasks to do, in a round robin + * fashion. + * + * This scheduling algorithm attributes, at initialization or when calling reinit(), a fixed amount of runs to + * distribute to the workers. The amount of runs is then equally distributed between all workers ; if total + * number of runs is not a direct multiple of workers number, then remainding unaffected runs are distributed to + * workers from the first to the last, in a round-robin fashion. + * + * This scheduling should be used when the amount of runs can be computed or is fixed and when we guess that the + * duration of processing task will be the same for each run. There is no warranty that this algorithm is more + * or less efficient that another one. When having a doubt, use DynamicAssignmentAlgorithm. + * + * @ingroup Parallel + */ struct StaticAssignmentAlgorithm : public AssignmentAlgorithm { public: + /** + * @brief Uses a given precise set of workers. + * + * @param workers std::vector of MPI ranks of workers which will be used. + * @param runs Fixed amount of runs, strictly positive. + */ StaticAssignmentAlgorithm( std::vector& workers, int runs ) { init( workers, runs ); } + /** + * @brief Uses a range of workers. + * + * @param first The first MPI rank of worker to use + * @param last The last MPI rank of worker to use. If it's equal to REST_OF_THE_WORLD, then all the + * workers from the first one are taken as workers. + * @param runs Fixed amount of runs, strictly positive. + */ StaticAssignmentAlgorithm( int first, int last, int runs ) { std::vector workers; @@ -114,6 +250,12 @@ namespace eo init( workers, runs ); } + /** + * @brief Uses all the hosts whose rank is higher than 1 (inclusive) as workers. + * + * @param runs Fixed amount of runs, strictly positive. If it's not set, you'll have to call reinit() + * later. + */ StaticAssignmentAlgorithm( int runs = 0 ) { std::vector workers; @@ -125,6 +267,12 @@ namespace eo init( workers, runs ); } + /** + * @brief Uses an unique host as worker. + * + * @param unique The MPI rank of the host which will be the worker. + * @param runs Fixed amount of runs, strictly positive. + */ StaticAssignmentAlgorithm( int unique, int runs ) { std::vector workers; @@ -133,15 +281,31 @@ namespace eo } private: + /** + * @brief Initializes the static scheduling. + * + * Gives to each worker an equal attribution number, equal to runs / workers.size(), eventually plus one + * if number of workers is not a divisor of runs. + * + * @param workers Vector of hosts' ranks + * @param runs Fixed amount of runs, strictly positive. + */ void init( std::vector & workers, int runs ) { unsigned int nbWorkers = workers.size(); freeWorkers = nbWorkers; - attributions.clear(); - attributions.reserve( nbWorkers ); busy.clear(); busy.resize( nbWorkers, false ); + realRank = workers; + + if( runs <= 0 ) + { + return; + } + + attributions.clear(); + attributions.reserve( nbWorkers ); // Let be the euclidean division of runs by nbWorkers : // runs == q * nbWorkers + r, 0 <= r < nbWorkers @@ -151,8 +315,6 @@ namespace eo // r requests to workers, in ascending order unsigned int diff = runs - (runs / nbWorkers) * nbWorkers; for (unsigned int i = 0; i < diff; ++attributions[i++]); - - realRank = workers; } public: diff --git a/eo/src/mpi/eoMpiNode.h b/eo/src/mpi/eoMpiNode.h index 9f1ea7b53..e836637f5 100644 --- a/eo/src/mpi/eoMpiNode.h +++ b/eo/src/mpi/eoMpiNode.h @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __MPI_NODE_H__ # define __MPI_NODE_H__ @@ -8,15 +29,34 @@ namespace eo { namespace mpi { + /** + * @brief Global object used to reach boost::mpi::communicator everywhere. + * + * boost::mpi::communicator is the main object used to send and receive messages between the different hosts of + * a MPI algorithm. + * + * @ingroup Parallel + */ class Node { public: + /** + * @brief Initializes the MPI environment with argc and argv. + * + * Should be called at the beginning of every parallel program. + * + * @param argc Main's argc + * @param argv Main's argv + */ static void init( int argc, char** argv ) { static bmpi::environment env( argc, argv ); } + /** + * @brief Returns the global boost::mpi::communicator + */ static bmpi::communicator& comm() { return _comm; diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index d0435cead..6f5120f81 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -1,28 +1,100 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EO_PARALLEL_APPLY_H__ # define __EO_PARALLEL_APPLY_H__ # include "eoMpi.h" -# include -# include +# include // eoUF +# include // std::vector population + +/** + * @file eoParallelApply.h + * + * @brief Applies a functor with single parameter to elements of a table, in a parallel fashion. + * + * This file contains all the required classes to do a parallel apply of a table, in a parallel fashion. This can be + * very useful when applying the function can be made without any dependances within the data. In EO, it occurs in + * particular during the evaluation: the number of individuals to evaluate can be really high, and the evaluation of one + * individual is independant from the evaluation of other individuals. + * + * Elements in the table are directly replaced, as the table is given by reference. No new table is made during the + * process. + * + * User can tune this job, indicating how many elements of the table should be sent and evaluated by a worker, at a + * time: this is called the "packet size", as individuals are groupped into a packet of individuals which are sent to + * the worker before evaluation. The problem of choosing the optimal packet size is beyond the purposes of this documentation + * and deserves a theoritical study. + * + * This job is the parallel equivalent to the function apply, defined in apply.h. It just applies the function to + * every element of a table. In Python or Javascript, it's the equivalent of the function Map. + */ namespace eo { namespace mpi { + /** + * @brief Structure used to save assignment to a worker, i.e which slice of the table it has to process. + * + * This slice is defined by the index of the first evaluated argument and the number of processed elements. + */ struct ParallelApplyAssignment { int index; int size; }; + /** + * @brief Data useful for a parallel apply (map). + * + * A parallel apply needs at least the functor to apply to every element of the table, and the table itself, + * whereas it can be set later with the function init(). Master rank is also needed, to send it informations and + * receive informations from it, inside the functors (the job knows these values, but the functors don't). The + * size of a packet can be tuned here. + * + * Internal attributes contain: + * - (useful for master) the index of the next element to be evaluated. + * - (useful for master) a map containing links between MPI ranks and slices of the table which the worker with + * this rank has evaluated. Without this map, when receiving results from a worker, the master couldn't be + * able to replace the right elements in the table. + * + * @ingroup Parallel + */ template struct ParallelApplyData { + /** + * @brief Ctor for Parallel apply (map) data. + * + * @param _proc The functor to apply on each element in the table + * @param _masterRank The MPI rank of the master + * @param _packetSize The number of elements on which the function will be applied by the worker, at a time. + * @param _pop The table to apply. If this value is NULL, user will have to call init() before launching the + * job. + */ ParallelApplyData( eoUF & _proc, int _masterRank, - // long _maxTime = 0, int _packetSize, std::vector * _pop = 0 ) : @@ -39,6 +111,9 @@ namespace eo } } + /** + * @brief Reinitializes the data for a new table to evaluate. + */ void init( std::vector& _pop ) { index = 0; @@ -52,11 +127,12 @@ namespace eo return *_data; } + // All elements are public since functors will often use them. std::vector * _data; eoUF & func; int index; int size; - std::map< int /* worker rank */, ParallelApplyAssignment /* min indexes in vector */> assignedTasks; + std::map< int /* worker rank */, ParallelApplyAssignment /* last assignment */> assignedTasks; int packetSize; std::vector tempArray; @@ -64,6 +140,15 @@ namespace eo bmpi::communicator& comm; }; + /** + * @brief Send task functor implementation for the parallel apply (map) job. + * + * Master side: Sends a slice of the table to evaluate to the worker. + * + * Implementation details: + * Finds the next slice of data to send to the worker, sends first the size and then the data, and memorizes + * that this slice has been distributed to the worker, then updates the next position of element to evaluate. + */ template< class EOT > class SendTaskParallelApply : public SendTaskFunction< ParallelApplyData > { @@ -100,6 +185,11 @@ namespace eo } }; + /** + * @brief Handle response functor implementation for the parallel apply (map) job. + * + * Master side: Replaces the slice of data attributed to the worker in the table. + */ template< class EOT > class HandleResponseParallelApply : public HandleResponseFunction< ParallelApplyData > { @@ -117,6 +207,14 @@ namespace eo } }; + /** + * @brief Process task functor implementation for the parallel apply (map) job. + * + * Worker side: apply the function to the given slice of data. + * + * Implementation details: retrieves the number of elements to evaluate, retrieves them, applies the function + * and then returns the results. + */ template< class EOT > class ProcessTaskParallelApply : public ProcessTaskFunction< ParallelApplyData > { @@ -145,6 +243,12 @@ namespace eo } }; + /** + * @brief Is finished functor implementation for the parallel apply (map) job. + * + * Master side: returns true if and only if the whole table has been evaluated. The job is also terminated only + * when the whole table has been evaluated. + */ template< class EOT > class IsFinishedParallelApply : public IsFinishedFunction< ParallelApplyData > { @@ -162,6 +266,14 @@ namespace eo } }; + /** + * @brief Store containing all the datas and the functors for the parallel apply (map) job. + * + * User can tune functors when constructing the object. For each functor which is not given, a default one is + * generated. + * + * @ingroup Parallel + */ template< class EOT > struct ParallelApplyStore : public JobStore< ParallelApplyData > { @@ -170,6 +282,17 @@ namespace eo using JobStore< ParallelApplyData >::_ptf; using JobStore< ParallelApplyData >::_iff; + /** + * @brief Main constructor for the parallel apply (map) job. + * + * @param _proc The procedure to apply to each element of the table. + * @param _masterRank The rank of the master process. + * @param _packetSize The number of elements of the table to be evaluated at a time, by the worker. + * @param stpa Pointer to Send Task parallel apply functor descendant. If null, a default one is used. + * @param hrpa Pointer to Handle Response parallel apply functor descendant. If null, a default one is used. + * @param ptpa Pointer to Process Task parallel apply functor descendant. If null, a default one is used. + * @param ifpa Pointer to Is Finished parallel apply functor descendant. If null, a default one is used. + */ ParallelApplyStore( eoUF & _proc, int _masterRank, @@ -210,12 +333,17 @@ namespace eo ParallelApplyData* data() { return &_data; } + /** + * @brief Reinits the store with a new table to evaluate. + * + * @param _pop The table of elements to be evaluated. + */ void data( std::vector& _pop ) { _data.init( _pop ); } - virtual ~ParallelApplyStore() + virtual ~ParallelApplyStore() // for inheritance purposes only { } @@ -223,8 +351,15 @@ namespace eo ParallelApplyData _data; }; - // TODO commentaire : impossible de faire un typedef sur un template sans passer - // par un traits => complique la tâche de l'utilisateur pour rien. + /** + * @brief Parallel apply job. Present for convenience only. + * + * A typedef wouldn't have been working, as typedef on templates don't work in C++. Traits would be a + * disgraceful overload for the user. + * + * @ingroup Parallel + * @see eoParallelApply.h + */ template< typename EOT > class ParallelApply : public MultiJob< ParallelApplyData > { diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index ed45ca052..ccbd3521e 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -1,3 +1,24 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ # ifndef __EO_TERMINATE_H__ # define __EO_TERMINATE_H__ @@ -7,6 +28,14 @@ namespace eo { namespace mpi { + /** + * @ingroup Parallel + * @{ + */ + + /** + * @brief Send task functor which does nothing. + */ struct DummySendTaskFunction : public SendTaskFunction { void operator()( int _ ) @@ -15,6 +44,9 @@ namespace eo } }; + /** + * @brief Handle response functor which does nothing. + */ struct DummyHandleResponseFunction : public HandleResponseFunction { void operator()( int _ ) @@ -23,6 +55,9 @@ namespace eo } }; + /** + * @brief Process task functor which does nothing. + */ struct DummyProcessTaskFunction : public ProcessTaskFunction { void operator()() @@ -31,6 +66,9 @@ namespace eo } }; + /** + * @brief Is finished functor which returns true everytime. + */ struct DummyIsFinishedFunction : public IsFinishedFunction { bool operator()() @@ -39,6 +77,9 @@ namespace eo } }; + /** + * @brief Job store containing all dummy functors and containing no data. + */ struct DummyJobStore : public JobStore { using JobStore::_stf; @@ -61,11 +102,20 @@ namespace eo void* data() { return 0; } }; + /** + * @brief Job to run after a Multi Job, so as to indicate that every workers should terminate. + */ struct EmptyJob : public OneShotJob { + /** + * @brief Main EmptyJob ctor + * + * @param algo Assignment (scheduling) algorithm used. + * @param masterRank The rank of the master process. + */ EmptyJob( AssignmentAlgorithm& algo, int masterRank ) : OneShotJob( algo, masterRank, *(new DummyJobStore) ) - // FIXME memory leak => will be corrected by using const correctness + // FIXME memory leak, meaningless but present { // empty } @@ -79,6 +129,10 @@ namespace eo } } }; + + /** + * @} + */ } } From f9a0084f959033ab896fe2ad19ca42a7adc7079a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 13 Jul 2012 14:45:56 +0200 Subject: [PATCH 2016/2134] Taking in account Doxygen remarks, fixed some documentation errors. --- eo/src/mpi/eoMpi.h | 3 +++ eo/src/mpi/eoMpiAssignmentAlgorithm.h | 2 +- eo/src/serial/Object.h | 2 +- eo/src/serial/Parser.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 230399040..a040e3623 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -514,12 +514,15 @@ namespace eo * AssignmentAlgorithm for more details. * * @param _masterRank The MPI rank of the master. + * * @param _workerStopCondition Number of the message which will cause the workers to terminate. It could * be one of the constants defined in eo::mpi::Commands, or any other integer. The user has to be sure * that a message containing this integer will be sent to each worker on the Commands channel, otherwise * deadlock will happen. Master sends Finish messages at the end of a simple job, but as a job can * happen multiples times (multi job), workers don't have to really finish on these messages but on * another message. This is here where you can configurate it. See also OneShotJob and MultiJob. + * + * @param store The JobStore containing functors and data for this job. */ Job( AssignmentAlgorithm& _algo, int _masterRank, diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h index d42ec723d..e052d8ab3 100644 --- a/eo/src/mpi/eoMpiAssignmentAlgorithm.h +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -78,7 +78,7 @@ namespace eo * the workers which are currently processing data, and the other ones who could be waiting : the idles. * This function indicates to the master which worker aren't doing anything. * - * @param A std::vector containing all the MPI ranks of the idles workers. + * @return A std::vector containing all the MPI ranks of the idles workers. */ virtual std::vector idles( ) = 0; diff --git a/eo/src/serial/Object.h b/eo/src/serial/Object.h index 20fbdbf7e..9424f1c4c 100644 --- a/eo/src/serial/Object.h +++ b/eo/src/serial/Object.h @@ -46,7 +46,7 @@ namespace eoserial /** * @brief Adds a pair into the JSON object. * @param key The key associated with the eoserial object - * @param eoserial The JSON object as created with framework. + * @param json The JSON object as created with framework. */ void add( const std::string& key, eoserial::Entity* json ) { diff --git a/eo/src/serial/Parser.h b/eo/src/serial/Parser.h index 5bcdc5979..20f6a1bb2 100644 --- a/eo/src/serial/Parser.h +++ b/eo/src/serial/Parser.h @@ -84,7 +84,7 @@ class Parser * * @param str The string we're parsing. * @param pos The index of the current position in the string. - * @param eoserial The current JSON object for which we're adding a key-value pair. + * @param json The current JSON object for which we're adding a key-value pair. */ static void parseLeft(const std::string & str, size_t & pos, eoserial::Object* json); From 1735660ffe9d61098771048febb978d00c42417a Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 13 Jul 2012 14:58:27 +0200 Subject: [PATCH 2017/2134] use rank mu selector ; bugfix estimator's linear algebra : mu is useless in estimator ; arx = pop^T ; store D as a diagonal ; cwise prod for covar recomposition ; more asserts --- edo/application/cmaes/main.cpp | 6 ++-- edo/src/edoEstimatorNormalAdaptive.h | 52 +++++++++++++++++----------- edo/src/edoNormalAdaptive.h | 30 ++++++++-------- edo/src/edoSamplerNormalAdaptive.h | 20 ++++++----- 4 files changed, 63 insertions(+), 45 deletions(-) diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index 7e73d49dc..7a0e73f6d 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -57,7 +57,7 @@ int main(int ac, char** av) eoState state; // Instantiate all needed parameters for EDA algorithm - double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R + //double selection_rate = parser.createParam((double)0.5, "selection_rate", "Selection Rate", 'R', section).value(); // R unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E @@ -69,10 +69,10 @@ int main(int ac, char** av) edoNormalAdaptive distribution(dim); - eoSelect< RealVec >* selector = new eoDetSelect< RealVec >( selection_rate ); + eoSelect< RealVec >* selector = new eoRankMuSelect< RealVec >( mu ); state.storeFunctor(selector); - edoEstimator< Distrib >* estimator = new edoEstimatorNormalAdaptive( distribution, mu ); + edoEstimator< Distrib >* estimator = new edoEstimatorNormalAdaptive( distribution ); state.storeFunctor(estimator); eoEvalFunc< RealVec >* plainEval = new Rosenbrock< RealVec >(); diff --git a/edo/src/edoEstimatorNormalAdaptive.h b/edo/src/edoEstimatorNormalAdaptive.h index 0e5a7b028..a2566772b 100644 --- a/edo/src/edoEstimatorNormalAdaptive.h +++ b/edo/src/edoEstimatorNormalAdaptive.h @@ -45,12 +45,11 @@ class edoEstimatorNormalAdaptive : public edoEstimatorAdaptive< EOD > { public: typedef typename EOT::AtomType AtomType; - typedef typename EOD::Vector Vector; + typedef typename EOD::Vector Vector; // column vectors @see edoNormalAdaptive typedef typename EOD::Matrix Matrix; - edoEstimatorNormalAdaptive( EOD& distrib, unsigned int mu ) : + edoEstimatorNormalAdaptive( EOD& distrib ) : edoEstimatorAdaptive( distrib ), - _mu(mu), _calls(0), _eigeneval(0) {} @@ -61,14 +60,15 @@ private: // compute recombination weights Eigen::VectorXd weights( pop_size ); double sum_w = 0; - for( unsigned int i = 0; i < _mu; ++i ) { - double w_i = log( _mu + 0.5 ) - log( i + 1 ); + for( unsigned int i = 0; i < pop_size; ++i ) { + double w_i = log( pop_size + 0.5 ) - log( i + 1 ); weights(i) = w_i; sum_w += w_i; } // normalization of weights weights /= sum_w; + assert( weights.size() == pop_size); return weights; } @@ -97,17 +97,18 @@ public: // Here, if we are in canonical CMA-ES, // pop is supposed to be the mu ranked better solutions, // as the rank mu selection is supposed to have occured. - Matrix arx( pop.size(), N ); + Matrix arx( N, lambda ); // copy the pop (most probably a vector of vectors) in a Eigen3 matrix - for( unsigned int i = 0; i < lambda; ++i ) { - for( unsigned int d = 0; d < N; ++d ) { - arx(i,d) = pop[i][d]; + for( unsigned int d = 0; d < N; ++d ) { + for( unsigned int i = 0; i < lambda; ++i ) { + arx(d,i) = pop[i][d]; // NOTE: pop = arx.transpose() } // dimensions } // individuals // muXone array for weighted recombination - Eigen::VectorXd weights = edoCMAESweights( N ); + Eigen::VectorXd weights = edoCMAESweights( lambda ); + assert( weights.size() == lambda ); // FIXME exposer les constantes dans l'interface @@ -137,6 +138,8 @@ public: Matrix invsqrtC = d.coord_sys() * d.scaling().asDiagonal().inverse() * d.coord_sys().transpose(); + assert( invsqrtC.innerSize() == d.coord_sys().innerSize() ); + assert( invsqrtC.outerSize() == d.coord_sys().outerSize() ); // expectation of ||N(0,I)|| == norm(randn(N,1)) double chiN = sqrt(N)*(1-1/(4*N)+1/(21*pow(N,2))); @@ -148,8 +151,11 @@ public: // compute weighted mean into xmean Vector xold = d.mean(); - d.mean( arx * weights ); - Vector xmean = d.mean(); + assert( xold.size() == N ); + // xmean ( N, 1 ) = arx( N, lambda ) * weights( lambda, 1 ) + Vector xmean = arx * weights; + assert( xmean.size() == N ); + d.mean( xmean ); /********************************************************************** @@ -157,9 +163,9 @@ public: *********************************************************************/ // cumulation for sigma - d.path_sigma( - (1.0-cs)*d.path_sigma() + sqrt(cs*(2.0-cs)*mueff)*invsqrtC*(xmean-xold)/d.sigma() - ); + d.path_sigma( + (1.0-cs)*d.path_sigma() + sqrt(cs*(2.0-cs)*mueff)*invsqrtC*(xmean-xold)/d.sigma() + ); // sign of h double hsig; @@ -173,10 +179,16 @@ public: // cumulation for the covariance matrix d.path_covar( - (1.0-cc)*d.path_covar() + hsig*sqrt(cc*(2.0-cc)*mueff)*(xmean-xold) / d.sigma() - ); + (1.0-cc)*d.path_covar() + hsig*sqrt(cc*(2.0-cc)*mueff)*(xmean-xold) / d.sigma() + ); - Matrix artmp = (1.0/d.sigma()) * arx - xold.rowwise().replicate(_mu); + Matrix xmu( N, lambda); + xmu = xold.rowwise().replicate(lambda); + assert( xmu.innerSize() == N ); + assert( xmu.outerSize() == lambda ); + Matrix artmp = (1.0/d.sigma()) * (arx - xmu); + // Matrix artmp = (1.0/d.sigma()) * arx - xold.colwise().replicate(lambda); + assert( artmp.innerSize() == N && artmp.outerSize() == lambda ); /********************************************************************** @@ -214,10 +226,11 @@ public: Eigen::SelfAdjointEigenSolver eigensolver( d.covar() ); // FIXME use JacobiSVD? d.coord_sys( eigensolver.eigenvectors() ); Matrix D = eigensolver.eigenvalues().asDiagonal(); + assert( D.innerSize() == N && D.outerSize() == N ); // from variance to standard deviations D.cwiseSqrt(); - d.scaling( D ); + d.scaling( D.diagonal() ); } return d; @@ -225,7 +238,6 @@ public: protected: - unsigned int _mu; unsigned int _calls; unsigned int _eigeneval; diff --git a/edo/src/edoNormalAdaptive.h b/edo/src/edoNormalAdaptive.h index 9ceb6b9fc..85db27b53 100644 --- a/edo/src/edoNormalAdaptive.h +++ b/edo/src/edoNormalAdaptive.h @@ -41,10 +41,11 @@ class edoNormalAdaptive : public edoDistrib< EOT > public: //typedef EOT EOType; typedef typename EOT::AtomType AtomType; - typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; + typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; // column vectors ( n lines, 1 column) typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; edoNormalAdaptive( unsigned int dim ) : + _dim(dim), _mean( Vector::Zero(dim) ), _C( Matrix::Identity(dim,dim) ), _B( Matrix::Identity(dim,dim) ), @@ -53,7 +54,7 @@ public: _p_c( Vector::Zero(dim) ), _p_s( Vector::Zero(dim) ) { - assert( dim > 0); + assert( _dim > 0); } edoNormalAdaptive( unsigned int dim, @@ -88,23 +89,24 @@ public: return _mean.innerSize(); } - Vector mean() const {return _mean;} - Matrix covar() const {return _C;} - Matrix coord_sys() const {return _B;} - Vector scaling() const {return _D;} - double sigma() const {return _sigma;} + Vector mean() const {return _mean;} + Matrix covar() const {return _C;} + Matrix coord_sys() const {return _B;} + Vector scaling() const {return _D;} + double sigma() const {return _sigma;} Vector path_covar() const {return _p_c;} Vector path_sigma() const {return _p_s;} - void mean( Vector m ) { _mean = m; } - void covar( Matrix c ) { _C = c; } - void coord_sys( Matrix b ) { _B = b; } - void scaling( Vector d ) { _D = d; } - void sigma( double s ) { _sigma = s; } - void path_covar( Vector p ) { _p_c = p; } - void path_sigma( Vector p ) { _p_s = p; } + void mean( Vector m ) { _mean = m; assert( m.size() == _dim ); } + void covar( Matrix c ) { _C = c; assert( c.innerSize() == _dim && c.outerSize() == _dim ); } + void coord_sys( Matrix b ) { _B = b; assert( b.innerSize() == _dim && b.outerSize() == _dim ); } + void scaling( Vector d ) { _D = d; assert( d.size() == _dim ); } + void sigma( double s ) { _sigma = s; assert( s != 0.0 );} + void path_covar( Vector p ) { _p_c = p; assert( p.size() == _dim ); } + void path_sigma( Vector p ) { _p_s = p; assert( p.size() == _dim ); } private: + unsigned int _dim; Vector _mean; // Matrix _C; // covariance matrix Matrix _B; // eigen vectors / coordinates system diff --git a/edo/src/edoSamplerNormalAdaptive.h b/edo/src/edoSamplerNormalAdaptive.h index edf531eff..e8188105a 100644 --- a/edo/src/edoSamplerNormalAdaptive.h +++ b/edo/src/edoSamplerNormalAdaptive.h @@ -58,24 +58,28 @@ public: EOT sample( EOD& distrib ) { - unsigned int size = distrib.size(); - assert(size > 0); + unsigned int N = distrib.size(); + assert( N > 0); // T = vector of size elements drawn in N(0,1) - Vector T( size ); - for ( unsigned int i = 0; i < size; ++i ) { + Vector T( N ); + for ( unsigned int i = 0; i < N; ++i ) { T( i ) = rng.normal(); } - assert(T.innerSize() == size); + assert(T.innerSize() == N ); assert(T.outerSize() == 1); - Vector sol = distrib.mean() + distrib.sigma() * distrib.coord_sys() * (distrib.scaling().dot(T) ); + // mean(N,1) + sigma * B(N,N) * ( D(N,1) .* T(N,1) ) + Vector sol = distrib.mean() + + distrib.sigma() + * distrib.coord_sys() * (distrib.scaling().cwiseProduct(T) ); // C * T = B * (D .* T) + assert( sol.size() == N ); /*Vector sol = distrib.mean() + distrib.sigma() * distrib.coord_sys().dot( distrib.scaling().dot( T ) );*/ // copy in the EOT structure (more probably a vector) - EOT solution( size ); - for( unsigned int i = 0; i < size; i++ ) { + EOT solution( N ); + for( unsigned int i = 0; i < N; i++ ) { solution[i]= sol(i); } From d54e88dd165feaef3858585b03740f4ba0249c73 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 13 Jul 2012 15:07:42 +0200 Subject: [PATCH 2018/2134] eoMultiParallelApply is no more used, replaced with eo::mpi::MultiJob instead. --- eo/src/mpi/eoMultiParallelApply.h | 57 ------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 eo/src/mpi/eoMultiParallelApply.h diff --git a/eo/src/mpi/eoMultiParallelApply.h b/eo/src/mpi/eoMultiParallelApply.h deleted file mode 100644 index f4fe47b51..000000000 --- a/eo/src/mpi/eoMultiParallelApply.h +++ /dev/null @@ -1,57 +0,0 @@ -# ifndef __EO_MULTI_PARALLEL_APPLY_H__ -# define __EO_MULTI_PARALLEL_APPLY_H__ - -# include "eoParallelApply.h" - -namespace eo -{ - namespace mpi - { - template< class EOT > - class ProcessTaskParallelEval : public ProcessTaskParallelApply - { - public: - - using ProcessTaskParallelApply::_wrapped; - using ProcessTaskParallelApply::d; - - void operator()() - { - int order = Message::Continue; - while( order != Message::Finish ) - { - _wrapped->operator()(); - d->comm.recv( d->masterRank, Channel::Commands, order ); - } - } - - ~ProcessTaskParallelEval() - { - } - }; - - template< class EOT > - struct ParallelEvalStore : public ParallelApplyStore< EOT > - { - using ParallelApplyStore::wrapProcessTask; - - ParallelEvalStore( - eoUF & _proc, - int _masterRank, - int _packetSize = 1 - ) : - ParallelApplyStore< EOT >( _proc, *( new std::vector ), _masterRank, _packetSize ) - // FIXME memory leak because of vector ==> use const correctness - { - wrapProcessTask( new ProcessTaskParallelEval ); - } - - void data( std::vector& _pop ) - { - ParallelApplyStore::_data.init( _pop ); - } - }; - } -} -# endif // __EO_PARALLEL_APPLY_H__ - From 4755ce0c47c8ba95bf0cd1f52d5dfd198b45cd71 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 13 Jul 2012 15:34:45 +0200 Subject: [PATCH 2019/2134] do not include EDA SA --- edo/src/edo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edo/src/edo b/edo/src/edo index c03acd35d..0f7a06377 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -29,7 +29,7 @@ Authors: #define _edo_ #include "edoAlgo.h" -#include "edoEDASA.h" +//#include "edoEDASA.h" #include "edoEDA.h" #include "edoDistrib.h" From ad74755d8e1e81676acf43a7f764eab0efce68b2 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 13 Jul 2012 15:50:51 +0200 Subject: [PATCH 2020/2134] Precised group MPI instead of group Parallel for Mpi classes in documentation. --- eo/src/mpi/eoMpi.h | 24 ++++++++++++++++++++++++ eo/src/mpi/eoMpiAssignmentAlgorithm.h | 8 +++++--- eo/src/mpi/eoMpiNode.h | 2 +- eo/src/mpi/eoParallelApply.h | 6 +++--- eo/src/mpi/eoTerminateJob.h | 2 +- eo/src/serial/Entity.h | 3 ++- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index a040e3623..0293c43d8 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -137,6 +137,8 @@ namespace eo * These tags are used for framework communication and fits "channels", so as to differentiate when we're * sending an order to a worker (Commands) or data (Messages). They are not reserved by the framework and can be * used by the user, but he is not bound to. + * + * @ingroup MPI */ namespace Channel { @@ -149,6 +151,8 @@ namespace eo * * These orders are sent by the master to the workers, to indicate to them if they should receive another task * to do (Continue), if an one shot job is done (Finish) or if a multi job is done (Kill). + * + * @ingroup MPI */ namespace Message { @@ -159,6 +163,8 @@ namespace eo /** * @brief If the job only has one master, the user can use this constant, so as not to worry with integer ids. + * + * @ingroup MPI */ const int DEFAULT_MASTER = 0; @@ -204,6 +210,8 @@ namespace eo * }; * @endcode * This makes the code easier to write for the user. + * + * @ingroup MPI */ template< typename JobData, typename Wrapped > struct SharedDataFunction @@ -277,6 +285,8 @@ namespace eo * * This is a functor implementing void operator()(int), and also a shared data function, containing wrapper on its * own type. + * + * @ingroup MPI */ template< typename JobData > struct SendTaskFunction : public eoUF, public SharedDataFunction< JobData, SendTaskFunction > @@ -300,6 +310,8 @@ namespace eo * * This is a functor implementing void operator()(int), and also a shared data function, containing wrapper on * its own type. + * + * @ingroup MPI */ template< typename JobData > struct HandleResponseFunction : public eoUF, public SharedDataFunction< JobData, HandleResponseFunction > @@ -325,6 +337,8 @@ namespace eo * * This is a functor implementing void operator()(), and also a shared data function, containing wrapper on its * own type. + * + * @ingroup MPI */ template< typename JobData > struct ProcessTaskFunction : public eoF, public SharedDataFunction< JobData, ProcessTaskFunction > @@ -348,6 +362,8 @@ namespace eo * * This is a functor implementing bool operator()(), and also a shared function, containing wrapper on its own * type. + * + * @ingroup MPI */ template< typename JobData > struct IsFinishedFunction : public eoF, public SharedDataFunction< JobData, IsFinishedFunction > @@ -377,6 +393,8 @@ namespace eo * The user has to implement data(), which is the getter for retrieving JobData. We don't have any idea of who * owns the data, moreover it is impossible to initialize it in this generic JobStore, as we don't know its * form. As a matter of fact, the user has to define this in the JobStore subclasses. + * + * @ingroup MPI */ template< typename JobData > struct JobStore @@ -501,6 +519,8 @@ namespace eo * * Any of the 3 master functors can launch exception, it will be catched and rethrown as a std::runtime_exception * to the higher layers. + * + * @ingroup MPI */ template< class JobData > class Job @@ -755,6 +775,8 @@ namespace eo * times. The job will be terminated on both sides (master and worker) once the master would have said it. * * It uses the message Message::Finish as the termination message. + * + * @ingroup MPI */ template< class JobData > class OneShotJob : public Job< JobData > @@ -780,6 +802,8 @@ namespace eo * It uses the message Message::Kill as the termination message. This message can be launched with an EmptyJob, * launched only by the master. If no Message::Kill is sent on the Channels::Commands, the worker will wait * forever, which will cause a deadlock. + * + * @ingroup MPI */ template< class JobData > class MultiJob : public Job< JobData > diff --git a/eo/src/mpi/eoMpiAssignmentAlgorithm.h b/eo/src/mpi/eoMpiAssignmentAlgorithm.h index e052d8ab3..07f674157 100644 --- a/eo/src/mpi/eoMpiAssignmentAlgorithm.h +++ b/eo/src/mpi/eoMpiAssignmentAlgorithm.h @@ -32,6 +32,8 @@ namespace eo /** * @brief Constant indicating to use all the resting available workers, in assignment algorithms constructor * using an interval. + * + * @ingroup MPI */ const int REST_OF_THE_WORLD = -1; @@ -42,7 +44,7 @@ namespace eo * from the state "available" to the state "busy", and the master has to wait for their response for considering * them available again. * - * @ingroup Parallel + * @ingroup MPI */ struct AssignmentAlgorithm { @@ -104,7 +106,7 @@ namespace eo * This kind of assignment is adapted for tasks whose execution time is stochastic or unknown, but without any * warranty to be faster than other assignments. * - * @ingroup Parallel + * @ingroup MPI */ struct DynamicAssignmentAlgorithm : public AssignmentAlgorithm { @@ -210,7 +212,7 @@ namespace eo * duration of processing task will be the same for each run. There is no warranty that this algorithm is more * or less efficient that another one. When having a doubt, use DynamicAssignmentAlgorithm. * - * @ingroup Parallel + * @ingroup MPI */ struct StaticAssignmentAlgorithm : public AssignmentAlgorithm { diff --git a/eo/src/mpi/eoMpiNode.h b/eo/src/mpi/eoMpiNode.h index e836637f5..27c03312c 100644 --- a/eo/src/mpi/eoMpiNode.h +++ b/eo/src/mpi/eoMpiNode.h @@ -35,7 +35,7 @@ namespace eo * boost::mpi::communicator is the main object used to send and receive messages between the different hosts of * a MPI algorithm. * - * @ingroup Parallel + * @ingroup MPI */ class Node { diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 6f5120f81..98f113f44 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -78,7 +78,7 @@ namespace eo * this rank has evaluated. Without this map, when receiving results from a worker, the master couldn't be * able to replace the right elements in the table. * - * @ingroup Parallel + * @ingroup MPI */ template struct ParallelApplyData @@ -272,7 +272,7 @@ namespace eo * User can tune functors when constructing the object. For each functor which is not given, a default one is * generated. * - * @ingroup Parallel + * @ingroup MPI */ template< class EOT > struct ParallelApplyStore : public JobStore< ParallelApplyData > @@ -357,7 +357,7 @@ namespace eo * A typedef wouldn't have been working, as typedef on templates don't work in C++. Traits would be a * disgraceful overload for the user. * - * @ingroup Parallel + * @ingroup MPI * @see eoParallelApply.h */ template< typename EOT > diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index ccbd3521e..e0b4a5bd3 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -29,7 +29,7 @@ namespace eo namespace mpi { /** - * @ingroup Parallel + * @ingroup MPI * @{ */ diff --git a/eo/src/serial/Entity.h b/eo/src/serial/Entity.h index 6fec34858..50155e13a 100644 --- a/eo/src/serial/Entity.h +++ b/eo/src/serial/Entity.h @@ -24,6 +24,7 @@ Authors: # include // ostream + /** * @brief Contains all the necessary entities to serialize eo objects into JSON objects. * @@ -36,7 +37,7 @@ Authors: * * @ingroup Utilities * @defgroup Serialization Serialization helpers - */ +**/ namespace eoserial { From d2816d530a58f731aab6192db958df46a6d09d8a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 13 Jul 2012 16:47:28 +0200 Subject: [PATCH 2021/2134] Included MPI tests into compilation, if WITH_MPI is defined. --- eo/CMakeLists.txt | 5 ++ eo/test/CMakeLists.txt | 15 ++++- eo/test/mpi/CMakeLists.txt | 55 +++++++++++++++++++ eo/test/mpi/{eval.cpp => t-mpi-eval.cpp} | 0 ...tipleRoles.cpp => t-mpi-multipleRoles.cpp} | 0 ...allelApply.cpp => t-mpi-parallelApply.cpp} | 0 .../mpi/{wrapper.cpp => t-mpi-wrapper.cpp} | 0 7 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 eo/test/mpi/CMakeLists.txt rename eo/test/mpi/{eval.cpp => t-mpi-eval.cpp} (100%) rename eo/test/mpi/{multipleRoles.cpp => t-mpi-multipleRoles.cpp} (100%) rename eo/test/mpi/{parallelApply.cpp => t-mpi-parallelApply.cpp} (100%) rename eo/test/mpi/{wrapper.cpp => t-mpi-wrapper.cpp} (100%) diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 78cab0a56..df128f134 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -120,6 +120,11 @@ ENDIF (ENABLE_CMAKE_TESTING) ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(test) + +IF(WITH_MPI) + ADD_SUBDIRECTORY(test/mpi) +ENDIF() + ADD_SUBDIRECTORY(tutorial) ###################################################################################### diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index 4e68b02ad..8bf8b500e 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -14,12 +14,23 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib) INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib/MGE) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +IF(WITH_MPI) + INCLUDE_DIRECTORIES(${BOOST_DIR}/include) + INCLUDE_DIRECTORIES(${MPI_DIR}/include) +ENDIF() + ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +IF(WITH_MPI) + LINK_DIRECTORIES(${BOOST_DIR}/lib) + LINK_DIRECTORIES(${MPI_DIR}/lib) + SET(CMAKE_CXX_COMPILER "${MPI_DIR}/bin/mpicxx") +ENDIF() + ###################################################################################### ### 3) Define your targets and link the librairies ###################################################################################### @@ -65,8 +76,8 @@ SET (TEST_LIST t-eoExtendedVelocity t-eoLogger t-eoIQRStat - t-eoParallel - t-openmp + #t-eoParallel + #t-openmp #t-eoDualFitness t-eoParser ) diff --git a/eo/test/mpi/CMakeLists.txt b/eo/test/mpi/CMakeLists.txt new file mode 100644 index 000000000..37b1227ff --- /dev/null +++ b/eo/test/mpi/CMakeLists.txt @@ -0,0 +1,55 @@ +############################################################################### +## +## CMakeLists file for eo/test/mpi +## +############################################################################### + +###################################################################################### +### 1) Include the sources +###################################################################################### + +MESSAGE("EO SOURCE DIR: ${EO_SOURCE_DIR}") +MESSAGE("OMPI: ${MPI_DIR}") +MESSAGE("BOOST: ${BOOST_DIR}") + +INCLUDE_DIRECTORIES(${MPI_DIR}/include) +INCLUDE_DIRECTORIES(${BOOST_DIR}/include) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +LINK_DIRECTORIES(${MPI_DIR}/lib) +LINK_DIRECTORIES(${BOOST_DIR}/lib) + +###################################################################################### +### 3) Define your targets and link the librairies +###################################################################################### + +SET (TEST_LIST + t-mpi-parallelApply + t-mpi-wrapper + t-mpi-multipleRoles + t-mpi-eval + ) + +FOREACH (test ${TEST_LIST}) + SET ("T_${test}_SOURCES" "${test}.cpp") +ENDFOREACH (test) + +SET(CMAKE_CXX_COMPILER "${MPI_DIR}/bin/mpicxx") +ADD_DEFINITIONS(-DWITH_MPI) + +IF(ENABLE_CMAKE_TESTING) + FOREACH (test ${TEST_LIST}) + ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) + ADD_TEST(${test} ${test}) + TARGET_LINK_LIBRARIES(${test} boost_mpi boost_serialization eoutils eompi eoserial eo) + INSTALL(TARGETS ${test} RUNTIME DESTINATION share/eo/test COMPONENT test) + ENDFOREACH (test) +ENDIF() + +###################################################################################### diff --git a/eo/test/mpi/eval.cpp b/eo/test/mpi/t-mpi-eval.cpp similarity index 100% rename from eo/test/mpi/eval.cpp rename to eo/test/mpi/t-mpi-eval.cpp diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/t-mpi-multipleRoles.cpp similarity index 100% rename from eo/test/mpi/multipleRoles.cpp rename to eo/test/mpi/t-mpi-multipleRoles.cpp diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/t-mpi-parallelApply.cpp similarity index 100% rename from eo/test/mpi/parallelApply.cpp rename to eo/test/mpi/t-mpi-parallelApply.cpp diff --git a/eo/test/mpi/wrapper.cpp b/eo/test/mpi/t-mpi-wrapper.cpp similarity index 100% rename from eo/test/mpi/wrapper.cpp rename to eo/test/mpi/t-mpi-wrapper.cpp From 6cb15cfecffafc53716974dcd87f0e8b4bc1a116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Jean=20David=20Arjanen?= Date: Mon, 16 Jul 2012 14:18:22 +0200 Subject: [PATCH 2022/2134] bugfix: Windows compatibility of 'apply' and 'eoEvalUserTimeThrowException' --- eo/NEWS | 1 + eo/src/apply.h | 12 ++++++ eo/src/eoEvalUserTimeThrowException.h | 59 ++++++++++++++++++++++----- 3 files changed, 62 insertions(+), 10 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index f4625d6c3..28b25cb42 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,4 +1,5 @@ * current version + - fixed compilation issues in Microsoft Visual C++ * release 1.2 (16. May. 2011) - fixed the incremental allocation issue in variation operators which were diff --git a/eo/src/apply.h b/eo/src/apply.h index 01256e059..bbd30aa3a 100644 --- a/eo/src/apply.h +++ b/eo/src/apply.h @@ -58,14 +58,26 @@ void apply(eoUF& _proc, std::vector& _pop) if (!eo::parallel.isDynamic()) { #pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size) +#ifdef _MSC_VER + //Visual Studio supports only OpenMP version 2.0 in which + //an index variable must be of a signed integral type + for (long long i = 0; i < size; ++i) { _proc(_pop[i]); } +#else // _MSC_VER for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } +#endif } else { #pragma omp parallel for schedule(dynamic) if(eo::parallel.isEnabled()) +#ifdef _MSC_VER + //Visual Studio supports only OpenMP version 2.0 in which + //an index variable must be of a signed integral type + for (long long i = 0; i < size; ++i) { _proc(_pop[i]); } +#else // _MSC_VER //doesnot work with gcc 4.1.2 //default(none) shared(_proc, _pop, size) for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } +#endif } if ( eo::parallel.enableResults() ) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index 87e47ac54..f24a246a6 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -21,27 +21,30 @@ Authors: Johann DrĂ©o */ -#ifndef __unix__ -#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX systems (defining 'rusage' in 'sys/resource.h'), contributions for other systems are welcomed." -#else +#if !defined(__unix__) && !defined(_WINDOWS) +#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX (defining 'rusage' in 'sys/resource.h') or Win32 (defining 'GetProcessTimes' in 'WinBase.h') systems, contributions for other systems are welcomed." +#else //!defined(__unix__) && !defined(_WINDOWS) #ifndef __EOEVALUSERTIMETHROWEXCEPTION_H__ #define __EOEVALUSERTIMETHROWEXCEPTION_H__ -#include -#include - -#include - /** Check at each evaluation if a given CPU user time contract has been reached. * * Throw an eoMaxTimeException if the given max time has been reached. * Usefull if you want to end the search independently of generations. - * This class uses (almost-)POSIX headers. + * This class uses (almost-)POSIX or Win32 headers, depending on the platform. * It uses a computation of the user time used on the CPU. For a wallclock time measure, see eoEvalTimeThrowException * * @ingroup Evaluation */ + +#include + +#ifdef __unix__ + +#include +#include + template< class EOT > class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > { @@ -68,5 +71,41 @@ protected: struct rusage _usage; }; +#else +#ifdef _WINDOWS +//here _WINDOWS is defined + +#include + +template< class EOT > +class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > +{ +public: + eoEvalUserTimeThrowException( eoEvalFunc & func, const long max ) : eoEvalFuncCounter( func, "CPU-user"), _max(max) {} + + virtual void operator() ( EOT & eo ) + { + if( eo.invalid() ) { + FILETIME dummy; + GetProcessTimes(GetCurrentProcess(), &dummy, &dummy, &dummy, &_usage); + + ULARGE_INTEGER current; + current.LowPart = _usage.dwLowDateTime; + current.HighPart = _usage.dwHighDateTime; + if( current.QuadPart >= _max ) { + throw eoMaxTimeException( current.QuadPart ); + } else { + func(eo); + } + } + } + +protected: + const long _max; + FILETIME _usage; +}; + +#endif // _WINDOWS +#endif //__unix__ #endif // __EOEVALUSERTIMETHROWEXCEPTION_H__ -#endif // __UNIX__ +#endif //!defined(__unix__) && !defined(_WINDOWS) From 018107544b67ca9ddb4e6e88e4fbc11772835108 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 16 Jul 2012 14:46:27 +0200 Subject: [PATCH 2023/2134] update the NEWS --- eo/NEWS | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index 28b25cb42..369682af6 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,5 +1,22 @@ * current version - - fixed compilation issues in Microsoft Visual C++ + - features: + - delete the deprecated code parts (was marked as deprecated in the release 1.1) + - eoSignal: a class to handle signal with eoCheckpoint instances + - eoDetSingleBitFlip: bit flip mutation that changes exactly k bits while checking for duplicate + - eoFunctorStat: a wrapper to turn any stand-alone function and into an eoStat + - generilazed the output of an eoState: now you can change the format, comes with defaults formatting (latex and json) + - eoWrongParamTypeException: a new exception to handle cases where a wrong template is given to eoParser::valueOf + - added a getParam method to the eoParser, that raise an exception if the parameter has not been declared + - eoParserLogger features are now included in the default eoParser + - build system: + - improvements of the build architecture + - create PKGBUILD file for archlinux package manager + - a FindEO module for CMake + - bugfixes: + - fixed regression with gcc 4.7 + - fixed compilation issues in Microsoft Visual C++, related to time measurement + - added several asserts accross the framework (note: asserts are included only in debug mode) + - lot of small bugfixes :-) * release 1.2 (16. May. 2011) - fixed the incremental allocation issue in variation operators which were @@ -21,11 +38,11 @@ - GCC 4.3 compatibility - new versatile log system with several nested verbose levels - classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files: - eo/src/eoCombinedInit.h - eo/src/eoGenContinue.h - eo/src/eoProportionalCombinedOp.h - eo/src/utils/eoData.h - eo/src/utils/eoStdoutMonitor.h + eo/src/eoCombinedInit.h + eo/src/eoGenContinue.h + eo/src/eoProportionalCombinedOp.h + eo/src/utils/eoData.h + eo/src/utils/eoStdoutMonitor.h - an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations - new monitor that can write on any ostream - new continuator that can catch POSIX system user signals From b92f17fce55b7c602b796b7d796f0eccc4494648 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 16 Jul 2012 15:07:48 +0200 Subject: [PATCH 2024/2134] Documentation of MPI examples. --- eo/test/mpi/t-mpi-eval.cpp | 51 ++++++++++++++++--- eo/test/mpi/t-mpi-multipleRoles.cpp | 66 ++++++++++++++++++++++-- eo/test/mpi/t-mpi-parallelApply.cpp | 78 ++++++++++++++++++++++++++--- eo/test/mpi/t-mpi-wrapper.cpp | 45 ++++++++++++++++- 4 files changed, 219 insertions(+), 21 deletions(-) diff --git a/eo/test/mpi/t-mpi-eval.cpp b/eo/test/mpi/t-mpi-eval.cpp index 72fca7558..e5678104c 100644 --- a/eo/test/mpi/t-mpi-eval.cpp +++ b/eo/test/mpi/t-mpi-eval.cpp @@ -1,12 +1,35 @@ -//----------------------------------------------------------------------------- -// t-eoMpiParallel.cpp +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ + +/* + * This file shows an example of parallel evaluation of a population, when using an eoEasyEA algorithm. + * Moreover, we add a basic wrapper on the parallel evaluation, so as to show how to retrieve the best solutions. + */ //----------------------------------------------------------------------------- #include #include #include -// #include #include "../real_value.h" #include @@ -80,6 +103,16 @@ class eoRealSerializable : public eoReal< eoMinimizingFitness >, public eoserial typedef eoRealSerializable EOT; +/* + * Wrapper for HandleResponse: shows the best answer, as it is found. + * + * Finding the best solution is an associative operation (as it is based on a "min" function, which is associative too) + * and that's why we can perform it here. Indeed, the min element of 5 elements is the min element of the 3 first + * elements and the min element of the 2 last elements: + * min(1, 2, 3, 4, 5) = min( min(1, 2, 3), min(4, 5) ) + * + * This is a reduction. See MapReduce example to have another examples of reduction. + */ struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply { CatBestAnswers() @@ -87,14 +120,15 @@ struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply best.fitness( 1000000000. ); } - using eo::mpi::HandleResponseParallelApply::_wrapped; - using eo::mpi::HandleResponseParallelApply::d; + // if EOT were a template, we would have to do: (thank you C++ :) + // using eo::mpi::HandleResponseParallelApply::_wrapped; + // using eo::mpi::HandleResponseParallelApply::d; void operator()(int wrkRank) { int index = d->assignedTasks[wrkRank].index; int size = d->assignedTasks[wrkRank].size; - (*_wrapped)( wrkRank ); + (*_wrapped)( wrkRank ); // call to the wrapped function HERE for(int i = index; i < index+size; ++i) { if( best.fitness() < d->data()[ i ].fitness() ) @@ -134,6 +168,9 @@ int main(int ac, char** av) eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); eoEvalFuncCounter< EOT > eval( mainEval ); + // until this point, everything (but eo::mpi::Node::init) is exactly as in an sequential version. + // We then instanciate the parallel algorithm. The store is directly used by the eoParallelPopLoopEval, which + // internally uses parallel apply. int rank = eo::mpi::Node::comm().rank(); eo::mpi::DynamicAssignmentAlgorithm assign; if( rank == eo::mpi::DEFAULT_MASTER ) @@ -157,7 +194,7 @@ int main(int ac, char** av) eo::log << eo::quiet << "DONE!" << std::endl; } else { - eoPop< EOT > pop( popSize, init ); + eoPop< EOT > pop; // the population doesn't have to be initialized, as it is not used by workers. eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, eval ); popEval( pop, pop ); } diff --git a/eo/test/mpi/t-mpi-multipleRoles.cpp b/eo/test/mpi/t-mpi-multipleRoles.cpp index 232a61105..36d588b82 100644 --- a/eo/test/mpi/t-mpi-multipleRoles.cpp +++ b/eo/test/mpi/t-mpi-multipleRoles.cpp @@ -1,3 +1,42 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ + +/* + * This file shows an example of how to make a hierarchy between nodes, when using a parallel apply. In this basic + * test, the master delegates the charge of finding workers to 2 "sub" masters, which then send part of the table to + * their workers. + * + * It's convenient to establish a role map, so as to clearly identify every role: + * - The node 0 is the general master, that delegates the job. It sends the table to the 2 submasters, and waits for the + * results. + * - Nodes 1 and 2 are the worker of the first job: the delegates. They receive the elements of the table and + * retransmit them to the subworkers. They play the roles of worker in the delegating job, and master in the plus one + * job. + * - Following nodes (3 to 6) are workers of the plus one job. They do the real job. Nodes 3 and 5 are attached to + * submaster 1, 4 and 6 to submaster 2. + * + * This test requires exactly 7 hosts. If the size is bigger, an exception will be thrown at the beginning. + **/ + # include # include # include @@ -11,11 +50,7 @@ using namespace std; using namespace eo::mpi; -// Role map -// 0 : general master -// 1, 2 : worker of general job, master of subjob -// 3 to 7 : workers of subjob - +// The real job to execute, for the subworkers: add one to each element of a table. struct SubWork: public eoUF< int&, void > { void operator() ( int & x ) @@ -25,14 +60,20 @@ struct SubWork: public eoUF< int&, void > } }; +// Function called by both subworkers and delegates. +// v is the vector to process, rank is the MPI rank of the sub master void subtask( vector& v, int rank ) { + // Attach workers according to nodes. + // Submaster with rank 1 will have ranks 3 and 5 as subworkers. + // Submaster with rank 2 will have ranks 4 and 6 as subworkers. vector workers; workers.push_back( rank + 2 ); workers.push_back( rank + 4 ); DynamicAssignmentAlgorithm algo( workers ); SubWork sw; + // Launch the job! ParallelApplyStore store( sw, rank ); store.data( v ); ParallelApply job( algo, rank, store ); @@ -40,6 +81,10 @@ void subtask( vector& v, int rank ) EmptyJob stop( algo, rank ); } +// Functor applied by submasters. Wait for the subworkers responses and then add some random processing (here, multiply +// each result by two). +// Note that this work receives a vector of integers as an entry, while subworkers task's operator receives a simple +// integer. struct Work: public eoUF< vector&, void > { void operator() ( vector& v ) @@ -57,6 +102,10 @@ int main(int argc, char** argv) { // eo::log << eo::setlevel( eo::debug ); Node::init( argc, argv ); + if( Node::comm().size() != 7 ) { + throw std::runtime_error("World size should be 7."); + } + vector v; v.push_back(1); @@ -65,12 +114,18 @@ int main(int argc, char** argv) v.push_back(7); v.push_back(42); + // As submasters' operator receives a vector as an input, and ParallelApply takes a vector of + // operator's input as an input, we have to deal with a vector of vector of integers for the master task. vector< vector > metaV; + // Here, we send twice the same vector. We could also have splitted the first vector into two vectors, one + // containing the beginning and another one containing the end. metaV.push_back( v ); metaV.push_back( v ); + // Assigning roles is done by comparing MPI ranks. switch( Node::comm().rank() ) { + // Nodes from 0 to 2 are implicated into the delegating task. case 0: case 1: case 2: @@ -95,6 +150,7 @@ int main(int argc, char** argv) } break; + // Other nodes are implicated into the subwork task. default: { // all the other nodes are sub workers diff --git a/eo/test/mpi/t-mpi-parallelApply.cpp b/eo/test/mpi/t-mpi-parallelApply.cpp index 26b0b30ea..7cefa203a 100644 --- a/eo/test/mpi/t-mpi-parallelApply.cpp +++ b/eo/test/mpi/t-mpi-parallelApply.cpp @@ -1,3 +1,41 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ + +/* + * This file shows an example of use of parallel apply, in the following context: each element of a table is + * incremented... in a parallel fashion. While this operation is very easy to perform even on a single host, it's just + * an example for parallel apply use. + * + * Besides, this is also a test for assignment (scheduling) algorithms, in different cases. The test succeeds if and + * only if the program terminates without any segfault ; otherwise, there could be a deadlock which prevents the end or + * a segfault at any time. + * + * One important thing is to instanciate an EmptyJob after having launched a ParallelApplyJob, so as the workers to be + * aware that the job is done (as it's a MultiJob). + * + * This test needs at least 3 processes to be launched. Under this size, it will directly throw an exception, at the + * beginning; + */ + # include # include # include @@ -9,6 +47,9 @@ using namespace std; using namespace eo::mpi; +/* + * The function to be called on each element of the table: just increment the value. + */ struct plusOne : public eoUF< int&, void > { void operator() ( int & x ) @@ -17,22 +58,26 @@ struct plusOne : public eoUF< int&, void > } }; +/* + * Internal structure representating a test. + */ struct Test { - AssignmentAlgorithm * assign; - string description; - int requiredNodesNumber; // nb : chosen nodes ranks must be sequential + AssignmentAlgorithm * assign; // used assignment algorithm for this test. + string description; // textual description of the test + int requiredNodesNumber; // number of required nodes. NB : chosen nodes ranks must be sequential }; -// These tests require at least 3 processes to be launched. int main(int argc, char** argv) { - // eo::log << eo::setlevel( eo::debug ); + // eo::log << eo::setlevel( eo::debug ); // if you like tty full of rainbows, decomment this line and comment the following one. eo::log << eo::setlevel( eo::quiet ); + bool launchOnlyOne = false ; // Set this to true if you wanna launch only the first test. Node::init( argc, argv ); + // Initializes a vector with random values. srand( time(0) ); vector v; for( int i = 0; i < 1000; ++i ) @@ -40,18 +85,27 @@ int main(int argc, char** argv) v.push_back( rand() ); } + // We need to be sure the values are correctly incremented between each test. So as to check this, we save the + // original vector into a variable originalV, and put an offset variable to 0. After each test, the offset is + // incremented and we can compare the returned value of each element to the value of each element in originalV + + // offset. If the two values are different, there has been a problem. int offset = 0; vector originalV = v; + // Instanciates the functor to apply on each element plusOne plusOneInstance; vector< Test > tests; const int ALL = Node::comm().size(); + if( ALL < 3 ) { + throw std::runtime_error("Needs at least 3 processes to be launched!"); + } + // Tests are auto described thanks to member "description" Test tIntervalStatic; tIntervalStatic.assign = new StaticAssignmentAlgorithm( 1, REST_OF_THE_WORLD, v.size() ); - tIntervalStatic.description = "Correct static assignment with interval."; + tIntervalStatic.description = "Correct static assignment with interval."; // workers have ranks from 1 to size - 1 tIntervalStatic.requiredNodesNumber = ALL; tests.push_back( tIntervalStatic ); @@ -111,23 +165,32 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { + // Instanciates a store with the functor, the master rank and size of packet (see ParallelApplyStore doc). ParallelApplyStore< int > store( plusOneInstance, eo::mpi::DEFAULT_MASTER, 3 ); + // Updates the contained data store.data( v ); + // Creates the job with the assignment algorithm, the master rank and the store ParallelApply< int > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); + // Only master writes information if( job.isMaster() ) { cout << "Test : " << tests[i].description << endl; } + // Workers whose rank is inferior to required nodes number have to run the test, the other haven't anything to + // do. if( Node::comm().rank() < tests[i].requiredNodesNumber ) { job.run(); } + // After the job run, the master checks the result with offset and originalV if( job.isMaster() ) { - EmptyJob stop( *(tests[i].assign), eo::mpi::DEFAULT_MASTER ); + // This job has to be instanciated, not launched, so as to tell the workers they're done with the parallel + // job. + EmptyJob stop( *(tests[i].assign), eo::mpi::DEFAULT_MASTER ); ++offset; for(int i = 0; i < v.size(); ++i) { @@ -141,6 +204,7 @@ int main(int argc, char** argv) cout << endl; } + // MPI synchronization (all the processes wait to be here). Node::comm().barrier(); delete tests[i].assign; diff --git a/eo/test/mpi/t-mpi-wrapper.cpp b/eo/test/mpi/t-mpi-wrapper.cpp index 527c7cc6d..dbe70261d 100644 --- a/eo/test/mpi/t-mpi-wrapper.cpp +++ b/eo/test/mpi/t-mpi-wrapper.cpp @@ -1,3 +1,34 @@ +/* +(c) Thales group, 2012 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Contact: http://eodev.sourceforge.net + +Authors: + Benjamin Bouvier +*/ + +/* + * This file shows an example of how to wrap a handler of a job store. Here, the wrapped handler is the "IsFinished" + * one. The only function that has been added is that the wrapper prints a message on standard output, indicating what + * the wrapped function returns as a result. + * + * This test is performed on a parallel apply job, the same as in parallelApply. The main difference is when + * instanciating the store. + */ + # include # include # include @@ -9,6 +40,7 @@ using namespace std; using namespace eo::mpi; +// Job functor. struct plusOne : public eoUF< int&, void > { void operator() ( int & x ) @@ -17,6 +49,10 @@ struct plusOne : public eoUF< int&, void > } }; +/* + * Shows the wrapped result of IsFinished, prints a message and returns the wrapped value. + * times is an integer counting how many time the wrapper (hence the wrapped too) has been called. + */ template< class EOT > struct ShowWrappedResult : public IsFinishedParallelApply { @@ -39,7 +75,6 @@ struct ShowWrappedResult : public IsFinishedParallelApply int times; }; -// These tests require at least 3 processes to be launched. int main(int argc, char** argv) { // eo::log << eo::setlevel( eo::debug ); @@ -63,7 +98,11 @@ int main(int argc, char** argv) ParallelApplyStore< int > store( plusOneInstance, eo::mpi::DEFAULT_MASTER, 1 ); store.data( v ); - store.wrapIsFinished( new ShowWrappedResult ); + // This is the only thing which changes: we wrap the IsFinished function. + // According to RAII, we'll delete the invokated wrapper at the end of the main ; the store won't delete it + // automatically. + IsFinishedParallelApply* wrapper = new ShowWrappedResult; + store.wrapIsFinished( wrapper ); ParallelApply job( assign, eo::mpi::DEFAULT_MASTER, store ); // Equivalent to: @@ -86,6 +125,8 @@ int main(int argc, char** argv) cout << endl; } + delete wrapper; + return 0; } From fb75279012e0a7591cb40bfb5d990fe54278f83e Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 16 Jul 2012 15:08:53 +0200 Subject: [PATCH 2025/2134] Added doxygen links to examples on MPI classes --- eo/src/eoPopEvalFunc.h | 4 ++++ eo/src/mpi/eoMpi.h | 7 ++++++- eo/src/mpi/eoParallelApply.h | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/eo/src/eoPopEvalFunc.h b/eo/src/eoPopEvalFunc.h index b96e8cac9..7fcad1467 100644 --- a/eo/src/eoPopEvalFunc.h +++ b/eo/src/eoPopEvalFunc.h @@ -217,6 +217,10 @@ class eoParallelPopLoopEval : public eoPopEvalFunc // Do we have to delete the store by ourselves ? bool needToDeleteStore; }; + +/** + * @example t-mpi-eval.cpp + */ #endif ///////////////////////////////////////////////////////////// diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index 0293c43d8..cf5cbeb54 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -36,7 +36,8 @@ namespace eo { /** * @ingroup Parallel - * @defgroup MPI Message Passing Interface parallelization + * @defgroup MPI Message Passing Interface + * @brief See namespace eo::mpi to have all explanations about this module. * @{ */ @@ -507,6 +508,10 @@ namespace eo IsFinishedFunction< JobData >* _iff; }; + /** + * @example t-mpi-wrapper.cpp + */ + /** * @brief Class implementing the centralized job algorithm. * diff --git a/eo/src/mpi/eoParallelApply.h b/eo/src/mpi/eoParallelApply.h index 98f113f44..3cfd729c8 100644 --- a/eo/src/mpi/eoParallelApply.h +++ b/eo/src/mpi/eoParallelApply.h @@ -375,6 +375,11 @@ namespace eo // empty } }; + + /** + * @example t-mpi-parallelApply.cpp + * @example t-mpi-multipleRoles.cpp + */ } } # endif // __EO_PARALLEL_APPLY_H__ From 3cdde2498c7ce74dc4b418aca7a59a3311ebd452 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 17 Jul 2012 11:42:49 +0200 Subject: [PATCH 2026/2134] * eoEvalUserTimeThrowException.h: gcc regression fixed --- eo/src/eoEvalUserTimeThrowException.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index 87e47ac54..ed0145deb 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -58,7 +58,7 @@ public: if( current >= _max ) { throw eoMaxTimeException( current ); } else { - func(eo); + this->func(eo); } } } From 1f4a421dbd7017cc5828cb0f02cbe05ada70ba89 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 17:03:40 +0200 Subject: [PATCH 2027/2134] simpler cmaes demo, without hazardous file dumping --- edo/application/cmaes/main.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index 7a0e73f6d..5572e2c83 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -137,35 +137,6 @@ int main(int ac, char** av) make_verbose(parser); make_help(parser); - // population output (after helper) - // - // FIXME: theses objects are instanciated there in order to avoid a folder - // removing as edoFileSnapshot does within ctor. - edoPopStat< RealVec >* popStat = new edoPopStat; - state.storeFunctor(popStat); - pop_continue.add(*popStat); - - edoFileSnapshot* fileSnapshot = new edoFileSnapshot("EDA_ResPop"); - state.storeFunctor(fileSnapshot); - fileSnapshot->add(*popStat); - pop_continue.add(*fileSnapshot); - - // distribution output (after helper) - // edoDistribStat< Distrib >* distrib_stat = new edoStatNormalAdaptive< RealVec >(); - // state.storeFunctor(distrib_stat); - - // distribution_continue->add( *distrib_stat ); - - // eoMonitor* stdout_monitor = new eoStdoutMonitor(); - // state.storeFunctor(stdout_monitor); - // stdout_monitor->add(*distrib_stat); - // distribution_continue->add( *stdout_monitor ); - - eoFileMonitor* file_monitor = new eoFileMonitor("eda_distribution_bounds.txt"); - state.storeFunctor(file_monitor); - // file_monitor->add(*distrib_stat); - distribution_continue->add( *file_monitor ); - eoPopLoopEval popEval( eval ); // EDA algorithm configuration From 25f0ab782b07ed138dec497e8a3877388736f107 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 17:36:11 +0200 Subject: [PATCH 2028/2134] move rank mu selection in its own file --- eo/src/eo | 1 + eo/src/eoRankMuSelect.h | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 eo/src/eoRankMuSelect.h diff --git a/eo/src/eo b/eo/src/eo index 8cebd23a0..3a31daea4 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -102,6 +102,7 @@ #include // Embedding truncation selection #include +#include // the batch selection - from an eoSelectOne #include diff --git a/eo/src/eoRankMuSelect.h b/eo/src/eoRankMuSelect.h new file mode 100644 index 000000000..8c22f1241 --- /dev/null +++ b/eo/src/eoRankMuSelect.h @@ -0,0 +1,52 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2012 Thales group +*/ +/* +Authors: + Johann DrĂ©o +*/ + + +#ifndef _eoRankMuSelect_h +#define _eoRankMuSelect_h + +/** Selects the "Mu" bests individuals. + * + * Note: sorts the population before trucating it. + * + * @ingroup Selectors +*/ +template +class eoRankMuSelect : public eoDetSelect +{ +public : + // false, because mu is not a rate + eoRankMuSelect( unsigned int mu ) : eoDetSelect( mu, false ) {} + + void operator()(const eoPop& source, eoPop& dest) + { + eoPop tmp( source ); + tmp.sort(); + eoDetSelect::operator()( tmp, dest ); + } +}; + +#endif // !_eoRankMuselect_h From 782914395bb97d0880b09bf0238d27c72213c8f8 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 17:36:22 +0200 Subject: [PATCH 2029/2134] small typo --- eo/src/eoDetSelect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo/src/eoDetSelect.h b/eo/src/eoDetSelect.h index 4a0858b6a..c89f41f69 100644 --- a/eo/src/eoDetSelect.h +++ b/eo/src/eoDetSelect.h @@ -34,7 +34,7 @@ #include //----------------------------------------------------------------------------- -/** eoDetSelect selects many individuals determinisctically +/** eoDetSelect selects many individuals deterministically * * @ingroup Selectors */ From 251c5b94e63671bcdf41b5bc8c11de2088b4b41a Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 17:54:25 +0200 Subject: [PATCH 2030/2134] bugfix include missing header --- eo/src/eoRankMuSelect.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eoRankMuSelect.h b/eo/src/eoRankMuSelect.h index 8c22f1241..6e0a737ea 100644 --- a/eo/src/eoRankMuSelect.h +++ b/eo/src/eoRankMuSelect.h @@ -28,6 +28,8 @@ Authors: #ifndef _eoRankMuSelect_h #define _eoRankMuSelect_h +#include "eoDetSelect.h" + /** Selects the "Mu" bests individuals. * * Note: sorts the population before trucating it. From 948903ac1872dbba24d375910ae81ba3cf6a0949 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 18:11:16 +0200 Subject: [PATCH 2031/2134] bugfix: missing files for cmaes, renamed edoCMAES to AdaptiveAlgo for further refactorization --- edo/application/cmaes/main.cpp | 2 +- edo/src/edo | 2 +- edo/src/edoAdaptiveAlgo.h | 201 +++++++++++++++++++++++++++++++++ edo/src/edoEstimatorAdaptive.h | 55 +++++++++ 4 files changed, 258 insertions(+), 2 deletions(-) create mode 100644 edo/src/edoAdaptiveAlgo.h create mode 100644 edo/src/edoEstimatorAdaptive.h diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index 5572e2c83..b60348548 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -140,7 +140,7 @@ int main(int ac, char** av) eoPopLoopEval popEval( eval ); // EDA algorithm configuration - edoAlgo< Distrib >* algo = new edoCMAES< Distrib > + edoAlgo< Distrib >* algo = new edoAdaptiveAlgo< Distrib > (distribution, popEval, *selector, *estimator, *sampler, *replacor, pop_continue, *distribution_continue ); diff --git a/edo/src/edo b/edo/src/edo index d7506224d..c73dcb0c8 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -31,7 +31,7 @@ Authors: #include "edoAlgo.h" //#include "edoEDASA.h" #include "edoEDA.h" -#include "edoCMAES.h" +#include "edoAdaptiveAlgo.h" #include "edoDistrib.h" #include "edoUniform.h" diff --git a/edo/src/edoAdaptiveAlgo.h b/edo/src/edoAdaptiveAlgo.h new file mode 100644 index 000000000..03f349a9b --- /dev/null +++ b/edo/src/edoAdaptiveAlgo.h @@ -0,0 +1,201 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoAdaptiveAlgo_h +#define _edoAdaptiveAlgo_h + +#include + +#include + +#include "edoAlgo.h" +#include "edoEstimator.h" +#include "edoModifierMass.h" +#include "edoSampler.h" +#include "edoContinue.h" + +//! edoEDA< D > + +// FIXME factoriser edoAdaptiveAlgo et edoEDA, la seule diffĂ©rence est la rĂ©fĂ©rence _distrib ! +template < typename EOD > +class edoAdaptiveAlgo : public edoAlgo< EOD > +{ +public: + //! Alias for the type EOT + typedef typename EOD::EOType EOType; + + //! Alias for the atom type + typedef typename EOType::AtomType AtomType; + + //! Alias for the fitness + typedef typename EOType::Fitness Fitness; + +public: + + /*! + Takes algo operators, all are mandatory + + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + \param distribution_continuator Stopping criterion based on the distribution features + */ + edoAdaptiveAlgo( + EOD & distrib, + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, + edoEstimator< EOD > & estimator, + edoSampler< EOD > & sampler, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator, + edoContinue< EOD > & distribution_continuator + ) : + _distrib(distrib), + _evaluator(evaluator), + _selector(selector), + _estimator(estimator), + _sampler(sampler), + _replacor(replacor), + _pop_continuator(pop_continuator), + _dummy_continue(), + _distribution_continuator(distribution_continuator) + {} + + //! constructor without an edoContinue + /*! + Takes algo operators, all are mandatory + + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + */ + edoAdaptiveAlgo ( + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, + edoEstimator< EOD > & estimator, + edoSampler< EOD > & sampler, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator + ) : + _distrib( EOD() ), + _evaluator(evaluator), + _selector(selector), + _estimator(estimator), + _sampler(sampler), + _replacor(replacor), + _pop_continuator(pop_continuator), + _dummy_continue(), + _distribution_continuator( _dummy_continue ) + {} + + + + /** Covariance Matrix Adaptation Evolution Strategies + * + * \param pop the population of candidate solutions + * \return void + */ + void operator ()(eoPop< EOType > & pop) + { + assert(pop.size() > 0); + + eoPop< EOType > current_pop; + eoPop< EOType > selected_pop; + + // FIXME one must instanciate a first distrib here because there is no empty constructor, see if it is possible to instanciate Distributions without parameters + _distrib = _estimator(pop); + + // Evaluating a first time the candidate solutions + // The first pop is not supposed to be evaluated (@see eoPopLoopEval). + // _evaluator( current_pop, pop ); + + do { + // (1) Selection of the best points in the population + //selected_pop.clear(); // FIXME is it necessary to clear? + _selector(pop, selected_pop); + assert( selected_pop.size() > 0 ); + // TODO: utiliser selected_pop ou pop ??? + + // (2) Estimation of the distribution parameters + _distrib = _estimator(selected_pop); + + // (3) sampling + // The sampler produces feasible solutions (@see edoSampler that + // encapsulate an edoBounder) + current_pop.clear(); + for( unsigned int i = 0; i < pop.size(); ++i ) { + current_pop.push_back( _sampler(_distrib) ); + } + + // (4) Evaluate new solutions + _evaluator( pop, current_pop ); + + // (5) Replace old solutions by new ones + _replacor(pop, current_pop); // e.g. copy current_pop in pop + + } while( _distribution_continuator( _distrib ) && _pop_continuator( pop ) ); + } // operator() + + +protected: + + EOD & _distrib; + + //! A full evaluation function. + eoPopEvalFunc & _evaluator; + + //! A EOType selector + eoSelect & _selector; + + //! A EOType estimator. It is going to estimate distribution parameters. + edoEstimator & _estimator; + + //! A D sampler + edoSampler & _sampler; + + //! A EOType replacor + eoReplacement & _replacor; + + //! A EOType population continuator + eoContinue & _pop_continuator; + + //! A D continuator that always return true + edoDummyContinue _dummy_continue; + + //! A D continuator + edoContinue & _distribution_continuator; + +}; + +#endif // !_edoAdaptiveAlgo_h + diff --git a/edo/src/edoEstimatorAdaptive.h b/edo/src/edoEstimatorAdaptive.h new file mode 100644 index 000000000..a07f47d1f --- /dev/null +++ b/edo/src/edoEstimatorAdaptive.h @@ -0,0 +1,55 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoEstimatorAdaptive_h +#define _edoEstimatorAdaptive_h + +#include +#include + +#include "edoEstimator.h" + +/** An interface that explicits the needs for a permanent distribution + * that will be updated by operators. + */ +template < typename EOD > +class edoEstimatorAdaptive : public edoEstimator +{ +public: + typedef typename EOD::EOType EOType; + + edoEstimatorAdaptive( EOD& distrib ) : _distrib(distrib) {} + + // virtual D operator() ( eoPop< EOT >& )=0 (provided by eoUF< A1, R >) + + EOD & distribution() const { return _distrib; } + +protected: + EOD & _distrib; +}; + +#endif // !_edoEstimatorAdaptive_h From 0f73b7633aee8eae3ec08c509dd303639995e811 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 18:12:30 +0200 Subject: [PATCH 2032/2134] empty constructors for distributions, that defaults to 1 dimension --- edo/src/edoNormalAdaptive.h | 4 ++-- edo/src/edoNormalMulti.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/edo/src/edoNormalAdaptive.h b/edo/src/edoNormalAdaptive.h index 85db27b53..7c6e80a6c 100644 --- a/edo/src/edoNormalAdaptive.h +++ b/edo/src/edoNormalAdaptive.h @@ -44,7 +44,7 @@ public: typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; // column vectors ( n lines, 1 column) typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; - edoNormalAdaptive( unsigned int dim ) : + edoNormalAdaptive( unsigned int dim = 1 ) : _dim(dim), _mean( Vector::Zero(dim) ), _C( Matrix::Identity(dim,dim) ), @@ -57,7 +57,7 @@ public: assert( _dim > 0); } - edoNormalAdaptive( unsigned int dim, + edoNormalAdaptive( unsigned int dim, Vector mean, Matrix C, Matrix B, diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index db36810a0..2736cd45b 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -45,6 +45,15 @@ class edoNormalMulti : public edoDistrib< EOT > public: typedef typename EOT::AtomType AtomType; + edoNormalMulti( unsigned int dim = 1 ) : + _mean( const ublas::vector(0,dim) ), + _varcovar( const ublas::identity_matrix(dim) ) + { + assert(_mean.size() > 0); + assert(_mean.size() == _varcovar.size1()); + assert(_mean.size() == _varcovar.size2()); + } + edoNormalMulti ( const ublas::vector< AtomType >& mean, @@ -86,6 +95,15 @@ public: typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix; + edoNormalMulti( unsigned int dim = 1 ) : + _mean( Vector::Zero(dim) ), + _varcovar( Matrix::Identity(dim,dim) ) + { + assert(_mean.size() > 0); + assert(_mean.size() == _varcovar.size1()); + assert(_mean.size() == _varcovar.size2()); + } + edoNormalMulti( const Vector & mean, const Matrix & varcovar From 1317f3b25ae0d5ebba2a875b0722d9012dfa20ae Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 18:23:22 +0200 Subject: [PATCH 2033/2134] bugfix: bad assert api to eigen --- edo/src/edoNormalMulti.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edo/src/edoNormalMulti.h b/edo/src/edoNormalMulti.h index 2736cd45b..0c32fad7e 100644 --- a/edo/src/edoNormalMulti.h +++ b/edo/src/edoNormalMulti.h @@ -100,8 +100,8 @@ public: _varcovar( Matrix::Identity(dim,dim) ) { assert(_mean.size() > 0); - assert(_mean.size() == _varcovar.size1()); - assert(_mean.size() == _varcovar.size2()); + assert(_mean.innerSize() == _varcovar.innerSize()); + assert(_mean.innerSize() == _varcovar.outerSize()); } edoNormalMulti( From 5e31fa3020e1613e0fe63ec6d5be51302a6b6e71 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 18:24:04 +0200 Subject: [PATCH 2034/2134] factorize edoEDA into edoAdaptiveAlgo, use it for both EDA and CMAES applications --- edo/application/eda/main.cpp | 2 +- edo/src/edo | 1 - edo/src/edoAdaptiveAlgo.h | 72 ++++++++++++- edo/src/edoEDA.h | 195 ----------------------------------- 4 files changed, 72 insertions(+), 198 deletions(-) delete mode 100644 edo/src/edoEDA.h diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index 075057186..f6ce7b867 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -161,7 +161,7 @@ int main(int ac, char** av) eoPopLoopEval popEval( eval ); // EDA algorithm configuration - edoAlgo< Distrib >* algo = new edoEDA< Distrib > + edoAlgo< Distrib >* algo = new edoAdaptiveAlgo< Distrib > (popEval, *selector, *estimator, *sampler, *replacor, pop_continue, *distribution_continue ); diff --git a/edo/src/edo b/edo/src/edo index c73dcb0c8..70aff6eb0 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -30,7 +30,6 @@ Authors: #include "edoAlgo.h" //#include "edoEDASA.h" -#include "edoEDA.h" #include "edoAdaptiveAlgo.h" #include "edoDistrib.h" diff --git a/edo/src/edoAdaptiveAlgo.h b/edo/src/edoAdaptiveAlgo.h index 03f349a9b..2951a871f 100644 --- a/edo/src/edoAdaptiveAlgo.h +++ b/edo/src/edoAdaptiveAlgo.h @@ -77,6 +77,7 @@ public: eoContinue< EOType > & pop_continuator, edoContinue< EOD > & distribution_continuator ) : + _dummy_distrib(), _distrib(distrib), _evaluator(evaluator), _selector(selector), @@ -88,6 +89,39 @@ public: _distribution_continuator(distribution_continuator) {} + /*! + Without a distribution + + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + \param distribution_continuator Stopping criterion based on the distribution features + */ + edoAdaptiveAlgo( + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, + edoEstimator< EOD > & estimator, + edoSampler< EOD > & sampler, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator, + edoContinue< EOD > & distribution_continuator + ) : + _dummy_distrib(), + _distrib( _dummy_distrib ), + _evaluator(evaluator), + _selector(selector), + _estimator(estimator), + _sampler(sampler), + _replacor(replacor), + _pop_continuator(pop_continuator), + _dummy_continue(), + _distribution_continuator(distribution_continuator) + {} + + //! constructor without an edoContinue /*! Takes algo operators, all are mandatory @@ -99,6 +133,38 @@ public: \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features */ + edoAdaptiveAlgo ( + EOD & distrib, + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, + edoEstimator< EOD > & estimator, + edoSampler< EOD > & sampler, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator + ) : + _dummy_distrib(), + _distrib( distrib ), + _evaluator(evaluator), + _selector(selector), + _estimator(estimator), + _sampler(sampler), + _replacor(replacor), + _pop_continuator(pop_continuator), + _dummy_continue(), + _distribution_continuator( _dummy_continue ) + {} + + //! constructor without an edoContinue nor a distribution + /*! + Takes algo operators, all are mandatory + + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + */ edoAdaptiveAlgo ( eoPopEvalFunc < EOType > & evaluator, eoSelect< EOType > & selector, @@ -107,7 +173,8 @@ public: eoReplacement< EOType > & replacor, eoContinue< EOType > & pop_continuator ) : - _distrib( EOD() ), + _dummy_distrib(), + _distrib( _dummy_distrib ), _evaluator(evaluator), _selector(selector), _estimator(estimator), @@ -120,6 +187,7 @@ public: + /** Covariance Matrix Adaptation Evolution Strategies * * \param pop the population of candidate solutions @@ -169,6 +237,8 @@ public: protected: + EOD _dummy_distrib; + EOD & _distrib; //! A full evaluation function. diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h deleted file mode 100644 index 3e02ce64d..000000000 --- a/edo/src/edoEDA.h +++ /dev/null @@ -1,195 +0,0 @@ -/* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your -own estimation of distribution algorithms. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Copyright (C) 2010 Thales group -*/ -/* -Authors: - Johann DrĂ©o - Caner Candan -*/ - -#ifndef _edoEDA_h -#define _edoEDA_h - -#include -#include - -#include - -#include "edoAlgo.h" -#include "edoEstimator.h" -#include "edoModifierMass.h" -#include "edoSampler.h" -#include "edoContinue.h" - -//! edoEDA< D > - -template < typename D > -class edoEDA : public edoAlgo< D > -{ -public: - //! Alias for the type EOT - typedef typename D::EOType EOType; - - //! Alias for the atom type - typedef typename EOType::AtomType AtomType; - - //! Alias for the fitness - typedef typename EOType::Fitness Fitness; - -public: - - //! edoEDA constructor - /*! - Takes algo operators, all are mandatory - - \param evaluation Evaluate a population - \param selector Selection of the best candidate solutions in the population - \param estimator Estimation of the distribution parameters - \param sampler Generate feasible solutions using the distribution - \param replacor Replace old solutions by new ones - \param pop_continuator Stopping criterion based on the population features - \param distribution_continuator Stopping criterion based on the distribution features - */ - edoEDA ( - eoPopEvalFunc < EOType > & evaluator, - eoSelect< EOType > & selector, - edoEstimator< D > & estimator, - edoSampler< D > & sampler, - eoReplacement< EOType > & replacor, - eoContinue< EOType > & pop_continuator, - edoContinue< D > & distribution_continuator - ) : - _evaluator(evaluator), - _selector(selector), - _estimator(estimator), - _sampler(sampler), - _replacor(replacor), - _pop_continuator(pop_continuator), - _dummy_continue(), - _distribution_continuator(distribution_continuator) - {} - - //! edoEDA constructor without an edoContinue - /*! - Takes algo operators, all are mandatory - - \param evaluation Evaluate a population - \param selector Selection of the best candidate solutions in the population - \param estimator Estimation of the distribution parameters - \param sampler Generate feasible solutions using the distribution - \param replacor Replace old solutions by new ones - \param pop_continuator Stopping criterion based on the population features - */ - edoEDA ( - eoPopEvalFunc < EOType > & evaluator, - eoSelect< EOType > & selector, - edoEstimator< D > & estimator, - edoSampler< D > & sampler, - eoReplacement< EOType > & replacor, - eoContinue< EOType > & pop_continuator - ) : - _evaluator(evaluator), - _selector(selector), - _estimator(estimator), - _sampler(sampler), - _replacor(replacor), - _pop_continuator(pop_continuator), - _dummy_continue(), - _distribution_continuator( _dummy_continue ) - {} - - - /** A basic EDA algorithm that iterates over: - * selection, estimation, sampling, bounding, evaluation, replacement - * - * \param pop the population of candidate solutions - * \return void - */ - void operator ()(eoPop< EOType > & pop) - { - assert(pop.size() > 0); - - eoPop< EOType > current_pop; - eoPop< EOType > selected_pop; - - // FIXME one must instanciate a first distrib here because there is no empty constructor, see if it is possible to instanciate Distributions without parameters - D distrib = _estimator(pop); - - // Evaluating a first time the candidate solutions - // The first pop is not supposed to be evaluated (@see eoPopLoopEval). - _evaluator( current_pop, pop ); - - do { - // (1) Selection of the best points in the population - //selected_pop.clear(); // FIXME is it necessary to clear? - _selector(pop, selected_pop); - assert( selected_pop.size() > 0 ); - // TODO: utiliser selected_pop ou pop ??? - - // (2) Estimation of the distribution parameters - distrib = _estimator(selected_pop); - - // (3) sampling - // The sampler produces feasible solutions (@see edoSampler that - // encapsulate an edoBounder) - current_pop.clear(); - for( unsigned int i = 0; i < pop.size(); ++i ) { - current_pop.push_back( _sampler(distrib) ); - } - - // (4) Evaluate new solutions - _evaluator( pop, current_pop ); - - // (5) Replace old solutions by new ones - _replacor(pop, current_pop); // e.g. copy current_pop in pop - - } while( _distribution_continuator( distrib ) && _pop_continuator( pop ) ); - } // operator() - -private: - - //! A full evaluation function. - eoPopEvalFunc < EOType > & _evaluator; - - //! A EOType selector - eoSelect < EOType > & _selector; - - //! A EOType estimator. It is going to estimate distribution parameters. - edoEstimator< D > & _estimator; - - //! A D sampler - edoSampler< D > & _sampler; - - //! A EOType replacor - eoReplacement < EOType > & _replacor; - - //! A EOType population continuator - eoContinue < EOType > & _pop_continuator; - - //! A D continuator that always return true - edoDummyContinue _dummy_continue; - - //! A D continuator - edoContinue < D > & _distribution_continuator; - -}; - -#endif // !_edoEDA_h From ae1d88f530cd98a0623012ce9b362ba1b947f975 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Tue, 17 Jul 2012 18:35:46 +0200 Subject: [PATCH 2035/2134] remove FIXMEs and write more comments --- edo/src/edoAdaptiveAlgo.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/edo/src/edoAdaptiveAlgo.h b/edo/src/edoAdaptiveAlgo.h index 2951a871f..c77039625 100644 --- a/edo/src/edoAdaptiveAlgo.h +++ b/edo/src/edoAdaptiveAlgo.h @@ -40,7 +40,8 @@ Authors: //! edoEDA< D > -// FIXME factoriser edoAdaptiveAlgo et edoEDA, la seule diffĂ©rence est la rĂ©fĂ©rence _distrib ! +/** A generic stochastic search template for algorithms that need a distribution parameter. + */ template < typename EOD > class edoAdaptiveAlgo : public edoAlgo< EOD > { @@ -59,6 +60,7 @@ public: /*! Takes algo operators, all are mandatory + \param distrib A distribution to use, if you want to update this parameter (e.gMA-ES) instead of replacing it (e.g. an EDA) \param evaluation Evaluate a population \param selector Selection of the best candidate solutions in the population \param estimator Estimation of the distribution parameters @@ -126,6 +128,7 @@ public: /*! Takes algo operators, all are mandatory + \param distrib A distribution to use, if you want to update this parameter (e.gMA-ES) instead of replacing it (e.g. an EDA) \param evaluation Evaluate a population \param selector Selection of the best candidate solutions in the population \param estimator Estimation of the distribution parameters @@ -156,8 +159,6 @@ public: //! constructor without an edoContinue nor a distribution /*! - Takes algo operators, all are mandatory - \param evaluation Evaluate a population \param selector Selection of the best candidate solutions in the population \param estimator Estimation of the distribution parameters @@ -186,9 +187,7 @@ public: {} - - - /** Covariance Matrix Adaptation Evolution Strategies + /** Call the algorithm * * \param pop the population of candidate solutions * \return void @@ -200,7 +199,8 @@ public: eoPop< EOType > current_pop; eoPop< EOType > selected_pop; - // FIXME one must instanciate a first distrib here because there is no empty constructor, see if it is possible to instanciate Distributions without parameters + // update the extern distribution passed to the estimator (cf. CMA-ES) + // OR replace the dummy distribution for estimators that do not need extern distributions (cf. EDA) _distrib = _estimator(pop); // Evaluating a first time the candidate solutions @@ -209,10 +209,8 @@ public: do { // (1) Selection of the best points in the population - //selected_pop.clear(); // FIXME is it necessary to clear? _selector(pop, selected_pop); assert( selected_pop.size() > 0 ); - // TODO: utiliser selected_pop ou pop ??? // (2) Estimation of the distribution parameters _distrib = _estimator(selected_pop); @@ -237,8 +235,14 @@ public: protected: + /** A dummy distribution, for algorithms willing to replace it instead of updating + * + * Thus we can instanciate _distrib on this and replace it at the first iteration with an estimator. + * This is why an edoDistrib must have an empty constructor. + */ EOD _dummy_distrib; + //! The distribution that you want to update EOD & _distrib; //! A full evaluation function. From 8120116c1b85bb7cad4fb2807ea9455b67367b0a Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 18 Jul 2012 10:41:17 +0200 Subject: [PATCH 2036/2134] Factorize algorithms code in a hierarchy of classes CMAES-like algorithm (edoAlgoAdaptive) main loop work on an extern distribution passed as a reference, which is updated at each iteration EDA-like algorithm (edoAlgoStateless) work on an intern distribution, that is replaced at each iteration edoAlgoStateless inherits from edoAlgoAdaptive, and embed a default member on which the work is done. --- edo/application/cmaes/main.cpp | 2 +- edo/application/eda/main.cpp | 2 +- edo/src/edo | 3 +- .../{edoAdaptiveAlgo.h => edoAlgoAdaptive.h} | 83 +----------- edo/src/edoAlgoStateless.h | 126 ++++++++++++++++++ 5 files changed, 136 insertions(+), 80 deletions(-) rename edo/src/{edoAdaptiveAlgo.h => edoAlgoAdaptive.h} (69%) create mode 100644 edo/src/edoAlgoStateless.h diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index b60348548..4da2fdbed 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -140,7 +140,7 @@ int main(int ac, char** av) eoPopLoopEval popEval( eval ); // EDA algorithm configuration - edoAlgo< Distrib >* algo = new edoAdaptiveAlgo< Distrib > + edoAlgo< Distrib >* algo = new edoAlgoAdaptive< Distrib > (distribution, popEval, *selector, *estimator, *sampler, *replacor, pop_continue, *distribution_continue ); diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index f6ce7b867..6e024545b 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -161,7 +161,7 @@ int main(int ac, char** av) eoPopLoopEval popEval( eval ); // EDA algorithm configuration - edoAlgo< Distrib >* algo = new edoAdaptiveAlgo< Distrib > + edoAlgo< Distrib >* algo = new edoAlgoStateless< Distrib > (popEval, *selector, *estimator, *sampler, *replacor, pop_continue, *distribution_continue ); diff --git a/edo/src/edo b/edo/src/edo index 70aff6eb0..0da9ed9d4 100644 --- a/edo/src/edo +++ b/edo/src/edo @@ -30,7 +30,8 @@ Authors: #include "edoAlgo.h" //#include "edoEDASA.h" -#include "edoAdaptiveAlgo.h" +#include "edoAlgoAdaptive.h" +#include "edoAlgoStateless.h" #include "edoDistrib.h" #include "edoUniform.h" diff --git a/edo/src/edoAdaptiveAlgo.h b/edo/src/edoAlgoAdaptive.h similarity index 69% rename from edo/src/edoAdaptiveAlgo.h rename to edo/src/edoAlgoAdaptive.h index c77039625..dbb8046fc 100644 --- a/edo/src/edoAdaptiveAlgo.h +++ b/edo/src/edoAlgoAdaptive.h @@ -25,8 +25,8 @@ Authors: Pierre SavĂ©ant */ -#ifndef _edoAdaptiveAlgo_h -#define _edoAdaptiveAlgo_h +#ifndef _edoAlgoAdaptive_h +#define _edoAlgoAdaptive_h #include @@ -43,7 +43,7 @@ Authors: /** A generic stochastic search template for algorithms that need a distribution parameter. */ template < typename EOD > -class edoAdaptiveAlgo : public edoAlgo< EOD > +class edoAlgoAdaptive : public edoAlgo< EOD > { public: //! Alias for the type EOT @@ -69,7 +69,7 @@ public: \param pop_continuator Stopping criterion based on the population features \param distribution_continuator Stopping criterion based on the distribution features */ - edoAdaptiveAlgo( + edoAlgoAdaptive( EOD & distrib, eoPopEvalFunc < EOType > & evaluator, eoSelect< EOType > & selector, @@ -79,7 +79,6 @@ public: eoContinue< EOType > & pop_continuator, edoContinue< EOD > & distribution_continuator ) : - _dummy_distrib(), _distrib(distrib), _evaluator(evaluator), _selector(selector), @@ -91,38 +90,6 @@ public: _distribution_continuator(distribution_continuator) {} - /*! - Without a distribution - - \param evaluation Evaluate a population - \param selector Selection of the best candidate solutions in the population - \param estimator Estimation of the distribution parameters - \param sampler Generate feasible solutions using the distribution - \param replacor Replace old solutions by new ones - \param pop_continuator Stopping criterion based on the population features - \param distribution_continuator Stopping criterion based on the distribution features - */ - edoAdaptiveAlgo( - eoPopEvalFunc < EOType > & evaluator, - eoSelect< EOType > & selector, - edoEstimator< EOD > & estimator, - edoSampler< EOD > & sampler, - eoReplacement< EOType > & replacor, - eoContinue< EOType > & pop_continuator, - edoContinue< EOD > & distribution_continuator - ) : - _dummy_distrib(), - _distrib( _dummy_distrib ), - _evaluator(evaluator), - _selector(selector), - _estimator(estimator), - _sampler(sampler), - _replacor(replacor), - _pop_continuator(pop_continuator), - _dummy_continue(), - _distribution_continuator(distribution_continuator) - {} - //! constructor without an edoContinue /*! @@ -136,7 +103,7 @@ public: \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features */ - edoAdaptiveAlgo ( + edoAlgoAdaptive ( EOD & distrib, eoPopEvalFunc < EOType > & evaluator, eoSelect< EOType > & selector, @@ -145,7 +112,6 @@ public: eoReplacement< EOType > & replacor, eoContinue< EOType > & pop_continuator ) : - _dummy_distrib(), _distrib( distrib ), _evaluator(evaluator), _selector(selector), @@ -157,36 +123,6 @@ public: _distribution_continuator( _dummy_continue ) {} - //! constructor without an edoContinue nor a distribution - /*! - \param evaluation Evaluate a population - \param selector Selection of the best candidate solutions in the population - \param estimator Estimation of the distribution parameters - \param sampler Generate feasible solutions using the distribution - \param replacor Replace old solutions by new ones - \param pop_continuator Stopping criterion based on the population features - */ - edoAdaptiveAlgo ( - eoPopEvalFunc < EOType > & evaluator, - eoSelect< EOType > & selector, - edoEstimator< EOD > & estimator, - edoSampler< EOD > & sampler, - eoReplacement< EOType > & replacor, - eoContinue< EOType > & pop_continuator - ) : - _dummy_distrib(), - _distrib( _dummy_distrib ), - _evaluator(evaluator), - _selector(selector), - _estimator(estimator), - _sampler(sampler), - _replacor(replacor), - _pop_continuator(pop_continuator), - _dummy_continue(), - _distribution_continuator( _dummy_continue ) - {} - - /** Call the algorithm * * \param pop the population of candidate solutions @@ -235,13 +171,6 @@ public: protected: - /** A dummy distribution, for algorithms willing to replace it instead of updating - * - * Thus we can instanciate _distrib on this and replace it at the first iteration with an estimator. - * This is why an edoDistrib must have an empty constructor. - */ - EOD _dummy_distrib; - //! The distribution that you want to update EOD & _distrib; @@ -271,5 +200,5 @@ protected: }; -#endif // !_edoAdaptiveAlgo_h +#endif // !_edoAlgoAdaptive_h diff --git a/edo/src/edoAlgoStateless.h b/edo/src/edoAlgoStateless.h new file mode 100644 index 000000000..c2d4834d6 --- /dev/null +++ b/edo/src/edoAlgoStateless.h @@ -0,0 +1,126 @@ +/* +The Evolving Distribution Objects framework (EDO) is a template-based, +ANSI-C++ evolutionary computation library which helps you to write your +own estimation of distribution algorithms. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright (C) 2010 Thales group +*/ +/* +Authors: + Johann DrĂ©o + Pierre SavĂ©ant +*/ + +#ifndef _edoAlgoStateless_h +#define _edoAlgoStateless_h + +#include "edoAlgoAdaptive.h" + +//! edoEDA< D > + +/** A generic stochastic search template for algorithms that need a distribution parameter. + */ +template < typename EOD > +class edoAlgoStateless : public edoAlgoAdaptive< EOD > +{ +public: + //! Alias for the type EOT + typedef typename EOD::EOType EOType; + + //! Alias for the atom type + typedef typename EOType::AtomType AtomType; + + //! Alias for the fitness + typedef typename EOType::Fitness Fitness; + +public: + + + /*! + Without a distribution + + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + \param distribution_continuator Stopping criterion based on the distribution features + */ + edoAlgoStateless( + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, + edoEstimator< EOD > & estimator, + edoSampler< EOD > & sampler, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator, + edoContinue< EOD > & distribution_continuator, + EOD* tmp_distrib = (new EOD()) + ) : + edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator), + _tmp_distrib( tmp_distrib ), + _dummy_distrib() + { + this->_distrib = _dummy_distrib; + } + + //! constructor without an edoContinue nor a distribution + /*! + \param evaluation Evaluate a population + \param selector Selection of the best candidate solutions in the population + \param estimator Estimation of the distribution parameters + \param sampler Generate feasible solutions using the distribution + \param replacor Replace old solutions by new ones + \param pop_continuator Stopping criterion based on the population features + */ + edoAlgoStateless ( + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, + edoEstimator< EOD > & estimator, + edoSampler< EOD > & sampler, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator, + EOD* tmp_distrib = (new EOD()) + ) : + edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator), + _tmp_distrib( tmp_distrib ), + _dummy_distrib() + { + this->_distrib = _dummy_distrib; + } + + ~edoAlgoStateless() + { + delete _tmp_distrib; + } + + +protected: + + EOD* _tmp_distrib; + + /** A dummy distribution, for algorithms willing to replace it instead of updating + * + * Thus we can instanciate _distrib on this and replace it at the first iteration with an estimator. + * This is why an edoDistrib must have an empty constructor. + */ + EOD _dummy_distrib; + +}; + +#endif // !_edoAlgoStateless_h + From 388358bc5c35f0ab3d7c9c22a729a07e8819f1ca Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 18 Jul 2012 11:43:59 +0200 Subject: [PATCH 2037/2134] get rid of the useless temporary members and directly delete the adress of the referenced distrib --- edo/src/edoAlgoStateless.h | 53 +++++++++++++------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/edo/src/edoAlgoStateless.h b/edo/src/edoAlgoStateless.h index c2d4834d6..45bcea06f 100644 --- a/edo/src/edoAlgoStateless.h +++ b/edo/src/edoAlgoStateless.h @@ -30,9 +30,11 @@ Authors: #include "edoAlgoAdaptive.h" -//! edoEDA< D > - -/** A generic stochastic search template for algorithms that need a distribution parameter. +/** A generic stochastic search template for algorithms that need a distribution parameter but replace it rather than update it + * + * This use a default dummy distribution, for algorithms willing to replace it instead of updating + * Thus we can instanciate _distrib on this and replace it at the first iteration with an estimator. + * This is why an edoDistrib must have an empty constructor. */ template < typename EOD > class edoAlgoStateless : public edoAlgoAdaptive< EOD > @@ -49,10 +51,7 @@ public: public: - - /*! - Without a distribution - + /** Full constructor \param evaluation Evaluate a population \param selector Selection of the best candidate solutions in the population \param estimator Estimation of the distribution parameters @@ -60,6 +59,8 @@ public: \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features \param distribution_continuator Stopping criterion based on the distribution features + + You are not supposed to override the tmp_distrib default initalization, or else use edoAlgoAdaptive */ edoAlgoStateless( eoPopEvalFunc < EOType > & evaluator, @@ -71,21 +72,19 @@ public: edoContinue< EOD > & distribution_continuator, EOD* tmp_distrib = (new EOD()) ) : - edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator), - _tmp_distrib( tmp_distrib ), - _dummy_distrib() - { - this->_distrib = _dummy_distrib; - } + edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator) + {} + + /** Constructor without an edoContinue - //! constructor without an edoContinue nor a distribution - /*! \param evaluation Evaluate a population \param selector Selection of the best candidate solutions in the population \param estimator Estimation of the distribution parameters \param sampler Generate feasible solutions using the distribution \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features + + You are not supposed to override the tmp_distrib default initalization, or else use edoAlgoAdaptive */ edoAlgoStateless ( eoPopEvalFunc < EOType > & evaluator, @@ -96,30 +95,14 @@ public: eoContinue< EOType > & pop_continuator, EOD* tmp_distrib = (new EOD()) ) : - edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator), - _tmp_distrib( tmp_distrib ), - _dummy_distrib() - { - this->_distrib = _dummy_distrib; - } + edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator) + {} ~edoAlgoStateless() { - delete _tmp_distrib; + // delete the temporary distrib allocated in constructors + delete &(this->_distrib); } - - -protected: - - EOD* _tmp_distrib; - - /** A dummy distribution, for algorithms willing to replace it instead of updating - * - * Thus we can instanciate _distrib on this and replace it at the first iteration with an estimator. - * This is why an edoDistrib must have an empty constructor. - */ - EOD _dummy_distrib; - }; #endif // !_edoAlgoStateless_h From 7a47fd55b9aa68b33557bcc6c9f323cf0cafa1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Sav=C3=A9ant?= Date: Wed, 18 Jul 2012 11:50:29 +0200 Subject: [PATCH 2038/2134] remove mo package dependency --- edo/CMakeLists.txt | 2 +- edo/application/cmaes/main.cpp | 2 +- edo/build_gcc_linux_release | 3 ++- edo/src/edoEDA.h | 2 +- edo/src/edoEDASA.h | 2 +- edo/src/utils/edoStatNormalMulti.h | 2 +- edo/test/t-edoEstimatorNormalMulti.cpp | 2 +- edo/test/t-mean-distance.cpp | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 9a07cd619..3cb182b3d 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -125,7 +125,7 @@ SET(SAMPLE_SRCS) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(application) -ADD_SUBDIRECTORY(test) +#ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(doc) ###################################################################################### diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index 18c3f093f..d1f35941c 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -26,7 +26,7 @@ Authors: */ #include -#include +//#include #include diff --git a/edo/build_gcc_linux_release b/edo/build_gcc_linux_release index fb220d044..cf311d461 100755 --- a/edo/build_gcc_linux_release +++ b/edo/build_gcc_linux_release @@ -2,6 +2,7 @@ mkdir -p release cd release -cmake .. +#cmake -DWITH_EIGEN=1 .. +cmake -DWITH_BOOST=1 .. make cd .. diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index f94e828f5..c0c75be23 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -29,7 +29,7 @@ Authors: #define _edoEDA_h #include -#include +//#include #include diff --git a/edo/src/edoEDASA.h b/edo/src/edoEDASA.h index b2f0fe708..27ae80620 100644 --- a/edo/src/edoEDASA.h +++ b/edo/src/edoEDASA.h @@ -29,7 +29,7 @@ Authors: #define _edoEDASA_h #include -#include +//#include #include diff --git a/edo/src/utils/edoStatNormalMulti.h b/edo/src/utils/edoStatNormalMulti.h index bc5066ac7..d46e97ef5 100644 --- a/edo/src/utils/edoStatNormalMulti.h +++ b/edo/src/utils/edoStatNormalMulti.h @@ -50,7 +50,7 @@ template < typename EOT > class edoStatNormalMulti : public edoDistribStat< edoNormalMulti< EOT > > { public: - typedef typename EOT::AtomType AtomType; + // typedef typename EOT::AtomType AtomType; using edoDistribStat< edoNormalMulti< EOT > >::value; diff --git a/edo/test/t-edoEstimatorNormalMulti.cpp b/edo/test/t-edoEstimatorNormalMulti.cpp index 114f8fa17..5c47f5cf5 100644 --- a/edo/test/t-edoEstimatorNormalMulti.cpp +++ b/edo/test/t-edoEstimatorNormalMulti.cpp @@ -29,7 +29,7 @@ Authors: #include #include -#include +//#include #include diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index ae6de0eb3..4e184f5a8 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -33,7 +33,7 @@ Authors: #include #include -#include +//#include #include From f5afa694bcc3a5838e6e07e56cb326cc4ba16fd4 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 18 Jul 2012 13:41:43 +0200 Subject: [PATCH 2039/2134] basic comments for adaptive normal operators --- edo/src/edoEstimatorNormalAdaptive.h | 5 +++-- edo/src/edoNormalAdaptive.h | 14 ++++++++++++-- edo/src/edoSamplerNormalAdaptive.h | 8 ++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/edo/src/edoEstimatorNormalAdaptive.h b/edo/src/edoEstimatorNormalAdaptive.h index a2566772b..cda466a4e 100644 --- a/edo/src/edoEstimatorNormalAdaptive.h +++ b/edo/src/edoEstimatorNormalAdaptive.h @@ -38,8 +38,9 @@ Authors: #include "edoNormalAdaptive.h" #include "edoEstimatorAdaptive.h" - -//! edoEstimatorNormalMulti< EOT > +/** An estimator that works on adaptive normal distributions, basically the heart of the CMA-ES algorithm. + * + */ template< typename EOT, typename EOD = edoNormalAdaptive > class edoEstimatorNormalAdaptive : public edoEstimatorAdaptive< EOD > { diff --git a/edo/src/edoNormalAdaptive.h b/edo/src/edoNormalAdaptive.h index 7c6e80a6c..17ffb8c2b 100644 --- a/edo/src/edoNormalAdaptive.h +++ b/edo/src/edoNormalAdaptive.h @@ -35,6 +35,16 @@ Authors: #include +/** A normal distribution that can be updated via several components. This is the data structure on which works the CMA-ES + * algorithm. + * + * This is *just* a data structure, the operators working on it are supposed to maintain its consistency (e.g. of the + * covariance matrix against its eigen vectors). + * + * The distribution is defined by its mean, its covariance matrix (which can be decomposed in its eigen vectors and + * values), a scaling factor (sigma) and the so-called evolution paths for the covariance and sigma. + * evolution paths. + */ template < typename EOT > class edoNormalAdaptive : public edoDistrib< EOT > { @@ -107,11 +117,11 @@ public: private: unsigned int _dim; - Vector _mean; // + Vector _mean; // mean vector Matrix _C; // covariance matrix Matrix _B; // eigen vectors / coordinates system Vector _D; // eigen values / scaling - double _sigma; // + double _sigma; // absolute scaling of the distribution Vector _p_c; // evolution path for C Vector _p_s; // evolution path for sigma }; diff --git a/edo/src/edoSamplerNormalAdaptive.h b/edo/src/edoSamplerNormalAdaptive.h index e8188105a..39e33a78d 100644 --- a/edo/src/edoSamplerNormalAdaptive.h +++ b/edo/src/edoSamplerNormalAdaptive.h @@ -33,12 +33,8 @@ Authors: #include -/** Sample points in a multi-normal law defined by a mean vector and a covariance matrix. - * - * Given M the mean vector and V the covariance matrix, of order n: - * - draw a vector T in N(0,I) (i.e. each value is drawn in a normal law with mean=0 an stddev=1) - * - compute the Cholesky decomposition L of V (i.e. such as V=LL*) - * - return X = M + LT +/** Sample points in a multi-normal law defined by a mean vector, a covariance matrix, a sigma scale factor and + * evolution paths. This is a step of the CMA-ES algorithm. */ #ifdef WITH_EIGEN From 8285d78245a83b61f46fe32797751dc0a2cd43e6 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 18 Jul 2012 13:57:13 +0200 Subject: [PATCH 2040/2134] Added comments in wrapper of t-mpi-eval. --- eo/test/mpi/t-mpi-eval.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/eo/test/mpi/t-mpi-eval.cpp b/eo/test/mpi/t-mpi-eval.cpp index e5678104c..be3c2d96a 100644 --- a/eo/test/mpi/t-mpi-eval.cpp +++ b/eo/test/mpi/t-mpi-eval.cpp @@ -120,15 +120,30 @@ struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply best.fitness( 1000000000. ); } + /* + our structure inherits the member _wrapped from HandleResponseFunction, + which is a HandleResponseFunction pointer; + + it inherits also the member _d (like Data), which is a pointer to the + ParallelApplyData used in the HandleResponseParallelApply<EOT>. Details + of this data are contained in the file eoParallelApply. We need just to know that + it contains a member assignedTasks which maps a worker rank and the sent slice + to be processed by the worker, and a reference to the processed table via the + call of the data() function. + */ + // if EOT were a template, we would have to do: (thank you C++ :) // using eo::mpi::HandleResponseParallelApply::_wrapped; // using eo::mpi::HandleResponseParallelApply::d; void operator()(int wrkRank) { + // Retrieve informations about the slice processed by the worker int index = d->assignedTasks[wrkRank].index; int size = d->assignedTasks[wrkRank].size; - (*_wrapped)( wrkRank ); // call to the wrapped function HERE + // call to the wrapped function HERE + (*_wrapped)( wrkRank ); + // Compare fitnesses of evaluated individuals with the best saved for(int i = index; i < index+size; ++i) { if( best.fitness() < d->data()[ i ].fitness() ) @@ -147,6 +162,7 @@ struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply int main(int ac, char** av) { eo::mpi::Node::init( ac, av ); + // eo::log << eo::setlevel( eo::debug ); eo::log << eo::setlevel( eo::quiet ); eoParser parser(ac, av); @@ -179,10 +195,15 @@ int main(int ac, char** av) eo::log << "Size of population : " << popSize << std::endl; + /* eo::mpi::ParallelApplyStore< EOT > store( eval, eo::mpi::DEFAULT_MASTER ); store.wrapHandleResponse( new CatBestAnswers ); eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, &store ); + */ + + eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, eval, 5 ); + eo::log << eo::quiet << "Before first evaluation." << std::endl; popEval( pop, pop ); eo::log << eo::quiet << "After first evaluation." << std::endl; From b4da9edf40293b2fcfaefd09576070b72f3b1ecc Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 18 Jul 2012 14:01:49 +0200 Subject: [PATCH 2041/2134] do not use a temporary default distrib in stateless algorithm, instanciate within base class constructor --- edo/src/edoAlgoStateless.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/edo/src/edoAlgoStateless.h b/edo/src/edoAlgoStateless.h index 45bcea06f..395337da1 100644 --- a/edo/src/edoAlgoStateless.h +++ b/edo/src/edoAlgoStateless.h @@ -59,8 +59,6 @@ public: \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features \param distribution_continuator Stopping criterion based on the distribution features - - You are not supposed to override the tmp_distrib default initalization, or else use edoAlgoAdaptive */ edoAlgoStateless( eoPopEvalFunc < EOType > & evaluator, @@ -69,10 +67,9 @@ public: edoSampler< EOD > & sampler, eoReplacement< EOType > & replacor, eoContinue< EOType > & pop_continuator, - edoContinue< EOD > & distribution_continuator, - EOD* tmp_distrib = (new EOD()) + edoContinue< EOD > & distribution_continuator ) : - edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator) + edoAlgoAdaptive( *(new EOD), evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator) {} /** Constructor without an edoContinue @@ -83,8 +80,6 @@ public: \param sampler Generate feasible solutions using the distribution \param replacor Replace old solutions by new ones \param pop_continuator Stopping criterion based on the population features - - You are not supposed to override the tmp_distrib default initalization, or else use edoAlgoAdaptive */ edoAlgoStateless ( eoPopEvalFunc < EOType > & evaluator, @@ -92,10 +87,9 @@ public: edoEstimator< EOD > & estimator, edoSampler< EOD > & sampler, eoReplacement< EOType > & replacor, - eoContinue< EOType > & pop_continuator, - EOD* tmp_distrib = (new EOD()) + eoContinue< EOType > & pop_continuator ) : - edoAlgoAdaptive( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator) + edoAlgoAdaptive( *(new EOD), evaluator, selector, estimator, sampler, replacor, pop_continuator) {} ~edoAlgoStateless() From 766a8f40d6a416f7016f22633daa03ed5481ace9 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 18 Jul 2012 14:02:39 +0200 Subject: [PATCH 2042/2134] Solved memory leak on terminate job ctor --- eo/src/mpi/eoMpi.h | 22 ++++++++++++---------- eo/src/mpi/eoTerminateJob.h | 3 ++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/eo/src/mpi/eoMpi.h b/eo/src/mpi/eoMpi.h index cf5cbeb54..abb5fa6f5 100644 --- a/eo/src/mpi/eoMpi.h +++ b/eo/src/mpi/eoMpi.h @@ -539,7 +539,7 @@ namespace eo * AssignmentAlgorithm for more details. * * @param _masterRank The MPI rank of the master. - * + * * @param _workerStopCondition Number of the message which will cause the workers to terminate. It could * be one of the constants defined in eo::mpi::Commands, or any other integer. The user has to be sure * that a message containing this integer will be sent to each worker on the Commands channel, otherwise @@ -552,24 +552,25 @@ namespace eo Job( AssignmentAlgorithm& _algo, int _masterRank, int _workerStopCondition, - JobStore & store + JobStore & _store ) : assignmentAlgo( _algo ), masterRank( _masterRank ), workerStopCondition( _workerStopCondition ), comm( Node::comm() ), // Functors - sendTask( store.sendTask() ), - handleResponse( store.handleResponse() ), - processTask( store.processTask() ), - isFinished( store.isFinished() ) + store( _store ), + sendTask( _store.sendTask() ), + handleResponse( _store.handleResponse() ), + processTask( _store.processTask() ), + isFinished( _store.isFinished() ) { _isMaster = Node::comm().rank() == _masterRank; - sendTask.data( store.data() ); - handleResponse.data( store.data() ); - processTask.data( store.data() ); - isFinished.data( store.data() ); + sendTask.data( _store.data() ); + handleResponse.data( _store.data() ); + processTask.data( _store.data() ); + isFinished.data( _store.data() ); } protected: @@ -764,6 +765,7 @@ namespace eo const int workerStopCondition; bmpi::communicator& comm; + JobStore& store; SendTaskFunction & sendTask; HandleResponseFunction & handleResponse; ProcessTaskFunction & processTask; diff --git a/eo/src/mpi/eoTerminateJob.h b/eo/src/mpi/eoTerminateJob.h index e0b4a5bd3..fe231f0e3 100644 --- a/eo/src/mpi/eoTerminateJob.h +++ b/eo/src/mpi/eoTerminateJob.h @@ -115,7 +115,7 @@ namespace eo */ EmptyJob( AssignmentAlgorithm& algo, int masterRank ) : OneShotJob( algo, masterRank, *(new DummyJobStore) ) - // FIXME memory leak, meaningless but present + // the job store is deleted on destructor { // empty } @@ -127,6 +127,7 @@ namespace eo { comm.send( idles[i], Channel::Commands, Message::Kill ); } + delete & this->store; } }; From 4ae75cdef2b5083da9af1e9c4da6df148f7b58e9 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 18 Jul 2012 17:12:48 +0200 Subject: [PATCH 2043/2134] Adding presentation of Parallelization in EO, dated from July, 18th to tutorial section. --- eo/tutorial/Parallelization/css/deck.core.css | 405 ++++++++++++++ eo/tutorial/Parallelization/css/deck.goto.css | 41 ++ eo/tutorial/Parallelization/css/deck.hash.css | 13 + eo/tutorial/Parallelization/css/deck.menu.css | 47 ++ .../Parallelization/css/deck.navigation.css | 43 ++ .../Parallelization/css/deck.scale.css | 28 + .../Parallelization/css/deck.status.css | 18 + eo/tutorial/Parallelization/css/eompi.css | 9 + .../Parallelization/css/horizontal-slide.css | 76 +++ eo/tutorial/Parallelization/css/shjs.css | 67 +++ eo/tutorial/Parallelization/css/thales.css | 91 ++++ .../Parallelization/img/generic_parallel.dia | Bin 0 -> 2476 bytes .../Parallelization/img/generic_parallel.png | Bin 0 -> 29522 bytes .../Parallelization/img/serialisation.dia | Bin 0 -> 1528 bytes .../Parallelization/img/serialisation.png | Bin 0 -> 10806 bytes eo/tutorial/Parallelization/js/deck.core.js | 498 ++++++++++++++++++ eo/tutorial/Parallelization/js/deck.goto.js | 170 ++++++ eo/tutorial/Parallelization/js/deck.hash.js | 141 +++++ eo/tutorial/Parallelization/js/deck.menu.js | 187 +++++++ .../Parallelization/js/deck.navigation.js | 91 ++++ eo/tutorial/Parallelization/js/deck.scale.js | 170 ++++++ eo/tutorial/Parallelization/js/deck.status.js | 95 ++++ .../Parallelization/js/jquery-1.7.min.js | 4 + .../Parallelization/js/modernizr.custom.js | 4 + eo/tutorial/Parallelization/js/shjs-cpp.js | 1 + eo/tutorial/Parallelization/js/shjs.js | 1 + 26 files changed, 2200 insertions(+) create mode 100644 eo/tutorial/Parallelization/css/deck.core.css create mode 100644 eo/tutorial/Parallelization/css/deck.goto.css create mode 100644 eo/tutorial/Parallelization/css/deck.hash.css create mode 100644 eo/tutorial/Parallelization/css/deck.menu.css create mode 100644 eo/tutorial/Parallelization/css/deck.navigation.css create mode 100644 eo/tutorial/Parallelization/css/deck.scale.css create mode 100644 eo/tutorial/Parallelization/css/deck.status.css create mode 100644 eo/tutorial/Parallelization/css/eompi.css create mode 100644 eo/tutorial/Parallelization/css/horizontal-slide.css create mode 100644 eo/tutorial/Parallelization/css/shjs.css create mode 100644 eo/tutorial/Parallelization/css/thales.css create mode 100644 eo/tutorial/Parallelization/img/generic_parallel.dia create mode 100644 eo/tutorial/Parallelization/img/generic_parallel.png create mode 100644 eo/tutorial/Parallelization/img/serialisation.dia create mode 100644 eo/tutorial/Parallelization/img/serialisation.png create mode 100644 eo/tutorial/Parallelization/js/deck.core.js create mode 100644 eo/tutorial/Parallelization/js/deck.goto.js create mode 100644 eo/tutorial/Parallelization/js/deck.hash.js create mode 100644 eo/tutorial/Parallelization/js/deck.menu.js create mode 100644 eo/tutorial/Parallelization/js/deck.navigation.js create mode 100644 eo/tutorial/Parallelization/js/deck.scale.js create mode 100644 eo/tutorial/Parallelization/js/deck.status.js create mode 100644 eo/tutorial/Parallelization/js/jquery-1.7.min.js create mode 100644 eo/tutorial/Parallelization/js/modernizr.custom.js create mode 100644 eo/tutorial/Parallelization/js/shjs-cpp.js create mode 100644 eo/tutorial/Parallelization/js/shjs.js diff --git a/eo/tutorial/Parallelization/css/deck.core.css b/eo/tutorial/Parallelization/css/deck.core.css new file mode 100644 index 000000000..a188b28fd --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.core.css @@ -0,0 +1,405 @@ +html { + height: 100%; +} + +body.deck-container { + overflow-y: auto; + position: static; +} + +.deck-container { + position: relative; + min-height: 100%; + margin: 0 auto; + padding: 0 48px; + font-size: 16px; + line-height: 1.25; + overflow: hidden; + /* Resets and base styles from HTML5 Boilerplate */ + /* End HTML5 Boilerplate adaptations */ +} +.js .deck-container { + visibility: hidden; +} +.ready .deck-container { + visibility: visible; +} +.touch .deck-container { + -webkit-text-size-adjust: none; + -moz-text-size-adjust: none; +} +.deck-container div, .deck-container span, .deck-container object, .deck-container iframe, +.deck-container h1, .deck-container h2, .deck-container h3, .deck-container h4, .deck-container h5, .deck-container h6, .deck-container p, .deck-container blockquote, .deck-container pre, +.deck-container abbr, .deck-container address, .deck-container cite, .deck-container code, .deck-container del, .deck-container dfn, .deck-container em, .deck-container img, .deck-container ins, .deck-container kbd, .deck-container q, .deck-container samp, +.deck-container small, .deck-container strong, .deck-container sub, .deck-container sup, .deck-container var, .deck-container b, .deck-container i, .deck-container dl, .deck-container dt, .deck-container dd, .deck-container ol, .deck-container ul, .deck-container li, +.deck-container fieldset, .deck-container form, .deck-container label, .deck-container legend, +.deck-container table, .deck-container caption, .deck-container tbody, .deck-container tfoot, .deck-container thead, .deck-container tr, .deck-container th, .deck-container td, +.deck-container article, .deck-container aside, .deck-container canvas, .deck-container details, .deck-container figcaption, .deck-container figure, +.deck-container footer, .deck-container header, .deck-container hgroup, .deck-container menu, .deck-container nav, .deck-container section, .deck-container summary, +.deck-container time, .deck-container mark, .deck-container audio, .deck-container video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +.deck-container article, .deck-container aside, .deck-container details, .deck-container figcaption, .deck-container figure, +.deck-container footer, .deck-container header, .deck-container hgroup, .deck-container menu, .deck-container nav, .deck-container section { + display: block; +} +.deck-container blockquote, .deck-container q { + quotes: none; +} +.deck-container blockquote:before, .deck-container blockquote:after, .deck-container q:before, .deck-container q:after { + content: ""; + content: none; +} +.deck-container ins { + background-color: #ff9; + color: #000; + text-decoration: none; +} +.deck-container mark { + background-color: #ff9; + color: #000; + font-style: italic; + font-weight: bold; +} +.deck-container del { + text-decoration: line-through; +} +.deck-container abbr[title], .deck-container dfn[title] { + border-bottom: 1px dotted; + cursor: help; +} +.deck-container table { + border-collapse: collapse; + border-spacing: 0; +} +.deck-container hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0; +} +.deck-container input, .deck-container select { + vertical-align: middle; +} +.deck-container select, .deck-container input, .deck-container textarea, .deck-container button { + font: 99% sans-serif; +} +.deck-container pre, .deck-container code, .deck-container kbd, .deck-container samp { + font-family: monospace, sans-serif; +} +.deck-container a { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +.deck-container a:hover, .deck-container a:active { + outline: none; +} +.deck-container ul, .deck-container ol { + margin-left: 2em; + vertical-align: top; +} +.deck-container ol { + list-style-type: decimal; +} +.deck-container nav ul, .deck-container nav li { + margin: 0; + list-style: none; + list-style-image: none; +} +.deck-container small { + font-size: 85%; +} +.deck-container strong, .deck-container th { + font-weight: bold; +} +.deck-container td { + vertical-align: top; +} +.deck-container sub, .deck-container sup { + font-size: 75%; + line-height: 0; + position: relative; +} +.deck-container sup { + top: -0.5em; +} +.deck-container sub { + bottom: -0.25em; +} +.deck-container textarea { + overflow: auto; +} +.ie6 .deck-container legend, .ie7 .deck-container legend { + margin-left: -7px; +} +.deck-container input[type="radio"] { + vertical-align: text-bottom; +} +.deck-container input[type="checkbox"] { + vertical-align: bottom; +} +.ie7 .deck-container input[type="checkbox"] { + vertical-align: baseline; +} +.ie6 .deck-container input { + vertical-align: text-bottom; +} +.deck-container label, .deck-container input[type="button"], .deck-container input[type="submit"], .deck-container input[type="image"], .deck-container button { + cursor: pointer; +} +.deck-container button, .deck-container input, .deck-container select, .deck-container textarea { + margin: 0; +} +.deck-container input:invalid, .deck-container textarea:invalid { + border-radius: 1px; + -moz-box-shadow: 0px 0px 5px red; + -webkit-box-shadow: 0px 0px 5px red; + box-shadow: 0px 0px 5px red; +} +.deck-container input:invalid .no-boxshadow, .deck-container textarea:invalid .no-boxshadow { + background-color: #f0dddd; +} +.deck-container button { + width: auto; + overflow: visible; +} +.ie7 .deck-container img { + -ms-interpolation-mode: bicubic; +} +.deck-container, .deck-container select, .deck-container input, .deck-container textarea { + color: #444; +} +.deck-container a { + color: #607890; +} +.deck-container a:hover, .deck-container a:focus { + color: #036; +} +.deck-container a:link { + -webkit-tap-highlight-color: #fff; +} +.deck-container.deck-loading { + display: none; +} + +.slide { + width: auto; + min-height: 100%; + position: relative; +} +.slide h1 { + font-size: 4.5em; +} +.slide h1, .slide .vcenter { + font-weight: bold; + text-align: center; + padding-top: 1em; + max-height: 100%; +} +.csstransforms .slide h1, .csstransforms .slide .vcenter { + padding: 0 48px; + position: absolute; + left: 0; + right: 0; + top: 50%; + -webkit-transform: translate(0, -50%); + -moz-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + -o-transform: translate(0, -50%); + transform: translate(0, -50%); +} +.slide .vcenter h1 { + position: relative; + top: auto; + padding: 0; + -webkit-transform: none; + -moz-transform: none; + -ms-transform: none; + -o-transform: none; + transform: none; +} +.slide h2 { + font-size: 2.25em; + font-weight: bold; + padding-top: .5em; + margin: 0 0 .66666em 0; + border-bottom: 3px solid #888; +} +.slide h3 { + font-size: 1.4375em; + font-weight: bold; + margin-bottom: .30435em; +} +.slide h4 { + font-size: 1.25em; + font-weight: bold; + margin-bottom: .25em; +} +.slide h5 { + font-size: 1.125em; + font-weight: bold; + margin-bottom: .2222em; +} +.slide h6 { + font-size: 1em; + font-weight: bold; +} +.slide img, .slide iframe, .slide video { + display: block; + max-width: 100%; +} +.slide video, .slide iframe, .slide img { + display: block; + margin: 0 auto; +} +.slide p, .slide blockquote, .slide iframe, .slide img, .slide ul, .slide ol, .slide pre, .slide video { + margin-bottom: 1em; +} +.slide pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 1em; + border: 1px solid #888; +} +.slide em { + font-style: italic; +} +.slide li { + padding: .25em 0; + vertical-align: middle; +} + +.deck-before, .deck-previous, .deck-next, .deck-after { + position: absolute; + left: -999em; + top: -999em; +} + +.deck-current { + z-index: 2; +} + +.slide .slide { + visibility: hidden; + position: static; + min-height: 0; +} + +.deck-child-current { + position: static; + z-index: 2; +} +.deck-child-current .slide { + visibility: hidden; +} +.deck-child-current .deck-previous, .deck-child-current .deck-before, .deck-child-current .deck-current { + visibility: visible; +} + +@media screen and (max-device-width: 480px) { + /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */ +} +@media print { + * { + background: transparent !important; + color: black !important; + text-shadow: none !important; + filter: none !important; + -ms-filter: none !important; + -webkit-box-reflect: none !important; + -moz-box-reflect: none !important; + -webkit-box-shadow: none !important; + -moz-box-shadow: none !important; + box-shadow: none !important; + } + * :before, * :after { + display: none !important; + } + + a, a:visited { + color: #444 !important; + text-decoration: underline; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { + content: ""; + } + + pre, blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + thead { + display: table-header-group; + } + + tr, img { + page-break-inside: avoid; + } + + @page { + margin: 0.5cm; +} + + p, h2, h3 { + orphans: 3; + widows: 3; + } + + h2, h3 { + page-break-after: avoid; + } + + .slide { + position: static !important; + visibility: visible !important; + display: block !important; + -webkit-transform: none !important; + -moz-transform: none !important; + -o-transform: none !important; + -ms-transform: none !important; + transform: none !important; + opacity: 1 !important; + } + + h1, .vcenter { + -webkit-transform: none !important; + -moz-transform: none !important; + -o-transform: none !important; + -ms-transform: none !important; + transform: none !important; + padding: 0 !important; + position: static !important; + } + + .deck-container > .slide { + page-break-after: always; + } + + .deck-container { + width: 100% !important; + height: auto !important; + padding: 0 !important; + display: block !important; + } + + script { + display: none; + } +} diff --git a/eo/tutorial/Parallelization/css/deck.goto.css b/eo/tutorial/Parallelization/css/deck.goto.css new file mode 100644 index 000000000..108e4f9c4 --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.goto.css @@ -0,0 +1,41 @@ +.deck-container .goto-form { + position: absolute; + z-index: 3; + bottom: 10px; + left: 50%; + height: 1.75em; + margin: 0 0 0 -9.125em; + line-height: 1.75em; + padding: 0.625em; + display: none; + background: #ccc; + overflow: hidden; +} +.borderradius .deck-container .goto-form { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; +} +.deck-container .goto-form label { + font-weight: bold; +} +.deck-container .goto-form label, .deck-container .goto-form input { + display: inline-block; + font-family: inherit; +} + +.deck-goto .goto-form { + display: block; +} + +#goto-slide { + width: 8.375em; + margin: 0 0.625em; + height: 1.4375em; +} + +@media print { + .goto-form, #goto-slide { + display: none !important; + } +} diff --git a/eo/tutorial/Parallelization/css/deck.hash.css b/eo/tutorial/Parallelization/css/deck.hash.css new file mode 100644 index 000000000..28f07326b --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.hash.css @@ -0,0 +1,13 @@ +.deck-container .deck-permalink { + display: none; + position: absolute; + z-index: 4; + bottom: 30px; + right: 0; + width: 48px; + text-align: center; +} + +.no-history .deck-container:hover .deck-permalink { + display: block; +} diff --git a/eo/tutorial/Parallelization/css/deck.menu.css b/eo/tutorial/Parallelization/css/deck.menu.css new file mode 100644 index 000000000..c664a3f8e --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.menu.css @@ -0,0 +1,47 @@ +.deck-menu .slide { + background: #eee; + position: relative; + left: 0; + top: 0; + visibility: visible; + cursor: pointer; +} +.no-csstransforms .deck-menu > .slide { + float: left; + width: 22%; + height: 22%; + min-height: 0; + margin: 1%; + font-size: 0.22em; + overflow: hidden; + padding: 0 0.5%; +} +.csstransforms .deck-menu > .slide { + -webkit-transform: scale(0.22) !important; + -moz-transform: scale(0.22) !important; + -o-transform: scale(0.22) !important; + -ms-transform: scale(0.22) !important; + transform: scale(0.22) !important; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -o-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + width: 100%; + height: 100%; + overflow: hidden; + padding: 0 48px; + margin: 12px; +} +.deck-menu iframe, .deck-menu img, .deck-menu video { + max-width: 100%; +} +.deck-menu .deck-current, .no-touch .deck-menu .slide:hover { + background: #ddf; +} +.deck-menu.deck-container:hover .deck-prev-link, .deck-menu.deck-container:hover .deck-next-link { + display: none; +} diff --git a/eo/tutorial/Parallelization/css/deck.navigation.css b/eo/tutorial/Parallelization/css/deck.navigation.css new file mode 100644 index 000000000..e1ebad8b8 --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.navigation.css @@ -0,0 +1,43 @@ +.deck-container .deck-prev-link, .deck-container .deck-next-link { + display: none; + position: absolute; + z-index: 3; + top: 50%; + width: 32px; + height: 32px; + margin-top: -16px; + font-size: 20px; + font-weight: bold; + line-height: 32px; + vertical-align: middle; + text-align: center; + text-decoration: none; + color: #fff; + background: #888; +} +.borderradius .deck-container .deck-prev-link, .borderradius .deck-container .deck-next-link { + -webkit-border-radius: 16px; + -moz-border-radius: 16px; + border-radius: 16px; +} +.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited { + color: #fff; +} +.deck-container .deck-prev-link { + left: 8px; +} +.deck-container .deck-next-link { + right: 8px; +} +.deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link { + display: block; +} +.deck-container:hover .deck-prev-link.deck-nav-disabled, .touch .deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link.deck-nav-disabled, .touch .deck-container:hover .deck-next-link { + display: none; +} + +@media print { + .deck-prev-link, .deck-next-link { + display: none !important; + } +} diff --git a/eo/tutorial/Parallelization/css/deck.scale.css b/eo/tutorial/Parallelization/css/deck.scale.css new file mode 100644 index 000000000..d6a4eb0be --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.scale.css @@ -0,0 +1,28 @@ +/* Remove this line if you are embedding deck.js in a page and +using the scale extension. */ +.csstransforms { + overflow: hidden; +} + +.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide { + -webkit-box-sizing: padding-box; + -moz-box-sizing: padding-box; + box-sizing: padding-box; + width: 100%; + padding-bottom: 20px; +} +.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide > .deck-slide-scaler { + -webkit-transform-origin: 50% 0; + -moz-transform-origin: 50% 0; + -o-transform-origin: 50% 0; + -ms-transform-origin: 50% 0; + transform-origin: 50% 0; +} + +.csstransforms .deck-container.deck-menu .deck-slide-scaler { + -webkit-transform: none !important; + -moz-transform: none !important; + -o-transform: none !important; + -ms-transform: none !important; + transform: none !important; +} diff --git a/eo/tutorial/Parallelization/css/deck.status.css b/eo/tutorial/Parallelization/css/deck.status.css new file mode 100644 index 000000000..17d55ad0d --- /dev/null +++ b/eo/tutorial/Parallelization/css/deck.status.css @@ -0,0 +1,18 @@ +.deck-container .deck-status { + position: absolute; + bottom: 10px; + right: 5px; + color: #888; + z-index: 3; + margin: 0; +} + +body.deck-container .deck-status { + position: fixed; +} + +@media print { + .deck-status { + display: none; + } +} diff --git a/eo/tutorial/Parallelization/css/eompi.css b/eo/tutorial/Parallelization/css/eompi.css new file mode 100644 index 000000000..d089362ce --- /dev/null +++ b/eo/tutorial/Parallelization/css/eompi.css @@ -0,0 +1,9 @@ +.changed +{ + color: green; +} + +.specific +{ + color: red; +} diff --git a/eo/tutorial/Parallelization/css/horizontal-slide.css b/eo/tutorial/Parallelization/css/horizontal-slide.css new file mode 100644 index 000000000..4a4c6adf6 --- /dev/null +++ b/eo/tutorial/Parallelization/css/horizontal-slide.css @@ -0,0 +1,76 @@ +.csstransitions.csstransforms { + overflow-x: hidden; +} +.csstransitions.csstransforms .deck-container > .slide { + -webkit-transition: -webkit-transform 500ms ease-in-out; + -moz-transition: -moz-transform 500ms ease-in-out; + -ms-transition: -ms-transform 500ms ease-in-out; + -o-transition: -o-transform 500ms ease-in-out; + transition: transform 500ms ease-in-out; +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide { + position: absolute; + top: 0; + left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + width: 100%; + padding: 0 48px; +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide { + position: relative; + left: 0; + top: 0; + -webkit-transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out; + -moz-transition: -moz-transform 500ms ease-in-out, opacity 500ms ease-in-out; + -ms-transition: -ms-transform 500ms ease-in-out, opacity 500ms ease-in-out; + -o-transition: -o-transform 500ms ease-in-out, opacity 500ms ease-in-out; + transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out; +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-after { + visibility: visible; + -webkit-transform: translate3d(200%, 0, 0); + -moz-transform: translate(200%, 0); + -ms-transform: translate(200%, 0); + -o-transform: translate(200%, 0); + transform: translate3d(200%, 0, 0); +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous { + -webkit-transform: translate3d(-200%, 0, 0); + -moz-transform: translate(-200%, 0); + -ms-transform: translate(-200%, 0); + -o-transform: translate(-200%, 0); + transform: translate3d(-200%, 0, 0); +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before { + -webkit-transform: translate3d(-400%, 0, 0); + -moz-transform: translate(-400%, 0); + -ms-transform: translate(-400%, 0); + -o-transform: translate(-400%, 0); + transform: translate3d(-400%, 0, 0); +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next { + -webkit-transform: translate3d(200%, 0, 0); + -moz-transform: translate(200%, 0); + -ms-transform: translate(200%, 0); + -o-transform: translate(200%, 0); + transform: translate3d(200%, 0, 0); +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after { + -webkit-transform: translate3d(400%, 0, 0); + -moz-transform: translate(400%, 0); + -ms-transform: translate(400%, 0); + -o-transform: translate(400%, 0); + transform: translate3d(400%, 0, 0); +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide { + visibility: visible; +} +.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current { + -webkit-transform: none; + -moz-transform: none; + -ms-transform: none; + -o-transform: none; + transform: none; +} diff --git a/eo/tutorial/Parallelization/css/shjs.css b/eo/tutorial/Parallelization/css/shjs.css new file mode 100644 index 000000000..ec9d4088b --- /dev/null +++ b/eo/tutorial/Parallelization/css/shjs.css @@ -0,0 +1,67 @@ +pre.sh_sourceCode { + background-color: white; + color: black; + font-style: normal; + font-weight: normal; +} + +pre.sh_sourceCode .sh_keyword { color: blue; font-weight: bold; } /* language keywords */ +pre.sh_sourceCode .sh_type { color: darkgreen; } /* basic types */ +pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */ +pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */ +pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */ +pre.sh_sourceCode .sh_specialchar { color: pink; font-family: monospace; } /* e.g., \n, \t, \\ */ +pre.sh_sourceCode .sh_comment { color: brown; font-style: italic; } /* comments */ +pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */ +pre.sh_sourceCode .sh_preproc { color: darkblue; font-weight: bold; } /* e.g., #include, import */ +pre.sh_sourceCode .sh_symbol { color: darkred; } /* e.g., <, >, + */ +pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */ +pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */ +pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: cyan; } /* TODO and FIXME */ + +/* Predefined variables and functions (for instance glsl) */ +pre.sh_sourceCode .sh_predef_var { color: darkblue; } +pre.sh_sourceCode .sh_predef_func { color: darkblue; font-weight: bold; } + +/* for OOP */ +pre.sh_sourceCode .sh_classname { color: teal; } + +/* line numbers (not yet implemented) */ +pre.sh_sourceCode .sh_linenum { color: black; font-family: monospace; } + +/* Internet related */ +pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; } + +/* for ChangeLog and Log files */ +pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; } +pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: darkblue; font-weight: bold; } +pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: darkgreen; } + +/* for Prolog, Perl... */ +pre.sh_sourceCode .sh_variable { color: darkgreen; } + +/* for LaTeX */ +pre.sh_sourceCode .sh_italics { color: darkgreen; font-style: italic; } +pre.sh_sourceCode .sh_bold { color: darkgreen; font-weight: bold; } +pre.sh_sourceCode .sh_underline { color: darkgreen; text-decoration: underline; } +pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; } +pre.sh_sourceCode .sh_argument { color: darkgreen; } +pre.sh_sourceCode .sh_optionalargument { color: purple; } +pre.sh_sourceCode .sh_math { color: orange; } +pre.sh_sourceCode .sh_bibtex { color: blue; } + +/* for diffs */ +pre.sh_sourceCode .sh_oldfile { color: orange; } +pre.sh_sourceCode .sh_newfile { color: darkgreen; } +pre.sh_sourceCode .sh_difflines { color: blue; } + +/* for css */ +pre.sh_sourceCode .sh_selector { color: purple; } +pre.sh_sourceCode .sh_property { color: blue; } +pre.sh_sourceCode .sh_value { color: darkgreen; font-style: italic; } + +/* other */ +pre.sh_sourceCode .sh_section { color: black; font-weight: bold; } +pre.sh_sourceCode .sh_paren { color: red; } +pre.sh_sourceCode .sh_attribute { color: darkgreen; } + diff --git a/eo/tutorial/Parallelization/css/thales.css b/eo/tutorial/Parallelization/css/thales.css new file mode 100644 index 000000000..e30282966 --- /dev/null +++ b/eo/tutorial/Parallelization/css/thales.css @@ -0,0 +1,91 @@ +.deck-container em { + color:rgb(255,115,0); +} + +.deck-container s { + color:rgb(180,180,211); +} + +.deck-container { + font-family: "Helvetica Neue", sans-serif; + font-size: 1.75em; + color:RGB(50,50,101); + background:white url("./img/thales.jpg") no-repeat fixed bottom left; +} +.deck-container .slide { +} +.deck-container .slide h1 { + color:rgb(50,50,101); +} +.deck-container .slide h2 { + color:rgb(255,115,0); + border-bottom-color:lightgray; +} +.deck-container .slide h3 { + color:RGB(57,138,199); +} +.deck-container .slide pre { + border-color: #ccc; +} +.deck-container .slide blockquote { + font-size: 2em; + font-style: italic; + padding: 1em 2em; + color: #000; + border-left: 5px solid #ccc; + font-family:serif; +} +.deck-container .slide blockquote p { + margin: 0; +} +.deck-container .slide blockquote cite { + font-size: .5em; + font-style: normal; + font-weight: bold; + color: #888; +} +.deck-container .slide ::-moz-selection { + background: #c00; + color: #fff; +} +.deck-container .slide ::selection { + background: #c00; + color: #fff; +} +.deck-container .slide a, .deck-container .slide a:hover, .deck-container .slide a:focus, .deck-container .slide a:active, .deck-container .slide a:visited { + color:RGB(152,191,12); + text-decoration: none; +} +.deck-container .slide a:hover, .deck-container .slide a:focus { + text-decoration: underline; +} +.deck-container > .slide .deck-before, .deck-container > .slide .deck-previous { + opacity: 0.4; +} +.deck-container > .slide .deck-before:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-before:not(.deck-child-current) .deck-previous, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-previous { + opacity: 1; +} +.deck-container > .slide .deck-child-current { + opacity: 1; +} +.deck-container .deck-prev-link, .deck-container .deck-next-link { + background: #ccc; + font-family: serif; +} +.deck-container .deck-prev-link, .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited { + color: #fff; +} +.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus { + background: #c00; + text-decoration: none; +} +.deck-container .deck-status { + font-size: 0.6666em; +} +.deck-container.deck-menu .slide { + background: #eee; +} +.deck-container.deck-menu .deck-current, .no-touch .deck-container.deck-menu .slide:hover { + background: #ddf; +} + diff --git a/eo/tutorial/Parallelization/img/generic_parallel.dia b/eo/tutorial/Parallelization/img/generic_parallel.dia new file mode 100644 index 0000000000000000000000000000000000000000..693475c5b437cd12e500ea48e11eb4af3d4f7f28 GIT binary patch literal 2476 zcmV;d2~+kTiwFP!000001MOYkZ{xTTe&4@B@V2pvR8 zJ}IVYKD!+J`;T8gnZcLOAAX*u@lW_WE8|6kSLBs@bvc;V_422Si@Uo!lHFHvU6dqC zZ%CC~{5Q_B_yQYU3_gE|qNg29<2rWlt>2C7x=hD6brR+ABDoxlM@Gz zw62R6?*BT@s(l8qdi%Szz1DJPWjcM{a5q|X^m3O@>-p6;Pt&#P{oYgWw`rA*v!w0r z)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~;;h>3QgyIsV7PD$+x6`zn@5V<>K1*#7P$41B4=olLv-%=UMO%EYiqr-B?GSsyi z9c~Y7WBd8XTi(EAW7|27m2nNWi?WbM1}2-X`i)C_0zE0u*-zz$(*utrcyD0CV>g09k4r-g4N2rQiZjjN(zf~W1 zTDzd9ecb&@{TT#%IG*C{vj7Kpc;NHtGZ3~?7l#mMts38T{{!cRpII_CYp!}OXxW%! e&*rQ4Z1QpTZ<_a$(*JSZPyPi;wv}V+K>z?d9Q;-Q literal 0 HcmV?d00001 diff --git a/eo/tutorial/Parallelization/img/serialisation.png b/eo/tutorial/Parallelization/img/serialisation.png new file mode 100644 index 0000000000000000000000000000000000000000..76ac0a9c0b67ec7d03b8d686348a465dfeda77c0 GIT binary patch literal 10806 zcmd6NbyQSq_dh5K3Kv0;ka9!;mF`ACz#v2rkS^&)L2?Wbq!pDC5Kuy5=w?u)l#&*S zp&N$onfYzJ?|r|o_x-K)`>x+#_pC+DIh^x6&)Lu3pV-fDsVV<){Pb}mBBDR8U%Psn zh={lVzShVN!6)BNop=I24!g-;*CHb$8yHm|AtE|Mbp7fTt%q+Hhmg)RTM2}fh&+i% zp1X&db@ziA`J>0qsqIiZ-x$BS@ZJVR`W)G<+F{D+9($=Q>WzO)9vBR`F7{nZTbrGUU18? z5#GIam)q-@YrUCdc%6-jgkPRk@p*6VA4e66+{46ExxV>ZZxIuj-Avh4r^QTDlbTuN zDKU;KZGVgDI7@UbNRcR#Dun0^f{ysIJolkT{<Cc)Zbfv4ut8k$Dyfq~my12#}sQ2zMx2GybG`i7={YV)%R3pCMKUe_QJ%5w>zWJ!k()WiXn8q%b!UReV7^~ zQd?X5_U+EG`jGZSnMx!9Kj2g|WG&2VP_{f+?lu=^XlOV&IhmQ6Nf+{=sHiACopZl+ z;OEcd$B*BJLsPRaN8e-drwFFx&Ye54v9a1&5B4?}Z$|TOJXlEZ7#4_cbu5)CD@CiW zdl$P+w}pm=PE1U6c6OrC=w&e-+Q|TVqZk46XC2lm>g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Gm!1I z=h-8q$J{Fc%;w5U+Vyf1UiX9;$djdZh>MFeIID^I?ykqh#eqTsiVCkWdVi)PRX(V< zR~u2sQ#zQE8};HvM{jQ$!N5n#!N!JK-on!I8OF2+OnhE{vNFL_1#6>49R6jXNt|Gl zHPF|OkB&|s#; zO8;!KY~1KrN{*PDpYOT02$4TOAJ31dO*Q-#*!#_FPJJNE6c8lGSHp}fk2oP@9*z}k_^WlwuTTcwPfw&L;&w+?={M& z-dfleB3K4GLheH^5fBZ=0;d-bjAUTb`%{f2dN0LFKA6*Ys^0i^2?c_0hR0Eq#K%)7 z)1c>ML(yN>%;kru!_V%ap=!Xk(Z+t|Ape$^-z9qy7k6>LfCI(|4gs{4U}t8i_03x>e5>F(|Il1_Y1!x^W-A!4xL?rmf=3=RtjaL}lfh{Ssaei1<8eM0J2lL$LW zuvF#cAnLRtm{e}wyu{7z1FBO`VK+HFudtX{VAtr~LQ8x-Poroc7OJvIs8F+@m;B>hnU5v#|dY? zduIau9+;grkE5id(=D-uz+fP6-p$e8_<{ye0UD`bF?;Mqr>CZ#?FUIPvqntMrY8Zk z=7`D!iy$pcsTzqLu7*wo5NKc%aB@yVYfHSe=W3#iH-4{%Aa(xyq&{Z%jnl+Qdk_y` z*<0J%V26PrI!9MHn9GeR4trnz7W>!iOA_WV}nL&O)~o^i1*bwf9|H zcI)mpS5j(#JOO)JP8vF)(zJRI0VzPrfcog=nm%^( zZG?eneCbnqJ3BizubE^r%BF|rw`dhvhWB!159vWUDs-Lv_UzfSjy=igYtZp9)K`Pw zfMhl7@9SAT4Equ&?HUtiyFv9wLeNaVL_!->jB$`deVjUso7TZ9kUnr0!LdPaRbv$^ z*##^hhr*`IMWNUhL!OGI6co6ERsh{nSBs=h>IW&BOnmsOfux79&SriDAm7W#S^7$I zKcb-Hzr)l2g**K_#QX literal 0 HcmV?d00001 diff --git a/eo/tutorial/Parallelization/js/deck.core.js b/eo/tutorial/Parallelization/js/deck.core.js new file mode 100644 index 000000000..6fbeb5ce0 --- /dev/null +++ b/eo/tutorial/Parallelization/js/deck.core.js @@ -0,0 +1,498 @@ +/*! +Deck JS - deck.core +Copyright (c) 2011 Caleb Troughton +Dual licensed under the MIT license and GPL license. +https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt +https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt +*/ + +/* +The deck.core module provides all the basic functionality for creating and +moving through a deck. It does so by applying classes to indicate the state of +the deck and its slides, allowing CSS to take care of the visual representation +of each state. It also provides methods for navigating the deck and inspecting +its state, as well as basic key bindings for going to the next and previous +slides. More functionality is provided by wholly separate extension modules +that use the API provided by core. +*/ +(function($, deck, document, undefined) { + var slides, // Array of all the uh, slides... + current, // Array index of the current slide + $container, // Keeping this cached + + events = { + /* + This event fires whenever the current slide changes, whether by way of + next, prev, or go. The callback function is passed two parameters, from + and to, equal to the indices of the old slide and the new slide + respectively. If preventDefault is called on the event within this handler + the slide change does not occur. + + $(document).bind('deck.change', function(event, from, to) { + alert('Moving from slide ' + from + ' to ' + to); + }); + */ + change: 'deck.change', + + /* + This event fires at the beginning of deck initialization, after the options + are set but before the slides array is created. This event makes a good hook + for preprocessing extensions looking to modify the deck. + */ + beforeInitialize: 'deck.beforeInit', + + /* + This event fires at the end of deck initialization. Extensions should + implement any code that relies on user extensible options (key bindings, + element selectors, classes) within a handler for this event. Native + events associated with Deck JS should be scoped under a .deck event + namespace, as with the example below: + + var $d = $(document); + $.deck.defaults.keys.myExtensionKeycode = 70; // 'h' + $d.bind('deck.init', function() { + $d.bind('keydown.deck', function(event) { + if (event.which === $.deck.getOptions().keys.myExtensionKeycode) { + // Rock out + } + }); + }); + */ + initialize: 'deck.init' + }, + + options = {}, + $d = $(document), + + /* + Internal function. Updates slide and container classes based on which + slide is the current slide. + */ + updateStates = function() { + var oc = options.classes, + osc = options.selectors.container, + old = $container.data('onSlide'), + $all = $(); + + // Container state + $container.removeClass(oc.onPrefix + old) + .addClass(oc.onPrefix + current) + .data('onSlide', current); + + // Remove and re-add child-current classes for nesting + $('.' + oc.current).parentsUntil(osc).removeClass(oc.childCurrent); + slides[current].parentsUntil(osc).addClass(oc.childCurrent); + + // Remove previous states + $.each(slides, function(i, el) { + $all = $all.add(el); + }); + $all.removeClass([ + oc.before, + oc.previous, + oc.current, + oc.next, + oc.after + ].join(" ")); + + // Add new states back in + slides[current].addClass(oc.current); + if (current > 0) { + slides[current-1].addClass(oc.previous); + } + if (current + 1 < slides.length) { + slides[current+1].addClass(oc.next); + } + if (current > 1) { + $.each(slides.slice(0, current - 1), function(i, el) { + el.addClass(oc.before); + }); + } + if (current + 2 < slides.length) { + $.each(slides.slice(current+2), function(i, el) { + el.addClass(oc.after); + }); + } + }, + + /* Methods exposed in the jQuery.deck namespace */ + methods = { + + /* + jQuery.deck(selector, options) + + selector: string | jQuery | array + options: object, optional + + Initializes the deck, using each element matched by selector as a slide. + May also be passed an array of string selectors or jQuery objects, in + which case each selector in the array is considered a slide. The second + parameter is an optional options object which will extend the default + values. + + $.deck('.slide'); + + or + + $.deck([ + '#first-slide', + '#second-slide', + '#etc' + ]); + */ + init: function(elements, opts) { + var startTouch, + tolerance, + esp = function(e) { + e.stopPropagation(); + }; + + options = $.extend(true, {}, $[deck].defaults, opts); + slides = []; + current = 0; + $container = $(options.selectors.container); + tolerance = options.touch.swipeTolerance; + + // Pre init event for preprocessing hooks + $d.trigger(events.beforeInitialize); + + // Hide the deck while states are being applied to kill transitions + $container.addClass(options.classes.loading); + + // Fill slides array depending on parameter type + if ($.isArray(elements)) { + $.each(elements, function(i, e) { + slides.push($(e)); + }); + } + else { + $(elements).each(function(i, e) { + slides.push($(e)); + }); + } + + /* Remove any previous bindings, and rebind key events */ + $d.unbind('keydown.deck').bind('keydown.deck', function(e) { + if (e.which === options.keys.next || $.inArray(e.which, options.keys.next) > -1) { + methods.next(); + e.preventDefault(); + } + else if (e.which === options.keys.previous || $.inArray(e.which, options.keys.previous) > -1) { + methods.prev(); + e.preventDefault(); + } + }); + + /* Bind touch events for swiping between slides on touch devices */ + $container.unbind('touchstart.deck').bind('touchstart.deck', function(e) { + if (!startTouch) { + startTouch = $.extend({}, e.originalEvent.targetTouches[0]); + } + }) + .unbind('touchmove.deck').bind('touchmove.deck', function(e) { + $.each(e.originalEvent.changedTouches, function(i, t) { + if (startTouch && t.identifier === startTouch.identifier) { + if (t.screenX - startTouch.screenX > tolerance || t.screenY - startTouch.screenY > tolerance) { + $[deck]('prev'); + startTouch = undefined; + } + else if (t.screenX - startTouch.screenX < -1 * tolerance || t.screenY - startTouch.screenY < -1 * tolerance) { + $[deck]('next'); + startTouch = undefined; + } + return false; + } + }); + e.preventDefault(); + }) + .unbind('touchend.deck').bind('touchend.deck', function(t) { + $.each(t.originalEvent.changedTouches, function(i, t) { + if (startTouch && t.identifier === startTouch.identifier) { + startTouch = undefined; + } + }); + }) + .scrollLeft(0).scrollTop(0) + /* Stop propagation of key events within editable elements of slides */ + .undelegate('input, textarea, select, button, meter, progress, [contentEditable]', 'keydown', esp) + .delegate('input, textarea, select, button, meter, progress, [contentEditable]', 'keydown', esp); + + /* + Kick iframe videos, which dont like to redraw w/ transforms. + Remove this if Webkit ever fixes it. + */ + $.each(slides, function(i, $el) { + $el.unbind('webkitTransitionEnd.deck').bind('webkitTransitionEnd.deck', + function(event) { + if ($el.hasClass($[deck]('getOptions').classes.current)) { + var embeds = $(this).find('iframe').css('opacity', 0); + window.setTimeout(function() { + embeds.css('opacity', 1); + }, 100); + } + }); + }); + + if (slides.length) { + updateStates(); + } + + // Show deck again now that slides are in place + $container.removeClass(options.classes.loading); + $d.trigger(events.initialize); + }, + + /* + jQuery.deck('go', index) + + index: integer | string + + Moves to the slide at the specified index if index is a number. Index is + 0-based, so $.deck('go', 0); will move to the first slide. If index is a + string this will move to the slide with the specified id. If index is out + of bounds or doesn't match a slide id the call is ignored. + */ + go: function(index) { + var e = $.Event(events.change), + ndx; + + /* Number index, easy. */ + if (typeof index === 'number' && index >= 0 && index < slides.length) { + ndx = index; + } + /* Id string index, search for it and set integer index */ + else if (typeof index === 'string') { + $.each(slides, function(i, $slide) { + if ($slide.attr('id') === index) { + ndx = i; + return false; + } + }); + }; + + /* Out of bounds, id doesn't exist, illegal input, eject */ + if (typeof ndx === 'undefined') return; + + $d.trigger(e, [current, ndx]); + if (e.isDefaultPrevented()) { + /* Trigger the event again and undo the damage done by extensions. */ + $d.trigger(events.change, [ndx, current]); + } + else { + current = ndx; + updateStates(); + } + }, + + /* + jQuery.deck('next') + + Moves to the next slide. If the last slide is already active, the call + is ignored. + */ + next: function() { + methods.go(current+1); + }, + + /* + jQuery.deck('prev') + + Moves to the previous slide. If the first slide is already active, the + call is ignored. + */ + prev: function() { + methods.go(current-1); + }, + + /* + jQuery.deck('getSlide', index) + + index: integer, optional + + Returns a jQuery object containing the slide at index. If index is not + specified, the current slide is returned. + */ + getSlide: function(index) { + var i = typeof index !== 'undefined' ? index : current; + if (typeof i != 'number' || i < 0 || i >= slides.length) return null; + return slides[i]; + }, + + /* + jQuery.deck('getSlides') + + Returns all slides as an array of jQuery objects. + */ + getSlides: function() { + return slides; + }, + + /* + jQuery.deck('getContainer') + + Returns a jQuery object containing the deck container as defined by the + container option. + */ + getContainer: function() { + return $container; + }, + + /* + jQuery.deck('getOptions') + + Returns the options object for the deck, including any overrides that + were defined at initialization. + */ + getOptions: function() { + return options; + }, + + /* + jQuery.deck('extend', name, method) + + name: string + method: function + + Adds method to the deck namespace with the key of name. This doesn’t + give access to any private member data — public methods must still be + used within method — but lets extension authors piggyback on the deck + namespace rather than pollute jQuery. + + $.deck('extend', 'alert', function(msg) { + alert(msg); + }); + + // Alerts 'boom' + $.deck('alert', 'boom'); + */ + extend: function(name, method) { + methods[name] = method; + } + }; + + /* jQuery extension */ + $[deck] = function(method, arg) { + if (methods[method]) { + return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); + } + else { + return methods.init(method, arg); + } + }; + + /* + The default settings object for a deck. All deck extensions should extend + this object to add defaults for any of their options. + + options.classes.after + This class is added to all slides that appear after the 'next' slide. + + options.classes.before + This class is added to all slides that appear before the 'previous' + slide. + + options.classes.childCurrent + This class is added to all elements in the DOM tree between the + 'current' slide and the deck container. For standard slides, this is + mostly seen and used for nested slides. + + options.classes.current + This class is added to the current slide. + + options.classes.loading + This class is applied to the deck container during loading phases and is + primarily used as a way to short circuit transitions between states + where such transitions are distracting or unwanted. For example, this + class is applied during deck initialization and then removed to prevent + all the slides from appearing stacked and transitioning into place + on load. + + options.classes.next + This class is added to the slide immediately following the 'current' + slide. + + options.classes.onPrefix + This prefix, concatenated with the current slide index, is added to the + deck container as you change slides. + + options.classes.previous + This class is added to the slide immediately preceding the 'current' + slide. + + options.selectors.container + Elements matched by this CSS selector will be considered the deck + container. The deck container is used to scope certain states of the + deck, as with the onPrefix option, or with extensions such as deck.goto + and deck.menu. + + options.keys.next + The numeric keycode used to go to the next slide. + + options.keys.previous + The numeric keycode used to go to the previous slide. + + options.touch.swipeTolerance + The number of pixels the users finger must travel to produce a swipe + gesture. + */ + $[deck].defaults = { + classes: { + after: 'deck-after', + before: 'deck-before', + childCurrent: 'deck-child-current', + current: 'deck-current', + loading: 'deck-loading', + next: 'deck-next', + onPrefix: 'on-slide-', + previous: 'deck-previous' + }, + + selectors: { + container: '.deck-container' + }, + + keys: { + // enter, space, page down, right arrow, down arrow, + next: [13, 32, 34, 39, 40], + // backspace, page up, left arrow, up arrow + previous: [8, 33, 37, 38] + }, + + touch: { + swipeTolerance: 60 + } + }; + + $d.ready(function() { + $('html').addClass('ready'); + }); + + /* + FF + Transforms + Flash video don't get along... + Firefox will reload and start playing certain videos after a + transform. Blanking the src when a previously shown slide goes out + of view prevents this. + */ + $d.bind('deck.change', function(e, from, to) { + var oldFrames = $[deck]('getSlide', from).find('iframe'), + newFrames = $[deck]('getSlide', to).find('iframe'); + + oldFrames.each(function() { + var $this = $(this), + curSrc = $this.attr('src'); + + if(curSrc) { + $this.data('deck-src', curSrc).attr('src', ''); + } + }); + + newFrames.each(function() { + var $this = $(this), + originalSrc = $this.data('deck-src'); + + if (originalSrc) { + $this.attr('src', originalSrc); + } + }); + }); +})(jQuery, 'deck', document); diff --git a/eo/tutorial/Parallelization/js/deck.goto.js b/eo/tutorial/Parallelization/js/deck.goto.js new file mode 100644 index 000000000..eedba10b1 --- /dev/null +++ b/eo/tutorial/Parallelization/js/deck.goto.js @@ -0,0 +1,170 @@ +/*! +Deck JS - deck.goto +Copyright (c) 2011 Caleb Troughton +Dual licensed under the MIT license and GPL license. +https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt +https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt +*/ + +/* +This module adds the necessary methods and key bindings to show and hide a form +for jumping to any slide number/id in the deck (and processes that form +accordingly). The form-showing state is indicated by the presence of a class on +the deck container. +*/ +(function($, deck, undefined) { + var $d = $(document); + + /* + Extends defaults/options. + + options.classes.goto + This class is added to the deck container when showing the Go To Slide + form. + + options.selectors.gotoDatalist + The element that matches this selector is the datalist element that will + be populated with options for each of the slide ids. In browsers that + support the datalist element, this provides a drop list of slide ids to + aid the user in selecting a slide. + + options.selectors.gotoForm + The element that matches this selector is the form that is submitted + when a user hits enter after typing a slide number/id in the gotoInput + element. + + options.selectors.gotoInput + The element that matches this selector is the text input field for + entering a slide number/id in the Go To Slide form. + + options.keys.goto + The numeric keycode used to show the Go To Slide form. + + options.countNested + If false, only top level slides will be counted when entering a + slide number. + */ + $.extend(true, $[deck].defaults, { + classes: { + goto: 'deck-goto' + }, + + selectors: { + gotoDatalist: '#goto-datalist', + gotoForm: '.goto-form', + gotoInput: '#goto-slide' + }, + + keys: { + goto: 71 // g + }, + + countNested: true + }); + + /* + jQuery.deck('showGoTo') + + Shows the Go To Slide form by adding the class specified by the goto class + option to the deck container. + */ + $[deck]('extend', 'showGoTo', function() { + $[deck]('getContainer').addClass($[deck]('getOptions').classes.goto); + $($[deck]('getOptions').selectors.gotoInput).focus(); + }); + + /* + jQuery.deck('hideGoTo') + + Hides the Go To Slide form by removing the class specified by the goto class + option from the deck container. + */ + $[deck]('extend', 'hideGoTo', function() { + $($[deck]('getOptions').selectors.gotoInput).blur(); + $[deck]('getContainer').removeClass($[deck]('getOptions').classes.goto); + }); + + /* + jQuery.deck('toggleGoTo') + + Toggles between showing and hiding the Go To Slide form. + */ + $[deck]('extend', 'toggleGoTo', function() { + $[deck]($[deck]('getContainer').hasClass($[deck]('getOptions').classes.goto) ? 'hideGoTo' : 'showGoTo'); + }); + + $d.bind('deck.init', function() { + var opts = $[deck]('getOptions'), + $datalist = $(opts.selectors.gotoDatalist), + slideTest = $.map([ + opts.classes.before, + opts.classes.previous, + opts.classes.current, + opts.classes.next, + opts.classes.after + ], function(el, i) { + return '.' + el; + }).join(', '), + rootCounter = 1; + + // Bind key events + $d.unbind('keydown.deckgoto').bind('keydown.deckgoto', function(e) { + var key = $[deck]('getOptions').keys.goto; + + if (e.which === key || $.inArray(e.which, key) > -1) { + e.preventDefault(); + $[deck]('toggleGoTo'); + } + }); + + /* Populate datalist and work out countNested*/ + $.each($[deck]('getSlides'), function(i, $slide) { + var id = $slide.attr('id'), + $parentSlides = $slide.parentsUntil(opts.selectors.container, slideTest); + + if (id) { + $datalist.append('